@openc3/js-common 6.7.0 → 6.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/services.cjs +13 -13
- package/dist/services.cjs.map +1 -1
- package/dist/services.js +1054 -1009
- package/dist/services.js.map +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js +9 -4
- package/dist/utils.js.map +1 -1
- package/package.json +7 -7
package/dist/services.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
1
|
+
var rn = Object.defineProperty;
|
|
2
|
+
var on = (n, e, t) => e in n ? rn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var $ = (n, e, t) => on(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
function St(n, e) {
|
|
5
5
|
return function() {
|
|
6
6
|
return n.apply(e, arguments);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const { toString:
|
|
10
|
-
const t =
|
|
9
|
+
const { toString: cn } = Object.prototype, { getPrototypeOf: qe } = Object, { iterator: _e, toStringTag: xt } = Symbol, Ee = /* @__PURE__ */ ((n) => (e) => {
|
|
10
|
+
const t = cn.call(e);
|
|
11
11
|
return n[t] || (n[t] = t.slice(8, -1).toLowerCase());
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
13
|
-
function
|
|
14
|
-
return n !== null && !Y(n) && n.constructor !== null && !Y(n.constructor) &&
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null)), D = (n) => (n = n.toLowerCase(), (e) => Ee(e) === n), Se = (n) => (e) => typeof e === n, { isArray: ee } = Array, Y = Se("undefined");
|
|
13
|
+
function ie(n) {
|
|
14
|
+
return n !== null && !Y(n) && n.constructor !== null && !Y(n.constructor) && I(n.constructor.isBuffer) && n.constructor.isBuffer(n);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
function
|
|
16
|
+
const At = D("ArrayBuffer");
|
|
17
|
+
function an(n) {
|
|
18
18
|
let e;
|
|
19
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(n) : e = n && n.buffer &&
|
|
19
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(n) : e = n && n.buffer && At(n.buffer), e;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
21
|
+
const ln = Se("string"), I = Se("function"), Rt = Se("number"), oe = (n) => n !== null && typeof n == "object", un = (n) => n === !0 || n === !1, ge = (n) => {
|
|
22
|
+
if (Ee(n) !== "object")
|
|
23
23
|
return !1;
|
|
24
|
-
const e =
|
|
25
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
26
|
-
},
|
|
27
|
-
if (!
|
|
24
|
+
const e = qe(n);
|
|
25
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(xt in n) && !(_e in n);
|
|
26
|
+
}, hn = (n) => {
|
|
27
|
+
if (!oe(n) || ie(n))
|
|
28
28
|
return !1;
|
|
29
29
|
try {
|
|
30
30
|
return Object.keys(n).length === 0 && Object.getPrototypeOf(n) === Object.prototype;
|
|
31
31
|
} catch {
|
|
32
32
|
return !1;
|
|
33
33
|
}
|
|
34
|
-
},
|
|
34
|
+
}, dn = D("Date"), fn = D("File"), pn = D("Blob"), mn = D("FileList"), gn = (n) => oe(n) && I(n.pipe), bn = (n) => {
|
|
35
35
|
let e;
|
|
36
|
-
return n && (typeof FormData == "function" && n instanceof FormData ||
|
|
37
|
-
e === "object" &&
|
|
38
|
-
},
|
|
39
|
-
function
|
|
36
|
+
return n && (typeof FormData == "function" && n instanceof FormData || I(n.append) && ((e = Ee(n)) === "formdata" || // detect form-data instance
|
|
37
|
+
e === "object" && I(n.toString) && n.toString() === "[object FormData]"));
|
|
38
|
+
}, yn = D("URLSearchParams"), [wn, _n, En, Sn] = ["ReadableStream", "Request", "Response", "Headers"].map(D), xn = (n) => n.trim ? n.trim() : n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
39
|
+
function ce(n, e, { allOwnKeys: t = !1 } = {}) {
|
|
40
40
|
if (n === null || typeof n > "u")
|
|
41
41
|
return;
|
|
42
42
|
let s, r;
|
|
43
|
-
if (typeof n != "object" && (n = [n]),
|
|
43
|
+
if (typeof n != "object" && (n = [n]), ee(n))
|
|
44
44
|
for (s = 0, r = n.length; s < r; s++)
|
|
45
45
|
e.call(null, n[s], s, n);
|
|
46
46
|
else {
|
|
47
|
-
if (
|
|
47
|
+
if (ie(n))
|
|
48
48
|
return;
|
|
49
49
|
const i = t ? Object.getOwnPropertyNames(n) : Object.keys(n), o = i.length;
|
|
50
50
|
let c;
|
|
@@ -52,8 +52,8 @@ function ne(n, e, { allOwnKeys: t = !1 } = {}) {
|
|
|
52
52
|
c = i[s], e.call(null, n[c], c, n);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
if (
|
|
55
|
+
function Ot(n, e) {
|
|
56
|
+
if (ie(n))
|
|
57
57
|
return null;
|
|
58
58
|
e = e.toLowerCase();
|
|
59
59
|
const t = Object.keys(n);
|
|
@@ -63,75 +63,75 @@ function _t(n, e) {
|
|
|
63
63
|
return r;
|
|
64
64
|
return null;
|
|
65
65
|
}
|
|
66
|
-
const
|
|
67
|
-
function
|
|
68
|
-
const { caseless: n } =
|
|
69
|
-
const
|
|
70
|
-
|
|
66
|
+
const J = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ct = (n) => !Y(n) && n !== J;
|
|
67
|
+
function Ie() {
|
|
68
|
+
const { caseless: n, skipUndefined: e } = Ct(this) && this || {}, t = {}, s = (r, i) => {
|
|
69
|
+
const o = n && Ot(t, i) || i;
|
|
70
|
+
ge(t[o]) && ge(r) ? t[o] = Ie(t[o], r) : ge(r) ? t[o] = Ie({}, r) : ee(r) ? t[o] = r.slice() : (!e || !Y(r)) && (t[o] = r);
|
|
71
71
|
};
|
|
72
|
-
for (let
|
|
73
|
-
arguments[
|
|
74
|
-
return
|
|
72
|
+
for (let r = 0, i = arguments.length; r < i; r++)
|
|
73
|
+
arguments[r] && ce(arguments[r], s);
|
|
74
|
+
return t;
|
|
75
75
|
}
|
|
76
|
-
const
|
|
77
|
-
t &&
|
|
78
|
-
}, { allOwnKeys: s }), n),
|
|
76
|
+
const An = (n, e, t, { allOwnKeys: s } = {}) => (ce(e, (r, i) => {
|
|
77
|
+
t && I(r) ? n[i] = St(r, t) : n[i] = r;
|
|
78
|
+
}, { allOwnKeys: s }), n), Rn = (n) => (n.charCodeAt(0) === 65279 && (n = n.slice(1)), n), On = (n, e, t, s) => {
|
|
79
79
|
n.prototype = Object.create(e.prototype, s), n.prototype.constructor = n, Object.defineProperty(n, "super", {
|
|
80
80
|
value: e.prototype
|
|
81
81
|
}), t && Object.assign(n.prototype, t);
|
|
82
|
-
},
|
|
82
|
+
}, Cn = (n, e, t, s) => {
|
|
83
83
|
let r, i, o;
|
|
84
84
|
const c = {};
|
|
85
85
|
if (e = e || {}, n == null) return e;
|
|
86
86
|
do {
|
|
87
87
|
for (r = Object.getOwnPropertyNames(n), i = r.length; i-- > 0; )
|
|
88
88
|
o = r[i], (!s || s(o, n, e)) && !c[o] && (e[o] = n[o], c[o] = !0);
|
|
89
|
-
n = t !== !1 &&
|
|
89
|
+
n = t !== !1 && qe(n);
|
|
90
90
|
} while (n && (!t || t(n, e)) && n !== Object.prototype);
|
|
91
91
|
return e;
|
|
92
|
-
},
|
|
92
|
+
}, Tn = (n, e, t) => {
|
|
93
93
|
n = String(n), (t === void 0 || t > n.length) && (t = n.length), t -= e.length;
|
|
94
94
|
const s = n.indexOf(e, t);
|
|
95
95
|
return s !== -1 && s === t;
|
|
96
|
-
},
|
|
96
|
+
}, kn = (n) => {
|
|
97
97
|
if (!n) return null;
|
|
98
|
-
if (
|
|
98
|
+
if (ee(n)) return n;
|
|
99
99
|
let e = n.length;
|
|
100
|
-
if (!
|
|
100
|
+
if (!Rt(e)) return null;
|
|
101
101
|
const t = new Array(e);
|
|
102
102
|
for (; e-- > 0; )
|
|
103
103
|
t[e] = n[e];
|
|
104
104
|
return t;
|
|
105
|
-
},
|
|
106
|
-
const s = (n && n[
|
|
105
|
+
}, Nn = /* @__PURE__ */ ((n) => (e) => n && e instanceof n)(typeof Uint8Array < "u" && qe(Uint8Array)), Pn = (n, e) => {
|
|
106
|
+
const s = (n && n[_e]).call(n);
|
|
107
107
|
let r;
|
|
108
108
|
for (; (r = s.next()) && !r.done; ) {
|
|
109
109
|
const i = r.value;
|
|
110
110
|
e.call(n, i[0], i[1]);
|
|
111
111
|
}
|
|
112
|
-
},
|
|
112
|
+
}, In = (n, e) => {
|
|
113
113
|
let t;
|
|
114
114
|
const s = [];
|
|
115
115
|
for (; (t = n.exec(e)) !== null; )
|
|
116
116
|
s.push(t);
|
|
117
117
|
return s;
|
|
118
|
-
},
|
|
118
|
+
}, Ln = D("HTMLFormElement"), jn = (n) => n.toLowerCase().replace(
|
|
119
119
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
120
120
|
function(t, s, r) {
|
|
121
121
|
return s.toUpperCase() + r;
|
|
122
122
|
}
|
|
123
|
-
),
|
|
123
|
+
), Ge = (({ hasOwnProperty: n }) => (e, t) => n.call(e, t))(Object.prototype), Fn = D("RegExp"), Tt = (n, e) => {
|
|
124
124
|
const t = Object.getOwnPropertyDescriptors(n), s = {};
|
|
125
|
-
|
|
125
|
+
ce(t, (r, i) => {
|
|
126
126
|
let o;
|
|
127
127
|
(o = e(r, i, n)) !== !1 && (s[i] = o || r);
|
|
128
128
|
}), Object.defineProperties(n, s);
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
if (
|
|
129
|
+
}, vn = (n) => {
|
|
130
|
+
Tt(n, (e, t) => {
|
|
131
|
+
if (I(n) && ["arguments", "caller", "callee"].indexOf(t) !== -1)
|
|
132
132
|
return !1;
|
|
133
133
|
const s = n[t];
|
|
134
|
-
if (
|
|
134
|
+
if (I(s)) {
|
|
135
135
|
if (e.enumerable = !1, "writable" in e) {
|
|
136
136
|
e.writable = !1;
|
|
137
137
|
return;
|
|
@@ -141,29 +141,29 @@ const bn = (n, e, t, { allOwnKeys: s } = {}) => (ne(e, (r, i) => {
|
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
|
-
},
|
|
144
|
+
}, $n = (n, e) => {
|
|
145
145
|
const t = {}, s = (r) => {
|
|
146
146
|
r.forEach((i) => {
|
|
147
147
|
t[i] = !0;
|
|
148
148
|
});
|
|
149
149
|
};
|
|
150
|
-
return
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
function
|
|
154
|
-
return !!(n &&
|
|
150
|
+
return ee(n) ? s(n) : s(String(n).split(e)), t;
|
|
151
|
+
}, Un = () => {
|
|
152
|
+
}, Dn = (n, e) => n != null && Number.isFinite(n = +n) ? n : e;
|
|
153
|
+
function qn(n) {
|
|
154
|
+
return !!(n && I(n.append) && n[xt] === "FormData" && n[_e]);
|
|
155
155
|
}
|
|
156
|
-
const
|
|
156
|
+
const Bn = (n) => {
|
|
157
157
|
const e = new Array(10), t = (s, r) => {
|
|
158
|
-
if (
|
|
158
|
+
if (oe(s)) {
|
|
159
159
|
if (e.indexOf(s) >= 0)
|
|
160
160
|
return;
|
|
161
|
-
if (
|
|
161
|
+
if (ie(s))
|
|
162
162
|
return s;
|
|
163
163
|
if (!("toJSON" in s)) {
|
|
164
164
|
e[r] = s;
|
|
165
|
-
const i =
|
|
166
|
-
return
|
|
165
|
+
const i = ee(s) ? [] : {};
|
|
166
|
+
return ce(s, (o, c) => {
|
|
167
167
|
const h = t(o, r + 1);
|
|
168
168
|
!Y(h) && (i[c] = h);
|
|
169
169
|
}), e[r] = void 0, i;
|
|
@@ -172,77 +172,77 @@ const jn = (n) => {
|
|
|
172
172
|
return s;
|
|
173
173
|
};
|
|
174
174
|
return t(n, 0);
|
|
175
|
-
},
|
|
176
|
-
r ===
|
|
175
|
+
}, Mn = D("AsyncFunction"), Hn = (n) => n && (oe(n) || I(n)) && I(n.then) && I(n.catch), kt = ((n, e) => n ? setImmediate : e ? ((t, s) => (J.addEventListener("message", ({ source: r, data: i }) => {
|
|
176
|
+
r === J && i === t && s.length && s.shift()();
|
|
177
177
|
}, !1), (r) => {
|
|
178
|
-
s.push(r),
|
|
178
|
+
s.push(r), J.postMessage(t, "*");
|
|
179
179
|
}))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(
|
|
180
180
|
typeof setImmediate == "function",
|
|
181
|
-
|
|
182
|
-
),
|
|
183
|
-
isArray:
|
|
184
|
-
isArrayBuffer:
|
|
185
|
-
isBuffer:
|
|
186
|
-
isFormData:
|
|
187
|
-
isArrayBufferView:
|
|
188
|
-
isString:
|
|
189
|
-
isNumber:
|
|
190
|
-
isBoolean:
|
|
191
|
-
isObject:
|
|
192
|
-
isPlainObject:
|
|
193
|
-
isEmptyObject:
|
|
194
|
-
isReadableStream:
|
|
195
|
-
isRequest:
|
|
196
|
-
isResponse:
|
|
197
|
-
isHeaders:
|
|
181
|
+
I(J.postMessage)
|
|
182
|
+
), zn = typeof queueMicrotask < "u" ? queueMicrotask.bind(J) : typeof process < "u" && process.nextTick || kt, Vn = (n) => n != null && I(n[_e]), l = {
|
|
183
|
+
isArray: ee,
|
|
184
|
+
isArrayBuffer: At,
|
|
185
|
+
isBuffer: ie,
|
|
186
|
+
isFormData: bn,
|
|
187
|
+
isArrayBufferView: an,
|
|
188
|
+
isString: ln,
|
|
189
|
+
isNumber: Rt,
|
|
190
|
+
isBoolean: un,
|
|
191
|
+
isObject: oe,
|
|
192
|
+
isPlainObject: ge,
|
|
193
|
+
isEmptyObject: hn,
|
|
194
|
+
isReadableStream: wn,
|
|
195
|
+
isRequest: _n,
|
|
196
|
+
isResponse: En,
|
|
197
|
+
isHeaders: Sn,
|
|
198
198
|
isUndefined: Y,
|
|
199
|
-
isDate:
|
|
200
|
-
isFile:
|
|
201
|
-
isBlob:
|
|
202
|
-
isRegExp:
|
|
203
|
-
isFunction:
|
|
204
|
-
isStream:
|
|
205
|
-
isURLSearchParams:
|
|
206
|
-
isTypedArray:
|
|
207
|
-
isFileList:
|
|
208
|
-
forEach:
|
|
209
|
-
merge:
|
|
210
|
-
extend:
|
|
211
|
-
trim:
|
|
212
|
-
stripBOM:
|
|
213
|
-
inherits:
|
|
214
|
-
toFlatObject:
|
|
215
|
-
kindOf:
|
|
216
|
-
kindOfTest:
|
|
217
|
-
endsWith:
|
|
218
|
-
toArray:
|
|
219
|
-
forEachEntry:
|
|
220
|
-
matchAll:
|
|
221
|
-
isHTMLForm:
|
|
222
|
-
hasOwnProperty:
|
|
223
|
-
hasOwnProp:
|
|
199
|
+
isDate: dn,
|
|
200
|
+
isFile: fn,
|
|
201
|
+
isBlob: pn,
|
|
202
|
+
isRegExp: Fn,
|
|
203
|
+
isFunction: I,
|
|
204
|
+
isStream: gn,
|
|
205
|
+
isURLSearchParams: yn,
|
|
206
|
+
isTypedArray: Nn,
|
|
207
|
+
isFileList: mn,
|
|
208
|
+
forEach: ce,
|
|
209
|
+
merge: Ie,
|
|
210
|
+
extend: An,
|
|
211
|
+
trim: xn,
|
|
212
|
+
stripBOM: Rn,
|
|
213
|
+
inherits: On,
|
|
214
|
+
toFlatObject: Cn,
|
|
215
|
+
kindOf: Ee,
|
|
216
|
+
kindOfTest: D,
|
|
217
|
+
endsWith: Tn,
|
|
218
|
+
toArray: kn,
|
|
219
|
+
forEachEntry: Pn,
|
|
220
|
+
matchAll: In,
|
|
221
|
+
isHTMLForm: Ln,
|
|
222
|
+
hasOwnProperty: Ge,
|
|
223
|
+
hasOwnProp: Ge,
|
|
224
224
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
225
|
-
reduceDescriptors:
|
|
226
|
-
freezeMethods:
|
|
227
|
-
toObjectSet:
|
|
228
|
-
toCamelCase:
|
|
229
|
-
noop:
|
|
230
|
-
toFiniteNumber:
|
|
231
|
-
findKey:
|
|
232
|
-
global:
|
|
233
|
-
isContextDefined:
|
|
234
|
-
isSpecCompliantForm:
|
|
235
|
-
toJSONObject:
|
|
236
|
-
isAsyncFn:
|
|
237
|
-
isThenable:
|
|
238
|
-
setImmediate:
|
|
239
|
-
asap:
|
|
240
|
-
isIterable:
|
|
225
|
+
reduceDescriptors: Tt,
|
|
226
|
+
freezeMethods: vn,
|
|
227
|
+
toObjectSet: $n,
|
|
228
|
+
toCamelCase: jn,
|
|
229
|
+
noop: Un,
|
|
230
|
+
toFiniteNumber: Dn,
|
|
231
|
+
findKey: Ot,
|
|
232
|
+
global: J,
|
|
233
|
+
isContextDefined: Ct,
|
|
234
|
+
isSpecCompliantForm: qn,
|
|
235
|
+
toJSONObject: Bn,
|
|
236
|
+
isAsyncFn: Mn,
|
|
237
|
+
isThenable: Hn,
|
|
238
|
+
setImmediate: kt,
|
|
239
|
+
asap: zn,
|
|
240
|
+
isIterable: Vn
|
|
241
241
|
};
|
|
242
|
-
function
|
|
242
|
+
function w(n, e, t, s, r) {
|
|
243
243
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = n, this.name = "AxiosError", e && (this.code = e), t && (this.config = t), s && (this.request = s), r && (this.response = r, this.status = r.status ? r.status : null);
|
|
244
244
|
}
|
|
245
|
-
l.inherits(
|
|
245
|
+
l.inherits(w, Error, {
|
|
246
246
|
toJSON: function() {
|
|
247
247
|
return {
|
|
248
248
|
// Standard
|
|
@@ -263,7 +263,7 @@ l.inherits(y, Error, {
|
|
|
263
263
|
};
|
|
264
264
|
}
|
|
265
265
|
});
|
|
266
|
-
const
|
|
266
|
+
const Nt = w.prototype, Pt = {};
|
|
267
267
|
[
|
|
268
268
|
"ERR_BAD_OPTION_VALUE",
|
|
269
269
|
"ERR_BAD_OPTION",
|
|
@@ -279,35 +279,37 @@ const Rt = y.prototype, At = {};
|
|
|
279
279
|
"ERR_INVALID_URL"
|
|
280
280
|
// eslint-disable-next-line func-names
|
|
281
281
|
].forEach((n) => {
|
|
282
|
-
|
|
282
|
+
Pt[n] = { value: n };
|
|
283
283
|
});
|
|
284
|
-
Object.defineProperties(
|
|
285
|
-
Object.defineProperty(
|
|
286
|
-
|
|
287
|
-
const o = Object.create(
|
|
288
|
-
|
|
289
|
-
return
|
|
290
|
-
}, (
|
|
284
|
+
Object.defineProperties(w, Pt);
|
|
285
|
+
Object.defineProperty(Nt, "isAxiosError", { value: !0 });
|
|
286
|
+
w.from = (n, e, t, s, r, i) => {
|
|
287
|
+
const o = Object.create(Nt);
|
|
288
|
+
l.toFlatObject(n, o, function(a) {
|
|
289
|
+
return a !== Error.prototype;
|
|
290
|
+
}, (u) => u !== "isAxiosError");
|
|
291
|
+
const c = n && n.message ? n.message : "Error", h = e == null && n ? n.code : e;
|
|
292
|
+
return w.call(o, c, h, t, s, r), n && o.cause == null && Object.defineProperty(o, "cause", { value: n, configurable: !0 }), o.name = n && n.name || "Error", i && Object.assign(o, i), o;
|
|
291
293
|
};
|
|
292
|
-
const
|
|
293
|
-
function
|
|
294
|
+
const Jn = null;
|
|
295
|
+
function Le(n) {
|
|
294
296
|
return l.isPlainObject(n) || l.isArray(n);
|
|
295
297
|
}
|
|
296
|
-
function
|
|
298
|
+
function It(n) {
|
|
297
299
|
return l.endsWith(n, "[]") ? n.slice(0, -2) : n;
|
|
298
300
|
}
|
|
299
|
-
function
|
|
301
|
+
function Qe(n, e, t) {
|
|
300
302
|
return n ? n.concat(e).map(function(r, i) {
|
|
301
|
-
return r =
|
|
303
|
+
return r = It(r), !t && i ? "[" + r + "]" : r;
|
|
302
304
|
}).join(t ? "." : "") : e;
|
|
303
305
|
}
|
|
304
|
-
function
|
|
305
|
-
return l.isArray(n) && !n.some(
|
|
306
|
+
function Wn(n) {
|
|
307
|
+
return l.isArray(n) && !n.some(Le);
|
|
306
308
|
}
|
|
307
|
-
const
|
|
309
|
+
const Kn = l.toFlatObject(l, {}, null, function(e) {
|
|
308
310
|
return /^is[A-Z]/.test(e);
|
|
309
311
|
});
|
|
310
|
-
function
|
|
312
|
+
function xe(n, e, t) {
|
|
311
313
|
if (!l.isObject(n))
|
|
312
314
|
throw new TypeError("target must be an object");
|
|
313
315
|
e = e || new FormData(), t = l.toFlatObject(t, {
|
|
@@ -320,57 +322,57 @@ function be(n, e, t) {
|
|
|
320
322
|
const s = t.metaTokens, r = t.visitor || a, i = t.dots, o = t.indexes, h = (t.Blob || typeof Blob < "u" && Blob) && l.isSpecCompliantForm(e);
|
|
321
323
|
if (!l.isFunction(r))
|
|
322
324
|
throw new TypeError("visitor must be a function");
|
|
323
|
-
function u(
|
|
324
|
-
if (
|
|
325
|
-
if (l.isDate(
|
|
326
|
-
return
|
|
327
|
-
if (l.isBoolean(
|
|
328
|
-
return
|
|
329
|
-
if (!h && l.isBlob(
|
|
330
|
-
throw new
|
|
331
|
-
return l.isArrayBuffer(
|
|
332
|
-
}
|
|
333
|
-
function a(
|
|
334
|
-
let _ =
|
|
335
|
-
if (
|
|
325
|
+
function u(d) {
|
|
326
|
+
if (d === null) return "";
|
|
327
|
+
if (l.isDate(d))
|
|
328
|
+
return d.toISOString();
|
|
329
|
+
if (l.isBoolean(d))
|
|
330
|
+
return d.toString();
|
|
331
|
+
if (!h && l.isBlob(d))
|
|
332
|
+
throw new w("Blob is not supported. Use a Buffer instead.");
|
|
333
|
+
return l.isArrayBuffer(d) || l.isTypedArray(d) ? h && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
334
|
+
}
|
|
335
|
+
function a(d, m, p) {
|
|
336
|
+
let _ = d;
|
|
337
|
+
if (d && !p && typeof d == "object") {
|
|
336
338
|
if (l.endsWith(m, "{}"))
|
|
337
|
-
m = s ? m : m.slice(0, -2),
|
|
338
|
-
else if (l.isArray(
|
|
339
|
-
return m =
|
|
340
|
-
!(l.isUndefined(
|
|
339
|
+
m = s ? m : m.slice(0, -2), d = JSON.stringify(d);
|
|
340
|
+
else if (l.isArray(d) && Wn(d) || (l.isFileList(d) || l.endsWith(m, "[]")) && (_ = l.toArray(d)))
|
|
341
|
+
return m = It(m), _.forEach(function(x, O) {
|
|
342
|
+
!(l.isUndefined(x) || x === null) && e.append(
|
|
341
343
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
o === !0 ?
|
|
343
|
-
u(
|
|
344
|
+
o === !0 ? Qe([m], O, i) : o === null ? m : m + "[]",
|
|
345
|
+
u(x)
|
|
344
346
|
);
|
|
345
347
|
}), !1;
|
|
346
348
|
}
|
|
347
|
-
return
|
|
349
|
+
return Le(d) ? !0 : (e.append(Qe(p, m, i), u(d)), !1);
|
|
348
350
|
}
|
|
349
|
-
const
|
|
351
|
+
const f = [], g = Object.assign(Kn, {
|
|
350
352
|
defaultVisitor: a,
|
|
351
353
|
convertValue: u,
|
|
352
|
-
isVisitable:
|
|
354
|
+
isVisitable: Le
|
|
353
355
|
});
|
|
354
|
-
function b(
|
|
355
|
-
if (!l.isUndefined(
|
|
356
|
-
if (
|
|
356
|
+
function b(d, m) {
|
|
357
|
+
if (!l.isUndefined(d)) {
|
|
358
|
+
if (f.indexOf(d) !== -1)
|
|
357
359
|
throw Error("Circular reference detected in " + m.join("."));
|
|
358
|
-
|
|
360
|
+
f.push(d), l.forEach(d, function(_, S) {
|
|
359
361
|
(!(l.isUndefined(_) || _ === null) && r.call(
|
|
360
362
|
e,
|
|
361
363
|
_,
|
|
362
|
-
l.isString(
|
|
364
|
+
l.isString(S) ? S.trim() : S,
|
|
363
365
|
m,
|
|
364
366
|
g
|
|
365
|
-
)) === !0 && b(_, m ? m.concat(
|
|
366
|
-
}),
|
|
367
|
+
)) === !0 && b(_, m ? m.concat(S) : [S]);
|
|
368
|
+
}), f.pop();
|
|
367
369
|
}
|
|
368
370
|
}
|
|
369
371
|
if (!l.isObject(n))
|
|
370
372
|
throw new TypeError("data must be an object");
|
|
371
373
|
return b(n), e;
|
|
372
374
|
}
|
|
373
|
-
function
|
|
375
|
+
function Ze(n) {
|
|
374
376
|
const e = {
|
|
375
377
|
"!": "%21",
|
|
376
378
|
"'": "%27",
|
|
@@ -384,40 +386,40 @@ function Xe(n) {
|
|
|
384
386
|
return e[s];
|
|
385
387
|
});
|
|
386
388
|
}
|
|
387
|
-
function
|
|
388
|
-
this._pairs = [], n &&
|
|
389
|
+
function Be(n, e) {
|
|
390
|
+
this._pairs = [], n && xe(n, this, e);
|
|
389
391
|
}
|
|
390
|
-
const
|
|
391
|
-
|
|
392
|
+
const Lt = Be.prototype;
|
|
393
|
+
Lt.append = function(e, t) {
|
|
392
394
|
this._pairs.push([e, t]);
|
|
393
395
|
};
|
|
394
|
-
|
|
396
|
+
Lt.toString = function(e) {
|
|
395
397
|
const t = e ? function(s) {
|
|
396
|
-
return e.call(this, s,
|
|
397
|
-
} :
|
|
398
|
+
return e.call(this, s, Ze);
|
|
399
|
+
} : Ze;
|
|
398
400
|
return this._pairs.map(function(r) {
|
|
399
401
|
return t(r[0]) + "=" + t(r[1]);
|
|
400
402
|
}, "").join("&");
|
|
401
403
|
};
|
|
402
|
-
function
|
|
403
|
-
return encodeURIComponent(n).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+")
|
|
404
|
+
function Xn(n) {
|
|
405
|
+
return encodeURIComponent(n).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
404
406
|
}
|
|
405
|
-
function
|
|
407
|
+
function jt(n, e, t) {
|
|
406
408
|
if (!e)
|
|
407
409
|
return n;
|
|
408
|
-
const s = t && t.encode ||
|
|
410
|
+
const s = t && t.encode || Xn;
|
|
409
411
|
l.isFunction(t) && (t = {
|
|
410
412
|
serialize: t
|
|
411
413
|
});
|
|
412
414
|
const r = t && t.serialize;
|
|
413
415
|
let i;
|
|
414
|
-
if (r ? i = r(e, t) : i = l.isURLSearchParams(e) ? e.toString() : new
|
|
416
|
+
if (r ? i = r(e, t) : i = l.isURLSearchParams(e) ? e.toString() : new Be(e, t).toString(s), i) {
|
|
415
417
|
const o = n.indexOf("#");
|
|
416
418
|
o !== -1 && (n = n.slice(0, o)), n += (n.indexOf("?") === -1 ? "?" : "&") + i;
|
|
417
419
|
}
|
|
418
420
|
return n;
|
|
419
421
|
}
|
|
420
|
-
class
|
|
422
|
+
class Ye {
|
|
421
423
|
constructor() {
|
|
422
424
|
this.handlers = [];
|
|
423
425
|
}
|
|
@@ -471,42 +473,42 @@ class Ge {
|
|
|
471
473
|
});
|
|
472
474
|
}
|
|
473
475
|
}
|
|
474
|
-
const
|
|
476
|
+
const Ft = {
|
|
475
477
|
silentJSONParsing: !0,
|
|
476
478
|
forcedJSONParsing: !0,
|
|
477
479
|
clarifyTimeoutError: !1
|
|
478
|
-
},
|
|
480
|
+
}, Gn = typeof URLSearchParams < "u" ? URLSearchParams : Be, Qn = typeof FormData < "u" ? FormData : null, Zn = typeof Blob < "u" ? Blob : null, Yn = {
|
|
479
481
|
isBrowser: !0,
|
|
480
482
|
classes: {
|
|
481
|
-
URLSearchParams:
|
|
482
|
-
FormData:
|
|
483
|
-
Blob:
|
|
483
|
+
URLSearchParams: Gn,
|
|
484
|
+
FormData: Qn,
|
|
485
|
+
Blob: Zn
|
|
484
486
|
},
|
|
485
487
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
},
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
488
|
+
}, Me = typeof window < "u" && typeof document < "u", je = typeof navigator == "object" && navigator || void 0, es = Me && (!je || ["ReactNative", "NativeScript", "NS"].indexOf(je.product) < 0), ts = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
489
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", ns = Me && window.location.href || "http://localhost", ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
490
|
__proto__: null,
|
|
489
|
-
hasBrowserEnv:
|
|
490
|
-
hasStandardBrowserEnv:
|
|
491
|
-
hasStandardBrowserWebWorkerEnv:
|
|
492
|
-
navigator:
|
|
493
|
-
origin:
|
|
494
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
495
|
-
...
|
|
496
|
-
...
|
|
491
|
+
hasBrowserEnv: Me,
|
|
492
|
+
hasStandardBrowserEnv: es,
|
|
493
|
+
hasStandardBrowserWebWorkerEnv: ts,
|
|
494
|
+
navigator: je,
|
|
495
|
+
origin: ns
|
|
496
|
+
}, Symbol.toStringTag, { value: "Module" })), N = {
|
|
497
|
+
...ss,
|
|
498
|
+
...Yn
|
|
497
499
|
};
|
|
498
|
-
function
|
|
499
|
-
return
|
|
500
|
+
function rs(n, e) {
|
|
501
|
+
return xe(n, new N.classes.URLSearchParams(), {
|
|
500
502
|
visitor: function(t, s, r, i) {
|
|
501
|
-
return
|
|
503
|
+
return N.isNode && l.isBuffer(t) ? (this.append(s, t.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
502
504
|
},
|
|
503
505
|
...e
|
|
504
506
|
});
|
|
505
507
|
}
|
|
506
|
-
function
|
|
508
|
+
function is(n) {
|
|
507
509
|
return l.matchAll(/\w+|\[(\w*)]/g, n).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
508
510
|
}
|
|
509
|
-
function
|
|
511
|
+
function os(n) {
|
|
510
512
|
const e = {}, t = Object.keys(n);
|
|
511
513
|
let s;
|
|
512
514
|
const r = t.length;
|
|
@@ -515,22 +517,22 @@ function Yn(n) {
|
|
|
515
517
|
i = t[s], e[i] = n[i];
|
|
516
518
|
return e;
|
|
517
519
|
}
|
|
518
|
-
function
|
|
520
|
+
function vt(n) {
|
|
519
521
|
function e(t, s, r, i) {
|
|
520
522
|
let o = t[i++];
|
|
521
523
|
if (o === "__proto__") return !0;
|
|
522
524
|
const c = Number.isFinite(+o), h = i >= t.length;
|
|
523
|
-
return o = !o && l.isArray(r) ? r.length : o, h ? (l.hasOwnProp(r, o) ? r[o] = [r[o], s] : r[o] = s, !c) : ((!r[o] || !l.isObject(r[o])) && (r[o] = []), e(t, s, r[o], i) && l.isArray(r[o]) && (r[o] =
|
|
525
|
+
return o = !o && l.isArray(r) ? r.length : o, h ? (l.hasOwnProp(r, o) ? r[o] = [r[o], s] : r[o] = s, !c) : ((!r[o] || !l.isObject(r[o])) && (r[o] = []), e(t, s, r[o], i) && l.isArray(r[o]) && (r[o] = os(r[o])), !c);
|
|
524
526
|
}
|
|
525
527
|
if (l.isFormData(n) && l.isFunction(n.entries)) {
|
|
526
528
|
const t = {};
|
|
527
529
|
return l.forEachEntry(n, (s, r) => {
|
|
528
|
-
e(
|
|
530
|
+
e(is(s), r, t, 0);
|
|
529
531
|
}), t;
|
|
530
532
|
}
|
|
531
533
|
return null;
|
|
532
534
|
}
|
|
533
|
-
function
|
|
535
|
+
function cs(n, e, t) {
|
|
534
536
|
if (l.isString(n))
|
|
535
537
|
try {
|
|
536
538
|
return (e || JSON.parse)(n), l.trim(n);
|
|
@@ -540,13 +542,13 @@ function es(n, e, t) {
|
|
|
540
542
|
}
|
|
541
543
|
return (t || JSON.stringify)(n);
|
|
542
544
|
}
|
|
543
|
-
const
|
|
544
|
-
transitional:
|
|
545
|
+
const ae = {
|
|
546
|
+
transitional: Ft,
|
|
545
547
|
adapter: ["xhr", "http", "fetch"],
|
|
546
548
|
transformRequest: [function(e, t) {
|
|
547
549
|
const s = t.getContentType() || "", r = s.indexOf("application/json") > -1, i = l.isObject(e);
|
|
548
550
|
if (i && l.isHTMLForm(e) && (e = new FormData(e)), l.isFormData(e))
|
|
549
|
-
return r ? JSON.stringify(
|
|
551
|
+
return r ? JSON.stringify(vt(e)) : e;
|
|
550
552
|
if (l.isArrayBuffer(e) || l.isBuffer(e) || l.isStream(e) || l.isFile(e) || l.isBlob(e) || l.isReadableStream(e))
|
|
551
553
|
return e;
|
|
552
554
|
if (l.isArrayBufferView(e))
|
|
@@ -556,29 +558,29 @@ const se = {
|
|
|
556
558
|
let c;
|
|
557
559
|
if (i) {
|
|
558
560
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
|
-
return
|
|
561
|
+
return rs(e, this.formSerializer).toString();
|
|
560
562
|
if ((c = l.isFileList(e)) || s.indexOf("multipart/form-data") > -1) {
|
|
561
563
|
const h = this.env && this.env.FormData;
|
|
562
|
-
return
|
|
564
|
+
return xe(
|
|
563
565
|
c ? { "files[]": e } : e,
|
|
564
566
|
h && new h(),
|
|
565
567
|
this.formSerializer
|
|
566
568
|
);
|
|
567
569
|
}
|
|
568
570
|
}
|
|
569
|
-
return i || r ? (t.setContentType("application/json", !1),
|
|
571
|
+
return i || r ? (t.setContentType("application/json", !1), cs(e)) : e;
|
|
570
572
|
}],
|
|
571
573
|
transformResponse: [function(e) {
|
|
572
|
-
const t = this.transitional ||
|
|
574
|
+
const t = this.transitional || ae.transitional, s = t && t.forcedJSONParsing, r = this.responseType === "json";
|
|
573
575
|
if (l.isResponse(e) || l.isReadableStream(e))
|
|
574
576
|
return e;
|
|
575
577
|
if (e && l.isString(e) && (s && !this.responseType || r)) {
|
|
576
578
|
const o = !(t && t.silentJSONParsing) && r;
|
|
577
579
|
try {
|
|
578
|
-
return JSON.parse(e);
|
|
580
|
+
return JSON.parse(e, this.parseReviver);
|
|
579
581
|
} catch (c) {
|
|
580
582
|
if (o)
|
|
581
|
-
throw c.name === "SyntaxError" ?
|
|
583
|
+
throw c.name === "SyntaxError" ? w.from(c, w.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
582
584
|
}
|
|
583
585
|
}
|
|
584
586
|
return e;
|
|
@@ -593,8 +595,8 @@ const se = {
|
|
|
593
595
|
maxContentLength: -1,
|
|
594
596
|
maxBodyLength: -1,
|
|
595
597
|
env: {
|
|
596
|
-
FormData:
|
|
597
|
-
Blob:
|
|
598
|
+
FormData: N.classes.FormData,
|
|
599
|
+
Blob: N.classes.Blob
|
|
598
600
|
},
|
|
599
601
|
validateStatus: function(e) {
|
|
600
602
|
return e >= 200 && e < 300;
|
|
@@ -607,9 +609,9 @@ const se = {
|
|
|
607
609
|
}
|
|
608
610
|
};
|
|
609
611
|
l.forEach(["delete", "get", "head", "post", "put", "patch"], (n) => {
|
|
610
|
-
|
|
612
|
+
ae.headers[n] = {};
|
|
611
613
|
});
|
|
612
|
-
const
|
|
614
|
+
const as = l.toObjectSet([
|
|
613
615
|
"age",
|
|
614
616
|
"authorization",
|
|
615
617
|
"content-length",
|
|
@@ -627,29 +629,29 @@ const ts = l.toObjectSet([
|
|
|
627
629
|
"referer",
|
|
628
630
|
"retry-after",
|
|
629
631
|
"user-agent"
|
|
630
|
-
]),
|
|
632
|
+
]), ls = (n) => {
|
|
631
633
|
const e = {};
|
|
632
634
|
let t, s, r;
|
|
633
635
|
return n && n.split(`
|
|
634
636
|
`).forEach(function(o) {
|
|
635
|
-
r = o.indexOf(":"), t = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!t || e[t] &&
|
|
637
|
+
r = o.indexOf(":"), t = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!t || e[t] && as[t]) && (t === "set-cookie" ? e[t] ? e[t].push(s) : e[t] = [s] : e[t] = e[t] ? e[t] + ", " + s : s);
|
|
636
638
|
}), e;
|
|
637
|
-
},
|
|
638
|
-
function
|
|
639
|
+
}, et = Symbol("internals");
|
|
640
|
+
function ne(n) {
|
|
639
641
|
return n && String(n).trim().toLowerCase();
|
|
640
642
|
}
|
|
641
|
-
function
|
|
642
|
-
return n === !1 || n == null ? n : l.isArray(n) ? n.map(
|
|
643
|
+
function be(n) {
|
|
644
|
+
return n === !1 || n == null ? n : l.isArray(n) ? n.map(be) : String(n);
|
|
643
645
|
}
|
|
644
|
-
function
|
|
646
|
+
function us(n) {
|
|
645
647
|
const e = /* @__PURE__ */ Object.create(null), t = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
646
648
|
let s;
|
|
647
649
|
for (; s = t.exec(n); )
|
|
648
650
|
e[s[1]] = s[2];
|
|
649
651
|
return e;
|
|
650
652
|
}
|
|
651
|
-
const
|
|
652
|
-
function
|
|
653
|
+
const hs = (n) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());
|
|
654
|
+
function Te(n, e, t, s, r) {
|
|
653
655
|
if (l.isFunction(s))
|
|
654
656
|
return s.call(this, e, t);
|
|
655
657
|
if (r && (e = t), !!l.isString(e)) {
|
|
@@ -659,10 +661,10 @@ function Ae(n, e, t, s, r) {
|
|
|
659
661
|
return s.test(e);
|
|
660
662
|
}
|
|
661
663
|
}
|
|
662
|
-
function
|
|
664
|
+
function ds(n) {
|
|
663
665
|
return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, s) => t.toUpperCase() + s);
|
|
664
666
|
}
|
|
665
|
-
function
|
|
667
|
+
function fs(n, e) {
|
|
666
668
|
const t = l.toCamelCase(" " + e);
|
|
667
669
|
["get", "set", "has"].forEach((s) => {
|
|
668
670
|
Object.defineProperty(n, s + t, {
|
|
@@ -673,24 +675,24 @@ function os(n, e) {
|
|
|
673
675
|
});
|
|
674
676
|
});
|
|
675
677
|
}
|
|
676
|
-
let
|
|
678
|
+
let L = class {
|
|
677
679
|
constructor(e) {
|
|
678
680
|
e && this.set(e);
|
|
679
681
|
}
|
|
680
682
|
set(e, t, s) {
|
|
681
683
|
const r = this;
|
|
682
684
|
function i(c, h, u) {
|
|
683
|
-
const a =
|
|
685
|
+
const a = ne(h);
|
|
684
686
|
if (!a)
|
|
685
687
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const
|
|
687
|
-
(!
|
|
688
|
+
const f = l.findKey(r, a);
|
|
689
|
+
(!f || r[f] === void 0 || u === !0 || u === void 0 && r[f] !== !1) && (r[f || h] = be(c));
|
|
688
690
|
}
|
|
689
691
|
const o = (c, h) => l.forEach(c, (u, a) => i(u, a, h));
|
|
690
692
|
if (l.isPlainObject(e) || e instanceof this.constructor)
|
|
691
693
|
o(e, t);
|
|
692
|
-
else if (l.isString(e) && (e = e.trim()) && !
|
|
693
|
-
o(
|
|
694
|
+
else if (l.isString(e) && (e = e.trim()) && !hs(e))
|
|
695
|
+
o(ls(e), t);
|
|
694
696
|
else if (l.isObject(e) && l.isIterable(e)) {
|
|
695
697
|
let c = {}, h, u;
|
|
696
698
|
for (const a of e) {
|
|
@@ -704,14 +706,14 @@ let k = class {
|
|
|
704
706
|
return this;
|
|
705
707
|
}
|
|
706
708
|
get(e, t) {
|
|
707
|
-
if (e =
|
|
709
|
+
if (e = ne(e), e) {
|
|
708
710
|
const s = l.findKey(this, e);
|
|
709
711
|
if (s) {
|
|
710
712
|
const r = this[s];
|
|
711
713
|
if (!t)
|
|
712
714
|
return r;
|
|
713
715
|
if (t === !0)
|
|
714
|
-
return
|
|
716
|
+
return us(r);
|
|
715
717
|
if (l.isFunction(t))
|
|
716
718
|
return t.call(this, r, s);
|
|
717
719
|
if (l.isRegExp(t))
|
|
@@ -721,9 +723,9 @@ let k = class {
|
|
|
721
723
|
}
|
|
722
724
|
}
|
|
723
725
|
has(e, t) {
|
|
724
|
-
if (e =
|
|
726
|
+
if (e = ne(e), e) {
|
|
725
727
|
const s = l.findKey(this, e);
|
|
726
|
-
return !!(s && this[s] !== void 0 && (!t ||
|
|
728
|
+
return !!(s && this[s] !== void 0 && (!t || Te(this, this[s], s, t)));
|
|
727
729
|
}
|
|
728
730
|
return !1;
|
|
729
731
|
}
|
|
@@ -731,9 +733,9 @@ let k = class {
|
|
|
731
733
|
const s = this;
|
|
732
734
|
let r = !1;
|
|
733
735
|
function i(o) {
|
|
734
|
-
if (o =
|
|
736
|
+
if (o = ne(o), o) {
|
|
735
737
|
const c = l.findKey(s, o);
|
|
736
|
-
c && (!t ||
|
|
738
|
+
c && (!t || Te(s, s[c], c, t)) && (delete s[c], r = !0);
|
|
737
739
|
}
|
|
738
740
|
}
|
|
739
741
|
return l.isArray(e) ? e.forEach(i) : i(e), r;
|
|
@@ -743,7 +745,7 @@ let k = class {
|
|
|
743
745
|
let s = t.length, r = !1;
|
|
744
746
|
for (; s--; ) {
|
|
745
747
|
const i = t[s];
|
|
746
|
-
(!e ||
|
|
748
|
+
(!e || Te(this, this[i], i, e, !0)) && (delete this[i], r = !0);
|
|
747
749
|
}
|
|
748
750
|
return r;
|
|
749
751
|
}
|
|
@@ -752,11 +754,11 @@ let k = class {
|
|
|
752
754
|
return l.forEach(this, (r, i) => {
|
|
753
755
|
const o = l.findKey(s, i);
|
|
754
756
|
if (o) {
|
|
755
|
-
t[o] =
|
|
757
|
+
t[o] = be(r), delete t[i];
|
|
756
758
|
return;
|
|
757
759
|
}
|
|
758
|
-
const c = e ?
|
|
759
|
-
c !== i && delete t[i], t[c] =
|
|
760
|
+
const c = e ? ds(i) : String(i).trim();
|
|
761
|
+
c !== i && delete t[i], t[c] = be(r), s[c] = !0;
|
|
760
762
|
}), this;
|
|
761
763
|
}
|
|
762
764
|
concat(...e) {
|
|
@@ -789,18 +791,18 @@ let k = class {
|
|
|
789
791
|
return t.forEach((r) => s.set(r)), s;
|
|
790
792
|
}
|
|
791
793
|
static accessor(e) {
|
|
792
|
-
const s = (this[
|
|
794
|
+
const s = (this[et] = this[et] = {
|
|
793
795
|
accessors: {}
|
|
794
796
|
}).accessors, r = this.prototype;
|
|
795
797
|
function i(o) {
|
|
796
|
-
const c =
|
|
797
|
-
s[c] || (
|
|
798
|
+
const c = ne(o);
|
|
799
|
+
s[c] || (fs(r, o), s[c] = !0);
|
|
798
800
|
}
|
|
799
801
|
return l.isArray(e) ? e.forEach(i) : i(e), this;
|
|
800
802
|
}
|
|
801
803
|
};
|
|
802
|
-
|
|
803
|
-
l.reduceDescriptors(
|
|
804
|
+
L.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
805
|
+
l.reduceDescriptors(L.prototype, ({ value: n }, e) => {
|
|
804
806
|
let t = e[0].toUpperCase() + e.slice(1);
|
|
805
807
|
return {
|
|
806
808
|
get: () => n,
|
|
@@ -809,72 +811,72 @@ l.reduceDescriptors(k.prototype, ({ value: n }, e) => {
|
|
|
809
811
|
}
|
|
810
812
|
};
|
|
811
813
|
});
|
|
812
|
-
l.freezeMethods(
|
|
813
|
-
function
|
|
814
|
-
const t = this ||
|
|
814
|
+
l.freezeMethods(L);
|
|
815
|
+
function ke(n, e) {
|
|
816
|
+
const t = this || ae, s = e || t, r = L.from(s.headers);
|
|
815
817
|
let i = s.data;
|
|
816
818
|
return l.forEach(n, function(c) {
|
|
817
819
|
i = c.call(t, i, r.normalize(), e ? e.status : void 0);
|
|
818
820
|
}), r.normalize(), i;
|
|
819
821
|
}
|
|
820
|
-
function
|
|
822
|
+
function $t(n) {
|
|
821
823
|
return !!(n && n.__CANCEL__);
|
|
822
824
|
}
|
|
823
|
-
function
|
|
824
|
-
|
|
825
|
+
function te(n, e, t) {
|
|
826
|
+
w.call(this, n ?? "canceled", w.ERR_CANCELED, e, t), this.name = "CanceledError";
|
|
825
827
|
}
|
|
826
|
-
l.inherits(
|
|
828
|
+
l.inherits(te, w, {
|
|
827
829
|
__CANCEL__: !0
|
|
828
830
|
});
|
|
829
|
-
function
|
|
831
|
+
function Ut(n, e, t) {
|
|
830
832
|
const s = t.config.validateStatus;
|
|
831
|
-
!t.status || !s || s(t.status) ? n(t) : e(new
|
|
833
|
+
!t.status || !s || s(t.status) ? n(t) : e(new w(
|
|
832
834
|
"Request failed with status code " + t.status,
|
|
833
|
-
[
|
|
835
|
+
[w.ERR_BAD_REQUEST, w.ERR_BAD_RESPONSE][Math.floor(t.status / 100) - 4],
|
|
834
836
|
t.config,
|
|
835
837
|
t.request,
|
|
836
838
|
t
|
|
837
839
|
));
|
|
838
840
|
}
|
|
839
|
-
function
|
|
841
|
+
function ps(n) {
|
|
840
842
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(n);
|
|
841
843
|
return e && e[1] || "";
|
|
842
844
|
}
|
|
843
|
-
function
|
|
845
|
+
function ms(n, e) {
|
|
844
846
|
n = n || 10;
|
|
845
847
|
const t = new Array(n), s = new Array(n);
|
|
846
848
|
let r = 0, i = 0, o;
|
|
847
849
|
return e = e !== void 0 ? e : 1e3, function(h) {
|
|
848
850
|
const u = Date.now(), a = s[i];
|
|
849
851
|
o || (o = u), t[r] = h, s[r] = u;
|
|
850
|
-
let
|
|
851
|
-
for (;
|
|
852
|
-
g += t[
|
|
852
|
+
let f = i, g = 0;
|
|
853
|
+
for (; f !== r; )
|
|
854
|
+
g += t[f++], f = f % n;
|
|
853
855
|
if (r = (r + 1) % n, r === i && (i = (i + 1) % n), u - o < e)
|
|
854
856
|
return;
|
|
855
857
|
const b = a && u - a;
|
|
856
858
|
return b ? Math.round(g * 1e3 / b) : void 0;
|
|
857
859
|
};
|
|
858
860
|
}
|
|
859
|
-
function
|
|
861
|
+
function gs(n, e) {
|
|
860
862
|
let t = 0, s = 1e3 / e, r, i;
|
|
861
863
|
const o = (u, a = Date.now()) => {
|
|
862
864
|
t = a, r = null, i && (clearTimeout(i), i = null), n(...u);
|
|
863
865
|
};
|
|
864
866
|
return [(...u) => {
|
|
865
|
-
const a = Date.now(),
|
|
866
|
-
|
|
867
|
+
const a = Date.now(), f = a - t;
|
|
868
|
+
f >= s ? o(u, a) : (r = u, i || (i = setTimeout(() => {
|
|
867
869
|
i = null, o(r);
|
|
868
|
-
}, s -
|
|
870
|
+
}, s - f)));
|
|
869
871
|
}, () => r && o(r)];
|
|
870
872
|
}
|
|
871
|
-
const
|
|
873
|
+
const we = (n, e, t = 3) => {
|
|
872
874
|
let s = 0;
|
|
873
|
-
const r =
|
|
874
|
-
return
|
|
875
|
+
const r = ms(50, 250);
|
|
876
|
+
return gs((i) => {
|
|
875
877
|
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, h = o - s, u = r(h), a = o <= c;
|
|
876
878
|
s = o;
|
|
877
|
-
const
|
|
879
|
+
const f = {
|
|
878
880
|
loaded: o,
|
|
879
881
|
total: c,
|
|
880
882
|
progress: c ? o / c : void 0,
|
|
@@ -885,19 +887,19 @@ const de = (n, e, t = 3) => {
|
|
|
885
887
|
lengthComputable: c != null,
|
|
886
888
|
[e ? "download" : "upload"]: !0
|
|
887
889
|
};
|
|
888
|
-
n(
|
|
890
|
+
n(f);
|
|
889
891
|
}, t);
|
|
890
|
-
},
|
|
892
|
+
}, tt = (n, e) => {
|
|
891
893
|
const t = n != null;
|
|
892
894
|
return [(s) => e[0]({
|
|
893
895
|
lengthComputable: t,
|
|
894
896
|
total: n,
|
|
895
897
|
loaded: s
|
|
896
898
|
}), e[1]];
|
|
897
|
-
},
|
|
898
|
-
new URL(
|
|
899
|
-
|
|
900
|
-
) : () => !0,
|
|
899
|
+
}, nt = (n) => (...e) => l.asap(() => n(...e)), bs = N.hasStandardBrowserEnv ? /* @__PURE__ */ ((n, e) => (t) => (t = new URL(t, N.origin), n.protocol === t.protocol && n.host === t.host && (e || n.port === t.port)))(
|
|
900
|
+
new URL(N.origin),
|
|
901
|
+
N.navigator && /(msie|trident)/i.test(N.navigator.userAgent)
|
|
902
|
+
) : () => !0, ys = N.hasStandardBrowserEnv ? (
|
|
901
903
|
// Standard browser envs support document.cookie
|
|
902
904
|
{
|
|
903
905
|
write(n, e, t, s, r, i) {
|
|
@@ -924,28 +926,28 @@ const de = (n, e, t = 3) => {
|
|
|
924
926
|
}
|
|
925
927
|
}
|
|
926
928
|
);
|
|
927
|
-
function
|
|
929
|
+
function ws(n) {
|
|
928
930
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(n);
|
|
929
931
|
}
|
|
930
|
-
function
|
|
932
|
+
function _s(n, e) {
|
|
931
933
|
return e ? n.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : n;
|
|
932
934
|
}
|
|
933
|
-
function
|
|
934
|
-
let s = !
|
|
935
|
-
return n && (s || t == !1) ?
|
|
935
|
+
function Dt(n, e, t) {
|
|
936
|
+
let s = !ws(e);
|
|
937
|
+
return n && (s || t == !1) ? _s(n, e) : e;
|
|
936
938
|
}
|
|
937
|
-
const
|
|
938
|
-
function
|
|
939
|
+
const st = (n) => n instanceof L ? { ...n } : n;
|
|
940
|
+
function K(n, e) {
|
|
939
941
|
e = e || {};
|
|
940
942
|
const t = {};
|
|
941
|
-
function s(u, a,
|
|
943
|
+
function s(u, a, f, g) {
|
|
942
944
|
return l.isPlainObject(u) && l.isPlainObject(a) ? l.merge.call({ caseless: g }, u, a) : l.isPlainObject(a) ? l.merge({}, a) : l.isArray(a) ? a.slice() : a;
|
|
943
945
|
}
|
|
944
|
-
function r(u, a,
|
|
946
|
+
function r(u, a, f, g) {
|
|
945
947
|
if (l.isUndefined(a)) {
|
|
946
948
|
if (!l.isUndefined(u))
|
|
947
|
-
return s(void 0, u,
|
|
948
|
-
} else return s(u, a,
|
|
949
|
+
return s(void 0, u, f, g);
|
|
950
|
+
} else return s(u, a, f, g);
|
|
949
951
|
}
|
|
950
952
|
function i(u, a) {
|
|
951
953
|
if (!l.isUndefined(a))
|
|
@@ -957,10 +959,10 @@ function V(n, e) {
|
|
|
957
959
|
return s(void 0, u);
|
|
958
960
|
} else return s(void 0, a);
|
|
959
961
|
}
|
|
960
|
-
function c(u, a,
|
|
961
|
-
if (
|
|
962
|
+
function c(u, a, f) {
|
|
963
|
+
if (f in e)
|
|
962
964
|
return s(u, a);
|
|
963
|
-
if (
|
|
965
|
+
if (f in n)
|
|
964
966
|
return s(void 0, u);
|
|
965
967
|
}
|
|
966
968
|
const h = {
|
|
@@ -992,92 +994,93 @@ function V(n, e) {
|
|
|
992
994
|
socketPath: o,
|
|
993
995
|
responseEncoding: o,
|
|
994
996
|
validateStatus: c,
|
|
995
|
-
headers: (u, a,
|
|
997
|
+
headers: (u, a, f) => r(st(u), st(a), f, !0)
|
|
996
998
|
};
|
|
997
999
|
return l.forEach(Object.keys({ ...n, ...e }), function(a) {
|
|
998
|
-
const
|
|
999
|
-
l.isUndefined(g) &&
|
|
1000
|
+
const f = h[a] || r, g = f(n[a], e[a], a);
|
|
1001
|
+
l.isUndefined(g) && f !== c || (t[a] = g);
|
|
1000
1002
|
}), t;
|
|
1001
1003
|
}
|
|
1002
|
-
const
|
|
1003
|
-
const e =
|
|
1004
|
+
const qt = (n) => {
|
|
1005
|
+
const e = K({}, n);
|
|
1004
1006
|
let { data: t, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: i, headers: o, auth: c } = e;
|
|
1005
|
-
e.headers = o =
|
|
1007
|
+
if (e.headers = o = L.from(o), e.url = jt(Dt(e.baseURL, e.url, e.allowAbsoluteUrls), n.params, n.paramsSerializer), c && o.set(
|
|
1006
1008
|
"Authorization",
|
|
1007
1009
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1008
|
-
)
|
|
1009
|
-
|
|
1010
|
-
if (l.isFormData(t)) {
|
|
1011
|
-
if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
|
|
1010
|
+
), l.isFormData(t)) {
|
|
1011
|
+
if (N.hasStandardBrowserEnv || N.hasStandardBrowserWebWorkerEnv)
|
|
1012
1012
|
o.setContentType(void 0);
|
|
1013
|
-
else if ((
|
|
1014
|
-
const
|
|
1015
|
-
|
|
1013
|
+
else if (l.isFunction(t.getHeaders)) {
|
|
1014
|
+
const h = t.getHeaders(), u = ["content-type", "content-length"];
|
|
1015
|
+
Object.entries(h).forEach(([a, f]) => {
|
|
1016
|
+
u.includes(a.toLowerCase()) && o.set(a, f);
|
|
1017
|
+
});
|
|
1016
1018
|
}
|
|
1017
1019
|
}
|
|
1018
|
-
if (
|
|
1019
|
-
const
|
|
1020
|
-
|
|
1020
|
+
if (N.hasStandardBrowserEnv && (s && l.isFunction(s) && (s = s(e)), s || s !== !1 && bs(e.url))) {
|
|
1021
|
+
const h = r && i && ys.read(i);
|
|
1022
|
+
h && o.set(r, h);
|
|
1021
1023
|
}
|
|
1022
1024
|
return e;
|
|
1023
|
-
},
|
|
1025
|
+
}, Es = typeof XMLHttpRequest < "u", Ss = Es && function(n) {
|
|
1024
1026
|
return new Promise(function(t, s) {
|
|
1025
|
-
const r =
|
|
1027
|
+
const r = qt(n);
|
|
1026
1028
|
let i = r.data;
|
|
1027
|
-
const o =
|
|
1028
|
-
let { responseType: c, onUploadProgress: h, onDownloadProgress: u } = r, a,
|
|
1029
|
+
const o = L.from(r.headers).normalize();
|
|
1030
|
+
let { responseType: c, onUploadProgress: h, onDownloadProgress: u } = r, a, f, g, b, d;
|
|
1029
1031
|
function m() {
|
|
1030
|
-
b && b(),
|
|
1032
|
+
b && b(), d && d(), r.cancelToken && r.cancelToken.unsubscribe(a), r.signal && r.signal.removeEventListener("abort", a);
|
|
1031
1033
|
}
|
|
1032
1034
|
let p = new XMLHttpRequest();
|
|
1033
1035
|
p.open(r.method.toUpperCase(), r.url, !0), p.timeout = r.timeout;
|
|
1034
1036
|
function _() {
|
|
1035
1037
|
if (!p)
|
|
1036
1038
|
return;
|
|
1037
|
-
const
|
|
1039
|
+
const x = L.from(
|
|
1038
1040
|
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1039
|
-
),
|
|
1041
|
+
), C = {
|
|
1040
1042
|
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
|
1041
1043
|
status: p.status,
|
|
1042
1044
|
statusText: p.statusText,
|
|
1043
|
-
headers:
|
|
1045
|
+
headers: x,
|
|
1044
1046
|
config: n,
|
|
1045
1047
|
request: p
|
|
1046
1048
|
};
|
|
1047
|
-
|
|
1048
|
-
t(
|
|
1049
|
-
}, function(
|
|
1050
|
-
s(
|
|
1051
|
-
},
|
|
1049
|
+
Ut(function(T) {
|
|
1050
|
+
t(T), m();
|
|
1051
|
+
}, function(T) {
|
|
1052
|
+
s(T), m();
|
|
1053
|
+
}, C), p = null;
|
|
1052
1054
|
}
|
|
1053
1055
|
"onloadend" in p ? p.onloadend = _ : p.onreadystatechange = function() {
|
|
1054
1056
|
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(_);
|
|
1055
1057
|
}, p.onabort = function() {
|
|
1056
|
-
p && (s(new
|
|
1057
|
-
}, p.onerror = function() {
|
|
1058
|
-
|
|
1058
|
+
p && (s(new w("Request aborted", w.ECONNABORTED, n, p)), p = null);
|
|
1059
|
+
}, p.onerror = function(O) {
|
|
1060
|
+
const C = O && O.message ? O.message : "Network Error", F = new w(C, w.ERR_NETWORK, n, p);
|
|
1061
|
+
F.event = O || null, s(F), p = null;
|
|
1059
1062
|
}, p.ontimeout = function() {
|
|
1060
|
-
let
|
|
1061
|
-
const
|
|
1062
|
-
r.timeoutErrorMessage && (
|
|
1063
|
-
|
|
1064
|
-
|
|
1063
|
+
let O = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
1064
|
+
const C = r.transitional || Ft;
|
|
1065
|
+
r.timeoutErrorMessage && (O = r.timeoutErrorMessage), s(new w(
|
|
1066
|
+
O,
|
|
1067
|
+
C.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
|
|
1065
1068
|
n,
|
|
1066
1069
|
p
|
|
1067
1070
|
)), p = null;
|
|
1068
|
-
}, i === void 0 && o.setContentType(null), "setRequestHeader" in p && l.forEach(o.toJSON(), function(
|
|
1069
|
-
p.setRequestHeader(
|
|
1070
|
-
}), l.isUndefined(r.withCredentials) || (p.withCredentials = !!r.withCredentials), c && c !== "json" && (p.responseType = r.responseType), u && ([g,
|
|
1071
|
-
p && (s(!
|
|
1071
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in p && l.forEach(o.toJSON(), function(O, C) {
|
|
1072
|
+
p.setRequestHeader(C, O);
|
|
1073
|
+
}), l.isUndefined(r.withCredentials) || (p.withCredentials = !!r.withCredentials), c && c !== "json" && (p.responseType = r.responseType), u && ([g, d] = we(u, !0), p.addEventListener("progress", g)), h && p.upload && ([f, b] = we(h), p.upload.addEventListener("progress", f), p.upload.addEventListener("loadend", b)), (r.cancelToken || r.signal) && (a = (x) => {
|
|
1074
|
+
p && (s(!x || x.type ? new te(null, n, p) : x), p.abort(), p = null);
|
|
1072
1075
|
}, r.cancelToken && r.cancelToken.subscribe(a), r.signal && (r.signal.aborted ? a() : r.signal.addEventListener("abort", a)));
|
|
1073
|
-
const
|
|
1074
|
-
if (
|
|
1075
|
-
s(new
|
|
1076
|
+
const S = ps(r.url);
|
|
1077
|
+
if (S && N.protocols.indexOf(S) === -1) {
|
|
1078
|
+
s(new w("Unsupported protocol " + S + ":", w.ERR_BAD_REQUEST, n));
|
|
1076
1079
|
return;
|
|
1077
1080
|
}
|
|
1078
1081
|
p.send(i || null);
|
|
1079
1082
|
});
|
|
1080
|
-
},
|
|
1083
|
+
}, xs = (n, e) => {
|
|
1081
1084
|
const { length: t } = n = n ? n.filter(Boolean) : [];
|
|
1082
1085
|
if (e || t) {
|
|
1083
1086
|
let s = new AbortController(), r;
|
|
@@ -1085,11 +1088,11 @@ const jt = (n) => {
|
|
|
1085
1088
|
if (!r) {
|
|
1086
1089
|
r = !0, c();
|
|
1087
1090
|
const a = u instanceof Error ? u : this.reason;
|
|
1088
|
-
s.abort(a instanceof
|
|
1091
|
+
s.abort(a instanceof w ? a : new te(a instanceof Error ? a.message : a));
|
|
1089
1092
|
}
|
|
1090
1093
|
};
|
|
1091
1094
|
let o = e && setTimeout(() => {
|
|
1092
|
-
o = null, i(new
|
|
1095
|
+
o = null, i(new w(`timeout ${e} of ms exceeded`, w.ETIMEDOUT));
|
|
1093
1096
|
}, e);
|
|
1094
1097
|
const c = () => {
|
|
1095
1098
|
n && (o && clearTimeout(o), o = null, n.forEach((u) => {
|
|
@@ -1100,7 +1103,7 @@ const jt = (n) => {
|
|
|
1100
1103
|
const { signal: h } = s;
|
|
1101
1104
|
return h.unsubscribe = () => l.asap(c), h;
|
|
1102
1105
|
}
|
|
1103
|
-
},
|
|
1106
|
+
}, As = function* (n, e) {
|
|
1104
1107
|
let t = n.byteLength;
|
|
1105
1108
|
if (t < e) {
|
|
1106
1109
|
yield n;
|
|
@@ -1109,10 +1112,10 @@ const jt = (n) => {
|
|
|
1109
1112
|
let s = 0, r;
|
|
1110
1113
|
for (; s < t; )
|
|
1111
1114
|
r = s + e, yield n.slice(s, r), s = r;
|
|
1112
|
-
},
|
|
1113
|
-
for await (const t of
|
|
1114
|
-
yield*
|
|
1115
|
-
},
|
|
1115
|
+
}, Rs = async function* (n, e) {
|
|
1116
|
+
for await (const t of Os(n))
|
|
1117
|
+
yield* As(t, e);
|
|
1118
|
+
}, Os = async function* (n) {
|
|
1116
1119
|
if (n[Symbol.asyncIterator]) {
|
|
1117
1120
|
yield* n;
|
|
1118
1121
|
return;
|
|
@@ -1128,8 +1131,8 @@ const jt = (n) => {
|
|
|
1128
1131
|
} finally {
|
|
1129
1132
|
await e.cancel();
|
|
1130
1133
|
}
|
|
1131
|
-
},
|
|
1132
|
-
const r =
|
|
1134
|
+
}, rt = (n, e, t, s) => {
|
|
1135
|
+
const r = Rs(n, e);
|
|
1133
1136
|
let i = 0, o, c = (h) => {
|
|
1134
1137
|
o || (o = !0, s && s(h));
|
|
1135
1138
|
};
|
|
@@ -1141,9 +1144,9 @@ const jt = (n) => {
|
|
|
1141
1144
|
c(), h.close();
|
|
1142
1145
|
return;
|
|
1143
1146
|
}
|
|
1144
|
-
let
|
|
1147
|
+
let f = a.byteLength;
|
|
1145
1148
|
if (t) {
|
|
1146
|
-
let g = i +=
|
|
1149
|
+
let g = i += f;
|
|
1147
1150
|
t(g);
|
|
1148
1151
|
}
|
|
1149
1152
|
h.enqueue(new Uint8Array(a));
|
|
@@ -1157,140 +1160,171 @@ const jt = (n) => {
|
|
|
1157
1160
|
}, {
|
|
1158
1161
|
highWaterMark: 2
|
|
1159
1162
|
});
|
|
1160
|
-
},
|
|
1163
|
+
}, it = 64 * 1024, { isFunction: de } = l, Bt = (({ fetch: n, Request: e, Response: t }) => ({
|
|
1164
|
+
fetch: n,
|
|
1165
|
+
Request: e,
|
|
1166
|
+
Response: t
|
|
1167
|
+
}))(l.global), {
|
|
1168
|
+
ReadableStream: ot,
|
|
1169
|
+
TextEncoder: ct
|
|
1170
|
+
} = l.global, at = (n, ...e) => {
|
|
1161
1171
|
try {
|
|
1162
1172
|
return !!n(...e);
|
|
1163
1173
|
} catch {
|
|
1164
1174
|
return !1;
|
|
1165
1175
|
}
|
|
1166
|
-
},
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
}).headers.has("Content-Type");
|
|
1175
|
-
return n && !e;
|
|
1176
|
-
}), nt = 64 * 1024, Ie = vt && $t(() => l.isReadableStream(new Response("").body)), fe = {
|
|
1177
|
-
stream: Ie && ((n) => n.body)
|
|
1178
|
-
};
|
|
1179
|
-
ye && ((n) => {
|
|
1180
|
-
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
|
|
1181
|
-
!fe[e] && (fe[e] = l.isFunction(n[e]) ? (t) => t[e]() : (t, s) => {
|
|
1182
|
-
throw new y(`Response type '${e}' is not supported`, y.ERR_NOT_SUPPORT, s);
|
|
1183
|
-
});
|
|
1184
|
-
});
|
|
1185
|
-
})(new Response());
|
|
1186
|
-
const Ss = async (n) => {
|
|
1187
|
-
if (n == null)
|
|
1188
|
-
return 0;
|
|
1189
|
-
if (l.isBlob(n))
|
|
1190
|
-
return n.size;
|
|
1191
|
-
if (l.isSpecCompliantForm(n))
|
|
1192
|
-
return (await new Request(O.origin, {
|
|
1176
|
+
}, Cs = (n) => {
|
|
1177
|
+
const { fetch: e, Request: t, Response: s } = Object.assign({}, Bt, n), r = de(e), i = de(t), o = de(s);
|
|
1178
|
+
if (!r)
|
|
1179
|
+
return !1;
|
|
1180
|
+
const c = r && de(ot), h = r && (typeof ct == "function" ? /* @__PURE__ */ ((d) => (m) => d.encode(m))(new ct()) : async (d) => new Uint8Array(await new t(d).arrayBuffer())), u = i && c && at(() => {
|
|
1181
|
+
let d = !1;
|
|
1182
|
+
const m = new t(N.origin, {
|
|
1183
|
+
body: new ot(),
|
|
1193
1184
|
method: "POST",
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
cancelToken: i,
|
|
1210
|
-
timeout: o,
|
|
1211
|
-
onDownloadProgress: c,
|
|
1212
|
-
onUploadProgress: h,
|
|
1213
|
-
responseType: u,
|
|
1214
|
-
headers: a,
|
|
1215
|
-
withCredentials: d = "same-origin",
|
|
1216
|
-
fetchOptions: g
|
|
1217
|
-
} = jt(n);
|
|
1218
|
-
u = u ? (u + "").toLowerCase() : "text";
|
|
1219
|
-
let b = gs([r, i && i.toAbortSignal()], o), f;
|
|
1220
|
-
const m = b && b.unsubscribe && (() => {
|
|
1221
|
-
b.unsubscribe();
|
|
1185
|
+
get duplex() {
|
|
1186
|
+
return d = !0, "half";
|
|
1187
|
+
}
|
|
1188
|
+
}).headers.has("Content-Type");
|
|
1189
|
+
return d && !m;
|
|
1190
|
+
}), a = o && c && at(() => l.isReadableStream(new s("").body)), f = {
|
|
1191
|
+
stream: a && ((d) => d.body)
|
|
1192
|
+
};
|
|
1193
|
+
r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
|
|
1194
|
+
!f[d] && (f[d] = (m, p) => {
|
|
1195
|
+
let _ = m && m[d];
|
|
1196
|
+
if (_)
|
|
1197
|
+
return _.call(m);
|
|
1198
|
+
throw new w(`Response type '${d}' is not supported`, w.ERR_NOT_SUPPORT, p);
|
|
1199
|
+
});
|
|
1222
1200
|
});
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1201
|
+
const g = async (d) => {
|
|
1202
|
+
if (d == null)
|
|
1203
|
+
return 0;
|
|
1204
|
+
if (l.isBlob(d))
|
|
1205
|
+
return d.size;
|
|
1206
|
+
if (l.isSpecCompliantForm(d))
|
|
1207
|
+
return (await new t(N.origin, {
|
|
1227
1208
|
method: "POST",
|
|
1228
|
-
body:
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1209
|
+
body: d
|
|
1210
|
+
}).arrayBuffer()).byteLength;
|
|
1211
|
+
if (l.isArrayBufferView(d) || l.isArrayBuffer(d))
|
|
1212
|
+
return d.byteLength;
|
|
1213
|
+
if (l.isURLSearchParams(d) && (d = d + ""), l.isString(d))
|
|
1214
|
+
return (await h(d)).byteLength;
|
|
1215
|
+
}, b = async (d, m) => {
|
|
1216
|
+
const p = l.toFiniteNumber(d.getContentLength());
|
|
1217
|
+
return p ?? g(m);
|
|
1218
|
+
};
|
|
1219
|
+
return async (d) => {
|
|
1220
|
+
let {
|
|
1221
|
+
url: m,
|
|
1222
|
+
method: p,
|
|
1223
|
+
data: _,
|
|
1224
|
+
signal: S,
|
|
1225
|
+
cancelToken: x,
|
|
1226
|
+
timeout: O,
|
|
1227
|
+
onDownloadProgress: C,
|
|
1228
|
+
onUploadProgress: F,
|
|
1229
|
+
responseType: T,
|
|
1230
|
+
headers: H,
|
|
1231
|
+
withCredentials: v = "same-origin",
|
|
1232
|
+
fetchOptions: X
|
|
1233
|
+
} = qt(d);
|
|
1234
|
+
T = T ? (T + "").toLowerCase() : "text";
|
|
1235
|
+
let k = xs([S, x && x.toAbortSignal()], O), j = null;
|
|
1236
|
+
const A = k && k.unsubscribe && (() => {
|
|
1237
|
+
k.unsubscribe();
|
|
1238
|
+
});
|
|
1239
|
+
let y;
|
|
1240
|
+
try {
|
|
1241
|
+
if (F && u && p !== "get" && p !== "head" && (y = await b(H, _)) !== 0) {
|
|
1242
|
+
let M = new t(m, {
|
|
1243
|
+
method: "POST",
|
|
1244
|
+
body: _,
|
|
1245
|
+
duplex: "half"
|
|
1246
|
+
}), Q;
|
|
1247
|
+
if (l.isFormData(_) && (Q = M.headers.get("content-type")) && H.setContentType(Q), M.body) {
|
|
1248
|
+
const [Ce, he] = tt(
|
|
1249
|
+
y,
|
|
1250
|
+
we(nt(F))
|
|
1251
|
+
);
|
|
1252
|
+
_ = rt(M.body, it, Ce, he);
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
l.isString(v) || (v = v ? "include" : "omit");
|
|
1256
|
+
const E = i && "credentials" in t.prototype, q = {
|
|
1257
|
+
...X,
|
|
1258
|
+
signal: k,
|
|
1259
|
+
method: p.toUpperCase(),
|
|
1260
|
+
headers: H.normalize().toJSON(),
|
|
1261
|
+
body: _,
|
|
1262
|
+
duplex: "half",
|
|
1263
|
+
credentials: E ? v : void 0
|
|
1264
|
+
};
|
|
1265
|
+
j = i && new t(m, q);
|
|
1266
|
+
let P = await (i ? e(j, X) : e(m, q));
|
|
1267
|
+
const G = a && (T === "stream" || T === "response");
|
|
1268
|
+
if (a && (C || G && A)) {
|
|
1269
|
+
const M = {};
|
|
1270
|
+
["status", "statusText", "headers"].forEach((Xe) => {
|
|
1271
|
+
M[Xe] = P[Xe];
|
|
1272
|
+
});
|
|
1273
|
+
const Q = l.toFiniteNumber(P.headers.get("content-length")), [Ce, he] = C && tt(
|
|
1274
|
+
Q,
|
|
1275
|
+
we(nt(C), !0)
|
|
1276
|
+
) || [];
|
|
1277
|
+
P = new s(
|
|
1278
|
+
rt(P.body, it, Ce, () => {
|
|
1279
|
+
he && he(), A && A();
|
|
1280
|
+
}),
|
|
1281
|
+
M
|
|
1235
1282
|
);
|
|
1236
|
-
s = tt(x.body, nt, I, D);
|
|
1237
1283
|
}
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
});
|
|
1250
|
-
let E = await fetch(f, g);
|
|
1251
|
-
const S = Ie && (u === "stream" || u === "response");
|
|
1252
|
-
if (Ie && (c || S && m)) {
|
|
1253
|
-
const x = {};
|
|
1254
|
-
["status", "statusText", "headers"].forEach((U) => {
|
|
1255
|
-
x[U] = E[U];
|
|
1284
|
+
T = T || "text";
|
|
1285
|
+
let sn = await f[l.findKey(f, T) || "text"](P, d);
|
|
1286
|
+
return !G && A && A(), await new Promise((M, Q) => {
|
|
1287
|
+
Ut(M, Q, {
|
|
1288
|
+
data: sn,
|
|
1289
|
+
headers: L.from(P.headers),
|
|
1290
|
+
status: P.status,
|
|
1291
|
+
statusText: P.statusText,
|
|
1292
|
+
config: d,
|
|
1293
|
+
request: j
|
|
1294
|
+
});
|
|
1256
1295
|
});
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
}),
|
|
1265
|
-
x
|
|
1266
|
-
);
|
|
1296
|
+
} catch (E) {
|
|
1297
|
+
throw A && A(), E && E.name === "TypeError" && /Load failed|fetch/i.test(E.message) ? Object.assign(
|
|
1298
|
+
new w("Network Error", w.ERR_NETWORK, d, j),
|
|
1299
|
+
{
|
|
1300
|
+
cause: E.cause || E
|
|
1301
|
+
}
|
|
1302
|
+
) : w.from(E, E && E.code, d, j);
|
|
1267
1303
|
}
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1304
|
+
};
|
|
1305
|
+
}, Ts = /* @__PURE__ */ new Map(), Mt = (n) => {
|
|
1306
|
+
let e = l.merge.call({
|
|
1307
|
+
skipUndefined: !0
|
|
1308
|
+
}, Bt, n ? n.env : null);
|
|
1309
|
+
const { fetch: t, Request: s, Response: r } = e, i = [
|
|
1310
|
+
s,
|
|
1311
|
+
r,
|
|
1312
|
+
t
|
|
1313
|
+
];
|
|
1314
|
+
let o = i.length, c = o, h, u, a = Ts;
|
|
1315
|
+
for (; c--; )
|
|
1316
|
+
h = i[c], u = a.get(h), u === void 0 && a.set(h, u = c ? /* @__PURE__ */ new Map() : Cs(e)), a = u;
|
|
1317
|
+
return u;
|
|
1318
|
+
};
|
|
1319
|
+
Mt();
|
|
1320
|
+
const Fe = {
|
|
1321
|
+
http: Jn,
|
|
1322
|
+
xhr: Ss,
|
|
1323
|
+
fetch: {
|
|
1324
|
+
get: Mt
|
|
1287
1325
|
}
|
|
1288
|
-
}), Le = {
|
|
1289
|
-
http: Dn,
|
|
1290
|
-
xhr: ms,
|
|
1291
|
-
fetch: Rs
|
|
1292
1326
|
};
|
|
1293
|
-
l.forEach(
|
|
1327
|
+
l.forEach(Fe, (n, e) => {
|
|
1294
1328
|
if (n) {
|
|
1295
1329
|
try {
|
|
1296
1330
|
Object.defineProperty(n, "name", { value: e });
|
|
@@ -1299,77 +1333,77 @@ l.forEach(Le, (n, e) => {
|
|
|
1299
1333
|
Object.defineProperty(n, "adapterName", { value: e });
|
|
1300
1334
|
}
|
|
1301
1335
|
});
|
|
1302
|
-
const
|
|
1303
|
-
getAdapter: (n) => {
|
|
1336
|
+
const lt = (n) => `- ${n}`, ks = (n) => l.isFunction(n) || n === null || n === !1, Ht = {
|
|
1337
|
+
getAdapter: (n, e) => {
|
|
1304
1338
|
n = l.isArray(n) ? n : [n];
|
|
1305
|
-
const { length:
|
|
1306
|
-
let
|
|
1307
|
-
const
|
|
1308
|
-
for (let
|
|
1309
|
-
|
|
1310
|
-
let
|
|
1311
|
-
if (
|
|
1312
|
-
throw new
|
|
1313
|
-
if (
|
|
1339
|
+
const { length: t } = n;
|
|
1340
|
+
let s, r;
|
|
1341
|
+
const i = {};
|
|
1342
|
+
for (let o = 0; o < t; o++) {
|
|
1343
|
+
s = n[o];
|
|
1344
|
+
let c;
|
|
1345
|
+
if (r = s, !ks(s) && (r = Fe[(c = String(s)).toLowerCase()], r === void 0))
|
|
1346
|
+
throw new w(`Unknown adapter '${c}'`);
|
|
1347
|
+
if (r && (l.isFunction(r) || (r = r.get(e))))
|
|
1314
1348
|
break;
|
|
1315
|
-
|
|
1349
|
+
i[c || "#" + o] = r;
|
|
1316
1350
|
}
|
|
1317
|
-
if (!
|
|
1318
|
-
const
|
|
1319
|
-
([
|
|
1351
|
+
if (!r) {
|
|
1352
|
+
const o = Object.entries(i).map(
|
|
1353
|
+
([h, u]) => `adapter ${h} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1320
1354
|
);
|
|
1321
|
-
let
|
|
1322
|
-
` +
|
|
1323
|
-
`) : " " +
|
|
1324
|
-
throw new
|
|
1325
|
-
"There is no suitable adapter to dispatch the request " +
|
|
1355
|
+
let c = t ? o.length > 1 ? `since :
|
|
1356
|
+
` + o.map(lt).join(`
|
|
1357
|
+
`) : " " + lt(o[0]) : "as no adapter specified";
|
|
1358
|
+
throw new w(
|
|
1359
|
+
"There is no suitable adapter to dispatch the request " + c,
|
|
1326
1360
|
"ERR_NOT_SUPPORT"
|
|
1327
1361
|
);
|
|
1328
1362
|
}
|
|
1329
|
-
return
|
|
1363
|
+
return r;
|
|
1330
1364
|
},
|
|
1331
|
-
adapters:
|
|
1365
|
+
adapters: Fe
|
|
1332
1366
|
};
|
|
1333
|
-
function
|
|
1367
|
+
function Ne(n) {
|
|
1334
1368
|
if (n.cancelToken && n.cancelToken.throwIfRequested(), n.signal && n.signal.aborted)
|
|
1335
|
-
throw new
|
|
1369
|
+
throw new te(null, n);
|
|
1336
1370
|
}
|
|
1337
|
-
function
|
|
1338
|
-
return
|
|
1371
|
+
function ut(n) {
|
|
1372
|
+
return Ne(n), n.headers = L.from(n.headers), n.data = ke.call(
|
|
1339
1373
|
n,
|
|
1340
1374
|
n.transformRequest
|
|
1341
|
-
), ["post", "put", "patch"].indexOf(n.method) !== -1 && n.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1342
|
-
return
|
|
1375
|
+
), ["post", "put", "patch"].indexOf(n.method) !== -1 && n.headers.setContentType("application/x-www-form-urlencoded", !1), Ht.getAdapter(n.adapter || ae.adapter, n)(n).then(function(s) {
|
|
1376
|
+
return Ne(n), s.data = ke.call(
|
|
1343
1377
|
n,
|
|
1344
1378
|
n.transformResponse,
|
|
1345
1379
|
s
|
|
1346
|
-
), s.headers =
|
|
1380
|
+
), s.headers = L.from(s.headers), s;
|
|
1347
1381
|
}, function(s) {
|
|
1348
|
-
return
|
|
1382
|
+
return $t(s) || (Ne(n), s && s.response && (s.response.data = ke.call(
|
|
1349
1383
|
n,
|
|
1350
1384
|
n.transformResponse,
|
|
1351
1385
|
s.response
|
|
1352
|
-
), s.response.headers =
|
|
1386
|
+
), s.response.headers = L.from(s.response.headers))), Promise.reject(s);
|
|
1353
1387
|
});
|
|
1354
1388
|
}
|
|
1355
|
-
const
|
|
1389
|
+
const zt = "1.12.0", Ae = {};
|
|
1356
1390
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((n, e) => {
|
|
1357
|
-
|
|
1391
|
+
Ae[n] = function(s) {
|
|
1358
1392
|
return typeof s === n || "a" + (e < 1 ? "n " : " ") + n;
|
|
1359
1393
|
};
|
|
1360
1394
|
});
|
|
1361
|
-
const
|
|
1362
|
-
|
|
1395
|
+
const ht = {};
|
|
1396
|
+
Ae.transitional = function(e, t, s) {
|
|
1363
1397
|
function r(i, o) {
|
|
1364
|
-
return "[Axios v" +
|
|
1398
|
+
return "[Axios v" + zt + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
|
1365
1399
|
}
|
|
1366
1400
|
return (i, o, c) => {
|
|
1367
1401
|
if (e === !1)
|
|
1368
|
-
throw new
|
|
1402
|
+
throw new w(
|
|
1369
1403
|
r(o, " has been removed" + (t ? " in " + t : "")),
|
|
1370
|
-
|
|
1404
|
+
w.ERR_DEPRECATED
|
|
1371
1405
|
);
|
|
1372
|
-
return t && !
|
|
1406
|
+
return t && !ht[o] && (ht[o] = !0, console.warn(
|
|
1373
1407
|
r(
|
|
1374
1408
|
o,
|
|
1375
1409
|
" has been deprecated since v" + t + " and will be removed in the near future"
|
|
@@ -1377,12 +1411,12 @@ we.transitional = function(e, t, s) {
|
|
|
1377
1411
|
)), e ? e(i, o, c) : !0;
|
|
1378
1412
|
};
|
|
1379
1413
|
};
|
|
1380
|
-
|
|
1414
|
+
Ae.spelling = function(e) {
|
|
1381
1415
|
return (t, s) => (console.warn(`${s} is likely a misspelling of ${e}`), !0);
|
|
1382
1416
|
};
|
|
1383
|
-
function
|
|
1417
|
+
function Ns(n, e, t) {
|
|
1384
1418
|
if (typeof n != "object")
|
|
1385
|
-
throw new
|
|
1419
|
+
throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE);
|
|
1386
1420
|
const s = Object.keys(n);
|
|
1387
1421
|
let r = s.length;
|
|
1388
1422
|
for (; r-- > 0; ) {
|
|
@@ -1390,22 +1424,22 @@ function Os(n, e, t) {
|
|
|
1390
1424
|
if (o) {
|
|
1391
1425
|
const c = n[i], h = c === void 0 || o(c, i, n);
|
|
1392
1426
|
if (h !== !0)
|
|
1393
|
-
throw new
|
|
1427
|
+
throw new w("option " + i + " must be " + h, w.ERR_BAD_OPTION_VALUE);
|
|
1394
1428
|
continue;
|
|
1395
1429
|
}
|
|
1396
1430
|
if (t !== !0)
|
|
1397
|
-
throw new
|
|
1431
|
+
throw new w("Unknown option " + i, w.ERR_BAD_OPTION);
|
|
1398
1432
|
}
|
|
1399
1433
|
}
|
|
1400
|
-
const
|
|
1401
|
-
assertOptions:
|
|
1402
|
-
validators:
|
|
1403
|
-
},
|
|
1404
|
-
let
|
|
1434
|
+
const ye = {
|
|
1435
|
+
assertOptions: Ns,
|
|
1436
|
+
validators: Ae
|
|
1437
|
+
}, B = ye.validators;
|
|
1438
|
+
let W = class {
|
|
1405
1439
|
constructor(e) {
|
|
1406
1440
|
this.defaults = e || {}, this.interceptors = {
|
|
1407
|
-
request: new
|
|
1408
|
-
response: new
|
|
1441
|
+
request: new Ye(),
|
|
1442
|
+
response: new Ye()
|
|
1409
1443
|
};
|
|
1410
1444
|
}
|
|
1411
1445
|
/**
|
|
@@ -1434,20 +1468,20 @@ let z = class {
|
|
|
1434
1468
|
}
|
|
1435
1469
|
}
|
|
1436
1470
|
_request(e, t) {
|
|
1437
|
-
typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t =
|
|
1471
|
+
typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t = K(this.defaults, t);
|
|
1438
1472
|
const { transitional: s, paramsSerializer: r, headers: i } = t;
|
|
1439
|
-
s !== void 0 &&
|
|
1440
|
-
silentJSONParsing:
|
|
1441
|
-
forcedJSONParsing:
|
|
1442
|
-
clarifyTimeoutError:
|
|
1473
|
+
s !== void 0 && ye.assertOptions(s, {
|
|
1474
|
+
silentJSONParsing: B.transitional(B.boolean),
|
|
1475
|
+
forcedJSONParsing: B.transitional(B.boolean),
|
|
1476
|
+
clarifyTimeoutError: B.transitional(B.boolean)
|
|
1443
1477
|
}, !1), r != null && (l.isFunction(r) ? t.paramsSerializer = {
|
|
1444
1478
|
serialize: r
|
|
1445
|
-
} :
|
|
1446
|
-
encode:
|
|
1447
|
-
serialize:
|
|
1448
|
-
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : t.allowAbsoluteUrls = !0),
|
|
1449
|
-
baseUrl:
|
|
1450
|
-
withXsrfToken:
|
|
1479
|
+
} : ye.assertOptions(r, {
|
|
1480
|
+
encode: B.function,
|
|
1481
|
+
serialize: B.function
|
|
1482
|
+
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : t.allowAbsoluteUrls = !0), ye.assertOptions(t, {
|
|
1483
|
+
baseUrl: B.spelling("baseURL"),
|
|
1484
|
+
withXsrfToken: B.spelling("withXSRFToken")
|
|
1451
1485
|
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1452
1486
|
let o = i && l.merge(
|
|
1453
1487
|
i.common,
|
|
@@ -1455,10 +1489,10 @@ let z = class {
|
|
|
1455
1489
|
);
|
|
1456
1490
|
i && l.forEach(
|
|
1457
1491
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1458
|
-
(
|
|
1459
|
-
delete i[
|
|
1492
|
+
(d) => {
|
|
1493
|
+
delete i[d];
|
|
1460
1494
|
}
|
|
1461
|
-
), t.headers =
|
|
1495
|
+
), t.headers = L.concat(o, i);
|
|
1462
1496
|
const c = [];
|
|
1463
1497
|
let h = !0;
|
|
1464
1498
|
this.interceptors.request.forEach(function(m) {
|
|
@@ -1468,42 +1502,42 @@ let z = class {
|
|
|
1468
1502
|
this.interceptors.response.forEach(function(m) {
|
|
1469
1503
|
u.push(m.fulfilled, m.rejected);
|
|
1470
1504
|
});
|
|
1471
|
-
let a,
|
|
1505
|
+
let a, f = 0, g;
|
|
1472
1506
|
if (!h) {
|
|
1473
|
-
const
|
|
1474
|
-
for (
|
|
1475
|
-
a = a.then(f
|
|
1507
|
+
const d = [ut.bind(this), void 0];
|
|
1508
|
+
for (d.unshift(...c), d.push(...u), g = d.length, a = Promise.resolve(t); f < g; )
|
|
1509
|
+
a = a.then(d[f++], d[f++]);
|
|
1476
1510
|
return a;
|
|
1477
1511
|
}
|
|
1478
1512
|
g = c.length;
|
|
1479
1513
|
let b = t;
|
|
1480
|
-
for (
|
|
1481
|
-
const
|
|
1514
|
+
for (f = 0; f < g; ) {
|
|
1515
|
+
const d = c[f++], m = c[f++];
|
|
1482
1516
|
try {
|
|
1483
|
-
b =
|
|
1517
|
+
b = d(b);
|
|
1484
1518
|
} catch (p) {
|
|
1485
1519
|
m.call(this, p);
|
|
1486
1520
|
break;
|
|
1487
1521
|
}
|
|
1488
1522
|
}
|
|
1489
1523
|
try {
|
|
1490
|
-
a =
|
|
1491
|
-
} catch (
|
|
1492
|
-
return Promise.reject(
|
|
1524
|
+
a = ut.call(this, b);
|
|
1525
|
+
} catch (d) {
|
|
1526
|
+
return Promise.reject(d);
|
|
1493
1527
|
}
|
|
1494
|
-
for (
|
|
1495
|
-
a = a.then(u[
|
|
1528
|
+
for (f = 0, g = u.length; f < g; )
|
|
1529
|
+
a = a.then(u[f++], u[f++]);
|
|
1496
1530
|
return a;
|
|
1497
1531
|
}
|
|
1498
1532
|
getUri(e) {
|
|
1499
|
-
e =
|
|
1500
|
-
const t =
|
|
1501
|
-
return
|
|
1533
|
+
e = K(this.defaults, e);
|
|
1534
|
+
const t = Dt(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1535
|
+
return jt(t, e.params, e.paramsSerializer);
|
|
1502
1536
|
}
|
|
1503
1537
|
};
|
|
1504
1538
|
l.forEach(["delete", "get", "head", "options"], function(e) {
|
|
1505
|
-
|
|
1506
|
-
return this.request(
|
|
1539
|
+
W.prototype[e] = function(t, s) {
|
|
1540
|
+
return this.request(K(s || {}, {
|
|
1507
1541
|
method: e,
|
|
1508
1542
|
url: t,
|
|
1509
1543
|
data: (s || {}).data
|
|
@@ -1513,7 +1547,7 @@ l.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
1513
1547
|
l.forEach(["post", "put", "patch"], function(e) {
|
|
1514
1548
|
function t(s) {
|
|
1515
1549
|
return function(i, o, c) {
|
|
1516
|
-
return this.request(
|
|
1550
|
+
return this.request(K(c || {}, {
|
|
1517
1551
|
method: e,
|
|
1518
1552
|
headers: s ? {
|
|
1519
1553
|
"Content-Type": "multipart/form-data"
|
|
@@ -1523,9 +1557,9 @@ l.forEach(["post", "put", "patch"], function(e) {
|
|
|
1523
1557
|
}));
|
|
1524
1558
|
};
|
|
1525
1559
|
}
|
|
1526
|
-
|
|
1560
|
+
W.prototype[e] = t(), W.prototype[e + "Form"] = t(!0);
|
|
1527
1561
|
});
|
|
1528
|
-
let
|
|
1562
|
+
let Ps = class Vt {
|
|
1529
1563
|
constructor(e) {
|
|
1530
1564
|
if (typeof e != "function")
|
|
1531
1565
|
throw new TypeError("executor must be a function.");
|
|
@@ -1549,7 +1583,7 @@ let Cs = class Dt {
|
|
|
1549
1583
|
s.unsubscribe(i);
|
|
1550
1584
|
}, o;
|
|
1551
1585
|
}, e(function(i, o, c) {
|
|
1552
|
-
s.reason || (s.reason = new
|
|
1586
|
+
s.reason || (s.reason = new te(i, o, c), t(s.reason));
|
|
1553
1587
|
});
|
|
1554
1588
|
}
|
|
1555
1589
|
/**
|
|
@@ -1591,22 +1625,22 @@ let Cs = class Dt {
|
|
|
1591
1625
|
static source() {
|
|
1592
1626
|
let e;
|
|
1593
1627
|
return {
|
|
1594
|
-
token: new
|
|
1628
|
+
token: new Vt(function(r) {
|
|
1595
1629
|
e = r;
|
|
1596
1630
|
}),
|
|
1597
1631
|
cancel: e
|
|
1598
1632
|
};
|
|
1599
1633
|
}
|
|
1600
1634
|
};
|
|
1601
|
-
function
|
|
1635
|
+
function Is(n) {
|
|
1602
1636
|
return function(t) {
|
|
1603
1637
|
return n.apply(null, t);
|
|
1604
1638
|
};
|
|
1605
1639
|
}
|
|
1606
|
-
function
|
|
1640
|
+
function Ls(n) {
|
|
1607
1641
|
return l.isObject(n) && n.isAxiosError === !0;
|
|
1608
1642
|
}
|
|
1609
|
-
const
|
|
1643
|
+
const ve = {
|
|
1610
1644
|
Continue: 100,
|
|
1611
1645
|
SwitchingProtocols: 101,
|
|
1612
1646
|
Processing: 102,
|
|
@@ -1671,72 +1705,72 @@ const je = {
|
|
|
1671
1705
|
NotExtended: 510,
|
|
1672
1706
|
NetworkAuthenticationRequired: 511
|
|
1673
1707
|
};
|
|
1674
|
-
Object.entries(
|
|
1675
|
-
|
|
1708
|
+
Object.entries(ve).forEach(([n, e]) => {
|
|
1709
|
+
ve[e] = n;
|
|
1676
1710
|
});
|
|
1677
|
-
function
|
|
1678
|
-
const e = new
|
|
1679
|
-
return l.extend(t,
|
|
1680
|
-
return
|
|
1711
|
+
function Jt(n) {
|
|
1712
|
+
const e = new W(n), t = St(W.prototype.request, e);
|
|
1713
|
+
return l.extend(t, W.prototype, e, { allOwnKeys: !0 }), l.extend(t, e, null, { allOwnKeys: !0 }), t.create = function(r) {
|
|
1714
|
+
return Jt(K(n, r));
|
|
1681
1715
|
}, t;
|
|
1682
1716
|
}
|
|
1683
|
-
const R =
|
|
1684
|
-
R.Axios =
|
|
1685
|
-
R.CanceledError =
|
|
1686
|
-
R.CancelToken =
|
|
1687
|
-
R.isCancel =
|
|
1688
|
-
R.VERSION =
|
|
1689
|
-
R.toFormData =
|
|
1690
|
-
R.AxiosError =
|
|
1717
|
+
const R = Jt(ae);
|
|
1718
|
+
R.Axios = W;
|
|
1719
|
+
R.CanceledError = te;
|
|
1720
|
+
R.CancelToken = Ps;
|
|
1721
|
+
R.isCancel = $t;
|
|
1722
|
+
R.VERSION = zt;
|
|
1723
|
+
R.toFormData = xe;
|
|
1724
|
+
R.AxiosError = w;
|
|
1691
1725
|
R.Cancel = R.CanceledError;
|
|
1692
1726
|
R.all = function(e) {
|
|
1693
1727
|
return Promise.all(e);
|
|
1694
1728
|
};
|
|
1695
|
-
R.spread =
|
|
1696
|
-
R.isAxiosError =
|
|
1697
|
-
R.mergeConfig =
|
|
1698
|
-
R.AxiosHeaders =
|
|
1699
|
-
R.formToJSON = (n) =>
|
|
1700
|
-
R.getAdapter =
|
|
1701
|
-
R.HttpStatusCode =
|
|
1729
|
+
R.spread = Is;
|
|
1730
|
+
R.isAxiosError = Ls;
|
|
1731
|
+
R.mergeConfig = K;
|
|
1732
|
+
R.AxiosHeaders = L;
|
|
1733
|
+
R.formToJSON = (n) => vt(l.isHTMLForm(n) ? new FormData(n) : n);
|
|
1734
|
+
R.getAdapter = Ht.getAdapter;
|
|
1735
|
+
R.HttpStatusCode = ve;
|
|
1702
1736
|
R.default = R;
|
|
1703
1737
|
const {
|
|
1704
|
-
Axios:
|
|
1705
|
-
AxiosError:
|
|
1706
|
-
CanceledError:
|
|
1707
|
-
isCancel:
|
|
1708
|
-
CancelToken:
|
|
1709
|
-
VERSION:
|
|
1710
|
-
all:
|
|
1711
|
-
Cancel:
|
|
1712
|
-
isAxiosError:
|
|
1713
|
-
spread:
|
|
1714
|
-
toFormData:
|
|
1715
|
-
AxiosHeaders:
|
|
1716
|
-
HttpStatusCode:
|
|
1717
|
-
formToJSON:
|
|
1718
|
-
getAdapter:
|
|
1719
|
-
mergeConfig:
|
|
1720
|
-
} = R,
|
|
1738
|
+
Axios: Xr,
|
|
1739
|
+
AxiosError: Gr,
|
|
1740
|
+
CanceledError: Qr,
|
|
1741
|
+
isCancel: Zr,
|
|
1742
|
+
CancelToken: Yr,
|
|
1743
|
+
VERSION: ei,
|
|
1744
|
+
all: ti,
|
|
1745
|
+
Cancel: ni,
|
|
1746
|
+
isAxiosError: si,
|
|
1747
|
+
spread: ri,
|
|
1748
|
+
toFormData: ii,
|
|
1749
|
+
AxiosHeaders: oi,
|
|
1750
|
+
HttpStatusCode: ci,
|
|
1751
|
+
formToJSON: ai,
|
|
1752
|
+
getAdapter: li,
|
|
1753
|
+
mergeConfig: ui
|
|
1754
|
+
} = R, He = R.create({
|
|
1721
1755
|
baseURL: location.origin,
|
|
1722
1756
|
timeout: 6e4,
|
|
1723
1757
|
params: {}
|
|
1724
1758
|
});
|
|
1725
|
-
|
|
1759
|
+
He.interceptors.response.use(
|
|
1726
1760
|
(n) => n,
|
|
1727
1761
|
(n) => {
|
|
1728
|
-
var e, t, s, r, i, o, c, h, u, a,
|
|
1762
|
+
var e, t, s, r, i, o, c, h, u, a, f;
|
|
1729
1763
|
if (n.response) {
|
|
1730
1764
|
if (n.response.status === 401 && OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity, !0).then(
|
|
1731
|
-
function(
|
|
1732
|
-
|
|
1765
|
+
function(d) {
|
|
1766
|
+
d && OpenC3Auth.setTokens();
|
|
1733
1767
|
}
|
|
1734
1768
|
), n.response.config.headers["Ignore-Errors"] && n.response.config.headers["Ignore-Errors"].includes(
|
|
1735
1769
|
n.response.status.toString()
|
|
1736
1770
|
))
|
|
1737
1771
|
return Promise.reject(n);
|
|
1738
1772
|
let g = `HTTP ${n.response.status} - `;
|
|
1739
|
-
(e = n.response) != null && e.statusText && (g += `${n.response.statusText} `), (s = (t = n.response) == null ? void 0 : t.config) != null && s.data && (g += `${n.response.config.data} `), (i = (r = n.response) == null ? void 0 : r.data) != null && i.message ? g += `${n.response.data.message}` : (c = (o = n.response) == null ? void 0 : o.data) != null && c.exception ? g += `${n.response.data.exception}` : (a = (u = (h = n.response) == null ? void 0 : h.data) == null ? void 0 : u.error) != null && a.message ? (n.response.data.error.class && (g += `${n.response.data.error.class} `), g += `${n.response.data.error.message}`) : g += `${(
|
|
1773
|
+
(e = n.response) != null && e.statusText && (g += `${n.response.statusText} `), (s = (t = n.response) == null ? void 0 : t.config) != null && s.data && (g += `${n.response.config.data} `), (i = (r = n.response) == null ? void 0 : r.data) != null && i.message ? g += `${n.response.data.message}` : (c = (o = n.response) == null ? void 0 : o.data) != null && c.exception ? g += `${n.response.data.exception}` : (a = (u = (h = n.response) == null ? void 0 : h.data) == null ? void 0 : u.error) != null && a.message ? (n.response.data.error.class && (g += `${n.response.data.error.class} `), g += `${n.response.data.error.message}`) : g += `${(f = n.response) == null ? void 0 : f.data}`;
|
|
1740
1774
|
const { $cosmosNotify: b } = window;
|
|
1741
1775
|
throw b && b.serious({
|
|
1742
1776
|
title: "Network error",
|
|
@@ -1746,7 +1780,7 @@ Be.interceptors.response.use(
|
|
|
1746
1780
|
throw n;
|
|
1747
1781
|
}
|
|
1748
1782
|
);
|
|
1749
|
-
const
|
|
1783
|
+
const fe = async function(n, e, {
|
|
1750
1784
|
data: t,
|
|
1751
1785
|
params: s = {},
|
|
1752
1786
|
headers: r,
|
|
@@ -1764,7 +1798,7 @@ const oe = async function(n, e, {
|
|
|
1764
1798
|
}
|
|
1765
1799
|
r.Authorization = localStorage.openc3Token;
|
|
1766
1800
|
}
|
|
1767
|
-
return r.manual = !0, !o && !s.scope && (s.scope = window.openc3Scope),
|
|
1801
|
+
return r.manual = !0, !o && !s.scope && (s.scope = window.openc3Scope), He({
|
|
1768
1802
|
method: n,
|
|
1769
1803
|
url: e,
|
|
1770
1804
|
data: t,
|
|
@@ -1772,20 +1806,20 @@ const oe = async function(n, e, {
|
|
|
1772
1806
|
headers: r,
|
|
1773
1807
|
onUploadProgress: c
|
|
1774
1808
|
});
|
|
1775
|
-
},
|
|
1809
|
+
}, $e = {
|
|
1776
1810
|
Accept: "application/json"
|
|
1777
|
-
},
|
|
1778
|
-
|
|
1811
|
+
}, dt = {
|
|
1812
|
+
...$e,
|
|
1779
1813
|
"Content-Type": "application/json"
|
|
1780
|
-
},
|
|
1814
|
+
}, hi = {
|
|
1781
1815
|
get: function(n, {
|
|
1782
1816
|
params: e,
|
|
1783
|
-
headers: t =
|
|
1817
|
+
headers: t = $e,
|
|
1784
1818
|
noScope: s,
|
|
1785
1819
|
noAuth: r,
|
|
1786
1820
|
onUploadProgress: i
|
|
1787
1821
|
} = {}) {
|
|
1788
|
-
return
|
|
1822
|
+
return fe("get", n, {
|
|
1789
1823
|
params: e,
|
|
1790
1824
|
headers: t,
|
|
1791
1825
|
noScope: s,
|
|
@@ -1796,12 +1830,12 @@ const oe = async function(n, e, {
|
|
|
1796
1830
|
put: function(n, {
|
|
1797
1831
|
data: e,
|
|
1798
1832
|
params: t,
|
|
1799
|
-
headers: s =
|
|
1833
|
+
headers: s = dt,
|
|
1800
1834
|
noScope: r,
|
|
1801
1835
|
noAuth: i,
|
|
1802
1836
|
onUploadProgress: o
|
|
1803
1837
|
} = {}) {
|
|
1804
|
-
return
|
|
1838
|
+
return fe("put", n, {
|
|
1805
1839
|
data: e,
|
|
1806
1840
|
params: t,
|
|
1807
1841
|
headers: s,
|
|
@@ -1813,12 +1847,12 @@ const oe = async function(n, e, {
|
|
|
1813
1847
|
post: function(n, {
|
|
1814
1848
|
data: e,
|
|
1815
1849
|
params: t,
|
|
1816
|
-
headers: s =
|
|
1850
|
+
headers: s = dt,
|
|
1817
1851
|
noScope: r,
|
|
1818
1852
|
noAuth: i,
|
|
1819
1853
|
onUploadProgress: o
|
|
1820
1854
|
} = {}) {
|
|
1821
|
-
return
|
|
1855
|
+
return fe("post", n, {
|
|
1822
1856
|
data: e,
|
|
1823
1857
|
params: t,
|
|
1824
1858
|
headers: s,
|
|
@@ -1829,12 +1863,12 @@ const oe = async function(n, e, {
|
|
|
1829
1863
|
},
|
|
1830
1864
|
delete: function(n, {
|
|
1831
1865
|
params: e,
|
|
1832
|
-
headers: t =
|
|
1866
|
+
headers: t = $e,
|
|
1833
1867
|
noScope: s,
|
|
1834
1868
|
noAuth: r,
|
|
1835
1869
|
onUploadProgress: i
|
|
1836
1870
|
} = {}) {
|
|
1837
|
-
return
|
|
1871
|
+
return fe("delete", n, {
|
|
1838
1872
|
params: e,
|
|
1839
1873
|
headers: t,
|
|
1840
1874
|
noScope: s,
|
|
@@ -1843,7 +1877,7 @@ const oe = async function(n, e, {
|
|
|
1843
1877
|
});
|
|
1844
1878
|
}
|
|
1845
1879
|
};
|
|
1846
|
-
let
|
|
1880
|
+
let Re = () => ({
|
|
1847
1881
|
emit(n, ...e) {
|
|
1848
1882
|
for (let t = this.events[n] || [], s = 0, r = t.length; s < r; s++)
|
|
1849
1883
|
t[s](...e);
|
|
@@ -1857,38 +1891,38 @@ let _e = () => ({
|
|
|
1857
1891
|
};
|
|
1858
1892
|
}
|
|
1859
1893
|
});
|
|
1860
|
-
class
|
|
1894
|
+
class le extends Error {
|
|
1861
1895
|
constructor(e, t) {
|
|
1862
1896
|
e instanceof Error ? (super(e.message), this.cause = e) : super(e), this.reason = t, this.name = "ReasonError";
|
|
1863
1897
|
}
|
|
1864
1898
|
}
|
|
1865
|
-
class
|
|
1899
|
+
class ze extends le {
|
|
1866
1900
|
constructor(e) {
|
|
1867
1901
|
super("Rejected", e), this.name = "SubscriptionRejectedError";
|
|
1868
1902
|
}
|
|
1869
1903
|
}
|
|
1870
|
-
class
|
|
1904
|
+
class js extends le {
|
|
1871
1905
|
constructor(e) {
|
|
1872
1906
|
super(e || "Timed out to receive subscription ack"), this.name = "SubscriptionTimeoutError";
|
|
1873
1907
|
}
|
|
1874
1908
|
}
|
|
1875
|
-
class
|
|
1909
|
+
class U extends le {
|
|
1876
1910
|
constructor(e, t) {
|
|
1877
1911
|
t ? super(e, t) : super("Disconnected", e), this.name = "DisconnectedError";
|
|
1878
1912
|
}
|
|
1879
1913
|
}
|
|
1880
|
-
class
|
|
1914
|
+
class Fs extends U {
|
|
1881
1915
|
constructor(e) {
|
|
1882
1916
|
super(e, "stale_connection"), this.name = "StaleConnectionError";
|
|
1883
1917
|
}
|
|
1884
1918
|
}
|
|
1885
|
-
function
|
|
1919
|
+
function Wt(n) {
|
|
1886
1920
|
return n ? `{${Object.keys(n).sort().filter((t) => n[t] !== void 0).map((t) => {
|
|
1887
1921
|
let s = JSON.stringify(n[t]);
|
|
1888
1922
|
return `${JSON.stringify(t)}:${s}`;
|
|
1889
1923
|
}).join(",")}}` : "";
|
|
1890
1924
|
}
|
|
1891
|
-
class
|
|
1925
|
+
class vs {
|
|
1892
1926
|
constructor(e) {
|
|
1893
1927
|
this.channel = e, this.listeners = [];
|
|
1894
1928
|
}
|
|
@@ -1936,15 +1970,15 @@ class Is {
|
|
|
1936
1970
|
return e.records.reduce((t, { id: s, info: r }) => (t[s] = r, t), {});
|
|
1937
1971
|
}
|
|
1938
1972
|
}
|
|
1939
|
-
const
|
|
1940
|
-
class
|
|
1973
|
+
const z = Symbol("state");
|
|
1974
|
+
class Kt {
|
|
1941
1975
|
// Unique channel identifier
|
|
1942
1976
|
// static identifier = ''
|
|
1943
1977
|
constructor(e = {}) {
|
|
1944
|
-
this.emitter =
|
|
1978
|
+
this.emitter = Re(), this.params = Object.freeze(e), this.presence = new vs(this), this.initialConnect = !0, this[z] = "idle";
|
|
1945
1979
|
}
|
|
1946
1980
|
get identifier() {
|
|
1947
|
-
return this._identifier ? this._identifier : (this._identifier =
|
|
1981
|
+
return this._identifier ? this._identifier : (this._identifier = Wt({
|
|
1948
1982
|
channel: this.channelId,
|
|
1949
1983
|
...this.params
|
|
1950
1984
|
}), this._identifier);
|
|
@@ -1953,7 +1987,7 @@ class Mt {
|
|
|
1953
1987
|
return this.constructor.identifier;
|
|
1954
1988
|
}
|
|
1955
1989
|
get state() {
|
|
1956
|
-
return this[
|
|
1990
|
+
return this[z];
|
|
1957
1991
|
}
|
|
1958
1992
|
attached(e) {
|
|
1959
1993
|
if (this.receiver) {
|
|
@@ -1964,25 +1998,25 @@ class Mt {
|
|
|
1964
1998
|
return this.receiver = e, !0;
|
|
1965
1999
|
}
|
|
1966
2000
|
connecting() {
|
|
1967
|
-
this[
|
|
2001
|
+
this[z] = "connecting";
|
|
1968
2002
|
}
|
|
1969
2003
|
connected() {
|
|
1970
2004
|
if (this.state === "connected" || this.state === "closed") return;
|
|
1971
|
-
this[
|
|
2005
|
+
this[z] = "connected";
|
|
1972
2006
|
let e = !1;
|
|
1973
2007
|
this.initialConnect ? (this.initialConnect = !1, this.emit("connect", { reconnect: !1, restored: e })) : this.emit("connect", { reconnect: !0, restored: e });
|
|
1974
2008
|
}
|
|
1975
2009
|
restored() {
|
|
1976
2010
|
if (this.state === "connected") throw Error("Already connected");
|
|
1977
|
-
this[
|
|
2011
|
+
this[z] = "connected";
|
|
1978
2012
|
let e = !0, t = !0;
|
|
1979
2013
|
this.initialConnect = !1, this.emit("connect", { reconnect: t, restored: e });
|
|
1980
2014
|
}
|
|
1981
2015
|
disconnected(e) {
|
|
1982
|
-
this.state === "disconnected" || this.state === "closed" || (this[
|
|
2016
|
+
this.state === "disconnected" || this.state === "closed" || (this[z] = "disconnected", this.presence.reset(), this.emit("disconnect", e));
|
|
1983
2017
|
}
|
|
1984
2018
|
closed(e) {
|
|
1985
|
-
this.state !== "closed" && (this[
|
|
2019
|
+
this.state !== "closed" && (this[z] = "closed", delete this.receiver, this.initialConnect = !0, this.presence.dispose(), this.emit("close", e));
|
|
1986
2020
|
}
|
|
1987
2021
|
disconnect() {
|
|
1988
2022
|
this.state === "idle" || this.state === "closed" || this.receiver.unsubscribe(this);
|
|
@@ -2034,7 +2068,7 @@ class Mt {
|
|
|
2034
2068
|
), s.push(
|
|
2035
2069
|
this.on("close", (r) => {
|
|
2036
2070
|
s.forEach((i) => i()), t(
|
|
2037
|
-
r || new
|
|
2071
|
+
r || new le(
|
|
2038
2072
|
"Channel was disconnected before subscribing",
|
|
2039
2073
|
"canceled"
|
|
2040
2074
|
)
|
|
@@ -2044,7 +2078,7 @@ class Mt {
|
|
|
2044
2078
|
}), this._pendingSubscribe);
|
|
2045
2079
|
}
|
|
2046
2080
|
}
|
|
2047
|
-
class
|
|
2081
|
+
class $s {
|
|
2048
2082
|
constructor(e) {
|
|
2049
2083
|
this.id = e, this.intent = "unsubscribed", this.state = "idle", this.channels = [], this.disposed = !1, this._pendings = [];
|
|
2050
2084
|
}
|
|
@@ -2104,7 +2138,7 @@ class Ls {
|
|
|
2104
2138
|
return !t || t.acquired || t.intent !== e ? !1 : (this._pendings.pop(), t.canceled = !0, !0);
|
|
2105
2139
|
}
|
|
2106
2140
|
}
|
|
2107
|
-
class
|
|
2141
|
+
class Us {
|
|
2108
2142
|
constructor() {
|
|
2109
2143
|
this.queue = [];
|
|
2110
2144
|
}
|
|
@@ -2116,9 +2150,9 @@ class js {
|
|
|
2116
2150
|
), this.queue.length > 1 && await this.queue[this.queue.length - 2]);
|
|
2117
2151
|
}
|
|
2118
2152
|
}
|
|
2119
|
-
class
|
|
2153
|
+
class Ds {
|
|
2120
2154
|
constructor(e) {
|
|
2121
|
-
e.concurrentSubscribes === !1 && (this.glv = new
|
|
2155
|
+
e.concurrentSubscribes === !1 && (this.glv = new Us()), this._subscriptions = {}, this._localToRemote = {};
|
|
2122
2156
|
}
|
|
2123
2157
|
all() {
|
|
2124
2158
|
return Object.values(this._subscriptions);
|
|
@@ -2127,7 +2161,7 @@ class vs {
|
|
|
2127
2161
|
return this._subscriptions[e];
|
|
2128
2162
|
}
|
|
2129
2163
|
create(e, { subscribe: t, unsubscribe: s }) {
|
|
2130
|
-
let r = this._subscriptions[e] = new
|
|
2164
|
+
let r = this._subscriptions[e] = new $s(e);
|
|
2131
2165
|
return r.remoteId = this._localToRemote[e], r.subscriber = t, r.unsubscriber = s, r.gvl = this.glv, r;
|
|
2132
2166
|
}
|
|
2133
2167
|
remove(e) {
|
|
@@ -2139,9 +2173,9 @@ class vs {
|
|
|
2139
2173
|
s && (s.remoteId = t);
|
|
2140
2174
|
}
|
|
2141
2175
|
}
|
|
2142
|
-
class
|
|
2176
|
+
class qs {
|
|
2143
2177
|
constructor(e = {}) {
|
|
2144
|
-
this.subscriptions = new
|
|
2178
|
+
this.subscriptions = new Ds(e), this._pendingMessages = [], this._remoteToLocal = {};
|
|
2145
2179
|
}
|
|
2146
2180
|
subscribe(e, t) {
|
|
2147
2181
|
this._remoteToLocal[t] = e, this.subscriptions.storeRemoteId(e, t), this.flush(t);
|
|
@@ -2186,18 +2220,18 @@ class $s {
|
|
|
2186
2220
|
this._pendingMessages = t;
|
|
2187
2221
|
}
|
|
2188
2222
|
}
|
|
2189
|
-
const
|
|
2223
|
+
const ft = {
|
|
2190
2224
|
debug: 0,
|
|
2191
2225
|
info: 1,
|
|
2192
2226
|
warn: 2,
|
|
2193
2227
|
error: 3
|
|
2194
2228
|
};
|
|
2195
|
-
class
|
|
2229
|
+
class Xt {
|
|
2196
2230
|
constructor(e) {
|
|
2197
2231
|
this.level = e || "warn";
|
|
2198
2232
|
}
|
|
2199
2233
|
log(e, t, s) {
|
|
2200
|
-
|
|
2234
|
+
ft[e] < ft[this.level] || this.writeLogEntry(e, t, s);
|
|
2201
2235
|
}
|
|
2202
2236
|
writeLogEntry() {
|
|
2203
2237
|
throw Error("Not implemented");
|
|
@@ -2215,11 +2249,11 @@ class Ht {
|
|
|
2215
2249
|
this.log("error", e, t);
|
|
2216
2250
|
}
|
|
2217
2251
|
}
|
|
2218
|
-
class
|
|
2252
|
+
class ue extends Xt {
|
|
2219
2253
|
writeLogEntry() {
|
|
2220
2254
|
}
|
|
2221
2255
|
}
|
|
2222
|
-
class
|
|
2256
|
+
class Bs {
|
|
2223
2257
|
encode(e) {
|
|
2224
2258
|
return JSON.stringify(e);
|
|
2225
2259
|
}
|
|
@@ -2230,11 +2264,11 @@ class Fs {
|
|
|
2230
2264
|
}
|
|
2231
2265
|
}
|
|
2232
2266
|
}
|
|
2233
|
-
let
|
|
2234
|
-
class
|
|
2267
|
+
let Ms = 0;
|
|
2268
|
+
class Gt {
|
|
2235
2269
|
constructor(e = {}) {
|
|
2236
2270
|
let { logger: t } = e;
|
|
2237
|
-
this.logger = t || new
|
|
2271
|
+
this.logger = t || new ue(), this.pendingSubscriptions = {}, this.pendingUnsubscriptions = {}, this.subscribeCooldownInterval = e.subscribeCooldownInterval || 250, this.subscribeRetryInterval = e.subscribeRetryInterval || 5e3;
|
|
2238
2272
|
}
|
|
2239
2273
|
attached(e) {
|
|
2240
2274
|
this.cable = e;
|
|
@@ -2242,7 +2276,7 @@ class zt {
|
|
|
2242
2276
|
subscribe(e, t) {
|
|
2243
2277
|
let s = { channel: e };
|
|
2244
2278
|
t && Object.assign(s, t);
|
|
2245
|
-
let r =
|
|
2279
|
+
let r = Wt(s);
|
|
2246
2280
|
if (this.pendingUnsubscriptions[r]) {
|
|
2247
2281
|
let o = this.subscribeCooldownInterval * 1.5;
|
|
2248
2282
|
return this.logger.debug(
|
|
@@ -2258,7 +2292,7 @@ class zt {
|
|
|
2258
2292
|
return this.logger.warn("subscription is already pending, skipping", r), Promise.reject(Error("Already subscribing"));
|
|
2259
2293
|
let i = this.subscribeRetryInterval;
|
|
2260
2294
|
return new Promise((o, c) => {
|
|
2261
|
-
let h = ++
|
|
2295
|
+
let h = ++Ms;
|
|
2262
2296
|
this.pendingSubscriptions[r] = {
|
|
2263
2297
|
resolve: o,
|
|
2264
2298
|
reject: c,
|
|
@@ -2285,7 +2319,7 @@ class zt {
|
|
|
2285
2319
|
setTimeout(() => {
|
|
2286
2320
|
let r = this.pendingSubscriptions[t];
|
|
2287
2321
|
r && r.id === e && (delete this.pendingSubscriptions[t], r.reject(
|
|
2288
|
-
new
|
|
2322
|
+
new js(
|
|
2289
2323
|
`Haven't received subscription ack in ${s * 2}ms for ${t}`
|
|
2290
2324
|
)
|
|
2291
2325
|
));
|
|
@@ -2326,7 +2360,7 @@ class zt {
|
|
|
2326
2360
|
return c && this.cable.setSessionId(c), this.cable.connected();
|
|
2327
2361
|
}
|
|
2328
2362
|
if (t === "disconnect") {
|
|
2329
|
-
let c = new
|
|
2363
|
+
let c = new U(i);
|
|
2330
2364
|
this.reset(c), o === !1 ? this.cable.closed(c) : this.cable.disconnected(c);
|
|
2331
2365
|
return;
|
|
2332
2366
|
}
|
|
@@ -2343,7 +2377,7 @@ class zt {
|
|
|
2343
2377
|
}
|
|
2344
2378
|
if (t === "reject_subscription") {
|
|
2345
2379
|
let c = this.pendingSubscriptions[s];
|
|
2346
|
-
return c ? (delete this.pendingSubscriptions[s], c.reject(new
|
|
2380
|
+
return c ? (delete this.pendingSubscriptions[s], c.reject(new ze())) : this.logger.error("subscription not found", { type: t, identifier: s });
|
|
2347
2381
|
}
|
|
2348
2382
|
if (r)
|
|
2349
2383
|
return { identifier: s, message: r };
|
|
@@ -2358,10 +2392,10 @@ class zt {
|
|
|
2358
2392
|
return !1;
|
|
2359
2393
|
}
|
|
2360
2394
|
}
|
|
2361
|
-
const
|
|
2362
|
-
class
|
|
2395
|
+
const pt = () => Date.now() / 1e3 | 0;
|
|
2396
|
+
class Hs extends Gt {
|
|
2363
2397
|
constructor(e = {}) {
|
|
2364
|
-
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 =
|
|
2398
|
+
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 = pt()), this.sessionId = void 0, this.sendPongs = e.pongs;
|
|
2365
2399
|
}
|
|
2366
2400
|
reset(e) {
|
|
2367
2401
|
for (let t in this.pendingPresence)
|
|
@@ -2381,7 +2415,7 @@ class Ds extends zt {
|
|
|
2381
2415
|
if (t === "confirm_subscription")
|
|
2382
2416
|
return this.subscriptionStreams[s] || (this.subscriptionStreams[s] = /* @__PURE__ */ new Set()), super.receive(e);
|
|
2383
2417
|
if (t === "ping")
|
|
2384
|
-
return this.restoreSince && (this.restoreSince =
|
|
2418
|
+
return this.restoreSince && (this.restoreSince = pt()), this.sendPongs && this.sendPong(), this.cable.keepalive(e.message);
|
|
2385
2419
|
if (this.cable.keepalive(), t === "confirm_history") {
|
|
2386
2420
|
this.logger.debug("history result received", e), this.cable.notify("history_received", s);
|
|
2387
2421
|
return;
|
|
@@ -2502,12 +2536,12 @@ class Ds extends zt {
|
|
|
2502
2536
|
});
|
|
2503
2537
|
}
|
|
2504
2538
|
}
|
|
2505
|
-
class
|
|
2539
|
+
class zs extends le {
|
|
2506
2540
|
constructor() {
|
|
2507
2541
|
super("No connection", "closed"), this.name = "NoConnectionError";
|
|
2508
2542
|
}
|
|
2509
2543
|
}
|
|
2510
|
-
class
|
|
2544
|
+
class Ve extends Kt {
|
|
2511
2545
|
constructor(e, t) {
|
|
2512
2546
|
super(t), this.channelId = e;
|
|
2513
2547
|
}
|
|
@@ -2518,18 +2552,18 @@ class He extends Mt {
|
|
|
2518
2552
|
return this._channelId;
|
|
2519
2553
|
}
|
|
2520
2554
|
}
|
|
2521
|
-
|
|
2522
|
-
const
|
|
2523
|
-
class
|
|
2555
|
+
$(Ve, "identifier", "__ghost__");
|
|
2556
|
+
const Vs = "$pubsub";
|
|
2557
|
+
class Ue extends Kt {
|
|
2524
2558
|
async perform(e, t) {
|
|
2525
2559
|
if (e.startsWith("$"))
|
|
2526
2560
|
return super.perform(e, t);
|
|
2527
2561
|
throw Error("not implemented");
|
|
2528
2562
|
}
|
|
2529
2563
|
}
|
|
2530
|
-
|
|
2531
|
-
const
|
|
2532
|
-
let
|
|
2564
|
+
$(Ue, "identifier", Vs);
|
|
2565
|
+
const V = Symbol("state");
|
|
2566
|
+
let Js = class {
|
|
2533
2567
|
constructor({
|
|
2534
2568
|
transport: e,
|
|
2535
2569
|
protocol: t,
|
|
@@ -2540,18 +2574,18 @@ let Ms = class {
|
|
|
2540
2574
|
performFailures: c,
|
|
2541
2575
|
transportConfigurator: h
|
|
2542
2576
|
}) {
|
|
2543
|
-
this.emitter =
|
|
2577
|
+
this.emitter = Re(), this.transport = e, this.encoder = s, this.logger = r || new ue(), this.protocol = t, this.performFailures = c || "throw", this.protocol.attached(this), this.hub = new qs(o || {}), this[V] = "idle", this.handleClose = this.handleClose.bind(this), this.handleIncoming = this.handleIncoming.bind(this), this.transportConfigurator = h, this.transport.on("close", this.handleClose), this.transport.on("data", this.handleIncoming), this.initialConnect = !0, this.recovering = !1, i === !1 && this.connect().catch(() => {
|
|
2544
2578
|
});
|
|
2545
2579
|
}
|
|
2546
2580
|
get state() {
|
|
2547
|
-
return this[
|
|
2581
|
+
return this[V];
|
|
2548
2582
|
}
|
|
2549
2583
|
async connect() {
|
|
2550
2584
|
if (this.state === "connected") return Promise.resolve();
|
|
2551
2585
|
if (this.state === "connecting")
|
|
2552
2586
|
return this.pendingConnect();
|
|
2553
2587
|
let e = this.state === "idle";
|
|
2554
|
-
this[
|
|
2588
|
+
this[V] = "connecting";
|
|
2555
2589
|
let t = this.pendingConnect();
|
|
2556
2590
|
this.logger.debug("connecting");
|
|
2557
2591
|
try {
|
|
@@ -2568,20 +2602,20 @@ let Ms = class {
|
|
|
2568
2602
|
}
|
|
2569
2603
|
connected() {
|
|
2570
2604
|
if (this.state === "connected") return;
|
|
2571
|
-
this.logger.info("connected"), this[
|
|
2605
|
+
this.logger.info("connected"), this[V] = "connected", this.recovering && this.hub.subscriptions.all().forEach(
|
|
2572
2606
|
(t) => t.notify(
|
|
2573
2607
|
"disconnected",
|
|
2574
|
-
new
|
|
2608
|
+
new U("recovery_failed")
|
|
2575
2609
|
)
|
|
2576
2610
|
), this.hub.subscriptions.all().forEach((t) => this._resubscribe(t));
|
|
2577
2611
|
let e = !1;
|
|
2578
2612
|
this.recovering = !1, this.initialConnect ? (this.initialConnect = !1, this.emit("connect", { reconnect: !1, restored: e })) : this.emit("connect", { reconnect: !0, restored: e });
|
|
2579
2613
|
}
|
|
2580
2614
|
restored(e) {
|
|
2581
|
-
this.logger.info("connection recovered", { remoteIds: e }), this[
|
|
2615
|
+
this.logger.info("connection recovered", { remoteIds: e }), this[V] = "connected", this.hub.subscriptions.all().forEach((r) => {
|
|
2582
2616
|
e && r.remoteId && e.includes(r.remoteId) ? r.notify("restored") : (r.notify(
|
|
2583
2617
|
"disconnected",
|
|
2584
|
-
new
|
|
2618
|
+
new U("recovery_failed")
|
|
2585
2619
|
), this._resubscribe(r));
|
|
2586
2620
|
});
|
|
2587
2621
|
let t = !this.initialConnect, s = !0;
|
|
@@ -2591,18 +2625,18 @@ let Ms = class {
|
|
|
2591
2625
|
t && typeof t != "string" && (s = t, t = void 0), t ? this.hub.notify(t, "info", { type: e, data: s }) : this.emit("info", { type: e, data: s });
|
|
2592
2626
|
}
|
|
2593
2627
|
handleClose(e) {
|
|
2594
|
-
this.logger.debug("transport closed", { error: e }), this.disconnected(new
|
|
2628
|
+
this.logger.debug("transport closed", { error: e }), this.disconnected(new U(e, "transport_closed"));
|
|
2595
2629
|
}
|
|
2596
2630
|
disconnected(e) {
|
|
2597
|
-
(this.state === "connected" || this.state === "connecting") && (this.logger.info("disconnected", { reason: e }), this[
|
|
2631
|
+
(this.state === "connected" || this.state === "connecting") && (this.logger.info("disconnected", { reason: e }), this[V] = "disconnected", this.recovering = this.protocol.recoverableClosure(e), this.recovering ? this.hub.subscriptions.all().forEach((t) => t.notify("connecting")) : this.hub.subscriptions.all().forEach((t) => {
|
|
2598
2632
|
t.notify("disconnected", e);
|
|
2599
2633
|
}), this.protocol.reset(e), this.hub.close(), this.transport.close(), this.emit("disconnect", e));
|
|
2600
2634
|
}
|
|
2601
2635
|
closed(e) {
|
|
2602
2636
|
if (this.state === "closed" || this.state === "idle") return;
|
|
2603
2637
|
let t;
|
|
2604
|
-
e && (t = e instanceof
|
|
2605
|
-
let s = t || new
|
|
2638
|
+
e && (t = e instanceof U ? e : new U(e, void 0)), this.logger.info("closed", { reason: e || "user" }), this[V] = "closed";
|
|
2639
|
+
let s = t || new U("cable_closed");
|
|
2606
2640
|
this.hub.subscriptions.all().forEach((r) => r.notify("disconnected", s)), this.hub.close(), this.protocol.reset(), this.transport.close(), this.initialConnect = !0, this.emit("close", t);
|
|
2607
2641
|
}
|
|
2608
2642
|
disconnect() {
|
|
@@ -2638,16 +2672,16 @@ let Ms = class {
|
|
|
2638
2672
|
this.emit("keepalive", e);
|
|
2639
2673
|
}
|
|
2640
2674
|
streamFrom(e) {
|
|
2641
|
-
let t = new
|
|
2675
|
+
let t = new Ue({ stream_name: e });
|
|
2642
2676
|
return this.subscribe(t);
|
|
2643
2677
|
}
|
|
2644
2678
|
streamFromSigned(e) {
|
|
2645
|
-
let t = new
|
|
2679
|
+
let t = new Ue({ signed_stream_name: e });
|
|
2646
2680
|
return this.subscribe(t);
|
|
2647
2681
|
}
|
|
2648
2682
|
subscribeTo(e, t) {
|
|
2649
2683
|
let s, r;
|
|
2650
|
-
return typeof e == "string" && (r = e, e =
|
|
2684
|
+
return typeof e == "string" && (r = e, e = Ve), s = r ? new e(r, t) : new e(t), this.subscribe(s);
|
|
2651
2685
|
}
|
|
2652
2686
|
subscribe(e) {
|
|
2653
2687
|
if (!e.attached(this)) return e;
|
|
@@ -2699,7 +2733,7 @@ let Ms = class {
|
|
|
2699
2733
|
this.hub.subscribe(r, c), this.logger.debug("subscribed", { ...o, remoteId: c }), e.notify("connected");
|
|
2700
2734
|
} catch (c) {
|
|
2701
2735
|
if (c) {
|
|
2702
|
-
if (c instanceof
|
|
2736
|
+
if (c instanceof ze && this.logger.warn("rejected", o), c instanceof U) {
|
|
2703
2737
|
this.logger.debug(
|
|
2704
2738
|
"disconnected during subscription; will retry on connect",
|
|
2705
2739
|
o
|
|
@@ -2753,7 +2787,7 @@ let Ms = class {
|
|
|
2753
2787
|
try {
|
|
2754
2788
|
await this.protocol.unsubscribe(r), this.logger.debug("unsubscribed remotely", { id: t });
|
|
2755
2789
|
} catch (i) {
|
|
2756
|
-
i && (i instanceof
|
|
2790
|
+
i && (i instanceof U ? this.logger.debug(
|
|
2757
2791
|
"cable disconnected during the unsubscribe command execution",
|
|
2758
2792
|
{ id: t, error: i }
|
|
2759
2793
|
) : this.logger.error("unsubscribe failed", {
|
|
@@ -2775,7 +2809,7 @@ let Ms = class {
|
|
|
2775
2809
|
}
|
|
2776
2810
|
async _perform(e, t, s) {
|
|
2777
2811
|
if (this.state === "connecting" && await this.pendingConnect(), this.state === "closed" || this.state === "disconnected")
|
|
2778
|
-
throw new
|
|
2812
|
+
throw new zs();
|
|
2779
2813
|
let r = this.hub.subscriptions.get(e);
|
|
2780
2814
|
if (!r)
|
|
2781
2815
|
throw Error(`Subscription not found: ${e}`);
|
|
@@ -2831,10 +2865,10 @@ let Ms = class {
|
|
|
2831
2865
|
}), this._pendingConnect);
|
|
2832
2866
|
}
|
|
2833
2867
|
};
|
|
2834
|
-
const
|
|
2868
|
+
const Ws = {
|
|
2835
2869
|
maxMissingPings: 2,
|
|
2836
2870
|
maxReconnectAttempts: 1 / 0
|
|
2837
|
-
},
|
|
2871
|
+
}, Z = () => Date.now(), Qt = (n, e) => {
|
|
2838
2872
|
e = e || {};
|
|
2839
2873
|
let { backoffRate: t, jitterRatio: s, maxInterval: r } = e;
|
|
2840
2874
|
return t = t || 2, s === void 0 && (s = 0.5), (i) => {
|
|
@@ -2842,13 +2876,13 @@ const Hs = {
|
|
|
2842
2876
|
return h = h * (1 + u), r && r < h && (h = r), h;
|
|
2843
2877
|
};
|
|
2844
2878
|
};
|
|
2845
|
-
let
|
|
2879
|
+
let Zt = class {
|
|
2846
2880
|
constructor({ pingInterval: e, ...t }) {
|
|
2847
2881
|
if (this.pingInterval = e, !this.pingInterval)
|
|
2848
2882
|
throw Error(`Incorrect pingInterval is provided: ${e}`);
|
|
2849
|
-
if (t = Object.assign({},
|
|
2883
|
+
if (t = Object.assign({}, Ws, t), this.strategy = t.reconnectStrategy, !this.strategy)
|
|
2850
2884
|
throw Error("Reconnect strategy must be provided");
|
|
2851
|
-
this.maxMissingPings = t.maxMissingPings, this.maxReconnectAttempts = t.maxReconnectAttempts, this.logger = t.logger || new
|
|
2885
|
+
this.maxMissingPings = t.maxMissingPings, this.maxReconnectAttempts = t.maxReconnectAttempts, this.logger = t.logger || new ue(), this.state = "pending_connect", this.attempts = 0, this.disconnectedAt = Z();
|
|
2852
2886
|
}
|
|
2853
2887
|
watch(e) {
|
|
2854
2888
|
this.target = e, this.initListeners();
|
|
@@ -2861,19 +2895,19 @@ let Jt = class {
|
|
|
2861
2895
|
initListeners() {
|
|
2862
2896
|
this.unbind = [], this.unbind.push(
|
|
2863
2897
|
this.target.on("connect", () => {
|
|
2864
|
-
this.attempts = 0, this.pingedAt =
|
|
2898
|
+
this.attempts = 0, this.pingedAt = Z(), this.state = "connected", this.cancelReconnect(), this.startPolling();
|
|
2865
2899
|
})
|
|
2866
2900
|
), this.unbind.push(
|
|
2867
2901
|
this.target.on("disconnect", () => {
|
|
2868
|
-
this.disconnectedAt =
|
|
2902
|
+
this.disconnectedAt = Z(), this.state = "disconnected", this.stopPolling(), this.scheduleReconnect();
|
|
2869
2903
|
})
|
|
2870
2904
|
), this.unbind.push(
|
|
2871
2905
|
this.target.on("close", () => {
|
|
2872
|
-
this.disconnectedAt =
|
|
2906
|
+
this.disconnectedAt = Z(), this.state = "closed", this.cancelReconnect(), this.stopPolling();
|
|
2873
2907
|
})
|
|
2874
2908
|
), this.unbind.push(
|
|
2875
2909
|
this.target.on("keepalive", () => {
|
|
2876
|
-
this.pingedAt =
|
|
2910
|
+
this.pingedAt = Z();
|
|
2877
2911
|
})
|
|
2878
2912
|
), this.unbind.push(() => {
|
|
2879
2913
|
this.cancelReconnect(), this.stopPolling();
|
|
@@ -2893,8 +2927,8 @@ let Jt = class {
|
|
|
2893
2927
|
this.pollId && clearTimeout(this.pollId);
|
|
2894
2928
|
}
|
|
2895
2929
|
checkStale() {
|
|
2896
|
-
let e =
|
|
2897
|
-
e > this.maxMissingPings * this.pingInterval && (this.logger.warn(`Stale connection: ${e}ms without pings`), this.state = "pending_disconnect", this.target.disconnected(new
|
|
2930
|
+
let e = Z() - this.pingedAt;
|
|
2931
|
+
e > this.maxMissingPings * this.pingInterval && (this.logger.warn(`Stale connection: ${e}ms without pings`), this.state = "pending_disconnect", this.target.disconnected(new Fs()));
|
|
2898
2932
|
}
|
|
2899
2933
|
scheduleReconnect() {
|
|
2900
2934
|
if (this.attempts >= this.maxReconnectAttempts) {
|
|
@@ -2908,9 +2942,9 @@ let Jt = class {
|
|
|
2908
2942
|
this.reconnnectId && (clearTimeout(this.reconnnectId), delete this.reconnnectId);
|
|
2909
2943
|
}
|
|
2910
2944
|
};
|
|
2911
|
-
class
|
|
2945
|
+
class Ks {
|
|
2912
2946
|
constructor(e, t = {}) {
|
|
2913
|
-
this.transports = e, this.transport = null, this.emitter =
|
|
2947
|
+
this.transports = e, this.transport = null, this.emitter = Re(), this.unbind = [], this.logger = t.logger || new ue();
|
|
2914
2948
|
}
|
|
2915
2949
|
displayName() {
|
|
2916
2950
|
return "fallbacked transport";
|
|
@@ -2981,7 +3015,7 @@ class zs {
|
|
|
2981
3015
|
);
|
|
2982
3016
|
}
|
|
2983
3017
|
}
|
|
2984
|
-
class
|
|
3018
|
+
class Xs {
|
|
2985
3019
|
constructor(e, t = {}) {
|
|
2986
3020
|
this.url = e;
|
|
2987
3021
|
let s = t.websocketImplementation;
|
|
@@ -2991,7 +3025,7 @@ class Vs {
|
|
|
2991
3025
|
this.Impl = WebSocket;
|
|
2992
3026
|
else
|
|
2993
3027
|
throw new Error("No WebSocket support");
|
|
2994
|
-
this.connected = !1, this.emitter =
|
|
3028
|
+
this.connected = !1, this.emitter = Re();
|
|
2995
3029
|
let { format: r, subprotocol: i, authStrategy: o } = t;
|
|
2996
3030
|
this.format = r || "text", this.connectionOptions = t.websocketOptions, this.authStrategy = o || "param", this.authProtocol = "", this.subprotocol = i;
|
|
2997
3031
|
}
|
|
@@ -3069,7 +3103,7 @@ class Vs {
|
|
|
3069
3103
|
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");
|
|
3070
3104
|
}
|
|
3071
3105
|
}
|
|
3072
|
-
const
|
|
3106
|
+
const Yt = {
|
|
3073
3107
|
protocol: "actioncable-v1-json",
|
|
3074
3108
|
pingInterval: 3e3,
|
|
3075
3109
|
maxReconnectAttempts: 1 / 0,
|
|
@@ -3077,9 +3111,9 @@ const Wt = {
|
|
|
3077
3111
|
logLevel: "warn",
|
|
3078
3112
|
lazy: !0
|
|
3079
3113
|
};
|
|
3080
|
-
function
|
|
3114
|
+
function Gs(n, e) {
|
|
3081
3115
|
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");
|
|
3082
|
-
e = Object.assign({},
|
|
3116
|
+
e = Object.assign({}, Yt, e);
|
|
3083
3117
|
let {
|
|
3084
3118
|
protocol: t,
|
|
3085
3119
|
websocketImplementation: s,
|
|
@@ -3090,44 +3124,44 @@ function Js(n, e) {
|
|
|
3090
3124
|
logLevel: h,
|
|
3091
3125
|
logger: u,
|
|
3092
3126
|
transport: a,
|
|
3093
|
-
encoder:
|
|
3127
|
+
encoder: f,
|
|
3094
3128
|
lazy: g,
|
|
3095
3129
|
monitor: b,
|
|
3096
|
-
pingInterval:
|
|
3130
|
+
pingInterval: d,
|
|
3097
3131
|
reconnectStrategy: m,
|
|
3098
3132
|
maxMissingPings: p,
|
|
3099
3133
|
maxReconnectAttempts: _,
|
|
3100
|
-
subprotocol:
|
|
3101
|
-
tokenRefresher:
|
|
3102
|
-
historyTimestamp:
|
|
3103
|
-
protocolOptions:
|
|
3104
|
-
concurrentSubscribes:
|
|
3105
|
-
performFailures:
|
|
3106
|
-
transportConfigurator:
|
|
3107
|
-
auth:
|
|
3134
|
+
subprotocol: S,
|
|
3135
|
+
tokenRefresher: x,
|
|
3136
|
+
historyTimestamp: O,
|
|
3137
|
+
protocolOptions: C,
|
|
3138
|
+
concurrentSubscribes: F,
|
|
3139
|
+
performFailures: T,
|
|
3140
|
+
transportConfigurator: H,
|
|
3141
|
+
auth: v
|
|
3108
3142
|
} = e;
|
|
3109
|
-
if (u = u || new
|
|
3110
|
-
|
|
3111
|
-
let
|
|
3112
|
-
if (
|
|
3113
|
-
t = new
|
|
3114
|
-
else if (
|
|
3115
|
-
t = new
|
|
3143
|
+
if (u = u || new ue(h), typeof t == "string") {
|
|
3144
|
+
S = S || t;
|
|
3145
|
+
let j = t.substring(0, t.lastIndexOf("-")), A = t.substring(t.lastIndexOf("-") + 1);
|
|
3146
|
+
if (C = C || {}, j === "actioncable-v1")
|
|
3147
|
+
t = new Gt({ logger: u, ...C });
|
|
3148
|
+
else if (j === "actioncable-v1-ext")
|
|
3149
|
+
t = new Hs({
|
|
3116
3150
|
logger: u,
|
|
3117
|
-
historyTimestamp:
|
|
3118
|
-
...
|
|
3151
|
+
historyTimestamp: O,
|
|
3152
|
+
...C
|
|
3119
3153
|
});
|
|
3120
3154
|
else
|
|
3121
3155
|
throw Error(`Protocol is not supported yet: ${t}`);
|
|
3122
|
-
if (
|
|
3123
|
-
|
|
3124
|
-
else if (
|
|
3125
|
-
if (r = "binary", !
|
|
3156
|
+
if (A === "json")
|
|
3157
|
+
f = f || new Bs(), r = r || "text";
|
|
3158
|
+
else if (A === "msgpack") {
|
|
3159
|
+
if (r = "binary", !f)
|
|
3126
3160
|
throw Error(
|
|
3127
3161
|
"Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own"
|
|
3128
3162
|
);
|
|
3129
|
-
} else if (
|
|
3130
|
-
if (r = r || "binary", !
|
|
3163
|
+
} else if (A === "protobuf") {
|
|
3164
|
+
if (r = r || "binary", !f)
|
|
3131
3165
|
throw Error(
|
|
3132
3166
|
"Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own"
|
|
3133
3167
|
);
|
|
@@ -3135,40 +3169,40 @@ function Js(n, e) {
|
|
|
3135
3169
|
throw Error(`Protocol is not supported yet: ${t}`);
|
|
3136
3170
|
}
|
|
3137
3171
|
if (!t) throw Error("Protocol must be specified");
|
|
3138
|
-
a = a || new
|
|
3172
|
+
a = a || new Xs(n, {
|
|
3139
3173
|
websocketImplementation: s,
|
|
3140
3174
|
websocketOptions: i,
|
|
3141
|
-
subprotocol:
|
|
3175
|
+
subprotocol: S,
|
|
3142
3176
|
authStrategy: o,
|
|
3143
3177
|
format: r
|
|
3144
|
-
}), c && (a = new
|
|
3145
|
-
pingInterval:
|
|
3178
|
+
}), c && (a = new Ks([a, ...c], { logger: u })), v && v.token && a.setToken(v.token, v.param || "jid"), m = m || Qt(d), b !== !1 && (b = b || new Zt({
|
|
3179
|
+
pingInterval: d,
|
|
3146
3180
|
reconnectStrategy: m,
|
|
3147
3181
|
maxMissingPings: p,
|
|
3148
3182
|
maxReconnectAttempts: _,
|
|
3149
3183
|
logger: u
|
|
3150
3184
|
}));
|
|
3151
|
-
let
|
|
3185
|
+
let X = { concurrentSubscribes: F }, k = new Js({
|
|
3152
3186
|
protocol: t,
|
|
3153
3187
|
transport: a,
|
|
3154
|
-
encoder:
|
|
3188
|
+
encoder: f,
|
|
3155
3189
|
logger: u,
|
|
3156
3190
|
lazy: g,
|
|
3157
|
-
hubOptions:
|
|
3158
|
-
performFailures:
|
|
3159
|
-
transportConfigurator:
|
|
3191
|
+
hubOptions: X,
|
|
3192
|
+
performFailures: T,
|
|
3193
|
+
transportConfigurator: H
|
|
3160
3194
|
});
|
|
3161
|
-
return b && (b.watch(
|
|
3195
|
+
return b && (b.watch(k), k.monitor = b), x && Qs(k, async () => {
|
|
3162
3196
|
try {
|
|
3163
|
-
await
|
|
3164
|
-
} catch (
|
|
3165
|
-
return u.error("Failed to refresh authentication token: " +
|
|
3197
|
+
await x(a);
|
|
3198
|
+
} catch (j) {
|
|
3199
|
+
return u.error("Failed to refresh authentication token: " + j), !1;
|
|
3166
3200
|
}
|
|
3167
|
-
return
|
|
3201
|
+
return k.connect().catch(() => {
|
|
3168
3202
|
}), !0;
|
|
3169
|
-
}),
|
|
3203
|
+
}), k;
|
|
3170
3204
|
}
|
|
3171
|
-
function
|
|
3205
|
+
function Qs(n, e) {
|
|
3172
3206
|
let t = !1;
|
|
3173
3207
|
n.on("connect", () => t = !1), n.on("close", async (s) => {
|
|
3174
3208
|
if (s) {
|
|
@@ -3180,7 +3214,7 @@ function Ws(n, e) {
|
|
|
3180
3214
|
}
|
|
3181
3215
|
});
|
|
3182
3216
|
}
|
|
3183
|
-
class
|
|
3217
|
+
class Zs {
|
|
3184
3218
|
constructor(e) {
|
|
3185
3219
|
this.channel = e;
|
|
3186
3220
|
}
|
|
@@ -3200,44 +3234,44 @@ class Ks {
|
|
|
3200
3234
|
return this.channel.disconnect();
|
|
3201
3235
|
}
|
|
3202
3236
|
}
|
|
3203
|
-
class
|
|
3237
|
+
class Ys extends Ve {
|
|
3204
3238
|
constructor(e, t, s) {
|
|
3205
|
-
super(e, t), this.subscription = new
|
|
3239
|
+
super(e, t), this.subscription = new Zs(this), Object.assign(this.subscription, s), this.on(
|
|
3206
3240
|
"connect",
|
|
3207
3241
|
({ reconnect: r }) => this.subscription.notify("connected", { reconnected: r })
|
|
3208
3242
|
), this.on(
|
|
3209
3243
|
"disconnect",
|
|
3210
3244
|
() => this.subscription.notify("disconnected", { allowReconnect: !0 })
|
|
3211
3245
|
), this.on("message", (r) => this.subscription.notify("received", r)), this.on("close", (r) => {
|
|
3212
|
-
r && r instanceof
|
|
3246
|
+
r && r instanceof ze ? this.subscription.notify("rejected") : this.subscription.notify("disconnected", { allowReconnect: !1 });
|
|
3213
3247
|
});
|
|
3214
3248
|
}
|
|
3215
3249
|
}
|
|
3216
|
-
class
|
|
3250
|
+
class er {
|
|
3217
3251
|
constructor(e) {
|
|
3218
3252
|
this.cable = e;
|
|
3219
3253
|
}
|
|
3220
3254
|
create(e, t) {
|
|
3221
3255
|
let s, r;
|
|
3222
3256
|
typeof e == "object" ? (s = e.channel, delete e.channel, r = e) : (s = e, r = {});
|
|
3223
|
-
let i = new
|
|
3257
|
+
let i = new Ys(s, r, t);
|
|
3224
3258
|
return i.subscription.notify("initialized"), this.cable.subscribe(i), i.subscription;
|
|
3225
3259
|
}
|
|
3226
3260
|
findAll(e) {
|
|
3227
3261
|
return this.cable.hub.channels.filter((t) => t.identifier === e).map((t) => t.subscription);
|
|
3228
3262
|
}
|
|
3229
3263
|
}
|
|
3230
|
-
class
|
|
3264
|
+
class tr {
|
|
3231
3265
|
constructor(e) {
|
|
3232
|
-
this.cable = e, this.subscriptions = new
|
|
3266
|
+
this.cable = e, this.subscriptions = new er(e);
|
|
3233
3267
|
}
|
|
3234
3268
|
}
|
|
3235
|
-
class
|
|
3269
|
+
class nr extends Xt {
|
|
3236
3270
|
writeLogEntry(e, t, s) {
|
|
3237
3271
|
s ? console[e](t, s) : console[e](t);
|
|
3238
3272
|
}
|
|
3239
3273
|
}
|
|
3240
|
-
class
|
|
3274
|
+
class sr extends Zt {
|
|
3241
3275
|
watch(e) {
|
|
3242
3276
|
super.watch(e), this.initActivityListeners();
|
|
3243
3277
|
}
|
|
@@ -3247,7 +3281,7 @@ class Ys extends Jt {
|
|
|
3247
3281
|
document.hidden || this.reconnectNow() && this.logger.debug("Trigger reconnect due to visibility change");
|
|
3248
3282
|
}, t = (r) => {
|
|
3249
3283
|
this.reconnectNow() && this.logger.debug("Trigger reconnect", { event: r });
|
|
3250
|
-
}, s = () => this.disconnect(new
|
|
3284
|
+
}, s = () => this.disconnect(new U("page_frozen"));
|
|
3251
3285
|
document.addEventListener("visibilitychange", e, !1), window.addEventListener("focus", t, !1), window.addEventListener("online", t, !1), window.addEventListener("resume", t, !1), window.addEventListener("freeze", s, !1), this.unbind.push(() => {
|
|
3252
3286
|
document.removeEventListener("visibilitychange", e, !1), window.removeEventListener("focus", t, !1), window.removeEventListener("online", t, !1), window.removeEventListener("resume", t, !1), window.removeEventListener("freeze", s, !1);
|
|
3253
3287
|
});
|
|
@@ -3257,40 +3291,40 @@ class Ys extends Jt {
|
|
|
3257
3291
|
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));
|
|
3258
3292
|
}
|
|
3259
3293
|
}
|
|
3260
|
-
const
|
|
3261
|
-
for (let t of
|
|
3294
|
+
const rr = ["cable", "action-cable"], ir = "/cable", Oe = (n, e) => {
|
|
3295
|
+
for (let t of rr) {
|
|
3262
3296
|
let s = n.head.querySelector(`meta[name='${t}-${e}']`);
|
|
3263
3297
|
if (s)
|
|
3264
3298
|
return s.getAttribute("content");
|
|
3265
3299
|
}
|
|
3266
|
-
},
|
|
3300
|
+
}, mt = (n) => n.match(/wss?:\/\//) ? n : typeof window < "u" ? `${window.location.protocol.replace("http", "ws")}//${window.location.host}${n}` : n, or = () => {
|
|
3267
3301
|
if (typeof document < "u" && document.head) {
|
|
3268
|
-
let n =
|
|
3302
|
+
let n = Oe(document, "url");
|
|
3269
3303
|
if (n)
|
|
3270
|
-
return
|
|
3304
|
+
return mt(n);
|
|
3271
3305
|
}
|
|
3272
|
-
return
|
|
3273
|
-
},
|
|
3306
|
+
return mt(ir);
|
|
3307
|
+
}, cr = () => {
|
|
3274
3308
|
if (typeof document < "u" && document.head) {
|
|
3275
|
-
let n =
|
|
3309
|
+
let n = Oe(document, "history-timestamp");
|
|
3276
3310
|
if (n)
|
|
3277
3311
|
return n | 0;
|
|
3278
3312
|
}
|
|
3279
|
-
},
|
|
3313
|
+
}, ar = () => {
|
|
3280
3314
|
if (typeof document < "u" && document.head)
|
|
3281
|
-
return
|
|
3282
|
-
},
|
|
3315
|
+
return Oe(document, "token");
|
|
3316
|
+
}, lr = () => {
|
|
3283
3317
|
if (typeof document < "u" && document.head)
|
|
3284
|
-
return
|
|
3318
|
+
return Oe(document, "token-param");
|
|
3285
3319
|
};
|
|
3286
|
-
function
|
|
3287
|
-
typeof n == "object" && typeof e > "u" && (e = n, n = void 0), n = n ||
|
|
3288
|
-
let t =
|
|
3320
|
+
function ur(n, e) {
|
|
3321
|
+
typeof n == "object" && typeof e > "u" && (e = n, n = void 0), n = n || or(), e = e || {}, e.historyTimestamp || (e.historyTimestamp = cr());
|
|
3322
|
+
let t = ar();
|
|
3289
3323
|
if (t) {
|
|
3290
|
-
let u =
|
|
3324
|
+
let u = lr();
|
|
3291
3325
|
e.auth = Object.assign({ token: t, param: u }, e.auth || {});
|
|
3292
3326
|
}
|
|
3293
|
-
e = Object.assign({},
|
|
3327
|
+
e = Object.assign({}, Yt, e);
|
|
3294
3328
|
let {
|
|
3295
3329
|
logLevel: s,
|
|
3296
3330
|
logger: r,
|
|
@@ -3299,19 +3333,19 @@ function or(n, e) {
|
|
|
3299
3333
|
maxMissingPings: c,
|
|
3300
3334
|
maxReconnectAttempts: h
|
|
3301
3335
|
} = e;
|
|
3302
|
-
return r = e.logger = e.logger || new
|
|
3336
|
+
return r = e.logger = e.logger || new nr(s), o = e.reconnectStrategy = e.reconnectStrategy || Qt(i), e.monitor !== !1 && (e.monitor = e.monitor || new sr({
|
|
3303
3337
|
pingInterval: i,
|
|
3304
3338
|
reconnectStrategy: o,
|
|
3305
3339
|
maxMissingPings: c,
|
|
3306
3340
|
maxReconnectAttempts: h,
|
|
3307
3341
|
logger: r
|
|
3308
|
-
})),
|
|
3342
|
+
})), Gs(n, e);
|
|
3309
3343
|
}
|
|
3310
|
-
function
|
|
3311
|
-
let t =
|
|
3312
|
-
return new
|
|
3344
|
+
function hr(n, e) {
|
|
3345
|
+
let t = ur(n, e);
|
|
3346
|
+
return new tr(t);
|
|
3313
3347
|
}
|
|
3314
|
-
class
|
|
3348
|
+
class pi {
|
|
3315
3349
|
constructor(e = "/openc3-api/cable") {
|
|
3316
3350
|
this._cable = null, this._url = e;
|
|
3317
3351
|
}
|
|
@@ -3322,8 +3356,8 @@ class ui {
|
|
|
3322
3356
|
return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(
|
|
3323
3357
|
(i) => {
|
|
3324
3358
|
if (i && OpenC3Auth.setTokens(), this._cable == null) {
|
|
3325
|
-
let o = this._url + "?scope=" + encodeURIComponent(
|
|
3326
|
-
o = new URL(o, document.baseURI).href, this._cable =
|
|
3359
|
+
let o = this._url + "?scope=" + encodeURIComponent(t) + "&authorization=" + encodeURIComponent(localStorage.openc3Token);
|
|
3360
|
+
o = new URL(o, document.baseURI).href, this._cable = hr(o);
|
|
3327
3361
|
}
|
|
3328
3362
|
return this._cable.subscriptions.create(
|
|
3329
3363
|
{
|
|
@@ -3338,31 +3372,31 @@ class ui {
|
|
|
3338
3372
|
recordPing() {
|
|
3339
3373
|
}
|
|
3340
3374
|
}
|
|
3341
|
-
class
|
|
3375
|
+
class gt {
|
|
3342
3376
|
constructor(e, t, s = "", r = "") {
|
|
3343
3377
|
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 = s, this.url = r;
|
|
3344
3378
|
}
|
|
3345
3379
|
}
|
|
3346
|
-
class
|
|
3380
|
+
class mi {
|
|
3347
3381
|
constructor() {
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3382
|
+
$(this, "keyword", null);
|
|
3383
|
+
$(this, "parameters", []);
|
|
3384
|
+
$(this, "filename", "");
|
|
3385
|
+
$(this, "line", "");
|
|
3386
|
+
$(this, "lineNumber", 0);
|
|
3387
|
+
$(this, "url", "https://docs.openc3.com/docs/configuration");
|
|
3354
3388
|
}
|
|
3355
3389
|
verify_num_parameters(e, t, s = "") {
|
|
3356
3390
|
for (let r = 1; r <= e; r++)
|
|
3357
3391
|
if (this.parameters[r - 1] === void 0)
|
|
3358
|
-
throw new
|
|
3392
|
+
throw new gt(
|
|
3359
3393
|
this,
|
|
3360
3394
|
`Not enough parameters for ${this.keyword}.`,
|
|
3361
3395
|
s,
|
|
3362
3396
|
this.url
|
|
3363
3397
|
);
|
|
3364
3398
|
if (t && this.parameters[t] !== void 0)
|
|
3365
|
-
throw new
|
|
3399
|
+
throw new gt(
|
|
3366
3400
|
this,
|
|
3367
3401
|
`Too many parameters for ${this.keyword}.`,
|
|
3368
3402
|
s,
|
|
@@ -3402,8 +3436,8 @@ class hi {
|
|
|
3402
3436
|
continue;
|
|
3403
3437
|
a = a.substring(1, a.length);
|
|
3404
3438
|
}
|
|
3405
|
-
let
|
|
3406
|
-
switch (
|
|
3439
|
+
let f = a.charAt(a.length - 1), g = !1;
|
|
3440
|
+
switch (f) {
|
|
3407
3441
|
case "+":
|
|
3408
3442
|
g = !0;
|
|
3409
3443
|
// Deliberate fall through
|
|
@@ -3419,60 +3453,62 @@ class hi {
|
|
|
3419
3453
|
this.line += a;
|
|
3420
3454
|
}
|
|
3421
3455
|
o = !1;
|
|
3422
|
-
let b = /("([^\\"]|\\.)*")|('([^\\']|\\.)*')|\S+/g,
|
|
3423
|
-
if (
|
|
3456
|
+
let b = /("([^\\"]|\\.)*")|('([^\\']|\\.)*')|\S+/g, d = this.scan_string(this.line, b), m = "";
|
|
3457
|
+
if (d.length > 0 && (m = m + d[0]), m.length === 0 || m.charAt(0) === "#" ? this.keyword = null : this.keyword = m.toUpperCase(), this.parameters = [], this.keyword === null) {
|
|
3424
3458
|
s && i(this.keyword, this.parameters, this.line, this.lineNumber), this.line = "";
|
|
3425
3459
|
continue;
|
|
3426
3460
|
}
|
|
3427
|
-
let p =
|
|
3461
|
+
let p = d.length;
|
|
3428
3462
|
if (p > 1)
|
|
3429
3463
|
for (let _ = 1; _ < p; _++) {
|
|
3430
|
-
let
|
|
3431
|
-
if (
|
|
3464
|
+
let S = d[_];
|
|
3465
|
+
if (S.length > 0 && S.charAt(0) === "#")
|
|
3432
3466
|
break;
|
|
3433
|
-
r ? this.parameters.push(this.remove_quotes(
|
|
3467
|
+
r ? this.parameters.push(this.remove_quotes(S)) : this.parameters.push(S);
|
|
3434
3468
|
}
|
|
3435
3469
|
i(this.keyword, this.parameters, this.line, this.lineNumber), this.line = "";
|
|
3436
3470
|
}
|
|
3437
3471
|
}
|
|
3438
3472
|
// parse_string
|
|
3439
3473
|
}
|
|
3440
|
-
function
|
|
3441
|
-
return
|
|
3474
|
+
function re(n) {
|
|
3475
|
+
return dr.test(n);
|
|
3442
3476
|
}
|
|
3443
|
-
const
|
|
3444
|
-
function
|
|
3445
|
-
return
|
|
3477
|
+
const dr = /^-?[0-9]+$/;
|
|
3478
|
+
function en(n) {
|
|
3479
|
+
return fr.test(n);
|
|
3446
3480
|
}
|
|
3447
|
-
const
|
|
3448
|
-
function
|
|
3481
|
+
const fr = /^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
|
|
3482
|
+
function tn(n, e) {
|
|
3483
|
+
if (re(n))
|
|
3484
|
+
return Number.isSafeInteger(Number.parseInt(n, 10));
|
|
3449
3485
|
const t = Number.parseFloat(n), s = String(t);
|
|
3450
3486
|
if (n === s)
|
|
3451
3487
|
return !0;
|
|
3452
|
-
const r =
|
|
3453
|
-
return !!(r === i || (e == null ? void 0 : e.approx) === !0 && !
|
|
3488
|
+
const r = bt(n), i = bt(s);
|
|
3489
|
+
return !!(r === i || (e == null ? void 0 : e.approx) === !0 && !re(n) && i.length >= 14 && r.startsWith(i.substring(0, 14)));
|
|
3454
3490
|
}
|
|
3455
|
-
let
|
|
3491
|
+
let se = /* @__PURE__ */ (function(n) {
|
|
3456
3492
|
return n.underflow = "underflow", n.overflow = "overflow", n.truncate_integer = "truncate_integer", n.truncate_float = "truncate_float", n;
|
|
3457
|
-
}({});
|
|
3458
|
-
function
|
|
3459
|
-
if (
|
|
3493
|
+
})({});
|
|
3494
|
+
function pr(n) {
|
|
3495
|
+
if (tn(n, {
|
|
3460
3496
|
approx: !1
|
|
3461
3497
|
}))
|
|
3462
3498
|
return;
|
|
3463
|
-
if (
|
|
3464
|
-
return
|
|
3499
|
+
if (re(n))
|
|
3500
|
+
return se.truncate_integer;
|
|
3465
3501
|
const e = Number.parseFloat(n);
|
|
3466
|
-
return Number.isFinite(e) ? e === 0 ?
|
|
3502
|
+
return Number.isFinite(e) ? e === 0 ? se.underflow : se.truncate_float : se.overflow;
|
|
3467
3503
|
}
|
|
3468
|
-
function
|
|
3504
|
+
function bt(n) {
|
|
3469
3505
|
const {
|
|
3470
3506
|
start: e,
|
|
3471
3507
|
end: t
|
|
3472
|
-
} =
|
|
3508
|
+
} = mr(n), s = n.substring(e, t), r = s.indexOf(".");
|
|
3473
3509
|
return r === -1 ? s : s.substring(0, r) + s.substring(r + 1);
|
|
3474
3510
|
}
|
|
3475
|
-
function
|
|
3511
|
+
function mr(n) {
|
|
3476
3512
|
let e = 0;
|
|
3477
3513
|
for (n[0] === "-" && e++; n[e] === "0" || n[e] === "."; )
|
|
3478
3514
|
e++;
|
|
@@ -3484,12 +3520,12 @@ function hr(n) {
|
|
|
3484
3520
|
end: t
|
|
3485
3521
|
};
|
|
3486
3522
|
}
|
|
3487
|
-
class
|
|
3523
|
+
class gr {
|
|
3488
3524
|
constructor(e) {
|
|
3489
3525
|
// numeric value as string
|
|
3490
3526
|
// type information
|
|
3491
|
-
|
|
3492
|
-
if (!
|
|
3527
|
+
$(this, "isLosslessNumber", !0);
|
|
3528
|
+
if (!en(e))
|
|
3493
3529
|
throw new Error(`Invalid number (value: "${e}")`);
|
|
3494
3530
|
this.value = e;
|
|
3495
3531
|
}
|
|
@@ -3505,10 +3541,10 @@ class dr {
|
|
|
3505
3541
|
* and toSafeNumberOrThrow to convert it to a numeric value.
|
|
3506
3542
|
*/
|
|
3507
3543
|
valueOf() {
|
|
3508
|
-
const e =
|
|
3509
|
-
if (e === void 0 || e ===
|
|
3544
|
+
const e = pr(this.value);
|
|
3545
|
+
if (e === void 0 || e === se.truncate_float)
|
|
3510
3546
|
return Number.parseFloat(this.value);
|
|
3511
|
-
if (
|
|
3547
|
+
if (re(this.value))
|
|
3512
3548
|
return BigInt(this.value);
|
|
3513
3549
|
throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`);
|
|
3514
3550
|
}
|
|
@@ -3522,206 +3558,206 @@ class dr {
|
|
|
3522
3558
|
// or use that, it cannot safely turn the numeric value in the string into
|
|
3523
3559
|
// stringified JSON since it has to be parsed into a number first.
|
|
3524
3560
|
}
|
|
3525
|
-
function
|
|
3561
|
+
function br(n) {
|
|
3526
3562
|
return n && typeof n == "object" && n.isLosslessNumber || !1;
|
|
3527
3563
|
}
|
|
3528
|
-
function
|
|
3529
|
-
return new
|
|
3564
|
+
function yr(n) {
|
|
3565
|
+
return new gr(n);
|
|
3530
3566
|
}
|
|
3531
|
-
function
|
|
3532
|
-
return
|
|
3567
|
+
function wr(n, e) {
|
|
3568
|
+
return Je({
|
|
3533
3569
|
"": n
|
|
3534
3570
|
}, "", n, e);
|
|
3535
3571
|
}
|
|
3536
|
-
function
|
|
3537
|
-
return Array.isArray(t) ? s.call(n, e,
|
|
3572
|
+
function Je(n, e, t, s) {
|
|
3573
|
+
return Array.isArray(t) ? s.call(n, e, Er(t, s)) : t && typeof t == "object" && !br(t) ? s.call(n, e, _r(t, s)) : s.call(n, e, t);
|
|
3538
3574
|
}
|
|
3539
|
-
function
|
|
3575
|
+
function _r(n, e) {
|
|
3540
3576
|
for (const t of Object.keys(n)) {
|
|
3541
|
-
const s =
|
|
3577
|
+
const s = Je(n, t, n[t], e);
|
|
3542
3578
|
s !== void 0 ? n[t] = s : delete n[t];
|
|
3543
3579
|
}
|
|
3544
3580
|
return n;
|
|
3545
3581
|
}
|
|
3546
|
-
function
|
|
3582
|
+
function Er(n, e) {
|
|
3547
3583
|
for (let t = 0; t < n.length; t++)
|
|
3548
|
-
n[t] =
|
|
3584
|
+
n[t] = Je(n, String(t), n[t], e);
|
|
3549
3585
|
return n;
|
|
3550
3586
|
}
|
|
3551
|
-
function
|
|
3552
|
-
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
3587
|
+
function Sr(n, e) {
|
|
3588
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : yr, s = 0;
|
|
3553
3589
|
const r = c();
|
|
3554
|
-
return
|
|
3590
|
+
return d(r), p(), e ? wr(r, e) : r;
|
|
3555
3591
|
function i() {
|
|
3556
|
-
if (n.charCodeAt(s) ===
|
|
3592
|
+
if (n.charCodeAt(s) === Tr) {
|
|
3557
3593
|
s++, u();
|
|
3558
|
-
const
|
|
3559
|
-
let
|
|
3560
|
-
for (; s < n.length && n.charCodeAt(s) !==
|
|
3561
|
-
|
|
3562
|
-
const q = s,
|
|
3563
|
-
if (
|
|
3564
|
-
|
|
3594
|
+
const y = {};
|
|
3595
|
+
let E = !0;
|
|
3596
|
+
for (; s < n.length && n.charCodeAt(s) !== wt; ) {
|
|
3597
|
+
E ? E = !1 : (g(), u());
|
|
3598
|
+
const q = s, P = a();
|
|
3599
|
+
if (P === void 0) {
|
|
3600
|
+
x();
|
|
3565
3601
|
return;
|
|
3566
3602
|
}
|
|
3567
3603
|
u(), b();
|
|
3568
|
-
const
|
|
3569
|
-
if (
|
|
3570
|
-
|
|
3604
|
+
const G = c();
|
|
3605
|
+
if (G === void 0) {
|
|
3606
|
+
v();
|
|
3571
3607
|
return;
|
|
3572
3608
|
}
|
|
3573
|
-
Object.prototype.hasOwnProperty.call(
|
|
3609
|
+
Object.prototype.hasOwnProperty.call(y, P) && !De(G, y[P]) && O(P, q + 1), y[P] = G;
|
|
3574
3610
|
}
|
|
3575
|
-
return n.charCodeAt(s) !==
|
|
3611
|
+
return n.charCodeAt(s) !== wt && C(), s++, y;
|
|
3576
3612
|
}
|
|
3577
3613
|
}
|
|
3578
3614
|
function o() {
|
|
3579
|
-
if (n.charCodeAt(s) ===
|
|
3615
|
+
if (n.charCodeAt(s) === kr) {
|
|
3580
3616
|
s++, u();
|
|
3581
|
-
const
|
|
3582
|
-
let
|
|
3583
|
-
for (; s < n.length && n.charCodeAt(s) !==
|
|
3584
|
-
|
|
3617
|
+
const y = [];
|
|
3618
|
+
let E = !0;
|
|
3619
|
+
for (; s < n.length && n.charCodeAt(s) !== _t; ) {
|
|
3620
|
+
E ? E = !1 : g();
|
|
3585
3621
|
const q = c();
|
|
3586
|
-
m(q),
|
|
3622
|
+
m(q), y.push(q);
|
|
3587
3623
|
}
|
|
3588
|
-
return n.charCodeAt(s) !==
|
|
3624
|
+
return n.charCodeAt(s) !== _t && F(), s++, y;
|
|
3589
3625
|
}
|
|
3590
3626
|
}
|
|
3591
3627
|
function c() {
|
|
3592
3628
|
u();
|
|
3593
|
-
const
|
|
3594
|
-
return u(),
|
|
3629
|
+
const y = a() ?? f() ?? i() ?? o() ?? h("true", !0) ?? h("false", !1) ?? h("null", null);
|
|
3630
|
+
return u(), y;
|
|
3595
3631
|
}
|
|
3596
|
-
function h(
|
|
3597
|
-
if (n.slice(s, s +
|
|
3598
|
-
return s +=
|
|
3632
|
+
function h(y, E) {
|
|
3633
|
+
if (n.slice(s, s + y.length) === y)
|
|
3634
|
+
return s += y.length, E;
|
|
3599
3635
|
}
|
|
3600
3636
|
function u() {
|
|
3601
|
-
for (;
|
|
3637
|
+
for (; xr(n.charCodeAt(s)); )
|
|
3602
3638
|
s++;
|
|
3603
3639
|
}
|
|
3604
3640
|
function a() {
|
|
3605
|
-
if (n.charCodeAt(s) ===
|
|
3641
|
+
if (n.charCodeAt(s) === Pe) {
|
|
3606
3642
|
s++;
|
|
3607
|
-
let
|
|
3608
|
-
for (; s < n.length && n.charCodeAt(s) !==
|
|
3609
|
-
if (n.charCodeAt(s) ===
|
|
3610
|
-
const
|
|
3611
|
-
q !== void 0 ? (
|
|
3643
|
+
let y = "";
|
|
3644
|
+
for (; s < n.length && n.charCodeAt(s) !== Pe; ) {
|
|
3645
|
+
if (n.charCodeAt(s) === Cr) {
|
|
3646
|
+
const E = n[s + 1], q = Or[E];
|
|
3647
|
+
q !== void 0 ? (y += q, s++) : E === "u" ? pe(n.charCodeAt(s + 2)) && pe(n.charCodeAt(s + 3)) && pe(n.charCodeAt(s + 4)) && pe(n.charCodeAt(s + 5)) ? (y += String.fromCharCode(Number.parseInt(n.slice(s + 2, s + 6), 16)), s += 5) : X(s) : H(s);
|
|
3612
3648
|
} else
|
|
3613
|
-
|
|
3649
|
+
Rr(n.charCodeAt(s)) ? y += n[s] : T(n[s]);
|
|
3614
3650
|
s++;
|
|
3615
3651
|
}
|
|
3616
|
-
return
|
|
3652
|
+
return S(), s++, y;
|
|
3617
3653
|
}
|
|
3618
3654
|
}
|
|
3619
|
-
function
|
|
3620
|
-
const
|
|
3621
|
-
if (n.charCodeAt(s) ===
|
|
3655
|
+
function f() {
|
|
3656
|
+
const y = s;
|
|
3657
|
+
if (n.charCodeAt(s) === Et && (s++, _(y)), n.charCodeAt(s) === We)
|
|
3622
3658
|
s++;
|
|
3623
|
-
else if (
|
|
3624
|
-
for (s++;
|
|
3659
|
+
else if (Ar(n.charCodeAt(s)))
|
|
3660
|
+
for (s++; me(n.charCodeAt(s)); )
|
|
3625
3661
|
s++;
|
|
3626
|
-
if (n.charCodeAt(s) ===
|
|
3627
|
-
for (s++, _(
|
|
3662
|
+
if (n.charCodeAt(s) === $r)
|
|
3663
|
+
for (s++, _(y); me(n.charCodeAt(s)); )
|
|
3628
3664
|
s++;
|
|
3629
|
-
if (n.charCodeAt(s) ===
|
|
3630
|
-
for (s++, (n.charCodeAt(s) ===
|
|
3665
|
+
if (n.charCodeAt(s) === Mr || n.charCodeAt(s) === Br)
|
|
3666
|
+
for (s++, (n.charCodeAt(s) === Et || n.charCodeAt(s) === jr) && s++, _(y); me(n.charCodeAt(s)); )
|
|
3631
3667
|
s++;
|
|
3632
|
-
if (s >
|
|
3633
|
-
return t(n.slice(
|
|
3668
|
+
if (s > y)
|
|
3669
|
+
return t(n.slice(y, s));
|
|
3634
3670
|
}
|
|
3635
3671
|
function g() {
|
|
3636
|
-
if (n.charCodeAt(s) !==
|
|
3637
|
-
throw new SyntaxError(`Comma ',' expected after value ${
|
|
3672
|
+
if (n.charCodeAt(s) !== vr)
|
|
3673
|
+
throw new SyntaxError(`Comma ',' expected after value ${A()}`);
|
|
3638
3674
|
s++;
|
|
3639
3675
|
}
|
|
3640
3676
|
function b() {
|
|
3641
|
-
if (n.charCodeAt(s) !==
|
|
3642
|
-
throw new SyntaxError(`Colon ':' expected after property name ${
|
|
3677
|
+
if (n.charCodeAt(s) !== Ur)
|
|
3678
|
+
throw new SyntaxError(`Colon ':' expected after property name ${A()}`);
|
|
3643
3679
|
s++;
|
|
3644
3680
|
}
|
|
3645
|
-
function
|
|
3646
|
-
if (
|
|
3647
|
-
throw new SyntaxError(`JSON value expected ${
|
|
3681
|
+
function d(y) {
|
|
3682
|
+
if (y === void 0)
|
|
3683
|
+
throw new SyntaxError(`JSON value expected ${A()}`);
|
|
3648
3684
|
}
|
|
3649
|
-
function m(
|
|
3650
|
-
if (
|
|
3651
|
-
throw new SyntaxError(`Array item expected ${
|
|
3685
|
+
function m(y) {
|
|
3686
|
+
if (y === void 0)
|
|
3687
|
+
throw new SyntaxError(`Array item expected ${A()}`);
|
|
3652
3688
|
}
|
|
3653
3689
|
function p() {
|
|
3654
3690
|
if (s < n.length)
|
|
3655
|
-
throw new SyntaxError(`Expected end of input ${
|
|
3691
|
+
throw new SyntaxError(`Expected end of input ${A()}`);
|
|
3656
3692
|
}
|
|
3657
|
-
function _(
|
|
3658
|
-
if (!
|
|
3659
|
-
const
|
|
3660
|
-
throw new SyntaxError(`Invalid number '${
|
|
3693
|
+
function _(y) {
|
|
3694
|
+
if (!me(n.charCodeAt(s))) {
|
|
3695
|
+
const E = n.slice(y, s);
|
|
3696
|
+
throw new SyntaxError(`Invalid number '${E}', expecting a digit ${A()}`);
|
|
3661
3697
|
}
|
|
3662
3698
|
}
|
|
3663
|
-
function E() {
|
|
3664
|
-
if (n.charCodeAt(s) !== Te)
|
|
3665
|
-
throw new SyntaxError(`End of string '"' expected ${C()}`);
|
|
3666
|
-
}
|
|
3667
3699
|
function S() {
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
function N(w, A) {
|
|
3671
|
-
throw new SyntaxError(`Duplicate key '${w}' encountered at position ${A}`);
|
|
3700
|
+
if (n.charCodeAt(s) !== Pe)
|
|
3701
|
+
throw new SyntaxError(`End of string '"' expected ${A()}`);
|
|
3672
3702
|
}
|
|
3673
3703
|
function x() {
|
|
3674
|
-
throw new SyntaxError(`Quoted object key
|
|
3704
|
+
throw new SyntaxError(`Quoted object key expected ${A()}`);
|
|
3705
|
+
}
|
|
3706
|
+
function O(y, E) {
|
|
3707
|
+
throw new SyntaxError(`Duplicate key '${y}' encountered at position ${E}`);
|
|
3708
|
+
}
|
|
3709
|
+
function C() {
|
|
3710
|
+
throw new SyntaxError(`Quoted object key or end of object '}' expected ${A()}`);
|
|
3675
3711
|
}
|
|
3676
|
-
function
|
|
3677
|
-
throw new SyntaxError(`Array item or end of array ']' expected ${
|
|
3712
|
+
function F() {
|
|
3713
|
+
throw new SyntaxError(`Array item or end of array ']' expected ${A()}`);
|
|
3678
3714
|
}
|
|
3679
|
-
function
|
|
3680
|
-
throw new SyntaxError(`Invalid character '${
|
|
3715
|
+
function T(y) {
|
|
3716
|
+
throw new SyntaxError(`Invalid character '${y}' ${k()}`);
|
|
3681
3717
|
}
|
|
3682
|
-
function
|
|
3683
|
-
const
|
|
3684
|
-
throw new SyntaxError(`Invalid escape character '${
|
|
3718
|
+
function H(y) {
|
|
3719
|
+
const E = n.slice(y, y + 2);
|
|
3720
|
+
throw new SyntaxError(`Invalid escape character '${E}' ${k()}`);
|
|
3685
3721
|
}
|
|
3686
|
-
function
|
|
3687
|
-
throw new SyntaxError(`Object value expected after ':' ${
|
|
3722
|
+
function v() {
|
|
3723
|
+
throw new SyntaxError(`Object value expected after ':' ${k()}`);
|
|
3688
3724
|
}
|
|
3689
|
-
function
|
|
3690
|
-
const
|
|
3691
|
-
throw new SyntaxError(`Invalid unicode character '${
|
|
3725
|
+
function X(y) {
|
|
3726
|
+
const E = n.slice(y, y + 6);
|
|
3727
|
+
throw new SyntaxError(`Invalid unicode character '${E}' ${k()}`);
|
|
3692
3728
|
}
|
|
3693
|
-
function
|
|
3729
|
+
function k() {
|
|
3694
3730
|
return `at position ${s}`;
|
|
3695
3731
|
}
|
|
3696
|
-
function
|
|
3732
|
+
function j() {
|
|
3697
3733
|
return s < n.length ? `but got '${n[s]}'` : "but reached end of input";
|
|
3698
3734
|
}
|
|
3699
|
-
function
|
|
3700
|
-
return `${
|
|
3735
|
+
function A() {
|
|
3736
|
+
return `${j()} ${k()}`;
|
|
3701
3737
|
}
|
|
3702
3738
|
}
|
|
3703
|
-
function
|
|
3704
|
-
return n ===
|
|
3739
|
+
function xr(n) {
|
|
3740
|
+
return n === Nr || n === Pr || n === Ir || n === Lr;
|
|
3705
3741
|
}
|
|
3706
|
-
function
|
|
3707
|
-
return n >=
|
|
3742
|
+
function pe(n) {
|
|
3743
|
+
return n >= We && n <= Ke || n >= Dr && n <= Hr || n >= qr && n <= zr;
|
|
3708
3744
|
}
|
|
3709
|
-
function
|
|
3710
|
-
return n >=
|
|
3745
|
+
function me(n) {
|
|
3746
|
+
return n >= We && n <= Ke;
|
|
3711
3747
|
}
|
|
3712
|
-
function
|
|
3713
|
-
return n >=
|
|
3748
|
+
function Ar(n) {
|
|
3749
|
+
return n >= Fr && n <= Ke;
|
|
3714
3750
|
}
|
|
3715
|
-
function
|
|
3751
|
+
function Rr(n) {
|
|
3716
3752
|
return n >= 32 && n <= 1114111;
|
|
3717
3753
|
}
|
|
3718
|
-
function
|
|
3719
|
-
return n === e ? !0 : Array.isArray(n) && Array.isArray(e) ? n.length === e.length && n.every((t, s) =>
|
|
3754
|
+
function De(n, e) {
|
|
3755
|
+
return n === e ? !0 : Array.isArray(n) && Array.isArray(e) ? n.length === e.length && n.every((t, s) => De(t, e[s])) : yt(n) && yt(e) ? [.../* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(e)])].every((s) => De(n[s], e[s])) : !1;
|
|
3720
3756
|
}
|
|
3721
|
-
function
|
|
3757
|
+
function yt(n) {
|
|
3722
3758
|
return typeof n == "object" && n !== null;
|
|
3723
3759
|
}
|
|
3724
|
-
const
|
|
3760
|
+
const Or = {
|
|
3725
3761
|
'"': '"',
|
|
3726
3762
|
"\\": "\\",
|
|
3727
3763
|
"/": "/",
|
|
@@ -3732,16 +3768,16 @@ const Sr = {
|
|
|
3732
3768
|
r: "\r",
|
|
3733
3769
|
t: " "
|
|
3734
3770
|
// note that \u is handled separately in parseString()
|
|
3735
|
-
},
|
|
3736
|
-
function
|
|
3771
|
+
}, Cr = 92, Tr = 123, wt = 125, kr = 91, _t = 93, Nr = 32, Pr = 10, Ir = 9, Lr = 13, Pe = 34, jr = 43, Et = 45, We = 48, Fr = 49, Ke = 57, vr = 44, $r = 46, Ur = 58, Dr = 65, qr = 97, Br = 69, Mr = 101, Hr = 70, zr = 102;
|
|
3772
|
+
function nn(n, e, t, s) {
|
|
3737
3773
|
const r = void 0;
|
|
3738
3774
|
return o(n, "");
|
|
3739
|
-
function o(a,
|
|
3775
|
+
function o(a, f) {
|
|
3740
3776
|
if (Array.isArray(s)) {
|
|
3741
3777
|
const g = s.find((b) => b.test(a));
|
|
3742
3778
|
if (g) {
|
|
3743
3779
|
const b = g.stringify(a);
|
|
3744
|
-
if (typeof b != "string" || !
|
|
3780
|
+
if (typeof b != "string" || !en(b))
|
|
3745
3781
|
throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${b})`);
|
|
3746
3782
|
return b;
|
|
3747
3783
|
}
|
|
@@ -3751,55 +3787,55 @@ function Gt(n, e, t, s) {
|
|
|
3751
3787
|
if (a != null && a.isLosslessNumber || typeof a == "bigint")
|
|
3752
3788
|
return a.toString();
|
|
3753
3789
|
if (Array.isArray(a))
|
|
3754
|
-
return c(a,
|
|
3790
|
+
return c(a, f);
|
|
3755
3791
|
if (a && typeof a == "object")
|
|
3756
|
-
return h(a,
|
|
3792
|
+
return h(a, f);
|
|
3757
3793
|
}
|
|
3758
|
-
function c(a,
|
|
3794
|
+
function c(a, f) {
|
|
3759
3795
|
if (a.length === 0)
|
|
3760
3796
|
return "[]";
|
|
3761
|
-
const g = r ?
|
|
3797
|
+
const g = r ? f + r : void 0;
|
|
3762
3798
|
let b = r ? `[
|
|
3763
3799
|
` : "[";
|
|
3764
|
-
for (let
|
|
3765
|
-
const m = a[
|
|
3766
|
-
r && (b += g), typeof m < "u" && typeof m != "function" ? b += o(m, g) : b += "null",
|
|
3800
|
+
for (let d = 0; d < a.length; d++) {
|
|
3801
|
+
const m = a[d];
|
|
3802
|
+
r && (b += g), typeof m < "u" && typeof m != "function" ? b += o(m, g) : b += "null", d < a.length - 1 && (b += r ? `,
|
|
3767
3803
|
` : ",");
|
|
3768
3804
|
}
|
|
3769
3805
|
return b += r ? `
|
|
3770
|
-
${
|
|
3806
|
+
${f}]` : "]", b;
|
|
3771
3807
|
}
|
|
3772
|
-
function h(a,
|
|
3808
|
+
function h(a, f) {
|
|
3773
3809
|
if (typeof a.toJSON == "function")
|
|
3774
|
-
return
|
|
3810
|
+
return nn(a.toJSON(), e, t, void 0);
|
|
3775
3811
|
const g = Array.isArray(e) ? e.map(String) : Object.keys(a);
|
|
3776
3812
|
if (g.length === 0)
|
|
3777
3813
|
return "{}";
|
|
3778
|
-
const b = r ?
|
|
3779
|
-
let
|
|
3814
|
+
const b = r ? f + r : void 0;
|
|
3815
|
+
let d = !0, m = r ? `{
|
|
3780
3816
|
` : "{";
|
|
3781
3817
|
for (const p of g) {
|
|
3782
3818
|
const _ = a[p];
|
|
3783
3819
|
if (u(p, _)) {
|
|
3784
|
-
|
|
3820
|
+
d ? d = !1 : m += r ? `,
|
|
3785
3821
|
` : ",";
|
|
3786
|
-
const
|
|
3787
|
-
m += r ? `${b +
|
|
3822
|
+
const S = JSON.stringify(p);
|
|
3823
|
+
m += r ? `${b + S}: ` : `${S}:`, m += o(_, b);
|
|
3788
3824
|
}
|
|
3789
3825
|
}
|
|
3790
3826
|
return m += r ? `
|
|
3791
|
-
${
|
|
3827
|
+
${f}}` : "}", m;
|
|
3792
3828
|
}
|
|
3793
|
-
function u(a,
|
|
3794
|
-
return typeof
|
|
3829
|
+
function u(a, f) {
|
|
3830
|
+
return typeof f < "u" && typeof f != "function" && typeof f != "symbol";
|
|
3795
3831
|
}
|
|
3796
3832
|
}
|
|
3797
|
-
function
|
|
3798
|
-
return
|
|
3833
|
+
function Vr(n) {
|
|
3834
|
+
return re(n) && !tn(n) ? BigInt(n) : parseFloat(n);
|
|
3799
3835
|
}
|
|
3800
|
-
class
|
|
3836
|
+
class gi {
|
|
3801
3837
|
constructor() {
|
|
3802
|
-
|
|
3838
|
+
$(this, "id", 1);
|
|
3803
3839
|
}
|
|
3804
3840
|
async exec(e, t, s = {}, r = {}, i = 6e4) {
|
|
3805
3841
|
try {
|
|
@@ -3811,7 +3847,7 @@ class di {
|
|
|
3811
3847
|
}
|
|
3812
3848
|
this.id = this.id + 1;
|
|
3813
3849
|
try {
|
|
3814
|
-
return s.scope = window.openc3Scope, r.manual = !0, (await
|
|
3850
|
+
return s.scope = window.openc3Scope, r.manual = !0, (await He.post(
|
|
3815
3851
|
"/openc3-api/api",
|
|
3816
3852
|
{
|
|
3817
3853
|
jsonrpc: "2.0",
|
|
@@ -3828,10 +3864,10 @@ class di {
|
|
|
3828
3864
|
},
|
|
3829
3865
|
timeout: i,
|
|
3830
3866
|
transformRequest: [
|
|
3831
|
-
(c, h) =>
|
|
3867
|
+
(c, h) => nn(c)
|
|
3832
3868
|
],
|
|
3833
3869
|
transformResponse: [
|
|
3834
|
-
(c) =>
|
|
3870
|
+
(c) => Sr(c, void 0, Vr)
|
|
3835
3871
|
]
|
|
3836
3872
|
}
|
|
3837
3873
|
)).data.result;
|
|
@@ -4084,14 +4120,14 @@ class di {
|
|
|
4084
4120
|
return this.exec("get_cmd_buffer", [e, t]);
|
|
4085
4121
|
}
|
|
4086
4122
|
// Implementation of functionality shared by cmd methods with param_lists.
|
|
4087
|
-
_cmd(e, t, s, r, i) {
|
|
4088
|
-
let
|
|
4089
|
-
for (let
|
|
4090
|
-
Object.prototype.hasOwnProperty.call(r,
|
|
4123
|
+
_cmd(e, t, s, r, i, o = {}) {
|
|
4124
|
+
let c = null;
|
|
4125
|
+
for (let h in r)
|
|
4126
|
+
Object.prototype.hasOwnProperty.call(r, h) && (c = this.encode_openc3_type(r[h]), c !== null && (r[h] = c));
|
|
4091
4127
|
return this.exec(
|
|
4092
4128
|
e,
|
|
4093
4129
|
[t, s, r],
|
|
4094
|
-
|
|
4130
|
+
o,
|
|
4095
4131
|
i
|
|
4096
4132
|
);
|
|
4097
4133
|
}
|
|
@@ -4104,89 +4140,98 @@ class di {
|
|
|
4104
4140
|
r
|
|
4105
4141
|
);
|
|
4106
4142
|
}
|
|
4107
|
-
cmd(e, t, s, r = {}) {
|
|
4143
|
+
cmd(e, t, s, r = {}, i = {}) {
|
|
4108
4144
|
return t === void 0 ? this.exec("cmd", e, {}, r) : this._cmd(
|
|
4109
4145
|
"cmd",
|
|
4110
4146
|
e,
|
|
4111
4147
|
t,
|
|
4112
4148
|
s,
|
|
4113
|
-
r
|
|
4149
|
+
r,
|
|
4150
|
+
i
|
|
4114
4151
|
);
|
|
4115
4152
|
}
|
|
4116
|
-
cmd_no_range_check(e, t, s, r = {}) {
|
|
4117
|
-
return t === void 0 ? this.exec("cmd_no_range_check", e, {}, r) : this._cmd(
|
|
4153
|
+
cmd_no_range_check(e, t, s, r = {}, i = {}) {
|
|
4154
|
+
return t === void 0 ? this.exec("cmd_no_range_check", e, {}, r, i) : this._cmd(
|
|
4118
4155
|
"cmd_no_range_check",
|
|
4119
4156
|
e,
|
|
4120
4157
|
t,
|
|
4121
4158
|
s,
|
|
4122
|
-
r
|
|
4159
|
+
r,
|
|
4160
|
+
i
|
|
4123
4161
|
);
|
|
4124
4162
|
}
|
|
4125
|
-
cmd_raw(e, t, s, r = {}) {
|
|
4126
|
-
return t === void 0 ? this.exec("cmd_raw", e, {}, r) : this._cmd(
|
|
4163
|
+
cmd_raw(e, t, s, r = {}, i = {}) {
|
|
4164
|
+
return t === void 0 ? this.exec("cmd_raw", e, {}, r, i) : this._cmd(
|
|
4127
4165
|
"cmd_raw",
|
|
4128
4166
|
e,
|
|
4129
4167
|
t,
|
|
4130
4168
|
s,
|
|
4131
|
-
r
|
|
4169
|
+
r,
|
|
4170
|
+
i
|
|
4132
4171
|
);
|
|
4133
4172
|
}
|
|
4134
|
-
cmd_raw_no_range_check(e, t, s, r = {}) {
|
|
4135
|
-
return t === void 0 ? this.exec("cmd_raw_no_range_check", e, {}, r) : this._cmd(
|
|
4173
|
+
cmd_raw_no_range_check(e, t, s, r = {}, i = {}) {
|
|
4174
|
+
return t === void 0 ? this.exec("cmd_raw_no_range_check", e, {}, r, i) : this._cmd(
|
|
4136
4175
|
"cmd_raw_no_range_check",
|
|
4137
4176
|
e,
|
|
4138
4177
|
t,
|
|
4139
4178
|
s,
|
|
4140
|
-
r
|
|
4179
|
+
r,
|
|
4180
|
+
i
|
|
4141
4181
|
);
|
|
4142
4182
|
}
|
|
4143
|
-
cmd_no_hazardous_check(e, t, s, r = {}) {
|
|
4144
|
-
return t === void 0 ? this.exec("cmd_no_hazardous_check", e, {}, r) : this._cmd(
|
|
4183
|
+
cmd_no_hazardous_check(e, t, s, r = {}, i = {}) {
|
|
4184
|
+
return t === void 0 ? this.exec("cmd_no_hazardous_check", e, {}, r, i) : this._cmd(
|
|
4145
4185
|
"cmd_no_hazardous_check",
|
|
4146
4186
|
e,
|
|
4147
4187
|
t,
|
|
4148
4188
|
s,
|
|
4149
|
-
r
|
|
4189
|
+
r,
|
|
4190
|
+
i
|
|
4150
4191
|
);
|
|
4151
4192
|
}
|
|
4152
|
-
cmd_no_checks(e, t, s, r = {}) {
|
|
4153
|
-
return t === void 0 ? this.exec("cmd_no_checks", e, {}, r) : this._cmd(
|
|
4193
|
+
cmd_no_checks(e, t, s, r = {}, i = {}) {
|
|
4194
|
+
return t === void 0 ? this.exec("cmd_no_checks", e, {}, r, i) : this._cmd(
|
|
4154
4195
|
"cmd_no_checks",
|
|
4155
4196
|
e,
|
|
4156
4197
|
t,
|
|
4157
4198
|
s,
|
|
4158
|
-
r
|
|
4199
|
+
r,
|
|
4200
|
+
i
|
|
4159
4201
|
);
|
|
4160
4202
|
}
|
|
4161
|
-
cmd_raw_no_hazardous_check(e, t, s, r = {}) {
|
|
4203
|
+
cmd_raw_no_hazardous_check(e, t, s, r = {}, i = {}) {
|
|
4162
4204
|
return t === void 0 ? this.exec(
|
|
4163
4205
|
"cmd_raw_no_hazardous_check",
|
|
4164
4206
|
e,
|
|
4165
4207
|
{},
|
|
4166
|
-
r
|
|
4208
|
+
r,
|
|
4209
|
+
i
|
|
4167
4210
|
) : this._cmd(
|
|
4168
4211
|
"cmd_raw_no_hazardous_check",
|
|
4169
4212
|
e,
|
|
4170
4213
|
t,
|
|
4171
4214
|
s,
|
|
4172
|
-
r
|
|
4215
|
+
r,
|
|
4216
|
+
i
|
|
4173
4217
|
);
|
|
4174
4218
|
}
|
|
4175
|
-
cmd_raw_no_checks(e, t, s, r = {}) {
|
|
4176
|
-
return t === void 0 ? this.exec("cmd_raw_no_checks", e, {}, r) : this._cmd(
|
|
4219
|
+
cmd_raw_no_checks(e, t, s, r = {}, i = {}) {
|
|
4220
|
+
return t === void 0 ? this.exec("cmd_raw_no_checks", e, {}, r, i) : this._cmd(
|
|
4177
4221
|
"cmd_raw_no_checks",
|
|
4178
4222
|
e,
|
|
4179
4223
|
t,
|
|
4180
4224
|
s,
|
|
4181
|
-
r
|
|
4225
|
+
r,
|
|
4226
|
+
i
|
|
4182
4227
|
);
|
|
4183
4228
|
}
|
|
4184
|
-
build_cmd(e, t, s) {
|
|
4185
|
-
return t === void 0 ? this.exec("build_cmd", e) : this._cmd("build_cmd", e, t, s);
|
|
4229
|
+
build_cmd(e, t, s, r = {}, i = {}) {
|
|
4230
|
+
return t === void 0 ? this.exec("build_cmd", e) : this._cmd("build_cmd", e, t, s, r, i);
|
|
4186
4231
|
}
|
|
4187
4232
|
// DEPRECATED for build_cmd
|
|
4188
|
-
build_command(e, t, s) {
|
|
4189
|
-
return t === void 0 ? this.exec("build_cmd", e) : this._cmd("build_cmd", e, t, s);
|
|
4233
|
+
build_command(e, t, s, r = {}, i = {}) {
|
|
4234
|
+
return t === void 0 ? this.exec("build_cmd", e) : this._cmd("build_cmd", e, t, s, r, i);
|
|
4190
4235
|
}
|
|
4191
4236
|
get_interface_names() {
|
|
4192
4237
|
return this.exec("get_interface_names", []);
|
|
@@ -4258,11 +4303,11 @@ class di {
|
|
|
4258
4303
|
}
|
|
4259
4304
|
}
|
|
4260
4305
|
export {
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4306
|
+
hi as Api,
|
|
4307
|
+
pi as Cable,
|
|
4308
|
+
gt as ConfigParserError,
|
|
4309
|
+
mi as ConfigParserService,
|
|
4310
|
+
gi as OpenC3Api,
|
|
4311
|
+
He as axios
|
|
4267
4312
|
};
|
|
4268
4313
|
//# sourceMappingURL=services.js.map
|