@autogames/sdk 1.2.4 → 1.4.0
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-DsUk1yju.js} +4 -4
- package/dist/{bridge-mount-CWHdoUW-.js → bridge-mount-FZvmk0-F.js} +36475 -26284
- package/dist/{ccip-qoKRUuU4.js → ccip-BUftQff6.js} +1 -1
- package/dist/chat-mount-SHiAmGqS.js +54 -0
- package/dist/{core-CvTNuh95.js → core-vSvn2d7W.js} +6 -6
- package/dist/{features-CvmBsK4Z.js → features-CN9CGh2p.js} +1 -1
- package/dist/{index-CdNZo-Hc.js → index-C7GvpVec.js} +2 -2
- package/dist/{index-YZZeCzJW.js → index-CGVyS_an.js} +1 -1
- package/dist/{index-BDOF-uep.js → index-DCrq_-Sk.js} +4 -4
- package/dist/{main-DBE9yqee.js → main-WFUU9G7G.js} +218 -206
- package/dist/main.d.ts +9 -2
- package/dist/{parseSignature-Brkx4zaC.js → parseSignature-Di33-DjX.js} +1 -1
- package/dist/{secp256k1-BNkeet6Q.js → secp256k1-CQV8E5Pv.js} +1 -1
- package/dist/stats-confirm.html +1 -1
- package/dist/{w3m-modal-0BRLpsIo.js → w3m-modal-BNIIM0f0.js} +2 -2
- package/package.json +3 -2
- package/dist/chat-mount-gXq-EZa2.js +0 -2744
- package/dist/index-BfOurzzw.js +0 -10194
|
@@ -22,11 +22,11 @@ function ut(e, t) {
|
|
|
22
22
|
const { toString: jt } = Object.prototype, { getPrototypeOf: Le } = Object, { iterator: Ee, toStringTag: ct } = Symbol, Se = /* @__PURE__ */ ((e) => (t) => {
|
|
23
23
|
const n = jt.call(t);
|
|
24
24
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
25
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
25
|
+
})(/* @__PURE__ */ Object.create(null)), q = (e) => (e = e.toLowerCase(), (t) => Se(t) === e), Re = (e) => (t) => typeof t === e, { isArray: se } = Array, re = Re("undefined");
|
|
26
26
|
function ce(e) {
|
|
27
27
|
return e !== null && !re(e) && e.constructor !== null && !re(e.constructor) && D(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
28
28
|
}
|
|
29
|
-
const lt =
|
|
29
|
+
const lt = q("ArrayBuffer");
|
|
30
30
|
function Lt(e) {
|
|
31
31
|
let t;
|
|
32
32
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && lt(e.buffer), t;
|
|
@@ -44,11 +44,11 @@ const Dt = Re("string"), D = Re("function"), ft = Re("number"), le = (e) => e !=
|
|
|
44
44
|
} catch {
|
|
45
45
|
return !1;
|
|
46
46
|
}
|
|
47
|
-
}, Bt =
|
|
47
|
+
}, Bt = q("Date"), Ht = q("File"), Mt = q("Blob"), qt = q("FileList"), zt = (e) => le(e) && D(e.pipe), Wt = (e) => {
|
|
48
48
|
let t;
|
|
49
49
|
return e && (typeof FormData == "function" && e instanceof FormData || D(e.append) && ((t = Se(e)) === "formdata" || // detect form-data instance
|
|
50
50
|
t === "object" && D(e.toString) && e.toString() === "[object FormData]"));
|
|
51
|
-
}, Jt =
|
|
51
|
+
}, Jt = q("URLSearchParams"), [Kt, Vt, Yt, Gt] = ["ReadableStream", "Request", "Response", "Headers"].map(q), Xt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
52
52
|
function fe(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
53
53
|
if (e === null || typeof e > "u")
|
|
54
54
|
return;
|
|
@@ -77,10 +77,10 @@ function dt(e, t) {
|
|
|
77
77
|
return null;
|
|
78
78
|
}
|
|
79
79
|
const X = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, pt = (e) => !re(e) && e !== X;
|
|
80
|
-
function
|
|
80
|
+
function xe() {
|
|
81
81
|
const { caseless: e, skipUndefined: t } = pt(this) && this || {}, n = {}, r = (s, o) => {
|
|
82
82
|
const i = e && dt(n, o) || o;
|
|
83
|
-
ye(n[i]) && ye(s) ? n[i] =
|
|
83
|
+
ye(n[i]) && ye(s) ? n[i] = xe(n[i], s) : ye(s) ? n[i] = xe({}, s) : se(s) ? n[i] = s.slice() : (!t || !re(s)) && (n[i] = s);
|
|
84
84
|
};
|
|
85
85
|
for (let s = 0, o = arguments.length; s < o; s++)
|
|
86
86
|
arguments[s] && fe(arguments[s], r);
|
|
@@ -128,12 +128,12 @@ const Qt = (e, t, n, { allOwnKeys: r } = {}) => (fe(t, (s, o) => {
|
|
|
128
128
|
for (; (n = e.exec(t)) !== null; )
|
|
129
129
|
r.push(n);
|
|
130
130
|
return r;
|
|
131
|
-
}, un =
|
|
131
|
+
}, un = q("HTMLFormElement"), cn = (e) => e.toLowerCase().replace(
|
|
132
132
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
133
133
|
function(n, r, s) {
|
|
134
134
|
return r.toUpperCase() + s;
|
|
135
135
|
}
|
|
136
|
-
), Me = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ln =
|
|
136
|
+
), Me = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ln = q("RegExp"), ht = (e, t) => {
|
|
137
137
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
138
138
|
fe(n, (s, o) => {
|
|
139
139
|
let i;
|
|
@@ -185,7 +185,7 @@ const yn = (e) => {
|
|
|
185
185
|
return r;
|
|
186
186
|
};
|
|
187
187
|
return n(e, 0);
|
|
188
|
-
}, gn =
|
|
188
|
+
}, gn = q("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
189
|
s === X && o === n && r.length && r.shift()();
|
|
190
190
|
}, !1), (s) => {
|
|
191
191
|
r.push(s), X.postMessage(n, "*");
|
|
@@ -219,14 +219,14 @@ const yn = (e) => {
|
|
|
219
219
|
isTypedArray: sn,
|
|
220
220
|
isFileList: qt,
|
|
221
221
|
forEach: fe,
|
|
222
|
-
merge:
|
|
222
|
+
merge: xe,
|
|
223
223
|
extend: Qt,
|
|
224
224
|
trim: Xt,
|
|
225
225
|
stripBOM: Zt,
|
|
226
226
|
inherits: en,
|
|
227
227
|
toFlatObject: tn,
|
|
228
228
|
kindOf: Se,
|
|
229
|
-
kindOfTest:
|
|
229
|
+
kindOfTest: q,
|
|
230
230
|
endsWith: nn,
|
|
231
231
|
toArray: rn,
|
|
232
232
|
forEachEntry: on,
|
|
@@ -346,16 +346,16 @@ function Te(e, t, n) {
|
|
|
346
346
|
return u.isArrayBuffer(p) || u.isTypedArray(p) ? h && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
347
347
|
}
|
|
348
348
|
function f(p, m, g) {
|
|
349
|
-
let
|
|
349
|
+
let O = p;
|
|
350
350
|
if (p && !g && typeof p == "object") {
|
|
351
351
|
if (u.endsWith(m, "{}"))
|
|
352
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, "[]")) && (
|
|
354
|
-
return m = wt(m),
|
|
355
|
-
!(u.isUndefined(
|
|
353
|
+
else if (u.isArray(p) && Rn(p) || (u.isFileList(p) || u.endsWith(m, "[]")) && (O = u.toArray(p)))
|
|
354
|
+
return m = wt(m), O.forEach(function(_, x) {
|
|
355
|
+
!(u.isUndefined(_) || _ === null) && t.append(
|
|
356
356
|
// eslint-disable-next-line no-nested-ternary
|
|
357
|
-
i === !0 ? qe([m],
|
|
358
|
-
l(
|
|
357
|
+
i === !0 ? qe([m], x, o) : i === null ? m : m + "[]",
|
|
358
|
+
l(_)
|
|
359
359
|
);
|
|
360
360
|
}), !1;
|
|
361
361
|
}
|
|
@@ -370,14 +370,14 @@ function Te(e, t, n) {
|
|
|
370
370
|
if (!u.isUndefined(p)) {
|
|
371
371
|
if (y.indexOf(p) !== -1)
|
|
372
372
|
throw Error("Circular reference detected in " + m.join("."));
|
|
373
|
-
y.push(p), u.forEach(p, function(
|
|
374
|
-
(!(u.isUndefined(
|
|
373
|
+
y.push(p), u.forEach(p, function(O, P) {
|
|
374
|
+
(!(u.isUndefined(O) || O === null) && s.call(
|
|
375
375
|
t,
|
|
376
|
-
|
|
376
|
+
O,
|
|
377
377
|
u.isString(P) ? P.trim() : P,
|
|
378
378
|
m,
|
|
379
379
|
R
|
|
380
|
-
)) === !0 && C(
|
|
380
|
+
)) === !0 && C(O, m ? m.concat(P) : [P]);
|
|
381
381
|
}), y.pop();
|
|
382
382
|
}
|
|
383
383
|
}
|
|
@@ -490,22 +490,22 @@ const St = {
|
|
|
490
490
|
silentJSONParsing: !0,
|
|
491
491
|
forcedJSONParsing: !0,
|
|
492
492
|
clarifyTimeoutError: !1
|
|
493
|
-
},
|
|
493
|
+
}, _n = typeof URLSearchParams < "u" ? URLSearchParams : De, On = typeof FormData < "u" ? FormData : null, Cn = typeof Blob < "u" ? Blob : null, Pn = {
|
|
494
494
|
isBrowser: !0,
|
|
495
495
|
classes: {
|
|
496
|
-
URLSearchParams:
|
|
497
|
-
FormData:
|
|
496
|
+
URLSearchParams: _n,
|
|
497
|
+
FormData: On,
|
|
498
498
|
Blob: Cn
|
|
499
499
|
},
|
|
500
500
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
501
|
-
}, Fe = typeof window < "u" && typeof document < "u", Ue = typeof navigator == "object" && navigator || void 0,
|
|
502
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
501
|
+
}, Fe = typeof window < "u" && typeof document < "u", Ue = typeof navigator == "object" && navigator || void 0, kn = Fe && (!Ue || ["ReactNative", "NativeScript", "NS"].indexOf(Ue.product) < 0), vn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
502
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", xn = Fe && window.location.href || "http://localhost", Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
503
503
|
__proto__: null,
|
|
504
504
|
hasBrowserEnv: Fe,
|
|
505
|
-
hasStandardBrowserEnv:
|
|
506
|
-
hasStandardBrowserWebWorkerEnv:
|
|
505
|
+
hasStandardBrowserEnv: kn,
|
|
506
|
+
hasStandardBrowserWebWorkerEnv: vn,
|
|
507
507
|
navigator: Ue,
|
|
508
|
-
origin:
|
|
508
|
+
origin: xn
|
|
509
509
|
}, Symbol.toStringTag, { value: "Module" })), j = {
|
|
510
510
|
...Nn,
|
|
511
511
|
...Pn
|
|
@@ -664,7 +664,7 @@ function $n(e) {
|
|
|
664
664
|
return t;
|
|
665
665
|
}
|
|
666
666
|
const Bn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
667
|
-
function
|
|
667
|
+
function Oe(e, t, n, r, s) {
|
|
668
668
|
if (u.isFunction(r))
|
|
669
669
|
return r.call(this, t, n);
|
|
670
670
|
if (s && (t = n), !!u.isString(t)) {
|
|
@@ -738,7 +738,7 @@ let F = class {
|
|
|
738
738
|
has(t, n) {
|
|
739
739
|
if (t = ae(t), t) {
|
|
740
740
|
const r = u.findKey(this, t);
|
|
741
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
741
|
+
return !!(r && this[r] !== void 0 && (!n || Oe(this, this[r], r, n)));
|
|
742
742
|
}
|
|
743
743
|
return !1;
|
|
744
744
|
}
|
|
@@ -748,7 +748,7 @@ let F = class {
|
|
|
748
748
|
function o(i) {
|
|
749
749
|
if (i = ae(i), i) {
|
|
750
750
|
const c = u.findKey(r, i);
|
|
751
|
-
c && (!n ||
|
|
751
|
+
c && (!n || Oe(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
return u.isArray(t) ? t.forEach(o) : o(t), s;
|
|
@@ -758,7 +758,7 @@ let F = class {
|
|
|
758
758
|
let r = n.length, s = !1;
|
|
759
759
|
for (; r--; ) {
|
|
760
760
|
const o = n[r];
|
|
761
|
-
(!t ||
|
|
761
|
+
(!t || Oe(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
762
762
|
}
|
|
763
763
|
return s;
|
|
764
764
|
}
|
|
@@ -947,7 +947,7 @@ function Vn(e) {
|
|
|
947
947
|
function Yn(e, t) {
|
|
948
948
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function _t(e, t, n) {
|
|
951
951
|
let r = !Vn(t);
|
|
952
952
|
return e && (r || n == !1) ? Yn(e, t) : t;
|
|
953
953
|
}
|
|
@@ -1016,10 +1016,10 @@ function Z(e, t) {
|
|
|
1016
1016
|
u.isUndefined(R) && y !== c || (n[f] = R);
|
|
1017
1017
|
}), n;
|
|
1018
1018
|
}
|
|
1019
|
-
const
|
|
1019
|
+
const Ot = (e) => {
|
|
1020
1020
|
const t = Z({}, e);
|
|
1021
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(
|
|
1022
|
+
if (t.headers = i = F.from(i), t.url = Et(_t(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1023
1023
|
"Authorization",
|
|
1024
1024
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1025
1025
|
), u.isFormData(n)) {
|
|
@@ -1039,7 +1039,7 @@ const _t = (e) => {
|
|
|
1039
1039
|
return t;
|
|
1040
1040
|
}, Gn = typeof XMLHttpRequest < "u", Xn = Gn && function(e) {
|
|
1041
1041
|
return new Promise(function(n, r) {
|
|
1042
|
-
const s =
|
|
1042
|
+
const s = Ot(e);
|
|
1043
1043
|
let o = s.data;
|
|
1044
1044
|
const i = F.from(s.headers).normalize();
|
|
1045
1045
|
let { responseType: c, onUploadProgress: h, onDownloadProgress: l } = s, f, y, R, C, p;
|
|
@@ -1048,16 +1048,16 @@ const _t = (e) => {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
let g = new XMLHttpRequest();
|
|
1050
1050
|
g.open(s.method.toUpperCase(), s.url, !0), g.timeout = s.timeout;
|
|
1051
|
-
function
|
|
1051
|
+
function O() {
|
|
1052
1052
|
if (!g)
|
|
1053
1053
|
return;
|
|
1054
|
-
const
|
|
1054
|
+
const _ = F.from(
|
|
1055
1055
|
"getAllResponseHeaders" in g && g.getAllResponseHeaders()
|
|
1056
1056
|
), I = {
|
|
1057
1057
|
data: !c || c === "text" || c === "json" ? g.responseText : g.response,
|
|
1058
1058
|
status: g.status,
|
|
1059
1059
|
statusText: g.statusText,
|
|
1060
|
-
headers:
|
|
1060
|
+
headers: _,
|
|
1061
1061
|
config: e,
|
|
1062
1062
|
request: g
|
|
1063
1063
|
};
|
|
@@ -1067,26 +1067,26 @@ const _t = (e) => {
|
|
|
1067
1067
|
r(T), m();
|
|
1068
1068
|
}, I), g = null;
|
|
1069
1069
|
}
|
|
1070
|
-
"onloadend" in g ? g.onloadend =
|
|
1071
|
-
!g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1070
|
+
"onloadend" in g ? g.onloadend = O : g.onreadystatechange = function() {
|
|
1071
|
+
!g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(O);
|
|
1072
1072
|
}, g.onabort = function() {
|
|
1073
1073
|
g && (r(new S("Request aborted", S.ECONNABORTED, e, g)), g = null);
|
|
1074
|
-
}, g.onerror = function(
|
|
1075
|
-
const I =
|
|
1076
|
-
B.event =
|
|
1074
|
+
}, g.onerror = function(x) {
|
|
1075
|
+
const I = x && x.message ? x.message : "Network Error", B = new S(I, S.ERR_NETWORK, e, g);
|
|
1076
|
+
B.event = x || null, r(B), g = null;
|
|
1077
1077
|
}, g.ontimeout = function() {
|
|
1078
|
-
let
|
|
1078
|
+
let x = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1079
1079
|
const I = s.transitional || St;
|
|
1080
|
-
s.timeoutErrorMessage && (
|
|
1081
|
-
|
|
1080
|
+
s.timeoutErrorMessage && (x = s.timeoutErrorMessage), r(new S(
|
|
1081
|
+
x,
|
|
1082
1082
|
I.clarifyTimeoutError ? S.ETIMEDOUT : S.ECONNABORTED,
|
|
1083
1083
|
e,
|
|
1084
1084
|
g
|
|
1085
1085
|
)), g = null;
|
|
1086
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in g && u.forEach(i.toJSON(), function(
|
|
1087
|
-
g.setRequestHeader(I,
|
|
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 = (
|
|
1089
|
-
g && (r(!
|
|
1086
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in g && u.forEach(i.toJSON(), function(x, I) {
|
|
1087
|
+
g.setRequestHeader(I, x);
|
|
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 = (_) => {
|
|
1089
|
+
g && (r(!_ || _.type ? new oe(null, e, g) : _), g.abort(), g = null);
|
|
1090
1090
|
}, s.cancelToken && s.cancelToken.subscribe(f), s.signal && (s.signal.aborted ? f() : s.signal.addEventListener("abort", f)));
|
|
1091
1091
|
const P = qn(s.url);
|
|
1092
1092
|
if (P && j.protocols.indexOf(P) === -1) {
|
|
@@ -1209,9 +1209,9 @@ const _t = (e) => {
|
|
|
1209
1209
|
};
|
|
1210
1210
|
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
|
|
1211
1211
|
!y[p] && (y[p] = (m, g) => {
|
|
1212
|
-
let
|
|
1213
|
-
if (
|
|
1214
|
-
return
|
|
1212
|
+
let O = m && m[p];
|
|
1213
|
+
if (O)
|
|
1214
|
+
return O.call(m);
|
|
1215
1215
|
throw new S(`Response type '${p}' is not supported`, S.ERR_NOT_SUPPORT, g);
|
|
1216
1216
|
});
|
|
1217
1217
|
});
|
|
@@ -1237,36 +1237,36 @@ const _t = (e) => {
|
|
|
1237
1237
|
let {
|
|
1238
1238
|
url: m,
|
|
1239
1239
|
method: g,
|
|
1240
|
-
data:
|
|
1240
|
+
data: O,
|
|
1241
1241
|
signal: P,
|
|
1242
|
-
cancelToken:
|
|
1243
|
-
timeout:
|
|
1242
|
+
cancelToken: _,
|
|
1243
|
+
timeout: x,
|
|
1244
1244
|
onDownloadProgress: I,
|
|
1245
1245
|
onUploadProgress: B,
|
|
1246
1246
|
responseType: T,
|
|
1247
1247
|
headers: ee,
|
|
1248
1248
|
withCredentials: V = "same-origin",
|
|
1249
1249
|
fetchOptions: pe
|
|
1250
|
-
} =
|
|
1250
|
+
} = Ot(p), te = t || fetch;
|
|
1251
1251
|
T = T ? (T + "").toLowerCase() : "text";
|
|
1252
|
-
let ne = Qn([P,
|
|
1252
|
+
let ne = Qn([P, _ && _.toAbortSignal()], x), Y = null;
|
|
1253
1253
|
const H = ne && ne.unsubscribe && (() => {
|
|
1254
1254
|
ne.unsubscribe();
|
|
1255
1255
|
});
|
|
1256
1256
|
let he;
|
|
1257
1257
|
try {
|
|
1258
|
-
if (B && l && g !== "get" && g !== "head" && (he = await C(ee,
|
|
1258
|
+
if (B && l && g !== "get" && g !== "head" && (he = await C(ee, O)) !== 0) {
|
|
1259
1259
|
let a = new n(m, {
|
|
1260
1260
|
method: "POST",
|
|
1261
|
-
body:
|
|
1261
|
+
body: O,
|
|
1262
1262
|
duplex: "half"
|
|
1263
1263
|
}), d;
|
|
1264
|
-
if (u.isFormData(
|
|
1264
|
+
if (u.isFormData(O) && (d = a.headers.get("content-type")) && ee.setContentType(d), a.body) {
|
|
1265
1265
|
const [b, w] = Ke(
|
|
1266
1266
|
he,
|
|
1267
1267
|
be(Ve(B))
|
|
1268
1268
|
);
|
|
1269
|
-
|
|
1269
|
+
O = Ge(a.body, Xe, b, w);
|
|
1270
1270
|
}
|
|
1271
1271
|
}
|
|
1272
1272
|
u.isString(V) || (V = V ? "include" : "omit");
|
|
@@ -1275,37 +1275,37 @@ const _t = (e) => {
|
|
|
1275
1275
|
signal: ne,
|
|
1276
1276
|
method: g.toUpperCase(),
|
|
1277
1277
|
headers: ee.normalize().toJSON(),
|
|
1278
|
-
body:
|
|
1278
|
+
body: O,
|
|
1279
1279
|
duplex: "half",
|
|
1280
1280
|
credentials: U ? V : void 0
|
|
1281
1281
|
};
|
|
1282
1282
|
Y = o && new n(m, G);
|
|
1283
|
-
let
|
|
1283
|
+
let z = await (o ? te(Y, pe) : te(m, G));
|
|
1284
1284
|
const ie = f && (T === "stream" || T === "response");
|
|
1285
1285
|
if (f && (I || ie && H)) {
|
|
1286
1286
|
const a = {};
|
|
1287
1287
|
["status", "statusText", "headers"].forEach((A) => {
|
|
1288
|
-
a[A] =
|
|
1288
|
+
a[A] = z[A];
|
|
1289
1289
|
});
|
|
1290
|
-
const d = u.toFiniteNumber(
|
|
1290
|
+
const d = u.toFiniteNumber(z.headers.get("content-length")), [b, w] = I && Ke(
|
|
1291
1291
|
d,
|
|
1292
1292
|
be(Ve(I), !0)
|
|
1293
1293
|
) || [];
|
|
1294
|
-
|
|
1295
|
-
Ge(
|
|
1294
|
+
z = new r(
|
|
1295
|
+
Ge(z.body, Xe, b, () => {
|
|
1296
1296
|
w && w(), H && H();
|
|
1297
1297
|
}),
|
|
1298
1298
|
a
|
|
1299
1299
|
);
|
|
1300
1300
|
}
|
|
1301
1301
|
T = T || "text";
|
|
1302
|
-
let
|
|
1302
|
+
let _e = await y[u.findKey(y, T) || "text"](z, p);
|
|
1303
1303
|
return !ie && H && H(), await new Promise((a, d) => {
|
|
1304
1304
|
At(a, d, {
|
|
1305
|
-
data:
|
|
1306
|
-
headers: F.from(
|
|
1307
|
-
status:
|
|
1308
|
-
statusText:
|
|
1305
|
+
data: _e,
|
|
1306
|
+
headers: F.from(z.headers),
|
|
1307
|
+
status: z.status,
|
|
1308
|
+
statusText: z.statusText,
|
|
1309
1309
|
config: p,
|
|
1310
1310
|
request: Y
|
|
1311
1311
|
});
|
|
@@ -1411,7 +1411,7 @@ function nt(e) {
|
|
|
1411
1411
|
), r.response.headers = F.from(r.response.headers))), Promise.reject(r);
|
|
1412
1412
|
});
|
|
1413
1413
|
}
|
|
1414
|
-
const
|
|
1414
|
+
const kt = "1.13.2", Ae = {};
|
|
1415
1415
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1416
1416
|
Ae[e] = function(r) {
|
|
1417
1417
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
@@ -1420,7 +1420,7 @@ const vt = "1.13.2", Ae = {};
|
|
|
1420
1420
|
const rt = {};
|
|
1421
1421
|
Ae.transitional = function(t, n, r) {
|
|
1422
1422
|
function s(o, i) {
|
|
1423
|
-
return "[Axios v" +
|
|
1423
|
+
return "[Axios v" + kt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1424
1424
|
}
|
|
1425
1425
|
return (o, i, c) => {
|
|
1426
1426
|
if (t === !1)
|
|
@@ -1459,7 +1459,7 @@ function ar(e, t, n) {
|
|
|
1459
1459
|
const we = {
|
|
1460
1460
|
assertOptions: ar,
|
|
1461
1461
|
validators: Ae
|
|
1462
|
-
},
|
|
1462
|
+
}, J = we.validators;
|
|
1463
1463
|
let Q = class {
|
|
1464
1464
|
constructor(t) {
|
|
1465
1465
|
this.defaults = t || {}, this.interceptors = {
|
|
@@ -1496,17 +1496,17 @@ let Q = class {
|
|
|
1496
1496
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Z(this.defaults, n);
|
|
1497
1497
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1498
1498
|
r !== void 0 && we.assertOptions(r, {
|
|
1499
|
-
silentJSONParsing:
|
|
1500
|
-
forcedJSONParsing:
|
|
1501
|
-
clarifyTimeoutError:
|
|
1499
|
+
silentJSONParsing: J.transitional(J.boolean),
|
|
1500
|
+
forcedJSONParsing: J.transitional(J.boolean),
|
|
1501
|
+
clarifyTimeoutError: J.transitional(J.boolean)
|
|
1502
1502
|
}, !1), s != null && (u.isFunction(s) ? n.paramsSerializer = {
|
|
1503
1503
|
serialize: s
|
|
1504
1504
|
} : we.assertOptions(s, {
|
|
1505
|
-
encode:
|
|
1506
|
-
serialize:
|
|
1505
|
+
encode: J.function,
|
|
1506
|
+
serialize: J.function
|
|
1507
1507
|
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), we.assertOptions(n, {
|
|
1508
|
-
baseUrl:
|
|
1509
|
-
withXsrfToken:
|
|
1508
|
+
baseUrl: J.spelling("baseURL"),
|
|
1509
|
+
withXsrfToken: J.spelling("withXSRFToken")
|
|
1510
1510
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1511
1511
|
let i = o && u.merge(
|
|
1512
1512
|
o.common,
|
|
@@ -1556,7 +1556,7 @@ let Q = class {
|
|
|
1556
1556
|
}
|
|
1557
1557
|
getUri(t) {
|
|
1558
1558
|
t = Z(this.defaults, t);
|
|
1559
|
-
const n =
|
|
1559
|
+
const n = _t(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1560
1560
|
return Et(n, t.params, t.paramsSerializer);
|
|
1561
1561
|
}
|
|
1562
1562
|
};
|
|
@@ -1584,7 +1584,7 @@ u.forEach(["post", "put", "patch"], function(t) {
|
|
|
1584
1584
|
}
|
|
1585
1585
|
Q.prototype[t] = n(), Q.prototype[t + "Form"] = n(!0);
|
|
1586
1586
|
});
|
|
1587
|
-
let ur = class
|
|
1587
|
+
let ur = class vt {
|
|
1588
1588
|
constructor(t) {
|
|
1589
1589
|
if (typeof t != "function")
|
|
1590
1590
|
throw new TypeError("executor must be a function.");
|
|
@@ -1650,7 +1650,7 @@ let ur = class xt {
|
|
|
1650
1650
|
static source() {
|
|
1651
1651
|
let t;
|
|
1652
1652
|
return {
|
|
1653
|
-
token: new
|
|
1653
|
+
token: new vt(function(s) {
|
|
1654
1654
|
t = s;
|
|
1655
1655
|
}),
|
|
1656
1656
|
cancel: t
|
|
@@ -1739,18 +1739,18 @@ const Ie = {
|
|
|
1739
1739
|
Object.entries(Ie).forEach(([e, t]) => {
|
|
1740
1740
|
Ie[t] = e;
|
|
1741
1741
|
});
|
|
1742
|
-
function
|
|
1742
|
+
function xt(e) {
|
|
1743
1743
|
const t = new Q(e), n = ut(Q.prototype.request, t);
|
|
1744
1744
|
return u.extend(n, Q.prototype, t, { allOwnKeys: !0 }), u.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1745
|
-
return
|
|
1745
|
+
return xt(Z(e, s));
|
|
1746
1746
|
}, n;
|
|
1747
1747
|
}
|
|
1748
|
-
const N =
|
|
1748
|
+
const N = xt(de);
|
|
1749
1749
|
N.Axios = Q;
|
|
1750
1750
|
N.CanceledError = oe;
|
|
1751
1751
|
N.CancelToken = ur;
|
|
1752
1752
|
N.isCancel = Tt;
|
|
1753
|
-
N.VERSION =
|
|
1753
|
+
N.VERSION = kt;
|
|
1754
1754
|
N.toFormData = Te;
|
|
1755
1755
|
N.AxiosError = S;
|
|
1756
1756
|
N.Cancel = N.CanceledError;
|
|
@@ -1821,7 +1821,7 @@ function Xr(e) {
|
|
|
1821
1821
|
});
|
|
1822
1822
|
}), n;
|
|
1823
1823
|
}
|
|
1824
|
-
var
|
|
1824
|
+
var ke = { exports: {} }, E = {};
|
|
1825
1825
|
var ot;
|
|
1826
1826
|
function pr() {
|
|
1827
1827
|
if (ot) return E;
|
|
@@ -1841,26 +1841,26 @@ function pr() {
|
|
|
1841
1841
|
enqueueSetState: function() {
|
|
1842
1842
|
}
|
|
1843
1843
|
}, m = Object.assign, g = {};
|
|
1844
|
-
function
|
|
1844
|
+
function O(a, d, b) {
|
|
1845
1845
|
this.props = a, this.context = d, this.refs = g, this.updater = b || p;
|
|
1846
1846
|
}
|
|
1847
|
-
|
|
1847
|
+
O.prototype.isReactComponent = {}, O.prototype.setState = function(a, d) {
|
|
1848
1848
|
if (typeof a != "object" && typeof a != "function" && a != null)
|
|
1849
1849
|
throw Error(
|
|
1850
1850
|
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
1851
1851
|
);
|
|
1852
1852
|
this.updater.enqueueSetState(this, a, d, "setState");
|
|
1853
|
-
},
|
|
1853
|
+
}, O.prototype.forceUpdate = function(a) {
|
|
1854
1854
|
this.updater.enqueueForceUpdate(this, a, "forceUpdate");
|
|
1855
1855
|
};
|
|
1856
1856
|
function P() {
|
|
1857
1857
|
}
|
|
1858
|
-
P.prototype =
|
|
1859
|
-
function
|
|
1858
|
+
P.prototype = O.prototype;
|
|
1859
|
+
function _(a, d, b) {
|
|
1860
1860
|
this.props = a, this.context = d, this.refs = g, this.updater = b || p;
|
|
1861
1861
|
}
|
|
1862
|
-
var
|
|
1863
|
-
|
|
1862
|
+
var x = _.prototype = new P();
|
|
1863
|
+
x.constructor = _, m(x, O.prototype), x.isPureReactComponent = !0;
|
|
1864
1864
|
var I = Array.isArray;
|
|
1865
1865
|
function B() {
|
|
1866
1866
|
}
|
|
@@ -1915,26 +1915,26 @@ function pr() {
|
|
|
1915
1915
|
throw a;
|
|
1916
1916
|
}
|
|
1917
1917
|
function U(a, d, b, w, A) {
|
|
1918
|
-
var
|
|
1919
|
-
(
|
|
1920
|
-
var
|
|
1921
|
-
if (a === null)
|
|
1918
|
+
var k = typeof a;
|
|
1919
|
+
(k === "undefined" || k === "boolean") && (a = null);
|
|
1920
|
+
var v = !1;
|
|
1921
|
+
if (a === null) v = !0;
|
|
1922
1922
|
else
|
|
1923
|
-
switch (
|
|
1923
|
+
switch (k) {
|
|
1924
1924
|
case "bigint":
|
|
1925
1925
|
case "string":
|
|
1926
1926
|
case "number":
|
|
1927
|
-
|
|
1927
|
+
v = !0;
|
|
1928
1928
|
break;
|
|
1929
1929
|
case "object":
|
|
1930
1930
|
switch (a.$$typeof) {
|
|
1931
1931
|
case e:
|
|
1932
1932
|
case t:
|
|
1933
|
-
|
|
1933
|
+
v = !0;
|
|
1934
1934
|
break;
|
|
1935
1935
|
case f:
|
|
1936
|
-
return
|
|
1937
|
-
|
|
1936
|
+
return v = a._init, U(
|
|
1937
|
+
v(a._payload),
|
|
1938
1938
|
d,
|
|
1939
1939
|
b,
|
|
1940
1940
|
w,
|
|
@@ -1942,37 +1942,37 @@ function pr() {
|
|
|
1942
1942
|
);
|
|
1943
1943
|
}
|
|
1944
1944
|
}
|
|
1945
|
-
if (
|
|
1946
|
-
return A = A(a),
|
|
1945
|
+
if (v)
|
|
1946
|
+
return A = A(a), v = w === "" ? "." + H(a, 0) : w, I(A) ? (b = "", v != null && (b = v.replace(Y, "$&/") + "/"), U(A, d, b, "", function(Ut) {
|
|
1947
1947
|
return Ut;
|
|
1948
1948
|
})) : A != null && (te(A) && (A = pe(
|
|
1949
1949
|
A,
|
|
1950
1950
|
b + (A.key == null || a && a.key === A.key ? "" : ("" + A.key).replace(
|
|
1951
1951
|
Y,
|
|
1952
1952
|
"$&/"
|
|
1953
|
-
) + "/") +
|
|
1953
|
+
) + "/") + v
|
|
1954
1954
|
)), d.push(A)), 1;
|
|
1955
|
-
|
|
1956
|
-
var
|
|
1955
|
+
v = 0;
|
|
1956
|
+
var W = w === "" ? "." : w + ":";
|
|
1957
1957
|
if (I(a))
|
|
1958
1958
|
for (var L = 0; L < a.length; L++)
|
|
1959
|
-
w = a[L],
|
|
1959
|
+
w = a[L], k = W + H(w, L), v += U(
|
|
1960
1960
|
w,
|
|
1961
1961
|
d,
|
|
1962
1962
|
b,
|
|
1963
|
-
|
|
1963
|
+
k,
|
|
1964
1964
|
A
|
|
1965
1965
|
);
|
|
1966
1966
|
else if (L = C(a), typeof L == "function")
|
|
1967
1967
|
for (a = L.call(a), L = 0; !(w = a.next()).done; )
|
|
1968
|
-
w = w.value,
|
|
1968
|
+
w = w.value, k = W + H(w, L++), v += U(
|
|
1969
1969
|
w,
|
|
1970
1970
|
d,
|
|
1971
1971
|
b,
|
|
1972
|
-
|
|
1972
|
+
k,
|
|
1973
1973
|
A
|
|
1974
1974
|
);
|
|
1975
|
-
else if (
|
|
1975
|
+
else if (k === "object") {
|
|
1976
1976
|
if (typeof a.then == "function")
|
|
1977
1977
|
return U(
|
|
1978
1978
|
he(a),
|
|
@@ -1985,16 +1985,16 @@ function pr() {
|
|
|
1985
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
1986
|
);
|
|
1987
1987
|
}
|
|
1988
|
-
return
|
|
1988
|
+
return v;
|
|
1989
1989
|
}
|
|
1990
1990
|
function G(a, d, b) {
|
|
1991
1991
|
if (a == null) return a;
|
|
1992
1992
|
var w = [], A = 0;
|
|
1993
|
-
return U(a, w, "", "", function(
|
|
1994
|
-
return d.call(b,
|
|
1993
|
+
return U(a, w, "", "", function(k) {
|
|
1994
|
+
return d.call(b, k, A++);
|
|
1995
1995
|
}), w;
|
|
1996
1996
|
}
|
|
1997
|
-
function
|
|
1997
|
+
function z(a) {
|
|
1998
1998
|
if (a._status === -1) {
|
|
1999
1999
|
var d = a._result;
|
|
2000
2000
|
d = d(), d.then(
|
|
@@ -2023,7 +2023,7 @@ function pr() {
|
|
|
2023
2023
|
return;
|
|
2024
2024
|
}
|
|
2025
2025
|
console.error(a);
|
|
2026
|
-
},
|
|
2026
|
+
}, _e = {
|
|
2027
2027
|
map: G,
|
|
2028
2028
|
forEach: function(a, d, b) {
|
|
2029
2029
|
G(
|
|
@@ -2053,7 +2053,7 @@ function pr() {
|
|
|
2053
2053
|
return a;
|
|
2054
2054
|
}
|
|
2055
2055
|
};
|
|
2056
|
-
return E.Activity = y, E.Children =
|
|
2056
|
+
return E.Activity = y, E.Children = _e, E.Component = O, E.Fragment = n, E.Profiler = s, E.PureComponent = _, E.StrictMode = r, E.Suspense = h, E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = T, E.__COMPILER_RUNTIME = {
|
|
2057
2057
|
__proto__: null,
|
|
2058
2058
|
c: function(a) {
|
|
2059
2059
|
return T.H.useMemoCache(a);
|
|
@@ -2071,14 +2071,14 @@ function pr() {
|
|
|
2071
2071
|
);
|
|
2072
2072
|
var w = m({}, a.props), A = a.key;
|
|
2073
2073
|
if (d != null)
|
|
2074
|
-
for (
|
|
2075
|
-
!ee.call(d,
|
|
2076
|
-
var
|
|
2077
|
-
if (
|
|
2078
|
-
else if (1 <
|
|
2079
|
-
for (var
|
|
2080
|
-
|
|
2081
|
-
w.children =
|
|
2074
|
+
for (k in d.key !== void 0 && (A = "" + d.key), d)
|
|
2075
|
+
!ee.call(d, k) || k === "key" || k === "__self" || k === "__source" || k === "ref" && d.ref === void 0 || (w[k] = d[k]);
|
|
2076
|
+
var k = arguments.length - 2;
|
|
2077
|
+
if (k === 1) w.children = b;
|
|
2078
|
+
else if (1 < k) {
|
|
2079
|
+
for (var v = Array(k), W = 0; W < k; W++)
|
|
2080
|
+
v[W] = arguments[W + 2];
|
|
2081
|
+
w.children = v;
|
|
2082
2082
|
}
|
|
2083
2083
|
return V(a.type, A, w);
|
|
2084
2084
|
}, E.createContext = function(a) {
|
|
@@ -2094,21 +2094,21 @@ function pr() {
|
|
|
2094
2094
|
_context: a
|
|
2095
2095
|
}, a;
|
|
2096
2096
|
}, E.createElement = function(a, d, b) {
|
|
2097
|
-
var w, A = {},
|
|
2097
|
+
var w, A = {}, k = null;
|
|
2098
2098
|
if (d != null)
|
|
2099
|
-
for (w in d.key !== void 0 && (
|
|
2099
|
+
for (w in d.key !== void 0 && (k = "" + d.key), d)
|
|
2100
2100
|
ee.call(d, w) && w !== "key" && w !== "__self" && w !== "__source" && (A[w] = d[w]);
|
|
2101
|
-
var
|
|
2102
|
-
if (
|
|
2103
|
-
else if (1 <
|
|
2104
|
-
for (var
|
|
2105
|
-
|
|
2106
|
-
A.children =
|
|
2101
|
+
var v = arguments.length - 2;
|
|
2102
|
+
if (v === 1) A.children = b;
|
|
2103
|
+
else if (1 < v) {
|
|
2104
|
+
for (var W = Array(v), L = 0; L < v; L++)
|
|
2105
|
+
W[L] = arguments[L + 2];
|
|
2106
|
+
A.children = W;
|
|
2107
2107
|
}
|
|
2108
2108
|
if (a && a.defaultProps)
|
|
2109
|
-
for (w in
|
|
2110
|
-
A[w] === void 0 && (A[w] =
|
|
2111
|
-
return V(a,
|
|
2109
|
+
for (w in v = a.defaultProps, v)
|
|
2110
|
+
A[w] === void 0 && (A[w] = v[w]);
|
|
2111
|
+
return V(a, k, A);
|
|
2112
2112
|
}, E.createRef = function() {
|
|
2113
2113
|
return { current: null };
|
|
2114
2114
|
}, E.forwardRef = function(a) {
|
|
@@ -2117,7 +2117,7 @@ function pr() {
|
|
|
2117
2117
|
return {
|
|
2118
2118
|
$$typeof: f,
|
|
2119
2119
|
_payload: { _status: -1, _result: a },
|
|
2120
|
-
_init:
|
|
2120
|
+
_init: z
|
|
2121
2121
|
};
|
|
2122
2122
|
}, E.memo = function(a, d) {
|
|
2123
2123
|
return {
|
|
@@ -2131,8 +2131,8 @@ function pr() {
|
|
|
2131
2131
|
try {
|
|
2132
2132
|
var w = a(), A = T.S;
|
|
2133
2133
|
A !== null && A(b, w), typeof w == "object" && w !== null && typeof w.then == "function" && w.then(B, ie);
|
|
2134
|
-
} catch (
|
|
2135
|
-
ie(
|
|
2134
|
+
} catch (k) {
|
|
2135
|
+
ie(k);
|
|
2136
2136
|
} finally {
|
|
2137
2137
|
d !== null && b.types !== null && (d.types = b.types), T.T = d;
|
|
2138
2138
|
}
|
|
@@ -2183,7 +2183,7 @@ function pr() {
|
|
|
2183
2183
|
}
|
|
2184
2184
|
var it;
|
|
2185
2185
|
function hr() {
|
|
2186
|
-
return it || (it = 1,
|
|
2186
|
+
return it || (it = 1, ke.exports = pr()), ke.exports;
|
|
2187
2187
|
}
|
|
2188
2188
|
var Nt = hr();
|
|
2189
2189
|
const ue = /* @__PURE__ */ dr(Nt), Qr = /* @__PURE__ */ It({
|
|
@@ -2299,19 +2299,19 @@ const je = (e) => (t) => {
|
|
|
2299
2299
|
var m, g;
|
|
2300
2300
|
if (!l) return;
|
|
2301
2301
|
i = !1, c.forEach((P) => {
|
|
2302
|
-
var
|
|
2303
|
-
return P((
|
|
2302
|
+
var _;
|
|
2303
|
+
return P((_ = r()) != null ? _ : R);
|
|
2304
2304
|
});
|
|
2305
|
-
const
|
|
2305
|
+
const O = ((g = o.onRehydrateStorage) == null ? void 0 : g.call(o, (m = r()) != null ? m : R)) || void 0;
|
|
2306
2306
|
return je(l.getItem.bind(l))(o.name).then((P) => {
|
|
2307
2307
|
if (P)
|
|
2308
2308
|
if (typeof P.version == "number" && P.version !== o.version) {
|
|
2309
2309
|
if (o.migrate) {
|
|
2310
|
-
const
|
|
2310
|
+
const _ = o.migrate(
|
|
2311
2311
|
P.state,
|
|
2312
2312
|
P.version
|
|
2313
2313
|
);
|
|
2314
|
-
return
|
|
2314
|
+
return _ instanceof Promise ? _.then((x) => [!0, x]) : [!0, _];
|
|
2315
2315
|
}
|
|
2316
2316
|
console.error(
|
|
2317
2317
|
"State loaded from storage couldn't be migrated since no migrate function was provided"
|
|
@@ -2320,17 +2320,17 @@ const je = (e) => (t) => {
|
|
|
2320
2320
|
return [!1, P.state];
|
|
2321
2321
|
return [!1, void 0];
|
|
2322
2322
|
}).then((P) => {
|
|
2323
|
-
var
|
|
2324
|
-
const [
|
|
2323
|
+
var _;
|
|
2324
|
+
const [x, I] = P;
|
|
2325
2325
|
if (C = o.merge(
|
|
2326
2326
|
I,
|
|
2327
|
-
(
|
|
2328
|
-
), n(C, !0),
|
|
2327
|
+
(_ = r()) != null ? _ : R
|
|
2328
|
+
), n(C, !0), x)
|
|
2329
2329
|
return f();
|
|
2330
2330
|
}).then(() => {
|
|
2331
|
-
|
|
2331
|
+
O?.(C, void 0), C = r(), i = !0, h.forEach((P) => P(C));
|
|
2332
2332
|
}).catch((P) => {
|
|
2333
|
-
|
|
2333
|
+
O?.(void 0, P);
|
|
2334
2334
|
});
|
|
2335
2335
|
};
|
|
2336
2336
|
return s.persist = {
|
|
@@ -2353,12 +2353,13 @@ const je = (e) => (t) => {
|
|
|
2353
2353
|
h.delete(m);
|
|
2354
2354
|
})
|
|
2355
2355
|
}, o.skipHydration || p(), C || R;
|
|
2356
|
-
}, Rr = Sr,
|
|
2356
|
+
}, Rr = Sr, M = gr()(
|
|
2357
2357
|
Rr(
|
|
2358
2358
|
br((e, t) => ({
|
|
2359
2359
|
// Initial state
|
|
2360
2360
|
accessToken: null,
|
|
2361
2361
|
accessTokenUpdatedAt: null,
|
|
2362
|
+
refreshToken: null,
|
|
2362
2363
|
user: null,
|
|
2363
2364
|
isAuthenticated: !1,
|
|
2364
2365
|
isReady: !1,
|
|
@@ -2380,6 +2381,7 @@ const je = (e) => (t) => {
|
|
|
2380
2381
|
e({ error: null }), await n.logout(), e({
|
|
2381
2382
|
accessToken: null,
|
|
2382
2383
|
accessTokenUpdatedAt: null,
|
|
2384
|
+
refreshToken: null,
|
|
2383
2385
|
user: null,
|
|
2384
2386
|
isAuthenticated: !1
|
|
2385
2387
|
});
|
|
@@ -2403,11 +2405,12 @@ const je = (e) => (t) => {
|
|
|
2403
2405
|
_setPrivyInstance: (n) => {
|
|
2404
2406
|
e({ _privyInstance: n });
|
|
2405
2407
|
},
|
|
2406
|
-
_resolveLogin: (n, r) => {
|
|
2408
|
+
_resolveLogin: (n, r, s) => {
|
|
2407
2409
|
e({
|
|
2408
2410
|
accessToken: n,
|
|
2409
2411
|
accessTokenUpdatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2410
|
-
|
|
2412
|
+
refreshToken: r,
|
|
2413
|
+
user: s,
|
|
2411
2414
|
isAuthenticated: !0,
|
|
2412
2415
|
isLoggingIn: !1,
|
|
2413
2416
|
error: null
|
|
@@ -2429,52 +2432,58 @@ const je = (e) => (t) => {
|
|
|
2429
2432
|
partialize: (e) => ({
|
|
2430
2433
|
accessToken: e.accessToken,
|
|
2431
2434
|
accessTokenUpdatedAt: e.accessTokenUpdatedAt,
|
|
2435
|
+
refreshToken: e.refreshToken,
|
|
2432
2436
|
user: e.user,
|
|
2433
2437
|
isAuthenticated: e.isAuthenticated
|
|
2434
2438
|
})
|
|
2435
2439
|
}
|
|
2436
2440
|
)
|
|
2437
2441
|
), $ = {
|
|
2438
|
-
getState: () =>
|
|
2439
|
-
setUser: (e) =>
|
|
2440
|
-
subscribe: (e) =>
|
|
2441
|
-
login: () =>
|
|
2442
|
-
logout: () =>
|
|
2442
|
+
getState: () => M.getState(),
|
|
2443
|
+
setUser: (e) => M.getState().setUser(e),
|
|
2444
|
+
subscribe: (e) => M.subscribe(e),
|
|
2445
|
+
login: () => M.getState().login(),
|
|
2446
|
+
logout: () => M.getState().logout()
|
|
2443
2447
|
}, Be = typeof window > "u", Tr = {
|
|
2444
2448
|
baseURL: "https://api.dev.autogames.app",
|
|
2445
2449
|
withCredentials: !0
|
|
2446
|
-
}, K = N.create(Tr),
|
|
2450
|
+
}, K = N.create(Tr), ve = async () => {
|
|
2447
2451
|
try {
|
|
2448
|
-
const
|
|
2452
|
+
const e = M.getState().refreshToken;
|
|
2453
|
+
if (!e)
|
|
2454
|
+
throw new Error("No refresh token available");
|
|
2455
|
+
const n = (await N.post(
|
|
2449
2456
|
"https://api.dev.autogames.app/sso/refresh-token",
|
|
2450
|
-
{
|
|
2457
|
+
{
|
|
2458
|
+
refresh_token: e
|
|
2459
|
+
},
|
|
2451
2460
|
{
|
|
2452
2461
|
withCredentials: !0
|
|
2453
2462
|
}
|
|
2454
2463
|
)).data.access_token;
|
|
2455
|
-
if (!
|
|
2464
|
+
if (!n)
|
|
2456
2465
|
throw new Error("No access token returned from refresh");
|
|
2457
|
-
return
|
|
2466
|
+
return M.getState().setAccessToken(n), n;
|
|
2458
2467
|
} catch (e) {
|
|
2459
|
-
throw
|
|
2468
|
+
throw M.getState().logout(), e;
|
|
2460
2469
|
}
|
|
2461
2470
|
}, Ar = async () => {
|
|
2462
2471
|
if (!Be)
|
|
2463
2472
|
if (typeof navigator < "u" && "locks" in navigator)
|
|
2464
2473
|
try {
|
|
2465
2474
|
await navigator.locks.request("refresh-token", async () => {
|
|
2466
|
-
const e =
|
|
2467
|
-
e && Date.now() - new Date(e).getTime() < 6e4 || await
|
|
2475
|
+
const e = M.getState().accessTokenUpdatedAt;
|
|
2476
|
+
e && Date.now() - new Date(e).getTime() < 6e4 || await ve();
|
|
2468
2477
|
});
|
|
2469
2478
|
} catch (e) {
|
|
2470
|
-
console.error("Token refresh with Web Locks failed, falling back", e), await
|
|
2479
|
+
console.error("Token refresh with Web Locks failed, falling back", e), await ve();
|
|
2471
2480
|
}
|
|
2472
2481
|
else
|
|
2473
|
-
console.warn("Web Locks API not supported — falling back to direct refresh."), await
|
|
2482
|
+
console.warn("Web Locks API not supported — falling back to direct refresh."), await ve();
|
|
2474
2483
|
};
|
|
2475
2484
|
K.interceptors.request.use(async (e) => {
|
|
2476
2485
|
if (Be) return e;
|
|
2477
|
-
const t =
|
|
2486
|
+
const t = M.getState().accessToken;
|
|
2478
2487
|
return t && (e.headers = e.headers ?? {}, e.headers.Authorization = `Bearer ${t}`, e.headers["X-Auth-Type"] = "jwt"), e;
|
|
2479
2488
|
});
|
|
2480
2489
|
K.interceptors.response.use(
|
|
@@ -2487,7 +2496,7 @@ K.interceptors.response.use(
|
|
|
2487
2496
|
t._retry = !0;
|
|
2488
2497
|
try {
|
|
2489
2498
|
await Ar();
|
|
2490
|
-
const n =
|
|
2499
|
+
const n = M.getState().accessToken;
|
|
2491
2500
|
return n && (t.headers.Authorization = `Bearer ${n}`), K(t);
|
|
2492
2501
|
} catch (n) {
|
|
2493
2502
|
return Promise.reject(n);
|
|
@@ -2496,10 +2505,13 @@ K.interceptors.response.use(
|
|
|
2496
2505
|
return Promise.reject(e);
|
|
2497
2506
|
}
|
|
2498
2507
|
);
|
|
2499
|
-
async function Or() {
|
|
2500
|
-
return (await K.post("/sso/logout")).data;
|
|
2501
|
-
}
|
|
2502
2508
|
async function _r(e) {
|
|
2509
|
+
return (await K.post(
|
|
2510
|
+
"/sso/logout",
|
|
2511
|
+
e ? { refresh_token: e } : {}
|
|
2512
|
+
)).data;
|
|
2513
|
+
}
|
|
2514
|
+
async function Or(e) {
|
|
2503
2515
|
const t = await K.get(`/users/${e}`);
|
|
2504
2516
|
if (!t.data.user)
|
|
2505
2517
|
throw new Error("User not found");
|
|
@@ -2515,10 +2527,10 @@ async function Pr(e, t) {
|
|
|
2515
2527
|
params: t
|
|
2516
2528
|
})).data;
|
|
2517
2529
|
}
|
|
2518
|
-
async function
|
|
2530
|
+
async function kr(e) {
|
|
2519
2531
|
return (await K.post(`/votings/${e}/recall`)).data;
|
|
2520
2532
|
}
|
|
2521
|
-
async function
|
|
2533
|
+
async function vr(e, t) {
|
|
2522
2534
|
return (await K.post(`/votings/${e}/vote`, t)).data;
|
|
2523
2535
|
}
|
|
2524
2536
|
class He {
|
|
@@ -2560,10 +2572,11 @@ class He {
|
|
|
2560
2572
|
*/
|
|
2561
2573
|
async logout() {
|
|
2562
2574
|
this.ensureInitialized();
|
|
2575
|
+
const t = $.getState().refreshToken;
|
|
2563
2576
|
try {
|
|
2564
|
-
await
|
|
2565
|
-
} catch (
|
|
2566
|
-
console.error("Failed to logout on backend:",
|
|
2577
|
+
await _r(t);
|
|
2578
|
+
} catch (n) {
|
|
2579
|
+
console.error("Failed to logout on backend:", n);
|
|
2567
2580
|
} finally {
|
|
2568
2581
|
await $.logout();
|
|
2569
2582
|
}
|
|
@@ -2585,7 +2598,7 @@ class He {
|
|
|
2585
2598
|
if (!t?.ID)
|
|
2586
2599
|
return null;
|
|
2587
2600
|
try {
|
|
2588
|
-
const n = await
|
|
2601
|
+
const n = await Or(t.ID);
|
|
2589
2602
|
return $.setUser(n), n;
|
|
2590
2603
|
} catch (n) {
|
|
2591
2604
|
return console.error("Failed to fetch profile:", n), $.getState().user;
|
|
@@ -2598,7 +2611,7 @@ class He {
|
|
|
2598
2611
|
* @returns Vote response with message
|
|
2599
2612
|
*/
|
|
2600
2613
|
async vote(t, n) {
|
|
2601
|
-
return this.ensureInitialized(),
|
|
2614
|
+
return this.ensureInitialized(), vr(t, n);
|
|
2602
2615
|
}
|
|
2603
2616
|
/**
|
|
2604
2617
|
* Recall a vote on a voting
|
|
@@ -2606,7 +2619,7 @@ class He {
|
|
|
2606
2619
|
* @returns Recall response with message
|
|
2607
2620
|
*/
|
|
2608
2621
|
async recall(t) {
|
|
2609
|
-
return this.ensureInitialized(),
|
|
2622
|
+
return this.ensureInitialized(), kr(t);
|
|
2610
2623
|
}
|
|
2611
2624
|
/**
|
|
2612
2625
|
* Fetch user assets
|
|
@@ -2658,10 +2671,10 @@ class He {
|
|
|
2658
2671
|
console.warn("Chat widget already mounted");
|
|
2659
2672
|
return;
|
|
2660
2673
|
}
|
|
2661
|
-
if (!this.config?.
|
|
2662
|
-
throw new Error("SDK not initialized with
|
|
2663
|
-
const { mountChatWidget: n } = await import("./chat-mount-
|
|
2664
|
-
n(this.config.
|
|
2674
|
+
if (!this.config?.gameId)
|
|
2675
|
+
throw new Error("SDK not initialized with gameId. Call AutoGamesSDK.init() first.");
|
|
2676
|
+
const { mountChatWidget: n } = await import("./chat-mount-SHiAmGqS.js");
|
|
2677
|
+
n(this.config.gameId, t), this.chatWidgetMounted = !0;
|
|
2665
2678
|
}
|
|
2666
2679
|
/**
|
|
2667
2680
|
* Unmount the chat widget
|
|
@@ -2669,7 +2682,7 @@ class He {
|
|
|
2669
2682
|
async unmountChatWidget() {
|
|
2670
2683
|
if (!this.chatWidgetMounted)
|
|
2671
2684
|
return;
|
|
2672
|
-
const { unmountChatWidget: t } = await import("./chat-mount-
|
|
2685
|
+
const { unmountChatWidget: t } = await import("./chat-mount-SHiAmGqS.js");
|
|
2673
2686
|
t(), this.chatWidgetMounted = !1;
|
|
2674
2687
|
}
|
|
2675
2688
|
/**
|
|
@@ -2682,7 +2695,7 @@ class He {
|
|
|
2682
2695
|
* Clean up subscriptions
|
|
2683
2696
|
*/
|
|
2684
2697
|
destroy() {
|
|
2685
|
-
this.unsubscribe?.(), this.unsubscribe = null, this.config = null, this.initPromise = null, this.chatWidgetMounted && (import("./chat-mount-
|
|
2698
|
+
this.unsubscribe?.(), this.unsubscribe = null, this.config = null, this.initPromise = null, this.chatWidgetMounted && (import("./chat-mount-SHiAmGqS.js").then(({ unmountChatWidget: t }) => {
|
|
2686
2699
|
t();
|
|
2687
2700
|
}), this.chatWidgetMounted = !1);
|
|
2688
2701
|
}
|
|
@@ -2710,7 +2723,7 @@ class He {
|
|
|
2710
2723
|
async mountBridge() {
|
|
2711
2724
|
if (!this.config)
|
|
2712
2725
|
throw new Error("Config must be set before mounting bridge");
|
|
2713
|
-
const { mountPrivyBridge: t } = await import("./bridge-mount-
|
|
2726
|
+
const { mountPrivyBridge: t } = await import("./bridge-mount-FZvmk0-F.js").then((n) => n.el);
|
|
2714
2727
|
await t(this.config);
|
|
2715
2728
|
}
|
|
2716
2729
|
ensureInitialized() {
|
|
@@ -2718,19 +2731,18 @@ class He {
|
|
|
2718
2731
|
throw new Error("SDK not initialized. Call AutoGamesSDK.init() first.");
|
|
2719
2732
|
}
|
|
2720
2733
|
}
|
|
2721
|
-
const
|
|
2722
|
-
typeof window < "u" && (window.AutoGamesSDK =
|
|
2734
|
+
const xr = new He();
|
|
2735
|
+
typeof window < "u" && (window.AutoGamesSDK = xr);
|
|
2723
2736
|
export {
|
|
2724
|
-
|
|
2737
|
+
xr as A,
|
|
2725
2738
|
Nt as a,
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
kr as f,
|
|
2739
|
+
Xr as b,
|
|
2740
|
+
Gr as c,
|
|
2741
|
+
gr as d,
|
|
2742
|
+
K as e,
|
|
2731
2743
|
dr as g,
|
|
2732
2744
|
ue as i,
|
|
2733
2745
|
hr as r,
|
|
2734
2746
|
Qr as t,
|
|
2735
|
-
|
|
2747
|
+
M as u
|
|
2736
2748
|
};
|