@sandeshnaroj/api-engine 1.0.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/LICENSE +201 -0
- package/dist/api-engine.iife.js +10 -0
- package/dist/core/types.d.ts +15 -0
- package/dist/core/utils.d.ts +7 -0
- package/dist/index.cjs +10 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +2400 -0
- package/dist/protocols/rest.d.ts +3 -0
- package/dist/protocols/socket.d.ts +29 -0
- package/dist/protocols/sse.d.ts +11 -0
- package/dist/schemas/manifest.d.ts +53 -0
- package/package.json +65 -0
- package/readme.md +3 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,2400 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.defineProperty, t = (t, n) => {
|
|
3
|
+
let r = {};
|
|
4
|
+
for (var i in t) e(r, i, {
|
|
5
|
+
get: t[i],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region node_modules/axios/lib/helpers/bind.js
|
|
12
|
+
function n(e, t) {
|
|
13
|
+
return function() {
|
|
14
|
+
return e.apply(t, arguments);
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region node_modules/axios/lib/utils.js
|
|
19
|
+
var { toString: r } = Object.prototype, { getPrototypeOf: i } = Object, { iterator: a, toStringTag: o } = Symbol, s = ((e) => (t) => {
|
|
20
|
+
let n = r.call(t);
|
|
21
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
22
|
+
})(Object.create(null)), c = (e) => (e = e.toLowerCase(), (t) => s(t) === e), l = (e) => (t) => typeof t === e, { isArray: u } = Array, d = l("undefined");
|
|
23
|
+
function f(e) {
|
|
24
|
+
return e !== null && !d(e) && e.constructor !== null && !d(e.constructor) && g(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
25
|
+
}
|
|
26
|
+
var p = c("ArrayBuffer");
|
|
27
|
+
function m(e) {
|
|
28
|
+
let t;
|
|
29
|
+
return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && p(e.buffer), t;
|
|
30
|
+
}
|
|
31
|
+
var h = l("string"), g = l("function"), _ = l("number"), v = (e) => typeof e == "object" && !!e, y = (e) => e === !0 || e === !1, b = (e) => {
|
|
32
|
+
if (s(e) !== "object") return !1;
|
|
33
|
+
let t = i(e);
|
|
34
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(o in e) && !(a in e);
|
|
35
|
+
}, ee = (e) => {
|
|
36
|
+
if (!v(e) || f(e)) return !1;
|
|
37
|
+
try {
|
|
38
|
+
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
39
|
+
} catch {
|
|
40
|
+
return !1;
|
|
41
|
+
}
|
|
42
|
+
}, x = c("Date"), te = c("File"), S = (e) => !!(e && e.uri !== void 0), ne = (e) => e && e.getParts !== void 0, re = c("Blob"), C = c("FileList"), w = (e) => v(e) && g(e.pipe);
|
|
43
|
+
function T() {
|
|
44
|
+
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
45
|
+
}
|
|
46
|
+
var E = T(), D = E.FormData === void 0 ? void 0 : E.FormData, ie = (e) => {
|
|
47
|
+
if (!e) return !1;
|
|
48
|
+
if (D && e instanceof D) return !0;
|
|
49
|
+
let t = i(e);
|
|
50
|
+
if (!t || t === Object.prototype || !g(e.append)) return !1;
|
|
51
|
+
let n = s(e);
|
|
52
|
+
return n === "formdata" || n === "object" && g(e.toString) && e.toString() === "[object FormData]";
|
|
53
|
+
}, ae = c("URLSearchParams"), [oe, se, ce, le] = [
|
|
54
|
+
"ReadableStream",
|
|
55
|
+
"Request",
|
|
56
|
+
"Response",
|
|
57
|
+
"Headers"
|
|
58
|
+
].map(c), ue = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
59
|
+
function O(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
60
|
+
if (e == null) return;
|
|
61
|
+
let r, i;
|
|
62
|
+
if (typeof e != "object" && (e = [e]), u(e)) for (r = 0, i = e.length; r < i; r++) t.call(null, e[r], r, e);
|
|
63
|
+
else {
|
|
64
|
+
if (f(e)) return;
|
|
65
|
+
let i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), a = i.length, o;
|
|
66
|
+
for (r = 0; r < a; r++) o = i[r], t.call(null, e[o], o, e);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function de(e, t) {
|
|
70
|
+
if (f(e)) return null;
|
|
71
|
+
t = t.toLowerCase();
|
|
72
|
+
let n = Object.keys(e), r = n.length, i;
|
|
73
|
+
for (; r-- > 0;) if (i = n[r], t === i.toLowerCase()) return i;
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
var k = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, fe = (e) => !d(e) && e !== k;
|
|
77
|
+
function pe(...e) {
|
|
78
|
+
let { caseless: t, skipUndefined: n } = fe(this) && this || {}, r = {}, i = (e, i) => {
|
|
79
|
+
if (i === "__proto__" || i === "constructor" || i === "prototype") return;
|
|
80
|
+
let a = t && de(r, i) || i, o = Te(r, a) ? r[a] : void 0;
|
|
81
|
+
b(o) && b(e) ? r[a] = pe(o, e) : b(e) ? r[a] = pe({}, e) : u(e) ? r[a] = e.slice() : (!n || !d(e)) && (r[a] = e);
|
|
82
|
+
};
|
|
83
|
+
for (let t = 0, n = e.length; t < n; t++) e[t] && O(e[t], i);
|
|
84
|
+
return r;
|
|
85
|
+
}
|
|
86
|
+
var me = (e, t, r, { allOwnKeys: i } = {}) => (O(t, (t, i) => {
|
|
87
|
+
r && g(t) ? Object.defineProperty(e, i, {
|
|
88
|
+
__proto__: null,
|
|
89
|
+
value: n(t, r),
|
|
90
|
+
writable: !0,
|
|
91
|
+
enumerable: !0,
|
|
92
|
+
configurable: !0
|
|
93
|
+
}) : Object.defineProperty(e, i, {
|
|
94
|
+
__proto__: null,
|
|
95
|
+
value: t,
|
|
96
|
+
writable: !0,
|
|
97
|
+
enumerable: !0,
|
|
98
|
+
configurable: !0
|
|
99
|
+
});
|
|
100
|
+
}, { allOwnKeys: i }), e), he = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), ge = (e, t, n, r) => {
|
|
101
|
+
e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
|
|
102
|
+
__proto__: null,
|
|
103
|
+
value: e,
|
|
104
|
+
writable: !0,
|
|
105
|
+
enumerable: !1,
|
|
106
|
+
configurable: !0
|
|
107
|
+
}), Object.defineProperty(e, "super", {
|
|
108
|
+
__proto__: null,
|
|
109
|
+
value: t.prototype
|
|
110
|
+
}), n && Object.assign(e.prototype, n);
|
|
111
|
+
}, _e = (e, t, n, r) => {
|
|
112
|
+
let a, o, s, c = {};
|
|
113
|
+
if (t ||= {}, e == null) return t;
|
|
114
|
+
do {
|
|
115
|
+
for (a = Object.getOwnPropertyNames(e), o = a.length; o-- > 0;) s = a[o], (!r || r(s, e, t)) && !c[s] && (t[s] = e[s], c[s] = !0);
|
|
116
|
+
e = n !== !1 && i(e);
|
|
117
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
118
|
+
return t;
|
|
119
|
+
}, ve = (e, t, n) => {
|
|
120
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
121
|
+
let r = e.indexOf(t, n);
|
|
122
|
+
return r !== -1 && r === n;
|
|
123
|
+
}, ye = (e) => {
|
|
124
|
+
if (!e) return null;
|
|
125
|
+
if (u(e)) return e;
|
|
126
|
+
let t = e.length;
|
|
127
|
+
if (!_(t)) return null;
|
|
128
|
+
let n = Array(t);
|
|
129
|
+
for (; t-- > 0;) n[t] = e[t];
|
|
130
|
+
return n;
|
|
131
|
+
}, be = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && i(Uint8Array)), xe = (e, t) => {
|
|
132
|
+
let n = (e && e[a]).call(e), r;
|
|
133
|
+
for (; (r = n.next()) && !r.done;) {
|
|
134
|
+
let n = r.value;
|
|
135
|
+
t.call(e, n[0], n[1]);
|
|
136
|
+
}
|
|
137
|
+
}, Se = (e, t) => {
|
|
138
|
+
let n, r = [];
|
|
139
|
+
for (; (n = e.exec(t)) !== null;) r.push(n);
|
|
140
|
+
return r;
|
|
141
|
+
}, Ce = c("HTMLFormElement"), we = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, t, n) {
|
|
142
|
+
return t.toUpperCase() + n;
|
|
143
|
+
}), Te = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ee = c("RegExp"), De = (e, t) => {
|
|
144
|
+
let n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
145
|
+
O(n, (n, i) => {
|
|
146
|
+
let a;
|
|
147
|
+
(a = t(n, i, e)) !== !1 && (r[i] = a || n);
|
|
148
|
+
}), Object.defineProperties(e, r);
|
|
149
|
+
}, Oe = (e) => {
|
|
150
|
+
De(e, (t, n) => {
|
|
151
|
+
if (g(e) && [
|
|
152
|
+
"arguments",
|
|
153
|
+
"caller",
|
|
154
|
+
"callee"
|
|
155
|
+
].includes(n)) return !1;
|
|
156
|
+
let r = e[n];
|
|
157
|
+
if (g(r)) {
|
|
158
|
+
if (t.enumerable = !1, "writable" in t) {
|
|
159
|
+
t.writable = !1;
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
t.set ||= () => {
|
|
163
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}, ke = (e, t) => {
|
|
168
|
+
let n = {}, r = (e) => {
|
|
169
|
+
e.forEach((e) => {
|
|
170
|
+
n[e] = !0;
|
|
171
|
+
});
|
|
172
|
+
};
|
|
173
|
+
return u(e) ? r(e) : r(String(e).split(t)), n;
|
|
174
|
+
}, Ae = () => {}, je = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
175
|
+
function Me(e) {
|
|
176
|
+
return !!(e && g(e.append) && e[o] === "FormData" && e[a]);
|
|
177
|
+
}
|
|
178
|
+
var Ne = (e) => {
|
|
179
|
+
let t = Array(10), n = (e, r) => {
|
|
180
|
+
if (v(e)) {
|
|
181
|
+
if (t.indexOf(e) >= 0) return;
|
|
182
|
+
if (f(e)) return e;
|
|
183
|
+
if (!("toJSON" in e)) {
|
|
184
|
+
t[r] = e;
|
|
185
|
+
let i = u(e) ? [] : {};
|
|
186
|
+
return O(e, (e, t) => {
|
|
187
|
+
let a = n(e, r + 1);
|
|
188
|
+
!d(a) && (i[t] = a);
|
|
189
|
+
}), t[r] = void 0, i;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return e;
|
|
193
|
+
};
|
|
194
|
+
return n(e, 0);
|
|
195
|
+
}, Pe = c("AsyncFunction"), Fe = (e) => e && (v(e) || g(e)) && g(e.then) && g(e.catch), Ie = ((e, t) => e ? setImmediate : t ? ((e, t) => (k.addEventListener("message", ({ source: n, data: r }) => {
|
|
196
|
+
n === k && r === e && t.length && t.shift()();
|
|
197
|
+
}, !1), (n) => {
|
|
198
|
+
t.push(n), k.postMessage(e, "*");
|
|
199
|
+
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", g(k.postMessage)), A = {
|
|
200
|
+
isArray: u,
|
|
201
|
+
isArrayBuffer: p,
|
|
202
|
+
isBuffer: f,
|
|
203
|
+
isFormData: ie,
|
|
204
|
+
isArrayBufferView: m,
|
|
205
|
+
isString: h,
|
|
206
|
+
isNumber: _,
|
|
207
|
+
isBoolean: y,
|
|
208
|
+
isObject: v,
|
|
209
|
+
isPlainObject: b,
|
|
210
|
+
isEmptyObject: ee,
|
|
211
|
+
isReadableStream: oe,
|
|
212
|
+
isRequest: se,
|
|
213
|
+
isResponse: ce,
|
|
214
|
+
isHeaders: le,
|
|
215
|
+
isUndefined: d,
|
|
216
|
+
isDate: x,
|
|
217
|
+
isFile: te,
|
|
218
|
+
isReactNativeBlob: S,
|
|
219
|
+
isReactNative: ne,
|
|
220
|
+
isBlob: re,
|
|
221
|
+
isRegExp: Ee,
|
|
222
|
+
isFunction: g,
|
|
223
|
+
isStream: w,
|
|
224
|
+
isURLSearchParams: ae,
|
|
225
|
+
isTypedArray: be,
|
|
226
|
+
isFileList: C,
|
|
227
|
+
forEach: O,
|
|
228
|
+
merge: pe,
|
|
229
|
+
extend: me,
|
|
230
|
+
trim: ue,
|
|
231
|
+
stripBOM: he,
|
|
232
|
+
inherits: ge,
|
|
233
|
+
toFlatObject: _e,
|
|
234
|
+
kindOf: s,
|
|
235
|
+
kindOfTest: c,
|
|
236
|
+
endsWith: ve,
|
|
237
|
+
toArray: ye,
|
|
238
|
+
forEachEntry: xe,
|
|
239
|
+
matchAll: Se,
|
|
240
|
+
isHTMLForm: Ce,
|
|
241
|
+
hasOwnProperty: Te,
|
|
242
|
+
hasOwnProp: Te,
|
|
243
|
+
reduceDescriptors: De,
|
|
244
|
+
freezeMethods: Oe,
|
|
245
|
+
toObjectSet: ke,
|
|
246
|
+
toCamelCase: we,
|
|
247
|
+
noop: Ae,
|
|
248
|
+
toFiniteNumber: je,
|
|
249
|
+
findKey: de,
|
|
250
|
+
global: k,
|
|
251
|
+
isContextDefined: fe,
|
|
252
|
+
isSpecCompliantForm: Me,
|
|
253
|
+
toJSONObject: Ne,
|
|
254
|
+
isAsyncFn: Pe,
|
|
255
|
+
isThenable: Fe,
|
|
256
|
+
setImmediate: Ie,
|
|
257
|
+
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(k) : typeof process < "u" && process.nextTick || Ie,
|
|
258
|
+
isIterable: (e) => e != null && g(e[a])
|
|
259
|
+
}, Le = A.toObjectSet([
|
|
260
|
+
"age",
|
|
261
|
+
"authorization",
|
|
262
|
+
"content-length",
|
|
263
|
+
"content-type",
|
|
264
|
+
"etag",
|
|
265
|
+
"expires",
|
|
266
|
+
"from",
|
|
267
|
+
"host",
|
|
268
|
+
"if-modified-since",
|
|
269
|
+
"if-unmodified-since",
|
|
270
|
+
"last-modified",
|
|
271
|
+
"location",
|
|
272
|
+
"max-forwards",
|
|
273
|
+
"proxy-authorization",
|
|
274
|
+
"referer",
|
|
275
|
+
"retry-after",
|
|
276
|
+
"user-agent"
|
|
277
|
+
]), Re = (e) => {
|
|
278
|
+
let t = {}, n, r, i;
|
|
279
|
+
return e && e.split("\n").forEach(function(e) {
|
|
280
|
+
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] && Le[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
281
|
+
}), t;
|
|
282
|
+
}, ze = Symbol("internals"), Be = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
283
|
+
function Ve(e) {
|
|
284
|
+
let t = 0, n = e.length;
|
|
285
|
+
for (; t < n;) {
|
|
286
|
+
let n = e.charCodeAt(t);
|
|
287
|
+
if (n !== 9 && n !== 32) break;
|
|
288
|
+
t += 1;
|
|
289
|
+
}
|
|
290
|
+
for (; n > t;) {
|
|
291
|
+
let t = e.charCodeAt(n - 1);
|
|
292
|
+
if (t !== 9 && t !== 32) break;
|
|
293
|
+
--n;
|
|
294
|
+
}
|
|
295
|
+
return t === 0 && n === e.length ? e : e.slice(t, n);
|
|
296
|
+
}
|
|
297
|
+
function j(e) {
|
|
298
|
+
return e && String(e).trim().toLowerCase();
|
|
299
|
+
}
|
|
300
|
+
function He(e) {
|
|
301
|
+
return Ve(e.replace(Be, ""));
|
|
302
|
+
}
|
|
303
|
+
function Ue(e) {
|
|
304
|
+
return e === !1 || e == null ? e : A.isArray(e) ? e.map(Ue) : He(String(e));
|
|
305
|
+
}
|
|
306
|
+
function We(e) {
|
|
307
|
+
let t = Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g, r;
|
|
308
|
+
for (; r = n.exec(e);) t[r[1]] = r[2];
|
|
309
|
+
return t;
|
|
310
|
+
}
|
|
311
|
+
var Ge = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
312
|
+
function Ke(e, t, n, r, i) {
|
|
313
|
+
if (A.isFunction(r)) return r.call(this, t, n);
|
|
314
|
+
if (i && (t = n), A.isString(t)) {
|
|
315
|
+
if (A.isString(r)) return t.indexOf(r) !== -1;
|
|
316
|
+
if (A.isRegExp(r)) return r.test(t);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
function qe(e) {
|
|
320
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, n) => t.toUpperCase() + n);
|
|
321
|
+
}
|
|
322
|
+
function Je(e, t) {
|
|
323
|
+
let n = A.toCamelCase(" " + t);
|
|
324
|
+
[
|
|
325
|
+
"get",
|
|
326
|
+
"set",
|
|
327
|
+
"has"
|
|
328
|
+
].forEach((r) => {
|
|
329
|
+
Object.defineProperty(e, r + n, {
|
|
330
|
+
__proto__: null,
|
|
331
|
+
value: function(e, n, i) {
|
|
332
|
+
return this[r].call(this, t, e, n, i);
|
|
333
|
+
},
|
|
334
|
+
configurable: !0
|
|
335
|
+
});
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
var M = class {
|
|
339
|
+
constructor(e) {
|
|
340
|
+
e && this.set(e);
|
|
341
|
+
}
|
|
342
|
+
set(e, t, n) {
|
|
343
|
+
let r = this;
|
|
344
|
+
function i(e, t, n) {
|
|
345
|
+
let i = j(t);
|
|
346
|
+
if (!i) throw Error("header name must be a non-empty string");
|
|
347
|
+
let a = A.findKey(r, i);
|
|
348
|
+
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] = Ue(e));
|
|
349
|
+
}
|
|
350
|
+
let a = (e, t) => A.forEach(e, (e, n) => i(e, n, t));
|
|
351
|
+
if (A.isPlainObject(e) || e instanceof this.constructor) a(e, t);
|
|
352
|
+
else if (A.isString(e) && (e = e.trim()) && !Ge(e)) a(Re(e), t);
|
|
353
|
+
else if (A.isObject(e) && A.isIterable(e)) {
|
|
354
|
+
let n = {}, r, i;
|
|
355
|
+
for (let t of e) {
|
|
356
|
+
if (!A.isArray(t)) throw TypeError("Object iterator must return a key-value pair");
|
|
357
|
+
n[i = t[0]] = (r = n[i]) ? A.isArray(r) ? [...r, t[1]] : [r, t[1]] : t[1];
|
|
358
|
+
}
|
|
359
|
+
a(n, t);
|
|
360
|
+
} else e != null && i(t, e, n);
|
|
361
|
+
return this;
|
|
362
|
+
}
|
|
363
|
+
get(e, t) {
|
|
364
|
+
if (e = j(e), e) {
|
|
365
|
+
let n = A.findKey(this, e);
|
|
366
|
+
if (n) {
|
|
367
|
+
let e = this[n];
|
|
368
|
+
if (!t) return e;
|
|
369
|
+
if (t === !0) return We(e);
|
|
370
|
+
if (A.isFunction(t)) return t.call(this, e, n);
|
|
371
|
+
if (A.isRegExp(t)) return t.exec(e);
|
|
372
|
+
throw TypeError("parser must be boolean|regexp|function");
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
has(e, t) {
|
|
377
|
+
if (e = j(e), e) {
|
|
378
|
+
let n = A.findKey(this, e);
|
|
379
|
+
return !!(n && this[n] !== void 0 && (!t || Ke(this, this[n], n, t)));
|
|
380
|
+
}
|
|
381
|
+
return !1;
|
|
382
|
+
}
|
|
383
|
+
delete(e, t) {
|
|
384
|
+
let n = this, r = !1;
|
|
385
|
+
function i(e) {
|
|
386
|
+
if (e = j(e), e) {
|
|
387
|
+
let i = A.findKey(n, e);
|
|
388
|
+
i && (!t || Ke(n, n[i], i, t)) && (delete n[i], r = !0);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
return A.isArray(e) ? e.forEach(i) : i(e), r;
|
|
392
|
+
}
|
|
393
|
+
clear(e) {
|
|
394
|
+
let t = Object.keys(this), n = t.length, r = !1;
|
|
395
|
+
for (; n--;) {
|
|
396
|
+
let i = t[n];
|
|
397
|
+
(!e || Ke(this, this[i], i, e, !0)) && (delete this[i], r = !0);
|
|
398
|
+
}
|
|
399
|
+
return r;
|
|
400
|
+
}
|
|
401
|
+
normalize(e) {
|
|
402
|
+
let t = this, n = {};
|
|
403
|
+
return A.forEach(this, (r, i) => {
|
|
404
|
+
let a = A.findKey(n, i);
|
|
405
|
+
if (a) {
|
|
406
|
+
t[a] = Ue(r), delete t[i];
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
let o = e ? qe(i) : String(i).trim();
|
|
410
|
+
o !== i && delete t[i], t[o] = Ue(r), n[o] = !0;
|
|
411
|
+
}), this;
|
|
412
|
+
}
|
|
413
|
+
concat(...e) {
|
|
414
|
+
return this.constructor.concat(this, ...e);
|
|
415
|
+
}
|
|
416
|
+
toJSON(e) {
|
|
417
|
+
let t = Object.create(null);
|
|
418
|
+
return A.forEach(this, (n, r) => {
|
|
419
|
+
n != null && n !== !1 && (t[r] = e && A.isArray(n) ? n.join(", ") : n);
|
|
420
|
+
}), t;
|
|
421
|
+
}
|
|
422
|
+
[Symbol.iterator]() {
|
|
423
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
424
|
+
}
|
|
425
|
+
toString() {
|
|
426
|
+
return Object.entries(this.toJSON()).map(([e, t]) => e + ": " + t).join("\n");
|
|
427
|
+
}
|
|
428
|
+
getSetCookie() {
|
|
429
|
+
return this.get("set-cookie") || [];
|
|
430
|
+
}
|
|
431
|
+
get [Symbol.toStringTag]() {
|
|
432
|
+
return "AxiosHeaders";
|
|
433
|
+
}
|
|
434
|
+
static from(e) {
|
|
435
|
+
return e instanceof this ? e : new this(e);
|
|
436
|
+
}
|
|
437
|
+
static concat(e, ...t) {
|
|
438
|
+
let n = new this(e);
|
|
439
|
+
return t.forEach((e) => n.set(e)), n;
|
|
440
|
+
}
|
|
441
|
+
static accessor(e) {
|
|
442
|
+
let t = (this[ze] = this[ze] = { accessors: {} }).accessors, n = this.prototype;
|
|
443
|
+
function r(e) {
|
|
444
|
+
let r = j(e);
|
|
445
|
+
t[r] || (Je(n, e), t[r] = !0);
|
|
446
|
+
}
|
|
447
|
+
return A.isArray(e) ? e.forEach(r) : r(e), this;
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
M.accessor([
|
|
451
|
+
"Content-Type",
|
|
452
|
+
"Content-Length",
|
|
453
|
+
"Accept",
|
|
454
|
+
"Accept-Encoding",
|
|
455
|
+
"User-Agent",
|
|
456
|
+
"Authorization"
|
|
457
|
+
]), A.reduceDescriptors(M.prototype, ({ value: e }, t) => {
|
|
458
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
459
|
+
return {
|
|
460
|
+
get: () => e,
|
|
461
|
+
set(e) {
|
|
462
|
+
this[n] = e;
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
}), A.freezeMethods(M);
|
|
466
|
+
//#endregion
|
|
467
|
+
//#region node_modules/axios/lib/core/AxiosError.js
|
|
468
|
+
var Ye = "[REDACTED ****]";
|
|
469
|
+
function Xe(e) {
|
|
470
|
+
if (A.hasOwnProp(e, "toJSON")) return !0;
|
|
471
|
+
let t = Object.getPrototypeOf(e);
|
|
472
|
+
for (; t && t !== Object.prototype;) {
|
|
473
|
+
if (A.hasOwnProp(t, "toJSON")) return !0;
|
|
474
|
+
t = Object.getPrototypeOf(t);
|
|
475
|
+
}
|
|
476
|
+
return !1;
|
|
477
|
+
}
|
|
478
|
+
function Ze(e, t) {
|
|
479
|
+
let n = new Set(t.map((e) => String(e).toLowerCase())), r = [], i = (e) => {
|
|
480
|
+
if (typeof e != "object" || !e || A.isBuffer(e)) return e;
|
|
481
|
+
if (r.indexOf(e) !== -1) return;
|
|
482
|
+
e instanceof M && (e = e.toJSON()), r.push(e);
|
|
483
|
+
let t;
|
|
484
|
+
if (A.isArray(e)) t = [], e.forEach((e, n) => {
|
|
485
|
+
let r = i(e);
|
|
486
|
+
A.isUndefined(r) || (t[n] = r);
|
|
487
|
+
});
|
|
488
|
+
else {
|
|
489
|
+
if (!A.isPlainObject(e) && Xe(e)) return r.pop(), e;
|
|
490
|
+
t = Object.create(null);
|
|
491
|
+
for (let [r, a] of Object.entries(e)) {
|
|
492
|
+
let e = n.has(r.toLowerCase()) ? Ye : i(a);
|
|
493
|
+
A.isUndefined(e) || (t[r] = e);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
return r.pop(), t;
|
|
497
|
+
};
|
|
498
|
+
return i(e);
|
|
499
|
+
}
|
|
500
|
+
var N = class e extends Error {
|
|
501
|
+
static from(t, n, r, i, a, o) {
|
|
502
|
+
let s = new e(t.message, n || t.code, r, i, a);
|
|
503
|
+
return s.cause = t, s.name = t.name, t.status != null && s.status == null && (s.status = t.status), o && Object.assign(s, o), s;
|
|
504
|
+
}
|
|
505
|
+
constructor(e, t, n, r, i) {
|
|
506
|
+
super(e), Object.defineProperty(this, "message", {
|
|
507
|
+
__proto__: null,
|
|
508
|
+
value: e,
|
|
509
|
+
enumerable: !0,
|
|
510
|
+
writable: !0,
|
|
511
|
+
configurable: !0
|
|
512
|
+
}), this.name = "AxiosError", this.isAxiosError = !0, t && (this.code = t), n && (this.config = n), r && (this.request = r), i && (this.response = i, this.status = i.status);
|
|
513
|
+
}
|
|
514
|
+
toJSON() {
|
|
515
|
+
let e = this.config, t = e && A.hasOwnProp(e, "redact") ? e.redact : void 0, n = A.isArray(t) && t.length > 0 ? Ze(e, t) : A.toJSONObject(e);
|
|
516
|
+
return {
|
|
517
|
+
message: this.message,
|
|
518
|
+
name: this.name,
|
|
519
|
+
description: this.description,
|
|
520
|
+
number: this.number,
|
|
521
|
+
fileName: this.fileName,
|
|
522
|
+
lineNumber: this.lineNumber,
|
|
523
|
+
columnNumber: this.columnNumber,
|
|
524
|
+
stack: this.stack,
|
|
525
|
+
config: n,
|
|
526
|
+
code: this.code,
|
|
527
|
+
status: this.status
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
};
|
|
531
|
+
N.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE", N.ERR_BAD_OPTION = "ERR_BAD_OPTION", N.ECONNABORTED = "ECONNABORTED", N.ETIMEDOUT = "ETIMEDOUT", N.ECONNREFUSED = "ECONNREFUSED", N.ERR_NETWORK = "ERR_NETWORK", N.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS", N.ERR_DEPRECATED = "ERR_DEPRECATED", N.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE", N.ERR_BAD_REQUEST = "ERR_BAD_REQUEST", N.ERR_CANCELED = "ERR_CANCELED", N.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT", N.ERR_INVALID_URL = "ERR_INVALID_URL", N.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
532
|
+
//#endregion
|
|
533
|
+
//#region node_modules/axios/lib/helpers/toFormData.js
|
|
534
|
+
function Qe(e) {
|
|
535
|
+
return A.isPlainObject(e) || A.isArray(e);
|
|
536
|
+
}
|
|
537
|
+
function $e(e) {
|
|
538
|
+
return A.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
539
|
+
}
|
|
540
|
+
function et(e, t, n) {
|
|
541
|
+
return e ? e.concat(t).map(function(e, t) {
|
|
542
|
+
return e = $e(e), !n && t ? "[" + e + "]" : e;
|
|
543
|
+
}).join(n ? "." : "") : t;
|
|
544
|
+
}
|
|
545
|
+
function tt(e) {
|
|
546
|
+
return A.isArray(e) && !e.some(Qe);
|
|
547
|
+
}
|
|
548
|
+
var nt = A.toFlatObject(A, {}, null, function(e) {
|
|
549
|
+
return /^is[A-Z]/.test(e);
|
|
550
|
+
});
|
|
551
|
+
function P(e, t, n) {
|
|
552
|
+
if (!A.isObject(e)) throw TypeError("target must be an object");
|
|
553
|
+
t ||= new FormData(), n = A.toFlatObject(n, {
|
|
554
|
+
metaTokens: !0,
|
|
555
|
+
dots: !1,
|
|
556
|
+
indexes: !1
|
|
557
|
+
}, !1, function(e, t) {
|
|
558
|
+
return !A.isUndefined(t[e]);
|
|
559
|
+
});
|
|
560
|
+
let r = n.metaTokens, i = n.visitor || d, a = n.dots, o = n.indexes, s = n.Blob || typeof Blob < "u" && Blob, c = n.maxDepth === void 0 ? 100 : n.maxDepth, l = s && A.isSpecCompliantForm(t);
|
|
561
|
+
if (!A.isFunction(i)) throw TypeError("visitor must be a function");
|
|
562
|
+
function u(e) {
|
|
563
|
+
if (e === null) return "";
|
|
564
|
+
if (A.isDate(e)) return e.toISOString();
|
|
565
|
+
if (A.isBoolean(e)) return e.toString();
|
|
566
|
+
if (!l && A.isBlob(e)) throw new N("Blob is not supported. Use a Buffer instead.");
|
|
567
|
+
return A.isArrayBuffer(e) || A.isTypedArray(e) ? l && typeof Blob == "function" ? new Blob([e]) : Buffer.from(e) : e;
|
|
568
|
+
}
|
|
569
|
+
function d(e, n, i) {
|
|
570
|
+
let s = e;
|
|
571
|
+
if (A.isReactNative(t) && A.isReactNativeBlob(e)) return t.append(et(i, n, a), u(e)), !1;
|
|
572
|
+
if (e && !i && typeof e == "object") {
|
|
573
|
+
if (A.endsWith(n, "{}")) n = r ? n : n.slice(0, -2), e = JSON.stringify(e);
|
|
574
|
+
else if (A.isArray(e) && tt(e) || (A.isFileList(e) || A.endsWith(n, "[]")) && (s = A.toArray(e))) return n = $e(n), s.forEach(function(e, r) {
|
|
575
|
+
!(A.isUndefined(e) || e === null) && t.append(o === !0 ? et([n], r, a) : o === null ? n : n + "[]", u(e));
|
|
576
|
+
}), !1;
|
|
577
|
+
}
|
|
578
|
+
return Qe(e) ? !0 : (t.append(et(i, n, a), u(e)), !1);
|
|
579
|
+
}
|
|
580
|
+
let f = [], p = Object.assign(nt, {
|
|
581
|
+
defaultVisitor: d,
|
|
582
|
+
convertValue: u,
|
|
583
|
+
isVisitable: Qe
|
|
584
|
+
});
|
|
585
|
+
function m(e, n, r = 0) {
|
|
586
|
+
if (!A.isUndefined(e)) {
|
|
587
|
+
if (r > c) throw new N("Object is too deeply nested (" + r + " levels). Max depth: " + c, N.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
588
|
+
if (f.indexOf(e) !== -1) throw Error("Circular reference detected in " + n.join("."));
|
|
589
|
+
f.push(e), A.forEach(e, function(e, a) {
|
|
590
|
+
(!(A.isUndefined(e) || e === null) && i.call(t, e, A.isString(a) ? a.trim() : a, n, p)) === !0 && m(e, n ? n.concat(a) : [a], r + 1);
|
|
591
|
+
}), f.pop();
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
if (!A.isObject(e)) throw TypeError("data must be an object");
|
|
595
|
+
return m(e), t;
|
|
596
|
+
}
|
|
597
|
+
//#endregion
|
|
598
|
+
//#region node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
599
|
+
function rt(e) {
|
|
600
|
+
let t = {
|
|
601
|
+
"!": "%21",
|
|
602
|
+
"'": "%27",
|
|
603
|
+
"(": "%28",
|
|
604
|
+
")": "%29",
|
|
605
|
+
"~": "%7E",
|
|
606
|
+
"%20": "+"
|
|
607
|
+
};
|
|
608
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20/g, function(e) {
|
|
609
|
+
return t[e];
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
function it(e, t) {
|
|
613
|
+
this._pairs = [], e && P(e, this, t);
|
|
614
|
+
}
|
|
615
|
+
var at = it.prototype;
|
|
616
|
+
at.append = function(e, t) {
|
|
617
|
+
this._pairs.push([e, t]);
|
|
618
|
+
}, at.toString = function(e) {
|
|
619
|
+
let t = e ? function(t) {
|
|
620
|
+
return e.call(this, t, rt);
|
|
621
|
+
} : rt;
|
|
622
|
+
return this._pairs.map(function(e) {
|
|
623
|
+
return t(e[0]) + "=" + t(e[1]);
|
|
624
|
+
}, "").join("&");
|
|
625
|
+
};
|
|
626
|
+
//#endregion
|
|
627
|
+
//#region node_modules/axios/lib/helpers/buildURL.js
|
|
628
|
+
function ot(e) {
|
|
629
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
630
|
+
}
|
|
631
|
+
function st(e, t, n) {
|
|
632
|
+
if (!t) return e;
|
|
633
|
+
let r = n && n.encode || ot, i = A.isFunction(n) ? { serialize: n } : n, a = i && i.serialize, o;
|
|
634
|
+
if (o = a ? a(t, i) : A.isURLSearchParams(t) ? t.toString() : new it(t, i).toString(r), o) {
|
|
635
|
+
let t = e.indexOf("#");
|
|
636
|
+
t !== -1 && (e = e.slice(0, t)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
637
|
+
}
|
|
638
|
+
return e;
|
|
639
|
+
}
|
|
640
|
+
//#endregion
|
|
641
|
+
//#region node_modules/axios/lib/core/InterceptorManager.js
|
|
642
|
+
var ct = class {
|
|
643
|
+
constructor() {
|
|
644
|
+
this.handlers = [];
|
|
645
|
+
}
|
|
646
|
+
use(e, t, n) {
|
|
647
|
+
return this.handlers.push({
|
|
648
|
+
fulfilled: e,
|
|
649
|
+
rejected: t,
|
|
650
|
+
synchronous: n ? n.synchronous : !1,
|
|
651
|
+
runWhen: n ? n.runWhen : null
|
|
652
|
+
}), this.handlers.length - 1;
|
|
653
|
+
}
|
|
654
|
+
eject(e) {
|
|
655
|
+
this.handlers[e] && (this.handlers[e] = null);
|
|
656
|
+
}
|
|
657
|
+
clear() {
|
|
658
|
+
this.handlers &&= [];
|
|
659
|
+
}
|
|
660
|
+
forEach(e) {
|
|
661
|
+
A.forEach(this.handlers, function(t) {
|
|
662
|
+
t !== null && e(t);
|
|
663
|
+
});
|
|
664
|
+
}
|
|
665
|
+
}, lt = {
|
|
666
|
+
silentJSONParsing: !0,
|
|
667
|
+
forcedJSONParsing: !0,
|
|
668
|
+
clarifyTimeoutError: !1,
|
|
669
|
+
legacyInterceptorReqResOrdering: !0
|
|
670
|
+
}, ut = {
|
|
671
|
+
isBrowser: !0,
|
|
672
|
+
classes: {
|
|
673
|
+
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : it,
|
|
674
|
+
FormData: typeof FormData < "u" ? FormData : null,
|
|
675
|
+
Blob: typeof Blob < "u" ? Blob : null
|
|
676
|
+
},
|
|
677
|
+
protocols: [
|
|
678
|
+
"http",
|
|
679
|
+
"https",
|
|
680
|
+
"file",
|
|
681
|
+
"blob",
|
|
682
|
+
"url",
|
|
683
|
+
"data"
|
|
684
|
+
]
|
|
685
|
+
}, dt = /* @__PURE__ */ t({
|
|
686
|
+
hasBrowserEnv: () => ft,
|
|
687
|
+
hasStandardBrowserEnv: () => mt,
|
|
688
|
+
hasStandardBrowserWebWorkerEnv: () => ht,
|
|
689
|
+
navigator: () => pt,
|
|
690
|
+
origin: () => gt
|
|
691
|
+
}), ft = typeof window < "u" && typeof document < "u", pt = typeof navigator == "object" && navigator || void 0, mt = ft && (!pt || [
|
|
692
|
+
"ReactNative",
|
|
693
|
+
"NativeScript",
|
|
694
|
+
"NS"
|
|
695
|
+
].indexOf(pt.product) < 0), ht = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", gt = ft && window.location.href || "http://localhost", F = {
|
|
696
|
+
...dt,
|
|
697
|
+
...ut
|
|
698
|
+
};
|
|
699
|
+
//#endregion
|
|
700
|
+
//#region node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
701
|
+
function _t(e, t) {
|
|
702
|
+
return P(e, new F.classes.URLSearchParams(), {
|
|
703
|
+
visitor: function(e, t, n, r) {
|
|
704
|
+
return F.isNode && A.isBuffer(e) ? (this.append(t, e.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments);
|
|
705
|
+
},
|
|
706
|
+
...t
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
//#endregion
|
|
710
|
+
//#region node_modules/axios/lib/helpers/formDataToJSON.js
|
|
711
|
+
function vt(e) {
|
|
712
|
+
return A.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
713
|
+
}
|
|
714
|
+
function yt(e) {
|
|
715
|
+
let t = {}, n = Object.keys(e), r, i = n.length, a;
|
|
716
|
+
for (r = 0; r < i; r++) a = n[r], t[a] = e[a];
|
|
717
|
+
return t;
|
|
718
|
+
}
|
|
719
|
+
function bt(e) {
|
|
720
|
+
function t(e, n, r, i) {
|
|
721
|
+
let a = e[i++];
|
|
722
|
+
if (a === "__proto__") return !0;
|
|
723
|
+
let o = Number.isFinite(+a), s = i >= e.length;
|
|
724
|
+
return a = !a && A.isArray(r) ? r.length : a, s ? (A.hasOwnProp(r, a) ? r[a] = A.isArray(r[a]) ? r[a].concat(n) : [r[a], n] : r[a] = n, !o) : ((!r[a] || !A.isObject(r[a])) && (r[a] = []), t(e, n, r[a], i) && A.isArray(r[a]) && (r[a] = yt(r[a])), !o);
|
|
725
|
+
}
|
|
726
|
+
if (A.isFormData(e) && A.isFunction(e.entries)) {
|
|
727
|
+
let n = {};
|
|
728
|
+
return A.forEachEntry(e, (e, r) => {
|
|
729
|
+
t(vt(e), r, n, 0);
|
|
730
|
+
}), n;
|
|
731
|
+
}
|
|
732
|
+
return null;
|
|
733
|
+
}
|
|
734
|
+
//#endregion
|
|
735
|
+
//#region node_modules/axios/lib/defaults/index.js
|
|
736
|
+
var I = (e, t) => e != null && A.hasOwnProp(e, t) ? e[t] : void 0;
|
|
737
|
+
function xt(e, t, n) {
|
|
738
|
+
if (A.isString(e)) try {
|
|
739
|
+
return (t || JSON.parse)(e), A.trim(e);
|
|
740
|
+
} catch (e) {
|
|
741
|
+
if (e.name !== "SyntaxError") throw e;
|
|
742
|
+
}
|
|
743
|
+
return (n || JSON.stringify)(e);
|
|
744
|
+
}
|
|
745
|
+
var L = {
|
|
746
|
+
transitional: lt,
|
|
747
|
+
adapter: [
|
|
748
|
+
"xhr",
|
|
749
|
+
"http",
|
|
750
|
+
"fetch"
|
|
751
|
+
],
|
|
752
|
+
transformRequest: [function(e, t) {
|
|
753
|
+
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i = A.isObject(e);
|
|
754
|
+
if (i && A.isHTMLForm(e) && (e = new FormData(e)), A.isFormData(e)) return r ? JSON.stringify(bt(e)) : e;
|
|
755
|
+
if (A.isArrayBuffer(e) || A.isBuffer(e) || A.isStream(e) || A.isFile(e) || A.isBlob(e) || A.isReadableStream(e)) return e;
|
|
756
|
+
if (A.isArrayBufferView(e)) return e.buffer;
|
|
757
|
+
if (A.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
758
|
+
let a;
|
|
759
|
+
if (i) {
|
|
760
|
+
let t = I(this, "formSerializer");
|
|
761
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1) return _t(e, t).toString();
|
|
762
|
+
if ((a = A.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
763
|
+
let n = I(this, "env"), r = n && n.FormData;
|
|
764
|
+
return P(a ? { "files[]": e } : e, r && new r(), t);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
return i || r ? (t.setContentType("application/json", !1), xt(e)) : e;
|
|
768
|
+
}],
|
|
769
|
+
transformResponse: [function(e) {
|
|
770
|
+
let t = I(this, "transitional") || L.transitional, n = t && t.forcedJSONParsing, r = I(this, "responseType"), i = r === "json";
|
|
771
|
+
if (A.isResponse(e) || A.isReadableStream(e)) return e;
|
|
772
|
+
if (e && A.isString(e) && (n && !r || i)) {
|
|
773
|
+
let n = !(t && t.silentJSONParsing) && i;
|
|
774
|
+
try {
|
|
775
|
+
return JSON.parse(e, I(this, "parseReviver"));
|
|
776
|
+
} catch (e) {
|
|
777
|
+
if (n) throw e.name === "SyntaxError" ? N.from(e, N.ERR_BAD_RESPONSE, this, null, I(this, "response")) : e;
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
return e;
|
|
781
|
+
}],
|
|
782
|
+
timeout: 0,
|
|
783
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
784
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
785
|
+
maxContentLength: -1,
|
|
786
|
+
maxBodyLength: -1,
|
|
787
|
+
env: {
|
|
788
|
+
FormData: F.classes.FormData,
|
|
789
|
+
Blob: F.classes.Blob
|
|
790
|
+
},
|
|
791
|
+
validateStatus: function(e) {
|
|
792
|
+
return e >= 200 && e < 300;
|
|
793
|
+
},
|
|
794
|
+
headers: { common: {
|
|
795
|
+
Accept: "application/json, text/plain, */*",
|
|
796
|
+
"Content-Type": void 0
|
|
797
|
+
} }
|
|
798
|
+
};
|
|
799
|
+
A.forEach([
|
|
800
|
+
"delete",
|
|
801
|
+
"get",
|
|
802
|
+
"head",
|
|
803
|
+
"post",
|
|
804
|
+
"put",
|
|
805
|
+
"patch",
|
|
806
|
+
"query"
|
|
807
|
+
], (e) => {
|
|
808
|
+
L.headers[e] = {};
|
|
809
|
+
});
|
|
810
|
+
//#endregion
|
|
811
|
+
//#region node_modules/axios/lib/core/transformData.js
|
|
812
|
+
function St(e, t) {
|
|
813
|
+
let n = this || L, r = t || n, i = M.from(r.headers), a = r.data;
|
|
814
|
+
return A.forEach(e, function(e) {
|
|
815
|
+
a = e.call(n, a, i.normalize(), t ? t.status : void 0);
|
|
816
|
+
}), i.normalize(), a;
|
|
817
|
+
}
|
|
818
|
+
//#endregion
|
|
819
|
+
//#region node_modules/axios/lib/cancel/isCancel.js
|
|
820
|
+
function Ct(e) {
|
|
821
|
+
return !!(e && e.__CANCEL__);
|
|
822
|
+
}
|
|
823
|
+
//#endregion
|
|
824
|
+
//#region node_modules/axios/lib/cancel/CanceledError.js
|
|
825
|
+
var R = class extends N {
|
|
826
|
+
constructor(e, t, n) {
|
|
827
|
+
super(e ?? "canceled", N.ERR_CANCELED, t, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
828
|
+
}
|
|
829
|
+
};
|
|
830
|
+
//#endregion
|
|
831
|
+
//#region node_modules/axios/lib/core/settle.js
|
|
832
|
+
function wt(e, t, n) {
|
|
833
|
+
let r = n.config.validateStatus;
|
|
834
|
+
!n.status || !r || r(n.status) ? e(n) : t(new N("Request failed with status code " + n.status, n.status >= 400 && n.status < 500 ? N.ERR_BAD_REQUEST : N.ERR_BAD_RESPONSE, n.config, n.request, n));
|
|
835
|
+
}
|
|
836
|
+
//#endregion
|
|
837
|
+
//#region node_modules/axios/lib/helpers/parseProtocol.js
|
|
838
|
+
function Tt(e) {
|
|
839
|
+
let t = /^([-+\w]{1,25}):(?:\/\/)?/.exec(e);
|
|
840
|
+
return t && t[1] || "";
|
|
841
|
+
}
|
|
842
|
+
//#endregion
|
|
843
|
+
//#region node_modules/axios/lib/helpers/speedometer.js
|
|
844
|
+
function Et(e, t) {
|
|
845
|
+
e ||= 10;
|
|
846
|
+
let n = Array(e), r = Array(e), i = 0, a = 0, o;
|
|
847
|
+
return t = t === void 0 ? 1e3 : t, function(s) {
|
|
848
|
+
let c = Date.now(), l = r[a];
|
|
849
|
+
o ||= c, n[i] = s, r[i] = c;
|
|
850
|
+
let u = a, d = 0;
|
|
851
|
+
for (; u !== i;) d += n[u++], u %= e;
|
|
852
|
+
if (i = (i + 1) % e, i === a && (a = (a + 1) % e), c - o < t) return;
|
|
853
|
+
let f = l && c - l;
|
|
854
|
+
return f ? Math.round(d * 1e3 / f) : void 0;
|
|
855
|
+
};
|
|
856
|
+
}
|
|
857
|
+
//#endregion
|
|
858
|
+
//#region node_modules/axios/lib/helpers/throttle.js
|
|
859
|
+
function Dt(e, t) {
|
|
860
|
+
let n = 0, r = 1e3 / t, i, a, o = (t, r = Date.now()) => {
|
|
861
|
+
n = r, i = null, a &&= (clearTimeout(a), null), e(...t);
|
|
862
|
+
};
|
|
863
|
+
return [(...e) => {
|
|
864
|
+
let t = Date.now(), s = t - n;
|
|
865
|
+
s >= r ? o(e, t) : (i = e, a ||= setTimeout(() => {
|
|
866
|
+
a = null, o(i);
|
|
867
|
+
}, r - s));
|
|
868
|
+
}, () => i && o(i)];
|
|
869
|
+
}
|
|
870
|
+
//#endregion
|
|
871
|
+
//#region node_modules/axios/lib/helpers/progressEventReducer.js
|
|
872
|
+
var z = (e, t, n = 3) => {
|
|
873
|
+
let r = 0, i = Et(50, 250);
|
|
874
|
+
return Dt((n) => {
|
|
875
|
+
let a = n.loaded, o = n.lengthComputable ? n.total : void 0, s = o == null ? a : Math.min(a, o), c = Math.max(0, s - r), l = i(c);
|
|
876
|
+
r = Math.max(r, s), e({
|
|
877
|
+
loaded: s,
|
|
878
|
+
total: o,
|
|
879
|
+
progress: o ? s / o : void 0,
|
|
880
|
+
bytes: c,
|
|
881
|
+
rate: l || void 0,
|
|
882
|
+
estimated: l && o ? (o - s) / l : void 0,
|
|
883
|
+
event: n,
|
|
884
|
+
lengthComputable: o != null,
|
|
885
|
+
[t ? "download" : "upload"]: !0
|
|
886
|
+
});
|
|
887
|
+
}, n);
|
|
888
|
+
}, Ot = (e, t) => {
|
|
889
|
+
let n = e != null;
|
|
890
|
+
return [(r) => t[0]({
|
|
891
|
+
lengthComputable: n,
|
|
892
|
+
total: e,
|
|
893
|
+
loaded: r
|
|
894
|
+
}), t[1]];
|
|
895
|
+
}, kt = (e) => (...t) => A.asap(() => e(...t)), At = F.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, F.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(new URL(F.origin), F.navigator && /(msie|trident)/i.test(F.navigator.userAgent)) : () => !0, jt = F.hasStandardBrowserEnv ? {
|
|
896
|
+
write(e, t, n, r, i, a, o) {
|
|
897
|
+
if (typeof document > "u") return;
|
|
898
|
+
let s = [`${e}=${encodeURIComponent(t)}`];
|
|
899
|
+
A.isNumber(n) && s.push(`expires=${new Date(n).toUTCString()}`), A.isString(r) && s.push(`path=${r}`), A.isString(i) && s.push(`domain=${i}`), a === !0 && s.push("secure"), A.isString(o) && s.push(`SameSite=${o}`), document.cookie = s.join("; ");
|
|
900
|
+
},
|
|
901
|
+
read(e) {
|
|
902
|
+
if (typeof document > "u") return null;
|
|
903
|
+
let t = document.cookie.split(";");
|
|
904
|
+
for (let n = 0; n < t.length; n++) {
|
|
905
|
+
let r = t[n].replace(/^\s+/, ""), i = r.indexOf("=");
|
|
906
|
+
if (i !== -1 && r.slice(0, i) === e) return decodeURIComponent(r.slice(i + 1));
|
|
907
|
+
}
|
|
908
|
+
return null;
|
|
909
|
+
},
|
|
910
|
+
remove(e) {
|
|
911
|
+
this.write(e, "", Date.now() - 864e5, "/");
|
|
912
|
+
}
|
|
913
|
+
} : {
|
|
914
|
+
write() {},
|
|
915
|
+
read() {
|
|
916
|
+
return null;
|
|
917
|
+
},
|
|
918
|
+
remove() {}
|
|
919
|
+
};
|
|
920
|
+
//#endregion
|
|
921
|
+
//#region node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
922
|
+
function Mt(e) {
|
|
923
|
+
return typeof e == "string" ? /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) : !1;
|
|
924
|
+
}
|
|
925
|
+
//#endregion
|
|
926
|
+
//#region node_modules/axios/lib/helpers/combineURLs.js
|
|
927
|
+
function Nt(e, t) {
|
|
928
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
929
|
+
}
|
|
930
|
+
//#endregion
|
|
931
|
+
//#region node_modules/axios/lib/core/buildFullPath.js
|
|
932
|
+
function Pt(e, t, n) {
|
|
933
|
+
let r = !Mt(t);
|
|
934
|
+
return e && (r || n === !1) ? Nt(e, t) : t;
|
|
935
|
+
}
|
|
936
|
+
//#endregion
|
|
937
|
+
//#region node_modules/axios/lib/core/mergeConfig.js
|
|
938
|
+
var Ft = (e) => e instanceof M ? { ...e } : e;
|
|
939
|
+
function B(e, t) {
|
|
940
|
+
t ||= {};
|
|
941
|
+
let n = Object.create(null);
|
|
942
|
+
Object.defineProperty(n, "hasOwnProperty", {
|
|
943
|
+
__proto__: null,
|
|
944
|
+
value: Object.prototype.hasOwnProperty,
|
|
945
|
+
enumerable: !1,
|
|
946
|
+
writable: !0,
|
|
947
|
+
configurable: !0
|
|
948
|
+
});
|
|
949
|
+
function r(e, t, n, r) {
|
|
950
|
+
return A.isPlainObject(e) && A.isPlainObject(t) ? A.merge.call({ caseless: r }, e, t) : A.isPlainObject(t) ? A.merge({}, t) : A.isArray(t) ? t.slice() : t;
|
|
951
|
+
}
|
|
952
|
+
function i(e, t, n, i) {
|
|
953
|
+
if (!A.isUndefined(t)) return r(e, t, n, i);
|
|
954
|
+
if (!A.isUndefined(e)) return r(void 0, e, n, i);
|
|
955
|
+
}
|
|
956
|
+
function a(e, t) {
|
|
957
|
+
if (!A.isUndefined(t)) return r(void 0, t);
|
|
958
|
+
}
|
|
959
|
+
function o(e, t) {
|
|
960
|
+
if (!A.isUndefined(t)) return r(void 0, t);
|
|
961
|
+
if (!A.isUndefined(e)) return r(void 0, e);
|
|
962
|
+
}
|
|
963
|
+
function s(n, i, a) {
|
|
964
|
+
if (A.hasOwnProp(t, a)) return r(n, i);
|
|
965
|
+
if (A.hasOwnProp(e, a)) return r(void 0, n);
|
|
966
|
+
}
|
|
967
|
+
let c = {
|
|
968
|
+
url: a,
|
|
969
|
+
method: a,
|
|
970
|
+
data: a,
|
|
971
|
+
baseURL: o,
|
|
972
|
+
transformRequest: o,
|
|
973
|
+
transformResponse: o,
|
|
974
|
+
paramsSerializer: o,
|
|
975
|
+
timeout: o,
|
|
976
|
+
timeoutMessage: o,
|
|
977
|
+
withCredentials: o,
|
|
978
|
+
withXSRFToken: o,
|
|
979
|
+
adapter: o,
|
|
980
|
+
responseType: o,
|
|
981
|
+
xsrfCookieName: o,
|
|
982
|
+
xsrfHeaderName: o,
|
|
983
|
+
onUploadProgress: o,
|
|
984
|
+
onDownloadProgress: o,
|
|
985
|
+
decompress: o,
|
|
986
|
+
maxContentLength: o,
|
|
987
|
+
maxBodyLength: o,
|
|
988
|
+
beforeRedirect: o,
|
|
989
|
+
transport: o,
|
|
990
|
+
httpAgent: o,
|
|
991
|
+
httpsAgent: o,
|
|
992
|
+
cancelToken: o,
|
|
993
|
+
socketPath: o,
|
|
994
|
+
allowedSocketPaths: o,
|
|
995
|
+
responseEncoding: o,
|
|
996
|
+
validateStatus: s,
|
|
997
|
+
headers: (e, t, n) => i(Ft(e), Ft(t), n, !0)
|
|
998
|
+
};
|
|
999
|
+
return A.forEach(Object.keys({
|
|
1000
|
+
...e,
|
|
1001
|
+
...t
|
|
1002
|
+
}), function(r) {
|
|
1003
|
+
if (r === "__proto__" || r === "constructor" || r === "prototype") return;
|
|
1004
|
+
let a = A.hasOwnProp(c, r) ? c[r] : i, o = a(A.hasOwnProp(e, r) ? e[r] : void 0, A.hasOwnProp(t, r) ? t[r] : void 0, r);
|
|
1005
|
+
A.isUndefined(o) && a !== s || (n[r] = o);
|
|
1006
|
+
}), n;
|
|
1007
|
+
}
|
|
1008
|
+
//#endregion
|
|
1009
|
+
//#region node_modules/axios/lib/helpers/resolveConfig.js
|
|
1010
|
+
var It = ["content-type", "content-length"];
|
|
1011
|
+
function Lt(e, t, n) {
|
|
1012
|
+
if (n !== "content-only") {
|
|
1013
|
+
e.set(t);
|
|
1014
|
+
return;
|
|
1015
|
+
}
|
|
1016
|
+
Object.entries(t).forEach(([t, n]) => {
|
|
1017
|
+
It.includes(t.toLowerCase()) && e.set(t, n);
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
var Rt = (e) => encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi, (e, t) => String.fromCharCode(parseInt(t, 16))), zt = (e) => {
|
|
1021
|
+
let t = B({}, e), n = (e) => A.hasOwnProp(t, e) ? t[e] : void 0, r = n("data"), i = n("withXSRFToken"), a = n("xsrfHeaderName"), o = n("xsrfCookieName"), s = n("headers"), c = n("auth"), l = n("baseURL"), u = n("allowAbsoluteUrls"), d = n("url");
|
|
1022
|
+
if (t.headers = s = M.from(s), t.url = st(Pt(l, d, u), e.params, e.paramsSerializer), c && s.set("Authorization", "Basic " + btoa((c.username || "") + ":" + (c.password ? Rt(c.password) : ""))), A.isFormData(r) && (F.hasStandardBrowserEnv || F.hasStandardBrowserWebWorkerEnv ? s.setContentType(void 0) : A.isFunction(r.getHeaders) && Lt(s, r.getHeaders(), n("formDataHeaderPolicy"))), F.hasStandardBrowserEnv && (A.isFunction(i) && (i = i(t)), i === !0 || i == null && At(t.url))) {
|
|
1023
|
+
let e = a && o && jt.read(o);
|
|
1024
|
+
e && s.set(a, e);
|
|
1025
|
+
}
|
|
1026
|
+
return t;
|
|
1027
|
+
}, Bt = typeof XMLHttpRequest < "u" && function(e) {
|
|
1028
|
+
return new Promise(function(t, n) {
|
|
1029
|
+
let r = zt(e), i = r.data, a = M.from(r.headers).normalize(), { responseType: o, onUploadProgress: s, onDownloadProgress: c } = r, l, u, d, f, p;
|
|
1030
|
+
function m() {
|
|
1031
|
+
f && f(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1032
|
+
}
|
|
1033
|
+
let h = new XMLHttpRequest();
|
|
1034
|
+
h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
|
|
1035
|
+
function g() {
|
|
1036
|
+
if (!h) return;
|
|
1037
|
+
let r = M.from("getAllResponseHeaders" in h && h.getAllResponseHeaders());
|
|
1038
|
+
wt(function(e) {
|
|
1039
|
+
t(e), m();
|
|
1040
|
+
}, function(e) {
|
|
1041
|
+
n(e), m();
|
|
1042
|
+
}, {
|
|
1043
|
+
data: !o || o === "text" || o === "json" ? h.responseText : h.response,
|
|
1044
|
+
status: h.status,
|
|
1045
|
+
statusText: h.statusText,
|
|
1046
|
+
headers: r,
|
|
1047
|
+
config: e,
|
|
1048
|
+
request: h
|
|
1049
|
+
}), h = null;
|
|
1050
|
+
}
|
|
1051
|
+
"onloadend" in h ? h.onloadend = g : h.onreadystatechange = function() {
|
|
1052
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.startsWith("file:")) || setTimeout(g);
|
|
1053
|
+
}, h.onabort = function() {
|
|
1054
|
+
h &&= (n(new N("Request aborted", N.ECONNABORTED, e, h)), m(), null);
|
|
1055
|
+
}, h.onerror = function(t) {
|
|
1056
|
+
let r = new N(t && t.message ? t.message : "Network Error", N.ERR_NETWORK, e, h);
|
|
1057
|
+
r.event = t || null, n(r), m(), h = null;
|
|
1058
|
+
}, h.ontimeout = function() {
|
|
1059
|
+
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional || lt;
|
|
1060
|
+
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new N(t, i.clarifyTimeoutError ? N.ETIMEDOUT : N.ECONNABORTED, e, h)), m(), h = null;
|
|
1061
|
+
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h && A.forEach(a.toJSON(), function(e, t) {
|
|
1062
|
+
h.setRequestHeader(t, e);
|
|
1063
|
+
}), A.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), o && o !== "json" && (h.responseType = r.responseType), c && ([d, p] = z(c, !0), h.addEventListener("progress", d)), s && h.upload && ([u, f] = z(s), h.upload.addEventListener("progress", u), h.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (l = (t) => {
|
|
1064
|
+
h &&= (n(!t || t.type ? new R(null, e, h) : t), h.abort(), m(), null);
|
|
1065
|
+
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1066
|
+
let _ = Tt(r.url);
|
|
1067
|
+
if (_ && !F.protocols.includes(_)) {
|
|
1068
|
+
n(new N("Unsupported protocol " + _ + ":", N.ERR_BAD_REQUEST, e));
|
|
1069
|
+
return;
|
|
1070
|
+
}
|
|
1071
|
+
h.send(i || null);
|
|
1072
|
+
});
|
|
1073
|
+
}, Vt = (e, t) => {
|
|
1074
|
+
let { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1075
|
+
if (t || n) {
|
|
1076
|
+
let n = new AbortController(), r, i = function(e) {
|
|
1077
|
+
if (!r) {
|
|
1078
|
+
r = !0, o();
|
|
1079
|
+
let t = e instanceof Error ? e : this.reason;
|
|
1080
|
+
n.abort(t instanceof N ? t : new R(t instanceof Error ? t.message : t));
|
|
1081
|
+
}
|
|
1082
|
+
}, a = t && setTimeout(() => {
|
|
1083
|
+
a = null, i(new N(`timeout of ${t}ms exceeded`, N.ETIMEDOUT));
|
|
1084
|
+
}, t), o = () => {
|
|
1085
|
+
e &&= (a && clearTimeout(a), a = null, e.forEach((e) => {
|
|
1086
|
+
e.unsubscribe ? e.unsubscribe(i) : e.removeEventListener("abort", i);
|
|
1087
|
+
}), null);
|
|
1088
|
+
};
|
|
1089
|
+
e.forEach((e) => e.addEventListener("abort", i));
|
|
1090
|
+
let { signal: s } = n;
|
|
1091
|
+
return s.unsubscribe = () => A.asap(o), s;
|
|
1092
|
+
}
|
|
1093
|
+
}, Ht = function* (e, t) {
|
|
1094
|
+
let n = e.byteLength;
|
|
1095
|
+
if (!t || n < t) {
|
|
1096
|
+
yield e;
|
|
1097
|
+
return;
|
|
1098
|
+
}
|
|
1099
|
+
let r = 0, i;
|
|
1100
|
+
for (; r < n;) i = r + t, yield e.slice(r, i), r = i;
|
|
1101
|
+
}, Ut = async function* (e, t) {
|
|
1102
|
+
for await (let n of Wt(e)) yield* Ht(n, t);
|
|
1103
|
+
}, Wt = async function* (e) {
|
|
1104
|
+
if (e[Symbol.asyncIterator]) {
|
|
1105
|
+
yield* e;
|
|
1106
|
+
return;
|
|
1107
|
+
}
|
|
1108
|
+
let t = e.getReader();
|
|
1109
|
+
try {
|
|
1110
|
+
for (;;) {
|
|
1111
|
+
let { done: e, value: n } = await t.read();
|
|
1112
|
+
if (e) break;
|
|
1113
|
+
yield n;
|
|
1114
|
+
}
|
|
1115
|
+
} finally {
|
|
1116
|
+
await t.cancel();
|
|
1117
|
+
}
|
|
1118
|
+
}, Gt = (e, t, n, r) => {
|
|
1119
|
+
let i = Ut(e, t), a = 0, o, s = (e) => {
|
|
1120
|
+
o || (o = !0, r && r(e));
|
|
1121
|
+
};
|
|
1122
|
+
return new ReadableStream({
|
|
1123
|
+
async pull(e) {
|
|
1124
|
+
try {
|
|
1125
|
+
let { done: t, value: r } = await i.next();
|
|
1126
|
+
if (t) {
|
|
1127
|
+
s(), e.close();
|
|
1128
|
+
return;
|
|
1129
|
+
}
|
|
1130
|
+
let o = r.byteLength;
|
|
1131
|
+
n && n(a += o), e.enqueue(new Uint8Array(r));
|
|
1132
|
+
} catch (e) {
|
|
1133
|
+
throw s(e), e;
|
|
1134
|
+
}
|
|
1135
|
+
},
|
|
1136
|
+
cancel(e) {
|
|
1137
|
+
return s(e), i.return();
|
|
1138
|
+
}
|
|
1139
|
+
}, { highWaterMark: 2 });
|
|
1140
|
+
};
|
|
1141
|
+
//#endregion
|
|
1142
|
+
//#region node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
|
|
1143
|
+
function Kt(e) {
|
|
1144
|
+
if (!e || typeof e != "string" || !e.startsWith("data:")) return 0;
|
|
1145
|
+
let t = e.indexOf(",");
|
|
1146
|
+
if (t < 0) return 0;
|
|
1147
|
+
let n = e.slice(5, t), r = e.slice(t + 1);
|
|
1148
|
+
if (/;base64/i.test(n)) {
|
|
1149
|
+
let e = r.length, t = r.length;
|
|
1150
|
+
for (let n = 0; n < t; n++) if (r.charCodeAt(n) === 37 && n + 2 < t) {
|
|
1151
|
+
let t = r.charCodeAt(n + 1), i = r.charCodeAt(n + 2);
|
|
1152
|
+
(t >= 48 && t <= 57 || t >= 65 && t <= 70 || t >= 97 && t <= 102) && (i >= 48 && i <= 57 || i >= 65 && i <= 70 || i >= 97 && i <= 102) && (e -= 2, n += 2);
|
|
1153
|
+
}
|
|
1154
|
+
let n = 0, i = t - 1, a = (e) => e >= 2 && r.charCodeAt(e - 2) === 37 && r.charCodeAt(e - 1) === 51 && (r.charCodeAt(e) === 68 || r.charCodeAt(e) === 100);
|
|
1155
|
+
i >= 0 && (r.charCodeAt(i) === 61 ? (n++, i--) : a(i) && (n++, i -= 3)), n === 1 && i >= 0 && (r.charCodeAt(i) === 61 || a(i)) && n++;
|
|
1156
|
+
let o = Math.floor(e / 4) * 3 - (n || 0);
|
|
1157
|
+
return o > 0 ? o : 0;
|
|
1158
|
+
}
|
|
1159
|
+
if (typeof Buffer < "u" && typeof Buffer.byteLength == "function") return Buffer.byteLength(r, "utf8");
|
|
1160
|
+
let i = 0;
|
|
1161
|
+
for (let e = 0, t = r.length; e < t; e++) {
|
|
1162
|
+
let n = r.charCodeAt(e);
|
|
1163
|
+
if (n < 128) i += 1;
|
|
1164
|
+
else if (n < 2048) i += 2;
|
|
1165
|
+
else if (n >= 55296 && n <= 56319 && e + 1 < t) {
|
|
1166
|
+
let t = r.charCodeAt(e + 1);
|
|
1167
|
+
t >= 56320 && t <= 57343 ? (i += 4, e++) : i += 3;
|
|
1168
|
+
} else i += 3;
|
|
1169
|
+
}
|
|
1170
|
+
return i;
|
|
1171
|
+
}
|
|
1172
|
+
//#endregion
|
|
1173
|
+
//#region node_modules/axios/lib/env/data.js
|
|
1174
|
+
var qt = "1.16.0", Jt = 64 * 1024, { isFunction: V } = A, Yt = (e, ...t) => {
|
|
1175
|
+
try {
|
|
1176
|
+
return !!e(...t);
|
|
1177
|
+
} catch {
|
|
1178
|
+
return !1;
|
|
1179
|
+
}
|
|
1180
|
+
}, Xt = (e) => {
|
|
1181
|
+
let t = A.global ?? globalThis, { ReadableStream: n, TextEncoder: r } = t;
|
|
1182
|
+
e = A.merge.call({ skipUndefined: !0 }, {
|
|
1183
|
+
Request: t.Request,
|
|
1184
|
+
Response: t.Response
|
|
1185
|
+
}, e);
|
|
1186
|
+
let { fetch: i, Request: a, Response: o } = e, s = i ? V(i) : typeof fetch == "function", c = V(a), l = V(o);
|
|
1187
|
+
if (!s) return !1;
|
|
1188
|
+
let u = s && V(n), d = s && (typeof r == "function" ? ((e) => (t) => e.encode(t))(new r()) : async (e) => new Uint8Array(await new a(e).arrayBuffer())), f = c && u && Yt(() => {
|
|
1189
|
+
let e = !1, t = new a(F.origin, {
|
|
1190
|
+
body: new n(),
|
|
1191
|
+
method: "POST",
|
|
1192
|
+
get duplex() {
|
|
1193
|
+
return e = !0, "half";
|
|
1194
|
+
}
|
|
1195
|
+
}), r = t.headers.has("Content-Type");
|
|
1196
|
+
return t.body != null && t.body.cancel(), e && !r;
|
|
1197
|
+
}), p = l && u && Yt(() => A.isReadableStream(new o("").body)), m = { stream: p && ((e) => e.body) };
|
|
1198
|
+
s && [
|
|
1199
|
+
"text",
|
|
1200
|
+
"arrayBuffer",
|
|
1201
|
+
"blob",
|
|
1202
|
+
"formData",
|
|
1203
|
+
"stream"
|
|
1204
|
+
].forEach((e) => {
|
|
1205
|
+
!m[e] && (m[e] = (t, n) => {
|
|
1206
|
+
let r = t && t[e];
|
|
1207
|
+
if (r) return r.call(t);
|
|
1208
|
+
throw new N(`Response type '${e}' is not supported`, N.ERR_NOT_SUPPORT, n);
|
|
1209
|
+
});
|
|
1210
|
+
});
|
|
1211
|
+
let h = async (e) => {
|
|
1212
|
+
if (e == null) return 0;
|
|
1213
|
+
if (A.isBlob(e)) return e.size;
|
|
1214
|
+
if (A.isSpecCompliantForm(e)) return (await new a(F.origin, {
|
|
1215
|
+
method: "POST",
|
|
1216
|
+
body: e
|
|
1217
|
+
}).arrayBuffer()).byteLength;
|
|
1218
|
+
if (A.isArrayBufferView(e) || A.isArrayBuffer(e)) return e.byteLength;
|
|
1219
|
+
if (A.isURLSearchParams(e) && (e += ""), A.isString(e)) return (await d(e)).byteLength;
|
|
1220
|
+
}, g = async (e, t) => A.toFiniteNumber(e.getContentLength()) ?? h(t);
|
|
1221
|
+
return async (e) => {
|
|
1222
|
+
let { url: t, method: n, data: s, signal: l, cancelToken: u, timeout: d, onDownloadProgress: h, onUploadProgress: _, responseType: v, headers: y, withCredentials: b = "same-origin", fetchOptions: ee, maxContentLength: x, maxBodyLength: te } = zt(e), S = A.isNumber(x) && x > -1, ne = A.isNumber(te) && te > -1, re = i || fetch;
|
|
1223
|
+
v = v ? (v + "").toLowerCase() : "text";
|
|
1224
|
+
let C = Vt([l, u && u.toAbortSignal()], d), w = null, T = C && C.unsubscribe && (() => {
|
|
1225
|
+
C.unsubscribe();
|
|
1226
|
+
}), E;
|
|
1227
|
+
try {
|
|
1228
|
+
if (S && typeof t == "string" && t.startsWith("data:") && Kt(t) > x) throw new N("maxContentLength size of " + x + " exceeded", N.ERR_BAD_RESPONSE, e, w);
|
|
1229
|
+
if (ne && n !== "get" && n !== "head") {
|
|
1230
|
+
let t = await g(y, s);
|
|
1231
|
+
if (typeof t == "number" && isFinite(t) && t > te) throw new N("Request body larger than maxBodyLength limit", N.ERR_BAD_REQUEST, e, w);
|
|
1232
|
+
}
|
|
1233
|
+
if (_ && f && n !== "get" && n !== "head" && (E = await g(y, s)) !== 0) {
|
|
1234
|
+
let e = new a(t, {
|
|
1235
|
+
method: "POST",
|
|
1236
|
+
body: s,
|
|
1237
|
+
duplex: "half"
|
|
1238
|
+
}), n;
|
|
1239
|
+
if (A.isFormData(s) && (n = e.headers.get("content-type")) && y.setContentType(n), e.body) {
|
|
1240
|
+
let [t, n] = Ot(E, z(kt(_)));
|
|
1241
|
+
s = Gt(e.body, Jt, t, n);
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
A.isString(b) || (b = b ? "include" : "omit");
|
|
1245
|
+
let i = c && "credentials" in a.prototype;
|
|
1246
|
+
if (A.isFormData(s)) {
|
|
1247
|
+
let e = y.getContentType();
|
|
1248
|
+
e && /^multipart\/form-data/i.test(e) && !/boundary=/i.test(e) && y.delete("content-type");
|
|
1249
|
+
}
|
|
1250
|
+
y.set("User-Agent", "axios/" + qt, !1);
|
|
1251
|
+
let l = {
|
|
1252
|
+
...ee,
|
|
1253
|
+
signal: C,
|
|
1254
|
+
method: n.toUpperCase(),
|
|
1255
|
+
headers: y.normalize().toJSON(),
|
|
1256
|
+
body: s,
|
|
1257
|
+
duplex: "half",
|
|
1258
|
+
credentials: i ? b : void 0
|
|
1259
|
+
};
|
|
1260
|
+
w = c && new a(t, l);
|
|
1261
|
+
let u = await (c ? re(w, ee) : re(t, l));
|
|
1262
|
+
if (S) {
|
|
1263
|
+
let t = A.toFiniteNumber(u.headers.get("content-length"));
|
|
1264
|
+
if (t != null && t > x) throw new N("maxContentLength size of " + x + " exceeded", N.ERR_BAD_RESPONSE, e, w);
|
|
1265
|
+
}
|
|
1266
|
+
let d = p && (v === "stream" || v === "response");
|
|
1267
|
+
if (p && u.body && (h || S || d && T)) {
|
|
1268
|
+
let t = {};
|
|
1269
|
+
[
|
|
1270
|
+
"status",
|
|
1271
|
+
"statusText",
|
|
1272
|
+
"headers"
|
|
1273
|
+
].forEach((e) => {
|
|
1274
|
+
t[e] = u[e];
|
|
1275
|
+
});
|
|
1276
|
+
let n = A.toFiniteNumber(u.headers.get("content-length")), [r, i] = h && Ot(n, z(kt(h), !0)) || [], a = 0;
|
|
1277
|
+
u = new o(Gt(u.body, Jt, (t) => {
|
|
1278
|
+
if (S && (a = t, a > x)) throw new N("maxContentLength size of " + x + " exceeded", N.ERR_BAD_RESPONSE, e, w);
|
|
1279
|
+
r && r(t);
|
|
1280
|
+
}, () => {
|
|
1281
|
+
i && i(), T && T();
|
|
1282
|
+
}), t);
|
|
1283
|
+
}
|
|
1284
|
+
v ||= "text";
|
|
1285
|
+
let D = await m[A.findKey(m, v) || "text"](u, e);
|
|
1286
|
+
if (S && !p && !d) {
|
|
1287
|
+
let t;
|
|
1288
|
+
if (D != null && (typeof D.byteLength == "number" ? t = D.byteLength : typeof D.size == "number" ? t = D.size : typeof D == "string" && (t = typeof r == "function" ? new r().encode(D).byteLength : D.length)), typeof t == "number" && t > x) throw new N("maxContentLength size of " + x + " exceeded", N.ERR_BAD_RESPONSE, e, w);
|
|
1289
|
+
}
|
|
1290
|
+
return !d && T && T(), await new Promise((t, n) => {
|
|
1291
|
+
wt(t, n, {
|
|
1292
|
+
data: D,
|
|
1293
|
+
headers: M.from(u.headers),
|
|
1294
|
+
status: u.status,
|
|
1295
|
+
statusText: u.statusText,
|
|
1296
|
+
config: e,
|
|
1297
|
+
request: w
|
|
1298
|
+
});
|
|
1299
|
+
});
|
|
1300
|
+
} catch (t) {
|
|
1301
|
+
if (T && T(), C && C.aborted && C.reason instanceof N) {
|
|
1302
|
+
let n = C.reason;
|
|
1303
|
+
throw n.config = e, w && (n.request = w), t !== n && (n.cause = t), n;
|
|
1304
|
+
}
|
|
1305
|
+
throw t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new N("Network Error", N.ERR_NETWORK, e, w, t && t.response), { cause: t.cause || t }) : N.from(t, t && t.code, e, w, t && t.response);
|
|
1306
|
+
}
|
|
1307
|
+
};
|
|
1308
|
+
}, Zt = /* @__PURE__ */ new Map(), Qt = (e) => {
|
|
1309
|
+
let t = e && e.env || {}, { fetch: n, Request: r, Response: i } = t, a = [
|
|
1310
|
+
r,
|
|
1311
|
+
i,
|
|
1312
|
+
n
|
|
1313
|
+
], o = a.length, s, c, l = Zt;
|
|
1314
|
+
for (; o--;) s = a[o], c = l.get(s), c === void 0 && l.set(s, c = o ? /* @__PURE__ */ new Map() : Xt(t)), l = c;
|
|
1315
|
+
return c;
|
|
1316
|
+
};
|
|
1317
|
+
Qt();
|
|
1318
|
+
//#endregion
|
|
1319
|
+
//#region node_modules/axios/lib/adapters/adapters.js
|
|
1320
|
+
var $t = {
|
|
1321
|
+
http: null,
|
|
1322
|
+
xhr: Bt,
|
|
1323
|
+
fetch: { get: Qt }
|
|
1324
|
+
};
|
|
1325
|
+
A.forEach($t, (e, t) => {
|
|
1326
|
+
if (e) {
|
|
1327
|
+
try {
|
|
1328
|
+
Object.defineProperty(e, "name", {
|
|
1329
|
+
__proto__: null,
|
|
1330
|
+
value: t
|
|
1331
|
+
});
|
|
1332
|
+
} catch {}
|
|
1333
|
+
Object.defineProperty(e, "adapterName", {
|
|
1334
|
+
__proto__: null,
|
|
1335
|
+
value: t
|
|
1336
|
+
});
|
|
1337
|
+
}
|
|
1338
|
+
});
|
|
1339
|
+
var en = (e) => `- ${e}`, tn = (e) => A.isFunction(e) || e === null || e === !1;
|
|
1340
|
+
function nn(e, t) {
|
|
1341
|
+
e = A.isArray(e) ? e : [e];
|
|
1342
|
+
let { length: n } = e, r, i, a = {};
|
|
1343
|
+
for (let o = 0; o < n; o++) {
|
|
1344
|
+
r = e[o];
|
|
1345
|
+
let n;
|
|
1346
|
+
if (i = r, !tn(r) && (i = $t[(n = String(r)).toLowerCase()], i === void 0)) throw new N(`Unknown adapter '${n}'`);
|
|
1347
|
+
if (i && (A.isFunction(i) || (i = i.get(t)))) break;
|
|
1348
|
+
a[n || "#" + o] = i;
|
|
1349
|
+
}
|
|
1350
|
+
if (!i) {
|
|
1351
|
+
let e = Object.entries(a).map(([e, t]) => `adapter ${e} ` + (t === !1 ? "is not supported by the environment" : "is not available in the build"));
|
|
1352
|
+
throw new N("There is no suitable adapter to dispatch the request " + (n ? e.length > 1 ? "since :\n" + e.map(en).join("\n") : " " + en(e[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
|
|
1353
|
+
}
|
|
1354
|
+
return i;
|
|
1355
|
+
}
|
|
1356
|
+
var rn = {
|
|
1357
|
+
getAdapter: nn,
|
|
1358
|
+
adapters: $t
|
|
1359
|
+
};
|
|
1360
|
+
//#endregion
|
|
1361
|
+
//#region node_modules/axios/lib/core/dispatchRequest.js
|
|
1362
|
+
function an(e) {
|
|
1363
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new R(null, e);
|
|
1364
|
+
}
|
|
1365
|
+
function on(e) {
|
|
1366
|
+
return an(e), e.headers = M.from(e.headers), e.data = St.call(e, e.transformRequest), [
|
|
1367
|
+
"post",
|
|
1368
|
+
"put",
|
|
1369
|
+
"patch"
|
|
1370
|
+
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), rn.getAdapter(e.adapter || L.adapter, e)(e).then(function(t) {
|
|
1371
|
+
an(e), e.response = t;
|
|
1372
|
+
try {
|
|
1373
|
+
t.data = St.call(e, e.transformResponse, t);
|
|
1374
|
+
} finally {
|
|
1375
|
+
delete e.response;
|
|
1376
|
+
}
|
|
1377
|
+
return t.headers = M.from(t.headers), t;
|
|
1378
|
+
}, function(t) {
|
|
1379
|
+
if (!Ct(t) && (an(e), t && t.response)) {
|
|
1380
|
+
e.response = t.response;
|
|
1381
|
+
try {
|
|
1382
|
+
t.response.data = St.call(e, e.transformResponse, t.response);
|
|
1383
|
+
} finally {
|
|
1384
|
+
delete e.response;
|
|
1385
|
+
}
|
|
1386
|
+
t.response.headers = M.from(t.response.headers);
|
|
1387
|
+
}
|
|
1388
|
+
return Promise.reject(t);
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
//#endregion
|
|
1392
|
+
//#region node_modules/axios/lib/helpers/validator.js
|
|
1393
|
+
var H = {};
|
|
1394
|
+
[
|
|
1395
|
+
"object",
|
|
1396
|
+
"boolean",
|
|
1397
|
+
"number",
|
|
1398
|
+
"function",
|
|
1399
|
+
"string",
|
|
1400
|
+
"symbol"
|
|
1401
|
+
].forEach((e, t) => {
|
|
1402
|
+
H[e] = function(n) {
|
|
1403
|
+
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1404
|
+
};
|
|
1405
|
+
});
|
|
1406
|
+
var sn = {};
|
|
1407
|
+
H.transitional = function(e, t, n) {
|
|
1408
|
+
function r(e, t) {
|
|
1409
|
+
return "[Axios v" + qt + "] Transitional option '" + e + "'" + t + (n ? ". " + n : "");
|
|
1410
|
+
}
|
|
1411
|
+
return (n, i, a) => {
|
|
1412
|
+
if (e === !1) throw new N(r(i, " has been removed" + (t ? " in " + t : "")), N.ERR_DEPRECATED);
|
|
1413
|
+
return t && !sn[i] && (sn[i] = !0, console.warn(r(i, " has been deprecated since v" + t + " and will be removed in the near future"))), e ? e(n, i, a) : !0;
|
|
1414
|
+
};
|
|
1415
|
+
}, H.spelling = function(e) {
|
|
1416
|
+
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1417
|
+
};
|
|
1418
|
+
function cn(e, t, n) {
|
|
1419
|
+
if (typeof e != "object") throw new N("options must be an object", N.ERR_BAD_OPTION_VALUE);
|
|
1420
|
+
let r = Object.keys(e), i = r.length;
|
|
1421
|
+
for (; i-- > 0;) {
|
|
1422
|
+
let a = r[i], o = Object.prototype.hasOwnProperty.call(t, a) ? t[a] : void 0;
|
|
1423
|
+
if (o) {
|
|
1424
|
+
let t = e[a], n = t === void 0 || o(t, a, e);
|
|
1425
|
+
if (n !== !0) throw new N("option " + a + " must be " + n, N.ERR_BAD_OPTION_VALUE);
|
|
1426
|
+
continue;
|
|
1427
|
+
}
|
|
1428
|
+
if (n !== !0) throw new N("Unknown option " + a, N.ERR_BAD_OPTION);
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
var U = {
|
|
1432
|
+
assertOptions: cn,
|
|
1433
|
+
validators: H
|
|
1434
|
+
}, W = U.validators, G = class {
|
|
1435
|
+
constructor(e) {
|
|
1436
|
+
this.defaults = e || {}, this.interceptors = {
|
|
1437
|
+
request: new ct(),
|
|
1438
|
+
response: new ct()
|
|
1439
|
+
};
|
|
1440
|
+
}
|
|
1441
|
+
async request(e, t) {
|
|
1442
|
+
try {
|
|
1443
|
+
return await this._request(e, t);
|
|
1444
|
+
} catch (e) {
|
|
1445
|
+
if (e instanceof Error) {
|
|
1446
|
+
let t = {};
|
|
1447
|
+
Error.captureStackTrace ? Error.captureStackTrace(t) : t = /* @__PURE__ */ Error();
|
|
1448
|
+
let n = (() => {
|
|
1449
|
+
if (!t.stack) return "";
|
|
1450
|
+
let e = t.stack.indexOf("\n");
|
|
1451
|
+
return e === -1 ? "" : t.stack.slice(e + 1);
|
|
1452
|
+
})();
|
|
1453
|
+
try {
|
|
1454
|
+
if (!e.stack) e.stack = n;
|
|
1455
|
+
else if (n) {
|
|
1456
|
+
let t = n.indexOf("\n"), r = t === -1 ? -1 : n.indexOf("\n", t + 1), i = r === -1 ? "" : n.slice(r + 1);
|
|
1457
|
+
String(e.stack).endsWith(i) || (e.stack += "\n" + n);
|
|
1458
|
+
}
|
|
1459
|
+
} catch {}
|
|
1460
|
+
}
|
|
1461
|
+
throw e;
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
_request(e, t) {
|
|
1465
|
+
typeof e == "string" ? (t ||= {}, t.url = e) : t = e || {}, t = B(this.defaults, t);
|
|
1466
|
+
let { transitional: n, paramsSerializer: r, headers: i } = t;
|
|
1467
|
+
n !== void 0 && U.assertOptions(n, {
|
|
1468
|
+
silentJSONParsing: W.transitional(W.boolean),
|
|
1469
|
+
forcedJSONParsing: W.transitional(W.boolean),
|
|
1470
|
+
clarifyTimeoutError: W.transitional(W.boolean),
|
|
1471
|
+
legacyInterceptorReqResOrdering: W.transitional(W.boolean)
|
|
1472
|
+
}, !1), r != null && (A.isFunction(r) ? t.paramsSerializer = { serialize: r } : U.assertOptions(r, {
|
|
1473
|
+
encode: W.function,
|
|
1474
|
+
serialize: W.function
|
|
1475
|
+
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls), U.assertOptions(t, {
|
|
1476
|
+
baseUrl: W.spelling("baseURL"),
|
|
1477
|
+
withXsrfToken: W.spelling("withXSRFToken")
|
|
1478
|
+
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1479
|
+
let a = i && A.merge(i.common, i[t.method]);
|
|
1480
|
+
i && A.forEach([
|
|
1481
|
+
"delete",
|
|
1482
|
+
"get",
|
|
1483
|
+
"head",
|
|
1484
|
+
"post",
|
|
1485
|
+
"put",
|
|
1486
|
+
"patch",
|
|
1487
|
+
"query",
|
|
1488
|
+
"common"
|
|
1489
|
+
], (e) => {
|
|
1490
|
+
delete i[e];
|
|
1491
|
+
}), t.headers = M.concat(a, i);
|
|
1492
|
+
let o = [], s = !0;
|
|
1493
|
+
this.interceptors.request.forEach(function(e) {
|
|
1494
|
+
if (typeof e.runWhen == "function" && e.runWhen(t) === !1) return;
|
|
1495
|
+
s &&= e.synchronous;
|
|
1496
|
+
let n = t.transitional || lt;
|
|
1497
|
+
n && n.legacyInterceptorReqResOrdering ? o.unshift(e.fulfilled, e.rejected) : o.push(e.fulfilled, e.rejected);
|
|
1498
|
+
});
|
|
1499
|
+
let c = [];
|
|
1500
|
+
this.interceptors.response.forEach(function(e) {
|
|
1501
|
+
c.push(e.fulfilled, e.rejected);
|
|
1502
|
+
});
|
|
1503
|
+
let l, u = 0, d;
|
|
1504
|
+
if (!s) {
|
|
1505
|
+
let e = [on.bind(this), void 0];
|
|
1506
|
+
for (e.unshift(...o), e.push(...c), d = e.length, l = Promise.resolve(t); u < d;) l = l.then(e[u++], e[u++]);
|
|
1507
|
+
return l;
|
|
1508
|
+
}
|
|
1509
|
+
d = o.length;
|
|
1510
|
+
let f = t;
|
|
1511
|
+
for (; u < d;) {
|
|
1512
|
+
let e = o[u++], t = o[u++];
|
|
1513
|
+
try {
|
|
1514
|
+
f = e(f);
|
|
1515
|
+
} catch (e) {
|
|
1516
|
+
t.call(this, e);
|
|
1517
|
+
break;
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
try {
|
|
1521
|
+
l = on.call(this, f);
|
|
1522
|
+
} catch (e) {
|
|
1523
|
+
return Promise.reject(e);
|
|
1524
|
+
}
|
|
1525
|
+
for (u = 0, d = c.length; u < d;) l = l.then(c[u++], c[u++]);
|
|
1526
|
+
return l;
|
|
1527
|
+
}
|
|
1528
|
+
getUri(e) {
|
|
1529
|
+
return e = B(this.defaults, e), st(Pt(e.baseURL, e.url, e.allowAbsoluteUrls), e.params, e.paramsSerializer);
|
|
1530
|
+
}
|
|
1531
|
+
};
|
|
1532
|
+
A.forEach([
|
|
1533
|
+
"delete",
|
|
1534
|
+
"get",
|
|
1535
|
+
"head",
|
|
1536
|
+
"options"
|
|
1537
|
+
], function(e) {
|
|
1538
|
+
G.prototype[e] = function(t, n) {
|
|
1539
|
+
return this.request(B(n || {}, {
|
|
1540
|
+
method: e,
|
|
1541
|
+
url: t,
|
|
1542
|
+
data: (n || {}).data
|
|
1543
|
+
}));
|
|
1544
|
+
};
|
|
1545
|
+
}), A.forEach([
|
|
1546
|
+
"post",
|
|
1547
|
+
"put",
|
|
1548
|
+
"patch",
|
|
1549
|
+
"query"
|
|
1550
|
+
], function(e) {
|
|
1551
|
+
function t(t) {
|
|
1552
|
+
return function(n, r, i) {
|
|
1553
|
+
return this.request(B(i || {}, {
|
|
1554
|
+
method: e,
|
|
1555
|
+
headers: t ? { "Content-Type": "multipart/form-data" } : {},
|
|
1556
|
+
url: n,
|
|
1557
|
+
data: r
|
|
1558
|
+
}));
|
|
1559
|
+
};
|
|
1560
|
+
}
|
|
1561
|
+
G.prototype[e] = t(), e !== "query" && (G.prototype[e + "Form"] = t(!0));
|
|
1562
|
+
});
|
|
1563
|
+
//#endregion
|
|
1564
|
+
//#region node_modules/axios/lib/cancel/CancelToken.js
|
|
1565
|
+
var ln = class e {
|
|
1566
|
+
constructor(e) {
|
|
1567
|
+
if (typeof e != "function") throw TypeError("executor must be a function.");
|
|
1568
|
+
let t;
|
|
1569
|
+
this.promise = new Promise(function(e) {
|
|
1570
|
+
t = e;
|
|
1571
|
+
});
|
|
1572
|
+
let n = this;
|
|
1573
|
+
this.promise.then((e) => {
|
|
1574
|
+
if (!n._listeners) return;
|
|
1575
|
+
let t = n._listeners.length;
|
|
1576
|
+
for (; t-- > 0;) n._listeners[t](e);
|
|
1577
|
+
n._listeners = null;
|
|
1578
|
+
}), this.promise.then = (e) => {
|
|
1579
|
+
let t, r = new Promise((e) => {
|
|
1580
|
+
n.subscribe(e), t = e;
|
|
1581
|
+
}).then(e);
|
|
1582
|
+
return r.cancel = function() {
|
|
1583
|
+
n.unsubscribe(t);
|
|
1584
|
+
}, r;
|
|
1585
|
+
}, e(function(e, r, i) {
|
|
1586
|
+
n.reason || (n.reason = new R(e, r, i), t(n.reason));
|
|
1587
|
+
});
|
|
1588
|
+
}
|
|
1589
|
+
throwIfRequested() {
|
|
1590
|
+
if (this.reason) throw this.reason;
|
|
1591
|
+
}
|
|
1592
|
+
subscribe(e) {
|
|
1593
|
+
if (this.reason) {
|
|
1594
|
+
e(this.reason);
|
|
1595
|
+
return;
|
|
1596
|
+
}
|
|
1597
|
+
this._listeners ? this._listeners.push(e) : this._listeners = [e];
|
|
1598
|
+
}
|
|
1599
|
+
unsubscribe(e) {
|
|
1600
|
+
if (!this._listeners) return;
|
|
1601
|
+
let t = this._listeners.indexOf(e);
|
|
1602
|
+
t !== -1 && this._listeners.splice(t, 1);
|
|
1603
|
+
}
|
|
1604
|
+
toAbortSignal() {
|
|
1605
|
+
let e = new AbortController(), t = (t) => {
|
|
1606
|
+
e.abort(t);
|
|
1607
|
+
};
|
|
1608
|
+
return this.subscribe(t), e.signal.unsubscribe = () => this.unsubscribe(t), e.signal;
|
|
1609
|
+
}
|
|
1610
|
+
static source() {
|
|
1611
|
+
let t;
|
|
1612
|
+
return {
|
|
1613
|
+
token: new e(function(e) {
|
|
1614
|
+
t = e;
|
|
1615
|
+
}),
|
|
1616
|
+
cancel: t
|
|
1617
|
+
};
|
|
1618
|
+
}
|
|
1619
|
+
};
|
|
1620
|
+
//#endregion
|
|
1621
|
+
//#region node_modules/axios/lib/helpers/spread.js
|
|
1622
|
+
function un(e) {
|
|
1623
|
+
return function(t) {
|
|
1624
|
+
return e.apply(null, t);
|
|
1625
|
+
};
|
|
1626
|
+
}
|
|
1627
|
+
//#endregion
|
|
1628
|
+
//#region node_modules/axios/lib/helpers/isAxiosError.js
|
|
1629
|
+
function dn(e) {
|
|
1630
|
+
return A.isObject(e) && e.isAxiosError === !0;
|
|
1631
|
+
}
|
|
1632
|
+
//#endregion
|
|
1633
|
+
//#region node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
1634
|
+
var fn = {
|
|
1635
|
+
Continue: 100,
|
|
1636
|
+
SwitchingProtocols: 101,
|
|
1637
|
+
Processing: 102,
|
|
1638
|
+
EarlyHints: 103,
|
|
1639
|
+
Ok: 200,
|
|
1640
|
+
Created: 201,
|
|
1641
|
+
Accepted: 202,
|
|
1642
|
+
NonAuthoritativeInformation: 203,
|
|
1643
|
+
NoContent: 204,
|
|
1644
|
+
ResetContent: 205,
|
|
1645
|
+
PartialContent: 206,
|
|
1646
|
+
MultiStatus: 207,
|
|
1647
|
+
AlreadyReported: 208,
|
|
1648
|
+
ImUsed: 226,
|
|
1649
|
+
MultipleChoices: 300,
|
|
1650
|
+
MovedPermanently: 301,
|
|
1651
|
+
Found: 302,
|
|
1652
|
+
SeeOther: 303,
|
|
1653
|
+
NotModified: 304,
|
|
1654
|
+
UseProxy: 305,
|
|
1655
|
+
Unused: 306,
|
|
1656
|
+
TemporaryRedirect: 307,
|
|
1657
|
+
PermanentRedirect: 308,
|
|
1658
|
+
BadRequest: 400,
|
|
1659
|
+
Unauthorized: 401,
|
|
1660
|
+
PaymentRequired: 402,
|
|
1661
|
+
Forbidden: 403,
|
|
1662
|
+
NotFound: 404,
|
|
1663
|
+
MethodNotAllowed: 405,
|
|
1664
|
+
NotAcceptable: 406,
|
|
1665
|
+
ProxyAuthenticationRequired: 407,
|
|
1666
|
+
RequestTimeout: 408,
|
|
1667
|
+
Conflict: 409,
|
|
1668
|
+
Gone: 410,
|
|
1669
|
+
LengthRequired: 411,
|
|
1670
|
+
PreconditionFailed: 412,
|
|
1671
|
+
PayloadTooLarge: 413,
|
|
1672
|
+
UriTooLong: 414,
|
|
1673
|
+
UnsupportedMediaType: 415,
|
|
1674
|
+
RangeNotSatisfiable: 416,
|
|
1675
|
+
ExpectationFailed: 417,
|
|
1676
|
+
ImATeapot: 418,
|
|
1677
|
+
MisdirectedRequest: 421,
|
|
1678
|
+
UnprocessableEntity: 422,
|
|
1679
|
+
Locked: 423,
|
|
1680
|
+
FailedDependency: 424,
|
|
1681
|
+
TooEarly: 425,
|
|
1682
|
+
UpgradeRequired: 426,
|
|
1683
|
+
PreconditionRequired: 428,
|
|
1684
|
+
TooManyRequests: 429,
|
|
1685
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
1686
|
+
UnavailableForLegalReasons: 451,
|
|
1687
|
+
InternalServerError: 500,
|
|
1688
|
+
NotImplemented: 501,
|
|
1689
|
+
BadGateway: 502,
|
|
1690
|
+
ServiceUnavailable: 503,
|
|
1691
|
+
GatewayTimeout: 504,
|
|
1692
|
+
HttpVersionNotSupported: 505,
|
|
1693
|
+
VariantAlsoNegotiates: 506,
|
|
1694
|
+
InsufficientStorage: 507,
|
|
1695
|
+
LoopDetected: 508,
|
|
1696
|
+
NotExtended: 510,
|
|
1697
|
+
NetworkAuthenticationRequired: 511,
|
|
1698
|
+
WebServerIsDown: 521,
|
|
1699
|
+
ConnectionTimedOut: 522,
|
|
1700
|
+
OriginIsUnreachable: 523,
|
|
1701
|
+
TimeoutOccurred: 524,
|
|
1702
|
+
SslHandshakeFailed: 525,
|
|
1703
|
+
InvalidSslCertificate: 526
|
|
1704
|
+
};
|
|
1705
|
+
Object.entries(fn).forEach(([e, t]) => {
|
|
1706
|
+
fn[t] = e;
|
|
1707
|
+
});
|
|
1708
|
+
//#endregion
|
|
1709
|
+
//#region node_modules/axios/lib/axios.js
|
|
1710
|
+
function pn(e) {
|
|
1711
|
+
let t = new G(e), r = n(G.prototype.request, t);
|
|
1712
|
+
return A.extend(r, G.prototype, t, { allOwnKeys: !0 }), A.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(t) {
|
|
1713
|
+
return pn(B(e, t));
|
|
1714
|
+
}, r;
|
|
1715
|
+
}
|
|
1716
|
+
var K = pn(L);
|
|
1717
|
+
K.Axios = G, K.CanceledError = R, K.CancelToken = ln, K.isCancel = Ct, K.VERSION = qt, K.toFormData = P, K.AxiosError = N, K.Cancel = K.CanceledError, K.all = function(e) {
|
|
1718
|
+
return Promise.all(e);
|
|
1719
|
+
}, K.spread = un, K.isAxiosError = dn, K.mergeConfig = B, K.AxiosHeaders = M, K.formToJSON = (e) => bt(A.isHTMLForm(e) ? new FormData(e) : e), K.getAdapter = rn.getAdapter, K.HttpStatusCode = fn, K.default = K;
|
|
1720
|
+
//#endregion
|
|
1721
|
+
//#region src/core/utils.ts
|
|
1722
|
+
var mn = (e, t, n = {}) => {
|
|
1723
|
+
let r = /^(https?|wss?):\/\//i.test(t) ? t : `${e.replace(/\/$/, "")}/${t.replace(/^\//, "")}`, i = [], a = /* @__PURE__ */ new Set();
|
|
1724
|
+
return r = r.replace(/:(\w+)/g, (e, t) => n[t] === void 0 ? `:${t}` : (a.add(t), encodeURIComponent(String(n[t])))), Object.keys(n).forEach((e) => {
|
|
1725
|
+
if (!a.has(e) && n[e] !== void 0) {
|
|
1726
|
+
let t = n[e];
|
|
1727
|
+
Array.isArray(t) ? t.forEach((t) => i.push(`${encodeURIComponent(e)}=${encodeURIComponent(String(t))}`)) : i.push(`${encodeURIComponent(e)}=${encodeURIComponent(String(t))}`);
|
|
1728
|
+
}
|
|
1729
|
+
}), i.length > 0 ? `${r}?${i.join("&")}` : r;
|
|
1730
|
+
}, hn = (e) => async (t, n = {}) => {
|
|
1731
|
+
if (t.protocol !== "REST") throw Error(`REST adapter cannot handle ${t.protocol} protocol`);
|
|
1732
|
+
let r = {
|
|
1733
|
+
url: mn(e, t.path, n.params),
|
|
1734
|
+
method: t.method,
|
|
1735
|
+
headers: {
|
|
1736
|
+
"Content-Type": "application/json",
|
|
1737
|
+
...t.headers,
|
|
1738
|
+
...n.headers
|
|
1739
|
+
},
|
|
1740
|
+
data: ["GET", "DELETE"].includes(t.method) ? void 0 : n.body,
|
|
1741
|
+
timeout: t.timeout || 5e3,
|
|
1742
|
+
...t.options,
|
|
1743
|
+
...n.fetchOptions
|
|
1744
|
+
};
|
|
1745
|
+
try {
|
|
1746
|
+
return (await K.request(r)).data;
|
|
1747
|
+
} catch (e) {
|
|
1748
|
+
if (K.isAxiosError(e)) {
|
|
1749
|
+
let t = e.response?.status || "Network Error", n = e.response?.data?.message || e.message;
|
|
1750
|
+
throw Error(`[REST ${t}]: ${n}`);
|
|
1751
|
+
}
|
|
1752
|
+
throw e;
|
|
1753
|
+
}
|
|
1754
|
+
}, gn = class {
|
|
1755
|
+
constructor(e, t) {
|
|
1756
|
+
this.endpoint = e, this.url = t, this.socket = null, this.subscribers = /* @__PURE__ */ new Set(), this.retryCount = 0;
|
|
1757
|
+
}
|
|
1758
|
+
connect() {
|
|
1759
|
+
if (typeof window > "u") {
|
|
1760
|
+
console.error("APIEngine: WebSockets are only supported in the browser environment.");
|
|
1761
|
+
return;
|
|
1762
|
+
}
|
|
1763
|
+
this.socket?.readyState !== WebSocket.OPEN && (this.socket = new WebSocket(this.url), this.socket.onopen = () => {
|
|
1764
|
+
this.retryCount = 0, this.startHeartbeat(), console.log(`[WS] Connected: ${this.url}`);
|
|
1765
|
+
}, this.socket.onmessage = (e) => {
|
|
1766
|
+
try {
|
|
1767
|
+
let t = typeof e.data == "string" ? JSON.parse(e.data) : e.data;
|
|
1768
|
+
this.subscribers.forEach((e) => e(t));
|
|
1769
|
+
} catch {
|
|
1770
|
+
this.subscribers.forEach((t) => t(e.data));
|
|
1771
|
+
}
|
|
1772
|
+
}, this.socket.onclose = (e) => {
|
|
1773
|
+
this.stopHeartbeat(), this.endpoint.autoReconnect && e.code !== 1e3 && this.reconnect();
|
|
1774
|
+
}, this.socket.onerror = (e) => {
|
|
1775
|
+
console.error("[WS] Error:", e);
|
|
1776
|
+
});
|
|
1777
|
+
}
|
|
1778
|
+
reconnect() {
|
|
1779
|
+
let e = this.endpoint.maxRetries || 5;
|
|
1780
|
+
if (this.retryCount >= e) {
|
|
1781
|
+
console.warn(`[WS] Max reconnection attempts reached for ${this.url}`);
|
|
1782
|
+
return;
|
|
1783
|
+
}
|
|
1784
|
+
let t = Math.min(1e3 * 2 ** this.retryCount, 3e4);
|
|
1785
|
+
this.retryCount++, console.log(`[WS] Reconnecting in ${t}ms... (Attempt ${this.retryCount}/${e})`), this.reconnectTimer = setTimeout(() => this.connect(), t);
|
|
1786
|
+
}
|
|
1787
|
+
startHeartbeat() {
|
|
1788
|
+
this.endpoint.pingInterval && (this.heartbeatTimer = setInterval(() => {
|
|
1789
|
+
this.socket?.readyState === WebSocket.OPEN && this.socket.send(JSON.stringify({ type: "ping" }));
|
|
1790
|
+
}, this.endpoint.pingInterval));
|
|
1791
|
+
}
|
|
1792
|
+
stopHeartbeat() {
|
|
1793
|
+
clearInterval(this.heartbeatTimer), clearTimeout(this.reconnectTimer);
|
|
1794
|
+
}
|
|
1795
|
+
subscribe(e) {
|
|
1796
|
+
return this.subscribers.add(e), (!this.socket || this.socket.readyState === WebSocket.CLOSED) && this.connect(), () => {
|
|
1797
|
+
this.subscribers.delete(e), this.subscribers.size === 0 && this.close();
|
|
1798
|
+
};
|
|
1799
|
+
}
|
|
1800
|
+
send(e) {
|
|
1801
|
+
if (this.socket?.readyState === WebSocket.OPEN) {
|
|
1802
|
+
let t = typeof e == "string" ? e : JSON.stringify(e);
|
|
1803
|
+
this.socket.send(t);
|
|
1804
|
+
} else console.warn("[WS] Cannot send message: Connection is not open.");
|
|
1805
|
+
}
|
|
1806
|
+
close() {
|
|
1807
|
+
this.stopHeartbeat(), this.socket &&= (this.socket.onclose = null, this.socket.close(1e3), null), console.log(`[WS] Connection closed: ${this.url}`);
|
|
1808
|
+
}
|
|
1809
|
+
}, _n;
|
|
1810
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1811
|
+
function vn(e) {
|
|
1812
|
+
return {
|
|
1813
|
+
lang: e?.lang ?? _n?.lang,
|
|
1814
|
+
message: e?.message,
|
|
1815
|
+
abortEarly: e?.abortEarly ?? _n?.abortEarly,
|
|
1816
|
+
abortPipeEarly: e?.abortPipeEarly ?? _n?.abortPipeEarly
|
|
1817
|
+
};
|
|
1818
|
+
}
|
|
1819
|
+
var yn;
|
|
1820
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1821
|
+
function bn(e) {
|
|
1822
|
+
return yn?.get(e);
|
|
1823
|
+
}
|
|
1824
|
+
var xn;
|
|
1825
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1826
|
+
function Sn(e) {
|
|
1827
|
+
return xn?.get(e);
|
|
1828
|
+
}
|
|
1829
|
+
var Cn;
|
|
1830
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1831
|
+
function wn(e, t) {
|
|
1832
|
+
return Cn?.get(e)?.get(t);
|
|
1833
|
+
}
|
|
1834
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1835
|
+
function Tn(e) {
|
|
1836
|
+
let t = typeof e;
|
|
1837
|
+
return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
|
|
1838
|
+
}
|
|
1839
|
+
function q(e, t, n, r, i) {
|
|
1840
|
+
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ Tn(a), c = {
|
|
1841
|
+
kind: e.kind,
|
|
1842
|
+
type: e.type,
|
|
1843
|
+
input: a,
|
|
1844
|
+
expected: o,
|
|
1845
|
+
received: s,
|
|
1846
|
+
message: `Invalid ${t}: ${o ? `Expected ${o} but r` : "R"}eceived ${s}`,
|
|
1847
|
+
requirement: e.requirement,
|
|
1848
|
+
path: i?.path,
|
|
1849
|
+
issues: i?.issues,
|
|
1850
|
+
lang: r.lang,
|
|
1851
|
+
abortEarly: r.abortEarly,
|
|
1852
|
+
abortPipeEarly: r.abortPipeEarly
|
|
1853
|
+
}, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */ wn(e.reference, c.lang) ?? (l ? /* @__PURE__ */ Sn(c.lang) : null) ?? r.message ?? /* @__PURE__ */ bn(c.lang);
|
|
1854
|
+
u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
|
|
1855
|
+
}
|
|
1856
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1857
|
+
function J(e) {
|
|
1858
|
+
return {
|
|
1859
|
+
version: 1,
|
|
1860
|
+
vendor: "valibot",
|
|
1861
|
+
validate(t) {
|
|
1862
|
+
return e["~run"]({ value: t }, /* @__PURE__ */ vn());
|
|
1863
|
+
}
|
|
1864
|
+
};
|
|
1865
|
+
}
|
|
1866
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1867
|
+
function En(e, t) {
|
|
1868
|
+
return Object.hasOwn(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
|
|
1869
|
+
}
|
|
1870
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1871
|
+
function Dn(e, t) {
|
|
1872
|
+
let n = [...new Set(e)];
|
|
1873
|
+
return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
|
|
1874
|
+
}
|
|
1875
|
+
var On = class extends Error {
|
|
1876
|
+
constructor(e) {
|
|
1877
|
+
super(e[0].message), this.name = "ValiError", this.issues = e;
|
|
1878
|
+
}
|
|
1879
|
+
};
|
|
1880
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1881
|
+
function kn(e, t, n) {
|
|
1882
|
+
return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
|
|
1883
|
+
}
|
|
1884
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1885
|
+
function An(e, t, n) {
|
|
1886
|
+
return typeof e.default == "function" ? e.default(t, n) : e.default;
|
|
1887
|
+
}
|
|
1888
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1889
|
+
function jn(e) {
|
|
1890
|
+
return {
|
|
1891
|
+
kind: "schema",
|
|
1892
|
+
type: "boolean",
|
|
1893
|
+
reference: jn,
|
|
1894
|
+
expects: "boolean",
|
|
1895
|
+
async: !1,
|
|
1896
|
+
message: e,
|
|
1897
|
+
get "~standard"() {
|
|
1898
|
+
return /* @__PURE__ */ J(this);
|
|
1899
|
+
},
|
|
1900
|
+
"~run"(e, t) {
|
|
1901
|
+
return typeof e.value == "boolean" ? e.typed = !0 : q(this, "type", e, t), e;
|
|
1902
|
+
}
|
|
1903
|
+
};
|
|
1904
|
+
}
|
|
1905
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1906
|
+
function Mn(e, t) {
|
|
1907
|
+
return {
|
|
1908
|
+
kind: "schema",
|
|
1909
|
+
type: "literal",
|
|
1910
|
+
reference: Mn,
|
|
1911
|
+
expects: /* @__PURE__ */ Tn(e),
|
|
1912
|
+
async: !1,
|
|
1913
|
+
literal: e,
|
|
1914
|
+
message: t,
|
|
1915
|
+
get "~standard"() {
|
|
1916
|
+
return /* @__PURE__ */ J(this);
|
|
1917
|
+
},
|
|
1918
|
+
"~run"(e, t) {
|
|
1919
|
+
return e.value === this.literal ? e.typed = !0 : q(this, "type", e, t), e;
|
|
1920
|
+
}
|
|
1921
|
+
};
|
|
1922
|
+
}
|
|
1923
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1924
|
+
function Y(e) {
|
|
1925
|
+
return {
|
|
1926
|
+
kind: "schema",
|
|
1927
|
+
type: "number",
|
|
1928
|
+
reference: Y,
|
|
1929
|
+
expects: "number",
|
|
1930
|
+
async: !1,
|
|
1931
|
+
message: e,
|
|
1932
|
+
get "~standard"() {
|
|
1933
|
+
return /* @__PURE__ */ J(this);
|
|
1934
|
+
},
|
|
1935
|
+
"~run"(e, t) {
|
|
1936
|
+
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : q(this, "type", e, t), e;
|
|
1937
|
+
}
|
|
1938
|
+
};
|
|
1939
|
+
}
|
|
1940
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1941
|
+
function X(e, t) {
|
|
1942
|
+
return {
|
|
1943
|
+
kind: "schema",
|
|
1944
|
+
type: "object",
|
|
1945
|
+
reference: X,
|
|
1946
|
+
expects: "Object",
|
|
1947
|
+
async: !1,
|
|
1948
|
+
entries: e,
|
|
1949
|
+
message: t,
|
|
1950
|
+
get "~standard"() {
|
|
1951
|
+
return /* @__PURE__ */ J(this);
|
|
1952
|
+
},
|
|
1953
|
+
"~run"(e, t) {
|
|
1954
|
+
let n = e.value;
|
|
1955
|
+
if (n && typeof n == "object") {
|
|
1956
|
+
e.typed = !0, e.value = {};
|
|
1957
|
+
for (let r in this.entries) {
|
|
1958
|
+
let i = this.entries[r];
|
|
1959
|
+
if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
|
|
1960
|
+
let a = r in n ? n[r] : /* @__PURE__ */ An(i), o = i["~run"]({ value: a }, t);
|
|
1961
|
+
if (o.issues) {
|
|
1962
|
+
let i = {
|
|
1963
|
+
type: "object",
|
|
1964
|
+
origin: "value",
|
|
1965
|
+
input: n,
|
|
1966
|
+
key: r,
|
|
1967
|
+
value: a
|
|
1968
|
+
};
|
|
1969
|
+
for (let t of o.issues) t.path ? t.path.unshift(i) : t.path = [i], e.issues?.push(t);
|
|
1970
|
+
if (e.issues ||= o.issues, t.abortEarly) {
|
|
1971
|
+
e.typed = !1;
|
|
1972
|
+
break;
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
o.typed || (e.typed = !1), e.value[r] = o.value;
|
|
1976
|
+
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ kn(i);
|
|
1977
|
+
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (q(this, "key", e, t, {
|
|
1978
|
+
input: void 0,
|
|
1979
|
+
expected: `"${r}"`,
|
|
1980
|
+
path: [{
|
|
1981
|
+
type: "object",
|
|
1982
|
+
origin: "key",
|
|
1983
|
+
input: n,
|
|
1984
|
+
key: r,
|
|
1985
|
+
value: n[r]
|
|
1986
|
+
}]
|
|
1987
|
+
}), t.abortEarly)) break;
|
|
1988
|
+
}
|
|
1989
|
+
} else q(this, "type", e, t);
|
|
1990
|
+
return e;
|
|
1991
|
+
}
|
|
1992
|
+
};
|
|
1993
|
+
}
|
|
1994
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1995
|
+
function Z(e, t) {
|
|
1996
|
+
return {
|
|
1997
|
+
kind: "schema",
|
|
1998
|
+
type: "optional",
|
|
1999
|
+
reference: Z,
|
|
2000
|
+
expects: `(${e.expects} | undefined)`,
|
|
2001
|
+
async: !1,
|
|
2002
|
+
wrapped: e,
|
|
2003
|
+
default: t,
|
|
2004
|
+
get "~standard"() {
|
|
2005
|
+
return /* @__PURE__ */ J(this);
|
|
2006
|
+
},
|
|
2007
|
+
"~run"(e, t) {
|
|
2008
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ An(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
2009
|
+
}
|
|
2010
|
+
};
|
|
2011
|
+
}
|
|
2012
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
2013
|
+
function Q(e, t) {
|
|
2014
|
+
return {
|
|
2015
|
+
kind: "schema",
|
|
2016
|
+
type: "picklist",
|
|
2017
|
+
reference: Q,
|
|
2018
|
+
expects: /* @__PURE__ */ Dn(e.map(Tn), "|"),
|
|
2019
|
+
async: !1,
|
|
2020
|
+
options: e,
|
|
2021
|
+
message: t,
|
|
2022
|
+
get "~standard"() {
|
|
2023
|
+
return /* @__PURE__ */ J(this);
|
|
2024
|
+
},
|
|
2025
|
+
"~run"(e, t) {
|
|
2026
|
+
return this.options.includes(e.value) ? e.typed = !0 : q(this, "type", e, t), e;
|
|
2027
|
+
}
|
|
2028
|
+
};
|
|
2029
|
+
}
|
|
2030
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
2031
|
+
function Nn(e, t, n) {
|
|
2032
|
+
return {
|
|
2033
|
+
kind: "schema",
|
|
2034
|
+
type: "record",
|
|
2035
|
+
reference: Nn,
|
|
2036
|
+
expects: "Object",
|
|
2037
|
+
async: !1,
|
|
2038
|
+
key: e,
|
|
2039
|
+
value: t,
|
|
2040
|
+
message: n,
|
|
2041
|
+
get "~standard"() {
|
|
2042
|
+
return /* @__PURE__ */ J(this);
|
|
2043
|
+
},
|
|
2044
|
+
"~run"(e, t) {
|
|
2045
|
+
let n = e.value;
|
|
2046
|
+
if (n && typeof n == "object") {
|
|
2047
|
+
e.typed = !0, e.value = {};
|
|
2048
|
+
for (let r in n) if (/* @__PURE__ */ En(n, r)) {
|
|
2049
|
+
let i = n[r], a = this.key["~run"]({ value: r }, t);
|
|
2050
|
+
if (a.issues) {
|
|
2051
|
+
let o = {
|
|
2052
|
+
type: "object",
|
|
2053
|
+
origin: "key",
|
|
2054
|
+
input: n,
|
|
2055
|
+
key: r,
|
|
2056
|
+
value: i
|
|
2057
|
+
};
|
|
2058
|
+
for (let t of a.issues) t.path = [o], e.issues?.push(t);
|
|
2059
|
+
if (e.issues ||= a.issues, t.abortEarly) {
|
|
2060
|
+
e.typed = !1;
|
|
2061
|
+
break;
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
let o = this.value["~run"]({ value: i }, t);
|
|
2065
|
+
if (o.issues) {
|
|
2066
|
+
let a = {
|
|
2067
|
+
type: "object",
|
|
2068
|
+
origin: "value",
|
|
2069
|
+
input: n,
|
|
2070
|
+
key: r,
|
|
2071
|
+
value: i
|
|
2072
|
+
};
|
|
2073
|
+
for (let t of o.issues) t.path ? t.path.unshift(a) : t.path = [a], e.issues?.push(t);
|
|
2074
|
+
if (e.issues ||= o.issues, t.abortEarly) {
|
|
2075
|
+
e.typed = !1;
|
|
2076
|
+
break;
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
(!a.typed || !o.typed) && (e.typed = !1), a.typed && (e.value[a.value] = o.value);
|
|
2080
|
+
}
|
|
2081
|
+
} else q(this, "type", e, t);
|
|
2082
|
+
return e;
|
|
2083
|
+
}
|
|
2084
|
+
};
|
|
2085
|
+
}
|
|
2086
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
2087
|
+
function $(e) {
|
|
2088
|
+
return {
|
|
2089
|
+
kind: "schema",
|
|
2090
|
+
type: "string",
|
|
2091
|
+
reference: $,
|
|
2092
|
+
expects: "string",
|
|
2093
|
+
async: !1,
|
|
2094
|
+
message: e,
|
|
2095
|
+
get "~standard"() {
|
|
2096
|
+
return /* @__PURE__ */ J(this);
|
|
2097
|
+
},
|
|
2098
|
+
"~run"(e, t) {
|
|
2099
|
+
return typeof e.value == "string" ? e.typed = !0 : q(this, "type", e, t), e;
|
|
2100
|
+
}
|
|
2101
|
+
};
|
|
2102
|
+
}
|
|
2103
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
2104
|
+
function Pn(e, t, n) {
|
|
2105
|
+
return {
|
|
2106
|
+
kind: "schema",
|
|
2107
|
+
type: "variant",
|
|
2108
|
+
reference: Pn,
|
|
2109
|
+
expects: "Object",
|
|
2110
|
+
async: !1,
|
|
2111
|
+
key: e,
|
|
2112
|
+
options: t,
|
|
2113
|
+
message: n,
|
|
2114
|
+
get "~standard"() {
|
|
2115
|
+
return /* @__PURE__ */ J(this);
|
|
2116
|
+
},
|
|
2117
|
+
"~run"(e, t) {
|
|
2118
|
+
let n = e.value;
|
|
2119
|
+
if (n && typeof n == "object") {
|
|
2120
|
+
let r, i = 0, a = this.key, o = [], s = (e, c) => {
|
|
2121
|
+
for (let l of e.options) {
|
|
2122
|
+
if (l.type === "variant") s(l, new Set(c).add(l.key));
|
|
2123
|
+
else {
|
|
2124
|
+
let e = !0, s = 0;
|
|
2125
|
+
for (let t of c) {
|
|
2126
|
+
let r = l.entries[t];
|
|
2127
|
+
if (t in n ? r["~run"]({
|
|
2128
|
+
typed: !1,
|
|
2129
|
+
value: n[t]
|
|
2130
|
+
}, { abortEarly: !0 }).issues : r.type !== "exact_optional" && r.type !== "optional" && r.type !== "nullish") {
|
|
2131
|
+
e = !1, a !== t && (i < s || i === s && t in n && !(a in n)) && (i = s, a = t, o = []), a === t && o.push(l.entries[t].expects);
|
|
2132
|
+
break;
|
|
2133
|
+
}
|
|
2134
|
+
s++;
|
|
2135
|
+
}
|
|
2136
|
+
if (e) {
|
|
2137
|
+
let e = l["~run"]({ value: n }, t);
|
|
2138
|
+
(!r || !r.typed && e.typed) && (r = e);
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
if (r && !r.issues) break;
|
|
2142
|
+
}
|
|
2143
|
+
};
|
|
2144
|
+
if (s(this, new Set([this.key])), r) return r;
|
|
2145
|
+
q(this, "type", e, t, {
|
|
2146
|
+
input: n[a],
|
|
2147
|
+
expected: /* @__PURE__ */ Dn(o, "|"),
|
|
2148
|
+
path: [{
|
|
2149
|
+
type: "object",
|
|
2150
|
+
origin: "value",
|
|
2151
|
+
input: n,
|
|
2152
|
+
key: a,
|
|
2153
|
+
value: n[a]
|
|
2154
|
+
}]
|
|
2155
|
+
});
|
|
2156
|
+
} else q(this, "type", e, t);
|
|
2157
|
+
return e;
|
|
2158
|
+
}
|
|
2159
|
+
};
|
|
2160
|
+
}
|
|
2161
|
+
function Fn(e, t, n) {
|
|
2162
|
+
let r = e["~run"]({ value: t }, /* @__PURE__ */ vn(n));
|
|
2163
|
+
if (r.issues) throw new On(r.issues);
|
|
2164
|
+
return r.value;
|
|
2165
|
+
}
|
|
2166
|
+
var In = /* @__PURE__ */ X({
|
|
2167
|
+
version: /* @__PURE__ */ $(),
|
|
2168
|
+
baseUrl: /* @__PURE__ */ $(),
|
|
2169
|
+
endpoints: /* @__PURE__ */ Nn(/* @__PURE__ */ $(), /* @__PURE__ */ Pn("protocol", [
|
|
2170
|
+
/* @__PURE__ */ X({
|
|
2171
|
+
protocol: /* @__PURE__ */ Mn("REST"),
|
|
2172
|
+
path: /* @__PURE__ */ $(),
|
|
2173
|
+
method: /* @__PURE__ */ Q([
|
|
2174
|
+
"GET",
|
|
2175
|
+
"POST",
|
|
2176
|
+
"PUT",
|
|
2177
|
+
"DELETE"
|
|
2178
|
+
]),
|
|
2179
|
+
headers: /* @__PURE__ */ Z(/* @__PURE__ */ Nn(/* @__PURE__ */ $(), /* @__PURE__ */ $()), {}),
|
|
2180
|
+
options: /* @__PURE__ */ Z(/* @__PURE__ */ X({
|
|
2181
|
+
cache: /* @__PURE__ */ Z(/* @__PURE__ */ Q([
|
|
2182
|
+
"default",
|
|
2183
|
+
"no-store",
|
|
2184
|
+
"reload",
|
|
2185
|
+
"force-cache"
|
|
2186
|
+
])),
|
|
2187
|
+
credentials: /* @__PURE__ */ Z(/* @__PURE__ */ Q([
|
|
2188
|
+
"include",
|
|
2189
|
+
"same-origin",
|
|
2190
|
+
"omit"
|
|
2191
|
+
]))
|
|
2192
|
+
}), {}),
|
|
2193
|
+
timeout: /* @__PURE__ */ Z(/* @__PURE__ */ Y(), 5e3)
|
|
2194
|
+
}),
|
|
2195
|
+
/* @__PURE__ */ X({
|
|
2196
|
+
protocol: /* @__PURE__ */ Mn("WS"),
|
|
2197
|
+
path: /* @__PURE__ */ $(),
|
|
2198
|
+
autoReconnect: /* @__PURE__ */ Z(/* @__PURE__ */ jn(), !0),
|
|
2199
|
+
maxRetries: /* @__PURE__ */ Z(/* @__PURE__ */ Y(), 5),
|
|
2200
|
+
pingInterval: /* @__PURE__ */ Z(/* @__PURE__ */ Y(), 3e4)
|
|
2201
|
+
}),
|
|
2202
|
+
/* @__PURE__ */ X({
|
|
2203
|
+
protocol: /* @__PURE__ */ Mn("SSE"),
|
|
2204
|
+
path: /* @__PURE__ */ $(),
|
|
2205
|
+
method: /* @__PURE__ */ Z(/* @__PURE__ */ Q(["GET", "POST"]), "GET"),
|
|
2206
|
+
headers: /* @__PURE__ */ Z(/* @__PURE__ */ Nn(/* @__PURE__ */ $(), /* @__PURE__ */ $()), {}),
|
|
2207
|
+
eventType: /* @__PURE__ */ Z(/* @__PURE__ */ $(), "message")
|
|
2208
|
+
})
|
|
2209
|
+
]))
|
|
2210
|
+
});
|
|
2211
|
+
//#endregion
|
|
2212
|
+
//#region node_modules/@microsoft/fetch-event-source/lib/esm/parse.js
|
|
2213
|
+
async function Ln(e, t) {
|
|
2214
|
+
let n = e.getReader(), r;
|
|
2215
|
+
for (; !(r = await n.read()).done;) t(r.value);
|
|
2216
|
+
}
|
|
2217
|
+
function Rn(e) {
|
|
2218
|
+
let t, n, r, i = !1;
|
|
2219
|
+
return function(a) {
|
|
2220
|
+
t === void 0 ? (t = a, n = 0, r = -1) : t = Bn(t, a);
|
|
2221
|
+
let o = t.length, s = 0;
|
|
2222
|
+
for (; n < o;) {
|
|
2223
|
+
i &&= (t[n] === 10 && (s = ++n), !1);
|
|
2224
|
+
let a = -1;
|
|
2225
|
+
for (; n < o && a === -1; ++n) switch (t[n]) {
|
|
2226
|
+
case 58:
|
|
2227
|
+
r === -1 && (r = n - s);
|
|
2228
|
+
break;
|
|
2229
|
+
case 13: i = !0;
|
|
2230
|
+
case 10:
|
|
2231
|
+
a = n;
|
|
2232
|
+
break;
|
|
2233
|
+
}
|
|
2234
|
+
if (a === -1) break;
|
|
2235
|
+
e(t.subarray(s, a), r), s = n, r = -1;
|
|
2236
|
+
}
|
|
2237
|
+
s === o ? t = void 0 : s !== 0 && (t = t.subarray(s), n -= s);
|
|
2238
|
+
};
|
|
2239
|
+
}
|
|
2240
|
+
function zn(e, t, n) {
|
|
2241
|
+
let r = Vn(), i = new TextDecoder();
|
|
2242
|
+
return function(a, o) {
|
|
2243
|
+
if (a.length === 0) n?.(r), r = Vn();
|
|
2244
|
+
else if (o > 0) {
|
|
2245
|
+
let n = i.decode(a.subarray(0, o)), s = o + (a[o + 1] === 32 ? 2 : 1), c = i.decode(a.subarray(s));
|
|
2246
|
+
switch (n) {
|
|
2247
|
+
case "data":
|
|
2248
|
+
r.data = r.data ? r.data + "\n" + c : c;
|
|
2249
|
+
break;
|
|
2250
|
+
case "event":
|
|
2251
|
+
r.event = c;
|
|
2252
|
+
break;
|
|
2253
|
+
case "id":
|
|
2254
|
+
e(r.id = c);
|
|
2255
|
+
break;
|
|
2256
|
+
case "retry":
|
|
2257
|
+
let n = parseInt(c, 10);
|
|
2258
|
+
isNaN(n) || t(r.retry = n);
|
|
2259
|
+
break;
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
};
|
|
2263
|
+
}
|
|
2264
|
+
function Bn(e, t) {
|
|
2265
|
+
let n = new Uint8Array(e.length + t.length);
|
|
2266
|
+
return n.set(e), n.set(t, e.length), n;
|
|
2267
|
+
}
|
|
2268
|
+
function Vn() {
|
|
2269
|
+
return {
|
|
2270
|
+
data: "",
|
|
2271
|
+
event: "",
|
|
2272
|
+
id: "",
|
|
2273
|
+
retry: void 0
|
|
2274
|
+
};
|
|
2275
|
+
}
|
|
2276
|
+
//#endregion
|
|
2277
|
+
//#region node_modules/@microsoft/fetch-event-source/lib/esm/fetch.js
|
|
2278
|
+
var Hn = function(e, t) {
|
|
2279
|
+
var n = {};
|
|
2280
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2281
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
|
|
2282
|
+
return n;
|
|
2283
|
+
}, Un = "text/event-stream", Wn = 1e3, Gn = "last-event-id";
|
|
2284
|
+
function Kn(e, t) {
|
|
2285
|
+
var { signal: n, headers: r, onopen: i, onmessage: a, onclose: o, onerror: s, openWhenHidden: c, fetch: l } = t, u = Hn(t, [
|
|
2286
|
+
"signal",
|
|
2287
|
+
"headers",
|
|
2288
|
+
"onopen",
|
|
2289
|
+
"onmessage",
|
|
2290
|
+
"onclose",
|
|
2291
|
+
"onerror",
|
|
2292
|
+
"openWhenHidden",
|
|
2293
|
+
"fetch"
|
|
2294
|
+
]);
|
|
2295
|
+
return new Promise((t, d) => {
|
|
2296
|
+
let f = Object.assign({}, r);
|
|
2297
|
+
f.accept ||= Un;
|
|
2298
|
+
let p;
|
|
2299
|
+
function m() {
|
|
2300
|
+
p.abort(), document.hidden || b();
|
|
2301
|
+
}
|
|
2302
|
+
c || document.addEventListener("visibilitychange", m);
|
|
2303
|
+
let h = Wn, g = 0;
|
|
2304
|
+
function _() {
|
|
2305
|
+
document.removeEventListener("visibilitychange", m), window.clearTimeout(g), p.abort();
|
|
2306
|
+
}
|
|
2307
|
+
n?.addEventListener("abort", () => {
|
|
2308
|
+
_(), t();
|
|
2309
|
+
});
|
|
2310
|
+
let v = l ?? window.fetch, y = i ?? qn;
|
|
2311
|
+
async function b() {
|
|
2312
|
+
p = new AbortController();
|
|
2313
|
+
try {
|
|
2314
|
+
let n = await v(e, Object.assign(Object.assign({}, u), {
|
|
2315
|
+
headers: f,
|
|
2316
|
+
signal: p.signal
|
|
2317
|
+
}));
|
|
2318
|
+
await y(n), await Ln(n.body, Rn(zn((e) => {
|
|
2319
|
+
e ? f[Gn] = e : delete f[Gn];
|
|
2320
|
+
}, (e) => {
|
|
2321
|
+
h = e;
|
|
2322
|
+
}, a))), o?.(), _(), t();
|
|
2323
|
+
} catch (e) {
|
|
2324
|
+
if (!p.signal.aborted) try {
|
|
2325
|
+
let t = s?.(e) ?? h;
|
|
2326
|
+
window.clearTimeout(g), g = window.setTimeout(b, t);
|
|
2327
|
+
} catch (e) {
|
|
2328
|
+
_(), d(e);
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
2332
|
+
b();
|
|
2333
|
+
});
|
|
2334
|
+
}
|
|
2335
|
+
function qn(e) {
|
|
2336
|
+
let t = e.headers.get("content-type");
|
|
2337
|
+
if (!t?.startsWith("text/event-stream")) throw Error(`Expected content-type to be ${Un}, Actual: ${t}`);
|
|
2338
|
+
}
|
|
2339
|
+
//#endregion
|
|
2340
|
+
//#region src/protocols/sse.ts
|
|
2341
|
+
var Jn = (e) => (t, n = {}) => {
|
|
2342
|
+
if (t.protocol !== "SSE") throw Error("Invalid Protocol");
|
|
2343
|
+
let r = t.path.replace(/:(\w+)/g, (e, t) => n.params?.[t] || `:${t}`), i = r.startsWith("http") ? r : `${e}${r}`, a = /* @__PURE__ */ new Set(), o = new AbortController();
|
|
2344
|
+
return (async () => {
|
|
2345
|
+
await Kn(i, {
|
|
2346
|
+
method: t.method || "GET",
|
|
2347
|
+
headers: {
|
|
2348
|
+
"Content-Type": "application/json",
|
|
2349
|
+
Accept: "text/event-stream",
|
|
2350
|
+
...t.headers,
|
|
2351
|
+
...n.headers
|
|
2352
|
+
},
|
|
2353
|
+
body: n.body ? JSON.stringify(n.body) : void 0,
|
|
2354
|
+
signal: o.signal,
|
|
2355
|
+
openWhenHidden: !0,
|
|
2356
|
+
onmessage(e) {
|
|
2357
|
+
console.log("Raw SSE Message arrived:", e), a.forEach((t) => t({
|
|
2358
|
+
id: e.id,
|
|
2359
|
+
event: e.event,
|
|
2360
|
+
data: e.data
|
|
2361
|
+
}));
|
|
2362
|
+
},
|
|
2363
|
+
onopen: async (e) => {
|
|
2364
|
+
if (!e.ok) throw Error(`SSE Open Error: ${e.status}`);
|
|
2365
|
+
},
|
|
2366
|
+
onerror: (e) => {
|
|
2367
|
+
console.error("SSE stream error, attempting retry...", e);
|
|
2368
|
+
}
|
|
2369
|
+
});
|
|
2370
|
+
})(), {
|
|
2371
|
+
subscribe: (e) => (a.add(e), () => {
|
|
2372
|
+
a.delete(e), a.size === 0 && o.abort();
|
|
2373
|
+
}),
|
|
2374
|
+
close: () => {
|
|
2375
|
+
o.abort();
|
|
2376
|
+
}
|
|
2377
|
+
};
|
|
2378
|
+
}, Yn = class {
|
|
2379
|
+
constructor(e) {
|
|
2380
|
+
this.socketManagers = /* @__PURE__ */ new Map(), this.manifest = Fn(In, e), this.baseUrl = this.manifest.baseUrl;
|
|
2381
|
+
}
|
|
2382
|
+
async call(e, t) {
|
|
2383
|
+
let n = this.manifest.endpoints[e];
|
|
2384
|
+
if (n.protocol !== "REST") throw Error("Use .watch() for streams");
|
|
2385
|
+
return hn(this.baseUrl)(n, t);
|
|
2386
|
+
}
|
|
2387
|
+
watch(e, t = {}) {
|
|
2388
|
+
let n = this.manifest.endpoints[e];
|
|
2389
|
+
if (!n) throw Error(`Endpoint ${e} not found.`);
|
|
2390
|
+
switch (n.protocol) {
|
|
2391
|
+
case "WS":
|
|
2392
|
+
let r = mn(this.baseUrl.replace("http", "ws"), n.path, t.params);
|
|
2393
|
+
return console.log(`Connecting to WebSocket at ${r} with options:`, t), this.socketManagers.has(e) || this.socketManagers.set(e, new gn(n, r)), this.socketManagers.get(e);
|
|
2394
|
+
case "SSE": return Jn(mn(this.baseUrl, n.path, t.params))(n, t);
|
|
2395
|
+
default: throw Error(`Protocol ${n.protocol} is not streamable.`);
|
|
2396
|
+
}
|
|
2397
|
+
}
|
|
2398
|
+
};
|
|
2399
|
+
//#endregion
|
|
2400
|
+
export { Yn as APIEngine };
|