@fctc/widget-logic 1.6.2 → 1.6.3

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/dist/store.mjs CHANGED
@@ -1,3083 +1,2 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
- }) : x)(function(x) {
10
- if (typeof require !== "undefined") return require.apply(this, arguments);
11
- throw Error('Dynamic require of "' + x + '" is not supported');
12
- });
13
- var __commonJS = (cb, mod) => function __require2() {
14
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
- };
16
- var __copyProps = (to, from, except, desc) => {
17
- if (from && typeof from === "object" || typeof from === "function") {
18
- for (let key of __getOwnPropNames(from))
19
- if (!__hasOwnProp.call(to, key) && key !== except)
20
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
- }
22
- return to;
23
- };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
- // If the importer is in node compatibility mode or this is not an ESM
26
- // file that has been converted to a CommonJS file using a Babel-
27
- // compatible transform (i.e. "__esModule" has not been set), then set
28
- // "default" to the CommonJS "module.exports" for node compatibility.
29
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
30
- mod
31
- ));
32
-
33
- // ../interface-logic/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js
34
- var require_use_sync_external_store_with_selector_production = __commonJS({
35
- "../interface-logic/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js"(exports) {
36
- "use strict";
37
- var React2 = __require("react");
38
- function is2(x, y) {
39
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
40
- }
41
- var objectIs = "function" === typeof Object.is ? Object.is : is2;
42
- var useSyncExternalStore2 = React2.useSyncExternalStore;
43
- var useRef2 = React2.useRef;
44
- var useEffect2 = React2.useEffect;
45
- var useMemo2 = React2.useMemo;
46
- var useDebugValue2 = React2.useDebugValue;
47
- exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
48
- var instRef = useRef2(null);
49
- if (null === instRef.current) {
50
- var inst = { hasValue: false, value: null };
51
- instRef.current = inst;
52
- } else inst = instRef.current;
53
- instRef = useMemo2(
54
- function() {
55
- function memoizedSelector(nextSnapshot) {
56
- if (!hasMemo) {
57
- hasMemo = true;
58
- memoizedSnapshot = nextSnapshot;
59
- nextSnapshot = selector(nextSnapshot);
60
- if (void 0 !== isEqual && inst.hasValue) {
61
- var currentSelection = inst.value;
62
- if (isEqual(currentSelection, nextSnapshot))
63
- return memoizedSelection = currentSelection;
64
- }
65
- return memoizedSelection = nextSnapshot;
66
- }
67
- currentSelection = memoizedSelection;
68
- if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
69
- var nextSelection = selector(nextSnapshot);
70
- if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
71
- return memoizedSnapshot = nextSnapshot, currentSelection;
72
- memoizedSnapshot = nextSnapshot;
73
- return memoizedSelection = nextSelection;
74
- }
75
- var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
76
- return [
77
- function() {
78
- return memoizedSelector(getSnapshot());
79
- },
80
- null === maybeGetServerSnapshot ? void 0 : function() {
81
- return memoizedSelector(maybeGetServerSnapshot());
82
- }
83
- ];
84
- },
85
- [getSnapshot, getServerSnapshot, selector, isEqual]
86
- );
87
- var value = useSyncExternalStore2(subscribe, instRef[0], instRef[1]);
88
- useEffect2(
89
- function() {
90
- inst.hasValue = true;
91
- inst.value = value;
92
- },
93
- [value]
94
- );
95
- useDebugValue2(value);
96
- return value;
97
- };
98
- }
99
- });
100
-
101
- // ../interface-logic/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js
102
- var require_use_sync_external_store_with_selector_development = __commonJS({
103
- "../interface-logic/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js"(exports) {
104
- "use strict";
105
- "production" !== process.env.NODE_ENV && function() {
106
- function is2(x, y) {
107
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
108
- }
109
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
110
- var React2 = __require("react"), objectIs = "function" === typeof Object.is ? Object.is : is2, useSyncExternalStore2 = React2.useSyncExternalStore, useRef2 = React2.useRef, useEffect2 = React2.useEffect, useMemo2 = React2.useMemo, useDebugValue2 = React2.useDebugValue;
111
- exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
112
- var instRef = useRef2(null);
113
- if (null === instRef.current) {
114
- var inst = { hasValue: false, value: null };
115
- instRef.current = inst;
116
- } else inst = instRef.current;
117
- instRef = useMemo2(
118
- function() {
119
- function memoizedSelector(nextSnapshot) {
120
- if (!hasMemo) {
121
- hasMemo = true;
122
- memoizedSnapshot = nextSnapshot;
123
- nextSnapshot = selector(nextSnapshot);
124
- if (void 0 !== isEqual && inst.hasValue) {
125
- var currentSelection = inst.value;
126
- if (isEqual(currentSelection, nextSnapshot))
127
- return memoizedSelection = currentSelection;
128
- }
129
- return memoizedSelection = nextSnapshot;
130
- }
131
- currentSelection = memoizedSelection;
132
- if (objectIs(memoizedSnapshot, nextSnapshot))
133
- return currentSelection;
134
- var nextSelection = selector(nextSnapshot);
135
- if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
136
- return memoizedSnapshot = nextSnapshot, currentSelection;
137
- memoizedSnapshot = nextSnapshot;
138
- return memoizedSelection = nextSelection;
139
- }
140
- var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
141
- return [
142
- function() {
143
- return memoizedSelector(getSnapshot());
144
- },
145
- null === maybeGetServerSnapshot ? void 0 : function() {
146
- return memoizedSelector(maybeGetServerSnapshot());
147
- }
148
- ];
149
- },
150
- [getSnapshot, getServerSnapshot, selector, isEqual]
151
- );
152
- var value = useSyncExternalStore2(subscribe, instRef[0], instRef[1]);
153
- useEffect2(
154
- function() {
155
- inst.hasValue = true;
156
- inst.value = value;
157
- },
158
- [value]
159
- );
160
- useDebugValue2(value);
161
- return value;
162
- };
163
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
164
- }();
165
- }
166
- });
167
-
168
- // ../interface-logic/node_modules/use-sync-external-store/with-selector.js
169
- var require_with_selector = __commonJS({
170
- "../interface-logic/node_modules/use-sync-external-store/with-selector.js"(exports, module) {
171
- "use strict";
172
- if (process.env.NODE_ENV === "production") {
173
- module.exports = require_use_sync_external_store_with_selector_production();
174
- } else {
175
- module.exports = require_use_sync_external_store_with_selector_development();
176
- }
177
- }
178
- });
179
-
180
- // ../interface-logic/node_modules/react-redux/dist/react-redux.mjs
181
- var import_with_selector = __toESM(require_with_selector(), 1);
182
- import * as React from "react";
183
- var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
184
- var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
185
- var ForwardRef = REACT_FORWARD_REF_TYPE;
186
- var Memo = REACT_MEMO_TYPE;
187
- var FORWARD_REF_STATICS = {
188
- $$typeof: true,
189
- render: true,
190
- defaultProps: true,
191
- displayName: true,
192
- propTypes: true
193
- };
194
- var MEMO_STATICS = {
195
- $$typeof: true,
196
- compare: true,
197
- defaultProps: true,
198
- displayName: true,
199
- propTypes: true,
200
- type: true
201
- };
202
- var TYPE_STATICS = {
203
- [ForwardRef]: FORWARD_REF_STATICS,
204
- [Memo]: MEMO_STATICS
205
- };
206
- var objectPrototype = Object.prototype;
207
- var ContextKey = /* @__PURE__ */ Symbol.for(`react-redux-context`);
208
- var gT = typeof globalThis !== "undefined" ? globalThis : (
209
- /* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */
210
- {}
211
- );
212
- function getContext() {
213
- if (!React.createContext) return {};
214
- const contextMap = gT[ContextKey] ??= /* @__PURE__ */ new Map();
215
- let realContext = contextMap.get(React.createContext);
216
- if (!realContext) {
217
- realContext = React.createContext(
218
- null
219
- );
220
- if (process.env.NODE_ENV !== "production") {
221
- realContext.displayName = "ReactRedux";
222
- }
223
- contextMap.set(React.createContext, realContext);
224
- }
225
- return realContext;
226
- }
227
- var ReactReduxContext = /* @__PURE__ */ getContext();
228
- function createReduxContextHook(context = ReactReduxContext) {
229
- return function useReduxContext2() {
230
- const contextValue = React.useContext(context);
231
- if (process.env.NODE_ENV !== "production" && !contextValue) {
232
- throw new Error(
233
- "could not find react-redux context value; please ensure the component is wrapped in a <Provider>"
234
- );
235
- }
236
- return contextValue;
237
- };
238
- }
239
- var useReduxContext = /* @__PURE__ */ createReduxContextHook();
240
- function createStoreHook(context = ReactReduxContext) {
241
- const useReduxContext2 = context === ReactReduxContext ? useReduxContext : (
242
- // @ts-ignore
243
- createReduxContextHook(context)
244
- );
245
- const useStore2 = () => {
246
- const { store } = useReduxContext2();
247
- return store;
248
- };
249
- Object.assign(useStore2, {
250
- withTypes: () => useStore2
251
- });
252
- return useStore2;
253
- }
254
- var useStore = /* @__PURE__ */ createStoreHook();
255
- function createDispatchHook(context = ReactReduxContext) {
256
- const useStore2 = context === ReactReduxContext ? useStore : createStoreHook(context);
257
- const useDispatch2 = () => {
258
- const store = useStore2();
259
- return store.dispatch;
260
- };
261
- Object.assign(useDispatch2, {
262
- withTypes: () => useDispatch2
263
- });
264
- return useDispatch2;
265
- }
266
- var useDispatch = /* @__PURE__ */ createDispatchHook();
267
- var refEquality = (a, b) => a === b;
268
- function createSelectorHook(context = ReactReduxContext) {
269
- const useReduxContext2 = context === ReactReduxContext ? useReduxContext : createReduxContextHook(context);
270
- const useSelector2 = (selector, equalityFnOrOptions = {}) => {
271
- const { equalityFn = refEquality } = typeof equalityFnOrOptions === "function" ? { equalityFn: equalityFnOrOptions } : equalityFnOrOptions;
272
- if (process.env.NODE_ENV !== "production") {
273
- if (!selector) {
274
- throw new Error(`You must pass a selector to useSelector`);
275
- }
276
- if (typeof selector !== "function") {
277
- throw new Error(`You must pass a function as a selector to useSelector`);
278
- }
279
- if (typeof equalityFn !== "function") {
280
- throw new Error(
281
- `You must pass a function as an equality function to useSelector`
282
- );
283
- }
284
- }
285
- const reduxContext = useReduxContext2();
286
- const { store, subscription, getServerState } = reduxContext;
287
- const firstRun = React.useRef(true);
288
- const wrappedSelector = React.useCallback(
289
- {
290
- [selector.name](state) {
291
- const selected = selector(state);
292
- if (process.env.NODE_ENV !== "production") {
293
- const { devModeChecks = {} } = typeof equalityFnOrOptions === "function" ? {} : equalityFnOrOptions;
294
- const { identityFunctionCheck, stabilityCheck } = reduxContext;
295
- const {
296
- identityFunctionCheck: finalIdentityFunctionCheck,
297
- stabilityCheck: finalStabilityCheck
298
- } = {
299
- stabilityCheck,
300
- identityFunctionCheck,
301
- ...devModeChecks
302
- };
303
- if (finalStabilityCheck === "always" || finalStabilityCheck === "once" && firstRun.current) {
304
- const toCompare = selector(state);
305
- if (!equalityFn(selected, toCompare)) {
306
- let stack = void 0;
307
- try {
308
- throw new Error();
309
- } catch (e) {
310
- ;
311
- ({ stack } = e);
312
- }
313
- console.warn(
314
- "Selector " + (selector.name || "unknown") + " returned a different result when called with the same parameters. This can lead to unnecessary rerenders.\nSelectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization",
315
- {
316
- state,
317
- selected,
318
- selected2: toCompare,
319
- stack
320
- }
321
- );
322
- }
323
- }
324
- if (finalIdentityFunctionCheck === "always" || finalIdentityFunctionCheck === "once" && firstRun.current) {
325
- if (selected === state) {
326
- let stack = void 0;
327
- try {
328
- throw new Error();
329
- } catch (e) {
330
- ;
331
- ({ stack } = e);
332
- }
333
- console.warn(
334
- "Selector " + (selector.name || "unknown") + " returned the root state when called. This can lead to unnecessary rerenders.\nSelectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.",
335
- { stack }
336
- );
337
- }
338
- }
339
- if (firstRun.current) firstRun.current = false;
340
- }
341
- return selected;
342
- }
343
- }[selector.name],
344
- [selector]
345
- );
346
- const selectedState = (0, import_with_selector.useSyncExternalStoreWithSelector)(
347
- subscription.addNestedSub,
348
- store.getState,
349
- getServerState || store.getState,
350
- wrappedSelector,
351
- equalityFn
352
- );
353
- React.useDebugValue(selectedState);
354
- return selectedState;
355
- };
356
- Object.assign(useSelector2, {
357
- withTypes: () => useSelector2
358
- });
359
- return useSelector2;
360
- }
361
- var useSelector = /* @__PURE__ */ createSelectorHook();
362
-
363
- // ../interface-logic/node_modules/redux/dist/redux.mjs
364
- function formatProdErrorMessage(code) {
365
- 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. `;
366
- }
367
- var $$observable = /* @__PURE__ */ (() => typeof Symbol === "function" && Symbol.observable || "@@observable")();
368
- var symbol_observable_default = $$observable;
369
- var randomString = () => Math.random().toString(36).substring(7).split("").join(".");
370
- var ActionTypes = {
371
- INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`,
372
- REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`,
373
- PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`
374
- };
375
- var actionTypes_default = ActionTypes;
376
- function isPlainObject(obj) {
377
- if (typeof obj !== "object" || obj === null)
378
- return false;
379
- let proto = obj;
380
- while (Object.getPrototypeOf(proto) !== null) {
381
- proto = Object.getPrototypeOf(proto);
382
- }
383
- return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;
384
- }
385
- function miniKindOf(val) {
386
- if (val === void 0)
387
- return "undefined";
388
- if (val === null)
389
- return "null";
390
- const type = typeof val;
391
- switch (type) {
392
- case "boolean":
393
- case "string":
394
- case "number":
395
- case "symbol":
396
- case "function": {
397
- return type;
398
- }
399
- }
400
- if (Array.isArray(val))
401
- return "array";
402
- if (isDate(val))
403
- return "date";
404
- if (isError(val))
405
- return "error";
406
- const constructorName = ctorName(val);
407
- switch (constructorName) {
408
- case "Symbol":
409
- case "Promise":
410
- case "WeakMap":
411
- case "WeakSet":
412
- case "Map":
413
- case "Set":
414
- return constructorName;
415
- }
416
- return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, "");
417
- }
418
- function ctorName(val) {
419
- return typeof val.constructor === "function" ? val.constructor.name : null;
420
- }
421
- function isError(val) {
422
- return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
423
- }
424
- function isDate(val) {
425
- if (val instanceof Date)
426
- return true;
427
- return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
428
- }
429
- function kindOf(val) {
430
- let typeOfVal = typeof val;
431
- if (process.env.NODE_ENV !== "production") {
432
- typeOfVal = miniKindOf(val);
433
- }
434
- return typeOfVal;
435
- }
436
- function createStore(reducer, preloadedState, enhancer) {
437
- if (typeof reducer !== "function") {
438
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(2) : `Expected the root reducer to be a function. Instead, received: '${kindOf(reducer)}'`);
439
- }
440
- if (typeof preloadedState === "function" && typeof enhancer === "function" || typeof enhancer === "function" && typeof arguments[3] === "function") {
441
- 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.");
442
- }
443
- if (typeof preloadedState === "function" && typeof enhancer === "undefined") {
444
- enhancer = preloadedState;
445
- preloadedState = void 0;
446
- }
447
- if (typeof enhancer !== "undefined") {
448
- if (typeof enhancer !== "function") {
449
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(1) : `Expected the enhancer to be a function. Instead, received: '${kindOf(enhancer)}'`);
450
- }
451
- return enhancer(createStore)(reducer, preloadedState);
452
- }
453
- let currentReducer = reducer;
454
- let currentState = preloadedState;
455
- let currentListeners = /* @__PURE__ */ new Map();
456
- let nextListeners = currentListeners;
457
- let listenerIdCounter = 0;
458
- let isDispatching = false;
459
- function ensureCanMutateNextListeners() {
460
- if (nextListeners === currentListeners) {
461
- nextListeners = /* @__PURE__ */ new Map();
462
- currentListeners.forEach((listener2, key) => {
463
- nextListeners.set(key, listener2);
464
- });
465
- }
466
- }
467
- function getState() {
468
- if (isDispatching) {
469
- 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.");
470
- }
471
- return currentState;
472
- }
473
- function subscribe(listener2) {
474
- if (typeof listener2 !== "function") {
475
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(4) : `Expected the listener to be a function. Instead, received: '${kindOf(listener2)}'`);
476
- }
477
- if (isDispatching) {
478
- 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.");
479
- }
480
- let isSubscribed = true;
481
- ensureCanMutateNextListeners();
482
- const listenerId = listenerIdCounter++;
483
- nextListeners.set(listenerId, listener2);
484
- return function unsubscribe() {
485
- if (!isSubscribed) {
486
- return;
487
- }
488
- if (isDispatching) {
489
- 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.");
490
- }
491
- isSubscribed = false;
492
- ensureCanMutateNextListeners();
493
- nextListeners.delete(listenerId);
494
- currentListeners = null;
495
- };
496
- }
497
- function dispatch(action) {
498
- if (!isPlainObject(action)) {
499
- 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.`);
500
- }
501
- if (typeof action.type === "undefined") {
502
- 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.');
503
- }
504
- if (typeof action.type !== "string") {
505
- 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)`);
506
- }
507
- if (isDispatching) {
508
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(9) : "Reducers may not dispatch actions.");
509
- }
510
- try {
511
- isDispatching = true;
512
- currentState = currentReducer(currentState, action);
513
- } finally {
514
- isDispatching = false;
515
- }
516
- const listeners = currentListeners = nextListeners;
517
- listeners.forEach((listener2) => {
518
- listener2();
519
- });
520
- return action;
521
- }
522
- function replaceReducer(nextReducer) {
523
- if (typeof nextReducer !== "function") {
524
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(10) : `Expected the nextReducer to be a function. Instead, received: '${kindOf(nextReducer)}`);
525
- }
526
- currentReducer = nextReducer;
527
- dispatch({
528
- type: actionTypes_default.REPLACE
529
- });
530
- }
531
- function observable() {
532
- const outerSubscribe = subscribe;
533
- return {
534
- /**
535
- * The minimal observable subscription method.
536
- * @param observer Any object that can be used as an observer.
537
- * The observer object should have a `next` method.
538
- * @returns An object with an `unsubscribe` method that can
539
- * be used to unsubscribe the observable from the store, and prevent further
540
- * emission of values from the observable.
541
- */
542
- subscribe(observer) {
543
- if (typeof observer !== "object" || observer === null) {
544
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(11) : `Expected the observer to be an object. Instead, received: '${kindOf(observer)}'`);
545
- }
546
- function observeState() {
547
- const observerAsObserver = observer;
548
- if (observerAsObserver.next) {
549
- observerAsObserver.next(getState());
550
- }
551
- }
552
- observeState();
553
- const unsubscribe = outerSubscribe(observeState);
554
- return {
555
- unsubscribe
556
- };
557
- },
558
- [symbol_observable_default]() {
559
- return this;
560
- }
561
- };
562
- }
563
- dispatch({
564
- type: actionTypes_default.INIT
565
- });
566
- const store = {
567
- dispatch,
568
- subscribe,
569
- getState,
570
- replaceReducer,
571
- [symbol_observable_default]: observable
572
- };
573
- return store;
574
- }
575
- function warning(message) {
576
- if (typeof console !== "undefined" && typeof console.error === "function") {
577
- console.error(message);
578
- }
579
- try {
580
- throw new Error(message);
581
- } catch (e) {
582
- }
583
- }
584
- function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
585
- const reducerKeys = Object.keys(reducers);
586
- const argumentName = action && action.type === actionTypes_default.INIT ? "preloadedState argument passed to createStore" : "previous state received by the reducer";
587
- if (reducerKeys.length === 0) {
588
- return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";
589
- }
590
- if (!isPlainObject(inputState)) {
591
- return `The ${argumentName} has unexpected type of "${kindOf(inputState)}". Expected argument to be an object with the following keys: "${reducerKeys.join('", "')}"`;
592
- }
593
- const unexpectedKeys = Object.keys(inputState).filter((key) => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]);
594
- unexpectedKeys.forEach((key) => {
595
- unexpectedKeyCache[key] = true;
596
- });
597
- if (action && action.type === actionTypes_default.REPLACE)
598
- return;
599
- if (unexpectedKeys.length > 0) {
600
- 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.`;
601
- }
602
- }
603
- function assertReducerShape(reducers) {
604
- Object.keys(reducers).forEach((key) => {
605
- const reducer = reducers[key];
606
- const initialState10 = reducer(void 0, {
607
- type: actionTypes_default.INIT
608
- });
609
- if (typeof initialState10 === "undefined") {
610
- 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.`);
611
- }
612
- if (typeof reducer(void 0, {
613
- type: actionTypes_default.PROBE_UNKNOWN_ACTION()
614
- }) === "undefined") {
615
- 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.`);
616
- }
617
- });
618
- }
619
- function combineReducers(reducers) {
620
- const reducerKeys = Object.keys(reducers);
621
- const finalReducers = {};
622
- for (let i = 0; i < reducerKeys.length; i++) {
623
- const key = reducerKeys[i];
624
- if (process.env.NODE_ENV !== "production") {
625
- if (typeof reducers[key] === "undefined") {
626
- warning(`No reducer provided for key "${key}"`);
627
- }
628
- }
629
- if (typeof reducers[key] === "function") {
630
- finalReducers[key] = reducers[key];
631
- }
632
- }
633
- const finalReducerKeys = Object.keys(finalReducers);
634
- let unexpectedKeyCache;
635
- if (process.env.NODE_ENV !== "production") {
636
- unexpectedKeyCache = {};
637
- }
638
- let shapeAssertionError;
639
- try {
640
- assertReducerShape(finalReducers);
641
- } catch (e) {
642
- shapeAssertionError = e;
643
- }
644
- return function combination(state = {}, action) {
645
- if (shapeAssertionError) {
646
- throw shapeAssertionError;
647
- }
648
- if (process.env.NODE_ENV !== "production") {
649
- const warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
650
- if (warningMessage) {
651
- warning(warningMessage);
652
- }
653
- }
654
- let hasChanged = false;
655
- const nextState = {};
656
- for (let i = 0; i < finalReducerKeys.length; i++) {
657
- const key = finalReducerKeys[i];
658
- const reducer = finalReducers[key];
659
- const previousStateForKey = state[key];
660
- const nextStateForKey = reducer(previousStateForKey, action);
661
- if (typeof nextStateForKey === "undefined") {
662
- const actionType = action && action.type;
663
- 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.`);
664
- }
665
- nextState[key] = nextStateForKey;
666
- hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
667
- }
668
- hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
669
- return hasChanged ? nextState : state;
670
- };
671
- }
672
- function compose(...funcs) {
673
- if (funcs.length === 0) {
674
- return (arg) => arg;
675
- }
676
- if (funcs.length === 1) {
677
- return funcs[0];
678
- }
679
- return funcs.reduce((a, b) => (...args) => a(b(...args)));
680
- }
681
- function applyMiddleware(...middlewares) {
682
- return (createStore2) => (reducer, preloadedState) => {
683
- const store = createStore2(reducer, preloadedState);
684
- let dispatch = () => {
685
- 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.");
686
- };
687
- const middlewareAPI = {
688
- getState: store.getState,
689
- dispatch: (action, ...args) => dispatch(action, ...args)
690
- };
691
- const chain = middlewares.map((middleware) => middleware(middlewareAPI));
692
- dispatch = compose(...chain)(store.dispatch);
693
- return {
694
- ...store,
695
- dispatch
696
- };
697
- };
698
- }
699
- function isAction(action) {
700
- return isPlainObject(action) && "type" in action && typeof action.type === "string";
701
- }
702
-
703
- // ../interface-logic/node_modules/immer/dist/immer.mjs
704
- var NOTHING = Symbol.for("immer-nothing");
705
- var DRAFTABLE = Symbol.for("immer-draftable");
706
- var DRAFT_STATE = Symbol.for("immer-state");
707
- var errors = process.env.NODE_ENV !== "production" ? [
708
- // All error codes, starting by 0:
709
- function(plugin) {
710
- return `The plugin for '${plugin}' has not been loaded into Immer. To enable the plugin, import and call \`enable${plugin}()\` when initializing your application.`;
711
- },
712
- function(thing) {
713
- return `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${thing}'`;
714
- },
715
- "This object has been frozen and should not be mutated",
716
- function(data) {
717
- return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + data;
718
- },
719
- "An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",
720
- "Immer forbids circular references",
721
- "The first or second argument to `produce` must be a function",
722
- "The third argument to `produce` must be a function or undefined",
723
- "First argument to `createDraft` must be a plain object, an array, or an immerable object",
724
- "First argument to `finishDraft` must be a draft returned by `createDraft`",
725
- function(thing) {
726
- return `'current' expects a draft, got: ${thing}`;
727
- },
728
- "Object.defineProperty() cannot be used on an Immer draft",
729
- "Object.setPrototypeOf() cannot be used on an Immer draft",
730
- "Immer only supports deleting array indices",
731
- "Immer only supports setting array indices and the 'length' property",
732
- function(thing) {
733
- return `'original' expects a draft, got: ${thing}`;
734
- }
735
- // Note: if more errors are added, the errorOffset in Patches.ts should be increased
736
- // See Patches.ts for additional errors
737
- ] : [];
738
- function die(error, ...args) {
739
- if (process.env.NODE_ENV !== "production") {
740
- const e = errors[error];
741
- const msg = typeof e === "function" ? e.apply(null, args) : e;
742
- throw new Error(`[Immer] ${msg}`);
743
- }
744
- throw new Error(
745
- `[Immer] minified error nr: ${error}. Full error at: https://bit.ly/3cXEKWf`
746
- );
747
- }
748
- var getPrototypeOf = Object.getPrototypeOf;
749
- function isDraft(value) {
750
- return !!value && !!value[DRAFT_STATE];
751
- }
752
- function isDraftable(value) {
753
- if (!value)
754
- return false;
755
- return isPlainObject2(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!value.constructor?.[DRAFTABLE] || isMap(value) || isSet(value);
756
- }
757
- var objectCtorString = Object.prototype.constructor.toString();
758
- function isPlainObject2(value) {
759
- if (!value || typeof value !== "object")
760
- return false;
761
- const proto = getPrototypeOf(value);
762
- if (proto === null) {
763
- return true;
764
- }
765
- const Ctor = Object.hasOwnProperty.call(proto, "constructor") && proto.constructor;
766
- if (Ctor === Object)
767
- return true;
768
- return typeof Ctor == "function" && Function.toString.call(Ctor) === objectCtorString;
769
- }
770
- function each(obj, iter) {
771
- if (getArchtype(obj) === 0) {
772
- Reflect.ownKeys(obj).forEach((key) => {
773
- iter(key, obj[key], obj);
774
- });
775
- } else {
776
- obj.forEach((entry, index) => iter(index, entry, obj));
777
- }
778
- }
779
- function getArchtype(thing) {
780
- const state = thing[DRAFT_STATE];
781
- return state ? state.type_ : Array.isArray(thing) ? 1 : isMap(thing) ? 2 : isSet(thing) ? 3 : 0;
782
- }
783
- function has(thing, prop) {
784
- return getArchtype(thing) === 2 ? thing.has(prop) : Object.prototype.hasOwnProperty.call(thing, prop);
785
- }
786
- function set(thing, propOrOldValue, value) {
787
- const t = getArchtype(thing);
788
- if (t === 2)
789
- thing.set(propOrOldValue, value);
790
- else if (t === 3) {
791
- thing.add(value);
792
- } else
793
- thing[propOrOldValue] = value;
794
- }
795
- function is(x, y) {
796
- if (x === y) {
797
- return x !== 0 || 1 / x === 1 / y;
798
- } else {
799
- return x !== x && y !== y;
800
- }
801
- }
802
- function isMap(target) {
803
- return target instanceof Map;
804
- }
805
- function isSet(target) {
806
- return target instanceof Set;
807
- }
808
- function latest(state) {
809
- return state.copy_ || state.base_;
810
- }
811
- function shallowCopy(base, strict) {
812
- if (isMap(base)) {
813
- return new Map(base);
814
- }
815
- if (isSet(base)) {
816
- return new Set(base);
817
- }
818
- if (Array.isArray(base))
819
- return Array.prototype.slice.call(base);
820
- const isPlain2 = isPlainObject2(base);
821
- if (strict === true || strict === "class_only" && !isPlain2) {
822
- const descriptors = Object.getOwnPropertyDescriptors(base);
823
- delete descriptors[DRAFT_STATE];
824
- let keys = Reflect.ownKeys(descriptors);
825
- for (let i = 0; i < keys.length; i++) {
826
- const key = keys[i];
827
- const desc = descriptors[key];
828
- if (desc.writable === false) {
829
- desc.writable = true;
830
- desc.configurable = true;
831
- }
832
- if (desc.get || desc.set)
833
- descriptors[key] = {
834
- configurable: true,
835
- writable: true,
836
- // could live with !!desc.set as well here...
837
- enumerable: desc.enumerable,
838
- value: base[key]
839
- };
840
- }
841
- return Object.create(getPrototypeOf(base), descriptors);
842
- } else {
843
- const proto = getPrototypeOf(base);
844
- if (proto !== null && isPlain2) {
845
- return { ...base };
846
- }
847
- const obj = Object.create(proto);
848
- return Object.assign(obj, base);
849
- }
850
- }
851
- function freeze(obj, deep = false) {
852
- if (isFrozen(obj) || isDraft(obj) || !isDraftable(obj))
853
- return obj;
854
- if (getArchtype(obj) > 1) {
855
- obj.set = obj.add = obj.clear = obj.delete = dontMutateFrozenCollections;
856
- }
857
- Object.freeze(obj);
858
- if (deep)
859
- Object.entries(obj).forEach(([key, value]) => freeze(value, true));
860
- return obj;
861
- }
862
- function dontMutateFrozenCollections() {
863
- die(2);
864
- }
865
- function isFrozen(obj) {
866
- return Object.isFrozen(obj);
867
- }
868
- var plugins = {};
869
- function getPlugin(pluginKey) {
870
- const plugin = plugins[pluginKey];
871
- if (!plugin) {
872
- die(0, pluginKey);
873
- }
874
- return plugin;
875
- }
876
- var currentScope;
877
- function getCurrentScope() {
878
- return currentScope;
879
- }
880
- function createScope(parent_, immer_) {
881
- return {
882
- drafts_: [],
883
- parent_,
884
- immer_,
885
- // Whenever the modified draft contains a draft from another scope, we
886
- // need to prevent auto-freezing so the unowned draft can be finalized.
887
- canAutoFreeze_: true,
888
- unfinalizedDrafts_: 0
889
- };
890
- }
891
- function usePatchesInScope(scope, patchListener) {
892
- if (patchListener) {
893
- getPlugin("Patches");
894
- scope.patches_ = [];
895
- scope.inversePatches_ = [];
896
- scope.patchListener_ = patchListener;
897
- }
898
- }
899
- function revokeScope(scope) {
900
- leaveScope(scope);
901
- scope.drafts_.forEach(revokeDraft);
902
- scope.drafts_ = null;
903
- }
904
- function leaveScope(scope) {
905
- if (scope === currentScope) {
906
- currentScope = scope.parent_;
907
- }
908
- }
909
- function enterScope(immer2) {
910
- return currentScope = createScope(currentScope, immer2);
911
- }
912
- function revokeDraft(draft) {
913
- const state = draft[DRAFT_STATE];
914
- if (state.type_ === 0 || state.type_ === 1)
915
- state.revoke_();
916
- else
917
- state.revoked_ = true;
918
- }
919
- function processResult(result, scope) {
920
- scope.unfinalizedDrafts_ = scope.drafts_.length;
921
- const baseDraft = scope.drafts_[0];
922
- const isReplaced = result !== void 0 && result !== baseDraft;
923
- if (isReplaced) {
924
- if (baseDraft[DRAFT_STATE].modified_) {
925
- revokeScope(scope);
926
- die(4);
927
- }
928
- if (isDraftable(result)) {
929
- result = finalize(scope, result);
930
- if (!scope.parent_)
931
- maybeFreeze(scope, result);
932
- }
933
- if (scope.patches_) {
934
- getPlugin("Patches").generateReplacementPatches_(
935
- baseDraft[DRAFT_STATE].base_,
936
- result,
937
- scope.patches_,
938
- scope.inversePatches_
939
- );
940
- }
941
- } else {
942
- result = finalize(scope, baseDraft, []);
943
- }
944
- revokeScope(scope);
945
- if (scope.patches_) {
946
- scope.patchListener_(scope.patches_, scope.inversePatches_);
947
- }
948
- return result !== NOTHING ? result : void 0;
949
- }
950
- function finalize(rootScope, value, path) {
951
- if (isFrozen(value))
952
- return value;
953
- const state = value[DRAFT_STATE];
954
- if (!state) {
955
- each(
956
- value,
957
- (key, childValue) => finalizeProperty(rootScope, state, value, key, childValue, path)
958
- );
959
- return value;
960
- }
961
- if (state.scope_ !== rootScope)
962
- return value;
963
- if (!state.modified_) {
964
- maybeFreeze(rootScope, state.base_, true);
965
- return state.base_;
966
- }
967
- if (!state.finalized_) {
968
- state.finalized_ = true;
969
- state.scope_.unfinalizedDrafts_--;
970
- const result = state.copy_;
971
- let resultEach = result;
972
- let isSet2 = false;
973
- if (state.type_ === 3) {
974
- resultEach = new Set(result);
975
- result.clear();
976
- isSet2 = true;
977
- }
978
- each(
979
- resultEach,
980
- (key, childValue) => finalizeProperty(rootScope, state, result, key, childValue, path, isSet2)
981
- );
982
- maybeFreeze(rootScope, result, false);
983
- if (path && rootScope.patches_) {
984
- getPlugin("Patches").generatePatches_(
985
- state,
986
- path,
987
- rootScope.patches_,
988
- rootScope.inversePatches_
989
- );
990
- }
991
- }
992
- return state.copy_;
993
- }
994
- function finalizeProperty(rootScope, parentState, targetObject, prop, childValue, rootPath, targetIsSet) {
995
- if (process.env.NODE_ENV !== "production" && childValue === targetObject)
996
- die(5);
997
- if (isDraft(childValue)) {
998
- const path = rootPath && parentState && parentState.type_ !== 3 && // Set objects are atomic since they have no keys.
999
- !has(parentState.assigned_, prop) ? rootPath.concat(prop) : void 0;
1000
- const res = finalize(rootScope, childValue, path);
1001
- set(targetObject, prop, res);
1002
- if (isDraft(res)) {
1003
- rootScope.canAutoFreeze_ = false;
1004
- } else
1005
- return;
1006
- } else if (targetIsSet) {
1007
- targetObject.add(childValue);
1008
- }
1009
- if (isDraftable(childValue) && !isFrozen(childValue)) {
1010
- if (!rootScope.immer_.autoFreeze_ && rootScope.unfinalizedDrafts_ < 1) {
1011
- return;
1012
- }
1013
- finalize(rootScope, childValue);
1014
- if ((!parentState || !parentState.scope_.parent_) && typeof prop !== "symbol" && Object.prototype.propertyIsEnumerable.call(targetObject, prop))
1015
- maybeFreeze(rootScope, childValue);
1016
- }
1017
- }
1018
- function maybeFreeze(scope, value, deep = false) {
1019
- if (!scope.parent_ && scope.immer_.autoFreeze_ && scope.canAutoFreeze_) {
1020
- freeze(value, deep);
1021
- }
1022
- }
1023
- function createProxyProxy(base, parent) {
1024
- const isArray = Array.isArray(base);
1025
- const state = {
1026
- type_: isArray ? 1 : 0,
1027
- // Track which produce call this is associated with.
1028
- scope_: parent ? parent.scope_ : getCurrentScope(),
1029
- // True for both shallow and deep changes.
1030
- modified_: false,
1031
- // Used during finalization.
1032
- finalized_: false,
1033
- // Track which properties have been assigned (true) or deleted (false).
1034
- assigned_: {},
1035
- // The parent draft state.
1036
- parent_: parent,
1037
- // The base state.
1038
- base_: base,
1039
- // The base proxy.
1040
- draft_: null,
1041
- // set below
1042
- // The base copy with any updated values.
1043
- copy_: null,
1044
- // Called by the `produce` function.
1045
- revoke_: null,
1046
- isManual_: false
1047
- };
1048
- let target = state;
1049
- let traps = objectTraps;
1050
- if (isArray) {
1051
- target = [state];
1052
- traps = arrayTraps;
1053
- }
1054
- const { revoke, proxy } = Proxy.revocable(target, traps);
1055
- state.draft_ = proxy;
1056
- state.revoke_ = revoke;
1057
- return proxy;
1058
- }
1059
- var objectTraps = {
1060
- get(state, prop) {
1061
- if (prop === DRAFT_STATE)
1062
- return state;
1063
- const source = latest(state);
1064
- if (!has(source, prop)) {
1065
- return readPropFromProto(state, source, prop);
1066
- }
1067
- const value = source[prop];
1068
- if (state.finalized_ || !isDraftable(value)) {
1069
- return value;
1070
- }
1071
- if (value === peek(state.base_, prop)) {
1072
- prepareCopy(state);
1073
- return state.copy_[prop] = createProxy(value, state);
1074
- }
1075
- return value;
1076
- },
1077
- has(state, prop) {
1078
- return prop in latest(state);
1079
- },
1080
- ownKeys(state) {
1081
- return Reflect.ownKeys(latest(state));
1082
- },
1083
- set(state, prop, value) {
1084
- const desc = getDescriptorFromProto(latest(state), prop);
1085
- if (desc?.set) {
1086
- desc.set.call(state.draft_, value);
1087
- return true;
1088
- }
1089
- if (!state.modified_) {
1090
- const current2 = peek(latest(state), prop);
1091
- const currentState = current2?.[DRAFT_STATE];
1092
- if (currentState && currentState.base_ === value) {
1093
- state.copy_[prop] = value;
1094
- state.assigned_[prop] = false;
1095
- return true;
1096
- }
1097
- if (is(value, current2) && (value !== void 0 || has(state.base_, prop)))
1098
- return true;
1099
- prepareCopy(state);
1100
- markChanged(state);
1101
- }
1102
- if (state.copy_[prop] === value && // special case: handle new props with value 'undefined'
1103
- (value !== void 0 || prop in state.copy_) || // special case: NaN
1104
- Number.isNaN(value) && Number.isNaN(state.copy_[prop]))
1105
- return true;
1106
- state.copy_[prop] = value;
1107
- state.assigned_[prop] = true;
1108
- return true;
1109
- },
1110
- deleteProperty(state, prop) {
1111
- if (peek(state.base_, prop) !== void 0 || prop in state.base_) {
1112
- state.assigned_[prop] = false;
1113
- prepareCopy(state);
1114
- markChanged(state);
1115
- } else {
1116
- delete state.assigned_[prop];
1117
- }
1118
- if (state.copy_) {
1119
- delete state.copy_[prop];
1120
- }
1121
- return true;
1122
- },
1123
- // Note: We never coerce `desc.value` into an Immer draft, because we can't make
1124
- // the same guarantee in ES5 mode.
1125
- getOwnPropertyDescriptor(state, prop) {
1126
- const owner = latest(state);
1127
- const desc = Reflect.getOwnPropertyDescriptor(owner, prop);
1128
- if (!desc)
1129
- return desc;
1130
- return {
1131
- writable: true,
1132
- configurable: state.type_ !== 1 || prop !== "length",
1133
- enumerable: desc.enumerable,
1134
- value: owner[prop]
1135
- };
1136
- },
1137
- defineProperty() {
1138
- die(11);
1139
- },
1140
- getPrototypeOf(state) {
1141
- return getPrototypeOf(state.base_);
1142
- },
1143
- setPrototypeOf() {
1144
- die(12);
1145
- }
1146
- };
1147
- var arrayTraps = {};
1148
- each(objectTraps, (key, fn) => {
1149
- arrayTraps[key] = function() {
1150
- arguments[0] = arguments[0][0];
1151
- return fn.apply(this, arguments);
1152
- };
1153
- });
1154
- arrayTraps.deleteProperty = function(state, prop) {
1155
- if (process.env.NODE_ENV !== "production" && isNaN(parseInt(prop)))
1156
- die(13);
1157
- return arrayTraps.set.call(this, state, prop, void 0);
1158
- };
1159
- arrayTraps.set = function(state, prop, value) {
1160
- if (process.env.NODE_ENV !== "production" && prop !== "length" && isNaN(parseInt(prop)))
1161
- die(14);
1162
- return objectTraps.set.call(this, state[0], prop, value, state[0]);
1163
- };
1164
- function peek(draft, prop) {
1165
- const state = draft[DRAFT_STATE];
1166
- const source = state ? latest(state) : draft;
1167
- return source[prop];
1168
- }
1169
- function readPropFromProto(state, source, prop) {
1170
- const desc = getDescriptorFromProto(source, prop);
1171
- return desc ? `value` in desc ? desc.value : (
1172
- // This is a very special case, if the prop is a getter defined by the
1173
- // prototype, we should invoke it with the draft as context!
1174
- desc.get?.call(state.draft_)
1175
- ) : void 0;
1176
- }
1177
- function getDescriptorFromProto(source, prop) {
1178
- if (!(prop in source))
1179
- return void 0;
1180
- let proto = getPrototypeOf(source);
1181
- while (proto) {
1182
- const desc = Object.getOwnPropertyDescriptor(proto, prop);
1183
- if (desc)
1184
- return desc;
1185
- proto = getPrototypeOf(proto);
1186
- }
1187
- return void 0;
1188
- }
1189
- function markChanged(state) {
1190
- if (!state.modified_) {
1191
- state.modified_ = true;
1192
- if (state.parent_) {
1193
- markChanged(state.parent_);
1194
- }
1195
- }
1196
- }
1197
- function prepareCopy(state) {
1198
- if (!state.copy_) {
1199
- state.copy_ = shallowCopy(
1200
- state.base_,
1201
- state.scope_.immer_.useStrictShallowCopy_
1202
- );
1203
- }
1204
- }
1205
- var Immer2 = class {
1206
- constructor(config) {
1207
- this.autoFreeze_ = true;
1208
- this.useStrictShallowCopy_ = false;
1209
- this.produce = (base, recipe, patchListener) => {
1210
- if (typeof base === "function" && typeof recipe !== "function") {
1211
- const defaultBase = recipe;
1212
- recipe = base;
1213
- const self = this;
1214
- return function curriedProduce(base2 = defaultBase, ...args) {
1215
- return self.produce(base2, (draft) => recipe.call(this, draft, ...args));
1216
- };
1217
- }
1218
- if (typeof recipe !== "function")
1219
- die(6);
1220
- if (patchListener !== void 0 && typeof patchListener !== "function")
1221
- die(7);
1222
- let result;
1223
- if (isDraftable(base)) {
1224
- const scope = enterScope(this);
1225
- const proxy = createProxy(base, void 0);
1226
- let hasError = true;
1227
- try {
1228
- result = recipe(proxy);
1229
- hasError = false;
1230
- } finally {
1231
- if (hasError)
1232
- revokeScope(scope);
1233
- else
1234
- leaveScope(scope);
1235
- }
1236
- usePatchesInScope(scope, patchListener);
1237
- return processResult(result, scope);
1238
- } else if (!base || typeof base !== "object") {
1239
- result = recipe(base);
1240
- if (result === void 0)
1241
- result = base;
1242
- if (result === NOTHING)
1243
- result = void 0;
1244
- if (this.autoFreeze_)
1245
- freeze(result, true);
1246
- if (patchListener) {
1247
- const p = [];
1248
- const ip = [];
1249
- getPlugin("Patches").generateReplacementPatches_(base, result, p, ip);
1250
- patchListener(p, ip);
1251
- }
1252
- return result;
1253
- } else
1254
- die(1, base);
1255
- };
1256
- this.produceWithPatches = (base, recipe) => {
1257
- if (typeof base === "function") {
1258
- return (state, ...args) => this.produceWithPatches(state, (draft) => base(draft, ...args));
1259
- }
1260
- let patches, inversePatches;
1261
- const result = this.produce(base, recipe, (p, ip) => {
1262
- patches = p;
1263
- inversePatches = ip;
1264
- });
1265
- return [result, patches, inversePatches];
1266
- };
1267
- if (typeof config?.autoFreeze === "boolean")
1268
- this.setAutoFreeze(config.autoFreeze);
1269
- if (typeof config?.useStrictShallowCopy === "boolean")
1270
- this.setUseStrictShallowCopy(config.useStrictShallowCopy);
1271
- }
1272
- createDraft(base) {
1273
- if (!isDraftable(base))
1274
- die(8);
1275
- if (isDraft(base))
1276
- base = current(base);
1277
- const scope = enterScope(this);
1278
- const proxy = createProxy(base, void 0);
1279
- proxy[DRAFT_STATE].isManual_ = true;
1280
- leaveScope(scope);
1281
- return proxy;
1282
- }
1283
- finishDraft(draft, patchListener) {
1284
- const state = draft && draft[DRAFT_STATE];
1285
- if (!state || !state.isManual_)
1286
- die(9);
1287
- const { scope_: scope } = state;
1288
- usePatchesInScope(scope, patchListener);
1289
- return processResult(void 0, scope);
1290
- }
1291
- /**
1292
- * Pass true to automatically freeze all copies created by Immer.
1293
- *
1294
- * By default, auto-freezing is enabled.
1295
- */
1296
- setAutoFreeze(value) {
1297
- this.autoFreeze_ = value;
1298
- }
1299
- /**
1300
- * Pass true to enable strict shallow copy.
1301
- *
1302
- * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
1303
- */
1304
- setUseStrictShallowCopy(value) {
1305
- this.useStrictShallowCopy_ = value;
1306
- }
1307
- applyPatches(base, patches) {
1308
- let i;
1309
- for (i = patches.length - 1; i >= 0; i--) {
1310
- const patch = patches[i];
1311
- if (patch.path.length === 0 && patch.op === "replace") {
1312
- base = patch.value;
1313
- break;
1314
- }
1315
- }
1316
- if (i > -1) {
1317
- patches = patches.slice(i + 1);
1318
- }
1319
- const applyPatchesImpl = getPlugin("Patches").applyPatches_;
1320
- if (isDraft(base)) {
1321
- return applyPatchesImpl(base, patches);
1322
- }
1323
- return this.produce(
1324
- base,
1325
- (draft) => applyPatchesImpl(draft, patches)
1326
- );
1327
- }
1328
- };
1329
- function createProxy(value, parent) {
1330
- const draft = isMap(value) ? getPlugin("MapSet").proxyMap_(value, parent) : isSet(value) ? getPlugin("MapSet").proxySet_(value, parent) : createProxyProxy(value, parent);
1331
- const scope = parent ? parent.scope_ : getCurrentScope();
1332
- scope.drafts_.push(draft);
1333
- return draft;
1334
- }
1335
- function current(value) {
1336
- if (!isDraft(value))
1337
- die(10, value);
1338
- return currentImpl(value);
1339
- }
1340
- function currentImpl(value) {
1341
- if (!isDraftable(value) || isFrozen(value))
1342
- return value;
1343
- const state = value[DRAFT_STATE];
1344
- let copy;
1345
- if (state) {
1346
- if (!state.modified_)
1347
- return state.base_;
1348
- state.finalized_ = true;
1349
- copy = shallowCopy(value, state.scope_.immer_.useStrictShallowCopy_);
1350
- } else {
1351
- copy = shallowCopy(value, true);
1352
- }
1353
- each(copy, (key, childValue) => {
1354
- set(copy, key, currentImpl(childValue));
1355
- });
1356
- if (state) {
1357
- state.finalized_ = false;
1358
- }
1359
- return copy;
1360
- }
1361
- var immer = new Immer2();
1362
- var produce = immer.produce;
1363
- var produceWithPatches = immer.produceWithPatches.bind(
1364
- immer
1365
- );
1366
- var setAutoFreeze = immer.setAutoFreeze.bind(immer);
1367
- var setUseStrictShallowCopy = immer.setUseStrictShallowCopy.bind(immer);
1368
- var applyPatches = immer.applyPatches.bind(immer);
1369
- var createDraft = immer.createDraft.bind(immer);
1370
- var finishDraft = immer.finishDraft.bind(immer);
1371
-
1372
- // ../interface-logic/node_modules/redux-thunk/dist/redux-thunk.mjs
1373
- function createThunkMiddleware(extraArgument) {
1374
- const middleware = ({ dispatch, getState }) => (next) => (action) => {
1375
- if (typeof action === "function") {
1376
- return action(dispatch, getState, extraArgument);
1377
- }
1378
- return next(action);
1379
- };
1380
- return middleware;
1381
- }
1382
- var thunk = createThunkMiddleware();
1383
- var withExtraArgument = createThunkMiddleware;
1384
-
1385
- // ../interface-logic/node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs
1386
- var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function() {
1387
- if (arguments.length === 0) return void 0;
1388
- if (typeof arguments[0] === "object") return compose;
1389
- return compose.apply(null, arguments);
1390
- };
1391
- var devToolsEnhancer = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function() {
1392
- return function(noop3) {
1393
- return noop3;
1394
- };
1395
- };
1396
- var hasMatchFunction = (v) => {
1397
- return v && typeof v.match === "function";
1398
- };
1399
- function createAction(type, prepareAction) {
1400
- function actionCreator(...args) {
1401
- if (prepareAction) {
1402
- let prepared = prepareAction(...args);
1403
- if (!prepared) {
1404
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(0) : "prepareAction did not return an object");
1405
- }
1406
- return {
1407
- type,
1408
- payload: prepared.payload,
1409
- ..."meta" in prepared && {
1410
- meta: prepared.meta
1411
- },
1412
- ..."error" in prepared && {
1413
- error: prepared.error
1414
- }
1415
- };
1416
- }
1417
- return {
1418
- type,
1419
- payload: args[0]
1420
- };
1421
- }
1422
- actionCreator.toString = () => `${type}`;
1423
- actionCreator.type = type;
1424
- actionCreator.match = (action) => isAction(action) && action.type === type;
1425
- return actionCreator;
1426
- }
1427
- function isActionCreator(action) {
1428
- return typeof action === "function" && "type" in action && // hasMatchFunction only wants Matchers but I don't see the point in rewriting it
1429
- hasMatchFunction(action);
1430
- }
1431
- function getMessage(type) {
1432
- const splitType = type ? `${type}`.split("/") : [];
1433
- const actionName = splitType[splitType.length - 1] || "actionCreator";
1434
- return `Detected an action creator with type "${type || "unknown"}" being dispatched.
1435
- Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${actionName}())\` instead of \`dispatch(${actionName})\`. This is necessary even if the action has no payload.`;
1436
- }
1437
- function createActionCreatorInvariantMiddleware(options = {}) {
1438
- if (process.env.NODE_ENV === "production") {
1439
- return () => (next) => (action) => next(action);
1440
- }
1441
- const {
1442
- isActionCreator: isActionCreator2 = isActionCreator
1443
- } = options;
1444
- return () => (next) => (action) => {
1445
- if (isActionCreator2(action)) {
1446
- console.warn(getMessage(action.type));
1447
- }
1448
- return next(action);
1449
- };
1450
- }
1451
- function getTimeMeasureUtils(maxDelay, fnName) {
1452
- let elapsed = 0;
1453
- return {
1454
- measureTime(fn) {
1455
- const started = Date.now();
1456
- try {
1457
- return fn();
1458
- } finally {
1459
- const finished = Date.now();
1460
- elapsed += finished - started;
1461
- }
1462
- },
1463
- warnIfExceeded() {
1464
- if (elapsed > maxDelay) {
1465
- console.warn(`${fnName} took ${elapsed}ms, which is more than the warning threshold of ${maxDelay}ms.
1466
- If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
1467
- It is disabled in production builds, so you don't need to worry about that.`);
1468
- }
1469
- }
1470
- };
1471
- }
1472
- var Tuple = class _Tuple extends Array {
1473
- constructor(...items) {
1474
- super(...items);
1475
- Object.setPrototypeOf(this, _Tuple.prototype);
1476
- }
1477
- static get [Symbol.species]() {
1478
- return _Tuple;
1479
- }
1480
- concat(...arr) {
1481
- return super.concat.apply(this, arr);
1482
- }
1483
- prepend(...arr) {
1484
- if (arr.length === 1 && Array.isArray(arr[0])) {
1485
- return new _Tuple(...arr[0].concat(this));
1486
- }
1487
- return new _Tuple(...arr.concat(this));
1488
- }
1489
- };
1490
- function freezeDraftable(val) {
1491
- return isDraftable(val) ? produce(val, () => {
1492
- }) : val;
1493
- }
1494
- function getOrInsertComputed(map, key, compute) {
1495
- if (map.has(key)) return map.get(key);
1496
- return map.set(key, compute(key)).get(key);
1497
- }
1498
- function isImmutableDefault(value) {
1499
- return typeof value !== "object" || value == null || Object.isFrozen(value);
1500
- }
1501
- function trackForMutations(isImmutable, ignorePaths, obj) {
1502
- const trackedProperties = trackProperties(isImmutable, ignorePaths, obj);
1503
- return {
1504
- detectMutations() {
1505
- return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);
1506
- }
1507
- };
1508
- }
1509
- function trackProperties(isImmutable, ignorePaths = [], obj, path = "", checkedObjects = /* @__PURE__ */ new Set()) {
1510
- const tracked = {
1511
- value: obj
1512
- };
1513
- if (!isImmutable(obj) && !checkedObjects.has(obj)) {
1514
- checkedObjects.add(obj);
1515
- tracked.children = {};
1516
- for (const key in obj) {
1517
- const childPath = path ? path + "." + key : key;
1518
- if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
1519
- continue;
1520
- }
1521
- tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);
1522
- }
1523
- }
1524
- return tracked;
1525
- }
1526
- function detectMutations(isImmutable, ignoredPaths = [], trackedProperty, obj, sameParentRef = false, path = "") {
1527
- const prevObj = trackedProperty ? trackedProperty.value : void 0;
1528
- const sameRef = prevObj === obj;
1529
- if (sameParentRef && !sameRef && !Number.isNaN(obj)) {
1530
- return {
1531
- wasMutated: true,
1532
- path
1533
- };
1534
- }
1535
- if (isImmutable(prevObj) || isImmutable(obj)) {
1536
- return {
1537
- wasMutated: false
1538
- };
1539
- }
1540
- const keysToDetect = {};
1541
- for (let key in trackedProperty.children) {
1542
- keysToDetect[key] = true;
1543
- }
1544
- for (let key in obj) {
1545
- keysToDetect[key] = true;
1546
- }
1547
- const hasIgnoredPaths = ignoredPaths.length > 0;
1548
- for (let key in keysToDetect) {
1549
- const nestedPath = path ? path + "." + key : key;
1550
- if (hasIgnoredPaths) {
1551
- const hasMatches = ignoredPaths.some((ignored) => {
1552
- if (ignored instanceof RegExp) {
1553
- return ignored.test(nestedPath);
1554
- }
1555
- return nestedPath === ignored;
1556
- });
1557
- if (hasMatches) {
1558
- continue;
1559
- }
1560
- }
1561
- const result = detectMutations(isImmutable, ignoredPaths, trackedProperty.children[key], obj[key], sameRef, nestedPath);
1562
- if (result.wasMutated) {
1563
- return result;
1564
- }
1565
- }
1566
- return {
1567
- wasMutated: false
1568
- };
1569
- }
1570
- function createImmutableStateInvariantMiddleware(options = {}) {
1571
- if (process.env.NODE_ENV === "production") {
1572
- return () => (next) => (action) => next(action);
1573
- } else {
1574
- let stringify2 = function(obj, serializer, indent, decycler) {
1575
- return JSON.stringify(obj, getSerialize2(serializer, decycler), indent);
1576
- }, getSerialize2 = function(serializer, decycler) {
1577
- let stack = [], keys = [];
1578
- if (!decycler) decycler = function(_, value) {
1579
- if (stack[0] === value) return "[Circular ~]";
1580
- return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]";
1581
- };
1582
- return function(key, value) {
1583
- if (stack.length > 0) {
1584
- var thisPos = stack.indexOf(this);
1585
- ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
1586
- ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
1587
- if (~stack.indexOf(value)) value = decycler.call(this, key, value);
1588
- } else stack.push(value);
1589
- return serializer == null ? value : serializer.call(this, key, value);
1590
- };
1591
- };
1592
- var stringify = stringify2, getSerialize = getSerialize2;
1593
- let {
1594
- isImmutable = isImmutableDefault,
1595
- ignoredPaths,
1596
- warnAfter = 32
1597
- } = options;
1598
- const track = trackForMutations.bind(null, isImmutable, ignoredPaths);
1599
- return ({
1600
- getState
1601
- }) => {
1602
- let state = getState();
1603
- let tracker = track(state);
1604
- let result;
1605
- return (next) => (action) => {
1606
- const measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware");
1607
- measureUtils.measureTime(() => {
1608
- state = getState();
1609
- result = tracker.detectMutations();
1610
- tracker = track(state);
1611
- if (result.wasMutated) {
1612
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(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)`);
1613
- }
1614
- });
1615
- const dispatchedAction = next(action);
1616
- measureUtils.measureTime(() => {
1617
- state = getState();
1618
- result = tracker.detectMutations();
1619
- tracker = track(state);
1620
- if (result.wasMutated) {
1621
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(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)`);
1622
- }
1623
- });
1624
- measureUtils.warnIfExceeded();
1625
- return dispatchedAction;
1626
- };
1627
- };
1628
- }
1629
- }
1630
- function isPlain(val) {
1631
- const type = typeof val;
1632
- return val == null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val);
1633
- }
1634
- function findNonSerializableValue(value, path = "", isSerializable = isPlain, getEntries, ignoredPaths = [], cache) {
1635
- let foundNestedSerializable;
1636
- if (!isSerializable(value)) {
1637
- return {
1638
- keyPath: path || "<root>",
1639
- value
1640
- };
1641
- }
1642
- if (typeof value !== "object" || value === null) {
1643
- return false;
1644
- }
1645
- if (cache?.has(value)) return false;
1646
- const entries = getEntries != null ? getEntries(value) : Object.entries(value);
1647
- const hasIgnoredPaths = ignoredPaths.length > 0;
1648
- for (const [key, nestedValue] of entries) {
1649
- const nestedPath = path ? path + "." + key : key;
1650
- if (hasIgnoredPaths) {
1651
- const hasMatches = ignoredPaths.some((ignored) => {
1652
- if (ignored instanceof RegExp) {
1653
- return ignored.test(nestedPath);
1654
- }
1655
- return nestedPath === ignored;
1656
- });
1657
- if (hasMatches) {
1658
- continue;
1659
- }
1660
- }
1661
- if (!isSerializable(nestedValue)) {
1662
- return {
1663
- keyPath: nestedPath,
1664
- value: nestedValue
1665
- };
1666
- }
1667
- if (typeof nestedValue === "object") {
1668
- foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths, cache);
1669
- if (foundNestedSerializable) {
1670
- return foundNestedSerializable;
1671
- }
1672
- }
1673
- }
1674
- if (cache && isNestedFrozen(value)) cache.add(value);
1675
- return false;
1676
- }
1677
- function isNestedFrozen(value) {
1678
- if (!Object.isFrozen(value)) return false;
1679
- for (const nestedValue of Object.values(value)) {
1680
- if (typeof nestedValue !== "object" || nestedValue === null) continue;
1681
- if (!isNestedFrozen(nestedValue)) return false;
1682
- }
1683
- return true;
1684
- }
1685
- function createSerializableStateInvariantMiddleware(options = {}) {
1686
- if (process.env.NODE_ENV === "production") {
1687
- return () => (next) => (action) => next(action);
1688
- } else {
1689
- const {
1690
- isSerializable = isPlain,
1691
- getEntries,
1692
- ignoredActions = [],
1693
- ignoredActionPaths = ["meta.arg", "meta.baseQueryMeta"],
1694
- ignoredPaths = [],
1695
- warnAfter = 32,
1696
- ignoreState = false,
1697
- ignoreActions = false,
1698
- disableCache = false
1699
- } = options;
1700
- const cache = !disableCache && WeakSet ? /* @__PURE__ */ new WeakSet() : void 0;
1701
- return (storeAPI) => (next) => (action) => {
1702
- if (!isAction(action)) {
1703
- return next(action);
1704
- }
1705
- const result = next(action);
1706
- const measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware");
1707
- if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) {
1708
- measureUtils.measureTime(() => {
1709
- const foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths, cache);
1710
- if (foundActionNonSerializableValue) {
1711
- const {
1712
- keyPath,
1713
- value
1714
- } = foundActionNonSerializableValue;
1715
- console.error(`A non-serializable value was detected in an action, in the path: \`${keyPath}\`. Value:`, value, "\nTake a look at the logic that dispatched this action: ", action, "\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)", "\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)");
1716
- }
1717
- });
1718
- }
1719
- if (!ignoreState) {
1720
- measureUtils.measureTime(() => {
1721
- const state = storeAPI.getState();
1722
- const foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths, cache);
1723
- if (foundStateNonSerializableValue) {
1724
- const {
1725
- keyPath,
1726
- value
1727
- } = foundStateNonSerializableValue;
1728
- console.error(`A non-serializable value was detected in the state, in the path: \`${keyPath}\`. Value:`, value, `
1729
- Take a look at the reducer(s) handling this action type: ${action.type}.
1730
- (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`);
1731
- }
1732
- });
1733
- measureUtils.warnIfExceeded();
1734
- }
1735
- return result;
1736
- };
1737
- }
1738
- }
1739
- function isBoolean(x) {
1740
- return typeof x === "boolean";
1741
- }
1742
- var buildGetDefaultMiddleware = () => function getDefaultMiddleware(options) {
1743
- const {
1744
- thunk: thunk2 = true,
1745
- immutableCheck = true,
1746
- serializableCheck = true,
1747
- actionCreatorCheck = true
1748
- } = options ?? {};
1749
- let middlewareArray = new Tuple();
1750
- if (thunk2) {
1751
- if (isBoolean(thunk2)) {
1752
- middlewareArray.push(thunk);
1753
- } else {
1754
- middlewareArray.push(withExtraArgument(thunk2.extraArgument));
1755
- }
1756
- }
1757
- if (process.env.NODE_ENV !== "production") {
1758
- if (immutableCheck) {
1759
- let immutableOptions = {};
1760
- if (!isBoolean(immutableCheck)) {
1761
- immutableOptions = immutableCheck;
1762
- }
1763
- middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));
1764
- }
1765
- if (serializableCheck) {
1766
- let serializableOptions = {};
1767
- if (!isBoolean(serializableCheck)) {
1768
- serializableOptions = serializableCheck;
1769
- }
1770
- middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));
1771
- }
1772
- if (actionCreatorCheck) {
1773
- let actionCreatorOptions = {};
1774
- if (!isBoolean(actionCreatorCheck)) {
1775
- actionCreatorOptions = actionCreatorCheck;
1776
- }
1777
- middlewareArray.unshift(createActionCreatorInvariantMiddleware(actionCreatorOptions));
1778
- }
1779
- }
1780
- return middlewareArray;
1781
- };
1782
- var SHOULD_AUTOBATCH = "RTK_autoBatch";
1783
- var createQueueWithTimer = (timeout) => {
1784
- return (notify) => {
1785
- setTimeout(notify, timeout);
1786
- };
1787
- };
1788
- var autoBatchEnhancer = (options = {
1789
- type: "raf"
1790
- }) => (next) => (...args) => {
1791
- const store = next(...args);
1792
- let notifying = true;
1793
- let shouldNotifyAtEndOfTick = false;
1794
- let notificationQueued = false;
1795
- const listeners = /* @__PURE__ */ new Set();
1796
- const queueCallback = options.type === "tick" ? queueMicrotask : options.type === "raf" ? (
1797
- // requestAnimationFrame won't exist in SSR environments. Fall back to a vague approximation just to keep from erroring.
1798
- typeof window !== "undefined" && window.requestAnimationFrame ? window.requestAnimationFrame : createQueueWithTimer(10)
1799
- ) : options.type === "callback" ? options.queueNotification : createQueueWithTimer(options.timeout);
1800
- const notifyListeners = () => {
1801
- notificationQueued = false;
1802
- if (shouldNotifyAtEndOfTick) {
1803
- shouldNotifyAtEndOfTick = false;
1804
- listeners.forEach((l) => l());
1805
- }
1806
- };
1807
- return Object.assign({}, store, {
1808
- // Override the base `store.subscribe` method to keep original listeners
1809
- // from running if we're delaying notifications
1810
- subscribe(listener2) {
1811
- const wrappedListener = () => notifying && listener2();
1812
- const unsubscribe = store.subscribe(wrappedListener);
1813
- listeners.add(listener2);
1814
- return () => {
1815
- unsubscribe();
1816
- listeners.delete(listener2);
1817
- };
1818
- },
1819
- // Override the base `store.dispatch` method so that we can check actions
1820
- // for the `shouldAutoBatch` flag and determine if batching is active
1821
- dispatch(action) {
1822
- try {
1823
- notifying = !action?.meta?.[SHOULD_AUTOBATCH];
1824
- shouldNotifyAtEndOfTick = !notifying;
1825
- if (shouldNotifyAtEndOfTick) {
1826
- if (!notificationQueued) {
1827
- notificationQueued = true;
1828
- queueCallback(notifyListeners);
1829
- }
1830
- }
1831
- return store.dispatch(action);
1832
- } finally {
1833
- notifying = true;
1834
- }
1835
- }
1836
- });
1837
- };
1838
- var buildGetDefaultEnhancers = (middlewareEnhancer) => function getDefaultEnhancers(options) {
1839
- const {
1840
- autoBatch = true
1841
- } = options ?? {};
1842
- let enhancerArray = new Tuple(middlewareEnhancer);
1843
- if (autoBatch) {
1844
- enhancerArray.push(autoBatchEnhancer(typeof autoBatch === "object" ? autoBatch : void 0));
1845
- }
1846
- return enhancerArray;
1847
- };
1848
- function configureStore(options) {
1849
- const getDefaultMiddleware = buildGetDefaultMiddleware();
1850
- const {
1851
- reducer = void 0,
1852
- middleware,
1853
- devTools = true,
1854
- duplicateMiddlewareCheck = true,
1855
- preloadedState = void 0,
1856
- enhancers = void 0
1857
- } = options || {};
1858
- let rootReducer2;
1859
- if (typeof reducer === "function") {
1860
- rootReducer2 = reducer;
1861
- } else if (isPlainObject(reducer)) {
1862
- rootReducer2 = combineReducers(reducer);
1863
- } else {
1864
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(1) : "`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");
1865
- }
1866
- if (process.env.NODE_ENV !== "production" && middleware && typeof middleware !== "function") {
1867
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(2) : "`middleware` field must be a callback");
1868
- }
1869
- let finalMiddleware;
1870
- if (typeof middleware === "function") {
1871
- finalMiddleware = middleware(getDefaultMiddleware);
1872
- if (process.env.NODE_ENV !== "production" && !Array.isArray(finalMiddleware)) {
1873
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(3) : "when using a middleware builder function, an array of middleware must be returned");
1874
- }
1875
- } else {
1876
- finalMiddleware = getDefaultMiddleware();
1877
- }
1878
- if (process.env.NODE_ENV !== "production" && finalMiddleware.some((item) => typeof item !== "function")) {
1879
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(4) : "each middleware provided to configureStore must be a function");
1880
- }
1881
- if (process.env.NODE_ENV !== "production" && duplicateMiddlewareCheck) {
1882
- let middlewareReferences = /* @__PURE__ */ new Set();
1883
- finalMiddleware.forEach((middleware2) => {
1884
- if (middlewareReferences.has(middleware2)) {
1885
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(42) : "Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");
1886
- }
1887
- middlewareReferences.add(middleware2);
1888
- });
1889
- }
1890
- let finalCompose = compose;
1891
- if (devTools) {
1892
- finalCompose = composeWithDevTools({
1893
- // Enable capture of stack traces for dispatched Redux actions
1894
- trace: process.env.NODE_ENV !== "production",
1895
- ...typeof devTools === "object" && devTools
1896
- });
1897
- }
1898
- const middlewareEnhancer = applyMiddleware(...finalMiddleware);
1899
- const getDefaultEnhancers = buildGetDefaultEnhancers(middlewareEnhancer);
1900
- if (process.env.NODE_ENV !== "production" && enhancers && typeof enhancers !== "function") {
1901
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(5) : "`enhancers` field must be a callback");
1902
- }
1903
- let storeEnhancers = typeof enhancers === "function" ? enhancers(getDefaultEnhancers) : getDefaultEnhancers();
1904
- if (process.env.NODE_ENV !== "production" && !Array.isArray(storeEnhancers)) {
1905
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(6) : "`enhancers` callback must return an array");
1906
- }
1907
- if (process.env.NODE_ENV !== "production" && storeEnhancers.some((item) => typeof item !== "function")) {
1908
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(7) : "each enhancer provided to configureStore must be a function");
1909
- }
1910
- if (process.env.NODE_ENV !== "production" && finalMiddleware.length && !storeEnhancers.includes(middlewareEnhancer)) {
1911
- console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");
1912
- }
1913
- const composedEnhancer = finalCompose(...storeEnhancers);
1914
- return createStore(rootReducer2, preloadedState, composedEnhancer);
1915
- }
1916
- function executeReducerBuilderCallback(builderCallback) {
1917
- const actionsMap = {};
1918
- const actionMatchers = [];
1919
- let defaultCaseReducer;
1920
- const builder = {
1921
- addCase(typeOrActionCreator, reducer) {
1922
- if (process.env.NODE_ENV !== "production") {
1923
- if (actionMatchers.length > 0) {
1924
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(26) : "`builder.addCase` should only be called before calling `builder.addMatcher`");
1925
- }
1926
- if (defaultCaseReducer) {
1927
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(27) : "`builder.addCase` should only be called before calling `builder.addDefaultCase`");
1928
- }
1929
- }
1930
- const type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
1931
- if (!type) {
1932
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(28) : "`builder.addCase` cannot be called with an empty action type");
1933
- }
1934
- if (type in actionsMap) {
1935
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(29) : `\`builder.addCase\` cannot be called with two reducers for the same action type '${type}'`);
1936
- }
1937
- actionsMap[type] = reducer;
1938
- return builder;
1939
- },
1940
- addMatcher(matcher, reducer) {
1941
- if (process.env.NODE_ENV !== "production") {
1942
- if (defaultCaseReducer) {
1943
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(30) : "`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
1944
- }
1945
- }
1946
- actionMatchers.push({
1947
- matcher,
1948
- reducer
1949
- });
1950
- return builder;
1951
- },
1952
- addDefaultCase(reducer) {
1953
- if (process.env.NODE_ENV !== "production") {
1954
- if (defaultCaseReducer) {
1955
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(31) : "`builder.addDefaultCase` can only be called once");
1956
- }
1957
- }
1958
- defaultCaseReducer = reducer;
1959
- return builder;
1960
- }
1961
- };
1962
- builderCallback(builder);
1963
- return [actionsMap, actionMatchers, defaultCaseReducer];
1964
- }
1965
- function isStateFunction(x) {
1966
- return typeof x === "function";
1967
- }
1968
- function createReducer(initialState10, mapOrBuilderCallback) {
1969
- if (process.env.NODE_ENV !== "production") {
1970
- if (typeof mapOrBuilderCallback === "object") {
1971
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(8) : "The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");
1972
- }
1973
- }
1974
- let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] = executeReducerBuilderCallback(mapOrBuilderCallback);
1975
- let getInitialState;
1976
- if (isStateFunction(initialState10)) {
1977
- getInitialState = () => freezeDraftable(initialState10());
1978
- } else {
1979
- const frozenInitialState = freezeDraftable(initialState10);
1980
- getInitialState = () => frozenInitialState;
1981
- }
1982
- function reducer(state = getInitialState(), action) {
1983
- let caseReducers = [actionsMap[action.type], ...finalActionMatchers.filter(({
1984
- matcher
1985
- }) => matcher(action)).map(({
1986
- reducer: reducer2
1987
- }) => reducer2)];
1988
- if (caseReducers.filter((cr) => !!cr).length === 0) {
1989
- caseReducers = [finalDefaultCaseReducer];
1990
- }
1991
- return caseReducers.reduce((previousState, caseReducer) => {
1992
- if (caseReducer) {
1993
- if (isDraft(previousState)) {
1994
- const draft = previousState;
1995
- const result = caseReducer(draft, action);
1996
- if (result === void 0) {
1997
- return previousState;
1998
- }
1999
- return result;
2000
- } else if (!isDraftable(previousState)) {
2001
- const result = caseReducer(previousState, action);
2002
- if (result === void 0) {
2003
- if (previousState === null) {
2004
- return previousState;
2005
- }
2006
- throw Error("A case reducer on a non-draftable value must not return undefined");
2007
- }
2008
- return result;
2009
- } else {
2010
- return produce(previousState, (draft) => {
2011
- return caseReducer(draft, action);
2012
- });
2013
- }
2014
- }
2015
- return previousState;
2016
- }, state);
2017
- }
2018
- reducer.getInitialState = getInitialState;
2019
- return reducer;
2020
- }
2021
- var matches = (matcher, action) => {
2022
- if (hasMatchFunction(matcher)) {
2023
- return matcher.match(action);
2024
- } else {
2025
- return matcher(action);
2026
- }
2027
- };
2028
- function isAnyOf(...matchers) {
2029
- return (action) => {
2030
- return matchers.some((matcher) => matches(matcher, action));
2031
- };
2032
- }
2033
- var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";
2034
- var nanoid = (size = 21) => {
2035
- let id = "";
2036
- let i = size;
2037
- while (i--) {
2038
- id += urlAlphabet[Math.random() * 64 | 0];
2039
- }
2040
- return id;
2041
- };
2042
- var commonProperties = ["name", "message", "stack", "code"];
2043
- var RejectWithValue = class {
2044
- constructor(payload, meta) {
2045
- this.payload = payload;
2046
- this.meta = meta;
2047
- }
2048
- /*
2049
- type-only property to distinguish between RejectWithValue and FulfillWithMeta
2050
- does not exist at runtime
2051
- */
2052
- _type;
2053
- };
2054
- var FulfillWithMeta = class {
2055
- constructor(payload, meta) {
2056
- this.payload = payload;
2057
- this.meta = meta;
2058
- }
2059
- /*
2060
- type-only property to distinguish between RejectWithValue and FulfillWithMeta
2061
- does not exist at runtime
2062
- */
2063
- _type;
2064
- };
2065
- var miniSerializeError = (value) => {
2066
- if (typeof value === "object" && value !== null) {
2067
- const simpleError = {};
2068
- for (const property of commonProperties) {
2069
- if (typeof value[property] === "string") {
2070
- simpleError[property] = value[property];
2071
- }
2072
- }
2073
- return simpleError;
2074
- }
2075
- return {
2076
- message: String(value)
2077
- };
2078
- };
2079
- var externalAbortMessage = "External signal was aborted";
2080
- var createAsyncThunk = /* @__PURE__ */ (() => {
2081
- function createAsyncThunk2(typePrefix, payloadCreator, options) {
2082
- const fulfilled = createAction(typePrefix + "/fulfilled", (payload, requestId, arg, meta) => ({
2083
- payload,
2084
- meta: {
2085
- ...meta || {},
2086
- arg,
2087
- requestId,
2088
- requestStatus: "fulfilled"
2089
- }
2090
- }));
2091
- const pending = createAction(typePrefix + "/pending", (requestId, arg, meta) => ({
2092
- payload: void 0,
2093
- meta: {
2094
- ...meta || {},
2095
- arg,
2096
- requestId,
2097
- requestStatus: "pending"
2098
- }
2099
- }));
2100
- const rejected = createAction(typePrefix + "/rejected", (error, requestId, arg, payload, meta) => ({
2101
- payload,
2102
- error: (options && options.serializeError || miniSerializeError)(error || "Rejected"),
2103
- meta: {
2104
- ...meta || {},
2105
- arg,
2106
- requestId,
2107
- rejectedWithValue: !!payload,
2108
- requestStatus: "rejected",
2109
- aborted: error?.name === "AbortError",
2110
- condition: error?.name === "ConditionError"
2111
- }
2112
- }));
2113
- function actionCreator(arg, {
2114
- signal
2115
- } = {}) {
2116
- return (dispatch, getState, extra) => {
2117
- const requestId = options?.idGenerator ? options.idGenerator(arg) : nanoid();
2118
- const abortController = new AbortController();
2119
- let abortHandler;
2120
- let abortReason;
2121
- function abort(reason) {
2122
- abortReason = reason;
2123
- abortController.abort();
2124
- }
2125
- if (signal) {
2126
- if (signal.aborted) {
2127
- abort(externalAbortMessage);
2128
- } else {
2129
- signal.addEventListener("abort", () => abort(externalAbortMessage), {
2130
- once: true
2131
- });
2132
- }
2133
- }
2134
- const promise = async function() {
2135
- let finalAction;
2136
- try {
2137
- let conditionResult = options?.condition?.(arg, {
2138
- getState,
2139
- extra
2140
- });
2141
- if (isThenable(conditionResult)) {
2142
- conditionResult = await conditionResult;
2143
- }
2144
- if (conditionResult === false || abortController.signal.aborted) {
2145
- throw {
2146
- name: "ConditionError",
2147
- message: "Aborted due to condition callback returning false."
2148
- };
2149
- }
2150
- const abortedPromise = new Promise((_, reject) => {
2151
- abortHandler = () => {
2152
- reject({
2153
- name: "AbortError",
2154
- message: abortReason || "Aborted"
2155
- });
2156
- };
2157
- abortController.signal.addEventListener("abort", abortHandler);
2158
- });
2159
- dispatch(pending(requestId, arg, options?.getPendingMeta?.({
2160
- requestId,
2161
- arg
2162
- }, {
2163
- getState,
2164
- extra
2165
- })));
2166
- finalAction = await Promise.race([abortedPromise, Promise.resolve(payloadCreator(arg, {
2167
- dispatch,
2168
- getState,
2169
- extra,
2170
- requestId,
2171
- signal: abortController.signal,
2172
- abort,
2173
- rejectWithValue: (value, meta) => {
2174
- return new RejectWithValue(value, meta);
2175
- },
2176
- fulfillWithValue: (value, meta) => {
2177
- return new FulfillWithMeta(value, meta);
2178
- }
2179
- })).then((result) => {
2180
- if (result instanceof RejectWithValue) {
2181
- throw result;
2182
- }
2183
- if (result instanceof FulfillWithMeta) {
2184
- return fulfilled(result.payload, requestId, arg, result.meta);
2185
- }
2186
- return fulfilled(result, requestId, arg);
2187
- })]);
2188
- } catch (err) {
2189
- finalAction = err instanceof RejectWithValue ? rejected(null, requestId, arg, err.payload, err.meta) : rejected(err, requestId, arg);
2190
- } finally {
2191
- if (abortHandler) {
2192
- abortController.signal.removeEventListener("abort", abortHandler);
2193
- }
2194
- }
2195
- const skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;
2196
- if (!skipDispatch) {
2197
- dispatch(finalAction);
2198
- }
2199
- return finalAction;
2200
- }();
2201
- return Object.assign(promise, {
2202
- abort,
2203
- requestId,
2204
- arg,
2205
- unwrap() {
2206
- return promise.then(unwrapResult);
2207
- }
2208
- });
2209
- };
2210
- }
2211
- return Object.assign(actionCreator, {
2212
- pending,
2213
- rejected,
2214
- fulfilled,
2215
- settled: isAnyOf(rejected, fulfilled),
2216
- typePrefix
2217
- });
2218
- }
2219
- createAsyncThunk2.withTypes = () => createAsyncThunk2;
2220
- return createAsyncThunk2;
2221
- })();
2222
- function unwrapResult(action) {
2223
- if (action.meta && action.meta.rejectedWithValue) {
2224
- throw action.payload;
2225
- }
2226
- if (action.error) {
2227
- throw action.error;
2228
- }
2229
- return action.payload;
2230
- }
2231
- function isThenable(value) {
2232
- return value !== null && typeof value === "object" && typeof value.then === "function";
2233
- }
2234
- var asyncThunkSymbol = /* @__PURE__ */ Symbol.for("rtk-slice-createasyncthunk");
2235
- var asyncThunkCreator = {
2236
- [asyncThunkSymbol]: createAsyncThunk
2237
- };
2238
- function getType(slice, actionKey) {
2239
- return `${slice}/${actionKey}`;
2240
- }
2241
- function buildCreateSlice({
2242
- creators
2243
- } = {}) {
2244
- const cAT = creators?.asyncThunk?.[asyncThunkSymbol];
2245
- return function createSlice2(options) {
2246
- const {
2247
- name,
2248
- reducerPath = name
2249
- } = options;
2250
- if (!name) {
2251
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(11) : "`name` is a required option for createSlice");
2252
- }
2253
- if (typeof process !== "undefined" && process.env.NODE_ENV === "development") {
2254
- if (options.initialState === void 0) {
2255
- console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");
2256
- }
2257
- }
2258
- const reducers = (typeof options.reducers === "function" ? options.reducers(buildReducerCreators()) : options.reducers) || {};
2259
- const reducerNames = Object.keys(reducers);
2260
- const context = {
2261
- sliceCaseReducersByName: {},
2262
- sliceCaseReducersByType: {},
2263
- actionCreators: {},
2264
- sliceMatchers: []
2265
- };
2266
- const contextMethods = {
2267
- addCase(typeOrActionCreator, reducer2) {
2268
- const type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
2269
- if (!type) {
2270
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(12) : "`context.addCase` cannot be called with an empty action type");
2271
- }
2272
- if (type in context.sliceCaseReducersByType) {
2273
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(13) : "`context.addCase` cannot be called with two reducers for the same action type: " + type);
2274
- }
2275
- context.sliceCaseReducersByType[type] = reducer2;
2276
- return contextMethods;
2277
- },
2278
- addMatcher(matcher, reducer2) {
2279
- context.sliceMatchers.push({
2280
- matcher,
2281
- reducer: reducer2
2282
- });
2283
- return contextMethods;
2284
- },
2285
- exposeAction(name2, actionCreator) {
2286
- context.actionCreators[name2] = actionCreator;
2287
- return contextMethods;
2288
- },
2289
- exposeCaseReducer(name2, reducer2) {
2290
- context.sliceCaseReducersByName[name2] = reducer2;
2291
- return contextMethods;
2292
- }
2293
- };
2294
- reducerNames.forEach((reducerName) => {
2295
- const reducerDefinition = reducers[reducerName];
2296
- const reducerDetails = {
2297
- reducerName,
2298
- type: getType(name, reducerName),
2299
- createNotation: typeof options.reducers === "function"
2300
- };
2301
- if (isAsyncThunkSliceReducerDefinition(reducerDefinition)) {
2302
- handleThunkCaseReducerDefinition(reducerDetails, reducerDefinition, contextMethods, cAT);
2303
- } else {
2304
- handleNormalReducerDefinition(reducerDetails, reducerDefinition, contextMethods);
2305
- }
2306
- });
2307
- function buildReducer() {
2308
- if (process.env.NODE_ENV !== "production") {
2309
- if (typeof options.extraReducers === "object") {
2310
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(14) : "The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");
2311
- }
2312
- }
2313
- const [extraReducers = {}, actionMatchers = [], defaultCaseReducer = void 0] = typeof options.extraReducers === "function" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers];
2314
- const finalCaseReducers = {
2315
- ...extraReducers,
2316
- ...context.sliceCaseReducersByType
2317
- };
2318
- return createReducer(options.initialState, (builder) => {
2319
- for (let key in finalCaseReducers) {
2320
- builder.addCase(key, finalCaseReducers[key]);
2321
- }
2322
- for (let sM of context.sliceMatchers) {
2323
- builder.addMatcher(sM.matcher, sM.reducer);
2324
- }
2325
- for (let m of actionMatchers) {
2326
- builder.addMatcher(m.matcher, m.reducer);
2327
- }
2328
- if (defaultCaseReducer) {
2329
- builder.addDefaultCase(defaultCaseReducer);
2330
- }
2331
- });
2332
- }
2333
- const selectSelf = (state) => state;
2334
- const injectedSelectorCache = /* @__PURE__ */ new Map();
2335
- const injectedStateCache = /* @__PURE__ */ new WeakMap();
2336
- let _reducer;
2337
- function reducer(state, action) {
2338
- if (!_reducer) _reducer = buildReducer();
2339
- return _reducer(state, action);
2340
- }
2341
- function getInitialState() {
2342
- if (!_reducer) _reducer = buildReducer();
2343
- return _reducer.getInitialState();
2344
- }
2345
- function makeSelectorProps(reducerPath2, injected = false) {
2346
- function selectSlice(state) {
2347
- let sliceState = state[reducerPath2];
2348
- if (typeof sliceState === "undefined") {
2349
- if (injected) {
2350
- sliceState = getOrInsertComputed(injectedStateCache, selectSlice, getInitialState);
2351
- } else if (process.env.NODE_ENV !== "production") {
2352
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(15) : "selectSlice returned undefined for an uninjected slice reducer");
2353
- }
2354
- }
2355
- return sliceState;
2356
- }
2357
- function getSelectors(selectState = selectSelf) {
2358
- const selectorCache = getOrInsertComputed(injectedSelectorCache, injected, () => /* @__PURE__ */ new WeakMap());
2359
- return getOrInsertComputed(selectorCache, selectState, () => {
2360
- const map = {};
2361
- for (const [name2, selector] of Object.entries(options.selectors ?? {})) {
2362
- map[name2] = wrapSelector(selector, selectState, () => getOrInsertComputed(injectedStateCache, selectState, getInitialState), injected);
2363
- }
2364
- return map;
2365
- });
2366
- }
2367
- return {
2368
- reducerPath: reducerPath2,
2369
- getSelectors,
2370
- get selectors() {
2371
- return getSelectors(selectSlice);
2372
- },
2373
- selectSlice
2374
- };
2375
- }
2376
- const slice = {
2377
- name,
2378
- reducer,
2379
- actions: context.actionCreators,
2380
- caseReducers: context.sliceCaseReducersByName,
2381
- getInitialState,
2382
- ...makeSelectorProps(reducerPath),
2383
- injectInto(injectable, {
2384
- reducerPath: pathOpt,
2385
- ...config
2386
- } = {}) {
2387
- const newReducerPath = pathOpt ?? reducerPath;
2388
- injectable.inject({
2389
- reducerPath: newReducerPath,
2390
- reducer
2391
- }, config);
2392
- return {
2393
- ...slice,
2394
- ...makeSelectorProps(newReducerPath, true)
2395
- };
2396
- }
2397
- };
2398
- return slice;
2399
- };
2400
- }
2401
- function wrapSelector(selector, selectState, getInitialState, injected) {
2402
- function wrapper(rootState, ...args) {
2403
- let sliceState = selectState(rootState);
2404
- if (typeof sliceState === "undefined") {
2405
- if (injected) {
2406
- sliceState = getInitialState();
2407
- } else if (process.env.NODE_ENV !== "production") {
2408
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(16) : "selectState returned undefined for an uninjected slice reducer");
2409
- }
2410
- }
2411
- return selector(sliceState, ...args);
2412
- }
2413
- wrapper.unwrapped = selector;
2414
- return wrapper;
2415
- }
2416
- var createSlice = /* @__PURE__ */ buildCreateSlice();
2417
- function buildReducerCreators() {
2418
- function asyncThunk(payloadCreator, config) {
2419
- return {
2420
- _reducerDefinitionType: "asyncThunk",
2421
- payloadCreator,
2422
- ...config
2423
- };
2424
- }
2425
- asyncThunk.withTypes = () => asyncThunk;
2426
- return {
2427
- reducer(caseReducer) {
2428
- return Object.assign({
2429
- // hack so the wrapping function has the same name as the original
2430
- // we need to create a wrapper so the `reducerDefinitionType` is not assigned to the original
2431
- [caseReducer.name](...args) {
2432
- return caseReducer(...args);
2433
- }
2434
- }[caseReducer.name], {
2435
- _reducerDefinitionType: "reducer"
2436
- /* reducer */
2437
- });
2438
- },
2439
- preparedReducer(prepare, reducer) {
2440
- return {
2441
- _reducerDefinitionType: "reducerWithPrepare",
2442
- prepare,
2443
- reducer
2444
- };
2445
- },
2446
- asyncThunk
2447
- };
2448
- }
2449
- function handleNormalReducerDefinition({
2450
- type,
2451
- reducerName,
2452
- createNotation
2453
- }, maybeReducerWithPrepare, context) {
2454
- let caseReducer;
2455
- let prepareCallback;
2456
- if ("reducer" in maybeReducerWithPrepare) {
2457
- if (createNotation && !isCaseReducerWithPrepareDefinition(maybeReducerWithPrepare)) {
2458
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(17) : "Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");
2459
- }
2460
- caseReducer = maybeReducerWithPrepare.reducer;
2461
- prepareCallback = maybeReducerWithPrepare.prepare;
2462
- } else {
2463
- caseReducer = maybeReducerWithPrepare;
2464
- }
2465
- context.addCase(type, caseReducer).exposeCaseReducer(reducerName, caseReducer).exposeAction(reducerName, prepareCallback ? createAction(type, prepareCallback) : createAction(type));
2466
- }
2467
- function isAsyncThunkSliceReducerDefinition(reducerDefinition) {
2468
- return reducerDefinition._reducerDefinitionType === "asyncThunk";
2469
- }
2470
- function isCaseReducerWithPrepareDefinition(reducerDefinition) {
2471
- return reducerDefinition._reducerDefinitionType === "reducerWithPrepare";
2472
- }
2473
- function handleThunkCaseReducerDefinition({
2474
- type,
2475
- reducerName
2476
- }, reducerDefinition, context, cAT) {
2477
- if (!cAT) {
2478
- throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage2(18) : "Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");
2479
- }
2480
- const {
2481
- payloadCreator,
2482
- fulfilled,
2483
- pending,
2484
- rejected,
2485
- settled,
2486
- options
2487
- } = reducerDefinition;
2488
- const thunk2 = cAT(type, payloadCreator, options);
2489
- context.exposeAction(reducerName, thunk2);
2490
- if (fulfilled) {
2491
- context.addCase(thunk2.fulfilled, fulfilled);
2492
- }
2493
- if (pending) {
2494
- context.addCase(thunk2.pending, pending);
2495
- }
2496
- if (rejected) {
2497
- context.addCase(thunk2.rejected, rejected);
2498
- }
2499
- if (settled) {
2500
- context.addMatcher(thunk2.settled, settled);
2501
- }
2502
- context.exposeCaseReducer(reducerName, {
2503
- fulfilled: fulfilled || noop,
2504
- pending: pending || noop,
2505
- rejected: rejected || noop,
2506
- settled: settled || noop
2507
- });
2508
- }
2509
- function noop() {
2510
- }
2511
- var listener = "listener";
2512
- var completed = "completed";
2513
- var cancelled = "cancelled";
2514
- var taskCancelled = `task-${cancelled}`;
2515
- var taskCompleted = `task-${completed}`;
2516
- var listenerCancelled = `${listener}-${cancelled}`;
2517
- var listenerCompleted = `${listener}-${completed}`;
2518
- var {
2519
- assign
2520
- } = Object;
2521
- var alm = "listenerMiddleware";
2522
- var addListener = /* @__PURE__ */ assign(/* @__PURE__ */ createAction(`${alm}/add`), {
2523
- withTypes: () => addListener
2524
- });
2525
- var clearAllListeners = /* @__PURE__ */ createAction(`${alm}/removeAll`);
2526
- var removeListener = /* @__PURE__ */ assign(/* @__PURE__ */ createAction(`${alm}/remove`), {
2527
- withTypes: () => removeListener
2528
- });
2529
- var ORIGINAL_STATE = Symbol.for("rtk-state-proxy-original");
2530
- function formatProdErrorMessage2(code) {
2531
- 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. `;
2532
- }
2533
-
2534
- // ../interface-logic/src/store/reducers/breadcrums-slice/index.ts
2535
- var initialState = {
2536
- breadCrumbs: []
2537
- };
2538
- var breadcrumbsSlice = createSlice({
2539
- name: "breadcrumbs",
2540
- initialState,
2541
- reducers: {
2542
- setBreadCrumbs: (state, action) => {
2543
- state.breadCrumbs = [...state.breadCrumbs, action.payload];
2544
- }
2545
- }
2546
- });
2547
- var { setBreadCrumbs } = breadcrumbsSlice.actions;
2548
- var selectBreadCrumbs = (state) => state.breadcrumbs;
2549
- var breadcrums_slice_default = breadcrumbsSlice.reducer;
2550
-
2551
- // ../interface-logic/src/store/reducers/env-slice/index.ts
2552
- var initialState2 = {
2553
- baseUrl: "",
2554
- companies: [],
2555
- user: {},
2556
- db: "",
2557
- refreshTokenEndpoint: "",
2558
- config: null,
2559
- envFile: null,
2560
- requests: null,
2561
- defaultCompany: {
2562
- id: null,
2563
- logo: "",
2564
- secondary_color: "",
2565
- primary_color: ""
2566
- },
2567
- context: {
2568
- uid: null,
2569
- allowed_company_ids: [],
2570
- lang: "vi_VN",
2571
- tz: "Asia/Saigon"
2572
- }
2573
- };
2574
- var envSlice = createSlice({
2575
- name: "env",
2576
- initialState: initialState2,
2577
- reducers: {
2578
- setEnv: (state, action) => {
2579
- Object.assign(state, action.payload);
2580
- },
2581
- setUid: (state, action) => {
2582
- state.context.uid = action.payload;
2583
- },
2584
- setAllowCompanies: (state, action) => {
2585
- state.context.allowed_company_ids = action.payload;
2586
- },
2587
- setCompanies: (state, action) => {
2588
- state.companies = action.payload;
2589
- },
2590
- setDefaultCompany: (state, action) => {
2591
- state.defaultCompany = action.payload;
2592
- },
2593
- setLang: (state, action) => {
2594
- state.context.lang = action.payload;
2595
- },
2596
- setUser: (state, action) => {
2597
- state.user = action.payload;
2598
- },
2599
- setConfig: (state, action) => {
2600
- state.config = action.payload;
2601
- },
2602
- setEnvFile: (state, action) => {
2603
- state.envFile = action.payload;
2604
- }
2605
- }
2606
- });
2607
- var {
2608
- setEnv,
2609
- setUid,
2610
- setLang,
2611
- setAllowCompanies,
2612
- setCompanies,
2613
- setDefaultCompany,
2614
- setUser,
2615
- setConfig,
2616
- setEnvFile
2617
- } = envSlice.actions;
2618
- var selectEnv = (state) => state.env;
2619
- var env_slice_default = envSlice.reducer;
2620
-
2621
- // ../interface-logic/src/store/reducers/excel-slice/index.ts
2622
- var initialState3 = {
2623
- dataParse: null,
2624
- idFile: null,
2625
- isFileLoaded: false,
2626
- loadingImport: false,
2627
- selectedFile: null,
2628
- errorData: null
2629
- };
2630
- var excelSlice = createSlice({
2631
- name: "excel",
2632
- initialState: initialState3,
2633
- reducers: {
2634
- setDataParse: (state, action) => {
2635
- state.dataParse = action.payload;
2636
- },
2637
- setIdFile: (state, action) => {
2638
- state.idFile = action.payload;
2639
- },
2640
- setIsFileLoaded: (state, action) => {
2641
- state.isFileLoaded = action.payload;
2642
- },
2643
- setLoadingImport: (state, action) => {
2644
- state.loadingImport = action.payload;
2645
- },
2646
- setSelectedFile: (state, action) => {
2647
- state.selectedFile = action.payload;
2648
- },
2649
- setErrorData: (state, action) => {
2650
- state.errorData = action.payload;
2651
- }
2652
- }
2653
- });
2654
- var {
2655
- setDataParse,
2656
- setIdFile,
2657
- setIsFileLoaded,
2658
- setLoadingImport,
2659
- setSelectedFile,
2660
- setErrorData
2661
- } = excelSlice.actions;
2662
- var selectExcel = (state) => state.excel;
2663
- var excel_slice_default = excelSlice.reducer;
2664
-
2665
- // ../interface-logic/src/store/reducers/form-slice/index.ts
2666
- var initialState4 = {
2667
- viewDataStore: {},
2668
- isShowingModalDetail: false,
2669
- isShowModalTranslate: false,
2670
- formSubmitComponent: {},
2671
- fieldTranslation: null,
2672
- listSubject: {},
2673
- dataUser: {}
2674
- };
2675
- var formSlice = createSlice({
2676
- name: "form",
2677
- initialState: initialState4,
2678
- reducers: {
2679
- setViewDataStore: (state, action) => {
2680
- state.viewDataStore = action.payload;
2681
- },
2682
- setIsShowingModalDetail: (state, action) => {
2683
- state.isShowingModalDetail = action.payload;
2684
- },
2685
- setIsShowModalTranslate: (state, action) => {
2686
- state.isShowModalTranslate = action.payload;
2687
- },
2688
- setFormSubmitComponent: (state, action) => {
2689
- state.formSubmitComponent[action.payload.key] = action.payload.component;
2690
- },
2691
- setFieldTranslate: (state, action) => {
2692
- state.fieldTranslation = action.payload;
2693
- },
2694
- setListSubject: (state, action) => {
2695
- state.listSubject = action.payload;
2696
- },
2697
- setDataUser: (state, action) => {
2698
- state.dataUser = action.payload;
2699
- }
2700
- }
2701
- });
2702
- var {
2703
- setViewDataStore,
2704
- setIsShowingModalDetail,
2705
- setIsShowModalTranslate,
2706
- setFormSubmitComponent,
2707
- setFieldTranslate,
2708
- setListSubject,
2709
- setDataUser
2710
- } = formSlice.actions;
2711
- var selectForm = (state) => state.form;
2712
- var form_slice_default = formSlice.reducer;
2713
-
2714
- // ../interface-logic/src/store/reducers/header-slice/index.ts
2715
- var headerSlice = createSlice({
2716
- name: "header",
2717
- initialState: {
2718
- value: { allowedCompanyIds: [] }
2719
- },
2720
- reducers: {
2721
- setHeader: (state, action) => {
2722
- state.value = { ...state.value, ...action.payload };
2723
- },
2724
- setAllowedCompanyIds: (state, action) => {
2725
- state.value.allowedCompanyIds = action.payload;
2726
- }
2727
- }
2728
- });
2729
- var { setAllowedCompanyIds, setHeader } = headerSlice.actions;
2730
- var selectHeader = (state) => state.header;
2731
- var header_slice_default = headerSlice.reducer;
2732
-
2733
- // ../interface-logic/src/store/reducers/list-slice/index.ts
2734
- var initialState5 = {
2735
- pageLimit: 10,
2736
- fields: {},
2737
- order: "",
2738
- selectedRowKeys: [],
2739
- selectedRadioKey: 0,
2740
- indexRowTableModal: -2,
2741
- isUpdateTableModal: false,
2742
- footerGroupTable: {},
2743
- transferDetail: null,
2744
- page: 0,
2745
- domainTable: []
2746
- };
2747
- var listSlice = createSlice({
2748
- name: "list",
2749
- initialState: initialState5,
2750
- reducers: {
2751
- setPageLimit: (state, action) => {
2752
- state.pageLimit = action.payload;
2753
- },
2754
- setFields: (state, action) => {
2755
- state.fields = action.payload;
2756
- },
2757
- setOrder: (state, action) => {
2758
- state.order = action.payload;
2759
- },
2760
- setSelectedRowKeys: (state, action) => {
2761
- state.selectedRowKeys = action.payload;
2762
- },
2763
- setSelectedRadioKey: (state, action) => {
2764
- state.selectedRadioKey = action.payload;
2765
- },
2766
- setIndexRowTableModal: (state, action) => {
2767
- state.indexRowTableModal = action.payload;
2768
- },
2769
- setTransferDetail: (state, action) => {
2770
- state.transferDetail = action.payload;
2771
- },
2772
- setIsUpdateTableModal: (state, action) => {
2773
- state.isUpdateTableModal = action.payload;
2774
- },
2775
- setPage: (state, action) => {
2776
- state.page = action.payload;
2777
- },
2778
- setDomainTable: (state, action) => {
2779
- state.domainTable = action.payload;
2780
- }
2781
- }
2782
- });
2783
- var {
2784
- setPageLimit,
2785
- setFields,
2786
- setOrder,
2787
- setSelectedRowKeys,
2788
- setIndexRowTableModal,
2789
- setIsUpdateTableModal,
2790
- setPage,
2791
- setSelectedRadioKey,
2792
- setTransferDetail,
2793
- setDomainTable
2794
- } = listSlice.actions;
2795
- var selectList = (state) => state.list;
2796
- var list_slice_default = listSlice.reducer;
2797
-
2798
- // ../interface-logic/src/store/reducers/login-slice/index.ts
2799
- var initialState6 = {
2800
- db: "",
2801
- redirectTo: "/",
2802
- forgotPasswordUrl: "/"
2803
- };
2804
- var loginSlice = createSlice({
2805
- name: "login",
2806
- initialState: initialState6,
2807
- reducers: {
2808
- setDb: (state, action) => {
2809
- state.db = action.payload;
2810
- },
2811
- setRedirectTo: (state, action) => {
2812
- state.redirectTo = action.payload;
2813
- },
2814
- setForgotPasswordUrl: (state, action) => {
2815
- state.forgotPasswordUrl = action.payload;
2816
- }
2817
- }
2818
- });
2819
- var { setDb, setRedirectTo, setForgotPasswordUrl } = loginSlice.actions;
2820
- var selectLogin = (state) => state.login;
2821
- var login_slice_default = loginSlice.reducer;
2822
-
2823
- // ../interface-logic/src/store/reducers/navbar-slice/index.ts
2824
- var initialState7 = {
2825
- menuFocus: {},
2826
- menuAction: {},
2827
- navbarWidth: 250,
2828
- menuList: []
2829
- };
2830
- var navbarSlice = createSlice({
2831
- name: "navbar",
2832
- initialState: initialState7,
2833
- reducers: {
2834
- setMenuFocus: (state, action) => {
2835
- state.menuFocus = action.payload;
2836
- },
2837
- setMenuFocusAction: (state, action) => {
2838
- state.menuAction = action.payload;
2839
- },
2840
- setNavbarWidth: (state, action) => {
2841
- state.navbarWidth = action.payload;
2842
- },
2843
- setMenuList: (state, action) => {
2844
- state.menuList = action.payload;
2845
- }
2846
- }
2847
- });
2848
- var { setMenuFocus, setMenuFocusAction, setNavbarWidth, setMenuList } = navbarSlice.actions;
2849
- var selectNavbar = (state) => state.navbar;
2850
- var navbar_slice_default = navbarSlice.reducer;
2851
-
2852
- // ../interface-logic/src/store/reducers/profile-slice/index.ts
2853
- var initialState8 = {
2854
- profile: {}
2855
- };
2856
- var profileSlice = createSlice({
2857
- name: "profile",
2858
- initialState: initialState8,
2859
- reducers: {
2860
- setProfile: (state, action) => {
2861
- state.profile = action.payload;
2862
- }
2863
- }
2864
- });
2865
- var { setProfile } = profileSlice.actions;
2866
- var selectProfile = (state) => state.profile;
2867
- var profile_slice_default = profileSlice.reducer;
2868
-
2869
- // ../interface-logic/src/store/reducers/search-slice/index.ts
2870
- var initialState9 = {
2871
- groupByDomain: null,
2872
- searchBy: [],
2873
- searchString: "",
2874
- hoveredIndexSearchList: null,
2875
- selectedTags: [],
2876
- firstDomain: null,
2877
- searchMap: {},
2878
- filterBy: [],
2879
- groupBy: []
2880
- };
2881
- var searchSlice = createSlice({
2882
- name: "search",
2883
- initialState: initialState9,
2884
- reducers: {
2885
- setGroupByDomain: (state, action) => {
2886
- state.groupByDomain = action.payload;
2887
- },
2888
- setSearchBy: (state, action) => {
2889
- state.searchBy = action.payload;
2890
- },
2891
- setSearchString: (state, action) => {
2892
- state.searchString = action.payload;
2893
- },
2894
- setHoveredIndexSearchList: (state, action) => {
2895
- state.hoveredIndexSearchList = action.payload;
2896
- },
2897
- setSelectedTags: (state, action) => {
2898
- state.selectedTags = action.payload;
2899
- },
2900
- setFirstDomain: (state, action) => {
2901
- state.firstDomain = action.payload;
2902
- },
2903
- setFilterBy: (state, action) => {
2904
- state.filterBy = action.payload;
2905
- },
2906
- setGroupBy: (state, action) => {
2907
- state.groupBy = action.payload;
2908
- },
2909
- setSearchMap: (state, action) => {
2910
- state.searchMap = action.payload;
2911
- },
2912
- updateSearchMap: (state, action) => {
2913
- if (!state.searchMap[action.payload.key]) {
2914
- state.searchMap[action.payload.key] = [];
2915
- }
2916
- state.searchMap[action.payload.key].push(action.payload.value);
2917
- },
2918
- removeKeyFromSearchMap: (state, action) => {
2919
- const { key, item } = action.payload;
2920
- const values = state.searchMap[key];
2921
- if (!values) return;
2922
- if (item) {
2923
- const filtered = values.filter((value) => value.name !== item.name);
2924
- if (filtered.length > 0) {
2925
- state.searchMap[key] = filtered;
2926
- } else {
2927
- delete state.searchMap[key];
2928
- }
2929
- } else {
2930
- delete state.searchMap[key];
2931
- }
2932
- },
2933
- clearSearchMap: (state) => {
2934
- state.searchMap = {};
2935
- }
2936
- }
2937
- });
2938
- var {
2939
- setGroupByDomain,
2940
- setSelectedTags,
2941
- setSearchString,
2942
- setHoveredIndexSearchList,
2943
- setFirstDomain,
2944
- setSearchBy,
2945
- setFilterBy,
2946
- setSearchMap,
2947
- updateSearchMap,
2948
- removeKeyFromSearchMap,
2949
- setGroupBy,
2950
- clearSearchMap
2951
- } = searchSlice.actions;
2952
- var selectSearch = (state) => state.search;
2953
- var selectSearchMap = (state) => state.search.searchMap;
2954
- var search_slice_default = searchSlice.reducer;
2955
-
2956
- // ../interface-logic/src/store/store.ts
2957
- var rootReducer = combineReducers({
2958
- env: env_slice_default,
2959
- header: header_slice_default,
2960
- navbar: navbar_slice_default,
2961
- list: list_slice_default,
2962
- search: search_slice_default,
2963
- form: form_slice_default,
2964
- breadcrumbs: breadcrums_slice_default,
2965
- login: login_slice_default,
2966
- excel: excel_slice_default,
2967
- profile: profile_slice_default
2968
- });
2969
- var envStore = configureStore({
2970
- reducer: rootReducer,
2971
- middleware: (getDefaultMiddleware) => getDefaultMiddleware({
2972
- serializableCheck: false
2973
- })
2974
- });
2975
-
2976
- // ../interface-logic/src/store/index.ts
2977
- var useAppDispatch = useDispatch;
2978
- var useAppSelector = useSelector;
2979
- export {
2980
- breadcrumbsSlice,
2981
- clearSearchMap,
2982
- envSlice,
2983
- envStore,
2984
- excelSlice,
2985
- formSlice,
2986
- headerSlice,
2987
- listSlice,
2988
- loginSlice,
2989
- navbarSlice,
2990
- profileSlice,
2991
- removeKeyFromSearchMap,
2992
- searchSlice,
2993
- selectBreadCrumbs,
2994
- selectEnv,
2995
- selectExcel,
2996
- selectForm,
2997
- selectHeader,
2998
- selectList,
2999
- selectLogin,
3000
- selectNavbar,
3001
- selectProfile,
3002
- selectSearch,
3003
- selectSearchMap,
3004
- setAllowCompanies,
3005
- setAllowedCompanyIds,
3006
- setBreadCrumbs,
3007
- setCompanies,
3008
- setConfig,
3009
- setDataParse,
3010
- setDataUser,
3011
- setDb,
3012
- setDefaultCompany,
3013
- setDomainTable,
3014
- setEnv,
3015
- setEnvFile,
3016
- setErrorData,
3017
- setFieldTranslate,
3018
- setFields,
3019
- setFilterBy,
3020
- setFirstDomain,
3021
- setForgotPasswordUrl,
3022
- setFormSubmitComponent,
3023
- setGroupBy,
3024
- setGroupByDomain,
3025
- setHeader,
3026
- setHoveredIndexSearchList,
3027
- setIdFile,
3028
- setIndexRowTableModal,
3029
- setIsFileLoaded,
3030
- setIsShowModalTranslate,
3031
- setIsShowingModalDetail,
3032
- setIsUpdateTableModal,
3033
- setLang,
3034
- setListSubject,
3035
- setLoadingImport,
3036
- setMenuFocus,
3037
- setMenuFocusAction,
3038
- setMenuList,
3039
- setNavbarWidth,
3040
- setOrder,
3041
- setPage,
3042
- setPageLimit,
3043
- setProfile,
3044
- setRedirectTo,
3045
- setSearchBy,
3046
- setSearchMap,
3047
- setSearchString,
3048
- setSelectedFile,
3049
- setSelectedRadioKey,
3050
- setSelectedRowKeys,
3051
- setSelectedTags,
3052
- setTransferDetail,
3053
- setUid,
3054
- setUser,
3055
- setViewDataStore,
3056
- updateSearchMap,
3057
- useAppDispatch,
3058
- useAppSelector
3059
- };
3060
- /*! Bundled license information:
3061
-
3062
- use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js:
3063
- (**
3064
- * @license React
3065
- * use-sync-external-store-with-selector.production.js
3066
- *
3067
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3068
- *
3069
- * This source code is licensed under the MIT license found in the
3070
- * LICENSE file in the root directory of this source tree.
3071
- *)
3072
-
3073
- use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js:
3074
- (**
3075
- * @license React
3076
- * use-sync-external-store-with-selector.development.js
3077
- *
3078
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3079
- *
3080
- * This source code is licensed under the MIT license found in the
3081
- * LICENSE file in the root directory of this source tree.
3082
- *)
3083
- */
1
+ // src/store.ts
2
+ export * from "@fctc/interface-logic/store";