@autogames/sdk 1.2.4 → 1.4.1
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/autogames-sdk.esm.js +1 -1
- package/dist/autogames-sdk.js +483 -483
- package/dist/{basic-CX_SLrXD.js → basic-DNgO8qRu.js} +5 -6
- package/dist/{ccip-qoKRUuU4.js → ccip-B3-cQAzb.js} +1 -1
- package/dist/{core-CvTNuh95.js → core-CF2-hC7T.js} +31 -32
- package/dist/{features-CvmBsK4Z.js → features-CYOwZOfN.js} +1 -1
- package/dist/{index-CdNZo-Hc.js → index-B7tNGyqT.js} +2 -2
- package/dist/{index-YZZeCzJW.js → index-DClY0MS6.js} +1 -1
- package/dist/{index-BDOF-uep.js → index-DrQkONoR.js} +4 -4
- package/dist/main-BPrpIEW3.js +82616 -0
- package/dist/main.d.ts +9 -2
- package/dist/{parseSignature-Brkx4zaC.js → parseSignature-DolnDskM.js} +1 -1
- package/dist/{secp256k1-BNkeet6Q.js → secp256k1-DmBO7H7C.js} +1 -1
- package/dist/stats-confirm.html +1 -1
- package/dist/{w3m-modal-0BRLpsIo.js → w3m-modal-Ds_YpISg.js} +2 -2
- package/package.json +3 -2
- package/dist/bridge-mount-CWHdoUW-.js +0 -69650
- package/dist/chat-mount-gXq-EZa2.js +0 -2744
- package/dist/index-BfOurzzw.js +0 -10194
- package/dist/main-DBE9yqee.js +0 -2736
package/dist/main-DBE9yqee.js
DELETED
|
@@ -1,2736 +0,0 @@
|
|
|
1
|
-
function It(e, t) {
|
|
2
|
-
for (var n = 0; n < t.length; n++) {
|
|
3
|
-
const r = t[n];
|
|
4
|
-
if (typeof r != "string" && !Array.isArray(r)) {
|
|
5
|
-
for (const s in r)
|
|
6
|
-
if (s !== "default" && !(s in e)) {
|
|
7
|
-
const o = Object.getOwnPropertyDescriptor(r, s);
|
|
8
|
-
o && Object.defineProperty(e, s, o.get ? o : {
|
|
9
|
-
enumerable: !0,
|
|
10
|
-
get: () => r[s]
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
|
|
16
|
-
}
|
|
17
|
-
function ut(e, t) {
|
|
18
|
-
return function() {
|
|
19
|
-
return e.apply(t, arguments);
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
const { toString: jt } = Object.prototype, { getPrototypeOf: Le } = Object, { iterator: Ee, toStringTag: ct } = Symbol, Se = /* @__PURE__ */ ((e) => (t) => {
|
|
23
|
-
const n = jt.call(t);
|
|
24
|
-
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
25
|
-
})(/* @__PURE__ */ Object.create(null)), M = (e) => (e = e.toLowerCase(), (t) => Se(t) === e), Re = (e) => (t) => typeof t === e, { isArray: se } = Array, re = Re("undefined");
|
|
26
|
-
function ce(e) {
|
|
27
|
-
return e !== null && !re(e) && e.constructor !== null && !re(e.constructor) && D(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
28
|
-
}
|
|
29
|
-
const lt = M("ArrayBuffer");
|
|
30
|
-
function Lt(e) {
|
|
31
|
-
let t;
|
|
32
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && lt(e.buffer), t;
|
|
33
|
-
}
|
|
34
|
-
const Dt = Re("string"), D = Re("function"), ft = Re("number"), le = (e) => e !== null && typeof e == "object", Ft = (e) => e === !0 || e === !1, ye = (e) => {
|
|
35
|
-
if (Se(e) !== "object")
|
|
36
|
-
return !1;
|
|
37
|
-
const t = Le(e);
|
|
38
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ct in e) && !(Ee in e);
|
|
39
|
-
}, $t = (e) => {
|
|
40
|
-
if (!le(e) || ce(e))
|
|
41
|
-
return !1;
|
|
42
|
-
try {
|
|
43
|
-
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
44
|
-
} catch {
|
|
45
|
-
return !1;
|
|
46
|
-
}
|
|
47
|
-
}, Bt = M("Date"), Ht = M("File"), Mt = M("Blob"), qt = M("FileList"), zt = (e) => le(e) && D(e.pipe), Wt = (e) => {
|
|
48
|
-
let t;
|
|
49
|
-
return e && (typeof FormData == "function" && e instanceof FormData || D(e.append) && ((t = Se(e)) === "formdata" || // detect form-data instance
|
|
50
|
-
t === "object" && D(e.toString) && e.toString() === "[object FormData]"));
|
|
51
|
-
}, Jt = M("URLSearchParams"), [Kt, Vt, Yt, Gt] = ["ReadableStream", "Request", "Response", "Headers"].map(M), Xt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
52
|
-
function fe(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
53
|
-
if (e === null || typeof e > "u")
|
|
54
|
-
return;
|
|
55
|
-
let r, s;
|
|
56
|
-
if (typeof e != "object" && (e = [e]), se(e))
|
|
57
|
-
for (r = 0, s = e.length; r < s; r++)
|
|
58
|
-
t.call(null, e[r], r, e);
|
|
59
|
-
else {
|
|
60
|
-
if (ce(e))
|
|
61
|
-
return;
|
|
62
|
-
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
63
|
-
let c;
|
|
64
|
-
for (r = 0; r < i; r++)
|
|
65
|
-
c = o[r], t.call(null, e[c], c, e);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
function dt(e, t) {
|
|
69
|
-
if (ce(e))
|
|
70
|
-
return null;
|
|
71
|
-
t = t.toLowerCase();
|
|
72
|
-
const n = Object.keys(e);
|
|
73
|
-
let r = n.length, s;
|
|
74
|
-
for (; r-- > 0; )
|
|
75
|
-
if (s = n[r], t === s.toLowerCase())
|
|
76
|
-
return s;
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
const X = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, pt = (e) => !re(e) && e !== X;
|
|
80
|
-
function ke() {
|
|
81
|
-
const { caseless: e, skipUndefined: t } = pt(this) && this || {}, n = {}, r = (s, o) => {
|
|
82
|
-
const i = e && dt(n, o) || o;
|
|
83
|
-
ye(n[i]) && ye(s) ? n[i] = ke(n[i], s) : ye(s) ? n[i] = ke({}, s) : se(s) ? n[i] = s.slice() : (!t || !re(s)) && (n[i] = s);
|
|
84
|
-
};
|
|
85
|
-
for (let s = 0, o = arguments.length; s < o; s++)
|
|
86
|
-
arguments[s] && fe(arguments[s], r);
|
|
87
|
-
return n;
|
|
88
|
-
}
|
|
89
|
-
const Qt = (e, t, n, { allOwnKeys: r } = {}) => (fe(t, (s, o) => {
|
|
90
|
-
n && D(s) ? e[o] = ut(s, n) : e[o] = s;
|
|
91
|
-
}, { allOwnKeys: r }), e), Zt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), en = (e, t, n, r) => {
|
|
92
|
-
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
93
|
-
value: t.prototype
|
|
94
|
-
}), n && Object.assign(e.prototype, n);
|
|
95
|
-
}, tn = (e, t, n, r) => {
|
|
96
|
-
let s, o, i;
|
|
97
|
-
const c = {};
|
|
98
|
-
if (t = t || {}, e == null) return t;
|
|
99
|
-
do {
|
|
100
|
-
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
101
|
-
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
102
|
-
e = n !== !1 && Le(e);
|
|
103
|
-
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
104
|
-
return t;
|
|
105
|
-
}, nn = (e, t, n) => {
|
|
106
|
-
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
107
|
-
const r = e.indexOf(t, n);
|
|
108
|
-
return r !== -1 && r === n;
|
|
109
|
-
}, rn = (e) => {
|
|
110
|
-
if (!e) return null;
|
|
111
|
-
if (se(e)) return e;
|
|
112
|
-
let t = e.length;
|
|
113
|
-
if (!ft(t)) return null;
|
|
114
|
-
const n = new Array(t);
|
|
115
|
-
for (; t-- > 0; )
|
|
116
|
-
n[t] = e[t];
|
|
117
|
-
return n;
|
|
118
|
-
}, sn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Le(Uint8Array)), on = (e, t) => {
|
|
119
|
-
const r = (e && e[Ee]).call(e);
|
|
120
|
-
let s;
|
|
121
|
-
for (; (s = r.next()) && !s.done; ) {
|
|
122
|
-
const o = s.value;
|
|
123
|
-
t.call(e, o[0], o[1]);
|
|
124
|
-
}
|
|
125
|
-
}, an = (e, t) => {
|
|
126
|
-
let n;
|
|
127
|
-
const r = [];
|
|
128
|
-
for (; (n = e.exec(t)) !== null; )
|
|
129
|
-
r.push(n);
|
|
130
|
-
return r;
|
|
131
|
-
}, un = M("HTMLFormElement"), cn = (e) => e.toLowerCase().replace(
|
|
132
|
-
/[-_\s]([a-z\d])(\w*)/g,
|
|
133
|
-
function(n, r, s) {
|
|
134
|
-
return r.toUpperCase() + s;
|
|
135
|
-
}
|
|
136
|
-
), Me = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ln = M("RegExp"), ht = (e, t) => {
|
|
137
|
-
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
138
|
-
fe(n, (s, o) => {
|
|
139
|
-
let i;
|
|
140
|
-
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
141
|
-
}), Object.defineProperties(e, r);
|
|
142
|
-
}, fn = (e) => {
|
|
143
|
-
ht(e, (t, n) => {
|
|
144
|
-
if (D(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
145
|
-
return !1;
|
|
146
|
-
const r = e[n];
|
|
147
|
-
if (D(r)) {
|
|
148
|
-
if (t.enumerable = !1, "writable" in t) {
|
|
149
|
-
t.writable = !1;
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
t.set || (t.set = () => {
|
|
153
|
-
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
}, dn = (e, t) => {
|
|
158
|
-
const n = {}, r = (s) => {
|
|
159
|
-
s.forEach((o) => {
|
|
160
|
-
n[o] = !0;
|
|
161
|
-
});
|
|
162
|
-
};
|
|
163
|
-
return se(e) ? r(e) : r(String(e).split(t)), n;
|
|
164
|
-
}, pn = () => {
|
|
165
|
-
}, hn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
166
|
-
function mn(e) {
|
|
167
|
-
return !!(e && D(e.append) && e[ct] === "FormData" && e[Ee]);
|
|
168
|
-
}
|
|
169
|
-
const yn = (e) => {
|
|
170
|
-
const t = new Array(10), n = (r, s) => {
|
|
171
|
-
if (le(r)) {
|
|
172
|
-
if (t.indexOf(r) >= 0)
|
|
173
|
-
return;
|
|
174
|
-
if (ce(r))
|
|
175
|
-
return r;
|
|
176
|
-
if (!("toJSON" in r)) {
|
|
177
|
-
t[s] = r;
|
|
178
|
-
const o = se(r) ? [] : {};
|
|
179
|
-
return fe(r, (i, c) => {
|
|
180
|
-
const h = n(i, s + 1);
|
|
181
|
-
!re(h) && (o[c] = h);
|
|
182
|
-
}), t[s] = void 0, o;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
return r;
|
|
186
|
-
};
|
|
187
|
-
return n(e, 0);
|
|
188
|
-
}, gn = M("AsyncFunction"), wn = (e) => e && (le(e) || D(e)) && D(e.then) && D(e.catch), mt = ((e, t) => e ? setImmediate : t ? ((n, r) => (X.addEventListener("message", ({ source: s, data: o }) => {
|
|
189
|
-
s === X && o === n && r.length && r.shift()();
|
|
190
|
-
}, !1), (s) => {
|
|
191
|
-
r.push(s), X.postMessage(n, "*");
|
|
192
|
-
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
193
|
-
typeof setImmediate == "function",
|
|
194
|
-
D(X.postMessage)
|
|
195
|
-
), bn = typeof queueMicrotask < "u" ? queueMicrotask.bind(X) : typeof process < "u" && process.nextTick || mt, En = (e) => e != null && D(e[Ee]), u = {
|
|
196
|
-
isArray: se,
|
|
197
|
-
isArrayBuffer: lt,
|
|
198
|
-
isBuffer: ce,
|
|
199
|
-
isFormData: Wt,
|
|
200
|
-
isArrayBufferView: Lt,
|
|
201
|
-
isString: Dt,
|
|
202
|
-
isNumber: ft,
|
|
203
|
-
isBoolean: Ft,
|
|
204
|
-
isObject: le,
|
|
205
|
-
isPlainObject: ye,
|
|
206
|
-
isEmptyObject: $t,
|
|
207
|
-
isReadableStream: Kt,
|
|
208
|
-
isRequest: Vt,
|
|
209
|
-
isResponse: Yt,
|
|
210
|
-
isHeaders: Gt,
|
|
211
|
-
isUndefined: re,
|
|
212
|
-
isDate: Bt,
|
|
213
|
-
isFile: Ht,
|
|
214
|
-
isBlob: Mt,
|
|
215
|
-
isRegExp: ln,
|
|
216
|
-
isFunction: D,
|
|
217
|
-
isStream: zt,
|
|
218
|
-
isURLSearchParams: Jt,
|
|
219
|
-
isTypedArray: sn,
|
|
220
|
-
isFileList: qt,
|
|
221
|
-
forEach: fe,
|
|
222
|
-
merge: ke,
|
|
223
|
-
extend: Qt,
|
|
224
|
-
trim: Xt,
|
|
225
|
-
stripBOM: Zt,
|
|
226
|
-
inherits: en,
|
|
227
|
-
toFlatObject: tn,
|
|
228
|
-
kindOf: Se,
|
|
229
|
-
kindOfTest: M,
|
|
230
|
-
endsWith: nn,
|
|
231
|
-
toArray: rn,
|
|
232
|
-
forEachEntry: on,
|
|
233
|
-
matchAll: an,
|
|
234
|
-
isHTMLForm: un,
|
|
235
|
-
hasOwnProperty: Me,
|
|
236
|
-
hasOwnProp: Me,
|
|
237
|
-
// an alias to avoid ESLint no-prototype-builtins detection
|
|
238
|
-
reduceDescriptors: ht,
|
|
239
|
-
freezeMethods: fn,
|
|
240
|
-
toObjectSet: dn,
|
|
241
|
-
toCamelCase: cn,
|
|
242
|
-
noop: pn,
|
|
243
|
-
toFiniteNumber: hn,
|
|
244
|
-
findKey: dt,
|
|
245
|
-
global: X,
|
|
246
|
-
isContextDefined: pt,
|
|
247
|
-
isSpecCompliantForm: mn,
|
|
248
|
-
toJSONObject: yn,
|
|
249
|
-
isAsyncFn: gn,
|
|
250
|
-
isThenable: wn,
|
|
251
|
-
setImmediate: mt,
|
|
252
|
-
asap: bn,
|
|
253
|
-
isIterable: En
|
|
254
|
-
};
|
|
255
|
-
function S(e, t, n, r, s) {
|
|
256
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
257
|
-
}
|
|
258
|
-
u.inherits(S, Error, {
|
|
259
|
-
toJSON: function() {
|
|
260
|
-
return {
|
|
261
|
-
// Standard
|
|
262
|
-
message: this.message,
|
|
263
|
-
name: this.name,
|
|
264
|
-
// Microsoft
|
|
265
|
-
description: this.description,
|
|
266
|
-
number: this.number,
|
|
267
|
-
// Mozilla
|
|
268
|
-
fileName: this.fileName,
|
|
269
|
-
lineNumber: this.lineNumber,
|
|
270
|
-
columnNumber: this.columnNumber,
|
|
271
|
-
stack: this.stack,
|
|
272
|
-
// Axios
|
|
273
|
-
config: u.toJSONObject(this.config),
|
|
274
|
-
code: this.code,
|
|
275
|
-
status: this.status
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
const yt = S.prototype, gt = {};
|
|
280
|
-
[
|
|
281
|
-
"ERR_BAD_OPTION_VALUE",
|
|
282
|
-
"ERR_BAD_OPTION",
|
|
283
|
-
"ECONNABORTED",
|
|
284
|
-
"ETIMEDOUT",
|
|
285
|
-
"ERR_NETWORK",
|
|
286
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
287
|
-
"ERR_DEPRECATED",
|
|
288
|
-
"ERR_BAD_RESPONSE",
|
|
289
|
-
"ERR_BAD_REQUEST",
|
|
290
|
-
"ERR_CANCELED",
|
|
291
|
-
"ERR_NOT_SUPPORT",
|
|
292
|
-
"ERR_INVALID_URL"
|
|
293
|
-
// eslint-disable-next-line func-names
|
|
294
|
-
].forEach((e) => {
|
|
295
|
-
gt[e] = { value: e };
|
|
296
|
-
});
|
|
297
|
-
Object.defineProperties(S, gt);
|
|
298
|
-
Object.defineProperty(yt, "isAxiosError", { value: !0 });
|
|
299
|
-
S.from = (e, t, n, r, s, o) => {
|
|
300
|
-
const i = Object.create(yt);
|
|
301
|
-
u.toFlatObject(e, i, function(f) {
|
|
302
|
-
return f !== Error.prototype;
|
|
303
|
-
}, (l) => l !== "isAxiosError");
|
|
304
|
-
const c = e && e.message ? e.message : "Error", h = t == null && e ? e.code : t;
|
|
305
|
-
return S.call(i, c, h, n, r, s), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", o && Object.assign(i, o), i;
|
|
306
|
-
};
|
|
307
|
-
const Sn = null;
|
|
308
|
-
function Ne(e) {
|
|
309
|
-
return u.isPlainObject(e) || u.isArray(e);
|
|
310
|
-
}
|
|
311
|
-
function wt(e) {
|
|
312
|
-
return u.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
313
|
-
}
|
|
314
|
-
function qe(e, t, n) {
|
|
315
|
-
return e ? e.concat(t).map(function(s, o) {
|
|
316
|
-
return s = wt(s), !n && o ? "[" + s + "]" : s;
|
|
317
|
-
}).join(n ? "." : "") : t;
|
|
318
|
-
}
|
|
319
|
-
function Rn(e) {
|
|
320
|
-
return u.isArray(e) && !e.some(Ne);
|
|
321
|
-
}
|
|
322
|
-
const Tn = u.toFlatObject(u, {}, null, function(t) {
|
|
323
|
-
return /^is[A-Z]/.test(t);
|
|
324
|
-
});
|
|
325
|
-
function Te(e, t, n) {
|
|
326
|
-
if (!u.isObject(e))
|
|
327
|
-
throw new TypeError("target must be an object");
|
|
328
|
-
t = t || new FormData(), n = u.toFlatObject(n, {
|
|
329
|
-
metaTokens: !0,
|
|
330
|
-
dots: !1,
|
|
331
|
-
indexes: !1
|
|
332
|
-
}, !1, function(m, g) {
|
|
333
|
-
return !u.isUndefined(g[m]);
|
|
334
|
-
});
|
|
335
|
-
const r = n.metaTokens, s = n.visitor || f, o = n.dots, i = n.indexes, h = (n.Blob || typeof Blob < "u" && Blob) && u.isSpecCompliantForm(t);
|
|
336
|
-
if (!u.isFunction(s))
|
|
337
|
-
throw new TypeError("visitor must be a function");
|
|
338
|
-
function l(p) {
|
|
339
|
-
if (p === null) return "";
|
|
340
|
-
if (u.isDate(p))
|
|
341
|
-
return p.toISOString();
|
|
342
|
-
if (u.isBoolean(p))
|
|
343
|
-
return p.toString();
|
|
344
|
-
if (!h && u.isBlob(p))
|
|
345
|
-
throw new S("Blob is not supported. Use a Buffer instead.");
|
|
346
|
-
return u.isArrayBuffer(p) || u.isTypedArray(p) ? h && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
347
|
-
}
|
|
348
|
-
function f(p, m, g) {
|
|
349
|
-
let _ = p;
|
|
350
|
-
if (p && !g && typeof p == "object") {
|
|
351
|
-
if (u.endsWith(m, "{}"))
|
|
352
|
-
m = r ? m : m.slice(0, -2), p = JSON.stringify(p);
|
|
353
|
-
else if (u.isArray(p) && Rn(p) || (u.isFileList(p) || u.endsWith(m, "[]")) && (_ = u.toArray(p)))
|
|
354
|
-
return m = wt(m), _.forEach(function(O, k) {
|
|
355
|
-
!(u.isUndefined(O) || O === null) && t.append(
|
|
356
|
-
// eslint-disable-next-line no-nested-ternary
|
|
357
|
-
i === !0 ? qe([m], k, o) : i === null ? m : m + "[]",
|
|
358
|
-
l(O)
|
|
359
|
-
);
|
|
360
|
-
}), !1;
|
|
361
|
-
}
|
|
362
|
-
return Ne(p) ? !0 : (t.append(qe(g, m, o), l(p)), !1);
|
|
363
|
-
}
|
|
364
|
-
const y = [], R = Object.assign(Tn, {
|
|
365
|
-
defaultVisitor: f,
|
|
366
|
-
convertValue: l,
|
|
367
|
-
isVisitable: Ne
|
|
368
|
-
});
|
|
369
|
-
function C(p, m) {
|
|
370
|
-
if (!u.isUndefined(p)) {
|
|
371
|
-
if (y.indexOf(p) !== -1)
|
|
372
|
-
throw Error("Circular reference detected in " + m.join("."));
|
|
373
|
-
y.push(p), u.forEach(p, function(_, P) {
|
|
374
|
-
(!(u.isUndefined(_) || _ === null) && s.call(
|
|
375
|
-
t,
|
|
376
|
-
_,
|
|
377
|
-
u.isString(P) ? P.trim() : P,
|
|
378
|
-
m,
|
|
379
|
-
R
|
|
380
|
-
)) === !0 && C(_, m ? m.concat(P) : [P]);
|
|
381
|
-
}), y.pop();
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
if (!u.isObject(e))
|
|
385
|
-
throw new TypeError("data must be an object");
|
|
386
|
-
return C(e), t;
|
|
387
|
-
}
|
|
388
|
-
function ze(e) {
|
|
389
|
-
const t = {
|
|
390
|
-
"!": "%21",
|
|
391
|
-
"'": "%27",
|
|
392
|
-
"(": "%28",
|
|
393
|
-
")": "%29",
|
|
394
|
-
"~": "%7E",
|
|
395
|
-
"%20": "+",
|
|
396
|
-
"%00": "\0"
|
|
397
|
-
};
|
|
398
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
399
|
-
return t[r];
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
function De(e, t) {
|
|
403
|
-
this._pairs = [], e && Te(e, this, t);
|
|
404
|
-
}
|
|
405
|
-
const bt = De.prototype;
|
|
406
|
-
bt.append = function(t, n) {
|
|
407
|
-
this._pairs.push([t, n]);
|
|
408
|
-
};
|
|
409
|
-
bt.toString = function(t) {
|
|
410
|
-
const n = t ? function(r) {
|
|
411
|
-
return t.call(this, r, ze);
|
|
412
|
-
} : ze;
|
|
413
|
-
return this._pairs.map(function(s) {
|
|
414
|
-
return n(s[0]) + "=" + n(s[1]);
|
|
415
|
-
}, "").join("&");
|
|
416
|
-
};
|
|
417
|
-
function An(e) {
|
|
418
|
-
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
419
|
-
}
|
|
420
|
-
function Et(e, t, n) {
|
|
421
|
-
if (!t)
|
|
422
|
-
return e;
|
|
423
|
-
const r = n && n.encode || An;
|
|
424
|
-
u.isFunction(n) && (n = {
|
|
425
|
-
serialize: n
|
|
426
|
-
});
|
|
427
|
-
const s = n && n.serialize;
|
|
428
|
-
let o;
|
|
429
|
-
if (s ? o = s(t, n) : o = u.isURLSearchParams(t) ? t.toString() : new De(t, n).toString(r), o) {
|
|
430
|
-
const i = e.indexOf("#");
|
|
431
|
-
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
432
|
-
}
|
|
433
|
-
return e;
|
|
434
|
-
}
|
|
435
|
-
class We {
|
|
436
|
-
constructor() {
|
|
437
|
-
this.handlers = [];
|
|
438
|
-
}
|
|
439
|
-
/**
|
|
440
|
-
* Add a new interceptor to the stack
|
|
441
|
-
*
|
|
442
|
-
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
443
|
-
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
444
|
-
*
|
|
445
|
-
* @return {Number} An ID used to remove interceptor later
|
|
446
|
-
*/
|
|
447
|
-
use(t, n, r) {
|
|
448
|
-
return this.handlers.push({
|
|
449
|
-
fulfilled: t,
|
|
450
|
-
rejected: n,
|
|
451
|
-
synchronous: r ? r.synchronous : !1,
|
|
452
|
-
runWhen: r ? r.runWhen : null
|
|
453
|
-
}), this.handlers.length - 1;
|
|
454
|
-
}
|
|
455
|
-
/**
|
|
456
|
-
* Remove an interceptor from the stack
|
|
457
|
-
*
|
|
458
|
-
* @param {Number} id The ID that was returned by `use`
|
|
459
|
-
*
|
|
460
|
-
* @returns {void}
|
|
461
|
-
*/
|
|
462
|
-
eject(t) {
|
|
463
|
-
this.handlers[t] && (this.handlers[t] = null);
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* Clear all interceptors from the stack
|
|
467
|
-
*
|
|
468
|
-
* @returns {void}
|
|
469
|
-
*/
|
|
470
|
-
clear() {
|
|
471
|
-
this.handlers && (this.handlers = []);
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* Iterate over all the registered interceptors
|
|
475
|
-
*
|
|
476
|
-
* This method is particularly useful for skipping over any
|
|
477
|
-
* interceptors that may have become `null` calling `eject`.
|
|
478
|
-
*
|
|
479
|
-
* @param {Function} fn The function to call for each interceptor
|
|
480
|
-
*
|
|
481
|
-
* @returns {void}
|
|
482
|
-
*/
|
|
483
|
-
forEach(t) {
|
|
484
|
-
u.forEach(this.handlers, function(r) {
|
|
485
|
-
r !== null && t(r);
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
const St = {
|
|
490
|
-
silentJSONParsing: !0,
|
|
491
|
-
forcedJSONParsing: !0,
|
|
492
|
-
clarifyTimeoutError: !1
|
|
493
|
-
}, On = typeof URLSearchParams < "u" ? URLSearchParams : De, _n = typeof FormData < "u" ? FormData : null, Cn = typeof Blob < "u" ? Blob : null, Pn = {
|
|
494
|
-
isBrowser: !0,
|
|
495
|
-
classes: {
|
|
496
|
-
URLSearchParams: On,
|
|
497
|
-
FormData: _n,
|
|
498
|
-
Blob: Cn
|
|
499
|
-
},
|
|
500
|
-
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
501
|
-
}, Fe = typeof window < "u" && typeof document < "u", Ue = typeof navigator == "object" && navigator || void 0, vn = Fe && (!Ue || ["ReactNative", "NativeScript", "NS"].indexOf(Ue.product) < 0), xn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
502
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", kn = Fe && window.location.href || "http://localhost", Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
503
|
-
__proto__: null,
|
|
504
|
-
hasBrowserEnv: Fe,
|
|
505
|
-
hasStandardBrowserEnv: vn,
|
|
506
|
-
hasStandardBrowserWebWorkerEnv: xn,
|
|
507
|
-
navigator: Ue,
|
|
508
|
-
origin: kn
|
|
509
|
-
}, Symbol.toStringTag, { value: "Module" })), j = {
|
|
510
|
-
...Nn,
|
|
511
|
-
...Pn
|
|
512
|
-
};
|
|
513
|
-
function Un(e, t) {
|
|
514
|
-
return Te(e, new j.classes.URLSearchParams(), {
|
|
515
|
-
visitor: function(n, r, s, o) {
|
|
516
|
-
return j.isNode && u.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
517
|
-
},
|
|
518
|
-
...t
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
function In(e) {
|
|
522
|
-
return u.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
523
|
-
}
|
|
524
|
-
function jn(e) {
|
|
525
|
-
const t = {}, n = Object.keys(e);
|
|
526
|
-
let r;
|
|
527
|
-
const s = n.length;
|
|
528
|
-
let o;
|
|
529
|
-
for (r = 0; r < s; r++)
|
|
530
|
-
o = n[r], t[o] = e[o];
|
|
531
|
-
return t;
|
|
532
|
-
}
|
|
533
|
-
function Rt(e) {
|
|
534
|
-
function t(n, r, s, o) {
|
|
535
|
-
let i = n[o++];
|
|
536
|
-
if (i === "__proto__") return !0;
|
|
537
|
-
const c = Number.isFinite(+i), h = o >= n.length;
|
|
538
|
-
return i = !i && u.isArray(s) ? s.length : i, h ? (u.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !u.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && u.isArray(s[i]) && (s[i] = jn(s[i])), !c);
|
|
539
|
-
}
|
|
540
|
-
if (u.isFormData(e) && u.isFunction(e.entries)) {
|
|
541
|
-
const n = {};
|
|
542
|
-
return u.forEachEntry(e, (r, s) => {
|
|
543
|
-
t(In(r), s, n, 0);
|
|
544
|
-
}), n;
|
|
545
|
-
}
|
|
546
|
-
return null;
|
|
547
|
-
}
|
|
548
|
-
function Ln(e, t, n) {
|
|
549
|
-
if (u.isString(e))
|
|
550
|
-
try {
|
|
551
|
-
return (t || JSON.parse)(e), u.trim(e);
|
|
552
|
-
} catch (r) {
|
|
553
|
-
if (r.name !== "SyntaxError")
|
|
554
|
-
throw r;
|
|
555
|
-
}
|
|
556
|
-
return (n || JSON.stringify)(e);
|
|
557
|
-
}
|
|
558
|
-
const de = {
|
|
559
|
-
transitional: St,
|
|
560
|
-
adapter: ["xhr", "http", "fetch"],
|
|
561
|
-
transformRequest: [function(t, n) {
|
|
562
|
-
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = u.isObject(t);
|
|
563
|
-
if (o && u.isHTMLForm(t) && (t = new FormData(t)), u.isFormData(t))
|
|
564
|
-
return s ? JSON.stringify(Rt(t)) : t;
|
|
565
|
-
if (u.isArrayBuffer(t) || u.isBuffer(t) || u.isStream(t) || u.isFile(t) || u.isBlob(t) || u.isReadableStream(t))
|
|
566
|
-
return t;
|
|
567
|
-
if (u.isArrayBufferView(t))
|
|
568
|
-
return t.buffer;
|
|
569
|
-
if (u.isURLSearchParams(t))
|
|
570
|
-
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
571
|
-
let c;
|
|
572
|
-
if (o) {
|
|
573
|
-
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
574
|
-
return Un(t, this.formSerializer).toString();
|
|
575
|
-
if ((c = u.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
576
|
-
const h = this.env && this.env.FormData;
|
|
577
|
-
return Te(
|
|
578
|
-
c ? { "files[]": t } : t,
|
|
579
|
-
h && new h(),
|
|
580
|
-
this.formSerializer
|
|
581
|
-
);
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
return o || s ? (n.setContentType("application/json", !1), Ln(t)) : t;
|
|
585
|
-
}],
|
|
586
|
-
transformResponse: [function(t) {
|
|
587
|
-
const n = this.transitional || de.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
588
|
-
if (u.isResponse(t) || u.isReadableStream(t))
|
|
589
|
-
return t;
|
|
590
|
-
if (t && u.isString(t) && (r && !this.responseType || s)) {
|
|
591
|
-
const i = !(n && n.silentJSONParsing) && s;
|
|
592
|
-
try {
|
|
593
|
-
return JSON.parse(t, this.parseReviver);
|
|
594
|
-
} catch (c) {
|
|
595
|
-
if (i)
|
|
596
|
-
throw c.name === "SyntaxError" ? S.from(c, S.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
return t;
|
|
600
|
-
}],
|
|
601
|
-
/**
|
|
602
|
-
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
603
|
-
* timeout is not created.
|
|
604
|
-
*/
|
|
605
|
-
timeout: 0,
|
|
606
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
607
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
608
|
-
maxContentLength: -1,
|
|
609
|
-
maxBodyLength: -1,
|
|
610
|
-
env: {
|
|
611
|
-
FormData: j.classes.FormData,
|
|
612
|
-
Blob: j.classes.Blob
|
|
613
|
-
},
|
|
614
|
-
validateStatus: function(t) {
|
|
615
|
-
return t >= 200 && t < 300;
|
|
616
|
-
},
|
|
617
|
-
headers: {
|
|
618
|
-
common: {
|
|
619
|
-
Accept: "application/json, text/plain, */*",
|
|
620
|
-
"Content-Type": void 0
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
};
|
|
624
|
-
u.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
625
|
-
de.headers[e] = {};
|
|
626
|
-
});
|
|
627
|
-
const Dn = u.toObjectSet([
|
|
628
|
-
"age",
|
|
629
|
-
"authorization",
|
|
630
|
-
"content-length",
|
|
631
|
-
"content-type",
|
|
632
|
-
"etag",
|
|
633
|
-
"expires",
|
|
634
|
-
"from",
|
|
635
|
-
"host",
|
|
636
|
-
"if-modified-since",
|
|
637
|
-
"if-unmodified-since",
|
|
638
|
-
"last-modified",
|
|
639
|
-
"location",
|
|
640
|
-
"max-forwards",
|
|
641
|
-
"proxy-authorization",
|
|
642
|
-
"referer",
|
|
643
|
-
"retry-after",
|
|
644
|
-
"user-agent"
|
|
645
|
-
]), Fn = (e) => {
|
|
646
|
-
const t = {};
|
|
647
|
-
let n, r, s;
|
|
648
|
-
return e && e.split(`
|
|
649
|
-
`).forEach(function(i) {
|
|
650
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Dn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
651
|
-
}), t;
|
|
652
|
-
}, Je = Symbol("internals");
|
|
653
|
-
function ae(e) {
|
|
654
|
-
return e && String(e).trim().toLowerCase();
|
|
655
|
-
}
|
|
656
|
-
function ge(e) {
|
|
657
|
-
return e === !1 || e == null ? e : u.isArray(e) ? e.map(ge) : String(e);
|
|
658
|
-
}
|
|
659
|
-
function $n(e) {
|
|
660
|
-
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
661
|
-
let r;
|
|
662
|
-
for (; r = n.exec(e); )
|
|
663
|
-
t[r[1]] = r[2];
|
|
664
|
-
return t;
|
|
665
|
-
}
|
|
666
|
-
const Bn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
667
|
-
function _e(e, t, n, r, s) {
|
|
668
|
-
if (u.isFunction(r))
|
|
669
|
-
return r.call(this, t, n);
|
|
670
|
-
if (s && (t = n), !!u.isString(t)) {
|
|
671
|
-
if (u.isString(r))
|
|
672
|
-
return t.indexOf(r) !== -1;
|
|
673
|
-
if (u.isRegExp(r))
|
|
674
|
-
return r.test(t);
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
function Hn(e) {
|
|
678
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
679
|
-
}
|
|
680
|
-
function Mn(e, t) {
|
|
681
|
-
const n = u.toCamelCase(" " + t);
|
|
682
|
-
["get", "set", "has"].forEach((r) => {
|
|
683
|
-
Object.defineProperty(e, r + n, {
|
|
684
|
-
value: function(s, o, i) {
|
|
685
|
-
return this[r].call(this, t, s, o, i);
|
|
686
|
-
},
|
|
687
|
-
configurable: !0
|
|
688
|
-
});
|
|
689
|
-
});
|
|
690
|
-
}
|
|
691
|
-
let F = class {
|
|
692
|
-
constructor(t) {
|
|
693
|
-
t && this.set(t);
|
|
694
|
-
}
|
|
695
|
-
set(t, n, r) {
|
|
696
|
-
const s = this;
|
|
697
|
-
function o(c, h, l) {
|
|
698
|
-
const f = ae(h);
|
|
699
|
-
if (!f)
|
|
700
|
-
throw new Error("header name must be a non-empty string");
|
|
701
|
-
const y = u.findKey(s, f);
|
|
702
|
-
(!y || s[y] === void 0 || l === !0 || l === void 0 && s[y] !== !1) && (s[y || h] = ge(c));
|
|
703
|
-
}
|
|
704
|
-
const i = (c, h) => u.forEach(c, (l, f) => o(l, f, h));
|
|
705
|
-
if (u.isPlainObject(t) || t instanceof this.constructor)
|
|
706
|
-
i(t, n);
|
|
707
|
-
else if (u.isString(t) && (t = t.trim()) && !Bn(t))
|
|
708
|
-
i(Fn(t), n);
|
|
709
|
-
else if (u.isObject(t) && u.isIterable(t)) {
|
|
710
|
-
let c = {}, h, l;
|
|
711
|
-
for (const f of t) {
|
|
712
|
-
if (!u.isArray(f))
|
|
713
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
714
|
-
c[l = f[0]] = (h = c[l]) ? u.isArray(h) ? [...h, f[1]] : [h, f[1]] : f[1];
|
|
715
|
-
}
|
|
716
|
-
i(c, n);
|
|
717
|
-
} else
|
|
718
|
-
t != null && o(n, t, r);
|
|
719
|
-
return this;
|
|
720
|
-
}
|
|
721
|
-
get(t, n) {
|
|
722
|
-
if (t = ae(t), t) {
|
|
723
|
-
const r = u.findKey(this, t);
|
|
724
|
-
if (r) {
|
|
725
|
-
const s = this[r];
|
|
726
|
-
if (!n)
|
|
727
|
-
return s;
|
|
728
|
-
if (n === !0)
|
|
729
|
-
return $n(s);
|
|
730
|
-
if (u.isFunction(n))
|
|
731
|
-
return n.call(this, s, r);
|
|
732
|
-
if (u.isRegExp(n))
|
|
733
|
-
return n.exec(s);
|
|
734
|
-
throw new TypeError("parser must be boolean|regexp|function");
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
has(t, n) {
|
|
739
|
-
if (t = ae(t), t) {
|
|
740
|
-
const r = u.findKey(this, t);
|
|
741
|
-
return !!(r && this[r] !== void 0 && (!n || _e(this, this[r], r, n)));
|
|
742
|
-
}
|
|
743
|
-
return !1;
|
|
744
|
-
}
|
|
745
|
-
delete(t, n) {
|
|
746
|
-
const r = this;
|
|
747
|
-
let s = !1;
|
|
748
|
-
function o(i) {
|
|
749
|
-
if (i = ae(i), i) {
|
|
750
|
-
const c = u.findKey(r, i);
|
|
751
|
-
c && (!n || _e(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
return u.isArray(t) ? t.forEach(o) : o(t), s;
|
|
755
|
-
}
|
|
756
|
-
clear(t) {
|
|
757
|
-
const n = Object.keys(this);
|
|
758
|
-
let r = n.length, s = !1;
|
|
759
|
-
for (; r--; ) {
|
|
760
|
-
const o = n[r];
|
|
761
|
-
(!t || _e(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
762
|
-
}
|
|
763
|
-
return s;
|
|
764
|
-
}
|
|
765
|
-
normalize(t) {
|
|
766
|
-
const n = this, r = {};
|
|
767
|
-
return u.forEach(this, (s, o) => {
|
|
768
|
-
const i = u.findKey(r, o);
|
|
769
|
-
if (i) {
|
|
770
|
-
n[i] = ge(s), delete n[o];
|
|
771
|
-
return;
|
|
772
|
-
}
|
|
773
|
-
const c = t ? Hn(o) : String(o).trim();
|
|
774
|
-
c !== o && delete n[o], n[c] = ge(s), r[c] = !0;
|
|
775
|
-
}), this;
|
|
776
|
-
}
|
|
777
|
-
concat(...t) {
|
|
778
|
-
return this.constructor.concat(this, ...t);
|
|
779
|
-
}
|
|
780
|
-
toJSON(t) {
|
|
781
|
-
const n = /* @__PURE__ */ Object.create(null);
|
|
782
|
-
return u.forEach(this, (r, s) => {
|
|
783
|
-
r != null && r !== !1 && (n[s] = t && u.isArray(r) ? r.join(", ") : r);
|
|
784
|
-
}), n;
|
|
785
|
-
}
|
|
786
|
-
[Symbol.iterator]() {
|
|
787
|
-
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
788
|
-
}
|
|
789
|
-
toString() {
|
|
790
|
-
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
791
|
-
`);
|
|
792
|
-
}
|
|
793
|
-
getSetCookie() {
|
|
794
|
-
return this.get("set-cookie") || [];
|
|
795
|
-
}
|
|
796
|
-
get [Symbol.toStringTag]() {
|
|
797
|
-
return "AxiosHeaders";
|
|
798
|
-
}
|
|
799
|
-
static from(t) {
|
|
800
|
-
return t instanceof this ? t : new this(t);
|
|
801
|
-
}
|
|
802
|
-
static concat(t, ...n) {
|
|
803
|
-
const r = new this(t);
|
|
804
|
-
return n.forEach((s) => r.set(s)), r;
|
|
805
|
-
}
|
|
806
|
-
static accessor(t) {
|
|
807
|
-
const r = (this[Je] = this[Je] = {
|
|
808
|
-
accessors: {}
|
|
809
|
-
}).accessors, s = this.prototype;
|
|
810
|
-
function o(i) {
|
|
811
|
-
const c = ae(i);
|
|
812
|
-
r[c] || (Mn(s, i), r[c] = !0);
|
|
813
|
-
}
|
|
814
|
-
return u.isArray(t) ? t.forEach(o) : o(t), this;
|
|
815
|
-
}
|
|
816
|
-
};
|
|
817
|
-
F.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
818
|
-
u.reduceDescriptors(F.prototype, ({ value: e }, t) => {
|
|
819
|
-
let n = t[0].toUpperCase() + t.slice(1);
|
|
820
|
-
return {
|
|
821
|
-
get: () => e,
|
|
822
|
-
set(r) {
|
|
823
|
-
this[n] = r;
|
|
824
|
-
}
|
|
825
|
-
};
|
|
826
|
-
});
|
|
827
|
-
u.freezeMethods(F);
|
|
828
|
-
function Ce(e, t) {
|
|
829
|
-
const n = this || de, r = t || n, s = F.from(r.headers);
|
|
830
|
-
let o = r.data;
|
|
831
|
-
return u.forEach(e, function(c) {
|
|
832
|
-
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
833
|
-
}), s.normalize(), o;
|
|
834
|
-
}
|
|
835
|
-
function Tt(e) {
|
|
836
|
-
return !!(e && e.__CANCEL__);
|
|
837
|
-
}
|
|
838
|
-
function oe(e, t, n) {
|
|
839
|
-
S.call(this, e ?? "canceled", S.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
840
|
-
}
|
|
841
|
-
u.inherits(oe, S, {
|
|
842
|
-
__CANCEL__: !0
|
|
843
|
-
});
|
|
844
|
-
function At(e, t, n) {
|
|
845
|
-
const r = n.config.validateStatus;
|
|
846
|
-
!n.status || !r || r(n.status) ? e(n) : t(new S(
|
|
847
|
-
"Request failed with status code " + n.status,
|
|
848
|
-
[S.ERR_BAD_REQUEST, S.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
849
|
-
n.config,
|
|
850
|
-
n.request,
|
|
851
|
-
n
|
|
852
|
-
));
|
|
853
|
-
}
|
|
854
|
-
function qn(e) {
|
|
855
|
-
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
856
|
-
return t && t[1] || "";
|
|
857
|
-
}
|
|
858
|
-
function zn(e, t) {
|
|
859
|
-
e = e || 10;
|
|
860
|
-
const n = new Array(e), r = new Array(e);
|
|
861
|
-
let s = 0, o = 0, i;
|
|
862
|
-
return t = t !== void 0 ? t : 1e3, function(h) {
|
|
863
|
-
const l = Date.now(), f = r[o];
|
|
864
|
-
i || (i = l), n[s] = h, r[s] = l;
|
|
865
|
-
let y = o, R = 0;
|
|
866
|
-
for (; y !== s; )
|
|
867
|
-
R += n[y++], y = y % e;
|
|
868
|
-
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), l - i < t)
|
|
869
|
-
return;
|
|
870
|
-
const C = f && l - f;
|
|
871
|
-
return C ? Math.round(R * 1e3 / C) : void 0;
|
|
872
|
-
};
|
|
873
|
-
}
|
|
874
|
-
function Wn(e, t) {
|
|
875
|
-
let n = 0, r = 1e3 / t, s, o;
|
|
876
|
-
const i = (l, f = Date.now()) => {
|
|
877
|
-
n = f, s = null, o && (clearTimeout(o), o = null), e(...l);
|
|
878
|
-
};
|
|
879
|
-
return [(...l) => {
|
|
880
|
-
const f = Date.now(), y = f - n;
|
|
881
|
-
y >= r ? i(l, f) : (s = l, o || (o = setTimeout(() => {
|
|
882
|
-
o = null, i(s);
|
|
883
|
-
}, r - y)));
|
|
884
|
-
}, () => s && i(s)];
|
|
885
|
-
}
|
|
886
|
-
const be = (e, t, n = 3) => {
|
|
887
|
-
let r = 0;
|
|
888
|
-
const s = zn(50, 250);
|
|
889
|
-
return Wn((o) => {
|
|
890
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, h = i - r, l = s(h), f = i <= c;
|
|
891
|
-
r = i;
|
|
892
|
-
const y = {
|
|
893
|
-
loaded: i,
|
|
894
|
-
total: c,
|
|
895
|
-
progress: c ? i / c : void 0,
|
|
896
|
-
bytes: h,
|
|
897
|
-
rate: l || void 0,
|
|
898
|
-
estimated: l && c && f ? (c - i) / l : void 0,
|
|
899
|
-
event: o,
|
|
900
|
-
lengthComputable: c != null,
|
|
901
|
-
[t ? "download" : "upload"]: !0
|
|
902
|
-
};
|
|
903
|
-
e(y);
|
|
904
|
-
}, n);
|
|
905
|
-
}, Ke = (e, t) => {
|
|
906
|
-
const n = e != null;
|
|
907
|
-
return [(r) => t[0]({
|
|
908
|
-
lengthComputable: n,
|
|
909
|
-
total: e,
|
|
910
|
-
loaded: r
|
|
911
|
-
}), t[1]];
|
|
912
|
-
}, Ve = (e) => (...t) => u.asap(() => e(...t)), Jn = j.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, j.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
913
|
-
new URL(j.origin),
|
|
914
|
-
j.navigator && /(msie|trident)/i.test(j.navigator.userAgent)
|
|
915
|
-
) : () => !0, Kn = j.hasStandardBrowserEnv ? (
|
|
916
|
-
// Standard browser envs support document.cookie
|
|
917
|
-
{
|
|
918
|
-
write(e, t, n, r, s, o, i) {
|
|
919
|
-
if (typeof document > "u") return;
|
|
920
|
-
const c = [`${e}=${encodeURIComponent(t)}`];
|
|
921
|
-
u.isNumber(n) && c.push(`expires=${new Date(n).toUTCString()}`), u.isString(r) && c.push(`path=${r}`), u.isString(s) && c.push(`domain=${s}`), o === !0 && c.push("secure"), u.isString(i) && c.push(`SameSite=${i}`), document.cookie = c.join("; ");
|
|
922
|
-
},
|
|
923
|
-
read(e) {
|
|
924
|
-
if (typeof document > "u") return null;
|
|
925
|
-
const t = document.cookie.match(new RegExp("(?:^|; )" + e + "=([^;]*)"));
|
|
926
|
-
return t ? decodeURIComponent(t[1]) : null;
|
|
927
|
-
},
|
|
928
|
-
remove(e) {
|
|
929
|
-
this.write(e, "", Date.now() - 864e5, "/");
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
) : (
|
|
933
|
-
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
934
|
-
{
|
|
935
|
-
write() {
|
|
936
|
-
},
|
|
937
|
-
read() {
|
|
938
|
-
return null;
|
|
939
|
-
},
|
|
940
|
-
remove() {
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
);
|
|
944
|
-
function Vn(e) {
|
|
945
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
946
|
-
}
|
|
947
|
-
function Yn(e, t) {
|
|
948
|
-
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
949
|
-
}
|
|
950
|
-
function Ot(e, t, n) {
|
|
951
|
-
let r = !Vn(t);
|
|
952
|
-
return e && (r || n == !1) ? Yn(e, t) : t;
|
|
953
|
-
}
|
|
954
|
-
const Ye = (e) => e instanceof F ? { ...e } : e;
|
|
955
|
-
function Z(e, t) {
|
|
956
|
-
t = t || {};
|
|
957
|
-
const n = {};
|
|
958
|
-
function r(l, f, y, R) {
|
|
959
|
-
return u.isPlainObject(l) && u.isPlainObject(f) ? u.merge.call({ caseless: R }, l, f) : u.isPlainObject(f) ? u.merge({}, f) : u.isArray(f) ? f.slice() : f;
|
|
960
|
-
}
|
|
961
|
-
function s(l, f, y, R) {
|
|
962
|
-
if (u.isUndefined(f)) {
|
|
963
|
-
if (!u.isUndefined(l))
|
|
964
|
-
return r(void 0, l, y, R);
|
|
965
|
-
} else return r(l, f, y, R);
|
|
966
|
-
}
|
|
967
|
-
function o(l, f) {
|
|
968
|
-
if (!u.isUndefined(f))
|
|
969
|
-
return r(void 0, f);
|
|
970
|
-
}
|
|
971
|
-
function i(l, f) {
|
|
972
|
-
if (u.isUndefined(f)) {
|
|
973
|
-
if (!u.isUndefined(l))
|
|
974
|
-
return r(void 0, l);
|
|
975
|
-
} else return r(void 0, f);
|
|
976
|
-
}
|
|
977
|
-
function c(l, f, y) {
|
|
978
|
-
if (y in t)
|
|
979
|
-
return r(l, f);
|
|
980
|
-
if (y in e)
|
|
981
|
-
return r(void 0, l);
|
|
982
|
-
}
|
|
983
|
-
const h = {
|
|
984
|
-
url: o,
|
|
985
|
-
method: o,
|
|
986
|
-
data: o,
|
|
987
|
-
baseURL: i,
|
|
988
|
-
transformRequest: i,
|
|
989
|
-
transformResponse: i,
|
|
990
|
-
paramsSerializer: i,
|
|
991
|
-
timeout: i,
|
|
992
|
-
timeoutMessage: i,
|
|
993
|
-
withCredentials: i,
|
|
994
|
-
withXSRFToken: i,
|
|
995
|
-
adapter: i,
|
|
996
|
-
responseType: i,
|
|
997
|
-
xsrfCookieName: i,
|
|
998
|
-
xsrfHeaderName: i,
|
|
999
|
-
onUploadProgress: i,
|
|
1000
|
-
onDownloadProgress: i,
|
|
1001
|
-
decompress: i,
|
|
1002
|
-
maxContentLength: i,
|
|
1003
|
-
maxBodyLength: i,
|
|
1004
|
-
beforeRedirect: i,
|
|
1005
|
-
transport: i,
|
|
1006
|
-
httpAgent: i,
|
|
1007
|
-
httpsAgent: i,
|
|
1008
|
-
cancelToken: i,
|
|
1009
|
-
socketPath: i,
|
|
1010
|
-
responseEncoding: i,
|
|
1011
|
-
validateStatus: c,
|
|
1012
|
-
headers: (l, f, y) => s(Ye(l), Ye(f), y, !0)
|
|
1013
|
-
};
|
|
1014
|
-
return u.forEach(Object.keys({ ...e, ...t }), function(f) {
|
|
1015
|
-
const y = h[f] || s, R = y(e[f], t[f], f);
|
|
1016
|
-
u.isUndefined(R) && y !== c || (n[f] = R);
|
|
1017
|
-
}), n;
|
|
1018
|
-
}
|
|
1019
|
-
const _t = (e) => {
|
|
1020
|
-
const t = Z({}, e);
|
|
1021
|
-
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1022
|
-
if (t.headers = i = F.from(i), t.url = Et(Ot(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1023
|
-
"Authorization",
|
|
1024
|
-
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1025
|
-
), u.isFormData(n)) {
|
|
1026
|
-
if (j.hasStandardBrowserEnv || j.hasStandardBrowserWebWorkerEnv)
|
|
1027
|
-
i.setContentType(void 0);
|
|
1028
|
-
else if (u.isFunction(n.getHeaders)) {
|
|
1029
|
-
const h = n.getHeaders(), l = ["content-type", "content-length"];
|
|
1030
|
-
Object.entries(h).forEach(([f, y]) => {
|
|
1031
|
-
l.includes(f.toLowerCase()) && i.set(f, y);
|
|
1032
|
-
});
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
if (j.hasStandardBrowserEnv && (r && u.isFunction(r) && (r = r(t)), r || r !== !1 && Jn(t.url))) {
|
|
1036
|
-
const h = s && o && Kn.read(o);
|
|
1037
|
-
h && i.set(s, h);
|
|
1038
|
-
}
|
|
1039
|
-
return t;
|
|
1040
|
-
}, Gn = typeof XMLHttpRequest < "u", Xn = Gn && function(e) {
|
|
1041
|
-
return new Promise(function(n, r) {
|
|
1042
|
-
const s = _t(e);
|
|
1043
|
-
let o = s.data;
|
|
1044
|
-
const i = F.from(s.headers).normalize();
|
|
1045
|
-
let { responseType: c, onUploadProgress: h, onDownloadProgress: l } = s, f, y, R, C, p;
|
|
1046
|
-
function m() {
|
|
1047
|
-
C && C(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(f), s.signal && s.signal.removeEventListener("abort", f);
|
|
1048
|
-
}
|
|
1049
|
-
let g = new XMLHttpRequest();
|
|
1050
|
-
g.open(s.method.toUpperCase(), s.url, !0), g.timeout = s.timeout;
|
|
1051
|
-
function _() {
|
|
1052
|
-
if (!g)
|
|
1053
|
-
return;
|
|
1054
|
-
const O = F.from(
|
|
1055
|
-
"getAllResponseHeaders" in g && g.getAllResponseHeaders()
|
|
1056
|
-
), I = {
|
|
1057
|
-
data: !c || c === "text" || c === "json" ? g.responseText : g.response,
|
|
1058
|
-
status: g.status,
|
|
1059
|
-
statusText: g.statusText,
|
|
1060
|
-
headers: O,
|
|
1061
|
-
config: e,
|
|
1062
|
-
request: g
|
|
1063
|
-
};
|
|
1064
|
-
At(function(T) {
|
|
1065
|
-
n(T), m();
|
|
1066
|
-
}, function(T) {
|
|
1067
|
-
r(T), m();
|
|
1068
|
-
}, I), g = null;
|
|
1069
|
-
}
|
|
1070
|
-
"onloadend" in g ? g.onloadend = _ : g.onreadystatechange = function() {
|
|
1071
|
-
!g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(_);
|
|
1072
|
-
}, g.onabort = function() {
|
|
1073
|
-
g && (r(new S("Request aborted", S.ECONNABORTED, e, g)), g = null);
|
|
1074
|
-
}, g.onerror = function(k) {
|
|
1075
|
-
const I = k && k.message ? k.message : "Network Error", B = new S(I, S.ERR_NETWORK, e, g);
|
|
1076
|
-
B.event = k || null, r(B), g = null;
|
|
1077
|
-
}, g.ontimeout = function() {
|
|
1078
|
-
let k = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1079
|
-
const I = s.transitional || St;
|
|
1080
|
-
s.timeoutErrorMessage && (k = s.timeoutErrorMessage), r(new S(
|
|
1081
|
-
k,
|
|
1082
|
-
I.clarifyTimeoutError ? S.ETIMEDOUT : S.ECONNABORTED,
|
|
1083
|
-
e,
|
|
1084
|
-
g
|
|
1085
|
-
)), g = null;
|
|
1086
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in g && u.forEach(i.toJSON(), function(k, I) {
|
|
1087
|
-
g.setRequestHeader(I, k);
|
|
1088
|
-
}), u.isUndefined(s.withCredentials) || (g.withCredentials = !!s.withCredentials), c && c !== "json" && (g.responseType = s.responseType), l && ([R, p] = be(l, !0), g.addEventListener("progress", R)), h && g.upload && ([y, C] = be(h), g.upload.addEventListener("progress", y), g.upload.addEventListener("loadend", C)), (s.cancelToken || s.signal) && (f = (O) => {
|
|
1089
|
-
g && (r(!O || O.type ? new oe(null, e, g) : O), g.abort(), g = null);
|
|
1090
|
-
}, s.cancelToken && s.cancelToken.subscribe(f), s.signal && (s.signal.aborted ? f() : s.signal.addEventListener("abort", f)));
|
|
1091
|
-
const P = qn(s.url);
|
|
1092
|
-
if (P && j.protocols.indexOf(P) === -1) {
|
|
1093
|
-
r(new S("Unsupported protocol " + P + ":", S.ERR_BAD_REQUEST, e));
|
|
1094
|
-
return;
|
|
1095
|
-
}
|
|
1096
|
-
g.send(o || null);
|
|
1097
|
-
});
|
|
1098
|
-
}, Qn = (e, t) => {
|
|
1099
|
-
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1100
|
-
if (t || n) {
|
|
1101
|
-
let r = new AbortController(), s;
|
|
1102
|
-
const o = function(l) {
|
|
1103
|
-
if (!s) {
|
|
1104
|
-
s = !0, c();
|
|
1105
|
-
const f = l instanceof Error ? l : this.reason;
|
|
1106
|
-
r.abort(f instanceof S ? f : new oe(f instanceof Error ? f.message : f));
|
|
1107
|
-
}
|
|
1108
|
-
};
|
|
1109
|
-
let i = t && setTimeout(() => {
|
|
1110
|
-
i = null, o(new S(`timeout ${t} of ms exceeded`, S.ETIMEDOUT));
|
|
1111
|
-
}, t);
|
|
1112
|
-
const c = () => {
|
|
1113
|
-
e && (i && clearTimeout(i), i = null, e.forEach((l) => {
|
|
1114
|
-
l.unsubscribe ? l.unsubscribe(o) : l.removeEventListener("abort", o);
|
|
1115
|
-
}), e = null);
|
|
1116
|
-
};
|
|
1117
|
-
e.forEach((l) => l.addEventListener("abort", o));
|
|
1118
|
-
const { signal: h } = r;
|
|
1119
|
-
return h.unsubscribe = () => u.asap(c), h;
|
|
1120
|
-
}
|
|
1121
|
-
}, Zn = function* (e, t) {
|
|
1122
|
-
let n = e.byteLength;
|
|
1123
|
-
if (n < t) {
|
|
1124
|
-
yield e;
|
|
1125
|
-
return;
|
|
1126
|
-
}
|
|
1127
|
-
let r = 0, s;
|
|
1128
|
-
for (; r < n; )
|
|
1129
|
-
s = r + t, yield e.slice(r, s), r = s;
|
|
1130
|
-
}, er = async function* (e, t) {
|
|
1131
|
-
for await (const n of tr(e))
|
|
1132
|
-
yield* Zn(n, t);
|
|
1133
|
-
}, tr = async function* (e) {
|
|
1134
|
-
if (e[Symbol.asyncIterator]) {
|
|
1135
|
-
yield* e;
|
|
1136
|
-
return;
|
|
1137
|
-
}
|
|
1138
|
-
const t = e.getReader();
|
|
1139
|
-
try {
|
|
1140
|
-
for (; ; ) {
|
|
1141
|
-
const { done: n, value: r } = await t.read();
|
|
1142
|
-
if (n)
|
|
1143
|
-
break;
|
|
1144
|
-
yield r;
|
|
1145
|
-
}
|
|
1146
|
-
} finally {
|
|
1147
|
-
await t.cancel();
|
|
1148
|
-
}
|
|
1149
|
-
}, Ge = (e, t, n, r) => {
|
|
1150
|
-
const s = er(e, t);
|
|
1151
|
-
let o = 0, i, c = (h) => {
|
|
1152
|
-
i || (i = !0, r && r(h));
|
|
1153
|
-
};
|
|
1154
|
-
return new ReadableStream({
|
|
1155
|
-
async pull(h) {
|
|
1156
|
-
try {
|
|
1157
|
-
const { done: l, value: f } = await s.next();
|
|
1158
|
-
if (l) {
|
|
1159
|
-
c(), h.close();
|
|
1160
|
-
return;
|
|
1161
|
-
}
|
|
1162
|
-
let y = f.byteLength;
|
|
1163
|
-
if (n) {
|
|
1164
|
-
let R = o += y;
|
|
1165
|
-
n(R);
|
|
1166
|
-
}
|
|
1167
|
-
h.enqueue(new Uint8Array(f));
|
|
1168
|
-
} catch (l) {
|
|
1169
|
-
throw c(l), l;
|
|
1170
|
-
}
|
|
1171
|
-
},
|
|
1172
|
-
cancel(h) {
|
|
1173
|
-
return c(h), s.return();
|
|
1174
|
-
}
|
|
1175
|
-
}, {
|
|
1176
|
-
highWaterMark: 2
|
|
1177
|
-
});
|
|
1178
|
-
}, Xe = 64 * 1024, { isFunction: me } = u, nr = (({ Request: e, Response: t }) => ({
|
|
1179
|
-
Request: e,
|
|
1180
|
-
Response: t
|
|
1181
|
-
}))(u.global), {
|
|
1182
|
-
ReadableStream: Qe,
|
|
1183
|
-
TextEncoder: Ze
|
|
1184
|
-
} = u.global, et = (e, ...t) => {
|
|
1185
|
-
try {
|
|
1186
|
-
return !!e(...t);
|
|
1187
|
-
} catch {
|
|
1188
|
-
return !1;
|
|
1189
|
-
}
|
|
1190
|
-
}, rr = (e) => {
|
|
1191
|
-
e = u.merge.call({
|
|
1192
|
-
skipUndefined: !0
|
|
1193
|
-
}, nr, e);
|
|
1194
|
-
const { fetch: t, Request: n, Response: r } = e, s = t ? me(t) : typeof fetch == "function", o = me(n), i = me(r);
|
|
1195
|
-
if (!s)
|
|
1196
|
-
return !1;
|
|
1197
|
-
const c = s && me(Qe), h = s && (typeof Ze == "function" ? /* @__PURE__ */ ((p) => (m) => p.encode(m))(new Ze()) : async (p) => new Uint8Array(await new n(p).arrayBuffer())), l = o && c && et(() => {
|
|
1198
|
-
let p = !1;
|
|
1199
|
-
const m = new n(j.origin, {
|
|
1200
|
-
body: new Qe(),
|
|
1201
|
-
method: "POST",
|
|
1202
|
-
get duplex() {
|
|
1203
|
-
return p = !0, "half";
|
|
1204
|
-
}
|
|
1205
|
-
}).headers.has("Content-Type");
|
|
1206
|
-
return p && !m;
|
|
1207
|
-
}), f = i && c && et(() => u.isReadableStream(new r("").body)), y = {
|
|
1208
|
-
stream: f && ((p) => p.body)
|
|
1209
|
-
};
|
|
1210
|
-
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
|
|
1211
|
-
!y[p] && (y[p] = (m, g) => {
|
|
1212
|
-
let _ = m && m[p];
|
|
1213
|
-
if (_)
|
|
1214
|
-
return _.call(m);
|
|
1215
|
-
throw new S(`Response type '${p}' is not supported`, S.ERR_NOT_SUPPORT, g);
|
|
1216
|
-
});
|
|
1217
|
-
});
|
|
1218
|
-
const R = async (p) => {
|
|
1219
|
-
if (p == null)
|
|
1220
|
-
return 0;
|
|
1221
|
-
if (u.isBlob(p))
|
|
1222
|
-
return p.size;
|
|
1223
|
-
if (u.isSpecCompliantForm(p))
|
|
1224
|
-
return (await new n(j.origin, {
|
|
1225
|
-
method: "POST",
|
|
1226
|
-
body: p
|
|
1227
|
-
}).arrayBuffer()).byteLength;
|
|
1228
|
-
if (u.isArrayBufferView(p) || u.isArrayBuffer(p))
|
|
1229
|
-
return p.byteLength;
|
|
1230
|
-
if (u.isURLSearchParams(p) && (p = p + ""), u.isString(p))
|
|
1231
|
-
return (await h(p)).byteLength;
|
|
1232
|
-
}, C = async (p, m) => {
|
|
1233
|
-
const g = u.toFiniteNumber(p.getContentLength());
|
|
1234
|
-
return g ?? R(m);
|
|
1235
|
-
};
|
|
1236
|
-
return async (p) => {
|
|
1237
|
-
let {
|
|
1238
|
-
url: m,
|
|
1239
|
-
method: g,
|
|
1240
|
-
data: _,
|
|
1241
|
-
signal: P,
|
|
1242
|
-
cancelToken: O,
|
|
1243
|
-
timeout: k,
|
|
1244
|
-
onDownloadProgress: I,
|
|
1245
|
-
onUploadProgress: B,
|
|
1246
|
-
responseType: T,
|
|
1247
|
-
headers: ee,
|
|
1248
|
-
withCredentials: V = "same-origin",
|
|
1249
|
-
fetchOptions: pe
|
|
1250
|
-
} = _t(p), te = t || fetch;
|
|
1251
|
-
T = T ? (T + "").toLowerCase() : "text";
|
|
1252
|
-
let ne = Qn([P, O && O.toAbortSignal()], k), Y = null;
|
|
1253
|
-
const H = ne && ne.unsubscribe && (() => {
|
|
1254
|
-
ne.unsubscribe();
|
|
1255
|
-
});
|
|
1256
|
-
let he;
|
|
1257
|
-
try {
|
|
1258
|
-
if (B && l && g !== "get" && g !== "head" && (he = await C(ee, _)) !== 0) {
|
|
1259
|
-
let a = new n(m, {
|
|
1260
|
-
method: "POST",
|
|
1261
|
-
body: _,
|
|
1262
|
-
duplex: "half"
|
|
1263
|
-
}), d;
|
|
1264
|
-
if (u.isFormData(_) && (d = a.headers.get("content-type")) && ee.setContentType(d), a.body) {
|
|
1265
|
-
const [b, w] = Ke(
|
|
1266
|
-
he,
|
|
1267
|
-
be(Ve(B))
|
|
1268
|
-
);
|
|
1269
|
-
_ = Ge(a.body, Xe, b, w);
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
u.isString(V) || (V = V ? "include" : "omit");
|
|
1273
|
-
const U = o && "credentials" in n.prototype, G = {
|
|
1274
|
-
...pe,
|
|
1275
|
-
signal: ne,
|
|
1276
|
-
method: g.toUpperCase(),
|
|
1277
|
-
headers: ee.normalize().toJSON(),
|
|
1278
|
-
body: _,
|
|
1279
|
-
duplex: "half",
|
|
1280
|
-
credentials: U ? V : void 0
|
|
1281
|
-
};
|
|
1282
|
-
Y = o && new n(m, G);
|
|
1283
|
-
let q = await (o ? te(Y, pe) : te(m, G));
|
|
1284
|
-
const ie = f && (T === "stream" || T === "response");
|
|
1285
|
-
if (f && (I || ie && H)) {
|
|
1286
|
-
const a = {};
|
|
1287
|
-
["status", "statusText", "headers"].forEach((A) => {
|
|
1288
|
-
a[A] = q[A];
|
|
1289
|
-
});
|
|
1290
|
-
const d = u.toFiniteNumber(q.headers.get("content-length")), [b, w] = I && Ke(
|
|
1291
|
-
d,
|
|
1292
|
-
be(Ve(I), !0)
|
|
1293
|
-
) || [];
|
|
1294
|
-
q = new r(
|
|
1295
|
-
Ge(q.body, Xe, b, () => {
|
|
1296
|
-
w && w(), H && H();
|
|
1297
|
-
}),
|
|
1298
|
-
a
|
|
1299
|
-
);
|
|
1300
|
-
}
|
|
1301
|
-
T = T || "text";
|
|
1302
|
-
let Oe = await y[u.findKey(y, T) || "text"](q, p);
|
|
1303
|
-
return !ie && H && H(), await new Promise((a, d) => {
|
|
1304
|
-
At(a, d, {
|
|
1305
|
-
data: Oe,
|
|
1306
|
-
headers: F.from(q.headers),
|
|
1307
|
-
status: q.status,
|
|
1308
|
-
statusText: q.statusText,
|
|
1309
|
-
config: p,
|
|
1310
|
-
request: Y
|
|
1311
|
-
});
|
|
1312
|
-
});
|
|
1313
|
-
} catch (U) {
|
|
1314
|
-
throw H && H(), U && U.name === "TypeError" && /Load failed|fetch/i.test(U.message) ? Object.assign(
|
|
1315
|
-
new S("Network Error", S.ERR_NETWORK, p, Y),
|
|
1316
|
-
{
|
|
1317
|
-
cause: U.cause || U
|
|
1318
|
-
}
|
|
1319
|
-
) : S.from(U, U && U.code, p, Y);
|
|
1320
|
-
}
|
|
1321
|
-
};
|
|
1322
|
-
}, sr = /* @__PURE__ */ new Map(), Ct = (e) => {
|
|
1323
|
-
let t = e && e.env || {};
|
|
1324
|
-
const { fetch: n, Request: r, Response: s } = t, o = [
|
|
1325
|
-
r,
|
|
1326
|
-
s,
|
|
1327
|
-
n
|
|
1328
|
-
];
|
|
1329
|
-
let i = o.length, c = i, h, l, f = sr;
|
|
1330
|
-
for (; c--; )
|
|
1331
|
-
h = o[c], l = f.get(h), l === void 0 && f.set(h, l = c ? /* @__PURE__ */ new Map() : rr(t)), f = l;
|
|
1332
|
-
return l;
|
|
1333
|
-
};
|
|
1334
|
-
Ct();
|
|
1335
|
-
const $e = {
|
|
1336
|
-
http: Sn,
|
|
1337
|
-
xhr: Xn,
|
|
1338
|
-
fetch: {
|
|
1339
|
-
get: Ct
|
|
1340
|
-
}
|
|
1341
|
-
};
|
|
1342
|
-
u.forEach($e, (e, t) => {
|
|
1343
|
-
if (e) {
|
|
1344
|
-
try {
|
|
1345
|
-
Object.defineProperty(e, "name", { value: t });
|
|
1346
|
-
} catch {
|
|
1347
|
-
}
|
|
1348
|
-
Object.defineProperty(e, "adapterName", { value: t });
|
|
1349
|
-
}
|
|
1350
|
-
});
|
|
1351
|
-
const tt = (e) => `- ${e}`, or = (e) => u.isFunction(e) || e === null || e === !1;
|
|
1352
|
-
function ir(e, t) {
|
|
1353
|
-
e = u.isArray(e) ? e : [e];
|
|
1354
|
-
const { length: n } = e;
|
|
1355
|
-
let r, s;
|
|
1356
|
-
const o = {};
|
|
1357
|
-
for (let i = 0; i < n; i++) {
|
|
1358
|
-
r = e[i];
|
|
1359
|
-
let c;
|
|
1360
|
-
if (s = r, !or(r) && (s = $e[(c = String(r)).toLowerCase()], s === void 0))
|
|
1361
|
-
throw new S(`Unknown adapter '${c}'`);
|
|
1362
|
-
if (s && (u.isFunction(s) || (s = s.get(t))))
|
|
1363
|
-
break;
|
|
1364
|
-
o[c || "#" + i] = s;
|
|
1365
|
-
}
|
|
1366
|
-
if (!s) {
|
|
1367
|
-
const i = Object.entries(o).map(
|
|
1368
|
-
([h, l]) => `adapter ${h} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1369
|
-
);
|
|
1370
|
-
let c = n ? i.length > 1 ? `since :
|
|
1371
|
-
` + i.map(tt).join(`
|
|
1372
|
-
`) : " " + tt(i[0]) : "as no adapter specified";
|
|
1373
|
-
throw new S(
|
|
1374
|
-
"There is no suitable adapter to dispatch the request " + c,
|
|
1375
|
-
"ERR_NOT_SUPPORT"
|
|
1376
|
-
);
|
|
1377
|
-
}
|
|
1378
|
-
return s;
|
|
1379
|
-
}
|
|
1380
|
-
const Pt = {
|
|
1381
|
-
/**
|
|
1382
|
-
* Resolve an adapter from a list of adapter names or functions.
|
|
1383
|
-
* @type {Function}
|
|
1384
|
-
*/
|
|
1385
|
-
getAdapter: ir,
|
|
1386
|
-
/**
|
|
1387
|
-
* Exposes all known adapters
|
|
1388
|
-
* @type {Object<string, Function|Object>}
|
|
1389
|
-
*/
|
|
1390
|
-
adapters: $e
|
|
1391
|
-
};
|
|
1392
|
-
function Pe(e) {
|
|
1393
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1394
|
-
throw new oe(null, e);
|
|
1395
|
-
}
|
|
1396
|
-
function nt(e) {
|
|
1397
|
-
return Pe(e), e.headers = F.from(e.headers), e.data = Ce.call(
|
|
1398
|
-
e,
|
|
1399
|
-
e.transformRequest
|
|
1400
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Pt.getAdapter(e.adapter || de.adapter, e)(e).then(function(r) {
|
|
1401
|
-
return Pe(e), r.data = Ce.call(
|
|
1402
|
-
e,
|
|
1403
|
-
e.transformResponse,
|
|
1404
|
-
r
|
|
1405
|
-
), r.headers = F.from(r.headers), r;
|
|
1406
|
-
}, function(r) {
|
|
1407
|
-
return Tt(r) || (Pe(e), r && r.response && (r.response.data = Ce.call(
|
|
1408
|
-
e,
|
|
1409
|
-
e.transformResponse,
|
|
1410
|
-
r.response
|
|
1411
|
-
), r.response.headers = F.from(r.response.headers))), Promise.reject(r);
|
|
1412
|
-
});
|
|
1413
|
-
}
|
|
1414
|
-
const vt = "1.13.2", Ae = {};
|
|
1415
|
-
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1416
|
-
Ae[e] = function(r) {
|
|
1417
|
-
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1418
|
-
};
|
|
1419
|
-
});
|
|
1420
|
-
const rt = {};
|
|
1421
|
-
Ae.transitional = function(t, n, r) {
|
|
1422
|
-
function s(o, i) {
|
|
1423
|
-
return "[Axios v" + vt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1424
|
-
}
|
|
1425
|
-
return (o, i, c) => {
|
|
1426
|
-
if (t === !1)
|
|
1427
|
-
throw new S(
|
|
1428
|
-
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1429
|
-
S.ERR_DEPRECATED
|
|
1430
|
-
);
|
|
1431
|
-
return n && !rt[i] && (rt[i] = !0, console.warn(
|
|
1432
|
-
s(
|
|
1433
|
-
i,
|
|
1434
|
-
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1435
|
-
)
|
|
1436
|
-
)), t ? t(o, i, c) : !0;
|
|
1437
|
-
};
|
|
1438
|
-
};
|
|
1439
|
-
Ae.spelling = function(t) {
|
|
1440
|
-
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1441
|
-
};
|
|
1442
|
-
function ar(e, t, n) {
|
|
1443
|
-
if (typeof e != "object")
|
|
1444
|
-
throw new S("options must be an object", S.ERR_BAD_OPTION_VALUE);
|
|
1445
|
-
const r = Object.keys(e);
|
|
1446
|
-
let s = r.length;
|
|
1447
|
-
for (; s-- > 0; ) {
|
|
1448
|
-
const o = r[s], i = t[o];
|
|
1449
|
-
if (i) {
|
|
1450
|
-
const c = e[o], h = c === void 0 || i(c, o, e);
|
|
1451
|
-
if (h !== !0)
|
|
1452
|
-
throw new S("option " + o + " must be " + h, S.ERR_BAD_OPTION_VALUE);
|
|
1453
|
-
continue;
|
|
1454
|
-
}
|
|
1455
|
-
if (n !== !0)
|
|
1456
|
-
throw new S("Unknown option " + o, S.ERR_BAD_OPTION);
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
const we = {
|
|
1460
|
-
assertOptions: ar,
|
|
1461
|
-
validators: Ae
|
|
1462
|
-
}, W = we.validators;
|
|
1463
|
-
let Q = class {
|
|
1464
|
-
constructor(t) {
|
|
1465
|
-
this.defaults = t || {}, this.interceptors = {
|
|
1466
|
-
request: new We(),
|
|
1467
|
-
response: new We()
|
|
1468
|
-
};
|
|
1469
|
-
}
|
|
1470
|
-
/**
|
|
1471
|
-
* Dispatch a request
|
|
1472
|
-
*
|
|
1473
|
-
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1474
|
-
* @param {?Object} config
|
|
1475
|
-
*
|
|
1476
|
-
* @returns {Promise} The Promise to be fulfilled
|
|
1477
|
-
*/
|
|
1478
|
-
async request(t, n) {
|
|
1479
|
-
try {
|
|
1480
|
-
return await this._request(t, n);
|
|
1481
|
-
} catch (r) {
|
|
1482
|
-
if (r instanceof Error) {
|
|
1483
|
-
let s = {};
|
|
1484
|
-
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1485
|
-
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1486
|
-
try {
|
|
1487
|
-
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1488
|
-
` + o) : r.stack = o;
|
|
1489
|
-
} catch {
|
|
1490
|
-
}
|
|
1491
|
-
}
|
|
1492
|
-
throw r;
|
|
1493
|
-
}
|
|
1494
|
-
}
|
|
1495
|
-
_request(t, n) {
|
|
1496
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Z(this.defaults, n);
|
|
1497
|
-
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1498
|
-
r !== void 0 && we.assertOptions(r, {
|
|
1499
|
-
silentJSONParsing: W.transitional(W.boolean),
|
|
1500
|
-
forcedJSONParsing: W.transitional(W.boolean),
|
|
1501
|
-
clarifyTimeoutError: W.transitional(W.boolean)
|
|
1502
|
-
}, !1), s != null && (u.isFunction(s) ? n.paramsSerializer = {
|
|
1503
|
-
serialize: s
|
|
1504
|
-
} : we.assertOptions(s, {
|
|
1505
|
-
encode: W.function,
|
|
1506
|
-
serialize: W.function
|
|
1507
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), we.assertOptions(n, {
|
|
1508
|
-
baseUrl: W.spelling("baseURL"),
|
|
1509
|
-
withXsrfToken: W.spelling("withXSRFToken")
|
|
1510
|
-
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1511
|
-
let i = o && u.merge(
|
|
1512
|
-
o.common,
|
|
1513
|
-
o[n.method]
|
|
1514
|
-
);
|
|
1515
|
-
o && u.forEach(
|
|
1516
|
-
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1517
|
-
(p) => {
|
|
1518
|
-
delete o[p];
|
|
1519
|
-
}
|
|
1520
|
-
), n.headers = F.concat(i, o);
|
|
1521
|
-
const c = [];
|
|
1522
|
-
let h = !0;
|
|
1523
|
-
this.interceptors.request.forEach(function(m) {
|
|
1524
|
-
typeof m.runWhen == "function" && m.runWhen(n) === !1 || (h = h && m.synchronous, c.unshift(m.fulfilled, m.rejected));
|
|
1525
|
-
});
|
|
1526
|
-
const l = [];
|
|
1527
|
-
this.interceptors.response.forEach(function(m) {
|
|
1528
|
-
l.push(m.fulfilled, m.rejected);
|
|
1529
|
-
});
|
|
1530
|
-
let f, y = 0, R;
|
|
1531
|
-
if (!h) {
|
|
1532
|
-
const p = [nt.bind(this), void 0];
|
|
1533
|
-
for (p.unshift(...c), p.push(...l), R = p.length, f = Promise.resolve(n); y < R; )
|
|
1534
|
-
f = f.then(p[y++], p[y++]);
|
|
1535
|
-
return f;
|
|
1536
|
-
}
|
|
1537
|
-
R = c.length;
|
|
1538
|
-
let C = n;
|
|
1539
|
-
for (; y < R; ) {
|
|
1540
|
-
const p = c[y++], m = c[y++];
|
|
1541
|
-
try {
|
|
1542
|
-
C = p(C);
|
|
1543
|
-
} catch (g) {
|
|
1544
|
-
m.call(this, g);
|
|
1545
|
-
break;
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
try {
|
|
1549
|
-
f = nt.call(this, C);
|
|
1550
|
-
} catch (p) {
|
|
1551
|
-
return Promise.reject(p);
|
|
1552
|
-
}
|
|
1553
|
-
for (y = 0, R = l.length; y < R; )
|
|
1554
|
-
f = f.then(l[y++], l[y++]);
|
|
1555
|
-
return f;
|
|
1556
|
-
}
|
|
1557
|
-
getUri(t) {
|
|
1558
|
-
t = Z(this.defaults, t);
|
|
1559
|
-
const n = Ot(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1560
|
-
return Et(n, t.params, t.paramsSerializer);
|
|
1561
|
-
}
|
|
1562
|
-
};
|
|
1563
|
-
u.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1564
|
-
Q.prototype[t] = function(n, r) {
|
|
1565
|
-
return this.request(Z(r || {}, {
|
|
1566
|
-
method: t,
|
|
1567
|
-
url: n,
|
|
1568
|
-
data: (r || {}).data
|
|
1569
|
-
}));
|
|
1570
|
-
};
|
|
1571
|
-
});
|
|
1572
|
-
u.forEach(["post", "put", "patch"], function(t) {
|
|
1573
|
-
function n(r) {
|
|
1574
|
-
return function(o, i, c) {
|
|
1575
|
-
return this.request(Z(c || {}, {
|
|
1576
|
-
method: t,
|
|
1577
|
-
headers: r ? {
|
|
1578
|
-
"Content-Type": "multipart/form-data"
|
|
1579
|
-
} : {},
|
|
1580
|
-
url: o,
|
|
1581
|
-
data: i
|
|
1582
|
-
}));
|
|
1583
|
-
};
|
|
1584
|
-
}
|
|
1585
|
-
Q.prototype[t] = n(), Q.prototype[t + "Form"] = n(!0);
|
|
1586
|
-
});
|
|
1587
|
-
let ur = class xt {
|
|
1588
|
-
constructor(t) {
|
|
1589
|
-
if (typeof t != "function")
|
|
1590
|
-
throw new TypeError("executor must be a function.");
|
|
1591
|
-
let n;
|
|
1592
|
-
this.promise = new Promise(function(o) {
|
|
1593
|
-
n = o;
|
|
1594
|
-
});
|
|
1595
|
-
const r = this;
|
|
1596
|
-
this.promise.then((s) => {
|
|
1597
|
-
if (!r._listeners) return;
|
|
1598
|
-
let o = r._listeners.length;
|
|
1599
|
-
for (; o-- > 0; )
|
|
1600
|
-
r._listeners[o](s);
|
|
1601
|
-
r._listeners = null;
|
|
1602
|
-
}), this.promise.then = (s) => {
|
|
1603
|
-
let o;
|
|
1604
|
-
const i = new Promise((c) => {
|
|
1605
|
-
r.subscribe(c), o = c;
|
|
1606
|
-
}).then(s);
|
|
1607
|
-
return i.cancel = function() {
|
|
1608
|
-
r.unsubscribe(o);
|
|
1609
|
-
}, i;
|
|
1610
|
-
}, t(function(o, i, c) {
|
|
1611
|
-
r.reason || (r.reason = new oe(o, i, c), n(r.reason));
|
|
1612
|
-
});
|
|
1613
|
-
}
|
|
1614
|
-
/**
|
|
1615
|
-
* Throws a `CanceledError` if cancellation has been requested.
|
|
1616
|
-
*/
|
|
1617
|
-
throwIfRequested() {
|
|
1618
|
-
if (this.reason)
|
|
1619
|
-
throw this.reason;
|
|
1620
|
-
}
|
|
1621
|
-
/**
|
|
1622
|
-
* Subscribe to the cancel signal
|
|
1623
|
-
*/
|
|
1624
|
-
subscribe(t) {
|
|
1625
|
-
if (this.reason) {
|
|
1626
|
-
t(this.reason);
|
|
1627
|
-
return;
|
|
1628
|
-
}
|
|
1629
|
-
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
1630
|
-
}
|
|
1631
|
-
/**
|
|
1632
|
-
* Unsubscribe from the cancel signal
|
|
1633
|
-
*/
|
|
1634
|
-
unsubscribe(t) {
|
|
1635
|
-
if (!this._listeners)
|
|
1636
|
-
return;
|
|
1637
|
-
const n = this._listeners.indexOf(t);
|
|
1638
|
-
n !== -1 && this._listeners.splice(n, 1);
|
|
1639
|
-
}
|
|
1640
|
-
toAbortSignal() {
|
|
1641
|
-
const t = new AbortController(), n = (r) => {
|
|
1642
|
-
t.abort(r);
|
|
1643
|
-
};
|
|
1644
|
-
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
1645
|
-
}
|
|
1646
|
-
/**
|
|
1647
|
-
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1648
|
-
* cancels the `CancelToken`.
|
|
1649
|
-
*/
|
|
1650
|
-
static source() {
|
|
1651
|
-
let t;
|
|
1652
|
-
return {
|
|
1653
|
-
token: new xt(function(s) {
|
|
1654
|
-
t = s;
|
|
1655
|
-
}),
|
|
1656
|
-
cancel: t
|
|
1657
|
-
};
|
|
1658
|
-
}
|
|
1659
|
-
};
|
|
1660
|
-
function cr(e) {
|
|
1661
|
-
return function(n) {
|
|
1662
|
-
return e.apply(null, n);
|
|
1663
|
-
};
|
|
1664
|
-
}
|
|
1665
|
-
function lr(e) {
|
|
1666
|
-
return u.isObject(e) && e.isAxiosError === !0;
|
|
1667
|
-
}
|
|
1668
|
-
const Ie = {
|
|
1669
|
-
Continue: 100,
|
|
1670
|
-
SwitchingProtocols: 101,
|
|
1671
|
-
Processing: 102,
|
|
1672
|
-
EarlyHints: 103,
|
|
1673
|
-
Ok: 200,
|
|
1674
|
-
Created: 201,
|
|
1675
|
-
Accepted: 202,
|
|
1676
|
-
NonAuthoritativeInformation: 203,
|
|
1677
|
-
NoContent: 204,
|
|
1678
|
-
ResetContent: 205,
|
|
1679
|
-
PartialContent: 206,
|
|
1680
|
-
MultiStatus: 207,
|
|
1681
|
-
AlreadyReported: 208,
|
|
1682
|
-
ImUsed: 226,
|
|
1683
|
-
MultipleChoices: 300,
|
|
1684
|
-
MovedPermanently: 301,
|
|
1685
|
-
Found: 302,
|
|
1686
|
-
SeeOther: 303,
|
|
1687
|
-
NotModified: 304,
|
|
1688
|
-
UseProxy: 305,
|
|
1689
|
-
Unused: 306,
|
|
1690
|
-
TemporaryRedirect: 307,
|
|
1691
|
-
PermanentRedirect: 308,
|
|
1692
|
-
BadRequest: 400,
|
|
1693
|
-
Unauthorized: 401,
|
|
1694
|
-
PaymentRequired: 402,
|
|
1695
|
-
Forbidden: 403,
|
|
1696
|
-
NotFound: 404,
|
|
1697
|
-
MethodNotAllowed: 405,
|
|
1698
|
-
NotAcceptable: 406,
|
|
1699
|
-
ProxyAuthenticationRequired: 407,
|
|
1700
|
-
RequestTimeout: 408,
|
|
1701
|
-
Conflict: 409,
|
|
1702
|
-
Gone: 410,
|
|
1703
|
-
LengthRequired: 411,
|
|
1704
|
-
PreconditionFailed: 412,
|
|
1705
|
-
PayloadTooLarge: 413,
|
|
1706
|
-
UriTooLong: 414,
|
|
1707
|
-
UnsupportedMediaType: 415,
|
|
1708
|
-
RangeNotSatisfiable: 416,
|
|
1709
|
-
ExpectationFailed: 417,
|
|
1710
|
-
ImATeapot: 418,
|
|
1711
|
-
MisdirectedRequest: 421,
|
|
1712
|
-
UnprocessableEntity: 422,
|
|
1713
|
-
Locked: 423,
|
|
1714
|
-
FailedDependency: 424,
|
|
1715
|
-
TooEarly: 425,
|
|
1716
|
-
UpgradeRequired: 426,
|
|
1717
|
-
PreconditionRequired: 428,
|
|
1718
|
-
TooManyRequests: 429,
|
|
1719
|
-
RequestHeaderFieldsTooLarge: 431,
|
|
1720
|
-
UnavailableForLegalReasons: 451,
|
|
1721
|
-
InternalServerError: 500,
|
|
1722
|
-
NotImplemented: 501,
|
|
1723
|
-
BadGateway: 502,
|
|
1724
|
-
ServiceUnavailable: 503,
|
|
1725
|
-
GatewayTimeout: 504,
|
|
1726
|
-
HttpVersionNotSupported: 505,
|
|
1727
|
-
VariantAlsoNegotiates: 506,
|
|
1728
|
-
InsufficientStorage: 507,
|
|
1729
|
-
LoopDetected: 508,
|
|
1730
|
-
NotExtended: 510,
|
|
1731
|
-
NetworkAuthenticationRequired: 511,
|
|
1732
|
-
WebServerIsDown: 521,
|
|
1733
|
-
ConnectionTimedOut: 522,
|
|
1734
|
-
OriginIsUnreachable: 523,
|
|
1735
|
-
TimeoutOccurred: 524,
|
|
1736
|
-
SslHandshakeFailed: 525,
|
|
1737
|
-
InvalidSslCertificate: 526
|
|
1738
|
-
};
|
|
1739
|
-
Object.entries(Ie).forEach(([e, t]) => {
|
|
1740
|
-
Ie[t] = e;
|
|
1741
|
-
});
|
|
1742
|
-
function kt(e) {
|
|
1743
|
-
const t = new Q(e), n = ut(Q.prototype.request, t);
|
|
1744
|
-
return u.extend(n, Q.prototype, t, { allOwnKeys: !0 }), u.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1745
|
-
return kt(Z(e, s));
|
|
1746
|
-
}, n;
|
|
1747
|
-
}
|
|
1748
|
-
const N = kt(de);
|
|
1749
|
-
N.Axios = Q;
|
|
1750
|
-
N.CanceledError = oe;
|
|
1751
|
-
N.CancelToken = ur;
|
|
1752
|
-
N.isCancel = Tt;
|
|
1753
|
-
N.VERSION = vt;
|
|
1754
|
-
N.toFormData = Te;
|
|
1755
|
-
N.AxiosError = S;
|
|
1756
|
-
N.Cancel = N.CanceledError;
|
|
1757
|
-
N.all = function(t) {
|
|
1758
|
-
return Promise.all(t);
|
|
1759
|
-
};
|
|
1760
|
-
N.spread = cr;
|
|
1761
|
-
N.isAxiosError = lr;
|
|
1762
|
-
N.mergeConfig = Z;
|
|
1763
|
-
N.AxiosHeaders = F;
|
|
1764
|
-
N.formToJSON = (e) => Rt(u.isHTMLForm(e) ? new FormData(e) : e);
|
|
1765
|
-
N.getAdapter = Pt.getAdapter;
|
|
1766
|
-
N.HttpStatusCode = Ie;
|
|
1767
|
-
N.default = N;
|
|
1768
|
-
const {
|
|
1769
|
-
Axios: Ir,
|
|
1770
|
-
AxiosError: jr,
|
|
1771
|
-
CanceledError: Lr,
|
|
1772
|
-
isCancel: Dr,
|
|
1773
|
-
CancelToken: Fr,
|
|
1774
|
-
VERSION: $r,
|
|
1775
|
-
all: Br,
|
|
1776
|
-
Cancel: Hr,
|
|
1777
|
-
isAxiosError: Mr,
|
|
1778
|
-
spread: qr,
|
|
1779
|
-
toFormData: zr,
|
|
1780
|
-
AxiosHeaders: Wr,
|
|
1781
|
-
HttpStatusCode: Jr,
|
|
1782
|
-
formToJSON: Kr,
|
|
1783
|
-
getAdapter: Vr,
|
|
1784
|
-
mergeConfig: Yr
|
|
1785
|
-
} = N, st = (e) => {
|
|
1786
|
-
let t;
|
|
1787
|
-
const n = /* @__PURE__ */ new Set(), r = (l, f) => {
|
|
1788
|
-
const y = typeof l == "function" ? l(t) : l;
|
|
1789
|
-
if (!Object.is(y, t)) {
|
|
1790
|
-
const R = t;
|
|
1791
|
-
t = f ?? (typeof y != "object" || y === null) ? y : Object.assign({}, t, y), n.forEach((C) => C(t, R));
|
|
1792
|
-
}
|
|
1793
|
-
}, s = () => t, c = { setState: r, getState: s, getInitialState: () => h, subscribe: (l) => (n.add(l), () => n.delete(l)) }, h = t = e(r, s, c);
|
|
1794
|
-
return c;
|
|
1795
|
-
}, fr = ((e) => e ? st(e) : st);
|
|
1796
|
-
var Gr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1797
|
-
function dr(e) {
|
|
1798
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1799
|
-
}
|
|
1800
|
-
function Xr(e) {
|
|
1801
|
-
if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
|
|
1802
|
-
var t = e.default;
|
|
1803
|
-
if (typeof t == "function") {
|
|
1804
|
-
var n = function r() {
|
|
1805
|
-
var s = !1;
|
|
1806
|
-
try {
|
|
1807
|
-
s = this instanceof r;
|
|
1808
|
-
} catch {
|
|
1809
|
-
}
|
|
1810
|
-
return s ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
|
|
1811
|
-
};
|
|
1812
|
-
n.prototype = t.prototype;
|
|
1813
|
-
} else n = {};
|
|
1814
|
-
return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
|
|
1815
|
-
var s = Object.getOwnPropertyDescriptor(e, r);
|
|
1816
|
-
Object.defineProperty(n, r, s.get ? s : {
|
|
1817
|
-
enumerable: !0,
|
|
1818
|
-
get: function() {
|
|
1819
|
-
return e[r];
|
|
1820
|
-
}
|
|
1821
|
-
});
|
|
1822
|
-
}), n;
|
|
1823
|
-
}
|
|
1824
|
-
var ve = { exports: {} }, E = {};
|
|
1825
|
-
var ot;
|
|
1826
|
-
function pr() {
|
|
1827
|
-
if (ot) return E;
|
|
1828
|
-
ot = 1;
|
|
1829
|
-
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), o = Symbol.for("react.consumer"), i = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), l = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), y = Symbol.for("react.activity"), R = Symbol.iterator;
|
|
1830
|
-
function C(a) {
|
|
1831
|
-
return a === null || typeof a != "object" ? null : (a = R && a[R] || a["@@iterator"], typeof a == "function" ? a : null);
|
|
1832
|
-
}
|
|
1833
|
-
var p = {
|
|
1834
|
-
isMounted: function() {
|
|
1835
|
-
return !1;
|
|
1836
|
-
},
|
|
1837
|
-
enqueueForceUpdate: function() {
|
|
1838
|
-
},
|
|
1839
|
-
enqueueReplaceState: function() {
|
|
1840
|
-
},
|
|
1841
|
-
enqueueSetState: function() {
|
|
1842
|
-
}
|
|
1843
|
-
}, m = Object.assign, g = {};
|
|
1844
|
-
function _(a, d, b) {
|
|
1845
|
-
this.props = a, this.context = d, this.refs = g, this.updater = b || p;
|
|
1846
|
-
}
|
|
1847
|
-
_.prototype.isReactComponent = {}, _.prototype.setState = function(a, d) {
|
|
1848
|
-
if (typeof a != "object" && typeof a != "function" && a != null)
|
|
1849
|
-
throw Error(
|
|
1850
|
-
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
1851
|
-
);
|
|
1852
|
-
this.updater.enqueueSetState(this, a, d, "setState");
|
|
1853
|
-
}, _.prototype.forceUpdate = function(a) {
|
|
1854
|
-
this.updater.enqueueForceUpdate(this, a, "forceUpdate");
|
|
1855
|
-
};
|
|
1856
|
-
function P() {
|
|
1857
|
-
}
|
|
1858
|
-
P.prototype = _.prototype;
|
|
1859
|
-
function O(a, d, b) {
|
|
1860
|
-
this.props = a, this.context = d, this.refs = g, this.updater = b || p;
|
|
1861
|
-
}
|
|
1862
|
-
var k = O.prototype = new P();
|
|
1863
|
-
k.constructor = O, m(k, _.prototype), k.isPureReactComponent = !0;
|
|
1864
|
-
var I = Array.isArray;
|
|
1865
|
-
function B() {
|
|
1866
|
-
}
|
|
1867
|
-
var T = { H: null, A: null, T: null, S: null }, ee = Object.prototype.hasOwnProperty;
|
|
1868
|
-
function V(a, d, b) {
|
|
1869
|
-
var w = b.ref;
|
|
1870
|
-
return {
|
|
1871
|
-
$$typeof: e,
|
|
1872
|
-
type: a,
|
|
1873
|
-
key: d,
|
|
1874
|
-
ref: w !== void 0 ? w : null,
|
|
1875
|
-
props: b
|
|
1876
|
-
};
|
|
1877
|
-
}
|
|
1878
|
-
function pe(a, d) {
|
|
1879
|
-
return V(a.type, d, a.props);
|
|
1880
|
-
}
|
|
1881
|
-
function te(a) {
|
|
1882
|
-
return typeof a == "object" && a !== null && a.$$typeof === e;
|
|
1883
|
-
}
|
|
1884
|
-
function ne(a) {
|
|
1885
|
-
var d = { "=": "=0", ":": "=2" };
|
|
1886
|
-
return "$" + a.replace(/[=:]/g, function(b) {
|
|
1887
|
-
return d[b];
|
|
1888
|
-
});
|
|
1889
|
-
}
|
|
1890
|
-
var Y = /\/+/g;
|
|
1891
|
-
function H(a, d) {
|
|
1892
|
-
return typeof a == "object" && a !== null && a.key != null ? ne("" + a.key) : d.toString(36);
|
|
1893
|
-
}
|
|
1894
|
-
function he(a) {
|
|
1895
|
-
switch (a.status) {
|
|
1896
|
-
case "fulfilled":
|
|
1897
|
-
return a.value;
|
|
1898
|
-
case "rejected":
|
|
1899
|
-
throw a.reason;
|
|
1900
|
-
default:
|
|
1901
|
-
switch (typeof a.status == "string" ? a.then(B, B) : (a.status = "pending", a.then(
|
|
1902
|
-
function(d) {
|
|
1903
|
-
a.status === "pending" && (a.status = "fulfilled", a.value = d);
|
|
1904
|
-
},
|
|
1905
|
-
function(d) {
|
|
1906
|
-
a.status === "pending" && (a.status = "rejected", a.reason = d);
|
|
1907
|
-
}
|
|
1908
|
-
)), a.status) {
|
|
1909
|
-
case "fulfilled":
|
|
1910
|
-
return a.value;
|
|
1911
|
-
case "rejected":
|
|
1912
|
-
throw a.reason;
|
|
1913
|
-
}
|
|
1914
|
-
}
|
|
1915
|
-
throw a;
|
|
1916
|
-
}
|
|
1917
|
-
function U(a, d, b, w, A) {
|
|
1918
|
-
var v = typeof a;
|
|
1919
|
-
(v === "undefined" || v === "boolean") && (a = null);
|
|
1920
|
-
var x = !1;
|
|
1921
|
-
if (a === null) x = !0;
|
|
1922
|
-
else
|
|
1923
|
-
switch (v) {
|
|
1924
|
-
case "bigint":
|
|
1925
|
-
case "string":
|
|
1926
|
-
case "number":
|
|
1927
|
-
x = !0;
|
|
1928
|
-
break;
|
|
1929
|
-
case "object":
|
|
1930
|
-
switch (a.$$typeof) {
|
|
1931
|
-
case e:
|
|
1932
|
-
case t:
|
|
1933
|
-
x = !0;
|
|
1934
|
-
break;
|
|
1935
|
-
case f:
|
|
1936
|
-
return x = a._init, U(
|
|
1937
|
-
x(a._payload),
|
|
1938
|
-
d,
|
|
1939
|
-
b,
|
|
1940
|
-
w,
|
|
1941
|
-
A
|
|
1942
|
-
);
|
|
1943
|
-
}
|
|
1944
|
-
}
|
|
1945
|
-
if (x)
|
|
1946
|
-
return A = A(a), x = w === "" ? "." + H(a, 0) : w, I(A) ? (b = "", x != null && (b = x.replace(Y, "$&/") + "/"), U(A, d, b, "", function(Ut) {
|
|
1947
|
-
return Ut;
|
|
1948
|
-
})) : A != null && (te(A) && (A = pe(
|
|
1949
|
-
A,
|
|
1950
|
-
b + (A.key == null || a && a.key === A.key ? "" : ("" + A.key).replace(
|
|
1951
|
-
Y,
|
|
1952
|
-
"$&/"
|
|
1953
|
-
) + "/") + x
|
|
1954
|
-
)), d.push(A)), 1;
|
|
1955
|
-
x = 0;
|
|
1956
|
-
var z = w === "" ? "." : w + ":";
|
|
1957
|
-
if (I(a))
|
|
1958
|
-
for (var L = 0; L < a.length; L++)
|
|
1959
|
-
w = a[L], v = z + H(w, L), x += U(
|
|
1960
|
-
w,
|
|
1961
|
-
d,
|
|
1962
|
-
b,
|
|
1963
|
-
v,
|
|
1964
|
-
A
|
|
1965
|
-
);
|
|
1966
|
-
else if (L = C(a), typeof L == "function")
|
|
1967
|
-
for (a = L.call(a), L = 0; !(w = a.next()).done; )
|
|
1968
|
-
w = w.value, v = z + H(w, L++), x += U(
|
|
1969
|
-
w,
|
|
1970
|
-
d,
|
|
1971
|
-
b,
|
|
1972
|
-
v,
|
|
1973
|
-
A
|
|
1974
|
-
);
|
|
1975
|
-
else if (v === "object") {
|
|
1976
|
-
if (typeof a.then == "function")
|
|
1977
|
-
return U(
|
|
1978
|
-
he(a),
|
|
1979
|
-
d,
|
|
1980
|
-
b,
|
|
1981
|
-
w,
|
|
1982
|
-
A
|
|
1983
|
-
);
|
|
1984
|
-
throw d = String(a), Error(
|
|
1985
|
-
"Objects are not valid as a React child (found: " + (d === "[object Object]" ? "object with keys {" + Object.keys(a).join(", ") + "}" : d) + "). If you meant to render a collection of children, use an array instead."
|
|
1986
|
-
);
|
|
1987
|
-
}
|
|
1988
|
-
return x;
|
|
1989
|
-
}
|
|
1990
|
-
function G(a, d, b) {
|
|
1991
|
-
if (a == null) return a;
|
|
1992
|
-
var w = [], A = 0;
|
|
1993
|
-
return U(a, w, "", "", function(v) {
|
|
1994
|
-
return d.call(b, v, A++);
|
|
1995
|
-
}), w;
|
|
1996
|
-
}
|
|
1997
|
-
function q(a) {
|
|
1998
|
-
if (a._status === -1) {
|
|
1999
|
-
var d = a._result;
|
|
2000
|
-
d = d(), d.then(
|
|
2001
|
-
function(b) {
|
|
2002
|
-
(a._status === 0 || a._status === -1) && (a._status = 1, a._result = b);
|
|
2003
|
-
},
|
|
2004
|
-
function(b) {
|
|
2005
|
-
(a._status === 0 || a._status === -1) && (a._status = 2, a._result = b);
|
|
2006
|
-
}
|
|
2007
|
-
), a._status === -1 && (a._status = 0, a._result = d);
|
|
2008
|
-
}
|
|
2009
|
-
if (a._status === 1) return a._result.default;
|
|
2010
|
-
throw a._result;
|
|
2011
|
-
}
|
|
2012
|
-
var ie = typeof reportError == "function" ? reportError : function(a) {
|
|
2013
|
-
if (typeof window == "object" && typeof window.ErrorEvent == "function") {
|
|
2014
|
-
var d = new window.ErrorEvent("error", {
|
|
2015
|
-
bubbles: !0,
|
|
2016
|
-
cancelable: !0,
|
|
2017
|
-
message: typeof a == "object" && a !== null && typeof a.message == "string" ? String(a.message) : String(a),
|
|
2018
|
-
error: a
|
|
2019
|
-
});
|
|
2020
|
-
if (!window.dispatchEvent(d)) return;
|
|
2021
|
-
} else if (typeof process == "object" && typeof process.emit == "function") {
|
|
2022
|
-
process.emit("uncaughtException", a);
|
|
2023
|
-
return;
|
|
2024
|
-
}
|
|
2025
|
-
console.error(a);
|
|
2026
|
-
}, Oe = {
|
|
2027
|
-
map: G,
|
|
2028
|
-
forEach: function(a, d, b) {
|
|
2029
|
-
G(
|
|
2030
|
-
a,
|
|
2031
|
-
function() {
|
|
2032
|
-
d.apply(this, arguments);
|
|
2033
|
-
},
|
|
2034
|
-
b
|
|
2035
|
-
);
|
|
2036
|
-
},
|
|
2037
|
-
count: function(a) {
|
|
2038
|
-
var d = 0;
|
|
2039
|
-
return G(a, function() {
|
|
2040
|
-
d++;
|
|
2041
|
-
}), d;
|
|
2042
|
-
},
|
|
2043
|
-
toArray: function(a) {
|
|
2044
|
-
return G(a, function(d) {
|
|
2045
|
-
return d;
|
|
2046
|
-
}) || [];
|
|
2047
|
-
},
|
|
2048
|
-
only: function(a) {
|
|
2049
|
-
if (!te(a))
|
|
2050
|
-
throw Error(
|
|
2051
|
-
"React.Children.only expected to receive a single React element child."
|
|
2052
|
-
);
|
|
2053
|
-
return a;
|
|
2054
|
-
}
|
|
2055
|
-
};
|
|
2056
|
-
return E.Activity = y, E.Children = Oe, E.Component = _, E.Fragment = n, E.Profiler = s, E.PureComponent = O, E.StrictMode = r, E.Suspense = h, E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = T, E.__COMPILER_RUNTIME = {
|
|
2057
|
-
__proto__: null,
|
|
2058
|
-
c: function(a) {
|
|
2059
|
-
return T.H.useMemoCache(a);
|
|
2060
|
-
}
|
|
2061
|
-
}, E.cache = function(a) {
|
|
2062
|
-
return function() {
|
|
2063
|
-
return a.apply(null, arguments);
|
|
2064
|
-
};
|
|
2065
|
-
}, E.cacheSignal = function() {
|
|
2066
|
-
return null;
|
|
2067
|
-
}, E.cloneElement = function(a, d, b) {
|
|
2068
|
-
if (a == null)
|
|
2069
|
-
throw Error(
|
|
2070
|
-
"The argument must be a React element, but you passed " + a + "."
|
|
2071
|
-
);
|
|
2072
|
-
var w = m({}, a.props), A = a.key;
|
|
2073
|
-
if (d != null)
|
|
2074
|
-
for (v in d.key !== void 0 && (A = "" + d.key), d)
|
|
2075
|
-
!ee.call(d, v) || v === "key" || v === "__self" || v === "__source" || v === "ref" && d.ref === void 0 || (w[v] = d[v]);
|
|
2076
|
-
var v = arguments.length - 2;
|
|
2077
|
-
if (v === 1) w.children = b;
|
|
2078
|
-
else if (1 < v) {
|
|
2079
|
-
for (var x = Array(v), z = 0; z < v; z++)
|
|
2080
|
-
x[z] = arguments[z + 2];
|
|
2081
|
-
w.children = x;
|
|
2082
|
-
}
|
|
2083
|
-
return V(a.type, A, w);
|
|
2084
|
-
}, E.createContext = function(a) {
|
|
2085
|
-
return a = {
|
|
2086
|
-
$$typeof: i,
|
|
2087
|
-
_currentValue: a,
|
|
2088
|
-
_currentValue2: a,
|
|
2089
|
-
_threadCount: 0,
|
|
2090
|
-
Provider: null,
|
|
2091
|
-
Consumer: null
|
|
2092
|
-
}, a.Provider = a, a.Consumer = {
|
|
2093
|
-
$$typeof: o,
|
|
2094
|
-
_context: a
|
|
2095
|
-
}, a;
|
|
2096
|
-
}, E.createElement = function(a, d, b) {
|
|
2097
|
-
var w, A = {}, v = null;
|
|
2098
|
-
if (d != null)
|
|
2099
|
-
for (w in d.key !== void 0 && (v = "" + d.key), d)
|
|
2100
|
-
ee.call(d, w) && w !== "key" && w !== "__self" && w !== "__source" && (A[w] = d[w]);
|
|
2101
|
-
var x = arguments.length - 2;
|
|
2102
|
-
if (x === 1) A.children = b;
|
|
2103
|
-
else if (1 < x) {
|
|
2104
|
-
for (var z = Array(x), L = 0; L < x; L++)
|
|
2105
|
-
z[L] = arguments[L + 2];
|
|
2106
|
-
A.children = z;
|
|
2107
|
-
}
|
|
2108
|
-
if (a && a.defaultProps)
|
|
2109
|
-
for (w in x = a.defaultProps, x)
|
|
2110
|
-
A[w] === void 0 && (A[w] = x[w]);
|
|
2111
|
-
return V(a, v, A);
|
|
2112
|
-
}, E.createRef = function() {
|
|
2113
|
-
return { current: null };
|
|
2114
|
-
}, E.forwardRef = function(a) {
|
|
2115
|
-
return { $$typeof: c, render: a };
|
|
2116
|
-
}, E.isValidElement = te, E.lazy = function(a) {
|
|
2117
|
-
return {
|
|
2118
|
-
$$typeof: f,
|
|
2119
|
-
_payload: { _status: -1, _result: a },
|
|
2120
|
-
_init: q
|
|
2121
|
-
};
|
|
2122
|
-
}, E.memo = function(a, d) {
|
|
2123
|
-
return {
|
|
2124
|
-
$$typeof: l,
|
|
2125
|
-
type: a,
|
|
2126
|
-
compare: d === void 0 ? null : d
|
|
2127
|
-
};
|
|
2128
|
-
}, E.startTransition = function(a) {
|
|
2129
|
-
var d = T.T, b = {};
|
|
2130
|
-
T.T = b;
|
|
2131
|
-
try {
|
|
2132
|
-
var w = a(), A = T.S;
|
|
2133
|
-
A !== null && A(b, w), typeof w == "object" && w !== null && typeof w.then == "function" && w.then(B, ie);
|
|
2134
|
-
} catch (v) {
|
|
2135
|
-
ie(v);
|
|
2136
|
-
} finally {
|
|
2137
|
-
d !== null && b.types !== null && (d.types = b.types), T.T = d;
|
|
2138
|
-
}
|
|
2139
|
-
}, E.unstable_useCacheRefresh = function() {
|
|
2140
|
-
return T.H.useCacheRefresh();
|
|
2141
|
-
}, E.use = function(a) {
|
|
2142
|
-
return T.H.use(a);
|
|
2143
|
-
}, E.useActionState = function(a, d, b) {
|
|
2144
|
-
return T.H.useActionState(a, d, b);
|
|
2145
|
-
}, E.useCallback = function(a, d) {
|
|
2146
|
-
return T.H.useCallback(a, d);
|
|
2147
|
-
}, E.useContext = function(a) {
|
|
2148
|
-
return T.H.useContext(a);
|
|
2149
|
-
}, E.useDebugValue = function() {
|
|
2150
|
-
}, E.useDeferredValue = function(a, d) {
|
|
2151
|
-
return T.H.useDeferredValue(a, d);
|
|
2152
|
-
}, E.useEffect = function(a, d) {
|
|
2153
|
-
return T.H.useEffect(a, d);
|
|
2154
|
-
}, E.useEffectEvent = function(a) {
|
|
2155
|
-
return T.H.useEffectEvent(a);
|
|
2156
|
-
}, E.useId = function() {
|
|
2157
|
-
return T.H.useId();
|
|
2158
|
-
}, E.useImperativeHandle = function(a, d, b) {
|
|
2159
|
-
return T.H.useImperativeHandle(a, d, b);
|
|
2160
|
-
}, E.useInsertionEffect = function(a, d) {
|
|
2161
|
-
return T.H.useInsertionEffect(a, d);
|
|
2162
|
-
}, E.useLayoutEffect = function(a, d) {
|
|
2163
|
-
return T.H.useLayoutEffect(a, d);
|
|
2164
|
-
}, E.useMemo = function(a, d) {
|
|
2165
|
-
return T.H.useMemo(a, d);
|
|
2166
|
-
}, E.useOptimistic = function(a, d) {
|
|
2167
|
-
return T.H.useOptimistic(a, d);
|
|
2168
|
-
}, E.useReducer = function(a, d, b) {
|
|
2169
|
-
return T.H.useReducer(a, d, b);
|
|
2170
|
-
}, E.useRef = function(a) {
|
|
2171
|
-
return T.H.useRef(a);
|
|
2172
|
-
}, E.useState = function(a) {
|
|
2173
|
-
return T.H.useState(a);
|
|
2174
|
-
}, E.useSyncExternalStore = function(a, d, b) {
|
|
2175
|
-
return T.H.useSyncExternalStore(
|
|
2176
|
-
a,
|
|
2177
|
-
d,
|
|
2178
|
-
b
|
|
2179
|
-
);
|
|
2180
|
-
}, E.useTransition = function() {
|
|
2181
|
-
return T.H.useTransition();
|
|
2182
|
-
}, E.version = "19.2.0", E;
|
|
2183
|
-
}
|
|
2184
|
-
var it;
|
|
2185
|
-
function hr() {
|
|
2186
|
-
return it || (it = 1, ve.exports = pr()), ve.exports;
|
|
2187
|
-
}
|
|
2188
|
-
var Nt = hr();
|
|
2189
|
-
const ue = /* @__PURE__ */ dr(Nt), Qr = /* @__PURE__ */ It({
|
|
2190
|
-
__proto__: null,
|
|
2191
|
-
default: ue
|
|
2192
|
-
}, [Nt]), mr = (e) => e;
|
|
2193
|
-
function yr(e, t = mr) {
|
|
2194
|
-
const n = ue.useSyncExternalStore(
|
|
2195
|
-
e.subscribe,
|
|
2196
|
-
ue.useCallback(() => t(e.getState()), [e, t]),
|
|
2197
|
-
ue.useCallback(() => t(e.getInitialState()), [e, t])
|
|
2198
|
-
);
|
|
2199
|
-
return ue.useDebugValue(n), n;
|
|
2200
|
-
}
|
|
2201
|
-
const at = (e) => {
|
|
2202
|
-
const t = fr(e), n = (r) => yr(t, r);
|
|
2203
|
-
return Object.assign(n, t), n;
|
|
2204
|
-
}, gr = ((e) => e ? at(e) : at), wr = (e) => (t, n, r) => {
|
|
2205
|
-
const s = r.subscribe;
|
|
2206
|
-
return r.subscribe = ((i, c, h) => {
|
|
2207
|
-
let l = i;
|
|
2208
|
-
if (c) {
|
|
2209
|
-
const f = h?.equalityFn || Object.is;
|
|
2210
|
-
let y = i(r.getState());
|
|
2211
|
-
l = (R) => {
|
|
2212
|
-
const C = i(R);
|
|
2213
|
-
if (!f(y, C)) {
|
|
2214
|
-
const p = y;
|
|
2215
|
-
c(y = C, p);
|
|
2216
|
-
}
|
|
2217
|
-
}, h?.fireImmediately && c(y, y);
|
|
2218
|
-
}
|
|
2219
|
-
return s(l);
|
|
2220
|
-
}), e(t, n, r);
|
|
2221
|
-
}, br = wr;
|
|
2222
|
-
function Er(e, t) {
|
|
2223
|
-
let n;
|
|
2224
|
-
try {
|
|
2225
|
-
n = e();
|
|
2226
|
-
} catch {
|
|
2227
|
-
return;
|
|
2228
|
-
}
|
|
2229
|
-
return {
|
|
2230
|
-
getItem: (s) => {
|
|
2231
|
-
var o;
|
|
2232
|
-
const i = (h) => h === null ? null : JSON.parse(h, void 0), c = (o = n.getItem(s)) != null ? o : null;
|
|
2233
|
-
return c instanceof Promise ? c.then(i) : i(c);
|
|
2234
|
-
},
|
|
2235
|
-
setItem: (s, o) => n.setItem(s, JSON.stringify(o, void 0)),
|
|
2236
|
-
removeItem: (s) => n.removeItem(s)
|
|
2237
|
-
};
|
|
2238
|
-
}
|
|
2239
|
-
const je = (e) => (t) => {
|
|
2240
|
-
try {
|
|
2241
|
-
const n = e(t);
|
|
2242
|
-
return n instanceof Promise ? n : {
|
|
2243
|
-
then(r) {
|
|
2244
|
-
return je(r)(n);
|
|
2245
|
-
},
|
|
2246
|
-
catch(r) {
|
|
2247
|
-
return this;
|
|
2248
|
-
}
|
|
2249
|
-
};
|
|
2250
|
-
} catch (n) {
|
|
2251
|
-
return {
|
|
2252
|
-
then(r) {
|
|
2253
|
-
return this;
|
|
2254
|
-
},
|
|
2255
|
-
catch(r) {
|
|
2256
|
-
return je(r)(n);
|
|
2257
|
-
}
|
|
2258
|
-
};
|
|
2259
|
-
}
|
|
2260
|
-
}, Sr = (e, t) => (n, r, s) => {
|
|
2261
|
-
let o = {
|
|
2262
|
-
storage: Er(() => localStorage),
|
|
2263
|
-
partialize: (m) => m,
|
|
2264
|
-
version: 0,
|
|
2265
|
-
merge: (m, g) => ({
|
|
2266
|
-
...g,
|
|
2267
|
-
...m
|
|
2268
|
-
}),
|
|
2269
|
-
...t
|
|
2270
|
-
}, i = !1;
|
|
2271
|
-
const c = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set();
|
|
2272
|
-
let l = o.storage;
|
|
2273
|
-
if (!l)
|
|
2274
|
-
return e(
|
|
2275
|
-
(...m) => {
|
|
2276
|
-
console.warn(
|
|
2277
|
-
`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`
|
|
2278
|
-
), n(...m);
|
|
2279
|
-
},
|
|
2280
|
-
r,
|
|
2281
|
-
s
|
|
2282
|
-
);
|
|
2283
|
-
const f = () => {
|
|
2284
|
-
const m = o.partialize({ ...r() });
|
|
2285
|
-
return l.setItem(o.name, {
|
|
2286
|
-
state: m,
|
|
2287
|
-
version: o.version
|
|
2288
|
-
});
|
|
2289
|
-
}, y = s.setState;
|
|
2290
|
-
s.setState = (m, g) => (y(m, g), f());
|
|
2291
|
-
const R = e(
|
|
2292
|
-
(...m) => (n(...m), f()),
|
|
2293
|
-
r,
|
|
2294
|
-
s
|
|
2295
|
-
);
|
|
2296
|
-
s.getInitialState = () => R;
|
|
2297
|
-
let C;
|
|
2298
|
-
const p = () => {
|
|
2299
|
-
var m, g;
|
|
2300
|
-
if (!l) return;
|
|
2301
|
-
i = !1, c.forEach((P) => {
|
|
2302
|
-
var O;
|
|
2303
|
-
return P((O = r()) != null ? O : R);
|
|
2304
|
-
});
|
|
2305
|
-
const _ = ((g = o.onRehydrateStorage) == null ? void 0 : g.call(o, (m = r()) != null ? m : R)) || void 0;
|
|
2306
|
-
return je(l.getItem.bind(l))(o.name).then((P) => {
|
|
2307
|
-
if (P)
|
|
2308
|
-
if (typeof P.version == "number" && P.version !== o.version) {
|
|
2309
|
-
if (o.migrate) {
|
|
2310
|
-
const O = o.migrate(
|
|
2311
|
-
P.state,
|
|
2312
|
-
P.version
|
|
2313
|
-
);
|
|
2314
|
-
return O instanceof Promise ? O.then((k) => [!0, k]) : [!0, O];
|
|
2315
|
-
}
|
|
2316
|
-
console.error(
|
|
2317
|
-
"State loaded from storage couldn't be migrated since no migrate function was provided"
|
|
2318
|
-
);
|
|
2319
|
-
} else
|
|
2320
|
-
return [!1, P.state];
|
|
2321
|
-
return [!1, void 0];
|
|
2322
|
-
}).then((P) => {
|
|
2323
|
-
var O;
|
|
2324
|
-
const [k, I] = P;
|
|
2325
|
-
if (C = o.merge(
|
|
2326
|
-
I,
|
|
2327
|
-
(O = r()) != null ? O : R
|
|
2328
|
-
), n(C, !0), k)
|
|
2329
|
-
return f();
|
|
2330
|
-
}).then(() => {
|
|
2331
|
-
_?.(C, void 0), C = r(), i = !0, h.forEach((P) => P(C));
|
|
2332
|
-
}).catch((P) => {
|
|
2333
|
-
_?.(void 0, P);
|
|
2334
|
-
});
|
|
2335
|
-
};
|
|
2336
|
-
return s.persist = {
|
|
2337
|
-
setOptions: (m) => {
|
|
2338
|
-
o = {
|
|
2339
|
-
...o,
|
|
2340
|
-
...m
|
|
2341
|
-
}, m.storage && (l = m.storage);
|
|
2342
|
-
},
|
|
2343
|
-
clearStorage: () => {
|
|
2344
|
-
l?.removeItem(o.name);
|
|
2345
|
-
},
|
|
2346
|
-
getOptions: () => o,
|
|
2347
|
-
rehydrate: () => p(),
|
|
2348
|
-
hasHydrated: () => i,
|
|
2349
|
-
onHydrate: (m) => (c.add(m), () => {
|
|
2350
|
-
c.delete(m);
|
|
2351
|
-
}),
|
|
2352
|
-
onFinishHydration: (m) => (h.add(m), () => {
|
|
2353
|
-
h.delete(m);
|
|
2354
|
-
})
|
|
2355
|
-
}, o.skipHydration || p(), C || R;
|
|
2356
|
-
}, Rr = Sr, J = gr()(
|
|
2357
|
-
Rr(
|
|
2358
|
-
br((e, t) => ({
|
|
2359
|
-
// Initial state
|
|
2360
|
-
accessToken: null,
|
|
2361
|
-
accessTokenUpdatedAt: null,
|
|
2362
|
-
user: null,
|
|
2363
|
-
isAuthenticated: !1,
|
|
2364
|
-
isReady: !1,
|
|
2365
|
-
error: null,
|
|
2366
|
-
isLoggingIn: !1,
|
|
2367
|
-
_privyInstance: null,
|
|
2368
|
-
// Actions
|
|
2369
|
-
login: async () => {
|
|
2370
|
-
const n = t()._privyInstance;
|
|
2371
|
-
if (!n)
|
|
2372
|
-
throw new Error("Privy not initialized");
|
|
2373
|
-
e({ error: null, isLoggingIn: !0 }), await n.login();
|
|
2374
|
-
},
|
|
2375
|
-
logout: async () => {
|
|
2376
|
-
const n = t()._privyInstance;
|
|
2377
|
-
if (!n)
|
|
2378
|
-
throw new Error("Privy not initialized");
|
|
2379
|
-
try {
|
|
2380
|
-
e({ error: null }), await n.logout(), e({
|
|
2381
|
-
accessToken: null,
|
|
2382
|
-
accessTokenUpdatedAt: null,
|
|
2383
|
-
user: null,
|
|
2384
|
-
isAuthenticated: !1
|
|
2385
|
-
});
|
|
2386
|
-
} catch (r) {
|
|
2387
|
-
const s = r instanceof Error ? r.message : "Logout failed";
|
|
2388
|
-
throw e({ error: s }), r;
|
|
2389
|
-
}
|
|
2390
|
-
},
|
|
2391
|
-
setAccessToken: (n) => {
|
|
2392
|
-
e({
|
|
2393
|
-
accessToken: n,
|
|
2394
|
-
accessTokenUpdatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
2395
|
-
});
|
|
2396
|
-
},
|
|
2397
|
-
setUser: (n) => {
|
|
2398
|
-
e({ user: n });
|
|
2399
|
-
},
|
|
2400
|
-
_setAuthState: (n) => {
|
|
2401
|
-
e(n);
|
|
2402
|
-
},
|
|
2403
|
-
_setPrivyInstance: (n) => {
|
|
2404
|
-
e({ _privyInstance: n });
|
|
2405
|
-
},
|
|
2406
|
-
_resolveLogin: (n, r) => {
|
|
2407
|
-
e({
|
|
2408
|
-
accessToken: n,
|
|
2409
|
-
accessTokenUpdatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2410
|
-
user: r,
|
|
2411
|
-
isAuthenticated: !0,
|
|
2412
|
-
isLoggingIn: !1,
|
|
2413
|
-
error: null
|
|
2414
|
-
});
|
|
2415
|
-
},
|
|
2416
|
-
_rejectLogin: async (n) => {
|
|
2417
|
-
try {
|
|
2418
|
-
await t().logout();
|
|
2419
|
-
} catch {
|
|
2420
|
-
}
|
|
2421
|
-
e({
|
|
2422
|
-
isLoggingIn: !1,
|
|
2423
|
-
error: n
|
|
2424
|
-
});
|
|
2425
|
-
}
|
|
2426
|
-
})),
|
|
2427
|
-
{
|
|
2428
|
-
name: "autogames:auth-storage",
|
|
2429
|
-
partialize: (e) => ({
|
|
2430
|
-
accessToken: e.accessToken,
|
|
2431
|
-
accessTokenUpdatedAt: e.accessTokenUpdatedAt,
|
|
2432
|
-
user: e.user,
|
|
2433
|
-
isAuthenticated: e.isAuthenticated
|
|
2434
|
-
})
|
|
2435
|
-
}
|
|
2436
|
-
)
|
|
2437
|
-
), $ = {
|
|
2438
|
-
getState: () => J.getState(),
|
|
2439
|
-
setUser: (e) => J.getState().setUser(e),
|
|
2440
|
-
subscribe: (e) => J.subscribe(e),
|
|
2441
|
-
login: () => J.getState().login(),
|
|
2442
|
-
logout: () => J.getState().logout()
|
|
2443
|
-
}, Be = typeof window > "u", Tr = {
|
|
2444
|
-
baseURL: "https://api.dev.autogames.app",
|
|
2445
|
-
withCredentials: !0
|
|
2446
|
-
}, K = N.create(Tr), xe = async () => {
|
|
2447
|
-
try {
|
|
2448
|
-
const t = (await N.post(
|
|
2449
|
-
"https://api.dev.autogames.app/sso/refresh-token",
|
|
2450
|
-
{},
|
|
2451
|
-
{
|
|
2452
|
-
withCredentials: !0
|
|
2453
|
-
}
|
|
2454
|
-
)).data.access_token;
|
|
2455
|
-
if (!t)
|
|
2456
|
-
throw new Error("No access token returned from refresh");
|
|
2457
|
-
return J.getState().setAccessToken(t), t;
|
|
2458
|
-
} catch (e) {
|
|
2459
|
-
throw J.getState().logout(), e;
|
|
2460
|
-
}
|
|
2461
|
-
}, Ar = async () => {
|
|
2462
|
-
if (!Be)
|
|
2463
|
-
if (typeof navigator < "u" && "locks" in navigator)
|
|
2464
|
-
try {
|
|
2465
|
-
await navigator.locks.request("refresh-token", async () => {
|
|
2466
|
-
const e = J.getState().accessTokenUpdatedAt;
|
|
2467
|
-
e && Date.now() - new Date(e).getTime() < 6e4 || await xe();
|
|
2468
|
-
});
|
|
2469
|
-
} catch (e) {
|
|
2470
|
-
console.error("Token refresh with Web Locks failed, falling back", e), await xe();
|
|
2471
|
-
}
|
|
2472
|
-
else
|
|
2473
|
-
console.warn("Web Locks API not supported — falling back to direct refresh."), await xe();
|
|
2474
|
-
};
|
|
2475
|
-
K.interceptors.request.use(async (e) => {
|
|
2476
|
-
if (Be) return e;
|
|
2477
|
-
const t = J.getState().accessToken;
|
|
2478
|
-
return t && (e.headers = e.headers ?? {}, e.headers.Authorization = `Bearer ${t}`, e.headers["X-Auth-Type"] = "jwt"), e;
|
|
2479
|
-
});
|
|
2480
|
-
K.interceptors.response.use(
|
|
2481
|
-
(e) => e,
|
|
2482
|
-
async (e) => {
|
|
2483
|
-
const t = e.config;
|
|
2484
|
-
if (Be || !t)
|
|
2485
|
-
return Promise.reject(e);
|
|
2486
|
-
if (e.response?.status === 401 && !t._retry) {
|
|
2487
|
-
t._retry = !0;
|
|
2488
|
-
try {
|
|
2489
|
-
await Ar();
|
|
2490
|
-
const n = J.getState().accessToken;
|
|
2491
|
-
return n && (t.headers.Authorization = `Bearer ${n}`), K(t);
|
|
2492
|
-
} catch (n) {
|
|
2493
|
-
return Promise.reject(n);
|
|
2494
|
-
}
|
|
2495
|
-
}
|
|
2496
|
-
return Promise.reject(e);
|
|
2497
|
-
}
|
|
2498
|
-
);
|
|
2499
|
-
async function Or() {
|
|
2500
|
-
return (await K.post("/sso/logout")).data;
|
|
2501
|
-
}
|
|
2502
|
-
async function _r(e) {
|
|
2503
|
-
const t = await K.get(`/users/${e}`);
|
|
2504
|
-
if (!t.data.user)
|
|
2505
|
-
throw new Error("User not found");
|
|
2506
|
-
return t.data.user;
|
|
2507
|
-
}
|
|
2508
|
-
async function Cr(e, t) {
|
|
2509
|
-
return (await K.get(`/users/${e}/assets`, {
|
|
2510
|
-
params: t
|
|
2511
|
-
})).data;
|
|
2512
|
-
}
|
|
2513
|
-
async function Pr(e, t) {
|
|
2514
|
-
return (await K.get(`/users/${e}/created-tokens`, {
|
|
2515
|
-
params: t
|
|
2516
|
-
})).data;
|
|
2517
|
-
}
|
|
2518
|
-
async function vr(e) {
|
|
2519
|
-
return (await K.post(`/votings/${e}/recall`)).data;
|
|
2520
|
-
}
|
|
2521
|
-
async function xr(e, t) {
|
|
2522
|
-
return (await K.post(`/votings/${e}/vote`, t)).data;
|
|
2523
|
-
}
|
|
2524
|
-
class He {
|
|
2525
|
-
// Bundled default Privy App ID for AutoGames ecosystem
|
|
2526
|
-
// Can be configured via VITE_PRIVY_APP_ID environment variable at build time
|
|
2527
|
-
// biome-ignore lint/correctness/noUnusedPrivateClassMembers: Used in init method
|
|
2528
|
-
static DEFAULT_PRIVY_APP_ID = "cmh3ikmhm00o6gz0d46f40swl";
|
|
2529
|
-
config = null;
|
|
2530
|
-
initPromise = null;
|
|
2531
|
-
unsubscribe = null;
|
|
2532
|
-
chatWidgetMounted = !1;
|
|
2533
|
-
/**
|
|
2534
|
-
* Initialize the SDK with optional configuration
|
|
2535
|
-
* @param config - Optional SDK configuration. If privyAppId is not provided, uses bundled default.
|
|
2536
|
-
*/
|
|
2537
|
-
async init(t) {
|
|
2538
|
-
return this.initPromise ? this.initPromise : (this.initPromise = (async () => {
|
|
2539
|
-
const n = {
|
|
2540
|
-
...t,
|
|
2541
|
-
privyAppId: t.privyAppId || He.DEFAULT_PRIVY_APP_ID
|
|
2542
|
-
};
|
|
2543
|
-
this.config = n, await this.mountBridge(), await this.waitForReady();
|
|
2544
|
-
const { onAuthStateChange: r } = n;
|
|
2545
|
-
r && (this.unsubscribe = $.subscribe((s) => {
|
|
2546
|
-
r(s.user);
|
|
2547
|
-
}));
|
|
2548
|
-
})(), this.initPromise);
|
|
2549
|
-
}
|
|
2550
|
-
/**
|
|
2551
|
-
* Trigger login flow
|
|
2552
|
-
* Note: With OAuth providers (e.g., Google), the page may reload during authentication.
|
|
2553
|
-
* Use the onAuthStateChange callback in init() or poll isAuthenticated()/getProfile() to detect when login completes.
|
|
2554
|
-
*/
|
|
2555
|
-
async login() {
|
|
2556
|
-
this.ensureInitialized(), await $.login();
|
|
2557
|
-
}
|
|
2558
|
-
/**
|
|
2559
|
-
* Logout the current user
|
|
2560
|
-
*/
|
|
2561
|
-
async logout() {
|
|
2562
|
-
this.ensureInitialized();
|
|
2563
|
-
try {
|
|
2564
|
-
await Or();
|
|
2565
|
-
} catch (t) {
|
|
2566
|
-
console.error("Failed to logout on backend:", t);
|
|
2567
|
-
} finally {
|
|
2568
|
-
await $.logout();
|
|
2569
|
-
}
|
|
2570
|
-
}
|
|
2571
|
-
/**
|
|
2572
|
-
* Get current user profile (cached)
|
|
2573
|
-
*/
|
|
2574
|
-
getProfile() {
|
|
2575
|
-
return this.ensureInitialized(), $.getState().user;
|
|
2576
|
-
}
|
|
2577
|
-
/**
|
|
2578
|
-
* Fetch fresh user profile from backend and update cache
|
|
2579
|
-
* @returns User profile or null if not authenticated
|
|
2580
|
-
*/
|
|
2581
|
-
async fetchProfile() {
|
|
2582
|
-
if (this.ensureInitialized(), !this.isAuthenticated())
|
|
2583
|
-
return null;
|
|
2584
|
-
const t = $.getState().user;
|
|
2585
|
-
if (!t?.ID)
|
|
2586
|
-
return null;
|
|
2587
|
-
try {
|
|
2588
|
-
const n = await _r(t.ID);
|
|
2589
|
-
return $.setUser(n), n;
|
|
2590
|
-
} catch (n) {
|
|
2591
|
-
return console.error("Failed to fetch profile:", n), $.getState().user;
|
|
2592
|
-
}
|
|
2593
|
-
}
|
|
2594
|
-
/**
|
|
2595
|
-
* Vote on a voting
|
|
2596
|
-
* @param votingId - The ID of the voting
|
|
2597
|
-
* @param body - Vote request body containing option_id and votingID
|
|
2598
|
-
* @returns Vote response with message
|
|
2599
|
-
*/
|
|
2600
|
-
async vote(t, n) {
|
|
2601
|
-
return this.ensureInitialized(), xr(t, n);
|
|
2602
|
-
}
|
|
2603
|
-
/**
|
|
2604
|
-
* Recall a vote on a voting
|
|
2605
|
-
* @param votingId - The ID of the voting
|
|
2606
|
-
* @returns Recall response with message
|
|
2607
|
-
*/
|
|
2608
|
-
async recall(t) {
|
|
2609
|
-
return this.ensureInitialized(), vr(t);
|
|
2610
|
-
}
|
|
2611
|
-
/**
|
|
2612
|
-
* Fetch user assets
|
|
2613
|
-
* @param userId - The ID of the user
|
|
2614
|
-
* @param params - Optional query parameters (limit, prev_user_token, next_user_token)
|
|
2615
|
-
* @returns User assets response with array of assets
|
|
2616
|
-
*/
|
|
2617
|
-
async fetchUserAssets(t, n) {
|
|
2618
|
-
return this.ensureInitialized(), Cr(t, n);
|
|
2619
|
-
}
|
|
2620
|
-
/**
|
|
2621
|
-
* Fetch user created tokens
|
|
2622
|
-
* @param userId - The ID of the user
|
|
2623
|
-
* @param params - Optional query parameters (limit, prev_token, next_token)
|
|
2624
|
-
* @returns User created tokens response with array of created tokens
|
|
2625
|
-
*/
|
|
2626
|
-
async fetchUserCreatedTokens(t, n) {
|
|
2627
|
-
return this.ensureInitialized(), Pr(t, n);
|
|
2628
|
-
}
|
|
2629
|
-
/**
|
|
2630
|
-
* Check if user is authenticated
|
|
2631
|
-
*/
|
|
2632
|
-
isAuthenticated() {
|
|
2633
|
-
return $.getState().isAuthenticated;
|
|
2634
|
-
}
|
|
2635
|
-
/**
|
|
2636
|
-
* Check if SDK is ready
|
|
2637
|
-
*/
|
|
2638
|
-
isReady() {
|
|
2639
|
-
return $.getState().isReady;
|
|
2640
|
-
}
|
|
2641
|
-
/**
|
|
2642
|
-
* Get current authentication state
|
|
2643
|
-
*/
|
|
2644
|
-
getAuthState() {
|
|
2645
|
-
const t = $.getState();
|
|
2646
|
-
return {
|
|
2647
|
-
user: t.user,
|
|
2648
|
-
isAuthenticated: t.isAuthenticated,
|
|
2649
|
-
isReady: t.isReady
|
|
2650
|
-
};
|
|
2651
|
-
}
|
|
2652
|
-
/**
|
|
2653
|
-
* Mount the chat widget
|
|
2654
|
-
* @param options - Optional widget configuration (position)
|
|
2655
|
-
*/
|
|
2656
|
-
async mountChatWidget(t) {
|
|
2657
|
-
if (this.ensureInitialized(), this.chatWidgetMounted) {
|
|
2658
|
-
console.warn("Chat widget already mounted");
|
|
2659
|
-
return;
|
|
2660
|
-
}
|
|
2661
|
-
if (!this.config?.agentId)
|
|
2662
|
-
throw new Error("SDK not initialized with agentId. Call AutoGamesSDK.init() first.");
|
|
2663
|
-
const { mountChatWidget: n } = await import("./chat-mount-gXq-EZa2.js");
|
|
2664
|
-
n(this.config.agentId, t), this.chatWidgetMounted = !0;
|
|
2665
|
-
}
|
|
2666
|
-
/**
|
|
2667
|
-
* Unmount the chat widget
|
|
2668
|
-
*/
|
|
2669
|
-
async unmountChatWidget() {
|
|
2670
|
-
if (!this.chatWidgetMounted)
|
|
2671
|
-
return;
|
|
2672
|
-
const { unmountChatWidget: t } = await import("./chat-mount-gXq-EZa2.js");
|
|
2673
|
-
t(), this.chatWidgetMounted = !1;
|
|
2674
|
-
}
|
|
2675
|
-
/**
|
|
2676
|
-
* Check if chat widget is mounted
|
|
2677
|
-
*/
|
|
2678
|
-
isChatWidgetMounted() {
|
|
2679
|
-
return this.chatWidgetMounted;
|
|
2680
|
-
}
|
|
2681
|
-
/**
|
|
2682
|
-
* Clean up subscriptions
|
|
2683
|
-
*/
|
|
2684
|
-
destroy() {
|
|
2685
|
-
this.unsubscribe?.(), this.unsubscribe = null, this.config = null, this.initPromise = null, this.chatWidgetMounted && (import("./chat-mount-gXq-EZa2.js").then(({ unmountChatWidget: t }) => {
|
|
2686
|
-
t();
|
|
2687
|
-
}), this.chatWidgetMounted = !1);
|
|
2688
|
-
}
|
|
2689
|
-
/**
|
|
2690
|
-
* Wait for bridge to be ready
|
|
2691
|
-
* @internal
|
|
2692
|
-
*/
|
|
2693
|
-
waitForReady(t = 1e4) {
|
|
2694
|
-
return new Promise((n, r) => {
|
|
2695
|
-
if ($.getState().isReady) {
|
|
2696
|
-
n();
|
|
2697
|
-
return;
|
|
2698
|
-
}
|
|
2699
|
-
const s = $.subscribe((i) => {
|
|
2700
|
-
i.isReady && (s(), clearTimeout(o), n());
|
|
2701
|
-
}), o = setTimeout(() => {
|
|
2702
|
-
s(), r(new Error("SDK initialization timeout"));
|
|
2703
|
-
}, t);
|
|
2704
|
-
});
|
|
2705
|
-
}
|
|
2706
|
-
/**
|
|
2707
|
-
* Mount the React bridge component
|
|
2708
|
-
* @internal
|
|
2709
|
-
*/
|
|
2710
|
-
async mountBridge() {
|
|
2711
|
-
if (!this.config)
|
|
2712
|
-
throw new Error("Config must be set before mounting bridge");
|
|
2713
|
-
const { mountPrivyBridge: t } = await import("./bridge-mount-CWHdoUW-.js").then((n) => n.el);
|
|
2714
|
-
await t(this.config);
|
|
2715
|
-
}
|
|
2716
|
-
ensureInitialized() {
|
|
2717
|
-
if (!this.config)
|
|
2718
|
-
throw new Error("SDK not initialized. Call AutoGamesSDK.init() first.");
|
|
2719
|
-
}
|
|
2720
|
-
}
|
|
2721
|
-
const kr = new He();
|
|
2722
|
-
typeof window < "u" && (window.AutoGamesSDK = kr);
|
|
2723
|
-
export {
|
|
2724
|
-
jr as A,
|
|
2725
|
-
Nt as a,
|
|
2726
|
-
K as b,
|
|
2727
|
-
Xr as c,
|
|
2728
|
-
Gr as d,
|
|
2729
|
-
gr as e,
|
|
2730
|
-
kr as f,
|
|
2731
|
-
dr as g,
|
|
2732
|
-
ue as i,
|
|
2733
|
-
hr as r,
|
|
2734
|
-
Qr as t,
|
|
2735
|
-
J as u
|
|
2736
|
-
};
|