mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-25 03:20:23 +01:00
6d1170f06c
Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: ricky <ricky.miller@gmail.com> Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com> Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com> Co-authored-by: legobt <6wbvkn0j@anonaddy.me> Co-authored-by: Pedro Figueiredo <pedro.figueiredo@consensys.net>
6148 lines
1.4 MiB
6148 lines
1.4 MiB
diff --git a/dist/index.js b/dist/index.js
|
||
index 6b889a8c93e4c546dd2b1905c968ade143435134..999a1abe7a6ab3b9f7a12784b80c109152b1194c 100644
|
||
--- a/dist/index.js
|
||
+++ b/dist/index.js
|
||
@@ -1,6 +1,2 @@
|
||
'use strict'
|
||
-if (process.env.NODE_ENV === 'production') {
|
||
- module.exports = require('./redux-toolkit.cjs.production.min.js')
|
||
-} else {
|
||
- module.exports = require('./redux-toolkit.cjs.development.js')
|
||
-}
|
||
\ No newline at end of file
|
||
+module.exports = require('./redux-toolkit.cjs.development.js')
|
||
\ No newline at end of file
|
||
diff --git a/dist/redux-toolkit.cjs.development.js b/dist/redux-toolkit.cjs.development.js
|
||
index a59c40df338d9dc5ad1f47662f4906808722d72b..43d4f07a18cc37c4855f94242d87710ffa27fa32 100644
|
||
--- a/dist/redux-toolkit.cjs.development.js
|
||
+++ b/dist/redux-toolkit.cjs.development.js
|
||
@@ -1,3 +1,13 @@
|
||
+function __define(obj, key, value) {
|
||
+ Object.defineProperty(obj, key, {
|
||
+ value: value,
|
||
+ enumerable: true,
|
||
+ configurable: true,
|
||
+ writable: true
|
||
+ });
|
||
+ return obj[key];
|
||
+}
|
||
+
|
||
var __extends = (this && this.__extends) || (function () {
|
||
var extendStatics = function (d, b) {
|
||
extendStatics = Object.setPrototypeOf ||
|
||
@@ -9,7 +19,7 @@ var __extends = (this && this.__extends) || (function () {
|
||
if (typeof b !== "function" && b !== null)
|
||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||
extendStatics(d, b);
|
||
- function __() { this.constructor = d; }
|
||
+ function __() { __define(this, constructor, d); }
|
||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
};
|
||
})();
|
||
@@ -237,14 +247,14 @@ var MiddlewareArray = /** @class */ (function (_super) {
|
||
enumerable: false,
|
||
configurable: true
|
||
});
|
||
- MiddlewareArray.prototype.concat = function () {
|
||
+ __define(MiddlewareArray.prototype, 'concat', function () {
|
||
var arr = [];
|
||
for (var _i = 0; _i < arguments.length; _i++) {
|
||
arr[_i] = arguments[_i];
|
||
}
|
||
return _super.prototype.concat.apply(this, arr);
|
||
- };
|
||
- MiddlewareArray.prototype.prepend = function () {
|
||
+ });
|
||
+ __define(MiddlewareArray.prototype, 'prepend', function () {
|
||
var arr = [];
|
||
for (var _i = 0; _i < arguments.length; _i++) {
|
||
arr[_i] = arguments[_i];
|
||
@@ -253,7 +263,7 @@ var MiddlewareArray = /** @class */ (function (_super) {
|
||
return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))();
|
||
}
|
||
return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))();
|
||
- };
|
||
+ });
|
||
return MiddlewareArray;
|
||
}(Array));
|
||
// src/immutableStateInvariantMiddleware.ts
|
||
diff --git a/dist/redux-toolkit.cjs.production.min.js b/dist/redux-toolkit.cjs.production.min.js
|
||
deleted file mode 100644
|
||
index 448c5510a10b00ede01d7f5b6b35023e3e847676..0000000000000000000000000000000000000000
|
||
--- a/dist/redux-toolkit.cjs.production.min.js
|
||
+++ /dev/null
|
||
@@ -1,2 +0,0 @@
|
||
-var e,t=this&&this.__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])})(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)}),n=this&&this.__generator||function(e,t){var n,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!((i=(i=u.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},i=Object.create,o=Object.defineProperty,u=Object.defineProperties,a=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,s=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,v=function(e,t,n){return t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},y=function(e,t){for(var n in t||(t={}))d.call(t,n)&&v(e,n,t[n]);if(l)for(var r=0,i=l(t);r<i.length;r++)p.call(t,n=i[r])&&v(e,n,t[n]);return e},h=function(e,t){return u(e,c(t))},g=function(e){return o(e,"__esModule",{value:!0})},m=function(e,t,n){if(t&&"object"==typeof t||"function"==typeof t)for(var r=function(r){d.call(e,r)||"default"===r||o(e,r,{get:function(){return t[r]},enumerable:!(n=a(t,r))||n.enumerable})},i=0,u=f(t);i<u.length;i++)r(u[i]);return e},b=function(e){return m(g(o(null!=e?i(s(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};g(exports),function(e,t){for(var n in t)o(e,n,{get:t[n],enumerable:!0})}(exports,{MiddlewareArray:function(){return M},configureStore:function(){return N},createAction:function(){return z},createAsyncThunk:function(){return ie},createDraftSafeSelector:function(){return _},createEntityAdapter:function(){return Z},createImmutableStateInvariantMiddleware:function(){return R},createNextState:function(){return w.default},createReducer:function(){return B},createSelector:function(){return j.createSelector},createSerializableStateInvariantMiddleware:function(){return T},createSlice:function(){return F},current:function(){return w.current},findNonSerializableValue:function(){return C},freeze:function(){return w.freeze},getDefaultMiddleware:function(){return V},getType:function(){return W},isAllOf:function(){return ce},isAnyOf:function(){return ae},isAsyncThunkAction:function(){return ye},isDraft:function(){return w.isDraft},isFulfilled:function(){return ve},isImmutableDefault:function(){return D},isPending:function(){return se},isPlain:function(){return k},isPlainObject:function(){return q},isRejected:function(){return de},isRejectedWithValue:function(){return pe},miniSerializeError:function(){return re},nanoid:function(){return $},original:function(){return w.original},unwrapResult:function(){return oe}});var O=b(require("immer"));m(exports,b(require("redux")));var w=b(require("immer")),j=b(require("reselect")),E=b(require("immer")),S=b(require("reselect")),_=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=S.createSelector.apply(void 0,e),i=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];return n.apply(void 0,r([(0,E.isDraft)(e)?(0,E.current)(e):e],t))};return i},A=b(require("redux")),P=b(require("redux")),x="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?P.compose:P.compose.apply(null,arguments)};function q(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window;var I=b(require("redux-thunk")),M=function(e){function n(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=e.apply(this,t)||this;return Object.setPrototypeOf(i,n.prototype),i}return t(n,e),Object.defineProperty(n,Symbol.species,{get:function(){return n},enumerable:!1,configurable:!0}),n.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},n.prototype.prepend=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&Array.isArray(e[0])?new(n.bind.apply(n,r([void 0],e[0].concat(this)))):new(n.bind.apply(n,r([void 0],e.concat(this))))},n}(Array);function D(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function R(e){return void 0===e&&(e={}),function(){return function(e){return function(t){return e(t)}}}}function k(e){var t=typeof e;return"undefined"===t||null===e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||q(e)}function C(e,t,n,r,i){var o;if(void 0===t&&(t=""),void 0===n&&(n=k),void 0===i&&(i=[]),!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;for(var u=null!=r?r(e):Object.entries(e),a=i.length>0,c=0,f=u;c<f.length;c++){var l=f[c],s=l[0],d=l[1],p=t?t+"."+s:s;if(!(a&&i.indexOf(p)>=0)){if(!n(d))return{keyPath:p,value:d};if("object"==typeof d&&(o=C(d,p,n,r,i)))return o}}return!1}function T(e){return void 0===e&&(e={}),function(){return function(e){return function(t){return e(t)}}}}function V(e){void 0===e&&(e={});var t=e.thunk,n=void 0===t||t,r=new M;return n&&r.push("boolean"==typeof n?I.default:I.default.withExtraArgument(n.extraArgument)),r}function N(e){var t,n=function(e){return V(e)},i=e||{},o=i.reducer,u=void 0===o?void 0:o,a=i.middleware,c=void 0===a?n():a,f=i.devTools,l=void 0===f||f,s=i.preloadedState,d=void 0===s?void 0:s,p=i.enhancers,v=void 0===p?void 0:p;if("function"==typeof u)t=u;else{if(!q(u))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=(0,A.combineReducers)(u)}var h=c;"function"==typeof h&&(h=h(n));var g=A.applyMiddleware.apply(void 0,h),m=A.compose;l&&(m=x(y({trace:!1},"object"==typeof l&&l)));var b=[g];Array.isArray(v)?b=r([g],v):"function"==typeof v&&(b=v(b));var O=m.apply(void 0,b);return(0,A.createStore)(t,d,O)}function z(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 y(y({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 L(e){return["type","payload","error","meta"].indexOf(e)>-1}function W(e){return""+e}var X=b(require("immer"));function U(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 B(e,t,n,i){void 0===n&&(n=[]);var o="function"==typeof t?U(t):[t,n,i],u=o[0],a=o[1],c=o[2],f=(0,X.default)(e,(function(){}));return function(e,t){void 0===e&&(e=f);var n=r([u[t.type]],a.filter((function(e){return(0,e.matcher)(t)})).map((function(e){return e.reducer})));return 0===n.filter((function(e){return!!e})).length&&(n=[c]),n.reduce((function(e,n){if(n){var r;if((0,X.isDraft)(e))return void 0===(r=n(e,t))?e:r;if((0,X.isDraftable)(e))return(0,X.default)(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)}}function F(e){var t=e.name,n=e.initialState;if(!t)throw new Error("`name` is a required option for createSlice");var r=e.reducers||{},i="function"==typeof e.extraReducers?U(e.extraReducers):[e.extraReducers],o=i[0],u=void 0===o?{}:o,a=i[1],c=void 0===a?[]:a,f=i[2],l=void 0===f?void 0:f,s=Object.keys(r),d={},p={},v={};s.forEach((function(e){var n,i,o=r[e],u=t+"/"+e;"reducer"in o?(n=o.reducer,i=o.prepare):n=o,d[e]=n,p[u]=n,v[e]=i?z(u,i):z(u)}));var h=B(n,y(y({},u),p),c,l);return{name:t,reducer:h,actions:v,caseReducers:d}}var G=b(require("immer"));function H(e){return function(t,n){var r=function(t){var r;q(r=n)&&"string"==typeof r.type&&Object.keys(r).every(L)?e(n.payload,t):e(n,t)};return(0,G.isDraft)(t)?(r(t),t):(0,G.default)(t,r)}}function J(e,t){return t(e)}function K(e){return Array.isArray(e)||(e=Object.values(e)),e}function Q(e,t,n){for(var r=[],i=[],o=0,u=e=K(e);o<u.length;o++){var a=u[o],c=J(a,t);c in n.entities?i.push({id:c,changes:a}):r.push(a)}return[r,i]}function Y(e){function t(t,n){var r=J(t,e);r in n.entities||(n.ids.push(r),n.entities[r]=t)}function n(e,n){for(var r=0,i=e=K(e);r<i.length;r++)t(i[r],n)}function r(t,n){var r=J(t,e);r in n.entities||n.ids.push(r),n.entities[r]=t}function i(e,t){var n=!1;e.forEach((function(e){e in t.entities&&(delete t.entities[e],n=!0)})),n&&(t.ids=t.ids.filter((function(e){return e in t.entities})))}function o(t,n){var r={},i={};t.forEach((function(e){e.id in n.entities&&(i[e.id]={id:e.id,changes:y(y({},i[e.id]?i[e.id].changes:null),e.changes)})})),(t=Object.values(i)).length>0&&t.filter((function(t){return function(t,n,r){var i=Object.assign({},r.entities[n.id],n.changes),o=J(i,e),u=o!==n.id;return u&&(t[n.id]=o,delete r.entities[n.id]),r.entities[o]=i,u}(r,t,n)})).length>0&&(n.ids=n.ids.map((function(e){return r[e]||e})))}function u(t,r){var i=Q(t,e,r),u=i[0];o(i[1],r),n(u,r)}return{removeAll:(a=function(e){Object.assign(e,{ids:[],entities:{}})},c=H((function(e,t){return a(t)})),function(e){return c(e,void 0)}),addOne:H(t),addMany:H(n),setOne:H(r),setMany:H((function(e,t){for(var n=0,i=e=K(e);n<i.length;n++)r(i[n],t)})),setAll:H((function(e,t){e=K(e),t.ids=[],t.entities={},n(e,t)})),updateOne:H((function(e,t){return o([e],t)})),updateMany:H(o),upsertOne:H((function(e,t){return u([e],t)})),upsertMany:H(u),removeOne:H((function(e,t){return i([e],t)})),removeMany:H(i)};var a,c}function Z(e){void 0===e&&(e={});var t=y({sortComparer:!1,selectId:function(e){return e.id}},e),n=t.selectId,r=t.sortComparer,i={getInitialState:function(e){return void 0===e&&(e={}),Object.assign({ids:[],entities:{}},e)}},o={getSelectors:function(e){var t=function(e){return e.ids},n=function(e){return e.entities},r=_(t,n,(function(e,t){return e.map((function(e){return t[e]}))})),i=function(e,t){return t},o=function(e,t){return e[t]},u=_(t,(function(e){return e.length}));if(!e)return{selectIds:t,selectEntities:n,selectAll:r,selectTotal:u,selectById:_(n,i,o)};var a=_(e,n);return{selectIds:_(e,t),selectEntities:a,selectAll:_(e,r),selectTotal:_(e,u),selectById:_(a,i,o)}}},u=r?function(e,t){var n=Y(e);function r(t,n){var r=(t=K(t)).filter((function(t){return!(J(t,e)in n.entities)}));0!==r.length&&a(r,n)}function i(e,t){0!==(e=K(e)).length&&a(e,t)}function o(t,n){var r=[];t.forEach((function(t){return function(t,n,r){if(!(n.id in r.entities))return!1;var i=Object.assign({},r.entities[n.id],n.changes),o=J(i,e);return delete r.entities[n.id],t.push(i),o!==n.id}(r,t,n)})),0!==r.length&&a(r,n)}function u(t,n){var i=Q(t,e,n),u=i[0];o(i[1],n),r(u,n)}function a(n,r){n.forEach((function(t){r.entities[e(t)]=t}));var i=Object.values(r.entities);i.sort(t);var o=i.map(e);(function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(r.ids,o)||(r.ids=o)}return{removeOne:n.removeOne,removeMany:n.removeMany,removeAll:n.removeAll,addOne:H((function(e,t){return r([e],t)})),updateOne:H((function(e,t){return o([e],t)})),upsertOne:H((function(e,t){return u([e],t)})),setOne:H((function(e,t){return i([e],t)})),setMany:H(i),setAll:H((function(e,t){e=K(e),t.entities={},t.ids=[],r(e,t)})),addMany:H(r),updateMany:H(o),upsertMany:H(u)}}(n,r):Y(n);return y(y(y({selectId:n,sortComparer:r},i),o),u)}var $=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},ee=["name","message","stack","code"],te=function(e,t){this.payload=e,this.meta=t},ne=function(e,t){this.payload=e,this.meta=t},re=function(e){if("object"==typeof e&&null!==e){for(var t={},n=0,r=ee;n<r.length;n++){var i=r[n];"string"==typeof e[i]&&(t[i]=e[i])}return t}return{message:String(e)}};function ie(e,t,r){var i=z(e+"/fulfilled",(function(e,t,n,r){return{payload:e,meta:h(y({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}})),o=z(e+"/pending",(function(e,t,n){return{payload:void 0,meta:h(y({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),u=z(e+"/rejected",(function(e,t,n,i,o){return{payload:i,error:(r&&r.serializeError||re)(e||"Rejected"),meta:h(y({},o||{}),{arg:n,requestId:t,rejectedWithValue:!!i,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),a="undefined"!=typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){}}}return e.prototype.abort=function(){},e}();return Object.assign((function(e){return function(c,f,l){var s,d,p=(null!=(s=null==r?void 0:r.idGenerator)?s:$)(),v=new a,y=new Promise((function(e,t){return v.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:d||"Aborted"})}))})),h=!1,g=function(){return a=this,s=function(){var a,s,d;return n(this,(function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),r&&r.condition&&!1===r.condition(e,{getState:f,extra:l}))throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return h=!0,c(o(p,e,null==(a=null==r?void 0:r.getPendingMeta)?void 0:a.call(r,{requestId:p,arg:e},{getState:f,extra:l}))),[4,Promise.race([y,Promise.resolve(t(e,{dispatch:c,getState:f,extra:l,requestId:p,signal:v.signal,rejectWithValue:function(e,t){return new te(e,t)},fulfillWithValue:function(e,t){return new ne(e,t)}})).then((function(t){if(t instanceof te)throw t;return t instanceof ne?i(t.payload,p,e,t.meta):i(t,p,e)}))])];case 1:return s=n.sent(),[3,3];case 2:return d=n.sent(),s=d instanceof te?u(null,p,e,d.payload,d.meta):u(d,p,e),[3,3];case 3:return r&&!r.dispatchConditionRejection&&u.match(s)&&s.meta.condition||c(s),[2,s]}}))},new Promise((function(e,t){var n=function(e){try{i(s.next(e))}catch(e){t(e)}},r=function(e){try{i(s.throw(e))}catch(e){t(e)}},i=function(t){return t.done?e(t.value):Promise.resolve(t.value).then(n,r)};i((s=s.apply(a,null)).next())}));var a,s}();return Object.assign(g,{abort:function(e){h&&(d=e,v.abort())},requestId:p,arg:e,unwrap:function(){return g.then(oe)}})}}),{pending:o,rejected:u,fulfilled:i,typePrefix:e})}function oe(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var ue=function(e,t){return(n=e)&&"function"==typeof n.match?e.match(t):e(t);var n};function ae(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.some((function(e){return ue(e,t)}))}}function ce(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.every((function(e){return ue(e,t)}))}}function fe(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 se(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return fe(e,["pending"])}:le(e)?function(t){var n=e.map((function(e){return e.pending}));return ae.apply(void 0,n)(t)}:se()(e[0])}function de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return fe(e,["rejected"])}:le(e)?function(t){var n=e.map((function(e){return e.rejected}));return ae.apply(void 0,n)(t)}:de()(e[0])}function pe(){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 ce(de.apply(void 0,e),n)(t)}:pe()(e[0])}function ve(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return fe(e,["fulfilled"])}:le(e)?function(t){var n=e.map((function(e){return e.fulfilled}));return ae.apply(void 0,n)(t)}:ve()(e[0])}function ye(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return fe(e,["pending","fulfilled","rejected"])}:le(e)?function(t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];n.push(o.pending,o.rejected,o.fulfilled)}return ae.apply(void 0,n)(t)}:ye()(e[0])}(0,O.enableES5)();
|
||
-//# sourceMappingURL=redux-toolkit.cjs.production.min.js.map
|
||
\ No newline at end of file
|
||
diff --git a/dist/redux-toolkit.cjs.production.min.js.map b/dist/redux-toolkit.cjs.production.min.js.map
|
||
deleted file mode 100644
|
||
index e25f4d91d0caf5e06811bc340c557f31138d54c8..0000000000000000000000000000000000000000
|
||
--- a/dist/redux-toolkit.cjs.production.min.js.map
|
||
+++ /dev/null
|
||
@@ -1 +0,0 @@
|
||
-{"version":3,"sources":["../src/index.ts","../src/createDraftSafeSelector.ts","../src/configureStore.ts","../src/devtoolsExtension.ts","../src/isPlainObject.ts","../src/getDefaultMiddleware.ts","../src/utils.ts","../src/immutableStateInvariantMiddleware.ts","../src/serializableStateInvariantMiddleware.ts","../src/createAction.ts","../src/createReducer.ts","../src/mapBuilders.ts","../src/createSlice.ts","../src/entities/state_adapter.ts","../src/entities/utils.ts","../src/entities/unsorted_state_adapter.ts","../src/entities/create_adapter.ts","../src/entities/entity_state.ts","../src/entities/state_selectors.ts","../src/entities/sorted_state_adapter.ts","../src/nanoid.ts","../src/createAsyncThunk.ts","../src/tsHelpers.ts","../src/matchers.ts"],"names":["__markAsModule","exports","__export","MiddlewareArray","configureStore","createAction","createAsyncThunk","createDraftSafeSelector","createEntityAdapter","createImmutableStateInvariantMiddleware","createNextState","import_immer5","default","createReducer","createSelector","import_reselect2","createSerializableStateInvariantMiddleware","createSlice","current","findNonSerializableValue","freeze","getDefaultMiddleware","getType","isAllOf","isAnyOf","isAsyncThunkAction","isDraft","isFulfilled","isImmutableDefault","isPending","isPlain","isPlainObject","isRejected","isRejectedWithValue","miniSerializeError","nanoid","original","unwrapResult","import_immer4","__toModule","require","__reExport","import_immer","import_reselect","args","_i","arguments","length","selector","apply","wrappedSelector","value","rest","__spreadArray","import_redux2","import_redux","composeWithDevTools","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","proto","Object","getPrototypeOf","__REDUX_DEVTOOLS_EXTENSION__","import_redux_thunk","_super","_this","this","setPrototypeOf","prototype","__extends","defineProperty","Symbol","species","concat","arr","prepend","Array","isArray","bind","isFrozen","options","next","action","val","type","path","isSerializable","getEntries","ignoredPaths","foundNestedSerializable","keyPath","entries","hasIgnoredPaths","entries_1","_b","key","nestedValue","nestedPath","indexOf","thunk","middlewareArray","push","withExtraArgument","extraArgument","rootReducer","curriedGetDefaultMiddleware","_c","reducer","_d","middleware","_e","devTools","_f","preloadedState","_g","enhancers","Error","combineReducers","finalMiddleware","middlewareEnhancer","applyMiddleware","finalCompose","__spreadValues","trace","storeEnhancers","composedEnhancer","createStore","prepareAction","actionCreator","prepared","payload","meta","error","toString","match","isValidKey","import_immer2","executeReducerBuilderCallback","builderCallback","defaultCaseReducer","actionsMap","actionMatchers","builder","addCase","typeOrActionCreator","addMatcher","matcher","addDefaultCase","initialState","mapOrBuilderCallback","finalActionMatchers","finalDefaultCaseReducer","frozenInitialState","state","caseReducers","filter","map","cr","reduce","previousState","caseReducer","result","isDraftable","draft","name","reducers","extraReducers","reducerNames","keys","sliceCaseReducersByName","sliceCaseReducersByType","actionCreators","forEach","reducerName","prepareCallback","maybeReducerWithPrepare","prepare","actions","import_immer3","createStateOperator","mutator","arg","runMutator","every","selectIdValue","entity","selectId","ensureEntitiesArray","entities","values","splitAddedUpdatedEntities","newEntities","added","updated","newEntities_1","id","changes","createUnsortedStateAdapter","addOneMutably","ids","addManyMutably","newEntities_2","setOneMutably","removeManyMutably","didMutate","updateManyMutably","updates","newKeys","updatesPerEntity","update","assign","newKey","hasNewKey","takeNewKey","upsertManyMutably","removeAll","operator","_","addOne","addMany","setOne","setMany","newEntities_3","setAll","updateOne","updateMany","upsertOne","upsertMany","removeOne","removeMany","sortComparer","instance","stateFactory","getInitialState","additionalState","selectorsFactory","getSelectors","selectState","selectIds","selectEntities","selectAll","selectById","selectTotal","selectGlobalizedEntities","stateAdapter","sort","models","model","merge","setManyMutably","takeUpdatedModel","allEntities","newSortedIds","a","b","i","areArraysEqual","createSortedStateAdapter","size","Math","random","commonProperties","RejectWithValue","FulfillWithMeta","simpleError","commonProperties_1","property","message","String","typePrefix","payloadCreator","fulfilled","requestId","__spreadProps","requestStatus","pending","rejected","serializeError","rejectedWithValue","aborted","condition","AC","AbortController","class_1","signal","addEventListener","dispatchEvent","onabort","removeEventListener","abort","dispatch","getState","extra","_a","abortReason","idGenerator","abortController","abortedPromise","Promise","reject","started","promise","_a2","getPendingMeta","call","race","resolve","rejectWithValue","fulfillWithValue","then","finalAction","sent","err_1","dispatchConditionRejection","reason","unwrap","matches","v","matchers","some","hasExpectedRequestMetadata","validStatus","hasValidRequestId","hasValidRequestStatus","isAsyncThunkArray","asyncThunks","asyncThunk","combinedMatcher","hasFlag","asyncThunks_1","enableES5"],"mappings":"qoFAAAA,EAAAC,sEAAAC,CAAAD,QAAA,CAAAE,gBAAA,WAAA,OAAAA,GAAAC,eAAA,WAAA,OAAAA,GAAAC,aAAA,WAAA,OAAAA,GAAAC,iBAAA,WAAA,OAAAA,IAAAC,wBAAA,WAAA,OAAAA,GAAAC,oBAAA,WAAA,OAAAA,GAAAC,wCAAA,WAAA,OAAAA,GAAAC,gBAAA,WAAA,OAAAC,EAAAC,SAAAC,cAAA,WAAA,OAAAA,GAAAC,eAAA,WAAA,OAAAC,EAAAD,gBAAAE,2CAAA,WAAA,OAAAA,GAAAC,YAAA,WAAA,OAAAA,GAAAC,QAAA,WAAA,OAAAP,EAAAO,SAAAC,yBAAA,WAAA,OAAAA,GAAAC,OAAA,WAAA,OAAAT,EAAAS,QAAAC,qBAAA,WAAA,OAAAA,GAAAC,QAAA,WAAA,OAAAA,GAAAC,QAAA,WAAA,OAAAA,IAAAC,QAAA,WAAA,OAAAA,IAAAC,mBAAA,WAAA,OAAAA,IAAAC,QAAA,WAAA,OAAAf,EAAAe,SAAAC,YAAA,WAAA,OAAAA,IAAAC,mBAAA,WAAA,OAAAA,GAAAC,UAAA,WAAA,OAAAA,IAAAC,QAAA,WAAA,OAAAA,GAAAC,cAAA,WAAA,OAAAA,GAAAC,WAAA,WAAA,OAAAA,IAAAC,oBAAA,WAAA,OAAAA,IAAAC,mBAAA,WAAA,OAAAA,IAAAC,OAAA,WAAA,OAAAA,GAAAC,SAAA,WAAA,OAAAzB,EAAAyB,UAAAC,aAAA,WAAA,OAAAA,MAAA,IAAAC,EAA0BC,EAAA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DD,CAAgBrP,IAKlBlD,IAAAA,CAAsBqS,EAAY,IAkDtC,SAAA3S,SAAA,IAAA2S,EAAA,GAAAzR,EAAA,EAAAA,EAAAC,UAAAC,OAAAF,IAAAyR,EAAAzR,GAAAC,UAAAD,GAGL,OAA2B,IAAvByR,EAAYvR,OACP,SAACoC,GAAgB,OAAA8O,GAA2B9O,EAAQ,CAAC,eAGzDkP,GAAkBC,GAIhB,SACLnP,GAGA,IAAM4O,EAA8CO,EAAYzK,KAC9D,SAAC0K,GAAe,OAAAA,EAAWvD,aAK7B,OAFwBxP,GAAAyB,WAAA,EAAW8Q,EAE5BS,CAAgBrP,IAbhBxD,IAAAA,CAAc2S,EAAY,IA8D9B,SAAA7S,SAAA,IAAA6S,EAAA,GAAAzR,EAAA,EAAAA,EAAAC,UAAAC,OAAAF,IAAAyR,EAAAzR,GAAAC,UAAAD,GAGL,OAA2B,IAAvByR,EAAYvR,OACP,SAACoC,GACN,OAAA8O,GAA2B9O,EAAQ,CAAC,UAAW,YAAa,cAG3DkP,GAAkBC,GAIhB,SACLnP,GAKA,IAFA,IAAM4O,EAA8C,GAE3BlR,EAAA,EAAA6R,EAAAJ,EAAAzR,EAAA6R,EAAA3R,OAAAF,IAAa,CAAtC,IAAW0R,EAAAG,EAAA7R,GACTkR,EAASzN,KACPiO,EAAWnD,QACXmD,EAAWlD,SACXkD,EAAWvD,WAMf,OAFwBxP,GAAAyB,WAAA,EAAW8Q,EAE5BS,CAAgBrP,IAnBhB1D,IAAAA,CAAqB6S,EAAY,KvB7X5C,EAAAhS,EAAAqS","sourcesContent":["import { enableES5 } from 'immer'\r\nexport * from 'redux'\r\nexport {\r\n default as createNextState,\r\n current,\r\n freeze,\r\n original,\r\n isDraft,\r\n} from 'immer'\r\nexport type { Draft } from 'immer'\r\nexport { createSelector } from 'reselect'\r\nexport type {\r\n Selector,\r\n OutputParametricSelector,\r\n OutputSelector,\r\n ParametricSelector,\r\n} from 'reselect'\r\nexport { createDraftSafeSelector } from './createDraftSafeSelector'\r\nexport type { ThunkAction, ThunkDispatch } from 'redux-thunk'\r\n\r\n// We deliberately enable Immer's ES5 support, on the grounds that\r\n// we assume RTK will be used with React Native and other Proxy-less\r\n// environments. In addition, that's how Immer 4 behaved, and since\r\n// we want to ship this in an RTK minor, we should keep the same behavior.\r\nenableES5()\r\n\r\nexport {\r\n // js\r\n configureStore,\r\n} from './configureStore'\r\nexport type {\r\n // types\r\n ConfigureEnhancersCallback,\r\n ConfigureStoreOptions,\r\n EnhancedStore,\r\n} from './configureStore'\r\nexport {\r\n // js\r\n createAction,\r\n getType,\r\n} from './createAction'\r\nexport type {\r\n // types\r\n PayloadAction,\r\n PayloadActionCreator,\r\n ActionCreatorWithNonInferrablePayload,\r\n ActionCreatorWithOptionalPayload,\r\n ActionCreatorWithPayload,\r\n ActionCreatorWithoutPayload,\r\n ActionCreatorWithPreparedPayload,\r\n PrepareAction,\r\n} from './createAction'\r\nexport {\r\n // js\r\n createReducer,\r\n} from './createReducer'\r\nexport type {\r\n // types\r\n Actions,\r\n CaseReducer,\r\n CaseReducers,\r\n} from './createReducer'\r\nexport {\r\n // js\r\n createSlice,\r\n} from './createSlice'\r\n\r\nexport type {\r\n // types\r\n CreateSliceOptions,\r\n Slice,\r\n CaseReducerActions,\r\n SliceCaseReducers,\r\n ValidateSliceCaseReducers,\r\n CaseReducerWithPrepare,\r\n SliceActionCreator,\r\n} from './createSlice'\r\nexport {\r\n // js\r\n createImmutableStateInvariantMiddleware,\r\n isImmutableDefault,\r\n} from './immutableStateInvariantMiddleware'\r\nexport type {\r\n // types\r\n ImmutableStateInvariantMiddlewareOptions,\r\n} from './immutableStateInvariantMiddleware'\r\nexport {\r\n // js\r\n createSerializableStateInvariantMiddleware,\r\n findNonSerializableValue,\r\n isPlain,\r\n} from './serializableStateInvariantMiddleware'\r\nexport type {\r\n // types\r\n SerializableStateInvariantMiddlewareOptions,\r\n} from './serializableStateInvariantMiddleware'\r\nexport {\r\n // js\r\n getDefaultMiddleware,\r\n} from './getDefaultMiddleware'\r\nexport type {\r\n // types\r\n ActionReducerMapBuilder,\r\n} from './mapBuilders'\r\nexport { MiddlewareArray } from './utils'\r\n\r\nexport { createEntityAdapter } from './entities/create_adapter'\r\nexport type {\r\n Dictionary,\r\n EntityState,\r\n EntityAdapter,\r\n EntitySelectors,\r\n EntityStateAdapter,\r\n EntityId,\r\n Update,\r\n IdSelector,\r\n Comparer,\r\n} from './entities/models'\r\n\r\nexport {\r\n createAsyncThunk,\r\n unwrapResult,\r\n miniSerializeError,\r\n} from './createAsyncThunk'\r\nexport type {\r\n AsyncThunk,\r\n AsyncThunkOptions,\r\n AsyncThunkAction,\r\n AsyncThunkPayloadCreatorReturnValue,\r\n AsyncThunkPayloadCreator,\r\n SerializedError,\r\n} from './createAsyncThunk'\r\n\r\nexport {\r\n // js\r\n isAllOf,\r\n isAnyOf,\r\n isPending,\r\n isRejected,\r\n isFulfilled,\r\n isAsyncThunkAction,\r\n isRejectedWithValue,\r\n} from './matchers'\r\nexport type {\r\n // types\r\n ActionMatchingAllOf,\r\n ActionMatchingAnyOf,\r\n} from './matchers'\r\n\r\nexport { nanoid } from './nanoid'\r\n\r\nexport { default as isPlainObject } from './isPlainObject'\r\n","import { current, isDraft } from 'immer'\r\nimport { createSelector } from 'reselect'\r\n\r\n/**\r\n * \"Draft-Safe\" version of `reselect`'s `createSelector`:\r\n * If an `immer`-drafted object is passed into the resulting selector's first argument,\r\n * the selector will act on the current draft value, instead of returning a cached value\r\n * that might be possibly outdated if the draft has been modified since.\r\n * @public\r\n */\r\nexport const createDraftSafeSelector: typeof createSelector = (\r\n ...args: unknown[]\r\n) => {\r\n const selector = (createSelector as any)(...args)\r\n const wrappedSelector = (value: unknown, ...rest: unknown[]) =>\r\n selector(isDraft(value) ? current(value) : value, ...rest)\r\n return wrappedSelector as any\r\n}\r\n","import type {\r\n Reducer,\r\n ReducersMapObject,\r\n Middleware,\r\n Action,\r\n AnyAction,\r\n StoreEnhancer,\r\n Store,\r\n Dispatch,\r\n PreloadedState,\r\n CombinedState,\r\n} from 'redux'\r\nimport { createStore, compose, applyMiddleware, combineReducers } from 'redux'\r\nimport type { EnhancerOptions as DevToolsOptions } from './devtoolsExtension'\r\nimport { composeWithDevTools } from './devtoolsExtension'\r\n\r\nimport isPlainObject from './isPlainObject'\r\nimport type {\r\n ThunkMiddlewareFor,\r\n CurriedGetDefaultMiddleware,\r\n} from './getDefaultMiddleware'\r\nimport { curryGetDefaultMiddleware } from './getDefaultMiddleware'\r\nimport type { DispatchForMiddlewares, NoInfer } from './tsHelpers'\r\n\r\nconst IS_PRODUCTION = process.env.NODE_ENV === 'production'\r\n\r\n/**\r\n * Callback function type, to be used in `ConfigureStoreOptions.enhancers`\r\n *\r\n * @public\r\n */\r\nexport type ConfigureEnhancersCallback = (\r\n defaultEnhancers: readonly StoreEnhancer[]\r\n) => StoreEnhancer[]\r\n\r\n/**\r\n * Options for `configureStore()`.\r\n *\r\n * @public\r\n */\r\nexport interface ConfigureStoreOptions<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares<S> = Middlewares<S>\r\n> {\r\n /**\r\n * A single reducer function that will be used as the root reducer, or an\r\n * object of slice reducers that will be passed to `combineReducers()`.\r\n */\r\n reducer: Reducer<S, A> | ReducersMapObject<S, A>\r\n\r\n /**\r\n * An array of Redux middleware to install. If not supplied, defaults to\r\n * the set of middleware returned by `getDefaultMiddleware()`.\r\n */\r\n middleware?: ((getDefaultMiddleware: CurriedGetDefaultMiddleware<S>) => M) | M\r\n\r\n /**\r\n * Whether to enable Redux DevTools integration. Defaults to `true`.\r\n *\r\n * Additional configuration can be done by passing Redux DevTools options\r\n */\r\n devTools?: boolean | DevToolsOptions\r\n\r\n /**\r\n * The initial state, same as Redux's createStore.\r\n * You may optionally specify it to hydrate the state\r\n * from the server in universal apps, or to restore a previously serialized\r\n * user session. If you use `combineReducers()` to produce the root reducer\r\n * function (either directly or indirectly by passing an object as `reducer`),\r\n * this must be an object with the same shape as the reducer map keys.\r\n */\r\n /* \r\n Not 100% correct but the best approximation we can get:\r\n - if S is a `CombinedState` applying a second `CombinedState` on it does not change anything.\r\n - if it is not, there could be two cases:\r\n - `ReducersMapObject<S, A>` is being passed in. In this case, we will call `combineReducers` on it and `CombinedState<S>` is correct\r\n - `Reducer<S, A>` is being passed in. In this case, actually `CombinedState<S>` is wrong and `S` would be correct.\r\n As we cannot distinguish between those two cases without adding another generic paramter, \r\n we just make the pragmatic assumption that the latter almost never happens.\r\n */\r\n preloadedState?: PreloadedState<CombinedState<NoInfer<S>>>\r\n\r\n /**\r\n * The store enhancers to apply. See Redux's `createStore()`.\r\n * All enhancers will be included before the DevTools Extension enhancer.\r\n * If you need to customize the order of enhancers, supply a callback\r\n * function that will receive the original array (ie, `[applyMiddleware]`),\r\n * and should return a new array (such as `[applyMiddleware, offline]`).\r\n * If you only need to add middleware, you can use the `middleware` parameter instead.\r\n */\r\n enhancers?: StoreEnhancer[] | ConfigureEnhancersCallback\r\n}\r\n\r\ntype Middlewares<S> = ReadonlyArray<Middleware<{}, S>>\r\n\r\n/**\r\n * A Redux store returned by `configureStore()`. Supports dispatching\r\n * side-effectful _thunks_ in addition to plain actions.\r\n *\r\n * @public\r\n */\r\nexport interface EnhancedStore<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares<S> = Middlewares<S>\r\n> extends Store<S, A> {\r\n /**\r\n * The `dispatch` method of your store, enhanced by all its middlewares.\r\n *\r\n * @inheritdoc\r\n */\r\n dispatch: DispatchForMiddlewares<M> & Dispatch<A>\r\n}\r\n\r\n/**\r\n * A friendly abstraction over the standard Redux `createStore()` function.\r\n *\r\n * @param config The store configuration.\r\n * @returns A configured Redux store.\r\n *\r\n * @public\r\n */\r\nexport function configureStore<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares<S> = [ThunkMiddlewareFor<S>]\r\n>(options: ConfigureStoreOptions<S, A, M>): EnhancedStore<S, A, M> {\r\n const curriedGetDefaultMiddleware = curryGetDefaultMiddleware<S>()\r\n\r\n const {\r\n reducer = undefined,\r\n middleware = curriedGetDefaultMiddleware(),\r\n devTools = true,\r\n preloadedState = undefined,\r\n enhancers = undefined,\r\n } = options || {}\r\n\r\n let rootReducer: Reducer<S, A>\r\n\r\n if (typeof reducer === 'function') {\r\n rootReducer = reducer\r\n } else if (isPlainObject(reducer)) {\r\n rootReducer = combineReducers(reducer)\r\n } else {\r\n throw new Error(\r\n '\"reducer\" is a required argument, and must be a function or an object of functions that can be passed to combineReducers'\r\n )\r\n }\r\n\r\n let finalMiddleware = middleware\r\n if (typeof finalMiddleware === 'function') {\r\n finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware)\r\n\r\n if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {\r\n throw new Error(\r\n 'when using a middleware builder function, an array of middleware must be returned'\r\n )\r\n }\r\n }\r\n if (\r\n !IS_PRODUCTION &&\r\n finalMiddleware.some((item) => typeof item !== 'function')\r\n ) {\r\n throw new Error(\r\n 'each middleware provided to configureStore must be a function'\r\n )\r\n }\r\n\r\n const middlewareEnhancer = applyMiddleware(...finalMiddleware)\r\n\r\n let finalCompose = compose\r\n\r\n if (devTools) {\r\n finalCompose = composeWithDevTools({\r\n // Enable capture of stack traces for dispatched Redux actions\r\n trace: !IS_PRODUCTION,\r\n ...(typeof devTools === 'object' && devTools),\r\n })\r\n }\r\n\r\n let storeEnhancers: StoreEnhancer[] = [middlewareEnhancer]\r\n\r\n if (Array.isArray(enhancers)) {\r\n storeEnhancers = [middlewareEnhancer, ...enhancers]\r\n } else if (typeof enhancers === 'function') {\r\n storeEnhancers = enhancers(storeEnhancers)\r\n }\r\n\r\n const composedEnhancer = finalCompose(...storeEnhancers) as any\r\n\r\n return createStore(rootReducer, preloadedState, composedEnhancer)\r\n}\r\n","import type { Action, ActionCreator, StoreEnhancer } from 'redux'\r\nimport { compose } from 'redux'\r\n\r\n/**\r\n * @public\r\n */\r\nexport interface EnhancerOptions {\r\n /**\r\n * the instance name to be showed on the monitor page. Default value is `document.title`.\r\n * If not specified and there's no document title, it will consist of `tabId` and `instanceId`.\r\n */\r\n name?: string\r\n /**\r\n * action creators functions to be available in the Dispatcher.\r\n */\r\n actionCreators?: ActionCreator<any>[] | { [key: string]: ActionCreator<any> }\r\n /**\r\n * if more than one action is dispatched in the indicated interval, all new actions will be collected and sent at once.\r\n * It is the joint between performance and speed. When set to `0`, all actions will be sent instantly.\r\n * Set it to a higher value when experiencing perf issues (also `maxAge` to a lower value).\r\n *\r\n * @default 500 ms.\r\n */\r\n latency?: number\r\n /**\r\n * (> 1) - maximum allowed actions to be stored in the history tree. The oldest actions are removed once maxAge is reached. It's critical for performance.\r\n *\r\n * @default 50\r\n */\r\n maxAge?: number\r\n /**\r\n * See detailed documentation at http://extension.remotedev.io/docs/API/Arguments.html#serialize\r\n */\r\n serialize?:\r\n | boolean\r\n | {\r\n options?:\r\n | boolean\r\n | {\r\n date?: boolean\r\n regex?: boolean\r\n undefined?: boolean\r\n error?: boolean\r\n symbol?: boolean\r\n map?: boolean\r\n set?: boolean\r\n function?: boolean | Function\r\n }\r\n replacer?: (key: string, value: unknown) => unknown\r\n reviver?: (key: string, value: unknown) => unknown\r\n immutable?: unknown\r\n refs?: unknown[]\r\n }\r\n /**\r\n * function which takes `action` object and id number as arguments, and should return `action` object back.\r\n */\r\n actionSanitizer?: <A extends Action>(action: A, id: number) => A\r\n /**\r\n * function which takes `state` object and index as arguments, and should return `state` object back.\r\n */\r\n stateSanitizer?: <S>(state: S, index: number) => S\r\n /**\r\n * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\r\n * If `actionsWhitelist` specified, `actionsBlacklist` is ignored.\r\n */\r\n actionsBlacklist?: string | string[]\r\n /**\r\n * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\r\n * If `actionsWhitelist` specified, `actionsBlacklist` is ignored.\r\n */\r\n actionsWhitelist?: string | string[]\r\n /**\r\n * called for every action before sending, takes `state` and `action` object, and returns `true` in case it allows sending the current data to the monitor.\r\n * Use it as a more advanced version of `actionsBlacklist`/`actionsWhitelist` parameters.\r\n */\r\n predicate?: <S, A extends Action>(state: S, action: A) => boolean\r\n /**\r\n * if specified as `false`, it will not record the changes till clicking on `Start recording` button.\r\n * Available only for Redux enhancer, for others use `autoPause`.\r\n *\r\n * @default true\r\n */\r\n shouldRecordChanges?: boolean\r\n /**\r\n * if specified, whenever clicking on `Pause recording` button and there are actions in the history log, will add this action type.\r\n * If not specified, will commit when paused. Available only for Redux enhancer.\r\n *\r\n * @default \"@@PAUSED\"\"\r\n */\r\n pauseActionType?: string\r\n /**\r\n * auto pauses when the extension’s window is not opened, and so has zero impact on your app when not in use.\r\n * Not available for Redux enhancer (as it already does it but storing the data to be sent).\r\n *\r\n * @default false\r\n */\r\n autoPause?: boolean\r\n /**\r\n * if specified as `true`, it will not allow any non-monitor actions to be dispatched till clicking on `Unlock changes` button.\r\n * Available only for Redux enhancer.\r\n *\r\n * @default false\r\n */\r\n shouldStartLocked?: boolean\r\n /**\r\n * if set to `false`, will not recompute the states on hot reloading (or on replacing the reducers). Available only for Redux enhancer.\r\n *\r\n * @default true\r\n */\r\n shouldHotReload?: boolean\r\n /**\r\n * if specified as `true`, whenever there's an exception in reducers, the monitors will show the error message, and next actions will not be dispatched.\r\n *\r\n * @default false\r\n */\r\n shouldCatchErrors?: boolean\r\n /**\r\n * If you want to restrict the extension, specify the features you allow.\r\n * If not specified, all of the features are enabled. When set as an object, only those included as `true` will be allowed.\r\n * Note that except `true`/`false`, `import` and `export` can be set as `custom` (which is by default for Redux enhancer), meaning that the importing/exporting occurs on the client side.\r\n * Otherwise, you'll get/set the data right from the monitor part.\r\n */\r\n features?: {\r\n /**\r\n * start/pause recording of dispatched actions\r\n */\r\n pause?: boolean\r\n /**\r\n * lock/unlock dispatching actions and side effects\r\n */\r\n lock?: boolean\r\n /**\r\n * persist states on page reloading\r\n */\r\n persist?: boolean\r\n /**\r\n * export history of actions in a file\r\n */\r\n export?: boolean | 'custom'\r\n /**\r\n * import history of actions from a file\r\n */\r\n import?: boolean | 'custom'\r\n /**\r\n * jump back and forth (time travelling)\r\n */\r\n jump?: boolean\r\n /**\r\n * skip (cancel) actions\r\n */\r\n skip?: boolean\r\n /**\r\n * drag and drop actions in the history list\r\n */\r\n reorder?: boolean\r\n /**\r\n * dispatch custom actions or action creators\r\n */\r\n dispatch?: boolean\r\n /**\r\n * generate tests for the selected actions\r\n */\r\n test?: boolean\r\n }\r\n /**\r\n * Set to true or a stacktrace-returning function to record call stack traces for dispatched actions.\r\n * Defaults to false.\r\n */\r\n trace?: boolean | (<A extends Action>(action: A) => string)\r\n /**\r\n * The maximum number of stack trace entries to record per action. Defaults to 10.\r\n */\r\n traceLimit?: number\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport const composeWithDevTools: {\r\n (options: EnhancerOptions): typeof compose\r\n <StoreExt>(...funcs: Array<StoreEnhancer<StoreExt>>): StoreEnhancer<StoreExt>\r\n} =\r\n typeof window !== 'undefined' &&\r\n (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\r\n ? (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\r\n : function () {\r\n if (arguments.length === 0) return undefined\r\n if (typeof arguments[0] === 'object') return compose\r\n return compose.apply(null, arguments as any as Function[])\r\n }\r\n\r\n/**\r\n * @public\r\n */\r\nexport const devToolsEnhancer: {\r\n (options: EnhancerOptions): StoreEnhancer<any>\r\n} =\r\n typeof window !== 'undefined' && (window as any).__REDUX_DEVTOOLS_EXTENSION__\r\n ? (window as any).__REDUX_DEVTOOLS_EXTENSION__\r\n : function () {\r\n return function (noop) {\r\n return noop\r\n }\r\n }\r\n","/**\r\n * Returns true if the passed value is \"plain\" object, i.e. an object whose\r\n * prototype is the root `Object.prototype`. This includes objects created\r\n * using object literals, but not for instance for class instances.\r\n *\r\n * @param {any} value The value to inspect.\r\n * @returns {boolean} True if the argument appears to be a plain object.\r\n *\r\n * @public\r\n */\r\nexport default function isPlainObject(value: unknown): value is object {\r\n if (typeof value !== 'object' || value === null) return false\r\n\r\n let proto = value\r\n while (Object.getPrototypeOf(proto) !== null) {\r\n proto = Object.getPrototypeOf(proto)\r\n }\r\n\r\n return Object.getPrototypeOf(value) === proto\r\n}\r\n","import type { Middleware, AnyAction } from 'redux'\r\nimport type { ThunkMiddleware } from 'redux-thunk'\r\nimport thunkMiddleware from 'redux-thunk'\r\nimport type { ImmutableStateInvariantMiddlewareOptions } from './immutableStateInvariantMiddleware'\r\n/* PROD_START_REMOVE_UMD */\r\nimport { createImmutableStateInvariantMiddleware } from './immutableStateInvariantMiddleware'\r\n/* PROD_STOP_REMOVE_UMD */\r\n\r\nimport type { SerializableStateInvariantMiddlewareOptions } from './serializableStateInvariantMiddleware'\r\nimport { createSerializableStateInvariantMiddleware } from './serializableStateInvariantMiddleware'\r\nimport { MiddlewareArray } from './utils'\r\n\r\nfunction isBoolean(x: any): x is boolean {\r\n return typeof x === 'boolean'\r\n}\r\n\r\ninterface ThunkOptions<E = any> {\r\n extraArgument: E\r\n}\r\n\r\ninterface GetDefaultMiddlewareOptions {\r\n thunk?: boolean | ThunkOptions\r\n immutableCheck?: boolean | ImmutableStateInvariantMiddlewareOptions\r\n serializableCheck?: boolean | SerializableStateInvariantMiddlewareOptions\r\n}\r\n\r\nexport type ThunkMiddlewareFor<\r\n S,\r\n O extends GetDefaultMiddlewareOptions = {}\r\n> = O extends {\r\n thunk: false\r\n}\r\n ? never\r\n : O extends { thunk: { extraArgument: infer E } }\r\n ? ThunkMiddleware<S, AnyAction, E>\r\n :\r\n | ThunkMiddleware<S, AnyAction, null> //The ThunkMiddleware with a `null` ExtraArgument is here to provide backwards-compatibility.\r\n | ThunkMiddleware<S, AnyAction>\r\n\r\nexport type CurriedGetDefaultMiddleware<S = any> = <\r\n O extends Partial<GetDefaultMiddlewareOptions> = {\r\n thunk: true\r\n immutableCheck: true\r\n serializableCheck: true\r\n }\r\n>(\r\n options?: O\r\n) => MiddlewareArray<Middleware<{}, S> | ThunkMiddlewareFor<S, O>>\r\n\r\nexport function curryGetDefaultMiddleware<\r\n S = any\r\n>(): CurriedGetDefaultMiddleware<S> {\r\n return function curriedGetDefaultMiddleware(options) {\r\n return getDefaultMiddleware(options)\r\n }\r\n}\r\n\r\n/**\r\n * Returns any array containing the default middleware installed by\r\n * `configureStore()`. Useful if you want to configure your store with a custom\r\n * `middleware` array but still keep the default set.\r\n *\r\n * @return The default middleware used by `configureStore()`.\r\n *\r\n * @public\r\n *\r\n * @deprecated Prefer to use the callback notation for the `middleware` option in `configureStore`\r\n * to access a pre-typed `getDefaultMiddleware` instead.\r\n */\r\nexport function getDefaultMiddleware<\r\n S = any,\r\n O extends Partial<GetDefaultMiddlewareOptions> = {\r\n thunk: true\r\n immutableCheck: true\r\n serializableCheck: true\r\n }\r\n>(\r\n options: O = {} as O\r\n): MiddlewareArray<Middleware<{}, S> | ThunkMiddlewareFor<S, O>> {\r\n const {\r\n thunk = true,\r\n immutableCheck = true,\r\n serializableCheck = true,\r\n } = options\r\n\r\n let middlewareArray: Middleware<{}, S>[] = new MiddlewareArray()\r\n\r\n if (thunk) {\r\n if (isBoolean(thunk)) {\r\n middlewareArray.push(thunkMiddleware)\r\n } else {\r\n middlewareArray.push(\r\n thunkMiddleware.withExtraArgument(thunk.extraArgument)\r\n )\r\n }\r\n }\r\n\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (immutableCheck) {\r\n /* PROD_START_REMOVE_UMD */\r\n let immutableOptions: ImmutableStateInvariantMiddlewareOptions = {}\r\n\r\n if (!isBoolean(immutableCheck)) {\r\n immutableOptions = immutableCheck\r\n }\r\n\r\n middlewareArray.unshift(\r\n createImmutableStateInvariantMiddleware(immutableOptions)\r\n )\r\n /* PROD_STOP_REMOVE_UMD */\r\n }\r\n\r\n if (serializableCheck) {\r\n let serializableOptions: SerializableStateInvariantMiddlewareOptions = {}\r\n\r\n if (!isBoolean(serializableCheck)) {\r\n serializableOptions = serializableCheck\r\n }\r\n\r\n middlewareArray.push(\r\n createSerializableStateInvariantMiddleware(serializableOptions)\r\n )\r\n }\r\n }\r\n\r\n return middlewareArray as any\r\n}\r\n","import type { Middleware } from 'redux'\r\n\r\nexport function getTimeMeasureUtils(maxDelay: number, fnName: string) {\r\n let elapsed = 0\r\n return {\r\n measureTime<T>(fn: () => T): T {\r\n const started = Date.now()\r\n try {\r\n return fn()\r\n } finally {\r\n const finished = Date.now()\r\n elapsed += finished - started\r\n }\r\n },\r\n warnIfExceeded() {\r\n if (elapsed > maxDelay) {\r\n console.warn(`${fnName} took ${elapsed}ms, which is more than the warning threshold of ${maxDelay}ms. \r\nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\r\nIt is disabled in production builds, so you don't need to worry about that.`)\r\n }\r\n },\r\n }\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport class MiddlewareArray<\r\n Middlewares extends Middleware<any, any>\r\n> extends Array<Middlewares> {\r\n constructor(arrayLength?: number)\r\n constructor(...items: Middlewares[])\r\n constructor(...args: any[]) {\r\n super(...args)\r\n Object.setPrototypeOf(this, MiddlewareArray.prototype)\r\n }\r\n\r\n static get [Symbol.species]() {\r\n return MiddlewareArray as any\r\n }\r\n\r\n concat<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n items: AdditionalMiddlewares\r\n ): MiddlewareArray<Middlewares | AdditionalMiddlewares[number]>\r\n\r\n concat<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n ...items: AdditionalMiddlewares\r\n ): MiddlewareArray<Middlewares | AdditionalMiddlewares[number]>\r\n concat(...arr: any[]) {\r\n return super.concat.apply(this, arr)\r\n }\r\n\r\n prepend<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n items: AdditionalMiddlewares\r\n ): MiddlewareArray<AdditionalMiddlewares[number] | Middlewares>\r\n\r\n prepend<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n ...items: AdditionalMiddlewares\r\n ): MiddlewareArray<AdditionalMiddlewares[number] | Middlewares>\r\n\r\n prepend(...arr: any[]) {\r\n if (arr.length === 1 && Array.isArray(arr[0])) {\r\n return new MiddlewareArray(...arr[0].concat(this))\r\n }\r\n return new MiddlewareArray(...arr.concat(this))\r\n }\r\n}\r\n","import type { Middleware } from 'redux'\r\nimport { getTimeMeasureUtils } from './utils'\r\n\r\ntype EntryProcessor = (key: string, value: any) => any\r\n\r\nconst isProduction: boolean = process.env.NODE_ENV === 'production'\r\nconst prefix: string = 'Invariant failed'\r\n\r\n// Throw an error if the condition fails\r\n// Strip out error messages for production\r\n// > Not providing an inline default argument for message as the result is smaller\r\nfunction invariant(condition: any, message?: string) {\r\n if (condition) {\r\n return\r\n }\r\n // Condition not passed\r\n\r\n // In production we strip the message but still throw\r\n if (isProduction) {\r\n throw new Error(prefix)\r\n }\r\n\r\n // When not in production we allow the message to pass through\r\n // *This block will be removed in production builds*\r\n throw new Error(`${prefix}: ${message || ''}`)\r\n}\r\n\r\nfunction stringify(\r\n obj: any,\r\n serializer?: EntryProcessor,\r\n indent?: string | number,\r\n decycler?: EntryProcessor\r\n): string {\r\n return JSON.stringify(obj, getSerialize(serializer, decycler), indent)\r\n}\r\n\r\nfunction getSerialize(\r\n serializer?: EntryProcessor,\r\n decycler?: EntryProcessor\r\n): EntryProcessor {\r\n let stack: any[] = [],\r\n keys: any[] = []\r\n\r\n if (!decycler)\r\n decycler = function (_: string, value: any) {\r\n if (stack[0] === value) return '[Circular ~]'\r\n return (\r\n '[Circular ~.' + keys.slice(0, stack.indexOf(value)).join('.') + ']'\r\n )\r\n }\r\n\r\n return function (this: any, key: string, value: any) {\r\n if (stack.length > 0) {\r\n var thisPos = stack.indexOf(this)\r\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)\r\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)\r\n if (~stack.indexOf(value)) value = decycler!.call(this, key, value)\r\n } else stack.push(value)\r\n\r\n return serializer == null ? value : serializer.call(this, key, value)\r\n }\r\n}\r\n\r\n/**\r\n * The default `isImmutable` function.\r\n *\r\n * @public\r\n */\r\nexport function isImmutableDefault(value: unknown): boolean {\r\n return (\r\n typeof value !== 'object' ||\r\n value === null ||\r\n typeof value === 'undefined' ||\r\n Object.isFrozen(value)\r\n )\r\n}\r\n\r\nexport function trackForMutations(\r\n isImmutable: IsImmutableFunc,\r\n ignorePaths: string[] | undefined,\r\n obj: any\r\n) {\r\n const trackedProperties = trackProperties(isImmutable, ignorePaths, obj)\r\n return {\r\n detectMutations() {\r\n return detectMutations(isImmutable, ignorePaths, trackedProperties, obj)\r\n },\r\n }\r\n}\r\n\r\ninterface TrackedProperty {\r\n value: any\r\n children: Record<string, any>\r\n}\r\n\r\nfunction trackProperties(\r\n isImmutable: IsImmutableFunc,\r\n ignorePaths: IgnorePaths = [],\r\n obj: Record<string, any>,\r\n path: string = ''\r\n) {\r\n const tracked: Partial<TrackedProperty> = { value: obj }\r\n\r\n if (!isImmutable(obj)) {\r\n tracked.children = {}\r\n\r\n for (const key in obj) {\r\n const childPath = path ? path + '.' + key : key\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue\r\n }\r\n\r\n tracked.children[key] = trackProperties(\r\n isImmutable,\r\n ignorePaths,\r\n obj[key],\r\n childPath\r\n )\r\n }\r\n }\r\n return tracked as TrackedProperty\r\n}\r\n\r\ntype IgnorePaths = readonly string[]\r\n\r\nfunction detectMutations(\r\n isImmutable: IsImmutableFunc,\r\n ignorePaths: IgnorePaths = [],\r\n trackedProperty: TrackedProperty,\r\n obj: any,\r\n sameParentRef: boolean = false,\r\n path: string = ''\r\n): { wasMutated: boolean; path?: string } {\r\n const prevObj = trackedProperty ? trackedProperty.value : undefined\r\n\r\n const sameRef = prevObj === obj\r\n\r\n if (sameParentRef && !sameRef && !Number.isNaN(obj)) {\r\n return { wasMutated: true, path }\r\n }\r\n\r\n if (isImmutable(prevObj) || isImmutable(obj)) {\r\n return { wasMutated: false }\r\n }\r\n\r\n // Gather all keys from prev (tracked) and after objs\r\n const keysToDetect: Record<string, boolean> = {}\r\n for (let key in trackedProperty.children) {\r\n keysToDetect[key] = true\r\n }\r\n for (let key in obj) {\r\n keysToDetect[key] = true\r\n }\r\n\r\n for (let key in keysToDetect) {\r\n const childPath = path ? path + '.' + key : key\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue\r\n }\r\n\r\n const result = detectMutations(\r\n isImmutable,\r\n ignorePaths,\r\n trackedProperty.children[key],\r\n obj[key],\r\n sameRef,\r\n childPath\r\n )\r\n\r\n if (result.wasMutated) {\r\n return result\r\n }\r\n }\r\n return { wasMutated: false }\r\n}\r\n\r\ntype IsImmutableFunc = (value: any) => boolean\r\n\r\n/**\r\n * Options for `createImmutableStateInvariantMiddleware()`.\r\n *\r\n * @public\r\n */\r\nexport interface ImmutableStateInvariantMiddlewareOptions {\r\n /**\r\n Callback function to check if a value is considered to be immutable.\r\n This function is applied recursively to every value contained in the state.\r\n The default implementation will return true for primitive types \r\n (like numbers, strings, booleans, null and undefined).\r\n */\r\n isImmutable?: IsImmutableFunc\r\n /** \r\n An array of dot-separated path strings that match named nodes from \r\n the root state to ignore when checking for immutability.\r\n Defaults to undefined\r\n */\r\n ignoredPaths?: string[]\r\n /** Print a warning if checks take longer than N ms. Default: 32ms */\r\n warnAfter?: number\r\n // @deprecated. Use ignoredPaths\r\n ignore?: string[]\r\n}\r\n\r\n/**\r\n * Creates a middleware that checks whether any state was mutated in between\r\n * dispatches or during a dispatch. If any mutations are detected, an error is\r\n * thrown.\r\n *\r\n * @param options Middleware options.\r\n *\r\n * @public\r\n */\r\nexport function createImmutableStateInvariantMiddleware(\r\n options: ImmutableStateInvariantMiddlewareOptions = {}\r\n): Middleware {\r\n if (process.env.NODE_ENV === 'production') {\r\n return () => (next) => (action) => next(action)\r\n }\r\n\r\n let {\r\n isImmutable = isImmutableDefault,\r\n ignoredPaths,\r\n warnAfter = 32,\r\n ignore,\r\n } = options\r\n\r\n // Alias ignore->ignoredPaths, but prefer ignoredPaths if present\r\n ignoredPaths = ignoredPaths || ignore\r\n\r\n const track = trackForMutations.bind(null, isImmutable, ignoredPaths)\r\n\r\n return ({ getState }) => {\r\n let state = getState()\r\n let tracker = track(state)\r\n\r\n let result\r\n return (next) => (action) => {\r\n const measureUtils = getTimeMeasureUtils(\r\n warnAfter,\r\n 'ImmutableStateInvariantMiddleware'\r\n )\r\n\r\n measureUtils.measureTime(() => {\r\n state = getState()\r\n\r\n result = tracker.detectMutations()\r\n // Track before potentially not meeting the invariant\r\n tracker = track(state)\r\n\r\n invariant(\r\n !result.wasMutated,\r\n `A state mutation was detected between dispatches, in the path '${\r\n result.path || ''\r\n }'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`\r\n )\r\n })\r\n\r\n const dispatchedAction = next(action)\r\n\r\n measureUtils.measureTime(() => {\r\n state = getState()\r\n\r\n result = tracker.detectMutations()\r\n // Track before potentially not meeting the invariant\r\n tracker = track(state)\r\n\r\n result.wasMutated &&\r\n invariant(\r\n !result.wasMutated,\r\n `A state mutation was detected inside a dispatch, in the path: ${\r\n result.path || ''\r\n }. Take a look at the reducer(s) handling the action ${stringify(\r\n action\r\n )}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`\r\n )\r\n })\r\n\r\n measureUtils.warnIfExceeded()\r\n\r\n return dispatchedAction\r\n }\r\n }\r\n}\r\n","import isPlainObject from './isPlainObject'\r\nimport type { Middleware } from 'redux'\r\nimport { getTimeMeasureUtils } from './utils'\r\n\r\n/**\r\n * Returns true if the passed value is \"plain\", i.e. a value that is either\r\n * directly JSON-serializable (boolean, number, string, array, plain object)\r\n * or `undefined`.\r\n *\r\n * @param val The value to check.\r\n *\r\n * @public\r\n */\r\nexport function isPlain(val: any) {\r\n const type = typeof val\r\n return (\r\n type === 'undefined' ||\r\n val === null ||\r\n type === 'string' ||\r\n type === 'boolean' ||\r\n type === 'number' ||\r\n Array.isArray(val) ||\r\n isPlainObject(val)\r\n )\r\n}\r\n\r\ninterface NonSerializableValue {\r\n keyPath: string\r\n value: unknown\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport function findNonSerializableValue(\r\n value: unknown,\r\n path: string = '',\r\n isSerializable: (value: unknown) => boolean = isPlain,\r\n getEntries?: (value: unknown) => [string, any][],\r\n ignoredPaths: readonly string[] = []\r\n): NonSerializableValue | false {\r\n let foundNestedSerializable: NonSerializableValue | false\r\n\r\n if (!isSerializable(value)) {\r\n return {\r\n keyPath: path || '<root>',\r\n value: value,\r\n }\r\n }\r\n\r\n if (typeof value !== 'object' || value === null) {\r\n return false\r\n }\r\n\r\n const entries = getEntries != null ? getEntries(value) : Object.entries(value)\r\n\r\n const hasIgnoredPaths = ignoredPaths.length > 0\r\n\r\n for (const [key, nestedValue] of entries) {\r\n const nestedPath = path ? path + '.' + key : key\r\n\r\n if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) {\r\n continue\r\n }\r\n\r\n if (!isSerializable(nestedValue)) {\r\n return {\r\n keyPath: nestedPath,\r\n value: nestedValue,\r\n }\r\n }\r\n\r\n if (typeof nestedValue === 'object') {\r\n foundNestedSerializable = findNonSerializableValue(\r\n nestedValue,\r\n nestedPath,\r\n isSerializable,\r\n getEntries,\r\n ignoredPaths\r\n )\r\n\r\n if (foundNestedSerializable) {\r\n return foundNestedSerializable\r\n }\r\n }\r\n }\r\n\r\n return false\r\n}\r\n\r\n/**\r\n * Options for `createSerializableStateInvariantMiddleware()`.\r\n *\r\n * @public\r\n */\r\nexport interface SerializableStateInvariantMiddlewareOptions {\r\n /**\r\n * The function to check if a value is considered serializable. This\r\n * function is applied recursively to every value contained in the\r\n * state. Defaults to `isPlain()`.\r\n */\r\n isSerializable?: (value: any) => boolean\r\n /**\r\n * The function that will be used to retrieve entries from each\r\n * value. If unspecified, `Object.entries` will be used. Defaults\r\n * to `undefined`.\r\n */\r\n getEntries?: (value: any) => [string, any][]\r\n\r\n /**\r\n * An array of action types to ignore when checking for serializability.\r\n * Defaults to []\r\n */\r\n ignoredActions?: string[]\r\n\r\n /**\r\n * An array of dot-separated path strings to ignore when checking\r\n * for serializability, Defaults to ['meta.arg']\r\n */\r\n ignoredActionPaths?: string[]\r\n\r\n /**\r\n * An array of dot-separated path strings to ignore when checking\r\n * for serializability, Defaults to []\r\n */\r\n ignoredPaths?: string[]\r\n /**\r\n * Execution time warning threshold. If the middleware takes longer\r\n * than `warnAfter` ms, a warning will be displayed in the console.\r\n * Defaults to 32ms.\r\n */\r\n warnAfter?: number\r\n\r\n /**\r\n * Opt out of checking state, but continue checking actions\r\n */\r\n ignoreState?: boolean\r\n}\r\n\r\n/**\r\n * Creates a middleware that, after every state change, checks if the new\r\n * state is serializable. If a non-serializable value is found within the\r\n * state, an error is printed to the console.\r\n *\r\n * @param options Middleware options.\r\n *\r\n * @public\r\n */\r\nexport function createSerializableStateInvariantMiddleware(\r\n options: SerializableStateInvariantMiddlewareOptions = {}\r\n): Middleware {\r\n if (process.env.NODE_ENV === 'production') {\r\n return () => (next) => (action) => next(action)\r\n }\r\n const {\r\n isSerializable = isPlain,\r\n getEntries,\r\n ignoredActions = [],\r\n ignoredActionPaths = ['meta.arg', 'meta.baseQueryMeta'],\r\n ignoredPaths = [],\r\n warnAfter = 32,\r\n ignoreState = false,\r\n } = options\r\n\r\n return (storeAPI) => (next) => (action) => {\r\n if (ignoredActions.length && ignoredActions.indexOf(action.type) !== -1) {\r\n return next(action)\r\n }\r\n\r\n const measureUtils = getTimeMeasureUtils(\r\n warnAfter,\r\n 'SerializableStateInvariantMiddleware'\r\n )\r\n measureUtils.measureTime(() => {\r\n const foundActionNonSerializableValue = findNonSerializableValue(\r\n action,\r\n '',\r\n isSerializable,\r\n getEntries,\r\n ignoredActionPaths\r\n )\r\n\r\n if (foundActionNonSerializableValue) {\r\n const { keyPath, value } = foundActionNonSerializableValue\r\n\r\n console.error(\r\n `A non-serializable value was detected in an action, in the path: \\`${keyPath}\\`. Value:`,\r\n value,\r\n '\\nTake a look at the logic that dispatched this action: ',\r\n action,\r\n '\\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)',\r\n '\\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)'\r\n )\r\n }\r\n })\r\n\r\n const result = next(action)\r\n\r\n if (!ignoreState) {\r\n measureUtils.measureTime(() => {\r\n const state = storeAPI.getState()\r\n\r\n const foundStateNonSerializableValue = findNonSerializableValue(\r\n state,\r\n '',\r\n isSerializable,\r\n getEntries,\r\n ignoredPaths\r\n )\r\n\r\n if (foundStateNonSerializableValue) {\r\n const { keyPath, value } = foundStateNonSerializableValue\r\n\r\n console.error(\r\n `A non-serializable value was detected in the state, in the path: \\`${keyPath}\\`. Value:`,\r\n value,\r\n `\r\nTake a look at the reducer(s) handling this action type: ${action.type}.\r\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`\r\n )\r\n }\r\n })\r\n\r\n measureUtils.warnIfExceeded()\r\n }\r\n\r\n return result\r\n }\r\n}\r\n","import type { Action } from 'redux'\r\nimport type {\r\n IsUnknownOrNonInferrable,\r\n IfMaybeUndefined,\r\n IfVoid,\r\n IsAny,\r\n} from './tsHelpers'\r\nimport isPlainObject from './isPlainObject'\r\n\r\n/**\r\n * An action with a string type and an associated payload. This is the\r\n * type of action returned by `createAction()` action creators.\r\n *\r\n * @template P The type of the action's payload.\r\n * @template T the type used for the action type.\r\n * @template M The type of the action's meta (optional)\r\n * @template E The type of the action's error (optional)\r\n *\r\n * @public\r\n */\r\nexport type PayloadAction<\r\n P = void,\r\n T extends string = string,\r\n M = never,\r\n E = never\r\n> = {\r\n payload: P\r\n type: T\r\n} & ([M] extends [never]\r\n ? {}\r\n : {\r\n meta: M\r\n }) &\r\n ([E] extends [never]\r\n ? {}\r\n : {\r\n error: E\r\n })\r\n\r\n/**\r\n * A \"prepare\" method to be used as the second parameter of `createAction`.\r\n * Takes any number of arguments and returns a Flux Standard Action without\r\n * type (will be added later) that *must* contain a payload (might be undefined).\r\n *\r\n * @public\r\n */\r\nexport type PrepareAction<P> =\r\n | ((...args: any[]) => { payload: P })\r\n | ((...args: any[]) => { payload: P; meta: any })\r\n | ((...args: any[]) => { payload: P; error: any })\r\n | ((...args: any[]) => { payload: P; meta: any; error: any })\r\n\r\n/**\r\n * Internal version of `ActionCreatorWithPreparedPayload`. Not to be used externally.\r\n *\r\n * @internal\r\n */\r\nexport type _ActionCreatorWithPreparedPayload<\r\n PA extends PrepareAction<any> | void,\r\n T extends string = string\r\n> = PA extends PrepareAction<infer P>\r\n ? ActionCreatorWithPreparedPayload<\r\n Parameters<PA>,\r\n P,\r\n T,\r\n ReturnType<PA> extends {\r\n error: infer E\r\n }\r\n ? E\r\n : never,\r\n ReturnType<PA> extends {\r\n meta: infer M\r\n }\r\n ? M\r\n : never\r\n >\r\n : void\r\n\r\n/**\r\n * Basic type for all action creators.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n */\r\ninterface BaseActionCreator<P, T extends string, M = never, E = never> {\r\n type: T\r\n match: (action: Action<unknown>) => action is PayloadAction<P, T, M, E>\r\n}\r\n\r\n/**\r\n * An action creator that takes multiple arguments that are passed\r\n * to a `PrepareAction` method to create the final Action.\r\n * @typeParam Args arguments for the action creator function\r\n * @typeParam P `payload` type\r\n * @typeParam T `type` name\r\n * @typeParam E optional `error` type\r\n * @typeParam M optional `meta` type\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithPreparedPayload<\r\n Args extends unknown[],\r\n P,\r\n T extends string = string,\r\n E = never,\r\n M = never\r\n> extends BaseActionCreator<P, T, M, E> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with `Args` will return\r\n * an Action with a payload of type `P` and (depending on the `PrepareAction`\r\n * method used) a `meta`- and `error` property of types `M` and `E` respectively.\r\n */\r\n (...args: Args): PayloadAction<P, T, M, E>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that takes an optional payload of type `P`.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithOptionalPayload<P, T extends string = string>\r\n extends BaseActionCreator<P, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload of `P`.\r\n * Calling it without an argument will return a PayloadAction with a payload of `undefined`.\r\n */\r\n (payload?: P): PayloadAction<P, T>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that takes no payload.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithoutPayload<T extends string = string>\r\n extends BaseActionCreator<undefined, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} will\r\n * return a {@link PayloadAction} of type `T` with a payload of `undefined`\r\n */\r\n (): PayloadAction<undefined, T>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that requires a payload of type P.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithPayload<P, T extends string = string>\r\n extends BaseActionCreator<P, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload of `P`\r\n */\r\n (payload: P): PayloadAction<P, T>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` whose `payload` type could not be inferred. Accepts everything as `payload`.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithNonInferrablePayload<\r\n T extends string = string\r\n> extends BaseActionCreator<unknown, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload\r\n * of exactly the type of the argument.\r\n */\r\n <PT extends unknown>(payload: PT): PayloadAction<PT, T>\r\n}\r\n\r\n/**\r\n * An action creator that produces actions with a `payload` attribute.\r\n *\r\n * @typeParam P the `payload` type\r\n * @typeParam T the `type` of the resulting action\r\n * @typeParam PA if the resulting action is preprocessed by a `prepare` method, the signature of said method.\r\n *\r\n * @public\r\n */\r\nexport type PayloadActionCreator<\r\n P = void,\r\n T extends string = string,\r\n PA extends PrepareAction<P> | void = void\r\n> = IfPrepareActionMethodProvided<\r\n PA,\r\n _ActionCreatorWithPreparedPayload<PA, T>,\r\n // else\r\n IsAny<\r\n P,\r\n ActionCreatorWithPayload<any, T>,\r\n IsUnknownOrNonInferrable<\r\n P,\r\n ActionCreatorWithNonInferrablePayload<T>,\r\n // else\r\n IfVoid<\r\n P,\r\n ActionCreatorWithoutPayload<T>,\r\n // else\r\n IfMaybeUndefined<\r\n P,\r\n ActionCreatorWithOptionalPayload<P, T>,\r\n // else\r\n ActionCreatorWithPayload<P, T>\r\n >\r\n >\r\n >\r\n >\r\n>\r\n\r\n/**\r\n * A utility function to create an action creator for the given action type\r\n * string. The action creator accepts a single argument, which will be included\r\n * in the action object as a field called payload. The action creator function\r\n * will also have its toString() overriden so that it returns the action type,\r\n * allowing it to be used in reducer logic that is looking for that action type.\r\n *\r\n * @param type The action type to use for created actions.\r\n * @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.\r\n * If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.\r\n *\r\n * @public\r\n */\r\nexport function createAction<P = void, T extends string = string>(\r\n type: T\r\n): PayloadActionCreator<P, T>\r\n\r\n/**\r\n * A utility function to create an action creator for the given action type\r\n * string. The action creator accepts a single argument, which will be included\r\n * in the action object as a field called payload. The action creator function\r\n * will also have its toString() overriden so that it returns the action type,\r\n * allowing it to be used in reducer logic that is looking for that action type.\r\n *\r\n * @param type The action type to use for created actions.\r\n * @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.\r\n * If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.\r\n *\r\n * @public\r\n */\r\nexport function createAction<\r\n PA extends PrepareAction<any>,\r\n T extends string = string\r\n>(\r\n type: T,\r\n prepareAction: PA\r\n): PayloadActionCreator<ReturnType<PA>['payload'], T, PA>\r\n\r\nexport function createAction(type: string, prepareAction?: Function): any {\r\n function actionCreator(...args: any[]) {\r\n if (prepareAction) {\r\n let prepared = prepareAction(...args)\r\n if (!prepared) {\r\n throw new Error('prepareAction did not return an object')\r\n }\r\n\r\n return {\r\n type,\r\n payload: prepared.payload,\r\n ...('meta' in prepared && { meta: prepared.meta }),\r\n ...('error' in prepared && { error: prepared.error }),\r\n }\r\n }\r\n return { type, payload: args[0] }\r\n }\r\n\r\n actionCreator.toString = () => `${type}`\r\n\r\n actionCreator.type = type\r\n\r\n actionCreator.match = (action: Action<unknown>): action is PayloadAction =>\r\n action.type === type\r\n\r\n return actionCreator\r\n}\r\n\r\nexport function isFSA(action: unknown): action is {\r\n type: string\r\n payload?: unknown\r\n error?: unknown\r\n meta?: unknown\r\n} {\r\n return (\r\n isPlainObject(action) &&\r\n typeof (action as any).type === 'string' &&\r\n Object.keys(action).every(isValidKey)\r\n )\r\n}\r\n\r\nfunction isValidKey(key: string) {\r\n return ['type', 'payload', 'error', 'meta'].indexOf(key) > -1\r\n}\r\n\r\n/**\r\n * Returns the action type of the actions created by the passed\r\n * `createAction()`-generated action creator (arbitrary action creators\r\n * are not supported).\r\n *\r\n * @param action The action creator whose action type to get.\r\n * @returns The action type used by the action creator.\r\n *\r\n * @public\r\n */\r\nexport function getType<T extends string>(\r\n actionCreator: PayloadActionCreator<any, T>\r\n): T {\r\n return `${actionCreator}` as T\r\n}\r\n\r\n// helper types for more readable typings\r\n\r\ntype IfPrepareActionMethodProvided<\r\n PA extends PrepareAction<any> | void,\r\n True,\r\n False\r\n> = PA extends (...args: any[]) => any ? True : False\r\n","import type { Draft } from 'immer'\r\nimport createNextState, { isDraft, isDraftable } from 'immer'\r\nimport type { AnyAction, Action, Reducer } from 'redux'\r\nimport type { ActionReducerMapBuilder } from './mapBuilders'\r\nimport { executeReducerBuilderCallback } from './mapBuilders'\r\nimport type { NoInfer } from './tsHelpers'\r\n\r\n/**\r\n * Defines a mapping from action types to corresponding action object shapes.\r\n *\r\n * @deprecated This should not be used manually - it is only used for internal\r\n * inference purposes and should not have any further value.\r\n * It might be removed in the future.\r\n * @public\r\n */\r\nexport type Actions<T extends keyof any = string> = Record<T, Action>\r\n\r\nexport interface ActionMatcher<A extends AnyAction> {\r\n (action: AnyAction): action is A\r\n}\r\n\r\nexport type ActionMatcherDescription<S, A extends AnyAction> = {\r\n matcher: ActionMatcher<A>\r\n reducer: CaseReducer<S, NoInfer<A>>\r\n}\r\n\r\nexport type ReadonlyActionMatcherDescriptionCollection<S> = ReadonlyArray<\r\n ActionMatcherDescription<S, any>\r\n>\r\n\r\nexport type ActionMatcherDescriptionCollection<S> = Array<\r\n ActionMatcherDescription<S, any>\r\n>\r\n\r\n/**\r\n * An *case reducer* is a reducer function for a specific action type. Case\r\n * reducers can be composed to full reducers using `createReducer()`.\r\n *\r\n * Unlike a normal Redux reducer, a case reducer is never called with an\r\n * `undefined` state to determine the initial state. Instead, the initial\r\n * state is explicitly specified as an argument to `createReducer()`.\r\n *\r\n * In addition, a case reducer can choose to mutate the passed-in `state`\r\n * value directly instead of returning a new state. This does not actually\r\n * cause the store state to be mutated directly; instead, thanks to\r\n * [immer](https://github.com/mweststrate/immer), the mutations are\r\n * translated to copy operations that result in a new state.\r\n *\r\n * @public\r\n */\r\nexport type CaseReducer<S = any, A extends Action = AnyAction> = (\r\n state: Draft<S>,\r\n action: A\r\n) => S | void | Draft<S>\r\n\r\n/**\r\n * A mapping from action types to case reducers for `createReducer()`.\r\n *\r\n * @deprecated This should not be used manually - it is only used\r\n * for internal inference purposes and using it manually\r\n * would lead to type erasure.\r\n * It might be removed in the future.\r\n * @public\r\n */\r\nexport type CaseReducers<S, AS extends Actions> = {\r\n [T in keyof AS]: AS[T] extends Action ? CaseReducer<S, AS[T]> : void\r\n}\r\n\r\n/**\r\n * A utility function that allows defining a reducer as a mapping from action\r\n * type to *case reducer* functions that handle these action types. The\r\n * reducer's initial state is passed as the first argument.\r\n *\r\n * @remarks\r\n * The body of every case reducer is implicitly wrapped with a call to\r\n * `produce()` from the [immer](https://github.com/mweststrate/immer) library.\r\n * This means that rather than returning a new state object, you can also\r\n * mutate the passed-in state object directly; these mutations will then be\r\n * automatically and efficiently translated into copies, giving you both\r\n * convenience and immutability.\r\n *\r\n * @overloadSummary\r\n * This overload accepts a callback function that receives a `builder` object as its argument.\r\n * That builder provides `addCase`, `addMatcher` and `addDefaultCase` functions that may be\r\n * called to define what actions this reducer will handle.\r\n *\r\n * @param initialState - The initial state that should be used when the reducer is called the first time.\r\n * @param builderCallback - A callback that receives a *builder* object to define\r\n * case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`.\r\n * @example\r\n```ts\r\nimport {\r\n createAction,\r\n createReducer,\r\n AnyAction,\r\n PayloadAction,\r\n} from \"@reduxjs/toolkit\";\r\n\r\nconst increment = createAction<number>(\"increment\");\r\nconst decrement = createAction<number>(\"decrement\");\r\n\r\nfunction isActionWithNumberPayload(\r\n action: AnyAction\r\n): action is PayloadAction<number> {\r\n return typeof action.payload === \"number\";\r\n}\r\n\r\ncreateReducer(\r\n {\r\n counter: 0,\r\n sumOfNumberPayloads: 0,\r\n unhandledActions: 0,\r\n },\r\n (builder) => {\r\n builder\r\n .addCase(increment, (state, action) => {\r\n // action is inferred correctly here\r\n state.counter += action.payload;\r\n })\r\n // You can chain calls, or have separate `builder.addCase()` lines each time\r\n .addCase(decrement, (state, action) => {\r\n state.counter -= action.payload;\r\n })\r\n // You can apply a \"matcher function\" to incoming actions\r\n .addMatcher(isActionWithNumberPayload, (state, action) => {})\r\n // and provide a default case if no other handlers matched\r\n .addDefaultCase((state, action) => {});\r\n }\r\n);\r\n```\r\n * @public\r\n */\r\nexport function createReducer<S>(\r\n initialState: S,\r\n builderCallback: (builder: ActionReducerMapBuilder<S>) => void\r\n): Reducer<S>\r\n\r\n/**\r\n * A utility function that allows defining a reducer as a mapping from action\r\n * type to *case reducer* functions that handle these action types. The\r\n * reducer's initial state is passed as the first argument.\r\n *\r\n * The body of every case reducer is implicitly wrapped with a call to\r\n * `produce()` from the [immer](https://github.com/mweststrate/immer) library.\r\n * This means that rather than returning a new state object, you can also\r\n * mutate the passed-in state object directly; these mutations will then be\r\n * automatically and efficiently translated into copies, giving you both\r\n * convenience and immutability.\r\n * \r\n * @overloadSummary\r\n * This overload accepts an object where the keys are string action types, and the values\r\n * are case reducer functions to handle those action types.\r\n *\r\n * @param initialState - The initial state that should be used when the reducer is called the first time.\r\n * @param actionsMap - An object mapping from action types to _case reducers_, each of which handles one specific action type.\r\n * @param actionMatchers - An array of matcher definitions in the form `{matcher, reducer}`.\r\n * All matching reducers will be executed in order, independently if a case reducer matched or not.\r\n * @param defaultCaseReducer - A \"default case\" reducer that is executed if no case reducer and no matcher\r\n * reducer was executed for this action.\r\n *\r\n * @example\r\n```js\r\nconst counterReducer = createReducer(0, {\r\n increment: (state, action) => state + action.payload,\r\n decrement: (state, action) => state - action.payload\r\n})\r\n```\r\n \r\n * Action creators that were generated using [`createAction`](./createAction) may be used directly as the keys here, using computed property syntax:\r\n\r\n```js\r\nconst increment = createAction('increment')\r\nconst decrement = createAction('decrement')\r\n\r\nconst counterReducer = createReducer(0, {\r\n [increment]: (state, action) => state + action.payload,\r\n [decrement.type]: (state, action) => state - action.payload\r\n})\r\n```\r\n * @public\r\n */\r\nexport function createReducer<\r\n S,\r\n CR extends CaseReducers<S, any> = CaseReducers<S, any>\r\n>(\r\n initialState: S,\r\n actionsMap: CR,\r\n actionMatchers?: ActionMatcherDescriptionCollection<S>,\r\n defaultCaseReducer?: CaseReducer<S>\r\n): Reducer<S>\r\n\r\nexport function createReducer<S>(\r\n initialState: S,\r\n mapOrBuilderCallback:\r\n | CaseReducers<S, any>\r\n | ((builder: ActionReducerMapBuilder<S>) => void),\r\n actionMatchers: ReadonlyActionMatcherDescriptionCollection<S> = [],\r\n defaultCaseReducer?: CaseReducer<S>\r\n): Reducer<S> {\r\n let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] =\r\n typeof mapOrBuilderCallback === 'function'\r\n ? executeReducerBuilderCallback(mapOrBuilderCallback)\r\n : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer]\r\n\r\n const frozenInitialState = createNextState(initialState, () => {})\r\n\r\n return function (state = frozenInitialState, action): S {\r\n let caseReducers = [\r\n actionsMap[action.type],\r\n ...finalActionMatchers\r\n .filter(({ matcher }) => matcher(action))\r\n .map(({ reducer }) => reducer),\r\n ]\r\n if (caseReducers.filter((cr) => !!cr).length === 0) {\r\n caseReducers = [finalDefaultCaseReducer]\r\n }\r\n\r\n return caseReducers.reduce((previousState, caseReducer): S => {\r\n if (caseReducer) {\r\n if (isDraft(previousState)) {\r\n // If it's already a draft, we must already be inside a `createNextState` call,\r\n // likely because this is being wrapped in `createReducer`, `createSlice`, or nested\r\n // inside an existing draft. It's safe to just pass the draft to the mutator.\r\n const draft = previousState as Draft<S> // We can assume this is already a draft\r\n const result = caseReducer(draft, action)\r\n\r\n if (typeof result === 'undefined') {\r\n return previousState\r\n }\r\n\r\n return result as S\r\n } else if (!isDraftable(previousState)) {\r\n // If state is not draftable (ex: a primitive, such as 0), we want to directly\r\n // return the caseReducer func and not wrap it with produce.\r\n const result = caseReducer(previousState as any, action)\r\n\r\n if (typeof result === 'undefined') {\r\n if (previousState === null) {\r\n return previousState\r\n }\r\n throw Error(\r\n 'A case reducer on a non-draftable value must not return undefined'\r\n )\r\n }\r\n\r\n return result as S\r\n } else {\r\n // @ts-ignore createNextState() produces an Immutable<Draft<S>> rather\r\n // than an Immutable<S>, and TypeScript cannot find out how to reconcile\r\n // these two types.\r\n return createNextState(previousState, (draft: Draft<S>) => {\r\n return caseReducer(draft, action)\r\n })\r\n }\r\n }\r\n\r\n return previousState\r\n }, state)\r\n }\r\n}\r\n","import type { Action, AnyAction } from 'redux'\r\nimport type {\r\n CaseReducer,\r\n CaseReducers,\r\n ActionMatcher,\r\n ActionMatcherDescriptionCollection,\r\n} from './createReducer'\r\n\r\nexport interface TypedActionCreator<Type extends string> {\r\n (...args: any[]): Action<Type>\r\n type: Type\r\n}\r\n\r\n/**\r\n * A builder for an action <-> reducer map.\r\n *\r\n * @public\r\n */\r\nexport interface ActionReducerMapBuilder<State> {\r\n /**\r\n * Adds a case reducer to handle a single exact action type.\r\n * @remarks\r\n * All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`.\r\n * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\r\n * @param reducer - The actual case reducer function.\r\n */\r\n addCase<ActionCreator extends TypedActionCreator<string>>(\r\n actionCreator: ActionCreator,\r\n reducer: CaseReducer<State, ReturnType<ActionCreator>>\r\n ): ActionReducerMapBuilder<State>\r\n /**\r\n * Adds a case reducer to handle a single exact action type.\r\n * @remarks\r\n * All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`.\r\n * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\r\n * @param reducer - The actual case reducer function.\r\n */\r\n addCase<Type extends string, A extends Action<Type>>(\r\n type: Type,\r\n reducer: CaseReducer<State, A>\r\n ): ActionReducerMapBuilder<State>\r\n\r\n /**\r\n * Allows you to match your incoming actions against your own filter function instead of only the `action.type` property.\r\n * @remarks\r\n * If multiple matcher reducers match, all of them will be executed in the order\r\n * they were defined in - even if a case reducer already matched.\r\n * All calls to `builder.addMatcher` must come after any calls to `builder.addCase` and before any calls to `builder.addDefaultCase`.\r\n * @param matcher - A matcher function. In TypeScript, this should be a [type predicate](https://www.typescriptlang.org/docs/handbook/advanced-types.html#using-type-predicates)\r\n * function\r\n * @param reducer - The actual case reducer function.\r\n *\r\n * @example\r\n```ts\r\nimport {\r\n createAction,\r\n createReducer,\r\n AsyncThunk,\r\n AnyAction,\r\n} from \"@reduxjs/toolkit\";\r\n\r\ntype GenericAsyncThunk = AsyncThunk<unknown, unknown, any>;\r\n\r\ntype PendingAction = ReturnType<GenericAsyncThunk[\"pending\"]>;\r\ntype RejectedAction = ReturnType<GenericAsyncThunk[\"rejected\"]>;\r\ntype FulfilledAction = ReturnType<GenericAsyncThunk[\"fulfilled\"]>;\r\n\r\nconst initialState: Record<string, string> = {};\r\nconst resetAction = createAction(\"reset-tracked-loading-state\");\r\n\r\nfunction isPendingAction(action: AnyAction): action is PendingAction {\r\n return action.type.endsWith(\"/pending\");\r\n}\r\n\r\nconst reducer = createReducer(initialState, (builder) => {\r\n builder\r\n .addCase(resetAction, () => initialState)\r\n // matcher can be defined outside as a type predicate function\r\n .addMatcher(isPendingAction, (state, action) => {\r\n state[action.meta.requestId] = \"pending\";\r\n })\r\n .addMatcher(\r\n // matcher can be defined inline as a type predicate function\r\n (action): action is RejectedAction => action.type.endsWith(\"/rejected\"),\r\n (state, action) => {\r\n state[action.meta.requestId] = \"rejected\";\r\n }\r\n )\r\n // matcher can just return boolean and the matcher can receive a generic argument\r\n .addMatcher<FulfilledAction>(\r\n (action) => action.type.endsWith(\"/fulfilled\"),\r\n (state, action) => {\r\n state[action.meta.requestId] = \"fulfilled\";\r\n }\r\n );\r\n});\r\n```\r\n */\r\n addMatcher<A extends AnyAction>(\r\n matcher: ActionMatcher<A> | ((action: AnyAction) => boolean),\r\n reducer: CaseReducer<State, A>\r\n ): Omit<ActionReducerMapBuilder<State>, 'addCase'>\r\n\r\n /**\r\n * Adds a \"default case\" reducer that is executed if no case reducer and no matcher\r\n * reducer was executed for this action.\r\n * @param reducer - The fallback \"default case\" reducer function.\r\n *\r\n * @example\r\n```ts\r\nimport { createReducer } from '@reduxjs/toolkit'\r\nconst initialState = { otherActions: 0 }\r\nconst reducer = createReducer(initialState, builder => {\r\n builder\r\n // .addCase(...)\r\n // .addMatcher(...)\r\n .addDefaultCase((state, action) => {\r\n state.otherActions++\r\n })\r\n})\r\n```\r\n */\r\n addDefaultCase(reducer: CaseReducer<State, AnyAction>): {}\r\n}\r\n\r\nexport function executeReducerBuilderCallback<S>(\r\n builderCallback: (builder: ActionReducerMapBuilder<S>) => void\r\n): [\r\n CaseReducers<S, any>,\r\n ActionMatcherDescriptionCollection<S>,\r\n CaseReducer<S, AnyAction> | undefined\r\n] {\r\n const actionsMap: CaseReducers<S, any> = {}\r\n const actionMatchers: ActionMatcherDescriptionCollection<S> = []\r\n let defaultCaseReducer: CaseReducer<S, AnyAction> | undefined\r\n const builder = {\r\n addCase(\r\n typeOrActionCreator: string | TypedActionCreator<any>,\r\n reducer: CaseReducer<S>\r\n ) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n /*\r\n to keep the definition by the user in line with actual behavior, \r\n we enforce `addCase` to always be called before calling `addMatcher`\r\n as matching cases take precedence over matchers\r\n */\r\n if (actionMatchers.length > 0) {\r\n throw new Error(\r\n '`builder.addCase` should only be called before calling `builder.addMatcher`'\r\n )\r\n }\r\n if (defaultCaseReducer) {\r\n throw new Error(\r\n '`builder.addCase` should only be called before calling `builder.addDefaultCase`'\r\n )\r\n }\r\n }\r\n const type =\r\n typeof typeOrActionCreator === 'string'\r\n ? typeOrActionCreator\r\n : typeOrActionCreator.type\r\n if (type in actionsMap) {\r\n throw new Error(\r\n 'addCase cannot be called with two reducers for the same action type'\r\n )\r\n }\r\n actionsMap[type] = reducer\r\n return builder\r\n },\r\n addMatcher<A extends AnyAction>(\r\n matcher: ActionMatcher<A>,\r\n reducer: CaseReducer<S, A>\r\n ) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (defaultCaseReducer) {\r\n throw new Error(\r\n '`builder.addMatcher` should only be called before calling `builder.addDefaultCase`'\r\n )\r\n }\r\n }\r\n actionMatchers.push({ matcher, reducer })\r\n return builder\r\n },\r\n addDefaultCase(reducer: CaseReducer<S, AnyAction>) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (defaultCaseReducer) {\r\n throw new Error('`builder.addDefaultCase` can only be called once')\r\n }\r\n }\r\n defaultCaseReducer = reducer\r\n return builder\r\n },\r\n }\r\n builderCallback(builder)\r\n return [actionsMap, actionMatchers, defaultCaseReducer]\r\n}\r\n","import type { Reducer } from 'redux'\r\nimport type {\r\n ActionCreatorWithoutPayload,\r\n PayloadAction,\r\n PayloadActionCreator,\r\n PrepareAction,\r\n _ActionCreatorWithPreparedPayload,\r\n} from './createAction'\r\nimport { createAction } from './createAction'\r\nimport type { CaseReducer, CaseReducers } from './createReducer'\r\nimport { createReducer } from './createReducer'\r\nimport type { ActionReducerMapBuilder } from './mapBuilders'\r\nimport { executeReducerBuilderCallback } from './mapBuilders'\r\nimport type { NoInfer } from './tsHelpers'\r\n\r\n/**\r\n * An action creator attached to a slice.\r\n *\r\n * @deprecated please use PayloadActionCreator directly\r\n *\r\n * @public\r\n */\r\nexport type SliceActionCreator<P> = PayloadActionCreator<P>\r\n\r\n/**\r\n * The return value of `createSlice`\r\n *\r\n * @public\r\n */\r\nexport interface Slice<\r\n State = any,\r\n CaseReducers extends SliceCaseReducers<State> = SliceCaseReducers<State>,\r\n Name extends string = string\r\n> {\r\n /**\r\n * The slice name.\r\n */\r\n name: Name\r\n\r\n /**\r\n * The slice's reducer.\r\n */\r\n reducer: Reducer<State>\r\n\r\n /**\r\n * Action creators for the types of actions that are handled by the slice\r\n * reducer.\r\n */\r\n actions: CaseReducerActions<CaseReducers>\r\n\r\n /**\r\n * The individual case reducer functions that were passed in the `reducers` parameter.\r\n * This enables reuse and testing if they were defined inline when calling `createSlice`.\r\n */\r\n caseReducers: SliceDefinedCaseReducers<CaseReducers>\r\n}\r\n\r\n/**\r\n * Options for `createSlice()`.\r\n *\r\n * @public\r\n */\r\nexport interface CreateSliceOptions<\r\n State = any,\r\n CR extends SliceCaseReducers<State> = SliceCaseReducers<State>,\r\n Name extends string = string\r\n> {\r\n /**\r\n * The slice's name. Used to namespace the generated action types.\r\n */\r\n name: Name\r\n\r\n /**\r\n * The initial state to be returned by the slice reducer.\r\n */\r\n initialState: State\r\n\r\n /**\r\n * A mapping from action types to action-type-specific *case reducer*\r\n * functions. For every action type, a matching action creator will be\r\n * generated using `createAction()`.\r\n */\r\n reducers: ValidateSliceCaseReducers<State, CR>\r\n\r\n /**\r\n * A callback that receives a *builder* object to define\r\n * case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`.\r\n * \r\n * Alternatively, a mapping from action types to action-type-specific *case reducer*\r\n * functions. These reducers should have existing action types used\r\n * as the keys, and action creators will _not_ be generated.\r\n * \r\n * @example\r\n```ts\r\nimport { createAction, createSlice, Action, AnyAction } from '@reduxjs/toolkit'\r\nconst incrementBy = createAction<number>('incrementBy')\r\nconst decrement = createAction('decrement')\r\n\r\ninterface RejectedAction extends Action {\r\n error: Error\r\n}\r\n\r\nfunction isRejectedAction(action: AnyAction): action is RejectedAction {\r\n return action.type.endsWith('rejected')\r\n}\r\n\r\ncreateSlice({\r\n name: 'counter',\r\n initialState: 0,\r\n reducers: {},\r\n extraReducers: builder => {\r\n builder\r\n .addCase(incrementBy, (state, action) => {\r\n // action is inferred correctly here if using TS\r\n })\r\n // You can chain calls, or have separate `builder.addCase()` lines each time\r\n .addCase(decrement, (state, action) => {})\r\n // You can match a range of action types\r\n .addMatcher(\r\n isRejectedAction,\r\n // `action` will be inferred as a RejectedAction due to isRejectedAction being defined as a type guard\r\n (state, action) => {}\r\n )\r\n // and provide a default case if no other handlers matched\r\n .addDefaultCase((state, action) => {})\r\n }\r\n})\r\n```\r\n */\r\n extraReducers?:\r\n | CaseReducers<NoInfer<State>, any>\r\n | ((builder: ActionReducerMapBuilder<NoInfer<State>>) => void)\r\n}\r\n\r\n/**\r\n * A CaseReducer with a `prepare` method.\r\n *\r\n * @public\r\n */\r\nexport type CaseReducerWithPrepare<State, Action extends PayloadAction> = {\r\n reducer: CaseReducer<State, Action>\r\n prepare: PrepareAction<Action['payload']>\r\n}\r\n\r\n/**\r\n * The type describing a slice's `reducers` option.\r\n *\r\n * @public\r\n */\r\nexport type SliceCaseReducers<State> = {\r\n [K: string]:\r\n | CaseReducer<State, PayloadAction<any>>\r\n | CaseReducerWithPrepare<State, PayloadAction<any, string, any, any>>\r\n}\r\n\r\n/**\r\n * Derives the slice's `actions` property from the `reducers` options\r\n *\r\n * @public\r\n */\r\nexport type CaseReducerActions<CaseReducers extends SliceCaseReducers<any>> = {\r\n [Type in keyof CaseReducers]: CaseReducers[Type] extends { prepare: any }\r\n ? ActionCreatorForCaseReducerWithPrepare<CaseReducers[Type]>\r\n : ActionCreatorForCaseReducer<CaseReducers[Type]>\r\n}\r\n\r\n/**\r\n * Get a `PayloadActionCreator` type for a passed `CaseReducerWithPrepare`\r\n *\r\n * @internal\r\n */\r\ntype ActionCreatorForCaseReducerWithPrepare<CR extends { prepare: any }> =\r\n _ActionCreatorWithPreparedPayload<CR['prepare'], string>\r\n\r\n/**\r\n * Get a `PayloadActionCreator` type for a passed `CaseReducer`\r\n *\r\n * @internal\r\n */\r\ntype ActionCreatorForCaseReducer<CR> = CR extends (\r\n state: any,\r\n action: infer Action\r\n) => any\r\n ? Action extends { payload: infer P }\r\n ? PayloadActionCreator<P>\r\n : ActionCreatorWithoutPayload\r\n : ActionCreatorWithoutPayload\r\n\r\n/**\r\n * Extracts the CaseReducers out of a `reducers` object, even if they are\r\n * tested into a `CaseReducerWithPrepare`.\r\n *\r\n * @internal\r\n */\r\ntype SliceDefinedCaseReducers<CaseReducers extends SliceCaseReducers<any>> = {\r\n [Type in keyof CaseReducers]: CaseReducers[Type] extends {\r\n reducer: infer Reducer\r\n }\r\n ? Reducer\r\n : CaseReducers[Type]\r\n}\r\n\r\n/**\r\n * Used on a SliceCaseReducers object.\r\n * Ensures that if a CaseReducer is a `CaseReducerWithPrepare`, that\r\n * the `reducer` and the `prepare` function use the same type of `payload`.\r\n *\r\n * Might do additional such checks in the future.\r\n *\r\n * This type is only ever useful if you want to write your own wrapper around\r\n * `createSlice`. Please don't use it otherwise!\r\n *\r\n * @public\r\n */\r\nexport type ValidateSliceCaseReducers<\r\n S,\r\n ACR extends SliceCaseReducers<S>\r\n> = ACR &\r\n {\r\n [T in keyof ACR]: ACR[T] extends {\r\n reducer(s: S, action?: infer A): any\r\n }\r\n ? {\r\n prepare(...a: never[]): Omit<A, 'type'>\r\n }\r\n : {}\r\n }\r\n\r\nfunction getType(slice: string, actionKey: string): string {\r\n return `${slice}/${actionKey}`\r\n}\r\n\r\n/**\r\n * A function that accepts an initial state, an object full of reducer\r\n * functions, and a \"slice name\", and automatically generates\r\n * action creators and action types that correspond to the\r\n * reducers and state.\r\n *\r\n * The `reducer` argument is passed to `createReducer()`.\r\n *\r\n * @public\r\n */\r\nexport function createSlice<\r\n State,\r\n CaseReducers extends SliceCaseReducers<State>,\r\n Name extends string = string\r\n>(\r\n options: CreateSliceOptions<State, CaseReducers, Name>\r\n): Slice<State, CaseReducers, Name> {\r\n const { name, initialState } = options\r\n if (!name) {\r\n throw new Error('`name` is a required option for createSlice')\r\n }\r\n const reducers = options.reducers || {}\r\n const [\r\n extraReducers = {},\r\n actionMatchers = [],\r\n defaultCaseReducer = undefined,\r\n ] =\r\n typeof options.extraReducers === 'function'\r\n ? executeReducerBuilderCallback(options.extraReducers)\r\n : [options.extraReducers]\r\n\r\n const reducerNames = Object.keys(reducers)\r\n\r\n const sliceCaseReducersByName: Record<string, CaseReducer> = {}\r\n const sliceCaseReducersByType: Record<string, CaseReducer> = {}\r\n const actionCreators: Record<string, Function> = {}\r\n\r\n reducerNames.forEach((reducerName) => {\r\n const maybeReducerWithPrepare = reducers[reducerName]\r\n const type = getType(name, reducerName)\r\n\r\n let caseReducer: CaseReducer<State, any>\r\n let prepareCallback: PrepareAction<any> | undefined\r\n\r\n if ('reducer' in maybeReducerWithPrepare) {\r\n caseReducer = maybeReducerWithPrepare.reducer\r\n prepareCallback = maybeReducerWithPrepare.prepare\r\n } else {\r\n caseReducer = maybeReducerWithPrepare\r\n }\r\n\r\n sliceCaseReducersByName[reducerName] = caseReducer\r\n sliceCaseReducersByType[type] = caseReducer\r\n actionCreators[reducerName] = prepareCallback\r\n ? createAction(type, prepareCallback)\r\n : createAction(type)\r\n })\r\n\r\n const finalCaseReducers = { ...extraReducers, ...sliceCaseReducersByType }\r\n const reducer = createReducer(\r\n initialState,\r\n finalCaseReducers as any,\r\n actionMatchers,\r\n defaultCaseReducer\r\n )\r\n\r\n return {\r\n name,\r\n reducer,\r\n actions: actionCreators as any,\r\n caseReducers: sliceCaseReducersByName as any,\r\n }\r\n}\r\n","import createNextState, { isDraft } from 'immer'\r\nimport type { EntityState, PreventAny } from './models'\r\nimport type { PayloadAction } from '../createAction'\r\nimport { isFSA } from '../createAction'\r\nimport { IsAny } from '../tsHelpers'\r\n\r\nexport function createSingleArgumentStateOperator<V>(\r\n mutator: (state: EntityState<V>) => void\r\n) {\r\n const operator = createStateOperator((_: undefined, state: EntityState<V>) =>\r\n mutator(state)\r\n )\r\n\r\n return function operation<S extends EntityState<V>>(\r\n state: PreventAny<S, V>\r\n ): S {\r\n return operator(state as S, undefined)\r\n }\r\n}\r\n\r\nexport function createStateOperator<V, R>(\r\n mutator: (arg: R, state: EntityState<V>) => void\r\n) {\r\n return function operation<S extends EntityState<V>>(\r\n state: S,\r\n arg: R | PayloadAction<R>\r\n ): S {\r\n function isPayloadActionArgument(\r\n arg: R | PayloadAction<R>\r\n ): arg is PayloadAction<R> {\r\n return isFSA(arg)\r\n }\r\n\r\n const runMutator = (draft: EntityState<V>) => {\r\n if (isPayloadActionArgument(arg)) {\r\n mutator(arg.payload, draft)\r\n } else {\r\n mutator(arg, draft)\r\n }\r\n }\r\n\r\n if (isDraft(state)) {\r\n // we must already be inside a `createNextState` call, likely because\r\n // this is being wrapped in `createReducer` or `createSlice`.\r\n // It's safe to just pass the draft to the mutator.\r\n runMutator(state)\r\n\r\n // since it's a draft, we'll just return it\r\n return state\r\n } else {\r\n // @ts-ignore createNextState() produces an Immutable<Draft<S>> rather\r\n // than an Immutable<S>, and TypeScript cannot find out how to reconcile\r\n // these two types.\r\n return createNextState(state, runMutator)\r\n }\r\n }\r\n}\r\n","import type { EntityState, IdSelector, Update, EntityId } from './models'\r\n\r\nexport function selectIdValue<T>(entity: T, selectId: IdSelector<T>) {\r\n const key = selectId(entity)\r\n\r\n if (process.env.NODE_ENV !== 'production' && key === undefined) {\r\n console.warn(\r\n 'The entity passed to the `selectId` implementation returned undefined.',\r\n 'You should probably provide your own `selectId` implementation.',\r\n 'The entity that was passed:',\r\n entity,\r\n 'The `selectId` implementation:',\r\n selectId.toString()\r\n )\r\n }\r\n\r\n return key\r\n}\r\n\r\nexport function ensureEntitiesArray<T>(\r\n entities: readonly T[] | Record<EntityId, T>\r\n): readonly T[] {\r\n if (!Array.isArray(entities)) {\r\n entities = Object.values(entities)\r\n }\r\n\r\n return entities\r\n}\r\n\r\nexport function splitAddedUpdatedEntities<T>(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n selectId: IdSelector<T>,\r\n state: EntityState<T>\r\n): [T[], Update<T>[]] {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n const added: T[] = []\r\n const updated: Update<T>[] = []\r\n\r\n for (const entity of newEntities) {\r\n const id = selectIdValue(entity, selectId)\r\n if (id in state.entities) {\r\n updated.push({ id, changes: entity })\r\n } else {\r\n added.push(entity)\r\n }\r\n }\r\n return [added, updated]\r\n}\r\n","import type {\r\n EntityState,\r\n EntityStateAdapter,\r\n IdSelector,\r\n Update,\r\n EntityId,\r\n} from './models'\r\nimport {\r\n createStateOperator,\r\n createSingleArgumentStateOperator,\r\n} from './state_adapter'\r\nimport {\r\n selectIdValue,\r\n ensureEntitiesArray,\r\n splitAddedUpdatedEntities,\r\n} from './utils'\r\n\r\nexport function createUnsortedStateAdapter<T>(\r\n selectId: IdSelector<T>\r\n): EntityStateAdapter<T> {\r\n type R = EntityState<T>\r\n\r\n function addOneMutably(entity: T, state: R): void {\r\n const key = selectIdValue(entity, selectId)\r\n\r\n if (key in state.entities) {\r\n return\r\n }\r\n\r\n state.ids.push(key)\r\n state.entities[key] = entity\r\n }\r\n\r\n function addManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n for (const entity of newEntities) {\r\n addOneMutably(entity, state)\r\n }\r\n }\r\n\r\n function setOneMutably(entity: T, state: R): void {\r\n const key = selectIdValue(entity, selectId)\r\n if (!(key in state.entities)) {\r\n state.ids.push(key)\r\n }\r\n state.entities[key] = entity\r\n }\r\n\r\n function setManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n for (const entity of newEntities) {\r\n setOneMutably(entity, state)\r\n }\r\n }\r\n\r\n function setAllMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n state.ids = []\r\n state.entities = {}\r\n\r\n addManyMutably(newEntities, state)\r\n }\r\n\r\n function removeOneMutably(key: EntityId, state: R): void {\r\n return removeManyMutably([key], state)\r\n }\r\n\r\n function removeManyMutably(keys: readonly EntityId[], state: R): void {\r\n let didMutate = false\r\n\r\n keys.forEach((key) => {\r\n if (key in state.entities) {\r\n delete state.entities[key]\r\n didMutate = true\r\n }\r\n })\r\n\r\n if (didMutate) {\r\n state.ids = state.ids.filter((id) => id in state.entities)\r\n }\r\n }\r\n\r\n function removeAllMutably(state: R): void {\r\n Object.assign(state, {\r\n ids: [],\r\n entities: {},\r\n })\r\n }\r\n\r\n function takeNewKey(\r\n keys: { [id: string]: EntityId },\r\n update: Update<T>,\r\n state: R\r\n ): boolean {\r\n const original = state.entities[update.id]\r\n const updated: T = Object.assign({}, original, update.changes)\r\n const newKey = selectIdValue(updated, selectId)\r\n const hasNewKey = newKey !== update.id\r\n\r\n if (hasNewKey) {\r\n keys[update.id] = newKey\r\n delete state.entities[update.id]\r\n }\r\n\r\n state.entities[newKey] = updated\r\n\r\n return hasNewKey\r\n }\r\n\r\n function updateOneMutably(update: Update<T>, state: R): void {\r\n return updateManyMutably([update], state)\r\n }\r\n\r\n function updateManyMutably(\r\n updates: ReadonlyArray<Update<T>>,\r\n state: R\r\n ): void {\r\n const newKeys: { [id: string]: EntityId } = {}\r\n\r\n const updatesPerEntity: { [id: string]: Update<T> } = {}\r\n\r\n updates.forEach((update) => {\r\n // Only apply updates to entities that currently exist\r\n if (update.id in state.entities) {\r\n // If there are multiple updates to one entity, merge them together\r\n updatesPerEntity[update.id] = {\r\n id: update.id,\r\n // Spreads ignore falsy values, so this works even if there isn't\r\n // an existing update already at this key\r\n changes: {\r\n ...(updatesPerEntity[update.id]\r\n ? updatesPerEntity[update.id].changes\r\n : null),\r\n ...update.changes,\r\n },\r\n }\r\n }\r\n })\r\n\r\n updates = Object.values(updatesPerEntity)\r\n\r\n const didMutateEntities = updates.length > 0\r\n\r\n if (didMutateEntities) {\r\n const didMutateIds =\r\n updates.filter((update) => takeNewKey(newKeys, update, state)).length >\r\n 0\r\n\r\n if (didMutateIds) {\r\n state.ids = state.ids.map((id) => newKeys[id] || id)\r\n }\r\n }\r\n }\r\n\r\n function upsertOneMutably(entity: T, state: R): void {\r\n return upsertManyMutably([entity], state)\r\n }\r\n\r\n function upsertManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n const [added, updated] = splitAddedUpdatedEntities<T>(\r\n newEntities,\r\n selectId,\r\n state\r\n )\r\n\r\n updateManyMutably(updated, state)\r\n addManyMutably(added, state)\r\n }\r\n\r\n return {\r\n removeAll: createSingleArgumentStateOperator(removeAllMutably),\r\n addOne: createStateOperator(addOneMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n upsertMany: createStateOperator(upsertManyMutably),\r\n removeOne: createStateOperator(removeOneMutably),\r\n removeMany: createStateOperator(removeManyMutably),\r\n }\r\n}\r\n","import type {\r\n EntityDefinition,\r\n Comparer,\r\n IdSelector,\r\n EntityAdapter,\r\n} from './models'\r\nimport { createInitialStateFactory } from './entity_state'\r\nimport { createSelectorsFactory } from './state_selectors'\r\nimport { createSortedStateAdapter } from './sorted_state_adapter'\r\nimport { createUnsortedStateAdapter } from './unsorted_state_adapter'\r\n\r\n/**\r\n *\r\n * @param options\r\n *\r\n * @public\r\n */\r\nexport function createEntityAdapter<T>(\r\n options: {\r\n selectId?: IdSelector<T>\r\n sortComparer?: false | Comparer<T>\r\n } = {}\r\n): EntityAdapter<T> {\r\n const { selectId, sortComparer }: EntityDefinition<T> = {\r\n sortComparer: false,\r\n selectId: (instance: any) => instance.id,\r\n ...options,\r\n }\r\n\r\n const stateFactory = createInitialStateFactory<T>()\r\n const selectorsFactory = createSelectorsFactory<T>()\r\n const stateAdapter = sortComparer\r\n ? createSortedStateAdapter(selectId, sortComparer)\r\n : createUnsortedStateAdapter(selectId)\r\n\r\n return {\r\n selectId,\r\n sortComparer,\r\n ...stateFactory,\r\n ...selectorsFactory,\r\n ...stateAdapter,\r\n }\r\n}\r\n","import type { EntityState } from './models'\r\n\r\nexport function getInitialEntityState<V>(): EntityState<V> {\r\n return {\r\n ids: [],\r\n entities: {},\r\n }\r\n}\r\n\r\nexport function createInitialStateFactory<V>() {\r\n function getInitialState(): EntityState<V>\r\n function getInitialState<S extends object>(\r\n additionalState: S\r\n ): EntityState<V> & S\r\n function getInitialState(additionalState: any = {}): any {\r\n return Object.assign(getInitialEntityState(), additionalState)\r\n }\r\n\r\n return { getInitialState }\r\n}\r\n","import { createDraftSafeSelector } from '../createDraftSafeSelector'\r\nimport type {\r\n EntityState,\r\n EntitySelectors,\r\n Dictionary,\r\n EntityId,\r\n} from './models'\r\n\r\nexport function createSelectorsFactory<T>() {\r\n function getSelectors(): EntitySelectors<T, EntityState<T>>\r\n function getSelectors<V>(\r\n selectState: (state: V) => EntityState<T>\r\n ): EntitySelectors<T, V>\r\n function getSelectors(\r\n selectState?: (state: any) => EntityState<T>\r\n ): EntitySelectors<T, any> {\r\n const selectIds = (state: any) => state.ids\r\n\r\n const selectEntities = (state: EntityState<T>) => state.entities\r\n\r\n const selectAll = createDraftSafeSelector(\r\n selectIds,\r\n selectEntities,\r\n (ids: readonly T[], entities: Dictionary<T>): any =>\r\n ids.map((id: any) => (entities as any)[id])\r\n )\r\n\r\n const selectId = (_: any, id: EntityId) => id\r\n\r\n const selectById = (entities: Dictionary<T>, id: EntityId) => entities[id]\r\n\r\n const selectTotal = createDraftSafeSelector(selectIds, (ids) => ids.length)\r\n\r\n if (!selectState) {\r\n return {\r\n selectIds,\r\n selectEntities,\r\n selectAll,\r\n selectTotal,\r\n selectById: createDraftSafeSelector(\r\n selectEntities,\r\n selectId,\r\n selectById\r\n ),\r\n }\r\n }\r\n\r\n const selectGlobalizedEntities = createDraftSafeSelector(\r\n selectState,\r\n selectEntities\r\n )\r\n\r\n return {\r\n selectIds: createDraftSafeSelector(selectState, selectIds),\r\n selectEntities: selectGlobalizedEntities,\r\n selectAll: createDraftSafeSelector(selectState, selectAll),\r\n selectTotal: createDraftSafeSelector(selectState, selectTotal),\r\n selectById: createDraftSafeSelector(\r\n selectGlobalizedEntities,\r\n selectId,\r\n selectById\r\n ),\r\n }\r\n }\r\n\r\n return { getSelectors }\r\n}\r\n","import type {\r\n EntityState,\r\n IdSelector,\r\n Comparer,\r\n EntityStateAdapter,\r\n Update,\r\n EntityId,\r\n} from './models'\r\nimport { createStateOperator } from './state_adapter'\r\nimport { createUnsortedStateAdapter } from './unsorted_state_adapter'\r\nimport {\r\n selectIdValue,\r\n ensureEntitiesArray,\r\n splitAddedUpdatedEntities,\r\n} from './utils'\r\n\r\nexport function createSortedStateAdapter<T>(\r\n selectId: IdSelector<T>,\r\n sort: Comparer<T>\r\n): EntityStateAdapter<T> {\r\n type R = EntityState<T>\r\n\r\n const { removeOne, removeMany, removeAll } =\r\n createUnsortedStateAdapter(selectId)\r\n\r\n function addOneMutably(entity: T, state: R): void {\r\n return addManyMutably([entity], state)\r\n }\r\n\r\n function addManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n const models = newEntities.filter(\r\n (model) => !(selectIdValue(model, selectId) in state.entities)\r\n )\r\n\r\n if (models.length !== 0) {\r\n merge(models, state)\r\n }\r\n }\r\n\r\n function setOneMutably(entity: T, state: R): void {\r\n return setManyMutably([entity], state)\r\n }\r\n\r\n function setManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n if (newEntities.length !== 0) {\r\n merge(newEntities, state)\r\n }\r\n }\r\n\r\n function setAllMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n state.entities = {}\r\n state.ids = []\r\n\r\n addManyMutably(newEntities, state)\r\n }\r\n\r\n function updateOneMutably(update: Update<T>, state: R): void {\r\n return updateManyMutably([update], state)\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types\r\n function takeUpdatedModel(models: T[], update: Update<T>, state: R): boolean {\r\n if (!(update.id in state.entities)) {\r\n return false\r\n }\r\n\r\n const original = state.entities[update.id]\r\n const updated = Object.assign({}, original, update.changes)\r\n const newKey = selectIdValue(updated, selectId)\r\n\r\n delete state.entities[update.id]\r\n\r\n models.push(updated)\r\n\r\n return newKey !== update.id\r\n }\r\n\r\n function updateManyMutably(\r\n updates: ReadonlyArray<Update<T>>,\r\n state: R\r\n ): void {\r\n const models: T[] = []\r\n\r\n updates.forEach((update) => takeUpdatedModel(models, update, state))\r\n\r\n if (models.length !== 0) {\r\n merge(models, state)\r\n }\r\n }\r\n\r\n function upsertOneMutably(entity: T, state: R): void {\r\n return upsertManyMutably([entity], state)\r\n }\r\n\r\n function upsertManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n const [added, updated] = splitAddedUpdatedEntities<T>(\r\n newEntities,\r\n selectId,\r\n state\r\n )\r\n\r\n updateManyMutably(updated, state)\r\n addManyMutably(added, state)\r\n }\r\n\r\n function areArraysEqual(a: readonly unknown[], b: readonly unknown[]) {\r\n if (a.length !== b.length) {\r\n return false\r\n }\r\n\r\n for (let i = 0; i < a.length && i < b.length; i++) {\r\n if (a[i] === b[i]) {\r\n continue\r\n }\r\n return false\r\n }\r\n return true\r\n }\r\n\r\n function merge(models: readonly T[], state: R): void {\r\n // Insert/overwrite all new/updated\r\n models.forEach((model) => {\r\n state.entities[selectId(model)] = model\r\n })\r\n\r\n const allEntities = Object.values(state.entities) as T[]\r\n allEntities.sort(sort)\r\n\r\n const newSortedIds = allEntities.map(selectId)\r\n const { ids } = state\r\n\r\n if (!areArraysEqual(ids, newSortedIds)) {\r\n state.ids = newSortedIds\r\n }\r\n }\r\n\r\n return {\r\n removeOne,\r\n removeMany,\r\n removeAll,\r\n addOne: createStateOperator(addOneMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertMany: createStateOperator(upsertManyMutably),\r\n }\r\n}\r\n","// Borrowed from https://github.com/ai/nanoid/blob/3.0.2/non-secure/index.js\r\n// This alphabet uses `A-Za-z0-9_-` symbols. A genetic algorithm helped\r\n// optimize the gzip compression for this alphabet.\r\nlet urlAlphabet =\r\n 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'\r\n\r\n/**\r\n *\r\n * @public\r\n */\r\nexport let nanoid = (size = 21) => {\r\n let id = ''\r\n // A compact alternative for `for (var i = 0; i < step; i++)`.\r\n let i = size\r\n while (i--) {\r\n // `| 0` is more compact and faster than `Math.floor()`.\r\n id += urlAlphabet[(Math.random() * 64) | 0]\r\n }\r\n return id\r\n}\r\n","import type { Dispatch, AnyAction } from 'redux'\r\nimport type {\r\n PayloadAction,\r\n ActionCreatorWithPreparedPayload,\r\n} from './createAction'\r\nimport { createAction } from './createAction'\r\nimport type { ThunkDispatch } from 'redux-thunk'\r\nimport type { FallbackIfUnknown, IsAny, IsUnknown } from './tsHelpers'\r\nimport { nanoid } from './nanoid'\r\n\r\n// @ts-ignore we need the import of these types due to a bundling issue.\r\ntype _Keep = PayloadAction | ActionCreatorWithPreparedPayload<any, unknown>\r\n\r\nexport type BaseThunkAPI<\r\n S,\r\n E,\r\n D extends Dispatch = Dispatch,\r\n RejectedValue = undefined,\r\n RejectedMeta = unknown,\r\n FulfilledMeta = unknown\r\n> = {\r\n dispatch: D\r\n getState: () => S\r\n extra: E\r\n requestId: string\r\n signal: AbortSignal\r\n rejectWithValue: IsUnknown<\r\n RejectedMeta,\r\n (value: RejectedValue) => RejectWithValue<RejectedValue, RejectedMeta>,\r\n (\r\n value: RejectedValue,\r\n meta: RejectedMeta\r\n ) => RejectWithValue<RejectedValue, RejectedMeta>\r\n >\r\n fulfillWithValue: IsUnknown<\r\n FulfilledMeta,\r\n <FulfilledValue>(\r\n value: FulfilledValue\r\n ) => FulfillWithMeta<FulfilledValue, FulfilledMeta>,\r\n <FulfilledValue>(\r\n value: FulfilledValue,\r\n meta: FulfilledMeta\r\n ) => FulfillWithMeta<FulfilledValue, FulfilledMeta>\r\n >\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport interface SerializedError {\r\n name?: string\r\n message?: string\r\n stack?: string\r\n code?: string\r\n}\r\n\r\nconst commonProperties: Array<keyof SerializedError> = [\r\n 'name',\r\n 'message',\r\n 'stack',\r\n 'code',\r\n]\r\n\r\nclass RejectWithValue<Payload, RejectedMeta> {\r\n /*\r\n type-only property to distinguish between RejectWithValue and FulfillWithMeta\r\n does not exist at runtime\r\n */\r\n private readonly _type!: 'RejectWithValue'\r\n constructor(\r\n public readonly payload: Payload,\r\n public readonly meta: RejectedMeta\r\n ) {}\r\n}\r\n\r\nclass FulfillWithMeta<Payload, FulfilledMeta> {\r\n /*\r\n type-only property to distinguish between RejectWithValue and FulfillWithMeta\r\n does not exist at runtime\r\n */\r\n private readonly _type!: 'FulfillWithMeta'\r\n constructor(\r\n public readonly payload: Payload,\r\n public readonly meta: FulfilledMeta\r\n ) {}\r\n}\r\n\r\n/**\r\n * Serializes an error into a plain object.\r\n * Reworked from https://github.com/sindresorhus/serialize-error\r\n *\r\n * @public\r\n */\r\nexport const miniSerializeError = (value: any): SerializedError => {\r\n if (typeof value === 'object' && value !== null) {\r\n const simpleError: SerializedError = {}\r\n for (const property of commonProperties) {\r\n if (typeof value[property] === 'string') {\r\n simpleError[property] = value[property]\r\n }\r\n }\r\n\r\n return simpleError\r\n }\r\n\r\n return { message: String(value) }\r\n}\r\n\r\ntype AsyncThunkConfig = {\r\n state?: unknown\r\n dispatch?: Dispatch\r\n extra?: unknown\r\n rejectValue?: unknown\r\n serializedErrorType?: unknown\r\n pendingMeta?: unknown\r\n fulfilledMeta?: unknown\r\n rejectedMeta?: unknown\r\n}\r\n\r\ntype GetState<ThunkApiConfig> = ThunkApiConfig extends {\r\n state: infer State\r\n}\r\n ? State\r\n : unknown\r\ntype GetExtra<ThunkApiConfig> = ThunkApiConfig extends { extra: infer Extra }\r\n ? Extra\r\n : unknown\r\ntype GetDispatch<ThunkApiConfig> = ThunkApiConfig extends {\r\n dispatch: infer Dispatch\r\n}\r\n ? FallbackIfUnknown<\r\n Dispatch,\r\n ThunkDispatch<\r\n GetState<ThunkApiConfig>,\r\n GetExtra<ThunkApiConfig>,\r\n AnyAction\r\n >\r\n >\r\n : ThunkDispatch<GetState<ThunkApiConfig>, GetExtra<ThunkApiConfig>, AnyAction>\r\n\r\ntype GetThunkAPI<ThunkApiConfig> = BaseThunkAPI<\r\n GetState<ThunkApiConfig>,\r\n GetExtra<ThunkApiConfig>,\r\n GetDispatch<ThunkApiConfig>,\r\n GetRejectValue<ThunkApiConfig>,\r\n GetRejectedMeta<ThunkApiConfig>,\r\n GetFulfilledMeta<ThunkApiConfig>\r\n>\r\n\r\ntype GetRejectValue<ThunkApiConfig> = ThunkApiConfig extends {\r\n rejectValue: infer RejectValue\r\n}\r\n ? RejectValue\r\n : unknown\r\n\r\ntype GetPendingMeta<ThunkApiConfig> = ThunkApiConfig extends {\r\n pendingMeta: infer PendingMeta\r\n}\r\n ? PendingMeta\r\n : unknown\r\n\r\ntype GetFulfilledMeta<ThunkApiConfig> = ThunkApiConfig extends {\r\n fulfilledMeta: infer FulfilledMeta\r\n}\r\n ? FulfilledMeta\r\n : unknown\r\n\r\ntype GetRejectedMeta<ThunkApiConfig> = ThunkApiConfig extends {\r\n rejectedMeta: infer RejectedMeta\r\n}\r\n ? RejectedMeta\r\n : unknown\r\n\r\ntype GetSerializedErrorType<ThunkApiConfig> = ThunkApiConfig extends {\r\n serializedErrorType: infer GetSerializedErrorType\r\n}\r\n ? GetSerializedErrorType\r\n : SerializedError\r\n\r\ntype MaybePromise<T> = T | Promise<T> | (T extends any ? Promise<T> : never)\r\n\r\n/**\r\n * A type describing the return value of the `payloadCreator` argument to `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkPayloadCreatorReturnValue<\r\n Returned,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = MaybePromise<\r\n | IsUnknown<\r\n GetFulfilledMeta<ThunkApiConfig>,\r\n Returned,\r\n FulfillWithMeta<Returned, GetFulfilledMeta<ThunkApiConfig>>\r\n >\r\n | RejectWithValue<\r\n GetRejectValue<ThunkApiConfig>,\r\n GetRejectedMeta<ThunkApiConfig>\r\n >\r\n>\r\n/**\r\n * A type describing the `payloadCreator` argument to `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkPayloadCreator<\r\n Returned,\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n> = (\r\n arg: ThunkArg,\r\n thunkAPI: GetThunkAPI<ThunkApiConfig>\r\n) => AsyncThunkPayloadCreatorReturnValue<Returned, ThunkApiConfig>\r\n\r\n/**\r\n * A ThunkAction created by `createAsyncThunk`.\r\n * Dispatching it returns a Promise for either a\r\n * fulfilled or rejected action.\r\n * Also, the returned value contains an `abort()` method\r\n * that allows the asyncAction to be cancelled from the outside.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkAction<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = (\r\n dispatch: GetDispatch<ThunkApiConfig>,\r\n getState: () => GetState<ThunkApiConfig>,\r\n extra: GetExtra<ThunkApiConfig>\r\n) => Promise<\r\n | ReturnType<AsyncThunkFulfilledActionCreator<Returned, ThunkArg>>\r\n | ReturnType<AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>>\r\n> & {\r\n abort: (reason?: string) => void\r\n requestId: string\r\n arg: ThunkArg\r\n unwrap: () => Promise<Returned>\r\n}\r\n\r\ntype AsyncThunkActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = IsAny<\r\n ThunkArg,\r\n // any handling\r\n (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>,\r\n // unknown handling\r\n unknown extends ThunkArg\r\n ? (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument not specified or specified as void or undefined\r\n : [ThunkArg] extends [void] | [undefined]\r\n ? () => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument contains void\r\n : [void] extends [ThunkArg] // make optional\r\n ? (arg?: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument contains undefined\r\n : [undefined] extends [ThunkArg]\r\n ? WithStrictNullChecks<\r\n // with strict nullChecks: make optional\r\n (\r\n arg?: ThunkArg\r\n ) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>,\r\n // without strict null checks this will match everything, so don't make it optional\r\n (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>\r\n > // default case: normal argument\r\n : (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>\r\n>\r\n\r\n/**\r\n * Options object for `createAsyncThunk`.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkOptions<\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n> = {\r\n /**\r\n * A method to control whether the asyncThunk should be executed. Has access to the\r\n * `arg`, `api.getState()` and `api.extra` arguments.\r\n *\r\n * @returns `false` if it should be skipped\r\n */\r\n condition?(\r\n arg: ThunkArg,\r\n api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>\r\n ): boolean | undefined\r\n /**\r\n * If `condition` returns `false`, the asyncThunk will be skipped.\r\n * This option allows you to control whether a `rejected` action with `meta.condition == false`\r\n * will be dispatched or not.\r\n *\r\n * @default `false`\r\n */\r\n dispatchConditionRejection?: boolean\r\n\r\n serializeError?: (x: unknown) => GetSerializedErrorType<ThunkApiConfig>\r\n\r\n /**\r\n * A function to use when generating the `requestId` for the request sequence.\r\n *\r\n * @default `nanoid`\r\n */\r\n idGenerator?: () => string\r\n} & IsUnknown<\r\n GetPendingMeta<ThunkApiConfig>,\r\n {\r\n /**\r\n * A method to generate additional properties to be added to `meta` of the pending action.\r\n *\r\n * Using this optional overload will not modify the types correctly, this overload is only in place to support JavaScript users.\r\n * Please use the `ThunkApiConfig` parameter `pendingMeta` to get access to a correctly typed overload\r\n */\r\n getPendingMeta?(\r\n base: {\r\n arg: ThunkArg\r\n requestId: string\r\n },\r\n api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>\r\n ): GetPendingMeta<ThunkApiConfig>\r\n },\r\n {\r\n /**\r\n * A method to generate additional properties to be added to `meta` of the pending action.\r\n */\r\n getPendingMeta(\r\n base: {\r\n arg: ThunkArg\r\n requestId: string\r\n },\r\n api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>\r\n ): GetPendingMeta<ThunkApiConfig>\r\n }\r\n>\r\n\r\nexport type AsyncThunkPendingActionCreator<\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [string, ThunkArg, GetPendingMeta<ThunkApiConfig>?],\r\n undefined,\r\n string,\r\n never,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'pending'\r\n } & GetPendingMeta<ThunkApiConfig>\r\n>\r\n\r\nexport type AsyncThunkRejectedActionCreator<\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [\r\n Error | null,\r\n string,\r\n ThunkArg,\r\n GetRejectValue<ThunkApiConfig>?,\r\n GetRejectedMeta<ThunkApiConfig>?\r\n ],\r\n GetRejectValue<ThunkApiConfig> | undefined,\r\n string,\r\n GetSerializedErrorType<ThunkApiConfig>,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'rejected'\r\n aborted: boolean\r\n condition: boolean\r\n } & (\r\n | ({ rejectedWithValue: false } & {\r\n [K in keyof GetRejectedMeta<ThunkApiConfig>]?: undefined\r\n })\r\n | ({ rejectedWithValue: true } & GetRejectedMeta<ThunkApiConfig>)\r\n )\r\n>\r\n\r\nexport type AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [Returned, string, ThunkArg, GetFulfilledMeta<ThunkApiConfig>?],\r\n Returned,\r\n string,\r\n never,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'fulfilled'\r\n } & GetFulfilledMeta<ThunkApiConfig>\r\n>\r\n\r\n/**\r\n * A type describing the return value of `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunk<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = AsyncThunkActionCreator<Returned, ThunkArg, ThunkApiConfig> & {\r\n pending: AsyncThunkPendingActionCreator<ThunkArg, ThunkApiConfig>\r\n rejected: AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>\r\n fulfilled: AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n >\r\n typePrefix: string\r\n}\r\n\r\n/**\r\n *\r\n * @param typePrefix\r\n * @param payloadCreator\r\n * @param options\r\n *\r\n * @public\r\n */\r\nexport function createAsyncThunk<\r\n Returned,\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n>(\r\n typePrefix: string,\r\n payloadCreator: AsyncThunkPayloadCreator<Returned, ThunkArg, ThunkApiConfig>,\r\n options?: AsyncThunkOptions<ThunkArg, ThunkApiConfig>\r\n): AsyncThunk<Returned, ThunkArg, ThunkApiConfig> {\r\n type RejectedValue = GetRejectValue<ThunkApiConfig>\r\n type PendingMeta = GetPendingMeta<ThunkApiConfig>\r\n type FulfilledMeta = GetFulfilledMeta<ThunkApiConfig>\r\n type RejectedMeta = GetRejectedMeta<ThunkApiConfig>\r\n\r\n const fulfilled: AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n > = createAction(\r\n typePrefix + '/fulfilled',\r\n (\r\n payload: Returned,\r\n requestId: string,\r\n arg: ThunkArg,\r\n meta?: FulfilledMeta\r\n ) => ({\r\n payload,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n requestStatus: 'fulfilled' as const,\r\n },\r\n })\r\n )\r\n\r\n const pending: AsyncThunkPendingActionCreator<ThunkArg, ThunkApiConfig> =\r\n createAction(\r\n typePrefix + '/pending',\r\n (requestId: string, arg: ThunkArg, meta?: PendingMeta) => ({\r\n payload: undefined,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n requestStatus: 'pending' as const,\r\n },\r\n })\r\n )\r\n\r\n const rejected: AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig> =\r\n createAction(\r\n typePrefix + '/rejected',\r\n (\r\n error: Error | null,\r\n requestId: string,\r\n arg: ThunkArg,\r\n payload?: RejectedValue,\r\n meta?: RejectedMeta\r\n ) => ({\r\n payload,\r\n error: ((options && options.serializeError) || miniSerializeError)(\r\n error || 'Rejected'\r\n ) as GetSerializedErrorType<ThunkApiConfig>,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n rejectedWithValue: !!payload,\r\n requestStatus: 'rejected' as const,\r\n aborted: error?.name === 'AbortError',\r\n condition: error?.name === 'ConditionError',\r\n },\r\n })\r\n )\r\n\r\n let displayedWarning = false\r\n\r\n const AC =\r\n typeof AbortController !== 'undefined'\r\n ? AbortController\r\n : class implements AbortController {\r\n signal: AbortSignal = {\r\n aborted: false,\r\n addEventListener() {},\r\n dispatchEvent() {\r\n return false\r\n },\r\n onabort() {},\r\n removeEventListener() {},\r\n }\r\n abort() {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (!displayedWarning) {\r\n displayedWarning = true\r\n console.info(\r\n `This platform does not implement AbortController. \r\nIf you want to use the AbortController to react to \\`abort\\` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.`\r\n )\r\n }\r\n }\r\n }\r\n }\r\n\r\n function actionCreator(\r\n arg: ThunkArg\r\n ): AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> {\r\n return (dispatch, getState, extra) => {\r\n const requestId = (options?.idGenerator ?? nanoid)()\r\n\r\n const abortController = new AC()\r\n let abortReason: string | undefined\r\n\r\n const abortedPromise = new Promise<never>((_, reject) =>\r\n abortController.signal.addEventListener('abort', () =>\r\n reject({ name: 'AbortError', message: abortReason || 'Aborted' })\r\n )\r\n )\r\n\r\n let started = false\r\n function abort(reason?: string) {\r\n if (started) {\r\n abortReason = reason\r\n abortController.abort()\r\n }\r\n }\r\n\r\n const promise = (async function () {\r\n let finalAction: ReturnType<typeof fulfilled | typeof rejected>\r\n try {\r\n if (\r\n options &&\r\n options.condition &&\r\n options.condition(arg, { getState, extra }) === false\r\n ) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw {\r\n name: 'ConditionError',\r\n message: 'Aborted due to condition callback returning false.',\r\n }\r\n }\r\n started = true\r\n dispatch(\r\n pending(\r\n requestId,\r\n arg,\r\n options?.getPendingMeta?.({ requestId, arg }, { getState, extra })\r\n )\r\n )\r\n finalAction = await Promise.race([\r\n abortedPromise,\r\n Promise.resolve(\r\n payloadCreator(arg, {\r\n dispatch,\r\n getState,\r\n extra,\r\n requestId,\r\n signal: abortController.signal,\r\n rejectWithValue: ((\r\n value: RejectedValue,\r\n meta?: RejectedMeta\r\n ) => {\r\n return new RejectWithValue(value, meta)\r\n }) as any,\r\n fulfillWithValue: ((value: unknown, meta?: FulfilledMeta) => {\r\n return new FulfillWithMeta(value, meta)\r\n }) as any,\r\n })\r\n ).then((result) => {\r\n if (result instanceof RejectWithValue) {\r\n throw result\r\n }\r\n if (result instanceof FulfillWithMeta) {\r\n return fulfilled(result.payload, requestId, arg, result.meta)\r\n }\r\n return fulfilled(result as any, requestId, arg)\r\n }),\r\n ])\r\n } catch (err) {\r\n finalAction =\r\n err instanceof RejectWithValue\r\n ? rejected(null, requestId, arg, err.payload, err.meta)\r\n : rejected(err as any, requestId, arg)\r\n }\r\n // We dispatch the result action _after_ the catch, to avoid having any errors\r\n // here get swallowed by the try/catch block,\r\n // per https://twitter.com/dan_abramov/status/770914221638942720\r\n // and https://github.com/reduxjs/redux-toolkit/blob/e85eb17b39a2118d859f7b7746e0f3fee523e089/docs/tutorials/advanced-tutorial.md#async-error-handling-logic-in-thunks\r\n\r\n const skipDispatch =\r\n options &&\r\n !options.dispatchConditionRejection &&\r\n rejected.match(finalAction) &&\r\n (finalAction as any).meta.condition\r\n\r\n if (!skipDispatch) {\r\n dispatch(finalAction)\r\n }\r\n return finalAction\r\n })()\r\n return Object.assign(promise as Promise<any>, {\r\n abort,\r\n requestId,\r\n arg,\r\n unwrap() {\r\n return promise.then<any>(unwrapResult)\r\n },\r\n })\r\n }\r\n }\r\n\r\n return Object.assign(\r\n actionCreator as AsyncThunkActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n >,\r\n {\r\n pending,\r\n rejected,\r\n fulfilled,\r\n typePrefix,\r\n }\r\n )\r\n}\r\n\r\ninterface UnwrappableAction {\r\n payload: any\r\n meta?: any\r\n error?: any\r\n}\r\n\r\ntype UnwrappedActionPayload<T extends UnwrappableAction> = Exclude<\r\n T,\r\n { error: any }\r\n>['payload']\r\n\r\n/**\r\n * @public\r\n */\r\nexport function unwrapResult<R extends UnwrappableAction>(\r\n action: R\r\n): UnwrappedActionPayload<R> {\r\n if (action.meta && action.meta.rejectedWithValue) {\r\n throw action.payload\r\n }\r\n if (action.error) {\r\n throw action.error\r\n }\r\n return action.payload\r\n}\r\n\r\ntype WithStrictNullChecks<True, False> = undefined extends boolean\r\n ? False\r\n : True\r\n","import type { Middleware } from 'redux'\r\n\r\n/**\r\n * return True if T is `any`, otherwise return False\r\n * taken from https://github.com/joonhocho/tsdef\r\n *\r\n * @internal\r\n */\r\nexport type IsAny<T, True, False = never> =\r\n // test if we are going the left AND right path in the condition\r\n true | false extends (T extends never ? true : false) ? True : False\r\n\r\n/**\r\n * return True if T is `unknown`, otherwise return False\r\n * taken from https://github.com/joonhocho/tsdef\r\n *\r\n * @internal\r\n */\r\nexport type IsUnknown<T, True, False = never> = unknown extends T\r\n ? IsAny<T, False, True>\r\n : False\r\n\r\nexport type FallbackIfUnknown<T, Fallback> = IsUnknown<T, Fallback, T>\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IfMaybeUndefined<P, True, False> = [undefined] extends [P]\r\n ? True\r\n : False\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IfVoid<P, True, False> = [void] extends [P] ? True : False\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IsEmptyObj<T, True, False = never> = T extends any\r\n ? keyof T extends never\r\n ? IsUnknown<T, False, IfMaybeUndefined<T, False, IfVoid<T, False, True>>>\r\n : False\r\n : never\r\n\r\n/**\r\n * returns True if TS version is above 3.5, False if below.\r\n * uses feature detection to detect TS version >= 3.5\r\n * * versions below 3.5 will return `{}` for unresolvable interference\r\n * * versions above will return `unknown`\r\n *\r\n * @internal\r\n */\r\nexport type AtLeastTS35<True, False> = [True, False][IsUnknown<\r\n ReturnType<<T>() => T>,\r\n 0,\r\n 1\r\n>]\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IsUnknownOrNonInferrable<T, True, False> = AtLeastTS35<\r\n IsUnknown<T, True, False>,\r\n IsEmptyObj<T, True, IsUnknown<T, True, False>>\r\n>\r\n\r\n/**\r\n * Combines all dispatch signatures of all middlewares in the array `M` into\r\n * one intersected dispatch signature.\r\n */\r\nexport type DispatchForMiddlewares<M> = M extends ReadonlyArray<any>\r\n ? UnionToIntersection<\r\n M[number] extends infer MiddlewareValues\r\n ? MiddlewareValues extends Middleware<infer DispatchExt, any, any>\r\n ? DispatchExt extends Function\r\n ? IsAny<DispatchExt, never, DispatchExt>\r\n : never\r\n : never\r\n : never\r\n >\r\n : never\r\n\r\n/**\r\n * Convert a Union type `(A|B)` to an intersection type `(A&B)`\r\n */\r\nexport type UnionToIntersection<U> = (\r\n U extends any ? (k: U) => void : never\r\n) extends (k: infer I) => void\r\n ? I\r\n : never\r\n\r\n/**\r\n * Helper type. Passes T out again, but boxes it in a way that it cannot\r\n * \"widen\" the type by accident if it is a generic that should be inferred\r\n * from elsewhere.\r\n *\r\n * @internal\r\n */\r\nexport type NoInfer<T> = [T][T extends any ? 0 : never]\r\n\r\nexport type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>\r\n\r\nexport interface HasMatchFunction<T> {\r\n match: (v: any) => v is T\r\n}\r\n\r\nexport const hasMatchFunction = <T>(\r\n v: Matcher<T>\r\n): v is HasMatchFunction<T> => {\r\n return v && typeof (v as HasMatchFunction<T>).match === 'function'\r\n}\r\n\r\n/** @public */\r\nexport type Matcher<T> = HasMatchFunction<T> | ((v: any) => v is T)\r\n\r\n/** @public */\r\nexport type ActionFromMatcher<M extends Matcher<any>> = M extends Matcher<\r\n infer T\r\n>\r\n ? T\r\n : never\r\n","import type {\r\n ActionFromMatcher,\r\n Matcher,\r\n UnionToIntersection,\r\n} from './tsHelpers'\r\nimport { hasMatchFunction } from './tsHelpers'\r\nimport type {\r\n AsyncThunk,\r\n AsyncThunkFulfilledActionCreator,\r\n AsyncThunkPendingActionCreator,\r\n AsyncThunkRejectedActionCreator,\r\n} from './createAsyncThunk'\r\n\r\n/** @public */\r\nexport type ActionMatchingAnyOf<\r\n Matchers extends [Matcher<any>, ...Matcher<any>[]]\r\n> = ActionFromMatcher<Matchers[number]>\r\n\r\n/** @public */\r\nexport type ActionMatchingAllOf<\r\n Matchers extends [Matcher<any>, ...Matcher<any>[]]\r\n> = UnionToIntersection<ActionMatchingAnyOf<Matchers>>\r\n\r\nconst matches = (matcher: Matcher<any>, action: any) => {\r\n if (hasMatchFunction(matcher)) {\r\n return matcher.match(action)\r\n } else {\r\n return matcher(action)\r\n }\r\n}\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action matches any one of the supplied type guards or action\r\n * creators.\r\n *\r\n * @param matchers The type guards or action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAnyOf<Matchers extends [Matcher<any>, ...Matcher<any>[]]>(\r\n ...matchers: Matchers\r\n) {\r\n return (action: any): action is ActionMatchingAnyOf<Matchers> => {\r\n return matchers.some((matcher) => matches(matcher, action))\r\n }\r\n}\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action matches all of the supplied type guards or action\r\n * creators.\r\n *\r\n * @param matchers The type guards or action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAllOf<Matchers extends [Matcher<any>, ...Matcher<any>[]]>(\r\n ...matchers: Matchers\r\n) {\r\n return (action: any): action is ActionMatchingAllOf<Matchers> => {\r\n return matchers.every((matcher) => matches(matcher, action))\r\n }\r\n}\r\n\r\n/**\r\n * @param action A redux action\r\n * @param validStatus An array of valid meta.requestStatus values\r\n *\r\n * @internal\r\n */\r\nexport function hasExpectedRequestMetadata(\r\n action: any,\r\n validStatus: readonly string[]\r\n) {\r\n if (!action || !action.meta) return false\r\n\r\n const hasValidRequestId = typeof action.meta.requestId === 'string'\r\n const hasValidRequestStatus =\r\n validStatus.indexOf(action.meta.requestStatus) > -1\r\n\r\n return hasValidRequestId && hasValidRequestStatus\r\n}\r\n\r\nfunction isAsyncThunkArray(a: [any] | AnyAsyncThunk[]): a is AnyAsyncThunk[] {\r\n return (\r\n typeof a[0] === 'function' &&\r\n 'pending' in a[0] &&\r\n 'fulfilled' in a[0] &&\r\n 'rejected' in a[0]\r\n )\r\n}\r\n\r\nexport type UnknownAsyncThunkPendingAction = ReturnType<\r\n AsyncThunkPendingActionCreator<unknown>\r\n>\r\n\r\nexport type PendingActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['pending']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is pending.\r\n *\r\n * @public\r\n */\r\nexport function isPending(): (\r\n action: any\r\n) => action is UnknownAsyncThunkPendingAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is pending.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isPending<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is PendingActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a pending thunk action\r\n * @public\r\n */\r\nexport function isPending(action: any): action is UnknownAsyncThunkPendingAction\r\nexport function isPending<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['pending'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isPending()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is PendingActionFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.pending\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkRejectedAction = ReturnType<\r\n AsyncThunkRejectedActionCreator<unknown, unknown>\r\n>\r\n\r\nexport type RejectedActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['rejected']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is rejected.\r\n *\r\n * @public\r\n */\r\nexport function isRejected(): (\r\n action: any\r\n) => action is UnknownAsyncThunkRejectedAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is rejected.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isRejected<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is RejectedActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a rejected thunk action\r\n * @public\r\n */\r\nexport function isRejected(\r\n action: any\r\n): action is UnknownAsyncThunkRejectedAction\r\nexport function isRejected<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['rejected'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejected()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is RejectedActionFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.rejected\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkRejectedWithValueAction = ReturnType<\r\n AsyncThunkRejectedActionCreator<unknown, unknown>\r\n>\r\n\r\nexport type RejectedWithValueActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['rejected']> &\r\n (T extends AsyncThunk<any, any, { rejectValue: infer RejectedValue }>\r\n ? { payload: RejectedValue }\r\n : unknown)\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is rejected with value.\r\n *\r\n * @public\r\n */\r\nexport function isRejectedWithValue(): (\r\n action: any\r\n) => action is UnknownAsyncThunkRejectedAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is rejected with value.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isRejectedWithValue<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (\r\n action: any\r\n) => action is RejectedWithValueActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a rejected thunk action with value\r\n * @public\r\n */\r\nexport function isRejectedWithValue(\r\n action: any\r\n): action is UnknownAsyncThunkRejectedAction\r\nexport function isRejectedWithValue<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n const hasFlag = (action: any): action is any => {\r\n return action && action.meta && action.meta.rejectedWithValue\r\n }\r\n\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => {\r\n const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag)\r\n\r\n return combinedMatcher(action)\r\n }\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejectedWithValue()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is RejectedActionFromAsyncThunk<AsyncThunks[number]> => {\r\n const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkFulfilledAction = ReturnType<\r\n AsyncThunkFulfilledActionCreator<unknown, unknown>\r\n>\r\n\r\nexport type FulfilledActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['fulfilled']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is fulfilled.\r\n *\r\n * @public\r\n */\r\nexport function isFulfilled(): (\r\n action: any\r\n) => action is UnknownAsyncThunkFulfilledAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is fulfilled.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isFulfilled<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is FulfilledActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a fulfilled thunk action\r\n * @public\r\n */\r\nexport function isFulfilled(\r\n action: any\r\n): action is UnknownAsyncThunkFulfilledAction\r\nexport function isFulfilled<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['fulfilled'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isFulfilled()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is FulfilledActionFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.fulfilled\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkAction =\r\n | UnknownAsyncThunkPendingAction\r\n | UnknownAsyncThunkRejectedAction\r\n | UnknownAsyncThunkFulfilledAction\r\n\r\nexport type AnyAsyncThunk = {\r\n pending: { match: (action: any) => action is any }\r\n fulfilled: { match: (action: any) => action is any }\r\n rejected: { match: (action: any) => action is any }\r\n}\r\n\r\nexport type ActionsFromAsyncThunk<T extends AnyAsyncThunk> =\r\n | ActionFromMatcher<T['pending']>\r\n | ActionFromMatcher<T['fulfilled']>\r\n | ActionFromMatcher<T['rejected']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator.\r\n *\r\n * @public\r\n */\r\nexport function isAsyncThunkAction(): (\r\n action: any\r\n) => action is UnknownAsyncThunkAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAsyncThunkAction<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is ActionsFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a thunk action\r\n * @public\r\n */\r\nexport function isAsyncThunkAction(\r\n action: any\r\n): action is UnknownAsyncThunkAction\r\nexport function isAsyncThunkAction<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) =>\r\n hasExpectedRequestMetadata(action, ['pending', 'fulfilled', 'rejected'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isAsyncThunkAction()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is ActionsFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = [] as any\r\n\r\n for (const asyncThunk of asyncThunks) {\r\n matchers.push(\r\n asyncThunk.pending,\r\n asyncThunk.rejected,\r\n asyncThunk.fulfilled\r\n )\r\n }\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n"]}
|
||
diff --git a/dist/redux-toolkit.esm.js b/dist/redux-toolkit.esm.js
|
||
deleted file mode 100644
|
||
index ee9d32c5fcdec97f69fbf895f615cbaf3a8c9423..0000000000000000000000000000000000000000
|
||
--- a/dist/redux-toolkit.esm.js
|
||
+++ /dev/null
|
||
@@ -1,1315 +0,0 @@
|
||
-var __extends = (this && this.__extends) || (function () {
|
||
- var extendStatics = function (d, b) {
|
||
- extendStatics = Object.setPrototypeOf ||
|
||
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||
- return extendStatics(d, b);
|
||
- };
|
||
- return function (d, b) {
|
||
- if (typeof b !== "function" && b !== null)
|
||
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||
- extendStatics(d, b);
|
||
- function __() { this.constructor = d; }
|
||
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
- };
|
||
-})();
|
||
-var __generator = (this && this.__generator) || function (thisArg, body) {
|
||
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||
- function verb(n) { return function (v) { return step([n, v]); }; }
|
||
- function step(op) {
|
||
- if (f) throw new TypeError("Generator is already executing.");
|
||
- while (_) try {
|
||
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||
- if (y = 0, t) op = [op[0] & 2, t.value];
|
||
- switch (op[0]) {
|
||
- case 0: case 1: t = op; break;
|
||
- case 4: _.label++; return { value: op[1], done: false };
|
||
- case 5: _.label++; y = op[1]; op = [0]; continue;
|
||
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||
- default:
|
||
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||
- if (t[2]) _.ops.pop();
|
||
- _.trys.pop(); continue;
|
||
- }
|
||
- op = body.call(thisArg, _);
|
||
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||
- }
|
||
-};
|
||
-var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
||
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
||
- to[j] = from[i];
|
||
- return to;
|
||
-};
|
||
-var __defProp = Object.defineProperty;
|
||
-var __defProps = Object.defineProperties;
|
||
-var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
||
-var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
||
-var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||
-var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
||
-var __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; };
|
||
-var __spreadValues = function (a, b) {
|
||
- for (var prop in b || (b = {}))
|
||
- if (__hasOwnProp.call(b, prop))
|
||
- __defNormalProp(a, prop, b[prop]);
|
||
- if (__getOwnPropSymbols)
|
||
- for (var _i = 0, _b = __getOwnPropSymbols(b); _i < _b.length; _i++) {
|
||
- var prop = _b[_i];
|
||
- if (__propIsEnum.call(b, prop))
|
||
- __defNormalProp(a, prop, b[prop]);
|
||
- }
|
||
- return a;
|
||
-};
|
||
-var __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); };
|
||
-var __async = function (__this, __arguments, generator) {
|
||
- return new Promise(function (resolve, reject) {
|
||
- var fulfilled = function (value) {
|
||
- try {
|
||
- step(generator.next(value));
|
||
- }
|
||
- catch (e) {
|
||
- reject(e);
|
||
- }
|
||
- };
|
||
- var rejected = function (value) {
|
||
- try {
|
||
- step(generator.throw(value));
|
||
- }
|
||
- catch (e) {
|
||
- reject(e);
|
||
- }
|
||
- };
|
||
- var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); };
|
||
- step((generator = generator.apply(__this, __arguments)).next());
|
||
- });
|
||
-};
|
||
-// src/index.ts
|
||
-import { enableES5 } from "immer";
|
||
-export * from "redux";
|
||
-import { default as default2, current as current2, freeze, original, isDraft as isDraft4 } from "immer";
|
||
-import { createSelector as createSelector2 } from "reselect";
|
||
-// src/createDraftSafeSelector.ts
|
||
-import { current, isDraft } from "immer";
|
||
-import { createSelector } from "reselect";
|
||
-var createDraftSafeSelector = function () {
|
||
- var args = [];
|
||
- for (var _i = 0; _i < arguments.length; _i++) {
|
||
- args[_i] = arguments[_i];
|
||
- }
|
||
- var selector = createSelector.apply(void 0, args);
|
||
- var wrappedSelector = function (value) {
|
||
- var rest = [];
|
||
- for (var _i = 1; _i < arguments.length; _i++) {
|
||
- rest[_i - 1] = arguments[_i];
|
||
- }
|
||
- return selector.apply(void 0, __spreadArray([isDraft(value) ? current(value) : value], rest));
|
||
- };
|
||
- return wrappedSelector;
|
||
-};
|
||
-// src/configureStore.ts
|
||
-import { createStore, compose as compose2, applyMiddleware, combineReducers } from "redux";
|
||
-// src/devtoolsExtension.ts
|
||
-import { compose } from "redux";
|
||
-var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () {
|
||
- if (arguments.length === 0)
|
||
- return void 0;
|
||
- if (typeof arguments[0] === "object")
|
||
- return compose;
|
||
- return compose.apply(null, arguments);
|
||
-};
|
||
-var devToolsEnhancer = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () {
|
||
- return function (noop) {
|
||
- return noop;
|
||
- };
|
||
-};
|
||
-// src/isPlainObject.ts
|
||
-function isPlainObject(value) {
|
||
- if (typeof value !== "object" || value === null)
|
||
- return false;
|
||
- var proto = value;
|
||
- while (Object.getPrototypeOf(proto) !== null) {
|
||
- proto = Object.getPrototypeOf(proto);
|
||
- }
|
||
- return Object.getPrototypeOf(value) === proto;
|
||
-}
|
||
-// src/getDefaultMiddleware.ts
|
||
-import thunkMiddleware from "redux-thunk";
|
||
-// src/utils.ts
|
||
-function getTimeMeasureUtils(maxDelay, fnName) {
|
||
- var elapsed = 0;
|
||
- return {
|
||
- measureTime: function (fn) {
|
||
- var started = Date.now();
|
||
- try {
|
||
- return fn();
|
||
- }
|
||
- finally {
|
||
- var finished = Date.now();
|
||
- elapsed += finished - started;
|
||
- }
|
||
- },
|
||
- warnIfExceeded: function () {
|
||
- if (elapsed > maxDelay) {
|
||
- console.warn(fnName + " took " + elapsed + "ms, which is more than the warning threshold of " + maxDelay + "ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.");
|
||
- }
|
||
- }
|
||
- };
|
||
-}
|
||
-var MiddlewareArray = /** @class */ (function (_super) {
|
||
- __extends(MiddlewareArray, _super);
|
||
- function MiddlewareArray() {
|
||
- var args = [];
|
||
- for (var _i = 0; _i < arguments.length; _i++) {
|
||
- args[_i] = arguments[_i];
|
||
- }
|
||
- var _this = _super.apply(this, args) || this;
|
||
- Object.setPrototypeOf(_this, MiddlewareArray.prototype);
|
||
- return _this;
|
||
- }
|
||
- Object.defineProperty(MiddlewareArray, Symbol.species, {
|
||
- get: function () {
|
||
- return MiddlewareArray;
|
||
- },
|
||
- enumerable: false,
|
||
- configurable: true
|
||
- });
|
||
- MiddlewareArray.prototype.concat = function () {
|
||
- var arr = [];
|
||
- for (var _i = 0; _i < arguments.length; _i++) {
|
||
- arr[_i] = arguments[_i];
|
||
- }
|
||
- return _super.prototype.concat.apply(this, arr);
|
||
- };
|
||
- MiddlewareArray.prototype.prepend = function () {
|
||
- var arr = [];
|
||
- for (var _i = 0; _i < arguments.length; _i++) {
|
||
- arr[_i] = arguments[_i];
|
||
- }
|
||
- if (arr.length === 1 && Array.isArray(arr[0])) {
|
||
- return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))();
|
||
- }
|
||
- return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))();
|
||
- };
|
||
- return MiddlewareArray;
|
||
-}(Array));
|
||
-// src/immutableStateInvariantMiddleware.ts
|
||
-var isProduction = process.env.NODE_ENV === "production";
|
||
-var prefix = "Invariant failed";
|
||
-function invariant(condition, message) {
|
||
- if (condition) {
|
||
- return;
|
||
- }
|
||
- if (isProduction) {
|
||
- throw new Error(prefix);
|
||
- }
|
||
- throw new Error(prefix + ": " + (message || ""));
|
||
-}
|
||
-function stringify(obj, serializer, indent, decycler) {
|
||
- return JSON.stringify(obj, getSerialize(serializer, decycler), indent);
|
||
-}
|
||
-function getSerialize(serializer, decycler) {
|
||
- var stack = [], keys = [];
|
||
- if (!decycler)
|
||
- decycler = function (_, value) {
|
||
- if (stack[0] === value)
|
||
- return "[Circular ~]";
|
||
- return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]";
|
||
- };
|
||
- return function (key, value) {
|
||
- if (stack.length > 0) {
|
||
- var thisPos = stack.indexOf(this);
|
||
- ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
|
||
- ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
|
||
- if (~stack.indexOf(value))
|
||
- value = decycler.call(this, key, value);
|
||
- }
|
||
- else
|
||
- stack.push(value);
|
||
- return serializer == null ? value : serializer.call(this, key, value);
|
||
- };
|
||
-}
|
||
-function isImmutableDefault(value) {
|
||
- return typeof value !== "object" || value === null || typeof value === "undefined" || Object.isFrozen(value);
|
||
-}
|
||
-function trackForMutations(isImmutable, ignorePaths, obj) {
|
||
- var trackedProperties = trackProperties(isImmutable, ignorePaths, obj);
|
||
- return {
|
||
- detectMutations: function () {
|
||
- return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);
|
||
- }
|
||
- };
|
||
-}
|
||
-function trackProperties(isImmutable, ignorePaths, obj, path) {
|
||
- if (ignorePaths === void 0) { ignorePaths = []; }
|
||
- if (path === void 0) { path = ""; }
|
||
- var tracked = { value: obj };
|
||
- if (!isImmutable(obj)) {
|
||
- tracked.children = {};
|
||
- for (var key in obj) {
|
||
- var childPath = path ? path + "." + key : key;
|
||
- if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
|
||
- continue;
|
||
- }
|
||
- tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);
|
||
- }
|
||
- }
|
||
- return tracked;
|
||
-}
|
||
-function detectMutations(isImmutable, ignorePaths, trackedProperty, obj, sameParentRef, path) {
|
||
- if (ignorePaths === void 0) { ignorePaths = []; }
|
||
- if (sameParentRef === void 0) { sameParentRef = false; }
|
||
- if (path === void 0) { path = ""; }
|
||
- var prevObj = trackedProperty ? trackedProperty.value : void 0;
|
||
- var sameRef = prevObj === obj;
|
||
- if (sameParentRef && !sameRef && !Number.isNaN(obj)) {
|
||
- return { wasMutated: true, path: path };
|
||
- }
|
||
- if (isImmutable(prevObj) || isImmutable(obj)) {
|
||
- return { wasMutated: false };
|
||
- }
|
||
- var keysToDetect = {};
|
||
- for (var key in trackedProperty.children) {
|
||
- keysToDetect[key] = true;
|
||
- }
|
||
- for (var key in obj) {
|
||
- keysToDetect[key] = true;
|
||
- }
|
||
- for (var key in keysToDetect) {
|
||
- var childPath = path ? path + "." + key : key;
|
||
- if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
|
||
- continue;
|
||
- }
|
||
- var result = detectMutations(isImmutable, ignorePaths, trackedProperty.children[key], obj[key], sameRef, childPath);
|
||
- if (result.wasMutated) {
|
||
- return result;
|
||
- }
|
||
- }
|
||
- return { wasMutated: false };
|
||
-}
|
||
-function createImmutableStateInvariantMiddleware(options) {
|
||
- if (options === void 0) { options = {}; }
|
||
- if (process.env.NODE_ENV === "production") {
|
||
- return function () { return function (next) { return function (action) { return next(action); }; }; };
|
||
- }
|
||
- var _b = options.isImmutable, isImmutable = _b === void 0 ? isImmutableDefault : _b, ignoredPaths = options.ignoredPaths, _c = options.warnAfter, warnAfter = _c === void 0 ? 32 : _c, ignore = options.ignore;
|
||
- ignoredPaths = ignoredPaths || ignore;
|
||
- var track = trackForMutations.bind(null, isImmutable, ignoredPaths);
|
||
- return function (_b) {
|
||
- var getState = _b.getState;
|
||
- var state = getState();
|
||
- var tracker = track(state);
|
||
- var result;
|
||
- return function (next) { return function (action) {
|
||
- var measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware");
|
||
- measureUtils.measureTime(function () {
|
||
- state = getState();
|
||
- result = tracker.detectMutations();
|
||
- tracker = track(state);
|
||
- invariant(!result.wasMutated, "A state mutation was detected between dispatches, in the path '" + (result.path || "") + "'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)");
|
||
- });
|
||
- var dispatchedAction = next(action);
|
||
- measureUtils.measureTime(function () {
|
||
- state = getState();
|
||
- result = tracker.detectMutations();
|
||
- tracker = track(state);
|
||
- result.wasMutated && invariant(!result.wasMutated, "A state mutation was detected inside a dispatch, in the path: " + (result.path || "") + ". Take a look at the reducer(s) handling the action " + stringify(action) + ". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)");
|
||
- });
|
||
- measureUtils.warnIfExceeded();
|
||
- return dispatchedAction;
|
||
- }; };
|
||
- };
|
||
-}
|
||
-// src/serializableStateInvariantMiddleware.ts
|
||
-function isPlain(val) {
|
||
- var type = typeof val;
|
||
- return type === "undefined" || val === null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val);
|
||
-}
|
||
-function findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths) {
|
||
- if (path === void 0) { path = ""; }
|
||
- if (isSerializable === void 0) { isSerializable = isPlain; }
|
||
- if (ignoredPaths === void 0) { ignoredPaths = []; }
|
||
- var foundNestedSerializable;
|
||
- if (!isSerializable(value)) {
|
||
- return {
|
||
- keyPath: path || "<root>",
|
||
- value: value
|
||
- };
|
||
- }
|
||
- if (typeof value !== "object" || value === null) {
|
||
- return false;
|
||
- }
|
||
- var entries = getEntries != null ? getEntries(value) : Object.entries(value);
|
||
- var hasIgnoredPaths = ignoredPaths.length > 0;
|
||
- for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
|
||
- var _b = entries_1[_i], key = _b[0], nestedValue = _b[1];
|
||
- var nestedPath = path ? path + "." + key : key;
|
||
- if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) {
|
||
- continue;
|
||
- }
|
||
- if (!isSerializable(nestedValue)) {
|
||
- return {
|
||
- keyPath: nestedPath,
|
||
- value: nestedValue
|
||
- };
|
||
- }
|
||
- if (typeof nestedValue === "object") {
|
||
- foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths);
|
||
- if (foundNestedSerializable) {
|
||
- return foundNestedSerializable;
|
||
- }
|
||
- }
|
||
- }
|
||
- return false;
|
||
-}
|
||
-function createSerializableStateInvariantMiddleware(options) {
|
||
- if (options === void 0) { options = {}; }
|
||
- if (process.env.NODE_ENV === "production") {
|
||
- return function () { return function (next) { return function (action) { return next(action); }; }; };
|
||
- }
|
||
- var _b = options.isSerializable, isSerializable = _b === void 0 ? isPlain : _b, getEntries = options.getEntries, _c = options.ignoredActions, ignoredActions = _c === void 0 ? [] : _c, _d = options.ignoredActionPaths, ignoredActionPaths = _d === void 0 ? ["meta.arg", "meta.baseQueryMeta"] : _d, _e = options.ignoredPaths, ignoredPaths = _e === void 0 ? [] : _e, _f = options.warnAfter, warnAfter = _f === void 0 ? 32 : _f, _g = options.ignoreState, ignoreState = _g === void 0 ? false : _g;
|
||
- return function (storeAPI) { return function (next) { return function (action) {
|
||
- if (ignoredActions.length && ignoredActions.indexOf(action.type) !== -1) {
|
||
- return next(action);
|
||
- }
|
||
- var measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware");
|
||
- measureUtils.measureTime(function () {
|
||
- var foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths);
|
||
- if (foundActionNonSerializableValue) {
|
||
- var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value;
|
||
- console.error("A non-serializable value was detected in an action, in the path: `" + keyPath + "`. Value:", value, "\nTake a look at the logic that dispatched this action: ", action, "\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)", "\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)");
|
||
- }
|
||
- });
|
||
- var result = next(action);
|
||
- if (!ignoreState) {
|
||
- measureUtils.measureTime(function () {
|
||
- var state = storeAPI.getState();
|
||
- var foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths);
|
||
- if (foundStateNonSerializableValue) {
|
||
- var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value;
|
||
- console.error("A non-serializable value was detected in the state, in the path: `" + keyPath + "`. Value:", value, "\nTake a look at the reducer(s) handling this action type: " + action.type + ".\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)");
|
||
- }
|
||
- });
|
||
- measureUtils.warnIfExceeded();
|
||
- }
|
||
- return result;
|
||
- }; }; };
|
||
-}
|
||
-// src/getDefaultMiddleware.ts
|
||
-function isBoolean(x) {
|
||
- return typeof x === "boolean";
|
||
-}
|
||
-function curryGetDefaultMiddleware() {
|
||
- return function curriedGetDefaultMiddleware(options) {
|
||
- return getDefaultMiddleware(options);
|
||
- };
|
||
-}
|
||
-function getDefaultMiddleware(options) {
|
||
- if (options === void 0) { options = {}; }
|
||
- var _b = options.thunk, thunk = _b === void 0 ? true : _b, _c = options.immutableCheck, immutableCheck = _c === void 0 ? true : _c, _d = options.serializableCheck, serializableCheck = _d === void 0 ? true : _d;
|
||
- var middlewareArray = new MiddlewareArray();
|
||
- if (thunk) {
|
||
- if (isBoolean(thunk)) {
|
||
- middlewareArray.push(thunkMiddleware);
|
||
- }
|
||
- else {
|
||
- middlewareArray.push(thunkMiddleware.withExtraArgument(thunk.extraArgument));
|
||
- }
|
||
- }
|
||
- if (process.env.NODE_ENV !== "production") {
|
||
- if (immutableCheck) {
|
||
- var immutableOptions = {};
|
||
- if (!isBoolean(immutableCheck)) {
|
||
- immutableOptions = immutableCheck;
|
||
- }
|
||
- middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));
|
||
- }
|
||
- if (serializableCheck) {
|
||
- var serializableOptions = {};
|
||
- if (!isBoolean(serializableCheck)) {
|
||
- serializableOptions = serializableCheck;
|
||
- }
|
||
- middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));
|
||
- }
|
||
- }
|
||
- return middlewareArray;
|
||
-}
|
||
-// src/configureStore.ts
|
||
-var IS_PRODUCTION = process.env.NODE_ENV === "production";
|
||
-function configureStore(options) {
|
||
- var curriedGetDefaultMiddleware = curryGetDefaultMiddleware();
|
||
- var _b = options || {}, _c = _b.reducer, reducer = _c === void 0 ? void 0 : _c, _d = _b.middleware, middleware = _d === void 0 ? curriedGetDefaultMiddleware() : _d, _e = _b.devTools, devTools = _e === void 0 ? true : _e, _f = _b.preloadedState, preloadedState = _f === void 0 ? void 0 : _f, _g = _b.enhancers, enhancers = _g === void 0 ? void 0 : _g;
|
||
- var rootReducer;
|
||
- if (typeof reducer === "function") {
|
||
- rootReducer = reducer;
|
||
- }
|
||
- else if (isPlainObject(reducer)) {
|
||
- rootReducer = combineReducers(reducer);
|
||
- }
|
||
- else {
|
||
- throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');
|
||
- }
|
||
- var finalMiddleware = middleware;
|
||
- if (typeof finalMiddleware === "function") {
|
||
- finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware);
|
||
- if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {
|
||
- throw new Error("when using a middleware builder function, an array of middleware must be returned");
|
||
- }
|
||
- }
|
||
- if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== "function"; })) {
|
||
- throw new Error("each middleware provided to configureStore must be a function");
|
||
- }
|
||
- var middlewareEnhancer = applyMiddleware.apply(void 0, finalMiddleware);
|
||
- var finalCompose = compose2;
|
||
- if (devTools) {
|
||
- finalCompose = composeWithDevTools(__spreadValues({
|
||
- trace: !IS_PRODUCTION
|
||
- }, typeof devTools === "object" && devTools));
|
||
- }
|
||
- var storeEnhancers = [middlewareEnhancer];
|
||
- if (Array.isArray(enhancers)) {
|
||
- storeEnhancers = __spreadArray([middlewareEnhancer], enhancers);
|
||
- }
|
||
- else if (typeof enhancers === "function") {
|
||
- storeEnhancers = enhancers(storeEnhancers);
|
||
- }
|
||
- var composedEnhancer = finalCompose.apply(void 0, storeEnhancers);
|
||
- return createStore(rootReducer, preloadedState, composedEnhancer);
|
||
-}
|
||
-// src/createAction.ts
|
||
-function createAction(type, prepareAction) {
|
||
- function actionCreator() {
|
||
- var args = [];
|
||
- for (var _i = 0; _i < arguments.length; _i++) {
|
||
- args[_i] = arguments[_i];
|
||
- }
|
||
- if (prepareAction) {
|
||
- var prepared = prepareAction.apply(void 0, args);
|
||
- if (!prepared) {
|
||
- throw new Error("prepareAction did not return an object");
|
||
- }
|
||
- return __spreadValues(__spreadValues({
|
||
- type: type,
|
||
- payload: prepared.payload
|
||
- }, "meta" in prepared && { meta: prepared.meta }), "error" in prepared && { error: prepared.error });
|
||
- }
|
||
- return { type: type, payload: args[0] };
|
||
- }
|
||
- actionCreator.toString = function () { return "" + type; };
|
||
- actionCreator.type = type;
|
||
- actionCreator.match = function (action) { return action.type === type; };
|
||
- return actionCreator;
|
||
-}
|
||
-function isFSA(action) {
|
||
- return isPlainObject(action) && typeof action.type === "string" && Object.keys(action).every(isValidKey);
|
||
-}
|
||
-function isValidKey(key) {
|
||
- return ["type", "payload", "error", "meta"].indexOf(key) > -1;
|
||
-}
|
||
-function getType(actionCreator) {
|
||
- return "" + actionCreator;
|
||
-}
|
||
-// src/createReducer.ts
|
||
-import createNextState, { isDraft as isDraft2, isDraftable } from "immer";
|
||
-// src/mapBuilders.ts
|
||
-function executeReducerBuilderCallback(builderCallback) {
|
||
- var actionsMap = {};
|
||
- var actionMatchers = [];
|
||
- var defaultCaseReducer;
|
||
- var builder = {
|
||
- addCase: function (typeOrActionCreator, reducer) {
|
||
- if (process.env.NODE_ENV !== "production") {
|
||
- if (actionMatchers.length > 0) {
|
||
- throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");
|
||
- }
|
||
- if (defaultCaseReducer) {
|
||
- throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`");
|
||
- }
|
||
- }
|
||
- var type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
|
||
- if (type in actionsMap) {
|
||
- throw new Error("addCase cannot be called with two reducers for the same action type");
|
||
- }
|
||
- actionsMap[type] = reducer;
|
||
- return builder;
|
||
- },
|
||
- addMatcher: function (matcher, reducer) {
|
||
- if (process.env.NODE_ENV !== "production") {
|
||
- if (defaultCaseReducer) {
|
||
- throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
|
||
- }
|
||
- }
|
||
- actionMatchers.push({ matcher: matcher, reducer: reducer });
|
||
- return builder;
|
||
- },
|
||
- addDefaultCase: function (reducer) {
|
||
- if (process.env.NODE_ENV !== "production") {
|
||
- if (defaultCaseReducer) {
|
||
- throw new Error("`builder.addDefaultCase` can only be called once");
|
||
- }
|
||
- }
|
||
- defaultCaseReducer = reducer;
|
||
- return builder;
|
||
- }
|
||
- };
|
||
- builderCallback(builder);
|
||
- return [actionsMap, actionMatchers, defaultCaseReducer];
|
||
-}
|
||
-// src/createReducer.ts
|
||
-function createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) {
|
||
- if (actionMatchers === void 0) { actionMatchers = []; }
|
||
- var _b = typeof mapOrBuilderCallback === "function" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _b[0], finalActionMatchers = _b[1], finalDefaultCaseReducer = _b[2];
|
||
- var frozenInitialState = createNextState(initialState, function () {
|
||
- });
|
||
- return function (state, action) {
|
||
- if (state === void 0) { state = frozenInitialState; }
|
||
- var caseReducers = __spreadArray([
|
||
- actionsMap[action.type]
|
||
- ], finalActionMatchers.filter(function (_b) {
|
||
- var matcher = _b.matcher;
|
||
- return matcher(action);
|
||
- }).map(function (_b) {
|
||
- var reducer = _b.reducer;
|
||
- return reducer;
|
||
- }));
|
||
- if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) {
|
||
- caseReducers = [finalDefaultCaseReducer];
|
||
- }
|
||
- return caseReducers.reduce(function (previousState, caseReducer) {
|
||
- if (caseReducer) {
|
||
- if (isDraft2(previousState)) {
|
||
- var draft = previousState;
|
||
- var result = caseReducer(draft, action);
|
||
- if (typeof result === "undefined") {
|
||
- return previousState;
|
||
- }
|
||
- return result;
|
||
- }
|
||
- else if (!isDraftable(previousState)) {
|
||
- var result = caseReducer(previousState, action);
|
||
- if (typeof result === "undefined") {
|
||
- if (previousState === null) {
|
||
- return previousState;
|
||
- }
|
||
- throw Error("A case reducer on a non-draftable value must not return undefined");
|
||
- }
|
||
- return result;
|
||
- }
|
||
- else {
|
||
- return createNextState(previousState, function (draft) {
|
||
- return caseReducer(draft, action);
|
||
- });
|
||
- }
|
||
- }
|
||
- return previousState;
|
||
- }, state);
|
||
- };
|
||
-}
|
||
-// src/createSlice.ts
|
||
-function getType2(slice, actionKey) {
|
||
- return slice + "/" + actionKey;
|
||
-}
|
||
-function createSlice(options) {
|
||
- var name = options.name, initialState = options.initialState;
|
||
- if (!name) {
|
||
- throw new Error("`name` is a required option for createSlice");
|
||
- }
|
||
- var reducers = options.reducers || {};
|
||
- var _b = typeof options.extraReducers === "function" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers], _c = _b[0], extraReducers = _c === void 0 ? {} : _c, _d = _b[1], actionMatchers = _d === void 0 ? [] : _d, _e = _b[2], defaultCaseReducer = _e === void 0 ? void 0 : _e;
|
||
- var reducerNames = Object.keys(reducers);
|
||
- var sliceCaseReducersByName = {};
|
||
- var sliceCaseReducersByType = {};
|
||
- var actionCreators = {};
|
||
- reducerNames.forEach(function (reducerName) {
|
||
- var maybeReducerWithPrepare = reducers[reducerName];
|
||
- var type = getType2(name, reducerName);
|
||
- var caseReducer;
|
||
- var prepareCallback;
|
||
- if ("reducer" in maybeReducerWithPrepare) {
|
||
- caseReducer = maybeReducerWithPrepare.reducer;
|
||
- prepareCallback = maybeReducerWithPrepare.prepare;
|
||
- }
|
||
- else {
|
||
- caseReducer = maybeReducerWithPrepare;
|
||
- }
|
||
- sliceCaseReducersByName[reducerName] = caseReducer;
|
||
- sliceCaseReducersByType[type] = caseReducer;
|
||
- actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type);
|
||
- });
|
||
- var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType);
|
||
- var reducer = createReducer(initialState, finalCaseReducers, actionMatchers, defaultCaseReducer);
|
||
- return {
|
||
- name: name,
|
||
- reducer: reducer,
|
||
- actions: actionCreators,
|
||
- caseReducers: sliceCaseReducersByName
|
||
- };
|
||
-}
|
||
-// src/entities/entity_state.ts
|
||
-function getInitialEntityState() {
|
||
- return {
|
||
- ids: [],
|
||
- entities: {}
|
||
- };
|
||
-}
|
||
-function createInitialStateFactory() {
|
||
- function getInitialState(additionalState) {
|
||
- if (additionalState === void 0) { additionalState = {}; }
|
||
- return Object.assign(getInitialEntityState(), additionalState);
|
||
- }
|
||
- return { getInitialState: getInitialState };
|
||
-}
|
||
-// src/entities/state_selectors.ts
|
||
-function createSelectorsFactory() {
|
||
- function getSelectors(selectState) {
|
||
- var selectIds = function (state) { return state.ids; };
|
||
- var selectEntities = function (state) { return state.entities; };
|
||
- var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); });
|
||
- var selectId = function (_, id) { return id; };
|
||
- var selectById = function (entities, id) { return entities[id]; };
|
||
- var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; });
|
||
- if (!selectState) {
|
||
- return {
|
||
- selectIds: selectIds,
|
||
- selectEntities: selectEntities,
|
||
- selectAll: selectAll,
|
||
- selectTotal: selectTotal,
|
||
- selectById: createDraftSafeSelector(selectEntities, selectId, selectById)
|
||
- };
|
||
- }
|
||
- var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities);
|
||
- return {
|
||
- selectIds: createDraftSafeSelector(selectState, selectIds),
|
||
- selectEntities: selectGlobalizedEntities,
|
||
- selectAll: createDraftSafeSelector(selectState, selectAll),
|
||
- selectTotal: createDraftSafeSelector(selectState, selectTotal),
|
||
- selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById)
|
||
- };
|
||
- }
|
||
- return { getSelectors: getSelectors };
|
||
-}
|
||
-// src/entities/state_adapter.ts
|
||
-import createNextState2, { isDraft as isDraft3 } from "immer";
|
||
-function createSingleArgumentStateOperator(mutator) {
|
||
- var operator = createStateOperator(function (_, state) { return mutator(state); });
|
||
- return function operation(state) {
|
||
- return operator(state, void 0);
|
||
- };
|
||
-}
|
||
-function createStateOperator(mutator) {
|
||
- return function operation(state, arg) {
|
||
- function isPayloadActionArgument(arg2) {
|
||
- return isFSA(arg2);
|
||
- }
|
||
- var runMutator = function (draft) {
|
||
- if (isPayloadActionArgument(arg)) {
|
||
- mutator(arg.payload, draft);
|
||
- }
|
||
- else {
|
||
- mutator(arg, draft);
|
||
- }
|
||
- };
|
||
- if (isDraft3(state)) {
|
||
- runMutator(state);
|
||
- return state;
|
||
- }
|
||
- else {
|
||
- return createNextState2(state, runMutator);
|
||
- }
|
||
- };
|
||
-}
|
||
-// src/entities/utils.ts
|
||
-function selectIdValue(entity, selectId) {
|
||
- var key = selectId(entity);
|
||
- if (process.env.NODE_ENV !== "production" && key === void 0) {
|
||
- console.warn("The entity passed to the `selectId` implementation returned undefined.", "You should probably provide your own `selectId` implementation.", "The entity that was passed:", entity, "The `selectId` implementation:", selectId.toString());
|
||
- }
|
||
- return key;
|
||
-}
|
||
-function ensureEntitiesArray(entities) {
|
||
- if (!Array.isArray(entities)) {
|
||
- entities = Object.values(entities);
|
||
- }
|
||
- return entities;
|
||
-}
|
||
-function splitAddedUpdatedEntities(newEntities, selectId, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- var added = [];
|
||
- var updated = [];
|
||
- for (var _i = 0, newEntities_1 = newEntities; _i < newEntities_1.length; _i++) {
|
||
- var entity = newEntities_1[_i];
|
||
- var id = selectIdValue(entity, selectId);
|
||
- if (id in state.entities) {
|
||
- updated.push({ id: id, changes: entity });
|
||
- }
|
||
- else {
|
||
- added.push(entity);
|
||
- }
|
||
- }
|
||
- return [added, updated];
|
||
-}
|
||
-// src/entities/unsorted_state_adapter.ts
|
||
-function createUnsortedStateAdapter(selectId) {
|
||
- function addOneMutably(entity, state) {
|
||
- var key = selectIdValue(entity, selectId);
|
||
- if (key in state.entities) {
|
||
- return;
|
||
- }
|
||
- state.ids.push(key);
|
||
- state.entities[key] = entity;
|
||
- }
|
||
- function addManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- for (var _i = 0, newEntities_2 = newEntities; _i < newEntities_2.length; _i++) {
|
||
- var entity = newEntities_2[_i];
|
||
- addOneMutably(entity, state);
|
||
- }
|
||
- }
|
||
- function setOneMutably(entity, state) {
|
||
- var key = selectIdValue(entity, selectId);
|
||
- if (!(key in state.entities)) {
|
||
- state.ids.push(key);
|
||
- }
|
||
- state.entities[key] = entity;
|
||
- }
|
||
- function setManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- for (var _i = 0, newEntities_3 = newEntities; _i < newEntities_3.length; _i++) {
|
||
- var entity = newEntities_3[_i];
|
||
- setOneMutably(entity, state);
|
||
- }
|
||
- }
|
||
- function setAllMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- state.ids = [];
|
||
- state.entities = {};
|
||
- addManyMutably(newEntities, state);
|
||
- }
|
||
- function removeOneMutably(key, state) {
|
||
- return removeManyMutably([key], state);
|
||
- }
|
||
- function removeManyMutably(keys, state) {
|
||
- var didMutate = false;
|
||
- keys.forEach(function (key) {
|
||
- if (key in state.entities) {
|
||
- delete state.entities[key];
|
||
- didMutate = true;
|
||
- }
|
||
- });
|
||
- if (didMutate) {
|
||
- state.ids = state.ids.filter(function (id) { return id in state.entities; });
|
||
- }
|
||
- }
|
||
- function removeAllMutably(state) {
|
||
- Object.assign(state, {
|
||
- ids: [],
|
||
- entities: {}
|
||
- });
|
||
- }
|
||
- function takeNewKey(keys, update, state) {
|
||
- var original2 = state.entities[update.id];
|
||
- var updated = Object.assign({}, original2, update.changes);
|
||
- var newKey = selectIdValue(updated, selectId);
|
||
- var hasNewKey = newKey !== update.id;
|
||
- if (hasNewKey) {
|
||
- keys[update.id] = newKey;
|
||
- delete state.entities[update.id];
|
||
- }
|
||
- state.entities[newKey] = updated;
|
||
- return hasNewKey;
|
||
- }
|
||
- function updateOneMutably(update, state) {
|
||
- return updateManyMutably([update], state);
|
||
- }
|
||
- function updateManyMutably(updates, state) {
|
||
- var newKeys = {};
|
||
- var updatesPerEntity = {};
|
||
- updates.forEach(function (update) {
|
||
- if (update.id in state.entities) {
|
||
- updatesPerEntity[update.id] = {
|
||
- id: update.id,
|
||
- changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes)
|
||
- };
|
||
- }
|
||
- });
|
||
- updates = Object.values(updatesPerEntity);
|
||
- var didMutateEntities = updates.length > 0;
|
||
- if (didMutateEntities) {
|
||
- var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0;
|
||
- if (didMutateIds) {
|
||
- state.ids = state.ids.map(function (id) { return newKeys[id] || id; });
|
||
- }
|
||
- }
|
||
- }
|
||
- function upsertOneMutably(entity, state) {
|
||
- return upsertManyMutably([entity], state);
|
||
- }
|
||
- function upsertManyMutably(newEntities, state) {
|
||
- var _b = splitAddedUpdatedEntities(newEntities, selectId, state), added = _b[0], updated = _b[1];
|
||
- updateManyMutably(updated, state);
|
||
- addManyMutably(added, state);
|
||
- }
|
||
- return {
|
||
- removeAll: createSingleArgumentStateOperator(removeAllMutably),
|
||
- addOne: createStateOperator(addOneMutably),
|
||
- addMany: createStateOperator(addManyMutably),
|
||
- setOne: createStateOperator(setOneMutably),
|
||
- setMany: createStateOperator(setManyMutably),
|
||
- setAll: createStateOperator(setAllMutably),
|
||
- updateOne: createStateOperator(updateOneMutably),
|
||
- updateMany: createStateOperator(updateManyMutably),
|
||
- upsertOne: createStateOperator(upsertOneMutably),
|
||
- upsertMany: createStateOperator(upsertManyMutably),
|
||
- removeOne: createStateOperator(removeOneMutably),
|
||
- removeMany: createStateOperator(removeManyMutably)
|
||
- };
|
||
-}
|
||
-// src/entities/sorted_state_adapter.ts
|
||
-function createSortedStateAdapter(selectId, sort) {
|
||
- var _b = createUnsortedStateAdapter(selectId), removeOne = _b.removeOne, removeMany = _b.removeMany, removeAll = _b.removeAll;
|
||
- function addOneMutably(entity, state) {
|
||
- return addManyMutably([entity], state);
|
||
- }
|
||
- function addManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); });
|
||
- if (models.length !== 0) {
|
||
- merge(models, state);
|
||
- }
|
||
- }
|
||
- function setOneMutably(entity, state) {
|
||
- return setManyMutably([entity], state);
|
||
- }
|
||
- function setManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- if (newEntities.length !== 0) {
|
||
- merge(newEntities, state);
|
||
- }
|
||
- }
|
||
- function setAllMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- state.entities = {};
|
||
- state.ids = [];
|
||
- addManyMutably(newEntities, state);
|
||
- }
|
||
- function updateOneMutably(update, state) {
|
||
- return updateManyMutably([update], state);
|
||
- }
|
||
- function takeUpdatedModel(models, update, state) {
|
||
- if (!(update.id in state.entities)) {
|
||
- return false;
|
||
- }
|
||
- var original2 = state.entities[update.id];
|
||
- var updated = Object.assign({}, original2, update.changes);
|
||
- var newKey = selectIdValue(updated, selectId);
|
||
- delete state.entities[update.id];
|
||
- models.push(updated);
|
||
- return newKey !== update.id;
|
||
- }
|
||
- function updateManyMutably(updates, state) {
|
||
- var models = [];
|
||
- updates.forEach(function (update) { return takeUpdatedModel(models, update, state); });
|
||
- if (models.length !== 0) {
|
||
- merge(models, state);
|
||
- }
|
||
- }
|
||
- function upsertOneMutably(entity, state) {
|
||
- return upsertManyMutably([entity], state);
|
||
- }
|
||
- function upsertManyMutably(newEntities, state) {
|
||
- var _b = splitAddedUpdatedEntities(newEntities, selectId, state), added = _b[0], updated = _b[1];
|
||
- updateManyMutably(updated, state);
|
||
- addManyMutably(added, state);
|
||
- }
|
||
- function areArraysEqual(a, b) {
|
||
- if (a.length !== b.length) {
|
||
- return false;
|
||
- }
|
||
- for (var i = 0; i < a.length && i < b.length; i++) {
|
||
- if (a[i] === b[i]) {
|
||
- continue;
|
||
- }
|
||
- return false;
|
||
- }
|
||
- return true;
|
||
- }
|
||
- function merge(models, state) {
|
||
- models.forEach(function (model) {
|
||
- state.entities[selectId(model)] = model;
|
||
- });
|
||
- var allEntities = Object.values(state.entities);
|
||
- allEntities.sort(sort);
|
||
- var newSortedIds = allEntities.map(selectId);
|
||
- var ids = state.ids;
|
||
- if (!areArraysEqual(ids, newSortedIds)) {
|
||
- state.ids = newSortedIds;
|
||
- }
|
||
- }
|
||
- return {
|
||
- removeOne: removeOne,
|
||
- removeMany: removeMany,
|
||
- removeAll: removeAll,
|
||
- addOne: createStateOperator(addOneMutably),
|
||
- updateOne: createStateOperator(updateOneMutably),
|
||
- upsertOne: createStateOperator(upsertOneMutably),
|
||
- setOne: createStateOperator(setOneMutably),
|
||
- setMany: createStateOperator(setManyMutably),
|
||
- setAll: createStateOperator(setAllMutably),
|
||
- addMany: createStateOperator(addManyMutably),
|
||
- updateMany: createStateOperator(updateManyMutably),
|
||
- upsertMany: createStateOperator(upsertManyMutably)
|
||
- };
|
||
-}
|
||
-// src/entities/create_adapter.ts
|
||
-function createEntityAdapter(options) {
|
||
- if (options === void 0) { options = {}; }
|
||
- var _b = __spreadValues({
|
||
- sortComparer: false,
|
||
- selectId: function (instance) { return instance.id; }
|
||
- }, options), selectId = _b.selectId, sortComparer = _b.sortComparer;
|
||
- var stateFactory = createInitialStateFactory();
|
||
- var selectorsFactory = createSelectorsFactory();
|
||
- var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId);
|
||
- return __spreadValues(__spreadValues(__spreadValues({
|
||
- selectId: selectId,
|
||
- sortComparer: sortComparer
|
||
- }, stateFactory), selectorsFactory), stateAdapter);
|
||
-}
|
||
-// src/nanoid.ts
|
||
-var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";
|
||
-var nanoid = function (size) {
|
||
- if (size === void 0) { size = 21; }
|
||
- var id = "";
|
||
- var i = size;
|
||
- while (i--) {
|
||
- id += urlAlphabet[Math.random() * 64 | 0];
|
||
- }
|
||
- return id;
|
||
-};
|
||
-// src/createAsyncThunk.ts
|
||
-var commonProperties = [
|
||
- "name",
|
||
- "message",
|
||
- "stack",
|
||
- "code"
|
||
-];
|
||
-var RejectWithValue = /** @class */ (function () {
|
||
- function RejectWithValue(payload, meta) {
|
||
- this.payload = payload;
|
||
- this.meta = meta;
|
||
- }
|
||
- return RejectWithValue;
|
||
-}());
|
||
-var FulfillWithMeta = /** @class */ (function () {
|
||
- function FulfillWithMeta(payload, meta) {
|
||
- this.payload = payload;
|
||
- this.meta = meta;
|
||
- }
|
||
- return FulfillWithMeta;
|
||
-}());
|
||
-var miniSerializeError = function (value) {
|
||
- if (typeof value === "object" && value !== null) {
|
||
- var simpleError = {};
|
||
- for (var _i = 0, commonProperties_1 = commonProperties; _i < commonProperties_1.length; _i++) {
|
||
- var property = commonProperties_1[_i];
|
||
- if (typeof value[property] === "string") {
|
||
- simpleError[property] = value[property];
|
||
- }
|
||
- }
|
||
- return simpleError;
|
||
- }
|
||
- return { message: String(value) };
|
||
-};
|
||
-function createAsyncThunk(typePrefix, payloadCreator, options) {
|
||
- var fulfilled = createAction(typePrefix + "/fulfilled", function (payload, requestId, arg, meta) { return ({
|
||
- payload: payload,
|
||
- meta: __spreadProps(__spreadValues({}, meta || {}), {
|
||
- arg: arg,
|
||
- requestId: requestId,
|
||
- requestStatus: "fulfilled"
|
||
- })
|
||
- }); });
|
||
- var pending = createAction(typePrefix + "/pending", function (requestId, arg, meta) { return ({
|
||
- payload: void 0,
|
||
- meta: __spreadProps(__spreadValues({}, meta || {}), {
|
||
- arg: arg,
|
||
- requestId: requestId,
|
||
- requestStatus: "pending"
|
||
- })
|
||
- }); });
|
||
- var rejected = createAction(typePrefix + "/rejected", function (error, requestId, arg, payload, meta) { return ({
|
||
- payload: payload,
|
||
- error: (options && options.serializeError || miniSerializeError)(error || "Rejected"),
|
||
- meta: __spreadProps(__spreadValues({}, meta || {}), {
|
||
- arg: arg,
|
||
- requestId: requestId,
|
||
- rejectedWithValue: !!payload,
|
||
- requestStatus: "rejected",
|
||
- aborted: (error == null ? void 0 : error.name) === "AbortError",
|
||
- condition: (error == null ? void 0 : error.name) === "ConditionError"
|
||
- })
|
||
- }); });
|
||
- var displayedWarning = false;
|
||
- var AC = typeof AbortController !== "undefined" ? AbortController : /** @class */ (function () {
|
||
- function class_1() {
|
||
- this.signal = {
|
||
- aborted: false,
|
||
- addEventListener: function () {
|
||
- },
|
||
- dispatchEvent: function () {
|
||
- return false;
|
||
- },
|
||
- onabort: function () {
|
||
- },
|
||
- removeEventListener: function () {
|
||
- }
|
||
- };
|
||
- }
|
||
- class_1.prototype.abort = function () {
|
||
- if (process.env.NODE_ENV !== "production") {
|
||
- if (!displayedWarning) {
|
||
- displayedWarning = true;
|
||
- console.info("This platform does not implement AbortController. \nIf you want to use the AbortController to react to `abort` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.");
|
||
- }
|
||
- }
|
||
- };
|
||
- return class_1;
|
||
- }());
|
||
- function actionCreator(arg) {
|
||
- return function (dispatch, getState, extra) {
|
||
- var _a;
|
||
- var requestId = ((_a = options == null ? void 0 : options.idGenerator) != null ? _a : nanoid)();
|
||
- var abortController = new AC();
|
||
- var abortReason;
|
||
- var abortedPromise = new Promise(function (_, reject) { return abortController.signal.addEventListener("abort", function () { return reject({ name: "AbortError", message: abortReason || "Aborted" }); }); });
|
||
- var started = false;
|
||
- function abort(reason) {
|
||
- if (started) {
|
||
- abortReason = reason;
|
||
- abortController.abort();
|
||
- }
|
||
- }
|
||
- var promise = function () {
|
||
- return __async(this, null, function () {
|
||
- var _a2, finalAction, err_1, skipDispatch;
|
||
- return __generator(this, function (_b) {
|
||
- switch (_b.label) {
|
||
- case 0:
|
||
- _b.trys.push([0, 2, , 3]);
|
||
- if (options && options.condition && options.condition(arg, { getState: getState, extra: extra }) === false) {
|
||
- throw {
|
||
- name: "ConditionError",
|
||
- message: "Aborted due to condition callback returning false."
|
||
- };
|
||
- }
|
||
- started = true;
|
||
- dispatch(pending(requestId, arg, (_a2 = options == null ? void 0 : options.getPendingMeta) == null ? void 0 : _a2.call(options, { requestId: requestId, arg: arg }, { getState: getState, extra: extra })));
|
||
- return [4 /*yield*/, Promise.race([
|
||
- abortedPromise,
|
||
- Promise.resolve(payloadCreator(arg, {
|
||
- dispatch: dispatch,
|
||
- getState: getState,
|
||
- extra: extra,
|
||
- requestId: requestId,
|
||
- signal: abortController.signal,
|
||
- rejectWithValue: function (value, meta) {
|
||
- return new RejectWithValue(value, meta);
|
||
- },
|
||
- fulfillWithValue: function (value, meta) {
|
||
- return new FulfillWithMeta(value, meta);
|
||
- }
|
||
- })).then(function (result) {
|
||
- if (result instanceof RejectWithValue) {
|
||
- throw result;
|
||
- }
|
||
- if (result instanceof FulfillWithMeta) {
|
||
- return fulfilled(result.payload, requestId, arg, result.meta);
|
||
- }
|
||
- return fulfilled(result, requestId, arg);
|
||
- })
|
||
- ])];
|
||
- case 1:
|
||
- finalAction = _b.sent();
|
||
- return [3 /*break*/, 3];
|
||
- case 2:
|
||
- err_1 = _b.sent();
|
||
- finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg);
|
||
- return [3 /*break*/, 3];
|
||
- case 3:
|
||
- skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;
|
||
- if (!skipDispatch) {
|
||
- dispatch(finalAction);
|
||
- }
|
||
- return [2 /*return*/, finalAction];
|
||
- }
|
||
- });
|
||
- });
|
||
- }();
|
||
- return Object.assign(promise, {
|
||
- abort: abort,
|
||
- requestId: requestId,
|
||
- arg: arg,
|
||
- unwrap: function () {
|
||
- return promise.then(unwrapResult);
|
||
- }
|
||
- });
|
||
- };
|
||
- }
|
||
- return Object.assign(actionCreator, {
|
||
- pending: pending,
|
||
- rejected: rejected,
|
||
- fulfilled: fulfilled,
|
||
- typePrefix: typePrefix
|
||
- });
|
||
-}
|
||
-function unwrapResult(action) {
|
||
- if (action.meta && action.meta.rejectedWithValue) {
|
||
- throw action.payload;
|
||
- }
|
||
- if (action.error) {
|
||
- throw action.error;
|
||
- }
|
||
- return action.payload;
|
||
-}
|
||
-// src/tsHelpers.ts
|
||
-var hasMatchFunction = function (v) {
|
||
- return v && typeof v.match === "function";
|
||
-};
|
||
-// src/matchers.ts
|
||
-var matches = function (matcher, action) {
|
||
- if (hasMatchFunction(matcher)) {
|
||
- return matcher.match(action);
|
||
- }
|
||
- else {
|
||
- return matcher(action);
|
||
- }
|
||
-};
|
||
-function isAnyOf() {
|
||
- var matchers = [];
|
||
- for (var _i = 0; _i < arguments.length; _i++) {
|
||
- matchers[_i] = arguments[_i];
|
||
- }
|
||
- return function (action) {
|
||
- return matchers.some(function (matcher) { return matches(matcher, action); });
|
||
- };
|
||
-}
|
||
-function isAllOf() {
|
||
- var matchers = [];
|
||
- for (var _i = 0; _i < arguments.length; _i++) {
|
||
- matchers[_i] = arguments[_i];
|
||
- }
|
||
- return function (action) {
|
||
- return matchers.every(function (matcher) { return matches(matcher, action); });
|
||
- };
|
||
-}
|
||
-function hasExpectedRequestMetadata(action, validStatus) {
|
||
- if (!action || !action.meta)
|
||
- return false;
|
||
- var hasValidRequestId = typeof action.meta.requestId === "string";
|
||
- var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;
|
||
- return hasValidRequestId && hasValidRequestStatus;
|
||
-}
|
||
-function isAsyncThunkArray(a) {
|
||
- return typeof a[0] === "function" && "pending" in a[0] && "fulfilled" in a[0] && "rejected" in a[0];
|
||
-}
|
||
-function isPending() {
|
||
- var asyncThunks = [];
|
||
- for (var _i = 0; _i < arguments.length; _i++) {
|
||
- asyncThunks[_i] = arguments[_i];
|
||
- }
|
||
- if (asyncThunks.length === 0) {
|
||
- return function (action) { return hasExpectedRequestMetadata(action, ["pending"]); };
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isPending()(asyncThunks[0]);
|
||
- }
|
||
- return function (action) {
|
||
- var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; });
|
||
- var combinedMatcher = isAnyOf.apply(void 0, matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
-}
|
||
-function isRejected() {
|
||
- var asyncThunks = [];
|
||
- for (var _i = 0; _i < arguments.length; _i++) {
|
||
- asyncThunks[_i] = arguments[_i];
|
||
- }
|
||
- if (asyncThunks.length === 0) {
|
||
- return function (action) { return hasExpectedRequestMetadata(action, ["rejected"]); };
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isRejected()(asyncThunks[0]);
|
||
- }
|
||
- return function (action) {
|
||
- var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; });
|
||
- var combinedMatcher = isAnyOf.apply(void 0, matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
-}
|
||
-function isRejectedWithValue() {
|
||
- var asyncThunks = [];
|
||
- for (var _i = 0; _i < arguments.length; _i++) {
|
||
- asyncThunks[_i] = arguments[_i];
|
||
- }
|
||
- var hasFlag = function (action) {
|
||
- return action && action.meta && action.meta.rejectedWithValue;
|
||
- };
|
||
- if (asyncThunks.length === 0) {
|
||
- return function (action) {
|
||
- var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isRejectedWithValue()(asyncThunks[0]);
|
||
- }
|
||
- return function (action) {
|
||
- var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
-}
|
||
-function isFulfilled() {
|
||
- var asyncThunks = [];
|
||
- for (var _i = 0; _i < arguments.length; _i++) {
|
||
- asyncThunks[_i] = arguments[_i];
|
||
- }
|
||
- if (asyncThunks.length === 0) {
|
||
- return function (action) { return hasExpectedRequestMetadata(action, ["fulfilled"]); };
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isFulfilled()(asyncThunks[0]);
|
||
- }
|
||
- return function (action) {
|
||
- var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; });
|
||
- var combinedMatcher = isAnyOf.apply(void 0, matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
-}
|
||
-function isAsyncThunkAction() {
|
||
- var asyncThunks = [];
|
||
- for (var _i = 0; _i < arguments.length; _i++) {
|
||
- asyncThunks[_i] = arguments[_i];
|
||
- }
|
||
- if (asyncThunks.length === 0) {
|
||
- return function (action) { return hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]); };
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isAsyncThunkAction()(asyncThunks[0]);
|
||
- }
|
||
- return function (action) {
|
||
- var matchers = [];
|
||
- for (var _i = 0, asyncThunks_1 = asyncThunks; _i < asyncThunks_1.length; _i++) {
|
||
- var asyncThunk = asyncThunks_1[_i];
|
||
- matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled);
|
||
- }
|
||
- var combinedMatcher = isAnyOf.apply(void 0, matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
-}
|
||
-// src/index.ts
|
||
-enableES5();
|
||
-export { MiddlewareArray, configureStore, createAction, createAsyncThunk, createDraftSafeSelector, createEntityAdapter, createImmutableStateInvariantMiddleware, default2 as createNextState, createReducer, createSelector2 as createSelector, createSerializableStateInvariantMiddleware, createSlice, current2 as current, findNonSerializableValue, freeze, getDefaultMiddleware, getType, isAllOf, isAnyOf, isAsyncThunkAction, isDraft4 as isDraft, isFulfilled, isImmutableDefault, isPending, isPlain, isPlainObject, isRejected, isRejectedWithValue, miniSerializeError, nanoid, original, unwrapResult };
|
||
-//# sourceMappingURL=redux-toolkit.esm.js.map
|
||
\ No newline at end of file
|
||
diff --git a/dist/redux-toolkit.esm.js.map b/dist/redux-toolkit.esm.js.map
|
||
deleted file mode 100644
|
||
index c125654b3d67d93e88eb2da2dbfe885eebffa957..0000000000000000000000000000000000000000
|
||
--- a/dist/redux-toolkit.esm.js.map
|
||
+++ /dev/null
|
||
@@ -1 +0,0 @@
|
||
-{"version":3,"sources":["../src/index.ts","../src/createDraftSafeSelector.ts","../src/configureStore.ts","../src/devtoolsExtension.ts","../src/isPlainObject.ts","../src/getDefaultMiddleware.ts","../src/utils.ts","../src/immutableStateInvariantMiddleware.ts","../src/serializableStateInvariantMiddleware.ts","../src/createAction.ts","../src/createReducer.ts","../src/mapBuilders.ts","../src/createSlice.ts","../src/entities/entity_state.ts","../src/entities/state_selectors.ts","../src/entities/state_adapter.ts","../src/entities/utils.ts","../src/entities/unsorted_state_adapter.ts","../src/entities/sorted_state_adapter.ts","../src/entities/create_adapter.ts","../src/nanoid.ts","../src/createAsyncThunk.ts","../src/tsHelpers.ts","../src/matchers.ts","redux-toolkit.esm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAA,EAAA,SAAA,EAAA,MAAA,OAAA,CAAA;AACA,cAAA,OAAA,CAAA;AACA,OAAA,EAAA,OAAA,IAAA,QAAA,EAAA,OAAA,IAAA,QAAA,EAAA,MAAA,EAAA,QAAA,EAAA,OAAA,IAAA,QAAA,EAAA,MAAA,OAAA,CAAA;AAQA,OAAA,EAAA,cAAA,IAAA,eAAA,EAAA,MAAA,UAAA,CAAA;;ACVA,OAAA,EAAA,OAAA,EAAA,OAAA,EAAA,MAAA,OAAA,CAAA;AACA,OAAA,EAAA,cAAA,EAAA,MAAA,UAAA,CAAA;AASO,IAAM,uBAAA,GAAiD;IAAA,cACzD;SADyD,UACzD,EADyD,qBACzD,EADyD,IACzD;QADyD,yBACzD;;IAEH,IAAM,QAAA,GAAY,cAAA,eAA0B,IAAA,CAAA,CAAA;IAC5C,IAAM,eAAA,GAAkB,UAAC,KAAA;QAAA,cAAmB;aAAnB,UAAmB,EAAnB,qBAAmB,EAAnB,IAAmB;YAAnB,6BAAmB;;QAC1C,OAAA,QAAA,8BAAS,OAAA,CAAQ,KAAA,CAAA,CAAA,CAAA,CAAS,OAAA,CAAQ,KAAA,CAAA,CAAA,CAAA,CAAS,KAAA,GAAU,IAAA;IAArD,CAAqD,CAAA;IACvD,OAAO,eAAA,CAAA;AAAA,CAAA,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ACH,IAAI,WAAA,CAAY,MAAA,KAAW,CAAA,EAAG;QAC5B,OAAO,UAAC,MAAA,IACN,OAAA,0BAAA,CAA2B,MAAA,EAAQ,CAAC,SAAA,EAAW,WAAA,EAAa,UAAA,CAAA,CAAA,EAA5D,CAA4D,CAAA;KAAA;IAGhE,IAAI,CAAC,iBAAA,CAAkB,WAAA,CAAA,EAAc;QACnC,OAAO,kBAAA,EAAA,CAAqB,WAAA,CAAY,CAAA,CAAA,CAAA,CAAA;KAAA;IAG1C,OAAO,UACL,MAAA;QAGA,IAAM,QAAA,GAA8C,EAAA,CAAA;QAEpD,KAAyB,UAAA,EAAA,2BAAA,EAAA,yBAAA,EAAA,IAAA,EAAa;YAAtC,IAAW,UAAA,oBAAA;YACT,QAAA,CAAS,IAAA,CACP,UAAA,CAAW,OAAA,EACX,UAAA,CAAW,QAAA,EACX,UAAA,CAAW,SAAA,CAAA,CAAA;SAAA;QAIf,IAAM,eAAA,GAAkB,OAAA,eAAW,QAAA,CAAA,CAAA;QAEnC,OAAO,eAAA,CAAgB,MAAA,CAAA,CAAA;IAAA,CAAA,CAAA;AAAA,CAAA;;AvBhZ3B,SAAA,EAAA,CAAA","sourcesContent":["import { enableES5 } from 'immer'\r\nexport * from 'redux'\r\nexport {\r\n default as createNextState,\r\n current,\r\n freeze,\r\n original,\r\n isDraft,\r\n} from 'immer'\r\nexport type { Draft } from 'immer'\r\nexport { createSelector } from 'reselect'\r\nexport type {\r\n Selector,\r\n OutputParametricSelector,\r\n OutputSelector,\r\n ParametricSelector,\r\n} from 'reselect'\r\nexport { createDraftSafeSelector } from './createDraftSafeSelector'\r\nexport type { ThunkAction, ThunkDispatch } from 'redux-thunk'\r\n\r\n// We deliberately enable Immer's ES5 support, on the grounds that\r\n// we assume RTK will be used with React Native and other Proxy-less\r\n// environments. In addition, that's how Immer 4 behaved, and since\r\n// we want to ship this in an RTK minor, we should keep the same behavior.\r\nenableES5()\r\n\r\nexport {\r\n // js\r\n configureStore,\r\n} from './configureStore'\r\nexport type {\r\n // types\r\n ConfigureEnhancersCallback,\r\n ConfigureStoreOptions,\r\n EnhancedStore,\r\n} from './configureStore'\r\nexport {\r\n // js\r\n createAction,\r\n getType,\r\n} from './createAction'\r\nexport type {\r\n // types\r\n PayloadAction,\r\n PayloadActionCreator,\r\n ActionCreatorWithNonInferrablePayload,\r\n ActionCreatorWithOptionalPayload,\r\n ActionCreatorWithPayload,\r\n ActionCreatorWithoutPayload,\r\n ActionCreatorWithPreparedPayload,\r\n PrepareAction,\r\n} from './createAction'\r\nexport {\r\n // js\r\n createReducer,\r\n} from './createReducer'\r\nexport type {\r\n // types\r\n Actions,\r\n CaseReducer,\r\n CaseReducers,\r\n} from './createReducer'\r\nexport {\r\n // js\r\n createSlice,\r\n} from './createSlice'\r\n\r\nexport type {\r\n // types\r\n CreateSliceOptions,\r\n Slice,\r\n CaseReducerActions,\r\n SliceCaseReducers,\r\n ValidateSliceCaseReducers,\r\n CaseReducerWithPrepare,\r\n SliceActionCreator,\r\n} from './createSlice'\r\nexport {\r\n // js\r\n createImmutableStateInvariantMiddleware,\r\n isImmutableDefault,\r\n} from './immutableStateInvariantMiddleware'\r\nexport type {\r\n // types\r\n ImmutableStateInvariantMiddlewareOptions,\r\n} from './immutableStateInvariantMiddleware'\r\nexport {\r\n // js\r\n createSerializableStateInvariantMiddleware,\r\n findNonSerializableValue,\r\n isPlain,\r\n} from './serializableStateInvariantMiddleware'\r\nexport type {\r\n // types\r\n SerializableStateInvariantMiddlewareOptions,\r\n} from './serializableStateInvariantMiddleware'\r\nexport {\r\n // js\r\n getDefaultMiddleware,\r\n} from './getDefaultMiddleware'\r\nexport type {\r\n // types\r\n ActionReducerMapBuilder,\r\n} from './mapBuilders'\r\nexport { MiddlewareArray } from './utils'\r\n\r\nexport { createEntityAdapter } from './entities/create_adapter'\r\nexport type {\r\n Dictionary,\r\n EntityState,\r\n EntityAdapter,\r\n EntitySelectors,\r\n EntityStateAdapter,\r\n EntityId,\r\n Update,\r\n IdSelector,\r\n Comparer,\r\n} from './entities/models'\r\n\r\nexport {\r\n createAsyncThunk,\r\n unwrapResult,\r\n miniSerializeError,\r\n} from './createAsyncThunk'\r\nexport type {\r\n AsyncThunk,\r\n AsyncThunkOptions,\r\n AsyncThunkAction,\r\n AsyncThunkPayloadCreatorReturnValue,\r\n AsyncThunkPayloadCreator,\r\n SerializedError,\r\n} from './createAsyncThunk'\r\n\r\nexport {\r\n // js\r\n isAllOf,\r\n isAnyOf,\r\n isPending,\r\n isRejected,\r\n isFulfilled,\r\n isAsyncThunkAction,\r\n isRejectedWithValue,\r\n} from './matchers'\r\nexport type {\r\n // types\r\n ActionMatchingAllOf,\r\n ActionMatchingAnyOf,\r\n} from './matchers'\r\n\r\nexport { nanoid } from './nanoid'\r\n\r\nexport { default as isPlainObject } from './isPlainObject'\r\n","import { current, isDraft } from 'immer'\r\nimport { createSelector } from 'reselect'\r\n\r\n/**\r\n * \"Draft-Safe\" version of `reselect`'s `createSelector`:\r\n * If an `immer`-drafted object is passed into the resulting selector's first argument,\r\n * the selector will act on the current draft value, instead of returning a cached value\r\n * that might be possibly outdated if the draft has been modified since.\r\n * @public\r\n */\r\nexport const createDraftSafeSelector: typeof createSelector = (\r\n ...args: unknown[]\r\n) => {\r\n const selector = (createSelector as any)(...args)\r\n const wrappedSelector = (value: unknown, ...rest: unknown[]) =>\r\n selector(isDraft(value) ? current(value) : value, ...rest)\r\n return wrappedSelector as any\r\n}\r\n","import type {\r\n Reducer,\r\n ReducersMapObject,\r\n Middleware,\r\n Action,\r\n AnyAction,\r\n StoreEnhancer,\r\n Store,\r\n Dispatch,\r\n PreloadedState,\r\n CombinedState,\r\n} from 'redux'\r\nimport { createStore, compose, applyMiddleware, combineReducers } from 'redux'\r\nimport type { EnhancerOptions as DevToolsOptions } from './devtoolsExtension'\r\nimport { composeWithDevTools } from './devtoolsExtension'\r\n\r\nimport isPlainObject from './isPlainObject'\r\nimport type {\r\n ThunkMiddlewareFor,\r\n CurriedGetDefaultMiddleware,\r\n} from './getDefaultMiddleware'\r\nimport { curryGetDefaultMiddleware } from './getDefaultMiddleware'\r\nimport type { DispatchForMiddlewares, NoInfer } from './tsHelpers'\r\n\r\nconst IS_PRODUCTION = process.env.NODE_ENV === 'production'\r\n\r\n/**\r\n * Callback function type, to be used in `ConfigureStoreOptions.enhancers`\r\n *\r\n * @public\r\n */\r\nexport type ConfigureEnhancersCallback = (\r\n defaultEnhancers: readonly StoreEnhancer[]\r\n) => StoreEnhancer[]\r\n\r\n/**\r\n * Options for `configureStore()`.\r\n *\r\n * @public\r\n */\r\nexport interface ConfigureStoreOptions<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares<S> = Middlewares<S>\r\n> {\r\n /**\r\n * A single reducer function that will be used as the root reducer, or an\r\n * object of slice reducers that will be passed to `combineReducers()`.\r\n */\r\n reducer: Reducer<S, A> | ReducersMapObject<S, A>\r\n\r\n /**\r\n * An array of Redux middleware to install. If not supplied, defaults to\r\n * the set of middleware returned by `getDefaultMiddleware()`.\r\n */\r\n middleware?: ((getDefaultMiddleware: CurriedGetDefaultMiddleware<S>) => M) | M\r\n\r\n /**\r\n * Whether to enable Redux DevTools integration. Defaults to `true`.\r\n *\r\n * Additional configuration can be done by passing Redux DevTools options\r\n */\r\n devTools?: boolean | DevToolsOptions\r\n\r\n /**\r\n * The initial state, same as Redux's createStore.\r\n * You may optionally specify it to hydrate the state\r\n * from the server in universal apps, or to restore a previously serialized\r\n * user session. If you use `combineReducers()` to produce the root reducer\r\n * function (either directly or indirectly by passing an object as `reducer`),\r\n * this must be an object with the same shape as the reducer map keys.\r\n */\r\n /* \r\n Not 100% correct but the best approximation we can get:\r\n - if S is a `CombinedState` applying a second `CombinedState` on it does not change anything.\r\n - if it is not, there could be two cases:\r\n - `ReducersMapObject<S, A>` is being passed in. In this case, we will call `combineReducers` on it and `CombinedState<S>` is correct\r\n - `Reducer<S, A>` is being passed in. In this case, actually `CombinedState<S>` is wrong and `S` would be correct.\r\n As we cannot distinguish between those two cases without adding another generic paramter, \r\n we just make the pragmatic assumption that the latter almost never happens.\r\n */\r\n preloadedState?: PreloadedState<CombinedState<NoInfer<S>>>\r\n\r\n /**\r\n * The store enhancers to apply. See Redux's `createStore()`.\r\n * All enhancers will be included before the DevTools Extension enhancer.\r\n * If you need to customize the order of enhancers, supply a callback\r\n * function that will receive the original array (ie, `[applyMiddleware]`),\r\n * and should return a new array (such as `[applyMiddleware, offline]`).\r\n * If you only need to add middleware, you can use the `middleware` parameter instead.\r\n */\r\n enhancers?: StoreEnhancer[] | ConfigureEnhancersCallback\r\n}\r\n\r\ntype Middlewares<S> = ReadonlyArray<Middleware<{}, S>>\r\n\r\n/**\r\n * A Redux store returned by `configureStore()`. Supports dispatching\r\n * side-effectful _thunks_ in addition to plain actions.\r\n *\r\n * @public\r\n */\r\nexport interface EnhancedStore<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares<S> = Middlewares<S>\r\n> extends Store<S, A> {\r\n /**\r\n * The `dispatch` method of your store, enhanced by all its middlewares.\r\n *\r\n * @inheritdoc\r\n */\r\n dispatch: DispatchForMiddlewares<M> & Dispatch<A>\r\n}\r\n\r\n/**\r\n * A friendly abstraction over the standard Redux `createStore()` function.\r\n *\r\n * @param config The store configuration.\r\n * @returns A configured Redux store.\r\n *\r\n * @public\r\n */\r\nexport function configureStore<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares<S> = [ThunkMiddlewareFor<S>]\r\n>(options: ConfigureStoreOptions<S, A, M>): EnhancedStore<S, A, M> {\r\n const curriedGetDefaultMiddleware = curryGetDefaultMiddleware<S>()\r\n\r\n const {\r\n reducer = undefined,\r\n middleware = curriedGetDefaultMiddleware(),\r\n devTools = true,\r\n preloadedState = undefined,\r\n enhancers = undefined,\r\n } = options || {}\r\n\r\n let rootReducer: Reducer<S, A>\r\n\r\n if (typeof reducer === 'function') {\r\n rootReducer = reducer\r\n } else if (isPlainObject(reducer)) {\r\n rootReducer = combineReducers(reducer)\r\n } else {\r\n throw new Error(\r\n '\"reducer\" is a required argument, and must be a function or an object of functions that can be passed to combineReducers'\r\n )\r\n }\r\n\r\n let finalMiddleware = middleware\r\n if (typeof finalMiddleware === 'function') {\r\n finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware)\r\n\r\n if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {\r\n throw new Error(\r\n 'when using a middleware builder function, an array of middleware must be returned'\r\n )\r\n }\r\n }\r\n if (\r\n !IS_PRODUCTION &&\r\n finalMiddleware.some((item) => typeof item !== 'function')\r\n ) {\r\n throw new Error(\r\n 'each middleware provided to configureStore must be a function'\r\n )\r\n }\r\n\r\n const middlewareEnhancer = applyMiddleware(...finalMiddleware)\r\n\r\n let finalCompose = compose\r\n\r\n if (devTools) {\r\n finalCompose = composeWithDevTools({\r\n // Enable capture of stack traces for dispatched Redux actions\r\n trace: !IS_PRODUCTION,\r\n ...(typeof devTools === 'object' && devTools),\r\n })\r\n }\r\n\r\n let storeEnhancers: StoreEnhancer[] = [middlewareEnhancer]\r\n\r\n if (Array.isArray(enhancers)) {\r\n storeEnhancers = [middlewareEnhancer, ...enhancers]\r\n } else if (typeof enhancers === 'function') {\r\n storeEnhancers = enhancers(storeEnhancers)\r\n }\r\n\r\n const composedEnhancer = finalCompose(...storeEnhancers) as any\r\n\r\n return createStore(rootReducer, preloadedState, composedEnhancer)\r\n}\r\n","import type { Action, ActionCreator, StoreEnhancer } from 'redux'\r\nimport { compose } from 'redux'\r\n\r\n/**\r\n * @public\r\n */\r\nexport interface EnhancerOptions {\r\n /**\r\n * the instance name to be showed on the monitor page. Default value is `document.title`.\r\n * If not specified and there's no document title, it will consist of `tabId` and `instanceId`.\r\n */\r\n name?: string\r\n /**\r\n * action creators functions to be available in the Dispatcher.\r\n */\r\n actionCreators?: ActionCreator<any>[] | { [key: string]: ActionCreator<any> }\r\n /**\r\n * if more than one action is dispatched in the indicated interval, all new actions will be collected and sent at once.\r\n * It is the joint between performance and speed. When set to `0`, all actions will be sent instantly.\r\n * Set it to a higher value when experiencing perf issues (also `maxAge` to a lower value).\r\n *\r\n * @default 500 ms.\r\n */\r\n latency?: number\r\n /**\r\n * (> 1) - maximum allowed actions to be stored in the history tree. The oldest actions are removed once maxAge is reached. It's critical for performance.\r\n *\r\n * @default 50\r\n */\r\n maxAge?: number\r\n /**\r\n * See detailed documentation at http://extension.remotedev.io/docs/API/Arguments.html#serialize\r\n */\r\n serialize?:\r\n | boolean\r\n | {\r\n options?:\r\n | boolean\r\n | {\r\n date?: boolean\r\n regex?: boolean\r\n undefined?: boolean\r\n error?: boolean\r\n symbol?: boolean\r\n map?: boolean\r\n set?: boolean\r\n function?: boolean | Function\r\n }\r\n replacer?: (key: string, value: unknown) => unknown\r\n reviver?: (key: string, value: unknown) => unknown\r\n immutable?: unknown\r\n refs?: unknown[]\r\n }\r\n /**\r\n * function which takes `action` object and id number as arguments, and should return `action` object back.\r\n */\r\n actionSanitizer?: <A extends Action>(action: A, id: number) => A\r\n /**\r\n * function which takes `state` object and index as arguments, and should return `state` object back.\r\n */\r\n stateSanitizer?: <S>(state: S, index: number) => S\r\n /**\r\n * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\r\n * If `actionsWhitelist` specified, `actionsBlacklist` is ignored.\r\n */\r\n actionsBlacklist?: string | string[]\r\n /**\r\n * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\r\n * If `actionsWhitelist` specified, `actionsBlacklist` is ignored.\r\n */\r\n actionsWhitelist?: string | string[]\r\n /**\r\n * called for every action before sending, takes `state` and `action` object, and returns `true` in case it allows sending the current data to the monitor.\r\n * Use it as a more advanced version of `actionsBlacklist`/`actionsWhitelist` parameters.\r\n */\r\n predicate?: <S, A extends Action>(state: S, action: A) => boolean\r\n /**\r\n * if specified as `false`, it will not record the changes till clicking on `Start recording` button.\r\n * Available only for Redux enhancer, for others use `autoPause`.\r\n *\r\n * @default true\r\n */\r\n shouldRecordChanges?: boolean\r\n /**\r\n * if specified, whenever clicking on `Pause recording` button and there are actions in the history log, will add this action type.\r\n * If not specified, will commit when paused. Available only for Redux enhancer.\r\n *\r\n * @default \"@@PAUSED\"\"\r\n */\r\n pauseActionType?: string\r\n /**\r\n * auto pauses when the extension’s window is not opened, and so has zero impact on your app when not in use.\r\n * Not available for Redux enhancer (as it already does it but storing the data to be sent).\r\n *\r\n * @default false\r\n */\r\n autoPause?: boolean\r\n /**\r\n * if specified as `true`, it will not allow any non-monitor actions to be dispatched till clicking on `Unlock changes` button.\r\n * Available only for Redux enhancer.\r\n *\r\n * @default false\r\n */\r\n shouldStartLocked?: boolean\r\n /**\r\n * if set to `false`, will not recompute the states on hot reloading (or on replacing the reducers). Available only for Redux enhancer.\r\n *\r\n * @default true\r\n */\r\n shouldHotReload?: boolean\r\n /**\r\n * if specified as `true`, whenever there's an exception in reducers, the monitors will show the error message, and next actions will not be dispatched.\r\n *\r\n * @default false\r\n */\r\n shouldCatchErrors?: boolean\r\n /**\r\n * If you want to restrict the extension, specify the features you allow.\r\n * If not specified, all of the features are enabled. When set as an object, only those included as `true` will be allowed.\r\n * Note that except `true`/`false`, `import` and `export` can be set as `custom` (which is by default for Redux enhancer), meaning that the importing/exporting occurs on the client side.\r\n * Otherwise, you'll get/set the data right from the monitor part.\r\n */\r\n features?: {\r\n /**\r\n * start/pause recording of dispatched actions\r\n */\r\n pause?: boolean\r\n /**\r\n * lock/unlock dispatching actions and side effects\r\n */\r\n lock?: boolean\r\n /**\r\n * persist states on page reloading\r\n */\r\n persist?: boolean\r\n /**\r\n * export history of actions in a file\r\n */\r\n export?: boolean | 'custom'\r\n /**\r\n * import history of actions from a file\r\n */\r\n import?: boolean | 'custom'\r\n /**\r\n * jump back and forth (time travelling)\r\n */\r\n jump?: boolean\r\n /**\r\n * skip (cancel) actions\r\n */\r\n skip?: boolean\r\n /**\r\n * drag and drop actions in the history list\r\n */\r\n reorder?: boolean\r\n /**\r\n * dispatch custom actions or action creators\r\n */\r\n dispatch?: boolean\r\n /**\r\n * generate tests for the selected actions\r\n */\r\n test?: boolean\r\n }\r\n /**\r\n * Set to true or a stacktrace-returning function to record call stack traces for dispatched actions.\r\n * Defaults to false.\r\n */\r\n trace?: boolean | (<A extends Action>(action: A) => string)\r\n /**\r\n * The maximum number of stack trace entries to record per action. Defaults to 10.\r\n */\r\n traceLimit?: number\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport const composeWithDevTools: {\r\n (options: EnhancerOptions): typeof compose\r\n <StoreExt>(...funcs: Array<StoreEnhancer<StoreExt>>): StoreEnhancer<StoreExt>\r\n} =\r\n typeof window !== 'undefined' &&\r\n (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\r\n ? (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\r\n : function () {\r\n if (arguments.length === 0) return undefined\r\n if (typeof arguments[0] === 'object') return compose\r\n return compose.apply(null, arguments as any as Function[])\r\n }\r\n\r\n/**\r\n * @public\r\n */\r\nexport const devToolsEnhancer: {\r\n (options: EnhancerOptions): StoreEnhancer<any>\r\n} =\r\n typeof window !== 'undefined' && (window as any).__REDUX_DEVTOOLS_EXTENSION__\r\n ? (window as any).__REDUX_DEVTOOLS_EXTENSION__\r\n : function () {\r\n return function (noop) {\r\n return noop\r\n }\r\n }\r\n","/**\r\n * Returns true if the passed value is \"plain\" object, i.e. an object whose\r\n * prototype is the root `Object.prototype`. This includes objects created\r\n * using object literals, but not for instance for class instances.\r\n *\r\n * @param {any} value The value to inspect.\r\n * @returns {boolean} True if the argument appears to be a plain object.\r\n *\r\n * @public\r\n */\r\nexport default function isPlainObject(value: unknown): value is object {\r\n if (typeof value !== 'object' || value === null) return false\r\n\r\n let proto = value\r\n while (Object.getPrototypeOf(proto) !== null) {\r\n proto = Object.getPrototypeOf(proto)\r\n }\r\n\r\n return Object.getPrototypeOf(value) === proto\r\n}\r\n","import type { Middleware, AnyAction } from 'redux'\r\nimport type { ThunkMiddleware } from 'redux-thunk'\r\nimport thunkMiddleware from 'redux-thunk'\r\nimport type { ImmutableStateInvariantMiddlewareOptions } from './immutableStateInvariantMiddleware'\r\n/* PROD_START_REMOVE_UMD */\r\nimport { createImmutableStateInvariantMiddleware } from './immutableStateInvariantMiddleware'\r\n/* PROD_STOP_REMOVE_UMD */\r\n\r\nimport type { SerializableStateInvariantMiddlewareOptions } from './serializableStateInvariantMiddleware'\r\nimport { createSerializableStateInvariantMiddleware } from './serializableStateInvariantMiddleware'\r\nimport { MiddlewareArray } from './utils'\r\n\r\nfunction isBoolean(x: any): x is boolean {\r\n return typeof x === 'boolean'\r\n}\r\n\r\ninterface ThunkOptions<E = any> {\r\n extraArgument: E\r\n}\r\n\r\ninterface GetDefaultMiddlewareOptions {\r\n thunk?: boolean | ThunkOptions\r\n immutableCheck?: boolean | ImmutableStateInvariantMiddlewareOptions\r\n serializableCheck?: boolean | SerializableStateInvariantMiddlewareOptions\r\n}\r\n\r\nexport type ThunkMiddlewareFor<\r\n S,\r\n O extends GetDefaultMiddlewareOptions = {}\r\n> = O extends {\r\n thunk: false\r\n}\r\n ? never\r\n : O extends { thunk: { extraArgument: infer E } }\r\n ? ThunkMiddleware<S, AnyAction, E>\r\n :\r\n | ThunkMiddleware<S, AnyAction, null> //The ThunkMiddleware with a `null` ExtraArgument is here to provide backwards-compatibility.\r\n | ThunkMiddleware<S, AnyAction>\r\n\r\nexport type CurriedGetDefaultMiddleware<S = any> = <\r\n O extends Partial<GetDefaultMiddlewareOptions> = {\r\n thunk: true\r\n immutableCheck: true\r\n serializableCheck: true\r\n }\r\n>(\r\n options?: O\r\n) => MiddlewareArray<Middleware<{}, S> | ThunkMiddlewareFor<S, O>>\r\n\r\nexport function curryGetDefaultMiddleware<\r\n S = any\r\n>(): CurriedGetDefaultMiddleware<S> {\r\n return function curriedGetDefaultMiddleware(options) {\r\n return getDefaultMiddleware(options)\r\n }\r\n}\r\n\r\n/**\r\n * Returns any array containing the default middleware installed by\r\n * `configureStore()`. Useful if you want to configure your store with a custom\r\n * `middleware` array but still keep the default set.\r\n *\r\n * @return The default middleware used by `configureStore()`.\r\n *\r\n * @public\r\n *\r\n * @deprecated Prefer to use the callback notation for the `middleware` option in `configureStore`\r\n * to access a pre-typed `getDefaultMiddleware` instead.\r\n */\r\nexport function getDefaultMiddleware<\r\n S = any,\r\n O extends Partial<GetDefaultMiddlewareOptions> = {\r\n thunk: true\r\n immutableCheck: true\r\n serializableCheck: true\r\n }\r\n>(\r\n options: O = {} as O\r\n): MiddlewareArray<Middleware<{}, S> | ThunkMiddlewareFor<S, O>> {\r\n const {\r\n thunk = true,\r\n immutableCheck = true,\r\n serializableCheck = true,\r\n } = options\r\n\r\n let middlewareArray: Middleware<{}, S>[] = new MiddlewareArray()\r\n\r\n if (thunk) {\r\n if (isBoolean(thunk)) {\r\n middlewareArray.push(thunkMiddleware)\r\n } else {\r\n middlewareArray.push(\r\n thunkMiddleware.withExtraArgument(thunk.extraArgument)\r\n )\r\n }\r\n }\r\n\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (immutableCheck) {\r\n /* PROD_START_REMOVE_UMD */\r\n let immutableOptions: ImmutableStateInvariantMiddlewareOptions = {}\r\n\r\n if (!isBoolean(immutableCheck)) {\r\n immutableOptions = immutableCheck\r\n }\r\n\r\n middlewareArray.unshift(\r\n createImmutableStateInvariantMiddleware(immutableOptions)\r\n )\r\n /* PROD_STOP_REMOVE_UMD */\r\n }\r\n\r\n if (serializableCheck) {\r\n let serializableOptions: SerializableStateInvariantMiddlewareOptions = {}\r\n\r\n if (!isBoolean(serializableCheck)) {\r\n serializableOptions = serializableCheck\r\n }\r\n\r\n middlewareArray.push(\r\n createSerializableStateInvariantMiddleware(serializableOptions)\r\n )\r\n }\r\n }\r\n\r\n return middlewareArray as any\r\n}\r\n","import type { Middleware } from 'redux'\r\n\r\nexport function getTimeMeasureUtils(maxDelay: number, fnName: string) {\r\n let elapsed = 0\r\n return {\r\n measureTime<T>(fn: () => T): T {\r\n const started = Date.now()\r\n try {\r\n return fn()\r\n } finally {\r\n const finished = Date.now()\r\n elapsed += finished - started\r\n }\r\n },\r\n warnIfExceeded() {\r\n if (elapsed > maxDelay) {\r\n console.warn(`${fnName} took ${elapsed}ms, which is more than the warning threshold of ${maxDelay}ms. \r\nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\r\nIt is disabled in production builds, so you don't need to worry about that.`)\r\n }\r\n },\r\n }\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport class MiddlewareArray<\r\n Middlewares extends Middleware<any, any>\r\n> extends Array<Middlewares> {\r\n constructor(arrayLength?: number)\r\n constructor(...items: Middlewares[])\r\n constructor(...args: any[]) {\r\n super(...args)\r\n Object.setPrototypeOf(this, MiddlewareArray.prototype)\r\n }\r\n\r\n static get [Symbol.species]() {\r\n return MiddlewareArray as any\r\n }\r\n\r\n concat<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n items: AdditionalMiddlewares\r\n ): MiddlewareArray<Middlewares | AdditionalMiddlewares[number]>\r\n\r\n concat<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n ...items: AdditionalMiddlewares\r\n ): MiddlewareArray<Middlewares | AdditionalMiddlewares[number]>\r\n concat(...arr: any[]) {\r\n return super.concat.apply(this, arr)\r\n }\r\n\r\n prepend<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n items: AdditionalMiddlewares\r\n ): MiddlewareArray<AdditionalMiddlewares[number] | Middlewares>\r\n\r\n prepend<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n ...items: AdditionalMiddlewares\r\n ): MiddlewareArray<AdditionalMiddlewares[number] | Middlewares>\r\n\r\n prepend(...arr: any[]) {\r\n if (arr.length === 1 && Array.isArray(arr[0])) {\r\n return new MiddlewareArray(...arr[0].concat(this))\r\n }\r\n return new MiddlewareArray(...arr.concat(this))\r\n }\r\n}\r\n","import type { Middleware } from 'redux'\r\nimport { getTimeMeasureUtils } from './utils'\r\n\r\ntype EntryProcessor = (key: string, value: any) => any\r\n\r\nconst isProduction: boolean = process.env.NODE_ENV === 'production'\r\nconst prefix: string = 'Invariant failed'\r\n\r\n// Throw an error if the condition fails\r\n// Strip out error messages for production\r\n// > Not providing an inline default argument for message as the result is smaller\r\nfunction invariant(condition: any, message?: string) {\r\n if (condition) {\r\n return\r\n }\r\n // Condition not passed\r\n\r\n // In production we strip the message but still throw\r\n if (isProduction) {\r\n throw new Error(prefix)\r\n }\r\n\r\n // When not in production we allow the message to pass through\r\n // *This block will be removed in production builds*\r\n throw new Error(`${prefix}: ${message || ''}`)\r\n}\r\n\r\nfunction stringify(\r\n obj: any,\r\n serializer?: EntryProcessor,\r\n indent?: string | number,\r\n decycler?: EntryProcessor\r\n): string {\r\n return JSON.stringify(obj, getSerialize(serializer, decycler), indent)\r\n}\r\n\r\nfunction getSerialize(\r\n serializer?: EntryProcessor,\r\n decycler?: EntryProcessor\r\n): EntryProcessor {\r\n let stack: any[] = [],\r\n keys: any[] = []\r\n\r\n if (!decycler)\r\n decycler = function (_: string, value: any) {\r\n if (stack[0] === value) return '[Circular ~]'\r\n return (\r\n '[Circular ~.' + keys.slice(0, stack.indexOf(value)).join('.') + ']'\r\n )\r\n }\r\n\r\n return function (this: any, key: string, value: any) {\r\n if (stack.length > 0) {\r\n var thisPos = stack.indexOf(this)\r\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)\r\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)\r\n if (~stack.indexOf(value)) value = decycler!.call(this, key, value)\r\n } else stack.push(value)\r\n\r\n return serializer == null ? value : serializer.call(this, key, value)\r\n }\r\n}\r\n\r\n/**\r\n * The default `isImmutable` function.\r\n *\r\n * @public\r\n */\r\nexport function isImmutableDefault(value: unknown): boolean {\r\n return (\r\n typeof value !== 'object' ||\r\n value === null ||\r\n typeof value === 'undefined' ||\r\n Object.isFrozen(value)\r\n )\r\n}\r\n\r\nexport function trackForMutations(\r\n isImmutable: IsImmutableFunc,\r\n ignorePaths: string[] | undefined,\r\n obj: any\r\n) {\r\n const trackedProperties = trackProperties(isImmutable, ignorePaths, obj)\r\n return {\r\n detectMutations() {\r\n return detectMutations(isImmutable, ignorePaths, trackedProperties, obj)\r\n },\r\n }\r\n}\r\n\r\ninterface TrackedProperty {\r\n value: any\r\n children: Record<string, any>\r\n}\r\n\r\nfunction trackProperties(\r\n isImmutable: IsImmutableFunc,\r\n ignorePaths: IgnorePaths = [],\r\n obj: Record<string, any>,\r\n path: string = ''\r\n) {\r\n const tracked: Partial<TrackedProperty> = { value: obj }\r\n\r\n if (!isImmutable(obj)) {\r\n tracked.children = {}\r\n\r\n for (const key in obj) {\r\n const childPath = path ? path + '.' + key : key\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue\r\n }\r\n\r\n tracked.children[key] = trackProperties(\r\n isImmutable,\r\n ignorePaths,\r\n obj[key],\r\n childPath\r\n )\r\n }\r\n }\r\n return tracked as TrackedProperty\r\n}\r\n\r\ntype IgnorePaths = readonly string[]\r\n\r\nfunction detectMutations(\r\n isImmutable: IsImmutableFunc,\r\n ignorePaths: IgnorePaths = [],\r\n trackedProperty: TrackedProperty,\r\n obj: any,\r\n sameParentRef: boolean = false,\r\n path: string = ''\r\n): { wasMutated: boolean; path?: string } {\r\n const prevObj = trackedProperty ? trackedProperty.value : undefined\r\n\r\n const sameRef = prevObj === obj\r\n\r\n if (sameParentRef && !sameRef && !Number.isNaN(obj)) {\r\n return { wasMutated: true, path }\r\n }\r\n\r\n if (isImmutable(prevObj) || isImmutable(obj)) {\r\n return { wasMutated: false }\r\n }\r\n\r\n // Gather all keys from prev (tracked) and after objs\r\n const keysToDetect: Record<string, boolean> = {}\r\n for (let key in trackedProperty.children) {\r\n keysToDetect[key] = true\r\n }\r\n for (let key in obj) {\r\n keysToDetect[key] = true\r\n }\r\n\r\n for (let key in keysToDetect) {\r\n const childPath = path ? path + '.' + key : key\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue\r\n }\r\n\r\n const result = detectMutations(\r\n isImmutable,\r\n ignorePaths,\r\n trackedProperty.children[key],\r\n obj[key],\r\n sameRef,\r\n childPath\r\n )\r\n\r\n if (result.wasMutated) {\r\n return result\r\n }\r\n }\r\n return { wasMutated: false }\r\n}\r\n\r\ntype IsImmutableFunc = (value: any) => boolean\r\n\r\n/**\r\n * Options for `createImmutableStateInvariantMiddleware()`.\r\n *\r\n * @public\r\n */\r\nexport interface ImmutableStateInvariantMiddlewareOptions {\r\n /**\r\n Callback function to check if a value is considered to be immutable.\r\n This function is applied recursively to every value contained in the state.\r\n The default implementation will return true for primitive types \r\n (like numbers, strings, booleans, null and undefined).\r\n */\r\n isImmutable?: IsImmutableFunc\r\n /** \r\n An array of dot-separated path strings that match named nodes from \r\n the root state to ignore when checking for immutability.\r\n Defaults to undefined\r\n */\r\n ignoredPaths?: string[]\r\n /** Print a warning if checks take longer than N ms. Default: 32ms */\r\n warnAfter?: number\r\n // @deprecated. Use ignoredPaths\r\n ignore?: string[]\r\n}\r\n\r\n/**\r\n * Creates a middleware that checks whether any state was mutated in between\r\n * dispatches or during a dispatch. If any mutations are detected, an error is\r\n * thrown.\r\n *\r\n * @param options Middleware options.\r\n *\r\n * @public\r\n */\r\nexport function createImmutableStateInvariantMiddleware(\r\n options: ImmutableStateInvariantMiddlewareOptions = {}\r\n): Middleware {\r\n if (process.env.NODE_ENV === 'production') {\r\n return () => (next) => (action) => next(action)\r\n }\r\n\r\n let {\r\n isImmutable = isImmutableDefault,\r\n ignoredPaths,\r\n warnAfter = 32,\r\n ignore,\r\n } = options\r\n\r\n // Alias ignore->ignoredPaths, but prefer ignoredPaths if present\r\n ignoredPaths = ignoredPaths || ignore\r\n\r\n const track = trackForMutations.bind(null, isImmutable, ignoredPaths)\r\n\r\n return ({ getState }) => {\r\n let state = getState()\r\n let tracker = track(state)\r\n\r\n let result\r\n return (next) => (action) => {\r\n const measureUtils = getTimeMeasureUtils(\r\n warnAfter,\r\n 'ImmutableStateInvariantMiddleware'\r\n )\r\n\r\n measureUtils.measureTime(() => {\r\n state = getState()\r\n\r\n result = tracker.detectMutations()\r\n // Track before potentially not meeting the invariant\r\n tracker = track(state)\r\n\r\n invariant(\r\n !result.wasMutated,\r\n `A state mutation was detected between dispatches, in the path '${\r\n result.path || ''\r\n }'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`\r\n )\r\n })\r\n\r\n const dispatchedAction = next(action)\r\n\r\n measureUtils.measureTime(() => {\r\n state = getState()\r\n\r\n result = tracker.detectMutations()\r\n // Track before potentially not meeting the invariant\r\n tracker = track(state)\r\n\r\n result.wasMutated &&\r\n invariant(\r\n !result.wasMutated,\r\n `A state mutation was detected inside a dispatch, in the path: ${\r\n result.path || ''\r\n }. Take a look at the reducer(s) handling the action ${stringify(\r\n action\r\n )}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`\r\n )\r\n })\r\n\r\n measureUtils.warnIfExceeded()\r\n\r\n return dispatchedAction\r\n }\r\n }\r\n}\r\n","import isPlainObject from './isPlainObject'\r\nimport type { Middleware } from 'redux'\r\nimport { getTimeMeasureUtils } from './utils'\r\n\r\n/**\r\n * Returns true if the passed value is \"plain\", i.e. a value that is either\r\n * directly JSON-serializable (boolean, number, string, array, plain object)\r\n * or `undefined`.\r\n *\r\n * @param val The value to check.\r\n *\r\n * @public\r\n */\r\nexport function isPlain(val: any) {\r\n const type = typeof val\r\n return (\r\n type === 'undefined' ||\r\n val === null ||\r\n type === 'string' ||\r\n type === 'boolean' ||\r\n type === 'number' ||\r\n Array.isArray(val) ||\r\n isPlainObject(val)\r\n )\r\n}\r\n\r\ninterface NonSerializableValue {\r\n keyPath: string\r\n value: unknown\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport function findNonSerializableValue(\r\n value: unknown,\r\n path: string = '',\r\n isSerializable: (value: unknown) => boolean = isPlain,\r\n getEntries?: (value: unknown) => [string, any][],\r\n ignoredPaths: readonly string[] = []\r\n): NonSerializableValue | false {\r\n let foundNestedSerializable: NonSerializableValue | false\r\n\r\n if (!isSerializable(value)) {\r\n return {\r\n keyPath: path || '<root>',\r\n value: value,\r\n }\r\n }\r\n\r\n if (typeof value !== 'object' || value === null) {\r\n return false\r\n }\r\n\r\n const entries = getEntries != null ? getEntries(value) : Object.entries(value)\r\n\r\n const hasIgnoredPaths = ignoredPaths.length > 0\r\n\r\n for (const [key, nestedValue] of entries) {\r\n const nestedPath = path ? path + '.' + key : key\r\n\r\n if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) {\r\n continue\r\n }\r\n\r\n if (!isSerializable(nestedValue)) {\r\n return {\r\n keyPath: nestedPath,\r\n value: nestedValue,\r\n }\r\n }\r\n\r\n if (typeof nestedValue === 'object') {\r\n foundNestedSerializable = findNonSerializableValue(\r\n nestedValue,\r\n nestedPath,\r\n isSerializable,\r\n getEntries,\r\n ignoredPaths\r\n )\r\n\r\n if (foundNestedSerializable) {\r\n return foundNestedSerializable\r\n }\r\n }\r\n }\r\n\r\n return false\r\n}\r\n\r\n/**\r\n * Options for `createSerializableStateInvariantMiddleware()`.\r\n *\r\n * @public\r\n */\r\nexport interface SerializableStateInvariantMiddlewareOptions {\r\n /**\r\n * The function to check if a value is considered serializable. This\r\n * function is applied recursively to every value contained in the\r\n * state. Defaults to `isPlain()`.\r\n */\r\n isSerializable?: (value: any) => boolean\r\n /**\r\n * The function that will be used to retrieve entries from each\r\n * value. If unspecified, `Object.entries` will be used. Defaults\r\n * to `undefined`.\r\n */\r\n getEntries?: (value: any) => [string, any][]\r\n\r\n /**\r\n * An array of action types to ignore when checking for serializability.\r\n * Defaults to []\r\n */\r\n ignoredActions?: string[]\r\n\r\n /**\r\n * An array of dot-separated path strings to ignore when checking\r\n * for serializability, Defaults to ['meta.arg']\r\n */\r\n ignoredActionPaths?: string[]\r\n\r\n /**\r\n * An array of dot-separated path strings to ignore when checking\r\n * for serializability, Defaults to []\r\n */\r\n ignoredPaths?: string[]\r\n /**\r\n * Execution time warning threshold. If the middleware takes longer\r\n * than `warnAfter` ms, a warning will be displayed in the console.\r\n * Defaults to 32ms.\r\n */\r\n warnAfter?: number\r\n\r\n /**\r\n * Opt out of checking state, but continue checking actions\r\n */\r\n ignoreState?: boolean\r\n}\r\n\r\n/**\r\n * Creates a middleware that, after every state change, checks if the new\r\n * state is serializable. If a non-serializable value is found within the\r\n * state, an error is printed to the console.\r\n *\r\n * @param options Middleware options.\r\n *\r\n * @public\r\n */\r\nexport function createSerializableStateInvariantMiddleware(\r\n options: SerializableStateInvariantMiddlewareOptions = {}\r\n): Middleware {\r\n if (process.env.NODE_ENV === 'production') {\r\n return () => (next) => (action) => next(action)\r\n }\r\n const {\r\n isSerializable = isPlain,\r\n getEntries,\r\n ignoredActions = [],\r\n ignoredActionPaths = ['meta.arg', 'meta.baseQueryMeta'],\r\n ignoredPaths = [],\r\n warnAfter = 32,\r\n ignoreState = false,\r\n } = options\r\n\r\n return (storeAPI) => (next) => (action) => {\r\n if (ignoredActions.length && ignoredActions.indexOf(action.type) !== -1) {\r\n return next(action)\r\n }\r\n\r\n const measureUtils = getTimeMeasureUtils(\r\n warnAfter,\r\n 'SerializableStateInvariantMiddleware'\r\n )\r\n measureUtils.measureTime(() => {\r\n const foundActionNonSerializableValue = findNonSerializableValue(\r\n action,\r\n '',\r\n isSerializable,\r\n getEntries,\r\n ignoredActionPaths\r\n )\r\n\r\n if (foundActionNonSerializableValue) {\r\n const { keyPath, value } = foundActionNonSerializableValue\r\n\r\n console.error(\r\n `A non-serializable value was detected in an action, in the path: \\`${keyPath}\\`. Value:`,\r\n value,\r\n '\\nTake a look at the logic that dispatched this action: ',\r\n action,\r\n '\\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)',\r\n '\\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)'\r\n )\r\n }\r\n })\r\n\r\n const result = next(action)\r\n\r\n if (!ignoreState) {\r\n measureUtils.measureTime(() => {\r\n const state = storeAPI.getState()\r\n\r\n const foundStateNonSerializableValue = findNonSerializableValue(\r\n state,\r\n '',\r\n isSerializable,\r\n getEntries,\r\n ignoredPaths\r\n )\r\n\r\n if (foundStateNonSerializableValue) {\r\n const { keyPath, value } = foundStateNonSerializableValue\r\n\r\n console.error(\r\n `A non-serializable value was detected in the state, in the path: \\`${keyPath}\\`. Value:`,\r\n value,\r\n `\r\nTake a look at the reducer(s) handling this action type: ${action.type}.\r\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`\r\n )\r\n }\r\n })\r\n\r\n measureUtils.warnIfExceeded()\r\n }\r\n\r\n return result\r\n }\r\n}\r\n","import type { Action } from 'redux'\r\nimport type {\r\n IsUnknownOrNonInferrable,\r\n IfMaybeUndefined,\r\n IfVoid,\r\n IsAny,\r\n} from './tsHelpers'\r\nimport isPlainObject from './isPlainObject'\r\n\r\n/**\r\n * An action with a string type and an associated payload. This is the\r\n * type of action returned by `createAction()` action creators.\r\n *\r\n * @template P The type of the action's payload.\r\n * @template T the type used for the action type.\r\n * @template M The type of the action's meta (optional)\r\n * @template E The type of the action's error (optional)\r\n *\r\n * @public\r\n */\r\nexport type PayloadAction<\r\n P = void,\r\n T extends string = string,\r\n M = never,\r\n E = never\r\n> = {\r\n payload: P\r\n type: T\r\n} & ([M] extends [never]\r\n ? {}\r\n : {\r\n meta: M\r\n }) &\r\n ([E] extends [never]\r\n ? {}\r\n : {\r\n error: E\r\n })\r\n\r\n/**\r\n * A \"prepare\" method to be used as the second parameter of `createAction`.\r\n * Takes any number of arguments and returns a Flux Standard Action without\r\n * type (will be added later) that *must* contain a payload (might be undefined).\r\n *\r\n * @public\r\n */\r\nexport type PrepareAction<P> =\r\n | ((...args: any[]) => { payload: P })\r\n | ((...args: any[]) => { payload: P; meta: any })\r\n | ((...args: any[]) => { payload: P; error: any })\r\n | ((...args: any[]) => { payload: P; meta: any; error: any })\r\n\r\n/**\r\n * Internal version of `ActionCreatorWithPreparedPayload`. Not to be used externally.\r\n *\r\n * @internal\r\n */\r\nexport type _ActionCreatorWithPreparedPayload<\r\n PA extends PrepareAction<any> | void,\r\n T extends string = string\r\n> = PA extends PrepareAction<infer P>\r\n ? ActionCreatorWithPreparedPayload<\r\n Parameters<PA>,\r\n P,\r\n T,\r\n ReturnType<PA> extends {\r\n error: infer E\r\n }\r\n ? E\r\n : never,\r\n ReturnType<PA> extends {\r\n meta: infer M\r\n }\r\n ? M\r\n : never\r\n >\r\n : void\r\n\r\n/**\r\n * Basic type for all action creators.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n */\r\ninterface BaseActionCreator<P, T extends string, M = never, E = never> {\r\n type: T\r\n match: (action: Action<unknown>) => action is PayloadAction<P, T, M, E>\r\n}\r\n\r\n/**\r\n * An action creator that takes multiple arguments that are passed\r\n * to a `PrepareAction` method to create the final Action.\r\n * @typeParam Args arguments for the action creator function\r\n * @typeParam P `payload` type\r\n * @typeParam T `type` name\r\n * @typeParam E optional `error` type\r\n * @typeParam M optional `meta` type\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithPreparedPayload<\r\n Args extends unknown[],\r\n P,\r\n T extends string = string,\r\n E = never,\r\n M = never\r\n> extends BaseActionCreator<P, T, M, E> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with `Args` will return\r\n * an Action with a payload of type `P` and (depending on the `PrepareAction`\r\n * method used) a `meta`- and `error` property of types `M` and `E` respectively.\r\n */\r\n (...args: Args): PayloadAction<P, T, M, E>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that takes an optional payload of type `P`.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithOptionalPayload<P, T extends string = string>\r\n extends BaseActionCreator<P, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload of `P`.\r\n * Calling it without an argument will return a PayloadAction with a payload of `undefined`.\r\n */\r\n (payload?: P): PayloadAction<P, T>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that takes no payload.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithoutPayload<T extends string = string>\r\n extends BaseActionCreator<undefined, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} will\r\n * return a {@link PayloadAction} of type `T` with a payload of `undefined`\r\n */\r\n (): PayloadAction<undefined, T>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that requires a payload of type P.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithPayload<P, T extends string = string>\r\n extends BaseActionCreator<P, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload of `P`\r\n */\r\n (payload: P): PayloadAction<P, T>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` whose `payload` type could not be inferred. Accepts everything as `payload`.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithNonInferrablePayload<\r\n T extends string = string\r\n> extends BaseActionCreator<unknown, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload\r\n * of exactly the type of the argument.\r\n */\r\n <PT extends unknown>(payload: PT): PayloadAction<PT, T>\r\n}\r\n\r\n/**\r\n * An action creator that produces actions with a `payload` attribute.\r\n *\r\n * @typeParam P the `payload` type\r\n * @typeParam T the `type` of the resulting action\r\n * @typeParam PA if the resulting action is preprocessed by a `prepare` method, the signature of said method.\r\n *\r\n * @public\r\n */\r\nexport type PayloadActionCreator<\r\n P = void,\r\n T extends string = string,\r\n PA extends PrepareAction<P> | void = void\r\n> = IfPrepareActionMethodProvided<\r\n PA,\r\n _ActionCreatorWithPreparedPayload<PA, T>,\r\n // else\r\n IsAny<\r\n P,\r\n ActionCreatorWithPayload<any, T>,\r\n IsUnknownOrNonInferrable<\r\n P,\r\n ActionCreatorWithNonInferrablePayload<T>,\r\n // else\r\n IfVoid<\r\n P,\r\n ActionCreatorWithoutPayload<T>,\r\n // else\r\n IfMaybeUndefined<\r\n P,\r\n ActionCreatorWithOptionalPayload<P, T>,\r\n // else\r\n ActionCreatorWithPayload<P, T>\r\n >\r\n >\r\n >\r\n >\r\n>\r\n\r\n/**\r\n * A utility function to create an action creator for the given action type\r\n * string. The action creator accepts a single argument, which will be included\r\n * in the action object as a field called payload. The action creator function\r\n * will also have its toString() overriden so that it returns the action type,\r\n * allowing it to be used in reducer logic that is looking for that action type.\r\n *\r\n * @param type The action type to use for created actions.\r\n * @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.\r\n * If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.\r\n *\r\n * @public\r\n */\r\nexport function createAction<P = void, T extends string = string>(\r\n type: T\r\n): PayloadActionCreator<P, T>\r\n\r\n/**\r\n * A utility function to create an action creator for the given action type\r\n * string. The action creator accepts a single argument, which will be included\r\n * in the action object as a field called payload. The action creator function\r\n * will also have its toString() overriden so that it returns the action type,\r\n * allowing it to be used in reducer logic that is looking for that action type.\r\n *\r\n * @param type The action type to use for created actions.\r\n * @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.\r\n * If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.\r\n *\r\n * @public\r\n */\r\nexport function createAction<\r\n PA extends PrepareAction<any>,\r\n T extends string = string\r\n>(\r\n type: T,\r\n prepareAction: PA\r\n): PayloadActionCreator<ReturnType<PA>['payload'], T, PA>\r\n\r\nexport function createAction(type: string, prepareAction?: Function): any {\r\n function actionCreator(...args: any[]) {\r\n if (prepareAction) {\r\n let prepared = prepareAction(...args)\r\n if (!prepared) {\r\n throw new Error('prepareAction did not return an object')\r\n }\r\n\r\n return {\r\n type,\r\n payload: prepared.payload,\r\n ...('meta' in prepared && { meta: prepared.meta }),\r\n ...('error' in prepared && { error: prepared.error }),\r\n }\r\n }\r\n return { type, payload: args[0] }\r\n }\r\n\r\n actionCreator.toString = () => `${type}`\r\n\r\n actionCreator.type = type\r\n\r\n actionCreator.match = (action: Action<unknown>): action is PayloadAction =>\r\n action.type === type\r\n\r\n return actionCreator\r\n}\r\n\r\nexport function isFSA(action: unknown): action is {\r\n type: string\r\n payload?: unknown\r\n error?: unknown\r\n meta?: unknown\r\n} {\r\n return (\r\n isPlainObject(action) &&\r\n typeof (action as any).type === 'string' &&\r\n Object.keys(action).every(isValidKey)\r\n )\r\n}\r\n\r\nfunction isValidKey(key: string) {\r\n return ['type', 'payload', 'error', 'meta'].indexOf(key) > -1\r\n}\r\n\r\n/**\r\n * Returns the action type of the actions created by the passed\r\n * `createAction()`-generated action creator (arbitrary action creators\r\n * are not supported).\r\n *\r\n * @param action The action creator whose action type to get.\r\n * @returns The action type used by the action creator.\r\n *\r\n * @public\r\n */\r\nexport function getType<T extends string>(\r\n actionCreator: PayloadActionCreator<any, T>\r\n): T {\r\n return `${actionCreator}` as T\r\n}\r\n\r\n// helper types for more readable typings\r\n\r\ntype IfPrepareActionMethodProvided<\r\n PA extends PrepareAction<any> | void,\r\n True,\r\n False\r\n> = PA extends (...args: any[]) => any ? True : False\r\n","import type { Draft } from 'immer'\r\nimport createNextState, { isDraft, isDraftable } from 'immer'\r\nimport type { AnyAction, Action, Reducer } from 'redux'\r\nimport type { ActionReducerMapBuilder } from './mapBuilders'\r\nimport { executeReducerBuilderCallback } from './mapBuilders'\r\nimport type { NoInfer } from './tsHelpers'\r\n\r\n/**\r\n * Defines a mapping from action types to corresponding action object shapes.\r\n *\r\n * @deprecated This should not be used manually - it is only used for internal\r\n * inference purposes and should not have any further value.\r\n * It might be removed in the future.\r\n * @public\r\n */\r\nexport type Actions<T extends keyof any = string> = Record<T, Action>\r\n\r\nexport interface ActionMatcher<A extends AnyAction> {\r\n (action: AnyAction): action is A\r\n}\r\n\r\nexport type ActionMatcherDescription<S, A extends AnyAction> = {\r\n matcher: ActionMatcher<A>\r\n reducer: CaseReducer<S, NoInfer<A>>\r\n}\r\n\r\nexport type ReadonlyActionMatcherDescriptionCollection<S> = ReadonlyArray<\r\n ActionMatcherDescription<S, any>\r\n>\r\n\r\nexport type ActionMatcherDescriptionCollection<S> = Array<\r\n ActionMatcherDescription<S, any>\r\n>\r\n\r\n/**\r\n * An *case reducer* is a reducer function for a specific action type. Case\r\n * reducers can be composed to full reducers using `createReducer()`.\r\n *\r\n * Unlike a normal Redux reducer, a case reducer is never called with an\r\n * `undefined` state to determine the initial state. Instead, the initial\r\n * state is explicitly specified as an argument to `createReducer()`.\r\n *\r\n * In addition, a case reducer can choose to mutate the passed-in `state`\r\n * value directly instead of returning a new state. This does not actually\r\n * cause the store state to be mutated directly; instead, thanks to\r\n * [immer](https://github.com/mweststrate/immer), the mutations are\r\n * translated to copy operations that result in a new state.\r\n *\r\n * @public\r\n */\r\nexport type CaseReducer<S = any, A extends Action = AnyAction> = (\r\n state: Draft<S>,\r\n action: A\r\n) => S | void | Draft<S>\r\n\r\n/**\r\n * A mapping from action types to case reducers for `createReducer()`.\r\n *\r\n * @deprecated This should not be used manually - it is only used\r\n * for internal inference purposes and using it manually\r\n * would lead to type erasure.\r\n * It might be removed in the future.\r\n * @public\r\n */\r\nexport type CaseReducers<S, AS extends Actions> = {\r\n [T in keyof AS]: AS[T] extends Action ? CaseReducer<S, AS[T]> : void\r\n}\r\n\r\n/**\r\n * A utility function that allows defining a reducer as a mapping from action\r\n * type to *case reducer* functions that handle these action types. The\r\n * reducer's initial state is passed as the first argument.\r\n *\r\n * @remarks\r\n * The body of every case reducer is implicitly wrapped with a call to\r\n * `produce()` from the [immer](https://github.com/mweststrate/immer) library.\r\n * This means that rather than returning a new state object, you can also\r\n * mutate the passed-in state object directly; these mutations will then be\r\n * automatically and efficiently translated into copies, giving you both\r\n * convenience and immutability.\r\n *\r\n * @overloadSummary\r\n * This overload accepts a callback function that receives a `builder` object as its argument.\r\n * That builder provides `addCase`, `addMatcher` and `addDefaultCase` functions that may be\r\n * called to define what actions this reducer will handle.\r\n *\r\n * @param initialState - The initial state that should be used when the reducer is called the first time.\r\n * @param builderCallback - A callback that receives a *builder* object to define\r\n * case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`.\r\n * @example\r\n```ts\r\nimport {\r\n createAction,\r\n createReducer,\r\n AnyAction,\r\n PayloadAction,\r\n} from \"@reduxjs/toolkit\";\r\n\r\nconst increment = createAction<number>(\"increment\");\r\nconst decrement = createAction<number>(\"decrement\");\r\n\r\nfunction isActionWithNumberPayload(\r\n action: AnyAction\r\n): action is PayloadAction<number> {\r\n return typeof action.payload === \"number\";\r\n}\r\n\r\ncreateReducer(\r\n {\r\n counter: 0,\r\n sumOfNumberPayloads: 0,\r\n unhandledActions: 0,\r\n },\r\n (builder) => {\r\n builder\r\n .addCase(increment, (state, action) => {\r\n // action is inferred correctly here\r\n state.counter += action.payload;\r\n })\r\n // You can chain calls, or have separate `builder.addCase()` lines each time\r\n .addCase(decrement, (state, action) => {\r\n state.counter -= action.payload;\r\n })\r\n // You can apply a \"matcher function\" to incoming actions\r\n .addMatcher(isActionWithNumberPayload, (state, action) => {})\r\n // and provide a default case if no other handlers matched\r\n .addDefaultCase((state, action) => {});\r\n }\r\n);\r\n```\r\n * @public\r\n */\r\nexport function createReducer<S>(\r\n initialState: S,\r\n builderCallback: (builder: ActionReducerMapBuilder<S>) => void\r\n): Reducer<S>\r\n\r\n/**\r\n * A utility function that allows defining a reducer as a mapping from action\r\n * type to *case reducer* functions that handle these action types. The\r\n * reducer's initial state is passed as the first argument.\r\n *\r\n * The body of every case reducer is implicitly wrapped with a call to\r\n * `produce()` from the [immer](https://github.com/mweststrate/immer) library.\r\n * This means that rather than returning a new state object, you can also\r\n * mutate the passed-in state object directly; these mutations will then be\r\n * automatically and efficiently translated into copies, giving you both\r\n * convenience and immutability.\r\n * \r\n * @overloadSummary\r\n * This overload accepts an object where the keys are string action types, and the values\r\n * are case reducer functions to handle those action types.\r\n *\r\n * @param initialState - The initial state that should be used when the reducer is called the first time.\r\n * @param actionsMap - An object mapping from action types to _case reducers_, each of which handles one specific action type.\r\n * @param actionMatchers - An array of matcher definitions in the form `{matcher, reducer}`.\r\n * All matching reducers will be executed in order, independently if a case reducer matched or not.\r\n * @param defaultCaseReducer - A \"default case\" reducer that is executed if no case reducer and no matcher\r\n * reducer was executed for this action.\r\n *\r\n * @example\r\n```js\r\nconst counterReducer = createReducer(0, {\r\n increment: (state, action) => state + action.payload,\r\n decrement: (state, action) => state - action.payload\r\n})\r\n```\r\n \r\n * Action creators that were generated using [`createAction`](./createAction) may be used directly as the keys here, using computed property syntax:\r\n\r\n```js\r\nconst increment = createAction('increment')\r\nconst decrement = createAction('decrement')\r\n\r\nconst counterReducer = createReducer(0, {\r\n [increment]: (state, action) => state + action.payload,\r\n [decrement.type]: (state, action) => state - action.payload\r\n})\r\n```\r\n * @public\r\n */\r\nexport function createReducer<\r\n S,\r\n CR extends CaseReducers<S, any> = CaseReducers<S, any>\r\n>(\r\n initialState: S,\r\n actionsMap: CR,\r\n actionMatchers?: ActionMatcherDescriptionCollection<S>,\r\n defaultCaseReducer?: CaseReducer<S>\r\n): Reducer<S>\r\n\r\nexport function createReducer<S>(\r\n initialState: S,\r\n mapOrBuilderCallback:\r\n | CaseReducers<S, any>\r\n | ((builder: ActionReducerMapBuilder<S>) => void),\r\n actionMatchers: ReadonlyActionMatcherDescriptionCollection<S> = [],\r\n defaultCaseReducer?: CaseReducer<S>\r\n): Reducer<S> {\r\n let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] =\r\n typeof mapOrBuilderCallback === 'function'\r\n ? executeReducerBuilderCallback(mapOrBuilderCallback)\r\n : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer]\r\n\r\n const frozenInitialState = createNextState(initialState, () => {})\r\n\r\n return function (state = frozenInitialState, action): S {\r\n let caseReducers = [\r\n actionsMap[action.type],\r\n ...finalActionMatchers\r\n .filter(({ matcher }) => matcher(action))\r\n .map(({ reducer }) => reducer),\r\n ]\r\n if (caseReducers.filter((cr) => !!cr).length === 0) {\r\n caseReducers = [finalDefaultCaseReducer]\r\n }\r\n\r\n return caseReducers.reduce((previousState, caseReducer): S => {\r\n if (caseReducer) {\r\n if (isDraft(previousState)) {\r\n // If it's already a draft, we must already be inside a `createNextState` call,\r\n // likely because this is being wrapped in `createReducer`, `createSlice`, or nested\r\n // inside an existing draft. It's safe to just pass the draft to the mutator.\r\n const draft = previousState as Draft<S> // We can assume this is already a draft\r\n const result = caseReducer(draft, action)\r\n\r\n if (typeof result === 'undefined') {\r\n return previousState\r\n }\r\n\r\n return result as S\r\n } else if (!isDraftable(previousState)) {\r\n // If state is not draftable (ex: a primitive, such as 0), we want to directly\r\n // return the caseReducer func and not wrap it with produce.\r\n const result = caseReducer(previousState as any, action)\r\n\r\n if (typeof result === 'undefined') {\r\n if (previousState === null) {\r\n return previousState\r\n }\r\n throw Error(\r\n 'A case reducer on a non-draftable value must not return undefined'\r\n )\r\n }\r\n\r\n return result as S\r\n } else {\r\n // @ts-ignore createNextState() produces an Immutable<Draft<S>> rather\r\n // than an Immutable<S>, and TypeScript cannot find out how to reconcile\r\n // these two types.\r\n return createNextState(previousState, (draft: Draft<S>) => {\r\n return caseReducer(draft, action)\r\n })\r\n }\r\n }\r\n\r\n return previousState\r\n }, state)\r\n }\r\n}\r\n","import type { Action, AnyAction } from 'redux'\r\nimport type {\r\n CaseReducer,\r\n CaseReducers,\r\n ActionMatcher,\r\n ActionMatcherDescriptionCollection,\r\n} from './createReducer'\r\n\r\nexport interface TypedActionCreator<Type extends string> {\r\n (...args: any[]): Action<Type>\r\n type: Type\r\n}\r\n\r\n/**\r\n * A builder for an action <-> reducer map.\r\n *\r\n * @public\r\n */\r\nexport interface ActionReducerMapBuilder<State> {\r\n /**\r\n * Adds a case reducer to handle a single exact action type.\r\n * @remarks\r\n * All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`.\r\n * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\r\n * @param reducer - The actual case reducer function.\r\n */\r\n addCase<ActionCreator extends TypedActionCreator<string>>(\r\n actionCreator: ActionCreator,\r\n reducer: CaseReducer<State, ReturnType<ActionCreator>>\r\n ): ActionReducerMapBuilder<State>\r\n /**\r\n * Adds a case reducer to handle a single exact action type.\r\n * @remarks\r\n * All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`.\r\n * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\r\n * @param reducer - The actual case reducer function.\r\n */\r\n addCase<Type extends string, A extends Action<Type>>(\r\n type: Type,\r\n reducer: CaseReducer<State, A>\r\n ): ActionReducerMapBuilder<State>\r\n\r\n /**\r\n * Allows you to match your incoming actions against your own filter function instead of only the `action.type` property.\r\n * @remarks\r\n * If multiple matcher reducers match, all of them will be executed in the order\r\n * they were defined in - even if a case reducer already matched.\r\n * All calls to `builder.addMatcher` must come after any calls to `builder.addCase` and before any calls to `builder.addDefaultCase`.\r\n * @param matcher - A matcher function. In TypeScript, this should be a [type predicate](https://www.typescriptlang.org/docs/handbook/advanced-types.html#using-type-predicates)\r\n * function\r\n * @param reducer - The actual case reducer function.\r\n *\r\n * @example\r\n```ts\r\nimport {\r\n createAction,\r\n createReducer,\r\n AsyncThunk,\r\n AnyAction,\r\n} from \"@reduxjs/toolkit\";\r\n\r\ntype GenericAsyncThunk = AsyncThunk<unknown, unknown, any>;\r\n\r\ntype PendingAction = ReturnType<GenericAsyncThunk[\"pending\"]>;\r\ntype RejectedAction = ReturnType<GenericAsyncThunk[\"rejected\"]>;\r\ntype FulfilledAction = ReturnType<GenericAsyncThunk[\"fulfilled\"]>;\r\n\r\nconst initialState: Record<string, string> = {};\r\nconst resetAction = createAction(\"reset-tracked-loading-state\");\r\n\r\nfunction isPendingAction(action: AnyAction): action is PendingAction {\r\n return action.type.endsWith(\"/pending\");\r\n}\r\n\r\nconst reducer = createReducer(initialState, (builder) => {\r\n builder\r\n .addCase(resetAction, () => initialState)\r\n // matcher can be defined outside as a type predicate function\r\n .addMatcher(isPendingAction, (state, action) => {\r\n state[action.meta.requestId] = \"pending\";\r\n })\r\n .addMatcher(\r\n // matcher can be defined inline as a type predicate function\r\n (action): action is RejectedAction => action.type.endsWith(\"/rejected\"),\r\n (state, action) => {\r\n state[action.meta.requestId] = \"rejected\";\r\n }\r\n )\r\n // matcher can just return boolean and the matcher can receive a generic argument\r\n .addMatcher<FulfilledAction>(\r\n (action) => action.type.endsWith(\"/fulfilled\"),\r\n (state, action) => {\r\n state[action.meta.requestId] = \"fulfilled\";\r\n }\r\n );\r\n});\r\n```\r\n */\r\n addMatcher<A extends AnyAction>(\r\n matcher: ActionMatcher<A> | ((action: AnyAction) => boolean),\r\n reducer: CaseReducer<State, A>\r\n ): Omit<ActionReducerMapBuilder<State>, 'addCase'>\r\n\r\n /**\r\n * Adds a \"default case\" reducer that is executed if no case reducer and no matcher\r\n * reducer was executed for this action.\r\n * @param reducer - The fallback \"default case\" reducer function.\r\n *\r\n * @example\r\n```ts\r\nimport { createReducer } from '@reduxjs/toolkit'\r\nconst initialState = { otherActions: 0 }\r\nconst reducer = createReducer(initialState, builder => {\r\n builder\r\n // .addCase(...)\r\n // .addMatcher(...)\r\n .addDefaultCase((state, action) => {\r\n state.otherActions++\r\n })\r\n})\r\n```\r\n */\r\n addDefaultCase(reducer: CaseReducer<State, AnyAction>): {}\r\n}\r\n\r\nexport function executeReducerBuilderCallback<S>(\r\n builderCallback: (builder: ActionReducerMapBuilder<S>) => void\r\n): [\r\n CaseReducers<S, any>,\r\n ActionMatcherDescriptionCollection<S>,\r\n CaseReducer<S, AnyAction> | undefined\r\n] {\r\n const actionsMap: CaseReducers<S, any> = {}\r\n const actionMatchers: ActionMatcherDescriptionCollection<S> = []\r\n let defaultCaseReducer: CaseReducer<S, AnyAction> | undefined\r\n const builder = {\r\n addCase(\r\n typeOrActionCreator: string | TypedActionCreator<any>,\r\n reducer: CaseReducer<S>\r\n ) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n /*\r\n to keep the definition by the user in line with actual behavior, \r\n we enforce `addCase` to always be called before calling `addMatcher`\r\n as matching cases take precedence over matchers\r\n */\r\n if (actionMatchers.length > 0) {\r\n throw new Error(\r\n '`builder.addCase` should only be called before calling `builder.addMatcher`'\r\n )\r\n }\r\n if (defaultCaseReducer) {\r\n throw new Error(\r\n '`builder.addCase` should only be called before calling `builder.addDefaultCase`'\r\n )\r\n }\r\n }\r\n const type =\r\n typeof typeOrActionCreator === 'string'\r\n ? typeOrActionCreator\r\n : typeOrActionCreator.type\r\n if (type in actionsMap) {\r\n throw new Error(\r\n 'addCase cannot be called with two reducers for the same action type'\r\n )\r\n }\r\n actionsMap[type] = reducer\r\n return builder\r\n },\r\n addMatcher<A extends AnyAction>(\r\n matcher: ActionMatcher<A>,\r\n reducer: CaseReducer<S, A>\r\n ) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (defaultCaseReducer) {\r\n throw new Error(\r\n '`builder.addMatcher` should only be called before calling `builder.addDefaultCase`'\r\n )\r\n }\r\n }\r\n actionMatchers.push({ matcher, reducer })\r\n return builder\r\n },\r\n addDefaultCase(reducer: CaseReducer<S, AnyAction>) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (defaultCaseReducer) {\r\n throw new Error('`builder.addDefaultCase` can only be called once')\r\n }\r\n }\r\n defaultCaseReducer = reducer\r\n return builder\r\n },\r\n }\r\n builderCallback(builder)\r\n return [actionsMap, actionMatchers, defaultCaseReducer]\r\n}\r\n","import type { Reducer } from 'redux'\r\nimport type {\r\n ActionCreatorWithoutPayload,\r\n PayloadAction,\r\n PayloadActionCreator,\r\n PrepareAction,\r\n _ActionCreatorWithPreparedPayload,\r\n} from './createAction'\r\nimport { createAction } from './createAction'\r\nimport type { CaseReducer, CaseReducers } from './createReducer'\r\nimport { createReducer } from './createReducer'\r\nimport type { ActionReducerMapBuilder } from './mapBuilders'\r\nimport { executeReducerBuilderCallback } from './mapBuilders'\r\nimport type { NoInfer } from './tsHelpers'\r\n\r\n/**\r\n * An action creator attached to a slice.\r\n *\r\n * @deprecated please use PayloadActionCreator directly\r\n *\r\n * @public\r\n */\r\nexport type SliceActionCreator<P> = PayloadActionCreator<P>\r\n\r\n/**\r\n * The return value of `createSlice`\r\n *\r\n * @public\r\n */\r\nexport interface Slice<\r\n State = any,\r\n CaseReducers extends SliceCaseReducers<State> = SliceCaseReducers<State>,\r\n Name extends string = string\r\n> {\r\n /**\r\n * The slice name.\r\n */\r\n name: Name\r\n\r\n /**\r\n * The slice's reducer.\r\n */\r\n reducer: Reducer<State>\r\n\r\n /**\r\n * Action creators for the types of actions that are handled by the slice\r\n * reducer.\r\n */\r\n actions: CaseReducerActions<CaseReducers>\r\n\r\n /**\r\n * The individual case reducer functions that were passed in the `reducers` parameter.\r\n * This enables reuse and testing if they were defined inline when calling `createSlice`.\r\n */\r\n caseReducers: SliceDefinedCaseReducers<CaseReducers>\r\n}\r\n\r\n/**\r\n * Options for `createSlice()`.\r\n *\r\n * @public\r\n */\r\nexport interface CreateSliceOptions<\r\n State = any,\r\n CR extends SliceCaseReducers<State> = SliceCaseReducers<State>,\r\n Name extends string = string\r\n> {\r\n /**\r\n * The slice's name. Used to namespace the generated action types.\r\n */\r\n name: Name\r\n\r\n /**\r\n * The initial state to be returned by the slice reducer.\r\n */\r\n initialState: State\r\n\r\n /**\r\n * A mapping from action types to action-type-specific *case reducer*\r\n * functions. For every action type, a matching action creator will be\r\n * generated using `createAction()`.\r\n */\r\n reducers: ValidateSliceCaseReducers<State, CR>\r\n\r\n /**\r\n * A callback that receives a *builder* object to define\r\n * case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`.\r\n * \r\n * Alternatively, a mapping from action types to action-type-specific *case reducer*\r\n * functions. These reducers should have existing action types used\r\n * as the keys, and action creators will _not_ be generated.\r\n * \r\n * @example\r\n```ts\r\nimport { createAction, createSlice, Action, AnyAction } from '@reduxjs/toolkit'\r\nconst incrementBy = createAction<number>('incrementBy')\r\nconst decrement = createAction('decrement')\r\n\r\ninterface RejectedAction extends Action {\r\n error: Error\r\n}\r\n\r\nfunction isRejectedAction(action: AnyAction): action is RejectedAction {\r\n return action.type.endsWith('rejected')\r\n}\r\n\r\ncreateSlice({\r\n name: 'counter',\r\n initialState: 0,\r\n reducers: {},\r\n extraReducers: builder => {\r\n builder\r\n .addCase(incrementBy, (state, action) => {\r\n // action is inferred correctly here if using TS\r\n })\r\n // You can chain calls, or have separate `builder.addCase()` lines each time\r\n .addCase(decrement, (state, action) => {})\r\n // You can match a range of action types\r\n .addMatcher(\r\n isRejectedAction,\r\n // `action` will be inferred as a RejectedAction due to isRejectedAction being defined as a type guard\r\n (state, action) => {}\r\n )\r\n // and provide a default case if no other handlers matched\r\n .addDefaultCase((state, action) => {})\r\n }\r\n})\r\n```\r\n */\r\n extraReducers?:\r\n | CaseReducers<NoInfer<State>, any>\r\n | ((builder: ActionReducerMapBuilder<NoInfer<State>>) => void)\r\n}\r\n\r\n/**\r\n * A CaseReducer with a `prepare` method.\r\n *\r\n * @public\r\n */\r\nexport type CaseReducerWithPrepare<State, Action extends PayloadAction> = {\r\n reducer: CaseReducer<State, Action>\r\n prepare: PrepareAction<Action['payload']>\r\n}\r\n\r\n/**\r\n * The type describing a slice's `reducers` option.\r\n *\r\n * @public\r\n */\r\nexport type SliceCaseReducers<State> = {\r\n [K: string]:\r\n | CaseReducer<State, PayloadAction<any>>\r\n | CaseReducerWithPrepare<State, PayloadAction<any, string, any, any>>\r\n}\r\n\r\n/**\r\n * Derives the slice's `actions` property from the `reducers` options\r\n *\r\n * @public\r\n */\r\nexport type CaseReducerActions<CaseReducers extends SliceCaseReducers<any>> = {\r\n [Type in keyof CaseReducers]: CaseReducers[Type] extends { prepare: any }\r\n ? ActionCreatorForCaseReducerWithPrepare<CaseReducers[Type]>\r\n : ActionCreatorForCaseReducer<CaseReducers[Type]>\r\n}\r\n\r\n/**\r\n * Get a `PayloadActionCreator` type for a passed `CaseReducerWithPrepare`\r\n *\r\n * @internal\r\n */\r\ntype ActionCreatorForCaseReducerWithPrepare<CR extends { prepare: any }> =\r\n _ActionCreatorWithPreparedPayload<CR['prepare'], string>\r\n\r\n/**\r\n * Get a `PayloadActionCreator` type for a passed `CaseReducer`\r\n *\r\n * @internal\r\n */\r\ntype ActionCreatorForCaseReducer<CR> = CR extends (\r\n state: any,\r\n action: infer Action\r\n) => any\r\n ? Action extends { payload: infer P }\r\n ? PayloadActionCreator<P>\r\n : ActionCreatorWithoutPayload\r\n : ActionCreatorWithoutPayload\r\n\r\n/**\r\n * Extracts the CaseReducers out of a `reducers` object, even if they are\r\n * tested into a `CaseReducerWithPrepare`.\r\n *\r\n * @internal\r\n */\r\ntype SliceDefinedCaseReducers<CaseReducers extends SliceCaseReducers<any>> = {\r\n [Type in keyof CaseReducers]: CaseReducers[Type] extends {\r\n reducer: infer Reducer\r\n }\r\n ? Reducer\r\n : CaseReducers[Type]\r\n}\r\n\r\n/**\r\n * Used on a SliceCaseReducers object.\r\n * Ensures that if a CaseReducer is a `CaseReducerWithPrepare`, that\r\n * the `reducer` and the `prepare` function use the same type of `payload`.\r\n *\r\n * Might do additional such checks in the future.\r\n *\r\n * This type is only ever useful if you want to write your own wrapper around\r\n * `createSlice`. Please don't use it otherwise!\r\n *\r\n * @public\r\n */\r\nexport type ValidateSliceCaseReducers<\r\n S,\r\n ACR extends SliceCaseReducers<S>\r\n> = ACR &\r\n {\r\n [T in keyof ACR]: ACR[T] extends {\r\n reducer(s: S, action?: infer A): any\r\n }\r\n ? {\r\n prepare(...a: never[]): Omit<A, 'type'>\r\n }\r\n : {}\r\n }\r\n\r\nfunction getType(slice: string, actionKey: string): string {\r\n return `${slice}/${actionKey}`\r\n}\r\n\r\n/**\r\n * A function that accepts an initial state, an object full of reducer\r\n * functions, and a \"slice name\", and automatically generates\r\n * action creators and action types that correspond to the\r\n * reducers and state.\r\n *\r\n * The `reducer` argument is passed to `createReducer()`.\r\n *\r\n * @public\r\n */\r\nexport function createSlice<\r\n State,\r\n CaseReducers extends SliceCaseReducers<State>,\r\n Name extends string = string\r\n>(\r\n options: CreateSliceOptions<State, CaseReducers, Name>\r\n): Slice<State, CaseReducers, Name> {\r\n const { name, initialState } = options\r\n if (!name) {\r\n throw new Error('`name` is a required option for createSlice')\r\n }\r\n const reducers = options.reducers || {}\r\n const [\r\n extraReducers = {},\r\n actionMatchers = [],\r\n defaultCaseReducer = undefined,\r\n ] =\r\n typeof options.extraReducers === 'function'\r\n ? executeReducerBuilderCallback(options.extraReducers)\r\n : [options.extraReducers]\r\n\r\n const reducerNames = Object.keys(reducers)\r\n\r\n const sliceCaseReducersByName: Record<string, CaseReducer> = {}\r\n const sliceCaseReducersByType: Record<string, CaseReducer> = {}\r\n const actionCreators: Record<string, Function> = {}\r\n\r\n reducerNames.forEach((reducerName) => {\r\n const maybeReducerWithPrepare = reducers[reducerName]\r\n const type = getType(name, reducerName)\r\n\r\n let caseReducer: CaseReducer<State, any>\r\n let prepareCallback: PrepareAction<any> | undefined\r\n\r\n if ('reducer' in maybeReducerWithPrepare) {\r\n caseReducer = maybeReducerWithPrepare.reducer\r\n prepareCallback = maybeReducerWithPrepare.prepare\r\n } else {\r\n caseReducer = maybeReducerWithPrepare\r\n }\r\n\r\n sliceCaseReducersByName[reducerName] = caseReducer\r\n sliceCaseReducersByType[type] = caseReducer\r\n actionCreators[reducerName] = prepareCallback\r\n ? createAction(type, prepareCallback)\r\n : createAction(type)\r\n })\r\n\r\n const finalCaseReducers = { ...extraReducers, ...sliceCaseReducersByType }\r\n const reducer = createReducer(\r\n initialState,\r\n finalCaseReducers as any,\r\n actionMatchers,\r\n defaultCaseReducer\r\n )\r\n\r\n return {\r\n name,\r\n reducer,\r\n actions: actionCreators as any,\r\n caseReducers: sliceCaseReducersByName as any,\r\n }\r\n}\r\n","import type { EntityState } from './models'\r\n\r\nexport function getInitialEntityState<V>(): EntityState<V> {\r\n return {\r\n ids: [],\r\n entities: {},\r\n }\r\n}\r\n\r\nexport function createInitialStateFactory<V>() {\r\n function getInitialState(): EntityState<V>\r\n function getInitialState<S extends object>(\r\n additionalState: S\r\n ): EntityState<V> & S\r\n function getInitialState(additionalState: any = {}): any {\r\n return Object.assign(getInitialEntityState(), additionalState)\r\n }\r\n\r\n return { getInitialState }\r\n}\r\n","import { createDraftSafeSelector } from '../createDraftSafeSelector'\r\nimport type {\r\n EntityState,\r\n EntitySelectors,\r\n Dictionary,\r\n EntityId,\r\n} from './models'\r\n\r\nexport function createSelectorsFactory<T>() {\r\n function getSelectors(): EntitySelectors<T, EntityState<T>>\r\n function getSelectors<V>(\r\n selectState: (state: V) => EntityState<T>\r\n ): EntitySelectors<T, V>\r\n function getSelectors(\r\n selectState?: (state: any) => EntityState<T>\r\n ): EntitySelectors<T, any> {\r\n const selectIds = (state: any) => state.ids\r\n\r\n const selectEntities = (state: EntityState<T>) => state.entities\r\n\r\n const selectAll = createDraftSafeSelector(\r\n selectIds,\r\n selectEntities,\r\n (ids: readonly T[], entities: Dictionary<T>): any =>\r\n ids.map((id: any) => (entities as any)[id])\r\n )\r\n\r\n const selectId = (_: any, id: EntityId) => id\r\n\r\n const selectById = (entities: Dictionary<T>, id: EntityId) => entities[id]\r\n\r\n const selectTotal = createDraftSafeSelector(selectIds, (ids) => ids.length)\r\n\r\n if (!selectState) {\r\n return {\r\n selectIds,\r\n selectEntities,\r\n selectAll,\r\n selectTotal,\r\n selectById: createDraftSafeSelector(\r\n selectEntities,\r\n selectId,\r\n selectById\r\n ),\r\n }\r\n }\r\n\r\n const selectGlobalizedEntities = createDraftSafeSelector(\r\n selectState,\r\n selectEntities\r\n )\r\n\r\n return {\r\n selectIds: createDraftSafeSelector(selectState, selectIds),\r\n selectEntities: selectGlobalizedEntities,\r\n selectAll: createDraftSafeSelector(selectState, selectAll),\r\n selectTotal: createDraftSafeSelector(selectState, selectTotal),\r\n selectById: createDraftSafeSelector(\r\n selectGlobalizedEntities,\r\n selectId,\r\n selectById\r\n ),\r\n }\r\n }\r\n\r\n return { getSelectors }\r\n}\r\n","import createNextState, { isDraft } from 'immer'\r\nimport type { EntityState, PreventAny } from './models'\r\nimport type { PayloadAction } from '../createAction'\r\nimport { isFSA } from '../createAction'\r\nimport { IsAny } from '../tsHelpers'\r\n\r\nexport function createSingleArgumentStateOperator<V>(\r\n mutator: (state: EntityState<V>) => void\r\n) {\r\n const operator = createStateOperator((_: undefined, state: EntityState<V>) =>\r\n mutator(state)\r\n )\r\n\r\n return function operation<S extends EntityState<V>>(\r\n state: PreventAny<S, V>\r\n ): S {\r\n return operator(state as S, undefined)\r\n }\r\n}\r\n\r\nexport function createStateOperator<V, R>(\r\n mutator: (arg: R, state: EntityState<V>) => void\r\n) {\r\n return function operation<S extends EntityState<V>>(\r\n state: S,\r\n arg: R | PayloadAction<R>\r\n ): S {\r\n function isPayloadActionArgument(\r\n arg: R | PayloadAction<R>\r\n ): arg is PayloadAction<R> {\r\n return isFSA(arg)\r\n }\r\n\r\n const runMutator = (draft: EntityState<V>) => {\r\n if (isPayloadActionArgument(arg)) {\r\n mutator(arg.payload, draft)\r\n } else {\r\n mutator(arg, draft)\r\n }\r\n }\r\n\r\n if (isDraft(state)) {\r\n // we must already be inside a `createNextState` call, likely because\r\n // this is being wrapped in `createReducer` or `createSlice`.\r\n // It's safe to just pass the draft to the mutator.\r\n runMutator(state)\r\n\r\n // since it's a draft, we'll just return it\r\n return state\r\n } else {\r\n // @ts-ignore createNextState() produces an Immutable<Draft<S>> rather\r\n // than an Immutable<S>, and TypeScript cannot find out how to reconcile\r\n // these two types.\r\n return createNextState(state, runMutator)\r\n }\r\n }\r\n}\r\n","import type { EntityState, IdSelector, Update, EntityId } from './models'\r\n\r\nexport function selectIdValue<T>(entity: T, selectId: IdSelector<T>) {\r\n const key = selectId(entity)\r\n\r\n if (process.env.NODE_ENV !== 'production' && key === undefined) {\r\n console.warn(\r\n 'The entity passed to the `selectId` implementation returned undefined.',\r\n 'You should probably provide your own `selectId` implementation.',\r\n 'The entity that was passed:',\r\n entity,\r\n 'The `selectId` implementation:',\r\n selectId.toString()\r\n )\r\n }\r\n\r\n return key\r\n}\r\n\r\nexport function ensureEntitiesArray<T>(\r\n entities: readonly T[] | Record<EntityId, T>\r\n): readonly T[] {\r\n if (!Array.isArray(entities)) {\r\n entities = Object.values(entities)\r\n }\r\n\r\n return entities\r\n}\r\n\r\nexport function splitAddedUpdatedEntities<T>(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n selectId: IdSelector<T>,\r\n state: EntityState<T>\r\n): [T[], Update<T>[]] {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n const added: T[] = []\r\n const updated: Update<T>[] = []\r\n\r\n for (const entity of newEntities) {\r\n const id = selectIdValue(entity, selectId)\r\n if (id in state.entities) {\r\n updated.push({ id, changes: entity })\r\n } else {\r\n added.push(entity)\r\n }\r\n }\r\n return [added, updated]\r\n}\r\n","import type {\r\n EntityState,\r\n EntityStateAdapter,\r\n IdSelector,\r\n Update,\r\n EntityId,\r\n} from './models'\r\nimport {\r\n createStateOperator,\r\n createSingleArgumentStateOperator,\r\n} from './state_adapter'\r\nimport {\r\n selectIdValue,\r\n ensureEntitiesArray,\r\n splitAddedUpdatedEntities,\r\n} from './utils'\r\n\r\nexport function createUnsortedStateAdapter<T>(\r\n selectId: IdSelector<T>\r\n): EntityStateAdapter<T> {\r\n type R = EntityState<T>\r\n\r\n function addOneMutably(entity: T, state: R): void {\r\n const key = selectIdValue(entity, selectId)\r\n\r\n if (key in state.entities) {\r\n return\r\n }\r\n\r\n state.ids.push(key)\r\n state.entities[key] = entity\r\n }\r\n\r\n function addManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n for (const entity of newEntities) {\r\n addOneMutably(entity, state)\r\n }\r\n }\r\n\r\n function setOneMutably(entity: T, state: R): void {\r\n const key = selectIdValue(entity, selectId)\r\n if (!(key in state.entities)) {\r\n state.ids.push(key)\r\n }\r\n state.entities[key] = entity\r\n }\r\n\r\n function setManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n for (const entity of newEntities) {\r\n setOneMutably(entity, state)\r\n }\r\n }\r\n\r\n function setAllMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n state.ids = []\r\n state.entities = {}\r\n\r\n addManyMutably(newEntities, state)\r\n }\r\n\r\n function removeOneMutably(key: EntityId, state: R): void {\r\n return removeManyMutably([key], state)\r\n }\r\n\r\n function removeManyMutably(keys: readonly EntityId[], state: R): void {\r\n let didMutate = false\r\n\r\n keys.forEach((key) => {\r\n if (key in state.entities) {\r\n delete state.entities[key]\r\n didMutate = true\r\n }\r\n })\r\n\r\n if (didMutate) {\r\n state.ids = state.ids.filter((id) => id in state.entities)\r\n }\r\n }\r\n\r\n function removeAllMutably(state: R): void {\r\n Object.assign(state, {\r\n ids: [],\r\n entities: {},\r\n })\r\n }\r\n\r\n function takeNewKey(\r\n keys: { [id: string]: EntityId },\r\n update: Update<T>,\r\n state: R\r\n ): boolean {\r\n const original = state.entities[update.id]\r\n const updated: T = Object.assign({}, original, update.changes)\r\n const newKey = selectIdValue(updated, selectId)\r\n const hasNewKey = newKey !== update.id\r\n\r\n if (hasNewKey) {\r\n keys[update.id] = newKey\r\n delete state.entities[update.id]\r\n }\r\n\r\n state.entities[newKey] = updated\r\n\r\n return hasNewKey\r\n }\r\n\r\n function updateOneMutably(update: Update<T>, state: R): void {\r\n return updateManyMutably([update], state)\r\n }\r\n\r\n function updateManyMutably(\r\n updates: ReadonlyArray<Update<T>>,\r\n state: R\r\n ): void {\r\n const newKeys: { [id: string]: EntityId } = {}\r\n\r\n const updatesPerEntity: { [id: string]: Update<T> } = {}\r\n\r\n updates.forEach((update) => {\r\n // Only apply updates to entities that currently exist\r\n if (update.id in state.entities) {\r\n // If there are multiple updates to one entity, merge them together\r\n updatesPerEntity[update.id] = {\r\n id: update.id,\r\n // Spreads ignore falsy values, so this works even if there isn't\r\n // an existing update already at this key\r\n changes: {\r\n ...(updatesPerEntity[update.id]\r\n ? updatesPerEntity[update.id].changes\r\n : null),\r\n ...update.changes,\r\n },\r\n }\r\n }\r\n })\r\n\r\n updates = Object.values(updatesPerEntity)\r\n\r\n const didMutateEntities = updates.length > 0\r\n\r\n if (didMutateEntities) {\r\n const didMutateIds =\r\n updates.filter((update) => takeNewKey(newKeys, update, state)).length >\r\n 0\r\n\r\n if (didMutateIds) {\r\n state.ids = state.ids.map((id) => newKeys[id] || id)\r\n }\r\n }\r\n }\r\n\r\n function upsertOneMutably(entity: T, state: R): void {\r\n return upsertManyMutably([entity], state)\r\n }\r\n\r\n function upsertManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n const [added, updated] = splitAddedUpdatedEntities<T>(\r\n newEntities,\r\n selectId,\r\n state\r\n )\r\n\r\n updateManyMutably(updated, state)\r\n addManyMutably(added, state)\r\n }\r\n\r\n return {\r\n removeAll: createSingleArgumentStateOperator(removeAllMutably),\r\n addOne: createStateOperator(addOneMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n upsertMany: createStateOperator(upsertManyMutably),\r\n removeOne: createStateOperator(removeOneMutably),\r\n removeMany: createStateOperator(removeManyMutably),\r\n }\r\n}\r\n","import type {\r\n EntityState,\r\n IdSelector,\r\n Comparer,\r\n EntityStateAdapter,\r\n Update,\r\n EntityId,\r\n} from './models'\r\nimport { createStateOperator } from './state_adapter'\r\nimport { createUnsortedStateAdapter } from './unsorted_state_adapter'\r\nimport {\r\n selectIdValue,\r\n ensureEntitiesArray,\r\n splitAddedUpdatedEntities,\r\n} from './utils'\r\n\r\nexport function createSortedStateAdapter<T>(\r\n selectId: IdSelector<T>,\r\n sort: Comparer<T>\r\n): EntityStateAdapter<T> {\r\n type R = EntityState<T>\r\n\r\n const { removeOne, removeMany, removeAll } =\r\n createUnsortedStateAdapter(selectId)\r\n\r\n function addOneMutably(entity: T, state: R): void {\r\n return addManyMutably([entity], state)\r\n }\r\n\r\n function addManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n const models = newEntities.filter(\r\n (model) => !(selectIdValue(model, selectId) in state.entities)\r\n )\r\n\r\n if (models.length !== 0) {\r\n merge(models, state)\r\n }\r\n }\r\n\r\n function setOneMutably(entity: T, state: R): void {\r\n return setManyMutably([entity], state)\r\n }\r\n\r\n function setManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n if (newEntities.length !== 0) {\r\n merge(newEntities, state)\r\n }\r\n }\r\n\r\n function setAllMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n state.entities = {}\r\n state.ids = []\r\n\r\n addManyMutably(newEntities, state)\r\n }\r\n\r\n function updateOneMutably(update: Update<T>, state: R): void {\r\n return updateManyMutably([update], state)\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types\r\n function takeUpdatedModel(models: T[], update: Update<T>, state: R): boolean {\r\n if (!(update.id in state.entities)) {\r\n return false\r\n }\r\n\r\n const original = state.entities[update.id]\r\n const updated = Object.assign({}, original, update.changes)\r\n const newKey = selectIdValue(updated, selectId)\r\n\r\n delete state.entities[update.id]\r\n\r\n models.push(updated)\r\n\r\n return newKey !== update.id\r\n }\r\n\r\n function updateManyMutably(\r\n updates: ReadonlyArray<Update<T>>,\r\n state: R\r\n ): void {\r\n const models: T[] = []\r\n\r\n updates.forEach((update) => takeUpdatedModel(models, update, state))\r\n\r\n if (models.length !== 0) {\r\n merge(models, state)\r\n }\r\n }\r\n\r\n function upsertOneMutably(entity: T, state: R): void {\r\n return upsertManyMutably([entity], state)\r\n }\r\n\r\n function upsertManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n const [added, updated] = splitAddedUpdatedEntities<T>(\r\n newEntities,\r\n selectId,\r\n state\r\n )\r\n\r\n updateManyMutably(updated, state)\r\n addManyMutably(added, state)\r\n }\r\n\r\n function areArraysEqual(a: readonly unknown[], b: readonly unknown[]) {\r\n if (a.length !== b.length) {\r\n return false\r\n }\r\n\r\n for (let i = 0; i < a.length && i < b.length; i++) {\r\n if (a[i] === b[i]) {\r\n continue\r\n }\r\n return false\r\n }\r\n return true\r\n }\r\n\r\n function merge(models: readonly T[], state: R): void {\r\n // Insert/overwrite all new/updated\r\n models.forEach((model) => {\r\n state.entities[selectId(model)] = model\r\n })\r\n\r\n const allEntities = Object.values(state.entities) as T[]\r\n allEntities.sort(sort)\r\n\r\n const newSortedIds = allEntities.map(selectId)\r\n const { ids } = state\r\n\r\n if (!areArraysEqual(ids, newSortedIds)) {\r\n state.ids = newSortedIds\r\n }\r\n }\r\n\r\n return {\r\n removeOne,\r\n removeMany,\r\n removeAll,\r\n addOne: createStateOperator(addOneMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertMany: createStateOperator(upsertManyMutably),\r\n }\r\n}\r\n","import type {\r\n EntityDefinition,\r\n Comparer,\r\n IdSelector,\r\n EntityAdapter,\r\n} from './models'\r\nimport { createInitialStateFactory } from './entity_state'\r\nimport { createSelectorsFactory } from './state_selectors'\r\nimport { createSortedStateAdapter } from './sorted_state_adapter'\r\nimport { createUnsortedStateAdapter } from './unsorted_state_adapter'\r\n\r\n/**\r\n *\r\n * @param options\r\n *\r\n * @public\r\n */\r\nexport function createEntityAdapter<T>(\r\n options: {\r\n selectId?: IdSelector<T>\r\n sortComparer?: false | Comparer<T>\r\n } = {}\r\n): EntityAdapter<T> {\r\n const { selectId, sortComparer }: EntityDefinition<T> = {\r\n sortComparer: false,\r\n selectId: (instance: any) => instance.id,\r\n ...options,\r\n }\r\n\r\n const stateFactory = createInitialStateFactory<T>()\r\n const selectorsFactory = createSelectorsFactory<T>()\r\n const stateAdapter = sortComparer\r\n ? createSortedStateAdapter(selectId, sortComparer)\r\n : createUnsortedStateAdapter(selectId)\r\n\r\n return {\r\n selectId,\r\n sortComparer,\r\n ...stateFactory,\r\n ...selectorsFactory,\r\n ...stateAdapter,\r\n }\r\n}\r\n","// Borrowed from https://github.com/ai/nanoid/blob/3.0.2/non-secure/index.js\r\n// This alphabet uses `A-Za-z0-9_-` symbols. A genetic algorithm helped\r\n// optimize the gzip compression for this alphabet.\r\nlet urlAlphabet =\r\n 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'\r\n\r\n/**\r\n *\r\n * @public\r\n */\r\nexport let nanoid = (size = 21) => {\r\n let id = ''\r\n // A compact alternative for `for (var i = 0; i < step; i++)`.\r\n let i = size\r\n while (i--) {\r\n // `| 0` is more compact and faster than `Math.floor()`.\r\n id += urlAlphabet[(Math.random() * 64) | 0]\r\n }\r\n return id\r\n}\r\n","import type { Dispatch, AnyAction } from 'redux'\r\nimport type {\r\n PayloadAction,\r\n ActionCreatorWithPreparedPayload,\r\n} from './createAction'\r\nimport { createAction } from './createAction'\r\nimport type { ThunkDispatch } from 'redux-thunk'\r\nimport type { FallbackIfUnknown, IsAny, IsUnknown } from './tsHelpers'\r\nimport { nanoid } from './nanoid'\r\n\r\n// @ts-ignore we need the import of these types due to a bundling issue.\r\ntype _Keep = PayloadAction | ActionCreatorWithPreparedPayload<any, unknown>\r\n\r\nexport type BaseThunkAPI<\r\n S,\r\n E,\r\n D extends Dispatch = Dispatch,\r\n RejectedValue = undefined,\r\n RejectedMeta = unknown,\r\n FulfilledMeta = unknown\r\n> = {\r\n dispatch: D\r\n getState: () => S\r\n extra: E\r\n requestId: string\r\n signal: AbortSignal\r\n rejectWithValue: IsUnknown<\r\n RejectedMeta,\r\n (value: RejectedValue) => RejectWithValue<RejectedValue, RejectedMeta>,\r\n (\r\n value: RejectedValue,\r\n meta: RejectedMeta\r\n ) => RejectWithValue<RejectedValue, RejectedMeta>\r\n >\r\n fulfillWithValue: IsUnknown<\r\n FulfilledMeta,\r\n <FulfilledValue>(\r\n value: FulfilledValue\r\n ) => FulfillWithMeta<FulfilledValue, FulfilledMeta>,\r\n <FulfilledValue>(\r\n value: FulfilledValue,\r\n meta: FulfilledMeta\r\n ) => FulfillWithMeta<FulfilledValue, FulfilledMeta>\r\n >\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport interface SerializedError {\r\n name?: string\r\n message?: string\r\n stack?: string\r\n code?: string\r\n}\r\n\r\nconst commonProperties: Array<keyof SerializedError> = [\r\n 'name',\r\n 'message',\r\n 'stack',\r\n 'code',\r\n]\r\n\r\nclass RejectWithValue<Payload, RejectedMeta> {\r\n /*\r\n type-only property to distinguish between RejectWithValue and FulfillWithMeta\r\n does not exist at runtime\r\n */\r\n private readonly _type!: 'RejectWithValue'\r\n constructor(\r\n public readonly payload: Payload,\r\n public readonly meta: RejectedMeta\r\n ) {}\r\n}\r\n\r\nclass FulfillWithMeta<Payload, FulfilledMeta> {\r\n /*\r\n type-only property to distinguish between RejectWithValue and FulfillWithMeta\r\n does not exist at runtime\r\n */\r\n private readonly _type!: 'FulfillWithMeta'\r\n constructor(\r\n public readonly payload: Payload,\r\n public readonly meta: FulfilledMeta\r\n ) {}\r\n}\r\n\r\n/**\r\n * Serializes an error into a plain object.\r\n * Reworked from https://github.com/sindresorhus/serialize-error\r\n *\r\n * @public\r\n */\r\nexport const miniSerializeError = (value: any): SerializedError => {\r\n if (typeof value === 'object' && value !== null) {\r\n const simpleError: SerializedError = {}\r\n for (const property of commonProperties) {\r\n if (typeof value[property] === 'string') {\r\n simpleError[property] = value[property]\r\n }\r\n }\r\n\r\n return simpleError\r\n }\r\n\r\n return { message: String(value) }\r\n}\r\n\r\ntype AsyncThunkConfig = {\r\n state?: unknown\r\n dispatch?: Dispatch\r\n extra?: unknown\r\n rejectValue?: unknown\r\n serializedErrorType?: unknown\r\n pendingMeta?: unknown\r\n fulfilledMeta?: unknown\r\n rejectedMeta?: unknown\r\n}\r\n\r\ntype GetState<ThunkApiConfig> = ThunkApiConfig extends {\r\n state: infer State\r\n}\r\n ? State\r\n : unknown\r\ntype GetExtra<ThunkApiConfig> = ThunkApiConfig extends { extra: infer Extra }\r\n ? Extra\r\n : unknown\r\ntype GetDispatch<ThunkApiConfig> = ThunkApiConfig extends {\r\n dispatch: infer Dispatch\r\n}\r\n ? FallbackIfUnknown<\r\n Dispatch,\r\n ThunkDispatch<\r\n GetState<ThunkApiConfig>,\r\n GetExtra<ThunkApiConfig>,\r\n AnyAction\r\n >\r\n >\r\n : ThunkDispatch<GetState<ThunkApiConfig>, GetExtra<ThunkApiConfig>, AnyAction>\r\n\r\ntype GetThunkAPI<ThunkApiConfig> = BaseThunkAPI<\r\n GetState<ThunkApiConfig>,\r\n GetExtra<ThunkApiConfig>,\r\n GetDispatch<ThunkApiConfig>,\r\n GetRejectValue<ThunkApiConfig>,\r\n GetRejectedMeta<ThunkApiConfig>,\r\n GetFulfilledMeta<ThunkApiConfig>\r\n>\r\n\r\ntype GetRejectValue<ThunkApiConfig> = ThunkApiConfig extends {\r\n rejectValue: infer RejectValue\r\n}\r\n ? RejectValue\r\n : unknown\r\n\r\ntype GetPendingMeta<ThunkApiConfig> = ThunkApiConfig extends {\r\n pendingMeta: infer PendingMeta\r\n}\r\n ? PendingMeta\r\n : unknown\r\n\r\ntype GetFulfilledMeta<ThunkApiConfig> = ThunkApiConfig extends {\r\n fulfilledMeta: infer FulfilledMeta\r\n}\r\n ? FulfilledMeta\r\n : unknown\r\n\r\ntype GetRejectedMeta<ThunkApiConfig> = ThunkApiConfig extends {\r\n rejectedMeta: infer RejectedMeta\r\n}\r\n ? RejectedMeta\r\n : unknown\r\n\r\ntype GetSerializedErrorType<ThunkApiConfig> = ThunkApiConfig extends {\r\n serializedErrorType: infer GetSerializedErrorType\r\n}\r\n ? GetSerializedErrorType\r\n : SerializedError\r\n\r\ntype MaybePromise<T> = T | Promise<T> | (T extends any ? Promise<T> : never)\r\n\r\n/**\r\n * A type describing the return value of the `payloadCreator` argument to `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkPayloadCreatorReturnValue<\r\n Returned,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = MaybePromise<\r\n | IsUnknown<\r\n GetFulfilledMeta<ThunkApiConfig>,\r\n Returned,\r\n FulfillWithMeta<Returned, GetFulfilledMeta<ThunkApiConfig>>\r\n >\r\n | RejectWithValue<\r\n GetRejectValue<ThunkApiConfig>,\r\n GetRejectedMeta<ThunkApiConfig>\r\n >\r\n>\r\n/**\r\n * A type describing the `payloadCreator` argument to `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkPayloadCreator<\r\n Returned,\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n> = (\r\n arg: ThunkArg,\r\n thunkAPI: GetThunkAPI<ThunkApiConfig>\r\n) => AsyncThunkPayloadCreatorReturnValue<Returned, ThunkApiConfig>\r\n\r\n/**\r\n * A ThunkAction created by `createAsyncThunk`.\r\n * Dispatching it returns a Promise for either a\r\n * fulfilled or rejected action.\r\n * Also, the returned value contains an `abort()` method\r\n * that allows the asyncAction to be cancelled from the outside.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkAction<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = (\r\n dispatch: GetDispatch<ThunkApiConfig>,\r\n getState: () => GetState<ThunkApiConfig>,\r\n extra: GetExtra<ThunkApiConfig>\r\n) => Promise<\r\n | ReturnType<AsyncThunkFulfilledActionCreator<Returned, ThunkArg>>\r\n | ReturnType<AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>>\r\n> & {\r\n abort: (reason?: string) => void\r\n requestId: string\r\n arg: ThunkArg\r\n unwrap: () => Promise<Returned>\r\n}\r\n\r\ntype AsyncThunkActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = IsAny<\r\n ThunkArg,\r\n // any handling\r\n (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>,\r\n // unknown handling\r\n unknown extends ThunkArg\r\n ? (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument not specified or specified as void or undefined\r\n : [ThunkArg] extends [void] | [undefined]\r\n ? () => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument contains void\r\n : [void] extends [ThunkArg] // make optional\r\n ? (arg?: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument contains undefined\r\n : [undefined] extends [ThunkArg]\r\n ? WithStrictNullChecks<\r\n // with strict nullChecks: make optional\r\n (\r\n arg?: ThunkArg\r\n ) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>,\r\n // without strict null checks this will match everything, so don't make it optional\r\n (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>\r\n > // default case: normal argument\r\n : (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>\r\n>\r\n\r\n/**\r\n * Options object for `createAsyncThunk`.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkOptions<\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n> = {\r\n /**\r\n * A method to control whether the asyncThunk should be executed. Has access to the\r\n * `arg`, `api.getState()` and `api.extra` arguments.\r\n *\r\n * @returns `false` if it should be skipped\r\n */\r\n condition?(\r\n arg: ThunkArg,\r\n api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>\r\n ): boolean | undefined\r\n /**\r\n * If `condition` returns `false`, the asyncThunk will be skipped.\r\n * This option allows you to control whether a `rejected` action with `meta.condition == false`\r\n * will be dispatched or not.\r\n *\r\n * @default `false`\r\n */\r\n dispatchConditionRejection?: boolean\r\n\r\n serializeError?: (x: unknown) => GetSerializedErrorType<ThunkApiConfig>\r\n\r\n /**\r\n * A function to use when generating the `requestId` for the request sequence.\r\n *\r\n * @default `nanoid`\r\n */\r\n idGenerator?: () => string\r\n} & IsUnknown<\r\n GetPendingMeta<ThunkApiConfig>,\r\n {\r\n /**\r\n * A method to generate additional properties to be added to `meta` of the pending action.\r\n *\r\n * Using this optional overload will not modify the types correctly, this overload is only in place to support JavaScript users.\r\n * Please use the `ThunkApiConfig` parameter `pendingMeta` to get access to a correctly typed overload\r\n */\r\n getPendingMeta?(\r\n base: {\r\n arg: ThunkArg\r\n requestId: string\r\n },\r\n api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>\r\n ): GetPendingMeta<ThunkApiConfig>\r\n },\r\n {\r\n /**\r\n * A method to generate additional properties to be added to `meta` of the pending action.\r\n */\r\n getPendingMeta(\r\n base: {\r\n arg: ThunkArg\r\n requestId: string\r\n },\r\n api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>\r\n ): GetPendingMeta<ThunkApiConfig>\r\n }\r\n>\r\n\r\nexport type AsyncThunkPendingActionCreator<\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [string, ThunkArg, GetPendingMeta<ThunkApiConfig>?],\r\n undefined,\r\n string,\r\n never,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'pending'\r\n } & GetPendingMeta<ThunkApiConfig>\r\n>\r\n\r\nexport type AsyncThunkRejectedActionCreator<\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [\r\n Error | null,\r\n string,\r\n ThunkArg,\r\n GetRejectValue<ThunkApiConfig>?,\r\n GetRejectedMeta<ThunkApiConfig>?\r\n ],\r\n GetRejectValue<ThunkApiConfig> | undefined,\r\n string,\r\n GetSerializedErrorType<ThunkApiConfig>,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'rejected'\r\n aborted: boolean\r\n condition: boolean\r\n } & (\r\n | ({ rejectedWithValue: false } & {\r\n [K in keyof GetRejectedMeta<ThunkApiConfig>]?: undefined\r\n })\r\n | ({ rejectedWithValue: true } & GetRejectedMeta<ThunkApiConfig>)\r\n )\r\n>\r\n\r\nexport type AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [Returned, string, ThunkArg, GetFulfilledMeta<ThunkApiConfig>?],\r\n Returned,\r\n string,\r\n never,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'fulfilled'\r\n } & GetFulfilledMeta<ThunkApiConfig>\r\n>\r\n\r\n/**\r\n * A type describing the return value of `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunk<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = AsyncThunkActionCreator<Returned, ThunkArg, ThunkApiConfig> & {\r\n pending: AsyncThunkPendingActionCreator<ThunkArg, ThunkApiConfig>\r\n rejected: AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>\r\n fulfilled: AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n >\r\n typePrefix: string\r\n}\r\n\r\n/**\r\n *\r\n * @param typePrefix\r\n * @param payloadCreator\r\n * @param options\r\n *\r\n * @public\r\n */\r\nexport function createAsyncThunk<\r\n Returned,\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n>(\r\n typePrefix: string,\r\n payloadCreator: AsyncThunkPayloadCreator<Returned, ThunkArg, ThunkApiConfig>,\r\n options?: AsyncThunkOptions<ThunkArg, ThunkApiConfig>\r\n): AsyncThunk<Returned, ThunkArg, ThunkApiConfig> {\r\n type RejectedValue = GetRejectValue<ThunkApiConfig>\r\n type PendingMeta = GetPendingMeta<ThunkApiConfig>\r\n type FulfilledMeta = GetFulfilledMeta<ThunkApiConfig>\r\n type RejectedMeta = GetRejectedMeta<ThunkApiConfig>\r\n\r\n const fulfilled: AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n > = createAction(\r\n typePrefix + '/fulfilled',\r\n (\r\n payload: Returned,\r\n requestId: string,\r\n arg: ThunkArg,\r\n meta?: FulfilledMeta\r\n ) => ({\r\n payload,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n requestStatus: 'fulfilled' as const,\r\n },\r\n })\r\n )\r\n\r\n const pending: AsyncThunkPendingActionCreator<ThunkArg, ThunkApiConfig> =\r\n createAction(\r\n typePrefix + '/pending',\r\n (requestId: string, arg: ThunkArg, meta?: PendingMeta) => ({\r\n payload: undefined,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n requestStatus: 'pending' as const,\r\n },\r\n })\r\n )\r\n\r\n const rejected: AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig> =\r\n createAction(\r\n typePrefix + '/rejected',\r\n (\r\n error: Error | null,\r\n requestId: string,\r\n arg: ThunkArg,\r\n payload?: RejectedValue,\r\n meta?: RejectedMeta\r\n ) => ({\r\n payload,\r\n error: ((options && options.serializeError) || miniSerializeError)(\r\n error || 'Rejected'\r\n ) as GetSerializedErrorType<ThunkApiConfig>,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n rejectedWithValue: !!payload,\r\n requestStatus: 'rejected' as const,\r\n aborted: error?.name === 'AbortError',\r\n condition: error?.name === 'ConditionError',\r\n },\r\n })\r\n )\r\n\r\n let displayedWarning = false\r\n\r\n const AC =\r\n typeof AbortController !== 'undefined'\r\n ? AbortController\r\n : class implements AbortController {\r\n signal: AbortSignal = {\r\n aborted: false,\r\n addEventListener() {},\r\n dispatchEvent() {\r\n return false\r\n },\r\n onabort() {},\r\n removeEventListener() {},\r\n }\r\n abort() {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (!displayedWarning) {\r\n displayedWarning = true\r\n console.info(\r\n `This platform does not implement AbortController. \r\nIf you want to use the AbortController to react to \\`abort\\` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.`\r\n )\r\n }\r\n }\r\n }\r\n }\r\n\r\n function actionCreator(\r\n arg: ThunkArg\r\n ): AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> {\r\n return (dispatch, getState, extra) => {\r\n const requestId = (options?.idGenerator ?? nanoid)()\r\n\r\n const abortController = new AC()\r\n let abortReason: string | undefined\r\n\r\n const abortedPromise = new Promise<never>((_, reject) =>\r\n abortController.signal.addEventListener('abort', () =>\r\n reject({ name: 'AbortError', message: abortReason || 'Aborted' })\r\n )\r\n )\r\n\r\n let started = false\r\n function abort(reason?: string) {\r\n if (started) {\r\n abortReason = reason\r\n abortController.abort()\r\n }\r\n }\r\n\r\n const promise = (async function () {\r\n let finalAction: ReturnType<typeof fulfilled | typeof rejected>\r\n try {\r\n if (\r\n options &&\r\n options.condition &&\r\n options.condition(arg, { getState, extra }) === false\r\n ) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw {\r\n name: 'ConditionError',\r\n message: 'Aborted due to condition callback returning false.',\r\n }\r\n }\r\n started = true\r\n dispatch(\r\n pending(\r\n requestId,\r\n arg,\r\n options?.getPendingMeta?.({ requestId, arg }, { getState, extra })\r\n )\r\n )\r\n finalAction = await Promise.race([\r\n abortedPromise,\r\n Promise.resolve(\r\n payloadCreator(arg, {\r\n dispatch,\r\n getState,\r\n extra,\r\n requestId,\r\n signal: abortController.signal,\r\n rejectWithValue: ((\r\n value: RejectedValue,\r\n meta?: RejectedMeta\r\n ) => {\r\n return new RejectWithValue(value, meta)\r\n }) as any,\r\n fulfillWithValue: ((value: unknown, meta?: FulfilledMeta) => {\r\n return new FulfillWithMeta(value, meta)\r\n }) as any,\r\n })\r\n ).then((result) => {\r\n if (result instanceof RejectWithValue) {\r\n throw result\r\n }\r\n if (result instanceof FulfillWithMeta) {\r\n return fulfilled(result.payload, requestId, arg, result.meta)\r\n }\r\n return fulfilled(result as any, requestId, arg)\r\n }),\r\n ])\r\n } catch (err) {\r\n finalAction =\r\n err instanceof RejectWithValue\r\n ? rejected(null, requestId, arg, err.payload, err.meta)\r\n : rejected(err as any, requestId, arg)\r\n }\r\n // We dispatch the result action _after_ the catch, to avoid having any errors\r\n // here get swallowed by the try/catch block,\r\n // per https://twitter.com/dan_abramov/status/770914221638942720\r\n // and https://github.com/reduxjs/redux-toolkit/blob/e85eb17b39a2118d859f7b7746e0f3fee523e089/docs/tutorials/advanced-tutorial.md#async-error-handling-logic-in-thunks\r\n\r\n const skipDispatch =\r\n options &&\r\n !options.dispatchConditionRejection &&\r\n rejected.match(finalAction) &&\r\n (finalAction as any).meta.condition\r\n\r\n if (!skipDispatch) {\r\n dispatch(finalAction)\r\n }\r\n return finalAction\r\n })()\r\n return Object.assign(promise as Promise<any>, {\r\n abort,\r\n requestId,\r\n arg,\r\n unwrap() {\r\n return promise.then<any>(unwrapResult)\r\n },\r\n })\r\n }\r\n }\r\n\r\n return Object.assign(\r\n actionCreator as AsyncThunkActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n >,\r\n {\r\n pending,\r\n rejected,\r\n fulfilled,\r\n typePrefix,\r\n }\r\n )\r\n}\r\n\r\ninterface UnwrappableAction {\r\n payload: any\r\n meta?: any\r\n error?: any\r\n}\r\n\r\ntype UnwrappedActionPayload<T extends UnwrappableAction> = Exclude<\r\n T,\r\n { error: any }\r\n>['payload']\r\n\r\n/**\r\n * @public\r\n */\r\nexport function unwrapResult<R extends UnwrappableAction>(\r\n action: R\r\n): UnwrappedActionPayload<R> {\r\n if (action.meta && action.meta.rejectedWithValue) {\r\n throw action.payload\r\n }\r\n if (action.error) {\r\n throw action.error\r\n }\r\n return action.payload\r\n}\r\n\r\ntype WithStrictNullChecks<True, False> = undefined extends boolean\r\n ? False\r\n : True\r\n","import type { Middleware } from 'redux'\r\n\r\n/**\r\n * return True if T is `any`, otherwise return False\r\n * taken from https://github.com/joonhocho/tsdef\r\n *\r\n * @internal\r\n */\r\nexport type IsAny<T, True, False = never> =\r\n // test if we are going the left AND right path in the condition\r\n true | false extends (T extends never ? true : false) ? True : False\r\n\r\n/**\r\n * return True if T is `unknown`, otherwise return False\r\n * taken from https://github.com/joonhocho/tsdef\r\n *\r\n * @internal\r\n */\r\nexport type IsUnknown<T, True, False = never> = unknown extends T\r\n ? IsAny<T, False, True>\r\n : False\r\n\r\nexport type FallbackIfUnknown<T, Fallback> = IsUnknown<T, Fallback, T>\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IfMaybeUndefined<P, True, False> = [undefined] extends [P]\r\n ? True\r\n : False\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IfVoid<P, True, False> = [void] extends [P] ? True : False\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IsEmptyObj<T, True, False = never> = T extends any\r\n ? keyof T extends never\r\n ? IsUnknown<T, False, IfMaybeUndefined<T, False, IfVoid<T, False, True>>>\r\n : False\r\n : never\r\n\r\n/**\r\n * returns True if TS version is above 3.5, False if below.\r\n * uses feature detection to detect TS version >= 3.5\r\n * * versions below 3.5 will return `{}` for unresolvable interference\r\n * * versions above will return `unknown`\r\n *\r\n * @internal\r\n */\r\nexport type AtLeastTS35<True, False> = [True, False][IsUnknown<\r\n ReturnType<<T>() => T>,\r\n 0,\r\n 1\r\n>]\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IsUnknownOrNonInferrable<T, True, False> = AtLeastTS35<\r\n IsUnknown<T, True, False>,\r\n IsEmptyObj<T, True, IsUnknown<T, True, False>>\r\n>\r\n\r\n/**\r\n * Combines all dispatch signatures of all middlewares in the array `M` into\r\n * one intersected dispatch signature.\r\n */\r\nexport type DispatchForMiddlewares<M> = M extends ReadonlyArray<any>\r\n ? UnionToIntersection<\r\n M[number] extends infer MiddlewareValues\r\n ? MiddlewareValues extends Middleware<infer DispatchExt, any, any>\r\n ? DispatchExt extends Function\r\n ? IsAny<DispatchExt, never, DispatchExt>\r\n : never\r\n : never\r\n : never\r\n >\r\n : never\r\n\r\n/**\r\n * Convert a Union type `(A|B)` to an intersection type `(A&B)`\r\n */\r\nexport type UnionToIntersection<U> = (\r\n U extends any ? (k: U) => void : never\r\n) extends (k: infer I) => void\r\n ? I\r\n : never\r\n\r\n/**\r\n * Helper type. Passes T out again, but boxes it in a way that it cannot\r\n * \"widen\" the type by accident if it is a generic that should be inferred\r\n * from elsewhere.\r\n *\r\n * @internal\r\n */\r\nexport type NoInfer<T> = [T][T extends any ? 0 : never]\r\n\r\nexport type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>\r\n\r\nexport interface HasMatchFunction<T> {\r\n match: (v: any) => v is T\r\n}\r\n\r\nexport const hasMatchFunction = <T>(\r\n v: Matcher<T>\r\n): v is HasMatchFunction<T> => {\r\n return v && typeof (v as HasMatchFunction<T>).match === 'function'\r\n}\r\n\r\n/** @public */\r\nexport type Matcher<T> = HasMatchFunction<T> | ((v: any) => v is T)\r\n\r\n/** @public */\r\nexport type ActionFromMatcher<M extends Matcher<any>> = M extends Matcher<\r\n infer T\r\n>\r\n ? T\r\n : never\r\n","import type {\r\n ActionFromMatcher,\r\n Matcher,\r\n UnionToIntersection,\r\n} from './tsHelpers'\r\nimport { hasMatchFunction } from './tsHelpers'\r\nimport type {\r\n AsyncThunk,\r\n AsyncThunkFulfilledActionCreator,\r\n AsyncThunkPendingActionCreator,\r\n AsyncThunkRejectedActionCreator,\r\n} from './createAsyncThunk'\r\n\r\n/** @public */\r\nexport type ActionMatchingAnyOf<\r\n Matchers extends [Matcher<any>, ...Matcher<any>[]]\r\n> = ActionFromMatcher<Matchers[number]>\r\n\r\n/** @public */\r\nexport type ActionMatchingAllOf<\r\n Matchers extends [Matcher<any>, ...Matcher<any>[]]\r\n> = UnionToIntersection<ActionMatchingAnyOf<Matchers>>\r\n\r\nconst matches = (matcher: Matcher<any>, action: any) => {\r\n if (hasMatchFunction(matcher)) {\r\n return matcher.match(action)\r\n } else {\r\n return matcher(action)\r\n }\r\n}\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action matches any one of the supplied type guards or action\r\n * creators.\r\n *\r\n * @param matchers The type guards or action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAnyOf<Matchers extends [Matcher<any>, ...Matcher<any>[]]>(\r\n ...matchers: Matchers\r\n) {\r\n return (action: any): action is ActionMatchingAnyOf<Matchers> => {\r\n return matchers.some((matcher) => matches(matcher, action))\r\n }\r\n}\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action matches all of the supplied type guards or action\r\n * creators.\r\n *\r\n * @param matchers The type guards or action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAllOf<Matchers extends [Matcher<any>, ...Matcher<any>[]]>(\r\n ...matchers: Matchers\r\n) {\r\n return (action: any): action is ActionMatchingAllOf<Matchers> => {\r\n return matchers.every((matcher) => matches(matcher, action))\r\n }\r\n}\r\n\r\n/**\r\n * @param action A redux action\r\n * @param validStatus An array of valid meta.requestStatus values\r\n *\r\n * @internal\r\n */\r\nexport function hasExpectedRequestMetadata(\r\n action: any,\r\n validStatus: readonly string[]\r\n) {\r\n if (!action || !action.meta) return false\r\n\r\n const hasValidRequestId = typeof action.meta.requestId === 'string'\r\n const hasValidRequestStatus =\r\n validStatus.indexOf(action.meta.requestStatus) > -1\r\n\r\n return hasValidRequestId && hasValidRequestStatus\r\n}\r\n\r\nfunction isAsyncThunkArray(a: [any] | AnyAsyncThunk[]): a is AnyAsyncThunk[] {\r\n return (\r\n typeof a[0] === 'function' &&\r\n 'pending' in a[0] &&\r\n 'fulfilled' in a[0] &&\r\n 'rejected' in a[0]\r\n )\r\n}\r\n\r\nexport type UnknownAsyncThunkPendingAction = ReturnType<\r\n AsyncThunkPendingActionCreator<unknown>\r\n>\r\n\r\nexport type PendingActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['pending']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is pending.\r\n *\r\n * @public\r\n */\r\nexport function isPending(): (\r\n action: any\r\n) => action is UnknownAsyncThunkPendingAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is pending.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isPending<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is PendingActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a pending thunk action\r\n * @public\r\n */\r\nexport function isPending(action: any): action is UnknownAsyncThunkPendingAction\r\nexport function isPending<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['pending'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isPending()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is PendingActionFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.pending\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkRejectedAction = ReturnType<\r\n AsyncThunkRejectedActionCreator<unknown, unknown>\r\n>\r\n\r\nexport type RejectedActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['rejected']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is rejected.\r\n *\r\n * @public\r\n */\r\nexport function isRejected(): (\r\n action: any\r\n) => action is UnknownAsyncThunkRejectedAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is rejected.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isRejected<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is RejectedActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a rejected thunk action\r\n * @public\r\n */\r\nexport function isRejected(\r\n action: any\r\n): action is UnknownAsyncThunkRejectedAction\r\nexport function isRejected<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['rejected'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejected()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is RejectedActionFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.rejected\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkRejectedWithValueAction = ReturnType<\r\n AsyncThunkRejectedActionCreator<unknown, unknown>\r\n>\r\n\r\nexport type RejectedWithValueActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['rejected']> &\r\n (T extends AsyncThunk<any, any, { rejectValue: infer RejectedValue }>\r\n ? { payload: RejectedValue }\r\n : unknown)\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is rejected with value.\r\n *\r\n * @public\r\n */\r\nexport function isRejectedWithValue(): (\r\n action: any\r\n) => action is UnknownAsyncThunkRejectedAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is rejected with value.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isRejectedWithValue<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (\r\n action: any\r\n) => action is RejectedWithValueActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a rejected thunk action with value\r\n * @public\r\n */\r\nexport function isRejectedWithValue(\r\n action: any\r\n): action is UnknownAsyncThunkRejectedAction\r\nexport function isRejectedWithValue<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n const hasFlag = (action: any): action is any => {\r\n return action && action.meta && action.meta.rejectedWithValue\r\n }\r\n\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => {\r\n const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag)\r\n\r\n return combinedMatcher(action)\r\n }\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejectedWithValue()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is RejectedActionFromAsyncThunk<AsyncThunks[number]> => {\r\n const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkFulfilledAction = ReturnType<\r\n AsyncThunkFulfilledActionCreator<unknown, unknown>\r\n>\r\n\r\nexport type FulfilledActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['fulfilled']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is fulfilled.\r\n *\r\n * @public\r\n */\r\nexport function isFulfilled(): (\r\n action: any\r\n) => action is UnknownAsyncThunkFulfilledAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is fulfilled.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isFulfilled<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is FulfilledActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a fulfilled thunk action\r\n * @public\r\n */\r\nexport function isFulfilled(\r\n action: any\r\n): action is UnknownAsyncThunkFulfilledAction\r\nexport function isFulfilled<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['fulfilled'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isFulfilled()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is FulfilledActionFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.fulfilled\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkAction =\r\n | UnknownAsyncThunkPendingAction\r\n | UnknownAsyncThunkRejectedAction\r\n | UnknownAsyncThunkFulfilledAction\r\n\r\nexport type AnyAsyncThunk = {\r\n pending: { match: (action: any) => action is any }\r\n fulfilled: { match: (action: any) => action is any }\r\n rejected: { match: (action: any) => action is any }\r\n}\r\n\r\nexport type ActionsFromAsyncThunk<T extends AnyAsyncThunk> =\r\n | ActionFromMatcher<T['pending']>\r\n | ActionFromMatcher<T['fulfilled']>\r\n | ActionFromMatcher<T['rejected']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator.\r\n *\r\n * @public\r\n */\r\nexport function isAsyncThunkAction(): (\r\n action: any\r\n) => action is UnknownAsyncThunkAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAsyncThunkAction<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is ActionsFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a thunk action\r\n * @public\r\n */\r\nexport function isAsyncThunkAction(\r\n action: any\r\n): action is UnknownAsyncThunkAction\r\nexport function isAsyncThunkAction<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) =>\r\n hasExpectedRequestMetadata(action, ['pending', 'fulfilled', 'rejected'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isAsyncThunkAction()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is ActionsFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = [] as any\r\n\r\n for (const asyncThunk of asyncThunks) {\r\n matchers.push(\r\n asyncThunk.pending,\r\n asyncThunk.rejected,\r\n asyncThunk.fulfilled\r\n )\r\n }\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n",null]}
|
||
diff --git a/dist/redux-toolkit.modern.development.js b/dist/redux-toolkit.modern.development.js
|
||
deleted file mode 100644
|
||
index 513fa6ddad6fcaff85a7aa53bd79b4c677426ee4..0000000000000000000000000000000000000000
|
||
--- a/dist/redux-toolkit.modern.development.js
|
||
+++ /dev/null
|
||
@@ -1,1148 +0,0 @@
|
||
-var __defProp = Object.defineProperty;
|
||
-var __defProps = Object.defineProperties;
|
||
-var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
||
-var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
||
-var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||
-var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
||
-var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||
-var __spreadValues = (a, b) => {
|
||
- for (var prop in b || (b = {}))
|
||
- if (__hasOwnProp.call(b, prop))
|
||
- __defNormalProp(a, prop, b[prop]);
|
||
- if (__getOwnPropSymbols)
|
||
- for (var prop of __getOwnPropSymbols(b)) {
|
||
- if (__propIsEnum.call(b, prop))
|
||
- __defNormalProp(a, prop, b[prop]);
|
||
- }
|
||
- return a;
|
||
-};
|
||
-var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
||
-// src/index.ts
|
||
-import { enableES5 } from "immer";
|
||
-export * from "redux";
|
||
-import { default as default2, current as current2, freeze, original, isDraft as isDraft4 } from "immer";
|
||
-import { createSelector as createSelector2 } from "reselect";
|
||
-// src/createDraftSafeSelector.ts
|
||
-import { current, isDraft } from "immer";
|
||
-import { createSelector } from "reselect";
|
||
-var createDraftSafeSelector = (...args) => {
|
||
- const selector = createSelector(...args);
|
||
- const wrappedSelector = (value, ...rest) => selector(isDraft(value) ? current(value) : value, ...rest);
|
||
- return wrappedSelector;
|
||
-};
|
||
-// src/configureStore.ts
|
||
-import { createStore, compose as compose2, applyMiddleware, combineReducers } from "redux";
|
||
-// src/devtoolsExtension.ts
|
||
-import { compose } from "redux";
|
||
-var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () {
|
||
- if (arguments.length === 0)
|
||
- return void 0;
|
||
- if (typeof arguments[0] === "object")
|
||
- return compose;
|
||
- return compose.apply(null, arguments);
|
||
-};
|
||
-var devToolsEnhancer = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () {
|
||
- return function (noop) {
|
||
- return noop;
|
||
- };
|
||
-};
|
||
-// src/isPlainObject.ts
|
||
-function isPlainObject(value) {
|
||
- if (typeof value !== "object" || value === null)
|
||
- return false;
|
||
- let proto = value;
|
||
- while (Object.getPrototypeOf(proto) !== null) {
|
||
- proto = Object.getPrototypeOf(proto);
|
||
- }
|
||
- return Object.getPrototypeOf(value) === proto;
|
||
-}
|
||
-// src/getDefaultMiddleware.ts
|
||
-import thunkMiddleware from "redux-thunk";
|
||
-// src/utils.ts
|
||
-function getTimeMeasureUtils(maxDelay, fnName) {
|
||
- let elapsed = 0;
|
||
- return {
|
||
- measureTime(fn) {
|
||
- const started = Date.now();
|
||
- try {
|
||
- return fn();
|
||
- }
|
||
- finally {
|
||
- const finished = Date.now();
|
||
- elapsed += finished - started;
|
||
- }
|
||
- },
|
||
- warnIfExceeded() {
|
||
- if (elapsed > maxDelay) {
|
||
- console.warn(`${fnName} took ${elapsed}ms, which is more than the warning threshold of ${maxDelay}ms.
|
||
-If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
|
||
-It is disabled in production builds, so you don't need to worry about that.`);
|
||
- }
|
||
- }
|
||
- };
|
||
-}
|
||
-var MiddlewareArray = class extends Array {
|
||
- constructor(...args) {
|
||
- super(...args);
|
||
- Object.setPrototypeOf(this, MiddlewareArray.prototype);
|
||
- }
|
||
- static get [Symbol.species]() {
|
||
- return MiddlewareArray;
|
||
- }
|
||
- concat(...arr) {
|
||
- return super.concat.apply(this, arr);
|
||
- }
|
||
- prepend(...arr) {
|
||
- if (arr.length === 1 && Array.isArray(arr[0])) {
|
||
- return new MiddlewareArray(...arr[0].concat(this));
|
||
- }
|
||
- return new MiddlewareArray(...arr.concat(this));
|
||
- }
|
||
-};
|
||
-// src/immutableStateInvariantMiddleware.ts
|
||
-var isProduction = false;
|
||
-var prefix = "Invariant failed";
|
||
-function invariant(condition, message) {
|
||
- if (condition) {
|
||
- return;
|
||
- }
|
||
- if (isProduction) {
|
||
- throw new Error(prefix);
|
||
- }
|
||
- throw new Error(`${prefix}: ${message || ""}`);
|
||
-}
|
||
-function stringify(obj, serializer, indent, decycler) {
|
||
- return JSON.stringify(obj, getSerialize(serializer, decycler), indent);
|
||
-}
|
||
-function getSerialize(serializer, decycler) {
|
||
- let stack = [], keys = [];
|
||
- if (!decycler)
|
||
- decycler = function (_, value) {
|
||
- if (stack[0] === value)
|
||
- return "[Circular ~]";
|
||
- return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]";
|
||
- };
|
||
- return function (key, value) {
|
||
- if (stack.length > 0) {
|
||
- var thisPos = stack.indexOf(this);
|
||
- ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
|
||
- ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
|
||
- if (~stack.indexOf(value))
|
||
- value = decycler.call(this, key, value);
|
||
- }
|
||
- else
|
||
- stack.push(value);
|
||
- return serializer == null ? value : serializer.call(this, key, value);
|
||
- };
|
||
-}
|
||
-function isImmutableDefault(value) {
|
||
- return typeof value !== "object" || value === null || typeof value === "undefined" || Object.isFrozen(value);
|
||
-}
|
||
-function trackForMutations(isImmutable, ignorePaths, obj) {
|
||
- const trackedProperties = trackProperties(isImmutable, ignorePaths, obj);
|
||
- return {
|
||
- detectMutations() {
|
||
- return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);
|
||
- }
|
||
- };
|
||
-}
|
||
-function trackProperties(isImmutable, ignorePaths = [], obj, path = "") {
|
||
- const tracked = { value: obj };
|
||
- if (!isImmutable(obj)) {
|
||
- tracked.children = {};
|
||
- for (const key in obj) {
|
||
- const childPath = path ? path + "." + key : key;
|
||
- if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
|
||
- continue;
|
||
- }
|
||
- tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);
|
||
- }
|
||
- }
|
||
- return tracked;
|
||
-}
|
||
-function detectMutations(isImmutable, ignorePaths = [], trackedProperty, obj, sameParentRef = false, path = "") {
|
||
- const prevObj = trackedProperty ? trackedProperty.value : void 0;
|
||
- const sameRef = prevObj === obj;
|
||
- if (sameParentRef && !sameRef && !Number.isNaN(obj)) {
|
||
- return { wasMutated: true, path };
|
||
- }
|
||
- if (isImmutable(prevObj) || isImmutable(obj)) {
|
||
- return { wasMutated: false };
|
||
- }
|
||
- const keysToDetect = {};
|
||
- for (let key in trackedProperty.children) {
|
||
- keysToDetect[key] = true;
|
||
- }
|
||
- for (let key in obj) {
|
||
- keysToDetect[key] = true;
|
||
- }
|
||
- for (let key in keysToDetect) {
|
||
- const childPath = path ? path + "." + key : key;
|
||
- if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
|
||
- continue;
|
||
- }
|
||
- const result = detectMutations(isImmutable, ignorePaths, trackedProperty.children[key], obj[key], sameRef, childPath);
|
||
- if (result.wasMutated) {
|
||
- return result;
|
||
- }
|
||
- }
|
||
- return { wasMutated: false };
|
||
-}
|
||
-function createImmutableStateInvariantMiddleware(options = {}) {
|
||
- if (false) {
|
||
- return () => (next) => (action) => next(action);
|
||
- }
|
||
- let { isImmutable = isImmutableDefault, ignoredPaths, warnAfter = 32, ignore } = options;
|
||
- ignoredPaths = ignoredPaths || ignore;
|
||
- const track = trackForMutations.bind(null, isImmutable, ignoredPaths);
|
||
- return ({ getState }) => {
|
||
- let state = getState();
|
||
- let tracker = track(state);
|
||
- let result;
|
||
- return (next) => (action) => {
|
||
- const measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware");
|
||
- measureUtils.measureTime(() => {
|
||
- state = getState();
|
||
- result = tracker.detectMutations();
|
||
- tracker = track(state);
|
||
- invariant(!result.wasMutated, `A state mutation was detected between dispatches, in the path '${result.path || ""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`);
|
||
- });
|
||
- const dispatchedAction = next(action);
|
||
- measureUtils.measureTime(() => {
|
||
- state = getState();
|
||
- result = tracker.detectMutations();
|
||
- tracker = track(state);
|
||
- result.wasMutated && invariant(!result.wasMutated, `A state mutation was detected inside a dispatch, in the path: ${result.path || ""}. Take a look at the reducer(s) handling the action ${stringify(action)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`);
|
||
- });
|
||
- measureUtils.warnIfExceeded();
|
||
- return dispatchedAction;
|
||
- };
|
||
- };
|
||
-}
|
||
-// src/serializableStateInvariantMiddleware.ts
|
||
-function isPlain(val) {
|
||
- const type = typeof val;
|
||
- return type === "undefined" || val === null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val);
|
||
-}
|
||
-function findNonSerializableValue(value, path = "", isSerializable = isPlain, getEntries, ignoredPaths = []) {
|
||
- let foundNestedSerializable;
|
||
- if (!isSerializable(value)) {
|
||
- return {
|
||
- keyPath: path || "<root>",
|
||
- value
|
||
- };
|
||
- }
|
||
- if (typeof value !== "object" || value === null) {
|
||
- return false;
|
||
- }
|
||
- const entries = getEntries != null ? getEntries(value) : Object.entries(value);
|
||
- const hasIgnoredPaths = ignoredPaths.length > 0;
|
||
- for (const [key, nestedValue] of entries) {
|
||
- const nestedPath = path ? path + "." + key : key;
|
||
- if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) {
|
||
- continue;
|
||
- }
|
||
- if (!isSerializable(nestedValue)) {
|
||
- return {
|
||
- keyPath: nestedPath,
|
||
- value: nestedValue
|
||
- };
|
||
- }
|
||
- if (typeof nestedValue === "object") {
|
||
- foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths);
|
||
- if (foundNestedSerializable) {
|
||
- return foundNestedSerializable;
|
||
- }
|
||
- }
|
||
- }
|
||
- return false;
|
||
-}
|
||
-function createSerializableStateInvariantMiddleware(options = {}) {
|
||
- if (false) {
|
||
- return () => (next) => (action) => next(action);
|
||
- }
|
||
- const { isSerializable = isPlain, getEntries, ignoredActions = [], ignoredActionPaths = ["meta.arg", "meta.baseQueryMeta"], ignoredPaths = [], warnAfter = 32, ignoreState = false } = options;
|
||
- return (storeAPI) => (next) => (action) => {
|
||
- if (ignoredActions.length && ignoredActions.indexOf(action.type) !== -1) {
|
||
- return next(action);
|
||
- }
|
||
- const measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware");
|
||
- measureUtils.measureTime(() => {
|
||
- const foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths);
|
||
- if (foundActionNonSerializableValue) {
|
||
- const { keyPath, value } = foundActionNonSerializableValue;
|
||
- console.error(`A non-serializable value was detected in an action, in the path: \`${keyPath}\`. Value:`, value, "\nTake a look at the logic that dispatched this action: ", action, "\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)", "\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)");
|
||
- }
|
||
- });
|
||
- const result = next(action);
|
||
- if (!ignoreState) {
|
||
- measureUtils.measureTime(() => {
|
||
- const state = storeAPI.getState();
|
||
- const foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths);
|
||
- if (foundStateNonSerializableValue) {
|
||
- const { keyPath, value } = foundStateNonSerializableValue;
|
||
- console.error(`A non-serializable value was detected in the state, in the path: \`${keyPath}\`. Value:`, value, `
|
||
-Take a look at the reducer(s) handling this action type: ${action.type}.
|
||
-(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`);
|
||
- }
|
||
- });
|
||
- measureUtils.warnIfExceeded();
|
||
- }
|
||
- return result;
|
||
- };
|
||
-}
|
||
-// src/getDefaultMiddleware.ts
|
||
-function isBoolean(x) {
|
||
- return typeof x === "boolean";
|
||
-}
|
||
-function curryGetDefaultMiddleware() {
|
||
- return function curriedGetDefaultMiddleware(options) {
|
||
- return getDefaultMiddleware(options);
|
||
- };
|
||
-}
|
||
-function getDefaultMiddleware(options = {}) {
|
||
- const { thunk = true, immutableCheck = true, serializableCheck = true } = options;
|
||
- let middlewareArray = new MiddlewareArray();
|
||
- if (thunk) {
|
||
- if (isBoolean(thunk)) {
|
||
- middlewareArray.push(thunkMiddleware);
|
||
- }
|
||
- else {
|
||
- middlewareArray.push(thunkMiddleware.withExtraArgument(thunk.extraArgument));
|
||
- }
|
||
- }
|
||
- if (true) {
|
||
- if (immutableCheck) {
|
||
- let immutableOptions = {};
|
||
- if (!isBoolean(immutableCheck)) {
|
||
- immutableOptions = immutableCheck;
|
||
- }
|
||
- middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));
|
||
- }
|
||
- if (serializableCheck) {
|
||
- let serializableOptions = {};
|
||
- if (!isBoolean(serializableCheck)) {
|
||
- serializableOptions = serializableCheck;
|
||
- }
|
||
- middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));
|
||
- }
|
||
- }
|
||
- return middlewareArray;
|
||
-}
|
||
-// src/configureStore.ts
|
||
-var IS_PRODUCTION = false;
|
||
-function configureStore(options) {
|
||
- const curriedGetDefaultMiddleware = curryGetDefaultMiddleware();
|
||
- const { reducer = void 0, middleware = curriedGetDefaultMiddleware(), devTools = true, preloadedState = void 0, enhancers = void 0 } = options || {};
|
||
- let rootReducer;
|
||
- if (typeof reducer === "function") {
|
||
- rootReducer = reducer;
|
||
- }
|
||
- else if (isPlainObject(reducer)) {
|
||
- rootReducer = combineReducers(reducer);
|
||
- }
|
||
- else {
|
||
- throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');
|
||
- }
|
||
- let finalMiddleware = middleware;
|
||
- if (typeof finalMiddleware === "function") {
|
||
- finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware);
|
||
- if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {
|
||
- throw new Error("when using a middleware builder function, an array of middleware must be returned");
|
||
- }
|
||
- }
|
||
- if (!IS_PRODUCTION && finalMiddleware.some((item) => typeof item !== "function")) {
|
||
- throw new Error("each middleware provided to configureStore must be a function");
|
||
- }
|
||
- const middlewareEnhancer = applyMiddleware(...finalMiddleware);
|
||
- let finalCompose = compose2;
|
||
- if (devTools) {
|
||
- finalCompose = composeWithDevTools(__spreadValues({
|
||
- trace: !IS_PRODUCTION
|
||
- }, typeof devTools === "object" && devTools));
|
||
- }
|
||
- let storeEnhancers = [middlewareEnhancer];
|
||
- if (Array.isArray(enhancers)) {
|
||
- storeEnhancers = [middlewareEnhancer, ...enhancers];
|
||
- }
|
||
- else if (typeof enhancers === "function") {
|
||
- storeEnhancers = enhancers(storeEnhancers);
|
||
- }
|
||
- const composedEnhancer = finalCompose(...storeEnhancers);
|
||
- return createStore(rootReducer, preloadedState, composedEnhancer);
|
||
-}
|
||
-// src/createAction.ts
|
||
-function createAction(type, prepareAction) {
|
||
- function actionCreator(...args) {
|
||
- if (prepareAction) {
|
||
- let prepared = prepareAction(...args);
|
||
- if (!prepared) {
|
||
- throw new Error("prepareAction did not return an object");
|
||
- }
|
||
- return __spreadValues(__spreadValues({
|
||
- type,
|
||
- payload: prepared.payload
|
||
- }, "meta" in prepared && { meta: prepared.meta }), "error" in prepared && { error: prepared.error });
|
||
- }
|
||
- return { type, payload: args[0] };
|
||
- }
|
||
- actionCreator.toString = () => `${type}`;
|
||
- actionCreator.type = type;
|
||
- actionCreator.match = (action) => action.type === type;
|
||
- return actionCreator;
|
||
-}
|
||
-function isFSA(action) {
|
||
- return isPlainObject(action) && typeof action.type === "string" && Object.keys(action).every(isValidKey);
|
||
-}
|
||
-function isValidKey(key) {
|
||
- return ["type", "payload", "error", "meta"].indexOf(key) > -1;
|
||
-}
|
||
-function getType(actionCreator) {
|
||
- return `${actionCreator}`;
|
||
-}
|
||
-// src/createReducer.ts
|
||
-import createNextState, { isDraft as isDraft2, isDraftable } from "immer";
|
||
-// src/mapBuilders.ts
|
||
-function executeReducerBuilderCallback(builderCallback) {
|
||
- const actionsMap = {};
|
||
- const actionMatchers = [];
|
||
- let defaultCaseReducer;
|
||
- const builder = {
|
||
- addCase(typeOrActionCreator, reducer) {
|
||
- if (true) {
|
||
- if (actionMatchers.length > 0) {
|
||
- throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");
|
||
- }
|
||
- if (defaultCaseReducer) {
|
||
- throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`");
|
||
- }
|
||
- }
|
||
- const type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
|
||
- if (type in actionsMap) {
|
||
- throw new Error("addCase cannot be called with two reducers for the same action type");
|
||
- }
|
||
- actionsMap[type] = reducer;
|
||
- return builder;
|
||
- },
|
||
- addMatcher(matcher, reducer) {
|
||
- if (true) {
|
||
- if (defaultCaseReducer) {
|
||
- throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
|
||
- }
|
||
- }
|
||
- actionMatchers.push({ matcher, reducer });
|
||
- return builder;
|
||
- },
|
||
- addDefaultCase(reducer) {
|
||
- if (true) {
|
||
- if (defaultCaseReducer) {
|
||
- throw new Error("`builder.addDefaultCase` can only be called once");
|
||
- }
|
||
- }
|
||
- defaultCaseReducer = reducer;
|
||
- return builder;
|
||
- }
|
||
- };
|
||
- builderCallback(builder);
|
||
- return [actionsMap, actionMatchers, defaultCaseReducer];
|
||
-}
|
||
-// src/createReducer.ts
|
||
-function createReducer(initialState, mapOrBuilderCallback, actionMatchers = [], defaultCaseReducer) {
|
||
- let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] = typeof mapOrBuilderCallback === "function" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer];
|
||
- const frozenInitialState = createNextState(initialState, () => {
|
||
- });
|
||
- return function (state = frozenInitialState, action) {
|
||
- let caseReducers = [
|
||
- actionsMap[action.type],
|
||
- ...finalActionMatchers.filter(({ matcher }) => matcher(action)).map(({ reducer }) => reducer)
|
||
- ];
|
||
- if (caseReducers.filter((cr) => !!cr).length === 0) {
|
||
- caseReducers = [finalDefaultCaseReducer];
|
||
- }
|
||
- return caseReducers.reduce((previousState, caseReducer) => {
|
||
- if (caseReducer) {
|
||
- if (isDraft2(previousState)) {
|
||
- const draft = previousState;
|
||
- const result = caseReducer(draft, action);
|
||
- if (typeof result === "undefined") {
|
||
- return previousState;
|
||
- }
|
||
- return result;
|
||
- }
|
||
- else if (!isDraftable(previousState)) {
|
||
- const result = caseReducer(previousState, action);
|
||
- if (typeof result === "undefined") {
|
||
- if (previousState === null) {
|
||
- return previousState;
|
||
- }
|
||
- throw Error("A case reducer on a non-draftable value must not return undefined");
|
||
- }
|
||
- return result;
|
||
- }
|
||
- else {
|
||
- return createNextState(previousState, (draft) => {
|
||
- return caseReducer(draft, action);
|
||
- });
|
||
- }
|
||
- }
|
||
- return previousState;
|
||
- }, state);
|
||
- };
|
||
-}
|
||
-// src/createSlice.ts
|
||
-function getType2(slice, actionKey) {
|
||
- return `${slice}/${actionKey}`;
|
||
-}
|
||
-function createSlice(options) {
|
||
- const { name, initialState } = options;
|
||
- if (!name) {
|
||
- throw new Error("`name` is a required option for createSlice");
|
||
- }
|
||
- const reducers = options.reducers || {};
|
||
- const [extraReducers = {}, actionMatchers = [], defaultCaseReducer = void 0] = typeof options.extraReducers === "function" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers];
|
||
- const reducerNames = Object.keys(reducers);
|
||
- const sliceCaseReducersByName = {};
|
||
- const sliceCaseReducersByType = {};
|
||
- const actionCreators = {};
|
||
- reducerNames.forEach((reducerName) => {
|
||
- const maybeReducerWithPrepare = reducers[reducerName];
|
||
- const type = getType2(name, reducerName);
|
||
- let caseReducer;
|
||
- let prepareCallback;
|
||
- if ("reducer" in maybeReducerWithPrepare) {
|
||
- caseReducer = maybeReducerWithPrepare.reducer;
|
||
- prepareCallback = maybeReducerWithPrepare.prepare;
|
||
- }
|
||
- else {
|
||
- caseReducer = maybeReducerWithPrepare;
|
||
- }
|
||
- sliceCaseReducersByName[reducerName] = caseReducer;
|
||
- sliceCaseReducersByType[type] = caseReducer;
|
||
- actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type);
|
||
- });
|
||
- const finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType);
|
||
- const reducer = createReducer(initialState, finalCaseReducers, actionMatchers, defaultCaseReducer);
|
||
- return {
|
||
- name,
|
||
- reducer,
|
||
- actions: actionCreators,
|
||
- caseReducers: sliceCaseReducersByName
|
||
- };
|
||
-}
|
||
-// src/entities/entity_state.ts
|
||
-function getInitialEntityState() {
|
||
- return {
|
||
- ids: [],
|
||
- entities: {}
|
||
- };
|
||
-}
|
||
-function createInitialStateFactory() {
|
||
- function getInitialState(additionalState = {}) {
|
||
- return Object.assign(getInitialEntityState(), additionalState);
|
||
- }
|
||
- return { getInitialState };
|
||
-}
|
||
-// src/entities/state_selectors.ts
|
||
-function createSelectorsFactory() {
|
||
- function getSelectors(selectState) {
|
||
- const selectIds = (state) => state.ids;
|
||
- const selectEntities = (state) => state.entities;
|
||
- const selectAll = createDraftSafeSelector(selectIds, selectEntities, (ids, entities) => ids.map((id) => entities[id]));
|
||
- const selectId = (_, id) => id;
|
||
- const selectById = (entities, id) => entities[id];
|
||
- const selectTotal = createDraftSafeSelector(selectIds, (ids) => ids.length);
|
||
- if (!selectState) {
|
||
- return {
|
||
- selectIds,
|
||
- selectEntities,
|
||
- selectAll,
|
||
- selectTotal,
|
||
- selectById: createDraftSafeSelector(selectEntities, selectId, selectById)
|
||
- };
|
||
- }
|
||
- const selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities);
|
||
- return {
|
||
- selectIds: createDraftSafeSelector(selectState, selectIds),
|
||
- selectEntities: selectGlobalizedEntities,
|
||
- selectAll: createDraftSafeSelector(selectState, selectAll),
|
||
- selectTotal: createDraftSafeSelector(selectState, selectTotal),
|
||
- selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById)
|
||
- };
|
||
- }
|
||
- return { getSelectors };
|
||
-}
|
||
-// src/entities/state_adapter.ts
|
||
-import createNextState2, { isDraft as isDraft3 } from "immer";
|
||
-function createSingleArgumentStateOperator(mutator) {
|
||
- const operator = createStateOperator((_, state) => mutator(state));
|
||
- return function operation(state) {
|
||
- return operator(state, void 0);
|
||
- };
|
||
-}
|
||
-function createStateOperator(mutator) {
|
||
- return function operation(state, arg) {
|
||
- function isPayloadActionArgument(arg2) {
|
||
- return isFSA(arg2);
|
||
- }
|
||
- const runMutator = (draft) => {
|
||
- if (isPayloadActionArgument(arg)) {
|
||
- mutator(arg.payload, draft);
|
||
- }
|
||
- else {
|
||
- mutator(arg, draft);
|
||
- }
|
||
- };
|
||
- if (isDraft3(state)) {
|
||
- runMutator(state);
|
||
- return state;
|
||
- }
|
||
- else {
|
||
- return createNextState2(state, runMutator);
|
||
- }
|
||
- };
|
||
-}
|
||
-// src/entities/utils.ts
|
||
-function selectIdValue(entity, selectId) {
|
||
- const key = selectId(entity);
|
||
- if (key === void 0) {
|
||
- console.warn("The entity passed to the `selectId` implementation returned undefined.", "You should probably provide your own `selectId` implementation.", "The entity that was passed:", entity, "The `selectId` implementation:", selectId.toString());
|
||
- }
|
||
- return key;
|
||
-}
|
||
-function ensureEntitiesArray(entities) {
|
||
- if (!Array.isArray(entities)) {
|
||
- entities = Object.values(entities);
|
||
- }
|
||
- return entities;
|
||
-}
|
||
-function splitAddedUpdatedEntities(newEntities, selectId, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- const added = [];
|
||
- const updated = [];
|
||
- for (const entity of newEntities) {
|
||
- const id = selectIdValue(entity, selectId);
|
||
- if (id in state.entities) {
|
||
- updated.push({ id, changes: entity });
|
||
- }
|
||
- else {
|
||
- added.push(entity);
|
||
- }
|
||
- }
|
||
- return [added, updated];
|
||
-}
|
||
-// src/entities/unsorted_state_adapter.ts
|
||
-function createUnsortedStateAdapter(selectId) {
|
||
- function addOneMutably(entity, state) {
|
||
- const key = selectIdValue(entity, selectId);
|
||
- if (key in state.entities) {
|
||
- return;
|
||
- }
|
||
- state.ids.push(key);
|
||
- state.entities[key] = entity;
|
||
- }
|
||
- function addManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- for (const entity of newEntities) {
|
||
- addOneMutably(entity, state);
|
||
- }
|
||
- }
|
||
- function setOneMutably(entity, state) {
|
||
- const key = selectIdValue(entity, selectId);
|
||
- if (!(key in state.entities)) {
|
||
- state.ids.push(key);
|
||
- }
|
||
- state.entities[key] = entity;
|
||
- }
|
||
- function setManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- for (const entity of newEntities) {
|
||
- setOneMutably(entity, state);
|
||
- }
|
||
- }
|
||
- function setAllMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- state.ids = [];
|
||
- state.entities = {};
|
||
- addManyMutably(newEntities, state);
|
||
- }
|
||
- function removeOneMutably(key, state) {
|
||
- return removeManyMutably([key], state);
|
||
- }
|
||
- function removeManyMutably(keys, state) {
|
||
- let didMutate = false;
|
||
- keys.forEach((key) => {
|
||
- if (key in state.entities) {
|
||
- delete state.entities[key];
|
||
- didMutate = true;
|
||
- }
|
||
- });
|
||
- if (didMutate) {
|
||
- state.ids = state.ids.filter((id) => id in state.entities);
|
||
- }
|
||
- }
|
||
- function removeAllMutably(state) {
|
||
- Object.assign(state, {
|
||
- ids: [],
|
||
- entities: {}
|
||
- });
|
||
- }
|
||
- function takeNewKey(keys, update, state) {
|
||
- const original2 = state.entities[update.id];
|
||
- const updated = Object.assign({}, original2, update.changes);
|
||
- const newKey = selectIdValue(updated, selectId);
|
||
- const hasNewKey = newKey !== update.id;
|
||
- if (hasNewKey) {
|
||
- keys[update.id] = newKey;
|
||
- delete state.entities[update.id];
|
||
- }
|
||
- state.entities[newKey] = updated;
|
||
- return hasNewKey;
|
||
- }
|
||
- function updateOneMutably(update, state) {
|
||
- return updateManyMutably([update], state);
|
||
- }
|
||
- function updateManyMutably(updates, state) {
|
||
- const newKeys = {};
|
||
- const updatesPerEntity = {};
|
||
- updates.forEach((update) => {
|
||
- if (update.id in state.entities) {
|
||
- updatesPerEntity[update.id] = {
|
||
- id: update.id,
|
||
- changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes)
|
||
- };
|
||
- }
|
||
- });
|
||
- updates = Object.values(updatesPerEntity);
|
||
- const didMutateEntities = updates.length > 0;
|
||
- if (didMutateEntities) {
|
||
- const didMutateIds = updates.filter((update) => takeNewKey(newKeys, update, state)).length > 0;
|
||
- if (didMutateIds) {
|
||
- state.ids = state.ids.map((id) => newKeys[id] || id);
|
||
- }
|
||
- }
|
||
- }
|
||
- function upsertOneMutably(entity, state) {
|
||
- return upsertManyMutably([entity], state);
|
||
- }
|
||
- function upsertManyMutably(newEntities, state) {
|
||
- const [added, updated] = splitAddedUpdatedEntities(newEntities, selectId, state);
|
||
- updateManyMutably(updated, state);
|
||
- addManyMutably(added, state);
|
||
- }
|
||
- return {
|
||
- removeAll: createSingleArgumentStateOperator(removeAllMutably),
|
||
- addOne: createStateOperator(addOneMutably),
|
||
- addMany: createStateOperator(addManyMutably),
|
||
- setOne: createStateOperator(setOneMutably),
|
||
- setMany: createStateOperator(setManyMutably),
|
||
- setAll: createStateOperator(setAllMutably),
|
||
- updateOne: createStateOperator(updateOneMutably),
|
||
- updateMany: createStateOperator(updateManyMutably),
|
||
- upsertOne: createStateOperator(upsertOneMutably),
|
||
- upsertMany: createStateOperator(upsertManyMutably),
|
||
- removeOne: createStateOperator(removeOneMutably),
|
||
- removeMany: createStateOperator(removeManyMutably)
|
||
- };
|
||
-}
|
||
-// src/entities/sorted_state_adapter.ts
|
||
-function createSortedStateAdapter(selectId, sort) {
|
||
- const { removeOne, removeMany, removeAll } = createUnsortedStateAdapter(selectId);
|
||
- function addOneMutably(entity, state) {
|
||
- return addManyMutably([entity], state);
|
||
- }
|
||
- function addManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- const models = newEntities.filter((model) => !(selectIdValue(model, selectId) in state.entities));
|
||
- if (models.length !== 0) {
|
||
- merge(models, state);
|
||
- }
|
||
- }
|
||
- function setOneMutably(entity, state) {
|
||
- return setManyMutably([entity], state);
|
||
- }
|
||
- function setManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- if (newEntities.length !== 0) {
|
||
- merge(newEntities, state);
|
||
- }
|
||
- }
|
||
- function setAllMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- state.entities = {};
|
||
- state.ids = [];
|
||
- addManyMutably(newEntities, state);
|
||
- }
|
||
- function updateOneMutably(update, state) {
|
||
- return updateManyMutably([update], state);
|
||
- }
|
||
- function takeUpdatedModel(models, update, state) {
|
||
- if (!(update.id in state.entities)) {
|
||
- return false;
|
||
- }
|
||
- const original2 = state.entities[update.id];
|
||
- const updated = Object.assign({}, original2, update.changes);
|
||
- const newKey = selectIdValue(updated, selectId);
|
||
- delete state.entities[update.id];
|
||
- models.push(updated);
|
||
- return newKey !== update.id;
|
||
- }
|
||
- function updateManyMutably(updates, state) {
|
||
- const models = [];
|
||
- updates.forEach((update) => takeUpdatedModel(models, update, state));
|
||
- if (models.length !== 0) {
|
||
- merge(models, state);
|
||
- }
|
||
- }
|
||
- function upsertOneMutably(entity, state) {
|
||
- return upsertManyMutably([entity], state);
|
||
- }
|
||
- function upsertManyMutably(newEntities, state) {
|
||
- const [added, updated] = splitAddedUpdatedEntities(newEntities, selectId, state);
|
||
- updateManyMutably(updated, state);
|
||
- addManyMutably(added, state);
|
||
- }
|
||
- function areArraysEqual(a, b) {
|
||
- if (a.length !== b.length) {
|
||
- return false;
|
||
- }
|
||
- for (let i = 0; i < a.length && i < b.length; i++) {
|
||
- if (a[i] === b[i]) {
|
||
- continue;
|
||
- }
|
||
- return false;
|
||
- }
|
||
- return true;
|
||
- }
|
||
- function merge(models, state) {
|
||
- models.forEach((model) => {
|
||
- state.entities[selectId(model)] = model;
|
||
- });
|
||
- const allEntities = Object.values(state.entities);
|
||
- allEntities.sort(sort);
|
||
- const newSortedIds = allEntities.map(selectId);
|
||
- const { ids } = state;
|
||
- if (!areArraysEqual(ids, newSortedIds)) {
|
||
- state.ids = newSortedIds;
|
||
- }
|
||
- }
|
||
- return {
|
||
- removeOne,
|
||
- removeMany,
|
||
- removeAll,
|
||
- addOne: createStateOperator(addOneMutably),
|
||
- updateOne: createStateOperator(updateOneMutably),
|
||
- upsertOne: createStateOperator(upsertOneMutably),
|
||
- setOne: createStateOperator(setOneMutably),
|
||
- setMany: createStateOperator(setManyMutably),
|
||
- setAll: createStateOperator(setAllMutably),
|
||
- addMany: createStateOperator(addManyMutably),
|
||
- updateMany: createStateOperator(updateManyMutably),
|
||
- upsertMany: createStateOperator(upsertManyMutably)
|
||
- };
|
||
-}
|
||
-// src/entities/create_adapter.ts
|
||
-function createEntityAdapter(options = {}) {
|
||
- const { selectId, sortComparer } = __spreadValues({
|
||
- sortComparer: false,
|
||
- selectId: (instance) => instance.id
|
||
- }, options);
|
||
- const stateFactory = createInitialStateFactory();
|
||
- const selectorsFactory = createSelectorsFactory();
|
||
- const stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId);
|
||
- return __spreadValues(__spreadValues(__spreadValues({
|
||
- selectId,
|
||
- sortComparer
|
||
- }, stateFactory), selectorsFactory), stateAdapter);
|
||
-}
|
||
-// src/nanoid.ts
|
||
-var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";
|
||
-var nanoid = (size = 21) => {
|
||
- let id = "";
|
||
- let i = size;
|
||
- while (i--) {
|
||
- id += urlAlphabet[Math.random() * 64 | 0];
|
||
- }
|
||
- return id;
|
||
-};
|
||
-// src/createAsyncThunk.ts
|
||
-var commonProperties = [
|
||
- "name",
|
||
- "message",
|
||
- "stack",
|
||
- "code"
|
||
-];
|
||
-var RejectWithValue = class {
|
||
- constructor(payload, meta) {
|
||
- this.payload = payload;
|
||
- this.meta = meta;
|
||
- }
|
||
-};
|
||
-var FulfillWithMeta = class {
|
||
- constructor(payload, meta) {
|
||
- this.payload = payload;
|
||
- this.meta = meta;
|
||
- }
|
||
-};
|
||
-var miniSerializeError = (value) => {
|
||
- if (typeof value === "object" && value !== null) {
|
||
- const simpleError = {};
|
||
- for (const property of commonProperties) {
|
||
- if (typeof value[property] === "string") {
|
||
- simpleError[property] = value[property];
|
||
- }
|
||
- }
|
||
- return simpleError;
|
||
- }
|
||
- return { message: String(value) };
|
||
-};
|
||
-function createAsyncThunk(typePrefix, payloadCreator, options) {
|
||
- const fulfilled = createAction(typePrefix + "/fulfilled", (payload, requestId, arg, meta) => ({
|
||
- payload,
|
||
- meta: __spreadProps(__spreadValues({}, meta || {}), {
|
||
- arg,
|
||
- requestId,
|
||
- requestStatus: "fulfilled"
|
||
- })
|
||
- }));
|
||
- const pending = createAction(typePrefix + "/pending", (requestId, arg, meta) => ({
|
||
- payload: void 0,
|
||
- meta: __spreadProps(__spreadValues({}, meta || {}), {
|
||
- arg,
|
||
- requestId,
|
||
- requestStatus: "pending"
|
||
- })
|
||
- }));
|
||
- const rejected = createAction(typePrefix + "/rejected", (error, requestId, arg, payload, meta) => ({
|
||
- payload,
|
||
- error: (options && options.serializeError || miniSerializeError)(error || "Rejected"),
|
||
- meta: __spreadProps(__spreadValues({}, meta || {}), {
|
||
- arg,
|
||
- requestId,
|
||
- rejectedWithValue: !!payload,
|
||
- requestStatus: "rejected",
|
||
- aborted: (error == null ? void 0 : error.name) === "AbortError",
|
||
- condition: (error == null ? void 0 : error.name) === "ConditionError"
|
||
- })
|
||
- }));
|
||
- let displayedWarning = false;
|
||
- const AC = typeof AbortController !== "undefined" ? AbortController : class {
|
||
- constructor() {
|
||
- this.signal = {
|
||
- aborted: false,
|
||
- addEventListener() {
|
||
- },
|
||
- dispatchEvent() {
|
||
- return false;
|
||
- },
|
||
- onabort() {
|
||
- },
|
||
- removeEventListener() {
|
||
- }
|
||
- };
|
||
- }
|
||
- abort() {
|
||
- if (true) {
|
||
- if (!displayedWarning) {
|
||
- displayedWarning = true;
|
||
- console.info(`This platform does not implement AbortController.
|
||
-If you want to use the AbortController to react to \`abort\` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.`);
|
||
- }
|
||
- }
|
||
- }
|
||
- };
|
||
- function actionCreator(arg) {
|
||
- return (dispatch, getState, extra) => {
|
||
- var _a;
|
||
- const requestId = ((_a = options == null ? void 0 : options.idGenerator) != null ? _a : nanoid)();
|
||
- const abortController = new AC();
|
||
- let abortReason;
|
||
- const abortedPromise = new Promise((_, reject) => abortController.signal.addEventListener("abort", () => reject({ name: "AbortError", message: abortReason || "Aborted" })));
|
||
- let started = false;
|
||
- function abort(reason) {
|
||
- if (started) {
|
||
- abortReason = reason;
|
||
- abortController.abort();
|
||
- }
|
||
- }
|
||
- const promise = async function () {
|
||
- var _a2;
|
||
- let finalAction;
|
||
- try {
|
||
- if (options && options.condition && options.condition(arg, { getState, extra }) === false) {
|
||
- throw {
|
||
- name: "ConditionError",
|
||
- message: "Aborted due to condition callback returning false."
|
||
- };
|
||
- }
|
||
- started = true;
|
||
- dispatch(pending(requestId, arg, (_a2 = options == null ? void 0 : options.getPendingMeta) == null ? void 0 : _a2.call(options, { requestId, arg }, { getState, extra })));
|
||
- finalAction = await Promise.race([
|
||
- abortedPromise,
|
||
- Promise.resolve(payloadCreator(arg, {
|
||
- dispatch,
|
||
- getState,
|
||
- extra,
|
||
- requestId,
|
||
- signal: abortController.signal,
|
||
- rejectWithValue: (value, meta) => {
|
||
- return new RejectWithValue(value, meta);
|
||
- },
|
||
- fulfillWithValue: (value, meta) => {
|
||
- return new FulfillWithMeta(value, meta);
|
||
- }
|
||
- })).then((result) => {
|
||
- if (result instanceof RejectWithValue) {
|
||
- throw result;
|
||
- }
|
||
- if (result instanceof FulfillWithMeta) {
|
||
- return fulfilled(result.payload, requestId, arg, result.meta);
|
||
- }
|
||
- return fulfilled(result, requestId, arg);
|
||
- })
|
||
- ]);
|
||
- }
|
||
- catch (err) {
|
||
- finalAction = err instanceof RejectWithValue ? rejected(null, requestId, arg, err.payload, err.meta) : rejected(err, requestId, arg);
|
||
- }
|
||
- const skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;
|
||
- if (!skipDispatch) {
|
||
- dispatch(finalAction);
|
||
- }
|
||
- return finalAction;
|
||
- }();
|
||
- return Object.assign(promise, {
|
||
- abort,
|
||
- requestId,
|
||
- arg,
|
||
- unwrap() {
|
||
- return promise.then(unwrapResult);
|
||
- }
|
||
- });
|
||
- };
|
||
- }
|
||
- return Object.assign(actionCreator, {
|
||
- pending,
|
||
- rejected,
|
||
- fulfilled,
|
||
- typePrefix
|
||
- });
|
||
-}
|
||
-function unwrapResult(action) {
|
||
- if (action.meta && action.meta.rejectedWithValue) {
|
||
- throw action.payload;
|
||
- }
|
||
- if (action.error) {
|
||
- throw action.error;
|
||
- }
|
||
- return action.payload;
|
||
-}
|
||
-// src/tsHelpers.ts
|
||
-var hasMatchFunction = (v) => {
|
||
- return v && typeof v.match === "function";
|
||
-};
|
||
-// src/matchers.ts
|
||
-var matches = (matcher, action) => {
|
||
- if (hasMatchFunction(matcher)) {
|
||
- return matcher.match(action);
|
||
- }
|
||
- else {
|
||
- return matcher(action);
|
||
- }
|
||
-};
|
||
-function isAnyOf(...matchers) {
|
||
- return (action) => {
|
||
- return matchers.some((matcher) => matches(matcher, action));
|
||
- };
|
||
-}
|
||
-function isAllOf(...matchers) {
|
||
- return (action) => {
|
||
- return matchers.every((matcher) => matches(matcher, action));
|
||
- };
|
||
-}
|
||
-function hasExpectedRequestMetadata(action, validStatus) {
|
||
- if (!action || !action.meta)
|
||
- return false;
|
||
- const hasValidRequestId = typeof action.meta.requestId === "string";
|
||
- const hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;
|
||
- return hasValidRequestId && hasValidRequestStatus;
|
||
-}
|
||
-function isAsyncThunkArray(a) {
|
||
- return typeof a[0] === "function" && "pending" in a[0] && "fulfilled" in a[0] && "rejected" in a[0];
|
||
-}
|
||
-function isPending(...asyncThunks) {
|
||
- if (asyncThunks.length === 0) {
|
||
- return (action) => hasExpectedRequestMetadata(action, ["pending"]);
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isPending()(asyncThunks[0]);
|
||
- }
|
||
- return (action) => {
|
||
- const matchers = asyncThunks.map((asyncThunk) => asyncThunk.pending);
|
||
- const combinedMatcher = isAnyOf(...matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
-}
|
||
-function isRejected(...asyncThunks) {
|
||
- if (asyncThunks.length === 0) {
|
||
- return (action) => hasExpectedRequestMetadata(action, ["rejected"]);
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isRejected()(asyncThunks[0]);
|
||
- }
|
||
- return (action) => {
|
||
- const matchers = asyncThunks.map((asyncThunk) => asyncThunk.rejected);
|
||
- const combinedMatcher = isAnyOf(...matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
-}
|
||
-function isRejectedWithValue(...asyncThunks) {
|
||
- const hasFlag = (action) => {
|
||
- return action && action.meta && action.meta.rejectedWithValue;
|
||
- };
|
||
- if (asyncThunks.length === 0) {
|
||
- return (action) => {
|
||
- const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isRejectedWithValue()(asyncThunks[0]);
|
||
- }
|
||
- return (action) => {
|
||
- const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
-}
|
||
-function isFulfilled(...asyncThunks) {
|
||
- if (asyncThunks.length === 0) {
|
||
- return (action) => hasExpectedRequestMetadata(action, ["fulfilled"]);
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isFulfilled()(asyncThunks[0]);
|
||
- }
|
||
- return (action) => {
|
||
- const matchers = asyncThunks.map((asyncThunk) => asyncThunk.fulfilled);
|
||
- const combinedMatcher = isAnyOf(...matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
-}
|
||
-function isAsyncThunkAction(...asyncThunks) {
|
||
- if (asyncThunks.length === 0) {
|
||
- return (action) => hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]);
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isAsyncThunkAction()(asyncThunks[0]);
|
||
- }
|
||
- return (action) => {
|
||
- const matchers = [];
|
||
- for (const asyncThunk of asyncThunks) {
|
||
- matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled);
|
||
- }
|
||
- const combinedMatcher = isAnyOf(...matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
-}
|
||
-// src/index.ts
|
||
-enableES5();
|
||
-export { MiddlewareArray, configureStore, createAction, createAsyncThunk, createDraftSafeSelector, createEntityAdapter, createImmutableStateInvariantMiddleware, default2 as createNextState, createReducer, createSelector2 as createSelector, createSerializableStateInvariantMiddleware, createSlice, current2 as current, findNonSerializableValue, freeze, getDefaultMiddleware, getType, isAllOf, isAnyOf, isAsyncThunkAction, isDraft4 as isDraft, isFulfilled, isImmutableDefault, isPending, isPlain, isPlainObject, isRejected, isRejectedWithValue, miniSerializeError, nanoid, original, unwrapResult };
|
||
-//# sourceMappingURL=redux-toolkit.modern.development.js.map
|
||
\ No newline at end of file
|
||
diff --git a/dist/redux-toolkit.modern.development.js.map b/dist/redux-toolkit.modern.development.js.map
|
||
deleted file mode 100644
|
||
index 8b8b341cd88d459ce0bd10013c3a90a25a20b7c3..0000000000000000000000000000000000000000
|
||
--- a/dist/redux-toolkit.modern.development.js.map
|
||
+++ /dev/null
|
||
@@ -1 +0,0 @@
|
||
-{"version":3,"sources":["../src/index.ts","../src/createDraftSafeSelector.ts","../src/configureStore.ts","../src/devtoolsExtension.ts","../src/isPlainObject.ts","../src/getDefaultMiddleware.ts","../src/utils.ts","../src/immutableStateInvariantMiddleware.ts","../src/serializableStateInvariantMiddleware.ts","../src/createAction.ts","../src/createReducer.ts","../src/mapBuilders.ts","../src/createSlice.ts","../src/entities/entity_state.ts","../src/entities/state_selectors.ts","../src/entities/state_adapter.ts","../src/entities/utils.ts","../src/entities/unsorted_state_adapter.ts","../src/entities/sorted_state_adapter.ts","../src/entities/create_adapter.ts","../src/nanoid.ts","../src/createAsyncThunk.ts","../src/tsHelpers.ts","../src/matchers.ts","redux-toolkit.modern.development.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAA,EAAA,SAAA,EAAA,MAAA,OAAA,CAAA;AACA,cAAA,OAAA,CAAA;AACA,OAAA,EAAA,OAAA,IAAA,QAAA,EAAA,OAAA,IAAA,QAAA,EAAA,MAAA,EAAA,QAAA,EAAA,OAAA,IAAA,QAAA,EAAA,MAAA,OAAA,CAAA;AAQA,OAAA,EAAA,cAAA,IAAA,eAAA,EAAA,MAAA,UAAA,CAAA;;ACVA,OAAA,EAAA,OAAA,EAAA,OAAA,EAAA,MAAA,OAAA,CAAA;AACA,OAAA,EAAA,cAAA,EAAA,MAAA,UAAA,CAAA;AASO,IAAM,uBAAA,GAAiD,CAAA,GACzD,IAAA,EAAA,EAAA;IAEH,MAAM,QAAA,GAAY,cAAA,CAAuB,GAAG,IAAA,CAAA,CAAA;IAC5C,MAAM,eAAA,GAAkB,CAAC,KAAA,EAAA,GAAmB,IAAA,EAAA,EAAA,CAC1C,QAAA,CAAS,OAAA,CAAQ,KAAA,CAAA,CAAA,CAAA,CAAS,OAAA,CAAQ,KAAA,CAAA,CAAA,CAAA,CAAS,KAAA,EAAO,GAAG,IAAA,CAAA,CAAA;IACvD,OAAO,eAAA,CAAA;AAAA,CAAA,CAAA;;ACJT,OAAA,EAAA,WAAA,EAAA,OAAA,IAAA,QAAA,EAAA,eAAA,EAAA,eAAA,EAAA,MAAA,OAAA,CAAA;;ACXA,OAAA,EAAA,OAAA,EAAA,MAA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AAM,eAAA,GAAkB,OAAA,CAAQ,GAAG,QAAA,CAAA,CAAA;QAEnC,OAAO,eAAA,CAAgB,MAAA,CAAA,CAAA;IAAA,CAAA,CAAA;AAAA,CAAA;AAiDpB,SAAA,kBAAA,CAAA,GAEF,WAAA;IACH,IAAI,WAAA,CAAY,MAAA,KAAW,CAAA,EAAG;QAC5B,OAAO,CAAC,MAAA,EAAA,EAAA,CACN,0BAAA,CAA2B,MAAA,EAAQ,CAAC,SAAA,EAAW,WAAA,EAAa,UAAA,CAAA,CAAA,CAAA;KAAA;IAGhE,IAAI,CAAC,iBAAA,CAAkB,WAAA,CAAA,EAAc;QACnC,OAAO,kBAAA,EAAA,CAAqB,WAAA,CAAY,CAAA,CAAA,CAAA,CAAA;KAAA;IAG1C,OAAO,CACL,MAAA,EAAA,EAAA;QAGA,MAAM,QAAA,GAA8C,EAAA,CAAA;QAEpD,KAAA,MAAW,UAAA,IAAc,WAAA,EAAa;YACpC,QAAA,CAAS,IAAA,CACP,UAAA,CAAW,OAAA,EACX,UAAA,CAAW,QAAA,EACX,UAAA,CAAW,SAAA,CAAA,CAAA;SAAA;QAIf,MAAM,eAAA,GAAkB,OAAA,CAAQ,GAAG,QAAA,CAAA,CAAA;QAEnC,OAAO,eAAA,CAAgB,MAAA,CAAA,CAAA;IAAA,CAAA,CAAA;AAAA,CAAA;;AvBhZ3B,SAAA,EAAA,CAAA","sourcesContent":["import { enableES5 } from 'immer'\r\nexport * from 'redux'\r\nexport {\r\n default as createNextState,\r\n current,\r\n freeze,\r\n original,\r\n isDraft,\r\n} from 'immer'\r\nexport type { Draft } from 'immer'\r\nexport { createSelector } from 'reselect'\r\nexport type {\r\n Selector,\r\n OutputParametricSelector,\r\n OutputSelector,\r\n ParametricSelector,\r\n} from 'reselect'\r\nexport { createDraftSafeSelector } from './createDraftSafeSelector'\r\nexport type { ThunkAction, ThunkDispatch } from 'redux-thunk'\r\n\r\n// We deliberately enable Immer's ES5 support, on the grounds that\r\n// we assume RTK will be used with React Native and other Proxy-less\r\n// environments. In addition, that's how Immer 4 behaved, and since\r\n// we want to ship this in an RTK minor, we should keep the same behavior.\r\nenableES5()\r\n\r\nexport {\r\n // js\r\n configureStore,\r\n} from './configureStore'\r\nexport type {\r\n // types\r\n ConfigureEnhancersCallback,\r\n ConfigureStoreOptions,\r\n EnhancedStore,\r\n} from './configureStore'\r\nexport {\r\n // js\r\n createAction,\r\n getType,\r\n} from './createAction'\r\nexport type {\r\n // types\r\n PayloadAction,\r\n PayloadActionCreator,\r\n ActionCreatorWithNonInferrablePayload,\r\n ActionCreatorWithOptionalPayload,\r\n ActionCreatorWithPayload,\r\n ActionCreatorWithoutPayload,\r\n ActionCreatorWithPreparedPayload,\r\n PrepareAction,\r\n} from './createAction'\r\nexport {\r\n // js\r\n createReducer,\r\n} from './createReducer'\r\nexport type {\r\n // types\r\n Actions,\r\n CaseReducer,\r\n CaseReducers,\r\n} from './createReducer'\r\nexport {\r\n // js\r\n createSlice,\r\n} from './createSlice'\r\n\r\nexport type {\r\n // types\r\n CreateSliceOptions,\r\n Slice,\r\n CaseReducerActions,\r\n SliceCaseReducers,\r\n ValidateSliceCaseReducers,\r\n CaseReducerWithPrepare,\r\n SliceActionCreator,\r\n} from './createSlice'\r\nexport {\r\n // js\r\n createImmutableStateInvariantMiddleware,\r\n isImmutableDefault,\r\n} from './immutableStateInvariantMiddleware'\r\nexport type {\r\n // types\r\n ImmutableStateInvariantMiddlewareOptions,\r\n} from './immutableStateInvariantMiddleware'\r\nexport {\r\n // js\r\n createSerializableStateInvariantMiddleware,\r\n findNonSerializableValue,\r\n isPlain,\r\n} from './serializableStateInvariantMiddleware'\r\nexport type {\r\n // types\r\n SerializableStateInvariantMiddlewareOptions,\r\n} from './serializableStateInvariantMiddleware'\r\nexport {\r\n // js\r\n getDefaultMiddleware,\r\n} from './getDefaultMiddleware'\r\nexport type {\r\n // types\r\n ActionReducerMapBuilder,\r\n} from './mapBuilders'\r\nexport { MiddlewareArray } from './utils'\r\n\r\nexport { createEntityAdapter } from './entities/create_adapter'\r\nexport type {\r\n Dictionary,\r\n EntityState,\r\n EntityAdapter,\r\n EntitySelectors,\r\n EntityStateAdapter,\r\n EntityId,\r\n Update,\r\n IdSelector,\r\n Comparer,\r\n} from './entities/models'\r\n\r\nexport {\r\n createAsyncThunk,\r\n unwrapResult,\r\n miniSerializeError,\r\n} from './createAsyncThunk'\r\nexport type {\r\n AsyncThunk,\r\n AsyncThunkOptions,\r\n AsyncThunkAction,\r\n AsyncThunkPayloadCreatorReturnValue,\r\n AsyncThunkPayloadCreator,\r\n SerializedError,\r\n} from './createAsyncThunk'\r\n\r\nexport {\r\n // js\r\n isAllOf,\r\n isAnyOf,\r\n isPending,\r\n isRejected,\r\n isFulfilled,\r\n isAsyncThunkAction,\r\n isRejectedWithValue,\r\n} from './matchers'\r\nexport type {\r\n // types\r\n ActionMatchingAllOf,\r\n ActionMatchingAnyOf,\r\n} from './matchers'\r\n\r\nexport { nanoid } from './nanoid'\r\n\r\nexport { default as isPlainObject } from './isPlainObject'\r\n","import { current, isDraft } from 'immer'\r\nimport { createSelector } from 'reselect'\r\n\r\n/**\r\n * \"Draft-Safe\" version of `reselect`'s `createSelector`:\r\n * If an `immer`-drafted object is passed into the resulting selector's first argument,\r\n * the selector will act on the current draft value, instead of returning a cached value\r\n * that might be possibly outdated if the draft has been modified since.\r\n * @public\r\n */\r\nexport const createDraftSafeSelector: typeof createSelector = (\r\n ...args: unknown[]\r\n) => {\r\n const selector = (createSelector as any)(...args)\r\n const wrappedSelector = (value: unknown, ...rest: unknown[]) =>\r\n selector(isDraft(value) ? current(value) : value, ...rest)\r\n return wrappedSelector as any\r\n}\r\n","import type {\r\n Reducer,\r\n ReducersMapObject,\r\n Middleware,\r\n Action,\r\n AnyAction,\r\n StoreEnhancer,\r\n Store,\r\n Dispatch,\r\n PreloadedState,\r\n CombinedState,\r\n} from 'redux'\r\nimport { createStore, compose, applyMiddleware, combineReducers } from 'redux'\r\nimport type { EnhancerOptions as DevToolsOptions } from './devtoolsExtension'\r\nimport { composeWithDevTools } from './devtoolsExtension'\r\n\r\nimport isPlainObject from './isPlainObject'\r\nimport type {\r\n ThunkMiddlewareFor,\r\n CurriedGetDefaultMiddleware,\r\n} from './getDefaultMiddleware'\r\nimport { curryGetDefaultMiddleware } from './getDefaultMiddleware'\r\nimport type { DispatchForMiddlewares, NoInfer } from './tsHelpers'\r\n\r\nconst IS_PRODUCTION = process.env.NODE_ENV === 'production'\r\n\r\n/**\r\n * Callback function type, to be used in `ConfigureStoreOptions.enhancers`\r\n *\r\n * @public\r\n */\r\nexport type ConfigureEnhancersCallback = (\r\n defaultEnhancers: readonly StoreEnhancer[]\r\n) => StoreEnhancer[]\r\n\r\n/**\r\n * Options for `configureStore()`.\r\n *\r\n * @public\r\n */\r\nexport interface ConfigureStoreOptions<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares<S> = Middlewares<S>\r\n> {\r\n /**\r\n * A single reducer function that will be used as the root reducer, or an\r\n * object of slice reducers that will be passed to `combineReducers()`.\r\n */\r\n reducer: Reducer<S, A> | ReducersMapObject<S, A>\r\n\r\n /**\r\n * An array of Redux middleware to install. If not supplied, defaults to\r\n * the set of middleware returned by `getDefaultMiddleware()`.\r\n */\r\n middleware?: ((getDefaultMiddleware: CurriedGetDefaultMiddleware<S>) => M) | M\r\n\r\n /**\r\n * Whether to enable Redux DevTools integration. Defaults to `true`.\r\n *\r\n * Additional configuration can be done by passing Redux DevTools options\r\n */\r\n devTools?: boolean | DevToolsOptions\r\n\r\n /**\r\n * The initial state, same as Redux's createStore.\r\n * You may optionally specify it to hydrate the state\r\n * from the server in universal apps, or to restore a previously serialized\r\n * user session. If you use `combineReducers()` to produce the root reducer\r\n * function (either directly or indirectly by passing an object as `reducer`),\r\n * this must be an object with the same shape as the reducer map keys.\r\n */\r\n /* \r\n Not 100% correct but the best approximation we can get:\r\n - if S is a `CombinedState` applying a second `CombinedState` on it does not change anything.\r\n - if it is not, there could be two cases:\r\n - `ReducersMapObject<S, A>` is being passed in. In this case, we will call `combineReducers` on it and `CombinedState<S>` is correct\r\n - `Reducer<S, A>` is being passed in. In this case, actually `CombinedState<S>` is wrong and `S` would be correct.\r\n As we cannot distinguish between those two cases without adding another generic paramter, \r\n we just make the pragmatic assumption that the latter almost never happens.\r\n */\r\n preloadedState?: PreloadedState<CombinedState<NoInfer<S>>>\r\n\r\n /**\r\n * The store enhancers to apply. See Redux's `createStore()`.\r\n * All enhancers will be included before the DevTools Extension enhancer.\r\n * If you need to customize the order of enhancers, supply a callback\r\n * function that will receive the original array (ie, `[applyMiddleware]`),\r\n * and should return a new array (such as `[applyMiddleware, offline]`).\r\n * If you only need to add middleware, you can use the `middleware` parameter instead.\r\n */\r\n enhancers?: StoreEnhancer[] | ConfigureEnhancersCallback\r\n}\r\n\r\ntype Middlewares<S> = ReadonlyArray<Middleware<{}, S>>\r\n\r\n/**\r\n * A Redux store returned by `configureStore()`. Supports dispatching\r\n * side-effectful _thunks_ in addition to plain actions.\r\n *\r\n * @public\r\n */\r\nexport interface EnhancedStore<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares<S> = Middlewares<S>\r\n> extends Store<S, A> {\r\n /**\r\n * The `dispatch` method of your store, enhanced by all its middlewares.\r\n *\r\n * @inheritdoc\r\n */\r\n dispatch: DispatchForMiddlewares<M> & Dispatch<A>\r\n}\r\n\r\n/**\r\n * A friendly abstraction over the standard Redux `createStore()` function.\r\n *\r\n * @param config The store configuration.\r\n * @returns A configured Redux store.\r\n *\r\n * @public\r\n */\r\nexport function configureStore<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares<S> = [ThunkMiddlewareFor<S>]\r\n>(options: ConfigureStoreOptions<S, A, M>): EnhancedStore<S, A, M> {\r\n const curriedGetDefaultMiddleware = curryGetDefaultMiddleware<S>()\r\n\r\n const {\r\n reducer = undefined,\r\n middleware = curriedGetDefaultMiddleware(),\r\n devTools = true,\r\n preloadedState = undefined,\r\n enhancers = undefined,\r\n } = options || {}\r\n\r\n let rootReducer: Reducer<S, A>\r\n\r\n if (typeof reducer === 'function') {\r\n rootReducer = reducer\r\n } else if (isPlainObject(reducer)) {\r\n rootReducer = combineReducers(reducer)\r\n } else {\r\n throw new Error(\r\n '\"reducer\" is a required argument, and must be a function or an object of functions that can be passed to combineReducers'\r\n )\r\n }\r\n\r\n let finalMiddleware = middleware\r\n if (typeof finalMiddleware === 'function') {\r\n finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware)\r\n\r\n if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {\r\n throw new Error(\r\n 'when using a middleware builder function, an array of middleware must be returned'\r\n )\r\n }\r\n }\r\n if (\r\n !IS_PRODUCTION &&\r\n finalMiddleware.some((item) => typeof item !== 'function')\r\n ) {\r\n throw new Error(\r\n 'each middleware provided to configureStore must be a function'\r\n )\r\n }\r\n\r\n const middlewareEnhancer = applyMiddleware(...finalMiddleware)\r\n\r\n let finalCompose = compose\r\n\r\n if (devTools) {\r\n finalCompose = composeWithDevTools({\r\n // Enable capture of stack traces for dispatched Redux actions\r\n trace: !IS_PRODUCTION,\r\n ...(typeof devTools === 'object' && devTools),\r\n })\r\n }\r\n\r\n let storeEnhancers: StoreEnhancer[] = [middlewareEnhancer]\r\n\r\n if (Array.isArray(enhancers)) {\r\n storeEnhancers = [middlewareEnhancer, ...enhancers]\r\n } else if (typeof enhancers === 'function') {\r\n storeEnhancers = enhancers(storeEnhancers)\r\n }\r\n\r\n const composedEnhancer = finalCompose(...storeEnhancers) as any\r\n\r\n return createStore(rootReducer, preloadedState, composedEnhancer)\r\n}\r\n","import type { Action, ActionCreator, StoreEnhancer } from 'redux'\r\nimport { compose } from 'redux'\r\n\r\n/**\r\n * @public\r\n */\r\nexport interface EnhancerOptions {\r\n /**\r\n * the instance name to be showed on the monitor page. Default value is `document.title`.\r\n * If not specified and there's no document title, it will consist of `tabId` and `instanceId`.\r\n */\r\n name?: string\r\n /**\r\n * action creators functions to be available in the Dispatcher.\r\n */\r\n actionCreators?: ActionCreator<any>[] | { [key: string]: ActionCreator<any> }\r\n /**\r\n * if more than one action is dispatched in the indicated interval, all new actions will be collected and sent at once.\r\n * It is the joint between performance and speed. When set to `0`, all actions will be sent instantly.\r\n * Set it to a higher value when experiencing perf issues (also `maxAge` to a lower value).\r\n *\r\n * @default 500 ms.\r\n */\r\n latency?: number\r\n /**\r\n * (> 1) - maximum allowed actions to be stored in the history tree. The oldest actions are removed once maxAge is reached. It's critical for performance.\r\n *\r\n * @default 50\r\n */\r\n maxAge?: number\r\n /**\r\n * See detailed documentation at http://extension.remotedev.io/docs/API/Arguments.html#serialize\r\n */\r\n serialize?:\r\n | boolean\r\n | {\r\n options?:\r\n | boolean\r\n | {\r\n date?: boolean\r\n regex?: boolean\r\n undefined?: boolean\r\n error?: boolean\r\n symbol?: boolean\r\n map?: boolean\r\n set?: boolean\r\n function?: boolean | Function\r\n }\r\n replacer?: (key: string, value: unknown) => unknown\r\n reviver?: (key: string, value: unknown) => unknown\r\n immutable?: unknown\r\n refs?: unknown[]\r\n }\r\n /**\r\n * function which takes `action` object and id number as arguments, and should return `action` object back.\r\n */\r\n actionSanitizer?: <A extends Action>(action: A, id: number) => A\r\n /**\r\n * function which takes `state` object and index as arguments, and should return `state` object back.\r\n */\r\n stateSanitizer?: <S>(state: S, index: number) => S\r\n /**\r\n * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\r\n * If `actionsWhitelist` specified, `actionsBlacklist` is ignored.\r\n */\r\n actionsBlacklist?: string | string[]\r\n /**\r\n * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\r\n * If `actionsWhitelist` specified, `actionsBlacklist` is ignored.\r\n */\r\n actionsWhitelist?: string | string[]\r\n /**\r\n * called for every action before sending, takes `state` and `action` object, and returns `true` in case it allows sending the current data to the monitor.\r\n * Use it as a more advanced version of `actionsBlacklist`/`actionsWhitelist` parameters.\r\n */\r\n predicate?: <S, A extends Action>(state: S, action: A) => boolean\r\n /**\r\n * if specified as `false`, it will not record the changes till clicking on `Start recording` button.\r\n * Available only for Redux enhancer, for others use `autoPause`.\r\n *\r\n * @default true\r\n */\r\n shouldRecordChanges?: boolean\r\n /**\r\n * if specified, whenever clicking on `Pause recording` button and there are actions in the history log, will add this action type.\r\n * If not specified, will commit when paused. Available only for Redux enhancer.\r\n *\r\n * @default \"@@PAUSED\"\"\r\n */\r\n pauseActionType?: string\r\n /**\r\n * auto pauses when the extension’s window is not opened, and so has zero impact on your app when not in use.\r\n * Not available for Redux enhancer (as it already does it but storing the data to be sent).\r\n *\r\n * @default false\r\n */\r\n autoPause?: boolean\r\n /**\r\n * if specified as `true`, it will not allow any non-monitor actions to be dispatched till clicking on `Unlock changes` button.\r\n * Available only for Redux enhancer.\r\n *\r\n * @default false\r\n */\r\n shouldStartLocked?: boolean\r\n /**\r\n * if set to `false`, will not recompute the states on hot reloading (or on replacing the reducers). Available only for Redux enhancer.\r\n *\r\n * @default true\r\n */\r\n shouldHotReload?: boolean\r\n /**\r\n * if specified as `true`, whenever there's an exception in reducers, the monitors will show the error message, and next actions will not be dispatched.\r\n *\r\n * @default false\r\n */\r\n shouldCatchErrors?: boolean\r\n /**\r\n * If you want to restrict the extension, specify the features you allow.\r\n * If not specified, all of the features are enabled. When set as an object, only those included as `true` will be allowed.\r\n * Note that except `true`/`false`, `import` and `export` can be set as `custom` (which is by default for Redux enhancer), meaning that the importing/exporting occurs on the client side.\r\n * Otherwise, you'll get/set the data right from the monitor part.\r\n */\r\n features?: {\r\n /**\r\n * start/pause recording of dispatched actions\r\n */\r\n pause?: boolean\r\n /**\r\n * lock/unlock dispatching actions and side effects\r\n */\r\n lock?: boolean\r\n /**\r\n * persist states on page reloading\r\n */\r\n persist?: boolean\r\n /**\r\n * export history of actions in a file\r\n */\r\n export?: boolean | 'custom'\r\n /**\r\n * import history of actions from a file\r\n */\r\n import?: boolean | 'custom'\r\n /**\r\n * jump back and forth (time travelling)\r\n */\r\n jump?: boolean\r\n /**\r\n * skip (cancel) actions\r\n */\r\n skip?: boolean\r\n /**\r\n * drag and drop actions in the history list\r\n */\r\n reorder?: boolean\r\n /**\r\n * dispatch custom actions or action creators\r\n */\r\n dispatch?: boolean\r\n /**\r\n * generate tests for the selected actions\r\n */\r\n test?: boolean\r\n }\r\n /**\r\n * Set to true or a stacktrace-returning function to record call stack traces for dispatched actions.\r\n * Defaults to false.\r\n */\r\n trace?: boolean | (<A extends Action>(action: A) => string)\r\n /**\r\n * The maximum number of stack trace entries to record per action. Defaults to 10.\r\n */\r\n traceLimit?: number\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport const composeWithDevTools: {\r\n (options: EnhancerOptions): typeof compose\r\n <StoreExt>(...funcs: Array<StoreEnhancer<StoreExt>>): StoreEnhancer<StoreExt>\r\n} =\r\n typeof window !== 'undefined' &&\r\n (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\r\n ? (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\r\n : function () {\r\n if (arguments.length === 0) return undefined\r\n if (typeof arguments[0] === 'object') return compose\r\n return compose.apply(null, arguments as any as Function[])\r\n }\r\n\r\n/**\r\n * @public\r\n */\r\nexport const devToolsEnhancer: {\r\n (options: EnhancerOptions): StoreEnhancer<any>\r\n} =\r\n typeof window !== 'undefined' && (window as any).__REDUX_DEVTOOLS_EXTENSION__\r\n ? (window as any).__REDUX_DEVTOOLS_EXTENSION__\r\n : function () {\r\n return function (noop) {\r\n return noop\r\n }\r\n }\r\n","/**\r\n * Returns true if the passed value is \"plain\" object, i.e. an object whose\r\n * prototype is the root `Object.prototype`. This includes objects created\r\n * using object literals, but not for instance for class instances.\r\n *\r\n * @param {any} value The value to inspect.\r\n * @returns {boolean} True if the argument appears to be a plain object.\r\n *\r\n * @public\r\n */\r\nexport default function isPlainObject(value: unknown): value is object {\r\n if (typeof value !== 'object' || value === null) return false\r\n\r\n let proto = value\r\n while (Object.getPrototypeOf(proto) !== null) {\r\n proto = Object.getPrototypeOf(proto)\r\n }\r\n\r\n return Object.getPrototypeOf(value) === proto\r\n}\r\n","import type { Middleware, AnyAction } from 'redux'\r\nimport type { ThunkMiddleware } from 'redux-thunk'\r\nimport thunkMiddleware from 'redux-thunk'\r\nimport type { ImmutableStateInvariantMiddlewareOptions } from './immutableStateInvariantMiddleware'\r\n/* PROD_START_REMOVE_UMD */\r\nimport { createImmutableStateInvariantMiddleware } from './immutableStateInvariantMiddleware'\r\n/* PROD_STOP_REMOVE_UMD */\r\n\r\nimport type { SerializableStateInvariantMiddlewareOptions } from './serializableStateInvariantMiddleware'\r\nimport { createSerializableStateInvariantMiddleware } from './serializableStateInvariantMiddleware'\r\nimport { MiddlewareArray } from './utils'\r\n\r\nfunction isBoolean(x: any): x is boolean {\r\n return typeof x === 'boolean'\r\n}\r\n\r\ninterface ThunkOptions<E = any> {\r\n extraArgument: E\r\n}\r\n\r\ninterface GetDefaultMiddlewareOptions {\r\n thunk?: boolean | ThunkOptions\r\n immutableCheck?: boolean | ImmutableStateInvariantMiddlewareOptions\r\n serializableCheck?: boolean | SerializableStateInvariantMiddlewareOptions\r\n}\r\n\r\nexport type ThunkMiddlewareFor<\r\n S,\r\n O extends GetDefaultMiddlewareOptions = {}\r\n> = O extends {\r\n thunk: false\r\n}\r\n ? never\r\n : O extends { thunk: { extraArgument: infer E } }\r\n ? ThunkMiddleware<S, AnyAction, E>\r\n :\r\n | ThunkMiddleware<S, AnyAction, null> //The ThunkMiddleware with a `null` ExtraArgument is here to provide backwards-compatibility.\r\n | ThunkMiddleware<S, AnyAction>\r\n\r\nexport type CurriedGetDefaultMiddleware<S = any> = <\r\n O extends Partial<GetDefaultMiddlewareOptions> = {\r\n thunk: true\r\n immutableCheck: true\r\n serializableCheck: true\r\n }\r\n>(\r\n options?: O\r\n) => MiddlewareArray<Middleware<{}, S> | ThunkMiddlewareFor<S, O>>\r\n\r\nexport function curryGetDefaultMiddleware<\r\n S = any\r\n>(): CurriedGetDefaultMiddleware<S> {\r\n return function curriedGetDefaultMiddleware(options) {\r\n return getDefaultMiddleware(options)\r\n }\r\n}\r\n\r\n/**\r\n * Returns any array containing the default middleware installed by\r\n * `configureStore()`. Useful if you want to configure your store with a custom\r\n * `middleware` array but still keep the default set.\r\n *\r\n * @return The default middleware used by `configureStore()`.\r\n *\r\n * @public\r\n *\r\n * @deprecated Prefer to use the callback notation for the `middleware` option in `configureStore`\r\n * to access a pre-typed `getDefaultMiddleware` instead.\r\n */\r\nexport function getDefaultMiddleware<\r\n S = any,\r\n O extends Partial<GetDefaultMiddlewareOptions> = {\r\n thunk: true\r\n immutableCheck: true\r\n serializableCheck: true\r\n }\r\n>(\r\n options: O = {} as O\r\n): MiddlewareArray<Middleware<{}, S> | ThunkMiddlewareFor<S, O>> {\r\n const {\r\n thunk = true,\r\n immutableCheck = true,\r\n serializableCheck = true,\r\n } = options\r\n\r\n let middlewareArray: Middleware<{}, S>[] = new MiddlewareArray()\r\n\r\n if (thunk) {\r\n if (isBoolean(thunk)) {\r\n middlewareArray.push(thunkMiddleware)\r\n } else {\r\n middlewareArray.push(\r\n thunkMiddleware.withExtraArgument(thunk.extraArgument)\r\n )\r\n }\r\n }\r\n\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (immutableCheck) {\r\n /* PROD_START_REMOVE_UMD */\r\n let immutableOptions: ImmutableStateInvariantMiddlewareOptions = {}\r\n\r\n if (!isBoolean(immutableCheck)) {\r\n immutableOptions = immutableCheck\r\n }\r\n\r\n middlewareArray.unshift(\r\n createImmutableStateInvariantMiddleware(immutableOptions)\r\n )\r\n /* PROD_STOP_REMOVE_UMD */\r\n }\r\n\r\n if (serializableCheck) {\r\n let serializableOptions: SerializableStateInvariantMiddlewareOptions = {}\r\n\r\n if (!isBoolean(serializableCheck)) {\r\n serializableOptions = serializableCheck\r\n }\r\n\r\n middlewareArray.push(\r\n createSerializableStateInvariantMiddleware(serializableOptions)\r\n )\r\n }\r\n }\r\n\r\n return middlewareArray as any\r\n}\r\n","import type { Middleware } from 'redux'\r\n\r\nexport function getTimeMeasureUtils(maxDelay: number, fnName: string) {\r\n let elapsed = 0\r\n return {\r\n measureTime<T>(fn: () => T): T {\r\n const started = Date.now()\r\n try {\r\n return fn()\r\n } finally {\r\n const finished = Date.now()\r\n elapsed += finished - started\r\n }\r\n },\r\n warnIfExceeded() {\r\n if (elapsed > maxDelay) {\r\n console.warn(`${fnName} took ${elapsed}ms, which is more than the warning threshold of ${maxDelay}ms. \r\nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\r\nIt is disabled in production builds, so you don't need to worry about that.`)\r\n }\r\n },\r\n }\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport class MiddlewareArray<\r\n Middlewares extends Middleware<any, any>\r\n> extends Array<Middlewares> {\r\n constructor(arrayLength?: number)\r\n constructor(...items: Middlewares[])\r\n constructor(...args: any[]) {\r\n super(...args)\r\n Object.setPrototypeOf(this, MiddlewareArray.prototype)\r\n }\r\n\r\n static get [Symbol.species]() {\r\n return MiddlewareArray as any\r\n }\r\n\r\n concat<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n items: AdditionalMiddlewares\r\n ): MiddlewareArray<Middlewares | AdditionalMiddlewares[number]>\r\n\r\n concat<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n ...items: AdditionalMiddlewares\r\n ): MiddlewareArray<Middlewares | AdditionalMiddlewares[number]>\r\n concat(...arr: any[]) {\r\n return super.concat.apply(this, arr)\r\n }\r\n\r\n prepend<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n items: AdditionalMiddlewares\r\n ): MiddlewareArray<AdditionalMiddlewares[number] | Middlewares>\r\n\r\n prepend<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n ...items: AdditionalMiddlewares\r\n ): MiddlewareArray<AdditionalMiddlewares[number] | Middlewares>\r\n\r\n prepend(...arr: any[]) {\r\n if (arr.length === 1 && Array.isArray(arr[0])) {\r\n return new MiddlewareArray(...arr[0].concat(this))\r\n }\r\n return new MiddlewareArray(...arr.concat(this))\r\n }\r\n}\r\n","import type { Middleware } from 'redux'\r\nimport { getTimeMeasureUtils } from './utils'\r\n\r\ntype EntryProcessor = (key: string, value: any) => any\r\n\r\nconst isProduction: boolean = process.env.NODE_ENV === 'production'\r\nconst prefix: string = 'Invariant failed'\r\n\r\n// Throw an error if the condition fails\r\n// Strip out error messages for production\r\n// > Not providing an inline default argument for message as the result is smaller\r\nfunction invariant(condition: any, message?: string) {\r\n if (condition) {\r\n return\r\n }\r\n // Condition not passed\r\n\r\n // In production we strip the message but still throw\r\n if (isProduction) {\r\n throw new Error(prefix)\r\n }\r\n\r\n // When not in production we allow the message to pass through\r\n // *This block will be removed in production builds*\r\n throw new Error(`${prefix}: ${message || ''}`)\r\n}\r\n\r\nfunction stringify(\r\n obj: any,\r\n serializer?: EntryProcessor,\r\n indent?: string | number,\r\n decycler?: EntryProcessor\r\n): string {\r\n return JSON.stringify(obj, getSerialize(serializer, decycler), indent)\r\n}\r\n\r\nfunction getSerialize(\r\n serializer?: EntryProcessor,\r\n decycler?: EntryProcessor\r\n): EntryProcessor {\r\n let stack: any[] = [],\r\n keys: any[] = []\r\n\r\n if (!decycler)\r\n decycler = function (_: string, value: any) {\r\n if (stack[0] === value) return '[Circular ~]'\r\n return (\r\n '[Circular ~.' + keys.slice(0, stack.indexOf(value)).join('.') + ']'\r\n )\r\n }\r\n\r\n return function (this: any, key: string, value: any) {\r\n if (stack.length > 0) {\r\n var thisPos = stack.indexOf(this)\r\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)\r\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)\r\n if (~stack.indexOf(value)) value = decycler!.call(this, key, value)\r\n } else stack.push(value)\r\n\r\n return serializer == null ? value : serializer.call(this, key, value)\r\n }\r\n}\r\n\r\n/**\r\n * The default `isImmutable` function.\r\n *\r\n * @public\r\n */\r\nexport function isImmutableDefault(value: unknown): boolean {\r\n return (\r\n typeof value !== 'object' ||\r\n value === null ||\r\n typeof value === 'undefined' ||\r\n Object.isFrozen(value)\r\n )\r\n}\r\n\r\nexport function trackForMutations(\r\n isImmutable: IsImmutableFunc,\r\n ignorePaths: string[] | undefined,\r\n obj: any\r\n) {\r\n const trackedProperties = trackProperties(isImmutable, ignorePaths, obj)\r\n return {\r\n detectMutations() {\r\n return detectMutations(isImmutable, ignorePaths, trackedProperties, obj)\r\n },\r\n }\r\n}\r\n\r\ninterface TrackedProperty {\r\n value: any\r\n children: Record<string, any>\r\n}\r\n\r\nfunction trackProperties(\r\n isImmutable: IsImmutableFunc,\r\n ignorePaths: IgnorePaths = [],\r\n obj: Record<string, any>,\r\n path: string = ''\r\n) {\r\n const tracked: Partial<TrackedProperty> = { value: obj }\r\n\r\n if (!isImmutable(obj)) {\r\n tracked.children = {}\r\n\r\n for (const key in obj) {\r\n const childPath = path ? path + '.' + key : key\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue\r\n }\r\n\r\n tracked.children[key] = trackProperties(\r\n isImmutable,\r\n ignorePaths,\r\n obj[key],\r\n childPath\r\n )\r\n }\r\n }\r\n return tracked as TrackedProperty\r\n}\r\n\r\ntype IgnorePaths = readonly string[]\r\n\r\nfunction detectMutations(\r\n isImmutable: IsImmutableFunc,\r\n ignorePaths: IgnorePaths = [],\r\n trackedProperty: TrackedProperty,\r\n obj: any,\r\n sameParentRef: boolean = false,\r\n path: string = ''\r\n): { wasMutated: boolean; path?: string } {\r\n const prevObj = trackedProperty ? trackedProperty.value : undefined\r\n\r\n const sameRef = prevObj === obj\r\n\r\n if (sameParentRef && !sameRef && !Number.isNaN(obj)) {\r\n return { wasMutated: true, path }\r\n }\r\n\r\n if (isImmutable(prevObj) || isImmutable(obj)) {\r\n return { wasMutated: false }\r\n }\r\n\r\n // Gather all keys from prev (tracked) and after objs\r\n const keysToDetect: Record<string, boolean> = {}\r\n for (let key in trackedProperty.children) {\r\n keysToDetect[key] = true\r\n }\r\n for (let key in obj) {\r\n keysToDetect[key] = true\r\n }\r\n\r\n for (let key in keysToDetect) {\r\n const childPath = path ? path + '.' + key : key\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue\r\n }\r\n\r\n const result = detectMutations(\r\n isImmutable,\r\n ignorePaths,\r\n trackedProperty.children[key],\r\n obj[key],\r\n sameRef,\r\n childPath\r\n )\r\n\r\n if (result.wasMutated) {\r\n return result\r\n }\r\n }\r\n return { wasMutated: false }\r\n}\r\n\r\ntype IsImmutableFunc = (value: any) => boolean\r\n\r\n/**\r\n * Options for `createImmutableStateInvariantMiddleware()`.\r\n *\r\n * @public\r\n */\r\nexport interface ImmutableStateInvariantMiddlewareOptions {\r\n /**\r\n Callback function to check if a value is considered to be immutable.\r\n This function is applied recursively to every value contained in the state.\r\n The default implementation will return true for primitive types \r\n (like numbers, strings, booleans, null and undefined).\r\n */\r\n isImmutable?: IsImmutableFunc\r\n /** \r\n An array of dot-separated path strings that match named nodes from \r\n the root state to ignore when checking for immutability.\r\n Defaults to undefined\r\n */\r\n ignoredPaths?: string[]\r\n /** Print a warning if checks take longer than N ms. Default: 32ms */\r\n warnAfter?: number\r\n // @deprecated. Use ignoredPaths\r\n ignore?: string[]\r\n}\r\n\r\n/**\r\n * Creates a middleware that checks whether any state was mutated in between\r\n * dispatches or during a dispatch. If any mutations are detected, an error is\r\n * thrown.\r\n *\r\n * @param options Middleware options.\r\n *\r\n * @public\r\n */\r\nexport function createImmutableStateInvariantMiddleware(\r\n options: ImmutableStateInvariantMiddlewareOptions = {}\r\n): Middleware {\r\n if (process.env.NODE_ENV === 'production') {\r\n return () => (next) => (action) => next(action)\r\n }\r\n\r\n let {\r\n isImmutable = isImmutableDefault,\r\n ignoredPaths,\r\n warnAfter = 32,\r\n ignore,\r\n } = options\r\n\r\n // Alias ignore->ignoredPaths, but prefer ignoredPaths if present\r\n ignoredPaths = ignoredPaths || ignore\r\n\r\n const track = trackForMutations.bind(null, isImmutable, ignoredPaths)\r\n\r\n return ({ getState }) => {\r\n let state = getState()\r\n let tracker = track(state)\r\n\r\n let result\r\n return (next) => (action) => {\r\n const measureUtils = getTimeMeasureUtils(\r\n warnAfter,\r\n 'ImmutableStateInvariantMiddleware'\r\n )\r\n\r\n measureUtils.measureTime(() => {\r\n state = getState()\r\n\r\n result = tracker.detectMutations()\r\n // Track before potentially not meeting the invariant\r\n tracker = track(state)\r\n\r\n invariant(\r\n !result.wasMutated,\r\n `A state mutation was detected between dispatches, in the path '${\r\n result.path || ''\r\n }'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`\r\n )\r\n })\r\n\r\n const dispatchedAction = next(action)\r\n\r\n measureUtils.measureTime(() => {\r\n state = getState()\r\n\r\n result = tracker.detectMutations()\r\n // Track before potentially not meeting the invariant\r\n tracker = track(state)\r\n\r\n result.wasMutated &&\r\n invariant(\r\n !result.wasMutated,\r\n `A state mutation was detected inside a dispatch, in the path: ${\r\n result.path || ''\r\n }. Take a look at the reducer(s) handling the action ${stringify(\r\n action\r\n )}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`\r\n )\r\n })\r\n\r\n measureUtils.warnIfExceeded()\r\n\r\n return dispatchedAction\r\n }\r\n }\r\n}\r\n","import isPlainObject from './isPlainObject'\r\nimport type { Middleware } from 'redux'\r\nimport { getTimeMeasureUtils } from './utils'\r\n\r\n/**\r\n * Returns true if the passed value is \"plain\", i.e. a value that is either\r\n * directly JSON-serializable (boolean, number, string, array, plain object)\r\n * or `undefined`.\r\n *\r\n * @param val The value to check.\r\n *\r\n * @public\r\n */\r\nexport function isPlain(val: any) {\r\n const type = typeof val\r\n return (\r\n type === 'undefined' ||\r\n val === null ||\r\n type === 'string' ||\r\n type === 'boolean' ||\r\n type === 'number' ||\r\n Array.isArray(val) ||\r\n isPlainObject(val)\r\n )\r\n}\r\n\r\ninterface NonSerializableValue {\r\n keyPath: string\r\n value: unknown\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport function findNonSerializableValue(\r\n value: unknown,\r\n path: string = '',\r\n isSerializable: (value: unknown) => boolean = isPlain,\r\n getEntries?: (value: unknown) => [string, any][],\r\n ignoredPaths: readonly string[] = []\r\n): NonSerializableValue | false {\r\n let foundNestedSerializable: NonSerializableValue | false\r\n\r\n if (!isSerializable(value)) {\r\n return {\r\n keyPath: path || '<root>',\r\n value: value,\r\n }\r\n }\r\n\r\n if (typeof value !== 'object' || value === null) {\r\n return false\r\n }\r\n\r\n const entries = getEntries != null ? getEntries(value) : Object.entries(value)\r\n\r\n const hasIgnoredPaths = ignoredPaths.length > 0\r\n\r\n for (const [key, nestedValue] of entries) {\r\n const nestedPath = path ? path + '.' + key : key\r\n\r\n if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) {\r\n continue\r\n }\r\n\r\n if (!isSerializable(nestedValue)) {\r\n return {\r\n keyPath: nestedPath,\r\n value: nestedValue,\r\n }\r\n }\r\n\r\n if (typeof nestedValue === 'object') {\r\n foundNestedSerializable = findNonSerializableValue(\r\n nestedValue,\r\n nestedPath,\r\n isSerializable,\r\n getEntries,\r\n ignoredPaths\r\n )\r\n\r\n if (foundNestedSerializable) {\r\n return foundNestedSerializable\r\n }\r\n }\r\n }\r\n\r\n return false\r\n}\r\n\r\n/**\r\n * Options for `createSerializableStateInvariantMiddleware()`.\r\n *\r\n * @public\r\n */\r\nexport interface SerializableStateInvariantMiddlewareOptions {\r\n /**\r\n * The function to check if a value is considered serializable. This\r\n * function is applied recursively to every value contained in the\r\n * state. Defaults to `isPlain()`.\r\n */\r\n isSerializable?: (value: any) => boolean\r\n /**\r\n * The function that will be used to retrieve entries from each\r\n * value. If unspecified, `Object.entries` will be used. Defaults\r\n * to `undefined`.\r\n */\r\n getEntries?: (value: any) => [string, any][]\r\n\r\n /**\r\n * An array of action types to ignore when checking for serializability.\r\n * Defaults to []\r\n */\r\n ignoredActions?: string[]\r\n\r\n /**\r\n * An array of dot-separated path strings to ignore when checking\r\n * for serializability, Defaults to ['meta.arg']\r\n */\r\n ignoredActionPaths?: string[]\r\n\r\n /**\r\n * An array of dot-separated path strings to ignore when checking\r\n * for serializability, Defaults to []\r\n */\r\n ignoredPaths?: string[]\r\n /**\r\n * Execution time warning threshold. If the middleware takes longer\r\n * than `warnAfter` ms, a warning will be displayed in the console.\r\n * Defaults to 32ms.\r\n */\r\n warnAfter?: number\r\n\r\n /**\r\n * Opt out of checking state, but continue checking actions\r\n */\r\n ignoreState?: boolean\r\n}\r\n\r\n/**\r\n * Creates a middleware that, after every state change, checks if the new\r\n * state is serializable. If a non-serializable value is found within the\r\n * state, an error is printed to the console.\r\n *\r\n * @param options Middleware options.\r\n *\r\n * @public\r\n */\r\nexport function createSerializableStateInvariantMiddleware(\r\n options: SerializableStateInvariantMiddlewareOptions = {}\r\n): Middleware {\r\n if (process.env.NODE_ENV === 'production') {\r\n return () => (next) => (action) => next(action)\r\n }\r\n const {\r\n isSerializable = isPlain,\r\n getEntries,\r\n ignoredActions = [],\r\n ignoredActionPaths = ['meta.arg', 'meta.baseQueryMeta'],\r\n ignoredPaths = [],\r\n warnAfter = 32,\r\n ignoreState = false,\r\n } = options\r\n\r\n return (storeAPI) => (next) => (action) => {\r\n if (ignoredActions.length && ignoredActions.indexOf(action.type) !== -1) {\r\n return next(action)\r\n }\r\n\r\n const measureUtils = getTimeMeasureUtils(\r\n warnAfter,\r\n 'SerializableStateInvariantMiddleware'\r\n )\r\n measureUtils.measureTime(() => {\r\n const foundActionNonSerializableValue = findNonSerializableValue(\r\n action,\r\n '',\r\n isSerializable,\r\n getEntries,\r\n ignoredActionPaths\r\n )\r\n\r\n if (foundActionNonSerializableValue) {\r\n const { keyPath, value } = foundActionNonSerializableValue\r\n\r\n console.error(\r\n `A non-serializable value was detected in an action, in the path: \\`${keyPath}\\`. Value:`,\r\n value,\r\n '\\nTake a look at the logic that dispatched this action: ',\r\n action,\r\n '\\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)',\r\n '\\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)'\r\n )\r\n }\r\n })\r\n\r\n const result = next(action)\r\n\r\n if (!ignoreState) {\r\n measureUtils.measureTime(() => {\r\n const state = storeAPI.getState()\r\n\r\n const foundStateNonSerializableValue = findNonSerializableValue(\r\n state,\r\n '',\r\n isSerializable,\r\n getEntries,\r\n ignoredPaths\r\n )\r\n\r\n if (foundStateNonSerializableValue) {\r\n const { keyPath, value } = foundStateNonSerializableValue\r\n\r\n console.error(\r\n `A non-serializable value was detected in the state, in the path: \\`${keyPath}\\`. Value:`,\r\n value,\r\n `\r\nTake a look at the reducer(s) handling this action type: ${action.type}.\r\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`\r\n )\r\n }\r\n })\r\n\r\n measureUtils.warnIfExceeded()\r\n }\r\n\r\n return result\r\n }\r\n}\r\n","import type { Action } from 'redux'\r\nimport type {\r\n IsUnknownOrNonInferrable,\r\n IfMaybeUndefined,\r\n IfVoid,\r\n IsAny,\r\n} from './tsHelpers'\r\nimport isPlainObject from './isPlainObject'\r\n\r\n/**\r\n * An action with a string type and an associated payload. This is the\r\n * type of action returned by `createAction()` action creators.\r\n *\r\n * @template P The type of the action's payload.\r\n * @template T the type used for the action type.\r\n * @template M The type of the action's meta (optional)\r\n * @template E The type of the action's error (optional)\r\n *\r\n * @public\r\n */\r\nexport type PayloadAction<\r\n P = void,\r\n T extends string = string,\r\n M = never,\r\n E = never\r\n> = {\r\n payload: P\r\n type: T\r\n} & ([M] extends [never]\r\n ? {}\r\n : {\r\n meta: M\r\n }) &\r\n ([E] extends [never]\r\n ? {}\r\n : {\r\n error: E\r\n })\r\n\r\n/**\r\n * A \"prepare\" method to be used as the second parameter of `createAction`.\r\n * Takes any number of arguments and returns a Flux Standard Action without\r\n * type (will be added later) that *must* contain a payload (might be undefined).\r\n *\r\n * @public\r\n */\r\nexport type PrepareAction<P> =\r\n | ((...args: any[]) => { payload: P })\r\n | ((...args: any[]) => { payload: P; meta: any })\r\n | ((...args: any[]) => { payload: P; error: any })\r\n | ((...args: any[]) => { payload: P; meta: any; error: any })\r\n\r\n/**\r\n * Internal version of `ActionCreatorWithPreparedPayload`. Not to be used externally.\r\n *\r\n * @internal\r\n */\r\nexport type _ActionCreatorWithPreparedPayload<\r\n PA extends PrepareAction<any> | void,\r\n T extends string = string\r\n> = PA extends PrepareAction<infer P>\r\n ? ActionCreatorWithPreparedPayload<\r\n Parameters<PA>,\r\n P,\r\n T,\r\n ReturnType<PA> extends {\r\n error: infer E\r\n }\r\n ? E\r\n : never,\r\n ReturnType<PA> extends {\r\n meta: infer M\r\n }\r\n ? M\r\n : never\r\n >\r\n : void\r\n\r\n/**\r\n * Basic type for all action creators.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n */\r\ninterface BaseActionCreator<P, T extends string, M = never, E = never> {\r\n type: T\r\n match: (action: Action<unknown>) => action is PayloadAction<P, T, M, E>\r\n}\r\n\r\n/**\r\n * An action creator that takes multiple arguments that are passed\r\n * to a `PrepareAction` method to create the final Action.\r\n * @typeParam Args arguments for the action creator function\r\n * @typeParam P `payload` type\r\n * @typeParam T `type` name\r\n * @typeParam E optional `error` type\r\n * @typeParam M optional `meta` type\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithPreparedPayload<\r\n Args extends unknown[],\r\n P,\r\n T extends string = string,\r\n E = never,\r\n M = never\r\n> extends BaseActionCreator<P, T, M, E> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with `Args` will return\r\n * an Action with a payload of type `P` and (depending on the `PrepareAction`\r\n * method used) a `meta`- and `error` property of types `M` and `E` respectively.\r\n */\r\n (...args: Args): PayloadAction<P, T, M, E>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that takes an optional payload of type `P`.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithOptionalPayload<P, T extends string = string>\r\n extends BaseActionCreator<P, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload of `P`.\r\n * Calling it without an argument will return a PayloadAction with a payload of `undefined`.\r\n */\r\n (payload?: P): PayloadAction<P, T>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that takes no payload.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithoutPayload<T extends string = string>\r\n extends BaseActionCreator<undefined, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} will\r\n * return a {@link PayloadAction} of type `T` with a payload of `undefined`\r\n */\r\n (): PayloadAction<undefined, T>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that requires a payload of type P.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithPayload<P, T extends string = string>\r\n extends BaseActionCreator<P, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload of `P`\r\n */\r\n (payload: P): PayloadAction<P, T>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` whose `payload` type could not be inferred. Accepts everything as `payload`.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithNonInferrablePayload<\r\n T extends string = string\r\n> extends BaseActionCreator<unknown, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload\r\n * of exactly the type of the argument.\r\n */\r\n <PT extends unknown>(payload: PT): PayloadAction<PT, T>\r\n}\r\n\r\n/**\r\n * An action creator that produces actions with a `payload` attribute.\r\n *\r\n * @typeParam P the `payload` type\r\n * @typeParam T the `type` of the resulting action\r\n * @typeParam PA if the resulting action is preprocessed by a `prepare` method, the signature of said method.\r\n *\r\n * @public\r\n */\r\nexport type PayloadActionCreator<\r\n P = void,\r\n T extends string = string,\r\n PA extends PrepareAction<P> | void = void\r\n> = IfPrepareActionMethodProvided<\r\n PA,\r\n _ActionCreatorWithPreparedPayload<PA, T>,\r\n // else\r\n IsAny<\r\n P,\r\n ActionCreatorWithPayload<any, T>,\r\n IsUnknownOrNonInferrable<\r\n P,\r\n ActionCreatorWithNonInferrablePayload<T>,\r\n // else\r\n IfVoid<\r\n P,\r\n ActionCreatorWithoutPayload<T>,\r\n // else\r\n IfMaybeUndefined<\r\n P,\r\n ActionCreatorWithOptionalPayload<P, T>,\r\n // else\r\n ActionCreatorWithPayload<P, T>\r\n >\r\n >\r\n >\r\n >\r\n>\r\n\r\n/**\r\n * A utility function to create an action creator for the given action type\r\n * string. The action creator accepts a single argument, which will be included\r\n * in the action object as a field called payload. The action creator function\r\n * will also have its toString() overriden so that it returns the action type,\r\n * allowing it to be used in reducer logic that is looking for that action type.\r\n *\r\n * @param type The action type to use for created actions.\r\n * @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.\r\n * If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.\r\n *\r\n * @public\r\n */\r\nexport function createAction<P = void, T extends string = string>(\r\n type: T\r\n): PayloadActionCreator<P, T>\r\n\r\n/**\r\n * A utility function to create an action creator for the given action type\r\n * string. The action creator accepts a single argument, which will be included\r\n * in the action object as a field called payload. The action creator function\r\n * will also have its toString() overriden so that it returns the action type,\r\n * allowing it to be used in reducer logic that is looking for that action type.\r\n *\r\n * @param type The action type to use for created actions.\r\n * @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.\r\n * If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.\r\n *\r\n * @public\r\n */\r\nexport function createAction<\r\n PA extends PrepareAction<any>,\r\n T extends string = string\r\n>(\r\n type: T,\r\n prepareAction: PA\r\n): PayloadActionCreator<ReturnType<PA>['payload'], T, PA>\r\n\r\nexport function createAction(type: string, prepareAction?: Function): any {\r\n function actionCreator(...args: any[]) {\r\n if (prepareAction) {\r\n let prepared = prepareAction(...args)\r\n if (!prepared) {\r\n throw new Error('prepareAction did not return an object')\r\n }\r\n\r\n return {\r\n type,\r\n payload: prepared.payload,\r\n ...('meta' in prepared && { meta: prepared.meta }),\r\n ...('error' in prepared && { error: prepared.error }),\r\n }\r\n }\r\n return { type, payload: args[0] }\r\n }\r\n\r\n actionCreator.toString = () => `${type}`\r\n\r\n actionCreator.type = type\r\n\r\n actionCreator.match = (action: Action<unknown>): action is PayloadAction =>\r\n action.type === type\r\n\r\n return actionCreator\r\n}\r\n\r\nexport function isFSA(action: unknown): action is {\r\n type: string\r\n payload?: unknown\r\n error?: unknown\r\n meta?: unknown\r\n} {\r\n return (\r\n isPlainObject(action) &&\r\n typeof (action as any).type === 'string' &&\r\n Object.keys(action).every(isValidKey)\r\n )\r\n}\r\n\r\nfunction isValidKey(key: string) {\r\n return ['type', 'payload', 'error', 'meta'].indexOf(key) > -1\r\n}\r\n\r\n/**\r\n * Returns the action type of the actions created by the passed\r\n * `createAction()`-generated action creator (arbitrary action creators\r\n * are not supported).\r\n *\r\n * @param action The action creator whose action type to get.\r\n * @returns The action type used by the action creator.\r\n *\r\n * @public\r\n */\r\nexport function getType<T extends string>(\r\n actionCreator: PayloadActionCreator<any, T>\r\n): T {\r\n return `${actionCreator}` as T\r\n}\r\n\r\n// helper types for more readable typings\r\n\r\ntype IfPrepareActionMethodProvided<\r\n PA extends PrepareAction<any> | void,\r\n True,\r\n False\r\n> = PA extends (...args: any[]) => any ? True : False\r\n","import type { Draft } from 'immer'\r\nimport createNextState, { isDraft, isDraftable } from 'immer'\r\nimport type { AnyAction, Action, Reducer } from 'redux'\r\nimport type { ActionReducerMapBuilder } from './mapBuilders'\r\nimport { executeReducerBuilderCallback } from './mapBuilders'\r\nimport type { NoInfer } from './tsHelpers'\r\n\r\n/**\r\n * Defines a mapping from action types to corresponding action object shapes.\r\n *\r\n * @deprecated This should not be used manually - it is only used for internal\r\n * inference purposes and should not have any further value.\r\n * It might be removed in the future.\r\n * @public\r\n */\r\nexport type Actions<T extends keyof any = string> = Record<T, Action>\r\n\r\nexport interface ActionMatcher<A extends AnyAction> {\r\n (action: AnyAction): action is A\r\n}\r\n\r\nexport type ActionMatcherDescription<S, A extends AnyAction> = {\r\n matcher: ActionMatcher<A>\r\n reducer: CaseReducer<S, NoInfer<A>>\r\n}\r\n\r\nexport type ReadonlyActionMatcherDescriptionCollection<S> = ReadonlyArray<\r\n ActionMatcherDescription<S, any>\r\n>\r\n\r\nexport type ActionMatcherDescriptionCollection<S> = Array<\r\n ActionMatcherDescription<S, any>\r\n>\r\n\r\n/**\r\n * An *case reducer* is a reducer function for a specific action type. Case\r\n * reducers can be composed to full reducers using `createReducer()`.\r\n *\r\n * Unlike a normal Redux reducer, a case reducer is never called with an\r\n * `undefined` state to determine the initial state. Instead, the initial\r\n * state is explicitly specified as an argument to `createReducer()`.\r\n *\r\n * In addition, a case reducer can choose to mutate the passed-in `state`\r\n * value directly instead of returning a new state. This does not actually\r\n * cause the store state to be mutated directly; instead, thanks to\r\n * [immer](https://github.com/mweststrate/immer), the mutations are\r\n * translated to copy operations that result in a new state.\r\n *\r\n * @public\r\n */\r\nexport type CaseReducer<S = any, A extends Action = AnyAction> = (\r\n state: Draft<S>,\r\n action: A\r\n) => S | void | Draft<S>\r\n\r\n/**\r\n * A mapping from action types to case reducers for `createReducer()`.\r\n *\r\n * @deprecated This should not be used manually - it is only used\r\n * for internal inference purposes and using it manually\r\n * would lead to type erasure.\r\n * It might be removed in the future.\r\n * @public\r\n */\r\nexport type CaseReducers<S, AS extends Actions> = {\r\n [T in keyof AS]: AS[T] extends Action ? CaseReducer<S, AS[T]> : void\r\n}\r\n\r\n/**\r\n * A utility function that allows defining a reducer as a mapping from action\r\n * type to *case reducer* functions that handle these action types. The\r\n * reducer's initial state is passed as the first argument.\r\n *\r\n * @remarks\r\n * The body of every case reducer is implicitly wrapped with a call to\r\n * `produce()` from the [immer](https://github.com/mweststrate/immer) library.\r\n * This means that rather than returning a new state object, you can also\r\n * mutate the passed-in state object directly; these mutations will then be\r\n * automatically and efficiently translated into copies, giving you both\r\n * convenience and immutability.\r\n *\r\n * @overloadSummary\r\n * This overload accepts a callback function that receives a `builder` object as its argument.\r\n * That builder provides `addCase`, `addMatcher` and `addDefaultCase` functions that may be\r\n * called to define what actions this reducer will handle.\r\n *\r\n * @param initialState - The initial state that should be used when the reducer is called the first time.\r\n * @param builderCallback - A callback that receives a *builder* object to define\r\n * case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`.\r\n * @example\r\n```ts\r\nimport {\r\n createAction,\r\n createReducer,\r\n AnyAction,\r\n PayloadAction,\r\n} from \"@reduxjs/toolkit\";\r\n\r\nconst increment = createAction<number>(\"increment\");\r\nconst decrement = createAction<number>(\"decrement\");\r\n\r\nfunction isActionWithNumberPayload(\r\n action: AnyAction\r\n): action is PayloadAction<number> {\r\n return typeof action.payload === \"number\";\r\n}\r\n\r\ncreateReducer(\r\n {\r\n counter: 0,\r\n sumOfNumberPayloads: 0,\r\n unhandledActions: 0,\r\n },\r\n (builder) => {\r\n builder\r\n .addCase(increment, (state, action) => {\r\n // action is inferred correctly here\r\n state.counter += action.payload;\r\n })\r\n // You can chain calls, or have separate `builder.addCase()` lines each time\r\n .addCase(decrement, (state, action) => {\r\n state.counter -= action.payload;\r\n })\r\n // You can apply a \"matcher function\" to incoming actions\r\n .addMatcher(isActionWithNumberPayload, (state, action) => {})\r\n // and provide a default case if no other handlers matched\r\n .addDefaultCase((state, action) => {});\r\n }\r\n);\r\n```\r\n * @public\r\n */\r\nexport function createReducer<S>(\r\n initialState: S,\r\n builderCallback: (builder: ActionReducerMapBuilder<S>) => void\r\n): Reducer<S>\r\n\r\n/**\r\n * A utility function that allows defining a reducer as a mapping from action\r\n * type to *case reducer* functions that handle these action types. The\r\n * reducer's initial state is passed as the first argument.\r\n *\r\n * The body of every case reducer is implicitly wrapped with a call to\r\n * `produce()` from the [immer](https://github.com/mweststrate/immer) library.\r\n * This means that rather than returning a new state object, you can also\r\n * mutate the passed-in state object directly; these mutations will then be\r\n * automatically and efficiently translated into copies, giving you both\r\n * convenience and immutability.\r\n * \r\n * @overloadSummary\r\n * This overload accepts an object where the keys are string action types, and the values\r\n * are case reducer functions to handle those action types.\r\n *\r\n * @param initialState - The initial state that should be used when the reducer is called the first time.\r\n * @param actionsMap - An object mapping from action types to _case reducers_, each of which handles one specific action type.\r\n * @param actionMatchers - An array of matcher definitions in the form `{matcher, reducer}`.\r\n * All matching reducers will be executed in order, independently if a case reducer matched or not.\r\n * @param defaultCaseReducer - A \"default case\" reducer that is executed if no case reducer and no matcher\r\n * reducer was executed for this action.\r\n *\r\n * @example\r\n```js\r\nconst counterReducer = createReducer(0, {\r\n increment: (state, action) => state + action.payload,\r\n decrement: (state, action) => state - action.payload\r\n})\r\n```\r\n \r\n * Action creators that were generated using [`createAction`](./createAction) may be used directly as the keys here, using computed property syntax:\r\n\r\n```js\r\nconst increment = createAction('increment')\r\nconst decrement = createAction('decrement')\r\n\r\nconst counterReducer = createReducer(0, {\r\n [increment]: (state, action) => state + action.payload,\r\n [decrement.type]: (state, action) => state - action.payload\r\n})\r\n```\r\n * @public\r\n */\r\nexport function createReducer<\r\n S,\r\n CR extends CaseReducers<S, any> = CaseReducers<S, any>\r\n>(\r\n initialState: S,\r\n actionsMap: CR,\r\n actionMatchers?: ActionMatcherDescriptionCollection<S>,\r\n defaultCaseReducer?: CaseReducer<S>\r\n): Reducer<S>\r\n\r\nexport function createReducer<S>(\r\n initialState: S,\r\n mapOrBuilderCallback:\r\n | CaseReducers<S, any>\r\n | ((builder: ActionReducerMapBuilder<S>) => void),\r\n actionMatchers: ReadonlyActionMatcherDescriptionCollection<S> = [],\r\n defaultCaseReducer?: CaseReducer<S>\r\n): Reducer<S> {\r\n let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] =\r\n typeof mapOrBuilderCallback === 'function'\r\n ? executeReducerBuilderCallback(mapOrBuilderCallback)\r\n : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer]\r\n\r\n const frozenInitialState = createNextState(initialState, () => {})\r\n\r\n return function (state = frozenInitialState, action): S {\r\n let caseReducers = [\r\n actionsMap[action.type],\r\n ...finalActionMatchers\r\n .filter(({ matcher }) => matcher(action))\r\n .map(({ reducer }) => reducer),\r\n ]\r\n if (caseReducers.filter((cr) => !!cr).length === 0) {\r\n caseReducers = [finalDefaultCaseReducer]\r\n }\r\n\r\n return caseReducers.reduce((previousState, caseReducer): S => {\r\n if (caseReducer) {\r\n if (isDraft(previousState)) {\r\n // If it's already a draft, we must already be inside a `createNextState` call,\r\n // likely because this is being wrapped in `createReducer`, `createSlice`, or nested\r\n // inside an existing draft. It's safe to just pass the draft to the mutator.\r\n const draft = previousState as Draft<S> // We can assume this is already a draft\r\n const result = caseReducer(draft, action)\r\n\r\n if (typeof result === 'undefined') {\r\n return previousState\r\n }\r\n\r\n return result as S\r\n } else if (!isDraftable(previousState)) {\r\n // If state is not draftable (ex: a primitive, such as 0), we want to directly\r\n // return the caseReducer func and not wrap it with produce.\r\n const result = caseReducer(previousState as any, action)\r\n\r\n if (typeof result === 'undefined') {\r\n if (previousState === null) {\r\n return previousState\r\n }\r\n throw Error(\r\n 'A case reducer on a non-draftable value must not return undefined'\r\n )\r\n }\r\n\r\n return result as S\r\n } else {\r\n // @ts-ignore createNextState() produces an Immutable<Draft<S>> rather\r\n // than an Immutable<S>, and TypeScript cannot find out how to reconcile\r\n // these two types.\r\n return createNextState(previousState, (draft: Draft<S>) => {\r\n return caseReducer(draft, action)\r\n })\r\n }\r\n }\r\n\r\n return previousState\r\n }, state)\r\n }\r\n}\r\n","import type { Action, AnyAction } from 'redux'\r\nimport type {\r\n CaseReducer,\r\n CaseReducers,\r\n ActionMatcher,\r\n ActionMatcherDescriptionCollection,\r\n} from './createReducer'\r\n\r\nexport interface TypedActionCreator<Type extends string> {\r\n (...args: any[]): Action<Type>\r\n type: Type\r\n}\r\n\r\n/**\r\n * A builder for an action <-> reducer map.\r\n *\r\n * @public\r\n */\r\nexport interface ActionReducerMapBuilder<State> {\r\n /**\r\n * Adds a case reducer to handle a single exact action type.\r\n * @remarks\r\n * All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`.\r\n * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\r\n * @param reducer - The actual case reducer function.\r\n */\r\n addCase<ActionCreator extends TypedActionCreator<string>>(\r\n actionCreator: ActionCreator,\r\n reducer: CaseReducer<State, ReturnType<ActionCreator>>\r\n ): ActionReducerMapBuilder<State>\r\n /**\r\n * Adds a case reducer to handle a single exact action type.\r\n * @remarks\r\n * All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`.\r\n * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\r\n * @param reducer - The actual case reducer function.\r\n */\r\n addCase<Type extends string, A extends Action<Type>>(\r\n type: Type,\r\n reducer: CaseReducer<State, A>\r\n ): ActionReducerMapBuilder<State>\r\n\r\n /**\r\n * Allows you to match your incoming actions against your own filter function instead of only the `action.type` property.\r\n * @remarks\r\n * If multiple matcher reducers match, all of them will be executed in the order\r\n * they were defined in - even if a case reducer already matched.\r\n * All calls to `builder.addMatcher` must come after any calls to `builder.addCase` and before any calls to `builder.addDefaultCase`.\r\n * @param matcher - A matcher function. In TypeScript, this should be a [type predicate](https://www.typescriptlang.org/docs/handbook/advanced-types.html#using-type-predicates)\r\n * function\r\n * @param reducer - The actual case reducer function.\r\n *\r\n * @example\r\n```ts\r\nimport {\r\n createAction,\r\n createReducer,\r\n AsyncThunk,\r\n AnyAction,\r\n} from \"@reduxjs/toolkit\";\r\n\r\ntype GenericAsyncThunk = AsyncThunk<unknown, unknown, any>;\r\n\r\ntype PendingAction = ReturnType<GenericAsyncThunk[\"pending\"]>;\r\ntype RejectedAction = ReturnType<GenericAsyncThunk[\"rejected\"]>;\r\ntype FulfilledAction = ReturnType<GenericAsyncThunk[\"fulfilled\"]>;\r\n\r\nconst initialState: Record<string, string> = {};\r\nconst resetAction = createAction(\"reset-tracked-loading-state\");\r\n\r\nfunction isPendingAction(action: AnyAction): action is PendingAction {\r\n return action.type.endsWith(\"/pending\");\r\n}\r\n\r\nconst reducer = createReducer(initialState, (builder) => {\r\n builder\r\n .addCase(resetAction, () => initialState)\r\n // matcher can be defined outside as a type predicate function\r\n .addMatcher(isPendingAction, (state, action) => {\r\n state[action.meta.requestId] = \"pending\";\r\n })\r\n .addMatcher(\r\n // matcher can be defined inline as a type predicate function\r\n (action): action is RejectedAction => action.type.endsWith(\"/rejected\"),\r\n (state, action) => {\r\n state[action.meta.requestId] = \"rejected\";\r\n }\r\n )\r\n // matcher can just return boolean and the matcher can receive a generic argument\r\n .addMatcher<FulfilledAction>(\r\n (action) => action.type.endsWith(\"/fulfilled\"),\r\n (state, action) => {\r\n state[action.meta.requestId] = \"fulfilled\";\r\n }\r\n );\r\n});\r\n```\r\n */\r\n addMatcher<A extends AnyAction>(\r\n matcher: ActionMatcher<A> | ((action: AnyAction) => boolean),\r\n reducer: CaseReducer<State, A>\r\n ): Omit<ActionReducerMapBuilder<State>, 'addCase'>\r\n\r\n /**\r\n * Adds a \"default case\" reducer that is executed if no case reducer and no matcher\r\n * reducer was executed for this action.\r\n * @param reducer - The fallback \"default case\" reducer function.\r\n *\r\n * @example\r\n```ts\r\nimport { createReducer } from '@reduxjs/toolkit'\r\nconst initialState = { otherActions: 0 }\r\nconst reducer = createReducer(initialState, builder => {\r\n builder\r\n // .addCase(...)\r\n // .addMatcher(...)\r\n .addDefaultCase((state, action) => {\r\n state.otherActions++\r\n })\r\n})\r\n```\r\n */\r\n addDefaultCase(reducer: CaseReducer<State, AnyAction>): {}\r\n}\r\n\r\nexport function executeReducerBuilderCallback<S>(\r\n builderCallback: (builder: ActionReducerMapBuilder<S>) => void\r\n): [\r\n CaseReducers<S, any>,\r\n ActionMatcherDescriptionCollection<S>,\r\n CaseReducer<S, AnyAction> | undefined\r\n] {\r\n const actionsMap: CaseReducers<S, any> = {}\r\n const actionMatchers: ActionMatcherDescriptionCollection<S> = []\r\n let defaultCaseReducer: CaseReducer<S, AnyAction> | undefined\r\n const builder = {\r\n addCase(\r\n typeOrActionCreator: string | TypedActionCreator<any>,\r\n reducer: CaseReducer<S>\r\n ) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n /*\r\n to keep the definition by the user in line with actual behavior, \r\n we enforce `addCase` to always be called before calling `addMatcher`\r\n as matching cases take precedence over matchers\r\n */\r\n if (actionMatchers.length > 0) {\r\n throw new Error(\r\n '`builder.addCase` should only be called before calling `builder.addMatcher`'\r\n )\r\n }\r\n if (defaultCaseReducer) {\r\n throw new Error(\r\n '`builder.addCase` should only be called before calling `builder.addDefaultCase`'\r\n )\r\n }\r\n }\r\n const type =\r\n typeof typeOrActionCreator === 'string'\r\n ? typeOrActionCreator\r\n : typeOrActionCreator.type\r\n if (type in actionsMap) {\r\n throw new Error(\r\n 'addCase cannot be called with two reducers for the same action type'\r\n )\r\n }\r\n actionsMap[type] = reducer\r\n return builder\r\n },\r\n addMatcher<A extends AnyAction>(\r\n matcher: ActionMatcher<A>,\r\n reducer: CaseReducer<S, A>\r\n ) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (defaultCaseReducer) {\r\n throw new Error(\r\n '`builder.addMatcher` should only be called before calling `builder.addDefaultCase`'\r\n )\r\n }\r\n }\r\n actionMatchers.push({ matcher, reducer })\r\n return builder\r\n },\r\n addDefaultCase(reducer: CaseReducer<S, AnyAction>) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (defaultCaseReducer) {\r\n throw new Error('`builder.addDefaultCase` can only be called once')\r\n }\r\n }\r\n defaultCaseReducer = reducer\r\n return builder\r\n },\r\n }\r\n builderCallback(builder)\r\n return [actionsMap, actionMatchers, defaultCaseReducer]\r\n}\r\n","import type { Reducer } from 'redux'\r\nimport type {\r\n ActionCreatorWithoutPayload,\r\n PayloadAction,\r\n PayloadActionCreator,\r\n PrepareAction,\r\n _ActionCreatorWithPreparedPayload,\r\n} from './createAction'\r\nimport { createAction } from './createAction'\r\nimport type { CaseReducer, CaseReducers } from './createReducer'\r\nimport { createReducer } from './createReducer'\r\nimport type { ActionReducerMapBuilder } from './mapBuilders'\r\nimport { executeReducerBuilderCallback } from './mapBuilders'\r\nimport type { NoInfer } from './tsHelpers'\r\n\r\n/**\r\n * An action creator attached to a slice.\r\n *\r\n * @deprecated please use PayloadActionCreator directly\r\n *\r\n * @public\r\n */\r\nexport type SliceActionCreator<P> = PayloadActionCreator<P>\r\n\r\n/**\r\n * The return value of `createSlice`\r\n *\r\n * @public\r\n */\r\nexport interface Slice<\r\n State = any,\r\n CaseReducers extends SliceCaseReducers<State> = SliceCaseReducers<State>,\r\n Name extends string = string\r\n> {\r\n /**\r\n * The slice name.\r\n */\r\n name: Name\r\n\r\n /**\r\n * The slice's reducer.\r\n */\r\n reducer: Reducer<State>\r\n\r\n /**\r\n * Action creators for the types of actions that are handled by the slice\r\n * reducer.\r\n */\r\n actions: CaseReducerActions<CaseReducers>\r\n\r\n /**\r\n * The individual case reducer functions that were passed in the `reducers` parameter.\r\n * This enables reuse and testing if they were defined inline when calling `createSlice`.\r\n */\r\n caseReducers: SliceDefinedCaseReducers<CaseReducers>\r\n}\r\n\r\n/**\r\n * Options for `createSlice()`.\r\n *\r\n * @public\r\n */\r\nexport interface CreateSliceOptions<\r\n State = any,\r\n CR extends SliceCaseReducers<State> = SliceCaseReducers<State>,\r\n Name extends string = string\r\n> {\r\n /**\r\n * The slice's name. Used to namespace the generated action types.\r\n */\r\n name: Name\r\n\r\n /**\r\n * The initial state to be returned by the slice reducer.\r\n */\r\n initialState: State\r\n\r\n /**\r\n * A mapping from action types to action-type-specific *case reducer*\r\n * functions. For every action type, a matching action creator will be\r\n * generated using `createAction()`.\r\n */\r\n reducers: ValidateSliceCaseReducers<State, CR>\r\n\r\n /**\r\n * A callback that receives a *builder* object to define\r\n * case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`.\r\n * \r\n * Alternatively, a mapping from action types to action-type-specific *case reducer*\r\n * functions. These reducers should have existing action types used\r\n * as the keys, and action creators will _not_ be generated.\r\n * \r\n * @example\r\n```ts\r\nimport { createAction, createSlice, Action, AnyAction } from '@reduxjs/toolkit'\r\nconst incrementBy = createAction<number>('incrementBy')\r\nconst decrement = createAction('decrement')\r\n\r\ninterface RejectedAction extends Action {\r\n error: Error\r\n}\r\n\r\nfunction isRejectedAction(action: AnyAction): action is RejectedAction {\r\n return action.type.endsWith('rejected')\r\n}\r\n\r\ncreateSlice({\r\n name: 'counter',\r\n initialState: 0,\r\n reducers: {},\r\n extraReducers: builder => {\r\n builder\r\n .addCase(incrementBy, (state, action) => {\r\n // action is inferred correctly here if using TS\r\n })\r\n // You can chain calls, or have separate `builder.addCase()` lines each time\r\n .addCase(decrement, (state, action) => {})\r\n // You can match a range of action types\r\n .addMatcher(\r\n isRejectedAction,\r\n // `action` will be inferred as a RejectedAction due to isRejectedAction being defined as a type guard\r\n (state, action) => {}\r\n )\r\n // and provide a default case if no other handlers matched\r\n .addDefaultCase((state, action) => {})\r\n }\r\n})\r\n```\r\n */\r\n extraReducers?:\r\n | CaseReducers<NoInfer<State>, any>\r\n | ((builder: ActionReducerMapBuilder<NoInfer<State>>) => void)\r\n}\r\n\r\n/**\r\n * A CaseReducer with a `prepare` method.\r\n *\r\n * @public\r\n */\r\nexport type CaseReducerWithPrepare<State, Action extends PayloadAction> = {\r\n reducer: CaseReducer<State, Action>\r\n prepare: PrepareAction<Action['payload']>\r\n}\r\n\r\n/**\r\n * The type describing a slice's `reducers` option.\r\n *\r\n * @public\r\n */\r\nexport type SliceCaseReducers<State> = {\r\n [K: string]:\r\n | CaseReducer<State, PayloadAction<any>>\r\n | CaseReducerWithPrepare<State, PayloadAction<any, string, any, any>>\r\n}\r\n\r\n/**\r\n * Derives the slice's `actions` property from the `reducers` options\r\n *\r\n * @public\r\n */\r\nexport type CaseReducerActions<CaseReducers extends SliceCaseReducers<any>> = {\r\n [Type in keyof CaseReducers]: CaseReducers[Type] extends { prepare: any }\r\n ? ActionCreatorForCaseReducerWithPrepare<CaseReducers[Type]>\r\n : ActionCreatorForCaseReducer<CaseReducers[Type]>\r\n}\r\n\r\n/**\r\n * Get a `PayloadActionCreator` type for a passed `CaseReducerWithPrepare`\r\n *\r\n * @internal\r\n */\r\ntype ActionCreatorForCaseReducerWithPrepare<CR extends { prepare: any }> =\r\n _ActionCreatorWithPreparedPayload<CR['prepare'], string>\r\n\r\n/**\r\n * Get a `PayloadActionCreator` type for a passed `CaseReducer`\r\n *\r\n * @internal\r\n */\r\ntype ActionCreatorForCaseReducer<CR> = CR extends (\r\n state: any,\r\n action: infer Action\r\n) => any\r\n ? Action extends { payload: infer P }\r\n ? PayloadActionCreator<P>\r\n : ActionCreatorWithoutPayload\r\n : ActionCreatorWithoutPayload\r\n\r\n/**\r\n * Extracts the CaseReducers out of a `reducers` object, even if they are\r\n * tested into a `CaseReducerWithPrepare`.\r\n *\r\n * @internal\r\n */\r\ntype SliceDefinedCaseReducers<CaseReducers extends SliceCaseReducers<any>> = {\r\n [Type in keyof CaseReducers]: CaseReducers[Type] extends {\r\n reducer: infer Reducer\r\n }\r\n ? Reducer\r\n : CaseReducers[Type]\r\n}\r\n\r\n/**\r\n * Used on a SliceCaseReducers object.\r\n * Ensures that if a CaseReducer is a `CaseReducerWithPrepare`, that\r\n * the `reducer` and the `prepare` function use the same type of `payload`.\r\n *\r\n * Might do additional such checks in the future.\r\n *\r\n * This type is only ever useful if you want to write your own wrapper around\r\n * `createSlice`. Please don't use it otherwise!\r\n *\r\n * @public\r\n */\r\nexport type ValidateSliceCaseReducers<\r\n S,\r\n ACR extends SliceCaseReducers<S>\r\n> = ACR &\r\n {\r\n [T in keyof ACR]: ACR[T] extends {\r\n reducer(s: S, action?: infer A): any\r\n }\r\n ? {\r\n prepare(...a: never[]): Omit<A, 'type'>\r\n }\r\n : {}\r\n }\r\n\r\nfunction getType(slice: string, actionKey: string): string {\r\n return `${slice}/${actionKey}`\r\n}\r\n\r\n/**\r\n * A function that accepts an initial state, an object full of reducer\r\n * functions, and a \"slice name\", and automatically generates\r\n * action creators and action types that correspond to the\r\n * reducers and state.\r\n *\r\n * The `reducer` argument is passed to `createReducer()`.\r\n *\r\n * @public\r\n */\r\nexport function createSlice<\r\n State,\r\n CaseReducers extends SliceCaseReducers<State>,\r\n Name extends string = string\r\n>(\r\n options: CreateSliceOptions<State, CaseReducers, Name>\r\n): Slice<State, CaseReducers, Name> {\r\n const { name, initialState } = options\r\n if (!name) {\r\n throw new Error('`name` is a required option for createSlice')\r\n }\r\n const reducers = options.reducers || {}\r\n const [\r\n extraReducers = {},\r\n actionMatchers = [],\r\n defaultCaseReducer = undefined,\r\n ] =\r\n typeof options.extraReducers === 'function'\r\n ? executeReducerBuilderCallback(options.extraReducers)\r\n : [options.extraReducers]\r\n\r\n const reducerNames = Object.keys(reducers)\r\n\r\n const sliceCaseReducersByName: Record<string, CaseReducer> = {}\r\n const sliceCaseReducersByType: Record<string, CaseReducer> = {}\r\n const actionCreators: Record<string, Function> = {}\r\n\r\n reducerNames.forEach((reducerName) => {\r\n const maybeReducerWithPrepare = reducers[reducerName]\r\n const type = getType(name, reducerName)\r\n\r\n let caseReducer: CaseReducer<State, any>\r\n let prepareCallback: PrepareAction<any> | undefined\r\n\r\n if ('reducer' in maybeReducerWithPrepare) {\r\n caseReducer = maybeReducerWithPrepare.reducer\r\n prepareCallback = maybeReducerWithPrepare.prepare\r\n } else {\r\n caseReducer = maybeReducerWithPrepare\r\n }\r\n\r\n sliceCaseReducersByName[reducerName] = caseReducer\r\n sliceCaseReducersByType[type] = caseReducer\r\n actionCreators[reducerName] = prepareCallback\r\n ? createAction(type, prepareCallback)\r\n : createAction(type)\r\n })\r\n\r\n const finalCaseReducers = { ...extraReducers, ...sliceCaseReducersByType }\r\n const reducer = createReducer(\r\n initialState,\r\n finalCaseReducers as any,\r\n actionMatchers,\r\n defaultCaseReducer\r\n )\r\n\r\n return {\r\n name,\r\n reducer,\r\n actions: actionCreators as any,\r\n caseReducers: sliceCaseReducersByName as any,\r\n }\r\n}\r\n","import type { EntityState } from './models'\r\n\r\nexport function getInitialEntityState<V>(): EntityState<V> {\r\n return {\r\n ids: [],\r\n entities: {},\r\n }\r\n}\r\n\r\nexport function createInitialStateFactory<V>() {\r\n function getInitialState(): EntityState<V>\r\n function getInitialState<S extends object>(\r\n additionalState: S\r\n ): EntityState<V> & S\r\n function getInitialState(additionalState: any = {}): any {\r\n return Object.assign(getInitialEntityState(), additionalState)\r\n }\r\n\r\n return { getInitialState }\r\n}\r\n","import { createDraftSafeSelector } from '../createDraftSafeSelector'\r\nimport type {\r\n EntityState,\r\n EntitySelectors,\r\n Dictionary,\r\n EntityId,\r\n} from './models'\r\n\r\nexport function createSelectorsFactory<T>() {\r\n function getSelectors(): EntitySelectors<T, EntityState<T>>\r\n function getSelectors<V>(\r\n selectState: (state: V) => EntityState<T>\r\n ): EntitySelectors<T, V>\r\n function getSelectors(\r\n selectState?: (state: any) => EntityState<T>\r\n ): EntitySelectors<T, any> {\r\n const selectIds = (state: any) => state.ids\r\n\r\n const selectEntities = (state: EntityState<T>) => state.entities\r\n\r\n const selectAll = createDraftSafeSelector(\r\n selectIds,\r\n selectEntities,\r\n (ids: readonly T[], entities: Dictionary<T>): any =>\r\n ids.map((id: any) => (entities as any)[id])\r\n )\r\n\r\n const selectId = (_: any, id: EntityId) => id\r\n\r\n const selectById = (entities: Dictionary<T>, id: EntityId) => entities[id]\r\n\r\n const selectTotal = createDraftSafeSelector(selectIds, (ids) => ids.length)\r\n\r\n if (!selectState) {\r\n return {\r\n selectIds,\r\n selectEntities,\r\n selectAll,\r\n selectTotal,\r\n selectById: createDraftSafeSelector(\r\n selectEntities,\r\n selectId,\r\n selectById\r\n ),\r\n }\r\n }\r\n\r\n const selectGlobalizedEntities = createDraftSafeSelector(\r\n selectState,\r\n selectEntities\r\n )\r\n\r\n return {\r\n selectIds: createDraftSafeSelector(selectState, selectIds),\r\n selectEntities: selectGlobalizedEntities,\r\n selectAll: createDraftSafeSelector(selectState, selectAll),\r\n selectTotal: createDraftSafeSelector(selectState, selectTotal),\r\n selectById: createDraftSafeSelector(\r\n selectGlobalizedEntities,\r\n selectId,\r\n selectById\r\n ),\r\n }\r\n }\r\n\r\n return { getSelectors }\r\n}\r\n","import createNextState, { isDraft } from 'immer'\r\nimport type { EntityState, PreventAny } from './models'\r\nimport type { PayloadAction } from '../createAction'\r\nimport { isFSA } from '../createAction'\r\nimport { IsAny } from '../tsHelpers'\r\n\r\nexport function createSingleArgumentStateOperator<V>(\r\n mutator: (state: EntityState<V>) => void\r\n) {\r\n const operator = createStateOperator((_: undefined, state: EntityState<V>) =>\r\n mutator(state)\r\n )\r\n\r\n return function operation<S extends EntityState<V>>(\r\n state: PreventAny<S, V>\r\n ): S {\r\n return operator(state as S, undefined)\r\n }\r\n}\r\n\r\nexport function createStateOperator<V, R>(\r\n mutator: (arg: R, state: EntityState<V>) => void\r\n) {\r\n return function operation<S extends EntityState<V>>(\r\n state: S,\r\n arg: R | PayloadAction<R>\r\n ): S {\r\n function isPayloadActionArgument(\r\n arg: R | PayloadAction<R>\r\n ): arg is PayloadAction<R> {\r\n return isFSA(arg)\r\n }\r\n\r\n const runMutator = (draft: EntityState<V>) => {\r\n if (isPayloadActionArgument(arg)) {\r\n mutator(arg.payload, draft)\r\n } else {\r\n mutator(arg, draft)\r\n }\r\n }\r\n\r\n if (isDraft(state)) {\r\n // we must already be inside a `createNextState` call, likely because\r\n // this is being wrapped in `createReducer` or `createSlice`.\r\n // It's safe to just pass the draft to the mutator.\r\n runMutator(state)\r\n\r\n // since it's a draft, we'll just return it\r\n return state\r\n } else {\r\n // @ts-ignore createNextState() produces an Immutable<Draft<S>> rather\r\n // than an Immutable<S>, and TypeScript cannot find out how to reconcile\r\n // these two types.\r\n return createNextState(state, runMutator)\r\n }\r\n }\r\n}\r\n","import type { EntityState, IdSelector, Update, EntityId } from './models'\r\n\r\nexport function selectIdValue<T>(entity: T, selectId: IdSelector<T>) {\r\n const key = selectId(entity)\r\n\r\n if (process.env.NODE_ENV !== 'production' && key === undefined) {\r\n console.warn(\r\n 'The entity passed to the `selectId` implementation returned undefined.',\r\n 'You should probably provide your own `selectId` implementation.',\r\n 'The entity that was passed:',\r\n entity,\r\n 'The `selectId` implementation:',\r\n selectId.toString()\r\n )\r\n }\r\n\r\n return key\r\n}\r\n\r\nexport function ensureEntitiesArray<T>(\r\n entities: readonly T[] | Record<EntityId, T>\r\n): readonly T[] {\r\n if (!Array.isArray(entities)) {\r\n entities = Object.values(entities)\r\n }\r\n\r\n return entities\r\n}\r\n\r\nexport function splitAddedUpdatedEntities<T>(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n selectId: IdSelector<T>,\r\n state: EntityState<T>\r\n): [T[], Update<T>[]] {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n const added: T[] = []\r\n const updated: Update<T>[] = []\r\n\r\n for (const entity of newEntities) {\r\n const id = selectIdValue(entity, selectId)\r\n if (id in state.entities) {\r\n updated.push({ id, changes: entity })\r\n } else {\r\n added.push(entity)\r\n }\r\n }\r\n return [added, updated]\r\n}\r\n","import type {\r\n EntityState,\r\n EntityStateAdapter,\r\n IdSelector,\r\n Update,\r\n EntityId,\r\n} from './models'\r\nimport {\r\n createStateOperator,\r\n createSingleArgumentStateOperator,\r\n} from './state_adapter'\r\nimport {\r\n selectIdValue,\r\n ensureEntitiesArray,\r\n splitAddedUpdatedEntities,\r\n} from './utils'\r\n\r\nexport function createUnsortedStateAdapter<T>(\r\n selectId: IdSelector<T>\r\n): EntityStateAdapter<T> {\r\n type R = EntityState<T>\r\n\r\n function addOneMutably(entity: T, state: R): void {\r\n const key = selectIdValue(entity, selectId)\r\n\r\n if (key in state.entities) {\r\n return\r\n }\r\n\r\n state.ids.push(key)\r\n state.entities[key] = entity\r\n }\r\n\r\n function addManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n for (const entity of newEntities) {\r\n addOneMutably(entity, state)\r\n }\r\n }\r\n\r\n function setOneMutably(entity: T, state: R): void {\r\n const key = selectIdValue(entity, selectId)\r\n if (!(key in state.entities)) {\r\n state.ids.push(key)\r\n }\r\n state.entities[key] = entity\r\n }\r\n\r\n function setManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n for (const entity of newEntities) {\r\n setOneMutably(entity, state)\r\n }\r\n }\r\n\r\n function setAllMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n state.ids = []\r\n state.entities = {}\r\n\r\n addManyMutably(newEntities, state)\r\n }\r\n\r\n function removeOneMutably(key: EntityId, state: R): void {\r\n return removeManyMutably([key], state)\r\n }\r\n\r\n function removeManyMutably(keys: readonly EntityId[], state: R): void {\r\n let didMutate = false\r\n\r\n keys.forEach((key) => {\r\n if (key in state.entities) {\r\n delete state.entities[key]\r\n didMutate = true\r\n }\r\n })\r\n\r\n if (didMutate) {\r\n state.ids = state.ids.filter((id) => id in state.entities)\r\n }\r\n }\r\n\r\n function removeAllMutably(state: R): void {\r\n Object.assign(state, {\r\n ids: [],\r\n entities: {},\r\n })\r\n }\r\n\r\n function takeNewKey(\r\n keys: { [id: string]: EntityId },\r\n update: Update<T>,\r\n state: R\r\n ): boolean {\r\n const original = state.entities[update.id]\r\n const updated: T = Object.assign({}, original, update.changes)\r\n const newKey = selectIdValue(updated, selectId)\r\n const hasNewKey = newKey !== update.id\r\n\r\n if (hasNewKey) {\r\n keys[update.id] = newKey\r\n delete state.entities[update.id]\r\n }\r\n\r\n state.entities[newKey] = updated\r\n\r\n return hasNewKey\r\n }\r\n\r\n function updateOneMutably(update: Update<T>, state: R): void {\r\n return updateManyMutably([update], state)\r\n }\r\n\r\n function updateManyMutably(\r\n updates: ReadonlyArray<Update<T>>,\r\n state: R\r\n ): void {\r\n const newKeys: { [id: string]: EntityId } = {}\r\n\r\n const updatesPerEntity: { [id: string]: Update<T> } = {}\r\n\r\n updates.forEach((update) => {\r\n // Only apply updates to entities that currently exist\r\n if (update.id in state.entities) {\r\n // If there are multiple updates to one entity, merge them together\r\n updatesPerEntity[update.id] = {\r\n id: update.id,\r\n // Spreads ignore falsy values, so this works even if there isn't\r\n // an existing update already at this key\r\n changes: {\r\n ...(updatesPerEntity[update.id]\r\n ? updatesPerEntity[update.id].changes\r\n : null),\r\n ...update.changes,\r\n },\r\n }\r\n }\r\n })\r\n\r\n updates = Object.values(updatesPerEntity)\r\n\r\n const didMutateEntities = updates.length > 0\r\n\r\n if (didMutateEntities) {\r\n const didMutateIds =\r\n updates.filter((update) => takeNewKey(newKeys, update, state)).length >\r\n 0\r\n\r\n if (didMutateIds) {\r\n state.ids = state.ids.map((id) => newKeys[id] || id)\r\n }\r\n }\r\n }\r\n\r\n function upsertOneMutably(entity: T, state: R): void {\r\n return upsertManyMutably([entity], state)\r\n }\r\n\r\n function upsertManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n const [added, updated] = splitAddedUpdatedEntities<T>(\r\n newEntities,\r\n selectId,\r\n state\r\n )\r\n\r\n updateManyMutably(updated, state)\r\n addManyMutably(added, state)\r\n }\r\n\r\n return {\r\n removeAll: createSingleArgumentStateOperator(removeAllMutably),\r\n addOne: createStateOperator(addOneMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n upsertMany: createStateOperator(upsertManyMutably),\r\n removeOne: createStateOperator(removeOneMutably),\r\n removeMany: createStateOperator(removeManyMutably),\r\n }\r\n}\r\n","import type {\r\n EntityState,\r\n IdSelector,\r\n Comparer,\r\n EntityStateAdapter,\r\n Update,\r\n EntityId,\r\n} from './models'\r\nimport { createStateOperator } from './state_adapter'\r\nimport { createUnsortedStateAdapter } from './unsorted_state_adapter'\r\nimport {\r\n selectIdValue,\r\n ensureEntitiesArray,\r\n splitAddedUpdatedEntities,\r\n} from './utils'\r\n\r\nexport function createSortedStateAdapter<T>(\r\n selectId: IdSelector<T>,\r\n sort: Comparer<T>\r\n): EntityStateAdapter<T> {\r\n type R = EntityState<T>\r\n\r\n const { removeOne, removeMany, removeAll } =\r\n createUnsortedStateAdapter(selectId)\r\n\r\n function addOneMutably(entity: T, state: R): void {\r\n return addManyMutably([entity], state)\r\n }\r\n\r\n function addManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n const models = newEntities.filter(\r\n (model) => !(selectIdValue(model, selectId) in state.entities)\r\n )\r\n\r\n if (models.length !== 0) {\r\n merge(models, state)\r\n }\r\n }\r\n\r\n function setOneMutably(entity: T, state: R): void {\r\n return setManyMutably([entity], state)\r\n }\r\n\r\n function setManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n if (newEntities.length !== 0) {\r\n merge(newEntities, state)\r\n }\r\n }\r\n\r\n function setAllMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n state.entities = {}\r\n state.ids = []\r\n\r\n addManyMutably(newEntities, state)\r\n }\r\n\r\n function updateOneMutably(update: Update<T>, state: R): void {\r\n return updateManyMutably([update], state)\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types\r\n function takeUpdatedModel(models: T[], update: Update<T>, state: R): boolean {\r\n if (!(update.id in state.entities)) {\r\n return false\r\n }\r\n\r\n const original = state.entities[update.id]\r\n const updated = Object.assign({}, original, update.changes)\r\n const newKey = selectIdValue(updated, selectId)\r\n\r\n delete state.entities[update.id]\r\n\r\n models.push(updated)\r\n\r\n return newKey !== update.id\r\n }\r\n\r\n function updateManyMutably(\r\n updates: ReadonlyArray<Update<T>>,\r\n state: R\r\n ): void {\r\n const models: T[] = []\r\n\r\n updates.forEach((update) => takeUpdatedModel(models, update, state))\r\n\r\n if (models.length !== 0) {\r\n merge(models, state)\r\n }\r\n }\r\n\r\n function upsertOneMutably(entity: T, state: R): void {\r\n return upsertManyMutably([entity], state)\r\n }\r\n\r\n function upsertManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n const [added, updated] = splitAddedUpdatedEntities<T>(\r\n newEntities,\r\n selectId,\r\n state\r\n )\r\n\r\n updateManyMutably(updated, state)\r\n addManyMutably(added, state)\r\n }\r\n\r\n function areArraysEqual(a: readonly unknown[], b: readonly unknown[]) {\r\n if (a.length !== b.length) {\r\n return false\r\n }\r\n\r\n for (let i = 0; i < a.length && i < b.length; i++) {\r\n if (a[i] === b[i]) {\r\n continue\r\n }\r\n return false\r\n }\r\n return true\r\n }\r\n\r\n function merge(models: readonly T[], state: R): void {\r\n // Insert/overwrite all new/updated\r\n models.forEach((model) => {\r\n state.entities[selectId(model)] = model\r\n })\r\n\r\n const allEntities = Object.values(state.entities) as T[]\r\n allEntities.sort(sort)\r\n\r\n const newSortedIds = allEntities.map(selectId)\r\n const { ids } = state\r\n\r\n if (!areArraysEqual(ids, newSortedIds)) {\r\n state.ids = newSortedIds\r\n }\r\n }\r\n\r\n return {\r\n removeOne,\r\n removeMany,\r\n removeAll,\r\n addOne: createStateOperator(addOneMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertMany: createStateOperator(upsertManyMutably),\r\n }\r\n}\r\n","import type {\r\n EntityDefinition,\r\n Comparer,\r\n IdSelector,\r\n EntityAdapter,\r\n} from './models'\r\nimport { createInitialStateFactory } from './entity_state'\r\nimport { createSelectorsFactory } from './state_selectors'\r\nimport { createSortedStateAdapter } from './sorted_state_adapter'\r\nimport { createUnsortedStateAdapter } from './unsorted_state_adapter'\r\n\r\n/**\r\n *\r\n * @param options\r\n *\r\n * @public\r\n */\r\nexport function createEntityAdapter<T>(\r\n options: {\r\n selectId?: IdSelector<T>\r\n sortComparer?: false | Comparer<T>\r\n } = {}\r\n): EntityAdapter<T> {\r\n const { selectId, sortComparer }: EntityDefinition<T> = {\r\n sortComparer: false,\r\n selectId: (instance: any) => instance.id,\r\n ...options,\r\n }\r\n\r\n const stateFactory = createInitialStateFactory<T>()\r\n const selectorsFactory = createSelectorsFactory<T>()\r\n const stateAdapter = sortComparer\r\n ? createSortedStateAdapter(selectId, sortComparer)\r\n : createUnsortedStateAdapter(selectId)\r\n\r\n return {\r\n selectId,\r\n sortComparer,\r\n ...stateFactory,\r\n ...selectorsFactory,\r\n ...stateAdapter,\r\n }\r\n}\r\n","// Borrowed from https://github.com/ai/nanoid/blob/3.0.2/non-secure/index.js\r\n// This alphabet uses `A-Za-z0-9_-` symbols. A genetic algorithm helped\r\n// optimize the gzip compression for this alphabet.\r\nlet urlAlphabet =\r\n 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'\r\n\r\n/**\r\n *\r\n * @public\r\n */\r\nexport let nanoid = (size = 21) => {\r\n let id = ''\r\n // A compact alternative for `for (var i = 0; i < step; i++)`.\r\n let i = size\r\n while (i--) {\r\n // `| 0` is more compact and faster than `Math.floor()`.\r\n id += urlAlphabet[(Math.random() * 64) | 0]\r\n }\r\n return id\r\n}\r\n","import type { Dispatch, AnyAction } from 'redux'\r\nimport type {\r\n PayloadAction,\r\n ActionCreatorWithPreparedPayload,\r\n} from './createAction'\r\nimport { createAction } from './createAction'\r\nimport type { ThunkDispatch } from 'redux-thunk'\r\nimport type { FallbackIfUnknown, IsAny, IsUnknown } from './tsHelpers'\r\nimport { nanoid } from './nanoid'\r\n\r\n// @ts-ignore we need the import of these types due to a bundling issue.\r\ntype _Keep = PayloadAction | ActionCreatorWithPreparedPayload<any, unknown>\r\n\r\nexport type BaseThunkAPI<\r\n S,\r\n E,\r\n D extends Dispatch = Dispatch,\r\n RejectedValue = undefined,\r\n RejectedMeta = unknown,\r\n FulfilledMeta = unknown\r\n> = {\r\n dispatch: D\r\n getState: () => S\r\n extra: E\r\n requestId: string\r\n signal: AbortSignal\r\n rejectWithValue: IsUnknown<\r\n RejectedMeta,\r\n (value: RejectedValue) => RejectWithValue<RejectedValue, RejectedMeta>,\r\n (\r\n value: RejectedValue,\r\n meta: RejectedMeta\r\n ) => RejectWithValue<RejectedValue, RejectedMeta>\r\n >\r\n fulfillWithValue: IsUnknown<\r\n FulfilledMeta,\r\n <FulfilledValue>(\r\n value: FulfilledValue\r\n ) => FulfillWithMeta<FulfilledValue, FulfilledMeta>,\r\n <FulfilledValue>(\r\n value: FulfilledValue,\r\n meta: FulfilledMeta\r\n ) => FulfillWithMeta<FulfilledValue, FulfilledMeta>\r\n >\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport interface SerializedError {\r\n name?: string\r\n message?: string\r\n stack?: string\r\n code?: string\r\n}\r\n\r\nconst commonProperties: Array<keyof SerializedError> = [\r\n 'name',\r\n 'message',\r\n 'stack',\r\n 'code',\r\n]\r\n\r\nclass RejectWithValue<Payload, RejectedMeta> {\r\n /*\r\n type-only property to distinguish between RejectWithValue and FulfillWithMeta\r\n does not exist at runtime\r\n */\r\n private readonly _type!: 'RejectWithValue'\r\n constructor(\r\n public readonly payload: Payload,\r\n public readonly meta: RejectedMeta\r\n ) {}\r\n}\r\n\r\nclass FulfillWithMeta<Payload, FulfilledMeta> {\r\n /*\r\n type-only property to distinguish between RejectWithValue and FulfillWithMeta\r\n does not exist at runtime\r\n */\r\n private readonly _type!: 'FulfillWithMeta'\r\n constructor(\r\n public readonly payload: Payload,\r\n public readonly meta: FulfilledMeta\r\n ) {}\r\n}\r\n\r\n/**\r\n * Serializes an error into a plain object.\r\n * Reworked from https://github.com/sindresorhus/serialize-error\r\n *\r\n * @public\r\n */\r\nexport const miniSerializeError = (value: any): SerializedError => {\r\n if (typeof value === 'object' && value !== null) {\r\n const simpleError: SerializedError = {}\r\n for (const property of commonProperties) {\r\n if (typeof value[property] === 'string') {\r\n simpleError[property] = value[property]\r\n }\r\n }\r\n\r\n return simpleError\r\n }\r\n\r\n return { message: String(value) }\r\n}\r\n\r\ntype AsyncThunkConfig = {\r\n state?: unknown\r\n dispatch?: Dispatch\r\n extra?: unknown\r\n rejectValue?: unknown\r\n serializedErrorType?: unknown\r\n pendingMeta?: unknown\r\n fulfilledMeta?: unknown\r\n rejectedMeta?: unknown\r\n}\r\n\r\ntype GetState<ThunkApiConfig> = ThunkApiConfig extends {\r\n state: infer State\r\n}\r\n ? State\r\n : unknown\r\ntype GetExtra<ThunkApiConfig> = ThunkApiConfig extends { extra: infer Extra }\r\n ? Extra\r\n : unknown\r\ntype GetDispatch<ThunkApiConfig> = ThunkApiConfig extends {\r\n dispatch: infer Dispatch\r\n}\r\n ? FallbackIfUnknown<\r\n Dispatch,\r\n ThunkDispatch<\r\n GetState<ThunkApiConfig>,\r\n GetExtra<ThunkApiConfig>,\r\n AnyAction\r\n >\r\n >\r\n : ThunkDispatch<GetState<ThunkApiConfig>, GetExtra<ThunkApiConfig>, AnyAction>\r\n\r\ntype GetThunkAPI<ThunkApiConfig> = BaseThunkAPI<\r\n GetState<ThunkApiConfig>,\r\n GetExtra<ThunkApiConfig>,\r\n GetDispatch<ThunkApiConfig>,\r\n GetRejectValue<ThunkApiConfig>,\r\n GetRejectedMeta<ThunkApiConfig>,\r\n GetFulfilledMeta<ThunkApiConfig>\r\n>\r\n\r\ntype GetRejectValue<ThunkApiConfig> = ThunkApiConfig extends {\r\n rejectValue: infer RejectValue\r\n}\r\n ? RejectValue\r\n : unknown\r\n\r\ntype GetPendingMeta<ThunkApiConfig> = ThunkApiConfig extends {\r\n pendingMeta: infer PendingMeta\r\n}\r\n ? PendingMeta\r\n : unknown\r\n\r\ntype GetFulfilledMeta<ThunkApiConfig> = ThunkApiConfig extends {\r\n fulfilledMeta: infer FulfilledMeta\r\n}\r\n ? FulfilledMeta\r\n : unknown\r\n\r\ntype GetRejectedMeta<ThunkApiConfig> = ThunkApiConfig extends {\r\n rejectedMeta: infer RejectedMeta\r\n}\r\n ? RejectedMeta\r\n : unknown\r\n\r\ntype GetSerializedErrorType<ThunkApiConfig> = ThunkApiConfig extends {\r\n serializedErrorType: infer GetSerializedErrorType\r\n}\r\n ? GetSerializedErrorType\r\n : SerializedError\r\n\r\ntype MaybePromise<T> = T | Promise<T> | (T extends any ? Promise<T> : never)\r\n\r\n/**\r\n * A type describing the return value of the `payloadCreator` argument to `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkPayloadCreatorReturnValue<\r\n Returned,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = MaybePromise<\r\n | IsUnknown<\r\n GetFulfilledMeta<ThunkApiConfig>,\r\n Returned,\r\n FulfillWithMeta<Returned, GetFulfilledMeta<ThunkApiConfig>>\r\n >\r\n | RejectWithValue<\r\n GetRejectValue<ThunkApiConfig>,\r\n GetRejectedMeta<ThunkApiConfig>\r\n >\r\n>\r\n/**\r\n * A type describing the `payloadCreator` argument to `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkPayloadCreator<\r\n Returned,\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n> = (\r\n arg: ThunkArg,\r\n thunkAPI: GetThunkAPI<ThunkApiConfig>\r\n) => AsyncThunkPayloadCreatorReturnValue<Returned, ThunkApiConfig>\r\n\r\n/**\r\n * A ThunkAction created by `createAsyncThunk`.\r\n * Dispatching it returns a Promise for either a\r\n * fulfilled or rejected action.\r\n * Also, the returned value contains an `abort()` method\r\n * that allows the asyncAction to be cancelled from the outside.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkAction<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = (\r\n dispatch: GetDispatch<ThunkApiConfig>,\r\n getState: () => GetState<ThunkApiConfig>,\r\n extra: GetExtra<ThunkApiConfig>\r\n) => Promise<\r\n | ReturnType<AsyncThunkFulfilledActionCreator<Returned, ThunkArg>>\r\n | ReturnType<AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>>\r\n> & {\r\n abort: (reason?: string) => void\r\n requestId: string\r\n arg: ThunkArg\r\n unwrap: () => Promise<Returned>\r\n}\r\n\r\ntype AsyncThunkActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = IsAny<\r\n ThunkArg,\r\n // any handling\r\n (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>,\r\n // unknown handling\r\n unknown extends ThunkArg\r\n ? (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument not specified or specified as void or undefined\r\n : [ThunkArg] extends [void] | [undefined]\r\n ? () => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument contains void\r\n : [void] extends [ThunkArg] // make optional\r\n ? (arg?: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument contains undefined\r\n : [undefined] extends [ThunkArg]\r\n ? WithStrictNullChecks<\r\n // with strict nullChecks: make optional\r\n (\r\n arg?: ThunkArg\r\n ) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>,\r\n // without strict null checks this will match everything, so don't make it optional\r\n (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>\r\n > // default case: normal argument\r\n : (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>\r\n>\r\n\r\n/**\r\n * Options object for `createAsyncThunk`.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkOptions<\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n> = {\r\n /**\r\n * A method to control whether the asyncThunk should be executed. Has access to the\r\n * `arg`, `api.getState()` and `api.extra` arguments.\r\n *\r\n * @returns `false` if it should be skipped\r\n */\r\n condition?(\r\n arg: ThunkArg,\r\n api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>\r\n ): boolean | undefined\r\n /**\r\n * If `condition` returns `false`, the asyncThunk will be skipped.\r\n * This option allows you to control whether a `rejected` action with `meta.condition == false`\r\n * will be dispatched or not.\r\n *\r\n * @default `false`\r\n */\r\n dispatchConditionRejection?: boolean\r\n\r\n serializeError?: (x: unknown) => GetSerializedErrorType<ThunkApiConfig>\r\n\r\n /**\r\n * A function to use when generating the `requestId` for the request sequence.\r\n *\r\n * @default `nanoid`\r\n */\r\n idGenerator?: () => string\r\n} & IsUnknown<\r\n GetPendingMeta<ThunkApiConfig>,\r\n {\r\n /**\r\n * A method to generate additional properties to be added to `meta` of the pending action.\r\n *\r\n * Using this optional overload will not modify the types correctly, this overload is only in place to support JavaScript users.\r\n * Please use the `ThunkApiConfig` parameter `pendingMeta` to get access to a correctly typed overload\r\n */\r\n getPendingMeta?(\r\n base: {\r\n arg: ThunkArg\r\n requestId: string\r\n },\r\n api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>\r\n ): GetPendingMeta<ThunkApiConfig>\r\n },\r\n {\r\n /**\r\n * A method to generate additional properties to be added to `meta` of the pending action.\r\n */\r\n getPendingMeta(\r\n base: {\r\n arg: ThunkArg\r\n requestId: string\r\n },\r\n api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>\r\n ): GetPendingMeta<ThunkApiConfig>\r\n }\r\n>\r\n\r\nexport type AsyncThunkPendingActionCreator<\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [string, ThunkArg, GetPendingMeta<ThunkApiConfig>?],\r\n undefined,\r\n string,\r\n never,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'pending'\r\n } & GetPendingMeta<ThunkApiConfig>\r\n>\r\n\r\nexport type AsyncThunkRejectedActionCreator<\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [\r\n Error | null,\r\n string,\r\n ThunkArg,\r\n GetRejectValue<ThunkApiConfig>?,\r\n GetRejectedMeta<ThunkApiConfig>?\r\n ],\r\n GetRejectValue<ThunkApiConfig> | undefined,\r\n string,\r\n GetSerializedErrorType<ThunkApiConfig>,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'rejected'\r\n aborted: boolean\r\n condition: boolean\r\n } & (\r\n | ({ rejectedWithValue: false } & {\r\n [K in keyof GetRejectedMeta<ThunkApiConfig>]?: undefined\r\n })\r\n | ({ rejectedWithValue: true } & GetRejectedMeta<ThunkApiConfig>)\r\n )\r\n>\r\n\r\nexport type AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [Returned, string, ThunkArg, GetFulfilledMeta<ThunkApiConfig>?],\r\n Returned,\r\n string,\r\n never,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'fulfilled'\r\n } & GetFulfilledMeta<ThunkApiConfig>\r\n>\r\n\r\n/**\r\n * A type describing the return value of `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunk<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = AsyncThunkActionCreator<Returned, ThunkArg, ThunkApiConfig> & {\r\n pending: AsyncThunkPendingActionCreator<ThunkArg, ThunkApiConfig>\r\n rejected: AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>\r\n fulfilled: AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n >\r\n typePrefix: string\r\n}\r\n\r\n/**\r\n *\r\n * @param typePrefix\r\n * @param payloadCreator\r\n * @param options\r\n *\r\n * @public\r\n */\r\nexport function createAsyncThunk<\r\n Returned,\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n>(\r\n typePrefix: string,\r\n payloadCreator: AsyncThunkPayloadCreator<Returned, ThunkArg, ThunkApiConfig>,\r\n options?: AsyncThunkOptions<ThunkArg, ThunkApiConfig>\r\n): AsyncThunk<Returned, ThunkArg, ThunkApiConfig> {\r\n type RejectedValue = GetRejectValue<ThunkApiConfig>\r\n type PendingMeta = GetPendingMeta<ThunkApiConfig>\r\n type FulfilledMeta = GetFulfilledMeta<ThunkApiConfig>\r\n type RejectedMeta = GetRejectedMeta<ThunkApiConfig>\r\n\r\n const fulfilled: AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n > = createAction(\r\n typePrefix + '/fulfilled',\r\n (\r\n payload: Returned,\r\n requestId: string,\r\n arg: ThunkArg,\r\n meta?: FulfilledMeta\r\n ) => ({\r\n payload,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n requestStatus: 'fulfilled' as const,\r\n },\r\n })\r\n )\r\n\r\n const pending: AsyncThunkPendingActionCreator<ThunkArg, ThunkApiConfig> =\r\n createAction(\r\n typePrefix + '/pending',\r\n (requestId: string, arg: ThunkArg, meta?: PendingMeta) => ({\r\n payload: undefined,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n requestStatus: 'pending' as const,\r\n },\r\n })\r\n )\r\n\r\n const rejected: AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig> =\r\n createAction(\r\n typePrefix + '/rejected',\r\n (\r\n error: Error | null,\r\n requestId: string,\r\n arg: ThunkArg,\r\n payload?: RejectedValue,\r\n meta?: RejectedMeta\r\n ) => ({\r\n payload,\r\n error: ((options && options.serializeError) || miniSerializeError)(\r\n error || 'Rejected'\r\n ) as GetSerializedErrorType<ThunkApiConfig>,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n rejectedWithValue: !!payload,\r\n requestStatus: 'rejected' as const,\r\n aborted: error?.name === 'AbortError',\r\n condition: error?.name === 'ConditionError',\r\n },\r\n })\r\n )\r\n\r\n let displayedWarning = false\r\n\r\n const AC =\r\n typeof AbortController !== 'undefined'\r\n ? AbortController\r\n : class implements AbortController {\r\n signal: AbortSignal = {\r\n aborted: false,\r\n addEventListener() {},\r\n dispatchEvent() {\r\n return false\r\n },\r\n onabort() {},\r\n removeEventListener() {},\r\n }\r\n abort() {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (!displayedWarning) {\r\n displayedWarning = true\r\n console.info(\r\n `This platform does not implement AbortController. \r\nIf you want to use the AbortController to react to \\`abort\\` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.`\r\n )\r\n }\r\n }\r\n }\r\n }\r\n\r\n function actionCreator(\r\n arg: ThunkArg\r\n ): AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> {\r\n return (dispatch, getState, extra) => {\r\n const requestId = (options?.idGenerator ?? nanoid)()\r\n\r\n const abortController = new AC()\r\n let abortReason: string | undefined\r\n\r\n const abortedPromise = new Promise<never>((_, reject) =>\r\n abortController.signal.addEventListener('abort', () =>\r\n reject({ name: 'AbortError', message: abortReason || 'Aborted' })\r\n )\r\n )\r\n\r\n let started = false\r\n function abort(reason?: string) {\r\n if (started) {\r\n abortReason = reason\r\n abortController.abort()\r\n }\r\n }\r\n\r\n const promise = (async function () {\r\n let finalAction: ReturnType<typeof fulfilled | typeof rejected>\r\n try {\r\n if (\r\n options &&\r\n options.condition &&\r\n options.condition(arg, { getState, extra }) === false\r\n ) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw {\r\n name: 'ConditionError',\r\n message: 'Aborted due to condition callback returning false.',\r\n }\r\n }\r\n started = true\r\n dispatch(\r\n pending(\r\n requestId,\r\n arg,\r\n options?.getPendingMeta?.({ requestId, arg }, { getState, extra })\r\n )\r\n )\r\n finalAction = await Promise.race([\r\n abortedPromise,\r\n Promise.resolve(\r\n payloadCreator(arg, {\r\n dispatch,\r\n getState,\r\n extra,\r\n requestId,\r\n signal: abortController.signal,\r\n rejectWithValue: ((\r\n value: RejectedValue,\r\n meta?: RejectedMeta\r\n ) => {\r\n return new RejectWithValue(value, meta)\r\n }) as any,\r\n fulfillWithValue: ((value: unknown, meta?: FulfilledMeta) => {\r\n return new FulfillWithMeta(value, meta)\r\n }) as any,\r\n })\r\n ).then((result) => {\r\n if (result instanceof RejectWithValue) {\r\n throw result\r\n }\r\n if (result instanceof FulfillWithMeta) {\r\n return fulfilled(result.payload, requestId, arg, result.meta)\r\n }\r\n return fulfilled(result as any, requestId, arg)\r\n }),\r\n ])\r\n } catch (err) {\r\n finalAction =\r\n err instanceof RejectWithValue\r\n ? rejected(null, requestId, arg, err.payload, err.meta)\r\n : rejected(err as any, requestId, arg)\r\n }\r\n // We dispatch the result action _after_ the catch, to avoid having any errors\r\n // here get swallowed by the try/catch block,\r\n // per https://twitter.com/dan_abramov/status/770914221638942720\r\n // and https://github.com/reduxjs/redux-toolkit/blob/e85eb17b39a2118d859f7b7746e0f3fee523e089/docs/tutorials/advanced-tutorial.md#async-error-handling-logic-in-thunks\r\n\r\n const skipDispatch =\r\n options &&\r\n !options.dispatchConditionRejection &&\r\n rejected.match(finalAction) &&\r\n (finalAction as any).meta.condition\r\n\r\n if (!skipDispatch) {\r\n dispatch(finalAction)\r\n }\r\n return finalAction\r\n })()\r\n return Object.assign(promise as Promise<any>, {\r\n abort,\r\n requestId,\r\n arg,\r\n unwrap() {\r\n return promise.then<any>(unwrapResult)\r\n },\r\n })\r\n }\r\n }\r\n\r\n return Object.assign(\r\n actionCreator as AsyncThunkActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n >,\r\n {\r\n pending,\r\n rejected,\r\n fulfilled,\r\n typePrefix,\r\n }\r\n )\r\n}\r\n\r\ninterface UnwrappableAction {\r\n payload: any\r\n meta?: any\r\n error?: any\r\n}\r\n\r\ntype UnwrappedActionPayload<T extends UnwrappableAction> = Exclude<\r\n T,\r\n { error: any }\r\n>['payload']\r\n\r\n/**\r\n * @public\r\n */\r\nexport function unwrapResult<R extends UnwrappableAction>(\r\n action: R\r\n): UnwrappedActionPayload<R> {\r\n if (action.meta && action.meta.rejectedWithValue) {\r\n throw action.payload\r\n }\r\n if (action.error) {\r\n throw action.error\r\n }\r\n return action.payload\r\n}\r\n\r\ntype WithStrictNullChecks<True, False> = undefined extends boolean\r\n ? False\r\n : True\r\n","import type { Middleware } from 'redux'\r\n\r\n/**\r\n * return True if T is `any`, otherwise return False\r\n * taken from https://github.com/joonhocho/tsdef\r\n *\r\n * @internal\r\n */\r\nexport type IsAny<T, True, False = never> =\r\n // test if we are going the left AND right path in the condition\r\n true | false extends (T extends never ? true : false) ? True : False\r\n\r\n/**\r\n * return True if T is `unknown`, otherwise return False\r\n * taken from https://github.com/joonhocho/tsdef\r\n *\r\n * @internal\r\n */\r\nexport type IsUnknown<T, True, False = never> = unknown extends T\r\n ? IsAny<T, False, True>\r\n : False\r\n\r\nexport type FallbackIfUnknown<T, Fallback> = IsUnknown<T, Fallback, T>\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IfMaybeUndefined<P, True, False> = [undefined] extends [P]\r\n ? True\r\n : False\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IfVoid<P, True, False> = [void] extends [P] ? True : False\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IsEmptyObj<T, True, False = never> = T extends any\r\n ? keyof T extends never\r\n ? IsUnknown<T, False, IfMaybeUndefined<T, False, IfVoid<T, False, True>>>\r\n : False\r\n : never\r\n\r\n/**\r\n * returns True if TS version is above 3.5, False if below.\r\n * uses feature detection to detect TS version >= 3.5\r\n * * versions below 3.5 will return `{}` for unresolvable interference\r\n * * versions above will return `unknown`\r\n *\r\n * @internal\r\n */\r\nexport type AtLeastTS35<True, False> = [True, False][IsUnknown<\r\n ReturnType<<T>() => T>,\r\n 0,\r\n 1\r\n>]\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IsUnknownOrNonInferrable<T, True, False> = AtLeastTS35<\r\n IsUnknown<T, True, False>,\r\n IsEmptyObj<T, True, IsUnknown<T, True, False>>\r\n>\r\n\r\n/**\r\n * Combines all dispatch signatures of all middlewares in the array `M` into\r\n * one intersected dispatch signature.\r\n */\r\nexport type DispatchForMiddlewares<M> = M extends ReadonlyArray<any>\r\n ? UnionToIntersection<\r\n M[number] extends infer MiddlewareValues\r\n ? MiddlewareValues extends Middleware<infer DispatchExt, any, any>\r\n ? DispatchExt extends Function\r\n ? IsAny<DispatchExt, never, DispatchExt>\r\n : never\r\n : never\r\n : never\r\n >\r\n : never\r\n\r\n/**\r\n * Convert a Union type `(A|B)` to an intersection type `(A&B)`\r\n */\r\nexport type UnionToIntersection<U> = (\r\n U extends any ? (k: U) => void : never\r\n) extends (k: infer I) => void\r\n ? I\r\n : never\r\n\r\n/**\r\n * Helper type. Passes T out again, but boxes it in a way that it cannot\r\n * \"widen\" the type by accident if it is a generic that should be inferred\r\n * from elsewhere.\r\n *\r\n * @internal\r\n */\r\nexport type NoInfer<T> = [T][T extends any ? 0 : never]\r\n\r\nexport type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>\r\n\r\nexport interface HasMatchFunction<T> {\r\n match: (v: any) => v is T\r\n}\r\n\r\nexport const hasMatchFunction = <T>(\r\n v: Matcher<T>\r\n): v is HasMatchFunction<T> => {\r\n return v && typeof (v as HasMatchFunction<T>).match === 'function'\r\n}\r\n\r\n/** @public */\r\nexport type Matcher<T> = HasMatchFunction<T> | ((v: any) => v is T)\r\n\r\n/** @public */\r\nexport type ActionFromMatcher<M extends Matcher<any>> = M extends Matcher<\r\n infer T\r\n>\r\n ? T\r\n : never\r\n","import type {\r\n ActionFromMatcher,\r\n Matcher,\r\n UnionToIntersection,\r\n} from './tsHelpers'\r\nimport { hasMatchFunction } from './tsHelpers'\r\nimport type {\r\n AsyncThunk,\r\n AsyncThunkFulfilledActionCreator,\r\n AsyncThunkPendingActionCreator,\r\n AsyncThunkRejectedActionCreator,\r\n} from './createAsyncThunk'\r\n\r\n/** @public */\r\nexport type ActionMatchingAnyOf<\r\n Matchers extends [Matcher<any>, ...Matcher<any>[]]\r\n> = ActionFromMatcher<Matchers[number]>\r\n\r\n/** @public */\r\nexport type ActionMatchingAllOf<\r\n Matchers extends [Matcher<any>, ...Matcher<any>[]]\r\n> = UnionToIntersection<ActionMatchingAnyOf<Matchers>>\r\n\r\nconst matches = (matcher: Matcher<any>, action: any) => {\r\n if (hasMatchFunction(matcher)) {\r\n return matcher.match(action)\r\n } else {\r\n return matcher(action)\r\n }\r\n}\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action matches any one of the supplied type guards or action\r\n * creators.\r\n *\r\n * @param matchers The type guards or action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAnyOf<Matchers extends [Matcher<any>, ...Matcher<any>[]]>(\r\n ...matchers: Matchers\r\n) {\r\n return (action: any): action is ActionMatchingAnyOf<Matchers> => {\r\n return matchers.some((matcher) => matches(matcher, action))\r\n }\r\n}\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action matches all of the supplied type guards or action\r\n * creators.\r\n *\r\n * @param matchers The type guards or action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAllOf<Matchers extends [Matcher<any>, ...Matcher<any>[]]>(\r\n ...matchers: Matchers\r\n) {\r\n return (action: any): action is ActionMatchingAllOf<Matchers> => {\r\n return matchers.every((matcher) => matches(matcher, action))\r\n }\r\n}\r\n\r\n/**\r\n * @param action A redux action\r\n * @param validStatus An array of valid meta.requestStatus values\r\n *\r\n * @internal\r\n */\r\nexport function hasExpectedRequestMetadata(\r\n action: any,\r\n validStatus: readonly string[]\r\n) {\r\n if (!action || !action.meta) return false\r\n\r\n const hasValidRequestId = typeof action.meta.requestId === 'string'\r\n const hasValidRequestStatus =\r\n validStatus.indexOf(action.meta.requestStatus) > -1\r\n\r\n return hasValidRequestId && hasValidRequestStatus\r\n}\r\n\r\nfunction isAsyncThunkArray(a: [any] | AnyAsyncThunk[]): a is AnyAsyncThunk[] {\r\n return (\r\n typeof a[0] === 'function' &&\r\n 'pending' in a[0] &&\r\n 'fulfilled' in a[0] &&\r\n 'rejected' in a[0]\r\n )\r\n}\r\n\r\nexport type UnknownAsyncThunkPendingAction = ReturnType<\r\n AsyncThunkPendingActionCreator<unknown>\r\n>\r\n\r\nexport type PendingActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['pending']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is pending.\r\n *\r\n * @public\r\n */\r\nexport function isPending(): (\r\n action: any\r\n) => action is UnknownAsyncThunkPendingAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is pending.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isPending<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is PendingActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a pending thunk action\r\n * @public\r\n */\r\nexport function isPending(action: any): action is UnknownAsyncThunkPendingAction\r\nexport function isPending<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['pending'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isPending()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is PendingActionFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.pending\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkRejectedAction = ReturnType<\r\n AsyncThunkRejectedActionCreator<unknown, unknown>\r\n>\r\n\r\nexport type RejectedActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['rejected']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is rejected.\r\n *\r\n * @public\r\n */\r\nexport function isRejected(): (\r\n action: any\r\n) => action is UnknownAsyncThunkRejectedAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is rejected.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isRejected<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is RejectedActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a rejected thunk action\r\n * @public\r\n */\r\nexport function isRejected(\r\n action: any\r\n): action is UnknownAsyncThunkRejectedAction\r\nexport function isRejected<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['rejected'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejected()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is RejectedActionFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.rejected\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkRejectedWithValueAction = ReturnType<\r\n AsyncThunkRejectedActionCreator<unknown, unknown>\r\n>\r\n\r\nexport type RejectedWithValueActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['rejected']> &\r\n (T extends AsyncThunk<any, any, { rejectValue: infer RejectedValue }>\r\n ? { payload: RejectedValue }\r\n : unknown)\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is rejected with value.\r\n *\r\n * @public\r\n */\r\nexport function isRejectedWithValue(): (\r\n action: any\r\n) => action is UnknownAsyncThunkRejectedAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is rejected with value.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isRejectedWithValue<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (\r\n action: any\r\n) => action is RejectedWithValueActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a rejected thunk action with value\r\n * @public\r\n */\r\nexport function isRejectedWithValue(\r\n action: any\r\n): action is UnknownAsyncThunkRejectedAction\r\nexport function isRejectedWithValue<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n const hasFlag = (action: any): action is any => {\r\n return action && action.meta && action.meta.rejectedWithValue\r\n }\r\n\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => {\r\n const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag)\r\n\r\n return combinedMatcher(action)\r\n }\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejectedWithValue()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is RejectedActionFromAsyncThunk<AsyncThunks[number]> => {\r\n const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkFulfilledAction = ReturnType<\r\n AsyncThunkFulfilledActionCreator<unknown, unknown>\r\n>\r\n\r\nexport type FulfilledActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['fulfilled']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is fulfilled.\r\n *\r\n * @public\r\n */\r\nexport function isFulfilled(): (\r\n action: any\r\n) => action is UnknownAsyncThunkFulfilledAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is fulfilled.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isFulfilled<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is FulfilledActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a fulfilled thunk action\r\n * @public\r\n */\r\nexport function isFulfilled(\r\n action: any\r\n): action is UnknownAsyncThunkFulfilledAction\r\nexport function isFulfilled<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['fulfilled'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isFulfilled()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is FulfilledActionFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.fulfilled\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkAction =\r\n | UnknownAsyncThunkPendingAction\r\n | UnknownAsyncThunkRejectedAction\r\n | UnknownAsyncThunkFulfilledAction\r\n\r\nexport type AnyAsyncThunk = {\r\n pending: { match: (action: any) => action is any }\r\n fulfilled: { match: (action: any) => action is any }\r\n rejected: { match: (action: any) => action is any }\r\n}\r\n\r\nexport type ActionsFromAsyncThunk<T extends AnyAsyncThunk> =\r\n | ActionFromMatcher<T['pending']>\r\n | ActionFromMatcher<T['fulfilled']>\r\n | ActionFromMatcher<T['rejected']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator.\r\n *\r\n * @public\r\n */\r\nexport function isAsyncThunkAction(): (\r\n action: any\r\n) => action is UnknownAsyncThunkAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAsyncThunkAction<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is ActionsFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a thunk action\r\n * @public\r\n */\r\nexport function isAsyncThunkAction(\r\n action: any\r\n): action is UnknownAsyncThunkAction\r\nexport function isAsyncThunkAction<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) =>\r\n hasExpectedRequestMetadata(action, ['pending', 'fulfilled', 'rejected'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isAsyncThunkAction()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is ActionsFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = [] as any\r\n\r\n for (const asyncThunk of asyncThunks) {\r\n matchers.push(\r\n asyncThunk.pending,\r\n asyncThunk.rejected,\r\n asyncThunk.fulfilled\r\n )\r\n }\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n",null]}
|
||
diff --git a/dist/redux-toolkit.modern.js b/dist/redux-toolkit.modern.js
|
||
deleted file mode 100644
|
||
index 9eb60a2461eef5c759100429b78bb2fde7eec3d5..0000000000000000000000000000000000000000
|
||
--- a/dist/redux-toolkit.modern.js
|
||
+++ /dev/null
|
||
@@ -1,1148 +0,0 @@
|
||
-var __defProp = Object.defineProperty;
|
||
-var __defProps = Object.defineProperties;
|
||
-var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
||
-var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
||
-var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||
-var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
||
-var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||
-var __spreadValues = (a, b) => {
|
||
- for (var prop in b || (b = {}))
|
||
- if (__hasOwnProp.call(b, prop))
|
||
- __defNormalProp(a, prop, b[prop]);
|
||
- if (__getOwnPropSymbols)
|
||
- for (var prop of __getOwnPropSymbols(b)) {
|
||
- if (__propIsEnum.call(b, prop))
|
||
- __defNormalProp(a, prop, b[prop]);
|
||
- }
|
||
- return a;
|
||
-};
|
||
-var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
||
-// src/index.ts
|
||
-import { enableES5 } from "immer";
|
||
-export * from "redux";
|
||
-import { default as default2, current as current2, freeze, original, isDraft as isDraft4 } from "immer";
|
||
-import { createSelector as createSelector2 } from "reselect";
|
||
-// src/createDraftSafeSelector.ts
|
||
-import { current, isDraft } from "immer";
|
||
-import { createSelector } from "reselect";
|
||
-var createDraftSafeSelector = (...args) => {
|
||
- const selector = createSelector(...args);
|
||
- const wrappedSelector = (value, ...rest) => selector(isDraft(value) ? current(value) : value, ...rest);
|
||
- return wrappedSelector;
|
||
-};
|
||
-// src/configureStore.ts
|
||
-import { createStore, compose as compose2, applyMiddleware, combineReducers } from "redux";
|
||
-// src/devtoolsExtension.ts
|
||
-import { compose } from "redux";
|
||
-var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () {
|
||
- if (arguments.length === 0)
|
||
- return void 0;
|
||
- if (typeof arguments[0] === "object")
|
||
- return compose;
|
||
- return compose.apply(null, arguments);
|
||
-};
|
||
-var devToolsEnhancer = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () {
|
||
- return function (noop) {
|
||
- return noop;
|
||
- };
|
||
-};
|
||
-// src/isPlainObject.ts
|
||
-function isPlainObject(value) {
|
||
- if (typeof value !== "object" || value === null)
|
||
- return false;
|
||
- let proto = value;
|
||
- while (Object.getPrototypeOf(proto) !== null) {
|
||
- proto = Object.getPrototypeOf(proto);
|
||
- }
|
||
- return Object.getPrototypeOf(value) === proto;
|
||
-}
|
||
-// src/getDefaultMiddleware.ts
|
||
-import thunkMiddleware from "redux-thunk";
|
||
-// src/utils.ts
|
||
-function getTimeMeasureUtils(maxDelay, fnName) {
|
||
- let elapsed = 0;
|
||
- return {
|
||
- measureTime(fn) {
|
||
- const started = Date.now();
|
||
- try {
|
||
- return fn();
|
||
- }
|
||
- finally {
|
||
- const finished = Date.now();
|
||
- elapsed += finished - started;
|
||
- }
|
||
- },
|
||
- warnIfExceeded() {
|
||
- if (elapsed > maxDelay) {
|
||
- console.warn(`${fnName} took ${elapsed}ms, which is more than the warning threshold of ${maxDelay}ms.
|
||
-If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
|
||
-It is disabled in production builds, so you don't need to worry about that.`);
|
||
- }
|
||
- }
|
||
- };
|
||
-}
|
||
-var MiddlewareArray = class extends Array {
|
||
- constructor(...args) {
|
||
- super(...args);
|
||
- Object.setPrototypeOf(this, MiddlewareArray.prototype);
|
||
- }
|
||
- static get [Symbol.species]() {
|
||
- return MiddlewareArray;
|
||
- }
|
||
- concat(...arr) {
|
||
- return super.concat.apply(this, arr);
|
||
- }
|
||
- prepend(...arr) {
|
||
- if (arr.length === 1 && Array.isArray(arr[0])) {
|
||
- return new MiddlewareArray(...arr[0].concat(this));
|
||
- }
|
||
- return new MiddlewareArray(...arr.concat(this));
|
||
- }
|
||
-};
|
||
-// src/immutableStateInvariantMiddleware.ts
|
||
-var isProduction = process.env.NODE_ENV === "production";
|
||
-var prefix = "Invariant failed";
|
||
-function invariant(condition, message) {
|
||
- if (condition) {
|
||
- return;
|
||
- }
|
||
- if (isProduction) {
|
||
- throw new Error(prefix);
|
||
- }
|
||
- throw new Error(`${prefix}: ${message || ""}`);
|
||
-}
|
||
-function stringify(obj, serializer, indent, decycler) {
|
||
- return JSON.stringify(obj, getSerialize(serializer, decycler), indent);
|
||
-}
|
||
-function getSerialize(serializer, decycler) {
|
||
- let stack = [], keys = [];
|
||
- if (!decycler)
|
||
- decycler = function (_, value) {
|
||
- if (stack[0] === value)
|
||
- return "[Circular ~]";
|
||
- return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]";
|
||
- };
|
||
- return function (key, value) {
|
||
- if (stack.length > 0) {
|
||
- var thisPos = stack.indexOf(this);
|
||
- ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
|
||
- ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
|
||
- if (~stack.indexOf(value))
|
||
- value = decycler.call(this, key, value);
|
||
- }
|
||
- else
|
||
- stack.push(value);
|
||
- return serializer == null ? value : serializer.call(this, key, value);
|
||
- };
|
||
-}
|
||
-function isImmutableDefault(value) {
|
||
- return typeof value !== "object" || value === null || typeof value === "undefined" || Object.isFrozen(value);
|
||
-}
|
||
-function trackForMutations(isImmutable, ignorePaths, obj) {
|
||
- const trackedProperties = trackProperties(isImmutable, ignorePaths, obj);
|
||
- return {
|
||
- detectMutations() {
|
||
- return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);
|
||
- }
|
||
- };
|
||
-}
|
||
-function trackProperties(isImmutable, ignorePaths = [], obj, path = "") {
|
||
- const tracked = { value: obj };
|
||
- if (!isImmutable(obj)) {
|
||
- tracked.children = {};
|
||
- for (const key in obj) {
|
||
- const childPath = path ? path + "." + key : key;
|
||
- if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
|
||
- continue;
|
||
- }
|
||
- tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);
|
||
- }
|
||
- }
|
||
- return tracked;
|
||
-}
|
||
-function detectMutations(isImmutable, ignorePaths = [], trackedProperty, obj, sameParentRef = false, path = "") {
|
||
- const prevObj = trackedProperty ? trackedProperty.value : void 0;
|
||
- const sameRef = prevObj === obj;
|
||
- if (sameParentRef && !sameRef && !Number.isNaN(obj)) {
|
||
- return { wasMutated: true, path };
|
||
- }
|
||
- if (isImmutable(prevObj) || isImmutable(obj)) {
|
||
- return { wasMutated: false };
|
||
- }
|
||
- const keysToDetect = {};
|
||
- for (let key in trackedProperty.children) {
|
||
- keysToDetect[key] = true;
|
||
- }
|
||
- for (let key in obj) {
|
||
- keysToDetect[key] = true;
|
||
- }
|
||
- for (let key in keysToDetect) {
|
||
- const childPath = path ? path + "." + key : key;
|
||
- if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
|
||
- continue;
|
||
- }
|
||
- const result = detectMutations(isImmutable, ignorePaths, trackedProperty.children[key], obj[key], sameRef, childPath);
|
||
- if (result.wasMutated) {
|
||
- return result;
|
||
- }
|
||
- }
|
||
- return { wasMutated: false };
|
||
-}
|
||
-function createImmutableStateInvariantMiddleware(options = {}) {
|
||
- if (process.env.NODE_ENV === "production") {
|
||
- return () => (next) => (action) => next(action);
|
||
- }
|
||
- let { isImmutable = isImmutableDefault, ignoredPaths, warnAfter = 32, ignore } = options;
|
||
- ignoredPaths = ignoredPaths || ignore;
|
||
- const track = trackForMutations.bind(null, isImmutable, ignoredPaths);
|
||
- return ({ getState }) => {
|
||
- let state = getState();
|
||
- let tracker = track(state);
|
||
- let result;
|
||
- return (next) => (action) => {
|
||
- const measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware");
|
||
- measureUtils.measureTime(() => {
|
||
- state = getState();
|
||
- result = tracker.detectMutations();
|
||
- tracker = track(state);
|
||
- invariant(!result.wasMutated, `A state mutation was detected between dispatches, in the path '${result.path || ""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`);
|
||
- });
|
||
- const dispatchedAction = next(action);
|
||
- measureUtils.measureTime(() => {
|
||
- state = getState();
|
||
- result = tracker.detectMutations();
|
||
- tracker = track(state);
|
||
- result.wasMutated && invariant(!result.wasMutated, `A state mutation was detected inside a dispatch, in the path: ${result.path || ""}. Take a look at the reducer(s) handling the action ${stringify(action)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`);
|
||
- });
|
||
- measureUtils.warnIfExceeded();
|
||
- return dispatchedAction;
|
||
- };
|
||
- };
|
||
-}
|
||
-// src/serializableStateInvariantMiddleware.ts
|
||
-function isPlain(val) {
|
||
- const type = typeof val;
|
||
- return type === "undefined" || val === null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val);
|
||
-}
|
||
-function findNonSerializableValue(value, path = "", isSerializable = isPlain, getEntries, ignoredPaths = []) {
|
||
- let foundNestedSerializable;
|
||
- if (!isSerializable(value)) {
|
||
- return {
|
||
- keyPath: path || "<root>",
|
||
- value
|
||
- };
|
||
- }
|
||
- if (typeof value !== "object" || value === null) {
|
||
- return false;
|
||
- }
|
||
- const entries = getEntries != null ? getEntries(value) : Object.entries(value);
|
||
- const hasIgnoredPaths = ignoredPaths.length > 0;
|
||
- for (const [key, nestedValue] of entries) {
|
||
- const nestedPath = path ? path + "." + key : key;
|
||
- if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) {
|
||
- continue;
|
||
- }
|
||
- if (!isSerializable(nestedValue)) {
|
||
- return {
|
||
- keyPath: nestedPath,
|
||
- value: nestedValue
|
||
- };
|
||
- }
|
||
- if (typeof nestedValue === "object") {
|
||
- foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths);
|
||
- if (foundNestedSerializable) {
|
||
- return foundNestedSerializable;
|
||
- }
|
||
- }
|
||
- }
|
||
- return false;
|
||
-}
|
||
-function createSerializableStateInvariantMiddleware(options = {}) {
|
||
- if (process.env.NODE_ENV === "production") {
|
||
- return () => (next) => (action) => next(action);
|
||
- }
|
||
- const { isSerializable = isPlain, getEntries, ignoredActions = [], ignoredActionPaths = ["meta.arg", "meta.baseQueryMeta"], ignoredPaths = [], warnAfter = 32, ignoreState = false } = options;
|
||
- return (storeAPI) => (next) => (action) => {
|
||
- if (ignoredActions.length && ignoredActions.indexOf(action.type) !== -1) {
|
||
- return next(action);
|
||
- }
|
||
- const measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware");
|
||
- measureUtils.measureTime(() => {
|
||
- const foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths);
|
||
- if (foundActionNonSerializableValue) {
|
||
- const { keyPath, value } = foundActionNonSerializableValue;
|
||
- console.error(`A non-serializable value was detected in an action, in the path: \`${keyPath}\`. Value:`, value, "\nTake a look at the logic that dispatched this action: ", action, "\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)", "\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)");
|
||
- }
|
||
- });
|
||
- const result = next(action);
|
||
- if (!ignoreState) {
|
||
- measureUtils.measureTime(() => {
|
||
- const state = storeAPI.getState();
|
||
- const foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths);
|
||
- if (foundStateNonSerializableValue) {
|
||
- const { keyPath, value } = foundStateNonSerializableValue;
|
||
- console.error(`A non-serializable value was detected in the state, in the path: \`${keyPath}\`. Value:`, value, `
|
||
-Take a look at the reducer(s) handling this action type: ${action.type}.
|
||
-(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`);
|
||
- }
|
||
- });
|
||
- measureUtils.warnIfExceeded();
|
||
- }
|
||
- return result;
|
||
- };
|
||
-}
|
||
-// src/getDefaultMiddleware.ts
|
||
-function isBoolean(x) {
|
||
- return typeof x === "boolean";
|
||
-}
|
||
-function curryGetDefaultMiddleware() {
|
||
- return function curriedGetDefaultMiddleware(options) {
|
||
- return getDefaultMiddleware(options);
|
||
- };
|
||
-}
|
||
-function getDefaultMiddleware(options = {}) {
|
||
- const { thunk = true, immutableCheck = true, serializableCheck = true } = options;
|
||
- let middlewareArray = new MiddlewareArray();
|
||
- if (thunk) {
|
||
- if (isBoolean(thunk)) {
|
||
- middlewareArray.push(thunkMiddleware);
|
||
- }
|
||
- else {
|
||
- middlewareArray.push(thunkMiddleware.withExtraArgument(thunk.extraArgument));
|
||
- }
|
||
- }
|
||
- if (process.env.NODE_ENV !== "production") {
|
||
- if (immutableCheck) {
|
||
- let immutableOptions = {};
|
||
- if (!isBoolean(immutableCheck)) {
|
||
- immutableOptions = immutableCheck;
|
||
- }
|
||
- middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));
|
||
- }
|
||
- if (serializableCheck) {
|
||
- let serializableOptions = {};
|
||
- if (!isBoolean(serializableCheck)) {
|
||
- serializableOptions = serializableCheck;
|
||
- }
|
||
- middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));
|
||
- }
|
||
- }
|
||
- return middlewareArray;
|
||
-}
|
||
-// src/configureStore.ts
|
||
-var IS_PRODUCTION = process.env.NODE_ENV === "production";
|
||
-function configureStore(options) {
|
||
- const curriedGetDefaultMiddleware = curryGetDefaultMiddleware();
|
||
- const { reducer = void 0, middleware = curriedGetDefaultMiddleware(), devTools = true, preloadedState = void 0, enhancers = void 0 } = options || {};
|
||
- let rootReducer;
|
||
- if (typeof reducer === "function") {
|
||
- rootReducer = reducer;
|
||
- }
|
||
- else if (isPlainObject(reducer)) {
|
||
- rootReducer = combineReducers(reducer);
|
||
- }
|
||
- else {
|
||
- throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');
|
||
- }
|
||
- let finalMiddleware = middleware;
|
||
- if (typeof finalMiddleware === "function") {
|
||
- finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware);
|
||
- if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {
|
||
- throw new Error("when using a middleware builder function, an array of middleware must be returned");
|
||
- }
|
||
- }
|
||
- if (!IS_PRODUCTION && finalMiddleware.some((item) => typeof item !== "function")) {
|
||
- throw new Error("each middleware provided to configureStore must be a function");
|
||
- }
|
||
- const middlewareEnhancer = applyMiddleware(...finalMiddleware);
|
||
- let finalCompose = compose2;
|
||
- if (devTools) {
|
||
- finalCompose = composeWithDevTools(__spreadValues({
|
||
- trace: !IS_PRODUCTION
|
||
- }, typeof devTools === "object" && devTools));
|
||
- }
|
||
- let storeEnhancers = [middlewareEnhancer];
|
||
- if (Array.isArray(enhancers)) {
|
||
- storeEnhancers = [middlewareEnhancer, ...enhancers];
|
||
- }
|
||
- else if (typeof enhancers === "function") {
|
||
- storeEnhancers = enhancers(storeEnhancers);
|
||
- }
|
||
- const composedEnhancer = finalCompose(...storeEnhancers);
|
||
- return createStore(rootReducer, preloadedState, composedEnhancer);
|
||
-}
|
||
-// src/createAction.ts
|
||
-function createAction(type, prepareAction) {
|
||
- function actionCreator(...args) {
|
||
- if (prepareAction) {
|
||
- let prepared = prepareAction(...args);
|
||
- if (!prepared) {
|
||
- throw new Error("prepareAction did not return an object");
|
||
- }
|
||
- return __spreadValues(__spreadValues({
|
||
- type,
|
||
- payload: prepared.payload
|
||
- }, "meta" in prepared && { meta: prepared.meta }), "error" in prepared && { error: prepared.error });
|
||
- }
|
||
- return { type, payload: args[0] };
|
||
- }
|
||
- actionCreator.toString = () => `${type}`;
|
||
- actionCreator.type = type;
|
||
- actionCreator.match = (action) => action.type === type;
|
||
- return actionCreator;
|
||
-}
|
||
-function isFSA(action) {
|
||
- return isPlainObject(action) && typeof action.type === "string" && Object.keys(action).every(isValidKey);
|
||
-}
|
||
-function isValidKey(key) {
|
||
- return ["type", "payload", "error", "meta"].indexOf(key) > -1;
|
||
-}
|
||
-function getType(actionCreator) {
|
||
- return `${actionCreator}`;
|
||
-}
|
||
-// src/createReducer.ts
|
||
-import createNextState, { isDraft as isDraft2, isDraftable } from "immer";
|
||
-// src/mapBuilders.ts
|
||
-function executeReducerBuilderCallback(builderCallback) {
|
||
- const actionsMap = {};
|
||
- const actionMatchers = [];
|
||
- let defaultCaseReducer;
|
||
- const builder = {
|
||
- addCase(typeOrActionCreator, reducer) {
|
||
- if (process.env.NODE_ENV !== "production") {
|
||
- if (actionMatchers.length > 0) {
|
||
- throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");
|
||
- }
|
||
- if (defaultCaseReducer) {
|
||
- throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`");
|
||
- }
|
||
- }
|
||
- const type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
|
||
- if (type in actionsMap) {
|
||
- throw new Error("addCase cannot be called with two reducers for the same action type");
|
||
- }
|
||
- actionsMap[type] = reducer;
|
||
- return builder;
|
||
- },
|
||
- addMatcher(matcher, reducer) {
|
||
- if (process.env.NODE_ENV !== "production") {
|
||
- if (defaultCaseReducer) {
|
||
- throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
|
||
- }
|
||
- }
|
||
- actionMatchers.push({ matcher, reducer });
|
||
- return builder;
|
||
- },
|
||
- addDefaultCase(reducer) {
|
||
- if (process.env.NODE_ENV !== "production") {
|
||
- if (defaultCaseReducer) {
|
||
- throw new Error("`builder.addDefaultCase` can only be called once");
|
||
- }
|
||
- }
|
||
- defaultCaseReducer = reducer;
|
||
- return builder;
|
||
- }
|
||
- };
|
||
- builderCallback(builder);
|
||
- return [actionsMap, actionMatchers, defaultCaseReducer];
|
||
-}
|
||
-// src/createReducer.ts
|
||
-function createReducer(initialState, mapOrBuilderCallback, actionMatchers = [], defaultCaseReducer) {
|
||
- let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] = typeof mapOrBuilderCallback === "function" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer];
|
||
- const frozenInitialState = createNextState(initialState, () => {
|
||
- });
|
||
- return function (state = frozenInitialState, action) {
|
||
- let caseReducers = [
|
||
- actionsMap[action.type],
|
||
- ...finalActionMatchers.filter(({ matcher }) => matcher(action)).map(({ reducer }) => reducer)
|
||
- ];
|
||
- if (caseReducers.filter((cr) => !!cr).length === 0) {
|
||
- caseReducers = [finalDefaultCaseReducer];
|
||
- }
|
||
- return caseReducers.reduce((previousState, caseReducer) => {
|
||
- if (caseReducer) {
|
||
- if (isDraft2(previousState)) {
|
||
- const draft = previousState;
|
||
- const result = caseReducer(draft, action);
|
||
- if (typeof result === "undefined") {
|
||
- return previousState;
|
||
- }
|
||
- return result;
|
||
- }
|
||
- else if (!isDraftable(previousState)) {
|
||
- const result = caseReducer(previousState, action);
|
||
- if (typeof result === "undefined") {
|
||
- if (previousState === null) {
|
||
- return previousState;
|
||
- }
|
||
- throw Error("A case reducer on a non-draftable value must not return undefined");
|
||
- }
|
||
- return result;
|
||
- }
|
||
- else {
|
||
- return createNextState(previousState, (draft) => {
|
||
- return caseReducer(draft, action);
|
||
- });
|
||
- }
|
||
- }
|
||
- return previousState;
|
||
- }, state);
|
||
- };
|
||
-}
|
||
-// src/createSlice.ts
|
||
-function getType2(slice, actionKey) {
|
||
- return `${slice}/${actionKey}`;
|
||
-}
|
||
-function createSlice(options) {
|
||
- const { name, initialState } = options;
|
||
- if (!name) {
|
||
- throw new Error("`name` is a required option for createSlice");
|
||
- }
|
||
- const reducers = options.reducers || {};
|
||
- const [extraReducers = {}, actionMatchers = [], defaultCaseReducer = void 0] = typeof options.extraReducers === "function" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers];
|
||
- const reducerNames = Object.keys(reducers);
|
||
- const sliceCaseReducersByName = {};
|
||
- const sliceCaseReducersByType = {};
|
||
- const actionCreators = {};
|
||
- reducerNames.forEach((reducerName) => {
|
||
- const maybeReducerWithPrepare = reducers[reducerName];
|
||
- const type = getType2(name, reducerName);
|
||
- let caseReducer;
|
||
- let prepareCallback;
|
||
- if ("reducer" in maybeReducerWithPrepare) {
|
||
- caseReducer = maybeReducerWithPrepare.reducer;
|
||
- prepareCallback = maybeReducerWithPrepare.prepare;
|
||
- }
|
||
- else {
|
||
- caseReducer = maybeReducerWithPrepare;
|
||
- }
|
||
- sliceCaseReducersByName[reducerName] = caseReducer;
|
||
- sliceCaseReducersByType[type] = caseReducer;
|
||
- actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type);
|
||
- });
|
||
- const finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType);
|
||
- const reducer = createReducer(initialState, finalCaseReducers, actionMatchers, defaultCaseReducer);
|
||
- return {
|
||
- name,
|
||
- reducer,
|
||
- actions: actionCreators,
|
||
- caseReducers: sliceCaseReducersByName
|
||
- };
|
||
-}
|
||
-// src/entities/entity_state.ts
|
||
-function getInitialEntityState() {
|
||
- return {
|
||
- ids: [],
|
||
- entities: {}
|
||
- };
|
||
-}
|
||
-function createInitialStateFactory() {
|
||
- function getInitialState(additionalState = {}) {
|
||
- return Object.assign(getInitialEntityState(), additionalState);
|
||
- }
|
||
- return { getInitialState };
|
||
-}
|
||
-// src/entities/state_selectors.ts
|
||
-function createSelectorsFactory() {
|
||
- function getSelectors(selectState) {
|
||
- const selectIds = (state) => state.ids;
|
||
- const selectEntities = (state) => state.entities;
|
||
- const selectAll = createDraftSafeSelector(selectIds, selectEntities, (ids, entities) => ids.map((id) => entities[id]));
|
||
- const selectId = (_, id) => id;
|
||
- const selectById = (entities, id) => entities[id];
|
||
- const selectTotal = createDraftSafeSelector(selectIds, (ids) => ids.length);
|
||
- if (!selectState) {
|
||
- return {
|
||
- selectIds,
|
||
- selectEntities,
|
||
- selectAll,
|
||
- selectTotal,
|
||
- selectById: createDraftSafeSelector(selectEntities, selectId, selectById)
|
||
- };
|
||
- }
|
||
- const selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities);
|
||
- return {
|
||
- selectIds: createDraftSafeSelector(selectState, selectIds),
|
||
- selectEntities: selectGlobalizedEntities,
|
||
- selectAll: createDraftSafeSelector(selectState, selectAll),
|
||
- selectTotal: createDraftSafeSelector(selectState, selectTotal),
|
||
- selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById)
|
||
- };
|
||
- }
|
||
- return { getSelectors };
|
||
-}
|
||
-// src/entities/state_adapter.ts
|
||
-import createNextState2, { isDraft as isDraft3 } from "immer";
|
||
-function createSingleArgumentStateOperator(mutator) {
|
||
- const operator = createStateOperator((_, state) => mutator(state));
|
||
- return function operation(state) {
|
||
- return operator(state, void 0);
|
||
- };
|
||
-}
|
||
-function createStateOperator(mutator) {
|
||
- return function operation(state, arg) {
|
||
- function isPayloadActionArgument(arg2) {
|
||
- return isFSA(arg2);
|
||
- }
|
||
- const runMutator = (draft) => {
|
||
- if (isPayloadActionArgument(arg)) {
|
||
- mutator(arg.payload, draft);
|
||
- }
|
||
- else {
|
||
- mutator(arg, draft);
|
||
- }
|
||
- };
|
||
- if (isDraft3(state)) {
|
||
- runMutator(state);
|
||
- return state;
|
||
- }
|
||
- else {
|
||
- return createNextState2(state, runMutator);
|
||
- }
|
||
- };
|
||
-}
|
||
-// src/entities/utils.ts
|
||
-function selectIdValue(entity, selectId) {
|
||
- const key = selectId(entity);
|
||
- if (process.env.NODE_ENV !== "production" && key === void 0) {
|
||
- console.warn("The entity passed to the `selectId` implementation returned undefined.", "You should probably provide your own `selectId` implementation.", "The entity that was passed:", entity, "The `selectId` implementation:", selectId.toString());
|
||
- }
|
||
- return key;
|
||
-}
|
||
-function ensureEntitiesArray(entities) {
|
||
- if (!Array.isArray(entities)) {
|
||
- entities = Object.values(entities);
|
||
- }
|
||
- return entities;
|
||
-}
|
||
-function splitAddedUpdatedEntities(newEntities, selectId, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- const added = [];
|
||
- const updated = [];
|
||
- for (const entity of newEntities) {
|
||
- const id = selectIdValue(entity, selectId);
|
||
- if (id in state.entities) {
|
||
- updated.push({ id, changes: entity });
|
||
- }
|
||
- else {
|
||
- added.push(entity);
|
||
- }
|
||
- }
|
||
- return [added, updated];
|
||
-}
|
||
-// src/entities/unsorted_state_adapter.ts
|
||
-function createUnsortedStateAdapter(selectId) {
|
||
- function addOneMutably(entity, state) {
|
||
- const key = selectIdValue(entity, selectId);
|
||
- if (key in state.entities) {
|
||
- return;
|
||
- }
|
||
- state.ids.push(key);
|
||
- state.entities[key] = entity;
|
||
- }
|
||
- function addManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- for (const entity of newEntities) {
|
||
- addOneMutably(entity, state);
|
||
- }
|
||
- }
|
||
- function setOneMutably(entity, state) {
|
||
- const key = selectIdValue(entity, selectId);
|
||
- if (!(key in state.entities)) {
|
||
- state.ids.push(key);
|
||
- }
|
||
- state.entities[key] = entity;
|
||
- }
|
||
- function setManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- for (const entity of newEntities) {
|
||
- setOneMutably(entity, state);
|
||
- }
|
||
- }
|
||
- function setAllMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- state.ids = [];
|
||
- state.entities = {};
|
||
- addManyMutably(newEntities, state);
|
||
- }
|
||
- function removeOneMutably(key, state) {
|
||
- return removeManyMutably([key], state);
|
||
- }
|
||
- function removeManyMutably(keys, state) {
|
||
- let didMutate = false;
|
||
- keys.forEach((key) => {
|
||
- if (key in state.entities) {
|
||
- delete state.entities[key];
|
||
- didMutate = true;
|
||
- }
|
||
- });
|
||
- if (didMutate) {
|
||
- state.ids = state.ids.filter((id) => id in state.entities);
|
||
- }
|
||
- }
|
||
- function removeAllMutably(state) {
|
||
- Object.assign(state, {
|
||
- ids: [],
|
||
- entities: {}
|
||
- });
|
||
- }
|
||
- function takeNewKey(keys, update, state) {
|
||
- const original2 = state.entities[update.id];
|
||
- const updated = Object.assign({}, original2, update.changes);
|
||
- const newKey = selectIdValue(updated, selectId);
|
||
- const hasNewKey = newKey !== update.id;
|
||
- if (hasNewKey) {
|
||
- keys[update.id] = newKey;
|
||
- delete state.entities[update.id];
|
||
- }
|
||
- state.entities[newKey] = updated;
|
||
- return hasNewKey;
|
||
- }
|
||
- function updateOneMutably(update, state) {
|
||
- return updateManyMutably([update], state);
|
||
- }
|
||
- function updateManyMutably(updates, state) {
|
||
- const newKeys = {};
|
||
- const updatesPerEntity = {};
|
||
- updates.forEach((update) => {
|
||
- if (update.id in state.entities) {
|
||
- updatesPerEntity[update.id] = {
|
||
- id: update.id,
|
||
- changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes)
|
||
- };
|
||
- }
|
||
- });
|
||
- updates = Object.values(updatesPerEntity);
|
||
- const didMutateEntities = updates.length > 0;
|
||
- if (didMutateEntities) {
|
||
- const didMutateIds = updates.filter((update) => takeNewKey(newKeys, update, state)).length > 0;
|
||
- if (didMutateIds) {
|
||
- state.ids = state.ids.map((id) => newKeys[id] || id);
|
||
- }
|
||
- }
|
||
- }
|
||
- function upsertOneMutably(entity, state) {
|
||
- return upsertManyMutably([entity], state);
|
||
- }
|
||
- function upsertManyMutably(newEntities, state) {
|
||
- const [added, updated] = splitAddedUpdatedEntities(newEntities, selectId, state);
|
||
- updateManyMutably(updated, state);
|
||
- addManyMutably(added, state);
|
||
- }
|
||
- return {
|
||
- removeAll: createSingleArgumentStateOperator(removeAllMutably),
|
||
- addOne: createStateOperator(addOneMutably),
|
||
- addMany: createStateOperator(addManyMutably),
|
||
- setOne: createStateOperator(setOneMutably),
|
||
- setMany: createStateOperator(setManyMutably),
|
||
- setAll: createStateOperator(setAllMutably),
|
||
- updateOne: createStateOperator(updateOneMutably),
|
||
- updateMany: createStateOperator(updateManyMutably),
|
||
- upsertOne: createStateOperator(upsertOneMutably),
|
||
- upsertMany: createStateOperator(upsertManyMutably),
|
||
- removeOne: createStateOperator(removeOneMutably),
|
||
- removeMany: createStateOperator(removeManyMutably)
|
||
- };
|
||
-}
|
||
-// src/entities/sorted_state_adapter.ts
|
||
-function createSortedStateAdapter(selectId, sort) {
|
||
- const { removeOne, removeMany, removeAll } = createUnsortedStateAdapter(selectId);
|
||
- function addOneMutably(entity, state) {
|
||
- return addManyMutably([entity], state);
|
||
- }
|
||
- function addManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- const models = newEntities.filter((model) => !(selectIdValue(model, selectId) in state.entities));
|
||
- if (models.length !== 0) {
|
||
- merge(models, state);
|
||
- }
|
||
- }
|
||
- function setOneMutably(entity, state) {
|
||
- return setManyMutably([entity], state);
|
||
- }
|
||
- function setManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- if (newEntities.length !== 0) {
|
||
- merge(newEntities, state);
|
||
- }
|
||
- }
|
||
- function setAllMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- state.entities = {};
|
||
- state.ids = [];
|
||
- addManyMutably(newEntities, state);
|
||
- }
|
||
- function updateOneMutably(update, state) {
|
||
- return updateManyMutably([update], state);
|
||
- }
|
||
- function takeUpdatedModel(models, update, state) {
|
||
- if (!(update.id in state.entities)) {
|
||
- return false;
|
||
- }
|
||
- const original2 = state.entities[update.id];
|
||
- const updated = Object.assign({}, original2, update.changes);
|
||
- const newKey = selectIdValue(updated, selectId);
|
||
- delete state.entities[update.id];
|
||
- models.push(updated);
|
||
- return newKey !== update.id;
|
||
- }
|
||
- function updateManyMutably(updates, state) {
|
||
- const models = [];
|
||
- updates.forEach((update) => takeUpdatedModel(models, update, state));
|
||
- if (models.length !== 0) {
|
||
- merge(models, state);
|
||
- }
|
||
- }
|
||
- function upsertOneMutably(entity, state) {
|
||
- return upsertManyMutably([entity], state);
|
||
- }
|
||
- function upsertManyMutably(newEntities, state) {
|
||
- const [added, updated] = splitAddedUpdatedEntities(newEntities, selectId, state);
|
||
- updateManyMutably(updated, state);
|
||
- addManyMutably(added, state);
|
||
- }
|
||
- function areArraysEqual(a, b) {
|
||
- if (a.length !== b.length) {
|
||
- return false;
|
||
- }
|
||
- for (let i = 0; i < a.length && i < b.length; i++) {
|
||
- if (a[i] === b[i]) {
|
||
- continue;
|
||
- }
|
||
- return false;
|
||
- }
|
||
- return true;
|
||
- }
|
||
- function merge(models, state) {
|
||
- models.forEach((model) => {
|
||
- state.entities[selectId(model)] = model;
|
||
- });
|
||
- const allEntities = Object.values(state.entities);
|
||
- allEntities.sort(sort);
|
||
- const newSortedIds = allEntities.map(selectId);
|
||
- const { ids } = state;
|
||
- if (!areArraysEqual(ids, newSortedIds)) {
|
||
- state.ids = newSortedIds;
|
||
- }
|
||
- }
|
||
- return {
|
||
- removeOne,
|
||
- removeMany,
|
||
- removeAll,
|
||
- addOne: createStateOperator(addOneMutably),
|
||
- updateOne: createStateOperator(updateOneMutably),
|
||
- upsertOne: createStateOperator(upsertOneMutably),
|
||
- setOne: createStateOperator(setOneMutably),
|
||
- setMany: createStateOperator(setManyMutably),
|
||
- setAll: createStateOperator(setAllMutably),
|
||
- addMany: createStateOperator(addManyMutably),
|
||
- updateMany: createStateOperator(updateManyMutably),
|
||
- upsertMany: createStateOperator(upsertManyMutably)
|
||
- };
|
||
-}
|
||
-// src/entities/create_adapter.ts
|
||
-function createEntityAdapter(options = {}) {
|
||
- const { selectId, sortComparer } = __spreadValues({
|
||
- sortComparer: false,
|
||
- selectId: (instance) => instance.id
|
||
- }, options);
|
||
- const stateFactory = createInitialStateFactory();
|
||
- const selectorsFactory = createSelectorsFactory();
|
||
- const stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId);
|
||
- return __spreadValues(__spreadValues(__spreadValues({
|
||
- selectId,
|
||
- sortComparer
|
||
- }, stateFactory), selectorsFactory), stateAdapter);
|
||
-}
|
||
-// src/nanoid.ts
|
||
-var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";
|
||
-var nanoid = (size = 21) => {
|
||
- let id = "";
|
||
- let i = size;
|
||
- while (i--) {
|
||
- id += urlAlphabet[Math.random() * 64 | 0];
|
||
- }
|
||
- return id;
|
||
-};
|
||
-// src/createAsyncThunk.ts
|
||
-var commonProperties = [
|
||
- "name",
|
||
- "message",
|
||
- "stack",
|
||
- "code"
|
||
-];
|
||
-var RejectWithValue = class {
|
||
- constructor(payload, meta) {
|
||
- this.payload = payload;
|
||
- this.meta = meta;
|
||
- }
|
||
-};
|
||
-var FulfillWithMeta = class {
|
||
- constructor(payload, meta) {
|
||
- this.payload = payload;
|
||
- this.meta = meta;
|
||
- }
|
||
-};
|
||
-var miniSerializeError = (value) => {
|
||
- if (typeof value === "object" && value !== null) {
|
||
- const simpleError = {};
|
||
- for (const property of commonProperties) {
|
||
- if (typeof value[property] === "string") {
|
||
- simpleError[property] = value[property];
|
||
- }
|
||
- }
|
||
- return simpleError;
|
||
- }
|
||
- return { message: String(value) };
|
||
-};
|
||
-function createAsyncThunk(typePrefix, payloadCreator, options) {
|
||
- const fulfilled = createAction(typePrefix + "/fulfilled", (payload, requestId, arg, meta) => ({
|
||
- payload,
|
||
- meta: __spreadProps(__spreadValues({}, meta || {}), {
|
||
- arg,
|
||
- requestId,
|
||
- requestStatus: "fulfilled"
|
||
- })
|
||
- }));
|
||
- const pending = createAction(typePrefix + "/pending", (requestId, arg, meta) => ({
|
||
- payload: void 0,
|
||
- meta: __spreadProps(__spreadValues({}, meta || {}), {
|
||
- arg,
|
||
- requestId,
|
||
- requestStatus: "pending"
|
||
- })
|
||
- }));
|
||
- const rejected = createAction(typePrefix + "/rejected", (error, requestId, arg, payload, meta) => ({
|
||
- payload,
|
||
- error: (options && options.serializeError || miniSerializeError)(error || "Rejected"),
|
||
- meta: __spreadProps(__spreadValues({}, meta || {}), {
|
||
- arg,
|
||
- requestId,
|
||
- rejectedWithValue: !!payload,
|
||
- requestStatus: "rejected",
|
||
- aborted: (error == null ? void 0 : error.name) === "AbortError",
|
||
- condition: (error == null ? void 0 : error.name) === "ConditionError"
|
||
- })
|
||
- }));
|
||
- let displayedWarning = false;
|
||
- const AC = typeof AbortController !== "undefined" ? AbortController : class {
|
||
- constructor() {
|
||
- this.signal = {
|
||
- aborted: false,
|
||
- addEventListener() {
|
||
- },
|
||
- dispatchEvent() {
|
||
- return false;
|
||
- },
|
||
- onabort() {
|
||
- },
|
||
- removeEventListener() {
|
||
- }
|
||
- };
|
||
- }
|
||
- abort() {
|
||
- if (process.env.NODE_ENV !== "production") {
|
||
- if (!displayedWarning) {
|
||
- displayedWarning = true;
|
||
- console.info(`This platform does not implement AbortController.
|
||
-If you want to use the AbortController to react to \`abort\` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.`);
|
||
- }
|
||
- }
|
||
- }
|
||
- };
|
||
- function actionCreator(arg) {
|
||
- return (dispatch, getState, extra) => {
|
||
- var _a;
|
||
- const requestId = ((_a = options == null ? void 0 : options.idGenerator) != null ? _a : nanoid)();
|
||
- const abortController = new AC();
|
||
- let abortReason;
|
||
- const abortedPromise = new Promise((_, reject) => abortController.signal.addEventListener("abort", () => reject({ name: "AbortError", message: abortReason || "Aborted" })));
|
||
- let started = false;
|
||
- function abort(reason) {
|
||
- if (started) {
|
||
- abortReason = reason;
|
||
- abortController.abort();
|
||
- }
|
||
- }
|
||
- const promise = async function () {
|
||
- var _a2;
|
||
- let finalAction;
|
||
- try {
|
||
- if (options && options.condition && options.condition(arg, { getState, extra }) === false) {
|
||
- throw {
|
||
- name: "ConditionError",
|
||
- message: "Aborted due to condition callback returning false."
|
||
- };
|
||
- }
|
||
- started = true;
|
||
- dispatch(pending(requestId, arg, (_a2 = options == null ? void 0 : options.getPendingMeta) == null ? void 0 : _a2.call(options, { requestId, arg }, { getState, extra })));
|
||
- finalAction = await Promise.race([
|
||
- abortedPromise,
|
||
- Promise.resolve(payloadCreator(arg, {
|
||
- dispatch,
|
||
- getState,
|
||
- extra,
|
||
- requestId,
|
||
- signal: abortController.signal,
|
||
- rejectWithValue: (value, meta) => {
|
||
- return new RejectWithValue(value, meta);
|
||
- },
|
||
- fulfillWithValue: (value, meta) => {
|
||
- return new FulfillWithMeta(value, meta);
|
||
- }
|
||
- })).then((result) => {
|
||
- if (result instanceof RejectWithValue) {
|
||
- throw result;
|
||
- }
|
||
- if (result instanceof FulfillWithMeta) {
|
||
- return fulfilled(result.payload, requestId, arg, result.meta);
|
||
- }
|
||
- return fulfilled(result, requestId, arg);
|
||
- })
|
||
- ]);
|
||
- }
|
||
- catch (err) {
|
||
- finalAction = err instanceof RejectWithValue ? rejected(null, requestId, arg, err.payload, err.meta) : rejected(err, requestId, arg);
|
||
- }
|
||
- const skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;
|
||
- if (!skipDispatch) {
|
||
- dispatch(finalAction);
|
||
- }
|
||
- return finalAction;
|
||
- }();
|
||
- return Object.assign(promise, {
|
||
- abort,
|
||
- requestId,
|
||
- arg,
|
||
- unwrap() {
|
||
- return promise.then(unwrapResult);
|
||
- }
|
||
- });
|
||
- };
|
||
- }
|
||
- return Object.assign(actionCreator, {
|
||
- pending,
|
||
- rejected,
|
||
- fulfilled,
|
||
- typePrefix
|
||
- });
|
||
-}
|
||
-function unwrapResult(action) {
|
||
- if (action.meta && action.meta.rejectedWithValue) {
|
||
- throw action.payload;
|
||
- }
|
||
- if (action.error) {
|
||
- throw action.error;
|
||
- }
|
||
- return action.payload;
|
||
-}
|
||
-// src/tsHelpers.ts
|
||
-var hasMatchFunction = (v) => {
|
||
- return v && typeof v.match === "function";
|
||
-};
|
||
-// src/matchers.ts
|
||
-var matches = (matcher, action) => {
|
||
- if (hasMatchFunction(matcher)) {
|
||
- return matcher.match(action);
|
||
- }
|
||
- else {
|
||
- return matcher(action);
|
||
- }
|
||
-};
|
||
-function isAnyOf(...matchers) {
|
||
- return (action) => {
|
||
- return matchers.some((matcher) => matches(matcher, action));
|
||
- };
|
||
-}
|
||
-function isAllOf(...matchers) {
|
||
- return (action) => {
|
||
- return matchers.every((matcher) => matches(matcher, action));
|
||
- };
|
||
-}
|
||
-function hasExpectedRequestMetadata(action, validStatus) {
|
||
- if (!action || !action.meta)
|
||
- return false;
|
||
- const hasValidRequestId = typeof action.meta.requestId === "string";
|
||
- const hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;
|
||
- return hasValidRequestId && hasValidRequestStatus;
|
||
-}
|
||
-function isAsyncThunkArray(a) {
|
||
- return typeof a[0] === "function" && "pending" in a[0] && "fulfilled" in a[0] && "rejected" in a[0];
|
||
-}
|
||
-function isPending(...asyncThunks) {
|
||
- if (asyncThunks.length === 0) {
|
||
- return (action) => hasExpectedRequestMetadata(action, ["pending"]);
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isPending()(asyncThunks[0]);
|
||
- }
|
||
- return (action) => {
|
||
- const matchers = asyncThunks.map((asyncThunk) => asyncThunk.pending);
|
||
- const combinedMatcher = isAnyOf(...matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
-}
|
||
-function isRejected(...asyncThunks) {
|
||
- if (asyncThunks.length === 0) {
|
||
- return (action) => hasExpectedRequestMetadata(action, ["rejected"]);
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isRejected()(asyncThunks[0]);
|
||
- }
|
||
- return (action) => {
|
||
- const matchers = asyncThunks.map((asyncThunk) => asyncThunk.rejected);
|
||
- const combinedMatcher = isAnyOf(...matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
-}
|
||
-function isRejectedWithValue(...asyncThunks) {
|
||
- const hasFlag = (action) => {
|
||
- return action && action.meta && action.meta.rejectedWithValue;
|
||
- };
|
||
- if (asyncThunks.length === 0) {
|
||
- return (action) => {
|
||
- const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isRejectedWithValue()(asyncThunks[0]);
|
||
- }
|
||
- return (action) => {
|
||
- const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
-}
|
||
-function isFulfilled(...asyncThunks) {
|
||
- if (asyncThunks.length === 0) {
|
||
- return (action) => hasExpectedRequestMetadata(action, ["fulfilled"]);
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isFulfilled()(asyncThunks[0]);
|
||
- }
|
||
- return (action) => {
|
||
- const matchers = asyncThunks.map((asyncThunk) => asyncThunk.fulfilled);
|
||
- const combinedMatcher = isAnyOf(...matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
-}
|
||
-function isAsyncThunkAction(...asyncThunks) {
|
||
- if (asyncThunks.length === 0) {
|
||
- return (action) => hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]);
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isAsyncThunkAction()(asyncThunks[0]);
|
||
- }
|
||
- return (action) => {
|
||
- const matchers = [];
|
||
- for (const asyncThunk of asyncThunks) {
|
||
- matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled);
|
||
- }
|
||
- const combinedMatcher = isAnyOf(...matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
-}
|
||
-// src/index.ts
|
||
-enableES5();
|
||
-export { MiddlewareArray, configureStore, createAction, createAsyncThunk, createDraftSafeSelector, createEntityAdapter, createImmutableStateInvariantMiddleware, default2 as createNextState, createReducer, createSelector2 as createSelector, createSerializableStateInvariantMiddleware, createSlice, current2 as current, findNonSerializableValue, freeze, getDefaultMiddleware, getType, isAllOf, isAnyOf, isAsyncThunkAction, isDraft4 as isDraft, isFulfilled, isImmutableDefault, isPending, isPlain, isPlainObject, isRejected, isRejectedWithValue, miniSerializeError, nanoid, original, unwrapResult };
|
||
-//# sourceMappingURL=redux-toolkit.modern.js.map
|
||
\ No newline at end of file
|
||
diff --git a/dist/redux-toolkit.modern.js.map b/dist/redux-toolkit.modern.js.map
|
||
deleted file mode 100644
|
||
index 11cdaea68a73cb274c51b189a168037c36e32ead..0000000000000000000000000000000000000000
|
||
--- a/dist/redux-toolkit.modern.js.map
|
||
+++ /dev/null
|
||
@@ -1 +0,0 @@
|
||
-{"version":3,"sources":["../src/index.ts","../src/createDraftSafeSelector.ts","../src/configureStore.ts","../src/devtoolsExtension.ts","../src/isPlainObject.ts","../src/getDefaultMiddleware.ts","../src/utils.ts","../src/immutableStateInvariantMiddleware.ts","../src/serializableStateInvariantMiddleware.ts","../src/createAction.ts","../src/createReducer.ts","../src/mapBuilders.ts","../src/createSlice.ts","../src/entities/entity_state.ts","../src/entities/state_selectors.ts","../src/entities/state_adapter.ts","../src/entities/utils.ts","../src/entities/unsorted_state_adapter.ts","../src/entities/sorted_state_adapter.ts","../src/entities/create_adapter.ts","../src/nanoid.ts","../src/createAsyncThunk.ts","../src/tsHelpers.ts","../src/matchers.ts","redux-toolkit.modern.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAA,EAAA,SAAA,EAAA,MAAA,OAAA,CAAA;AACA,cAAA,OAAA,CAAA;AACA,OAAA,EAAA,OAAA,IAAA,QAAA,EAAA,OAAA,IAAA,QAAA,EAAA,MAAA,EAAA,QAAA,EAAA,OAAA,IAAA,QAAA,EAAA,MAAA,OAAA,CAAA;AAQA,OAAA,EAAA,cAAA,IAAA,eAAA,EAAA,MAAA,UAAA,CAAA;;ACVA,OAAA,EAAA,OAAA,EAAA,OAAA,EAAA,MAAA,OAAA,CAAA;AACA,OAAA,EAAA,cAAA,EAAA,MAAA,UAAA,CAAA;AASO,IAAM,uBAAA,GAAiD,CAAA,GACzD,IAAA,EAAA,EAAA;IAEH,MAAM,QAAA,GAAY,cAAA,CAAuB,GAAG,IAAA,CAAA,CAAA;IAC5C,MAAM,eAAA,GAAkB,CAAC,KAAA,EAAA,GAAmB,IAAA,EAAA,EAAA,CAC1C,QAAA,CAAS,OAAA,CAAQ,KAAA,CAA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A,EAAa;YACpC,QAAA,CAAS,IAAA,CACP,UAAA,CAAW,OAAA,EACX,UAAA,CAAW,QAAA,EACX,UAAA,CAAW,SAAA,CAAA,CAAA;SAAA;QAIf,MAAM,eAAA,GAAkB,OAAA,CAAQ,GAAG,QAAA,CAAA,CAAA;QAEnC,OAAO,eAAA,CAAgB,MAAA,CAAA,CAAA;IAAA,CAAA,CAAA;AAAA,CAAA;;AvBhZ3B,SAAA,EAAA,CAAA","sourcesContent":["import { enableES5 } from 'immer'\r\nexport * from 'redux'\r\nexport {\r\n default as createNextState,\r\n current,\r\n freeze,\r\n original,\r\n isDraft,\r\n} from 'immer'\r\nexport type { Draft } from 'immer'\r\nexport { createSelector } from 'reselect'\r\nexport type {\r\n Selector,\r\n OutputParametricSelector,\r\n OutputSelector,\r\n ParametricSelector,\r\n} from 'reselect'\r\nexport { createDraftSafeSelector } from './createDraftSafeSelector'\r\nexport type { ThunkAction, ThunkDispatch } from 'redux-thunk'\r\n\r\n// We deliberately enable Immer's ES5 support, on the grounds that\r\n// we assume RTK will be used with React Native and other Proxy-less\r\n// environments. In addition, that's how Immer 4 behaved, and since\r\n// we want to ship this in an RTK minor, we should keep the same behavior.\r\nenableES5()\r\n\r\nexport {\r\n // js\r\n configureStore,\r\n} from './configureStore'\r\nexport type {\r\n // types\r\n ConfigureEnhancersCallback,\r\n ConfigureStoreOptions,\r\n EnhancedStore,\r\n} from './configureStore'\r\nexport {\r\n // js\r\n createAction,\r\n getType,\r\n} from './createAction'\r\nexport type {\r\n // types\r\n PayloadAction,\r\n PayloadActionCreator,\r\n ActionCreatorWithNonInferrablePayload,\r\n ActionCreatorWithOptionalPayload,\r\n ActionCreatorWithPayload,\r\n ActionCreatorWithoutPayload,\r\n ActionCreatorWithPreparedPayload,\r\n PrepareAction,\r\n} from './createAction'\r\nexport {\r\n // js\r\n createReducer,\r\n} from './createReducer'\r\nexport type {\r\n // types\r\n Actions,\r\n CaseReducer,\r\n CaseReducers,\r\n} from './createReducer'\r\nexport {\r\n // js\r\n createSlice,\r\n} from './createSlice'\r\n\r\nexport type {\r\n // types\r\n CreateSliceOptions,\r\n Slice,\r\n CaseReducerActions,\r\n SliceCaseReducers,\r\n ValidateSliceCaseReducers,\r\n CaseReducerWithPrepare,\r\n SliceActionCreator,\r\n} from './createSlice'\r\nexport {\r\n // js\r\n createImmutableStateInvariantMiddleware,\r\n isImmutableDefault,\r\n} from './immutableStateInvariantMiddleware'\r\nexport type {\r\n // types\r\n ImmutableStateInvariantMiddlewareOptions,\r\n} from './immutableStateInvariantMiddleware'\r\nexport {\r\n // js\r\n createSerializableStateInvariantMiddleware,\r\n findNonSerializableValue,\r\n isPlain,\r\n} from './serializableStateInvariantMiddleware'\r\nexport type {\r\n // types\r\n SerializableStateInvariantMiddlewareOptions,\r\n} from './serializableStateInvariantMiddleware'\r\nexport {\r\n // js\r\n getDefaultMiddleware,\r\n} from './getDefaultMiddleware'\r\nexport type {\r\n // types\r\n ActionReducerMapBuilder,\r\n} from './mapBuilders'\r\nexport { MiddlewareArray } from './utils'\r\n\r\nexport { createEntityAdapter } from './entities/create_adapter'\r\nexport type {\r\n Dictionary,\r\n EntityState,\r\n EntityAdapter,\r\n EntitySelectors,\r\n EntityStateAdapter,\r\n EntityId,\r\n Update,\r\n IdSelector,\r\n Comparer,\r\n} from './entities/models'\r\n\r\nexport {\r\n createAsyncThunk,\r\n unwrapResult,\r\n miniSerializeError,\r\n} from './createAsyncThunk'\r\nexport type {\r\n AsyncThunk,\r\n AsyncThunkOptions,\r\n AsyncThunkAction,\r\n AsyncThunkPayloadCreatorReturnValue,\r\n AsyncThunkPayloadCreator,\r\n SerializedError,\r\n} from './createAsyncThunk'\r\n\r\nexport {\r\n // js\r\n isAllOf,\r\n isAnyOf,\r\n isPending,\r\n isRejected,\r\n isFulfilled,\r\n isAsyncThunkAction,\r\n isRejectedWithValue,\r\n} from './matchers'\r\nexport type {\r\n // types\r\n ActionMatchingAllOf,\r\n ActionMatchingAnyOf,\r\n} from './matchers'\r\n\r\nexport { nanoid } from './nanoid'\r\n\r\nexport { default as isPlainObject } from './isPlainObject'\r\n","import { current, isDraft } from 'immer'\r\nimport { createSelector } from 'reselect'\r\n\r\n/**\r\n * \"Draft-Safe\" version of `reselect`'s `createSelector`:\r\n * If an `immer`-drafted object is passed into the resulting selector's first argument,\r\n * the selector will act on the current draft value, instead of returning a cached value\r\n * that might be possibly outdated if the draft has been modified since.\r\n * @public\r\n */\r\nexport const createDraftSafeSelector: typeof createSelector = (\r\n ...args: unknown[]\r\n) => {\r\n const selector = (createSelector as any)(...args)\r\n const wrappedSelector = (value: unknown, ...rest: unknown[]) =>\r\n selector(isDraft(value) ? current(value) : value, ...rest)\r\n return wrappedSelector as any\r\n}\r\n","import type {\r\n Reducer,\r\n ReducersMapObject,\r\n Middleware,\r\n Action,\r\n AnyAction,\r\n StoreEnhancer,\r\n Store,\r\n Dispatch,\r\n PreloadedState,\r\n CombinedState,\r\n} from 'redux'\r\nimport { createStore, compose, applyMiddleware, combineReducers } from 'redux'\r\nimport type { EnhancerOptions as DevToolsOptions } from './devtoolsExtension'\r\nimport { composeWithDevTools } from './devtoolsExtension'\r\n\r\nimport isPlainObject from './isPlainObject'\r\nimport type {\r\n ThunkMiddlewareFor,\r\n CurriedGetDefaultMiddleware,\r\n} from './getDefaultMiddleware'\r\nimport { curryGetDefaultMiddleware } from './getDefaultMiddleware'\r\nimport type { DispatchForMiddlewares, NoInfer } from './tsHelpers'\r\n\r\nconst IS_PRODUCTION = process.env.NODE_ENV === 'production'\r\n\r\n/**\r\n * Callback function type, to be used in `ConfigureStoreOptions.enhancers`\r\n *\r\n * @public\r\n */\r\nexport type ConfigureEnhancersCallback = (\r\n defaultEnhancers: readonly StoreEnhancer[]\r\n) => StoreEnhancer[]\r\n\r\n/**\r\n * Options for `configureStore()`.\r\n *\r\n * @public\r\n */\r\nexport interface ConfigureStoreOptions<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares<S> = Middlewares<S>\r\n> {\r\n /**\r\n * A single reducer function that will be used as the root reducer, or an\r\n * object of slice reducers that will be passed to `combineReducers()`.\r\n */\r\n reducer: Reducer<S, A> | ReducersMapObject<S, A>\r\n\r\n /**\r\n * An array of Redux middleware to install. If not supplied, defaults to\r\n * the set of middleware returned by `getDefaultMiddleware()`.\r\n */\r\n middleware?: ((getDefaultMiddleware: CurriedGetDefaultMiddleware<S>) => M) | M\r\n\r\n /**\r\n * Whether to enable Redux DevTools integration. Defaults to `true`.\r\n *\r\n * Additional configuration can be done by passing Redux DevTools options\r\n */\r\n devTools?: boolean | DevToolsOptions\r\n\r\n /**\r\n * The initial state, same as Redux's createStore.\r\n * You may optionally specify it to hydrate the state\r\n * from the server in universal apps, or to restore a previously serialized\r\n * user session. If you use `combineReducers()` to produce the root reducer\r\n * function (either directly or indirectly by passing an object as `reducer`),\r\n * this must be an object with the same shape as the reducer map keys.\r\n */\r\n /* \r\n Not 100% correct but the best approximation we can get:\r\n - if S is a `CombinedState` applying a second `CombinedState` on it does not change anything.\r\n - if it is not, there could be two cases:\r\n - `ReducersMapObject<S, A>` is being passed in. In this case, we will call `combineReducers` on it and `CombinedState<S>` is correct\r\n - `Reducer<S, A>` is being passed in. In this case, actually `CombinedState<S>` is wrong and `S` would be correct.\r\n As we cannot distinguish between those two cases without adding another generic paramter, \r\n we just make the pragmatic assumption that the latter almost never happens.\r\n */\r\n preloadedState?: PreloadedState<CombinedState<NoInfer<S>>>\r\n\r\n /**\r\n * The store enhancers to apply. See Redux's `createStore()`.\r\n * All enhancers will be included before the DevTools Extension enhancer.\r\n * If you need to customize the order of enhancers, supply a callback\r\n * function that will receive the original array (ie, `[applyMiddleware]`),\r\n * and should return a new array (such as `[applyMiddleware, offline]`).\r\n * If you only need to add middleware, you can use the `middleware` parameter instead.\r\n */\r\n enhancers?: StoreEnhancer[] | ConfigureEnhancersCallback\r\n}\r\n\r\ntype Middlewares<S> = ReadonlyArray<Middleware<{}, S>>\r\n\r\n/**\r\n * A Redux store returned by `configureStore()`. Supports dispatching\r\n * side-effectful _thunks_ in addition to plain actions.\r\n *\r\n * @public\r\n */\r\nexport interface EnhancedStore<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares<S> = Middlewares<S>\r\n> extends Store<S, A> {\r\n /**\r\n * The `dispatch` method of your store, enhanced by all its middlewares.\r\n *\r\n * @inheritdoc\r\n */\r\n dispatch: DispatchForMiddlewares<M> & Dispatch<A>\r\n}\r\n\r\n/**\r\n * A friendly abstraction over the standard Redux `createStore()` function.\r\n *\r\n * @param config The store configuration.\r\n * @returns A configured Redux store.\r\n *\r\n * @public\r\n */\r\nexport function configureStore<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares<S> = [ThunkMiddlewareFor<S>]\r\n>(options: ConfigureStoreOptions<S, A, M>): EnhancedStore<S, A, M> {\r\n const curriedGetDefaultMiddleware = curryGetDefaultMiddleware<S>()\r\n\r\n const {\r\n reducer = undefined,\r\n middleware = curriedGetDefaultMiddleware(),\r\n devTools = true,\r\n preloadedState = undefined,\r\n enhancers = undefined,\r\n } = options || {}\r\n\r\n let rootReducer: Reducer<S, A>\r\n\r\n if (typeof reducer === 'function') {\r\n rootReducer = reducer\r\n } else if (isPlainObject(reducer)) {\r\n rootReducer = combineReducers(reducer)\r\n } else {\r\n throw new Error(\r\n '\"reducer\" is a required argument, and must be a function or an object of functions that can be passed to combineReducers'\r\n )\r\n }\r\n\r\n let finalMiddleware = middleware\r\n if (typeof finalMiddleware === 'function') {\r\n finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware)\r\n\r\n if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {\r\n throw new Error(\r\n 'when using a middleware builder function, an array of middleware must be returned'\r\n )\r\n }\r\n }\r\n if (\r\n !IS_PRODUCTION &&\r\n finalMiddleware.some((item) => typeof item !== 'function')\r\n ) {\r\n throw new Error(\r\n 'each middleware provided to configureStore must be a function'\r\n )\r\n }\r\n\r\n const middlewareEnhancer = applyMiddleware(...finalMiddleware)\r\n\r\n let finalCompose = compose\r\n\r\n if (devTools) {\r\n finalCompose = composeWithDevTools({\r\n // Enable capture of stack traces for dispatched Redux actions\r\n trace: !IS_PRODUCTION,\r\n ...(typeof devTools === 'object' && devTools),\r\n })\r\n }\r\n\r\n let storeEnhancers: StoreEnhancer[] = [middlewareEnhancer]\r\n\r\n if (Array.isArray(enhancers)) {\r\n storeEnhancers = [middlewareEnhancer, ...enhancers]\r\n } else if (typeof enhancers === 'function') {\r\n storeEnhancers = enhancers(storeEnhancers)\r\n }\r\n\r\n const composedEnhancer = finalCompose(...storeEnhancers) as any\r\n\r\n return createStore(rootReducer, preloadedState, composedEnhancer)\r\n}\r\n","import type { Action, ActionCreator, StoreEnhancer } from 'redux'\r\nimport { compose } from 'redux'\r\n\r\n/**\r\n * @public\r\n */\r\nexport interface EnhancerOptions {\r\n /**\r\n * the instance name to be showed on the monitor page. Default value is `document.title`.\r\n * If not specified and there's no document title, it will consist of `tabId` and `instanceId`.\r\n */\r\n name?: string\r\n /**\r\n * action creators functions to be available in the Dispatcher.\r\n */\r\n actionCreators?: ActionCreator<any>[] | { [key: string]: ActionCreator<any> }\r\n /**\r\n * if more than one action is dispatched in the indicated interval, all new actions will be collected and sent at once.\r\n * It is the joint between performance and speed. When set to `0`, all actions will be sent instantly.\r\n * Set it to a higher value when experiencing perf issues (also `maxAge` to a lower value).\r\n *\r\n * @default 500 ms.\r\n */\r\n latency?: number\r\n /**\r\n * (> 1) - maximum allowed actions to be stored in the history tree. The oldest actions are removed once maxAge is reached. It's critical for performance.\r\n *\r\n * @default 50\r\n */\r\n maxAge?: number\r\n /**\r\n * See detailed documentation at http://extension.remotedev.io/docs/API/Arguments.html#serialize\r\n */\r\n serialize?:\r\n | boolean\r\n | {\r\n options?:\r\n | boolean\r\n | {\r\n date?: boolean\r\n regex?: boolean\r\n undefined?: boolean\r\n error?: boolean\r\n symbol?: boolean\r\n map?: boolean\r\n set?: boolean\r\n function?: boolean | Function\r\n }\r\n replacer?: (key: string, value: unknown) => unknown\r\n reviver?: (key: string, value: unknown) => unknown\r\n immutable?: unknown\r\n refs?: unknown[]\r\n }\r\n /**\r\n * function which takes `action` object and id number as arguments, and should return `action` object back.\r\n */\r\n actionSanitizer?: <A extends Action>(action: A, id: number) => A\r\n /**\r\n * function which takes `state` object and index as arguments, and should return `state` object back.\r\n */\r\n stateSanitizer?: <S>(state: S, index: number) => S\r\n /**\r\n * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\r\n * If `actionsWhitelist` specified, `actionsBlacklist` is ignored.\r\n */\r\n actionsBlacklist?: string | string[]\r\n /**\r\n * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\r\n * If `actionsWhitelist` specified, `actionsBlacklist` is ignored.\r\n */\r\n actionsWhitelist?: string | string[]\r\n /**\r\n * called for every action before sending, takes `state` and `action` object, and returns `true` in case it allows sending the current data to the monitor.\r\n * Use it as a more advanced version of `actionsBlacklist`/`actionsWhitelist` parameters.\r\n */\r\n predicate?: <S, A extends Action>(state: S, action: A) => boolean\r\n /**\r\n * if specified as `false`, it will not record the changes till clicking on `Start recording` button.\r\n * Available only for Redux enhancer, for others use `autoPause`.\r\n *\r\n * @default true\r\n */\r\n shouldRecordChanges?: boolean\r\n /**\r\n * if specified, whenever clicking on `Pause recording` button and there are actions in the history log, will add this action type.\r\n * If not specified, will commit when paused. Available only for Redux enhancer.\r\n *\r\n * @default \"@@PAUSED\"\"\r\n */\r\n pauseActionType?: string\r\n /**\r\n * auto pauses when the extension’s window is not opened, and so has zero impact on your app when not in use.\r\n * Not available for Redux enhancer (as it already does it but storing the data to be sent).\r\n *\r\n * @default false\r\n */\r\n autoPause?: boolean\r\n /**\r\n * if specified as `true`, it will not allow any non-monitor actions to be dispatched till clicking on `Unlock changes` button.\r\n * Available only for Redux enhancer.\r\n *\r\n * @default false\r\n */\r\n shouldStartLocked?: boolean\r\n /**\r\n * if set to `false`, will not recompute the states on hot reloading (or on replacing the reducers). Available only for Redux enhancer.\r\n *\r\n * @default true\r\n */\r\n shouldHotReload?: boolean\r\n /**\r\n * if specified as `true`, whenever there's an exception in reducers, the monitors will show the error message, and next actions will not be dispatched.\r\n *\r\n * @default false\r\n */\r\n shouldCatchErrors?: boolean\r\n /**\r\n * If you want to restrict the extension, specify the features you allow.\r\n * If not specified, all of the features are enabled. When set as an object, only those included as `true` will be allowed.\r\n * Note that except `true`/`false`, `import` and `export` can be set as `custom` (which is by default for Redux enhancer), meaning that the importing/exporting occurs on the client side.\r\n * Otherwise, you'll get/set the data right from the monitor part.\r\n */\r\n features?: {\r\n /**\r\n * start/pause recording of dispatched actions\r\n */\r\n pause?: boolean\r\n /**\r\n * lock/unlock dispatching actions and side effects\r\n */\r\n lock?: boolean\r\n /**\r\n * persist states on page reloading\r\n */\r\n persist?: boolean\r\n /**\r\n * export history of actions in a file\r\n */\r\n export?: boolean | 'custom'\r\n /**\r\n * import history of actions from a file\r\n */\r\n import?: boolean | 'custom'\r\n /**\r\n * jump back and forth (time travelling)\r\n */\r\n jump?: boolean\r\n /**\r\n * skip (cancel) actions\r\n */\r\n skip?: boolean\r\n /**\r\n * drag and drop actions in the history list\r\n */\r\n reorder?: boolean\r\n /**\r\n * dispatch custom actions or action creators\r\n */\r\n dispatch?: boolean\r\n /**\r\n * generate tests for the selected actions\r\n */\r\n test?: boolean\r\n }\r\n /**\r\n * Set to true or a stacktrace-returning function to record call stack traces for dispatched actions.\r\n * Defaults to false.\r\n */\r\n trace?: boolean | (<A extends Action>(action: A) => string)\r\n /**\r\n * The maximum number of stack trace entries to record per action. Defaults to 10.\r\n */\r\n traceLimit?: number\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport const composeWithDevTools: {\r\n (options: EnhancerOptions): typeof compose\r\n <StoreExt>(...funcs: Array<StoreEnhancer<StoreExt>>): StoreEnhancer<StoreExt>\r\n} =\r\n typeof window !== 'undefined' &&\r\n (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\r\n ? (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\r\n : function () {\r\n if (arguments.length === 0) return undefined\r\n if (typeof arguments[0] === 'object') return compose\r\n return compose.apply(null, arguments as any as Function[])\r\n }\r\n\r\n/**\r\n * @public\r\n */\r\nexport const devToolsEnhancer: {\r\n (options: EnhancerOptions): StoreEnhancer<any>\r\n} =\r\n typeof window !== 'undefined' && (window as any).__REDUX_DEVTOOLS_EXTENSION__\r\n ? (window as any).__REDUX_DEVTOOLS_EXTENSION__\r\n : function () {\r\n return function (noop) {\r\n return noop\r\n }\r\n }\r\n","/**\r\n * Returns true if the passed value is \"plain\" object, i.e. an object whose\r\n * prototype is the root `Object.prototype`. This includes objects created\r\n * using object literals, but not for instance for class instances.\r\n *\r\n * @param {any} value The value to inspect.\r\n * @returns {boolean} True if the argument appears to be a plain object.\r\n *\r\n * @public\r\n */\r\nexport default function isPlainObject(value: unknown): value is object {\r\n if (typeof value !== 'object' || value === null) return false\r\n\r\n let proto = value\r\n while (Object.getPrototypeOf(proto) !== null) {\r\n proto = Object.getPrototypeOf(proto)\r\n }\r\n\r\n return Object.getPrototypeOf(value) === proto\r\n}\r\n","import type { Middleware, AnyAction } from 'redux'\r\nimport type { ThunkMiddleware } from 'redux-thunk'\r\nimport thunkMiddleware from 'redux-thunk'\r\nimport type { ImmutableStateInvariantMiddlewareOptions } from './immutableStateInvariantMiddleware'\r\n/* PROD_START_REMOVE_UMD */\r\nimport { createImmutableStateInvariantMiddleware } from './immutableStateInvariantMiddleware'\r\n/* PROD_STOP_REMOVE_UMD */\r\n\r\nimport type { SerializableStateInvariantMiddlewareOptions } from './serializableStateInvariantMiddleware'\r\nimport { createSerializableStateInvariantMiddleware } from './serializableStateInvariantMiddleware'\r\nimport { MiddlewareArray } from './utils'\r\n\r\nfunction isBoolean(x: any): x is boolean {\r\n return typeof x === 'boolean'\r\n}\r\n\r\ninterface ThunkOptions<E = any> {\r\n extraArgument: E\r\n}\r\n\r\ninterface GetDefaultMiddlewareOptions {\r\n thunk?: boolean | ThunkOptions\r\n immutableCheck?: boolean | ImmutableStateInvariantMiddlewareOptions\r\n serializableCheck?: boolean | SerializableStateInvariantMiddlewareOptions\r\n}\r\n\r\nexport type ThunkMiddlewareFor<\r\n S,\r\n O extends GetDefaultMiddlewareOptions = {}\r\n> = O extends {\r\n thunk: false\r\n}\r\n ? never\r\n : O extends { thunk: { extraArgument: infer E } }\r\n ? ThunkMiddleware<S, AnyAction, E>\r\n :\r\n | ThunkMiddleware<S, AnyAction, null> //The ThunkMiddleware with a `null` ExtraArgument is here to provide backwards-compatibility.\r\n | ThunkMiddleware<S, AnyAction>\r\n\r\nexport type CurriedGetDefaultMiddleware<S = any> = <\r\n O extends Partial<GetDefaultMiddlewareOptions> = {\r\n thunk: true\r\n immutableCheck: true\r\n serializableCheck: true\r\n }\r\n>(\r\n options?: O\r\n) => MiddlewareArray<Middleware<{}, S> | ThunkMiddlewareFor<S, O>>\r\n\r\nexport function curryGetDefaultMiddleware<\r\n S = any\r\n>(): CurriedGetDefaultMiddleware<S> {\r\n return function curriedGetDefaultMiddleware(options) {\r\n return getDefaultMiddleware(options)\r\n }\r\n}\r\n\r\n/**\r\n * Returns any array containing the default middleware installed by\r\n * `configureStore()`. Useful if you want to configure your store with a custom\r\n * `middleware` array but still keep the default set.\r\n *\r\n * @return The default middleware used by `configureStore()`.\r\n *\r\n * @public\r\n *\r\n * @deprecated Prefer to use the callback notation for the `middleware` option in `configureStore`\r\n * to access a pre-typed `getDefaultMiddleware` instead.\r\n */\r\nexport function getDefaultMiddleware<\r\n S = any,\r\n O extends Partial<GetDefaultMiddlewareOptions> = {\r\n thunk: true\r\n immutableCheck: true\r\n serializableCheck: true\r\n }\r\n>(\r\n options: O = {} as O\r\n): MiddlewareArray<Middleware<{}, S> | ThunkMiddlewareFor<S, O>> {\r\n const {\r\n thunk = true,\r\n immutableCheck = true,\r\n serializableCheck = true,\r\n } = options\r\n\r\n let middlewareArray: Middleware<{}, S>[] = new MiddlewareArray()\r\n\r\n if (thunk) {\r\n if (isBoolean(thunk)) {\r\n middlewareArray.push(thunkMiddleware)\r\n } else {\r\n middlewareArray.push(\r\n thunkMiddleware.withExtraArgument(thunk.extraArgument)\r\n )\r\n }\r\n }\r\n\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (immutableCheck) {\r\n /* PROD_START_REMOVE_UMD */\r\n let immutableOptions: ImmutableStateInvariantMiddlewareOptions = {}\r\n\r\n if (!isBoolean(immutableCheck)) {\r\n immutableOptions = immutableCheck\r\n }\r\n\r\n middlewareArray.unshift(\r\n createImmutableStateInvariantMiddleware(immutableOptions)\r\n )\r\n /* PROD_STOP_REMOVE_UMD */\r\n }\r\n\r\n if (serializableCheck) {\r\n let serializableOptions: SerializableStateInvariantMiddlewareOptions = {}\r\n\r\n if (!isBoolean(serializableCheck)) {\r\n serializableOptions = serializableCheck\r\n }\r\n\r\n middlewareArray.push(\r\n createSerializableStateInvariantMiddleware(serializableOptions)\r\n )\r\n }\r\n }\r\n\r\n return middlewareArray as any\r\n}\r\n","import type { Middleware } from 'redux'\r\n\r\nexport function getTimeMeasureUtils(maxDelay: number, fnName: string) {\r\n let elapsed = 0\r\n return {\r\n measureTime<T>(fn: () => T): T {\r\n const started = Date.now()\r\n try {\r\n return fn()\r\n } finally {\r\n const finished = Date.now()\r\n elapsed += finished - started\r\n }\r\n },\r\n warnIfExceeded() {\r\n if (elapsed > maxDelay) {\r\n console.warn(`${fnName} took ${elapsed}ms, which is more than the warning threshold of ${maxDelay}ms. \r\nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\r\nIt is disabled in production builds, so you don't need to worry about that.`)\r\n }\r\n },\r\n }\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport class MiddlewareArray<\r\n Middlewares extends Middleware<any, any>\r\n> extends Array<Middlewares> {\r\n constructor(arrayLength?: number)\r\n constructor(...items: Middlewares[])\r\n constructor(...args: any[]) {\r\n super(...args)\r\n Object.setPrototypeOf(this, MiddlewareArray.prototype)\r\n }\r\n\r\n static get [Symbol.species]() {\r\n return MiddlewareArray as any\r\n }\r\n\r\n concat<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n items: AdditionalMiddlewares\r\n ): MiddlewareArray<Middlewares | AdditionalMiddlewares[number]>\r\n\r\n concat<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n ...items: AdditionalMiddlewares\r\n ): MiddlewareArray<Middlewares | AdditionalMiddlewares[number]>\r\n concat(...arr: any[]) {\r\n return super.concat.apply(this, arr)\r\n }\r\n\r\n prepend<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n items: AdditionalMiddlewares\r\n ): MiddlewareArray<AdditionalMiddlewares[number] | Middlewares>\r\n\r\n prepend<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n ...items: AdditionalMiddlewares\r\n ): MiddlewareArray<AdditionalMiddlewares[number] | Middlewares>\r\n\r\n prepend(...arr: any[]) {\r\n if (arr.length === 1 && Array.isArray(arr[0])) {\r\n return new MiddlewareArray(...arr[0].concat(this))\r\n }\r\n return new MiddlewareArray(...arr.concat(this))\r\n }\r\n}\r\n","import type { Middleware } from 'redux'\r\nimport { getTimeMeasureUtils } from './utils'\r\n\r\ntype EntryProcessor = (key: string, value: any) => any\r\n\r\nconst isProduction: boolean = process.env.NODE_ENV === 'production'\r\nconst prefix: string = 'Invariant failed'\r\n\r\n// Throw an error if the condition fails\r\n// Strip out error messages for production\r\n// > Not providing an inline default argument for message as the result is smaller\r\nfunction invariant(condition: any, message?: string) {\r\n if (condition) {\r\n return\r\n }\r\n // Condition not passed\r\n\r\n // In production we strip the message but still throw\r\n if (isProduction) {\r\n throw new Error(prefix)\r\n }\r\n\r\n // When not in production we allow the message to pass through\r\n // *This block will be removed in production builds*\r\n throw new Error(`${prefix}: ${message || ''}`)\r\n}\r\n\r\nfunction stringify(\r\n obj: any,\r\n serializer?: EntryProcessor,\r\n indent?: string | number,\r\n decycler?: EntryProcessor\r\n): string {\r\n return JSON.stringify(obj, getSerialize(serializer, decycler), indent)\r\n}\r\n\r\nfunction getSerialize(\r\n serializer?: EntryProcessor,\r\n decycler?: EntryProcessor\r\n): EntryProcessor {\r\n let stack: any[] = [],\r\n keys: any[] = []\r\n\r\n if (!decycler)\r\n decycler = function (_: string, value: any) {\r\n if (stack[0] === value) return '[Circular ~]'\r\n return (\r\n '[Circular ~.' + keys.slice(0, stack.indexOf(value)).join('.') + ']'\r\n )\r\n }\r\n\r\n return function (this: any, key: string, value: any) {\r\n if (stack.length > 0) {\r\n var thisPos = stack.indexOf(this)\r\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)\r\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)\r\n if (~stack.indexOf(value)) value = decycler!.call(this, key, value)\r\n } else stack.push(value)\r\n\r\n return serializer == null ? value : serializer.call(this, key, value)\r\n }\r\n}\r\n\r\n/**\r\n * The default `isImmutable` function.\r\n *\r\n * @public\r\n */\r\nexport function isImmutableDefault(value: unknown): boolean {\r\n return (\r\n typeof value !== 'object' ||\r\n value === null ||\r\n typeof value === 'undefined' ||\r\n Object.isFrozen(value)\r\n )\r\n}\r\n\r\nexport function trackForMutations(\r\n isImmutable: IsImmutableFunc,\r\n ignorePaths: string[] | undefined,\r\n obj: any\r\n) {\r\n const trackedProperties = trackProperties(isImmutable, ignorePaths, obj)\r\n return {\r\n detectMutations() {\r\n return detectMutations(isImmutable, ignorePaths, trackedProperties, obj)\r\n },\r\n }\r\n}\r\n\r\ninterface TrackedProperty {\r\n value: any\r\n children: Record<string, any>\r\n}\r\n\r\nfunction trackProperties(\r\n isImmutable: IsImmutableFunc,\r\n ignorePaths: IgnorePaths = [],\r\n obj: Record<string, any>,\r\n path: string = ''\r\n) {\r\n const tracked: Partial<TrackedProperty> = { value: obj }\r\n\r\n if (!isImmutable(obj)) {\r\n tracked.children = {}\r\n\r\n for (const key in obj) {\r\n const childPath = path ? path + '.' + key : key\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue\r\n }\r\n\r\n tracked.children[key] = trackProperties(\r\n isImmutable,\r\n ignorePaths,\r\n obj[key],\r\n childPath\r\n )\r\n }\r\n }\r\n return tracked as TrackedProperty\r\n}\r\n\r\ntype IgnorePaths = readonly string[]\r\n\r\nfunction detectMutations(\r\n isImmutable: IsImmutableFunc,\r\n ignorePaths: IgnorePaths = [],\r\n trackedProperty: TrackedProperty,\r\n obj: any,\r\n sameParentRef: boolean = false,\r\n path: string = ''\r\n): { wasMutated: boolean; path?: string } {\r\n const prevObj = trackedProperty ? trackedProperty.value : undefined\r\n\r\n const sameRef = prevObj === obj\r\n\r\n if (sameParentRef && !sameRef && !Number.isNaN(obj)) {\r\n return { wasMutated: true, path }\r\n }\r\n\r\n if (isImmutable(prevObj) || isImmutable(obj)) {\r\n return { wasMutated: false }\r\n }\r\n\r\n // Gather all keys from prev (tracked) and after objs\r\n const keysToDetect: Record<string, boolean> = {}\r\n for (let key in trackedProperty.children) {\r\n keysToDetect[key] = true\r\n }\r\n for (let key in obj) {\r\n keysToDetect[key] = true\r\n }\r\n\r\n for (let key in keysToDetect) {\r\n const childPath = path ? path + '.' + key : key\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue\r\n }\r\n\r\n const result = detectMutations(\r\n isImmutable,\r\n ignorePaths,\r\n trackedProperty.children[key],\r\n obj[key],\r\n sameRef,\r\n childPath\r\n )\r\n\r\n if (result.wasMutated) {\r\n return result\r\n }\r\n }\r\n return { wasMutated: false }\r\n}\r\n\r\ntype IsImmutableFunc = (value: any) => boolean\r\n\r\n/**\r\n * Options for `createImmutableStateInvariantMiddleware()`.\r\n *\r\n * @public\r\n */\r\nexport interface ImmutableStateInvariantMiddlewareOptions {\r\n /**\r\n Callback function to check if a value is considered to be immutable.\r\n This function is applied recursively to every value contained in the state.\r\n The default implementation will return true for primitive types \r\n (like numbers, strings, booleans, null and undefined).\r\n */\r\n isImmutable?: IsImmutableFunc\r\n /** \r\n An array of dot-separated path strings that match named nodes from \r\n the root state to ignore when checking for immutability.\r\n Defaults to undefined\r\n */\r\n ignoredPaths?: string[]\r\n /** Print a warning if checks take longer than N ms. Default: 32ms */\r\n warnAfter?: number\r\n // @deprecated. Use ignoredPaths\r\n ignore?: string[]\r\n}\r\n\r\n/**\r\n * Creates a middleware that checks whether any state was mutated in between\r\n * dispatches or during a dispatch. If any mutations are detected, an error is\r\n * thrown.\r\n *\r\n * @param options Middleware options.\r\n *\r\n * @public\r\n */\r\nexport function createImmutableStateInvariantMiddleware(\r\n options: ImmutableStateInvariantMiddlewareOptions = {}\r\n): Middleware {\r\n if (process.env.NODE_ENV === 'production') {\r\n return () => (next) => (action) => next(action)\r\n }\r\n\r\n let {\r\n isImmutable = isImmutableDefault,\r\n ignoredPaths,\r\n warnAfter = 32,\r\n ignore,\r\n } = options\r\n\r\n // Alias ignore->ignoredPaths, but prefer ignoredPaths if present\r\n ignoredPaths = ignoredPaths || ignore\r\n\r\n const track = trackForMutations.bind(null, isImmutable, ignoredPaths)\r\n\r\n return ({ getState }) => {\r\n let state = getState()\r\n let tracker = track(state)\r\n\r\n let result\r\n return (next) => (action) => {\r\n const measureUtils = getTimeMeasureUtils(\r\n warnAfter,\r\n 'ImmutableStateInvariantMiddleware'\r\n )\r\n\r\n measureUtils.measureTime(() => {\r\n state = getState()\r\n\r\n result = tracker.detectMutations()\r\n // Track before potentially not meeting the invariant\r\n tracker = track(state)\r\n\r\n invariant(\r\n !result.wasMutated,\r\n `A state mutation was detected between dispatches, in the path '${\r\n result.path || ''\r\n }'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`\r\n )\r\n })\r\n\r\n const dispatchedAction = next(action)\r\n\r\n measureUtils.measureTime(() => {\r\n state = getState()\r\n\r\n result = tracker.detectMutations()\r\n // Track before potentially not meeting the invariant\r\n tracker = track(state)\r\n\r\n result.wasMutated &&\r\n invariant(\r\n !result.wasMutated,\r\n `A state mutation was detected inside a dispatch, in the path: ${\r\n result.path || ''\r\n }. Take a look at the reducer(s) handling the action ${stringify(\r\n action\r\n )}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`\r\n )\r\n })\r\n\r\n measureUtils.warnIfExceeded()\r\n\r\n return dispatchedAction\r\n }\r\n }\r\n}\r\n","import isPlainObject from './isPlainObject'\r\nimport type { Middleware } from 'redux'\r\nimport { getTimeMeasureUtils } from './utils'\r\n\r\n/**\r\n * Returns true if the passed value is \"plain\", i.e. a value that is either\r\n * directly JSON-serializable (boolean, number, string, array, plain object)\r\n * or `undefined`.\r\n *\r\n * @param val The value to check.\r\n *\r\n * @public\r\n */\r\nexport function isPlain(val: any) {\r\n const type = typeof val\r\n return (\r\n type === 'undefined' ||\r\n val === null ||\r\n type === 'string' ||\r\n type === 'boolean' ||\r\n type === 'number' ||\r\n Array.isArray(val) ||\r\n isPlainObject(val)\r\n )\r\n}\r\n\r\ninterface NonSerializableValue {\r\n keyPath: string\r\n value: unknown\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport function findNonSerializableValue(\r\n value: unknown,\r\n path: string = '',\r\n isSerializable: (value: unknown) => boolean = isPlain,\r\n getEntries?: (value: unknown) => [string, any][],\r\n ignoredPaths: readonly string[] = []\r\n): NonSerializableValue | false {\r\n let foundNestedSerializable: NonSerializableValue | false\r\n\r\n if (!isSerializable(value)) {\r\n return {\r\n keyPath: path || '<root>',\r\n value: value,\r\n }\r\n }\r\n\r\n if (typeof value !== 'object' || value === null) {\r\n return false\r\n }\r\n\r\n const entries = getEntries != null ? getEntries(value) : Object.entries(value)\r\n\r\n const hasIgnoredPaths = ignoredPaths.length > 0\r\n\r\n for (const [key, nestedValue] of entries) {\r\n const nestedPath = path ? path + '.' + key : key\r\n\r\n if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) {\r\n continue\r\n }\r\n\r\n if (!isSerializable(nestedValue)) {\r\n return {\r\n keyPath: nestedPath,\r\n value: nestedValue,\r\n }\r\n }\r\n\r\n if (typeof nestedValue === 'object') {\r\n foundNestedSerializable = findNonSerializableValue(\r\n nestedValue,\r\n nestedPath,\r\n isSerializable,\r\n getEntries,\r\n ignoredPaths\r\n )\r\n\r\n if (foundNestedSerializable) {\r\n return foundNestedSerializable\r\n }\r\n }\r\n }\r\n\r\n return false\r\n}\r\n\r\n/**\r\n * Options for `createSerializableStateInvariantMiddleware()`.\r\n *\r\n * @public\r\n */\r\nexport interface SerializableStateInvariantMiddlewareOptions {\r\n /**\r\n * The function to check if a value is considered serializable. This\r\n * function is applied recursively to every value contained in the\r\n * state. Defaults to `isPlain()`.\r\n */\r\n isSerializable?: (value: any) => boolean\r\n /**\r\n * The function that will be used to retrieve entries from each\r\n * value. If unspecified, `Object.entries` will be used. Defaults\r\n * to `undefined`.\r\n */\r\n getEntries?: (value: any) => [string, any][]\r\n\r\n /**\r\n * An array of action types to ignore when checking for serializability.\r\n * Defaults to []\r\n */\r\n ignoredActions?: string[]\r\n\r\n /**\r\n * An array of dot-separated path strings to ignore when checking\r\n * for serializability, Defaults to ['meta.arg']\r\n */\r\n ignoredActionPaths?: string[]\r\n\r\n /**\r\n * An array of dot-separated path strings to ignore when checking\r\n * for serializability, Defaults to []\r\n */\r\n ignoredPaths?: string[]\r\n /**\r\n * Execution time warning threshold. If the middleware takes longer\r\n * than `warnAfter` ms, a warning will be displayed in the console.\r\n * Defaults to 32ms.\r\n */\r\n warnAfter?: number\r\n\r\n /**\r\n * Opt out of checking state, but continue checking actions\r\n */\r\n ignoreState?: boolean\r\n}\r\n\r\n/**\r\n * Creates a middleware that, after every state change, checks if the new\r\n * state is serializable. If a non-serializable value is found within the\r\n * state, an error is printed to the console.\r\n *\r\n * @param options Middleware options.\r\n *\r\n * @public\r\n */\r\nexport function createSerializableStateInvariantMiddleware(\r\n options: SerializableStateInvariantMiddlewareOptions = {}\r\n): Middleware {\r\n if (process.env.NODE_ENV === 'production') {\r\n return () => (next) => (action) => next(action)\r\n }\r\n const {\r\n isSerializable = isPlain,\r\n getEntries,\r\n ignoredActions = [],\r\n ignoredActionPaths = ['meta.arg', 'meta.baseQueryMeta'],\r\n ignoredPaths = [],\r\n warnAfter = 32,\r\n ignoreState = false,\r\n } = options\r\n\r\n return (storeAPI) => (next) => (action) => {\r\n if (ignoredActions.length && ignoredActions.indexOf(action.type) !== -1) {\r\n return next(action)\r\n }\r\n\r\n const measureUtils = getTimeMeasureUtils(\r\n warnAfter,\r\n 'SerializableStateInvariantMiddleware'\r\n )\r\n measureUtils.measureTime(() => {\r\n const foundActionNonSerializableValue = findNonSerializableValue(\r\n action,\r\n '',\r\n isSerializable,\r\n getEntries,\r\n ignoredActionPaths\r\n )\r\n\r\n if (foundActionNonSerializableValue) {\r\n const { keyPath, value } = foundActionNonSerializableValue\r\n\r\n console.error(\r\n `A non-serializable value was detected in an action, in the path: \\`${keyPath}\\`. Value:`,\r\n value,\r\n '\\nTake a look at the logic that dispatched this action: ',\r\n action,\r\n '\\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)',\r\n '\\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)'\r\n )\r\n }\r\n })\r\n\r\n const result = next(action)\r\n\r\n if (!ignoreState) {\r\n measureUtils.measureTime(() => {\r\n const state = storeAPI.getState()\r\n\r\n const foundStateNonSerializableValue = findNonSerializableValue(\r\n state,\r\n '',\r\n isSerializable,\r\n getEntries,\r\n ignoredPaths\r\n )\r\n\r\n if (foundStateNonSerializableValue) {\r\n const { keyPath, value } = foundStateNonSerializableValue\r\n\r\n console.error(\r\n `A non-serializable value was detected in the state, in the path: \\`${keyPath}\\`. Value:`,\r\n value,\r\n `\r\nTake a look at the reducer(s) handling this action type: ${action.type}.\r\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`\r\n )\r\n }\r\n })\r\n\r\n measureUtils.warnIfExceeded()\r\n }\r\n\r\n return result\r\n }\r\n}\r\n","import type { Action } from 'redux'\r\nimport type {\r\n IsUnknownOrNonInferrable,\r\n IfMaybeUndefined,\r\n IfVoid,\r\n IsAny,\r\n} from './tsHelpers'\r\nimport isPlainObject from './isPlainObject'\r\n\r\n/**\r\n * An action with a string type and an associated payload. This is the\r\n * type of action returned by `createAction()` action creators.\r\n *\r\n * @template P The type of the action's payload.\r\n * @template T the type used for the action type.\r\n * @template M The type of the action's meta (optional)\r\n * @template E The type of the action's error (optional)\r\n *\r\n * @public\r\n */\r\nexport type PayloadAction<\r\n P = void,\r\n T extends string = string,\r\n M = never,\r\n E = never\r\n> = {\r\n payload: P\r\n type: T\r\n} & ([M] extends [never]\r\n ? {}\r\n : {\r\n meta: M\r\n }) &\r\n ([E] extends [never]\r\n ? {}\r\n : {\r\n error: E\r\n })\r\n\r\n/**\r\n * A \"prepare\" method to be used as the second parameter of `createAction`.\r\n * Takes any number of arguments and returns a Flux Standard Action without\r\n * type (will be added later) that *must* contain a payload (might be undefined).\r\n *\r\n * @public\r\n */\r\nexport type PrepareAction<P> =\r\n | ((...args: any[]) => { payload: P })\r\n | ((...args: any[]) => { payload: P; meta: any })\r\n | ((...args: any[]) => { payload: P; error: any })\r\n | ((...args: any[]) => { payload: P; meta: any; error: any })\r\n\r\n/**\r\n * Internal version of `ActionCreatorWithPreparedPayload`. Not to be used externally.\r\n *\r\n * @internal\r\n */\r\nexport type _ActionCreatorWithPreparedPayload<\r\n PA extends PrepareAction<any> | void,\r\n T extends string = string\r\n> = PA extends PrepareAction<infer P>\r\n ? ActionCreatorWithPreparedPayload<\r\n Parameters<PA>,\r\n P,\r\n T,\r\n ReturnType<PA> extends {\r\n error: infer E\r\n }\r\n ? E\r\n : never,\r\n ReturnType<PA> extends {\r\n meta: infer M\r\n }\r\n ? M\r\n : never\r\n >\r\n : void\r\n\r\n/**\r\n * Basic type for all action creators.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n */\r\ninterface BaseActionCreator<P, T extends string, M = never, E = never> {\r\n type: T\r\n match: (action: Action<unknown>) => action is PayloadAction<P, T, M, E>\r\n}\r\n\r\n/**\r\n * An action creator that takes multiple arguments that are passed\r\n * to a `PrepareAction` method to create the final Action.\r\n * @typeParam Args arguments for the action creator function\r\n * @typeParam P `payload` type\r\n * @typeParam T `type` name\r\n * @typeParam E optional `error` type\r\n * @typeParam M optional `meta` type\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithPreparedPayload<\r\n Args extends unknown[],\r\n P,\r\n T extends string = string,\r\n E = never,\r\n M = never\r\n> extends BaseActionCreator<P, T, M, E> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with `Args` will return\r\n * an Action with a payload of type `P` and (depending on the `PrepareAction`\r\n * method used) a `meta`- and `error` property of types `M` and `E` respectively.\r\n */\r\n (...args: Args): PayloadAction<P, T, M, E>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that takes an optional payload of type `P`.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithOptionalPayload<P, T extends string = string>\r\n extends BaseActionCreator<P, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload of `P`.\r\n * Calling it without an argument will return a PayloadAction with a payload of `undefined`.\r\n */\r\n (payload?: P): PayloadAction<P, T>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that takes no payload.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithoutPayload<T extends string = string>\r\n extends BaseActionCreator<undefined, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} will\r\n * return a {@link PayloadAction} of type `T` with a payload of `undefined`\r\n */\r\n (): PayloadAction<undefined, T>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that requires a payload of type P.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithPayload<P, T extends string = string>\r\n extends BaseActionCreator<P, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload of `P`\r\n */\r\n (payload: P): PayloadAction<P, T>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` whose `payload` type could not be inferred. Accepts everything as `payload`.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithNonInferrablePayload<\r\n T extends string = string\r\n> extends BaseActionCreator<unknown, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload\r\n * of exactly the type of the argument.\r\n */\r\n <PT extends unknown>(payload: PT): PayloadAction<PT, T>\r\n}\r\n\r\n/**\r\n * An action creator that produces actions with a `payload` attribute.\r\n *\r\n * @typeParam P the `payload` type\r\n * @typeParam T the `type` of the resulting action\r\n * @typeParam PA if the resulting action is preprocessed by a `prepare` method, the signature of said method.\r\n *\r\n * @public\r\n */\r\nexport type PayloadActionCreator<\r\n P = void,\r\n T extends string = string,\r\n PA extends PrepareAction<P> | void = void\r\n> = IfPrepareActionMethodProvided<\r\n PA,\r\n _ActionCreatorWithPreparedPayload<PA, T>,\r\n // else\r\n IsAny<\r\n P,\r\n ActionCreatorWithPayload<any, T>,\r\n IsUnknownOrNonInferrable<\r\n P,\r\n ActionCreatorWithNonInferrablePayload<T>,\r\n // else\r\n IfVoid<\r\n P,\r\n ActionCreatorWithoutPayload<T>,\r\n // else\r\n IfMaybeUndefined<\r\n P,\r\n ActionCreatorWithOptionalPayload<P, T>,\r\n // else\r\n ActionCreatorWithPayload<P, T>\r\n >\r\n >\r\n >\r\n >\r\n>\r\n\r\n/**\r\n * A utility function to create an action creator for the given action type\r\n * string. The action creator accepts a single argument, which will be included\r\n * in the action object as a field called payload. The action creator function\r\n * will also have its toString() overriden so that it returns the action type,\r\n * allowing it to be used in reducer logic that is looking for that action type.\r\n *\r\n * @param type The action type to use for created actions.\r\n * @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.\r\n * If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.\r\n *\r\n * @public\r\n */\r\nexport function createAction<P = void, T extends string = string>(\r\n type: T\r\n): PayloadActionCreator<P, T>\r\n\r\n/**\r\n * A utility function to create an action creator for the given action type\r\n * string. The action creator accepts a single argument, which will be included\r\n * in the action object as a field called payload. The action creator function\r\n * will also have its toString() overriden so that it returns the action type,\r\n * allowing it to be used in reducer logic that is looking for that action type.\r\n *\r\n * @param type The action type to use for created actions.\r\n * @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.\r\n * If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.\r\n *\r\n * @public\r\n */\r\nexport function createAction<\r\n PA extends PrepareAction<any>,\r\n T extends string = string\r\n>(\r\n type: T,\r\n prepareAction: PA\r\n): PayloadActionCreator<ReturnType<PA>['payload'], T, PA>\r\n\r\nexport function createAction(type: string, prepareAction?: Function): any {\r\n function actionCreator(...args: any[]) {\r\n if (prepareAction) {\r\n let prepared = prepareAction(...args)\r\n if (!prepared) {\r\n throw new Error('prepareAction did not return an object')\r\n }\r\n\r\n return {\r\n type,\r\n payload: prepared.payload,\r\n ...('meta' in prepared && { meta: prepared.meta }),\r\n ...('error' in prepared && { error: prepared.error }),\r\n }\r\n }\r\n return { type, payload: args[0] }\r\n }\r\n\r\n actionCreator.toString = () => `${type}`\r\n\r\n actionCreator.type = type\r\n\r\n actionCreator.match = (action: Action<unknown>): action is PayloadAction =>\r\n action.type === type\r\n\r\n return actionCreator\r\n}\r\n\r\nexport function isFSA(action: unknown): action is {\r\n type: string\r\n payload?: unknown\r\n error?: unknown\r\n meta?: unknown\r\n} {\r\n return (\r\n isPlainObject(action) &&\r\n typeof (action as any).type === 'string' &&\r\n Object.keys(action).every(isValidKey)\r\n )\r\n}\r\n\r\nfunction isValidKey(key: string) {\r\n return ['type', 'payload', 'error', 'meta'].indexOf(key) > -1\r\n}\r\n\r\n/**\r\n * Returns the action type of the actions created by the passed\r\n * `createAction()`-generated action creator (arbitrary action creators\r\n * are not supported).\r\n *\r\n * @param action The action creator whose action type to get.\r\n * @returns The action type used by the action creator.\r\n *\r\n * @public\r\n */\r\nexport function getType<T extends string>(\r\n actionCreator: PayloadActionCreator<any, T>\r\n): T {\r\n return `${actionCreator}` as T\r\n}\r\n\r\n// helper types for more readable typings\r\n\r\ntype IfPrepareActionMethodProvided<\r\n PA extends PrepareAction<any> | void,\r\n True,\r\n False\r\n> = PA extends (...args: any[]) => any ? True : False\r\n","import type { Draft } from 'immer'\r\nimport createNextState, { isDraft, isDraftable } from 'immer'\r\nimport type { AnyAction, Action, Reducer } from 'redux'\r\nimport type { ActionReducerMapBuilder } from './mapBuilders'\r\nimport { executeReducerBuilderCallback } from './mapBuilders'\r\nimport type { NoInfer } from './tsHelpers'\r\n\r\n/**\r\n * Defines a mapping from action types to corresponding action object shapes.\r\n *\r\n * @deprecated This should not be used manually - it is only used for internal\r\n * inference purposes and should not have any further value.\r\n * It might be removed in the future.\r\n * @public\r\n */\r\nexport type Actions<T extends keyof any = string> = Record<T, Action>\r\n\r\nexport interface ActionMatcher<A extends AnyAction> {\r\n (action: AnyAction): action is A\r\n}\r\n\r\nexport type ActionMatcherDescription<S, A extends AnyAction> = {\r\n matcher: ActionMatcher<A>\r\n reducer: CaseReducer<S, NoInfer<A>>\r\n}\r\n\r\nexport type ReadonlyActionMatcherDescriptionCollection<S> = ReadonlyArray<\r\n ActionMatcherDescription<S, any>\r\n>\r\n\r\nexport type ActionMatcherDescriptionCollection<S> = Array<\r\n ActionMatcherDescription<S, any>\r\n>\r\n\r\n/**\r\n * An *case reducer* is a reducer function for a specific action type. Case\r\n * reducers can be composed to full reducers using `createReducer()`.\r\n *\r\n * Unlike a normal Redux reducer, a case reducer is never called with an\r\n * `undefined` state to determine the initial state. Instead, the initial\r\n * state is explicitly specified as an argument to `createReducer()`.\r\n *\r\n * In addition, a case reducer can choose to mutate the passed-in `state`\r\n * value directly instead of returning a new state. This does not actually\r\n * cause the store state to be mutated directly; instead, thanks to\r\n * [immer](https://github.com/mweststrate/immer), the mutations are\r\n * translated to copy operations that result in a new state.\r\n *\r\n * @public\r\n */\r\nexport type CaseReducer<S = any, A extends Action = AnyAction> = (\r\n state: Draft<S>,\r\n action: A\r\n) => S | void | Draft<S>\r\n\r\n/**\r\n * A mapping from action types to case reducers for `createReducer()`.\r\n *\r\n * @deprecated This should not be used manually - it is only used\r\n * for internal inference purposes and using it manually\r\n * would lead to type erasure.\r\n * It might be removed in the future.\r\n * @public\r\n */\r\nexport type CaseReducers<S, AS extends Actions> = {\r\n [T in keyof AS]: AS[T] extends Action ? CaseReducer<S, AS[T]> : void\r\n}\r\n\r\n/**\r\n * A utility function that allows defining a reducer as a mapping from action\r\n * type to *case reducer* functions that handle these action types. The\r\n * reducer's initial state is passed as the first argument.\r\n *\r\n * @remarks\r\n * The body of every case reducer is implicitly wrapped with a call to\r\n * `produce()` from the [immer](https://github.com/mweststrate/immer) library.\r\n * This means that rather than returning a new state object, you can also\r\n * mutate the passed-in state object directly; these mutations will then be\r\n * automatically and efficiently translated into copies, giving you both\r\n * convenience and immutability.\r\n *\r\n * @overloadSummary\r\n * This overload accepts a callback function that receives a `builder` object as its argument.\r\n * That builder provides `addCase`, `addMatcher` and `addDefaultCase` functions that may be\r\n * called to define what actions this reducer will handle.\r\n *\r\n * @param initialState - The initial state that should be used when the reducer is called the first time.\r\n * @param builderCallback - A callback that receives a *builder* object to define\r\n * case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`.\r\n * @example\r\n```ts\r\nimport {\r\n createAction,\r\n createReducer,\r\n AnyAction,\r\n PayloadAction,\r\n} from \"@reduxjs/toolkit\";\r\n\r\nconst increment = createAction<number>(\"increment\");\r\nconst decrement = createAction<number>(\"decrement\");\r\n\r\nfunction isActionWithNumberPayload(\r\n action: AnyAction\r\n): action is PayloadAction<number> {\r\n return typeof action.payload === \"number\";\r\n}\r\n\r\ncreateReducer(\r\n {\r\n counter: 0,\r\n sumOfNumberPayloads: 0,\r\n unhandledActions: 0,\r\n },\r\n (builder) => {\r\n builder\r\n .addCase(increment, (state, action) => {\r\n // action is inferred correctly here\r\n state.counter += action.payload;\r\n })\r\n // You can chain calls, or have separate `builder.addCase()` lines each time\r\n .addCase(decrement, (state, action) => {\r\n state.counter -= action.payload;\r\n })\r\n // You can apply a \"matcher function\" to incoming actions\r\n .addMatcher(isActionWithNumberPayload, (state, action) => {})\r\n // and provide a default case if no other handlers matched\r\n .addDefaultCase((state, action) => {});\r\n }\r\n);\r\n```\r\n * @public\r\n */\r\nexport function createReducer<S>(\r\n initialState: S,\r\n builderCallback: (builder: ActionReducerMapBuilder<S>) => void\r\n): Reducer<S>\r\n\r\n/**\r\n * A utility function that allows defining a reducer as a mapping from action\r\n * type to *case reducer* functions that handle these action types. The\r\n * reducer's initial state is passed as the first argument.\r\n *\r\n * The body of every case reducer is implicitly wrapped with a call to\r\n * `produce()` from the [immer](https://github.com/mweststrate/immer) library.\r\n * This means that rather than returning a new state object, you can also\r\n * mutate the passed-in state object directly; these mutations will then be\r\n * automatically and efficiently translated into copies, giving you both\r\n * convenience and immutability.\r\n * \r\n * @overloadSummary\r\n * This overload accepts an object where the keys are string action types, and the values\r\n * are case reducer functions to handle those action types.\r\n *\r\n * @param initialState - The initial state that should be used when the reducer is called the first time.\r\n * @param actionsMap - An object mapping from action types to _case reducers_, each of which handles one specific action type.\r\n * @param actionMatchers - An array of matcher definitions in the form `{matcher, reducer}`.\r\n * All matching reducers will be executed in order, independently if a case reducer matched or not.\r\n * @param defaultCaseReducer - A \"default case\" reducer that is executed if no case reducer and no matcher\r\n * reducer was executed for this action.\r\n *\r\n * @example\r\n```js\r\nconst counterReducer = createReducer(0, {\r\n increment: (state, action) => state + action.payload,\r\n decrement: (state, action) => state - action.payload\r\n})\r\n```\r\n \r\n * Action creators that were generated using [`createAction`](./createAction) may be used directly as the keys here, using computed property syntax:\r\n\r\n```js\r\nconst increment = createAction('increment')\r\nconst decrement = createAction('decrement')\r\n\r\nconst counterReducer = createReducer(0, {\r\n [increment]: (state, action) => state + action.payload,\r\n [decrement.type]: (state, action) => state - action.payload\r\n})\r\n```\r\n * @public\r\n */\r\nexport function createReducer<\r\n S,\r\n CR extends CaseReducers<S, any> = CaseReducers<S, any>\r\n>(\r\n initialState: S,\r\n actionsMap: CR,\r\n actionMatchers?: ActionMatcherDescriptionCollection<S>,\r\n defaultCaseReducer?: CaseReducer<S>\r\n): Reducer<S>\r\n\r\nexport function createReducer<S>(\r\n initialState: S,\r\n mapOrBuilderCallback:\r\n | CaseReducers<S, any>\r\n | ((builder: ActionReducerMapBuilder<S>) => void),\r\n actionMatchers: ReadonlyActionMatcherDescriptionCollection<S> = [],\r\n defaultCaseReducer?: CaseReducer<S>\r\n): Reducer<S> {\r\n let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] =\r\n typeof mapOrBuilderCallback === 'function'\r\n ? executeReducerBuilderCallback(mapOrBuilderCallback)\r\n : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer]\r\n\r\n const frozenInitialState = createNextState(initialState, () => {})\r\n\r\n return function (state = frozenInitialState, action): S {\r\n let caseReducers = [\r\n actionsMap[action.type],\r\n ...finalActionMatchers\r\n .filter(({ matcher }) => matcher(action))\r\n .map(({ reducer }) => reducer),\r\n ]\r\n if (caseReducers.filter((cr) => !!cr).length === 0) {\r\n caseReducers = [finalDefaultCaseReducer]\r\n }\r\n\r\n return caseReducers.reduce((previousState, caseReducer): S => {\r\n if (caseReducer) {\r\n if (isDraft(previousState)) {\r\n // If it's already a draft, we must already be inside a `createNextState` call,\r\n // likely because this is being wrapped in `createReducer`, `createSlice`, or nested\r\n // inside an existing draft. It's safe to just pass the draft to the mutator.\r\n const draft = previousState as Draft<S> // We can assume this is already a draft\r\n const result = caseReducer(draft, action)\r\n\r\n if (typeof result === 'undefined') {\r\n return previousState\r\n }\r\n\r\n return result as S\r\n } else if (!isDraftable(previousState)) {\r\n // If state is not draftable (ex: a primitive, such as 0), we want to directly\r\n // return the caseReducer func and not wrap it with produce.\r\n const result = caseReducer(previousState as any, action)\r\n\r\n if (typeof result === 'undefined') {\r\n if (previousState === null) {\r\n return previousState\r\n }\r\n throw Error(\r\n 'A case reducer on a non-draftable value must not return undefined'\r\n )\r\n }\r\n\r\n return result as S\r\n } else {\r\n // @ts-ignore createNextState() produces an Immutable<Draft<S>> rather\r\n // than an Immutable<S>, and TypeScript cannot find out how to reconcile\r\n // these two types.\r\n return createNextState(previousState, (draft: Draft<S>) => {\r\n return caseReducer(draft, action)\r\n })\r\n }\r\n }\r\n\r\n return previousState\r\n }, state)\r\n }\r\n}\r\n","import type { Action, AnyAction } from 'redux'\r\nimport type {\r\n CaseReducer,\r\n CaseReducers,\r\n ActionMatcher,\r\n ActionMatcherDescriptionCollection,\r\n} from './createReducer'\r\n\r\nexport interface TypedActionCreator<Type extends string> {\r\n (...args: any[]): Action<Type>\r\n type: Type\r\n}\r\n\r\n/**\r\n * A builder for an action <-> reducer map.\r\n *\r\n * @public\r\n */\r\nexport interface ActionReducerMapBuilder<State> {\r\n /**\r\n * Adds a case reducer to handle a single exact action type.\r\n * @remarks\r\n * All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`.\r\n * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\r\n * @param reducer - The actual case reducer function.\r\n */\r\n addCase<ActionCreator extends TypedActionCreator<string>>(\r\n actionCreator: ActionCreator,\r\n reducer: CaseReducer<State, ReturnType<ActionCreator>>\r\n ): ActionReducerMapBuilder<State>\r\n /**\r\n * Adds a case reducer to handle a single exact action type.\r\n * @remarks\r\n * All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`.\r\n * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\r\n * @param reducer - The actual case reducer function.\r\n */\r\n addCase<Type extends string, A extends Action<Type>>(\r\n type: Type,\r\n reducer: CaseReducer<State, A>\r\n ): ActionReducerMapBuilder<State>\r\n\r\n /**\r\n * Allows you to match your incoming actions against your own filter function instead of only the `action.type` property.\r\n * @remarks\r\n * If multiple matcher reducers match, all of them will be executed in the order\r\n * they were defined in - even if a case reducer already matched.\r\n * All calls to `builder.addMatcher` must come after any calls to `builder.addCase` and before any calls to `builder.addDefaultCase`.\r\n * @param matcher - A matcher function. In TypeScript, this should be a [type predicate](https://www.typescriptlang.org/docs/handbook/advanced-types.html#using-type-predicates)\r\n * function\r\n * @param reducer - The actual case reducer function.\r\n *\r\n * @example\r\n```ts\r\nimport {\r\n createAction,\r\n createReducer,\r\n AsyncThunk,\r\n AnyAction,\r\n} from \"@reduxjs/toolkit\";\r\n\r\ntype GenericAsyncThunk = AsyncThunk<unknown, unknown, any>;\r\n\r\ntype PendingAction = ReturnType<GenericAsyncThunk[\"pending\"]>;\r\ntype RejectedAction = ReturnType<GenericAsyncThunk[\"rejected\"]>;\r\ntype FulfilledAction = ReturnType<GenericAsyncThunk[\"fulfilled\"]>;\r\n\r\nconst initialState: Record<string, string> = {};\r\nconst resetAction = createAction(\"reset-tracked-loading-state\");\r\n\r\nfunction isPendingAction(action: AnyAction): action is PendingAction {\r\n return action.type.endsWith(\"/pending\");\r\n}\r\n\r\nconst reducer = createReducer(initialState, (builder) => {\r\n builder\r\n .addCase(resetAction, () => initialState)\r\n // matcher can be defined outside as a type predicate function\r\n .addMatcher(isPendingAction, (state, action) => {\r\n state[action.meta.requestId] = \"pending\";\r\n })\r\n .addMatcher(\r\n // matcher can be defined inline as a type predicate function\r\n (action): action is RejectedAction => action.type.endsWith(\"/rejected\"),\r\n (state, action) => {\r\n state[action.meta.requestId] = \"rejected\";\r\n }\r\n )\r\n // matcher can just return boolean and the matcher can receive a generic argument\r\n .addMatcher<FulfilledAction>(\r\n (action) => action.type.endsWith(\"/fulfilled\"),\r\n (state, action) => {\r\n state[action.meta.requestId] = \"fulfilled\";\r\n }\r\n );\r\n});\r\n```\r\n */\r\n addMatcher<A extends AnyAction>(\r\n matcher: ActionMatcher<A> | ((action: AnyAction) => boolean),\r\n reducer: CaseReducer<State, A>\r\n ): Omit<ActionReducerMapBuilder<State>, 'addCase'>\r\n\r\n /**\r\n * Adds a \"default case\" reducer that is executed if no case reducer and no matcher\r\n * reducer was executed for this action.\r\n * @param reducer - The fallback \"default case\" reducer function.\r\n *\r\n * @example\r\n```ts\r\nimport { createReducer } from '@reduxjs/toolkit'\r\nconst initialState = { otherActions: 0 }\r\nconst reducer = createReducer(initialState, builder => {\r\n builder\r\n // .addCase(...)\r\n // .addMatcher(...)\r\n .addDefaultCase((state, action) => {\r\n state.otherActions++\r\n })\r\n})\r\n```\r\n */\r\n addDefaultCase(reducer: CaseReducer<State, AnyAction>): {}\r\n}\r\n\r\nexport function executeReducerBuilderCallback<S>(\r\n builderCallback: (builder: ActionReducerMapBuilder<S>) => void\r\n): [\r\n CaseReducers<S, any>,\r\n ActionMatcherDescriptionCollection<S>,\r\n CaseReducer<S, AnyAction> | undefined\r\n] {\r\n const actionsMap: CaseReducers<S, any> = {}\r\n const actionMatchers: ActionMatcherDescriptionCollection<S> = []\r\n let defaultCaseReducer: CaseReducer<S, AnyAction> | undefined\r\n const builder = {\r\n addCase(\r\n typeOrActionCreator: string | TypedActionCreator<any>,\r\n reducer: CaseReducer<S>\r\n ) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n /*\r\n to keep the definition by the user in line with actual behavior, \r\n we enforce `addCase` to always be called before calling `addMatcher`\r\n as matching cases take precedence over matchers\r\n */\r\n if (actionMatchers.length > 0) {\r\n throw new Error(\r\n '`builder.addCase` should only be called before calling `builder.addMatcher`'\r\n )\r\n }\r\n if (defaultCaseReducer) {\r\n throw new Error(\r\n '`builder.addCase` should only be called before calling `builder.addDefaultCase`'\r\n )\r\n }\r\n }\r\n const type =\r\n typeof typeOrActionCreator === 'string'\r\n ? typeOrActionCreator\r\n : typeOrActionCreator.type\r\n if (type in actionsMap) {\r\n throw new Error(\r\n 'addCase cannot be called with two reducers for the same action type'\r\n )\r\n }\r\n actionsMap[type] = reducer\r\n return builder\r\n },\r\n addMatcher<A extends AnyAction>(\r\n matcher: ActionMatcher<A>,\r\n reducer: CaseReducer<S, A>\r\n ) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (defaultCaseReducer) {\r\n throw new Error(\r\n '`builder.addMatcher` should only be called before calling `builder.addDefaultCase`'\r\n )\r\n }\r\n }\r\n actionMatchers.push({ matcher, reducer })\r\n return builder\r\n },\r\n addDefaultCase(reducer: CaseReducer<S, AnyAction>) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (defaultCaseReducer) {\r\n throw new Error('`builder.addDefaultCase` can only be called once')\r\n }\r\n }\r\n defaultCaseReducer = reducer\r\n return builder\r\n },\r\n }\r\n builderCallback(builder)\r\n return [actionsMap, actionMatchers, defaultCaseReducer]\r\n}\r\n","import type { Reducer } from 'redux'\r\nimport type {\r\n ActionCreatorWithoutPayload,\r\n PayloadAction,\r\n PayloadActionCreator,\r\n PrepareAction,\r\n _ActionCreatorWithPreparedPayload,\r\n} from './createAction'\r\nimport { createAction } from './createAction'\r\nimport type { CaseReducer, CaseReducers } from './createReducer'\r\nimport { createReducer } from './createReducer'\r\nimport type { ActionReducerMapBuilder } from './mapBuilders'\r\nimport { executeReducerBuilderCallback } from './mapBuilders'\r\nimport type { NoInfer } from './tsHelpers'\r\n\r\n/**\r\n * An action creator attached to a slice.\r\n *\r\n * @deprecated please use PayloadActionCreator directly\r\n *\r\n * @public\r\n */\r\nexport type SliceActionCreator<P> = PayloadActionCreator<P>\r\n\r\n/**\r\n * The return value of `createSlice`\r\n *\r\n * @public\r\n */\r\nexport interface Slice<\r\n State = any,\r\n CaseReducers extends SliceCaseReducers<State> = SliceCaseReducers<State>,\r\n Name extends string = string\r\n> {\r\n /**\r\n * The slice name.\r\n */\r\n name: Name\r\n\r\n /**\r\n * The slice's reducer.\r\n */\r\n reducer: Reducer<State>\r\n\r\n /**\r\n * Action creators for the types of actions that are handled by the slice\r\n * reducer.\r\n */\r\n actions: CaseReducerActions<CaseReducers>\r\n\r\n /**\r\n * The individual case reducer functions that were passed in the `reducers` parameter.\r\n * This enables reuse and testing if they were defined inline when calling `createSlice`.\r\n */\r\n caseReducers: SliceDefinedCaseReducers<CaseReducers>\r\n}\r\n\r\n/**\r\n * Options for `createSlice()`.\r\n *\r\n * @public\r\n */\r\nexport interface CreateSliceOptions<\r\n State = any,\r\n CR extends SliceCaseReducers<State> = SliceCaseReducers<State>,\r\n Name extends string = string\r\n> {\r\n /**\r\n * The slice's name. Used to namespace the generated action types.\r\n */\r\n name: Name\r\n\r\n /**\r\n * The initial state to be returned by the slice reducer.\r\n */\r\n initialState: State\r\n\r\n /**\r\n * A mapping from action types to action-type-specific *case reducer*\r\n * functions. For every action type, a matching action creator will be\r\n * generated using `createAction()`.\r\n */\r\n reducers: ValidateSliceCaseReducers<State, CR>\r\n\r\n /**\r\n * A callback that receives a *builder* object to define\r\n * case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`.\r\n * \r\n * Alternatively, a mapping from action types to action-type-specific *case reducer*\r\n * functions. These reducers should have existing action types used\r\n * as the keys, and action creators will _not_ be generated.\r\n * \r\n * @example\r\n```ts\r\nimport { createAction, createSlice, Action, AnyAction } from '@reduxjs/toolkit'\r\nconst incrementBy = createAction<number>('incrementBy')\r\nconst decrement = createAction('decrement')\r\n\r\ninterface RejectedAction extends Action {\r\n error: Error\r\n}\r\n\r\nfunction isRejectedAction(action: AnyAction): action is RejectedAction {\r\n return action.type.endsWith('rejected')\r\n}\r\n\r\ncreateSlice({\r\n name: 'counter',\r\n initialState: 0,\r\n reducers: {},\r\n extraReducers: builder => {\r\n builder\r\n .addCase(incrementBy, (state, action) => {\r\n // action is inferred correctly here if using TS\r\n })\r\n // You can chain calls, or have separate `builder.addCase()` lines each time\r\n .addCase(decrement, (state, action) => {})\r\n // You can match a range of action types\r\n .addMatcher(\r\n isRejectedAction,\r\n // `action` will be inferred as a RejectedAction due to isRejectedAction being defined as a type guard\r\n (state, action) => {}\r\n )\r\n // and provide a default case if no other handlers matched\r\n .addDefaultCase((state, action) => {})\r\n }\r\n})\r\n```\r\n */\r\n extraReducers?:\r\n | CaseReducers<NoInfer<State>, any>\r\n | ((builder: ActionReducerMapBuilder<NoInfer<State>>) => void)\r\n}\r\n\r\n/**\r\n * A CaseReducer with a `prepare` method.\r\n *\r\n * @public\r\n */\r\nexport type CaseReducerWithPrepare<State, Action extends PayloadAction> = {\r\n reducer: CaseReducer<State, Action>\r\n prepare: PrepareAction<Action['payload']>\r\n}\r\n\r\n/**\r\n * The type describing a slice's `reducers` option.\r\n *\r\n * @public\r\n */\r\nexport type SliceCaseReducers<State> = {\r\n [K: string]:\r\n | CaseReducer<State, PayloadAction<any>>\r\n | CaseReducerWithPrepare<State, PayloadAction<any, string, any, any>>\r\n}\r\n\r\n/**\r\n * Derives the slice's `actions` property from the `reducers` options\r\n *\r\n * @public\r\n */\r\nexport type CaseReducerActions<CaseReducers extends SliceCaseReducers<any>> = {\r\n [Type in keyof CaseReducers]: CaseReducers[Type] extends { prepare: any }\r\n ? ActionCreatorForCaseReducerWithPrepare<CaseReducers[Type]>\r\n : ActionCreatorForCaseReducer<CaseReducers[Type]>\r\n}\r\n\r\n/**\r\n * Get a `PayloadActionCreator` type for a passed `CaseReducerWithPrepare`\r\n *\r\n * @internal\r\n */\r\ntype ActionCreatorForCaseReducerWithPrepare<CR extends { prepare: any }> =\r\n _ActionCreatorWithPreparedPayload<CR['prepare'], string>\r\n\r\n/**\r\n * Get a `PayloadActionCreator` type for a passed `CaseReducer`\r\n *\r\n * @internal\r\n */\r\ntype ActionCreatorForCaseReducer<CR> = CR extends (\r\n state: any,\r\n action: infer Action\r\n) => any\r\n ? Action extends { payload: infer P }\r\n ? PayloadActionCreator<P>\r\n : ActionCreatorWithoutPayload\r\n : ActionCreatorWithoutPayload\r\n\r\n/**\r\n * Extracts the CaseReducers out of a `reducers` object, even if they are\r\n * tested into a `CaseReducerWithPrepare`.\r\n *\r\n * @internal\r\n */\r\ntype SliceDefinedCaseReducers<CaseReducers extends SliceCaseReducers<any>> = {\r\n [Type in keyof CaseReducers]: CaseReducers[Type] extends {\r\n reducer: infer Reducer\r\n }\r\n ? Reducer\r\n : CaseReducers[Type]\r\n}\r\n\r\n/**\r\n * Used on a SliceCaseReducers object.\r\n * Ensures that if a CaseReducer is a `CaseReducerWithPrepare`, that\r\n * the `reducer` and the `prepare` function use the same type of `payload`.\r\n *\r\n * Might do additional such checks in the future.\r\n *\r\n * This type is only ever useful if you want to write your own wrapper around\r\n * `createSlice`. Please don't use it otherwise!\r\n *\r\n * @public\r\n */\r\nexport type ValidateSliceCaseReducers<\r\n S,\r\n ACR extends SliceCaseReducers<S>\r\n> = ACR &\r\n {\r\n [T in keyof ACR]: ACR[T] extends {\r\n reducer(s: S, action?: infer A): any\r\n }\r\n ? {\r\n prepare(...a: never[]): Omit<A, 'type'>\r\n }\r\n : {}\r\n }\r\n\r\nfunction getType(slice: string, actionKey: string): string {\r\n return `${slice}/${actionKey}`\r\n}\r\n\r\n/**\r\n * A function that accepts an initial state, an object full of reducer\r\n * functions, and a \"slice name\", and automatically generates\r\n * action creators and action types that correspond to the\r\n * reducers and state.\r\n *\r\n * The `reducer` argument is passed to `createReducer()`.\r\n *\r\n * @public\r\n */\r\nexport function createSlice<\r\n State,\r\n CaseReducers extends SliceCaseReducers<State>,\r\n Name extends string = string\r\n>(\r\n options: CreateSliceOptions<State, CaseReducers, Name>\r\n): Slice<State, CaseReducers, Name> {\r\n const { name, initialState } = options\r\n if (!name) {\r\n throw new Error('`name` is a required option for createSlice')\r\n }\r\n const reducers = options.reducers || {}\r\n const [\r\n extraReducers = {},\r\n actionMatchers = [],\r\n defaultCaseReducer = undefined,\r\n ] =\r\n typeof options.extraReducers === 'function'\r\n ? executeReducerBuilderCallback(options.extraReducers)\r\n : [options.extraReducers]\r\n\r\n const reducerNames = Object.keys(reducers)\r\n\r\n const sliceCaseReducersByName: Record<string, CaseReducer> = {}\r\n const sliceCaseReducersByType: Record<string, CaseReducer> = {}\r\n const actionCreators: Record<string, Function> = {}\r\n\r\n reducerNames.forEach((reducerName) => {\r\n const maybeReducerWithPrepare = reducers[reducerName]\r\n const type = getType(name, reducerName)\r\n\r\n let caseReducer: CaseReducer<State, any>\r\n let prepareCallback: PrepareAction<any> | undefined\r\n\r\n if ('reducer' in maybeReducerWithPrepare) {\r\n caseReducer = maybeReducerWithPrepare.reducer\r\n prepareCallback = maybeReducerWithPrepare.prepare\r\n } else {\r\n caseReducer = maybeReducerWithPrepare\r\n }\r\n\r\n sliceCaseReducersByName[reducerName] = caseReducer\r\n sliceCaseReducersByType[type] = caseReducer\r\n actionCreators[reducerName] = prepareCallback\r\n ? createAction(type, prepareCallback)\r\n : createAction(type)\r\n })\r\n\r\n const finalCaseReducers = { ...extraReducers, ...sliceCaseReducersByType }\r\n const reducer = createReducer(\r\n initialState,\r\n finalCaseReducers as any,\r\n actionMatchers,\r\n defaultCaseReducer\r\n )\r\n\r\n return {\r\n name,\r\n reducer,\r\n actions: actionCreators as any,\r\n caseReducers: sliceCaseReducersByName as any,\r\n }\r\n}\r\n","import type { EntityState } from './models'\r\n\r\nexport function getInitialEntityState<V>(): EntityState<V> {\r\n return {\r\n ids: [],\r\n entities: {},\r\n }\r\n}\r\n\r\nexport function createInitialStateFactory<V>() {\r\n function getInitialState(): EntityState<V>\r\n function getInitialState<S extends object>(\r\n additionalState: S\r\n ): EntityState<V> & S\r\n function getInitialState(additionalState: any = {}): any {\r\n return Object.assign(getInitialEntityState(), additionalState)\r\n }\r\n\r\n return { getInitialState }\r\n}\r\n","import { createDraftSafeSelector } from '../createDraftSafeSelector'\r\nimport type {\r\n EntityState,\r\n EntitySelectors,\r\n Dictionary,\r\n EntityId,\r\n} from './models'\r\n\r\nexport function createSelectorsFactory<T>() {\r\n function getSelectors(): EntitySelectors<T, EntityState<T>>\r\n function getSelectors<V>(\r\n selectState: (state: V) => EntityState<T>\r\n ): EntitySelectors<T, V>\r\n function getSelectors(\r\n selectState?: (state: any) => EntityState<T>\r\n ): EntitySelectors<T, any> {\r\n const selectIds = (state: any) => state.ids\r\n\r\n const selectEntities = (state: EntityState<T>) => state.entities\r\n\r\n const selectAll = createDraftSafeSelector(\r\n selectIds,\r\n selectEntities,\r\n (ids: readonly T[], entities: Dictionary<T>): any =>\r\n ids.map((id: any) => (entities as any)[id])\r\n )\r\n\r\n const selectId = (_: any, id: EntityId) => id\r\n\r\n const selectById = (entities: Dictionary<T>, id: EntityId) => entities[id]\r\n\r\n const selectTotal = createDraftSafeSelector(selectIds, (ids) => ids.length)\r\n\r\n if (!selectState) {\r\n return {\r\n selectIds,\r\n selectEntities,\r\n selectAll,\r\n selectTotal,\r\n selectById: createDraftSafeSelector(\r\n selectEntities,\r\n selectId,\r\n selectById\r\n ),\r\n }\r\n }\r\n\r\n const selectGlobalizedEntities = createDraftSafeSelector(\r\n selectState,\r\n selectEntities\r\n )\r\n\r\n return {\r\n selectIds: createDraftSafeSelector(selectState, selectIds),\r\n selectEntities: selectGlobalizedEntities,\r\n selectAll: createDraftSafeSelector(selectState, selectAll),\r\n selectTotal: createDraftSafeSelector(selectState, selectTotal),\r\n selectById: createDraftSafeSelector(\r\n selectGlobalizedEntities,\r\n selectId,\r\n selectById\r\n ),\r\n }\r\n }\r\n\r\n return { getSelectors }\r\n}\r\n","import createNextState, { isDraft } from 'immer'\r\nimport type { EntityState, PreventAny } from './models'\r\nimport type { PayloadAction } from '../createAction'\r\nimport { isFSA } from '../createAction'\r\nimport { IsAny } from '../tsHelpers'\r\n\r\nexport function createSingleArgumentStateOperator<V>(\r\n mutator: (state: EntityState<V>) => void\r\n) {\r\n const operator = createStateOperator((_: undefined, state: EntityState<V>) =>\r\n mutator(state)\r\n )\r\n\r\n return function operation<S extends EntityState<V>>(\r\n state: PreventAny<S, V>\r\n ): S {\r\n return operator(state as S, undefined)\r\n }\r\n}\r\n\r\nexport function createStateOperator<V, R>(\r\n mutator: (arg: R, state: EntityState<V>) => void\r\n) {\r\n return function operation<S extends EntityState<V>>(\r\n state: S,\r\n arg: R | PayloadAction<R>\r\n ): S {\r\n function isPayloadActionArgument(\r\n arg: R | PayloadAction<R>\r\n ): arg is PayloadAction<R> {\r\n return isFSA(arg)\r\n }\r\n\r\n const runMutator = (draft: EntityState<V>) => {\r\n if (isPayloadActionArgument(arg)) {\r\n mutator(arg.payload, draft)\r\n } else {\r\n mutator(arg, draft)\r\n }\r\n }\r\n\r\n if (isDraft(state)) {\r\n // we must already be inside a `createNextState` call, likely because\r\n // this is being wrapped in `createReducer` or `createSlice`.\r\n // It's safe to just pass the draft to the mutator.\r\n runMutator(state)\r\n\r\n // since it's a draft, we'll just return it\r\n return state\r\n } else {\r\n // @ts-ignore createNextState() produces an Immutable<Draft<S>> rather\r\n // than an Immutable<S>, and TypeScript cannot find out how to reconcile\r\n // these two types.\r\n return createNextState(state, runMutator)\r\n }\r\n }\r\n}\r\n","import type { EntityState, IdSelector, Update, EntityId } from './models'\r\n\r\nexport function selectIdValue<T>(entity: T, selectId: IdSelector<T>) {\r\n const key = selectId(entity)\r\n\r\n if (process.env.NODE_ENV !== 'production' && key === undefined) {\r\n console.warn(\r\n 'The entity passed to the `selectId` implementation returned undefined.',\r\n 'You should probably provide your own `selectId` implementation.',\r\n 'The entity that was passed:',\r\n entity,\r\n 'The `selectId` implementation:',\r\n selectId.toString()\r\n )\r\n }\r\n\r\n return key\r\n}\r\n\r\nexport function ensureEntitiesArray<T>(\r\n entities: readonly T[] | Record<EntityId, T>\r\n): readonly T[] {\r\n if (!Array.isArray(entities)) {\r\n entities = Object.values(entities)\r\n }\r\n\r\n return entities\r\n}\r\n\r\nexport function splitAddedUpdatedEntities<T>(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n selectId: IdSelector<T>,\r\n state: EntityState<T>\r\n): [T[], Update<T>[]] {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n const added: T[] = []\r\n const updated: Update<T>[] = []\r\n\r\n for (const entity of newEntities) {\r\n const id = selectIdValue(entity, selectId)\r\n if (id in state.entities) {\r\n updated.push({ id, changes: entity })\r\n } else {\r\n added.push(entity)\r\n }\r\n }\r\n return [added, updated]\r\n}\r\n","import type {\r\n EntityState,\r\n EntityStateAdapter,\r\n IdSelector,\r\n Update,\r\n EntityId,\r\n} from './models'\r\nimport {\r\n createStateOperator,\r\n createSingleArgumentStateOperator,\r\n} from './state_adapter'\r\nimport {\r\n selectIdValue,\r\n ensureEntitiesArray,\r\n splitAddedUpdatedEntities,\r\n} from './utils'\r\n\r\nexport function createUnsortedStateAdapter<T>(\r\n selectId: IdSelector<T>\r\n): EntityStateAdapter<T> {\r\n type R = EntityState<T>\r\n\r\n function addOneMutably(entity: T, state: R): void {\r\n const key = selectIdValue(entity, selectId)\r\n\r\n if (key in state.entities) {\r\n return\r\n }\r\n\r\n state.ids.push(key)\r\n state.entities[key] = entity\r\n }\r\n\r\n function addManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n for (const entity of newEntities) {\r\n addOneMutably(entity, state)\r\n }\r\n }\r\n\r\n function setOneMutably(entity: T, state: R): void {\r\n const key = selectIdValue(entity, selectId)\r\n if (!(key in state.entities)) {\r\n state.ids.push(key)\r\n }\r\n state.entities[key] = entity\r\n }\r\n\r\n function setManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n for (const entity of newEntities) {\r\n setOneMutably(entity, state)\r\n }\r\n }\r\n\r\n function setAllMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n state.ids = []\r\n state.entities = {}\r\n\r\n addManyMutably(newEntities, state)\r\n }\r\n\r\n function removeOneMutably(key: EntityId, state: R): void {\r\n return removeManyMutably([key], state)\r\n }\r\n\r\n function removeManyMutably(keys: readonly EntityId[], state: R): void {\r\n let didMutate = false\r\n\r\n keys.forEach((key) => {\r\n if (key in state.entities) {\r\n delete state.entities[key]\r\n didMutate = true\r\n }\r\n })\r\n\r\n if (didMutate) {\r\n state.ids = state.ids.filter((id) => id in state.entities)\r\n }\r\n }\r\n\r\n function removeAllMutably(state: R): void {\r\n Object.assign(state, {\r\n ids: [],\r\n entities: {},\r\n })\r\n }\r\n\r\n function takeNewKey(\r\n keys: { [id: string]: EntityId },\r\n update: Update<T>,\r\n state: R\r\n ): boolean {\r\n const original = state.entities[update.id]\r\n const updated: T = Object.assign({}, original, update.changes)\r\n const newKey = selectIdValue(updated, selectId)\r\n const hasNewKey = newKey !== update.id\r\n\r\n if (hasNewKey) {\r\n keys[update.id] = newKey\r\n delete state.entities[update.id]\r\n }\r\n\r\n state.entities[newKey] = updated\r\n\r\n return hasNewKey\r\n }\r\n\r\n function updateOneMutably(update: Update<T>, state: R): void {\r\n return updateManyMutably([update], state)\r\n }\r\n\r\n function updateManyMutably(\r\n updates: ReadonlyArray<Update<T>>,\r\n state: R\r\n ): void {\r\n const newKeys: { [id: string]: EntityId } = {}\r\n\r\n const updatesPerEntity: { [id: string]: Update<T> } = {}\r\n\r\n updates.forEach((update) => {\r\n // Only apply updates to entities that currently exist\r\n if (update.id in state.entities) {\r\n // If there are multiple updates to one entity, merge them together\r\n updatesPerEntity[update.id] = {\r\n id: update.id,\r\n // Spreads ignore falsy values, so this works even if there isn't\r\n // an existing update already at this key\r\n changes: {\r\n ...(updatesPerEntity[update.id]\r\n ? updatesPerEntity[update.id].changes\r\n : null),\r\n ...update.changes,\r\n },\r\n }\r\n }\r\n })\r\n\r\n updates = Object.values(updatesPerEntity)\r\n\r\n const didMutateEntities = updates.length > 0\r\n\r\n if (didMutateEntities) {\r\n const didMutateIds =\r\n updates.filter((update) => takeNewKey(newKeys, update, state)).length >\r\n 0\r\n\r\n if (didMutateIds) {\r\n state.ids = state.ids.map((id) => newKeys[id] || id)\r\n }\r\n }\r\n }\r\n\r\n function upsertOneMutably(entity: T, state: R): void {\r\n return upsertManyMutably([entity], state)\r\n }\r\n\r\n function upsertManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n const [added, updated] = splitAddedUpdatedEntities<T>(\r\n newEntities,\r\n selectId,\r\n state\r\n )\r\n\r\n updateManyMutably(updated, state)\r\n addManyMutably(added, state)\r\n }\r\n\r\n return {\r\n removeAll: createSingleArgumentStateOperator(removeAllMutably),\r\n addOne: createStateOperator(addOneMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n upsertMany: createStateOperator(upsertManyMutably),\r\n removeOne: createStateOperator(removeOneMutably),\r\n removeMany: createStateOperator(removeManyMutably),\r\n }\r\n}\r\n","import type {\r\n EntityState,\r\n IdSelector,\r\n Comparer,\r\n EntityStateAdapter,\r\n Update,\r\n EntityId,\r\n} from './models'\r\nimport { createStateOperator } from './state_adapter'\r\nimport { createUnsortedStateAdapter } from './unsorted_state_adapter'\r\nimport {\r\n selectIdValue,\r\n ensureEntitiesArray,\r\n splitAddedUpdatedEntities,\r\n} from './utils'\r\n\r\nexport function createSortedStateAdapter<T>(\r\n selectId: IdSelector<T>,\r\n sort: Comparer<T>\r\n): EntityStateAdapter<T> {\r\n type R = EntityState<T>\r\n\r\n const { removeOne, removeMany, removeAll } =\r\n createUnsortedStateAdapter(selectId)\r\n\r\n function addOneMutably(entity: T, state: R): void {\r\n return addManyMutably([entity], state)\r\n }\r\n\r\n function addManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n const models = newEntities.filter(\r\n (model) => !(selectIdValue(model, selectId) in state.entities)\r\n )\r\n\r\n if (models.length !== 0) {\r\n merge(models, state)\r\n }\r\n }\r\n\r\n function setOneMutably(entity: T, state: R): void {\r\n return setManyMutably([entity], state)\r\n }\r\n\r\n function setManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n if (newEntities.length !== 0) {\r\n merge(newEntities, state)\r\n }\r\n }\r\n\r\n function setAllMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n state.entities = {}\r\n state.ids = []\r\n\r\n addManyMutably(newEntities, state)\r\n }\r\n\r\n function updateOneMutably(update: Update<T>, state: R): void {\r\n return updateManyMutably([update], state)\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types\r\n function takeUpdatedModel(models: T[], update: Update<T>, state: R): boolean {\r\n if (!(update.id in state.entities)) {\r\n return false\r\n }\r\n\r\n const original = state.entities[update.id]\r\n const updated = Object.assign({}, original, update.changes)\r\n const newKey = selectIdValue(updated, selectId)\r\n\r\n delete state.entities[update.id]\r\n\r\n models.push(updated)\r\n\r\n return newKey !== update.id\r\n }\r\n\r\n function updateManyMutably(\r\n updates: ReadonlyArray<Update<T>>,\r\n state: R\r\n ): void {\r\n const models: T[] = []\r\n\r\n updates.forEach((update) => takeUpdatedModel(models, update, state))\r\n\r\n if (models.length !== 0) {\r\n merge(models, state)\r\n }\r\n }\r\n\r\n function upsertOneMutably(entity: T, state: R): void {\r\n return upsertManyMutably([entity], state)\r\n }\r\n\r\n function upsertManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n const [added, updated] = splitAddedUpdatedEntities<T>(\r\n newEntities,\r\n selectId,\r\n state\r\n )\r\n\r\n updateManyMutably(updated, state)\r\n addManyMutably(added, state)\r\n }\r\n\r\n function areArraysEqual(a: readonly unknown[], b: readonly unknown[]) {\r\n if (a.length !== b.length) {\r\n return false\r\n }\r\n\r\n for (let i = 0; i < a.length && i < b.length; i++) {\r\n if (a[i] === b[i]) {\r\n continue\r\n }\r\n return false\r\n }\r\n return true\r\n }\r\n\r\n function merge(models: readonly T[], state: R): void {\r\n // Insert/overwrite all new/updated\r\n models.forEach((model) => {\r\n state.entities[selectId(model)] = model\r\n })\r\n\r\n const allEntities = Object.values(state.entities) as T[]\r\n allEntities.sort(sort)\r\n\r\n const newSortedIds = allEntities.map(selectId)\r\n const { ids } = state\r\n\r\n if (!areArraysEqual(ids, newSortedIds)) {\r\n state.ids = newSortedIds\r\n }\r\n }\r\n\r\n return {\r\n removeOne,\r\n removeMany,\r\n removeAll,\r\n addOne: createStateOperator(addOneMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertMany: createStateOperator(upsertManyMutably),\r\n }\r\n}\r\n","import type {\r\n EntityDefinition,\r\n Comparer,\r\n IdSelector,\r\n EntityAdapter,\r\n} from './models'\r\nimport { createInitialStateFactory } from './entity_state'\r\nimport { createSelectorsFactory } from './state_selectors'\r\nimport { createSortedStateAdapter } from './sorted_state_adapter'\r\nimport { createUnsortedStateAdapter } from './unsorted_state_adapter'\r\n\r\n/**\r\n *\r\n * @param options\r\n *\r\n * @public\r\n */\r\nexport function createEntityAdapter<T>(\r\n options: {\r\n selectId?: IdSelector<T>\r\n sortComparer?: false | Comparer<T>\r\n } = {}\r\n): EntityAdapter<T> {\r\n const { selectId, sortComparer }: EntityDefinition<T> = {\r\n sortComparer: false,\r\n selectId: (instance: any) => instance.id,\r\n ...options,\r\n }\r\n\r\n const stateFactory = createInitialStateFactory<T>()\r\n const selectorsFactory = createSelectorsFactory<T>()\r\n const stateAdapter = sortComparer\r\n ? createSortedStateAdapter(selectId, sortComparer)\r\n : createUnsortedStateAdapter(selectId)\r\n\r\n return {\r\n selectId,\r\n sortComparer,\r\n ...stateFactory,\r\n ...selectorsFactory,\r\n ...stateAdapter,\r\n }\r\n}\r\n","// Borrowed from https://github.com/ai/nanoid/blob/3.0.2/non-secure/index.js\r\n// This alphabet uses `A-Za-z0-9_-` symbols. A genetic algorithm helped\r\n// optimize the gzip compression for this alphabet.\r\nlet urlAlphabet =\r\n 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'\r\n\r\n/**\r\n *\r\n * @public\r\n */\r\nexport let nanoid = (size = 21) => {\r\n let id = ''\r\n // A compact alternative for `for (var i = 0; i < step; i++)`.\r\n let i = size\r\n while (i--) {\r\n // `| 0` is more compact and faster than `Math.floor()`.\r\n id += urlAlphabet[(Math.random() * 64) | 0]\r\n }\r\n return id\r\n}\r\n","import type { Dispatch, AnyAction } from 'redux'\r\nimport type {\r\n PayloadAction,\r\n ActionCreatorWithPreparedPayload,\r\n} from './createAction'\r\nimport { createAction } from './createAction'\r\nimport type { ThunkDispatch } from 'redux-thunk'\r\nimport type { FallbackIfUnknown, IsAny, IsUnknown } from './tsHelpers'\r\nimport { nanoid } from './nanoid'\r\n\r\n// @ts-ignore we need the import of these types due to a bundling issue.\r\ntype _Keep = PayloadAction | ActionCreatorWithPreparedPayload<any, unknown>\r\n\r\nexport type BaseThunkAPI<\r\n S,\r\n E,\r\n D extends Dispatch = Dispatch,\r\n RejectedValue = undefined,\r\n RejectedMeta = unknown,\r\n FulfilledMeta = unknown\r\n> = {\r\n dispatch: D\r\n getState: () => S\r\n extra: E\r\n requestId: string\r\n signal: AbortSignal\r\n rejectWithValue: IsUnknown<\r\n RejectedMeta,\r\n (value: RejectedValue) => RejectWithValue<RejectedValue, RejectedMeta>,\r\n (\r\n value: RejectedValue,\r\n meta: RejectedMeta\r\n ) => RejectWithValue<RejectedValue, RejectedMeta>\r\n >\r\n fulfillWithValue: IsUnknown<\r\n FulfilledMeta,\r\n <FulfilledValue>(\r\n value: FulfilledValue\r\n ) => FulfillWithMeta<FulfilledValue, FulfilledMeta>,\r\n <FulfilledValue>(\r\n value: FulfilledValue,\r\n meta: FulfilledMeta\r\n ) => FulfillWithMeta<FulfilledValue, FulfilledMeta>\r\n >\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport interface SerializedError {\r\n name?: string\r\n message?: string\r\n stack?: string\r\n code?: string\r\n}\r\n\r\nconst commonProperties: Array<keyof SerializedError> = [\r\n 'name',\r\n 'message',\r\n 'stack',\r\n 'code',\r\n]\r\n\r\nclass RejectWithValue<Payload, RejectedMeta> {\r\n /*\r\n type-only property to distinguish between RejectWithValue and FulfillWithMeta\r\n does not exist at runtime\r\n */\r\n private readonly _type!: 'RejectWithValue'\r\n constructor(\r\n public readonly payload: Payload,\r\n public readonly meta: RejectedMeta\r\n ) {}\r\n}\r\n\r\nclass FulfillWithMeta<Payload, FulfilledMeta> {\r\n /*\r\n type-only property to distinguish between RejectWithValue and FulfillWithMeta\r\n does not exist at runtime\r\n */\r\n private readonly _type!: 'FulfillWithMeta'\r\n constructor(\r\n public readonly payload: Payload,\r\n public readonly meta: FulfilledMeta\r\n ) {}\r\n}\r\n\r\n/**\r\n * Serializes an error into a plain object.\r\n * Reworked from https://github.com/sindresorhus/serialize-error\r\n *\r\n * @public\r\n */\r\nexport const miniSerializeError = (value: any): SerializedError => {\r\n if (typeof value === 'object' && value !== null) {\r\n const simpleError: SerializedError = {}\r\n for (const property of commonProperties) {\r\n if (typeof value[property] === 'string') {\r\n simpleError[property] = value[property]\r\n }\r\n }\r\n\r\n return simpleError\r\n }\r\n\r\n return { message: String(value) }\r\n}\r\n\r\ntype AsyncThunkConfig = {\r\n state?: unknown\r\n dispatch?: Dispatch\r\n extra?: unknown\r\n rejectValue?: unknown\r\n serializedErrorType?: unknown\r\n pendingMeta?: unknown\r\n fulfilledMeta?: unknown\r\n rejectedMeta?: unknown\r\n}\r\n\r\ntype GetState<ThunkApiConfig> = ThunkApiConfig extends {\r\n state: infer State\r\n}\r\n ? State\r\n : unknown\r\ntype GetExtra<ThunkApiConfig> = ThunkApiConfig extends { extra: infer Extra }\r\n ? Extra\r\n : unknown\r\ntype GetDispatch<ThunkApiConfig> = ThunkApiConfig extends {\r\n dispatch: infer Dispatch\r\n}\r\n ? FallbackIfUnknown<\r\n Dispatch,\r\n ThunkDispatch<\r\n GetState<ThunkApiConfig>,\r\n GetExtra<ThunkApiConfig>,\r\n AnyAction\r\n >\r\n >\r\n : ThunkDispatch<GetState<ThunkApiConfig>, GetExtra<ThunkApiConfig>, AnyAction>\r\n\r\ntype GetThunkAPI<ThunkApiConfig> = BaseThunkAPI<\r\n GetState<ThunkApiConfig>,\r\n GetExtra<ThunkApiConfig>,\r\n GetDispatch<ThunkApiConfig>,\r\n GetRejectValue<ThunkApiConfig>,\r\n GetRejectedMeta<ThunkApiConfig>,\r\n GetFulfilledMeta<ThunkApiConfig>\r\n>\r\n\r\ntype GetRejectValue<ThunkApiConfig> = ThunkApiConfig extends {\r\n rejectValue: infer RejectValue\r\n}\r\n ? RejectValue\r\n : unknown\r\n\r\ntype GetPendingMeta<ThunkApiConfig> = ThunkApiConfig extends {\r\n pendingMeta: infer PendingMeta\r\n}\r\n ? PendingMeta\r\n : unknown\r\n\r\ntype GetFulfilledMeta<ThunkApiConfig> = ThunkApiConfig extends {\r\n fulfilledMeta: infer FulfilledMeta\r\n}\r\n ? FulfilledMeta\r\n : unknown\r\n\r\ntype GetRejectedMeta<ThunkApiConfig> = ThunkApiConfig extends {\r\n rejectedMeta: infer RejectedMeta\r\n}\r\n ? RejectedMeta\r\n : unknown\r\n\r\ntype GetSerializedErrorType<ThunkApiConfig> = ThunkApiConfig extends {\r\n serializedErrorType: infer GetSerializedErrorType\r\n}\r\n ? GetSerializedErrorType\r\n : SerializedError\r\n\r\ntype MaybePromise<T> = T | Promise<T> | (T extends any ? Promise<T> : never)\r\n\r\n/**\r\n * A type describing the return value of the `payloadCreator` argument to `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkPayloadCreatorReturnValue<\r\n Returned,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = MaybePromise<\r\n | IsUnknown<\r\n GetFulfilledMeta<ThunkApiConfig>,\r\n Returned,\r\n FulfillWithMeta<Returned, GetFulfilledMeta<ThunkApiConfig>>\r\n >\r\n | RejectWithValue<\r\n GetRejectValue<ThunkApiConfig>,\r\n GetRejectedMeta<ThunkApiConfig>\r\n >\r\n>\r\n/**\r\n * A type describing the `payloadCreator` argument to `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkPayloadCreator<\r\n Returned,\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n> = (\r\n arg: ThunkArg,\r\n thunkAPI: GetThunkAPI<ThunkApiConfig>\r\n) => AsyncThunkPayloadCreatorReturnValue<Returned, ThunkApiConfig>\r\n\r\n/**\r\n * A ThunkAction created by `createAsyncThunk`.\r\n * Dispatching it returns a Promise for either a\r\n * fulfilled or rejected action.\r\n * Also, the returned value contains an `abort()` method\r\n * that allows the asyncAction to be cancelled from the outside.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkAction<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = (\r\n dispatch: GetDispatch<ThunkApiConfig>,\r\n getState: () => GetState<ThunkApiConfig>,\r\n extra: GetExtra<ThunkApiConfig>\r\n) => Promise<\r\n | ReturnType<AsyncThunkFulfilledActionCreator<Returned, ThunkArg>>\r\n | ReturnType<AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>>\r\n> & {\r\n abort: (reason?: string) => void\r\n requestId: string\r\n arg: ThunkArg\r\n unwrap: () => Promise<Returned>\r\n}\r\n\r\ntype AsyncThunkActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = IsAny<\r\n ThunkArg,\r\n // any handling\r\n (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>,\r\n // unknown handling\r\n unknown extends ThunkArg\r\n ? (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument not specified or specified as void or undefined\r\n : [ThunkArg] extends [void] | [undefined]\r\n ? () => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument contains void\r\n : [void] extends [ThunkArg] // make optional\r\n ? (arg?: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument contains undefined\r\n : [undefined] extends [ThunkArg]\r\n ? WithStrictNullChecks<\r\n // with strict nullChecks: make optional\r\n (\r\n arg?: ThunkArg\r\n ) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>,\r\n // without strict null checks this will match everything, so don't make it optional\r\n (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>\r\n > // default case: normal argument\r\n : (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>\r\n>\r\n\r\n/**\r\n * Options object for `createAsyncThunk`.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkOptions<\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n> = {\r\n /**\r\n * A method to control whether the asyncThunk should be executed. Has access to the\r\n * `arg`, `api.getState()` and `api.extra` arguments.\r\n *\r\n * @returns `false` if it should be skipped\r\n */\r\n condition?(\r\n arg: ThunkArg,\r\n api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>\r\n ): boolean | undefined\r\n /**\r\n * If `condition` returns `false`, the asyncThunk will be skipped.\r\n * This option allows you to control whether a `rejected` action with `meta.condition == false`\r\n * will be dispatched or not.\r\n *\r\n * @default `false`\r\n */\r\n dispatchConditionRejection?: boolean\r\n\r\n serializeError?: (x: unknown) => GetSerializedErrorType<ThunkApiConfig>\r\n\r\n /**\r\n * A function to use when generating the `requestId` for the request sequence.\r\n *\r\n * @default `nanoid`\r\n */\r\n idGenerator?: () => string\r\n} & IsUnknown<\r\n GetPendingMeta<ThunkApiConfig>,\r\n {\r\n /**\r\n * A method to generate additional properties to be added to `meta` of the pending action.\r\n *\r\n * Using this optional overload will not modify the types correctly, this overload is only in place to support JavaScript users.\r\n * Please use the `ThunkApiConfig` parameter `pendingMeta` to get access to a correctly typed overload\r\n */\r\n getPendingMeta?(\r\n base: {\r\n arg: ThunkArg\r\n requestId: string\r\n },\r\n api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>\r\n ): GetPendingMeta<ThunkApiConfig>\r\n },\r\n {\r\n /**\r\n * A method to generate additional properties to be added to `meta` of the pending action.\r\n */\r\n getPendingMeta(\r\n base: {\r\n arg: ThunkArg\r\n requestId: string\r\n },\r\n api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>\r\n ): GetPendingMeta<ThunkApiConfig>\r\n }\r\n>\r\n\r\nexport type AsyncThunkPendingActionCreator<\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [string, ThunkArg, GetPendingMeta<ThunkApiConfig>?],\r\n undefined,\r\n string,\r\n never,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'pending'\r\n } & GetPendingMeta<ThunkApiConfig>\r\n>\r\n\r\nexport type AsyncThunkRejectedActionCreator<\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [\r\n Error | null,\r\n string,\r\n ThunkArg,\r\n GetRejectValue<ThunkApiConfig>?,\r\n GetRejectedMeta<ThunkApiConfig>?\r\n ],\r\n GetRejectValue<ThunkApiConfig> | undefined,\r\n string,\r\n GetSerializedErrorType<ThunkApiConfig>,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'rejected'\r\n aborted: boolean\r\n condition: boolean\r\n } & (\r\n | ({ rejectedWithValue: false } & {\r\n [K in keyof GetRejectedMeta<ThunkApiConfig>]?: undefined\r\n })\r\n | ({ rejectedWithValue: true } & GetRejectedMeta<ThunkApiConfig>)\r\n )\r\n>\r\n\r\nexport type AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [Returned, string, ThunkArg, GetFulfilledMeta<ThunkApiConfig>?],\r\n Returned,\r\n string,\r\n never,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'fulfilled'\r\n } & GetFulfilledMeta<ThunkApiConfig>\r\n>\r\n\r\n/**\r\n * A type describing the return value of `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunk<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = AsyncThunkActionCreator<Returned, ThunkArg, ThunkApiConfig> & {\r\n pending: AsyncThunkPendingActionCreator<ThunkArg, ThunkApiConfig>\r\n rejected: AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>\r\n fulfilled: AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n >\r\n typePrefix: string\r\n}\r\n\r\n/**\r\n *\r\n * @param typePrefix\r\n * @param payloadCreator\r\n * @param options\r\n *\r\n * @public\r\n */\r\nexport function createAsyncThunk<\r\n Returned,\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n>(\r\n typePrefix: string,\r\n payloadCreator: AsyncThunkPayloadCreator<Returned, ThunkArg, ThunkApiConfig>,\r\n options?: AsyncThunkOptions<ThunkArg, ThunkApiConfig>\r\n): AsyncThunk<Returned, ThunkArg, ThunkApiConfig> {\r\n type RejectedValue = GetRejectValue<ThunkApiConfig>\r\n type PendingMeta = GetPendingMeta<ThunkApiConfig>\r\n type FulfilledMeta = GetFulfilledMeta<ThunkApiConfig>\r\n type RejectedMeta = GetRejectedMeta<ThunkApiConfig>\r\n\r\n const fulfilled: AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n > = createAction(\r\n typePrefix + '/fulfilled',\r\n (\r\n payload: Returned,\r\n requestId: string,\r\n arg: ThunkArg,\r\n meta?: FulfilledMeta\r\n ) => ({\r\n payload,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n requestStatus: 'fulfilled' as const,\r\n },\r\n })\r\n )\r\n\r\n const pending: AsyncThunkPendingActionCreator<ThunkArg, ThunkApiConfig> =\r\n createAction(\r\n typePrefix + '/pending',\r\n (requestId: string, arg: ThunkArg, meta?: PendingMeta) => ({\r\n payload: undefined,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n requestStatus: 'pending' as const,\r\n },\r\n })\r\n )\r\n\r\n const rejected: AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig> =\r\n createAction(\r\n typePrefix + '/rejected',\r\n (\r\n error: Error | null,\r\n requestId: string,\r\n arg: ThunkArg,\r\n payload?: RejectedValue,\r\n meta?: RejectedMeta\r\n ) => ({\r\n payload,\r\n error: ((options && options.serializeError) || miniSerializeError)(\r\n error || 'Rejected'\r\n ) as GetSerializedErrorType<ThunkApiConfig>,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n rejectedWithValue: !!payload,\r\n requestStatus: 'rejected' as const,\r\n aborted: error?.name === 'AbortError',\r\n condition: error?.name === 'ConditionError',\r\n },\r\n })\r\n )\r\n\r\n let displayedWarning = false\r\n\r\n const AC =\r\n typeof AbortController !== 'undefined'\r\n ? AbortController\r\n : class implements AbortController {\r\n signal: AbortSignal = {\r\n aborted: false,\r\n addEventListener() {},\r\n dispatchEvent() {\r\n return false\r\n },\r\n onabort() {},\r\n removeEventListener() {},\r\n }\r\n abort() {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (!displayedWarning) {\r\n displayedWarning = true\r\n console.info(\r\n `This platform does not implement AbortController. \r\nIf you want to use the AbortController to react to \\`abort\\` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.`\r\n )\r\n }\r\n }\r\n }\r\n }\r\n\r\n function actionCreator(\r\n arg: ThunkArg\r\n ): AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> {\r\n return (dispatch, getState, extra) => {\r\n const requestId = (options?.idGenerator ?? nanoid)()\r\n\r\n const abortController = new AC()\r\n let abortReason: string | undefined\r\n\r\n const abortedPromise = new Promise<never>((_, reject) =>\r\n abortController.signal.addEventListener('abort', () =>\r\n reject({ name: 'AbortError', message: abortReason || 'Aborted' })\r\n )\r\n )\r\n\r\n let started = false\r\n function abort(reason?: string) {\r\n if (started) {\r\n abortReason = reason\r\n abortController.abort()\r\n }\r\n }\r\n\r\n const promise = (async function () {\r\n let finalAction: ReturnType<typeof fulfilled | typeof rejected>\r\n try {\r\n if (\r\n options &&\r\n options.condition &&\r\n options.condition(arg, { getState, extra }) === false\r\n ) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw {\r\n name: 'ConditionError',\r\n message: 'Aborted due to condition callback returning false.',\r\n }\r\n }\r\n started = true\r\n dispatch(\r\n pending(\r\n requestId,\r\n arg,\r\n options?.getPendingMeta?.({ requestId, arg }, { getState, extra })\r\n )\r\n )\r\n finalAction = await Promise.race([\r\n abortedPromise,\r\n Promise.resolve(\r\n payloadCreator(arg, {\r\n dispatch,\r\n getState,\r\n extra,\r\n requestId,\r\n signal: abortController.signal,\r\n rejectWithValue: ((\r\n value: RejectedValue,\r\n meta?: RejectedMeta\r\n ) => {\r\n return new RejectWithValue(value, meta)\r\n }) as any,\r\n fulfillWithValue: ((value: unknown, meta?: FulfilledMeta) => {\r\n return new FulfillWithMeta(value, meta)\r\n }) as any,\r\n })\r\n ).then((result) => {\r\n if (result instanceof RejectWithValue) {\r\n throw result\r\n }\r\n if (result instanceof FulfillWithMeta) {\r\n return fulfilled(result.payload, requestId, arg, result.meta)\r\n }\r\n return fulfilled(result as any, requestId, arg)\r\n }),\r\n ])\r\n } catch (err) {\r\n finalAction =\r\n err instanceof RejectWithValue\r\n ? rejected(null, requestId, arg, err.payload, err.meta)\r\n : rejected(err as any, requestId, arg)\r\n }\r\n // We dispatch the result action _after_ the catch, to avoid having any errors\r\n // here get swallowed by the try/catch block,\r\n // per https://twitter.com/dan_abramov/status/770914221638942720\r\n // and https://github.com/reduxjs/redux-toolkit/blob/e85eb17b39a2118d859f7b7746e0f3fee523e089/docs/tutorials/advanced-tutorial.md#async-error-handling-logic-in-thunks\r\n\r\n const skipDispatch =\r\n options &&\r\n !options.dispatchConditionRejection &&\r\n rejected.match(finalAction) &&\r\n (finalAction as any).meta.condition\r\n\r\n if (!skipDispatch) {\r\n dispatch(finalAction)\r\n }\r\n return finalAction\r\n })()\r\n return Object.assign(promise as Promise<any>, {\r\n abort,\r\n requestId,\r\n arg,\r\n unwrap() {\r\n return promise.then<any>(unwrapResult)\r\n },\r\n })\r\n }\r\n }\r\n\r\n return Object.assign(\r\n actionCreator as AsyncThunkActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n >,\r\n {\r\n pending,\r\n rejected,\r\n fulfilled,\r\n typePrefix,\r\n }\r\n )\r\n}\r\n\r\ninterface UnwrappableAction {\r\n payload: any\r\n meta?: any\r\n error?: any\r\n}\r\n\r\ntype UnwrappedActionPayload<T extends UnwrappableAction> = Exclude<\r\n T,\r\n { error: any }\r\n>['payload']\r\n\r\n/**\r\n * @public\r\n */\r\nexport function unwrapResult<R extends UnwrappableAction>(\r\n action: R\r\n): UnwrappedActionPayload<R> {\r\n if (action.meta && action.meta.rejectedWithValue) {\r\n throw action.payload\r\n }\r\n if (action.error) {\r\n throw action.error\r\n }\r\n return action.payload\r\n}\r\n\r\ntype WithStrictNullChecks<True, False> = undefined extends boolean\r\n ? False\r\n : True\r\n","import type { Middleware } from 'redux'\r\n\r\n/**\r\n * return True if T is `any`, otherwise return False\r\n * taken from https://github.com/joonhocho/tsdef\r\n *\r\n * @internal\r\n */\r\nexport type IsAny<T, True, False = never> =\r\n // test if we are going the left AND right path in the condition\r\n true | false extends (T extends never ? true : false) ? True : False\r\n\r\n/**\r\n * return True if T is `unknown`, otherwise return False\r\n * taken from https://github.com/joonhocho/tsdef\r\n *\r\n * @internal\r\n */\r\nexport type IsUnknown<T, True, False = never> = unknown extends T\r\n ? IsAny<T, False, True>\r\n : False\r\n\r\nexport type FallbackIfUnknown<T, Fallback> = IsUnknown<T, Fallback, T>\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IfMaybeUndefined<P, True, False> = [undefined] extends [P]\r\n ? True\r\n : False\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IfVoid<P, True, False> = [void] extends [P] ? True : False\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IsEmptyObj<T, True, False = never> = T extends any\r\n ? keyof T extends never\r\n ? IsUnknown<T, False, IfMaybeUndefined<T, False, IfVoid<T, False, True>>>\r\n : False\r\n : never\r\n\r\n/**\r\n * returns True if TS version is above 3.5, False if below.\r\n * uses feature detection to detect TS version >= 3.5\r\n * * versions below 3.5 will return `{}` for unresolvable interference\r\n * * versions above will return `unknown`\r\n *\r\n * @internal\r\n */\r\nexport type AtLeastTS35<True, False> = [True, False][IsUnknown<\r\n ReturnType<<T>() => T>,\r\n 0,\r\n 1\r\n>]\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IsUnknownOrNonInferrable<T, True, False> = AtLeastTS35<\r\n IsUnknown<T, True, False>,\r\n IsEmptyObj<T, True, IsUnknown<T, True, False>>\r\n>\r\n\r\n/**\r\n * Combines all dispatch signatures of all middlewares in the array `M` into\r\n * one intersected dispatch signature.\r\n */\r\nexport type DispatchForMiddlewares<M> = M extends ReadonlyArray<any>\r\n ? UnionToIntersection<\r\n M[number] extends infer MiddlewareValues\r\n ? MiddlewareValues extends Middleware<infer DispatchExt, any, any>\r\n ? DispatchExt extends Function\r\n ? IsAny<DispatchExt, never, DispatchExt>\r\n : never\r\n : never\r\n : never\r\n >\r\n : never\r\n\r\n/**\r\n * Convert a Union type `(A|B)` to an intersection type `(A&B)`\r\n */\r\nexport type UnionToIntersection<U> = (\r\n U extends any ? (k: U) => void : never\r\n) extends (k: infer I) => void\r\n ? I\r\n : never\r\n\r\n/**\r\n * Helper type. Passes T out again, but boxes it in a way that it cannot\r\n * \"widen\" the type by accident if it is a generic that should be inferred\r\n * from elsewhere.\r\n *\r\n * @internal\r\n */\r\nexport type NoInfer<T> = [T][T extends any ? 0 : never]\r\n\r\nexport type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>\r\n\r\nexport interface HasMatchFunction<T> {\r\n match: (v: any) => v is T\r\n}\r\n\r\nexport const hasMatchFunction = <T>(\r\n v: Matcher<T>\r\n): v is HasMatchFunction<T> => {\r\n return v && typeof (v as HasMatchFunction<T>).match === 'function'\r\n}\r\n\r\n/** @public */\r\nexport type Matcher<T> = HasMatchFunction<T> | ((v: any) => v is T)\r\n\r\n/** @public */\r\nexport type ActionFromMatcher<M extends Matcher<any>> = M extends Matcher<\r\n infer T\r\n>\r\n ? T\r\n : never\r\n","import type {\r\n ActionFromMatcher,\r\n Matcher,\r\n UnionToIntersection,\r\n} from './tsHelpers'\r\nimport { hasMatchFunction } from './tsHelpers'\r\nimport type {\r\n AsyncThunk,\r\n AsyncThunkFulfilledActionCreator,\r\n AsyncThunkPendingActionCreator,\r\n AsyncThunkRejectedActionCreator,\r\n} from './createAsyncThunk'\r\n\r\n/** @public */\r\nexport type ActionMatchingAnyOf<\r\n Matchers extends [Matcher<any>, ...Matcher<any>[]]\r\n> = ActionFromMatcher<Matchers[number]>\r\n\r\n/** @public */\r\nexport type ActionMatchingAllOf<\r\n Matchers extends [Matcher<any>, ...Matcher<any>[]]\r\n> = UnionToIntersection<ActionMatchingAnyOf<Matchers>>\r\n\r\nconst matches = (matcher: Matcher<any>, action: any) => {\r\n if (hasMatchFunction(matcher)) {\r\n return matcher.match(action)\r\n } else {\r\n return matcher(action)\r\n }\r\n}\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action matches any one of the supplied type guards or action\r\n * creators.\r\n *\r\n * @param matchers The type guards or action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAnyOf<Matchers extends [Matcher<any>, ...Matcher<any>[]]>(\r\n ...matchers: Matchers\r\n) {\r\n return (action: any): action is ActionMatchingAnyOf<Matchers> => {\r\n return matchers.some((matcher) => matches(matcher, action))\r\n }\r\n}\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action matches all of the supplied type guards or action\r\n * creators.\r\n *\r\n * @param matchers The type guards or action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAllOf<Matchers extends [Matcher<any>, ...Matcher<any>[]]>(\r\n ...matchers: Matchers\r\n) {\r\n return (action: any): action is ActionMatchingAllOf<Matchers> => {\r\n return matchers.every((matcher) => matches(matcher, action))\r\n }\r\n}\r\n\r\n/**\r\n * @param action A redux action\r\n * @param validStatus An array of valid meta.requestStatus values\r\n *\r\n * @internal\r\n */\r\nexport function hasExpectedRequestMetadata(\r\n action: any,\r\n validStatus: readonly string[]\r\n) {\r\n if (!action || !action.meta) return false\r\n\r\n const hasValidRequestId = typeof action.meta.requestId === 'string'\r\n const hasValidRequestStatus =\r\n validStatus.indexOf(action.meta.requestStatus) > -1\r\n\r\n return hasValidRequestId && hasValidRequestStatus\r\n}\r\n\r\nfunction isAsyncThunkArray(a: [any] | AnyAsyncThunk[]): a is AnyAsyncThunk[] {\r\n return (\r\n typeof a[0] === 'function' &&\r\n 'pending' in a[0] &&\r\n 'fulfilled' in a[0] &&\r\n 'rejected' in a[0]\r\n )\r\n}\r\n\r\nexport type UnknownAsyncThunkPendingAction = ReturnType<\r\n AsyncThunkPendingActionCreator<unknown>\r\n>\r\n\r\nexport type PendingActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['pending']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is pending.\r\n *\r\n * @public\r\n */\r\nexport function isPending(): (\r\n action: any\r\n) => action is UnknownAsyncThunkPendingAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is pending.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isPending<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is PendingActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a pending thunk action\r\n * @public\r\n */\r\nexport function isPending(action: any): action is UnknownAsyncThunkPendingAction\r\nexport function isPending<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['pending'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isPending()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is PendingActionFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.pending\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkRejectedAction = ReturnType<\r\n AsyncThunkRejectedActionCreator<unknown, unknown>\r\n>\r\n\r\nexport type RejectedActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['rejected']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is rejected.\r\n *\r\n * @public\r\n */\r\nexport function isRejected(): (\r\n action: any\r\n) => action is UnknownAsyncThunkRejectedAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is rejected.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isRejected<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is RejectedActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a rejected thunk action\r\n * @public\r\n */\r\nexport function isRejected(\r\n action: any\r\n): action is UnknownAsyncThunkRejectedAction\r\nexport function isRejected<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['rejected'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejected()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is RejectedActionFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.rejected\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkRejectedWithValueAction = ReturnType<\r\n AsyncThunkRejectedActionCreator<unknown, unknown>\r\n>\r\n\r\nexport type RejectedWithValueActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['rejected']> &\r\n (T extends AsyncThunk<any, any, { rejectValue: infer RejectedValue }>\r\n ? { payload: RejectedValue }\r\n : unknown)\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is rejected with value.\r\n *\r\n * @public\r\n */\r\nexport function isRejectedWithValue(): (\r\n action: any\r\n) => action is UnknownAsyncThunkRejectedAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is rejected with value.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isRejectedWithValue<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (\r\n action: any\r\n) => action is RejectedWithValueActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a rejected thunk action with value\r\n * @public\r\n */\r\nexport function isRejectedWithValue(\r\n action: any\r\n): action is UnknownAsyncThunkRejectedAction\r\nexport function isRejectedWithValue<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n const hasFlag = (action: any): action is any => {\r\n return action && action.meta && action.meta.rejectedWithValue\r\n }\r\n\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => {\r\n const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag)\r\n\r\n return combinedMatcher(action)\r\n }\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejectedWithValue()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is RejectedActionFromAsyncThunk<AsyncThunks[number]> => {\r\n const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkFulfilledAction = ReturnType<\r\n AsyncThunkFulfilledActionCreator<unknown, unknown>\r\n>\r\n\r\nexport type FulfilledActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['fulfilled']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is fulfilled.\r\n *\r\n * @public\r\n */\r\nexport function isFulfilled(): (\r\n action: any\r\n) => action is UnknownAsyncThunkFulfilledAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is fulfilled.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isFulfilled<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is FulfilledActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a fulfilled thunk action\r\n * @public\r\n */\r\nexport function isFulfilled(\r\n action: any\r\n): action is UnknownAsyncThunkFulfilledAction\r\nexport function isFulfilled<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['fulfilled'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isFulfilled()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is FulfilledActionFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.fulfilled\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkAction =\r\n | UnknownAsyncThunkPendingAction\r\n | UnknownAsyncThunkRejectedAction\r\n | UnknownAsyncThunkFulfilledAction\r\n\r\nexport type AnyAsyncThunk = {\r\n pending: { match: (action: any) => action is any }\r\n fulfilled: { match: (action: any) => action is any }\r\n rejected: { match: (action: any) => action is any }\r\n}\r\n\r\nexport type ActionsFromAsyncThunk<T extends AnyAsyncThunk> =\r\n | ActionFromMatcher<T['pending']>\r\n | ActionFromMatcher<T['fulfilled']>\r\n | ActionFromMatcher<T['rejected']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator.\r\n *\r\n * @public\r\n */\r\nexport function isAsyncThunkAction(): (\r\n action: any\r\n) => action is UnknownAsyncThunkAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAsyncThunkAction<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is ActionsFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a thunk action\r\n * @public\r\n */\r\nexport function isAsyncThunkAction(\r\n action: any\r\n): action is UnknownAsyncThunkAction\r\nexport function isAsyncThunkAction<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) =>\r\n hasExpectedRequestMetadata(action, ['pending', 'fulfilled', 'rejected'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isAsyncThunkAction()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is ActionsFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = [] as any\r\n\r\n for (const asyncThunk of asyncThunks) {\r\n matchers.push(\r\n asyncThunk.pending,\r\n asyncThunk.rejected,\r\n asyncThunk.fulfilled\r\n )\r\n }\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n",null]}
|
||
diff --git a/dist/redux-toolkit.modern.production.min.js b/dist/redux-toolkit.modern.production.min.js
|
||
deleted file mode 100644
|
||
index d057feca21dcd1c5d71efe6bf97d9b8012f22240..0000000000000000000000000000000000000000
|
||
--- a/dist/redux-toolkit.modern.production.min.js
|
||
+++ /dev/null
|
||
@@ -1,2 +0,0 @@
|
||
-var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,c=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,a=(e,t)=>{for(var n in t||(t={}))o.call(t,n)&&c(e,n,t[n]);if(r)for(var n of r(t))i.call(t,n)&&c(e,n,t[n]);return e},s=(e,r)=>t(e,n(r));import{enableES5 as u}from"immer";export*from"redux";import{default as f,current as l,freeze as d,original as p,isDraft as m}from"immer";import{createSelector as y}from"reselect";import{current as h,isDraft as g}from"immer";import{createSelector as b}from"reselect";var O=(...e)=>{const t=b(...e);return(e,...n)=>t(g(e)?h(e):e,...n)};import{createStore as j,compose as v,applyMiddleware as w,combineReducers as E}from"redux";import{compose as S}from"redux";var A="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?S:S.apply(null,arguments)};function x(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window;import _ from"redux-thunk";var I=class extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,I.prototype)}static get[Symbol.species](){return I}concat(...e){return super.concat.apply(this,e)}prepend(...e){return 1===e.length&&Array.isArray(e[0])?new I(...e[0].concat(this)):new I(...e.concat(this))}};function P(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function M(e={}){return()=>e=>t=>e(t)}function C(e){const t=typeof e;return"undefined"===t||null===e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||x(e)}function q(e,t="",n=C,r,o=[]){let i;if(!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;const c=null!=r?r(e):Object.entries(e),a=o.length>0;for(const[e,s]of c){const c=t?t+"."+e:e;if(!(a&&o.indexOf(c)>=0)){if(!n(s))return{keyPath:c,value:s};if("object"==typeof s&&(i=q(s,c,n,r,o),i))return i}}return!1}function D(e={}){return()=>e=>t=>e(t)}function k(e={}){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0}=e;let o=new I;return t&&o.push("boolean"==typeof t?_:_.withExtraArgument(t.extraArgument)),o}function R(e){const t=function(e){return k(e)},{reducer:n,middleware:r=t(),devTools:o=!0,preloadedState:i,enhancers:c}=e||{};let s;if("function"==typeof n)s=n;else{if(!x(n))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');s=E(n)}let u=r;"function"==typeof u&&(u=u(t));const f=w(...u);let l=v;o&&(l=A(a({trace:!1},"object"==typeof o&&o)));let d=[f];Array.isArray(c)?d=[f,...c]:"function"==typeof c&&(d=c(d));const p=l(...d);return j(s,i,p)}function T(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("prepareAction did not return an object");return a(a({type:e,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>t.type===e,n}function V(e){return["type","payload","error","meta"].indexOf(e)>-1}function N(e){return`${e}`}import L,{isDraft as X,isDraftable as W}from"immer";function z(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(r in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function U(e,t,n=[],r){let[o,i,c]="function"==typeof t?z(t):[t,n,r];const a=L(e,(()=>{}));return function(e=a,t){let n=[o[t.type],...i.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===n.filter((e=>!!e)).length&&(n=[c]),n.reduce(((e,n)=>{if(n){if(X(e)){const r=n(e,t);return void 0===r?e:r}if(W(e))return L(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e}),e)}}function $(e){const{name:t,initialState:n}=e;if(!t)throw new Error("`name` is a required option for createSlice");const r=e.reducers||{},[o={},i=[],c]="function"==typeof e.extraReducers?z(e.extraReducers):[e.extraReducers],s=Object.keys(r),u={},f={},l={};s.forEach((e=>{const n=r[e],o=`${t}/${e}`;let i,c;"reducer"in n?(i=n.reducer,c=n.prepare):i=n,u[e]=i,f[o]=i,l[e]=c?T(o,c):T(o)}));const d=U(n,a(a({},o),f),i,c);return{name:t,reducer:d,actions:l,caseReducers:u}}import B,{isDraft as F}from"immer";function G(e){const t=H(((t,n)=>e(n)));return function(e){return t(e,void 0)}}function H(e){return function(t,n){const r=t=>{var r;x(r=n)&&"string"==typeof r.type&&Object.keys(r).every(V)?e(n.payload,t):e(n,t)};return F(t)?(r(t),t):B(t,r)}}function J(e,t){return t(e)}function K(e){return Array.isArray(e)||(e=Object.values(e)),e}function Q(e,t,n){e=K(e);const r=[],o=[];for(const i of e){const e=J(i,t);e in n.entities?o.push({id:e,changes:i}):r.push(i)}return[r,o]}function Y(e){function t(t,n){const r=J(t,e);r in n.entities||(n.ids.push(r),n.entities[r]=t)}function n(e,n){e=K(e);for(const r of e)t(r,n)}function r(t,n){const r=J(t,e);r in n.entities||n.ids.push(r),n.entities[r]=t}function o(e,t){let n=!1;e.forEach((e=>{e in t.entities&&(delete t.entities[e],n=!0)})),n&&(t.ids=t.ids.filter((e=>e in t.entities)))}function i(t,n){const r={},o={};t.forEach((e=>{e.id in n.entities&&(o[e.id]={id:e.id,changes:a(a({},o[e.id]?o[e.id].changes:null),e.changes)})})),(t=Object.values(o)).length>0&&t.filter((t=>function(t,n,r){const o=Object.assign({},r.entities[n.id],n.changes),i=J(o,e),c=i!==n.id;return c&&(t[n.id]=i,delete r.entities[n.id]),r.entities[i]=o,c}(r,t,n))).length>0&&(n.ids=n.ids.map((e=>r[e]||e)))}function c(t,r){const[o,c]=Q(t,e,r);i(c,r),n(o,r)}return{removeAll:G((function(e){Object.assign(e,{ids:[],entities:{}})})),addOne:H(t),addMany:H(n),setOne:H(r),setMany:H((function(e,t){e=K(e);for(const n of e)r(n,t)})),setAll:H((function(e,t){e=K(e),t.ids=[],t.entities={},n(e,t)})),updateOne:H((function(e,t){return i([e],t)})),updateMany:H(i),upsertOne:H((function(e,t){return c([e],t)})),upsertMany:H(c),removeOne:H((function(e,t){return o([e],t)})),removeMany:H(o)}}function Z(e={}){const{selectId:t,sortComparer:n}=a({sortComparer:!1,selectId:e=>e.id},e),r={getInitialState:function(e={}){return Object.assign({ids:[],entities:{}},e)}},o={getSelectors:function(e){const t=e=>e.ids,n=e=>e.entities,r=O(t,n,((e,t)=>e.map((e=>t[e])))),o=(e,t)=>t,i=(e,t)=>e[t],c=O(t,(e=>e.length));if(!e)return{selectIds:t,selectEntities:n,selectAll:r,selectTotal:c,selectById:O(n,o,i)};const a=O(e,n);return{selectIds:O(e,t),selectEntities:a,selectAll:O(e,r),selectTotal:O(e,c),selectById:O(a,o,i)}}},i=n?function(e,t){const{removeOne:n,removeMany:r,removeAll:o}=Y(e);function i(t,n){const r=(t=K(t)).filter((t=>!(J(t,e)in n.entities)));0!==r.length&&u(r,n)}function c(e,t){0!==(e=K(e)).length&&u(e,t)}function a(t,n){const r=[];t.forEach((t=>function(t,n,r){if(!(n.id in r.entities))return!1;const o=Object.assign({},r.entities[n.id],n.changes),i=J(o,e);return delete r.entities[n.id],t.push(o),i!==n.id}(r,t,n))),0!==r.length&&u(r,n)}function s(t,n){const[r,o]=Q(t,e,n);a(o,n),i(r,n)}function u(n,r){n.forEach((t=>{r.entities[e(t)]=t}));const o=Object.values(r.entities);o.sort(t);const i=o.map(e),{ids:c}=r;(function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length&&n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(c,i)||(r.ids=i)}return{removeOne:n,removeMany:r,removeAll:o,addOne:H((function(e,t){return i([e],t)})),updateOne:H((function(e,t){return a([e],t)})),upsertOne:H((function(e,t){return s([e],t)})),setOne:H((function(e,t){return c([e],t)})),setMany:H(c),setAll:H((function(e,t){e=K(e),t.entities={},t.ids=[],i(e,t)})),addMany:H(i),updateMany:H(a),upsertMany:H(s)}}(t,n):Y(t);return a(a(a({selectId:t,sortComparer:n},r),o),i)}var ee=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},te=["name","message","stack","code"],ne=class{constructor(e,t){this.payload=e,this.meta=t}},re=class{constructor(e,t){this.payload=e,this.meta=t}},oe=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of te)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}};function ie(e,t,n){const r=T(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:s(a({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}))),o=T(e+"/pending",((e,t,n)=>({payload:void 0,meta:s(a({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}))),i=T(e+"/rejected",((e,t,r,o,i)=>({payload:o,error:(n&&n.serializeError||oe)(e||"Rejected"),meta:s(a({},i||{}),{arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}))),c="undefined"!=typeof AbortController?AbortController:class{constructor(){this.signal={aborted:!1,addEventListener(){},dispatchEvent:()=>!1,onabort(){},removeEventListener(){}}}abort(){}};return Object.assign((function(e){return(a,s,u)=>{var f;const l=(null!=(f=null==n?void 0:n.idGenerator)?f:ee)(),d=new c;let p;const m=new Promise(((e,t)=>d.signal.addEventListener("abort",(()=>t({name:"AbortError",message:p||"Aborted"})))));let y=!1;const h=async function(){var c;let f;try{if(n&&n.condition&&!1===n.condition(e,{getState:s,extra:u}))throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};y=!0,a(o(l,e,null==(c=null==n?void 0:n.getPendingMeta)?void 0:c.call(n,{requestId:l,arg:e},{getState:s,extra:u}))),f=await Promise.race([m,Promise.resolve(t(e,{dispatch:a,getState:s,extra:u,requestId:l,signal:d.signal,rejectWithValue:(e,t)=>new ne(e,t),fulfillWithValue:(e,t)=>new re(e,t)})).then((t=>{if(t instanceof ne)throw t;return t instanceof re?r(t.payload,l,e,t.meta):r(t,l,e)}))])}catch(t){f=t instanceof ne?i(null,l,e,t.payload,t.meta):i(t,l,e)}return n&&!n.dispatchConditionRejection&&i.match(f)&&f.meta.condition||a(f),f}();return Object.assign(h,{abort:function(e){y&&(p=e,d.abort())},requestId:l,arg:e,unwrap:()=>h.then(ce)})}}),{pending:o,rejected:i,fulfilled:r,typePrefix:e})}function ce(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var ae=(e,t)=>{return(n=e)&&"function"==typeof n.match?e.match(t):e(t);var n};function se(...e){return t=>e.some((e=>ae(e,t)))}function ue(...e){return t=>e.every((e=>ae(e,t)))}function fe(e,t){if(!e||!e.meta)return!1;const n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function le(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function de(...e){return 0===e.length?e=>fe(e,["pending"]):le(e)?t=>se(...e.map((e=>e.pending)))(t):de()(e[0])}function pe(...e){return 0===e.length?e=>fe(e,["rejected"]):le(e)?t=>se(...e.map((e=>e.rejected)))(t):pe()(e[0])}function me(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||le(e)?n=>ue(pe(...e),t)(n):me()(e[0])}function ye(...e){return 0===e.length?e=>fe(e,["fulfilled"]):le(e)?t=>se(...e.map((e=>e.fulfilled)))(t):ye()(e[0])}function he(...e){return 0===e.length?e=>fe(e,["pending","fulfilled","rejected"]):le(e)?t=>{const n=[];for(const t of e)n.push(t.pending,t.rejected,t.fulfilled);return se(...n)(t)}:he()(e[0])}u();export{I as MiddlewareArray,R as configureStore,T as createAction,ie as createAsyncThunk,O as createDraftSafeSelector,Z as createEntityAdapter,M as createImmutableStateInvariantMiddleware,f as createNextState,U as createReducer,y as createSelector,D as createSerializableStateInvariantMiddleware,$ as createSlice,l as current,q as findNonSerializableValue,d as freeze,k as getDefaultMiddleware,N as getType,ue as isAllOf,se as isAnyOf,he as isAsyncThunkAction,m as isDraft,ye as isFulfilled,P as isImmutableDefault,de as isPending,C as isPlain,x as isPlainObject,pe as isRejected,me as isRejectedWithValue,oe as miniSerializeError,ee as nanoid,p as original,ce as unwrapResult};
|
||
-//# sourceMappingURL=redux-toolkit.modern.production.min.js.map
|
||
\ No newline at end of file
|
||
diff --git a/dist/redux-toolkit.modern.production.min.js.map b/dist/redux-toolkit.modern.production.min.js.map
|
||
deleted file mode 100644
|
||
index 0e6e50186e8c665bc9b4d10592b08978387033e8..0000000000000000000000000000000000000000
|
||
--- a/dist/redux-toolkit.modern.production.min.js.map
|
||
+++ /dev/null
|
||
@@ -1 +0,0 @@
|
||
-{"version":3,"sources":["../src/index.ts","../src/createDraftSafeSelector.ts","../src/configureStore.ts","../src/devtoolsExtension.ts","../src/isPlainObject.ts","../src/getDefaultMiddleware.ts","../src/utils.ts","../src/immutableStateInvariantMiddleware.ts","../src/serializableStateInvariantMiddleware.ts","../src/createAction.ts","../src/createReducer.ts","../src/mapBuilders.ts","../src/createSlice.ts","../src/entities/state_adapter.ts","../src/entities/utils.ts","../src/entities/unsorted_state_adapter.ts","../src/entities/create_adapter.ts","../src/entities/entity_state.ts","../src/entities/state_selectors.ts","../src/entities/sorted_state_adapter.ts","../src/nanoid.ts","../src/createAsyncThunk.ts","../src/tsHelpers.ts","../src/matchers.ts"],"names":["enableES5","from","default2","current2","freeze","original","isDraft4","createSelector2","current","isDraft","createSelector","createDraftSafeSelector","args","selector","value","rest","createStore","compose2","applyMiddleware","combineReducers","compose","composeWithDevTools","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","arguments","length","apply","isPlainObject","proto","Object","getPrototypeOf","__REDUX_DEVTOOLS_EXTENSION__","thunkMiddleware","MiddlewareArray","Array","[object Object]","super","setPrototypeOf","this","prototype","static","Symbol","species","arr","concat","isArray","isImmutableDefault","isFrozen","createImmutableStateInvariantMiddleware","options","next","action","isPlain","val","type","findNonSerializableValue","path","isSerializable","getEntries","ignoredPaths","foundNestedSerializable","keyPath","entries","hasIgnoredPaths","key","nestedValue","nestedPath","indexOf","createSerializableStateInvariantMiddleware","getDefaultMiddleware","thunk","immutableCheck","serializableCheck","middlewareArray","push","withExtraArgument","extraArgument","configureStore","curriedGetDefaultMiddleware","reducer","middleware","devTools","preloadedState","enhancers","rootReducer","Error","finalMiddleware","middlewareEnhancer","finalCompose","__spreadValues","trace","storeEnhancers","composedEnhancer","createAction","prepareAction","actionCreator","prepared","payload","meta","error","toString","match","isValidKey","getType","createNextState","isDraft2","isDraftable","executeReducerBuilderCallback","builderCallback","actionsMap","actionMatchers","defaultCaseReducer","builder","typeOrActionCreator","addMatcher","matcher","addDefaultCase","createReducer","initialState","mapOrBuilderCallback","finalActionMatchers","finalDefaultCaseReducer","frozenInitialState","state","caseReducers","filter","map","cr","reduce","previousState","caseReducer","result","draft","createSlice","name","reducers","extraReducers","reducerNames","keys","sliceCaseReducersByName","sliceCaseReducersByType","actionCreators","forEach","reducerName","maybeReducerWithPrepare","prepareCallback","prepare","actions","createNextState2","isDraft3","createSingleArgumentStateOperator","mutator","operator","createStateOperator","_","arg","runMutator","every","selectIdValue","entity","selectId","ensureEntitiesArray","entities","values","splitAddedUpdatedEntities","newEntities","added","updated","id","changes","createUnsortedStateAdapter","addOneMutably","ids","addManyMutably","setOneMutably","removeManyMutably","didMutate","updateManyMutably","updates","newKeys","updatesPerEntity","update","assign","newKey","hasNewKey","takeNewKey","upsertManyMutably","removeAll","addOne","addMany","setOne","setMany","setAll","updateOne","updateMany","upsertOne","upsertMany","removeOne","removeMany","createEntityAdapter","sortComparer","instance","stateFactory","getInitialState","additionalState","selectorsFactory","getSelectors","selectState","selectIds","selectEntities","selectAll","selectById","selectTotal","selectGlobalizedEntities","stateAdapter","sort","models","model","merge","setManyMutably","takeUpdatedModel","allEntities","newSortedIds","a","b","i","areArraysEqual","createSortedStateAdapter","nanoid","size","Math","random","commonProperties","RejectWithValue","FulfillWithMeta","miniSerializeError","simpleError","property","message","String","createAsyncThunk","typePrefix","payloadCreator","fulfilled","requestId","__spreadProps","requestStatus","pending","rejected","serializeError","rejectedWithValue","aborted","condition","AC","AbortController","signal","dispatchEvent","dispatch","getState","extra","_a","idGenerator","abortController","abortReason","abortedPromise","Promise","reject","addEventListener","started","promise","async","_a2","finalAction","getPendingMeta","call","race","resolve","rejectWithValue","fulfillWithValue","then","err","dispatchConditionRejection","abort","reason","unwrap","unwrapResult","matches","v","isAnyOf","matchers","some","isAllOf","hasExpectedRequestMetadata","validStatus","hasValidRequestId","hasValidRequestStatus","isAsyncThunkArray","isPending","asyncThunks","asyncThunk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KAC7D6K,GAAeA,EAAWpD,UAKtBqD,CAAgBzP,GAbhBsP,IAAAA,CAAYC,EAAY,IAuD5B,SAAAG,MAEFH,GACH,OAA2B,IAAvBA,EAAYjR,OACN0B,GAAgBiP,GAA2BjP,EAAQ,CAAC,aAGzDqP,GAAkBE,GAKrBvP,GAOwB6O,MAJ4BU,EAAY5K,KAC7D6K,GAAeA,EAAWnD,WAKtBoD,CAAgBzP,GAbhB0P,IAAAA,CAAaH,EAAY,IA4D7B,SAAAI,MAEFJ,GACH,MAAMK,EAAW5P,GACRA,GAAUA,EAAO+C,MAAQ/C,EAAO+C,KAAKwJ,kBAG9C,OAA2B,IAAvBgD,EAAYjR,QAQX+Q,GAAkBE,GAPbvP,GACkBgP,GAAQU,MAAcH,GAAcK,EAErDH,CAAgBzP,GAKlB2P,IAAAA,CAAsBJ,EAAY,IAkDtC,SAAAM,MAEFN,GACH,OAA2B,IAAvBA,EAAYjR,OACN0B,GAAgBiP,GAA2BjP,EAAQ,CAAC,cAGzDqP,GAAkBE,GAKrBvP,GAOwB6O,MAJ4BU,EAAY5K,KAC7D6K,GAAeA,EAAWxD,YAKtByD,CAAgBzP,GAbhB6P,IAAAA,CAAcN,EAAY,IA8D9B,SAAAO,MAEFP,GACH,OAA2B,IAAvBA,EAAYjR,OACN0B,GACNiP,GAA2BjP,EAAQ,CAAC,UAAW,YAAa,aAG3DqP,GAAkBE,GAKrBvP,IAGA,MAAM8O,EAA8C,GAEpD,IAAA,MAAWU,KAAcD,EACvBT,EAASvN,KACPiO,EAAWpD,QACXoD,EAAWnD,SACXmD,EAAWxD,WAMf,OAFwB6C,MAAWC,EAE5BW,CAAgBzP,IAnBhB8P,IAAAA,CAAqBP,EAAY,IvB7X5C1S","sourcesContent":["import { enableES5 } from 'immer'\r\nexport * from 'redux'\r\nexport {\r\n default as createNextState,\r\n current,\r\n freeze,\r\n original,\r\n isDraft,\r\n} from 'immer'\r\nexport type { Draft } from 'immer'\r\nexport { createSelector } from 'reselect'\r\nexport type {\r\n Selector,\r\n OutputParametricSelector,\r\n OutputSelector,\r\n ParametricSelector,\r\n} from 'reselect'\r\nexport { createDraftSafeSelector } from './createDraftSafeSelector'\r\nexport type { ThunkAction, ThunkDispatch } from 'redux-thunk'\r\n\r\n// We deliberately enable Immer's ES5 support, on the grounds that\r\n// we assume RTK will be used with React Native and other Proxy-less\r\n// environments. In addition, that's how Immer 4 behaved, and since\r\n// we want to ship this in an RTK minor, we should keep the same behavior.\r\nenableES5()\r\n\r\nexport {\r\n // js\r\n configureStore,\r\n} from './configureStore'\r\nexport type {\r\n // types\r\n ConfigureEnhancersCallback,\r\n ConfigureStoreOptions,\r\n EnhancedStore,\r\n} from './configureStore'\r\nexport {\r\n // js\r\n createAction,\r\n getType,\r\n} from './createAction'\r\nexport type {\r\n // types\r\n PayloadAction,\r\n PayloadActionCreator,\r\n ActionCreatorWithNonInferrablePayload,\r\n ActionCreatorWithOptionalPayload,\r\n ActionCreatorWithPayload,\r\n ActionCreatorWithoutPayload,\r\n ActionCreatorWithPreparedPayload,\r\n PrepareAction,\r\n} from './createAction'\r\nexport {\r\n // js\r\n createReducer,\r\n} from './createReducer'\r\nexport type {\r\n // types\r\n Actions,\r\n CaseReducer,\r\n CaseReducers,\r\n} from './createReducer'\r\nexport {\r\n // js\r\n createSlice,\r\n} from './createSlice'\r\n\r\nexport type {\r\n // types\r\n CreateSliceOptions,\r\n Slice,\r\n CaseReducerActions,\r\n SliceCaseReducers,\r\n ValidateSliceCaseReducers,\r\n CaseReducerWithPrepare,\r\n SliceActionCreator,\r\n} from './createSlice'\r\nexport {\r\n // js\r\n createImmutableStateInvariantMiddleware,\r\n isImmutableDefault,\r\n} from './immutableStateInvariantMiddleware'\r\nexport type {\r\n // types\r\n ImmutableStateInvariantMiddlewareOptions,\r\n} from './immutableStateInvariantMiddleware'\r\nexport {\r\n // js\r\n createSerializableStateInvariantMiddleware,\r\n findNonSerializableValue,\r\n isPlain,\r\n} from './serializableStateInvariantMiddleware'\r\nexport type {\r\n // types\r\n SerializableStateInvariantMiddlewareOptions,\r\n} from './serializableStateInvariantMiddleware'\r\nexport {\r\n // js\r\n getDefaultMiddleware,\r\n} from './getDefaultMiddleware'\r\nexport type {\r\n // types\r\n ActionReducerMapBuilder,\r\n} from './mapBuilders'\r\nexport { MiddlewareArray } from './utils'\r\n\r\nexport { createEntityAdapter } from './entities/create_adapter'\r\nexport type {\r\n Dictionary,\r\n EntityState,\r\n EntityAdapter,\r\n EntitySelectors,\r\n EntityStateAdapter,\r\n EntityId,\r\n Update,\r\n IdSelector,\r\n Comparer,\r\n} from './entities/models'\r\n\r\nexport {\r\n createAsyncThunk,\r\n unwrapResult,\r\n miniSerializeError,\r\n} from './createAsyncThunk'\r\nexport type {\r\n AsyncThunk,\r\n AsyncThunkOptions,\r\n AsyncThunkAction,\r\n AsyncThunkPayloadCreatorReturnValue,\r\n AsyncThunkPayloadCreator,\r\n SerializedError,\r\n} from './createAsyncThunk'\r\n\r\nexport {\r\n // js\r\n isAllOf,\r\n isAnyOf,\r\n isPending,\r\n isRejected,\r\n isFulfilled,\r\n isAsyncThunkAction,\r\n isRejectedWithValue,\r\n} from './matchers'\r\nexport type {\r\n // types\r\n ActionMatchingAllOf,\r\n ActionMatchingAnyOf,\r\n} from './matchers'\r\n\r\nexport { nanoid } from './nanoid'\r\n\r\nexport { default as isPlainObject } from './isPlainObject'\r\n","import { current, isDraft } from 'immer'\r\nimport { createSelector } from 'reselect'\r\n\r\n/**\r\n * \"Draft-Safe\" version of `reselect`'s `createSelector`:\r\n * If an `immer`-drafted object is passed into the resulting selector's first argument,\r\n * the selector will act on the current draft value, instead of returning a cached value\r\n * that might be possibly outdated if the draft has been modified since.\r\n * @public\r\n */\r\nexport const createDraftSafeSelector: typeof createSelector = (\r\n ...args: unknown[]\r\n) => {\r\n const selector = (createSelector as any)(...args)\r\n const wrappedSelector = (value: unknown, ...rest: unknown[]) =>\r\n selector(isDraft(value) ? current(value) : value, ...rest)\r\n return wrappedSelector as any\r\n}\r\n","import type {\r\n Reducer,\r\n ReducersMapObject,\r\n Middleware,\r\n Action,\r\n AnyAction,\r\n StoreEnhancer,\r\n Store,\r\n Dispatch,\r\n PreloadedState,\r\n CombinedState,\r\n} from 'redux'\r\nimport { createStore, compose, applyMiddleware, combineReducers } from 'redux'\r\nimport type { EnhancerOptions as DevToolsOptions } from './devtoolsExtension'\r\nimport { composeWithDevTools } from './devtoolsExtension'\r\n\r\nimport isPlainObject from './isPlainObject'\r\nimport type {\r\n ThunkMiddlewareFor,\r\n CurriedGetDefaultMiddleware,\r\n} from './getDefaultMiddleware'\r\nimport { curryGetDefaultMiddleware } from './getDefaultMiddleware'\r\nimport type { DispatchForMiddlewares, NoInfer } from './tsHelpers'\r\n\r\nconst IS_PRODUCTION = process.env.NODE_ENV === 'production'\r\n\r\n/**\r\n * Callback function type, to be used in `ConfigureStoreOptions.enhancers`\r\n *\r\n * @public\r\n */\r\nexport type ConfigureEnhancersCallback = (\r\n defaultEnhancers: readonly StoreEnhancer[]\r\n) => StoreEnhancer[]\r\n\r\n/**\r\n * Options for `configureStore()`.\r\n *\r\n * @public\r\n */\r\nexport interface ConfigureStoreOptions<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares<S> = Middlewares<S>\r\n> {\r\n /**\r\n * A single reducer function that will be used as the root reducer, or an\r\n * object of slice reducers that will be passed to `combineReducers()`.\r\n */\r\n reducer: Reducer<S, A> | ReducersMapObject<S, A>\r\n\r\n /**\r\n * An array of Redux middleware to install. If not supplied, defaults to\r\n * the set of middleware returned by `getDefaultMiddleware()`.\r\n */\r\n middleware?: ((getDefaultMiddleware: CurriedGetDefaultMiddleware<S>) => M) | M\r\n\r\n /**\r\n * Whether to enable Redux DevTools integration. Defaults to `true`.\r\n *\r\n * Additional configuration can be done by passing Redux DevTools options\r\n */\r\n devTools?: boolean | DevToolsOptions\r\n\r\n /**\r\n * The initial state, same as Redux's createStore.\r\n * You may optionally specify it to hydrate the state\r\n * from the server in universal apps, or to restore a previously serialized\r\n * user session. If you use `combineReducers()` to produce the root reducer\r\n * function (either directly or indirectly by passing an object as `reducer`),\r\n * this must be an object with the same shape as the reducer map keys.\r\n */\r\n /* \r\n Not 100% correct but the best approximation we can get:\r\n - if S is a `CombinedState` applying a second `CombinedState` on it does not change anything.\r\n - if it is not, there could be two cases:\r\n - `ReducersMapObject<S, A>` is being passed in. In this case, we will call `combineReducers` on it and `CombinedState<S>` is correct\r\n - `Reducer<S, A>` is being passed in. In this case, actually `CombinedState<S>` is wrong and `S` would be correct.\r\n As we cannot distinguish between those two cases without adding another generic paramter, \r\n we just make the pragmatic assumption that the latter almost never happens.\r\n */\r\n preloadedState?: PreloadedState<CombinedState<NoInfer<S>>>\r\n\r\n /**\r\n * The store enhancers to apply. See Redux's `createStore()`.\r\n * All enhancers will be included before the DevTools Extension enhancer.\r\n * If you need to customize the order of enhancers, supply a callback\r\n * function that will receive the original array (ie, `[applyMiddleware]`),\r\n * and should return a new array (such as `[applyMiddleware, offline]`).\r\n * If you only need to add middleware, you can use the `middleware` parameter instead.\r\n */\r\n enhancers?: StoreEnhancer[] | ConfigureEnhancersCallback\r\n}\r\n\r\ntype Middlewares<S> = ReadonlyArray<Middleware<{}, S>>\r\n\r\n/**\r\n * A Redux store returned by `configureStore()`. Supports dispatching\r\n * side-effectful _thunks_ in addition to plain actions.\r\n *\r\n * @public\r\n */\r\nexport interface EnhancedStore<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares<S> = Middlewares<S>\r\n> extends Store<S, A> {\r\n /**\r\n * The `dispatch` method of your store, enhanced by all its middlewares.\r\n *\r\n * @inheritdoc\r\n */\r\n dispatch: DispatchForMiddlewares<M> & Dispatch<A>\r\n}\r\n\r\n/**\r\n * A friendly abstraction over the standard Redux `createStore()` function.\r\n *\r\n * @param config The store configuration.\r\n * @returns A configured Redux store.\r\n *\r\n * @public\r\n */\r\nexport function configureStore<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares<S> = [ThunkMiddlewareFor<S>]\r\n>(options: ConfigureStoreOptions<S, A, M>): EnhancedStore<S, A, M> {\r\n const curriedGetDefaultMiddleware = curryGetDefaultMiddleware<S>()\r\n\r\n const {\r\n reducer = undefined,\r\n middleware = curriedGetDefaultMiddleware(),\r\n devTools = true,\r\n preloadedState = undefined,\r\n enhancers = undefined,\r\n } = options || {}\r\n\r\n let rootReducer: Reducer<S, A>\r\n\r\n if (typeof reducer === 'function') {\r\n rootReducer = reducer\r\n } else if (isPlainObject(reducer)) {\r\n rootReducer = combineReducers(reducer)\r\n } else {\r\n throw new Error(\r\n '\"reducer\" is a required argument, and must be a function or an object of functions that can be passed to combineReducers'\r\n )\r\n }\r\n\r\n let finalMiddleware = middleware\r\n if (typeof finalMiddleware === 'function') {\r\n finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware)\r\n\r\n if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {\r\n throw new Error(\r\n 'when using a middleware builder function, an array of middleware must be returned'\r\n )\r\n }\r\n }\r\n if (\r\n !IS_PRODUCTION &&\r\n finalMiddleware.some((item) => typeof item !== 'function')\r\n ) {\r\n throw new Error(\r\n 'each middleware provided to configureStore must be a function'\r\n )\r\n }\r\n\r\n const middlewareEnhancer = applyMiddleware(...finalMiddleware)\r\n\r\n let finalCompose = compose\r\n\r\n if (devTools) {\r\n finalCompose = composeWithDevTools({\r\n // Enable capture of stack traces for dispatched Redux actions\r\n trace: !IS_PRODUCTION,\r\n ...(typeof devTools === 'object' && devTools),\r\n })\r\n }\r\n\r\n let storeEnhancers: StoreEnhancer[] = [middlewareEnhancer]\r\n\r\n if (Array.isArray(enhancers)) {\r\n storeEnhancers = [middlewareEnhancer, ...enhancers]\r\n } else if (typeof enhancers === 'function') {\r\n storeEnhancers = enhancers(storeEnhancers)\r\n }\r\n\r\n const composedEnhancer = finalCompose(...storeEnhancers) as any\r\n\r\n return createStore(rootReducer, preloadedState, composedEnhancer)\r\n}\r\n","import type { Action, ActionCreator, StoreEnhancer } from 'redux'\r\nimport { compose } from 'redux'\r\n\r\n/**\r\n * @public\r\n */\r\nexport interface EnhancerOptions {\r\n /**\r\n * the instance name to be showed on the monitor page. Default value is `document.title`.\r\n * If not specified and there's no document title, it will consist of `tabId` and `instanceId`.\r\n */\r\n name?: string\r\n /**\r\n * action creators functions to be available in the Dispatcher.\r\n */\r\n actionCreators?: ActionCreator<any>[] | { [key: string]: ActionCreator<any> }\r\n /**\r\n * if more than one action is dispatched in the indicated interval, all new actions will be collected and sent at once.\r\n * It is the joint between performance and speed. When set to `0`, all actions will be sent instantly.\r\n * Set it to a higher value when experiencing perf issues (also `maxAge` to a lower value).\r\n *\r\n * @default 500 ms.\r\n */\r\n latency?: number\r\n /**\r\n * (> 1) - maximum allowed actions to be stored in the history tree. The oldest actions are removed once maxAge is reached. It's critical for performance.\r\n *\r\n * @default 50\r\n */\r\n maxAge?: number\r\n /**\r\n * See detailed documentation at http://extension.remotedev.io/docs/API/Arguments.html#serialize\r\n */\r\n serialize?:\r\n | boolean\r\n | {\r\n options?:\r\n | boolean\r\n | {\r\n date?: boolean\r\n regex?: boolean\r\n undefined?: boolean\r\n error?: boolean\r\n symbol?: boolean\r\n map?: boolean\r\n set?: boolean\r\n function?: boolean | Function\r\n }\r\n replacer?: (key: string, value: unknown) => unknown\r\n reviver?: (key: string, value: unknown) => unknown\r\n immutable?: unknown\r\n refs?: unknown[]\r\n }\r\n /**\r\n * function which takes `action` object and id number as arguments, and should return `action` object back.\r\n */\r\n actionSanitizer?: <A extends Action>(action: A, id: number) => A\r\n /**\r\n * function which takes `state` object and index as arguments, and should return `state` object back.\r\n */\r\n stateSanitizer?: <S>(state: S, index: number) => S\r\n /**\r\n * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\r\n * If `actionsWhitelist` specified, `actionsBlacklist` is ignored.\r\n */\r\n actionsBlacklist?: string | string[]\r\n /**\r\n * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\r\n * If `actionsWhitelist` specified, `actionsBlacklist` is ignored.\r\n */\r\n actionsWhitelist?: string | string[]\r\n /**\r\n * called for every action before sending, takes `state` and `action` object, and returns `true` in case it allows sending the current data to the monitor.\r\n * Use it as a more advanced version of `actionsBlacklist`/`actionsWhitelist` parameters.\r\n */\r\n predicate?: <S, A extends Action>(state: S, action: A) => boolean\r\n /**\r\n * if specified as `false`, it will not record the changes till clicking on `Start recording` button.\r\n * Available only for Redux enhancer, for others use `autoPause`.\r\n *\r\n * @default true\r\n */\r\n shouldRecordChanges?: boolean\r\n /**\r\n * if specified, whenever clicking on `Pause recording` button and there are actions in the history log, will add this action type.\r\n * If not specified, will commit when paused. Available only for Redux enhancer.\r\n *\r\n * @default \"@@PAUSED\"\"\r\n */\r\n pauseActionType?: string\r\n /**\r\n * auto pauses when the extension’s window is not opened, and so has zero impact on your app when not in use.\r\n * Not available for Redux enhancer (as it already does it but storing the data to be sent).\r\n *\r\n * @default false\r\n */\r\n autoPause?: boolean\r\n /**\r\n * if specified as `true`, it will not allow any non-monitor actions to be dispatched till clicking on `Unlock changes` button.\r\n * Available only for Redux enhancer.\r\n *\r\n * @default false\r\n */\r\n shouldStartLocked?: boolean\r\n /**\r\n * if set to `false`, will not recompute the states on hot reloading (or on replacing the reducers). Available only for Redux enhancer.\r\n *\r\n * @default true\r\n */\r\n shouldHotReload?: boolean\r\n /**\r\n * if specified as `true`, whenever there's an exception in reducers, the monitors will show the error message, and next actions will not be dispatched.\r\n *\r\n * @default false\r\n */\r\n shouldCatchErrors?: boolean\r\n /**\r\n * If you want to restrict the extension, specify the features you allow.\r\n * If not specified, all of the features are enabled. When set as an object, only those included as `true` will be allowed.\r\n * Note that except `true`/`false`, `import` and `export` can be set as `custom` (which is by default for Redux enhancer), meaning that the importing/exporting occurs on the client side.\r\n * Otherwise, you'll get/set the data right from the monitor part.\r\n */\r\n features?: {\r\n /**\r\n * start/pause recording of dispatched actions\r\n */\r\n pause?: boolean\r\n /**\r\n * lock/unlock dispatching actions and side effects\r\n */\r\n lock?: boolean\r\n /**\r\n * persist states on page reloading\r\n */\r\n persist?: boolean\r\n /**\r\n * export history of actions in a file\r\n */\r\n export?: boolean | 'custom'\r\n /**\r\n * import history of actions from a file\r\n */\r\n import?: boolean | 'custom'\r\n /**\r\n * jump back and forth (time travelling)\r\n */\r\n jump?: boolean\r\n /**\r\n * skip (cancel) actions\r\n */\r\n skip?: boolean\r\n /**\r\n * drag and drop actions in the history list\r\n */\r\n reorder?: boolean\r\n /**\r\n * dispatch custom actions or action creators\r\n */\r\n dispatch?: boolean\r\n /**\r\n * generate tests for the selected actions\r\n */\r\n test?: boolean\r\n }\r\n /**\r\n * Set to true or a stacktrace-returning function to record call stack traces for dispatched actions.\r\n * Defaults to false.\r\n */\r\n trace?: boolean | (<A extends Action>(action: A) => string)\r\n /**\r\n * The maximum number of stack trace entries to record per action. Defaults to 10.\r\n */\r\n traceLimit?: number\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport const composeWithDevTools: {\r\n (options: EnhancerOptions): typeof compose\r\n <StoreExt>(...funcs: Array<StoreEnhancer<StoreExt>>): StoreEnhancer<StoreExt>\r\n} =\r\n typeof window !== 'undefined' &&\r\n (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\r\n ? (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\r\n : function () {\r\n if (arguments.length === 0) return undefined\r\n if (typeof arguments[0] === 'object') return compose\r\n return compose.apply(null, arguments as any as Function[])\r\n }\r\n\r\n/**\r\n * @public\r\n */\r\nexport const devToolsEnhancer: {\r\n (options: EnhancerOptions): StoreEnhancer<any>\r\n} =\r\n typeof window !== 'undefined' && (window as any).__REDUX_DEVTOOLS_EXTENSION__\r\n ? (window as any).__REDUX_DEVTOOLS_EXTENSION__\r\n : function () {\r\n return function (noop) {\r\n return noop\r\n }\r\n }\r\n","/**\r\n * Returns true if the passed value is \"plain\" object, i.e. an object whose\r\n * prototype is the root `Object.prototype`. This includes objects created\r\n * using object literals, but not for instance for class instances.\r\n *\r\n * @param {any} value The value to inspect.\r\n * @returns {boolean} True if the argument appears to be a plain object.\r\n *\r\n * @public\r\n */\r\nexport default function isPlainObject(value: unknown): value is object {\r\n if (typeof value !== 'object' || value === null) return false\r\n\r\n let proto = value\r\n while (Object.getPrototypeOf(proto) !== null) {\r\n proto = Object.getPrototypeOf(proto)\r\n }\r\n\r\n return Object.getPrototypeOf(value) === proto\r\n}\r\n","import type { Middleware, AnyAction } from 'redux'\r\nimport type { ThunkMiddleware } from 'redux-thunk'\r\nimport thunkMiddleware from 'redux-thunk'\r\nimport type { ImmutableStateInvariantMiddlewareOptions } from './immutableStateInvariantMiddleware'\r\n/* PROD_START_REMOVE_UMD */\r\nimport { createImmutableStateInvariantMiddleware } from './immutableStateInvariantMiddleware'\r\n/* PROD_STOP_REMOVE_UMD */\r\n\r\nimport type { SerializableStateInvariantMiddlewareOptions } from './serializableStateInvariantMiddleware'\r\nimport { createSerializableStateInvariantMiddleware } from './serializableStateInvariantMiddleware'\r\nimport { MiddlewareArray } from './utils'\r\n\r\nfunction isBoolean(x: any): x is boolean {\r\n return typeof x === 'boolean'\r\n}\r\n\r\ninterface ThunkOptions<E = any> {\r\n extraArgument: E\r\n}\r\n\r\ninterface GetDefaultMiddlewareOptions {\r\n thunk?: boolean | ThunkOptions\r\n immutableCheck?: boolean | ImmutableStateInvariantMiddlewareOptions\r\n serializableCheck?: boolean | SerializableStateInvariantMiddlewareOptions\r\n}\r\n\r\nexport type ThunkMiddlewareFor<\r\n S,\r\n O extends GetDefaultMiddlewareOptions = {}\r\n> = O extends {\r\n thunk: false\r\n}\r\n ? never\r\n : O extends { thunk: { extraArgument: infer E } }\r\n ? ThunkMiddleware<S, AnyAction, E>\r\n :\r\n | ThunkMiddleware<S, AnyAction, null> //The ThunkMiddleware with a `null` ExtraArgument is here to provide backwards-compatibility.\r\n | ThunkMiddleware<S, AnyAction>\r\n\r\nexport type CurriedGetDefaultMiddleware<S = any> = <\r\n O extends Partial<GetDefaultMiddlewareOptions> = {\r\n thunk: true\r\n immutableCheck: true\r\n serializableCheck: true\r\n }\r\n>(\r\n options?: O\r\n) => MiddlewareArray<Middleware<{}, S> | ThunkMiddlewareFor<S, O>>\r\n\r\nexport function curryGetDefaultMiddleware<\r\n S = any\r\n>(): CurriedGetDefaultMiddleware<S> {\r\n return function curriedGetDefaultMiddleware(options) {\r\n return getDefaultMiddleware(options)\r\n }\r\n}\r\n\r\n/**\r\n * Returns any array containing the default middleware installed by\r\n * `configureStore()`. Useful if you want to configure your store with a custom\r\n * `middleware` array but still keep the default set.\r\n *\r\n * @return The default middleware used by `configureStore()`.\r\n *\r\n * @public\r\n *\r\n * @deprecated Prefer to use the callback notation for the `middleware` option in `configureStore`\r\n * to access a pre-typed `getDefaultMiddleware` instead.\r\n */\r\nexport function getDefaultMiddleware<\r\n S = any,\r\n O extends Partial<GetDefaultMiddlewareOptions> = {\r\n thunk: true\r\n immutableCheck: true\r\n serializableCheck: true\r\n }\r\n>(\r\n options: O = {} as O\r\n): MiddlewareArray<Middleware<{}, S> | ThunkMiddlewareFor<S, O>> {\r\n const {\r\n thunk = true,\r\n immutableCheck = true,\r\n serializableCheck = true,\r\n } = options\r\n\r\n let middlewareArray: Middleware<{}, S>[] = new MiddlewareArray()\r\n\r\n if (thunk) {\r\n if (isBoolean(thunk)) {\r\n middlewareArray.push(thunkMiddleware)\r\n } else {\r\n middlewareArray.push(\r\n thunkMiddleware.withExtraArgument(thunk.extraArgument)\r\n )\r\n }\r\n }\r\n\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (immutableCheck) {\r\n /* PROD_START_REMOVE_UMD */\r\n let immutableOptions: ImmutableStateInvariantMiddlewareOptions = {}\r\n\r\n if (!isBoolean(immutableCheck)) {\r\n immutableOptions = immutableCheck\r\n }\r\n\r\n middlewareArray.unshift(\r\n createImmutableStateInvariantMiddleware(immutableOptions)\r\n )\r\n /* PROD_STOP_REMOVE_UMD */\r\n }\r\n\r\n if (serializableCheck) {\r\n let serializableOptions: SerializableStateInvariantMiddlewareOptions = {}\r\n\r\n if (!isBoolean(serializableCheck)) {\r\n serializableOptions = serializableCheck\r\n }\r\n\r\n middlewareArray.push(\r\n createSerializableStateInvariantMiddleware(serializableOptions)\r\n )\r\n }\r\n }\r\n\r\n return middlewareArray as any\r\n}\r\n","import type { Middleware } from 'redux'\r\n\r\nexport function getTimeMeasureUtils(maxDelay: number, fnName: string) {\r\n let elapsed = 0\r\n return {\r\n measureTime<T>(fn: () => T): T {\r\n const started = Date.now()\r\n try {\r\n return fn()\r\n } finally {\r\n const finished = Date.now()\r\n elapsed += finished - started\r\n }\r\n },\r\n warnIfExceeded() {\r\n if (elapsed > maxDelay) {\r\n console.warn(`${fnName} took ${elapsed}ms, which is more than the warning threshold of ${maxDelay}ms. \r\nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\r\nIt is disabled in production builds, so you don't need to worry about that.`)\r\n }\r\n },\r\n }\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport class MiddlewareArray<\r\n Middlewares extends Middleware<any, any>\r\n> extends Array<Middlewares> {\r\n constructor(arrayLength?: number)\r\n constructor(...items: Middlewares[])\r\n constructor(...args: any[]) {\r\n super(...args)\r\n Object.setPrototypeOf(this, MiddlewareArray.prototype)\r\n }\r\n\r\n static get [Symbol.species]() {\r\n return MiddlewareArray as any\r\n }\r\n\r\n concat<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n items: AdditionalMiddlewares\r\n ): MiddlewareArray<Middlewares | AdditionalMiddlewares[number]>\r\n\r\n concat<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n ...items: AdditionalMiddlewares\r\n ): MiddlewareArray<Middlewares | AdditionalMiddlewares[number]>\r\n concat(...arr: any[]) {\r\n return super.concat.apply(this, arr)\r\n }\r\n\r\n prepend<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n items: AdditionalMiddlewares\r\n ): MiddlewareArray<AdditionalMiddlewares[number] | Middlewares>\r\n\r\n prepend<AdditionalMiddlewares extends ReadonlyArray<Middleware<any, any>>>(\r\n ...items: AdditionalMiddlewares\r\n ): MiddlewareArray<AdditionalMiddlewares[number] | Middlewares>\r\n\r\n prepend(...arr: any[]) {\r\n if (arr.length === 1 && Array.isArray(arr[0])) {\r\n return new MiddlewareArray(...arr[0].concat(this))\r\n }\r\n return new MiddlewareArray(...arr.concat(this))\r\n }\r\n}\r\n","import type { Middleware } from 'redux'\r\nimport { getTimeMeasureUtils } from './utils'\r\n\r\ntype EntryProcessor = (key: string, value: any) => any\r\n\r\nconst isProduction: boolean = process.env.NODE_ENV === 'production'\r\nconst prefix: string = 'Invariant failed'\r\n\r\n// Throw an error if the condition fails\r\n// Strip out error messages for production\r\n// > Not providing an inline default argument for message as the result is smaller\r\nfunction invariant(condition: any, message?: string) {\r\n if (condition) {\r\n return\r\n }\r\n // Condition not passed\r\n\r\n // In production we strip the message but still throw\r\n if (isProduction) {\r\n throw new Error(prefix)\r\n }\r\n\r\n // When not in production we allow the message to pass through\r\n // *This block will be removed in production builds*\r\n throw new Error(`${prefix}: ${message || ''}`)\r\n}\r\n\r\nfunction stringify(\r\n obj: any,\r\n serializer?: EntryProcessor,\r\n indent?: string | number,\r\n decycler?: EntryProcessor\r\n): string {\r\n return JSON.stringify(obj, getSerialize(serializer, decycler), indent)\r\n}\r\n\r\nfunction getSerialize(\r\n serializer?: EntryProcessor,\r\n decycler?: EntryProcessor\r\n): EntryProcessor {\r\n let stack: any[] = [],\r\n keys: any[] = []\r\n\r\n if (!decycler)\r\n decycler = function (_: string, value: any) {\r\n if (stack[0] === value) return '[Circular ~]'\r\n return (\r\n '[Circular ~.' + keys.slice(0, stack.indexOf(value)).join('.') + ']'\r\n )\r\n }\r\n\r\n return function (this: any, key: string, value: any) {\r\n if (stack.length > 0) {\r\n var thisPos = stack.indexOf(this)\r\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)\r\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)\r\n if (~stack.indexOf(value)) value = decycler!.call(this, key, value)\r\n } else stack.push(value)\r\n\r\n return serializer == null ? value : serializer.call(this, key, value)\r\n }\r\n}\r\n\r\n/**\r\n * The default `isImmutable` function.\r\n *\r\n * @public\r\n */\r\nexport function isImmutableDefault(value: unknown): boolean {\r\n return (\r\n typeof value !== 'object' ||\r\n value === null ||\r\n typeof value === 'undefined' ||\r\n Object.isFrozen(value)\r\n )\r\n}\r\n\r\nexport function trackForMutations(\r\n isImmutable: IsImmutableFunc,\r\n ignorePaths: string[] | undefined,\r\n obj: any\r\n) {\r\n const trackedProperties = trackProperties(isImmutable, ignorePaths, obj)\r\n return {\r\n detectMutations() {\r\n return detectMutations(isImmutable, ignorePaths, trackedProperties, obj)\r\n },\r\n }\r\n}\r\n\r\ninterface TrackedProperty {\r\n value: any\r\n children: Record<string, any>\r\n}\r\n\r\nfunction trackProperties(\r\n isImmutable: IsImmutableFunc,\r\n ignorePaths: IgnorePaths = [],\r\n obj: Record<string, any>,\r\n path: string = ''\r\n) {\r\n const tracked: Partial<TrackedProperty> = { value: obj }\r\n\r\n if (!isImmutable(obj)) {\r\n tracked.children = {}\r\n\r\n for (const key in obj) {\r\n const childPath = path ? path + '.' + key : key\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue\r\n }\r\n\r\n tracked.children[key] = trackProperties(\r\n isImmutable,\r\n ignorePaths,\r\n obj[key],\r\n childPath\r\n )\r\n }\r\n }\r\n return tracked as TrackedProperty\r\n}\r\n\r\ntype IgnorePaths = readonly string[]\r\n\r\nfunction detectMutations(\r\n isImmutable: IsImmutableFunc,\r\n ignorePaths: IgnorePaths = [],\r\n trackedProperty: TrackedProperty,\r\n obj: any,\r\n sameParentRef: boolean = false,\r\n path: string = ''\r\n): { wasMutated: boolean; path?: string } {\r\n const prevObj = trackedProperty ? trackedProperty.value : undefined\r\n\r\n const sameRef = prevObj === obj\r\n\r\n if (sameParentRef && !sameRef && !Number.isNaN(obj)) {\r\n return { wasMutated: true, path }\r\n }\r\n\r\n if (isImmutable(prevObj) || isImmutable(obj)) {\r\n return { wasMutated: false }\r\n }\r\n\r\n // Gather all keys from prev (tracked) and after objs\r\n const keysToDetect: Record<string, boolean> = {}\r\n for (let key in trackedProperty.children) {\r\n keysToDetect[key] = true\r\n }\r\n for (let key in obj) {\r\n keysToDetect[key] = true\r\n }\r\n\r\n for (let key in keysToDetect) {\r\n const childPath = path ? path + '.' + key : key\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue\r\n }\r\n\r\n const result = detectMutations(\r\n isImmutable,\r\n ignorePaths,\r\n trackedProperty.children[key],\r\n obj[key],\r\n sameRef,\r\n childPath\r\n )\r\n\r\n if (result.wasMutated) {\r\n return result\r\n }\r\n }\r\n return { wasMutated: false }\r\n}\r\n\r\ntype IsImmutableFunc = (value: any) => boolean\r\n\r\n/**\r\n * Options for `createImmutableStateInvariantMiddleware()`.\r\n *\r\n * @public\r\n */\r\nexport interface ImmutableStateInvariantMiddlewareOptions {\r\n /**\r\n Callback function to check if a value is considered to be immutable.\r\n This function is applied recursively to every value contained in the state.\r\n The default implementation will return true for primitive types \r\n (like numbers, strings, booleans, null and undefined).\r\n */\r\n isImmutable?: IsImmutableFunc\r\n /** \r\n An array of dot-separated path strings that match named nodes from \r\n the root state to ignore when checking for immutability.\r\n Defaults to undefined\r\n */\r\n ignoredPaths?: string[]\r\n /** Print a warning if checks take longer than N ms. Default: 32ms */\r\n warnAfter?: number\r\n // @deprecated. Use ignoredPaths\r\n ignore?: string[]\r\n}\r\n\r\n/**\r\n * Creates a middleware that checks whether any state was mutated in between\r\n * dispatches or during a dispatch. If any mutations are detected, an error is\r\n * thrown.\r\n *\r\n * @param options Middleware options.\r\n *\r\n * @public\r\n */\r\nexport function createImmutableStateInvariantMiddleware(\r\n options: ImmutableStateInvariantMiddlewareOptions = {}\r\n): Middleware {\r\n if (process.env.NODE_ENV === 'production') {\r\n return () => (next) => (action) => next(action)\r\n }\r\n\r\n let {\r\n isImmutable = isImmutableDefault,\r\n ignoredPaths,\r\n warnAfter = 32,\r\n ignore,\r\n } = options\r\n\r\n // Alias ignore->ignoredPaths, but prefer ignoredPaths if present\r\n ignoredPaths = ignoredPaths || ignore\r\n\r\n const track = trackForMutations.bind(null, isImmutable, ignoredPaths)\r\n\r\n return ({ getState }) => {\r\n let state = getState()\r\n let tracker = track(state)\r\n\r\n let result\r\n return (next) => (action) => {\r\n const measureUtils = getTimeMeasureUtils(\r\n warnAfter,\r\n 'ImmutableStateInvariantMiddleware'\r\n )\r\n\r\n measureUtils.measureTime(() => {\r\n state = getState()\r\n\r\n result = tracker.detectMutations()\r\n // Track before potentially not meeting the invariant\r\n tracker = track(state)\r\n\r\n invariant(\r\n !result.wasMutated,\r\n `A state mutation was detected between dispatches, in the path '${\r\n result.path || ''\r\n }'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`\r\n )\r\n })\r\n\r\n const dispatchedAction = next(action)\r\n\r\n measureUtils.measureTime(() => {\r\n state = getState()\r\n\r\n result = tracker.detectMutations()\r\n // Track before potentially not meeting the invariant\r\n tracker = track(state)\r\n\r\n result.wasMutated &&\r\n invariant(\r\n !result.wasMutated,\r\n `A state mutation was detected inside a dispatch, in the path: ${\r\n result.path || ''\r\n }. Take a look at the reducer(s) handling the action ${stringify(\r\n action\r\n )}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`\r\n )\r\n })\r\n\r\n measureUtils.warnIfExceeded()\r\n\r\n return dispatchedAction\r\n }\r\n }\r\n}\r\n","import isPlainObject from './isPlainObject'\r\nimport type { Middleware } from 'redux'\r\nimport { getTimeMeasureUtils } from './utils'\r\n\r\n/**\r\n * Returns true if the passed value is \"plain\", i.e. a value that is either\r\n * directly JSON-serializable (boolean, number, string, array, plain object)\r\n * or `undefined`.\r\n *\r\n * @param val The value to check.\r\n *\r\n * @public\r\n */\r\nexport function isPlain(val: any) {\r\n const type = typeof val\r\n return (\r\n type === 'undefined' ||\r\n val === null ||\r\n type === 'string' ||\r\n type === 'boolean' ||\r\n type === 'number' ||\r\n Array.isArray(val) ||\r\n isPlainObject(val)\r\n )\r\n}\r\n\r\ninterface NonSerializableValue {\r\n keyPath: string\r\n value: unknown\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport function findNonSerializableValue(\r\n value: unknown,\r\n path: string = '',\r\n isSerializable: (value: unknown) => boolean = isPlain,\r\n getEntries?: (value: unknown) => [string, any][],\r\n ignoredPaths: readonly string[] = []\r\n): NonSerializableValue | false {\r\n let foundNestedSerializable: NonSerializableValue | false\r\n\r\n if (!isSerializable(value)) {\r\n return {\r\n keyPath: path || '<root>',\r\n value: value,\r\n }\r\n }\r\n\r\n if (typeof value !== 'object' || value === null) {\r\n return false\r\n }\r\n\r\n const entries = getEntries != null ? getEntries(value) : Object.entries(value)\r\n\r\n const hasIgnoredPaths = ignoredPaths.length > 0\r\n\r\n for (const [key, nestedValue] of entries) {\r\n const nestedPath = path ? path + '.' + key : key\r\n\r\n if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) {\r\n continue\r\n }\r\n\r\n if (!isSerializable(nestedValue)) {\r\n return {\r\n keyPath: nestedPath,\r\n value: nestedValue,\r\n }\r\n }\r\n\r\n if (typeof nestedValue === 'object') {\r\n foundNestedSerializable = findNonSerializableValue(\r\n nestedValue,\r\n nestedPath,\r\n isSerializable,\r\n getEntries,\r\n ignoredPaths\r\n )\r\n\r\n if (foundNestedSerializable) {\r\n return foundNestedSerializable\r\n }\r\n }\r\n }\r\n\r\n return false\r\n}\r\n\r\n/**\r\n * Options for `createSerializableStateInvariantMiddleware()`.\r\n *\r\n * @public\r\n */\r\nexport interface SerializableStateInvariantMiddlewareOptions {\r\n /**\r\n * The function to check if a value is considered serializable. This\r\n * function is applied recursively to every value contained in the\r\n * state. Defaults to `isPlain()`.\r\n */\r\n isSerializable?: (value: any) => boolean\r\n /**\r\n * The function that will be used to retrieve entries from each\r\n * value. If unspecified, `Object.entries` will be used. Defaults\r\n * to `undefined`.\r\n */\r\n getEntries?: (value: any) => [string, any][]\r\n\r\n /**\r\n * An array of action types to ignore when checking for serializability.\r\n * Defaults to []\r\n */\r\n ignoredActions?: string[]\r\n\r\n /**\r\n * An array of dot-separated path strings to ignore when checking\r\n * for serializability, Defaults to ['meta.arg']\r\n */\r\n ignoredActionPaths?: string[]\r\n\r\n /**\r\n * An array of dot-separated path strings to ignore when checking\r\n * for serializability, Defaults to []\r\n */\r\n ignoredPaths?: string[]\r\n /**\r\n * Execution time warning threshold. If the middleware takes longer\r\n * than `warnAfter` ms, a warning will be displayed in the console.\r\n * Defaults to 32ms.\r\n */\r\n warnAfter?: number\r\n\r\n /**\r\n * Opt out of checking state, but continue checking actions\r\n */\r\n ignoreState?: boolean\r\n}\r\n\r\n/**\r\n * Creates a middleware that, after every state change, checks if the new\r\n * state is serializable. If a non-serializable value is found within the\r\n * state, an error is printed to the console.\r\n *\r\n * @param options Middleware options.\r\n *\r\n * @public\r\n */\r\nexport function createSerializableStateInvariantMiddleware(\r\n options: SerializableStateInvariantMiddlewareOptions = {}\r\n): Middleware {\r\n if (process.env.NODE_ENV === 'production') {\r\n return () => (next) => (action) => next(action)\r\n }\r\n const {\r\n isSerializable = isPlain,\r\n getEntries,\r\n ignoredActions = [],\r\n ignoredActionPaths = ['meta.arg', 'meta.baseQueryMeta'],\r\n ignoredPaths = [],\r\n warnAfter = 32,\r\n ignoreState = false,\r\n } = options\r\n\r\n return (storeAPI) => (next) => (action) => {\r\n if (ignoredActions.length && ignoredActions.indexOf(action.type) !== -1) {\r\n return next(action)\r\n }\r\n\r\n const measureUtils = getTimeMeasureUtils(\r\n warnAfter,\r\n 'SerializableStateInvariantMiddleware'\r\n )\r\n measureUtils.measureTime(() => {\r\n const foundActionNonSerializableValue = findNonSerializableValue(\r\n action,\r\n '',\r\n isSerializable,\r\n getEntries,\r\n ignoredActionPaths\r\n )\r\n\r\n if (foundActionNonSerializableValue) {\r\n const { keyPath, value } = foundActionNonSerializableValue\r\n\r\n console.error(\r\n `A non-serializable value was detected in an action, in the path: \\`${keyPath}\\`. Value:`,\r\n value,\r\n '\\nTake a look at the logic that dispatched this action: ',\r\n action,\r\n '\\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)',\r\n '\\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)'\r\n )\r\n }\r\n })\r\n\r\n const result = next(action)\r\n\r\n if (!ignoreState) {\r\n measureUtils.measureTime(() => {\r\n const state = storeAPI.getState()\r\n\r\n const foundStateNonSerializableValue = findNonSerializableValue(\r\n state,\r\n '',\r\n isSerializable,\r\n getEntries,\r\n ignoredPaths\r\n )\r\n\r\n if (foundStateNonSerializableValue) {\r\n const { keyPath, value } = foundStateNonSerializableValue\r\n\r\n console.error(\r\n `A non-serializable value was detected in the state, in the path: \\`${keyPath}\\`. Value:`,\r\n value,\r\n `\r\nTake a look at the reducer(s) handling this action type: ${action.type}.\r\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`\r\n )\r\n }\r\n })\r\n\r\n measureUtils.warnIfExceeded()\r\n }\r\n\r\n return result\r\n }\r\n}\r\n","import type { Action } from 'redux'\r\nimport type {\r\n IsUnknownOrNonInferrable,\r\n IfMaybeUndefined,\r\n IfVoid,\r\n IsAny,\r\n} from './tsHelpers'\r\nimport isPlainObject from './isPlainObject'\r\n\r\n/**\r\n * An action with a string type and an associated payload. This is the\r\n * type of action returned by `createAction()` action creators.\r\n *\r\n * @template P The type of the action's payload.\r\n * @template T the type used for the action type.\r\n * @template M The type of the action's meta (optional)\r\n * @template E The type of the action's error (optional)\r\n *\r\n * @public\r\n */\r\nexport type PayloadAction<\r\n P = void,\r\n T extends string = string,\r\n M = never,\r\n E = never\r\n> = {\r\n payload: P\r\n type: T\r\n} & ([M] extends [never]\r\n ? {}\r\n : {\r\n meta: M\r\n }) &\r\n ([E] extends [never]\r\n ? {}\r\n : {\r\n error: E\r\n })\r\n\r\n/**\r\n * A \"prepare\" method to be used as the second parameter of `createAction`.\r\n * Takes any number of arguments and returns a Flux Standard Action without\r\n * type (will be added later) that *must* contain a payload (might be undefined).\r\n *\r\n * @public\r\n */\r\nexport type PrepareAction<P> =\r\n | ((...args: any[]) => { payload: P })\r\n | ((...args: any[]) => { payload: P; meta: any })\r\n | ((...args: any[]) => { payload: P; error: any })\r\n | ((...args: any[]) => { payload: P; meta: any; error: any })\r\n\r\n/**\r\n * Internal version of `ActionCreatorWithPreparedPayload`. Not to be used externally.\r\n *\r\n * @internal\r\n */\r\nexport type _ActionCreatorWithPreparedPayload<\r\n PA extends PrepareAction<any> | void,\r\n T extends string = string\r\n> = PA extends PrepareAction<infer P>\r\n ? ActionCreatorWithPreparedPayload<\r\n Parameters<PA>,\r\n P,\r\n T,\r\n ReturnType<PA> extends {\r\n error: infer E\r\n }\r\n ? E\r\n : never,\r\n ReturnType<PA> extends {\r\n meta: infer M\r\n }\r\n ? M\r\n : never\r\n >\r\n : void\r\n\r\n/**\r\n * Basic type for all action creators.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n */\r\ninterface BaseActionCreator<P, T extends string, M = never, E = never> {\r\n type: T\r\n match: (action: Action<unknown>) => action is PayloadAction<P, T, M, E>\r\n}\r\n\r\n/**\r\n * An action creator that takes multiple arguments that are passed\r\n * to a `PrepareAction` method to create the final Action.\r\n * @typeParam Args arguments for the action creator function\r\n * @typeParam P `payload` type\r\n * @typeParam T `type` name\r\n * @typeParam E optional `error` type\r\n * @typeParam M optional `meta` type\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithPreparedPayload<\r\n Args extends unknown[],\r\n P,\r\n T extends string = string,\r\n E = never,\r\n M = never\r\n> extends BaseActionCreator<P, T, M, E> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with `Args` will return\r\n * an Action with a payload of type `P` and (depending on the `PrepareAction`\r\n * method used) a `meta`- and `error` property of types `M` and `E` respectively.\r\n */\r\n (...args: Args): PayloadAction<P, T, M, E>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that takes an optional payload of type `P`.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithOptionalPayload<P, T extends string = string>\r\n extends BaseActionCreator<P, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload of `P`.\r\n * Calling it without an argument will return a PayloadAction with a payload of `undefined`.\r\n */\r\n (payload?: P): PayloadAction<P, T>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that takes no payload.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithoutPayload<T extends string = string>\r\n extends BaseActionCreator<undefined, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} will\r\n * return a {@link PayloadAction} of type `T` with a payload of `undefined`\r\n */\r\n (): PayloadAction<undefined, T>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that requires a payload of type P.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithPayload<P, T extends string = string>\r\n extends BaseActionCreator<P, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload of `P`\r\n */\r\n (payload: P): PayloadAction<P, T>\r\n}\r\n\r\n/**\r\n * An action creator of type `T` whose `payload` type could not be inferred. Accepts everything as `payload`.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithNonInferrablePayload<\r\n T extends string = string\r\n> extends BaseActionCreator<unknown, T> {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload\r\n * of exactly the type of the argument.\r\n */\r\n <PT extends unknown>(payload: PT): PayloadAction<PT, T>\r\n}\r\n\r\n/**\r\n * An action creator that produces actions with a `payload` attribute.\r\n *\r\n * @typeParam P the `payload` type\r\n * @typeParam T the `type` of the resulting action\r\n * @typeParam PA if the resulting action is preprocessed by a `prepare` method, the signature of said method.\r\n *\r\n * @public\r\n */\r\nexport type PayloadActionCreator<\r\n P = void,\r\n T extends string = string,\r\n PA extends PrepareAction<P> | void = void\r\n> = IfPrepareActionMethodProvided<\r\n PA,\r\n _ActionCreatorWithPreparedPayload<PA, T>,\r\n // else\r\n IsAny<\r\n P,\r\n ActionCreatorWithPayload<any, T>,\r\n IsUnknownOrNonInferrable<\r\n P,\r\n ActionCreatorWithNonInferrablePayload<T>,\r\n // else\r\n IfVoid<\r\n P,\r\n ActionCreatorWithoutPayload<T>,\r\n // else\r\n IfMaybeUndefined<\r\n P,\r\n ActionCreatorWithOptionalPayload<P, T>,\r\n // else\r\n ActionCreatorWithPayload<P, T>\r\n >\r\n >\r\n >\r\n >\r\n>\r\n\r\n/**\r\n * A utility function to create an action creator for the given action type\r\n * string. The action creator accepts a single argument, which will be included\r\n * in the action object as a field called payload. The action creator function\r\n * will also have its toString() overriden so that it returns the action type,\r\n * allowing it to be used in reducer logic that is looking for that action type.\r\n *\r\n * @param type The action type to use for created actions.\r\n * @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.\r\n * If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.\r\n *\r\n * @public\r\n */\r\nexport function createAction<P = void, T extends string = string>(\r\n type: T\r\n): PayloadActionCreator<P, T>\r\n\r\n/**\r\n * A utility function to create an action creator for the given action type\r\n * string. The action creator accepts a single argument, which will be included\r\n * in the action object as a field called payload. The action creator function\r\n * will also have its toString() overriden so that it returns the action type,\r\n * allowing it to be used in reducer logic that is looking for that action type.\r\n *\r\n * @param type The action type to use for created actions.\r\n * @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.\r\n * If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.\r\n *\r\n * @public\r\n */\r\nexport function createAction<\r\n PA extends PrepareAction<any>,\r\n T extends string = string\r\n>(\r\n type: T,\r\n prepareAction: PA\r\n): PayloadActionCreator<ReturnType<PA>['payload'], T, PA>\r\n\r\nexport function createAction(type: string, prepareAction?: Function): any {\r\n function actionCreator(...args: any[]) {\r\n if (prepareAction) {\r\n let prepared = prepareAction(...args)\r\n if (!prepared) {\r\n throw new Error('prepareAction did not return an object')\r\n }\r\n\r\n return {\r\n type,\r\n payload: prepared.payload,\r\n ...('meta' in prepared && { meta: prepared.meta }),\r\n ...('error' in prepared && { error: prepared.error }),\r\n }\r\n }\r\n return { type, payload: args[0] }\r\n }\r\n\r\n actionCreator.toString = () => `${type}`\r\n\r\n actionCreator.type = type\r\n\r\n actionCreator.match = (action: Action<unknown>): action is PayloadAction =>\r\n action.type === type\r\n\r\n return actionCreator\r\n}\r\n\r\nexport function isFSA(action: unknown): action is {\r\n type: string\r\n payload?: unknown\r\n error?: unknown\r\n meta?: unknown\r\n} {\r\n return (\r\n isPlainObject(action) &&\r\n typeof (action as any).type === 'string' &&\r\n Object.keys(action).every(isValidKey)\r\n )\r\n}\r\n\r\nfunction isValidKey(key: string) {\r\n return ['type', 'payload', 'error', 'meta'].indexOf(key) > -1\r\n}\r\n\r\n/**\r\n * Returns the action type of the actions created by the passed\r\n * `createAction()`-generated action creator (arbitrary action creators\r\n * are not supported).\r\n *\r\n * @param action The action creator whose action type to get.\r\n * @returns The action type used by the action creator.\r\n *\r\n * @public\r\n */\r\nexport function getType<T extends string>(\r\n actionCreator: PayloadActionCreator<any, T>\r\n): T {\r\n return `${actionCreator}` as T\r\n}\r\n\r\n// helper types for more readable typings\r\n\r\ntype IfPrepareActionMethodProvided<\r\n PA extends PrepareAction<any> | void,\r\n True,\r\n False\r\n> = PA extends (...args: any[]) => any ? True : False\r\n","import type { Draft } from 'immer'\r\nimport createNextState, { isDraft, isDraftable } from 'immer'\r\nimport type { AnyAction, Action, Reducer } from 'redux'\r\nimport type { ActionReducerMapBuilder } from './mapBuilders'\r\nimport { executeReducerBuilderCallback } from './mapBuilders'\r\nimport type { NoInfer } from './tsHelpers'\r\n\r\n/**\r\n * Defines a mapping from action types to corresponding action object shapes.\r\n *\r\n * @deprecated This should not be used manually - it is only used for internal\r\n * inference purposes and should not have any further value.\r\n * It might be removed in the future.\r\n * @public\r\n */\r\nexport type Actions<T extends keyof any = string> = Record<T, Action>\r\n\r\nexport interface ActionMatcher<A extends AnyAction> {\r\n (action: AnyAction): action is A\r\n}\r\n\r\nexport type ActionMatcherDescription<S, A extends AnyAction> = {\r\n matcher: ActionMatcher<A>\r\n reducer: CaseReducer<S, NoInfer<A>>\r\n}\r\n\r\nexport type ReadonlyActionMatcherDescriptionCollection<S> = ReadonlyArray<\r\n ActionMatcherDescription<S, any>\r\n>\r\n\r\nexport type ActionMatcherDescriptionCollection<S> = Array<\r\n ActionMatcherDescription<S, any>\r\n>\r\n\r\n/**\r\n * An *case reducer* is a reducer function for a specific action type. Case\r\n * reducers can be composed to full reducers using `createReducer()`.\r\n *\r\n * Unlike a normal Redux reducer, a case reducer is never called with an\r\n * `undefined` state to determine the initial state. Instead, the initial\r\n * state is explicitly specified as an argument to `createReducer()`.\r\n *\r\n * In addition, a case reducer can choose to mutate the passed-in `state`\r\n * value directly instead of returning a new state. This does not actually\r\n * cause the store state to be mutated directly; instead, thanks to\r\n * [immer](https://github.com/mweststrate/immer), the mutations are\r\n * translated to copy operations that result in a new state.\r\n *\r\n * @public\r\n */\r\nexport type CaseReducer<S = any, A extends Action = AnyAction> = (\r\n state: Draft<S>,\r\n action: A\r\n) => S | void | Draft<S>\r\n\r\n/**\r\n * A mapping from action types to case reducers for `createReducer()`.\r\n *\r\n * @deprecated This should not be used manually - it is only used\r\n * for internal inference purposes and using it manually\r\n * would lead to type erasure.\r\n * It might be removed in the future.\r\n * @public\r\n */\r\nexport type CaseReducers<S, AS extends Actions> = {\r\n [T in keyof AS]: AS[T] extends Action ? CaseReducer<S, AS[T]> : void\r\n}\r\n\r\n/**\r\n * A utility function that allows defining a reducer as a mapping from action\r\n * type to *case reducer* functions that handle these action types. The\r\n * reducer's initial state is passed as the first argument.\r\n *\r\n * @remarks\r\n * The body of every case reducer is implicitly wrapped with a call to\r\n * `produce()` from the [immer](https://github.com/mweststrate/immer) library.\r\n * This means that rather than returning a new state object, you can also\r\n * mutate the passed-in state object directly; these mutations will then be\r\n * automatically and efficiently translated into copies, giving you both\r\n * convenience and immutability.\r\n *\r\n * @overloadSummary\r\n * This overload accepts a callback function that receives a `builder` object as its argument.\r\n * That builder provides `addCase`, `addMatcher` and `addDefaultCase` functions that may be\r\n * called to define what actions this reducer will handle.\r\n *\r\n * @param initialState - The initial state that should be used when the reducer is called the first time.\r\n * @param builderCallback - A callback that receives a *builder* object to define\r\n * case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`.\r\n * @example\r\n```ts\r\nimport {\r\n createAction,\r\n createReducer,\r\n AnyAction,\r\n PayloadAction,\r\n} from \"@reduxjs/toolkit\";\r\n\r\nconst increment = createAction<number>(\"increment\");\r\nconst decrement = createAction<number>(\"decrement\");\r\n\r\nfunction isActionWithNumberPayload(\r\n action: AnyAction\r\n): action is PayloadAction<number> {\r\n return typeof action.payload === \"number\";\r\n}\r\n\r\ncreateReducer(\r\n {\r\n counter: 0,\r\n sumOfNumberPayloads: 0,\r\n unhandledActions: 0,\r\n },\r\n (builder) => {\r\n builder\r\n .addCase(increment, (state, action) => {\r\n // action is inferred correctly here\r\n state.counter += action.payload;\r\n })\r\n // You can chain calls, or have separate `builder.addCase()` lines each time\r\n .addCase(decrement, (state, action) => {\r\n state.counter -= action.payload;\r\n })\r\n // You can apply a \"matcher function\" to incoming actions\r\n .addMatcher(isActionWithNumberPayload, (state, action) => {})\r\n // and provide a default case if no other handlers matched\r\n .addDefaultCase((state, action) => {});\r\n }\r\n);\r\n```\r\n * @public\r\n */\r\nexport function createReducer<S>(\r\n initialState: S,\r\n builderCallback: (builder: ActionReducerMapBuilder<S>) => void\r\n): Reducer<S>\r\n\r\n/**\r\n * A utility function that allows defining a reducer as a mapping from action\r\n * type to *case reducer* functions that handle these action types. The\r\n * reducer's initial state is passed as the first argument.\r\n *\r\n * The body of every case reducer is implicitly wrapped with a call to\r\n * `produce()` from the [immer](https://github.com/mweststrate/immer) library.\r\n * This means that rather than returning a new state object, you can also\r\n * mutate the passed-in state object directly; these mutations will then be\r\n * automatically and efficiently translated into copies, giving you both\r\n * convenience and immutability.\r\n * \r\n * @overloadSummary\r\n * This overload accepts an object where the keys are string action types, and the values\r\n * are case reducer functions to handle those action types.\r\n *\r\n * @param initialState - The initial state that should be used when the reducer is called the first time.\r\n * @param actionsMap - An object mapping from action types to _case reducers_, each of which handles one specific action type.\r\n * @param actionMatchers - An array of matcher definitions in the form `{matcher, reducer}`.\r\n * All matching reducers will be executed in order, independently if a case reducer matched or not.\r\n * @param defaultCaseReducer - A \"default case\" reducer that is executed if no case reducer and no matcher\r\n * reducer was executed for this action.\r\n *\r\n * @example\r\n```js\r\nconst counterReducer = createReducer(0, {\r\n increment: (state, action) => state + action.payload,\r\n decrement: (state, action) => state - action.payload\r\n})\r\n```\r\n \r\n * Action creators that were generated using [`createAction`](./createAction) may be used directly as the keys here, using computed property syntax:\r\n\r\n```js\r\nconst increment = createAction('increment')\r\nconst decrement = createAction('decrement')\r\n\r\nconst counterReducer = createReducer(0, {\r\n [increment]: (state, action) => state + action.payload,\r\n [decrement.type]: (state, action) => state - action.payload\r\n})\r\n```\r\n * @public\r\n */\r\nexport function createReducer<\r\n S,\r\n CR extends CaseReducers<S, any> = CaseReducers<S, any>\r\n>(\r\n initialState: S,\r\n actionsMap: CR,\r\n actionMatchers?: ActionMatcherDescriptionCollection<S>,\r\n defaultCaseReducer?: CaseReducer<S>\r\n): Reducer<S>\r\n\r\nexport function createReducer<S>(\r\n initialState: S,\r\n mapOrBuilderCallback:\r\n | CaseReducers<S, any>\r\n | ((builder: ActionReducerMapBuilder<S>) => void),\r\n actionMatchers: ReadonlyActionMatcherDescriptionCollection<S> = [],\r\n defaultCaseReducer?: CaseReducer<S>\r\n): Reducer<S> {\r\n let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] =\r\n typeof mapOrBuilderCallback === 'function'\r\n ? executeReducerBuilderCallback(mapOrBuilderCallback)\r\n : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer]\r\n\r\n const frozenInitialState = createNextState(initialState, () => {})\r\n\r\n return function (state = frozenInitialState, action): S {\r\n let caseReducers = [\r\n actionsMap[action.type],\r\n ...finalActionMatchers\r\n .filter(({ matcher }) => matcher(action))\r\n .map(({ reducer }) => reducer),\r\n ]\r\n if (caseReducers.filter((cr) => !!cr).length === 0) {\r\n caseReducers = [finalDefaultCaseReducer]\r\n }\r\n\r\n return caseReducers.reduce((previousState, caseReducer): S => {\r\n if (caseReducer) {\r\n if (isDraft(previousState)) {\r\n // If it's already a draft, we must already be inside a `createNextState` call,\r\n // likely because this is being wrapped in `createReducer`, `createSlice`, or nested\r\n // inside an existing draft. It's safe to just pass the draft to the mutator.\r\n const draft = previousState as Draft<S> // We can assume this is already a draft\r\n const result = caseReducer(draft, action)\r\n\r\n if (typeof result === 'undefined') {\r\n return previousState\r\n }\r\n\r\n return result as S\r\n } else if (!isDraftable(previousState)) {\r\n // If state is not draftable (ex: a primitive, such as 0), we want to directly\r\n // return the caseReducer func and not wrap it with produce.\r\n const result = caseReducer(previousState as any, action)\r\n\r\n if (typeof result === 'undefined') {\r\n if (previousState === null) {\r\n return previousState\r\n }\r\n throw Error(\r\n 'A case reducer on a non-draftable value must not return undefined'\r\n )\r\n }\r\n\r\n return result as S\r\n } else {\r\n // @ts-ignore createNextState() produces an Immutable<Draft<S>> rather\r\n // than an Immutable<S>, and TypeScript cannot find out how to reconcile\r\n // these two types.\r\n return createNextState(previousState, (draft: Draft<S>) => {\r\n return caseReducer(draft, action)\r\n })\r\n }\r\n }\r\n\r\n return previousState\r\n }, state)\r\n }\r\n}\r\n","import type { Action, AnyAction } from 'redux'\r\nimport type {\r\n CaseReducer,\r\n CaseReducers,\r\n ActionMatcher,\r\n ActionMatcherDescriptionCollection,\r\n} from './createReducer'\r\n\r\nexport interface TypedActionCreator<Type extends string> {\r\n (...args: any[]): Action<Type>\r\n type: Type\r\n}\r\n\r\n/**\r\n * A builder for an action <-> reducer map.\r\n *\r\n * @public\r\n */\r\nexport interface ActionReducerMapBuilder<State> {\r\n /**\r\n * Adds a case reducer to handle a single exact action type.\r\n * @remarks\r\n * All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`.\r\n * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\r\n * @param reducer - The actual case reducer function.\r\n */\r\n addCase<ActionCreator extends TypedActionCreator<string>>(\r\n actionCreator: ActionCreator,\r\n reducer: CaseReducer<State, ReturnType<ActionCreator>>\r\n ): ActionReducerMapBuilder<State>\r\n /**\r\n * Adds a case reducer to handle a single exact action type.\r\n * @remarks\r\n * All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`.\r\n * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\r\n * @param reducer - The actual case reducer function.\r\n */\r\n addCase<Type extends string, A extends Action<Type>>(\r\n type: Type,\r\n reducer: CaseReducer<State, A>\r\n ): ActionReducerMapBuilder<State>\r\n\r\n /**\r\n * Allows you to match your incoming actions against your own filter function instead of only the `action.type` property.\r\n * @remarks\r\n * If multiple matcher reducers match, all of them will be executed in the order\r\n * they were defined in - even if a case reducer already matched.\r\n * All calls to `builder.addMatcher` must come after any calls to `builder.addCase` and before any calls to `builder.addDefaultCase`.\r\n * @param matcher - A matcher function. In TypeScript, this should be a [type predicate](https://www.typescriptlang.org/docs/handbook/advanced-types.html#using-type-predicates)\r\n * function\r\n * @param reducer - The actual case reducer function.\r\n *\r\n * @example\r\n```ts\r\nimport {\r\n createAction,\r\n createReducer,\r\n AsyncThunk,\r\n AnyAction,\r\n} from \"@reduxjs/toolkit\";\r\n\r\ntype GenericAsyncThunk = AsyncThunk<unknown, unknown, any>;\r\n\r\ntype PendingAction = ReturnType<GenericAsyncThunk[\"pending\"]>;\r\ntype RejectedAction = ReturnType<GenericAsyncThunk[\"rejected\"]>;\r\ntype FulfilledAction = ReturnType<GenericAsyncThunk[\"fulfilled\"]>;\r\n\r\nconst initialState: Record<string, string> = {};\r\nconst resetAction = createAction(\"reset-tracked-loading-state\");\r\n\r\nfunction isPendingAction(action: AnyAction): action is PendingAction {\r\n return action.type.endsWith(\"/pending\");\r\n}\r\n\r\nconst reducer = createReducer(initialState, (builder) => {\r\n builder\r\n .addCase(resetAction, () => initialState)\r\n // matcher can be defined outside as a type predicate function\r\n .addMatcher(isPendingAction, (state, action) => {\r\n state[action.meta.requestId] = \"pending\";\r\n })\r\n .addMatcher(\r\n // matcher can be defined inline as a type predicate function\r\n (action): action is RejectedAction => action.type.endsWith(\"/rejected\"),\r\n (state, action) => {\r\n state[action.meta.requestId] = \"rejected\";\r\n }\r\n )\r\n // matcher can just return boolean and the matcher can receive a generic argument\r\n .addMatcher<FulfilledAction>(\r\n (action) => action.type.endsWith(\"/fulfilled\"),\r\n (state, action) => {\r\n state[action.meta.requestId] = \"fulfilled\";\r\n }\r\n );\r\n});\r\n```\r\n */\r\n addMatcher<A extends AnyAction>(\r\n matcher: ActionMatcher<A> | ((action: AnyAction) => boolean),\r\n reducer: CaseReducer<State, A>\r\n ): Omit<ActionReducerMapBuilder<State>, 'addCase'>\r\n\r\n /**\r\n * Adds a \"default case\" reducer that is executed if no case reducer and no matcher\r\n * reducer was executed for this action.\r\n * @param reducer - The fallback \"default case\" reducer function.\r\n *\r\n * @example\r\n```ts\r\nimport { createReducer } from '@reduxjs/toolkit'\r\nconst initialState = { otherActions: 0 }\r\nconst reducer = createReducer(initialState, builder => {\r\n builder\r\n // .addCase(...)\r\n // .addMatcher(...)\r\n .addDefaultCase((state, action) => {\r\n state.otherActions++\r\n })\r\n})\r\n```\r\n */\r\n addDefaultCase(reducer: CaseReducer<State, AnyAction>): {}\r\n}\r\n\r\nexport function executeReducerBuilderCallback<S>(\r\n builderCallback: (builder: ActionReducerMapBuilder<S>) => void\r\n): [\r\n CaseReducers<S, any>,\r\n ActionMatcherDescriptionCollection<S>,\r\n CaseReducer<S, AnyAction> | undefined\r\n] {\r\n const actionsMap: CaseReducers<S, any> = {}\r\n const actionMatchers: ActionMatcherDescriptionCollection<S> = []\r\n let defaultCaseReducer: CaseReducer<S, AnyAction> | undefined\r\n const builder = {\r\n addCase(\r\n typeOrActionCreator: string | TypedActionCreator<any>,\r\n reducer: CaseReducer<S>\r\n ) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n /*\r\n to keep the definition by the user in line with actual behavior, \r\n we enforce `addCase` to always be called before calling `addMatcher`\r\n as matching cases take precedence over matchers\r\n */\r\n if (actionMatchers.length > 0) {\r\n throw new Error(\r\n '`builder.addCase` should only be called before calling `builder.addMatcher`'\r\n )\r\n }\r\n if (defaultCaseReducer) {\r\n throw new Error(\r\n '`builder.addCase` should only be called before calling `builder.addDefaultCase`'\r\n )\r\n }\r\n }\r\n const type =\r\n typeof typeOrActionCreator === 'string'\r\n ? typeOrActionCreator\r\n : typeOrActionCreator.type\r\n if (type in actionsMap) {\r\n throw new Error(\r\n 'addCase cannot be called with two reducers for the same action type'\r\n )\r\n }\r\n actionsMap[type] = reducer\r\n return builder\r\n },\r\n addMatcher<A extends AnyAction>(\r\n matcher: ActionMatcher<A>,\r\n reducer: CaseReducer<S, A>\r\n ) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (defaultCaseReducer) {\r\n throw new Error(\r\n '`builder.addMatcher` should only be called before calling `builder.addDefaultCase`'\r\n )\r\n }\r\n }\r\n actionMatchers.push({ matcher, reducer })\r\n return builder\r\n },\r\n addDefaultCase(reducer: CaseReducer<S, AnyAction>) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (defaultCaseReducer) {\r\n throw new Error('`builder.addDefaultCase` can only be called once')\r\n }\r\n }\r\n defaultCaseReducer = reducer\r\n return builder\r\n },\r\n }\r\n builderCallback(builder)\r\n return [actionsMap, actionMatchers, defaultCaseReducer]\r\n}\r\n","import type { Reducer } from 'redux'\r\nimport type {\r\n ActionCreatorWithoutPayload,\r\n PayloadAction,\r\n PayloadActionCreator,\r\n PrepareAction,\r\n _ActionCreatorWithPreparedPayload,\r\n} from './createAction'\r\nimport { createAction } from './createAction'\r\nimport type { CaseReducer, CaseReducers } from './createReducer'\r\nimport { createReducer } from './createReducer'\r\nimport type { ActionReducerMapBuilder } from './mapBuilders'\r\nimport { executeReducerBuilderCallback } from './mapBuilders'\r\nimport type { NoInfer } from './tsHelpers'\r\n\r\n/**\r\n * An action creator attached to a slice.\r\n *\r\n * @deprecated please use PayloadActionCreator directly\r\n *\r\n * @public\r\n */\r\nexport type SliceActionCreator<P> = PayloadActionCreator<P>\r\n\r\n/**\r\n * The return value of `createSlice`\r\n *\r\n * @public\r\n */\r\nexport interface Slice<\r\n State = any,\r\n CaseReducers extends SliceCaseReducers<State> = SliceCaseReducers<State>,\r\n Name extends string = string\r\n> {\r\n /**\r\n * The slice name.\r\n */\r\n name: Name\r\n\r\n /**\r\n * The slice's reducer.\r\n */\r\n reducer: Reducer<State>\r\n\r\n /**\r\n * Action creators for the types of actions that are handled by the slice\r\n * reducer.\r\n */\r\n actions: CaseReducerActions<CaseReducers>\r\n\r\n /**\r\n * The individual case reducer functions that were passed in the `reducers` parameter.\r\n * This enables reuse and testing if they were defined inline when calling `createSlice`.\r\n */\r\n caseReducers: SliceDefinedCaseReducers<CaseReducers>\r\n}\r\n\r\n/**\r\n * Options for `createSlice()`.\r\n *\r\n * @public\r\n */\r\nexport interface CreateSliceOptions<\r\n State = any,\r\n CR extends SliceCaseReducers<State> = SliceCaseReducers<State>,\r\n Name extends string = string\r\n> {\r\n /**\r\n * The slice's name. Used to namespace the generated action types.\r\n */\r\n name: Name\r\n\r\n /**\r\n * The initial state to be returned by the slice reducer.\r\n */\r\n initialState: State\r\n\r\n /**\r\n * A mapping from action types to action-type-specific *case reducer*\r\n * functions. For every action type, a matching action creator will be\r\n * generated using `createAction()`.\r\n */\r\n reducers: ValidateSliceCaseReducers<State, CR>\r\n\r\n /**\r\n * A callback that receives a *builder* object to define\r\n * case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`.\r\n * \r\n * Alternatively, a mapping from action types to action-type-specific *case reducer*\r\n * functions. These reducers should have existing action types used\r\n * as the keys, and action creators will _not_ be generated.\r\n * \r\n * @example\r\n```ts\r\nimport { createAction, createSlice, Action, AnyAction } from '@reduxjs/toolkit'\r\nconst incrementBy = createAction<number>('incrementBy')\r\nconst decrement = createAction('decrement')\r\n\r\ninterface RejectedAction extends Action {\r\n error: Error\r\n}\r\n\r\nfunction isRejectedAction(action: AnyAction): action is RejectedAction {\r\n return action.type.endsWith('rejected')\r\n}\r\n\r\ncreateSlice({\r\n name: 'counter',\r\n initialState: 0,\r\n reducers: {},\r\n extraReducers: builder => {\r\n builder\r\n .addCase(incrementBy, (state, action) => {\r\n // action is inferred correctly here if using TS\r\n })\r\n // You can chain calls, or have separate `builder.addCase()` lines each time\r\n .addCase(decrement, (state, action) => {})\r\n // You can match a range of action types\r\n .addMatcher(\r\n isRejectedAction,\r\n // `action` will be inferred as a RejectedAction due to isRejectedAction being defined as a type guard\r\n (state, action) => {}\r\n )\r\n // and provide a default case if no other handlers matched\r\n .addDefaultCase((state, action) => {})\r\n }\r\n})\r\n```\r\n */\r\n extraReducers?:\r\n | CaseReducers<NoInfer<State>, any>\r\n | ((builder: ActionReducerMapBuilder<NoInfer<State>>) => void)\r\n}\r\n\r\n/**\r\n * A CaseReducer with a `prepare` method.\r\n *\r\n * @public\r\n */\r\nexport type CaseReducerWithPrepare<State, Action extends PayloadAction> = {\r\n reducer: CaseReducer<State, Action>\r\n prepare: PrepareAction<Action['payload']>\r\n}\r\n\r\n/**\r\n * The type describing a slice's `reducers` option.\r\n *\r\n * @public\r\n */\r\nexport type SliceCaseReducers<State> = {\r\n [K: string]:\r\n | CaseReducer<State, PayloadAction<any>>\r\n | CaseReducerWithPrepare<State, PayloadAction<any, string, any, any>>\r\n}\r\n\r\n/**\r\n * Derives the slice's `actions` property from the `reducers` options\r\n *\r\n * @public\r\n */\r\nexport type CaseReducerActions<CaseReducers extends SliceCaseReducers<any>> = {\r\n [Type in keyof CaseReducers]: CaseReducers[Type] extends { prepare: any }\r\n ? ActionCreatorForCaseReducerWithPrepare<CaseReducers[Type]>\r\n : ActionCreatorForCaseReducer<CaseReducers[Type]>\r\n}\r\n\r\n/**\r\n * Get a `PayloadActionCreator` type for a passed `CaseReducerWithPrepare`\r\n *\r\n * @internal\r\n */\r\ntype ActionCreatorForCaseReducerWithPrepare<CR extends { prepare: any }> =\r\n _ActionCreatorWithPreparedPayload<CR['prepare'], string>\r\n\r\n/**\r\n * Get a `PayloadActionCreator` type for a passed `CaseReducer`\r\n *\r\n * @internal\r\n */\r\ntype ActionCreatorForCaseReducer<CR> = CR extends (\r\n state: any,\r\n action: infer Action\r\n) => any\r\n ? Action extends { payload: infer P }\r\n ? PayloadActionCreator<P>\r\n : ActionCreatorWithoutPayload\r\n : ActionCreatorWithoutPayload\r\n\r\n/**\r\n * Extracts the CaseReducers out of a `reducers` object, even if they are\r\n * tested into a `CaseReducerWithPrepare`.\r\n *\r\n * @internal\r\n */\r\ntype SliceDefinedCaseReducers<CaseReducers extends SliceCaseReducers<any>> = {\r\n [Type in keyof CaseReducers]: CaseReducers[Type] extends {\r\n reducer: infer Reducer\r\n }\r\n ? Reducer\r\n : CaseReducers[Type]\r\n}\r\n\r\n/**\r\n * Used on a SliceCaseReducers object.\r\n * Ensures that if a CaseReducer is a `CaseReducerWithPrepare`, that\r\n * the `reducer` and the `prepare` function use the same type of `payload`.\r\n *\r\n * Might do additional such checks in the future.\r\n *\r\n * This type is only ever useful if you want to write your own wrapper around\r\n * `createSlice`. Please don't use it otherwise!\r\n *\r\n * @public\r\n */\r\nexport type ValidateSliceCaseReducers<\r\n S,\r\n ACR extends SliceCaseReducers<S>\r\n> = ACR &\r\n {\r\n [T in keyof ACR]: ACR[T] extends {\r\n reducer(s: S, action?: infer A): any\r\n }\r\n ? {\r\n prepare(...a: never[]): Omit<A, 'type'>\r\n }\r\n : {}\r\n }\r\n\r\nfunction getType(slice: string, actionKey: string): string {\r\n return `${slice}/${actionKey}`\r\n}\r\n\r\n/**\r\n * A function that accepts an initial state, an object full of reducer\r\n * functions, and a \"slice name\", and automatically generates\r\n * action creators and action types that correspond to the\r\n * reducers and state.\r\n *\r\n * The `reducer` argument is passed to `createReducer()`.\r\n *\r\n * @public\r\n */\r\nexport function createSlice<\r\n State,\r\n CaseReducers extends SliceCaseReducers<State>,\r\n Name extends string = string\r\n>(\r\n options: CreateSliceOptions<State, CaseReducers, Name>\r\n): Slice<State, CaseReducers, Name> {\r\n const { name, initialState } = options\r\n if (!name) {\r\n throw new Error('`name` is a required option for createSlice')\r\n }\r\n const reducers = options.reducers || {}\r\n const [\r\n extraReducers = {},\r\n actionMatchers = [],\r\n defaultCaseReducer = undefined,\r\n ] =\r\n typeof options.extraReducers === 'function'\r\n ? executeReducerBuilderCallback(options.extraReducers)\r\n : [options.extraReducers]\r\n\r\n const reducerNames = Object.keys(reducers)\r\n\r\n const sliceCaseReducersByName: Record<string, CaseReducer> = {}\r\n const sliceCaseReducersByType: Record<string, CaseReducer> = {}\r\n const actionCreators: Record<string, Function> = {}\r\n\r\n reducerNames.forEach((reducerName) => {\r\n const maybeReducerWithPrepare = reducers[reducerName]\r\n const type = getType(name, reducerName)\r\n\r\n let caseReducer: CaseReducer<State, any>\r\n let prepareCallback: PrepareAction<any> | undefined\r\n\r\n if ('reducer' in maybeReducerWithPrepare) {\r\n caseReducer = maybeReducerWithPrepare.reducer\r\n prepareCallback = maybeReducerWithPrepare.prepare\r\n } else {\r\n caseReducer = maybeReducerWithPrepare\r\n }\r\n\r\n sliceCaseReducersByName[reducerName] = caseReducer\r\n sliceCaseReducersByType[type] = caseReducer\r\n actionCreators[reducerName] = prepareCallback\r\n ? createAction(type, prepareCallback)\r\n : createAction(type)\r\n })\r\n\r\n const finalCaseReducers = { ...extraReducers, ...sliceCaseReducersByType }\r\n const reducer = createReducer(\r\n initialState,\r\n finalCaseReducers as any,\r\n actionMatchers,\r\n defaultCaseReducer\r\n )\r\n\r\n return {\r\n name,\r\n reducer,\r\n actions: actionCreators as any,\r\n caseReducers: sliceCaseReducersByName as any,\r\n }\r\n}\r\n","import createNextState, { isDraft } from 'immer'\r\nimport type { EntityState, PreventAny } from './models'\r\nimport type { PayloadAction } from '../createAction'\r\nimport { isFSA } from '../createAction'\r\nimport { IsAny } from '../tsHelpers'\r\n\r\nexport function createSingleArgumentStateOperator<V>(\r\n mutator: (state: EntityState<V>) => void\r\n) {\r\n const operator = createStateOperator((_: undefined, state: EntityState<V>) =>\r\n mutator(state)\r\n )\r\n\r\n return function operation<S extends EntityState<V>>(\r\n state: PreventAny<S, V>\r\n ): S {\r\n return operator(state as S, undefined)\r\n }\r\n}\r\n\r\nexport function createStateOperator<V, R>(\r\n mutator: (arg: R, state: EntityState<V>) => void\r\n) {\r\n return function operation<S extends EntityState<V>>(\r\n state: S,\r\n arg: R | PayloadAction<R>\r\n ): S {\r\n function isPayloadActionArgument(\r\n arg: R | PayloadAction<R>\r\n ): arg is PayloadAction<R> {\r\n return isFSA(arg)\r\n }\r\n\r\n const runMutator = (draft: EntityState<V>) => {\r\n if (isPayloadActionArgument(arg)) {\r\n mutator(arg.payload, draft)\r\n } else {\r\n mutator(arg, draft)\r\n }\r\n }\r\n\r\n if (isDraft(state)) {\r\n // we must already be inside a `createNextState` call, likely because\r\n // this is being wrapped in `createReducer` or `createSlice`.\r\n // It's safe to just pass the draft to the mutator.\r\n runMutator(state)\r\n\r\n // since it's a draft, we'll just return it\r\n return state\r\n } else {\r\n // @ts-ignore createNextState() produces an Immutable<Draft<S>> rather\r\n // than an Immutable<S>, and TypeScript cannot find out how to reconcile\r\n // these two types.\r\n return createNextState(state, runMutator)\r\n }\r\n }\r\n}\r\n","import type { EntityState, IdSelector, Update, EntityId } from './models'\r\n\r\nexport function selectIdValue<T>(entity: T, selectId: IdSelector<T>) {\r\n const key = selectId(entity)\r\n\r\n if (process.env.NODE_ENV !== 'production' && key === undefined) {\r\n console.warn(\r\n 'The entity passed to the `selectId` implementation returned undefined.',\r\n 'You should probably provide your own `selectId` implementation.',\r\n 'The entity that was passed:',\r\n entity,\r\n 'The `selectId` implementation:',\r\n selectId.toString()\r\n )\r\n }\r\n\r\n return key\r\n}\r\n\r\nexport function ensureEntitiesArray<T>(\r\n entities: readonly T[] | Record<EntityId, T>\r\n): readonly T[] {\r\n if (!Array.isArray(entities)) {\r\n entities = Object.values(entities)\r\n }\r\n\r\n return entities\r\n}\r\n\r\nexport function splitAddedUpdatedEntities<T>(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n selectId: IdSelector<T>,\r\n state: EntityState<T>\r\n): [T[], Update<T>[]] {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n const added: T[] = []\r\n const updated: Update<T>[] = []\r\n\r\n for (const entity of newEntities) {\r\n const id = selectIdValue(entity, selectId)\r\n if (id in state.entities) {\r\n updated.push({ id, changes: entity })\r\n } else {\r\n added.push(entity)\r\n }\r\n }\r\n return [added, updated]\r\n}\r\n","import type {\r\n EntityState,\r\n EntityStateAdapter,\r\n IdSelector,\r\n Update,\r\n EntityId,\r\n} from './models'\r\nimport {\r\n createStateOperator,\r\n createSingleArgumentStateOperator,\r\n} from './state_adapter'\r\nimport {\r\n selectIdValue,\r\n ensureEntitiesArray,\r\n splitAddedUpdatedEntities,\r\n} from './utils'\r\n\r\nexport function createUnsortedStateAdapter<T>(\r\n selectId: IdSelector<T>\r\n): EntityStateAdapter<T> {\r\n type R = EntityState<T>\r\n\r\n function addOneMutably(entity: T, state: R): void {\r\n const key = selectIdValue(entity, selectId)\r\n\r\n if (key in state.entities) {\r\n return\r\n }\r\n\r\n state.ids.push(key)\r\n state.entities[key] = entity\r\n }\r\n\r\n function addManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n for (const entity of newEntities) {\r\n addOneMutably(entity, state)\r\n }\r\n }\r\n\r\n function setOneMutably(entity: T, state: R): void {\r\n const key = selectIdValue(entity, selectId)\r\n if (!(key in state.entities)) {\r\n state.ids.push(key)\r\n }\r\n state.entities[key] = entity\r\n }\r\n\r\n function setManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n for (const entity of newEntities) {\r\n setOneMutably(entity, state)\r\n }\r\n }\r\n\r\n function setAllMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n state.ids = []\r\n state.entities = {}\r\n\r\n addManyMutably(newEntities, state)\r\n }\r\n\r\n function removeOneMutably(key: EntityId, state: R): void {\r\n return removeManyMutably([key], state)\r\n }\r\n\r\n function removeManyMutably(keys: readonly EntityId[], state: R): void {\r\n let didMutate = false\r\n\r\n keys.forEach((key) => {\r\n if (key in state.entities) {\r\n delete state.entities[key]\r\n didMutate = true\r\n }\r\n })\r\n\r\n if (didMutate) {\r\n state.ids = state.ids.filter((id) => id in state.entities)\r\n }\r\n }\r\n\r\n function removeAllMutably(state: R): void {\r\n Object.assign(state, {\r\n ids: [],\r\n entities: {},\r\n })\r\n }\r\n\r\n function takeNewKey(\r\n keys: { [id: string]: EntityId },\r\n update: Update<T>,\r\n state: R\r\n ): boolean {\r\n const original = state.entities[update.id]\r\n const updated: T = Object.assign({}, original, update.changes)\r\n const newKey = selectIdValue(updated, selectId)\r\n const hasNewKey = newKey !== update.id\r\n\r\n if (hasNewKey) {\r\n keys[update.id] = newKey\r\n delete state.entities[update.id]\r\n }\r\n\r\n state.entities[newKey] = updated\r\n\r\n return hasNewKey\r\n }\r\n\r\n function updateOneMutably(update: Update<T>, state: R): void {\r\n return updateManyMutably([update], state)\r\n }\r\n\r\n function updateManyMutably(\r\n updates: ReadonlyArray<Update<T>>,\r\n state: R\r\n ): void {\r\n const newKeys: { [id: string]: EntityId } = {}\r\n\r\n const updatesPerEntity: { [id: string]: Update<T> } = {}\r\n\r\n updates.forEach((update) => {\r\n // Only apply updates to entities that currently exist\r\n if (update.id in state.entities) {\r\n // If there are multiple updates to one entity, merge them together\r\n updatesPerEntity[update.id] = {\r\n id: update.id,\r\n // Spreads ignore falsy values, so this works even if there isn't\r\n // an existing update already at this key\r\n changes: {\r\n ...(updatesPerEntity[update.id]\r\n ? updatesPerEntity[update.id].changes\r\n : null),\r\n ...update.changes,\r\n },\r\n }\r\n }\r\n })\r\n\r\n updates = Object.values(updatesPerEntity)\r\n\r\n const didMutateEntities = updates.length > 0\r\n\r\n if (didMutateEntities) {\r\n const didMutateIds =\r\n updates.filter((update) => takeNewKey(newKeys, update, state)).length >\r\n 0\r\n\r\n if (didMutateIds) {\r\n state.ids = state.ids.map((id) => newKeys[id] || id)\r\n }\r\n }\r\n }\r\n\r\n function upsertOneMutably(entity: T, state: R): void {\r\n return upsertManyMutably([entity], state)\r\n }\r\n\r\n function upsertManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n const [added, updated] = splitAddedUpdatedEntities<T>(\r\n newEntities,\r\n selectId,\r\n state\r\n )\r\n\r\n updateManyMutably(updated, state)\r\n addManyMutably(added, state)\r\n }\r\n\r\n return {\r\n removeAll: createSingleArgumentStateOperator(removeAllMutably),\r\n addOne: createStateOperator(addOneMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n upsertMany: createStateOperator(upsertManyMutably),\r\n removeOne: createStateOperator(removeOneMutably),\r\n removeMany: createStateOperator(removeManyMutably),\r\n }\r\n}\r\n","import type {\r\n EntityDefinition,\r\n Comparer,\r\n IdSelector,\r\n EntityAdapter,\r\n} from './models'\r\nimport { createInitialStateFactory } from './entity_state'\r\nimport { createSelectorsFactory } from './state_selectors'\r\nimport { createSortedStateAdapter } from './sorted_state_adapter'\r\nimport { createUnsortedStateAdapter } from './unsorted_state_adapter'\r\n\r\n/**\r\n *\r\n * @param options\r\n *\r\n * @public\r\n */\r\nexport function createEntityAdapter<T>(\r\n options: {\r\n selectId?: IdSelector<T>\r\n sortComparer?: false | Comparer<T>\r\n } = {}\r\n): EntityAdapter<T> {\r\n const { selectId, sortComparer }: EntityDefinition<T> = {\r\n sortComparer: false,\r\n selectId: (instance: any) => instance.id,\r\n ...options,\r\n }\r\n\r\n const stateFactory = createInitialStateFactory<T>()\r\n const selectorsFactory = createSelectorsFactory<T>()\r\n const stateAdapter = sortComparer\r\n ? createSortedStateAdapter(selectId, sortComparer)\r\n : createUnsortedStateAdapter(selectId)\r\n\r\n return {\r\n selectId,\r\n sortComparer,\r\n ...stateFactory,\r\n ...selectorsFactory,\r\n ...stateAdapter,\r\n }\r\n}\r\n","import type { EntityState } from './models'\r\n\r\nexport function getInitialEntityState<V>(): EntityState<V> {\r\n return {\r\n ids: [],\r\n entities: {},\r\n }\r\n}\r\n\r\nexport function createInitialStateFactory<V>() {\r\n function getInitialState(): EntityState<V>\r\n function getInitialState<S extends object>(\r\n additionalState: S\r\n ): EntityState<V> & S\r\n function getInitialState(additionalState: any = {}): any {\r\n return Object.assign(getInitialEntityState(), additionalState)\r\n }\r\n\r\n return { getInitialState }\r\n}\r\n","import { createDraftSafeSelector } from '../createDraftSafeSelector'\r\nimport type {\r\n EntityState,\r\n EntitySelectors,\r\n Dictionary,\r\n EntityId,\r\n} from './models'\r\n\r\nexport function createSelectorsFactory<T>() {\r\n function getSelectors(): EntitySelectors<T, EntityState<T>>\r\n function getSelectors<V>(\r\n selectState: (state: V) => EntityState<T>\r\n ): EntitySelectors<T, V>\r\n function getSelectors(\r\n selectState?: (state: any) => EntityState<T>\r\n ): EntitySelectors<T, any> {\r\n const selectIds = (state: any) => state.ids\r\n\r\n const selectEntities = (state: EntityState<T>) => state.entities\r\n\r\n const selectAll = createDraftSafeSelector(\r\n selectIds,\r\n selectEntities,\r\n (ids: readonly T[], entities: Dictionary<T>): any =>\r\n ids.map((id: any) => (entities as any)[id])\r\n )\r\n\r\n const selectId = (_: any, id: EntityId) => id\r\n\r\n const selectById = (entities: Dictionary<T>, id: EntityId) => entities[id]\r\n\r\n const selectTotal = createDraftSafeSelector(selectIds, (ids) => ids.length)\r\n\r\n if (!selectState) {\r\n return {\r\n selectIds,\r\n selectEntities,\r\n selectAll,\r\n selectTotal,\r\n selectById: createDraftSafeSelector(\r\n selectEntities,\r\n selectId,\r\n selectById\r\n ),\r\n }\r\n }\r\n\r\n const selectGlobalizedEntities = createDraftSafeSelector(\r\n selectState,\r\n selectEntities\r\n )\r\n\r\n return {\r\n selectIds: createDraftSafeSelector(selectState, selectIds),\r\n selectEntities: selectGlobalizedEntities,\r\n selectAll: createDraftSafeSelector(selectState, selectAll),\r\n selectTotal: createDraftSafeSelector(selectState, selectTotal),\r\n selectById: createDraftSafeSelector(\r\n selectGlobalizedEntities,\r\n selectId,\r\n selectById\r\n ),\r\n }\r\n }\r\n\r\n return { getSelectors }\r\n}\r\n","import type {\r\n EntityState,\r\n IdSelector,\r\n Comparer,\r\n EntityStateAdapter,\r\n Update,\r\n EntityId,\r\n} from './models'\r\nimport { createStateOperator } from './state_adapter'\r\nimport { createUnsortedStateAdapter } from './unsorted_state_adapter'\r\nimport {\r\n selectIdValue,\r\n ensureEntitiesArray,\r\n splitAddedUpdatedEntities,\r\n} from './utils'\r\n\r\nexport function createSortedStateAdapter<T>(\r\n selectId: IdSelector<T>,\r\n sort: Comparer<T>\r\n): EntityStateAdapter<T> {\r\n type R = EntityState<T>\r\n\r\n const { removeOne, removeMany, removeAll } =\r\n createUnsortedStateAdapter(selectId)\r\n\r\n function addOneMutably(entity: T, state: R): void {\r\n return addManyMutably([entity], state)\r\n }\r\n\r\n function addManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n\r\n const models = newEntities.filter(\r\n (model) => !(selectIdValue(model, selectId) in state.entities)\r\n )\r\n\r\n if (models.length !== 0) {\r\n merge(models, state)\r\n }\r\n }\r\n\r\n function setOneMutably(entity: T, state: R): void {\r\n return setManyMutably([entity], state)\r\n }\r\n\r\n function setManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n if (newEntities.length !== 0) {\r\n merge(newEntities, state)\r\n }\r\n }\r\n\r\n function setAllMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n newEntities = ensureEntitiesArray(newEntities)\r\n state.entities = {}\r\n state.ids = []\r\n\r\n addManyMutably(newEntities, state)\r\n }\r\n\r\n function updateOneMutably(update: Update<T>, state: R): void {\r\n return updateManyMutably([update], state)\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types\r\n function takeUpdatedModel(models: T[], update: Update<T>, state: R): boolean {\r\n if (!(update.id in state.entities)) {\r\n return false\r\n }\r\n\r\n const original = state.entities[update.id]\r\n const updated = Object.assign({}, original, update.changes)\r\n const newKey = selectIdValue(updated, selectId)\r\n\r\n delete state.entities[update.id]\r\n\r\n models.push(updated)\r\n\r\n return newKey !== update.id\r\n }\r\n\r\n function updateManyMutably(\r\n updates: ReadonlyArray<Update<T>>,\r\n state: R\r\n ): void {\r\n const models: T[] = []\r\n\r\n updates.forEach((update) => takeUpdatedModel(models, update, state))\r\n\r\n if (models.length !== 0) {\r\n merge(models, state)\r\n }\r\n }\r\n\r\n function upsertOneMutably(entity: T, state: R): void {\r\n return upsertManyMutably([entity], state)\r\n }\r\n\r\n function upsertManyMutably(\r\n newEntities: readonly T[] | Record<EntityId, T>,\r\n state: R\r\n ): void {\r\n const [added, updated] = splitAddedUpdatedEntities<T>(\r\n newEntities,\r\n selectId,\r\n state\r\n )\r\n\r\n updateManyMutably(updated, state)\r\n addManyMutably(added, state)\r\n }\r\n\r\n function areArraysEqual(a: readonly unknown[], b: readonly unknown[]) {\r\n if (a.length !== b.length) {\r\n return false\r\n }\r\n\r\n for (let i = 0; i < a.length && i < b.length; i++) {\r\n if (a[i] === b[i]) {\r\n continue\r\n }\r\n return false\r\n }\r\n return true\r\n }\r\n\r\n function merge(models: readonly T[], state: R): void {\r\n // Insert/overwrite all new/updated\r\n models.forEach((model) => {\r\n state.entities[selectId(model)] = model\r\n })\r\n\r\n const allEntities = Object.values(state.entities) as T[]\r\n allEntities.sort(sort)\r\n\r\n const newSortedIds = allEntities.map(selectId)\r\n const { ids } = state\r\n\r\n if (!areArraysEqual(ids, newSortedIds)) {\r\n state.ids = newSortedIds\r\n }\r\n }\r\n\r\n return {\r\n removeOne,\r\n removeMany,\r\n removeAll,\r\n addOne: createStateOperator(addOneMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertMany: createStateOperator(upsertManyMutably),\r\n }\r\n}\r\n","// Borrowed from https://github.com/ai/nanoid/blob/3.0.2/non-secure/index.js\r\n// This alphabet uses `A-Za-z0-9_-` symbols. A genetic algorithm helped\r\n// optimize the gzip compression for this alphabet.\r\nlet urlAlphabet =\r\n 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'\r\n\r\n/**\r\n *\r\n * @public\r\n */\r\nexport let nanoid = (size = 21) => {\r\n let id = ''\r\n // A compact alternative for `for (var i = 0; i < step; i++)`.\r\n let i = size\r\n while (i--) {\r\n // `| 0` is more compact and faster than `Math.floor()`.\r\n id += urlAlphabet[(Math.random() * 64) | 0]\r\n }\r\n return id\r\n}\r\n","import type { Dispatch, AnyAction } from 'redux'\r\nimport type {\r\n PayloadAction,\r\n ActionCreatorWithPreparedPayload,\r\n} from './createAction'\r\nimport { createAction } from './createAction'\r\nimport type { ThunkDispatch } from 'redux-thunk'\r\nimport type { FallbackIfUnknown, IsAny, IsUnknown } from './tsHelpers'\r\nimport { nanoid } from './nanoid'\r\n\r\n// @ts-ignore we need the import of these types due to a bundling issue.\r\ntype _Keep = PayloadAction | ActionCreatorWithPreparedPayload<any, unknown>\r\n\r\nexport type BaseThunkAPI<\r\n S,\r\n E,\r\n D extends Dispatch = Dispatch,\r\n RejectedValue = undefined,\r\n RejectedMeta = unknown,\r\n FulfilledMeta = unknown\r\n> = {\r\n dispatch: D\r\n getState: () => S\r\n extra: E\r\n requestId: string\r\n signal: AbortSignal\r\n rejectWithValue: IsUnknown<\r\n RejectedMeta,\r\n (value: RejectedValue) => RejectWithValue<RejectedValue, RejectedMeta>,\r\n (\r\n value: RejectedValue,\r\n meta: RejectedMeta\r\n ) => RejectWithValue<RejectedValue, RejectedMeta>\r\n >\r\n fulfillWithValue: IsUnknown<\r\n FulfilledMeta,\r\n <FulfilledValue>(\r\n value: FulfilledValue\r\n ) => FulfillWithMeta<FulfilledValue, FulfilledMeta>,\r\n <FulfilledValue>(\r\n value: FulfilledValue,\r\n meta: FulfilledMeta\r\n ) => FulfillWithMeta<FulfilledValue, FulfilledMeta>\r\n >\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport interface SerializedError {\r\n name?: string\r\n message?: string\r\n stack?: string\r\n code?: string\r\n}\r\n\r\nconst commonProperties: Array<keyof SerializedError> = [\r\n 'name',\r\n 'message',\r\n 'stack',\r\n 'code',\r\n]\r\n\r\nclass RejectWithValue<Payload, RejectedMeta> {\r\n /*\r\n type-only property to distinguish between RejectWithValue and FulfillWithMeta\r\n does not exist at runtime\r\n */\r\n private readonly _type!: 'RejectWithValue'\r\n constructor(\r\n public readonly payload: Payload,\r\n public readonly meta: RejectedMeta\r\n ) {}\r\n}\r\n\r\nclass FulfillWithMeta<Payload, FulfilledMeta> {\r\n /*\r\n type-only property to distinguish between RejectWithValue and FulfillWithMeta\r\n does not exist at runtime\r\n */\r\n private readonly _type!: 'FulfillWithMeta'\r\n constructor(\r\n public readonly payload: Payload,\r\n public readonly meta: FulfilledMeta\r\n ) {}\r\n}\r\n\r\n/**\r\n * Serializes an error into a plain object.\r\n * Reworked from https://github.com/sindresorhus/serialize-error\r\n *\r\n * @public\r\n */\r\nexport const miniSerializeError = (value: any): SerializedError => {\r\n if (typeof value === 'object' && value !== null) {\r\n const simpleError: SerializedError = {}\r\n for (const property of commonProperties) {\r\n if (typeof value[property] === 'string') {\r\n simpleError[property] = value[property]\r\n }\r\n }\r\n\r\n return simpleError\r\n }\r\n\r\n return { message: String(value) }\r\n}\r\n\r\ntype AsyncThunkConfig = {\r\n state?: unknown\r\n dispatch?: Dispatch\r\n extra?: unknown\r\n rejectValue?: unknown\r\n serializedErrorType?: unknown\r\n pendingMeta?: unknown\r\n fulfilledMeta?: unknown\r\n rejectedMeta?: unknown\r\n}\r\n\r\ntype GetState<ThunkApiConfig> = ThunkApiConfig extends {\r\n state: infer State\r\n}\r\n ? State\r\n : unknown\r\ntype GetExtra<ThunkApiConfig> = ThunkApiConfig extends { extra: infer Extra }\r\n ? Extra\r\n : unknown\r\ntype GetDispatch<ThunkApiConfig> = ThunkApiConfig extends {\r\n dispatch: infer Dispatch\r\n}\r\n ? FallbackIfUnknown<\r\n Dispatch,\r\n ThunkDispatch<\r\n GetState<ThunkApiConfig>,\r\n GetExtra<ThunkApiConfig>,\r\n AnyAction\r\n >\r\n >\r\n : ThunkDispatch<GetState<ThunkApiConfig>, GetExtra<ThunkApiConfig>, AnyAction>\r\n\r\ntype GetThunkAPI<ThunkApiConfig> = BaseThunkAPI<\r\n GetState<ThunkApiConfig>,\r\n GetExtra<ThunkApiConfig>,\r\n GetDispatch<ThunkApiConfig>,\r\n GetRejectValue<ThunkApiConfig>,\r\n GetRejectedMeta<ThunkApiConfig>,\r\n GetFulfilledMeta<ThunkApiConfig>\r\n>\r\n\r\ntype GetRejectValue<ThunkApiConfig> = ThunkApiConfig extends {\r\n rejectValue: infer RejectValue\r\n}\r\n ? RejectValue\r\n : unknown\r\n\r\ntype GetPendingMeta<ThunkApiConfig> = ThunkApiConfig extends {\r\n pendingMeta: infer PendingMeta\r\n}\r\n ? PendingMeta\r\n : unknown\r\n\r\ntype GetFulfilledMeta<ThunkApiConfig> = ThunkApiConfig extends {\r\n fulfilledMeta: infer FulfilledMeta\r\n}\r\n ? FulfilledMeta\r\n : unknown\r\n\r\ntype GetRejectedMeta<ThunkApiConfig> = ThunkApiConfig extends {\r\n rejectedMeta: infer RejectedMeta\r\n}\r\n ? RejectedMeta\r\n : unknown\r\n\r\ntype GetSerializedErrorType<ThunkApiConfig> = ThunkApiConfig extends {\r\n serializedErrorType: infer GetSerializedErrorType\r\n}\r\n ? GetSerializedErrorType\r\n : SerializedError\r\n\r\ntype MaybePromise<T> = T | Promise<T> | (T extends any ? Promise<T> : never)\r\n\r\n/**\r\n * A type describing the return value of the `payloadCreator` argument to `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkPayloadCreatorReturnValue<\r\n Returned,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = MaybePromise<\r\n | IsUnknown<\r\n GetFulfilledMeta<ThunkApiConfig>,\r\n Returned,\r\n FulfillWithMeta<Returned, GetFulfilledMeta<ThunkApiConfig>>\r\n >\r\n | RejectWithValue<\r\n GetRejectValue<ThunkApiConfig>,\r\n GetRejectedMeta<ThunkApiConfig>\r\n >\r\n>\r\n/**\r\n * A type describing the `payloadCreator` argument to `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkPayloadCreator<\r\n Returned,\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n> = (\r\n arg: ThunkArg,\r\n thunkAPI: GetThunkAPI<ThunkApiConfig>\r\n) => AsyncThunkPayloadCreatorReturnValue<Returned, ThunkApiConfig>\r\n\r\n/**\r\n * A ThunkAction created by `createAsyncThunk`.\r\n * Dispatching it returns a Promise for either a\r\n * fulfilled or rejected action.\r\n * Also, the returned value contains an `abort()` method\r\n * that allows the asyncAction to be cancelled from the outside.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkAction<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = (\r\n dispatch: GetDispatch<ThunkApiConfig>,\r\n getState: () => GetState<ThunkApiConfig>,\r\n extra: GetExtra<ThunkApiConfig>\r\n) => Promise<\r\n | ReturnType<AsyncThunkFulfilledActionCreator<Returned, ThunkArg>>\r\n | ReturnType<AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>>\r\n> & {\r\n abort: (reason?: string) => void\r\n requestId: string\r\n arg: ThunkArg\r\n unwrap: () => Promise<Returned>\r\n}\r\n\r\ntype AsyncThunkActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = IsAny<\r\n ThunkArg,\r\n // any handling\r\n (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>,\r\n // unknown handling\r\n unknown extends ThunkArg\r\n ? (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument not specified or specified as void or undefined\r\n : [ThunkArg] extends [void] | [undefined]\r\n ? () => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument contains void\r\n : [void] extends [ThunkArg] // make optional\r\n ? (arg?: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument contains undefined\r\n : [undefined] extends [ThunkArg]\r\n ? WithStrictNullChecks<\r\n // with strict nullChecks: make optional\r\n (\r\n arg?: ThunkArg\r\n ) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>,\r\n // without strict null checks this will match everything, so don't make it optional\r\n (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>\r\n > // default case: normal argument\r\n : (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>\r\n>\r\n\r\n/**\r\n * Options object for `createAsyncThunk`.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkOptions<\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n> = {\r\n /**\r\n * A method to control whether the asyncThunk should be executed. Has access to the\r\n * `arg`, `api.getState()` and `api.extra` arguments.\r\n *\r\n * @returns `false` if it should be skipped\r\n */\r\n condition?(\r\n arg: ThunkArg,\r\n api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>\r\n ): boolean | undefined\r\n /**\r\n * If `condition` returns `false`, the asyncThunk will be skipped.\r\n * This option allows you to control whether a `rejected` action with `meta.condition == false`\r\n * will be dispatched or not.\r\n *\r\n * @default `false`\r\n */\r\n dispatchConditionRejection?: boolean\r\n\r\n serializeError?: (x: unknown) => GetSerializedErrorType<ThunkApiConfig>\r\n\r\n /**\r\n * A function to use when generating the `requestId` for the request sequence.\r\n *\r\n * @default `nanoid`\r\n */\r\n idGenerator?: () => string\r\n} & IsUnknown<\r\n GetPendingMeta<ThunkApiConfig>,\r\n {\r\n /**\r\n * A method to generate additional properties to be added to `meta` of the pending action.\r\n *\r\n * Using this optional overload will not modify the types correctly, this overload is only in place to support JavaScript users.\r\n * Please use the `ThunkApiConfig` parameter `pendingMeta` to get access to a correctly typed overload\r\n */\r\n getPendingMeta?(\r\n base: {\r\n arg: ThunkArg\r\n requestId: string\r\n },\r\n api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>\r\n ): GetPendingMeta<ThunkApiConfig>\r\n },\r\n {\r\n /**\r\n * A method to generate additional properties to be added to `meta` of the pending action.\r\n */\r\n getPendingMeta(\r\n base: {\r\n arg: ThunkArg\r\n requestId: string\r\n },\r\n api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>\r\n ): GetPendingMeta<ThunkApiConfig>\r\n }\r\n>\r\n\r\nexport type AsyncThunkPendingActionCreator<\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [string, ThunkArg, GetPendingMeta<ThunkApiConfig>?],\r\n undefined,\r\n string,\r\n never,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'pending'\r\n } & GetPendingMeta<ThunkApiConfig>\r\n>\r\n\r\nexport type AsyncThunkRejectedActionCreator<\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [\r\n Error | null,\r\n string,\r\n ThunkArg,\r\n GetRejectValue<ThunkApiConfig>?,\r\n GetRejectedMeta<ThunkApiConfig>?\r\n ],\r\n GetRejectValue<ThunkApiConfig> | undefined,\r\n string,\r\n GetSerializedErrorType<ThunkApiConfig>,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'rejected'\r\n aborted: boolean\r\n condition: boolean\r\n } & (\r\n | ({ rejectedWithValue: false } & {\r\n [K in keyof GetRejectedMeta<ThunkApiConfig>]?: undefined\r\n })\r\n | ({ rejectedWithValue: true } & GetRejectedMeta<ThunkApiConfig>)\r\n )\r\n>\r\n\r\nexport type AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [Returned, string, ThunkArg, GetFulfilledMeta<ThunkApiConfig>?],\r\n Returned,\r\n string,\r\n never,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'fulfilled'\r\n } & GetFulfilledMeta<ThunkApiConfig>\r\n>\r\n\r\n/**\r\n * A type describing the return value of `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunk<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = AsyncThunkActionCreator<Returned, ThunkArg, ThunkApiConfig> & {\r\n pending: AsyncThunkPendingActionCreator<ThunkArg, ThunkApiConfig>\r\n rejected: AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>\r\n fulfilled: AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n >\r\n typePrefix: string\r\n}\r\n\r\n/**\r\n *\r\n * @param typePrefix\r\n * @param payloadCreator\r\n * @param options\r\n *\r\n * @public\r\n */\r\nexport function createAsyncThunk<\r\n Returned,\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n>(\r\n typePrefix: string,\r\n payloadCreator: AsyncThunkPayloadCreator<Returned, ThunkArg, ThunkApiConfig>,\r\n options?: AsyncThunkOptions<ThunkArg, ThunkApiConfig>\r\n): AsyncThunk<Returned, ThunkArg, ThunkApiConfig> {\r\n type RejectedValue = GetRejectValue<ThunkApiConfig>\r\n type PendingMeta = GetPendingMeta<ThunkApiConfig>\r\n type FulfilledMeta = GetFulfilledMeta<ThunkApiConfig>\r\n type RejectedMeta = GetRejectedMeta<ThunkApiConfig>\r\n\r\n const fulfilled: AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n > = createAction(\r\n typePrefix + '/fulfilled',\r\n (\r\n payload: Returned,\r\n requestId: string,\r\n arg: ThunkArg,\r\n meta?: FulfilledMeta\r\n ) => ({\r\n payload,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n requestStatus: 'fulfilled' as const,\r\n },\r\n })\r\n )\r\n\r\n const pending: AsyncThunkPendingActionCreator<ThunkArg, ThunkApiConfig> =\r\n createAction(\r\n typePrefix + '/pending',\r\n (requestId: string, arg: ThunkArg, meta?: PendingMeta) => ({\r\n payload: undefined,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n requestStatus: 'pending' as const,\r\n },\r\n })\r\n )\r\n\r\n const rejected: AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig> =\r\n createAction(\r\n typePrefix + '/rejected',\r\n (\r\n error: Error | null,\r\n requestId: string,\r\n arg: ThunkArg,\r\n payload?: RejectedValue,\r\n meta?: RejectedMeta\r\n ) => ({\r\n payload,\r\n error: ((options && options.serializeError) || miniSerializeError)(\r\n error || 'Rejected'\r\n ) as GetSerializedErrorType<ThunkApiConfig>,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n rejectedWithValue: !!payload,\r\n requestStatus: 'rejected' as const,\r\n aborted: error?.name === 'AbortError',\r\n condition: error?.name === 'ConditionError',\r\n },\r\n })\r\n )\r\n\r\n let displayedWarning = false\r\n\r\n const AC =\r\n typeof AbortController !== 'undefined'\r\n ? AbortController\r\n : class implements AbortController {\r\n signal: AbortSignal = {\r\n aborted: false,\r\n addEventListener() {},\r\n dispatchEvent() {\r\n return false\r\n },\r\n onabort() {},\r\n removeEventListener() {},\r\n }\r\n abort() {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (!displayedWarning) {\r\n displayedWarning = true\r\n console.info(\r\n `This platform does not implement AbortController. \r\nIf you want to use the AbortController to react to \\`abort\\` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.`\r\n )\r\n }\r\n }\r\n }\r\n }\r\n\r\n function actionCreator(\r\n arg: ThunkArg\r\n ): AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> {\r\n return (dispatch, getState, extra) => {\r\n const requestId = (options?.idGenerator ?? nanoid)()\r\n\r\n const abortController = new AC()\r\n let abortReason: string | undefined\r\n\r\n const abortedPromise = new Promise<never>((_, reject) =>\r\n abortController.signal.addEventListener('abort', () =>\r\n reject({ name: 'AbortError', message: abortReason || 'Aborted' })\r\n )\r\n )\r\n\r\n let started = false\r\n function abort(reason?: string) {\r\n if (started) {\r\n abortReason = reason\r\n abortController.abort()\r\n }\r\n }\r\n\r\n const promise = (async function () {\r\n let finalAction: ReturnType<typeof fulfilled | typeof rejected>\r\n try {\r\n if (\r\n options &&\r\n options.condition &&\r\n options.condition(arg, { getState, extra }) === false\r\n ) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw {\r\n name: 'ConditionError',\r\n message: 'Aborted due to condition callback returning false.',\r\n }\r\n }\r\n started = true\r\n dispatch(\r\n pending(\r\n requestId,\r\n arg,\r\n options?.getPendingMeta?.({ requestId, arg }, { getState, extra })\r\n )\r\n )\r\n finalAction = await Promise.race([\r\n abortedPromise,\r\n Promise.resolve(\r\n payloadCreator(arg, {\r\n dispatch,\r\n getState,\r\n extra,\r\n requestId,\r\n signal: abortController.signal,\r\n rejectWithValue: ((\r\n value: RejectedValue,\r\n meta?: RejectedMeta\r\n ) => {\r\n return new RejectWithValue(value, meta)\r\n }) as any,\r\n fulfillWithValue: ((value: unknown, meta?: FulfilledMeta) => {\r\n return new FulfillWithMeta(value, meta)\r\n }) as any,\r\n })\r\n ).then((result) => {\r\n if (result instanceof RejectWithValue) {\r\n throw result\r\n }\r\n if (result instanceof FulfillWithMeta) {\r\n return fulfilled(result.payload, requestId, arg, result.meta)\r\n }\r\n return fulfilled(result as any, requestId, arg)\r\n }),\r\n ])\r\n } catch (err) {\r\n finalAction =\r\n err instanceof RejectWithValue\r\n ? rejected(null, requestId, arg, err.payload, err.meta)\r\n : rejected(err as any, requestId, arg)\r\n }\r\n // We dispatch the result action _after_ the catch, to avoid having any errors\r\n // here get swallowed by the try/catch block,\r\n // per https://twitter.com/dan_abramov/status/770914221638942720\r\n // and https://github.com/reduxjs/redux-toolkit/blob/e85eb17b39a2118d859f7b7746e0f3fee523e089/docs/tutorials/advanced-tutorial.md#async-error-handling-logic-in-thunks\r\n\r\n const skipDispatch =\r\n options &&\r\n !options.dispatchConditionRejection &&\r\n rejected.match(finalAction) &&\r\n (finalAction as any).meta.condition\r\n\r\n if (!skipDispatch) {\r\n dispatch(finalAction)\r\n }\r\n return finalAction\r\n })()\r\n return Object.assign(promise as Promise<any>, {\r\n abort,\r\n requestId,\r\n arg,\r\n unwrap() {\r\n return promise.then<any>(unwrapResult)\r\n },\r\n })\r\n }\r\n }\r\n\r\n return Object.assign(\r\n actionCreator as AsyncThunkActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n >,\r\n {\r\n pending,\r\n rejected,\r\n fulfilled,\r\n typePrefix,\r\n }\r\n )\r\n}\r\n\r\ninterface UnwrappableAction {\r\n payload: any\r\n meta?: any\r\n error?: any\r\n}\r\n\r\ntype UnwrappedActionPayload<T extends UnwrappableAction> = Exclude<\r\n T,\r\n { error: any }\r\n>['payload']\r\n\r\n/**\r\n * @public\r\n */\r\nexport function unwrapResult<R extends UnwrappableAction>(\r\n action: R\r\n): UnwrappedActionPayload<R> {\r\n if (action.meta && action.meta.rejectedWithValue) {\r\n throw action.payload\r\n }\r\n if (action.error) {\r\n throw action.error\r\n }\r\n return action.payload\r\n}\r\n\r\ntype WithStrictNullChecks<True, False> = undefined extends boolean\r\n ? False\r\n : True\r\n","import type { Middleware } from 'redux'\r\n\r\n/**\r\n * return True if T is `any`, otherwise return False\r\n * taken from https://github.com/joonhocho/tsdef\r\n *\r\n * @internal\r\n */\r\nexport type IsAny<T, True, False = never> =\r\n // test if we are going the left AND right path in the condition\r\n true | false extends (T extends never ? true : false) ? True : False\r\n\r\n/**\r\n * return True if T is `unknown`, otherwise return False\r\n * taken from https://github.com/joonhocho/tsdef\r\n *\r\n * @internal\r\n */\r\nexport type IsUnknown<T, True, False = never> = unknown extends T\r\n ? IsAny<T, False, True>\r\n : False\r\n\r\nexport type FallbackIfUnknown<T, Fallback> = IsUnknown<T, Fallback, T>\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IfMaybeUndefined<P, True, False> = [undefined] extends [P]\r\n ? True\r\n : False\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IfVoid<P, True, False> = [void] extends [P] ? True : False\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IsEmptyObj<T, True, False = never> = T extends any\r\n ? keyof T extends never\r\n ? IsUnknown<T, False, IfMaybeUndefined<T, False, IfVoid<T, False, True>>>\r\n : False\r\n : never\r\n\r\n/**\r\n * returns True if TS version is above 3.5, False if below.\r\n * uses feature detection to detect TS version >= 3.5\r\n * * versions below 3.5 will return `{}` for unresolvable interference\r\n * * versions above will return `unknown`\r\n *\r\n * @internal\r\n */\r\nexport type AtLeastTS35<True, False> = [True, False][IsUnknown<\r\n ReturnType<<T>() => T>,\r\n 0,\r\n 1\r\n>]\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IsUnknownOrNonInferrable<T, True, False> = AtLeastTS35<\r\n IsUnknown<T, True, False>,\r\n IsEmptyObj<T, True, IsUnknown<T, True, False>>\r\n>\r\n\r\n/**\r\n * Combines all dispatch signatures of all middlewares in the array `M` into\r\n * one intersected dispatch signature.\r\n */\r\nexport type DispatchForMiddlewares<M> = M extends ReadonlyArray<any>\r\n ? UnionToIntersection<\r\n M[number] extends infer MiddlewareValues\r\n ? MiddlewareValues extends Middleware<infer DispatchExt, any, any>\r\n ? DispatchExt extends Function\r\n ? IsAny<DispatchExt, never, DispatchExt>\r\n : never\r\n : never\r\n : never\r\n >\r\n : never\r\n\r\n/**\r\n * Convert a Union type `(A|B)` to an intersection type `(A&B)`\r\n */\r\nexport type UnionToIntersection<U> = (\r\n U extends any ? (k: U) => void : never\r\n) extends (k: infer I) => void\r\n ? I\r\n : never\r\n\r\n/**\r\n * Helper type. Passes T out again, but boxes it in a way that it cannot\r\n * \"widen\" the type by accident if it is a generic that should be inferred\r\n * from elsewhere.\r\n *\r\n * @internal\r\n */\r\nexport type NoInfer<T> = [T][T extends any ? 0 : never]\r\n\r\nexport type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>\r\n\r\nexport interface HasMatchFunction<T> {\r\n match: (v: any) => v is T\r\n}\r\n\r\nexport const hasMatchFunction = <T>(\r\n v: Matcher<T>\r\n): v is HasMatchFunction<T> => {\r\n return v && typeof (v as HasMatchFunction<T>).match === 'function'\r\n}\r\n\r\n/** @public */\r\nexport type Matcher<T> = HasMatchFunction<T> | ((v: any) => v is T)\r\n\r\n/** @public */\r\nexport type ActionFromMatcher<M extends Matcher<any>> = M extends Matcher<\r\n infer T\r\n>\r\n ? T\r\n : never\r\n","import type {\r\n ActionFromMatcher,\r\n Matcher,\r\n UnionToIntersection,\r\n} from './tsHelpers'\r\nimport { hasMatchFunction } from './tsHelpers'\r\nimport type {\r\n AsyncThunk,\r\n AsyncThunkFulfilledActionCreator,\r\n AsyncThunkPendingActionCreator,\r\n AsyncThunkRejectedActionCreator,\r\n} from './createAsyncThunk'\r\n\r\n/** @public */\r\nexport type ActionMatchingAnyOf<\r\n Matchers extends [Matcher<any>, ...Matcher<any>[]]\r\n> = ActionFromMatcher<Matchers[number]>\r\n\r\n/** @public */\r\nexport type ActionMatchingAllOf<\r\n Matchers extends [Matcher<any>, ...Matcher<any>[]]\r\n> = UnionToIntersection<ActionMatchingAnyOf<Matchers>>\r\n\r\nconst matches = (matcher: Matcher<any>, action: any) => {\r\n if (hasMatchFunction(matcher)) {\r\n return matcher.match(action)\r\n } else {\r\n return matcher(action)\r\n }\r\n}\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action matches any one of the supplied type guards or action\r\n * creators.\r\n *\r\n * @param matchers The type guards or action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAnyOf<Matchers extends [Matcher<any>, ...Matcher<any>[]]>(\r\n ...matchers: Matchers\r\n) {\r\n return (action: any): action is ActionMatchingAnyOf<Matchers> => {\r\n return matchers.some((matcher) => matches(matcher, action))\r\n }\r\n}\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action matches all of the supplied type guards or action\r\n * creators.\r\n *\r\n * @param matchers The type guards or action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAllOf<Matchers extends [Matcher<any>, ...Matcher<any>[]]>(\r\n ...matchers: Matchers\r\n) {\r\n return (action: any): action is ActionMatchingAllOf<Matchers> => {\r\n return matchers.every((matcher) => matches(matcher, action))\r\n }\r\n}\r\n\r\n/**\r\n * @param action A redux action\r\n * @param validStatus An array of valid meta.requestStatus values\r\n *\r\n * @internal\r\n */\r\nexport function hasExpectedRequestMetadata(\r\n action: any,\r\n validStatus: readonly string[]\r\n) {\r\n if (!action || !action.meta) return false\r\n\r\n const hasValidRequestId = typeof action.meta.requestId === 'string'\r\n const hasValidRequestStatus =\r\n validStatus.indexOf(action.meta.requestStatus) > -1\r\n\r\n return hasValidRequestId && hasValidRequestStatus\r\n}\r\n\r\nfunction isAsyncThunkArray(a: [any] | AnyAsyncThunk[]): a is AnyAsyncThunk[] {\r\n return (\r\n typeof a[0] === 'function' &&\r\n 'pending' in a[0] &&\r\n 'fulfilled' in a[0] &&\r\n 'rejected' in a[0]\r\n )\r\n}\r\n\r\nexport type UnknownAsyncThunkPendingAction = ReturnType<\r\n AsyncThunkPendingActionCreator<unknown>\r\n>\r\n\r\nexport type PendingActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['pending']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is pending.\r\n *\r\n * @public\r\n */\r\nexport function isPending(): (\r\n action: any\r\n) => action is UnknownAsyncThunkPendingAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is pending.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isPending<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is PendingActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a pending thunk action\r\n * @public\r\n */\r\nexport function isPending(action: any): action is UnknownAsyncThunkPendingAction\r\nexport function isPending<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['pending'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isPending()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is PendingActionFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.pending\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkRejectedAction = ReturnType<\r\n AsyncThunkRejectedActionCreator<unknown, unknown>\r\n>\r\n\r\nexport type RejectedActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['rejected']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is rejected.\r\n *\r\n * @public\r\n */\r\nexport function isRejected(): (\r\n action: any\r\n) => action is UnknownAsyncThunkRejectedAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is rejected.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isRejected<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is RejectedActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a rejected thunk action\r\n * @public\r\n */\r\nexport function isRejected(\r\n action: any\r\n): action is UnknownAsyncThunkRejectedAction\r\nexport function isRejected<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['rejected'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejected()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is RejectedActionFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.rejected\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkRejectedWithValueAction = ReturnType<\r\n AsyncThunkRejectedActionCreator<unknown, unknown>\r\n>\r\n\r\nexport type RejectedWithValueActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['rejected']> &\r\n (T extends AsyncThunk<any, any, { rejectValue: infer RejectedValue }>\r\n ? { payload: RejectedValue }\r\n : unknown)\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is rejected with value.\r\n *\r\n * @public\r\n */\r\nexport function isRejectedWithValue(): (\r\n action: any\r\n) => action is UnknownAsyncThunkRejectedAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is rejected with value.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isRejectedWithValue<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (\r\n action: any\r\n) => action is RejectedWithValueActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a rejected thunk action with value\r\n * @public\r\n */\r\nexport function isRejectedWithValue(\r\n action: any\r\n): action is UnknownAsyncThunkRejectedAction\r\nexport function isRejectedWithValue<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n const hasFlag = (action: any): action is any => {\r\n return action && action.meta && action.meta.rejectedWithValue\r\n }\r\n\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => {\r\n const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag)\r\n\r\n return combinedMatcher(action)\r\n }\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejectedWithValue()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is RejectedActionFromAsyncThunk<AsyncThunks[number]> => {\r\n const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkFulfilledAction = ReturnType<\r\n AsyncThunkFulfilledActionCreator<unknown, unknown>\r\n>\r\n\r\nexport type FulfilledActionFromAsyncThunk<T extends AnyAsyncThunk> =\r\n ActionFromMatcher<T['fulfilled']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is fulfilled.\r\n *\r\n * @public\r\n */\r\nexport function isFulfilled(): (\r\n action: any\r\n) => action is UnknownAsyncThunkFulfilledAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is fulfilled.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isFulfilled<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is FulfilledActionFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a fulfilled thunk action\r\n * @public\r\n */\r\nexport function isFulfilled(\r\n action: any\r\n): action is UnknownAsyncThunkFulfilledAction\r\nexport function isFulfilled<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['fulfilled'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isFulfilled()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is FulfilledActionFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.fulfilled\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkAction =\r\n | UnknownAsyncThunkPendingAction\r\n | UnknownAsyncThunkRejectedAction\r\n | UnknownAsyncThunkFulfilledAction\r\n\r\nexport type AnyAsyncThunk = {\r\n pending: { match: (action: any) => action is any }\r\n fulfilled: { match: (action: any) => action is any }\r\n rejected: { match: (action: any) => action is any }\r\n}\r\n\r\nexport type ActionsFromAsyncThunk<T extends AnyAsyncThunk> =\r\n | ActionFromMatcher<T['pending']>\r\n | ActionFromMatcher<T['fulfilled']>\r\n | ActionFromMatcher<T['rejected']>\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator.\r\n *\r\n * @public\r\n */\r\nexport function isAsyncThunkAction(): (\r\n action: any\r\n) => action is UnknownAsyncThunkAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAsyncThunkAction<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is ActionsFromAsyncThunk<AsyncThunks[number]>\r\n/**\r\n * Tests if `action` is a thunk action\r\n * @public\r\n */\r\nexport function isAsyncThunkAction(\r\n action: any\r\n): action is UnknownAsyncThunkAction\r\nexport function isAsyncThunkAction<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) =>\r\n hasExpectedRequestMetadata(action, ['pending', 'fulfilled', 'rejected'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isAsyncThunkAction()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is ActionsFromAsyncThunk<AsyncThunks[number]> => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher<any>, ...Matcher<any>[]] = [] as any\r\n\r\n for (const asyncThunk of asyncThunks) {\r\n matchers.push(\r\n asyncThunk.pending,\r\n asyncThunk.rejected,\r\n asyncThunk.fulfilled\r\n )\r\n }\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n"]}
|
||
diff --git a/dist/redux-toolkit.umd.js b/dist/redux-toolkit.umd.js
|
||
deleted file mode 100644
|
||
index 61126823eee60e7cd6bc69c25412caf8d4373b13..0000000000000000000000000000000000000000
|
||
--- a/dist/redux-toolkit.umd.js
|
||
+++ /dev/null
|
||
@@ -1,2315 +0,0 @@
|
||
-(function (global, factory) {
|
||
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.RTK = {}));
|
||
-}(this, (function (exports) { 'use strict';
|
||
-
|
||
- var __extends = (undefined && undefined.__extends) || (function () {
|
||
- var extendStatics = function (d, b) {
|
||
- extendStatics = Object.setPrototypeOf ||
|
||
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||
- return extendStatics(d, b);
|
||
- };
|
||
- return function (d, b) {
|
||
- if (typeof b !== "function" && b !== null)
|
||
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||
- extendStatics(d, b);
|
||
- function __() { this.constructor = d; }
|
||
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
- };
|
||
- })();
|
||
- var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
|
||
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||
- function verb(n) { return function (v) { return step([n, v]); }; }
|
||
- function step(op) {
|
||
- if (f) throw new TypeError("Generator is already executing.");
|
||
- while (_) try {
|
||
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||
- if (y = 0, t) op = [op[0] & 2, t.value];
|
||
- switch (op[0]) {
|
||
- case 0: case 1: t = op; break;
|
||
- case 4: _.label++; return { value: op[1], done: false };
|
||
- case 5: _.label++; y = op[1]; op = [0]; continue;
|
||
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||
- default:
|
||
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||
- if (t[2]) _.ops.pop();
|
||
- _.trys.pop(); continue;
|
||
- }
|
||
- op = body.call(thisArg, _);
|
||
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||
- }
|
||
- };
|
||
- var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) {
|
||
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
||
- to[j] = from[i];
|
||
- return to;
|
||
- };
|
||
- var __defProp = Object.defineProperty;
|
||
- var __defProps = Object.defineProperties;
|
||
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
||
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
||
- var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
||
- var __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; };
|
||
- var __spreadValues = function (a2, b2) {
|
||
- for (var prop in b2 || (b2 = {}))
|
||
- if (__hasOwnProp.call(b2, prop))
|
||
- __defNormalProp(a2, prop, b2[prop]);
|
||
- if (__getOwnPropSymbols)
|
||
- for (var _b = 0, _c = __getOwnPropSymbols(b2); _b < _c.length; _b++) {
|
||
- var prop = _c[_b];
|
||
- if (__propIsEnum.call(b2, prop))
|
||
- __defNormalProp(a2, prop, b2[prop]);
|
||
- }
|
||
- return a2;
|
||
- };
|
||
- var __spreadProps = function (a2, b2) { return __defProps(a2, __getOwnPropDescs(b2)); };
|
||
- var __async = function (__this, __arguments, generator) {
|
||
- return new Promise(function (resolve, reject) {
|
||
- var fulfilled = function (value) {
|
||
- try {
|
||
- step(generator.next(value));
|
||
- }
|
||
- catch (e2) {
|
||
- reject(e2);
|
||
- }
|
||
- };
|
||
- var rejected = function (value) {
|
||
- try {
|
||
- step(generator.throw(value));
|
||
- }
|
||
- catch (e2) {
|
||
- reject(e2);
|
||
- }
|
||
- };
|
||
- var step = function (x2) { return x2.done ? resolve(x2.value) : Promise.resolve(x2.value).then(fulfilled, rejected); };
|
||
- step((generator = generator.apply(__this, __arguments)).next());
|
||
- });
|
||
- };
|
||
- // ../../node_modules/immer/dist/immer.esm.js
|
||
- function n(n2) {
|
||
- for (var t2 = arguments.length, r2 = Array(t2 > 1 ? t2 - 1 : 0), e2 = 1; e2 < t2; e2++)
|
||
- r2[e2 - 1] = arguments[e2];
|
||
- {
|
||
- var i2 = Y[n2], o2 = i2 ? typeof i2 == "function" ? i2.apply(null, r2) : i2 : "unknown error nr: " + n2;
|
||
- throw Error("[Immer] " + o2);
|
||
- }
|
||
- }
|
||
- function t(n2) {
|
||
- return !!n2 && !!n2[Q];
|
||
- }
|
||
- function r(n2) {
|
||
- return !!n2 && (function (n3) {
|
||
- if (!n3 || typeof n3 != "object")
|
||
- return false;
|
||
- var t2 = Object.getPrototypeOf(n3);
|
||
- if (t2 === null)
|
||
- return true;
|
||
- var r2 = Object.hasOwnProperty.call(t2, "constructor") && t2.constructor;
|
||
- return r2 === Object || typeof r2 == "function" && Function.toString.call(r2) === Z;
|
||
- }(n2) || Array.isArray(n2) || !!n2[L] || !!n2.constructor[L] || s(n2) || v(n2));
|
||
- }
|
||
- function e(r2) {
|
||
- return t(r2) || n(23, r2), r2[Q].t;
|
||
- }
|
||
- function i(n2, t2, r2) {
|
||
- r2 === void 0 && (r2 = false), o(n2) === 0 ? (r2 ? Object.keys : nn)(n2).forEach(function (e2) {
|
||
- r2 && typeof e2 == "symbol" || t2(e2, n2[e2], n2);
|
||
- }) : n2.forEach(function (r3, e2) {
|
||
- return t2(e2, r3, n2);
|
||
- });
|
||
- }
|
||
- function o(n2) {
|
||
- var t2 = n2[Q];
|
||
- return t2 ? t2.i > 3 ? t2.i - 4 : t2.i : Array.isArray(n2) ? 1 : s(n2) ? 2 : v(n2) ? 3 : 0;
|
||
- }
|
||
- function u(n2, t2) {
|
||
- return o(n2) === 2 ? n2.has(t2) : Object.prototype.hasOwnProperty.call(n2, t2);
|
||
- }
|
||
- function a(n2, t2) {
|
||
- return o(n2) === 2 ? n2.get(t2) : n2[t2];
|
||
- }
|
||
- function f(n2, t2, r2) {
|
||
- var e2 = o(n2);
|
||
- e2 === 2 ? n2.set(t2, r2) : e2 === 3 ? (n2.delete(t2), n2.add(r2)) : n2[t2] = r2;
|
||
- }
|
||
- function c(n2, t2) {
|
||
- return n2 === t2 ? n2 !== 0 || 1 / n2 == 1 / t2 : n2 != n2 && t2 != t2;
|
||
- }
|
||
- function s(n2) {
|
||
- return X && n2 instanceof Map;
|
||
- }
|
||
- function v(n2) {
|
||
- return q && n2 instanceof Set;
|
||
- }
|
||
- function p(n2) {
|
||
- return n2.o || n2.t;
|
||
- }
|
||
- function l(n2) {
|
||
- if (Array.isArray(n2))
|
||
- return Array.prototype.slice.call(n2);
|
||
- var t2 = tn(n2);
|
||
- delete t2[Q];
|
||
- for (var r2 = nn(t2), e2 = 0; e2 < r2.length; e2++) {
|
||
- var i2 = r2[e2], o2 = t2[i2];
|
||
- o2.writable === false && (o2.writable = true, o2.configurable = true), (o2.get || o2.set) && (t2[i2] = { configurable: true, writable: true, enumerable: o2.enumerable, value: n2[i2] });
|
||
- }
|
||
- return Object.create(Object.getPrototypeOf(n2), t2);
|
||
- }
|
||
- function d(n2, e2) {
|
||
- return e2 === void 0 && (e2 = false), y(n2) || t(n2) || !r(n2) ? n2 : (o(n2) > 1 && (n2.set = n2.add = n2.clear = n2.delete = h), Object.freeze(n2), e2 && i(n2, function (n3, t2) {
|
||
- return d(t2, true);
|
||
- }, true), n2);
|
||
- }
|
||
- function h() {
|
||
- n(2);
|
||
- }
|
||
- function y(n2) {
|
||
- return n2 == null || typeof n2 != "object" || Object.isFrozen(n2);
|
||
- }
|
||
- function b(t2) {
|
||
- var r2 = rn[t2];
|
||
- return r2 || n(18, t2), r2;
|
||
- }
|
||
- function m(n2, t2) {
|
||
- rn[n2] || (rn[n2] = t2);
|
||
- }
|
||
- function _() {
|
||
- return U || n(0), U;
|
||
- }
|
||
- function j(n2, t2) {
|
||
- t2 && (b("Patches"), n2.u = [], n2.s = [], n2.v = t2);
|
||
- }
|
||
- function O(n2) {
|
||
- g(n2), n2.p.forEach(S), n2.p = null;
|
||
- }
|
||
- function g(n2) {
|
||
- n2 === U && (U = n2.l);
|
||
- }
|
||
- function w(n2) {
|
||
- return U = { p: [], l: U, h: n2, m: true, _: 0 };
|
||
- }
|
||
- function S(n2) {
|
||
- var t2 = n2[Q];
|
||
- t2.i === 0 || t2.i === 1 ? t2.j() : t2.O = true;
|
||
- }
|
||
- function P(t2, e2) {
|
||
- e2._ = e2.p.length;
|
||
- var i2 = e2.p[0], o2 = t2 !== void 0 && t2 !== i2;
|
||
- return e2.h.g || b("ES5").S(e2, t2, o2), o2 ? (i2[Q].P && (O(e2), n(4)), r(t2) && (t2 = M(e2, t2), e2.l || x(e2, t2)), e2.u && b("Patches").M(i2[Q], t2, e2.u, e2.s)) : t2 = M(e2, i2, []), O(e2), e2.u && e2.v(e2.u, e2.s), t2 !== H ? t2 : void 0;
|
||
- }
|
||
- function M(n2, t2, r2) {
|
||
- if (y(t2))
|
||
- return t2;
|
||
- var e2 = t2[Q];
|
||
- if (!e2)
|
||
- return i(t2, function (i2, o3) {
|
||
- return A(n2, e2, t2, i2, o3, r2);
|
||
- }, true), t2;
|
||
- if (e2.A !== n2)
|
||
- return t2;
|
||
- if (!e2.P)
|
||
- return x(n2, e2.t, true), e2.t;
|
||
- if (!e2.I) {
|
||
- e2.I = true, e2.A._--;
|
||
- var o2 = e2.i === 4 || e2.i === 5 ? e2.o = l(e2.k) : e2.o;
|
||
- i(e2.i === 3 ? new Set(o2) : o2, function (t3, i2) {
|
||
- return A(n2, e2, o2, t3, i2, r2);
|
||
- }), x(n2, o2, false), r2 && n2.u && b("Patches").R(e2, r2, n2.u, n2.s);
|
||
- }
|
||
- return e2.o;
|
||
- }
|
||
- function A(e2, i2, o2, a2, c2, s2) {
|
||
- if (c2 === o2 && n(5), t(c2)) {
|
||
- var v2 = M(e2, c2, s2 && i2 && i2.i !== 3 && !u(i2.D, a2) ? s2.concat(a2) : void 0);
|
||
- if (f(o2, a2, v2), !t(v2))
|
||
- return;
|
||
- e2.m = false;
|
||
- }
|
||
- if (r(c2) && !y(c2)) {
|
||
- if (!e2.h.F && e2._ < 1)
|
||
- return;
|
||
- M(e2, c2), i2 && i2.A.l || x(e2, c2);
|
||
- }
|
||
- }
|
||
- function x(n2, t2, r2) {
|
||
- r2 === void 0 && (r2 = false), n2.h.F && n2.m && d(t2, r2);
|
||
- }
|
||
- function z(n2, t2) {
|
||
- var r2 = n2[Q];
|
||
- return (r2 ? p(r2) : n2)[t2];
|
||
- }
|
||
- function I(n2, t2) {
|
||
- if (t2 in n2)
|
||
- for (var r2 = Object.getPrototypeOf(n2); r2;) {
|
||
- var e2 = Object.getOwnPropertyDescriptor(r2, t2);
|
||
- if (e2)
|
||
- return e2;
|
||
- r2 = Object.getPrototypeOf(r2);
|
||
- }
|
||
- }
|
||
- function k(n2) {
|
||
- n2.P || (n2.P = true, n2.l && k(n2.l));
|
||
- }
|
||
- function E(n2) {
|
||
- n2.o || (n2.o = l(n2.t));
|
||
- }
|
||
- function R(n2, t2, r2) {
|
||
- var e2 = s(t2) ? b("MapSet").N(t2, r2) : v(t2) ? b("MapSet").T(t2, r2) : n2.g ? function (n3, t3) {
|
||
- var r3 = Array.isArray(n3), e3 = { i: r3 ? 1 : 0, A: t3 ? t3.A : _(), P: false, I: false, D: {}, l: t3, t: n3, k: null, o: null, j: null, C: false }, i2 = e3, o2 = en;
|
||
- r3 && (i2 = [e3], o2 = on);
|
||
- var u2 = Proxy.revocable(i2, o2), a2 = u2.revoke, f2 = u2.proxy;
|
||
- return e3.k = f2, e3.j = a2, f2;
|
||
- }(t2, r2) : b("ES5").J(t2, r2);
|
||
- return (r2 ? r2.A : _()).p.push(e2), e2;
|
||
- }
|
||
- function D(e2) {
|
||
- return t(e2) || n(22, e2), function n2(t2) {
|
||
- if (!r(t2))
|
||
- return t2;
|
||
- var e3, u2 = t2[Q], c2 = o(t2);
|
||
- if (u2) {
|
||
- if (!u2.P && (u2.i < 4 || !b("ES5").K(u2)))
|
||
- return u2.t;
|
||
- u2.I = true, e3 = F(t2, c2), u2.I = false;
|
||
- }
|
||
- else
|
||
- e3 = F(t2, c2);
|
||
- return i(e3, function (t3, r2) {
|
||
- u2 && a(u2.t, t3) === r2 || f(e3, t3, n2(r2));
|
||
- }), c2 === 3 ? new Set(e3) : e3;
|
||
- }(e2);
|
||
- }
|
||
- function F(n2, t2) {
|
||
- switch (t2) {
|
||
- case 2:
|
||
- return new Map(n2);
|
||
- case 3:
|
||
- return Array.from(n2);
|
||
- }
|
||
- return l(n2);
|
||
- }
|
||
- function N() {
|
||
- function r2(n2, t2) {
|
||
- var r3 = s2[n2];
|
||
- return r3 ? r3.enumerable = t2 : s2[n2] = r3 = { configurable: true, enumerable: t2, get: function () {
|
||
- var t3 = this[Q];
|
||
- return f2(t3), en.get(t3, n2);
|
||
- }, set: function (t3) {
|
||
- var r4 = this[Q];
|
||
- f2(r4), en.set(r4, n2, t3);
|
||
- } }, r3;
|
||
- }
|
||
- function e2(n2) {
|
||
- for (var t2 = n2.length - 1; t2 >= 0; t2--) {
|
||
- var r3 = n2[t2][Q];
|
||
- if (!r3.P)
|
||
- switch (r3.i) {
|
||
- case 5:
|
||
- a2(r3) && k(r3);
|
||
- break;
|
||
- case 4:
|
||
- o2(r3) && k(r3);
|
||
- }
|
||
- }
|
||
- }
|
||
- function o2(n2) {
|
||
- for (var t2 = n2.t, r3 = n2.k, e3 = nn(r3), i2 = e3.length - 1; i2 >= 0; i2--) {
|
||
- var o3 = e3[i2];
|
||
- if (o3 !== Q) {
|
||
- var a3 = t2[o3];
|
||
- if (a3 === void 0 && !u(t2, o3))
|
||
- return true;
|
||
- var f3 = r3[o3], s3 = f3 && f3[Q];
|
||
- if (s3 ? s3.t !== a3 : !c(f3, a3))
|
||
- return true;
|
||
- }
|
||
- }
|
||
- var v2 = !!t2[Q];
|
||
- return e3.length !== nn(t2).length + (v2 ? 0 : 1);
|
||
- }
|
||
- function a2(n2) {
|
||
- var t2 = n2.k;
|
||
- if (t2.length !== n2.t.length)
|
||
- return true;
|
||
- var r3 = Object.getOwnPropertyDescriptor(t2, t2.length - 1);
|
||
- return !(!r3 || r3.get);
|
||
- }
|
||
- function f2(t2) {
|
||
- t2.O && n(3, JSON.stringify(p(t2)));
|
||
- }
|
||
- var s2 = {};
|
||
- m("ES5", { J: function (n2, t2) {
|
||
- var e3 = Array.isArray(n2), i2 = function (n3, t3) {
|
||
- if (n3) {
|
||
- for (var e4 = Array(t3.length), i3 = 0; i3 < t3.length; i3++)
|
||
- Object.defineProperty(e4, "" + i3, r2(i3, true));
|
||
- return e4;
|
||
- }
|
||
- var o4 = tn(t3);
|
||
- delete o4[Q];
|
||
- for (var u2 = nn(o4), a3 = 0; a3 < u2.length; a3++) {
|
||
- var f3 = u2[a3];
|
||
- o4[f3] = r2(f3, n3 || !!o4[f3].enumerable);
|
||
- }
|
||
- return Object.create(Object.getPrototypeOf(t3), o4);
|
||
- }(e3, n2), o3 = { i: e3 ? 5 : 4, A: t2 ? t2.A : _(), P: false, I: false, D: {}, l: t2, t: n2, k: i2, o: null, O: false, C: false };
|
||
- return Object.defineProperty(i2, Q, { value: o3, writable: true }), i2;
|
||
- }, S: function (n2, r3, o3) {
|
||
- o3 ? t(r3) && r3[Q].A === n2 && e2(n2.p) : (n2.u && function n3(t2) {
|
||
- if (t2 && typeof t2 == "object") {
|
||
- var r4 = t2[Q];
|
||
- if (r4) {
|
||
- var e3 = r4.t, o4 = r4.k, f3 = r4.D, c2 = r4.i;
|
||
- if (c2 === 4)
|
||
- i(o4, function (t3) {
|
||
- t3 !== Q && (e3[t3] !== void 0 || u(e3, t3) ? f3[t3] || n3(o4[t3]) : (f3[t3] = true, k(r4)));
|
||
- }), i(e3, function (n4) {
|
||
- o4[n4] !== void 0 || u(o4, n4) || (f3[n4] = false, k(r4));
|
||
- });
|
||
- else if (c2 === 5) {
|
||
- if (a2(r4) && (k(r4), f3.length = true), o4.length < e3.length)
|
||
- for (var s3 = o4.length; s3 < e3.length; s3++)
|
||
- f3[s3] = false;
|
||
- else
|
||
- for (var v2 = e3.length; v2 < o4.length; v2++)
|
||
- f3[v2] = true;
|
||
- for (var p2 = Math.min(o4.length, e3.length), l2 = 0; l2 < p2; l2++)
|
||
- f3[l2] === void 0 && n3(o4[l2]);
|
||
- }
|
||
- }
|
||
- }
|
||
- }(n2.p[0]), e2(n2.p));
|
||
- }, K: function (n2) {
|
||
- return n2.i === 4 ? o2(n2) : a2(n2);
|
||
- } });
|
||
- }
|
||
- var G;
|
||
- var U;
|
||
- var W = typeof Symbol != "undefined" && typeof Symbol("x") == "symbol";
|
||
- var X = typeof Map != "undefined";
|
||
- var q = typeof Set != "undefined";
|
||
- var B = typeof Proxy != "undefined" && Proxy.revocable !== void 0 && typeof Reflect != "undefined";
|
||
- var H = W ? Symbol.for("immer-nothing") : ((G = {})["immer-nothing"] = true, G);
|
||
- var L = W ? Symbol.for("immer-draftable") : "__$immer_draftable";
|
||
- var Q = W ? Symbol.for("immer-state") : "__$immer_state";
|
||
- var Y = { 0: "Illegal state", 1: "Immer drafts cannot have computed properties", 2: "This object has been frozen and should not be mutated", 3: function (n2) {
|
||
- return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + n2;
|
||
- }, 4: "An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.", 5: "Immer forbids circular references", 6: "The first or second argument to `produce` must be a function", 7: "The third argument to `produce` must be a function or undefined", 8: "First argument to `createDraft` must be a plain object, an array, or an immerable object", 9: "First argument to `finishDraft` must be a draft returned by `createDraft`", 10: "The given draft is already finalized", 11: "Object.defineProperty() cannot be used on an Immer draft", 12: "Object.setPrototypeOf() cannot be used on an Immer draft", 13: "Immer only supports deleting array indices", 14: "Immer only supports setting array indices and the 'length' property", 15: function (n2) {
|
||
- return "Cannot apply patch, path doesn't resolve: " + n2;
|
||
- }, 16: 'Sets cannot have "replace" patches.', 17: function (n2) {
|
||
- return "Unsupported patch operation: " + n2;
|
||
- }, 18: function (n2) {
|
||
- return "The plugin for '" + n2 + "' has not been loaded into Immer. To enable the plugin, import and call `enable" + n2 + "()` when initializing your application.";
|
||
- }, 20: "Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available", 21: function (n2) {
|
||
- return "produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '" + n2 + "'";
|
||
- }, 22: function (n2) {
|
||
- return "'current' expects a draft, got: " + n2;
|
||
- }, 23: function (n2) {
|
||
- return "'original' expects a draft, got: " + n2;
|
||
- }, 24: "Patching reserved attributes like __proto__, prototype and constructor is not allowed" };
|
||
- var Z = "" + Object.prototype.constructor;
|
||
- var nn = typeof Reflect != "undefined" && Reflect.ownKeys ? Reflect.ownKeys : Object.getOwnPropertySymbols !== void 0 ? function (n2) {
|
||
- return Object.getOwnPropertyNames(n2).concat(Object.getOwnPropertySymbols(n2));
|
||
- } : Object.getOwnPropertyNames;
|
||
- var tn = Object.getOwnPropertyDescriptors || function (n2) {
|
||
- var t2 = {};
|
||
- return nn(n2).forEach(function (r2) {
|
||
- t2[r2] = Object.getOwnPropertyDescriptor(n2, r2);
|
||
- }), t2;
|
||
- };
|
||
- var rn = {};
|
||
- var en = { get: function (n2, t2) {
|
||
- if (t2 === Q)
|
||
- return n2;
|
||
- var e2 = p(n2);
|
||
- if (!u(e2, t2))
|
||
- return function (n3, t3, r2) {
|
||
- var e3, i3 = I(t3, r2);
|
||
- return i3 ? "value" in i3 ? i3.value : (e3 = i3.get) === null || e3 === void 0 ? void 0 : e3.call(n3.k) : void 0;
|
||
- }(n2, e2, t2);
|
||
- var i2 = e2[t2];
|
||
- return n2.I || !r(i2) ? i2 : i2 === z(n2.t, t2) ? (E(n2), n2.o[t2] = R(n2.A.h, i2, n2)) : i2;
|
||
- }, has: function (n2, t2) {
|
||
- return t2 in p(n2);
|
||
- }, ownKeys: function (n2) {
|
||
- return Reflect.ownKeys(p(n2));
|
||
- }, set: function (n2, t2, r2) {
|
||
- var e2 = I(p(n2), t2);
|
||
- if (e2 == null ? void 0 : e2.set)
|
||
- return e2.set.call(n2.k, r2), true;
|
||
- if (!n2.P) {
|
||
- var i2 = z(p(n2), t2), o2 = i2 == null ? void 0 : i2[Q];
|
||
- if (o2 && o2.t === r2)
|
||
- return n2.o[t2] = r2, n2.D[t2] = false, true;
|
||
- if (c(r2, i2) && (r2 !== void 0 || u(n2.t, t2)))
|
||
- return true;
|
||
- E(n2), k(n2);
|
||
- }
|
||
- return n2.o[t2] === r2 && typeof r2 != "number" && (r2 !== void 0 || t2 in n2.o) || (n2.o[t2] = r2, n2.D[t2] = true, true);
|
||
- }, deleteProperty: function (n2, t2) {
|
||
- return z(n2.t, t2) !== void 0 || t2 in n2.t ? (n2.D[t2] = false, E(n2), k(n2)) : delete n2.D[t2], n2.o && delete n2.o[t2], true;
|
||
- }, getOwnPropertyDescriptor: function (n2, t2) {
|
||
- var r2 = p(n2), e2 = Reflect.getOwnPropertyDescriptor(r2, t2);
|
||
- return e2 ? { writable: true, configurable: n2.i !== 1 || t2 !== "length", enumerable: e2.enumerable, value: r2[t2] } : e2;
|
||
- }, defineProperty: function () {
|
||
- n(11);
|
||
- }, getPrototypeOf: function (n2) {
|
||
- return Object.getPrototypeOf(n2.t);
|
||
- }, setPrototypeOf: function () {
|
||
- n(12);
|
||
- } };
|
||
- var on = {};
|
||
- i(en, function (n2, t2) {
|
||
- on[n2] = function () {
|
||
- return arguments[0] = arguments[0][0], t2.apply(this, arguments);
|
||
- };
|
||
- }), on.deleteProperty = function (t2, r2) {
|
||
- return isNaN(parseInt(r2)) && n(13), en.deleteProperty.call(this, t2[0], r2);
|
||
- }, on.set = function (t2, r2, e2) {
|
||
- return r2 !== "length" && isNaN(parseInt(r2)) && n(14), en.set.call(this, t2[0], r2, e2, t2[0]);
|
||
- };
|
||
- var un = function () {
|
||
- function e2(t2) {
|
||
- var e3 = this;
|
||
- this.g = B, this.F = true, this.produce = function (t3, i3, o2) {
|
||
- if (typeof t3 == "function" && typeof i3 != "function") {
|
||
- var u2 = i3;
|
||
- i3 = t3;
|
||
- var a2 = e3;
|
||
- return function (n2) {
|
||
- var t4 = this;
|
||
- n2 === void 0 && (n2 = u2);
|
||
- for (var r2 = arguments.length, e4 = Array(r2 > 1 ? r2 - 1 : 0), o3 = 1; o3 < r2; o3++)
|
||
- e4[o3 - 1] = arguments[o3];
|
||
- return a2.produce(n2, function (n3) {
|
||
- var r3;
|
||
- return (r3 = i3).call.apply(r3, [t4, n3].concat(e4));
|
||
- });
|
||
- };
|
||
- }
|
||
- var f2;
|
||
- if (typeof i3 != "function" && n(6), o2 !== void 0 && typeof o2 != "function" && n(7), r(t3)) {
|
||
- var c2 = w(e3), s2 = R(e3, t3, void 0), v2 = true;
|
||
- try {
|
||
- f2 = i3(s2), v2 = false;
|
||
- }
|
||
- finally {
|
||
- v2 ? O(c2) : g(c2);
|
||
- }
|
||
- return typeof Promise != "undefined" && f2 instanceof Promise ? f2.then(function (n2) {
|
||
- return j(c2, o2), P(n2, c2);
|
||
- }, function (n2) {
|
||
- throw O(c2), n2;
|
||
- }) : (j(c2, o2), P(f2, c2));
|
||
- }
|
||
- if (!t3 || typeof t3 != "object") {
|
||
- if ((f2 = i3(t3)) === H)
|
||
- return;
|
||
- return f2 === void 0 && (f2 = t3), e3.F && d(f2, true), f2;
|
||
- }
|
||
- n(21, t3);
|
||
- }, this.produceWithPatches = function (n2, t3) {
|
||
- return typeof n2 == "function" ? function (t4) {
|
||
- for (var r3 = arguments.length, i4 = Array(r3 > 1 ? r3 - 1 : 0), o2 = 1; o2 < r3; o2++)
|
||
- i4[o2 - 1] = arguments[o2];
|
||
- return e3.produceWithPatches(t4, function (t5) {
|
||
- return n2.apply(void 0, [t5].concat(i4));
|
||
- });
|
||
- } : [e3.produce(n2, t3, function (n3, t4) {
|
||
- r2 = n3, i3 = t4;
|
||
- }), r2, i3];
|
||
- var r2, i3;
|
||
- }, typeof (t2 == null ? void 0 : t2.useProxies) == "boolean" && this.setUseProxies(t2.useProxies), typeof (t2 == null ? void 0 : t2.autoFreeze) == "boolean" && this.setAutoFreeze(t2.autoFreeze);
|
||
- }
|
||
- var i2 = e2.prototype;
|
||
- return i2.createDraft = function (e3) {
|
||
- r(e3) || n(8), t(e3) && (e3 = D(e3));
|
||
- var i3 = w(this), o2 = R(this, e3, void 0);
|
||
- return o2[Q].C = true, g(i3), o2;
|
||
- }, i2.finishDraft = function (t2, r2) {
|
||
- var e3 = t2 && t2[Q];
|
||
- e3 && e3.C || n(9), e3.I && n(10);
|
||
- var i3 = e3.A;
|
||
- return j(i3, r2), P(void 0, i3);
|
||
- }, i2.setAutoFreeze = function (n2) {
|
||
- this.F = n2;
|
||
- }, i2.setUseProxies = function (t2) {
|
||
- t2 && !B && n(20), this.g = t2;
|
||
- }, i2.applyPatches = function (n2, r2) {
|
||
- var e3;
|
||
- for (e3 = r2.length - 1; e3 >= 0; e3--) {
|
||
- var i3 = r2[e3];
|
||
- if (i3.path.length === 0 && i3.op === "replace") {
|
||
- n2 = i3.value;
|
||
- break;
|
||
- }
|
||
- }
|
||
- var o2 = b("Patches").$;
|
||
- return t(n2) ? o2(n2, r2) : this.produce(n2, function (n3) {
|
||
- return o2(n3, r2.slice(e3 + 1));
|
||
- });
|
||
- }, e2;
|
||
- }();
|
||
- var an = new un();
|
||
- var fn = an.produce;
|
||
- an.produceWithPatches.bind(an);
|
||
- an.setAutoFreeze.bind(an);
|
||
- an.setUseProxies.bind(an);
|
||
- an.applyPatches.bind(an);
|
||
- an.createDraft.bind(an);
|
||
- an.finishDraft.bind(an);
|
||
- var immer_esm_default = fn;
|
||
- // ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
||
- function _defineProperty(obj, key, value) {
|
||
- if (key in obj) {
|
||
- Object.defineProperty(obj, key, {
|
||
- value: value,
|
||
- enumerable: true,
|
||
- configurable: true,
|
||
- writable: true
|
||
- });
|
||
- }
|
||
- else {
|
||
- obj[key] = value;
|
||
- }
|
||
- return obj;
|
||
- }
|
||
- // ../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
||
- function ownKeys(object, enumerableOnly) {
|
||
- var keys = Object.keys(object);
|
||
- if (Object.getOwnPropertySymbols) {
|
||
- var symbols = Object.getOwnPropertySymbols(object);
|
||
- if (enumerableOnly) {
|
||
- symbols = symbols.filter(function (sym) {
|
||
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
||
- });
|
||
- }
|
||
- keys.push.apply(keys, symbols);
|
||
- }
|
||
- return keys;
|
||
- }
|
||
- function _objectSpread2(target) {
|
||
- for (var i2 = 1; i2 < arguments.length; i2++) {
|
||
- var source = arguments[i2] != null ? arguments[i2] : {};
|
||
- if (i2 % 2) {
|
||
- ownKeys(Object(source), true).forEach(function (key) {
|
||
- _defineProperty(target, key, source[key]);
|
||
- });
|
||
- }
|
||
- else if (Object.getOwnPropertyDescriptors) {
|
||
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||
- }
|
||
- else {
|
||
- ownKeys(Object(source)).forEach(function (key) {
|
||
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||
- });
|
||
- }
|
||
- }
|
||
- return target;
|
||
- }
|
||
- // ../../node_modules/redux/es/redux.js
|
||
- var $$observable = function () {
|
||
- return typeof Symbol === "function" && Symbol.observable || "@@observable";
|
||
- }();
|
||
- var randomString = function randomString2() {
|
||
- return Math.random().toString(36).substring(7).split("").join(".");
|
||
- };
|
||
- var ActionTypes = {
|
||
- INIT: "@@redux/INIT" + randomString(),
|
||
- REPLACE: "@@redux/REPLACE" + randomString(),
|
||
- PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
|
||
- return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
|
||
- }
|
||
- };
|
||
- function isPlainObject(obj) {
|
||
- if (typeof obj !== "object" || obj === null)
|
||
- return false;
|
||
- var proto = obj;
|
||
- while (Object.getPrototypeOf(proto) !== null) {
|
||
- proto = Object.getPrototypeOf(proto);
|
||
- }
|
||
- return Object.getPrototypeOf(obj) === proto;
|
||
- }
|
||
- function kindOf(val) {
|
||
- var typeOfVal = typeof val;
|
||
- {
|
||
- var miniKindOf = function (val2) {
|
||
- if (val2 === void 0)
|
||
- return "undefined";
|
||
- if (val2 === null)
|
||
- return "null";
|
||
- var type = typeof val2;
|
||
- switch (type) {
|
||
- case "boolean":
|
||
- case "string":
|
||
- case "number":
|
||
- case "symbol":
|
||
- case "function": {
|
||
- return type;
|
||
- }
|
||
- }
|
||
- if (Array.isArray(val2))
|
||
- return "array";
|
||
- if (isDate_1(val2))
|
||
- return "date";
|
||
- if (isError_1(val2))
|
||
- return "error";
|
||
- var constructorName = ctorName_1(val2);
|
||
- switch (constructorName) {
|
||
- case "Symbol":
|
||
- case "Promise":
|
||
- case "WeakMap":
|
||
- case "WeakSet":
|
||
- case "Map":
|
||
- case "Set":
|
||
- return constructorName;
|
||
- }
|
||
- return type.slice(8, -1).toLowerCase().replace(/\s/g, "");
|
||
- }, ctorName_1 = function (val2) {
|
||
- return typeof val2.constructor === "function" ? val2.constructor.name : null;
|
||
- }, isError_1 = function (val2) {
|
||
- return val2 instanceof Error || typeof val2.message === "string" && val2.constructor && typeof val2.constructor.stackTraceLimit === "number";
|
||
- }, isDate_1 = function (val2) {
|
||
- if (val2 instanceof Date)
|
||
- return true;
|
||
- return typeof val2.toDateString === "function" && typeof val2.getDate === "function" && typeof val2.setDate === "function";
|
||
- };
|
||
- typeOfVal = miniKindOf(val);
|
||
- }
|
||
- return typeOfVal;
|
||
- }
|
||
- function createStore(reducer, preloadedState, enhancer) {
|
||
- var _ref2;
|
||
- if (typeof preloadedState === "function" && typeof enhancer === "function" || typeof enhancer === "function" && typeof arguments[3] === "function") {
|
||
- throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");
|
||
- }
|
||
- if (typeof preloadedState === "function" && typeof enhancer === "undefined") {
|
||
- enhancer = preloadedState;
|
||
- preloadedState = void 0;
|
||
- }
|
||
- if (typeof enhancer !== "undefined") {
|
||
- if (typeof enhancer !== "function") {
|
||
- throw new Error("Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'");
|
||
- }
|
||
- return enhancer(createStore)(reducer, preloadedState);
|
||
- }
|
||
- if (typeof reducer !== "function") {
|
||
- throw new Error("Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'");
|
||
- }
|
||
- var currentReducer = reducer;
|
||
- var currentState = preloadedState;
|
||
- var currentListeners = [];
|
||
- var nextListeners = currentListeners;
|
||
- var isDispatching = false;
|
||
- function ensureCanMutateNextListeners() {
|
||
- if (nextListeners === currentListeners) {
|
||
- nextListeners = currentListeners.slice();
|
||
- }
|
||
- }
|
||
- function getState() {
|
||
- if (isDispatching) {
|
||
- throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");
|
||
- }
|
||
- return currentState;
|
||
- }
|
||
- function subscribe(listener) {
|
||
- if (typeof listener !== "function") {
|
||
- throw new Error("Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'");
|
||
- }
|
||
- if (isDispatching) {
|
||
- throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");
|
||
- }
|
||
- var isSubscribed = true;
|
||
- ensureCanMutateNextListeners();
|
||
- nextListeners.push(listener);
|
||
- return function unsubscribe() {
|
||
- if (!isSubscribed) {
|
||
- return;
|
||
- }
|
||
- if (isDispatching) {
|
||
- throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");
|
||
- }
|
||
- isSubscribed = false;
|
||
- ensureCanMutateNextListeners();
|
||
- var index = nextListeners.indexOf(listener);
|
||
- nextListeners.splice(index, 1);
|
||
- currentListeners = null;
|
||
- };
|
||
- }
|
||
- function dispatch(action) {
|
||
- if (!isPlainObject(action)) {
|
||
- throw new Error("Actions must be plain objects. Instead, the actual type was: '" + kindOf(action) + "'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");
|
||
- }
|
||
- if (typeof action.type === "undefined") {
|
||
- throw new Error('Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');
|
||
- }
|
||
- if (isDispatching) {
|
||
- throw new Error("Reducers may not dispatch actions.");
|
||
- }
|
||
- try {
|
||
- isDispatching = true;
|
||
- currentState = currentReducer(currentState, action);
|
||
- }
|
||
- finally {
|
||
- isDispatching = false;
|
||
- }
|
||
- var listeners = currentListeners = nextListeners;
|
||
- for (var i2 = 0; i2 < listeners.length; i2++) {
|
||
- var listener = listeners[i2];
|
||
- listener();
|
||
- }
|
||
- return action;
|
||
- }
|
||
- function replaceReducer(nextReducer) {
|
||
- if (typeof nextReducer !== "function") {
|
||
- throw new Error("Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer));
|
||
- }
|
||
- currentReducer = nextReducer;
|
||
- dispatch({
|
||
- type: ActionTypes.REPLACE
|
||
- });
|
||
- }
|
||
- function observable() {
|
||
- var _ref;
|
||
- var outerSubscribe = subscribe;
|
||
- return _ref = {
|
||
- subscribe: function subscribe2(observer) {
|
||
- if (typeof observer !== "object" || observer === null) {
|
||
- throw new Error("Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'");
|
||
- }
|
||
- function observeState() {
|
||
- if (observer.next) {
|
||
- observer.next(getState());
|
||
- }
|
||
- }
|
||
- observeState();
|
||
- var unsubscribe = outerSubscribe(observeState);
|
||
- return {
|
||
- unsubscribe: unsubscribe
|
||
- };
|
||
- }
|
||
- }, _ref[$$observable] = function () {
|
||
- return this;
|
||
- }, _ref;
|
||
- }
|
||
- dispatch({
|
||
- type: ActionTypes.INIT
|
||
- });
|
||
- return _ref2 = {
|
||
- dispatch: dispatch,
|
||
- subscribe: subscribe,
|
||
- getState: getState,
|
||
- replaceReducer: replaceReducer
|
||
- }, _ref2[$$observable] = observable, _ref2;
|
||
- }
|
||
- function warning(message) {
|
||
- if (typeof console !== "undefined" && typeof console.error === "function") {
|
||
- console.error(message);
|
||
- }
|
||
- try {
|
||
- throw new Error(message);
|
||
- }
|
||
- catch (e2) {
|
||
- }
|
||
- }
|
||
- function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
|
||
- var reducerKeys = Object.keys(reducers);
|
||
- var argumentName = action && action.type === ActionTypes.INIT ? "preloadedState argument passed to createStore" : "previous state received by the reducer";
|
||
- if (reducerKeys.length === 0) {
|
||
- return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";
|
||
- }
|
||
- if (!isPlainObject(inputState)) {
|
||
- return "The " + argumentName + ' has unexpected type of "' + kindOf(inputState) + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
|
||
- }
|
||
- var unexpectedKeys = Object.keys(inputState).filter(function (key) {
|
||
- return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
|
||
- });
|
||
- unexpectedKeys.forEach(function (key) {
|
||
- unexpectedKeyCache[key] = true;
|
||
- });
|
||
- if (action && action.type === ActionTypes.REPLACE)
|
||
- return;
|
||
- if (unexpectedKeys.length > 0) {
|
||
- return "Unexpected " + (unexpectedKeys.length > 1 ? "keys" : "key") + " " + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
|
||
- }
|
||
- }
|
||
- function assertReducerShape(reducers) {
|
||
- Object.keys(reducers).forEach(function (key) {
|
||
- var reducer = reducers[key];
|
||
- var initialState = reducer(void 0, {
|
||
- type: ActionTypes.INIT
|
||
- });
|
||
- if (typeof initialState === "undefined") {
|
||
- throw new Error('The slice reducer for key "' + key + "\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");
|
||
- }
|
||
- if (typeof reducer(void 0, {
|
||
- type: ActionTypes.PROBE_UNKNOWN_ACTION()
|
||
- }) === "undefined") {
|
||
- throw new Error('The slice reducer for key "' + key + '" returned undefined when probed with a random type. ' + ("Don't try to handle '" + ActionTypes.INIT + "' or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.");
|
||
- }
|
||
- });
|
||
- }
|
||
- function combineReducers(reducers) {
|
||
- var reducerKeys = Object.keys(reducers);
|
||
- var finalReducers = {};
|
||
- for (var i2 = 0; i2 < reducerKeys.length; i2++) {
|
||
- var key = reducerKeys[i2];
|
||
- {
|
||
- if (typeof reducers[key] === "undefined") {
|
||
- warning('No reducer provided for key "' + key + '"');
|
||
- }
|
||
- }
|
||
- if (typeof reducers[key] === "function") {
|
||
- finalReducers[key] = reducers[key];
|
||
- }
|
||
- }
|
||
- var finalReducerKeys = Object.keys(finalReducers);
|
||
- var unexpectedKeyCache;
|
||
- {
|
||
- unexpectedKeyCache = {};
|
||
- }
|
||
- var shapeAssertionError;
|
||
- try {
|
||
- assertReducerShape(finalReducers);
|
||
- }
|
||
- catch (e2) {
|
||
- shapeAssertionError = e2;
|
||
- }
|
||
- return function combination(state, action) {
|
||
- if (state === void 0) {
|
||
- state = {};
|
||
- }
|
||
- if (shapeAssertionError) {
|
||
- throw shapeAssertionError;
|
||
- }
|
||
- {
|
||
- var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
|
||
- if (warningMessage) {
|
||
- warning(warningMessage);
|
||
- }
|
||
- }
|
||
- var hasChanged = false;
|
||
- var nextState = {};
|
||
- for (var _i = 0; _i < finalReducerKeys.length; _i++) {
|
||
- var _key = finalReducerKeys[_i];
|
||
- var reducer = finalReducers[_key];
|
||
- var previousStateForKey = state[_key];
|
||
- var nextStateForKey = reducer(previousStateForKey, action);
|
||
- if (typeof nextStateForKey === "undefined") {
|
||
- var actionType = action && action.type;
|
||
- throw new Error("When called with an action of type " + (actionType ? '"' + String(actionType) + '"' : "(unknown type)") + ', the slice reducer for key "' + _key + '" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.');
|
||
- }
|
||
- nextState[_key] = nextStateForKey;
|
||
- hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
|
||
- }
|
||
- hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
|
||
- return hasChanged ? nextState : state;
|
||
- };
|
||
- }
|
||
- function bindActionCreator(actionCreator, dispatch) {
|
||
- return function () {
|
||
- return dispatch(actionCreator.apply(this, arguments));
|
||
- };
|
||
- }
|
||
- function bindActionCreators(actionCreators, dispatch) {
|
||
- if (typeof actionCreators === "function") {
|
||
- return bindActionCreator(actionCreators, dispatch);
|
||
- }
|
||
- if (typeof actionCreators !== "object" || actionCreators === null) {
|
||
- throw new Error("bindActionCreators expected an object or a function, but instead received: '" + kindOf(actionCreators) + "'. Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");
|
||
- }
|
||
- var boundActionCreators = {};
|
||
- for (var key in actionCreators) {
|
||
- var actionCreator = actionCreators[key];
|
||
- if (typeof actionCreator === "function") {
|
||
- boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
|
||
- }
|
||
- }
|
||
- return boundActionCreators;
|
||
- }
|
||
- function compose() {
|
||
- for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
|
||
- funcs[_key] = arguments[_key];
|
||
- }
|
||
- if (funcs.length === 0) {
|
||
- return function (arg) {
|
||
- return arg;
|
||
- };
|
||
- }
|
||
- if (funcs.length === 1) {
|
||
- return funcs[0];
|
||
- }
|
||
- return funcs.reduce(function (a2, b2) {
|
||
- return function () {
|
||
- return a2(b2.apply(void 0, arguments));
|
||
- };
|
||
- });
|
||
- }
|
||
- function applyMiddleware() {
|
||
- for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
|
||
- middlewares[_key] = arguments[_key];
|
||
- }
|
||
- return function (createStore2) {
|
||
- return function () {
|
||
- var store = createStore2.apply(void 0, arguments);
|
||
- var _dispatch = function dispatch() {
|
||
- throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.");
|
||
- };
|
||
- var middlewareAPI = {
|
||
- getState: store.getState,
|
||
- dispatch: function dispatch() {
|
||
- return _dispatch.apply(void 0, arguments);
|
||
- }
|
||
- };
|
||
- var chain = middlewares.map(function (middleware) {
|
||
- return middleware(middlewareAPI);
|
||
- });
|
||
- _dispatch = compose.apply(void 0, chain)(store.dispatch);
|
||
- return _objectSpread2(_objectSpread2({}, store), {}, {
|
||
- dispatch: _dispatch
|
||
- });
|
||
- };
|
||
- };
|
||
- }
|
||
- function isCrushed() {
|
||
- }
|
||
- if (typeof isCrushed.name === "string" && isCrushed.name !== "isCrushed") {
|
||
- warning('You are currently using minified code outside of NODE_ENV === "production". This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) to ensure you have the correct code for your production build.');
|
||
- }
|
||
- // ../../node_modules/reselect/es/index.js
|
||
- function defaultEqualityCheck(a2, b2) {
|
||
- return a2 === b2;
|
||
- }
|
||
- function areArgumentsShallowlyEqual(equalityCheck, prev, next) {
|
||
- if (prev === null || next === null || prev.length !== next.length) {
|
||
- return false;
|
||
- }
|
||
- var length = prev.length;
|
||
- for (var i2 = 0; i2 < length; i2++) {
|
||
- if (!equalityCheck(prev[i2], next[i2])) {
|
||
- return false;
|
||
- }
|
||
- }
|
||
- return true;
|
||
- }
|
||
- function defaultMemoize(func) {
|
||
- var equalityCheck = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : defaultEqualityCheck;
|
||
- var lastArgs = null;
|
||
- var lastResult = null;
|
||
- return function () {
|
||
- if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {
|
||
- lastResult = func.apply(null, arguments);
|
||
- }
|
||
- lastArgs = arguments;
|
||
- return lastResult;
|
||
- };
|
||
- }
|
||
- function getDependencies(funcs) {
|
||
- var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs;
|
||
- if (!dependencies.every(function (dep) {
|
||
- return typeof dep === "function";
|
||
- })) {
|
||
- var dependencyTypes = dependencies.map(function (dep) {
|
||
- return typeof dep;
|
||
- }).join(", ");
|
||
- throw new Error("Selector creators expect all input-selectors to be functions, " + ("instead received the following types: [" + dependencyTypes + "]"));
|
||
- }
|
||
- return dependencies;
|
||
- }
|
||
- function createSelectorCreator(memoize) {
|
||
- for (var _len = arguments.length, memoizeOptions = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||
- memoizeOptions[_key - 1] = arguments[_key];
|
||
- }
|
||
- return function () {
|
||
- for (var _len2 = arguments.length, funcs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||
- funcs[_key2] = arguments[_key2];
|
||
- }
|
||
- var recomputations = 0;
|
||
- var resultFunc = funcs.pop();
|
||
- var dependencies = getDependencies(funcs);
|
||
- var memoizedResultFunc = memoize.apply(void 0, [function () {
|
||
- recomputations++;
|
||
- return resultFunc.apply(null, arguments);
|
||
- }].concat(memoizeOptions));
|
||
- var selector = memoize(function () {
|
||
- var params = [];
|
||
- var length = dependencies.length;
|
||
- for (var i2 = 0; i2 < length; i2++) {
|
||
- params.push(dependencies[i2].apply(null, arguments));
|
||
- }
|
||
- return memoizedResultFunc.apply(null, params);
|
||
- });
|
||
- selector.resultFunc = resultFunc;
|
||
- selector.dependencies = dependencies;
|
||
- selector.recomputations = function () {
|
||
- return recomputations;
|
||
- };
|
||
- selector.resetRecomputations = function () {
|
||
- return recomputations = 0;
|
||
- };
|
||
- return selector;
|
||
- };
|
||
- }
|
||
- var createSelector = createSelectorCreator(defaultMemoize);
|
||
- // src/createDraftSafeSelector.ts
|
||
- var createDraftSafeSelector = function () {
|
||
- var args = [];
|
||
- for (var _b = 0; _b < arguments.length; _b++) {
|
||
- args[_b] = arguments[_b];
|
||
- }
|
||
- var selector = createSelector.apply(void 0, args);
|
||
- var wrappedSelector = function (value) {
|
||
- var rest = [];
|
||
- for (var _b = 1; _b < arguments.length; _b++) {
|
||
- rest[_b - 1] = arguments[_b];
|
||
- }
|
||
- return selector.apply(void 0, __spreadArray([t(value) ? D(value) : value], rest));
|
||
- };
|
||
- return wrappedSelector;
|
||
- };
|
||
- // src/devtoolsExtension.ts
|
||
- var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () {
|
||
- if (arguments.length === 0)
|
||
- return void 0;
|
||
- if (typeof arguments[0] === "object")
|
||
- return compose;
|
||
- return compose.apply(null, arguments);
|
||
- };
|
||
- // src/isPlainObject.ts
|
||
- function isPlainObject2(value) {
|
||
- if (typeof value !== "object" || value === null)
|
||
- return false;
|
||
- var proto = value;
|
||
- while (Object.getPrototypeOf(proto) !== null) {
|
||
- proto = Object.getPrototypeOf(proto);
|
||
- }
|
||
- return Object.getPrototypeOf(value) === proto;
|
||
- }
|
||
- // ../../node_modules/redux-thunk/es/index.js
|
||
- function createThunkMiddleware(extraArgument) {
|
||
- return function (_ref) {
|
||
- var dispatch = _ref.dispatch, getState = _ref.getState;
|
||
- return function (next) {
|
||
- return function (action) {
|
||
- if (typeof action === "function") {
|
||
- return action(dispatch, getState, extraArgument);
|
||
- }
|
||
- return next(action);
|
||
- };
|
||
- };
|
||
- };
|
||
- }
|
||
- var thunk = createThunkMiddleware();
|
||
- thunk.withExtraArgument = createThunkMiddleware;
|
||
- var es_default = thunk;
|
||
- // src/utils.ts
|
||
- function getTimeMeasureUtils(maxDelay, fnName) {
|
||
- var elapsed = 0;
|
||
- return {
|
||
- measureTime: function (fn2) {
|
||
- var started = Date.now();
|
||
- try {
|
||
- return fn2();
|
||
- }
|
||
- finally {
|
||
- var finished = Date.now();
|
||
- elapsed += finished - started;
|
||
- }
|
||
- },
|
||
- warnIfExceeded: function () {
|
||
- if (elapsed > maxDelay) {
|
||
- console.warn(fnName + " took " + elapsed + "ms, which is more than the warning threshold of " + maxDelay + "ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.");
|
||
- }
|
||
- }
|
||
- };
|
||
- }
|
||
- var MiddlewareArray = /** @class */ (function (_super) {
|
||
- __extends(MiddlewareArray, _super);
|
||
- function MiddlewareArray() {
|
||
- var args = [];
|
||
- for (var _b = 0; _b < arguments.length; _b++) {
|
||
- args[_b] = arguments[_b];
|
||
- }
|
||
- var _this = _super.apply(this, args) || this;
|
||
- Object.setPrototypeOf(_this, MiddlewareArray.prototype);
|
||
- return _this;
|
||
- }
|
||
- Object.defineProperty(MiddlewareArray, Symbol.species, {
|
||
- get: function () {
|
||
- return MiddlewareArray;
|
||
- },
|
||
- enumerable: false,
|
||
- configurable: true
|
||
- });
|
||
- MiddlewareArray.prototype.concat = function () {
|
||
- var arr = [];
|
||
- for (var _b = 0; _b < arguments.length; _b++) {
|
||
- arr[_b] = arguments[_b];
|
||
- }
|
||
- return _super.prototype.concat.apply(this, arr);
|
||
- };
|
||
- MiddlewareArray.prototype.prepend = function () {
|
||
- var arr = [];
|
||
- for (var _b = 0; _b < arguments.length; _b++) {
|
||
- arr[_b] = arguments[_b];
|
||
- }
|
||
- if (arr.length === 1 && Array.isArray(arr[0])) {
|
||
- return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))();
|
||
- }
|
||
- return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))();
|
||
- };
|
||
- return MiddlewareArray;
|
||
- }(Array));
|
||
- var prefix = "Invariant failed";
|
||
- function invariant(condition, message) {
|
||
- if (condition) {
|
||
- return;
|
||
- }
|
||
- throw new Error(prefix + ": " + (message || ""));
|
||
- }
|
||
- function stringify(obj, serializer, indent, decycler) {
|
||
- return JSON.stringify(obj, getSerialize(serializer, decycler), indent);
|
||
- }
|
||
- function getSerialize(serializer, decycler) {
|
||
- var stack = [], keys = [];
|
||
- if (!decycler)
|
||
- decycler = function (_2, value) {
|
||
- if (stack[0] === value)
|
||
- return "[Circular ~]";
|
||
- return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]";
|
||
- };
|
||
- return function (key, value) {
|
||
- if (stack.length > 0) {
|
||
- var thisPos = stack.indexOf(this);
|
||
- ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
|
||
- ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
|
||
- if (~stack.indexOf(value))
|
||
- value = decycler.call(this, key, value);
|
||
- }
|
||
- else
|
||
- stack.push(value);
|
||
- return serializer == null ? value : serializer.call(this, key, value);
|
||
- };
|
||
- }
|
||
- function isImmutableDefault(value) {
|
||
- return typeof value !== "object" || value === null || typeof value === "undefined" || Object.isFrozen(value);
|
||
- }
|
||
- function trackForMutations(isImmutable, ignorePaths, obj) {
|
||
- var trackedProperties = trackProperties(isImmutable, ignorePaths, obj);
|
||
- return {
|
||
- detectMutations: function () {
|
||
- return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);
|
||
- }
|
||
- };
|
||
- }
|
||
- function trackProperties(isImmutable, ignorePaths, obj, path) {
|
||
- if (ignorePaths === void 0) { ignorePaths = []; }
|
||
- if (path === void 0) { path = ""; }
|
||
- var tracked = { value: obj };
|
||
- if (!isImmutable(obj)) {
|
||
- tracked.children = {};
|
||
- for (var key in obj) {
|
||
- var childPath = path ? path + "." + key : key;
|
||
- if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
|
||
- continue;
|
||
- }
|
||
- tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);
|
||
- }
|
||
- }
|
||
- return tracked;
|
||
- }
|
||
- function detectMutations(isImmutable, ignorePaths, trackedProperty, obj, sameParentRef, path) {
|
||
- if (ignorePaths === void 0) { ignorePaths = []; }
|
||
- if (sameParentRef === void 0) { sameParentRef = false; }
|
||
- if (path === void 0) { path = ""; }
|
||
- var prevObj = trackedProperty ? trackedProperty.value : void 0;
|
||
- var sameRef = prevObj === obj;
|
||
- if (sameParentRef && !sameRef && !Number.isNaN(obj)) {
|
||
- return { wasMutated: true, path: path };
|
||
- }
|
||
- if (isImmutable(prevObj) || isImmutable(obj)) {
|
||
- return { wasMutated: false };
|
||
- }
|
||
- var keysToDetect = {};
|
||
- for (var key in trackedProperty.children) {
|
||
- keysToDetect[key] = true;
|
||
- }
|
||
- for (var key in obj) {
|
||
- keysToDetect[key] = true;
|
||
- }
|
||
- for (var key in keysToDetect) {
|
||
- var childPath = path ? path + "." + key : key;
|
||
- if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
|
||
- continue;
|
||
- }
|
||
- var result = detectMutations(isImmutable, ignorePaths, trackedProperty.children[key], obj[key], sameRef, childPath);
|
||
- if (result.wasMutated) {
|
||
- return result;
|
||
- }
|
||
- }
|
||
- return { wasMutated: false };
|
||
- }
|
||
- function createImmutableStateInvariantMiddleware(options) {
|
||
- if (options === void 0) { options = {}; }
|
||
- var _b = options.isImmutable, isImmutable = _b === void 0 ? isImmutableDefault : _b, ignoredPaths = options.ignoredPaths, _c = options.warnAfter, warnAfter = _c === void 0 ? 32 : _c, ignore = options.ignore;
|
||
- ignoredPaths = ignoredPaths || ignore;
|
||
- var track = trackForMutations.bind(null, isImmutable, ignoredPaths);
|
||
- return function (_b) {
|
||
- var getState = _b.getState;
|
||
- var state = getState();
|
||
- var tracker = track(state);
|
||
- var result;
|
||
- return function (next) { return function (action) {
|
||
- var measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware");
|
||
- measureUtils.measureTime(function () {
|
||
- state = getState();
|
||
- result = tracker.detectMutations();
|
||
- tracker = track(state);
|
||
- invariant(!result.wasMutated, "A state mutation was detected between dispatches, in the path '" + (result.path || "") + "'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)");
|
||
- });
|
||
- var dispatchedAction = next(action);
|
||
- measureUtils.measureTime(function () {
|
||
- state = getState();
|
||
- result = tracker.detectMutations();
|
||
- tracker = track(state);
|
||
- result.wasMutated && invariant(!result.wasMutated, "A state mutation was detected inside a dispatch, in the path: " + (result.path || "") + ". Take a look at the reducer(s) handling the action " + stringify(action) + ". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)");
|
||
- });
|
||
- measureUtils.warnIfExceeded();
|
||
- return dispatchedAction;
|
||
- }; };
|
||
- };
|
||
- }
|
||
- // src/serializableStateInvariantMiddleware.ts
|
||
- function isPlain(val) {
|
||
- var type = typeof val;
|
||
- return type === "undefined" || val === null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject2(val);
|
||
- }
|
||
- function findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths) {
|
||
- if (path === void 0) { path = ""; }
|
||
- if (isSerializable === void 0) { isSerializable = isPlain; }
|
||
- if (ignoredPaths === void 0) { ignoredPaths = []; }
|
||
- var foundNestedSerializable;
|
||
- if (!isSerializable(value)) {
|
||
- return {
|
||
- keyPath: path || "<root>",
|
||
- value: value
|
||
- };
|
||
- }
|
||
- if (typeof value !== "object" || value === null) {
|
||
- return false;
|
||
- }
|
||
- var entries = getEntries != null ? getEntries(value) : Object.entries(value);
|
||
- var hasIgnoredPaths = ignoredPaths.length > 0;
|
||
- for (var _b = 0, entries_1 = entries; _b < entries_1.length; _b++) {
|
||
- var _c = entries_1[_b], key = _c[0], nestedValue = _c[1];
|
||
- var nestedPath = path ? path + "." + key : key;
|
||
- if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) {
|
||
- continue;
|
||
- }
|
||
- if (!isSerializable(nestedValue)) {
|
||
- return {
|
||
- keyPath: nestedPath,
|
||
- value: nestedValue
|
||
- };
|
||
- }
|
||
- if (typeof nestedValue === "object") {
|
||
- foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths);
|
||
- if (foundNestedSerializable) {
|
||
- return foundNestedSerializable;
|
||
- }
|
||
- }
|
||
- }
|
||
- return false;
|
||
- }
|
||
- function createSerializableStateInvariantMiddleware(options) {
|
||
- if (options === void 0) { options = {}; }
|
||
- var _b = options.isSerializable, isSerializable = _b === void 0 ? isPlain : _b, getEntries = options.getEntries, _c = options.ignoredActions, ignoredActions = _c === void 0 ? [] : _c, _d = options.ignoredActionPaths, ignoredActionPaths = _d === void 0 ? ["meta.arg", "meta.baseQueryMeta"] : _d, _e = options.ignoredPaths, ignoredPaths = _e === void 0 ? [] : _e, _f = options.warnAfter, warnAfter = _f === void 0 ? 32 : _f, _g = options.ignoreState, ignoreState = _g === void 0 ? false : _g;
|
||
- return function (storeAPI) { return function (next) { return function (action) {
|
||
- if (ignoredActions.length && ignoredActions.indexOf(action.type) !== -1) {
|
||
- return next(action);
|
||
- }
|
||
- var measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware");
|
||
- measureUtils.measureTime(function () {
|
||
- var foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths);
|
||
- if (foundActionNonSerializableValue) {
|
||
- var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value;
|
||
- console.error("A non-serializable value was detected in an action, in the path: `" + keyPath + "`. Value:", value, "\nTake a look at the logic that dispatched this action: ", action, "\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)", "\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)");
|
||
- }
|
||
- });
|
||
- var result = next(action);
|
||
- if (!ignoreState) {
|
||
- measureUtils.measureTime(function () {
|
||
- var state = storeAPI.getState();
|
||
- var foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths);
|
||
- if (foundStateNonSerializableValue) {
|
||
- var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value;
|
||
- console.error("A non-serializable value was detected in the state, in the path: `" + keyPath + "`. Value:", value, "\nTake a look at the reducer(s) handling this action type: " + action.type + ".\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)");
|
||
- }
|
||
- });
|
||
- measureUtils.warnIfExceeded();
|
||
- }
|
||
- return result;
|
||
- }; }; };
|
||
- }
|
||
- // src/getDefaultMiddleware.ts
|
||
- function isBoolean(x2) {
|
||
- return typeof x2 === "boolean";
|
||
- }
|
||
- function curryGetDefaultMiddleware() {
|
||
- return function curriedGetDefaultMiddleware(options) {
|
||
- return getDefaultMiddleware(options);
|
||
- };
|
||
- }
|
||
- function getDefaultMiddleware(options) {
|
||
- if (options === void 0) { options = {}; }
|
||
- var _b = options.thunk, thunk2 = _b === void 0 ? true : _b, _c = options.immutableCheck, immutableCheck = _c === void 0 ? true : _c, _d = options.serializableCheck, serializableCheck = _d === void 0 ? true : _d;
|
||
- var middlewareArray = new MiddlewareArray();
|
||
- if (thunk2) {
|
||
- if (isBoolean(thunk2)) {
|
||
- middlewareArray.push(es_default);
|
||
- }
|
||
- else {
|
||
- middlewareArray.push(es_default.withExtraArgument(thunk2.extraArgument));
|
||
- }
|
||
- }
|
||
- {
|
||
- if (immutableCheck) {
|
||
- var immutableOptions = {};
|
||
- if (!isBoolean(immutableCheck)) {
|
||
- immutableOptions = immutableCheck;
|
||
- }
|
||
- middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));
|
||
- }
|
||
- if (serializableCheck) {
|
||
- var serializableOptions = {};
|
||
- if (!isBoolean(serializableCheck)) {
|
||
- serializableOptions = serializableCheck;
|
||
- }
|
||
- middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));
|
||
- }
|
||
- }
|
||
- return middlewareArray;
|
||
- }
|
||
- // src/configureStore.ts
|
||
- var IS_PRODUCTION = false;
|
||
- function configureStore(options) {
|
||
- var curriedGetDefaultMiddleware = curryGetDefaultMiddleware();
|
||
- var _b = options || {}, _c = _b.reducer, reducer = _c === void 0 ? void 0 : _c, _d = _b.middleware, middleware = _d === void 0 ? curriedGetDefaultMiddleware() : _d, _e = _b.devTools, devTools = _e === void 0 ? true : _e, _f = _b.preloadedState, preloadedState = _f === void 0 ? void 0 : _f, _g = _b.enhancers, enhancers = _g === void 0 ? void 0 : _g;
|
||
- var rootReducer;
|
||
- if (typeof reducer === "function") {
|
||
- rootReducer = reducer;
|
||
- }
|
||
- else if (isPlainObject2(reducer)) {
|
||
- rootReducer = combineReducers(reducer);
|
||
- }
|
||
- else {
|
||
- throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');
|
||
- }
|
||
- var finalMiddleware = middleware;
|
||
- if (typeof finalMiddleware === "function") {
|
||
- finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware);
|
||
- if (!Array.isArray(finalMiddleware)) {
|
||
- throw new Error("when using a middleware builder function, an array of middleware must be returned");
|
||
- }
|
||
- }
|
||
- if (finalMiddleware.some(function (item) { return typeof item !== "function"; })) {
|
||
- throw new Error("each middleware provided to configureStore must be a function");
|
||
- }
|
||
- var middlewareEnhancer = applyMiddleware.apply(void 0, finalMiddleware);
|
||
- var finalCompose = compose;
|
||
- if (devTools) {
|
||
- finalCompose = composeWithDevTools(__spreadValues({
|
||
- trace: !IS_PRODUCTION
|
||
- }, typeof devTools === "object" && devTools));
|
||
- }
|
||
- var storeEnhancers = [middlewareEnhancer];
|
||
- if (Array.isArray(enhancers)) {
|
||
- storeEnhancers = __spreadArray([middlewareEnhancer], enhancers);
|
||
- }
|
||
- else if (typeof enhancers === "function") {
|
||
- storeEnhancers = enhancers(storeEnhancers);
|
||
- }
|
||
- var composedEnhancer = finalCompose.apply(void 0, storeEnhancers);
|
||
- return createStore(rootReducer, preloadedState, composedEnhancer);
|
||
- }
|
||
- // src/createAction.ts
|
||
- function createAction(type, prepareAction) {
|
||
- function actionCreator() {
|
||
- var args = [];
|
||
- for (var _b = 0; _b < arguments.length; _b++) {
|
||
- args[_b] = arguments[_b];
|
||
- }
|
||
- if (prepareAction) {
|
||
- var prepared = prepareAction.apply(void 0, args);
|
||
- if (!prepared) {
|
||
- throw new Error("prepareAction did not return an object");
|
||
- }
|
||
- return __spreadValues(__spreadValues({
|
||
- type: type,
|
||
- payload: prepared.payload
|
||
- }, "meta" in prepared && { meta: prepared.meta }), "error" in prepared && { error: prepared.error });
|
||
- }
|
||
- return { type: type, payload: args[0] };
|
||
- }
|
||
- actionCreator.toString = function () { return "" + type; };
|
||
- actionCreator.type = type;
|
||
- actionCreator.match = function (action) { return action.type === type; };
|
||
- return actionCreator;
|
||
- }
|
||
- function isFSA(action) {
|
||
- return isPlainObject2(action) && typeof action.type === "string" && Object.keys(action).every(isValidKey);
|
||
- }
|
||
- function isValidKey(key) {
|
||
- return ["type", "payload", "error", "meta"].indexOf(key) > -1;
|
||
- }
|
||
- function getType(actionCreator) {
|
||
- return "" + actionCreator;
|
||
- }
|
||
- // src/mapBuilders.ts
|
||
- function executeReducerBuilderCallback(builderCallback) {
|
||
- var actionsMap = {};
|
||
- var actionMatchers = [];
|
||
- var defaultCaseReducer;
|
||
- var builder = {
|
||
- addCase: function (typeOrActionCreator, reducer) {
|
||
- {
|
||
- if (actionMatchers.length > 0) {
|
||
- throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");
|
||
- }
|
||
- if (defaultCaseReducer) {
|
||
- throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`");
|
||
- }
|
||
- }
|
||
- var type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
|
||
- if (type in actionsMap) {
|
||
- throw new Error("addCase cannot be called with two reducers for the same action type");
|
||
- }
|
||
- actionsMap[type] = reducer;
|
||
- return builder;
|
||
- },
|
||
- addMatcher: function (matcher, reducer) {
|
||
- {
|
||
- if (defaultCaseReducer) {
|
||
- throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
|
||
- }
|
||
- }
|
||
- actionMatchers.push({ matcher: matcher, reducer: reducer });
|
||
- return builder;
|
||
- },
|
||
- addDefaultCase: function (reducer) {
|
||
- {
|
||
- if (defaultCaseReducer) {
|
||
- throw new Error("`builder.addDefaultCase` can only be called once");
|
||
- }
|
||
- }
|
||
- defaultCaseReducer = reducer;
|
||
- return builder;
|
||
- }
|
||
- };
|
||
- builderCallback(builder);
|
||
- return [actionsMap, actionMatchers, defaultCaseReducer];
|
||
- }
|
||
- // src/createReducer.ts
|
||
- function createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) {
|
||
- if (actionMatchers === void 0) { actionMatchers = []; }
|
||
- var _b = typeof mapOrBuilderCallback === "function" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _b[0], finalActionMatchers = _b[1], finalDefaultCaseReducer = _b[2];
|
||
- var frozenInitialState = immer_esm_default(initialState, function () {
|
||
- });
|
||
- return function (state, action) {
|
||
- if (state === void 0) { state = frozenInitialState; }
|
||
- var caseReducers = __spreadArray([
|
||
- actionsMap[action.type]
|
||
- ], finalActionMatchers.filter(function (_b) {
|
||
- var matcher = _b.matcher;
|
||
- return matcher(action);
|
||
- }).map(function (_b) {
|
||
- var reducer = _b.reducer;
|
||
- return reducer;
|
||
- }));
|
||
- if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) {
|
||
- caseReducers = [finalDefaultCaseReducer];
|
||
- }
|
||
- return caseReducers.reduce(function (previousState, caseReducer) {
|
||
- if (caseReducer) {
|
||
- if (t(previousState)) {
|
||
- var draft = previousState;
|
||
- var result = caseReducer(draft, action);
|
||
- if (typeof result === "undefined") {
|
||
- return previousState;
|
||
- }
|
||
- return result;
|
||
- }
|
||
- else if (!r(previousState)) {
|
||
- var result = caseReducer(previousState, action);
|
||
- if (typeof result === "undefined") {
|
||
- if (previousState === null) {
|
||
- return previousState;
|
||
- }
|
||
- throw Error("A case reducer on a non-draftable value must not return undefined");
|
||
- }
|
||
- return result;
|
||
- }
|
||
- else {
|
||
- return immer_esm_default(previousState, function (draft) {
|
||
- return caseReducer(draft, action);
|
||
- });
|
||
- }
|
||
- }
|
||
- return previousState;
|
||
- }, state);
|
||
- };
|
||
- }
|
||
- // src/createSlice.ts
|
||
- function getType2(slice, actionKey) {
|
||
- return slice + "/" + actionKey;
|
||
- }
|
||
- function createSlice(options) {
|
||
- var name = options.name, initialState = options.initialState;
|
||
- if (!name) {
|
||
- throw new Error("`name` is a required option for createSlice");
|
||
- }
|
||
- var reducers = options.reducers || {};
|
||
- var _b = typeof options.extraReducers === "function" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers], _c = _b[0], extraReducers = _c === void 0 ? {} : _c, _d = _b[1], actionMatchers = _d === void 0 ? [] : _d, _e = _b[2], defaultCaseReducer = _e === void 0 ? void 0 : _e;
|
||
- var reducerNames = Object.keys(reducers);
|
||
- var sliceCaseReducersByName = {};
|
||
- var sliceCaseReducersByType = {};
|
||
- var actionCreators = {};
|
||
- reducerNames.forEach(function (reducerName) {
|
||
- var maybeReducerWithPrepare = reducers[reducerName];
|
||
- var type = getType2(name, reducerName);
|
||
- var caseReducer;
|
||
- var prepareCallback;
|
||
- if ("reducer" in maybeReducerWithPrepare) {
|
||
- caseReducer = maybeReducerWithPrepare.reducer;
|
||
- prepareCallback = maybeReducerWithPrepare.prepare;
|
||
- }
|
||
- else {
|
||
- caseReducer = maybeReducerWithPrepare;
|
||
- }
|
||
- sliceCaseReducersByName[reducerName] = caseReducer;
|
||
- sliceCaseReducersByType[type] = caseReducer;
|
||
- actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type);
|
||
- });
|
||
- var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType);
|
||
- var reducer = createReducer(initialState, finalCaseReducers, actionMatchers, defaultCaseReducer);
|
||
- return {
|
||
- name: name,
|
||
- reducer: reducer,
|
||
- actions: actionCreators,
|
||
- caseReducers: sliceCaseReducersByName
|
||
- };
|
||
- }
|
||
- // src/entities/entity_state.ts
|
||
- function getInitialEntityState() {
|
||
- return {
|
||
- ids: [],
|
||
- entities: {}
|
||
- };
|
||
- }
|
||
- function createInitialStateFactory() {
|
||
- function getInitialState(additionalState) {
|
||
- if (additionalState === void 0) { additionalState = {}; }
|
||
- return Object.assign(getInitialEntityState(), additionalState);
|
||
- }
|
||
- return { getInitialState: getInitialState };
|
||
- }
|
||
- // src/entities/state_selectors.ts
|
||
- function createSelectorsFactory() {
|
||
- function getSelectors(selectState) {
|
||
- var selectIds = function (state) { return state.ids; };
|
||
- var selectEntities = function (state) { return state.entities; };
|
||
- var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); });
|
||
- var selectId = function (_2, id) { return id; };
|
||
- var selectById = function (entities, id) { return entities[id]; };
|
||
- var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; });
|
||
- if (!selectState) {
|
||
- return {
|
||
- selectIds: selectIds,
|
||
- selectEntities: selectEntities,
|
||
- selectAll: selectAll,
|
||
- selectTotal: selectTotal,
|
||
- selectById: createDraftSafeSelector(selectEntities, selectId, selectById)
|
||
- };
|
||
- }
|
||
- var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities);
|
||
- return {
|
||
- selectIds: createDraftSafeSelector(selectState, selectIds),
|
||
- selectEntities: selectGlobalizedEntities,
|
||
- selectAll: createDraftSafeSelector(selectState, selectAll),
|
||
- selectTotal: createDraftSafeSelector(selectState, selectTotal),
|
||
- selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById)
|
||
- };
|
||
- }
|
||
- return { getSelectors: getSelectors };
|
||
- }
|
||
- // src/entities/state_adapter.ts
|
||
- function createSingleArgumentStateOperator(mutator) {
|
||
- var operator = createStateOperator(function (_2, state) { return mutator(state); });
|
||
- return function operation(state) {
|
||
- return operator(state, void 0);
|
||
- };
|
||
- }
|
||
- function createStateOperator(mutator) {
|
||
- return function operation(state, arg) {
|
||
- function isPayloadActionArgument(arg2) {
|
||
- return isFSA(arg2);
|
||
- }
|
||
- var runMutator = function (draft) {
|
||
- if (isPayloadActionArgument(arg)) {
|
||
- mutator(arg.payload, draft);
|
||
- }
|
||
- else {
|
||
- mutator(arg, draft);
|
||
- }
|
||
- };
|
||
- if (t(state)) {
|
||
- runMutator(state);
|
||
- return state;
|
||
- }
|
||
- else {
|
||
- return immer_esm_default(state, runMutator);
|
||
- }
|
||
- };
|
||
- }
|
||
- // src/entities/utils.ts
|
||
- function selectIdValue(entity, selectId) {
|
||
- var key = selectId(entity);
|
||
- if (key === void 0) {
|
||
- console.warn("The entity passed to the `selectId` implementation returned undefined.", "You should probably provide your own `selectId` implementation.", "The entity that was passed:", entity, "The `selectId` implementation:", selectId.toString());
|
||
- }
|
||
- return key;
|
||
- }
|
||
- function ensureEntitiesArray(entities) {
|
||
- if (!Array.isArray(entities)) {
|
||
- entities = Object.values(entities);
|
||
- }
|
||
- return entities;
|
||
- }
|
||
- function splitAddedUpdatedEntities(newEntities, selectId, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- var added = [];
|
||
- var updated = [];
|
||
- for (var _b = 0, newEntities_1 = newEntities; _b < newEntities_1.length; _b++) {
|
||
- var entity = newEntities_1[_b];
|
||
- var id = selectIdValue(entity, selectId);
|
||
- if (id in state.entities) {
|
||
- updated.push({ id: id, changes: entity });
|
||
- }
|
||
- else {
|
||
- added.push(entity);
|
||
- }
|
||
- }
|
||
- return [added, updated];
|
||
- }
|
||
- // src/entities/unsorted_state_adapter.ts
|
||
- function createUnsortedStateAdapter(selectId) {
|
||
- function addOneMutably(entity, state) {
|
||
- var key = selectIdValue(entity, selectId);
|
||
- if (key in state.entities) {
|
||
- return;
|
||
- }
|
||
- state.ids.push(key);
|
||
- state.entities[key] = entity;
|
||
- }
|
||
- function addManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- for (var _b = 0, newEntities_2 = newEntities; _b < newEntities_2.length; _b++) {
|
||
- var entity = newEntities_2[_b];
|
||
- addOneMutably(entity, state);
|
||
- }
|
||
- }
|
||
- function setOneMutably(entity, state) {
|
||
- var key = selectIdValue(entity, selectId);
|
||
- if (!(key in state.entities)) {
|
||
- state.ids.push(key);
|
||
- }
|
||
- state.entities[key] = entity;
|
||
- }
|
||
- function setManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- for (var _b = 0, newEntities_3 = newEntities; _b < newEntities_3.length; _b++) {
|
||
- var entity = newEntities_3[_b];
|
||
- setOneMutably(entity, state);
|
||
- }
|
||
- }
|
||
- function setAllMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- state.ids = [];
|
||
- state.entities = {};
|
||
- addManyMutably(newEntities, state);
|
||
- }
|
||
- function removeOneMutably(key, state) {
|
||
- return removeManyMutably([key], state);
|
||
- }
|
||
- function removeManyMutably(keys, state) {
|
||
- var didMutate = false;
|
||
- keys.forEach(function (key) {
|
||
- if (key in state.entities) {
|
||
- delete state.entities[key];
|
||
- didMutate = true;
|
||
- }
|
||
- });
|
||
- if (didMutate) {
|
||
- state.ids = state.ids.filter(function (id) { return id in state.entities; });
|
||
- }
|
||
- }
|
||
- function removeAllMutably(state) {
|
||
- Object.assign(state, {
|
||
- ids: [],
|
||
- entities: {}
|
||
- });
|
||
- }
|
||
- function takeNewKey(keys, update, state) {
|
||
- var original = state.entities[update.id];
|
||
- var updated = Object.assign({}, original, update.changes);
|
||
- var newKey = selectIdValue(updated, selectId);
|
||
- var hasNewKey = newKey !== update.id;
|
||
- if (hasNewKey) {
|
||
- keys[update.id] = newKey;
|
||
- delete state.entities[update.id];
|
||
- }
|
||
- state.entities[newKey] = updated;
|
||
- return hasNewKey;
|
||
- }
|
||
- function updateOneMutably(update, state) {
|
||
- return updateManyMutably([update], state);
|
||
- }
|
||
- function updateManyMutably(updates, state) {
|
||
- var newKeys = {};
|
||
- var updatesPerEntity = {};
|
||
- updates.forEach(function (update) {
|
||
- if (update.id in state.entities) {
|
||
- updatesPerEntity[update.id] = {
|
||
- id: update.id,
|
||
- changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes)
|
||
- };
|
||
- }
|
||
- });
|
||
- updates = Object.values(updatesPerEntity);
|
||
- var didMutateEntities = updates.length > 0;
|
||
- if (didMutateEntities) {
|
||
- var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0;
|
||
- if (didMutateIds) {
|
||
- state.ids = state.ids.map(function (id) { return newKeys[id] || id; });
|
||
- }
|
||
- }
|
||
- }
|
||
- function upsertOneMutably(entity, state) {
|
||
- return upsertManyMutably([entity], state);
|
||
- }
|
||
- function upsertManyMutably(newEntities, state) {
|
||
- var _b = splitAddedUpdatedEntities(newEntities, selectId, state), added = _b[0], updated = _b[1];
|
||
- updateManyMutably(updated, state);
|
||
- addManyMutably(added, state);
|
||
- }
|
||
- return {
|
||
- removeAll: createSingleArgumentStateOperator(removeAllMutably),
|
||
- addOne: createStateOperator(addOneMutably),
|
||
- addMany: createStateOperator(addManyMutably),
|
||
- setOne: createStateOperator(setOneMutably),
|
||
- setMany: createStateOperator(setManyMutably),
|
||
- setAll: createStateOperator(setAllMutably),
|
||
- updateOne: createStateOperator(updateOneMutably),
|
||
- updateMany: createStateOperator(updateManyMutably),
|
||
- upsertOne: createStateOperator(upsertOneMutably),
|
||
- upsertMany: createStateOperator(upsertManyMutably),
|
||
- removeOne: createStateOperator(removeOneMutably),
|
||
- removeMany: createStateOperator(removeManyMutably)
|
||
- };
|
||
- }
|
||
- // src/entities/sorted_state_adapter.ts
|
||
- function createSortedStateAdapter(selectId, sort) {
|
||
- var _b = createUnsortedStateAdapter(selectId), removeOne = _b.removeOne, removeMany = _b.removeMany, removeAll = _b.removeAll;
|
||
- function addOneMutably(entity, state) {
|
||
- return addManyMutably([entity], state);
|
||
- }
|
||
- function addManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); });
|
||
- if (models.length !== 0) {
|
||
- merge(models, state);
|
||
- }
|
||
- }
|
||
- function setOneMutably(entity, state) {
|
||
- return setManyMutably([entity], state);
|
||
- }
|
||
- function setManyMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- if (newEntities.length !== 0) {
|
||
- merge(newEntities, state);
|
||
- }
|
||
- }
|
||
- function setAllMutably(newEntities, state) {
|
||
- newEntities = ensureEntitiesArray(newEntities);
|
||
- state.entities = {};
|
||
- state.ids = [];
|
||
- addManyMutably(newEntities, state);
|
||
- }
|
||
- function updateOneMutably(update, state) {
|
||
- return updateManyMutably([update], state);
|
||
- }
|
||
- function takeUpdatedModel(models, update, state) {
|
||
- if (!(update.id in state.entities)) {
|
||
- return false;
|
||
- }
|
||
- var original = state.entities[update.id];
|
||
- var updated = Object.assign({}, original, update.changes);
|
||
- var newKey = selectIdValue(updated, selectId);
|
||
- delete state.entities[update.id];
|
||
- models.push(updated);
|
||
- return newKey !== update.id;
|
||
- }
|
||
- function updateManyMutably(updates, state) {
|
||
- var models = [];
|
||
- updates.forEach(function (update) { return takeUpdatedModel(models, update, state); });
|
||
- if (models.length !== 0) {
|
||
- merge(models, state);
|
||
- }
|
||
- }
|
||
- function upsertOneMutably(entity, state) {
|
||
- return upsertManyMutably([entity], state);
|
||
- }
|
||
- function upsertManyMutably(newEntities, state) {
|
||
- var _b = splitAddedUpdatedEntities(newEntities, selectId, state), added = _b[0], updated = _b[1];
|
||
- updateManyMutably(updated, state);
|
||
- addManyMutably(added, state);
|
||
- }
|
||
- function areArraysEqual(a2, b2) {
|
||
- if (a2.length !== b2.length) {
|
||
- return false;
|
||
- }
|
||
- for (var i2 = 0; i2 < a2.length && i2 < b2.length; i2++) {
|
||
- if (a2[i2] === b2[i2]) {
|
||
- continue;
|
||
- }
|
||
- return false;
|
||
- }
|
||
- return true;
|
||
- }
|
||
- function merge(models, state) {
|
||
- models.forEach(function (model) {
|
||
- state.entities[selectId(model)] = model;
|
||
- });
|
||
- var allEntities = Object.values(state.entities);
|
||
- allEntities.sort(sort);
|
||
- var newSortedIds = allEntities.map(selectId);
|
||
- var ids = state.ids;
|
||
- if (!areArraysEqual(ids, newSortedIds)) {
|
||
- state.ids = newSortedIds;
|
||
- }
|
||
- }
|
||
- return {
|
||
- removeOne: removeOne,
|
||
- removeMany: removeMany,
|
||
- removeAll: removeAll,
|
||
- addOne: createStateOperator(addOneMutably),
|
||
- updateOne: createStateOperator(updateOneMutably),
|
||
- upsertOne: createStateOperator(upsertOneMutably),
|
||
- setOne: createStateOperator(setOneMutably),
|
||
- setMany: createStateOperator(setManyMutably),
|
||
- setAll: createStateOperator(setAllMutably),
|
||
- addMany: createStateOperator(addManyMutably),
|
||
- updateMany: createStateOperator(updateManyMutably),
|
||
- upsertMany: createStateOperator(upsertManyMutably)
|
||
- };
|
||
- }
|
||
- // src/entities/create_adapter.ts
|
||
- function createEntityAdapter(options) {
|
||
- if (options === void 0) { options = {}; }
|
||
- var _b = __spreadValues({
|
||
- sortComparer: false,
|
||
- selectId: function (instance) { return instance.id; }
|
||
- }, options), selectId = _b.selectId, sortComparer = _b.sortComparer;
|
||
- var stateFactory = createInitialStateFactory();
|
||
- var selectorsFactory = createSelectorsFactory();
|
||
- var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId);
|
||
- return __spreadValues(__spreadValues(__spreadValues({
|
||
- selectId: selectId,
|
||
- sortComparer: sortComparer
|
||
- }, stateFactory), selectorsFactory), stateAdapter);
|
||
- }
|
||
- // src/nanoid.ts
|
||
- var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";
|
||
- var nanoid = function (size) {
|
||
- if (size === void 0) { size = 21; }
|
||
- var id = "";
|
||
- var i2 = size;
|
||
- while (i2--) {
|
||
- id += urlAlphabet[Math.random() * 64 | 0];
|
||
- }
|
||
- return id;
|
||
- };
|
||
- // src/createAsyncThunk.ts
|
||
- var commonProperties = [
|
||
- "name",
|
||
- "message",
|
||
- "stack",
|
||
- "code"
|
||
- ];
|
||
- var RejectWithValue = /** @class */ (function () {
|
||
- function RejectWithValue(payload, meta) {
|
||
- this.payload = payload;
|
||
- this.meta = meta;
|
||
- }
|
||
- return RejectWithValue;
|
||
- }());
|
||
- var FulfillWithMeta = /** @class */ (function () {
|
||
- function FulfillWithMeta(payload, meta) {
|
||
- this.payload = payload;
|
||
- this.meta = meta;
|
||
- }
|
||
- return FulfillWithMeta;
|
||
- }());
|
||
- var miniSerializeError = function (value) {
|
||
- if (typeof value === "object" && value !== null) {
|
||
- var simpleError = {};
|
||
- for (var _b = 0, commonProperties_1 = commonProperties; _b < commonProperties_1.length; _b++) {
|
||
- var property = commonProperties_1[_b];
|
||
- if (typeof value[property] === "string") {
|
||
- simpleError[property] = value[property];
|
||
- }
|
||
- }
|
||
- return simpleError;
|
||
- }
|
||
- return { message: String(value) };
|
||
- };
|
||
- function createAsyncThunk(typePrefix, payloadCreator, options) {
|
||
- var fulfilled = createAction(typePrefix + "/fulfilled", function (payload, requestId, arg, meta) { return ({
|
||
- payload: payload,
|
||
- meta: __spreadProps(__spreadValues({}, meta || {}), {
|
||
- arg: arg,
|
||
- requestId: requestId,
|
||
- requestStatus: "fulfilled"
|
||
- })
|
||
- }); });
|
||
- var pending = createAction(typePrefix + "/pending", function (requestId, arg, meta) { return ({
|
||
- payload: void 0,
|
||
- meta: __spreadProps(__spreadValues({}, meta || {}), {
|
||
- arg: arg,
|
||
- requestId: requestId,
|
||
- requestStatus: "pending"
|
||
- })
|
||
- }); });
|
||
- var rejected = createAction(typePrefix + "/rejected", function (error, requestId, arg, payload, meta) { return ({
|
||
- payload: payload,
|
||
- error: (options && options.serializeError || miniSerializeError)(error || "Rejected"),
|
||
- meta: __spreadProps(__spreadValues({}, meta || {}), {
|
||
- arg: arg,
|
||
- requestId: requestId,
|
||
- rejectedWithValue: !!payload,
|
||
- requestStatus: "rejected",
|
||
- aborted: (error == null ? void 0 : error.name) === "AbortError",
|
||
- condition: (error == null ? void 0 : error.name) === "ConditionError"
|
||
- })
|
||
- }); });
|
||
- var displayedWarning = false;
|
||
- var AC = typeof AbortController !== "undefined" ? AbortController : /** @class */ (function () {
|
||
- function class_1() {
|
||
- this.signal = {
|
||
- aborted: false,
|
||
- addEventListener: function () {
|
||
- },
|
||
- dispatchEvent: function () {
|
||
- return false;
|
||
- },
|
||
- onabort: function () {
|
||
- },
|
||
- removeEventListener: function () {
|
||
- }
|
||
- };
|
||
- }
|
||
- class_1.prototype.abort = function () {
|
||
- {
|
||
- if (!displayedWarning) {
|
||
- displayedWarning = true;
|
||
- console.info("This platform does not implement AbortController. \nIf you want to use the AbortController to react to `abort` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.");
|
||
- }
|
||
- }
|
||
- };
|
||
- return class_1;
|
||
- }());
|
||
- function actionCreator(arg) {
|
||
- return function (dispatch, getState, extra) {
|
||
- var _a;
|
||
- var requestId = ((_a = options == null ? void 0 : options.idGenerator) != null ? _a : nanoid)();
|
||
- var abortController = new AC();
|
||
- var abortReason;
|
||
- var abortedPromise = new Promise(function (_2, reject) { return abortController.signal.addEventListener("abort", function () { return reject({ name: "AbortError", message: abortReason || "Aborted" }); }); });
|
||
- var started = false;
|
||
- function abort(reason) {
|
||
- if (started) {
|
||
- abortReason = reason;
|
||
- abortController.abort();
|
||
- }
|
||
- }
|
||
- var promise = function () {
|
||
- return __async(this, null, function () {
|
||
- var _a2, finalAction, err_1, skipDispatch;
|
||
- return __generator(this, function (_b) {
|
||
- switch (_b.label) {
|
||
- case 0:
|
||
- _b.trys.push([0, 2, , 3]);
|
||
- if (options && options.condition && options.condition(arg, { getState: getState, extra: extra }) === false) {
|
||
- throw {
|
||
- name: "ConditionError",
|
||
- message: "Aborted due to condition callback returning false."
|
||
- };
|
||
- }
|
||
- started = true;
|
||
- dispatch(pending(requestId, arg, (_a2 = options == null ? void 0 : options.getPendingMeta) == null ? void 0 : _a2.call(options, { requestId: requestId, arg: arg }, { getState: getState, extra: extra })));
|
||
- return [4 /*yield*/, Promise.race([
|
||
- abortedPromise,
|
||
- Promise.resolve(payloadCreator(arg, {
|
||
- dispatch: dispatch,
|
||
- getState: getState,
|
||
- extra: extra,
|
||
- requestId: requestId,
|
||
- signal: abortController.signal,
|
||
- rejectWithValue: function (value, meta) {
|
||
- return new RejectWithValue(value, meta);
|
||
- },
|
||
- fulfillWithValue: function (value, meta) {
|
||
- return new FulfillWithMeta(value, meta);
|
||
- }
|
||
- })).then(function (result) {
|
||
- if (result instanceof RejectWithValue) {
|
||
- throw result;
|
||
- }
|
||
- if (result instanceof FulfillWithMeta) {
|
||
- return fulfilled(result.payload, requestId, arg, result.meta);
|
||
- }
|
||
- return fulfilled(result, requestId, arg);
|
||
- })
|
||
- ])];
|
||
- case 1:
|
||
- finalAction = _b.sent();
|
||
- return [3 /*break*/, 3];
|
||
- case 2:
|
||
- err_1 = _b.sent();
|
||
- finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg);
|
||
- return [3 /*break*/, 3];
|
||
- case 3:
|
||
- skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;
|
||
- if (!skipDispatch) {
|
||
- dispatch(finalAction);
|
||
- }
|
||
- return [2 /*return*/, finalAction];
|
||
- }
|
||
- });
|
||
- });
|
||
- }();
|
||
- return Object.assign(promise, {
|
||
- abort: abort,
|
||
- requestId: requestId,
|
||
- arg: arg,
|
||
- unwrap: function () {
|
||
- return promise.then(unwrapResult);
|
||
- }
|
||
- });
|
||
- };
|
||
- }
|
||
- return Object.assign(actionCreator, {
|
||
- pending: pending,
|
||
- rejected: rejected,
|
||
- fulfilled: fulfilled,
|
||
- typePrefix: typePrefix
|
||
- });
|
||
- }
|
||
- function unwrapResult(action) {
|
||
- if (action.meta && action.meta.rejectedWithValue) {
|
||
- throw action.payload;
|
||
- }
|
||
- if (action.error) {
|
||
- throw action.error;
|
||
- }
|
||
- return action.payload;
|
||
- }
|
||
- // src/tsHelpers.ts
|
||
- var hasMatchFunction = function (v2) {
|
||
- return v2 && typeof v2.match === "function";
|
||
- };
|
||
- // src/matchers.ts
|
||
- var matches = function (matcher, action) {
|
||
- if (hasMatchFunction(matcher)) {
|
||
- return matcher.match(action);
|
||
- }
|
||
- else {
|
||
- return matcher(action);
|
||
- }
|
||
- };
|
||
- function isAnyOf() {
|
||
- var matchers = [];
|
||
- for (var _b = 0; _b < arguments.length; _b++) {
|
||
- matchers[_b] = arguments[_b];
|
||
- }
|
||
- return function (action) {
|
||
- return matchers.some(function (matcher) { return matches(matcher, action); });
|
||
- };
|
||
- }
|
||
- function isAllOf() {
|
||
- var matchers = [];
|
||
- for (var _b = 0; _b < arguments.length; _b++) {
|
||
- matchers[_b] = arguments[_b];
|
||
- }
|
||
- return function (action) {
|
||
- return matchers.every(function (matcher) { return matches(matcher, action); });
|
||
- };
|
||
- }
|
||
- function hasExpectedRequestMetadata(action, validStatus) {
|
||
- if (!action || !action.meta)
|
||
- return false;
|
||
- var hasValidRequestId = typeof action.meta.requestId === "string";
|
||
- var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;
|
||
- return hasValidRequestId && hasValidRequestStatus;
|
||
- }
|
||
- function isAsyncThunkArray(a2) {
|
||
- return typeof a2[0] === "function" && "pending" in a2[0] && "fulfilled" in a2[0] && "rejected" in a2[0];
|
||
- }
|
||
- function isPending() {
|
||
- var asyncThunks = [];
|
||
- for (var _b = 0; _b < arguments.length; _b++) {
|
||
- asyncThunks[_b] = arguments[_b];
|
||
- }
|
||
- if (asyncThunks.length === 0) {
|
||
- return function (action) { return hasExpectedRequestMetadata(action, ["pending"]); };
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isPending()(asyncThunks[0]);
|
||
- }
|
||
- return function (action) {
|
||
- var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; });
|
||
- var combinedMatcher = isAnyOf.apply(void 0, matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
- }
|
||
- function isRejected() {
|
||
- var asyncThunks = [];
|
||
- for (var _b = 0; _b < arguments.length; _b++) {
|
||
- asyncThunks[_b] = arguments[_b];
|
||
- }
|
||
- if (asyncThunks.length === 0) {
|
||
- return function (action) { return hasExpectedRequestMetadata(action, ["rejected"]); };
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isRejected()(asyncThunks[0]);
|
||
- }
|
||
- return function (action) {
|
||
- var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; });
|
||
- var combinedMatcher = isAnyOf.apply(void 0, matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
- }
|
||
- function isRejectedWithValue() {
|
||
- var asyncThunks = [];
|
||
- for (var _b = 0; _b < arguments.length; _b++) {
|
||
- asyncThunks[_b] = arguments[_b];
|
||
- }
|
||
- var hasFlag = function (action) {
|
||
- return action && action.meta && action.meta.rejectedWithValue;
|
||
- };
|
||
- if (asyncThunks.length === 0) {
|
||
- return function (action) {
|
||
- var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isRejectedWithValue()(asyncThunks[0]);
|
||
- }
|
||
- return function (action) {
|
||
- var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
- }
|
||
- function isFulfilled() {
|
||
- var asyncThunks = [];
|
||
- for (var _b = 0; _b < arguments.length; _b++) {
|
||
- asyncThunks[_b] = arguments[_b];
|
||
- }
|
||
- if (asyncThunks.length === 0) {
|
||
- return function (action) { return hasExpectedRequestMetadata(action, ["fulfilled"]); };
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isFulfilled()(asyncThunks[0]);
|
||
- }
|
||
- return function (action) {
|
||
- var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; });
|
||
- var combinedMatcher = isAnyOf.apply(void 0, matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
- }
|
||
- function isAsyncThunkAction() {
|
||
- var asyncThunks = [];
|
||
- for (var _b = 0; _b < arguments.length; _b++) {
|
||
- asyncThunks[_b] = arguments[_b];
|
||
- }
|
||
- if (asyncThunks.length === 0) {
|
||
- return function (action) { return hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]); };
|
||
- }
|
||
- if (!isAsyncThunkArray(asyncThunks)) {
|
||
- return isAsyncThunkAction()(asyncThunks[0]);
|
||
- }
|
||
- return function (action) {
|
||
- var matchers = [];
|
||
- for (var _b = 0, asyncThunks_1 = asyncThunks; _b < asyncThunks_1.length; _b++) {
|
||
- var asyncThunk = asyncThunks_1[_b];
|
||
- matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled);
|
||
- }
|
||
- var combinedMatcher = isAnyOf.apply(void 0, matchers);
|
||
- return combinedMatcher(action);
|
||
- };
|
||
- }
|
||
- // src/index.ts
|
||
- N();
|
||
-
|
||
- exports.MiddlewareArray = MiddlewareArray;
|
||
- exports.__DO_NOT_USE__ActionTypes = ActionTypes;
|
||
- exports.applyMiddleware = applyMiddleware;
|
||
- exports.bindActionCreators = bindActionCreators;
|
||
- exports.combineReducers = combineReducers;
|
||
- exports.compose = compose;
|
||
- exports.configureStore = configureStore;
|
||
- exports.createAction = createAction;
|
||
- exports.createAsyncThunk = createAsyncThunk;
|
||
- exports.createDraftSafeSelector = createDraftSafeSelector;
|
||
- exports.createEntityAdapter = createEntityAdapter;
|
||
- exports.createImmutableStateInvariantMiddleware = createImmutableStateInvariantMiddleware;
|
||
- exports.createNextState = immer_esm_default;
|
||
- exports.createReducer = createReducer;
|
||
- exports.createSelector = createSelector;
|
||
- exports.createSerializableStateInvariantMiddleware = createSerializableStateInvariantMiddleware;
|
||
- exports.createSlice = createSlice;
|
||
- exports.createStore = createStore;
|
||
- exports.current = D;
|
||
- exports.findNonSerializableValue = findNonSerializableValue;
|
||
- exports.freeze = d;
|
||
- exports.getDefaultMiddleware = getDefaultMiddleware;
|
||
- exports.getType = getType;
|
||
- exports.isAllOf = isAllOf;
|
||
- exports.isAnyOf = isAnyOf;
|
||
- exports.isAsyncThunkAction = isAsyncThunkAction;
|
||
- exports.isDraft = t;
|
||
- exports.isFulfilled = isFulfilled;
|
||
- exports.isImmutableDefault = isImmutableDefault;
|
||
- exports.isPending = isPending;
|
||
- exports.isPlain = isPlain;
|
||
- exports.isPlainObject = isPlainObject2;
|
||
- exports.isRejected = isRejected;
|
||
- exports.isRejectedWithValue = isRejectedWithValue;
|
||
- exports.miniSerializeError = miniSerializeError;
|
||
- exports.nanoid = nanoid;
|
||
- exports.original = e;
|
||
- exports.unwrapResult = unwrapResult;
|
||
-
|
||
- Object.defineProperty(exports, '__esModule', { value: true });
|
||
-
|
||
-})));
|
||
-//# sourceMappingURL=redux-toolkit.umd.js.map
|
||
diff --git a/dist/redux-toolkit.umd.js.map b/dist/redux-toolkit.umd.js.map
|
||
deleted file mode 100644
|
||
index 93dd9469cd57dcec0960a05e31b293556afd5718..0000000000000000000000000000000000000000
|
||
--- a/dist/redux-toolkit.umd.js.map
|
||
+++ /dev/null
|
||
@@ -1 +0,0 @@
|
||
-{"version":3,"file":"redux-toolkit.umd.js","sources":["redux-toolkit.umd.js"],"sourcesContent":["var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n};\r\nvar __defProp = Object.defineProperty;\r\nvar __defProps = Object.defineProperties;\r\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\r\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\r\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\r\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\r\nvar __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; };\r\nvar __spreadValues = function (a2, b2) {\r\n for (var prop in b2 || (b2 = {}))\r\n if (__hasOwnProp.call(b2, prop))\r\n __defNormalProp(a2, prop, b2[prop]);\r\n if (__getOwnPropSymbols)\r\n for (var _b = 0, _c = __getOwnPropSymbols(b2); _b < _c.length; _b++) {\r\n var prop = _c[_b];\r\n if (__propIsEnum.call(b2, prop))\r\n __defNormalProp(a2, prop, b2[prop]);\r\n }\r\n return a2;\r\n};\r\nvar __spreadProps = function (a2, b2) { return __defProps(a2, __getOwnPropDescs(b2)); };\r\nvar __async = function (__this, __arguments, generator) {\r\n return new Promise(function (resolve, reject) {\r\n var fulfilled = function (value) {\r\n try {\r\n step(generator.next(value));\r\n }\r\n catch (e2) {\r\n reject(e2);\r\n }\r\n };\r\n var rejected = function (value) {\r\n try {\r\n step(generator.throw(value));\r\n }\r\n catch (e2) {\r\n reject(e2);\r\n }\r\n };\r\n var step = function (x2) { return x2.done ? resolve(x2.value) : Promise.resolve(x2.value).then(fulfilled, rejected); };\r\n step((generator = generator.apply(__this, __arguments)).next());\r\n });\r\n};\r\n// ../../node_modules/immer/dist/immer.esm.js\r\nfunction n(n2) {\r\n for (var t2 = arguments.length, r2 = Array(t2 > 1 ? t2 - 1 : 0), e2 = 1; e2 < t2; e2++)\r\n r2[e2 - 1] = arguments[e2];\r\n if (true) {\r\n var i2 = Y[n2], o2 = i2 ? typeof i2 == \"function\" ? i2.apply(null, r2) : i2 : \"unknown error nr: \" + n2;\r\n throw Error(\"[Immer] \" + o2);\r\n }\r\n throw Error(\"[Immer] minified error nr: \" + n2 + (r2.length ? \" \" + r2.map(function (n3) {\r\n return \"'\" + n3 + \"'\";\r\n }).join(\",\") : \"\") + \". Find the full error at: https://bit.ly/3cXEKWf\");\r\n}\r\nfunction t(n2) {\r\n return !!n2 && !!n2[Q];\r\n}\r\nfunction r(n2) {\r\n return !!n2 && (function (n3) {\r\n if (!n3 || typeof n3 != \"object\")\r\n return false;\r\n var t2 = Object.getPrototypeOf(n3);\r\n if (t2 === null)\r\n return true;\r\n var r2 = Object.hasOwnProperty.call(t2, \"constructor\") && t2.constructor;\r\n return r2 === Object || typeof r2 == \"function\" && Function.toString.call(r2) === Z;\r\n }(n2) || Array.isArray(n2) || !!n2[L] || !!n2.constructor[L] || s(n2) || v(n2));\r\n}\r\nfunction e(r2) {\r\n return t(r2) || n(23, r2), r2[Q].t;\r\n}\r\nfunction i(n2, t2, r2) {\r\n r2 === void 0 && (r2 = false), o(n2) === 0 ? (r2 ? Object.keys : nn)(n2).forEach(function (e2) {\r\n r2 && typeof e2 == \"symbol\" || t2(e2, n2[e2], n2);\r\n }) : n2.forEach(function (r3, e2) {\r\n return t2(e2, r3, n2);\r\n });\r\n}\r\nfunction o(n2) {\r\n var t2 = n2[Q];\r\n return t2 ? t2.i > 3 ? t2.i - 4 : t2.i : Array.isArray(n2) ? 1 : s(n2) ? 2 : v(n2) ? 3 : 0;\r\n}\r\nfunction u(n2, t2) {\r\n return o(n2) === 2 ? n2.has(t2) : Object.prototype.hasOwnProperty.call(n2, t2);\r\n}\r\nfunction a(n2, t2) {\r\n return o(n2) === 2 ? n2.get(t2) : n2[t2];\r\n}\r\nfunction f(n2, t2, r2) {\r\n var e2 = o(n2);\r\n e2 === 2 ? n2.set(t2, r2) : e2 === 3 ? (n2.delete(t2), n2.add(r2)) : n2[t2] = r2;\r\n}\r\nfunction c(n2, t2) {\r\n return n2 === t2 ? n2 !== 0 || 1 / n2 == 1 / t2 : n2 != n2 && t2 != t2;\r\n}\r\nfunction s(n2) {\r\n return X && n2 instanceof Map;\r\n}\r\nfunction v(n2) {\r\n return q && n2 instanceof Set;\r\n}\r\nfunction p(n2) {\r\n return n2.o || n2.t;\r\n}\r\nfunction l(n2) {\r\n if (Array.isArray(n2))\r\n return Array.prototype.slice.call(n2);\r\n var t2 = tn(n2);\r\n delete t2[Q];\r\n for (var r2 = nn(t2), e2 = 0; e2 < r2.length; e2++) {\r\n var i2 = r2[e2], o2 = t2[i2];\r\n o2.writable === false && (o2.writable = true, o2.configurable = true), (o2.get || o2.set) && (t2[i2] = { configurable: true, writable: true, enumerable: o2.enumerable, value: n2[i2] });\r\n }\r\n return Object.create(Object.getPrototypeOf(n2), t2);\r\n}\r\nfunction d(n2, e2) {\r\n return e2 === void 0 && (e2 = false), y(n2) || t(n2) || !r(n2) ? n2 : (o(n2) > 1 && (n2.set = n2.add = n2.clear = n2.delete = h), Object.freeze(n2), e2 && i(n2, function (n3, t2) {\r\n return d(t2, true);\r\n }, true), n2);\r\n}\r\nfunction h() {\r\n n(2);\r\n}\r\nfunction y(n2) {\r\n return n2 == null || typeof n2 != \"object\" || Object.isFrozen(n2);\r\n}\r\nfunction b(t2) {\r\n var r2 = rn[t2];\r\n return r2 || n(18, t2), r2;\r\n}\r\nfunction m(n2, t2) {\r\n rn[n2] || (rn[n2] = t2);\r\n}\r\nfunction _() {\r\n return U || n(0), U;\r\n}\r\nfunction j(n2, t2) {\r\n t2 && (b(\"Patches\"), n2.u = [], n2.s = [], n2.v = t2);\r\n}\r\nfunction O(n2) {\r\n g(n2), n2.p.forEach(S), n2.p = null;\r\n}\r\nfunction g(n2) {\r\n n2 === U && (U = n2.l);\r\n}\r\nfunction w(n2) {\r\n return U = { p: [], l: U, h: n2, m: true, _: 0 };\r\n}\r\nfunction S(n2) {\r\n var t2 = n2[Q];\r\n t2.i === 0 || t2.i === 1 ? t2.j() : t2.O = true;\r\n}\r\nfunction P(t2, e2) {\r\n e2._ = e2.p.length;\r\n var i2 = e2.p[0], o2 = t2 !== void 0 && t2 !== i2;\r\n return e2.h.g || b(\"ES5\").S(e2, t2, o2), o2 ? (i2[Q].P && (O(e2), n(4)), r(t2) && (t2 = M(e2, t2), e2.l || x(e2, t2)), e2.u && b(\"Patches\").M(i2[Q], t2, e2.u, e2.s)) : t2 = M(e2, i2, []), O(e2), e2.u && e2.v(e2.u, e2.s), t2 !== H ? t2 : void 0;\r\n}\r\nfunction M(n2, t2, r2) {\r\n if (y(t2))\r\n return t2;\r\n var e2 = t2[Q];\r\n if (!e2)\r\n return i(t2, function (i2, o3) {\r\n return A(n2, e2, t2, i2, o3, r2);\r\n }, true), t2;\r\n if (e2.A !== n2)\r\n return t2;\r\n if (!e2.P)\r\n return x(n2, e2.t, true), e2.t;\r\n if (!e2.I) {\r\n e2.I = true, e2.A._--;\r\n var o2 = e2.i === 4 || e2.i === 5 ? e2.o = l(e2.k) : e2.o;\r\n i(e2.i === 3 ? new Set(o2) : o2, function (t3, i2) {\r\n return A(n2, e2, o2, t3, i2, r2);\r\n }), x(n2, o2, false), r2 && n2.u && b(\"Patches\").R(e2, r2, n2.u, n2.s);\r\n }\r\n return e2.o;\r\n}\r\nfunction A(e2, i2, o2, a2, c2, s2) {\r\n if (c2 === o2 && n(5), t(c2)) {\r\n var v2 = M(e2, c2, s2 && i2 && i2.i !== 3 && !u(i2.D, a2) ? s2.concat(a2) : void 0);\r\n if (f(o2, a2, v2), !t(v2))\r\n return;\r\n e2.m = false;\r\n }\r\n if (r(c2) && !y(c2)) {\r\n if (!e2.h.F && e2._ < 1)\r\n return;\r\n M(e2, c2), i2 && i2.A.l || x(e2, c2);\r\n }\r\n}\r\nfunction x(n2, t2, r2) {\r\n r2 === void 0 && (r2 = false), n2.h.F && n2.m && d(t2, r2);\r\n}\r\nfunction z(n2, t2) {\r\n var r2 = n2[Q];\r\n return (r2 ? p(r2) : n2)[t2];\r\n}\r\nfunction I(n2, t2) {\r\n if (t2 in n2)\r\n for (var r2 = Object.getPrototypeOf(n2); r2;) {\r\n var e2 = Object.getOwnPropertyDescriptor(r2, t2);\r\n if (e2)\r\n return e2;\r\n r2 = Object.getPrototypeOf(r2);\r\n }\r\n}\r\nfunction k(n2) {\r\n n2.P || (n2.P = true, n2.l && k(n2.l));\r\n}\r\nfunction E(n2) {\r\n n2.o || (n2.o = l(n2.t));\r\n}\r\nfunction R(n2, t2, r2) {\r\n var e2 = s(t2) ? b(\"MapSet\").N(t2, r2) : v(t2) ? b(\"MapSet\").T(t2, r2) : n2.g ? function (n3, t3) {\r\n var r3 = Array.isArray(n3), e3 = { i: r3 ? 1 : 0, A: t3 ? t3.A : _(), P: false, I: false, D: {}, l: t3, t: n3, k: null, o: null, j: null, C: false }, i2 = e3, o2 = en;\r\n r3 && (i2 = [e3], o2 = on);\r\n var u2 = Proxy.revocable(i2, o2), a2 = u2.revoke, f2 = u2.proxy;\r\n return e3.k = f2, e3.j = a2, f2;\r\n }(t2, r2) : b(\"ES5\").J(t2, r2);\r\n return (r2 ? r2.A : _()).p.push(e2), e2;\r\n}\r\nfunction D(e2) {\r\n return t(e2) || n(22, e2), function n2(t2) {\r\n if (!r(t2))\r\n return t2;\r\n var e3, u2 = t2[Q], c2 = o(t2);\r\n if (u2) {\r\n if (!u2.P && (u2.i < 4 || !b(\"ES5\").K(u2)))\r\n return u2.t;\r\n u2.I = true, e3 = F(t2, c2), u2.I = false;\r\n }\r\n else\r\n e3 = F(t2, c2);\r\n return i(e3, function (t3, r2) {\r\n u2 && a(u2.t, t3) === r2 || f(e3, t3, n2(r2));\r\n }), c2 === 3 ? new Set(e3) : e3;\r\n }(e2);\r\n}\r\nfunction F(n2, t2) {\r\n switch (t2) {\r\n case 2:\r\n return new Map(n2);\r\n case 3:\r\n return Array.from(n2);\r\n }\r\n return l(n2);\r\n}\r\nfunction N() {\r\n function r2(n2, t2) {\r\n var r3 = s2[n2];\r\n return r3 ? r3.enumerable = t2 : s2[n2] = r3 = { configurable: true, enumerable: t2, get: function () {\r\n var t3 = this[Q];\r\n return f2(t3), en.get(t3, n2);\r\n }, set: function (t3) {\r\n var r4 = this[Q];\r\n f2(r4), en.set(r4, n2, t3);\r\n } }, r3;\r\n }\r\n function e2(n2) {\r\n for (var t2 = n2.length - 1; t2 >= 0; t2--) {\r\n var r3 = n2[t2][Q];\r\n if (!r3.P)\r\n switch (r3.i) {\r\n case 5:\r\n a2(r3) && k(r3);\r\n break;\r\n case 4:\r\n o2(r3) && k(r3);\r\n }\r\n }\r\n }\r\n function o2(n2) {\r\n for (var t2 = n2.t, r3 = n2.k, e3 = nn(r3), i2 = e3.length - 1; i2 >= 0; i2--) {\r\n var o3 = e3[i2];\r\n if (o3 !== Q) {\r\n var a3 = t2[o3];\r\n if (a3 === void 0 && !u(t2, o3))\r\n return true;\r\n var f3 = r3[o3], s3 = f3 && f3[Q];\r\n if (s3 ? s3.t !== a3 : !c(f3, a3))\r\n return true;\r\n }\r\n }\r\n var v2 = !!t2[Q];\r\n return e3.length !== nn(t2).length + (v2 ? 0 : 1);\r\n }\r\n function a2(n2) {\r\n var t2 = n2.k;\r\n if (t2.length !== n2.t.length)\r\n return true;\r\n var r3 = Object.getOwnPropertyDescriptor(t2, t2.length - 1);\r\n return !(!r3 || r3.get);\r\n }\r\n function f2(t2) {\r\n t2.O && n(3, JSON.stringify(p(t2)));\r\n }\r\n var s2 = {};\r\n m(\"ES5\", { J: function (n2, t2) {\r\n var e3 = Array.isArray(n2), i2 = function (n3, t3) {\r\n if (n3) {\r\n for (var e4 = Array(t3.length), i3 = 0; i3 < t3.length; i3++)\r\n Object.defineProperty(e4, \"\" + i3, r2(i3, true));\r\n return e4;\r\n }\r\n var o4 = tn(t3);\r\n delete o4[Q];\r\n for (var u2 = nn(o4), a3 = 0; a3 < u2.length; a3++) {\r\n var f3 = u2[a3];\r\n o4[f3] = r2(f3, n3 || !!o4[f3].enumerable);\r\n }\r\n return Object.create(Object.getPrototypeOf(t3), o4);\r\n }(e3, n2), o3 = { i: e3 ? 5 : 4, A: t2 ? t2.A : _(), P: false, I: false, D: {}, l: t2, t: n2, k: i2, o: null, O: false, C: false };\r\n return Object.defineProperty(i2, Q, { value: o3, writable: true }), i2;\r\n }, S: function (n2, r3, o3) {\r\n o3 ? t(r3) && r3[Q].A === n2 && e2(n2.p) : (n2.u && function n3(t2) {\r\n if (t2 && typeof t2 == \"object\") {\r\n var r4 = t2[Q];\r\n if (r4) {\r\n var e3 = r4.t, o4 = r4.k, f3 = r4.D, c2 = r4.i;\r\n if (c2 === 4)\r\n i(o4, function (t3) {\r\n t3 !== Q && (e3[t3] !== void 0 || u(e3, t3) ? f3[t3] || n3(o4[t3]) : (f3[t3] = true, k(r4)));\r\n }), i(e3, function (n4) {\r\n o4[n4] !== void 0 || u(o4, n4) || (f3[n4] = false, k(r4));\r\n });\r\n else if (c2 === 5) {\r\n if (a2(r4) && (k(r4), f3.length = true), o4.length < e3.length)\r\n for (var s3 = o4.length; s3 < e3.length; s3++)\r\n f3[s3] = false;\r\n else\r\n for (var v2 = e3.length; v2 < o4.length; v2++)\r\n f3[v2] = true;\r\n for (var p2 = Math.min(o4.length, e3.length), l2 = 0; l2 < p2; l2++)\r\n f3[l2] === void 0 && n3(o4[l2]);\r\n }\r\n }\r\n }\r\n }(n2.p[0]), e2(n2.p));\r\n }, K: function (n2) {\r\n return n2.i === 4 ? o2(n2) : a2(n2);\r\n } });\r\n}\r\nvar G;\r\nvar U;\r\nvar W = typeof Symbol != \"undefined\" && typeof Symbol(\"x\") == \"symbol\";\r\nvar X = typeof Map != \"undefined\";\r\nvar q = typeof Set != \"undefined\";\r\nvar B = typeof Proxy != \"undefined\" && Proxy.revocable !== void 0 && typeof Reflect != \"undefined\";\r\nvar H = W ? Symbol.for(\"immer-nothing\") : ((G = {})[\"immer-nothing\"] = true, G);\r\nvar L = W ? Symbol.for(\"immer-draftable\") : \"__$immer_draftable\";\r\nvar Q = W ? Symbol.for(\"immer-state\") : \"__$immer_state\";\r\nvar V = typeof Symbol != \"undefined\" && Symbol.iterator || \"@@iterator\";\r\nvar Y = { 0: \"Illegal state\", 1: \"Immer drafts cannot have computed properties\", 2: \"This object has been frozen and should not be mutated\", 3: function (n2) {\r\n return \"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? \" + n2;\r\n }, 4: \"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.\", 5: \"Immer forbids circular references\", 6: \"The first or second argument to `produce` must be a function\", 7: \"The third argument to `produce` must be a function or undefined\", 8: \"First argument to `createDraft` must be a plain object, an array, or an immerable object\", 9: \"First argument to `finishDraft` must be a draft returned by `createDraft`\", 10: \"The given draft is already finalized\", 11: \"Object.defineProperty() cannot be used on an Immer draft\", 12: \"Object.setPrototypeOf() cannot be used on an Immer draft\", 13: \"Immer only supports deleting array indices\", 14: \"Immer only supports setting array indices and the 'length' property\", 15: function (n2) {\r\n return \"Cannot apply patch, path doesn't resolve: \" + n2;\r\n }, 16: 'Sets cannot have \"replace\" patches.', 17: function (n2) {\r\n return \"Unsupported patch operation: \" + n2;\r\n }, 18: function (n2) {\r\n return \"The plugin for '\" + n2 + \"' has not been loaded into Immer. To enable the plugin, import and call `enable\" + n2 + \"()` when initializing your application.\";\r\n }, 20: \"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available\", 21: function (n2) {\r\n return \"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '\" + n2 + \"'\";\r\n }, 22: function (n2) {\r\n return \"'current' expects a draft, got: \" + n2;\r\n }, 23: function (n2) {\r\n return \"'original' expects a draft, got: \" + n2;\r\n }, 24: \"Patching reserved attributes like __proto__, prototype and constructor is not allowed\" };\r\nvar Z = \"\" + Object.prototype.constructor;\r\nvar nn = typeof Reflect != \"undefined\" && Reflect.ownKeys ? Reflect.ownKeys : Object.getOwnPropertySymbols !== void 0 ? function (n2) {\r\n return Object.getOwnPropertyNames(n2).concat(Object.getOwnPropertySymbols(n2));\r\n} : Object.getOwnPropertyNames;\r\nvar tn = Object.getOwnPropertyDescriptors || function (n2) {\r\n var t2 = {};\r\n return nn(n2).forEach(function (r2) {\r\n t2[r2] = Object.getOwnPropertyDescriptor(n2, r2);\r\n }), t2;\r\n};\r\nvar rn = {};\r\nvar en = { get: function (n2, t2) {\r\n if (t2 === Q)\r\n return n2;\r\n var e2 = p(n2);\r\n if (!u(e2, t2))\r\n return function (n3, t3, r2) {\r\n var e3, i3 = I(t3, r2);\r\n return i3 ? \"value\" in i3 ? i3.value : (e3 = i3.get) === null || e3 === void 0 ? void 0 : e3.call(n3.k) : void 0;\r\n }(n2, e2, t2);\r\n var i2 = e2[t2];\r\n return n2.I || !r(i2) ? i2 : i2 === z(n2.t, t2) ? (E(n2), n2.o[t2] = R(n2.A.h, i2, n2)) : i2;\r\n }, has: function (n2, t2) {\r\n return t2 in p(n2);\r\n }, ownKeys: function (n2) {\r\n return Reflect.ownKeys(p(n2));\r\n }, set: function (n2, t2, r2) {\r\n var e2 = I(p(n2), t2);\r\n if (e2 == null ? void 0 : e2.set)\r\n return e2.set.call(n2.k, r2), true;\r\n if (!n2.P) {\r\n var i2 = z(p(n2), t2), o2 = i2 == null ? void 0 : i2[Q];\r\n if (o2 && o2.t === r2)\r\n return n2.o[t2] = r2, n2.D[t2] = false, true;\r\n if (c(r2, i2) && (r2 !== void 0 || u(n2.t, t2)))\r\n return true;\r\n E(n2), k(n2);\r\n }\r\n return n2.o[t2] === r2 && typeof r2 != \"number\" && (r2 !== void 0 || t2 in n2.o) || (n2.o[t2] = r2, n2.D[t2] = true, true);\r\n }, deleteProperty: function (n2, t2) {\r\n return z(n2.t, t2) !== void 0 || t2 in n2.t ? (n2.D[t2] = false, E(n2), k(n2)) : delete n2.D[t2], n2.o && delete n2.o[t2], true;\r\n }, getOwnPropertyDescriptor: function (n2, t2) {\r\n var r2 = p(n2), e2 = Reflect.getOwnPropertyDescriptor(r2, t2);\r\n return e2 ? { writable: true, configurable: n2.i !== 1 || t2 !== \"length\", enumerable: e2.enumerable, value: r2[t2] } : e2;\r\n }, defineProperty: function () {\r\n n(11);\r\n }, getPrototypeOf: function (n2) {\r\n return Object.getPrototypeOf(n2.t);\r\n }, setPrototypeOf: function () {\r\n n(12);\r\n } };\r\nvar on = {};\r\ni(en, function (n2, t2) {\r\n on[n2] = function () {\r\n return arguments[0] = arguments[0][0], t2.apply(this, arguments);\r\n };\r\n}), on.deleteProperty = function (t2, r2) {\r\n return isNaN(parseInt(r2)) && n(13), en.deleteProperty.call(this, t2[0], r2);\r\n}, on.set = function (t2, r2, e2) {\r\n return r2 !== \"length\" && isNaN(parseInt(r2)) && n(14), en.set.call(this, t2[0], r2, e2, t2[0]);\r\n};\r\nvar un = function () {\r\n function e2(t2) {\r\n var e3 = this;\r\n this.g = B, this.F = true, this.produce = function (t3, i3, o2) {\r\n if (typeof t3 == \"function\" && typeof i3 != \"function\") {\r\n var u2 = i3;\r\n i3 = t3;\r\n var a2 = e3;\r\n return function (n2) {\r\n var t4 = this;\r\n n2 === void 0 && (n2 = u2);\r\n for (var r2 = arguments.length, e4 = Array(r2 > 1 ? r2 - 1 : 0), o3 = 1; o3 < r2; o3++)\r\n e4[o3 - 1] = arguments[o3];\r\n return a2.produce(n2, function (n3) {\r\n var r3;\r\n return (r3 = i3).call.apply(r3, [t4, n3].concat(e4));\r\n });\r\n };\r\n }\r\n var f2;\r\n if (typeof i3 != \"function\" && n(6), o2 !== void 0 && typeof o2 != \"function\" && n(7), r(t3)) {\r\n var c2 = w(e3), s2 = R(e3, t3, void 0), v2 = true;\r\n try {\r\n f2 = i3(s2), v2 = false;\r\n }\r\n finally {\r\n v2 ? O(c2) : g(c2);\r\n }\r\n return typeof Promise != \"undefined\" && f2 instanceof Promise ? f2.then(function (n2) {\r\n return j(c2, o2), P(n2, c2);\r\n }, function (n2) {\r\n throw O(c2), n2;\r\n }) : (j(c2, o2), P(f2, c2));\r\n }\r\n if (!t3 || typeof t3 != \"object\") {\r\n if ((f2 = i3(t3)) === H)\r\n return;\r\n return f2 === void 0 && (f2 = t3), e3.F && d(f2, true), f2;\r\n }\r\n n(21, t3);\r\n }, this.produceWithPatches = function (n2, t3) {\r\n return typeof n2 == \"function\" ? function (t4) {\r\n for (var r3 = arguments.length, i4 = Array(r3 > 1 ? r3 - 1 : 0), o2 = 1; o2 < r3; o2++)\r\n i4[o2 - 1] = arguments[o2];\r\n return e3.produceWithPatches(t4, function (t5) {\r\n return n2.apply(void 0, [t5].concat(i4));\r\n });\r\n } : [e3.produce(n2, t3, function (n3, t4) {\r\n r2 = n3, i3 = t4;\r\n }), r2, i3];\r\n var r2, i3;\r\n }, typeof (t2 == null ? void 0 : t2.useProxies) == \"boolean\" && this.setUseProxies(t2.useProxies), typeof (t2 == null ? void 0 : t2.autoFreeze) == \"boolean\" && this.setAutoFreeze(t2.autoFreeze);\r\n }\r\n var i2 = e2.prototype;\r\n return i2.createDraft = function (e3) {\r\n r(e3) || n(8), t(e3) && (e3 = D(e3));\r\n var i3 = w(this), o2 = R(this, e3, void 0);\r\n return o2[Q].C = true, g(i3), o2;\r\n }, i2.finishDraft = function (t2, r2) {\r\n var e3 = t2 && t2[Q];\r\n e3 && e3.C || n(9), e3.I && n(10);\r\n var i3 = e3.A;\r\n return j(i3, r2), P(void 0, i3);\r\n }, i2.setAutoFreeze = function (n2) {\r\n this.F = n2;\r\n }, i2.setUseProxies = function (t2) {\r\n t2 && !B && n(20), this.g = t2;\r\n }, i2.applyPatches = function (n2, r2) {\r\n var e3;\r\n for (e3 = r2.length - 1; e3 >= 0; e3--) {\r\n var i3 = r2[e3];\r\n if (i3.path.length === 0 && i3.op === \"replace\") {\r\n n2 = i3.value;\r\n break;\r\n }\r\n }\r\n var o2 = b(\"Patches\").$;\r\n return t(n2) ? o2(n2, r2) : this.produce(n2, function (n3) {\r\n return o2(n3, r2.slice(e3 + 1));\r\n });\r\n }, e2;\r\n}();\r\nvar an = new un();\r\nvar fn = an.produce;\r\nvar cn = an.produceWithPatches.bind(an);\r\nvar sn = an.setAutoFreeze.bind(an);\r\nvar vn = an.setUseProxies.bind(an);\r\nvar pn = an.applyPatches.bind(an);\r\nvar ln = an.createDraft.bind(an);\r\nvar dn = an.finishDraft.bind(an);\r\nvar immer_esm_default = fn;\r\n// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js\r\nfunction _defineProperty(obj, key, value) {\r\n if (key in obj) {\r\n Object.defineProperty(obj, key, {\r\n value: value,\r\n enumerable: true,\r\n configurable: true,\r\n writable: true\r\n });\r\n }\r\n else {\r\n obj[key] = value;\r\n }\r\n return obj;\r\n}\r\n// ../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\r\nfunction ownKeys(object, enumerableOnly) {\r\n var keys = Object.keys(object);\r\n if (Object.getOwnPropertySymbols) {\r\n var symbols = Object.getOwnPropertySymbols(object);\r\n if (enumerableOnly) {\r\n symbols = symbols.filter(function (sym) {\r\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\r\n });\r\n }\r\n keys.push.apply(keys, symbols);\r\n }\r\n return keys;\r\n}\r\nfunction _objectSpread2(target) {\r\n for (var i2 = 1; i2 < arguments.length; i2++) {\r\n var source = arguments[i2] != null ? arguments[i2] : {};\r\n if (i2 % 2) {\r\n ownKeys(Object(source), true).forEach(function (key) {\r\n _defineProperty(target, key, source[key]);\r\n });\r\n }\r\n else if (Object.getOwnPropertyDescriptors) {\r\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\r\n }\r\n else {\r\n ownKeys(Object(source)).forEach(function (key) {\r\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\r\n });\r\n }\r\n }\r\n return target;\r\n}\r\n// ../../node_modules/redux/es/redux.js\r\nvar $$observable = function () {\r\n return typeof Symbol === \"function\" && Symbol.observable || \"@@observable\";\r\n}();\r\nvar randomString = function randomString2() {\r\n return Math.random().toString(36).substring(7).split(\"\").join(\".\");\r\n};\r\nvar ActionTypes = {\r\n INIT: \"@@redux/INIT\" + randomString(),\r\n REPLACE: \"@@redux/REPLACE\" + randomString(),\r\n PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {\r\n return \"@@redux/PROBE_UNKNOWN_ACTION\" + randomString();\r\n }\r\n};\r\nfunction isPlainObject(obj) {\r\n if (typeof obj !== \"object\" || obj === null)\r\n return false;\r\n var proto = obj;\r\n while (Object.getPrototypeOf(proto) !== null) {\r\n proto = Object.getPrototypeOf(proto);\r\n }\r\n return Object.getPrototypeOf(obj) === proto;\r\n}\r\nfunction kindOf(val) {\r\n var typeOfVal = typeof val;\r\n if (true) {\r\n var miniKindOf = function (val2) {\r\n if (val2 === void 0)\r\n return \"undefined\";\r\n if (val2 === null)\r\n return \"null\";\r\n var type = typeof val2;\r\n switch (type) {\r\n case \"boolean\":\r\n case \"string\":\r\n case \"number\":\r\n case \"symbol\":\r\n case \"function\": {\r\n return type;\r\n }\r\n }\r\n if (Array.isArray(val2))\r\n return \"array\";\r\n if (isDate_1(val2))\r\n return \"date\";\r\n if (isError_1(val2))\r\n return \"error\";\r\n var constructorName = ctorName_1(val2);\r\n switch (constructorName) {\r\n case \"Symbol\":\r\n case \"Promise\":\r\n case \"WeakMap\":\r\n case \"WeakSet\":\r\n case \"Map\":\r\n case \"Set\":\r\n return constructorName;\r\n }\r\n return type.slice(8, -1).toLowerCase().replace(/\\s/g, \"\");\r\n }, ctorName_1 = function (val2) {\r\n return typeof val2.constructor === \"function\" ? val2.constructor.name : null;\r\n }, isError_1 = function (val2) {\r\n return val2 instanceof Error || typeof val2.message === \"string\" && val2.constructor && typeof val2.constructor.stackTraceLimit === \"number\";\r\n }, isDate_1 = function (val2) {\r\n if (val2 instanceof Date)\r\n return true;\r\n return typeof val2.toDateString === \"function\" && typeof val2.getDate === \"function\" && typeof val2.setDate === \"function\";\r\n };\r\n typeOfVal = miniKindOf(val);\r\n }\r\n return typeOfVal;\r\n}\r\nfunction createStore(reducer, preloadedState, enhancer) {\r\n var _ref2;\r\n if (typeof preloadedState === \"function\" && typeof enhancer === \"function\" || typeof enhancer === \"function\" && typeof arguments[3] === \"function\") {\r\n throw new Error(false ? formatProdErrorMessage(0) : \"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.\");\r\n }\r\n if (typeof preloadedState === \"function\" && typeof enhancer === \"undefined\") {\r\n enhancer = preloadedState;\r\n preloadedState = void 0;\r\n }\r\n if (typeof enhancer !== \"undefined\") {\r\n if (typeof enhancer !== \"function\") {\r\n throw new Error(false ? formatProdErrorMessage(1) : \"Expected the enhancer to be a function. Instead, received: '\" + kindOf(enhancer) + \"'\");\r\n }\r\n return enhancer(createStore)(reducer, preloadedState);\r\n }\r\n if (typeof reducer !== \"function\") {\r\n throw new Error(false ? formatProdErrorMessage(2) : \"Expected the root reducer to be a function. Instead, received: '\" + kindOf(reducer) + \"'\");\r\n }\r\n var currentReducer = reducer;\r\n var currentState = preloadedState;\r\n var currentListeners = [];\r\n var nextListeners = currentListeners;\r\n var isDispatching = false;\r\n function ensureCanMutateNextListeners() {\r\n if (nextListeners === currentListeners) {\r\n nextListeners = currentListeners.slice();\r\n }\r\n }\r\n function getState() {\r\n if (isDispatching) {\r\n throw new Error(false ? formatProdErrorMessage(3) : \"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.\");\r\n }\r\n return currentState;\r\n }\r\n function subscribe(listener) {\r\n if (typeof listener !== \"function\") {\r\n throw new Error(false ? formatProdErrorMessage(4) : \"Expected the listener to be a function. Instead, received: '\" + kindOf(listener) + \"'\");\r\n }\r\n if (isDispatching) {\r\n throw new Error(false ? formatProdErrorMessage(5) : \"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.\");\r\n }\r\n var isSubscribed = true;\r\n ensureCanMutateNextListeners();\r\n nextListeners.push(listener);\r\n return function unsubscribe() {\r\n if (!isSubscribed) {\r\n return;\r\n }\r\n if (isDispatching) {\r\n throw new Error(false ? formatProdErrorMessage(6) : \"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.\");\r\n }\r\n isSubscribed = false;\r\n ensureCanMutateNextListeners();\r\n var index = nextListeners.indexOf(listener);\r\n nextListeners.splice(index, 1);\r\n currentListeners = null;\r\n };\r\n }\r\n function dispatch(action) {\r\n if (!isPlainObject(action)) {\r\n throw new Error(false ? formatProdErrorMessage(7) : \"Actions must be plain objects. Instead, the actual type was: '\" + kindOf(action) + \"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.\");\r\n }\r\n if (typeof action.type === \"undefined\") {\r\n throw new Error(false ? formatProdErrorMessage(8) : 'Actions may not have an undefined \"type\" property. You may have misspelled an action type string constant.');\r\n }\r\n if (isDispatching) {\r\n throw new Error(false ? formatProdErrorMessage(9) : \"Reducers may not dispatch actions.\");\r\n }\r\n try {\r\n isDispatching = true;\r\n currentState = currentReducer(currentState, action);\r\n }\r\n finally {\r\n isDispatching = false;\r\n }\r\n var listeners = currentListeners = nextListeners;\r\n for (var i2 = 0; i2 < listeners.length; i2++) {\r\n var listener = listeners[i2];\r\n listener();\r\n }\r\n return action;\r\n }\r\n function replaceReducer(nextReducer) {\r\n if (typeof nextReducer !== \"function\") {\r\n throw new Error(false ? formatProdErrorMessage(10) : \"Expected the nextReducer to be a function. Instead, received: '\" + kindOf(nextReducer));\r\n }\r\n currentReducer = nextReducer;\r\n dispatch({\r\n type: ActionTypes.REPLACE\r\n });\r\n }\r\n function observable() {\r\n var _ref;\r\n var outerSubscribe = subscribe;\r\n return _ref = {\r\n subscribe: function subscribe2(observer) {\r\n if (typeof observer !== \"object\" || observer === null) {\r\n throw new Error(false ? formatProdErrorMessage(11) : \"Expected the observer to be an object. Instead, received: '\" + kindOf(observer) + \"'\");\r\n }\r\n function observeState() {\r\n if (observer.next) {\r\n observer.next(getState());\r\n }\r\n }\r\n observeState();\r\n var unsubscribe = outerSubscribe(observeState);\r\n return {\r\n unsubscribe: unsubscribe\r\n };\r\n }\r\n }, _ref[$$observable] = function () {\r\n return this;\r\n }, _ref;\r\n }\r\n dispatch({\r\n type: ActionTypes.INIT\r\n });\r\n return _ref2 = {\r\n dispatch: dispatch,\r\n subscribe: subscribe,\r\n getState: getState,\r\n replaceReducer: replaceReducer\r\n }, _ref2[$$observable] = observable, _ref2;\r\n}\r\nfunction warning(message) {\r\n if (typeof console !== \"undefined\" && typeof console.error === \"function\") {\r\n console.error(message);\r\n }\r\n try {\r\n throw new Error(message);\r\n }\r\n catch (e2) {\r\n }\r\n}\r\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\r\n var reducerKeys = Object.keys(reducers);\r\n var argumentName = action && action.type === ActionTypes.INIT ? \"preloadedState argument passed to createStore\" : \"previous state received by the reducer\";\r\n if (reducerKeys.length === 0) {\r\n return \"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.\";\r\n }\r\n if (!isPlainObject(inputState)) {\r\n return \"The \" + argumentName + ' has unexpected type of \"' + kindOf(inputState) + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\r\n }\r\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\r\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\r\n });\r\n unexpectedKeys.forEach(function (key) {\r\n unexpectedKeyCache[key] = true;\r\n });\r\n if (action && action.type === ActionTypes.REPLACE)\r\n return;\r\n if (unexpectedKeys.length > 0) {\r\n return \"Unexpected \" + (unexpectedKeys.length > 1 ? \"keys\" : \"key\") + \" \" + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + \". \") + \"Expected to find one of the known reducer keys instead: \" + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\r\n }\r\n}\r\nfunction assertReducerShape(reducers) {\r\n Object.keys(reducers).forEach(function (key) {\r\n var reducer = reducers[key];\r\n var initialState = reducer(void 0, {\r\n type: ActionTypes.INIT\r\n });\r\n if (typeof initialState === \"undefined\") {\r\n throw new Error(false ? formatProdErrorMessage(12) : 'The slice reducer for key \"' + key + \"\\\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.\");\r\n }\r\n if (typeof reducer(void 0, {\r\n type: ActionTypes.PROBE_UNKNOWN_ACTION()\r\n }) === \"undefined\") {\r\n throw new Error(false ? formatProdErrorMessage(13) : 'The slice reducer for key \"' + key + '\" returned undefined when probed with a random type. ' + (\"Don't try to handle '\" + ActionTypes.INIT + \"' or other actions in \\\"redux/*\\\" \") + \"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.\");\r\n }\r\n });\r\n}\r\nfunction combineReducers(reducers) {\r\n var reducerKeys = Object.keys(reducers);\r\n var finalReducers = {};\r\n for (var i2 = 0; i2 < reducerKeys.length; i2++) {\r\n var key = reducerKeys[i2];\r\n if (true) {\r\n if (typeof reducers[key] === \"undefined\") {\r\n warning('No reducer provided for key \"' + key + '\"');\r\n }\r\n }\r\n if (typeof reducers[key] === \"function\") {\r\n finalReducers[key] = reducers[key];\r\n }\r\n }\r\n var finalReducerKeys = Object.keys(finalReducers);\r\n var unexpectedKeyCache;\r\n if (true) {\r\n unexpectedKeyCache = {};\r\n }\r\n var shapeAssertionError;\r\n try {\r\n assertReducerShape(finalReducers);\r\n }\r\n catch (e2) {\r\n shapeAssertionError = e2;\r\n }\r\n return function combination(state, action) {\r\n if (state === void 0) {\r\n state = {};\r\n }\r\n if (shapeAssertionError) {\r\n throw shapeAssertionError;\r\n }\r\n if (true) {\r\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\r\n if (warningMessage) {\r\n warning(warningMessage);\r\n }\r\n }\r\n var hasChanged = false;\r\n var nextState = {};\r\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\r\n var _key = finalReducerKeys[_i];\r\n var reducer = finalReducers[_key];\r\n var previousStateForKey = state[_key];\r\n var nextStateForKey = reducer(previousStateForKey, action);\r\n if (typeof nextStateForKey === \"undefined\") {\r\n var actionType = action && action.type;\r\n throw new Error(false ? formatProdErrorMessage(14) : \"When called with an action of type \" + (actionType ? '\"' + String(actionType) + '\"' : \"(unknown type)\") + ', the slice reducer for key \"' + _key + '\" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.');\r\n }\r\n nextState[_key] = nextStateForKey;\r\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\r\n }\r\n hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\r\n return hasChanged ? nextState : state;\r\n };\r\n}\r\nfunction bindActionCreator(actionCreator, dispatch) {\r\n return function () {\r\n return dispatch(actionCreator.apply(this, arguments));\r\n };\r\n}\r\nfunction bindActionCreators(actionCreators, dispatch) {\r\n if (typeof actionCreators === \"function\") {\r\n return bindActionCreator(actionCreators, dispatch);\r\n }\r\n if (typeof actionCreators !== \"object\" || actionCreators === null) {\r\n throw new Error(false ? formatProdErrorMessage(16) : \"bindActionCreators expected an object or a function, but instead received: '\" + kindOf(actionCreators) + \"'. Did you write \\\"import ActionCreators from\\\" instead of \\\"import * as ActionCreators from\\\"?\");\r\n }\r\n var boundActionCreators = {};\r\n for (var key in actionCreators) {\r\n var actionCreator = actionCreators[key];\r\n if (typeof actionCreator === \"function\") {\r\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\r\n }\r\n }\r\n return boundActionCreators;\r\n}\r\nfunction compose() {\r\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\r\n funcs[_key] = arguments[_key];\r\n }\r\n if (funcs.length === 0) {\r\n return function (arg) {\r\n return arg;\r\n };\r\n }\r\n if (funcs.length === 1) {\r\n return funcs[0];\r\n }\r\n return funcs.reduce(function (a2, b2) {\r\n return function () {\r\n return a2(b2.apply(void 0, arguments));\r\n };\r\n });\r\n}\r\nfunction applyMiddleware() {\r\n for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\r\n middlewares[_key] = arguments[_key];\r\n }\r\n return function (createStore2) {\r\n return function () {\r\n var store = createStore2.apply(void 0, arguments);\r\n var _dispatch = function dispatch() {\r\n throw new Error(false ? formatProdErrorMessage(15) : \"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.\");\r\n };\r\n var middlewareAPI = {\r\n getState: store.getState,\r\n dispatch: function dispatch() {\r\n return _dispatch.apply(void 0, arguments);\r\n }\r\n };\r\n var chain = middlewares.map(function (middleware) {\r\n return middleware(middlewareAPI);\r\n });\r\n _dispatch = compose.apply(void 0, chain)(store.dispatch);\r\n return _objectSpread2(_objectSpread2({}, store), {}, {\r\n dispatch: _dispatch\r\n });\r\n };\r\n };\r\n}\r\nfunction isCrushed() {\r\n}\r\nif (typeof isCrushed.name === \"string\" && isCrushed.name !== \"isCrushed\") {\r\n warning('You are currently using minified code outside of NODE_ENV === \"production\". This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) to ensure you have the correct code for your production build.');\r\n}\r\n// ../../node_modules/reselect/es/index.js\r\nfunction defaultEqualityCheck(a2, b2) {\r\n return a2 === b2;\r\n}\r\nfunction areArgumentsShallowlyEqual(equalityCheck, prev, next) {\r\n if (prev === null || next === null || prev.length !== next.length) {\r\n return false;\r\n }\r\n var length = prev.length;\r\n for (var i2 = 0; i2 < length; i2++) {\r\n if (!equalityCheck(prev[i2], next[i2])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\nfunction defaultMemoize(func) {\r\n var equalityCheck = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : defaultEqualityCheck;\r\n var lastArgs = null;\r\n var lastResult = null;\r\n return function () {\r\n if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {\r\n lastResult = func.apply(null, arguments);\r\n }\r\n lastArgs = arguments;\r\n return lastResult;\r\n };\r\n}\r\nfunction getDependencies(funcs) {\r\n var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs;\r\n if (!dependencies.every(function (dep) {\r\n return typeof dep === \"function\";\r\n })) {\r\n var dependencyTypes = dependencies.map(function (dep) {\r\n return typeof dep;\r\n }).join(\", \");\r\n throw new Error(\"Selector creators expect all input-selectors to be functions, \" + (\"instead received the following types: [\" + dependencyTypes + \"]\"));\r\n }\r\n return dependencies;\r\n}\r\nfunction createSelectorCreator(memoize) {\r\n for (var _len = arguments.length, memoizeOptions = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\r\n memoizeOptions[_key - 1] = arguments[_key];\r\n }\r\n return function () {\r\n for (var _len2 = arguments.length, funcs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\r\n funcs[_key2] = arguments[_key2];\r\n }\r\n var recomputations = 0;\r\n var resultFunc = funcs.pop();\r\n var dependencies = getDependencies(funcs);\r\n var memoizedResultFunc = memoize.apply(void 0, [function () {\r\n recomputations++;\r\n return resultFunc.apply(null, arguments);\r\n }].concat(memoizeOptions));\r\n var selector = memoize(function () {\r\n var params = [];\r\n var length = dependencies.length;\r\n for (var i2 = 0; i2 < length; i2++) {\r\n params.push(dependencies[i2].apply(null, arguments));\r\n }\r\n return memoizedResultFunc.apply(null, params);\r\n });\r\n selector.resultFunc = resultFunc;\r\n selector.dependencies = dependencies;\r\n selector.recomputations = function () {\r\n return recomputations;\r\n };\r\n selector.resetRecomputations = function () {\r\n return recomputations = 0;\r\n };\r\n return selector;\r\n };\r\n}\r\nvar createSelector = createSelectorCreator(defaultMemoize);\r\n// src/createDraftSafeSelector.ts\r\nvar createDraftSafeSelector = function () {\r\n var args = [];\r\n for (var _b = 0; _b < arguments.length; _b++) {\r\n args[_b] = arguments[_b];\r\n }\r\n var selector = createSelector.apply(void 0, args);\r\n var wrappedSelector = function (value) {\r\n var rest = [];\r\n for (var _b = 1; _b < arguments.length; _b++) {\r\n rest[_b - 1] = arguments[_b];\r\n }\r\n return selector.apply(void 0, __spreadArray([t(value) ? D(value) : value], rest));\r\n };\r\n return wrappedSelector;\r\n};\r\n// src/devtoolsExtension.ts\r\nvar composeWithDevTools = typeof window !== \"undefined\" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () {\r\n if (arguments.length === 0)\r\n return void 0;\r\n if (typeof arguments[0] === \"object\")\r\n return compose;\r\n return compose.apply(null, arguments);\r\n};\r\nvar devToolsEnhancer = typeof window !== \"undefined\" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () {\r\n return function (noop) {\r\n return noop;\r\n };\r\n};\r\n// src/isPlainObject.ts\r\nfunction isPlainObject2(value) {\r\n if (typeof value !== \"object\" || value === null)\r\n return false;\r\n var proto = value;\r\n while (Object.getPrototypeOf(proto) !== null) {\r\n proto = Object.getPrototypeOf(proto);\r\n }\r\n return Object.getPrototypeOf(value) === proto;\r\n}\r\n// ../../node_modules/redux-thunk/es/index.js\r\nfunction createThunkMiddleware(extraArgument) {\r\n return function (_ref) {\r\n var dispatch = _ref.dispatch, getState = _ref.getState;\r\n return function (next) {\r\n return function (action) {\r\n if (typeof action === \"function\") {\r\n return action(dispatch, getState, extraArgument);\r\n }\r\n return next(action);\r\n };\r\n };\r\n };\r\n}\r\nvar thunk = createThunkMiddleware();\r\nthunk.withExtraArgument = createThunkMiddleware;\r\nvar es_default = thunk;\r\n// src/utils.ts\r\nfunction getTimeMeasureUtils(maxDelay, fnName) {\r\n var elapsed = 0;\r\n return {\r\n measureTime: function (fn2) {\r\n var started = Date.now();\r\n try {\r\n return fn2();\r\n }\r\n finally {\r\n var finished = Date.now();\r\n elapsed += finished - started;\r\n }\r\n },\r\n warnIfExceeded: function () {\r\n if (elapsed > maxDelay) {\r\n console.warn(fnName + \" took \" + elapsed + \"ms, which is more than the warning threshold of \" + maxDelay + \"ms. \\nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\\nIt is disabled in production builds, so you don't need to worry about that.\");\r\n }\r\n }\r\n };\r\n}\r\nvar MiddlewareArray = /** @class */ (function (_super) {\r\n __extends(MiddlewareArray, _super);\r\n function MiddlewareArray() {\r\n var args = [];\r\n for (var _b = 0; _b < arguments.length; _b++) {\r\n args[_b] = arguments[_b];\r\n }\r\n var _this = _super.apply(this, args) || this;\r\n Object.setPrototypeOf(_this, MiddlewareArray.prototype);\r\n return _this;\r\n }\r\n Object.defineProperty(MiddlewareArray, Symbol.species, {\r\n get: function () {\r\n return MiddlewareArray;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n MiddlewareArray.prototype.concat = function () {\r\n var arr = [];\r\n for (var _b = 0; _b < arguments.length; _b++) {\r\n arr[_b] = arguments[_b];\r\n }\r\n return _super.prototype.concat.apply(this, arr);\r\n };\r\n MiddlewareArray.prototype.prepend = function () {\r\n var arr = [];\r\n for (var _b = 0; _b < arguments.length; _b++) {\r\n arr[_b] = arguments[_b];\r\n }\r\n if (arr.length === 1 && Array.isArray(arr[0])) {\r\n return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))();\r\n }\r\n return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))();\r\n };\r\n return MiddlewareArray;\r\n}(Array));\r\n// src/immutableStateInvariantMiddleware.ts\r\nvar isProduction = false;\r\nvar prefix = \"Invariant failed\";\r\nfunction invariant(condition, message) {\r\n if (condition) {\r\n return;\r\n }\r\n if (isProduction) {\r\n throw new Error(prefix);\r\n }\r\n throw new Error(prefix + \": \" + (message || \"\"));\r\n}\r\nfunction stringify(obj, serializer, indent, decycler) {\r\n return JSON.stringify(obj, getSerialize(serializer, decycler), indent);\r\n}\r\nfunction getSerialize(serializer, decycler) {\r\n var stack = [], keys = [];\r\n if (!decycler)\r\n decycler = function (_2, value) {\r\n if (stack[0] === value)\r\n return \"[Circular ~]\";\r\n return \"[Circular ~.\" + keys.slice(0, stack.indexOf(value)).join(\".\") + \"]\";\r\n };\r\n return function (key, value) {\r\n if (stack.length > 0) {\r\n var thisPos = stack.indexOf(this);\r\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);\r\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);\r\n if (~stack.indexOf(value))\r\n value = decycler.call(this, key, value);\r\n }\r\n else\r\n stack.push(value);\r\n return serializer == null ? value : serializer.call(this, key, value);\r\n };\r\n}\r\nfunction isImmutableDefault(value) {\r\n return typeof value !== \"object\" || value === null || typeof value === \"undefined\" || Object.isFrozen(value);\r\n}\r\nfunction trackForMutations(isImmutable, ignorePaths, obj) {\r\n var trackedProperties = trackProperties(isImmutable, ignorePaths, obj);\r\n return {\r\n detectMutations: function () {\r\n return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);\r\n }\r\n };\r\n}\r\nfunction trackProperties(isImmutable, ignorePaths, obj, path) {\r\n if (ignorePaths === void 0) { ignorePaths = []; }\r\n if (path === void 0) { path = \"\"; }\r\n var tracked = { value: obj };\r\n if (!isImmutable(obj)) {\r\n tracked.children = {};\r\n for (var key in obj) {\r\n var childPath = path ? path + \".\" + key : key;\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue;\r\n }\r\n tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);\r\n }\r\n }\r\n return tracked;\r\n}\r\nfunction detectMutations(isImmutable, ignorePaths, trackedProperty, obj, sameParentRef, path) {\r\n if (ignorePaths === void 0) { ignorePaths = []; }\r\n if (sameParentRef === void 0) { sameParentRef = false; }\r\n if (path === void 0) { path = \"\"; }\r\n var prevObj = trackedProperty ? trackedProperty.value : void 0;\r\n var sameRef = prevObj === obj;\r\n if (sameParentRef && !sameRef && !Number.isNaN(obj)) {\r\n return { wasMutated: true, path: path };\r\n }\r\n if (isImmutable(prevObj) || isImmutable(obj)) {\r\n return { wasMutated: false };\r\n }\r\n var keysToDetect = {};\r\n for (var key in trackedProperty.children) {\r\n keysToDetect[key] = true;\r\n }\r\n for (var key in obj) {\r\n keysToDetect[key] = true;\r\n }\r\n for (var key in keysToDetect) {\r\n var childPath = path ? path + \".\" + key : key;\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue;\r\n }\r\n var result = detectMutations(isImmutable, ignorePaths, trackedProperty.children[key], obj[key], sameRef, childPath);\r\n if (result.wasMutated) {\r\n return result;\r\n }\r\n }\r\n return { wasMutated: false };\r\n}\r\nfunction createImmutableStateInvariantMiddleware(options) {\r\n if (options === void 0) { options = {}; }\r\n if (false) {\r\n return function () { return function (next) { return function (action) { return next(action); }; }; };\r\n }\r\n var _b = options.isImmutable, isImmutable = _b === void 0 ? isImmutableDefault : _b, ignoredPaths = options.ignoredPaths, _c = options.warnAfter, warnAfter = _c === void 0 ? 32 : _c, ignore = options.ignore;\r\n ignoredPaths = ignoredPaths || ignore;\r\n var track = trackForMutations.bind(null, isImmutable, ignoredPaths);\r\n return function (_b) {\r\n var getState = _b.getState;\r\n var state = getState();\r\n var tracker = track(state);\r\n var result;\r\n return function (next) { return function (action) {\r\n var measureUtils = getTimeMeasureUtils(warnAfter, \"ImmutableStateInvariantMiddleware\");\r\n measureUtils.measureTime(function () {\r\n state = getState();\r\n result = tracker.detectMutations();\r\n tracker = track(state);\r\n invariant(!result.wasMutated, \"A state mutation was detected between dispatches, in the path '\" + (result.path || \"\") + \"'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)\");\r\n });\r\n var dispatchedAction = next(action);\r\n measureUtils.measureTime(function () {\r\n state = getState();\r\n result = tracker.detectMutations();\r\n tracker = track(state);\r\n result.wasMutated && invariant(!result.wasMutated, \"A state mutation was detected inside a dispatch, in the path: \" + (result.path || \"\") + \". Take a look at the reducer(s) handling the action \" + stringify(action) + \". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)\");\r\n });\r\n measureUtils.warnIfExceeded();\r\n return dispatchedAction;\r\n }; };\r\n };\r\n}\r\n// src/serializableStateInvariantMiddleware.ts\r\nfunction isPlain(val) {\r\n var type = typeof val;\r\n return type === \"undefined\" || val === null || type === \"string\" || type === \"boolean\" || type === \"number\" || Array.isArray(val) || isPlainObject2(val);\r\n}\r\nfunction findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths) {\r\n if (path === void 0) { path = \"\"; }\r\n if (isSerializable === void 0) { isSerializable = isPlain; }\r\n if (ignoredPaths === void 0) { ignoredPaths = []; }\r\n var foundNestedSerializable;\r\n if (!isSerializable(value)) {\r\n return {\r\n keyPath: path || \"<root>\",\r\n value: value\r\n };\r\n }\r\n if (typeof value !== \"object\" || value === null) {\r\n return false;\r\n }\r\n var entries = getEntries != null ? getEntries(value) : Object.entries(value);\r\n var hasIgnoredPaths = ignoredPaths.length > 0;\r\n for (var _b = 0, entries_1 = entries; _b < entries_1.length; _b++) {\r\n var _c = entries_1[_b], key = _c[0], nestedValue = _c[1];\r\n var nestedPath = path ? path + \".\" + key : key;\r\n if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) {\r\n continue;\r\n }\r\n if (!isSerializable(nestedValue)) {\r\n return {\r\n keyPath: nestedPath,\r\n value: nestedValue\r\n };\r\n }\r\n if (typeof nestedValue === \"object\") {\r\n foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths);\r\n if (foundNestedSerializable) {\r\n return foundNestedSerializable;\r\n }\r\n }\r\n }\r\n return false;\r\n}\r\nfunction createSerializableStateInvariantMiddleware(options) {\r\n if (options === void 0) { options = {}; }\r\n if (false) {\r\n return function () { return function (next) { return function (action) { return next(action); }; }; };\r\n }\r\n var _b = options.isSerializable, isSerializable = _b === void 0 ? isPlain : _b, getEntries = options.getEntries, _c = options.ignoredActions, ignoredActions = _c === void 0 ? [] : _c, _d = options.ignoredActionPaths, ignoredActionPaths = _d === void 0 ? [\"meta.arg\", \"meta.baseQueryMeta\"] : _d, _e = options.ignoredPaths, ignoredPaths = _e === void 0 ? [] : _e, _f = options.warnAfter, warnAfter = _f === void 0 ? 32 : _f, _g = options.ignoreState, ignoreState = _g === void 0 ? false : _g;\r\n return function (storeAPI) { return function (next) { return function (action) {\r\n if (ignoredActions.length && ignoredActions.indexOf(action.type) !== -1) {\r\n return next(action);\r\n }\r\n var measureUtils = getTimeMeasureUtils(warnAfter, \"SerializableStateInvariantMiddleware\");\r\n measureUtils.measureTime(function () {\r\n var foundActionNonSerializableValue = findNonSerializableValue(action, \"\", isSerializable, getEntries, ignoredActionPaths);\r\n if (foundActionNonSerializableValue) {\r\n var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value;\r\n console.error(\"A non-serializable value was detected in an action, in the path: `\" + keyPath + \"`. Value:\", value, \"\\nTake a look at the logic that dispatched this action: \", action, \"\\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)\", \"\\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)\");\r\n }\r\n });\r\n var result = next(action);\r\n if (!ignoreState) {\r\n measureUtils.measureTime(function () {\r\n var state = storeAPI.getState();\r\n var foundStateNonSerializableValue = findNonSerializableValue(state, \"\", isSerializable, getEntries, ignoredPaths);\r\n if (foundStateNonSerializableValue) {\r\n var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value;\r\n console.error(\"A non-serializable value was detected in the state, in the path: `\" + keyPath + \"`. Value:\", value, \"\\nTake a look at the reducer(s) handling this action type: \" + action.type + \".\\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)\");\r\n }\r\n });\r\n measureUtils.warnIfExceeded();\r\n }\r\n return result;\r\n }; }; };\r\n}\r\n// src/getDefaultMiddleware.ts\r\nfunction isBoolean(x2) {\r\n return typeof x2 === \"boolean\";\r\n}\r\nfunction curryGetDefaultMiddleware() {\r\n return function curriedGetDefaultMiddleware(options) {\r\n return getDefaultMiddleware(options);\r\n };\r\n}\r\nfunction getDefaultMiddleware(options) {\r\n if (options === void 0) { options = {}; }\r\n var _b = options.thunk, thunk2 = _b === void 0 ? true : _b, _c = options.immutableCheck, immutableCheck = _c === void 0 ? true : _c, _d = options.serializableCheck, serializableCheck = _d === void 0 ? true : _d;\r\n var middlewareArray = new MiddlewareArray();\r\n if (thunk2) {\r\n if (isBoolean(thunk2)) {\r\n middlewareArray.push(es_default);\r\n }\r\n else {\r\n middlewareArray.push(es_default.withExtraArgument(thunk2.extraArgument));\r\n }\r\n }\r\n if (true) {\r\n if (immutableCheck) {\r\n var immutableOptions = {};\r\n if (!isBoolean(immutableCheck)) {\r\n immutableOptions = immutableCheck;\r\n }\r\n middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));\r\n }\r\n if (serializableCheck) {\r\n var serializableOptions = {};\r\n if (!isBoolean(serializableCheck)) {\r\n serializableOptions = serializableCheck;\r\n }\r\n middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));\r\n }\r\n }\r\n return middlewareArray;\r\n}\r\n// src/configureStore.ts\r\nvar IS_PRODUCTION = false;\r\nfunction configureStore(options) {\r\n var curriedGetDefaultMiddleware = curryGetDefaultMiddleware();\r\n var _b = options || {}, _c = _b.reducer, reducer = _c === void 0 ? void 0 : _c, _d = _b.middleware, middleware = _d === void 0 ? curriedGetDefaultMiddleware() : _d, _e = _b.devTools, devTools = _e === void 0 ? true : _e, _f = _b.preloadedState, preloadedState = _f === void 0 ? void 0 : _f, _g = _b.enhancers, enhancers = _g === void 0 ? void 0 : _g;\r\n var rootReducer;\r\n if (typeof reducer === \"function\") {\r\n rootReducer = reducer;\r\n }\r\n else if (isPlainObject2(reducer)) {\r\n rootReducer = combineReducers(reducer);\r\n }\r\n else {\r\n throw new Error('\"reducer\" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');\r\n }\r\n var finalMiddleware = middleware;\r\n if (typeof finalMiddleware === \"function\") {\r\n finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware);\r\n if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {\r\n throw new Error(\"when using a middleware builder function, an array of middleware must be returned\");\r\n }\r\n }\r\n if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== \"function\"; })) {\r\n throw new Error(\"each middleware provided to configureStore must be a function\");\r\n }\r\n var middlewareEnhancer = applyMiddleware.apply(void 0, finalMiddleware);\r\n var finalCompose = compose;\r\n if (devTools) {\r\n finalCompose = composeWithDevTools(__spreadValues({\r\n trace: !IS_PRODUCTION\r\n }, typeof devTools === \"object\" && devTools));\r\n }\r\n var storeEnhancers = [middlewareEnhancer];\r\n if (Array.isArray(enhancers)) {\r\n storeEnhancers = __spreadArray([middlewareEnhancer], enhancers);\r\n }\r\n else if (typeof enhancers === \"function\") {\r\n storeEnhancers = enhancers(storeEnhancers);\r\n }\r\n var composedEnhancer = finalCompose.apply(void 0, storeEnhancers);\r\n return createStore(rootReducer, preloadedState, composedEnhancer);\r\n}\r\n// src/createAction.ts\r\nfunction createAction(type, prepareAction) {\r\n function actionCreator() {\r\n var args = [];\r\n for (var _b = 0; _b < arguments.length; _b++) {\r\n args[_b] = arguments[_b];\r\n }\r\n if (prepareAction) {\r\n var prepared = prepareAction.apply(void 0, args);\r\n if (!prepared) {\r\n throw new Error(\"prepareAction did not return an object\");\r\n }\r\n return __spreadValues(__spreadValues({\r\n type: type,\r\n payload: prepared.payload\r\n }, \"meta\" in prepared && { meta: prepared.meta }), \"error\" in prepared && { error: prepared.error });\r\n }\r\n return { type: type, payload: args[0] };\r\n }\r\n actionCreator.toString = function () { return \"\" + type; };\r\n actionCreator.type = type;\r\n actionCreator.match = function (action) { return action.type === type; };\r\n return actionCreator;\r\n}\r\nfunction isFSA(action) {\r\n return isPlainObject2(action) && typeof action.type === \"string\" && Object.keys(action).every(isValidKey);\r\n}\r\nfunction isValidKey(key) {\r\n return [\"type\", \"payload\", \"error\", \"meta\"].indexOf(key) > -1;\r\n}\r\nfunction getType(actionCreator) {\r\n return \"\" + actionCreator;\r\n}\r\n// src/mapBuilders.ts\r\nfunction executeReducerBuilderCallback(builderCallback) {\r\n var actionsMap = {};\r\n var actionMatchers = [];\r\n var defaultCaseReducer;\r\n var builder = {\r\n addCase: function (typeOrActionCreator, reducer) {\r\n if (true) {\r\n if (actionMatchers.length > 0) {\r\n throw new Error(\"`builder.addCase` should only be called before calling `builder.addMatcher`\");\r\n }\r\n if (defaultCaseReducer) {\r\n throw new Error(\"`builder.addCase` should only be called before calling `builder.addDefaultCase`\");\r\n }\r\n }\r\n var type = typeof typeOrActionCreator === \"string\" ? typeOrActionCreator : typeOrActionCreator.type;\r\n if (type in actionsMap) {\r\n throw new Error(\"addCase cannot be called with two reducers for the same action type\");\r\n }\r\n actionsMap[type] = reducer;\r\n return builder;\r\n },\r\n addMatcher: function (matcher, reducer) {\r\n if (true) {\r\n if (defaultCaseReducer) {\r\n throw new Error(\"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`\");\r\n }\r\n }\r\n actionMatchers.push({ matcher: matcher, reducer: reducer });\r\n return builder;\r\n },\r\n addDefaultCase: function (reducer) {\r\n if (true) {\r\n if (defaultCaseReducer) {\r\n throw new Error(\"`builder.addDefaultCase` can only be called once\");\r\n }\r\n }\r\n defaultCaseReducer = reducer;\r\n return builder;\r\n }\r\n };\r\n builderCallback(builder);\r\n return [actionsMap, actionMatchers, defaultCaseReducer];\r\n}\r\n// src/createReducer.ts\r\nfunction createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) {\r\n if (actionMatchers === void 0) { actionMatchers = []; }\r\n var _b = typeof mapOrBuilderCallback === \"function\" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _b[0], finalActionMatchers = _b[1], finalDefaultCaseReducer = _b[2];\r\n var frozenInitialState = immer_esm_default(initialState, function () {\r\n });\r\n return function (state, action) {\r\n if (state === void 0) { state = frozenInitialState; }\r\n var caseReducers = __spreadArray([\r\n actionsMap[action.type]\r\n ], finalActionMatchers.filter(function (_b) {\r\n var matcher = _b.matcher;\r\n return matcher(action);\r\n }).map(function (_b) {\r\n var reducer = _b.reducer;\r\n return reducer;\r\n }));\r\n if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) {\r\n caseReducers = [finalDefaultCaseReducer];\r\n }\r\n return caseReducers.reduce(function (previousState, caseReducer) {\r\n if (caseReducer) {\r\n if (t(previousState)) {\r\n var draft = previousState;\r\n var result = caseReducer(draft, action);\r\n if (typeof result === \"undefined\") {\r\n return previousState;\r\n }\r\n return result;\r\n }\r\n else if (!r(previousState)) {\r\n var result = caseReducer(previousState, action);\r\n if (typeof result === \"undefined\") {\r\n if (previousState === null) {\r\n return previousState;\r\n }\r\n throw Error(\"A case reducer on a non-draftable value must not return undefined\");\r\n }\r\n return result;\r\n }\r\n else {\r\n return immer_esm_default(previousState, function (draft) {\r\n return caseReducer(draft, action);\r\n });\r\n }\r\n }\r\n return previousState;\r\n }, state);\r\n };\r\n}\r\n// src/createSlice.ts\r\nfunction getType2(slice, actionKey) {\r\n return slice + \"/\" + actionKey;\r\n}\r\nfunction createSlice(options) {\r\n var name = options.name, initialState = options.initialState;\r\n if (!name) {\r\n throw new Error(\"`name` is a required option for createSlice\");\r\n }\r\n var reducers = options.reducers || {};\r\n var _b = typeof options.extraReducers === \"function\" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers], _c = _b[0], extraReducers = _c === void 0 ? {} : _c, _d = _b[1], actionMatchers = _d === void 0 ? [] : _d, _e = _b[2], defaultCaseReducer = _e === void 0 ? void 0 : _e;\r\n var reducerNames = Object.keys(reducers);\r\n var sliceCaseReducersByName = {};\r\n var sliceCaseReducersByType = {};\r\n var actionCreators = {};\r\n reducerNames.forEach(function (reducerName) {\r\n var maybeReducerWithPrepare = reducers[reducerName];\r\n var type = getType2(name, reducerName);\r\n var caseReducer;\r\n var prepareCallback;\r\n if (\"reducer\" in maybeReducerWithPrepare) {\r\n caseReducer = maybeReducerWithPrepare.reducer;\r\n prepareCallback = maybeReducerWithPrepare.prepare;\r\n }\r\n else {\r\n caseReducer = maybeReducerWithPrepare;\r\n }\r\n sliceCaseReducersByName[reducerName] = caseReducer;\r\n sliceCaseReducersByType[type] = caseReducer;\r\n actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type);\r\n });\r\n var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType);\r\n var reducer = createReducer(initialState, finalCaseReducers, actionMatchers, defaultCaseReducer);\r\n return {\r\n name: name,\r\n reducer: reducer,\r\n actions: actionCreators,\r\n caseReducers: sliceCaseReducersByName\r\n };\r\n}\r\n// src/entities/entity_state.ts\r\nfunction getInitialEntityState() {\r\n return {\r\n ids: [],\r\n entities: {}\r\n };\r\n}\r\nfunction createInitialStateFactory() {\r\n function getInitialState(additionalState) {\r\n if (additionalState === void 0) { additionalState = {}; }\r\n return Object.assign(getInitialEntityState(), additionalState);\r\n }\r\n return { getInitialState: getInitialState };\r\n}\r\n// src/entities/state_selectors.ts\r\nfunction createSelectorsFactory() {\r\n function getSelectors(selectState) {\r\n var selectIds = function (state) { return state.ids; };\r\n var selectEntities = function (state) { return state.entities; };\r\n var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); });\r\n var selectId = function (_2, id) { return id; };\r\n var selectById = function (entities, id) { return entities[id]; };\r\n var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; });\r\n if (!selectState) {\r\n return {\r\n selectIds: selectIds,\r\n selectEntities: selectEntities,\r\n selectAll: selectAll,\r\n selectTotal: selectTotal,\r\n selectById: createDraftSafeSelector(selectEntities, selectId, selectById)\r\n };\r\n }\r\n var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities);\r\n return {\r\n selectIds: createDraftSafeSelector(selectState, selectIds),\r\n selectEntities: selectGlobalizedEntities,\r\n selectAll: createDraftSafeSelector(selectState, selectAll),\r\n selectTotal: createDraftSafeSelector(selectState, selectTotal),\r\n selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById)\r\n };\r\n }\r\n return { getSelectors: getSelectors };\r\n}\r\n// src/entities/state_adapter.ts\r\nfunction createSingleArgumentStateOperator(mutator) {\r\n var operator = createStateOperator(function (_2, state) { return mutator(state); });\r\n return function operation(state) {\r\n return operator(state, void 0);\r\n };\r\n}\r\nfunction createStateOperator(mutator) {\r\n return function operation(state, arg) {\r\n function isPayloadActionArgument(arg2) {\r\n return isFSA(arg2);\r\n }\r\n var runMutator = function (draft) {\r\n if (isPayloadActionArgument(arg)) {\r\n mutator(arg.payload, draft);\r\n }\r\n else {\r\n mutator(arg, draft);\r\n }\r\n };\r\n if (t(state)) {\r\n runMutator(state);\r\n return state;\r\n }\r\n else {\r\n return immer_esm_default(state, runMutator);\r\n }\r\n };\r\n}\r\n// src/entities/utils.ts\r\nfunction selectIdValue(entity, selectId) {\r\n var key = selectId(entity);\r\n if (key === void 0) {\r\n console.warn(\"The entity passed to the `selectId` implementation returned undefined.\", \"You should probably provide your own `selectId` implementation.\", \"The entity that was passed:\", entity, \"The `selectId` implementation:\", selectId.toString());\r\n }\r\n return key;\r\n}\r\nfunction ensureEntitiesArray(entities) {\r\n if (!Array.isArray(entities)) {\r\n entities = Object.values(entities);\r\n }\r\n return entities;\r\n}\r\nfunction splitAddedUpdatedEntities(newEntities, selectId, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n var added = [];\r\n var updated = [];\r\n for (var _b = 0, newEntities_1 = newEntities; _b < newEntities_1.length; _b++) {\r\n var entity = newEntities_1[_b];\r\n var id = selectIdValue(entity, selectId);\r\n if (id in state.entities) {\r\n updated.push({ id: id, changes: entity });\r\n }\r\n else {\r\n added.push(entity);\r\n }\r\n }\r\n return [added, updated];\r\n}\r\n// src/entities/unsorted_state_adapter.ts\r\nfunction createUnsortedStateAdapter(selectId) {\r\n function addOneMutably(entity, state) {\r\n var key = selectIdValue(entity, selectId);\r\n if (key in state.entities) {\r\n return;\r\n }\r\n state.ids.push(key);\r\n state.entities[key] = entity;\r\n }\r\n function addManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n for (var _b = 0, newEntities_2 = newEntities; _b < newEntities_2.length; _b++) {\r\n var entity = newEntities_2[_b];\r\n addOneMutably(entity, state);\r\n }\r\n }\r\n function setOneMutably(entity, state) {\r\n var key = selectIdValue(entity, selectId);\r\n if (!(key in state.entities)) {\r\n state.ids.push(key);\r\n }\r\n state.entities[key] = entity;\r\n }\r\n function setManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n for (var _b = 0, newEntities_3 = newEntities; _b < newEntities_3.length; _b++) {\r\n var entity = newEntities_3[_b];\r\n setOneMutably(entity, state);\r\n }\r\n }\r\n function setAllMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n state.ids = [];\r\n state.entities = {};\r\n addManyMutably(newEntities, state);\r\n }\r\n function removeOneMutably(key, state) {\r\n return removeManyMutably([key], state);\r\n }\r\n function removeManyMutably(keys, state) {\r\n var didMutate = false;\r\n keys.forEach(function (key) {\r\n if (key in state.entities) {\r\n delete state.entities[key];\r\n didMutate = true;\r\n }\r\n });\r\n if (didMutate) {\r\n state.ids = state.ids.filter(function (id) { return id in state.entities; });\r\n }\r\n }\r\n function removeAllMutably(state) {\r\n Object.assign(state, {\r\n ids: [],\r\n entities: {}\r\n });\r\n }\r\n function takeNewKey(keys, update, state) {\r\n var original = state.entities[update.id];\r\n var updated = Object.assign({}, original, update.changes);\r\n var newKey = selectIdValue(updated, selectId);\r\n var hasNewKey = newKey !== update.id;\r\n if (hasNewKey) {\r\n keys[update.id] = newKey;\r\n delete state.entities[update.id];\r\n }\r\n state.entities[newKey] = updated;\r\n return hasNewKey;\r\n }\r\n function updateOneMutably(update, state) {\r\n return updateManyMutably([update], state);\r\n }\r\n function updateManyMutably(updates, state) {\r\n var newKeys = {};\r\n var updatesPerEntity = {};\r\n updates.forEach(function (update) {\r\n if (update.id in state.entities) {\r\n updatesPerEntity[update.id] = {\r\n id: update.id,\r\n changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes)\r\n };\r\n }\r\n });\r\n updates = Object.values(updatesPerEntity);\r\n var didMutateEntities = updates.length > 0;\r\n if (didMutateEntities) {\r\n var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0;\r\n if (didMutateIds) {\r\n state.ids = state.ids.map(function (id) { return newKeys[id] || id; });\r\n }\r\n }\r\n }\r\n function upsertOneMutably(entity, state) {\r\n return upsertManyMutably([entity], state);\r\n }\r\n function upsertManyMutably(newEntities, state) {\r\n var _b = splitAddedUpdatedEntities(newEntities, selectId, state), added = _b[0], updated = _b[1];\r\n updateManyMutably(updated, state);\r\n addManyMutably(added, state);\r\n }\r\n return {\r\n removeAll: createSingleArgumentStateOperator(removeAllMutably),\r\n addOne: createStateOperator(addOneMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n upsertMany: createStateOperator(upsertManyMutably),\r\n removeOne: createStateOperator(removeOneMutably),\r\n removeMany: createStateOperator(removeManyMutably)\r\n };\r\n}\r\n// src/entities/sorted_state_adapter.ts\r\nfunction createSortedStateAdapter(selectId, sort) {\r\n var _b = createUnsortedStateAdapter(selectId), removeOne = _b.removeOne, removeMany = _b.removeMany, removeAll = _b.removeAll;\r\n function addOneMutably(entity, state) {\r\n return addManyMutably([entity], state);\r\n }\r\n function addManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); });\r\n if (models.length !== 0) {\r\n merge(models, state);\r\n }\r\n }\r\n function setOneMutably(entity, state) {\r\n return setManyMutably([entity], state);\r\n }\r\n function setManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n if (newEntities.length !== 0) {\r\n merge(newEntities, state);\r\n }\r\n }\r\n function setAllMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n state.entities = {};\r\n state.ids = [];\r\n addManyMutably(newEntities, state);\r\n }\r\n function updateOneMutably(update, state) {\r\n return updateManyMutably([update], state);\r\n }\r\n function takeUpdatedModel(models, update, state) {\r\n if (!(update.id in state.entities)) {\r\n return false;\r\n }\r\n var original = state.entities[update.id];\r\n var updated = Object.assign({}, original, update.changes);\r\n var newKey = selectIdValue(updated, selectId);\r\n delete state.entities[update.id];\r\n models.push(updated);\r\n return newKey !== update.id;\r\n }\r\n function updateManyMutably(updates, state) {\r\n var models = [];\r\n updates.forEach(function (update) { return takeUpdatedModel(models, update, state); });\r\n if (models.length !== 0) {\r\n merge(models, state);\r\n }\r\n }\r\n function upsertOneMutably(entity, state) {\r\n return upsertManyMutably([entity], state);\r\n }\r\n function upsertManyMutably(newEntities, state) {\r\n var _b = splitAddedUpdatedEntities(newEntities, selectId, state), added = _b[0], updated = _b[1];\r\n updateManyMutably(updated, state);\r\n addManyMutably(added, state);\r\n }\r\n function areArraysEqual(a2, b2) {\r\n if (a2.length !== b2.length) {\r\n return false;\r\n }\r\n for (var i2 = 0; i2 < a2.length && i2 < b2.length; i2++) {\r\n if (a2[i2] === b2[i2]) {\r\n continue;\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n function merge(models, state) {\r\n models.forEach(function (model) {\r\n state.entities[selectId(model)] = model;\r\n });\r\n var allEntities = Object.values(state.entities);\r\n allEntities.sort(sort);\r\n var newSortedIds = allEntities.map(selectId);\r\n var ids = state.ids;\r\n if (!areArraysEqual(ids, newSortedIds)) {\r\n state.ids = newSortedIds;\r\n }\r\n }\r\n return {\r\n removeOne: removeOne,\r\n removeMany: removeMany,\r\n removeAll: removeAll,\r\n addOne: createStateOperator(addOneMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertMany: createStateOperator(upsertManyMutably)\r\n };\r\n}\r\n// src/entities/create_adapter.ts\r\nfunction createEntityAdapter(options) {\r\n if (options === void 0) { options = {}; }\r\n var _b = __spreadValues({\r\n sortComparer: false,\r\n selectId: function (instance) { return instance.id; }\r\n }, options), selectId = _b.selectId, sortComparer = _b.sortComparer;\r\n var stateFactory = createInitialStateFactory();\r\n var selectorsFactory = createSelectorsFactory();\r\n var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId);\r\n return __spreadValues(__spreadValues(__spreadValues({\r\n selectId: selectId,\r\n sortComparer: sortComparer\r\n }, stateFactory), selectorsFactory), stateAdapter);\r\n}\r\n// src/nanoid.ts\r\nvar urlAlphabet = \"ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW\";\r\nvar nanoid = function (size) {\r\n if (size === void 0) { size = 21; }\r\n var id = \"\";\r\n var i2 = size;\r\n while (i2--) {\r\n id += urlAlphabet[Math.random() * 64 | 0];\r\n }\r\n return id;\r\n};\r\n// src/createAsyncThunk.ts\r\nvar commonProperties = [\r\n \"name\",\r\n \"message\",\r\n \"stack\",\r\n \"code\"\r\n];\r\nvar RejectWithValue = /** @class */ (function () {\r\n function RejectWithValue(payload, meta) {\r\n this.payload = payload;\r\n this.meta = meta;\r\n }\r\n return RejectWithValue;\r\n}());\r\nvar FulfillWithMeta = /** @class */ (function () {\r\n function FulfillWithMeta(payload, meta) {\r\n this.payload = payload;\r\n this.meta = meta;\r\n }\r\n return FulfillWithMeta;\r\n}());\r\nvar miniSerializeError = function (value) {\r\n if (typeof value === \"object\" && value !== null) {\r\n var simpleError = {};\r\n for (var _b = 0, commonProperties_1 = commonProperties; _b < commonProperties_1.length; _b++) {\r\n var property = commonProperties_1[_b];\r\n if (typeof value[property] === \"string\") {\r\n simpleError[property] = value[property];\r\n }\r\n }\r\n return simpleError;\r\n }\r\n return { message: String(value) };\r\n};\r\nfunction createAsyncThunk(typePrefix, payloadCreator, options) {\r\n var fulfilled = createAction(typePrefix + \"/fulfilled\", function (payload, requestId, arg, meta) { return ({\r\n payload: payload,\r\n meta: __spreadProps(__spreadValues({}, meta || {}), {\r\n arg: arg,\r\n requestId: requestId,\r\n requestStatus: \"fulfilled\"\r\n })\r\n }); });\r\n var pending = createAction(typePrefix + \"/pending\", function (requestId, arg, meta) { return ({\r\n payload: void 0,\r\n meta: __spreadProps(__spreadValues({}, meta || {}), {\r\n arg: arg,\r\n requestId: requestId,\r\n requestStatus: \"pending\"\r\n })\r\n }); });\r\n var rejected = createAction(typePrefix + \"/rejected\", function (error, requestId, arg, payload, meta) { return ({\r\n payload: payload,\r\n error: (options && options.serializeError || miniSerializeError)(error || \"Rejected\"),\r\n meta: __spreadProps(__spreadValues({}, meta || {}), {\r\n arg: arg,\r\n requestId: requestId,\r\n rejectedWithValue: !!payload,\r\n requestStatus: \"rejected\",\r\n aborted: (error == null ? void 0 : error.name) === \"AbortError\",\r\n condition: (error == null ? void 0 : error.name) === \"ConditionError\"\r\n })\r\n }); });\r\n var displayedWarning = false;\r\n var AC = typeof AbortController !== \"undefined\" ? AbortController : /** @class */ (function () {\r\n function class_1() {\r\n this.signal = {\r\n aborted: false,\r\n addEventListener: function () {\r\n },\r\n dispatchEvent: function () {\r\n return false;\r\n },\r\n onabort: function () {\r\n },\r\n removeEventListener: function () {\r\n }\r\n };\r\n }\r\n class_1.prototype.abort = function () {\r\n if (true) {\r\n if (!displayedWarning) {\r\n displayedWarning = true;\r\n console.info(\"This platform does not implement AbortController. \\nIf you want to use the AbortController to react to `abort` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.\");\r\n }\r\n }\r\n };\r\n return class_1;\r\n }());\r\n function actionCreator(arg) {\r\n return function (dispatch, getState, extra) {\r\n var _a;\r\n var requestId = ((_a = options == null ? void 0 : options.idGenerator) != null ? _a : nanoid)();\r\n var abortController = new AC();\r\n var abortReason;\r\n var abortedPromise = new Promise(function (_2, reject) { return abortController.signal.addEventListener(\"abort\", function () { return reject({ name: \"AbortError\", message: abortReason || \"Aborted\" }); }); });\r\n var started = false;\r\n function abort(reason) {\r\n if (started) {\r\n abortReason = reason;\r\n abortController.abort();\r\n }\r\n }\r\n var promise = function () {\r\n return __async(this, null, function () {\r\n var _a2, finalAction, err_1, skipDispatch;\r\n return __generator(this, function (_b) {\r\n switch (_b.label) {\r\n case 0:\r\n _b.trys.push([0, 2, , 3]);\r\n if (options && options.condition && options.condition(arg, { getState: getState, extra: extra }) === false) {\r\n throw {\r\n name: \"ConditionError\",\r\n message: \"Aborted due to condition callback returning false.\"\r\n };\r\n }\r\n started = true;\r\n dispatch(pending(requestId, arg, (_a2 = options == null ? void 0 : options.getPendingMeta) == null ? void 0 : _a2.call(options, { requestId: requestId, arg: arg }, { getState: getState, extra: extra })));\r\n return [4 /*yield*/, Promise.race([\r\n abortedPromise,\r\n Promise.resolve(payloadCreator(arg, {\r\n dispatch: dispatch,\r\n getState: getState,\r\n extra: extra,\r\n requestId: requestId,\r\n signal: abortController.signal,\r\n rejectWithValue: function (value, meta) {\r\n return new RejectWithValue(value, meta);\r\n },\r\n fulfillWithValue: function (value, meta) {\r\n return new FulfillWithMeta(value, meta);\r\n }\r\n })).then(function (result) {\r\n if (result instanceof RejectWithValue) {\r\n throw result;\r\n }\r\n if (result instanceof FulfillWithMeta) {\r\n return fulfilled(result.payload, requestId, arg, result.meta);\r\n }\r\n return fulfilled(result, requestId, arg);\r\n })\r\n ])];\r\n case 1:\r\n finalAction = _b.sent();\r\n return [3 /*break*/, 3];\r\n case 2:\r\n err_1 = _b.sent();\r\n finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg);\r\n return [3 /*break*/, 3];\r\n case 3:\r\n skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;\r\n if (!skipDispatch) {\r\n dispatch(finalAction);\r\n }\r\n return [2 /*return*/, finalAction];\r\n }\r\n });\r\n });\r\n }();\r\n return Object.assign(promise, {\r\n abort: abort,\r\n requestId: requestId,\r\n arg: arg,\r\n unwrap: function () {\r\n return promise.then(unwrapResult);\r\n }\r\n });\r\n };\r\n }\r\n return Object.assign(actionCreator, {\r\n pending: pending,\r\n rejected: rejected,\r\n fulfilled: fulfilled,\r\n typePrefix: typePrefix\r\n });\r\n}\r\nfunction unwrapResult(action) {\r\n if (action.meta && action.meta.rejectedWithValue) {\r\n throw action.payload;\r\n }\r\n if (action.error) {\r\n throw action.error;\r\n }\r\n return action.payload;\r\n}\r\n// src/tsHelpers.ts\r\nvar hasMatchFunction = function (v2) {\r\n return v2 && typeof v2.match === \"function\";\r\n};\r\n// src/matchers.ts\r\nvar matches = function (matcher, action) {\r\n if (hasMatchFunction(matcher)) {\r\n return matcher.match(action);\r\n }\r\n else {\r\n return matcher(action);\r\n }\r\n};\r\nfunction isAnyOf() {\r\n var matchers = [];\r\n for (var _b = 0; _b < arguments.length; _b++) {\r\n matchers[_b] = arguments[_b];\r\n }\r\n return function (action) {\r\n return matchers.some(function (matcher) { return matches(matcher, action); });\r\n };\r\n}\r\nfunction isAllOf() {\r\n var matchers = [];\r\n for (var _b = 0; _b < arguments.length; _b++) {\r\n matchers[_b] = arguments[_b];\r\n }\r\n return function (action) {\r\n return matchers.every(function (matcher) { return matches(matcher, action); });\r\n };\r\n}\r\nfunction hasExpectedRequestMetadata(action, validStatus) {\r\n if (!action || !action.meta)\r\n return false;\r\n var hasValidRequestId = typeof action.meta.requestId === \"string\";\r\n var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;\r\n return hasValidRequestId && hasValidRequestStatus;\r\n}\r\nfunction isAsyncThunkArray(a2) {\r\n return typeof a2[0] === \"function\" && \"pending\" in a2[0] && \"fulfilled\" in a2[0] && \"rejected\" in a2[0];\r\n}\r\nfunction isPending() {\r\n var asyncThunks = [];\r\n for (var _b = 0; _b < arguments.length; _b++) {\r\n asyncThunks[_b] = arguments[_b];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"pending\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isPending()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; });\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isRejected() {\r\n var asyncThunks = [];\r\n for (var _b = 0; _b < arguments.length; _b++) {\r\n asyncThunks[_b] = arguments[_b];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"rejected\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejected()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; });\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isRejectedWithValue() {\r\n var asyncThunks = [];\r\n for (var _b = 0; _b < arguments.length; _b++) {\r\n asyncThunks[_b] = arguments[_b];\r\n }\r\n var hasFlag = function (action) {\r\n return action && action.meta && action.meta.rejectedWithValue;\r\n };\r\n if (asyncThunks.length === 0) {\r\n return function (action) {\r\n var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);\r\n return combinedMatcher(action);\r\n };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejectedWithValue()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isFulfilled() {\r\n var asyncThunks = [];\r\n for (var _b = 0; _b < arguments.length; _b++) {\r\n asyncThunks[_b] = arguments[_b];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"fulfilled\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isFulfilled()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; });\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isAsyncThunkAction() {\r\n var asyncThunks = [];\r\n for (var _b = 0; _b < arguments.length; _b++) {\r\n asyncThunks[_b] = arguments[_b];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"pending\", \"fulfilled\", \"rejected\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isAsyncThunkAction()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = [];\r\n for (var _b = 0, asyncThunks_1 = asyncThunks; _b < asyncThunks_1.length; _b++) {\r\n var asyncThunk = asyncThunks_1[_b];\r\n matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled);\r\n }\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\n// src/index.ts\r\nN();\r\nexport { MiddlewareArray, ActionTypes as __DO_NOT_USE__ActionTypes, applyMiddleware, bindActionCreators, combineReducers, compose, configureStore, createAction, createAsyncThunk, createDraftSafeSelector, createEntityAdapter, createImmutableStateInvariantMiddleware, immer_esm_default as createNextState, createReducer, createSelector, createSerializableStateInvariantMiddleware, createSlice, createStore, D as current, findNonSerializableValue, d as freeze, getDefaultMiddleware, getType, isAllOf, isAnyOf, isAsyncThunkAction, t as isDraft, isFulfilled, isImmutableDefault, isPending, isPlain, isPlainObject2 as isPlainObject, isRejected, isRejectedWithValue, miniSerializeError, nanoid, e as original, unwrapResult };\r\n//# sourceMappingURL=redux-toolkit.umd.js.map"],"names":["this"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E,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,KAAK;IACL,IAAI,OAAO,UAAU,MAAM,EAAE;IAC7B,QAAQ,IAAI,QAAQ,GAAG,EAAE,CAAC;IAC1B,QAAQ,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,aAAa,GAAG,WAAW,EAAE,EAAE,GAAG,aAAa,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IACvF,YAAY,IAAI,UAAU,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;IAC/C,YAAY,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IACzF,SAAS;IACT,QAAQ,IAAI,eAAe,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC9D,QAAQ,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;IACvC,KAAK,CAAC;IACN,CAAC;IACD;IACA,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
||
\ No newline at end of file
|
||
diff --git a/dist/redux-toolkit.umd.min.js b/dist/redux-toolkit.umd.min.js
|
||
deleted file mode 100644
|
||
index ff4e60b9ecd730b0420b4f3b258df1161f00ac17..0000000000000000000000000000000000000000
|
||
--- a/dist/redux-toolkit.umd.min.js
|
||
+++ /dev/null
|
||
@@ -1,51 +0,0 @@
|
||
-(function (global, factory) {
|
||
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.RTK = {}));
|
||
-}(this, (function (exports) { 'use strict';
|
||
-
|
||
- var t,e,n,r=undefined&&undefined.__extends||(t=function(e,n){return (t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e;}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e;}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r);}),o=undefined&&undefined.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:f(0),throw:f(1),return:f(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function f(i){return function(f){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u);}catch(t){i=[6,t],r=0;}finally{n=o=0;}if(5&i[0])throw i[1];return {value:i[0]?i[1]:void 0,done:!0}}([i,f])}}},i=undefined&&undefined.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},u=Object.defineProperty,f=Object.defineProperties,c=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,p=function(t,e,n){return e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},d=function(t,e){for(var n in e||(e={}))l.call(e,n)&&p(t,n,e[n]);if(a)for(var r=0,o=a(e);r<o.length;r++)s.call(e,n=o[r])&&p(t,n,e[n]);return t},v=function(t,e){return f(t,c(e))};function y(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map((function(t){return "'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function h(t){return !!t&&!!t[et]}function g(t){return !!t&&(function(t){if(!t||"object"!=typeof t)return !1;var e=Object.getPrototypeOf(t);if(null===e)return !0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===nt}(t)||Array.isArray(t)||!!t[tt]||!!t.constructor[tt]||E(t)||A(t))}function b(t){return h(t)||y(23,t),t[et].t}function O(t,e,n){void 0===n&&(n=!1),0===m(t)?(n?Object.keys:rt)(t).forEach((function(r){n&&"symbol"==typeof r||e(r,t[r],t);})):t.forEach((function(n,r){return e(r,n,t)}));}function m(t){var e=t[et];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:E(t)?2:A(t)?3:0}function w(t,e){return 2===m(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function j(t,e,n){var r=m(t);2===r?t.set(e,n):3===r?(t.delete(e),t.add(n)):t[e]=n;}function P(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function E(t){return H&&t instanceof Map}function A(t){return Q&&t instanceof Set}function S(t){return t.o||t.t}function _(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=ot(t);delete e[et];for(var n=rt(e),r=0;r<n.length;r++){var o=n[r],i=e[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[o]});}return Object.create(Object.getPrototypeOf(t),e)}function x(t,e){return void 0===e&&(e=!1),D(t)||h(t)||!g(t)||(m(t)>1&&(t.set=t.add=t.clear=t.delete=I),Object.freeze(t),e&&O(t,(function(t,e){return x(e,!0)}),!0)),t}function I(){y(2);}function D(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function k(t){var e=it[t];return e||y(18,t),e}function N(){return n}function R(t,e){e&&(k("Patches"),t.u=[],t.s=[],t.v=e);}function M(t){C(t),t.p.forEach(F),t.p=null;}function C(t){t===n&&(n=t.l);}function T(t){return n={p:[],l:n,h:t,m:!0,_:0}}function F(t){var e=t[et];0===e.i||1===e.i?e.j():e.O=!0;}function q(t,e){e._=e.p.length;var n=e.p[0],r=void 0!==t&&t!==n;return e.h.g||k("ES5").S(e,t,r),r?(n[et].P&&(M(e),y(4)),g(t)&&(t=W(e,t),e.l||K(e,t)),e.u&&k("Patches").M(n[et],t,e.u,e.s)):t=W(e,n,[]),M(e),e.u&&e.v(e.u,e.s),t!==Z?t:void 0}function W(t,e,n){if(D(e))return e;var r=e[et];if(!r)return O(e,(function(o,i){return z(t,r,e,o,i,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return K(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=_(r.k):r.o;O(3===r.i?new Set(o):o,(function(e,i){return z(t,r,o,e,i,n)})),K(t,o,!1),n&&t.u&&k("Patches").R(r,n,t.u,t.s);}return r.o}function z(t,e,n,r,o,i){if(h(o)){var u=W(t,o,i&&e&&3!==e.i&&!w(e.D,r)?i.concat(r):void 0);if(j(n,r,u),!h(u))return;t.m=!1;}if(g(o)&&!D(o)){if(!t.h.F&&t._<1)return;W(t,o),e&&e.A.l||K(t,o);}}function K(t,e,n){void 0===n&&(n=!1),t.h.F&&t.m&&x(e,n);}function U(t,e){var n=t[et];return (n?S(n):t)[e]}function L(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n);}}function V(t){t.P||(t.P=!0,t.l&&V(t.l));}function X(t){t.o||(t.o=_(t.t));}function B(t,e,n){var r=E(e)?k("MapSet").N(e,n):A(e)?k("MapSet").T(e,n):t.g?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:N(),P:!1,I:!1,D:{},l:e,t:t,k:null,o:null,j:null,C:!1},o=r,i=ut;n&&(o=[r],i=ft);var u=Proxy.revocable(o,i),f=u.revoke,c=u.proxy;return r.k=c,r.j=f,c}(e,n):k("ES5").J(e,n);return (n?n.A:N()).p.push(r),r}function G(t){return h(t)||y(22,t),function t(e){if(!g(e))return e;var n,r=e[et],o=m(e);if(r){if(!r.P&&(r.i<4||!k("ES5").K(r)))return r.t;r.I=!0,n=J(e,o),r.I=!1;}else n=J(e,o);return O(n,(function(e,o){r&&function(t,e){return 2===m(t)?t.get(e):t[e]}(r.t,e)===o||j(n,e,t(o));})),3===o?new Set(n):n}(t)}function J(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return _(t)}var $="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),H="undefined"!=typeof Map,Q="undefined"!=typeof Set,Y="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Z=$?Symbol.for("immer-nothing"):((e={})["immer-nothing"]=!0,e),tt=$?Symbol.for("immer-draftable"):"__$immer_draftable",et=$?Symbol.for("immer-state"):"__$immer_state",nt=(""+Object.prototype.constructor),rt="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,ot=Object.getOwnPropertyDescriptors||function(t){var e={};return rt(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n);})),e},it={},ut={get:function(t,e){if(e===et)return t;var n,r,o,i=S(t);if(!w(i,e))return n=t,(o=L(i,e))?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(n.k):void 0;var u=i[e];return t.I||!g(u)?u:u===U(t.t,e)?(X(t),t.o[e]=B(t.A.h,u,t)):u},has:function(t,e){return e in S(t)},ownKeys:function(t){return Reflect.ownKeys(S(t))},set:function(t,e,n){var r=L(S(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(!t.P){var o=U(S(t),e),i=null==o?void 0:o[et];if(i&&i.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(P(n,o)&&(void 0!==n||w(t.t,e)))return !0;X(t),V(t);}return t.o[e]===n&&"number"!=typeof n&&(void 0!==n||e in t.o)||(t.o[e]=n,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==U(t.t,e)||e in t.t?(t.D[e]=!1,X(t),V(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=S(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){y(11);},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){y(12);}},ft={};O(ut,(function(t,e){ft[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)};})),ft.deleteProperty=function(t,e){return ut.deleteProperty.call(this,t[0],e)},ft.set=function(t,e,n){return ut.set.call(this,t[0],e,n,t[0])};var ct=new(function(){function t(t){var e=this;this.g=Y,this.F=!0,this.produce=function(t,n,r){if("function"==typeof t&&"function"!=typeof n){var o=n;n=t;var i=e;return function(t){var e=this;void 0===t&&(t=o);for(var r=arguments.length,u=Array(r>1?r-1:0),f=1;f<r;f++)u[f-1]=arguments[f];return i.produce(t,(function(t){var r;return (r=n).call.apply(r,[e,t].concat(u))}))}}var u;if("function"!=typeof n&&y(6),void 0!==r&&"function"!=typeof r&&y(7),g(t)){var f=T(e),c=B(e,t,void 0),a=!0;try{u=n(c),a=!1;}finally{a?M(f):C(f);}return "undefined"!=typeof Promise&&u instanceof Promise?u.then((function(t){return R(f,r),q(t,f)}),(function(t){throw M(f),t})):(R(f,r),q(u,f))}if(!t||"object"!=typeof t){if((u=n(t))===Z)return;return void 0===u&&(u=t),e.F&&x(u,!0),u}y(21,t);},this.produceWithPatches=function(t,n){return "function"==typeof t?function(n){for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.produceWithPatches(n,(function(e){return t.apply(void 0,[e].concat(o))}))}:[e.produce(t,n,(function(t,e){r=t,o=e;})),r,o];var r,o;},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze);}var e=t.prototype;return e.createDraft=function(t){g(t)||y(8),h(t)&&(t=G(t));var e=T(this),n=B(this,t,void 0);return n[et].C=!0,C(e),n},e.finishDraft=function(t,e){var n=(t&&t[et]).A;return R(n,e),q(void 0,n)},e.setAutoFreeze=function(t){this.F=t;},e.setUseProxies=function(t){t&&!Y&&y(20),this.g=t;},e.applyPatches=function(t,e){var n;for(n=e.length-1;n>=0;n--){var r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}var o=k("Patches").$;return h(t)?o(t,e):this.produce(t,(function(t){return o(t,e.slice(n+1))}))},t}()),at=ct.produce,lt=(ct.produceWithPatches.bind(ct),ct.setAutoFreeze.bind(ct),ct.setUseProxies.bind(ct),ct.applyPatches.bind(ct),ct.createDraft.bind(ct),ct.finishDraft.bind(ct),at);function st(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r);}return n}function dt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pt(Object(n),!0).forEach((function(e){st(t,e,n[e]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e));}));}return t}function vt(t){return "Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var yt="function"==typeof Symbol&&Symbol.observable||"@@observable",ht=function(){return Math.random().toString(36).substring(7).split("").join(".")},gt={INIT:"@@redux/INIT"+ht(),REPLACE:"@@redux/REPLACE"+ht(),PROBE_UNKNOWN_ACTION:function(){return "@@redux/PROBE_UNKNOWN_ACTION"+ht()}};function bt(t){if("object"!=typeof t||null===t)return !1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ot(t,e,n){var r;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(vt(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(vt(1));return n(Ot)(t,e)}if("function"!=typeof t)throw new Error(vt(2));var o=t,i=e,u=[],f=u,c=!1;function a(){f===u&&(f=u.slice());}function l(){if(c)throw new Error(vt(3));return i}function s(t){if("function"!=typeof t)throw new Error(vt(4));if(c)throw new Error(vt(5));var e=!0;return a(),f.push(t),function(){if(e){if(c)throw new Error(vt(6));e=!1,a();var n=f.indexOf(t);f.splice(n,1),u=null;}}}function p(t){if(!bt(t))throw new Error(vt(7));if(void 0===t.type)throw new Error(vt(8));if(c)throw new Error(vt(9));try{c=!0,i=o(i,t);}finally{c=!1;}for(var e=u=f,n=0;n<e.length;n++)(0, e[n])();return t}function d(t){if("function"!=typeof t)throw new Error(vt(10));o=t,p({type:gt.REPLACE});}function v(){var t,e=s;return (t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(vt(11));function n(){t.next&&t.next(l());}return n(),{unsubscribe:e(n)}}})[yt]=function(){return this},t}return p({type:gt.INIT}),(r={dispatch:p,subscribe:s,getState:l,replaceReducer:d})[yt]=v,r}function mt(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var o=e[r];"function"==typeof t[o]&&(n[o]=t[o]);}var i,u=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if(void 0===n(void 0,{type:gt.INIT}))throw new Error(vt(12));if(void 0===n(void 0,{type:gt.PROBE_UNKNOWN_ACTION()}))throw new Error(vt(13))}));}(n);}catch(t){i=t;}return function(t,e){if(void 0===t&&(t={}),i)throw i;for(var r=!1,o={},f=0;f<u.length;f++){var c=u[f],a=t[c],l=(0, n[c])(a,e);if(void 0===l)throw new Error(vt(14));o[c]=l,r=r||l!==a;}return (r=r||u.length!==Object.keys(t).length)?o:t}}function wt(t,e){return function(){return e(t.apply(this,arguments))}}function jt(t,e){if("function"==typeof t)return wt(t,e);if("object"!=typeof t||null===t)throw new Error(vt(16));var n={};for(var r in t){var o=t[r];"function"==typeof o&&(n[r]=wt(o,e));}return n}function Pt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Et(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),r=function(){throw new Error(vt(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=e.map((function(t){return t(o)}));return r=Pt.apply(void 0,i)(n.dispatch),dt(dt({},n),{},{dispatch:r})}}}function At(t,e){return t===e}function St(t,e,n){if(null===e||null===n||e.length!==n.length)return !1;for(var r=e.length,o=0;o<r;o++)if(!t(e[o],n[o]))return !1;return !0}function _t(t){var e=Array.isArray(t[0])?t[0]:t;if(!e.every((function(t){return "function"==typeof t}))){var n=e.map((function(t){return typeof t})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return e}var xt=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return function(){for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];var i=0,u=r.pop(),f=_t(r),c=t.apply(void 0,[function(){return i++,u.apply(null,arguments)}].concat(n)),a=t((function(){for(var t=[],e=f.length,n=0;n<e;n++)t.push(f[n].apply(null,arguments));return c.apply(null,t)}));return a.resultFunc=u,a.dependencies=f,a.recomputations=function(){return i},a.resetRecomputations=function(){return i=0},a}}((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:At,n=null,r=null;return function(){return St(e,n,arguments)||(r=t.apply(null,arguments)),n=arguments,r}})),It=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=xt.apply(void 0,t),r=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return n.apply(void 0,i([h(t)?G(t):t],e))};return r},Dt="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return "object"==typeof arguments[0]?Pt:Pt.apply(null,arguments)};function kt(t){if("object"!=typeof t||null===t)return !1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Nt(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(o){return "function"==typeof o?o(n,r,t):e(o)}}}}var Rt=Nt();Rt.withExtraArgument=Nt;var Mt=Rt,Ct=function(t){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.apply(this,n)||this;return Object.setPrototypeOf(o,e.prototype),o}return r(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,i([void 0],t[0].concat(this)))):new(e.bind.apply(e,i([void 0],t.concat(this))))},e}(Array);function Tt(t){var e=typeof t;return "undefined"===e||null===t||"string"===e||"boolean"===e||"number"===e||Array.isArray(t)||kt(t)}function Ft(t,e,n,r,o){var i;if(void 0===e&&(e=""),void 0===n&&(n=Tt),void 0===o&&(o=[]),!n(t))return {keyPath:e||"<root>",value:t};if("object"!=typeof t||null===t)return !1;for(var u=null!=r?r(t):Object.entries(t),f=o.length>0,c=0,a=u;c<a.length;c++){var l=a[c],s=l[0],p=l[1],d=e?e+"."+s:s;if(!(f&&o.indexOf(d)>=0)){if(!n(p))return {keyPath:d,value:p};if("object"==typeof p&&(i=Ft(p,d,n,r,o)))return i}}return !1}function qt(t){return function(){return function(t){return function(e){return t(e)}}}}function Wt(t){void 0===t&&(t={});var e=t.thunk,n=void 0===e||e,r=new Ct;return n&&r.push("boolean"==typeof n?Mt:Mt.withExtraArgument(n.extraArgument)),r}function zt(t){var e,n=function(t){return Wt(t)},r=t||{},o=r.reducer,u=void 0===o?void 0:o,f=r.middleware,c=void 0===f?n():f,a=r.devTools,l=void 0===a||a,s=r.preloadedState,p=void 0===s?void 0:s,v=r.enhancers,y=void 0===v?void 0:v;if("function"==typeof u)e=u;else {if(!kt(u))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=mt(u);}var h=c;"function"==typeof h&&(h=h(n));var g=Et.apply(void 0,h),b=Pt;l&&(b=Dt(d({trace:!1},"object"==typeof l&&l)));var O=[g];return Array.isArray(y)?O=i([g],y):"function"==typeof y&&(O=y(O)),Ot(e,p,b.apply(void 0,O))}function Kt(t,e){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(e){var o=e.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return d(d({type:t,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return {type:t,payload:n[0]}}return n.toString=function(){return ""+t},n.type=t,n.match=function(e){return e.type===t},n}function Ut(t){return ["type","payload","error","meta"].indexOf(t)>-1}function Lt(t){return ""+t}function Vt(t){var e,n={},r=[],o={addCase:function(t,e){var r="string"==typeof t?t:t.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=e,o},addMatcher:function(t,e){return r.push({matcher:t,reducer:e}),o},addDefaultCase:function(t){return e=t,o}};return t(o),[n,r,e]}function Xt(t,e,n,r){void 0===n&&(n=[]);var o="function"==typeof e?Vt(e):[e,n,r],u=o[0],f=o[1],c=o[2],a=lt(t,(function(){}));return function(t,e){void 0===t&&(t=a);var n=i([u[e.type]],f.filter((function(t){return (0, t.matcher)(e)})).map((function(t){return t.reducer})));return 0===n.filter((function(t){return !!t})).length&&(n=[c]),n.reduce((function(t,n){if(n){var r;if(h(t))return void 0===(r=n(t,e))?t:r;if(g(t))return lt(t,(function(t){return n(t,e)}));if(void 0===(r=n(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return t}),t)}}function Bt(t){var e=t.name,n=t.initialState;if(!e)throw new Error("`name` is a required option for createSlice");var r=t.reducers||{},o="function"==typeof t.extraReducers?Vt(t.extraReducers):[t.extraReducers],i=o[0],u=void 0===i?{}:i,f=o[1],c=void 0===f?[]:f,a=o[2],l=void 0===a?void 0:a,s=Object.keys(r),p={},v={},y={};s.forEach((function(t){var n,o,i=r[t],u=e+"/"+t;"reducer"in i?(n=i.reducer,o=i.prepare):n=i,p[t]=n,v[u]=n,y[t]=o?Kt(u,o):Kt(u);}));var h=Xt(n,d(d({},u),v),c,l);return {name:e,reducer:h,actions:y,caseReducers:p}}function Gt(t){return "object"!=typeof t||null==t||Object.isFrozen(t)}function Jt(t){return function(){return function(t){return function(e){return t(e)}}}}function $t(t){return function(e,n){var r=function(e){var r;kt(r=n)&&"string"==typeof r.type&&Object.keys(r).every(Ut)?t(n.payload,e):t(n,e);};return h(e)?(r(e),e):lt(e,r)}}function Ht(t,e){return e(t)}function Qt(t){return Array.isArray(t)||(t=Object.values(t)),t}function Yt(t,e,n){for(var r=[],o=[],i=0,u=t=Qt(t);i<u.length;i++){var f=u[i],c=Ht(f,e);c in n.entities?o.push({id:c,changes:f}):r.push(f);}return [r,o]}function Zt(t){function e(e,n){var r=Ht(e,t);r in n.entities||(n.ids.push(r),n.entities[r]=e);}function n(t,n){for(var r=0,o=t=Qt(t);r<o.length;r++)e(o[r],n);}function r(e,n){var r=Ht(e,t);r in n.entities||n.ids.push(r),n.entities[r]=e;}function o(t,e){var n=!1;t.forEach((function(t){t in e.entities&&(delete e.entities[t],n=!0);})),n&&(e.ids=e.ids.filter((function(t){return t in e.entities})));}function i(e,n){var r={},o={};e.forEach((function(t){t.id in n.entities&&(o[t.id]={id:t.id,changes:d(d({},o[t.id]?o[t.id].changes:null),t.changes)});})),(e=Object.values(o)).length>0&&e.filter((function(e){return function(e,n,r){var o=Object.assign({},r.entities[n.id],n.changes),i=Ht(o,t),u=i!==n.id;return u&&(e[n.id]=i,delete r.entities[n.id]),r.entities[i]=o,u}(r,e,n)})).length>0&&(n.ids=n.ids.map((function(t){return r[t]||t})));}function u(e,r){var o=Yt(e,t,r),u=o[0];i(o[1],r),n(u,r);}return {removeAll:(f=function(t){Object.assign(t,{ids:[],entities:{}});},c=$t((function(t,e){return f(e)})),function(t){return c(t,void 0)}),addOne:$t(e),addMany:$t(n),setOne:$t(r),setMany:$t((function(t,e){for(var n=0,o=t=Qt(t);n<o.length;n++)r(o[n],e);})),setAll:$t((function(t,e){t=Qt(t),e.ids=[],e.entities={},n(t,e);})),updateOne:$t((function(t,e){return i([t],e)})),updateMany:$t(i),upsertOne:$t((function(t,e){return u([t],e)})),upsertMany:$t(u),removeOne:$t((function(t,e){return o([t],e)})),removeMany:$t(o)};var f,c;}function te(t){void 0===t&&(t={});var e=d({sortComparer:!1,selectId:function(t){return t.id}},t),n=e.selectId,r=e.sortComparer,o={getInitialState:function(t){return void 0===t&&(t={}),Object.assign({ids:[],entities:{}},t)}},i={getSelectors:function(t){var e=function(t){return t.ids},n=function(t){return t.entities},r=It(e,n,(function(t,e){return t.map((function(t){return e[t]}))})),o=function(t,e){return e},i=function(t,e){return t[e]},u=It(e,(function(t){return t.length}));if(!t)return {selectIds:e,selectEntities:n,selectAll:r,selectTotal:u,selectById:It(n,o,i)};var f=It(t,n);return {selectIds:It(t,e),selectEntities:f,selectAll:It(t,r),selectTotal:It(t,u),selectById:It(f,o,i)}}},u=r?function(t,e){var n=Zt(t);function r(e,n){var r=(e=Qt(e)).filter((function(e){return !(Ht(e,t)in n.entities)}));0!==r.length&&f(r,n);}function o(t,e){0!==(t=Qt(t)).length&&f(t,e);}function i(e,n){var r=[];e.forEach((function(e){return function(e,n,r){if(!(n.id in r.entities))return !1;var o=Object.assign({},r.entities[n.id],n.changes),i=Ht(o,t);return delete r.entities[n.id],e.push(o),i!==n.id}(r,e,n)})),0!==r.length&&f(r,n);}function u(e,n){var o=Yt(e,t,n),u=o[0];i(o[1],n),r(u,n);}function f(n,r){n.forEach((function(e){r.entities[t(e)]=e;}));var o=Object.values(r.entities);o.sort(e);var i=o.map(t);(function(t,e){if(t.length!==e.length)return !1;for(var n=0;n<t.length&&n<e.length;n++)if(t[n]!==e[n])return !1;return !0})(r.ids,i)||(r.ids=i);}return {removeOne:n.removeOne,removeMany:n.removeMany,removeAll:n.removeAll,addOne:$t((function(t,e){return r([t],e)})),updateOne:$t((function(t,e){return i([t],e)})),upsertOne:$t((function(t,e){return u([t],e)})),setOne:$t((function(t,e){return o([t],e)})),setMany:$t(o),setAll:$t((function(t,e){t=Qt(t),e.entities={},e.ids=[],r(t,e);})),addMany:$t(r),updateMany:$t(i),upsertMany:$t(u)}}(n,r):Zt(n);return d(d(d({selectId:n,sortComparer:r},o),i),u)}var ee=function(t){void 0===t&&(t=21);for(var e="",n=t;n--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e},ne=["name","message","stack","code"],re=function(t,e){this.payload=t,this.meta=e;},oe=function(t,e){this.payload=t,this.meta=e;},ie=function(t){if("object"==typeof t&&null!==t){for(var e={},n=0,r=ne;n<r.length;n++){var o=r[n];"string"==typeof t[o]&&(e[o]=t[o]);}return e}return {message:String(t)}};function ue(t,e,n){var r=Kt(t+"/fulfilled",(function(t,e,n,r){return {payload:t,meta:v(d({},r||{}),{arg:n,requestId:e,requestStatus:"fulfilled"})}})),i=Kt(t+"/pending",(function(t,e,n){return {payload:void 0,meta:v(d({},n||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),u=Kt(t+"/rejected",(function(t,e,r,o,i){return {payload:o,error:(n&&n.serializeError||ie)(t||"Rejected"),meta:v(d({},i||{}),{arg:r,requestId:e,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),f="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return !1},onabort:function(){},removeEventListener:function(){}};}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(c,a,l){var s,p,d=(null!=(s=null==n?void 0:n.idGenerator)?s:ee)(),v=new f,y=new Promise((function(t,e){return v.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:p||"Aborted"})}))})),h=!1,g=function(){return f=this,s=function(){var f,s,p;return o(this,(function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),n&&n.condition&&!1===n.condition(t,{getState:a,extra:l}))throw {name:"ConditionError",message:"Aborted due to condition callback returning false."};return h=!0,c(i(d,t,null==(f=null==n?void 0:n.getPendingMeta)?void 0:f.call(n,{requestId:d,arg:t},{getState:a,extra:l}))),[4,Promise.race([y,Promise.resolve(e(t,{dispatch:c,getState:a,extra:l,requestId:d,signal:v.signal,rejectWithValue:function(t,e){return new re(t,e)},fulfillWithValue:function(t,e){return new oe(t,e)}})).then((function(e){if(e instanceof re)throw e;return e instanceof oe?r(e.payload,d,t,e.meta):r(e,d,t)}))])];case 1:return s=o.sent(),[3,3];case 2:return p=o.sent(),s=p instanceof re?u(null,d,t,p.payload,p.meta):u(p,d,t),[3,3];case 3:return n&&!n.dispatchConditionRejection&&u.match(s)&&s.meta.condition||c(s),[2,s]}}))},new Promise((function(t,e){var n=function(t){try{o(s.next(t));}catch(t){e(t);}},r=function(t){try{o(s.throw(t));}catch(t){e(t);}},o=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(n,r)};o((s=s.apply(f,null)).next());}));var f,s;}();return Object.assign(g,{abort:function(t){h&&(p=t,v.abort());},requestId:d,arg:t,unwrap:function(){return g.then(fe)}})}}),{pending:i,rejected:u,fulfilled:r,typePrefix:t})}function fe(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}var ce=function(t,e){return (n=t)&&"function"==typeof n.match?t.match(e):t(e);var n;};function ae(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.some((function(t){return ce(t,e)}))}}function le(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.every((function(t){return ce(t,e)}))}}function se(t,e){if(!t||!t.meta)return !1;var n="string"==typeof t.meta.requestId,r=e.indexOf(t.meta.requestStatus)>-1;return n&&r}function pe(t){return "function"==typeof t[0]&&"pending"in t[0]&&"fulfilled"in t[0]&&"rejected"in t[0]}function de(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return se(t,["pending"])}:pe(t)?function(e){var n=t.map((function(t){return t.pending}));return ae.apply(void 0,n)(e)}:de()(t[0])}function ve(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return se(t,["rejected"])}:pe(t)?function(e){var n=t.map((function(t){return t.rejected}));return ae.apply(void 0,n)(e)}:ve()(t[0])}function ye(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=function(t){return t&&t.meta&&t.meta.rejectedWithValue};return 0===t.length||pe(t)?function(e){return le(ve.apply(void 0,t),n)(e)}:ye()(t[0])}function he(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return se(t,["fulfilled"])}:pe(t)?function(e){var n=t.map((function(t){return t.fulfilled}));return ae.apply(void 0,n)(e)}:he()(t[0])}function ge(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return se(t,["pending","fulfilled","rejected"])}:pe(t)?function(e){for(var n=[],r=0,o=t;r<o.length;r++){var i=o[r];n.push(i.pending,i.rejected,i.fulfilled);}return ae.apply(void 0,n)(e)}:ge()(t[0])}!function(){function t(t,e){var n=o[t];return n?n.enumerable=e:o[t]=n={configurable:!0,enumerable:e,get:function(){return ut.get(this[et],t)},set:function(e){ut.set(this[et],t,e);}},n}function e(t){for(var e=t.length-1;e>=0;e--){var o=t[e][et];if(!o.P)switch(o.i){case 5:r(o)&&V(o);break;case 4:n(o)&&V(o);}}}function n(t){for(var e=t.t,n=t.k,r=rt(n),o=r.length-1;o>=0;o--){var i=r[o];if(i!==et){var u=e[i];if(void 0===u&&!w(e,i))return !0;var f=n[i],c=f&&f[et];if(c?c.t!==u:!P(f,u))return !0}}var a=!!e[et];return r.length!==rt(e).length+(a?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return !0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);return !(!n||n.get)}var o={};it.ES5||(it.ES5={J:function(e,n){var r=Array.isArray(e),o=function(e,n){if(e){for(var r=Array(n.length),o=0;o<n.length;o++)Object.defineProperty(r,""+o,t(o,!0));return r}var i=ot(n);delete i[et];for(var u=rt(i),f=0;f<u.length;f++){var c=u[f];i[c]=t(c,e||!!i[c].enumerable);}return Object.create(Object.getPrototypeOf(n),i)}(r,e),i={i:r?5:4,A:n?n.A:N(),P:!1,I:!1,D:{},l:n,t:e,k:o,o:null,O:!1,C:!1};return Object.defineProperty(o,et,{value:i,writable:!0}),o},S:function(t,n,o){o?h(n)&&n[et].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var n=e[et];if(n){var o=n.t,i=n.k,u=n.D,f=n.i;if(4===f)O(i,(function(e){e!==et&&(void 0!==o[e]||w(o,e)?u[e]||t(i[e]):(u[e]=!0,V(n)));})),O(o,(function(t){void 0!==i[t]||w(i,t)||(u[t]=!1,V(n));}));else if(5===f){if(r(n)&&(V(n),u.length=!0),i.length<o.length)for(var c=i.length;c<o.length;c++)u[c]=!1;else for(var a=o.length;a<i.length;a++)u[a]=!0;for(var l=Math.min(i.length,o.length),s=0;s<l;s++)void 0===u[s]&&t(i[s]);}}}}(t.p[0]),e(t.p));},K:function(t){return 4===t.i?n(t):r(t)}});}();
|
||
-
|
||
- exports.MiddlewareArray = Ct;
|
||
- exports.__DO_NOT_USE__ActionTypes = gt;
|
||
- exports.applyMiddleware = Et;
|
||
- exports.bindActionCreators = jt;
|
||
- exports.combineReducers = mt;
|
||
- exports.compose = Pt;
|
||
- exports.configureStore = zt;
|
||
- exports.createAction = Kt;
|
||
- exports.createAsyncThunk = ue;
|
||
- exports.createDraftSafeSelector = It;
|
||
- exports.createEntityAdapter = te;
|
||
- exports.createImmutableStateInvariantMiddleware = Jt;
|
||
- exports.createNextState = lt;
|
||
- exports.createReducer = Xt;
|
||
- exports.createSelector = xt;
|
||
- exports.createSerializableStateInvariantMiddleware = qt;
|
||
- exports.createSlice = Bt;
|
||
- exports.createStore = Ot;
|
||
- exports.current = G;
|
||
- exports.findNonSerializableValue = Ft;
|
||
- exports.freeze = x;
|
||
- exports.getDefaultMiddleware = Wt;
|
||
- exports.getType = Lt;
|
||
- exports.isAllOf = le;
|
||
- exports.isAnyOf = ae;
|
||
- exports.isAsyncThunkAction = ge;
|
||
- exports.isDraft = h;
|
||
- exports.isFulfilled = he;
|
||
- exports.isImmutableDefault = Gt;
|
||
- exports.isPending = de;
|
||
- exports.isPlain = Tt;
|
||
- exports.isPlainObject = kt;
|
||
- exports.isRejected = ve;
|
||
- exports.isRejectedWithValue = ye;
|
||
- exports.miniSerializeError = ie;
|
||
- exports.nanoid = ee;
|
||
- exports.original = b;
|
||
- exports.unwrapResult = fe;
|
||
-
|
||
- Object.defineProperty(exports, '__esModule', { value: true });
|
||
-
|
||
-})));
|
||
-//# sourceMappingURL=redux-toolkit.umd.min.js.map
|
||
diff --git a/dist/redux-toolkit.umd.min.js.map b/dist/redux-toolkit.umd.min.js.map
|
||
deleted file mode 100644
|
||
index 4e2fdfa1c6bc48c82e3a844fe471d3a6d8cdf952..0000000000000000000000000000000000000000
|
||
--- a/dist/redux-toolkit.umd.min.js.map
|
||
+++ /dev/null
|
||
@@ -1 +0,0 @@
|
||
-{"version":3,"file":"redux-toolkit.umd.min.js","sources":["redux-toolkit.umd.min.js"],"sourcesContent":["var t,e,n,r=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if(\"function\"!=typeof n&&null!==n)throw new TypeError(\"Class extends value \"+String(n)+\" is not a constructor or null\");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),o=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:f(0),throw:f(1),return:f(2)},\"function\"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function f(i){return function(f){return function(i){if(n)throw new TypeError(\"Generator is already executing.\");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,f])}}},i=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},u=Object.defineProperty,f=Object.defineProperties,c=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,p=function(t,e,n){return e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},d=function(t,e){for(var n in e||(e={}))l.call(e,n)&&p(t,n,e[n]);if(a)for(var r=0,o=a(e);r<o.length;r++)s.call(e,n=o[r])&&p(t,n,e[n]);return t},v=function(t,e){return f(t,c(e))};function y(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw Error(\"[Immer] minified error nr: \"+t+(n.length?\" \"+n.map((function(t){return\"'\"+t+\"'\"})).join(\",\"):\"\")+\". Find the full error at: https://bit.ly/3cXEKWf\")}function h(t){return!!t&&!!t[et]}function g(t){return!!t&&(function(t){if(!t||\"object\"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var n=Object.hasOwnProperty.call(e,\"constructor\")&&e.constructor;return n===Object||\"function\"==typeof n&&Function.toString.call(n)===nt}(t)||Array.isArray(t)||!!t[tt]||!!t.constructor[tt]||E(t)||A(t))}function b(t){return h(t)||y(23,t),t[et].t}function O(t,e,n){void 0===n&&(n=!1),0===m(t)?(n?Object.keys:rt)(t).forEach((function(r){n&&\"symbol\"==typeof r||e(r,t[r],t)})):t.forEach((function(n,r){return e(r,n,t)}))}function m(t){var e=t[et];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:E(t)?2:A(t)?3:0}function w(t,e){return 2===m(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function j(t,e,n){var r=m(t);2===r?t.set(e,n):3===r?(t.delete(e),t.add(n)):t[e]=n}function P(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function E(t){return H&&t instanceof Map}function A(t){return Q&&t instanceof Set}function S(t){return t.o||t.t}function _(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=ot(t);delete e[et];for(var n=rt(e),r=0;r<n.length;r++){var o=n[r],i=e[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[o]})}return Object.create(Object.getPrototypeOf(t),e)}function x(t,e){return void 0===e&&(e=!1),D(t)||h(t)||!g(t)||(m(t)>1&&(t.set=t.add=t.clear=t.delete=I),Object.freeze(t),e&&O(t,(function(t,e){return x(e,!0)}),!0)),t}function I(){y(2)}function D(t){return null==t||\"object\"!=typeof t||Object.isFrozen(t)}function k(t){var e=it[t];return e||y(18,t),e}function N(){return n}function R(t,e){e&&(k(\"Patches\"),t.u=[],t.s=[],t.v=e)}function M(t){C(t),t.p.forEach(F),t.p=null}function C(t){t===n&&(n=t.l)}function T(t){return n={p:[],l:n,h:t,m:!0,_:0}}function F(t){var e=t[et];0===e.i||1===e.i?e.j():e.O=!0}function q(t,e){e._=e.p.length;var n=e.p[0],r=void 0!==t&&t!==n;return e.h.g||k(\"ES5\").S(e,t,r),r?(n[et].P&&(M(e),y(4)),g(t)&&(t=W(e,t),e.l||K(e,t)),e.u&&k(\"Patches\").M(n[et],t,e.u,e.s)):t=W(e,n,[]),M(e),e.u&&e.v(e.u,e.s),t!==Z?t:void 0}function W(t,e,n){if(D(e))return e;var r=e[et];if(!r)return O(e,(function(o,i){return z(t,r,e,o,i,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return K(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=_(r.k):r.o;O(3===r.i?new Set(o):o,(function(e,i){return z(t,r,o,e,i,n)})),K(t,o,!1),n&&t.u&&k(\"Patches\").R(r,n,t.u,t.s)}return r.o}function z(t,e,n,r,o,i){if(h(o)){var u=W(t,o,i&&e&&3!==e.i&&!w(e.D,r)?i.concat(r):void 0);if(j(n,r,u),!h(u))return;t.m=!1}if(g(o)&&!D(o)){if(!t.h.F&&t._<1)return;W(t,o),e&&e.A.l||K(t,o)}}function K(t,e,n){void 0===n&&(n=!1),t.h.F&&t.m&&x(e,n)}function U(t,e){var n=t[et];return(n?S(n):t)[e]}function L(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function V(t){t.P||(t.P=!0,t.l&&V(t.l))}function X(t){t.o||(t.o=_(t.t))}function B(t,e,n){var r=E(e)?k(\"MapSet\").N(e,n):A(e)?k(\"MapSet\").T(e,n):t.g?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:N(),P:!1,I:!1,D:{},l:e,t:t,k:null,o:null,j:null,C:!1},o=r,i=ut;n&&(o=[r],i=ft);var u=Proxy.revocable(o,i),f=u.revoke,c=u.proxy;return r.k=c,r.j=f,c}(e,n):k(\"ES5\").J(e,n);return(n?n.A:N()).p.push(r),r}function G(t){return h(t)||y(22,t),function t(e){if(!g(e))return e;var n,r=e[et],o=m(e);if(r){if(!r.P&&(r.i<4||!k(\"ES5\").K(r)))return r.t;r.I=!0,n=J(e,o),r.I=!1}else n=J(e,o);return O(n,(function(e,o){r&&function(t,e){return 2===m(t)?t.get(e):t[e]}(r.t,e)===o||j(n,e,t(o))})),3===o?new Set(n):n}(t)}function J(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return _(t)}var $=\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol(\"x\"),H=\"undefined\"!=typeof Map,Q=\"undefined\"!=typeof Set,Y=\"undefined\"!=typeof Proxy&&void 0!==Proxy.revocable&&\"undefined\"!=typeof Reflect,Z=$?Symbol.for(\"immer-nothing\"):((e={})[\"immer-nothing\"]=!0,e),tt=$?Symbol.for(\"immer-draftable\"):\"__$immer_draftable\",et=$?Symbol.for(\"immer-state\"):\"__$immer_state\",nt=(\"undefined\"!=typeof Symbol&&Symbol,\"\"+Object.prototype.constructor),rt=\"undefined\"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,ot=Object.getOwnPropertyDescriptors||function(t){var e={};return rt(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},it={},ut={get:function(t,e){if(e===et)return t;var n,r,o,i=S(t);if(!w(i,e))return n=t,(o=L(i,e))?\"value\"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(n.k):void 0;var u=i[e];return t.I||!g(u)?u:u===U(t.t,e)?(X(t),t.o[e]=B(t.A.h,u,t)):u},has:function(t,e){return e in S(t)},ownKeys:function(t){return Reflect.ownKeys(S(t))},set:function(t,e,n){var r=L(S(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(!t.P){var o=U(S(t),e),i=null==o?void 0:o[et];if(i&&i.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(P(n,o)&&(void 0!==n||w(t.t,e)))return!0;X(t),V(t)}return t.o[e]===n&&\"number\"!=typeof n&&(void 0!==n||e in t.o)||(t.o[e]=n,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==U(t.t,e)||e in t.t?(t.D[e]=!1,X(t),V(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=S(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||\"length\"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){y(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){y(12)}},ft={};O(ut,(function(t,e){ft[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),ft.deleteProperty=function(t,e){return ut.deleteProperty.call(this,t[0],e)},ft.set=function(t,e,n){return ut.set.call(this,t[0],e,n,t[0])};var ct=new(function(){function t(t){var e=this;this.g=Y,this.F=!0,this.produce=function(t,n,r){if(\"function\"==typeof t&&\"function\"!=typeof n){var o=n;n=t;var i=e;return function(t){var e=this;void 0===t&&(t=o);for(var r=arguments.length,u=Array(r>1?r-1:0),f=1;f<r;f++)u[f-1]=arguments[f];return i.produce(t,(function(t){var r;return(r=n).call.apply(r,[e,t].concat(u))}))}}var u;if(\"function\"!=typeof n&&y(6),void 0!==r&&\"function\"!=typeof r&&y(7),g(t)){var f=T(e),c=B(e,t,void 0),a=!0;try{u=n(c),a=!1}finally{a?M(f):C(f)}return\"undefined\"!=typeof Promise&&u instanceof Promise?u.then((function(t){return R(f,r),q(t,f)}),(function(t){throw M(f),t})):(R(f,r),q(u,f))}if(!t||\"object\"!=typeof t){if((u=n(t))===Z)return;return void 0===u&&(u=t),e.F&&x(u,!0),u}y(21,t)},this.produceWithPatches=function(t,n){return\"function\"==typeof t?function(n){for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.produceWithPatches(n,(function(e){return t.apply(void 0,[e].concat(o))}))}:[e.produce(t,n,(function(t,e){r=t,o=e})),r,o];var r,o},\"boolean\"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),\"boolean\"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){g(t)||y(8),h(t)&&(t=G(t));var e=T(this),n=B(this,t,void 0);return n[et].C=!0,C(e),n},e.finishDraft=function(t,e){var n=(t&&t[et]).A;return R(n,e),q(void 0,n)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!Y&&y(20),this.g=t},e.applyPatches=function(t,e){var n;for(n=e.length-1;n>=0;n--){var r=e[n];if(0===r.path.length&&\"replace\"===r.op){t=r.value;break}}var o=k(\"Patches\").$;return h(t)?o(t,e):this.produce(t,(function(t){return o(t,e.slice(n+1))}))},t}()),at=ct.produce,lt=(ct.produceWithPatches.bind(ct),ct.setAutoFreeze.bind(ct),ct.setUseProxies.bind(ct),ct.applyPatches.bind(ct),ct.createDraft.bind(ct),ct.finishDraft.bind(ct),at);function st(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function dt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pt(Object(n),!0).forEach((function(e){st(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function vt(t){return\"Minified Redux error #\"+t+\"; visit https://redux.js.org/Errors?code=\"+t+\" for the full message or use the non-minified dev environment for full errors. \"}var yt=\"function\"==typeof Symbol&&Symbol.observable||\"@@observable\",ht=function(){return Math.random().toString(36).substring(7).split(\"\").join(\".\")},gt={INIT:\"@@redux/INIT\"+ht(),REPLACE:\"@@redux/REPLACE\"+ht(),PROBE_UNKNOWN_ACTION:function(){return\"@@redux/PROBE_UNKNOWN_ACTION\"+ht()}};function bt(t){if(\"object\"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ot(t,e,n){var r;if(\"function\"==typeof e&&\"function\"==typeof n||\"function\"==typeof n&&\"function\"==typeof arguments[3])throw new Error(vt(0));if(\"function\"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if(\"function\"!=typeof n)throw new Error(vt(1));return n(Ot)(t,e)}if(\"function\"!=typeof t)throw new Error(vt(2));var o=t,i=e,u=[],f=u,c=!1;function a(){f===u&&(f=u.slice())}function l(){if(c)throw new Error(vt(3));return i}function s(t){if(\"function\"!=typeof t)throw new Error(vt(4));if(c)throw new Error(vt(5));var e=!0;return a(),f.push(t),function(){if(e){if(c)throw new Error(vt(6));e=!1,a();var n=f.indexOf(t);f.splice(n,1),u=null}}}function p(t){if(!bt(t))throw new Error(vt(7));if(void 0===t.type)throw new Error(vt(8));if(c)throw new Error(vt(9));try{c=!0,i=o(i,t)}finally{c=!1}for(var e=u=f,n=0;n<e.length;n++)(0,e[n])();return t}function d(t){if(\"function\"!=typeof t)throw new Error(vt(10));o=t,p({type:gt.REPLACE})}function v(){var t,e=s;return(t={subscribe:function(t){if(\"object\"!=typeof t||null===t)throw new Error(vt(11));function n(){t.next&&t.next(l())}return n(),{unsubscribe:e(n)}}})[yt]=function(){return this},t}return p({type:gt.INIT}),(r={dispatch:p,subscribe:s,getState:l,replaceReducer:d})[yt]=v,r}function mt(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var o=e[r];\"function\"==typeof t[o]&&(n[o]=t[o])}var i,u=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if(void 0===n(void 0,{type:gt.INIT}))throw new Error(vt(12));if(void 0===n(void 0,{type:gt.PROBE_UNKNOWN_ACTION()}))throw new Error(vt(13))}))}(n)}catch(t){i=t}return function(t,e){if(void 0===t&&(t={}),i)throw i;for(var r=!1,o={},f=0;f<u.length;f++){var c=u[f],a=t[c],l=(0,n[c])(a,e);if(void 0===l)throw new Error(vt(14));o[c]=l,r=r||l!==a}return(r=r||u.length!==Object.keys(t).length)?o:t}}function wt(t,e){return function(){return e(t.apply(this,arguments))}}function jt(t,e){if(\"function\"==typeof t)return wt(t,e);if(\"object\"!=typeof t||null===t)throw new Error(vt(16));var n={};for(var r in t){var o=t[r];\"function\"==typeof o&&(n[r]=wt(o,e))}return n}function Pt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Et(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),r=function(){throw new Error(vt(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=e.map((function(t){return t(o)}));return r=Pt.apply(void 0,i)(n.dispatch),dt(dt({},n),{},{dispatch:r})}}}function At(t,e){return t===e}function St(t,e,n){if(null===e||null===n||e.length!==n.length)return!1;for(var r=e.length,o=0;o<r;o++)if(!t(e[o],n[o]))return!1;return!0}function _t(t){var e=Array.isArray(t[0])?t[0]:t;if(!e.every((function(t){return\"function\"==typeof t}))){var n=e.map((function(t){return typeof t})).join(\", \");throw new Error(\"Selector creators expect all input-selectors to be functions, instead received the following types: [\"+n+\"]\")}return e}var xt=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return function(){for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];var i=0,u=r.pop(),f=_t(r),c=t.apply(void 0,[function(){return i++,u.apply(null,arguments)}].concat(n)),a=t((function(){for(var t=[],e=f.length,n=0;n<e;n++)t.push(f[n].apply(null,arguments));return c.apply(null,t)}));return a.resultFunc=u,a.dependencies=f,a.recomputations=function(){return i},a.resetRecomputations=function(){return i=0},a}}((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:At,n=null,r=null;return function(){return St(e,n,arguments)||(r=t.apply(null,arguments)),n=arguments,r}})),It=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=xt.apply(void 0,t),r=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return n.apply(void 0,i([h(t)?G(t):t],e))};return r},Dt=\"undefined\"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return\"object\"==typeof arguments[0]?Pt:Pt.apply(null,arguments)};function kt(t){if(\"object\"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Nt(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(o){return\"function\"==typeof o?o(n,r,t):e(o)}}}}\"undefined\"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window;var Rt=Nt();Rt.withExtraArgument=Nt;var Mt=Rt,Ct=function(t){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.apply(this,n)||this;return Object.setPrototypeOf(o,e.prototype),o}return r(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,i([void 0],t[0].concat(this)))):new(e.bind.apply(e,i([void 0],t.concat(this))))},e}(Array);function Tt(t){var e=typeof t;return\"undefined\"===e||null===t||\"string\"===e||\"boolean\"===e||\"number\"===e||Array.isArray(t)||kt(t)}function Ft(t,e,n,r,o){var i;if(void 0===e&&(e=\"\"),void 0===n&&(n=Tt),void 0===o&&(o=[]),!n(t))return{keyPath:e||\"<root>\",value:t};if(\"object\"!=typeof t||null===t)return!1;for(var u=null!=r?r(t):Object.entries(t),f=o.length>0,c=0,a=u;c<a.length;c++){var l=a[c],s=l[0],p=l[1],d=e?e+\".\"+s:s;if(!(f&&o.indexOf(d)>=0)){if(!n(p))return{keyPath:d,value:p};if(\"object\"==typeof p&&(i=Ft(p,d,n,r,o)))return i}}return!1}function qt(t){return void 0===t&&(t={}),function(){return function(t){return function(e){return t(e)}}}}function Wt(t){void 0===t&&(t={});var e=t.thunk,n=void 0===e||e,r=new Ct;return n&&r.push(\"boolean\"==typeof n?Mt:Mt.withExtraArgument(n.extraArgument)),r}function zt(t){var e,n=function(t){return Wt(t)},r=t||{},o=r.reducer,u=void 0===o?void 0:o,f=r.middleware,c=void 0===f?n():f,a=r.devTools,l=void 0===a||a,s=r.preloadedState,p=void 0===s?void 0:s,v=r.enhancers,y=void 0===v?void 0:v;if(\"function\"==typeof u)e=u;else{if(!kt(u))throw new Error('\"reducer\" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=mt(u)}var h=c;\"function\"==typeof h&&(h=h(n));var g=Et.apply(void 0,h),b=Pt;l&&(b=Dt(d({trace:!1},\"object\"==typeof l&&l)));var O=[g];return Array.isArray(y)?O=i([g],y):\"function\"==typeof y&&(O=y(O)),Ot(e,p,b.apply(void 0,O))}function Kt(t,e){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(e){var o=e.apply(void 0,n);if(!o)throw new Error(\"prepareAction did not return an object\");return d(d({type:t,payload:o.payload},\"meta\"in o&&{meta:o.meta}),\"error\"in o&&{error:o.error})}return{type:t,payload:n[0]}}return n.toString=function(){return\"\"+t},n.type=t,n.match=function(e){return e.type===t},n}function Ut(t){return[\"type\",\"payload\",\"error\",\"meta\"].indexOf(t)>-1}function Lt(t){return\"\"+t}function Vt(t){var e,n={},r=[],o={addCase:function(t,e){var r=\"string\"==typeof t?t:t.type;if(r in n)throw new Error(\"addCase cannot be called with two reducers for the same action type\");return n[r]=e,o},addMatcher:function(t,e){return r.push({matcher:t,reducer:e}),o},addDefaultCase:function(t){return e=t,o}};return t(o),[n,r,e]}function Xt(t,e,n,r){void 0===n&&(n=[]);var o=\"function\"==typeof e?Vt(e):[e,n,r],u=o[0],f=o[1],c=o[2],a=lt(t,(function(){}));return function(t,e){void 0===t&&(t=a);var n=i([u[e.type]],f.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===n.filter((function(t){return!!t})).length&&(n=[c]),n.reduce((function(t,n){if(n){var r;if(h(t))return void 0===(r=n(t,e))?t:r;if(g(t))return lt(t,(function(t){return n(t,e)}));if(void 0===(r=n(t,e))){if(null===t)return t;throw Error(\"A case reducer on a non-draftable value must not return undefined\")}return r}return t}),t)}}function Bt(t){var e=t.name,n=t.initialState;if(!e)throw new Error(\"`name` is a required option for createSlice\");var r=t.reducers||{},o=\"function\"==typeof t.extraReducers?Vt(t.extraReducers):[t.extraReducers],i=o[0],u=void 0===i?{}:i,f=o[1],c=void 0===f?[]:f,a=o[2],l=void 0===a?void 0:a,s=Object.keys(r),p={},v={},y={};s.forEach((function(t){var n,o,i=r[t],u=e+\"/\"+t;\"reducer\"in i?(n=i.reducer,o=i.prepare):n=i,p[t]=n,v[u]=n,y[t]=o?Kt(u,o):Kt(u)}));var h=Xt(n,d(d({},u),v),c,l);return{name:e,reducer:h,actions:y,caseReducers:p}}function Gt(t){return\"object\"!=typeof t||null==t||Object.isFrozen(t)}function Jt(t){return void 0===t&&(t={}),function(){return function(t){return function(e){return t(e)}}}}function $t(t){return function(e,n){var r=function(e){var r;kt(r=n)&&\"string\"==typeof r.type&&Object.keys(r).every(Ut)?t(n.payload,e):t(n,e)};return h(e)?(r(e),e):lt(e,r)}}function Ht(t,e){return e(t)}function Qt(t){return Array.isArray(t)||(t=Object.values(t)),t}function Yt(t,e,n){for(var r=[],o=[],i=0,u=t=Qt(t);i<u.length;i++){var f=u[i],c=Ht(f,e);c in n.entities?o.push({id:c,changes:f}):r.push(f)}return[r,o]}function Zt(t){function e(e,n){var r=Ht(e,t);r in n.entities||(n.ids.push(r),n.entities[r]=e)}function n(t,n){for(var r=0,o=t=Qt(t);r<o.length;r++)e(o[r],n)}function r(e,n){var r=Ht(e,t);r in n.entities||n.ids.push(r),n.entities[r]=e}function o(t,e){var n=!1;t.forEach((function(t){t in e.entities&&(delete e.entities[t],n=!0)})),n&&(e.ids=e.ids.filter((function(t){return t in e.entities})))}function i(e,n){var r={},o={};e.forEach((function(t){t.id in n.entities&&(o[t.id]={id:t.id,changes:d(d({},o[t.id]?o[t.id].changes:null),t.changes)})})),(e=Object.values(o)).length>0&&e.filter((function(e){return function(e,n,r){var o=Object.assign({},r.entities[n.id],n.changes),i=Ht(o,t),u=i!==n.id;return u&&(e[n.id]=i,delete r.entities[n.id]),r.entities[i]=o,u}(r,e,n)})).length>0&&(n.ids=n.ids.map((function(t){return r[t]||t})))}function u(e,r){var o=Yt(e,t,r),u=o[0];i(o[1],r),n(u,r)}return{removeAll:(f=function(t){Object.assign(t,{ids:[],entities:{}})},c=$t((function(t,e){return f(e)})),function(t){return c(t,void 0)}),addOne:$t(e),addMany:$t(n),setOne:$t(r),setMany:$t((function(t,e){for(var n=0,o=t=Qt(t);n<o.length;n++)r(o[n],e)})),setAll:$t((function(t,e){t=Qt(t),e.ids=[],e.entities={},n(t,e)})),updateOne:$t((function(t,e){return i([t],e)})),updateMany:$t(i),upsertOne:$t((function(t,e){return u([t],e)})),upsertMany:$t(u),removeOne:$t((function(t,e){return o([t],e)})),removeMany:$t(o)};var f,c}function te(t){void 0===t&&(t={});var e=d({sortComparer:!1,selectId:function(t){return t.id}},t),n=e.selectId,r=e.sortComparer,o={getInitialState:function(t){return void 0===t&&(t={}),Object.assign({ids:[],entities:{}},t)}},i={getSelectors:function(t){var e=function(t){return t.ids},n=function(t){return t.entities},r=It(e,n,(function(t,e){return t.map((function(t){return e[t]}))})),o=function(t,e){return e},i=function(t,e){return t[e]},u=It(e,(function(t){return t.length}));if(!t)return{selectIds:e,selectEntities:n,selectAll:r,selectTotal:u,selectById:It(n,o,i)};var f=It(t,n);return{selectIds:It(t,e),selectEntities:f,selectAll:It(t,r),selectTotal:It(t,u),selectById:It(f,o,i)}}},u=r?function(t,e){var n=Zt(t);function r(e,n){var r=(e=Qt(e)).filter((function(e){return!(Ht(e,t)in n.entities)}));0!==r.length&&f(r,n)}function o(t,e){0!==(t=Qt(t)).length&&f(t,e)}function i(e,n){var r=[];e.forEach((function(e){return function(e,n,r){if(!(n.id in r.entities))return!1;var o=Object.assign({},r.entities[n.id],n.changes),i=Ht(o,t);return delete r.entities[n.id],e.push(o),i!==n.id}(r,e,n)})),0!==r.length&&f(r,n)}function u(e,n){var o=Yt(e,t,n),u=o[0];i(o[1],n),r(u,n)}function f(n,r){n.forEach((function(e){r.entities[t(e)]=e}));var o=Object.values(r.entities);o.sort(e);var i=o.map(t);(function(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(t[n]!==e[n])return!1;return!0})(r.ids,i)||(r.ids=i)}return{removeOne:n.removeOne,removeMany:n.removeMany,removeAll:n.removeAll,addOne:$t((function(t,e){return r([t],e)})),updateOne:$t((function(t,e){return i([t],e)})),upsertOne:$t((function(t,e){return u([t],e)})),setOne:$t((function(t,e){return o([t],e)})),setMany:$t(o),setAll:$t((function(t,e){t=Qt(t),e.entities={},e.ids=[],r(t,e)})),addMany:$t(r),updateMany:$t(i),upsertMany:$t(u)}}(n,r):Zt(n);return d(d(d({selectId:n,sortComparer:r},o),i),u)}var ee=function(t){void 0===t&&(t=21);for(var e=\"\",n=t;n--;)e+=\"ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW\"[64*Math.random()|0];return e},ne=[\"name\",\"message\",\"stack\",\"code\"],re=function(t,e){this.payload=t,this.meta=e},oe=function(t,e){this.payload=t,this.meta=e},ie=function(t){if(\"object\"==typeof t&&null!==t){for(var e={},n=0,r=ne;n<r.length;n++){var o=r[n];\"string\"==typeof t[o]&&(e[o]=t[o])}return e}return{message:String(t)}};function ue(t,e,n){var r=Kt(t+\"/fulfilled\",(function(t,e,n,r){return{payload:t,meta:v(d({},r||{}),{arg:n,requestId:e,requestStatus:\"fulfilled\"})}})),i=Kt(t+\"/pending\",(function(t,e,n){return{payload:void 0,meta:v(d({},n||{}),{arg:e,requestId:t,requestStatus:\"pending\"})}})),u=Kt(t+\"/rejected\",(function(t,e,r,o,i){return{payload:o,error:(n&&n.serializeError||ie)(t||\"Rejected\"),meta:v(d({},i||{}),{arg:r,requestId:e,rejectedWithValue:!!o,requestStatus:\"rejected\",aborted:\"AbortError\"===(null==t?void 0:t.name),condition:\"ConditionError\"===(null==t?void 0:t.name)})}})),f=\"undefined\"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(c,a,l){var s,p,d=(null!=(s=null==n?void 0:n.idGenerator)?s:ee)(),v=new f,y=new Promise((function(t,e){return v.signal.addEventListener(\"abort\",(function(){return e({name:\"AbortError\",message:p||\"Aborted\"})}))})),h=!1,g=function(){return f=this,s=function(){var f,s,p;return o(this,(function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),n&&n.condition&&!1===n.condition(t,{getState:a,extra:l}))throw{name:\"ConditionError\",message:\"Aborted due to condition callback returning false.\"};return h=!0,c(i(d,t,null==(f=null==n?void 0:n.getPendingMeta)?void 0:f.call(n,{requestId:d,arg:t},{getState:a,extra:l}))),[4,Promise.race([y,Promise.resolve(e(t,{dispatch:c,getState:a,extra:l,requestId:d,signal:v.signal,rejectWithValue:function(t,e){return new re(t,e)},fulfillWithValue:function(t,e){return new oe(t,e)}})).then((function(e){if(e instanceof re)throw e;return e instanceof oe?r(e.payload,d,t,e.meta):r(e,d,t)}))])];case 1:return s=o.sent(),[3,3];case 2:return p=o.sent(),s=p instanceof re?u(null,d,t,p.payload,p.meta):u(p,d,t),[3,3];case 3:return n&&!n.dispatchConditionRejection&&u.match(s)&&s.meta.condition||c(s),[2,s]}}))},new Promise((function(t,e){var n=function(t){try{o(s.next(t))}catch(t){e(t)}},r=function(t){try{o(s.throw(t))}catch(t){e(t)}},o=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(n,r)};o((s=s.apply(f,null)).next())}));var f,s}();return Object.assign(g,{abort:function(t){h&&(p=t,v.abort())},requestId:d,arg:t,unwrap:function(){return g.then(fe)}})}}),{pending:i,rejected:u,fulfilled:r,typePrefix:t})}function fe(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}var ce=function(t,e){return(n=t)&&\"function\"==typeof n.match?t.match(e):t(e);var n};function ae(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.some((function(t){return ce(t,e)}))}}function le(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.every((function(t){return ce(t,e)}))}}function se(t,e){if(!t||!t.meta)return!1;var n=\"string\"==typeof t.meta.requestId,r=e.indexOf(t.meta.requestStatus)>-1;return n&&r}function pe(t){return\"function\"==typeof t[0]&&\"pending\"in t[0]&&\"fulfilled\"in t[0]&&\"rejected\"in t[0]}function de(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return se(t,[\"pending\"])}:pe(t)?function(e){var n=t.map((function(t){return t.pending}));return ae.apply(void 0,n)(e)}:de()(t[0])}function ve(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return se(t,[\"rejected\"])}:pe(t)?function(e){var n=t.map((function(t){return t.rejected}));return ae.apply(void 0,n)(e)}:ve()(t[0])}function ye(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=function(t){return t&&t.meta&&t.meta.rejectedWithValue};return 0===t.length||pe(t)?function(e){return le(ve.apply(void 0,t),n)(e)}:ye()(t[0])}function he(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return se(t,[\"fulfilled\"])}:pe(t)?function(e){var n=t.map((function(t){return t.fulfilled}));return ae.apply(void 0,n)(e)}:he()(t[0])}function ge(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return se(t,[\"pending\",\"fulfilled\",\"rejected\"])}:pe(t)?function(e){for(var n=[],r=0,o=t;r<o.length;r++){var i=o[r];n.push(i.pending,i.rejected,i.fulfilled)}return ae.apply(void 0,n)(e)}:ge()(t[0])}!function(){function t(t,e){var n=o[t];return n?n.enumerable=e:o[t]=n={configurable:!0,enumerable:e,get:function(){return ut.get(this[et],t)},set:function(e){ut.set(this[et],t,e)}},n}function e(t){for(var e=t.length-1;e>=0;e--){var o=t[e][et];if(!o.P)switch(o.i){case 5:r(o)&&V(o);break;case 4:n(o)&&V(o)}}}function n(t){for(var e=t.t,n=t.k,r=rt(n),o=r.length-1;o>=0;o--){var i=r[o];if(i!==et){var u=e[i];if(void 0===u&&!w(e,i))return!0;var f=n[i],c=f&&f[et];if(c?c.t!==u:!P(f,u))return!0}}var a=!!e[et];return r.length!==rt(e).length+(a?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return!0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);return!(!n||n.get)}var o={};it.ES5||(it.ES5={J:function(e,n){var r=Array.isArray(e),o=function(e,n){if(e){for(var r=Array(n.length),o=0;o<n.length;o++)Object.defineProperty(r,\"\"+o,t(o,!0));return r}var i=ot(n);delete i[et];for(var u=rt(i),f=0;f<u.length;f++){var c=u[f];i[c]=t(c,e||!!i[c].enumerable)}return Object.create(Object.getPrototypeOf(n),i)}(r,e),i={i:r?5:4,A:n?n.A:N(),P:!1,I:!1,D:{},l:n,t:e,k:o,o:null,O:!1,C:!1};return Object.defineProperty(o,et,{value:i,writable:!0}),o},S:function(t,n,o){o?h(n)&&n[et].A===t&&e(t.p):(t.u&&function t(e){if(e&&\"object\"==typeof e){var n=e[et];if(n){var o=n.t,i=n.k,u=n.D,f=n.i;if(4===f)O(i,(function(e){e!==et&&(void 0!==o[e]||w(o,e)?u[e]||t(i[e]):(u[e]=!0,V(n)))})),O(o,(function(t){void 0!==i[t]||w(i,t)||(u[t]=!1,V(n))}));else if(5===f){if(r(n)&&(V(n),u.length=!0),i.length<o.length)for(var c=i.length;c<o.length;c++)u[c]=!1;else for(var a=o.length;a<i.length;a++)u[a]=!0;for(var l=Math.min(i.length,o.length),s=0;s<l;s++)void 0===u[s]&&t(i[s])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?n(t):r(t)}})}();export{Ct as MiddlewareArray,gt as __DO_NOT_USE__ActionTypes,Et as applyMiddleware,jt as bindActionCreators,mt as combineReducers,Pt as compose,zt as configureStore,Kt as createAction,ue as createAsyncThunk,It as createDraftSafeSelector,te as createEntityAdapter,Jt as createImmutableStateInvariantMiddleware,lt as createNextState,Xt as createReducer,xt as createSelector,qt as createSerializableStateInvariantMiddleware,Bt as createSlice,Ot as createStore,G as current,Ft as findNonSerializableValue,x as freeze,Wt as getDefaultMiddleware,Lt as getType,le as isAllOf,ae as isAnyOf,ge as isAsyncThunkAction,h as isDraft,he as isFulfilled,Gt as isImmutableDefault,de as isPending,Tt as isPlain,kt as isPlainObject,ve as isRejected,ye as isRejectedWithValue,ie as miniSerializeError,ee as nanoid,b as original,fe as unwrapResult};\n//# sourceMappingURL=redux-toolkit.umd.min.js.map"],"names":["this"],"mappings":";;;;;;CAAA,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACA,SAAI,EAAEA,SAAI,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,WAAW,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAA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