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.
- package/index.js +407 -73
- package/index.modern.js +402 -67
- package/package.json +1 -1
package/index.modern.js
CHANGED
|
@@ -2,7 +2,6 @@ import React__default, { createElement as createElement$1, useRef, useEffect, us
|
|
|
2
2
|
import { useSelector, useDispatch, shallowEqual, Provider } from 'react-redux';
|
|
3
3
|
import log from 'loglevel';
|
|
4
4
|
import createSagaMiddleware, { eventChannel } from 'redux-saga';
|
|
5
|
-
import { createStore, isPlainObject as isPlainObject$2, combineReducers, applyMiddleware, compose, isAction as isAction$1 } from 'redux';
|
|
6
5
|
import FileSaver from 'file-saver';
|
|
7
6
|
import { select, put, call, take, takeLatest, takeEvery, all } from 'redux-saga/effects';
|
|
8
7
|
import { v4 } from 'uuid';
|
|
@@ -23,6 +22,367 @@ import { useBasicTypeaheadTriggerMatch, LexicalTypeaheadMenuPlugin, MenuOption }
|
|
|
23
22
|
import { $createOffsetView } from '@lexical/offset';
|
|
24
23
|
import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin';
|
|
25
24
|
|
|
25
|
+
// src/utils/formatProdErrorMessage.ts
|
|
26
|
+
function formatProdErrorMessage(code) {
|
|
27
|
+
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. `;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// src/utils/symbol-observable.ts
|
|
31
|
+
var $$observable = /* @__PURE__ */ (() => typeof Symbol === "function" && Symbol.observable || "@@observable")();
|
|
32
|
+
var symbol_observable_default = $$observable;
|
|
33
|
+
|
|
34
|
+
// src/utils/actionTypes.ts
|
|
35
|
+
var randomString = () => Math.random().toString(36).substring(7).split("").join(".");
|
|
36
|
+
var ActionTypes = {
|
|
37
|
+
INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`,
|
|
38
|
+
REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`,
|
|
39
|
+
PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`
|
|
40
|
+
};
|
|
41
|
+
var actionTypes_default = ActionTypes;
|
|
42
|
+
|
|
43
|
+
// src/utils/isPlainObject.ts
|
|
44
|
+
function isPlainObject(obj) {
|
|
45
|
+
if (typeof obj !== "object" || obj === null)
|
|
46
|
+
return false;
|
|
47
|
+
let proto = obj;
|
|
48
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
|
49
|
+
proto = Object.getPrototypeOf(proto);
|
|
50
|
+
}
|
|
51
|
+
return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// src/utils/kindOf.ts
|
|
55
|
+
function miniKindOf(val) {
|
|
56
|
+
if (val === void 0)
|
|
57
|
+
return "undefined";
|
|
58
|
+
if (val === null)
|
|
59
|
+
return "null";
|
|
60
|
+
const type = typeof val;
|
|
61
|
+
switch (type) {
|
|
62
|
+
case "boolean":
|
|
63
|
+
case "string":
|
|
64
|
+
case "number":
|
|
65
|
+
case "symbol":
|
|
66
|
+
case "function": {
|
|
67
|
+
return type;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (Array.isArray(val))
|
|
71
|
+
return "array";
|
|
72
|
+
if (isDate(val))
|
|
73
|
+
return "date";
|
|
74
|
+
if (isError(val))
|
|
75
|
+
return "error";
|
|
76
|
+
const constructorName = ctorName(val);
|
|
77
|
+
switch (constructorName) {
|
|
78
|
+
case "Symbol":
|
|
79
|
+
case "Promise":
|
|
80
|
+
case "WeakMap":
|
|
81
|
+
case "WeakSet":
|
|
82
|
+
case "Map":
|
|
83
|
+
case "Set":
|
|
84
|
+
return constructorName;
|
|
85
|
+
}
|
|
86
|
+
return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, "");
|
|
87
|
+
}
|
|
88
|
+
function ctorName(val) {
|
|
89
|
+
return typeof val.constructor === "function" ? val.constructor.name : null;
|
|
90
|
+
}
|
|
91
|
+
function isError(val) {
|
|
92
|
+
return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
|
|
93
|
+
}
|
|
94
|
+
function isDate(val) {
|
|
95
|
+
if (val instanceof Date)
|
|
96
|
+
return true;
|
|
97
|
+
return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
|
|
98
|
+
}
|
|
99
|
+
function kindOf(val) {
|
|
100
|
+
let typeOfVal = typeof val;
|
|
101
|
+
if (process.env.NODE_ENV !== "production") {
|
|
102
|
+
typeOfVal = miniKindOf(val);
|
|
103
|
+
}
|
|
104
|
+
return typeOfVal;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// src/createStore.ts
|
|
108
|
+
function createStore(reducer, preloadedState, enhancer) {
|
|
109
|
+
if (typeof reducer !== "function") {
|
|
110
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(2) : `Expected the root reducer to be a function. Instead, received: '${kindOf(reducer)}'`);
|
|
111
|
+
}
|
|
112
|
+
if (typeof preloadedState === "function" && typeof enhancer === "function" || typeof enhancer === "function" && typeof arguments[3] === "function") {
|
|
113
|
+
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.");
|
|
114
|
+
}
|
|
115
|
+
if (typeof preloadedState === "function" && typeof enhancer === "undefined") {
|
|
116
|
+
enhancer = preloadedState;
|
|
117
|
+
preloadedState = void 0;
|
|
118
|
+
}
|
|
119
|
+
if (typeof enhancer !== "undefined") {
|
|
120
|
+
if (typeof enhancer !== "function") {
|
|
121
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(1) : `Expected the enhancer to be a function. Instead, received: '${kindOf(enhancer)}'`);
|
|
122
|
+
}
|
|
123
|
+
return enhancer(createStore)(reducer, preloadedState);
|
|
124
|
+
}
|
|
125
|
+
let currentReducer = reducer;
|
|
126
|
+
let currentState = preloadedState;
|
|
127
|
+
let currentListeners = /* @__PURE__ */ new Map();
|
|
128
|
+
let nextListeners = currentListeners;
|
|
129
|
+
let listenerIdCounter = 0;
|
|
130
|
+
let isDispatching = false;
|
|
131
|
+
function ensureCanMutateNextListeners() {
|
|
132
|
+
if (nextListeners === currentListeners) {
|
|
133
|
+
nextListeners = /* @__PURE__ */ new Map();
|
|
134
|
+
currentListeners.forEach((listener, key) => {
|
|
135
|
+
nextListeners.set(key, listener);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function getState() {
|
|
140
|
+
if (isDispatching) {
|
|
141
|
+
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.");
|
|
142
|
+
}
|
|
143
|
+
return currentState;
|
|
144
|
+
}
|
|
145
|
+
function subscribe(listener) {
|
|
146
|
+
if (typeof listener !== "function") {
|
|
147
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(4) : `Expected the listener to be a function. Instead, received: '${kindOf(listener)}'`);
|
|
148
|
+
}
|
|
149
|
+
if (isDispatching) {
|
|
150
|
+
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.");
|
|
151
|
+
}
|
|
152
|
+
let isSubscribed = true;
|
|
153
|
+
ensureCanMutateNextListeners();
|
|
154
|
+
const listenerId = listenerIdCounter++;
|
|
155
|
+
nextListeners.set(listenerId, listener);
|
|
156
|
+
return function unsubscribe() {
|
|
157
|
+
if (!isSubscribed) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
if (isDispatching) {
|
|
161
|
+
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.");
|
|
162
|
+
}
|
|
163
|
+
isSubscribed = false;
|
|
164
|
+
ensureCanMutateNextListeners();
|
|
165
|
+
nextListeners.delete(listenerId);
|
|
166
|
+
currentListeners = null;
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function dispatch(action) {
|
|
170
|
+
if (!isPlainObject(action)) {
|
|
171
|
+
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.`);
|
|
172
|
+
}
|
|
173
|
+
if (typeof action.type === "undefined") {
|
|
174
|
+
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.');
|
|
175
|
+
}
|
|
176
|
+
if (typeof action.type !== "string") {
|
|
177
|
+
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)`);
|
|
178
|
+
}
|
|
179
|
+
if (isDispatching) {
|
|
180
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(9) : "Reducers may not dispatch actions.");
|
|
181
|
+
}
|
|
182
|
+
try {
|
|
183
|
+
isDispatching = true;
|
|
184
|
+
currentState = currentReducer(currentState, action);
|
|
185
|
+
} finally {
|
|
186
|
+
isDispatching = false;
|
|
187
|
+
}
|
|
188
|
+
const listeners = currentListeners = nextListeners;
|
|
189
|
+
listeners.forEach((listener) => {
|
|
190
|
+
listener();
|
|
191
|
+
});
|
|
192
|
+
return action;
|
|
193
|
+
}
|
|
194
|
+
function replaceReducer(nextReducer) {
|
|
195
|
+
if (typeof nextReducer !== "function") {
|
|
196
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(10) : `Expected the nextReducer to be a function. Instead, received: '${kindOf(nextReducer)}`);
|
|
197
|
+
}
|
|
198
|
+
currentReducer = nextReducer;
|
|
199
|
+
dispatch({
|
|
200
|
+
type: actionTypes_default.REPLACE
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
function observable() {
|
|
204
|
+
const outerSubscribe = subscribe;
|
|
205
|
+
return {
|
|
206
|
+
/**
|
|
207
|
+
* The minimal observable subscription method.
|
|
208
|
+
* @param observer Any object that can be used as an observer.
|
|
209
|
+
* The observer object should have a `next` method.
|
|
210
|
+
* @returns An object with an `unsubscribe` method that can
|
|
211
|
+
* be used to unsubscribe the observable from the store, and prevent further
|
|
212
|
+
* emission of values from the observable.
|
|
213
|
+
*/
|
|
214
|
+
subscribe(observer) {
|
|
215
|
+
if (typeof observer !== "object" || observer === null) {
|
|
216
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(11) : `Expected the observer to be an object. Instead, received: '${kindOf(observer)}'`);
|
|
217
|
+
}
|
|
218
|
+
function observeState() {
|
|
219
|
+
const observerAsObserver = observer;
|
|
220
|
+
if (observerAsObserver.next) {
|
|
221
|
+
observerAsObserver.next(getState());
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
observeState();
|
|
225
|
+
const unsubscribe = outerSubscribe(observeState);
|
|
226
|
+
return {
|
|
227
|
+
unsubscribe
|
|
228
|
+
};
|
|
229
|
+
},
|
|
230
|
+
[symbol_observable_default]() {
|
|
231
|
+
return this;
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
dispatch({
|
|
236
|
+
type: actionTypes_default.INIT
|
|
237
|
+
});
|
|
238
|
+
const store = {
|
|
239
|
+
dispatch,
|
|
240
|
+
subscribe,
|
|
241
|
+
getState,
|
|
242
|
+
replaceReducer,
|
|
243
|
+
[symbol_observable_default]: observable
|
|
244
|
+
};
|
|
245
|
+
return store;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// src/utils/warning.ts
|
|
249
|
+
function warning(message) {
|
|
250
|
+
if (typeof console !== "undefined" && typeof console.error === "function") {
|
|
251
|
+
console.error(message);
|
|
252
|
+
}
|
|
253
|
+
try {
|
|
254
|
+
throw new Error(message);
|
|
255
|
+
} catch (e) {
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// src/combineReducers.ts
|
|
260
|
+
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
|
|
261
|
+
const reducerKeys = Object.keys(reducers);
|
|
262
|
+
const argumentName = action && action.type === actionTypes_default.INIT ? "preloadedState argument passed to createStore" : "previous state received by the reducer";
|
|
263
|
+
if (reducerKeys.length === 0) {
|
|
264
|
+
return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";
|
|
265
|
+
}
|
|
266
|
+
if (!isPlainObject(inputState)) {
|
|
267
|
+
return `The ${argumentName} has unexpected type of "${kindOf(inputState)}". Expected argument to be an object with the following keys: "${reducerKeys.join('", "')}"`;
|
|
268
|
+
}
|
|
269
|
+
const unexpectedKeys = Object.keys(inputState).filter((key) => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]);
|
|
270
|
+
unexpectedKeys.forEach((key) => {
|
|
271
|
+
unexpectedKeyCache[key] = true;
|
|
272
|
+
});
|
|
273
|
+
if (action && action.type === actionTypes_default.REPLACE)
|
|
274
|
+
return;
|
|
275
|
+
if (unexpectedKeys.length > 0) {
|
|
276
|
+
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.`;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
function assertReducerShape(reducers) {
|
|
280
|
+
Object.keys(reducers).forEach((key) => {
|
|
281
|
+
const reducer = reducers[key];
|
|
282
|
+
const initialState = reducer(void 0, {
|
|
283
|
+
type: actionTypes_default.INIT
|
|
284
|
+
});
|
|
285
|
+
if (typeof initialState === "undefined") {
|
|
286
|
+
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.`);
|
|
287
|
+
}
|
|
288
|
+
if (typeof reducer(void 0, {
|
|
289
|
+
type: actionTypes_default.PROBE_UNKNOWN_ACTION()
|
|
290
|
+
}) === "undefined") {
|
|
291
|
+
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.`);
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
function combineReducers(reducers) {
|
|
296
|
+
const reducerKeys = Object.keys(reducers);
|
|
297
|
+
const finalReducers = {};
|
|
298
|
+
for (let i = 0; i < reducerKeys.length; i++) {
|
|
299
|
+
const key = reducerKeys[i];
|
|
300
|
+
if (process.env.NODE_ENV !== "production") {
|
|
301
|
+
if (typeof reducers[key] === "undefined") {
|
|
302
|
+
warning(`No reducer provided for key "${key}"`);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
if (typeof reducers[key] === "function") {
|
|
306
|
+
finalReducers[key] = reducers[key];
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
const finalReducerKeys = Object.keys(finalReducers);
|
|
310
|
+
let unexpectedKeyCache;
|
|
311
|
+
if (process.env.NODE_ENV !== "production") {
|
|
312
|
+
unexpectedKeyCache = {};
|
|
313
|
+
}
|
|
314
|
+
let shapeAssertionError;
|
|
315
|
+
try {
|
|
316
|
+
assertReducerShape(finalReducers);
|
|
317
|
+
} catch (e) {
|
|
318
|
+
shapeAssertionError = e;
|
|
319
|
+
}
|
|
320
|
+
return function combination(state = {}, action) {
|
|
321
|
+
if (shapeAssertionError) {
|
|
322
|
+
throw shapeAssertionError;
|
|
323
|
+
}
|
|
324
|
+
if (process.env.NODE_ENV !== "production") {
|
|
325
|
+
const warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
|
|
326
|
+
if (warningMessage) {
|
|
327
|
+
warning(warningMessage);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
let hasChanged = false;
|
|
331
|
+
const nextState = {};
|
|
332
|
+
for (let i = 0; i < finalReducerKeys.length; i++) {
|
|
333
|
+
const key = finalReducerKeys[i];
|
|
334
|
+
const reducer = finalReducers[key];
|
|
335
|
+
const previousStateForKey = state[key];
|
|
336
|
+
const nextStateForKey = reducer(previousStateForKey, action);
|
|
337
|
+
if (typeof nextStateForKey === "undefined") {
|
|
338
|
+
const actionType = action && action.type;
|
|
339
|
+
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.`);
|
|
340
|
+
}
|
|
341
|
+
nextState[key] = nextStateForKey;
|
|
342
|
+
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
|
|
343
|
+
}
|
|
344
|
+
hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
|
|
345
|
+
return hasChanged ? nextState : state;
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// src/compose.ts
|
|
350
|
+
function compose(...funcs) {
|
|
351
|
+
if (funcs.length === 0) {
|
|
352
|
+
return (arg) => arg;
|
|
353
|
+
}
|
|
354
|
+
if (funcs.length === 1) {
|
|
355
|
+
return funcs[0];
|
|
356
|
+
}
|
|
357
|
+
return funcs.reduce((a, b) => (...args) => a(b(...args)));
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// src/applyMiddleware.ts
|
|
361
|
+
function applyMiddleware(...middlewares) {
|
|
362
|
+
return (createStore2) => (reducer, preloadedState) => {
|
|
363
|
+
const store = createStore2(reducer, preloadedState);
|
|
364
|
+
let dispatch = () => {
|
|
365
|
+
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.");
|
|
366
|
+
};
|
|
367
|
+
const middlewareAPI = {
|
|
368
|
+
getState: store.getState,
|
|
369
|
+
dispatch: (action, ...args) => dispatch(action, ...args)
|
|
370
|
+
};
|
|
371
|
+
const chain = middlewares.map((middleware) => middleware(middlewareAPI));
|
|
372
|
+
dispatch = compose(...chain)(store.dispatch);
|
|
373
|
+
return {
|
|
374
|
+
...store,
|
|
375
|
+
dispatch
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// src/utils/isAction.ts
|
|
381
|
+
function isAction(action) {
|
|
382
|
+
return isPlainObject(action) && "type" in action && typeof action.type === "string";
|
|
383
|
+
}
|
|
384
|
+
//# sourceMappingURL=redux.mjs.map
|
|
385
|
+
|
|
26
386
|
var __defProp = Object.defineProperty;
|
|
27
387
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
28
388
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
@@ -97,10 +457,10 @@ function isDraftable(value) {
|
|
|
97
457
|
var _a;
|
|
98
458
|
if (!value)
|
|
99
459
|
return false;
|
|
100
|
-
return isPlainObject(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!((_a = value.constructor) == null ? void 0 : _a[DRAFTABLE]) || isMap(value) || isSet(value);
|
|
460
|
+
return isPlainObject$1(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!((_a = value.constructor) == null ? void 0 : _a[DRAFTABLE]) || isMap(value) || isSet(value);
|
|
101
461
|
}
|
|
102
462
|
var objectCtorString = Object.prototype.constructor.toString();
|
|
103
|
-
function isPlainObject(value) {
|
|
463
|
+
function isPlainObject$1(value) {
|
|
104
464
|
if (!value || typeof value !== "object")
|
|
105
465
|
return false;
|
|
106
466
|
const proto = getPrototypeOf(value);
|
|
@@ -162,7 +522,7 @@ function shallowCopy(base, strict) {
|
|
|
162
522
|
}
|
|
163
523
|
if (Array.isArray(base))
|
|
164
524
|
return Array.prototype.slice.call(base);
|
|
165
|
-
const isPlain = isPlainObject(base);
|
|
525
|
+
const isPlain = isPlainObject$1(base);
|
|
166
526
|
if (strict === true || strict === "class_only" && !isPlain) {
|
|
167
527
|
const descriptors = Object.getOwnPropertyDescriptors(base);
|
|
168
528
|
delete descriptors[DRAFT_STATE];
|
|
@@ -810,7 +1170,7 @@ function createAction(type, prepareAction) {
|
|
|
810
1170
|
if (prepareAction) {
|
|
811
1171
|
let prepared = prepareAction(...args);
|
|
812
1172
|
if (!prepared) {
|
|
813
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(0) : "prepareAction did not return an object");
|
|
1173
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(0) : "prepareAction did not return an object");
|
|
814
1174
|
}
|
|
815
1175
|
return __spreadValues$1(__spreadValues$1({
|
|
816
1176
|
type,
|
|
@@ -828,7 +1188,7 @@ function createAction(type, prepareAction) {
|
|
|
828
1188
|
}
|
|
829
1189
|
actionCreator.toString = () => `${type}`;
|
|
830
1190
|
actionCreator.type = type;
|
|
831
|
-
actionCreator.match = (action) => isAction
|
|
1191
|
+
actionCreator.match = (action) => isAction(action) && action.type === type;
|
|
832
1192
|
return actionCreator;
|
|
833
1193
|
}
|
|
834
1194
|
function isActionCreator(action) {
|
|
@@ -1019,7 +1379,7 @@ function createImmutableStateInvariantMiddleware(options = {}) {
|
|
|
1019
1379
|
result = tracker.detectMutations();
|
|
1020
1380
|
tracker = track(state);
|
|
1021
1381
|
if (result.wasMutated) {
|
|
1022
|
-
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)`);
|
|
1382
|
+
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)`);
|
|
1023
1383
|
}
|
|
1024
1384
|
});
|
|
1025
1385
|
const dispatchedAction = next(action);
|
|
@@ -1028,7 +1388,7 @@ function createImmutableStateInvariantMiddleware(options = {}) {
|
|
|
1028
1388
|
result = tracker.detectMutations();
|
|
1029
1389
|
tracker = track(state);
|
|
1030
1390
|
if (result.wasMutated) {
|
|
1031
|
-
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)`);
|
|
1391
|
+
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)`);
|
|
1032
1392
|
}
|
|
1033
1393
|
});
|
|
1034
1394
|
measureUtils.warnIfExceeded();
|
|
@@ -1039,7 +1399,7 @@ function createImmutableStateInvariantMiddleware(options = {}) {
|
|
|
1039
1399
|
}
|
|
1040
1400
|
function isPlain(val) {
|
|
1041
1401
|
const type = typeof val;
|
|
1042
|
-
return val == null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject
|
|
1402
|
+
return val == null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val);
|
|
1043
1403
|
}
|
|
1044
1404
|
function findNonSerializableValue(value, path = "", isSerializable = isPlain, getEntries, ignoredPaths = [], cache) {
|
|
1045
1405
|
let foundNestedSerializable;
|
|
@@ -1109,7 +1469,7 @@ function createSerializableStateInvariantMiddleware(options = {}) {
|
|
|
1109
1469
|
} = options;
|
|
1110
1470
|
const cache = !disableCache && WeakSet ? /* @__PURE__ */ new WeakSet() : void 0;
|
|
1111
1471
|
return (storeAPI) => (next) => (action) => {
|
|
1112
|
-
if (!isAction
|
|
1472
|
+
if (!isAction(action)) {
|
|
1113
1473
|
return next(action);
|
|
1114
1474
|
}
|
|
1115
1475
|
const result = next(action);
|
|
@@ -1277,31 +1637,31 @@ function configureStore(options) {
|
|
|
1277
1637
|
let rootReducer;
|
|
1278
1638
|
if (typeof reducer === "function") {
|
|
1279
1639
|
rootReducer = reducer;
|
|
1280
|
-
} else if (isPlainObject
|
|
1640
|
+
} else if (isPlainObject(reducer)) {
|
|
1281
1641
|
rootReducer = combineReducers(reducer);
|
|
1282
1642
|
} else {
|
|
1283
|
-
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");
|
|
1643
|
+
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");
|
|
1284
1644
|
}
|
|
1285
1645
|
if (process.env.NODE_ENV !== "production" && middleware && typeof middleware !== "function") {
|
|
1286
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(2) : "`middleware` field must be a callback");
|
|
1646
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(2) : "`middleware` field must be a callback");
|
|
1287
1647
|
}
|
|
1288
1648
|
let finalMiddleware;
|
|
1289
1649
|
if (typeof middleware === "function") {
|
|
1290
1650
|
finalMiddleware = middleware(getDefaultMiddleware);
|
|
1291
1651
|
if (process.env.NODE_ENV !== "production" && !Array.isArray(finalMiddleware)) {
|
|
1292
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(3) : "when using a middleware builder function, an array of middleware must be returned");
|
|
1652
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(3) : "when using a middleware builder function, an array of middleware must be returned");
|
|
1293
1653
|
}
|
|
1294
1654
|
} else {
|
|
1295
1655
|
finalMiddleware = getDefaultMiddleware();
|
|
1296
1656
|
}
|
|
1297
1657
|
if (process.env.NODE_ENV !== "production" && finalMiddleware.some((item) => typeof item !== "function")) {
|
|
1298
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(4) : "each middleware provided to configureStore must be a function");
|
|
1658
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(4) : "each middleware provided to configureStore must be a function");
|
|
1299
1659
|
}
|
|
1300
1660
|
if (process.env.NODE_ENV !== "production" && duplicateMiddlewareCheck) {
|
|
1301
1661
|
let middlewareReferences = /* @__PURE__ */ new Set();
|
|
1302
1662
|
finalMiddleware.forEach((middleware2) => {
|
|
1303
1663
|
if (middlewareReferences.has(middleware2)) {
|
|
1304
|
-
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.");
|
|
1664
|
+
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.");
|
|
1305
1665
|
}
|
|
1306
1666
|
middlewareReferences.add(middleware2);
|
|
1307
1667
|
});
|
|
@@ -1316,14 +1676,14 @@ function configureStore(options) {
|
|
|
1316
1676
|
const middlewareEnhancer = applyMiddleware(...finalMiddleware);
|
|
1317
1677
|
const getDefaultEnhancers = buildGetDefaultEnhancers(middlewareEnhancer);
|
|
1318
1678
|
if (process.env.NODE_ENV !== "production" && enhancers && typeof enhancers !== "function") {
|
|
1319
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(5) : "`enhancers` field must be a callback");
|
|
1679
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(5) : "`enhancers` field must be a callback");
|
|
1320
1680
|
}
|
|
1321
1681
|
let storeEnhancers = typeof enhancers === "function" ? enhancers(getDefaultEnhancers) : getDefaultEnhancers();
|
|
1322
1682
|
if (process.env.NODE_ENV !== "production" && !Array.isArray(storeEnhancers)) {
|
|
1323
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(6) : "`enhancers` callback must return an array");
|
|
1683
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(6) : "`enhancers` callback must return an array");
|
|
1324
1684
|
}
|
|
1325
1685
|
if (process.env.NODE_ENV !== "production" && storeEnhancers.some((item) => typeof item !== "function")) {
|
|
1326
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(7) : "each enhancer provided to configureStore must be a function");
|
|
1686
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(7) : "each enhancer provided to configureStore must be a function");
|
|
1327
1687
|
}
|
|
1328
1688
|
if (process.env.NODE_ENV !== "production" && finalMiddleware.length && !storeEnhancers.includes(middlewareEnhancer)) {
|
|
1329
1689
|
console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");
|
|
@@ -1341,18 +1701,18 @@ function executeReducerBuilderCallback(builderCallback) {
|
|
|
1341
1701
|
addCase(typeOrActionCreator, reducer) {
|
|
1342
1702
|
if (process.env.NODE_ENV !== "production") {
|
|
1343
1703
|
if (actionMatchers.length > 0) {
|
|
1344
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(26) : "`builder.addCase` should only be called before calling `builder.addMatcher`");
|
|
1704
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(26) : "`builder.addCase` should only be called before calling `builder.addMatcher`");
|
|
1345
1705
|
}
|
|
1346
1706
|
if (defaultCaseReducer) {
|
|
1347
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(27) : "`builder.addCase` should only be called before calling `builder.addDefaultCase`");
|
|
1707
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(27) : "`builder.addCase` should only be called before calling `builder.addDefaultCase`");
|
|
1348
1708
|
}
|
|
1349
1709
|
}
|
|
1350
1710
|
const type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
|
|
1351
1711
|
if (!type) {
|
|
1352
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(28) : "`builder.addCase` cannot be called with an empty action type");
|
|
1712
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(28) : "`builder.addCase` cannot be called with an empty action type");
|
|
1353
1713
|
}
|
|
1354
1714
|
if (type in actionsMap) {
|
|
1355
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(29) : `\`builder.addCase\` cannot be called with two reducers for the same action type '${type}'`);
|
|
1715
|
+
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}'`);
|
|
1356
1716
|
}
|
|
1357
1717
|
actionsMap[type] = reducer;
|
|
1358
1718
|
return builder;
|
|
@@ -1360,7 +1720,7 @@ function executeReducerBuilderCallback(builderCallback) {
|
|
|
1360
1720
|
addMatcher(matcher, reducer) {
|
|
1361
1721
|
if (process.env.NODE_ENV !== "production") {
|
|
1362
1722
|
if (defaultCaseReducer) {
|
|
1363
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(30) : "`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
|
|
1723
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(30) : "`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
|
|
1364
1724
|
}
|
|
1365
1725
|
}
|
|
1366
1726
|
actionMatchers.push({
|
|
@@ -1372,7 +1732,7 @@ function executeReducerBuilderCallback(builderCallback) {
|
|
|
1372
1732
|
addDefaultCase(reducer) {
|
|
1373
1733
|
if (process.env.NODE_ENV !== "production") {
|
|
1374
1734
|
if (defaultCaseReducer) {
|
|
1375
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(31) : "`builder.addDefaultCase` can only be called once");
|
|
1735
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(31) : "`builder.addDefaultCase` can only be called once");
|
|
1376
1736
|
}
|
|
1377
1737
|
}
|
|
1378
1738
|
defaultCaseReducer = reducer;
|
|
@@ -1390,7 +1750,7 @@ function isStateFunction(x) {
|
|
|
1390
1750
|
function createReducer(initialState, mapOrBuilderCallback) {
|
|
1391
1751
|
if (process.env.NODE_ENV !== "production") {
|
|
1392
1752
|
if (typeof mapOrBuilderCallback === "object") {
|
|
1393
|
-
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");
|
|
1753
|
+
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");
|
|
1394
1754
|
}
|
|
1395
1755
|
}
|
|
1396
1756
|
let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] = executeReducerBuilderCallback(mapOrBuilderCallback);
|
|
@@ -1457,7 +1817,7 @@ function buildCreateSlice({
|
|
|
1457
1817
|
reducerPath = name
|
|
1458
1818
|
} = options;
|
|
1459
1819
|
if (!name) {
|
|
1460
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(11) : "`name` is a required option for createSlice");
|
|
1820
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(11) : "`name` is a required option for createSlice");
|
|
1461
1821
|
}
|
|
1462
1822
|
if (typeof process !== "undefined" && process.env.NODE_ENV === "development") {
|
|
1463
1823
|
if (options.initialState === void 0) {
|
|
@@ -1476,10 +1836,10 @@ function buildCreateSlice({
|
|
|
1476
1836
|
addCase(typeOrActionCreator, reducer2) {
|
|
1477
1837
|
const type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
|
|
1478
1838
|
if (!type) {
|
|
1479
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(12) : "`context.addCase` cannot be called with an empty action type");
|
|
1839
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(12) : "`context.addCase` cannot be called with an empty action type");
|
|
1480
1840
|
}
|
|
1481
1841
|
if (type in context.sliceCaseReducersByType) {
|
|
1482
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(13) : "`context.addCase` cannot be called with two reducers for the same action type: " + type);
|
|
1842
|
+
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);
|
|
1483
1843
|
}
|
|
1484
1844
|
context.sliceCaseReducersByType[type] = reducer2;
|
|
1485
1845
|
return contextMethods;
|
|
@@ -1516,7 +1876,7 @@ function buildCreateSlice({
|
|
|
1516
1876
|
function buildReducer() {
|
|
1517
1877
|
if (process.env.NODE_ENV !== "production") {
|
|
1518
1878
|
if (typeof options.extraReducers === "object") {
|
|
1519
|
-
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");
|
|
1879
|
+
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");
|
|
1520
1880
|
}
|
|
1521
1881
|
}
|
|
1522
1882
|
const [extraReducers = {}, actionMatchers = [], defaultCaseReducer = void 0] = typeof options.extraReducers === "function" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers];
|
|
@@ -1555,7 +1915,7 @@ function buildCreateSlice({
|
|
|
1555
1915
|
if (injected) {
|
|
1556
1916
|
sliceState = getOrInsertComputed(injectedStateCache, selectSlice, getInitialState);
|
|
1557
1917
|
} else if (process.env.NODE_ENV !== "production") {
|
|
1558
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(15) : "selectSlice returned undefined for an uninjected slice reducer");
|
|
1918
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(15) : "selectSlice returned undefined for an uninjected slice reducer");
|
|
1559
1919
|
}
|
|
1560
1920
|
}
|
|
1561
1921
|
return sliceState;
|
|
@@ -1611,7 +1971,7 @@ function wrapSelector(selector, selectState, getInitialState, injected) {
|
|
|
1611
1971
|
if (injected) {
|
|
1612
1972
|
sliceState = getInitialState();
|
|
1613
1973
|
} else if (process.env.NODE_ENV !== "production") {
|
|
1614
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(16) : "selectState returned undefined for an uninjected slice reducer");
|
|
1974
|
+
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage$1(16) : "selectState returned undefined for an uninjected slice reducer");
|
|
1615
1975
|
}
|
|
1616
1976
|
}
|
|
1617
1977
|
return selector(sliceState, ...args);
|
|
@@ -1659,7 +2019,7 @@ function handleNormalReducerDefinition({
|
|
|
1659
2019
|
let prepareCallback;
|
|
1660
2020
|
if ("reducer" in maybeReducerWithPrepare) {
|
|
1661
2021
|
if (createNotation && !isCaseReducerWithPrepareDefinition(maybeReducerWithPrepare)) {
|
|
1662
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(17) : "Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");
|
|
2022
|
+
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.");
|
|
1663
2023
|
}
|
|
1664
2024
|
caseReducer = maybeReducerWithPrepare.reducer;
|
|
1665
2025
|
prepareCallback = maybeReducerWithPrepare.prepare;
|
|
@@ -1679,7 +2039,7 @@ function handleThunkCaseReducerDefinition({
|
|
|
1679
2039
|
reducerName
|
|
1680
2040
|
}, reducerDefinition, context, cAT) {
|
|
1681
2041
|
if (!cAT) {
|
|
1682
|
-
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`.");
|
|
2042
|
+
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`.");
|
|
1683
2043
|
}
|
|
1684
2044
|
const {
|
|
1685
2045
|
payloadCreator,
|
|
@@ -1714,7 +2074,7 @@ function noop() {
|
|
|
1714
2074
|
}
|
|
1715
2075
|
|
|
1716
2076
|
// src/formatProdErrorMessage.ts
|
|
1717
|
-
function formatProdErrorMessage(code) {
|
|
2077
|
+
function formatProdErrorMessage$1(code) {
|
|
1718
2078
|
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. `;
|
|
1719
2079
|
}
|
|
1720
2080
|
//# sourceMappingURL=redux-toolkit.legacy-esm.js.map
|
|
@@ -10392,14 +10752,6 @@ var ThemeReducer = (function (state, _ref) {
|
|
|
10392
10752
|
}
|
|
10393
10753
|
});
|
|
10394
10754
|
|
|
10395
|
-
var reducers = combineReducers({
|
|
10396
|
-
ChannelReducer: ChannelReducer,
|
|
10397
|
-
MessageReducer: MessageReducer,
|
|
10398
|
-
MembersReducer: MembersReducer,
|
|
10399
|
-
ThemeReducer: ThemeReducer,
|
|
10400
|
-
UserReducer: UserReducer
|
|
10401
|
-
});
|
|
10402
|
-
|
|
10403
10755
|
var createChannelAC = function createChannelAC(channelData, dontCreateIfNotExists) {
|
|
10404
10756
|
return {
|
|
10405
10757
|
type: CREATE_CHANNEL,
|
|
@@ -19314,32 +19666,15 @@ function rootSaga() {
|
|
|
19314
19666
|
}, _marked$6);
|
|
19315
19667
|
}
|
|
19316
19668
|
|
|
19317
|
-
function isAction(action) {
|
|
19318
|
-
return typeof action === 'object' && action !== null && typeof action.type === 'string';
|
|
19319
|
-
}
|
|
19320
|
-
function isPlainObject$1(obj) {
|
|
19321
|
-
if (typeof obj !== 'object' || obj === null) return false;
|
|
19322
|
-
var proto = obj;
|
|
19323
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
|
19324
|
-
proto = Object.getPrototypeOf(proto);
|
|
19325
|
-
}
|
|
19326
|
-
return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;
|
|
19327
|
-
}
|
|
19328
|
-
try {
|
|
19329
|
-
var redux = require('redux');
|
|
19330
|
-
if (!redux.isAction) {
|
|
19331
|
-
redux.isAction = isAction;
|
|
19332
|
-
}
|
|
19333
|
-
if (!redux.isPlainObject) {
|
|
19334
|
-
redux.isPlainObject = isPlainObject$1;
|
|
19335
|
-
}
|
|
19336
|
-
} catch (error) {
|
|
19337
|
-
console.warn('Could not patch Redux module:', error);
|
|
19338
|
-
}
|
|
19339
|
-
|
|
19340
19669
|
var sagaMiddleware = createSagaMiddleware();
|
|
19341
19670
|
var store = configureStore({
|
|
19342
|
-
reducer:
|
|
19671
|
+
reducer: {
|
|
19672
|
+
ChannelReducer: ChannelReducer,
|
|
19673
|
+
MessageReducer: MessageReducer,
|
|
19674
|
+
MembersReducer: MembersReducer,
|
|
19675
|
+
ThemeReducer: ThemeReducer,
|
|
19676
|
+
UserReducer: UserReducer
|
|
19677
|
+
},
|
|
19343
19678
|
middleware: function middleware(getDefaultMiddleware) {
|
|
19344
19679
|
return getDefaultMiddleware({
|
|
19345
19680
|
thunk: false,
|