@reduxjs/toolkit
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -1175,28 +1175,12 @@ 'use strict'; | ||
// Borrowed from https://github.com/ai/nanoid/tree/master/non-secure | ||
// This alphabet uses a-z A-Z 0-9 _- symbols. | ||
// Symbols are generated for smaller size. | ||
// -_zyxwvutsrqponmlkjihgfedcba9876543210ZYXWVUTSRQPONMLKJIHGFEDCBA | ||
var url = '-_'; // Loop from 36 to 0 (from z to a and 9 to 0 in Base36). | ||
// Borrowed from https://github.com/ai/nanoid/blob/3.0.2/non-secure/index.js | ||
// This alphabet uses `A-Za-z0-9_-` symbols. A genetic algorithm helped | ||
// optimize the gzip compression for this alphabet. | ||
var urlAlphabet = 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'; | ||
/** | ||
* | ||
* @public | ||
*/ | ||
var i = 36; | ||
while (i--) { | ||
// 36 is radix. Number.prototype.toString(36) returns number | ||
// in Base36 representation. Base36 is like hex, but it uses 0–9 and a-z. | ||
url += | ||
/*#__PURE__*/ | ||
i.toString(36); | ||
} // Loop from 36 to 10 (from Z to A in Base36). | ||
i = 36; | ||
while (i-- - 10) { | ||
url += | ||
/*#__PURE__*/ | ||
i.toString(36).toUpperCase(); | ||
} | ||
function nanoid(size) { | ||
var nanoid = function nanoid(size) { | ||
if (size === void 0) { | ||
@@ -1206,11 +1190,13 @@ size = 21; | ||
var id = ''; // Compact alternative for `for (var i = 0; i < size; i++)` | ||
var id = ''; // A compact alternative for `for (var i = 0; i < step; i++)`. | ||
while (size--) { | ||
// `| 0` is compact and faster alternative for `Math.floor()` | ||
id += url[Math.random() * 64 | 0]; | ||
var i = size; | ||
while (i--) { | ||
// `| 0` is more compact and faster than `Math.floor()`. | ||
id += urlAlphabet[Math.random() * 64 | 0]; | ||
} | ||
return id; | ||
} | ||
}; | ||
@@ -1443,3 +1429,4 @@ var commonProperties = ['name', 'message', 'stack', 'code']; | ||
exports.isPlain = isPlain; | ||
exports.nanoid = nanoid; | ||
exports.unwrapResult = unwrapResult; | ||
//# sourceMappingURL=redux-toolkit.cjs.development.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("immer"),r=e(t),n=require("redux"),i=require("reselect"),o=e(require("redux-thunk"));function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var u="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?n.compose:n.compose.apply(null,arguments)};function c(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function f(e){return null==e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)||c(e)}function s(e){void 0===e&&(e={});var t=e.thunk,r=void 0===t||t,n=[];return r&&n.push("boolean"==typeof r?o:o.withExtraArgument(r.extraArgument)),n}function l(e,t){function r(){if(t){var r=t.apply(void 0,arguments);if(!r)throw new Error("prepareAction did not return an object");return a({type:e,payload:r.payload},"meta"in r&&{meta:r.meta},{},"error"in r&&{error:r.error})}return{type:e,payload:arguments.length<=0?void 0:arguments[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(t){return t.type===e},r}function d(e){return["type","payload","error","meta"].indexOf(e)>-1}function v(e){var t={},r={addCase:function(e,n){var i="string"==typeof e?e:e.type;if(i in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[i]=n,r}};return e(r),t}function y(e,t){var n="function"==typeof t?v(t):t;return function(t,i){return void 0===t&&(t=e),r(t,(function(e){var t=n[i.type];return t?t(e,i):void 0}))}}function p(e){return function(n,i){var o=function(t){!function(e){return c(t=e)&&"string"==typeof t.type&&Object.keys(t).every(d);var t}(i)?e(i,t):e(i.payload,t)};return t.isDraft(n)?(o(n),n):r(n,o)}}function b(e,t){return t(e)}function m(e){function t(t,r){var n=b(t,e);n in r.entities||(r.ids.push(n),r.entities[n]=t)}function r(e,r){Array.isArray(e)||(e=Object.values(e));var n=e,i=Array.isArray(n),o=0;for(n=i?n:n[Symbol.iterator]();;){var a;if(i){if(o>=n.length)break;a=n[o++]}else{if((o=n.next()).done)break;a=o.value}t(a,r)}}function n(e,t){var r=!1;e.forEach((function(e){e in t.entities&&(delete t.entities[e],r=!0)})),r&&(t.ids=t.ids.filter((function(e){return e in t.entities})))}function i(t,r){var n={},i={};t.forEach((function(e){e.id in r.entities&&(i[e.id]=a({},i[e.id],{},e))})),(t=Object.values(i)).length>0&&t.filter((function(t){return function(t,r,n){var i=Object.assign({},n.entities[r.id],r.changes),o=b(i,e),a=o!==r.id;return a&&(t[r.id]=o,delete n.entities[r.id]),n.entities[o]=i,a}(n,t,r)})).length>0&&(r.ids=r.ids.map((function(e){return n[e]||e})))}function o(t,n){Array.isArray(t)||(t=Object.values(t));var o=[],a=[],u=t,c=Array.isArray(u),f=0;for(u=c?u:u[Symbol.iterator]();;){var s;if(c){if(f>=u.length)break;s=u[f++]}else{if((f=u.next()).done)break;s=f.value}var l=s,d=b(l,e);d in n.entities?a.push({id:d,changes:l}):o.push(l)}i(a,n),r(o,n)}return{removeAll:function(e){return Object.assign({},e,{ids:[],entities:{}})},addOne:p(t),addMany:p(r),setAll:p((function(e,t){Array.isArray(e)||(e=Object.values(e)),t.ids=[],t.entities={},r(e,t)})),updateOne:p((function(e,t){return i([e],t)})),updateMany:p(i),upsertOne:p((function(e,t){return o([e],t)})),upsertMany:p(o),removeOne:p((function(e,t){return n([e],t)})),removeMany:p(n)}}"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));for(var h="-_",g=36;g--;)h+=g.toString(36);for(g=36;g---10;)h+=g.toString(36).toUpperCase();var O=["name","message","stack","code"],S=function(e){this.value=e},A=function(e){if("object"==typeof e&&null!==e){var t={},r=O,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var o;if(n){if(i>=r.length)break;o=r[i++]}else{if((i=r.next()).done)break;o=i.value}"string"==typeof e[o]&&(t[o]=e[o])}return t}return{message:String(e)}};t.enableES5(),Object.keys(n).forEach((function(e){"default"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})})),exports.createNextState=r,Object.defineProperty(exports,"createSelector",{enumerable:!0,get:function(){return i.createSelector}}),exports.configureStore=function(e){var t,r=e||{},i=r.reducer,o=void 0===i?void 0:i,f=r.middleware,l=void 0===f?s():f,d=r.devTools,v=void 0===d||d,y=r.preloadedState,p=void 0===y?void 0:y,b=r.enhancers,m=void 0===b?void 0:b;if("function"==typeof o)t=o;else{if(!c(o))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=n.combineReducers(o)}var h=n.applyMiddleware.apply(void 0,l),g=n.compose;v&&(g=u(a({trace:!1},"object"==typeof v&&v)));var O=[h];Array.isArray(m)?O=[h].concat(m):"function"==typeof m&&(O=m(O));var S=g.apply(void 0,O);return n.createStore(t,p,S)},exports.createAction=l,exports.createAsyncThunk=function(e,t){var r=l(e+"/fulfilled",(function(e,t,r){return{payload:e,meta:{arg:r,requestId:t}}})),n=l(e+"/pending",(function(e,t){return{payload:void 0,meta:{arg:t,requestId:e}}})),i=l(e+"/rejected",(function(e,t,r,n){var i=!!e&&"AbortError"===e.name;return{payload:n,error:A(e||"Rejected"),meta:{arg:r,requestId:t,aborted:i}}})),o="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(a,u,c){var f,s=function(e){void 0===e&&(e=21);for(var t="";e--;)t+=h[64*Math.random()|0];return t}(),l=new o,d=new Promise((function(e,t){return l.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:f||"Aborted"})}))})),v=function(){try{var o,f=function(){return a(o),o},v=function(f,v){try{var y=(a(n(s,e)),Promise.resolve(Promise.race([d,Promise.resolve(t(e,{dispatch:a,getState:u,extra:c,requestId:s,signal:l.signal,rejectWithValue:function(e){return new S(e)}})).then((function(t){return t instanceof S?i(null,s,e,t.value):r(t,s,e)}))])).then((function(e){o=e})))}catch(e){return v(e)}return y&&y.then?y.then(void 0,v):y}(0,(function(t){o=i(t,s,e)}));return Promise.resolve(v&&v.then?v.then(f):f())}catch(e){return Promise.reject(e)}}();return Object.assign(v,{abort:function(e){f=e,l.abort()}})}}),{pending:n,rejected:i,fulfilled:r})},exports.createEntityAdapter=function(e){void 0===e&&(e={});var t=a({sortComparer:!1,selectId:function(e){return e.id}},e),r=t.selectId,n=t.sortComparer;return a({selectId:r,sortComparer:n},{getInitialState:function(e){return void 0===e&&(e={}),Object.assign({ids:[],entities:{}},e)}},{},{getSelectors:function(e){var t=function(e){return e.ids},r=function(e){return e.entities},n=i.createSelector(t,r,(function(e,t){return e.map((function(e){return t[e]}))})),o=function(e,t){return t},a=function(e,t){return e[t]},u=i.createSelector(t,(function(e){return e.length}));if(!e)return{selectIds:t,selectEntities:r,selectAll:n,selectTotal:u,selectById:i.createSelector(r,o,a)};var c=i.createSelector(e,r);return{selectIds:i.createSelector(e,t),selectEntities:c,selectAll:i.createSelector(e,n),selectTotal:i.createSelector(e,u),selectById:i.createSelector(c,o,a)}}},{},n?function(e,t){var r=m(e);function n(t,r){Array.isArray(t)||(t=Object.values(t));var n=t.filter((function(t){return!(b(t,e)in r.entities)}));0!==n.length&&a(n,r)}function i(t,r){var n=[];t.forEach((function(t){return function(t,r,n){if(!(r.id in n.entities))return!1;var i=Object.assign({},n.entities[r.id],r.changes),o=b(i,e);return delete n.entities[r.id],t.push(i),o!==r.id}(n,t,r)})),0!==n.length&&a(n,r)}function o(t,r){Array.isArray(t)||(t=Object.values(t));var o=[],a=[],u=t,c=Array.isArray(u),f=0;for(u=c?u:u[Symbol.iterator]();;){var s;if(c){if(f>=u.length)break;s=u[f++]}else{if((f=u.next()).done)break;s=f.value}var l=s,d=b(l,e);d in r.entities?a.push({id:d,changes:l}):o.push(l)}i(a,r),n(o,r)}function a(r,n){r.sort(t),r.forEach((function(t){n.entities[e(t)]=t}));var i=Object.values(n.entities);i.sort(t);var o=i.map(e);(function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(e[r]!==t[r])return!1;return!0})(n.ids,o)||(n.ids=o)}return{removeOne:r.removeOne,removeMany:r.removeMany,removeAll:r.removeAll,addOne:p((function(e,t){return n([e],t)})),updateOne:p((function(e,t){return i([e],t)})),upsertOne:p((function(e,t){return o([e],t)})),setAll:p((function(e,t){Array.isArray(e)||(e=Object.values(e)),t.entities={},t.ids=[],n(e,t)})),addMany:p(n),updateMany:p(i),upsertMany:p(o)}}(r,n):m(r))},exports.createImmutableStateInvariantMiddleware=function(e){return function(){return function(e){return function(t){return e(t)}}}},exports.createReducer=y,exports.createSerializableStateInvariantMiddleware=function(e){return function(){return function(e){return function(t){return e(t)}}}},exports.createSlice=function(e){var t=e.name,r=e.initialState;if(!t)throw new Error("`name` is a required option for createSlice");var n=e.reducers||{},i=void 0===e.extraReducers?{}:"function"==typeof e.extraReducers?v(e.extraReducers):e.extraReducers,o=Object.keys(n),u={},c={},f={};o.forEach((function(e){var r,i,o=n[e],a=t+"/"+e;"reducer"in o?(r=o.reducer,i=o.prepare):r=o,u[e]=r,c[a]=r,f[e]=i?l(a,i):l(a)}));var s=y(r,a({},i,{},c));return{name:t,reducer:s,actions:f,caseReducers:u}},exports.findNonSerializableValue=function e(t,r,n,i,o){var a;if(void 0===r&&(r=[]),void 0===n&&(n=f),void 0===o&&(o=[]),!n(t))return{keyPath:r.join(".")||"<root>",value:t};if("object"!=typeof t||null===t)return!1;var u=null!=i?i(t):Object.entries(t),c=o.length>0,s=u,l=Array.isArray(s),d=0;for(s=l?s:s[Symbol.iterator]();;){var v;if(l){if(d>=s.length)break;v=s[d++]}else{if((d=s.next()).done)break;v=d.value}var y=v[1],p=r.concat(v[0]);if(!(c&&o.indexOf(p.join("."))>=0)){if(!n(y))return{keyPath:p.join("."),value:y};if("object"==typeof y&&(a=e(y,p,n,i,o)))return a}}return!1},exports.getDefaultMiddleware=s,exports.getType=function(e){return""+e},exports.isImmutableDefault=function(e){return"object"!=typeof e||null==e},exports.isPlain=f,exports.unwrapResult=function(e){if("error"in e)throw e.error;return e.payload}; | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("immer"),r=e(t),n=require("redux"),i=require("reselect"),o=e(require("redux-thunk"));function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var u="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?n.compose:n.compose.apply(null,arguments)};function c(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function f(e){return null==e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)||c(e)}function s(e){void 0===e&&(e={});var t=e.thunk,r=void 0===t||t,n=[];return r&&n.push("boolean"==typeof r?o:o.withExtraArgument(r.extraArgument)),n}function l(e,t){function r(){if(t){var r=t.apply(void 0,arguments);if(!r)throw new Error("prepareAction did not return an object");return a({type:e,payload:r.payload},"meta"in r&&{meta:r.meta},{},"error"in r&&{error:r.error})}return{type:e,payload:arguments.length<=0?void 0:arguments[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(t){return t.type===e},r}function d(e){return["type","payload","error","meta"].indexOf(e)>-1}function y(e){var t={},r={addCase:function(e,n){var i="string"==typeof e?e:e.type;if(i in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[i]=n,r}};return e(r),t}function v(e,t){var n="function"==typeof t?y(t):t;return function(t,i){return void 0===t&&(t=e),r(t,(function(e){var t=n[i.type];return t?t(e,i):void 0}))}}function p(e){return function(n,i){var o=function(t){!function(e){return c(t=e)&&"string"==typeof t.type&&Object.keys(t).every(d);var t}(i)?e(i,t):e(i.payload,t)};return t.isDraft(n)?(o(n),n):r(n,o)}}function b(e,t){return t(e)}function m(e){function t(t,r){var n=b(t,e);n in r.entities||(r.ids.push(n),r.entities[n]=t)}function r(e,r){Array.isArray(e)||(e=Object.values(e));var n=e,i=Array.isArray(n),o=0;for(n=i?n:n[Symbol.iterator]();;){var a;if(i){if(o>=n.length)break;a=n[o++]}else{if((o=n.next()).done)break;a=o.value}t(a,r)}}function n(e,t){var r=!1;e.forEach((function(e){e in t.entities&&(delete t.entities[e],r=!0)})),r&&(t.ids=t.ids.filter((function(e){return e in t.entities})))}function i(t,r){var n={},i={};t.forEach((function(e){e.id in r.entities&&(i[e.id]=a({},i[e.id],{},e))})),(t=Object.values(i)).length>0&&t.filter((function(t){return function(t,r,n){var i=Object.assign({},n.entities[r.id],r.changes),o=b(i,e),a=o!==r.id;return a&&(t[r.id]=o,delete n.entities[r.id]),n.entities[o]=i,a}(n,t,r)})).length>0&&(r.ids=r.ids.map((function(e){return n[e]||e})))}function o(t,n){Array.isArray(t)||(t=Object.values(t));var o=[],a=[],u=t,c=Array.isArray(u),f=0;for(u=c?u:u[Symbol.iterator]();;){var s;if(c){if(f>=u.length)break;s=u[f++]}else{if((f=u.next()).done)break;s=f.value}var l=s,d=b(l,e);d in n.entities?a.push({id:d,changes:l}):o.push(l)}i(a,n),r(o,n)}return{removeAll:function(e){return Object.assign({},e,{ids:[],entities:{}})},addOne:p(t),addMany:p(r),setAll:p((function(e,t){Array.isArray(e)||(e=Object.values(e)),t.ids=[],t.entities={},r(e,t)})),updateOne:p((function(e,t){return i([e],t)})),updateMany:p(i),upsertOne:p((function(e,t){return o([e],t)})),upsertMany:p(o),removeOne:p((function(e,t){return n([e],t)})),removeMany:p(n)}}"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var h=function(e){void 0===e&&(e=21);for(var t="",r=e;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},g=["name","message","stack","code"],O=function(e){this.value=e},S=function(e){if("object"==typeof e&&null!==e){var t={},r=g,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var o;if(n){if(i>=r.length)break;o=r[i++]}else{if((i=r.next()).done)break;o=i.value}"string"==typeof e[o]&&(t[o]=e[o])}return t}return{message:String(e)}};t.enableES5(),Object.keys(n).forEach((function(e){"default"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})})),exports.createNextState=r,Object.defineProperty(exports,"createSelector",{enumerable:!0,get:function(){return i.createSelector}}),exports.configureStore=function(e){var t,r=e||{},i=r.reducer,o=void 0===i?void 0:i,f=r.middleware,l=void 0===f?s():f,d=r.devTools,y=void 0===d||d,v=r.preloadedState,p=void 0===v?void 0:v,b=r.enhancers,m=void 0===b?void 0:b;if("function"==typeof o)t=o;else{if(!c(o))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=n.combineReducers(o)}var h=n.applyMiddleware.apply(void 0,l),g=n.compose;y&&(g=u(a({trace:!1},"object"==typeof y&&y)));var O=[h];Array.isArray(m)?O=[h].concat(m):"function"==typeof m&&(O=m(O));var S=g.apply(void 0,O);return n.createStore(t,p,S)},exports.createAction=l,exports.createAsyncThunk=function(e,t){var r=l(e+"/fulfilled",(function(e,t,r){return{payload:e,meta:{arg:r,requestId:t}}})),n=l(e+"/pending",(function(e,t){return{payload:void 0,meta:{arg:t,requestId:e}}})),i=l(e+"/rejected",(function(e,t,r,n){var i=!!e&&"AbortError"===e.name;return{payload:n,error:S(e||"Rejected"),meta:{arg:r,requestId:t,aborted:i}}})),o="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(a,u,c){var f,s=h(),l=new o,d=new Promise((function(e,t){return l.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:f||"Aborted"})}))})),y=function(){try{var o,f=function(){return a(o),o},y=function(f,y){try{var v=(a(n(s,e)),Promise.resolve(Promise.race([d,Promise.resolve(t(e,{dispatch:a,getState:u,extra:c,requestId:s,signal:l.signal,rejectWithValue:function(e){return new O(e)}})).then((function(t){return t instanceof O?i(null,s,e,t.value):r(t,s,e)}))])).then((function(e){o=e})))}catch(e){return y(e)}return v&&v.then?v.then(void 0,y):v}(0,(function(t){o=i(t,s,e)}));return Promise.resolve(y&&y.then?y.then(f):f())}catch(e){return Promise.reject(e)}}();return Object.assign(y,{abort:function(e){f=e,l.abort()}})}}),{pending:n,rejected:i,fulfilled:r})},exports.createEntityAdapter=function(e){void 0===e&&(e={});var t=a({sortComparer:!1,selectId:function(e){return e.id}},e),r=t.selectId,n=t.sortComparer;return a({selectId:r,sortComparer:n},{getInitialState:function(e){return void 0===e&&(e={}),Object.assign({ids:[],entities:{}},e)}},{},{getSelectors:function(e){var t=function(e){return e.ids},r=function(e){return e.entities},n=i.createSelector(t,r,(function(e,t){return e.map((function(e){return t[e]}))})),o=function(e,t){return t},a=function(e,t){return e[t]},u=i.createSelector(t,(function(e){return e.length}));if(!e)return{selectIds:t,selectEntities:r,selectAll:n,selectTotal:u,selectById:i.createSelector(r,o,a)};var c=i.createSelector(e,r);return{selectIds:i.createSelector(e,t),selectEntities:c,selectAll:i.createSelector(e,n),selectTotal:i.createSelector(e,u),selectById:i.createSelector(c,o,a)}}},{},n?function(e,t){var r=m(e);function n(t,r){Array.isArray(t)||(t=Object.values(t));var n=t.filter((function(t){return!(b(t,e)in r.entities)}));0!==n.length&&a(n,r)}function i(t,r){var n=[];t.forEach((function(t){return function(t,r,n){if(!(r.id in n.entities))return!1;var i=Object.assign({},n.entities[r.id],r.changes),o=b(i,e);return delete n.entities[r.id],t.push(i),o!==r.id}(n,t,r)})),0!==n.length&&a(n,r)}function o(t,r){Array.isArray(t)||(t=Object.values(t));var o=[],a=[],u=t,c=Array.isArray(u),f=0;for(u=c?u:u[Symbol.iterator]();;){var s;if(c){if(f>=u.length)break;s=u[f++]}else{if((f=u.next()).done)break;s=f.value}var l=s,d=b(l,e);d in r.entities?a.push({id:d,changes:l}):o.push(l)}i(a,r),n(o,r)}function a(r,n){r.sort(t),r.forEach((function(t){n.entities[e(t)]=t}));var i=Object.values(n.entities);i.sort(t);var o=i.map(e);(function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(e[r]!==t[r])return!1;return!0})(n.ids,o)||(n.ids=o)}return{removeOne:r.removeOne,removeMany:r.removeMany,removeAll:r.removeAll,addOne:p((function(e,t){return n([e],t)})),updateOne:p((function(e,t){return i([e],t)})),upsertOne:p((function(e,t){return o([e],t)})),setAll:p((function(e,t){Array.isArray(e)||(e=Object.values(e)),t.entities={},t.ids=[],n(e,t)})),addMany:p(n),updateMany:p(i),upsertMany:p(o)}}(r,n):m(r))},exports.createImmutableStateInvariantMiddleware=function(e){return function(){return function(e){return function(t){return e(t)}}}},exports.createReducer=v,exports.createSerializableStateInvariantMiddleware=function(e){return function(){return function(e){return function(t){return e(t)}}}},exports.createSlice=function(e){var t=e.name,r=e.initialState;if(!t)throw new Error("`name` is a required option for createSlice");var n=e.reducers||{},i=void 0===e.extraReducers?{}:"function"==typeof e.extraReducers?y(e.extraReducers):e.extraReducers,o=Object.keys(n),u={},c={},f={};o.forEach((function(e){var r,i,o=n[e],a=t+"/"+e;"reducer"in o?(r=o.reducer,i=o.prepare):r=o,u[e]=r,c[a]=r,f[e]=i?l(a,i):l(a)}));var s=v(r,a({},i,{},c));return{name:t,reducer:s,actions:f,caseReducers:u}},exports.findNonSerializableValue=function e(t,r,n,i,o){var a;if(void 0===r&&(r=[]),void 0===n&&(n=f),void 0===o&&(o=[]),!n(t))return{keyPath:r.join(".")||"<root>",value:t};if("object"!=typeof t||null===t)return!1;var u=null!=i?i(t):Object.entries(t),c=o.length>0,s=u,l=Array.isArray(s),d=0;for(s=l?s:s[Symbol.iterator]();;){var y;if(l){if(d>=s.length)break;y=s[d++]}else{if((d=s.next()).done)break;y=d.value}var v=y[1],p=r.concat(y[0]);if(!(c&&o.indexOf(p.join("."))>=0)){if(!n(v))return{keyPath:p.join("."),value:v};if("object"==typeof v&&(a=e(v,p,n,i,o)))return a}}return!1},exports.getDefaultMiddleware=s,exports.getType=function(e){return""+e},exports.isImmutableDefault=function(e){return"object"!=typeof e||null==e},exports.isPlain=f,exports.nanoid=h,exports.unwrapResult=function(e){if("error"in e)throw e.error;return e.payload}; | ||
//# sourceMappingURL=redux-toolkit.cjs.production.min.js.map |
@@ -1200,28 +1200,12 @@ import createNextState, { isDraft, enableES5 } from 'immer'; | ||
// Borrowed from https://github.com/ai/nanoid/tree/master/non-secure | ||
// This alphabet uses a-z A-Z 0-9 _- symbols. | ||
// Symbols are generated for smaller size. | ||
// -_zyxwvutsrqponmlkjihgfedcba9876543210ZYXWVUTSRQPONMLKJIHGFEDCBA | ||
var url = '-_'; // Loop from 36 to 0 (from z to a and 9 to 0 in Base36). | ||
// Borrowed from https://github.com/ai/nanoid/blob/3.0.2/non-secure/index.js | ||
// This alphabet uses `A-Za-z0-9_-` symbols. A genetic algorithm helped | ||
// optimize the gzip compression for this alphabet. | ||
var urlAlphabet = 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'; | ||
/** | ||
* | ||
* @public | ||
*/ | ||
var i = 36; | ||
while (i--) { | ||
// 36 is radix. Number.prototype.toString(36) returns number | ||
// in Base36 representation. Base36 is like hex, but it uses 0–9 and a-z. | ||
url += | ||
/*#__PURE__*/ | ||
i.toString(36); | ||
} // Loop from 36 to 10 (from Z to A in Base36). | ||
i = 36; | ||
while (i-- - 10) { | ||
url += | ||
/*#__PURE__*/ | ||
i.toString(36).toUpperCase(); | ||
} | ||
function nanoid(size) { | ||
var nanoid = function nanoid(size) { | ||
if (size === void 0) { | ||
@@ -1231,11 +1215,13 @@ size = 21; | ||
var id = ''; // Compact alternative for `for (var i = 0; i < size; i++)` | ||
var id = ''; // A compact alternative for `for (var i = 0; i < step; i++)`. | ||
while (size--) { | ||
// `| 0` is compact and faster alternative for `Math.floor()` | ||
id += url[Math.random() * 64 | 0]; | ||
var i = size; | ||
while (i--) { | ||
// `| 0` is more compact and faster than `Math.floor()`. | ||
id += urlAlphabet[Math.random() * 64 | 0]; | ||
} | ||
return id; | ||
} | ||
}; | ||
@@ -1440,3 +1426,3 @@ var commonProperties = ['name', 'message', 'stack', 'code']; | ||
export { configureStore, createAction, createAsyncThunk, createEntityAdapter, createImmutableStateInvariantMiddleware, createReducer, createSerializableStateInvariantMiddleware, createSlice, findNonSerializableValue, getDefaultMiddleware, getType, isImmutableDefault, isPlain, unwrapResult }; | ||
export { configureStore, createAction, createAsyncThunk, createEntityAdapter, createImmutableStateInvariantMiddleware, createReducer, createSerializableStateInvariantMiddleware, createSlice, findNonSerializableValue, getDefaultMiddleware, getType, isImmutableDefault, isPlain, nanoid, unwrapResult }; | ||
//# sourceMappingURL=redux-toolkit.esm.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).RTK={})}(this,(function(e){"use strict";function t(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.join(","):"")+". Find the full error at: https://bit.ly/38PiBHb")}function r(e){return!!e&&!!e[B]}function n(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return!t||t===Object.prototype}(e)||Array.isArray(e)||!!e[M]||!!e.constructor[M]||c(e)||f(e))}function o(e,t){0===i(e)?z(e).forEach((function(r){return t(r,e[r],e)})):e.forEach((function(r,n){return t(n,r,e)}))}function i(e){var t=e[B];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:c(e)?2:f(e)?3:0}function u(e,t){return 2===i(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function a(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function c(e){return N&&e instanceof Map}function f(e){return D&&e instanceof Set}function s(e){return e.o||e.t}function l(e,r){if(void 0===r&&(r=!1),Array.isArray(e))return e.slice();var n=Object.create(Object.getPrototypeOf(e));return o(e,(function(o){if(o!==B){var i=Object.getOwnPropertyDescriptor(e,o),u=i.value;i.get&&(r||t(1),u=i.get.call(e)),i.enumerable?n[o]=u:Object.defineProperty(n,o,{value:u,writable:!0,configurable:!0})}})),n}function d(e,t){r(e)||Object.isFrozen(e)||!n(e)||(i(e)>1&&(e.set=e.add=e.clear=e.delete=p),Object.freeze(e),t&&o(e,(function(e,t){return d(t,!0)})))}function p(){t(2)}function y(e){var r=F[e];return r||t(19,e),r}function v(){return _}function h(e,t){t&&(y("Patches"),e.u=[],e.s=[],e.v=t)}function b(e){g(e),e.p.forEach(O),e.p=null}function g(e){e===_&&(_=e.l)}function m(e){return _={p:[],l:_,h:e,m:!0,_:0}}function O(e){var t=e[B];0===t.i||1===t.i?t.j():t.O=!0}function w(e,r){r._=r.p.length;var o=r.p[0],i=void 0!==e&&e!==o;return r.h.g||y("ES5").P(r,e,i),i?(o[B].S&&(b(r),t(4)),n(e)&&(e=A(r,e),r.l||S(r,e)),r.u&&y("Patches").M(o[B],e,r.u,r.s)):e=A(r,o,[]),b(r),r.u&&r.v(r.u,r.s),e!==C?e:void 0}function A(e,t,r){if(Object.isFrozen(t))return t;var n=t[B];if(!n)return o(t,(function(o,i){return j(e,n,t,o,i,r)})),t;if(n.A!==e)return t;if(!n.S)return S(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=4===n.i||5===n.i?n.o=l(n.k,!0):n.o;o(i,(function(t,o){return j(e,n,i,t,o,r)})),S(e,i,!1),r&&e.u&&y("Patches").R(n,r,e.u,e.s)}return n.o}function j(e,t,o,c,f,s){if(r(f)){var l=A(e,f,s&&t&&3!==t.i&&!u(t.D,c)?s.concat(c):void 0);if(p=c,y=l,2===(v=i(d=o))?d.set(p,y):3===v?(d.delete(p),d.add(y)):d[p]=y,!r(l))return;e.m=!1}var d,p,y,v;if((!t||!a(f,function(e,t){return 2===i(e)?e.get(t):e[t]}(t.t,c)))&&n(f)){if(!e.h.N&&e._<1)return;A(e,f),t&&t.A.l||S(e,f)}}function S(e,t,r){void 0===r&&(r=!1),e.h.N&&e.m&&d(t,r)}function P(e,t){var r=e[B],n=Reflect.getOwnPropertyDescriptor(r?s(r):e,t);return n&&n.value}function E(e){if(!e.S){if(e.S=!0,0===e.i||1===e.i){var t=e.o=l(e.t);o(e.p,(function(e,r){t[e]=r})),e.p=void 0}e.l&&E(e.l)}}function x(e){e.o||(e.o=l(e.t))}function I(e,t,r){var n=c(t)?y("MapSet").T(t,r):f(t)?y("MapSet").F(t,r):e.g?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:v(),S:!1,I:!1,D:{},l:t,t:e,k:null,p:{},o:null,j:null,C:!1},o=n,i=U;r&&(o=[n],i=W);var u=Proxy.revocable(o,i),a=u.revoke,c=u.proxy;return n.k=c,n.j=a,c}(t,r):y("ES5").J(t,r);return(r?r.A:v()).p.push(n),n}var k,_,R="undefined"!=typeof Symbol,N="undefined"!=typeof Map,D="undefined"!=typeof Set,T="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,C=R?Symbol("immer-nothing"):((k={})["immer-nothing"]=!0,k),M=R?Symbol("immer-draftable"):"__$immer_draftable",B=R?Symbol("immer-state"):"__$immer_state",z="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,F={},U={get:function(e,t){if(t===B)return e;var r=e.p;if(!e.S&&u(r,t))return r[t];var o=s(e)[t];if(e.I||!n(o))return o;if(e.S){if(o!==P(e.t,t))return o;r=e.o}return r[t]=I(e.A.h,o,e)},has:function(e,t){return t in s(e)},ownKeys:function(e){return Reflect.ownKeys(s(e))},set:function(e,t,r){if(!e.S){var n=P(e.t,t);if(r?a(n,r)||r===e.p[t]:a(n,r)&&t in e.t)return!0;x(e),E(e)}return e.D[t]=!0,e.o[t]=r,!0},deleteProperty:function(e,t){return void 0!==P(e.t,t)||t in e.t?(e.D[t]=!1,x(e),E(e)):e.D[t]&&delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=s(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&(n.writable=!0,n.configurable=1!==e.i||"length"!==t),n},defineProperty:function(){t(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){t(12)}},W={};o(U,(function(e,t){W[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),W.deleteProperty=function(e,t){return U.deleteProperty.call(this,e[0],t)},W.set=function(e,t,r){return U.set.call(this,e[0],t,r,e[0])};var K=new(function(){function e(e){this.g=T,this.N=!1,"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var o=e.prototype;return o.produce=function(e,r,o){if("function"==typeof e&&"function"!=typeof r){var i=r;r=e;var u=this;return function(e){var t=this;void 0===e&&(e=i);for(var n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return u.produce(e,(function(e){var n;return(n=r).call.apply(n,[t,e].concat(o))}))}}var a;if("function"!=typeof r&&t(6),void 0!==o&&"function"!=typeof o&&t(7),n(e)){var c=m(this),f=I(this,e,void 0),s=!0;try{a=r(f),s=!1}finally{s?b(c):g(c)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(e){return h(c,o),w(e,c)}),(function(e){throw b(c),e})):(h(c,o),w(a,c))}if((a=r(e))!==C)return void 0===a&&(a=e),this.N&&d(a,!0),a},o.produceWithPatches=function(e,t){var r,n,o=this;return"function"==typeof e?function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return o.produceWithPatches(t,(function(t){return e.apply(void 0,[t].concat(n))}))}:[this.produce(e,t,(function(e,t){r=e,n=t})),r,n]},o.createDraft=function(e){n(e)||t(8);var r=m(this),o=I(this,e,void 0);return o[B].C=!0,g(r),o},o.finishDraft=function(e,t){var r=(e&&e[B]).A;return h(r,t),w(void 0,r)},o.setAutoFreeze=function(e){this.N=e},o.setUseProxies=function(e){T||t(20),this.g=e},o.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var o=t[n];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}var i=y("Patches").H;return r(e)?i(e,t):this.produce(e,(function(e){return i(e,t.slice(n+1))}))},e}()),L=K.produce;K.produceWithPatches.bind(K),K.setAutoFreeze.bind(K),K.setUseProxies.bind(K),K.applyPatches.bind(K),K.createDraft.bind(K),K.finishDraft.bind(K);var q=function(e){var t,r=("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()).Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}(),V=function(){return Math.random().toString(36).substring(7).split("").join(".")},X={INIT:"@@redux/INIT"+V(),REPLACE:"@@redux/REPLACE"+V(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+V()}};function H(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function J(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])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");if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(J)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var o=e,i=t,u=[],a=u,c=!1;function f(){a===u&&(a=u.slice())}function s(){if(c)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 i}function l(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(c)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-reference/store#subscribe(listener) for more details.");var t=!0;return f(),a.push(e),function(){if(t){if(c)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,f();var r=a.indexOf(e);a.splice(r,1)}}}function d(e){if(!H(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(c)throw new Error("Reducers may not dispatch actions.");try{c=!0,i=o(i,e)}finally{c=!1}for(var t=u=a,r=0;r<t.length;r++)(0,t[r])();return e}function p(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");o=e,d({type:X.REPLACE})}function y(){var e,t=l;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function r(){e.next&&e.next(s())}return r(),{unsubscribe:t(r)}}})[q]=function(){return this},e}return d({type:X.INIT}),(n={dispatch:d,subscribe:l,getState:s,replaceReducer:p})[q]=y,n}function Y(e,t){var r=t&&t.type;return"Given "+(r&&'action "'+String(r)+'"'||"an action")+', reducer "'+e+'" 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.'}function $(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var o=t[n];"function"==typeof e[o]&&(r[o]=e[o])}var i,u=Object.keys(r);try{!function(e){Object.keys(e).forEach((function(t){var r=e[t];if(void 0===r(void 0,{type:X.INIT}))throw new Error('Reducer "'+t+"\" 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(void 0===r(void 0,{type:X.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+X.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)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var n=!1,o={},a=0;a<u.length;a++){var c=u[a],f=e[c],s=(0,r[c])(f,t);if(void 0===s){var l=Y(c,t);throw new Error(l)}o[c]=s,n=n||s!==f}return n?o:e}}function G(e,t){return function(){return t(e.apply(this,arguments))}}function Q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Q(e,t,r[t])}))}return e}function ee(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function te(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(){var r=e.apply(void 0,arguments),n=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return Z({},r,{dispatch:n=ee.apply(void 0,i)(r.dispatch)})}}}function re(e,t){return e===t}function ne(e,t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;o<n;o++)if(!e(t[o],r[o]))return!1;return!0}function oe(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var r=t.map((function(e){return typeof e})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+r+"]")}return t}var ie=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];var i=0,u=n.pop(),a=oe(n),c=e.apply(void 0,[function(){return i++,u.apply(null,arguments)}].concat(r)),f=e((function(){for(var e=[],t=a.length,r=0;r<t;r++)e.push(a[r].apply(null,arguments));return c.apply(null,e)}));return f.resultFunc=u,f.dependencies=a,f.recomputations=function(){return i},f.resetRecomputations=function(){return i=0},f}}((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:re,r=null,n=null;return function(){return ne(t,r,arguments)||(n=e.apply(null,arguments)),r=arguments,n}}));function ue(){return(ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var ae="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ee:ee.apply(null,arguments)};function ce(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function fe(e){return function(t){var r=t.dispatch,n=t.getState;return function(t){return function(o){return"function"==typeof o?o(r,n,e):t(o)}}}}var se=fe();function le(e){return null==e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)||ce(e)}function de(e){void 0===e&&(e={});var t=e.thunk,r=void 0===t||t,n=[];return r&&(function(e){return"boolean"==typeof e}(r)?n.push(se):n.push(se.withExtraArgument(r.extraArgument))),n}function pe(e,t){function r(){if(t){var r=t.apply(void 0,arguments);if(!r)throw new Error("prepareAction did not return an object");return ue({type:e,payload:r.payload},"meta"in r&&{meta:r.meta},{},"error"in r&&{error:r.error})}return{type:e,payload:arguments.length<=0?void 0:arguments[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(t){return t.type===e},r}function ye(e){return["type","payload","error","meta"].indexOf(e)>-1}function ve(e){var t={},r={addCase:function(e,n){var o="string"==typeof e?e:e.type;if(o in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[o]=n,r}};return e(r),t}function he(e,t){var r="function"==typeof t?ve(t):t;return function(t,n){return void 0===t&&(t=e),L(t,(function(e){var t=r[n.type];return t?t(e,n):void 0}))}}function be(e){return function(t,n){var o=function(t){!function(e){return ce(t=e)&&"string"==typeof t.type&&Object.keys(t).every(ye);var t}(n)?e(n,t):e(n.payload,t)};return r(t)?(o(t),t):L(t,o)}}function ge(e,t){return t(e)}function me(e){function t(t,r){var n=ge(t,e);n in r.entities||(r.ids.push(n),r.entities[n]=t)}function r(e,r){Array.isArray(e)||(e=Object.values(e));var n=e,o=Array.isArray(n),i=0;for(n=o?n:n[Symbol.iterator]();;){var u;if(o){if(i>=n.length)break;u=n[i++]}else{if((i=n.next()).done)break;u=i.value}t(u,r)}}function n(e,t){var r=!1;e.forEach((function(e){e in t.entities&&(delete t.entities[e],r=!0)})),r&&(t.ids=t.ids.filter((function(e){return e in t.entities})))}function o(t,r){var n={},o={};t.forEach((function(e){e.id in r.entities&&(o[e.id]=ue({},o[e.id],{},e))})),(t=Object.values(o)).length>0&&t.filter((function(t){return function(t,r,n){var o=Object.assign({},n.entities[r.id],r.changes),i=ge(o,e),u=i!==r.id;return u&&(t[r.id]=i,delete n.entities[r.id]),n.entities[i]=o,u}(n,t,r)})).length>0&&(r.ids=r.ids.map((function(e){return n[e]||e})))}function i(t,n){Array.isArray(t)||(t=Object.values(t));var i=[],u=[],a=t,c=Array.isArray(a),f=0;for(a=c?a:a[Symbol.iterator]();;){var s;if(c){if(f>=a.length)break;s=a[f++]}else{if((f=a.next()).done)break;s=f.value}var l=s,d=ge(l,e);d in n.entities?u.push({id:d,changes:l}):i.push(l)}o(u,n),r(i,n)}return{removeAll:function(e){return Object.assign({},e,{ids:[],entities:{}})},addOne:be(t),addMany:be(r),setAll:be((function(e,t){Array.isArray(e)||(e=Object.values(e)),t.ids=[],t.entities={},r(e,t)})),updateOne:be((function(e,t){return o([e],t)})),updateMany:be(o),upsertOne:be((function(e,t){return i([e],t)})),upsertMany:be(i),removeOne:be((function(e,t){return n([e],t)})),removeMany:be(n)}}se.withExtraArgument=fe,"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));for(var Oe="-_",we=36;we--;)Oe+=we.toString(36);for(we=36;we---10;)Oe+=we.toString(36).toUpperCase();var Ae=["name","message","stack","code"],je=function(e){this.value=e},Se=function(e){if("object"==typeof e&&null!==e){var t={},r=Ae,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var i;if(n){if(o>=r.length)break;i=r[o++]}else{if((o=r.next()).done)break;i=o.value}"string"==typeof e[i]&&(t[i]=e[i])}return t}return{message:String(e)}};!function(){function e(e,t){var r=e[B];if(r&&!r.B){r.B=!0;var n=e[t];return r.B=!1,n}return e[t]}function i(e){e.S||(e.S=!0,e.l&&i(e.l))}function c(e){e.o||(e.o=f(e.t))}function f(e){var t=e&&e[B];if(t){t.B=!0;var r=l(t.k,!0);return t.B=!1,r}return l(e)}function d(e){for(var t=e.length-1;t>=0;t--){var r=e[t][B];if(!r.S)switch(r.i){case 5:y(r)&&i(r);break;case 4:p(r)&&i(r)}}}function p(e){for(var t=e.t,r=e.k,n=Object.keys(r),o=n.length-1;o>=0;o--){var i=n[o],c=t[i];if(void 0===c&&!u(t,i))return!0;var f=r[i],s=f&&f[B];if(s?s.t!==c:!a(f,c))return!0}return n.length!==Object.keys(t).length}function y(e){var t=e.k;if(t.length!==e.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}function h(e){e.O&&t(3,JSON.stringify(s(e)))}var b={};!function(e,t){F.ES5=t}(0,{J:function(t,r){var u=Array.isArray(t),l=f(t);o(l,(function(r){!function(t,r,o){var u=b[r];u?u.enumerable=o:b[r]=u={enumerable:o,get:function(){return function(t,r){h(t);var o=e(s(t),r);return t.B?o:o===e(t.t,r)&&n(o)?(c(t),t.o[r]=I(t.A.h,o,t)):o}(this[B],r)},set:function(t){!function(t,r,n){if(h(t),t.D[r]=!0,!t.S){if(a(n,e(s(t),r)))return;i(t),c(t)}t.o[r]=n}(this[B],r,t)}},Object.defineProperty(t,r,u)}(l,r,u||function(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!(!r||!r.enumerable)}(t,r))}));var d={i:u?5:4,A:r?r.A:v(),S:!1,B:!1,I:!1,D:{},l:r,t:t,k:l,o:null,O:!1,C:!1};return Object.defineProperty(l,B,{value:d,writable:!0}),l},$:i,P:function(e,t,n){e.p.forEach((function(e){e[B].B=!0})),n?r(t)&&t[B].A===e&&d(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var r=t[B];if(r){var n=r.t,a=r.k,c=r.D,f=r.i;if(4===f)o(a,(function(t){t!==B&&(void 0!==n[t]||u(n,t)?c[t]||e(a[t]):(c[t]=!0,i(r)))})),o(n,(function(e){void 0!==a[e]||u(a,e)||(c[e]=!1,i(r))}));else if(5===f){if(y(r)&&(i(r),c.length=!0),a.length<n.length)for(var s=a.length;s<n.length;s++)c[s]=!1;else for(var l=n.length;l<a.length;l++)c[l]=!0;for(var d=Math.min(a.length,n.length),p=0;p<d;p++)void 0===c[p]&&e(a[p])}}}}(e.p[0]),d(e.p))}})}(),e.__DO_NOT_USE__ActionTypes=X,e.applyMiddleware=te,e.bindActionCreators=function(e,t){if("function"==typeof e)return G(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var r=Object.keys(e),n={},o=0;o<r.length;o++){var i=r[o],u=e[i];"function"==typeof u&&(n[i]=G(u,t))}return n},e.combineReducers=$,e.compose=ee,e.configureStore=function(e){var t,r=e||{},n=r.reducer,o=void 0===n?void 0:n,i=r.middleware,u=void 0===i?de():i,a=r.devTools,c=void 0===a||a,f=r.preloadedState,s=void 0===f?void 0:f,l=r.enhancers,d=void 0===l?void 0:l;if("function"==typeof o)t=o;else{if(!ce(o))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=$(o)}var p=te.apply(void 0,u),y=ee;c&&(y=ae(ue({trace:!1},"object"==typeof c&&c)));var v=[p];return Array.isArray(d)?v=[p].concat(d):"function"==typeof d&&(v=d(v)),J(t,s,y.apply(void 0,v))},e.createAction=pe,e.createAsyncThunk=function(e,t){var r=pe(e+"/fulfilled",(function(e,t,r){return{payload:e,meta:{arg:r,requestId:t}}})),n=pe(e+"/pending",(function(e,t){return{payload:void 0,meta:{arg:t,requestId:e}}})),o=pe(e+"/rejected",(function(e,t,r,n){var o=!!e&&"AbortError"===e.name;return{payload:n,error:Se(e||"Rejected"),meta:{arg:r,requestId:t,aborted:o}}})),i="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(u,a,c){var f,s=function(e){void 0===e&&(e=21);for(var t="";e--;)t+=Oe[64*Math.random()|0];return t}(),l=new i,d=new Promise((function(e,t){return l.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:f||"Aborted"})}))})),p=function(){try{var i,f=function(){return u(i),i},p=function(f,p){try{var y=(u(n(s,e)),Promise.resolve(Promise.race([d,Promise.resolve(t(e,{dispatch:u,getState:a,extra:c,requestId:s,signal:l.signal,rejectWithValue:function(e){return new je(e)}})).then((function(t){return t instanceof je?o(null,s,e,t.value):r(t,s,e)}))])).then((function(e){i=e})))}catch(e){return p(e)}return y&&y.then?y.then(void 0,p):y}(0,(function(t){i=o(t,s,e)}));return Promise.resolve(p&&p.then?p.then(f):f())}catch(e){return Promise.reject(e)}}();return Object.assign(p,{abort:function(e){f=e,l.abort()}})}}),{pending:n,rejected:o,fulfilled:r})},e.createEntityAdapter=function(e){void 0===e&&(e={});var t=ue({sortComparer:!1,selectId:function(e){return e.id}},e),r=t.selectId,n=t.sortComparer;return ue({selectId:r,sortComparer:n},{getInitialState:function(e){return void 0===e&&(e={}),Object.assign({ids:[],entities:{}},e)}},{},{getSelectors:function(e){var t=function(e){return e.ids},r=function(e){return e.entities},n=ie(t,r,(function(e,t){return e.map((function(e){return t[e]}))})),o=function(e,t){return t},i=function(e,t){return e[t]},u=ie(t,(function(e){return e.length}));if(!e)return{selectIds:t,selectEntities:r,selectAll:n,selectTotal:u,selectById:ie(r,o,i)};var a=ie(e,r);return{selectIds:ie(e,t),selectEntities:a,selectAll:ie(e,n),selectTotal:ie(e,u),selectById:ie(a,o,i)}}},{},n?function(e,t){var r=me(e);function n(t,r){Array.isArray(t)||(t=Object.values(t));var n=t.filter((function(t){return!(ge(t,e)in r.entities)}));0!==n.length&&u(n,r)}function o(t,r){var n=[];t.forEach((function(t){return function(t,r,n){if(!(r.id in n.entities))return!1;var o=Object.assign({},n.entities[r.id],r.changes),i=ge(o,e);return delete n.entities[r.id],t.push(o),i!==r.id}(n,t,r)})),0!==n.length&&u(n,r)}function i(t,r){Array.isArray(t)||(t=Object.values(t));var i=[],u=[],a=t,c=Array.isArray(a),f=0;for(a=c?a:a[Symbol.iterator]();;){var s;if(c){if(f>=a.length)break;s=a[f++]}else{if((f=a.next()).done)break;s=f.value}var l=s,d=ge(l,e);d in r.entities?u.push({id:d,changes:l}):i.push(l)}o(u,r),n(i,r)}function u(r,n){r.sort(t),r.forEach((function(t){n.entities[e(t)]=t}));var o=Object.values(n.entities);o.sort(t);var i=o.map(e);(function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(e[r]!==t[r])return!1;return!0})(n.ids,i)||(n.ids=i)}return{removeOne:r.removeOne,removeMany:r.removeMany,removeAll:r.removeAll,addOne:be((function(e,t){return n([e],t)})),updateOne:be((function(e,t){return o([e],t)})),upsertOne:be((function(e,t){return i([e],t)})),setAll:be((function(e,t){Array.isArray(e)||(e=Object.values(e)),t.entities={},t.ids=[],n(e,t)})),addMany:be(n),updateMany:be(o),upsertMany:be(i)}}(r,n):me(r))},e.createImmutableStateInvariantMiddleware=function(e){return function(){return function(e){return function(t){return e(t)}}}},e.createNextState=L,e.createReducer=he,e.createSelector=ie,e.createSerializableStateInvariantMiddleware=function(e){return function(){return function(e){return function(t){return e(t)}}}},e.createSlice=function(e){var t=e.name,r=e.initialState;if(!t)throw new Error("`name` is a required option for createSlice");var n=e.reducers||{},o=void 0===e.extraReducers?{}:"function"==typeof e.extraReducers?ve(e.extraReducers):e.extraReducers,i=Object.keys(n),u={},a={},c={};i.forEach((function(e){var r,o,i=n[e],f=t+"/"+e;"reducer"in i?(r=i.reducer,o=i.prepare):r=i,u[e]=r,a[f]=r,c[e]=o?pe(f,o):pe(f)}));var f=he(r,ue({},o,{},a));return{name:t,reducer:f,actions:c,caseReducers:u}},e.createStore=J,e.findNonSerializableValue=function e(t,r,n,o,i){var u;if(void 0===r&&(r=[]),void 0===n&&(n=le),void 0===i&&(i=[]),!n(t))return{keyPath:r.join(".")||"<root>",value:t};if("object"!=typeof t||null===t)return!1;var a=null!=o?o(t):Object.entries(t),c=i.length>0,f=a,s=Array.isArray(f),l=0;for(f=s?f:f[Symbol.iterator]();;){var d;if(s){if(l>=f.length)break;d=f[l++]}else{if((l=f.next()).done)break;d=l.value}var p=d[1],y=r.concat(d[0]);if(!(c&&i.indexOf(y.join("."))>=0)){if(!n(p))return{keyPath:y.join("."),value:p};if("object"==typeof p&&(u=e(p,y,n,o,i)))return u}}return!1},e.getDefaultMiddleware=de,e.getType=function(e){return""+e},e.isImmutableDefault=function(e){return"object"!=typeof e||null==e},e.isPlain=le,e.unwrapResult=function(e){if("error"in e)throw e.error;return e.payload}})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).RTK={})}(this,(function(e){"use strict";function t(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.join(","):"")+". Find the full error at: https://bit.ly/38PiBHb")}function r(e){return!!e&&!!e[B]}function n(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return!t||t===Object.prototype}(e)||Array.isArray(e)||!!e[C]||!!e.constructor[C]||c(e)||f(e))}function o(e,t){0===i(e)?z(e).forEach((function(r){return t(r,e[r],e)})):e.forEach((function(r,n){return t(n,r,e)}))}function i(e){var t=e[B];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:c(e)?2:f(e)?3:0}function u(e,t){return 2===i(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function a(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function c(e){return N&&e instanceof Map}function f(e){return D&&e instanceof Set}function s(e){return e.o||e.t}function l(e,r){if(void 0===r&&(r=!1),Array.isArray(e))return e.slice();var n=Object.create(Object.getPrototypeOf(e));return o(e,(function(o){if(o!==B){var i=Object.getOwnPropertyDescriptor(e,o),u=i.value;i.get&&(r||t(1),u=i.get.call(e)),i.enumerable?n[o]=u:Object.defineProperty(n,o,{value:u,writable:!0,configurable:!0})}})),n}function d(e,t){r(e)||Object.isFrozen(e)||!n(e)||(i(e)>1&&(e.set=e.add=e.clear=e.delete=p),Object.freeze(e),t&&o(e,(function(e,t){return d(t,!0)})))}function p(){t(2)}function y(e){var r=F[e];return r||t(19,e),r}function v(){return _}function h(e,t){t&&(y("Patches"),e.u=[],e.s=[],e.v=t)}function b(e){g(e),e.p.forEach(O),e.p=null}function g(e){e===_&&(_=e.l)}function m(e){return _={p:[],l:_,h:e,m:!0,_:0}}function O(e){var t=e[B];0===t.i||1===t.i?t.j():t.O=!0}function w(e,r){r._=r.p.length;var o=r.p[0],i=void 0!==e&&e!==o;return r.h.g||y("ES5").P(r,e,i),i?(o[B].S&&(b(r),t(4)),n(e)&&(e=A(r,e),r.l||S(r,e)),r.u&&y("Patches").M(o[B],e,r.u,r.s)):e=A(r,o,[]),b(r),r.u&&r.v(r.u,r.s),e!==M?e:void 0}function A(e,t,r){if(Object.isFrozen(t))return t;var n=t[B];if(!n)return o(t,(function(o,i){return j(e,n,t,o,i,r)})),t;if(n.A!==e)return t;if(!n.S)return S(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=4===n.i||5===n.i?n.o=l(n.k,!0):n.o;o(i,(function(t,o){return j(e,n,i,t,o,r)})),S(e,i,!1),r&&e.u&&y("Patches").R(n,r,e.u,e.s)}return n.o}function j(e,t,o,c,f,s){if(r(f)){var l=A(e,f,s&&t&&3!==t.i&&!u(t.D,c)?s.concat(c):void 0);if(p=c,y=l,2===(v=i(d=o))?d.set(p,y):3===v?(d.delete(p),d.add(y)):d[p]=y,!r(l))return;e.m=!1}var d,p,y,v;if((!t||!a(f,function(e,t){return 2===i(e)?e.get(t):e[t]}(t.t,c)))&&n(f)){if(!e.h.N&&e._<1)return;A(e,f),t&&t.A.l||S(e,f)}}function S(e,t,r){void 0===r&&(r=!1),e.h.N&&e.m&&d(t,r)}function P(e,t){var r=e[B],n=Reflect.getOwnPropertyDescriptor(r?s(r):e,t);return n&&n.value}function E(e){if(!e.S){if(e.S=!0,0===e.i||1===e.i){var t=e.o=l(e.t);o(e.p,(function(e,r){t[e]=r})),e.p=void 0}e.l&&E(e.l)}}function x(e){e.o||(e.o=l(e.t))}function I(e,t,r){var n=c(t)?y("MapSet").T(t,r):f(t)?y("MapSet").F(t,r):e.g?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:v(),S:!1,I:!1,D:{},l:t,t:e,k:null,p:{},o:null,j:null,C:!1},o=n,i=U;r&&(o=[n],i=W);var u=Proxy.revocable(o,i),a=u.revoke,c=u.proxy;return n.k=c,n.j=a,c}(t,r):y("ES5").J(t,r);return(r?r.A:v()).p.push(n),n}var k,_,R="undefined"!=typeof Symbol,N="undefined"!=typeof Map,D="undefined"!=typeof Set,T="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,M=R?Symbol("immer-nothing"):((k={})["immer-nothing"]=!0,k),C=R?Symbol("immer-draftable"):"__$immer_draftable",B=R?Symbol("immer-state"):"__$immer_state",z="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,F={},U={get:function(e,t){if(t===B)return e;var r=e.p;if(!e.S&&u(r,t))return r[t];var o=s(e)[t];if(e.I||!n(o))return o;if(e.S){if(o!==P(e.t,t))return o;r=e.o}return r[t]=I(e.A.h,o,e)},has:function(e,t){return t in s(e)},ownKeys:function(e){return Reflect.ownKeys(s(e))},set:function(e,t,r){if(!e.S){var n=P(e.t,t);if(r?a(n,r)||r===e.p[t]:a(n,r)&&t in e.t)return!0;x(e),E(e)}return e.D[t]=!0,e.o[t]=r,!0},deleteProperty:function(e,t){return void 0!==P(e.t,t)||t in e.t?(e.D[t]=!1,x(e),E(e)):e.D[t]&&delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=s(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&(n.writable=!0,n.configurable=1!==e.i||"length"!==t),n},defineProperty:function(){t(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){t(12)}},W={};o(U,(function(e,t){W[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),W.deleteProperty=function(e,t){return U.deleteProperty.call(this,e[0],t)},W.set=function(e,t,r){return U.set.call(this,e[0],t,r,e[0])};var K=new(function(){function e(e){this.g=T,this.N=!1,"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var o=e.prototype;return o.produce=function(e,r,o){if("function"==typeof e&&"function"!=typeof r){var i=r;r=e;var u=this;return function(e){var t=this;void 0===e&&(e=i);for(var n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return u.produce(e,(function(e){var n;return(n=r).call.apply(n,[t,e].concat(o))}))}}var a;if("function"!=typeof r&&t(6),void 0!==o&&"function"!=typeof o&&t(7),n(e)){var c=m(this),f=I(this,e,void 0),s=!0;try{a=r(f),s=!1}finally{s?b(c):g(c)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(e){return h(c,o),w(e,c)}),(function(e){throw b(c),e})):(h(c,o),w(a,c))}if((a=r(e))!==M)return void 0===a&&(a=e),this.N&&d(a,!0),a},o.produceWithPatches=function(e,t){var r,n,o=this;return"function"==typeof e?function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return o.produceWithPatches(t,(function(t){return e.apply(void 0,[t].concat(n))}))}:[this.produce(e,t,(function(e,t){r=e,n=t})),r,n]},o.createDraft=function(e){n(e)||t(8);var r=m(this),o=I(this,e,void 0);return o[B].C=!0,g(r),o},o.finishDraft=function(e,t){var r=(e&&e[B]).A;return h(r,t),w(void 0,r)},o.setAutoFreeze=function(e){this.N=e},o.setUseProxies=function(e){T||t(20),this.g=e},o.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var o=t[n];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}var i=y("Patches").H;return r(e)?i(e,t):this.produce(e,(function(e){return i(e,t.slice(n+1))}))},e}()),L=K.produce;K.produceWithPatches.bind(K),K.setAutoFreeze.bind(K),K.setUseProxies.bind(K),K.applyPatches.bind(K),K.createDraft.bind(K),K.finishDraft.bind(K);var q=function(e){var t,r=("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()).Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}(),V=function(){return Math.random().toString(36).substring(7).split("").join(".")},X={INIT:"@@redux/INIT"+V(),REPLACE:"@@redux/REPLACE"+V(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+V()}};function H(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function J(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])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");if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(J)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var o=e,i=t,u=[],a=u,c=!1;function f(){a===u&&(a=u.slice())}function s(){if(c)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 i}function l(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(c)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-reference/store#subscribe(listener) for more details.");var t=!0;return f(),a.push(e),function(){if(t){if(c)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,f();var r=a.indexOf(e);a.splice(r,1)}}}function d(e){if(!H(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(c)throw new Error("Reducers may not dispatch actions.");try{c=!0,i=o(i,e)}finally{c=!1}for(var t=u=a,r=0;r<t.length;r++)(0,t[r])();return e}function p(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");o=e,d({type:X.REPLACE})}function y(){var e,t=l;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function r(){e.next&&e.next(s())}return r(),{unsubscribe:t(r)}}})[q]=function(){return this},e}return d({type:X.INIT}),(n={dispatch:d,subscribe:l,getState:s,replaceReducer:p})[q]=y,n}function Y(e,t){var r=t&&t.type;return"Given "+(r&&'action "'+String(r)+'"'||"an action")+', reducer "'+e+'" 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.'}function $(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var o=t[n];"function"==typeof e[o]&&(r[o]=e[o])}var i,u=Object.keys(r);try{!function(e){Object.keys(e).forEach((function(t){var r=e[t];if(void 0===r(void 0,{type:X.INIT}))throw new Error('Reducer "'+t+"\" 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(void 0===r(void 0,{type:X.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+X.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)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var n=!1,o={},a=0;a<u.length;a++){var c=u[a],f=e[c],s=(0,r[c])(f,t);if(void 0===s){var l=Y(c,t);throw new Error(l)}o[c]=s,n=n||s!==f}return n?o:e}}function G(e,t){return function(){return t(e.apply(this,arguments))}}function Q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Q(e,t,r[t])}))}return e}function ee(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function te(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(){var r=e.apply(void 0,arguments),n=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return Z({},r,{dispatch:n=ee.apply(void 0,i)(r.dispatch)})}}}function re(e,t){return e===t}function ne(e,t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;o<n;o++)if(!e(t[o],r[o]))return!1;return!0}function oe(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var r=t.map((function(e){return typeof e})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+r+"]")}return t}var ie=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];var i=0,u=n.pop(),a=oe(n),c=e.apply(void 0,[function(){return i++,u.apply(null,arguments)}].concat(r)),f=e((function(){for(var e=[],t=a.length,r=0;r<t;r++)e.push(a[r].apply(null,arguments));return c.apply(null,e)}));return f.resultFunc=u,f.dependencies=a,f.recomputations=function(){return i},f.resetRecomputations=function(){return i=0},f}}((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:re,r=null,n=null;return function(){return ne(t,r,arguments)||(n=e.apply(null,arguments)),r=arguments,n}}));function ue(){return(ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var ae="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ee:ee.apply(null,arguments)};function ce(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function fe(e){return function(t){var r=t.dispatch,n=t.getState;return function(t){return function(o){return"function"==typeof o?o(r,n,e):t(o)}}}}var se=fe();function le(e){return null==e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)||ce(e)}function de(e){void 0===e&&(e={});var t=e.thunk,r=void 0===t||t,n=[];return r&&(function(e){return"boolean"==typeof e}(r)?n.push(se):n.push(se.withExtraArgument(r.extraArgument))),n}function pe(e,t){function r(){if(t){var r=t.apply(void 0,arguments);if(!r)throw new Error("prepareAction did not return an object");return ue({type:e,payload:r.payload},"meta"in r&&{meta:r.meta},{},"error"in r&&{error:r.error})}return{type:e,payload:arguments.length<=0?void 0:arguments[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(t){return t.type===e},r}function ye(e){return["type","payload","error","meta"].indexOf(e)>-1}function ve(e){var t={},r={addCase:function(e,n){var o="string"==typeof e?e:e.type;if(o in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[o]=n,r}};return e(r),t}function he(e,t){var r="function"==typeof t?ve(t):t;return function(t,n){return void 0===t&&(t=e),L(t,(function(e){var t=r[n.type];return t?t(e,n):void 0}))}}function be(e){return function(t,n){var o=function(t){!function(e){return ce(t=e)&&"string"==typeof t.type&&Object.keys(t).every(ye);var t}(n)?e(n,t):e(n.payload,t)};return r(t)?(o(t),t):L(t,o)}}function ge(e,t){return t(e)}function me(e){function t(t,r){var n=ge(t,e);n in r.entities||(r.ids.push(n),r.entities[n]=t)}function r(e,r){Array.isArray(e)||(e=Object.values(e));var n=e,o=Array.isArray(n),i=0;for(n=o?n:n[Symbol.iterator]();;){var u;if(o){if(i>=n.length)break;u=n[i++]}else{if((i=n.next()).done)break;u=i.value}t(u,r)}}function n(e,t){var r=!1;e.forEach((function(e){e in t.entities&&(delete t.entities[e],r=!0)})),r&&(t.ids=t.ids.filter((function(e){return e in t.entities})))}function o(t,r){var n={},o={};t.forEach((function(e){e.id in r.entities&&(o[e.id]=ue({},o[e.id],{},e))})),(t=Object.values(o)).length>0&&t.filter((function(t){return function(t,r,n){var o=Object.assign({},n.entities[r.id],r.changes),i=ge(o,e),u=i!==r.id;return u&&(t[r.id]=i,delete n.entities[r.id]),n.entities[i]=o,u}(n,t,r)})).length>0&&(r.ids=r.ids.map((function(e){return n[e]||e})))}function i(t,n){Array.isArray(t)||(t=Object.values(t));var i=[],u=[],a=t,c=Array.isArray(a),f=0;for(a=c?a:a[Symbol.iterator]();;){var s;if(c){if(f>=a.length)break;s=a[f++]}else{if((f=a.next()).done)break;s=f.value}var l=s,d=ge(l,e);d in n.entities?u.push({id:d,changes:l}):i.push(l)}o(u,n),r(i,n)}return{removeAll:function(e){return Object.assign({},e,{ids:[],entities:{}})},addOne:be(t),addMany:be(r),setAll:be((function(e,t){Array.isArray(e)||(e=Object.values(e)),t.ids=[],t.entities={},r(e,t)})),updateOne:be((function(e,t){return o([e],t)})),updateMany:be(o),upsertOne:be((function(e,t){return i([e],t)})),upsertMany:be(i),removeOne:be((function(e,t){return n([e],t)})),removeMany:be(n)}}se.withExtraArgument=fe,"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var Oe=function(e){void 0===e&&(e=21);for(var t="",r=e;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},we=["name","message","stack","code"],Ae=function(e){this.value=e},je=function(e){if("object"==typeof e&&null!==e){var t={},r=we,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var i;if(n){if(o>=r.length)break;i=r[o++]}else{if((o=r.next()).done)break;i=o.value}"string"==typeof e[i]&&(t[i]=e[i])}return t}return{message:String(e)}};!function(){function e(e,t){var r=e[B];if(r&&!r.B){r.B=!0;var n=e[t];return r.B=!1,n}return e[t]}function i(e){e.S||(e.S=!0,e.l&&i(e.l))}function c(e){e.o||(e.o=f(e.t))}function f(e){var t=e&&e[B];if(t){t.B=!0;var r=l(t.k,!0);return t.B=!1,r}return l(e)}function d(e){for(var t=e.length-1;t>=0;t--){var r=e[t][B];if(!r.S)switch(r.i){case 5:y(r)&&i(r);break;case 4:p(r)&&i(r)}}}function p(e){for(var t=e.t,r=e.k,n=Object.keys(r),o=n.length-1;o>=0;o--){var i=n[o],c=t[i];if(void 0===c&&!u(t,i))return!0;var f=r[i],s=f&&f[B];if(s?s.t!==c:!a(f,c))return!0}return n.length!==Object.keys(t).length}function y(e){var t=e.k;if(t.length!==e.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}function h(e){e.O&&t(3,JSON.stringify(s(e)))}var b={};!function(e,t){F.ES5=t}(0,{J:function(t,r){var u=Array.isArray(t),l=f(t);o(l,(function(r){!function(t,r,o){var u=b[r];u?u.enumerable=o:b[r]=u={enumerable:o,get:function(){return function(t,r){h(t);var o=e(s(t),r);return t.B?o:o===e(t.t,r)&&n(o)?(c(t),t.o[r]=I(t.A.h,o,t)):o}(this[B],r)},set:function(t){!function(t,r,n){if(h(t),t.D[r]=!0,!t.S){if(a(n,e(s(t),r)))return;i(t),c(t)}t.o[r]=n}(this[B],r,t)}},Object.defineProperty(t,r,u)}(l,r,u||function(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!(!r||!r.enumerable)}(t,r))}));var d={i:u?5:4,A:r?r.A:v(),S:!1,B:!1,I:!1,D:{},l:r,t:t,k:l,o:null,O:!1,C:!1};return Object.defineProperty(l,B,{value:d,writable:!0}),l},$:i,P:function(e,t,n){e.p.forEach((function(e){e[B].B=!0})),n?r(t)&&t[B].A===e&&d(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var r=t[B];if(r){var n=r.t,a=r.k,c=r.D,f=r.i;if(4===f)o(a,(function(t){t!==B&&(void 0!==n[t]||u(n,t)?c[t]||e(a[t]):(c[t]=!0,i(r)))})),o(n,(function(e){void 0!==a[e]||u(a,e)||(c[e]=!1,i(r))}));else if(5===f){if(y(r)&&(i(r),c.length=!0),a.length<n.length)for(var s=a.length;s<n.length;s++)c[s]=!1;else for(var l=n.length;l<a.length;l++)c[l]=!0;for(var d=Math.min(a.length,n.length),p=0;p<d;p++)void 0===c[p]&&e(a[p])}}}}(e.p[0]),d(e.p))}})}(),e.__DO_NOT_USE__ActionTypes=X,e.applyMiddleware=te,e.bindActionCreators=function(e,t){if("function"==typeof e)return G(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var r=Object.keys(e),n={},o=0;o<r.length;o++){var i=r[o],u=e[i];"function"==typeof u&&(n[i]=G(u,t))}return n},e.combineReducers=$,e.compose=ee,e.configureStore=function(e){var t,r=e||{},n=r.reducer,o=void 0===n?void 0:n,i=r.middleware,u=void 0===i?de():i,a=r.devTools,c=void 0===a||a,f=r.preloadedState,s=void 0===f?void 0:f,l=r.enhancers,d=void 0===l?void 0:l;if("function"==typeof o)t=o;else{if(!ce(o))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=$(o)}var p=te.apply(void 0,u),y=ee;c&&(y=ae(ue({trace:!1},"object"==typeof c&&c)));var v=[p];return Array.isArray(d)?v=[p].concat(d):"function"==typeof d&&(v=d(v)),J(t,s,y.apply(void 0,v))},e.createAction=pe,e.createAsyncThunk=function(e,t){var r=pe(e+"/fulfilled",(function(e,t,r){return{payload:e,meta:{arg:r,requestId:t}}})),n=pe(e+"/pending",(function(e,t){return{payload:void 0,meta:{arg:t,requestId:e}}})),o=pe(e+"/rejected",(function(e,t,r,n){var o=!!e&&"AbortError"===e.name;return{payload:n,error:je(e||"Rejected"),meta:{arg:r,requestId:t,aborted:o}}})),i="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(u,a,c){var f,s=Oe(),l=new i,d=new Promise((function(e,t){return l.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:f||"Aborted"})}))})),p=function(){try{var i,f=function(){return u(i),i},p=function(f,p){try{var y=(u(n(s,e)),Promise.resolve(Promise.race([d,Promise.resolve(t(e,{dispatch:u,getState:a,extra:c,requestId:s,signal:l.signal,rejectWithValue:function(e){return new Ae(e)}})).then((function(t){return t instanceof Ae?o(null,s,e,t.value):r(t,s,e)}))])).then((function(e){i=e})))}catch(e){return p(e)}return y&&y.then?y.then(void 0,p):y}(0,(function(t){i=o(t,s,e)}));return Promise.resolve(p&&p.then?p.then(f):f())}catch(e){return Promise.reject(e)}}();return Object.assign(p,{abort:function(e){f=e,l.abort()}})}}),{pending:n,rejected:o,fulfilled:r})},e.createEntityAdapter=function(e){void 0===e&&(e={});var t=ue({sortComparer:!1,selectId:function(e){return e.id}},e),r=t.selectId,n=t.sortComparer;return ue({selectId:r,sortComparer:n},{getInitialState:function(e){return void 0===e&&(e={}),Object.assign({ids:[],entities:{}},e)}},{},{getSelectors:function(e){var t=function(e){return e.ids},r=function(e){return e.entities},n=ie(t,r,(function(e,t){return e.map((function(e){return t[e]}))})),o=function(e,t){return t},i=function(e,t){return e[t]},u=ie(t,(function(e){return e.length}));if(!e)return{selectIds:t,selectEntities:r,selectAll:n,selectTotal:u,selectById:ie(r,o,i)};var a=ie(e,r);return{selectIds:ie(e,t),selectEntities:a,selectAll:ie(e,n),selectTotal:ie(e,u),selectById:ie(a,o,i)}}},{},n?function(e,t){var r=me(e);function n(t,r){Array.isArray(t)||(t=Object.values(t));var n=t.filter((function(t){return!(ge(t,e)in r.entities)}));0!==n.length&&u(n,r)}function o(t,r){var n=[];t.forEach((function(t){return function(t,r,n){if(!(r.id in n.entities))return!1;var o=Object.assign({},n.entities[r.id],r.changes),i=ge(o,e);return delete n.entities[r.id],t.push(o),i!==r.id}(n,t,r)})),0!==n.length&&u(n,r)}function i(t,r){Array.isArray(t)||(t=Object.values(t));var i=[],u=[],a=t,c=Array.isArray(a),f=0;for(a=c?a:a[Symbol.iterator]();;){var s;if(c){if(f>=a.length)break;s=a[f++]}else{if((f=a.next()).done)break;s=f.value}var l=s,d=ge(l,e);d in r.entities?u.push({id:d,changes:l}):i.push(l)}o(u,r),n(i,r)}function u(r,n){r.sort(t),r.forEach((function(t){n.entities[e(t)]=t}));var o=Object.values(n.entities);o.sort(t);var i=o.map(e);(function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(e[r]!==t[r])return!1;return!0})(n.ids,i)||(n.ids=i)}return{removeOne:r.removeOne,removeMany:r.removeMany,removeAll:r.removeAll,addOne:be((function(e,t){return n([e],t)})),updateOne:be((function(e,t){return o([e],t)})),upsertOne:be((function(e,t){return i([e],t)})),setAll:be((function(e,t){Array.isArray(e)||(e=Object.values(e)),t.entities={},t.ids=[],n(e,t)})),addMany:be(n),updateMany:be(o),upsertMany:be(i)}}(r,n):me(r))},e.createImmutableStateInvariantMiddleware=function(e){return function(){return function(e){return function(t){return e(t)}}}},e.createNextState=L,e.createReducer=he,e.createSelector=ie,e.createSerializableStateInvariantMiddleware=function(e){return function(){return function(e){return function(t){return e(t)}}}},e.createSlice=function(e){var t=e.name,r=e.initialState;if(!t)throw new Error("`name` is a required option for createSlice");var n=e.reducers||{},o=void 0===e.extraReducers?{}:"function"==typeof e.extraReducers?ve(e.extraReducers):e.extraReducers,i=Object.keys(n),u={},a={},c={};i.forEach((function(e){var r,o,i=n[e],f=t+"/"+e;"reducer"in i?(r=i.reducer,o=i.prepare):r=i,u[e]=r,a[f]=r,c[e]=o?pe(f,o):pe(f)}));var f=he(r,ue({},o,{},a));return{name:t,reducer:f,actions:c,caseReducers:u}},e.createStore=J,e.findNonSerializableValue=function e(t,r,n,o,i){var u;if(void 0===r&&(r=[]),void 0===n&&(n=le),void 0===i&&(i=[]),!n(t))return{keyPath:r.join(".")||"<root>",value:t};if("object"!=typeof t||null===t)return!1;var a=null!=o?o(t):Object.entries(t),c=i.length>0,f=a,s=Array.isArray(f),l=0;for(f=s?f:f[Symbol.iterator]();;){var d;if(s){if(l>=f.length)break;d=f[l++]}else{if((l=f.next()).done)break;d=l.value}var p=d[1],y=r.concat(d[0]);if(!(c&&i.indexOf(y.join("."))>=0)){if(!n(p))return{keyPath:y.join("."),value:p};if("object"==typeof p&&(u=e(p,y,n,o,i)))return u}}return!1},e.getDefaultMiddleware=de,e.getType=function(e){return""+e},e.isImmutableDefault=function(e){return"object"!=typeof e||null==e},e.isPlain=le,e.nanoid=Oe,e.unwrapResult=function(e){if("error"in e)throw e.error;return e.payload}})); | ||
//# sourceMappingURL=redux-toolkit.umd.min.js.map |
@@ -904,2 +904,8 @@ import { Action } from 'redux'; | ||
/** | ||
* | ||
* @public | ||
*/ | ||
export declare let nanoid: (size?: number) => string; | ||
/** | ||
* Helper type. Passes T out again, but boxes it in a way that it cannot | ||
@@ -906,0 +912,0 @@ * "widen" the type by accident if it is a generic that should be inferred |
{ | ||
"name": "@reduxjs/toolkit", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "The official, opinionated, batteries-included toolset for efficient Redux development", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/reduxjs/redux-toolkit", |
@@ -103,1 +103,3 @@ import { enableES5 } from 'immer' | ||
} from './createAsyncThunk' | ||
export { nanoid } from './nanoid' |
@@ -1,27 +0,20 @@ | ||
// Borrowed from https://github.com/ai/nanoid/tree/master/non-secure | ||
// This alphabet uses a-z A-Z 0-9 _- symbols. | ||
// Symbols are generated for smaller size. | ||
// -_zyxwvutsrqponmlkjihgfedcba9876543210ZYXWVUTSRQPONMLKJIHGFEDCBA | ||
let url = '-_' | ||
// Loop from 36 to 0 (from z to a and 9 to 0 in Base36). | ||
let i = 36 | ||
while (i--) { | ||
// 36 is radix. Number.prototype.toString(36) returns number | ||
// in Base36 representation. Base36 is like hex, but it uses 0–9 and a-z. | ||
url += i.toString(36) | ||
} | ||
// Loop from 36 to 10 (from Z to A in Base36). | ||
i = 36 | ||
while (i-- - 10) { | ||
url += i.toString(36).toUpperCase() | ||
} | ||
// Borrowed from https://github.com/ai/nanoid/blob/3.0.2/non-secure/index.js | ||
// This alphabet uses `A-Za-z0-9_-` symbols. A genetic algorithm helped | ||
// optimize the gzip compression for this alphabet. | ||
let urlAlphabet = | ||
'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW' | ||
export function nanoid(size = 21) { | ||
/** | ||
* | ||
* @public | ||
*/ | ||
export let nanoid = (size = 21) => { | ||
let id = '' | ||
// Compact alternative for `for (var i = 0; i < size; i++)` | ||
while (size--) { | ||
// `| 0` is compact and faster alternative for `Math.floor()` | ||
id += url[(Math.random() * 64) | 0] | ||
// A compact alternative for `for (var i = 0; i < step; i++)`. | ||
let i = size | ||
while (i--) { | ||
// `| 0` is more compact and faster than `Math.floor()`. | ||
id += urlAlphabet[(Math.random() * 64) | 0] | ||
} | ||
return id | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1293964
11207