@openc3/js-common 7.1.1 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/services.cjs +10 -10
- package/dist/services.cjs.map +1 -1
- package/dist/services.js +545 -535
- package/dist/services.js.map +1 -1
- package/package.json +4 -4
package/dist/services.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Dt(n, e) {
|
|
2
2
|
return function() {
|
|
3
3
|
return n.apply(e, arguments);
|
|
4
4
|
};
|
|
5
5
|
}
|
|
6
|
-
const { toString:
|
|
7
|
-
const t =
|
|
6
|
+
const { toString: gn } = Object.prototype, { getPrototypeOf: Pe } = Object, { iterator: ke, toStringTag: vt } = Symbol, Ie = /* @__PURE__ */ ((n) => (e) => {
|
|
7
|
+
const t = gn.call(e);
|
|
8
8
|
return n[t] || (n[t] = t.slice(8, -1).toLowerCase());
|
|
9
9
|
})(/* @__PURE__ */ Object.create(null)), H = (n) => (n = n.toLowerCase(), (e) => Ie(e) === n), Le = (n) => (e) => typeof e === n, { isArray: oe } = Array, ie = Le("undefined");
|
|
10
10
|
function fe(n) {
|
|
11
11
|
return n !== null && !ie(n) && n.constructor !== null && !ie(n.constructor) && F(n.constructor.isBuffer) && n.constructor.isBuffer(n);
|
|
12
12
|
}
|
|
13
|
-
const
|
|
14
|
-
function
|
|
13
|
+
const Ft = H("ArrayBuffer");
|
|
14
|
+
function mn(n) {
|
|
15
15
|
let e;
|
|
16
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(n) : e = n && n.buffer &&
|
|
16
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(n) : e = n && n.buffer && Ft(n.buffer), e;
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const bn = Le("string"), F = Le("function"), jt = Le("number"), pe = (n) => n !== null && typeof n == "object", _n = (n) => n === !0 || n === !1, Ae = (n) => {
|
|
19
19
|
if (Ie(n) !== "object")
|
|
20
20
|
return !1;
|
|
21
21
|
const e = Pe(n);
|
|
22
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
23
|
-
},
|
|
22
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(vt in n) && !(ke in n);
|
|
23
|
+
}, yn = (n) => {
|
|
24
24
|
if (!pe(n) || fe(n))
|
|
25
25
|
return !1;
|
|
26
26
|
try {
|
|
@@ -28,24 +28,24 @@ const gn = Le("string"), F = Le("function"), Ft = Le("number"), pe = (n) => n !=
|
|
|
28
28
|
} catch {
|
|
29
29
|
return !1;
|
|
30
30
|
}
|
|
31
|
-
},
|
|
32
|
-
function
|
|
31
|
+
}, wn = H("Date"), En = H("File"), Sn = (n) => !!(n && typeof n.uri < "u"), Rn = (n) => n && typeof n.getParts < "u", xn = H("Blob"), On = H("FileList"), An = (n) => pe(n) && F(n.pipe);
|
|
32
|
+
function Cn() {
|
|
33
33
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const lt = Cn(), ut = typeof lt.FormData < "u" ? lt.FormData : void 0, Tn = (n) => {
|
|
36
36
|
if (!n) return !1;
|
|
37
|
-
if (
|
|
37
|
+
if (ut && n instanceof ut) return !0;
|
|
38
38
|
const e = Pe(n);
|
|
39
39
|
if (!e || e === Object.prototype || !F(n.append)) return !1;
|
|
40
40
|
const t = Ie(n);
|
|
41
41
|
return t === "formdata" || // detect form-data instance
|
|
42
42
|
t === "object" && F(n.toString) && n.toString() === "[object FormData]";
|
|
43
|
-
},
|
|
43
|
+
}, Nn = H("URLSearchParams"), [Pn, kn, In, Ln] = [
|
|
44
44
|
"ReadableStream",
|
|
45
45
|
"Request",
|
|
46
46
|
"Response",
|
|
47
47
|
"Headers"
|
|
48
|
-
].map(H),
|
|
48
|
+
].map(H), Dn = (n) => n.trim ? n.trim() : n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
49
49
|
function ge(n, e, { allOwnKeys: t = !1 } = {}) {
|
|
50
50
|
if (n === null || typeof n > "u")
|
|
51
51
|
return;
|
|
@@ -62,7 +62,7 @@ function ge(n, e, { allOwnKeys: t = !1 } = {}) {
|
|
|
62
62
|
c = i[r], e.call(null, n[c], c, n);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function Ut(n, e) {
|
|
66
66
|
if (fe(n))
|
|
67
67
|
return null;
|
|
68
68
|
e = e.toLowerCase();
|
|
@@ -73,26 +73,26 @@ function jt(n, e) {
|
|
|
73
73
|
return s;
|
|
74
74
|
return null;
|
|
75
75
|
}
|
|
76
|
-
const
|
|
76
|
+
const Z = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, $t = (n) => !ie(n) && n !== Z;
|
|
77
77
|
function ze(...n) {
|
|
78
|
-
const { caseless: e, skipUndefined: t } =
|
|
78
|
+
const { caseless: e, skipUndefined: t } = $t(this) && this || {}, r = {}, s = (i, o) => {
|
|
79
79
|
if (o === "__proto__" || o === "constructor" || o === "prototype")
|
|
80
80
|
return;
|
|
81
|
-
const c = e &&
|
|
81
|
+
const c = e && Ut(r, o) || o, u = Ve(r, c) ? r[c] : void 0;
|
|
82
82
|
Ae(u) && Ae(i) ? r[c] = ze(u, i) : Ae(i) ? r[c] = ze({}, i) : oe(i) ? r[c] = i.slice() : (!t || !ie(i)) && (r[c] = i);
|
|
83
83
|
};
|
|
84
84
|
for (let i = 0, o = n.length; i < o; i++)
|
|
85
85
|
n[i] && ge(n[i], s);
|
|
86
86
|
return r;
|
|
87
87
|
}
|
|
88
|
-
const
|
|
88
|
+
const vn = (n, e, t, { allOwnKeys: r } = {}) => (ge(
|
|
89
89
|
e,
|
|
90
90
|
(s, i) => {
|
|
91
91
|
t && F(s) ? Object.defineProperty(n, i, {
|
|
92
92
|
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
93
93
|
// hijack defineProperty's accessor-vs-data resolution.
|
|
94
94
|
__proto__: null,
|
|
95
|
-
value:
|
|
95
|
+
value: Dt(s, t),
|
|
96
96
|
writable: !0,
|
|
97
97
|
enumerable: !0,
|
|
98
98
|
configurable: !0
|
|
@@ -105,7 +105,7 @@ const Ln = (n, e, t, { allOwnKeys: r } = {}) => (ge(
|
|
|
105
105
|
});
|
|
106
106
|
},
|
|
107
107
|
{ allOwnKeys: r }
|
|
108
|
-
), n),
|
|
108
|
+
), n), Fn = (n) => (n.charCodeAt(0) === 65279 && (n = n.slice(1)), n), jn = (n, e, t, r) => {
|
|
109
109
|
n.prototype = Object.create(e.prototype, r), Object.defineProperty(n.prototype, "constructor", {
|
|
110
110
|
__proto__: null,
|
|
111
111
|
value: n,
|
|
@@ -116,7 +116,7 @@ const Ln = (n, e, t, { allOwnKeys: r } = {}) => (ge(
|
|
|
116
116
|
__proto__: null,
|
|
117
117
|
value: e.prototype
|
|
118
118
|
}), t && Object.assign(n.prototype, t);
|
|
119
|
-
},
|
|
119
|
+
}, Un = (n, e, t, r) => {
|
|
120
120
|
let s, i, o;
|
|
121
121
|
const c = {};
|
|
122
122
|
if (e = e || {}, n == null) return e;
|
|
@@ -126,42 +126,42 @@ const Ln = (n, e, t, { allOwnKeys: r } = {}) => (ge(
|
|
|
126
126
|
n = t !== !1 && Pe(n);
|
|
127
127
|
} while (n && (!t || t(n, e)) && n !== Object.prototype);
|
|
128
128
|
return e;
|
|
129
|
-
},
|
|
129
|
+
}, $n = (n, e, t) => {
|
|
130
130
|
n = String(n), (t === void 0 || t > n.length) && (t = n.length), t -= e.length;
|
|
131
131
|
const r = n.indexOf(e, t);
|
|
132
132
|
return r !== -1 && r === t;
|
|
133
|
-
},
|
|
133
|
+
}, Bn = (n) => {
|
|
134
134
|
if (!n) return null;
|
|
135
135
|
if (oe(n)) return n;
|
|
136
136
|
let e = n.length;
|
|
137
|
-
if (!
|
|
137
|
+
if (!jt(e)) return null;
|
|
138
138
|
const t = new Array(e);
|
|
139
139
|
for (; e-- > 0; )
|
|
140
140
|
t[e] = n[e];
|
|
141
141
|
return t;
|
|
142
|
-
},
|
|
142
|
+
}, qn = /* @__PURE__ */ ((n) => (e) => n && e instanceof n)(typeof Uint8Array < "u" && Pe(Uint8Array)), Mn = (n, e) => {
|
|
143
143
|
const r = (n && n[ke]).call(n);
|
|
144
144
|
let s;
|
|
145
145
|
for (; (s = r.next()) && !s.done; ) {
|
|
146
146
|
const i = s.value;
|
|
147
147
|
e.call(n, i[0], i[1]);
|
|
148
148
|
}
|
|
149
|
-
},
|
|
149
|
+
}, Hn = (n, e) => {
|
|
150
150
|
let t;
|
|
151
151
|
const r = [];
|
|
152
152
|
for (; (t = n.exec(e)) !== null; )
|
|
153
153
|
r.push(t);
|
|
154
154
|
return r;
|
|
155
|
-
},
|
|
155
|
+
}, zn = H("HTMLFormElement"), Vn = (n) => n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(t, r, s) {
|
|
156
156
|
return r.toUpperCase() + s;
|
|
157
|
-
}), Ve = (({ hasOwnProperty: n }) => (e, t) => n.call(e, t))(Object.prototype),
|
|
157
|
+
}), Ve = (({ hasOwnProperty: n }) => (e, t) => n.call(e, t))(Object.prototype), Jn = H("RegExp"), Bt = (n, e) => {
|
|
158
158
|
const t = Object.getOwnPropertyDescriptors(n), r = {};
|
|
159
159
|
ge(t, (s, i) => {
|
|
160
160
|
let o;
|
|
161
161
|
(o = e(s, i, n)) !== !1 && (r[i] = o || s);
|
|
162
162
|
}), Object.defineProperties(n, r);
|
|
163
|
-
},
|
|
164
|
-
|
|
163
|
+
}, Wn = (n) => {
|
|
164
|
+
Bt(n, (e, t) => {
|
|
165
165
|
if (F(n) && ["arguments", "caller", "callee"].includes(t))
|
|
166
166
|
return !1;
|
|
167
167
|
const r = n[t];
|
|
@@ -175,107 +175,107 @@ const Ln = (n, e, t, { allOwnKeys: r } = {}) => (ge(
|
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
});
|
|
178
|
-
},
|
|
178
|
+
}, Kn = (n, e) => {
|
|
179
179
|
const t = {}, r = (s) => {
|
|
180
180
|
s.forEach((i) => {
|
|
181
181
|
t[i] = !0;
|
|
182
182
|
});
|
|
183
183
|
};
|
|
184
184
|
return oe(n) ? r(n) : r(String(n).split(e)), t;
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
function
|
|
188
|
-
return !!(n && F(n.append) && n[
|
|
185
|
+
}, Xn = () => {
|
|
186
|
+
}, Gn = (n, e) => n != null && Number.isFinite(n = +n) ? n : e;
|
|
187
|
+
function Qn(n) {
|
|
188
|
+
return !!(n && F(n.append) && n[vt] === "FormData" && n[ke]);
|
|
189
189
|
}
|
|
190
|
-
const
|
|
191
|
-
const e = new
|
|
190
|
+
const Yn = (n) => {
|
|
191
|
+
const e = /* @__PURE__ */ new WeakSet(), t = (r) => {
|
|
192
192
|
if (pe(r)) {
|
|
193
|
-
if (e.
|
|
193
|
+
if (e.has(r))
|
|
194
194
|
return;
|
|
195
195
|
if (fe(r))
|
|
196
196
|
return r;
|
|
197
197
|
if (!("toJSON" in r)) {
|
|
198
|
-
e
|
|
199
|
-
const
|
|
200
|
-
return ge(r, (
|
|
201
|
-
const
|
|
202
|
-
!ie(
|
|
203
|
-
}), e
|
|
198
|
+
e.add(r);
|
|
199
|
+
const s = oe(r) ? [] : {};
|
|
200
|
+
return ge(r, (i, o) => {
|
|
201
|
+
const c = t(i);
|
|
202
|
+
!ie(c) && (s[o] = c);
|
|
203
|
+
}), e.delete(r), s;
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
return r;
|
|
207
207
|
};
|
|
208
|
-
return t(n
|
|
209
|
-
},
|
|
208
|
+
return t(n);
|
|
209
|
+
}, Zn = H("AsyncFunction"), er = (n) => n && (pe(n) || F(n)) && F(n.then) && F(n.catch), qt = ((n, e) => n ? setImmediate : e ? ((t, r) => (Z.addEventListener(
|
|
210
210
|
"message",
|
|
211
211
|
({ source: s, data: i }) => {
|
|
212
|
-
s ===
|
|
212
|
+
s === Z && i === t && r.length && r.shift()();
|
|
213
213
|
},
|
|
214
214
|
!1
|
|
215
215
|
), (s) => {
|
|
216
|
-
r.push(s),
|
|
217
|
-
}))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(typeof setImmediate == "function", F(
|
|
216
|
+
r.push(s), Z.postMessage(t, "*");
|
|
217
|
+
}))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(typeof setImmediate == "function", F(Z.postMessage)), tr = typeof queueMicrotask < "u" ? queueMicrotask.bind(Z) : typeof process < "u" && process.nextTick || qt, nr = (n) => n != null && F(n[ke]), a = {
|
|
218
218
|
isArray: oe,
|
|
219
|
-
isArrayBuffer:
|
|
219
|
+
isArrayBuffer: Ft,
|
|
220
220
|
isBuffer: fe,
|
|
221
|
-
isFormData:
|
|
222
|
-
isArrayBufferView:
|
|
223
|
-
isString:
|
|
224
|
-
isNumber:
|
|
225
|
-
isBoolean:
|
|
221
|
+
isFormData: Tn,
|
|
222
|
+
isArrayBufferView: mn,
|
|
223
|
+
isString: bn,
|
|
224
|
+
isNumber: jt,
|
|
225
|
+
isBoolean: _n,
|
|
226
226
|
isObject: pe,
|
|
227
227
|
isPlainObject: Ae,
|
|
228
|
-
isEmptyObject:
|
|
229
|
-
isReadableStream:
|
|
230
|
-
isRequest:
|
|
231
|
-
isResponse:
|
|
232
|
-
isHeaders:
|
|
228
|
+
isEmptyObject: yn,
|
|
229
|
+
isReadableStream: Pn,
|
|
230
|
+
isRequest: kn,
|
|
231
|
+
isResponse: In,
|
|
232
|
+
isHeaders: Ln,
|
|
233
233
|
isUndefined: ie,
|
|
234
|
-
isDate:
|
|
235
|
-
isFile:
|
|
236
|
-
isReactNativeBlob:
|
|
237
|
-
isReactNative:
|
|
238
|
-
isBlob:
|
|
239
|
-
isRegExp:
|
|
234
|
+
isDate: wn,
|
|
235
|
+
isFile: En,
|
|
236
|
+
isReactNativeBlob: Sn,
|
|
237
|
+
isReactNative: Rn,
|
|
238
|
+
isBlob: xn,
|
|
239
|
+
isRegExp: Jn,
|
|
240
240
|
isFunction: F,
|
|
241
|
-
isStream:
|
|
242
|
-
isURLSearchParams:
|
|
243
|
-
isTypedArray:
|
|
244
|
-
isFileList:
|
|
241
|
+
isStream: An,
|
|
242
|
+
isURLSearchParams: Nn,
|
|
243
|
+
isTypedArray: qn,
|
|
244
|
+
isFileList: On,
|
|
245
245
|
forEach: ge,
|
|
246
246
|
merge: ze,
|
|
247
|
-
extend:
|
|
248
|
-
trim:
|
|
249
|
-
stripBOM:
|
|
250
|
-
inherits:
|
|
251
|
-
toFlatObject:
|
|
247
|
+
extend: vn,
|
|
248
|
+
trim: Dn,
|
|
249
|
+
stripBOM: Fn,
|
|
250
|
+
inherits: jn,
|
|
251
|
+
toFlatObject: Un,
|
|
252
252
|
kindOf: Ie,
|
|
253
253
|
kindOfTest: H,
|
|
254
|
-
endsWith:
|
|
255
|
-
toArray:
|
|
256
|
-
forEachEntry:
|
|
257
|
-
matchAll:
|
|
258
|
-
isHTMLForm:
|
|
254
|
+
endsWith: $n,
|
|
255
|
+
toArray: Bn,
|
|
256
|
+
forEachEntry: Mn,
|
|
257
|
+
matchAll: Hn,
|
|
258
|
+
isHTMLForm: zn,
|
|
259
259
|
hasOwnProperty: Ve,
|
|
260
260
|
hasOwnProp: Ve,
|
|
261
261
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
262
|
-
reduceDescriptors:
|
|
263
|
-
freezeMethods:
|
|
264
|
-
toObjectSet:
|
|
265
|
-
toCamelCase:
|
|
266
|
-
noop:
|
|
267
|
-
toFiniteNumber:
|
|
268
|
-
findKey:
|
|
269
|
-
global:
|
|
270
|
-
isContextDefined:
|
|
271
|
-
isSpecCompliantForm:
|
|
272
|
-
toJSONObject:
|
|
273
|
-
isAsyncFn:
|
|
274
|
-
isThenable:
|
|
262
|
+
reduceDescriptors: Bt,
|
|
263
|
+
freezeMethods: Wn,
|
|
264
|
+
toObjectSet: Kn,
|
|
265
|
+
toCamelCase: Vn,
|
|
266
|
+
noop: Xn,
|
|
267
|
+
toFiniteNumber: Gn,
|
|
268
|
+
findKey: Ut,
|
|
269
|
+
global: Z,
|
|
270
|
+
isContextDefined: $t,
|
|
271
|
+
isSpecCompliantForm: Qn,
|
|
272
|
+
toJSONObject: Yn,
|
|
273
|
+
isAsyncFn: Zn,
|
|
274
|
+
isThenable: er,
|
|
275
275
|
setImmediate: qt,
|
|
276
|
-
asap:
|
|
277
|
-
isIterable:
|
|
278
|
-
},
|
|
276
|
+
asap: tr,
|
|
277
|
+
isIterable: nr
|
|
278
|
+
}, rr = a.toObjectSet([
|
|
279
279
|
"age",
|
|
280
280
|
"authorization",
|
|
281
281
|
"content-length",
|
|
@@ -293,15 +293,15 @@ const Gn = (n) => {
|
|
|
293
293
|
"referer",
|
|
294
294
|
"retry-after",
|
|
295
295
|
"user-agent"
|
|
296
|
-
]),
|
|
296
|
+
]), sr = (n) => {
|
|
297
297
|
const e = {};
|
|
298
298
|
let t, r, s;
|
|
299
299
|
return n && n.split(`
|
|
300
300
|
`).forEach(function(o) {
|
|
301
|
-
s = o.indexOf(":"), t = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!t || e[t] &&
|
|
301
|
+
s = o.indexOf(":"), t = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!t || e[t] && rr[t]) && (t === "set-cookie" ? e[t] ? e[t].push(r) : e[t] = [r] : e[t] = e[t] ? e[t] + ", " + r : r);
|
|
302
302
|
}), e;
|
|
303
|
-
}
|
|
304
|
-
function
|
|
303
|
+
};
|
|
304
|
+
function ir(n) {
|
|
305
305
|
let e = 0, t = n.length;
|
|
306
306
|
for (; e < t; ) {
|
|
307
307
|
const r = n.charCodeAt(e);
|
|
@@ -317,23 +317,32 @@ function sr(n) {
|
|
|
317
317
|
}
|
|
318
318
|
return e === 0 && t === n.length ? n : n.slice(e, t);
|
|
319
319
|
}
|
|
320
|
+
const or = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"), cr = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
|
|
321
|
+
function Qe(n, e) {
|
|
322
|
+
return a.isArray(n) ? n.map((t) => Qe(t, e)) : ir(String(n).replace(e, ""));
|
|
323
|
+
}
|
|
324
|
+
const ar = (n) => Qe(n, or), lr = (n) => Qe(n, cr);
|
|
325
|
+
function Mt(n) {
|
|
326
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
327
|
+
return a.forEach(n.toJSON(), (t, r) => {
|
|
328
|
+
e[r] = lr(t);
|
|
329
|
+
}), e;
|
|
330
|
+
}
|
|
331
|
+
const dt = /* @__PURE__ */ Symbol("internals");
|
|
320
332
|
function ue(n) {
|
|
321
333
|
return n && String(n).trim().toLowerCase();
|
|
322
334
|
}
|
|
323
|
-
function ir(n) {
|
|
324
|
-
return sr(n.replace(rr, ""));
|
|
325
|
-
}
|
|
326
335
|
function Ce(n) {
|
|
327
|
-
return n === !1 || n == null ? n : a.isArray(n) ? n.map(Ce) :
|
|
336
|
+
return n === !1 || n == null ? n : a.isArray(n) ? n.map(Ce) : ar(String(n));
|
|
328
337
|
}
|
|
329
|
-
function
|
|
338
|
+
function ur(n) {
|
|
330
339
|
const e = /* @__PURE__ */ Object.create(null), t = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
331
340
|
let r;
|
|
332
341
|
for (; r = t.exec(n); )
|
|
333
342
|
e[r[1]] = r[2];
|
|
334
343
|
return e;
|
|
335
344
|
}
|
|
336
|
-
const
|
|
345
|
+
const dr = (n) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());
|
|
337
346
|
function $e(n, e, t, r, s) {
|
|
338
347
|
if (a.isFunction(r))
|
|
339
348
|
return r.call(this, e, t);
|
|
@@ -344,10 +353,10 @@ function $e(n, e, t, r, s) {
|
|
|
344
353
|
return r.test(e);
|
|
345
354
|
}
|
|
346
355
|
}
|
|
347
|
-
function
|
|
356
|
+
function hr(n) {
|
|
348
357
|
return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, r) => t.toUpperCase() + r);
|
|
349
358
|
}
|
|
350
|
-
function
|
|
359
|
+
function fr(n, e) {
|
|
351
360
|
const t = a.toCamelCase(" " + e);
|
|
352
361
|
["get", "set", "has"].forEach((r) => {
|
|
353
362
|
Object.defineProperty(n, r + t, {
|
|
@@ -377,8 +386,8 @@ let v = class {
|
|
|
377
386
|
const o = (c, u) => a.forEach(c, (d, l) => i(d, l, u));
|
|
378
387
|
if (a.isPlainObject(e) || e instanceof this.constructor)
|
|
379
388
|
o(e, t);
|
|
380
|
-
else if (a.isString(e) && (e = e.trim()) && !
|
|
381
|
-
o(
|
|
389
|
+
else if (a.isString(e) && (e = e.trim()) && !dr(e))
|
|
390
|
+
o(sr(e), t);
|
|
382
391
|
else if (a.isObject(e) && a.isIterable(e)) {
|
|
383
392
|
let c = {}, u, d;
|
|
384
393
|
for (const l of e) {
|
|
@@ -399,7 +408,7 @@ let v = class {
|
|
|
399
408
|
if (!t)
|
|
400
409
|
return s;
|
|
401
410
|
if (t === !0)
|
|
402
|
-
return
|
|
411
|
+
return ur(s);
|
|
403
412
|
if (a.isFunction(t))
|
|
404
413
|
return t.call(this, s, r);
|
|
405
414
|
if (a.isRegExp(t))
|
|
@@ -443,7 +452,7 @@ let v = class {
|
|
|
443
452
|
t[o] = Ce(s), delete t[i];
|
|
444
453
|
return;
|
|
445
454
|
}
|
|
446
|
-
const c = e ?
|
|
455
|
+
const c = e ? hr(i) : String(i).trim();
|
|
447
456
|
c !== i && delete t[i], t[c] = Ce(s), r[c] = !0;
|
|
448
457
|
}), this;
|
|
449
458
|
}
|
|
@@ -477,12 +486,12 @@ let v = class {
|
|
|
477
486
|
return t.forEach((s) => r.set(s)), r;
|
|
478
487
|
}
|
|
479
488
|
static accessor(e) {
|
|
480
|
-
const r = (this[
|
|
489
|
+
const r = (this[dt] = this[dt] = {
|
|
481
490
|
accessors: {}
|
|
482
491
|
}).accessors, s = this.prototype;
|
|
483
492
|
function i(o) {
|
|
484
493
|
const c = ue(o);
|
|
485
|
-
r[c] || (
|
|
494
|
+
r[c] || (fr(s, o), r[c] = !0);
|
|
486
495
|
}
|
|
487
496
|
return a.isArray(e) ? e.forEach(i) : i(e), this;
|
|
488
497
|
}
|
|
@@ -505,8 +514,8 @@ a.reduceDescriptors(v.prototype, ({ value: n }, e) => {
|
|
|
505
514
|
};
|
|
506
515
|
});
|
|
507
516
|
a.freezeMethods(v);
|
|
508
|
-
const
|
|
509
|
-
function
|
|
517
|
+
const pr = "[REDACTED ****]";
|
|
518
|
+
function gr(n) {
|
|
510
519
|
if (a.hasOwnProp(n, "toJSON"))
|
|
511
520
|
return !0;
|
|
512
521
|
let e = Object.getPrototypeOf(n);
|
|
@@ -517,7 +526,7 @@ function dr(n) {
|
|
|
517
526
|
}
|
|
518
527
|
return !1;
|
|
519
528
|
}
|
|
520
|
-
function
|
|
529
|
+
function mr(n, e) {
|
|
521
530
|
const t = new Set(e.map((i) => String(i).toLowerCase())), r = [], s = (i) => {
|
|
522
531
|
if (i === null || typeof i != "object" || a.isBuffer(i)) return i;
|
|
523
532
|
if (r.indexOf(i) !== -1) return;
|
|
@@ -529,11 +538,11 @@ function hr(n, e) {
|
|
|
529
538
|
a.isUndefined(d) || (o[u] = d);
|
|
530
539
|
});
|
|
531
540
|
else {
|
|
532
|
-
if (!a.isPlainObject(i) &&
|
|
541
|
+
if (!a.isPlainObject(i) && gr(i))
|
|
533
542
|
return r.pop(), i;
|
|
534
543
|
o = /* @__PURE__ */ Object.create(null);
|
|
535
544
|
for (const [c, u] of Object.entries(i)) {
|
|
536
|
-
const d = t.has(c.toLowerCase()) ?
|
|
545
|
+
const d = t.has(c.toLowerCase()) ? pr : s(u);
|
|
537
546
|
a.isUndefined(d) || (o[c] = d);
|
|
538
547
|
}
|
|
539
548
|
}
|
|
@@ -541,9 +550,9 @@ function hr(n, e) {
|
|
|
541
550
|
};
|
|
542
551
|
return s(n);
|
|
543
552
|
}
|
|
544
|
-
let b = class
|
|
553
|
+
let b = class Ht extends Error {
|
|
545
554
|
static from(e, t, r, s, i, o) {
|
|
546
|
-
const c = new
|
|
555
|
+
const c = new Ht(e.message, t || e.code, r, s, i);
|
|
547
556
|
return c.cause = e, c.name = e.name, e.status != null && c.status == null && (c.status = e.status), o && Object.assign(c, o), c;
|
|
548
557
|
}
|
|
549
558
|
/**
|
|
@@ -569,7 +578,7 @@ let b = class Bt extends Error {
|
|
|
569
578
|
}), this.name = "AxiosError", this.isAxiosError = !0, t && (this.code = t), r && (this.config = r), s && (this.request = s), i && (this.response = i, this.status = i.status);
|
|
570
579
|
}
|
|
571
580
|
toJSON() {
|
|
572
|
-
const e = this.config, t = e && a.hasOwnProp(e, "redact") ? e.redact : void 0, r = a.isArray(t) && t.length > 0 ?
|
|
581
|
+
const e = this.config, t = e && a.hasOwnProp(e, "redact") ? e.redact : void 0, r = a.isArray(t) && t.length > 0 ? mr(e, t) : a.toJSONObject(e);
|
|
573
582
|
return {
|
|
574
583
|
// Standard
|
|
575
584
|
message: this.message,
|
|
@@ -603,22 +612,22 @@ b.ERR_CANCELED = "ERR_CANCELED";
|
|
|
603
612
|
b.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
604
613
|
b.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
605
614
|
b.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
606
|
-
const
|
|
615
|
+
const br = null;
|
|
607
616
|
function Je(n) {
|
|
608
617
|
return a.isPlainObject(n) || a.isArray(n);
|
|
609
618
|
}
|
|
610
|
-
function
|
|
619
|
+
function zt(n) {
|
|
611
620
|
return a.endsWith(n, "[]") ? n.slice(0, -2) : n;
|
|
612
621
|
}
|
|
613
|
-
function
|
|
622
|
+
function Be(n, e, t) {
|
|
614
623
|
return n ? n.concat(e).map(function(s, i) {
|
|
615
|
-
return s =
|
|
624
|
+
return s = zt(s), !t && i ? "[" + s + "]" : s;
|
|
616
625
|
}).join(t ? "." : "") : e;
|
|
617
626
|
}
|
|
618
|
-
function
|
|
627
|
+
function _r(n) {
|
|
619
628
|
return a.isArray(n) && !n.some(Je);
|
|
620
629
|
}
|
|
621
|
-
const
|
|
630
|
+
const yr = a.toFlatObject(a, {}, null, function(e) {
|
|
622
631
|
return /^is[A-Z]/.test(e);
|
|
623
632
|
});
|
|
624
633
|
function De(n, e, t) {
|
|
@@ -652,22 +661,22 @@ function De(n, e, t) {
|
|
|
652
661
|
function h(p, f, g) {
|
|
653
662
|
let w = p;
|
|
654
663
|
if (a.isReactNative(e) && a.isReactNativeBlob(p))
|
|
655
|
-
return e.append(
|
|
664
|
+
return e.append(Be(g, f, i), l(p)), !1;
|
|
656
665
|
if (p && !g && typeof p == "object") {
|
|
657
666
|
if (a.endsWith(f, "{}"))
|
|
658
667
|
f = r ? f : f.slice(0, -2), p = JSON.stringify(p);
|
|
659
|
-
else if (a.isArray(p) &&
|
|
660
|
-
return f =
|
|
668
|
+
else if (a.isArray(p) && _r(p) || (a.isFileList(p) || a.endsWith(f, "[]")) && (w = a.toArray(p)))
|
|
669
|
+
return f = zt(f), w.forEach(function(R, T) {
|
|
661
670
|
!(a.isUndefined(R) || R === null) && e.append(
|
|
662
671
|
// eslint-disable-next-line no-nested-ternary
|
|
663
|
-
o === !0 ?
|
|
672
|
+
o === !0 ? Be([f], T, i) : o === null ? f : f + "[]",
|
|
664
673
|
l(R)
|
|
665
674
|
);
|
|
666
675
|
}), !1;
|
|
667
676
|
}
|
|
668
|
-
return Je(p) ? !0 : (e.append(
|
|
677
|
+
return Je(p) ? !0 : (e.append(Be(g, f, i), l(p)), !1);
|
|
669
678
|
}
|
|
670
|
-
const _ = [], m = Object.assign(
|
|
679
|
+
const _ = [], m = Object.assign(yr, {
|
|
671
680
|
defaultVisitor: h,
|
|
672
681
|
convertValue: l,
|
|
673
682
|
isVisitable: Je
|
|
@@ -690,7 +699,7 @@ function De(n, e, t) {
|
|
|
690
699
|
throw new TypeError("data must be an object");
|
|
691
700
|
return y(n), e;
|
|
692
701
|
}
|
|
693
|
-
function
|
|
702
|
+
function ht(n) {
|
|
694
703
|
const e = {
|
|
695
704
|
"!": "%21",
|
|
696
705
|
"'": "%27",
|
|
@@ -703,38 +712,38 @@ function dt(n) {
|
|
|
703
712
|
return e[r];
|
|
704
713
|
});
|
|
705
714
|
}
|
|
706
|
-
function
|
|
715
|
+
function Ye(n, e) {
|
|
707
716
|
this._pairs = [], n && De(n, this, e);
|
|
708
717
|
}
|
|
709
|
-
const
|
|
710
|
-
|
|
718
|
+
const Vt = Ye.prototype;
|
|
719
|
+
Vt.append = function(e, t) {
|
|
711
720
|
this._pairs.push([e, t]);
|
|
712
721
|
};
|
|
713
|
-
|
|
722
|
+
Vt.toString = function(e) {
|
|
714
723
|
const t = e ? function(r) {
|
|
715
|
-
return e.call(this, r,
|
|
716
|
-
} :
|
|
724
|
+
return e.call(this, r, ht);
|
|
725
|
+
} : ht;
|
|
717
726
|
return this._pairs.map(function(s) {
|
|
718
727
|
return t(s[0]) + "=" + t(s[1]);
|
|
719
728
|
}, "").join("&");
|
|
720
729
|
};
|
|
721
|
-
function
|
|
730
|
+
function wr(n) {
|
|
722
731
|
return encodeURIComponent(n).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
723
732
|
}
|
|
724
|
-
function
|
|
733
|
+
function Jt(n, e, t) {
|
|
725
734
|
if (!e)
|
|
726
735
|
return n;
|
|
727
|
-
const r = t && t.encode ||
|
|
736
|
+
const r = t && t.encode || wr, s = a.isFunction(t) ? {
|
|
728
737
|
serialize: t
|
|
729
738
|
} : t, i = s && s.serialize;
|
|
730
739
|
let o;
|
|
731
|
-
if (i ? o = i(e, s) : o = a.isURLSearchParams(e) ? e.toString() : new
|
|
740
|
+
if (i ? o = i(e, s) : o = a.isURLSearchParams(e) ? e.toString() : new Ye(e, s).toString(r), o) {
|
|
732
741
|
const c = n.indexOf("#");
|
|
733
742
|
c !== -1 && (n = n.slice(0, c)), n += (n.indexOf("?") === -1 ? "?" : "&") + o;
|
|
734
743
|
}
|
|
735
744
|
return n;
|
|
736
745
|
}
|
|
737
|
-
class
|
|
746
|
+
class ft {
|
|
738
747
|
constructor() {
|
|
739
748
|
this.handlers = [];
|
|
740
749
|
}
|
|
@@ -794,27 +803,27 @@ const Ze = {
|
|
|
794
803
|
forcedJSONParsing: !0,
|
|
795
804
|
clarifyTimeoutError: !1,
|
|
796
805
|
legacyInterceptorReqResOrdering: !0
|
|
797
|
-
},
|
|
806
|
+
}, Er = typeof URLSearchParams < "u" ? URLSearchParams : Ye, Sr = typeof FormData < "u" ? FormData : null, Rr = typeof Blob < "u" ? Blob : null, xr = {
|
|
798
807
|
isBrowser: !0,
|
|
799
808
|
classes: {
|
|
800
|
-
URLSearchParams:
|
|
801
|
-
FormData:
|
|
802
|
-
Blob:
|
|
809
|
+
URLSearchParams: Er,
|
|
810
|
+
FormData: Sr,
|
|
811
|
+
Blob: Rr
|
|
803
812
|
},
|
|
804
813
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
805
|
-
},
|
|
806
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
814
|
+
}, et = typeof window < "u" && typeof document < "u", We = typeof navigator == "object" && navigator || void 0, Or = et && (!We || ["ReactNative", "NativeScript", "NS"].indexOf(We.product) < 0), Ar = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
815
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Cr = et && window.location.href || "http://localhost", Tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
807
816
|
__proto__: null,
|
|
808
|
-
hasBrowserEnv:
|
|
809
|
-
hasStandardBrowserEnv:
|
|
810
|
-
hasStandardBrowserWebWorkerEnv:
|
|
817
|
+
hasBrowserEnv: et,
|
|
818
|
+
hasStandardBrowserEnv: Or,
|
|
819
|
+
hasStandardBrowserWebWorkerEnv: Ar,
|
|
811
820
|
navigator: We,
|
|
812
|
-
origin:
|
|
821
|
+
origin: Cr
|
|
813
822
|
}, Symbol.toStringTag, { value: "Module" })), L = {
|
|
814
|
-
...
|
|
815
|
-
...
|
|
823
|
+
...Tr,
|
|
824
|
+
...xr
|
|
816
825
|
};
|
|
817
|
-
function
|
|
826
|
+
function Nr(n, e) {
|
|
818
827
|
return De(n, new L.classes.URLSearchParams(), {
|
|
819
828
|
visitor: function(t, r, s, i) {
|
|
820
829
|
return L.isNode && a.isBuffer(t) ? (this.append(r, t.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
@@ -822,10 +831,10 @@ function Or(n, e) {
|
|
|
822
831
|
...e
|
|
823
832
|
});
|
|
824
833
|
}
|
|
825
|
-
function
|
|
834
|
+
function Pr(n) {
|
|
826
835
|
return a.matchAll(/\w+|\[(\w*)]/g, n).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
827
836
|
}
|
|
828
|
-
function
|
|
837
|
+
function kr(n) {
|
|
829
838
|
const e = {}, t = Object.keys(n);
|
|
830
839
|
let r;
|
|
831
840
|
const s = t.length;
|
|
@@ -834,23 +843,23 @@ function Cr(n) {
|
|
|
834
843
|
i = t[r], e[i] = n[i];
|
|
835
844
|
return e;
|
|
836
845
|
}
|
|
837
|
-
function
|
|
846
|
+
function Wt(n) {
|
|
838
847
|
function e(t, r, s, i) {
|
|
839
848
|
let o = t[i++];
|
|
840
849
|
if (o === "__proto__") return !0;
|
|
841
850
|
const c = Number.isFinite(+o), u = i >= t.length;
|
|
842
|
-
return o = !o && a.isArray(s) ? s.length : o, u ? (a.hasOwnProp(s, o) ? s[o] = a.isArray(s[o]) ? s[o].concat(r) : [s[o], r] : s[o] = r, !c) : ((!s
|
|
851
|
+
return o = !o && a.isArray(s) ? s.length : o, u ? (a.hasOwnProp(s, o) ? s[o] = a.isArray(s[o]) ? s[o].concat(r) : [s[o], r] : s[o] = r, !c) : ((!a.hasOwnProp(s, o) || !a.isObject(s[o])) && (s[o] = []), e(t, r, s[o], i) && a.isArray(s[o]) && (s[o] = kr(s[o])), !c);
|
|
843
852
|
}
|
|
844
853
|
if (a.isFormData(n) && a.isFunction(n.entries)) {
|
|
845
854
|
const t = {};
|
|
846
855
|
return a.forEachEntry(n, (r, s) => {
|
|
847
|
-
e(
|
|
856
|
+
e(Pr(r), s, t, 0);
|
|
848
857
|
}), t;
|
|
849
858
|
}
|
|
850
859
|
return null;
|
|
851
860
|
}
|
|
852
861
|
const re = (n, e) => n != null && a.hasOwnProp(n, e) ? n[e] : void 0;
|
|
853
|
-
function
|
|
862
|
+
function Ir(n, e, t) {
|
|
854
863
|
if (a.isString(n))
|
|
855
864
|
try {
|
|
856
865
|
return (e || JSON.parse)(n), a.trim(n);
|
|
@@ -867,7 +876,7 @@ const me = {
|
|
|
867
876
|
function(e, t) {
|
|
868
877
|
const r = t.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(e);
|
|
869
878
|
if (i && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e))
|
|
870
|
-
return s ? JSON.stringify(
|
|
879
|
+
return s ? JSON.stringify(Wt(e)) : e;
|
|
871
880
|
if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e) || a.isReadableStream(e))
|
|
872
881
|
return e;
|
|
873
882
|
if (a.isArrayBufferView(e))
|
|
@@ -878,7 +887,7 @@ const me = {
|
|
|
878
887
|
if (i) {
|
|
879
888
|
const u = re(this, "formSerializer");
|
|
880
889
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
881
|
-
return
|
|
890
|
+
return Nr(e, u).toString();
|
|
882
891
|
if ((c = a.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
|
|
883
892
|
const d = re(this, "env"), l = d && d.FormData;
|
|
884
893
|
return De(
|
|
@@ -888,7 +897,7 @@ const me = {
|
|
|
888
897
|
);
|
|
889
898
|
}
|
|
890
899
|
}
|
|
891
|
-
return i || s ? (t.setContentType("application/json", !1),
|
|
900
|
+
return i || s ? (t.setContentType("application/json", !1), Ir(e)) : e;
|
|
892
901
|
}
|
|
893
902
|
],
|
|
894
903
|
transformResponse: [
|
|
@@ -934,14 +943,14 @@ const me = {
|
|
|
934
943
|
a.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (n) => {
|
|
935
944
|
me.headers[n] = {};
|
|
936
945
|
});
|
|
937
|
-
function
|
|
946
|
+
function qe(n, e) {
|
|
938
947
|
const t = this || me, r = e || t, s = v.from(r.headers);
|
|
939
948
|
let i = r.data;
|
|
940
949
|
return a.forEach(n, function(c) {
|
|
941
950
|
i = c.call(t, i, s.normalize(), e ? e.status : void 0);
|
|
942
951
|
}), s.normalize(), i;
|
|
943
952
|
}
|
|
944
|
-
function
|
|
953
|
+
function Kt(n) {
|
|
945
954
|
return !!(n && n.__CANCEL__);
|
|
946
955
|
}
|
|
947
956
|
let be = class extends b {
|
|
@@ -958,7 +967,7 @@ let be = class extends b {
|
|
|
958
967
|
super(e ?? "canceled", b.ERR_CANCELED, t, r), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
959
968
|
}
|
|
960
969
|
};
|
|
961
|
-
function
|
|
970
|
+
function Xt(n, e, t) {
|
|
962
971
|
const r = t.config.validateStatus;
|
|
963
972
|
!t.status || !r || r(t.status) ? n(t) : e(new b(
|
|
964
973
|
"Request failed with status code " + t.status,
|
|
@@ -968,11 +977,11 @@ function Wt(n, e, t) {
|
|
|
968
977
|
t
|
|
969
978
|
));
|
|
970
979
|
}
|
|
971
|
-
function
|
|
980
|
+
function Lr(n) {
|
|
972
981
|
const e = /^([-+\w]{1,25}):(?:\/\/)?/.exec(n);
|
|
973
982
|
return e && e[1] || "";
|
|
974
983
|
}
|
|
975
|
-
function
|
|
984
|
+
function Dr(n, e) {
|
|
976
985
|
n = n || 10;
|
|
977
986
|
const t = new Array(n), r = new Array(n);
|
|
978
987
|
let s = 0, i = 0, o;
|
|
@@ -988,7 +997,7 @@ function Pr(n, e) {
|
|
|
988
997
|
return m ? Math.round(_ * 1e3 / m) : void 0;
|
|
989
998
|
};
|
|
990
999
|
}
|
|
991
|
-
function
|
|
1000
|
+
function vr(n, e) {
|
|
992
1001
|
let t = 0, r = 1e3 / e, s, i;
|
|
993
1002
|
const o = (d, l = Date.now()) => {
|
|
994
1003
|
t = l, s = null, i && (clearTimeout(i), i = null), n(...d);
|
|
@@ -1002,8 +1011,10 @@ function kr(n, e) {
|
|
|
1002
1011
|
}
|
|
1003
1012
|
const Ne = (n, e, t = 3) => {
|
|
1004
1013
|
let r = 0;
|
|
1005
|
-
const s =
|
|
1006
|
-
return
|
|
1014
|
+
const s = Dr(50, 250);
|
|
1015
|
+
return vr((i) => {
|
|
1016
|
+
if (!i || typeof i.loaded != "number")
|
|
1017
|
+
return;
|
|
1007
1018
|
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, u = c != null ? Math.min(o, c) : o, d = Math.max(0, u - r), l = s(d);
|
|
1008
1019
|
r = Math.max(r, u);
|
|
1009
1020
|
const h = {
|
|
@@ -1019,7 +1030,7 @@ const Ne = (n, e, t = 3) => {
|
|
|
1019
1030
|
};
|
|
1020
1031
|
n(h);
|
|
1021
1032
|
}, t);
|
|
1022
|
-
},
|
|
1033
|
+
}, pt = (n, e) => {
|
|
1023
1034
|
const t = n != null;
|
|
1024
1035
|
return [
|
|
1025
1036
|
(r) => e[0]({
|
|
@@ -1029,10 +1040,10 @@ const Ne = (n, e, t = 3) => {
|
|
|
1029
1040
|
}),
|
|
1030
1041
|
e[1]
|
|
1031
1042
|
];
|
|
1032
|
-
},
|
|
1043
|
+
}, gt = (n) => (...e) => a.asap(() => n(...e)), Fr = L.hasStandardBrowserEnv ? /* @__PURE__ */ ((n, e) => (t) => (t = new URL(t, L.origin), n.protocol === t.protocol && n.host === t.host && (e || n.port === t.port)))(
|
|
1033
1044
|
new URL(L.origin),
|
|
1034
1045
|
L.navigator && /(msie|trident)/i.test(L.navigator.userAgent)
|
|
1035
|
-
) : () => !0,
|
|
1046
|
+
) : () => !0, jr = L.hasStandardBrowserEnv ? (
|
|
1036
1047
|
// Standard browser envs support document.cookie
|
|
1037
1048
|
{
|
|
1038
1049
|
write(n, e, t, r, s, i, o) {
|
|
@@ -1066,17 +1077,17 @@ const Ne = (n, e, t = 3) => {
|
|
|
1066
1077
|
}
|
|
1067
1078
|
}
|
|
1068
1079
|
);
|
|
1069
|
-
function
|
|
1080
|
+
function Ur(n) {
|
|
1070
1081
|
return typeof n != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(n);
|
|
1071
1082
|
}
|
|
1072
|
-
function
|
|
1083
|
+
function $r(n, e) {
|
|
1073
1084
|
return e ? n.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : n;
|
|
1074
1085
|
}
|
|
1075
|
-
function
|
|
1076
|
-
let r = !
|
|
1077
|
-
return n && (r || t === !1) ?
|
|
1086
|
+
function Gt(n, e, t) {
|
|
1087
|
+
let r = !Ur(e);
|
|
1088
|
+
return n && (r || t === !1) ? $r(n, e) : e;
|
|
1078
1089
|
}
|
|
1079
|
-
const
|
|
1090
|
+
const mt = (n) => n instanceof v ? { ...n } : n;
|
|
1080
1091
|
function te(n, e) {
|
|
1081
1092
|
e = e || {};
|
|
1082
1093
|
const t = /* @__PURE__ */ Object.create(null);
|
|
@@ -1144,7 +1155,7 @@ function te(n, e) {
|
|
|
1144
1155
|
allowedSocketPaths: o,
|
|
1145
1156
|
responseEncoding: o,
|
|
1146
1157
|
validateStatus: c,
|
|
1147
|
-
headers: (d, l, h) => s(
|
|
1158
|
+
headers: (d, l, h) => s(mt(d), mt(l), h, !0)
|
|
1148
1159
|
};
|
|
1149
1160
|
return a.forEach(Object.keys({ ...n, ...e }), function(l) {
|
|
1150
1161
|
if (l === "__proto__" || l === "constructor" || l === "prototype") return;
|
|
@@ -1152,40 +1163,40 @@ function te(n, e) {
|
|
|
1152
1163
|
a.isUndefined(y) && h !== c || (t[l] = y);
|
|
1153
1164
|
}), t;
|
|
1154
1165
|
}
|
|
1155
|
-
const
|
|
1156
|
-
function
|
|
1166
|
+
const Br = ["content-type", "content-length"];
|
|
1167
|
+
function qr(n, e, t) {
|
|
1157
1168
|
if (t !== "content-only") {
|
|
1158
1169
|
n.set(e);
|
|
1159
1170
|
return;
|
|
1160
1171
|
}
|
|
1161
1172
|
Object.entries(e).forEach(([r, s]) => {
|
|
1162
|
-
|
|
1173
|
+
Br.includes(r.toLowerCase()) && n.set(r, s);
|
|
1163
1174
|
});
|
|
1164
1175
|
}
|
|
1165
|
-
const
|
|
1176
|
+
const Mr = (n) => encodeURIComponent(n).replace(
|
|
1166
1177
|
/%([0-9A-F]{2})/gi,
|
|
1167
1178
|
(e, t) => String.fromCharCode(parseInt(t, 16))
|
|
1168
|
-
),
|
|
1179
|
+
), Qt = (n) => {
|
|
1169
1180
|
const e = te({}, n), t = (_) => a.hasOwnProp(e, _) ? e[_] : void 0, r = t("data");
|
|
1170
1181
|
let s = t("withXSRFToken");
|
|
1171
1182
|
const i = t("xsrfHeaderName"), o = t("xsrfCookieName");
|
|
1172
1183
|
let c = t("headers");
|
|
1173
1184
|
const u = t("auth"), d = t("baseURL"), l = t("allowAbsoluteUrls"), h = t("url");
|
|
1174
|
-
if (e.headers = c = v.from(c), e.url =
|
|
1175
|
-
|
|
1185
|
+
if (e.headers = c = v.from(c), e.url = Jt(
|
|
1186
|
+
Gt(d, h, l),
|
|
1176
1187
|
n.params,
|
|
1177
1188
|
n.paramsSerializer
|
|
1178
1189
|
), u && c.set(
|
|
1179
1190
|
"Authorization",
|
|
1180
|
-
"Basic " + btoa((u.username || "") + ":" + (u.password ?
|
|
1181
|
-
), a.isFormData(r) && (L.hasStandardBrowserEnv || L.hasStandardBrowserWebWorkerEnv ? c.setContentType(void 0) : a.isFunction(r.getHeaders) &&
|
|
1182
|
-
const m = i && o &&
|
|
1191
|
+
"Basic " + btoa((u.username || "") + ":" + (u.password ? Mr(u.password) : ""))
|
|
1192
|
+
), a.isFormData(r) && (L.hasStandardBrowserEnv || L.hasStandardBrowserWebWorkerEnv ? c.setContentType(void 0) : a.isFunction(r.getHeaders) && qr(c, r.getHeaders(), t("formDataHeaderPolicy"))), L.hasStandardBrowserEnv && (a.isFunction(s) && (s = s(e)), s === !0 || s == null && Fr(e.url))) {
|
|
1193
|
+
const m = i && o && jr.read(o);
|
|
1183
1194
|
m && c.set(i, m);
|
|
1184
1195
|
}
|
|
1185
1196
|
return e;
|
|
1186
|
-
},
|
|
1197
|
+
}, Hr = typeof XMLHttpRequest < "u", zr = Hr && function(n) {
|
|
1187
1198
|
return new Promise(function(t, r) {
|
|
1188
|
-
const s =
|
|
1199
|
+
const s = Qt(n);
|
|
1189
1200
|
let i = s.data;
|
|
1190
1201
|
const o = v.from(s.headers).normalize();
|
|
1191
1202
|
let { responseType: c, onUploadProgress: u, onDownloadProgress: d } = s, l, h, _, m, y;
|
|
@@ -1207,7 +1218,7 @@ const Ur = (n) => encodeURIComponent(n).replace(
|
|
|
1207
1218
|
config: n,
|
|
1208
1219
|
request: f
|
|
1209
1220
|
};
|
|
1210
|
-
|
|
1221
|
+
Xt(
|
|
1211
1222
|
function(V) {
|
|
1212
1223
|
t(V), p();
|
|
1213
1224
|
},
|
|
@@ -1222,8 +1233,8 @@ const Ur = (n) => encodeURIComponent(n).replace(
|
|
|
1222
1233
|
}, f.onabort = function() {
|
|
1223
1234
|
f && (r(new b("Request aborted", b.ECONNABORTED, n, f)), p(), f = null);
|
|
1224
1235
|
}, f.onerror = function(R) {
|
|
1225
|
-
const T = R && R.message ? R.message : "Network Error",
|
|
1226
|
-
|
|
1236
|
+
const T = R && R.message ? R.message : "Network Error", B = new b(T, b.ERR_NETWORK, n, f);
|
|
1237
|
+
B.event = R || null, r(B), p(), f = null;
|
|
1227
1238
|
}, f.ontimeout = function() {
|
|
1228
1239
|
let R = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1229
1240
|
const T = s.transitional || Ze;
|
|
@@ -1235,12 +1246,12 @@ const Ur = (n) => encodeURIComponent(n).replace(
|
|
|
1235
1246
|
f
|
|
1236
1247
|
)
|
|
1237
1248
|
), p(), f = null;
|
|
1238
|
-
}, i === void 0 && o.setContentType(null), "setRequestHeader" in f && a.forEach(o
|
|
1249
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in f && a.forEach(Mt(o), function(R, T) {
|
|
1239
1250
|
f.setRequestHeader(T, R);
|
|
1240
1251
|
}), a.isUndefined(s.withCredentials) || (f.withCredentials = !!s.withCredentials), c && c !== "json" && (f.responseType = s.responseType), d && ([_, y] = Ne(d, !0), f.addEventListener("progress", _)), u && f.upload && ([h, m] = Ne(u), f.upload.addEventListener("progress", h), f.upload.addEventListener("loadend", m)), (s.cancelToken || s.signal) && (l = (S) => {
|
|
1241
1252
|
f && (r(!S || S.type ? new be(null, n, f) : S), f.abort(), p(), f = null);
|
|
1242
1253
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1243
|
-
const w =
|
|
1254
|
+
const w = Lr(s.url);
|
|
1244
1255
|
if (w && !L.protocols.includes(w)) {
|
|
1245
1256
|
r(
|
|
1246
1257
|
new b(
|
|
@@ -1253,32 +1264,32 @@ const Ur = (n) => encodeURIComponent(n).replace(
|
|
|
1253
1264
|
}
|
|
1254
1265
|
f.send(i || null);
|
|
1255
1266
|
});
|
|
1256
|
-
},
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
)
|
|
1267
|
-
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
};
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
},
|
|
1267
|
+
}, Vr = (n, e) => {
|
|
1268
|
+
if (n = n ? n.filter(Boolean) : [], !e && !n.length)
|
|
1269
|
+
return;
|
|
1270
|
+
const t = new AbortController();
|
|
1271
|
+
let r = !1;
|
|
1272
|
+
const s = function(u) {
|
|
1273
|
+
if (!r) {
|
|
1274
|
+
r = !0, o();
|
|
1275
|
+
const d = u instanceof Error ? u : this.reason;
|
|
1276
|
+
t.abort(
|
|
1277
|
+
d instanceof b ? d : new be(d instanceof Error ? d.message : d)
|
|
1278
|
+
);
|
|
1279
|
+
}
|
|
1280
|
+
};
|
|
1281
|
+
let i = e && setTimeout(() => {
|
|
1282
|
+
i = null, s(new b(`timeout of ${e}ms exceeded`, b.ETIMEDOUT));
|
|
1283
|
+
}, e);
|
|
1284
|
+
const o = () => {
|
|
1285
|
+
n && (i && clearTimeout(i), i = null, n.forEach((u) => {
|
|
1286
|
+
u.unsubscribe ? u.unsubscribe(s) : u.removeEventListener("abort", s);
|
|
1287
|
+
}), n = null);
|
|
1288
|
+
};
|
|
1289
|
+
n.forEach((u) => u.addEventListener("abort", s));
|
|
1290
|
+
const { signal: c } = t;
|
|
1291
|
+
return c.unsubscribe = () => a.asap(o), c;
|
|
1292
|
+
}, Jr = function* (n, e) {
|
|
1282
1293
|
let t = n.byteLength;
|
|
1283
1294
|
if (t < e) {
|
|
1284
1295
|
yield n;
|
|
@@ -1287,10 +1298,10 @@ const Ur = (n) => encodeURIComponent(n).replace(
|
|
|
1287
1298
|
let r = 0, s;
|
|
1288
1299
|
for (; r < t; )
|
|
1289
1300
|
s = r + e, yield n.slice(r, s), r = s;
|
|
1290
|
-
},
|
|
1291
|
-
for await (const t of
|
|
1292
|
-
yield*
|
|
1293
|
-
},
|
|
1301
|
+
}, Wr = async function* (n, e) {
|
|
1302
|
+
for await (const t of Kr(n))
|
|
1303
|
+
yield* Jr(t, e);
|
|
1304
|
+
}, Kr = async function* (n) {
|
|
1294
1305
|
if (n[Symbol.asyncIterator]) {
|
|
1295
1306
|
yield* n;
|
|
1296
1307
|
return;
|
|
@@ -1306,8 +1317,8 @@ const Ur = (n) => encodeURIComponent(n).replace(
|
|
|
1306
1317
|
} finally {
|
|
1307
1318
|
await e.cancel();
|
|
1308
1319
|
}
|
|
1309
|
-
},
|
|
1310
|
-
const s =
|
|
1320
|
+
}, bt = (n, e, t, r) => {
|
|
1321
|
+
const s = Wr(n, e);
|
|
1311
1322
|
let i = 0, o, c = (u) => {
|
|
1312
1323
|
o || (o = !0, r && r(u));
|
|
1313
1324
|
};
|
|
@@ -1339,7 +1350,7 @@ const Ur = (n) => encodeURIComponent(n).replace(
|
|
|
1339
1350
|
}
|
|
1340
1351
|
);
|
|
1341
1352
|
};
|
|
1342
|
-
function
|
|
1353
|
+
function Xr(n) {
|
|
1343
1354
|
if (!n || typeof n != "string" || !n.startsWith("data:")) return 0;
|
|
1344
1355
|
const e = n.indexOf(",");
|
|
1345
1356
|
if (e < 0) return 0;
|
|
@@ -1377,14 +1388,14 @@ function Vr(n) {
|
|
|
1377
1388
|
}
|
|
1378
1389
|
return i;
|
|
1379
1390
|
}
|
|
1380
|
-
const
|
|
1391
|
+
const tt = "1.16.1", _t = 64 * 1024, { isFunction: Se } = a, yt = (n, ...e) => {
|
|
1381
1392
|
try {
|
|
1382
1393
|
return !!n(...e);
|
|
1383
1394
|
} catch {
|
|
1384
1395
|
return !1;
|
|
1385
1396
|
}
|
|
1386
|
-
},
|
|
1387
|
-
const e = a.global
|
|
1397
|
+
}, Gr = (n) => {
|
|
1398
|
+
const e = a.global !== void 0 && a.global !== null ? a.global : globalThis, { ReadableStream: t, TextEncoder: r } = e;
|
|
1388
1399
|
n = a.merge.call(
|
|
1389
1400
|
{
|
|
1390
1401
|
skipUndefined: !0
|
|
@@ -1398,7 +1409,7 @@ const et = "1.16.0", bt = 64 * 1024, { isFunction: Se } = a, _t = (n, ...e) => {
|
|
|
1398
1409
|
const { fetch: s, Request: i, Response: o } = n, c = s ? Se(s) : typeof fetch == "function", u = Se(i), d = Se(o);
|
|
1399
1410
|
if (!c)
|
|
1400
1411
|
return !1;
|
|
1401
|
-
const l = c && Se(t), h = c && (typeof r == "function" ? /* @__PURE__ */ ((g) => (w) => g.encode(w))(new r()) : async (g) => new Uint8Array(await new i(g).arrayBuffer())), _ = u && l &&
|
|
1412
|
+
const l = c && Se(t), h = c && (typeof r == "function" ? /* @__PURE__ */ ((g) => (w) => g.encode(w))(new r()) : async (g) => new Uint8Array(await new i(g).arrayBuffer())), _ = u && l && yt(() => {
|
|
1402
1413
|
let g = !1;
|
|
1403
1414
|
const w = new i(L.origin, {
|
|
1404
1415
|
body: new t(),
|
|
@@ -1408,7 +1419,7 @@ const et = "1.16.0", bt = 64 * 1024, { isFunction: Se } = a, _t = (n, ...e) => {
|
|
|
1408
1419
|
}
|
|
1409
1420
|
}), S = w.headers.has("Content-Type");
|
|
1410
1421
|
return w.body != null && w.body.cancel(), g && !S;
|
|
1411
|
-
}), m = d && l &&
|
|
1422
|
+
}), m = d && l && yt(() => a.isReadableStream(new o("").body)), y = {
|
|
1412
1423
|
stream: m && ((g) => g.body)
|
|
1413
1424
|
};
|
|
1414
1425
|
c && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((g) => {
|
|
@@ -1447,22 +1458,22 @@ const et = "1.16.0", bt = 64 * 1024, { isFunction: Se } = a, _t = (n, ...e) => {
|
|
|
1447
1458
|
method: S,
|
|
1448
1459
|
data: R,
|
|
1449
1460
|
signal: T,
|
|
1450
|
-
cancelToken:
|
|
1461
|
+
cancelToken: B,
|
|
1451
1462
|
timeout: V,
|
|
1452
1463
|
onDownloadProgress: G,
|
|
1453
1464
|
onUploadProgress: J,
|
|
1454
1465
|
responseType: j,
|
|
1455
1466
|
headers: D,
|
|
1456
|
-
withCredentials:
|
|
1467
|
+
withCredentials: q = "same-origin",
|
|
1457
1468
|
fetchOptions: K,
|
|
1458
1469
|
maxContentLength: P,
|
|
1459
1470
|
maxBodyLength: ce
|
|
1460
|
-
} =
|
|
1471
|
+
} = Qt(g);
|
|
1461
1472
|
const k = a.isNumber(P) && P > -1, E = a.isNumber(ce) && ce > -1;
|
|
1462
1473
|
let O = s || fetch;
|
|
1463
1474
|
j = j ? (j + "").toLowerCase() : "text";
|
|
1464
|
-
let N =
|
|
1465
|
-
[T,
|
|
1475
|
+
let N = Vr(
|
|
1476
|
+
[T, B && B.toAbortSignal()],
|
|
1466
1477
|
V
|
|
1467
1478
|
), C = null;
|
|
1468
1479
|
const U = N && N.unsubscribe && (() => {
|
|
@@ -1470,7 +1481,7 @@ const et = "1.16.0", bt = 64 * 1024, { isFunction: Se } = a, _t = (n, ...e) => {
|
|
|
1470
1481
|
});
|
|
1471
1482
|
let ae;
|
|
1472
1483
|
try {
|
|
1473
|
-
if (k && typeof w == "string" && w.startsWith("data:") &&
|
|
1484
|
+
if (k && typeof w == "string" && w.startsWith("data:") && Xr(w) > P)
|
|
1474
1485
|
throw new b(
|
|
1475
1486
|
"maxContentLength size of " + P + " exceeded",
|
|
1476
1487
|
b.ERR_BAD_RESPONSE,
|
|
@@ -1494,28 +1505,28 @@ const et = "1.16.0", bt = 64 * 1024, { isFunction: Se } = a, _t = (n, ...e) => {
|
|
|
1494
1505
|
duplex: "half"
|
|
1495
1506
|
}), ne;
|
|
1496
1507
|
if (a.isFormData(R) && (ne = x.headers.get("content-type")) && D.setContentType(ne), x.body) {
|
|
1497
|
-
const [we, Ee] =
|
|
1508
|
+
const [we, Ee] = pt(
|
|
1498
1509
|
ae,
|
|
1499
|
-
Ne(
|
|
1510
|
+
Ne(gt(J))
|
|
1500
1511
|
);
|
|
1501
|
-
R =
|
|
1512
|
+
R = bt(x.body, _t, we, Ee);
|
|
1502
1513
|
}
|
|
1503
1514
|
}
|
|
1504
|
-
a.isString(
|
|
1515
|
+
a.isString(q) || (q = q ? "include" : "omit");
|
|
1505
1516
|
const I = u && "credentials" in i.prototype;
|
|
1506
1517
|
if (a.isFormData(R)) {
|
|
1507
1518
|
const x = D.getContentType();
|
|
1508
1519
|
x && /^multipart\/form-data/i.test(x) && !/boundary=/i.test(x) && D.delete("content-type");
|
|
1509
1520
|
}
|
|
1510
|
-
D.set("User-Agent", "axios/" +
|
|
1521
|
+
D.set("User-Agent", "axios/" + tt, !1);
|
|
1511
1522
|
const X = {
|
|
1512
1523
|
...K,
|
|
1513
1524
|
signal: N,
|
|
1514
1525
|
method: S.toUpperCase(),
|
|
1515
|
-
headers: D.normalize()
|
|
1526
|
+
headers: Mt(D.normalize()),
|
|
1516
1527
|
body: R,
|
|
1517
1528
|
duplex: "half",
|
|
1518
|
-
credentials: I ?
|
|
1529
|
+
credentials: I ? q : void 0
|
|
1519
1530
|
};
|
|
1520
1531
|
C = u && new i(w, X);
|
|
1521
1532
|
let z = await (u ? O(C, K) : O(w, X));
|
|
@@ -1535,13 +1546,13 @@ const et = "1.16.0", bt = 64 * 1024, { isFunction: Se } = a, _t = (n, ...e) => {
|
|
|
1535
1546
|
["status", "statusText", "headers"].forEach((le) => {
|
|
1536
1547
|
x[le] = z[le];
|
|
1537
1548
|
});
|
|
1538
|
-
const ne = a.toFiniteNumber(z.headers.get("content-length")), [we, Ee] = G &&
|
|
1549
|
+
const ne = a.toFiniteNumber(z.headers.get("content-length")), [we, Ee] = G && pt(
|
|
1539
1550
|
ne,
|
|
1540
|
-
Ne(
|
|
1551
|
+
Ne(gt(G), !0)
|
|
1541
1552
|
) || [];
|
|
1542
|
-
let
|
|
1543
|
-
const
|
|
1544
|
-
if (k && (
|
|
1553
|
+
let at = 0;
|
|
1554
|
+
const pn = (le) => {
|
|
1555
|
+
if (k && (at = le, at > P))
|
|
1545
1556
|
throw new b(
|
|
1546
1557
|
"maxContentLength size of " + P + " exceeded",
|
|
1547
1558
|
b.ERR_BAD_RESPONSE,
|
|
@@ -1551,7 +1562,7 @@ const et = "1.16.0", bt = 64 * 1024, { isFunction: Se } = a, _t = (n, ...e) => {
|
|
|
1551
1562
|
we && we(le);
|
|
1552
1563
|
};
|
|
1553
1564
|
z = new o(
|
|
1554
|
-
|
|
1565
|
+
bt(z.body, _t, pn, () => {
|
|
1555
1566
|
Ee && Ee(), U && U();
|
|
1556
1567
|
}),
|
|
1557
1568
|
x
|
|
@@ -1573,7 +1584,7 @@ const et = "1.16.0", bt = 64 * 1024, { isFunction: Se } = a, _t = (n, ...e) => {
|
|
|
1573
1584
|
);
|
|
1574
1585
|
}
|
|
1575
1586
|
return !Ue && U && U(), await new Promise((x, ne) => {
|
|
1576
|
-
|
|
1587
|
+
Xt(x, ne, {
|
|
1577
1588
|
data: W,
|
|
1578
1589
|
headers: v.from(z.headers),
|
|
1579
1590
|
status: z.status,
|
|
@@ -1601,23 +1612,23 @@ const et = "1.16.0", bt = 64 * 1024, { isFunction: Se } = a, _t = (n, ...e) => {
|
|
|
1601
1612
|
) : b.from(I, I && I.code, g, C, I && I.response);
|
|
1602
1613
|
}
|
|
1603
1614
|
};
|
|
1604
|
-
},
|
|
1615
|
+
}, Qr = /* @__PURE__ */ new Map(), Yt = (n) => {
|
|
1605
1616
|
let e = n && n.env || {};
|
|
1606
1617
|
const { fetch: t, Request: r, Response: s } = e, i = [r, s, t];
|
|
1607
|
-
let o = i.length, c = o, u, d, l =
|
|
1618
|
+
let o = i.length, c = o, u, d, l = Qr;
|
|
1608
1619
|
for (; c--; )
|
|
1609
|
-
u = i[c], d = l.get(u), d === void 0 && l.set(u, d = c ? /* @__PURE__ */ new Map() :
|
|
1620
|
+
u = i[c], d = l.get(u), d === void 0 && l.set(u, d = c ? /* @__PURE__ */ new Map() : Gr(e)), l = d;
|
|
1610
1621
|
return d;
|
|
1611
1622
|
};
|
|
1612
|
-
|
|
1613
|
-
const
|
|
1614
|
-
http:
|
|
1615
|
-
xhr:
|
|
1623
|
+
Yt();
|
|
1624
|
+
const nt = {
|
|
1625
|
+
http: br,
|
|
1626
|
+
xhr: zr,
|
|
1616
1627
|
fetch: {
|
|
1617
|
-
get:
|
|
1628
|
+
get: Yt
|
|
1618
1629
|
}
|
|
1619
1630
|
};
|
|
1620
|
-
a.forEach(
|
|
1631
|
+
a.forEach(nt, (n, e) => {
|
|
1621
1632
|
if (n) {
|
|
1622
1633
|
try {
|
|
1623
1634
|
Object.defineProperty(n, "name", { __proto__: null, value: e });
|
|
@@ -1626,8 +1637,8 @@ a.forEach(tt, (n, e) => {
|
|
|
1626
1637
|
Object.defineProperty(n, "adapterName", { __proto__: null, value: e });
|
|
1627
1638
|
}
|
|
1628
1639
|
});
|
|
1629
|
-
const
|
|
1630
|
-
function
|
|
1640
|
+
const wt = (n) => `- ${n}`, Yr = (n) => a.isFunction(n) || n === null || n === !1;
|
|
1641
|
+
function Zr(n, e) {
|
|
1631
1642
|
n = a.isArray(n) ? n : [n];
|
|
1632
1643
|
const { length: t } = n;
|
|
1633
1644
|
let r, s;
|
|
@@ -1635,7 +1646,7 @@ function Xr(n, e) {
|
|
|
1635
1646
|
for (let o = 0; o < t; o++) {
|
|
1636
1647
|
r = n[o];
|
|
1637
1648
|
let c;
|
|
1638
|
-
if (s = r, !
|
|
1649
|
+
if (s = r, !Yr(r) && (s = nt[(c = String(r)).toLowerCase()], s === void 0))
|
|
1639
1650
|
throw new b(`Unknown adapter '${c}'`);
|
|
1640
1651
|
if (s && (a.isFunction(s) || (s = s.get(e))))
|
|
1641
1652
|
break;
|
|
@@ -1646,8 +1657,8 @@ function Xr(n, e) {
|
|
|
1646
1657
|
([u, d]) => `adapter ${u} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1647
1658
|
);
|
|
1648
1659
|
let c = t ? o.length > 1 ? `since :
|
|
1649
|
-
` + o.map(
|
|
1650
|
-
`) : " " +
|
|
1660
|
+
` + o.map(wt).join(`
|
|
1661
|
+
`) : " " + wt(o[0]) : "as no adapter specified";
|
|
1651
1662
|
throw new b(
|
|
1652
1663
|
"There is no suitable adapter to dispatch the request " + c,
|
|
1653
1664
|
"ERR_NOT_SUPPORT"
|
|
@@ -1655,38 +1666,38 @@ function Xr(n, e) {
|
|
|
1655
1666
|
}
|
|
1656
1667
|
return s;
|
|
1657
1668
|
}
|
|
1658
|
-
const
|
|
1669
|
+
const Zt = {
|
|
1659
1670
|
/**
|
|
1660
1671
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1661
1672
|
* @type {Function}
|
|
1662
1673
|
*/
|
|
1663
|
-
getAdapter:
|
|
1674
|
+
getAdapter: Zr,
|
|
1664
1675
|
/**
|
|
1665
1676
|
* Exposes all known adapters
|
|
1666
1677
|
* @type {Object<string, Function|Object>}
|
|
1667
1678
|
*/
|
|
1668
|
-
adapters:
|
|
1679
|
+
adapters: nt
|
|
1669
1680
|
};
|
|
1670
1681
|
function Me(n) {
|
|
1671
1682
|
if (n.cancelToken && n.cancelToken.throwIfRequested(), n.signal && n.signal.aborted)
|
|
1672
1683
|
throw new be(null, n);
|
|
1673
1684
|
}
|
|
1674
|
-
function
|
|
1675
|
-
return Me(n), n.headers = v.from(n.headers), n.data =
|
|
1685
|
+
function Et(n) {
|
|
1686
|
+
return Me(n), n.headers = v.from(n.headers), n.data = qe.call(n, n.transformRequest), ["post", "put", "patch"].indexOf(n.method) !== -1 && n.headers.setContentType("application/x-www-form-urlencoded", !1), Zt.getAdapter(n.adapter || me.adapter, n)(n).then(
|
|
1676
1687
|
function(r) {
|
|
1677
1688
|
Me(n), n.response = r;
|
|
1678
1689
|
try {
|
|
1679
|
-
r.data =
|
|
1690
|
+
r.data = qe.call(n, n.transformResponse, r);
|
|
1680
1691
|
} finally {
|
|
1681
1692
|
delete n.response;
|
|
1682
1693
|
}
|
|
1683
1694
|
return r.headers = v.from(r.headers), r;
|
|
1684
1695
|
},
|
|
1685
1696
|
function(r) {
|
|
1686
|
-
if (!
|
|
1697
|
+
if (!Kt(r) && (Me(n), r && r.response)) {
|
|
1687
1698
|
n.response = r.response;
|
|
1688
1699
|
try {
|
|
1689
|
-
r.response.data =
|
|
1700
|
+
r.response.data = qe.call(
|
|
1690
1701
|
n,
|
|
1691
1702
|
n.transformResponse,
|
|
1692
1703
|
r.response
|
|
@@ -1706,10 +1717,10 @@ const ve = {};
|
|
|
1706
1717
|
return typeof r === n || "a" + (e < 1 ? "n " : " ") + n;
|
|
1707
1718
|
};
|
|
1708
1719
|
});
|
|
1709
|
-
const
|
|
1720
|
+
const St = {};
|
|
1710
1721
|
ve.transitional = function(e, t, r) {
|
|
1711
1722
|
function s(i, o) {
|
|
1712
|
-
return "[Axios v" +
|
|
1723
|
+
return "[Axios v" + tt + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1713
1724
|
}
|
|
1714
1725
|
return (i, o, c) => {
|
|
1715
1726
|
if (e === !1)
|
|
@@ -1717,7 +1728,7 @@ ve.transitional = function(e, t, r) {
|
|
|
1717
1728
|
s(o, " has been removed" + (t ? " in " + t : "")),
|
|
1718
1729
|
b.ERR_DEPRECATED
|
|
1719
1730
|
);
|
|
1720
|
-
return t && !
|
|
1731
|
+
return t && !St[o] && (St[o] = !0, console.warn(
|
|
1721
1732
|
s(
|
|
1722
1733
|
o,
|
|
1723
1734
|
" has been deprecated since v" + t + " and will be removed in the near future"
|
|
@@ -1728,7 +1739,7 @@ ve.transitional = function(e, t, r) {
|
|
|
1728
1739
|
ve.spelling = function(e) {
|
|
1729
1740
|
return (t, r) => (console.warn(`${r} is likely a misspelling of ${e}`), !0);
|
|
1730
1741
|
};
|
|
1731
|
-
function
|
|
1742
|
+
function es(n, e, t) {
|
|
1732
1743
|
if (typeof n != "object")
|
|
1733
1744
|
throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
|
|
1734
1745
|
const r = Object.keys(n);
|
|
@@ -1749,14 +1760,14 @@ function Gr(n, e, t) {
|
|
|
1749
1760
|
}
|
|
1750
1761
|
}
|
|
1751
1762
|
const Te = {
|
|
1752
|
-
assertOptions:
|
|
1763
|
+
assertOptions: es,
|
|
1753
1764
|
validators: ve
|
|
1754
1765
|
}, $ = Te.validators;
|
|
1755
1766
|
let ee = class {
|
|
1756
1767
|
constructor(e) {
|
|
1757
1768
|
this.defaults = e || {}, this.interceptors = {
|
|
1758
|
-
request: new
|
|
1759
|
-
response: new
|
|
1769
|
+
request: new ft(),
|
|
1770
|
+
response: new ft()
|
|
1760
1771
|
};
|
|
1761
1772
|
}
|
|
1762
1773
|
/**
|
|
@@ -1845,7 +1856,7 @@ let ee = class {
|
|
|
1845
1856
|
});
|
|
1846
1857
|
let l, h = 0, _;
|
|
1847
1858
|
if (!u) {
|
|
1848
|
-
const y = [
|
|
1859
|
+
const y = [Et.bind(this), void 0];
|
|
1849
1860
|
for (y.unshift(...c), y.push(...d), _ = y.length, l = Promise.resolve(t); h < _; )
|
|
1850
1861
|
l = l.then(y[h++], y[h++]);
|
|
1851
1862
|
return l;
|
|
@@ -1862,7 +1873,7 @@ let ee = class {
|
|
|
1862
1873
|
}
|
|
1863
1874
|
}
|
|
1864
1875
|
try {
|
|
1865
|
-
l =
|
|
1876
|
+
l = Et.call(this, m);
|
|
1866
1877
|
} catch (y) {
|
|
1867
1878
|
return Promise.reject(y);
|
|
1868
1879
|
}
|
|
@@ -1872,8 +1883,8 @@ let ee = class {
|
|
|
1872
1883
|
}
|
|
1873
1884
|
getUri(e) {
|
|
1874
1885
|
e = te(this.defaults, e);
|
|
1875
|
-
const t =
|
|
1876
|
-
return
|
|
1886
|
+
const t = Gt(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1887
|
+
return Jt(t, e.params, e.paramsSerializer);
|
|
1877
1888
|
}
|
|
1878
1889
|
};
|
|
1879
1890
|
a.forEach(["delete", "get", "head", "options"], function(e) {
|
|
@@ -1904,7 +1915,7 @@ a.forEach(["post", "put", "patch", "query"], function(e) {
|
|
|
1904
1915
|
}
|
|
1905
1916
|
ee.prototype[e] = t(), e !== "query" && (ee.prototype[e + "Form"] = t(!0));
|
|
1906
1917
|
});
|
|
1907
|
-
let
|
|
1918
|
+
let ts = class en {
|
|
1908
1919
|
constructor(e) {
|
|
1909
1920
|
if (typeof e != "function")
|
|
1910
1921
|
throw new TypeError("executor must be a function.");
|
|
@@ -1970,19 +1981,19 @@ let Qr = class Zt {
|
|
|
1970
1981
|
static source() {
|
|
1971
1982
|
let e;
|
|
1972
1983
|
return {
|
|
1973
|
-
token: new
|
|
1984
|
+
token: new en(function(s) {
|
|
1974
1985
|
e = s;
|
|
1975
1986
|
}),
|
|
1976
1987
|
cancel: e
|
|
1977
1988
|
};
|
|
1978
1989
|
}
|
|
1979
1990
|
};
|
|
1980
|
-
function
|
|
1991
|
+
function ns(n) {
|
|
1981
1992
|
return function(t) {
|
|
1982
1993
|
return n.apply(null, t);
|
|
1983
1994
|
};
|
|
1984
1995
|
}
|
|
1985
|
-
function
|
|
1996
|
+
function rs(n) {
|
|
1986
1997
|
return a.isObject(n) && n.isAxiosError === !0;
|
|
1987
1998
|
}
|
|
1988
1999
|
const Ke = {
|
|
@@ -2059,56 +2070,56 @@ const Ke = {
|
|
|
2059
2070
|
Object.entries(Ke).forEach(([n, e]) => {
|
|
2060
2071
|
Ke[e] = n;
|
|
2061
2072
|
});
|
|
2062
|
-
function
|
|
2063
|
-
const e = new ee(n), t =
|
|
2073
|
+
function tn(n) {
|
|
2074
|
+
const e = new ee(n), t = Dt(ee.prototype.request, e);
|
|
2064
2075
|
return a.extend(t, ee.prototype, e, { allOwnKeys: !0 }), a.extend(t, e, null, { allOwnKeys: !0 }), t.create = function(s) {
|
|
2065
|
-
return
|
|
2076
|
+
return tn(te(n, s));
|
|
2066
2077
|
}, t;
|
|
2067
2078
|
}
|
|
2068
|
-
const A =
|
|
2079
|
+
const A = tn(me);
|
|
2069
2080
|
A.Axios = ee;
|
|
2070
2081
|
A.CanceledError = be;
|
|
2071
|
-
A.CancelToken =
|
|
2072
|
-
A.isCancel =
|
|
2073
|
-
A.VERSION =
|
|
2082
|
+
A.CancelToken = ts;
|
|
2083
|
+
A.isCancel = Kt;
|
|
2084
|
+
A.VERSION = tt;
|
|
2074
2085
|
A.toFormData = De;
|
|
2075
2086
|
A.AxiosError = b;
|
|
2076
2087
|
A.Cancel = A.CanceledError;
|
|
2077
2088
|
A.all = function(e) {
|
|
2078
2089
|
return Promise.all(e);
|
|
2079
2090
|
};
|
|
2080
|
-
A.spread =
|
|
2081
|
-
A.isAxiosError =
|
|
2091
|
+
A.spread = ns;
|
|
2092
|
+
A.isAxiosError = rs;
|
|
2082
2093
|
A.mergeConfig = te;
|
|
2083
2094
|
A.AxiosHeaders = v;
|
|
2084
|
-
A.formToJSON = (n) =>
|
|
2085
|
-
A.getAdapter =
|
|
2095
|
+
A.formToJSON = (n) => Wt(a.isHTMLForm(n) ? new FormData(n) : n);
|
|
2096
|
+
A.getAdapter = Zt.getAdapter;
|
|
2086
2097
|
A.HttpStatusCode = Ke;
|
|
2087
2098
|
A.default = A;
|
|
2088
2099
|
const {
|
|
2089
|
-
Axios:
|
|
2090
|
-
AxiosError:
|
|
2091
|
-
CanceledError:
|
|
2092
|
-
isCancel:
|
|
2093
|
-
CancelToken:
|
|
2094
|
-
VERSION:
|
|
2095
|
-
all:
|
|
2096
|
-
Cancel:
|
|
2097
|
-
isAxiosError:
|
|
2098
|
-
spread:
|
|
2099
|
-
toFormData:
|
|
2100
|
-
AxiosHeaders:
|
|
2101
|
-
HttpStatusCode:
|
|
2102
|
-
formToJSON:
|
|
2103
|
-
getAdapter:
|
|
2104
|
-
mergeConfig:
|
|
2105
|
-
create:
|
|
2106
|
-
} = A,
|
|
2100
|
+
Axios: yi,
|
|
2101
|
+
AxiosError: wi,
|
|
2102
|
+
CanceledError: Ei,
|
|
2103
|
+
isCancel: Si,
|
|
2104
|
+
CancelToken: Ri,
|
|
2105
|
+
VERSION: xi,
|
|
2106
|
+
all: Oi,
|
|
2107
|
+
Cancel: Ai,
|
|
2108
|
+
isAxiosError: Ci,
|
|
2109
|
+
spread: Ti,
|
|
2110
|
+
toFormData: Ni,
|
|
2111
|
+
AxiosHeaders: Pi,
|
|
2112
|
+
HttpStatusCode: ki,
|
|
2113
|
+
formToJSON: Ii,
|
|
2114
|
+
getAdapter: Li,
|
|
2115
|
+
mergeConfig: Di,
|
|
2116
|
+
create: vi
|
|
2117
|
+
} = A, rt = A.create({
|
|
2107
2118
|
baseURL: location.origin,
|
|
2108
2119
|
timeout: 6e4,
|
|
2109
2120
|
params: {}
|
|
2110
2121
|
});
|
|
2111
|
-
|
|
2122
|
+
rt.interceptors.response.use(
|
|
2112
2123
|
(n) => n,
|
|
2113
2124
|
(n) => {
|
|
2114
2125
|
if (n.response) {
|
|
@@ -2149,7 +2160,7 @@ const Re = async function(n, e, {
|
|
|
2149
2160
|
}
|
|
2150
2161
|
s.Authorization = localStorage.openc3Token;
|
|
2151
2162
|
}
|
|
2152
|
-
return s.manual = !0, !o && !r.scope && (r.scope = window.openc3Scope),
|
|
2163
|
+
return s.manual = !0, !o && !r.scope && (r.scope = window.openc3Scope), rt({
|
|
2153
2164
|
method: n,
|
|
2154
2165
|
url: e,
|
|
2155
2166
|
data: t,
|
|
@@ -2159,10 +2170,10 @@ const Re = async function(n, e, {
|
|
|
2159
2170
|
});
|
|
2160
2171
|
}, Xe = {
|
|
2161
2172
|
Accept: "application/json"
|
|
2162
|
-
},
|
|
2173
|
+
}, Rt = {
|
|
2163
2174
|
...Xe,
|
|
2164
2175
|
"Content-Type": "application/json"
|
|
2165
|
-
},
|
|
2176
|
+
}, Fi = {
|
|
2166
2177
|
get: function(n, {
|
|
2167
2178
|
params: e,
|
|
2168
2179
|
headers: t = Xe,
|
|
@@ -2181,7 +2192,7 @@ const Re = async function(n, e, {
|
|
|
2181
2192
|
put: function(n, {
|
|
2182
2193
|
data: e,
|
|
2183
2194
|
params: t,
|
|
2184
|
-
headers: r =
|
|
2195
|
+
headers: r = Rt,
|
|
2185
2196
|
noScope: s,
|
|
2186
2197
|
noAuth: i,
|
|
2187
2198
|
onUploadProgress: o
|
|
@@ -2198,7 +2209,7 @@ const Re = async function(n, e, {
|
|
|
2198
2209
|
post: function(n, {
|
|
2199
2210
|
data: e,
|
|
2200
2211
|
params: t,
|
|
2201
|
-
headers: r =
|
|
2212
|
+
headers: r = Rt,
|
|
2202
2213
|
noScope: s,
|
|
2203
2214
|
noAuth: i,
|
|
2204
2215
|
onUploadProgress: o
|
|
@@ -2245,12 +2256,12 @@ class _e extends Error {
|
|
|
2245
2256
|
e instanceof Error ? (super(e.message), this.cause = e) : super(e), this.reason = t, this.name = "ReasonError";
|
|
2246
2257
|
}
|
|
2247
2258
|
}
|
|
2248
|
-
class
|
|
2259
|
+
class st extends _e {
|
|
2249
2260
|
constructor(e) {
|
|
2250
2261
|
super("Rejected", e), this.name = "SubscriptionRejectedError";
|
|
2251
2262
|
}
|
|
2252
2263
|
}
|
|
2253
|
-
class
|
|
2264
|
+
class ss extends _e {
|
|
2254
2265
|
constructor(e) {
|
|
2255
2266
|
super(e || "Timed out to receive subscription ack"), this.name = "SubscriptionTimeoutError";
|
|
2256
2267
|
}
|
|
@@ -2260,18 +2271,18 @@ class M extends _e {
|
|
|
2260
2271
|
t ? super(e, t) : super("Disconnected", e), this.name = "DisconnectedError";
|
|
2261
2272
|
}
|
|
2262
2273
|
}
|
|
2263
|
-
class
|
|
2274
|
+
class is extends M {
|
|
2264
2275
|
constructor(e) {
|
|
2265
2276
|
super(e, "stale_connection"), this.name = "StaleConnectionError";
|
|
2266
2277
|
}
|
|
2267
2278
|
}
|
|
2268
|
-
function
|
|
2279
|
+
function nn(n) {
|
|
2269
2280
|
return n ? `{${Object.keys(n).sort().filter((t) => n[t] !== void 0).map((t) => {
|
|
2270
2281
|
let r = JSON.stringify(n[t]);
|
|
2271
2282
|
return `${JSON.stringify(t)}:${r}`;
|
|
2272
2283
|
}).join(",")}}` : "";
|
|
2273
2284
|
}
|
|
2274
|
-
class
|
|
2285
|
+
class os {
|
|
2275
2286
|
constructor(e) {
|
|
2276
2287
|
this.channel = e, this.listeners = [];
|
|
2277
2288
|
}
|
|
@@ -2320,14 +2331,14 @@ class rs {
|
|
|
2320
2331
|
}
|
|
2321
2332
|
}
|
|
2322
2333
|
const Q = /* @__PURE__ */ Symbol("state");
|
|
2323
|
-
class
|
|
2334
|
+
class rn {
|
|
2324
2335
|
// Unique channel identifier
|
|
2325
2336
|
// static identifier = ''
|
|
2326
2337
|
constructor(e = {}) {
|
|
2327
|
-
this.emitter = Fe(), this.params = Object.freeze(e), this.presence = new
|
|
2338
|
+
this.emitter = Fe(), this.params = Object.freeze(e), this.presence = new os(this), this.initialConnect = !0, this[Q] = "idle";
|
|
2328
2339
|
}
|
|
2329
2340
|
get identifier() {
|
|
2330
|
-
return this._identifier ? this._identifier : (this._identifier =
|
|
2341
|
+
return this._identifier ? this._identifier : (this._identifier = nn({
|
|
2331
2342
|
channel: this.channelId,
|
|
2332
2343
|
...this.params
|
|
2333
2344
|
}), this._identifier);
|
|
@@ -2427,7 +2438,7 @@ class tn {
|
|
|
2427
2438
|
}), this._pendingSubscribe);
|
|
2428
2439
|
}
|
|
2429
2440
|
}
|
|
2430
|
-
class
|
|
2441
|
+
class cs {
|
|
2431
2442
|
constructor(e) {
|
|
2432
2443
|
this.id = e, this.intent = "unsubscribed", this.state = "idle", this.channels = [], this.disposed = !1, this._pendings = [];
|
|
2433
2444
|
}
|
|
@@ -2487,7 +2498,7 @@ class ss {
|
|
|
2487
2498
|
return !t || t.acquired || t.intent !== e ? !1 : (this._pendings.pop(), t.canceled = !0, !0);
|
|
2488
2499
|
}
|
|
2489
2500
|
}
|
|
2490
|
-
class
|
|
2501
|
+
class as {
|
|
2491
2502
|
constructor() {
|
|
2492
2503
|
this.queue = [];
|
|
2493
2504
|
}
|
|
@@ -2499,9 +2510,9 @@ class is {
|
|
|
2499
2510
|
), this.queue.length > 1 && await this.queue[this.queue.length - 2]);
|
|
2500
2511
|
}
|
|
2501
2512
|
}
|
|
2502
|
-
class
|
|
2513
|
+
class ls {
|
|
2503
2514
|
constructor(e) {
|
|
2504
|
-
e.concurrentSubscribes === !1 && (this.glv = new
|
|
2515
|
+
e.concurrentSubscribes === !1 && (this.glv = new as()), this._subscriptions = {}, this._localToRemote = {};
|
|
2505
2516
|
}
|
|
2506
2517
|
all() {
|
|
2507
2518
|
return Object.values(this._subscriptions);
|
|
@@ -2510,7 +2521,7 @@ class os {
|
|
|
2510
2521
|
return this._subscriptions[e];
|
|
2511
2522
|
}
|
|
2512
2523
|
create(e, { subscribe: t, unsubscribe: r }) {
|
|
2513
|
-
let s = this._subscriptions[e] = new
|
|
2524
|
+
let s = this._subscriptions[e] = new cs(e);
|
|
2514
2525
|
return s.remoteId = this._localToRemote[e], s.subscriber = t, s.unsubscriber = r, s.gvl = this.glv, s;
|
|
2515
2526
|
}
|
|
2516
2527
|
remove(e) {
|
|
@@ -2522,9 +2533,9 @@ class os {
|
|
|
2522
2533
|
r && (r.remoteId = t);
|
|
2523
2534
|
}
|
|
2524
2535
|
}
|
|
2525
|
-
class
|
|
2536
|
+
class us {
|
|
2526
2537
|
constructor(e = {}) {
|
|
2527
|
-
this.subscriptions = new
|
|
2538
|
+
this.subscriptions = new ls(e), this._pendingMessages = [], this._remoteToLocal = {};
|
|
2528
2539
|
}
|
|
2529
2540
|
subscribe(e, t) {
|
|
2530
2541
|
this._remoteToLocal[t] = e, this.subscriptions.storeRemoteId(e, t), this.flush(t);
|
|
@@ -2569,18 +2580,18 @@ class cs {
|
|
|
2569
2580
|
this._pendingMessages = t;
|
|
2570
2581
|
}
|
|
2571
2582
|
}
|
|
2572
|
-
const
|
|
2583
|
+
const xt = {
|
|
2573
2584
|
debug: 0,
|
|
2574
2585
|
info: 1,
|
|
2575
2586
|
warn: 2,
|
|
2576
2587
|
error: 3
|
|
2577
2588
|
};
|
|
2578
|
-
class
|
|
2589
|
+
class sn {
|
|
2579
2590
|
constructor(e) {
|
|
2580
2591
|
this.level = e || "warn";
|
|
2581
2592
|
}
|
|
2582
2593
|
log(e, t, r) {
|
|
2583
|
-
|
|
2594
|
+
xt[e] < xt[this.level] || this.writeLogEntry(e, t, r);
|
|
2584
2595
|
}
|
|
2585
2596
|
writeLogEntry() {
|
|
2586
2597
|
throw Error("Not implemented");
|
|
@@ -2598,11 +2609,11 @@ class nn {
|
|
|
2598
2609
|
this.log("error", e, t);
|
|
2599
2610
|
}
|
|
2600
2611
|
}
|
|
2601
|
-
class ye extends
|
|
2612
|
+
class ye extends sn {
|
|
2602
2613
|
writeLogEntry() {
|
|
2603
2614
|
}
|
|
2604
2615
|
}
|
|
2605
|
-
class
|
|
2616
|
+
class ds {
|
|
2606
2617
|
encode(e) {
|
|
2607
2618
|
return JSON.stringify(e);
|
|
2608
2619
|
}
|
|
@@ -2613,8 +2624,8 @@ class as {
|
|
|
2613
2624
|
}
|
|
2614
2625
|
}
|
|
2615
2626
|
}
|
|
2616
|
-
let
|
|
2617
|
-
class
|
|
2627
|
+
let hs = 0;
|
|
2628
|
+
class on {
|
|
2618
2629
|
constructor(e = {}) {
|
|
2619
2630
|
let { logger: t } = e;
|
|
2620
2631
|
this.logger = t || new ye(), this.pendingSubscriptions = {}, this.pendingUnsubscriptions = {}, this.subscribeCooldownInterval = e.subscribeCooldownInterval || 250, this.subscribeRetryInterval = e.subscribeRetryInterval || 5e3;
|
|
@@ -2625,7 +2636,7 @@ class rn {
|
|
|
2625
2636
|
subscribe(e, t) {
|
|
2626
2637
|
let r = { channel: e };
|
|
2627
2638
|
t && Object.assign(r, t);
|
|
2628
|
-
let s =
|
|
2639
|
+
let s = nn(r);
|
|
2629
2640
|
if (this.pendingUnsubscriptions[s]) {
|
|
2630
2641
|
let o = this.subscribeCooldownInterval * 1.5;
|
|
2631
2642
|
return this.logger.debug(
|
|
@@ -2641,7 +2652,7 @@ class rn {
|
|
|
2641
2652
|
return this.logger.warn("subscription is already pending, skipping", s), Promise.reject(Error("Already subscribing"));
|
|
2642
2653
|
let i = this.subscribeRetryInterval;
|
|
2643
2654
|
return new Promise((o, c) => {
|
|
2644
|
-
let u = ++
|
|
2655
|
+
let u = ++hs;
|
|
2645
2656
|
this.pendingSubscriptions[s] = {
|
|
2646
2657
|
resolve: o,
|
|
2647
2658
|
reject: c,
|
|
@@ -2668,7 +2679,7 @@ class rn {
|
|
|
2668
2679
|
setTimeout(() => {
|
|
2669
2680
|
let s = this.pendingSubscriptions[t];
|
|
2670
2681
|
s && s.id === e && (delete this.pendingSubscriptions[t], s.reject(
|
|
2671
|
-
new
|
|
2682
|
+
new ss(
|
|
2672
2683
|
`Haven't received subscription ack in ${r * 2}ms for ${t}`
|
|
2673
2684
|
)
|
|
2674
2685
|
));
|
|
@@ -2726,7 +2737,7 @@ class rn {
|
|
|
2726
2737
|
}
|
|
2727
2738
|
if (t === "reject_subscription") {
|
|
2728
2739
|
let c = this.pendingSubscriptions[r];
|
|
2729
|
-
return c ? (delete this.pendingSubscriptions[r], c.reject(new
|
|
2740
|
+
return c ? (delete this.pendingSubscriptions[r], c.reject(new st())) : this.logger.error("subscription not found", { type: t, identifier: r });
|
|
2730
2741
|
}
|
|
2731
2742
|
if (s)
|
|
2732
2743
|
return { identifier: r, message: s };
|
|
@@ -2741,10 +2752,10 @@ class rn {
|
|
|
2741
2752
|
return !1;
|
|
2742
2753
|
}
|
|
2743
2754
|
}
|
|
2744
|
-
const
|
|
2745
|
-
class
|
|
2755
|
+
const Ot = () => Date.now() / 1e3 | 0;
|
|
2756
|
+
class fs extends on {
|
|
2746
2757
|
constructor(e = {}) {
|
|
2747
|
-
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 =
|
|
2758
|
+
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 = Ot()), this.sessionId = void 0, this.sendPongs = e.pongs;
|
|
2748
2759
|
}
|
|
2749
2760
|
reset(e) {
|
|
2750
2761
|
for (let t in this.pendingPresence)
|
|
@@ -2764,7 +2775,7 @@ class us extends rn {
|
|
|
2764
2775
|
if (t === "confirm_subscription")
|
|
2765
2776
|
return this.subscriptionStreams[r] || (this.subscriptionStreams[r] = /* @__PURE__ */ new Set()), super.receive(e);
|
|
2766
2777
|
if (t === "ping")
|
|
2767
|
-
return this.restoreSince && (this.restoreSince =
|
|
2778
|
+
return this.restoreSince && (this.restoreSince = Ot()), this.sendPongs && this.sendPong(), this.cable.keepalive(e.message);
|
|
2768
2779
|
if (this.cable.keepalive(), t === "confirm_history") {
|
|
2769
2780
|
this.logger.debug("history result received", e), this.cable.notify("history_received", r);
|
|
2770
2781
|
return;
|
|
@@ -2885,12 +2896,12 @@ class us extends rn {
|
|
|
2885
2896
|
});
|
|
2886
2897
|
}
|
|
2887
2898
|
}
|
|
2888
|
-
class
|
|
2899
|
+
class ps extends _e {
|
|
2889
2900
|
constructor() {
|
|
2890
2901
|
super("No connection", "closed"), this.name = "NoConnectionError";
|
|
2891
2902
|
}
|
|
2892
2903
|
}
|
|
2893
|
-
class
|
|
2904
|
+
class cn extends rn {
|
|
2894
2905
|
static identifier = "__ghost__";
|
|
2895
2906
|
constructor(e, t) {
|
|
2896
2907
|
super(t), this.channelId = e;
|
|
@@ -2902,17 +2913,17 @@ class sn extends tn {
|
|
|
2902
2913
|
return this._channelId;
|
|
2903
2914
|
}
|
|
2904
2915
|
}
|
|
2905
|
-
const
|
|
2906
|
-
class
|
|
2907
|
-
static identifier =
|
|
2916
|
+
const gs = "$pubsub";
|
|
2917
|
+
class At extends rn {
|
|
2918
|
+
static identifier = gs;
|
|
2908
2919
|
async perform(e, t) {
|
|
2909
2920
|
if (e.startsWith("$"))
|
|
2910
2921
|
return super.perform(e, t);
|
|
2911
2922
|
throw Error("not implemented");
|
|
2912
2923
|
}
|
|
2913
2924
|
}
|
|
2914
|
-
const
|
|
2915
|
-
let
|
|
2925
|
+
const Y = /* @__PURE__ */ Symbol("state");
|
|
2926
|
+
let ms = class {
|
|
2916
2927
|
constructor({
|
|
2917
2928
|
transport: e,
|
|
2918
2929
|
protocol: t,
|
|
@@ -2923,18 +2934,18 @@ let fs = class {
|
|
|
2923
2934
|
performFailures: c,
|
|
2924
2935
|
transportConfigurator: u
|
|
2925
2936
|
}) {
|
|
2926
|
-
this.emitter = Fe(), this.transport = e, this.encoder = r, this.logger = s || new ye(), this.protocol = t, this.performFailures = c || "throw", this.protocol.attached(this), this.hub = new
|
|
2937
|
+
this.emitter = Fe(), this.transport = e, this.encoder = r, this.logger = s || new ye(), this.protocol = t, this.performFailures = c || "throw", this.protocol.attached(this), this.hub = new us(o || {}), this[Y] = "idle", this.handleClose = this.handleClose.bind(this), this.handleIncoming = this.handleIncoming.bind(this), this.transportConfigurator = u, this.transport.on("close", this.handleClose), this.transport.on("data", this.handleIncoming), this.initialConnect = !0, this.recovering = !1, i === !1 && this.connect().catch(() => {
|
|
2927
2938
|
});
|
|
2928
2939
|
}
|
|
2929
2940
|
get state() {
|
|
2930
|
-
return this[
|
|
2941
|
+
return this[Y];
|
|
2931
2942
|
}
|
|
2932
2943
|
async connect() {
|
|
2933
2944
|
if (this.state === "connected") return Promise.resolve();
|
|
2934
2945
|
if (this.state === "connecting")
|
|
2935
2946
|
return this.pendingConnect();
|
|
2936
2947
|
let e = this.state === "idle";
|
|
2937
|
-
this[
|
|
2948
|
+
this[Y] = "connecting";
|
|
2938
2949
|
let t = this.pendingConnect();
|
|
2939
2950
|
this.logger.debug("connecting");
|
|
2940
2951
|
try {
|
|
@@ -2951,7 +2962,7 @@ let fs = class {
|
|
|
2951
2962
|
}
|
|
2952
2963
|
connected() {
|
|
2953
2964
|
if (this.state === "connected") return;
|
|
2954
|
-
this.logger.info("connected"), this[
|
|
2965
|
+
this.logger.info("connected"), this[Y] = "connected", this.recovering && this.hub.subscriptions.all().forEach(
|
|
2955
2966
|
(t) => t.notify(
|
|
2956
2967
|
"disconnected",
|
|
2957
2968
|
new M("recovery_failed")
|
|
@@ -2961,7 +2972,7 @@ let fs = class {
|
|
|
2961
2972
|
this.recovering = !1, this.initialConnect ? (this.initialConnect = !1, this.emit("connect", { reconnect: !1, restored: e })) : this.emit("connect", { reconnect: !0, restored: e });
|
|
2962
2973
|
}
|
|
2963
2974
|
restored(e) {
|
|
2964
|
-
this.logger.info("connection recovered", { remoteIds: e }), this[
|
|
2975
|
+
this.logger.info("connection recovered", { remoteIds: e }), this[Y] = "connected", this.hub.subscriptions.all().forEach((s) => {
|
|
2965
2976
|
e && s.remoteId && e.includes(s.remoteId) ? s.notify("restored") : (s.notify(
|
|
2966
2977
|
"disconnected",
|
|
2967
2978
|
new M("recovery_failed")
|
|
@@ -2977,14 +2988,14 @@ let fs = class {
|
|
|
2977
2988
|
this.logger.debug("transport closed", { error: e }), this.disconnected(new M(e, "transport_closed"));
|
|
2978
2989
|
}
|
|
2979
2990
|
disconnected(e) {
|
|
2980
|
-
(this.state === "connected" || this.state === "connecting") && (this.logger.info("disconnected", { reason: e }), this[
|
|
2991
|
+
(this.state === "connected" || this.state === "connecting") && (this.logger.info("disconnected", { reason: e }), this[Y] = "disconnected", this.recovering = this.protocol.recoverableClosure(e), this.recovering ? this.hub.subscriptions.all().forEach((t) => t.notify("connecting")) : this.hub.subscriptions.all().forEach((t) => {
|
|
2981
2992
|
t.notify("disconnected", e);
|
|
2982
2993
|
}), this.protocol.reset(e), this.hub.close(), this.transport.close(), this.emit("disconnect", e));
|
|
2983
2994
|
}
|
|
2984
2995
|
closed(e) {
|
|
2985
2996
|
if (this.state === "closed" || this.state === "idle") return;
|
|
2986
2997
|
let t;
|
|
2987
|
-
e && (t = e instanceof M ? e : new M(e, void 0)), this.logger.info("closed", { reason: e || "user" }), this[
|
|
2998
|
+
e && (t = e instanceof M ? e : new M(e, void 0)), this.logger.info("closed", { reason: e || "user" }), this[Y] = "closed";
|
|
2988
2999
|
let r = t || new M("cable_closed");
|
|
2989
3000
|
this.hub.subscriptions.all().forEach((s) => s.notify("disconnected", r)), this.hub.close(), this.protocol.reset(), this.transport.close(), this.initialConnect = !0, this.emit("close", t);
|
|
2990
3001
|
}
|
|
@@ -3021,16 +3032,16 @@ let fs = class {
|
|
|
3021
3032
|
this.emit("keepalive", e);
|
|
3022
3033
|
}
|
|
3023
3034
|
streamFrom(e) {
|
|
3024
|
-
let t = new
|
|
3035
|
+
let t = new At({ stream_name: e });
|
|
3025
3036
|
return this.subscribe(t);
|
|
3026
3037
|
}
|
|
3027
3038
|
streamFromSigned(e) {
|
|
3028
|
-
let t = new
|
|
3039
|
+
let t = new At({ signed_stream_name: e });
|
|
3029
3040
|
return this.subscribe(t);
|
|
3030
3041
|
}
|
|
3031
3042
|
subscribeTo(e, t) {
|
|
3032
3043
|
let r, s;
|
|
3033
|
-
return typeof e == "string" && (s = e, e =
|
|
3044
|
+
return typeof e == "string" && (s = e, e = cn), r = s ? new e(s, t) : new e(t), this.subscribe(r);
|
|
3034
3045
|
}
|
|
3035
3046
|
subscribe(e) {
|
|
3036
3047
|
if (!e.attached(this)) return e;
|
|
@@ -3082,7 +3093,7 @@ let fs = class {
|
|
|
3082
3093
|
this.hub.subscribe(s, c), this.logger.debug("subscribed", { ...o, remoteId: c }), e.notify("connected");
|
|
3083
3094
|
} catch (c) {
|
|
3084
3095
|
if (c) {
|
|
3085
|
-
if (c instanceof
|
|
3096
|
+
if (c instanceof st && this.logger.warn("rejected", o), c instanceof M) {
|
|
3086
3097
|
this.logger.debug(
|
|
3087
3098
|
"disconnected during subscription; will retry on connect",
|
|
3088
3099
|
o
|
|
@@ -3158,7 +3169,7 @@ let fs = class {
|
|
|
3158
3169
|
}
|
|
3159
3170
|
async _perform(e, t, r) {
|
|
3160
3171
|
if (this.state === "connecting" && await this.pendingConnect(), this.state === "closed" || this.state === "disconnected")
|
|
3161
|
-
throw new
|
|
3172
|
+
throw new ps();
|
|
3162
3173
|
let s = this.hub.subscriptions.get(e);
|
|
3163
3174
|
if (!s)
|
|
3164
3175
|
throw Error(`Subscription not found: ${e}`);
|
|
@@ -3214,10 +3225,10 @@ let fs = class {
|
|
|
3214
3225
|
}), this._pendingConnect);
|
|
3215
3226
|
}
|
|
3216
3227
|
};
|
|
3217
|
-
const
|
|
3228
|
+
const bs = {
|
|
3218
3229
|
maxMissingPings: 2,
|
|
3219
3230
|
maxReconnectAttempts: 1 / 0
|
|
3220
|
-
}, se = () => Date.now(),
|
|
3231
|
+
}, se = () => Date.now(), an = (n, e) => {
|
|
3221
3232
|
e = e || {};
|
|
3222
3233
|
let { backoffRate: t, jitterRatio: r, maxInterval: s } = e;
|
|
3223
3234
|
return t = t || 2, r === void 0 && (r = 0.5), (i) => {
|
|
@@ -3225,11 +3236,11 @@ const ps = {
|
|
|
3225
3236
|
return u = u * (1 + d), s && s < u && (u = s), u;
|
|
3226
3237
|
};
|
|
3227
3238
|
};
|
|
3228
|
-
let
|
|
3239
|
+
let ln = class {
|
|
3229
3240
|
constructor({ pingInterval: e, ...t }) {
|
|
3230
3241
|
if (this.pingInterval = e, !this.pingInterval)
|
|
3231
3242
|
throw Error(`Incorrect pingInterval is provided: ${e}`);
|
|
3232
|
-
if (t = Object.assign({},
|
|
3243
|
+
if (t = Object.assign({}, bs, t), this.strategy = t.reconnectStrategy, !this.strategy)
|
|
3233
3244
|
throw Error("Reconnect strategy must be provided");
|
|
3234
3245
|
this.maxMissingPings = t.maxMissingPings, this.maxReconnectAttempts = t.maxReconnectAttempts, this.logger = t.logger || new ye(), this.state = "pending_connect", this.attempts = 0, this.disconnectedAt = se();
|
|
3235
3246
|
}
|
|
@@ -3277,7 +3288,7 @@ let cn = class {
|
|
|
3277
3288
|
}
|
|
3278
3289
|
checkStale() {
|
|
3279
3290
|
let e = se() - this.pingedAt;
|
|
3280
|
-
e > this.maxMissingPings * this.pingInterval && (this.logger.warn(`Stale connection: ${e}ms without pings`), this.state = "pending_disconnect", this.target.disconnected(new
|
|
3291
|
+
e > this.maxMissingPings * this.pingInterval && (this.logger.warn(`Stale connection: ${e}ms without pings`), this.state = "pending_disconnect", this.target.disconnected(new is()));
|
|
3281
3292
|
}
|
|
3282
3293
|
scheduleReconnect() {
|
|
3283
3294
|
if (this.attempts >= this.maxReconnectAttempts) {
|
|
@@ -3291,7 +3302,7 @@ let cn = class {
|
|
|
3291
3302
|
this.reconnnectId && (clearTimeout(this.reconnnectId), delete this.reconnnectId);
|
|
3292
3303
|
}
|
|
3293
3304
|
};
|
|
3294
|
-
class
|
|
3305
|
+
class _s {
|
|
3295
3306
|
constructor(e, t = {}) {
|
|
3296
3307
|
this.transports = e, this.transport = null, this.emitter = Fe(), this.unbind = [], this.logger = t.logger || new ye();
|
|
3297
3308
|
}
|
|
@@ -3364,7 +3375,7 @@ class gs {
|
|
|
3364
3375
|
);
|
|
3365
3376
|
}
|
|
3366
3377
|
}
|
|
3367
|
-
class
|
|
3378
|
+
class ys {
|
|
3368
3379
|
constructor(e, t = {}) {
|
|
3369
3380
|
this.url = e;
|
|
3370
3381
|
let r = t.websocketImplementation;
|
|
@@ -3452,7 +3463,7 @@ class ms {
|
|
|
3452
3463
|
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");
|
|
3453
3464
|
}
|
|
3454
3465
|
}
|
|
3455
|
-
class
|
|
3466
|
+
class ws {
|
|
3456
3467
|
constructor(e) {
|
|
3457
3468
|
this.channel = e;
|
|
3458
3469
|
}
|
|
@@ -3475,36 +3486,36 @@ class bs {
|
|
|
3475
3486
|
return this.channel.disconnect();
|
|
3476
3487
|
}
|
|
3477
3488
|
}
|
|
3478
|
-
class
|
|
3489
|
+
class Es extends cn {
|
|
3479
3490
|
constructor(e, t, r) {
|
|
3480
|
-
super(e, t), this.subscription = new
|
|
3491
|
+
super(e, t), this.subscription = new ws(this), Object.assign(this.subscription, r), this.on(
|
|
3481
3492
|
"connect",
|
|
3482
3493
|
({ reconnect: s }) => this.subscription.notify("connected", { reconnected: s })
|
|
3483
3494
|
), this.on(
|
|
3484
3495
|
"disconnect",
|
|
3485
3496
|
() => this.subscription.notify("disconnected", { allowReconnect: !0 })
|
|
3486
3497
|
), this.on("message", (s) => this.subscription.notify("received", s)), this.on("close", (s) => {
|
|
3487
|
-
s && s instanceof
|
|
3498
|
+
s && s instanceof st ? this.subscription.notify("rejected") : this.subscription.notify("disconnected", { allowReconnect: !1 });
|
|
3488
3499
|
});
|
|
3489
3500
|
}
|
|
3490
3501
|
}
|
|
3491
|
-
class
|
|
3502
|
+
class Ss {
|
|
3492
3503
|
constructor(e) {
|
|
3493
3504
|
this.cable = e;
|
|
3494
3505
|
}
|
|
3495
3506
|
create(e, t) {
|
|
3496
3507
|
let r, s;
|
|
3497
3508
|
typeof e == "object" ? (r = e.channel, delete e.channel, s = e) : (r = e, s = {});
|
|
3498
|
-
let i = new
|
|
3509
|
+
let i = new Es(r, s, t);
|
|
3499
3510
|
return i.subscription.notify("initialized"), this.cable.subscribe(i), i.subscription;
|
|
3500
3511
|
}
|
|
3501
3512
|
findAll(e) {
|
|
3502
3513
|
return this.cable.hub.channels.filter((t) => t.identifier === e).map((t) => t.subscription);
|
|
3503
3514
|
}
|
|
3504
3515
|
}
|
|
3505
|
-
class
|
|
3516
|
+
class Rs {
|
|
3506
3517
|
constructor(e) {
|
|
3507
|
-
this.cable = e, this.subscriptions = new
|
|
3518
|
+
this.cable = e, this.subscriptions = new Ss(e);
|
|
3508
3519
|
}
|
|
3509
3520
|
send(e) {
|
|
3510
3521
|
return this.cable.send(e);
|
|
@@ -3519,7 +3530,7 @@ class ws {
|
|
|
3519
3530
|
return this.cable.connect();
|
|
3520
3531
|
}
|
|
3521
3532
|
}
|
|
3522
|
-
const
|
|
3533
|
+
const un = {
|
|
3523
3534
|
protocol: "actioncable-v1-json",
|
|
3524
3535
|
pingInterval: 3e3,
|
|
3525
3536
|
maxReconnectAttempts: 1 / 0,
|
|
@@ -3527,9 +3538,9 @@ const an = {
|
|
|
3527
3538
|
logLevel: "warn",
|
|
3528
3539
|
lazy: !0
|
|
3529
3540
|
};
|
|
3530
|
-
function
|
|
3541
|
+
function xs(n, e) {
|
|
3531
3542
|
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");
|
|
3532
|
-
e = Object.assign({},
|
|
3543
|
+
e = Object.assign({}, un, e);
|
|
3533
3544
|
let {
|
|
3534
3545
|
protocol: t,
|
|
3535
3546
|
websocketImplementation: r,
|
|
@@ -3551,18 +3562,18 @@ function Es(n, e) {
|
|
|
3551
3562
|
tokenRefresher: S,
|
|
3552
3563
|
historyTimestamp: R,
|
|
3553
3564
|
protocolOptions: T,
|
|
3554
|
-
concurrentSubscribes:
|
|
3565
|
+
concurrentSubscribes: B,
|
|
3555
3566
|
performFailures: V,
|
|
3556
3567
|
transportConfigurator: G,
|
|
3557
3568
|
auth: J
|
|
3558
3569
|
} = e;
|
|
3559
3570
|
if (d = d || new ye(u), typeof t == "string") {
|
|
3560
3571
|
w = w || t;
|
|
3561
|
-
let
|
|
3562
|
-
if (T = T || {},
|
|
3563
|
-
t = new
|
|
3564
|
-
else if (
|
|
3565
|
-
t = new
|
|
3572
|
+
let q = t.substring(0, t.lastIndexOf("-")), K = t.substring(t.lastIndexOf("-") + 1);
|
|
3573
|
+
if (T = T || {}, q === "actioncable-v1")
|
|
3574
|
+
t = new on({ logger: d, ...T });
|
|
3575
|
+
else if (q === "actioncable-v1-ext")
|
|
3576
|
+
t = new fs({
|
|
3566
3577
|
logger: d,
|
|
3567
3578
|
historyTimestamp: R,
|
|
3568
3579
|
...T
|
|
@@ -3570,7 +3581,7 @@ function Es(n, e) {
|
|
|
3570
3581
|
else
|
|
3571
3582
|
throw Error(`Protocol is not supported yet: ${t}`);
|
|
3572
3583
|
if (K === "json")
|
|
3573
|
-
h = h || new
|
|
3584
|
+
h = h || new ds(), s = s || "text";
|
|
3574
3585
|
else if (K === "msgpack") {
|
|
3575
3586
|
if (s = "binary", !h)
|
|
3576
3587
|
throw Error(
|
|
@@ -3585,20 +3596,20 @@ function Es(n, e) {
|
|
|
3585
3596
|
throw Error(`Protocol is not supported yet: ${t}`);
|
|
3586
3597
|
}
|
|
3587
3598
|
if (!t) throw Error("Protocol must be specified");
|
|
3588
|
-
l = l || new
|
|
3599
|
+
l = l || new ys(n, {
|
|
3589
3600
|
websocketImplementation: r,
|
|
3590
3601
|
websocketOptions: i,
|
|
3591
3602
|
subprotocol: w,
|
|
3592
3603
|
authStrategy: o,
|
|
3593
3604
|
format: s
|
|
3594
|
-
}), c && (l = new
|
|
3605
|
+
}), c && (l = new _s([l, ...c], { logger: d })), J && J.token && l.setToken(J.token, J.param || "jid"), p = p || an(y), m !== !1 && (m = m || new ln({
|
|
3595
3606
|
pingInterval: y,
|
|
3596
3607
|
reconnectStrategy: p,
|
|
3597
3608
|
maxMissingPings: f,
|
|
3598
3609
|
maxReconnectAttempts: g,
|
|
3599
3610
|
logger: d
|
|
3600
3611
|
}));
|
|
3601
|
-
let j = { concurrentSubscribes:
|
|
3612
|
+
let j = { concurrentSubscribes: B }, D = new ms({
|
|
3602
3613
|
protocol: t,
|
|
3603
3614
|
transport: l,
|
|
3604
3615
|
encoder: h,
|
|
@@ -3608,17 +3619,17 @@ function Es(n, e) {
|
|
|
3608
3619
|
performFailures: V,
|
|
3609
3620
|
transportConfigurator: G
|
|
3610
3621
|
});
|
|
3611
|
-
return m && (m.watch(D), D.monitor = m), S &&
|
|
3622
|
+
return m && (m.watch(D), D.monitor = m), S && Os(D, async () => {
|
|
3612
3623
|
try {
|
|
3613
3624
|
await S(l);
|
|
3614
|
-
} catch (
|
|
3615
|
-
return d.error("Failed to refresh authentication token: " +
|
|
3625
|
+
} catch (q) {
|
|
3626
|
+
return d.error("Failed to refresh authentication token: " + q), !1;
|
|
3616
3627
|
}
|
|
3617
3628
|
return D.connect().catch(() => {
|
|
3618
3629
|
}), !0;
|
|
3619
3630
|
}), D;
|
|
3620
3631
|
}
|
|
3621
|
-
function
|
|
3632
|
+
function Os(n, e) {
|
|
3622
3633
|
let t = !1;
|
|
3623
3634
|
n.on("connect", () => t = !1), n.on("close", async (r) => {
|
|
3624
3635
|
if (r) {
|
|
@@ -3630,12 +3641,12 @@ function Ss(n, e) {
|
|
|
3630
3641
|
}
|
|
3631
3642
|
});
|
|
3632
3643
|
}
|
|
3633
|
-
class
|
|
3644
|
+
class As extends sn {
|
|
3634
3645
|
writeLogEntry(e, t, r) {
|
|
3635
3646
|
r ? console[e](t, r) : console[e](t);
|
|
3636
3647
|
}
|
|
3637
3648
|
}
|
|
3638
|
-
class
|
|
3649
|
+
class Cs extends ln {
|
|
3639
3650
|
watch(e) {
|
|
3640
3651
|
super.watch(e), this.initActivityListeners();
|
|
3641
3652
|
}
|
|
@@ -3655,40 +3666,40 @@ class xs extends cn {
|
|
|
3655
3666
|
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));
|
|
3656
3667
|
}
|
|
3657
3668
|
}
|
|
3658
|
-
const
|
|
3659
|
-
for (let t of
|
|
3669
|
+
const Ts = ["cable", "action-cable"], Ns = "/cable", je = (n, e) => {
|
|
3670
|
+
for (let t of Ts) {
|
|
3660
3671
|
let r = n.head.querySelector(`meta[name='${t}-${e}']`);
|
|
3661
3672
|
if (r)
|
|
3662
3673
|
return r.getAttribute("content");
|
|
3663
3674
|
}
|
|
3664
|
-
},
|
|
3675
|
+
}, Ct = (n) => n.match(/wss?:\/\//) ? n : typeof window < "u" ? `${window.location.protocol.replace("http", "ws")}//${window.location.host}${n}` : n, Ps = () => {
|
|
3665
3676
|
if (typeof document < "u" && document.head) {
|
|
3666
3677
|
let n = je(document, "url");
|
|
3667
3678
|
if (n)
|
|
3668
|
-
return
|
|
3679
|
+
return Ct(n);
|
|
3669
3680
|
}
|
|
3670
|
-
return
|
|
3671
|
-
},
|
|
3681
|
+
return Ct(Ns);
|
|
3682
|
+
}, ks = () => {
|
|
3672
3683
|
if (typeof document < "u" && document.head) {
|
|
3673
3684
|
let n = je(document, "history-timestamp");
|
|
3674
3685
|
if (n)
|
|
3675
3686
|
return n | 0;
|
|
3676
3687
|
}
|
|
3677
|
-
},
|
|
3688
|
+
}, Is = () => {
|
|
3678
3689
|
if (typeof document < "u" && document.head)
|
|
3679
3690
|
return je(document, "token");
|
|
3680
|
-
},
|
|
3691
|
+
}, Ls = () => {
|
|
3681
3692
|
if (typeof document < "u" && document.head)
|
|
3682
3693
|
return je(document, "token-param");
|
|
3683
3694
|
};
|
|
3684
|
-
function
|
|
3685
|
-
typeof n == "object" && typeof e > "u" && (e = n, n = void 0), n = n ||
|
|
3686
|
-
let t =
|
|
3695
|
+
function Ds(n, e) {
|
|
3696
|
+
typeof n == "object" && typeof e > "u" && (e = n, n = void 0), n = n || Ps(), e = e || {}, e.historyTimestamp ||= ks();
|
|
3697
|
+
let t = Is();
|
|
3687
3698
|
if (t) {
|
|
3688
|
-
let d =
|
|
3699
|
+
let d = Ls();
|
|
3689
3700
|
e.auth = Object.assign({ token: t, param: d }, e.auth || {});
|
|
3690
3701
|
}
|
|
3691
|
-
e = Object.assign({},
|
|
3702
|
+
e = Object.assign({}, un, e);
|
|
3692
3703
|
let {
|
|
3693
3704
|
logLevel: r,
|
|
3694
3705
|
logger: s,
|
|
@@ -3697,53 +3708,52 @@ function ks(n, e) {
|
|
|
3697
3708
|
maxMissingPings: c,
|
|
3698
3709
|
maxReconnectAttempts: u
|
|
3699
3710
|
} = e;
|
|
3700
|
-
return s = e.logger = e.logger || new
|
|
3711
|
+
return s = e.logger = e.logger || new As(r), o = e.reconnectStrategy = e.reconnectStrategy || an(i), e.monitor !== !1 && (e.monitor = e.monitor || new Cs({
|
|
3701
3712
|
pingInterval: i,
|
|
3702
3713
|
reconnectStrategy: o,
|
|
3703
3714
|
maxMissingPings: c,
|
|
3704
3715
|
maxReconnectAttempts: u,
|
|
3705
3716
|
logger: s
|
|
3706
|
-
})),
|
|
3717
|
+
})), xs(n, e);
|
|
3707
3718
|
}
|
|
3708
|
-
function
|
|
3709
|
-
let t =
|
|
3710
|
-
return new
|
|
3719
|
+
function vs(n, e) {
|
|
3720
|
+
let t = Ds(n, e);
|
|
3721
|
+
return new Rs(t);
|
|
3711
3722
|
}
|
|
3712
|
-
class
|
|
3713
|
-
constructor(e = "/openc3-api/cable"
|
|
3714
|
-
this._cable = null, this._url = e
|
|
3723
|
+
class $i {
|
|
3724
|
+
constructor(e = "/openc3-api/cable") {
|
|
3725
|
+
this._cable = null, this._url = e;
|
|
3715
3726
|
}
|
|
3716
3727
|
disconnect() {
|
|
3717
3728
|
this._cable && (this._cable.cable.disconnect(), this._cable = null);
|
|
3718
3729
|
}
|
|
3719
3730
|
createSubscription(e, t, r = {}, s = {}) {
|
|
3720
|
-
return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3731
|
+
return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(
|
|
3732
|
+
(i) => {
|
|
3733
|
+
if (i && OpenC3Auth.setTokens(), this._cable == null) {
|
|
3734
|
+
const o = new URL(this._url, document.baseURI);
|
|
3735
|
+
o.searchParams.set("scope", t), this._cable = vs(o.href);
|
|
3736
|
+
}
|
|
3737
|
+
return this._cable.subscriptions.create(
|
|
3738
|
+
{
|
|
3739
|
+
channel: e,
|
|
3740
|
+
token: localStorage.openc3Token,
|
|
3741
|
+
...s
|
|
3742
|
+
},
|
|
3743
|
+
r
|
|
3744
|
+
);
|
|
3728
3745
|
}
|
|
3729
|
-
|
|
3730
|
-
{
|
|
3731
|
-
channel: e,
|
|
3732
|
-
...s
|
|
3733
|
-
},
|
|
3734
|
-
r
|
|
3735
|
-
);
|
|
3736
|
-
});
|
|
3746
|
+
);
|
|
3737
3747
|
}
|
|
3738
3748
|
recordPing() {
|
|
3739
3749
|
}
|
|
3740
3750
|
}
|
|
3741
|
-
class
|
|
3751
|
+
class Tt {
|
|
3742
3752
|
constructor(e, t, r = "", s = "") {
|
|
3743
3753
|
this.keyword = e.keyword, this.parameters = e.parameters, this.filename = e.filename, this.line = e.line, this.lineNumber = e.lineNumber, this.message = t, this.usage = r, this.url = s;
|
|
3744
3754
|
}
|
|
3745
3755
|
}
|
|
3746
|
-
class
|
|
3756
|
+
class Bi {
|
|
3747
3757
|
keyword = null;
|
|
3748
3758
|
parameters = [];
|
|
3749
3759
|
filename = "";
|
|
@@ -3755,14 +3765,14 @@ class Fi {
|
|
|
3755
3765
|
verify_num_parameters(e, t, r = "") {
|
|
3756
3766
|
for (let s = 1; s <= e; s++)
|
|
3757
3767
|
if (this.parameters[s - 1] === void 0)
|
|
3758
|
-
throw new
|
|
3768
|
+
throw new Tt(
|
|
3759
3769
|
this,
|
|
3760
3770
|
`Not enough parameters for ${this.keyword}.`,
|
|
3761
3771
|
r,
|
|
3762
3772
|
this.url
|
|
3763
3773
|
);
|
|
3764
3774
|
if (t && this.parameters[t] !== void 0)
|
|
3765
|
-
throw new
|
|
3775
|
+
throw new Tt(
|
|
3766
3776
|
this,
|
|
3767
3777
|
`Too many parameters for ${this.keyword}.`,
|
|
3768
3778
|
r,
|
|
@@ -3860,27 +3870,27 @@ class Fi {
|
|
|
3860
3870
|
// parse_string
|
|
3861
3871
|
}
|
|
3862
3872
|
function he(n) {
|
|
3863
|
-
return
|
|
3873
|
+
return Fs.test(n);
|
|
3864
3874
|
}
|
|
3865
|
-
const
|
|
3866
|
-
function
|
|
3867
|
-
return
|
|
3875
|
+
const Fs = /^-?[0-9]+$/;
|
|
3876
|
+
function dn(n) {
|
|
3877
|
+
return js.test(n);
|
|
3868
3878
|
}
|
|
3869
|
-
const
|
|
3870
|
-
function
|
|
3879
|
+
const js = /^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
|
|
3880
|
+
function hn(n, e) {
|
|
3871
3881
|
if (he(n))
|
|
3872
3882
|
return Number.isSafeInteger(Number.parseInt(n, 10));
|
|
3873
3883
|
const t = Number.parseFloat(n), r = String(t);
|
|
3874
3884
|
if (n === r)
|
|
3875
3885
|
return !0;
|
|
3876
|
-
const s =
|
|
3886
|
+
const s = Nt(n), i = Nt(r);
|
|
3877
3887
|
return !!(s === i || e?.approx === !0 && !he(n) && i.length >= 14 && s.startsWith(i.substring(0, 14)));
|
|
3878
3888
|
}
|
|
3879
3889
|
let de = /* @__PURE__ */ (function(n) {
|
|
3880
3890
|
return n.underflow = "underflow", n.overflow = "overflow", n.truncate_integer = "truncate_integer", n.truncate_float = "truncate_float", n;
|
|
3881
3891
|
})({});
|
|
3882
|
-
function
|
|
3883
|
-
if (
|
|
3892
|
+
function Us(n) {
|
|
3893
|
+
if (hn(n, {
|
|
3884
3894
|
approx: !1
|
|
3885
3895
|
}))
|
|
3886
3896
|
return;
|
|
@@ -3889,14 +3899,14 @@ function vs(n) {
|
|
|
3889
3899
|
const e = Number.parseFloat(n);
|
|
3890
3900
|
return Number.isFinite(e) ? e === 0 ? de.underflow : de.truncate_float : de.overflow;
|
|
3891
3901
|
}
|
|
3892
|
-
function
|
|
3902
|
+
function Nt(n) {
|
|
3893
3903
|
const {
|
|
3894
3904
|
start: e,
|
|
3895
3905
|
end: t
|
|
3896
|
-
} =
|
|
3906
|
+
} = $s(n), r = n.substring(e, t), s = r.indexOf(".");
|
|
3897
3907
|
return s === -1 ? r : r.substring(0, s) + r.substring(s + 1);
|
|
3898
3908
|
}
|
|
3899
|
-
function
|
|
3909
|
+
function $s(n) {
|
|
3900
3910
|
let e = 0;
|
|
3901
3911
|
for (n[0] === "-" && e++; n[e] === "0" || n[e] === "."; )
|
|
3902
3912
|
e++;
|
|
@@ -3908,12 +3918,12 @@ function Fs(n) {
|
|
|
3908
3918
|
end: t
|
|
3909
3919
|
};
|
|
3910
3920
|
}
|
|
3911
|
-
class
|
|
3921
|
+
class Bs {
|
|
3912
3922
|
// numeric value as string
|
|
3913
3923
|
// type information
|
|
3914
3924
|
isLosslessNumber = !0;
|
|
3915
3925
|
constructor(e) {
|
|
3916
|
-
if (!
|
|
3926
|
+
if (!dn(e))
|
|
3917
3927
|
throw new Error(`Invalid number (value: "${e}")`);
|
|
3918
3928
|
this.value = e;
|
|
3919
3929
|
}
|
|
@@ -3929,7 +3939,7 @@ class js {
|
|
|
3929
3939
|
* and toSafeNumberOrThrow to convert it to a numeric value.
|
|
3930
3940
|
*/
|
|
3931
3941
|
valueOf() {
|
|
3932
|
-
const e =
|
|
3942
|
+
const e = Us(this.value);
|
|
3933
3943
|
if (e === void 0 || e === de.truncate_float)
|
|
3934
3944
|
return Number.parseFloat(this.value);
|
|
3935
3945
|
if (he(this.value))
|
|
@@ -3946,55 +3956,55 @@ class js {
|
|
|
3946
3956
|
// or use that, it cannot safely turn the numeric value in the string into
|
|
3947
3957
|
// stringified JSON since it has to be parsed into a number first.
|
|
3948
3958
|
}
|
|
3949
|
-
function
|
|
3959
|
+
function qs(n) {
|
|
3950
3960
|
return n && typeof n == "object" && n.isLosslessNumber || !1;
|
|
3951
3961
|
}
|
|
3952
|
-
function
|
|
3953
|
-
return new
|
|
3962
|
+
function Ms(n) {
|
|
3963
|
+
return new Bs(n);
|
|
3954
3964
|
}
|
|
3955
|
-
function
|
|
3956
|
-
return
|
|
3965
|
+
function Hs(n, e) {
|
|
3966
|
+
return it({
|
|
3957
3967
|
"": n
|
|
3958
3968
|
}, "", n, e);
|
|
3959
3969
|
}
|
|
3960
|
-
function
|
|
3961
|
-
return Array.isArray(t) ? r.call(n, e,
|
|
3970
|
+
function it(n, e, t, r) {
|
|
3971
|
+
return Array.isArray(t) ? r.call(n, e, Vs(t, r)) : t && typeof t == "object" && !qs(t) ? r.call(n, e, zs(t, r)) : r.call(n, e, t);
|
|
3962
3972
|
}
|
|
3963
|
-
function
|
|
3973
|
+
function zs(n, e) {
|
|
3964
3974
|
for (const t of Object.keys(n)) {
|
|
3965
|
-
const r =
|
|
3975
|
+
const r = it(n, t, n[t], e);
|
|
3966
3976
|
r !== void 0 ? n[t] = r : delete n[t];
|
|
3967
3977
|
}
|
|
3968
3978
|
return n;
|
|
3969
3979
|
}
|
|
3970
|
-
function
|
|
3980
|
+
function Vs(n, e) {
|
|
3971
3981
|
for (let t = 0; t < n.length; t++)
|
|
3972
|
-
n[t] =
|
|
3982
|
+
n[t] = it(n, String(t), n[t], e);
|
|
3973
3983
|
return n;
|
|
3974
3984
|
}
|
|
3975
|
-
function
|
|
3985
|
+
function Js(n, e, t) {
|
|
3976
3986
|
const r = typeof t == "function" ? {
|
|
3977
3987
|
parseNumber: t
|
|
3978
|
-
} : t, s = r?.parseNumber ??
|
|
3988
|
+
} : t, s = r?.parseNumber ?? Ms, i = r?.onDuplicateKey ?? V;
|
|
3979
3989
|
let o = 0;
|
|
3980
3990
|
const c = l();
|
|
3981
|
-
return g(c), S(), e ?
|
|
3991
|
+
return g(c), S(), e ? Hs(c, e) : c;
|
|
3982
3992
|
function u() {
|
|
3983
|
-
if (n.charCodeAt(o) ===
|
|
3993
|
+
if (n.charCodeAt(o) === Ys) {
|
|
3984
3994
|
o++, _();
|
|
3985
3995
|
const E = {};
|
|
3986
3996
|
let O = !0;
|
|
3987
|
-
for (; o < n.length && n.charCodeAt(o) !==
|
|
3997
|
+
for (; o < n.length && n.charCodeAt(o) !== kt; ) {
|
|
3988
3998
|
O ? O = !1 : (p(), _());
|
|
3989
3999
|
const N = o, C = m();
|
|
3990
4000
|
if (C === void 0) {
|
|
3991
|
-
|
|
4001
|
+
B();
|
|
3992
4002
|
return;
|
|
3993
4003
|
}
|
|
3994
4004
|
_(), f();
|
|
3995
4005
|
const U = l();
|
|
3996
4006
|
if (U === void 0) {
|
|
3997
|
-
|
|
4007
|
+
q();
|
|
3998
4008
|
return;
|
|
3999
4009
|
}
|
|
4000
4010
|
if (Object.prototype.hasOwnProperty.call(E, C) && !Ge(U, E[C])) {
|
|
@@ -4008,20 +4018,20 @@ function Hs(n, e, t) {
|
|
|
4008
4018
|
} else
|
|
4009
4019
|
E[C] = U;
|
|
4010
4020
|
}
|
|
4011
|
-
return n.charCodeAt(o) !==
|
|
4021
|
+
return n.charCodeAt(o) !== kt && G(), o++, E;
|
|
4012
4022
|
}
|
|
4013
4023
|
}
|
|
4014
4024
|
function d() {
|
|
4015
|
-
if (n.charCodeAt(o) ===
|
|
4025
|
+
if (n.charCodeAt(o) === Zs) {
|
|
4016
4026
|
o++, _();
|
|
4017
4027
|
const E = [];
|
|
4018
4028
|
let O = !0;
|
|
4019
|
-
for (; o < n.length && n.charCodeAt(o) !==
|
|
4029
|
+
for (; o < n.length && n.charCodeAt(o) !== It; ) {
|
|
4020
4030
|
O ? O = !1 : p();
|
|
4021
4031
|
const N = l();
|
|
4022
4032
|
w(N), E.push(N);
|
|
4023
4033
|
}
|
|
4024
|
-
return n.charCodeAt(o) !==
|
|
4034
|
+
return n.charCodeAt(o) !== It && J(), o++, E;
|
|
4025
4035
|
}
|
|
4026
4036
|
}
|
|
4027
4037
|
function l() {
|
|
@@ -4034,7 +4044,7 @@ function Hs(n, e, t) {
|
|
|
4034
4044
|
return o += E.length, O;
|
|
4035
4045
|
}
|
|
4036
4046
|
function _() {
|
|
4037
|
-
for (;
|
|
4047
|
+
for (; Ws(n.charCodeAt(o)); )
|
|
4038
4048
|
o++;
|
|
4039
4049
|
}
|
|
4040
4050
|
function m() {
|
|
@@ -4042,11 +4052,11 @@ function Hs(n, e, t) {
|
|
|
4042
4052
|
o++;
|
|
4043
4053
|
let E = "";
|
|
4044
4054
|
for (; o < n.length && n.charCodeAt(o) !== He; ) {
|
|
4045
|
-
if (n.charCodeAt(o) ===
|
|
4046
|
-
const O = n[o + 1], N =
|
|
4055
|
+
if (n.charCodeAt(o) === Qs) {
|
|
4056
|
+
const O = n[o + 1], N = Gs[O];
|
|
4047
4057
|
N !== void 0 ? (E += N, o++) : O === "u" ? xe(n.charCodeAt(o + 2)) && xe(n.charCodeAt(o + 3)) && xe(n.charCodeAt(o + 4)) && xe(n.charCodeAt(o + 5)) ? (E += String.fromCharCode(Number.parseInt(n.slice(o + 2, o + 6), 16)), o += 5) : K(o) : D(o);
|
|
4048
4058
|
} else
|
|
4049
|
-
|
|
4059
|
+
Xs(n.charCodeAt(o)) ? E += n[o] : j(n[o]);
|
|
4050
4060
|
o++;
|
|
4051
4061
|
}
|
|
4052
4062
|
return T(), o++, E;
|
|
@@ -4054,27 +4064,27 @@ function Hs(n, e, t) {
|
|
|
4054
4064
|
}
|
|
4055
4065
|
function y() {
|
|
4056
4066
|
const E = o;
|
|
4057
|
-
if (n.charCodeAt(o) ===
|
|
4067
|
+
if (n.charCodeAt(o) === Lt && (o++, R(E)), n.charCodeAt(o) === ot)
|
|
4058
4068
|
o++;
|
|
4059
|
-
else if (
|
|
4069
|
+
else if (Ks(n.charCodeAt(o)))
|
|
4060
4070
|
for (o++; Oe(n.charCodeAt(o)); )
|
|
4061
4071
|
o++;
|
|
4062
|
-
if (n.charCodeAt(o) ===
|
|
4072
|
+
if (n.charCodeAt(o) === ci)
|
|
4063
4073
|
for (o++, R(E); Oe(n.charCodeAt(o)); )
|
|
4064
4074
|
o++;
|
|
4065
|
-
if (n.charCodeAt(o) ===
|
|
4066
|
-
for (o++, (n.charCodeAt(o) ===
|
|
4075
|
+
if (n.charCodeAt(o) === hi || n.charCodeAt(o) === di)
|
|
4076
|
+
for (o++, (n.charCodeAt(o) === Lt || n.charCodeAt(o) === si) && o++, R(E); Oe(n.charCodeAt(o)); )
|
|
4067
4077
|
o++;
|
|
4068
4078
|
if (o > E)
|
|
4069
4079
|
return s(n.slice(E, o));
|
|
4070
4080
|
}
|
|
4071
4081
|
function p() {
|
|
4072
|
-
if (n.charCodeAt(o) !==
|
|
4082
|
+
if (n.charCodeAt(o) !== oi)
|
|
4073
4083
|
throw new SyntaxError(`Comma ',' expected after value ${k()}`);
|
|
4074
4084
|
o++;
|
|
4075
4085
|
}
|
|
4076
4086
|
function f() {
|
|
4077
|
-
if (n.charCodeAt(o) !==
|
|
4087
|
+
if (n.charCodeAt(o) !== ai)
|
|
4078
4088
|
throw new SyntaxError(`Colon ':' expected after property name ${k()}`);
|
|
4079
4089
|
o++;
|
|
4080
4090
|
}
|
|
@@ -4100,7 +4110,7 @@ function Hs(n, e, t) {
|
|
|
4100
4110
|
if (n.charCodeAt(o) !== He)
|
|
4101
4111
|
throw new SyntaxError(`End of string '"' expected ${k()}`);
|
|
4102
4112
|
}
|
|
4103
|
-
function
|
|
4113
|
+
function B() {
|
|
4104
4114
|
throw new SyntaxError(`Quoted object key expected ${k()}`);
|
|
4105
4115
|
}
|
|
4106
4116
|
function V(E) {
|
|
@@ -4123,7 +4133,7 @@ function Hs(n, e, t) {
|
|
|
4123
4133
|
const O = n.slice(E, E + 2);
|
|
4124
4134
|
throw new SyntaxError(`Invalid escape character '${O}' ${P()}`);
|
|
4125
4135
|
}
|
|
4126
|
-
function
|
|
4136
|
+
function q() {
|
|
4127
4137
|
throw new SyntaxError(`Object value expected after ':' ${P()}`);
|
|
4128
4138
|
}
|
|
4129
4139
|
function K(E) {
|
|
@@ -4140,28 +4150,28 @@ function Hs(n, e, t) {
|
|
|
4140
4150
|
return `${ce()} ${P()}`;
|
|
4141
4151
|
}
|
|
4142
4152
|
}
|
|
4143
|
-
function
|
|
4144
|
-
return n ===
|
|
4153
|
+
function Ws(n) {
|
|
4154
|
+
return n === ei || n === ti || n === ni || n === ri;
|
|
4145
4155
|
}
|
|
4146
4156
|
function xe(n) {
|
|
4147
|
-
return n >=
|
|
4157
|
+
return n >= ot && n <= ct || n >= li && n <= fi || n >= ui && n <= pi;
|
|
4148
4158
|
}
|
|
4149
4159
|
function Oe(n) {
|
|
4150
|
-
return n >=
|
|
4160
|
+
return n >= ot && n <= ct;
|
|
4151
4161
|
}
|
|
4152
|
-
function
|
|
4153
|
-
return n >=
|
|
4162
|
+
function Ks(n) {
|
|
4163
|
+
return n >= ii && n <= ct;
|
|
4154
4164
|
}
|
|
4155
|
-
function
|
|
4165
|
+
function Xs(n) {
|
|
4156
4166
|
return n >= 32 && n <= 1114111;
|
|
4157
4167
|
}
|
|
4158
4168
|
function Ge(n, e) {
|
|
4159
|
-
return n === e ? !0 : Array.isArray(n) && Array.isArray(e) ? n.length === e.length && n.every((t, r) => Ge(t, e[r])) :
|
|
4169
|
+
return n === e ? !0 : Array.isArray(n) && Array.isArray(e) ? n.length === e.length && n.every((t, r) => Ge(t, e[r])) : Pt(n) && Pt(e) ? [.../* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(e)])].every((r) => Ge(n[r], e[r])) : !1;
|
|
4160
4170
|
}
|
|
4161
|
-
function
|
|
4171
|
+
function Pt(n) {
|
|
4162
4172
|
return typeof n == "object" && n !== null;
|
|
4163
4173
|
}
|
|
4164
|
-
const
|
|
4174
|
+
const Gs = {
|
|
4165
4175
|
'"': '"',
|
|
4166
4176
|
"\\": "\\",
|
|
4167
4177
|
"/": "/",
|
|
@@ -4172,8 +4182,8 @@ const Ws = {
|
|
|
4172
4182
|
r: "\r",
|
|
4173
4183
|
t: " "
|
|
4174
4184
|
// note that \u is handled separately in parseString()
|
|
4175
|
-
},
|
|
4176
|
-
function
|
|
4185
|
+
}, Qs = 92, Ys = 123, kt = 125, Zs = 91, It = 93, ei = 32, ti = 10, ni = 9, ri = 13, He = 34, si = 43, Lt = 45, ot = 48, ii = 49, ct = 57, oi = 44, ci = 46, ai = 58, li = 65, ui = 97, di = 69, hi = 101, fi = 70, pi = 102;
|
|
4186
|
+
function fn(n, e, t, r) {
|
|
4177
4187
|
const s = void 0;
|
|
4178
4188
|
return o(n, "");
|
|
4179
4189
|
function o(l, h) {
|
|
@@ -4181,7 +4191,7 @@ function dn(n, e, t, r) {
|
|
|
4181
4191
|
const _ = r.find((m) => m.test(l));
|
|
4182
4192
|
if (_) {
|
|
4183
4193
|
const m = _.stringify(l);
|
|
4184
|
-
if (typeof m != "string" || !
|
|
4194
|
+
if (typeof m != "string" || !dn(m))
|
|
4185
4195
|
throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${m})`);
|
|
4186
4196
|
return m;
|
|
4187
4197
|
}
|
|
@@ -4211,7 +4221,7 @@ ${h}]` : "]", m;
|
|
|
4211
4221
|
}
|
|
4212
4222
|
function u(l, h) {
|
|
4213
4223
|
if (typeof l.toJSON == "function")
|
|
4214
|
-
return
|
|
4224
|
+
return fn(l.toJSON(), e, t, void 0);
|
|
4215
4225
|
const _ = Array.isArray(e) ? e.map(String) : Object.keys(l);
|
|
4216
4226
|
if (_.length === 0)
|
|
4217
4227
|
return "{}";
|
|
@@ -4234,10 +4244,10 @@ ${h}}` : "}", p;
|
|
|
4234
4244
|
return typeof h < "u" && typeof h != "function" && typeof h != "symbol";
|
|
4235
4245
|
}
|
|
4236
4246
|
}
|
|
4237
|
-
function
|
|
4238
|
-
return he(n) && !
|
|
4247
|
+
function gi(n) {
|
|
4248
|
+
return he(n) && !hn(n) ? BigInt(n) : parseFloat(n);
|
|
4239
4249
|
}
|
|
4240
|
-
class
|
|
4250
|
+
class qi {
|
|
4241
4251
|
id = 1;
|
|
4242
4252
|
constructor() {
|
|
4243
4253
|
}
|
|
@@ -4251,7 +4261,7 @@ class ji {
|
|
|
4251
4261
|
}
|
|
4252
4262
|
this.id = this.id + 1;
|
|
4253
4263
|
try {
|
|
4254
|
-
return r.scope = window.openc3Scope, s.manual = !0, (await
|
|
4264
|
+
return r.scope = window.openc3Scope, s.manual = !0, (await rt.post(
|
|
4255
4265
|
"/openc3-api/api",
|
|
4256
4266
|
{
|
|
4257
4267
|
jsonrpc: "2.0",
|
|
@@ -4268,12 +4278,12 @@ class ji {
|
|
|
4268
4278
|
},
|
|
4269
4279
|
timeout: i,
|
|
4270
4280
|
transformRequest: [
|
|
4271
|
-
(c, u) =>
|
|
4281
|
+
(c, u) => fn(c)
|
|
4272
4282
|
],
|
|
4273
4283
|
transformResponse: [
|
|
4274
4284
|
(c) => {
|
|
4275
4285
|
try {
|
|
4276
|
-
return
|
|
4286
|
+
return Js(c, void 0, gi);
|
|
4277
4287
|
} catch {
|
|
4278
4288
|
const d = typeof c == "string" ? c.substring(0, 200) : String(c), l = new Error(
|
|
4279
4289
|
`Server returned non-JSON response: ${d}`
|
|
@@ -4818,11 +4828,11 @@ class ji {
|
|
|
4818
4828
|
}
|
|
4819
4829
|
}
|
|
4820
4830
|
export {
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4831
|
+
Fi as Api,
|
|
4832
|
+
$i as Cable,
|
|
4833
|
+
Tt as ConfigParserError,
|
|
4834
|
+
Bi as ConfigParserService,
|
|
4835
|
+
qi as OpenC3Api,
|
|
4836
|
+
rt as axios
|
|
4827
4837
|
};
|
|
4828
4838
|
//# sourceMappingURL=services.js.map
|