sceyt-chat-react-uikit 1.6.9-beta.11 → 1.6.9-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +407 -73
  2. package/index.modern.js +402 -67
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -25,7 +25,6 @@ var reactRedux = require('react-redux');
25
25
  var log = _interopDefault(require('loglevel'));
26
26
  var createSagaMiddleware = require('redux-saga');
27
27
  var createSagaMiddleware__default = _interopDefault(createSagaMiddleware);
28
- var redux$1 = require('redux');
29
28
  var FileSaver = _interopDefault(require('file-saver'));
30
29
  var effects = require('redux-saga/effects');
31
30
  var uuid = require('uuid');
@@ -47,6 +46,366 @@ var LexicalTypeaheadMenuPlugin = require('@lexical/react/LexicalTypeaheadMenuPlu
47
46
  var offset = require('@lexical/offset');
48
47
  var LexicalHistoryPlugin = require('@lexical/react/LexicalHistoryPlugin');
49
48
 
49
+ // src/utils/formatProdErrorMessage.ts
50
+ function formatProdErrorMessage(code) {
51
+ return `Minified Redux error #${code}; visit https://redux.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;
52
+ }
53
+
54
+ // src/utils/symbol-observable.ts
55
+ var $$observable = /* @__PURE__ */ (() => typeof Symbol === "function" && Symbol.observable || "@@observable")();
56
+ var symbol_observable_default = $$observable;
57
+
58
+ // src/utils/actionTypes.ts
59
+ var randomString = () => Math.random().toString(36).substring(7).split("").join(".");
60
+ var ActionTypes = {
61
+ INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`,
62
+ REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`,
63
+ PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`
64
+ };
65
+ var actionTypes_default = ActionTypes;
66
+
67
+ // src/utils/isPlainObject.ts
68
+ function isPlainObject(obj) {
69
+ if (typeof obj !== "object" || obj === null)
70
+ return false;
71
+ let proto = obj;
72
+ while (Object.getPrototypeOf(proto) !== null) {
73
+ proto = Object.getPrototypeOf(proto);
74
+ }
75
+ return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;
76
+ }
77
+
78
+ // src/utils/kindOf.ts
79
+ function miniKindOf(val) {
80
+ if (val === void 0)
81
+ return "undefined";
82
+ if (val === null)
83
+ return "null";
84
+ const type = typeof val;
85
+ switch (type) {
86
+ case "boolean":
87
+ case "string":
88
+ case "number":
89
+ case "symbol":
90
+ case "function": {
91
+ return type;
92
+ }
93
+ }
94
+ if (Array.isArray(val))
95
+ return "array";
96
+ if (isDate(val))
97
+ return "date";
98
+ if (isError(val))
99
+ return "error";
100
+ const constructorName = ctorName(val);
101
+ switch (constructorName) {
102
+ case "Symbol":
103
+ case "Promise":
104
+ case "WeakMap":
105
+ case "WeakSet":
106
+ case "Map":
107
+ case "Set":
108
+ return constructorName;
109
+ }
110
+ return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, "");
111
+ }
112
+ function ctorName(val) {
113
+ return typeof val.constructor === "function" ? val.constructor.name : null;
114
+ }
115
+ function isError(val) {
116
+ return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
117
+ }
118
+ function isDate(val) {
119
+ if (val instanceof Date)
120
+ return true;
121
+ return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
122
+ }
123
+ function kindOf(val) {
124
+ let typeOfVal = typeof val;
125
+ if (process.env.NODE_ENV !== "production") {
126
+ typeOfVal = miniKindOf(val);
127
+ }
128
+ return typeOfVal;
129
+ }
130
+
131
+ // src/createStore.ts
132
+ function createStore(reducer, preloadedState, enhancer) {
133
+ if (typeof reducer !== "function") {
134
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(2) : `Expected the root reducer to be a function. Instead, received: '${kindOf(reducer)}'`);
135
+ }
136
+ if (typeof preloadedState === "function" && typeof enhancer === "function" || typeof enhancer === "function" && typeof arguments[3] === "function") {
137
+ throw new Error(process.env.NODE_ENV === "production" ? 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.");
138
+ }
139
+ if (typeof preloadedState === "function" && typeof enhancer === "undefined") {
140
+ enhancer = preloadedState;
141
+ preloadedState = void 0;
142
+ }
143
+ if (typeof enhancer !== "undefined") {
144
+ if (typeof enhancer !== "function") {
145
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(1) : `Expected the enhancer to be a function. Instead, received: '${kindOf(enhancer)}'`);
146
+ }
147
+ return enhancer(createStore)(reducer, preloadedState);
148
+ }
149
+ let currentReducer = reducer;
150
+ let currentState = preloadedState;
151
+ let currentListeners = /* @__PURE__ */ new Map();
152
+ let nextListeners = currentListeners;
153
+ let listenerIdCounter = 0;
154
+ let isDispatching = false;
155
+ function ensureCanMutateNextListeners() {
156
+ if (nextListeners === currentListeners) {
157
+ nextListeners = /* @__PURE__ */ new Map();
158
+ currentListeners.forEach((listener, key) => {
159
+ nextListeners.set(key, listener);
160
+ });
161
+ }
162
+ }
163
+ function getState() {
164
+ if (isDispatching) {
165
+ throw new Error(process.env.NODE_ENV === "production" ? 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.");
166
+ }
167
+ return currentState;
168
+ }
169
+ function subscribe(listener) {
170
+ if (typeof listener !== "function") {
171
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(4) : `Expected the listener to be a function. Instead, received: '${kindOf(listener)}'`);
172
+ }
173
+ if (isDispatching) {
174
+ throw new Error(process.env.NODE_ENV === "production" ? 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.");
175
+ }
176
+ let isSubscribed = true;
177
+ ensureCanMutateNextListeners();
178
+ const listenerId = listenerIdCounter++;
179
+ nextListeners.set(listenerId, listener);
180
+ return function unsubscribe() {
181
+ if (!isSubscribed) {
182
+ return;
183
+ }
184
+ if (isDispatching) {
185
+ throw new Error(process.env.NODE_ENV === "production" ? 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.");
186
+ }
187
+ isSubscribed = false;
188
+ ensureCanMutateNextListeners();
189
+ nextListeners.delete(listenerId);
190
+ currentListeners = null;
191
+ };
192
+ }
193
+ function dispatch(action) {
194
+ if (!isPlainObject(action)) {
195
+ throw new Error(process.env.NODE_ENV === "production" ? 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.`);
196
+ }
197
+ if (typeof action.type === "undefined") {
198
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(8) : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');
199
+ }
200
+ if (typeof action.type !== "string") {
201
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(17) : `Action "type" property must be a string. Instead, the actual type was: '${kindOf(action.type)}'. Value was: '${action.type}' (stringified)`);
202
+ }
203
+ if (isDispatching) {
204
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(9) : "Reducers may not dispatch actions.");
205
+ }
206
+ try {
207
+ isDispatching = true;
208
+ currentState = currentReducer(currentState, action);
209
+ } finally {
210
+ isDispatching = false;
211
+ }
212
+ const listeners = currentListeners = nextListeners;
213
+ listeners.forEach((listener) => {
214
+ listener();
215
+ });
216
+ return action;
217
+ }
218
+ function replaceReducer(nextReducer) {
219
+ if (typeof nextReducer !== "function") {
220
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(10) : `Expected the nextReducer to be a function. Instead, received: '${kindOf(nextReducer)}`);
221
+ }
222
+ currentReducer = nextReducer;
223
+ dispatch({
224
+ type: actionTypes_default.REPLACE
225
+ });
226
+ }
227
+ function observable() {
228
+ const outerSubscribe = subscribe;
229
+ return {
230
+ /**
231
+ * The minimal observable subscription method.
232
+ * @param observer Any object that can be used as an observer.
233
+ * The observer object should have a `next` method.
234
+ * @returns An object with an `unsubscribe` method that can
235
+ * be used to unsubscribe the observable from the store, and prevent further
236
+ * emission of values from the observable.
237
+ */
238
+ subscribe(observer) {
239
+ if (typeof observer !== "object" || observer === null) {
240
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(11) : `Expected the observer to be an object. Instead, received: '${kindOf(observer)}'`);
241
+ }
242
+ function observeState() {
243
+ const observerAsObserver = observer;
244
+ if (observerAsObserver.next) {
245
+ observerAsObserver.next(getState());
246
+ }
247
+ }
248
+ observeState();
249
+ const unsubscribe = outerSubscribe(observeState);
250
+ return {
251
+ unsubscribe
252
+ };
253
+ },
254
+ [symbol_observable_default]() {
255
+ return this;
256
+ }
257
+ };
258
+ }
259
+ dispatch({
260
+ type: actionTypes_default.INIT
261
+ });
262
+ const store = {
263
+ dispatch,
264
+ subscribe,
265
+ getState,
266
+ replaceReducer,
267
+ [symbol_observable_default]: observable
268
+ };
269
+ return store;
270
+ }
271
+
272
+ // src/utils/warning.ts
273
+ function warning(message) {
274
+ if (typeof console !== "undefined" && typeof console.error === "function") {
275
+ console.error(message);
276
+ }
277
+ try {
278
+ throw new Error(message);
279
+ } catch (e) {
280
+ }
281
+ }
282
+
283
+ // src/combineReducers.ts
284
+ function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
285
+ const reducerKeys = Object.keys(reducers);
286
+ const argumentName = action && action.type === actionTypes_default.INIT ? "preloadedState argument passed to createStore" : "previous state received by the reducer";
287
+ if (reducerKeys.length === 0) {
288
+ return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";
289
+ }
290
+ if (!isPlainObject(inputState)) {
291
+ return `The ${argumentName} has unexpected type of "${kindOf(inputState)}". Expected argument to be an object with the following keys: "${reducerKeys.join('", "')}"`;
292
+ }
293
+ const unexpectedKeys = Object.keys(inputState).filter((key) => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]);
294
+ unexpectedKeys.forEach((key) => {
295
+ unexpectedKeyCache[key] = true;
296
+ });
297
+ if (action && action.type === actionTypes_default.REPLACE)
298
+ return;
299
+ if (unexpectedKeys.length > 0) {
300
+ 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.`;
301
+ }
302
+ }
303
+ function assertReducerShape(reducers) {
304
+ Object.keys(reducers).forEach((key) => {
305
+ const reducer = reducers[key];
306
+ const initialState = reducer(void 0, {
307
+ type: actionTypes_default.INIT
308
+ });
309
+ if (typeof initialState === "undefined") {
310
+ throw new Error(process.env.NODE_ENV === "production" ? 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.`);
311
+ }
312
+ if (typeof reducer(void 0, {
313
+ type: actionTypes_default.PROBE_UNKNOWN_ACTION()
314
+ }) === "undefined") {
315
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(13) : `The slice reducer for key "${key}" returned undefined when probed with a random type. Don't try to handle '${actionTypes_default.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.`);
316
+ }
317
+ });
318
+ }
319
+ function combineReducers(reducers) {
320
+ const reducerKeys = Object.keys(reducers);
321
+ const finalReducers = {};
322
+ for (let i = 0; i < reducerKeys.length; i++) {
323
+ const key = reducerKeys[i];
324
+ if (process.env.NODE_ENV !== "production") {
325
+ if (typeof reducers[key] === "undefined") {
326
+ warning(`No reducer provided for key "${key}"`);
327
+ }
328
+ }
329
+ if (typeof reducers[key] === "function") {
330
+ finalReducers[key] = reducers[key];
331
+ }
332
+ }
333
+ const finalReducerKeys = Object.keys(finalReducers);
334
+ let unexpectedKeyCache;
335
+ if (process.env.NODE_ENV !== "production") {
336
+ unexpectedKeyCache = {};
337
+ }
338
+ let shapeAssertionError;
339
+ try {
340
+ assertReducerShape(finalReducers);
341
+ } catch (e) {
342
+ shapeAssertionError = e;
343
+ }
344
+ return function combination(state = {}, action) {
345
+ if (shapeAssertionError) {
346
+ throw shapeAssertionError;
347
+ }
348
+ if (process.env.NODE_ENV !== "production") {
349
+ const warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
350
+ if (warningMessage) {
351
+ warning(warningMessage);
352
+ }
353
+ }
354
+ let hasChanged = false;
355
+ const nextState = {};
356
+ for (let i = 0; i < finalReducerKeys.length; i++) {
357
+ const key = finalReducerKeys[i];
358
+ const reducer = finalReducers[key];
359
+ const previousStateForKey = state[key];
360
+ const nextStateForKey = reducer(previousStateForKey, action);
361
+ if (typeof nextStateForKey === "undefined") {
362
+ const actionType = action && action.type;
363
+ throw new Error(process.env.NODE_ENV === "production" ? 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.`);
364
+ }
365
+ nextState[key] = nextStateForKey;
366
+ hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
367
+ }
368
+ hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
369
+ return hasChanged ? nextState : state;
370
+ };
371
+ }
372
+
373
+ // src/compose.ts
374
+ function compose(...funcs) {
375
+ if (funcs.length === 0) {
376
+ return (arg) => arg;
377
+ }
378
+ if (funcs.length === 1) {
379
+ return funcs[0];
380
+ }
381
+ return funcs.reduce((a, b) => (...args) => a(b(...args)));
382
+ }
383
+
384
+ // src/applyMiddleware.ts
385
+ function applyMiddleware(...middlewares) {
386
+ return (createStore2) => (reducer, preloadedState) => {
387
+ const store = createStore2(reducer, preloadedState);
388
+ let dispatch = () => {
389
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(15) : "Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.");
390
+ };
391
+ const middlewareAPI = {
392
+ getState: store.getState,
393
+ dispatch: (action, ...args) => dispatch(action, ...args)
394
+ };
395
+ const chain = middlewares.map((middleware) => middleware(middlewareAPI));
396
+ dispatch = compose(...chain)(store.dispatch);
397
+ return {
398
+ ...store,
399
+ dispatch
400
+ };
401
+ };
402
+ }
403
+
404
+ // src/utils/isAction.ts
405
+ function isAction(action) {
406
+ return isPlainObject(action) && "type" in action && typeof action.type === "string";
407
+ }
408
+
50
409
  var __defProp = Object.defineProperty;
51
410
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
52
411
  var __hasOwnProp = Object.prototype.hasOwnProperty;
@@ -121,10 +480,10 @@ function isDraftable(value) {
121
480
  var _a;
122
481
  if (!value)
123
482
  return false;
124
- return isPlainObject(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!((_a = value.constructor) == null ? void 0 : _a[DRAFTABLE]) || isMap(value) || isSet(value);
483
+ return isPlainObject$1(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!((_a = value.constructor) == null ? void 0 : _a[DRAFTABLE]) || isMap(value) || isSet(value);
125
484
  }
126
485
  var objectCtorString = Object.prototype.constructor.toString();
127
- function isPlainObject(value) {
486
+ function isPlainObject$1(value) {
128
487
  if (!value || typeof value !== "object")
129
488
  return false;
130
489
  const proto = getPrototypeOf(value);
@@ -186,7 +545,7 @@ function shallowCopy(base, strict) {
186
545
  }
187
546
  if (Array.isArray(base))
188
547
  return Array.prototype.slice.call(base);
189
- const isPlain = isPlainObject(base);
548
+ const isPlain = isPlainObject$1(base);
190
549
  if (strict === true || strict === "class_only" && !isPlain) {
191
550
  const descriptors = Object.getOwnPropertyDescriptors(base);
192
551
  delete descriptors[DRAFT_STATE];
@@ -818,8 +1177,8 @@ var __objRest = (source, exclude) => {
818
1177
  };
819
1178
  var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function() {
820
1179
  if (arguments.length === 0) return void 0;
821
- if (typeof arguments[0] === "object") return redux$1.compose;
822
- return redux$1.compose.apply(null, arguments);
1180
+ if (typeof arguments[0] === "object") return compose;
1181
+ return compose.apply(null, arguments);
823
1182
  };
824
1183
 
825
1184
  // src/tsHelpers.ts
@@ -833,7 +1192,7 @@ function createAction(type, prepareAction) {
833
1192
  if (prepareAction) {
834
1193
  let prepared = prepareAction(...args);
835
1194
  if (!prepared) {
836
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(0) : "prepareAction did not return an object");
1195
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(0) : "prepareAction did not return an object");
837
1196
  }
838
1197
  return __spreadValues$1(__spreadValues$1({
839
1198
  type,
@@ -851,7 +1210,7 @@ function createAction(type, prepareAction) {
851
1210
  }
852
1211
  actionCreator.toString = () => `${type}`;
853
1212
  actionCreator.type = type;
854
- actionCreator.match = (action) => redux$1.isAction(action) && action.type === type;
1213
+ actionCreator.match = (action) => isAction(action) && action.type === type;
855
1214
  return actionCreator;
856
1215
  }
857
1216
  function isActionCreator(action) {
@@ -1042,7 +1401,7 @@ function createImmutableStateInvariantMiddleware(options = {}) {
1042
1401
  result = tracker.detectMutations();
1043
1402
  tracker = track(state);
1044
1403
  if (result.wasMutated) {
1045
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(19) : `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)`);
1404
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(19) : `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)`);
1046
1405
  }
1047
1406
  });
1048
1407
  const dispatchedAction = next(action);
@@ -1051,7 +1410,7 @@ function createImmutableStateInvariantMiddleware(options = {}) {
1051
1410
  result = tracker.detectMutations();
1052
1411
  tracker = track(state);
1053
1412
  if (result.wasMutated) {
1054
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(20) : `A state mutation was detected inside a dispatch, in the path: ${result.path || ""}. Take a look at the reducer(s) handling the action ${stringify2(action)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`);
1413
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(20) : `A state mutation was detected inside a dispatch, in the path: ${result.path || ""}. Take a look at the reducer(s) handling the action ${stringify2(action)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`);
1055
1414
  }
1056
1415
  });
1057
1416
  measureUtils.warnIfExceeded();
@@ -1062,7 +1421,7 @@ function createImmutableStateInvariantMiddleware(options = {}) {
1062
1421
  }
1063
1422
  function isPlain(val) {
1064
1423
  const type = typeof val;
1065
- return val == null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || redux$1.isPlainObject(val);
1424
+ return val == null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val);
1066
1425
  }
1067
1426
  function findNonSerializableValue(value, path = "", isSerializable = isPlain, getEntries, ignoredPaths = [], cache) {
1068
1427
  let foundNestedSerializable;
@@ -1132,7 +1491,7 @@ function createSerializableStateInvariantMiddleware(options = {}) {
1132
1491
  } = options;
1133
1492
  const cache = !disableCache && WeakSet ? /* @__PURE__ */ new WeakSet() : void 0;
1134
1493
  return (storeAPI) => (next) => (action) => {
1135
- if (!redux$1.isAction(action)) {
1494
+ if (!isAction(action)) {
1136
1495
  return next(action);
1137
1496
  }
1138
1497
  const result = next(action);
@@ -1300,59 +1659,59 @@ function configureStore(options) {
1300
1659
  let rootReducer;
1301
1660
  if (typeof reducer === "function") {
1302
1661
  rootReducer = reducer;
1303
- } else if (redux$1.isPlainObject(reducer)) {
1304
- rootReducer = redux$1.combineReducers(reducer);
1662
+ } else if (isPlainObject(reducer)) {
1663
+ rootReducer = combineReducers(reducer);
1305
1664
  } else {
1306
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(1) : "`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");
1665
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(1) : "`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");
1307
1666
  }
1308
1667
  if (process.env.NODE_ENV !== "production" && middleware && typeof middleware !== "function") {
1309
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(2) : "`middleware` field must be a callback");
1668
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(2) : "`middleware` field must be a callback");
1310
1669
  }
1311
1670
  let finalMiddleware;
1312
1671
  if (typeof middleware === "function") {
1313
1672
  finalMiddleware = middleware(getDefaultMiddleware);
1314
1673
  if (process.env.NODE_ENV !== "production" && !Array.isArray(finalMiddleware)) {
1315
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(3) : "when using a middleware builder function, an array of middleware must be returned");
1674
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(3) : "when using a middleware builder function, an array of middleware must be returned");
1316
1675
  }
1317
1676
  } else {
1318
1677
  finalMiddleware = getDefaultMiddleware();
1319
1678
  }
1320
1679
  if (process.env.NODE_ENV !== "production" && finalMiddleware.some((item) => typeof item !== "function")) {
1321
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(4) : "each middleware provided to configureStore must be a function");
1680
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(4) : "each middleware provided to configureStore must be a function");
1322
1681
  }
1323
1682
  if (process.env.NODE_ENV !== "production" && duplicateMiddlewareCheck) {
1324
1683
  let middlewareReferences = /* @__PURE__ */ new Set();
1325
1684
  finalMiddleware.forEach((middleware2) => {
1326
1685
  if (middlewareReferences.has(middleware2)) {
1327
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(42) : "Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");
1686
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(42) : "Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");
1328
1687
  }
1329
1688
  middlewareReferences.add(middleware2);
1330
1689
  });
1331
1690
  }
1332
- let finalCompose = redux$1.compose;
1691
+ let finalCompose = compose;
1333
1692
  if (devTools) {
1334
1693
  finalCompose = composeWithDevTools(__spreadValues$1({
1335
1694
  // Enable capture of stack traces for dispatched Redux actions
1336
1695
  trace: process.env.NODE_ENV !== "production"
1337
1696
  }, typeof devTools === "object" && devTools));
1338
1697
  }
1339
- const middlewareEnhancer = redux$1.applyMiddleware(...finalMiddleware);
1698
+ const middlewareEnhancer = applyMiddleware(...finalMiddleware);
1340
1699
  const getDefaultEnhancers = buildGetDefaultEnhancers(middlewareEnhancer);
1341
1700
  if (process.env.NODE_ENV !== "production" && enhancers && typeof enhancers !== "function") {
1342
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(5) : "`enhancers` field must be a callback");
1701
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(5) : "`enhancers` field must be a callback");
1343
1702
  }
1344
1703
  let storeEnhancers = typeof enhancers === "function" ? enhancers(getDefaultEnhancers) : getDefaultEnhancers();
1345
1704
  if (process.env.NODE_ENV !== "production" && !Array.isArray(storeEnhancers)) {
1346
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(6) : "`enhancers` callback must return an array");
1705
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(6) : "`enhancers` callback must return an array");
1347
1706
  }
1348
1707
  if (process.env.NODE_ENV !== "production" && storeEnhancers.some((item) => typeof item !== "function")) {
1349
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(7) : "each enhancer provided to configureStore must be a function");
1708
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(7) : "each enhancer provided to configureStore must be a function");
1350
1709
  }
1351
1710
  if (process.env.NODE_ENV !== "production" && finalMiddleware.length && !storeEnhancers.includes(middlewareEnhancer)) {
1352
1711
  console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");
1353
1712
  }
1354
1713
  const composedEnhancer = finalCompose(...storeEnhancers);
1355
- return redux$1.createStore(rootReducer, preloadedState, composedEnhancer);
1714
+ return createStore(rootReducer, preloadedState, composedEnhancer);
1356
1715
  }
1357
1716
 
1358
1717
  // src/mapBuilders.ts
@@ -1364,18 +1723,18 @@ function executeReducerBuilderCallback(builderCallback) {
1364
1723
  addCase(typeOrActionCreator, reducer) {
1365
1724
  if (process.env.NODE_ENV !== "production") {
1366
1725
  if (actionMatchers.length > 0) {
1367
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(26) : "`builder.addCase` should only be called before calling `builder.addMatcher`");
1726
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(26) : "`builder.addCase` should only be called before calling `builder.addMatcher`");
1368
1727
  }
1369
1728
  if (defaultCaseReducer) {
1370
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(27) : "`builder.addCase` should only be called before calling `builder.addDefaultCase`");
1729
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(27) : "`builder.addCase` should only be called before calling `builder.addDefaultCase`");
1371
1730
  }
1372
1731
  }
1373
1732
  const type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
1374
1733
  if (!type) {
1375
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(28) : "`builder.addCase` cannot be called with an empty action type");
1734
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(28) : "`builder.addCase` cannot be called with an empty action type");
1376
1735
  }
1377
1736
  if (type in actionsMap) {
1378
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(29) : `\`builder.addCase\` cannot be called with two reducers for the same action type '${type}'`);
1737
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(29) : `\`builder.addCase\` cannot be called with two reducers for the same action type '${type}'`);
1379
1738
  }
1380
1739
  actionsMap[type] = reducer;
1381
1740
  return builder;
@@ -1383,7 +1742,7 @@ function executeReducerBuilderCallback(builderCallback) {
1383
1742
  addMatcher(matcher, reducer) {
1384
1743
  if (process.env.NODE_ENV !== "production") {
1385
1744
  if (defaultCaseReducer) {
1386
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(30) : "`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
1745
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(30) : "`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
1387
1746
  }
1388
1747
  }
1389
1748
  actionMatchers.push({
@@ -1395,7 +1754,7 @@ function executeReducerBuilderCallback(builderCallback) {
1395
1754
  addDefaultCase(reducer) {
1396
1755
  if (process.env.NODE_ENV !== "production") {
1397
1756
  if (defaultCaseReducer) {
1398
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(31) : "`builder.addDefaultCase` can only be called once");
1757
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(31) : "`builder.addDefaultCase` can only be called once");
1399
1758
  }
1400
1759
  }
1401
1760
  defaultCaseReducer = reducer;
@@ -1413,7 +1772,7 @@ function isStateFunction(x) {
1413
1772
  function createReducer(initialState, mapOrBuilderCallback) {
1414
1773
  if (process.env.NODE_ENV !== "production") {
1415
1774
  if (typeof mapOrBuilderCallback === "object") {
1416
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(8) : "The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");
1775
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(8) : "The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");
1417
1776
  }
1418
1777
  }
1419
1778
  let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] = executeReducerBuilderCallback(mapOrBuilderCallback);
@@ -1480,7 +1839,7 @@ function buildCreateSlice({
1480
1839
  reducerPath = name
1481
1840
  } = options;
1482
1841
  if (!name) {
1483
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(11) : "`name` is a required option for createSlice");
1842
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(11) : "`name` is a required option for createSlice");
1484
1843
  }
1485
1844
  if (typeof process !== "undefined" && process.env.NODE_ENV === "development") {
1486
1845
  if (options.initialState === void 0) {
@@ -1499,10 +1858,10 @@ function buildCreateSlice({
1499
1858
  addCase(typeOrActionCreator, reducer2) {
1500
1859
  const type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
1501
1860
  if (!type) {
1502
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(12) : "`context.addCase` cannot be called with an empty action type");
1861
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(12) : "`context.addCase` cannot be called with an empty action type");
1503
1862
  }
1504
1863
  if (type in context.sliceCaseReducersByType) {
1505
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(13) : "`context.addCase` cannot be called with two reducers for the same action type: " + type);
1864
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(13) : "`context.addCase` cannot be called with two reducers for the same action type: " + type);
1506
1865
  }
1507
1866
  context.sliceCaseReducersByType[type] = reducer2;
1508
1867
  return contextMethods;
@@ -1539,7 +1898,7 @@ function buildCreateSlice({
1539
1898
  function buildReducer() {
1540
1899
  if (process.env.NODE_ENV !== "production") {
1541
1900
  if (typeof options.extraReducers === "object") {
1542
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(14) : "The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");
1901
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(14) : "The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");
1543
1902
  }
1544
1903
  }
1545
1904
  const [extraReducers = {}, actionMatchers = [], defaultCaseReducer = void 0] = typeof options.extraReducers === "function" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers];
@@ -1578,7 +1937,7 @@ function buildCreateSlice({
1578
1937
  if (injected) {
1579
1938
  sliceState = getOrInsertComputed(injectedStateCache, selectSlice, getInitialState);
1580
1939
  } else if (process.env.NODE_ENV !== "production") {
1581
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(15) : "selectSlice returned undefined for an uninjected slice reducer");
1940
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(15) : "selectSlice returned undefined for an uninjected slice reducer");
1582
1941
  }
1583
1942
  }
1584
1943
  return sliceState;
@@ -1634,7 +1993,7 @@ function wrapSelector(selector, selectState, getInitialState, injected) {
1634
1993
  if (injected) {
1635
1994
  sliceState = getInitialState();
1636
1995
  } else if (process.env.NODE_ENV !== "production") {
1637
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(16) : "selectState returned undefined for an uninjected slice reducer");
1996
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(16) : "selectState returned undefined for an uninjected slice reducer");
1638
1997
  }
1639
1998
  }
1640
1999
  return selector(sliceState, ...args);
@@ -1682,7 +2041,7 @@ function handleNormalReducerDefinition({
1682
2041
  let prepareCallback;
1683
2042
  if ("reducer" in maybeReducerWithPrepare) {
1684
2043
  if (createNotation && !isCaseReducerWithPrepareDefinition(maybeReducerWithPrepare)) {
1685
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(17) : "Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");
2044
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(17) : "Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");
1686
2045
  }
1687
2046
  caseReducer = maybeReducerWithPrepare.reducer;
1688
2047
  prepareCallback = maybeReducerWithPrepare.prepare;
@@ -1702,7 +2061,7 @@ function handleThunkCaseReducerDefinition({
1702
2061
  reducerName
1703
2062
  }, reducerDefinition, context, cAT) {
1704
2063
  if (!cAT) {
1705
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(18) : "Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");
2064
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(18) : "Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");
1706
2065
  }
1707
2066
  const {
1708
2067
  payloadCreator,
@@ -1737,7 +2096,7 @@ function noop() {
1737
2096
  }
1738
2097
 
1739
2098
  // src/formatProdErrorMessage.ts
1740
- function formatProdErrorMessage(code) {
2099
+ function formatProdErrorMessage$1(code) {
1741
2100
  return `Minified Redux Toolkit error #${code}; visit https://redux-toolkit.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;
1742
2101
  }
1743
2102
 
@@ -10414,14 +10773,6 @@ var ThemeReducer = (function (state, _ref) {
10414
10773
  }
10415
10774
  });
10416
10775
 
10417
- var reducers = redux$1.combineReducers({
10418
- ChannelReducer: ChannelReducer,
10419
- MessageReducer: MessageReducer,
10420
- MembersReducer: MembersReducer,
10421
- ThemeReducer: ThemeReducer,
10422
- UserReducer: UserReducer
10423
- });
10424
-
10425
10776
  var createChannelAC = function createChannelAC(channelData, dontCreateIfNotExists) {
10426
10777
  return {
10427
10778
  type: CREATE_CHANNEL,
@@ -19336,32 +19687,15 @@ function rootSaga() {
19336
19687
  }, _marked$6);
19337
19688
  }
19338
19689
 
19339
- function isAction(action) {
19340
- return typeof action === 'object' && action !== null && typeof action.type === 'string';
19341
- }
19342
- function isPlainObject$1(obj) {
19343
- if (typeof obj !== 'object' || obj === null) return false;
19344
- var proto = obj;
19345
- while (Object.getPrototypeOf(proto) !== null) {
19346
- proto = Object.getPrototypeOf(proto);
19347
- }
19348
- return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;
19349
- }
19350
- try {
19351
- var redux = require('redux');
19352
- if (!redux.isAction) {
19353
- redux.isAction = isAction;
19354
- }
19355
- if (!redux.isPlainObject) {
19356
- redux.isPlainObject = isPlainObject$1;
19357
- }
19358
- } catch (error) {
19359
- console.warn('Could not patch Redux module:', error);
19360
- }
19361
-
19362
19690
  var sagaMiddleware = createSagaMiddleware__default();
19363
19691
  var store = configureStore({
19364
- reducer: reducers,
19692
+ reducer: {
19693
+ ChannelReducer: ChannelReducer,
19694
+ MessageReducer: MessageReducer,
19695
+ MembersReducer: MembersReducer,
19696
+ ThemeReducer: ThemeReducer,
19697
+ UserReducer: UserReducer
19698
+ },
19365
19699
  middleware: function middleware(getDefaultMiddleware) {
19366
19700
  return getDefaultMiddleware({
19367
19701
  thunk: false,