mhz-helpers 1.0.48 → 1.0.50
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/index.js +1024 -1020
- package/package.json +17 -17
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { computed as $, ref as B, watch as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
function
|
|
1
|
+
import { computed as $, ref as B, watch as Q, unref as jt, toRef as Nr, readonly as Ee, customRef as Ur, isRef as et, shallowRef as Ir, toRaw as Mr, hasInjectionContext as Qr, inject as jr, getCurrentScope as kt, reactive as Lt, onScopeDispose as Bt, toRefs as Ht } from "vue";
|
|
2
|
+
import { useRouter as Vt, useRoute as kr } from "vue-router";
|
|
3
|
+
function Ii(t) {
|
|
4
4
|
const e = $(() => t.value?.data), r = $(() => t.value?.total);
|
|
5
5
|
function n(s, i) {
|
|
6
6
|
return !r.value || s === 0 || s === r.value + 1 ? i : s;
|
|
7
7
|
}
|
|
8
8
|
return { data: e, total: r, setPage: n };
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function Mi(t, e) {
|
|
11
11
|
return typeof t.value == "number" ? { page: t.value } : {
|
|
12
12
|
initiator: e,
|
|
13
13
|
page: t.value.page || 1,
|
|
@@ -16,8 +16,8 @@ function Li(t, e) {
|
|
|
16
16
|
...t.value.filter
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const e =
|
|
19
|
+
function Qi(t) {
|
|
20
|
+
const e = Vt(), r = kr(), n = B({
|
|
21
21
|
page: Number(r.query.page || 1),
|
|
22
22
|
sort: {
|
|
23
23
|
value: r.query.sort?.toString(),
|
|
@@ -38,7 +38,7 @@ function Bi(t) {
|
|
|
38
38
|
sort: n.value.sort
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
return
|
|
41
|
+
return Q(
|
|
42
42
|
() => [n.value.page, n.value.sort.value, n.value.sort.isAsc],
|
|
43
43
|
() => {
|
|
44
44
|
e.push({
|
|
@@ -52,7 +52,7 @@ function Bi(t) {
|
|
|
52
52
|
}
|
|
53
53
|
), { query: n, resetQuery: s, setQueryPage: i, setQueryFilter: o };
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function ji() {
|
|
56
56
|
const t = B(1), e = B([]);
|
|
57
57
|
function r(s) {
|
|
58
58
|
e.value = [...e.value, ...s];
|
|
@@ -62,53 +62,53 @@ function Hi() {
|
|
|
62
62
|
}
|
|
63
63
|
return { page: t, allData: e, addData: r, handleScroll: n };
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
return typeof t == "function" ? t() :
|
|
65
|
+
function Z(t) {
|
|
66
|
+
return typeof t == "function" ? t() : jt(t);
|
|
67
67
|
}
|
|
68
68
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
69
|
-
const
|
|
69
|
+
const Lr = () => {
|
|
70
70
|
};
|
|
71
|
-
function
|
|
71
|
+
function lt(t, e = !1, r = "Timeout") {
|
|
72
72
|
return new Promise((n, s) => {
|
|
73
73
|
setTimeout(e ? () => s(r) : n, t);
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Br(...t) {
|
|
77
77
|
if (t.length !== 1)
|
|
78
|
-
return
|
|
78
|
+
return Nr(...t);
|
|
79
79
|
const e = t[0];
|
|
80
|
-
return typeof e == "function" ?
|
|
80
|
+
return typeof e == "function" ? Ee(Ur(() => ({ get: e, set: Lr }))) : B(e);
|
|
81
81
|
}
|
|
82
82
|
function Ue(t, e = !1) {
|
|
83
|
-
function r(c, { flush:
|
|
83
|
+
function r(c, { flush: f = "sync", deep: v = !1, timeout: m, throwOnTimeout: d } = {}) {
|
|
84
84
|
let g = null;
|
|
85
|
-
const
|
|
86
|
-
g =
|
|
85
|
+
const O = [new Promise((b) => {
|
|
86
|
+
g = Q(
|
|
87
87
|
t,
|
|
88
|
-
(
|
|
89
|
-
c(
|
|
88
|
+
(w) => {
|
|
89
|
+
c(w) !== e && (g?.(), b(w));
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
|
-
flush:
|
|
92
|
+
flush: f,
|
|
93
93
|
deep: v,
|
|
94
94
|
immediate: !0
|
|
95
95
|
}
|
|
96
96
|
);
|
|
97
97
|
})];
|
|
98
|
-
return m != null &&
|
|
99
|
-
|
|
100
|
-
), Promise.race(
|
|
98
|
+
return m != null && O.push(
|
|
99
|
+
lt(m, d).then(() => Z(t)).finally(() => g?.())
|
|
100
|
+
), Promise.race(O);
|
|
101
101
|
}
|
|
102
|
-
function n(c,
|
|
102
|
+
function n(c, f) {
|
|
103
103
|
if (!et(c))
|
|
104
|
-
return r((
|
|
105
|
-
const { flush: v = "sync", deep: m = !1, timeout:
|
|
104
|
+
return r((w) => w === c, f);
|
|
105
|
+
const { flush: v = "sync", deep: m = !1, timeout: d, throwOnTimeout: g } = f ?? {};
|
|
106
106
|
let y = null;
|
|
107
|
-
const b = [new Promise((
|
|
108
|
-
y =
|
|
107
|
+
const b = [new Promise((w) => {
|
|
108
|
+
y = Q(
|
|
109
109
|
[t, c],
|
|
110
110
|
([P, R]) => {
|
|
111
|
-
e !== (P === R) && (y?.(),
|
|
111
|
+
e !== (P === R) && (y?.(), w(P));
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
flush: v,
|
|
@@ -117,12 +117,12 @@ function Ue(t, e = !1) {
|
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
119
|
})];
|
|
120
|
-
return
|
|
121
|
-
|
|
120
|
+
return d != null && b.push(
|
|
121
|
+
lt(d, g).then(() => Z(t)).finally(() => (y?.(), Z(t)))
|
|
122
122
|
), Promise.race(b);
|
|
123
123
|
}
|
|
124
124
|
function s(c) {
|
|
125
|
-
return r((
|
|
125
|
+
return r((f) => !!f, c);
|
|
126
126
|
}
|
|
127
127
|
function i(c) {
|
|
128
128
|
return n(null, c);
|
|
@@ -133,20 +133,20 @@ function Ue(t, e = !1) {
|
|
|
133
133
|
function a(c) {
|
|
134
134
|
return r(Number.isNaN, c);
|
|
135
135
|
}
|
|
136
|
-
function u(c,
|
|
136
|
+
function u(c, f) {
|
|
137
137
|
return r((v) => {
|
|
138
138
|
const m = Array.from(v);
|
|
139
|
-
return m.includes(c) || m.includes(
|
|
140
|
-
},
|
|
139
|
+
return m.includes(c) || m.includes(Z(c));
|
|
140
|
+
}, f);
|
|
141
141
|
}
|
|
142
142
|
function h(c) {
|
|
143
143
|
return l(1, c);
|
|
144
144
|
}
|
|
145
|
-
function l(c = 1,
|
|
145
|
+
function l(c = 1, f) {
|
|
146
146
|
let v = -1;
|
|
147
|
-
return r(() => (v += 1, v >= c),
|
|
147
|
+
return r(() => (v += 1, v >= c), f);
|
|
148
148
|
}
|
|
149
|
-
return Array.isArray(
|
|
149
|
+
return Array.isArray(Z(t)) ? {
|
|
150
150
|
toMatch: r,
|
|
151
151
|
toContains: u,
|
|
152
152
|
changed: h,
|
|
@@ -168,7 +168,7 @@ function Ue(t, e = !1) {
|
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Hr(t) {
|
|
172
172
|
return Ue(t);
|
|
173
173
|
}
|
|
174
174
|
function K() {
|
|
@@ -181,20 +181,20 @@ function K() {
|
|
|
181
181
|
return t;
|
|
182
182
|
}, K.apply(this, arguments);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
t.prototype = Object.create(e.prototype), t.prototype.constructor = t,
|
|
184
|
+
function Vr(t, e) {
|
|
185
|
+
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, ce(t, e);
|
|
186
186
|
}
|
|
187
187
|
function Ie(t) {
|
|
188
188
|
return Ie = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
|
|
189
189
|
return r.__proto__ || Object.getPrototypeOf(r);
|
|
190
190
|
}, Ie(t);
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
return
|
|
192
|
+
function ce(t, e) {
|
|
193
|
+
return ce = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, s) {
|
|
194
194
|
return n.__proto__ = s, n;
|
|
195
|
-
},
|
|
195
|
+
}, ce(t, e);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function $r() {
|
|
198
198
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
199
199
|
return !1;
|
|
200
200
|
if (typeof Proxy == "function")
|
|
@@ -206,21 +206,21 @@ function Wr() {
|
|
|
206
206
|
return !1;
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
return
|
|
209
|
+
function ve(t, e, r) {
|
|
210
|
+
return $r() ? ve = Reflect.construct.bind() : ve = function(s, i, o) {
|
|
211
211
|
var a = [null];
|
|
212
212
|
a.push.apply(a, i);
|
|
213
213
|
var u = Function.bind.apply(s, a), h = new u();
|
|
214
|
-
return o &&
|
|
215
|
-
},
|
|
214
|
+
return o && ce(h, o.prototype), h;
|
|
215
|
+
}, ve.apply(null, arguments);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function Kr(t) {
|
|
218
218
|
return Function.toString.call(t).indexOf("[native code]") !== -1;
|
|
219
219
|
}
|
|
220
220
|
function Me(t) {
|
|
221
221
|
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
222
222
|
return Me = function(n) {
|
|
223
|
-
if (n === null || !
|
|
223
|
+
if (n === null || !Kr(n))
|
|
224
224
|
return n;
|
|
225
225
|
if (typeof n != "function")
|
|
226
226
|
throw new TypeError("Super expression must either be null or a function");
|
|
@@ -230,7 +230,7 @@ function Me(t) {
|
|
|
230
230
|
e.set(n, s);
|
|
231
231
|
}
|
|
232
232
|
function s() {
|
|
233
|
-
return
|
|
233
|
+
return ve(n, arguments, Ie(this).constructor);
|
|
234
234
|
}
|
|
235
235
|
return s.prototype = Object.create(n.prototype, {
|
|
236
236
|
constructor: {
|
|
@@ -239,12 +239,12 @@ function Me(t) {
|
|
|
239
239
|
writable: !0,
|
|
240
240
|
configurable: !0
|
|
241
241
|
}
|
|
242
|
-
}),
|
|
242
|
+
}), ce(s, n);
|
|
243
243
|
}, Me(t);
|
|
244
244
|
}
|
|
245
|
-
var
|
|
245
|
+
var Wr = /%[sdj%]/g, $t = function() {
|
|
246
246
|
};
|
|
247
|
-
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (
|
|
247
|
+
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && ($t = function(e, r) {
|
|
248
248
|
typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && r.every(function(n) {
|
|
249
249
|
return typeof n == "string";
|
|
250
250
|
}) && console.warn(e, r);
|
|
@@ -265,7 +265,7 @@ function x(t) {
|
|
|
265
265
|
if (typeof t == "function")
|
|
266
266
|
return t.apply(null, r);
|
|
267
267
|
if (typeof t == "string") {
|
|
268
|
-
var o = t.replace(
|
|
268
|
+
var o = t.replace(Wr, function(a) {
|
|
269
269
|
if (a === "%%")
|
|
270
270
|
return "%";
|
|
271
271
|
if (s >= i)
|
|
@@ -290,13 +290,13 @@ function x(t) {
|
|
|
290
290
|
}
|
|
291
291
|
return t;
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function zr(t) {
|
|
294
294
|
return t === "string" || t === "url" || t === "hex" || t === "email" || t === "date" || t === "pattern";
|
|
295
295
|
}
|
|
296
296
|
function C(t, e) {
|
|
297
|
-
return !!(t == null || e === "array" && Array.isArray(t) && !t.length ||
|
|
297
|
+
return !!(t == null || e === "array" && Array.isArray(t) && !t.length || zr(e) && typeof t == "string" && !t);
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Gr(t, e, r) {
|
|
300
300
|
var n = [], s = 0, i = t.length;
|
|
301
301
|
function o(a) {
|
|
302
302
|
n.push.apply(n, a || []), s++, s === i && r(n);
|
|
@@ -305,7 +305,7 @@ function Xr(t, e, r) {
|
|
|
305
305
|
e(a, o);
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function ft(t, e, r) {
|
|
309
309
|
var n = 0, s = t.length;
|
|
310
310
|
function i(o) {
|
|
311
311
|
if (o && o.length) {
|
|
@@ -317,50 +317,50 @@ function pt(t, e, r) {
|
|
|
317
317
|
}
|
|
318
318
|
i([]);
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Jr(t) {
|
|
321
321
|
var e = [];
|
|
322
322
|
return Object.keys(t).forEach(function(r) {
|
|
323
323
|
e.push.apply(e, t[r] || []);
|
|
324
324
|
}), e;
|
|
325
325
|
}
|
|
326
|
-
var
|
|
327
|
-
|
|
326
|
+
var ht = /* @__PURE__ */ function(t) {
|
|
327
|
+
Vr(e, t);
|
|
328
328
|
function e(r, n) {
|
|
329
329
|
var s;
|
|
330
330
|
return s = t.call(this, "Async Validation Error") || this, s.errors = r, s.fields = n, s;
|
|
331
331
|
}
|
|
332
332
|
return e;
|
|
333
333
|
}(/* @__PURE__ */ Me(Error));
|
|
334
|
-
function
|
|
334
|
+
function Xr(t, e, r, n, s) {
|
|
335
335
|
if (e.first) {
|
|
336
|
-
var i = new Promise(function(
|
|
336
|
+
var i = new Promise(function(f, v) {
|
|
337
337
|
var m = function(y) {
|
|
338
|
-
return n(y), y.length ? v(new
|
|
339
|
-
},
|
|
340
|
-
|
|
338
|
+
return n(y), y.length ? v(new ht(y, Qe(y))) : f(s);
|
|
339
|
+
}, d = Jr(t);
|
|
340
|
+
ft(d, r, m);
|
|
341
341
|
});
|
|
342
|
-
return i.catch(function(
|
|
343
|
-
return
|
|
342
|
+
return i.catch(function(f) {
|
|
343
|
+
return f;
|
|
344
344
|
}), i;
|
|
345
345
|
}
|
|
346
|
-
var o = e.firstFields === !0 ? Object.keys(t) : e.firstFields || [], a = Object.keys(t), u = a.length, h = 0, l = [], c = new Promise(function(
|
|
346
|
+
var o = e.firstFields === !0 ? Object.keys(t) : e.firstFields || [], a = Object.keys(t), u = a.length, h = 0, l = [], c = new Promise(function(f, v) {
|
|
347
347
|
var m = function(g) {
|
|
348
348
|
if (l.push.apply(l, g), h++, h === u)
|
|
349
|
-
return n(l), l.length ? v(new
|
|
349
|
+
return n(l), l.length ? v(new ht(l, Qe(l))) : f(s);
|
|
350
350
|
};
|
|
351
|
-
a.length || (n(l),
|
|
352
|
-
var g = t[
|
|
353
|
-
o.indexOf(
|
|
351
|
+
a.length || (n(l), f(s)), a.forEach(function(d) {
|
|
352
|
+
var g = t[d];
|
|
353
|
+
o.indexOf(d) !== -1 ? ft(g, r, m) : Gr(g, r, m);
|
|
354
354
|
});
|
|
355
355
|
});
|
|
356
|
-
return c.catch(function(
|
|
357
|
-
return
|
|
356
|
+
return c.catch(function(f) {
|
|
357
|
+
return f;
|
|
358
358
|
}), c;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Yr(t) {
|
|
361
361
|
return !!(t && t.message !== void 0);
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function Zr(t, e) {
|
|
364
364
|
for (var r = t, n = 0; n < e.length; n++) {
|
|
365
365
|
if (r == null)
|
|
366
366
|
return r;
|
|
@@ -368,17 +368,17 @@ function tn(t, e) {
|
|
|
368
368
|
}
|
|
369
369
|
return r;
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function dt(t, e) {
|
|
372
372
|
return function(r) {
|
|
373
373
|
var n;
|
|
374
|
-
return t.fullFields ? n =
|
|
374
|
+
return t.fullFields ? n = Zr(e, t.fullFields) : n = e[r.field || t.fullField], Yr(r) ? (r.field = r.field || t.fullField, r.fieldValue = n, r) : {
|
|
375
375
|
message: typeof r == "function" ? r() : r,
|
|
376
376
|
fieldValue: n,
|
|
377
377
|
field: r.field || t.fullField
|
|
378
378
|
};
|
|
379
379
|
};
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function pt(t, e) {
|
|
382
382
|
if (e) {
|
|
383
383
|
for (var r in e)
|
|
384
384
|
if (e.hasOwnProperty(r)) {
|
|
@@ -388,15 +388,15 @@ function gt(t, e) {
|
|
|
388
388
|
}
|
|
389
389
|
return t;
|
|
390
390
|
}
|
|
391
|
-
var
|
|
391
|
+
var Kt = function(e, r, n, s, i, o) {
|
|
392
392
|
e.required && (!n.hasOwnProperty(e.field) || C(r, o || e.type)) && s.push(x(i.messages.required, e.fullField));
|
|
393
|
-
},
|
|
393
|
+
}, en = function(e, r, n, s, i) {
|
|
394
394
|
(/^\s+$/.test(r) || r === "") && s.push(x(i.messages.whitespace, e.fullField));
|
|
395
|
-
},
|
|
396
|
-
if (
|
|
397
|
-
return
|
|
398
|
-
var t = "[a-fA-F\\d:]", e = function(
|
|
399
|
-
return
|
|
395
|
+
}, me, tn = function() {
|
|
396
|
+
if (me)
|
|
397
|
+
return me;
|
|
398
|
+
var t = "[a-fA-F\\d:]", e = function(w) {
|
|
399
|
+
return w && w.includeBoundaries ? "(?:(?<=\\s|^)(?=" + t + ")|(?<=" + t + ")(?=\\s|$))" : "";
|
|
400
400
|
}, r = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", n = "[a-fA-F\\d]{1,4}", s = (`
|
|
401
401
|
(?:
|
|
402
402
|
(?:` + n + ":){7}(?:" + n + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
@@ -408,17 +408,17 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
408
408
|
(?:` + n + ":){1}(?:(?::" + n + "){0,4}:" + r + "|(?::" + n + `){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
409
409
|
(?::(?:(?::` + n + "){0,5}:" + r + "|(?::" + n + `){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
410
410
|
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
411
|
-
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), i = new RegExp("(?:^" + r + "$)|(?:^" + s + "$)"), o = new RegExp("^" + r + "$"), a = new RegExp("^" + s + "$"), u = function(
|
|
412
|
-
return
|
|
411
|
+
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), i = new RegExp("(?:^" + r + "$)|(?:^" + s + "$)"), o = new RegExp("^" + r + "$"), a = new RegExp("^" + s + "$"), u = function(w) {
|
|
412
|
+
return w && w.exact ? i : new RegExp("(?:" + e(w) + r + e(w) + ")|(?:" + e(w) + s + e(w) + ")", "g");
|
|
413
413
|
};
|
|
414
414
|
u.v4 = function(b) {
|
|
415
415
|
return b && b.exact ? o : new RegExp("" + e(b) + r + e(b), "g");
|
|
416
416
|
}, u.v6 = function(b) {
|
|
417
417
|
return b && b.exact ? a : new RegExp("" + e(b) + s + e(b), "g");
|
|
418
418
|
};
|
|
419
|
-
var h = "(?:(?:[a-z]+:)?//)", l = "(?:\\S+(?::\\S*)?@)?", c = u.v4().source,
|
|
420
|
-
return
|
|
421
|
-
},
|
|
419
|
+
var h = "(?:(?:[a-z]+:)?//)", l = "(?:\\S+(?::\\S*)?@)?", c = u.v4().source, f = u.v6().source, v = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", m = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", d = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", g = "(?::\\d{2,5})?", y = '(?:[/?#][^\\s"]*)?', O = "(?:" + h + "|www\\.)" + l + "(?:localhost|" + c + "|" + f + "|" + v + m + d + ")" + g + y;
|
|
420
|
+
return me = new RegExp("(?:^" + O + "$)", "i"), me;
|
|
421
|
+
}, yt = {
|
|
422
422
|
// http://emailregex.com/
|
|
423
423
|
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
|
|
424
424
|
// url: new RegExp(
|
|
@@ -426,12 +426,12 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
426
426
|
// 'i',
|
|
427
427
|
// ),
|
|
428
428
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
429
|
-
},
|
|
429
|
+
}, ae = {
|
|
430
430
|
integer: function(e) {
|
|
431
|
-
return
|
|
431
|
+
return ae.number(e) && parseInt(e, 10) === e;
|
|
432
432
|
},
|
|
433
433
|
float: function(e) {
|
|
434
|
-
return
|
|
434
|
+
return ae.number(e) && !ae.integer(e);
|
|
435
435
|
},
|
|
436
436
|
array: function(e) {
|
|
437
437
|
return Array.isArray(e);
|
|
@@ -452,35 +452,35 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
452
452
|
return isNaN(e) ? !1 : typeof e == "number";
|
|
453
453
|
},
|
|
454
454
|
object: function(e) {
|
|
455
|
-
return typeof e == "object" && !
|
|
455
|
+
return typeof e == "object" && !ae.array(e);
|
|
456
456
|
},
|
|
457
457
|
method: function(e) {
|
|
458
458
|
return typeof e == "function";
|
|
459
459
|
},
|
|
460
460
|
email: function(e) {
|
|
461
|
-
return typeof e == "string" && e.length <= 320 && !!e.match(
|
|
461
|
+
return typeof e == "string" && e.length <= 320 && !!e.match(yt.email);
|
|
462
462
|
},
|
|
463
463
|
url: function(e) {
|
|
464
|
-
return typeof e == "string" && e.length <= 2048 && !!e.match(
|
|
464
|
+
return typeof e == "string" && e.length <= 2048 && !!e.match(tn());
|
|
465
465
|
},
|
|
466
466
|
hex: function(e) {
|
|
467
|
-
return typeof e == "string" && !!e.match(
|
|
467
|
+
return typeof e == "string" && !!e.match(yt.hex);
|
|
468
468
|
}
|
|
469
|
-
},
|
|
469
|
+
}, rn = function(e, r, n, s, i) {
|
|
470
470
|
if (e.required && r === void 0) {
|
|
471
|
-
|
|
471
|
+
Kt(e, r, n, s, i);
|
|
472
472
|
return;
|
|
473
473
|
}
|
|
474
474
|
var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], a = e.type;
|
|
475
|
-
o.indexOf(a) > -1 ?
|
|
476
|
-
},
|
|
477
|
-
var o = typeof e.len == "number", a = typeof e.min == "number", u = typeof e.max == "number", h = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, l = r, c = null,
|
|
478
|
-
if (
|
|
475
|
+
o.indexOf(a) > -1 ? ae[a](r) || s.push(x(i.messages.types[a], e.fullField, e.type)) : a && typeof r !== e.type && s.push(x(i.messages.types[a], e.fullField, e.type));
|
|
476
|
+
}, nn = function(e, r, n, s, i) {
|
|
477
|
+
var o = typeof e.len == "number", a = typeof e.min == "number", u = typeof e.max == "number", h = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, l = r, c = null, f = typeof r == "number", v = typeof r == "string", m = Array.isArray(r);
|
|
478
|
+
if (f ? c = "number" : v ? c = "string" : m && (c = "array"), !c)
|
|
479
479
|
return !1;
|
|
480
480
|
m && (l = r.length), v && (l = r.replace(h, "_").length), o ? l !== e.len && s.push(x(i.messages[c].len, e.fullField, e.len)) : a && !u && l < e.min ? s.push(x(i.messages[c].min, e.fullField, e.min)) : u && !a && l > e.max ? s.push(x(i.messages[c].max, e.fullField, e.max)) : a && u && (l < e.min || l > e.max) && s.push(x(i.messages[c].range, e.fullField, e.min, e.max));
|
|
481
|
-
},
|
|
482
|
-
e[
|
|
483
|
-
},
|
|
481
|
+
}, X = "enum", sn = function(e, r, n, s, i) {
|
|
482
|
+
e[X] = Array.isArray(e[X]) ? e[X] : [], e[X].indexOf(r) === -1 && s.push(x(i.messages[X], e.fullField, e[X].join(", ")));
|
|
483
|
+
}, on = function(e, r, n, s, i) {
|
|
484
484
|
if (e.pattern) {
|
|
485
485
|
if (e.pattern instanceof RegExp)
|
|
486
486
|
e.pattern.lastIndex = 0, e.pattern.test(r) || s.push(x(i.messages.pattern.mismatch, e.fullField, r, e.pattern));
|
|
@@ -490,13 +490,13 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
}, S = {
|
|
493
|
-
required:
|
|
494
|
-
whitespace:
|
|
495
|
-
type:
|
|
496
|
-
range:
|
|
497
|
-
enum:
|
|
498
|
-
pattern:
|
|
499
|
-
},
|
|
493
|
+
required: Kt,
|
|
494
|
+
whitespace: en,
|
|
495
|
+
type: rn,
|
|
496
|
+
range: nn,
|
|
497
|
+
enum: sn,
|
|
498
|
+
pattern: on
|
|
499
|
+
}, an = function(e, r, n, s, i) {
|
|
500
500
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
501
501
|
if (a) {
|
|
502
502
|
if (C(r, "string") && !e.required)
|
|
@@ -504,7 +504,7 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
504
504
|
S.required(e, r, s, o, i, "string"), C(r, "string") || (S.type(e, r, s, o, i), S.range(e, r, s, o, i), S.pattern(e, r, s, o, i), e.whitespace === !0 && S.whitespace(e, r, s, o, i));
|
|
505
505
|
}
|
|
506
506
|
n(o);
|
|
507
|
-
},
|
|
507
|
+
}, un = function(e, r, n, s, i) {
|
|
508
508
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
509
509
|
if (a) {
|
|
510
510
|
if (C(r) && !e.required)
|
|
@@ -512,7 +512,7 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
512
512
|
S.required(e, r, s, o, i), r !== void 0 && S.type(e, r, s, o, i);
|
|
513
513
|
}
|
|
514
514
|
n(o);
|
|
515
|
-
},
|
|
515
|
+
}, cn = function(e, r, n, s, i) {
|
|
516
516
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
517
517
|
if (a) {
|
|
518
518
|
if (r === "" && (r = void 0), C(r) && !e.required)
|
|
@@ -520,7 +520,7 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
520
520
|
S.required(e, r, s, o, i), r !== void 0 && (S.type(e, r, s, o, i), S.range(e, r, s, o, i));
|
|
521
521
|
}
|
|
522
522
|
n(o);
|
|
523
|
-
},
|
|
523
|
+
}, ln = function(e, r, n, s, i) {
|
|
524
524
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
525
525
|
if (a) {
|
|
526
526
|
if (C(r) && !e.required)
|
|
@@ -528,7 +528,7 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
528
528
|
S.required(e, r, s, o, i), r !== void 0 && S.type(e, r, s, o, i);
|
|
529
529
|
}
|
|
530
530
|
n(o);
|
|
531
|
-
},
|
|
531
|
+
}, fn = function(e, r, n, s, i) {
|
|
532
532
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
533
533
|
if (a) {
|
|
534
534
|
if (C(r) && !e.required)
|
|
@@ -536,7 +536,7 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
536
536
|
S.required(e, r, s, o, i), C(r) || S.type(e, r, s, o, i);
|
|
537
537
|
}
|
|
538
538
|
n(o);
|
|
539
|
-
},
|
|
539
|
+
}, hn = function(e, r, n, s, i) {
|
|
540
540
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
541
541
|
if (a) {
|
|
542
542
|
if (C(r) && !e.required)
|
|
@@ -544,7 +544,7 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
544
544
|
S.required(e, r, s, o, i), r !== void 0 && (S.type(e, r, s, o, i), S.range(e, r, s, o, i));
|
|
545
545
|
}
|
|
546
546
|
n(o);
|
|
547
|
-
},
|
|
547
|
+
}, dn = function(e, r, n, s, i) {
|
|
548
548
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
549
549
|
if (a) {
|
|
550
550
|
if (C(r) && !e.required)
|
|
@@ -552,7 +552,7 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
552
552
|
S.required(e, r, s, o, i), r !== void 0 && (S.type(e, r, s, o, i), S.range(e, r, s, o, i));
|
|
553
553
|
}
|
|
554
554
|
n(o);
|
|
555
|
-
},
|
|
555
|
+
}, pn = function(e, r, n, s, i) {
|
|
556
556
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
557
557
|
if (a) {
|
|
558
558
|
if (r == null && !e.required)
|
|
@@ -560,7 +560,7 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
560
560
|
S.required(e, r, s, o, i, "array"), r != null && (S.type(e, r, s, o, i), S.range(e, r, s, o, i));
|
|
561
561
|
}
|
|
562
562
|
n(o);
|
|
563
|
-
},
|
|
563
|
+
}, yn = function(e, r, n, s, i) {
|
|
564
564
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
565
565
|
if (a) {
|
|
566
566
|
if (C(r) && !e.required)
|
|
@@ -568,15 +568,15 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
568
568
|
S.required(e, r, s, o, i), r !== void 0 && S.type(e, r, s, o, i);
|
|
569
569
|
}
|
|
570
570
|
n(o);
|
|
571
|
-
},
|
|
571
|
+
}, mn = "enum", gn = function(e, r, n, s, i) {
|
|
572
572
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
573
573
|
if (a) {
|
|
574
574
|
if (C(r) && !e.required)
|
|
575
575
|
return n();
|
|
576
|
-
S.required(e, r, s, o, i), r !== void 0 && S[
|
|
576
|
+
S.required(e, r, s, o, i), r !== void 0 && S[mn](e, r, s, o, i);
|
|
577
577
|
}
|
|
578
578
|
n(o);
|
|
579
|
-
},
|
|
579
|
+
}, vn = function(e, r, n, s, i) {
|
|
580
580
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
581
581
|
if (a) {
|
|
582
582
|
if (C(r, "string") && !e.required)
|
|
@@ -584,7 +584,7 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
584
584
|
S.required(e, r, s, o, i), C(r, "string") || S.pattern(e, r, s, o, i);
|
|
585
585
|
}
|
|
586
586
|
n(o);
|
|
587
|
-
},
|
|
587
|
+
}, bn = function(e, r, n, s, i) {
|
|
588
588
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
589
589
|
if (a) {
|
|
590
590
|
if (C(r, "date") && !e.required)
|
|
@@ -595,7 +595,7 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
597
|
n(o);
|
|
598
|
-
},
|
|
598
|
+
}, On = function(e, r, n, s, i) {
|
|
599
599
|
var o = [], a = Array.isArray(r) ? "array" : typeof r;
|
|
600
600
|
S.required(e, r, s, o, i, a), n(o);
|
|
601
601
|
}, Pe = function(e, r, n, s, i) {
|
|
@@ -606,7 +606,7 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
606
606
|
S.required(e, r, s, a, i, o), C(r, o) || S.type(e, r, s, a, i);
|
|
607
607
|
}
|
|
608
608
|
n(a);
|
|
609
|
-
},
|
|
609
|
+
}, wn = function(e, r, n, s, i) {
|
|
610
610
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
611
611
|
if (a) {
|
|
612
612
|
if (C(r) && !e.required)
|
|
@@ -614,26 +614,26 @@ var Gt = function(e, r, n, s, i, o) {
|
|
|
614
614
|
S.required(e, r, s, o, i);
|
|
615
615
|
}
|
|
616
616
|
n(o);
|
|
617
|
-
},
|
|
618
|
-
string:
|
|
619
|
-
method:
|
|
620
|
-
number:
|
|
621
|
-
boolean:
|
|
622
|
-
regexp:
|
|
623
|
-
integer:
|
|
624
|
-
float:
|
|
625
|
-
array:
|
|
626
|
-
object:
|
|
627
|
-
enum:
|
|
628
|
-
pattern:
|
|
629
|
-
date:
|
|
617
|
+
}, ue = {
|
|
618
|
+
string: an,
|
|
619
|
+
method: un,
|
|
620
|
+
number: cn,
|
|
621
|
+
boolean: ln,
|
|
622
|
+
regexp: fn,
|
|
623
|
+
integer: hn,
|
|
624
|
+
float: dn,
|
|
625
|
+
array: pn,
|
|
626
|
+
object: yn,
|
|
627
|
+
enum: gn,
|
|
628
|
+
pattern: vn,
|
|
629
|
+
date: bn,
|
|
630
630
|
url: Pe,
|
|
631
631
|
hex: Pe,
|
|
632
632
|
email: Pe,
|
|
633
|
-
required:
|
|
634
|
-
any:
|
|
633
|
+
required: On,
|
|
634
|
+
any: wn
|
|
635
635
|
};
|
|
636
|
-
function
|
|
636
|
+
function je() {
|
|
637
637
|
return {
|
|
638
638
|
default: "Validation error on field %s",
|
|
639
639
|
required: "%s is required",
|
|
@@ -686,9 +686,9 @@ function ke() {
|
|
|
686
686
|
}
|
|
687
687
|
};
|
|
688
688
|
}
|
|
689
|
-
var
|
|
689
|
+
var ke = je(), ee = /* @__PURE__ */ function() {
|
|
690
690
|
function t(r) {
|
|
691
|
-
this.rules = null, this._messages =
|
|
691
|
+
this.rules = null, this._messages = ke, this.define(r);
|
|
692
692
|
}
|
|
693
693
|
var e = t.prototype;
|
|
694
694
|
return e.define = function(n) {
|
|
@@ -702,7 +702,7 @@ var je = ke(), Z = /* @__PURE__ */ function() {
|
|
|
702
702
|
s.rules[i] = Array.isArray(o) ? o : [o];
|
|
703
703
|
});
|
|
704
704
|
}, e.messages = function(n) {
|
|
705
|
-
return n && (this._messages =
|
|
705
|
+
return n && (this._messages = pt(je(), n)), this._messages;
|
|
706
706
|
}, e.validate = function(n, s, i) {
|
|
707
707
|
var o = this;
|
|
708
708
|
s === void 0 && (s = {}), i === void 0 && (i = function() {
|
|
@@ -710,133 +710,133 @@ var je = ke(), Z = /* @__PURE__ */ function() {
|
|
|
710
710
|
var a = n, u = s, h = i;
|
|
711
711
|
if (typeof u == "function" && (h = u, u = {}), !this.rules || Object.keys(this.rules).length === 0)
|
|
712
712
|
return h && h(null, a), Promise.resolve(a);
|
|
713
|
-
function l(
|
|
713
|
+
function l(d) {
|
|
714
714
|
var g = [], y = {};
|
|
715
|
-
function w
|
|
716
|
-
if (Array.isArray(
|
|
715
|
+
function O(w) {
|
|
716
|
+
if (Array.isArray(w)) {
|
|
717
717
|
var P;
|
|
718
|
-
g = (P = g).concat.apply(P,
|
|
718
|
+
g = (P = g).concat.apply(P, w);
|
|
719
719
|
} else
|
|
720
|
-
g.push(
|
|
720
|
+
g.push(w);
|
|
721
721
|
}
|
|
722
|
-
for (var b = 0; b <
|
|
723
|
-
|
|
722
|
+
for (var b = 0; b < d.length; b++)
|
|
723
|
+
O(d[b]);
|
|
724
724
|
g.length ? (y = Qe(g), h(g, y)) : h(null, a);
|
|
725
725
|
}
|
|
726
726
|
if (u.messages) {
|
|
727
727
|
var c = this.messages();
|
|
728
|
-
c ===
|
|
728
|
+
c === ke && (c = je()), pt(c, u.messages), u.messages = c;
|
|
729
729
|
} else
|
|
730
730
|
u.messages = this.messages();
|
|
731
|
-
var
|
|
732
|
-
v.forEach(function(
|
|
733
|
-
var g = o.rules[
|
|
734
|
-
g.forEach(function(
|
|
735
|
-
var b =
|
|
736
|
-
typeof b.transform == "function" && (a === n && (a = K({}, a)), y = a[
|
|
731
|
+
var f = {}, v = u.keys || Object.keys(this.rules);
|
|
732
|
+
v.forEach(function(d) {
|
|
733
|
+
var g = o.rules[d], y = a[d];
|
|
734
|
+
g.forEach(function(O) {
|
|
735
|
+
var b = O;
|
|
736
|
+
typeof b.transform == "function" && (a === n && (a = K({}, a)), y = a[d] = b.transform(y)), typeof b == "function" ? b = {
|
|
737
737
|
validator: b
|
|
738
|
-
} : b = K({}, b), b.validator = o.getValidationMethod(b), b.validator && (b.field =
|
|
738
|
+
} : b = K({}, b), b.validator = o.getValidationMethod(b), b.validator && (b.field = d, b.fullField = b.fullField || d, b.type = o.getType(b), f[d] = f[d] || [], f[d].push({
|
|
739
739
|
rule: b,
|
|
740
740
|
value: y,
|
|
741
741
|
source: a,
|
|
742
|
-
field:
|
|
742
|
+
field: d
|
|
743
743
|
}));
|
|
744
744
|
});
|
|
745
745
|
});
|
|
746
746
|
var m = {};
|
|
747
|
-
return
|
|
748
|
-
var y =
|
|
749
|
-
|
|
750
|
-
function b(R,
|
|
751
|
-
return K({},
|
|
747
|
+
return Xr(f, u, function(d, g) {
|
|
748
|
+
var y = d.rule, O = (y.type === "object" || y.type === "array") && (typeof y.fields == "object" || typeof y.defaultField == "object");
|
|
749
|
+
O = O && (y.required || !y.required && d.value), y.field = d.field;
|
|
750
|
+
function b(R, U) {
|
|
751
|
+
return K({}, U, {
|
|
752
752
|
fullField: y.fullField + "." + R,
|
|
753
753
|
fullFields: y.fullFields ? [].concat(y.fullFields, [R]) : [R]
|
|
754
754
|
});
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function w(R) {
|
|
757
757
|
R === void 0 && (R = []);
|
|
758
|
-
var
|
|
759
|
-
!u.suppressWarning &&
|
|
760
|
-
var
|
|
761
|
-
if (u.first &&
|
|
762
|
-
return m[y.field] = 1, g(
|
|
763
|
-
if (!
|
|
764
|
-
g(
|
|
758
|
+
var U = Array.isArray(R) ? R : [R];
|
|
759
|
+
!u.suppressWarning && U.length && t.warning("async-validator:", U), U.length && y.message !== void 0 && (U = [].concat(y.message));
|
|
760
|
+
var I = U.map(dt(y, a));
|
|
761
|
+
if (u.first && I.length)
|
|
762
|
+
return m[y.field] = 1, g(I);
|
|
763
|
+
if (!O)
|
|
764
|
+
g(I);
|
|
765
765
|
else {
|
|
766
|
-
if (y.required && !
|
|
767
|
-
return y.message !== void 0 ?
|
|
768
|
-
var
|
|
769
|
-
y.defaultField && Object.keys(
|
|
770
|
-
|
|
771
|
-
}),
|
|
772
|
-
var
|
|
773
|
-
Object.keys(
|
|
774
|
-
var
|
|
775
|
-
|
|
766
|
+
if (y.required && !d.value)
|
|
767
|
+
return y.message !== void 0 ? I = [].concat(y.message).map(dt(y, a)) : u.error && (I = [u.error(y, x(u.messages.required, y.field))]), g(I);
|
|
768
|
+
var ie = {};
|
|
769
|
+
y.defaultField && Object.keys(d.value).map(function(L) {
|
|
770
|
+
ie[L] = y.defaultField;
|
|
771
|
+
}), ie = K({}, ie, d.rule.fields);
|
|
772
|
+
var ut = {};
|
|
773
|
+
Object.keys(ie).forEach(function(L) {
|
|
774
|
+
var M = ie[L], _r = Array.isArray(M) ? M : [M];
|
|
775
|
+
ut[L] = _r.map(b.bind(null, L));
|
|
776
776
|
});
|
|
777
|
-
var
|
|
778
|
-
|
|
779
|
-
var
|
|
780
|
-
|
|
777
|
+
var ct = new t(ut);
|
|
778
|
+
ct.messages(u.messages), d.rule.options && (d.rule.options.messages = u.messages, d.rule.options.error = u.error), ct.validate(d.value, d.rule.options || u, function(L) {
|
|
779
|
+
var M = [];
|
|
780
|
+
I && I.length && M.push.apply(M, I), L && L.length && M.push.apply(M, L), g(M.length ? M : null);
|
|
781
781
|
});
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
var P;
|
|
785
785
|
if (y.asyncValidator)
|
|
786
|
-
P = y.asyncValidator(y,
|
|
786
|
+
P = y.asyncValidator(y, d.value, w, d.source, u);
|
|
787
787
|
else if (y.validator) {
|
|
788
788
|
try {
|
|
789
|
-
P = y.validator(y,
|
|
789
|
+
P = y.validator(y, d.value, w, d.source, u);
|
|
790
790
|
} catch (R) {
|
|
791
791
|
console.error?.(R), u.suppressValidatorError || setTimeout(function() {
|
|
792
792
|
throw R;
|
|
793
|
-
}, 0),
|
|
793
|
+
}, 0), w(R.message);
|
|
794
794
|
}
|
|
795
|
-
P === !0 ?
|
|
795
|
+
P === !0 ? w() : P === !1 ? w(typeof y.message == "function" ? y.message(y.fullField || y.field) : y.message || (y.fullField || y.field) + " fails") : P instanceof Array ? w(P) : P instanceof Error && w(P.message);
|
|
796
796
|
}
|
|
797
797
|
P && P.then && P.then(function() {
|
|
798
|
-
return
|
|
798
|
+
return w();
|
|
799
799
|
}, function(R) {
|
|
800
|
-
return
|
|
800
|
+
return w(R);
|
|
801
801
|
});
|
|
802
|
-
}, function(
|
|
803
|
-
l(
|
|
802
|
+
}, function(d) {
|
|
803
|
+
l(d);
|
|
804
804
|
}, a);
|
|
805
805
|
}, e.getType = function(n) {
|
|
806
|
-
if (n.type === void 0 && n.pattern instanceof RegExp && (n.type = "pattern"), typeof n.validator != "function" && n.type && !
|
|
806
|
+
if (n.type === void 0 && n.pattern instanceof RegExp && (n.type = "pattern"), typeof n.validator != "function" && n.type && !ue.hasOwnProperty(n.type))
|
|
807
807
|
throw new Error(x("Unknown rule type %s", n.type));
|
|
808
808
|
return n.type || "string";
|
|
809
809
|
}, e.getValidationMethod = function(n) {
|
|
810
810
|
if (typeof n.validator == "function")
|
|
811
811
|
return n.validator;
|
|
812
812
|
var s = Object.keys(n), i = s.indexOf("message");
|
|
813
|
-
return i !== -1 && s.splice(i, 1), s.length === 1 && s[0] === "required" ?
|
|
813
|
+
return i !== -1 && s.splice(i, 1), s.length === 1 && s[0] === "required" ? ue.required : ue[this.getType(n)] || void 0;
|
|
814
814
|
}, t;
|
|
815
815
|
}();
|
|
816
|
-
|
|
816
|
+
ee.register = function(e, r) {
|
|
817
817
|
if (typeof r != "function")
|
|
818
818
|
throw new Error("Cannot register a validator by type, validator is not a function");
|
|
819
|
-
|
|
819
|
+
ue[e] = r;
|
|
820
820
|
};
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
const
|
|
825
|
-
function
|
|
821
|
+
ee.warning = $t;
|
|
822
|
+
ee.messages = ke;
|
|
823
|
+
ee.validators = ue;
|
|
824
|
+
const En = ee.default || ee;
|
|
825
|
+
function Sn(t, e, r = {}) {
|
|
826
826
|
const {
|
|
827
827
|
validateOption: n = {},
|
|
828
828
|
immediate: s = !0,
|
|
829
829
|
manual: i = !1
|
|
830
|
-
} = r, o =
|
|
830
|
+
} = r, o = Br(t), a = Ir(null), u = B(!0), h = B(!s || i), l = $(() => {
|
|
831
831
|
var g;
|
|
832
832
|
return ((g = a.value) == null ? void 0 : g.errors) || [];
|
|
833
833
|
}), c = $(() => {
|
|
834
834
|
var g;
|
|
835
835
|
return ((g = a.value) == null ? void 0 : g.fields) || {};
|
|
836
|
-
}),
|
|
836
|
+
}), f = $(() => new En(Z(e))), v = async () => {
|
|
837
837
|
u.value = !1, h.value = !1;
|
|
838
838
|
try {
|
|
839
|
-
await
|
|
839
|
+
await f.value.validate(o.value, n), h.value = !0, a.value = null;
|
|
840
840
|
} catch (g) {
|
|
841
841
|
a.value = g;
|
|
842
842
|
} finally {
|
|
@@ -849,8 +849,8 @@ function Rn(t, e, r = {}) {
|
|
|
849
849
|
errorFields: c.value
|
|
850
850
|
};
|
|
851
851
|
};
|
|
852
|
-
i ||
|
|
853
|
-
[o,
|
|
852
|
+
i || Q(
|
|
853
|
+
[o, f],
|
|
854
854
|
() => v(),
|
|
855
855
|
{ immediate: s, deep: !0 }
|
|
856
856
|
);
|
|
@@ -862,20 +862,20 @@ function Rn(t, e, r = {}) {
|
|
|
862
862
|
errorFields: c,
|
|
863
863
|
execute: v
|
|
864
864
|
};
|
|
865
|
-
function
|
|
865
|
+
function d() {
|
|
866
866
|
return new Promise((g, y) => {
|
|
867
|
-
|
|
867
|
+
Hr(u).toBe(!0).then(() => g(m)).catch((O) => y(O));
|
|
868
868
|
});
|
|
869
869
|
}
|
|
870
870
|
return {
|
|
871
871
|
...m,
|
|
872
872
|
then(g, y) {
|
|
873
|
-
return
|
|
873
|
+
return d().then(g, y);
|
|
874
874
|
}
|
|
875
875
|
};
|
|
876
876
|
}
|
|
877
|
-
function
|
|
878
|
-
const { errorFields: r, isFinished: n, pass: s } =
|
|
877
|
+
function ki(t, e) {
|
|
878
|
+
const { errorFields: r, isFinished: n, pass: s } = Sn(t, e, {
|
|
879
879
|
validateOption: { suppressWarning: !0 }
|
|
880
880
|
}), i = B(0);
|
|
881
881
|
function o() {
|
|
@@ -891,43 +891,43 @@ function Vi(t, e) {
|
|
|
891
891
|
isValid: o
|
|
892
892
|
};
|
|
893
893
|
}
|
|
894
|
-
const
|
|
895
|
-
function
|
|
896
|
-
|
|
894
|
+
const Wt = B(!1), An = Ee(Wt);
|
|
895
|
+
function Rn(t) {
|
|
896
|
+
Wt.value = t;
|
|
897
897
|
}
|
|
898
|
-
function
|
|
899
|
-
|
|
898
|
+
function Fn(t, e, r) {
|
|
899
|
+
Cn(r), e(), window.location.href = t;
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function Pn(t, e) {
|
|
902
902
|
document.cookie = `${e}=${t};Secure;samesite=strict;`;
|
|
903
903
|
}
|
|
904
|
-
function
|
|
904
|
+
function Li(t) {
|
|
905
905
|
const { [t]: e } = Object.fromEntries(document.cookie.split("; ").map((r) => r.split("=")));
|
|
906
906
|
return e;
|
|
907
907
|
}
|
|
908
|
-
function
|
|
908
|
+
function Cn(t) {
|
|
909
909
|
document.cookie = `${t}=;expires=${(/* @__PURE__ */ new Date(0)).toUTCString()}`;
|
|
910
910
|
}
|
|
911
|
-
function
|
|
912
|
-
const t =
|
|
911
|
+
function Bi() {
|
|
912
|
+
const t = Vt();
|
|
913
913
|
function e(n, s, i, o) {
|
|
914
|
-
|
|
914
|
+
Pn(n, o), i(n), Rn(!0), t.push(s);
|
|
915
915
|
}
|
|
916
916
|
function r(n) {
|
|
917
|
-
|
|
917
|
+
An.value && t.push(n);
|
|
918
918
|
}
|
|
919
919
|
return {
|
|
920
920
|
auth: e,
|
|
921
921
|
redirectIfAuth: r
|
|
922
922
|
};
|
|
923
923
|
}
|
|
924
|
-
function
|
|
925
|
-
return structuredClone(
|
|
924
|
+
function Hi(t) {
|
|
925
|
+
return structuredClone(Mr(t));
|
|
926
926
|
}
|
|
927
|
-
function
|
|
927
|
+
function Vi(t) {
|
|
928
928
|
return t ? new Intl.DateTimeFormat().format(new Date(t)) : "-";
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function $i(t) {
|
|
931
931
|
return t ? new Intl.DateTimeFormat(void 0, {
|
|
932
932
|
year: "numeric",
|
|
933
933
|
month: "numeric",
|
|
@@ -936,54 +936,54 @@ function Gi(t) {
|
|
|
936
936
|
minute: "numeric"
|
|
937
937
|
}).format(new Date(t)) : "-";
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Ki() {
|
|
940
940
|
return `temp-${crypto.randomUUID()}`;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function Wi(t) {
|
|
943
943
|
return t.map((e) => (e._id?.includes("temp") && delete e._id, e));
|
|
944
944
|
}
|
|
945
|
-
function
|
|
945
|
+
function zi(t) {
|
|
946
946
|
return t.map((e) => (delete e._id, e));
|
|
947
947
|
}
|
|
948
|
-
const
|
|
948
|
+
const Gi = {
|
|
949
949
|
required: !0,
|
|
950
950
|
message: "This field is required"
|
|
951
|
-
},
|
|
951
|
+
}, Ji = {
|
|
952
952
|
type: "email",
|
|
953
953
|
message: "This is not correct email"
|
|
954
954
|
};
|
|
955
|
-
function
|
|
955
|
+
function zt(t, e) {
|
|
956
956
|
return function() {
|
|
957
957
|
return t.apply(e, arguments);
|
|
958
958
|
};
|
|
959
959
|
}
|
|
960
|
-
const { toString:
|
|
961
|
-
const r =
|
|
960
|
+
const { toString: Tn } = Object.prototype, { getPrototypeOf: tt } = Object, Se = /* @__PURE__ */ ((t) => (e) => {
|
|
961
|
+
const r = Tn.call(e);
|
|
962
962
|
return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
|
|
963
|
-
})(/* @__PURE__ */ Object.create(null)), k = (t) => (t = t.toLowerCase(), (e) =>
|
|
964
|
-
function
|
|
965
|
-
return t !== null && !
|
|
963
|
+
})(/* @__PURE__ */ Object.create(null)), k = (t) => (t = t.toLowerCase(), (e) => Se(e) === t), Ae = (t) => (e) => typeof e === t, { isArray: ne } = Array, le = Ae("undefined");
|
|
964
|
+
function qn(t) {
|
|
965
|
+
return t !== null && !le(t) && t.constructor !== null && !le(t.constructor) && _(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
966
966
|
}
|
|
967
|
-
const
|
|
968
|
-
function
|
|
967
|
+
const Gt = k("ArrayBuffer");
|
|
968
|
+
function xn(t) {
|
|
969
969
|
let e;
|
|
970
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
970
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Gt(t.buffer), e;
|
|
971
971
|
}
|
|
972
|
-
const
|
|
973
|
-
if (
|
|
972
|
+
const Dn = Ae("string"), _ = Ae("function"), Jt = Ae("number"), Re = (t) => t !== null && typeof t == "object", _n = (t) => t === !0 || t === !1, be = (t) => {
|
|
973
|
+
if (Se(t) !== "object")
|
|
974
974
|
return !1;
|
|
975
975
|
const e = tt(t);
|
|
976
976
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
|
|
977
|
-
},
|
|
977
|
+
}, Nn = k("Date"), Un = k("File"), In = k("Blob"), Mn = k("FileList"), Qn = (t) => Re(t) && _(t.pipe), jn = (t) => {
|
|
978
978
|
let e;
|
|
979
|
-
return t && (typeof FormData == "function" && t instanceof FormData || _(t.append) && ((e =
|
|
979
|
+
return t && (typeof FormData == "function" && t instanceof FormData || _(t.append) && ((e = Se(t)) === "formdata" || // detect form-data instance
|
|
980
980
|
e === "object" && _(t.toString) && t.toString() === "[object FormData]"));
|
|
981
|
-
},
|
|
982
|
-
function
|
|
981
|
+
}, kn = k("URLSearchParams"), Ln = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
982
|
+
function de(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
983
983
|
if (t === null || typeof t > "u")
|
|
984
984
|
return;
|
|
985
985
|
let n, s;
|
|
986
|
-
if (typeof t != "object" && (t = [t]),
|
|
986
|
+
if (typeof t != "object" && (t = [t]), ne(t))
|
|
987
987
|
for (n = 0, s = t.length; n < s; n++)
|
|
988
988
|
e.call(null, t[n], n, t);
|
|
989
989
|
else {
|
|
@@ -993,7 +993,7 @@ function he(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
|
993
993
|
a = i[n], e.call(null, t[a], a, t);
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
|
-
function
|
|
996
|
+
function Xt(t, e) {
|
|
997
997
|
e = e.toLowerCase();
|
|
998
998
|
const r = Object.keys(t);
|
|
999
999
|
let n = r.length, s;
|
|
@@ -1002,23 +1002,23 @@ function er(t, e) {
|
|
|
1002
1002
|
return s;
|
|
1003
1003
|
return null;
|
|
1004
1004
|
}
|
|
1005
|
-
const
|
|
1005
|
+
const Yt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Zt = (t) => !le(t) && t !== Yt;
|
|
1006
1006
|
function Le() {
|
|
1007
|
-
const { caseless: t } =
|
|
1008
|
-
const i = t &&
|
|
1009
|
-
|
|
1007
|
+
const { caseless: t } = Zt(this) && this || {}, e = {}, r = (n, s) => {
|
|
1008
|
+
const i = t && Xt(e, s) || s;
|
|
1009
|
+
be(e[i]) && be(n) ? e[i] = Le(e[i], n) : be(n) ? e[i] = Le({}, n) : ne(n) ? e[i] = n.slice() : e[i] = n;
|
|
1010
1010
|
};
|
|
1011
1011
|
for (let n = 0, s = arguments.length; n < s; n++)
|
|
1012
|
-
arguments[n] &&
|
|
1012
|
+
arguments[n] && de(arguments[n], r);
|
|
1013
1013
|
return e;
|
|
1014
1014
|
}
|
|
1015
|
-
const
|
|
1016
|
-
r && _(s) ? t[i] =
|
|
1017
|
-
}, { allOwnKeys: n }), t),
|
|
1015
|
+
const Bn = (t, e, r, { allOwnKeys: n } = {}) => (de(e, (s, i) => {
|
|
1016
|
+
r && _(s) ? t[i] = zt(s, r) : t[i] = s;
|
|
1017
|
+
}, { allOwnKeys: n }), t), Hn = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Vn = (t, e, r, n) => {
|
|
1018
1018
|
t.prototype = Object.create(e.prototype, n), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
1019
1019
|
value: e.prototype
|
|
1020
1020
|
}), r && Object.assign(t.prototype, r);
|
|
1021
|
-
},
|
|
1021
|
+
}, $n = (t, e, r, n) => {
|
|
1022
1022
|
let s, i, o;
|
|
1023
1023
|
const a = {};
|
|
1024
1024
|
if (e = e || {}, t == null)
|
|
@@ -1029,48 +1029,48 @@ const Vn = (t, e, r, { allOwnKeys: n } = {}) => (he(e, (s, i) => {
|
|
|
1029
1029
|
t = r !== !1 && tt(t);
|
|
1030
1030
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
1031
1031
|
return e;
|
|
1032
|
-
},
|
|
1032
|
+
}, Kn = (t, e, r) => {
|
|
1033
1033
|
t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
|
|
1034
1034
|
const n = t.indexOf(e, r);
|
|
1035
1035
|
return n !== -1 && n === r;
|
|
1036
|
-
},
|
|
1036
|
+
}, Wn = (t) => {
|
|
1037
1037
|
if (!t)
|
|
1038
1038
|
return null;
|
|
1039
|
-
if (
|
|
1039
|
+
if (ne(t))
|
|
1040
1040
|
return t;
|
|
1041
1041
|
let e = t.length;
|
|
1042
|
-
if (!
|
|
1042
|
+
if (!Jt(e))
|
|
1043
1043
|
return null;
|
|
1044
1044
|
const r = new Array(e);
|
|
1045
1045
|
for (; e-- > 0; )
|
|
1046
1046
|
r[e] = t[e];
|
|
1047
1047
|
return r;
|
|
1048
|
-
},
|
|
1048
|
+
}, zn = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && tt(Uint8Array)), Gn = (t, e) => {
|
|
1049
1049
|
const n = (t && t[Symbol.iterator]).call(t);
|
|
1050
1050
|
let s;
|
|
1051
1051
|
for (; (s = n.next()) && !s.done; ) {
|
|
1052
1052
|
const i = s.value;
|
|
1053
1053
|
e.call(t, i[0], i[1]);
|
|
1054
1054
|
}
|
|
1055
|
-
},
|
|
1055
|
+
}, Jn = (t, e) => {
|
|
1056
1056
|
let r;
|
|
1057
1057
|
const n = [];
|
|
1058
1058
|
for (; (r = t.exec(e)) !== null; )
|
|
1059
1059
|
n.push(r);
|
|
1060
1060
|
return n;
|
|
1061
|
-
},
|
|
1061
|
+
}, Xn = k("HTMLFormElement"), Yn = (t) => t.toLowerCase().replace(
|
|
1062
1062
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
1063
1063
|
function(r, n, s) {
|
|
1064
1064
|
return n.toUpperCase() + s;
|
|
1065
1065
|
}
|
|
1066
|
-
),
|
|
1066
|
+
), mt = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Zn = k("RegExp"), er = (t, e) => {
|
|
1067
1067
|
const r = Object.getOwnPropertyDescriptors(t), n = {};
|
|
1068
|
-
|
|
1068
|
+
de(r, (s, i) => {
|
|
1069
1069
|
let o;
|
|
1070
1070
|
(o = e(s, i, t)) !== !1 && (n[i] = o || s);
|
|
1071
1071
|
}), Object.defineProperties(t, n);
|
|
1072
|
-
},
|
|
1073
|
-
|
|
1072
|
+
}, es = (t) => {
|
|
1073
|
+
er(t, (e, r) => {
|
|
1074
1074
|
if (_(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
1075
1075
|
return !1;
|
|
1076
1076
|
const n = t[r];
|
|
@@ -1084,98 +1084,98 @@ const Vn = (t, e, r, { allOwnKeys: n } = {}) => (he(e, (s, i) => {
|
|
|
1084
1084
|
});
|
|
1085
1085
|
}
|
|
1086
1086
|
});
|
|
1087
|
-
},
|
|
1087
|
+
}, ts = (t, e) => {
|
|
1088
1088
|
const r = {}, n = (s) => {
|
|
1089
1089
|
s.forEach((i) => {
|
|
1090
1090
|
r[i] = !0;
|
|
1091
1091
|
});
|
|
1092
1092
|
};
|
|
1093
|
-
return
|
|
1094
|
-
},
|
|
1095
|
-
},
|
|
1096
|
-
DIGIT:
|
|
1093
|
+
return ne(t) ? n(t) : n(String(t).split(e)), r;
|
|
1094
|
+
}, rs = () => {
|
|
1095
|
+
}, ns = (t, e) => (t = +t, Number.isFinite(t) ? t : e), Ce = "abcdefghijklmnopqrstuvwxyz", gt = "0123456789", tr = {
|
|
1096
|
+
DIGIT: gt,
|
|
1097
1097
|
ALPHA: Ce,
|
|
1098
|
-
ALPHA_DIGIT: Ce + Ce.toUpperCase() +
|
|
1099
|
-
},
|
|
1098
|
+
ALPHA_DIGIT: Ce + Ce.toUpperCase() + gt
|
|
1099
|
+
}, ss = (t = 16, e = tr.ALPHA_DIGIT) => {
|
|
1100
1100
|
let r = "";
|
|
1101
1101
|
const { length: n } = e;
|
|
1102
1102
|
for (; t--; )
|
|
1103
1103
|
r += e[Math.random() * n | 0];
|
|
1104
1104
|
return r;
|
|
1105
1105
|
};
|
|
1106
|
-
function
|
|
1106
|
+
function is(t) {
|
|
1107
1107
|
return !!(t && _(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]);
|
|
1108
1108
|
}
|
|
1109
|
-
const
|
|
1109
|
+
const os = (t) => {
|
|
1110
1110
|
const e = new Array(10), r = (n, s) => {
|
|
1111
|
-
if (
|
|
1111
|
+
if (Re(n)) {
|
|
1112
1112
|
if (e.indexOf(n) >= 0)
|
|
1113
1113
|
return;
|
|
1114
1114
|
if (!("toJSON" in n)) {
|
|
1115
1115
|
e[s] = n;
|
|
1116
|
-
const i =
|
|
1117
|
-
return
|
|
1116
|
+
const i = ne(n) ? [] : {};
|
|
1117
|
+
return de(n, (o, a) => {
|
|
1118
1118
|
const u = r(o, s + 1);
|
|
1119
|
-
!
|
|
1119
|
+
!le(u) && (i[a] = u);
|
|
1120
1120
|
}), e[s] = void 0, i;
|
|
1121
1121
|
}
|
|
1122
1122
|
}
|
|
1123
1123
|
return n;
|
|
1124
1124
|
};
|
|
1125
1125
|
return r(t, 0);
|
|
1126
|
-
},
|
|
1127
|
-
isArray:
|
|
1128
|
-
isArrayBuffer:
|
|
1129
|
-
isBuffer:
|
|
1130
|
-
isFormData:
|
|
1131
|
-
isArrayBufferView:
|
|
1132
|
-
isString:
|
|
1133
|
-
isNumber:
|
|
1134
|
-
isBoolean:
|
|
1135
|
-
isObject:
|
|
1136
|
-
isPlainObject:
|
|
1137
|
-
isUndefined:
|
|
1138
|
-
isDate:
|
|
1139
|
-
isFile:
|
|
1140
|
-
isBlob:
|
|
1141
|
-
isRegExp:
|
|
1126
|
+
}, as = k("AsyncFunction"), us = (t) => t && (Re(t) || _(t)) && _(t.then) && _(t.catch), p = {
|
|
1127
|
+
isArray: ne,
|
|
1128
|
+
isArrayBuffer: Gt,
|
|
1129
|
+
isBuffer: qn,
|
|
1130
|
+
isFormData: jn,
|
|
1131
|
+
isArrayBufferView: xn,
|
|
1132
|
+
isString: Dn,
|
|
1133
|
+
isNumber: Jt,
|
|
1134
|
+
isBoolean: _n,
|
|
1135
|
+
isObject: Re,
|
|
1136
|
+
isPlainObject: be,
|
|
1137
|
+
isUndefined: le,
|
|
1138
|
+
isDate: Nn,
|
|
1139
|
+
isFile: Un,
|
|
1140
|
+
isBlob: In,
|
|
1141
|
+
isRegExp: Zn,
|
|
1142
1142
|
isFunction: _,
|
|
1143
|
-
isStream:
|
|
1144
|
-
isURLSearchParams:
|
|
1145
|
-
isTypedArray:
|
|
1146
|
-
isFileList:
|
|
1147
|
-
forEach:
|
|
1143
|
+
isStream: Qn,
|
|
1144
|
+
isURLSearchParams: kn,
|
|
1145
|
+
isTypedArray: zn,
|
|
1146
|
+
isFileList: Mn,
|
|
1147
|
+
forEach: de,
|
|
1148
1148
|
merge: Le,
|
|
1149
|
-
extend:
|
|
1150
|
-
trim:
|
|
1151
|
-
stripBOM:
|
|
1152
|
-
inherits:
|
|
1153
|
-
toFlatObject:
|
|
1154
|
-
kindOf:
|
|
1149
|
+
extend: Bn,
|
|
1150
|
+
trim: Ln,
|
|
1151
|
+
stripBOM: Hn,
|
|
1152
|
+
inherits: Vn,
|
|
1153
|
+
toFlatObject: $n,
|
|
1154
|
+
kindOf: Se,
|
|
1155
1155
|
kindOfTest: k,
|
|
1156
|
-
endsWith:
|
|
1157
|
-
toArray:
|
|
1158
|
-
forEachEntry:
|
|
1159
|
-
matchAll:
|
|
1160
|
-
isHTMLForm:
|
|
1161
|
-
hasOwnProperty:
|
|
1162
|
-
hasOwnProp:
|
|
1156
|
+
endsWith: Kn,
|
|
1157
|
+
toArray: Wn,
|
|
1158
|
+
forEachEntry: Gn,
|
|
1159
|
+
matchAll: Jn,
|
|
1160
|
+
isHTMLForm: Xn,
|
|
1161
|
+
hasOwnProperty: mt,
|
|
1162
|
+
hasOwnProp: mt,
|
|
1163
1163
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
1164
|
-
reduceDescriptors:
|
|
1165
|
-
freezeMethods:
|
|
1166
|
-
toObjectSet:
|
|
1167
|
-
toCamelCase:
|
|
1168
|
-
noop:
|
|
1169
|
-
toFiniteNumber:
|
|
1170
|
-
findKey:
|
|
1171
|
-
global:
|
|
1172
|
-
isContextDefined:
|
|
1173
|
-
ALPHABET:
|
|
1174
|
-
generateString:
|
|
1175
|
-
isSpecCompliantForm:
|
|
1176
|
-
toJSONObject:
|
|
1177
|
-
isAsyncFn:
|
|
1178
|
-
isThenable:
|
|
1164
|
+
reduceDescriptors: er,
|
|
1165
|
+
freezeMethods: es,
|
|
1166
|
+
toObjectSet: ts,
|
|
1167
|
+
toCamelCase: Yn,
|
|
1168
|
+
noop: rs,
|
|
1169
|
+
toFiniteNumber: ns,
|
|
1170
|
+
findKey: Xt,
|
|
1171
|
+
global: Yt,
|
|
1172
|
+
isContextDefined: Zt,
|
|
1173
|
+
ALPHABET: tr,
|
|
1174
|
+
generateString: ss,
|
|
1175
|
+
isSpecCompliantForm: is,
|
|
1176
|
+
toJSONObject: os,
|
|
1177
|
+
isAsyncFn: as,
|
|
1178
|
+
isThenable: us
|
|
1179
1179
|
};
|
|
1180
1180
|
function A(t, e, r, n, s) {
|
|
1181
1181
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), n && (this.request = n), s && (this.response = s);
|
|
@@ -1201,7 +1201,7 @@ p.inherits(A, Error, {
|
|
|
1201
1201
|
};
|
|
1202
1202
|
}
|
|
1203
1203
|
});
|
|
1204
|
-
const
|
|
1204
|
+
const rr = A.prototype, nr = {};
|
|
1205
1205
|
[
|
|
1206
1206
|
"ERR_BAD_OPTION_VALUE",
|
|
1207
1207
|
"ERR_BAD_OPTION",
|
|
@@ -1217,43 +1217,43 @@ const ir = A.prototype, or = {};
|
|
|
1217
1217
|
"ERR_INVALID_URL"
|
|
1218
1218
|
// eslint-disable-next-line func-names
|
|
1219
1219
|
].forEach((t) => {
|
|
1220
|
-
|
|
1220
|
+
nr[t] = { value: t };
|
|
1221
1221
|
});
|
|
1222
|
-
Object.defineProperties(A,
|
|
1223
|
-
Object.defineProperty(
|
|
1222
|
+
Object.defineProperties(A, nr);
|
|
1223
|
+
Object.defineProperty(rr, "isAxiosError", { value: !0 });
|
|
1224
1224
|
A.from = (t, e, r, n, s, i) => {
|
|
1225
|
-
const o = Object.create(
|
|
1225
|
+
const o = Object.create(rr);
|
|
1226
1226
|
return p.toFlatObject(t, o, function(u) {
|
|
1227
1227
|
return u !== Error.prototype;
|
|
1228
1228
|
}, (a) => a !== "isAxiosError"), A.call(o, t.message, e, r, n, s), o.cause = t, o.name = t.name, i && Object.assign(o, i), o;
|
|
1229
1229
|
};
|
|
1230
|
-
const
|
|
1230
|
+
const cs = null;
|
|
1231
1231
|
function Be(t) {
|
|
1232
1232
|
return p.isPlainObject(t) || p.isArray(t);
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1234
|
+
function sr(t) {
|
|
1235
1235
|
return p.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1237
|
+
function vt(t, e, r) {
|
|
1238
1238
|
return t ? t.concat(e).map(function(s, i) {
|
|
1239
|
-
return s =
|
|
1239
|
+
return s = sr(s), !r && i ? "[" + s + "]" : s;
|
|
1240
1240
|
}).join(r ? "." : "") : e;
|
|
1241
1241
|
}
|
|
1242
|
-
function
|
|
1242
|
+
function ls(t) {
|
|
1243
1243
|
return p.isArray(t) && !t.some(Be);
|
|
1244
1244
|
}
|
|
1245
|
-
const
|
|
1245
|
+
const fs = p.toFlatObject(p, {}, null, function(e) {
|
|
1246
1246
|
return /^is[A-Z]/.test(e);
|
|
1247
1247
|
});
|
|
1248
|
-
function
|
|
1248
|
+
function Fe(t, e, r) {
|
|
1249
1249
|
if (!p.isObject(t))
|
|
1250
1250
|
throw new TypeError("target must be an object");
|
|
1251
1251
|
e = e || new FormData(), r = p.toFlatObject(r, {
|
|
1252
1252
|
metaTokens: !0,
|
|
1253
1253
|
dots: !1,
|
|
1254
1254
|
indexes: !1
|
|
1255
|
-
}, !1, function(
|
|
1256
|
-
return !p.isUndefined(g[
|
|
1255
|
+
}, !1, function(d, g) {
|
|
1256
|
+
return !p.isUndefined(g[d]);
|
|
1257
1257
|
});
|
|
1258
1258
|
const n = r.metaTokens, s = r.visitor || l, i = r.dots, o = r.indexes, u = (r.Blob || typeof Blob < "u" && Blob) && p.isSpecCompliantForm(e);
|
|
1259
1259
|
if (!p.isFunction(s))
|
|
@@ -1267,39 +1267,39 @@ function Re(t, e, r) {
|
|
|
1267
1267
|
throw new A("Blob is not supported. Use a Buffer instead.");
|
|
1268
1268
|
return p.isArrayBuffer(m) || p.isTypedArray(m) ? u && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
|
|
1269
1269
|
}
|
|
1270
|
-
function l(m,
|
|
1270
|
+
function l(m, d, g) {
|
|
1271
1271
|
let y = m;
|
|
1272
1272
|
if (m && !g && typeof m == "object") {
|
|
1273
|
-
if (p.endsWith(
|
|
1274
|
-
|
|
1275
|
-
else if (p.isArray(m) &&
|
|
1276
|
-
return
|
|
1273
|
+
if (p.endsWith(d, "{}"))
|
|
1274
|
+
d = n ? d : d.slice(0, -2), m = JSON.stringify(m);
|
|
1275
|
+
else if (p.isArray(m) && ls(m) || (p.isFileList(m) || p.endsWith(d, "[]")) && (y = p.toArray(m)))
|
|
1276
|
+
return d = sr(d), y.forEach(function(b, w) {
|
|
1277
1277
|
!(p.isUndefined(b) || b === null) && e.append(
|
|
1278
1278
|
// eslint-disable-next-line no-nested-ternary
|
|
1279
|
-
o === !0 ?
|
|
1279
|
+
o === !0 ? vt([d], w, i) : o === null ? d : d + "[]",
|
|
1280
1280
|
h(b)
|
|
1281
1281
|
);
|
|
1282
1282
|
}), !1;
|
|
1283
1283
|
}
|
|
1284
|
-
return Be(m) ? !0 : (e.append(
|
|
1284
|
+
return Be(m) ? !0 : (e.append(vt(g, d, i), h(m)), !1);
|
|
1285
1285
|
}
|
|
1286
|
-
const c = [],
|
|
1286
|
+
const c = [], f = Object.assign(fs, {
|
|
1287
1287
|
defaultVisitor: l,
|
|
1288
1288
|
convertValue: h,
|
|
1289
1289
|
isVisitable: Be
|
|
1290
1290
|
});
|
|
1291
|
-
function v(m,
|
|
1291
|
+
function v(m, d) {
|
|
1292
1292
|
if (!p.isUndefined(m)) {
|
|
1293
1293
|
if (c.indexOf(m) !== -1)
|
|
1294
|
-
throw Error("Circular reference detected in " +
|
|
1295
|
-
c.push(m), p.forEach(m, function(y,
|
|
1294
|
+
throw Error("Circular reference detected in " + d.join("."));
|
|
1295
|
+
c.push(m), p.forEach(m, function(y, O) {
|
|
1296
1296
|
(!(p.isUndefined(y) || y === null) && s.call(
|
|
1297
1297
|
e,
|
|
1298
1298
|
y,
|
|
1299
|
-
p.isString(
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
)) === !0 && v(y,
|
|
1299
|
+
p.isString(O) ? O.trim() : O,
|
|
1300
|
+
d,
|
|
1301
|
+
f
|
|
1302
|
+
)) === !0 && v(y, d ? d.concat(O) : [O]);
|
|
1303
1303
|
}), c.pop();
|
|
1304
1304
|
}
|
|
1305
1305
|
}
|
|
@@ -1307,7 +1307,7 @@ function Re(t, e, r) {
|
|
|
1307
1307
|
throw new TypeError("data must be an object");
|
|
1308
1308
|
return v(t), e;
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function bt(t) {
|
|
1311
1311
|
const e = {
|
|
1312
1312
|
"!": "%21",
|
|
1313
1313
|
"'": "%27",
|
|
@@ -1322,27 +1322,27 @@ function Et(t) {
|
|
|
1322
1322
|
});
|
|
1323
1323
|
}
|
|
1324
1324
|
function rt(t, e) {
|
|
1325
|
-
this._pairs = [], t &&
|
|
1325
|
+
this._pairs = [], t && Fe(t, this, e);
|
|
1326
1326
|
}
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1327
|
+
const ir = rt.prototype;
|
|
1328
|
+
ir.append = function(e, r) {
|
|
1329
1329
|
this._pairs.push([e, r]);
|
|
1330
1330
|
};
|
|
1331
|
-
|
|
1331
|
+
ir.toString = function(e) {
|
|
1332
1332
|
const r = e ? function(n) {
|
|
1333
|
-
return e.call(this, n,
|
|
1334
|
-
} :
|
|
1333
|
+
return e.call(this, n, bt);
|
|
1334
|
+
} : bt;
|
|
1335
1335
|
return this._pairs.map(function(s) {
|
|
1336
1336
|
return r(s[0]) + "=" + r(s[1]);
|
|
1337
1337
|
}, "").join("&");
|
|
1338
1338
|
};
|
|
1339
|
-
function
|
|
1339
|
+
function hs(t) {
|
|
1340
1340
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1342
|
+
function or(t, e, r) {
|
|
1343
1343
|
if (!e)
|
|
1344
1344
|
return t;
|
|
1345
|
-
const n = r && r.encode ||
|
|
1345
|
+
const n = r && r.encode || hs, s = r && r.serialize;
|
|
1346
1346
|
let i;
|
|
1347
1347
|
if (s ? i = s(e, r) : i = p.isURLSearchParams(e) ? e.toString() : new rt(e, r).toString(n), i) {
|
|
1348
1348
|
const o = t.indexOf("#");
|
|
@@ -1350,7 +1350,7 @@ function cr(t, e, r) {
|
|
|
1350
1350
|
}
|
|
1351
1351
|
return t;
|
|
1352
1352
|
}
|
|
1353
|
-
class
|
|
1353
|
+
class Ot {
|
|
1354
1354
|
constructor() {
|
|
1355
1355
|
this.handlers = [];
|
|
1356
1356
|
}
|
|
@@ -1404,39 +1404,39 @@ class St {
|
|
|
1404
1404
|
});
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
|
-
const
|
|
1407
|
+
const ar = {
|
|
1408
1408
|
silentJSONParsing: !0,
|
|
1409
1409
|
forcedJSONParsing: !0,
|
|
1410
1410
|
clarifyTimeoutError: !1
|
|
1411
|
-
},
|
|
1411
|
+
}, ds = typeof URLSearchParams < "u" ? URLSearchParams : rt, ps = typeof FormData < "u" ? FormData : null, ys = typeof Blob < "u" ? Blob : null, ms = {
|
|
1412
1412
|
isBrowser: !0,
|
|
1413
1413
|
classes: {
|
|
1414
|
-
URLSearchParams:
|
|
1415
|
-
FormData:
|
|
1416
|
-
Blob:
|
|
1414
|
+
URLSearchParams: ds,
|
|
1415
|
+
FormData: ps,
|
|
1416
|
+
Blob: ys
|
|
1417
1417
|
},
|
|
1418
1418
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1419
|
-
},
|
|
1420
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
1419
|
+
}, ur = typeof window < "u" && typeof document < "u", gs = ((t) => ur && ["ReactNative", "NativeScript", "NS"].indexOf(t) < 0)(typeof navigator < "u" && navigator.product), vs = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1420
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", bs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1421
1421
|
__proto__: null,
|
|
1422
|
-
hasBrowserEnv:
|
|
1423
|
-
hasStandardBrowserEnv:
|
|
1424
|
-
hasStandardBrowserWebWorkerEnv:
|
|
1425
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1426
|
-
...
|
|
1427
|
-
...
|
|
1422
|
+
hasBrowserEnv: ur,
|
|
1423
|
+
hasStandardBrowserEnv: gs,
|
|
1424
|
+
hasStandardBrowserWebWorkerEnv: vs
|
|
1425
|
+
}, Symbol.toStringTag, { value: "Module" })), j = {
|
|
1426
|
+
...bs,
|
|
1427
|
+
...ms
|
|
1428
1428
|
};
|
|
1429
|
-
function
|
|
1430
|
-
return
|
|
1429
|
+
function Os(t, e) {
|
|
1430
|
+
return Fe(t, new j.classes.URLSearchParams(), Object.assign({
|
|
1431
1431
|
visitor: function(r, n, s, i) {
|
|
1432
|
-
return
|
|
1432
|
+
return j.isNode && p.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
1433
1433
|
}
|
|
1434
1434
|
}, e));
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1436
|
+
function ws(t) {
|
|
1437
1437
|
return p.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function Es(t) {
|
|
1440
1440
|
const e = {}, r = Object.keys(t);
|
|
1441
1441
|
let n;
|
|
1442
1442
|
const s = r.length;
|
|
@@ -1445,23 +1445,23 @@ function As(t) {
|
|
|
1445
1445
|
i = r[n], e[i] = t[i];
|
|
1446
1446
|
return e;
|
|
1447
1447
|
}
|
|
1448
|
-
function
|
|
1448
|
+
function cr(t) {
|
|
1449
1449
|
function e(r, n, s, i) {
|
|
1450
1450
|
let o = r[i++];
|
|
1451
1451
|
if (o === "__proto__")
|
|
1452
1452
|
return !0;
|
|
1453
1453
|
const a = Number.isFinite(+o), u = i >= r.length;
|
|
1454
|
-
return o = !o && p.isArray(s) ? s.length : o, u ? (p.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !a) : ((!s[o] || !p.isObject(s[o])) && (s[o] = []), e(r, n, s[o], i) && p.isArray(s[o]) && (s[o] =
|
|
1454
|
+
return o = !o && p.isArray(s) ? s.length : o, u ? (p.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !a) : ((!s[o] || !p.isObject(s[o])) && (s[o] = []), e(r, n, s[o], i) && p.isArray(s[o]) && (s[o] = Es(s[o])), !a);
|
|
1455
1455
|
}
|
|
1456
1456
|
if (p.isFormData(t) && p.isFunction(t.entries)) {
|
|
1457
1457
|
const r = {};
|
|
1458
1458
|
return p.forEachEntry(t, (n, s) => {
|
|
1459
|
-
e(
|
|
1459
|
+
e(ws(n), s, r, 0);
|
|
1460
1460
|
}), r;
|
|
1461
1461
|
}
|
|
1462
1462
|
return null;
|
|
1463
1463
|
}
|
|
1464
|
-
function
|
|
1464
|
+
function Ss(t, e, r) {
|
|
1465
1465
|
if (p.isString(t))
|
|
1466
1466
|
try {
|
|
1467
1467
|
return (e || JSON.parse)(t), p.trim(t);
|
|
@@ -1471,13 +1471,13 @@ function Rs(t, e, r) {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
return (r || JSON.stringify)(t);
|
|
1473
1473
|
}
|
|
1474
|
-
const
|
|
1475
|
-
transitional:
|
|
1474
|
+
const pe = {
|
|
1475
|
+
transitional: ar,
|
|
1476
1476
|
adapter: ["xhr", "http"],
|
|
1477
1477
|
transformRequest: [function(e, r) {
|
|
1478
1478
|
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, i = p.isObject(e);
|
|
1479
1479
|
if (i && p.isHTMLForm(e) && (e = new FormData(e)), p.isFormData(e))
|
|
1480
|
-
return s ? JSON.stringify(
|
|
1480
|
+
return s ? JSON.stringify(cr(e)) : e;
|
|
1481
1481
|
if (p.isArrayBuffer(e) || p.isBuffer(e) || p.isStream(e) || p.isFile(e) || p.isBlob(e))
|
|
1482
1482
|
return e;
|
|
1483
1483
|
if (p.isArrayBufferView(e))
|
|
@@ -1487,20 +1487,20 @@ const nt = {
|
|
|
1487
1487
|
let a;
|
|
1488
1488
|
if (i) {
|
|
1489
1489
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1490
|
-
return
|
|
1490
|
+
return Os(e, this.formSerializer).toString();
|
|
1491
1491
|
if ((a = p.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
1492
1492
|
const u = this.env && this.env.FormData;
|
|
1493
|
-
return
|
|
1493
|
+
return Fe(
|
|
1494
1494
|
a ? { "files[]": e } : e,
|
|
1495
1495
|
u && new u(),
|
|
1496
1496
|
this.formSerializer
|
|
1497
1497
|
);
|
|
1498
1498
|
}
|
|
1499
1499
|
}
|
|
1500
|
-
return i || s ? (r.setContentType("application/json", !1),
|
|
1500
|
+
return i || s ? (r.setContentType("application/json", !1), Ss(e)) : e;
|
|
1501
1501
|
}],
|
|
1502
1502
|
transformResponse: [function(e) {
|
|
1503
|
-
const r = this.transitional ||
|
|
1503
|
+
const r = this.transitional || pe.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
1504
1504
|
if (e && p.isString(e) && (n && !this.responseType || s)) {
|
|
1505
1505
|
const o = !(r && r.silentJSONParsing) && s;
|
|
1506
1506
|
try {
|
|
@@ -1522,8 +1522,8 @@ const nt = {
|
|
|
1522
1522
|
maxContentLength: -1,
|
|
1523
1523
|
maxBodyLength: -1,
|
|
1524
1524
|
env: {
|
|
1525
|
-
FormData:
|
|
1526
|
-
Blob:
|
|
1525
|
+
FormData: j.classes.FormData,
|
|
1526
|
+
Blob: j.classes.Blob
|
|
1527
1527
|
},
|
|
1528
1528
|
validateStatus: function(e) {
|
|
1529
1529
|
return e >= 200 && e < 300;
|
|
@@ -1536,9 +1536,9 @@ const nt = {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
};
|
|
1538
1538
|
p.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
1539
|
-
|
|
1539
|
+
pe.headers[t] = {};
|
|
1540
1540
|
});
|
|
1541
|
-
const
|
|
1541
|
+
const As = p.toObjectSet([
|
|
1542
1542
|
"age",
|
|
1543
1543
|
"authorization",
|
|
1544
1544
|
"content-length",
|
|
@@ -1556,28 +1556,28 @@ const st = nt, Fs = p.toObjectSet([
|
|
|
1556
1556
|
"referer",
|
|
1557
1557
|
"retry-after",
|
|
1558
1558
|
"user-agent"
|
|
1559
|
-
]),
|
|
1559
|
+
]), Rs = (t) => {
|
|
1560
1560
|
const e = {};
|
|
1561
1561
|
let r, n, s;
|
|
1562
1562
|
return t && t.split(`
|
|
1563
1563
|
`).forEach(function(o) {
|
|
1564
|
-
s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || e[r] &&
|
|
1564
|
+
s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || e[r] && As[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
|
|
1565
1565
|
}), e;
|
|
1566
|
-
},
|
|
1567
|
-
function
|
|
1566
|
+
}, wt = Symbol("internals");
|
|
1567
|
+
function oe(t) {
|
|
1568
1568
|
return t && String(t).trim().toLowerCase();
|
|
1569
1569
|
}
|
|
1570
|
-
function
|
|
1571
|
-
return t === !1 || t == null ? t : p.isArray(t) ? t.map(
|
|
1570
|
+
function Oe(t) {
|
|
1571
|
+
return t === !1 || t == null ? t : p.isArray(t) ? t.map(Oe) : String(t);
|
|
1572
1572
|
}
|
|
1573
|
-
function
|
|
1573
|
+
function Fs(t) {
|
|
1574
1574
|
const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1575
1575
|
let n;
|
|
1576
1576
|
for (; n = r.exec(t); )
|
|
1577
1577
|
e[n[1]] = n[2];
|
|
1578
1578
|
return e;
|
|
1579
1579
|
}
|
|
1580
|
-
const
|
|
1580
|
+
const Ps = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
1581
1581
|
function Te(t, e, r, n, s) {
|
|
1582
1582
|
if (p.isFunction(n))
|
|
1583
1583
|
return n.call(this, e, r);
|
|
@@ -1588,10 +1588,10 @@ function Te(t, e, r, n, s) {
|
|
|
1588
1588
|
return n.test(e);
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
1591
|
-
function
|
|
1591
|
+
function Cs(t) {
|
|
1592
1592
|
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, n) => r.toUpperCase() + n);
|
|
1593
1593
|
}
|
|
1594
|
-
function
|
|
1594
|
+
function Ts(t, e) {
|
|
1595
1595
|
const r = p.toCamelCase(" " + e);
|
|
1596
1596
|
["get", "set", "has"].forEach((n) => {
|
|
1597
1597
|
Object.defineProperty(t, n + r, {
|
|
@@ -1602,31 +1602,31 @@ function xs(t, e) {
|
|
|
1602
1602
|
});
|
|
1603
1603
|
});
|
|
1604
1604
|
}
|
|
1605
|
-
class
|
|
1605
|
+
class N {
|
|
1606
1606
|
constructor(e) {
|
|
1607
1607
|
e && this.set(e);
|
|
1608
1608
|
}
|
|
1609
1609
|
set(e, r, n) {
|
|
1610
1610
|
const s = this;
|
|
1611
1611
|
function i(a, u, h) {
|
|
1612
|
-
const l =
|
|
1612
|
+
const l = oe(u);
|
|
1613
1613
|
if (!l)
|
|
1614
1614
|
throw new Error("header name must be a non-empty string");
|
|
1615
1615
|
const c = p.findKey(s, l);
|
|
1616
|
-
(!c || s[c] === void 0 || h === !0 || h === void 0 && s[c] !== !1) && (s[c || u] =
|
|
1616
|
+
(!c || s[c] === void 0 || h === !0 || h === void 0 && s[c] !== !1) && (s[c || u] = Oe(a));
|
|
1617
1617
|
}
|
|
1618
1618
|
const o = (a, u) => p.forEach(a, (h, l) => i(h, l, u));
|
|
1619
|
-
return p.isPlainObject(e) || e instanceof this.constructor ? o(e, r) : p.isString(e) && (e = e.trim()) && !
|
|
1619
|
+
return p.isPlainObject(e) || e instanceof this.constructor ? o(e, r) : p.isString(e) && (e = e.trim()) && !Ps(e) ? o(Rs(e), r) : e != null && i(r, e, n), this;
|
|
1620
1620
|
}
|
|
1621
1621
|
get(e, r) {
|
|
1622
|
-
if (e =
|
|
1622
|
+
if (e = oe(e), e) {
|
|
1623
1623
|
const n = p.findKey(this, e);
|
|
1624
1624
|
if (n) {
|
|
1625
1625
|
const s = this[n];
|
|
1626
1626
|
if (!r)
|
|
1627
1627
|
return s;
|
|
1628
1628
|
if (r === !0)
|
|
1629
|
-
return
|
|
1629
|
+
return Fs(s);
|
|
1630
1630
|
if (p.isFunction(r))
|
|
1631
1631
|
return r.call(this, s, n);
|
|
1632
1632
|
if (p.isRegExp(r))
|
|
@@ -1636,7 +1636,7 @@ class Fe {
|
|
|
1636
1636
|
}
|
|
1637
1637
|
}
|
|
1638
1638
|
has(e, r) {
|
|
1639
|
-
if (e =
|
|
1639
|
+
if (e = oe(e), e) {
|
|
1640
1640
|
const n = p.findKey(this, e);
|
|
1641
1641
|
return !!(n && this[n] !== void 0 && (!r || Te(this, this[n], n, r)));
|
|
1642
1642
|
}
|
|
@@ -1646,7 +1646,7 @@ class Fe {
|
|
|
1646
1646
|
const n = this;
|
|
1647
1647
|
let s = !1;
|
|
1648
1648
|
function i(o) {
|
|
1649
|
-
if (o =
|
|
1649
|
+
if (o = oe(o), o) {
|
|
1650
1650
|
const a = p.findKey(n, o);
|
|
1651
1651
|
a && (!r || Te(n, n[a], a, r)) && (delete n[a], s = !0);
|
|
1652
1652
|
}
|
|
@@ -1667,11 +1667,11 @@ class Fe {
|
|
|
1667
1667
|
return p.forEach(this, (s, i) => {
|
|
1668
1668
|
const o = p.findKey(n, i);
|
|
1669
1669
|
if (o) {
|
|
1670
|
-
r[o] =
|
|
1670
|
+
r[o] = Oe(s), delete r[i];
|
|
1671
1671
|
return;
|
|
1672
1672
|
}
|
|
1673
|
-
const a = e ?
|
|
1674
|
-
a !== i && delete r[i], r[a] =
|
|
1673
|
+
const a = e ? Cs(i) : String(i).trim();
|
|
1674
|
+
a !== i && delete r[i], r[a] = Oe(s), n[a] = !0;
|
|
1675
1675
|
}), this;
|
|
1676
1676
|
}
|
|
1677
1677
|
concat(...e) {
|
|
@@ -1701,18 +1701,18 @@ class Fe {
|
|
|
1701
1701
|
return r.forEach((s) => n.set(s)), n;
|
|
1702
1702
|
}
|
|
1703
1703
|
static accessor(e) {
|
|
1704
|
-
const n = (this[
|
|
1704
|
+
const n = (this[wt] = this[wt] = {
|
|
1705
1705
|
accessors: {}
|
|
1706
1706
|
}).accessors, s = this.prototype;
|
|
1707
1707
|
function i(o) {
|
|
1708
|
-
const a =
|
|
1709
|
-
n[a] || (
|
|
1708
|
+
const a = oe(o);
|
|
1709
|
+
n[a] || (Ts(s, o), n[a] = !0);
|
|
1710
1710
|
}
|
|
1711
1711
|
return p.isArray(e) ? e.forEach(i) : i(e), this;
|
|
1712
1712
|
}
|
|
1713
1713
|
}
|
|
1714
|
-
|
|
1715
|
-
p.reduceDescriptors(
|
|
1714
|
+
N.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1715
|
+
p.reduceDescriptors(N.prototype, ({ value: t }, e) => {
|
|
1716
1716
|
let r = e[0].toUpperCase() + e.slice(1);
|
|
1717
1717
|
return {
|
|
1718
1718
|
get: () => t,
|
|
@@ -1721,25 +1721,24 @@ p.reduceDescriptors(Fe.prototype, ({ value: t }, e) => {
|
|
|
1721
1721
|
}
|
|
1722
1722
|
};
|
|
1723
1723
|
});
|
|
1724
|
-
p.freezeMethods(
|
|
1725
|
-
const L = Fe;
|
|
1724
|
+
p.freezeMethods(N);
|
|
1726
1725
|
function qe(t, e) {
|
|
1727
|
-
const r = this ||
|
|
1726
|
+
const r = this || pe, n = e || r, s = N.from(n.headers);
|
|
1728
1727
|
let i = n.data;
|
|
1729
1728
|
return p.forEach(t, function(a) {
|
|
1730
1729
|
i = a.call(r, i, s.normalize(), e ? e.status : void 0);
|
|
1731
1730
|
}), s.normalize(), i;
|
|
1732
1731
|
}
|
|
1733
|
-
function
|
|
1732
|
+
function lr(t) {
|
|
1734
1733
|
return !!(t && t.__CANCEL__);
|
|
1735
1734
|
}
|
|
1736
|
-
function
|
|
1735
|
+
function ye(t, e, r) {
|
|
1737
1736
|
A.call(this, t ?? "canceled", A.ERR_CANCELED, e, r), this.name = "CanceledError";
|
|
1738
1737
|
}
|
|
1739
|
-
p.inherits(
|
|
1738
|
+
p.inherits(ye, A, {
|
|
1740
1739
|
__CANCEL__: !0
|
|
1741
1740
|
});
|
|
1742
|
-
function
|
|
1741
|
+
function qs(t, e, r) {
|
|
1743
1742
|
const n = r.config.validateStatus;
|
|
1744
1743
|
!r.status || !n || n(r.status) ? t(r) : e(new A(
|
|
1745
1744
|
"Request failed with status code " + r.status,
|
|
@@ -1749,7 +1748,7 @@ function Ds(t, e, r) {
|
|
|
1749
1748
|
r
|
|
1750
1749
|
));
|
|
1751
1750
|
}
|
|
1752
|
-
const
|
|
1751
|
+
const xs = j.hasStandardBrowserEnv ? (
|
|
1753
1752
|
// Standard browser envs support document.cookie
|
|
1754
1753
|
{
|
|
1755
1754
|
write(t, e, r, n, s, i) {
|
|
@@ -1776,16 +1775,16 @@ const _s = Q.hasStandardBrowserEnv ? (
|
|
|
1776
1775
|
}
|
|
1777
1776
|
}
|
|
1778
1777
|
);
|
|
1779
|
-
function
|
|
1778
|
+
function Ds(t) {
|
|
1780
1779
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
1781
1780
|
}
|
|
1782
|
-
function
|
|
1781
|
+
function _s(t, e) {
|
|
1783
1782
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
1784
1783
|
}
|
|
1785
|
-
function
|
|
1786
|
-
return t && !
|
|
1784
|
+
function fr(t, e) {
|
|
1785
|
+
return t && !Ds(e) ? _s(t, e) : e;
|
|
1787
1786
|
}
|
|
1788
|
-
const
|
|
1787
|
+
const Ns = j.hasStandardBrowserEnv ? (
|
|
1789
1788
|
// Standard browser envs have full support of the APIs needed to test
|
|
1790
1789
|
// whether the request URL is of the same origin as current location.
|
|
1791
1790
|
function() {
|
|
@@ -1817,29 +1816,29 @@ const Is = Q.hasStandardBrowserEnv ? (
|
|
|
1817
1816
|
};
|
|
1818
1817
|
}()
|
|
1819
1818
|
);
|
|
1820
|
-
function
|
|
1819
|
+
function Us(t) {
|
|
1821
1820
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
1822
1821
|
return e && e[1] || "";
|
|
1823
1822
|
}
|
|
1824
|
-
function
|
|
1823
|
+
function Is(t, e) {
|
|
1825
1824
|
t = t || 10;
|
|
1826
1825
|
const r = new Array(t), n = new Array(t);
|
|
1827
1826
|
let s = 0, i = 0, o;
|
|
1828
1827
|
return e = e !== void 0 ? e : 1e3, function(u) {
|
|
1829
1828
|
const h = Date.now(), l = n[i];
|
|
1830
1829
|
o || (o = h), r[s] = u, n[s] = h;
|
|
1831
|
-
let c = i,
|
|
1830
|
+
let c = i, f = 0;
|
|
1832
1831
|
for (; c !== s; )
|
|
1833
|
-
|
|
1832
|
+
f += r[c++], c = c % t;
|
|
1834
1833
|
if (s = (s + 1) % t, s === i && (i = (i + 1) % t), h - o < e)
|
|
1835
1834
|
return;
|
|
1836
1835
|
const v = l && h - l;
|
|
1837
|
-
return v ? Math.round(
|
|
1836
|
+
return v ? Math.round(f * 1e3 / v) : void 0;
|
|
1838
1837
|
};
|
|
1839
1838
|
}
|
|
1840
|
-
function
|
|
1839
|
+
function Et(t, e) {
|
|
1841
1840
|
let r = 0;
|
|
1842
|
-
const n =
|
|
1841
|
+
const n = Is(50, 250);
|
|
1843
1842
|
return (s) => {
|
|
1844
1843
|
const i = s.loaded, o = s.lengthComputable ? s.total : void 0, a = i - r, u = n(a), h = i <= o;
|
|
1845
1844
|
r = i;
|
|
@@ -1855,44 +1854,44 @@ function Rt(t, e) {
|
|
|
1855
1854
|
l[e ? "download" : "upload"] = !0, t(l);
|
|
1856
1855
|
};
|
|
1857
1856
|
}
|
|
1858
|
-
const
|
|
1857
|
+
const Ms = typeof XMLHttpRequest < "u", Qs = Ms && function(t) {
|
|
1859
1858
|
return new Promise(function(r, n) {
|
|
1860
1859
|
let s = t.data;
|
|
1861
|
-
const i =
|
|
1860
|
+
const i = N.from(t.headers).normalize();
|
|
1862
1861
|
let { responseType: o, withXSRFToken: a } = t, u;
|
|
1863
1862
|
function h() {
|
|
1864
1863
|
t.cancelToken && t.cancelToken.unsubscribe(u), t.signal && t.signal.removeEventListener("abort", u);
|
|
1865
1864
|
}
|
|
1866
1865
|
let l;
|
|
1867
1866
|
if (p.isFormData(s)) {
|
|
1868
|
-
if (
|
|
1867
|
+
if (j.hasStandardBrowserEnv || j.hasStandardBrowserWebWorkerEnv)
|
|
1869
1868
|
i.setContentType(!1);
|
|
1870
1869
|
else if ((l = i.getContentType()) !== !1) {
|
|
1871
|
-
const [
|
|
1872
|
-
i.setContentType([
|
|
1870
|
+
const [d, ...g] = l ? l.split(";").map((y) => y.trim()).filter(Boolean) : [];
|
|
1871
|
+
i.setContentType([d || "multipart/form-data", ...g].join("; "));
|
|
1873
1872
|
}
|
|
1874
1873
|
}
|
|
1875
1874
|
let c = new XMLHttpRequest();
|
|
1876
1875
|
if (t.auth) {
|
|
1877
|
-
const
|
|
1878
|
-
i.set("Authorization", "Basic " + btoa(
|
|
1876
|
+
const d = t.auth.username || "", g = t.auth.password ? unescape(encodeURIComponent(t.auth.password)) : "";
|
|
1877
|
+
i.set("Authorization", "Basic " + btoa(d + ":" + g));
|
|
1879
1878
|
}
|
|
1880
|
-
const
|
|
1881
|
-
c.open(t.method.toUpperCase(),
|
|
1879
|
+
const f = fr(t.baseURL, t.url);
|
|
1880
|
+
c.open(t.method.toUpperCase(), or(f, t.params, t.paramsSerializer), !0), c.timeout = t.timeout;
|
|
1882
1881
|
function v() {
|
|
1883
1882
|
if (!c)
|
|
1884
1883
|
return;
|
|
1885
|
-
const
|
|
1884
|
+
const d = N.from(
|
|
1886
1885
|
"getAllResponseHeaders" in c && c.getAllResponseHeaders()
|
|
1887
1886
|
), y = {
|
|
1888
1887
|
data: !o || o === "text" || o === "json" ? c.responseText : c.response,
|
|
1889
1888
|
status: c.status,
|
|
1890
1889
|
statusText: c.statusText,
|
|
1891
|
-
headers:
|
|
1890
|
+
headers: d,
|
|
1892
1891
|
config: t,
|
|
1893
1892
|
request: c
|
|
1894
1893
|
};
|
|
1895
|
-
|
|
1894
|
+
qs(function(b) {
|
|
1896
1895
|
r(b), h();
|
|
1897
1896
|
}, function(b) {
|
|
1898
1897
|
n(b), h();
|
|
@@ -1906,32 +1905,32 @@ const ks = typeof XMLHttpRequest < "u", js = ks && function(t) {
|
|
|
1906
1905
|
n(new A("Network Error", A.ERR_NETWORK, t, c)), c = null;
|
|
1907
1906
|
}, c.ontimeout = function() {
|
|
1908
1907
|
let g = t.timeout ? "timeout of " + t.timeout + "ms exceeded" : "timeout exceeded";
|
|
1909
|
-
const y = t.transitional ||
|
|
1908
|
+
const y = t.transitional || ar;
|
|
1910
1909
|
t.timeoutErrorMessage && (g = t.timeoutErrorMessage), n(new A(
|
|
1911
1910
|
g,
|
|
1912
1911
|
y.clarifyTimeoutError ? A.ETIMEDOUT : A.ECONNABORTED,
|
|
1913
1912
|
t,
|
|
1914
1913
|
c
|
|
1915
1914
|
)), c = null;
|
|
1916
|
-
},
|
|
1917
|
-
const
|
|
1918
|
-
|
|
1915
|
+
}, j.hasStandardBrowserEnv && (a && p.isFunction(a) && (a = a(t)), a || a !== !1 && Ns(f))) {
|
|
1916
|
+
const d = t.xsrfHeaderName && t.xsrfCookieName && xs.read(t.xsrfCookieName);
|
|
1917
|
+
d && i.set(t.xsrfHeaderName, d);
|
|
1919
1918
|
}
|
|
1920
1919
|
s === void 0 && i.setContentType(null), "setRequestHeader" in c && p.forEach(i.toJSON(), function(g, y) {
|
|
1921
1920
|
c.setRequestHeader(y, g);
|
|
1922
|
-
}), p.isUndefined(t.withCredentials) || (c.withCredentials = !!t.withCredentials), o && o !== "json" && (c.responseType = t.responseType), typeof t.onDownloadProgress == "function" && c.addEventListener("progress",
|
|
1923
|
-
c && (n(!
|
|
1921
|
+
}), p.isUndefined(t.withCredentials) || (c.withCredentials = !!t.withCredentials), o && o !== "json" && (c.responseType = t.responseType), typeof t.onDownloadProgress == "function" && c.addEventListener("progress", Et(t.onDownloadProgress, !0)), typeof t.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", Et(t.onUploadProgress)), (t.cancelToken || t.signal) && (u = (d) => {
|
|
1922
|
+
c && (n(!d || d.type ? new ye(null, t, c) : d), c.abort(), c = null);
|
|
1924
1923
|
}, t.cancelToken && t.cancelToken.subscribe(u), t.signal && (t.signal.aborted ? u() : t.signal.addEventListener("abort", u)));
|
|
1925
|
-
const m =
|
|
1926
|
-
if (m &&
|
|
1924
|
+
const m = Us(f);
|
|
1925
|
+
if (m && j.protocols.indexOf(m) === -1) {
|
|
1927
1926
|
n(new A("Unsupported protocol " + m + ":", A.ERR_BAD_REQUEST, t));
|
|
1928
1927
|
return;
|
|
1929
1928
|
}
|
|
1930
1929
|
c.send(s || null);
|
|
1931
1930
|
});
|
|
1932
1931
|
}, He = {
|
|
1933
|
-
http:
|
|
1934
|
-
xhr:
|
|
1932
|
+
http: cs,
|
|
1933
|
+
xhr: Qs
|
|
1935
1934
|
};
|
|
1936
1935
|
p.forEach(He, (t, e) => {
|
|
1937
1936
|
if (t) {
|
|
@@ -1942,7 +1941,7 @@ p.forEach(He, (t, e) => {
|
|
|
1942
1941
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1943
1942
|
}
|
|
1944
1943
|
});
|
|
1945
|
-
const
|
|
1944
|
+
const St = (t) => `- ${t}`, js = (t) => p.isFunction(t) || t === null || t === !1, hr = {
|
|
1946
1945
|
getAdapter: (t) => {
|
|
1947
1946
|
t = p.isArray(t) ? t : [t];
|
|
1948
1947
|
const { length: e } = t;
|
|
@@ -1951,7 +1950,7 @@ const Ft = (t) => `- ${t}`, Ls = (t) => p.isFunction(t) || t === null || t === !
|
|
|
1951
1950
|
for (let i = 0; i < e; i++) {
|
|
1952
1951
|
r = t[i];
|
|
1953
1952
|
let o;
|
|
1954
|
-
if (n = r, !
|
|
1953
|
+
if (n = r, !js(r) && (n = He[(o = String(r)).toLowerCase()], n === void 0))
|
|
1955
1954
|
throw new A(`Unknown adapter '${o}'`);
|
|
1956
1955
|
if (n)
|
|
1957
1956
|
break;
|
|
@@ -1962,8 +1961,8 @@ const Ft = (t) => `- ${t}`, Ls = (t) => p.isFunction(t) || t === null || t === !
|
|
|
1962
1961
|
([a, u]) => `adapter ${a} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1963
1962
|
);
|
|
1964
1963
|
let o = e ? i.length > 1 ? `since :
|
|
1965
|
-
` + i.map(
|
|
1966
|
-
`) : " " +
|
|
1964
|
+
` + i.map(St).join(`
|
|
1965
|
+
`) : " " + St(i[0]) : "as no adapter specified";
|
|
1967
1966
|
throw new A(
|
|
1968
1967
|
"There is no suitable adapter to dispatch the request " + o,
|
|
1969
1968
|
"ERR_NOT_SUPPORT"
|
|
@@ -1975,28 +1974,28 @@ const Ft = (t) => `- ${t}`, Ls = (t) => p.isFunction(t) || t === null || t === !
|
|
|
1975
1974
|
};
|
|
1976
1975
|
function xe(t) {
|
|
1977
1976
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1978
|
-
throw new
|
|
1977
|
+
throw new ye(null, t);
|
|
1979
1978
|
}
|
|
1980
|
-
function
|
|
1981
|
-
return xe(t), t.headers =
|
|
1979
|
+
function At(t) {
|
|
1980
|
+
return xe(t), t.headers = N.from(t.headers), t.data = qe.call(
|
|
1982
1981
|
t,
|
|
1983
1982
|
t.transformRequest
|
|
1984
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1983
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), hr.getAdapter(t.adapter || pe.adapter)(t).then(function(n) {
|
|
1985
1984
|
return xe(t), n.data = qe.call(
|
|
1986
1985
|
t,
|
|
1987
1986
|
t.transformResponse,
|
|
1988
1987
|
n
|
|
1989
|
-
), n.headers =
|
|
1988
|
+
), n.headers = N.from(n.headers), n;
|
|
1990
1989
|
}, function(n) {
|
|
1991
|
-
return
|
|
1990
|
+
return lr(n) || (xe(t), n && n.response && (n.response.data = qe.call(
|
|
1992
1991
|
t,
|
|
1993
1992
|
t.transformResponse,
|
|
1994
1993
|
n.response
|
|
1995
|
-
), n.response.headers =
|
|
1994
|
+
), n.response.headers = N.from(n.response.headers))), Promise.reject(n);
|
|
1996
1995
|
});
|
|
1997
1996
|
}
|
|
1998
|
-
const
|
|
1999
|
-
function
|
|
1997
|
+
const Rt = (t) => t instanceof N ? { ...t } : t;
|
|
1998
|
+
function te(t, e) {
|
|
2000
1999
|
e = e || {};
|
|
2001
2000
|
const r = {};
|
|
2002
2001
|
function n(h, l, c) {
|
|
@@ -2055,23 +2054,23 @@ function ee(t, e) {
|
|
|
2055
2054
|
socketPath: o,
|
|
2056
2055
|
responseEncoding: o,
|
|
2057
2056
|
validateStatus: a,
|
|
2058
|
-
headers: (h, l) => s(
|
|
2057
|
+
headers: (h, l) => s(Rt(h), Rt(l), !0)
|
|
2059
2058
|
};
|
|
2060
2059
|
return p.forEach(Object.keys(Object.assign({}, t, e)), function(l) {
|
|
2061
|
-
const c = u[l] || s,
|
|
2062
|
-
p.isUndefined(
|
|
2060
|
+
const c = u[l] || s, f = c(t[l], e[l], l);
|
|
2061
|
+
p.isUndefined(f) && c !== a || (r[l] = f);
|
|
2063
2062
|
}), r;
|
|
2064
2063
|
}
|
|
2065
|
-
const
|
|
2064
|
+
const dr = "1.6.8", nt = {};
|
|
2066
2065
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
2067
|
-
|
|
2066
|
+
nt[t] = function(n) {
|
|
2068
2067
|
return typeof n === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
2069
2068
|
};
|
|
2070
2069
|
});
|
|
2071
|
-
const
|
|
2072
|
-
|
|
2070
|
+
const Ft = {};
|
|
2071
|
+
nt.transitional = function(e, r, n) {
|
|
2073
2072
|
function s(i, o) {
|
|
2074
|
-
return "[Axios v" +
|
|
2073
|
+
return "[Axios v" + dr + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
|
|
2075
2074
|
}
|
|
2076
2075
|
return (i, o, a) => {
|
|
2077
2076
|
if (e === !1)
|
|
@@ -2079,7 +2078,7 @@ it.transitional = function(e, r, n) {
|
|
|
2079
2078
|
s(o, " has been removed" + (r ? " in " + r : "")),
|
|
2080
2079
|
A.ERR_DEPRECATED
|
|
2081
2080
|
);
|
|
2082
|
-
return r && !
|
|
2081
|
+
return r && !Ft[o] && (Ft[o] = !0, console.warn(
|
|
2083
2082
|
s(
|
|
2084
2083
|
o,
|
|
2085
2084
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
@@ -2087,7 +2086,7 @@ it.transitional = function(e, r, n) {
|
|
|
2087
2086
|
)), e ? e(i, o, a) : !0;
|
|
2088
2087
|
};
|
|
2089
2088
|
};
|
|
2090
|
-
function
|
|
2089
|
+
function ks(t, e, r) {
|
|
2091
2090
|
if (typeof t != "object")
|
|
2092
2091
|
throw new A("options must be an object", A.ERR_BAD_OPTION_VALUE);
|
|
2093
2092
|
const n = Object.keys(t);
|
|
@@ -2105,14 +2104,14 @@ function Bs(t, e, r) {
|
|
|
2105
2104
|
}
|
|
2106
2105
|
}
|
|
2107
2106
|
const Ve = {
|
|
2108
|
-
assertOptions:
|
|
2109
|
-
validators:
|
|
2107
|
+
assertOptions: ks,
|
|
2108
|
+
validators: nt
|
|
2110
2109
|
}, H = Ve.validators;
|
|
2111
|
-
class
|
|
2110
|
+
class z {
|
|
2112
2111
|
constructor(e) {
|
|
2113
2112
|
this.defaults = e, this.interceptors = {
|
|
2114
|
-
request: new
|
|
2115
|
-
response: new
|
|
2113
|
+
request: new Ot(),
|
|
2114
|
+
response: new Ot()
|
|
2116
2115
|
};
|
|
2117
2116
|
}
|
|
2118
2117
|
/**
|
|
@@ -2138,7 +2137,7 @@ class be {
|
|
|
2138
2137
|
}
|
|
2139
2138
|
}
|
|
2140
2139
|
_request(e, r) {
|
|
2141
|
-
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r =
|
|
2140
|
+
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = te(this.defaults, r);
|
|
2142
2141
|
const { transitional: n, paramsSerializer: s, headers: i } = r;
|
|
2143
2142
|
n !== void 0 && Ve.assertOptions(n, {
|
|
2144
2143
|
silentJSONParsing: H.transitional(H.boolean),
|
|
@@ -2159,52 +2158,52 @@ class be {
|
|
|
2159
2158
|
(m) => {
|
|
2160
2159
|
delete i[m];
|
|
2161
2160
|
}
|
|
2162
|
-
), r.headers =
|
|
2161
|
+
), r.headers = N.concat(o, i);
|
|
2163
2162
|
const a = [];
|
|
2164
2163
|
let u = !0;
|
|
2165
|
-
this.interceptors.request.forEach(function(
|
|
2166
|
-
typeof
|
|
2164
|
+
this.interceptors.request.forEach(function(d) {
|
|
2165
|
+
typeof d.runWhen == "function" && d.runWhen(r) === !1 || (u = u && d.synchronous, a.unshift(d.fulfilled, d.rejected));
|
|
2167
2166
|
});
|
|
2168
2167
|
const h = [];
|
|
2169
|
-
this.interceptors.response.forEach(function(
|
|
2170
|
-
h.push(
|
|
2168
|
+
this.interceptors.response.forEach(function(d) {
|
|
2169
|
+
h.push(d.fulfilled, d.rejected);
|
|
2171
2170
|
});
|
|
2172
|
-
let l, c = 0,
|
|
2171
|
+
let l, c = 0, f;
|
|
2173
2172
|
if (!u) {
|
|
2174
|
-
const m = [
|
|
2175
|
-
for (m.unshift.apply(m, a), m.push.apply(m, h),
|
|
2173
|
+
const m = [At.bind(this), void 0];
|
|
2174
|
+
for (m.unshift.apply(m, a), m.push.apply(m, h), f = m.length, l = Promise.resolve(r); c < f; )
|
|
2176
2175
|
l = l.then(m[c++], m[c++]);
|
|
2177
2176
|
return l;
|
|
2178
2177
|
}
|
|
2179
|
-
|
|
2178
|
+
f = a.length;
|
|
2180
2179
|
let v = r;
|
|
2181
|
-
for (c = 0; c <
|
|
2182
|
-
const m = a[c++],
|
|
2180
|
+
for (c = 0; c < f; ) {
|
|
2181
|
+
const m = a[c++], d = a[c++];
|
|
2183
2182
|
try {
|
|
2184
2183
|
v = m(v);
|
|
2185
2184
|
} catch (g) {
|
|
2186
|
-
|
|
2185
|
+
d.call(this, g);
|
|
2187
2186
|
break;
|
|
2188
2187
|
}
|
|
2189
2188
|
}
|
|
2190
2189
|
try {
|
|
2191
|
-
l =
|
|
2190
|
+
l = At.call(this, v);
|
|
2192
2191
|
} catch (m) {
|
|
2193
2192
|
return Promise.reject(m);
|
|
2194
2193
|
}
|
|
2195
|
-
for (c = 0,
|
|
2194
|
+
for (c = 0, f = h.length; c < f; )
|
|
2196
2195
|
l = l.then(h[c++], h[c++]);
|
|
2197
2196
|
return l;
|
|
2198
2197
|
}
|
|
2199
2198
|
getUri(e) {
|
|
2200
|
-
e =
|
|
2201
|
-
const r =
|
|
2202
|
-
return
|
|
2199
|
+
e = te(this.defaults, e);
|
|
2200
|
+
const r = fr(e.baseURL, e.url);
|
|
2201
|
+
return or(r, e.params, e.paramsSerializer);
|
|
2203
2202
|
}
|
|
2204
2203
|
}
|
|
2205
2204
|
p.forEach(["delete", "get", "head", "options"], function(e) {
|
|
2206
|
-
|
|
2207
|
-
return this.request(
|
|
2205
|
+
z.prototype[e] = function(r, n) {
|
|
2206
|
+
return this.request(te(n || {}, {
|
|
2208
2207
|
method: e,
|
|
2209
2208
|
url: r,
|
|
2210
2209
|
data: (n || {}).data
|
|
@@ -2214,7 +2213,7 @@ p.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
2214
2213
|
p.forEach(["post", "put", "patch"], function(e) {
|
|
2215
2214
|
function r(n) {
|
|
2216
2215
|
return function(i, o, a) {
|
|
2217
|
-
return this.request(
|
|
2216
|
+
return this.request(te(a || {}, {
|
|
2218
2217
|
method: e,
|
|
2219
2218
|
headers: n ? {
|
|
2220
2219
|
"Content-Type": "multipart/form-data"
|
|
@@ -2224,10 +2223,9 @@ p.forEach(["post", "put", "patch"], function(e) {
|
|
|
2224
2223
|
}));
|
|
2225
2224
|
};
|
|
2226
2225
|
}
|
|
2227
|
-
|
|
2226
|
+
z.prototype[e] = r(), z.prototype[e + "Form"] = r(!0);
|
|
2228
2227
|
});
|
|
2229
|
-
|
|
2230
|
-
class ot {
|
|
2228
|
+
class st {
|
|
2231
2229
|
constructor(e) {
|
|
2232
2230
|
if (typeof e != "function")
|
|
2233
2231
|
throw new TypeError("executor must be a function.");
|
|
@@ -2252,7 +2250,7 @@ class ot {
|
|
|
2252
2250
|
n.unsubscribe(i);
|
|
2253
2251
|
}, o;
|
|
2254
2252
|
}, e(function(i, o, a) {
|
|
2255
|
-
n.reason || (n.reason = new
|
|
2253
|
+
n.reason || (n.reason = new ye(i, o, a), r(n.reason));
|
|
2256
2254
|
});
|
|
2257
2255
|
}
|
|
2258
2256
|
/**
|
|
@@ -2288,20 +2286,19 @@ class ot {
|
|
|
2288
2286
|
static source() {
|
|
2289
2287
|
let e;
|
|
2290
2288
|
return {
|
|
2291
|
-
token: new
|
|
2289
|
+
token: new st(function(s) {
|
|
2292
2290
|
e = s;
|
|
2293
2291
|
}),
|
|
2294
2292
|
cancel: e
|
|
2295
2293
|
};
|
|
2296
2294
|
}
|
|
2297
2295
|
}
|
|
2298
|
-
|
|
2299
|
-
function Vs(t) {
|
|
2296
|
+
function Ls(t) {
|
|
2300
2297
|
return function(r) {
|
|
2301
2298
|
return t.apply(null, r);
|
|
2302
2299
|
};
|
|
2303
2300
|
}
|
|
2304
|
-
function
|
|
2301
|
+
function Bs(t) {
|
|
2305
2302
|
return p.isObject(t) && t.isAxiosError === !0;
|
|
2306
2303
|
}
|
|
2307
2304
|
const $e = {
|
|
@@ -2372,47 +2369,46 @@ const $e = {
|
|
|
2372
2369
|
Object.entries($e).forEach(([t, e]) => {
|
|
2373
2370
|
$e[e] = t;
|
|
2374
2371
|
});
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
return gr(ee(t, s));
|
|
2372
|
+
function pr(t) {
|
|
2373
|
+
const e = new z(t), r = zt(z.prototype.request, e);
|
|
2374
|
+
return p.extend(r, z.prototype, e, { allOwnKeys: !0 }), p.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
2375
|
+
return pr(te(t, s));
|
|
2380
2376
|
}, r;
|
|
2381
2377
|
}
|
|
2382
|
-
const F =
|
|
2383
|
-
F.Axios =
|
|
2384
|
-
F.CanceledError =
|
|
2385
|
-
F.CancelToken =
|
|
2386
|
-
F.isCancel =
|
|
2387
|
-
F.VERSION =
|
|
2388
|
-
F.toFormData =
|
|
2378
|
+
const F = pr(pe);
|
|
2379
|
+
F.Axios = z;
|
|
2380
|
+
F.CanceledError = ye;
|
|
2381
|
+
F.CancelToken = st;
|
|
2382
|
+
F.isCancel = lr;
|
|
2383
|
+
F.VERSION = dr;
|
|
2384
|
+
F.toFormData = Fe;
|
|
2389
2385
|
F.AxiosError = A;
|
|
2390
2386
|
F.Cancel = F.CanceledError;
|
|
2391
2387
|
F.all = function(e) {
|
|
2392
2388
|
return Promise.all(e);
|
|
2393
2389
|
};
|
|
2394
|
-
F.spread =
|
|
2395
|
-
F.isAxiosError =
|
|
2396
|
-
F.mergeConfig =
|
|
2397
|
-
F.AxiosHeaders =
|
|
2398
|
-
F.formToJSON = (t) =>
|
|
2399
|
-
F.getAdapter =
|
|
2400
|
-
F.HttpStatusCode =
|
|
2390
|
+
F.spread = Ls;
|
|
2391
|
+
F.isAxiosError = Bs;
|
|
2392
|
+
F.mergeConfig = te;
|
|
2393
|
+
F.AxiosHeaders = N;
|
|
2394
|
+
F.formToJSON = (t) => cr(p.isHTMLForm(t) ? new FormData(t) : t);
|
|
2395
|
+
F.getAdapter = hr.getAdapter;
|
|
2396
|
+
F.HttpStatusCode = $e;
|
|
2401
2397
|
F.default = F;
|
|
2402
|
-
const
|
|
2403
|
-
function
|
|
2398
|
+
const yr = F;
|
|
2399
|
+
function Xi(t) {
|
|
2404
2400
|
F.defaults.baseURL = t;
|
|
2405
2401
|
}
|
|
2406
|
-
function
|
|
2407
|
-
|
|
2402
|
+
function Yi(t) {
|
|
2403
|
+
yr.defaults.headers.common.Authorization = `Bearer ${t}`;
|
|
2408
2404
|
}
|
|
2409
|
-
function
|
|
2410
|
-
|
|
2405
|
+
function Hs() {
|
|
2406
|
+
yr.defaults.headers.common.Authorization = "";
|
|
2411
2407
|
}
|
|
2412
|
-
function
|
|
2408
|
+
function Pt(t) {
|
|
2413
2409
|
return F.isAxiosError(t) ? t.response?.data.message : "";
|
|
2414
2410
|
}
|
|
2415
|
-
var
|
|
2411
|
+
var se = class {
|
|
2416
2412
|
constructor() {
|
|
2417
2413
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
2418
2414
|
}
|
|
@@ -2428,19 +2424,19 @@ var ne = class {
|
|
|
2428
2424
|
}
|
|
2429
2425
|
onUnsubscribe() {
|
|
2430
2426
|
}
|
|
2431
|
-
},
|
|
2427
|
+
}, G = typeof window > "u" || "Deno" in globalThis;
|
|
2432
2428
|
function D() {
|
|
2433
2429
|
}
|
|
2434
|
-
function
|
|
2430
|
+
function Vs(t, e) {
|
|
2435
2431
|
return typeof t == "function" ? t(e) : t;
|
|
2436
2432
|
}
|
|
2437
2433
|
function Ke(t) {
|
|
2438
2434
|
return typeof t == "number" && t >= 0 && t !== 1 / 0;
|
|
2439
2435
|
}
|
|
2440
|
-
function
|
|
2436
|
+
function mr(t, e) {
|
|
2441
2437
|
return Math.max(t + (e || 0) - Date.now(), 0);
|
|
2442
2438
|
}
|
|
2443
|
-
function
|
|
2439
|
+
function Ct(t, e) {
|
|
2444
2440
|
const {
|
|
2445
2441
|
type: r = "all",
|
|
2446
2442
|
exact: n,
|
|
@@ -2451,9 +2447,9 @@ function xt(t, e) {
|
|
|
2451
2447
|
} = t;
|
|
2452
2448
|
if (o) {
|
|
2453
2449
|
if (n) {
|
|
2454
|
-
if (e.queryHash !==
|
|
2450
|
+
if (e.queryHash !== it(o, e.options))
|
|
2455
2451
|
return !1;
|
|
2456
|
-
} else if (!
|
|
2452
|
+
} else if (!fe(e.queryKey, o))
|
|
2457
2453
|
return !1;
|
|
2458
2454
|
}
|
|
2459
2455
|
if (r !== "all") {
|
|
@@ -2463,47 +2459,47 @@ function xt(t, e) {
|
|
|
2463
2459
|
}
|
|
2464
2460
|
return !(typeof a == "boolean" && e.isStale() !== a || s && s !== e.state.fetchStatus || i && !i(e));
|
|
2465
2461
|
}
|
|
2466
|
-
function
|
|
2462
|
+
function Tt(t, e) {
|
|
2467
2463
|
const { exact: r, status: n, predicate: s, mutationKey: i } = t;
|
|
2468
2464
|
if (i) {
|
|
2469
2465
|
if (!e.options.mutationKey)
|
|
2470
2466
|
return !1;
|
|
2471
2467
|
if (r) {
|
|
2472
|
-
if (
|
|
2468
|
+
if (J(e.options.mutationKey) !== J(i))
|
|
2473
2469
|
return !1;
|
|
2474
|
-
} else if (!
|
|
2470
|
+
} else if (!fe(e.options.mutationKey, i))
|
|
2475
2471
|
return !1;
|
|
2476
2472
|
}
|
|
2477
2473
|
return !(n && e.state.status !== n || s && !s(e));
|
|
2478
2474
|
}
|
|
2479
|
-
function
|
|
2480
|
-
return (e?.queryKeyHashFn ||
|
|
2475
|
+
function it(t, e) {
|
|
2476
|
+
return (e?.queryKeyHashFn || J)(t);
|
|
2481
2477
|
}
|
|
2482
|
-
function
|
|
2478
|
+
function J(t) {
|
|
2483
2479
|
return JSON.stringify(
|
|
2484
2480
|
t,
|
|
2485
2481
|
(e, r) => We(r) ? Object.keys(r).sort().reduce((n, s) => (n[s] = r[s], n), {}) : r
|
|
2486
2482
|
);
|
|
2487
2483
|
}
|
|
2488
|
-
function
|
|
2489
|
-
return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((r) => !
|
|
2484
|
+
function fe(t, e) {
|
|
2485
|
+
return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((r) => !fe(t[r], e[r])) : !1;
|
|
2490
2486
|
}
|
|
2491
|
-
function
|
|
2487
|
+
function gr(t, e) {
|
|
2492
2488
|
if (t === e)
|
|
2493
2489
|
return t;
|
|
2494
|
-
const r =
|
|
2490
|
+
const r = qt(t) && qt(e);
|
|
2495
2491
|
if (r || We(t) && We(e)) {
|
|
2496
2492
|
const n = r ? t : Object.keys(t), s = n.length, i = r ? e : Object.keys(e), o = i.length, a = r ? [] : {};
|
|
2497
2493
|
let u = 0;
|
|
2498
2494
|
for (let h = 0; h < o; h++) {
|
|
2499
2495
|
const l = r ? h : i[h];
|
|
2500
|
-
!r && t[l] === void 0 && e[l] === void 0 && n.includes(l) ? (a[l] = void 0, u++) : (a[l] =
|
|
2496
|
+
!r && t[l] === void 0 && e[l] === void 0 && n.includes(l) ? (a[l] = void 0, u++) : (a[l] = gr(t[l], e[l]), a[l] === t[l] && t[l] !== void 0 && u++);
|
|
2501
2497
|
}
|
|
2502
2498
|
return s === o && u === s ? t : a;
|
|
2503
2499
|
}
|
|
2504
2500
|
return e;
|
|
2505
2501
|
}
|
|
2506
|
-
function
|
|
2502
|
+
function we(t, e) {
|
|
2507
2503
|
if (!e || Object.keys(t).length !== Object.keys(e).length)
|
|
2508
2504
|
return !1;
|
|
2509
2505
|
for (const r in t)
|
|
@@ -2511,44 +2507,44 @@ function Oe(t, e) {
|
|
|
2511
2507
|
return !1;
|
|
2512
2508
|
return !0;
|
|
2513
2509
|
}
|
|
2514
|
-
function
|
|
2510
|
+
function qt(t) {
|
|
2515
2511
|
return Array.isArray(t) && t.length === Object.keys(t).length;
|
|
2516
2512
|
}
|
|
2517
2513
|
function We(t) {
|
|
2518
|
-
if (!
|
|
2514
|
+
if (!xt(t))
|
|
2519
2515
|
return !1;
|
|
2520
2516
|
const e = t.constructor;
|
|
2521
2517
|
if (e === void 0)
|
|
2522
2518
|
return !0;
|
|
2523
2519
|
const r = e.prototype;
|
|
2524
|
-
return !(!
|
|
2520
|
+
return !(!xt(r) || !r.hasOwnProperty("isPrototypeOf"));
|
|
2525
2521
|
}
|
|
2526
|
-
function
|
|
2522
|
+
function xt(t) {
|
|
2527
2523
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
2528
2524
|
}
|
|
2529
|
-
function
|
|
2525
|
+
function $s(t) {
|
|
2530
2526
|
return new Promise((e) => {
|
|
2531
2527
|
setTimeout(e, t);
|
|
2532
2528
|
});
|
|
2533
2529
|
}
|
|
2534
2530
|
function ze(t, e, r) {
|
|
2535
|
-
return typeof r.structuralSharing == "function" ? r.structuralSharing(t, e) : r.structuralSharing !== !1 ?
|
|
2531
|
+
return typeof r.structuralSharing == "function" ? r.structuralSharing(t, e) : r.structuralSharing !== !1 ? gr(t, e) : e;
|
|
2536
2532
|
}
|
|
2537
|
-
function
|
|
2533
|
+
function Ks(t, e, r = 0) {
|
|
2538
2534
|
const n = [...t, e];
|
|
2539
2535
|
return r && n.length > r ? n.slice(1) : n;
|
|
2540
2536
|
}
|
|
2541
|
-
function
|
|
2537
|
+
function Ws(t, e, r = 0) {
|
|
2542
2538
|
const n = [e, ...t];
|
|
2543
2539
|
return r && n.length > r ? n.slice(0, -1) : n;
|
|
2544
2540
|
}
|
|
2545
|
-
var
|
|
2541
|
+
var he = Symbol(), zs = class extends se {
|
|
2546
2542
|
#e;
|
|
2547
2543
|
#t;
|
|
2548
|
-
#
|
|
2544
|
+
#n;
|
|
2549
2545
|
constructor() {
|
|
2550
|
-
super(), this.#
|
|
2551
|
-
if (!
|
|
2546
|
+
super(), this.#n = (t) => {
|
|
2547
|
+
if (!G && window.addEventListener) {
|
|
2552
2548
|
const e = () => t();
|
|
2553
2549
|
return window.addEventListener("visibilitychange", e, !1), () => {
|
|
2554
2550
|
window.removeEventListener("visibilitychange", e);
|
|
@@ -2557,13 +2553,13 @@ var fe = Symbol(), Ys = class extends ne {
|
|
|
2557
2553
|
};
|
|
2558
2554
|
}
|
|
2559
2555
|
onSubscribe() {
|
|
2560
|
-
this.#t || this.setEventListener(this.#
|
|
2556
|
+
this.#t || this.setEventListener(this.#n);
|
|
2561
2557
|
}
|
|
2562
2558
|
onUnsubscribe() {
|
|
2563
2559
|
this.hasListeners() || (this.#t?.(), this.#t = void 0);
|
|
2564
2560
|
}
|
|
2565
2561
|
setEventListener(t) {
|
|
2566
|
-
this.#
|
|
2562
|
+
this.#n = t, this.#t?.(), this.#t = t((e) => {
|
|
2567
2563
|
typeof e == "boolean" ? this.setFocused(e) : this.onFocus();
|
|
2568
2564
|
});
|
|
2569
2565
|
}
|
|
@@ -2579,13 +2575,13 @@ var fe = Symbol(), Ys = class extends ne {
|
|
|
2579
2575
|
isFocused() {
|
|
2580
2576
|
return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
|
|
2581
2577
|
}
|
|
2582
|
-
},
|
|
2578
|
+
}, ot = new zs(), Gs = class extends se {
|
|
2583
2579
|
#e = !0;
|
|
2584
2580
|
#t;
|
|
2585
|
-
#
|
|
2581
|
+
#n;
|
|
2586
2582
|
constructor() {
|
|
2587
|
-
super(), this.#
|
|
2588
|
-
if (!
|
|
2583
|
+
super(), this.#n = (t) => {
|
|
2584
|
+
if (!G && window.addEventListener) {
|
|
2589
2585
|
const e = () => t(!0), r = () => t(!1);
|
|
2590
2586
|
return window.addEventListener("online", e, !1), window.addEventListener("offline", r, !1), () => {
|
|
2591
2587
|
window.removeEventListener("online", e), window.removeEventListener("offline", r);
|
|
@@ -2594,13 +2590,13 @@ var fe = Symbol(), Ys = class extends ne {
|
|
|
2594
2590
|
};
|
|
2595
2591
|
}
|
|
2596
2592
|
onSubscribe() {
|
|
2597
|
-
this.#t || this.setEventListener(this.#
|
|
2593
|
+
this.#t || this.setEventListener(this.#n);
|
|
2598
2594
|
}
|
|
2599
2595
|
onUnsubscribe() {
|
|
2600
2596
|
this.hasListeners() || (this.#t?.(), this.#t = void 0);
|
|
2601
2597
|
}
|
|
2602
2598
|
setEventListener(t) {
|
|
2603
|
-
this.#
|
|
2599
|
+
this.#n = t, this.#t?.(), this.#t = t(this.setOnline.bind(this));
|
|
2604
2600
|
}
|
|
2605
2601
|
setOnline(t) {
|
|
2606
2602
|
this.#e !== t && (this.#e = t, this.listeners.forEach((r) => {
|
|
@@ -2610,105 +2606,103 @@ var fe = Symbol(), Ys = class extends ne {
|
|
|
2610
2606
|
isOnline() {
|
|
2611
2607
|
return this.#e;
|
|
2612
2608
|
}
|
|
2613
|
-
},
|
|
2614
|
-
function
|
|
2609
|
+
}, re = new Gs();
|
|
2610
|
+
function Js(t) {
|
|
2615
2611
|
return Math.min(1e3 * 2 ** t, 3e4);
|
|
2616
2612
|
}
|
|
2617
|
-
function
|
|
2618
|
-
return (t ?? "online") === "online" ?
|
|
2613
|
+
function vr(t) {
|
|
2614
|
+
return (t ?? "online") === "online" ? re.isOnline() : !0;
|
|
2619
2615
|
}
|
|
2620
|
-
var
|
|
2616
|
+
var br = class {
|
|
2621
2617
|
constructor(t) {
|
|
2622
2618
|
this.revert = t?.revert, this.silent = t?.silent;
|
|
2623
2619
|
}
|
|
2624
2620
|
};
|
|
2625
2621
|
function De(t) {
|
|
2626
|
-
return t instanceof
|
|
2622
|
+
return t instanceof br;
|
|
2627
2623
|
}
|
|
2628
|
-
function
|
|
2624
|
+
function Or(t) {
|
|
2629
2625
|
let e = !1, r = 0, n = !1, s, i, o;
|
|
2630
|
-
const a = new Promise((
|
|
2631
|
-
i =
|
|
2632
|
-
}), u = (
|
|
2633
|
-
n || (
|
|
2626
|
+
const a = new Promise((y, O) => {
|
|
2627
|
+
i = y, o = O;
|
|
2628
|
+
}), u = (y) => {
|
|
2629
|
+
n || (m(new br(y)), t.abort?.());
|
|
2634
2630
|
}, h = () => {
|
|
2635
2631
|
e = !0;
|
|
2636
2632
|
}, l = () => {
|
|
2637
2633
|
e = !1;
|
|
2638
|
-
}, c = () =>
|
|
2639
|
-
n || (n = !0, t.onSuccess?.(
|
|
2640
|
-
},
|
|
2641
|
-
n || (n = !0, t.onError?.(
|
|
2642
|
-
},
|
|
2643
|
-
s = (
|
|
2644
|
-
|
|
2645
|
-
return w && g(y), w;
|
|
2634
|
+
}, c = () => ot.isFocused() && (t.networkMode === "always" || re.isOnline()) && t.canRun(), f = () => vr(t.networkMode) && t.canRun(), v = (y) => {
|
|
2635
|
+
n || (n = !0, t.onSuccess?.(y), s?.(), i(y));
|
|
2636
|
+
}, m = (y) => {
|
|
2637
|
+
n || (n = !0, t.onError?.(y), s?.(), o(y));
|
|
2638
|
+
}, d = () => new Promise((y) => {
|
|
2639
|
+
s = (O) => {
|
|
2640
|
+
(n || c()) && y(O);
|
|
2646
2641
|
}, t.onPause?.();
|
|
2647
2642
|
}).then(() => {
|
|
2648
2643
|
s = void 0, n || t.onContinue?.();
|
|
2649
|
-
}),
|
|
2644
|
+
}), g = () => {
|
|
2650
2645
|
if (n)
|
|
2651
2646
|
return;
|
|
2652
|
-
let
|
|
2647
|
+
let y;
|
|
2653
2648
|
try {
|
|
2654
|
-
|
|
2655
|
-
} catch (
|
|
2656
|
-
|
|
2649
|
+
y = t.fn();
|
|
2650
|
+
} catch (O) {
|
|
2651
|
+
y = Promise.reject(O);
|
|
2657
2652
|
}
|
|
2658
|
-
Promise.resolve(
|
|
2653
|
+
Promise.resolve(y).then(v).catch((O) => {
|
|
2659
2654
|
if (n)
|
|
2660
2655
|
return;
|
|
2661
|
-
const
|
|
2662
|
-
if (e || !
|
|
2663
|
-
|
|
2656
|
+
const b = t.retry ?? (G ? 0 : 3), w = t.retryDelay ?? Js, P = typeof w == "function" ? w(r, O) : w, R = b === !0 || typeof b == "number" && r < b || typeof b == "function" && b(r, O);
|
|
2657
|
+
if (e || !R) {
|
|
2658
|
+
m(O);
|
|
2664
2659
|
return;
|
|
2665
2660
|
}
|
|
2666
|
-
r++, t.onFail?.(r,
|
|
2667
|
-
|
|
2668
|
-
return m();
|
|
2669
|
-
}).then(() => {
|
|
2670
|
-
e ? v(y) : f();
|
|
2661
|
+
r++, t.onFail?.(r, O), $s(P).then(() => c() ? void 0 : d()).then(() => {
|
|
2662
|
+
e ? m(O) : g();
|
|
2671
2663
|
});
|
|
2672
2664
|
});
|
|
2673
2665
|
};
|
|
2674
|
-
return
|
|
2666
|
+
return {
|
|
2675
2667
|
promise: a,
|
|
2676
2668
|
cancel: u,
|
|
2677
|
-
continue: () => s?.()
|
|
2669
|
+
continue: () => (s?.(), a),
|
|
2678
2670
|
cancelRetry: h,
|
|
2679
|
-
continueRetry: l
|
|
2671
|
+
continueRetry: l,
|
|
2672
|
+
canStart: f,
|
|
2673
|
+
start: () => (f() ? g() : d().then(g), a)
|
|
2680
2674
|
};
|
|
2681
2675
|
}
|
|
2682
|
-
function
|
|
2683
|
-
let t = [], e = 0, r = (
|
|
2684
|
-
|
|
2685
|
-
}, n = (
|
|
2686
|
-
|
|
2687
|
-
}, s = (
|
|
2688
|
-
const i = (
|
|
2689
|
-
s =
|
|
2690
|
-
}, o = (
|
|
2676
|
+
function Xs() {
|
|
2677
|
+
let t = [], e = 0, r = (f) => {
|
|
2678
|
+
f();
|
|
2679
|
+
}, n = (f) => {
|
|
2680
|
+
f();
|
|
2681
|
+
}, s = (f) => setTimeout(f, 0);
|
|
2682
|
+
const i = (f) => {
|
|
2683
|
+
s = f;
|
|
2684
|
+
}, o = (f) => {
|
|
2691
2685
|
let v;
|
|
2692
2686
|
e++;
|
|
2693
2687
|
try {
|
|
2694
|
-
v =
|
|
2688
|
+
v = f();
|
|
2695
2689
|
} finally {
|
|
2696
2690
|
e--, e || h();
|
|
2697
2691
|
}
|
|
2698
2692
|
return v;
|
|
2699
|
-
}, a = (
|
|
2700
|
-
e ? t.push(
|
|
2701
|
-
r(
|
|
2693
|
+
}, a = (f) => {
|
|
2694
|
+
e ? t.push(f) : s(() => {
|
|
2695
|
+
r(f);
|
|
2702
2696
|
});
|
|
2703
|
-
}, u = (
|
|
2697
|
+
}, u = (f) => (...v) => {
|
|
2704
2698
|
a(() => {
|
|
2705
|
-
|
|
2699
|
+
f(...v);
|
|
2706
2700
|
});
|
|
2707
2701
|
}, h = () => {
|
|
2708
|
-
const
|
|
2709
|
-
t = [],
|
|
2702
|
+
const f = t;
|
|
2703
|
+
t = [], f.length && s(() => {
|
|
2710
2704
|
n(() => {
|
|
2711
|
-
|
|
2705
|
+
f.forEach((v) => {
|
|
2712
2706
|
r(v);
|
|
2713
2707
|
});
|
|
2714
2708
|
});
|
|
@@ -2718,16 +2712,16 @@ function ti() {
|
|
|
2718
2712
|
batch: o,
|
|
2719
2713
|
batchCalls: u,
|
|
2720
2714
|
schedule: a,
|
|
2721
|
-
setNotifyFunction: (
|
|
2722
|
-
r =
|
|
2715
|
+
setNotifyFunction: (f) => {
|
|
2716
|
+
r = f;
|
|
2723
2717
|
},
|
|
2724
|
-
setBatchNotifyFunction: (
|
|
2725
|
-
n =
|
|
2718
|
+
setBatchNotifyFunction: (f) => {
|
|
2719
|
+
n = f;
|
|
2726
2720
|
},
|
|
2727
2721
|
setScheduler: i
|
|
2728
2722
|
};
|
|
2729
2723
|
}
|
|
2730
|
-
var T =
|
|
2724
|
+
var T = Xs(), wr = class {
|
|
2731
2725
|
#e;
|
|
2732
2726
|
destroy() {
|
|
2733
2727
|
this.clearGcTimeout();
|
|
@@ -2740,22 +2734,21 @@ var T = ti(), Sr = class {
|
|
|
2740
2734
|
updateGcTime(t) {
|
|
2741
2735
|
this.gcTime = Math.max(
|
|
2742
2736
|
this.gcTime || 0,
|
|
2743
|
-
t ?? (
|
|
2737
|
+
t ?? (G ? 1 / 0 : 5 * 60 * 1e3)
|
|
2744
2738
|
);
|
|
2745
2739
|
}
|
|
2746
2740
|
clearGcTimeout() {
|
|
2747
2741
|
this.#e && (clearTimeout(this.#e), this.#e = void 0);
|
|
2748
2742
|
}
|
|
2749
|
-
},
|
|
2743
|
+
}, Ys = class extends wr {
|
|
2750
2744
|
#e;
|
|
2751
2745
|
#t;
|
|
2752
|
-
#r;
|
|
2753
2746
|
#n;
|
|
2754
|
-
#
|
|
2747
|
+
#r;
|
|
2755
2748
|
#o;
|
|
2756
2749
|
#i;
|
|
2757
2750
|
constructor(t) {
|
|
2758
|
-
super(), this.#i = !1, this.#o = t.defaultOptions, this.setOptions(t.options), this
|
|
2751
|
+
super(), this.#i = !1, this.#o = t.defaultOptions, this.setOptions(t.options), this.observers = [], this.#n = t.cache, this.queryKey = t.queryKey, this.queryHash = t.queryHash, this.#e = t.state || Zs(this.options), this.state = this.#e, this.scheduleGc();
|
|
2759
2752
|
}
|
|
2760
2753
|
get meta() {
|
|
2761
2754
|
return this.options.meta;
|
|
@@ -2764,11 +2757,11 @@ var T = ti(), Sr = class {
|
|
|
2764
2757
|
this.options = { ...this.#o, ...t }, this.updateGcTime(this.options.gcTime);
|
|
2765
2758
|
}
|
|
2766
2759
|
optionalRemove() {
|
|
2767
|
-
!this
|
|
2760
|
+
!this.observers.length && this.state.fetchStatus === "idle" && this.#n.remove(this);
|
|
2768
2761
|
}
|
|
2769
2762
|
setData(t, e) {
|
|
2770
2763
|
const r = ze(this.state.data, t, this.options);
|
|
2771
|
-
return this.#
|
|
2764
|
+
return this.#s({
|
|
2772
2765
|
data: r,
|
|
2773
2766
|
type: "success",
|
|
2774
2767
|
dataUpdatedAt: e?.updatedAt,
|
|
@@ -2776,11 +2769,11 @@ var T = ti(), Sr = class {
|
|
|
2776
2769
|
}), r;
|
|
2777
2770
|
}
|
|
2778
2771
|
setState(t, e) {
|
|
2779
|
-
this.#
|
|
2772
|
+
this.#s({ type: "setState", state: t, setStateOptions: e });
|
|
2780
2773
|
}
|
|
2781
2774
|
cancel(t) {
|
|
2782
|
-
const e = this.#
|
|
2783
|
-
return this.#
|
|
2775
|
+
const e = this.#r?.promise;
|
|
2776
|
+
return this.#r?.cancel(t), e ? e.then(D).catch(D) : Promise.resolve();
|
|
2784
2777
|
}
|
|
2785
2778
|
destroy() {
|
|
2786
2779
|
super.destroy(), this.cancel({ silent: !0 });
|
|
@@ -2789,48 +2782,46 @@ var T = ti(), Sr = class {
|
|
|
2789
2782
|
this.destroy(), this.setState(this.#e);
|
|
2790
2783
|
}
|
|
2791
2784
|
isActive() {
|
|
2792
|
-
return this
|
|
2793
|
-
(t) => t.options.enabled !== !1
|
|
2794
|
-
);
|
|
2785
|
+
return this.observers.some((t) => t.options.enabled !== !1);
|
|
2795
2786
|
}
|
|
2796
2787
|
isDisabled() {
|
|
2797
2788
|
return this.getObserversCount() > 0 && !this.isActive();
|
|
2798
2789
|
}
|
|
2799
2790
|
isStale() {
|
|
2800
|
-
return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this
|
|
2791
|
+
return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
|
|
2801
2792
|
(t) => t.getCurrentResult().isStale
|
|
2802
2793
|
) : this.state.data === void 0;
|
|
2803
2794
|
}
|
|
2804
2795
|
isStaleByTime(t = 0) {
|
|
2805
|
-
return this.state.isInvalidated || this.state.data === void 0 || !
|
|
2796
|
+
return this.state.isInvalidated || this.state.data === void 0 || !mr(this.state.dataUpdatedAt, t);
|
|
2806
2797
|
}
|
|
2807
2798
|
onFocus() {
|
|
2808
|
-
this
|
|
2799
|
+
this.observers.find((e) => e.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#r?.continue();
|
|
2809
2800
|
}
|
|
2810
2801
|
onOnline() {
|
|
2811
|
-
this
|
|
2802
|
+
this.observers.find((e) => e.shouldFetchOnReconnect())?.refetch({ cancelRefetch: !1 }), this.#r?.continue();
|
|
2812
2803
|
}
|
|
2813
2804
|
addObserver(t) {
|
|
2814
|
-
this
|
|
2805
|
+
this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(), this.#n.notify({ type: "observerAdded", query: this, observer: t }));
|
|
2815
2806
|
}
|
|
2816
2807
|
removeObserver(t) {
|
|
2817
|
-
this
|
|
2808
|
+
this.observers.includes(t) && (this.observers = this.observers.filter((e) => e !== t), this.observers.length || (this.#r && (this.#i ? this.#r.cancel({ revert: !0 }) : this.#r.cancelRetry()), this.scheduleGc()), this.#n.notify({ type: "observerRemoved", query: this, observer: t }));
|
|
2818
2809
|
}
|
|
2819
2810
|
getObserversCount() {
|
|
2820
|
-
return this
|
|
2811
|
+
return this.observers.length;
|
|
2821
2812
|
}
|
|
2822
2813
|
invalidate() {
|
|
2823
|
-
this.state.isInvalidated || this.#
|
|
2814
|
+
this.state.isInvalidated || this.#s({ type: "invalidate" });
|
|
2824
2815
|
}
|
|
2825
2816
|
fetch(t, e) {
|
|
2826
2817
|
if (this.state.fetchStatus !== "idle") {
|
|
2827
2818
|
if (this.state.data !== void 0 && e?.cancelRefetch)
|
|
2828
2819
|
this.cancel({ silent: !0 });
|
|
2829
|
-
else if (this.#
|
|
2830
|
-
return this.#
|
|
2820
|
+
else if (this.#r)
|
|
2821
|
+
return this.#r.continueRetry(), this.#r.promise;
|
|
2831
2822
|
}
|
|
2832
2823
|
if (t && this.setOptions(t), !this.options.queryFn) {
|
|
2833
|
-
const u = this
|
|
2824
|
+
const u = this.observers.find((h) => h.options.queryFn);
|
|
2834
2825
|
u && this.setOptions(u.options);
|
|
2835
2826
|
}
|
|
2836
2827
|
process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
|
|
@@ -2846,9 +2837,9 @@ var T = ti(), Sr = class {
|
|
|
2846
2837
|
});
|
|
2847
2838
|
};
|
|
2848
2839
|
s(n);
|
|
2849
|
-
const i = () => (process.env.NODE_ENV !== "production" && this.options.queryFn ===
|
|
2840
|
+
const i = () => (process.env.NODE_ENV !== "production" && this.options.queryFn === he && console.error(
|
|
2850
2841
|
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${this.options.queryHash}'`
|
|
2851
|
-
), !this.options.queryFn || this.options.queryFn ===
|
|
2842
|
+
), !this.options.queryFn || this.options.queryFn === he ? Promise.reject(
|
|
2852
2843
|
new Error(`Missing queryFn: '${this.options.queryHash}'`)
|
|
2853
2844
|
) : (this.#i = !1, this.options.persister ? this.options.persister(
|
|
2854
2845
|
this.options.queryFn,
|
|
@@ -2866,21 +2857,21 @@ var T = ti(), Sr = class {
|
|
|
2866
2857
|
s(o), this.options.behavior?.onFetch(
|
|
2867
2858
|
o,
|
|
2868
2859
|
this
|
|
2869
|
-
), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== o.fetchOptions?.meta) && this.#
|
|
2860
|
+
), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== o.fetchOptions?.meta) && this.#s({ type: "fetch", meta: o.fetchOptions?.meta });
|
|
2870
2861
|
const a = (u) => {
|
|
2871
|
-
De(u) && u.silent || this.#
|
|
2862
|
+
De(u) && u.silent || this.#s({
|
|
2872
2863
|
type: "error",
|
|
2873
2864
|
error: u
|
|
2874
|
-
}), De(u) || (this.#
|
|
2865
|
+
}), De(u) || (this.#n.config.onError?.(
|
|
2875
2866
|
u,
|
|
2876
2867
|
this
|
|
2877
|
-
), this.#
|
|
2868
|
+
), this.#n.config.onSettled?.(
|
|
2878
2869
|
this.state.data,
|
|
2879
2870
|
u,
|
|
2880
2871
|
this
|
|
2881
2872
|
)), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
|
|
2882
2873
|
};
|
|
2883
|
-
return this.#
|
|
2874
|
+
return this.#r = Or({
|
|
2884
2875
|
fn: o.fetchFn,
|
|
2885
2876
|
abort: r.abort.bind(r),
|
|
2886
2877
|
onSuccess: (u) => {
|
|
@@ -2890,7 +2881,7 @@ var T = ti(), Sr = class {
|
|
|
2890
2881
|
), a(new Error(`${this.queryHash} data is undefined`));
|
|
2891
2882
|
return;
|
|
2892
2883
|
}
|
|
2893
|
-
this.setData(u), this.#
|
|
2884
|
+
this.setData(u), this.#n.config.onSuccess?.(u, this), this.#n.config.onSettled?.(
|
|
2894
2885
|
u,
|
|
2895
2886
|
this.state.error,
|
|
2896
2887
|
this
|
|
@@ -2898,20 +2889,21 @@ var T = ti(), Sr = class {
|
|
|
2898
2889
|
},
|
|
2899
2890
|
onError: a,
|
|
2900
2891
|
onFail: (u, h) => {
|
|
2901
|
-
this.#
|
|
2892
|
+
this.#s({ type: "failed", failureCount: u, error: h });
|
|
2902
2893
|
},
|
|
2903
2894
|
onPause: () => {
|
|
2904
|
-
this.#
|
|
2895
|
+
this.#s({ type: "pause" });
|
|
2905
2896
|
},
|
|
2906
2897
|
onContinue: () => {
|
|
2907
|
-
this.#
|
|
2898
|
+
this.#s({ type: "continue" });
|
|
2908
2899
|
},
|
|
2909
2900
|
retry: o.options.retry,
|
|
2910
2901
|
retryDelay: o.options.retryDelay,
|
|
2911
|
-
networkMode: o.options.networkMode
|
|
2912
|
-
|
|
2902
|
+
networkMode: o.options.networkMode,
|
|
2903
|
+
canRun: () => !0
|
|
2904
|
+
}), this.#r.start();
|
|
2913
2905
|
}
|
|
2914
|
-
#
|
|
2906
|
+
#s(t) {
|
|
2915
2907
|
const e = (r) => {
|
|
2916
2908
|
switch (t.type) {
|
|
2917
2909
|
case "failed":
|
|
@@ -2933,7 +2925,7 @@ var T = ti(), Sr = class {
|
|
|
2933
2925
|
case "fetch":
|
|
2934
2926
|
return {
|
|
2935
2927
|
...r,
|
|
2936
|
-
...
|
|
2928
|
+
...Er(r.data, this.options),
|
|
2937
2929
|
fetchMeta: t.meta ?? null
|
|
2938
2930
|
};
|
|
2939
2931
|
case "success":
|
|
@@ -2976,24 +2968,24 @@ var T = ti(), Sr = class {
|
|
|
2976
2968
|
}
|
|
2977
2969
|
};
|
|
2978
2970
|
this.state = e(this.state), T.batch(() => {
|
|
2979
|
-
this
|
|
2971
|
+
this.observers.forEach((r) => {
|
|
2980
2972
|
r.onQueryUpdate();
|
|
2981
|
-
}), this.#
|
|
2973
|
+
}), this.#n.notify({ query: this, type: "updated", action: t });
|
|
2982
2974
|
});
|
|
2983
2975
|
}
|
|
2984
2976
|
};
|
|
2985
|
-
function
|
|
2977
|
+
function Er(t, e) {
|
|
2986
2978
|
return {
|
|
2987
2979
|
fetchFailureCount: 0,
|
|
2988
2980
|
fetchFailureReason: null,
|
|
2989
|
-
fetchStatus:
|
|
2981
|
+
fetchStatus: vr(e.networkMode) ? "fetching" : "paused",
|
|
2990
2982
|
...t === void 0 && {
|
|
2991
2983
|
error: null,
|
|
2992
2984
|
status: "pending"
|
|
2993
2985
|
}
|
|
2994
2986
|
};
|
|
2995
2987
|
}
|
|
2996
|
-
function
|
|
2988
|
+
function Zs(t) {
|
|
2997
2989
|
const e = typeof t.initialData == "function" ? t.initialData() : t.initialData, r = e !== void 0, n = r ? typeof t.initialDataUpdatedAt == "function" ? t.initialDataUpdatedAt() : t.initialDataUpdatedAt : 0;
|
|
2998
2990
|
return {
|
|
2999
2991
|
data: e,
|
|
@@ -3010,15 +3002,15 @@ function ni(t) {
|
|
|
3010
3002
|
fetchStatus: "idle"
|
|
3011
3003
|
};
|
|
3012
3004
|
}
|
|
3013
|
-
var
|
|
3005
|
+
var Sr = class extends se {
|
|
3014
3006
|
constructor(e = {}) {
|
|
3015
3007
|
super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
|
|
3016
3008
|
}
|
|
3017
3009
|
#e;
|
|
3018
3010
|
build(e, r, n) {
|
|
3019
|
-
const s = r.queryKey, i = r.queryHash ??
|
|
3011
|
+
const s = r.queryKey, i = r.queryHash ?? it(s, r);
|
|
3020
3012
|
let o = this.get(i);
|
|
3021
|
-
return o || (o = new
|
|
3013
|
+
return o || (o = new Ys({
|
|
3022
3014
|
cache: this,
|
|
3023
3015
|
queryKey: s,
|
|
3024
3016
|
queryHash: i,
|
|
@@ -3053,12 +3045,12 @@ var Rr = class extends ne {
|
|
|
3053
3045
|
find(e) {
|
|
3054
3046
|
const r = { exact: !0, ...e };
|
|
3055
3047
|
return this.getAll().find(
|
|
3056
|
-
(n) =>
|
|
3048
|
+
(n) => Ct(r, n)
|
|
3057
3049
|
);
|
|
3058
3050
|
}
|
|
3059
3051
|
findAll(e = {}) {
|
|
3060
3052
|
const r = this.getAll();
|
|
3061
|
-
return Object.keys(e).length > 0 ? r.filter((n) =>
|
|
3053
|
+
return Object.keys(e).length > 0 ? r.filter((n) => Ct(e, n)) : r;
|
|
3062
3054
|
}
|
|
3063
3055
|
notify(e) {
|
|
3064
3056
|
T.batch(() => {
|
|
@@ -3081,86 +3073,88 @@ var Rr = class extends ne {
|
|
|
3081
3073
|
});
|
|
3082
3074
|
});
|
|
3083
3075
|
}
|
|
3084
|
-
},
|
|
3076
|
+
}, ei = class extends wr {
|
|
3085
3077
|
#e;
|
|
3086
3078
|
#t;
|
|
3087
|
-
#r;
|
|
3088
3079
|
#n;
|
|
3089
3080
|
constructor(t) {
|
|
3090
|
-
super(), this.mutationId = t.mutationId, this.#t = t.
|
|
3081
|
+
super(), this.mutationId = t.mutationId, this.#t = t.mutationCache, this.#e = [], this.state = t.state || Ar(), this.setOptions(t.options), this.scheduleGc();
|
|
3091
3082
|
}
|
|
3092
3083
|
setOptions(t) {
|
|
3093
|
-
this.options =
|
|
3084
|
+
this.options = t, this.updateGcTime(this.options.gcTime);
|
|
3094
3085
|
}
|
|
3095
3086
|
get meta() {
|
|
3096
3087
|
return this.options.meta;
|
|
3097
3088
|
}
|
|
3098
3089
|
addObserver(t) {
|
|
3099
|
-
this.#e.includes(t) || (this.#e.push(t), this.clearGcTimeout(), this.#
|
|
3090
|
+
this.#e.includes(t) || (this.#e.push(t), this.clearGcTimeout(), this.#t.notify({
|
|
3100
3091
|
type: "observerAdded",
|
|
3101
3092
|
mutation: this,
|
|
3102
3093
|
observer: t
|
|
3103
3094
|
}));
|
|
3104
3095
|
}
|
|
3105
3096
|
removeObserver(t) {
|
|
3106
|
-
this.#e = this.#e.filter((e) => e !== t), this.scheduleGc(), this.#
|
|
3097
|
+
this.#e = this.#e.filter((e) => e !== t), this.scheduleGc(), this.#t.notify({
|
|
3107
3098
|
type: "observerRemoved",
|
|
3108
3099
|
mutation: this,
|
|
3109
3100
|
observer: t
|
|
3110
3101
|
});
|
|
3111
3102
|
}
|
|
3112
3103
|
optionalRemove() {
|
|
3113
|
-
this.#e.length || (this.state.status === "pending" ? this.scheduleGc() : this.#
|
|
3104
|
+
this.#e.length || (this.state.status === "pending" ? this.scheduleGc() : this.#t.remove(this));
|
|
3114
3105
|
}
|
|
3115
3106
|
continue() {
|
|
3116
3107
|
return this.#n?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
|
|
3117
3108
|
this.execute(this.state.variables);
|
|
3118
3109
|
}
|
|
3119
3110
|
async execute(t) {
|
|
3120
|
-
|
|
3111
|
+
this.#n = Or({
|
|
3121
3112
|
fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
|
|
3122
3113
|
onFail: (n, s) => {
|
|
3123
|
-
this.#
|
|
3114
|
+
this.#r({ type: "failed", failureCount: n, error: s });
|
|
3124
3115
|
},
|
|
3125
3116
|
onPause: () => {
|
|
3126
|
-
this.#
|
|
3117
|
+
this.#r({ type: "pause" });
|
|
3127
3118
|
},
|
|
3128
3119
|
onContinue: () => {
|
|
3129
|
-
this.#
|
|
3120
|
+
this.#r({ type: "continue" });
|
|
3130
3121
|
},
|
|
3131
3122
|
retry: this.options.retry ?? 0,
|
|
3132
3123
|
retryDelay: this.options.retryDelay,
|
|
3133
|
-
networkMode: this.options.networkMode
|
|
3134
|
-
|
|
3124
|
+
networkMode: this.options.networkMode,
|
|
3125
|
+
canRun: () => this.#t.canRun(this)
|
|
3126
|
+
});
|
|
3127
|
+
const e = this.state.status === "pending", r = !this.#n.canStart();
|
|
3135
3128
|
try {
|
|
3136
|
-
if (!
|
|
3137
|
-
this.#
|
|
3129
|
+
if (!e) {
|
|
3130
|
+
this.#r({ type: "pending", variables: t, isPaused: r }), await this.#t.config.onMutate?.(
|
|
3138
3131
|
t,
|
|
3139
3132
|
this
|
|
3140
3133
|
);
|
|
3141
3134
|
const s = await this.options.onMutate?.(t);
|
|
3142
|
-
s !== this.state.context && this.#
|
|
3135
|
+
s !== this.state.context && this.#r({
|
|
3143
3136
|
type: "pending",
|
|
3144
3137
|
context: s,
|
|
3145
|
-
variables: t
|
|
3138
|
+
variables: t,
|
|
3139
|
+
isPaused: r
|
|
3146
3140
|
});
|
|
3147
3141
|
}
|
|
3148
|
-
const n = await
|
|
3149
|
-
return await this.#
|
|
3142
|
+
const n = await this.#n.start();
|
|
3143
|
+
return await this.#t.config.onSuccess?.(
|
|
3150
3144
|
n,
|
|
3151
3145
|
t,
|
|
3152
3146
|
this.state.context,
|
|
3153
3147
|
this
|
|
3154
|
-
), await this.options.onSuccess?.(n, t, this.state.context), await this.#
|
|
3148
|
+
), await this.options.onSuccess?.(n, t, this.state.context), await this.#t.config.onSettled?.(
|
|
3155
3149
|
n,
|
|
3156
3150
|
null,
|
|
3157
3151
|
this.state.variables,
|
|
3158
3152
|
this.state.context,
|
|
3159
3153
|
this
|
|
3160
|
-
), await this.options.onSettled?.(n, null, t, this.state.context), this.#
|
|
3154
|
+
), await this.options.onSettled?.(n, null, t, this.state.context), this.#r({ type: "success", data: n }), n;
|
|
3161
3155
|
} catch (n) {
|
|
3162
3156
|
try {
|
|
3163
|
-
throw await this.#
|
|
3157
|
+
throw await this.#t.config.onError?.(
|
|
3164
3158
|
n,
|
|
3165
3159
|
t,
|
|
3166
3160
|
this.state.context,
|
|
@@ -3169,7 +3163,7 @@ var Rr = class extends ne {
|
|
|
3169
3163
|
n,
|
|
3170
3164
|
t,
|
|
3171
3165
|
this.state.context
|
|
3172
|
-
), await this.#
|
|
3166
|
+
), await this.#t.config.onSettled?.(
|
|
3173
3167
|
void 0,
|
|
3174
3168
|
n,
|
|
3175
3169
|
this.state.variables,
|
|
@@ -3182,11 +3176,13 @@ var Rr = class extends ne {
|
|
|
3182
3176
|
this.state.context
|
|
3183
3177
|
), n;
|
|
3184
3178
|
} finally {
|
|
3185
|
-
this.#
|
|
3179
|
+
this.#r({ type: "error", error: n });
|
|
3186
3180
|
}
|
|
3181
|
+
} finally {
|
|
3182
|
+
this.#t.runNext(this);
|
|
3187
3183
|
}
|
|
3188
3184
|
}
|
|
3189
|
-
#
|
|
3185
|
+
#r(t) {
|
|
3190
3186
|
const e = (r) => {
|
|
3191
3187
|
switch (t.type) {
|
|
3192
3188
|
case "failed":
|
|
@@ -3213,7 +3209,7 @@ var Rr = class extends ne {
|
|
|
3213
3209
|
failureCount: 0,
|
|
3214
3210
|
failureReason: null,
|
|
3215
3211
|
error: null,
|
|
3216
|
-
isPaused:
|
|
3212
|
+
isPaused: t.isPaused,
|
|
3217
3213
|
status: "pending",
|
|
3218
3214
|
variables: t.variables,
|
|
3219
3215
|
submittedAt: Date.now()
|
|
@@ -3243,7 +3239,7 @@ var Rr = class extends ne {
|
|
|
3243
3239
|
this.state = e(this.state), T.batch(() => {
|
|
3244
3240
|
this.#e.forEach((r) => {
|
|
3245
3241
|
r.onMutationUpdate(t);
|
|
3246
|
-
}), this.#
|
|
3242
|
+
}), this.#t.notify({
|
|
3247
3243
|
mutation: this,
|
|
3248
3244
|
type: "updated",
|
|
3249
3245
|
action: t
|
|
@@ -3251,7 +3247,7 @@ var Rr = class extends ne {
|
|
|
3251
3247
|
});
|
|
3252
3248
|
}
|
|
3253
3249
|
};
|
|
3254
|
-
function
|
|
3250
|
+
function Ar() {
|
|
3255
3251
|
return {
|
|
3256
3252
|
context: void 0,
|
|
3257
3253
|
data: void 0,
|
|
@@ -3264,15 +3260,14 @@ function Fr() {
|
|
|
3264
3260
|
submittedAt: 0
|
|
3265
3261
|
};
|
|
3266
3262
|
}
|
|
3267
|
-
var
|
|
3263
|
+
var Rr = class extends se {
|
|
3268
3264
|
constructor(e = {}) {
|
|
3269
|
-
super(), this.config = e, this.#e =
|
|
3265
|
+
super(), this.config = e, this.#e = /* @__PURE__ */ new Map(), this.#t = Date.now();
|
|
3270
3266
|
}
|
|
3271
3267
|
#e;
|
|
3272
3268
|
#t;
|
|
3273
|
-
#r;
|
|
3274
3269
|
build(e, r, n) {
|
|
3275
|
-
const s = new
|
|
3270
|
+
const s = new ei({
|
|
3276
3271
|
mutationCache: this,
|
|
3277
3272
|
mutationId: ++this.#t,
|
|
3278
3273
|
options: e.defaultMutationOptions(r),
|
|
@@ -3281,31 +3276,42 @@ var Pr = class extends ne {
|
|
|
3281
3276
|
return this.add(s), s;
|
|
3282
3277
|
}
|
|
3283
3278
|
add(e) {
|
|
3284
|
-
|
|
3279
|
+
const r = ge(e), n = this.#e.get(r) ?? [];
|
|
3280
|
+
n.push(e), this.#e.set(r, n), this.notify({ type: "added", mutation: e });
|
|
3285
3281
|
}
|
|
3286
3282
|
remove(e) {
|
|
3287
|
-
|
|
3283
|
+
const r = ge(e);
|
|
3284
|
+
if (this.#e.has(r)) {
|
|
3285
|
+
const n = this.#e.get(r)?.filter((s) => s !== e);
|
|
3286
|
+
n && (n.length === 0 ? this.#e.delete(r) : this.#e.set(r, n));
|
|
3287
|
+
}
|
|
3288
|
+
this.notify({ type: "removed", mutation: e });
|
|
3289
|
+
}
|
|
3290
|
+
canRun(e) {
|
|
3291
|
+
const r = this.#e.get(ge(e))?.find((n) => n.state.status === "pending");
|
|
3292
|
+
return !r || r === e;
|
|
3293
|
+
}
|
|
3294
|
+
runNext(e) {
|
|
3295
|
+
return this.#e.get(ge(e))?.find((n) => n !== e && n.state.isPaused)?.continue() ?? Promise.resolve();
|
|
3288
3296
|
}
|
|
3289
3297
|
clear() {
|
|
3290
3298
|
T.batch(() => {
|
|
3291
|
-
this
|
|
3299
|
+
this.getAll().forEach((e) => {
|
|
3292
3300
|
this.remove(e);
|
|
3293
3301
|
});
|
|
3294
3302
|
});
|
|
3295
3303
|
}
|
|
3296
3304
|
getAll() {
|
|
3297
|
-
return this.#e;
|
|
3305
|
+
return [...this.#e.values()].flat();
|
|
3298
3306
|
}
|
|
3299
3307
|
find(e) {
|
|
3300
3308
|
const r = { exact: !0, ...e };
|
|
3301
|
-
return this
|
|
3302
|
-
(n) =>
|
|
3309
|
+
return this.getAll().find(
|
|
3310
|
+
(n) => Tt(r, n)
|
|
3303
3311
|
);
|
|
3304
3312
|
}
|
|
3305
3313
|
findAll(e = {}) {
|
|
3306
|
-
return this
|
|
3307
|
-
(r) => Dt(e, r)
|
|
3308
|
-
);
|
|
3314
|
+
return this.getAll().filter((r) => Tt(e, r));
|
|
3309
3315
|
}
|
|
3310
3316
|
notify(e) {
|
|
3311
3317
|
T.batch(() => {
|
|
@@ -3315,20 +3321,18 @@ var Pr = class extends ne {
|
|
|
3315
3321
|
});
|
|
3316
3322
|
}
|
|
3317
3323
|
resumePausedMutations() {
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
() =>
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
)
|
|
3325
|
-
);
|
|
3326
|
-
}).then(() => {
|
|
3327
|
-
this.#r = void 0;
|
|
3328
|
-
}), this.#r;
|
|
3324
|
+
const e = this.getAll().filter((r) => r.state.isPaused);
|
|
3325
|
+
return T.batch(
|
|
3326
|
+
() => Promise.all(
|
|
3327
|
+
e.map((r) => r.continue().catch(D))
|
|
3328
|
+
)
|
|
3329
|
+
);
|
|
3329
3330
|
}
|
|
3330
3331
|
};
|
|
3331
|
-
function
|
|
3332
|
+
function ge(t) {
|
|
3333
|
+
return t.options.scope?.id ?? String(t.mutationId);
|
|
3334
|
+
}
|
|
3335
|
+
function ti(t) {
|
|
3332
3336
|
return {
|
|
3333
3337
|
onFetch: (e, r) => {
|
|
3334
3338
|
const n = async () => {
|
|
@@ -3341,46 +3345,46 @@ function ii(t) {
|
|
|
3341
3345
|
h = !0;
|
|
3342
3346
|
}), e.signal)
|
|
3343
3347
|
});
|
|
3344
|
-
}, c = e.options.queryFn && e.options.queryFn !==
|
|
3348
|
+
}, c = e.options.queryFn && e.options.queryFn !== he ? e.options.queryFn : () => (process.env.NODE_ENV !== "production" && e.options.queryFn === he && console.error(
|
|
3345
3349
|
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.options.queryHash}'`
|
|
3346
3350
|
), Promise.reject(
|
|
3347
3351
|
new Error(`Missing queryFn: '${e.options.queryHash}'`)
|
|
3348
|
-
)),
|
|
3352
|
+
)), f = async (m, d, g) => {
|
|
3349
3353
|
if (h)
|
|
3350
3354
|
return Promise.reject();
|
|
3351
|
-
if (
|
|
3355
|
+
if (d == null && m.pages.length)
|
|
3352
3356
|
return Promise.resolve(m);
|
|
3353
3357
|
const y = {
|
|
3354
3358
|
queryKey: e.queryKey,
|
|
3355
|
-
pageParam:
|
|
3359
|
+
pageParam: d,
|
|
3356
3360
|
direction: g ? "backward" : "forward",
|
|
3357
3361
|
meta: e.options.meta
|
|
3358
3362
|
};
|
|
3359
3363
|
l(y);
|
|
3360
|
-
const
|
|
3364
|
+
const O = await c(
|
|
3361
3365
|
y
|
|
3362
|
-
), { maxPages: b } = e.options,
|
|
3366
|
+
), { maxPages: b } = e.options, w = g ? Ws : Ks;
|
|
3363
3367
|
return {
|
|
3364
|
-
pages:
|
|
3365
|
-
pageParams:
|
|
3368
|
+
pages: w(m.pages, O, b),
|
|
3369
|
+
pageParams: w(m.pageParams, d, b)
|
|
3366
3370
|
};
|
|
3367
3371
|
};
|
|
3368
3372
|
let v;
|
|
3369
3373
|
if (i && o.length) {
|
|
3370
|
-
const m = i === "backward",
|
|
3374
|
+
const m = i === "backward", d = m ? ri : Dt, g = {
|
|
3371
3375
|
pages: o,
|
|
3372
3376
|
pageParams: a
|
|
3373
|
-
}, y =
|
|
3374
|
-
v = await
|
|
3377
|
+
}, y = d(s, g);
|
|
3378
|
+
v = await f(g, y, m);
|
|
3375
3379
|
} else {
|
|
3376
|
-
v = await
|
|
3380
|
+
v = await f(
|
|
3377
3381
|
u,
|
|
3378
3382
|
a[0] ?? s.initialPageParam
|
|
3379
3383
|
);
|
|
3380
3384
|
const m = t ?? o.length;
|
|
3381
|
-
for (let
|
|
3382
|
-
const g =
|
|
3383
|
-
v = await
|
|
3385
|
+
for (let d = 1; d < m; d++) {
|
|
3386
|
+
const g = Dt(s, v);
|
|
3387
|
+
v = await f(v, g);
|
|
3384
3388
|
}
|
|
3385
3389
|
}
|
|
3386
3390
|
return v;
|
|
@@ -3397,7 +3401,7 @@ function ii(t) {
|
|
|
3397
3401
|
}
|
|
3398
3402
|
};
|
|
3399
3403
|
}
|
|
3400
|
-
function
|
|
3404
|
+
function Dt(t, { pages: e, pageParams: r }) {
|
|
3401
3405
|
const n = e.length - 1;
|
|
3402
3406
|
return t.getNextPageParam(
|
|
3403
3407
|
e[n],
|
|
@@ -3406,7 +3410,7 @@ function Ut(t, { pages: e, pageParams: r }) {
|
|
|
3406
3410
|
r
|
|
3407
3411
|
);
|
|
3408
3412
|
}
|
|
3409
|
-
function
|
|
3413
|
+
function ri(t, { pages: e, pageParams: r }) {
|
|
3410
3414
|
return t.getPreviousPageParam?.(
|
|
3411
3415
|
e[0],
|
|
3412
3416
|
e,
|
|
@@ -3414,27 +3418,27 @@ function oi(t, { pages: e, pageParams: r }) {
|
|
|
3414
3418
|
r
|
|
3415
3419
|
);
|
|
3416
3420
|
}
|
|
3417
|
-
var
|
|
3421
|
+
var ni = class {
|
|
3418
3422
|
#e;
|
|
3419
3423
|
#t;
|
|
3420
|
-
#r;
|
|
3421
3424
|
#n;
|
|
3422
|
-
#
|
|
3425
|
+
#r;
|
|
3423
3426
|
#o;
|
|
3424
3427
|
#i;
|
|
3428
|
+
#s;
|
|
3425
3429
|
#a;
|
|
3426
3430
|
constructor(e = {}) {
|
|
3427
|
-
this.#e = e.queryCache || new
|
|
3431
|
+
this.#e = e.queryCache || new Sr(), this.#t = e.mutationCache || new Rr(), this.#n = e.defaultOptions || {}, this.#r = /* @__PURE__ */ new Map(), this.#o = /* @__PURE__ */ new Map(), this.#i = 0;
|
|
3428
3432
|
}
|
|
3429
3433
|
mount() {
|
|
3430
|
-
this.#
|
|
3434
|
+
this.#i++, this.#i === 1 && (this.#s = ot.subscribe(async (e) => {
|
|
3431
3435
|
e && (await this.resumePausedMutations(), this.#e.onFocus());
|
|
3432
|
-
}), this.#a =
|
|
3436
|
+
}), this.#a = re.subscribe(async (e) => {
|
|
3433
3437
|
e && (await this.resumePausedMutations(), this.#e.onOnline());
|
|
3434
3438
|
}));
|
|
3435
3439
|
}
|
|
3436
3440
|
unmount() {
|
|
3437
|
-
this.#
|
|
3441
|
+
this.#i--, this.#i === 0 && (this.#s?.(), this.#s = void 0, this.#a?.(), this.#a = void 0);
|
|
3438
3442
|
}
|
|
3439
3443
|
isFetching(e) {
|
|
3440
3444
|
return this.#e.findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
@@ -3464,7 +3468,7 @@ var ai = class {
|
|
|
3464
3468
|
setQueryData(e, r, n) {
|
|
3465
3469
|
const s = this.defaultQueryOptions({ queryKey: e }), o = this.#e.get(
|
|
3466
3470
|
s.queryHash
|
|
3467
|
-
)?.state.data, a =
|
|
3471
|
+
)?.state.data, a = Vs(r, o);
|
|
3468
3472
|
if (a !== void 0)
|
|
3469
3473
|
return this.#e.build(this, s).setData(a, { ...n, manual: !0 });
|
|
3470
3474
|
}
|
|
@@ -3538,13 +3542,13 @@ var ai = class {
|
|
|
3538
3542
|
return this.fetchQuery(e).then(D).catch(D);
|
|
3539
3543
|
}
|
|
3540
3544
|
fetchInfiniteQuery(e) {
|
|
3541
|
-
return e.behavior =
|
|
3545
|
+
return e.behavior = ti(e.pages), this.fetchQuery(e);
|
|
3542
3546
|
}
|
|
3543
3547
|
prefetchInfiniteQuery(e) {
|
|
3544
3548
|
return this.fetchInfiniteQuery(e).then(D).catch(D);
|
|
3545
3549
|
}
|
|
3546
3550
|
resumePausedMutations() {
|
|
3547
|
-
return
|
|
3551
|
+
return re.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
|
|
3548
3552
|
}
|
|
3549
3553
|
getQueryCache() {
|
|
3550
3554
|
return this.#e;
|
|
@@ -3553,54 +3557,54 @@ var ai = class {
|
|
|
3553
3557
|
return this.#t;
|
|
3554
3558
|
}
|
|
3555
3559
|
getDefaultOptions() {
|
|
3556
|
-
return this.#
|
|
3560
|
+
return this.#n;
|
|
3557
3561
|
}
|
|
3558
3562
|
setDefaultOptions(e) {
|
|
3559
|
-
this.#
|
|
3563
|
+
this.#n = e;
|
|
3560
3564
|
}
|
|
3561
3565
|
setQueryDefaults(e, r) {
|
|
3562
|
-
this.#
|
|
3566
|
+
this.#r.set(J(e), {
|
|
3563
3567
|
queryKey: e,
|
|
3564
3568
|
defaultOptions: r
|
|
3565
3569
|
});
|
|
3566
3570
|
}
|
|
3567
3571
|
getQueryDefaults(e) {
|
|
3568
|
-
const r = [...this.#
|
|
3572
|
+
const r = [...this.#r.values()];
|
|
3569
3573
|
let n = {};
|
|
3570
3574
|
return r.forEach((s) => {
|
|
3571
|
-
|
|
3575
|
+
fe(e, s.queryKey) && (n = { ...n, ...s.defaultOptions });
|
|
3572
3576
|
}), n;
|
|
3573
3577
|
}
|
|
3574
3578
|
setMutationDefaults(e, r) {
|
|
3575
|
-
this.#
|
|
3579
|
+
this.#o.set(J(e), {
|
|
3576
3580
|
mutationKey: e,
|
|
3577
3581
|
defaultOptions: r
|
|
3578
3582
|
});
|
|
3579
3583
|
}
|
|
3580
3584
|
getMutationDefaults(e) {
|
|
3581
|
-
const r = [...this.#
|
|
3585
|
+
const r = [...this.#o.values()];
|
|
3582
3586
|
let n = {};
|
|
3583
3587
|
return r.forEach((s) => {
|
|
3584
|
-
|
|
3588
|
+
fe(e, s.mutationKey) && (n = { ...n, ...s.defaultOptions });
|
|
3585
3589
|
}), n;
|
|
3586
3590
|
}
|
|
3587
3591
|
defaultQueryOptions(e) {
|
|
3588
3592
|
if (e._defaulted)
|
|
3589
3593
|
return e;
|
|
3590
3594
|
const r = {
|
|
3591
|
-
...this.#
|
|
3595
|
+
...this.#n.queries,
|
|
3592
3596
|
...this.getQueryDefaults(e.queryKey),
|
|
3593
3597
|
...e,
|
|
3594
3598
|
_defaulted: !0
|
|
3595
3599
|
};
|
|
3596
|
-
return r.queryHash || (r.queryHash =
|
|
3600
|
+
return r.queryHash || (r.queryHash = it(
|
|
3597
3601
|
r.queryKey,
|
|
3598
3602
|
r
|
|
3599
|
-
)), r.refetchOnReconnect === void 0 && (r.refetchOnReconnect = r.networkMode !== "always"), r.throwOnError === void 0 && (r.throwOnError = !!r.suspense), !r.networkMode && r.persister && (r.networkMode = "offlineFirst"), r.enabled !== !0 && r.queryFn ===
|
|
3603
|
+
)), r.refetchOnReconnect === void 0 && (r.refetchOnReconnect = r.networkMode !== "always"), r.throwOnError === void 0 && (r.throwOnError = !!r.suspense), !r.networkMode && r.persister && (r.networkMode = "offlineFirst"), r.enabled !== !0 && r.queryFn === he && (r.enabled = !1), r;
|
|
3600
3604
|
}
|
|
3601
3605
|
defaultMutationOptions(e) {
|
|
3602
3606
|
return e?._defaulted ? e : {
|
|
3603
|
-
...this.#
|
|
3607
|
+
...this.#n.mutations,
|
|
3604
3608
|
...e?.mutationKey && this.getMutationDefaults(e.mutationKey),
|
|
3605
3609
|
...e,
|
|
3606
3610
|
_defaulted: !0
|
|
@@ -3609,17 +3613,17 @@ var ai = class {
|
|
|
3609
3613
|
clear() {
|
|
3610
3614
|
this.#e.clear(), this.#t.clear();
|
|
3611
3615
|
}
|
|
3612
|
-
},
|
|
3616
|
+
}, si = class extends se {
|
|
3613
3617
|
constructor(t, e) {
|
|
3614
|
-
super(), this.options = e, this.#e = t, this.#
|
|
3618
|
+
super(), this.options = e, this.#e = t, this.#s = null, this.bindMethods(), this.setOptions(e);
|
|
3615
3619
|
}
|
|
3616
3620
|
#e;
|
|
3617
3621
|
#t = void 0;
|
|
3618
|
-
#r = void 0;
|
|
3619
3622
|
#n = void 0;
|
|
3620
|
-
#
|
|
3623
|
+
#r = void 0;
|
|
3621
3624
|
#o;
|
|
3622
3625
|
#i;
|
|
3626
|
+
#s;
|
|
3623
3627
|
#a;
|
|
3624
3628
|
#h;
|
|
3625
3629
|
// This property keeps track of the last query with defined data.
|
|
@@ -3633,7 +3637,7 @@ var ai = class {
|
|
|
3633
3637
|
this.refetch = this.refetch.bind(this);
|
|
3634
3638
|
}
|
|
3635
3639
|
onSubscribe() {
|
|
3636
|
-
this.listeners.size === 1 && (this.#t.addObserver(this),
|
|
3640
|
+
this.listeners.size === 1 && (this.#t.addObserver(this), _t(this.#t, this.options) ? this.#f() : this.updateResult(), this.#v());
|
|
3637
3641
|
}
|
|
3638
3642
|
onUnsubscribe() {
|
|
3639
3643
|
this.hasListeners() || this.destroy();
|
|
@@ -3659,13 +3663,13 @@ var ai = class {
|
|
|
3659
3663
|
const r = this.options, n = this.#t;
|
|
3660
3664
|
if (this.options = this.#e.defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean")
|
|
3661
3665
|
throw new Error("Expected enabled to be a boolean");
|
|
3662
|
-
this.#w(), this.#t.setOptions(this.options), r._defaulted && !
|
|
3666
|
+
this.#w(), this.#t.setOptions(this.options), r._defaulted && !we(this.options, r) && this.#e.getQueryCache().notify({
|
|
3663
3667
|
type: "observerOptionsUpdated",
|
|
3664
3668
|
query: this.#t,
|
|
3665
3669
|
observer: this
|
|
3666
3670
|
});
|
|
3667
3671
|
const s = this.hasListeners();
|
|
3668
|
-
s &&
|
|
3672
|
+
s && Nt(
|
|
3669
3673
|
this.#t,
|
|
3670
3674
|
n,
|
|
3671
3675
|
this.options,
|
|
@@ -3676,10 +3680,10 @@ var ai = class {
|
|
|
3676
3680
|
}
|
|
3677
3681
|
getOptimisticResult(t) {
|
|
3678
3682
|
const e = this.#e.getQueryCache().build(this.#e, t), r = this.createResult(e, t);
|
|
3679
|
-
return
|
|
3683
|
+
return oi(this, r) && (this.#r = r, this.#i = this.options, this.#o = this.#t.state), r;
|
|
3680
3684
|
}
|
|
3681
3685
|
getCurrentResult() {
|
|
3682
|
-
return this.#
|
|
3686
|
+
return this.#r;
|
|
3683
3687
|
}
|
|
3684
3688
|
trackResult(t, e) {
|
|
3685
3689
|
const r = {};
|
|
@@ -3710,7 +3714,7 @@ var ai = class {
|
|
|
3710
3714
|
return this.#f({
|
|
3711
3715
|
...t,
|
|
3712
3716
|
cancelRefetch: t.cancelRefetch ?? !0
|
|
3713
|
-
}).then(() => (this.updateResult(), this.#
|
|
3717
|
+
}).then(() => (this.updateResult(), this.#r));
|
|
3714
3718
|
}
|
|
3715
3719
|
#f(t) {
|
|
3716
3720
|
this.#w();
|
|
@@ -3721,22 +3725,22 @@ var ai = class {
|
|
|
3721
3725
|
return t?.throwOnError || (e = e.catch(D)), e;
|
|
3722
3726
|
}
|
|
3723
3727
|
#y() {
|
|
3724
|
-
if (this.#b(),
|
|
3728
|
+
if (this.#b(), G || this.#r.isStale || !Ke(this.options.staleTime))
|
|
3725
3729
|
return;
|
|
3726
|
-
const e =
|
|
3727
|
-
this.#
|
|
3730
|
+
const e = mr(
|
|
3731
|
+
this.#r.dataUpdatedAt,
|
|
3728
3732
|
this.options.staleTime
|
|
3729
3733
|
) + 1;
|
|
3730
3734
|
this.#c = setTimeout(() => {
|
|
3731
|
-
this.#
|
|
3735
|
+
this.#r.isStale || this.updateResult();
|
|
3732
3736
|
}, e);
|
|
3733
3737
|
}
|
|
3734
3738
|
#m() {
|
|
3735
3739
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
|
|
3736
3740
|
}
|
|
3737
3741
|
#g(t) {
|
|
3738
|
-
this.#O(), this.#u = t, !(
|
|
3739
|
-
(this.options.refetchIntervalInBackground ||
|
|
3742
|
+
this.#O(), this.#u = t, !(G || this.options.enabled === !1 || !Ke(this.#u) || this.#u === 0) && (this.#l = setInterval(() => {
|
|
3743
|
+
(this.options.refetchIntervalInBackground || ot.isFocused()) && this.#f();
|
|
3740
3744
|
}, this.#u));
|
|
3741
3745
|
}
|
|
3742
3746
|
#v() {
|
|
@@ -3749,28 +3753,28 @@ var ai = class {
|
|
|
3749
3753
|
this.#l && (clearInterval(this.#l), this.#l = void 0);
|
|
3750
3754
|
}
|
|
3751
3755
|
createResult(t, e) {
|
|
3752
|
-
const r = this.#t, n = this.options, s = this.#
|
|
3753
|
-
let l = { ...h }, c = !1,
|
|
3756
|
+
const r = this.#t, n = this.options, s = this.#r, i = this.#o, o = this.#i, u = t !== r ? t.state : this.#n, { state: h } = t;
|
|
3757
|
+
let l = { ...h }, c = !1, f;
|
|
3754
3758
|
if (e._optimisticResults) {
|
|
3755
|
-
const R = this.hasListeners(),
|
|
3756
|
-
(
|
|
3759
|
+
const R = this.hasListeners(), U = !R && _t(t, e), I = R && Nt(t, r, e, n);
|
|
3760
|
+
(U || I) && (l = {
|
|
3757
3761
|
...l,
|
|
3758
|
-
...
|
|
3762
|
+
...Er(h.data, t.options)
|
|
3759
3763
|
}), e._optimisticResults === "isRestoring" && (l.fetchStatus = "idle");
|
|
3760
3764
|
}
|
|
3761
|
-
let { error: v, errorUpdatedAt: m, status:
|
|
3765
|
+
let { error: v, errorUpdatedAt: m, status: d } = l;
|
|
3762
3766
|
if (e.select && l.data !== void 0)
|
|
3763
3767
|
if (s && l.data === i?.data && e.select === this.#a)
|
|
3764
|
-
|
|
3768
|
+
f = this.#h;
|
|
3765
3769
|
else
|
|
3766
3770
|
try {
|
|
3767
|
-
this.#a = e.select,
|
|
3771
|
+
this.#a = e.select, f = e.select(l.data), f = ze(s?.data, f, e), this.#h = f, this.#s = null;
|
|
3768
3772
|
} catch (R) {
|
|
3769
|
-
this.#
|
|
3773
|
+
this.#s = R;
|
|
3770
3774
|
}
|
|
3771
3775
|
else
|
|
3772
|
-
|
|
3773
|
-
if (e.placeholderData !== void 0 &&
|
|
3776
|
+
f = l.data;
|
|
3777
|
+
if (e.placeholderData !== void 0 && f === void 0 && d === "pending") {
|
|
3774
3778
|
let R;
|
|
3775
3779
|
if (s?.isPlaceholderData && e.placeholderData === o?.placeholderData)
|
|
3776
3780
|
R = s.data;
|
|
@@ -3779,27 +3783,27 @@ var ai = class {
|
|
|
3779
3783
|
this.#d
|
|
3780
3784
|
) : e.placeholderData, e.select && R !== void 0)
|
|
3781
3785
|
try {
|
|
3782
|
-
R = e.select(R), this.#
|
|
3783
|
-
} catch (
|
|
3784
|
-
this.#
|
|
3786
|
+
R = e.select(R), this.#s = null;
|
|
3787
|
+
} catch (U) {
|
|
3788
|
+
this.#s = U;
|
|
3785
3789
|
}
|
|
3786
|
-
R !== void 0 && (
|
|
3790
|
+
R !== void 0 && (d = "success", f = ze(
|
|
3787
3791
|
s?.data,
|
|
3788
3792
|
R,
|
|
3789
3793
|
e
|
|
3790
3794
|
), c = !0);
|
|
3791
3795
|
}
|
|
3792
|
-
this.#
|
|
3793
|
-
const g = l.fetchStatus === "fetching", y =
|
|
3796
|
+
this.#s && (v = this.#s, f = this.#h, m = Date.now(), d = "error");
|
|
3797
|
+
const g = l.fetchStatus === "fetching", y = d === "pending", O = d === "error", b = y && g, w = f !== void 0;
|
|
3794
3798
|
return {
|
|
3795
|
-
status:
|
|
3799
|
+
status: d,
|
|
3796
3800
|
fetchStatus: l.fetchStatus,
|
|
3797
3801
|
isPending: y,
|
|
3798
|
-
isSuccess:
|
|
3799
|
-
isError:
|
|
3802
|
+
isSuccess: d === "success",
|
|
3803
|
+
isError: O,
|
|
3800
3804
|
isInitialLoading: b,
|
|
3801
3805
|
isLoading: b,
|
|
3802
|
-
data:
|
|
3806
|
+
data: f,
|
|
3803
3807
|
dataUpdatedAt: l.dataUpdatedAt,
|
|
3804
3808
|
error: v,
|
|
3805
3809
|
errorUpdatedAt: m,
|
|
@@ -3810,19 +3814,19 @@ var ai = class {
|
|
|
3810
3814
|
isFetchedAfterMount: l.dataUpdateCount > u.dataUpdateCount || l.errorUpdateCount > u.errorUpdateCount,
|
|
3811
3815
|
isFetching: g,
|
|
3812
3816
|
isRefetching: g && !y,
|
|
3813
|
-
isLoadingError:
|
|
3817
|
+
isLoadingError: O && !w,
|
|
3814
3818
|
isPaused: l.fetchStatus === "paused",
|
|
3815
3819
|
isPlaceholderData: c,
|
|
3816
|
-
isRefetchError:
|
|
3817
|
-
isStale:
|
|
3820
|
+
isRefetchError: O && w,
|
|
3821
|
+
isStale: at(t, e),
|
|
3818
3822
|
refetch: this.refetch
|
|
3819
3823
|
};
|
|
3820
3824
|
}
|
|
3821
3825
|
updateResult(t) {
|
|
3822
|
-
const e = this.#
|
|
3823
|
-
if (this.#
|
|
3826
|
+
const e = this.#r, r = this.createResult(this.#t, this.options);
|
|
3827
|
+
if (this.#o = this.#t.state, this.#i = this.options, this.#o.data !== void 0 && (this.#d = this.#t), we(r, e))
|
|
3824
3828
|
return;
|
|
3825
|
-
this.#
|
|
3829
|
+
this.#r = r;
|
|
3826
3830
|
const n = {}, s = () => {
|
|
3827
3831
|
if (!e)
|
|
3828
3832
|
return !0;
|
|
@@ -3832,9 +3836,9 @@ var ai = class {
|
|
|
3832
3836
|
const a = new Set(
|
|
3833
3837
|
o ?? this.#p
|
|
3834
3838
|
);
|
|
3835
|
-
return this.options.throwOnError && a.add("error"), Object.keys(this.#
|
|
3839
|
+
return this.options.throwOnError && a.add("error"), Object.keys(this.#r).some((u) => {
|
|
3836
3840
|
const h = u;
|
|
3837
|
-
return this.#
|
|
3841
|
+
return this.#r[h] !== e[h] && a.has(h);
|
|
3838
3842
|
});
|
|
3839
3843
|
};
|
|
3840
3844
|
t?.listeners !== !1 && s() && (n.listeners = !0), this.#E({ ...n, ...t });
|
|
@@ -3844,7 +3848,7 @@ var ai = class {
|
|
|
3844
3848
|
if (t === this.#t)
|
|
3845
3849
|
return;
|
|
3846
3850
|
const e = this.#t;
|
|
3847
|
-
this.#t = t, this.#
|
|
3851
|
+
this.#t = t, this.#n = t.state, this.hasListeners() && (e?.removeObserver(this), t.addObserver(this));
|
|
3848
3852
|
}
|
|
3849
3853
|
onQueryUpdate() {
|
|
3850
3854
|
this.updateResult(), this.hasListeners() && this.#v();
|
|
@@ -3852,7 +3856,7 @@ var ai = class {
|
|
|
3852
3856
|
#E(t) {
|
|
3853
3857
|
T.batch(() => {
|
|
3854
3858
|
t.listeners && this.listeners.forEach((e) => {
|
|
3855
|
-
e(this.#
|
|
3859
|
+
e(this.#r);
|
|
3856
3860
|
}), this.#e.getQueryCache().notify({
|
|
3857
3861
|
query: this.#t,
|
|
3858
3862
|
type: "observerResultsUpdated"
|
|
@@ -3860,64 +3864,64 @@ var ai = class {
|
|
|
3860
3864
|
});
|
|
3861
3865
|
}
|
|
3862
3866
|
};
|
|
3863
|
-
function
|
|
3867
|
+
function ii(t, e) {
|
|
3864
3868
|
return e.enabled !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
|
|
3865
3869
|
}
|
|
3866
|
-
function
|
|
3867
|
-
return
|
|
3870
|
+
function _t(t, e) {
|
|
3871
|
+
return ii(t, e) || t.state.data !== void 0 && Ge(t, e, e.refetchOnMount);
|
|
3868
3872
|
}
|
|
3869
3873
|
function Ge(t, e, r) {
|
|
3870
3874
|
if (e.enabled !== !1) {
|
|
3871
3875
|
const n = typeof r == "function" ? r(t) : r;
|
|
3872
|
-
return n === "always" || n !== !1 &&
|
|
3876
|
+
return n === "always" || n !== !1 && at(t, e);
|
|
3873
3877
|
}
|
|
3874
3878
|
return !1;
|
|
3875
3879
|
}
|
|
3876
|
-
function
|
|
3877
|
-
return (t !== e || n.enabled === !1) && (!r.suspense || t.state.status !== "error") &&
|
|
3880
|
+
function Nt(t, e, r, n) {
|
|
3881
|
+
return (t !== e || n.enabled === !1) && (!r.suspense || t.state.status !== "error") && at(t, r);
|
|
3878
3882
|
}
|
|
3879
|
-
function
|
|
3883
|
+
function at(t, e) {
|
|
3880
3884
|
return e.enabled !== !1 && t.isStaleByTime(e.staleTime);
|
|
3881
3885
|
}
|
|
3882
|
-
function
|
|
3883
|
-
return !
|
|
3886
|
+
function oi(t, e) {
|
|
3887
|
+
return !we(t.getCurrentResult(), e);
|
|
3884
3888
|
}
|
|
3885
|
-
var
|
|
3889
|
+
var ai = class extends se {
|
|
3886
3890
|
#e;
|
|
3887
3891
|
#t = void 0;
|
|
3888
|
-
#r;
|
|
3889
3892
|
#n;
|
|
3893
|
+
#r;
|
|
3890
3894
|
constructor(t, e) {
|
|
3891
|
-
super(), this.#e = t, this.setOptions(e), this.bindMethods(), this.#
|
|
3895
|
+
super(), this.#e = t, this.setOptions(e), this.bindMethods(), this.#o();
|
|
3892
3896
|
}
|
|
3893
3897
|
bindMethods() {
|
|
3894
3898
|
this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
|
|
3895
3899
|
}
|
|
3896
3900
|
setOptions(t) {
|
|
3897
3901
|
const e = this.options;
|
|
3898
|
-
this.options = this.#e.defaultMutationOptions(t),
|
|
3902
|
+
this.options = this.#e.defaultMutationOptions(t), we(this.options, e) || this.#e.getMutationCache().notify({
|
|
3899
3903
|
type: "observerOptionsUpdated",
|
|
3900
|
-
mutation: this.#
|
|
3904
|
+
mutation: this.#n,
|
|
3901
3905
|
observer: this
|
|
3902
|
-
}), e?.mutationKey && this.options.mutationKey &&
|
|
3906
|
+
}), e?.mutationKey && this.options.mutationKey && J(e.mutationKey) !== J(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
|
|
3903
3907
|
}
|
|
3904
3908
|
onUnsubscribe() {
|
|
3905
|
-
this.hasListeners() || this.#
|
|
3909
|
+
this.hasListeners() || this.#n?.removeObserver(this);
|
|
3906
3910
|
}
|
|
3907
3911
|
onMutationUpdate(t) {
|
|
3908
|
-
this.#
|
|
3912
|
+
this.#o(), this.#i(t);
|
|
3909
3913
|
}
|
|
3910
3914
|
getCurrentResult() {
|
|
3911
3915
|
return this.#t;
|
|
3912
3916
|
}
|
|
3913
3917
|
reset() {
|
|
3914
|
-
this.#
|
|
3918
|
+
this.#n?.removeObserver(this), this.#n = void 0, this.#o(), this.#i();
|
|
3915
3919
|
}
|
|
3916
3920
|
mutate(t, e) {
|
|
3917
|
-
return this.#
|
|
3921
|
+
return this.#r = e, this.#n?.removeObserver(this), this.#n = this.#e.getMutationCache().build(this.#e, this.options), this.#n.addObserver(this), this.#n.execute(t);
|
|
3918
3922
|
}
|
|
3919
|
-
#
|
|
3920
|
-
const t = this.#
|
|
3923
|
+
#o() {
|
|
3924
|
+
const t = this.#n?.state ?? Ar();
|
|
3921
3925
|
this.#t = {
|
|
3922
3926
|
...t,
|
|
3923
3927
|
isPending: t.status === "pending",
|
|
@@ -3928,11 +3932,11 @@ var fi = class extends ne {
|
|
|
3928
3932
|
reset: this.reset
|
|
3929
3933
|
};
|
|
3930
3934
|
}
|
|
3931
|
-
#
|
|
3935
|
+
#i(t) {
|
|
3932
3936
|
T.batch(() => {
|
|
3933
|
-
if (this.#
|
|
3937
|
+
if (this.#r && this.hasListeners()) {
|
|
3934
3938
|
const e = this.#t.variables, r = this.#t.context;
|
|
3935
|
-
t?.type === "success" ? (this.#
|
|
3939
|
+
t?.type === "success" ? (this.#r.onSuccess?.(t.data, e, r), this.#r.onSettled?.(t.data, null, e, r)) : t?.type === "error" && (this.#r.onError?.(t.error, e, r), this.#r.onSettled?.(
|
|
3936
3940
|
void 0,
|
|
3937
3941
|
t.error,
|
|
3938
3942
|
e,
|
|
@@ -3944,10 +3948,10 @@ var fi = class extends ne {
|
|
|
3944
3948
|
});
|
|
3945
3949
|
});
|
|
3946
3950
|
}
|
|
3947
|
-
},
|
|
3948
|
-
function
|
|
3951
|
+
}, ui = "VUE_QUERY_CLIENT";
|
|
3952
|
+
function Fr(t) {
|
|
3949
3953
|
const e = t ? `:${t}` : "";
|
|
3950
|
-
return `${
|
|
3954
|
+
return `${ui}${e}`;
|
|
3951
3955
|
}
|
|
3952
3956
|
function Je(t, e) {
|
|
3953
3957
|
Object.keys(t).forEach((r) => {
|
|
@@ -3962,7 +3966,7 @@ function Xe(t, e) {
|
|
|
3962
3966
|
}
|
|
3963
3967
|
if (Array.isArray(t))
|
|
3964
3968
|
return t.map((r) => Xe(r, e));
|
|
3965
|
-
if (typeof t == "object" &&
|
|
3969
|
+
if (typeof t == "object" && ci(t)) {
|
|
3966
3970
|
const r = Object.entries(t).map(([n, s]) => [
|
|
3967
3971
|
n,
|
|
3968
3972
|
Xe(s, e)
|
|
@@ -3974,10 +3978,10 @@ function Xe(t, e) {
|
|
|
3974
3978
|
function E(t) {
|
|
3975
3979
|
return Xe(t, (e) => {
|
|
3976
3980
|
if (et(e))
|
|
3977
|
-
return E(
|
|
3981
|
+
return E(jt(e));
|
|
3978
3982
|
});
|
|
3979
3983
|
}
|
|
3980
|
-
function
|
|
3984
|
+
function ci(t) {
|
|
3981
3985
|
if (Object.prototype.toString.call(t) !== "[object Object]")
|
|
3982
3986
|
return !1;
|
|
3983
3987
|
const e = Object.getPrototypeOf(t);
|
|
@@ -3986,38 +3990,38 @@ function di(t) {
|
|
|
3986
3990
|
function Ye(t, e) {
|
|
3987
3991
|
return typeof t == "function" ? t(...e) : !!t;
|
|
3988
3992
|
}
|
|
3989
|
-
function
|
|
3990
|
-
if (!
|
|
3993
|
+
function Pr(t = "") {
|
|
3994
|
+
if (!Qr())
|
|
3991
3995
|
throw new Error(
|
|
3992
3996
|
"vue-query hooks can only be used inside setup() function or functions that support injection context."
|
|
3993
3997
|
);
|
|
3994
|
-
const e =
|
|
3998
|
+
const e = Fr(t), r = jr(e);
|
|
3995
3999
|
if (!r)
|
|
3996
4000
|
throw new Error(
|
|
3997
4001
|
"No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library."
|
|
3998
4002
|
);
|
|
3999
4003
|
return r;
|
|
4000
4004
|
}
|
|
4001
|
-
var
|
|
4005
|
+
var Cr = class extends Sr {
|
|
4002
4006
|
find(t) {
|
|
4003
4007
|
return super.find(E(t));
|
|
4004
4008
|
}
|
|
4005
4009
|
findAll(t = {}) {
|
|
4006
4010
|
return super.findAll(E(t));
|
|
4007
4011
|
}
|
|
4008
|
-
},
|
|
4012
|
+
}, li = class extends Rr {
|
|
4009
4013
|
find(t) {
|
|
4010
4014
|
return super.find(E(t));
|
|
4011
4015
|
}
|
|
4012
4016
|
findAll(t = {}) {
|
|
4013
4017
|
return super.findAll(E(t));
|
|
4014
4018
|
}
|
|
4015
|
-
},
|
|
4019
|
+
}, Tr = class extends ni {
|
|
4016
4020
|
constructor(t = {}) {
|
|
4017
4021
|
const e = {
|
|
4018
4022
|
defaultOptions: t.defaultOptions,
|
|
4019
|
-
queryCache: t.queryCache || new
|
|
4020
|
-
mutationCache: t.mutationCache || new
|
|
4023
|
+
queryCache: t.queryCache || new Cr(),
|
|
4024
|
+
mutationCache: t.mutationCache || new li()
|
|
4021
4025
|
};
|
|
4022
4026
|
super(e), this.isRestoring = B(!1);
|
|
4023
4027
|
}
|
|
@@ -4109,22 +4113,22 @@ var qr = class extends Rr {
|
|
|
4109
4113
|
return super.getMutationDefaults(E(t));
|
|
4110
4114
|
}
|
|
4111
4115
|
};
|
|
4112
|
-
function
|
|
4113
|
-
return
|
|
4116
|
+
function fi() {
|
|
4117
|
+
return qr().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
4114
4118
|
}
|
|
4115
|
-
function
|
|
4119
|
+
function qr() {
|
|
4116
4120
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
4117
4121
|
}
|
|
4118
|
-
const
|
|
4119
|
-
let
|
|
4120
|
-
function
|
|
4122
|
+
const hi = typeof Proxy == "function", di = "devtools-plugin:setup", pi = "plugin:settings:set";
|
|
4123
|
+
let Y, Ze;
|
|
4124
|
+
function yi() {
|
|
4121
4125
|
var t;
|
|
4122
|
-
return
|
|
4126
|
+
return Y !== void 0 || (typeof window < "u" && window.performance ? (Y = !0, Ze = window.performance) : typeof globalThis < "u" && (!((t = globalThis.perf_hooks) === null || t === void 0) && t.performance) ? (Y = !0, Ze = globalThis.perf_hooks.performance) : Y = !1), Y;
|
|
4123
4127
|
}
|
|
4124
|
-
function
|
|
4125
|
-
return
|
|
4128
|
+
function mi() {
|
|
4129
|
+
return yi() ? Ze.now() : Date.now();
|
|
4126
4130
|
}
|
|
4127
|
-
class
|
|
4131
|
+
class gi {
|
|
4128
4132
|
constructor(e, r) {
|
|
4129
4133
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = e, this.hook = r;
|
|
4130
4134
|
const n = {};
|
|
@@ -4152,9 +4156,9 @@ class wi {
|
|
|
4152
4156
|
i = o;
|
|
4153
4157
|
},
|
|
4154
4158
|
now() {
|
|
4155
|
-
return
|
|
4159
|
+
return mi();
|
|
4156
4160
|
}
|
|
4157
|
-
}, r && r.on(
|
|
4161
|
+
}, r && r.on(pi, (o, a) => {
|
|
4158
4162
|
o === this.plugin.id && this.fallbacks.setSettings(a);
|
|
4159
4163
|
}), this.proxiedOn = new Proxy({}, {
|
|
4160
4164
|
get: (o, a) => this.target ? this.target.on[a] : (...u) => {
|
|
@@ -4186,12 +4190,12 @@ class wi {
|
|
|
4186
4190
|
r.resolve(await this.target[r.method](...r.args));
|
|
4187
4191
|
}
|
|
4188
4192
|
}
|
|
4189
|
-
function
|
|
4190
|
-
const r = t, n =
|
|
4193
|
+
function vi(t, e) {
|
|
4194
|
+
const r = t, n = qr(), s = fi(), i = hi && r.enableEarlyProxy;
|
|
4191
4195
|
if (s && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !i))
|
|
4192
|
-
s.emit(
|
|
4196
|
+
s.emit(di, t, e);
|
|
4193
4197
|
else {
|
|
4194
|
-
const o = i ? new
|
|
4198
|
+
const o = i ? new gi(r, s) : null;
|
|
4195
4199
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
4196
4200
|
pluginDescriptor: r,
|
|
4197
4201
|
setupFn: e,
|
|
@@ -4209,7 +4213,7 @@ function Ei(t, e) {
|
|
|
4209
4213
|
*
|
|
4210
4214
|
* @license MIT
|
|
4211
4215
|
*/
|
|
4212
|
-
const
|
|
4216
|
+
const xr = {
|
|
4213
4217
|
À: "A",
|
|
4214
4218
|
Á: "A",
|
|
4215
4219
|
Â: "A",
|
|
@@ -4609,9 +4613,9 @@ const _r = {
|
|
|
4609
4613
|
x̧: "x",
|
|
4610
4614
|
Z̧: "Z",
|
|
4611
4615
|
z̧: "z"
|
|
4612
|
-
},
|
|
4613
|
-
function
|
|
4614
|
-
return t.replace(
|
|
4616
|
+
}, bi = Object.keys(xr).join("|"), Oi = new RegExp(bi, "g");
|
|
4617
|
+
function wi(t) {
|
|
4618
|
+
return t.replace(Oi, (e) => xr[e]);
|
|
4615
4619
|
}
|
|
4616
4620
|
/**
|
|
4617
4621
|
* @name match-sorter
|
|
@@ -4629,10 +4633,10 @@ const q = {
|
|
|
4629
4633
|
MATCHES: 1,
|
|
4630
4634
|
NO_MATCH: 0
|
|
4631
4635
|
};
|
|
4632
|
-
function
|
|
4636
|
+
function Ei(t, e, r) {
|
|
4633
4637
|
var n;
|
|
4634
4638
|
if (r = r || {}, r.threshold = (n = r.threshold) != null ? n : q.MATCHES, !r.accessors) {
|
|
4635
|
-
const o =
|
|
4639
|
+
const o = Ut(t, e, r);
|
|
4636
4640
|
return {
|
|
4637
4641
|
// ends up being duplicate of 'item' in matches but consistent
|
|
4638
4642
|
rankedValue: t,
|
|
@@ -4642,7 +4646,7 @@ function Fi(t, e, r) {
|
|
|
4642
4646
|
passed: o >= r.threshold
|
|
4643
4647
|
};
|
|
4644
4648
|
}
|
|
4645
|
-
const s =
|
|
4649
|
+
const s = Fi(t, r.accessors), i = {
|
|
4646
4650
|
rankedValue: t,
|
|
4647
4651
|
rank: q.NO_MATCH,
|
|
4648
4652
|
accessorIndex: -1,
|
|
@@ -4651,7 +4655,7 @@ function Fi(t, e, r) {
|
|
|
4651
4655
|
};
|
|
4652
4656
|
for (let o = 0; o < s.length; o++) {
|
|
4653
4657
|
const a = s[o];
|
|
4654
|
-
let u =
|
|
4658
|
+
let u = Ut(a.itemValue, e, r);
|
|
4655
4659
|
const {
|
|
4656
4660
|
minRanking: h,
|
|
4657
4661
|
maxRanking: l,
|
|
@@ -4661,10 +4665,10 @@ function Fi(t, e, r) {
|
|
|
4661
4665
|
}
|
|
4662
4666
|
return i;
|
|
4663
4667
|
}
|
|
4664
|
-
function
|
|
4665
|
-
return t =
|
|
4668
|
+
function Ut(t, e, r) {
|
|
4669
|
+
return t = It(t, r), e = It(e, r), e.length > t.length ? q.NO_MATCH : t === e ? q.CASE_SENSITIVE_EQUAL : (t = t.toLowerCase(), e = e.toLowerCase(), t === e ? q.EQUAL : t.startsWith(e) ? q.STARTS_WITH : t.includes(` ${e}`) ? q.WORD_STARTS_WITH : t.includes(e) ? q.CONTAINS : e.length === 1 ? q.NO_MATCH : Si(t).includes(e) ? q.ACRONYM : Ai(t, e));
|
|
4666
4670
|
}
|
|
4667
|
-
function
|
|
4671
|
+
function Si(t) {
|
|
4668
4672
|
let e = "";
|
|
4669
4673
|
return t.split(" ").forEach((n) => {
|
|
4670
4674
|
n.split("-").forEach((i) => {
|
|
@@ -4672,10 +4676,10 @@ function Pi(t) {
|
|
|
4672
4676
|
});
|
|
4673
4677
|
}), e;
|
|
4674
4678
|
}
|
|
4675
|
-
function
|
|
4679
|
+
function Ai(t, e) {
|
|
4676
4680
|
let r = 0, n = 0;
|
|
4677
4681
|
function s(u, h, l) {
|
|
4678
|
-
for (let c = l,
|
|
4682
|
+
for (let c = l, f = h.length; c < f; c++)
|
|
4679
4683
|
if (h[c] === u)
|
|
4680
4684
|
return r += 1, c + 1;
|
|
4681
4685
|
return -1;
|
|
@@ -4696,22 +4700,22 @@ function Ci(t, e) {
|
|
|
4696
4700
|
const a = n - o;
|
|
4697
4701
|
return i(a);
|
|
4698
4702
|
}
|
|
4699
|
-
function
|
|
4703
|
+
function It(t, e) {
|
|
4700
4704
|
let {
|
|
4701
4705
|
keepDiacritics: r
|
|
4702
4706
|
} = e;
|
|
4703
|
-
return t = `${t}`, r || (t =
|
|
4707
|
+
return t = `${t}`, r || (t = wi(t)), t;
|
|
4704
4708
|
}
|
|
4705
|
-
function
|
|
4709
|
+
function Ri(t, e) {
|
|
4706
4710
|
let r = e;
|
|
4707
4711
|
typeof e == "object" && (r = e.accessor);
|
|
4708
4712
|
const n = r(t);
|
|
4709
4713
|
return n == null ? [] : Array.isArray(n) ? n : [String(n)];
|
|
4710
4714
|
}
|
|
4711
|
-
function
|
|
4715
|
+
function Fi(t, e) {
|
|
4712
4716
|
const r = [];
|
|
4713
4717
|
for (let n = 0, s = e.length; n < s; n++) {
|
|
4714
|
-
const i = e[n], o =
|
|
4718
|
+
const i = e[n], o = Pi(i), a = Ri(t, i);
|
|
4715
4719
|
for (let u = 0, h = a.length; u < h; u++)
|
|
4716
4720
|
r.push({
|
|
4717
4721
|
itemValue: a[u],
|
|
@@ -4720,37 +4724,37 @@ function qi(t, e) {
|
|
|
4720
4724
|
}
|
|
4721
4725
|
return r;
|
|
4722
4726
|
}
|
|
4723
|
-
const
|
|
4727
|
+
const Mt = {
|
|
4724
4728
|
maxRanking: 1 / 0,
|
|
4725
4729
|
minRanking: -1 / 0
|
|
4726
4730
|
};
|
|
4727
|
-
function
|
|
4728
|
-
return typeof t == "function" ?
|
|
4729
|
-
...
|
|
4731
|
+
function Pi(t) {
|
|
4732
|
+
return typeof t == "function" ? Mt : {
|
|
4733
|
+
...Mt,
|
|
4730
4734
|
...t
|
|
4731
4735
|
};
|
|
4732
4736
|
}
|
|
4733
4737
|
function W(t) {
|
|
4734
4738
|
return t.state.fetchStatus === "fetching" ? 0 : t.state.fetchStatus === "paused" ? 4 : t.getObserversCount() ? t.isStale() ? 2 : 1 : 3;
|
|
4735
4739
|
}
|
|
4736
|
-
function
|
|
4740
|
+
function Qt(t) {
|
|
4737
4741
|
const e = W(t);
|
|
4738
4742
|
return e === 0 ? "fetching" : e === 4 ? "paused" : e === 2 ? "stale" : e === 3 ? "inactive" : "fresh";
|
|
4739
4743
|
}
|
|
4740
|
-
function
|
|
4744
|
+
function Ci(t) {
|
|
4741
4745
|
return W(t) === 2 ? 0 : 16777215;
|
|
4742
4746
|
}
|
|
4743
|
-
function
|
|
4747
|
+
function Ti(t) {
|
|
4744
4748
|
const e = W(t);
|
|
4745
4749
|
return e === 0 ? 27647 : e === 4 ? 9193963 : e === 2 ? 16757248 : e === 3 ? 4148832 : 33575;
|
|
4746
4750
|
}
|
|
4747
|
-
var
|
|
4748
|
-
"Status > Last Updated":
|
|
4749
|
-
"Query Hash":
|
|
4750
|
-
"Last Updated":
|
|
4751
|
+
var qi = (t, e) => t.queryHash.localeCompare(e.queryHash), Dr = (t, e) => t.state.dataUpdatedAt < e.state.dataUpdatedAt ? 1 : -1, xi = (t, e) => W(t) === W(e) ? Dr(t, e) : W(t) > W(e) ? 1 : -1, _e = {
|
|
4752
|
+
"Status > Last Updated": xi,
|
|
4753
|
+
"Query Hash": qi,
|
|
4754
|
+
"Last Updated": Dr
|
|
4751
4755
|
}, V = "vue-query", Ne = "Vue Query";
|
|
4752
|
-
function
|
|
4753
|
-
|
|
4756
|
+
function Di(t, e) {
|
|
4757
|
+
vi(
|
|
4754
4758
|
{
|
|
4755
4759
|
id: V,
|
|
4756
4760
|
label: Ne,
|
|
@@ -4804,7 +4808,7 @@ function Ii(t, e) {
|
|
|
4804
4808
|
},
|
|
4805
4809
|
(r) => {
|
|
4806
4810
|
const n = r.getSettings();
|
|
4807
|
-
|
|
4811
|
+
re.setOnline(!!n.onlineMode.valueOf());
|
|
4808
4812
|
const s = e.getQueryCache();
|
|
4809
4813
|
r.addInspector({
|
|
4810
4814
|
id: V,
|
|
@@ -4885,23 +4889,23 @@ function Ii(t, e) {
|
|
|
4885
4889
|
}
|
|
4886
4890
|
});
|
|
4887
4891
|
}), r.on.setPluginSettings((i) => {
|
|
4888
|
-
i.key === "onlineMode" &&
|
|
4892
|
+
i.key === "onlineMode" && re.setOnline(!!i.newValue);
|
|
4889
4893
|
}), r.on.getInspectorTree((i) => {
|
|
4890
4894
|
if (i.inspectorId === V) {
|
|
4891
4895
|
const o = s.getAll(), a = r.getSettings(), l = (i.filter ? o.filter(
|
|
4892
|
-
(c) =>
|
|
4896
|
+
(c) => Ei(c.queryHash, i.filter).passed
|
|
4893
4897
|
) : [...o]).sort(
|
|
4894
|
-
(c,
|
|
4898
|
+
(c, f) => _e[a.sortFn](c, f) * a.baseSort
|
|
4895
4899
|
).map((c) => {
|
|
4896
|
-
const
|
|
4900
|
+
const f = Qt(c);
|
|
4897
4901
|
return {
|
|
4898
4902
|
id: c.queryHash,
|
|
4899
4903
|
label: c.queryHash,
|
|
4900
4904
|
tags: [
|
|
4901
4905
|
{
|
|
4902
|
-
label: `${
|
|
4903
|
-
textColor:
|
|
4904
|
-
backgroundColor:
|
|
4906
|
+
label: `${f} [${c.getObserversCount()}]`,
|
|
4907
|
+
textColor: Ci(c),
|
|
4908
|
+
backgroundColor: Ti(c)
|
|
4905
4909
|
}
|
|
4906
4910
|
]
|
|
4907
4911
|
};
|
|
@@ -4921,7 +4925,7 @@ function Ii(t, e) {
|
|
|
4921
4925
|
},
|
|
4922
4926
|
{
|
|
4923
4927
|
key: "Query status",
|
|
4924
|
-
value:
|
|
4928
|
+
value: Qt(o)
|
|
4925
4929
|
},
|
|
4926
4930
|
{
|
|
4927
4931
|
key: "Observers",
|
|
@@ -4950,17 +4954,17 @@ function Ii(t, e) {
|
|
|
4950
4954
|
}
|
|
4951
4955
|
);
|
|
4952
4956
|
}
|
|
4953
|
-
var
|
|
4957
|
+
var ro = {
|
|
4954
4958
|
install: (t, e = {}) => {
|
|
4955
|
-
const r =
|
|
4959
|
+
const r = Fr(e.queryClientKey);
|
|
4956
4960
|
let n;
|
|
4957
4961
|
if ("queryClient" in e && e.queryClient)
|
|
4958
4962
|
n = e.queryClient;
|
|
4959
4963
|
else {
|
|
4960
4964
|
const o = "queryClientConfig" in e ? e.queryClientConfig : void 0;
|
|
4961
|
-
n = new
|
|
4965
|
+
n = new Tr(o);
|
|
4962
4966
|
}
|
|
4963
|
-
|
|
4967
|
+
G || n.mount();
|
|
4964
4968
|
let s = () => {
|
|
4965
4969
|
};
|
|
4966
4970
|
if (e.clientPersister) {
|
|
@@ -4981,25 +4985,25 @@ var oo = {
|
|
|
4981
4985
|
i(), o();
|
|
4982
4986
|
};
|
|
4983
4987
|
}
|
|
4984
|
-
t.provide(r, n), process.env.NODE_ENV === "development" && e.enableDevtoolsV6Plugin &&
|
|
4988
|
+
t.provide(r, n), process.env.NODE_ENV === "development" && e.enableDevtoolsV6Plugin && Di(t, n);
|
|
4985
4989
|
}
|
|
4986
4990
|
};
|
|
4987
|
-
function
|
|
4988
|
-
process.env.NODE_ENV === "development" && (
|
|
4991
|
+
function _i(t, e, r) {
|
|
4992
|
+
process.env.NODE_ENV === "development" && (kt() || console.warn(
|
|
4989
4993
|
'vue-query composable like "useQuery()" should only be used inside a "setup()" function or a running effect scope. They might otherwise lead to memory leaks.'
|
|
4990
4994
|
));
|
|
4991
|
-
const n = r ||
|
|
4992
|
-
const
|
|
4993
|
-
typeof
|
|
4994
|
-
const v = n.defaultQueryOptions(
|
|
4995
|
+
const n = r || Pr(), s = $(() => {
|
|
4996
|
+
const f = E(e);
|
|
4997
|
+
typeof f.enabled == "function" && (f.enabled = f.enabled());
|
|
4998
|
+
const v = n.defaultQueryOptions(f);
|
|
4995
4999
|
return v._optimisticResults = n.isRestoring.value ? "isRestoring" : "optimistic", v;
|
|
4996
|
-
}), i = new t(n, s.value), o =
|
|
5000
|
+
}), i = new t(n, s.value), o = Lt(i.getCurrentResult());
|
|
4997
5001
|
let a = () => {
|
|
4998
5002
|
};
|
|
4999
|
-
|
|
5003
|
+
Q(
|
|
5000
5004
|
n.isRestoring,
|
|
5001
|
-
(
|
|
5002
|
-
|
|
5005
|
+
(f) => {
|
|
5006
|
+
f || (a(), a = i.subscribe((v) => {
|
|
5003
5007
|
Je(o, v);
|
|
5004
5008
|
}));
|
|
5005
5009
|
},
|
|
@@ -5008,65 +5012,65 @@ function Mi(t, e, r) {
|
|
|
5008
5012
|
const u = () => {
|
|
5009
5013
|
i.setOptions(s.value), Je(o, i.getCurrentResult());
|
|
5010
5014
|
};
|
|
5011
|
-
|
|
5015
|
+
Q(s, u), Bt(() => {
|
|
5012
5016
|
a();
|
|
5013
5017
|
});
|
|
5014
|
-
const h = (...
|
|
5015
|
-
(
|
|
5018
|
+
const h = (...f) => (u(), o.refetch(...f)), l = () => new Promise(
|
|
5019
|
+
(f, v) => {
|
|
5016
5020
|
let m = () => {
|
|
5017
5021
|
};
|
|
5018
|
-
const
|
|
5022
|
+
const d = () => {
|
|
5019
5023
|
if (s.value.enabled !== !1) {
|
|
5020
5024
|
i.setOptions(s.value);
|
|
5021
5025
|
const g = i.getOptimisticResult(
|
|
5022
5026
|
s.value
|
|
5023
5027
|
);
|
|
5024
|
-
g.isStale ? (m(), i.fetchOptimistic(s.value).then(
|
|
5028
|
+
g.isStale ? (m(), i.fetchOptimistic(s.value).then(f, (y) => {
|
|
5025
5029
|
Ye(s.value.throwOnError, [
|
|
5026
5030
|
y,
|
|
5027
5031
|
i.getCurrentQuery()
|
|
5028
|
-
]) ? v(y) :
|
|
5029
|
-
})) : (m(),
|
|
5032
|
+
]) ? v(y) : f(i.getCurrentResult());
|
|
5033
|
+
})) : (m(), f(g));
|
|
5030
5034
|
}
|
|
5031
5035
|
};
|
|
5032
|
-
|
|
5036
|
+
d(), m = Q(s, d);
|
|
5033
5037
|
}
|
|
5034
5038
|
);
|
|
5035
|
-
|
|
5039
|
+
Q(
|
|
5036
5040
|
() => o.error,
|
|
5037
|
-
(
|
|
5041
|
+
(f) => {
|
|
5038
5042
|
if (o.isError && !o.isFetching && Ye(s.value.throwOnError, [
|
|
5039
|
-
|
|
5043
|
+
f,
|
|
5040
5044
|
i.getCurrentQuery()
|
|
5041
5045
|
]))
|
|
5042
|
-
throw
|
|
5046
|
+
throw f;
|
|
5043
5047
|
}
|
|
5044
5048
|
);
|
|
5045
|
-
const c =
|
|
5046
|
-
for (const
|
|
5047
|
-
typeof o[
|
|
5049
|
+
const c = Ht(Ee(o));
|
|
5050
|
+
for (const f in o)
|
|
5051
|
+
typeof o[f] == "function" && (c[f] = o[f]);
|
|
5048
5052
|
return c.suspense = l, c.refetch = h, c;
|
|
5049
5053
|
}
|
|
5050
|
-
function
|
|
5051
|
-
return
|
|
5054
|
+
function no(t, e) {
|
|
5055
|
+
return _i(si, t, e);
|
|
5052
5056
|
}
|
|
5053
|
-
function
|
|
5054
|
-
process.env.NODE_ENV === "development" && (
|
|
5057
|
+
function so(t, e) {
|
|
5058
|
+
process.env.NODE_ENV === "development" && (kt() || console.warn(
|
|
5055
5059
|
'vue-query composable like "useQuery()" should only be used inside a "setup()" function or a running effect scope. They might otherwise lead to memory leaks.'
|
|
5056
5060
|
));
|
|
5057
|
-
const r = e ||
|
|
5061
|
+
const r = e || Pr(), n = $(() => r.defaultMutationOptions(E(t))), s = new ai(r, n.value), i = Lt(s.getCurrentResult()), o = s.subscribe((h) => {
|
|
5058
5062
|
Je(i, h);
|
|
5059
5063
|
}), a = (h, l) => {
|
|
5060
5064
|
s.mutate(h, l).catch(() => {
|
|
5061
5065
|
});
|
|
5062
5066
|
};
|
|
5063
|
-
|
|
5067
|
+
Q(n, () => {
|
|
5064
5068
|
s.setOptions(n.value);
|
|
5065
|
-
}),
|
|
5069
|
+
}), Bt(() => {
|
|
5066
5070
|
o();
|
|
5067
5071
|
});
|
|
5068
|
-
const u =
|
|
5069
|
-
return
|
|
5072
|
+
const u = Ht(Ee(i));
|
|
5073
|
+
return Q(
|
|
5070
5074
|
() => i.error,
|
|
5071
5075
|
(h) => {
|
|
5072
5076
|
if (h && Ye(n.value.throwOnError, [h]))
|
|
@@ -5079,13 +5083,13 @@ function uo(t, e) {
|
|
|
5079
5083
|
reset: i.reset
|
|
5080
5084
|
};
|
|
5081
5085
|
}
|
|
5082
|
-
const
|
|
5083
|
-
function
|
|
5086
|
+
const io = new Tr();
|
|
5087
|
+
function oo(t, e, r) {
|
|
5084
5088
|
return {
|
|
5085
5089
|
queryClientConfig: {
|
|
5086
|
-
queryCache: new
|
|
5090
|
+
queryCache: new Cr({
|
|
5087
5091
|
onError: (n) => {
|
|
5088
|
-
n.response.status === 403 &&
|
|
5092
|
+
n.response.status === 403 && Fn(e, Hs, r), t.error(Pt(n));
|
|
5089
5093
|
}
|
|
5090
5094
|
}),
|
|
5091
5095
|
defaultOptions: {
|
|
@@ -5096,7 +5100,7 @@ function lo(t, e, r) {
|
|
|
5096
5100
|
},
|
|
5097
5101
|
mutations: {
|
|
5098
5102
|
onError: (n) => {
|
|
5099
|
-
t.error(
|
|
5103
|
+
t.error(Pt(n));
|
|
5100
5104
|
}
|
|
5101
5105
|
}
|
|
5102
5106
|
}
|
|
@@ -5104,35 +5108,35 @@ function lo(t, e, r) {
|
|
|
5104
5108
|
};
|
|
5105
5109
|
}
|
|
5106
5110
|
export {
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5111
|
+
ro as VueQueryPlugin,
|
|
5112
|
+
yr as api,
|
|
5113
|
+
Hi as clone,
|
|
5114
|
+
Mi as convertParams,
|
|
5115
|
+
Ki as createTempId,
|
|
5116
|
+
Hs as deleteAuthHeader,
|
|
5117
|
+
Cn as deleteCookieToken,
|
|
5118
|
+
zi as deleteId,
|
|
5119
|
+
Wi as deleteTempId,
|
|
5120
|
+
Ji as email,
|
|
5121
|
+
Vi as formatDate,
|
|
5122
|
+
$i as formatDateTime,
|
|
5123
|
+
Li as getCookieToken,
|
|
5124
|
+
Pt as handleError,
|
|
5125
|
+
An as isAuth,
|
|
5126
|
+
Fn as logout,
|
|
5127
|
+
io as queryClient,
|
|
5128
|
+
Gi as required,
|
|
5129
|
+
Rn as setAuth,
|
|
5130
|
+
Yi as setAuthHeader,
|
|
5131
|
+
Xi as setBaseURL,
|
|
5132
|
+
Pn as setCookieToken,
|
|
5133
|
+
Bi as useAuth,
|
|
5134
|
+
ji as useInfiniteScroll,
|
|
5135
|
+
so as useMutation,
|
|
5136
|
+
Qi as usePage,
|
|
5137
|
+
Ii as usePagination,
|
|
5138
|
+
no as useQuery,
|
|
5139
|
+
Pr as useQueryClient,
|
|
5140
|
+
ki as useValidator,
|
|
5141
|
+
oo as vueQueryOptions
|
|
5138
5142
|
};
|