@mui-toolpad-extended-tuni/users 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/UserEventPublisher.d.ts +1 -0
- package/dist/configureUserBus.d.ts +0 -4
- package/dist/index.cjs +17 -17
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +480 -476
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var ma = (a, e, o) =>
|
|
4
|
-
import { convertObjectKeysToUnderscore as
|
|
5
|
-
import { userBus as
|
|
6
|
-
import
|
|
7
|
-
function
|
|
1
|
+
var ao = Object.defineProperty;
|
|
2
|
+
var eo = (a, e, o) => e in a ? ao(a, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : a[e] = o;
|
|
3
|
+
var ma = (a, e, o) => eo(a, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import { convertObjectKeysToUnderscore as oo, axios as Ba, convertObjectKeysToCamelCase as oe, userBus as va, useSyncNavigationFilters as io, baseUrl as za, dataStore as oa, saveDataStore as to } from "mui-toolpad-extended-tuni";
|
|
5
|
+
import { userBus as Pt } from "mui-toolpad-extended-tuni";
|
|
6
|
+
import xa, { useRef as no, useEffect as Qa } from "react";
|
|
7
|
+
function so(a) {
|
|
8
8
|
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
9
9
|
}
|
|
10
|
-
var
|
|
10
|
+
var Ra = { exports: {} }, $a = {}, Ia = { exports: {} }, Ma = {};
|
|
11
11
|
/**
|
|
12
12
|
* @license React
|
|
13
13
|
* use-sync-external-store-shim.production.js
|
|
@@ -17,11 +17,11 @@ var Ta = { exports: {} }, Na = {}, Ra = { exports: {} }, $a = {};
|
|
|
17
17
|
* This source code is licensed under the MIT license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
19
19
|
*/
|
|
20
|
-
var
|
|
21
|
-
function
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
var a =
|
|
20
|
+
var ue;
|
|
21
|
+
function ro() {
|
|
22
|
+
if (ue) return Ma;
|
|
23
|
+
ue = 1;
|
|
24
|
+
var a = xa;
|
|
25
25
|
function e(c, b) {
|
|
26
26
|
return c === b && (c !== 0 || 1 / c === 1 / b) || c !== c && b !== b;
|
|
27
27
|
}
|
|
@@ -56,9 +56,9 @@ function no() {
|
|
|
56
56
|
return b();
|
|
57
57
|
}
|
|
58
58
|
var k = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? z : r;
|
|
59
|
-
return
|
|
59
|
+
return Ma.useSyncExternalStore = a.useSyncExternalStore !== void 0 ? a.useSyncExternalStore : k, Ma;
|
|
60
60
|
}
|
|
61
|
-
var
|
|
61
|
+
var Ha = {};
|
|
62
62
|
/**
|
|
63
63
|
* @license React
|
|
64
64
|
* use-sync-external-store-shim.development.js
|
|
@@ -68,9 +68,9 @@ var Ma = {};
|
|
|
68
68
|
* This source code is licensed under the MIT license found in the
|
|
69
69
|
* LICENSE file in the root directory of this source tree.
|
|
70
70
|
*/
|
|
71
|
-
var
|
|
72
|
-
function
|
|
73
|
-
return
|
|
71
|
+
var me;
|
|
72
|
+
function uo() {
|
|
73
|
+
return me || (me = 1, process.env.NODE_ENV !== "production" && function() {
|
|
74
74
|
function a(l, d) {
|
|
75
75
|
return l === d && (l !== 0 || 1 / l === 1 / d) || l !== l && d !== d;
|
|
76
76
|
}
|
|
@@ -117,13 +117,13 @@ function so() {
|
|
|
117
117
|
return d();
|
|
118
118
|
}
|
|
119
119
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
120
|
-
var t =
|
|
121
|
-
|
|
122
|
-
}()),
|
|
120
|
+
var t = xa, s = typeof Object.is == "function" ? Object.is : a, u = t.useState, r = t.useEffect, p = t.useLayoutEffect, z = t.useDebugValue, k = !1, c = !1, b = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? i : e;
|
|
121
|
+
Ha.useSyncExternalStore = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : b, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
122
|
+
}()), Ha;
|
|
123
123
|
}
|
|
124
|
-
var
|
|
125
|
-
function
|
|
126
|
-
return
|
|
124
|
+
var ce;
|
|
125
|
+
function Oe() {
|
|
126
|
+
return ce || (ce = 1, process.env.NODE_ENV === "production" ? Ia.exports = /* @__PURE__ */ ro() : Ia.exports = /* @__PURE__ */ uo()), Ia.exports;
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
129
129
|
* @license React
|
|
@@ -134,16 +134,16 @@ function Se() {
|
|
|
134
134
|
* This source code is licensed under the MIT license found in the
|
|
135
135
|
* LICENSE file in the root directory of this source tree.
|
|
136
136
|
*/
|
|
137
|
-
var
|
|
138
|
-
function
|
|
139
|
-
if (
|
|
140
|
-
|
|
141
|
-
var a =
|
|
137
|
+
var le;
|
|
138
|
+
function mo() {
|
|
139
|
+
if (le) return $a;
|
|
140
|
+
le = 1;
|
|
141
|
+
var a = xa, e = Oe();
|
|
142
142
|
function o(z, k) {
|
|
143
143
|
return z === k && (z !== 0 || 1 / z === 1 / k) || z !== z && k !== k;
|
|
144
144
|
}
|
|
145
145
|
var i = typeof Object.is == "function" ? Object.is : o, t = e.useSyncExternalStore, s = a.useRef, u = a.useEffect, r = a.useMemo, p = a.useDebugValue;
|
|
146
|
-
return
|
|
146
|
+
return $a.useSyncExternalStoreWithSelector = function(z, k, c, b, l) {
|
|
147
147
|
var d = s(null);
|
|
148
148
|
if (d.current === null) {
|
|
149
149
|
var E = { hasValue: !1, value: null };
|
|
@@ -183,9 +183,9 @@ function ro() {
|
|
|
183
183
|
},
|
|
184
184
|
[C]
|
|
185
185
|
), p(C), C;
|
|
186
|
-
},
|
|
186
|
+
}, $a;
|
|
187
187
|
}
|
|
188
|
-
var
|
|
188
|
+
var Va = {};
|
|
189
189
|
/**
|
|
190
190
|
* @license React
|
|
191
191
|
* use-sync-external-store-shim/with-selector.development.js
|
|
@@ -195,15 +195,15 @@ var Ha = {};
|
|
|
195
195
|
* This source code is licensed under the MIT license found in the
|
|
196
196
|
* LICENSE file in the root directory of this source tree.
|
|
197
197
|
*/
|
|
198
|
-
var
|
|
199
|
-
function
|
|
200
|
-
return
|
|
198
|
+
var pe;
|
|
199
|
+
function co() {
|
|
200
|
+
return pe || (pe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
201
201
|
function a(z, k) {
|
|
202
202
|
return z === k && (z !== 0 || 1 / z === 1 / k) || z !== z && k !== k;
|
|
203
203
|
}
|
|
204
204
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
205
|
-
var e =
|
|
206
|
-
|
|
205
|
+
var e = xa, o = Oe(), i = typeof Object.is == "function" ? Object.is : a, t = o.useSyncExternalStore, s = e.useRef, u = e.useEffect, r = e.useMemo, p = e.useDebugValue;
|
|
206
|
+
Va.useSyncExternalStoreWithSelector = function(z, k, c, b, l) {
|
|
207
207
|
var d = s(null);
|
|
208
208
|
if (d.current === null) {
|
|
209
209
|
var E = { hasValue: !1, value: null };
|
|
@@ -245,14 +245,14 @@ function uo() {
|
|
|
245
245
|
[C]
|
|
246
246
|
), p(C), C;
|
|
247
247
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
248
|
-
}()),
|
|
248
|
+
}()), Va;
|
|
249
249
|
}
|
|
250
|
-
var
|
|
251
|
-
function
|
|
252
|
-
return
|
|
250
|
+
var de;
|
|
251
|
+
function lo() {
|
|
252
|
+
return de || (de = 1, process.env.NODE_ENV === "production" ? Ra.exports = /* @__PURE__ */ mo() : Ra.exports = /* @__PURE__ */ co()), Ra.exports;
|
|
253
253
|
}
|
|
254
|
-
var
|
|
255
|
-
const
|
|
254
|
+
var po = /* @__PURE__ */ lo();
|
|
255
|
+
const ho = /* @__PURE__ */ so(po), go = {}, he = (a) => {
|
|
256
256
|
let e;
|
|
257
257
|
const o = /* @__PURE__ */ new Set(), i = (k, c) => {
|
|
258
258
|
const b = typeof k == "function" ? k(e) : k;
|
|
@@ -261,33 +261,33 @@ const lo = /* @__PURE__ */ to(co), po = {}, pe = (a) => {
|
|
|
261
261
|
e = c ?? (typeof b != "object" || b === null) ? b : Object.assign({}, e, b), o.forEach((d) => d(e, l));
|
|
262
262
|
}
|
|
263
263
|
}, t = () => e, p = { setState: i, getState: t, getInitialState: () => z, subscribe: (k) => (o.add(k), () => o.delete(k)), destroy: () => {
|
|
264
|
-
(
|
|
264
|
+
(go ? "production" : void 0) !== "production" && console.warn(
|
|
265
265
|
"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
|
|
266
266
|
), o.clear();
|
|
267
267
|
} }, z = e = a(i, t, p);
|
|
268
268
|
return p;
|
|
269
|
-
},
|
|
270
|
-
function
|
|
271
|
-
const i =
|
|
269
|
+
}, ko = (a) => a ? he(a) : he, { useDebugValue: fo } = xa, { useSyncExternalStoreWithSelector: jo } = ho, bo = (a) => a;
|
|
270
|
+
function yo(a, e = bo, o) {
|
|
271
|
+
const i = jo(
|
|
272
272
|
a.subscribe,
|
|
273
273
|
a.getState,
|
|
274
274
|
a.getServerState || a.getInitialState,
|
|
275
275
|
e,
|
|
276
276
|
o
|
|
277
277
|
);
|
|
278
|
-
return
|
|
278
|
+
return fo(i), i;
|
|
279
279
|
}
|
|
280
|
-
const
|
|
281
|
-
const o =
|
|
280
|
+
const ge = (a, e) => {
|
|
281
|
+
const o = ko(a), i = (t, s = e) => yo(o, t, s);
|
|
282
282
|
return Object.assign(i, o), i;
|
|
283
|
-
},
|
|
283
|
+
}, vo = (a, e) => a ? ge(a, e) : ge, wo = async () => {
|
|
284
284
|
try {
|
|
285
285
|
const a = await Ba.get("api/users/current/");
|
|
286
|
-
return
|
|
286
|
+
return oe(a.data);
|
|
287
287
|
} catch (a) {
|
|
288
288
|
throw console.error("Error getting current user", a), a;
|
|
289
289
|
}
|
|
290
|
-
},
|
|
290
|
+
}, ke = async (a) => {
|
|
291
291
|
try {
|
|
292
292
|
const e = await Ba.get(
|
|
293
293
|
`api/users/${a ? `?course_id=${a}` : ""}`
|
|
@@ -295,42 +295,42 @@ const de = (a, e) => {
|
|
|
295
295
|
if (!Array.isArray(e.data))
|
|
296
296
|
throw new Error("Invalid response data");
|
|
297
297
|
return e.data.map(
|
|
298
|
-
(o) =>
|
|
298
|
+
(o) => oe(o)
|
|
299
299
|
);
|
|
300
300
|
} catch (e) {
|
|
301
301
|
throw console.error("Error getting users", e), e;
|
|
302
302
|
}
|
|
303
|
-
},
|
|
303
|
+
}, xo = async (a) => {
|
|
304
304
|
var e, o;
|
|
305
305
|
try {
|
|
306
306
|
if (!(a != null && a.id))
|
|
307
307
|
throw new Error("Cannot update user: user.id is undefined");
|
|
308
|
-
const i =
|
|
308
|
+
const i = oo(a), t = await Ba.put(
|
|
309
309
|
`api/users/${a.id}/`,
|
|
310
310
|
i
|
|
311
311
|
);
|
|
312
312
|
if (!t.data)
|
|
313
313
|
throw new Error("No data received from server");
|
|
314
|
-
const s =
|
|
314
|
+
const s = oe(t.data);
|
|
315
315
|
return (o = (e = a.image) == null ? void 0 : e.large) != null && o.startsWith("data:image") && (s.image = { ...a.image, ...s.image }), s;
|
|
316
316
|
} catch (i) {
|
|
317
317
|
throw console.error("Error updating user:", i), i;
|
|
318
318
|
}
|
|
319
|
-
},
|
|
319
|
+
}, zo = async () => {
|
|
320
320
|
try {
|
|
321
321
|
await Ba.post("/auth/lti_logout/");
|
|
322
322
|
} catch (a) {
|
|
323
323
|
throw console.error("Error logging out user", a), a;
|
|
324
324
|
}
|
|
325
|
-
},
|
|
325
|
+
}, Wa = "/static/images/student.png", Ja = "/static/images/teacher.png", Ga = "/static/images/guest.png", Ya = "/static/images/admin.png", Ka = [
|
|
326
326
|
{
|
|
327
327
|
id: "1",
|
|
328
328
|
name: "Teacher User",
|
|
329
329
|
email: "teacher@edu.com",
|
|
330
330
|
image: {
|
|
331
|
-
large:
|
|
332
|
-
medium:
|
|
333
|
-
thumbnail:
|
|
331
|
+
large: Ja,
|
|
332
|
+
medium: Ja,
|
|
333
|
+
thumbnail: Ja
|
|
334
334
|
},
|
|
335
335
|
privacySettings: {
|
|
336
336
|
allowAnalytics: !1,
|
|
@@ -366,9 +366,9 @@ const de = (a, e) => {
|
|
|
366
366
|
name: "Student User",
|
|
367
367
|
email: "student@edu.com",
|
|
368
368
|
image: {
|
|
369
|
-
large:
|
|
370
|
-
medium:
|
|
371
|
-
thumbnail:
|
|
369
|
+
large: Wa,
|
|
370
|
+
medium: Wa,
|
|
371
|
+
thumbnail: Wa
|
|
372
372
|
},
|
|
373
373
|
privacySettings: {
|
|
374
374
|
allowAnalytics: !1,
|
|
@@ -404,9 +404,9 @@ const de = (a, e) => {
|
|
|
404
404
|
name: "Guest User",
|
|
405
405
|
email: "",
|
|
406
406
|
image: {
|
|
407
|
-
large:
|
|
408
|
-
medium:
|
|
409
|
-
thumbnail:
|
|
407
|
+
large: Ga,
|
|
408
|
+
medium: Ga,
|
|
409
|
+
thumbnail: Ga
|
|
410
410
|
},
|
|
411
411
|
privacySettings: {
|
|
412
412
|
allowAnalytics: !1,
|
|
@@ -442,9 +442,9 @@ const de = (a, e) => {
|
|
|
442
442
|
name: "Admin User",
|
|
443
443
|
email: "admin@edu.com",
|
|
444
444
|
image: {
|
|
445
|
-
large:
|
|
446
|
-
medium:
|
|
447
|
-
thumbnail:
|
|
445
|
+
large: Ya,
|
|
446
|
+
medium: Ya,
|
|
447
|
+
thumbnail: Ya
|
|
448
448
|
},
|
|
449
449
|
privacySettings: {
|
|
450
450
|
allowAnalytics: !1,
|
|
@@ -475,11 +475,11 @@ const de = (a, e) => {
|
|
|
475
475
|
},
|
|
476
476
|
platformRoles: ["creator", "moderator"]
|
|
477
477
|
}
|
|
478
|
-
],
|
|
478
|
+
], fa = vo((a) => ({
|
|
479
479
|
fetchState: "idle",
|
|
480
480
|
user: null,
|
|
481
481
|
userToUpdate: null,
|
|
482
|
-
testUsers:
|
|
482
|
+
testUsers: Ka,
|
|
483
483
|
users: [],
|
|
484
484
|
courseUsers: [],
|
|
485
485
|
setUserToUpdate: (e) => a({ userToUpdate: e }),
|
|
@@ -487,12 +487,12 @@ const de = (a, e) => {
|
|
|
487
487
|
setUser: (e) => a({ user: e }),
|
|
488
488
|
getUser: async () => {
|
|
489
489
|
try {
|
|
490
|
-
a({ fetchState: "loading" }), a({ testUsers:
|
|
491
|
-
const e = await
|
|
490
|
+
a({ fetchState: "loading" }), a({ testUsers: Ka });
|
|
491
|
+
const e = await wo();
|
|
492
492
|
e && a({
|
|
493
493
|
user: { ...e },
|
|
494
494
|
fetchState: "idle",
|
|
495
|
-
testUsers:
|
|
495
|
+
testUsers: Ka.filter((o) => o.id !== e.id)
|
|
496
496
|
});
|
|
497
497
|
} catch (e) {
|
|
498
498
|
console.error("Error getting user", e), a({ fetchState: "error" });
|
|
@@ -501,7 +501,7 @@ const de = (a, e) => {
|
|
|
501
501
|
getUsers: async () => {
|
|
502
502
|
try {
|
|
503
503
|
a({ fetchState: "loading" });
|
|
504
|
-
const e = await
|
|
504
|
+
const e = await ke();
|
|
505
505
|
a(e ? { users: e, fetchState: "idle" } : { fetchState: "error" });
|
|
506
506
|
} catch {
|
|
507
507
|
a({ fetchState: "error" });
|
|
@@ -510,7 +510,7 @@ const de = (a, e) => {
|
|
|
510
510
|
fetchCourseUsers: async (e) => {
|
|
511
511
|
try {
|
|
512
512
|
a({ fetchState: "loading" });
|
|
513
|
-
const o = await
|
|
513
|
+
const o = await ke(e);
|
|
514
514
|
a({ courseUsers: o, fetchState: "idle" });
|
|
515
515
|
} catch {
|
|
516
516
|
a({ fetchState: "error" });
|
|
@@ -519,7 +519,7 @@ const de = (a, e) => {
|
|
|
519
519
|
clearUser: () => a({ user: null }),
|
|
520
520
|
logout: async () => {
|
|
521
521
|
try {
|
|
522
|
-
return await
|
|
522
|
+
return await zo(), a({ user: null }), Promise.resolve();
|
|
523
523
|
} catch (e) {
|
|
524
524
|
return Promise.reject(e);
|
|
525
525
|
}
|
|
@@ -527,7 +527,7 @@ const de = (a, e) => {
|
|
|
527
527
|
updateUser: async (e) => {
|
|
528
528
|
try {
|
|
529
529
|
a({ fetchState: "loading" });
|
|
530
|
-
const o = await
|
|
530
|
+
const o = await xo(e);
|
|
531
531
|
return a((i) => {
|
|
532
532
|
var s;
|
|
533
533
|
return {
|
|
@@ -542,7 +542,35 @@ const de = (a, e) => {
|
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
}));
|
|
545
|
-
|
|
545
|
+
let fe = !1;
|
|
546
|
+
function ie() {
|
|
547
|
+
if (fe)
|
|
548
|
+
return;
|
|
549
|
+
const a = {
|
|
550
|
+
getUser: async () => {
|
|
551
|
+
await fa.getState().getUser();
|
|
552
|
+
},
|
|
553
|
+
updateUser: async (e) => await fa.getState().updateUser(e),
|
|
554
|
+
setUserToUpdate: (e) => {
|
|
555
|
+
fa.getState().setUserToUpdate(e);
|
|
556
|
+
},
|
|
557
|
+
fetchCourseUsers: async (e) => {
|
|
558
|
+
await fa.getState().fetchCourseUsers(e);
|
|
559
|
+
},
|
|
560
|
+
logout: async () => {
|
|
561
|
+
await fa.getState().logout();
|
|
562
|
+
},
|
|
563
|
+
getState: () => {
|
|
564
|
+
const e = fa.getState();
|
|
565
|
+
return {
|
|
566
|
+
user: e.user,
|
|
567
|
+
courseUsers: e.courseUsers
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
va.configureStore(a), fe = !0;
|
|
572
|
+
}
|
|
573
|
+
var Pa = { exports: {} }, Ea = {};
|
|
546
574
|
/**
|
|
547
575
|
* @license React
|
|
548
576
|
* react-jsx-runtime.production.js
|
|
@@ -552,10 +580,10 @@ var Ia = { exports: {} }, za = {};
|
|
|
552
580
|
* This source code is licensed under the MIT license found in the
|
|
553
581
|
* LICENSE file in the root directory of this source tree.
|
|
554
582
|
*/
|
|
555
|
-
var
|
|
556
|
-
function
|
|
557
|
-
if (
|
|
558
|
-
|
|
583
|
+
var je;
|
|
584
|
+
function Eo() {
|
|
585
|
+
if (je) return Ea;
|
|
586
|
+
je = 1;
|
|
559
587
|
var a = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
560
588
|
function o(i, t, s) {
|
|
561
589
|
var u = null;
|
|
@@ -572,9 +600,9 @@ function zo() {
|
|
|
572
600
|
props: s
|
|
573
601
|
};
|
|
574
602
|
}
|
|
575
|
-
return
|
|
603
|
+
return Ea.Fragment = e, Ea.jsx = o, Ea.jsxs = o, Ea;
|
|
576
604
|
}
|
|
577
|
-
var
|
|
605
|
+
var Ca = {};
|
|
578
606
|
/**
|
|
579
607
|
* @license React
|
|
580
608
|
* react-jsx-runtime.development.js
|
|
@@ -584,9 +612,9 @@ var Ea = {};
|
|
|
584
612
|
* This source code is licensed under the MIT license found in the
|
|
585
613
|
* LICENSE file in the root directory of this source tree.
|
|
586
614
|
*/
|
|
587
|
-
var
|
|
588
|
-
function
|
|
589
|
-
return
|
|
615
|
+
var be;
|
|
616
|
+
function Co() {
|
|
617
|
+
return be || (be = 1, process.env.NODE_ENV !== "production" && function() {
|
|
590
618
|
function a(w) {
|
|
591
619
|
if (w == null) return null;
|
|
592
620
|
if (typeof w == "function")
|
|
@@ -642,8 +670,8 @@ function Eo() {
|
|
|
642
670
|
}
|
|
643
671
|
if (D) {
|
|
644
672
|
D = console;
|
|
645
|
-
var
|
|
646
|
-
return
|
|
673
|
+
var U = D.error, M = typeof Symbol == "function" && Symbol.toStringTag && w[Symbol.toStringTag] || w.constructor.name || "Object";
|
|
674
|
+
return U.call(
|
|
647
675
|
D,
|
|
648
676
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
649
677
|
M
|
|
@@ -676,14 +704,14 @@ function Eo() {
|
|
|
676
704
|
return w.key !== void 0;
|
|
677
705
|
}
|
|
678
706
|
function r(w, D) {
|
|
679
|
-
function
|
|
707
|
+
function U() {
|
|
680
708
|
q || (q = !0, console.error(
|
|
681
709
|
"%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)",
|
|
682
710
|
D
|
|
683
711
|
));
|
|
684
712
|
}
|
|
685
|
-
|
|
686
|
-
get:
|
|
713
|
+
U.isReactWarning = !0, Object.defineProperty(w, "key", {
|
|
714
|
+
get: U,
|
|
687
715
|
configurable: !0
|
|
688
716
|
});
|
|
689
717
|
}
|
|
@@ -693,13 +721,13 @@ function Eo() {
|
|
|
693
721
|
"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."
|
|
694
722
|
)), w = this.props.ref, w !== void 0 ? w : null;
|
|
695
723
|
}
|
|
696
|
-
function z(w, D,
|
|
697
|
-
var N =
|
|
724
|
+
function z(w, D, U, M, aa, ea) {
|
|
725
|
+
var N = U.ref;
|
|
698
726
|
return w = {
|
|
699
727
|
$$typeof: d,
|
|
700
728
|
type: w,
|
|
701
729
|
key: D,
|
|
702
|
-
props:
|
|
730
|
+
props: U,
|
|
703
731
|
_owner: M
|
|
704
732
|
}, (N !== void 0 ? N : null) !== null ? Object.defineProperty(w, "ref", {
|
|
705
733
|
enumerable: !1,
|
|
@@ -726,7 +754,7 @@ function Eo() {
|
|
|
726
754
|
value: ea
|
|
727
755
|
}), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
|
|
728
756
|
}
|
|
729
|
-
function k(w, D,
|
|
757
|
+
function k(w, D, U, M, aa, ea) {
|
|
730
758
|
var N = D.children;
|
|
731
759
|
if (N !== void 0)
|
|
732
760
|
if (M)
|
|
@@ -757,18 +785,18 @@ React keys must be passed directly to JSX without using spread:
|
|
|
757
785
|
N
|
|
758
786
|
), Z[N + M] = !0);
|
|
759
787
|
}
|
|
760
|
-
if (N = null,
|
|
761
|
-
|
|
788
|
+
if (N = null, U !== void 0 && (o(U), N = "" + U), u(D) && (o(D.key), N = "" + D.key), "key" in D) {
|
|
789
|
+
U = {};
|
|
762
790
|
for (var ra in D)
|
|
763
|
-
ra !== "key" && (
|
|
764
|
-
} else
|
|
791
|
+
ra !== "key" && (U[ra] = D[ra]);
|
|
792
|
+
} else U = D;
|
|
765
793
|
return N && r(
|
|
766
|
-
|
|
794
|
+
U,
|
|
767
795
|
typeof w == "function" ? w.displayName || w.name || "Unknown" : w
|
|
768
796
|
), z(
|
|
769
797
|
w,
|
|
770
798
|
N,
|
|
771
|
-
|
|
799
|
+
U,
|
|
772
800
|
t(),
|
|
773
801
|
aa,
|
|
774
802
|
ea
|
|
@@ -780,7 +808,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
780
808
|
function b(w) {
|
|
781
809
|
return typeof w == "object" && w !== null && w.$$typeof === d;
|
|
782
810
|
}
|
|
783
|
-
var l =
|
|
811
|
+
var l = xa, d = Symbol.for("react.transitional.element"), E = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), h = Symbol.for("react.context"), x = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), R = Symbol.for("react.activity"), I = Symbol.for("react.client.reference"), J = l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ta = Object.prototype.hasOwnProperty, na = Array.isArray, f = console.createTask ? console.createTask : function() {
|
|
784
812
|
return null;
|
|
785
813
|
};
|
|
786
814
|
l = {
|
|
@@ -792,39 +820,39 @@ React keys must be passed directly to JSX without using spread:
|
|
|
792
820
|
l,
|
|
793
821
|
s
|
|
794
822
|
)(), G = f(i(s)), Z = {};
|
|
795
|
-
|
|
823
|
+
Ca.Fragment = C, Ca.jsx = function(w, D, U) {
|
|
796
824
|
var M = 1e4 > J.recentlyCreatedOwnerStacks++;
|
|
797
825
|
return k(
|
|
798
826
|
w,
|
|
799
827
|
D,
|
|
800
|
-
|
|
828
|
+
U,
|
|
801
829
|
!1,
|
|
802
830
|
M ? Error("react-stack-top-frame") : $,
|
|
803
831
|
M ? f(i(w)) : G
|
|
804
832
|
);
|
|
805
|
-
},
|
|
833
|
+
}, Ca.jsxs = function(w, D, U) {
|
|
806
834
|
var M = 1e4 > J.recentlyCreatedOwnerStacks++;
|
|
807
835
|
return k(
|
|
808
836
|
w,
|
|
809
837
|
D,
|
|
810
|
-
|
|
838
|
+
U,
|
|
811
839
|
!0,
|
|
812
840
|
M ? Error("react-stack-top-frame") : $,
|
|
813
841
|
M ? f(i(w)) : G
|
|
814
842
|
);
|
|
815
843
|
};
|
|
816
|
-
}()),
|
|
844
|
+
}()), Ca;
|
|
817
845
|
}
|
|
818
|
-
var
|
|
819
|
-
function
|
|
820
|
-
return
|
|
846
|
+
var ye;
|
|
847
|
+
function So() {
|
|
848
|
+
return ye || (ye = 1, process.env.NODE_ENV === "production" ? Pa.exports = /* @__PURE__ */ Eo() : Pa.exports = /* @__PURE__ */ Co()), Pa.exports;
|
|
821
849
|
}
|
|
822
|
-
var
|
|
823
|
-
const
|
|
824
|
-
const { user: a } =
|
|
825
|
-
return
|
|
826
|
-
|
|
827
|
-
}, []),
|
|
850
|
+
var qa = /* @__PURE__ */ So();
|
|
851
|
+
const _o = () => (io(), null), Ao = () => {
|
|
852
|
+
const { user: a } = fa(), e = no(null);
|
|
853
|
+
return Qa(() => {
|
|
854
|
+
ie(), va.initializeFromStore();
|
|
855
|
+
}, []), Qa(() => {
|
|
828
856
|
const o = a, i = e.current;
|
|
829
857
|
if (o && !i) {
|
|
830
858
|
const t = {
|
|
@@ -832,14 +860,14 @@ const So = () => (eo(), null), _o = () => {
|
|
|
832
860
|
user: o,
|
|
833
861
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
834
862
|
};
|
|
835
|
-
|
|
863
|
+
va.publish(t);
|
|
836
864
|
} else if (!o && i) {
|
|
837
865
|
const t = {
|
|
838
866
|
type: "user:loggedOut",
|
|
839
867
|
user: null,
|
|
840
868
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
841
869
|
};
|
|
842
|
-
|
|
870
|
+
va.publish(t);
|
|
843
871
|
} else if (o && i && o.id === i.id) {
|
|
844
872
|
const t = JSON.stringify(o.preferences) !== JSON.stringify(i.preferences);
|
|
845
873
|
if (t) {
|
|
@@ -851,7 +879,7 @@ const So = () => (eo(), null), _o = () => {
|
|
|
851
879
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
852
880
|
metadata: { changedPreferences: u }
|
|
853
881
|
};
|
|
854
|
-
|
|
882
|
+
va.publish(r);
|
|
855
883
|
}
|
|
856
884
|
if ((o.name !== i.name || o.email !== i.email || JSON.stringify(o.privacySettings) !== JSON.stringify(i.privacySettings) || JSON.stringify(o.gdprConsent) !== JSON.stringify(i.gdprConsent) || JSON.stringify(o.dataRetention) !== JSON.stringify(i.dataRetention) || JSON.stringify(o.platformRoles) !== JSON.stringify(i.platformRoles)) && !t) {
|
|
857
885
|
const u = {
|
|
@@ -860,18 +888,20 @@ const So = () => (eo(), null), _o = () => {
|
|
|
860
888
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
861
889
|
metadata: { previousUser: i }
|
|
862
890
|
};
|
|
863
|
-
|
|
891
|
+
va.publish(u);
|
|
864
892
|
}
|
|
865
893
|
}
|
|
866
894
|
e.current = o;
|
|
867
895
|
}, [a]), null;
|
|
868
|
-
},
|
|
869
|
-
|
|
870
|
-
|
|
896
|
+
}, Dt = ({ children: a }) => (Qa(() => {
|
|
897
|
+
ie();
|
|
898
|
+
}, []), /* @__PURE__ */ qa.jsxs(qa.Fragment, { children: [
|
|
899
|
+
/* @__PURE__ */ qa.jsx(_o, {}),
|
|
900
|
+
/* @__PURE__ */ qa.jsx(Ao, {}),
|
|
871
901
|
a
|
|
872
|
-
] });
|
|
873
|
-
var
|
|
874
|
-
function
|
|
902
|
+
] }));
|
|
903
|
+
var Oo = /(%?)(%([sdijo]))/g;
|
|
904
|
+
function Fo(a, e) {
|
|
875
905
|
switch (e) {
|
|
876
906
|
case "s":
|
|
877
907
|
return a;
|
|
@@ -888,38 +918,38 @@ function Oo(a, e) {
|
|
|
888
918
|
}
|
|
889
919
|
}
|
|
890
920
|
}
|
|
891
|
-
function
|
|
921
|
+
function te(a, ...e) {
|
|
892
922
|
if (e.length === 0)
|
|
893
923
|
return a;
|
|
894
924
|
let o = 0, i = a.replace(
|
|
895
|
-
|
|
925
|
+
Oo,
|
|
896
926
|
(t, s, u, r) => {
|
|
897
|
-
const p = e[o], z =
|
|
927
|
+
const p = e[o], z = Fo(p, r);
|
|
898
928
|
return s ? t : (o++, z);
|
|
899
929
|
}
|
|
900
930
|
);
|
|
901
931
|
return o < e.length && (i += ` ${e.slice(o).join(" ")}`), i = i.replace(/%{2,2}/g, "%"), i;
|
|
902
932
|
}
|
|
903
|
-
var
|
|
904
|
-
function
|
|
933
|
+
var Do = 2;
|
|
934
|
+
function To(a) {
|
|
905
935
|
if (!a.stack)
|
|
906
936
|
return;
|
|
907
937
|
const e = a.stack.split(`
|
|
908
938
|
`);
|
|
909
|
-
e.splice(1,
|
|
939
|
+
e.splice(1, Do), a.stack = e.join(`
|
|
910
940
|
`);
|
|
911
941
|
}
|
|
912
|
-
var
|
|
942
|
+
var Ro = class extends Error {
|
|
913
943
|
constructor(a, ...e) {
|
|
914
|
-
super(a), this.message = a, this.name = "Invariant Violation", this.message =
|
|
944
|
+
super(a), this.message = a, this.name = "Invariant Violation", this.message = te(a, ...e), To(this);
|
|
915
945
|
}
|
|
916
|
-
},
|
|
946
|
+
}, ne = (a, e, ...o) => {
|
|
917
947
|
if (!a)
|
|
918
|
-
throw new
|
|
948
|
+
throw new Ro(e, ...o);
|
|
919
949
|
};
|
|
920
|
-
|
|
950
|
+
ne.as = (a, e, o, ...i) => {
|
|
921
951
|
if (!e) {
|
|
922
|
-
const t = i.length === 0 ? o :
|
|
952
|
+
const t = i.length === 0 ? o : te(o, ...i);
|
|
923
953
|
let s;
|
|
924
954
|
try {
|
|
925
955
|
s = Reflect.construct(a, [
|
|
@@ -931,32 +961,32 @@ oe.as = (a, e, o, ...i) => {
|
|
|
931
961
|
throw s;
|
|
932
962
|
}
|
|
933
963
|
};
|
|
934
|
-
const
|
|
935
|
-
function
|
|
936
|
-
const o =
|
|
937
|
-
return `${
|
|
938
|
-
}
|
|
939
|
-
function Io(a, ...e) {
|
|
940
|
-
console.warn(ie(a, ...e));
|
|
964
|
+
const Io = "[MSW]";
|
|
965
|
+
function se(a, ...e) {
|
|
966
|
+
const o = te(a, ...e);
|
|
967
|
+
return `${Io} ${o}`;
|
|
941
968
|
}
|
|
942
969
|
function Po(a, ...e) {
|
|
943
|
-
console.
|
|
970
|
+
console.warn(se(a, ...e));
|
|
971
|
+
}
|
|
972
|
+
function qo(a, ...e) {
|
|
973
|
+
console.error(se(a, ...e));
|
|
944
974
|
}
|
|
945
|
-
const
|
|
946
|
-
formatMessage:
|
|
947
|
-
warn:
|
|
948
|
-
error:
|
|
975
|
+
const ae = {
|
|
976
|
+
formatMessage: se,
|
|
977
|
+
warn: Po,
|
|
978
|
+
error: qo
|
|
949
979
|
};
|
|
950
|
-
function
|
|
951
|
-
|
|
980
|
+
function Uo() {
|
|
981
|
+
ne(
|
|
952
982
|
typeof URL < "u",
|
|
953
|
-
|
|
983
|
+
ae.formatMessage(
|
|
954
984
|
`Global "URL" class is not defined. This likely means that you're running MSW in an environment that doesn't support all Node.js standard API (e.g. React Native). If that's the case, please use an appropriate polyfill for the "URL" class, like "react-native-url-polyfill".`
|
|
955
985
|
)
|
|
956
986
|
);
|
|
957
987
|
}
|
|
958
988
|
const Lo = /[\/\\]msw[\/\\]src[\/\\](.+)/, Bo = /(node_modules)?[\/\\]lib[\/\\](core|browser|node|native|iife)[\/\\]|^[^\/\\]*$/;
|
|
959
|
-
function
|
|
989
|
+
function No(a) {
|
|
960
990
|
const e = a.stack;
|
|
961
991
|
if (!e)
|
|
962
992
|
return;
|
|
@@ -964,10 +994,10 @@ function Uo(a) {
|
|
|
964
994
|
`).slice(1).find((s) => !(Lo.test(s) || Bo.test(s)));
|
|
965
995
|
return i ? i.replace(/\s*at [^()]*\(([^)]+)\)/, "$1").replace(/^@/, "") : void 0;
|
|
966
996
|
}
|
|
967
|
-
function
|
|
997
|
+
function $o(a) {
|
|
968
998
|
return a ? Reflect.has(a, Symbol.iterator) || Reflect.has(a, Symbol.asyncIterator) : !1;
|
|
969
999
|
}
|
|
970
|
-
const
|
|
1000
|
+
const Oa = class Oa {
|
|
971
1001
|
constructor(e) {
|
|
972
1002
|
ma(this, "__kind");
|
|
973
1003
|
ma(this, "info");
|
|
@@ -981,7 +1011,7 @@ const Aa = class Aa {
|
|
|
981
1011
|
ma(this, "resolverIteratorResult");
|
|
982
1012
|
ma(this, "options");
|
|
983
1013
|
this.resolver = e.resolver, this.options = e.options;
|
|
984
|
-
const o =
|
|
1014
|
+
const o = No(new Error());
|
|
985
1015
|
this.info = {
|
|
986
1016
|
...e.info,
|
|
987
1017
|
callFrame: o
|
|
@@ -1019,11 +1049,11 @@ const Aa = class Aa {
|
|
|
1019
1049
|
// and the response resolver so we can always read it for logging.
|
|
1020
1050
|
// We only clone it once per request to avoid unnecessary overhead.
|
|
1021
1051
|
cloneRequestOrGetFromCache(e) {
|
|
1022
|
-
const o =
|
|
1052
|
+
const o = Oa.cache.get(e);
|
|
1023
1053
|
if (typeof o < "u")
|
|
1024
1054
|
return o;
|
|
1025
1055
|
const i = e.clone();
|
|
1026
|
-
return
|
|
1056
|
+
return Oa.cache.set(e, i), i;
|
|
1027
1057
|
}
|
|
1028
1058
|
/**
|
|
1029
1059
|
* Execute this request handler and produce a mocked response
|
|
@@ -1070,7 +1100,7 @@ const Aa = class Aa {
|
|
|
1070
1100
|
var u;
|
|
1071
1101
|
if (!this.resolverIterator) {
|
|
1072
1102
|
const r = await e(o);
|
|
1073
|
-
if (
|
|
1103
|
+
if (!$o(r))
|
|
1074
1104
|
return r;
|
|
1075
1105
|
this.resolverIterator = Symbol.iterator in r ? r[Symbol.iterator]() : r[Symbol.asyncIterator]();
|
|
1076
1106
|
}
|
|
@@ -1089,19 +1119,19 @@ const Aa = class Aa {
|
|
|
1089
1119
|
};
|
|
1090
1120
|
}
|
|
1091
1121
|
};
|
|
1092
|
-
ma(
|
|
1093
|
-
let
|
|
1094
|
-
function
|
|
1122
|
+
ma(Oa, "cache", /* @__PURE__ */ new WeakMap());
|
|
1123
|
+
let ee = Oa;
|
|
1124
|
+
function Mo(a, e) {
|
|
1095
1125
|
return a.toLowerCase() === e.toLowerCase();
|
|
1096
1126
|
}
|
|
1097
|
-
function
|
|
1127
|
+
function Ho(a) {
|
|
1098
1128
|
return a < 300 ? "#69AB32" : a < 400 ? "#F0BB4B" : "#E95F5D";
|
|
1099
1129
|
}
|
|
1100
|
-
function
|
|
1130
|
+
function Vo(a) {
|
|
1101
1131
|
const e = /* @__PURE__ */ new Date();
|
|
1102
1132
|
return `${e.getHours().toString().padStart(2, "0")}:${e.getMinutes().toString().padStart(2, "0")}:${e.getSeconds().toString().padStart(2, "0")}`;
|
|
1103
1133
|
}
|
|
1104
|
-
async function
|
|
1134
|
+
async function Wo(a) {
|
|
1105
1135
|
const o = await a.clone().text();
|
|
1106
1136
|
return {
|
|
1107
1137
|
url: new URL(a.url),
|
|
@@ -1110,21 +1140,21 @@ async function Vo(a) {
|
|
|
1110
1140
|
body: o
|
|
1111
1141
|
};
|
|
1112
1142
|
}
|
|
1113
|
-
var
|
|
1114
|
-
return e || (0, a[
|
|
1115
|
-
},
|
|
1143
|
+
var Jo = Object.create, Fe = Object.defineProperty, Go = Object.getOwnPropertyDescriptor, De = Object.getOwnPropertyNames, Yo = Object.getPrototypeOf, Ko = Object.prototype.hasOwnProperty, Te = (a, e) => function() {
|
|
1144
|
+
return e || (0, a[De(a)[0]])((e = { exports: {} }).exports, e), e.exports;
|
|
1145
|
+
}, Xo = (a, e, o, i) => {
|
|
1116
1146
|
if (e && typeof e == "object" || typeof e == "function")
|
|
1117
|
-
for (let t of
|
|
1118
|
-
!
|
|
1147
|
+
for (let t of De(e))
|
|
1148
|
+
!Ko.call(a, t) && t !== o && Fe(a, t, { get: () => e[t], enumerable: !(i = Go(e, t)) || i.enumerable });
|
|
1119
1149
|
return a;
|
|
1120
|
-
},
|
|
1150
|
+
}, Zo = (a, e, o) => (o = a != null ? Jo(Yo(a)) : {}, Xo(
|
|
1121
1151
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
1122
1152
|
// file that has been converted to a CommonJS file using a Babel-
|
|
1123
1153
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1124
1154
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1125
|
-
|
|
1155
|
+
Fe(o, "default", { value: a, enumerable: !0 }),
|
|
1126
1156
|
a
|
|
1127
|
-
)),
|
|
1157
|
+
)), Qo = Te({
|
|
1128
1158
|
"node_modules/statuses/codes.json"(a, e) {
|
|
1129
1159
|
e.exports = {
|
|
1130
1160
|
100: "Continue",
|
|
@@ -1192,9 +1222,9 @@ var Wo = Object.create, _e = Object.defineProperty, Jo = Object.getOwnPropertyDe
|
|
|
1192
1222
|
511: "Network Authentication Required"
|
|
1193
1223
|
};
|
|
1194
1224
|
}
|
|
1195
|
-
}),
|
|
1225
|
+
}), ai = Te({
|
|
1196
1226
|
"node_modules/statuses/index.js"(a, e) {
|
|
1197
|
-
var o =
|
|
1227
|
+
var o = Qo();
|
|
1198
1228
|
e.exports = r, r.message = o, r.code = i(o), r.codes = t(o), r.redirect = {
|
|
1199
1229
|
300: !0,
|
|
1200
1230
|
301: !0,
|
|
@@ -1244,7 +1274,7 @@ var Wo = Object.create, _e = Object.defineProperty, Jo = Object.getOwnPropertyDe
|
|
|
1244
1274
|
return isNaN(z) ? s(p) : u(z);
|
|
1245
1275
|
}
|
|
1246
1276
|
}
|
|
1247
|
-
}),
|
|
1277
|
+
}), ei = Zo(ai()), Re = ei.default;
|
|
1248
1278
|
/*! Bundled license information:
|
|
1249
1279
|
|
|
1250
1280
|
statuses/index.js:
|
|
@@ -1255,9 +1285,9 @@ statuses/index.js:
|
|
|
1255
1285
|
* MIT Licensed
|
|
1256
1286
|
*)
|
|
1257
1287
|
*/
|
|
1258
|
-
const { message:
|
|
1259
|
-
async function
|
|
1260
|
-
const e = a.clone(), o = await e.text(), i = e.status || 200, t = e.statusText ||
|
|
1288
|
+
const { message: oi } = Re;
|
|
1289
|
+
async function ii(a) {
|
|
1290
|
+
const e = a.clone(), o = await e.text(), i = e.status || 200, t = e.statusText || oi[i] || "OK";
|
|
1261
1291
|
return {
|
|
1262
1292
|
status: i,
|
|
1263
1293
|
statusText: t,
|
|
@@ -1265,7 +1295,7 @@ async function oi(a) {
|
|
|
1265
1295
|
body: o
|
|
1266
1296
|
};
|
|
1267
1297
|
}
|
|
1268
|
-
function
|
|
1298
|
+
function ti(a) {
|
|
1269
1299
|
for (var e = [], o = 0; o < a.length; ) {
|
|
1270
1300
|
var i = a[o];
|
|
1271
1301
|
if (i === "*" || i === "+" || i === "?") {
|
|
@@ -1333,9 +1363,9 @@ function ii(a) {
|
|
|
1333
1363
|
}
|
|
1334
1364
|
return e.push({ type: "END", index: o, value: "" }), e;
|
|
1335
1365
|
}
|
|
1336
|
-
function
|
|
1366
|
+
function ni(a, e) {
|
|
1337
1367
|
e === void 0 && (e = {});
|
|
1338
|
-
for (var o =
|
|
1368
|
+
for (var o = ti(a), i = e.prefixes, t = i === void 0 ? "./" : i, s = e.delimiter, u = s === void 0 ? "/#?" : s, r = [], p = 0, z = 0, k = "", c = function(O) {
|
|
1339
1369
|
if (z < o.length && o[z].type === O)
|
|
1340
1370
|
return o[z++].value;
|
|
1341
1371
|
}, b = function(O) {
|
|
@@ -1395,11 +1425,11 @@ function ti(a, e) {
|
|
|
1395
1425
|
}
|
|
1396
1426
|
return r;
|
|
1397
1427
|
}
|
|
1398
|
-
function
|
|
1399
|
-
var o = [], i =
|
|
1400
|
-
return
|
|
1428
|
+
function si(a, e) {
|
|
1429
|
+
var o = [], i = Pe(a, o, e);
|
|
1430
|
+
return ri(i, o, e);
|
|
1401
1431
|
}
|
|
1402
|
-
function
|
|
1432
|
+
function ri(a, e, o) {
|
|
1403
1433
|
o === void 0 && (o = {});
|
|
1404
1434
|
var i = o.decode, t = i === void 0 ? function(s) {
|
|
1405
1435
|
return s;
|
|
@@ -1423,10 +1453,10 @@ function si(a, e, o) {
|
|
|
1423
1453
|
function ga(a) {
|
|
1424
1454
|
return a.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
|
|
1425
1455
|
}
|
|
1426
|
-
function
|
|
1456
|
+
function Ie(a) {
|
|
1427
1457
|
return a && a.sensitive ? "" : "i";
|
|
1428
1458
|
}
|
|
1429
|
-
function
|
|
1459
|
+
function ui(a, e) {
|
|
1430
1460
|
if (!e)
|
|
1431
1461
|
return a;
|
|
1432
1462
|
for (var o = /\((?:\?<(.*?)>)?(?!\?)/g, i = 0, t = o.exec(a.source); t; )
|
|
@@ -1440,16 +1470,16 @@ function ri(a, e) {
|
|
|
1440
1470
|
}), t = o.exec(a.source);
|
|
1441
1471
|
return a;
|
|
1442
1472
|
}
|
|
1443
|
-
function
|
|
1473
|
+
function mi(a, e, o) {
|
|
1444
1474
|
var i = a.map(function(t) {
|
|
1445
|
-
return
|
|
1475
|
+
return Pe(t, e, o).source;
|
|
1446
1476
|
});
|
|
1447
|
-
return new RegExp("(?:".concat(i.join("|"), ")"),
|
|
1448
|
-
}
|
|
1449
|
-
function mi(a, e, o) {
|
|
1450
|
-
return ci(ti(a, o), e, o);
|
|
1477
|
+
return new RegExp("(?:".concat(i.join("|"), ")"), Ie(o));
|
|
1451
1478
|
}
|
|
1452
1479
|
function ci(a, e, o) {
|
|
1480
|
+
return li(ni(a, o), e, o);
|
|
1481
|
+
}
|
|
1482
|
+
function li(a, e, o) {
|
|
1453
1483
|
o === void 0 && (o = {});
|
|
1454
1484
|
for (var i = o.strict, t = i === void 0 ? !1 : i, s = o.start, u = s === void 0 ? !0 : s, r = o.end, p = r === void 0 ? !0 : r, z = o.encode, k = z === void 0 ? function(R) {
|
|
1455
1485
|
return R;
|
|
@@ -1481,25 +1511,24 @@ function ci(a, e, o) {
|
|
|
1481
1511
|
var T = a[a.length - 1], O = typeof T == "string" ? C.indexOf(T[T.length - 1]) > -1 : T === void 0;
|
|
1482
1512
|
t || (_ += "(?:".concat(C, "(?=").concat(E, "))?")), O || (_ += "(?=".concat(C, "|").concat(E, ")"));
|
|
1483
1513
|
}
|
|
1484
|
-
return new RegExp(_,
|
|
1514
|
+
return new RegExp(_, Ie(o));
|
|
1485
1515
|
}
|
|
1486
|
-
function
|
|
1487
|
-
return a instanceof RegExp ?
|
|
1516
|
+
function Pe(a, e, o) {
|
|
1517
|
+
return a instanceof RegExp ? ui(a, e) : Array.isArray(a) ? mi(a, e, o) : ci(a, e, o);
|
|
1488
1518
|
}
|
|
1489
|
-
|
|
1490
|
-
var ya = class extends Response {
|
|
1519
|
+
var wa = class extends Response {
|
|
1491
1520
|
static isConfigurableStatusCode(a) {
|
|
1492
1521
|
return a >= 200 && a <= 599;
|
|
1493
1522
|
}
|
|
1494
1523
|
static isRedirectResponse(a) {
|
|
1495
|
-
return
|
|
1524
|
+
return wa.STATUS_CODES_WITH_REDIRECT.includes(a);
|
|
1496
1525
|
}
|
|
1497
1526
|
/**
|
|
1498
1527
|
* Returns a boolean indicating whether the given response status
|
|
1499
1528
|
* code represents a response that can have a body.
|
|
1500
1529
|
*/
|
|
1501
1530
|
static isResponseWithBody(a) {
|
|
1502
|
-
return !
|
|
1531
|
+
return !wa.STATUS_CODES_WITHOUT_BODY.includes(a);
|
|
1503
1532
|
}
|
|
1504
1533
|
static setUrl(a, e) {
|
|
1505
1534
|
a && e.url == "" && Object.defineProperty(e, "url", {
|
|
@@ -1520,7 +1549,7 @@ var ya = class extends Response {
|
|
|
1520
1549
|
}
|
|
1521
1550
|
constructor(a, e = {}) {
|
|
1522
1551
|
var o;
|
|
1523
|
-
const i = (o = e.status) != null ? o : 200, t =
|
|
1552
|
+
const i = (o = e.status) != null ? o : 200, t = wa.isConfigurableStatusCode(i) ? i : 200, s = wa.isResponseWithBody(i) ? a : null;
|
|
1524
1553
|
if (super(s, {
|
|
1525
1554
|
...e,
|
|
1526
1555
|
status: t
|
|
@@ -1539,12 +1568,12 @@ var ya = class extends Response {
|
|
|
1539
1568
|
writable: !1
|
|
1540
1569
|
});
|
|
1541
1570
|
}
|
|
1542
|
-
|
|
1571
|
+
wa.setUrl(e.url, this);
|
|
1543
1572
|
}
|
|
1544
|
-
},
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
function
|
|
1573
|
+
}, re = wa;
|
|
1574
|
+
re.STATUS_CODES_WITHOUT_BODY = [101, 103, 204, 205, 304];
|
|
1575
|
+
re.STATUS_CODES_WITH_REDIRECT = [301, 302, 303, 307, 308];
|
|
1576
|
+
function pi() {
|
|
1548
1577
|
if (typeof navigator < "u" && navigator.product === "ReactNative")
|
|
1549
1578
|
return !0;
|
|
1550
1579
|
if (typeof process < "u") {
|
|
@@ -1553,48 +1582,21 @@ function Re() {
|
|
|
1553
1582
|
}
|
|
1554
1583
|
return !1;
|
|
1555
1584
|
}
|
|
1556
|
-
|
|
1557
|
-
for (var o in e)
|
|
1558
|
-
li(a, o, { get: e[o], enumerable: !0 });
|
|
1559
|
-
}, di = {};
|
|
1560
|
-
pi(di, {
|
|
1561
|
-
blue: () => gi,
|
|
1562
|
-
gray: () => ki,
|
|
1563
|
-
green: () => ji,
|
|
1564
|
-
red: () => fi,
|
|
1565
|
-
yellow: () => hi
|
|
1566
|
-
});
|
|
1567
|
-
function hi(a) {
|
|
1568
|
-
return `\x1B[33m${a}\x1B[0m`;
|
|
1569
|
-
}
|
|
1570
|
-
function gi(a) {
|
|
1571
|
-
return `\x1B[34m${a}\x1B[0m`;
|
|
1572
|
-
}
|
|
1573
|
-
function ki(a) {
|
|
1574
|
-
return `\x1B[90m${a}\x1B[0m`;
|
|
1575
|
-
}
|
|
1576
|
-
function fi(a) {
|
|
1577
|
-
return `\x1B[31m${a}\x1B[0m`;
|
|
1578
|
-
}
|
|
1579
|
-
function ji(a) {
|
|
1580
|
-
return `\x1B[32m${a}\x1B[0m`;
|
|
1581
|
-
}
|
|
1582
|
-
Re();
|
|
1583
|
-
function bi(a, e = !0) {
|
|
1585
|
+
function di(a, e = !0) {
|
|
1584
1586
|
return [e && a.origin, a.pathname].filter(Boolean).join("");
|
|
1585
1587
|
}
|
|
1586
|
-
const
|
|
1587
|
-
function
|
|
1588
|
+
const hi = /[\?|#].*$/g;
|
|
1589
|
+
function gi(a) {
|
|
1588
1590
|
return new URL(`/${a}`, "http://localhost").searchParams;
|
|
1589
1591
|
}
|
|
1590
|
-
function
|
|
1591
|
-
return a.endsWith("?") ? a : a.replace(
|
|
1592
|
+
function qe(a) {
|
|
1593
|
+
return a.endsWith("?") ? a : a.replace(hi, "");
|
|
1592
1594
|
}
|
|
1593
|
-
function
|
|
1595
|
+
function ki(a) {
|
|
1594
1596
|
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(a);
|
|
1595
1597
|
}
|
|
1596
|
-
function
|
|
1597
|
-
if (
|
|
1598
|
+
function fi(a, e) {
|
|
1599
|
+
if (ki(a) || a.startsWith("*"))
|
|
1598
1600
|
return a;
|
|
1599
1601
|
const o = e || typeof document < "u" && document.baseURI;
|
|
1600
1602
|
return o ? (
|
|
@@ -1602,13 +1604,13 @@ function xi(a, e) {
|
|
|
1602
1604
|
decodeURI(new URL(encodeURI(a), o).href)
|
|
1603
1605
|
) : a;
|
|
1604
1606
|
}
|
|
1605
|
-
function
|
|
1607
|
+
function ji(a, e) {
|
|
1606
1608
|
if (a instanceof RegExp)
|
|
1607
1609
|
return a;
|
|
1608
|
-
const o =
|
|
1609
|
-
return
|
|
1610
|
+
const o = fi(a, e);
|
|
1611
|
+
return qe(o);
|
|
1610
1612
|
}
|
|
1611
|
-
function
|
|
1613
|
+
function bi(a) {
|
|
1612
1614
|
return a.replace(
|
|
1613
1615
|
/([:a-zA-Z_-]*)(\*{1,2})+/g,
|
|
1614
1616
|
(e, o, i) => {
|
|
@@ -1617,34 +1619,34 @@ function Ei(a) {
|
|
|
1617
1619
|
}
|
|
1618
1620
|
).replace(/([^\/])(:)(?=\d+)/, "$1\\$2").replace(/^([^\/]+)(:)(?=\/\/)/, "$1\\$2");
|
|
1619
1621
|
}
|
|
1620
|
-
function
|
|
1621
|
-
const i =
|
|
1622
|
+
function yi(a, e, o) {
|
|
1623
|
+
const i = ji(e, o), t = typeof i == "string" ? bi(i) : i, s = di(a), u = si(t, { decode: decodeURIComponent })(s), r = u && u.params || {};
|
|
1622
1624
|
return {
|
|
1623
1625
|
matches: u !== !1,
|
|
1624
1626
|
params: r
|
|
1625
1627
|
};
|
|
1626
1628
|
}
|
|
1627
|
-
function
|
|
1629
|
+
function vi(a) {
|
|
1628
1630
|
if (typeof location > "u")
|
|
1629
1631
|
return a.toString();
|
|
1630
1632
|
const e = a instanceof URL ? a : new URL(a);
|
|
1631
1633
|
return e.origin === location.origin ? e.pathname : e.origin + e.pathname;
|
|
1632
1634
|
}
|
|
1633
|
-
var
|
|
1634
|
-
return e || (0, a[
|
|
1635
|
-
},
|
|
1635
|
+
var wi = Object.create, Ue = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, Le = Object.getOwnPropertyNames, zi = Object.getPrototypeOf, Ei = Object.prototype.hasOwnProperty, Ci = (a, e) => function() {
|
|
1636
|
+
return e || (0, a[Le(a)[0]])((e = { exports: {} }).exports, e), e.exports;
|
|
1637
|
+
}, Si = (a, e, o, i) => {
|
|
1636
1638
|
if (e && typeof e == "object" || typeof e == "function")
|
|
1637
|
-
for (let t of
|
|
1638
|
-
!
|
|
1639
|
+
for (let t of Le(e))
|
|
1640
|
+
!Ei.call(a, t) && t !== o && Ue(a, t, { get: () => e[t], enumerable: !(i = xi(e, t)) || i.enumerable });
|
|
1639
1641
|
return a;
|
|
1640
|
-
},
|
|
1642
|
+
}, _i = (a, e, o) => (o = a != null ? wi(zi(a)) : {}, Si(
|
|
1641
1643
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
1642
1644
|
// file that has been converted to a CommonJS file using a Babel-
|
|
1643
1645
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1644
1646
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1645
|
-
|
|
1647
|
+
Ue(o, "default", { value: a, enumerable: !0 }),
|
|
1646
1648
|
a
|
|
1647
|
-
)),
|
|
1649
|
+
)), Ai = Ci({
|
|
1648
1650
|
"node_modules/cookie/index.js"(a) {
|
|
1649
1651
|
a.parse = r, a.serialize = k;
|
|
1650
1652
|
var e = Object.prototype.toString, o = Object.prototype.hasOwnProperty, i = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/, t = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/, s = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, u = /^[\u0020-\u003A\u003D-\u007E]*$/;
|
|
@@ -1771,7 +1773,7 @@ var _i = Object.create, Pe = Object.defineProperty, Ai = Object.getOwnPropertyDe
|
|
|
1771
1773
|
}
|
|
1772
1774
|
}
|
|
1773
1775
|
}
|
|
1774
|
-
}),
|
|
1776
|
+
}), Oi = _i(Ai()), Be = Oi.default;
|
|
1775
1777
|
/*! Bundled license information:
|
|
1776
1778
|
|
|
1777
1779
|
cookie/index.js:
|
|
@@ -1782,29 +1784,29 @@ cookie/index.js:
|
|
|
1782
1784
|
* MIT Licensed
|
|
1783
1785
|
*)
|
|
1784
1786
|
*/
|
|
1785
|
-
function
|
|
1787
|
+
function ba(a) {
|
|
1786
1788
|
throw new Error('Could not dynamically require "' + a + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
1787
1789
|
}
|
|
1788
|
-
var
|
|
1789
|
-
get: (e, o) => (typeof
|
|
1790
|
+
var Fi = Object.create, Ne = Object.defineProperty, Di = Object.getOwnPropertyDescriptor, $e = Object.getOwnPropertyNames, Ti = Object.getPrototypeOf, Ri = Object.prototype.hasOwnProperty, Ii = /* @__PURE__ */ ((a) => typeof ba < "u" ? ba : typeof Proxy < "u" ? new Proxy(a, {
|
|
1791
|
+
get: (e, o) => (typeof ba < "u" ? ba : e)[o]
|
|
1790
1792
|
}) : a)(function(a) {
|
|
1791
|
-
if (typeof
|
|
1793
|
+
if (typeof ba < "u") return ba.apply(this, arguments);
|
|
1792
1794
|
throw Error('Dynamic require of "' + a + '" is not supported');
|
|
1793
1795
|
}), ia = (a, e) => function() {
|
|
1794
|
-
return e || (0, a[
|
|
1795
|
-
},
|
|
1796
|
+
return e || (0, a[$e(a)[0]])((e = { exports: {} }).exports, e), e.exports;
|
|
1797
|
+
}, Pi = (a, e, o, i) => {
|
|
1796
1798
|
if (e && typeof e == "object" || typeof e == "function")
|
|
1797
|
-
for (let t of
|
|
1798
|
-
!
|
|
1799
|
+
for (let t of $e(e))
|
|
1800
|
+
!Ri.call(a, t) && t !== o && Ne(a, t, { get: () => e[t], enumerable: !(i = Di(e, t)) || i.enumerable });
|
|
1799
1801
|
return a;
|
|
1800
|
-
},
|
|
1802
|
+
}, qi = (a, e, o) => (o = a != null ? Fi(Ti(a)) : {}, Pi(
|
|
1801
1803
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
1802
1804
|
// file that has been converted to a CommonJS file using a Babel-
|
|
1803
1805
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1804
1806
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1805
|
-
|
|
1807
|
+
Ne(o, "default", { value: a, enumerable: !0 }),
|
|
1806
1808
|
a
|
|
1807
|
-
)),
|
|
1809
|
+
)), Me = ia({
|
|
1808
1810
|
"node_modules/punycode/punycode.js"(a, e) {
|
|
1809
1811
|
var o = 2147483647, i = 36, t = 1, s = 26, u = 38, r = 700, p = 72, z = 128, k = "-", c = /^xn--/, b = /[^\0-\x7F]/, l = /[\x2E\u3002\uFF0E\uFF61]/g, d = {
|
|
1810
1812
|
overflow: "Overflow: input needs wider integers to process",
|
|
@@ -1858,7 +1860,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
1858
1860
|
for (let D = 0; D < w; ++D)
|
|
1859
1861
|
f.charCodeAt(D) >= 128 && P("not-basic"), q.push(f.charCodeAt(D));
|
|
1860
1862
|
for (let D = w > 0 ? w + 1 : 0; D < Y; ) {
|
|
1861
|
-
const
|
|
1863
|
+
const U = $;
|
|
1862
1864
|
for (let aa = 1, ea = i; ; ea += i) {
|
|
1863
1865
|
D >= Y && P("invalid-input");
|
|
1864
1866
|
const N = v(f.charCodeAt(D++));
|
|
@@ -1870,7 +1872,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
1870
1872
|
aa > C(o / ra) && P("overflow"), aa *= ra;
|
|
1871
1873
|
}
|
|
1872
1874
|
const M = q.length + 1;
|
|
1873
|
-
Z = O($ -
|
|
1875
|
+
Z = O($ - U, M, U == 0), C($ / M) > o - G && P("overflow"), G += C($ / M), $ %= M, q.splice($++, 0, G);
|
|
1874
1876
|
}
|
|
1875
1877
|
return String.fromCodePoint(...q);
|
|
1876
1878
|
}, I = function(f) {
|
|
@@ -1878,16 +1880,16 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
1878
1880
|
f = x(f);
|
|
1879
1881
|
const Y = f.length;
|
|
1880
1882
|
let $ = z, G = 0, Z = p;
|
|
1881
|
-
for (const
|
|
1882
|
-
|
|
1883
|
+
for (const U of f)
|
|
1884
|
+
U < 128 && q.push(_(U));
|
|
1883
1885
|
const w = q.length;
|
|
1884
1886
|
let D = w;
|
|
1885
1887
|
for (w && q.push(k); D < Y; ) {
|
|
1886
|
-
let
|
|
1888
|
+
let U = o;
|
|
1887
1889
|
for (const aa of f)
|
|
1888
|
-
aa >= $ && aa <
|
|
1890
|
+
aa >= $ && aa < U && (U = aa);
|
|
1889
1891
|
const M = D + 1;
|
|
1890
|
-
|
|
1892
|
+
U - $ > C((o - G) / M) && P("overflow"), G += (U - $) * M, $ = U;
|
|
1891
1893
|
for (const aa of f)
|
|
1892
1894
|
if (aa < $ && ++G > o && P("overflow"), aa === $) {
|
|
1893
1895
|
let ea = G;
|
|
@@ -1938,7 +1940,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
1938
1940
|
};
|
|
1939
1941
|
e.exports = na;
|
|
1940
1942
|
}
|
|
1941
|
-
}),
|
|
1943
|
+
}), Ui = ia({
|
|
1942
1944
|
"node_modules/requires-port/index.js"(a, e) {
|
|
1943
1945
|
e.exports = function(i, t) {
|
|
1944
1946
|
if (t = t.split(":")[0], i = +i, !i) return !1;
|
|
@@ -1959,7 +1961,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
1959
1961
|
return i !== 0;
|
|
1960
1962
|
};
|
|
1961
1963
|
}
|
|
1962
|
-
}),
|
|
1964
|
+
}), Li = ia({
|
|
1963
1965
|
"node_modules/querystringify/index.js"(a) {
|
|
1964
1966
|
var e = Object.prototype.hasOwnProperty, o;
|
|
1965
1967
|
function i(r) {
|
|
@@ -1996,9 +1998,9 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
1996
1998
|
}
|
|
1997
1999
|
a.stringify = u, a.parse = s;
|
|
1998
2000
|
}
|
|
1999
|
-
}),
|
|
2001
|
+
}), Bi = ia({
|
|
2000
2002
|
"node_modules/url-parse/index.js"(a, e) {
|
|
2001
|
-
var o =
|
|
2003
|
+
var o = Ui(), i = Li(), t = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/, s = /[\n\r\t]/g, u = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//, r = /:\d+$/, p = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i, z = /^[a-zA-Z]:/;
|
|
2002
2004
|
function k(h) {
|
|
2003
2005
|
return (h || "").toString().replace(t, "");
|
|
2004
2006
|
}
|
|
@@ -2120,7 +2122,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
2120
2122
|
}
|
|
2121
2123
|
_.prototype = { set: P, toString: A }, _.extractProtocol = E, _.location = l, _.trimLeft = k, _.qs = i, e.exports = _;
|
|
2122
2124
|
}
|
|
2123
|
-
}),
|
|
2125
|
+
}), Ni = ia({
|
|
2124
2126
|
"node_modules/psl/data/rules.json"(a, e) {
|
|
2125
2127
|
e.exports = [
|
|
2126
2128
|
"ac",
|
|
@@ -11499,10 +11501,10 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
11499
11501
|
"enterprisecloud.nu"
|
|
11500
11502
|
];
|
|
11501
11503
|
}
|
|
11502
|
-
}),
|
|
11504
|
+
}), $i = ia({
|
|
11503
11505
|
"node_modules/psl/index.js"(a) {
|
|
11504
|
-
var e =
|
|
11505
|
-
o.rules =
|
|
11506
|
+
var e = Me(), o = {};
|
|
11507
|
+
o.rules = Ni().map(function(i) {
|
|
11506
11508
|
return {
|
|
11507
11509
|
rule: i,
|
|
11508
11510
|
suffix: i.replace(/^(\*\.|\!)/, ""),
|
|
@@ -11582,9 +11584,9 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
11582
11584
|
return !!(t.domain && t.listed);
|
|
11583
11585
|
};
|
|
11584
11586
|
}
|
|
11585
|
-
}),
|
|
11587
|
+
}), He = ia({
|
|
11586
11588
|
"node_modules/tough-cookie/lib/pubsuffix-psl.js"(a) {
|
|
11587
|
-
var e =
|
|
11589
|
+
var e = $i(), o = [
|
|
11588
11590
|
"local",
|
|
11589
11591
|
"example",
|
|
11590
11592
|
"invalid",
|
|
@@ -11607,7 +11609,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
11607
11609
|
}
|
|
11608
11610
|
a.getPublicSuffix = t;
|
|
11609
11611
|
}
|
|
11610
|
-
}),
|
|
11612
|
+
}), Ve = ia({
|
|
11611
11613
|
"node_modules/tough-cookie/lib/store.js"(a) {
|
|
11612
11614
|
var e = class {
|
|
11613
11615
|
constructor() {
|
|
@@ -11642,7 +11644,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
11642
11644
|
};
|
|
11643
11645
|
a.Store = e;
|
|
11644
11646
|
}
|
|
11645
|
-
}),
|
|
11647
|
+
}), We = ia({
|
|
11646
11648
|
"node_modules/universalify/index.js"(a) {
|
|
11647
11649
|
a.fromCallback = function(e) {
|
|
11648
11650
|
return Object.defineProperty(function() {
|
|
@@ -11663,9 +11665,9 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
11663
11665
|
}, "name", { value: e.name });
|
|
11664
11666
|
};
|
|
11665
11667
|
}
|
|
11666
|
-
}),
|
|
11668
|
+
}), Je = ia({
|
|
11667
11669
|
"node_modules/tough-cookie/lib/permuteDomain.js"(a) {
|
|
11668
|
-
var e =
|
|
11670
|
+
var e = He();
|
|
11669
11671
|
function o(i, t) {
|
|
11670
11672
|
const s = e.getPublicSuffix(i, {
|
|
11671
11673
|
allowSpecialUseDomain: t
|
|
@@ -11684,18 +11686,18 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
11684
11686
|
}
|
|
11685
11687
|
a.permuteDomain = o;
|
|
11686
11688
|
}
|
|
11687
|
-
}),
|
|
11689
|
+
}), Ge = ia({
|
|
11688
11690
|
"node_modules/tough-cookie/lib/pathMatch.js"(a) {
|
|
11689
11691
|
function e(o, i) {
|
|
11690
11692
|
return i === o || o.indexOf(i) === 0 && (i.substr(-1) === "/" || o.substr(i.length, 1) === "/");
|
|
11691
11693
|
}
|
|
11692
11694
|
a.pathMatch = e;
|
|
11693
11695
|
}
|
|
11694
|
-
}),
|
|
11696
|
+
}), Ye = ia({
|
|
11695
11697
|
"node_modules/tough-cookie/lib/utilHelper.js"(a) {
|
|
11696
11698
|
function e() {
|
|
11697
11699
|
try {
|
|
11698
|
-
return
|
|
11700
|
+
return Ii("util");
|
|
11699
11701
|
} catch {
|
|
11700
11702
|
return null;
|
|
11701
11703
|
}
|
|
@@ -11716,9 +11718,9 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
11716
11718
|
return (s.lookupCustomInspectSymbol || o)() || i(s);
|
|
11717
11719
|
};
|
|
11718
11720
|
}
|
|
11719
|
-
}),
|
|
11721
|
+
}), Mi = ia({
|
|
11720
11722
|
"node_modules/tough-cookie/lib/memstore.js"(a) {
|
|
11721
|
-
var { fromCallback: e } =
|
|
11723
|
+
var { fromCallback: e } = We(), o = Ve().Store, i = Je().permuteDomain, t = Ge().pathMatch, { getCustomInspectSymbol: s, getUtilInspect: u } = Ye(), r = class extends o {
|
|
11722
11724
|
constructor() {
|
|
11723
11725
|
super(), this.synchronous = !0, this.idx = /* @__PURE__ */ Object.create(null);
|
|
11724
11726
|
const c = s();
|
|
@@ -11828,7 +11830,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
11828
11830
|
}
|
|
11829
11831
|
a.inspectFallback = p;
|
|
11830
11832
|
}
|
|
11831
|
-
}),
|
|
11833
|
+
}), Hi = ia({
|
|
11832
11834
|
"node_modules/tough-cookie/lib/validators.js"(a) {
|
|
11833
11835
|
var e = Object.prototype.toString;
|
|
11834
11836
|
function o(l) {
|
|
@@ -11876,13 +11878,13 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
11876
11878
|
};
|
|
11877
11879
|
a.ParameterError = b, a.isFunction = o, a.isNonEmptyString = i, a.isDate = t, a.isEmptyString = s, a.isString = u, a.isObject = r, a.isUrlStringOrObject = z, a.validate = c;
|
|
11878
11880
|
}
|
|
11879
|
-
}),
|
|
11881
|
+
}), Vi = ia({
|
|
11880
11882
|
"node_modules/tough-cookie/lib/version.js"(a, e) {
|
|
11881
11883
|
e.exports = "4.1.4";
|
|
11882
11884
|
}
|
|
11883
|
-
}),
|
|
11885
|
+
}), Wi = ia({
|
|
11884
11886
|
"node_modules/tough-cookie/lib/cookie.js"(a) {
|
|
11885
|
-
var e =
|
|
11887
|
+
var e = Me(), o = Bi(), i = He(), t = Ve().Store, s = Mi().MemoryCookieStore, u = Ge().pathMatch, r = Hi(), p = Vi(), { fromCallback: z } = We(), { getCustomInspectSymbol: k } = Ye(), c = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/, b = /[\x00-\x1F]/, l = [`
|
|
11886
11888
|
`, "\r", "\0"], d = /[\x20-\x3A\x3C-\x7E]+/, E = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/, C = {
|
|
11887
11889
|
jan: 0,
|
|
11888
11890
|
feb: 1,
|
|
@@ -11951,28 +11953,28 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
11951
11953
|
const n = g.split(E);
|
|
11952
11954
|
if (!n)
|
|
11953
11955
|
return;
|
|
11954
|
-
let m = null, S = null, j = null, F = null,
|
|
11956
|
+
let m = null, S = null, j = null, F = null, L = null, V = null;
|
|
11955
11957
|
for (let K = 0; K < n.length; K++) {
|
|
11956
11958
|
const X = n[K].trim();
|
|
11957
11959
|
if (!X.length)
|
|
11958
11960
|
continue;
|
|
11959
|
-
let
|
|
11960
|
-
if (j === null && (
|
|
11961
|
-
m =
|
|
11961
|
+
let B;
|
|
11962
|
+
if (j === null && (B = R(X), B)) {
|
|
11963
|
+
m = B[0], S = B[1], j = B[2];
|
|
11962
11964
|
continue;
|
|
11963
11965
|
}
|
|
11964
|
-
if (F === null && (
|
|
11965
|
-
F =
|
|
11966
|
+
if (F === null && (B = O(X, 1, 2, !0), B !== null)) {
|
|
11967
|
+
F = B;
|
|
11966
11968
|
continue;
|
|
11967
11969
|
}
|
|
11968
|
-
if (
|
|
11969
|
-
|
|
11970
|
+
if (L === null && (B = I(X), B !== null)) {
|
|
11971
|
+
L = B;
|
|
11970
11972
|
continue;
|
|
11971
11973
|
}
|
|
11972
|
-
V === null && (
|
|
11974
|
+
V === null && (B = O(X, 2, 4, !0), B !== null && (V = B, V >= 70 && V <= 99 ? V += 1900 : V >= 0 && V <= 69 && (V += 2e3)));
|
|
11973
11975
|
}
|
|
11974
|
-
if (!(F === null ||
|
|
11975
|
-
return new Date(Date.UTC(V,
|
|
11976
|
+
if (!(F === null || L === null || V === null || j === null || F < 1 || F > 31 || V < 1601 || m > 23 || S > 59 || j > 59))
|
|
11977
|
+
return new Date(Date.UTC(V, L, F, m, S, j));
|
|
11976
11978
|
}
|
|
11977
11979
|
function ta(g) {
|
|
11978
11980
|
return r.validate(r.isDate(g), g), g.toUTCString();
|
|
@@ -12029,34 +12031,34 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12029
12031
|
const F = g.slice(m + 1).trim();
|
|
12030
12032
|
if (F.length === 0)
|
|
12031
12033
|
return j;
|
|
12032
|
-
const
|
|
12033
|
-
for (;
|
|
12034
|
-
const V =
|
|
12034
|
+
const L = F.split(";");
|
|
12035
|
+
for (; L.length; ) {
|
|
12036
|
+
const V = L.shift().trim();
|
|
12035
12037
|
if (V.length === 0)
|
|
12036
12038
|
continue;
|
|
12037
12039
|
const K = V.indexOf("=");
|
|
12038
|
-
let X,
|
|
12039
|
-
switch (K === -1 ? (X = V,
|
|
12040
|
+
let X, B;
|
|
12041
|
+
switch (K === -1 ? (X = V, B = null) : (X = V.substr(0, K), B = V.substr(K + 1)), X = X.trim().toLowerCase(), B && (B = B.trim()), X) {
|
|
12040
12042
|
case "expires":
|
|
12041
|
-
if (
|
|
12042
|
-
const ca = J(
|
|
12043
|
+
if (B) {
|
|
12044
|
+
const ca = J(B);
|
|
12043
12045
|
ca && (j.expires = ca);
|
|
12044
12046
|
}
|
|
12045
12047
|
break;
|
|
12046
12048
|
case "max-age":
|
|
12047
|
-
if (
|
|
12048
|
-
const ca = parseInt(
|
|
12049
|
+
if (B && /^-?[0-9]+$/.test(B)) {
|
|
12050
|
+
const ca = parseInt(B, 10);
|
|
12049
12051
|
j.setMaxAge(ca);
|
|
12050
12052
|
}
|
|
12051
12053
|
break;
|
|
12052
12054
|
case "domain":
|
|
12053
|
-
if (
|
|
12054
|
-
const ca =
|
|
12055
|
+
if (B) {
|
|
12056
|
+
const ca = B.trim().replace(/^\./, "");
|
|
12055
12057
|
ca && (j.domain = ca.toLowerCase());
|
|
12056
12058
|
}
|
|
12057
12059
|
break;
|
|
12058
12060
|
case "path":
|
|
12059
|
-
j.path =
|
|
12061
|
+
j.path = B && B[0] === "/" ? B : null;
|
|
12060
12062
|
break;
|
|
12061
12063
|
case "secure":
|
|
12062
12064
|
j.secure = !0;
|
|
@@ -12065,7 +12067,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12065
12067
|
j.httpOnly = !0;
|
|
12066
12068
|
break;
|
|
12067
12069
|
case "samesite":
|
|
12068
|
-
switch (
|
|
12070
|
+
switch (B ? B.toLowerCase() : "") {
|
|
12069
12071
|
case "strict":
|
|
12070
12072
|
j.sameSite = "strict";
|
|
12071
12073
|
break;
|
|
@@ -12102,7 +12104,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12102
12104
|
}
|
|
12103
12105
|
return n;
|
|
12104
12106
|
}
|
|
12105
|
-
function
|
|
12107
|
+
function U(g) {
|
|
12106
12108
|
if (!g || r.isEmptyString(g))
|
|
12107
12109
|
return null;
|
|
12108
12110
|
let n;
|
|
@@ -12124,8 +12126,8 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12124
12126
|
const S = g.path ? g.path.length : 0;
|
|
12125
12127
|
if (m = (n.path ? n.path.length : 0) - S, m !== 0)
|
|
12126
12128
|
return m;
|
|
12127
|
-
const F = g.creation ? g.creation.getTime() : _,
|
|
12128
|
-
return m = F -
|
|
12129
|
+
const F = g.creation ? g.creation.getTime() : _, L = n.creation ? n.creation.getTime() : _;
|
|
12130
|
+
return m = F - L, m !== 0 || (m = g.creationIndex - n.creationIndex), m;
|
|
12129
12131
|
}
|
|
12130
12132
|
function aa(g) {
|
|
12131
12133
|
if (r.validate(r.isString(g)), g === "/")
|
|
@@ -12165,7 +12167,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12165
12167
|
creation: null,
|
|
12166
12168
|
lastAccessed: null,
|
|
12167
12169
|
sameSite: void 0
|
|
12168
|
-
}, H = class
|
|
12170
|
+
}, H = class Ua {
|
|
12169
12171
|
constructor(n = {}) {
|
|
12170
12172
|
const m = k();
|
|
12171
12173
|
m && (this[m] = this.inspect), Object.assign(this, N, n), this.creation = this.creation || /* @__PURE__ */ new Date(), Object.defineProperty(this, "creationIndex", {
|
|
@@ -12173,7 +12175,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12173
12175
|
enumerable: !1,
|
|
12174
12176
|
// important for assert.deepEqual checks
|
|
12175
12177
|
writable: !0,
|
|
12176
|
-
value: ++
|
|
12178
|
+
value: ++Ua.cookiesCreated
|
|
12177
12179
|
});
|
|
12178
12180
|
}
|
|
12179
12181
|
inspect() {
|
|
@@ -12182,12 +12184,12 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12182
12184
|
}
|
|
12183
12185
|
toJSON() {
|
|
12184
12186
|
const n = {};
|
|
12185
|
-
for (const m of
|
|
12187
|
+
for (const m of Ua.serializableProperties)
|
|
12186
12188
|
this[m] !== N[m] && (m === "expires" || m === "creation" || m === "lastAccessed" ? this[m] === null ? n[m] = null : n[m] = this[m] == "Infinity" ? "Infinity" : this[m].toISOString() : m === "maxAge" ? this[m] !== null && (n[m] = this[m] == 1 / 0 || this[m] == -1 / 0 ? this[m].toString() : this[m]) : this[m] !== N[m] && (n[m] = this[m]));
|
|
12187
12189
|
return n;
|
|
12188
12190
|
}
|
|
12189
12191
|
clone() {
|
|
12190
|
-
return
|
|
12192
|
+
return U(this.toJSON());
|
|
12191
12193
|
}
|
|
12192
12194
|
validate() {
|
|
12193
12195
|
if (!c.test(this.value) || this.expires != 1 / 0 && !(this.expires instanceof Date) && !J(this.expires) || this.maxAge != null && this.maxAge <= 0 || this.path != null && !d.test(this.path))
|
|
@@ -12209,7 +12211,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12209
12211
|
toString() {
|
|
12210
12212
|
let n = this.cookieString();
|
|
12211
12213
|
if (this.expires != 1 / 0 && (this.expires instanceof Date ? n += `; Expires=${ta(this.expires)}` : n += `; Expires=${this.expires}`), this.maxAge != null && this.maxAge != 1 / 0 && (n += `; Max-Age=${this.maxAge}`), this.domain && !this.hostOnly && (n += `; Domain=${this.domain}`), this.path && (n += `; Path=${this.path}`), this.secure && (n += "; Secure"), this.httpOnly && (n += "; HttpOnly"), this.sameSite && this.sameSite !== "none") {
|
|
12212
|
-
const m =
|
|
12214
|
+
const m = Ua.sameSiteCanonical[this.sameSite.toLowerCase()];
|
|
12213
12215
|
n += `; SameSite=${m || this.sameSite}`;
|
|
12214
12216
|
}
|
|
12215
12217
|
return this.extensions && this.extensions.forEach((m) => {
|
|
@@ -12253,7 +12255,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12253
12255
|
return this.canonicalizedDomain();
|
|
12254
12256
|
}
|
|
12255
12257
|
};
|
|
12256
|
-
H.cookiesCreated = 0, H.parse = G, H.fromJSON =
|
|
12258
|
+
H.cookiesCreated = 0, H.parse = G, H.fromJSON = U, H.serializableProperties = Object.keys(N), H.sameSiteLevel = {
|
|
12257
12259
|
strict: 3,
|
|
12258
12260
|
lax: 2,
|
|
12259
12261
|
none: 1
|
|
@@ -12282,10 +12284,10 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12282
12284
|
let F;
|
|
12283
12285
|
if (r.isFunction(m))
|
|
12284
12286
|
return j = m, j(new Error("No URL was specified"));
|
|
12285
|
-
const
|
|
12287
|
+
const L = ea(m);
|
|
12286
12288
|
if (r.isFunction(S) && (j = S, S = {}), r.validate(r.isFunction(j), j), !r.isNonEmptyString(n) && !r.isObject(n) && n instanceof String && n.length == 0)
|
|
12287
12289
|
return j(null);
|
|
12288
|
-
const V = na(
|
|
12290
|
+
const V = na(L.hostname), K = S.loose || this.enableLooseMode;
|
|
12289
12291
|
let X = null;
|
|
12290
12292
|
if (S.sameSiteContext && (X = h(S.sameSiteContext), !X))
|
|
12291
12293
|
return j(new Error(A));
|
|
@@ -12296,7 +12298,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12296
12298
|
return F = new Error(
|
|
12297
12299
|
"First argument to setCookie must be a Cookie object or string"
|
|
12298
12300
|
), j(S.ignoreError ? null : F);
|
|
12299
|
-
const
|
|
12301
|
+
const B = S.now || /* @__PURE__ */ new Date();
|
|
12300
12302
|
if (this.rejectPublicSuffixes && n.domain && i.getPublicSuffix(n.cdomain(), {
|
|
12301
12303
|
allowSpecialUseDomain: this.allowSpecialUseDomain,
|
|
12302
12304
|
ignoreError: S.ignoreError
|
|
@@ -12310,47 +12312,47 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12310
12312
|
n.hostOnly == null && (n.hostOnly = !1);
|
|
12311
12313
|
} else
|
|
12312
12314
|
n.hostOnly = !0, n.domain = V;
|
|
12313
|
-
if ((!n.path || n.path[0] !== "/") && (n.path = q(
|
|
12315
|
+
if ((!n.path || n.path[0] !== "/") && (n.path = q(L.pathname), n.pathIsDefault = !0), S.http === !1 && n.httpOnly)
|
|
12314
12316
|
return F = new Error("Cookie is HttpOnly and this isn't an HTTP API"), j(S.ignoreError ? null : F);
|
|
12315
12317
|
if (n.sameSite !== "none" && n.sameSite !== void 0 && X && X === "none")
|
|
12316
12318
|
return F = new Error(
|
|
12317
12319
|
"Cookie is SameSite but this is a cross-origin request"
|
|
12318
12320
|
), j(S.ignoreError ? null : F);
|
|
12319
|
-
const
|
|
12321
|
+
const Da = this.prefixSecurity === x.SILENT;
|
|
12320
12322
|
if (!(this.prefixSecurity === x.DISABLED)) {
|
|
12321
12323
|
let W = !1, Q;
|
|
12322
12324
|
if (Z(n) ? w(n) || (W = !0, Q = "Cookie has __Host prefix but either Secure or HostOnly attribute is not set or Path is not '/'") : (W = !0, Q = "Cookie has __Secure prefix but Secure attribute is not set"), W)
|
|
12323
12325
|
return j(
|
|
12324
|
-
S.ignoreError ||
|
|
12326
|
+
S.ignoreError || Da ? null : new Error(Q)
|
|
12325
12327
|
);
|
|
12326
12328
|
}
|
|
12327
12329
|
const pa = this.store;
|
|
12328
|
-
pa.updateCookie || (pa.updateCookie = function(W, Q,
|
|
12329
|
-
this.putCookie(Q,
|
|
12330
|
+
pa.updateCookie || (pa.updateCookie = function(W, Q, ja) {
|
|
12331
|
+
this.putCookie(Q, ja);
|
|
12330
12332
|
});
|
|
12331
|
-
function
|
|
12333
|
+
function Na(W, Q) {
|
|
12332
12334
|
if (W)
|
|
12333
12335
|
return j(W);
|
|
12334
|
-
const
|
|
12335
|
-
if (
|
|
12336
|
-
return j(
|
|
12336
|
+
const ja = function(Ta) {
|
|
12337
|
+
if (Ta)
|
|
12338
|
+
return j(Ta);
|
|
12337
12339
|
j(null, n);
|
|
12338
12340
|
};
|
|
12339
12341
|
if (Q) {
|
|
12340
12342
|
if (S.http === !1 && Q.httpOnly)
|
|
12341
12343
|
return W = new Error("old Cookie is HttpOnly and this isn't an HTTP API"), j(S.ignoreError ? null : W);
|
|
12342
|
-
n.creation = Q.creation, n.creationIndex = Q.creationIndex, n.lastAccessed =
|
|
12344
|
+
n.creation = Q.creation, n.creationIndex = Q.creationIndex, n.lastAccessed = B, pa.updateCookie(Q, n, ja);
|
|
12343
12345
|
} else
|
|
12344
|
-
n.creation = n.lastAccessed =
|
|
12346
|
+
n.creation = n.lastAccessed = B, pa.putCookie(n, ja);
|
|
12345
12347
|
}
|
|
12346
|
-
pa.findCookie(n.domain, n.path, n.key,
|
|
12348
|
+
pa.findCookie(n.domain, n.path, n.key, Na);
|
|
12347
12349
|
}
|
|
12348
12350
|
// RFC6365 S5.4
|
|
12349
12351
|
getCookies(n, m, S) {
|
|
12350
12352
|
r.validate(r.isUrlStringOrObject(n), S, n);
|
|
12351
12353
|
const j = ea(n);
|
|
12352
12354
|
r.isFunction(m) && (S = m, m = {}), r.validate(r.isObject(m), S, m), r.validate(r.isFunction(S), S);
|
|
12353
|
-
const F = na(j.hostname),
|
|
12355
|
+
const F = na(j.hostname), L = j.pathname || "/";
|
|
12354
12356
|
let V = m.secure;
|
|
12355
12357
|
V == null && j.protocol && (j.protocol == "https:" || j.protocol == "wss:") && (V = !0);
|
|
12356
12358
|
let K = 0;
|
|
@@ -12361,27 +12363,27 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12361
12363
|
}
|
|
12362
12364
|
let X = m.http;
|
|
12363
12365
|
X == null && (X = !0);
|
|
12364
|
-
const
|
|
12365
|
-
function
|
|
12366
|
+
const B = m.now || Date.now(), Da = m.expire !== !1, ca = !!m.allPaths, pa = this.store;
|
|
12367
|
+
function Na(W) {
|
|
12366
12368
|
if (W.hostOnly) {
|
|
12367
12369
|
if (W.domain != F)
|
|
12368
12370
|
return !1;
|
|
12369
12371
|
} else if (!f(F, W.domain, !1))
|
|
12370
12372
|
return !1;
|
|
12371
|
-
return !ca && !u(
|
|
12373
|
+
return !ca && !u(L, W.path) || W.secure && !V || W.httpOnly && !X || K && H.sameSiteLevel[W.sameSite || "none"] > K ? !1 : Da && W.expiryTime() <= B ? (pa.removeCookie(W.domain, W.path, W.key, () => {
|
|
12372
12374
|
}), !1) : !0;
|
|
12373
12375
|
}
|
|
12374
12376
|
pa.findCookies(
|
|
12375
12377
|
F,
|
|
12376
|
-
ca ? null :
|
|
12378
|
+
ca ? null : L,
|
|
12377
12379
|
this.allowSpecialUseDomain,
|
|
12378
12380
|
(W, Q) => {
|
|
12379
12381
|
if (W)
|
|
12380
12382
|
return S(W);
|
|
12381
|
-
Q = Q.filter(
|
|
12382
|
-
const
|
|
12383
|
-
for (const
|
|
12384
|
-
|
|
12383
|
+
Q = Q.filter(Na), m.sort !== !1 && (Q = Q.sort(M));
|
|
12384
|
+
const ja = /* @__PURE__ */ new Date();
|
|
12385
|
+
for (const Ta of Q)
|
|
12386
|
+
Ta.lastAccessed = ja;
|
|
12385
12387
|
S(null, Q);
|
|
12386
12388
|
}
|
|
12387
12389
|
);
|
|
@@ -12392,7 +12394,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12392
12394
|
const S = function(j, F) {
|
|
12393
12395
|
j ? m(j) : m(
|
|
12394
12396
|
null,
|
|
12395
|
-
F.sort(M).map((
|
|
12397
|
+
F.sort(M).map((L) => L.cookieString()).join("; ")
|
|
12396
12398
|
);
|
|
12397
12399
|
};
|
|
12398
12400
|
n.push(S), this.getCookies.apply(this, n);
|
|
@@ -12403,7 +12405,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12403
12405
|
const S = function(j, F) {
|
|
12404
12406
|
j ? m(j) : m(
|
|
12405
12407
|
null,
|
|
12406
|
-
F.map((
|
|
12408
|
+
F.map((L) => L.toString())
|
|
12407
12409
|
);
|
|
12408
12410
|
};
|
|
12409
12411
|
n.push(S), this.getCookies.apply(this, n);
|
|
@@ -12433,7 +12435,7 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12433
12435
|
"store does not support getAllCookies and cannot be serialized"
|
|
12434
12436
|
)
|
|
12435
12437
|
);
|
|
12436
|
-
this.store.getAllCookies((j, F) => j ? n(j) : (S.cookies = F.map((
|
|
12438
|
+
this.store.getAllCookies((j, F) => j ? n(j) : (S.cookies = F.map((L) => (L = L instanceof H ? L.toJSON() : L, delete L.creationIndex, L)), n(null, S)));
|
|
12437
12439
|
}
|
|
12438
12440
|
toJSON() {
|
|
12439
12441
|
return this.serializeSync();
|
|
@@ -12449,15 +12451,15 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12449
12451
|
return m(F);
|
|
12450
12452
|
if (!S.length)
|
|
12451
12453
|
return m(F, this);
|
|
12452
|
-
let
|
|
12454
|
+
let L;
|
|
12453
12455
|
try {
|
|
12454
|
-
|
|
12456
|
+
L = U(S.shift());
|
|
12455
12457
|
} catch (V) {
|
|
12456
12458
|
return m(V);
|
|
12457
12459
|
}
|
|
12458
|
-
if (
|
|
12460
|
+
if (L === null)
|
|
12459
12461
|
return j(null);
|
|
12460
|
-
this.store.putCookie(
|
|
12462
|
+
this.store.putCookie(L, j);
|
|
12461
12463
|
};
|
|
12462
12464
|
j();
|
|
12463
12465
|
}
|
|
@@ -12488,10 +12490,10 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12488
12490
|
if (j.length === 0)
|
|
12489
12491
|
return n(null);
|
|
12490
12492
|
let F = 0;
|
|
12491
|
-
const
|
|
12493
|
+
const L = [];
|
|
12492
12494
|
function V(K) {
|
|
12493
|
-
if (K &&
|
|
12494
|
-
return n(
|
|
12495
|
+
if (K && L.push(K), F++, F === j.length)
|
|
12496
|
+
return n(L.length ? L[0] : null);
|
|
12495
12497
|
}
|
|
12496
12498
|
j.forEach((K) => {
|
|
12497
12499
|
m.removeCookie(
|
|
@@ -12517,9 +12519,9 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12517
12519
|
allowSpecialUseDomain: j.allowSpecialUseDomain,
|
|
12518
12520
|
prefixSecurity: j.prefixSecurity
|
|
12519
12521
|
});
|
|
12520
|
-
F._importCookies(j, (
|
|
12521
|
-
if (
|
|
12522
|
-
return S(
|
|
12522
|
+
F._importCookies(j, (L) => {
|
|
12523
|
+
if (L)
|
|
12524
|
+
return S(L);
|
|
12523
12525
|
S(null, F);
|
|
12524
12526
|
});
|
|
12525
12527
|
}
|
|
@@ -12561,9 +12563,9 @@ var qi = Object.create, Be = Object.defineProperty, Li = Object.getOwnPropertyDe
|
|
|
12561
12563
|
return S;
|
|
12562
12564
|
};
|
|
12563
12565
|
}
|
|
12564
|
-
a.version = p, a.CookieJar = ua, a.Cookie = H, a.Store = t, a.MemoryCookieStore = s, a.parseDate = J, a.formatDate = ta, a.parse = G, a.fromJSON =
|
|
12566
|
+
a.version = p, a.CookieJar = ua, a.Cookie = H, a.Store = t, a.MemoryCookieStore = s, a.parseDate = J, a.formatDate = ta, a.parse = G, a.fromJSON = U, a.domainMatch = f, a.defaultPath = q, a.pathMatch = u, a.getPublicSuffix = i.getPublicSuffix, a.cookieCompare = M, a.permuteDomain = Je().permuteDomain, a.permutePath = aa, a.canonicalDomain = na, a.PrefixSecurityEnum = x, a.ParameterError = r.ParameterError;
|
|
12565
12567
|
}
|
|
12566
|
-
}),
|
|
12568
|
+
}), Ji = qi(Wi()), Gi = Ji.default;
|
|
12567
12569
|
/*! Bundled license information:
|
|
12568
12570
|
|
|
12569
12571
|
tough-cookie/lib/pubsuffix-psl.js:
|
|
@@ -12758,13 +12760,13 @@ tough-cookie/lib/cookie.js:
|
|
|
12758
12760
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
12759
12761
|
*)
|
|
12760
12762
|
*/
|
|
12761
|
-
const { Cookie:
|
|
12762
|
-
class
|
|
12763
|
+
const { Cookie: Yi, CookieJar: Ki, Store: Xi, MemoryCookieStore: Zi, domainMatch: Qi, pathMatch: at } = Gi;
|
|
12764
|
+
class et extends Xi {
|
|
12763
12765
|
constructor() {
|
|
12764
12766
|
super();
|
|
12765
12767
|
ma(this, "storage");
|
|
12766
12768
|
ma(this, "storageKey");
|
|
12767
|
-
|
|
12769
|
+
ne(
|
|
12768
12770
|
typeof localStorage < "u",
|
|
12769
12771
|
"Failed to create a WebStorageCookieStore: `localStorage` is not available in this environment. This is likely an issue with MSW. Please report it on GitHub: https://github.com/mswjs/msw/issues"
|
|
12770
12772
|
), this.synchronous = !0, this.storage = localStorage, this.storageKey = "__msw-cookie-store__";
|
|
@@ -12844,7 +12846,7 @@ class rt extends it {
|
|
|
12844
12846
|
return [];
|
|
12845
12847
|
const i = JSON.parse(o), t = [];
|
|
12846
12848
|
for (const s of i) {
|
|
12847
|
-
const u =
|
|
12849
|
+
const u = Yi.fromJSON(s);
|
|
12848
12850
|
u != null && t.push(u);
|
|
12849
12851
|
}
|
|
12850
12852
|
return t;
|
|
@@ -12861,7 +12863,7 @@ class rt extends it {
|
|
|
12861
12863
|
filterCookiesFromList(o, i) {
|
|
12862
12864
|
const t = [];
|
|
12863
12865
|
for (const s of o)
|
|
12864
|
-
i.domain && !
|
|
12866
|
+
i.domain && !Qi(i.domain, s.domain || "") || i.path && !at(i.path, s.path || "") || i.key && s.key !== i.key || t.push(s);
|
|
12865
12867
|
return t;
|
|
12866
12868
|
}
|
|
12867
12869
|
deleteCookiesFromList(o, i) {
|
|
@@ -12869,38 +12871,38 @@ class rt extends it {
|
|
|
12869
12871
|
return o.filter((s) => !t.includes(s));
|
|
12870
12872
|
}
|
|
12871
12873
|
}
|
|
12872
|
-
const
|
|
12873
|
-
function
|
|
12874
|
-
const e =
|
|
12874
|
+
const ot = pi() ? new Zi() : new et(), it = new Ki(ot);
|
|
12875
|
+
function Ke(a) {
|
|
12876
|
+
const e = Be.parse(a), o = {};
|
|
12875
12877
|
for (const i in e)
|
|
12876
12878
|
typeof e[i] < "u" && (o[i] = e[i]);
|
|
12877
12879
|
return o;
|
|
12878
12880
|
}
|
|
12879
|
-
function
|
|
12880
|
-
return
|
|
12881
|
+
function ve() {
|
|
12882
|
+
return Ke(document.cookie);
|
|
12881
12883
|
}
|
|
12882
|
-
function
|
|
12884
|
+
function tt(a) {
|
|
12883
12885
|
if (typeof document > "u" || typeof location > "u")
|
|
12884
12886
|
return {};
|
|
12885
12887
|
switch (a.credentials) {
|
|
12886
12888
|
case "same-origin": {
|
|
12887
12889
|
const e = new URL(a.url);
|
|
12888
|
-
return location.origin === e.origin ?
|
|
12890
|
+
return location.origin === e.origin ? ve() : {};
|
|
12889
12891
|
}
|
|
12890
12892
|
case "include":
|
|
12891
|
-
return
|
|
12893
|
+
return ve();
|
|
12892
12894
|
default:
|
|
12893
12895
|
return {};
|
|
12894
12896
|
}
|
|
12895
12897
|
}
|
|
12896
|
-
function
|
|
12897
|
-
const e = a.headers.get("cookie"), o = e ?
|
|
12898
|
+
function nt(a) {
|
|
12899
|
+
const e = a.headers.get("cookie"), o = e ? Ke(e) : {}, i = tt(a);
|
|
12898
12900
|
for (const u in i)
|
|
12899
12901
|
a.headers.append(
|
|
12900
12902
|
"cookie",
|
|
12901
|
-
|
|
12903
|
+
Be.serialize(u, i[u])
|
|
12902
12904
|
);
|
|
12903
|
-
const t =
|
|
12905
|
+
const t = it.getCookiesSync(a.url), s = Object.fromEntries(
|
|
12904
12906
|
t.map((u) => [u.key, u.value])
|
|
12905
12907
|
);
|
|
12906
12908
|
for (const u of t)
|
|
@@ -12912,7 +12914,7 @@ function lt(a) {
|
|
|
12912
12914
|
};
|
|
12913
12915
|
}
|
|
12914
12916
|
var ha = /* @__PURE__ */ ((a) => (a.HEAD = "HEAD", a.GET = "GET", a.POST = "POST", a.PUT = "PUT", a.PATCH = "PATCH", a.OPTIONS = "OPTIONS", a.DELETE = "DELETE", a))(ha || {});
|
|
12915
|
-
class
|
|
12917
|
+
class st extends ee {
|
|
12916
12918
|
constructor(e, o, i, t) {
|
|
12917
12919
|
super({
|
|
12918
12920
|
info: {
|
|
@@ -12926,20 +12928,20 @@ class pt extends Qa {
|
|
|
12926
12928
|
}
|
|
12927
12929
|
checkRedundantQueryParameters() {
|
|
12928
12930
|
const { method: e, path: o } = this.info;
|
|
12929
|
-
if (o instanceof RegExp ||
|
|
12931
|
+
if (o instanceof RegExp || qe(o) === o)
|
|
12930
12932
|
return;
|
|
12931
|
-
|
|
12932
|
-
}),
|
|
12933
|
+
gi(o).forEach((s, u) => {
|
|
12934
|
+
}), ae.warn(
|
|
12933
12935
|
`Found a redundant usage of query parameters in the request handler URL for "${e} ${o}". Please match against a path instead and access query parameters using "new URL(request.url).searchParams" instead. Learn more: https://mswjs.io/docs/recipes/query-parameters`
|
|
12934
12936
|
);
|
|
12935
12937
|
}
|
|
12936
12938
|
async parse(e) {
|
|
12937
12939
|
var s;
|
|
12938
|
-
const o = new URL(e.request.url), i =
|
|
12940
|
+
const o = new URL(e.request.url), i = yi(
|
|
12939
12941
|
o,
|
|
12940
12942
|
this.info.path,
|
|
12941
12943
|
(s = e.resolutionContext) == null ? void 0 : s.baseUrl
|
|
12942
|
-
), t =
|
|
12944
|
+
), t = nt(e.request);
|
|
12943
12945
|
return {
|
|
12944
12946
|
match: i,
|
|
12945
12947
|
cookies: t
|
|
@@ -12950,7 +12952,7 @@ class pt extends Qa {
|
|
|
12950
12952
|
return o && i;
|
|
12951
12953
|
}
|
|
12952
12954
|
matchMethod(e) {
|
|
12953
|
-
return this.info.method instanceof RegExp ? this.info.method.test(e) :
|
|
12955
|
+
return this.info.method instanceof RegExp ? this.info.method.test(e) : Mo(this.info.method, e);
|
|
12954
12956
|
}
|
|
12955
12957
|
extendResolverArgs(e) {
|
|
12956
12958
|
var o;
|
|
@@ -12960,10 +12962,10 @@ class pt extends Qa {
|
|
|
12960
12962
|
};
|
|
12961
12963
|
}
|
|
12962
12964
|
async log(e) {
|
|
12963
|
-
const o =
|
|
12965
|
+
const o = vi(e.request.url), i = await Wo(e.request), t = await ii(e.response), s = Ho(t.status);
|
|
12964
12966
|
console.groupCollapsed(
|
|
12965
|
-
|
|
12966
|
-
`${
|
|
12967
|
+
ae.formatMessage(
|
|
12968
|
+
`${Vo()} ${e.request.method} ${o} (%c${t.status} ${t.statusText}%c)`
|
|
12967
12969
|
),
|
|
12968
12970
|
`color:${s}`,
|
|
12969
12971
|
"color:inherit"
|
|
@@ -12971,9 +12973,9 @@ class pt extends Qa {
|
|
|
12971
12973
|
}
|
|
12972
12974
|
}
|
|
12973
12975
|
function da(a) {
|
|
12974
|
-
return (e, o, i = {}) => new
|
|
12976
|
+
return (e, o, i = {}) => new st(a, e, o, i);
|
|
12975
12977
|
}
|
|
12976
|
-
const
|
|
12978
|
+
const Sa = {
|
|
12977
12979
|
all: da(/.+/),
|
|
12978
12980
|
head: da(ha.HEAD),
|
|
12979
12981
|
get: da(ha.GET),
|
|
@@ -12983,21 +12985,21 @@ const Ca = {
|
|
|
12983
12985
|
patch: da(ha.PATCH),
|
|
12984
12986
|
options: da(ha.OPTIONS)
|
|
12985
12987
|
};
|
|
12986
|
-
var
|
|
12987
|
-
return e || (0, a[
|
|
12988
|
-
},
|
|
12988
|
+
var rt = Object.create, Xe = Object.defineProperty, ut = Object.getOwnPropertyDescriptor, Ze = Object.getOwnPropertyNames, mt = Object.getPrototypeOf, ct = Object.prototype.hasOwnProperty, lt = (a, e) => function() {
|
|
12989
|
+
return e || (0, a[Ze(a)[0]])((e = { exports: {} }).exports, e), e.exports;
|
|
12990
|
+
}, pt = (a, e, o, i) => {
|
|
12989
12991
|
if (e && typeof e == "object" || typeof e == "function")
|
|
12990
|
-
for (let t of
|
|
12991
|
-
!
|
|
12992
|
+
for (let t of Ze(e))
|
|
12993
|
+
!ct.call(a, t) && t !== o && Xe(a, t, { get: () => e[t], enumerable: !(i = ut(e, t)) || i.enumerable });
|
|
12992
12994
|
return a;
|
|
12993
|
-
},
|
|
12995
|
+
}, dt = (a, e, o) => (o = a != null ? rt(mt(a)) : {}, pt(
|
|
12994
12996
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
12995
12997
|
// file that has been converted to a CommonJS file using a Babel-
|
|
12996
12998
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
12997
12999
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
12998
|
-
!a || !a.__esModule ?
|
|
13000
|
+
!a || !a.__esModule ? Xe(o, "default", { value: a, enumerable: !0 }) : o,
|
|
12999
13001
|
a
|
|
13000
|
-
)),
|
|
13002
|
+
)), ht = lt({
|
|
13001
13003
|
"node_modules/set-cookie-parser/lib/set-cookie.js"(a, e) {
|
|
13002
13004
|
var o = {
|
|
13003
13005
|
decodeValues: !0,
|
|
@@ -13086,36 +13088,36 @@ var dt = Object.create, Ye = Object.defineProperty, ht = Object.getOwnPropertyDe
|
|
|
13086
13088
|
}
|
|
13087
13089
|
e.exports = u, e.exports.parse = u, e.exports.parseString = t, e.exports.splitCookiesString = r;
|
|
13088
13090
|
}
|
|
13089
|
-
}),
|
|
13090
|
-
function
|
|
13091
|
-
if (
|
|
13091
|
+
}), gt = dt(ht()), kt = /[^a-z0-9\-#$%&'*+.^_`|~]/i;
|
|
13092
|
+
function _a(a) {
|
|
13093
|
+
if (kt.test(a) || a.trim() === "")
|
|
13092
13094
|
throw new TypeError("Invalid character in header field name");
|
|
13093
13095
|
return a.trim().toLowerCase();
|
|
13094
13096
|
}
|
|
13095
|
-
var
|
|
13097
|
+
var we = [
|
|
13096
13098
|
`
|
|
13097
13099
|
`,
|
|
13098
13100
|
"\r",
|
|
13099
13101
|
" ",
|
|
13100
13102
|
" "
|
|
13101
|
-
],
|
|
13102
|
-
`(^[${
|
|
13103
|
+
], ft = new RegExp(
|
|
13104
|
+
`(^[${we.join("")}]|$[${we.join("")}])`,
|
|
13103
13105
|
"g"
|
|
13104
13106
|
);
|
|
13105
|
-
function
|
|
13106
|
-
return a.replace(
|
|
13107
|
+
function Xa(a) {
|
|
13108
|
+
return a.replace(ft, "");
|
|
13107
13109
|
}
|
|
13108
|
-
function
|
|
13110
|
+
function Aa(a) {
|
|
13109
13111
|
if (typeof a != "string" || a.length === 0)
|
|
13110
13112
|
return !1;
|
|
13111
13113
|
for (let e = 0; e < a.length; e++) {
|
|
13112
13114
|
const o = a.charCodeAt(e);
|
|
13113
|
-
if (o > 127 || !
|
|
13115
|
+
if (o > 127 || !jt(o))
|
|
13114
13116
|
return !1;
|
|
13115
13117
|
}
|
|
13116
13118
|
return !0;
|
|
13117
13119
|
}
|
|
13118
|
-
function
|
|
13120
|
+
function jt(a) {
|
|
13119
13121
|
return ![
|
|
13120
13122
|
127,
|
|
13121
13123
|
32,
|
|
@@ -13138,7 +13140,7 @@ function zt(a) {
|
|
|
13138
13140
|
"}"
|
|
13139
13141
|
].includes(a);
|
|
13140
13142
|
}
|
|
13141
|
-
function
|
|
13143
|
+
function xe(a) {
|
|
13142
13144
|
if (typeof a != "string" || a.trim() !== a)
|
|
13143
13145
|
return !1;
|
|
13144
13146
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -13152,24 +13154,24 @@ function ye(a) {
|
|
|
13152
13154
|
}
|
|
13153
13155
|
return !0;
|
|
13154
13156
|
}
|
|
13155
|
-
var
|
|
13157
|
+
var ya = Symbol("normalizedHeaders"), Za = Symbol("rawHeaderNames"), ze = ", ", Ee, Ce, Se, bt = class Qe {
|
|
13156
13158
|
constructor(e) {
|
|
13157
|
-
this[
|
|
13159
|
+
this[Ee] = {}, this[Ce] = /* @__PURE__ */ new Map(), this[Se] = "Headers", ["Headers", "HeadersPolyfill"].includes(e == null ? void 0 : e.constructor.name) || e instanceof Qe || typeof globalThis.Headers < "u" && e instanceof globalThis.Headers ? e.forEach((i, t) => {
|
|
13158
13160
|
this.append(t, i);
|
|
13159
13161
|
}, this) : Array.isArray(e) ? e.forEach(([o, i]) => {
|
|
13160
13162
|
this.append(
|
|
13161
13163
|
o,
|
|
13162
|
-
Array.isArray(i) ? i.join(
|
|
13164
|
+
Array.isArray(i) ? i.join(ze) : i
|
|
13163
13165
|
);
|
|
13164
13166
|
}) : e && Object.getOwnPropertyNames(e).forEach((o) => {
|
|
13165
13167
|
const i = e[o];
|
|
13166
13168
|
this.append(
|
|
13167
13169
|
o,
|
|
13168
|
-
Array.isArray(i) ? i.join(
|
|
13170
|
+
Array.isArray(i) ? i.join(ze) : i
|
|
13169
13171
|
);
|
|
13170
13172
|
});
|
|
13171
13173
|
}
|
|
13172
|
-
[(
|
|
13174
|
+
[(Ee = ya, Ce = Za, Se = Symbol.toStringTag, Symbol.iterator)]() {
|
|
13173
13175
|
return this.entries();
|
|
13174
13176
|
}
|
|
13175
13177
|
*keys() {
|
|
@@ -13181,7 +13183,7 @@ var ba = Symbol("normalizedHeaders"), Xa = Symbol("rawHeaderNames"), ve = ", ",
|
|
|
13181
13183
|
yield e;
|
|
13182
13184
|
}
|
|
13183
13185
|
*entries() {
|
|
13184
|
-
let e = Object.keys(this[
|
|
13186
|
+
let e = Object.keys(this[ya]).sort(
|
|
13185
13187
|
(o, i) => o.localeCompare(i)
|
|
13186
13188
|
);
|
|
13187
13189
|
for (const o of e)
|
|
@@ -13195,34 +13197,34 @@ var ba = Symbol("normalizedHeaders"), Xa = Symbol("rawHeaderNames"), ve = ", ",
|
|
|
13195
13197
|
* Returns a boolean stating whether a `Headers` object contains a certain header.
|
|
13196
13198
|
*/
|
|
13197
13199
|
has(e) {
|
|
13198
|
-
if (!
|
|
13200
|
+
if (!Aa(e))
|
|
13199
13201
|
throw new TypeError(`Invalid header name "${e}"`);
|
|
13200
|
-
return this[
|
|
13202
|
+
return this[ya].hasOwnProperty(_a(e));
|
|
13201
13203
|
}
|
|
13202
13204
|
/**
|
|
13203
13205
|
* Returns a `ByteString` sequence of all the values of a header with a given name.
|
|
13204
13206
|
*/
|
|
13205
13207
|
get(e) {
|
|
13206
|
-
if (!
|
|
13208
|
+
if (!Aa(e))
|
|
13207
13209
|
throw TypeError(`Invalid header name "${e}"`);
|
|
13208
|
-
return this[
|
|
13210
|
+
return this[ya][_a(e)] ?? null;
|
|
13209
13211
|
}
|
|
13210
13212
|
/**
|
|
13211
13213
|
* Sets a new value for an existing header inside a `Headers` object, or adds the header if it does not already exist.
|
|
13212
13214
|
*/
|
|
13213
13215
|
set(e, o) {
|
|
13214
|
-
if (!
|
|
13216
|
+
if (!Aa(e) || !xe(o))
|
|
13215
13217
|
return;
|
|
13216
|
-
const i =
|
|
13217
|
-
this[
|
|
13218
|
+
const i = _a(e), t = Xa(o);
|
|
13219
|
+
this[ya][i] = Xa(t), this[Za].set(i, e);
|
|
13218
13220
|
}
|
|
13219
13221
|
/**
|
|
13220
13222
|
* Appends a new value onto an existing header inside a `Headers` object, or adds the header if it does not already exist.
|
|
13221
13223
|
*/
|
|
13222
13224
|
append(e, o) {
|
|
13223
|
-
if (!
|
|
13225
|
+
if (!Aa(e) || !xe(o))
|
|
13224
13226
|
return;
|
|
13225
|
-
const i =
|
|
13227
|
+
const i = _a(e), t = Xa(o);
|
|
13226
13228
|
let s = this.has(i) ? `${this.get(i)}, ${t}` : t;
|
|
13227
13229
|
this.set(e, s);
|
|
13228
13230
|
}
|
|
@@ -13230,10 +13232,10 @@ var ba = Symbol("normalizedHeaders"), Xa = Symbol("rawHeaderNames"), ve = ", ",
|
|
|
13230
13232
|
* Deletes a header from the `Headers` object.
|
|
13231
13233
|
*/
|
|
13232
13234
|
delete(e) {
|
|
13233
|
-
if (!
|
|
13235
|
+
if (!Aa(e) || !this.has(e))
|
|
13234
13236
|
return;
|
|
13235
|
-
const o =
|
|
13236
|
-
delete this[
|
|
13237
|
+
const o = _a(e);
|
|
13238
|
+
delete this[ya][o], this[Za].delete(o);
|
|
13237
13239
|
}
|
|
13238
13240
|
/**
|
|
13239
13241
|
* Traverses the `Headers` object,
|
|
@@ -13250,12 +13252,12 @@ var ba = Symbol("normalizedHeaders"), Xa = Symbol("rawHeaderNames"), ve = ", ",
|
|
|
13250
13252
|
*/
|
|
13251
13253
|
getSetCookie() {
|
|
13252
13254
|
const e = this.get("set-cookie");
|
|
13253
|
-
return e === null ? [] : e === "" ? [""] : (0,
|
|
13255
|
+
return e === null ? [] : e === "" ? [""] : (0, gt.splitCookiesString)(e);
|
|
13254
13256
|
}
|
|
13255
13257
|
};
|
|
13256
|
-
const { message:
|
|
13258
|
+
const { message: yt } = Re, vt = Symbol("kSetCookie");
|
|
13257
13259
|
function ka(a = {}) {
|
|
13258
|
-
const e = (a == null ? void 0 : a.status) || 200, o = (a == null ? void 0 : a.statusText) ||
|
|
13260
|
+
const e = (a == null ? void 0 : a.status) || 200, o = (a == null ? void 0 : a.statusText) || yt[e] || "", i = new Headers(a == null ? void 0 : a.headers);
|
|
13259
13261
|
return {
|
|
13260
13262
|
...a,
|
|
13261
13263
|
headers: i,
|
|
@@ -13263,19 +13265,19 @@ function ka(a = {}) {
|
|
|
13263
13265
|
statusText: o
|
|
13264
13266
|
};
|
|
13265
13267
|
}
|
|
13266
|
-
function
|
|
13268
|
+
function wt(a, e) {
|
|
13267
13269
|
e.type && Object.defineProperty(a, "type", {
|
|
13268
13270
|
value: e.type,
|
|
13269
13271
|
enumerable: !0,
|
|
13270
13272
|
writable: !1
|
|
13271
13273
|
});
|
|
13272
13274
|
const o = e.headers.get("set-cookie");
|
|
13273
|
-
if (o && (Object.defineProperty(a,
|
|
13275
|
+
if (o && (Object.defineProperty(a, vt, {
|
|
13274
13276
|
value: o,
|
|
13275
13277
|
enumerable: !1,
|
|
13276
13278
|
writable: !1
|
|
13277
13279
|
}), typeof document < "u")) {
|
|
13278
|
-
const i =
|
|
13280
|
+
const i = bt.prototype.getSetCookie.call(
|
|
13279
13281
|
e.headers
|
|
13280
13282
|
);
|
|
13281
13283
|
for (const t of i)
|
|
@@ -13283,14 +13285,14 @@ function _t(a, e) {
|
|
|
13283
13285
|
}
|
|
13284
13286
|
return a;
|
|
13285
13287
|
}
|
|
13286
|
-
const
|
|
13287
|
-
var
|
|
13288
|
-
class sa extends (
|
|
13288
|
+
const xt = Symbol("bodyType");
|
|
13289
|
+
var _e, Ae;
|
|
13290
|
+
class sa extends (Ae = re, _e = xt, Ae) {
|
|
13289
13291
|
constructor(o, i) {
|
|
13290
13292
|
const t = ka(i);
|
|
13291
13293
|
super(o, t);
|
|
13292
|
-
ma(this,
|
|
13293
|
-
|
|
13294
|
+
ma(this, _e);
|
|
13295
|
+
wt(this, t);
|
|
13294
13296
|
}
|
|
13295
13297
|
/**
|
|
13296
13298
|
* Create a `Response` with a `Content-Type: "text/plain"` body.
|
|
@@ -13368,11 +13370,11 @@ class sa extends (Ce = te, Ee = At, Ce) {
|
|
|
13368
13370
|
return new sa(o, ka(i));
|
|
13369
13371
|
}
|
|
13370
13372
|
}
|
|
13371
|
-
|
|
13372
|
-
const
|
|
13373
|
+
Uo();
|
|
13374
|
+
const Fa = (a, e = 400) => {
|
|
13373
13375
|
const o = { error: a };
|
|
13374
13376
|
return sa.json(o, { status: e });
|
|
13375
|
-
},
|
|
13377
|
+
}, zt = async (a) => {
|
|
13376
13378
|
try {
|
|
13377
13379
|
const e = await a.json(), o = {
|
|
13378
13380
|
id: (oa.users.length + 1).toString(),
|
|
@@ -13390,46 +13392,48 @@ const Oa = (a, e = 400) => {
|
|
|
13390
13392
|
};
|
|
13391
13393
|
return oa.users.push(o), sa.json(o);
|
|
13392
13394
|
} catch {
|
|
13393
|
-
return
|
|
13395
|
+
return Fa("Failed to create user");
|
|
13394
13396
|
}
|
|
13395
|
-
},
|
|
13397
|
+
}, Et = async (a, e) => {
|
|
13396
13398
|
try {
|
|
13397
13399
|
const o = await a.json(), i = oa.users.findIndex((s) => s.id === e);
|
|
13398
13400
|
if (i === -1)
|
|
13399
|
-
return
|
|
13401
|
+
return Fa("User not found", 404);
|
|
13400
13402
|
const t = {
|
|
13401
13403
|
...oa.users[i],
|
|
13402
13404
|
...o
|
|
13403
13405
|
};
|
|
13404
|
-
return oa.users[i] = t,
|
|
13406
|
+
return oa.users[i] = t, to(oa), sa.json(t);
|
|
13405
13407
|
} catch {
|
|
13406
|
-
return
|
|
13408
|
+
return Fa("Failed to update user");
|
|
13407
13409
|
}
|
|
13408
|
-
},
|
|
13410
|
+
}, Ct = async (a) => {
|
|
13409
13411
|
try {
|
|
13410
13412
|
const e = oa.users.findIndex((i) => i.id === a);
|
|
13411
13413
|
if (e === -1)
|
|
13412
|
-
return
|
|
13414
|
+
return Fa("User not found", 404);
|
|
13413
13415
|
const o = oa.users[e];
|
|
13414
13416
|
return oa.users = oa.users.filter((i) => i.id !== a), Object.keys(oa.enrollmentsByCourse).forEach((i) => {
|
|
13415
13417
|
oa.enrollmentsByCourse[i] = oa.enrollmentsByCourse[i].filter((t) => t.user_id !== a);
|
|
13416
13418
|
}), sa.json(o);
|
|
13417
13419
|
} catch {
|
|
13418
|
-
return
|
|
13420
|
+
return Fa("Failed to delete user");
|
|
13419
13421
|
}
|
|
13420
|
-
},
|
|
13422
|
+
}, St = () => {
|
|
13421
13423
|
const a = oa.users[0].id, e = oa.users.find((o) => o.id === a);
|
|
13422
13424
|
return sa.json(e);
|
|
13423
|
-
},
|
|
13424
|
-
|
|
13425
|
-
|
|
13426
|
-
|
|
13427
|
-
|
|
13428
|
-
|
|
13425
|
+
}, _t = () => sa.json(oa.users), Tt = [
|
|
13426
|
+
Sa.get(za + "api/users/current/", () => St()),
|
|
13427
|
+
Sa.get(za + "api/users/", () => _t()),
|
|
13428
|
+
Sa.post(za + "api/users/", async ({ request: a }) => zt(a)),
|
|
13429
|
+
Sa.put(za + "api/users/:userId/", async ({ request: a, params: e }) => Et(a, e.userId)),
|
|
13430
|
+
Sa.delete(za + "api/users/:userId/", async ({ params: a }) => Ct(a.userId))
|
|
13429
13431
|
];
|
|
13432
|
+
ie();
|
|
13430
13433
|
export {
|
|
13431
|
-
|
|
13432
|
-
|
|
13433
|
-
|
|
13434
|
-
|
|
13434
|
+
Dt as UserMicroservice,
|
|
13435
|
+
ie as configureUserBus,
|
|
13436
|
+
fa as useUserStore,
|
|
13437
|
+
Pt as userBus,
|
|
13438
|
+
Tt as userHandlers
|
|
13435
13439
|
};
|