@openc3/js-common 7.0.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/services.cjs +18 -15
- package/dist/services.cjs.map +1 -1
- package/dist/services.js +1132 -1073
- package/dist/services.js.map +1 -1
- package/package.json +6 -6
package/dist/services.js
CHANGED
|
@@ -3,54 +3,58 @@ function At(n, e) {
|
|
|
3
3
|
return n.apply(e, arguments);
|
|
4
4
|
};
|
|
5
5
|
}
|
|
6
|
-
const { toString:
|
|
7
|
-
const t =
|
|
6
|
+
const { toString: on } = Object.prototype, { getPrototypeOf: Se } = Object, { iterator: Re, toStringTag: Ct } = Symbol, xe = /* @__PURE__ */ ((n) => (e) => {
|
|
7
|
+
const t = on.call(e);
|
|
8
8
|
return n[t] || (n[t] = t.slice(8, -1).toLowerCase());
|
|
9
|
-
})(/* @__PURE__ */ Object.create(null)), B = (n) => (n = n.toLowerCase(), (e) =>
|
|
10
|
-
function
|
|
11
|
-
return n !== null && !
|
|
9
|
+
})(/* @__PURE__ */ Object.create(null)), B = (n) => (n = n.toLowerCase(), (e) => xe(e) === n), Oe = (n) => (e) => typeof e === n, { isArray: te } = Array, ee = Oe("undefined");
|
|
10
|
+
function ie(n) {
|
|
11
|
+
return n !== null && !ee(n) && n.constructor !== null && !ee(n.constructor) && k(n.constructor.isBuffer) && n.constructor.isBuffer(n);
|
|
12
12
|
}
|
|
13
|
-
const
|
|
14
|
-
function
|
|
13
|
+
const Tt = B("ArrayBuffer");
|
|
14
|
+
function cn(n) {
|
|
15
15
|
let e;
|
|
16
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(n) : e = n && n.buffer &&
|
|
16
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(n) : e = n && n.buffer && Tt(n.buffer), e;
|
|
17
17
|
}
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
18
|
+
const an = Oe("string"), k = Oe("function"), Nt = Oe("number"), oe = (n) => n !== null && typeof n == "object", ln = (n) => n === !0 || n === !1, _e = (n) => {
|
|
19
|
+
if (xe(n) !== "object")
|
|
20
20
|
return !1;
|
|
21
|
-
const e =
|
|
22
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
23
|
-
},
|
|
24
|
-
if (!
|
|
21
|
+
const e = Se(n);
|
|
22
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Ct in n) && !(Re in n);
|
|
23
|
+
}, un = (n) => {
|
|
24
|
+
if (!oe(n) || ie(n))
|
|
25
25
|
return !1;
|
|
26
26
|
try {
|
|
27
27
|
return Object.keys(n).length === 0 && Object.getPrototypeOf(n) === Object.prototype;
|
|
28
28
|
} catch {
|
|
29
29
|
return !1;
|
|
30
30
|
}
|
|
31
|
-
},
|
|
32
|
-
function
|
|
31
|
+
}, dn = B("Date"), hn = B("File"), fn = (n) => !!(n && typeof n.uri < "u"), pn = (n) => n && typeof n.getParts < "u", mn = B("Blob"), gn = B("FileList"), bn = (n) => oe(n) && k(n.pipe);
|
|
32
|
+
function _n() {
|
|
33
33
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
34
34
|
}
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
e
|
|
39
|
-
|
|
35
|
+
const Ze = _n(), Ye = typeof Ze.FormData < "u" ? Ze.FormData : void 0, yn = (n) => {
|
|
36
|
+
if (!n) return !1;
|
|
37
|
+
if (Ye && n instanceof Ye) return !0;
|
|
38
|
+
const e = Se(n);
|
|
39
|
+
if (!e || e === Object.prototype || !k(n.append)) return !1;
|
|
40
|
+
const t = xe(n);
|
|
41
|
+
return t === "formdata" || // detect form-data instance
|
|
42
|
+
t === "object" && k(n.toString) && n.toString() === "[object FormData]";
|
|
43
|
+
}, wn = B("URLSearchParams"), [En, Sn, Rn, xn] = [
|
|
40
44
|
"ReadableStream",
|
|
41
45
|
"Request",
|
|
42
46
|
"Response",
|
|
43
47
|
"Headers"
|
|
44
|
-
].map(B),
|
|
45
|
-
function
|
|
48
|
+
].map(B), On = (n) => n.trim ? n.trim() : n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
49
|
+
function ce(n, e, { allOwnKeys: t = !1 } = {}) {
|
|
46
50
|
if (n === null || typeof n > "u")
|
|
47
51
|
return;
|
|
48
52
|
let r, s;
|
|
49
|
-
if (typeof n != "object" && (n = [n]),
|
|
53
|
+
if (typeof n != "object" && (n = [n]), te(n))
|
|
50
54
|
for (r = 0, s = n.length; r < s; r++)
|
|
51
55
|
e.call(null, n[r], r, n);
|
|
52
56
|
else {
|
|
53
|
-
if (
|
|
57
|
+
if (ie(n))
|
|
54
58
|
return;
|
|
55
59
|
const o = t ? Object.getOwnPropertyNames(n) : Object.keys(n), i = o.length;
|
|
56
60
|
let c;
|
|
@@ -58,8 +62,8 @@ function oe(n, e, { allOwnKeys: t = !1 } = {}) {
|
|
|
58
62
|
c = o[r], e.call(null, n[c], c, n);
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
|
-
function
|
|
62
|
-
if (
|
|
65
|
+
function Pt(n, e) {
|
|
66
|
+
if (ie(n))
|
|
63
67
|
return null;
|
|
64
68
|
e = e.toLowerCase();
|
|
65
69
|
const t = Object.keys(n);
|
|
@@ -69,22 +73,22 @@ function Nt(n, e) {
|
|
|
69
73
|
return s;
|
|
70
74
|
return null;
|
|
71
75
|
}
|
|
72
|
-
const K = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
73
|
-
function
|
|
74
|
-
const { caseless: n, skipUndefined: e } =
|
|
76
|
+
const K = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, kt = (n) => !ee(n) && n !== K;
|
|
77
|
+
function je() {
|
|
78
|
+
const { caseless: n, skipUndefined: e } = kt(this) && this || {}, t = {}, r = (s, o) => {
|
|
75
79
|
if (o === "__proto__" || o === "constructor" || o === "prototype")
|
|
76
80
|
return;
|
|
77
|
-
const i = n &&
|
|
78
|
-
|
|
81
|
+
const i = n && Pt(t, o) || o;
|
|
82
|
+
_e(t[i]) && _e(s) ? t[i] = je(t[i], s) : _e(s) ? t[i] = je({}, s) : te(s) ? t[i] = s.slice() : (!e || !ee(s)) && (t[i] = s);
|
|
79
83
|
};
|
|
80
84
|
for (let s = 0, o = arguments.length; s < o; s++)
|
|
81
|
-
arguments[s] &&
|
|
85
|
+
arguments[s] && ce(arguments[s], r);
|
|
82
86
|
return t;
|
|
83
87
|
}
|
|
84
|
-
const An = (n, e, t, { allOwnKeys: r } = {}) => (
|
|
88
|
+
const An = (n, e, t, { allOwnKeys: r } = {}) => (ce(
|
|
85
89
|
e,
|
|
86
90
|
(s, o) => {
|
|
87
|
-
t &&
|
|
91
|
+
t && k(s) ? Object.defineProperty(n, o, {
|
|
88
92
|
value: At(s, t),
|
|
89
93
|
writable: !0,
|
|
90
94
|
enumerable: !0,
|
|
@@ -97,7 +101,7 @@ const An = (n, e, t, { allOwnKeys: r } = {}) => (oe(
|
|
|
97
101
|
});
|
|
98
102
|
},
|
|
99
103
|
{ allOwnKeys: r }
|
|
100
|
-
), n),
|
|
104
|
+
), n), Cn = (n) => (n.charCodeAt(0) === 65279 && (n = n.slice(1)), n), Tn = (n, e, t, r) => {
|
|
101
105
|
n.prototype = Object.create(e.prototype, r), Object.defineProperty(n.prototype, "constructor", {
|
|
102
106
|
value: n,
|
|
103
107
|
writable: !0,
|
|
@@ -106,31 +110,31 @@ const An = (n, e, t, { allOwnKeys: r } = {}) => (oe(
|
|
|
106
110
|
}), Object.defineProperty(n, "super", {
|
|
107
111
|
value: e.prototype
|
|
108
112
|
}), t && Object.assign(n.prototype, t);
|
|
109
|
-
},
|
|
113
|
+
}, Nn = (n, e, t, r) => {
|
|
110
114
|
let s, o, i;
|
|
111
115
|
const c = {};
|
|
112
116
|
if (e = e || {}, n == null) return e;
|
|
113
117
|
do {
|
|
114
118
|
for (s = Object.getOwnPropertyNames(n), o = s.length; o-- > 0; )
|
|
115
119
|
i = s[o], (!r || r(i, n, e)) && !c[i] && (e[i] = n[i], c[i] = !0);
|
|
116
|
-
n = t !== !1 &&
|
|
120
|
+
n = t !== !1 && Se(n);
|
|
117
121
|
} while (n && (!t || t(n, e)) && n !== Object.prototype);
|
|
118
122
|
return e;
|
|
119
|
-
},
|
|
123
|
+
}, Pn = (n, e, t) => {
|
|
120
124
|
n = String(n), (t === void 0 || t > n.length) && (t = n.length), t -= e.length;
|
|
121
125
|
const r = n.indexOf(e, t);
|
|
122
126
|
return r !== -1 && r === t;
|
|
123
|
-
},
|
|
127
|
+
}, kn = (n) => {
|
|
124
128
|
if (!n) return null;
|
|
125
|
-
if (
|
|
129
|
+
if (te(n)) return n;
|
|
126
130
|
let e = n.length;
|
|
127
|
-
if (!
|
|
131
|
+
if (!Nt(e)) return null;
|
|
128
132
|
const t = new Array(e);
|
|
129
133
|
for (; e-- > 0; )
|
|
130
134
|
t[e] = n[e];
|
|
131
135
|
return t;
|
|
132
|
-
},
|
|
133
|
-
const r = (n && n[
|
|
136
|
+
}, In = /* @__PURE__ */ ((n) => (e) => n && e instanceof n)(typeof Uint8Array < "u" && Se(Uint8Array)), Ln = (n, e) => {
|
|
137
|
+
const r = (n && n[Re]).call(n);
|
|
134
138
|
let s;
|
|
135
139
|
for (; (s = r.next()) && !s.done; ) {
|
|
136
140
|
const o = s.value;
|
|
@@ -142,20 +146,20 @@ const An = (n, e, t, { allOwnKeys: r } = {}) => (oe(
|
|
|
142
146
|
for (; (t = n.exec(e)) !== null; )
|
|
143
147
|
r.push(t);
|
|
144
148
|
return r;
|
|
145
|
-
},
|
|
149
|
+
}, Fn = B("HTMLFormElement"), jn = (n) => n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(t, r, s) {
|
|
146
150
|
return r.toUpperCase() + s;
|
|
147
|
-
}),
|
|
151
|
+
}), et = (({ hasOwnProperty: n }) => (e, t) => n.call(e, t))(Object.prototype), $n = B("RegExp"), It = (n, e) => {
|
|
148
152
|
const t = Object.getOwnPropertyDescriptors(n), r = {};
|
|
149
|
-
|
|
153
|
+
ce(t, (s, o) => {
|
|
150
154
|
let i;
|
|
151
155
|
(i = e(s, o, n)) !== !1 && (r[o] = i || s);
|
|
152
156
|
}), Object.defineProperties(n, r);
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
if (
|
|
157
|
+
}, Dn = (n) => {
|
|
158
|
+
It(n, (e, t) => {
|
|
159
|
+
if (k(n) && ["arguments", "caller", "callee"].indexOf(t) !== -1)
|
|
156
160
|
return !1;
|
|
157
161
|
const r = n[t];
|
|
158
|
-
if (
|
|
162
|
+
if (k(r)) {
|
|
159
163
|
if (e.enumerable = !1, "writable" in e) {
|
|
160
164
|
e.writable = !1;
|
|
161
165
|
return;
|
|
@@ -171,32 +175,32 @@ const An = (n, e, t, { allOwnKeys: r } = {}) => (oe(
|
|
|
171
175
|
t[o] = !0;
|
|
172
176
|
});
|
|
173
177
|
};
|
|
174
|
-
return
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
function
|
|
178
|
-
return !!(n &&
|
|
178
|
+
return te(n) ? r(n) : r(String(n).split(e)), t;
|
|
179
|
+
}, qn = () => {
|
|
180
|
+
}, Bn = (n, e) => n != null && Number.isFinite(n = +n) ? n : e;
|
|
181
|
+
function Mn(n) {
|
|
182
|
+
return !!(n && k(n.append) && n[Ct] === "FormData" && n[Re]);
|
|
179
183
|
}
|
|
180
|
-
const
|
|
184
|
+
const Hn = (n) => {
|
|
181
185
|
const e = new Array(10), t = (r, s) => {
|
|
182
|
-
if (
|
|
186
|
+
if (oe(r)) {
|
|
183
187
|
if (e.indexOf(r) >= 0)
|
|
184
188
|
return;
|
|
185
|
-
if (
|
|
189
|
+
if (ie(r))
|
|
186
190
|
return r;
|
|
187
191
|
if (!("toJSON" in r)) {
|
|
188
192
|
e[s] = r;
|
|
189
|
-
const o =
|
|
190
|
-
return
|
|
191
|
-
const
|
|
192
|
-
!
|
|
193
|
+
const o = te(r) ? [] : {};
|
|
194
|
+
return ce(r, (i, c) => {
|
|
195
|
+
const u = t(i, s + 1);
|
|
196
|
+
!ee(u) && (o[c] = u);
|
|
193
197
|
}), e[s] = void 0, o;
|
|
194
198
|
}
|
|
195
199
|
}
|
|
196
200
|
return r;
|
|
197
201
|
};
|
|
198
202
|
return t(n, 0);
|
|
199
|
-
},
|
|
203
|
+
}, zn = B("AsyncFunction"), Vn = (n) => n && (oe(n) || k(n)) && k(n.then) && k(n.catch), Lt = ((n, e) => n ? setImmediate : e ? ((t, r) => (K.addEventListener(
|
|
200
204
|
"message",
|
|
201
205
|
({ source: s, data: o }) => {
|
|
202
206
|
s === K && o === t && r.length && r.shift()();
|
|
@@ -204,69 +208,69 @@ const Mn = (n) => {
|
|
|
204
208
|
!1
|
|
205
209
|
), (s) => {
|
|
206
210
|
r.push(s), K.postMessage(t, "*");
|
|
207
|
-
}))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(typeof setImmediate == "function",
|
|
208
|
-
isArray:
|
|
209
|
-
isArrayBuffer:
|
|
210
|
-
isBuffer:
|
|
211
|
-
isFormData:
|
|
212
|
-
isArrayBufferView:
|
|
213
|
-
isString:
|
|
214
|
-
isNumber:
|
|
215
|
-
isBoolean:
|
|
216
|
-
isObject:
|
|
217
|
-
isPlainObject:
|
|
218
|
-
isEmptyObject:
|
|
219
|
-
isReadableStream:
|
|
220
|
-
isRequest:
|
|
221
|
-
isResponse:
|
|
222
|
-
isHeaders:
|
|
223
|
-
isUndefined:
|
|
224
|
-
isDate:
|
|
211
|
+
}))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(typeof setImmediate == "function", k(K.postMessage)), Jn = typeof queueMicrotask < "u" ? queueMicrotask.bind(K) : typeof process < "u" && process.nextTick || Lt, Wn = (n) => n != null && k(n[Re]), l = {
|
|
212
|
+
isArray: te,
|
|
213
|
+
isArrayBuffer: Tt,
|
|
214
|
+
isBuffer: ie,
|
|
215
|
+
isFormData: yn,
|
|
216
|
+
isArrayBufferView: cn,
|
|
217
|
+
isString: an,
|
|
218
|
+
isNumber: Nt,
|
|
219
|
+
isBoolean: ln,
|
|
220
|
+
isObject: oe,
|
|
221
|
+
isPlainObject: _e,
|
|
222
|
+
isEmptyObject: un,
|
|
223
|
+
isReadableStream: En,
|
|
224
|
+
isRequest: Sn,
|
|
225
|
+
isResponse: Rn,
|
|
226
|
+
isHeaders: xn,
|
|
227
|
+
isUndefined: ee,
|
|
228
|
+
isDate: dn,
|
|
225
229
|
isFile: hn,
|
|
226
|
-
isReactNativeBlob:
|
|
227
|
-
isReactNative:
|
|
228
|
-
isBlob:
|
|
229
|
-
isRegExp:
|
|
230
|
-
isFunction:
|
|
231
|
-
isStream:
|
|
232
|
-
isURLSearchParams:
|
|
233
|
-
isTypedArray:
|
|
230
|
+
isReactNativeBlob: fn,
|
|
231
|
+
isReactNative: pn,
|
|
232
|
+
isBlob: mn,
|
|
233
|
+
isRegExp: $n,
|
|
234
|
+
isFunction: k,
|
|
235
|
+
isStream: bn,
|
|
236
|
+
isURLSearchParams: wn,
|
|
237
|
+
isTypedArray: In,
|
|
234
238
|
isFileList: gn,
|
|
235
|
-
forEach:
|
|
236
|
-
merge:
|
|
239
|
+
forEach: ce,
|
|
240
|
+
merge: je,
|
|
237
241
|
extend: An,
|
|
238
|
-
trim:
|
|
239
|
-
stripBOM:
|
|
240
|
-
inherits:
|
|
241
|
-
toFlatObject:
|
|
242
|
-
kindOf:
|
|
242
|
+
trim: On,
|
|
243
|
+
stripBOM: Cn,
|
|
244
|
+
inherits: Tn,
|
|
245
|
+
toFlatObject: Nn,
|
|
246
|
+
kindOf: xe,
|
|
243
247
|
kindOfTest: B,
|
|
244
|
-
endsWith:
|
|
245
|
-
toArray:
|
|
246
|
-
forEachEntry:
|
|
248
|
+
endsWith: Pn,
|
|
249
|
+
toArray: kn,
|
|
250
|
+
forEachEntry: Ln,
|
|
247
251
|
matchAll: vn,
|
|
248
|
-
isHTMLForm:
|
|
249
|
-
hasOwnProperty:
|
|
250
|
-
hasOwnProp:
|
|
252
|
+
isHTMLForm: Fn,
|
|
253
|
+
hasOwnProperty: et,
|
|
254
|
+
hasOwnProp: et,
|
|
251
255
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
252
|
-
reduceDescriptors:
|
|
253
|
-
freezeMethods:
|
|
256
|
+
reduceDescriptors: It,
|
|
257
|
+
freezeMethods: Dn,
|
|
254
258
|
toObjectSet: Un,
|
|
255
|
-
toCamelCase:
|
|
256
|
-
noop:
|
|
257
|
-
toFiniteNumber:
|
|
258
|
-
findKey:
|
|
259
|
+
toCamelCase: jn,
|
|
260
|
+
noop: qn,
|
|
261
|
+
toFiniteNumber: Bn,
|
|
262
|
+
findKey: Pt,
|
|
259
263
|
global: K,
|
|
260
|
-
isContextDefined:
|
|
261
|
-
isSpecCompliantForm:
|
|
262
|
-
toJSONObject:
|
|
263
|
-
isAsyncFn:
|
|
264
|
-
isThenable:
|
|
265
|
-
setImmediate:
|
|
266
|
-
asap:
|
|
267
|
-
isIterable:
|
|
264
|
+
isContextDefined: kt,
|
|
265
|
+
isSpecCompliantForm: Mn,
|
|
266
|
+
toJSONObject: Hn,
|
|
267
|
+
isAsyncFn: zn,
|
|
268
|
+
isThenable: Vn,
|
|
269
|
+
setImmediate: Lt,
|
|
270
|
+
asap: Jn,
|
|
271
|
+
isIterable: Wn
|
|
268
272
|
};
|
|
269
|
-
let
|
|
273
|
+
let _ = class vt extends Error {
|
|
270
274
|
static from(e, t, r, s, o, i) {
|
|
271
275
|
const c = new vt(e.message, t || e.code, r, s, o);
|
|
272
276
|
return c.cause = e, c.name = e.name, e.status != null && c.status == null && (c.status = e.status), i && Object.assign(c, i), c;
|
|
@@ -310,37 +314,38 @@ let b = class vt extends Error {
|
|
|
310
314
|
};
|
|
311
315
|
}
|
|
312
316
|
};
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
317
|
+
_.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
318
|
+
_.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
319
|
+
_.ECONNABORTED = "ECONNABORTED";
|
|
320
|
+
_.ETIMEDOUT = "ETIMEDOUT";
|
|
321
|
+
_.ERR_NETWORK = "ERR_NETWORK";
|
|
322
|
+
_.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
323
|
+
_.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
324
|
+
_.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
325
|
+
_.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
326
|
+
_.ERR_CANCELED = "ERR_CANCELED";
|
|
327
|
+
_.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
328
|
+
_.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
329
|
+
_.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
330
|
+
const Kn = null;
|
|
326
331
|
function $e(n) {
|
|
327
332
|
return l.isPlainObject(n) || l.isArray(n);
|
|
328
333
|
}
|
|
329
|
-
function
|
|
334
|
+
function Ft(n) {
|
|
330
335
|
return l.endsWith(n, "[]") ? n.slice(0, -2) : n;
|
|
331
336
|
}
|
|
332
|
-
function
|
|
337
|
+
function ke(n, e, t) {
|
|
333
338
|
return n ? n.concat(e).map(function(s, o) {
|
|
334
|
-
return s =
|
|
339
|
+
return s = Ft(s), !t && o ? "[" + s + "]" : s;
|
|
335
340
|
}).join(t ? "." : "") : e;
|
|
336
341
|
}
|
|
337
|
-
function
|
|
342
|
+
function Xn(n) {
|
|
338
343
|
return l.isArray(n) && !n.some($e);
|
|
339
344
|
}
|
|
340
345
|
const Gn = l.toFlatObject(l, {}, null, function(e) {
|
|
341
346
|
return /^is[A-Z]/.test(e);
|
|
342
347
|
});
|
|
343
|
-
function
|
|
348
|
+
function Ae(n, e, t) {
|
|
344
349
|
if (!l.isObject(n))
|
|
345
350
|
throw new TypeError("target must be an object");
|
|
346
351
|
e = e || new FormData(), t = l.toFlatObject(
|
|
@@ -351,105 +356,109 @@ function xe(n, e, t) {
|
|
|
351
356
|
indexes: !1
|
|
352
357
|
},
|
|
353
358
|
!1,
|
|
354
|
-
function(
|
|
355
|
-
return !l.isUndefined(
|
|
359
|
+
function(f, w) {
|
|
360
|
+
return !l.isUndefined(w[f]);
|
|
356
361
|
}
|
|
357
362
|
);
|
|
358
|
-
const r = t.metaTokens, s = t.visitor ||
|
|
363
|
+
const r = t.metaTokens, s = t.visitor || h, o = t.dots, i = t.indexes, c = t.Blob || typeof Blob < "u" && Blob, u = t.maxDepth === void 0 ? 100 : t.maxDepth, d = c && l.isSpecCompliantForm(e);
|
|
359
364
|
if (!l.isFunction(s))
|
|
360
365
|
throw new TypeError("visitor must be a function");
|
|
361
|
-
function
|
|
362
|
-
if (
|
|
363
|
-
if (l.isDate(
|
|
364
|
-
return
|
|
365
|
-
if (l.isBoolean(
|
|
366
|
-
return
|
|
367
|
-
if (!d && l.isBlob(
|
|
368
|
-
throw new
|
|
369
|
-
return l.isArrayBuffer(
|
|
370
|
-
}
|
|
371
|
-
function
|
|
372
|
-
let
|
|
373
|
-
if (l.isReactNative(e) && l.isReactNativeBlob(
|
|
374
|
-
return e.append(
|
|
375
|
-
if (
|
|
376
|
-
if (l.endsWith(
|
|
377
|
-
|
|
378
|
-
else if (l.isArray(
|
|
379
|
-
return
|
|
366
|
+
function a(p) {
|
|
367
|
+
if (p === null) return "";
|
|
368
|
+
if (l.isDate(p))
|
|
369
|
+
return p.toISOString();
|
|
370
|
+
if (l.isBoolean(p))
|
|
371
|
+
return p.toString();
|
|
372
|
+
if (!d && l.isBlob(p))
|
|
373
|
+
throw new _("Blob is not supported. Use a Buffer instead.");
|
|
374
|
+
return l.isArrayBuffer(p) || l.isTypedArray(p) ? d && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
375
|
+
}
|
|
376
|
+
function h(p, f, w) {
|
|
377
|
+
let x = p;
|
|
378
|
+
if (l.isReactNative(e) && l.isReactNativeBlob(p))
|
|
379
|
+
return e.append(ke(w, f, o), a(p)), !1;
|
|
380
|
+
if (p && !w && typeof p == "object") {
|
|
381
|
+
if (l.endsWith(f, "{}"))
|
|
382
|
+
f = r ? f : f.slice(0, -2), p = JSON.stringify(p);
|
|
383
|
+
else if (l.isArray(p) && Xn(p) || (l.isFileList(p) || l.endsWith(f, "[]")) && (x = l.toArray(p)))
|
|
384
|
+
return f = Ft(f), x.forEach(function(S, A) {
|
|
380
385
|
!(l.isUndefined(S) || S === null) && e.append(
|
|
381
386
|
// eslint-disable-next-line no-nested-ternary
|
|
382
|
-
i === !0 ?
|
|
383
|
-
|
|
387
|
+
i === !0 ? ke([f], A, o) : i === null ? f : f + "[]",
|
|
388
|
+
a(S)
|
|
384
389
|
);
|
|
385
390
|
}), !1;
|
|
386
391
|
}
|
|
387
|
-
return $e(
|
|
392
|
+
return $e(p) ? !0 : (e.append(ke(w, f, o), a(p)), !1);
|
|
388
393
|
}
|
|
389
|
-
const
|
|
390
|
-
defaultVisitor:
|
|
391
|
-
convertValue:
|
|
394
|
+
const b = [], g = Object.assign(Gn, {
|
|
395
|
+
defaultVisitor: h,
|
|
396
|
+
convertValue: a,
|
|
392
397
|
isVisitable: $e
|
|
393
398
|
});
|
|
394
|
-
function m(
|
|
395
|
-
if (!l.isUndefined(
|
|
396
|
-
if (
|
|
397
|
-
throw
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
399
|
+
function m(p, f, w = 0) {
|
|
400
|
+
if (!l.isUndefined(p)) {
|
|
401
|
+
if (w > u)
|
|
402
|
+
throw new _(
|
|
403
|
+
"Object is too deeply nested (" + w + " levels). Max depth: " + u,
|
|
404
|
+
_.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
405
|
+
);
|
|
406
|
+
if (b.indexOf(p) !== -1)
|
|
407
|
+
throw Error("Circular reference detected in " + f.join("."));
|
|
408
|
+
b.push(p), l.forEach(p, function(E, S) {
|
|
409
|
+
(!(l.isUndefined(E) || E === null) && s.call(e, E, l.isString(S) ? S.trim() : S, f, g)) === !0 && m(E, f ? f.concat(S) : [S], w + 1);
|
|
410
|
+
}), b.pop();
|
|
401
411
|
}
|
|
402
412
|
}
|
|
403
413
|
if (!l.isObject(n))
|
|
404
414
|
throw new TypeError("data must be an object");
|
|
405
415
|
return m(n), e;
|
|
406
416
|
}
|
|
407
|
-
function
|
|
417
|
+
function tt(n) {
|
|
408
418
|
const e = {
|
|
409
419
|
"!": "%21",
|
|
410
420
|
"'": "%27",
|
|
411
421
|
"(": "%28",
|
|
412
422
|
")": "%29",
|
|
413
423
|
"~": "%7E",
|
|
414
|
-
"%20": "+"
|
|
415
|
-
"%00": "\0"
|
|
424
|
+
"%20": "+"
|
|
416
425
|
};
|
|
417
|
-
return encodeURIComponent(n).replace(/[!'()~]|%20
|
|
426
|
+
return encodeURIComponent(n).replace(/[!'()~]|%20/g, function(r) {
|
|
418
427
|
return e[r];
|
|
419
428
|
});
|
|
420
429
|
}
|
|
421
|
-
function
|
|
422
|
-
this._pairs = [], n &&
|
|
430
|
+
function Me(n, e) {
|
|
431
|
+
this._pairs = [], n && Ae(n, this, e);
|
|
423
432
|
}
|
|
424
|
-
const
|
|
425
|
-
|
|
433
|
+
const jt = Me.prototype;
|
|
434
|
+
jt.append = function(e, t) {
|
|
426
435
|
this._pairs.push([e, t]);
|
|
427
436
|
};
|
|
428
|
-
|
|
437
|
+
jt.toString = function(e) {
|
|
429
438
|
const t = e ? function(r) {
|
|
430
|
-
return e.call(this, r,
|
|
431
|
-
} :
|
|
439
|
+
return e.call(this, r, tt);
|
|
440
|
+
} : tt;
|
|
432
441
|
return this._pairs.map(function(s) {
|
|
433
442
|
return t(s[0]) + "=" + t(s[1]);
|
|
434
443
|
}, "").join("&");
|
|
435
444
|
};
|
|
436
|
-
function
|
|
445
|
+
function Qn(n) {
|
|
437
446
|
return encodeURIComponent(n).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
438
447
|
}
|
|
439
|
-
function
|
|
448
|
+
function $t(n, e, t) {
|
|
440
449
|
if (!e)
|
|
441
450
|
return n;
|
|
442
|
-
const r = t && t.encode ||
|
|
451
|
+
const r = t && t.encode || Qn, s = l.isFunction(t) ? {
|
|
443
452
|
serialize: t
|
|
444
453
|
} : t, o = s && s.serialize;
|
|
445
454
|
let i;
|
|
446
|
-
if (o ? i = o(e, s) : i = l.isURLSearchParams(e) ? e.toString() : new
|
|
455
|
+
if (o ? i = o(e, s) : i = l.isURLSearchParams(e) ? e.toString() : new Me(e, s).toString(r), i) {
|
|
447
456
|
const c = n.indexOf("#");
|
|
448
457
|
c !== -1 && (n = n.slice(0, c)), n += (n.indexOf("?") === -1 ? "?" : "&") + i;
|
|
449
458
|
}
|
|
450
459
|
return n;
|
|
451
460
|
}
|
|
452
|
-
class
|
|
461
|
+
class nt {
|
|
453
462
|
constructor() {
|
|
454
463
|
this.handlers = [];
|
|
455
464
|
}
|
|
@@ -504,43 +513,43 @@ class tt {
|
|
|
504
513
|
});
|
|
505
514
|
}
|
|
506
515
|
}
|
|
507
|
-
const
|
|
516
|
+
const He = {
|
|
508
517
|
silentJSONParsing: !0,
|
|
509
518
|
forcedJSONParsing: !0,
|
|
510
519
|
clarifyTimeoutError: !1,
|
|
511
520
|
legacyInterceptorReqResOrdering: !0
|
|
512
|
-
},
|
|
521
|
+
}, Zn = typeof URLSearchParams < "u" ? URLSearchParams : Me, Yn = typeof FormData < "u" ? FormData : null, er = typeof Blob < "u" ? Blob : null, tr = {
|
|
513
522
|
isBrowser: !0,
|
|
514
523
|
classes: {
|
|
515
|
-
URLSearchParams:
|
|
516
|
-
FormData:
|
|
517
|
-
Blob:
|
|
524
|
+
URLSearchParams: Zn,
|
|
525
|
+
FormData: Yn,
|
|
526
|
+
Blob: er
|
|
518
527
|
},
|
|
519
528
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
520
|
-
},
|
|
521
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
529
|
+
}, ze = typeof window < "u" && typeof document < "u", De = typeof navigator == "object" && navigator || void 0, nr = ze && (!De || ["ReactNative", "NativeScript", "NS"].indexOf(De.product) < 0), rr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
530
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", sr = ze && window.location.href || "http://localhost", ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
522
531
|
__proto__: null,
|
|
523
|
-
hasBrowserEnv:
|
|
524
|
-
hasStandardBrowserEnv:
|
|
525
|
-
hasStandardBrowserWebWorkerEnv:
|
|
526
|
-
navigator:
|
|
527
|
-
origin:
|
|
528
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
529
|
-
...
|
|
530
|
-
...
|
|
532
|
+
hasBrowserEnv: ze,
|
|
533
|
+
hasStandardBrowserEnv: nr,
|
|
534
|
+
hasStandardBrowserWebWorkerEnv: rr,
|
|
535
|
+
navigator: De,
|
|
536
|
+
origin: sr
|
|
537
|
+
}, Symbol.toStringTag, { value: "Module" })), P = {
|
|
538
|
+
...ir,
|
|
539
|
+
...tr
|
|
531
540
|
};
|
|
532
|
-
function
|
|
533
|
-
return
|
|
541
|
+
function or(n, e) {
|
|
542
|
+
return Ae(n, new P.classes.URLSearchParams(), {
|
|
534
543
|
visitor: function(t, r, s, o) {
|
|
535
|
-
return
|
|
544
|
+
return P.isNode && l.isBuffer(t) ? (this.append(r, t.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
536
545
|
},
|
|
537
546
|
...e
|
|
538
547
|
});
|
|
539
548
|
}
|
|
540
|
-
function
|
|
549
|
+
function cr(n) {
|
|
541
550
|
return l.matchAll(/\w+|\[(\w*)]/g, n).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
542
551
|
}
|
|
543
|
-
function
|
|
552
|
+
function ar(n) {
|
|
544
553
|
const e = {}, t = Object.keys(n);
|
|
545
554
|
let r;
|
|
546
555
|
const s = t.length;
|
|
@@ -549,22 +558,23 @@ function cr(n) {
|
|
|
549
558
|
o = t[r], e[o] = n[o];
|
|
550
559
|
return e;
|
|
551
560
|
}
|
|
552
|
-
function
|
|
561
|
+
function Dt(n) {
|
|
553
562
|
function e(t, r, s, o) {
|
|
554
563
|
let i = t[o++];
|
|
555
564
|
if (i === "__proto__") return !0;
|
|
556
|
-
const c = Number.isFinite(+i),
|
|
557
|
-
return i = !i && l.isArray(s) ? s.length : i,
|
|
565
|
+
const c = Number.isFinite(+i), u = o >= t.length;
|
|
566
|
+
return i = !i && l.isArray(s) ? s.length : i, u ? (l.hasOwnProp(s, i) ? s[i] = l.isArray(s[i]) ? s[i].concat(r) : [s[i], r] : s[i] = r, !c) : ((!s[i] || !l.isObject(s[i])) && (s[i] = []), e(t, r, s[i], o) && l.isArray(s[i]) && (s[i] = ar(s[i])), !c);
|
|
558
567
|
}
|
|
559
568
|
if (l.isFormData(n) && l.isFunction(n.entries)) {
|
|
560
569
|
const t = {};
|
|
561
570
|
return l.forEachEntry(n, (r, s) => {
|
|
562
|
-
e(
|
|
571
|
+
e(cr(r), s, t, 0);
|
|
563
572
|
}), t;
|
|
564
573
|
}
|
|
565
574
|
return null;
|
|
566
575
|
}
|
|
567
|
-
|
|
576
|
+
const Z = (n, e) => n != null && l.hasOwnProp(n, e) ? n[e] : void 0;
|
|
577
|
+
function lr(n, e, t) {
|
|
568
578
|
if (l.isString(n))
|
|
569
579
|
try {
|
|
570
580
|
return (e || JSON.parse)(n), l.trim(n);
|
|
@@ -574,14 +584,14 @@ function ar(n, e, t) {
|
|
|
574
584
|
}
|
|
575
585
|
return (t || JSON.stringify)(n);
|
|
576
586
|
}
|
|
577
|
-
const
|
|
578
|
-
transitional:
|
|
587
|
+
const ae = {
|
|
588
|
+
transitional: He,
|
|
579
589
|
adapter: ["xhr", "http", "fetch"],
|
|
580
590
|
transformRequest: [
|
|
581
591
|
function(e, t) {
|
|
582
592
|
const r = t.getContentType() || "", s = r.indexOf("application/json") > -1, o = l.isObject(e);
|
|
583
593
|
if (o && l.isHTMLForm(e) && (e = new FormData(e)), l.isFormData(e))
|
|
584
|
-
return s ? JSON.stringify(
|
|
594
|
+
return s ? JSON.stringify(Dt(e)) : e;
|
|
585
595
|
if (l.isArrayBuffer(e) || l.isBuffer(e) || l.isStream(e) || l.isFile(e) || l.isBlob(e) || l.isReadableStream(e))
|
|
586
596
|
return e;
|
|
587
597
|
if (l.isArrayBufferView(e))
|
|
@@ -590,32 +600,33 @@ const ce = {
|
|
|
590
600
|
return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
591
601
|
let c;
|
|
592
602
|
if (o) {
|
|
603
|
+
const u = Z(this, "formSerializer");
|
|
593
604
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
594
|
-
return
|
|
605
|
+
return or(e, u).toString();
|
|
595
606
|
if ((c = l.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
|
|
596
|
-
const d = this
|
|
597
|
-
return
|
|
607
|
+
const d = Z(this, "env"), a = d && d.FormData;
|
|
608
|
+
return Ae(
|
|
598
609
|
c ? { "files[]": e } : e,
|
|
599
|
-
|
|
600
|
-
|
|
610
|
+
a && new a(),
|
|
611
|
+
u
|
|
601
612
|
);
|
|
602
613
|
}
|
|
603
614
|
}
|
|
604
|
-
return o || s ? (t.setContentType("application/json", !1),
|
|
615
|
+
return o || s ? (t.setContentType("application/json", !1), lr(e)) : e;
|
|
605
616
|
}
|
|
606
617
|
],
|
|
607
618
|
transformResponse: [
|
|
608
619
|
function(e) {
|
|
609
|
-
const t = this
|
|
620
|
+
const t = Z(this, "transitional") || ae.transitional, r = t && t.forcedJSONParsing, s = Z(this, "responseType"), o = s === "json";
|
|
610
621
|
if (l.isResponse(e) || l.isReadableStream(e))
|
|
611
622
|
return e;
|
|
612
|
-
if (e && l.isString(e) && (r && !
|
|
613
|
-
const
|
|
623
|
+
if (e && l.isString(e) && (r && !s || o)) {
|
|
624
|
+
const c = !(t && t.silentJSONParsing) && o;
|
|
614
625
|
try {
|
|
615
|
-
return JSON.parse(e, this
|
|
616
|
-
} catch (
|
|
617
|
-
if (
|
|
618
|
-
throw
|
|
626
|
+
return JSON.parse(e, Z(this, "parseReviver"));
|
|
627
|
+
} catch (u) {
|
|
628
|
+
if (c)
|
|
629
|
+
throw u.name === "SyntaxError" ? _.from(u, _.ERR_BAD_RESPONSE, this, null, Z(this, "response")) : u;
|
|
619
630
|
}
|
|
620
631
|
}
|
|
621
632
|
return e;
|
|
@@ -631,8 +642,8 @@ const ce = {
|
|
|
631
642
|
maxContentLength: -1,
|
|
632
643
|
maxBodyLength: -1,
|
|
633
644
|
env: {
|
|
634
|
-
FormData:
|
|
635
|
-
Blob:
|
|
645
|
+
FormData: P.classes.FormData,
|
|
646
|
+
Blob: P.classes.Blob
|
|
636
647
|
},
|
|
637
648
|
validateStatus: function(e) {
|
|
638
649
|
return e >= 200 && e < 300;
|
|
@@ -645,9 +656,9 @@ const ce = {
|
|
|
645
656
|
}
|
|
646
657
|
};
|
|
647
658
|
l.forEach(["delete", "get", "head", "post", "put", "patch"], (n) => {
|
|
648
|
-
|
|
659
|
+
ae.headers[n] = {};
|
|
649
660
|
});
|
|
650
|
-
const
|
|
661
|
+
const ur = l.toObjectSet([
|
|
651
662
|
"age",
|
|
652
663
|
"authorization",
|
|
653
664
|
"content-length",
|
|
@@ -665,29 +676,48 @@ const lr = l.toObjectSet([
|
|
|
665
676
|
"referer",
|
|
666
677
|
"retry-after",
|
|
667
678
|
"user-agent"
|
|
668
|
-
]),
|
|
679
|
+
]), dr = (n) => {
|
|
669
680
|
const e = {};
|
|
670
681
|
let t, r, s;
|
|
671
682
|
return n && n.split(`
|
|
672
683
|
`).forEach(function(i) {
|
|
673
|
-
s = i.indexOf(":"), t = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!t || e[t] &&
|
|
684
|
+
s = i.indexOf(":"), t = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!t || e[t] && ur[t]) && (t === "set-cookie" ? e[t] ? e[t].push(r) : e[t] = [r] : e[t] = e[t] ? e[t] + ", " + r : r);
|
|
674
685
|
}), e;
|
|
675
|
-
},
|
|
676
|
-
function
|
|
686
|
+
}, rt = /* @__PURE__ */ Symbol("internals"), hr = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
687
|
+
function fr(n) {
|
|
688
|
+
let e = 0, t = n.length;
|
|
689
|
+
for (; e < t; ) {
|
|
690
|
+
const r = n.charCodeAt(e);
|
|
691
|
+
if (r !== 9 && r !== 32)
|
|
692
|
+
break;
|
|
693
|
+
e += 1;
|
|
694
|
+
}
|
|
695
|
+
for (; t > e; ) {
|
|
696
|
+
const r = n.charCodeAt(t - 1);
|
|
697
|
+
if (r !== 9 && r !== 32)
|
|
698
|
+
break;
|
|
699
|
+
t -= 1;
|
|
700
|
+
}
|
|
701
|
+
return e === 0 && t === n.length ? n : n.slice(e, t);
|
|
702
|
+
}
|
|
703
|
+
function ne(n) {
|
|
677
704
|
return n && String(n).trim().toLowerCase();
|
|
678
705
|
}
|
|
679
|
-
function
|
|
680
|
-
return
|
|
706
|
+
function pr(n) {
|
|
707
|
+
return fr(n.replace(hr, ""));
|
|
681
708
|
}
|
|
682
|
-
function
|
|
709
|
+
function ye(n) {
|
|
710
|
+
return n === !1 || n == null ? n : l.isArray(n) ? n.map(ye) : pr(String(n));
|
|
711
|
+
}
|
|
712
|
+
function mr(n) {
|
|
683
713
|
const e = /* @__PURE__ */ Object.create(null), t = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
684
714
|
let r;
|
|
685
715
|
for (; r = t.exec(n); )
|
|
686
716
|
e[r[1]] = r[2];
|
|
687
717
|
return e;
|
|
688
718
|
}
|
|
689
|
-
const
|
|
690
|
-
function
|
|
719
|
+
const gr = (n) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());
|
|
720
|
+
function Ie(n, e, t, r, s) {
|
|
691
721
|
if (l.isFunction(r))
|
|
692
722
|
return r.call(this, e, t);
|
|
693
723
|
if (s && (e = t), !!l.isString(e)) {
|
|
@@ -697,10 +727,10 @@ function Pe(n, e, t, r, s) {
|
|
|
697
727
|
return r.test(e);
|
|
698
728
|
}
|
|
699
729
|
}
|
|
700
|
-
function
|
|
730
|
+
function br(n) {
|
|
701
731
|
return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, r) => t.toUpperCase() + r);
|
|
702
732
|
}
|
|
703
|
-
function
|
|
733
|
+
function _r(n, e) {
|
|
704
734
|
const t = l.toCamelCase(" " + e);
|
|
705
735
|
["get", "set", "has"].forEach((r) => {
|
|
706
736
|
Object.defineProperty(n, r + t, {
|
|
@@ -711,30 +741,30 @@ function pr(n, e) {
|
|
|
711
741
|
});
|
|
712
742
|
});
|
|
713
743
|
}
|
|
714
|
-
let
|
|
744
|
+
let I = class {
|
|
715
745
|
constructor(e) {
|
|
716
746
|
e && this.set(e);
|
|
717
747
|
}
|
|
718
748
|
set(e, t, r) {
|
|
719
749
|
const s = this;
|
|
720
|
-
function o(c,
|
|
721
|
-
const a =
|
|
750
|
+
function o(c, u, d) {
|
|
751
|
+
const a = ne(u);
|
|
722
752
|
if (!a)
|
|
723
753
|
throw new Error("header name must be a non-empty string");
|
|
724
|
-
const
|
|
725
|
-
(!
|
|
754
|
+
const h = l.findKey(s, a);
|
|
755
|
+
(!h || s[h] === void 0 || d === !0 || d === void 0 && s[h] !== !1) && (s[h || u] = ye(c));
|
|
726
756
|
}
|
|
727
|
-
const i = (c,
|
|
757
|
+
const i = (c, u) => l.forEach(c, (d, a) => o(d, a, u));
|
|
728
758
|
if (l.isPlainObject(e) || e instanceof this.constructor)
|
|
729
759
|
i(e, t);
|
|
730
|
-
else if (l.isString(e) && (e = e.trim()) && !
|
|
731
|
-
i(
|
|
760
|
+
else if (l.isString(e) && (e = e.trim()) && !gr(e))
|
|
761
|
+
i(dr(e), t);
|
|
732
762
|
else if (l.isObject(e) && l.isIterable(e)) {
|
|
733
|
-
let c = {},
|
|
763
|
+
let c = {}, u, d;
|
|
734
764
|
for (const a of e) {
|
|
735
765
|
if (!l.isArray(a))
|
|
736
766
|
throw TypeError("Object iterator must return a key-value pair");
|
|
737
|
-
c[
|
|
767
|
+
c[d = a[0]] = (u = c[d]) ? l.isArray(u) ? [...u, a[1]] : [u, a[1]] : a[1];
|
|
738
768
|
}
|
|
739
769
|
i(c, t);
|
|
740
770
|
} else
|
|
@@ -742,14 +772,14 @@ let k = class {
|
|
|
742
772
|
return this;
|
|
743
773
|
}
|
|
744
774
|
get(e, t) {
|
|
745
|
-
if (e =
|
|
775
|
+
if (e = ne(e), e) {
|
|
746
776
|
const r = l.findKey(this, e);
|
|
747
777
|
if (r) {
|
|
748
778
|
const s = this[r];
|
|
749
779
|
if (!t)
|
|
750
780
|
return s;
|
|
751
781
|
if (t === !0)
|
|
752
|
-
return
|
|
782
|
+
return mr(s);
|
|
753
783
|
if (l.isFunction(t))
|
|
754
784
|
return t.call(this, s, r);
|
|
755
785
|
if (l.isRegExp(t))
|
|
@@ -759,9 +789,9 @@ let k = class {
|
|
|
759
789
|
}
|
|
760
790
|
}
|
|
761
791
|
has(e, t) {
|
|
762
|
-
if (e =
|
|
792
|
+
if (e = ne(e), e) {
|
|
763
793
|
const r = l.findKey(this, e);
|
|
764
|
-
return !!(r && this[r] !== void 0 && (!t ||
|
|
794
|
+
return !!(r && this[r] !== void 0 && (!t || Ie(this, this[r], r, t)));
|
|
765
795
|
}
|
|
766
796
|
return !1;
|
|
767
797
|
}
|
|
@@ -769,9 +799,9 @@ let k = class {
|
|
|
769
799
|
const r = this;
|
|
770
800
|
let s = !1;
|
|
771
801
|
function o(i) {
|
|
772
|
-
if (i =
|
|
802
|
+
if (i = ne(i), i) {
|
|
773
803
|
const c = l.findKey(r, i);
|
|
774
|
-
c && (!t ||
|
|
804
|
+
c && (!t || Ie(r, r[c], c, t)) && (delete r[c], s = !0);
|
|
775
805
|
}
|
|
776
806
|
}
|
|
777
807
|
return l.isArray(e) ? e.forEach(o) : o(e), s;
|
|
@@ -781,7 +811,7 @@ let k = class {
|
|
|
781
811
|
let r = t.length, s = !1;
|
|
782
812
|
for (; r--; ) {
|
|
783
813
|
const o = t[r];
|
|
784
|
-
(!e ||
|
|
814
|
+
(!e || Ie(this, this[o], o, e, !0)) && (delete this[o], s = !0);
|
|
785
815
|
}
|
|
786
816
|
return s;
|
|
787
817
|
}
|
|
@@ -790,11 +820,11 @@ let k = class {
|
|
|
790
820
|
return l.forEach(this, (s, o) => {
|
|
791
821
|
const i = l.findKey(r, o);
|
|
792
822
|
if (i) {
|
|
793
|
-
t[i] =
|
|
823
|
+
t[i] = ye(s), delete t[o];
|
|
794
824
|
return;
|
|
795
825
|
}
|
|
796
|
-
const c = e ?
|
|
797
|
-
c !== o && delete t[o], t[c] =
|
|
826
|
+
const c = e ? br(o) : String(o).trim();
|
|
827
|
+
c !== o && delete t[o], t[c] = ye(s), r[c] = !0;
|
|
798
828
|
}), this;
|
|
799
829
|
}
|
|
800
830
|
concat(...e) {
|
|
@@ -827,17 +857,17 @@ let k = class {
|
|
|
827
857
|
return t.forEach((s) => r.set(s)), r;
|
|
828
858
|
}
|
|
829
859
|
static accessor(e) {
|
|
830
|
-
const r = (this[
|
|
860
|
+
const r = (this[rt] = this[rt] = {
|
|
831
861
|
accessors: {}
|
|
832
862
|
}).accessors, s = this.prototype;
|
|
833
863
|
function o(i) {
|
|
834
|
-
const c =
|
|
835
|
-
r[c] || (
|
|
864
|
+
const c = ne(i);
|
|
865
|
+
r[c] || (_r(s, i), r[c] = !0);
|
|
836
866
|
}
|
|
837
867
|
return l.isArray(e) ? e.forEach(o) : o(e), this;
|
|
838
868
|
}
|
|
839
869
|
};
|
|
840
|
-
|
|
870
|
+
I.accessor([
|
|
841
871
|
"Content-Type",
|
|
842
872
|
"Content-Length",
|
|
843
873
|
"Accept",
|
|
@@ -845,7 +875,7 @@ k.accessor([
|
|
|
845
875
|
"User-Agent",
|
|
846
876
|
"Authorization"
|
|
847
877
|
]);
|
|
848
|
-
l.reduceDescriptors(
|
|
878
|
+
l.reduceDescriptors(I.prototype, ({ value: n }, e) => {
|
|
849
879
|
let t = e[0].toUpperCase() + e.slice(1);
|
|
850
880
|
return {
|
|
851
881
|
get: () => n,
|
|
@@ -854,9 +884,9 @@ l.reduceDescriptors(k.prototype, ({ value: n }, e) => {
|
|
|
854
884
|
}
|
|
855
885
|
};
|
|
856
886
|
});
|
|
857
|
-
l.freezeMethods(
|
|
858
|
-
function
|
|
859
|
-
const t = this ||
|
|
887
|
+
l.freezeMethods(I);
|
|
888
|
+
function Le(n, e) {
|
|
889
|
+
const t = this || ae, r = e || t, s = I.from(r.headers);
|
|
860
890
|
let o = r.data;
|
|
861
891
|
return l.forEach(n, function(c) {
|
|
862
892
|
o = c.call(t, o, s.normalize(), e ? e.status : void 0);
|
|
@@ -865,7 +895,7 @@ function ke(n, e) {
|
|
|
865
895
|
function Ut(n) {
|
|
866
896
|
return !!(n && n.__CANCEL__);
|
|
867
897
|
}
|
|
868
|
-
let
|
|
898
|
+
let le = class extends _ {
|
|
869
899
|
/**
|
|
870
900
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
871
901
|
*
|
|
@@ -876,73 +906,73 @@ let ae = class extends b {
|
|
|
876
906
|
* @returns {CanceledError} The created error.
|
|
877
907
|
*/
|
|
878
908
|
constructor(e, t, r) {
|
|
879
|
-
super(e ?? "canceled",
|
|
909
|
+
super(e ?? "canceled", _.ERR_CANCELED, t, r), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
880
910
|
}
|
|
881
911
|
};
|
|
882
|
-
function
|
|
912
|
+
function qt(n, e, t) {
|
|
883
913
|
const r = t.config.validateStatus;
|
|
884
914
|
!t.status || !r || r(t.status) ? n(t) : e(
|
|
885
|
-
new
|
|
915
|
+
new _(
|
|
886
916
|
"Request failed with status code " + t.status,
|
|
887
|
-
[
|
|
917
|
+
[_.ERR_BAD_REQUEST, _.ERR_BAD_RESPONSE][Math.floor(t.status / 100) - 4],
|
|
888
918
|
t.config,
|
|
889
919
|
t.request,
|
|
890
920
|
t
|
|
891
921
|
)
|
|
892
922
|
);
|
|
893
923
|
}
|
|
894
|
-
function
|
|
924
|
+
function yr(n) {
|
|
895
925
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(n);
|
|
896
926
|
return e && e[1] || "";
|
|
897
927
|
}
|
|
898
|
-
function
|
|
928
|
+
function wr(n, e) {
|
|
899
929
|
n = n || 10;
|
|
900
930
|
const t = new Array(n), r = new Array(n);
|
|
901
931
|
let s = 0, o = 0, i;
|
|
902
|
-
return e = e !== void 0 ? e : 1e3, function(
|
|
903
|
-
const
|
|
904
|
-
i || (i =
|
|
905
|
-
let
|
|
906
|
-
for (;
|
|
907
|
-
|
|
908
|
-
if (s = (s + 1) % n, s === o && (o = (o + 1) % n),
|
|
932
|
+
return e = e !== void 0 ? e : 1e3, function(u) {
|
|
933
|
+
const d = Date.now(), a = r[o];
|
|
934
|
+
i || (i = d), t[s] = u, r[s] = d;
|
|
935
|
+
let h = o, b = 0;
|
|
936
|
+
for (; h !== s; )
|
|
937
|
+
b += t[h++], h = h % n;
|
|
938
|
+
if (s = (s + 1) % n, s === o && (o = (o + 1) % n), d - i < e)
|
|
909
939
|
return;
|
|
910
|
-
const
|
|
911
|
-
return
|
|
940
|
+
const g = a && d - a;
|
|
941
|
+
return g ? Math.round(b * 1e3 / g) : void 0;
|
|
912
942
|
};
|
|
913
943
|
}
|
|
914
|
-
function
|
|
944
|
+
function Er(n, e) {
|
|
915
945
|
let t = 0, r = 1e3 / e, s, o;
|
|
916
|
-
const i = (
|
|
917
|
-
t = a, s = null, o && (clearTimeout(o), o = null), n(...
|
|
946
|
+
const i = (d, a = Date.now()) => {
|
|
947
|
+
t = a, s = null, o && (clearTimeout(o), o = null), n(...d);
|
|
918
948
|
};
|
|
919
|
-
return [(...
|
|
920
|
-
const a = Date.now(),
|
|
921
|
-
|
|
949
|
+
return [(...d) => {
|
|
950
|
+
const a = Date.now(), h = a - t;
|
|
951
|
+
h >= r ? i(d, a) : (s = d, o || (o = setTimeout(() => {
|
|
922
952
|
o = null, i(s);
|
|
923
|
-
}, r -
|
|
953
|
+
}, r - h)));
|
|
924
954
|
}, () => s && i(s)];
|
|
925
955
|
}
|
|
926
|
-
const
|
|
956
|
+
const Ee = (n, e, t = 3) => {
|
|
927
957
|
let r = 0;
|
|
928
|
-
const s =
|
|
929
|
-
return
|
|
930
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0,
|
|
931
|
-
r =
|
|
932
|
-
const
|
|
933
|
-
loaded:
|
|
958
|
+
const s = wr(50, 250);
|
|
959
|
+
return Er((o) => {
|
|
960
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, u = c != null ? Math.min(i, c) : i, d = Math.max(0, u - r), a = s(d);
|
|
961
|
+
r = Math.max(r, u);
|
|
962
|
+
const h = {
|
|
963
|
+
loaded: u,
|
|
934
964
|
total: c,
|
|
935
|
-
progress: c ?
|
|
965
|
+
progress: c ? u / c : void 0,
|
|
936
966
|
bytes: d,
|
|
937
|
-
rate:
|
|
938
|
-
estimated:
|
|
967
|
+
rate: a || void 0,
|
|
968
|
+
estimated: a && c ? (c - u) / a : void 0,
|
|
939
969
|
event: o,
|
|
940
970
|
lengthComputable: c != null,
|
|
941
971
|
[e ? "download" : "upload"]: !0
|
|
942
972
|
};
|
|
943
|
-
n(
|
|
973
|
+
n(h);
|
|
944
974
|
}, t);
|
|
945
|
-
},
|
|
975
|
+
}, st = (n, e) => {
|
|
946
976
|
const t = n != null;
|
|
947
977
|
return [
|
|
948
978
|
(r) => e[0]({
|
|
@@ -952,10 +982,10 @@ const we = (n, e, t = 3) => {
|
|
|
952
982
|
}),
|
|
953
983
|
e[1]
|
|
954
984
|
];
|
|
955
|
-
},
|
|
956
|
-
new URL(
|
|
957
|
-
|
|
958
|
-
) : () => !0,
|
|
985
|
+
}, it = (n) => (...e) => l.asap(() => n(...e)), Sr = P.hasStandardBrowserEnv ? /* @__PURE__ */ ((n, e) => (t) => (t = new URL(t, P.origin), n.protocol === t.protocol && n.host === t.host && (e || n.port === t.port)))(
|
|
986
|
+
new URL(P.origin),
|
|
987
|
+
P.navigator && /(msie|trident)/i.test(P.navigator.userAgent)
|
|
988
|
+
) : () => !0, Rr = P.hasStandardBrowserEnv ? (
|
|
959
989
|
// Standard browser envs support document.cookie
|
|
960
990
|
{
|
|
961
991
|
write(n, e, t, r, s, o, i) {
|
|
@@ -984,46 +1014,52 @@ const we = (n, e, t = 3) => {
|
|
|
984
1014
|
}
|
|
985
1015
|
}
|
|
986
1016
|
);
|
|
987
|
-
function
|
|
1017
|
+
function xr(n) {
|
|
988
1018
|
return typeof n != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(n);
|
|
989
1019
|
}
|
|
990
|
-
function
|
|
1020
|
+
function Or(n, e) {
|
|
991
1021
|
return e ? n.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : n;
|
|
992
1022
|
}
|
|
993
|
-
function
|
|
994
|
-
let r = !
|
|
995
|
-
return n && (r || t
|
|
1023
|
+
function Bt(n, e, t) {
|
|
1024
|
+
let r = !xr(e);
|
|
1025
|
+
return n && (r || t === !1) ? Or(n, e) : e;
|
|
996
1026
|
}
|
|
997
|
-
const
|
|
998
|
-
function
|
|
1027
|
+
const ot = (n) => n instanceof I ? { ...n } : n;
|
|
1028
|
+
function G(n, e) {
|
|
999
1029
|
e = e || {};
|
|
1000
|
-
const t =
|
|
1001
|
-
|
|
1002
|
-
|
|
1030
|
+
const t = /* @__PURE__ */ Object.create(null);
|
|
1031
|
+
Object.defineProperty(t, "hasOwnProperty", {
|
|
1032
|
+
value: Object.prototype.hasOwnProperty,
|
|
1033
|
+
enumerable: !1,
|
|
1034
|
+
writable: !0,
|
|
1035
|
+
configurable: !0
|
|
1036
|
+
});
|
|
1037
|
+
function r(d, a, h, b) {
|
|
1038
|
+
return l.isPlainObject(d) && l.isPlainObject(a) ? l.merge.call({ caseless: b }, d, a) : l.isPlainObject(a) ? l.merge({}, a) : l.isArray(a) ? a.slice() : a;
|
|
1003
1039
|
}
|
|
1004
|
-
function s(
|
|
1040
|
+
function s(d, a, h, b) {
|
|
1005
1041
|
if (l.isUndefined(a)) {
|
|
1006
|
-
if (!l.isUndefined(
|
|
1007
|
-
return r(void 0,
|
|
1008
|
-
} else return r(
|
|
1042
|
+
if (!l.isUndefined(d))
|
|
1043
|
+
return r(void 0, d, h, b);
|
|
1044
|
+
} else return r(d, a, h, b);
|
|
1009
1045
|
}
|
|
1010
|
-
function o(
|
|
1046
|
+
function o(d, a) {
|
|
1011
1047
|
if (!l.isUndefined(a))
|
|
1012
1048
|
return r(void 0, a);
|
|
1013
1049
|
}
|
|
1014
|
-
function i(
|
|
1050
|
+
function i(d, a) {
|
|
1015
1051
|
if (l.isUndefined(a)) {
|
|
1016
|
-
if (!l.isUndefined(
|
|
1017
|
-
return r(void 0,
|
|
1052
|
+
if (!l.isUndefined(d))
|
|
1053
|
+
return r(void 0, d);
|
|
1018
1054
|
} else return r(void 0, a);
|
|
1019
1055
|
}
|
|
1020
|
-
function c(
|
|
1021
|
-
if (
|
|
1022
|
-
return r(
|
|
1023
|
-
if (
|
|
1024
|
-
return r(void 0,
|
|
1056
|
+
function c(d, a, h) {
|
|
1057
|
+
if (l.hasOwnProp(e, h))
|
|
1058
|
+
return r(d, a);
|
|
1059
|
+
if (l.hasOwnProp(n, h))
|
|
1060
|
+
return r(void 0, d);
|
|
1025
1061
|
}
|
|
1026
|
-
const
|
|
1062
|
+
const u = {
|
|
1027
1063
|
url: o,
|
|
1028
1064
|
method: o,
|
|
1029
1065
|
data: o,
|
|
@@ -1050,139 +1086,143 @@ function X(n, e) {
|
|
|
1050
1086
|
httpsAgent: i,
|
|
1051
1087
|
cancelToken: i,
|
|
1052
1088
|
socketPath: i,
|
|
1089
|
+
allowedSocketPaths: i,
|
|
1053
1090
|
responseEncoding: i,
|
|
1054
1091
|
validateStatus: c,
|
|
1055
|
-
headers: (
|
|
1092
|
+
headers: (d, a, h) => s(ot(d), ot(a), h, !0)
|
|
1056
1093
|
};
|
|
1057
1094
|
return l.forEach(Object.keys({ ...n, ...e }), function(a) {
|
|
1058
1095
|
if (a === "__proto__" || a === "constructor" || a === "prototype") return;
|
|
1059
|
-
const
|
|
1060
|
-
l.isUndefined(
|
|
1096
|
+
const h = l.hasOwnProp(u, a) ? u[a] : s, b = l.hasOwnProp(n, a) ? n[a] : void 0, g = l.hasOwnProp(e, a) ? e[a] : void 0, m = h(b, g, a);
|
|
1097
|
+
l.isUndefined(m) && h !== c || (t[a] = m);
|
|
1061
1098
|
}), t;
|
|
1062
1099
|
}
|
|
1063
|
-
const
|
|
1064
|
-
const e =
|
|
1065
|
-
let
|
|
1066
|
-
|
|
1067
|
-
|
|
1100
|
+
const Mt = (n) => {
|
|
1101
|
+
const e = G({}, n), t = (b) => l.hasOwnProp(e, b) ? e[b] : void 0, r = t("data");
|
|
1102
|
+
let s = t("withXSRFToken");
|
|
1103
|
+
const o = t("xsrfHeaderName"), i = t("xsrfCookieName");
|
|
1104
|
+
let c = t("headers");
|
|
1105
|
+
const u = t("auth"), d = t("baseURL"), a = t("allowAbsoluteUrls"), h = t("url");
|
|
1106
|
+
if (e.headers = c = I.from(c), e.url = $t(
|
|
1107
|
+
Bt(d, h, a),
|
|
1068
1108
|
n.params,
|
|
1069
1109
|
n.paramsSerializer
|
|
1070
|
-
),
|
|
1110
|
+
), u && c.set(
|
|
1071
1111
|
"Authorization",
|
|
1072
1112
|
"Basic " + btoa(
|
|
1073
|
-
(
|
|
1113
|
+
(u.username || "") + ":" + (u.password ? unescape(encodeURIComponent(u.password)) : "")
|
|
1074
1114
|
)
|
|
1075
|
-
), l.isFormData(
|
|
1076
|
-
if (
|
|
1077
|
-
|
|
1078
|
-
else if (l.isFunction(
|
|
1079
|
-
const
|
|
1080
|
-
Object.entries(
|
|
1081
|
-
|
|
1115
|
+
), l.isFormData(r)) {
|
|
1116
|
+
if (P.hasStandardBrowserEnv || P.hasStandardBrowserWebWorkerEnv)
|
|
1117
|
+
c.setContentType(void 0);
|
|
1118
|
+
else if (l.isFunction(r.getHeaders)) {
|
|
1119
|
+
const b = r.getHeaders(), g = ["content-type", "content-length"];
|
|
1120
|
+
Object.entries(b).forEach(([m, p]) => {
|
|
1121
|
+
g.includes(m.toLowerCase()) && c.set(m, p);
|
|
1082
1122
|
});
|
|
1083
1123
|
}
|
|
1084
1124
|
}
|
|
1085
|
-
if (
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1125
|
+
if (P.hasStandardBrowserEnv && (l.isFunction(s) && (s = s(e)), s === !0 || s == null && Sr(e.url))) {
|
|
1126
|
+
const g = o && i && Rr.read(i);
|
|
1127
|
+
g && c.set(o, g);
|
|
1088
1128
|
}
|
|
1089
1129
|
return e;
|
|
1090
|
-
},
|
|
1130
|
+
}, Ar = typeof XMLHttpRequest < "u", Cr = Ar && function(n) {
|
|
1091
1131
|
return new Promise(function(t, r) {
|
|
1092
|
-
const s =
|
|
1132
|
+
const s = Mt(n);
|
|
1093
1133
|
let o = s.data;
|
|
1094
|
-
const i =
|
|
1095
|
-
let { responseType: c, onUploadProgress:
|
|
1096
|
-
function
|
|
1097
|
-
|
|
1134
|
+
const i = I.from(s.headers).normalize();
|
|
1135
|
+
let { responseType: c, onUploadProgress: u, onDownloadProgress: d } = s, a, h, b, g, m;
|
|
1136
|
+
function p() {
|
|
1137
|
+
g && g(), m && m(), s.cancelToken && s.cancelToken.unsubscribe(a), s.signal && s.signal.removeEventListener("abort", a);
|
|
1098
1138
|
}
|
|
1099
|
-
let
|
|
1100
|
-
|
|
1139
|
+
let f = new XMLHttpRequest();
|
|
1140
|
+
f.open(s.method.toUpperCase(), s.url, !0), f.timeout = s.timeout;
|
|
1101
1141
|
function w() {
|
|
1102
|
-
if (!
|
|
1142
|
+
if (!f)
|
|
1103
1143
|
return;
|
|
1104
|
-
const
|
|
1105
|
-
"getAllResponseHeaders" in
|
|
1106
|
-
),
|
|
1107
|
-
data: !c || c === "text" || c === "json" ?
|
|
1108
|
-
status:
|
|
1109
|
-
statusText:
|
|
1110
|
-
headers:
|
|
1144
|
+
const E = I.from(
|
|
1145
|
+
"getAllResponseHeaders" in f && f.getAllResponseHeaders()
|
|
1146
|
+
), A = {
|
|
1147
|
+
data: !c || c === "text" || c === "json" ? f.responseText : f.response,
|
|
1148
|
+
status: f.status,
|
|
1149
|
+
statusText: f.statusText,
|
|
1150
|
+
headers: E,
|
|
1111
1151
|
config: n,
|
|
1112
|
-
request:
|
|
1152
|
+
request: f
|
|
1113
1153
|
};
|
|
1114
|
-
|
|
1115
|
-
function(
|
|
1116
|
-
t(
|
|
1154
|
+
qt(
|
|
1155
|
+
function(N) {
|
|
1156
|
+
t(N), p();
|
|
1117
1157
|
},
|
|
1118
|
-
function(
|
|
1119
|
-
r(
|
|
1158
|
+
function(N) {
|
|
1159
|
+
r(N), p();
|
|
1120
1160
|
},
|
|
1121
|
-
|
|
1122
|
-
),
|
|
1161
|
+
A
|
|
1162
|
+
), f = null;
|
|
1123
1163
|
}
|
|
1124
|
-
"onloadend" in
|
|
1125
|
-
!
|
|
1126
|
-
},
|
|
1127
|
-
|
|
1128
|
-
},
|
|
1129
|
-
const
|
|
1130
|
-
j.event =
|
|
1131
|
-
},
|
|
1132
|
-
let
|
|
1133
|
-
const
|
|
1134
|
-
s.timeoutErrorMessage && (
|
|
1135
|
-
new
|
|
1136
|
-
|
|
1137
|
-
|
|
1164
|
+
"onloadend" in f ? f.onloadend = w : f.onreadystatechange = function() {
|
|
1165
|
+
!f || f.readyState !== 4 || f.status === 0 && !(f.responseURL && f.responseURL.indexOf("file:") === 0) || setTimeout(w);
|
|
1166
|
+
}, f.onabort = function() {
|
|
1167
|
+
f && (r(new _("Request aborted", _.ECONNABORTED, n, f)), f = null);
|
|
1168
|
+
}, f.onerror = function(S) {
|
|
1169
|
+
const A = S && S.message ? S.message : "Network Error", j = new _(A, _.ERR_NETWORK, n, f);
|
|
1170
|
+
j.event = S || null, r(j), f = null;
|
|
1171
|
+
}, f.ontimeout = function() {
|
|
1172
|
+
let S = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1173
|
+
const A = s.transitional || He;
|
|
1174
|
+
s.timeoutErrorMessage && (S = s.timeoutErrorMessage), r(
|
|
1175
|
+
new _(
|
|
1176
|
+
S,
|
|
1177
|
+
A.clarifyTimeoutError ? _.ETIMEDOUT : _.ECONNABORTED,
|
|
1138
1178
|
n,
|
|
1139
|
-
|
|
1179
|
+
f
|
|
1140
1180
|
)
|
|
1141
|
-
),
|
|
1142
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in
|
|
1143
|
-
|
|
1144
|
-
}), l.isUndefined(s.withCredentials) || (
|
|
1145
|
-
|
|
1181
|
+
), f = null;
|
|
1182
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in f && l.forEach(i.toJSON(), function(S, A) {
|
|
1183
|
+
f.setRequestHeader(A, S);
|
|
1184
|
+
}), l.isUndefined(s.withCredentials) || (f.withCredentials = !!s.withCredentials), c && c !== "json" && (f.responseType = s.responseType), d && ([b, m] = Ee(d, !0), f.addEventListener("progress", b)), u && f.upload && ([h, g] = Ee(u), f.upload.addEventListener("progress", h), f.upload.addEventListener("loadend", g)), (s.cancelToken || s.signal) && (a = (E) => {
|
|
1185
|
+
f && (r(!E || E.type ? new le(null, n, f) : E), f.abort(), f = null);
|
|
1146
1186
|
}, s.cancelToken && s.cancelToken.subscribe(a), s.signal && (s.signal.aborted ? a() : s.signal.addEventListener("abort", a)));
|
|
1147
|
-
const
|
|
1148
|
-
if (
|
|
1187
|
+
const x = yr(s.url);
|
|
1188
|
+
if (x && P.protocols.indexOf(x) === -1) {
|
|
1149
1189
|
r(
|
|
1150
|
-
new
|
|
1151
|
-
"Unsupported protocol " +
|
|
1152
|
-
|
|
1190
|
+
new _(
|
|
1191
|
+
"Unsupported protocol " + x + ":",
|
|
1192
|
+
_.ERR_BAD_REQUEST,
|
|
1153
1193
|
n
|
|
1154
1194
|
)
|
|
1155
1195
|
);
|
|
1156
1196
|
return;
|
|
1157
1197
|
}
|
|
1158
|
-
|
|
1198
|
+
f.send(o || null);
|
|
1159
1199
|
});
|
|
1160
|
-
},
|
|
1200
|
+
}, Tr = (n, e) => {
|
|
1161
1201
|
const { length: t } = n = n ? n.filter(Boolean) : [];
|
|
1162
1202
|
if (e || t) {
|
|
1163
1203
|
let r = new AbortController(), s;
|
|
1164
|
-
const o = function(
|
|
1204
|
+
const o = function(d) {
|
|
1165
1205
|
if (!s) {
|
|
1166
1206
|
s = !0, c();
|
|
1167
|
-
const a =
|
|
1207
|
+
const a = d instanceof Error ? d : this.reason;
|
|
1168
1208
|
r.abort(
|
|
1169
|
-
a instanceof
|
|
1209
|
+
a instanceof _ ? a : new le(a instanceof Error ? a.message : a)
|
|
1170
1210
|
);
|
|
1171
1211
|
}
|
|
1172
1212
|
};
|
|
1173
1213
|
let i = e && setTimeout(() => {
|
|
1174
|
-
i = null, o(new
|
|
1214
|
+
i = null, o(new _(`timeout of ${e}ms exceeded`, _.ETIMEDOUT));
|
|
1175
1215
|
}, e);
|
|
1176
1216
|
const c = () => {
|
|
1177
|
-
n && (i && clearTimeout(i), i = null, n.forEach((
|
|
1178
|
-
|
|
1217
|
+
n && (i && clearTimeout(i), i = null, n.forEach((d) => {
|
|
1218
|
+
d.unsubscribe ? d.unsubscribe(o) : d.removeEventListener("abort", o);
|
|
1179
1219
|
}), n = null);
|
|
1180
1220
|
};
|
|
1181
|
-
n.forEach((
|
|
1182
|
-
const { signal:
|
|
1183
|
-
return
|
|
1221
|
+
n.forEach((d) => d.addEventListener("abort", o));
|
|
1222
|
+
const { signal: u } = r;
|
|
1223
|
+
return u.unsubscribe = () => l.asap(c), u;
|
|
1184
1224
|
}
|
|
1185
|
-
},
|
|
1225
|
+
}, Nr = function* (n, e) {
|
|
1186
1226
|
let t = n.byteLength;
|
|
1187
1227
|
if (t < e) {
|
|
1188
1228
|
yield n;
|
|
@@ -1191,10 +1231,10 @@ const Bt = (n) => {
|
|
|
1191
1231
|
let r = 0, s;
|
|
1192
1232
|
for (; r < t; )
|
|
1193
1233
|
s = r + e, yield n.slice(r, s), r = s;
|
|
1194
|
-
},
|
|
1195
|
-
for await (const t of
|
|
1196
|
-
yield*
|
|
1197
|
-
},
|
|
1234
|
+
}, Pr = async function* (n, e) {
|
|
1235
|
+
for await (const t of kr(n))
|
|
1236
|
+
yield* Nr(t, e);
|
|
1237
|
+
}, kr = async function* (n) {
|
|
1198
1238
|
if (n[Symbol.asyncIterator]) {
|
|
1199
1239
|
yield* n;
|
|
1200
1240
|
return;
|
|
@@ -1210,216 +1250,221 @@ const Bt = (n) => {
|
|
|
1210
1250
|
} finally {
|
|
1211
1251
|
await e.cancel();
|
|
1212
1252
|
}
|
|
1213
|
-
},
|
|
1214
|
-
const s =
|
|
1215
|
-
let o = 0, i, c = (
|
|
1216
|
-
i || (i = !0, r && r(
|
|
1253
|
+
}, ct = (n, e, t, r) => {
|
|
1254
|
+
const s = Pr(n, e);
|
|
1255
|
+
let o = 0, i, c = (u) => {
|
|
1256
|
+
i || (i = !0, r && r(u));
|
|
1217
1257
|
};
|
|
1218
1258
|
return new ReadableStream(
|
|
1219
1259
|
{
|
|
1220
|
-
async pull(
|
|
1260
|
+
async pull(u) {
|
|
1221
1261
|
try {
|
|
1222
|
-
const { done:
|
|
1223
|
-
if (
|
|
1224
|
-
c(),
|
|
1262
|
+
const { done: d, value: a } = await s.next();
|
|
1263
|
+
if (d) {
|
|
1264
|
+
c(), u.close();
|
|
1225
1265
|
return;
|
|
1226
1266
|
}
|
|
1227
|
-
let
|
|
1267
|
+
let h = a.byteLength;
|
|
1228
1268
|
if (t) {
|
|
1229
|
-
let
|
|
1230
|
-
t(
|
|
1269
|
+
let b = o += h;
|
|
1270
|
+
t(b);
|
|
1231
1271
|
}
|
|
1232
|
-
|
|
1233
|
-
} catch (
|
|
1234
|
-
throw c(
|
|
1272
|
+
u.enqueue(new Uint8Array(a));
|
|
1273
|
+
} catch (d) {
|
|
1274
|
+
throw c(d), d;
|
|
1235
1275
|
}
|
|
1236
1276
|
},
|
|
1237
|
-
cancel(
|
|
1238
|
-
return c(
|
|
1277
|
+
cancel(u) {
|
|
1278
|
+
return c(u), s.return();
|
|
1239
1279
|
}
|
|
1240
1280
|
},
|
|
1241
1281
|
{
|
|
1242
1282
|
highWaterMark: 2
|
|
1243
1283
|
}
|
|
1244
1284
|
);
|
|
1245
|
-
},
|
|
1285
|
+
}, at = 64 * 1024, { isFunction: pe } = l, Ir = (({ Request: n, Response: e }) => ({
|
|
1246
1286
|
Request: n,
|
|
1247
1287
|
Response: e
|
|
1248
|
-
}))(l.global), { ReadableStream:
|
|
1288
|
+
}))(l.global), { ReadableStream: lt, TextEncoder: ut } = l.global, dt = (n, ...e) => {
|
|
1249
1289
|
try {
|
|
1250
1290
|
return !!n(...e);
|
|
1251
1291
|
} catch {
|
|
1252
1292
|
return !1;
|
|
1253
1293
|
}
|
|
1254
|
-
},
|
|
1294
|
+
}, Lr = (n) => {
|
|
1255
1295
|
n = l.merge.call(
|
|
1256
1296
|
{
|
|
1257
1297
|
skipUndefined: !0
|
|
1258
1298
|
},
|
|
1259
|
-
|
|
1299
|
+
Ir,
|
|
1260
1300
|
n
|
|
1261
1301
|
);
|
|
1262
|
-
const { fetch: e, Request: t, Response: r } = n, s = e ?
|
|
1302
|
+
const { fetch: e, Request: t, Response: r } = n, s = e ? pe(e) : typeof fetch == "function", o = pe(t), i = pe(r);
|
|
1263
1303
|
if (!s)
|
|
1264
1304
|
return !1;
|
|
1265
|
-
const c = s &&
|
|
1266
|
-
let
|
|
1267
|
-
const
|
|
1268
|
-
body: new
|
|
1305
|
+
const c = s && pe(lt), u = s && (typeof ut == "function" ? /* @__PURE__ */ ((m) => (p) => m.encode(p))(new ut()) : async (m) => new Uint8Array(await new t(m).arrayBuffer())), d = o && c && dt(() => {
|
|
1306
|
+
let m = !1;
|
|
1307
|
+
const p = new t(P.origin, {
|
|
1308
|
+
body: new lt(),
|
|
1269
1309
|
method: "POST",
|
|
1270
1310
|
get duplex() {
|
|
1271
|
-
return
|
|
1311
|
+
return m = !0, "half";
|
|
1272
1312
|
}
|
|
1273
|
-
}).headers.has("Content-Type");
|
|
1274
|
-
return
|
|
1275
|
-
}), a = i && c &&
|
|
1276
|
-
stream: a && ((
|
|
1313
|
+
}), f = p.headers.has("Content-Type");
|
|
1314
|
+
return p.body != null && p.body.cancel(), m && !f;
|
|
1315
|
+
}), a = i && c && dt(() => l.isReadableStream(new r("").body)), h = {
|
|
1316
|
+
stream: a && ((m) => m.body)
|
|
1277
1317
|
};
|
|
1278
|
-
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
1279
|
-
!
|
|
1280
|
-
let w =
|
|
1318
|
+
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((m) => {
|
|
1319
|
+
!h[m] && (h[m] = (p, f) => {
|
|
1320
|
+
let w = p && p[m];
|
|
1281
1321
|
if (w)
|
|
1282
|
-
return w.call(
|
|
1283
|
-
throw new
|
|
1284
|
-
`Response type '${
|
|
1285
|
-
|
|
1286
|
-
|
|
1322
|
+
return w.call(p);
|
|
1323
|
+
throw new _(
|
|
1324
|
+
`Response type '${m}' is not supported`,
|
|
1325
|
+
_.ERR_NOT_SUPPORT,
|
|
1326
|
+
f
|
|
1287
1327
|
);
|
|
1288
1328
|
});
|
|
1289
1329
|
});
|
|
1290
|
-
const
|
|
1291
|
-
if (
|
|
1330
|
+
const b = async (m) => {
|
|
1331
|
+
if (m == null)
|
|
1292
1332
|
return 0;
|
|
1293
|
-
if (l.isBlob(
|
|
1294
|
-
return
|
|
1295
|
-
if (l.isSpecCompliantForm(
|
|
1296
|
-
return (await new t(
|
|
1333
|
+
if (l.isBlob(m))
|
|
1334
|
+
return m.size;
|
|
1335
|
+
if (l.isSpecCompliantForm(m))
|
|
1336
|
+
return (await new t(P.origin, {
|
|
1297
1337
|
method: "POST",
|
|
1298
|
-
body:
|
|
1338
|
+
body: m
|
|
1299
1339
|
}).arrayBuffer()).byteLength;
|
|
1300
|
-
if (l.isArrayBufferView(
|
|
1301
|
-
return
|
|
1302
|
-
if (l.isURLSearchParams(
|
|
1303
|
-
return (await
|
|
1304
|
-
},
|
|
1305
|
-
const
|
|
1306
|
-
return
|
|
1340
|
+
if (l.isArrayBufferView(m) || l.isArrayBuffer(m))
|
|
1341
|
+
return m.byteLength;
|
|
1342
|
+
if (l.isURLSearchParams(m) && (m = m + ""), l.isString(m))
|
|
1343
|
+
return (await u(m)).byteLength;
|
|
1344
|
+
}, g = async (m, p) => {
|
|
1345
|
+
const f = l.toFiniteNumber(m.getContentLength());
|
|
1346
|
+
return f ?? b(p);
|
|
1307
1347
|
};
|
|
1308
|
-
return async (
|
|
1348
|
+
return async (m) => {
|
|
1309
1349
|
let {
|
|
1310
|
-
url:
|
|
1311
|
-
method:
|
|
1350
|
+
url: p,
|
|
1351
|
+
method: f,
|
|
1312
1352
|
data: w,
|
|
1313
|
-
signal:
|
|
1314
|
-
cancelToken:
|
|
1315
|
-
timeout:
|
|
1316
|
-
onDownloadProgress:
|
|
1353
|
+
signal: x,
|
|
1354
|
+
cancelToken: E,
|
|
1355
|
+
timeout: S,
|
|
1356
|
+
onDownloadProgress: A,
|
|
1317
1357
|
onUploadProgress: j,
|
|
1318
|
-
responseType:
|
|
1319
|
-
headers:
|
|
1320
|
-
withCredentials:
|
|
1358
|
+
responseType: N,
|
|
1359
|
+
headers: H,
|
|
1360
|
+
withCredentials: $ = "same-origin",
|
|
1321
1361
|
fetchOptions: Q
|
|
1322
|
-
} =
|
|
1323
|
-
|
|
1324
|
-
let
|
|
1325
|
-
[
|
|
1326
|
-
|
|
1327
|
-
),
|
|
1328
|
-
const
|
|
1329
|
-
|
|
1362
|
+
} = Mt(m), M = e || fetch;
|
|
1363
|
+
N = N ? (N + "").toLowerCase() : "text";
|
|
1364
|
+
let D = Tr(
|
|
1365
|
+
[x, E && E.toAbortSignal()],
|
|
1366
|
+
S
|
|
1367
|
+
), U = null;
|
|
1368
|
+
const L = D && D.unsubscribe && (() => {
|
|
1369
|
+
D.unsubscribe();
|
|
1330
1370
|
});
|
|
1331
1371
|
let he;
|
|
1332
1372
|
try {
|
|
1333
|
-
if (j &&
|
|
1334
|
-
let
|
|
1373
|
+
if (j && d && f !== "get" && f !== "head" && (he = await g(H, w)) !== 0) {
|
|
1374
|
+
let T = new t(p, {
|
|
1335
1375
|
method: "POST",
|
|
1336
1376
|
body: w,
|
|
1337
1377
|
duplex: "half"
|
|
1338
|
-
}),
|
|
1339
|
-
if (l.isFormData(w) && (
|
|
1340
|
-
const [
|
|
1378
|
+
}), V;
|
|
1379
|
+
if (l.isFormData(w) && (V = T.headers.get("content-type")) && H.setContentType(V), T.body) {
|
|
1380
|
+
const [Pe, fe] = st(
|
|
1341
1381
|
he,
|
|
1342
|
-
|
|
1382
|
+
Ee(it(j))
|
|
1343
1383
|
);
|
|
1344
|
-
w =
|
|
1384
|
+
w = ct(T.body, at, Pe, fe);
|
|
1345
1385
|
}
|
|
1346
1386
|
}
|
|
1347
|
-
l.isString(
|
|
1348
|
-
const
|
|
1387
|
+
l.isString($) || ($ = $ ? "include" : "omit");
|
|
1388
|
+
const O = o && "credentials" in t.prototype;
|
|
1389
|
+
if (l.isFormData(w)) {
|
|
1390
|
+
const T = H.getContentType();
|
|
1391
|
+
T && /^multipart\/form-data/i.test(T) && !/boundary=/i.test(T) && H.delete("content-type");
|
|
1392
|
+
}
|
|
1393
|
+
const y = {
|
|
1349
1394
|
...Q,
|
|
1350
|
-
signal:
|
|
1351
|
-
method:
|
|
1352
|
-
headers:
|
|
1395
|
+
signal: D,
|
|
1396
|
+
method: f.toUpperCase(),
|
|
1397
|
+
headers: H.normalize().toJSON(),
|
|
1353
1398
|
body: w,
|
|
1354
1399
|
duplex: "half",
|
|
1355
|
-
credentials:
|
|
1400
|
+
credentials: O ? $ : void 0
|
|
1356
1401
|
};
|
|
1357
|
-
|
|
1358
|
-
let R = await (o ? M(
|
|
1359
|
-
const
|
|
1360
|
-
if (a && (
|
|
1361
|
-
const
|
|
1362
|
-
["status", "statusText", "headers"].forEach((
|
|
1363
|
-
|
|
1402
|
+
U = o && new t(p, y);
|
|
1403
|
+
let R = await (o ? M(U, Q) : M(p, y));
|
|
1404
|
+
const v = a && (N === "stream" || N === "response");
|
|
1405
|
+
if (a && (A || v && L)) {
|
|
1406
|
+
const T = {};
|
|
1407
|
+
["status", "statusText", "headers"].forEach((Qe) => {
|
|
1408
|
+
T[Qe] = R[Qe];
|
|
1364
1409
|
});
|
|
1365
|
-
const
|
|
1366
|
-
|
|
1367
|
-
|
|
1410
|
+
const V = l.toFiniteNumber(R.headers.get("content-length")), [Pe, fe] = A && st(
|
|
1411
|
+
V,
|
|
1412
|
+
Ee(it(A), !0)
|
|
1368
1413
|
) || [];
|
|
1369
1414
|
R = new r(
|
|
1370
|
-
|
|
1371
|
-
|
|
1415
|
+
ct(R.body, at, Pe, () => {
|
|
1416
|
+
fe && fe(), L && L();
|
|
1372
1417
|
}),
|
|
1373
|
-
|
|
1418
|
+
T
|
|
1374
1419
|
);
|
|
1375
1420
|
}
|
|
1376
|
-
|
|
1377
|
-
let
|
|
1421
|
+
N = N || "text";
|
|
1422
|
+
let z = await h[l.findKey(h, N) || "text"](
|
|
1378
1423
|
R,
|
|
1379
|
-
|
|
1424
|
+
m
|
|
1380
1425
|
);
|
|
1381
|
-
return !
|
|
1382
|
-
|
|
1383
|
-
data:
|
|
1384
|
-
headers:
|
|
1426
|
+
return !v && L && L(), await new Promise((T, V) => {
|
|
1427
|
+
qt(T, V, {
|
|
1428
|
+
data: z,
|
|
1429
|
+
headers: I.from(R.headers),
|
|
1385
1430
|
status: R.status,
|
|
1386
1431
|
statusText: R.statusText,
|
|
1387
|
-
config:
|
|
1388
|
-
request:
|
|
1432
|
+
config: m,
|
|
1433
|
+
request: U
|
|
1389
1434
|
});
|
|
1390
1435
|
});
|
|
1391
|
-
} catch (
|
|
1392
|
-
throw
|
|
1393
|
-
new
|
|
1436
|
+
} catch (O) {
|
|
1437
|
+
throw L && L(), O && O.name === "TypeError" && /Load failed|fetch/i.test(O.message) ? Object.assign(
|
|
1438
|
+
new _(
|
|
1394
1439
|
"Network Error",
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1440
|
+
_.ERR_NETWORK,
|
|
1441
|
+
m,
|
|
1442
|
+
U,
|
|
1443
|
+
O && O.response
|
|
1399
1444
|
),
|
|
1400
1445
|
{
|
|
1401
|
-
cause:
|
|
1446
|
+
cause: O.cause || O
|
|
1402
1447
|
}
|
|
1403
|
-
) :
|
|
1448
|
+
) : _.from(O, O && O.code, m, U, O && O.response);
|
|
1404
1449
|
}
|
|
1405
1450
|
};
|
|
1406
|
-
},
|
|
1451
|
+
}, vr = /* @__PURE__ */ new Map(), Ht = (n) => {
|
|
1407
1452
|
let e = n && n.env || {};
|
|
1408
1453
|
const { fetch: t, Request: r, Response: s } = e, o = [r, s, t];
|
|
1409
|
-
let i = o.length, c = i,
|
|
1454
|
+
let i = o.length, c = i, u, d, a = vr;
|
|
1410
1455
|
for (; c--; )
|
|
1411
|
-
|
|
1412
|
-
return
|
|
1456
|
+
u = o[c], d = a.get(u), d === void 0 && a.set(u, d = c ? /* @__PURE__ */ new Map() : Lr(e)), a = d;
|
|
1457
|
+
return d;
|
|
1413
1458
|
};
|
|
1414
|
-
|
|
1415
|
-
const
|
|
1416
|
-
http:
|
|
1417
|
-
xhr:
|
|
1459
|
+
Ht();
|
|
1460
|
+
const Ve = {
|
|
1461
|
+
http: Kn,
|
|
1462
|
+
xhr: Cr,
|
|
1418
1463
|
fetch: {
|
|
1419
|
-
get:
|
|
1464
|
+
get: Ht
|
|
1420
1465
|
}
|
|
1421
1466
|
};
|
|
1422
|
-
l.forEach(
|
|
1467
|
+
l.forEach(Ve, (n, e) => {
|
|
1423
1468
|
if (n) {
|
|
1424
1469
|
try {
|
|
1425
1470
|
Object.defineProperty(n, "name", { value: e });
|
|
@@ -1428,8 +1473,8 @@ l.forEach(ze, (n, e) => {
|
|
|
1428
1473
|
Object.defineProperty(n, "adapterName", { value: e });
|
|
1429
1474
|
}
|
|
1430
1475
|
});
|
|
1431
|
-
const ht = (n) => `- ${n}`,
|
|
1432
|
-
function
|
|
1476
|
+
const ht = (n) => `- ${n}`, Fr = (n) => l.isFunction(n) || n === null || n === !1;
|
|
1477
|
+
function jr(n, e) {
|
|
1433
1478
|
n = l.isArray(n) ? n : [n];
|
|
1434
1479
|
const { length: t } = n;
|
|
1435
1480
|
let r, s;
|
|
@@ -1437,74 +1482,74 @@ function Ir(n, e) {
|
|
|
1437
1482
|
for (let i = 0; i < t; i++) {
|
|
1438
1483
|
r = n[i];
|
|
1439
1484
|
let c;
|
|
1440
|
-
if (s = r, !
|
|
1441
|
-
throw new
|
|
1485
|
+
if (s = r, !Fr(r) && (s = Ve[(c = String(r)).toLowerCase()], s === void 0))
|
|
1486
|
+
throw new _(`Unknown adapter '${c}'`);
|
|
1442
1487
|
if (s && (l.isFunction(s) || (s = s.get(e))))
|
|
1443
1488
|
break;
|
|
1444
1489
|
o[c || "#" + i] = s;
|
|
1445
1490
|
}
|
|
1446
1491
|
if (!s) {
|
|
1447
1492
|
const i = Object.entries(o).map(
|
|
1448
|
-
([
|
|
1493
|
+
([u, d]) => `adapter ${u} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1449
1494
|
);
|
|
1450
1495
|
let c = t ? i.length > 1 ? `since :
|
|
1451
1496
|
` + i.map(ht).join(`
|
|
1452
1497
|
`) : " " + ht(i[0]) : "as no adapter specified";
|
|
1453
|
-
throw new
|
|
1498
|
+
throw new _(
|
|
1454
1499
|
"There is no suitable adapter to dispatch the request " + c,
|
|
1455
1500
|
"ERR_NOT_SUPPORT"
|
|
1456
1501
|
);
|
|
1457
1502
|
}
|
|
1458
1503
|
return s;
|
|
1459
1504
|
}
|
|
1460
|
-
const
|
|
1505
|
+
const zt = {
|
|
1461
1506
|
/**
|
|
1462
1507
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1463
1508
|
* @type {Function}
|
|
1464
1509
|
*/
|
|
1465
|
-
getAdapter:
|
|
1510
|
+
getAdapter: jr,
|
|
1466
1511
|
/**
|
|
1467
1512
|
* Exposes all known adapters
|
|
1468
1513
|
* @type {Object<string, Function|Object>}
|
|
1469
1514
|
*/
|
|
1470
|
-
adapters:
|
|
1515
|
+
adapters: Ve
|
|
1471
1516
|
};
|
|
1472
|
-
function
|
|
1517
|
+
function ve(n) {
|
|
1473
1518
|
if (n.cancelToken && n.cancelToken.throwIfRequested(), n.signal && n.signal.aborted)
|
|
1474
|
-
throw new
|
|
1519
|
+
throw new le(null, n);
|
|
1475
1520
|
}
|
|
1476
|
-
function
|
|
1477
|
-
return
|
|
1521
|
+
function ft(n) {
|
|
1522
|
+
return ve(n), n.headers = I.from(n.headers), n.data = Le.call(n, n.transformRequest), ["post", "put", "patch"].indexOf(n.method) !== -1 && n.headers.setContentType("application/x-www-form-urlencoded", !1), zt.getAdapter(n.adapter || ae.adapter, n)(n).then(
|
|
1478
1523
|
function(r) {
|
|
1479
|
-
return
|
|
1524
|
+
return ve(n), r.data = Le.call(n, n.transformResponse, r), r.headers = I.from(r.headers), r;
|
|
1480
1525
|
},
|
|
1481
1526
|
function(r) {
|
|
1482
|
-
return Ut(r) || (
|
|
1527
|
+
return Ut(r) || (ve(n), r && r.response && (r.response.data = Le.call(
|
|
1483
1528
|
n,
|
|
1484
1529
|
n.transformResponse,
|
|
1485
1530
|
r.response
|
|
1486
|
-
), r.response.headers =
|
|
1531
|
+
), r.response.headers = I.from(r.response.headers))), Promise.reject(r);
|
|
1487
1532
|
}
|
|
1488
1533
|
);
|
|
1489
1534
|
}
|
|
1490
|
-
const
|
|
1535
|
+
const Vt = "1.15.2", Ce = {};
|
|
1491
1536
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((n, e) => {
|
|
1492
|
-
|
|
1537
|
+
Ce[n] = function(r) {
|
|
1493
1538
|
return typeof r === n || "a" + (e < 1 ? "n " : " ") + n;
|
|
1494
1539
|
};
|
|
1495
1540
|
});
|
|
1496
|
-
const
|
|
1497
|
-
|
|
1541
|
+
const pt = {};
|
|
1542
|
+
Ce.transitional = function(e, t, r) {
|
|
1498
1543
|
function s(o, i) {
|
|
1499
|
-
return "[Axios v" +
|
|
1544
|
+
return "[Axios v" + Vt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1500
1545
|
}
|
|
1501
1546
|
return (o, i, c) => {
|
|
1502
1547
|
if (e === !1)
|
|
1503
|
-
throw new
|
|
1548
|
+
throw new _(
|
|
1504
1549
|
s(i, " has been removed" + (t ? " in " + t : "")),
|
|
1505
|
-
|
|
1550
|
+
_.ERR_DEPRECATED
|
|
1506
1551
|
);
|
|
1507
|
-
return t && !
|
|
1552
|
+
return t && !pt[i] && (pt[i] = !0, console.warn(
|
|
1508
1553
|
s(
|
|
1509
1554
|
i,
|
|
1510
1555
|
" has been deprecated since v" + t + " and will be removed in the near future"
|
|
@@ -1512,38 +1557,38 @@ Ae.transitional = function(e, t, r) {
|
|
|
1512
1557
|
)), e ? e(o, i, c) : !0;
|
|
1513
1558
|
};
|
|
1514
1559
|
};
|
|
1515
|
-
|
|
1560
|
+
Ce.spelling = function(e) {
|
|
1516
1561
|
return (t, r) => (console.warn(`${r} is likely a misspelling of ${e}`), !0);
|
|
1517
1562
|
};
|
|
1518
|
-
function
|
|
1563
|
+
function $r(n, e, t) {
|
|
1519
1564
|
if (typeof n != "object")
|
|
1520
|
-
throw new
|
|
1565
|
+
throw new _("options must be an object", _.ERR_BAD_OPTION_VALUE);
|
|
1521
1566
|
const r = Object.keys(n);
|
|
1522
1567
|
let s = r.length;
|
|
1523
1568
|
for (; s-- > 0; ) {
|
|
1524
|
-
const o = r[s], i = e[o];
|
|
1569
|
+
const o = r[s], i = Object.prototype.hasOwnProperty.call(e, o) ? e[o] : void 0;
|
|
1525
1570
|
if (i) {
|
|
1526
|
-
const c = n[o],
|
|
1527
|
-
if (
|
|
1528
|
-
throw new
|
|
1529
|
-
"option " + o + " must be " +
|
|
1530
|
-
|
|
1571
|
+
const c = n[o], u = c === void 0 || i(c, o, n);
|
|
1572
|
+
if (u !== !0)
|
|
1573
|
+
throw new _(
|
|
1574
|
+
"option " + o + " must be " + u,
|
|
1575
|
+
_.ERR_BAD_OPTION_VALUE
|
|
1531
1576
|
);
|
|
1532
1577
|
continue;
|
|
1533
1578
|
}
|
|
1534
1579
|
if (t !== !0)
|
|
1535
|
-
throw new
|
|
1580
|
+
throw new _("Unknown option " + o, _.ERR_BAD_OPTION);
|
|
1536
1581
|
}
|
|
1537
1582
|
}
|
|
1538
|
-
const
|
|
1539
|
-
assertOptions:
|
|
1540
|
-
validators:
|
|
1541
|
-
},
|
|
1542
|
-
let
|
|
1583
|
+
const we = {
|
|
1584
|
+
assertOptions: $r,
|
|
1585
|
+
validators: Ce
|
|
1586
|
+
}, F = we.validators;
|
|
1587
|
+
let X = class {
|
|
1543
1588
|
constructor(e) {
|
|
1544
1589
|
this.defaults = e || {}, this.interceptors = {
|
|
1545
|
-
request: new
|
|
1546
|
-
response: new
|
|
1590
|
+
request: new nt(),
|
|
1591
|
+
response: new nt()
|
|
1547
1592
|
};
|
|
1548
1593
|
}
|
|
1549
1594
|
/**
|
|
@@ -1561,10 +1606,23 @@ let G = class {
|
|
|
1561
1606
|
if (r instanceof Error) {
|
|
1562
1607
|
let s = {};
|
|
1563
1608
|
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1564
|
-
const o =
|
|
1609
|
+
const o = (() => {
|
|
1610
|
+
if (!s.stack)
|
|
1611
|
+
return "";
|
|
1612
|
+
const i = s.stack.indexOf(`
|
|
1613
|
+
`);
|
|
1614
|
+
return i === -1 ? "" : s.stack.slice(i + 1);
|
|
1615
|
+
})();
|
|
1565
1616
|
try {
|
|
1566
|
-
|
|
1567
|
-
|
|
1617
|
+
if (!r.stack)
|
|
1618
|
+
r.stack = o;
|
|
1619
|
+
else if (o) {
|
|
1620
|
+
const i = o.indexOf(`
|
|
1621
|
+
`), c = i === -1 ? -1 : o.indexOf(`
|
|
1622
|
+
`, i + 1), u = c === -1 ? "" : o.slice(c + 1);
|
|
1623
|
+
String(r.stack).endsWith(u) || (r.stack += `
|
|
1624
|
+
` + o);
|
|
1625
|
+
}
|
|
1568
1626
|
} catch {
|
|
1569
1627
|
}
|
|
1570
1628
|
}
|
|
@@ -1572,88 +1630,88 @@ let G = class {
|
|
|
1572
1630
|
}
|
|
1573
1631
|
}
|
|
1574
1632
|
_request(e, t) {
|
|
1575
|
-
typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t =
|
|
1633
|
+
typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t = G(this.defaults, t);
|
|
1576
1634
|
const { transitional: r, paramsSerializer: s, headers: o } = t;
|
|
1577
|
-
r !== void 0 &&
|
|
1635
|
+
r !== void 0 && we.assertOptions(
|
|
1578
1636
|
r,
|
|
1579
1637
|
{
|
|
1580
|
-
silentJSONParsing:
|
|
1581
|
-
forcedJSONParsing:
|
|
1582
|
-
clarifyTimeoutError:
|
|
1583
|
-
legacyInterceptorReqResOrdering:
|
|
1638
|
+
silentJSONParsing: F.transitional(F.boolean),
|
|
1639
|
+
forcedJSONParsing: F.transitional(F.boolean),
|
|
1640
|
+
clarifyTimeoutError: F.transitional(F.boolean),
|
|
1641
|
+
legacyInterceptorReqResOrdering: F.transitional(F.boolean)
|
|
1584
1642
|
},
|
|
1585
1643
|
!1
|
|
1586
1644
|
), s != null && (l.isFunction(s) ? t.paramsSerializer = {
|
|
1587
1645
|
serialize: s
|
|
1588
|
-
} :
|
|
1646
|
+
} : we.assertOptions(
|
|
1589
1647
|
s,
|
|
1590
1648
|
{
|
|
1591
|
-
encode:
|
|
1592
|
-
serialize:
|
|
1649
|
+
encode: F.function,
|
|
1650
|
+
serialize: F.function
|
|
1593
1651
|
},
|
|
1594
1652
|
!0
|
|
1595
|
-
)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : t.allowAbsoluteUrls = !0),
|
|
1653
|
+
)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : t.allowAbsoluteUrls = !0), we.assertOptions(
|
|
1596
1654
|
t,
|
|
1597
1655
|
{
|
|
1598
|
-
baseUrl:
|
|
1599
|
-
withXsrfToken:
|
|
1656
|
+
baseUrl: F.spelling("baseURL"),
|
|
1657
|
+
withXsrfToken: F.spelling("withXSRFToken")
|
|
1600
1658
|
},
|
|
1601
1659
|
!0
|
|
1602
1660
|
), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1603
1661
|
let i = o && l.merge(o.common, o[t.method]);
|
|
1604
|
-
o && l.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (
|
|
1605
|
-
delete o[
|
|
1606
|
-
}), t.headers =
|
|
1662
|
+
o && l.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (m) => {
|
|
1663
|
+
delete o[m];
|
|
1664
|
+
}), t.headers = I.concat(i, o);
|
|
1607
1665
|
const c = [];
|
|
1608
|
-
let
|
|
1609
|
-
this.interceptors.request.forEach(function(
|
|
1610
|
-
if (typeof
|
|
1666
|
+
let u = !0;
|
|
1667
|
+
this.interceptors.request.forEach(function(p) {
|
|
1668
|
+
if (typeof p.runWhen == "function" && p.runWhen(t) === !1)
|
|
1611
1669
|
return;
|
|
1612
|
-
|
|
1613
|
-
const
|
|
1614
|
-
|
|
1670
|
+
u = u && p.synchronous;
|
|
1671
|
+
const f = t.transitional || He;
|
|
1672
|
+
f && f.legacyInterceptorReqResOrdering ? c.unshift(p.fulfilled, p.rejected) : c.push(p.fulfilled, p.rejected);
|
|
1615
1673
|
});
|
|
1616
|
-
const
|
|
1617
|
-
this.interceptors.response.forEach(function(
|
|
1618
|
-
|
|
1674
|
+
const d = [];
|
|
1675
|
+
this.interceptors.response.forEach(function(p) {
|
|
1676
|
+
d.push(p.fulfilled, p.rejected);
|
|
1619
1677
|
});
|
|
1620
|
-
let a,
|
|
1621
|
-
if (!
|
|
1622
|
-
const
|
|
1623
|
-
for (
|
|
1624
|
-
a = a.then(h
|
|
1678
|
+
let a, h = 0, b;
|
|
1679
|
+
if (!u) {
|
|
1680
|
+
const m = [ft.bind(this), void 0];
|
|
1681
|
+
for (m.unshift(...c), m.push(...d), b = m.length, a = Promise.resolve(t); h < b; )
|
|
1682
|
+
a = a.then(m[h++], m[h++]);
|
|
1625
1683
|
return a;
|
|
1626
1684
|
}
|
|
1627
|
-
|
|
1628
|
-
let
|
|
1629
|
-
for (;
|
|
1630
|
-
const
|
|
1685
|
+
b = c.length;
|
|
1686
|
+
let g = t;
|
|
1687
|
+
for (; h < b; ) {
|
|
1688
|
+
const m = c[h++], p = c[h++];
|
|
1631
1689
|
try {
|
|
1632
|
-
|
|
1633
|
-
} catch (
|
|
1634
|
-
|
|
1690
|
+
g = m(g);
|
|
1691
|
+
} catch (f) {
|
|
1692
|
+
p.call(this, f);
|
|
1635
1693
|
break;
|
|
1636
1694
|
}
|
|
1637
1695
|
}
|
|
1638
1696
|
try {
|
|
1639
|
-
a =
|
|
1640
|
-
} catch (
|
|
1641
|
-
return Promise.reject(
|
|
1697
|
+
a = ft.call(this, g);
|
|
1698
|
+
} catch (m) {
|
|
1699
|
+
return Promise.reject(m);
|
|
1642
1700
|
}
|
|
1643
|
-
for (
|
|
1644
|
-
a = a.then(
|
|
1701
|
+
for (h = 0, b = d.length; h < b; )
|
|
1702
|
+
a = a.then(d[h++], d[h++]);
|
|
1645
1703
|
return a;
|
|
1646
1704
|
}
|
|
1647
1705
|
getUri(e) {
|
|
1648
|
-
e =
|
|
1649
|
-
const t =
|
|
1650
|
-
return
|
|
1706
|
+
e = G(this.defaults, e);
|
|
1707
|
+
const t = Bt(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1708
|
+
return $t(t, e.params, e.paramsSerializer);
|
|
1651
1709
|
}
|
|
1652
1710
|
};
|
|
1653
1711
|
l.forEach(["delete", "get", "head", "options"], function(e) {
|
|
1654
|
-
|
|
1712
|
+
X.prototype[e] = function(t, r) {
|
|
1655
1713
|
return this.request(
|
|
1656
|
-
|
|
1714
|
+
G(r || {}, {
|
|
1657
1715
|
method: e,
|
|
1658
1716
|
url: t,
|
|
1659
1717
|
data: (r || {}).data
|
|
@@ -1665,7 +1723,7 @@ l.forEach(["post", "put", "patch"], function(e) {
|
|
|
1665
1723
|
function t(r) {
|
|
1666
1724
|
return function(o, i, c) {
|
|
1667
1725
|
return this.request(
|
|
1668
|
-
|
|
1726
|
+
G(c || {}, {
|
|
1669
1727
|
method: e,
|
|
1670
1728
|
headers: r ? {
|
|
1671
1729
|
"Content-Type": "multipart/form-data"
|
|
@@ -1676,9 +1734,9 @@ l.forEach(["post", "put", "patch"], function(e) {
|
|
|
1676
1734
|
);
|
|
1677
1735
|
};
|
|
1678
1736
|
}
|
|
1679
|
-
|
|
1737
|
+
X.prototype[e] = t(), X.prototype[e + "Form"] = t(!0);
|
|
1680
1738
|
});
|
|
1681
|
-
let
|
|
1739
|
+
let Dr = class Jt {
|
|
1682
1740
|
constructor(e) {
|
|
1683
1741
|
if (typeof e != "function")
|
|
1684
1742
|
throw new TypeError("executor must be a function.");
|
|
@@ -1702,7 +1760,7 @@ let Lr = class Vt {
|
|
|
1702
1760
|
r.unsubscribe(o);
|
|
1703
1761
|
}, i;
|
|
1704
1762
|
}, e(function(o, i, c) {
|
|
1705
|
-
r.reason || (r.reason = new
|
|
1763
|
+
r.reason || (r.reason = new le(o, i, c), t(r.reason));
|
|
1706
1764
|
});
|
|
1707
1765
|
}
|
|
1708
1766
|
/**
|
|
@@ -1744,22 +1802,22 @@ let Lr = class Vt {
|
|
|
1744
1802
|
static source() {
|
|
1745
1803
|
let e;
|
|
1746
1804
|
return {
|
|
1747
|
-
token: new
|
|
1805
|
+
token: new Jt(function(s) {
|
|
1748
1806
|
e = s;
|
|
1749
1807
|
}),
|
|
1750
1808
|
cancel: e
|
|
1751
1809
|
};
|
|
1752
1810
|
}
|
|
1753
1811
|
};
|
|
1754
|
-
function
|
|
1812
|
+
function Ur(n) {
|
|
1755
1813
|
return function(t) {
|
|
1756
1814
|
return n.apply(null, t);
|
|
1757
1815
|
};
|
|
1758
1816
|
}
|
|
1759
|
-
function
|
|
1817
|
+
function qr(n) {
|
|
1760
1818
|
return l.isObject(n) && n.isAxiosError === !0;
|
|
1761
1819
|
}
|
|
1762
|
-
const
|
|
1820
|
+
const Ue = {
|
|
1763
1821
|
Continue: 100,
|
|
1764
1822
|
SwitchingProtocols: 101,
|
|
1765
1823
|
Processing: 102,
|
|
@@ -1830,58 +1888,58 @@ const Fe = {
|
|
|
1830
1888
|
SslHandshakeFailed: 525,
|
|
1831
1889
|
InvalidSslCertificate: 526
|
|
1832
1890
|
};
|
|
1833
|
-
Object.entries(
|
|
1834
|
-
|
|
1891
|
+
Object.entries(Ue).forEach(([n, e]) => {
|
|
1892
|
+
Ue[e] = n;
|
|
1835
1893
|
});
|
|
1836
|
-
function
|
|
1837
|
-
const e = new
|
|
1838
|
-
return l.extend(t,
|
|
1839
|
-
return
|
|
1894
|
+
function Wt(n) {
|
|
1895
|
+
const e = new X(n), t = At(X.prototype.request, e);
|
|
1896
|
+
return l.extend(t, X.prototype, e, { allOwnKeys: !0 }), l.extend(t, e, null, { allOwnKeys: !0 }), t.create = function(s) {
|
|
1897
|
+
return Wt(G(n, s));
|
|
1840
1898
|
}, t;
|
|
1841
1899
|
}
|
|
1842
|
-
const
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1900
|
+
const C = Wt(ae);
|
|
1901
|
+
C.Axios = X;
|
|
1902
|
+
C.CanceledError = le;
|
|
1903
|
+
C.CancelToken = Dr;
|
|
1904
|
+
C.isCancel = Ut;
|
|
1905
|
+
C.VERSION = Vt;
|
|
1906
|
+
C.toFormData = Ae;
|
|
1907
|
+
C.AxiosError = _;
|
|
1908
|
+
C.Cancel = C.CanceledError;
|
|
1909
|
+
C.all = function(e) {
|
|
1852
1910
|
return Promise.all(e);
|
|
1853
1911
|
};
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1912
|
+
C.spread = Ur;
|
|
1913
|
+
C.isAxiosError = qr;
|
|
1914
|
+
C.mergeConfig = G;
|
|
1915
|
+
C.AxiosHeaders = I;
|
|
1916
|
+
C.formToJSON = (n) => Dt(l.isHTMLForm(n) ? new FormData(n) : n);
|
|
1917
|
+
C.getAdapter = zt.getAdapter;
|
|
1918
|
+
C.HttpStatusCode = Ue;
|
|
1919
|
+
C.default = C;
|
|
1862
1920
|
const {
|
|
1863
|
-
Axios:
|
|
1864
|
-
AxiosError:
|
|
1865
|
-
CanceledError:
|
|
1866
|
-
isCancel:
|
|
1867
|
-
CancelToken:
|
|
1868
|
-
VERSION:
|
|
1869
|
-
all:
|
|
1870
|
-
Cancel:
|
|
1871
|
-
isAxiosError:
|
|
1872
|
-
spread:
|
|
1873
|
-
toFormData:
|
|
1874
|
-
AxiosHeaders:
|
|
1875
|
-
HttpStatusCode:
|
|
1876
|
-
formToJSON:
|
|
1877
|
-
getAdapter:
|
|
1878
|
-
mergeConfig:
|
|
1879
|
-
} =
|
|
1921
|
+
Axios: ri,
|
|
1922
|
+
AxiosError: si,
|
|
1923
|
+
CanceledError: ii,
|
|
1924
|
+
isCancel: oi,
|
|
1925
|
+
CancelToken: ci,
|
|
1926
|
+
VERSION: ai,
|
|
1927
|
+
all: li,
|
|
1928
|
+
Cancel: ui,
|
|
1929
|
+
isAxiosError: di,
|
|
1930
|
+
spread: hi,
|
|
1931
|
+
toFormData: fi,
|
|
1932
|
+
AxiosHeaders: pi,
|
|
1933
|
+
HttpStatusCode: mi,
|
|
1934
|
+
formToJSON: gi,
|
|
1935
|
+
getAdapter: bi,
|
|
1936
|
+
mergeConfig: _i
|
|
1937
|
+
} = C, Je = C.create({
|
|
1880
1938
|
baseURL: location.origin,
|
|
1881
1939
|
timeout: 6e4,
|
|
1882
1940
|
params: {}
|
|
1883
1941
|
});
|
|
1884
|
-
|
|
1942
|
+
Je.interceptors.response.use(
|
|
1885
1943
|
(n) => n,
|
|
1886
1944
|
(n) => {
|
|
1887
1945
|
if (n.response) {
|
|
@@ -1904,7 +1962,7 @@ Ve.interceptors.response.use(
|
|
|
1904
1962
|
throw n;
|
|
1905
1963
|
}
|
|
1906
1964
|
);
|
|
1907
|
-
const
|
|
1965
|
+
const me = async function(n, e, {
|
|
1908
1966
|
data: t,
|
|
1909
1967
|
params: r = {},
|
|
1910
1968
|
headers: s,
|
|
@@ -1922,7 +1980,7 @@ const pe = async function(n, e, {
|
|
|
1922
1980
|
}
|
|
1923
1981
|
s.Authorization = localStorage.openc3Token;
|
|
1924
1982
|
}
|
|
1925
|
-
return s.manual = !0, !i && !r.scope && (r.scope = window.openc3Scope),
|
|
1983
|
+
return s.manual = !0, !i && !r.scope && (r.scope = window.openc3Scope), Je({
|
|
1926
1984
|
method: n,
|
|
1927
1985
|
url: e,
|
|
1928
1986
|
data: t,
|
|
@@ -1930,20 +1988,20 @@ const pe = async function(n, e, {
|
|
|
1930
1988
|
headers: s,
|
|
1931
1989
|
onUploadProgress: c
|
|
1932
1990
|
});
|
|
1933
|
-
},
|
|
1991
|
+
}, qe = {
|
|
1934
1992
|
Accept: "application/json"
|
|
1935
|
-
},
|
|
1936
|
-
...
|
|
1993
|
+
}, mt = {
|
|
1994
|
+
...qe,
|
|
1937
1995
|
"Content-Type": "application/json"
|
|
1938
|
-
},
|
|
1996
|
+
}, Br = {
|
|
1939
1997
|
get: function(n, {
|
|
1940
1998
|
params: e,
|
|
1941
|
-
headers: t =
|
|
1999
|
+
headers: t = qe,
|
|
1942
2000
|
noScope: r,
|
|
1943
2001
|
noAuth: s,
|
|
1944
2002
|
onUploadProgress: o
|
|
1945
2003
|
} = {}) {
|
|
1946
|
-
return
|
|
2004
|
+
return me("get", n, {
|
|
1947
2005
|
params: e,
|
|
1948
2006
|
headers: t,
|
|
1949
2007
|
noScope: r,
|
|
@@ -1954,12 +2012,12 @@ const pe = async function(n, e, {
|
|
|
1954
2012
|
put: function(n, {
|
|
1955
2013
|
data: e,
|
|
1956
2014
|
params: t,
|
|
1957
|
-
headers: r =
|
|
2015
|
+
headers: r = mt,
|
|
1958
2016
|
noScope: s,
|
|
1959
2017
|
noAuth: o,
|
|
1960
2018
|
onUploadProgress: i
|
|
1961
2019
|
} = {}) {
|
|
1962
|
-
return
|
|
2020
|
+
return me("put", n, {
|
|
1963
2021
|
data: e,
|
|
1964
2022
|
params: t,
|
|
1965
2023
|
headers: r,
|
|
@@ -1971,12 +2029,12 @@ const pe = async function(n, e, {
|
|
|
1971
2029
|
post: function(n, {
|
|
1972
2030
|
data: e,
|
|
1973
2031
|
params: t,
|
|
1974
|
-
headers: r =
|
|
2032
|
+
headers: r = mt,
|
|
1975
2033
|
noScope: s,
|
|
1976
2034
|
noAuth: o,
|
|
1977
2035
|
onUploadProgress: i
|
|
1978
2036
|
} = {}) {
|
|
1979
|
-
return
|
|
2037
|
+
return me("post", n, {
|
|
1980
2038
|
data: e,
|
|
1981
2039
|
params: t,
|
|
1982
2040
|
headers: r,
|
|
@@ -1987,12 +2045,12 @@ const pe = async function(n, e, {
|
|
|
1987
2045
|
},
|
|
1988
2046
|
delete: function(n, {
|
|
1989
2047
|
params: e,
|
|
1990
|
-
headers: t =
|
|
2048
|
+
headers: t = qe,
|
|
1991
2049
|
noScope: r,
|
|
1992
2050
|
noAuth: s,
|
|
1993
2051
|
onUploadProgress: o
|
|
1994
2052
|
} = {}) {
|
|
1995
|
-
return
|
|
2053
|
+
return me("delete", n, {
|
|
1996
2054
|
params: e,
|
|
1997
2055
|
headers: t,
|
|
1998
2056
|
noScope: r,
|
|
@@ -2001,7 +2059,7 @@ const pe = async function(n, e, {
|
|
|
2001
2059
|
});
|
|
2002
2060
|
}
|
|
2003
2061
|
};
|
|
2004
|
-
let
|
|
2062
|
+
let Te = () => ({
|
|
2005
2063
|
emit(n, ...e) {
|
|
2006
2064
|
for (let t = this.events[n] || [], r = 0, s = t.length; r < s; r++)
|
|
2007
2065
|
t[r](...e);
|
|
@@ -2013,38 +2071,38 @@ let Oe = () => ({
|
|
|
2013
2071
|
};
|
|
2014
2072
|
}
|
|
2015
2073
|
});
|
|
2016
|
-
class
|
|
2074
|
+
class ue extends Error {
|
|
2017
2075
|
constructor(e, t) {
|
|
2018
2076
|
e instanceof Error ? (super(e.message), this.cause = e) : super(e), this.reason = t, this.name = "ReasonError";
|
|
2019
2077
|
}
|
|
2020
2078
|
}
|
|
2021
|
-
class
|
|
2079
|
+
class We extends ue {
|
|
2022
2080
|
constructor(e) {
|
|
2023
2081
|
super("Rejected", e), this.name = "SubscriptionRejectedError";
|
|
2024
2082
|
}
|
|
2025
2083
|
}
|
|
2026
|
-
class
|
|
2084
|
+
class Mr extends ue {
|
|
2027
2085
|
constructor(e) {
|
|
2028
2086
|
super(e || "Timed out to receive subscription ack"), this.name = "SubscriptionTimeoutError";
|
|
2029
2087
|
}
|
|
2030
2088
|
}
|
|
2031
|
-
class q extends
|
|
2089
|
+
class q extends ue {
|
|
2032
2090
|
constructor(e, t) {
|
|
2033
2091
|
t ? super(e, t) : super("Disconnected", e), this.name = "DisconnectedError";
|
|
2034
2092
|
}
|
|
2035
2093
|
}
|
|
2036
|
-
class
|
|
2094
|
+
class Hr extends q {
|
|
2037
2095
|
constructor(e) {
|
|
2038
2096
|
super(e, "stale_connection"), this.name = "StaleConnectionError";
|
|
2039
2097
|
}
|
|
2040
2098
|
}
|
|
2041
|
-
function
|
|
2099
|
+
function Kt(n) {
|
|
2042
2100
|
return n ? `{${Object.keys(n).sort().filter((t) => n[t] !== void 0).map((t) => {
|
|
2043
2101
|
let r = JSON.stringify(n[t]);
|
|
2044
2102
|
return `${JSON.stringify(t)}:${r}`;
|
|
2045
2103
|
}).join(",")}}` : "";
|
|
2046
2104
|
}
|
|
2047
|
-
class
|
|
2105
|
+
class zr {
|
|
2048
2106
|
constructor(e) {
|
|
2049
2107
|
this.channel = e, this.listeners = [];
|
|
2050
2108
|
}
|
|
@@ -2093,14 +2151,14 @@ class qr {
|
|
|
2093
2151
|
}
|
|
2094
2152
|
}
|
|
2095
2153
|
const J = /* @__PURE__ */ Symbol("state");
|
|
2096
|
-
class
|
|
2154
|
+
class Xt {
|
|
2097
2155
|
// Unique channel identifier
|
|
2098
2156
|
// static identifier = ''
|
|
2099
2157
|
constructor(e = {}) {
|
|
2100
|
-
this.emitter =
|
|
2158
|
+
this.emitter = Te(), this.params = Object.freeze(e), this.presence = new zr(this), this.initialConnect = !0, this[J] = "idle";
|
|
2101
2159
|
}
|
|
2102
2160
|
get identifier() {
|
|
2103
|
-
return this._identifier ? this._identifier : (this._identifier =
|
|
2161
|
+
return this._identifier ? this._identifier : (this._identifier = Kt({
|
|
2104
2162
|
channel: this.channelId,
|
|
2105
2163
|
...this.params
|
|
2106
2164
|
}), this._identifier);
|
|
@@ -2190,7 +2248,7 @@ class Kt {
|
|
|
2190
2248
|
), r.push(
|
|
2191
2249
|
this.on("close", (s) => {
|
|
2192
2250
|
r.forEach((o) => o()), t(
|
|
2193
|
-
s || new
|
|
2251
|
+
s || new ue(
|
|
2194
2252
|
"Channel was disconnected before subscribing",
|
|
2195
2253
|
"canceled"
|
|
2196
2254
|
)
|
|
@@ -2200,7 +2258,7 @@ class Kt {
|
|
|
2200
2258
|
}), this._pendingSubscribe);
|
|
2201
2259
|
}
|
|
2202
2260
|
}
|
|
2203
|
-
class
|
|
2261
|
+
class Vr {
|
|
2204
2262
|
constructor(e) {
|
|
2205
2263
|
this.id = e, this.intent = "unsubscribed", this.state = "idle", this.channels = [], this.disposed = !1, this._pendings = [];
|
|
2206
2264
|
}
|
|
@@ -2260,7 +2318,7 @@ class Br {
|
|
|
2260
2318
|
return !t || t.acquired || t.intent !== e ? !1 : (this._pendings.pop(), t.canceled = !0, !0);
|
|
2261
2319
|
}
|
|
2262
2320
|
}
|
|
2263
|
-
class
|
|
2321
|
+
class Jr {
|
|
2264
2322
|
constructor() {
|
|
2265
2323
|
this.queue = [];
|
|
2266
2324
|
}
|
|
@@ -2272,9 +2330,9 @@ class Mr {
|
|
|
2272
2330
|
), this.queue.length > 1 && await this.queue[this.queue.length - 2]);
|
|
2273
2331
|
}
|
|
2274
2332
|
}
|
|
2275
|
-
class
|
|
2333
|
+
class Wr {
|
|
2276
2334
|
constructor(e) {
|
|
2277
|
-
e.concurrentSubscribes === !1 && (this.glv = new
|
|
2335
|
+
e.concurrentSubscribes === !1 && (this.glv = new Jr()), this._subscriptions = {}, this._localToRemote = {};
|
|
2278
2336
|
}
|
|
2279
2337
|
all() {
|
|
2280
2338
|
return Object.values(this._subscriptions);
|
|
@@ -2283,7 +2341,7 @@ class Hr {
|
|
|
2283
2341
|
return this._subscriptions[e];
|
|
2284
2342
|
}
|
|
2285
2343
|
create(e, { subscribe: t, unsubscribe: r }) {
|
|
2286
|
-
let s = this._subscriptions[e] = new
|
|
2344
|
+
let s = this._subscriptions[e] = new Vr(e);
|
|
2287
2345
|
return s.remoteId = this._localToRemote[e], s.subscriber = t, s.unsubscriber = r, s.gvl = this.glv, s;
|
|
2288
2346
|
}
|
|
2289
2347
|
remove(e) {
|
|
@@ -2295,9 +2353,9 @@ class Hr {
|
|
|
2295
2353
|
r && (r.remoteId = t);
|
|
2296
2354
|
}
|
|
2297
2355
|
}
|
|
2298
|
-
class
|
|
2356
|
+
class Kr {
|
|
2299
2357
|
constructor(e = {}) {
|
|
2300
|
-
this.subscriptions = new
|
|
2358
|
+
this.subscriptions = new Wr(e), this._pendingMessages = [], this._remoteToLocal = {};
|
|
2301
2359
|
}
|
|
2302
2360
|
subscribe(e, t) {
|
|
2303
2361
|
this._remoteToLocal[t] = e, this.subscriptions.storeRemoteId(e, t), this.flush(t);
|
|
@@ -2371,11 +2429,11 @@ class Gt {
|
|
|
2371
2429
|
this.log("error", e, t);
|
|
2372
2430
|
}
|
|
2373
2431
|
}
|
|
2374
|
-
class
|
|
2432
|
+
class de extends Gt {
|
|
2375
2433
|
writeLogEntry() {
|
|
2376
2434
|
}
|
|
2377
2435
|
}
|
|
2378
|
-
class
|
|
2436
|
+
class Xr {
|
|
2379
2437
|
encode(e) {
|
|
2380
2438
|
return JSON.stringify(e);
|
|
2381
2439
|
}
|
|
@@ -2386,11 +2444,11 @@ class Vr {
|
|
|
2386
2444
|
}
|
|
2387
2445
|
}
|
|
2388
2446
|
}
|
|
2389
|
-
let
|
|
2390
|
-
class
|
|
2447
|
+
let Gr = 0;
|
|
2448
|
+
class Qt {
|
|
2391
2449
|
constructor(e = {}) {
|
|
2392
2450
|
let { logger: t } = e;
|
|
2393
|
-
this.logger = t || new
|
|
2451
|
+
this.logger = t || new de(), this.pendingSubscriptions = {}, this.pendingUnsubscriptions = {}, this.subscribeCooldownInterval = e.subscribeCooldownInterval || 250, this.subscribeRetryInterval = e.subscribeRetryInterval || 5e3;
|
|
2394
2452
|
}
|
|
2395
2453
|
attached(e) {
|
|
2396
2454
|
this.cable = e;
|
|
@@ -2398,7 +2456,7 @@ class Xt {
|
|
|
2398
2456
|
subscribe(e, t) {
|
|
2399
2457
|
let r = { channel: e };
|
|
2400
2458
|
t && Object.assign(r, t);
|
|
2401
|
-
let s =
|
|
2459
|
+
let s = Kt(r);
|
|
2402
2460
|
if (this.pendingUnsubscriptions[s]) {
|
|
2403
2461
|
let i = this.subscribeCooldownInterval * 1.5;
|
|
2404
2462
|
return this.logger.debug(
|
|
@@ -2414,12 +2472,12 @@ class Xt {
|
|
|
2414
2472
|
return this.logger.warn("subscription is already pending, skipping", s), Promise.reject(Error("Already subscribing"));
|
|
2415
2473
|
let o = this.subscribeRetryInterval;
|
|
2416
2474
|
return new Promise((i, c) => {
|
|
2417
|
-
let
|
|
2475
|
+
let u = ++Gr;
|
|
2418
2476
|
this.pendingSubscriptions[s] = {
|
|
2419
2477
|
resolve: i,
|
|
2420
2478
|
reject: c,
|
|
2421
|
-
id:
|
|
2422
|
-
}, this.cable.send(this.buildSubscribeRequest(s)), this.maybeRetrySubscribe(
|
|
2479
|
+
id: u
|
|
2480
|
+
}, this.cable.send(this.buildSubscribeRequest(s)), this.maybeRetrySubscribe(u, s, o);
|
|
2423
2481
|
});
|
|
2424
2482
|
}
|
|
2425
2483
|
buildSubscribeRequest(e) {
|
|
@@ -2441,7 +2499,7 @@ class Xt {
|
|
|
2441
2499
|
setTimeout(() => {
|
|
2442
2500
|
let s = this.pendingSubscriptions[t];
|
|
2443
2501
|
s && s.id === e && (delete this.pendingSubscriptions[t], s.reject(
|
|
2444
|
-
new
|
|
2502
|
+
new Mr(
|
|
2445
2503
|
`Haven't received subscription ack in ${r * 2}ms for ${t}`
|
|
2446
2504
|
)
|
|
2447
2505
|
));
|
|
@@ -2499,7 +2557,7 @@ class Xt {
|
|
|
2499
2557
|
}
|
|
2500
2558
|
if (t === "reject_subscription") {
|
|
2501
2559
|
let c = this.pendingSubscriptions[r];
|
|
2502
|
-
return c ? (delete this.pendingSubscriptions[r], c.reject(new
|
|
2560
|
+
return c ? (delete this.pendingSubscriptions[r], c.reject(new We())) : this.logger.error("subscription not found", { type: t, identifier: r });
|
|
2503
2561
|
}
|
|
2504
2562
|
if (s)
|
|
2505
2563
|
return { identifier: r, message: s };
|
|
@@ -2514,10 +2572,10 @@ class Xt {
|
|
|
2514
2572
|
return !1;
|
|
2515
2573
|
}
|
|
2516
2574
|
}
|
|
2517
|
-
const
|
|
2518
|
-
class
|
|
2575
|
+
const bt = () => Date.now() / 1e3 | 0;
|
|
2576
|
+
class Qr extends Qt {
|
|
2519
2577
|
constructor(e = {}) {
|
|
2520
|
-
super(e), this.streamsPositions = {}, this.subscriptionStreams = {}, this.pendingHistory = {}, this.pendingPresence = {}, this.presenceInfo = {}, this.restoreSince = e.historyTimestamp, this.disableSessionRecovery = e.disableSessionRecovery, this.restoreSince === void 0 && (this.restoreSince =
|
|
2578
|
+
super(e), this.streamsPositions = {}, this.subscriptionStreams = {}, this.pendingHistory = {}, this.pendingPresence = {}, this.presenceInfo = {}, this.restoreSince = e.historyTimestamp, this.disableSessionRecovery = e.disableSessionRecovery, this.restoreSince === void 0 && (this.restoreSince = bt()), this.sessionId = void 0, this.sendPongs = e.pongs;
|
|
2521
2579
|
}
|
|
2522
2580
|
reset(e) {
|
|
2523
2581
|
for (let t in this.pendingPresence)
|
|
@@ -2537,7 +2595,7 @@ class Wr extends Xt {
|
|
|
2537
2595
|
if (t === "confirm_subscription")
|
|
2538
2596
|
return this.subscriptionStreams[r] || (this.subscriptionStreams[r] = /* @__PURE__ */ new Set()), super.receive(e);
|
|
2539
2597
|
if (t === "ping")
|
|
2540
|
-
return this.restoreSince && (this.restoreSince =
|
|
2598
|
+
return this.restoreSince && (this.restoreSince = bt()), this.sendPongs && this.sendPong(), this.cable.keepalive(e.message);
|
|
2541
2599
|
if (this.cable.keepalive(), t === "confirm_history") {
|
|
2542
2600
|
this.logger.debug("history result received", e), this.cable.notify("history_received", r);
|
|
2543
2601
|
return;
|
|
@@ -2658,12 +2716,12 @@ class Wr extends Xt {
|
|
|
2658
2716
|
});
|
|
2659
2717
|
}
|
|
2660
2718
|
}
|
|
2661
|
-
class
|
|
2719
|
+
class Zr extends ue {
|
|
2662
2720
|
constructor() {
|
|
2663
2721
|
super("No connection", "closed"), this.name = "NoConnectionError";
|
|
2664
2722
|
}
|
|
2665
2723
|
}
|
|
2666
|
-
class
|
|
2724
|
+
class Zt extends Xt {
|
|
2667
2725
|
static identifier = "__ghost__";
|
|
2668
2726
|
constructor(e, t) {
|
|
2669
2727
|
super(t), this.channelId = e;
|
|
@@ -2675,9 +2733,9 @@ class Qt extends Kt {
|
|
|
2675
2733
|
return this._channelId;
|
|
2676
2734
|
}
|
|
2677
2735
|
}
|
|
2678
|
-
const
|
|
2679
|
-
class
|
|
2680
|
-
static identifier =
|
|
2736
|
+
const Yr = "$pubsub";
|
|
2737
|
+
class _t extends Xt {
|
|
2738
|
+
static identifier = Yr;
|
|
2681
2739
|
async perform(e, t) {
|
|
2682
2740
|
if (e.startsWith("$"))
|
|
2683
2741
|
return super.perform(e, t);
|
|
@@ -2685,7 +2743,7 @@ class bt extends Kt {
|
|
|
2685
2743
|
}
|
|
2686
2744
|
}
|
|
2687
2745
|
const W = /* @__PURE__ */ Symbol("state");
|
|
2688
|
-
let
|
|
2746
|
+
let es = class {
|
|
2689
2747
|
constructor({
|
|
2690
2748
|
transport: e,
|
|
2691
2749
|
protocol: t,
|
|
@@ -2694,9 +2752,9 @@ let Xr = class {
|
|
|
2694
2752
|
lazy: o,
|
|
2695
2753
|
hubOptions: i,
|
|
2696
2754
|
performFailures: c,
|
|
2697
|
-
transportConfigurator:
|
|
2755
|
+
transportConfigurator: u
|
|
2698
2756
|
}) {
|
|
2699
|
-
this.emitter =
|
|
2757
|
+
this.emitter = Te(), this.transport = e, this.encoder = r, this.logger = s || new de(), this.protocol = t, this.performFailures = c || "throw", this.protocol.attached(this), this.hub = new Kr(i || {}), this[W] = "idle", this.handleClose = this.handleClose.bind(this), this.handleIncoming = this.handleIncoming.bind(this), this.transportConfigurator = u, this.transport.on("close", this.handleClose), this.transport.on("data", this.handleIncoming), this.initialConnect = !0, this.recovering = !1, o === !1 && this.connect().catch(() => {
|
|
2700
2758
|
});
|
|
2701
2759
|
}
|
|
2702
2760
|
get state() {
|
|
@@ -2794,16 +2852,16 @@ let Xr = class {
|
|
|
2794
2852
|
this.emit("keepalive", e);
|
|
2795
2853
|
}
|
|
2796
2854
|
streamFrom(e) {
|
|
2797
|
-
let t = new
|
|
2855
|
+
let t = new _t({ stream_name: e });
|
|
2798
2856
|
return this.subscribe(t);
|
|
2799
2857
|
}
|
|
2800
2858
|
streamFromSigned(e) {
|
|
2801
|
-
let t = new
|
|
2859
|
+
let t = new _t({ signed_stream_name: e });
|
|
2802
2860
|
return this.subscribe(t);
|
|
2803
2861
|
}
|
|
2804
2862
|
subscribeTo(e, t) {
|
|
2805
2863
|
let r, s;
|
|
2806
|
-
return typeof e == "string" && (s = e, e =
|
|
2864
|
+
return typeof e == "string" && (s = e, e = Zt), r = s ? new e(s, t) : new e(t), this.subscribe(r);
|
|
2807
2865
|
}
|
|
2808
2866
|
subscribe(e) {
|
|
2809
2867
|
if (!e.attached(this)) return e;
|
|
@@ -2855,7 +2913,7 @@ let Xr = class {
|
|
|
2855
2913
|
this.hub.subscribe(s, c), this.logger.debug("subscribed", { ...i, remoteId: c }), e.notify("connected");
|
|
2856
2914
|
} catch (c) {
|
|
2857
2915
|
if (c) {
|
|
2858
|
-
if (c instanceof
|
|
2916
|
+
if (c instanceof We && this.logger.warn("rejected", i), c instanceof q) {
|
|
2859
2917
|
this.logger.debug(
|
|
2860
2918
|
"disconnected during subscription; will retry on connect",
|
|
2861
2919
|
i
|
|
@@ -2931,7 +2989,7 @@ let Xr = class {
|
|
|
2931
2989
|
}
|
|
2932
2990
|
async _perform(e, t, r) {
|
|
2933
2991
|
if (this.state === "connecting" && await this.pendingConnect(), this.state === "closed" || this.state === "disconnected")
|
|
2934
|
-
throw new
|
|
2992
|
+
throw new Zr();
|
|
2935
2993
|
let s = this.hub.subscriptions.get(e);
|
|
2936
2994
|
if (!s)
|
|
2937
2995
|
throw Error(`Subscription not found: ${e}`);
|
|
@@ -2987,24 +3045,24 @@ let Xr = class {
|
|
|
2987
3045
|
}), this._pendingConnect);
|
|
2988
3046
|
}
|
|
2989
3047
|
};
|
|
2990
|
-
const
|
|
3048
|
+
const ts = {
|
|
2991
3049
|
maxMissingPings: 2,
|
|
2992
3050
|
maxReconnectAttempts: 1 / 0
|
|
2993
|
-
},
|
|
3051
|
+
}, Y = () => Date.now(), Yt = (n, e) => {
|
|
2994
3052
|
e = e || {};
|
|
2995
3053
|
let { backoffRate: t, jitterRatio: r, maxInterval: s } = e;
|
|
2996
3054
|
return t = t || 2, r === void 0 && (r = 0.5), (o) => {
|
|
2997
|
-
let i = n * t ** o, c = i * t,
|
|
2998
|
-
return
|
|
3055
|
+
let i = n * t ** o, c = i * t, u = i + (c - i) * Math.random(), d = 2 * (Math.random() - 0.5) * r;
|
|
3056
|
+
return u = u * (1 + d), s && s < u && (u = s), u;
|
|
2999
3057
|
};
|
|
3000
3058
|
};
|
|
3001
|
-
let
|
|
3059
|
+
let en = class {
|
|
3002
3060
|
constructor({ pingInterval: e, ...t }) {
|
|
3003
3061
|
if (this.pingInterval = e, !this.pingInterval)
|
|
3004
3062
|
throw Error(`Incorrect pingInterval is provided: ${e}`);
|
|
3005
|
-
if (t = Object.assign({},
|
|
3063
|
+
if (t = Object.assign({}, ts, t), this.strategy = t.reconnectStrategy, !this.strategy)
|
|
3006
3064
|
throw Error("Reconnect strategy must be provided");
|
|
3007
|
-
this.maxMissingPings = t.maxMissingPings, this.maxReconnectAttempts = t.maxReconnectAttempts, this.logger = t.logger || new
|
|
3065
|
+
this.maxMissingPings = t.maxMissingPings, this.maxReconnectAttempts = t.maxReconnectAttempts, this.logger = t.logger || new de(), this.state = "pending_connect", this.attempts = 0, this.disconnectedAt = Y();
|
|
3008
3066
|
}
|
|
3009
3067
|
watch(e) {
|
|
3010
3068
|
this.target = e, this.initListeners();
|
|
@@ -3017,19 +3075,19 @@ let Yt = class {
|
|
|
3017
3075
|
initListeners() {
|
|
3018
3076
|
this.unbind = [], this.unbind.push(
|
|
3019
3077
|
this.target.on("connect", () => {
|
|
3020
|
-
this.attempts = 0, this.pingedAt =
|
|
3078
|
+
this.attempts = 0, this.pingedAt = Y(), this.state = "connected", this.cancelReconnect(), this.startPolling();
|
|
3021
3079
|
})
|
|
3022
3080
|
), this.unbind.push(
|
|
3023
3081
|
this.target.on("disconnect", () => {
|
|
3024
|
-
this.disconnectedAt =
|
|
3082
|
+
this.disconnectedAt = Y(), this.state = "disconnected", this.stopPolling(), this.scheduleReconnect();
|
|
3025
3083
|
})
|
|
3026
3084
|
), this.unbind.push(
|
|
3027
3085
|
this.target.on("close", () => {
|
|
3028
|
-
this.disconnectedAt =
|
|
3086
|
+
this.disconnectedAt = Y(), this.state = "closed", this.cancelReconnect(), this.stopPolling();
|
|
3029
3087
|
})
|
|
3030
3088
|
), this.unbind.push(
|
|
3031
3089
|
this.target.on("keepalive", () => {
|
|
3032
|
-
this.pingedAt =
|
|
3090
|
+
this.pingedAt = Y();
|
|
3033
3091
|
})
|
|
3034
3092
|
), this.unbind.push(() => {
|
|
3035
3093
|
this.cancelReconnect(), this.stopPolling();
|
|
@@ -3049,8 +3107,8 @@ let Yt = class {
|
|
|
3049
3107
|
this.pollId && clearTimeout(this.pollId);
|
|
3050
3108
|
}
|
|
3051
3109
|
checkStale() {
|
|
3052
|
-
let e =
|
|
3053
|
-
e > this.maxMissingPings * this.pingInterval && (this.logger.warn(`Stale connection: ${e}ms without pings`), this.state = "pending_disconnect", this.target.disconnected(new
|
|
3110
|
+
let e = Y() - this.pingedAt;
|
|
3111
|
+
e > this.maxMissingPings * this.pingInterval && (this.logger.warn(`Stale connection: ${e}ms without pings`), this.state = "pending_disconnect", this.target.disconnected(new Hr()));
|
|
3054
3112
|
}
|
|
3055
3113
|
scheduleReconnect() {
|
|
3056
3114
|
if (this.attempts >= this.maxReconnectAttempts) {
|
|
@@ -3064,9 +3122,9 @@ let Yt = class {
|
|
|
3064
3122
|
this.reconnnectId && (clearTimeout(this.reconnnectId), delete this.reconnnectId);
|
|
3065
3123
|
}
|
|
3066
3124
|
};
|
|
3067
|
-
class
|
|
3125
|
+
class ns {
|
|
3068
3126
|
constructor(e, t = {}) {
|
|
3069
|
-
this.transports = e, this.transport = null, this.emitter =
|
|
3127
|
+
this.transports = e, this.transport = null, this.emitter = Te(), this.unbind = [], this.logger = t.logger || new de();
|
|
3070
3128
|
}
|
|
3071
3129
|
displayName() {
|
|
3072
3130
|
return "fallbacked transport";
|
|
@@ -3137,7 +3195,7 @@ class Zr {
|
|
|
3137
3195
|
);
|
|
3138
3196
|
}
|
|
3139
3197
|
}
|
|
3140
|
-
class
|
|
3198
|
+
class rs {
|
|
3141
3199
|
constructor(e, t = {}) {
|
|
3142
3200
|
this.url = e;
|
|
3143
3201
|
let r = t.websocketImplementation;
|
|
@@ -3147,7 +3205,7 @@ class Yr {
|
|
|
3147
3205
|
this.Impl = WebSocket;
|
|
3148
3206
|
else
|
|
3149
3207
|
throw new Error("No WebSocket support");
|
|
3150
|
-
this.connected = !1, this.emitter =
|
|
3208
|
+
this.connected = !1, this.emitter = Te();
|
|
3151
3209
|
let { format: s, subprotocol: o, authStrategy: i } = t;
|
|
3152
3210
|
this.format = s || "text", this.connectionOptions = t.websocketOptions, this.authStrategy = i || "param", this.authProtocol = "", this.subprotocol = o;
|
|
3153
3211
|
}
|
|
@@ -3225,7 +3283,7 @@ class Yr {
|
|
|
3225
3283
|
this.ws.onclose = void 0, this.ws.onmessage = void 0, this.ws.onopen = void 0, this.ws.close(), delete this.ws, this.connected = !1, this.emitter.emit("close");
|
|
3226
3284
|
}
|
|
3227
3285
|
}
|
|
3228
|
-
class
|
|
3286
|
+
class ss {
|
|
3229
3287
|
constructor(e) {
|
|
3230
3288
|
this.channel = e;
|
|
3231
3289
|
}
|
|
@@ -3248,36 +3306,36 @@ class es {
|
|
|
3248
3306
|
return this.channel.disconnect();
|
|
3249
3307
|
}
|
|
3250
3308
|
}
|
|
3251
|
-
class
|
|
3309
|
+
class is extends Zt {
|
|
3252
3310
|
constructor(e, t, r) {
|
|
3253
|
-
super(e, t), this.subscription = new
|
|
3311
|
+
super(e, t), this.subscription = new ss(this), Object.assign(this.subscription, r), this.on(
|
|
3254
3312
|
"connect",
|
|
3255
3313
|
({ reconnect: s }) => this.subscription.notify("connected", { reconnected: s })
|
|
3256
3314
|
), this.on(
|
|
3257
3315
|
"disconnect",
|
|
3258
3316
|
() => this.subscription.notify("disconnected", { allowReconnect: !0 })
|
|
3259
3317
|
), this.on("message", (s) => this.subscription.notify("received", s)), this.on("close", (s) => {
|
|
3260
|
-
s && s instanceof
|
|
3318
|
+
s && s instanceof We ? this.subscription.notify("rejected") : this.subscription.notify("disconnected", { allowReconnect: !1 });
|
|
3261
3319
|
});
|
|
3262
3320
|
}
|
|
3263
3321
|
}
|
|
3264
|
-
class
|
|
3322
|
+
class os {
|
|
3265
3323
|
constructor(e) {
|
|
3266
3324
|
this.cable = e;
|
|
3267
3325
|
}
|
|
3268
3326
|
create(e, t) {
|
|
3269
3327
|
let r, s;
|
|
3270
3328
|
typeof e == "object" ? (r = e.channel, delete e.channel, s = e) : (r = e, s = {});
|
|
3271
|
-
let o = new
|
|
3329
|
+
let o = new is(r, s, t);
|
|
3272
3330
|
return o.subscription.notify("initialized"), this.cable.subscribe(o), o.subscription;
|
|
3273
3331
|
}
|
|
3274
3332
|
findAll(e) {
|
|
3275
3333
|
return this.cable.hub.channels.filter((t) => t.identifier === e).map((t) => t.subscription);
|
|
3276
3334
|
}
|
|
3277
3335
|
}
|
|
3278
|
-
class
|
|
3336
|
+
class cs {
|
|
3279
3337
|
constructor(e) {
|
|
3280
|
-
this.cable = e, this.subscriptions = new
|
|
3338
|
+
this.cable = e, this.subscriptions = new os(e);
|
|
3281
3339
|
}
|
|
3282
3340
|
send(e) {
|
|
3283
3341
|
return this.cable.send(e);
|
|
@@ -3292,7 +3350,7 @@ class rs {
|
|
|
3292
3350
|
return this.cable.connect();
|
|
3293
3351
|
}
|
|
3294
3352
|
}
|
|
3295
|
-
const
|
|
3353
|
+
const tn = {
|
|
3296
3354
|
protocol: "actioncable-v1-json",
|
|
3297
3355
|
pingInterval: 3e3,
|
|
3298
3356
|
maxReconnectAttempts: 1 / 0,
|
|
@@ -3300,9 +3358,9 @@ const en = {
|
|
|
3300
3358
|
logLevel: "warn",
|
|
3301
3359
|
lazy: !0
|
|
3302
3360
|
};
|
|
3303
|
-
function
|
|
3361
|
+
function as(n, e) {
|
|
3304
3362
|
if (typeof n == "object" && typeof e > "u" && (e = n, n = void 0), e = e || {}, !n && !e.transport) throw Error("URL or transport must be specified");
|
|
3305
|
-
e = Object.assign({},
|
|
3363
|
+
e = Object.assign({}, tn, e);
|
|
3306
3364
|
let {
|
|
3307
3365
|
protocol: t,
|
|
3308
3366
|
websocketImplementation: r,
|
|
@@ -3310,47 +3368,47 @@ function ss(n, e) {
|
|
|
3310
3368
|
websocketOptions: o,
|
|
3311
3369
|
websocketAuthStrategy: i,
|
|
3312
3370
|
fallbacks: c,
|
|
3313
|
-
logLevel:
|
|
3314
|
-
logger:
|
|
3371
|
+
logLevel: u,
|
|
3372
|
+
logger: d,
|
|
3315
3373
|
transport: a,
|
|
3316
|
-
encoder:
|
|
3317
|
-
lazy:
|
|
3318
|
-
monitor:
|
|
3319
|
-
pingInterval:
|
|
3320
|
-
reconnectStrategy:
|
|
3321
|
-
maxMissingPings:
|
|
3374
|
+
encoder: h,
|
|
3375
|
+
lazy: b,
|
|
3376
|
+
monitor: g,
|
|
3377
|
+
pingInterval: m,
|
|
3378
|
+
reconnectStrategy: p,
|
|
3379
|
+
maxMissingPings: f,
|
|
3322
3380
|
maxReconnectAttempts: w,
|
|
3323
|
-
subprotocol:
|
|
3324
|
-
tokenRefresher:
|
|
3325
|
-
historyTimestamp:
|
|
3326
|
-
protocolOptions:
|
|
3381
|
+
subprotocol: x,
|
|
3382
|
+
tokenRefresher: E,
|
|
3383
|
+
historyTimestamp: S,
|
|
3384
|
+
protocolOptions: A,
|
|
3327
3385
|
concurrentSubscribes: j,
|
|
3328
|
-
performFailures:
|
|
3329
|
-
transportConfigurator:
|
|
3330
|
-
auth:
|
|
3386
|
+
performFailures: N,
|
|
3387
|
+
transportConfigurator: H,
|
|
3388
|
+
auth: $
|
|
3331
3389
|
} = e;
|
|
3332
|
-
if (
|
|
3333
|
-
|
|
3334
|
-
let
|
|
3335
|
-
if (
|
|
3336
|
-
t = new
|
|
3337
|
-
else if (
|
|
3338
|
-
t = new
|
|
3339
|
-
logger:
|
|
3340
|
-
historyTimestamp:
|
|
3341
|
-
...
|
|
3390
|
+
if (d = d || new de(u), typeof t == "string") {
|
|
3391
|
+
x = x || t;
|
|
3392
|
+
let D = t.substring(0, t.lastIndexOf("-")), U = t.substring(t.lastIndexOf("-") + 1);
|
|
3393
|
+
if (A = A || {}, D === "actioncable-v1")
|
|
3394
|
+
t = new Qt({ logger: d, ...A });
|
|
3395
|
+
else if (D === "actioncable-v1-ext")
|
|
3396
|
+
t = new Qr({
|
|
3397
|
+
logger: d,
|
|
3398
|
+
historyTimestamp: S,
|
|
3399
|
+
...A
|
|
3342
3400
|
});
|
|
3343
3401
|
else
|
|
3344
3402
|
throw Error(`Protocol is not supported yet: ${t}`);
|
|
3345
|
-
if (
|
|
3346
|
-
|
|
3347
|
-
else if (
|
|
3348
|
-
if (s = "binary", !
|
|
3403
|
+
if (U === "json")
|
|
3404
|
+
h = h || new Xr(), s = s || "text";
|
|
3405
|
+
else if (U === "msgpack") {
|
|
3406
|
+
if (s = "binary", !h)
|
|
3349
3407
|
throw Error(
|
|
3350
3408
|
"Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own"
|
|
3351
3409
|
);
|
|
3352
|
-
} else if (
|
|
3353
|
-
if (s = s || "binary", !
|
|
3410
|
+
} else if (U === "protobuf") {
|
|
3411
|
+
if (s = s || "binary", !h)
|
|
3354
3412
|
throw Error(
|
|
3355
3413
|
"Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own"
|
|
3356
3414
|
);
|
|
@@ -3358,40 +3416,40 @@ function ss(n, e) {
|
|
|
3358
3416
|
throw Error(`Protocol is not supported yet: ${t}`);
|
|
3359
3417
|
}
|
|
3360
3418
|
if (!t) throw Error("Protocol must be specified");
|
|
3361
|
-
a = a || new
|
|
3419
|
+
a = a || new rs(n, {
|
|
3362
3420
|
websocketImplementation: r,
|
|
3363
3421
|
websocketOptions: o,
|
|
3364
|
-
subprotocol:
|
|
3422
|
+
subprotocol: x,
|
|
3365
3423
|
authStrategy: i,
|
|
3366
3424
|
format: s
|
|
3367
|
-
}), c && (a = new
|
|
3368
|
-
pingInterval:
|
|
3369
|
-
reconnectStrategy:
|
|
3370
|
-
maxMissingPings:
|
|
3425
|
+
}), c && (a = new ns([a, ...c], { logger: d })), $ && $.token && a.setToken($.token, $.param || "jid"), p = p || Yt(m), g !== !1 && (g = g || new en({
|
|
3426
|
+
pingInterval: m,
|
|
3427
|
+
reconnectStrategy: p,
|
|
3428
|
+
maxMissingPings: f,
|
|
3371
3429
|
maxReconnectAttempts: w,
|
|
3372
|
-
logger:
|
|
3430
|
+
logger: d
|
|
3373
3431
|
}));
|
|
3374
|
-
let Q = { concurrentSubscribes: j }, M = new
|
|
3432
|
+
let Q = { concurrentSubscribes: j }, M = new es({
|
|
3375
3433
|
protocol: t,
|
|
3376
3434
|
transport: a,
|
|
3377
|
-
encoder:
|
|
3378
|
-
logger:
|
|
3379
|
-
lazy:
|
|
3435
|
+
encoder: h,
|
|
3436
|
+
logger: d,
|
|
3437
|
+
lazy: b,
|
|
3380
3438
|
hubOptions: Q,
|
|
3381
|
-
performFailures:
|
|
3382
|
-
transportConfigurator:
|
|
3439
|
+
performFailures: N,
|
|
3440
|
+
transportConfigurator: H
|
|
3383
3441
|
});
|
|
3384
|
-
return
|
|
3442
|
+
return g && (g.watch(M), M.monitor = g), E && ls(M, async () => {
|
|
3385
3443
|
try {
|
|
3386
|
-
await
|
|
3387
|
-
} catch (
|
|
3388
|
-
return
|
|
3444
|
+
await E(a);
|
|
3445
|
+
} catch (D) {
|
|
3446
|
+
return d.error("Failed to refresh authentication token: " + D), !1;
|
|
3389
3447
|
}
|
|
3390
3448
|
return M.connect().catch(() => {
|
|
3391
3449
|
}), !0;
|
|
3392
3450
|
}), M;
|
|
3393
3451
|
}
|
|
3394
|
-
function
|
|
3452
|
+
function ls(n, e) {
|
|
3395
3453
|
let t = !1;
|
|
3396
3454
|
n.on("connect", () => t = !1), n.on("close", async (r) => {
|
|
3397
3455
|
if (r) {
|
|
@@ -3403,12 +3461,12 @@ function is(n, e) {
|
|
|
3403
3461
|
}
|
|
3404
3462
|
});
|
|
3405
3463
|
}
|
|
3406
|
-
class
|
|
3464
|
+
class us extends Gt {
|
|
3407
3465
|
writeLogEntry(e, t, r) {
|
|
3408
3466
|
r ? console[e](t, r) : console[e](t);
|
|
3409
3467
|
}
|
|
3410
3468
|
}
|
|
3411
|
-
class
|
|
3469
|
+
class ds extends en {
|
|
3412
3470
|
watch(e) {
|
|
3413
3471
|
super.watch(e), this.initActivityListeners();
|
|
3414
3472
|
}
|
|
@@ -3428,61 +3486,61 @@ class cs extends Yt {
|
|
|
3428
3486
|
this.state === "disconnected" || this.state === "closed" || (this.logger.info("Disconnecting", { reason: e.message }), this.cancelReconnect(), this.stopPolling(), this.state = "pending_disconnect", this.target.disconnected(e));
|
|
3429
3487
|
}
|
|
3430
3488
|
}
|
|
3431
|
-
const
|
|
3432
|
-
for (let t of
|
|
3489
|
+
const hs = ["cable", "action-cable"], fs = "/cable", Ne = (n, e) => {
|
|
3490
|
+
for (let t of hs) {
|
|
3433
3491
|
let r = n.head.querySelector(`meta[name='${t}-${e}']`);
|
|
3434
3492
|
if (r)
|
|
3435
3493
|
return r.getAttribute("content");
|
|
3436
3494
|
}
|
|
3437
|
-
},
|
|
3495
|
+
}, yt = (n) => n.match(/wss?:\/\//) ? n : typeof window < "u" ? `${window.location.protocol.replace("http", "ws")}//${window.location.host}${n}` : n, ps = () => {
|
|
3438
3496
|
if (typeof document < "u" && document.head) {
|
|
3439
|
-
let n =
|
|
3497
|
+
let n = Ne(document, "url");
|
|
3440
3498
|
if (n)
|
|
3441
|
-
return
|
|
3499
|
+
return yt(n);
|
|
3442
3500
|
}
|
|
3443
|
-
return
|
|
3444
|
-
},
|
|
3501
|
+
return yt(fs);
|
|
3502
|
+
}, ms = () => {
|
|
3445
3503
|
if (typeof document < "u" && document.head) {
|
|
3446
|
-
let n =
|
|
3504
|
+
let n = Ne(document, "history-timestamp");
|
|
3447
3505
|
if (n)
|
|
3448
3506
|
return n | 0;
|
|
3449
3507
|
}
|
|
3450
|
-
},
|
|
3508
|
+
}, gs = () => {
|
|
3451
3509
|
if (typeof document < "u" && document.head)
|
|
3452
|
-
return
|
|
3453
|
-
},
|
|
3510
|
+
return Ne(document, "token");
|
|
3511
|
+
}, bs = () => {
|
|
3454
3512
|
if (typeof document < "u" && document.head)
|
|
3455
|
-
return
|
|
3513
|
+
return Ne(document, "token-param");
|
|
3456
3514
|
};
|
|
3457
|
-
function
|
|
3458
|
-
typeof n == "object" && typeof e > "u" && (e = n, n = void 0), n = n ||
|
|
3459
|
-
let t =
|
|
3515
|
+
function _s(n, e) {
|
|
3516
|
+
typeof n == "object" && typeof e > "u" && (e = n, n = void 0), n = n || ps(), e = e || {}, e.historyTimestamp ||= ms();
|
|
3517
|
+
let t = gs();
|
|
3460
3518
|
if (t) {
|
|
3461
|
-
let
|
|
3462
|
-
e.auth = Object.assign({ token: t, param:
|
|
3519
|
+
let d = bs();
|
|
3520
|
+
e.auth = Object.assign({ token: t, param: d }, e.auth || {});
|
|
3463
3521
|
}
|
|
3464
|
-
e = Object.assign({},
|
|
3522
|
+
e = Object.assign({}, tn, e);
|
|
3465
3523
|
let {
|
|
3466
3524
|
logLevel: r,
|
|
3467
3525
|
logger: s,
|
|
3468
3526
|
pingInterval: o,
|
|
3469
3527
|
reconnectStrategy: i,
|
|
3470
3528
|
maxMissingPings: c,
|
|
3471
|
-
maxReconnectAttempts:
|
|
3529
|
+
maxReconnectAttempts: u
|
|
3472
3530
|
} = e;
|
|
3473
|
-
return s = e.logger = e.logger || new
|
|
3531
|
+
return s = e.logger = e.logger || new us(r), i = e.reconnectStrategy = e.reconnectStrategy || Yt(o), e.monitor !== !1 && (e.monitor = e.monitor || new ds({
|
|
3474
3532
|
pingInterval: o,
|
|
3475
3533
|
reconnectStrategy: i,
|
|
3476
3534
|
maxMissingPings: c,
|
|
3477
|
-
maxReconnectAttempts:
|
|
3535
|
+
maxReconnectAttempts: u,
|
|
3478
3536
|
logger: s
|
|
3479
|
-
})),
|
|
3537
|
+
})), as(n, e);
|
|
3480
3538
|
}
|
|
3481
|
-
function
|
|
3482
|
-
let t =
|
|
3483
|
-
return new
|
|
3539
|
+
function ys(n, e) {
|
|
3540
|
+
let t = _s(n, e);
|
|
3541
|
+
return new cs(t);
|
|
3484
3542
|
}
|
|
3485
|
-
class
|
|
3543
|
+
class Ei {
|
|
3486
3544
|
constructor(e = "/openc3-api/cable", t = "/openc3-api/auth/otp") {
|
|
3487
3545
|
this._cable = null, this._url = e, this._otpUrl = t;
|
|
3488
3546
|
}
|
|
@@ -3490,14 +3548,14 @@ class bi {
|
|
|
3490
3548
|
this._cable && (this._cable.cable.disconnect(), this._cable = null);
|
|
3491
3549
|
}
|
|
3492
3550
|
createSubscription(e, t, r = {}, s = {}) {
|
|
3493
|
-
return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then((o) => (o && OpenC3Auth.setTokens(),
|
|
3551
|
+
return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then((o) => (o && OpenC3Auth.setTokens(), Br.get(this._otpUrl, {
|
|
3494
3552
|
params: {
|
|
3495
3553
|
scope: t
|
|
3496
3554
|
}
|
|
3497
3555
|
}))).then(({ data: o }) => {
|
|
3498
3556
|
if (this._cable == null) {
|
|
3499
3557
|
const i = new URL(this._url, document.baseURI);
|
|
3500
|
-
i.searchParams.set("scope", t), i.searchParams.set("authorization", o), this._cable =
|
|
3558
|
+
i.searchParams.set("scope", t), i.searchParams.set("authorization", o), this._cable = ys(i.href);
|
|
3501
3559
|
}
|
|
3502
3560
|
return this._cable.subscriptions.create(
|
|
3503
3561
|
{
|
|
@@ -3511,12 +3569,12 @@ class bi {
|
|
|
3511
3569
|
recordPing() {
|
|
3512
3570
|
}
|
|
3513
3571
|
}
|
|
3514
|
-
class
|
|
3572
|
+
class wt {
|
|
3515
3573
|
constructor(e, t, r = "", s = "") {
|
|
3516
3574
|
this.keyword = e.keyword, this.parameters = e.parameters, this.filename = e.filename, this.line = e.line, this.lineNumber = e.lineNumber, this.message = t, this.usage = r, this.url = s;
|
|
3517
3575
|
}
|
|
3518
3576
|
}
|
|
3519
|
-
class
|
|
3577
|
+
class Si {
|
|
3520
3578
|
keyword = null;
|
|
3521
3579
|
parameters = [];
|
|
3522
3580
|
filename = "";
|
|
@@ -3528,14 +3586,14 @@ class _i {
|
|
|
3528
3586
|
verify_num_parameters(e, t, r = "") {
|
|
3529
3587
|
for (let s = 1; s <= e; s++)
|
|
3530
3588
|
if (this.parameters[s - 1] === void 0)
|
|
3531
|
-
throw new
|
|
3589
|
+
throw new wt(
|
|
3532
3590
|
this,
|
|
3533
3591
|
`Not enough parameters for ${this.keyword}.`,
|
|
3534
3592
|
r,
|
|
3535
3593
|
this.url
|
|
3536
3594
|
);
|
|
3537
3595
|
if (t && this.parameters[t] !== void 0)
|
|
3538
|
-
throw new
|
|
3596
|
+
throw new wt(
|
|
3539
3597
|
this,
|
|
3540
3598
|
`Too many parameters for ${this.keyword}.`,
|
|
3541
3599
|
r,
|
|
@@ -3561,46 +3619,46 @@ class _i {
|
|
|
3561
3619
|
parse_string(e, t, r, s, o) {
|
|
3562
3620
|
let i = !1, c = !1;
|
|
3563
3621
|
this.line = "", this.keyword = null, this.parameters = [], this.filename = t;
|
|
3564
|
-
let
|
|
3565
|
-
`),
|
|
3566
|
-
for (let a = 0; a <
|
|
3622
|
+
let u = e.split(`
|
|
3623
|
+
`), d = u.length;
|
|
3624
|
+
for (let a = 0; a < d; a++) {
|
|
3567
3625
|
this.lineNumber = a + 1;
|
|
3568
|
-
let
|
|
3626
|
+
let h = u[a];
|
|
3569
3627
|
if (i)
|
|
3570
|
-
this.line =
|
|
3628
|
+
this.line = h;
|
|
3571
3629
|
else {
|
|
3572
|
-
if (
|
|
3630
|
+
if (h = h.trim(), h.length === 0) {
|
|
3573
3631
|
if (r) {
|
|
3574
|
-
let
|
|
3575
|
-
|
|
3632
|
+
let E = o(null, [], this.line, this.lineNumber);
|
|
3633
|
+
E === !0 && (i = !0), E === !1 && (i = !1);
|
|
3576
3634
|
}
|
|
3577
3635
|
continue;
|
|
3578
3636
|
}
|
|
3579
3637
|
if (c === !0) {
|
|
3580
|
-
if (
|
|
3638
|
+
if (h[0] === "#")
|
|
3581
3639
|
continue;
|
|
3582
|
-
|
|
3640
|
+
h = h.substring(1, h.length);
|
|
3583
3641
|
}
|
|
3584
|
-
let w =
|
|
3642
|
+
let w = h.charAt(h.length - 1), x = !1;
|
|
3585
3643
|
switch (w) {
|
|
3586
3644
|
case "+":
|
|
3587
|
-
|
|
3645
|
+
x = !0;
|
|
3588
3646
|
// Deliberate fall through
|
|
3589
3647
|
case "\\":
|
|
3590
|
-
let
|
|
3591
|
-
this.line +=
|
|
3648
|
+
let E = h.substring(0, h.length - 1).trim();
|
|
3649
|
+
this.line += E.substring(0, E.length - 1), x && (this.line += `
|
|
3592
3650
|
`), c = !0;
|
|
3593
3651
|
continue;
|
|
3594
3652
|
case "&":
|
|
3595
|
-
this.line +=
|
|
3653
|
+
this.line += h.substring(0, h.length - 1);
|
|
3596
3654
|
continue;
|
|
3597
3655
|
default:
|
|
3598
|
-
this.line +=
|
|
3656
|
+
this.line += h;
|
|
3599
3657
|
}
|
|
3600
3658
|
}
|
|
3601
3659
|
c = !1;
|
|
3602
|
-
let
|
|
3603
|
-
if (
|
|
3660
|
+
let b = /("([^\\"]|\\.)*")|('([^\\']|\\.)*')|\S+/g, g = this.scan_string(this.line, b), m = "";
|
|
3661
|
+
if (g.length > 0 && (m = m + g[0]), m.length === 0 || m.charAt(0) === "#" ? this.keyword = null : this.keyword = m.toUpperCase(), this.parameters = [], this.keyword === null) {
|
|
3604
3662
|
if (r) {
|
|
3605
3663
|
let w = o(
|
|
3606
3664
|
this.keyword,
|
|
@@ -3613,63 +3671,63 @@ class _i {
|
|
|
3613
3671
|
this.line = "";
|
|
3614
3672
|
continue;
|
|
3615
3673
|
}
|
|
3616
|
-
let
|
|
3617
|
-
if (
|
|
3618
|
-
for (let w = 1; w <
|
|
3619
|
-
let
|
|
3620
|
-
if (
|
|
3674
|
+
let p = g.length;
|
|
3675
|
+
if (p > 1)
|
|
3676
|
+
for (let w = 1; w < p; w++) {
|
|
3677
|
+
let x = g[w];
|
|
3678
|
+
if (x.length > 0 && x.charAt(0) === "#")
|
|
3621
3679
|
break;
|
|
3622
|
-
s ? this.parameters.push(this.remove_quotes(
|
|
3680
|
+
s ? this.parameters.push(this.remove_quotes(x)) : this.parameters.push(x);
|
|
3623
3681
|
}
|
|
3624
|
-
let
|
|
3682
|
+
let f = o(
|
|
3625
3683
|
this.keyword,
|
|
3626
3684
|
this.parameters,
|
|
3627
3685
|
this.line,
|
|
3628
3686
|
this.lineNumber
|
|
3629
3687
|
);
|
|
3630
|
-
|
|
3688
|
+
f === !0 && (i = !0), f === !1 && (i = !1), this.line = "";
|
|
3631
3689
|
}
|
|
3632
3690
|
}
|
|
3633
3691
|
// parse_string
|
|
3634
3692
|
}
|
|
3635
|
-
function
|
|
3636
|
-
return
|
|
3693
|
+
function se(n) {
|
|
3694
|
+
return ws.test(n);
|
|
3637
3695
|
}
|
|
3638
|
-
const
|
|
3639
|
-
function
|
|
3640
|
-
return
|
|
3696
|
+
const ws = /^-?[0-9]+$/;
|
|
3697
|
+
function nn(n) {
|
|
3698
|
+
return Es.test(n);
|
|
3641
3699
|
}
|
|
3642
|
-
const
|
|
3643
|
-
function
|
|
3644
|
-
if (
|
|
3700
|
+
const Es = /^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
|
|
3701
|
+
function rn(n, e) {
|
|
3702
|
+
if (se(n))
|
|
3645
3703
|
return Number.isSafeInteger(Number.parseInt(n, 10));
|
|
3646
3704
|
const t = Number.parseFloat(n), r = String(t);
|
|
3647
3705
|
if (n === r)
|
|
3648
3706
|
return !0;
|
|
3649
|
-
const s =
|
|
3650
|
-
return !!(s === o || e?.approx === !0 && !
|
|
3707
|
+
const s = Et(n), o = Et(r);
|
|
3708
|
+
return !!(s === o || e?.approx === !0 && !se(n) && o.length >= 14 && s.startsWith(o.substring(0, 14)));
|
|
3651
3709
|
}
|
|
3652
|
-
let
|
|
3710
|
+
let re = /* @__PURE__ */ (function(n) {
|
|
3653
3711
|
return n.underflow = "underflow", n.overflow = "overflow", n.truncate_integer = "truncate_integer", n.truncate_float = "truncate_float", n;
|
|
3654
3712
|
})({});
|
|
3655
|
-
function
|
|
3656
|
-
if (
|
|
3713
|
+
function Ss(n) {
|
|
3714
|
+
if (rn(n, {
|
|
3657
3715
|
approx: !1
|
|
3658
3716
|
}))
|
|
3659
3717
|
return;
|
|
3660
|
-
if (
|
|
3661
|
-
return
|
|
3718
|
+
if (se(n))
|
|
3719
|
+
return re.truncate_integer;
|
|
3662
3720
|
const e = Number.parseFloat(n);
|
|
3663
|
-
return Number.isFinite(e) ? e === 0 ?
|
|
3721
|
+
return Number.isFinite(e) ? e === 0 ? re.underflow : re.truncate_float : re.overflow;
|
|
3664
3722
|
}
|
|
3665
|
-
function
|
|
3723
|
+
function Et(n) {
|
|
3666
3724
|
const {
|
|
3667
3725
|
start: e,
|
|
3668
3726
|
end: t
|
|
3669
|
-
} =
|
|
3727
|
+
} = Rs(n), r = n.substring(e, t), s = r.indexOf(".");
|
|
3670
3728
|
return s === -1 ? r : r.substring(0, s) + r.substring(s + 1);
|
|
3671
3729
|
}
|
|
3672
|
-
function
|
|
3730
|
+
function Rs(n) {
|
|
3673
3731
|
let e = 0;
|
|
3674
3732
|
for (n[0] === "-" && e++; n[e] === "0" || n[e] === "."; )
|
|
3675
3733
|
e++;
|
|
@@ -3681,12 +3739,12 @@ function ys(n) {
|
|
|
3681
3739
|
end: t
|
|
3682
3740
|
};
|
|
3683
3741
|
}
|
|
3684
|
-
class
|
|
3742
|
+
class xs {
|
|
3685
3743
|
// numeric value as string
|
|
3686
3744
|
// type information
|
|
3687
3745
|
isLosslessNumber = !0;
|
|
3688
3746
|
constructor(e) {
|
|
3689
|
-
if (!
|
|
3747
|
+
if (!nn(e))
|
|
3690
3748
|
throw new Error(`Invalid number (value: "${e}")`);
|
|
3691
3749
|
this.value = e;
|
|
3692
3750
|
}
|
|
@@ -3702,10 +3760,10 @@ class ws {
|
|
|
3702
3760
|
* and toSafeNumberOrThrow to convert it to a numeric value.
|
|
3703
3761
|
*/
|
|
3704
3762
|
valueOf() {
|
|
3705
|
-
const e =
|
|
3706
|
-
if (e === void 0 || e ===
|
|
3763
|
+
const e = Ss(this.value);
|
|
3764
|
+
if (e === void 0 || e === re.truncate_float)
|
|
3707
3765
|
return Number.parseFloat(this.value);
|
|
3708
|
-
if (
|
|
3766
|
+
if (se(this.value))
|
|
3709
3767
|
return BigInt(this.value);
|
|
3710
3768
|
throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`);
|
|
3711
3769
|
}
|
|
@@ -3719,222 +3777,222 @@ class ws {
|
|
|
3719
3777
|
// or use that, it cannot safely turn the numeric value in the string into
|
|
3720
3778
|
// stringified JSON since it has to be parsed into a number first.
|
|
3721
3779
|
}
|
|
3722
|
-
function
|
|
3780
|
+
function Os(n) {
|
|
3723
3781
|
return n && typeof n == "object" && n.isLosslessNumber || !1;
|
|
3724
3782
|
}
|
|
3725
|
-
function
|
|
3726
|
-
return new
|
|
3783
|
+
function As(n) {
|
|
3784
|
+
return new xs(n);
|
|
3727
3785
|
}
|
|
3728
|
-
function
|
|
3729
|
-
return
|
|
3786
|
+
function Cs(n, e) {
|
|
3787
|
+
return Ke({
|
|
3730
3788
|
"": n
|
|
3731
3789
|
}, "", n, e);
|
|
3732
3790
|
}
|
|
3733
|
-
function
|
|
3734
|
-
return Array.isArray(t) ? r.call(n, e,
|
|
3791
|
+
function Ke(n, e, t, r) {
|
|
3792
|
+
return Array.isArray(t) ? r.call(n, e, Ns(t, r)) : t && typeof t == "object" && !Os(t) ? r.call(n, e, Ts(t, r)) : r.call(n, e, t);
|
|
3735
3793
|
}
|
|
3736
|
-
function
|
|
3794
|
+
function Ts(n, e) {
|
|
3737
3795
|
for (const t of Object.keys(n)) {
|
|
3738
|
-
const r =
|
|
3796
|
+
const r = Ke(n, t, n[t], e);
|
|
3739
3797
|
r !== void 0 ? n[t] = r : delete n[t];
|
|
3740
3798
|
}
|
|
3741
3799
|
return n;
|
|
3742
3800
|
}
|
|
3743
|
-
function
|
|
3801
|
+
function Ns(n, e) {
|
|
3744
3802
|
for (let t = 0; t < n.length; t++)
|
|
3745
|
-
n[t] =
|
|
3803
|
+
n[t] = Ke(n, String(t), n[t], e);
|
|
3746
3804
|
return n;
|
|
3747
3805
|
}
|
|
3748
|
-
function
|
|
3806
|
+
function Ps(n, e, t) {
|
|
3749
3807
|
const r = typeof t == "function" ? {
|
|
3750
3808
|
parseNumber: t
|
|
3751
|
-
} : t, s = r?.parseNumber ??
|
|
3809
|
+
} : t, s = r?.parseNumber ?? As, o = r?.onDuplicateKey ?? N;
|
|
3752
3810
|
let i = 0;
|
|
3753
3811
|
const c = a();
|
|
3754
|
-
return w(c),
|
|
3755
|
-
function
|
|
3756
|
-
if (n.charCodeAt(i) ===
|
|
3757
|
-
i++,
|
|
3812
|
+
return w(c), E(), e ? Cs(c, e) : c;
|
|
3813
|
+
function u() {
|
|
3814
|
+
if (n.charCodeAt(i) === js) {
|
|
3815
|
+
i++, b();
|
|
3758
3816
|
const y = {};
|
|
3759
3817
|
let R = !0;
|
|
3760
|
-
for (; i < n.length && n.charCodeAt(i) !==
|
|
3761
|
-
R ? R = !1 : (
|
|
3762
|
-
const
|
|
3763
|
-
if (
|
|
3818
|
+
for (; i < n.length && n.charCodeAt(i) !== Rt; ) {
|
|
3819
|
+
R ? R = !1 : (p(), b());
|
|
3820
|
+
const v = i, z = g();
|
|
3821
|
+
if (z === void 0) {
|
|
3764
3822
|
j();
|
|
3765
3823
|
return;
|
|
3766
3824
|
}
|
|
3767
|
-
|
|
3768
|
-
const
|
|
3769
|
-
if (
|
|
3770
|
-
|
|
3825
|
+
b(), f();
|
|
3826
|
+
const T = a();
|
|
3827
|
+
if (T === void 0) {
|
|
3828
|
+
D();
|
|
3771
3829
|
return;
|
|
3772
3830
|
}
|
|
3773
|
-
if (Object.prototype.hasOwnProperty.call(y,
|
|
3774
|
-
const
|
|
3775
|
-
key:
|
|
3776
|
-
position:
|
|
3777
|
-
oldValue: y[
|
|
3778
|
-
newValue:
|
|
3831
|
+
if (Object.prototype.hasOwnProperty.call(y, z) && !Be(T, y[z])) {
|
|
3832
|
+
const V = o({
|
|
3833
|
+
key: z,
|
|
3834
|
+
position: v + 1,
|
|
3835
|
+
oldValue: y[z],
|
|
3836
|
+
newValue: T
|
|
3779
3837
|
});
|
|
3780
|
-
|
|
3838
|
+
V !== void 0 && (y[z] = V);
|
|
3781
3839
|
} else
|
|
3782
|
-
y[
|
|
3840
|
+
y[z] = T;
|
|
3783
3841
|
}
|
|
3784
|
-
return n.charCodeAt(i) !==
|
|
3842
|
+
return n.charCodeAt(i) !== Rt && H(), i++, y;
|
|
3785
3843
|
}
|
|
3786
3844
|
}
|
|
3787
|
-
function
|
|
3788
|
-
if (n.charCodeAt(i) ===
|
|
3789
|
-
i++,
|
|
3845
|
+
function d() {
|
|
3846
|
+
if (n.charCodeAt(i) === $s) {
|
|
3847
|
+
i++, b();
|
|
3790
3848
|
const y = [];
|
|
3791
3849
|
let R = !0;
|
|
3792
|
-
for (; i < n.length && n.charCodeAt(i) !==
|
|
3793
|
-
R ? R = !1 :
|
|
3794
|
-
const
|
|
3795
|
-
|
|
3850
|
+
for (; i < n.length && n.charCodeAt(i) !== xt; ) {
|
|
3851
|
+
R ? R = !1 : p();
|
|
3852
|
+
const v = a();
|
|
3853
|
+
x(v), y.push(v);
|
|
3796
3854
|
}
|
|
3797
|
-
return n.charCodeAt(i) !==
|
|
3855
|
+
return n.charCodeAt(i) !== xt && $(), i++, y;
|
|
3798
3856
|
}
|
|
3799
3857
|
}
|
|
3800
3858
|
function a() {
|
|
3801
|
-
|
|
3802
|
-
const y =
|
|
3803
|
-
return
|
|
3859
|
+
b();
|
|
3860
|
+
const y = g() ?? m() ?? u() ?? d() ?? h("true", !0) ?? h("false", !1) ?? h("null", null);
|
|
3861
|
+
return b(), y;
|
|
3804
3862
|
}
|
|
3805
|
-
function
|
|
3863
|
+
function h(y, R) {
|
|
3806
3864
|
if (n.slice(i, i + y.length) === y)
|
|
3807
3865
|
return i += y.length, R;
|
|
3808
3866
|
}
|
|
3809
|
-
function
|
|
3810
|
-
for (;
|
|
3867
|
+
function b() {
|
|
3868
|
+
for (; ks(n.charCodeAt(i)); )
|
|
3811
3869
|
i++;
|
|
3812
3870
|
}
|
|
3813
|
-
function
|
|
3814
|
-
if (n.charCodeAt(i) ===
|
|
3871
|
+
function g() {
|
|
3872
|
+
if (n.charCodeAt(i) === Fe) {
|
|
3815
3873
|
i++;
|
|
3816
3874
|
let y = "";
|
|
3817
|
-
for (; i < n.length && n.charCodeAt(i) !==
|
|
3818
|
-
if (n.charCodeAt(i) ===
|
|
3819
|
-
const R = n[i + 1],
|
|
3820
|
-
|
|
3875
|
+
for (; i < n.length && n.charCodeAt(i) !== Fe; ) {
|
|
3876
|
+
if (n.charCodeAt(i) === Fs) {
|
|
3877
|
+
const R = n[i + 1], v = vs[R];
|
|
3878
|
+
v !== void 0 ? (y += v, i++) : R === "u" ? ge(n.charCodeAt(i + 2)) && ge(n.charCodeAt(i + 3)) && ge(n.charCodeAt(i + 4)) && ge(n.charCodeAt(i + 5)) ? (y += String.fromCharCode(Number.parseInt(n.slice(i + 2, i + 6), 16)), i += 5) : U(i) : M(i);
|
|
3821
3879
|
} else
|
|
3822
|
-
|
|
3880
|
+
Ls(n.charCodeAt(i)) ? y += n[i] : Q(n[i]);
|
|
3823
3881
|
i++;
|
|
3824
3882
|
}
|
|
3825
|
-
return
|
|
3883
|
+
return A(), i++, y;
|
|
3826
3884
|
}
|
|
3827
3885
|
}
|
|
3828
|
-
function
|
|
3886
|
+
function m() {
|
|
3829
3887
|
const y = i;
|
|
3830
|
-
if (n.charCodeAt(i) ===
|
|
3888
|
+
if (n.charCodeAt(i) === Ot && (i++, S(y)), n.charCodeAt(i) === Xe)
|
|
3831
3889
|
i++;
|
|
3832
|
-
else if (
|
|
3833
|
-
for (i++;
|
|
3890
|
+
else if (Is(n.charCodeAt(i)))
|
|
3891
|
+
for (i++; be(n.charCodeAt(i)); )
|
|
3834
3892
|
i++;
|
|
3835
|
-
if (n.charCodeAt(i) ===
|
|
3836
|
-
for (i++,
|
|
3893
|
+
if (n.charCodeAt(i) === Vs)
|
|
3894
|
+
for (i++, S(y); be(n.charCodeAt(i)); )
|
|
3837
3895
|
i++;
|
|
3838
|
-
if (n.charCodeAt(i) ===
|
|
3839
|
-
for (i++, (n.charCodeAt(i) ===
|
|
3896
|
+
if (n.charCodeAt(i) === Gs || n.charCodeAt(i) === Xs)
|
|
3897
|
+
for (i++, (n.charCodeAt(i) === Ot || n.charCodeAt(i) === Ms) && i++, S(y); be(n.charCodeAt(i)); )
|
|
3840
3898
|
i++;
|
|
3841
3899
|
if (i > y)
|
|
3842
3900
|
return s(n.slice(y, i));
|
|
3843
3901
|
}
|
|
3844
|
-
function
|
|
3845
|
-
if (n.charCodeAt(i) !==
|
|
3846
|
-
throw new SyntaxError(`Comma ',' expected after value ${
|
|
3902
|
+
function p() {
|
|
3903
|
+
if (n.charCodeAt(i) !== zs)
|
|
3904
|
+
throw new SyntaxError(`Comma ',' expected after value ${O()}`);
|
|
3847
3905
|
i++;
|
|
3848
3906
|
}
|
|
3849
|
-
function
|
|
3850
|
-
if (n.charCodeAt(i) !==
|
|
3851
|
-
throw new SyntaxError(`Colon ':' expected after property name ${
|
|
3907
|
+
function f() {
|
|
3908
|
+
if (n.charCodeAt(i) !== Js)
|
|
3909
|
+
throw new SyntaxError(`Colon ':' expected after property name ${O()}`);
|
|
3852
3910
|
i++;
|
|
3853
3911
|
}
|
|
3854
3912
|
function w(y) {
|
|
3855
3913
|
if (y === void 0)
|
|
3856
|
-
throw new SyntaxError(`JSON value expected ${
|
|
3914
|
+
throw new SyntaxError(`JSON value expected ${O()}`);
|
|
3857
3915
|
}
|
|
3858
|
-
function
|
|
3916
|
+
function x(y) {
|
|
3859
3917
|
if (y === void 0)
|
|
3860
|
-
throw new SyntaxError(`Array item expected ${
|
|
3918
|
+
throw new SyntaxError(`Array item expected ${O()}`);
|
|
3861
3919
|
}
|
|
3862
|
-
function
|
|
3920
|
+
function E() {
|
|
3863
3921
|
if (i < n.length)
|
|
3864
|
-
throw new SyntaxError(`Expected end of input ${
|
|
3922
|
+
throw new SyntaxError(`Expected end of input ${O()}`);
|
|
3865
3923
|
}
|
|
3866
|
-
function
|
|
3867
|
-
if (!
|
|
3924
|
+
function S(y) {
|
|
3925
|
+
if (!be(n.charCodeAt(i))) {
|
|
3868
3926
|
const R = n.slice(y, i);
|
|
3869
|
-
throw new SyntaxError(`Invalid number '${R}', expecting a digit ${
|
|
3927
|
+
throw new SyntaxError(`Invalid number '${R}', expecting a digit ${O()}`);
|
|
3870
3928
|
}
|
|
3871
3929
|
}
|
|
3872
|
-
function
|
|
3873
|
-
if (n.charCodeAt(i) !==
|
|
3874
|
-
throw new SyntaxError(`End of string '"' expected ${
|
|
3930
|
+
function A() {
|
|
3931
|
+
if (n.charCodeAt(i) !== Fe)
|
|
3932
|
+
throw new SyntaxError(`End of string '"' expected ${O()}`);
|
|
3875
3933
|
}
|
|
3876
3934
|
function j() {
|
|
3877
|
-
throw new SyntaxError(`Quoted object key expected ${
|
|
3935
|
+
throw new SyntaxError(`Quoted object key expected ${O()}`);
|
|
3878
3936
|
}
|
|
3879
|
-
function
|
|
3937
|
+
function N(y) {
|
|
3880
3938
|
let {
|
|
3881
3939
|
key: R,
|
|
3882
|
-
position:
|
|
3940
|
+
position: v
|
|
3883
3941
|
} = y;
|
|
3884
|
-
throw new SyntaxError(`Duplicate key '${R}' encountered at position ${
|
|
3942
|
+
throw new SyntaxError(`Duplicate key '${R}' encountered at position ${v}`);
|
|
3885
3943
|
}
|
|
3886
|
-
function
|
|
3887
|
-
throw new SyntaxError(`Quoted object key or end of object '}' expected ${
|
|
3944
|
+
function H() {
|
|
3945
|
+
throw new SyntaxError(`Quoted object key or end of object '}' expected ${O()}`);
|
|
3888
3946
|
}
|
|
3889
|
-
function
|
|
3890
|
-
throw new SyntaxError(`Array item or end of array ']' expected ${
|
|
3947
|
+
function $() {
|
|
3948
|
+
throw new SyntaxError(`Array item or end of array ']' expected ${O()}`);
|
|
3891
3949
|
}
|
|
3892
3950
|
function Q(y) {
|
|
3893
|
-
throw new SyntaxError(`Invalid character '${y}' ${
|
|
3951
|
+
throw new SyntaxError(`Invalid character '${y}' ${L()}`);
|
|
3894
3952
|
}
|
|
3895
3953
|
function M(y) {
|
|
3896
3954
|
const R = n.slice(y, y + 2);
|
|
3897
|
-
throw new SyntaxError(`Invalid escape character '${R}' ${
|
|
3955
|
+
throw new SyntaxError(`Invalid escape character '${R}' ${L()}`);
|
|
3898
3956
|
}
|
|
3899
|
-
function
|
|
3900
|
-
throw new SyntaxError(`Object value expected after ':' ${
|
|
3957
|
+
function D() {
|
|
3958
|
+
throw new SyntaxError(`Object value expected after ':' ${L()}`);
|
|
3901
3959
|
}
|
|
3902
|
-
function
|
|
3960
|
+
function U(y) {
|
|
3903
3961
|
const R = n.slice(y, y + 6);
|
|
3904
|
-
throw new SyntaxError(`Invalid unicode character '${R}' ${
|
|
3962
|
+
throw new SyntaxError(`Invalid unicode character '${R}' ${L()}`);
|
|
3905
3963
|
}
|
|
3906
|
-
function
|
|
3964
|
+
function L() {
|
|
3907
3965
|
return `at position ${i}`;
|
|
3908
3966
|
}
|
|
3909
3967
|
function he() {
|
|
3910
3968
|
return i < n.length ? `but got '${n[i]}'` : "but reached end of input";
|
|
3911
3969
|
}
|
|
3912
|
-
function
|
|
3913
|
-
return `${he()} ${
|
|
3970
|
+
function O() {
|
|
3971
|
+
return `${he()} ${L()}`;
|
|
3914
3972
|
}
|
|
3915
3973
|
}
|
|
3916
|
-
function
|
|
3917
|
-
return n ===
|
|
3974
|
+
function ks(n) {
|
|
3975
|
+
return n === Ds || n === Us || n === qs || n === Bs;
|
|
3918
3976
|
}
|
|
3919
3977
|
function ge(n) {
|
|
3920
|
-
return n >=
|
|
3978
|
+
return n >= Xe && n <= Ge || n >= Ws && n <= Qs || n >= Ks && n <= Zs;
|
|
3921
3979
|
}
|
|
3922
|
-
function
|
|
3923
|
-
return n >=
|
|
3980
|
+
function be(n) {
|
|
3981
|
+
return n >= Xe && n <= Ge;
|
|
3924
3982
|
}
|
|
3925
|
-
function
|
|
3926
|
-
return n >=
|
|
3983
|
+
function Is(n) {
|
|
3984
|
+
return n >= Hs && n <= Ge;
|
|
3927
3985
|
}
|
|
3928
|
-
function
|
|
3986
|
+
function Ls(n) {
|
|
3929
3987
|
return n >= 32 && n <= 1114111;
|
|
3930
3988
|
}
|
|
3931
|
-
function
|
|
3932
|
-
return n === e ? !0 : Array.isArray(n) && Array.isArray(e) ? n.length === e.length && n.every((t, r) =>
|
|
3989
|
+
function Be(n, e) {
|
|
3990
|
+
return n === e ? !0 : Array.isArray(n) && Array.isArray(e) ? n.length === e.length && n.every((t, r) => Be(t, e[r])) : St(n) && St(e) ? [.../* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(e)])].every((r) => Be(n[r], e[r])) : !1;
|
|
3933
3991
|
}
|
|
3934
|
-
function
|
|
3992
|
+
function St(n) {
|
|
3935
3993
|
return typeof n == "object" && n !== null;
|
|
3936
3994
|
}
|
|
3937
|
-
const
|
|
3995
|
+
const vs = {
|
|
3938
3996
|
'"': '"',
|
|
3939
3997
|
"\\": "\\",
|
|
3940
3998
|
"/": "/",
|
|
@@ -3945,18 +4003,18 @@ const Ps = {
|
|
|
3945
4003
|
r: "\r",
|
|
3946
4004
|
t: " "
|
|
3947
4005
|
// note that \u is handled separately in parseString()
|
|
3948
|
-
},
|
|
3949
|
-
function
|
|
4006
|
+
}, Fs = 92, js = 123, Rt = 125, $s = 91, xt = 93, Ds = 32, Us = 10, qs = 9, Bs = 13, Fe = 34, Ms = 43, Ot = 45, Xe = 48, Hs = 49, Ge = 57, zs = 44, Vs = 46, Js = 58, Ws = 65, Ks = 97, Xs = 69, Gs = 101, Qs = 70, Zs = 102;
|
|
4007
|
+
function sn(n, e, t, r) {
|
|
3950
4008
|
const s = void 0;
|
|
3951
4009
|
return i(n, "");
|
|
3952
|
-
function i(a,
|
|
4010
|
+
function i(a, h) {
|
|
3953
4011
|
if (Array.isArray(r)) {
|
|
3954
|
-
const
|
|
3955
|
-
if (
|
|
3956
|
-
const
|
|
3957
|
-
if (typeof
|
|
3958
|
-
throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${
|
|
3959
|
-
return
|
|
4012
|
+
const b = r.find((g) => g.test(a));
|
|
4013
|
+
if (b) {
|
|
4014
|
+
const g = b.stringify(a);
|
|
4015
|
+
if (typeof g != "string" || !nn(g))
|
|
4016
|
+
throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${g})`);
|
|
4017
|
+
return g;
|
|
3960
4018
|
}
|
|
3961
4019
|
}
|
|
3962
4020
|
if (typeof a == "boolean" || typeof a == "number" || typeof a == "string" || a === null || a instanceof Date || a instanceof Boolean || a instanceof Number || a instanceof String)
|
|
@@ -3964,53 +4022,53 @@ function rn(n, e, t, r) {
|
|
|
3964
4022
|
if (a?.isLosslessNumber || typeof a == "bigint")
|
|
3965
4023
|
return a.toString();
|
|
3966
4024
|
if (Array.isArray(a))
|
|
3967
|
-
return c(a,
|
|
4025
|
+
return c(a, h);
|
|
3968
4026
|
if (a && typeof a == "object")
|
|
3969
|
-
return
|
|
4027
|
+
return u(a, h);
|
|
3970
4028
|
}
|
|
3971
|
-
function c(a,
|
|
4029
|
+
function c(a, h) {
|
|
3972
4030
|
if (a.length === 0)
|
|
3973
4031
|
return "[]";
|
|
3974
|
-
const
|
|
3975
|
-
let
|
|
4032
|
+
const b = s ? h + s : void 0;
|
|
4033
|
+
let g = s ? `[
|
|
3976
4034
|
` : "[";
|
|
3977
|
-
for (let
|
|
3978
|
-
const
|
|
3979
|
-
s && (
|
|
4035
|
+
for (let m = 0; m < a.length; m++) {
|
|
4036
|
+
const p = a[m];
|
|
4037
|
+
s && (g += b), typeof p < "u" && typeof p != "function" ? g += i(p, b) : g += "null", m < a.length - 1 && (g += s ? `,
|
|
3980
4038
|
` : ",");
|
|
3981
4039
|
}
|
|
3982
|
-
return
|
|
3983
|
-
${
|
|
4040
|
+
return g += s ? `
|
|
4041
|
+
${h}]` : "]", g;
|
|
3984
4042
|
}
|
|
3985
|
-
function
|
|
4043
|
+
function u(a, h) {
|
|
3986
4044
|
if (typeof a.toJSON == "function")
|
|
3987
|
-
return
|
|
3988
|
-
const
|
|
3989
|
-
if (
|
|
4045
|
+
return sn(a.toJSON(), e, t, void 0);
|
|
4046
|
+
const b = Array.isArray(e) ? e.map(String) : Object.keys(a);
|
|
4047
|
+
if (b.length === 0)
|
|
3990
4048
|
return "{}";
|
|
3991
|
-
const
|
|
3992
|
-
let
|
|
4049
|
+
const g = s ? h + s : void 0;
|
|
4050
|
+
let m = !0, p = s ? `{
|
|
3993
4051
|
` : "{";
|
|
3994
|
-
for (const
|
|
3995
|
-
const w = a[
|
|
3996
|
-
if (
|
|
3997
|
-
|
|
4052
|
+
for (const f of b) {
|
|
4053
|
+
const w = a[f];
|
|
4054
|
+
if (d(f, w)) {
|
|
4055
|
+
m ? m = !1 : p += s ? `,
|
|
3998
4056
|
` : ",";
|
|
3999
|
-
const
|
|
4000
|
-
|
|
4057
|
+
const x = JSON.stringify(f);
|
|
4058
|
+
p += s ? `${g + x}: ` : `${x}:`, p += i(w, g);
|
|
4001
4059
|
}
|
|
4002
4060
|
}
|
|
4003
|
-
return
|
|
4004
|
-
${
|
|
4061
|
+
return p += s ? `
|
|
4062
|
+
${h}}` : "}", p;
|
|
4005
4063
|
}
|
|
4006
|
-
function
|
|
4007
|
-
return typeof
|
|
4064
|
+
function d(a, h) {
|
|
4065
|
+
return typeof h < "u" && typeof h != "function" && typeof h != "symbol";
|
|
4008
4066
|
}
|
|
4009
4067
|
}
|
|
4010
|
-
function
|
|
4011
|
-
return
|
|
4068
|
+
function Ys(n) {
|
|
4069
|
+
return se(n) && !rn(n) ? BigInt(n) : parseFloat(n);
|
|
4012
4070
|
}
|
|
4013
|
-
class
|
|
4071
|
+
class Ri {
|
|
4014
4072
|
id = 1;
|
|
4015
4073
|
constructor() {
|
|
4016
4074
|
}
|
|
@@ -4024,7 +4082,7 @@ class yi {
|
|
|
4024
4082
|
}
|
|
4025
4083
|
this.id = this.id + 1;
|
|
4026
4084
|
try {
|
|
4027
|
-
return r.scope = window.openc3Scope, s.manual = !0, (await
|
|
4085
|
+
return r.scope = window.openc3Scope, s.manual = !0, (await Je.post(
|
|
4028
4086
|
"/openc3-api/api",
|
|
4029
4087
|
{
|
|
4030
4088
|
jsonrpc: "2.0",
|
|
@@ -4041,15 +4099,15 @@ class yi {
|
|
|
4041
4099
|
},
|
|
4042
4100
|
timeout: o,
|
|
4043
4101
|
transformRequest: [
|
|
4044
|
-
(c,
|
|
4102
|
+
(c, u) => sn(c)
|
|
4045
4103
|
],
|
|
4046
4104
|
transformResponse: [
|
|
4047
4105
|
(c) => {
|
|
4048
4106
|
try {
|
|
4049
|
-
return
|
|
4107
|
+
return Ps(c, void 0, Ys);
|
|
4050
4108
|
} catch {
|
|
4051
|
-
const
|
|
4052
|
-
`Server returned non-JSON response: ${
|
|
4109
|
+
const d = typeof c == "string" ? c.substring(0, 200) : String(c), a = new Error(
|
|
4110
|
+
`Server returned non-JSON response: ${d}`
|
|
4053
4111
|
);
|
|
4054
4112
|
throw a.name = "ServerError", a;
|
|
4055
4113
|
}
|
|
@@ -4253,8 +4311,8 @@ class yi {
|
|
|
4253
4311
|
});
|
|
4254
4312
|
if (o != null) {
|
|
4255
4313
|
let i = o.length, c = null;
|
|
4256
|
-
for (let
|
|
4257
|
-
c = this.decode_openc3_type(o[
|
|
4314
|
+
for (let u = 0; u < i; u++)
|
|
4315
|
+
c = this.decode_openc3_type(o[u][1]), c !== null && (o[u][1] = c);
|
|
4258
4316
|
}
|
|
4259
4317
|
return o;
|
|
4260
4318
|
}
|
|
@@ -4281,9 +4339,9 @@ class yi {
|
|
|
4281
4339
|
// 10s timeout ... should never be this long
|
|
4282
4340
|
);
|
|
4283
4341
|
if (c && c.length > 0) {
|
|
4284
|
-
let
|
|
4285
|
-
for (let a = 0; a <
|
|
4286
|
-
|
|
4342
|
+
let u = c.length, d = null;
|
|
4343
|
+
for (let a = 0; a < u; a++)
|
|
4344
|
+
d = this.decode_openc3_type(c[a][0]), d !== null && (c[a][0] = d);
|
|
4287
4345
|
}
|
|
4288
4346
|
return c;
|
|
4289
4347
|
}
|
|
@@ -4308,9 +4366,10 @@ class yi {
|
|
|
4308
4366
|
let i = this.decode_openc3_type(o);
|
|
4309
4367
|
return i !== null && (o = i), o;
|
|
4310
4368
|
}
|
|
4311
|
-
async inject_tlm(e, t, r = null, s = "CONVERTED") {
|
|
4369
|
+
async inject_tlm(e, t, r = null, s = "CONVERTED", o = !1) {
|
|
4312
4370
|
await this.exec("inject_tlm", [e, t, r], {
|
|
4313
|
-
type: s
|
|
4371
|
+
type: s,
|
|
4372
|
+
stored: o
|
|
4314
4373
|
});
|
|
4315
4374
|
}
|
|
4316
4375
|
set_tlm(e, t, r, s) {
|
|
@@ -4369,8 +4428,8 @@ class yi {
|
|
|
4369
4428
|
// Implementation of functionality shared by cmd methods with param_lists.
|
|
4370
4429
|
_cmd(e, t, r, s, o, i = {}) {
|
|
4371
4430
|
let c = null;
|
|
4372
|
-
for (let
|
|
4373
|
-
Object.prototype.hasOwnProperty.call(s,
|
|
4431
|
+
for (let u in s)
|
|
4432
|
+
Object.prototype.hasOwnProperty.call(s, u) && (c = this.encode_openc3_type(s[u]), c !== null && (s[u] = c));
|
|
4374
4433
|
return this.exec(
|
|
4375
4434
|
e,
|
|
4376
4435
|
[t, r, s],
|
|
@@ -4590,11 +4649,11 @@ class yi {
|
|
|
4590
4649
|
}
|
|
4591
4650
|
}
|
|
4592
4651
|
export {
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4652
|
+
Br as Api,
|
|
4653
|
+
Ei as Cable,
|
|
4654
|
+
wt as ConfigParserError,
|
|
4655
|
+
Si as ConfigParserService,
|
|
4656
|
+
Ri as OpenC3Api,
|
|
4657
|
+
Je as axios
|
|
4599
4658
|
};
|
|
4600
4659
|
//# sourceMappingURL=services.js.map
|