@entropic-bond/crud-panel 4.4.5 → 4.4.7
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.
|
@@ -1,2383 +1,2181 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.subscribers.delete(t);
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Notifies all the subscribers with the event passed as parameter.
|
|
25
|
-
*
|
|
26
|
-
* @param event the event passed to all subscribers.
|
|
27
|
-
*/
|
|
28
|
-
notify(t) {
|
|
29
|
-
this.subscribers.forEach((s) => s(t));
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Returns the number of subscribers.
|
|
33
|
-
*
|
|
34
|
-
* @returns the number of subscribers
|
|
35
|
-
* @example
|
|
36
|
-
* const observable = new Observable<number>()
|
|
37
|
-
* observable.subscribe( event => console.log( event ) )
|
|
38
|
-
* observable.subscribe( event => console.log( event ) )
|
|
39
|
-
* observable.subscribe( event => console.log( event ) )
|
|
40
|
-
* console.log( observable.subscribersCount ) // 3
|
|
41
|
-
*/
|
|
42
|
-
get subscribersCount() {
|
|
43
|
-
return this.subscribers.size;
|
|
44
|
-
}
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), t = class {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.subscribers = /* @__PURE__ */ new Set();
|
|
5
|
+
}
|
|
6
|
+
subscribe(e) {
|
|
7
|
+
return this.subscribers.add(e), () => this.unsubscribe(e);
|
|
8
|
+
}
|
|
9
|
+
unsubscribe(e) {
|
|
10
|
+
this.subscribers.delete(e);
|
|
11
|
+
}
|
|
12
|
+
notify(e) {
|
|
13
|
+
this.subscribers.forEach((t) => t(e));
|
|
14
|
+
}
|
|
15
|
+
get subscribersCount() {
|
|
16
|
+
return this.subscribers.size;
|
|
17
|
+
}
|
|
18
|
+
}, n = /* @__PURE__ */ new Uint8Array(16);
|
|
19
|
+
function r() {
|
|
20
|
+
return crypto.getRandomValues(n);
|
|
45
21
|
}
|
|
46
|
-
|
|
47
|
-
for (let
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return (j[n[t + 0]] + j[n[t + 1]] + j[n[t + 2]] + j[n[t + 3]] + "-" + j[n[t + 4]] + j[n[t + 5]] + "-" + j[n[t + 6]] + j[n[t + 7]] + "-" + j[n[t + 8]] + j[n[t + 9]] + "-" + j[n[t + 10]] + j[n[t + 11]] + j[n[t + 12]] + j[n[t + 13]] + j[n[t + 14]] + j[n[t + 15]]).toLowerCase();
|
|
22
|
+
var i = [];
|
|
23
|
+
for (let e = 0; e < 256; ++e) i.push((e + 256).toString(16).slice(1));
|
|
24
|
+
function a(e, t = 0) {
|
|
25
|
+
return (i[e[t + 0]] + i[e[t + 1]] + i[e[t + 2]] + i[e[t + 3]] + "-" + i[e[t + 4]] + i[e[t + 5]] + "-" + i[e[t + 6]] + i[e[t + 7]] + "-" + i[e[t + 8]] + i[e[t + 9]] + "-" + i[e[t + 10]] + i[e[t + 11]] + i[e[t + 12]] + i[e[t + 13]] + i[e[t + 14]] + i[e[t + 15]]).toLowerCase();
|
|
51
26
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
function dt() {
|
|
55
|
-
if (!ke) {
|
|
56
|
-
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
57
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
58
|
-
ke = crypto.getRandomValues.bind(crypto);
|
|
59
|
-
}
|
|
60
|
-
return ke(ft);
|
|
27
|
+
function o(e, t, n) {
|
|
28
|
+
return !t && !e && crypto.randomUUID ? crypto.randomUUID() : s(e, t, n);
|
|
61
29
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
30
|
+
function s(e, t, n) {
|
|
31
|
+
e ||= {};
|
|
32
|
+
let i = e.random ?? e.rng?.() ?? r();
|
|
33
|
+
if (i.length < 16) throw Error("Random bytes length must be >= 16");
|
|
34
|
+
if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, t) {
|
|
35
|
+
if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
|
|
36
|
+
for (let e = 0; e < 16; ++e) t[n + e] = i[e];
|
|
37
|
+
return t;
|
|
38
|
+
}
|
|
39
|
+
return a(i);
|
|
69
40
|
}
|
|
70
|
-
function
|
|
71
|
-
|
|
41
|
+
function c(e, t, n, r) {
|
|
42
|
+
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
43
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
44
|
+
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
45
|
+
return i > 3 && a && Object.defineProperty(t, n, a), a;
|
|
72
46
|
}
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
* @see clone
|
|
260
|
-
*/
|
|
261
|
-
toObject() {
|
|
262
|
-
const n = {}, t = this.toObj(n);
|
|
263
|
-
return this.pushDocument(n, this.className, t), {
|
|
264
|
-
...t,
|
|
265
|
-
__rootCollections: n
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
toObj(n) {
|
|
269
|
-
if (!this._persistentProperties) return {};
|
|
270
|
-
this.beforeSerialize();
|
|
271
|
-
const t = {};
|
|
272
|
-
if (!this.className) throw new Error(`You should register \`${this.constructor.name || this.toString() || "this"}\` class prior to streaming it.`);
|
|
273
|
-
return this._persistentProperties.forEach((s) => {
|
|
274
|
-
const a = this[s.name], c = this.removeUnderscore(s);
|
|
275
|
-
a != null && (s.isReference ? t[c] = this.toReferenceObj(s, n) : t[c] = this.toDeepObj(a, n), s.searchableArray && (t[A.searchableArrayNameFor(c)] = a.map((p) => p.id)));
|
|
276
|
-
}), t.__className = this.className, t;
|
|
277
|
-
}
|
|
278
|
-
static searchableArrayNameFor(n) {
|
|
279
|
-
return `__${n}_searchable`;
|
|
280
|
-
}
|
|
281
|
-
fromDeepObject(n) {
|
|
282
|
-
if (n == null) return n;
|
|
283
|
-
if (Array.isArray(n))
|
|
284
|
-
return n.map((t) => this.fromDeepObject(t));
|
|
285
|
-
if (n.__documentReference) {
|
|
286
|
-
const t = n, s = A.createInstance(t);
|
|
287
|
-
return s.__documentReference = n.__documentReference, s;
|
|
288
|
-
}
|
|
289
|
-
if (n.__className)
|
|
290
|
-
return A.createInstance(n);
|
|
291
|
-
if (typeof n == "object") {
|
|
292
|
-
const t = {};
|
|
293
|
-
return Object.entries(n).forEach(
|
|
294
|
-
([s, a]) => t[s] = this.fromDeepObject(a)
|
|
295
|
-
), t;
|
|
296
|
-
}
|
|
297
|
-
return n;
|
|
298
|
-
}
|
|
299
|
-
toDeepObj(n, t) {
|
|
300
|
-
if (n != null) {
|
|
301
|
-
if (Array.isArray(n))
|
|
302
|
-
return n.map((s) => this.toDeepObj(s, t));
|
|
303
|
-
if (n.__documentReference) return n;
|
|
304
|
-
if (n instanceof A)
|
|
305
|
-
return n.toObj(t);
|
|
306
|
-
if (typeof n == "object") {
|
|
307
|
-
const s = {};
|
|
308
|
-
return Object.entries(n).forEach(
|
|
309
|
-
([a, c]) => s[a] = this.toDeepObj(c, t)
|
|
310
|
-
), s;
|
|
311
|
-
}
|
|
312
|
-
return n;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
static collectionPath(n, t, s) {
|
|
316
|
-
let a;
|
|
317
|
-
return typeof t.storeInCollection == "function" ? a = t.storeInCollection(n, t, s) : a = t.storeInCollection ?? n.className, a;
|
|
318
|
-
}
|
|
319
|
-
toReferenceObj(n, t) {
|
|
320
|
-
const s = this[n.name];
|
|
321
|
-
return Array.isArray(s) ? s.map((a) => (n.isPureReference || this.pushDocument(t, A.collectionPath(a, n), a), this.buildRefObject(a, A.collectionPath(a, n), n.cachedProps))) : (n.isPureReference || this.pushDocument(t, A.collectionPath(s, n), s), this.buildRefObject(s, A.collectionPath(s, n), n.cachedProps));
|
|
322
|
-
}
|
|
323
|
-
buildRefObject(n, t, s) {
|
|
324
|
-
const a = s?.reduce((c, p) => (n[p] !== void 0 && (c[p] = n[p]), c), {});
|
|
325
|
-
return {
|
|
326
|
-
id: n.id,
|
|
327
|
-
__className: n.className || n.__className,
|
|
328
|
-
__documentReference: {
|
|
329
|
-
storedInCollection: t
|
|
330
|
-
},
|
|
331
|
-
...a
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
pushDocument(n, t, s) {
|
|
335
|
-
if ("__documentReference" in s && s.__documentReference) return;
|
|
336
|
-
n[t] || (n[t] = []);
|
|
337
|
-
const a = this.toDeepObj(s, n);
|
|
338
|
-
n[t].push(a);
|
|
339
|
-
}
|
|
340
|
-
removeUnderscore(n) {
|
|
341
|
-
return n.name.slice(1);
|
|
342
|
-
}
|
|
343
|
-
static createReference(n) {
|
|
344
|
-
const t = A.createInstance(n);
|
|
345
|
-
return t.__documentReference = n.__documentReference || { storedInCollection: t.className }, t;
|
|
346
|
-
}
|
|
347
|
-
static createInstance(n) {
|
|
348
|
-
if (typeof n == "string")
|
|
349
|
-
return new (A.classFactory(n))();
|
|
350
|
-
try {
|
|
351
|
-
return new (A.classFactory(n.__className))().fromObject(n);
|
|
352
|
-
} catch (t) {
|
|
353
|
-
const s = Object.entries(n).filter(([a, c]) => c != null && typeof c != "function").map(([a, c]) => `${a}: ${c}`).join(`,
|
|
354
|
-
`);
|
|
355
|
-
throw new Error(`${t}
|
|
356
|
-
-----> Class name not found in object:
|
|
357
|
-
{
|
|
358
|
-
${s}
|
|
359
|
-
}
|
|
360
|
-
`);
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
static propInfo(n, t) {
|
|
364
|
-
return A.createInstance(n).getPropInfo(t);
|
|
365
|
-
}
|
|
366
|
-
/**
|
|
367
|
-
* Return the type of a persistent property.
|
|
368
|
-
* Several strategies are used to determine the type:
|
|
369
|
-
* - If the typeName is defined in the property info a decorator, it is used
|
|
370
|
-
* - If the property value is an array, the type of the first element is used
|
|
371
|
-
* - If the property value is a Persistent instance, its class name is used
|
|
372
|
-
* - Otherwise, the typeof operator is used to determine the type
|
|
373
|
-
* @param propInfo the persistent property info to retrieve the type
|
|
374
|
-
* @returns the type of the property or the type of the first element if the property is an array or undefined if cannot be determined
|
|
375
|
-
*/
|
|
376
|
-
static propType(n) {
|
|
377
|
-
if (n.typeName) return Array.isArray(n.typeName) ? "undefined[]" : n.typeName ?? "undefined";
|
|
378
|
-
const t = A.createInstance(n.ownerClassName())[n.name];
|
|
379
|
-
if (Array.isArray(t)) {
|
|
380
|
-
if (t.length === 0) return "undefined[]";
|
|
381
|
-
const s = t[0];
|
|
382
|
-
return s instanceof A ? s.className + "[]" : typeof s + "[]";
|
|
383
|
-
} else
|
|
384
|
-
return t instanceof A ? t.className : typeof t;
|
|
385
|
-
}
|
|
386
|
-
/**
|
|
387
|
-
* Retrieves a collection of references with the properties that are stored in the reference object
|
|
388
|
-
* @returns the references collection
|
|
389
|
-
*/
|
|
390
|
-
static getSystemRegisteredReferencesWithCachedProps() {
|
|
391
|
-
return A.registeredClasses().reduce((n, t) => {
|
|
392
|
-
const s = A.createInstance(t).getPersistentProperties().filter(
|
|
393
|
-
(a) => a.cachedProps
|
|
394
|
-
);
|
|
395
|
-
return s.length > 0 && (n[t] = s), n;
|
|
396
|
-
}, {});
|
|
397
|
-
}
|
|
398
|
-
}, A._factoryMap = {}, A);
|
|
399
|
-
yt([
|
|
400
|
-
he
|
|
401
|
-
], tt.prototype, "_id");
|
|
402
|
-
let rt = tt;
|
|
403
|
-
function he(n, t) {
|
|
404
|
-
return gt()(n, t);
|
|
47
|
+
var l = class e {
|
|
48
|
+
static registerFactory(e, t, n, r = !1) {
|
|
49
|
+
this._factoryMap[e] = {
|
|
50
|
+
factory: t,
|
|
51
|
+
annotation: n,
|
|
52
|
+
isLegacy: r
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
static classFactory(e) {
|
|
56
|
+
if (!e) throw Error("You should provide a class name.");
|
|
57
|
+
if (!this._factoryMap[e]) throw Error(`You should register class ${e} prior to use.`);
|
|
58
|
+
return this._factoryMap[e].factory;
|
|
59
|
+
}
|
|
60
|
+
static registeredClasses() {
|
|
61
|
+
return Object.entries(this._factoryMap).filter(([, e]) => !e.isLegacy).map(([e]) => e);
|
|
62
|
+
}
|
|
63
|
+
static registeredClassesAndLegacyNames() {
|
|
64
|
+
return Object.keys(this._factoryMap);
|
|
65
|
+
}
|
|
66
|
+
static classesExtending(e) {
|
|
67
|
+
return Object.entries(this._factoryMap).filter(([, t]) => new t.factory() instanceof e && !t.isLegacy).map(([e]) => e);
|
|
68
|
+
}
|
|
69
|
+
static isInstanceOf(t, n) {
|
|
70
|
+
let r = e.classFactory(n);
|
|
71
|
+
return t instanceof e ? t instanceof r : e.createInstance(t) instanceof r;
|
|
72
|
+
}
|
|
73
|
+
static annotations(t) {
|
|
74
|
+
if (t instanceof e ? t = t.className : typeof t == "string" || (t = new t().className), !this._factoryMap[t]) throw Error(`You should register class ${t} prior to use.`);
|
|
75
|
+
return this._factoryMap[t].annotation;
|
|
76
|
+
}
|
|
77
|
+
constructor(e = o()) {
|
|
78
|
+
this._id = e;
|
|
79
|
+
}
|
|
80
|
+
get className() {
|
|
81
|
+
return this.__className;
|
|
82
|
+
}
|
|
83
|
+
setId(e) {
|
|
84
|
+
this._id = e;
|
|
85
|
+
}
|
|
86
|
+
get id() {
|
|
87
|
+
return this._id;
|
|
88
|
+
}
|
|
89
|
+
afterDeserialize() {}
|
|
90
|
+
beforeSerialize() {}
|
|
91
|
+
getPersistentProperties() {
|
|
92
|
+
return this._persistentProperties ? this._persistentProperties.map((e) => ({
|
|
93
|
+
...e,
|
|
94
|
+
name: e.name.slice(1)
|
|
95
|
+
})) : [];
|
|
96
|
+
}
|
|
97
|
+
getPropInfo(e) {
|
|
98
|
+
let t = this.getPersistentProperties().find((t) => t.name === e);
|
|
99
|
+
if (!t) throw Error(`Property "${e}" has not been registered.`);
|
|
100
|
+
return t;
|
|
101
|
+
}
|
|
102
|
+
isRequired(e) {
|
|
103
|
+
return this.getPropInfo(e).validator != null;
|
|
104
|
+
}
|
|
105
|
+
isPropValueValid(e) {
|
|
106
|
+
let t = this.getPropInfo(e);
|
|
107
|
+
return t.validator ? t.validator(this[t.name], t, this) : !0;
|
|
108
|
+
}
|
|
109
|
+
clone(e) {
|
|
110
|
+
let t = e.toObject();
|
|
111
|
+
return delete t.id, this.fromObject(t);
|
|
112
|
+
}
|
|
113
|
+
fromObject(e) {
|
|
114
|
+
return this.fromObj(e), this.afterDeserialize(), this;
|
|
115
|
+
}
|
|
116
|
+
fromObj(e) {
|
|
117
|
+
return this._persistentProperties && this._persistentProperties.forEach((t) => {
|
|
118
|
+
let n = e[this.removeUnderscore(t)];
|
|
119
|
+
n != null && (this[t.name] = this.fromDeepObject(n));
|
|
120
|
+
}), this;
|
|
121
|
+
}
|
|
122
|
+
toObject() {
|
|
123
|
+
let e = {}, t = this.toObj(e);
|
|
124
|
+
return this.pushDocument(e, this.className, t), {
|
|
125
|
+
...t,
|
|
126
|
+
__rootCollections: e
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
toObj(t) {
|
|
130
|
+
if (!this._persistentProperties) return {};
|
|
131
|
+
this.beforeSerialize();
|
|
132
|
+
let n = {};
|
|
133
|
+
if (!this.className) throw Error(`You should register \`${this.constructor.name || this.toString() || "this"}\` class prior to streaming it.`);
|
|
134
|
+
return this._persistentProperties.forEach((r) => {
|
|
135
|
+
let i = this[r.name], a = this.removeUnderscore(r);
|
|
136
|
+
i != null && (r.isReference ? n[a] = this.toReferenceObj(r, t) : n[a] = this.toDeepObj(i, t), r.searchableArray && (n[e.searchableArrayNameFor(a)] = i.map((e) => e.id)));
|
|
137
|
+
}), n.__className = this.className, n;
|
|
138
|
+
}
|
|
139
|
+
static searchableArrayNameFor(e) {
|
|
140
|
+
return `__${e}_searchable`;
|
|
141
|
+
}
|
|
142
|
+
fromDeepObject(t) {
|
|
143
|
+
if (t == null) return t;
|
|
144
|
+
if (Array.isArray(t)) return t.map((e) => this.fromDeepObject(e));
|
|
145
|
+
if (t.__documentReference) {
|
|
146
|
+
let n = t, r = e.createInstance(n);
|
|
147
|
+
return r.__documentReference = t.__documentReference, r;
|
|
148
|
+
}
|
|
149
|
+
if (t.__className) return e.createInstance(t);
|
|
150
|
+
if (typeof t == "object") {
|
|
151
|
+
let e = {};
|
|
152
|
+
return Object.entries(t).forEach(([t, n]) => e[t] = this.fromDeepObject(n)), e;
|
|
153
|
+
}
|
|
154
|
+
return t;
|
|
155
|
+
}
|
|
156
|
+
toDeepObj(t, n) {
|
|
157
|
+
if (t != null) {
|
|
158
|
+
if (Array.isArray(t)) return t.map((e) => this.toDeepObj(e, n));
|
|
159
|
+
if (t.__documentReference) return t;
|
|
160
|
+
if (t instanceof e) return t.toObj(n);
|
|
161
|
+
if (typeof t == "object") {
|
|
162
|
+
let e = {};
|
|
163
|
+
return Object.entries(t).forEach(([t, r]) => e[t] = this.toDeepObj(r, n)), e;
|
|
164
|
+
}
|
|
165
|
+
return t;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
static collectionPath(e, t, n) {
|
|
169
|
+
let r;
|
|
170
|
+
return r = typeof t.storeInCollection == "function" ? t.storeInCollection(e, t, n) : t.storeInCollection ?? e.className, r;
|
|
171
|
+
}
|
|
172
|
+
toReferenceObj(t, n) {
|
|
173
|
+
let r = this[t.name];
|
|
174
|
+
return Array.isArray(r) ? r.map((r) => (t.isPureReference || this.pushDocument(n, e.collectionPath(r, t), r), this.buildRefObject(r, e.collectionPath(r, t), t.cachedProps))) : (t.isPureReference || this.pushDocument(n, e.collectionPath(r, t), r), this.buildRefObject(r, e.collectionPath(r, t), t.cachedProps));
|
|
175
|
+
}
|
|
176
|
+
buildRefObject(e, t, n) {
|
|
177
|
+
let r = n?.reduce((t, n) => (e[n] !== void 0 && (t[n] = e[n]), t), {});
|
|
178
|
+
return {
|
|
179
|
+
id: e.id,
|
|
180
|
+
__className: e.className || e.__className,
|
|
181
|
+
__documentReference: { storedInCollection: t },
|
|
182
|
+
...r
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
pushDocument(e, t, n) {
|
|
186
|
+
if ("__documentReference" in n && n.__documentReference) return;
|
|
187
|
+
e[t] || (e[t] = []);
|
|
188
|
+
let r = this.toDeepObj(n, e);
|
|
189
|
+
e[t].push(r);
|
|
190
|
+
}
|
|
191
|
+
removeUnderscore(e) {
|
|
192
|
+
return e.name.slice(1);
|
|
193
|
+
}
|
|
194
|
+
static createReference(t) {
|
|
195
|
+
let n = e.createInstance(t);
|
|
196
|
+
return n.__documentReference = t.__documentReference || { storedInCollection: n.className }, n;
|
|
197
|
+
}
|
|
198
|
+
static createInstance(t) {
|
|
199
|
+
if (typeof t == "string") return new (e.classFactory(t))();
|
|
200
|
+
try {
|
|
201
|
+
return new (e.classFactory(t.__className))().fromObject(t);
|
|
202
|
+
} catch (e) {
|
|
203
|
+
let n = Object.entries(t).filter(([e, t]) => t != null && typeof t != "function").map(([e, t]) => `${e}: ${t}`).join(",\n ");
|
|
204
|
+
throw Error(`${e}\n-----> Class name not found in object:\n{\n\t ${n} \n}\n`);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
static propInfo(t, n) {
|
|
208
|
+
return e.createInstance(t).getPropInfo(n);
|
|
209
|
+
}
|
|
210
|
+
static propType(t) {
|
|
211
|
+
if (t.typeName) return Array.isArray(t.typeName) ? "undefined[]" : t.typeName ?? "undefined";
|
|
212
|
+
let n = e.createInstance(t.ownerClassName())[t.name];
|
|
213
|
+
if (Array.isArray(n)) {
|
|
214
|
+
if (n.length === 0) return "undefined[]";
|
|
215
|
+
let t = n[0];
|
|
216
|
+
return t instanceof e ? t.className + "[]" : typeof t + "[]";
|
|
217
|
+
} else if (n instanceof e) return n.className;
|
|
218
|
+
else return typeof n;
|
|
219
|
+
}
|
|
220
|
+
static getSystemRegisteredReferencesWithCachedProps() {
|
|
221
|
+
return e.registeredClasses().reduce((t, n) => {
|
|
222
|
+
let r = e.createInstance(n).getPersistentProperties().filter((e) => e.cachedProps);
|
|
223
|
+
return r.length > 0 && (t[n] = r), t;
|
|
224
|
+
}, {});
|
|
225
|
+
}
|
|
226
|
+
static {
|
|
227
|
+
this._factoryMap = {};
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
c([u], l.prototype, "_id", void 0);
|
|
231
|
+
function u(e, t) {
|
|
232
|
+
return d()(e, t);
|
|
405
233
|
}
|
|
406
|
-
function
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
234
|
+
function d(e) {
|
|
235
|
+
return function(t, n) {
|
|
236
|
+
Object.getOwnPropertyDescriptor(t, "_persistentProperties") || (t._persistentProperties ? t._persistentProperties = [...t._persistentProperties] : t._persistentProperties = []);
|
|
237
|
+
let r = t._persistentProperties.find((e) => e.name === n);
|
|
238
|
+
r ? Object.assign(r, e) : t._persistentProperties.push({
|
|
239
|
+
name: n,
|
|
240
|
+
ownerClassName: () => t.className,
|
|
241
|
+
...e
|
|
242
|
+
});
|
|
243
|
+
};
|
|
416
244
|
}
|
|
417
|
-
function
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
245
|
+
function f(e, t) {
|
|
246
|
+
return (n) => {
|
|
247
|
+
l.registerFactory(e, n, t), n.prototype.__className = e;
|
|
248
|
+
};
|
|
421
249
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
250
|
+
var p = class e {
|
|
251
|
+
static {
|
|
252
|
+
this.error = {
|
|
253
|
+
persistentNeedForSubCollection: "The document parameter for a sub-collection should be a Persistent instace",
|
|
254
|
+
invalidQueryOrder: "Cannot add where calls after or calls"
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
constructor(t, n, r) {
|
|
258
|
+
if (r) {
|
|
259
|
+
if (!(n instanceof l)) throw Error(e.error.persistentNeedForSubCollection);
|
|
260
|
+
this.collectionName = `${n.className}/${n.id}/${r}`;
|
|
261
|
+
} else this.collectionName = n instanceof l ? n.className : n;
|
|
262
|
+
this._stream = t;
|
|
263
|
+
}
|
|
264
|
+
findById(e, t) {
|
|
265
|
+
return new Promise((n, r) => {
|
|
266
|
+
this._stream.findById(e, this.collectionName).then((e) => {
|
|
267
|
+
e ? (t ? t.fromObject(e) : t = l.createInstance(e), n(t)) : n(void 0);
|
|
268
|
+
}).catch((e) => r(e));
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
save(e) {
|
|
272
|
+
let t = e.toObject();
|
|
273
|
+
return this.collectionName !== t.__className && (t.__rootCollections[this.collectionName] = t.__rootCollections[t.__className], delete t.__rootCollections[t.__className]), new Promise((e, n) => {
|
|
274
|
+
this._stream.save(t.__rootCollections).then(() => e()).catch((e) => n(e));
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
delete(e) {
|
|
278
|
+
return new Promise((t, n) => {
|
|
279
|
+
this._stream.delete(e, this.collectionName).then(() => t()).catch((e) => n(e));
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
find() {
|
|
283
|
+
return new m(this);
|
|
284
|
+
}
|
|
285
|
+
query(e = {}, t) {
|
|
286
|
+
if (t) {
|
|
287
|
+
let n = t instanceof l ? t.className : t;
|
|
288
|
+
e.operations ||= [], e.operations.push({
|
|
289
|
+
property: "__className",
|
|
290
|
+
operator: "==",
|
|
291
|
+
value: n
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
return this.mapToInstance(() => this._stream.find(this.preprocessQueryObject(e), this.collectionName));
|
|
295
|
+
}
|
|
296
|
+
count(e) {
|
|
297
|
+
return this._stream.count(e, this.collectionName);
|
|
298
|
+
}
|
|
299
|
+
next(e) {
|
|
300
|
+
return this.mapToInstance(() => this._stream.next(e));
|
|
301
|
+
}
|
|
302
|
+
onDocumentChange(e, t) {
|
|
303
|
+
return this._stream.onDocumentChange(this.collectionName, e, (e) => t(_.toPersistentDocumentChange(e)));
|
|
304
|
+
}
|
|
305
|
+
onCollectionChange(e, t) {
|
|
306
|
+
return this._stream.onCollectionChange(this.preprocessQueryObject(e.getQueryObject()), this.collectionName, (e) => t(e.map((e) => _.toPersistentDocumentChange(e))));
|
|
307
|
+
}
|
|
308
|
+
onCollectionTemplateChange(e, t) {
|
|
309
|
+
return this._stream.onDocumentTemplateChange(e, (e) => t(_.toPersistentDocumentChange(e)));
|
|
310
|
+
}
|
|
311
|
+
mapToInstance(e) {
|
|
312
|
+
return new Promise((t, n) => {
|
|
313
|
+
e().then((e) => t(e.map((e) => l.createInstance(e)))).catch((e) => n(e));
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
preprocessQueryObject(e) {
|
|
317
|
+
if (Object.values(e).length === 0) return e;
|
|
318
|
+
let t = e.operations?.map((e) => {
|
|
319
|
+
let t = e.value[0] ?? e.value;
|
|
320
|
+
return _.isArrayOperator(e.operator) && t instanceof l ? {
|
|
321
|
+
property: l.searchableArrayNameFor(e.property),
|
|
322
|
+
operator: e.operator,
|
|
323
|
+
value: Array.isArray(e.value) ? e.value.map((e) => e.id) : t.id,
|
|
324
|
+
aggregate: e.aggregate
|
|
325
|
+
} : {
|
|
326
|
+
property: e.property,
|
|
327
|
+
operator: e.operator,
|
|
328
|
+
value: e.value instanceof l ? { id: e.value.id } : e.value,
|
|
329
|
+
aggregate: e.aggregate
|
|
330
|
+
};
|
|
331
|
+
}) ?? [];
|
|
332
|
+
return {
|
|
333
|
+
...e,
|
|
334
|
+
operations: t
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
}, m = class {
|
|
338
|
+
constructor(e) {
|
|
339
|
+
this.queryObject = { operations: [] }, this.model = e;
|
|
340
|
+
}
|
|
341
|
+
where(e, t, n, r) {
|
|
342
|
+
if (this.queryObject.operations?.at(-1)?.aggregate && !r) throw Error(p.error.invalidQueryOrder);
|
|
343
|
+
return this.queryObject.operations?.push({
|
|
344
|
+
property: e,
|
|
345
|
+
operator: t,
|
|
346
|
+
value: n,
|
|
347
|
+
aggregate: r
|
|
348
|
+
}), this;
|
|
349
|
+
}
|
|
350
|
+
whereDeepProp(e, t, n, r) {
|
|
351
|
+
if (this.queryObject.operations?.at(-1)?.aggregate && !r) throw Error(p.error.invalidQueryOrder);
|
|
352
|
+
let i = e.split("."), a = {}, o = i.length > 1 ? a : n;
|
|
353
|
+
return i.slice(1).forEach((e, t) => {
|
|
354
|
+
a[e] = t < i.length - 2 ? {} : n, a = a[e];
|
|
355
|
+
}), this.queryObject.operations?.push({
|
|
356
|
+
property: i[0],
|
|
357
|
+
operator: t,
|
|
358
|
+
value: o,
|
|
359
|
+
aggregate: r
|
|
360
|
+
}), this;
|
|
361
|
+
}
|
|
362
|
+
and(e, t, n) {
|
|
363
|
+
return this.where(e, t, n);
|
|
364
|
+
}
|
|
365
|
+
andDeepProp(e, t, n) {
|
|
366
|
+
return this.whereDeepProp(e, t, n);
|
|
367
|
+
}
|
|
368
|
+
or(e, t, n) {
|
|
369
|
+
return this.where(e, t, n, !0);
|
|
370
|
+
}
|
|
371
|
+
orDeepProp(e, t, n) {
|
|
372
|
+
return this.whereDeepProp(e, t, n, !0);
|
|
373
|
+
}
|
|
374
|
+
instanceOf(e) {
|
|
375
|
+
let t = e instanceof l ? e.className : e;
|
|
376
|
+
return this.queryObject.operations?.push({
|
|
377
|
+
property: "__className",
|
|
378
|
+
operator: "==",
|
|
379
|
+
value: t
|
|
380
|
+
}), this;
|
|
381
|
+
}
|
|
382
|
+
get(e) {
|
|
383
|
+
return e && (this.queryObject.limit = e), this.model.query(this.queryObject);
|
|
384
|
+
}
|
|
385
|
+
limit(e) {
|
|
386
|
+
return this.queryObject.limit = e, this;
|
|
387
|
+
}
|
|
388
|
+
orderBy(e, t = "asc") {
|
|
389
|
+
return this.queryObject.sort = {
|
|
390
|
+
propertyName: e,
|
|
391
|
+
order: t
|
|
392
|
+
}, this;
|
|
393
|
+
}
|
|
394
|
+
orderByDeepProp(e, t = "asc") {
|
|
395
|
+
return this.queryObject.sort = {
|
|
396
|
+
propertyName: e,
|
|
397
|
+
order: t
|
|
398
|
+
}, this;
|
|
399
|
+
}
|
|
400
|
+
count() {
|
|
401
|
+
return this.model.count(this.queryObject);
|
|
402
|
+
}
|
|
403
|
+
getQueryObject() {
|
|
404
|
+
return this.queryObject;
|
|
405
|
+
}
|
|
406
|
+
getQueryModel() {
|
|
407
|
+
return this.model;
|
|
408
|
+
}
|
|
409
|
+
}, h = class e {
|
|
410
|
+
constructor() {}
|
|
411
|
+
static {
|
|
412
|
+
this.error = { shouldBeRegistered: "You should register a data source before using the data Store." };
|
|
413
|
+
}
|
|
414
|
+
static useDataSource(e) {
|
|
415
|
+
this._dataSource = e;
|
|
416
|
+
}
|
|
417
|
+
static get dataSource() {
|
|
418
|
+
return e._dataSource;
|
|
419
|
+
}
|
|
420
|
+
static getModel(t) {
|
|
421
|
+
if (!e._dataSource) throw Error(this.error.shouldBeRegistered);
|
|
422
|
+
return new p(e._dataSource, t);
|
|
423
|
+
}
|
|
424
|
+
static getModelForSubCollection(t, n) {
|
|
425
|
+
if (!e._dataSource) throw Error(this.error.shouldBeRegistered);
|
|
426
|
+
return new p(e._dataSource, t, n);
|
|
427
|
+
}
|
|
428
|
+
static async populate(e) {
|
|
429
|
+
if (!e) return;
|
|
430
|
+
let t = async (e) => {
|
|
431
|
+
let t = e;
|
|
432
|
+
if (!t.__documentReference) return e;
|
|
433
|
+
let n = await this.getModel(t.__documentReference.storedInCollection).findById(t.id, e);
|
|
434
|
+
return n && (n.__documentReference = void 0), n;
|
|
435
|
+
};
|
|
436
|
+
return Array.isArray(e) ? (await Promise.all(e.map((e) => t(e)))).filter((e) => e) : t(e);
|
|
437
|
+
}
|
|
438
|
+
static isPopulated(e) {
|
|
439
|
+
return Array.isArray(e) ? e.reduce((e, t) => e && t.__documentReference === void 0, !0) : e.__documentReference === void 0;
|
|
440
|
+
}
|
|
441
|
+
}, g = class e {
|
|
442
|
+
constructor(e) {
|
|
443
|
+
this._resolveCollectionPaths = () => {
|
|
444
|
+
throw Error("The method collectionsMatchingTemplate has not been implemented in the concrete data source");
|
|
445
|
+
}, this._disabledChangeListeners = /* @__PURE__ */ new Set(), this._collectionsToWatch = {}, e && (this._beforeUpdateDocument = e.beforeUpdateDocument, this._afterUpdateDocument = e.afterUpdateDocument, this._afterDocumentChange = e.afterDocumentChange, this._beforeDocumentChange = e.beforeDocumentChange, this._beforeQueryOwnerCollection = e.beforeQueryOwnerCollection), this.installUpdaters();
|
|
446
|
+
}
|
|
447
|
+
installUpdaters() {
|
|
448
|
+
let e = l.getSystemRegisteredReferencesWithCachedProps();
|
|
449
|
+
this._collectionsToWatch = {}, Object.entries(e).forEach(([e, t]) => {
|
|
450
|
+
t.forEach((t) => {
|
|
451
|
+
t.typeName && (Array.isArray(t.typeName) ? t.typeName : [t?.typeName ?? e]).map((e) => l.collectionPath(l.createInstance(e), t)).forEach((e) => {
|
|
452
|
+
this._collectionsToWatch[e] || (this._collectionsToWatch[e] = []), this._collectionsToWatch[e].find((e) => e.name === t.name && e.ownerClassName() === t.ownerClassName()) || this._collectionsToWatch[e].push(t);
|
|
453
|
+
});
|
|
454
|
+
});
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
set beforeDocumentChange(e) {
|
|
458
|
+
this._beforeDocumentChange = e;
|
|
459
|
+
}
|
|
460
|
+
set afterDocumentChange(e) {
|
|
461
|
+
this._afterDocumentChange = e;
|
|
462
|
+
}
|
|
463
|
+
set beforeUpdateDocument(e) {
|
|
464
|
+
this._beforeUpdateDocument = e;
|
|
465
|
+
}
|
|
466
|
+
set afterUpdateDocument(e) {
|
|
467
|
+
this._afterUpdateDocument = e;
|
|
468
|
+
}
|
|
469
|
+
set beforeQueryOwnerCollection(e) {
|
|
470
|
+
this._beforeQueryOwnerCollection = e;
|
|
471
|
+
}
|
|
472
|
+
set resolveCollectionPaths(e) {
|
|
473
|
+
this._resolveCollectionPaths = e;
|
|
474
|
+
}
|
|
475
|
+
get collectionsToWatch() {
|
|
476
|
+
return this._collectionsToWatch;
|
|
477
|
+
}
|
|
478
|
+
updateProps(e, t) {
|
|
479
|
+
let n = this._collectionsToWatch[e];
|
|
480
|
+
return n ? this.onDocumentChange(t, n) : Promise.resolve();
|
|
481
|
+
}
|
|
482
|
+
async onDocumentChange(t, n) {
|
|
483
|
+
let r = _.toPersistentDocumentChange(t);
|
|
484
|
+
this._beforeDocumentChange?.(r, n);
|
|
485
|
+
let i = {};
|
|
486
|
+
t.type !== "update" || !r.before || r.after?.id && this._disabledChangeListeners.has(r.after?.id) || (await Promise.all(n.map(async (t) => {
|
|
487
|
+
let n = e.ownerCollectionPath(l.createInstance(t.ownerClassName()), t, r.params), a = await this._resolveCollectionPaths(n);
|
|
488
|
+
await Promise.all(a.map(async (e) => {
|
|
489
|
+
let n = h.getModel(e), a = n.find(), o = !1;
|
|
490
|
+
t.cachedProps?.forEach((e) => {
|
|
491
|
+
r.before[e] !== r.after[e] && (o = !0);
|
|
492
|
+
}), o && (a = t.searchableArray ? a.where(t.name, "contains", r.before) : a.where(t.name, "==", r.before)), a = this._beforeQueryOwnerCollection?.(a) ?? a;
|
|
493
|
+
let s = await a.get();
|
|
494
|
+
return i[e] = {
|
|
495
|
+
totalDocumentsToUpdate: s.length,
|
|
496
|
+
updatedDocuments: [],
|
|
497
|
+
documentsToUpdate: s.map((e) => e.name ?? e.id)
|
|
498
|
+
}, Promise.all([s.map(async (a) => {
|
|
499
|
+
let o = !1;
|
|
500
|
+
if (t.cachedProps?.forEach((e) => {
|
|
501
|
+
r.before[e] !== r.after[e] && (o = !0);
|
|
502
|
+
}), o) {
|
|
503
|
+
if (t.searchableArray) {
|
|
504
|
+
let e = a[t.name].findIndex((e) => e.id === r.before.id);
|
|
505
|
+
a[t.name][e] = r.after;
|
|
506
|
+
} else a[`_${t.name}`] = r.after;
|
|
507
|
+
this._beforeUpdateDocument?.(a, t, r.after), this.disableChangeListener(a), await n.save(a), this.enableChangeListener(a), i[e]?.updatedDocuments.push(a.id), this._afterUpdateDocument?.(a, t, r.after);
|
|
508
|
+
} else return Promise.resolve();
|
|
509
|
+
})]);
|
|
510
|
+
}));
|
|
511
|
+
})), this._afterDocumentChange?.(i, n));
|
|
512
|
+
}
|
|
513
|
+
disableChangeListener(e) {
|
|
514
|
+
this._disabledChangeListeners.add(e.id);
|
|
515
|
+
}
|
|
516
|
+
enableChangeListener(e) {
|
|
517
|
+
this._disabledChangeListeners.delete(e.id);
|
|
518
|
+
}
|
|
519
|
+
static ownerCollectionPath(e, t, n) {
|
|
520
|
+
let r;
|
|
521
|
+
return r = typeof t.ownerCollection == "function" ? t.ownerCollection(e, t, n) : t.ownerCollection ?? e.className, r;
|
|
522
|
+
}
|
|
523
|
+
}, _ = class e {
|
|
524
|
+
constructor() {
|
|
525
|
+
this._cachedPropsUpdater = void 0;
|
|
526
|
+
}
|
|
527
|
+
installCachedPropsUpdater(e) {
|
|
528
|
+
return this._cachedPropsUpdater = new g(e), this._cachedPropsUpdater.resolveCollectionPaths = this.resolveCollectionPaths.bind(this), this._cachedPropsUpdater;
|
|
529
|
+
}
|
|
530
|
+
get cachedPropsUpdater() {
|
|
531
|
+
return this._cachedPropsUpdater;
|
|
532
|
+
}
|
|
533
|
+
static toPropertyPathOperations(t) {
|
|
534
|
+
return t ? t.map((t) => {
|
|
535
|
+
if (e.isArrayOperator(t.operator) && t.value[0] instanceof l) return {
|
|
536
|
+
property: l.searchableArrayNameFor(t.property),
|
|
537
|
+
operator: t.operator,
|
|
538
|
+
value: t.value.map((e) => e.id),
|
|
539
|
+
aggregate: t.aggregate
|
|
540
|
+
};
|
|
541
|
+
let [n, r] = this.toPropertyPathValue(t.value);
|
|
542
|
+
return {
|
|
543
|
+
property: `${String(t.property)}${n ? "." + n : ""}`,
|
|
544
|
+
operator: t.operator,
|
|
545
|
+
value: r,
|
|
546
|
+
aggregate: t.aggregate
|
|
547
|
+
};
|
|
548
|
+
}) : [];
|
|
549
|
+
}
|
|
550
|
+
static isArrayOperator(e) {
|
|
551
|
+
return e === "containsAny" || e === "contains";
|
|
552
|
+
}
|
|
553
|
+
static toPersistentDocumentChange(e) {
|
|
554
|
+
return {
|
|
555
|
+
...e,
|
|
556
|
+
before: e.before && l.createInstance(e.before),
|
|
557
|
+
after: e.after && l.createInstance(e.after)
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
static toPropertyPathValue(e) {
|
|
561
|
+
if (typeof e == "object" && !Array.isArray(e)) {
|
|
562
|
+
let t = Object.keys(e)[0], [n, r] = this.toPropertyPathValue(e[t]);
|
|
563
|
+
return [`${t}${n ? "." + n : ""}`, r];
|
|
564
|
+
} else return [void 0, e];
|
|
565
|
+
}
|
|
566
|
+
static isStringMatchingTemplate(e, t) {
|
|
567
|
+
let n = e.split("/"), r = t.split("/");
|
|
568
|
+
if (r.length > n.length) return !1;
|
|
569
|
+
for (let e = 0; e < r.length; e++) {
|
|
570
|
+
let t = n[e], i = r[e];
|
|
571
|
+
if (!(t.startsWith("{") && t.endsWith("}") || t.startsWith("${") && t.endsWith("}")) && t !== i) return !1;
|
|
572
|
+
}
|
|
573
|
+
for (let e = r.length; e < n.length; e++) {
|
|
574
|
+
let t = n[e];
|
|
575
|
+
if (!(t.startsWith("{") && t.endsWith("}") || t.startsWith("${") && t.endsWith("}"))) return !1;
|
|
576
|
+
}
|
|
577
|
+
return !0;
|
|
578
|
+
}
|
|
579
|
+
static extractTemplateParams(e, t) {
|
|
580
|
+
let n = t.split("/"), r = e.split("/"), i = {};
|
|
581
|
+
if (r.length > n.length) return i;
|
|
582
|
+
for (let e = 0; e < r.length; e++) {
|
|
583
|
+
let t = n[e], a = r[e];
|
|
584
|
+
if (t.startsWith("{") && t.endsWith("}")) i[t.slice(1, -1)] = a;
|
|
585
|
+
else if (t.startsWith("${") && t.endsWith("}")) i[t.slice(2, -1)] = a;
|
|
586
|
+
else if (t !== a) return {};
|
|
587
|
+
}
|
|
588
|
+
for (let e = r.length; e < n.length; e++) {
|
|
589
|
+
let t = n[e];
|
|
590
|
+
if (!(t.startsWith("{") && t.endsWith("}") || t.startsWith("${") && t.endsWith("}"))) return {};
|
|
591
|
+
}
|
|
592
|
+
return i;
|
|
593
|
+
}
|
|
594
|
+
}, v = class e {
|
|
595
|
+
static registerCloudStorage(t, n) {
|
|
596
|
+
e._cloudStorageFactoryMap[t] = n;
|
|
597
|
+
}
|
|
598
|
+
static createInstance(t) {
|
|
599
|
+
let n = e._cloudStorageFactoryMap[t];
|
|
600
|
+
if (!n) throw Error(`You should register the ${t} cloud storage provider prior to use it`);
|
|
601
|
+
return n();
|
|
602
|
+
}
|
|
603
|
+
get className() {
|
|
604
|
+
return this.__className;
|
|
605
|
+
}
|
|
606
|
+
static useCloudStorage(t) {
|
|
607
|
+
e._defaultCloudStorage = t;
|
|
608
|
+
}
|
|
609
|
+
static get defaultCloudStorage() {
|
|
610
|
+
if (!e._defaultCloudStorage) throw Error("You should define a default cloud storage provider prior to use it");
|
|
611
|
+
return e._defaultCloudStorage;
|
|
612
|
+
}
|
|
613
|
+
static {
|
|
614
|
+
this._cloudStorageFactoryMap = {};
|
|
615
|
+
}
|
|
443
616
|
};
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
s.prototype.__className = n;
|
|
449
|
-
};
|
|
617
|
+
function y(e, t) {
|
|
618
|
+
return v.registerCloudStorage(e, t), (t) => {
|
|
619
|
+
t.prototype.__className = e;
|
|
620
|
+
};
|
|
450
621
|
}
|
|
451
|
-
var
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
622
|
+
var b = class extends v {
|
|
623
|
+
constructor(e = "") {
|
|
624
|
+
super(), this._simulateDelay = 0, this._pendingPromises = [], this.mockFileSystem = {}, this._pathToMockFiles = e;
|
|
625
|
+
}
|
|
626
|
+
simulateDelay(e) {
|
|
627
|
+
return this._simulateDelay = e, this;
|
|
628
|
+
}
|
|
629
|
+
resolveWithDelay(e) {
|
|
630
|
+
if (this._simulateDelay <= 0) return Promise.resolve(e);
|
|
631
|
+
let t = new Promise((t) => {
|
|
632
|
+
setTimeout(() => t(e), this._simulateDelay);
|
|
633
|
+
});
|
|
634
|
+
return this._pendingPromises.push(t), t.finally(() => this._pendingPromises = this._pendingPromises.filter((e) => e === t)), t;
|
|
635
|
+
}
|
|
636
|
+
save(e, t) {
|
|
637
|
+
let n = e;
|
|
638
|
+
this._onProgress && this._onProgress(0, 100), this.mockFileSystem[e] = JSON.stringify(t), this._onProgress && this._onProgress(100, 100);
|
|
639
|
+
let r = t instanceof File ? t.name : n;
|
|
640
|
+
return this.resolveWithDelay(r);
|
|
641
|
+
}
|
|
642
|
+
uploadControl() {
|
|
643
|
+
return {
|
|
644
|
+
resume: () => {},
|
|
645
|
+
pause: () => {},
|
|
646
|
+
cancel: () => {},
|
|
647
|
+
onProgress: (e) => this._onProgress = e
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
getUrl(e) {
|
|
651
|
+
return Promise.resolve(this._pathToMockFiles + e);
|
|
652
|
+
}
|
|
653
|
+
delete(e) {
|
|
654
|
+
return delete this.mockFileSystem[e], this.resolveWithDelay();
|
|
655
|
+
}
|
|
455
656
|
};
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
657
|
+
b = c([y("MockCloudStorage", () => new b())], b);
|
|
658
|
+
var x = class extends l {
|
|
659
|
+
constructor(...e) {
|
|
660
|
+
super(...e), this._onChange = new t();
|
|
661
|
+
}
|
|
662
|
+
async save({ data: e, fileName: t, progress: n, cloudStorageProvider: r } = {}) {
|
|
663
|
+
let i = e || this._pendingData;
|
|
664
|
+
i && (this._reference && await this.delete(), this.provider = r || v.defaultCloudStorage, this._originalFileName = t || (i instanceof File ? i.name : void 0), this._reference = await this.provider.save(this.id, i, n), this._url = await this.provider.getUrl(this._reference), this._pendingData = void 0, this._onChange.notify({
|
|
665
|
+
event: 0,
|
|
666
|
+
storedFile: this
|
|
667
|
+
}));
|
|
668
|
+
}
|
|
669
|
+
uploadControl() {
|
|
670
|
+
return this.provider.uploadControl();
|
|
671
|
+
}
|
|
672
|
+
async delete() {
|
|
673
|
+
if (!this._reference) throw Error("Cannot delete a not stored file");
|
|
674
|
+
await this.provider.delete(this._reference), this._reference = void 0, this._url = void 0, this._onChange.notify({
|
|
675
|
+
event: 2,
|
|
676
|
+
storedFile: this
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
set provider(e) {
|
|
680
|
+
this._provider = e, this._cloudStorageProviderName = e.className;
|
|
681
|
+
}
|
|
682
|
+
get provider() {
|
|
683
|
+
if (!this._provider) try {
|
|
684
|
+
this._provider = v.createInstance(this._cloudStorageProviderName);
|
|
685
|
+
} catch {
|
|
686
|
+
this._provider = v.defaultCloudStorage;
|
|
687
|
+
}
|
|
688
|
+
return this._provider;
|
|
689
|
+
}
|
|
690
|
+
get url() {
|
|
691
|
+
return this._url;
|
|
692
|
+
}
|
|
693
|
+
get mimeType() {
|
|
694
|
+
return this._mimeType;
|
|
695
|
+
}
|
|
696
|
+
setDataToStore(e) {
|
|
697
|
+
return this._pendingData = e, this._originalFileName = e instanceof File ? e.name : void 0, this._mimeType = e instanceof Blob ? e.type : void 0, this._onChange.notify({
|
|
698
|
+
event: 1,
|
|
699
|
+
pendingData: e,
|
|
700
|
+
storedFile: this
|
|
701
|
+
}), this;
|
|
702
|
+
}
|
|
703
|
+
get originalFileName() {
|
|
704
|
+
return this._originalFileName;
|
|
705
|
+
}
|
|
706
|
+
onChange(e) {
|
|
707
|
+
return this._onChange.subscribe(e);
|
|
708
|
+
}
|
|
503
709
|
};
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
710
|
+
c([u], x.prototype, "_reference", void 0), c([u], x.prototype, "_url", void 0), c([u], x.prototype, "_cloudStorageProviderName", void 0), c([u], x.prototype, "_originalFileName", void 0), c([u], x.prototype, "_mimeType", void 0), x = c([f("StoredFile")], x);
|
|
711
|
+
var S = class {};
|
|
712
|
+
(class e extends S {
|
|
713
|
+
static {
|
|
714
|
+
this.error = { shouldBeRegistered: "You should register an auth service before using Auth." };
|
|
715
|
+
}
|
|
716
|
+
constructor() {
|
|
717
|
+
if (super(), this._onAuthStateChange = new t(), !e._authService) throw Error(e.error.shouldBeRegistered);
|
|
718
|
+
e._authService.onAuthStateChange((e) => this.authStateChanged(e));
|
|
719
|
+
}
|
|
720
|
+
static useAuthService(t) {
|
|
721
|
+
e._authService != t && (e._authService = t, this._instance = void 0);
|
|
722
|
+
}
|
|
723
|
+
static get instance() {
|
|
724
|
+
return this._instance ||= new this();
|
|
725
|
+
}
|
|
726
|
+
signUp(t) {
|
|
727
|
+
return e._authService.signUp(t);
|
|
728
|
+
}
|
|
729
|
+
login(t) {
|
|
730
|
+
return e._authService.login(t);
|
|
731
|
+
}
|
|
732
|
+
logout() {
|
|
733
|
+
return e._authService.logout();
|
|
734
|
+
}
|
|
735
|
+
resetEmailPassword(t) {
|
|
736
|
+
return e._authService.resetEmailPassword(t);
|
|
737
|
+
}
|
|
738
|
+
resendVerificationEmail(t, n, r) {
|
|
739
|
+
return e._authService.resendVerificationEmail(t, n, r);
|
|
740
|
+
}
|
|
741
|
+
refreshToken() {
|
|
742
|
+
return e._authService.refreshToken();
|
|
743
|
+
}
|
|
744
|
+
onAuthStateChange(e) {
|
|
745
|
+
return this._onAuthStateChange.subscribe(e);
|
|
746
|
+
}
|
|
747
|
+
removeAuthStateChange(e) {
|
|
748
|
+
this._onAuthStateChange.unsubscribe(e);
|
|
749
|
+
}
|
|
750
|
+
linkAdditionalProvider(t) {
|
|
751
|
+
return e._authService.linkAdditionalProvider(t);
|
|
752
|
+
}
|
|
753
|
+
unlinkProvider(t) {
|
|
754
|
+
return e._authService.unlinkProvider(t);
|
|
755
|
+
}
|
|
756
|
+
authStateChanged(e) {
|
|
757
|
+
this._onAuthStateChange.notify(e);
|
|
758
|
+
}
|
|
759
|
+
static {
|
|
760
|
+
this._instance = void 0;
|
|
761
|
+
}
|
|
762
|
+
}), class e {
|
|
763
|
+
constructor() {}
|
|
764
|
+
static {
|
|
765
|
+
this.error = { shouldBeRegistered: "You should register a cloud functions service with useCloudFunctionsService static method before using CloudFunctions." };
|
|
766
|
+
}
|
|
767
|
+
static useCloudFunctionsService(e) {
|
|
768
|
+
this._cloudFunctionsService != e && (this._cloudFunctionsService = e);
|
|
769
|
+
}
|
|
770
|
+
static get instance() {
|
|
771
|
+
if (!this._cloudFunctionsService) throw Error(e.error.shouldBeRegistered);
|
|
772
|
+
return e._instance ||= new e();
|
|
773
|
+
}
|
|
774
|
+
getRawFunction(t) {
|
|
775
|
+
return e._cloudFunctionsService.retrieveFunction(t);
|
|
776
|
+
}
|
|
777
|
+
getFunction(t) {
|
|
778
|
+
let n = e._cloudFunctionsService.callFunction, r = this.getRawFunction(t);
|
|
779
|
+
return async (e) => {
|
|
780
|
+
let t = await n(r, this.processParam(e));
|
|
781
|
+
return this.processResult(t);
|
|
782
|
+
};
|
|
783
|
+
}
|
|
784
|
+
processParam(e) {
|
|
785
|
+
if (e != null) return e instanceof l ? e.toObject() : Array.isArray(e) ? e.map((e) => this.processParam(e)) : typeof e == "object" ? Object.entries(e).reduce((e, [t, n]) => (e[t] = this.processParam(n), e), {}) : e;
|
|
786
|
+
}
|
|
787
|
+
processResult(e) {
|
|
788
|
+
if (e != null) return e.__className ? l.createInstance(e) : Array.isArray(e) ? e.map((e) => this.processResult(e)) : typeof e == "object" ? Object.entries(e).reduce((e, [t, n]) => (e[t] = this.processResult(n), e), {}) : e;
|
|
789
|
+
}
|
|
511
790
|
};
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
event: 1,
|
|
548
|
-
pendingData: n,
|
|
549
|
-
storedFile: this
|
|
550
|
-
}), this;
|
|
551
|
-
}
|
|
552
|
-
get originalFileName() {
|
|
553
|
-
return this._originalFileName;
|
|
554
|
-
}
|
|
555
|
-
onChange(n) {
|
|
556
|
-
return this._onChange.subscribe(n);
|
|
557
|
-
}
|
|
558
|
-
};
|
|
559
|
-
pe([
|
|
560
|
-
he
|
|
561
|
-
], ce.prototype, "_reference", 2);
|
|
562
|
-
pe([
|
|
563
|
-
he
|
|
564
|
-
], ce.prototype, "_url", 2);
|
|
565
|
-
pe([
|
|
566
|
-
he
|
|
567
|
-
], ce.prototype, "_cloudStorageProviderName", 2);
|
|
568
|
-
pe([
|
|
569
|
-
he
|
|
570
|
-
], ce.prototype, "_originalFileName", 2);
|
|
571
|
-
pe([
|
|
572
|
-
he
|
|
573
|
-
], ce.prototype, "_mimeType", 2);
|
|
574
|
-
ce = pe([
|
|
575
|
-
vt("StoredFile")
|
|
576
|
-
], ce);
|
|
577
|
-
function Ct(n, t = "-") {
|
|
578
|
-
if (!n) return "";
|
|
579
|
-
const s = n.slice(1).replace(/( |[A-Z])/g, (a) => a === " " ? "-" : t + a[0].toLowerCase());
|
|
580
|
-
return n[0].toLocaleLowerCase() + s.replace(/--/g, "-");
|
|
581
|
-
}
|
|
582
|
-
class Tt {
|
|
583
|
-
constructor() {
|
|
584
|
-
this._debug = !1, this._stages = {}, this._onProgress = new Se();
|
|
585
|
-
}
|
|
586
|
-
notifyBusy(t, s) {
|
|
587
|
-
this.pushStage({
|
|
588
|
-
name: s ?? "",
|
|
589
|
-
progress: t ? 0 : 1,
|
|
590
|
-
total: 1
|
|
591
|
-
});
|
|
592
|
-
}
|
|
593
|
-
pushStage(t) {
|
|
594
|
-
this._stages[t.name] = t;
|
|
595
|
-
const s = Object.values(this._stages).reduce((a, c, p, O) => a + c.progress / c.total / O.length, 0);
|
|
596
|
-
this._onProgress.notify({
|
|
597
|
-
busy: s < 1,
|
|
598
|
-
overallProgress: s,
|
|
599
|
-
stages: this._stages
|
|
600
|
-
}), s >= 1 && (this._stages = {}), this.debug && console.log(`ProgressController ${t.name}: Progress: ${t.progress} Stages: ${t.total}`);
|
|
601
|
-
}
|
|
602
|
-
onProgress(t) {
|
|
603
|
-
return this._onProgress.subscribe(t);
|
|
604
|
-
}
|
|
605
|
-
set debug(t) {
|
|
606
|
-
this._debug = t;
|
|
607
|
-
}
|
|
608
|
-
get debug() {
|
|
609
|
-
return this._debug;
|
|
610
|
-
}
|
|
791
|
+
var C = class {};
|
|
792
|
+
(class e extends C {
|
|
793
|
+
static {
|
|
794
|
+
this.error = { shouldBeRegistered: "You should register a Server Auth service before using the Server Auth." };
|
|
795
|
+
}
|
|
796
|
+
constructor() {
|
|
797
|
+
super();
|
|
798
|
+
}
|
|
799
|
+
static useServerAuthService(t) {
|
|
800
|
+
e._authService != t && (e._authService = t, this._instance = void 0);
|
|
801
|
+
}
|
|
802
|
+
static get instance() {
|
|
803
|
+
if (!e._authService) throw Error(e.error.shouldBeRegistered);
|
|
804
|
+
return this._instance ||= new e();
|
|
805
|
+
}
|
|
806
|
+
getUser(t) {
|
|
807
|
+
return e._authService.getUser(t);
|
|
808
|
+
}
|
|
809
|
+
updateUser(t, n) {
|
|
810
|
+
return e._authService.updateUser(t, n);
|
|
811
|
+
}
|
|
812
|
+
setCustomCredentials(t, n) {
|
|
813
|
+
return e._authService.setCustomCredentials(t, n);
|
|
814
|
+
}
|
|
815
|
+
deleteUser(t) {
|
|
816
|
+
return e._authService.deleteUser(t);
|
|
817
|
+
}
|
|
818
|
+
static {
|
|
819
|
+
this._instance = void 0;
|
|
820
|
+
}
|
|
821
|
+
});
|
|
822
|
+
function w(e, t = "-") {
|
|
823
|
+
if (!e) return "";
|
|
824
|
+
let n = e.slice(1).replace(/( |[A-Z])/g, (e) => e === " " ? "-" : t + e[0].toLowerCase());
|
|
825
|
+
return e[0].toLocaleLowerCase() + n.replace(/--/g, "-");
|
|
611
826
|
}
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
827
|
+
//#endregion
|
|
828
|
+
//#region src/progress-controller.ts
|
|
829
|
+
var T = class {
|
|
830
|
+
constructor() {
|
|
831
|
+
this._debug = !1, this._stages = {}, this._onProgress = new t();
|
|
832
|
+
}
|
|
833
|
+
notifyBusy(e, t) {
|
|
834
|
+
this.pushStage({
|
|
835
|
+
name: t ?? "",
|
|
836
|
+
progress: +!e,
|
|
837
|
+
total: 1
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
pushStage(e) {
|
|
841
|
+
this._stages[e.name] = e;
|
|
842
|
+
let t = Object.values(this._stages).reduce((e, t, n, r) => e + t.progress / t.total / r.length, 0);
|
|
843
|
+
this._onProgress.notify({
|
|
844
|
+
busy: t < 1,
|
|
845
|
+
overallProgress: t,
|
|
846
|
+
stages: this._stages
|
|
847
|
+
}), t >= 1 && (this._stages = {}), this.debug && console.log(`ProgressController ${e.name}: Progress: ${e.progress} Stages: ${e.total}`);
|
|
848
|
+
}
|
|
849
|
+
onProgress(e) {
|
|
850
|
+
return this._onProgress.subscribe(e);
|
|
851
|
+
}
|
|
852
|
+
set debug(e) {
|
|
853
|
+
this._debug = e;
|
|
854
|
+
}
|
|
855
|
+
get debug() {
|
|
856
|
+
return this._debug;
|
|
857
|
+
}
|
|
858
|
+
}, E = class e {
|
|
859
|
+
static {
|
|
860
|
+
this.errorMessages = { missedDocument: "No document to save" };
|
|
861
|
+
}
|
|
862
|
+
constructor(e) {
|
|
863
|
+
this.progressController = new T(), this.onChangeHdl = new t(), this.onErrorHdl = new t(), this.validator = {}, this.setDocument(e || this.createDocument());
|
|
864
|
+
}
|
|
865
|
+
allRequiredPropertiesFilled() {
|
|
866
|
+
return this.nonFilledRequiredProperties.length <= 0 && this.validateGlobal();
|
|
867
|
+
}
|
|
868
|
+
get nonFilledRequiredProperties() {
|
|
869
|
+
return this.requiredProperties.filter((e) => this.validateProp(e));
|
|
870
|
+
}
|
|
871
|
+
get requiredProperties() {
|
|
872
|
+
if (!this.document) throw Error(e.errorMessages.missedDocument);
|
|
873
|
+
let t = this.document.getPersistentProperties().filter((e) => this.document.isRequired(e.name)).map((e) => e.name);
|
|
874
|
+
return [...new Set(t.concat(Object.keys(this.validator)))];
|
|
875
|
+
}
|
|
876
|
+
addValidator(e, t, n) {
|
|
877
|
+
this.validator[e] = {
|
|
878
|
+
func: t,
|
|
879
|
+
errorMessage: n
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
removeValidator(e) {
|
|
883
|
+
delete this.validator[e];
|
|
884
|
+
}
|
|
885
|
+
addGlobalValidator(e, t) {
|
|
886
|
+
this.globalValidator = {
|
|
887
|
+
func: e,
|
|
888
|
+
errorMessage: t
|
|
889
|
+
};
|
|
890
|
+
}
|
|
891
|
+
removeGlobalValidator() {
|
|
892
|
+
this.globalValidator = void 0;
|
|
893
|
+
}
|
|
894
|
+
failedValidationError(e) {
|
|
895
|
+
if (e) return this.validator[e]?.errorMessage;
|
|
896
|
+
let t = this.nonFilledRequiredProperties[0];
|
|
897
|
+
if (t) return this.validator[t]?.errorMessage;
|
|
898
|
+
if (!this.validateGlobal()) return this.globalValidator?.errorMessage;
|
|
899
|
+
}
|
|
900
|
+
validateProp(t) {
|
|
901
|
+
if (!this.document) throw Error(e.errorMessages.missedDocument);
|
|
902
|
+
let n = this.document[t];
|
|
903
|
+
return this.validator[t] ? !this.validator[t].func(n) : !this.document.isPropValueValid(t);
|
|
904
|
+
}
|
|
905
|
+
validateGlobal() {
|
|
906
|
+
if (!this.document) throw Error(e.errorMessages.missedDocument);
|
|
907
|
+
return this.globalValidator ? this.globalValidator.func(this.document) : !0;
|
|
908
|
+
}
|
|
909
|
+
storeDoc() {
|
|
910
|
+
if (!this.document) throw Error(e.errorMessages.missedDocument);
|
|
911
|
+
return this.model.save(this.document);
|
|
912
|
+
}
|
|
913
|
+
deleteDoc() {
|
|
914
|
+
if (!this.document) throw Error(e.errorMessages.missedDocument);
|
|
915
|
+
return this.model.delete(this.document.id);
|
|
916
|
+
}
|
|
917
|
+
queryDocs(e) {
|
|
918
|
+
let t = this.model.find();
|
|
919
|
+
return e && (t = t.limit(e)), t;
|
|
920
|
+
}
|
|
921
|
+
findDocs(e) {}
|
|
922
|
+
async setFilter(e) {
|
|
923
|
+
return this._filter = e, this.onChangeHdl.notify({ action: "filterChange" }), this;
|
|
924
|
+
}
|
|
925
|
+
resetFilter() {
|
|
926
|
+
return this._filter = void 0, this.onChangeHdl.notify({ action: "filterChange" }), this;
|
|
927
|
+
}
|
|
928
|
+
onChange(e) {
|
|
929
|
+
return this.onChangeHdl.subscribe(e);
|
|
930
|
+
}
|
|
931
|
+
onError(e) {
|
|
932
|
+
return this.onErrorHdl.subscribe(e);
|
|
933
|
+
}
|
|
934
|
+
notifyChange(e) {
|
|
935
|
+
this.onChangeHdl.notify(e);
|
|
936
|
+
}
|
|
937
|
+
newDocument() {
|
|
938
|
+
return this.setDocument(this.createDocument());
|
|
939
|
+
}
|
|
940
|
+
async storeDocument() {
|
|
941
|
+
let e = "Saving main document";
|
|
942
|
+
try {
|
|
943
|
+
this.progressController.notifyBusy(!0, e), await this.storeDoc(), this.onChangeHdl.notify({
|
|
944
|
+
documentCollection: await this.documentCollection(),
|
|
945
|
+
action: "saved"
|
|
946
|
+
});
|
|
947
|
+
} catch (e) {
|
|
948
|
+
if (this.onChangeHdl.notify({ error: this.errorToError(e) }), this.onErrorHdl.notify(this.errorToError(e)), this.throwOnError) throw e;
|
|
949
|
+
} finally {
|
|
950
|
+
this.progressController.notifyBusy(!1, e);
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
async deleteDocument() {
|
|
954
|
+
let e = "Delete main document";
|
|
955
|
+
try {
|
|
956
|
+
this.progressController.notifyBusy(!0, e), await this.deleteDoc(), this.onChangeHdl.notify({
|
|
957
|
+
documentCollection: await this.documentCollection(),
|
|
958
|
+
action: "deleted"
|
|
959
|
+
});
|
|
960
|
+
} catch (e) {
|
|
961
|
+
if (this.onChangeHdl.notify({ error: this.errorToError(e) }), this.onErrorHdl.notify(this.errorToError(e)), this.throwOnError) throw e;
|
|
962
|
+
} finally {
|
|
963
|
+
this.progressController.notifyBusy(!1, e);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
async documentCollection(e) {
|
|
967
|
+
let t = "Retrieving document collection", n = [];
|
|
968
|
+
try {
|
|
969
|
+
this.progressController.notifyBusy(!0, t);
|
|
970
|
+
let r = this.findDocs(e);
|
|
971
|
+
n = r ? await r : await this.queryDocs(e).get();
|
|
972
|
+
} catch (e) {
|
|
973
|
+
if (this.onChangeHdl.notify({ error: this.errorToError(e) }), this.onErrorHdl.notify(this.errorToError(e)), this.throwOnError) throw e;
|
|
974
|
+
} finally {
|
|
975
|
+
this.onChangeHdl.notify({ documentCollection: n }), this.progressController.notifyBusy(!1, t);
|
|
976
|
+
}
|
|
977
|
+
return n;
|
|
978
|
+
}
|
|
979
|
+
filter(e) {
|
|
980
|
+
return e.filter((e) => this._filter?.(e) ?? !0);
|
|
981
|
+
}
|
|
982
|
+
onProgress(e) {
|
|
983
|
+
return this.progressController.onProgress(e);
|
|
984
|
+
}
|
|
985
|
+
get model() {
|
|
986
|
+
return this.getModel();
|
|
987
|
+
}
|
|
988
|
+
setDocument(e) {
|
|
989
|
+
return this._document !== e && (this.unsubscribeDocument && this.unsubscribeDocument(), e && (this.unsubscribeDocument = e.onChange((e) => this.onChangeHdl.notify({ documentProps: e }))), this._document = e, this.onChangeHdl.notify({ documentChanged: this._document })), this;
|
|
990
|
+
}
|
|
991
|
+
set document(e) {
|
|
992
|
+
this.setDocument(e);
|
|
993
|
+
}
|
|
994
|
+
get document() {
|
|
995
|
+
return this._document;
|
|
996
|
+
}
|
|
997
|
+
managedThrow(e) {
|
|
998
|
+
if (this.onChangeHdl.notify({ error: this.errorToError(e) }), this.onErrorHdl.notify(this.errorToError(e)), this.throwOnError) throw this.errorToError(e);
|
|
999
|
+
}
|
|
1000
|
+
errorToError(e) {
|
|
1001
|
+
return e instanceof Error ? e : typeof e == "string" ? Error(e) : "code" in e ? Error(e.code) : "message" in e ? Error(e.error) : Error(JSON.stringify(e));
|
|
1002
|
+
}
|
|
1003
|
+
get throwOnError() {
|
|
1004
|
+
return this.onErrorHdl.subscribersCount === 0;
|
|
1005
|
+
}
|
|
1006
|
+
}, D = /* @__PURE__ */ e(((e) => {
|
|
1007
|
+
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), o = Symbol.for("react.consumer"), s = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), f = Symbol.for("react.activity"), p = Symbol.iterator;
|
|
1008
|
+
function m(e) {
|
|
1009
|
+
return typeof e != "object" || !e ? null : (e = p && e[p] || e["@@iterator"], typeof e == "function" ? e : null);
|
|
1010
|
+
}
|
|
1011
|
+
var h = {
|
|
1012
|
+
isMounted: function() {
|
|
1013
|
+
return !1;
|
|
1014
|
+
},
|
|
1015
|
+
enqueueForceUpdate: function() {},
|
|
1016
|
+
enqueueReplaceState: function() {},
|
|
1017
|
+
enqueueSetState: function() {}
|
|
1018
|
+
}, g = Object.assign, _ = {};
|
|
1019
|
+
function v(e, t, n) {
|
|
1020
|
+
this.props = e, this.context = t, this.refs = _, this.updater = n || h;
|
|
1021
|
+
}
|
|
1022
|
+
v.prototype.isReactComponent = {}, v.prototype.setState = function(e, t) {
|
|
1023
|
+
if (typeof e != "object" && typeof e != "function" && e != null) throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
|
|
1024
|
+
this.updater.enqueueSetState(this, e, t, "setState");
|
|
1025
|
+
}, v.prototype.forceUpdate = function(e) {
|
|
1026
|
+
this.updater.enqueueForceUpdate(this, e, "forceUpdate");
|
|
1027
|
+
};
|
|
1028
|
+
function y() {}
|
|
1029
|
+
y.prototype = v.prototype;
|
|
1030
|
+
function b(e, t, n) {
|
|
1031
|
+
this.props = e, this.context = t, this.refs = _, this.updater = n || h;
|
|
1032
|
+
}
|
|
1033
|
+
var x = b.prototype = new y();
|
|
1034
|
+
x.constructor = b, g(x, v.prototype), x.isPureReactComponent = !0;
|
|
1035
|
+
var S = Array.isArray;
|
|
1036
|
+
function C() {}
|
|
1037
|
+
var w = {
|
|
1038
|
+
H: null,
|
|
1039
|
+
A: null,
|
|
1040
|
+
T: null,
|
|
1041
|
+
S: null
|
|
1042
|
+
}, T = Object.prototype.hasOwnProperty;
|
|
1043
|
+
function E(e, n, r) {
|
|
1044
|
+
var i = r.ref;
|
|
1045
|
+
return {
|
|
1046
|
+
$$typeof: t,
|
|
1047
|
+
type: e,
|
|
1048
|
+
key: n,
|
|
1049
|
+
ref: i === void 0 ? null : i,
|
|
1050
|
+
props: r
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1053
|
+
function D(e, t) {
|
|
1054
|
+
return E(e.type, t, e.props);
|
|
1055
|
+
}
|
|
1056
|
+
function O(e) {
|
|
1057
|
+
return typeof e == "object" && !!e && e.$$typeof === t;
|
|
1058
|
+
}
|
|
1059
|
+
function k(e) {
|
|
1060
|
+
var t = {
|
|
1061
|
+
"=": "=0",
|
|
1062
|
+
":": "=2"
|
|
1063
|
+
};
|
|
1064
|
+
return "$" + e.replace(/[=:]/g, function(e) {
|
|
1065
|
+
return t[e];
|
|
1066
|
+
});
|
|
1067
|
+
}
|
|
1068
|
+
var A = /\/+/g;
|
|
1069
|
+
function j(e, t) {
|
|
1070
|
+
return typeof e == "object" && e && e.key != null ? k("" + e.key) : t.toString(36);
|
|
1071
|
+
}
|
|
1072
|
+
function M(e) {
|
|
1073
|
+
switch (e.status) {
|
|
1074
|
+
case "fulfilled": return e.value;
|
|
1075
|
+
case "rejected": throw e.reason;
|
|
1076
|
+
default: switch (typeof e.status == "string" ? e.then(C, C) : (e.status = "pending", e.then(function(t) {
|
|
1077
|
+
e.status === "pending" && (e.status = "fulfilled", e.value = t);
|
|
1078
|
+
}, function(t) {
|
|
1079
|
+
e.status === "pending" && (e.status = "rejected", e.reason = t);
|
|
1080
|
+
})), e.status) {
|
|
1081
|
+
case "fulfilled": return e.value;
|
|
1082
|
+
case "rejected": throw e.reason;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
throw e;
|
|
1086
|
+
}
|
|
1087
|
+
function N(e, r, i, a, o) {
|
|
1088
|
+
var s = typeof e;
|
|
1089
|
+
(s === "undefined" || s === "boolean") && (e = null);
|
|
1090
|
+
var c = !1;
|
|
1091
|
+
if (e === null) c = !0;
|
|
1092
|
+
else switch (s) {
|
|
1093
|
+
case "bigint":
|
|
1094
|
+
case "string":
|
|
1095
|
+
case "number":
|
|
1096
|
+
c = !0;
|
|
1097
|
+
break;
|
|
1098
|
+
case "object": switch (e.$$typeof) {
|
|
1099
|
+
case t:
|
|
1100
|
+
case n:
|
|
1101
|
+
c = !0;
|
|
1102
|
+
break;
|
|
1103
|
+
case d: return c = e._init, N(c(e._payload), r, i, a, o);
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
if (c) return o = o(e), c = a === "" ? "." + j(e, 0) : a, S(o) ? (i = "", c != null && (i = c.replace(A, "$&/") + "/"), N(o, r, i, "", function(e) {
|
|
1107
|
+
return e;
|
|
1108
|
+
})) : o != null && (O(o) && (o = D(o, i + (o.key == null || e && e.key === o.key ? "" : ("" + o.key).replace(A, "$&/") + "/") + c)), r.push(o)), 1;
|
|
1109
|
+
c = 0;
|
|
1110
|
+
var l = a === "" ? "." : a + ":";
|
|
1111
|
+
if (S(e)) for (var u = 0; u < e.length; u++) a = e[u], s = l + j(a, u), c += N(a, r, i, s, o);
|
|
1112
|
+
else if (u = m(e), typeof u == "function") for (e = u.call(e), u = 0; !(a = e.next()).done;) a = a.value, s = l + j(a, u++), c += N(a, r, i, s, o);
|
|
1113
|
+
else if (s === "object") {
|
|
1114
|
+
if (typeof e.then == "function") return N(M(e), r, i, a, o);
|
|
1115
|
+
throw r = String(e), Error("Objects are not valid as a React child (found: " + (r === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : r) + "). If you meant to render a collection of children, use an array instead.");
|
|
1116
|
+
}
|
|
1117
|
+
return c;
|
|
1118
|
+
}
|
|
1119
|
+
function P(e, t, n) {
|
|
1120
|
+
if (e == null) return e;
|
|
1121
|
+
var r = [], i = 0;
|
|
1122
|
+
return N(e, r, "", "", function(e) {
|
|
1123
|
+
return t.call(n, e, i++);
|
|
1124
|
+
}), r;
|
|
1125
|
+
}
|
|
1126
|
+
function F(e) {
|
|
1127
|
+
if (e._status === -1) {
|
|
1128
|
+
var t = e._result;
|
|
1129
|
+
t = t(), t.then(function(t) {
|
|
1130
|
+
(e._status === 0 || e._status === -1) && (e._status = 1, e._result = t);
|
|
1131
|
+
}, function(t) {
|
|
1132
|
+
(e._status === 0 || e._status === -1) && (e._status = 2, e._result = t);
|
|
1133
|
+
}), e._status === -1 && (e._status = 0, e._result = t);
|
|
1134
|
+
}
|
|
1135
|
+
if (e._status === 1) return e._result.default;
|
|
1136
|
+
throw e._result;
|
|
1137
|
+
}
|
|
1138
|
+
var I = typeof reportError == "function" ? reportError : function(e) {
|
|
1139
|
+
if (typeof window == "object" && typeof window.ErrorEvent == "function") {
|
|
1140
|
+
var t = new window.ErrorEvent("error", {
|
|
1141
|
+
bubbles: !0,
|
|
1142
|
+
cancelable: !0,
|
|
1143
|
+
message: typeof e == "object" && e && typeof e.message == "string" ? String(e.message) : String(e),
|
|
1144
|
+
error: e
|
|
1145
|
+
});
|
|
1146
|
+
if (!window.dispatchEvent(t)) return;
|
|
1147
|
+
} else if (typeof process == "object" && typeof process.emit == "function") {
|
|
1148
|
+
process.emit("uncaughtException", e);
|
|
1149
|
+
return;
|
|
1150
|
+
}
|
|
1151
|
+
console.error(e);
|
|
1152
|
+
}, L = {
|
|
1153
|
+
map: P,
|
|
1154
|
+
forEach: function(e, t, n) {
|
|
1155
|
+
P(e, function() {
|
|
1156
|
+
t.apply(this, arguments);
|
|
1157
|
+
}, n);
|
|
1158
|
+
},
|
|
1159
|
+
count: function(e) {
|
|
1160
|
+
var t = 0;
|
|
1161
|
+
return P(e, function() {
|
|
1162
|
+
t++;
|
|
1163
|
+
}), t;
|
|
1164
|
+
},
|
|
1165
|
+
toArray: function(e) {
|
|
1166
|
+
return P(e, function(e) {
|
|
1167
|
+
return e;
|
|
1168
|
+
}) || [];
|
|
1169
|
+
},
|
|
1170
|
+
only: function(e) {
|
|
1171
|
+
if (!O(e)) throw Error("React.Children.only expected to receive a single React element child.");
|
|
1172
|
+
return e;
|
|
1173
|
+
}
|
|
1174
|
+
};
|
|
1175
|
+
e.Activity = f, e.Children = L, e.Component = v, e.Fragment = r, e.Profiler = a, e.PureComponent = b, e.StrictMode = i, e.Suspense = l, e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = w, e.__COMPILER_RUNTIME = {
|
|
1176
|
+
__proto__: null,
|
|
1177
|
+
c: function(e) {
|
|
1178
|
+
return w.H.useMemoCache(e);
|
|
1179
|
+
}
|
|
1180
|
+
}, e.cache = function(e) {
|
|
1181
|
+
return function() {
|
|
1182
|
+
return e.apply(null, arguments);
|
|
1183
|
+
};
|
|
1184
|
+
}, e.cacheSignal = function() {
|
|
1185
|
+
return null;
|
|
1186
|
+
}, e.cloneElement = function(e, t, n) {
|
|
1187
|
+
if (e == null) throw Error("The argument must be a React element, but you passed " + e + ".");
|
|
1188
|
+
var r = g({}, e.props), i = e.key;
|
|
1189
|
+
if (t != null) for (a in t.key !== void 0 && (i = "" + t.key), t) !T.call(t, a) || a === "key" || a === "__self" || a === "__source" || a === "ref" && t.ref === void 0 || (r[a] = t[a]);
|
|
1190
|
+
var a = arguments.length - 2;
|
|
1191
|
+
if (a === 1) r.children = n;
|
|
1192
|
+
else if (1 < a) {
|
|
1193
|
+
for (var o = Array(a), s = 0; s < a; s++) o[s] = arguments[s + 2];
|
|
1194
|
+
r.children = o;
|
|
1195
|
+
}
|
|
1196
|
+
return E(e.type, i, r);
|
|
1197
|
+
}, e.createContext = function(e) {
|
|
1198
|
+
return e = {
|
|
1199
|
+
$$typeof: s,
|
|
1200
|
+
_currentValue: e,
|
|
1201
|
+
_currentValue2: e,
|
|
1202
|
+
_threadCount: 0,
|
|
1203
|
+
Provider: null,
|
|
1204
|
+
Consumer: null
|
|
1205
|
+
}, e.Provider = e, e.Consumer = {
|
|
1206
|
+
$$typeof: o,
|
|
1207
|
+
_context: e
|
|
1208
|
+
}, e;
|
|
1209
|
+
}, e.createElement = function(e, t, n) {
|
|
1210
|
+
var r, i = {}, a = null;
|
|
1211
|
+
if (t != null) for (r in t.key !== void 0 && (a = "" + t.key), t) T.call(t, r) && r !== "key" && r !== "__self" && r !== "__source" && (i[r] = t[r]);
|
|
1212
|
+
var o = arguments.length - 2;
|
|
1213
|
+
if (o === 1) i.children = n;
|
|
1214
|
+
else if (1 < o) {
|
|
1215
|
+
for (var s = Array(o), c = 0; c < o; c++) s[c] = arguments[c + 2];
|
|
1216
|
+
i.children = s;
|
|
1217
|
+
}
|
|
1218
|
+
if (e && e.defaultProps) for (r in o = e.defaultProps, o) i[r] === void 0 && (i[r] = o[r]);
|
|
1219
|
+
return E(e, a, i);
|
|
1220
|
+
}, e.createRef = function() {
|
|
1221
|
+
return { current: null };
|
|
1222
|
+
}, e.forwardRef = function(e) {
|
|
1223
|
+
return {
|
|
1224
|
+
$$typeof: c,
|
|
1225
|
+
render: e
|
|
1226
|
+
};
|
|
1227
|
+
}, e.isValidElement = O, e.lazy = function(e) {
|
|
1228
|
+
return {
|
|
1229
|
+
$$typeof: d,
|
|
1230
|
+
_payload: {
|
|
1231
|
+
_status: -1,
|
|
1232
|
+
_result: e
|
|
1233
|
+
},
|
|
1234
|
+
_init: F
|
|
1235
|
+
};
|
|
1236
|
+
}, e.memo = function(e, t) {
|
|
1237
|
+
return {
|
|
1238
|
+
$$typeof: u,
|
|
1239
|
+
type: e,
|
|
1240
|
+
compare: t === void 0 ? null : t
|
|
1241
|
+
};
|
|
1242
|
+
}, e.startTransition = function(e) {
|
|
1243
|
+
var t = w.T, n = {};
|
|
1244
|
+
w.T = n;
|
|
1245
|
+
try {
|
|
1246
|
+
var r = e(), i = w.S;
|
|
1247
|
+
i !== null && i(n, r), typeof r == "object" && r && typeof r.then == "function" && r.then(C, I);
|
|
1248
|
+
} catch (e) {
|
|
1249
|
+
I(e);
|
|
1250
|
+
} finally {
|
|
1251
|
+
t !== null && n.types !== null && (t.types = n.types), w.T = t;
|
|
1252
|
+
}
|
|
1253
|
+
}, e.unstable_useCacheRefresh = function() {
|
|
1254
|
+
return w.H.useCacheRefresh();
|
|
1255
|
+
}, e.use = function(e) {
|
|
1256
|
+
return w.H.use(e);
|
|
1257
|
+
}, e.useActionState = function(e, t, n) {
|
|
1258
|
+
return w.H.useActionState(e, t, n);
|
|
1259
|
+
}, e.useCallback = function(e, t) {
|
|
1260
|
+
return w.H.useCallback(e, t);
|
|
1261
|
+
}, e.useContext = function(e) {
|
|
1262
|
+
return w.H.useContext(e);
|
|
1263
|
+
}, e.useDebugValue = function() {}, e.useDeferredValue = function(e, t) {
|
|
1264
|
+
return w.H.useDeferredValue(e, t);
|
|
1265
|
+
}, e.useEffect = function(e, t) {
|
|
1266
|
+
return w.H.useEffect(e, t);
|
|
1267
|
+
}, e.useEffectEvent = function(e) {
|
|
1268
|
+
return w.H.useEffectEvent(e);
|
|
1269
|
+
}, e.useId = function() {
|
|
1270
|
+
return w.H.useId();
|
|
1271
|
+
}, e.useImperativeHandle = function(e, t, n) {
|
|
1272
|
+
return w.H.useImperativeHandle(e, t, n);
|
|
1273
|
+
}, e.useInsertionEffect = function(e, t) {
|
|
1274
|
+
return w.H.useInsertionEffect(e, t);
|
|
1275
|
+
}, e.useLayoutEffect = function(e, t) {
|
|
1276
|
+
return w.H.useLayoutEffect(e, t);
|
|
1277
|
+
}, e.useMemo = function(e, t) {
|
|
1278
|
+
return w.H.useMemo(e, t);
|
|
1279
|
+
}, e.useOptimistic = function(e, t) {
|
|
1280
|
+
return w.H.useOptimistic(e, t);
|
|
1281
|
+
}, e.useReducer = function(e, t, n) {
|
|
1282
|
+
return w.H.useReducer(e, t, n);
|
|
1283
|
+
}, e.useRef = function(e) {
|
|
1284
|
+
return w.H.useRef(e);
|
|
1285
|
+
}, e.useState = function(e) {
|
|
1286
|
+
return w.H.useState(e);
|
|
1287
|
+
}, e.useSyncExternalStore = function(e, t, n) {
|
|
1288
|
+
return w.H.useSyncExternalStore(e, t, n);
|
|
1289
|
+
}, e.useTransition = function() {
|
|
1290
|
+
return w.H.useTransition();
|
|
1291
|
+
}, e.version = "19.2.7";
|
|
1292
|
+
})), O = /* @__PURE__ */ e(((e, t) => {
|
|
1293
|
+
process.env.NODE_ENV !== "production" && (function() {
|
|
1294
|
+
function n(e, t) {
|
|
1295
|
+
Object.defineProperty(a.prototype, e, { get: function() {
|
|
1296
|
+
console.warn("%s(...) is deprecated in plain JavaScript React classes. %s", t[0], t[1]);
|
|
1297
|
+
} });
|
|
1298
|
+
}
|
|
1299
|
+
function r(e) {
|
|
1300
|
+
return typeof e != "object" || !e ? null : (e = H && e[H] || e["@@iterator"], typeof e == "function" ? e : null);
|
|
1301
|
+
}
|
|
1302
|
+
function i(e, t) {
|
|
1303
|
+
e = (e = e.constructor) && (e.displayName || e.name) || "ReactClass";
|
|
1304
|
+
var n = e + "." + t;
|
|
1305
|
+
U[n] || (console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", t, e), U[n] = !0);
|
|
1306
|
+
}
|
|
1307
|
+
function a(e, t, n) {
|
|
1308
|
+
this.props = e, this.context = t, this.refs = G, this.updater = n || W;
|
|
1309
|
+
}
|
|
1310
|
+
function o() {}
|
|
1311
|
+
function s(e, t, n) {
|
|
1312
|
+
this.props = e, this.context = t, this.refs = G, this.updater = n || W;
|
|
1313
|
+
}
|
|
1314
|
+
function c() {}
|
|
1315
|
+
function l(e) {
|
|
1316
|
+
return "" + e;
|
|
1317
|
+
}
|
|
1318
|
+
function u(e) {
|
|
1319
|
+
try {
|
|
1320
|
+
l(e);
|
|
1321
|
+
var t = !1;
|
|
1322
|
+
} catch {
|
|
1323
|
+
t = !0;
|
|
1324
|
+
}
|
|
1325
|
+
if (t) {
|
|
1326
|
+
t = console;
|
|
1327
|
+
var n = t.error, r = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
1328
|
+
return n.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", r), l(e);
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
function d(e) {
|
|
1332
|
+
if (e == null) return null;
|
|
1333
|
+
if (typeof e == "function") return e.$$typeof === ce ? null : e.displayName || e.name || null;
|
|
1334
|
+
if (typeof e == "string") return e;
|
|
1335
|
+
switch (e) {
|
|
1336
|
+
case L: return "Fragment";
|
|
1337
|
+
case ee: return "Profiler";
|
|
1338
|
+
case R: return "StrictMode";
|
|
1339
|
+
case re: return "Suspense";
|
|
1340
|
+
case ie: return "SuspenseList";
|
|
1341
|
+
case ae: return "Activity";
|
|
1342
|
+
}
|
|
1343
|
+
if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
|
|
1344
|
+
case I: return "Portal";
|
|
1345
|
+
case te: return e.displayName || "Context";
|
|
1346
|
+
case z: return (e._context.displayName || "Context") + ".Consumer";
|
|
1347
|
+
case ne:
|
|
1348
|
+
var t = e.render;
|
|
1349
|
+
return e = e.displayName, e ||= (e = t.displayName || t.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
|
|
1350
|
+
case B: return t = e.displayName || null, t === null ? d(e.type) || "Memo" : t;
|
|
1351
|
+
case V:
|
|
1352
|
+
t = e._payload, e = e._init;
|
|
1353
|
+
try {
|
|
1354
|
+
return d(e(t));
|
|
1355
|
+
} catch {}
|
|
1356
|
+
}
|
|
1357
|
+
return null;
|
|
1358
|
+
}
|
|
1359
|
+
function f(e) {
|
|
1360
|
+
if (e === L) return "<>";
|
|
1361
|
+
if (typeof e == "object" && e && e.$$typeof === V) return "<...>";
|
|
1362
|
+
try {
|
|
1363
|
+
var t = d(e);
|
|
1364
|
+
return t ? "<" + t + ">" : "<...>";
|
|
1365
|
+
} catch {
|
|
1366
|
+
return "<...>";
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
function p() {
|
|
1370
|
+
var e = q.A;
|
|
1371
|
+
return e === null ? null : e.getOwner();
|
|
1372
|
+
}
|
|
1373
|
+
function m() {
|
|
1374
|
+
return Error("react-stack-top-frame");
|
|
1375
|
+
}
|
|
1376
|
+
function h(e) {
|
|
1377
|
+
if (J.call(e, "key")) {
|
|
1378
|
+
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
1379
|
+
if (t && t.isReactWarning) return !1;
|
|
1380
|
+
}
|
|
1381
|
+
return e.key !== void 0;
|
|
1382
|
+
}
|
|
1383
|
+
function g(e, t) {
|
|
1384
|
+
function n() {
|
|
1385
|
+
ue || (ue = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
|
|
1386
|
+
}
|
|
1387
|
+
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
1388
|
+
get: n,
|
|
1389
|
+
configurable: !0
|
|
1390
|
+
});
|
|
1391
|
+
}
|
|
1392
|
+
function _() {
|
|
1393
|
+
var e = d(this.type);
|
|
1394
|
+
return fe[e] || (fe[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
|
|
1395
|
+
}
|
|
1396
|
+
function v(e, t, n, r, i, a) {
|
|
1397
|
+
var o = n.ref;
|
|
1398
|
+
return e = {
|
|
1399
|
+
$$typeof: F,
|
|
1400
|
+
type: e,
|
|
1401
|
+
key: t,
|
|
1402
|
+
props: n,
|
|
1403
|
+
_owner: r
|
|
1404
|
+
}, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
|
|
1405
|
+
enumerable: !1,
|
|
1406
|
+
value: null
|
|
1407
|
+
}) : Object.defineProperty(e, "ref", {
|
|
1408
|
+
enumerable: !1,
|
|
1409
|
+
get: _
|
|
1410
|
+
}), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
1411
|
+
configurable: !1,
|
|
1412
|
+
enumerable: !1,
|
|
1413
|
+
writable: !0,
|
|
1414
|
+
value: 0
|
|
1415
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
1416
|
+
configurable: !1,
|
|
1417
|
+
enumerable: !1,
|
|
1418
|
+
writable: !0,
|
|
1419
|
+
value: null
|
|
1420
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
1421
|
+
configurable: !1,
|
|
1422
|
+
enumerable: !1,
|
|
1423
|
+
writable: !0,
|
|
1424
|
+
value: i
|
|
1425
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
1426
|
+
configurable: !1,
|
|
1427
|
+
enumerable: !1,
|
|
1428
|
+
writable: !0,
|
|
1429
|
+
value: a
|
|
1430
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
1431
|
+
}
|
|
1432
|
+
function y(e, t) {
|
|
1433
|
+
return t = v(e.type, t, e.props, e._owner, e._debugStack, e._debugTask), e._store && (t._store.validated = e._store.validated), t;
|
|
1434
|
+
}
|
|
1435
|
+
function b(e) {
|
|
1436
|
+
x(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === V && (e._payload.status === "fulfilled" ? x(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
1437
|
+
}
|
|
1438
|
+
function x(e) {
|
|
1439
|
+
return typeof e == "object" && !!e && e.$$typeof === F;
|
|
1440
|
+
}
|
|
1441
|
+
function S(e) {
|
|
1442
|
+
var t = {
|
|
1443
|
+
"=": "=0",
|
|
1444
|
+
":": "=2"
|
|
1445
|
+
};
|
|
1446
|
+
return "$" + e.replace(/[=:]/g, function(e) {
|
|
1447
|
+
return t[e];
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
function C(e, t) {
|
|
1451
|
+
return typeof e == "object" && e && e.key != null ? (u(e.key), S("" + e.key)) : t.toString(36);
|
|
1452
|
+
}
|
|
1453
|
+
function w(e) {
|
|
1454
|
+
switch (e.status) {
|
|
1455
|
+
case "fulfilled": return e.value;
|
|
1456
|
+
case "rejected": throw e.reason;
|
|
1457
|
+
default: switch (typeof e.status == "string" ? e.then(c, c) : (e.status = "pending", e.then(function(t) {
|
|
1458
|
+
e.status === "pending" && (e.status = "fulfilled", e.value = t);
|
|
1459
|
+
}, function(t) {
|
|
1460
|
+
e.status === "pending" && (e.status = "rejected", e.reason = t);
|
|
1461
|
+
})), e.status) {
|
|
1462
|
+
case "fulfilled": return e.value;
|
|
1463
|
+
case "rejected": throw e.reason;
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
throw e;
|
|
1467
|
+
}
|
|
1468
|
+
function T(e, t, n, i, a) {
|
|
1469
|
+
var o = typeof e;
|
|
1470
|
+
(o === "undefined" || o === "boolean") && (e = null);
|
|
1471
|
+
var s = !1;
|
|
1472
|
+
if (e === null) s = !0;
|
|
1473
|
+
else switch (o) {
|
|
1474
|
+
case "bigint":
|
|
1475
|
+
case "string":
|
|
1476
|
+
case "number":
|
|
1477
|
+
s = !0;
|
|
1478
|
+
break;
|
|
1479
|
+
case "object": switch (e.$$typeof) {
|
|
1480
|
+
case F:
|
|
1481
|
+
case I:
|
|
1482
|
+
s = !0;
|
|
1483
|
+
break;
|
|
1484
|
+
case V: return s = e._init, T(s(e._payload), t, n, i, a);
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
if (s) {
|
|
1488
|
+
s = e, a = a(s);
|
|
1489
|
+
var c = i === "" ? "." + C(s, 0) : i;
|
|
1490
|
+
return se(a) ? (n = "", c != null && (n = c.replace(ge, "$&/") + "/"), T(a, t, n, "", function(e) {
|
|
1491
|
+
return e;
|
|
1492
|
+
})) : a != null && (x(a) && (a.key != null && (s && s.key === a.key || u(a.key)), n = y(a, n + (a.key == null || s && s.key === a.key ? "" : ("" + a.key).replace(ge, "$&/") + "/") + c), i !== "" && s != null && x(s) && s.key == null && s._store && !s._store.validated && (n._store.validated = 2), a = n), t.push(a)), 1;
|
|
1493
|
+
}
|
|
1494
|
+
if (s = 0, c = i === "" ? "." : i + ":", se(e)) for (var l = 0; l < e.length; l++) i = e[l], o = c + C(i, l), s += T(i, t, n, o, a);
|
|
1495
|
+
else if (l = r(e), typeof l == "function") for (l === e.entries && (he || console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), he = !0), e = l.call(e), l = 0; !(i = e.next()).done;) i = i.value, o = c + C(i, l++), s += T(i, t, n, o, a);
|
|
1496
|
+
else if (o === "object") {
|
|
1497
|
+
if (typeof e.then == "function") return T(w(e), t, n, i, a);
|
|
1498
|
+
throw t = String(e), Error("Objects are not valid as a React child (found: " + (t === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : t) + "). If you meant to render a collection of children, use an array instead.");
|
|
1499
|
+
}
|
|
1500
|
+
return s;
|
|
1501
|
+
}
|
|
1502
|
+
function E(e, t, n) {
|
|
1503
|
+
if (e == null) return e;
|
|
1504
|
+
var r = [], i = 0;
|
|
1505
|
+
return T(e, r, "", "", function(e) {
|
|
1506
|
+
return t.call(n, e, i++);
|
|
1507
|
+
}), r;
|
|
1508
|
+
}
|
|
1509
|
+
function D(e) {
|
|
1510
|
+
if (e._status === -1) {
|
|
1511
|
+
var t = e._ioInfo;
|
|
1512
|
+
t != null && (t.start = t.end = performance.now()), t = e._result;
|
|
1513
|
+
var n = t();
|
|
1514
|
+
if (n.then(function(t) {
|
|
1515
|
+
if (e._status === 0 || e._status === -1) {
|
|
1516
|
+
e._status = 1, e._result = t;
|
|
1517
|
+
var r = e._ioInfo;
|
|
1518
|
+
r != null && (r.end = performance.now()), n.status === void 0 && (n.status = "fulfilled", n.value = t);
|
|
1519
|
+
}
|
|
1520
|
+
}, function(t) {
|
|
1521
|
+
if (e._status === 0 || e._status === -1) {
|
|
1522
|
+
e._status = 2, e._result = t;
|
|
1523
|
+
var r = e._ioInfo;
|
|
1524
|
+
r != null && (r.end = performance.now()), n.status === void 0 && (n.status = "rejected", n.reason = t);
|
|
1525
|
+
}
|
|
1526
|
+
}), t = e._ioInfo, t != null) {
|
|
1527
|
+
t.value = n;
|
|
1528
|
+
var r = n.displayName;
|
|
1529
|
+
typeof r == "string" && (t.name = r);
|
|
1530
|
+
}
|
|
1531
|
+
e._status === -1 && (e._status = 0, e._result = n);
|
|
1532
|
+
}
|
|
1533
|
+
if (e._status === 1) return t = e._result, t === void 0 && console.error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", t), "default" in t || console.error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", t), t.default;
|
|
1534
|
+
throw e._result;
|
|
1535
|
+
}
|
|
1536
|
+
function O() {
|
|
1537
|
+
var e = q.H;
|
|
1538
|
+
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;
|
|
1539
|
+
}
|
|
1540
|
+
function k() {
|
|
1541
|
+
q.asyncTransitions--;
|
|
1542
|
+
}
|
|
1543
|
+
function A(e) {
|
|
1544
|
+
if (Y === null) try {
|
|
1545
|
+
var n = ("require" + Math.random()).slice(0, 7);
|
|
1546
|
+
Y = (t && t[n]).call(t, "timers").setImmediate;
|
|
1547
|
+
} catch {
|
|
1548
|
+
Y = function(e) {
|
|
1549
|
+
!1 === ve && (ve = !0, typeof MessageChannel > "u" && console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
|
|
1550
|
+
var t = new MessageChannel();
|
|
1551
|
+
t.port1.onmessage = e, t.port2.postMessage(void 0);
|
|
1552
|
+
};
|
|
1553
|
+
}
|
|
1554
|
+
return Y(e);
|
|
1555
|
+
}
|
|
1556
|
+
function j(e) {
|
|
1557
|
+
return 1 < e.length && typeof AggregateError == "function" ? AggregateError(e) : e[0];
|
|
1558
|
+
}
|
|
1559
|
+
function M(e, t) {
|
|
1560
|
+
t !== X - 1 && console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "), X = t;
|
|
1561
|
+
}
|
|
1562
|
+
function N(e, t, n) {
|
|
1563
|
+
var r = q.actQueue;
|
|
1564
|
+
if (r !== null) if (r.length !== 0) try {
|
|
1565
|
+
P(r), A(function() {
|
|
1566
|
+
return N(e, t, n);
|
|
1567
|
+
});
|
|
1568
|
+
return;
|
|
1569
|
+
} catch (e) {
|
|
1570
|
+
q.thrownErrors.push(e);
|
|
1571
|
+
}
|
|
1572
|
+
else q.actQueue = null;
|
|
1573
|
+
0 < q.thrownErrors.length ? (r = j(q.thrownErrors), q.thrownErrors.length = 0, n(r)) : t(e);
|
|
1574
|
+
}
|
|
1575
|
+
function P(e) {
|
|
1576
|
+
if (!Q) {
|
|
1577
|
+
Q = !0;
|
|
1578
|
+
var t = 0;
|
|
1579
|
+
try {
|
|
1580
|
+
for (; t < e.length; t++) {
|
|
1581
|
+
var n = e[t];
|
|
1582
|
+
do {
|
|
1583
|
+
q.didUsePromise = !1;
|
|
1584
|
+
var r = n(!1);
|
|
1585
|
+
if (r !== null) {
|
|
1586
|
+
if (q.didUsePromise) {
|
|
1587
|
+
e[t] = n, e.splice(0, t);
|
|
1588
|
+
return;
|
|
1589
|
+
}
|
|
1590
|
+
n = r;
|
|
1591
|
+
} else break;
|
|
1592
|
+
} while (1);
|
|
1593
|
+
}
|
|
1594
|
+
e.length = 0;
|
|
1595
|
+
} catch (n) {
|
|
1596
|
+
e.splice(0, t + 1), q.thrownErrors.push(n);
|
|
1597
|
+
} finally {
|
|
1598
|
+
Q = !1;
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1603
|
+
var F = Symbol.for("react.transitional.element"), I = Symbol.for("react.portal"), L = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), ee = Symbol.for("react.profiler"), z = Symbol.for("react.consumer"), te = Symbol.for("react.context"), ne = Symbol.for("react.forward_ref"), re = Symbol.for("react.suspense"), ie = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), ae = Symbol.for("react.activity"), H = Symbol.iterator, U = {}, W = {
|
|
1604
|
+
isMounted: function() {
|
|
1605
|
+
return !1;
|
|
1606
|
+
},
|
|
1607
|
+
enqueueForceUpdate: function(e) {
|
|
1608
|
+
i(e, "forceUpdate");
|
|
1609
|
+
},
|
|
1610
|
+
enqueueReplaceState: function(e) {
|
|
1611
|
+
i(e, "replaceState");
|
|
1612
|
+
},
|
|
1613
|
+
enqueueSetState: function(e) {
|
|
1614
|
+
i(e, "setState");
|
|
1615
|
+
}
|
|
1616
|
+
}, oe = Object.assign, G = {};
|
|
1617
|
+
Object.freeze(G), a.prototype.isReactComponent = {}, a.prototype.setState = function(e, t) {
|
|
1618
|
+
if (typeof e != "object" && typeof e != "function" && e != null) throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
|
|
1619
|
+
this.updater.enqueueSetState(this, e, t, "setState");
|
|
1620
|
+
}, a.prototype.forceUpdate = function(e) {
|
|
1621
|
+
this.updater.enqueueForceUpdate(this, e, "forceUpdate");
|
|
1622
|
+
};
|
|
1623
|
+
var K = {
|
|
1624
|
+
isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
|
|
1625
|
+
replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
|
|
1626
|
+
};
|
|
1627
|
+
for ($ in K) K.hasOwnProperty($) && n($, K[$]);
|
|
1628
|
+
o.prototype = a.prototype, K = s.prototype = new o(), K.constructor = s, oe(K, a.prototype), K.isPureReactComponent = !0;
|
|
1629
|
+
var se = Array.isArray, ce = Symbol.for("react.client.reference"), q = {
|
|
1630
|
+
H: null,
|
|
1631
|
+
A: null,
|
|
1632
|
+
T: null,
|
|
1633
|
+
S: null,
|
|
1634
|
+
actQueue: null,
|
|
1635
|
+
asyncTransitions: 0,
|
|
1636
|
+
isBatchingLegacy: !1,
|
|
1637
|
+
didScheduleLegacyUpdate: !1,
|
|
1638
|
+
didUsePromise: !1,
|
|
1639
|
+
thrownErrors: [],
|
|
1640
|
+
getCurrentStack: null,
|
|
1641
|
+
recentlyCreatedOwnerStacks: 0
|
|
1642
|
+
}, J = Object.prototype.hasOwnProperty, le = console.createTask ? console.createTask : function() {
|
|
1643
|
+
return null;
|
|
1644
|
+
};
|
|
1645
|
+
K = { react_stack_bottom_frame: function(e) {
|
|
1646
|
+
return e();
|
|
1647
|
+
} };
|
|
1648
|
+
var ue, de, fe = {}, pe = K.react_stack_bottom_frame.bind(K, m)(), me = le(f(m)), he = !1, ge = /\/+/g, _e = typeof reportError == "function" ? reportError : function(e) {
|
|
1649
|
+
if (typeof window == "object" && typeof window.ErrorEvent == "function") {
|
|
1650
|
+
var t = new window.ErrorEvent("error", {
|
|
1651
|
+
bubbles: !0,
|
|
1652
|
+
cancelable: !0,
|
|
1653
|
+
message: typeof e == "object" && e && typeof e.message == "string" ? String(e.message) : String(e),
|
|
1654
|
+
error: e
|
|
1655
|
+
});
|
|
1656
|
+
if (!window.dispatchEvent(t)) return;
|
|
1657
|
+
} else if (typeof process == "object" && typeof process.emit == "function") {
|
|
1658
|
+
process.emit("uncaughtException", e);
|
|
1659
|
+
return;
|
|
1660
|
+
}
|
|
1661
|
+
console.error(e);
|
|
1662
|
+
}, ve = !1, Y = null, X = 0, Z = !1, Q = !1, ye = typeof queueMicrotask == "function" ? function(e) {
|
|
1663
|
+
queueMicrotask(function() {
|
|
1664
|
+
return queueMicrotask(e);
|
|
1665
|
+
});
|
|
1666
|
+
} : A;
|
|
1667
|
+
K = Object.freeze({
|
|
1668
|
+
__proto__: null,
|
|
1669
|
+
c: function(e) {
|
|
1670
|
+
return O().useMemoCache(e);
|
|
1671
|
+
}
|
|
1672
|
+
});
|
|
1673
|
+
var $ = {
|
|
1674
|
+
map: E,
|
|
1675
|
+
forEach: function(e, t, n) {
|
|
1676
|
+
E(e, function() {
|
|
1677
|
+
t.apply(this, arguments);
|
|
1678
|
+
}, n);
|
|
1679
|
+
},
|
|
1680
|
+
count: function(e) {
|
|
1681
|
+
var t = 0;
|
|
1682
|
+
return E(e, function() {
|
|
1683
|
+
t++;
|
|
1684
|
+
}), t;
|
|
1685
|
+
},
|
|
1686
|
+
toArray: function(e) {
|
|
1687
|
+
return E(e, function(e) {
|
|
1688
|
+
return e;
|
|
1689
|
+
}) || [];
|
|
1690
|
+
},
|
|
1691
|
+
only: function(e) {
|
|
1692
|
+
if (!x(e)) throw Error("React.Children.only expected to receive a single React element child.");
|
|
1693
|
+
return e;
|
|
1694
|
+
}
|
|
1695
|
+
};
|
|
1696
|
+
e.Activity = ae, e.Children = $, e.Component = a, e.Fragment = L, e.Profiler = ee, e.PureComponent = s, e.StrictMode = R, e.Suspense = re, e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = q, e.__COMPILER_RUNTIME = K, e.act = function(e) {
|
|
1697
|
+
var t = q.actQueue, n = X;
|
|
1698
|
+
X++;
|
|
1699
|
+
var r = q.actQueue = t === null ? [] : t, i = !1;
|
|
1700
|
+
try {
|
|
1701
|
+
var a = e();
|
|
1702
|
+
} catch (e) {
|
|
1703
|
+
q.thrownErrors.push(e);
|
|
1704
|
+
}
|
|
1705
|
+
if (0 < q.thrownErrors.length) throw M(t, n), e = j(q.thrownErrors), q.thrownErrors.length = 0, e;
|
|
1706
|
+
if (typeof a == "object" && a && typeof a.then == "function") {
|
|
1707
|
+
var o = a;
|
|
1708
|
+
return ye(function() {
|
|
1709
|
+
i || Z || (Z = !0, console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
|
|
1710
|
+
}), { then: function(e, a) {
|
|
1711
|
+
i = !0, o.then(function(i) {
|
|
1712
|
+
if (M(t, n), n === 0) {
|
|
1713
|
+
try {
|
|
1714
|
+
P(r), A(function() {
|
|
1715
|
+
return N(i, e, a);
|
|
1716
|
+
});
|
|
1717
|
+
} catch (e) {
|
|
1718
|
+
q.thrownErrors.push(e);
|
|
1719
|
+
}
|
|
1720
|
+
if (0 < q.thrownErrors.length) {
|
|
1721
|
+
var o = j(q.thrownErrors);
|
|
1722
|
+
q.thrownErrors.length = 0, a(o);
|
|
1723
|
+
}
|
|
1724
|
+
} else e(i);
|
|
1725
|
+
}, function(e) {
|
|
1726
|
+
M(t, n), 0 < q.thrownErrors.length ? (e = j(q.thrownErrors), q.thrownErrors.length = 0, a(e)) : a(e);
|
|
1727
|
+
});
|
|
1728
|
+
} };
|
|
1729
|
+
}
|
|
1730
|
+
var s = a;
|
|
1731
|
+
if (M(t, n), n === 0 && (P(r), r.length !== 0 && ye(function() {
|
|
1732
|
+
i || Z || (Z = !0, console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"));
|
|
1733
|
+
}), q.actQueue = null), 0 < q.thrownErrors.length) throw e = j(q.thrownErrors), q.thrownErrors.length = 0, e;
|
|
1734
|
+
return { then: function(e, t) {
|
|
1735
|
+
i = !0, n === 0 ? (q.actQueue = r, A(function() {
|
|
1736
|
+
return N(s, e, t);
|
|
1737
|
+
})) : e(s);
|
|
1738
|
+
} };
|
|
1739
|
+
}, e.cache = function(e) {
|
|
1740
|
+
return function() {
|
|
1741
|
+
return e.apply(null, arguments);
|
|
1742
|
+
};
|
|
1743
|
+
}, e.cacheSignal = function() {
|
|
1744
|
+
return null;
|
|
1745
|
+
}, e.captureOwnerStack = function() {
|
|
1746
|
+
var e = q.getCurrentStack;
|
|
1747
|
+
return e === null ? null : e();
|
|
1748
|
+
}, e.cloneElement = function(e, t, n) {
|
|
1749
|
+
if (e == null) throw Error("The argument must be a React element, but you passed " + e + ".");
|
|
1750
|
+
var r = oe({}, e.props), i = e.key, a = e._owner;
|
|
1751
|
+
if (t != null) {
|
|
1752
|
+
var o;
|
|
1753
|
+
a: {
|
|
1754
|
+
if (J.call(t, "ref") && (o = Object.getOwnPropertyDescriptor(t, "ref").get) && o.isReactWarning) {
|
|
1755
|
+
o = !1;
|
|
1756
|
+
break a;
|
|
1757
|
+
}
|
|
1758
|
+
o = t.ref !== void 0;
|
|
1759
|
+
}
|
|
1760
|
+
for (s in o && (a = p()), h(t) && (u(t.key), i = "" + t.key), t) !J.call(t, s) || s === "key" || s === "__self" || s === "__source" || s === "ref" && t.ref === void 0 || (r[s] = t[s]);
|
|
1761
|
+
}
|
|
1762
|
+
var s = arguments.length - 2;
|
|
1763
|
+
if (s === 1) r.children = n;
|
|
1764
|
+
else if (1 < s) {
|
|
1765
|
+
o = Array(s);
|
|
1766
|
+
for (var c = 0; c < s; c++) o[c] = arguments[c + 2];
|
|
1767
|
+
r.children = o;
|
|
1768
|
+
}
|
|
1769
|
+
for (r = v(e.type, i, r, a, e._debugStack, e._debugTask), i = 2; i < arguments.length; i++) b(arguments[i]);
|
|
1770
|
+
return r;
|
|
1771
|
+
}, e.createContext = function(e) {
|
|
1772
|
+
return e = {
|
|
1773
|
+
$$typeof: te,
|
|
1774
|
+
_currentValue: e,
|
|
1775
|
+
_currentValue2: e,
|
|
1776
|
+
_threadCount: 0,
|
|
1777
|
+
Provider: null,
|
|
1778
|
+
Consumer: null
|
|
1779
|
+
}, e.Provider = e, e.Consumer = {
|
|
1780
|
+
$$typeof: z,
|
|
1781
|
+
_context: e
|
|
1782
|
+
}, e._currentRenderer = null, e._currentRenderer2 = null, e;
|
|
1783
|
+
}, e.createElement = function(e, t, n) {
|
|
1784
|
+
for (var r = 2; r < arguments.length; r++) b(arguments[r]);
|
|
1785
|
+
r = {};
|
|
1786
|
+
var i = null;
|
|
1787
|
+
if (t != null) for (c in de || !("__self" in t) || "key" in t || (de = !0, console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")), h(t) && (u(t.key), i = "" + t.key), t) J.call(t, c) && c !== "key" && c !== "__self" && c !== "__source" && (r[c] = t[c]);
|
|
1788
|
+
var a = arguments.length - 2;
|
|
1789
|
+
if (a === 1) r.children = n;
|
|
1790
|
+
else if (1 < a) {
|
|
1791
|
+
for (var o = Array(a), s = 0; s < a; s++) o[s] = arguments[s + 2];
|
|
1792
|
+
Object.freeze && Object.freeze(o), r.children = o;
|
|
1793
|
+
}
|
|
1794
|
+
if (e && e.defaultProps) for (c in a = e.defaultProps, a) r[c] === void 0 && (r[c] = a[c]);
|
|
1795
|
+
i && g(r, typeof e == "function" ? e.displayName || e.name || "Unknown" : e);
|
|
1796
|
+
var c = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
1797
|
+
return v(e, i, r, p(), c ? Error("react-stack-top-frame") : pe, c ? le(f(e)) : me);
|
|
1798
|
+
}, e.createRef = function() {
|
|
1799
|
+
var e = { current: null };
|
|
1800
|
+
return Object.seal(e), e;
|
|
1801
|
+
}, e.forwardRef = function(e) {
|
|
1802
|
+
e != null && e.$$typeof === B ? console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof e == "function" ? e.length !== 0 && e.length !== 2 && console.error("forwardRef render functions accept exactly two parameters: props and ref. %s", e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.") : console.error("forwardRef requires a render function but was given %s.", e === null ? "null" : typeof e), e != null && e.defaultProps != null && console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");
|
|
1803
|
+
var t = {
|
|
1804
|
+
$$typeof: ne,
|
|
1805
|
+
render: e
|
|
1806
|
+
}, n;
|
|
1807
|
+
return Object.defineProperty(t, "displayName", {
|
|
1808
|
+
enumerable: !1,
|
|
1809
|
+
configurable: !0,
|
|
1810
|
+
get: function() {
|
|
1811
|
+
return n;
|
|
1812
|
+
},
|
|
1813
|
+
set: function(t) {
|
|
1814
|
+
n = t, e.name || e.displayName || (Object.defineProperty(e, "name", { value: t }), e.displayName = t);
|
|
1815
|
+
}
|
|
1816
|
+
}), t;
|
|
1817
|
+
}, e.isValidElement = x, e.lazy = function(e) {
|
|
1818
|
+
e = {
|
|
1819
|
+
_status: -1,
|
|
1820
|
+
_result: e
|
|
1821
|
+
};
|
|
1822
|
+
var t = {
|
|
1823
|
+
$$typeof: V,
|
|
1824
|
+
_payload: e,
|
|
1825
|
+
_init: D
|
|
1826
|
+
}, n = {
|
|
1827
|
+
name: "lazy",
|
|
1828
|
+
start: -1,
|
|
1829
|
+
end: -1,
|
|
1830
|
+
value: null,
|
|
1831
|
+
owner: null,
|
|
1832
|
+
debugStack: Error("react-stack-top-frame"),
|
|
1833
|
+
debugTask: console.createTask ? console.createTask("lazy()") : null
|
|
1834
|
+
};
|
|
1835
|
+
return e._ioInfo = n, t._debugInfo = [{ awaited: n }], t;
|
|
1836
|
+
}, e.memo = function(e, t) {
|
|
1837
|
+
e ?? console.error("memo: The first argument must be a component. Instead received: %s", e === null ? "null" : typeof e), t = {
|
|
1838
|
+
$$typeof: B,
|
|
1839
|
+
type: e,
|
|
1840
|
+
compare: t === void 0 ? null : t
|
|
1841
|
+
};
|
|
1842
|
+
var n;
|
|
1843
|
+
return Object.defineProperty(t, "displayName", {
|
|
1844
|
+
enumerable: !1,
|
|
1845
|
+
configurable: !0,
|
|
1846
|
+
get: function() {
|
|
1847
|
+
return n;
|
|
1848
|
+
},
|
|
1849
|
+
set: function(t) {
|
|
1850
|
+
n = t, e.name || e.displayName || (Object.defineProperty(e, "name", { value: t }), e.displayName = t);
|
|
1851
|
+
}
|
|
1852
|
+
}), t;
|
|
1853
|
+
}, e.startTransition = function(e) {
|
|
1854
|
+
var t = q.T, n = {};
|
|
1855
|
+
n._updatedFibers = /* @__PURE__ */ new Set(), q.T = n;
|
|
1856
|
+
try {
|
|
1857
|
+
var r = e(), i = q.S;
|
|
1858
|
+
i !== null && i(n, r), typeof r == "object" && r && typeof r.then == "function" && (q.asyncTransitions++, r.then(k, k), r.then(c, _e));
|
|
1859
|
+
} catch (e) {
|
|
1860
|
+
_e(e);
|
|
1861
|
+
} finally {
|
|
1862
|
+
t === null && n._updatedFibers && (e = n._updatedFibers.size, n._updatedFibers.clear(), 10 < e && console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")), t !== null && n.types !== null && (t.types !== null && t.types !== n.types && console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."), t.types = n.types), q.T = t;
|
|
1863
|
+
}
|
|
1864
|
+
}, e.unstable_useCacheRefresh = function() {
|
|
1865
|
+
return O().useCacheRefresh();
|
|
1866
|
+
}, e.use = function(e) {
|
|
1867
|
+
return O().use(e);
|
|
1868
|
+
}, e.useActionState = function(e, t, n) {
|
|
1869
|
+
return O().useActionState(e, t, n);
|
|
1870
|
+
}, e.useCallback = function(e, t) {
|
|
1871
|
+
return O().useCallback(e, t);
|
|
1872
|
+
}, e.useContext = function(e) {
|
|
1873
|
+
var t = O();
|
|
1874
|
+
return e.$$typeof === z && console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"), t.useContext(e);
|
|
1875
|
+
}, e.useDebugValue = function(e, t) {
|
|
1876
|
+
return O().useDebugValue(e, t);
|
|
1877
|
+
}, e.useDeferredValue = function(e, t) {
|
|
1878
|
+
return O().useDeferredValue(e, t);
|
|
1879
|
+
}, e.useEffect = function(e, t) {
|
|
1880
|
+
return e ?? console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"), O().useEffect(e, t);
|
|
1881
|
+
}, e.useEffectEvent = function(e) {
|
|
1882
|
+
return O().useEffectEvent(e);
|
|
1883
|
+
}, e.useId = function() {
|
|
1884
|
+
return O().useId();
|
|
1885
|
+
}, e.useImperativeHandle = function(e, t, n) {
|
|
1886
|
+
return O().useImperativeHandle(e, t, n);
|
|
1887
|
+
}, e.useInsertionEffect = function(e, t) {
|
|
1888
|
+
return e ?? console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"), O().useInsertionEffect(e, t);
|
|
1889
|
+
}, e.useLayoutEffect = function(e, t) {
|
|
1890
|
+
return e ?? console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"), O().useLayoutEffect(e, t);
|
|
1891
|
+
}, e.useMemo = function(e, t) {
|
|
1892
|
+
return O().useMemo(e, t);
|
|
1893
|
+
}, e.useOptimistic = function(e, t) {
|
|
1894
|
+
return O().useOptimistic(e, t);
|
|
1895
|
+
}, e.useReducer = function(e, t, n) {
|
|
1896
|
+
return O().useReducer(e, t, n);
|
|
1897
|
+
}, e.useRef = function(e) {
|
|
1898
|
+
return O().useRef(e);
|
|
1899
|
+
}, e.useState = function(e) {
|
|
1900
|
+
return O().useState(e);
|
|
1901
|
+
}, e.useSyncExternalStore = function(e, t, n) {
|
|
1902
|
+
return O().useSyncExternalStore(e, t, n);
|
|
1903
|
+
}, e.useTransition = function() {
|
|
1904
|
+
return O().useTransition();
|
|
1905
|
+
}, e.version = "19.2.7", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1906
|
+
})();
|
|
1907
|
+
})), k = /* @__PURE__ */ e(((e, t) => {
|
|
1908
|
+
process.env.NODE_ENV === "production" ? t.exports = D() : t.exports = O();
|
|
1909
|
+
})), A = /* @__PURE__ */ e(((e) => {
|
|
1910
|
+
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
1911
|
+
function r(e, n, r) {
|
|
1912
|
+
var i = null;
|
|
1913
|
+
if (r !== void 0 && (i = "" + r), n.key !== void 0 && (i = "" + n.key), "key" in n) for (var a in r = {}, n) a !== "key" && (r[a] = n[a]);
|
|
1914
|
+
else r = n;
|
|
1915
|
+
return n = r.ref, {
|
|
1916
|
+
$$typeof: t,
|
|
1917
|
+
type: e,
|
|
1918
|
+
key: i,
|
|
1919
|
+
ref: n === void 0 ? null : n,
|
|
1920
|
+
props: r
|
|
1921
|
+
};
|
|
1922
|
+
}
|
|
1923
|
+
e.Fragment = n, e.jsx = r, e.jsxs = r;
|
|
1924
|
+
})), j = /* @__PURE__ */ e(((e) => {
|
|
1925
|
+
process.env.NODE_ENV !== "production" && (function() {
|
|
1926
|
+
function t(e) {
|
|
1927
|
+
if (e == null) return null;
|
|
1928
|
+
if (typeof e == "function") return e.$$typeof === O ? null : e.displayName || e.name || null;
|
|
1929
|
+
if (typeof e == "string") return e;
|
|
1930
|
+
switch (e) {
|
|
1931
|
+
case _: return "Fragment";
|
|
1932
|
+
case y: return "Profiler";
|
|
1933
|
+
case v: return "StrictMode";
|
|
1934
|
+
case C: return "Suspense";
|
|
1935
|
+
case w: return "SuspenseList";
|
|
1936
|
+
case D: return "Activity";
|
|
1937
|
+
}
|
|
1938
|
+
if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
|
|
1939
|
+
case g: return "Portal";
|
|
1940
|
+
case x: return e.displayName || "Context";
|
|
1941
|
+
case b: return (e._context.displayName || "Context") + ".Consumer";
|
|
1942
|
+
case S:
|
|
1943
|
+
var n = e.render;
|
|
1944
|
+
return e = e.displayName, e ||= (e = n.displayName || n.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
|
|
1945
|
+
case T: return n = e.displayName || null, n === null ? t(e.type) || "Memo" : n;
|
|
1946
|
+
case E:
|
|
1947
|
+
n = e._payload, e = e._init;
|
|
1948
|
+
try {
|
|
1949
|
+
return t(e(n));
|
|
1950
|
+
} catch {}
|
|
1951
|
+
}
|
|
1952
|
+
return null;
|
|
1953
|
+
}
|
|
1954
|
+
function n(e) {
|
|
1955
|
+
return "" + e;
|
|
1956
|
+
}
|
|
1957
|
+
function r(e) {
|
|
1958
|
+
try {
|
|
1959
|
+
n(e);
|
|
1960
|
+
var t = !1;
|
|
1961
|
+
} catch {
|
|
1962
|
+
t = !0;
|
|
1963
|
+
}
|
|
1964
|
+
if (t) {
|
|
1965
|
+
t = console;
|
|
1966
|
+
var r = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
1967
|
+
return r.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", i), n(e);
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
function i(e) {
|
|
1971
|
+
if (e === _) return "<>";
|
|
1972
|
+
if (typeof e == "object" && e && e.$$typeof === E) return "<...>";
|
|
1973
|
+
try {
|
|
1974
|
+
var n = t(e);
|
|
1975
|
+
return n ? "<" + n + ">" : "<...>";
|
|
1976
|
+
} catch {
|
|
1977
|
+
return "<...>";
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
function a() {
|
|
1981
|
+
var e = A.A;
|
|
1982
|
+
return e === null ? null : e.getOwner();
|
|
1983
|
+
}
|
|
1984
|
+
function o() {
|
|
1985
|
+
return Error("react-stack-top-frame");
|
|
1986
|
+
}
|
|
1987
|
+
function s(e) {
|
|
1988
|
+
if (j.call(e, "key")) {
|
|
1989
|
+
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
1990
|
+
if (t && t.isReactWarning) return !1;
|
|
1991
|
+
}
|
|
1992
|
+
return e.key !== void 0;
|
|
1993
|
+
}
|
|
1994
|
+
function c(e, t) {
|
|
1995
|
+
function n() {
|
|
1996
|
+
P || (P = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
|
|
1997
|
+
}
|
|
1998
|
+
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
1999
|
+
get: n,
|
|
2000
|
+
configurable: !0
|
|
2001
|
+
});
|
|
2002
|
+
}
|
|
2003
|
+
function l() {
|
|
2004
|
+
var e = t(this.type);
|
|
2005
|
+
return F[e] || (F[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
|
|
2006
|
+
}
|
|
2007
|
+
function u(e, t, n, r, i, a) {
|
|
2008
|
+
var o = n.ref;
|
|
2009
|
+
return e = {
|
|
2010
|
+
$$typeof: h,
|
|
2011
|
+
type: e,
|
|
2012
|
+
key: t,
|
|
2013
|
+
props: n,
|
|
2014
|
+
_owner: r
|
|
2015
|
+
}, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
|
|
2016
|
+
enumerable: !1,
|
|
2017
|
+
value: null
|
|
2018
|
+
}) : Object.defineProperty(e, "ref", {
|
|
2019
|
+
enumerable: !1,
|
|
2020
|
+
get: l
|
|
2021
|
+
}), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
2022
|
+
configurable: !1,
|
|
2023
|
+
enumerable: !1,
|
|
2024
|
+
writable: !0,
|
|
2025
|
+
value: 0
|
|
2026
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
2027
|
+
configurable: !1,
|
|
2028
|
+
enumerable: !1,
|
|
2029
|
+
writable: !0,
|
|
2030
|
+
value: null
|
|
2031
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
2032
|
+
configurable: !1,
|
|
2033
|
+
enumerable: !1,
|
|
2034
|
+
writable: !0,
|
|
2035
|
+
value: i
|
|
2036
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
2037
|
+
configurable: !1,
|
|
2038
|
+
enumerable: !1,
|
|
2039
|
+
writable: !0,
|
|
2040
|
+
value: a
|
|
2041
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
2042
|
+
}
|
|
2043
|
+
function d(e, n, i, o, l, d) {
|
|
2044
|
+
var p = n.children;
|
|
2045
|
+
if (p !== void 0) if (o) if (M(p)) {
|
|
2046
|
+
for (o = 0; o < p.length; o++) f(p[o]);
|
|
2047
|
+
Object.freeze && Object.freeze(p);
|
|
2048
|
+
} else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
2049
|
+
else f(p);
|
|
2050
|
+
if (j.call(n, "key")) {
|
|
2051
|
+
p = t(e);
|
|
2052
|
+
var m = Object.keys(n).filter(function(e) {
|
|
2053
|
+
return e !== "key";
|
|
2054
|
+
});
|
|
2055
|
+
o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", R[p + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, p, m, p), R[p + o] = !0);
|
|
2056
|
+
}
|
|
2057
|
+
if (p = null, i !== void 0 && (r(i), p = "" + i), s(n) && (r(n.key), p = "" + n.key), "key" in n) for (var h in i = {}, n) h !== "key" && (i[h] = n[h]);
|
|
2058
|
+
else i = n;
|
|
2059
|
+
return p && c(i, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), u(e, p, i, a(), l, d);
|
|
2060
|
+
}
|
|
2061
|
+
function f(e) {
|
|
2062
|
+
p(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === E && (e._payload.status === "fulfilled" ? p(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
2063
|
+
}
|
|
2064
|
+
function p(e) {
|
|
2065
|
+
return typeof e == "object" && !!e && e.$$typeof === h;
|
|
2066
|
+
}
|
|
2067
|
+
var m = k(), h = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), x = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), D = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), A = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, M = Array.isArray, N = console.createTask ? console.createTask : function() {
|
|
2068
|
+
return null;
|
|
2069
|
+
};
|
|
2070
|
+
m = { react_stack_bottom_frame: function(e) {
|
|
2071
|
+
return e();
|
|
2072
|
+
} };
|
|
2073
|
+
var P, F = {}, I = m.react_stack_bottom_frame.bind(m, o)(), L = N(i(o)), R = {};
|
|
2074
|
+
e.Fragment = _, e.jsx = function(e, t, n) {
|
|
2075
|
+
var r = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
2076
|
+
return d(e, t, n, !1, r ? Error("react-stack-top-frame") : I, r ? N(i(e)) : L);
|
|
2077
|
+
}, e.jsxs = function(e, t, n) {
|
|
2078
|
+
var r = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
2079
|
+
return d(e, t, n, !0, r ? Error("react-stack-top-frame") : I, r ? N(i(e)) : L);
|
|
2080
|
+
};
|
|
2081
|
+
})();
|
|
2082
|
+
})), M = /* @__PURE__ */ e(((e, t) => {
|
|
2083
|
+
process.env.NODE_ENV === "production" ? t.exports = A() : t.exports = j();
|
|
2084
|
+
})), N = k(), P = M(), F = class extends N.Component {
|
|
2085
|
+
constructor(e) {
|
|
2086
|
+
super(e), this.unfilteredDocuments = [], this.state = {
|
|
2087
|
+
documents: [],
|
|
2088
|
+
mode: 0
|
|
2089
|
+
};
|
|
2090
|
+
}
|
|
2091
|
+
async componentDidMount() {
|
|
2092
|
+
let { controller: e } = this.props;
|
|
2093
|
+
this.unsubscriber = e.onChange((t) => {
|
|
2094
|
+
t.documentCollection && (this.unfilteredDocuments = t.documentCollection, this.setState({ documents: e.filter(this.unfilteredDocuments) })), t.action === "filterChange" ? this.setState({ documents: e.filter(this.unfilteredDocuments) }) : this.setState({});
|
|
2095
|
+
}), this.unfilteredDocuments = await e.documentCollection(), this.setState({ documents: e.filter(this.unfilteredDocuments) });
|
|
2096
|
+
}
|
|
2097
|
+
componentWillUnmount() {
|
|
2098
|
+
this.unsubscriber?.();
|
|
2099
|
+
}
|
|
2100
|
+
newDocument() {
|
|
2101
|
+
this.props.controller.newDocument(), this.setState({ mode: 1 });
|
|
2102
|
+
}
|
|
2103
|
+
editDocument(e) {
|
|
2104
|
+
this.props.controller.setDocument(e), this.setState({ mode: 2 });
|
|
2105
|
+
}
|
|
2106
|
+
async storeDocument(e) {
|
|
2107
|
+
let { controller: t, layout: n } = this.props;
|
|
2108
|
+
t.setDocument(e), await t.storeDocument(), n === "formAndItems" ? this.newDocument() : this.setState({ mode: 0 });
|
|
2109
|
+
}
|
|
2110
|
+
invokeContentViewChild(e) {
|
|
2111
|
+
let { children: t, layout: n, controller: r } = this.props, { mode: i } = this.state, a = n !== "formAndItems";
|
|
2112
|
+
if (!r.document) return;
|
|
2113
|
+
let o = {
|
|
2114
|
+
controller: r,
|
|
2115
|
+
submitButtonCaption: i == 2 ? e?.updateButtonLabel : e?.addButtonLabel,
|
|
2116
|
+
onSubmit: (e) => this.storeDocument(e),
|
|
2117
|
+
onCancel: a ? () => this.setState({ mode: 0 }) : () => this.newDocument()
|
|
2118
|
+
};
|
|
2119
|
+
return typeof t[0] == "function" ? (0, N.cloneElement)(t[0](o), { key: r.document.id }) : (0, N.cloneElement)(t[0], {
|
|
2120
|
+
key: r.document.id,
|
|
2121
|
+
...o
|
|
2122
|
+
});
|
|
2123
|
+
}
|
|
2124
|
+
invokeDetailViewChild(e) {
|
|
2125
|
+
let { children: t, controller: n } = this.props, r = {
|
|
2126
|
+
document: e,
|
|
2127
|
+
onSelect: (e) => this.editDocument(e),
|
|
2128
|
+
onDelete: (e) => n.setDocument(e).deleteDocument()
|
|
2129
|
+
};
|
|
2130
|
+
return typeof t[1] == "function" ? (0, N.cloneElement)(t[1](r), { key: e.id }) : (0, N.cloneElement)(t[1], {
|
|
2131
|
+
key: e.id,
|
|
2132
|
+
...r
|
|
2133
|
+
});
|
|
2134
|
+
}
|
|
2135
|
+
render() {
|
|
2136
|
+
let { mode: e, documents: t } = this.state, { className: n, cardAddButton: r, controller: i } = this.props, a = w(i.document?.className), o = this.props.labels || {}, s = this.props.layout || "itemsAlways";
|
|
2137
|
+
typeof o == "function" && (o = o(i));
|
|
2138
|
+
let { addNewDocumentLabel: c, singularDocumentInCollectionCaption: l, documentsInCollectionCaption: u, noDocumentsFoundLabel: d } = o;
|
|
2139
|
+
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
2140
|
+
className: `crud-panel ${a} ${n || ""}`,
|
|
2141
|
+
children: [
|
|
2142
|
+
e === 0 && s !== "formAndItems" && !r && /* @__PURE__ */ (0, P.jsx)("div", {
|
|
2143
|
+
className: "header",
|
|
2144
|
+
children: this.props.header ? typeof this.props.header == "function" ? this.props.header(i, () => this.newDocument(), o) : this.props.header : /* @__PURE__ */ (0, P.jsx)("button", {
|
|
2145
|
+
onClick: () => this.newDocument(),
|
|
2146
|
+
children: c
|
|
2147
|
+
})
|
|
2148
|
+
}),
|
|
2149
|
+
(s === "formAndItems" || e === 1 || e === 2) && /* @__PURE__ */ (0, P.jsx)("div", {
|
|
2150
|
+
className: "content-panel",
|
|
2151
|
+
children: this.invokeContentViewChild(o)
|
|
2152
|
+
}),
|
|
2153
|
+
(s === "itemsAlways" || s === "formAndItems" || e === 0) && /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
2154
|
+
className: "collection-panel",
|
|
2155
|
+
children: [t?.length > 0 && /* @__PURE__ */ (0, P.jsx)("h3", { children: t.length > 1 ? u : l || u }), /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
2156
|
+
className: "documents",
|
|
2157
|
+
children: [r && /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
2158
|
+
className: "crud-card card-add-button clickable",
|
|
2159
|
+
onClick: () => this.newDocument(),
|
|
2160
|
+
children: [/* @__PURE__ */ (0, P.jsx)("div", {
|
|
2161
|
+
className: "button-element",
|
|
2162
|
+
children: r
|
|
2163
|
+
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
2164
|
+
className: "add-label",
|
|
2165
|
+
children: c
|
|
2166
|
+
})]
|
|
2167
|
+
}), t?.length ? t.map((e) => this.invokeDetailViewChild(e)) : /* @__PURE__ */ (0, P.jsx)("p", { children: d })]
|
|
2168
|
+
})]
|
|
2169
|
+
}),
|
|
2170
|
+
/* @__PURE__ */ (0, P.jsx)("div", {
|
|
2171
|
+
className: "footer",
|
|
2172
|
+
children: this.props.footer && typeof this.props.footer == "function" ? this.props.footer(i, () => this.newDocument(), o) : this.props.footer
|
|
2173
|
+
})
|
|
2174
|
+
]
|
|
2175
|
+
});
|
|
2176
|
+
}
|
|
805
2177
|
};
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
};
|
|
809
|
-
let Ge = ne;
|
|
810
|
-
var Te = { exports: {} }, _e = {};
|
|
811
|
-
var Qe;
|
|
812
|
-
function Ot() {
|
|
813
|
-
if (Qe) return _e;
|
|
814
|
-
Qe = 1;
|
|
815
|
-
var n = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
816
|
-
function s(a, c, p) {
|
|
817
|
-
var O = null;
|
|
818
|
-
if (p !== void 0 && (O = "" + p), c.key !== void 0 && (O = "" + c.key), "key" in c) {
|
|
819
|
-
p = {};
|
|
820
|
-
for (var S in c)
|
|
821
|
-
S !== "key" && (p[S] = c[S]);
|
|
822
|
-
} else p = c;
|
|
823
|
-
return c = p.ref, {
|
|
824
|
-
$$typeof: n,
|
|
825
|
-
type: a,
|
|
826
|
-
key: O,
|
|
827
|
-
ref: c !== void 0 ? c : null,
|
|
828
|
-
props: p
|
|
829
|
-
};
|
|
830
|
-
}
|
|
831
|
-
return _e.Fragment = t, _e.jsx = s, _e.jsxs = s, _e;
|
|
832
|
-
}
|
|
833
|
-
var ye = {}, Oe = { exports: {} }, _ = {};
|
|
834
|
-
var Xe;
|
|
835
|
-
function St() {
|
|
836
|
-
if (Xe) return _;
|
|
837
|
-
Xe = 1;
|
|
838
|
-
var n = Symbol.for("react.transitional.element"), t = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), p = Symbol.for("react.consumer"), O = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), V = Symbol.for("react.memo"), I = Symbol.for("react.lazy"), L = Symbol.for("react.activity"), $ = Symbol.iterator;
|
|
839
|
-
function U(r) {
|
|
840
|
-
return r === null || typeof r != "object" ? null : (r = $ && r[$] || r["@@iterator"], typeof r == "function" ? r : null);
|
|
841
|
-
}
|
|
842
|
-
var Q = {
|
|
843
|
-
isMounted: function() {
|
|
844
|
-
return !1;
|
|
845
|
-
},
|
|
846
|
-
enqueueForceUpdate: function() {
|
|
847
|
-
},
|
|
848
|
-
enqueueReplaceState: function() {
|
|
849
|
-
},
|
|
850
|
-
enqueueSetState: function() {
|
|
851
|
-
}
|
|
852
|
-
}, oe = Object.assign, X = {};
|
|
853
|
-
function W(r, i, f) {
|
|
854
|
-
this.props = r, this.context = i, this.refs = X, this.updater = f || Q;
|
|
855
|
-
}
|
|
856
|
-
W.prototype.isReactComponent = {}, W.prototype.setState = function(r, i) {
|
|
857
|
-
if (typeof r != "object" && typeof r != "function" && r != null)
|
|
858
|
-
throw Error(
|
|
859
|
-
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
860
|
-
);
|
|
861
|
-
this.updater.enqueueSetState(this, r, i, "setState");
|
|
862
|
-
}, W.prototype.forceUpdate = function(r) {
|
|
863
|
-
this.updater.enqueueForceUpdate(this, r, "forceUpdate");
|
|
864
|
-
};
|
|
865
|
-
function K() {
|
|
866
|
-
}
|
|
867
|
-
K.prototype = W.prototype;
|
|
868
|
-
function se(r, i, f) {
|
|
869
|
-
this.props = r, this.context = i, this.refs = X, this.updater = f || Q;
|
|
870
|
-
}
|
|
871
|
-
var Z = se.prototype = new K();
|
|
872
|
-
Z.constructor = se, oe(Z, W.prototype), Z.isPureReactComponent = !0;
|
|
873
|
-
var F = Array.isArray;
|
|
874
|
-
function ie() {
|
|
875
|
-
}
|
|
876
|
-
var R = { H: null, A: null, T: null, S: null }, le = Object.prototype.hasOwnProperty;
|
|
877
|
-
function N(r, i, f) {
|
|
878
|
-
var d = f.ref;
|
|
879
|
-
return {
|
|
880
|
-
$$typeof: n,
|
|
881
|
-
type: r,
|
|
882
|
-
key: i,
|
|
883
|
-
ref: d !== void 0 ? d : null,
|
|
884
|
-
props: f
|
|
885
|
-
};
|
|
886
|
-
}
|
|
887
|
-
function J(r, i) {
|
|
888
|
-
return N(r.type, i, r.props);
|
|
889
|
-
}
|
|
890
|
-
function ue(r) {
|
|
891
|
-
return typeof r == "object" && r !== null && r.$$typeof === n;
|
|
892
|
-
}
|
|
893
|
-
function C(r) {
|
|
894
|
-
var i = { "=": "=0", ":": "=2" };
|
|
895
|
-
return "$" + r.replace(/[=:]/g, function(f) {
|
|
896
|
-
return i[f];
|
|
897
|
-
});
|
|
898
|
-
}
|
|
899
|
-
var ee = /\/+/g;
|
|
900
|
-
function z(r, i) {
|
|
901
|
-
return typeof r == "object" && r !== null && r.key != null ? C("" + r.key) : i.toString(36);
|
|
902
|
-
}
|
|
903
|
-
function x(r) {
|
|
904
|
-
switch (r.status) {
|
|
905
|
-
case "fulfilled":
|
|
906
|
-
return r.value;
|
|
907
|
-
case "rejected":
|
|
908
|
-
throw r.reason;
|
|
909
|
-
default:
|
|
910
|
-
switch (typeof r.status == "string" ? r.then(ie, ie) : (r.status = "pending", r.then(
|
|
911
|
-
function(i) {
|
|
912
|
-
r.status === "pending" && (r.status = "fulfilled", r.value = i);
|
|
913
|
-
},
|
|
914
|
-
function(i) {
|
|
915
|
-
r.status === "pending" && (r.status = "rejected", r.reason = i);
|
|
916
|
-
}
|
|
917
|
-
)), r.status) {
|
|
918
|
-
case "fulfilled":
|
|
919
|
-
return r.value;
|
|
920
|
-
case "rejected":
|
|
921
|
-
throw r.reason;
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
throw r;
|
|
925
|
-
}
|
|
926
|
-
function M(r, i, f, d, g) {
|
|
927
|
-
var w = typeof r;
|
|
928
|
-
(w === "undefined" || w === "boolean") && (r = null);
|
|
929
|
-
var m = !1;
|
|
930
|
-
if (r === null) m = !0;
|
|
931
|
-
else
|
|
932
|
-
switch (w) {
|
|
933
|
-
case "bigint":
|
|
934
|
-
case "string":
|
|
935
|
-
case "number":
|
|
936
|
-
m = !0;
|
|
937
|
-
break;
|
|
938
|
-
case "object":
|
|
939
|
-
switch (r.$$typeof) {
|
|
940
|
-
case n:
|
|
941
|
-
case t:
|
|
942
|
-
m = !0;
|
|
943
|
-
break;
|
|
944
|
-
case I:
|
|
945
|
-
return m = r._init, M(
|
|
946
|
-
m(r._payload),
|
|
947
|
-
i,
|
|
948
|
-
f,
|
|
949
|
-
d,
|
|
950
|
-
g
|
|
951
|
-
);
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
if (m)
|
|
955
|
-
return g = g(r), m = d === "" ? "." + z(r, 0) : d, F(g) ? (f = "", m != null && (f = m.replace(ee, "$&/") + "/"), M(g, i, f, "", function(G) {
|
|
956
|
-
return G;
|
|
957
|
-
})) : g != null && (ue(g) && (g = J(
|
|
958
|
-
g,
|
|
959
|
-
f + (g.key == null || r && r.key === g.key ? "" : ("" + g.key).replace(
|
|
960
|
-
ee,
|
|
961
|
-
"$&/"
|
|
962
|
-
) + "/") + m
|
|
963
|
-
)), i.push(g)), 1;
|
|
964
|
-
m = 0;
|
|
965
|
-
var k = d === "" ? "." : d + ":";
|
|
966
|
-
if (F(r))
|
|
967
|
-
for (var P = 0; P < r.length; P++)
|
|
968
|
-
d = r[P], w = k + z(d, P), m += M(
|
|
969
|
-
d,
|
|
970
|
-
i,
|
|
971
|
-
f,
|
|
972
|
-
w,
|
|
973
|
-
g
|
|
974
|
-
);
|
|
975
|
-
else if (P = U(r), typeof P == "function")
|
|
976
|
-
for (r = P.call(r), P = 0; !(d = r.next()).done; )
|
|
977
|
-
d = d.value, w = k + z(d, P++), m += M(
|
|
978
|
-
d,
|
|
979
|
-
i,
|
|
980
|
-
f,
|
|
981
|
-
w,
|
|
982
|
-
g
|
|
983
|
-
);
|
|
984
|
-
else if (w === "object") {
|
|
985
|
-
if (typeof r.then == "function")
|
|
986
|
-
return M(
|
|
987
|
-
x(r),
|
|
988
|
-
i,
|
|
989
|
-
f,
|
|
990
|
-
d,
|
|
991
|
-
g
|
|
992
|
-
);
|
|
993
|
-
throw i = String(r), Error(
|
|
994
|
-
"Objects are not valid as a React child (found: " + (i === "[object Object]" ? "object with keys {" + Object.keys(r).join(", ") + "}" : i) + "). If you meant to render a collection of children, use an array instead."
|
|
995
|
-
);
|
|
996
|
-
}
|
|
997
|
-
return m;
|
|
998
|
-
}
|
|
999
|
-
function q(r, i, f) {
|
|
1000
|
-
if (r == null) return r;
|
|
1001
|
-
var d = [], g = 0;
|
|
1002
|
-
return M(r, d, "", "", function(w) {
|
|
1003
|
-
return i.call(f, w, g++);
|
|
1004
|
-
}), d;
|
|
1005
|
-
}
|
|
1006
|
-
function te(r) {
|
|
1007
|
-
if (r._status === -1) {
|
|
1008
|
-
var i = r._result;
|
|
1009
|
-
i = i(), i.then(
|
|
1010
|
-
function(f) {
|
|
1011
|
-
(r._status === 0 || r._status === -1) && (r._status = 1, r._result = f);
|
|
1012
|
-
},
|
|
1013
|
-
function(f) {
|
|
1014
|
-
(r._status === 0 || r._status === -1) && (r._status = 2, r._result = f);
|
|
1015
|
-
}
|
|
1016
|
-
), r._status === -1 && (r._status = 0, r._result = i);
|
|
1017
|
-
}
|
|
1018
|
-
if (r._status === 1) return r._result.default;
|
|
1019
|
-
throw r._result;
|
|
1020
|
-
}
|
|
1021
|
-
var B = typeof reportError == "function" ? reportError : function(r) {
|
|
1022
|
-
if (typeof window == "object" && typeof window.ErrorEvent == "function") {
|
|
1023
|
-
var i = new window.ErrorEvent("error", {
|
|
1024
|
-
bubbles: !0,
|
|
1025
|
-
cancelable: !0,
|
|
1026
|
-
message: typeof r == "object" && r !== null && typeof r.message == "string" ? String(r.message) : String(r),
|
|
1027
|
-
error: r
|
|
1028
|
-
});
|
|
1029
|
-
if (!window.dispatchEvent(i)) return;
|
|
1030
|
-
} else if (typeof process == "object" && typeof process.emit == "function") {
|
|
1031
|
-
process.emit("uncaughtException", r);
|
|
1032
|
-
return;
|
|
1033
|
-
}
|
|
1034
|
-
console.error(r);
|
|
1035
|
-
}, ae = {
|
|
1036
|
-
map: q,
|
|
1037
|
-
forEach: function(r, i, f) {
|
|
1038
|
-
q(
|
|
1039
|
-
r,
|
|
1040
|
-
function() {
|
|
1041
|
-
i.apply(this, arguments);
|
|
1042
|
-
},
|
|
1043
|
-
f
|
|
1044
|
-
);
|
|
1045
|
-
},
|
|
1046
|
-
count: function(r) {
|
|
1047
|
-
var i = 0;
|
|
1048
|
-
return q(r, function() {
|
|
1049
|
-
i++;
|
|
1050
|
-
}), i;
|
|
1051
|
-
},
|
|
1052
|
-
toArray: function(r) {
|
|
1053
|
-
return q(r, function(i) {
|
|
1054
|
-
return i;
|
|
1055
|
-
}) || [];
|
|
1056
|
-
},
|
|
1057
|
-
only: function(r) {
|
|
1058
|
-
if (!ue(r))
|
|
1059
|
-
throw Error(
|
|
1060
|
-
"React.Children.only expected to receive a single React element child."
|
|
1061
|
-
);
|
|
1062
|
-
return r;
|
|
1063
|
-
}
|
|
1064
|
-
};
|
|
1065
|
-
return _.Activity = L, _.Children = ae, _.Component = W, _.Fragment = s, _.Profiler = c, _.PureComponent = se, _.StrictMode = a, _.Suspense = D, _.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = R, _.__COMPILER_RUNTIME = {
|
|
1066
|
-
__proto__: null,
|
|
1067
|
-
c: function(r) {
|
|
1068
|
-
return R.H.useMemoCache(r);
|
|
1069
|
-
}
|
|
1070
|
-
}, _.cache = function(r) {
|
|
1071
|
-
return function() {
|
|
1072
|
-
return r.apply(null, arguments);
|
|
1073
|
-
};
|
|
1074
|
-
}, _.cacheSignal = function() {
|
|
1075
|
-
return null;
|
|
1076
|
-
}, _.cloneElement = function(r, i, f) {
|
|
1077
|
-
if (r == null)
|
|
1078
|
-
throw Error(
|
|
1079
|
-
"The argument must be a React element, but you passed " + r + "."
|
|
1080
|
-
);
|
|
1081
|
-
var d = oe({}, r.props), g = r.key;
|
|
1082
|
-
if (i != null)
|
|
1083
|
-
for (w in i.key !== void 0 && (g = "" + i.key), i)
|
|
1084
|
-
!le.call(i, w) || w === "key" || w === "__self" || w === "__source" || w === "ref" && i.ref === void 0 || (d[w] = i[w]);
|
|
1085
|
-
var w = arguments.length - 2;
|
|
1086
|
-
if (w === 1) d.children = f;
|
|
1087
|
-
else if (1 < w) {
|
|
1088
|
-
for (var m = Array(w), k = 0; k < w; k++)
|
|
1089
|
-
m[k] = arguments[k + 2];
|
|
1090
|
-
d.children = m;
|
|
1091
|
-
}
|
|
1092
|
-
return N(r.type, g, d);
|
|
1093
|
-
}, _.createContext = function(r) {
|
|
1094
|
-
return r = {
|
|
1095
|
-
$$typeof: O,
|
|
1096
|
-
_currentValue: r,
|
|
1097
|
-
_currentValue2: r,
|
|
1098
|
-
_threadCount: 0,
|
|
1099
|
-
Provider: null,
|
|
1100
|
-
Consumer: null
|
|
1101
|
-
}, r.Provider = r, r.Consumer = {
|
|
1102
|
-
$$typeof: p,
|
|
1103
|
-
_context: r
|
|
1104
|
-
}, r;
|
|
1105
|
-
}, _.createElement = function(r, i, f) {
|
|
1106
|
-
var d, g = {}, w = null;
|
|
1107
|
-
if (i != null)
|
|
1108
|
-
for (d in i.key !== void 0 && (w = "" + i.key), i)
|
|
1109
|
-
le.call(i, d) && d !== "key" && d !== "__self" && d !== "__source" && (g[d] = i[d]);
|
|
1110
|
-
var m = arguments.length - 2;
|
|
1111
|
-
if (m === 1) g.children = f;
|
|
1112
|
-
else if (1 < m) {
|
|
1113
|
-
for (var k = Array(m), P = 0; P < m; P++)
|
|
1114
|
-
k[P] = arguments[P + 2];
|
|
1115
|
-
g.children = k;
|
|
1116
|
-
}
|
|
1117
|
-
if (r && r.defaultProps)
|
|
1118
|
-
for (d in m = r.defaultProps, m)
|
|
1119
|
-
g[d] === void 0 && (g[d] = m[d]);
|
|
1120
|
-
return N(r, w, g);
|
|
1121
|
-
}, _.createRef = function() {
|
|
1122
|
-
return { current: null };
|
|
1123
|
-
}, _.forwardRef = function(r) {
|
|
1124
|
-
return { $$typeof: S, render: r };
|
|
1125
|
-
}, _.isValidElement = ue, _.lazy = function(r) {
|
|
1126
|
-
return {
|
|
1127
|
-
$$typeof: I,
|
|
1128
|
-
_payload: { _status: -1, _result: r },
|
|
1129
|
-
_init: te
|
|
1130
|
-
};
|
|
1131
|
-
}, _.memo = function(r, i) {
|
|
1132
|
-
return {
|
|
1133
|
-
$$typeof: V,
|
|
1134
|
-
type: r,
|
|
1135
|
-
compare: i === void 0 ? null : i
|
|
1136
|
-
};
|
|
1137
|
-
}, _.startTransition = function(r) {
|
|
1138
|
-
var i = R.T, f = {};
|
|
1139
|
-
R.T = f;
|
|
1140
|
-
try {
|
|
1141
|
-
var d = r(), g = R.S;
|
|
1142
|
-
g !== null && g(f, d), typeof d == "object" && d !== null && typeof d.then == "function" && d.then(ie, B);
|
|
1143
|
-
} catch (w) {
|
|
1144
|
-
B(w);
|
|
1145
|
-
} finally {
|
|
1146
|
-
i !== null && f.types !== null && (i.types = f.types), R.T = i;
|
|
1147
|
-
}
|
|
1148
|
-
}, _.unstable_useCacheRefresh = function() {
|
|
1149
|
-
return R.H.useCacheRefresh();
|
|
1150
|
-
}, _.use = function(r) {
|
|
1151
|
-
return R.H.use(r);
|
|
1152
|
-
}, _.useActionState = function(r, i, f) {
|
|
1153
|
-
return R.H.useActionState(r, i, f);
|
|
1154
|
-
}, _.useCallback = function(r, i) {
|
|
1155
|
-
return R.H.useCallback(r, i);
|
|
1156
|
-
}, _.useContext = function(r) {
|
|
1157
|
-
return R.H.useContext(r);
|
|
1158
|
-
}, _.useDebugValue = function() {
|
|
1159
|
-
}, _.useDeferredValue = function(r, i) {
|
|
1160
|
-
return R.H.useDeferredValue(r, i);
|
|
1161
|
-
}, _.useEffect = function(r, i) {
|
|
1162
|
-
return R.H.useEffect(r, i);
|
|
1163
|
-
}, _.useEffectEvent = function(r) {
|
|
1164
|
-
return R.H.useEffectEvent(r);
|
|
1165
|
-
}, _.useId = function() {
|
|
1166
|
-
return R.H.useId();
|
|
1167
|
-
}, _.useImperativeHandle = function(r, i, f) {
|
|
1168
|
-
return R.H.useImperativeHandle(r, i, f);
|
|
1169
|
-
}, _.useInsertionEffect = function(r, i) {
|
|
1170
|
-
return R.H.useInsertionEffect(r, i);
|
|
1171
|
-
}, _.useLayoutEffect = function(r, i) {
|
|
1172
|
-
return R.H.useLayoutEffect(r, i);
|
|
1173
|
-
}, _.useMemo = function(r, i) {
|
|
1174
|
-
return R.H.useMemo(r, i);
|
|
1175
|
-
}, _.useOptimistic = function(r, i) {
|
|
1176
|
-
return R.H.useOptimistic(r, i);
|
|
1177
|
-
}, _.useReducer = function(r, i, f) {
|
|
1178
|
-
return R.H.useReducer(r, i, f);
|
|
1179
|
-
}, _.useRef = function(r) {
|
|
1180
|
-
return R.H.useRef(r);
|
|
1181
|
-
}, _.useState = function(r) {
|
|
1182
|
-
return R.H.useState(r);
|
|
1183
|
-
}, _.useSyncExternalStore = function(r, i, f) {
|
|
1184
|
-
return R.H.useSyncExternalStore(
|
|
1185
|
-
r,
|
|
1186
|
-
i,
|
|
1187
|
-
f
|
|
1188
|
-
);
|
|
1189
|
-
}, _.useTransition = function() {
|
|
1190
|
-
return R.H.useTransition();
|
|
1191
|
-
}, _.version = "19.2.4", _;
|
|
1192
|
-
}
|
|
1193
|
-
var ve = { exports: {} };
|
|
1194
|
-
ve.exports;
|
|
1195
|
-
var Ke;
|
|
1196
|
-
function Pt() {
|
|
1197
|
-
return Ke || (Ke = 1, function(n, t) {
|
|
1198
|
-
process.env.NODE_ENV !== "production" && function() {
|
|
1199
|
-
function s(e, o) {
|
|
1200
|
-
Object.defineProperty(p.prototype, e, {
|
|
1201
|
-
get: function() {
|
|
1202
|
-
console.warn(
|
|
1203
|
-
"%s(...) is deprecated in plain JavaScript React classes. %s",
|
|
1204
|
-
o[0],
|
|
1205
|
-
o[1]
|
|
1206
|
-
);
|
|
1207
|
-
}
|
|
1208
|
-
});
|
|
1209
|
-
}
|
|
1210
|
-
function a(e) {
|
|
1211
|
-
return e === null || typeof e != "object" ? null : (e = Ne && e[Ne] || e["@@iterator"], typeof e == "function" ? e : null);
|
|
1212
|
-
}
|
|
1213
|
-
function c(e, o) {
|
|
1214
|
-
e = (e = e.constructor) && (e.displayName || e.name) || "ReactClass";
|
|
1215
|
-
var u = e + "." + o;
|
|
1216
|
-
Me[u] || (console.error(
|
|
1217
|
-
"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
|
|
1218
|
-
o,
|
|
1219
|
-
e
|
|
1220
|
-
), Me[u] = !0);
|
|
1221
|
-
}
|
|
1222
|
-
function p(e, o, u) {
|
|
1223
|
-
this.props = e, this.context = o, this.refs = Pe, this.updater = u || Ie;
|
|
1224
|
-
}
|
|
1225
|
-
function O() {
|
|
1226
|
-
}
|
|
1227
|
-
function S(e, o, u) {
|
|
1228
|
-
this.props = e, this.context = o, this.refs = Pe, this.updater = u || Ie;
|
|
1229
|
-
}
|
|
1230
|
-
function D() {
|
|
1231
|
-
}
|
|
1232
|
-
function V(e) {
|
|
1233
|
-
return "" + e;
|
|
1234
|
-
}
|
|
1235
|
-
function I(e) {
|
|
1236
|
-
try {
|
|
1237
|
-
V(e);
|
|
1238
|
-
var o = !1;
|
|
1239
|
-
} catch {
|
|
1240
|
-
o = !0;
|
|
1241
|
-
}
|
|
1242
|
-
if (o) {
|
|
1243
|
-
o = console;
|
|
1244
|
-
var u = o.error, l = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
1245
|
-
return u.call(
|
|
1246
|
-
o,
|
|
1247
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
1248
|
-
l
|
|
1249
|
-
), V(e);
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
function L(e) {
|
|
1253
|
-
if (e == null) return null;
|
|
1254
|
-
if (typeof e == "function")
|
|
1255
|
-
return e.$$typeof === st ? null : e.displayName || e.name || null;
|
|
1256
|
-
if (typeof e == "string") return e;
|
|
1257
|
-
switch (e) {
|
|
1258
|
-
case r:
|
|
1259
|
-
return "Fragment";
|
|
1260
|
-
case f:
|
|
1261
|
-
return "Profiler";
|
|
1262
|
-
case i:
|
|
1263
|
-
return "StrictMode";
|
|
1264
|
-
case m:
|
|
1265
|
-
return "Suspense";
|
|
1266
|
-
case k:
|
|
1267
|
-
return "SuspenseList";
|
|
1268
|
-
case De:
|
|
1269
|
-
return "Activity";
|
|
1270
|
-
}
|
|
1271
|
-
if (typeof e == "object")
|
|
1272
|
-
switch (typeof e.tag == "number" && console.error(
|
|
1273
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
1274
|
-
), e.$$typeof) {
|
|
1275
|
-
case ae:
|
|
1276
|
-
return "Portal";
|
|
1277
|
-
case g:
|
|
1278
|
-
return e.displayName || "Context";
|
|
1279
|
-
case d:
|
|
1280
|
-
return (e._context.displayName || "Context") + ".Consumer";
|
|
1281
|
-
case w:
|
|
1282
|
-
var o = e.render;
|
|
1283
|
-
return e = e.displayName, e || (e = o.displayName || o.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
1284
|
-
case P:
|
|
1285
|
-
return o = e.displayName || null, o !== null ? o : L(e.type) || "Memo";
|
|
1286
|
-
case G:
|
|
1287
|
-
o = e._payload, e = e._init;
|
|
1288
|
-
try {
|
|
1289
|
-
return L(e(o));
|
|
1290
|
-
} catch {
|
|
1291
|
-
}
|
|
1292
|
-
}
|
|
1293
|
-
return null;
|
|
1294
|
-
}
|
|
1295
|
-
function $(e) {
|
|
1296
|
-
if (e === r) return "<>";
|
|
1297
|
-
if (typeof e == "object" && e !== null && e.$$typeof === G)
|
|
1298
|
-
return "<...>";
|
|
1299
|
-
try {
|
|
1300
|
-
var o = L(e);
|
|
1301
|
-
return o ? "<" + o + ">" : "<...>";
|
|
1302
|
-
} catch {
|
|
1303
|
-
return "<...>";
|
|
1304
|
-
}
|
|
1305
|
-
}
|
|
1306
|
-
function U() {
|
|
1307
|
-
var e = v.A;
|
|
1308
|
-
return e === null ? null : e.getOwner();
|
|
1309
|
-
}
|
|
1310
|
-
function Q() {
|
|
1311
|
-
return Error("react-stack-top-frame");
|
|
1312
|
-
}
|
|
1313
|
-
function oe(e) {
|
|
1314
|
-
if (be.call(e, "key")) {
|
|
1315
|
-
var o = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
1316
|
-
if (o && o.isReactWarning) return !1;
|
|
1317
|
-
}
|
|
1318
|
-
return e.key !== void 0;
|
|
1319
|
-
}
|
|
1320
|
-
function X(e, o) {
|
|
1321
|
-
function u() {
|
|
1322
|
-
Ue || (Ue = !0, console.error(
|
|
1323
|
-
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
1324
|
-
o
|
|
1325
|
-
));
|
|
1326
|
-
}
|
|
1327
|
-
u.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
1328
|
-
get: u,
|
|
1329
|
-
configurable: !0
|
|
1330
|
-
});
|
|
1331
|
-
}
|
|
1332
|
-
function W() {
|
|
1333
|
-
var e = L(this.type);
|
|
1334
|
-
return xe[e] || (xe[e] = !0, console.error(
|
|
1335
|
-
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
1336
|
-
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
1337
|
-
}
|
|
1338
|
-
function K(e, o, u, l, h, E) {
|
|
1339
|
-
var y = u.ref;
|
|
1340
|
-
return e = {
|
|
1341
|
-
$$typeof: B,
|
|
1342
|
-
type: e,
|
|
1343
|
-
key: o,
|
|
1344
|
-
props: u,
|
|
1345
|
-
_owner: l
|
|
1346
|
-
}, (y !== void 0 ? y : null) !== null ? Object.defineProperty(e, "ref", {
|
|
1347
|
-
enumerable: !1,
|
|
1348
|
-
get: W
|
|
1349
|
-
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
1350
|
-
configurable: !1,
|
|
1351
|
-
enumerable: !1,
|
|
1352
|
-
writable: !0,
|
|
1353
|
-
value: 0
|
|
1354
|
-
}), Object.defineProperty(e, "_debugInfo", {
|
|
1355
|
-
configurable: !1,
|
|
1356
|
-
enumerable: !1,
|
|
1357
|
-
writable: !0,
|
|
1358
|
-
value: null
|
|
1359
|
-
}), Object.defineProperty(e, "_debugStack", {
|
|
1360
|
-
configurable: !1,
|
|
1361
|
-
enumerable: !1,
|
|
1362
|
-
writable: !0,
|
|
1363
|
-
value: h
|
|
1364
|
-
}), Object.defineProperty(e, "_debugTask", {
|
|
1365
|
-
configurable: !1,
|
|
1366
|
-
enumerable: !1,
|
|
1367
|
-
writable: !0,
|
|
1368
|
-
value: E
|
|
1369
|
-
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
1370
|
-
}
|
|
1371
|
-
function se(e, o) {
|
|
1372
|
-
return o = K(
|
|
1373
|
-
e.type,
|
|
1374
|
-
o,
|
|
1375
|
-
e.props,
|
|
1376
|
-
e._owner,
|
|
1377
|
-
e._debugStack,
|
|
1378
|
-
e._debugTask
|
|
1379
|
-
), e._store && (o._store.validated = e._store.validated), o;
|
|
1380
|
-
}
|
|
1381
|
-
function Z(e) {
|
|
1382
|
-
F(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === G && (e._payload.status === "fulfilled" ? F(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
1383
|
-
}
|
|
1384
|
-
function F(e) {
|
|
1385
|
-
return typeof e == "object" && e !== null && e.$$typeof === B;
|
|
1386
|
-
}
|
|
1387
|
-
function ie(e) {
|
|
1388
|
-
var o = { "=": "=0", ":": "=2" };
|
|
1389
|
-
return "$" + e.replace(/[=:]/g, function(u) {
|
|
1390
|
-
return o[u];
|
|
1391
|
-
});
|
|
1392
|
-
}
|
|
1393
|
-
function R(e, o) {
|
|
1394
|
-
return typeof e == "object" && e !== null && e.key != null ? (I(e.key), ie("" + e.key)) : o.toString(36);
|
|
1395
|
-
}
|
|
1396
|
-
function le(e) {
|
|
1397
|
-
switch (e.status) {
|
|
1398
|
-
case "fulfilled":
|
|
1399
|
-
return e.value;
|
|
1400
|
-
case "rejected":
|
|
1401
|
-
throw e.reason;
|
|
1402
|
-
default:
|
|
1403
|
-
switch (typeof e.status == "string" ? e.then(D, D) : (e.status = "pending", e.then(
|
|
1404
|
-
function(o) {
|
|
1405
|
-
e.status === "pending" && (e.status = "fulfilled", e.value = o);
|
|
1406
|
-
},
|
|
1407
|
-
function(o) {
|
|
1408
|
-
e.status === "pending" && (e.status = "rejected", e.reason = o);
|
|
1409
|
-
}
|
|
1410
|
-
)), e.status) {
|
|
1411
|
-
case "fulfilled":
|
|
1412
|
-
return e.value;
|
|
1413
|
-
case "rejected":
|
|
1414
|
-
throw e.reason;
|
|
1415
|
-
}
|
|
1416
|
-
}
|
|
1417
|
-
throw e;
|
|
1418
|
-
}
|
|
1419
|
-
function N(e, o, u, l, h) {
|
|
1420
|
-
var E = typeof e;
|
|
1421
|
-
(E === "undefined" || E === "boolean") && (e = null);
|
|
1422
|
-
var y = !1;
|
|
1423
|
-
if (e === null) y = !0;
|
|
1424
|
-
else
|
|
1425
|
-
switch (E) {
|
|
1426
|
-
case "bigint":
|
|
1427
|
-
case "string":
|
|
1428
|
-
case "number":
|
|
1429
|
-
y = !0;
|
|
1430
|
-
break;
|
|
1431
|
-
case "object":
|
|
1432
|
-
switch (e.$$typeof) {
|
|
1433
|
-
case B:
|
|
1434
|
-
case ae:
|
|
1435
|
-
y = !0;
|
|
1436
|
-
break;
|
|
1437
|
-
case G:
|
|
1438
|
-
return y = e._init, N(
|
|
1439
|
-
y(e._payload),
|
|
1440
|
-
o,
|
|
1441
|
-
u,
|
|
1442
|
-
l,
|
|
1443
|
-
h
|
|
1444
|
-
);
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
if (y) {
|
|
1448
|
-
y = e, h = h(y);
|
|
1449
|
-
var T = l === "" ? "." + R(y, 0) : l;
|
|
1450
|
-
return Ye(h) ? (u = "", T != null && (u = T.replace($e, "$&/") + "/"), N(h, o, u, "", function(re) {
|
|
1451
|
-
return re;
|
|
1452
|
-
})) : h != null && (F(h) && (h.key != null && (y && y.key === h.key || I(h.key)), u = se(
|
|
1453
|
-
h,
|
|
1454
|
-
u + (h.key == null || y && y.key === h.key ? "" : ("" + h.key).replace(
|
|
1455
|
-
$e,
|
|
1456
|
-
"$&/"
|
|
1457
|
-
) + "/") + T
|
|
1458
|
-
), l !== "" && y != null && F(y) && y.key == null && y._store && !y._store.validated && (u._store.validated = 2), h = u), o.push(h)), 1;
|
|
1459
|
-
}
|
|
1460
|
-
if (y = 0, T = l === "" ? "." : l + ":", Ye(e))
|
|
1461
|
-
for (var b = 0; b < e.length; b++)
|
|
1462
|
-
l = e[b], E = T + R(l, b), y += N(
|
|
1463
|
-
l,
|
|
1464
|
-
o,
|
|
1465
|
-
u,
|
|
1466
|
-
E,
|
|
1467
|
-
h
|
|
1468
|
-
);
|
|
1469
|
-
else if (b = a(e), typeof b == "function")
|
|
1470
|
-
for (b === e.entries && (qe || console.warn(
|
|
1471
|
-
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
|
|
1472
|
-
), qe = !0), e = b.call(e), b = 0; !(l = e.next()).done; )
|
|
1473
|
-
l = l.value, E = T + R(l, b++), y += N(
|
|
1474
|
-
l,
|
|
1475
|
-
o,
|
|
1476
|
-
u,
|
|
1477
|
-
E,
|
|
1478
|
-
h
|
|
1479
|
-
);
|
|
1480
|
-
else if (E === "object") {
|
|
1481
|
-
if (typeof e.then == "function")
|
|
1482
|
-
return N(
|
|
1483
|
-
le(e),
|
|
1484
|
-
o,
|
|
1485
|
-
u,
|
|
1486
|
-
l,
|
|
1487
|
-
h
|
|
1488
|
-
);
|
|
1489
|
-
throw o = String(e), Error(
|
|
1490
|
-
"Objects are not valid as a React child (found: " + (o === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : o) + "). If you meant to render a collection of children, use an array instead."
|
|
1491
|
-
);
|
|
1492
|
-
}
|
|
1493
|
-
return y;
|
|
1494
|
-
}
|
|
1495
|
-
function J(e, o, u) {
|
|
1496
|
-
if (e == null) return e;
|
|
1497
|
-
var l = [], h = 0;
|
|
1498
|
-
return N(e, l, "", "", function(E) {
|
|
1499
|
-
return o.call(u, E, h++);
|
|
1500
|
-
}), l;
|
|
1501
|
-
}
|
|
1502
|
-
function ue(e) {
|
|
1503
|
-
if (e._status === -1) {
|
|
1504
|
-
var o = e._ioInfo;
|
|
1505
|
-
o != null && (o.start = o.end = performance.now()), o = e._result;
|
|
1506
|
-
var u = o();
|
|
1507
|
-
if (u.then(
|
|
1508
|
-
function(h) {
|
|
1509
|
-
if (e._status === 0 || e._status === -1) {
|
|
1510
|
-
e._status = 1, e._result = h;
|
|
1511
|
-
var E = e._ioInfo;
|
|
1512
|
-
E != null && (E.end = performance.now()), u.status === void 0 && (u.status = "fulfilled", u.value = h);
|
|
1513
|
-
}
|
|
1514
|
-
},
|
|
1515
|
-
function(h) {
|
|
1516
|
-
if (e._status === 0 || e._status === -1) {
|
|
1517
|
-
e._status = 2, e._result = h;
|
|
1518
|
-
var E = e._ioInfo;
|
|
1519
|
-
E != null && (E.end = performance.now()), u.status === void 0 && (u.status = "rejected", u.reason = h);
|
|
1520
|
-
}
|
|
1521
|
-
}
|
|
1522
|
-
), o = e._ioInfo, o != null) {
|
|
1523
|
-
o.value = u;
|
|
1524
|
-
var l = u.displayName;
|
|
1525
|
-
typeof l == "string" && (o.name = l);
|
|
1526
|
-
}
|
|
1527
|
-
e._status === -1 && (e._status = 0, e._result = u);
|
|
1528
|
-
}
|
|
1529
|
-
if (e._status === 1)
|
|
1530
|
-
return o = e._result, o === void 0 && console.error(
|
|
1531
|
-
`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
1532
|
-
|
|
1533
|
-
Your code should look like:
|
|
1534
|
-
const MyComponent = lazy(() => import('./MyComponent'))
|
|
2178
|
+
//#endregion
|
|
2179
|
+
export { E as CrudController, F as CrudPanel };
|
|
1535
2180
|
|
|
1536
|
-
|
|
1537
|
-
o
|
|
1538
|
-
), "default" in o || console.error(
|
|
1539
|
-
`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
1540
|
-
|
|
1541
|
-
Your code should look like:
|
|
1542
|
-
const MyComponent = lazy(() => import('./MyComponent'))`,
|
|
1543
|
-
o
|
|
1544
|
-
), o.default;
|
|
1545
|
-
throw e._result;
|
|
1546
|
-
}
|
|
1547
|
-
function C() {
|
|
1548
|
-
var e = v.H;
|
|
1549
|
-
return e === null && console.error(
|
|
1550
|
-
`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:
|
|
1551
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
1552
|
-
2. You might be breaking the Rules of Hooks
|
|
1553
|
-
3. You might have more than one copy of React in the same app
|
|
1554
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
|
|
1555
|
-
), e;
|
|
1556
|
-
}
|
|
1557
|
-
function ee() {
|
|
1558
|
-
v.asyncTransitions--;
|
|
1559
|
-
}
|
|
1560
|
-
function z(e) {
|
|
1561
|
-
if (we === null)
|
|
1562
|
-
try {
|
|
1563
|
-
var o = ("require" + Math.random()).slice(0, 7);
|
|
1564
|
-
we = (n && n[o]).call(
|
|
1565
|
-
n,
|
|
1566
|
-
"timers"
|
|
1567
|
-
).setImmediate;
|
|
1568
|
-
} catch {
|
|
1569
|
-
we = function(l) {
|
|
1570
|
-
ze === !1 && (ze = !0, typeof MessageChannel > "u" && console.error(
|
|
1571
|
-
"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
|
|
1572
|
-
));
|
|
1573
|
-
var h = new MessageChannel();
|
|
1574
|
-
h.port1.onmessage = l, h.port2.postMessage(void 0);
|
|
1575
|
-
};
|
|
1576
|
-
}
|
|
1577
|
-
return we(e);
|
|
1578
|
-
}
|
|
1579
|
-
function x(e) {
|
|
1580
|
-
return 1 < e.length && typeof AggregateError == "function" ? new AggregateError(e) : e[0];
|
|
1581
|
-
}
|
|
1582
|
-
function M(e, o) {
|
|
1583
|
-
o !== Re - 1 && console.error(
|
|
1584
|
-
"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
|
|
1585
|
-
), Re = o;
|
|
1586
|
-
}
|
|
1587
|
-
function q(e, o, u) {
|
|
1588
|
-
var l = v.actQueue;
|
|
1589
|
-
if (l !== null)
|
|
1590
|
-
if (l.length !== 0)
|
|
1591
|
-
try {
|
|
1592
|
-
te(l), z(function() {
|
|
1593
|
-
return q(e, o, u);
|
|
1594
|
-
});
|
|
1595
|
-
return;
|
|
1596
|
-
} catch (h) {
|
|
1597
|
-
v.thrownErrors.push(h);
|
|
1598
|
-
}
|
|
1599
|
-
else v.actQueue = null;
|
|
1600
|
-
0 < v.thrownErrors.length ? (l = x(v.thrownErrors), v.thrownErrors.length = 0, u(l)) : o(e);
|
|
1601
|
-
}
|
|
1602
|
-
function te(e) {
|
|
1603
|
-
if (!Ae) {
|
|
1604
|
-
Ae = !0;
|
|
1605
|
-
var o = 0;
|
|
1606
|
-
try {
|
|
1607
|
-
for (; o < e.length; o++) {
|
|
1608
|
-
var u = e[o];
|
|
1609
|
-
do {
|
|
1610
|
-
v.didUsePromise = !1;
|
|
1611
|
-
var l = u(!1);
|
|
1612
|
-
if (l !== null) {
|
|
1613
|
-
if (v.didUsePromise) {
|
|
1614
|
-
e[o] = u, e.splice(0, o);
|
|
1615
|
-
return;
|
|
1616
|
-
}
|
|
1617
|
-
u = l;
|
|
1618
|
-
} else break;
|
|
1619
|
-
} while (!0);
|
|
1620
|
-
}
|
|
1621
|
-
e.length = 0;
|
|
1622
|
-
} catch (h) {
|
|
1623
|
-
e.splice(0, o + 1), v.thrownErrors.push(h);
|
|
1624
|
-
} finally {
|
|
1625
|
-
Ae = !1;
|
|
1626
|
-
}
|
|
1627
|
-
}
|
|
1628
|
-
}
|
|
1629
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1630
|
-
var B = Symbol.for("react.transitional.element"), ae = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), d = Symbol.for("react.consumer"), g = Symbol.for("react.context"), w = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), k = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), G = Symbol.for("react.lazy"), De = Symbol.for("react.activity"), Ne = Symbol.iterator, Me = {}, Ie = {
|
|
1631
|
-
isMounted: function() {
|
|
1632
|
-
return !1;
|
|
1633
|
-
},
|
|
1634
|
-
enqueueForceUpdate: function(e) {
|
|
1635
|
-
c(e, "forceUpdate");
|
|
1636
|
-
},
|
|
1637
|
-
enqueueReplaceState: function(e) {
|
|
1638
|
-
c(e, "replaceState");
|
|
1639
|
-
},
|
|
1640
|
-
enqueueSetState: function(e) {
|
|
1641
|
-
c(e, "setState");
|
|
1642
|
-
}
|
|
1643
|
-
}, Le = Object.assign, Pe = {};
|
|
1644
|
-
Object.freeze(Pe), p.prototype.isReactComponent = {}, p.prototype.setState = function(e, o) {
|
|
1645
|
-
if (typeof e != "object" && typeof e != "function" && e != null)
|
|
1646
|
-
throw Error(
|
|
1647
|
-
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
1648
|
-
);
|
|
1649
|
-
this.updater.enqueueSetState(this, e, o, "setState");
|
|
1650
|
-
}, p.prototype.forceUpdate = function(e) {
|
|
1651
|
-
this.updater.enqueueForceUpdate(this, e, "forceUpdate");
|
|
1652
|
-
};
|
|
1653
|
-
var Y = {
|
|
1654
|
-
isMounted: [
|
|
1655
|
-
"isMounted",
|
|
1656
|
-
"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
|
|
1657
|
-
],
|
|
1658
|
-
replaceState: [
|
|
1659
|
-
"replaceState",
|
|
1660
|
-
"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
|
|
1661
|
-
]
|
|
1662
|
-
};
|
|
1663
|
-
for (me in Y)
|
|
1664
|
-
Y.hasOwnProperty(me) && s(me, Y[me]);
|
|
1665
|
-
O.prototype = p.prototype, Y = S.prototype = new O(), Y.constructor = S, Le(Y, p.prototype), Y.isPureReactComponent = !0;
|
|
1666
|
-
var Ye = Array.isArray, st = Symbol.for("react.client.reference"), v = {
|
|
1667
|
-
H: null,
|
|
1668
|
-
A: null,
|
|
1669
|
-
T: null,
|
|
1670
|
-
S: null,
|
|
1671
|
-
actQueue: null,
|
|
1672
|
-
asyncTransitions: 0,
|
|
1673
|
-
isBatchingLegacy: !1,
|
|
1674
|
-
didScheduleLegacyUpdate: !1,
|
|
1675
|
-
didUsePromise: !1,
|
|
1676
|
-
thrownErrors: [],
|
|
1677
|
-
getCurrentStack: null,
|
|
1678
|
-
recentlyCreatedOwnerStacks: 0
|
|
1679
|
-
}, be = Object.prototype.hasOwnProperty, He = console.createTask ? console.createTask : function() {
|
|
1680
|
-
return null;
|
|
1681
|
-
};
|
|
1682
|
-
Y = {
|
|
1683
|
-
react_stack_bottom_frame: function(e) {
|
|
1684
|
-
return e();
|
|
1685
|
-
}
|
|
1686
|
-
};
|
|
1687
|
-
var Ue, Fe, xe = {}, it = Y.react_stack_bottom_frame.bind(
|
|
1688
|
-
Y,
|
|
1689
|
-
Q
|
|
1690
|
-
)(), ut = He($(Q)), qe = !1, $e = /\/+/g, We = typeof reportError == "function" ? reportError : function(e) {
|
|
1691
|
-
if (typeof window == "object" && typeof window.ErrorEvent == "function") {
|
|
1692
|
-
var o = new window.ErrorEvent("error", {
|
|
1693
|
-
bubbles: !0,
|
|
1694
|
-
cancelable: !0,
|
|
1695
|
-
message: typeof e == "object" && e !== null && typeof e.message == "string" ? String(e.message) : String(e),
|
|
1696
|
-
error: e
|
|
1697
|
-
});
|
|
1698
|
-
if (!window.dispatchEvent(o)) return;
|
|
1699
|
-
} else if (typeof process == "object" && typeof process.emit == "function") {
|
|
1700
|
-
process.emit("uncaughtException", e);
|
|
1701
|
-
return;
|
|
1702
|
-
}
|
|
1703
|
-
console.error(e);
|
|
1704
|
-
}, ze = !1, we = null, Re = 0, Ce = !1, Ae = !1, Ve = typeof queueMicrotask == "function" ? function(e) {
|
|
1705
|
-
queueMicrotask(function() {
|
|
1706
|
-
return queueMicrotask(e);
|
|
1707
|
-
});
|
|
1708
|
-
} : z;
|
|
1709
|
-
Y = Object.freeze({
|
|
1710
|
-
__proto__: null,
|
|
1711
|
-
c: function(e) {
|
|
1712
|
-
return C().useMemoCache(e);
|
|
1713
|
-
}
|
|
1714
|
-
});
|
|
1715
|
-
var me = {
|
|
1716
|
-
map: J,
|
|
1717
|
-
forEach: function(e, o, u) {
|
|
1718
|
-
J(
|
|
1719
|
-
e,
|
|
1720
|
-
function() {
|
|
1721
|
-
o.apply(this, arguments);
|
|
1722
|
-
},
|
|
1723
|
-
u
|
|
1724
|
-
);
|
|
1725
|
-
},
|
|
1726
|
-
count: function(e) {
|
|
1727
|
-
var o = 0;
|
|
1728
|
-
return J(e, function() {
|
|
1729
|
-
o++;
|
|
1730
|
-
}), o;
|
|
1731
|
-
},
|
|
1732
|
-
toArray: function(e) {
|
|
1733
|
-
return J(e, function(o) {
|
|
1734
|
-
return o;
|
|
1735
|
-
}) || [];
|
|
1736
|
-
},
|
|
1737
|
-
only: function(e) {
|
|
1738
|
-
if (!F(e))
|
|
1739
|
-
throw Error(
|
|
1740
|
-
"React.Children.only expected to receive a single React element child."
|
|
1741
|
-
);
|
|
1742
|
-
return e;
|
|
1743
|
-
}
|
|
1744
|
-
};
|
|
1745
|
-
t.Activity = De, t.Children = me, t.Component = p, t.Fragment = r, t.Profiler = f, t.PureComponent = S, t.StrictMode = i, t.Suspense = m, t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = v, t.__COMPILER_RUNTIME = Y, t.act = function(e) {
|
|
1746
|
-
var o = v.actQueue, u = Re;
|
|
1747
|
-
Re++;
|
|
1748
|
-
var l = v.actQueue = o !== null ? o : [], h = !1;
|
|
1749
|
-
try {
|
|
1750
|
-
var E = e();
|
|
1751
|
-
} catch (b) {
|
|
1752
|
-
v.thrownErrors.push(b);
|
|
1753
|
-
}
|
|
1754
|
-
if (0 < v.thrownErrors.length)
|
|
1755
|
-
throw M(o, u), e = x(v.thrownErrors), v.thrownErrors.length = 0, e;
|
|
1756
|
-
if (E !== null && typeof E == "object" && typeof E.then == "function") {
|
|
1757
|
-
var y = E;
|
|
1758
|
-
return Ve(function() {
|
|
1759
|
-
h || Ce || (Ce = !0, console.error(
|
|
1760
|
-
"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
|
|
1761
|
-
));
|
|
1762
|
-
}), {
|
|
1763
|
-
then: function(b, re) {
|
|
1764
|
-
h = !0, y.then(
|
|
1765
|
-
function(fe) {
|
|
1766
|
-
if (M(o, u), u === 0) {
|
|
1767
|
-
try {
|
|
1768
|
-
te(l), z(function() {
|
|
1769
|
-
return q(
|
|
1770
|
-
fe,
|
|
1771
|
-
b,
|
|
1772
|
-
re
|
|
1773
|
-
);
|
|
1774
|
-
});
|
|
1775
|
-
} catch (ct) {
|
|
1776
|
-
v.thrownErrors.push(ct);
|
|
1777
|
-
}
|
|
1778
|
-
if (0 < v.thrownErrors.length) {
|
|
1779
|
-
var at = x(
|
|
1780
|
-
v.thrownErrors
|
|
1781
|
-
);
|
|
1782
|
-
v.thrownErrors.length = 0, re(at);
|
|
1783
|
-
}
|
|
1784
|
-
} else b(fe);
|
|
1785
|
-
},
|
|
1786
|
-
function(fe) {
|
|
1787
|
-
M(o, u), 0 < v.thrownErrors.length && (fe = x(
|
|
1788
|
-
v.thrownErrors
|
|
1789
|
-
), v.thrownErrors.length = 0), re(fe);
|
|
1790
|
-
}
|
|
1791
|
-
);
|
|
1792
|
-
}
|
|
1793
|
-
};
|
|
1794
|
-
}
|
|
1795
|
-
var T = E;
|
|
1796
|
-
if (M(o, u), u === 0 && (te(l), l.length !== 0 && Ve(function() {
|
|
1797
|
-
h || Ce || (Ce = !0, console.error(
|
|
1798
|
-
"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
|
|
1799
|
-
));
|
|
1800
|
-
}), v.actQueue = null), 0 < v.thrownErrors.length)
|
|
1801
|
-
throw e = x(v.thrownErrors), v.thrownErrors.length = 0, e;
|
|
1802
|
-
return {
|
|
1803
|
-
then: function(b, re) {
|
|
1804
|
-
h = !0, u === 0 ? (v.actQueue = l, z(function() {
|
|
1805
|
-
return q(
|
|
1806
|
-
T,
|
|
1807
|
-
b,
|
|
1808
|
-
re
|
|
1809
|
-
);
|
|
1810
|
-
})) : b(T);
|
|
1811
|
-
}
|
|
1812
|
-
};
|
|
1813
|
-
}, t.cache = function(e) {
|
|
1814
|
-
return function() {
|
|
1815
|
-
return e.apply(null, arguments);
|
|
1816
|
-
};
|
|
1817
|
-
}, t.cacheSignal = function() {
|
|
1818
|
-
return null;
|
|
1819
|
-
}, t.captureOwnerStack = function() {
|
|
1820
|
-
var e = v.getCurrentStack;
|
|
1821
|
-
return e === null ? null : e();
|
|
1822
|
-
}, t.cloneElement = function(e, o, u) {
|
|
1823
|
-
if (e == null)
|
|
1824
|
-
throw Error(
|
|
1825
|
-
"The argument must be a React element, but you passed " + e + "."
|
|
1826
|
-
);
|
|
1827
|
-
var l = Le({}, e.props), h = e.key, E = e._owner;
|
|
1828
|
-
if (o != null) {
|
|
1829
|
-
var y;
|
|
1830
|
-
e: {
|
|
1831
|
-
if (be.call(o, "ref") && (y = Object.getOwnPropertyDescriptor(
|
|
1832
|
-
o,
|
|
1833
|
-
"ref"
|
|
1834
|
-
).get) && y.isReactWarning) {
|
|
1835
|
-
y = !1;
|
|
1836
|
-
break e;
|
|
1837
|
-
}
|
|
1838
|
-
y = o.ref !== void 0;
|
|
1839
|
-
}
|
|
1840
|
-
y && (E = U()), oe(o) && (I(o.key), h = "" + o.key);
|
|
1841
|
-
for (T in o)
|
|
1842
|
-
!be.call(o, T) || T === "key" || T === "__self" || T === "__source" || T === "ref" && o.ref === void 0 || (l[T] = o[T]);
|
|
1843
|
-
}
|
|
1844
|
-
var T = arguments.length - 2;
|
|
1845
|
-
if (T === 1) l.children = u;
|
|
1846
|
-
else if (1 < T) {
|
|
1847
|
-
y = Array(T);
|
|
1848
|
-
for (var b = 0; b < T; b++)
|
|
1849
|
-
y[b] = arguments[b + 2];
|
|
1850
|
-
l.children = y;
|
|
1851
|
-
}
|
|
1852
|
-
for (l = K(
|
|
1853
|
-
e.type,
|
|
1854
|
-
h,
|
|
1855
|
-
l,
|
|
1856
|
-
E,
|
|
1857
|
-
e._debugStack,
|
|
1858
|
-
e._debugTask
|
|
1859
|
-
), h = 2; h < arguments.length; h++)
|
|
1860
|
-
Z(arguments[h]);
|
|
1861
|
-
return l;
|
|
1862
|
-
}, t.createContext = function(e) {
|
|
1863
|
-
return e = {
|
|
1864
|
-
$$typeof: g,
|
|
1865
|
-
_currentValue: e,
|
|
1866
|
-
_currentValue2: e,
|
|
1867
|
-
_threadCount: 0,
|
|
1868
|
-
Provider: null,
|
|
1869
|
-
Consumer: null
|
|
1870
|
-
}, e.Provider = e, e.Consumer = {
|
|
1871
|
-
$$typeof: d,
|
|
1872
|
-
_context: e
|
|
1873
|
-
}, e._currentRenderer = null, e._currentRenderer2 = null, e;
|
|
1874
|
-
}, t.createElement = function(e, o, u) {
|
|
1875
|
-
for (var l = 2; l < arguments.length; l++)
|
|
1876
|
-
Z(arguments[l]);
|
|
1877
|
-
l = {};
|
|
1878
|
-
var h = null;
|
|
1879
|
-
if (o != null)
|
|
1880
|
-
for (b in Fe || !("__self" in o) || "key" in o || (Fe = !0, console.warn(
|
|
1881
|
-
"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
|
|
1882
|
-
)), oe(o) && (I(o.key), h = "" + o.key), o)
|
|
1883
|
-
be.call(o, b) && b !== "key" && b !== "__self" && b !== "__source" && (l[b] = o[b]);
|
|
1884
|
-
var E = arguments.length - 2;
|
|
1885
|
-
if (E === 1) l.children = u;
|
|
1886
|
-
else if (1 < E) {
|
|
1887
|
-
for (var y = Array(E), T = 0; T < E; T++)
|
|
1888
|
-
y[T] = arguments[T + 2];
|
|
1889
|
-
Object.freeze && Object.freeze(y), l.children = y;
|
|
1890
|
-
}
|
|
1891
|
-
if (e && e.defaultProps)
|
|
1892
|
-
for (b in E = e.defaultProps, E)
|
|
1893
|
-
l[b] === void 0 && (l[b] = E[b]);
|
|
1894
|
-
h && X(
|
|
1895
|
-
l,
|
|
1896
|
-
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
1897
|
-
);
|
|
1898
|
-
var b = 1e4 > v.recentlyCreatedOwnerStacks++;
|
|
1899
|
-
return K(
|
|
1900
|
-
e,
|
|
1901
|
-
h,
|
|
1902
|
-
l,
|
|
1903
|
-
U(),
|
|
1904
|
-
b ? Error("react-stack-top-frame") : it,
|
|
1905
|
-
b ? He($(e)) : ut
|
|
1906
|
-
);
|
|
1907
|
-
}, t.createRef = function() {
|
|
1908
|
-
var e = { current: null };
|
|
1909
|
-
return Object.seal(e), e;
|
|
1910
|
-
}, t.forwardRef = function(e) {
|
|
1911
|
-
e != null && e.$$typeof === P ? console.error(
|
|
1912
|
-
"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
|
|
1913
|
-
) : typeof e != "function" ? console.error(
|
|
1914
|
-
"forwardRef requires a render function but was given %s.",
|
|
1915
|
-
e === null ? "null" : typeof e
|
|
1916
|
-
) : e.length !== 0 && e.length !== 2 && console.error(
|
|
1917
|
-
"forwardRef render functions accept exactly two parameters: props and ref. %s",
|
|
1918
|
-
e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
|
|
1919
|
-
), e != null && e.defaultProps != null && console.error(
|
|
1920
|
-
"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
|
|
1921
|
-
);
|
|
1922
|
-
var o = { $$typeof: w, render: e }, u;
|
|
1923
|
-
return Object.defineProperty(o, "displayName", {
|
|
1924
|
-
enumerable: !1,
|
|
1925
|
-
configurable: !0,
|
|
1926
|
-
get: function() {
|
|
1927
|
-
return u;
|
|
1928
|
-
},
|
|
1929
|
-
set: function(l) {
|
|
1930
|
-
u = l, e.name || e.displayName || (Object.defineProperty(e, "name", { value: l }), e.displayName = l);
|
|
1931
|
-
}
|
|
1932
|
-
}), o;
|
|
1933
|
-
}, t.isValidElement = F, t.lazy = function(e) {
|
|
1934
|
-
e = { _status: -1, _result: e };
|
|
1935
|
-
var o = {
|
|
1936
|
-
$$typeof: G,
|
|
1937
|
-
_payload: e,
|
|
1938
|
-
_init: ue
|
|
1939
|
-
}, u = {
|
|
1940
|
-
name: "lazy",
|
|
1941
|
-
start: -1,
|
|
1942
|
-
end: -1,
|
|
1943
|
-
value: null,
|
|
1944
|
-
owner: null,
|
|
1945
|
-
debugStack: Error("react-stack-top-frame"),
|
|
1946
|
-
debugTask: console.createTask ? console.createTask("lazy()") : null
|
|
1947
|
-
};
|
|
1948
|
-
return e._ioInfo = u, o._debugInfo = [{ awaited: u }], o;
|
|
1949
|
-
}, t.memo = function(e, o) {
|
|
1950
|
-
e == null && console.error(
|
|
1951
|
-
"memo: The first argument must be a component. Instead received: %s",
|
|
1952
|
-
e === null ? "null" : typeof e
|
|
1953
|
-
), o = {
|
|
1954
|
-
$$typeof: P,
|
|
1955
|
-
type: e,
|
|
1956
|
-
compare: o === void 0 ? null : o
|
|
1957
|
-
};
|
|
1958
|
-
var u;
|
|
1959
|
-
return Object.defineProperty(o, "displayName", {
|
|
1960
|
-
enumerable: !1,
|
|
1961
|
-
configurable: !0,
|
|
1962
|
-
get: function() {
|
|
1963
|
-
return u;
|
|
1964
|
-
},
|
|
1965
|
-
set: function(l) {
|
|
1966
|
-
u = l, e.name || e.displayName || (Object.defineProperty(e, "name", { value: l }), e.displayName = l);
|
|
1967
|
-
}
|
|
1968
|
-
}), o;
|
|
1969
|
-
}, t.startTransition = function(e) {
|
|
1970
|
-
var o = v.T, u = {};
|
|
1971
|
-
u._updatedFibers = /* @__PURE__ */ new Set(), v.T = u;
|
|
1972
|
-
try {
|
|
1973
|
-
var l = e(), h = v.S;
|
|
1974
|
-
h !== null && h(u, l), typeof l == "object" && l !== null && typeof l.then == "function" && (v.asyncTransitions++, l.then(ee, ee), l.then(D, We));
|
|
1975
|
-
} catch (E) {
|
|
1976
|
-
We(E);
|
|
1977
|
-
} finally {
|
|
1978
|
-
o === null && u._updatedFibers && (e = u._updatedFibers.size, u._updatedFibers.clear(), 10 < e && console.warn(
|
|
1979
|
-
"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
|
|
1980
|
-
)), o !== null && u.types !== null && (o.types !== null && o.types !== u.types && console.error(
|
|
1981
|
-
"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
|
|
1982
|
-
), o.types = u.types), v.T = o;
|
|
1983
|
-
}
|
|
1984
|
-
}, t.unstable_useCacheRefresh = function() {
|
|
1985
|
-
return C().useCacheRefresh();
|
|
1986
|
-
}, t.use = function(e) {
|
|
1987
|
-
return C().use(e);
|
|
1988
|
-
}, t.useActionState = function(e, o, u) {
|
|
1989
|
-
return C().useActionState(
|
|
1990
|
-
e,
|
|
1991
|
-
o,
|
|
1992
|
-
u
|
|
1993
|
-
);
|
|
1994
|
-
}, t.useCallback = function(e, o) {
|
|
1995
|
-
return C().useCallback(e, o);
|
|
1996
|
-
}, t.useContext = function(e) {
|
|
1997
|
-
var o = C();
|
|
1998
|
-
return e.$$typeof === d && console.error(
|
|
1999
|
-
"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
|
|
2000
|
-
), o.useContext(e);
|
|
2001
|
-
}, t.useDebugValue = function(e, o) {
|
|
2002
|
-
return C().useDebugValue(e, o);
|
|
2003
|
-
}, t.useDeferredValue = function(e, o) {
|
|
2004
|
-
return C().useDeferredValue(e, o);
|
|
2005
|
-
}, t.useEffect = function(e, o) {
|
|
2006
|
-
return e == null && console.warn(
|
|
2007
|
-
"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
2008
|
-
), C().useEffect(e, o);
|
|
2009
|
-
}, t.useEffectEvent = function(e) {
|
|
2010
|
-
return C().useEffectEvent(e);
|
|
2011
|
-
}, t.useId = function() {
|
|
2012
|
-
return C().useId();
|
|
2013
|
-
}, t.useImperativeHandle = function(e, o, u) {
|
|
2014
|
-
return C().useImperativeHandle(e, o, u);
|
|
2015
|
-
}, t.useInsertionEffect = function(e, o) {
|
|
2016
|
-
return e == null && console.warn(
|
|
2017
|
-
"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
2018
|
-
), C().useInsertionEffect(e, o);
|
|
2019
|
-
}, t.useLayoutEffect = function(e, o) {
|
|
2020
|
-
return e == null && console.warn(
|
|
2021
|
-
"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
2022
|
-
), C().useLayoutEffect(e, o);
|
|
2023
|
-
}, t.useMemo = function(e, o) {
|
|
2024
|
-
return C().useMemo(e, o);
|
|
2025
|
-
}, t.useOptimistic = function(e, o) {
|
|
2026
|
-
return C().useOptimistic(e, o);
|
|
2027
|
-
}, t.useReducer = function(e, o, u) {
|
|
2028
|
-
return C().useReducer(e, o, u);
|
|
2029
|
-
}, t.useRef = function(e) {
|
|
2030
|
-
return C().useRef(e);
|
|
2031
|
-
}, t.useState = function(e) {
|
|
2032
|
-
return C().useState(e);
|
|
2033
|
-
}, t.useSyncExternalStore = function(e, o, u) {
|
|
2034
|
-
return C().useSyncExternalStore(
|
|
2035
|
-
e,
|
|
2036
|
-
o,
|
|
2037
|
-
u
|
|
2038
|
-
);
|
|
2039
|
-
}, t.useTransition = function() {
|
|
2040
|
-
return C().useTransition();
|
|
2041
|
-
}, t.version = "19.2.4", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
2042
|
-
}();
|
|
2043
|
-
}(ve, ve.exports)), ve.exports;
|
|
2044
|
-
}
|
|
2045
|
-
var Ze;
|
|
2046
|
-
function ot() {
|
|
2047
|
-
return Ze || (Ze = 1, process.env.NODE_ENV === "production" ? Oe.exports = St() : Oe.exports = Pt()), Oe.exports;
|
|
2048
|
-
}
|
|
2049
|
-
var Je;
|
|
2050
|
-
function At() {
|
|
2051
|
-
return Je || (Je = 1, process.env.NODE_ENV !== "production" && function() {
|
|
2052
|
-
function n(r) {
|
|
2053
|
-
if (r == null) return null;
|
|
2054
|
-
if (typeof r == "function")
|
|
2055
|
-
return r.$$typeof === ue ? null : r.displayName || r.name || null;
|
|
2056
|
-
if (typeof r == "string") return r;
|
|
2057
|
-
switch (r) {
|
|
2058
|
-
case X:
|
|
2059
|
-
return "Fragment";
|
|
2060
|
-
case K:
|
|
2061
|
-
return "Profiler";
|
|
2062
|
-
case W:
|
|
2063
|
-
return "StrictMode";
|
|
2064
|
-
case ie:
|
|
2065
|
-
return "Suspense";
|
|
2066
|
-
case R:
|
|
2067
|
-
return "SuspenseList";
|
|
2068
|
-
case J:
|
|
2069
|
-
return "Activity";
|
|
2070
|
-
}
|
|
2071
|
-
if (typeof r == "object")
|
|
2072
|
-
switch (typeof r.tag == "number" && console.error(
|
|
2073
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
2074
|
-
), r.$$typeof) {
|
|
2075
|
-
case oe:
|
|
2076
|
-
return "Portal";
|
|
2077
|
-
case Z:
|
|
2078
|
-
return r.displayName || "Context";
|
|
2079
|
-
case se:
|
|
2080
|
-
return (r._context.displayName || "Context") + ".Consumer";
|
|
2081
|
-
case F:
|
|
2082
|
-
var i = r.render;
|
|
2083
|
-
return r = r.displayName, r || (r = i.displayName || i.name || "", r = r !== "" ? "ForwardRef(" + r + ")" : "ForwardRef"), r;
|
|
2084
|
-
case le:
|
|
2085
|
-
return i = r.displayName || null, i !== null ? i : n(r.type) || "Memo";
|
|
2086
|
-
case N:
|
|
2087
|
-
i = r._payload, r = r._init;
|
|
2088
|
-
try {
|
|
2089
|
-
return n(r(i));
|
|
2090
|
-
} catch {
|
|
2091
|
-
}
|
|
2092
|
-
}
|
|
2093
|
-
return null;
|
|
2094
|
-
}
|
|
2095
|
-
function t(r) {
|
|
2096
|
-
return "" + r;
|
|
2097
|
-
}
|
|
2098
|
-
function s(r) {
|
|
2099
|
-
try {
|
|
2100
|
-
t(r);
|
|
2101
|
-
var i = !1;
|
|
2102
|
-
} catch {
|
|
2103
|
-
i = !0;
|
|
2104
|
-
}
|
|
2105
|
-
if (i) {
|
|
2106
|
-
i = console;
|
|
2107
|
-
var f = i.error, d = typeof Symbol == "function" && Symbol.toStringTag && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
2108
|
-
return f.call(
|
|
2109
|
-
i,
|
|
2110
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
2111
|
-
d
|
|
2112
|
-
), t(r);
|
|
2113
|
-
}
|
|
2114
|
-
}
|
|
2115
|
-
function a(r) {
|
|
2116
|
-
if (r === X) return "<>";
|
|
2117
|
-
if (typeof r == "object" && r !== null && r.$$typeof === N)
|
|
2118
|
-
return "<...>";
|
|
2119
|
-
try {
|
|
2120
|
-
var i = n(r);
|
|
2121
|
-
return i ? "<" + i + ">" : "<...>";
|
|
2122
|
-
} catch {
|
|
2123
|
-
return "<...>";
|
|
2124
|
-
}
|
|
2125
|
-
}
|
|
2126
|
-
function c() {
|
|
2127
|
-
var r = C.A;
|
|
2128
|
-
return r === null ? null : r.getOwner();
|
|
2129
|
-
}
|
|
2130
|
-
function p() {
|
|
2131
|
-
return Error("react-stack-top-frame");
|
|
2132
|
-
}
|
|
2133
|
-
function O(r) {
|
|
2134
|
-
if (ee.call(r, "key")) {
|
|
2135
|
-
var i = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
2136
|
-
if (i && i.isReactWarning) return !1;
|
|
2137
|
-
}
|
|
2138
|
-
return r.key !== void 0;
|
|
2139
|
-
}
|
|
2140
|
-
function S(r, i) {
|
|
2141
|
-
function f() {
|
|
2142
|
-
M || (M = !0, console.error(
|
|
2143
|
-
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
2144
|
-
i
|
|
2145
|
-
));
|
|
2146
|
-
}
|
|
2147
|
-
f.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
2148
|
-
get: f,
|
|
2149
|
-
configurable: !0
|
|
2150
|
-
});
|
|
2151
|
-
}
|
|
2152
|
-
function D() {
|
|
2153
|
-
var r = n(this.type);
|
|
2154
|
-
return q[r] || (q[r] = !0, console.error(
|
|
2155
|
-
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
2156
|
-
)), r = this.props.ref, r !== void 0 ? r : null;
|
|
2157
|
-
}
|
|
2158
|
-
function V(r, i, f, d, g, w) {
|
|
2159
|
-
var m = f.ref;
|
|
2160
|
-
return r = {
|
|
2161
|
-
$$typeof: Q,
|
|
2162
|
-
type: r,
|
|
2163
|
-
key: i,
|
|
2164
|
-
props: f,
|
|
2165
|
-
_owner: d
|
|
2166
|
-
}, (m !== void 0 ? m : null) !== null ? Object.defineProperty(r, "ref", {
|
|
2167
|
-
enumerable: !1,
|
|
2168
|
-
get: D
|
|
2169
|
-
}) : Object.defineProperty(r, "ref", { enumerable: !1, value: null }), r._store = {}, Object.defineProperty(r._store, "validated", {
|
|
2170
|
-
configurable: !1,
|
|
2171
|
-
enumerable: !1,
|
|
2172
|
-
writable: !0,
|
|
2173
|
-
value: 0
|
|
2174
|
-
}), Object.defineProperty(r, "_debugInfo", {
|
|
2175
|
-
configurable: !1,
|
|
2176
|
-
enumerable: !1,
|
|
2177
|
-
writable: !0,
|
|
2178
|
-
value: null
|
|
2179
|
-
}), Object.defineProperty(r, "_debugStack", {
|
|
2180
|
-
configurable: !1,
|
|
2181
|
-
enumerable: !1,
|
|
2182
|
-
writable: !0,
|
|
2183
|
-
value: g
|
|
2184
|
-
}), Object.defineProperty(r, "_debugTask", {
|
|
2185
|
-
configurable: !1,
|
|
2186
|
-
enumerable: !1,
|
|
2187
|
-
writable: !0,
|
|
2188
|
-
value: w
|
|
2189
|
-
}), Object.freeze && (Object.freeze(r.props), Object.freeze(r)), r;
|
|
2190
|
-
}
|
|
2191
|
-
function I(r, i, f, d, g, w) {
|
|
2192
|
-
var m = i.children;
|
|
2193
|
-
if (m !== void 0)
|
|
2194
|
-
if (d)
|
|
2195
|
-
if (z(m)) {
|
|
2196
|
-
for (d = 0; d < m.length; d++)
|
|
2197
|
-
L(m[d]);
|
|
2198
|
-
Object.freeze && Object.freeze(m);
|
|
2199
|
-
} else
|
|
2200
|
-
console.error(
|
|
2201
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
2202
|
-
);
|
|
2203
|
-
else L(m);
|
|
2204
|
-
if (ee.call(i, "key")) {
|
|
2205
|
-
m = n(r);
|
|
2206
|
-
var k = Object.keys(i).filter(function(G) {
|
|
2207
|
-
return G !== "key";
|
|
2208
|
-
});
|
|
2209
|
-
d = 0 < k.length ? "{key: someKey, " + k.join(": ..., ") + ": ...}" : "{key: someKey}", ae[m + d] || (k = 0 < k.length ? "{" + k.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
2210
|
-
`A props object containing a "key" prop is being spread into JSX:
|
|
2211
|
-
let props = %s;
|
|
2212
|
-
<%s {...props} />
|
|
2213
|
-
React keys must be passed directly to JSX without using spread:
|
|
2214
|
-
let props = %s;
|
|
2215
|
-
<%s key={someKey} {...props} />`,
|
|
2216
|
-
d,
|
|
2217
|
-
m,
|
|
2218
|
-
k,
|
|
2219
|
-
m
|
|
2220
|
-
), ae[m + d] = !0);
|
|
2221
|
-
}
|
|
2222
|
-
if (m = null, f !== void 0 && (s(f), m = "" + f), O(i) && (s(i.key), m = "" + i.key), "key" in i) {
|
|
2223
|
-
f = {};
|
|
2224
|
-
for (var P in i)
|
|
2225
|
-
P !== "key" && (f[P] = i[P]);
|
|
2226
|
-
} else f = i;
|
|
2227
|
-
return m && S(
|
|
2228
|
-
f,
|
|
2229
|
-
typeof r == "function" ? r.displayName || r.name || "Unknown" : r
|
|
2230
|
-
), V(
|
|
2231
|
-
r,
|
|
2232
|
-
m,
|
|
2233
|
-
f,
|
|
2234
|
-
c(),
|
|
2235
|
-
g,
|
|
2236
|
-
w
|
|
2237
|
-
);
|
|
2238
|
-
}
|
|
2239
|
-
function L(r) {
|
|
2240
|
-
$(r) ? r._store && (r._store.validated = 1) : typeof r == "object" && r !== null && r.$$typeof === N && (r._payload.status === "fulfilled" ? $(r._payload.value) && r._payload.value._store && (r._payload.value._store.validated = 1) : r._store && (r._store.validated = 1));
|
|
2241
|
-
}
|
|
2242
|
-
function $(r) {
|
|
2243
|
-
return typeof r == "object" && r !== null && r.$$typeof === Q;
|
|
2244
|
-
}
|
|
2245
|
-
var U = ot(), Q = Symbol.for("react.transitional.element"), oe = Symbol.for("react.portal"), X = Symbol.for("react.fragment"), W = Symbol.for("react.strict_mode"), K = Symbol.for("react.profiler"), se = Symbol.for("react.consumer"), Z = Symbol.for("react.context"), F = Symbol.for("react.forward_ref"), ie = Symbol.for("react.suspense"), R = Symbol.for("react.suspense_list"), le = Symbol.for("react.memo"), N = Symbol.for("react.lazy"), J = Symbol.for("react.activity"), ue = Symbol.for("react.client.reference"), C = U.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ee = Object.prototype.hasOwnProperty, z = Array.isArray, x = console.createTask ? console.createTask : function() {
|
|
2246
|
-
return null;
|
|
2247
|
-
};
|
|
2248
|
-
U = {
|
|
2249
|
-
react_stack_bottom_frame: function(r) {
|
|
2250
|
-
return r();
|
|
2251
|
-
}
|
|
2252
|
-
};
|
|
2253
|
-
var M, q = {}, te = U.react_stack_bottom_frame.bind(
|
|
2254
|
-
U,
|
|
2255
|
-
p
|
|
2256
|
-
)(), B = x(a(p)), ae = {};
|
|
2257
|
-
ye.Fragment = X, ye.jsx = function(r, i, f) {
|
|
2258
|
-
var d = 1e4 > C.recentlyCreatedOwnerStacks++;
|
|
2259
|
-
return I(
|
|
2260
|
-
r,
|
|
2261
|
-
i,
|
|
2262
|
-
f,
|
|
2263
|
-
!1,
|
|
2264
|
-
d ? Error("react-stack-top-frame") : te,
|
|
2265
|
-
d ? x(a(r)) : B
|
|
2266
|
-
);
|
|
2267
|
-
}, ye.jsxs = function(r, i, f) {
|
|
2268
|
-
var d = 1e4 > C.recentlyCreatedOwnerStacks++;
|
|
2269
|
-
return I(
|
|
2270
|
-
r,
|
|
2271
|
-
i,
|
|
2272
|
-
f,
|
|
2273
|
-
!0,
|
|
2274
|
-
d ? Error("react-stack-top-frame") : te,
|
|
2275
|
-
d ? x(a(r)) : B
|
|
2276
|
-
);
|
|
2277
|
-
};
|
|
2278
|
-
}()), ye;
|
|
2279
|
-
}
|
|
2280
|
-
var et;
|
|
2281
|
-
function kt() {
|
|
2282
|
-
return et || (et = 1, process.env.NODE_ENV === "production" ? Te.exports = Ot() : Te.exports = At()), Te.exports;
|
|
2283
|
-
}
|
|
2284
|
-
var H = kt(), ge = ot();
|
|
2285
|
-
class jt extends ge.Component {
|
|
2286
|
-
constructor(t) {
|
|
2287
|
-
super(t), this.unfilteredDocuments = [], this.state = {
|
|
2288
|
-
documents: [],
|
|
2289
|
-
mode: 0
|
|
2290
|
-
/* normal */
|
|
2291
|
-
};
|
|
2292
|
-
}
|
|
2293
|
-
async componentDidMount() {
|
|
2294
|
-
const { controller: t } = this.props;
|
|
2295
|
-
this.unsubscriber = t.onChange((s) => {
|
|
2296
|
-
s.documentCollection && (this.unfilteredDocuments = s.documentCollection, this.setState({
|
|
2297
|
-
documents: t.filter(this.unfilteredDocuments)
|
|
2298
|
-
})), s.action === "filterChange" ? this.setState({
|
|
2299
|
-
documents: t.filter(this.unfilteredDocuments)
|
|
2300
|
-
}) : this.setState({});
|
|
2301
|
-
}), this.unfilteredDocuments = await t.documentCollection(), this.setState({
|
|
2302
|
-
documents: t.filter(this.unfilteredDocuments)
|
|
2303
|
-
});
|
|
2304
|
-
}
|
|
2305
|
-
componentWillUnmount() {
|
|
2306
|
-
this.unsubscriber?.();
|
|
2307
|
-
}
|
|
2308
|
-
newDocument() {
|
|
2309
|
-
this.props.controller.newDocument(), this.setState({
|
|
2310
|
-
mode: 1
|
|
2311
|
-
/* add */
|
|
2312
|
-
});
|
|
2313
|
-
}
|
|
2314
|
-
editDocument(t) {
|
|
2315
|
-
this.props.controller.setDocument(t), this.setState({
|
|
2316
|
-
mode: 2
|
|
2317
|
-
/* edit */
|
|
2318
|
-
});
|
|
2319
|
-
}
|
|
2320
|
-
async storeDocument(t) {
|
|
2321
|
-
const { controller: s, layout: a } = this.props;
|
|
2322
|
-
s.setDocument(t), await s.storeDocument(), a === "formAndItems" ? this.newDocument() : this.setState({
|
|
2323
|
-
mode: 0
|
|
2324
|
-
/* normal */
|
|
2325
|
-
});
|
|
2326
|
-
}
|
|
2327
|
-
invokeContentViewChild(t) {
|
|
2328
|
-
const { children: s, layout: a, controller: c } = this.props, { mode: p } = this.state, O = a !== "formAndItems";
|
|
2329
|
-
if (!c.document) return;
|
|
2330
|
-
const S = {
|
|
2331
|
-
controller: c,
|
|
2332
|
-
submitButtonCaption: p == 2 ? t?.updateButtonLabel : t?.addButtonLabel,
|
|
2333
|
-
onSubmit: (D) => this.storeDocument(D),
|
|
2334
|
-
onCancel: O ? () => this.setState({
|
|
2335
|
-
mode: 0
|
|
2336
|
-
/* normal */
|
|
2337
|
-
}) : () => this.newDocument()
|
|
2338
|
-
};
|
|
2339
|
-
return typeof s[0] == "function" ? ge.cloneElement(s[0](S), { key: c.document.id }) : ge.cloneElement(s[0], { key: c.document.id, ...S });
|
|
2340
|
-
}
|
|
2341
|
-
invokeDetailViewChild(t) {
|
|
2342
|
-
const { children: s, controller: a } = this.props, c = {
|
|
2343
|
-
document: t,
|
|
2344
|
-
onSelect: (p) => this.editDocument(p),
|
|
2345
|
-
onDelete: (p) => a.setDocument(p).deleteDocument()
|
|
2346
|
-
};
|
|
2347
|
-
return typeof s[1] == "function" ? ge.cloneElement(s[1](c), { key: t.id }) : ge.cloneElement(s[1], { key: t.id, ...c });
|
|
2348
|
-
}
|
|
2349
|
-
render() {
|
|
2350
|
-
const { mode: t, documents: s } = this.state, { className: a, cardAddButton: c, controller: p } = this.props, O = Ct(p.document?.className);
|
|
2351
|
-
let S = this.props.labels || {};
|
|
2352
|
-
const D = this.props.layout || "itemsAlways";
|
|
2353
|
-
typeof S == "function" && (S = S(p));
|
|
2354
|
-
const { addNewDocumentLabel: V, singularDocumentInCollectionCaption: I, documentsInCollectionCaption: L, noDocumentsFoundLabel: $ } = S;
|
|
2355
|
-
return /* @__PURE__ */ H.jsxs("div", { className: `crud-panel ${O} ${a || ""}`, children: [
|
|
2356
|
-
t === 0 && D !== "formAndItems" && !c && /* @__PURE__ */ H.jsx("div", { className: "header", children: this.props.header ? typeof this.props.header == "function" ? this.props.header(p, () => this.newDocument(), S) : this.props.header : /* @__PURE__ */ H.jsx("button", { onClick: () => this.newDocument(), children: V }) }),
|
|
2357
|
-
(D === "formAndItems" || t === 1 || t === 2) && /* @__PURE__ */ H.jsx("div", { className: "content-panel", children: this.invokeContentViewChild(S) }),
|
|
2358
|
-
(D === "itemsAlways" || D === "formAndItems" || t === 0) && /* @__PURE__ */ H.jsxs("div", { className: "collection-panel", children: [
|
|
2359
|
-
s?.length > 0 && /* @__PURE__ */ H.jsx("h3", { children: s.length > 1 ? L : I || L }),
|
|
2360
|
-
/* @__PURE__ */ H.jsxs("div", { className: "documents", children: [
|
|
2361
|
-
c && /* @__PURE__ */ H.jsxs(
|
|
2362
|
-
"div",
|
|
2363
|
-
{
|
|
2364
|
-
className: "crud-card card-add-button clickable",
|
|
2365
|
-
onClick: () => this.newDocument(),
|
|
2366
|
-
children: [
|
|
2367
|
-
/* @__PURE__ */ H.jsx("div", { className: "button-element", children: c }),
|
|
2368
|
-
/* @__PURE__ */ H.jsx("div", { className: "add-label", children: V })
|
|
2369
|
-
]
|
|
2370
|
-
}
|
|
2371
|
-
),
|
|
2372
|
-
s?.length ? s.map((U) => this.invokeDetailViewChild(U)) : /* @__PURE__ */ H.jsx("p", { children: $ })
|
|
2373
|
-
] })
|
|
2374
|
-
] }),
|
|
2375
|
-
/* @__PURE__ */ H.jsx("div", { className: "footer", children: this.props.footer && typeof this.props.footer == "function" ? this.props.footer(p, () => this.newDocument(), S) : this.props.footer })
|
|
2376
|
-
] });
|
|
2377
|
-
}
|
|
2378
|
-
}
|
|
2379
|
-
export {
|
|
2380
|
-
Ge as CrudController,
|
|
2381
|
-
jt as CrudPanel
|
|
2382
|
-
};
|
|
2383
|
-
//# sourceMappingURL=entropic-bond-crud-panel.js.map
|
|
2181
|
+
//# sourceMappingURL=entropic-bond-crud-panel.js.map
|