@yusr_systems/core 2.2.2 → 2.2.4
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/yusr-core.js +62 -1217
- package/package.json +4 -1
package/dist/yusr-core.js
CHANGED
|
@@ -1,783 +1,49 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
6
|
-
}), r = class {
|
|
1
|
+
import { createSlice as e } from "@reduxjs/toolkit";
|
|
2
|
+
import { toast as t } from "sonner";
|
|
3
|
+
//#region src/auth/authConstants.ts
|
|
4
|
+
var n = class {
|
|
7
5
|
static LoggedInUserStorageItemName = "LoggedInUser";
|
|
8
6
|
static AuthCheckStorageItemName = "IsLoggedIn";
|
|
9
7
|
static SettingStorageItemName = "Setting";
|
|
10
8
|
static UnauthorizedEventName = "ApiUnauthorized";
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
var i = () => Math.random().toString(36).substring(7).split("").join(".");
|
|
14
|
-
`${/* @__PURE__ */ i()}`, `${/* @__PURE__ */ i()}`;
|
|
15
|
-
function a(e) {
|
|
16
|
-
if (typeof e != "object" || !e) return !1;
|
|
17
|
-
let t = e;
|
|
18
|
-
for (; Object.getPrototypeOf(t) !== null;) t = Object.getPrototypeOf(t);
|
|
19
|
-
return Object.getPrototypeOf(e) === t || Object.getPrototypeOf(e) === null;
|
|
20
|
-
}
|
|
21
|
-
function o(e) {
|
|
22
|
-
return a(e) && "type" in e && typeof e.type == "string";
|
|
23
|
-
}
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region ../../node_modules/immer/dist/immer.mjs
|
|
26
|
-
var s = Symbol.for("immer-nothing"), c = Symbol.for("immer-draftable"), l = Symbol.for("immer-state"), u = process.env.NODE_ENV === "production" ? [] : [
|
|
27
|
-
function(e) {
|
|
28
|
-
return `The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`;
|
|
29
|
-
},
|
|
30
|
-
function(e) {
|
|
31
|
-
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 '${e}'`;
|
|
32
|
-
},
|
|
33
|
-
"This object has been frozen and should not be mutated",
|
|
34
|
-
function(e) {
|
|
35
|
-
return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + e;
|
|
36
|
-
},
|
|
37
|
-
"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",
|
|
38
|
-
"Immer forbids circular references",
|
|
39
|
-
"The first or second argument to `produce` must be a function",
|
|
40
|
-
"The third argument to `produce` must be a function or undefined",
|
|
41
|
-
"First argument to `createDraft` must be a plain object, an array, or an immerable object",
|
|
42
|
-
"First argument to `finishDraft` must be a draft returned by `createDraft`",
|
|
43
|
-
function(e) {
|
|
44
|
-
return `'current' expects a draft, got: ${e}`;
|
|
45
|
-
},
|
|
46
|
-
"Object.defineProperty() cannot be used on an Immer draft",
|
|
47
|
-
"Object.setPrototypeOf() cannot be used on an Immer draft",
|
|
48
|
-
"Immer only supports deleting array indices",
|
|
49
|
-
"Immer only supports setting array indices and the 'length' property",
|
|
50
|
-
function(e) {
|
|
51
|
-
return `'original' expects a draft, got: ${e}`;
|
|
52
|
-
}
|
|
53
|
-
];
|
|
54
|
-
function d(e, ...t) {
|
|
55
|
-
if (process.env.NODE_ENV !== "production") {
|
|
56
|
-
let n = u[e], r = k(n) ? n.apply(null, t) : n;
|
|
57
|
-
throw Error(`[Immer] ${r}`);
|
|
58
|
-
}
|
|
59
|
-
throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`);
|
|
60
|
-
}
|
|
61
|
-
var f = Object, p = f.getPrototypeOf, m = "constructor", h = "prototype", g = "configurable", _ = "enumerable", v = "writable", y = "value", b = (e) => !!e && !!e[l];
|
|
62
|
-
function x(e) {
|
|
63
|
-
return e ? ne(e) || E(e) || !!e[c] || !!e[m]?.[c] || D(e) || O(e) : !1;
|
|
64
|
-
}
|
|
65
|
-
var ee = f[h][m].toString(), te = /* @__PURE__ */ new WeakMap();
|
|
66
|
-
function ne(e) {
|
|
67
|
-
if (!e || !ae(e)) return !1;
|
|
68
|
-
let t = p(e);
|
|
69
|
-
if (t === null || t === f[h]) return !0;
|
|
70
|
-
let n = f.hasOwnProperty.call(t, m) && t[m];
|
|
71
|
-
if (n === Object) return !0;
|
|
72
|
-
if (!k(n)) return !1;
|
|
73
|
-
let r = te.get(n);
|
|
74
|
-
return r === void 0 && (r = Function.toString.call(n), te.set(n, r)), r === ee;
|
|
75
|
-
}
|
|
76
|
-
function S(e, t, n = !0) {
|
|
77
|
-
C(e) === 0 ? (n ? Reflect.ownKeys(e) : f.keys(e)).forEach((n) => {
|
|
78
|
-
t(n, e[n], e);
|
|
79
|
-
}) : e.forEach((n, r) => t(r, n, e));
|
|
80
|
-
}
|
|
81
|
-
function C(e) {
|
|
82
|
-
let t = e[l];
|
|
83
|
-
return t ? t.type_ : E(e) ? 1 : D(e) ? 2 : O(e) ? 3 : 0;
|
|
84
|
-
}
|
|
85
|
-
var re = (e, t, n = C(e)) => n === 2 ? e.has(t) : f[h].hasOwnProperty.call(e, t), w = (e, t, n = C(e)) => n === 2 ? e.get(t) : e[t], T = (e, t, n, r = C(e)) => {
|
|
86
|
-
r === 2 ? e.set(t, n) : r === 3 ? e.add(n) : e[t] = n;
|
|
87
|
-
};
|
|
88
|
-
function ie(e, t) {
|
|
89
|
-
return e === t ? e !== 0 || 1 / e == 1 / t : e !== e && t !== t;
|
|
90
|
-
}
|
|
91
|
-
var E = Array.isArray, D = (e) => e instanceof Map, O = (e) => e instanceof Set, ae = (e) => typeof e == "object", k = (e) => typeof e == "function", oe = (e) => typeof e == "boolean";
|
|
92
|
-
function se(e) {
|
|
93
|
-
let t = +e;
|
|
94
|
-
return Number.isInteger(t) && String(t) === e;
|
|
95
|
-
}
|
|
96
|
-
var A = (e) => e.copy_ || e.base_, j = (e) => e.modified_ ? e.copy_ : e.base_;
|
|
97
|
-
function M(e, t) {
|
|
98
|
-
if (D(e)) return new Map(e);
|
|
99
|
-
if (O(e)) return new Set(e);
|
|
100
|
-
if (E(e)) return Array[h].slice.call(e);
|
|
101
|
-
let n = ne(e);
|
|
102
|
-
if (t === !0 || t === "class_only" && !n) {
|
|
103
|
-
let t = f.getOwnPropertyDescriptors(e);
|
|
104
|
-
delete t[l];
|
|
105
|
-
let n = Reflect.ownKeys(t);
|
|
106
|
-
for (let r = 0; r < n.length; r++) {
|
|
107
|
-
let i = n[r], a = t[i];
|
|
108
|
-
a[v] === !1 && (a[v] = !0, a[g] = !0), (a.get || a.set) && (t[i] = {
|
|
109
|
-
[g]: !0,
|
|
110
|
-
[v]: !0,
|
|
111
|
-
[_]: a[_],
|
|
112
|
-
[y]: e[i]
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
return f.create(p(e), t);
|
|
116
|
-
} else {
|
|
117
|
-
let t = p(e);
|
|
118
|
-
if (t !== null && n) return { ...e };
|
|
119
|
-
let r = f.create(t);
|
|
120
|
-
return f.assign(r, e);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
function N(e, t = !1) {
|
|
124
|
-
return F(e) || b(e) || !x(e) ? e : (C(e) > 1 && f.defineProperties(e, {
|
|
125
|
-
set: P,
|
|
126
|
-
add: P,
|
|
127
|
-
clear: P,
|
|
128
|
-
delete: P
|
|
129
|
-
}), f.freeze(e), t && S(e, (e, t) => {
|
|
130
|
-
N(t, !0);
|
|
131
|
-
}, !1), e);
|
|
132
|
-
}
|
|
133
|
-
function ce() {
|
|
134
|
-
d(2);
|
|
135
|
-
}
|
|
136
|
-
var P = { [y]: ce };
|
|
137
|
-
function F(e) {
|
|
138
|
-
return e === null || !ae(e) ? !0 : f.isFrozen(e);
|
|
139
|
-
}
|
|
140
|
-
var I = "MapSet", L = "Patches", le = "ArrayMethods", ue = {};
|
|
141
|
-
function R(e) {
|
|
142
|
-
let t = ue[e];
|
|
143
|
-
return t || d(0, e), t;
|
|
144
|
-
}
|
|
145
|
-
var de = (e) => !!ue[e], z, fe = () => z, pe = (e, t) => ({
|
|
146
|
-
drafts_: [],
|
|
147
|
-
parent_: e,
|
|
148
|
-
immer_: t,
|
|
149
|
-
canAutoFreeze_: !0,
|
|
150
|
-
unfinalizedDrafts_: 0,
|
|
151
|
-
handledSet_: /* @__PURE__ */ new Set(),
|
|
152
|
-
processedForPatches_: /* @__PURE__ */ new Set(),
|
|
153
|
-
mapSetPlugin_: de(I) ? R(I) : void 0,
|
|
154
|
-
arrayMethodsPlugin_: de(le) ? R(le) : void 0
|
|
155
|
-
});
|
|
156
|
-
function me(e, t) {
|
|
157
|
-
t && (e.patchPlugin_ = R(L), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
|
|
158
|
-
}
|
|
159
|
-
function he(e) {
|
|
160
|
-
ge(e), e.drafts_.forEach(ve), e.drafts_ = null;
|
|
161
|
-
}
|
|
162
|
-
function ge(e) {
|
|
163
|
-
e === z && (z = e.parent_);
|
|
164
|
-
}
|
|
165
|
-
var _e = (e) => z = pe(z, e);
|
|
166
|
-
function ve(e) {
|
|
167
|
-
let t = e[l];
|
|
168
|
-
t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;
|
|
169
|
-
}
|
|
170
|
-
function ye(e, t) {
|
|
171
|
-
t.unfinalizedDrafts_ = t.drafts_.length;
|
|
172
|
-
let n = t.drafts_[0];
|
|
173
|
-
if (e !== void 0 && e !== n) {
|
|
174
|
-
n[l].modified_ && (he(t), d(4)), x(e) && (e = be(t, e));
|
|
175
|
-
let { patchPlugin_: r } = t;
|
|
176
|
-
r && r.generateReplacementPatches_(n[l].base_, e, t);
|
|
177
|
-
} else e = be(t, n);
|
|
178
|
-
return xe(t, e, !0), he(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e === s ? void 0 : e;
|
|
179
|
-
}
|
|
180
|
-
function be(e, t) {
|
|
181
|
-
if (F(t)) return t;
|
|
182
|
-
let n = t[l];
|
|
183
|
-
if (!n) return V(t, e.handledSet_, e);
|
|
184
|
-
if (!B(n, e)) return t;
|
|
185
|
-
if (!n.modified_) return n.base_;
|
|
186
|
-
if (!n.finalized_) {
|
|
187
|
-
let { callbacks_: t } = n;
|
|
188
|
-
if (t) for (; t.length > 0;) t.pop()(e);
|
|
189
|
-
Ee(n, e);
|
|
190
|
-
}
|
|
191
|
-
return n.copy_;
|
|
192
|
-
}
|
|
193
|
-
function xe(e, t, n = !1) {
|
|
194
|
-
!e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && N(t, n);
|
|
195
|
-
}
|
|
196
|
-
function Se(e) {
|
|
197
|
-
e.finalized_ = !0, e.scope_.unfinalizedDrafts_--;
|
|
198
|
-
}
|
|
199
|
-
var B = (e, t) => e.scope_ === t, Ce = [];
|
|
200
|
-
function we(e, t, n, r) {
|
|
201
|
-
let i = A(e), a = e.type_;
|
|
202
|
-
if (r !== void 0 && w(i, r, a) === t) {
|
|
203
|
-
T(i, r, n, a);
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
if (!e.draftLocations_) {
|
|
207
|
-
let t = e.draftLocations_ = /* @__PURE__ */ new Map();
|
|
208
|
-
S(i, (e, n) => {
|
|
209
|
-
if (b(n)) {
|
|
210
|
-
let r = t.get(n) || [];
|
|
211
|
-
r.push(e), t.set(n, r);
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
let o = e.draftLocations_.get(t) ?? Ce;
|
|
216
|
-
for (let e of o) T(i, e, n, a);
|
|
217
|
-
}
|
|
218
|
-
function Te(e, t, n) {
|
|
219
|
-
e.callbacks_.push(function(r) {
|
|
220
|
-
let i = t;
|
|
221
|
-
if (!i || !B(i, r)) return;
|
|
222
|
-
r.mapSetPlugin_?.fixSetContents(i);
|
|
223
|
-
let a = j(i);
|
|
224
|
-
we(e, i.draft_ ?? i, a, n), Ee(i, r);
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
function Ee(e, t) {
|
|
228
|
-
if (e.modified_ && !e.finalized_ && (e.type_ === 3 || e.type_ === 1 && e.allIndicesReassigned_ || (e.assigned_?.size ?? 0) > 0)) {
|
|
229
|
-
let { patchPlugin_: n } = t;
|
|
230
|
-
if (n) {
|
|
231
|
-
let r = n.getPath(e);
|
|
232
|
-
r && n.generatePatches_(e, r, t);
|
|
233
|
-
}
|
|
234
|
-
Se(e);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
function De(e, t, n) {
|
|
238
|
-
let { scope_: r } = e;
|
|
239
|
-
if (b(n)) {
|
|
240
|
-
let i = n[l];
|
|
241
|
-
B(i, r) && i.callbacks_.push(function() {
|
|
242
|
-
W(e), we(e, n, j(i), t);
|
|
243
|
-
});
|
|
244
|
-
} else x(n) && e.callbacks_.push(function() {
|
|
245
|
-
let i = A(e);
|
|
246
|
-
e.type_ === 3 ? i.has(n) && V(n, r.handledSet_, r) : w(i, t, e.type_) === n && r.drafts_.length > 1 && (e.assigned_.get(t) ?? !1) === !0 && e.copy_ && V(w(e.copy_, t, e.type_), r.handledSet_, r);
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
function V(e, t, n) {
|
|
250
|
-
return !n.immer_.autoFreeze_ && n.unfinalizedDrafts_ < 1 || b(e) || t.has(e) || !x(e) || F(e) ? e : (t.add(e), S(e, (r, i) => {
|
|
251
|
-
if (b(i)) {
|
|
252
|
-
let t = i[l];
|
|
253
|
-
B(t, n) && (T(e, r, j(t), e.type_), Se(t));
|
|
254
|
-
} else x(i) && V(i, t, n);
|
|
255
|
-
}), e);
|
|
256
|
-
}
|
|
257
|
-
function Oe(e, t) {
|
|
258
|
-
let n = E(e), r = {
|
|
259
|
-
type_: n ? 1 : 0,
|
|
260
|
-
scope_: t ? t.scope_ : fe(),
|
|
261
|
-
modified_: !1,
|
|
262
|
-
finalized_: !1,
|
|
263
|
-
assigned_: void 0,
|
|
264
|
-
parent_: t,
|
|
265
|
-
base_: e,
|
|
266
|
-
draft_: null,
|
|
267
|
-
copy_: null,
|
|
268
|
-
revoke_: null,
|
|
269
|
-
isManual_: !1,
|
|
270
|
-
callbacks_: void 0
|
|
271
|
-
}, i = r, a = H;
|
|
272
|
-
n && (i = [r], a = U);
|
|
273
|
-
let { revoke: o, proxy: s } = Proxy.revocable(i, a);
|
|
274
|
-
return r.draft_ = s, r.revoke_ = o, [s, r];
|
|
275
|
-
}
|
|
276
|
-
var H = {
|
|
277
|
-
get(e, t) {
|
|
278
|
-
if (t === l) return e;
|
|
279
|
-
let n = e.scope_.arrayMethodsPlugin_, r = e.type_ === 1 && typeof t == "string";
|
|
280
|
-
if (r && n?.isArrayOperationMethod(t)) return n.createMethodInterceptor(e, t);
|
|
281
|
-
let i = A(e);
|
|
282
|
-
if (!re(i, t, e.type_)) return Ae(e, i, t);
|
|
283
|
-
let a = i[t];
|
|
284
|
-
if (e.finalized_ || !x(a) || r && e.operationMethod && n?.isMutatingArrayMethod(e.operationMethod) && se(t)) return a;
|
|
285
|
-
if (a === ke(e.base_, t)) {
|
|
286
|
-
W(e);
|
|
287
|
-
let n = e.type_ === 1 ? +t : t, r = Pe(e.scope_, a, e, n);
|
|
288
|
-
return e.copy_[n] = r;
|
|
289
|
-
}
|
|
290
|
-
return a;
|
|
291
|
-
},
|
|
292
|
-
has(e, t) {
|
|
293
|
-
return t in A(e);
|
|
294
|
-
},
|
|
295
|
-
ownKeys(e) {
|
|
296
|
-
return Reflect.ownKeys(A(e));
|
|
297
|
-
},
|
|
298
|
-
set(e, t, n) {
|
|
299
|
-
let r = je(A(e), t);
|
|
300
|
-
if (r?.set) return r.set.call(e.draft_, n), !0;
|
|
301
|
-
if (!e.modified_) {
|
|
302
|
-
let r = ke(A(e), t), i = r?.[l];
|
|
303
|
-
if (i && i.base_ === n) return e.copy_[t] = n, e.assigned_.set(t, !1), !0;
|
|
304
|
-
if (ie(n, r) && (n !== void 0 || re(e.base_, t, e.type_))) return !0;
|
|
305
|
-
W(e), Me(e);
|
|
306
|
-
}
|
|
307
|
-
return e.copy_[t] === n && (n !== void 0 || t in e.copy_) || Number.isNaN(n) && Number.isNaN(e.copy_[t]) ? !0 : (e.copy_[t] = n, e.assigned_.set(t, !0), De(e, t, n), !0);
|
|
308
|
-
},
|
|
309
|
-
deleteProperty(e, t) {
|
|
310
|
-
return W(e), ke(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_.set(t, !1), Me(e)) : e.assigned_.delete(t), e.copy_ && delete e.copy_[t], !0;
|
|
311
|
-
},
|
|
312
|
-
getOwnPropertyDescriptor(e, t) {
|
|
313
|
-
let n = A(e), r = Reflect.getOwnPropertyDescriptor(n, t);
|
|
314
|
-
return r && {
|
|
315
|
-
[v]: !0,
|
|
316
|
-
[g]: e.type_ !== 1 || t !== "length",
|
|
317
|
-
[_]: r[_],
|
|
318
|
-
[y]: n[t]
|
|
319
|
-
};
|
|
320
|
-
},
|
|
321
|
-
defineProperty() {
|
|
322
|
-
d(11);
|
|
323
|
-
},
|
|
324
|
-
getPrototypeOf(e) {
|
|
325
|
-
return p(e.base_);
|
|
326
|
-
},
|
|
327
|
-
setPrototypeOf() {
|
|
328
|
-
d(12);
|
|
329
|
-
}
|
|
330
|
-
}, U = {};
|
|
331
|
-
for (let e in H) {
|
|
332
|
-
let t = H[e];
|
|
333
|
-
U[e] = function() {
|
|
334
|
-
let e = arguments;
|
|
335
|
-
return e[0] = e[0][0], t.apply(this, e);
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
U.deleteProperty = function(e, t) {
|
|
339
|
-
return process.env.NODE_ENV !== "production" && isNaN(parseInt(t)) && d(13), U.set.call(this, e, t, void 0);
|
|
340
|
-
}, U.set = function(e, t, n) {
|
|
341
|
-
return process.env.NODE_ENV !== "production" && t !== "length" && isNaN(parseInt(t)) && d(14), H.set.call(this, e[0], t, n, e[0]);
|
|
342
|
-
};
|
|
343
|
-
function ke(e, t) {
|
|
344
|
-
let n = e[l];
|
|
345
|
-
return (n ? A(n) : e)[t];
|
|
346
|
-
}
|
|
347
|
-
function Ae(e, t, n) {
|
|
348
|
-
let r = je(t, n);
|
|
349
|
-
return r ? y in r ? r[y] : r.get?.call(e.draft_) : void 0;
|
|
350
|
-
}
|
|
351
|
-
function je(e, t) {
|
|
352
|
-
if (!(t in e)) return;
|
|
353
|
-
let n = p(e);
|
|
354
|
-
for (; n;) {
|
|
355
|
-
let e = Object.getOwnPropertyDescriptor(n, t);
|
|
356
|
-
if (e) return e;
|
|
357
|
-
n = p(n);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
function Me(e) {
|
|
361
|
-
e.modified_ || (e.modified_ = !0, e.parent_ && Me(e.parent_));
|
|
362
|
-
}
|
|
363
|
-
function W(e) {
|
|
364
|
-
e.copy_ ||= (e.assigned_ = /* @__PURE__ */ new Map(), M(e.base_, e.scope_.immer_.useStrictShallowCopy_));
|
|
365
|
-
}
|
|
366
|
-
var Ne = class {
|
|
367
|
-
constructor(e) {
|
|
368
|
-
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.useStrictIteration_ = !1, this.produce = (e, t, n) => {
|
|
369
|
-
if (k(e) && !k(t)) {
|
|
370
|
-
let n = t;
|
|
371
|
-
t = e;
|
|
372
|
-
let r = this;
|
|
373
|
-
return function(e = n, ...i) {
|
|
374
|
-
return r.produce(e, (e) => t.call(this, e, ...i));
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
k(t) || d(6), n !== void 0 && !k(n) && d(7);
|
|
378
|
-
let r;
|
|
379
|
-
if (x(e)) {
|
|
380
|
-
let i = _e(this), a = Pe(i, e, void 0), o = !0;
|
|
381
|
-
try {
|
|
382
|
-
r = t(a), o = !1;
|
|
383
|
-
} finally {
|
|
384
|
-
o ? he(i) : ge(i);
|
|
385
|
-
}
|
|
386
|
-
return me(i, n), ye(r, i);
|
|
387
|
-
} else if (!e || !ae(e)) {
|
|
388
|
-
if (r = t(e), r === void 0 && (r = e), r === s && (r = void 0), this.autoFreeze_ && N(r, !0), n) {
|
|
389
|
-
let t = [], i = [];
|
|
390
|
-
R(L).generateReplacementPatches_(e, r, {
|
|
391
|
-
patches_: t,
|
|
392
|
-
inversePatches_: i
|
|
393
|
-
}), n(t, i);
|
|
394
|
-
}
|
|
395
|
-
return r;
|
|
396
|
-
} else d(1, e);
|
|
397
|
-
}, this.produceWithPatches = (e, t) => {
|
|
398
|
-
if (k(e)) return (t, ...n) => this.produceWithPatches(t, (t) => e(t, ...n));
|
|
399
|
-
let n, r;
|
|
400
|
-
return [
|
|
401
|
-
this.produce(e, t, (e, t) => {
|
|
402
|
-
n = e, r = t;
|
|
403
|
-
}),
|
|
404
|
-
n,
|
|
405
|
-
r
|
|
406
|
-
];
|
|
407
|
-
}, oe(e?.autoFreeze) && this.setAutoFreeze(e.autoFreeze), oe(e?.useStrictShallowCopy) && this.setUseStrictShallowCopy(e.useStrictShallowCopy), oe(e?.useStrictIteration) && this.setUseStrictIteration(e.useStrictIteration);
|
|
408
|
-
}
|
|
409
|
-
createDraft(e) {
|
|
410
|
-
x(e) || d(8), b(e) && (e = Fe(e));
|
|
411
|
-
let t = _e(this), n = Pe(t, e, void 0);
|
|
412
|
-
return n[l].isManual_ = !0, ge(t), n;
|
|
413
|
-
}
|
|
414
|
-
finishDraft(e, t) {
|
|
415
|
-
let n = e && e[l];
|
|
416
|
-
(!n || !n.isManual_) && d(9);
|
|
417
|
-
let { scope_: r } = n;
|
|
418
|
-
return me(r, t), ye(void 0, r);
|
|
419
|
-
}
|
|
420
|
-
setAutoFreeze(e) {
|
|
421
|
-
this.autoFreeze_ = e;
|
|
422
|
-
}
|
|
423
|
-
setUseStrictShallowCopy(e) {
|
|
424
|
-
this.useStrictShallowCopy_ = e;
|
|
425
|
-
}
|
|
426
|
-
setUseStrictIteration(e) {
|
|
427
|
-
this.useStrictIteration_ = e;
|
|
428
|
-
}
|
|
429
|
-
shouldUseStrictIteration() {
|
|
430
|
-
return this.useStrictIteration_;
|
|
431
|
-
}
|
|
432
|
-
applyPatches(e, t) {
|
|
433
|
-
let n;
|
|
434
|
-
for (n = t.length - 1; n >= 0; n--) {
|
|
435
|
-
let r = t[n];
|
|
436
|
-
if (r.path.length === 0 && r.op === "replace") {
|
|
437
|
-
e = r.value;
|
|
438
|
-
break;
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
n > -1 && (t = t.slice(n + 1));
|
|
442
|
-
let r = R(L).applyPatches_;
|
|
443
|
-
return b(e) ? r(e, t) : this.produce(e, (e) => r(e, t));
|
|
444
|
-
}
|
|
445
|
-
};
|
|
446
|
-
function Pe(e, t, n, r) {
|
|
447
|
-
let [i, a] = D(t) ? R(I).proxyMap_(t, n) : O(t) ? R(I).proxySet_(t, n) : Oe(t, n);
|
|
448
|
-
return (n?.scope_ ?? fe()).drafts_.push(i), a.callbacks_ = n?.callbacks_ ?? [], a.key_ = r, n && r !== void 0 ? Te(n, a, r) : a.callbacks_.push(function(e) {
|
|
449
|
-
e.mapSetPlugin_?.fixSetContents(a);
|
|
450
|
-
let { patchPlugin_: t } = e;
|
|
451
|
-
a.modified_ && t && t.generatePatches_(a, [], e);
|
|
452
|
-
}), i;
|
|
453
|
-
}
|
|
454
|
-
function Fe(e) {
|
|
455
|
-
return b(e) || d(10, e), Ie(e);
|
|
456
|
-
}
|
|
457
|
-
function Ie(e) {
|
|
458
|
-
if (!x(e) || F(e)) return e;
|
|
459
|
-
let t = e[l], n, r = !0;
|
|
460
|
-
if (t) {
|
|
461
|
-
if (!t.modified_) return t.base_;
|
|
462
|
-
t.finalized_ = !0, n = M(e, t.scope_.immer_.useStrictShallowCopy_), r = t.scope_.immer_.shouldUseStrictIteration();
|
|
463
|
-
} else n = M(e, !0);
|
|
464
|
-
return S(n, (e, t) => {
|
|
465
|
-
T(n, e, Ie(t));
|
|
466
|
-
}, r), t && (t.finalized_ = !1), n;
|
|
467
|
-
}
|
|
468
|
-
var Le = new Ne().produce;
|
|
469
|
-
typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__, typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__;
|
|
470
|
-
function G(e, t) {
|
|
471
|
-
function n(...n) {
|
|
472
|
-
if (t) {
|
|
473
|
-
let r = t(...n);
|
|
474
|
-
if (!r) throw Error(process.env.NODE_ENV === "production" ? J(0) : "prepareAction did not return an object");
|
|
475
|
-
return {
|
|
476
|
-
type: e,
|
|
477
|
-
payload: r.payload,
|
|
478
|
-
..."meta" in r && { meta: r.meta },
|
|
479
|
-
..."error" in r && { error: r.error }
|
|
480
|
-
};
|
|
481
|
-
}
|
|
482
|
-
return {
|
|
483
|
-
type: e,
|
|
484
|
-
payload: n[0]
|
|
485
|
-
};
|
|
486
|
-
}
|
|
487
|
-
return n.toString = () => `${e}`, n.type = e, n.match = (t) => o(t) && t.type === e, n;
|
|
488
|
-
}
|
|
489
|
-
function Re(e) {
|
|
490
|
-
return x(e) ? Le(e, () => {}) : e;
|
|
491
|
-
}
|
|
492
|
-
function K(e, t, n) {
|
|
493
|
-
return e.has(t) ? e.get(t) : e.set(t, n(t)).get(t);
|
|
494
|
-
}
|
|
495
|
-
function ze(e) {
|
|
496
|
-
let t = {}, n = [], r, i = {
|
|
497
|
-
addCase(e, a) {
|
|
498
|
-
if (process.env.NODE_ENV !== "production") {
|
|
499
|
-
if (n.length > 0) throw Error(process.env.NODE_ENV === "production" ? J(26) : "`builder.addCase` should only be called before calling `builder.addMatcher`");
|
|
500
|
-
if (r) throw Error(process.env.NODE_ENV === "production" ? J(27) : "`builder.addCase` should only be called before calling `builder.addDefaultCase`");
|
|
501
|
-
}
|
|
502
|
-
let o = typeof e == "string" ? e : e.type;
|
|
503
|
-
if (!o) throw Error(process.env.NODE_ENV === "production" ? J(28) : "`builder.addCase` cannot be called with an empty action type");
|
|
504
|
-
if (o in t) throw Error(process.env.NODE_ENV === "production" ? J(29) : `\`builder.addCase\` cannot be called with two reducers for the same action type '${o}'`);
|
|
505
|
-
return t[o] = a, i;
|
|
506
|
-
},
|
|
507
|
-
addAsyncThunk(e, a) {
|
|
508
|
-
if (process.env.NODE_ENV !== "production" && r) throw Error(process.env.NODE_ENV === "production" ? J(43) : "`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");
|
|
509
|
-
return a.pending && (t[e.pending.type] = a.pending), a.rejected && (t[e.rejected.type] = a.rejected), a.fulfilled && (t[e.fulfilled.type] = a.fulfilled), a.settled && n.push({
|
|
510
|
-
matcher: e.settled,
|
|
511
|
-
reducer: a.settled
|
|
512
|
-
}), i;
|
|
513
|
-
},
|
|
514
|
-
addMatcher(e, t) {
|
|
515
|
-
if (process.env.NODE_ENV !== "production" && r) throw Error(process.env.NODE_ENV === "production" ? J(30) : "`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
|
|
516
|
-
return n.push({
|
|
517
|
-
matcher: e,
|
|
518
|
-
reducer: t
|
|
519
|
-
}), i;
|
|
520
|
-
},
|
|
521
|
-
addDefaultCase(e) {
|
|
522
|
-
if (process.env.NODE_ENV !== "production" && r) throw Error(process.env.NODE_ENV === "production" ? J(31) : "`builder.addDefaultCase` can only be called once");
|
|
523
|
-
return r = e, i;
|
|
524
|
-
}
|
|
525
|
-
};
|
|
526
|
-
return e(i), [
|
|
527
|
-
t,
|
|
528
|
-
n,
|
|
529
|
-
r
|
|
530
|
-
];
|
|
531
|
-
}
|
|
532
|
-
function Be(e) {
|
|
533
|
-
return typeof e == "function";
|
|
534
|
-
}
|
|
535
|
-
function Ve(e, t) {
|
|
536
|
-
if (process.env.NODE_ENV !== "production" && typeof t == "object") throw Error(process.env.NODE_ENV === "production" ? J(8) : "The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");
|
|
537
|
-
let [n, r, i] = ze(t), a;
|
|
538
|
-
if (Be(e)) a = () => Re(e());
|
|
539
|
-
else {
|
|
540
|
-
let t = Re(e);
|
|
541
|
-
a = () => t;
|
|
542
|
-
}
|
|
543
|
-
function o(e = a(), t) {
|
|
544
|
-
let o = [n[t.type], ...r.filter(({ matcher: e }) => e(t)).map(({ reducer: e }) => e)];
|
|
545
|
-
return o.filter((e) => !!e).length === 0 && (o = [i]), o.reduce((e, n) => {
|
|
546
|
-
if (n) if (b(e)) {
|
|
547
|
-
let r = n(e, t);
|
|
548
|
-
return r === void 0 ? e : r;
|
|
549
|
-
} else if (x(e)) return Le(e, (e) => n(e, t));
|
|
550
|
-
else {
|
|
551
|
-
let r = n(e, t);
|
|
552
|
-
if (r === void 0) {
|
|
553
|
-
if (e === null) return e;
|
|
554
|
-
throw Error("A case reducer on a non-draftable value must not return undefined");
|
|
555
|
-
}
|
|
556
|
-
return r;
|
|
557
|
-
}
|
|
558
|
-
return e;
|
|
559
|
-
}, e);
|
|
560
|
-
}
|
|
561
|
-
return o.getInitialState = a, o;
|
|
562
|
-
}
|
|
563
|
-
var He = /* @__PURE__ */ Symbol.for("rtk-slice-createasyncthunk");
|
|
564
|
-
function Ue(e, t) {
|
|
565
|
-
return `${e}/${t}`;
|
|
566
|
-
}
|
|
567
|
-
function We({ creators: e } = {}) {
|
|
568
|
-
let t = e?.asyncThunk?.[He];
|
|
569
|
-
return function(e) {
|
|
570
|
-
let { name: n, reducerPath: r = n } = e;
|
|
571
|
-
if (!n) throw Error(process.env.NODE_ENV === "production" ? J(11) : "`name` is a required option for createSlice");
|
|
572
|
-
typeof process < "u" && process.env.NODE_ENV === "development" && e.initialState === void 0 && console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");
|
|
573
|
-
let i = (typeof e.reducers == "function" ? e.reducers(qe()) : e.reducers) || {}, a = Object.keys(i), o = {
|
|
574
|
-
sliceCaseReducersByName: {},
|
|
575
|
-
sliceCaseReducersByType: {},
|
|
576
|
-
actionCreators: {},
|
|
577
|
-
sliceMatchers: []
|
|
578
|
-
}, s = {
|
|
579
|
-
addCase(e, t) {
|
|
580
|
-
let n = typeof e == "string" ? e : e.type;
|
|
581
|
-
if (!n) throw Error(process.env.NODE_ENV === "production" ? J(12) : "`context.addCase` cannot be called with an empty action type");
|
|
582
|
-
if (n in o.sliceCaseReducersByType) throw Error(process.env.NODE_ENV === "production" ? J(13) : "`context.addCase` cannot be called with two reducers for the same action type: " + n);
|
|
583
|
-
return o.sliceCaseReducersByType[n] = t, s;
|
|
584
|
-
},
|
|
585
|
-
addMatcher(e, t) {
|
|
586
|
-
return o.sliceMatchers.push({
|
|
587
|
-
matcher: e,
|
|
588
|
-
reducer: t
|
|
589
|
-
}), s;
|
|
590
|
-
},
|
|
591
|
-
exposeAction(e, t) {
|
|
592
|
-
return o.actionCreators[e] = t, s;
|
|
593
|
-
},
|
|
594
|
-
exposeCaseReducer(e, t) {
|
|
595
|
-
return o.sliceCaseReducersByName[e] = t, s;
|
|
596
|
-
}
|
|
597
|
-
};
|
|
598
|
-
a.forEach((r) => {
|
|
599
|
-
let a = i[r], o = {
|
|
600
|
-
reducerName: r,
|
|
601
|
-
type: Ue(n, r),
|
|
602
|
-
createNotation: typeof e.reducers == "function"
|
|
603
|
-
};
|
|
604
|
-
Ye(a) ? Ze(o, a, s, t) : Je(o, a, s);
|
|
605
|
-
});
|
|
606
|
-
function c() {
|
|
607
|
-
if (process.env.NODE_ENV !== "production" && typeof e.extraReducers == "object") throw Error(process.env.NODE_ENV === "production" ? J(14) : "The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");
|
|
608
|
-
let [t = {}, n = [], r = void 0] = typeof e.extraReducers == "function" ? ze(e.extraReducers) : [e.extraReducers], i = {
|
|
609
|
-
...t,
|
|
610
|
-
...o.sliceCaseReducersByType
|
|
611
|
-
};
|
|
612
|
-
return Ve(e.initialState, (e) => {
|
|
613
|
-
for (let t in i) e.addCase(t, i[t]);
|
|
614
|
-
for (let t of o.sliceMatchers) e.addMatcher(t.matcher, t.reducer);
|
|
615
|
-
for (let t of n) e.addMatcher(t.matcher, t.reducer);
|
|
616
|
-
r && e.addDefaultCase(r);
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
let l = (e) => e, u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new WeakMap(), f;
|
|
620
|
-
function p(e, t) {
|
|
621
|
-
return f ||= c(), f(e, t);
|
|
622
|
-
}
|
|
623
|
-
function m() {
|
|
624
|
-
return f ||= c(), f.getInitialState();
|
|
625
|
-
}
|
|
626
|
-
function h(t, n = !1) {
|
|
627
|
-
function r(e) {
|
|
628
|
-
let i = e[t];
|
|
629
|
-
if (i === void 0) {
|
|
630
|
-
if (n) i = K(d, r, m);
|
|
631
|
-
else if (process.env.NODE_ENV !== "production") throw Error(process.env.NODE_ENV === "production" ? J(15) : "selectSlice returned undefined for an uninjected slice reducer");
|
|
632
|
-
}
|
|
633
|
-
return i;
|
|
634
|
-
}
|
|
635
|
-
function i(t = l) {
|
|
636
|
-
return K(K(u, n, () => /* @__PURE__ */ new WeakMap()), t, () => {
|
|
637
|
-
let r = {};
|
|
638
|
-
for (let [i, a] of Object.entries(e.selectors ?? {})) r[i] = Ge(a, t, () => K(d, t, m), n);
|
|
639
|
-
return r;
|
|
640
|
-
});
|
|
641
|
-
}
|
|
642
|
-
return {
|
|
643
|
-
reducerPath: t,
|
|
644
|
-
getSelectors: i,
|
|
645
|
-
get selectors() {
|
|
646
|
-
return i(r);
|
|
647
|
-
},
|
|
648
|
-
selectSlice: r
|
|
649
|
-
};
|
|
650
|
-
}
|
|
651
|
-
let g = {
|
|
652
|
-
name: n,
|
|
653
|
-
reducer: p,
|
|
654
|
-
actions: o.actionCreators,
|
|
655
|
-
caseReducers: o.sliceCaseReducersByName,
|
|
656
|
-
getInitialState: m,
|
|
657
|
-
...h(r),
|
|
658
|
-
injectInto(e, { reducerPath: t, ...n } = {}) {
|
|
659
|
-
let i = t ?? r;
|
|
660
|
-
return e.inject({
|
|
661
|
-
reducerPath: i,
|
|
662
|
-
reducer: p
|
|
663
|
-
}, n), {
|
|
664
|
-
...g,
|
|
665
|
-
...h(i, !0)
|
|
666
|
-
};
|
|
667
|
-
}
|
|
668
|
-
};
|
|
669
|
-
return g;
|
|
670
|
-
};
|
|
671
|
-
}
|
|
672
|
-
function Ge(e, t, n, r) {
|
|
673
|
-
function i(i, ...a) {
|
|
674
|
-
let o = t(i);
|
|
675
|
-
if (o === void 0) {
|
|
676
|
-
if (r) o = n();
|
|
677
|
-
else if (process.env.NODE_ENV !== "production") throw Error(process.env.NODE_ENV === "production" ? J(16) : "selectState returned undefined for an uninjected slice reducer");
|
|
678
|
-
}
|
|
679
|
-
return e(o, ...a);
|
|
680
|
-
}
|
|
681
|
-
return i.unwrapped = e, i;
|
|
682
|
-
}
|
|
683
|
-
var Ke = /* @__PURE__ */ We();
|
|
684
|
-
function qe() {
|
|
685
|
-
function e(e, t) {
|
|
686
|
-
return {
|
|
687
|
-
_reducerDefinitionType: "asyncThunk",
|
|
688
|
-
payloadCreator: e,
|
|
689
|
-
...t
|
|
690
|
-
};
|
|
691
|
-
}
|
|
692
|
-
return e.withTypes = () => e, {
|
|
693
|
-
reducer(e) {
|
|
694
|
-
return Object.assign({ [e.name](...t) {
|
|
695
|
-
return e(...t);
|
|
696
|
-
} }[e.name], { _reducerDefinitionType: "reducer" });
|
|
697
|
-
},
|
|
698
|
-
preparedReducer(e, t) {
|
|
699
|
-
return {
|
|
700
|
-
_reducerDefinitionType: "reducerWithPrepare",
|
|
701
|
-
prepare: e,
|
|
702
|
-
reducer: t
|
|
703
|
-
};
|
|
704
|
-
},
|
|
705
|
-
asyncThunk: e
|
|
706
|
-
};
|
|
707
|
-
}
|
|
708
|
-
function Je({ type: e, reducerName: t, createNotation: n }, r, i) {
|
|
709
|
-
let a, o;
|
|
710
|
-
if ("reducer" in r) {
|
|
711
|
-
if (n && !Xe(r)) throw Error(process.env.NODE_ENV === "production" ? J(17) : "Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");
|
|
712
|
-
a = r.reducer, o = r.prepare;
|
|
713
|
-
} else a = r;
|
|
714
|
-
i.addCase(e, a).exposeCaseReducer(t, a).exposeAction(t, o ? G(e, o) : G(e));
|
|
715
|
-
}
|
|
716
|
-
function Ye(e) {
|
|
717
|
-
return e._reducerDefinitionType === "asyncThunk";
|
|
718
|
-
}
|
|
719
|
-
function Xe(e) {
|
|
720
|
-
return e._reducerDefinitionType === "reducerWithPrepare";
|
|
721
|
-
}
|
|
722
|
-
function Ze({ type: e, reducerName: t }, n, r, i) {
|
|
723
|
-
if (!i) throw Error(process.env.NODE_ENV === "production" ? J(18) : "Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");
|
|
724
|
-
let { payloadCreator: a, fulfilled: o, pending: s, rejected: c, settled: l, options: u } = n, d = i(e, a, u);
|
|
725
|
-
r.exposeAction(t, d), o && r.addCase(d.fulfilled, o), s && r.addCase(d.pending, s), c && r.addCase(d.rejected, c), l && r.addMatcher(d.settled, l), r.exposeCaseReducer(t, {
|
|
726
|
-
fulfilled: o || q,
|
|
727
|
-
pending: s || q,
|
|
728
|
-
rejected: c || q,
|
|
729
|
-
settled: l || q
|
|
730
|
-
});
|
|
731
|
-
}
|
|
732
|
-
function q() {}
|
|
733
|
-
var Qe = "listener", $e = "completed", et = "cancelled";
|
|
734
|
-
`${et}`, `${$e}`, `${Qe}${et}`, `${Qe}${$e}`;
|
|
735
|
-
var { assign: tt } = Object, nt = "listenerMiddleware", rt = /* @__PURE__ */ tt(/* @__PURE__ */ G(`${nt}/add`), { withTypes: () => rt });
|
|
736
|
-
`${nt}`;
|
|
737
|
-
var it = /* @__PURE__ */ tt(/* @__PURE__ */ G(`${nt}/remove`), { withTypes: () => it });
|
|
738
|
-
function J(e) {
|
|
739
|
-
return `Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `;
|
|
740
|
-
}
|
|
741
|
-
//#endregion
|
|
742
|
-
//#region src/auth/authSlice.ts
|
|
743
|
-
var at = () => {
|
|
744
|
-
let e = localStorage.getItem(r.AuthCheckStorageItemName) === "true", t = localStorage.getItem(r.LoggedInUserStorageItemName), n = localStorage.getItem(r.SettingStorageItemName);
|
|
9
|
+
}, r = () => {
|
|
10
|
+
let e = localStorage.getItem(n.AuthCheckStorageItemName) === "true", t = localStorage.getItem(n.LoggedInUserStorageItemName), r = localStorage.getItem(n.SettingStorageItemName);
|
|
745
11
|
return {
|
|
746
12
|
isAuthenticated: e,
|
|
747
13
|
loggedInUser: t ? JSON.parse(t) : void 0,
|
|
748
|
-
setting:
|
|
14
|
+
setting: r ? JSON.parse(r) : void 0
|
|
749
15
|
};
|
|
750
|
-
},
|
|
16
|
+
}, i = () => e({
|
|
751
17
|
name: "auth",
|
|
752
|
-
initialState:
|
|
18
|
+
initialState: r(),
|
|
753
19
|
reducers: {
|
|
754
20
|
login: (e, t) => {
|
|
755
|
-
e.isAuthenticated = !0, localStorage.setItem(
|
|
21
|
+
e.isAuthenticated = !0, localStorage.setItem(n.AuthCheckStorageItemName, "true"), t.payload && (e.loggedInUser = t.payload.user, localStorage.setItem(n.LoggedInUserStorageItemName, JSON.stringify(t.payload.user)), e.setting = t.payload.setting, localStorage.setItem(n.SettingStorageItemName, JSON.stringify(t.payload.setting)));
|
|
756
22
|
},
|
|
757
23
|
logout: (e) => {
|
|
758
|
-
e.isAuthenticated = !1, e.loggedInUser = void 0, e.setting = void 0, localStorage.removeItem(
|
|
24
|
+
e.isAuthenticated = !1, e.loggedInUser = void 0, e.setting = void 0, localStorage.removeItem(n.AuthCheckStorageItemName), localStorage.removeItem(n.LoggedInUserStorageItemName), localStorage.removeItem(n.SettingStorageItemName);
|
|
759
25
|
},
|
|
760
26
|
updateLoggedInUser: (e, t) => {
|
|
761
27
|
e.loggedInUser = {
|
|
762
28
|
...e.loggedInUser,
|
|
763
29
|
...t.payload
|
|
764
|
-
}, localStorage.setItem(
|
|
30
|
+
}, localStorage.setItem(n.LoggedInUserStorageItemName, JSON.stringify(e.loggedInUser));
|
|
765
31
|
},
|
|
766
32
|
updateSetting: (e, t) => {
|
|
767
33
|
e.setting = {
|
|
768
34
|
...e.setting,
|
|
769
35
|
...t.payload
|
|
770
|
-
}, localStorage.setItem(
|
|
36
|
+
}, localStorage.setItem(n.SettingStorageItemName, JSON.stringify(e.setting));
|
|
771
37
|
},
|
|
772
38
|
syncFromStorage: (e) => {
|
|
773
|
-
e.isAuthenticated = localStorage.getItem(
|
|
774
|
-
let t = localStorage.getItem(
|
|
39
|
+
e.isAuthenticated = localStorage.getItem(n.AuthCheckStorageItemName) === "true";
|
|
40
|
+
let t = localStorage.getItem(n.LoggedInUserStorageItemName);
|
|
775
41
|
e.loggedInUser = t ? JSON.parse(t) : void 0;
|
|
776
|
-
let
|
|
777
|
-
e.setting =
|
|
42
|
+
let r = localStorage.getItem(n.SettingStorageItemName);
|
|
43
|
+
e.setting = r ? JSON.parse(r) : void 0;
|
|
778
44
|
}
|
|
779
45
|
}
|
|
780
|
-
}),
|
|
46
|
+
}), a = class e {
|
|
781
47
|
static Format(e, t) {
|
|
782
48
|
return `${e}:${t}`;
|
|
783
49
|
}
|
|
@@ -798,32 +64,32 @@ var at = () => {
|
|
|
798
64
|
let [t] = e[0].split(":");
|
|
799
65
|
return `/${t.toLowerCase()}`;
|
|
800
66
|
}
|
|
801
|
-
},
|
|
67
|
+
}, o = class {
|
|
802
68
|
id;
|
|
803
|
-
},
|
|
69
|
+
}, s = class extends o {
|
|
804
70
|
name;
|
|
805
71
|
countryId;
|
|
806
72
|
country;
|
|
807
73
|
constructor(e) {
|
|
808
74
|
super(), Object.assign(this, e);
|
|
809
75
|
}
|
|
810
|
-
},
|
|
76
|
+
}, c = class {
|
|
811
77
|
static columnsNames = [{
|
|
812
78
|
label: "اسم المدينة",
|
|
813
79
|
value: "Name"
|
|
814
80
|
}];
|
|
815
|
-
},
|
|
81
|
+
}, l = class extends o {
|
|
816
82
|
name;
|
|
817
83
|
code;
|
|
818
84
|
constructor(e) {
|
|
819
85
|
super(), Object.assign(this, e);
|
|
820
86
|
}
|
|
821
|
-
},
|
|
87
|
+
}, u = class {
|
|
822
88
|
static columnsNames = [{
|
|
823
89
|
label: "اسم الدولة",
|
|
824
90
|
value: "Name"
|
|
825
91
|
}];
|
|
826
|
-
},
|
|
92
|
+
}, d = class extends o {
|
|
827
93
|
name;
|
|
828
94
|
code;
|
|
829
95
|
isFeminine;
|
|
@@ -834,33 +100,33 @@ var at = () => {
|
|
|
834
100
|
constructor(e) {
|
|
835
101
|
super(), Object.assign(this, e);
|
|
836
102
|
}
|
|
837
|
-
},
|
|
103
|
+
}, f = class {
|
|
838
104
|
value;
|
|
839
105
|
columnName;
|
|
840
106
|
constructor(e) {
|
|
841
107
|
Object.assign(this, e);
|
|
842
108
|
}
|
|
843
|
-
},
|
|
109
|
+
}, p = class {
|
|
844
110
|
companyEmail;
|
|
845
111
|
username;
|
|
846
112
|
password;
|
|
847
113
|
constructor(e) {
|
|
848
114
|
Object.assign(this, e);
|
|
849
115
|
}
|
|
850
|
-
},
|
|
116
|
+
}, m = class {
|
|
851
117
|
url = null;
|
|
852
118
|
base64File = null;
|
|
853
119
|
extension = null;
|
|
854
120
|
contentType = null;
|
|
855
|
-
status =
|
|
121
|
+
status = h.Unchanged;
|
|
856
122
|
constructor(e) {
|
|
857
123
|
Object.assign(this, e);
|
|
858
124
|
}
|
|
859
|
-
},
|
|
125
|
+
}, h = {
|
|
860
126
|
Unchanged: 0,
|
|
861
127
|
New: 1,
|
|
862
128
|
Delete: 2
|
|
863
|
-
},
|
|
129
|
+
}, g = class {
|
|
864
130
|
static _baseUrl = "";
|
|
865
131
|
static get baseUrl() {
|
|
866
132
|
return this._baseUrl || console.warn("YusrCore: baseUrl has not been initialized. Defaults to empty string."), this._baseUrl;
|
|
@@ -868,428 +134,7 @@ var at = () => {
|
|
|
868
134
|
static initialize(e) {
|
|
869
135
|
this._baseUrl = e;
|
|
870
136
|
}
|
|
871
|
-
},
|
|
872
|
-
var t = n("react");
|
|
873
|
-
function r(e) {
|
|
874
|
-
var t = "https://react.dev/errors/" + e;
|
|
875
|
-
if (1 < arguments.length) {
|
|
876
|
-
t += "?args[]=" + encodeURIComponent(arguments[1]);
|
|
877
|
-
for (var n = 2; n < arguments.length; n++) t += "&args[]=" + encodeURIComponent(arguments[n]);
|
|
878
|
-
}
|
|
879
|
-
return "Minified React error #" + e + "; visit " + t + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
|
|
880
|
-
}
|
|
881
|
-
function i() {}
|
|
882
|
-
var a = {
|
|
883
|
-
d: {
|
|
884
|
-
f: i,
|
|
885
|
-
r: function() {
|
|
886
|
-
throw Error(r(522));
|
|
887
|
-
},
|
|
888
|
-
D: i,
|
|
889
|
-
C: i,
|
|
890
|
-
L: i,
|
|
891
|
-
m: i,
|
|
892
|
-
X: i,
|
|
893
|
-
S: i,
|
|
894
|
-
M: i
|
|
895
|
-
},
|
|
896
|
-
p: 0,
|
|
897
|
-
findDOMNode: null
|
|
898
|
-
}, o = Symbol.for("react.portal");
|
|
899
|
-
function s(e, t, n) {
|
|
900
|
-
var r = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
|
|
901
|
-
return {
|
|
902
|
-
$$typeof: o,
|
|
903
|
-
key: r == null ? null : "" + r,
|
|
904
|
-
children: e,
|
|
905
|
-
containerInfo: t,
|
|
906
|
-
implementation: n
|
|
907
|
-
};
|
|
908
|
-
}
|
|
909
|
-
var c = t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
910
|
-
function l(e, t) {
|
|
911
|
-
if (e === "font") return "";
|
|
912
|
-
if (typeof t == "string") return t === "use-credentials" ? t : "";
|
|
913
|
-
}
|
|
914
|
-
e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = a, e.createPortal = function(e, t) {
|
|
915
|
-
var n = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
|
|
916
|
-
if (!t || t.nodeType !== 1 && t.nodeType !== 9 && t.nodeType !== 11) throw Error(r(299));
|
|
917
|
-
return s(e, t, null, n);
|
|
918
|
-
}, e.flushSync = function(e) {
|
|
919
|
-
var t = c.T, n = a.p;
|
|
920
|
-
try {
|
|
921
|
-
if (c.T = null, a.p = 2, e) return e();
|
|
922
|
-
} finally {
|
|
923
|
-
c.T = t, a.p = n, a.d.f();
|
|
924
|
-
}
|
|
925
|
-
}, e.preconnect = function(e, t) {
|
|
926
|
-
typeof e == "string" && (t ? (t = t.crossOrigin, t = typeof t == "string" ? t === "use-credentials" ? t : "" : void 0) : t = null, a.d.C(e, t));
|
|
927
|
-
}, e.prefetchDNS = function(e) {
|
|
928
|
-
typeof e == "string" && a.d.D(e);
|
|
929
|
-
}, e.preinit = function(e, t) {
|
|
930
|
-
if (typeof e == "string" && t && typeof t.as == "string") {
|
|
931
|
-
var n = t.as, r = l(n, t.crossOrigin), i = typeof t.integrity == "string" ? t.integrity : void 0, o = typeof t.fetchPriority == "string" ? t.fetchPriority : void 0;
|
|
932
|
-
n === "style" ? a.d.S(e, typeof t.precedence == "string" ? t.precedence : void 0, {
|
|
933
|
-
crossOrigin: r,
|
|
934
|
-
integrity: i,
|
|
935
|
-
fetchPriority: o
|
|
936
|
-
}) : n === "script" && a.d.X(e, {
|
|
937
|
-
crossOrigin: r,
|
|
938
|
-
integrity: i,
|
|
939
|
-
fetchPriority: o,
|
|
940
|
-
nonce: typeof t.nonce == "string" ? t.nonce : void 0
|
|
941
|
-
});
|
|
942
|
-
}
|
|
943
|
-
}, e.preinitModule = function(e, t) {
|
|
944
|
-
if (typeof e == "string") if (typeof t == "object" && t) {
|
|
945
|
-
if (t.as == null || t.as === "script") {
|
|
946
|
-
var n = l(t.as, t.crossOrigin);
|
|
947
|
-
a.d.M(e, {
|
|
948
|
-
crossOrigin: n,
|
|
949
|
-
integrity: typeof t.integrity == "string" ? t.integrity : void 0,
|
|
950
|
-
nonce: typeof t.nonce == "string" ? t.nonce : void 0
|
|
951
|
-
});
|
|
952
|
-
}
|
|
953
|
-
} else t ?? a.d.M(e);
|
|
954
|
-
}, e.preload = function(e, t) {
|
|
955
|
-
if (typeof e == "string" && typeof t == "object" && t && typeof t.as == "string") {
|
|
956
|
-
var n = t.as, r = l(n, t.crossOrigin);
|
|
957
|
-
a.d.L(e, n, {
|
|
958
|
-
crossOrigin: r,
|
|
959
|
-
integrity: typeof t.integrity == "string" ? t.integrity : void 0,
|
|
960
|
-
nonce: typeof t.nonce == "string" ? t.nonce : void 0,
|
|
961
|
-
type: typeof t.type == "string" ? t.type : void 0,
|
|
962
|
-
fetchPriority: typeof t.fetchPriority == "string" ? t.fetchPriority : void 0,
|
|
963
|
-
referrerPolicy: typeof t.referrerPolicy == "string" ? t.referrerPolicy : void 0,
|
|
964
|
-
imageSrcSet: typeof t.imageSrcSet == "string" ? t.imageSrcSet : void 0,
|
|
965
|
-
imageSizes: typeof t.imageSizes == "string" ? t.imageSizes : void 0,
|
|
966
|
-
media: typeof t.media == "string" ? t.media : void 0
|
|
967
|
-
});
|
|
968
|
-
}
|
|
969
|
-
}, e.preloadModule = function(e, t) {
|
|
970
|
-
if (typeof e == "string") if (t) {
|
|
971
|
-
var n = l(t.as, t.crossOrigin);
|
|
972
|
-
a.d.m(e, {
|
|
973
|
-
as: typeof t.as == "string" && t.as !== "script" ? t.as : void 0,
|
|
974
|
-
crossOrigin: n,
|
|
975
|
-
integrity: typeof t.integrity == "string" ? t.integrity : void 0
|
|
976
|
-
});
|
|
977
|
-
} else a.d.m(e);
|
|
978
|
-
}, e.requestFormReset = function(e) {
|
|
979
|
-
a.d.r(e);
|
|
980
|
-
}, e.unstable_batchedUpdates = function(e, t) {
|
|
981
|
-
return e(t);
|
|
982
|
-
}, e.useFormState = function(e, t, n) {
|
|
983
|
-
return c.H.useFormState(e, t, n);
|
|
984
|
-
}, e.useFormStatus = function() {
|
|
985
|
-
return c.H.useHostTransitionStatus();
|
|
986
|
-
}, e.version = "19.2.4";
|
|
987
|
-
})), vt = /* @__PURE__ */ t(((e) => {
|
|
988
|
-
process.env.NODE_ENV !== "production" && (function() {
|
|
989
|
-
function t() {}
|
|
990
|
-
function r(e) {
|
|
991
|
-
return "" + e;
|
|
992
|
-
}
|
|
993
|
-
function i(e, t, n) {
|
|
994
|
-
var i = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
|
|
995
|
-
try {
|
|
996
|
-
r(i);
|
|
997
|
-
var a = !1;
|
|
998
|
-
} catch {
|
|
999
|
-
a = !0;
|
|
1000
|
-
}
|
|
1001
|
-
return a && (console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", typeof Symbol == "function" && Symbol.toStringTag && i[Symbol.toStringTag] || i.constructor.name || "Object"), r(i)), {
|
|
1002
|
-
$$typeof: d,
|
|
1003
|
-
key: i == null ? null : "" + i,
|
|
1004
|
-
children: e,
|
|
1005
|
-
containerInfo: t,
|
|
1006
|
-
implementation: n
|
|
1007
|
-
};
|
|
1008
|
-
}
|
|
1009
|
-
function a(e, t) {
|
|
1010
|
-
if (e === "font") return "";
|
|
1011
|
-
if (typeof t == "string") return t === "use-credentials" ? t : "";
|
|
1012
|
-
}
|
|
1013
|
-
function o(e) {
|
|
1014
|
-
return e === null ? "`null`" : e === void 0 ? "`undefined`" : e === "" ? "an empty string" : "something with type \"" + typeof e + "\"";
|
|
1015
|
-
}
|
|
1016
|
-
function s(e) {
|
|
1017
|
-
return e === null ? "`null`" : e === void 0 ? "`undefined`" : e === "" ? "an empty string" : typeof e == "string" ? JSON.stringify(e) : typeof e == "number" ? "`" + e + "`" : "something with type \"" + typeof e + "\"";
|
|
1018
|
-
}
|
|
1019
|
-
function c() {
|
|
1020
|
-
var e = f.H;
|
|
1021
|
-
return e === null && console.error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."), e;
|
|
1022
|
-
}
|
|
1023
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1024
|
-
var l = n("react"), u = {
|
|
1025
|
-
d: {
|
|
1026
|
-
f: t,
|
|
1027
|
-
r: function() {
|
|
1028
|
-
throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.");
|
|
1029
|
-
},
|
|
1030
|
-
D: t,
|
|
1031
|
-
C: t,
|
|
1032
|
-
L: t,
|
|
1033
|
-
m: t,
|
|
1034
|
-
X: t,
|
|
1035
|
-
S: t,
|
|
1036
|
-
M: t
|
|
1037
|
-
},
|
|
1038
|
-
p: 0,
|
|
1039
|
-
findDOMNode: null
|
|
1040
|
-
}, d = Symbol.for("react.portal"), f = l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
1041
|
-
typeof Map == "function" && Map.prototype != null && typeof Map.prototype.forEach == "function" && typeof Set == "function" && Set.prototype != null && typeof Set.prototype.clear == "function" && typeof Set.prototype.forEach == "function" || console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"), e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = u, e.createPortal = function(e, t) {
|
|
1042
|
-
var n = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
|
|
1043
|
-
if (!t || t.nodeType !== 1 && t.nodeType !== 9 && t.nodeType !== 11) throw Error("Target container is not a DOM element.");
|
|
1044
|
-
return i(e, t, null, n);
|
|
1045
|
-
}, e.flushSync = function(e) {
|
|
1046
|
-
var t = f.T, n = u.p;
|
|
1047
|
-
try {
|
|
1048
|
-
if (f.T = null, u.p = 2, e) return e();
|
|
1049
|
-
} finally {
|
|
1050
|
-
f.T = t, u.p = n, u.d.f() && console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.");
|
|
1051
|
-
}
|
|
1052
|
-
}, e.preconnect = function(e, t) {
|
|
1053
|
-
typeof e == "string" && e ? t != null && typeof t != "object" ? console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.", s(t)) : t != null && typeof t.crossOrigin != "string" && console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.", o(t.crossOrigin)) : console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", o(e)), typeof e == "string" && (t ? (t = t.crossOrigin, t = typeof t == "string" ? t === "use-credentials" ? t : "" : void 0) : t = null, u.d.C(e, t));
|
|
1054
|
-
}, e.prefetchDNS = function(e) {
|
|
1055
|
-
if (typeof e != "string" || !e) console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", o(e));
|
|
1056
|
-
else if (1 < arguments.length) {
|
|
1057
|
-
var t = arguments[1];
|
|
1058
|
-
typeof t == "object" && t.hasOwnProperty("crossOrigin") ? console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", s(t)) : console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", s(t));
|
|
1059
|
-
}
|
|
1060
|
-
typeof e == "string" && u.d.D(e);
|
|
1061
|
-
}, e.preinit = function(e, t) {
|
|
1062
|
-
if (typeof e == "string" && e ? typeof t != "object" || !t ? console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.", s(t)) : t.as !== "style" && t.as !== "script" && console.error("ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are \"style\" and \"script\".", s(t.as)) : console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", o(e)), typeof e == "string" && t && typeof t.as == "string") {
|
|
1063
|
-
var n = t.as, r = a(n, t.crossOrigin), i = typeof t.integrity == "string" ? t.integrity : void 0, c = typeof t.fetchPriority == "string" ? t.fetchPriority : void 0;
|
|
1064
|
-
n === "style" ? u.d.S(e, typeof t.precedence == "string" ? t.precedence : void 0, {
|
|
1065
|
-
crossOrigin: r,
|
|
1066
|
-
integrity: i,
|
|
1067
|
-
fetchPriority: c
|
|
1068
|
-
}) : n === "script" && u.d.X(e, {
|
|
1069
|
-
crossOrigin: r,
|
|
1070
|
-
integrity: i,
|
|
1071
|
-
fetchPriority: c,
|
|
1072
|
-
nonce: typeof t.nonce == "string" ? t.nonce : void 0
|
|
1073
|
-
});
|
|
1074
|
-
}
|
|
1075
|
-
}, e.preinitModule = function(e, t) {
|
|
1076
|
-
var n = "";
|
|
1077
|
-
if (typeof e == "string" && e || (n += " The `href` argument encountered was " + o(e) + "."), t !== void 0 && typeof t != "object" ? n += " The `options` argument encountered was " + o(t) + "." : t && "as" in t && t.as !== "script" && (n += " The `as` option encountered was " + s(t.as) + "."), n) console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s", n);
|
|
1078
|
-
else switch (n = t && typeof t.as == "string" ? t.as : "script", n) {
|
|
1079
|
-
case "script": break;
|
|
1080
|
-
default: n = s(n), console.error("ReactDOM.preinitModule(): Currently the only supported \"as\" type for this function is \"script\" but received \"%s\" instead. This warning was generated for `href` \"%s\". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)", n, e);
|
|
1081
|
-
}
|
|
1082
|
-
typeof e == "string" && (typeof t == "object" && t ? (t.as == null || t.as === "script") && (n = a(t.as, t.crossOrigin), u.d.M(e, {
|
|
1083
|
-
crossOrigin: n,
|
|
1084
|
-
integrity: typeof t.integrity == "string" ? t.integrity : void 0,
|
|
1085
|
-
nonce: typeof t.nonce == "string" ? t.nonce : void 0
|
|
1086
|
-
})) : t ?? u.d.M(e));
|
|
1087
|
-
}, e.preload = function(e, t) {
|
|
1088
|
-
var n = "";
|
|
1089
|
-
if (typeof e == "string" && e || (n += " The `href` argument encountered was " + o(e) + "."), typeof t != "object" || !t ? n += " The `options` argument encountered was " + o(t) + "." : typeof t.as == "string" && t.as || (n += " The `as` option encountered was " + o(t.as) + "."), n && console.error("ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel=\"preload\" as=\"...\" />` tag.%s", n), typeof e == "string" && typeof t == "object" && t && typeof t.as == "string") {
|
|
1090
|
-
n = t.as;
|
|
1091
|
-
var r = a(n, t.crossOrigin);
|
|
1092
|
-
u.d.L(e, n, {
|
|
1093
|
-
crossOrigin: r,
|
|
1094
|
-
integrity: typeof t.integrity == "string" ? t.integrity : void 0,
|
|
1095
|
-
nonce: typeof t.nonce == "string" ? t.nonce : void 0,
|
|
1096
|
-
type: typeof t.type == "string" ? t.type : void 0,
|
|
1097
|
-
fetchPriority: typeof t.fetchPriority == "string" ? t.fetchPriority : void 0,
|
|
1098
|
-
referrerPolicy: typeof t.referrerPolicy == "string" ? t.referrerPolicy : void 0,
|
|
1099
|
-
imageSrcSet: typeof t.imageSrcSet == "string" ? t.imageSrcSet : void 0,
|
|
1100
|
-
imageSizes: typeof t.imageSizes == "string" ? t.imageSizes : void 0,
|
|
1101
|
-
media: typeof t.media == "string" ? t.media : void 0
|
|
1102
|
-
});
|
|
1103
|
-
}
|
|
1104
|
-
}, e.preloadModule = function(e, t) {
|
|
1105
|
-
var n = "";
|
|
1106
|
-
typeof e == "string" && e || (n += " The `href` argument encountered was " + o(e) + "."), t !== void 0 && typeof t != "object" ? n += " The `options` argument encountered was " + o(t) + "." : t && "as" in t && typeof t.as != "string" && (n += " The `as` option encountered was " + o(t.as) + "."), n && console.error("ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel=\"modulepreload\" as=\"...\" />` tag.%s", n), typeof e == "string" && (t ? (n = a(t.as, t.crossOrigin), u.d.m(e, {
|
|
1107
|
-
as: typeof t.as == "string" && t.as !== "script" ? t.as : void 0,
|
|
1108
|
-
crossOrigin: n,
|
|
1109
|
-
integrity: typeof t.integrity == "string" ? t.integrity : void 0
|
|
1110
|
-
})) : u.d.m(e));
|
|
1111
|
-
}, e.requestFormReset = function(e) {
|
|
1112
|
-
u.d.r(e);
|
|
1113
|
-
}, e.unstable_batchedUpdates = function(e, t) {
|
|
1114
|
-
return e(t);
|
|
1115
|
-
}, e.useFormState = function(e, t, n) {
|
|
1116
|
-
return c().useFormState(e, t, n);
|
|
1117
|
-
}, e.useFormStatus = function() {
|
|
1118
|
-
return c().useHostTransitionStatus();
|
|
1119
|
-
}, e.version = "19.2.4", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1120
|
-
})();
|
|
1121
|
-
}));
|
|
1122
|
-
(/* @__PURE__ */ t(((e, t) => {
|
|
1123
|
-
function n() {
|
|
1124
|
-
if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) {
|
|
1125
|
-
if (process.env.NODE_ENV !== "production") throw Error("^_^");
|
|
1126
|
-
try {
|
|
1127
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n);
|
|
1128
|
-
} catch (e) {
|
|
1129
|
-
console.error(e);
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
process.env.NODE_ENV === "production" ? (n(), t.exports = _t()) : t.exports = vt();
|
|
1134
|
-
})))();
|
|
1135
|
-
function yt(e) {
|
|
1136
|
-
if (!e || typeof document > "u") return;
|
|
1137
|
-
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
1138
|
-
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
1139
|
-
}
|
|
1140
|
-
Array(12).fill(0);
|
|
1141
|
-
var bt = 1, Z = new class {
|
|
1142
|
-
constructor() {
|
|
1143
|
-
this.subscribe = (e) => (this.subscribers.push(e), () => {
|
|
1144
|
-
let t = this.subscribers.indexOf(e);
|
|
1145
|
-
this.subscribers.splice(t, 1);
|
|
1146
|
-
}), this.publish = (e) => {
|
|
1147
|
-
this.subscribers.forEach((t) => t(e));
|
|
1148
|
-
}, this.addToast = (e) => {
|
|
1149
|
-
this.publish(e), this.toasts = [...this.toasts, e];
|
|
1150
|
-
}, this.create = (e) => {
|
|
1151
|
-
let { message: t, ...n } = e, r = typeof e?.id == "number" || e.id?.length > 0 ? e.id : bt++, i = this.toasts.find((e) => e.id === r), a = e.dismissible === void 0 ? !0 : e.dismissible;
|
|
1152
|
-
return this.dismissedToasts.has(r) && this.dismissedToasts.delete(r), i ? this.toasts = this.toasts.map((n) => n.id === r ? (this.publish({
|
|
1153
|
-
...n,
|
|
1154
|
-
...e,
|
|
1155
|
-
id: r,
|
|
1156
|
-
title: t
|
|
1157
|
-
}), {
|
|
1158
|
-
...n,
|
|
1159
|
-
...e,
|
|
1160
|
-
id: r,
|
|
1161
|
-
dismissible: a,
|
|
1162
|
-
title: t
|
|
1163
|
-
}) : n) : this.addToast({
|
|
1164
|
-
title: t,
|
|
1165
|
-
...n,
|
|
1166
|
-
dismissible: a,
|
|
1167
|
-
id: r
|
|
1168
|
-
}), r;
|
|
1169
|
-
}, this.dismiss = (e) => (e ? (this.dismissedToasts.add(e), requestAnimationFrame(() => this.subscribers.forEach((t) => t({
|
|
1170
|
-
id: e,
|
|
1171
|
-
dismiss: !0
|
|
1172
|
-
})))) : this.toasts.forEach((e) => {
|
|
1173
|
-
this.subscribers.forEach((t) => t({
|
|
1174
|
-
id: e.id,
|
|
1175
|
-
dismiss: !0
|
|
1176
|
-
}));
|
|
1177
|
-
}), e), this.message = (e, t) => this.create({
|
|
1178
|
-
...t,
|
|
1179
|
-
message: e
|
|
1180
|
-
}), this.error = (e, t) => this.create({
|
|
1181
|
-
...t,
|
|
1182
|
-
message: e,
|
|
1183
|
-
type: "error"
|
|
1184
|
-
}), this.success = (e, t) => this.create({
|
|
1185
|
-
...t,
|
|
1186
|
-
type: "success",
|
|
1187
|
-
message: e
|
|
1188
|
-
}), this.info = (e, t) => this.create({
|
|
1189
|
-
...t,
|
|
1190
|
-
type: "info",
|
|
1191
|
-
message: e
|
|
1192
|
-
}), this.warning = (e, t) => this.create({
|
|
1193
|
-
...t,
|
|
1194
|
-
type: "warning",
|
|
1195
|
-
message: e
|
|
1196
|
-
}), this.loading = (e, t) => this.create({
|
|
1197
|
-
...t,
|
|
1198
|
-
type: "loading",
|
|
1199
|
-
message: e
|
|
1200
|
-
}), this.promise = (t, n) => {
|
|
1201
|
-
if (!n) return;
|
|
1202
|
-
let r;
|
|
1203
|
-
n.loading !== void 0 && (r = this.create({
|
|
1204
|
-
...n,
|
|
1205
|
-
promise: t,
|
|
1206
|
-
type: "loading",
|
|
1207
|
-
message: n.loading,
|
|
1208
|
-
description: typeof n.description == "function" ? void 0 : n.description
|
|
1209
|
-
}));
|
|
1210
|
-
let i = Promise.resolve(t instanceof Function ? t() : t), a = r !== void 0, o, s = i.then(async (t) => {
|
|
1211
|
-
if (o = ["resolve", t], e.isValidElement(t)) a = !1, this.create({
|
|
1212
|
-
id: r,
|
|
1213
|
-
type: "default",
|
|
1214
|
-
message: t
|
|
1215
|
-
});
|
|
1216
|
-
else if (St(t) && !t.ok) {
|
|
1217
|
-
a = !1;
|
|
1218
|
-
let i = typeof n.error == "function" ? await n.error(`HTTP error! status: ${t.status}`) : n.error, o = typeof n.description == "function" ? await n.description(`HTTP error! status: ${t.status}`) : n.description, s = typeof i == "object" && !e.isValidElement(i) ? i : { message: i };
|
|
1219
|
-
this.create({
|
|
1220
|
-
id: r,
|
|
1221
|
-
type: "error",
|
|
1222
|
-
description: o,
|
|
1223
|
-
...s
|
|
1224
|
-
});
|
|
1225
|
-
} else if (t instanceof Error) {
|
|
1226
|
-
a = !1;
|
|
1227
|
-
let i = typeof n.error == "function" ? await n.error(t) : n.error, o = typeof n.description == "function" ? await n.description(t) : n.description, s = typeof i == "object" && !e.isValidElement(i) ? i : { message: i };
|
|
1228
|
-
this.create({
|
|
1229
|
-
id: r,
|
|
1230
|
-
type: "error",
|
|
1231
|
-
description: o,
|
|
1232
|
-
...s
|
|
1233
|
-
});
|
|
1234
|
-
} else if (n.success !== void 0) {
|
|
1235
|
-
a = !1;
|
|
1236
|
-
let i = typeof n.success == "function" ? await n.success(t) : n.success, o = typeof n.description == "function" ? await n.description(t) : n.description, s = typeof i == "object" && !e.isValidElement(i) ? i : { message: i };
|
|
1237
|
-
this.create({
|
|
1238
|
-
id: r,
|
|
1239
|
-
type: "success",
|
|
1240
|
-
description: o,
|
|
1241
|
-
...s
|
|
1242
|
-
});
|
|
1243
|
-
}
|
|
1244
|
-
}).catch(async (t) => {
|
|
1245
|
-
if (o = ["reject", t], n.error !== void 0) {
|
|
1246
|
-
a = !1;
|
|
1247
|
-
let i = typeof n.error == "function" ? await n.error(t) : n.error, o = typeof n.description == "function" ? await n.description(t) : n.description, s = typeof i == "object" && !e.isValidElement(i) ? i : { message: i };
|
|
1248
|
-
this.create({
|
|
1249
|
-
id: r,
|
|
1250
|
-
type: "error",
|
|
1251
|
-
description: o,
|
|
1252
|
-
...s
|
|
1253
|
-
});
|
|
1254
|
-
}
|
|
1255
|
-
}).finally(() => {
|
|
1256
|
-
a && (this.dismiss(r), r = void 0), n.finally == null || n.finally.call(n);
|
|
1257
|
-
}), c = () => new Promise((e, t) => s.then(() => o[0] === "reject" ? t(o[1]) : e(o[1])).catch(t));
|
|
1258
|
-
return typeof r != "string" && typeof r != "number" ? { unwrap: c } : Object.assign(r, { unwrap: c });
|
|
1259
|
-
}, this.custom = (e, t) => {
|
|
1260
|
-
let n = t?.id || bt++;
|
|
1261
|
-
return this.create({
|
|
1262
|
-
jsx: e(n),
|
|
1263
|
-
id: n,
|
|
1264
|
-
...t
|
|
1265
|
-
}), n;
|
|
1266
|
-
}, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
|
|
1267
|
-
}
|
|
1268
|
-
}(), xt = (e, t) => {
|
|
1269
|
-
let n = t?.id || bt++;
|
|
1270
|
-
return Z.addToast({
|
|
1271
|
-
title: e,
|
|
1272
|
-
...t,
|
|
1273
|
-
id: n
|
|
1274
|
-
}), n;
|
|
1275
|
-
}, St = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", Q = Object.assign(xt, {
|
|
1276
|
-
success: Z.success,
|
|
1277
|
-
info: Z.info,
|
|
1278
|
-
warning: Z.warning,
|
|
1279
|
-
error: Z.error,
|
|
1280
|
-
custom: Z.custom,
|
|
1281
|
-
message: Z.message,
|
|
1282
|
-
promise: Z.promise,
|
|
1283
|
-
dismiss: Z.dismiss,
|
|
1284
|
-
loading: Z.loading
|
|
1285
|
-
}, {
|
|
1286
|
-
getHistory: () => Z.toasts,
|
|
1287
|
-
getToasts: () => Z.getActiveToasts()
|
|
1288
|
-
});
|
|
1289
|
-
yt("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
|
|
1290
|
-
//#endregion
|
|
1291
|
-
//#region src/networking/services/yusrApiHelper.ts
|
|
1292
|
-
var $ = class e {
|
|
137
|
+
}, _ = class e {
|
|
1293
138
|
static async Get(t, n) {
|
|
1294
139
|
let r = await fetch(t, {
|
|
1295
140
|
method: "GET",
|
|
@@ -1332,72 +177,72 @@ var $ = class e {
|
|
|
1332
177
|
});
|
|
1333
178
|
return e.handleResponse(i, r);
|
|
1334
179
|
}
|
|
1335
|
-
static async PostBlob(e,
|
|
1336
|
-
let
|
|
1337
|
-
...
|
|
1338
|
-
...!
|
|
1339
|
-
},
|
|
180
|
+
static async PostBlob(e, n, r) {
|
|
181
|
+
let i = n instanceof FormData, a = {
|
|
182
|
+
...r?.headers || {},
|
|
183
|
+
...!i && n ? { "Content-Type": "application/json" } : {}
|
|
184
|
+
}, o = await fetch(e, {
|
|
1340
185
|
method: "POST",
|
|
1341
186
|
credentials: "include",
|
|
1342
|
-
headers:
|
|
1343
|
-
body:
|
|
1344
|
-
...
|
|
187
|
+
headers: a,
|
|
188
|
+
body: i ? n : JSON.stringify(n),
|
|
189
|
+
...r
|
|
1345
190
|
});
|
|
1346
|
-
if (!
|
|
1347
|
-
let e = await
|
|
1348
|
-
|
|
191
|
+
if (!o.ok) {
|
|
192
|
+
let e = await o.json();
|
|
193
|
+
t.error(e.title || "حدث خطأ أثناء تحميل التقرير", { description: e.detail || "يرجى المحاولة مرة أخرى لاحقاً" });
|
|
1349
194
|
return;
|
|
1350
195
|
}
|
|
1351
|
-
return await
|
|
196
|
+
return await o.blob();
|
|
1352
197
|
}
|
|
1353
|
-
static async handleResponse(e,
|
|
1354
|
-
if (e.status === 401) return window.dispatchEvent(new Event(
|
|
198
|
+
static async handleResponse(e, r) {
|
|
199
|
+
if (e.status === 401) return window.dispatchEvent(new Event(n.UnauthorizedEventName)), t.error("انتهت صلاحية الدخول", { description: "سجل الدخول مجددًا." }), {
|
|
1355
200
|
data: void 0,
|
|
1356
201
|
status: 401,
|
|
1357
202
|
errorTitle: "Unauthorized",
|
|
1358
203
|
errorDetails: "Session expired"
|
|
1359
204
|
};
|
|
1360
|
-
if (e.status === 404) return
|
|
205
|
+
if (e.status === 404) return t.error("لم يتم العثور على طلبك"), {
|
|
1361
206
|
data: void 0,
|
|
1362
207
|
status: 404,
|
|
1363
208
|
errorTitle: "Not Found",
|
|
1364
209
|
errorDetails: ""
|
|
1365
210
|
};
|
|
1366
211
|
if (!e.ok) {
|
|
1367
|
-
let
|
|
1368
|
-
return
|
|
212
|
+
let n = await e.json();
|
|
213
|
+
return t.error(n.title || "An error occurred", { description: n.detail }), {
|
|
1369
214
|
data: void 0,
|
|
1370
215
|
status: e.status,
|
|
1371
|
-
errorTitle:
|
|
1372
|
-
errorDetails:
|
|
216
|
+
errorTitle: n.title,
|
|
217
|
+
errorDetails: n.detail
|
|
1373
218
|
};
|
|
1374
219
|
}
|
|
1375
|
-
let
|
|
1376
|
-
return
|
|
1377
|
-
data:
|
|
220
|
+
let i = await e.json();
|
|
221
|
+
return r && t.success(r), {
|
|
222
|
+
data: i,
|
|
1378
223
|
status: e.status,
|
|
1379
224
|
errorTitle: "",
|
|
1380
225
|
errorDetails: ""
|
|
1381
226
|
};
|
|
1382
227
|
}
|
|
1383
|
-
},
|
|
228
|
+
}, v = class {
|
|
1384
229
|
async Filter(e, t, n) {
|
|
1385
|
-
return await
|
|
230
|
+
return await _.Post(`${g.baseUrl}/${this.routeName}/Filter?pageNumber=${e}&rowsPerPage=${t}`, n);
|
|
1386
231
|
}
|
|
1387
|
-
},
|
|
232
|
+
}, y = class extends v {
|
|
1388
233
|
async Get(e) {
|
|
1389
|
-
return await
|
|
234
|
+
return await _.Get(`${g.baseUrl}/${this.routeName}/${e}`);
|
|
1390
235
|
}
|
|
1391
236
|
async Add(e) {
|
|
1392
|
-
return await
|
|
237
|
+
return await _.Post(`${g.baseUrl}/${this.routeName}/Add`, e, void 0, "تم حفظ البيانات بنجاح");
|
|
1393
238
|
}
|
|
1394
239
|
async Update(e) {
|
|
1395
|
-
return await
|
|
240
|
+
return await _.Put(`${g.baseUrl}/${this.routeName}/Update`, e, void 0, "تم تحديث المعلومات بنجاح");
|
|
1396
241
|
}
|
|
1397
242
|
async Delete(e) {
|
|
1398
|
-
return await
|
|
243
|
+
return await _.Delete(`${g.baseUrl}/${this.routeName}/${e}`, void 0, "تمت إزالة السجل بنجاح");
|
|
1399
244
|
}
|
|
1400
|
-
},
|
|
245
|
+
}, b = class {
|
|
1401
246
|
static required(e = "هذا الحقل مطلوب") {
|
|
1402
247
|
return (t) => t == null || t === "" || typeof t == "string" && t.trim() === "" ? e : null;
|
|
1403
248
|
}
|
|
@@ -1415,4 +260,4 @@ var $ = class e {
|
|
|
1415
260
|
}
|
|
1416
261
|
};
|
|
1417
262
|
//#endregion
|
|
1418
|
-
export {
|
|
263
|
+
export { g as ApiConstants, n as AuthConstants, y as BaseApiService, o as BaseEntity, v as BaseFilterableApiService, s as City, c as CityFilterColumns, l as Country, u as CountryFilterColumns, d as Currency, f as FilterCondition, p as LoginRequest, m as StorageFile, h as StorageFileStatus, a as SystemPermissions, b as Validators, _ as YusrApiHelper, i as createAuthSlice };
|