@voicenter-team/events-sdk 0.0.112 → 0.0.114
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/README.md +337 -337
- package/dist/voicenter-events-sdk.cjs.js +8 -8
- package/dist/voicenter-events-sdk.cjs.js.map +1 -1
- package/dist/voicenter-events-sdk.d.ts +119 -2
- package/dist/voicenter-events-sdk.es.js +982 -964
- package/dist/voicenter-events-sdk.es.js.map +1 -1
- package/dist/voicenter-events-sdk.iife.js +11 -11
- package/dist/voicenter-events-sdk.iife.js.map +1 -1
- package/dist/voicenter-events-sdk.umd.js +11 -11
- package/dist/voicenter-events-sdk.umd.js.map +1 -1
- package/package.json +65 -64
|
@@ -1,73 +1,73 @@
|
|
|
1
1
|
var Ie = Object.defineProperty;
|
|
2
2
|
var Re = (a, t, e) => t in a ? Ie(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
3
|
var q = (a, t, e) => (Re(a, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
-
import
|
|
5
|
-
import Ue, { LevelEnum as z,
|
|
6
|
-
function
|
|
4
|
+
import Be from "ws";
|
|
5
|
+
import Ue, { LevelEnum as z, LogTypeEnum as Y, ActionNameEnum as Q } from "@voicenter-team/socketio-storage-logger";
|
|
6
|
+
function xe(a) {
|
|
7
7
|
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
8
8
|
}
|
|
9
9
|
var we = { exports: {} }, be = { exports: {} };
|
|
10
10
|
(function() {
|
|
11
11
|
var a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", t = {
|
|
12
12
|
// Bit-wise rotation left
|
|
13
|
-
rotl: function(e,
|
|
14
|
-
return e <<
|
|
13
|
+
rotl: function(e, r) {
|
|
14
|
+
return e << r | e >>> 32 - r;
|
|
15
15
|
},
|
|
16
16
|
// Bit-wise rotation right
|
|
17
|
-
rotr: function(e,
|
|
18
|
-
return e << 32 -
|
|
17
|
+
rotr: function(e, r) {
|
|
18
|
+
return e << 32 - r | e >>> r;
|
|
19
19
|
},
|
|
20
20
|
// Swap big-endian to little-endian and vice versa
|
|
21
21
|
endian: function(e) {
|
|
22
22
|
if (e.constructor == Number)
|
|
23
23
|
return t.rotl(e, 8) & 16711935 | t.rotl(e, 24) & 4278255360;
|
|
24
|
-
for (var
|
|
25
|
-
e[
|
|
24
|
+
for (var r = 0; r < e.length; r++)
|
|
25
|
+
e[r] = t.endian(e[r]);
|
|
26
26
|
return e;
|
|
27
27
|
},
|
|
28
28
|
// Generate an array of any length of random bytes
|
|
29
29
|
randomBytes: function(e) {
|
|
30
|
-
for (var
|
|
31
|
-
|
|
32
|
-
return
|
|
30
|
+
for (var r = []; e > 0; e--)
|
|
31
|
+
r.push(Math.floor(Math.random() * 256));
|
|
32
|
+
return r;
|
|
33
33
|
},
|
|
34
34
|
// Convert a byte array to big-endian 32-bit words
|
|
35
35
|
bytesToWords: function(e) {
|
|
36
|
-
for (var
|
|
37
|
-
|
|
38
|
-
return
|
|
36
|
+
for (var r = [], o = 0, h = 0; o < e.length; o++, h += 8)
|
|
37
|
+
r[h >>> 5] |= e[o] << 24 - h % 32;
|
|
38
|
+
return r;
|
|
39
39
|
},
|
|
40
40
|
// Convert big-endian 32-bit words to a byte array
|
|
41
41
|
wordsToBytes: function(e) {
|
|
42
|
-
for (var
|
|
43
|
-
|
|
44
|
-
return
|
|
42
|
+
for (var r = [], o = 0; o < e.length * 32; o += 8)
|
|
43
|
+
r.push(e[o >>> 5] >>> 24 - o % 32 & 255);
|
|
44
|
+
return r;
|
|
45
45
|
},
|
|
46
46
|
// Convert a byte array to a hex string
|
|
47
47
|
bytesToHex: function(e) {
|
|
48
|
-
for (var
|
|
49
|
-
|
|
50
|
-
return
|
|
48
|
+
for (var r = [], o = 0; o < e.length; o++)
|
|
49
|
+
r.push((e[o] >>> 4).toString(16)), r.push((e[o] & 15).toString(16));
|
|
50
|
+
return r.join("");
|
|
51
51
|
},
|
|
52
52
|
// Convert a hex string to a byte array
|
|
53
53
|
hexToBytes: function(e) {
|
|
54
|
-
for (var
|
|
55
|
-
|
|
56
|
-
return
|
|
54
|
+
for (var r = [], o = 0; o < e.length; o += 2)
|
|
55
|
+
r.push(parseInt(e.substr(o, 2), 16));
|
|
56
|
+
return r;
|
|
57
57
|
},
|
|
58
58
|
// Convert a byte array to a base-64 string
|
|
59
59
|
bytesToBase64: function(e) {
|
|
60
|
-
for (var
|
|
60
|
+
for (var r = [], o = 0; o < e.length; o += 3)
|
|
61
61
|
for (var h = e[o] << 16 | e[o + 1] << 8 | e[o + 2], f = 0; f < 4; f++)
|
|
62
|
-
o * 8 + f * 6 <= e.length * 8 ?
|
|
63
|
-
return
|
|
62
|
+
o * 8 + f * 6 <= e.length * 8 ? r.push(a.charAt(h >>> 6 * (3 - f) & 63)) : r.push("=");
|
|
63
|
+
return r.join("");
|
|
64
64
|
},
|
|
65
65
|
// Convert a base-64 string to a byte array
|
|
66
66
|
base64ToBytes: function(e) {
|
|
67
67
|
e = e.replace(/[^A-Z0-9+\/]/ig, "");
|
|
68
|
-
for (var
|
|
69
|
-
h != 0 &&
|
|
70
|
-
return
|
|
68
|
+
for (var r = [], o = 0, h = 0; o < e.length; h = ++o % 4)
|
|
69
|
+
h != 0 && r.push((a.indexOf(e.charAt(o - 1)) & Math.pow(2, -2 * h + 8) - 1) << h * 2 | a.indexOf(e.charAt(o)) >>> 6 - h * 2);
|
|
70
|
+
return r;
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
be.exports = t;
|
|
@@ -116,50 +116,50 @@ function Pe(a) {
|
|
|
116
116
|
return typeof a.readFloatLE == "function" && typeof a.slice == "function" && Ae(a.slice(0, 0));
|
|
117
117
|
}
|
|
118
118
|
(function() {
|
|
119
|
-
var a = De, t = Te.utf8, e = je,
|
|
120
|
-
h.constructor == String ? f && f.encoding === "binary" ? h =
|
|
121
|
-
for (var l = a.bytesToWords(h), d = h.length * 8, i = 1732584193,
|
|
119
|
+
var a = De, t = Te.utf8, e = je, r = Te.bin, o = function(h, f) {
|
|
120
|
+
h.constructor == String ? f && f.encoding === "binary" ? h = r.stringToBytes(h) : h = t.stringToBytes(h) : e(h) ? h = Array.prototype.slice.call(h, 0) : !Array.isArray(h) && h.constructor !== Uint8Array && (h = h.toString());
|
|
121
|
+
for (var l = a.bytesToWords(h), d = h.length * 8, i = 1732584193, u = -271733879, c = -1732584194, s = 271733878, n = 0; n < l.length; n++)
|
|
122
122
|
l[n] = (l[n] << 8 | l[n] >>> 24) & 16711935 | (l[n] << 24 | l[n] >>> 8) & 4278255360;
|
|
123
123
|
l[d >>> 5] |= 128 << d % 32, l[(d + 64 >>> 9 << 4) + 14] = d;
|
|
124
|
-
for (var
|
|
125
|
-
var P = i,
|
|
126
|
-
i =
|
|
124
|
+
for (var p = o._ff, g = o._gg, y = o._hh, w = o._ii, n = 0; n < l.length; n += 16) {
|
|
125
|
+
var P = i, x = u, V = c, I = s;
|
|
126
|
+
i = p(i, u, c, s, l[n + 0], 7, -680876936), s = p(s, i, u, c, l[n + 1], 12, -389564586), c = p(c, s, i, u, l[n + 2], 17, 606105819), u = p(u, c, s, i, l[n + 3], 22, -1044525330), i = p(i, u, c, s, l[n + 4], 7, -176418897), s = p(s, i, u, c, l[n + 5], 12, 1200080426), c = p(c, s, i, u, l[n + 6], 17, -1473231341), u = p(u, c, s, i, l[n + 7], 22, -45705983), i = p(i, u, c, s, l[n + 8], 7, 1770035416), s = p(s, i, u, c, l[n + 9], 12, -1958414417), c = p(c, s, i, u, l[n + 10], 17, -42063), u = p(u, c, s, i, l[n + 11], 22, -1990404162), i = p(i, u, c, s, l[n + 12], 7, 1804603682), s = p(s, i, u, c, l[n + 13], 12, -40341101), c = p(c, s, i, u, l[n + 14], 17, -1502002290), u = p(u, c, s, i, l[n + 15], 22, 1236535329), i = g(i, u, c, s, l[n + 1], 5, -165796510), s = g(s, i, u, c, l[n + 6], 9, -1069501632), c = g(c, s, i, u, l[n + 11], 14, 643717713), u = g(u, c, s, i, l[n + 0], 20, -373897302), i = g(i, u, c, s, l[n + 5], 5, -701558691), s = g(s, i, u, c, l[n + 10], 9, 38016083), c = g(c, s, i, u, l[n + 15], 14, -660478335), u = g(u, c, s, i, l[n + 4], 20, -405537848), i = g(i, u, c, s, l[n + 9], 5, 568446438), s = g(s, i, u, c, l[n + 14], 9, -1019803690), c = g(c, s, i, u, l[n + 3], 14, -187363961), u = g(u, c, s, i, l[n + 8], 20, 1163531501), i = g(i, u, c, s, l[n + 13], 5, -1444681467), s = g(s, i, u, c, l[n + 2], 9, -51403784), c = g(c, s, i, u, l[n + 7], 14, 1735328473), u = g(u, c, s, i, l[n + 12], 20, -1926607734), i = y(i, u, c, s, l[n + 5], 4, -378558), s = y(s, i, u, c, l[n + 8], 11, -2022574463), c = y(c, s, i, u, l[n + 11], 16, 1839030562), u = y(u, c, s, i, l[n + 14], 23, -35309556), i = y(i, u, c, s, l[n + 1], 4, -1530992060), s = y(s, i, u, c, l[n + 4], 11, 1272893353), c = y(c, s, i, u, l[n + 7], 16, -155497632), u = y(u, c, s, i, l[n + 10], 23, -1094730640), i = y(i, u, c, s, l[n + 13], 4, 681279174), s = y(s, i, u, c, l[n + 0], 11, -358537222), c = y(c, s, i, u, l[n + 3], 16, -722521979), u = y(u, c, s, i, l[n + 6], 23, 76029189), i = y(i, u, c, s, l[n + 9], 4, -640364487), s = y(s, i, u, c, l[n + 12], 11, -421815835), c = y(c, s, i, u, l[n + 15], 16, 530742520), u = y(u, c, s, i, l[n + 2], 23, -995338651), i = w(i, u, c, s, l[n + 0], 6, -198630844), s = w(s, i, u, c, l[n + 7], 10, 1126891415), c = w(c, s, i, u, l[n + 14], 15, -1416354905), u = w(u, c, s, i, l[n + 5], 21, -57434055), i = w(i, u, c, s, l[n + 12], 6, 1700485571), s = w(s, i, u, c, l[n + 3], 10, -1894986606), c = w(c, s, i, u, l[n + 10], 15, -1051523), u = w(u, c, s, i, l[n + 1], 21, -2054922799), i = w(i, u, c, s, l[n + 8], 6, 1873313359), s = w(s, i, u, c, l[n + 15], 10, -30611744), c = w(c, s, i, u, l[n + 6], 15, -1560198380), u = w(u, c, s, i, l[n + 13], 21, 1309151649), i = w(i, u, c, s, l[n + 4], 6, -145523070), s = w(s, i, u, c, l[n + 11], 10, -1120210379), c = w(c, s, i, u, l[n + 2], 15, 718787259), u = w(u, c, s, i, l[n + 9], 21, -343485551), i = i + P >>> 0, u = u + x >>> 0, c = c + V >>> 0, s = s + I >>> 0;
|
|
127
127
|
}
|
|
128
|
-
return a.endian([i,
|
|
128
|
+
return a.endian([i, u, c, s]);
|
|
129
129
|
};
|
|
130
|
-
o._ff = function(h, f, l, d, i,
|
|
131
|
-
var
|
|
132
|
-
return (
|
|
133
|
-
}, o._gg = function(h, f, l, d, i,
|
|
134
|
-
var
|
|
135
|
-
return (
|
|
136
|
-
}, o._hh = function(h, f, l, d, i,
|
|
137
|
-
var
|
|
138
|
-
return (
|
|
139
|
-
}, o._ii = function(h, f, l, d, i,
|
|
140
|
-
var
|
|
141
|
-
return (
|
|
130
|
+
o._ff = function(h, f, l, d, i, u, c) {
|
|
131
|
+
var s = h + (f & l | ~f & d) + (i >>> 0) + c;
|
|
132
|
+
return (s << u | s >>> 32 - u) + f;
|
|
133
|
+
}, o._gg = function(h, f, l, d, i, u, c) {
|
|
134
|
+
var s = h + (f & d | l & ~d) + (i >>> 0) + c;
|
|
135
|
+
return (s << u | s >>> 32 - u) + f;
|
|
136
|
+
}, o._hh = function(h, f, l, d, i, u, c) {
|
|
137
|
+
var s = h + (f ^ l ^ d) + (i >>> 0) + c;
|
|
138
|
+
return (s << u | s >>> 32 - u) + f;
|
|
139
|
+
}, o._ii = function(h, f, l, d, i, u, c) {
|
|
140
|
+
var s = h + (l ^ (f | ~d)) + (i >>> 0) + c;
|
|
141
|
+
return (s << u | s >>> 32 - u) + f;
|
|
142
142
|
}, o._blocksize = 16, o._digestsize = 16, we.exports = function(h, f) {
|
|
143
143
|
if (h == null)
|
|
144
144
|
throw new Error("Illegal argument " + h);
|
|
145
145
|
var l = a.wordsToBytes(o(h, f));
|
|
146
|
-
return f && f.asBytes ? l : f && f.asString ?
|
|
146
|
+
return f && f.asBytes ? l : f && f.asString ? r.bytesToString(l) : a.bytesToHex(l);
|
|
147
147
|
};
|
|
148
148
|
})();
|
|
149
149
|
var Fe = we.exports;
|
|
150
|
-
const
|
|
150
|
+
const Ve = /* @__PURE__ */ xe(Fe);
|
|
151
151
|
var te = /* @__PURE__ */ ((a) => (a.BOOTSTRAP = "bootstrap", a.DEBUG_EXTENSIONS = "debugExtensions", a.DEBUG_QUEUE = "debugQueue", a.DEBUG_DIALER = "debugDialer", a.FULL = "full", a))(te || {}), ne = /* @__PURE__ */ ((a) => (a.MAIN = "main", a.NEXT = "next", a))(ne || {}), Z = /* @__PURE__ */ ((a) => (a.USER = "User", a.TOKEN = "Token", a))(Z || {});
|
|
152
152
|
class ae {
|
|
153
153
|
static async getSessionStorageDataByKey(t, e = !0) {
|
|
154
154
|
if (typeof chrome < "u" && typeof chrome.storage < "u") {
|
|
155
|
-
const
|
|
156
|
-
if (
|
|
157
|
-
return e ? JSON.parse(
|
|
155
|
+
const r = await chrome.storage.session.get(t);
|
|
156
|
+
if (r[t])
|
|
157
|
+
return e ? JSON.parse(r[t]) : r[t];
|
|
158
158
|
}
|
|
159
159
|
if (typeof window < "u" && typeof window.sessionStorage < "u" && typeof window.sessionStorage.getItem == "function") {
|
|
160
|
-
const
|
|
161
|
-
if (
|
|
162
|
-
return e ? JSON.parse(
|
|
160
|
+
const r = window.sessionStorage.getItem(t);
|
|
161
|
+
if (r)
|
|
162
|
+
return e ? JSON.parse(r) : r;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
static async updateSessionStorageKey(t, e) {
|
|
@@ -171,7 +171,7 @@ class ae {
|
|
|
171
171
|
typeof chrome < "u" && typeof chrome.storage < "u" && chrome.storage.session.clear(), typeof window < "u" && typeof window.sessionStorage < "u" && typeof window.sessionStorage.clear == "function" && window.sessionStorage.clear();
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
class
|
|
174
|
+
class Me {
|
|
175
175
|
constructor(t) {
|
|
176
176
|
q(this, "delay", 1e3);
|
|
177
177
|
q(this, "lastLoginTimestamp");
|
|
@@ -187,7 +187,7 @@ class Ve {
|
|
|
187
187
|
email: this.eventsSdkClass.options.email && this.eventsSdkClass.options.email,
|
|
188
188
|
password: this.eventsSdkClass.options.password && this.eventsSdkClass.options.password
|
|
189
189
|
};
|
|
190
|
-
if (this.storageKey =
|
|
190
|
+
if (this.storageKey = Ve(JSON.stringify({
|
|
191
191
|
...this.eventsSdkClass.options,
|
|
192
192
|
loggerSocketConnection: null
|
|
193
193
|
}, this.eventsSdkClass.getCircularReplacer())), this.lastLoginTimestamp && this.lastLoginTimestamp + this.delay > (/* @__PURE__ */ new Date()).getTime())
|
|
@@ -204,30 +204,30 @@ class Ve {
|
|
|
204
204
|
if (e)
|
|
205
205
|
return e;
|
|
206
206
|
}
|
|
207
|
-
async userLoginFunction(t, e,
|
|
207
|
+
async userLoginFunction(t, e, r) {
|
|
208
208
|
let o, h, f;
|
|
209
209
|
return this.eventsSdkClass.options.isNewStack ? (o = await this.externalLogin(
|
|
210
210
|
this.eventsSdkClass.options.loginUrl,
|
|
211
211
|
t,
|
|
212
|
-
|
|
212
|
+
r
|
|
213
213
|
), h = await this.getSettings(o.Data.AccessToken), f = {
|
|
214
214
|
...o.Data,
|
|
215
215
|
...h
|
|
216
216
|
}) : (o = await this.externalLogin(
|
|
217
217
|
this.eventsSdkClass.options.loginUrl,
|
|
218
218
|
t,
|
|
219
|
-
|
|
219
|
+
r
|
|
220
220
|
), f = {
|
|
221
221
|
...o.Data.Socket
|
|
222
222
|
}), await ae.updateSessionStorageKey(e, f), f;
|
|
223
223
|
}
|
|
224
224
|
onLoginResponse(t) {
|
|
225
225
|
if (!this.eventsSdkClass.options.isNewStack && this.eventsSdkClass.options.servers && (this.eventsSdkClass.servers = [...this.eventsSdkClass.options.servers], this.eventsSdkClass.server = this.eventsSdkClass.servers.reduce(
|
|
226
|
-
(e,
|
|
226
|
+
(e, r) => e.Priority > r.Priority ? e : r
|
|
227
227
|
)), this.eventsSdkClass.options.isNewStack && this.eventsSdkClass.options.servers && (this.eventsSdkClass.servers = [...this.eventsSdkClass.options.servers], this.eventsSdkClass.server = this.eventsSdkClass.servers.reduce(
|
|
228
|
-
(e,
|
|
228
|
+
(e, r) => e.Priority > r.Priority ? e : r
|
|
229
229
|
)), t.MonitorList && t.MonitorList.length && !this.eventsSdkClass.options.servers && (this.eventsSdkClass.servers = [...t.MonitorList], this.eventsSdkClass.server = this.eventsSdkClass.servers.reduce(
|
|
230
|
-
(e,
|
|
230
|
+
(e, r) => e.Priority > r.Priority ? e : r
|
|
231
231
|
)), !this.eventsSdkClass.options.isNewStack && !this.eventsSdkClass.servers.length && t.URLList && (this.eventsSdkClass.URLList = t.URLList), !this.eventsSdkClass.options.isNewStack && !this.eventsSdkClass.URLList.length && !this.eventsSdkClass.servers.length)
|
|
232
232
|
throw new Error("Socket servers not defined");
|
|
233
233
|
if (this.eventsSdkClass.options.isNewStack && !this.eventsSdkClass.servers.length)
|
|
@@ -242,7 +242,7 @@ class Ve {
|
|
|
242
242
|
t = new Date(this.tokenExpiry);
|
|
243
243
|
else
|
|
244
244
|
return;
|
|
245
|
-
const e = t.getTime() - (/* @__PURE__ */ new Date()).getTime() - 5e3,
|
|
245
|
+
const e = t.getTime() - (/* @__PURE__ */ new Date()).getTime() - 5e3, r = Math.min(e, 2147483647);
|
|
246
246
|
setTimeout(
|
|
247
247
|
async () => {
|
|
248
248
|
if (this.refreshToken) {
|
|
@@ -267,21 +267,21 @@ class Ve {
|
|
|
267
267
|
this.onLoginResponse(h), await ae.updateSessionStorageKey(this.storageKey, h);
|
|
268
268
|
}
|
|
269
269
|
},
|
|
270
|
-
|
|
270
|
+
r
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
|
-
async externalLogin(t, { password: e, token:
|
|
273
|
+
async externalLogin(t, { password: e, token: r, email: o }, h) {
|
|
274
274
|
if (!t)
|
|
275
275
|
throw new Error("loginUrl not provided");
|
|
276
276
|
let f;
|
|
277
277
|
this.eventsSdkClass.options.isNewStack ? h === Z.TOKEN ? f = JSON.stringify({
|
|
278
278
|
identityType: Z.TOKEN,
|
|
279
|
-
token:
|
|
279
|
+
token: r
|
|
280
280
|
}) : f = JSON.stringify({
|
|
281
281
|
identityType: Z.USER,
|
|
282
282
|
username: o,
|
|
283
283
|
password: e
|
|
284
|
-
}) : this.eventsSdkClass.options.loginType === Z.TOKEN ? (f = JSON.stringify({ token:
|
|
284
|
+
}) : this.eventsSdkClass.options.loginType === Z.TOKEN ? (f = JSON.stringify({ token: r }), t = `${t}/${Z.TOKEN}`) : (f = JSON.stringify({
|
|
285
285
|
email: o,
|
|
286
286
|
pin: e
|
|
287
287
|
}), t = `${t}/${Z.USER}`);
|
|
@@ -305,7 +305,7 @@ class Ve {
|
|
|
305
305
|
throw new Error(i.error);
|
|
306
306
|
return i;
|
|
307
307
|
} catch (d) {
|
|
308
|
-
throw this.eventsSdkClass.loggerClass.loginError(h, l,
|
|
308
|
+
throw this.eventsSdkClass.loggerClass.loginError(h, l, r, o), d;
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
async getSettings(t) {
|
|
@@ -333,15 +333,15 @@ class Ve {
|
|
|
333
333
|
Authorization: `Bearer ${e}`
|
|
334
334
|
}
|
|
335
335
|
})).json();
|
|
336
|
-
} catch (
|
|
337
|
-
throw this.eventsSdkClass.loggerClass.refreshTokenError(e, t,
|
|
336
|
+
} catch (r) {
|
|
337
|
+
throw this.eventsSdkClass.loggerClass.refreshTokenError(e, t, r), r;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
normalizeLoginType(t) {
|
|
341
341
|
return t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
const
|
|
344
|
+
const Le = {
|
|
345
345
|
isNewStack: !1,
|
|
346
346
|
loginUrl: "https://loginapi.voicenter.co.il/monitorAPI/Login",
|
|
347
347
|
refreshTokenUrl: "https://loginapi.voicenter.co.il/monitorAPI/RefreshIdentityToken",
|
|
@@ -371,7 +371,7 @@ const Ne = {
|
|
|
371
371
|
}
|
|
372
372
|
};
|
|
373
373
|
function qe() {
|
|
374
|
-
return typeof window < "u" && (typeof window.navigator > "u" || typeof window.navigator.userAgent > "u") && (window.navigator.userAgent = "react-native"), typeof self > "u" && typeof global == "object" && (global.self = global, global.WebSocket =
|
|
374
|
+
return typeof window < "u" && (typeof window.navigator > "u" || typeof window.navigator.userAgent > "u") && (window.navigator.userAgent = "react-native"), typeof self > "u" && typeof global == "object" && (global.self = global, global.WebSocket = Be, typeof self.navigator > "u" && (self.navigator = { userAgent: "node" })), function a(t, e, r) {
|
|
375
375
|
function o(l, d) {
|
|
376
376
|
if (!e[l]) {
|
|
377
377
|
if (!t[l]) {
|
|
@@ -382,82 +382,82 @@ function qe() {
|
|
|
382
382
|
return h(l, !0);
|
|
383
383
|
throw new Error("Cannot find module '" + l + "'");
|
|
384
384
|
}
|
|
385
|
-
var
|
|
386
|
-
t[l][0].call(
|
|
387
|
-
var
|
|
388
|
-
return o(
|
|
389
|
-
},
|
|
385
|
+
var u = e[l] = { exports: {} };
|
|
386
|
+
t[l][0].call(u.exports, function(c) {
|
|
387
|
+
var s = t[l][1][c];
|
|
388
|
+
return o(s || c);
|
|
389
|
+
}, u, u.exports, a, t, e, r);
|
|
390
390
|
}
|
|
391
391
|
return e[l].exports;
|
|
392
392
|
}
|
|
393
|
-
for (var h = typeof require == "function" && require, f = 0; f <
|
|
394
|
-
o(
|
|
393
|
+
for (var h = typeof require == "function" && require, f = 0; f < r.length; f++)
|
|
394
|
+
o(r[f]);
|
|
395
395
|
return o;
|
|
396
396
|
}({
|
|
397
397
|
1: [function(a, t) {
|
|
398
398
|
t.exports = a("./lib/");
|
|
399
399
|
}, { "./lib/": 2 }],
|
|
400
400
|
2: [function(a, t, e) {
|
|
401
|
-
function
|
|
402
|
-
typeof i == "object" && (
|
|
403
|
-
var c,
|
|
404
|
-
return
|
|
401
|
+
function r(i, u) {
|
|
402
|
+
typeof i == "object" && (u = i, i = void 0), u = u || {};
|
|
403
|
+
var c, s = o(i), n = s.source, p = s.id;
|
|
404
|
+
return u.forceNew || u["force new connection"] || u.multiplex === !1 ? (l("ignoring socket cache for %s", n), c = f(n, u)) : (d[p] || (l("new io instance for %s", n), d[p] = f(n, u)), c = d[p]), c.socket(s.path);
|
|
405
405
|
}
|
|
406
406
|
var o = a("./url"), h = a("socket.io-parser"), f = a("./manager"), l = a("debug")("socket.io-client");
|
|
407
|
-
t.exports = e =
|
|
407
|
+
t.exports = e = r;
|
|
408
408
|
var d = e.managers = {};
|
|
409
|
-
e.protocol = h.protocol, e.connect =
|
|
409
|
+
e.protocol = h.protocol, e.connect = r, e.Manager = a("./manager"), e.Socket = a("./socket");
|
|
410
410
|
}, { "./manager": 3, "./socket": 5, "./url": 6, debug: 10, "socket.io-parser": 44 }],
|
|
411
411
|
3: [function(a, t) {
|
|
412
|
-
function e(
|
|
413
|
-
return this instanceof e ? (
|
|
412
|
+
function e(s, n) {
|
|
413
|
+
return this instanceof e ? (s && typeof s == "object" && (n = s, s = void 0), n = n || {}, n.path = n.path || "/socket.io", this.nsps = {}, this.subs = [], this.opts = n, this.reconnection(n.reconnection !== !1), this.reconnectionAttempts(n.reconnectionAttempts || 1 / 0), this.reconnectionDelay(n.reconnectionDelay || 1e3), this.reconnectionDelayMax(n.reconnectionDelayMax || 5e3), this.randomizationFactor(n.randomizationFactor || 0.5), this.backoff = new c({
|
|
414
414
|
min: this.reconnectionDelay(),
|
|
415
415
|
max: this.reconnectionDelayMax(),
|
|
416
416
|
jitter: this.randomizationFactor()
|
|
417
|
-
}), this.timeout(n.timeout == null ? 2e4 : n.timeout), this.readyState = "closed", this.uri =
|
|
417
|
+
}), this.timeout(n.timeout == null ? 2e4 : n.timeout), this.readyState = "closed", this.uri = s, this.connected = [], this.encoding = !1, this.packetBuffer = [], this.encoder = new f.Encoder(), this.decoder = new f.Decoder(), this.autoConnect = n.autoConnect !== !1, void (this.autoConnect && this.open())) : new e(s, n);
|
|
418
418
|
}
|
|
419
|
-
var
|
|
419
|
+
var r = (a("./url"), a("engine.io-client")), o = a("./socket"), h = a("component-emitter"), f = a("socket.io-parser"), l = a("./on"), d = a("component-bind"), i = (a("object-component"), a("debug")("socket.io-client:manager")), u = a("indexof"), c = a("backo2");
|
|
420
420
|
t.exports = e, e.prototype.emitAll = function() {
|
|
421
421
|
this.emit.apply(this, arguments);
|
|
422
|
-
for (var
|
|
423
|
-
this.nsps[
|
|
422
|
+
for (var s in this.nsps)
|
|
423
|
+
this.nsps[s].emit.apply(this.nsps[s], arguments);
|
|
424
424
|
}, e.prototype.updateSocketIds = function() {
|
|
425
|
-
for (var
|
|
426
|
-
this.nsps[
|
|
427
|
-
}, h(e.prototype), e.prototype.reconnection = function(
|
|
428
|
-
return arguments.length ? (this._reconnection = !!
|
|
429
|
-
}, e.prototype.reconnectionAttempts = function(
|
|
430
|
-
return arguments.length ? (this._reconnectionAttempts =
|
|
431
|
-
}, e.prototype.reconnectionDelay = function(
|
|
432
|
-
return arguments.length ? (this._reconnectionDelay =
|
|
433
|
-
}, e.prototype.randomizationFactor = function(
|
|
434
|
-
return arguments.length ? (this._randomizationFactor =
|
|
435
|
-
}, e.prototype.reconnectionDelayMax = function(
|
|
436
|
-
return arguments.length ? (this._reconnectionDelayMax =
|
|
437
|
-
}, e.prototype.timeout = function(
|
|
438
|
-
return arguments.length ? (this._timeout =
|
|
425
|
+
for (var s in this.nsps)
|
|
426
|
+
this.nsps[s].id = this.engine.id;
|
|
427
|
+
}, h(e.prototype), e.prototype.reconnection = function(s) {
|
|
428
|
+
return arguments.length ? (this._reconnection = !!s, this) : this._reconnection;
|
|
429
|
+
}, e.prototype.reconnectionAttempts = function(s) {
|
|
430
|
+
return arguments.length ? (this._reconnectionAttempts = s, this) : this._reconnectionAttempts;
|
|
431
|
+
}, e.prototype.reconnectionDelay = function(s) {
|
|
432
|
+
return arguments.length ? (this._reconnectionDelay = s, this.backoff && this.backoff.setMin(s), this) : this._reconnectionDelay;
|
|
433
|
+
}, e.prototype.randomizationFactor = function(s) {
|
|
434
|
+
return arguments.length ? (this._randomizationFactor = s, this.backoff && this.backoff.setJitter(s), this) : this._randomizationFactor;
|
|
435
|
+
}, e.prototype.reconnectionDelayMax = function(s) {
|
|
436
|
+
return arguments.length ? (this._reconnectionDelayMax = s, this.backoff && this.backoff.setMax(s), this) : this._reconnectionDelayMax;
|
|
437
|
+
}, e.prototype.timeout = function(s) {
|
|
438
|
+
return arguments.length ? (this._timeout = s, this) : this._timeout;
|
|
439
439
|
}, e.prototype.maybeReconnectOnOpen = function() {
|
|
440
440
|
!this.reconnecting && this._reconnection && this.backoff.attempts === 0 && this.reconnect();
|
|
441
|
-
}, e.prototype.open = e.prototype.connect = function(
|
|
441
|
+
}, e.prototype.open = e.prototype.connect = function(s) {
|
|
442
442
|
if (i("readyState %s", this.readyState), ~this.readyState.indexOf("open"))
|
|
443
443
|
return this;
|
|
444
|
-
i("opening %s", this.uri), this.engine =
|
|
445
|
-
var n = this.engine,
|
|
444
|
+
i("opening %s", this.uri), this.engine = r(this.uri, this.opts);
|
|
445
|
+
var n = this.engine, p = this;
|
|
446
446
|
this.readyState = "opening", this.skipReconnect = !1;
|
|
447
447
|
var g = l(n, "open", function() {
|
|
448
|
-
|
|
449
|
-
}), y = l(n, "error", function(
|
|
450
|
-
if (i("connect_error"),
|
|
451
|
-
var
|
|
452
|
-
|
|
448
|
+
p.onopen(), s && s();
|
|
449
|
+
}), y = l(n, "error", function(x) {
|
|
450
|
+
if (i("connect_error"), p.cleanup(), p.readyState = "closed", p.emitAll("connect_error", x), s) {
|
|
451
|
+
var V = new Error("Connection error");
|
|
452
|
+
V.data = x, s(V);
|
|
453
453
|
} else
|
|
454
|
-
|
|
454
|
+
p.maybeReconnectOnOpen();
|
|
455
455
|
});
|
|
456
456
|
if (this._timeout !== !1) {
|
|
457
457
|
var w = this._timeout;
|
|
458
458
|
i("connect attempt will timeout after %d", w);
|
|
459
459
|
var P = setTimeout(function() {
|
|
460
|
-
i("connect attempt timed out after %d", w), g.destroy(), n.close(), n.emit("error", "timeout"),
|
|
460
|
+
i("connect attempt timed out after %d", w), g.destroy(), n.close(), n.emit("error", "timeout"), p.emitAll("connect_timeout", w);
|
|
461
461
|
}, w);
|
|
462
462
|
this.subs.push({
|
|
463
463
|
destroy: function() {
|
|
@@ -468,71 +468,71 @@ function qe() {
|
|
|
468
468
|
return this.subs.push(g), this.subs.push(y), this;
|
|
469
469
|
}, e.prototype.onopen = function() {
|
|
470
470
|
i("open"), this.cleanup(), this.readyState = "open", this.emit("open");
|
|
471
|
-
var
|
|
472
|
-
this.subs.push(l(
|
|
473
|
-
}, e.prototype.ondata = function(
|
|
474
|
-
this.decoder.add(
|
|
475
|
-
}, e.prototype.ondecoded = function(
|
|
476
|
-
this.emit("packet",
|
|
477
|
-
}, e.prototype.onerror = function(
|
|
478
|
-
i("error",
|
|
479
|
-
}, e.prototype.socket = function(
|
|
480
|
-
var n = this.nsps[
|
|
471
|
+
var s = this.engine;
|
|
472
|
+
this.subs.push(l(s, "data", d(this, "ondata"))), this.subs.push(l(this.decoder, "decoded", d(this, "ondecoded"))), this.subs.push(l(s, "error", d(this, "onerror"))), this.subs.push(l(s, "close", d(this, "onclose")));
|
|
473
|
+
}, e.prototype.ondata = function(s) {
|
|
474
|
+
this.decoder.add(s);
|
|
475
|
+
}, e.prototype.ondecoded = function(s) {
|
|
476
|
+
this.emit("packet", s);
|
|
477
|
+
}, e.prototype.onerror = function(s) {
|
|
478
|
+
i("error", s), this.emitAll("error", s);
|
|
479
|
+
}, e.prototype.socket = function(s) {
|
|
480
|
+
var n = this.nsps[s];
|
|
481
481
|
if (!n) {
|
|
482
|
-
n = new o(this,
|
|
483
|
-
var
|
|
482
|
+
n = new o(this, s), this.nsps[s] = n;
|
|
483
|
+
var p = this;
|
|
484
484
|
n.on("connect", function() {
|
|
485
|
-
n.id =
|
|
485
|
+
n.id = p.engine.id, ~u(p.connected, n) || p.connected.push(n);
|
|
486
486
|
});
|
|
487
487
|
}
|
|
488
488
|
return n;
|
|
489
|
-
}, e.prototype.destroy = function(
|
|
490
|
-
var n =
|
|
489
|
+
}, e.prototype.destroy = function(s) {
|
|
490
|
+
var n = u(this.connected, s);
|
|
491
491
|
~n && this.connected.splice(n, 1), this.connected.length || this.close();
|
|
492
|
-
}, e.prototype.packet = function(
|
|
493
|
-
i("writing packet %j",
|
|
492
|
+
}, e.prototype.packet = function(s) {
|
|
493
|
+
i("writing packet %j", s);
|
|
494
494
|
var n = this;
|
|
495
|
-
n.encoding ? n.packetBuffer.push(
|
|
496
|
-
for (var g = 0; g <
|
|
497
|
-
n.engine.write(
|
|
495
|
+
n.encoding ? n.packetBuffer.push(s) : (n.encoding = !0, this.encoder.encode(s, function(p) {
|
|
496
|
+
for (var g = 0; g < p.length; g++)
|
|
497
|
+
n.engine.write(p[g]);
|
|
498
498
|
n.encoding = !1, n.processPacketQueue();
|
|
499
499
|
}));
|
|
500
500
|
}, e.prototype.processPacketQueue = function() {
|
|
501
501
|
if (this.packetBuffer.length > 0 && !this.encoding) {
|
|
502
|
-
var
|
|
503
|
-
this.packet(
|
|
502
|
+
var s = this.packetBuffer.shift();
|
|
503
|
+
this.packet(s);
|
|
504
504
|
}
|
|
505
505
|
}, e.prototype.cleanup = function() {
|
|
506
|
-
for (var
|
|
507
|
-
|
|
506
|
+
for (var s; s = this.subs.shift(); )
|
|
507
|
+
s.destroy();
|
|
508
508
|
this.packetBuffer = [], this.encoding = !1, this.decoder.destroy();
|
|
509
509
|
}, e.prototype.close = e.prototype.disconnect = function() {
|
|
510
510
|
this.skipReconnect = !0, this.backoff.reset(), this.readyState = "closed", this.engine && this.engine.close();
|
|
511
|
-
}, e.prototype.onclose = function(
|
|
512
|
-
i("close"), this.cleanup(), this.backoff.reset(), this.readyState = "closed", this.emit("close",
|
|
511
|
+
}, e.prototype.onclose = function(s) {
|
|
512
|
+
i("close"), this.cleanup(), this.backoff.reset(), this.readyState = "closed", this.emit("close", s), this._reconnection && !this.skipReconnect && this.reconnect();
|
|
513
513
|
}, e.prototype.reconnect = function() {
|
|
514
514
|
if (this.reconnecting || this.skipReconnect)
|
|
515
515
|
return this;
|
|
516
|
-
var
|
|
516
|
+
var s = this;
|
|
517
517
|
if (this.backoff.attempts >= this._reconnectionAttempts)
|
|
518
518
|
i("reconnect failed"), this.backoff.reset(), this.emitAll("reconnect_failed"), this.reconnecting = !1;
|
|
519
519
|
else {
|
|
520
520
|
var n = this.backoff.duration();
|
|
521
521
|
i("will wait %dms before reconnect attempt", n), this.reconnecting = !0;
|
|
522
|
-
var
|
|
523
|
-
|
|
524
|
-
g ? (i("reconnect attempt error"),
|
|
522
|
+
var p = setTimeout(function() {
|
|
523
|
+
s.skipReconnect || (i("attempting reconnect"), s.emitAll("reconnect_attempt", s.backoff.attempts), s.emitAll("reconnecting", s.backoff.attempts), s.skipReconnect || s.open(function(g) {
|
|
524
|
+
g ? (i("reconnect attempt error"), s.reconnecting = !1, s.reconnect(), s.emitAll("reconnect_error", g.data)) : (i("reconnect success"), s.onreconnect());
|
|
525
525
|
}));
|
|
526
526
|
}, n);
|
|
527
527
|
this.subs.push({
|
|
528
528
|
destroy: function() {
|
|
529
|
-
clearTimeout(
|
|
529
|
+
clearTimeout(p);
|
|
530
530
|
}
|
|
531
531
|
});
|
|
532
532
|
}
|
|
533
533
|
}, e.prototype.onreconnect = function() {
|
|
534
|
-
var
|
|
535
|
-
this.reconnecting = !1, this.backoff.reset(), this.updateSocketIds(), this.emitAll("reconnect",
|
|
534
|
+
var s = this.backoff.attempts;
|
|
535
|
+
this.reconnecting = !1, this.backoff.reset(), this.updateSocketIds(), this.emitAll("reconnect", s);
|
|
536
536
|
};
|
|
537
537
|
}, {
|
|
538
538
|
"./on": 4,
|
|
@@ -548,21 +548,21 @@ function qe() {
|
|
|
548
548
|
"socket.io-parser": 44
|
|
549
549
|
}],
|
|
550
550
|
4: [function(a, t) {
|
|
551
|
-
function e(
|
|
552
|
-
return
|
|
551
|
+
function e(r, o, h) {
|
|
552
|
+
return r.on(o, h), {
|
|
553
553
|
destroy: function() {
|
|
554
|
-
|
|
554
|
+
r.removeListener(o, h);
|
|
555
555
|
}
|
|
556
556
|
};
|
|
557
557
|
}
|
|
558
558
|
t.exports = e;
|
|
559
559
|
}, {}],
|
|
560
560
|
5: [function(a, t, e) {
|
|
561
|
-
function
|
|
562
|
-
this.io = n, this.nsp =
|
|
561
|
+
function r(n, p) {
|
|
562
|
+
this.io = n, this.nsp = p, this.json = this, this.ids = 0, this.acks = {}, this.io.autoConnect && this.open(), this.receiveBuffer = [], this.sendBuffer = [], this.connected = !1, this.disconnected = !0;
|
|
563
563
|
}
|
|
564
|
-
var o = a("socket.io-parser"), h = a("component-emitter"), f = a("to-array"), l = a("./on"), d = a("component-bind"), i = a("debug")("socket.io-client:socket"),
|
|
565
|
-
t.exports =
|
|
564
|
+
var o = a("socket.io-parser"), h = a("component-emitter"), f = a("to-array"), l = a("./on"), d = a("component-bind"), i = a("debug")("socket.io-client:socket"), u = a("has-binary");
|
|
565
|
+
t.exports = r;
|
|
566
566
|
var c = {
|
|
567
567
|
connect: 1,
|
|
568
568
|
connect_error: 1,
|
|
@@ -574,31 +574,31 @@ function qe() {
|
|
|
574
574
|
reconnect_failed: 1,
|
|
575
575
|
reconnect_error: 1,
|
|
576
576
|
reconnecting: 1
|
|
577
|
-
},
|
|
578
|
-
h(
|
|
577
|
+
}, s = h.prototype.emit;
|
|
578
|
+
h(r.prototype), r.prototype.subEvents = function() {
|
|
579
579
|
if (!this.subs) {
|
|
580
580
|
var n = this.io;
|
|
581
581
|
this.subs = [l(n, "open", d(this, "onopen")), l(n, "packet", d(this, "onpacket")), l(n, "close", d(this, "onclose"))];
|
|
582
582
|
}
|
|
583
|
-
},
|
|
583
|
+
}, r.prototype.open = r.prototype.connect = function() {
|
|
584
584
|
return this.connected ? this : (this.subEvents(), this.io.open(), this.io.readyState == "open" && this.onopen(), this);
|
|
585
|
-
},
|
|
585
|
+
}, r.prototype.send = function() {
|
|
586
586
|
var n = f(arguments);
|
|
587
587
|
return n.unshift("message"), this.emit.apply(this, n), this;
|
|
588
|
-
},
|
|
588
|
+
}, r.prototype.emit = function(n) {
|
|
589
589
|
if (c.hasOwnProperty(n))
|
|
590
|
-
return
|
|
591
|
-
var
|
|
592
|
-
p
|
|
593
|
-
var y = { type: g, data:
|
|
594
|
-
return typeof
|
|
595
|
-
},
|
|
590
|
+
return s.apply(this, arguments), this;
|
|
591
|
+
var p = f(arguments), g = o.EVENT;
|
|
592
|
+
u(p) && (g = o.BINARY_EVENT);
|
|
593
|
+
var y = { type: g, data: p };
|
|
594
|
+
return typeof p[p.length - 1] == "function" && (i("emitting packet with ack id %d", this.ids), this.acks[this.ids] = p.pop(), y.id = this.ids++), this.connected ? this.packet(y) : this.sendBuffer.push(y), this;
|
|
595
|
+
}, r.prototype.packet = function(n) {
|
|
596
596
|
n.nsp = this.nsp, this.io.packet(n);
|
|
597
|
-
},
|
|
597
|
+
}, r.prototype.onopen = function() {
|
|
598
598
|
i("transport is open - connecting"), this.nsp != "/" && this.packet({ type: o.CONNECT });
|
|
599
|
-
},
|
|
599
|
+
}, r.prototype.onclose = function(n) {
|
|
600
600
|
i("close (%s)", n), this.connected = !1, this.disconnected = !0, delete this.id, this.emit("disconnect", n);
|
|
601
|
-
},
|
|
601
|
+
}, r.prototype.onpacket = function(n) {
|
|
602
602
|
if (n.nsp == this.nsp)
|
|
603
603
|
switch (n.type) {
|
|
604
604
|
case o.CONNECT:
|
|
@@ -622,43 +622,43 @@ function qe() {
|
|
|
622
622
|
case o.ERROR:
|
|
623
623
|
this.emit("error", n.data);
|
|
624
624
|
}
|
|
625
|
-
},
|
|
626
|
-
var
|
|
627
|
-
i("emitting event %j",
|
|
628
|
-
},
|
|
629
|
-
var
|
|
625
|
+
}, r.prototype.onevent = function(n) {
|
|
626
|
+
var p = n.data || [];
|
|
627
|
+
i("emitting event %j", p), n.id != null && (i("attaching ack callback to event"), p.push(this.ack(n.id))), this.connected ? s.apply(this, p) : this.receiveBuffer.push(p);
|
|
628
|
+
}, r.prototype.ack = function(n) {
|
|
629
|
+
var p = this, g = !1;
|
|
630
630
|
return function() {
|
|
631
631
|
if (!g) {
|
|
632
632
|
g = !0;
|
|
633
633
|
var y = f(arguments);
|
|
634
634
|
i("sending ack %j", y);
|
|
635
|
-
var w =
|
|
636
|
-
|
|
635
|
+
var w = u(y) ? o.BINARY_ACK : o.ACK;
|
|
636
|
+
p.packet({ type: w, id: n, data: y });
|
|
637
637
|
}
|
|
638
638
|
};
|
|
639
|
-
},
|
|
639
|
+
}, r.prototype.onack = function(n) {
|
|
640
640
|
i("calling ack %s with %j", n.id, n.data);
|
|
641
|
-
var
|
|
642
|
-
|
|
643
|
-
},
|
|
641
|
+
var p = this.acks[n.id];
|
|
642
|
+
p.apply(this, n.data), delete this.acks[n.id];
|
|
643
|
+
}, r.prototype.onconnect = function() {
|
|
644
644
|
this.connected = !0, this.disconnected = !1, this.emit("connect"), this.emitBuffered();
|
|
645
|
-
},
|
|
645
|
+
}, r.prototype.emitBuffered = function() {
|
|
646
646
|
var n;
|
|
647
647
|
for (n = 0; n < this.receiveBuffer.length; n++)
|
|
648
|
-
|
|
648
|
+
s.apply(this, this.receiveBuffer[n]);
|
|
649
649
|
for (this.receiveBuffer = [], n = 0; n < this.sendBuffer.length; n++)
|
|
650
650
|
this.packet(this.sendBuffer[n]);
|
|
651
651
|
this.sendBuffer = [];
|
|
652
|
-
},
|
|
652
|
+
}, r.prototype.ondisconnect = function() {
|
|
653
653
|
i("server disconnect (%s)", this.nsp), this.destroy(), this.onclose("io server disconnect");
|
|
654
|
-
},
|
|
654
|
+
}, r.prototype.destroy = function() {
|
|
655
655
|
if (this.subs) {
|
|
656
656
|
for (var n = 0; n < this.subs.length; n++)
|
|
657
657
|
this.subs[n].destroy();
|
|
658
658
|
this.subs = null;
|
|
659
659
|
}
|
|
660
660
|
this.io.destroy(this);
|
|
661
|
-
},
|
|
661
|
+
}, r.prototype.close = r.prototype.disconnect = function() {
|
|
662
662
|
return this.connected && (i("performing disconnect (%s)", this.nsp), this.packet({ type: o.DISCONNECT })), this.destroy(), this.connected && this.onclose("io client disconnect"), this;
|
|
663
663
|
};
|
|
664
664
|
}, {
|
|
@@ -672,51 +672,51 @@ function qe() {
|
|
|
672
672
|
}],
|
|
673
673
|
6: [function(a, t) {
|
|
674
674
|
(function(e) {
|
|
675
|
-
function
|
|
675
|
+
function r(f, i) {
|
|
676
676
|
var d = f, i = i || e.location;
|
|
677
677
|
return f == null && (f = i.protocol + "//" + i.host), typeof f == "string" && (f.charAt(0) == "/" && (f = f.charAt(1) == "/" ? i.protocol + f : i.hostname + f), /^(https?|wss?):\/\//.test(f) || (h("protocol-less url %s", f), f = typeof i < "u" ? i.protocol + "//" + f : "https://" + f), h("parse %s", f), d = o(f)), d.port || (/^(http|ws)$/.test(d.protocol) ? d.port = "80" : /^(http|ws)s$/.test(d.protocol) && (d.port = "443")), d.path = d.path || "/", d.id = d.protocol + "://" + d.host + ":" + d.port, d.href = d.protocol + "://" + d.host + (i && i.port == d.port ? "" : ":" + d.port), d;
|
|
678
678
|
}
|
|
679
679
|
var o = a("parseuri"), h = a("debug")("socket.io-client:url");
|
|
680
|
-
t.exports =
|
|
680
|
+
t.exports = r;
|
|
681
681
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
682
682
|
}, { debug: 10, parseuri: 42 }],
|
|
683
683
|
7: [function(a, t) {
|
|
684
|
-
function e(
|
|
685
|
-
|
|
684
|
+
function e(r) {
|
|
685
|
+
r = r || {}, this.ms = r.min || 100, this.max = r.max || 1e4, this.factor = r.factor || 2, this.jitter = r.jitter > 0 && r.jitter <= 1 ? r.jitter : 0, this.attempts = 0;
|
|
686
686
|
}
|
|
687
687
|
t.exports = e, e.prototype.duration = function() {
|
|
688
|
-
var
|
|
688
|
+
var r = this.ms * Math.pow(this.factor, this.attempts++);
|
|
689
689
|
if (this.jitter) {
|
|
690
|
-
var o = Math.random(), h = Math.floor(o * this.jitter *
|
|
691
|
-
|
|
690
|
+
var o = Math.random(), h = Math.floor(o * this.jitter * r);
|
|
691
|
+
r = 1 & Math.floor(10 * o) ? r + h : r - h;
|
|
692
692
|
}
|
|
693
|
-
return 0 | Math.min(
|
|
693
|
+
return 0 | Math.min(r, this.max);
|
|
694
694
|
}, e.prototype.reset = function() {
|
|
695
695
|
this.attempts = 0;
|
|
696
|
-
}, e.prototype.setMin = function(
|
|
697
|
-
this.ms =
|
|
698
|
-
}, e.prototype.setMax = function(
|
|
699
|
-
this.max =
|
|
700
|
-
}, e.prototype.setJitter = function(
|
|
701
|
-
this.jitter =
|
|
696
|
+
}, e.prototype.setMin = function(r) {
|
|
697
|
+
this.ms = r;
|
|
698
|
+
}, e.prototype.setMax = function(r) {
|
|
699
|
+
this.max = r;
|
|
700
|
+
}, e.prototype.setJitter = function(r) {
|
|
701
|
+
this.jitter = r;
|
|
702
702
|
};
|
|
703
703
|
}, {}],
|
|
704
704
|
8: [function(a, t) {
|
|
705
705
|
var e = [].slice;
|
|
706
|
-
t.exports = function(
|
|
707
|
-
if (typeof o == "string" && (o =
|
|
706
|
+
t.exports = function(r, o) {
|
|
707
|
+
if (typeof o == "string" && (o = r[o]), typeof o != "function")
|
|
708
708
|
throw new Error("bind() requires a function");
|
|
709
709
|
var h = e.call(arguments, 2);
|
|
710
710
|
return function() {
|
|
711
|
-
return o.apply(
|
|
711
|
+
return o.apply(r, h.concat(e.call(arguments)));
|
|
712
712
|
};
|
|
713
713
|
};
|
|
714
714
|
}, {}],
|
|
715
715
|
9: [function(a, t) {
|
|
716
716
|
function e(o) {
|
|
717
|
-
return o ?
|
|
717
|
+
return o ? r(o) : void 0;
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function r(o) {
|
|
720
720
|
for (var h in e.prototype)
|
|
721
721
|
o[h] = e.prototype[h];
|
|
722
722
|
return o;
|
|
@@ -761,13 +761,13 @@ function qe() {
|
|
|
761
761
|
10: [function(a, t) {
|
|
762
762
|
function e(o) {
|
|
763
763
|
return e.enabled(o) ? function(h) {
|
|
764
|
-
h =
|
|
764
|
+
h = r(h);
|
|
765
765
|
var f = /* @__PURE__ */ new Date(), l = f - (e[o] || f);
|
|
766
766
|
e[o] = f, h = o + " " + h + " +" + e.humanize(l), window.console && console.log && Function.prototype.apply.call(console.log, console, arguments);
|
|
767
767
|
} : function() {
|
|
768
768
|
};
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function r(o) {
|
|
771
771
|
return o instanceof Error ? o.stack || o.message : o;
|
|
772
772
|
}
|
|
773
773
|
t.exports = e, e.names = [], e.skips = [], e.enable = function(o) {
|
|
@@ -804,33 +804,33 @@ function qe() {
|
|
|
804
804
|
}, { "./socket": 13, "engine.io-parser": 25 }],
|
|
805
805
|
13: [function(a, t) {
|
|
806
806
|
(function(e) {
|
|
807
|
-
function
|
|
808
|
-
if (!(this instanceof
|
|
809
|
-
return new
|
|
810
|
-
if (
|
|
811
|
-
var g =
|
|
812
|
-
|
|
813
|
-
}
|
|
814
|
-
this.agent =
|
|
807
|
+
function r(n, p) {
|
|
808
|
+
if (!(this instanceof r))
|
|
809
|
+
return new r(n, p);
|
|
810
|
+
if (p = p || {}, n && typeof n == "object" && (p = n, n = null), n && (n = u(n), p.host = n.host, p.secure = n.protocol == "https" || n.protocol == "wss", p.port = n.port, n.query && (p.query = n.query)), this.secure = p.secure != null ? p.secure : e.location && location.protocol == "https:", p.host) {
|
|
811
|
+
var g = p.host.split(":");
|
|
812
|
+
p.hostname = g.shift(), g.length ? p.port = g.pop() : p.port || (p.port = this.secure ? "443" : "80");
|
|
813
|
+
}
|
|
814
|
+
this.agent = p.agent || !1, this.hostname = p.hostname || (e.location ? location.hostname : "localhost"), this.port = p.port || (e.location && location.port ? location.port : this.secure ? 443 : 80), this.query = p.query || {}, typeof this.query == "string" && (this.query = s.decode(this.query)), this.upgrade = p.upgrade !== !1, this.path = (p.path || "/engine.io").replace(/\/$/, "") + "/", this.forceJSONP = !!p.forceJSONP, this.jsonp = p.jsonp !== !1, this.forceBase64 = !!p.forceBase64, this.enablesXDR = !!p.enablesXDR, this.timestampParam = p.timestampParam || "t", this.timestampRequests = p.timestampRequests, this.transports = p.transports || ["polling", "websocket"], this.readyState = "", this.writeBuffer = [], this.callbackBuffer = [], this.policyPort = p.policyPort || 843, this.rememberUpgrade = p.rememberUpgrade || !1, this.binaryType = null, this.onlyBinaryUpgrades = p.onlyBinaryUpgrades, this.pfx = p.pfx || null, this.key = p.key || null, this.passphrase = p.passphrase || null, this.cert = p.cert || null, this.ca = p.ca || null, this.ciphers = p.ciphers || null, this.rejectUnauthorized = p.rejectUnauthorized || null, this.open();
|
|
815
815
|
}
|
|
816
816
|
function o(n) {
|
|
817
|
-
var
|
|
817
|
+
var p = {};
|
|
818
818
|
for (var g in n)
|
|
819
|
-
n.hasOwnProperty(g) && (
|
|
820
|
-
return
|
|
819
|
+
n.hasOwnProperty(g) && (p[g] = n[g]);
|
|
820
|
+
return p;
|
|
821
821
|
}
|
|
822
|
-
var h = a("./transports"), f = a("component-emitter"), l = a("debug")("engine.io-client:socket"), d = a("indexof"), i = a("engine.io-parser"),
|
|
823
|
-
t.exports =
|
|
822
|
+
var h = a("./transports"), f = a("component-emitter"), l = a("debug")("engine.io-client:socket"), d = a("indexof"), i = a("engine.io-parser"), u = a("parseuri"), c = a("parsejson"), s = a("parseqs");
|
|
823
|
+
t.exports = r, r.priorWebsocketSuccess = !1, f(r.prototype), r.protocol = i.protocol, r.Socket = r, r.Transport = a("./transport"), r.transports = a("./transports"), r.parser = a("engine.io-parser"), r.prototype.createTransport = function(n) {
|
|
824
824
|
l('creating transport "%s"', n);
|
|
825
|
-
var
|
|
826
|
-
|
|
825
|
+
var p = o(this.query);
|
|
826
|
+
p.EIO = i.protocol, p.transport = n, this.id && (p.sid = this.id);
|
|
827
827
|
var g = new h[n]({
|
|
828
828
|
agent: this.agent,
|
|
829
829
|
hostname: this.hostname,
|
|
830
830
|
port: this.port,
|
|
831
831
|
secure: this.secure,
|
|
832
832
|
path: this.path,
|
|
833
|
-
query:
|
|
833
|
+
query: p,
|
|
834
834
|
forceJSONP: this.forceJSONP,
|
|
835
835
|
jsonp: this.jsonp,
|
|
836
836
|
forceBase64: this.forceBase64,
|
|
@@ -848,10 +848,10 @@ function qe() {
|
|
|
848
848
|
rejectUnauthorized: this.rejectUnauthorized
|
|
849
849
|
});
|
|
850
850
|
return g;
|
|
851
|
-
},
|
|
852
|
-
var
|
|
853
|
-
if (this.rememberUpgrade &&
|
|
854
|
-
|
|
851
|
+
}, r.prototype.open = function() {
|
|
852
|
+
var p;
|
|
853
|
+
if (this.rememberUpgrade && r.priorWebsocketSuccess && this.transports.indexOf("websocket") != -1)
|
|
854
|
+
p = "websocket";
|
|
855
855
|
else {
|
|
856
856
|
if (this.transports.length == 0) {
|
|
857
857
|
var n = this;
|
|
@@ -859,58 +859,58 @@ function qe() {
|
|
|
859
859
|
n.emit("error", "No transports available");
|
|
860
860
|
}, 0);
|
|
861
861
|
}
|
|
862
|
-
|
|
862
|
+
p = this.transports[0];
|
|
863
863
|
}
|
|
864
864
|
this.readyState = "opening";
|
|
865
|
-
var
|
|
865
|
+
var p;
|
|
866
866
|
try {
|
|
867
|
-
|
|
867
|
+
p = this.createTransport(p);
|
|
868
868
|
} catch {
|
|
869
869
|
return this.transports.shift(), void this.open();
|
|
870
870
|
}
|
|
871
|
-
|
|
872
|
-
},
|
|
871
|
+
p.open(), this.setTransport(p);
|
|
872
|
+
}, r.prototype.setTransport = function(n) {
|
|
873
873
|
l("setting transport %s", n.name);
|
|
874
|
-
var
|
|
874
|
+
var p = this;
|
|
875
875
|
this.transport && (l("clearing existing transport %s", this.transport.name), this.transport.removeAllListeners()), this.transport = n, n.on("drain", function() {
|
|
876
|
-
|
|
876
|
+
p.onDrain();
|
|
877
877
|
}).on("packet", function(g) {
|
|
878
|
-
|
|
878
|
+
p.onPacket(g);
|
|
879
879
|
}).on("error", function(g) {
|
|
880
|
-
|
|
880
|
+
p.onError(g);
|
|
881
881
|
}).on("close", function() {
|
|
882
|
-
|
|
882
|
+
p.onClose("transport close");
|
|
883
883
|
});
|
|
884
|
-
},
|
|
885
|
-
function
|
|
884
|
+
}, r.prototype.probe = function(n) {
|
|
885
|
+
function p() {
|
|
886
886
|
if (b.onlyBinaryUpgrades) {
|
|
887
887
|
var A = !this.supportsBinary && b.transport.supportsBinary;
|
|
888
|
-
|
|
888
|
+
k = k || A;
|
|
889
889
|
}
|
|
890
|
-
|
|
890
|
+
k || (l('probe transport "%s" opened', n), I.send([{
|
|
891
891
|
type: "ping",
|
|
892
892
|
data: "probe"
|
|
893
|
-
}]),
|
|
894
|
-
if (!
|
|
893
|
+
}]), I.once("packet", function(v) {
|
|
894
|
+
if (!k)
|
|
895
895
|
if (v.type == "pong" && v.data == "probe") {
|
|
896
|
-
if (l('probe transport "%s" pong', n), b.upgrading = !0, b.emit("upgrading",
|
|
896
|
+
if (l('probe transport "%s" pong', n), b.upgrading = !0, b.emit("upgrading", I), !I)
|
|
897
897
|
return;
|
|
898
|
-
|
|
899
|
-
|
|
898
|
+
r.priorWebsocketSuccess = I.name == "websocket", l('pausing current transport "%s"', b.transport.name), b.transport.pause(function() {
|
|
899
|
+
k || b.readyState != "closed" && (l("changing transport and sending upgrade packet"), V(), b.setTransport(I), I.send([{ type: "upgrade" }]), b.emit("upgrade", I), I = null, b.upgrading = !1, b.flush());
|
|
900
900
|
});
|
|
901
901
|
} else {
|
|
902
902
|
l('probe transport "%s" failed', n);
|
|
903
903
|
var m = new Error("probe error");
|
|
904
|
-
m.transport =
|
|
904
|
+
m.transport = I.name, b.emit("upgradeError", m);
|
|
905
905
|
}
|
|
906
906
|
}));
|
|
907
907
|
}
|
|
908
908
|
function g() {
|
|
909
|
-
|
|
909
|
+
k || (k = !0, V(), I.close(), I = null);
|
|
910
910
|
}
|
|
911
911
|
function y(A) {
|
|
912
912
|
var v = new Error("probe error: " + A);
|
|
913
|
-
v.transport =
|
|
913
|
+
v.transport = I.name, g(), l('probe transport "%s" failed because of error: %s', n, A), b.emit("upgradeError", v);
|
|
914
914
|
}
|
|
915
915
|
function w() {
|
|
916
916
|
y("transport closed");
|
|
@@ -918,22 +918,22 @@ function qe() {
|
|
|
918
918
|
function P() {
|
|
919
919
|
y("socket closed");
|
|
920
920
|
}
|
|
921
|
-
function
|
|
922
|
-
|
|
921
|
+
function x(A) {
|
|
922
|
+
I && A.name != I.name && (l('"%s" works - aborting "%s"', A.name, I.name), g());
|
|
923
923
|
}
|
|
924
|
-
function
|
|
925
|
-
|
|
924
|
+
function V() {
|
|
925
|
+
I.removeListener("open", p), I.removeListener("error", y), I.removeListener("close", w), b.removeListener("close", P), b.removeListener("upgrading", x);
|
|
926
926
|
}
|
|
927
927
|
l('probing transport "%s"', n);
|
|
928
|
-
var
|
|
929
|
-
|
|
930
|
-
},
|
|
931
|
-
if (l("socket open"), this.readyState = "open",
|
|
928
|
+
var I = this.createTransport(n, { probe: 1 }), k = !1, b = this;
|
|
929
|
+
r.priorWebsocketSuccess = !1, I.once("open", p), I.once("error", y), I.once("close", w), this.once("close", P), this.once("upgrading", x), I.open();
|
|
930
|
+
}, r.prototype.onOpen = function() {
|
|
931
|
+
if (l("socket open"), this.readyState = "open", r.priorWebsocketSuccess = this.transport.name == "websocket", this.emit("open"), this.flush(), this.readyState == "open" && this.upgrade && this.transport.pause) {
|
|
932
932
|
l("starting upgrade probes");
|
|
933
|
-
for (var n = 0,
|
|
933
|
+
for (var n = 0, p = this.upgrades.length; p > n; n++)
|
|
934
934
|
this.probe(this.upgrades[n]);
|
|
935
935
|
}
|
|
936
|
-
},
|
|
936
|
+
}, r.prototype.onPacket = function(n) {
|
|
937
937
|
if (this.readyState == "opening" || this.readyState == "open")
|
|
938
938
|
switch (l('socket receive: type "%s", data "%s"', n.type, n.data), this.emit("packet", n), this.emit("heartbeat"), n.type) {
|
|
939
939
|
case "open":
|
|
@@ -943,51 +943,51 @@ function qe() {
|
|
|
943
943
|
this.setPing();
|
|
944
944
|
break;
|
|
945
945
|
case "error":
|
|
946
|
-
var
|
|
947
|
-
|
|
946
|
+
var p = new Error("server error");
|
|
947
|
+
p.code = n.data, this.emit("error", p);
|
|
948
948
|
break;
|
|
949
949
|
case "message":
|
|
950
950
|
this.emit("data", n.data), this.emit("message", n.data);
|
|
951
951
|
}
|
|
952
952
|
else
|
|
953
953
|
l('packet received with socket readyState "%s"', this.readyState);
|
|
954
|
-
},
|
|
954
|
+
}, r.prototype.onHandshake = function(n) {
|
|
955
955
|
this.emit("handshake", n), this.id = n.sid, this.transport.query.sid = n.sid, this.upgrades = this.filterUpgrades(n.upgrades), this.pingInterval = n.pingInterval, this.pingTimeout = n.pingTimeout, this.onOpen(), this.readyState != "closed" && (this.setPing(), this.removeListener("heartbeat", this.onHeartbeat), this.on("heartbeat", this.onHeartbeat));
|
|
956
|
-
},
|
|
956
|
+
}, r.prototype.onHeartbeat = function(n) {
|
|
957
957
|
clearTimeout(this.pingTimeoutTimer);
|
|
958
|
-
var
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
}, n ||
|
|
962
|
-
},
|
|
958
|
+
var p = this;
|
|
959
|
+
p.pingTimeoutTimer = setTimeout(function() {
|
|
960
|
+
p.readyState != "closed" && p.onClose("ping timeout");
|
|
961
|
+
}, n || p.pingInterval + p.pingTimeout);
|
|
962
|
+
}, r.prototype.setPing = function() {
|
|
963
963
|
var n = this;
|
|
964
964
|
clearTimeout(n.pingIntervalTimer), n.pingIntervalTimer = setTimeout(function() {
|
|
965
965
|
l("writing ping packet - expecting pong within %sms", n.pingTimeout), n.ping(), n.onHeartbeat(n.pingTimeout);
|
|
966
966
|
}, n.pingInterval);
|
|
967
|
-
},
|
|
967
|
+
}, r.prototype.ping = function() {
|
|
968
968
|
this.sendPacket("ping");
|
|
969
|
-
},
|
|
969
|
+
}, r.prototype.onDrain = function() {
|
|
970
970
|
for (var n = 0; n < this.prevBufferLen; n++)
|
|
971
971
|
this.callbackBuffer[n] && this.callbackBuffer[n]();
|
|
972
972
|
this.writeBuffer.splice(0, this.prevBufferLen), this.callbackBuffer.splice(0, this.prevBufferLen), this.prevBufferLen = 0, this.writeBuffer.length == 0 ? this.emit("drain") : this.flush();
|
|
973
|
-
},
|
|
973
|
+
}, r.prototype.flush = function() {
|
|
974
974
|
this.readyState != "closed" && this.transport.writable && !this.upgrading && this.writeBuffer.length && (l("flushing %d packets in socket", this.writeBuffer.length), this.transport.send(this.writeBuffer), this.prevBufferLen = this.writeBuffer.length, this.emit("flush"));
|
|
975
|
-
},
|
|
976
|
-
return this.sendPacket("message", n,
|
|
977
|
-
},
|
|
975
|
+
}, r.prototype.write = r.prototype.send = function(n, p) {
|
|
976
|
+
return this.sendPacket("message", n, p), this;
|
|
977
|
+
}, r.prototype.sendPacket = function(n, p, g) {
|
|
978
978
|
if (this.readyState != "closing" && this.readyState != "closed") {
|
|
979
|
-
var y = { type: n, data:
|
|
979
|
+
var y = { type: n, data: p };
|
|
980
980
|
this.emit("packetCreate", y), this.writeBuffer.push(y), this.callbackBuffer.push(g), this.flush();
|
|
981
981
|
}
|
|
982
|
-
},
|
|
982
|
+
}, r.prototype.close = function() {
|
|
983
983
|
function n() {
|
|
984
984
|
y.onClose("forced close"), l("socket closing - telling transport to close"), y.transport.close();
|
|
985
985
|
}
|
|
986
|
-
function
|
|
987
|
-
y.removeListener("upgrade",
|
|
986
|
+
function p() {
|
|
987
|
+
y.removeListener("upgrade", p), y.removeListener("upgradeError", p), n();
|
|
988
988
|
}
|
|
989
989
|
function g() {
|
|
990
|
-
y.once("upgrade",
|
|
990
|
+
y.once("upgrade", p), y.once("upgradeError", p);
|
|
991
991
|
}
|
|
992
992
|
if (this.readyState == "opening" || this.readyState == "open") {
|
|
993
993
|
this.readyState = "closing";
|
|
@@ -997,20 +997,20 @@ function qe() {
|
|
|
997
997
|
}) : this.upgrading ? g() : n();
|
|
998
998
|
}
|
|
999
999
|
return this;
|
|
1000
|
-
},
|
|
1001
|
-
l("socket error %j", n),
|
|
1002
|
-
},
|
|
1000
|
+
}, r.prototype.onError = function(n) {
|
|
1001
|
+
l("socket error %j", n), r.priorWebsocketSuccess = !1, this.emit("error", n), this.onClose("transport error", n);
|
|
1002
|
+
}, r.prototype.onClose = function(n, p) {
|
|
1003
1003
|
if (this.readyState == "opening" || this.readyState == "open" || this.readyState == "closing") {
|
|
1004
1004
|
l('socket close with reason: "%s"', n);
|
|
1005
1005
|
var g = this;
|
|
1006
1006
|
clearTimeout(this.pingIntervalTimer), clearTimeout(this.pingTimeoutTimer), setTimeout(function() {
|
|
1007
1007
|
g.writeBuffer = [], g.callbackBuffer = [], g.prevBufferLen = 0;
|
|
1008
|
-
}, 0), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), this.readyState = "closed", this.id = null, this.emit("close", n,
|
|
1008
|
+
}, 0), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), this.readyState = "closed", this.id = null, this.emit("close", n, p);
|
|
1009
1009
|
}
|
|
1010
|
-
},
|
|
1011
|
-
for (var
|
|
1012
|
-
~d(this.transports, n[g]) &&
|
|
1013
|
-
return
|
|
1010
|
+
}, r.prototype.filterUpgrades = function(n) {
|
|
1011
|
+
for (var p = [], g = 0, y = n.length; y > g; g++)
|
|
1012
|
+
~d(this.transports, n[g]) && p.push(n[g]);
|
|
1013
|
+
return p;
|
|
1014
1014
|
};
|
|
1015
1015
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1016
1016
|
}, {
|
|
@@ -1028,7 +1028,7 @@ function qe() {
|
|
|
1028
1028
|
function e(h) {
|
|
1029
1029
|
this.path = h.path, this.hostname = h.hostname, this.port = h.port, this.secure = h.secure, this.query = h.query, this.timestampParam = h.timestampParam, this.timestampRequests = h.timestampRequests, this.readyState = "", this.agent = h.agent || !1, this.socket = h.socket, this.enablesXDR = h.enablesXDR, this.pfx = h.pfx, this.key = h.key, this.passphrase = h.passphrase, this.cert = h.cert, this.ca = h.ca, this.ciphers = h.ciphers, this.rejectUnauthorized = h.rejectUnauthorized;
|
|
1030
1030
|
}
|
|
1031
|
-
var
|
|
1031
|
+
var r = a("engine.io-parser"), o = a("component-emitter");
|
|
1032
1032
|
t.exports = e, o(e.prototype), e.timestamps = 0, e.prototype.onError = function(h, f) {
|
|
1033
1033
|
var l = new Error(h);
|
|
1034
1034
|
return l.type = "TransportError", l.description = f, this.emit("error", l), this;
|
|
@@ -1043,7 +1043,7 @@ function qe() {
|
|
|
1043
1043
|
}, e.prototype.onOpen = function() {
|
|
1044
1044
|
this.readyState = "open", this.writable = !0, this.emit("open");
|
|
1045
1045
|
}, e.prototype.onData = function(h) {
|
|
1046
|
-
var f =
|
|
1046
|
+
var f = r.decodePacket(h, this.socket.binaryType);
|
|
1047
1047
|
this.onPacket(f);
|
|
1048
1048
|
}, e.prototype.onPacket = function(h) {
|
|
1049
1049
|
this.emit("packet", h);
|
|
@@ -1052,14 +1052,14 @@ function qe() {
|
|
|
1052
1052
|
};
|
|
1053
1053
|
}, { "component-emitter": 9, "engine.io-parser": 25 }],
|
|
1054
1054
|
15: [function(a, t, e) {
|
|
1055
|
-
(function(
|
|
1055
|
+
(function(r) {
|
|
1056
1056
|
function o(i) {
|
|
1057
|
-
var
|
|
1058
|
-
if (
|
|
1059
|
-
var
|
|
1060
|
-
g || (g =
|
|
1057
|
+
var u, c = !1, s = !1, n = i.jsonp !== !1;
|
|
1058
|
+
if (r.location) {
|
|
1059
|
+
var p = location.protocol == "https:", g = location.port;
|
|
1060
|
+
g || (g = p ? 443 : 80), c = i.hostname != location.hostname || g != i.port, s = i.secure != p;
|
|
1061
1061
|
}
|
|
1062
|
-
if (i.xdomain = c, i.xscheme =
|
|
1062
|
+
if (i.xdomain = c, i.xscheme = s, u = new h(i), "open" in u && !i.forceJSONP)
|
|
1063
1063
|
return new f(i);
|
|
1064
1064
|
if (!n)
|
|
1065
1065
|
throw new Error("JSONP disabled");
|
|
@@ -1071,15 +1071,15 @@ function qe() {
|
|
|
1071
1071
|
}, { "./polling-jsonp": 16, "./polling-xhr": 17, "./websocket": 19, xmlhttprequest: 20 }],
|
|
1072
1072
|
16: [function(a, t) {
|
|
1073
1073
|
(function(e) {
|
|
1074
|
-
function
|
|
1074
|
+
function r() {
|
|
1075
1075
|
}
|
|
1076
|
-
function o(
|
|
1077
|
-
h.call(this,
|
|
1076
|
+
function o(u) {
|
|
1077
|
+
h.call(this, u), this.query = this.query || {}, l || (e.___eio || (e.___eio = []), l = e.___eio), this.index = l.length;
|
|
1078
1078
|
var c = this;
|
|
1079
|
-
l.push(function(
|
|
1080
|
-
c.onData(
|
|
1079
|
+
l.push(function(s) {
|
|
1080
|
+
c.onData(s);
|
|
1081
1081
|
}), this.query.j = this.index, e.document && e.addEventListener && e.addEventListener("beforeunload", function() {
|
|
1082
|
-
c.script && (c.script.onerror =
|
|
1082
|
+
c.script && (c.script.onerror = r);
|
|
1083
1083
|
}, !1);
|
|
1084
1084
|
}
|
|
1085
1085
|
var h = a("./polling"), f = a("component-inherit");
|
|
@@ -1088,90 +1088,90 @@ function qe() {
|
|
|
1088
1088
|
f(o, h), o.prototype.supportsBinary = !1, o.prototype.doClose = function() {
|
|
1089
1089
|
this.script && (this.script.parentNode.removeChild(this.script), this.script = null), this.form && (this.form.parentNode.removeChild(this.form), this.form = null, this.iframe = null), h.prototype.doClose.call(this);
|
|
1090
1090
|
}, o.prototype.doPoll = function() {
|
|
1091
|
-
var
|
|
1092
|
-
this.script && (this.script.parentNode.removeChild(this.script), this.script = null), c.async = !0, c.src = this.uri(), c.onerror = function(
|
|
1093
|
-
|
|
1091
|
+
var u = this, c = document.createElement("script");
|
|
1092
|
+
this.script && (this.script.parentNode.removeChild(this.script), this.script = null), c.async = !0, c.src = this.uri(), c.onerror = function(p) {
|
|
1093
|
+
u.onError("jsonp poll error", p);
|
|
1094
1094
|
};
|
|
1095
|
-
var
|
|
1096
|
-
|
|
1095
|
+
var s = document.getElementsByTagName("script")[0];
|
|
1096
|
+
s.parentNode.insertBefore(c, s), this.script = c;
|
|
1097
1097
|
var n = typeof navigator < "u" && /gecko/i.test(navigator.userAgent);
|
|
1098
1098
|
n && setTimeout(function() {
|
|
1099
|
-
var
|
|
1100
|
-
document.body.appendChild(
|
|
1099
|
+
var p = document.createElement("iframe");
|
|
1100
|
+
document.body.appendChild(p), document.body.removeChild(p);
|
|
1101
1101
|
}, 100);
|
|
1102
|
-
}, o.prototype.doWrite = function(
|
|
1103
|
-
function
|
|
1102
|
+
}, o.prototype.doWrite = function(u, c) {
|
|
1103
|
+
function s() {
|
|
1104
1104
|
n(), c();
|
|
1105
1105
|
}
|
|
1106
1106
|
function n() {
|
|
1107
|
-
if (
|
|
1107
|
+
if (p.iframe)
|
|
1108
1108
|
try {
|
|
1109
|
-
|
|
1110
|
-
} catch (
|
|
1111
|
-
|
|
1109
|
+
p.form.removeChild(p.iframe);
|
|
1110
|
+
} catch (V) {
|
|
1111
|
+
p.onError("jsonp polling iframe removal error", V);
|
|
1112
1112
|
}
|
|
1113
1113
|
try {
|
|
1114
|
-
var
|
|
1115
|
-
g = document.createElement(
|
|
1114
|
+
var x = '<iframe src="javascript:0" name="' + p.iframeId + '">';
|
|
1115
|
+
g = document.createElement(x);
|
|
1116
1116
|
} catch {
|
|
1117
|
-
g = document.createElement("iframe"), g.name =
|
|
1117
|
+
g = document.createElement("iframe"), g.name = p.iframeId, g.src = "javascript:0";
|
|
1118
1118
|
}
|
|
1119
|
-
g.id =
|
|
1119
|
+
g.id = p.iframeId, p.form.appendChild(g), p.iframe = g;
|
|
1120
1120
|
}
|
|
1121
|
-
var
|
|
1121
|
+
var p = this;
|
|
1122
1122
|
if (!this.form) {
|
|
1123
1123
|
var g, y = document.createElement("form"), w = document.createElement("textarea"), P = this.iframeId = "eio_iframe_" + this.index;
|
|
1124
1124
|
y.className = "socketio", y.style.position = "absolute", y.style.top = "-1000px", y.style.left = "-1000px", y.target = P, y.method = "POST", y.setAttribute("accept-charset", "utf-8"), w.name = "d", y.appendChild(w), document.body.appendChild(y), this.form = y, this.area = w;
|
|
1125
1125
|
}
|
|
1126
|
-
this.form.action = this.uri(), n(),
|
|
1127
|
-
`), this.area.value =
|
|
1126
|
+
this.form.action = this.uri(), n(), u = u.replace(i, `\\
|
|
1127
|
+
`), this.area.value = u.replace(d, "\\n");
|
|
1128
1128
|
try {
|
|
1129
1129
|
this.form.submit();
|
|
1130
1130
|
} catch {
|
|
1131
1131
|
}
|
|
1132
1132
|
this.iframe.attachEvent ? this.iframe.onreadystatechange = function() {
|
|
1133
|
-
|
|
1134
|
-
} : this.iframe.onload =
|
|
1133
|
+
p.iframe.readyState == "complete" && s();
|
|
1134
|
+
} : this.iframe.onload = s;
|
|
1135
1135
|
};
|
|
1136
1136
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1137
1137
|
}, { "./polling": 18, "component-inherit": 21 }],
|
|
1138
1138
|
17: [function(a, t) {
|
|
1139
1139
|
(function(e) {
|
|
1140
|
-
function
|
|
1140
|
+
function r() {
|
|
1141
1141
|
}
|
|
1142
|
-
function o(
|
|
1143
|
-
if (d.call(this,
|
|
1144
|
-
var n = location.protocol == "https:",
|
|
1145
|
-
|
|
1142
|
+
function o(s) {
|
|
1143
|
+
if (d.call(this, s), e.location) {
|
|
1144
|
+
var n = location.protocol == "https:", p = location.port;
|
|
1145
|
+
p || (p = n ? 443 : 80), this.xd = s.hostname != e.location.hostname || p != s.port, this.xs = s.secure != n;
|
|
1146
1146
|
}
|
|
1147
1147
|
}
|
|
1148
|
-
function h(
|
|
1149
|
-
this.method =
|
|
1148
|
+
function h(s) {
|
|
1149
|
+
this.method = s.method || "GET", this.uri = s.uri, this.xd = !!s.xd, this.xs = !!s.xs, this.async = s.async !== !1, this.data = s.data != null ? s.data : null, this.agent = s.agent, this.isBinary = s.isBinary, this.supportsBinary = s.supportsBinary, this.enablesXDR = s.enablesXDR, this.pfx = s.pfx, this.key = s.key, this.passphrase = s.passphrase, this.cert = s.cert, this.ca = s.ca, this.ciphers = s.ciphers, this.rejectUnauthorized = s.rejectUnauthorized, this.create();
|
|
1150
1150
|
}
|
|
1151
1151
|
function f() {
|
|
1152
|
-
for (var
|
|
1153
|
-
h.requests.hasOwnProperty(
|
|
1152
|
+
for (var s in h.requests)
|
|
1153
|
+
h.requests.hasOwnProperty(s) && h.requests[s].abort();
|
|
1154
1154
|
}
|
|
1155
|
-
var l = a("xmlhttprequest"), d = a("./polling"), i = a("component-emitter"),
|
|
1156
|
-
t.exports = o, t.exports.Request = h,
|
|
1157
|
-
return
|
|
1158
|
-
}, o.prototype.doWrite = function(
|
|
1159
|
-
var
|
|
1155
|
+
var l = a("xmlhttprequest"), d = a("./polling"), i = a("component-emitter"), u = a("component-inherit"), c = a("debug")("engine.io-client:polling-xhr");
|
|
1156
|
+
t.exports = o, t.exports.Request = h, u(o, d), o.prototype.supportsBinary = !0, o.prototype.request = function(s) {
|
|
1157
|
+
return s = s || {}, s.uri = this.uri(), s.xd = this.xd, s.xs = this.xs, s.agent = this.agent || !1, s.supportsBinary = this.supportsBinary, s.enablesXDR = this.enablesXDR, s.pfx = this.pfx, s.key = this.key, s.passphrase = this.passphrase, s.cert = this.cert, s.ca = this.ca, s.ciphers = this.ciphers, s.rejectUnauthorized = this.rejectUnauthorized, new h(s);
|
|
1158
|
+
}, o.prototype.doWrite = function(s, n) {
|
|
1159
|
+
var p = typeof s != "string" && s !== void 0, g = this.request({ method: "POST", data: s, isBinary: p }), y = this;
|
|
1160
1160
|
g.on("success", n), g.on("error", function(w) {
|
|
1161
1161
|
y.onError("xhr post error", w);
|
|
1162
1162
|
}), this.sendXhr = g;
|
|
1163
1163
|
}, o.prototype.doPoll = function() {
|
|
1164
1164
|
c("xhr poll");
|
|
1165
|
-
var
|
|
1166
|
-
|
|
1167
|
-
n.onData(
|
|
1168
|
-
}),
|
|
1169
|
-
n.onError("xhr poll error",
|
|
1170
|
-
}), this.pollXhr =
|
|
1165
|
+
var s = this.request(), n = this;
|
|
1166
|
+
s.on("data", function(p) {
|
|
1167
|
+
n.onData(p);
|
|
1168
|
+
}), s.on("error", function(p) {
|
|
1169
|
+
n.onError("xhr poll error", p);
|
|
1170
|
+
}), this.pollXhr = s;
|
|
1171
1171
|
}, i(h.prototype), h.prototype.create = function() {
|
|
1172
|
-
var
|
|
1173
|
-
|
|
1174
|
-
var n = this.xhr = new l(
|
|
1172
|
+
var s = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };
|
|
1173
|
+
s.pfx = this.pfx, s.key = this.key, s.passphrase = this.passphrase, s.cert = this.cert, s.ca = this.ca, s.ciphers = this.ciphers, s.rejectUnauthorized = this.rejectUnauthorized;
|
|
1174
|
+
var n = this.xhr = new l(s), p = this;
|
|
1175
1175
|
try {
|
|
1176
1176
|
if (c("xhr open %s: %s", this.method, this.uri), n.open(this.method, this.uri, this.async), this.supportsBinary && (n.responseType = "arraybuffer"), this.method == "POST")
|
|
1177
1177
|
try {
|
|
@@ -1179,29 +1179,29 @@ function qe() {
|
|
|
1179
1179
|
} catch {
|
|
1180
1180
|
}
|
|
1181
1181
|
"withCredentials" in n && (n.withCredentials = !0), this.hasXDR() ? (n.onload = function() {
|
|
1182
|
-
|
|
1182
|
+
p.onLoad();
|
|
1183
1183
|
}, n.onerror = function() {
|
|
1184
|
-
|
|
1184
|
+
p.onError(n.responseText);
|
|
1185
1185
|
}) : n.onreadystatechange = function() {
|
|
1186
|
-
n.readyState == 4 && (n.status == 200 || n.status == 1223 ?
|
|
1187
|
-
|
|
1186
|
+
n.readyState == 4 && (n.status == 200 || n.status == 1223 ? p.onLoad() : setTimeout(function() {
|
|
1187
|
+
p.onError(n.status);
|
|
1188
1188
|
}, 0));
|
|
1189
1189
|
}, c("xhr data %s", this.data), n.send(this.data);
|
|
1190
1190
|
} catch (g) {
|
|
1191
1191
|
return void setTimeout(function() {
|
|
1192
|
-
|
|
1192
|
+
p.onError(g);
|
|
1193
1193
|
}, 0);
|
|
1194
1194
|
}
|
|
1195
1195
|
e.document && (this.index = h.requestsCount++, h.requests[this.index] = this);
|
|
1196
1196
|
}, h.prototype.onSuccess = function() {
|
|
1197
1197
|
this.emit("success"), this.cleanup();
|
|
1198
|
-
}, h.prototype.onData = function(
|
|
1199
|
-
this.emit("data",
|
|
1200
|
-
}, h.prototype.onError = function(
|
|
1201
|
-
this.emit("error",
|
|
1202
|
-
}, h.prototype.cleanup = function(
|
|
1198
|
+
}, h.prototype.onData = function(s) {
|
|
1199
|
+
this.emit("data", s), this.onSuccess();
|
|
1200
|
+
}, h.prototype.onError = function(s) {
|
|
1201
|
+
this.emit("error", s), this.cleanup(!0);
|
|
1202
|
+
}, h.prototype.cleanup = function(s) {
|
|
1203
1203
|
if (typeof this.xhr < "u" && this.xhr !== null) {
|
|
1204
|
-
if (this.hasXDR() ? this.xhr.onload = this.xhr.onerror =
|
|
1204
|
+
if (this.hasXDR() ? this.xhr.onload = this.xhr.onerror = r : this.xhr.onreadystatechange = r, s)
|
|
1205
1205
|
try {
|
|
1206
1206
|
this.xhr.abort();
|
|
1207
1207
|
} catch {
|
|
@@ -1209,18 +1209,18 @@ function qe() {
|
|
|
1209
1209
|
e.document && delete h.requests[this.index], this.xhr = null;
|
|
1210
1210
|
}
|
|
1211
1211
|
}, h.prototype.onLoad = function() {
|
|
1212
|
-
var
|
|
1212
|
+
var s;
|
|
1213
1213
|
try {
|
|
1214
1214
|
var n;
|
|
1215
1215
|
try {
|
|
1216
1216
|
n = this.xhr.getResponseHeader("Content-Type").split(";")[0];
|
|
1217
1217
|
} catch {
|
|
1218
1218
|
}
|
|
1219
|
-
|
|
1220
|
-
} catch (
|
|
1221
|
-
this.onError(
|
|
1219
|
+
s = n === "application/octet-stream" ? this.xhr.response : this.supportsBinary ? "ok" : this.xhr.responseText;
|
|
1220
|
+
} catch (p) {
|
|
1221
|
+
this.onError(p);
|
|
1222
1222
|
}
|
|
1223
|
-
|
|
1223
|
+
s != null && this.onData(s);
|
|
1224
1224
|
}, h.prototype.hasXDR = function() {
|
|
1225
1225
|
return typeof e.XDomainRequest < "u" && !this.xs && this.enablesXDR;
|
|
1226
1226
|
}, h.prototype.abort = function() {
|
|
@@ -1230,58 +1230,58 @@ function qe() {
|
|
|
1230
1230
|
}, { "./polling": 18, "component-emitter": 9, "component-inherit": 21, debug: 22, xmlhttprequest: 20 }],
|
|
1231
1231
|
18: [function(a, t) {
|
|
1232
1232
|
function e(i) {
|
|
1233
|
-
var
|
|
1234
|
-
(!d ||
|
|
1233
|
+
var u = i && i.forceBase64;
|
|
1234
|
+
(!d || u) && (this.supportsBinary = !1), r.call(this, i);
|
|
1235
1235
|
}
|
|
1236
|
-
var
|
|
1236
|
+
var r = a("../transport"), o = a("parseqs"), h = a("engine.io-parser"), f = a("component-inherit"), l = a("debug")("engine.io-client:polling");
|
|
1237
1237
|
t.exports = e;
|
|
1238
1238
|
var d = function() {
|
|
1239
|
-
var i = a("xmlhttprequest"),
|
|
1240
|
-
return
|
|
1239
|
+
var i = a("xmlhttprequest"), u = new i({ xdomain: !1 });
|
|
1240
|
+
return u.responseType != null;
|
|
1241
1241
|
}();
|
|
1242
|
-
f(e,
|
|
1242
|
+
f(e, r), e.prototype.name = "polling", e.prototype.doOpen = function() {
|
|
1243
1243
|
this.poll();
|
|
1244
1244
|
}, e.prototype.pause = function(i) {
|
|
1245
|
-
function
|
|
1245
|
+
function u() {
|
|
1246
1246
|
l("paused"), c.readyState = "paused", i();
|
|
1247
1247
|
}
|
|
1248
1248
|
var c = this;
|
|
1249
1249
|
if (this.readyState = "pausing", this.polling || !this.writable) {
|
|
1250
|
-
var
|
|
1251
|
-
this.polling && (l("we are currently polling - waiting to pause"),
|
|
1252
|
-
l("pre-pause polling complete"), --
|
|
1253
|
-
})), this.writable || (l("we are currently writing - waiting to pause"),
|
|
1254
|
-
l("pre-pause writing complete"), --
|
|
1250
|
+
var s = 0;
|
|
1251
|
+
this.polling && (l("we are currently polling - waiting to pause"), s++, this.once("pollComplete", function() {
|
|
1252
|
+
l("pre-pause polling complete"), --s || u();
|
|
1253
|
+
})), this.writable || (l("we are currently writing - waiting to pause"), s++, this.once("drain", function() {
|
|
1254
|
+
l("pre-pause writing complete"), --s || u();
|
|
1255
1255
|
}));
|
|
1256
1256
|
} else
|
|
1257
|
-
|
|
1257
|
+
u();
|
|
1258
1258
|
}, e.prototype.poll = function() {
|
|
1259
1259
|
l("polling"), this.polling = !0, this.doPoll(), this.emit("poll");
|
|
1260
1260
|
}, e.prototype.onData = function(i) {
|
|
1261
|
-
var
|
|
1261
|
+
var u = this;
|
|
1262
1262
|
l("polling got data %s", i);
|
|
1263
|
-
var c = function(
|
|
1264
|
-
return
|
|
1263
|
+
var c = function(s) {
|
|
1264
|
+
return u.readyState == "opening" && u.onOpen(), s.type == "close" ? (u.onClose(), !1) : void u.onPacket(s);
|
|
1265
1265
|
};
|
|
1266
1266
|
h.decodePayload(i, this.socket.binaryType, c), this.readyState != "closed" && (this.polling = !1, this.emit("pollComplete"), this.readyState == "open" ? this.poll() : l('ignoring poll - transport state "%s"', this.readyState));
|
|
1267
1267
|
}, e.prototype.doClose = function() {
|
|
1268
1268
|
function i() {
|
|
1269
|
-
l("writing close packet"),
|
|
1269
|
+
l("writing close packet"), u.write([{ type: "close" }]);
|
|
1270
1270
|
}
|
|
1271
|
-
var
|
|
1271
|
+
var u = this;
|
|
1272
1272
|
this.readyState == "open" ? (l("transport open - closing"), i()) : (l("transport not open - deferring close"), this.once("open", i));
|
|
1273
1273
|
}, e.prototype.write = function(i) {
|
|
1274
1274
|
var c = this;
|
|
1275
1275
|
this.writable = !1;
|
|
1276
|
-
var
|
|
1276
|
+
var u = function() {
|
|
1277
1277
|
c.writable = !0, c.emit("drain");
|
|
1278
1278
|
}, c = this;
|
|
1279
|
-
h.encodePayload(i, this.supportsBinary, function(
|
|
1280
|
-
c.doWrite(
|
|
1279
|
+
h.encodePayload(i, this.supportsBinary, function(s) {
|
|
1280
|
+
c.doWrite(s, u);
|
|
1281
1281
|
});
|
|
1282
1282
|
}, e.prototype.uri = function() {
|
|
1283
|
-
var i = this.query || {},
|
|
1284
|
-
return this.timestampRequests !== !1 && (i[this.timestampParam] = +/* @__PURE__ */ new Date() + "-" +
|
|
1283
|
+
var i = this.query || {}, u = this.secure ? "https" : "http", c = "";
|
|
1284
|
+
return this.timestampRequests !== !1 && (i[this.timestampParam] = +/* @__PURE__ */ new Date() + "-" + r.timestamps++), this.supportsBinary || i.sid || (i.b64 = 1), i = o.encode(i), this.port && (u == "https" && this.port != 443 || u == "http" && this.port != 80) && (c = ":" + this.port), i.length && (i = "?" + i), u + "://" + this.hostname + c + this.path + i;
|
|
1285
1285
|
};
|
|
1286
1286
|
}, {
|
|
1287
1287
|
"../transport": 14,
|
|
@@ -1293,14 +1293,14 @@ function qe() {
|
|
|
1293
1293
|
}],
|
|
1294
1294
|
19: [function(a, t) {
|
|
1295
1295
|
function e(i) {
|
|
1296
|
-
var
|
|
1297
|
-
|
|
1296
|
+
var u = i && i.forceBase64;
|
|
1297
|
+
u && (this.supportsBinary = !1), r.call(this, i);
|
|
1298
1298
|
}
|
|
1299
|
-
var
|
|
1300
|
-
t.exports = e, f(e,
|
|
1299
|
+
var r = a("../transport"), o = a("engine.io-parser"), h = a("parseqs"), f = a("component-inherit"), l = a("debug")("engine.io-client:websocket"), d = a("ws");
|
|
1300
|
+
t.exports = e, f(e, r), e.prototype.name = "websocket", e.prototype.supportsBinary = !0, e.prototype.doOpen = function() {
|
|
1301
1301
|
if (this.check()) {
|
|
1302
|
-
var i = this.uri(),
|
|
1303
|
-
c.pfx = this.pfx, c.key = this.key, c.passphrase = this.passphrase, c.cert = this.cert, c.ca = this.ca, c.ciphers = this.ciphers, c.rejectUnauthorized = this.rejectUnauthorized, this.ws = new d(i,
|
|
1302
|
+
var i = this.uri(), u = void 0, c = { agent: this.agent };
|
|
1303
|
+
c.pfx = this.pfx, c.key = this.key, c.passphrase = this.passphrase, c.cert = this.cert, c.ca = this.ca, c.ciphers = this.ciphers, c.rejectUnauthorized = this.rejectUnauthorized, this.ws = new d(i, u, c), this.ws.binaryType === void 0 && (this.supportsBinary = !1), this.ws.binaryType = "arraybuffer", this.addEventListeners();
|
|
1304
1304
|
}
|
|
1305
1305
|
}, e.prototype.addEventListeners = function() {
|
|
1306
1306
|
var i = this;
|
|
@@ -1308,46 +1308,46 @@ function qe() {
|
|
|
1308
1308
|
i.onOpen();
|
|
1309
1309
|
}, this.ws.onclose = function() {
|
|
1310
1310
|
i.onClose();
|
|
1311
|
-
}, this.ws.onmessage = function(
|
|
1312
|
-
i.onData(
|
|
1313
|
-
}, this.ws.onerror = function(
|
|
1314
|
-
i.onError("websocket error",
|
|
1311
|
+
}, this.ws.onmessage = function(u) {
|
|
1312
|
+
i.onData(u.data);
|
|
1313
|
+
}, this.ws.onerror = function(u) {
|
|
1314
|
+
i.onError("websocket error", u);
|
|
1315
1315
|
};
|
|
1316
1316
|
}, typeof navigator < "u" && /iPad|iPhone|iPod/i.test(navigator.userAgent) && (e.prototype.onData = function(i) {
|
|
1317
|
-
var
|
|
1317
|
+
var u = this;
|
|
1318
1318
|
setTimeout(function() {
|
|
1319
|
-
|
|
1319
|
+
r.prototype.onData.call(u, i);
|
|
1320
1320
|
}, 0);
|
|
1321
1321
|
}), e.prototype.write = function(i) {
|
|
1322
|
-
function
|
|
1322
|
+
function u() {
|
|
1323
1323
|
c.writable = !0, c.emit("drain");
|
|
1324
1324
|
}
|
|
1325
1325
|
var c = this;
|
|
1326
1326
|
this.writable = !1;
|
|
1327
|
-
for (var
|
|
1328
|
-
o.encodePacket(i[
|
|
1327
|
+
for (var s = 0, n = i.length; n > s; s++)
|
|
1328
|
+
o.encodePacket(i[s], this.supportsBinary, function(p) {
|
|
1329
1329
|
try {
|
|
1330
|
-
c.ws.send(
|
|
1330
|
+
c.ws.send(p);
|
|
1331
1331
|
} catch {
|
|
1332
1332
|
l("websocket closed before onclose event");
|
|
1333
1333
|
}
|
|
1334
1334
|
});
|
|
1335
|
-
setTimeout(
|
|
1335
|
+
setTimeout(u, 0);
|
|
1336
1336
|
}, e.prototype.onClose = function() {
|
|
1337
|
-
|
|
1337
|
+
r.prototype.onClose.call(this);
|
|
1338
1338
|
}, e.prototype.doClose = function() {
|
|
1339
1339
|
typeof this.ws < "u" && this.ws.close();
|
|
1340
1340
|
}, e.prototype.uri = function() {
|
|
1341
|
-
var i = this.query || {},
|
|
1342
|
-
return this.port && (
|
|
1341
|
+
var i = this.query || {}, u = this.secure ? "wss" : "ws", c = "";
|
|
1342
|
+
return this.port && (u == "wss" && this.port != 443 || u == "ws" && this.port != 80) && (c = ":" + this.port), this.timestampRequests && (i[this.timestampParam] = +/* @__PURE__ */ new Date()), this.supportsBinary || (i.b64 = 1), i = h.encode(i), i.length && (i = "?" + i), u + "://" + this.hostname + c + this.path + i;
|
|
1343
1343
|
}, e.prototype.check = function() {
|
|
1344
1344
|
return !(!d || "__initialize" in d && this.name === e.prototype.name);
|
|
1345
1345
|
};
|
|
1346
1346
|
}, { "../transport": 14, "component-inherit": 21, debug: 22, "engine.io-parser": 25, parseqs: 33, ws: 35 }],
|
|
1347
1347
|
20: [function(a, t) {
|
|
1348
1348
|
var e = a("has-cors");
|
|
1349
|
-
t.exports = function(
|
|
1350
|
-
var o =
|
|
1349
|
+
t.exports = function(r) {
|
|
1350
|
+
var o = r.xdomain, h = r.xscheme, f = r.enablesXDR;
|
|
1351
1351
|
try {
|
|
1352
1352
|
if (typeof XMLHttpRequest < "u" && (!o || e))
|
|
1353
1353
|
return new XMLHttpRequest();
|
|
@@ -1366,26 +1366,26 @@ function qe() {
|
|
|
1366
1366
|
};
|
|
1367
1367
|
}, { "has-cors": 38 }],
|
|
1368
1368
|
21: [function(a, t) {
|
|
1369
|
-
t.exports = function(e,
|
|
1369
|
+
t.exports = function(e, r) {
|
|
1370
1370
|
var o = function() {
|
|
1371
1371
|
};
|
|
1372
|
-
o.prototype =
|
|
1372
|
+
o.prototype = r.prototype, e.prototype = new o(), e.prototype.constructor = e;
|
|
1373
1373
|
};
|
|
1374
1374
|
}, {}],
|
|
1375
1375
|
22: [function(a, t, e) {
|
|
1376
|
-
function
|
|
1376
|
+
function r() {
|
|
1377
1377
|
return "WebkitAppearance" in document.documentElement.style || window.console && (console.firebug || console.exception && console.table) || navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31;
|
|
1378
1378
|
}
|
|
1379
1379
|
function o() {
|
|
1380
1380
|
var d = arguments, i = this.useColors;
|
|
1381
1381
|
if (d[0] = (i ? "%c" : "") + this.namespace + (i ? " %c" : " ") + d[0] + (i ? "%c " : " ") + "+" + e.humanize(this.diff), !i)
|
|
1382
1382
|
return d;
|
|
1383
|
-
var
|
|
1384
|
-
d = [d[0],
|
|
1385
|
-
var c = 0,
|
|
1383
|
+
var u = "color: " + this.color;
|
|
1384
|
+
d = [d[0], u, "color: inherit"].concat(Array.prototype.slice.call(d, 1));
|
|
1385
|
+
var c = 0, s = 0;
|
|
1386
1386
|
return d[0].replace(/%[a-z%]/g, function(n) {
|
|
1387
|
-
n !== "%%" && (c++, n === "%c" && (
|
|
1388
|
-
}), d.splice(
|
|
1387
|
+
n !== "%%" && (c++, n === "%c" && (s = c));
|
|
1388
|
+
}), d.splice(s, 0, u), d;
|
|
1389
1389
|
}
|
|
1390
1390
|
function h() {
|
|
1391
1391
|
return typeof console == "object" && typeof console.log == "function" && Function.prototype.apply.call(console.log, console, arguments);
|
|
@@ -1404,56 +1404,56 @@ function qe() {
|
|
|
1404
1404
|
}
|
|
1405
1405
|
return d;
|
|
1406
1406
|
}
|
|
1407
|
-
e = t.exports = a("./debug"), e.log = h, e.formatArgs = o, e.save = f, e.load = l, e.useColors =
|
|
1407
|
+
e = t.exports = a("./debug"), e.log = h, e.formatArgs = o, e.save = f, e.load = l, e.useColors = r, e.colors = ["lightseagreen", "forestgreen", "goldenrod", "dodgerblue", "darkorchid", "crimson"], e.formatters.j = function(d) {
|
|
1408
1408
|
return JSON.stringify(d);
|
|
1409
1409
|
}, e.enable(l());
|
|
1410
1410
|
}, { "./debug": 23 }],
|
|
1411
1411
|
23: [function(a, t, e) {
|
|
1412
|
-
function
|
|
1413
|
-
return e.colors[
|
|
1412
|
+
function r() {
|
|
1413
|
+
return e.colors[u++ % e.colors.length];
|
|
1414
1414
|
}
|
|
1415
1415
|
function o(c) {
|
|
1416
|
-
function
|
|
1416
|
+
function s() {
|
|
1417
1417
|
}
|
|
1418
1418
|
function n() {
|
|
1419
1419
|
var g = n, y = +/* @__PURE__ */ new Date(), w = y - (i || y);
|
|
1420
|
-
g.diff = w, g.prev = i, g.curr = y, i = y, g.useColors == null && (g.useColors = e.useColors()), g.color == null && g.useColors && (g.color =
|
|
1420
|
+
g.diff = w, g.prev = i, g.curr = y, i = y, g.useColors == null && (g.useColors = e.useColors()), g.color == null && g.useColors && (g.color = r());
|
|
1421
1421
|
var P = Array.prototype.slice.call(arguments);
|
|
1422
1422
|
P[0] = e.coerce(P[0]), typeof P[0] != "string" && (P = ["%o"].concat(P));
|
|
1423
|
-
var
|
|
1424
|
-
P[0] = P[0].replace(/%([a-z%])/g, function(
|
|
1425
|
-
if (
|
|
1426
|
-
return
|
|
1427
|
-
|
|
1428
|
-
var b = e.formatters[
|
|
1423
|
+
var x = 0;
|
|
1424
|
+
P[0] = P[0].replace(/%([a-z%])/g, function(I, k) {
|
|
1425
|
+
if (I === "%%")
|
|
1426
|
+
return I;
|
|
1427
|
+
x++;
|
|
1428
|
+
var b = e.formatters[k];
|
|
1429
1429
|
if (typeof b == "function") {
|
|
1430
|
-
var A = P[
|
|
1431
|
-
|
|
1430
|
+
var A = P[x];
|
|
1431
|
+
I = b.call(g, A), P.splice(x, 1), x--;
|
|
1432
1432
|
}
|
|
1433
|
-
return
|
|
1433
|
+
return I;
|
|
1434
1434
|
}), typeof e.formatArgs == "function" && (P = e.formatArgs.apply(g, P));
|
|
1435
|
-
var
|
|
1436
|
-
|
|
1435
|
+
var V = n.log || e.log || console.log.bind(console);
|
|
1436
|
+
V.apply(g, P);
|
|
1437
1437
|
}
|
|
1438
|
-
|
|
1439
|
-
var
|
|
1440
|
-
return
|
|
1438
|
+
s.enabled = !1, n.enabled = !0;
|
|
1439
|
+
var p = e.enabled(c) ? n : s;
|
|
1440
|
+
return p.namespace = c, p;
|
|
1441
1441
|
}
|
|
1442
1442
|
function h(c) {
|
|
1443
1443
|
e.save(c);
|
|
1444
|
-
for (var
|
|
1445
|
-
|
|
1444
|
+
for (var s = (c || "").split(/[\s,]+/), n = s.length, p = 0; n > p; p++)
|
|
1445
|
+
s[p] && (c = s[p].replace(/\*/g, ".*?"), c[0] === "-" ? e.skips.push(new RegExp("^" + c.substr(1) + "$")) : e.names.push(new RegExp("^" + c + "$")));
|
|
1446
1446
|
}
|
|
1447
1447
|
function f() {
|
|
1448
1448
|
e.enable("");
|
|
1449
1449
|
}
|
|
1450
1450
|
function l(c) {
|
|
1451
|
-
var
|
|
1452
|
-
for (
|
|
1453
|
-
if (e.skips[
|
|
1451
|
+
var s, n;
|
|
1452
|
+
for (s = 0, n = e.skips.length; n > s; s++)
|
|
1453
|
+
if (e.skips[s].test(c))
|
|
1454
1454
|
return !1;
|
|
1455
|
-
for (
|
|
1456
|
-
if (e.names[
|
|
1455
|
+
for (s = 0, n = e.names.length; n > s; s++)
|
|
1456
|
+
if (e.names[s].test(c))
|
|
1457
1457
|
return !0;
|
|
1458
1458
|
return !1;
|
|
1459
1459
|
}
|
|
@@ -1461,18 +1461,18 @@ function qe() {
|
|
|
1461
1461
|
return c instanceof Error ? c.stack || c.message : c;
|
|
1462
1462
|
}
|
|
1463
1463
|
e = t.exports = o, e.coerce = d, e.disable = f, e.enable = h, e.enabled = l, e.humanize = a("ms"), e.names = [], e.skips = [], e.formatters = {};
|
|
1464
|
-
var i,
|
|
1464
|
+
var i, u = 0;
|
|
1465
1465
|
}, { ms: 24 }],
|
|
1466
1466
|
24: [function(a, t) {
|
|
1467
1467
|
function e(c) {
|
|
1468
|
-
var
|
|
1469
|
-
if (
|
|
1470
|
-
var n = parseFloat(
|
|
1471
|
-
switch (
|
|
1468
|
+
var s = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(c);
|
|
1469
|
+
if (s) {
|
|
1470
|
+
var n = parseFloat(s[1]), p = (s[2] || "ms").toLowerCase();
|
|
1471
|
+
switch (p) {
|
|
1472
1472
|
case "years":
|
|
1473
1473
|
case "year":
|
|
1474
1474
|
case "y":
|
|
1475
|
-
return n *
|
|
1475
|
+
return n * u;
|
|
1476
1476
|
case "days":
|
|
1477
1477
|
case "day":
|
|
1478
1478
|
case "d":
|
|
@@ -1494,217 +1494,217 @@ function qe() {
|
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1497
|
+
function r(c) {
|
|
1498
1498
|
return c >= i ? Math.round(c / i) + "d" : c >= d ? Math.round(c / d) + "h" : c >= l ? Math.round(c / l) + "m" : c >= f ? Math.round(c / f) + "s" : c + "ms";
|
|
1499
1499
|
}
|
|
1500
1500
|
function o(c) {
|
|
1501
1501
|
return h(c, i, "day") || h(c, d, "hour") || h(c, l, "minute") || h(c, f, "second") || c + " ms";
|
|
1502
1502
|
}
|
|
1503
|
-
function h(c,
|
|
1504
|
-
return
|
|
1503
|
+
function h(c, s, n) {
|
|
1504
|
+
return s > c ? void 0 : 1.5 * s > c ? Math.floor(c / s) + " " + n : Math.ceil(c / s) + " " + n + "s";
|
|
1505
1505
|
}
|
|
1506
|
-
var f = 1e3, l = 60 * f, d = 60 * l, i = 24 * d,
|
|
1507
|
-
t.exports = function(c,
|
|
1508
|
-
return
|
|
1506
|
+
var f = 1e3, l = 60 * f, d = 60 * l, i = 24 * d, u = 365.25 * i;
|
|
1507
|
+
t.exports = function(c, s) {
|
|
1508
|
+
return s = s || {}, typeof c == "string" ? e(c) : s.long ? o(c) : r(c);
|
|
1509
1509
|
};
|
|
1510
1510
|
}, {}],
|
|
1511
1511
|
25: [function(a, t, e) {
|
|
1512
|
-
(function(
|
|
1513
|
-
function o(
|
|
1514
|
-
var A = "b" + e.packets[
|
|
1512
|
+
(function(r) {
|
|
1513
|
+
function o(k, b) {
|
|
1514
|
+
var A = "b" + e.packets[k.type] + k.data.data;
|
|
1515
1515
|
return b(A);
|
|
1516
1516
|
}
|
|
1517
|
-
function h(
|
|
1517
|
+
function h(k, b, A) {
|
|
1518
1518
|
if (!b)
|
|
1519
|
-
return e.encodeBase64Packet(
|
|
1520
|
-
var v =
|
|
1521
|
-
|
|
1522
|
-
for (var
|
|
1523
|
-
|
|
1524
|
-
return A(
|
|
1519
|
+
return e.encodeBase64Packet(k, A);
|
|
1520
|
+
var v = k.data, m = new Uint8Array(v), O = new Uint8Array(1 + v.byteLength);
|
|
1521
|
+
O[0] = P[k.type];
|
|
1522
|
+
for (var B = 0; B < m.length; B++)
|
|
1523
|
+
O[B + 1] = m[B];
|
|
1524
|
+
return A(O.buffer);
|
|
1525
1525
|
}
|
|
1526
|
-
function f(
|
|
1526
|
+
function f(k, b, A) {
|
|
1527
1527
|
if (!b)
|
|
1528
|
-
return e.encodeBase64Packet(
|
|
1528
|
+
return e.encodeBase64Packet(k, A);
|
|
1529
1529
|
var v = new FileReader();
|
|
1530
1530
|
return v.onload = function() {
|
|
1531
|
-
|
|
1532
|
-
}, v.readAsArrayBuffer(
|
|
1531
|
+
k.data = v.result, e.encodePacket(k, b, !0, A);
|
|
1532
|
+
}, v.readAsArrayBuffer(k.data);
|
|
1533
1533
|
}
|
|
1534
|
-
function l(
|
|
1534
|
+
function l(k, b, A) {
|
|
1535
1535
|
if (!b)
|
|
1536
|
-
return e.encodeBase64Packet(
|
|
1536
|
+
return e.encodeBase64Packet(k, A);
|
|
1537
1537
|
if (w)
|
|
1538
|
-
return f(
|
|
1538
|
+
return f(k, b, A);
|
|
1539
1539
|
var v = new Uint8Array(1);
|
|
1540
|
-
v[0] = P[
|
|
1541
|
-
var m = new
|
|
1540
|
+
v[0] = P[k.type];
|
|
1541
|
+
var m = new I([v.buffer, k.data]);
|
|
1542
1542
|
return A(m);
|
|
1543
1543
|
}
|
|
1544
|
-
function d(
|
|
1545
|
-
for (var v = new Array(
|
|
1544
|
+
function d(k, b, A) {
|
|
1545
|
+
for (var v = new Array(k.length), m = n(k.length, A), O = function(R, S, X) {
|
|
1546
1546
|
b(S, function(K, G) {
|
|
1547
|
-
v[
|
|
1547
|
+
v[R] = G, X(K, v);
|
|
1548
1548
|
});
|
|
1549
|
-
},
|
|
1550
|
-
|
|
1549
|
+
}, B = 0; B < k.length; B++)
|
|
1550
|
+
O(B, k[B], m);
|
|
1551
1551
|
}
|
|
1552
|
-
var i = a("./keys"),
|
|
1552
|
+
var i = a("./keys"), u = a("has-binary"), c = a("arraybuffer.slice"), s = a("base64-arraybuffer"), n = a("after"), p = a("utf8"), g = navigator.userAgent.match(/Android/i), y = /PhantomJS/i.test(navigator.userAgent), w = g || y;
|
|
1553
1553
|
e.protocol = 3;
|
|
1554
|
-
var P = e.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 },
|
|
1555
|
-
e.encodePacket = function(
|
|
1554
|
+
var P = e.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 }, x = i(P), V = { type: "error", data: "parser error" }, I = a("blob");
|
|
1555
|
+
e.encodePacket = function(k, b, A, v) {
|
|
1556
1556
|
typeof b == "function" && (v = b, b = !1), typeof A == "function" && (v = A, A = null);
|
|
1557
|
-
var m =
|
|
1558
|
-
if (
|
|
1559
|
-
return h(
|
|
1560
|
-
if (
|
|
1561
|
-
return l(
|
|
1557
|
+
var m = k.data === void 0 ? void 0 : k.data.buffer || k.data;
|
|
1558
|
+
if (r.ArrayBuffer && m instanceof ArrayBuffer)
|
|
1559
|
+
return h(k, b, v);
|
|
1560
|
+
if (I && m instanceof r.Blob)
|
|
1561
|
+
return l(k, b, v);
|
|
1562
1562
|
if (m && m.base64)
|
|
1563
|
-
return o(
|
|
1564
|
-
var
|
|
1565
|
-
return
|
|
1566
|
-
}, e.encodeBase64Packet = function(
|
|
1567
|
-
var A = "b" + e.packets[
|
|
1568
|
-
if (
|
|
1563
|
+
return o(k, v);
|
|
1564
|
+
var O = P[k.type];
|
|
1565
|
+
return k.data !== void 0 && (O += A ? p.encode(String(k.data)) : String(k.data)), v("" + O);
|
|
1566
|
+
}, e.encodeBase64Packet = function(k, b) {
|
|
1567
|
+
var A = "b" + e.packets[k.type];
|
|
1568
|
+
if (I && k.data instanceof I) {
|
|
1569
1569
|
var v = new FileReader();
|
|
1570
1570
|
return v.onload = function() {
|
|
1571
1571
|
var S = v.result.split(",")[1];
|
|
1572
1572
|
b(A + S);
|
|
1573
|
-
}, v.readAsDataURL(
|
|
1573
|
+
}, v.readAsDataURL(k.data);
|
|
1574
1574
|
}
|
|
1575
1575
|
var m;
|
|
1576
1576
|
try {
|
|
1577
|
-
m = String.fromCharCode.apply(null, new Uint8Array(
|
|
1577
|
+
m = String.fromCharCode.apply(null, new Uint8Array(k.data));
|
|
1578
1578
|
} catch {
|
|
1579
|
-
for (var
|
|
1580
|
-
R
|
|
1581
|
-
m = String.fromCharCode.apply(null,
|
|
1582
|
-
}
|
|
1583
|
-
return A +=
|
|
1584
|
-
}, e.decodePacket = function(
|
|
1585
|
-
if (typeof
|
|
1586
|
-
if (
|
|
1587
|
-
return e.decodeBase64Packet(
|
|
1579
|
+
for (var O = new Uint8Array(k.data), B = new Array(O.length), R = 0; R < O.length; R++)
|
|
1580
|
+
B[R] = O[R];
|
|
1581
|
+
m = String.fromCharCode.apply(null, B);
|
|
1582
|
+
}
|
|
1583
|
+
return A += r.btoa(m), b(A);
|
|
1584
|
+
}, e.decodePacket = function(k, b, A) {
|
|
1585
|
+
if (typeof k == "string" || k === void 0) {
|
|
1586
|
+
if (k.charAt(0) == "b")
|
|
1587
|
+
return e.decodeBase64Packet(k.substr(1), b);
|
|
1588
1588
|
if (A)
|
|
1589
1589
|
try {
|
|
1590
|
-
|
|
1590
|
+
k = p.decode(k);
|
|
1591
1591
|
} catch {
|
|
1592
|
-
return
|
|
1592
|
+
return V;
|
|
1593
1593
|
}
|
|
1594
|
-
var m =
|
|
1595
|
-
return Number(m) == m &&
|
|
1596
|
-
type:
|
|
1597
|
-
data:
|
|
1598
|
-
} : { type:
|
|
1599
|
-
}
|
|
1600
|
-
var v = new Uint8Array(
|
|
1601
|
-
return
|
|
1602
|
-
}, e.decodeBase64Packet = function(
|
|
1603
|
-
var A =
|
|
1604
|
-
if (!
|
|
1605
|
-
return { type: A, data: { base64: !0, data:
|
|
1606
|
-
var v =
|
|
1607
|
-
return b === "blob" &&
|
|
1608
|
-
}, e.encodePayload = function(
|
|
1609
|
-
function v(
|
|
1610
|
-
return
|
|
1611
|
-
}
|
|
1612
|
-
function m(
|
|
1613
|
-
e.encodePacket(
|
|
1614
|
-
|
|
1594
|
+
var m = k.charAt(0);
|
|
1595
|
+
return Number(m) == m && x[m] ? k.length > 1 ? {
|
|
1596
|
+
type: x[m],
|
|
1597
|
+
data: k.substring(1)
|
|
1598
|
+
} : { type: x[m] } : V;
|
|
1599
|
+
}
|
|
1600
|
+
var v = new Uint8Array(k), m = v[0], O = c(k, 1);
|
|
1601
|
+
return I && b === "blob" && (O = new I([O])), { type: x[m], data: O };
|
|
1602
|
+
}, e.decodeBase64Packet = function(k, b) {
|
|
1603
|
+
var A = x[k.charAt(0)];
|
|
1604
|
+
if (!r.ArrayBuffer)
|
|
1605
|
+
return { type: A, data: { base64: !0, data: k.substr(1) } };
|
|
1606
|
+
var v = s.decode(k.substr(1));
|
|
1607
|
+
return b === "blob" && I && (v = new I([v])), { type: A, data: v };
|
|
1608
|
+
}, e.encodePayload = function(k, b, A) {
|
|
1609
|
+
function v(B) {
|
|
1610
|
+
return B.length + ":" + B;
|
|
1611
|
+
}
|
|
1612
|
+
function m(B, R) {
|
|
1613
|
+
e.encodePacket(B, O ? b : !1, !0, function(S) {
|
|
1614
|
+
R(null, v(S));
|
|
1615
1615
|
});
|
|
1616
1616
|
}
|
|
1617
1617
|
typeof b == "function" && (A = b, b = null);
|
|
1618
|
-
var
|
|
1619
|
-
return b &&
|
|
1620
|
-
return A(
|
|
1618
|
+
var O = u(k);
|
|
1619
|
+
return b && O ? I && !w ? e.encodePayloadAsBlob(k, A) : e.encodePayloadAsArrayBuffer(k, A) : k.length ? void d(k, m, function(B, R) {
|
|
1620
|
+
return A(R.join(""));
|
|
1621
1621
|
}) : A("0:");
|
|
1622
|
-
}, e.decodePayload = function(
|
|
1623
|
-
if (typeof
|
|
1624
|
-
return e.decodePayloadAsBinary(
|
|
1622
|
+
}, e.decodePayload = function(k, b, A) {
|
|
1623
|
+
if (typeof k != "string")
|
|
1624
|
+
return e.decodePayloadAsBinary(k, b, A);
|
|
1625
1625
|
typeof b == "function" && (A = b, b = null);
|
|
1626
1626
|
var v;
|
|
1627
|
-
if (
|
|
1628
|
-
return A(
|
|
1629
|
-
for (var m,
|
|
1630
|
-
var X =
|
|
1627
|
+
if (k == "")
|
|
1628
|
+
return A(V, 0, 1);
|
|
1629
|
+
for (var m, O, B = "", R = 0, S = k.length; S > R; R++) {
|
|
1630
|
+
var X = k.charAt(R);
|
|
1631
1631
|
if (X != ":")
|
|
1632
|
-
|
|
1632
|
+
B += X;
|
|
1633
1633
|
else {
|
|
1634
|
-
if (
|
|
1635
|
-
return A(
|
|
1636
|
-
if (
|
|
1637
|
-
if (v = e.decodePacket(
|
|
1638
|
-
return A(
|
|
1639
|
-
var K = A(v,
|
|
1634
|
+
if (B == "" || B != (m = Number(B)) || (O = k.substr(R + 1, m), B != O.length))
|
|
1635
|
+
return A(V, 0, 1);
|
|
1636
|
+
if (O.length) {
|
|
1637
|
+
if (v = e.decodePacket(O, b, !0), V.type == v.type && V.data == v.data)
|
|
1638
|
+
return A(V, 0, 1);
|
|
1639
|
+
var K = A(v, R + m, S);
|
|
1640
1640
|
if (K === !1)
|
|
1641
1641
|
return;
|
|
1642
1642
|
}
|
|
1643
|
-
|
|
1643
|
+
R += m, B = "";
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
1646
|
-
return
|
|
1647
|
-
}, e.encodePayloadAsArrayBuffer = function(
|
|
1646
|
+
return B != "" ? A(V, 0, 1) : void 0;
|
|
1647
|
+
}, e.encodePayloadAsArrayBuffer = function(k, b) {
|
|
1648
1648
|
function A(v, m) {
|
|
1649
|
-
e.encodePacket(v, !0, !0, function(
|
|
1650
|
-
return m(null,
|
|
1649
|
+
e.encodePacket(v, !0, !0, function(O) {
|
|
1650
|
+
return m(null, O);
|
|
1651
1651
|
});
|
|
1652
1652
|
}
|
|
1653
|
-
return
|
|
1654
|
-
var
|
|
1653
|
+
return k.length ? void d(k, A, function(v, m) {
|
|
1654
|
+
var O = m.reduce(function(S, X) {
|
|
1655
1655
|
var K;
|
|
1656
1656
|
return K = typeof X == "string" ? X.length : X.byteLength, S + K.toString().length + K + 2;
|
|
1657
|
-
}, 0),
|
|
1657
|
+
}, 0), B = new Uint8Array(O), R = 0;
|
|
1658
1658
|
return m.forEach(function(S) {
|
|
1659
1659
|
var X = typeof S == "string", K = S;
|
|
1660
1660
|
if (X) {
|
|
1661
|
-
for (var G = new Uint8Array(S.length),
|
|
1662
|
-
G[
|
|
1661
|
+
for (var G = new Uint8Array(S.length), M = 0; M < S.length; M++)
|
|
1662
|
+
G[M] = S.charCodeAt(M);
|
|
1663
1663
|
K = G.buffer;
|
|
1664
1664
|
}
|
|
1665
|
-
R
|
|
1666
|
-
for (var J = K.byteLength.toString(),
|
|
1667
|
-
R
|
|
1668
|
-
R
|
|
1669
|
-
for (var G = new Uint8Array(K),
|
|
1670
|
-
R
|
|
1671
|
-
}), b(
|
|
1665
|
+
B[R++] = X ? 0 : 1;
|
|
1666
|
+
for (var J = K.byteLength.toString(), M = 0; M < J.length; M++)
|
|
1667
|
+
B[R++] = parseInt(J[M]);
|
|
1668
|
+
B[R++] = 255;
|
|
1669
|
+
for (var G = new Uint8Array(K), M = 0; M < G.length; M++)
|
|
1670
|
+
B[R++] = G[M];
|
|
1671
|
+
}), b(B.buffer);
|
|
1672
1672
|
}) : b(new ArrayBuffer(0));
|
|
1673
|
-
}, e.encodePayloadAsBlob = function(
|
|
1673
|
+
}, e.encodePayloadAsBlob = function(k, b) {
|
|
1674
1674
|
function A(v, m) {
|
|
1675
|
-
e.encodePacket(v, !0, !0, function(
|
|
1676
|
-
var
|
|
1677
|
-
if (
|
|
1678
|
-
for (var
|
|
1679
|
-
|
|
1680
|
-
|
|
1675
|
+
e.encodePacket(v, !0, !0, function(O) {
|
|
1676
|
+
var B = new Uint8Array(1);
|
|
1677
|
+
if (B[0] = 1, typeof O == "string") {
|
|
1678
|
+
for (var R = new Uint8Array(O.length), S = 0; S < O.length; S++)
|
|
1679
|
+
R[S] = O.charCodeAt(S);
|
|
1680
|
+
O = R.buffer, B[0] = 0;
|
|
1681
1681
|
}
|
|
1682
|
-
for (var X =
|
|
1682
|
+
for (var X = O instanceof ArrayBuffer ? O.byteLength : O.size, K = X.toString(), G = new Uint8Array(K.length + 1), S = 0; S < K.length; S++)
|
|
1683
1683
|
G[S] = parseInt(K[S]);
|
|
1684
|
-
if (G[K.length] = 255,
|
|
1685
|
-
var
|
|
1686
|
-
m(null,
|
|
1684
|
+
if (G[K.length] = 255, I) {
|
|
1685
|
+
var M = new I([B.buffer, G.buffer, O]);
|
|
1686
|
+
m(null, M);
|
|
1687
1687
|
}
|
|
1688
1688
|
});
|
|
1689
1689
|
}
|
|
1690
|
-
d(
|
|
1691
|
-
return b(new
|
|
1690
|
+
d(k, A, function(v, m) {
|
|
1691
|
+
return b(new I(m));
|
|
1692
1692
|
});
|
|
1693
|
-
}, e.decodePayloadAsBinary = function(
|
|
1693
|
+
}, e.decodePayloadAsBinary = function(k, b, A) {
|
|
1694
1694
|
typeof b == "function" && (A = b, b = null);
|
|
1695
|
-
for (var v =
|
|
1696
|
-
for (var
|
|
1695
|
+
for (var v = k, m = [], O = !1; v.byteLength > 0; ) {
|
|
1696
|
+
for (var B = new Uint8Array(v), R = B[0] === 0, S = "", X = 1; B[X] != 255; X++) {
|
|
1697
1697
|
if (S.length > 310) {
|
|
1698
|
-
|
|
1698
|
+
O = !0;
|
|
1699
1699
|
break;
|
|
1700
1700
|
}
|
|
1701
|
-
S +=
|
|
1701
|
+
S += B[X];
|
|
1702
1702
|
}
|
|
1703
|
-
if (
|
|
1704
|
-
return A(
|
|
1703
|
+
if (O)
|
|
1704
|
+
return A(V, 0, 1);
|
|
1705
1705
|
v = c(v, 2 + S.length), S = parseInt(S);
|
|
1706
1706
|
var K = c(v, 0, S);
|
|
1707
|
-
if (
|
|
1707
|
+
if (R)
|
|
1708
1708
|
try {
|
|
1709
1709
|
K = String.fromCharCode.apply(null, new Uint8Array(K));
|
|
1710
1710
|
} catch {
|
|
@@ -1715,9 +1715,9 @@ function qe() {
|
|
|
1715
1715
|
}
|
|
1716
1716
|
m.push(K), v = c(v, S);
|
|
1717
1717
|
}
|
|
1718
|
-
var
|
|
1719
|
-
m.forEach(function(J,
|
|
1720
|
-
A(e.decodePacket(J, b, !0),
|
|
1718
|
+
var M = m.length;
|
|
1719
|
+
m.forEach(function(J, re) {
|
|
1720
|
+
A(e.decodePacket(J, b, !0), re, M);
|
|
1721
1721
|
});
|
|
1722
1722
|
};
|
|
1723
1723
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -1732,92 +1732,92 @@ function qe() {
|
|
|
1732
1732
|
}],
|
|
1733
1733
|
26: [function(a, t) {
|
|
1734
1734
|
t.exports = Object.keys || function(e) {
|
|
1735
|
-
var
|
|
1735
|
+
var r = [], o = Object.prototype.hasOwnProperty;
|
|
1736
1736
|
for (var h in e)
|
|
1737
|
-
o.call(e, h) &&
|
|
1738
|
-
return
|
|
1737
|
+
o.call(e, h) && r.push(h);
|
|
1738
|
+
return r;
|
|
1739
1739
|
};
|
|
1740
1740
|
}, {}],
|
|
1741
1741
|
27: [function(a, t) {
|
|
1742
1742
|
function e(o, h, f) {
|
|
1743
|
-
function l(i,
|
|
1743
|
+
function l(i, u) {
|
|
1744
1744
|
if (l.count <= 0)
|
|
1745
1745
|
throw new Error("after called too many times");
|
|
1746
|
-
--l.count, i ? (d = !0, h(i), h = f) : l.count !== 0 || d || h(null,
|
|
1746
|
+
--l.count, i ? (d = !0, h(i), h = f) : l.count !== 0 || d || h(null, u);
|
|
1747
1747
|
}
|
|
1748
1748
|
var d = !1;
|
|
1749
|
-
return f = f ||
|
|
1749
|
+
return f = f || r, l.count = o, o === 0 ? h() : l;
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function r() {
|
|
1752
1752
|
}
|
|
1753
1753
|
t.exports = e;
|
|
1754
1754
|
}, {}],
|
|
1755
1755
|
28: [function(a, t) {
|
|
1756
|
-
t.exports = function(e,
|
|
1756
|
+
t.exports = function(e, r, o) {
|
|
1757
1757
|
var h = e.byteLength;
|
|
1758
|
-
if (
|
|
1759
|
-
return e.slice(
|
|
1760
|
-
if (0 >
|
|
1758
|
+
if (r = r || 0, o = o || h, e.slice)
|
|
1759
|
+
return e.slice(r, o);
|
|
1760
|
+
if (0 > r && (r += h), 0 > o && (o += h), o > h && (o = h), r >= h || r >= o || h === 0)
|
|
1761
1761
|
return new ArrayBuffer(0);
|
|
1762
|
-
for (var f = new Uint8Array(e), l = new Uint8Array(o -
|
|
1762
|
+
for (var f = new Uint8Array(e), l = new Uint8Array(o - r), d = r, i = 0; o > d; d++, i++)
|
|
1763
1763
|
l[i] = f[d];
|
|
1764
1764
|
return l.buffer;
|
|
1765
1765
|
};
|
|
1766
1766
|
}, {}],
|
|
1767
1767
|
29: [function(a, t, e) {
|
|
1768
|
-
(function(
|
|
1768
|
+
(function(r) {
|
|
1769
1769
|
e.encode = function(o) {
|
|
1770
1770
|
var h, f = new Uint8Array(o), l = f.length, d = "";
|
|
1771
1771
|
for (h = 0; l > h; h += 3)
|
|
1772
|
-
d +=
|
|
1772
|
+
d += r[f[h] >> 2], d += r[(3 & f[h]) << 4 | f[h + 1] >> 4], d += r[(15 & f[h + 1]) << 2 | f[h + 2] >> 6], d += r[63 & f[h + 2]];
|
|
1773
1773
|
return l % 3 === 2 ? d = d.substring(0, d.length - 1) + "=" : l % 3 === 1 && (d = d.substring(0, d.length - 2) + "=="), d;
|
|
1774
1774
|
}, e.decode = function(o) {
|
|
1775
|
-
var h, f, l, d, i,
|
|
1776
|
-
o[o.length - 1] === "=" && (
|
|
1777
|
-
var n = new ArrayBuffer(
|
|
1775
|
+
var h, f, l, d, i, u = 0.75 * o.length, c = o.length, s = 0;
|
|
1776
|
+
o[o.length - 1] === "=" && (u--, o[o.length - 2] === "=" && u--);
|
|
1777
|
+
var n = new ArrayBuffer(u), p = new Uint8Array(n);
|
|
1778
1778
|
for (h = 0; c > h; h += 4)
|
|
1779
|
-
f =
|
|
1779
|
+
f = r.indexOf(o[h]), l = r.indexOf(o[h + 1]), d = r.indexOf(o[h + 2]), i = r.indexOf(o[h + 3]), p[s++] = f << 2 | l >> 4, p[s++] = (15 & l) << 4 | d >> 2, p[s++] = (3 & d) << 6 | 63 & i;
|
|
1780
1780
|
return n;
|
|
1781
1781
|
};
|
|
1782
1782
|
})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
|
|
1783
1783
|
}, {}],
|
|
1784
1784
|
30: [function(a, t) {
|
|
1785
1785
|
(function(e) {
|
|
1786
|
-
function
|
|
1787
|
-
for (var c = 0; c <
|
|
1788
|
-
var
|
|
1789
|
-
if (
|
|
1790
|
-
var n =
|
|
1791
|
-
if (
|
|
1792
|
-
var
|
|
1793
|
-
|
|
1786
|
+
function r(u) {
|
|
1787
|
+
for (var c = 0; c < u.length; c++) {
|
|
1788
|
+
var s = u[c];
|
|
1789
|
+
if (s.buffer instanceof ArrayBuffer) {
|
|
1790
|
+
var n = s.buffer;
|
|
1791
|
+
if (s.byteLength !== n.byteLength) {
|
|
1792
|
+
var p = new Uint8Array(s.byteLength);
|
|
1793
|
+
p.set(new Uint8Array(n, s.byteOffset, s.byteLength)), n = p.buffer;
|
|
1794
1794
|
}
|
|
1795
|
-
|
|
1795
|
+
u[c] = n;
|
|
1796
1796
|
}
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
|
-
function o(
|
|
1799
|
+
function o(u, c) {
|
|
1800
1800
|
c = c || {};
|
|
1801
|
-
var
|
|
1802
|
-
|
|
1803
|
-
for (var n = 0; n <
|
|
1804
|
-
|
|
1805
|
-
return c.type ?
|
|
1801
|
+
var s = new f();
|
|
1802
|
+
r(u);
|
|
1803
|
+
for (var n = 0; n < u.length; n++)
|
|
1804
|
+
s.append(u[n]);
|
|
1805
|
+
return c.type ? s.getBlob(c.type) : s.getBlob();
|
|
1806
1806
|
}
|
|
1807
|
-
function h(
|
|
1808
|
-
return
|
|
1807
|
+
function h(u, c) {
|
|
1808
|
+
return r(u), new Blob(u, c || {});
|
|
1809
1809
|
}
|
|
1810
1810
|
var f = e.BlobBuilder || e.WebKitBlobBuilder || e.MSBlobBuilder || e.MozBlobBuilder, l = function() {
|
|
1811
1811
|
try {
|
|
1812
|
-
var
|
|
1813
|
-
return
|
|
1812
|
+
var u = new Blob(["hi"]);
|
|
1813
|
+
return u.size === 2;
|
|
1814
1814
|
} catch {
|
|
1815
1815
|
return !1;
|
|
1816
1816
|
}
|
|
1817
1817
|
}(), d = l && function() {
|
|
1818
1818
|
try {
|
|
1819
|
-
var
|
|
1820
|
-
return
|
|
1819
|
+
var u = new Blob([new Uint8Array([1, 2])]);
|
|
1820
|
+
return u.size === 2;
|
|
1821
1821
|
} catch {
|
|
1822
1822
|
return !1;
|
|
1823
1823
|
}
|
|
@@ -1828,105 +1828,105 @@ function qe() {
|
|
|
1828
1828
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1829
1829
|
}, {}],
|
|
1830
1830
|
31: [function(a, t, e) {
|
|
1831
|
-
(function(
|
|
1831
|
+
(function(r) {
|
|
1832
1832
|
(function(o) {
|
|
1833
1833
|
function h(v) {
|
|
1834
|
-
for (var m,
|
|
1835
|
-
m = v.charCodeAt(
|
|
1836
|
-
return
|
|
1834
|
+
for (var m, O, B = [], R = 0, S = v.length; S > R; )
|
|
1835
|
+
m = v.charCodeAt(R++), m >= 55296 && 56319 >= m && S > R ? (O = v.charCodeAt(R++), (64512 & O) == 56320 ? B.push(((1023 & m) << 10) + (1023 & O) + 65536) : (B.push(m), R--)) : B.push(m);
|
|
1836
|
+
return B;
|
|
1837
1837
|
}
|
|
1838
1838
|
function f(v) {
|
|
1839
|
-
for (var m,
|
|
1840
|
-
m = v[
|
|
1841
|
-
return
|
|
1839
|
+
for (var m, O = v.length, B = -1, R = ""; ++B < O; )
|
|
1840
|
+
m = v[B], m > 65535 && (m -= 65536, R += V(m >>> 10 & 1023 | 55296), m = 56320 | 1023 & m), R += V(m);
|
|
1841
|
+
return R;
|
|
1842
1842
|
}
|
|
1843
1843
|
function l(v) {
|
|
1844
1844
|
if (v >= 55296 && 57343 >= v)
|
|
1845
1845
|
throw Error("Lone surrogate U+" + v.toString(16).toUpperCase() + " is not a scalar value");
|
|
1846
1846
|
}
|
|
1847
1847
|
function d(v, m) {
|
|
1848
|
-
return
|
|
1848
|
+
return V(v >> m & 63 | 128);
|
|
1849
1849
|
}
|
|
1850
1850
|
function i(v) {
|
|
1851
1851
|
if (!(4294967168 & v))
|
|
1852
|
-
return
|
|
1852
|
+
return V(v);
|
|
1853
1853
|
var m = "";
|
|
1854
|
-
return 4294965248 & v ? 4294901760 & v ? !(4292870144 & v) && (m =
|
|
1854
|
+
return 4294965248 & v ? 4294901760 & v ? !(4292870144 & v) && (m = V(v >> 18 & 7 | 240), m += d(v, 12), m += d(v, 6)) : (l(v), m = V(v >> 12 & 15 | 224), m += d(v, 6)) : m = V(v >> 6 & 31 | 192), m += V(63 & v | 128);
|
|
1855
1855
|
}
|
|
1856
|
-
function
|
|
1857
|
-
for (var m,
|
|
1858
|
-
m =
|
|
1856
|
+
function u(v) {
|
|
1857
|
+
for (var m, O = h(v), B = O.length, R = -1, S = ""; ++R < B; )
|
|
1858
|
+
m = O[R], S += i(m);
|
|
1859
1859
|
return S;
|
|
1860
1860
|
}
|
|
1861
1861
|
function c() {
|
|
1862
|
-
if (
|
|
1862
|
+
if (x >= P)
|
|
1863
1863
|
throw Error("Invalid byte index");
|
|
1864
|
-
var v = 255 & w[
|
|
1865
|
-
if (
|
|
1864
|
+
var v = 255 & w[x];
|
|
1865
|
+
if (x++, (192 & v) == 128)
|
|
1866
1866
|
return 63 & v;
|
|
1867
1867
|
throw Error("Invalid continuation byte");
|
|
1868
1868
|
}
|
|
1869
|
-
function
|
|
1870
|
-
var v, m,
|
|
1871
|
-
if (
|
|
1869
|
+
function s() {
|
|
1870
|
+
var v, m, O, B, R;
|
|
1871
|
+
if (x > P)
|
|
1872
1872
|
throw Error("Invalid byte index");
|
|
1873
|
-
if (
|
|
1873
|
+
if (x == P)
|
|
1874
1874
|
return !1;
|
|
1875
|
-
if (v = 255 & w[
|
|
1875
|
+
if (v = 255 & w[x], x++, (128 & v) == 0)
|
|
1876
1876
|
return v;
|
|
1877
1877
|
if ((224 & v) == 192) {
|
|
1878
1878
|
var m = c();
|
|
1879
|
-
if (
|
|
1880
|
-
return
|
|
1879
|
+
if (R = (31 & v) << 6 | m, R >= 128)
|
|
1880
|
+
return R;
|
|
1881
1881
|
throw Error("Invalid continuation byte");
|
|
1882
1882
|
}
|
|
1883
1883
|
if ((240 & v) == 224) {
|
|
1884
|
-
if (m = c(),
|
|
1885
|
-
return l(
|
|
1884
|
+
if (m = c(), O = c(), R = (15 & v) << 12 | m << 6 | O, R >= 2048)
|
|
1885
|
+
return l(R), R;
|
|
1886
1886
|
throw Error("Invalid continuation byte");
|
|
1887
1887
|
}
|
|
1888
|
-
if ((248 & v) == 240 && (m = c(),
|
|
1889
|
-
return
|
|
1888
|
+
if ((248 & v) == 240 && (m = c(), O = c(), B = c(), R = (15 & v) << 18 | m << 12 | O << 6 | B, R >= 65536 && 1114111 >= R))
|
|
1889
|
+
return R;
|
|
1890
1890
|
throw Error("Invalid UTF-8 detected");
|
|
1891
1891
|
}
|
|
1892
1892
|
function n(v) {
|
|
1893
|
-
w = h(v), P = w.length,
|
|
1894
|
-
for (var m,
|
|
1895
|
-
|
|
1896
|
-
return f(
|
|
1893
|
+
w = h(v), P = w.length, x = 0;
|
|
1894
|
+
for (var m, O = []; (m = s()) !== !1; )
|
|
1895
|
+
O.push(m);
|
|
1896
|
+
return f(O);
|
|
1897
1897
|
}
|
|
1898
|
-
var
|
|
1898
|
+
var p = typeof e == "object" && e, g = typeof t == "object" && t && t.exports == p && t, y = typeof r == "object" && r;
|
|
1899
1899
|
(y.global === y || y.window === y) && (o = y);
|
|
1900
|
-
var w, P,
|
|
1901
|
-
if (
|
|
1900
|
+
var w, P, x, V = String.fromCharCode, I = { version: "2.0.0", encode: u, decode: n };
|
|
1901
|
+
if (p && !p.nodeType)
|
|
1902
1902
|
if (g)
|
|
1903
|
-
g.exports =
|
|
1903
|
+
g.exports = I;
|
|
1904
1904
|
else {
|
|
1905
|
-
var
|
|
1906
|
-
for (var A in
|
|
1907
|
-
b.call(
|
|
1905
|
+
var k = {}, b = k.hasOwnProperty;
|
|
1906
|
+
for (var A in I)
|
|
1907
|
+
b.call(I, A) && (p[A] = I[A]);
|
|
1908
1908
|
}
|
|
1909
1909
|
else
|
|
1910
|
-
o.utf8 =
|
|
1910
|
+
o.utf8 = I;
|
|
1911
1911
|
})(this);
|
|
1912
1912
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1913
1913
|
}, {}],
|
|
1914
1914
|
32: [function(a, t) {
|
|
1915
1915
|
(function(e) {
|
|
1916
|
-
var
|
|
1916
|
+
var r = /^[\],:{}\s]*$/, o = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, h = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, f = /(?:^|:|,)(?:\s*\[)+/g, l = /^\s+/, d = /\s+$/;
|
|
1917
1917
|
t.exports = function(i) {
|
|
1918
|
-
return typeof i == "string" && i ? (i = i.replace(l, "").replace(d, ""), e.JSON && JSON.parse ? JSON.parse(i) :
|
|
1918
|
+
return typeof i == "string" && i ? (i = i.replace(l, "").replace(d, ""), e.JSON && JSON.parse ? JSON.parse(i) : r.test(i.replace(o, "@").replace(h, "]").replace(f, "")) ? new Function("return " + i)() : void 0) : null;
|
|
1919
1919
|
};
|
|
1920
1920
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1921
1921
|
}, {}],
|
|
1922
1922
|
33: [function(a, t, e) {
|
|
1923
|
-
e.encode = function(
|
|
1923
|
+
e.encode = function(r) {
|
|
1924
1924
|
var o = "";
|
|
1925
|
-
for (var h in
|
|
1926
|
-
|
|
1925
|
+
for (var h in r)
|
|
1926
|
+
r.hasOwnProperty(h) && (o.length && (o += "&"), o += encodeURIComponent(h) + "=" + encodeURIComponent(r[h]));
|
|
1927
1927
|
return o;
|
|
1928
|
-
}, e.decode = function(
|
|
1929
|
-
for (var o = {}, h =
|
|
1928
|
+
}, e.decode = function(r) {
|
|
1929
|
+
for (var o = {}, h = r.split("&"), f = 0, l = h.length; l > f; f++) {
|
|
1930
1930
|
var d = h[f].split("=");
|
|
1931
1931
|
o[decodeURIComponent(d[0])] = decodeURIComponent(d[1]);
|
|
1932
1932
|
}
|
|
@@ -1934,12 +1934,12 @@ function qe() {
|
|
|
1934
1934
|
};
|
|
1935
1935
|
}, {}],
|
|
1936
1936
|
34: [function(a, t) {
|
|
1937
|
-
var e = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,
|
|
1937
|
+
var e = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, r = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"];
|
|
1938
1938
|
t.exports = function(o) {
|
|
1939
1939
|
var h = o, f = o.indexOf("["), l = o.indexOf("]");
|
|
1940
1940
|
f != -1 && l != -1 && (o = o.substring(0, f) + o.substring(f, l).replace(/:/g, ";") + o.substring(l, o.length));
|
|
1941
|
-
for (var d = e.exec(o || ""), i = {},
|
|
1942
|
-
i[
|
|
1941
|
+
for (var d = e.exec(o || ""), i = {}, u = 14; u--; )
|
|
1942
|
+
i[r[u]] = d[u] || "";
|
|
1943
1943
|
return f != -1 && l != -1 && (i.source = h, i.host = i.host.substring(1, i.host.length - 1).replace(/;/g, ":"), i.authority = i.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), i.ipv6uri = !0), i;
|
|
1944
1944
|
};
|
|
1945
1945
|
}, {}],
|
|
@@ -1947,14 +1947,14 @@ function qe() {
|
|
|
1947
1947
|
function e(h, f) {
|
|
1948
1948
|
return f ? new o(h, f) : new o(h);
|
|
1949
1949
|
}
|
|
1950
|
-
var
|
|
1950
|
+
var r = /* @__PURE__ */ function() {
|
|
1951
1951
|
return self;
|
|
1952
|
-
}(), o =
|
|
1952
|
+
}(), o = r.WebSocket || r.MozWebSocket;
|
|
1953
1953
|
t.exports = o ? e : null, o && (e.prototype = o.prototype);
|
|
1954
1954
|
}, {}],
|
|
1955
1955
|
36: [function(a, t) {
|
|
1956
1956
|
(function(e) {
|
|
1957
|
-
function
|
|
1957
|
+
function r(h) {
|
|
1958
1958
|
function f(l) {
|
|
1959
1959
|
if (!l)
|
|
1960
1960
|
return !1;
|
|
@@ -1975,7 +1975,7 @@ function qe() {
|
|
|
1975
1975
|
return f(h);
|
|
1976
1976
|
}
|
|
1977
1977
|
var o = a("isarray");
|
|
1978
|
-
t.exports =
|
|
1978
|
+
t.exports = r;
|
|
1979
1979
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1980
1980
|
}, { isarray: 37 }],
|
|
1981
1981
|
37: [function(a, t) {
|
|
@@ -1998,30 +1998,30 @@ function qe() {
|
|
|
1998
1998
|
}, {}],
|
|
1999
1999
|
40: [function(a, t) {
|
|
2000
2000
|
var e = [].indexOf;
|
|
2001
|
-
t.exports = function(
|
|
2001
|
+
t.exports = function(r, o) {
|
|
2002
2002
|
if (e)
|
|
2003
|
-
return
|
|
2004
|
-
for (var h = 0; h <
|
|
2005
|
-
if (
|
|
2003
|
+
return r.indexOf(o);
|
|
2004
|
+
for (var h = 0; h < r.length; ++h)
|
|
2005
|
+
if (r[h] === o)
|
|
2006
2006
|
return h;
|
|
2007
2007
|
return -1;
|
|
2008
2008
|
};
|
|
2009
2009
|
}, {}],
|
|
2010
2010
|
41: [function(a, t, e) {
|
|
2011
|
-
var
|
|
2011
|
+
var r = Object.prototype.hasOwnProperty;
|
|
2012
2012
|
e.keys = Object.keys || function(o) {
|
|
2013
2013
|
var h = [];
|
|
2014
2014
|
for (var f in o)
|
|
2015
|
-
|
|
2015
|
+
r.call(o, f) && h.push(f);
|
|
2016
2016
|
return h;
|
|
2017
2017
|
}, e.values = function(o) {
|
|
2018
2018
|
var h = [];
|
|
2019
2019
|
for (var f in o)
|
|
2020
|
-
|
|
2020
|
+
r.call(o, f) && h.push(o[f]);
|
|
2021
2021
|
return h;
|
|
2022
2022
|
}, e.merge = function(o, h) {
|
|
2023
2023
|
for (var f in h)
|
|
2024
|
-
|
|
2024
|
+
r.call(h, f) && (o[f] = h[f]);
|
|
2025
2025
|
return o;
|
|
2026
2026
|
}, e.length = function(o) {
|
|
2027
2027
|
return e.keys(o).length;
|
|
@@ -2030,27 +2030,27 @@ function qe() {
|
|
|
2030
2030
|
};
|
|
2031
2031
|
}, {}],
|
|
2032
2032
|
42: [function(a, t) {
|
|
2033
|
-
var e = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,
|
|
2033
|
+
var e = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, r = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"];
|
|
2034
2034
|
t.exports = function(o) {
|
|
2035
2035
|
for (var h = e.exec(o || ""), f = {}, l = 14; l--; )
|
|
2036
|
-
f[
|
|
2036
|
+
f[r[l]] = h[l] || "";
|
|
2037
2037
|
return f;
|
|
2038
2038
|
};
|
|
2039
2039
|
}, {}],
|
|
2040
2040
|
43: [function(a, t, e) {
|
|
2041
|
-
(function(
|
|
2041
|
+
(function(r) {
|
|
2042
2042
|
var o = a("isarray"), h = a("./is-buffer");
|
|
2043
2043
|
e.deconstructPacket = function(f) {
|
|
2044
2044
|
function l(c) {
|
|
2045
2045
|
if (!c)
|
|
2046
2046
|
return c;
|
|
2047
2047
|
if (h(c)) {
|
|
2048
|
-
var
|
|
2049
|
-
return d.push(c),
|
|
2048
|
+
var s = { _placeholder: !0, num: d.length };
|
|
2049
|
+
return d.push(c), s;
|
|
2050
2050
|
}
|
|
2051
2051
|
if (o(c)) {
|
|
2052
|
-
for (var n = new Array(c.length),
|
|
2053
|
-
n[
|
|
2052
|
+
for (var n = new Array(c.length), p = 0; p < c.length; p++)
|
|
2053
|
+
n[p] = l(c[p]);
|
|
2054
2054
|
return n;
|
|
2055
2055
|
}
|
|
2056
2056
|
if (typeof c == "object" && !(c instanceof Date)) {
|
|
@@ -2061,13 +2061,13 @@ function qe() {
|
|
|
2061
2061
|
}
|
|
2062
2062
|
return c;
|
|
2063
2063
|
}
|
|
2064
|
-
var d = [], i = f.data,
|
|
2065
|
-
return
|
|
2064
|
+
var d = [], i = f.data, u = f;
|
|
2065
|
+
return u.data = l(i), u.attachments = d.length, { packet: u, buffers: d };
|
|
2066
2066
|
}, e.reconstructPacket = function(f, l) {
|
|
2067
2067
|
function d(i) {
|
|
2068
2068
|
if (i && i._placeholder) {
|
|
2069
|
-
var
|
|
2070
|
-
return
|
|
2069
|
+
var u = l[i.num];
|
|
2070
|
+
return u;
|
|
2071
2071
|
}
|
|
2072
2072
|
if (o(i)) {
|
|
2073
2073
|
for (var c = 0; c < i.length; c++)
|
|
@@ -2075,23 +2075,23 @@ function qe() {
|
|
|
2075
2075
|
return i;
|
|
2076
2076
|
}
|
|
2077
2077
|
if (i && typeof i == "object") {
|
|
2078
|
-
for (var
|
|
2079
|
-
i[
|
|
2078
|
+
for (var s in i)
|
|
2079
|
+
i[s] = d(i[s]);
|
|
2080
2080
|
return i;
|
|
2081
2081
|
}
|
|
2082
2082
|
return i;
|
|
2083
2083
|
}
|
|
2084
2084
|
return f.data = d(f.data), f.attachments = void 0, f;
|
|
2085
2085
|
}, e.removeBlobs = function(f, l) {
|
|
2086
|
-
function d(c,
|
|
2086
|
+
function d(c, s, n) {
|
|
2087
2087
|
if (!c)
|
|
2088
2088
|
return c;
|
|
2089
|
-
if (
|
|
2089
|
+
if (r.Blob && c instanceof Blob || r.File && c instanceof File) {
|
|
2090
2090
|
i++;
|
|
2091
|
-
var
|
|
2092
|
-
|
|
2093
|
-
n ? n[
|
|
2094
|
-
},
|
|
2091
|
+
var p = new FileReader();
|
|
2092
|
+
p.onload = function() {
|
|
2093
|
+
n ? n[s] = this.result : u = this.result, --i || l(u);
|
|
2094
|
+
}, p.readAsArrayBuffer(c);
|
|
2095
2095
|
} else if (o(c))
|
|
2096
2096
|
for (var g = 0; g < c.length; g++)
|
|
2097
2097
|
d(c[g], g, c);
|
|
@@ -2099,22 +2099,22 @@ function qe() {
|
|
|
2099
2099
|
for (var y in c)
|
|
2100
2100
|
d(c[y], y, c);
|
|
2101
2101
|
}
|
|
2102
|
-
var i = 0,
|
|
2103
|
-
d(
|
|
2102
|
+
var i = 0, u = f;
|
|
2103
|
+
d(u), i || l(u);
|
|
2104
2104
|
};
|
|
2105
2105
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2106
2106
|
}, { "./is-buffer": 45, isarray: 46 }],
|
|
2107
2107
|
44: [function(a, t, e) {
|
|
2108
|
-
function
|
|
2108
|
+
function r() {
|
|
2109
2109
|
}
|
|
2110
2110
|
function o(g) {
|
|
2111
2111
|
var y = "", w = !1;
|
|
2112
|
-
return y += g.type, (e.BINARY_EVENT == g.type || e.BINARY_ACK == g.type) && (y += g.attachments, y += "-"), g.nsp && g.nsp != "/" && (w = !0, y += g.nsp), g.id != null && (w && (y += ",", w = !1), y += g.id), g.data != null && (w && (y += ","), y += c.stringify(g.data)),
|
|
2112
|
+
return y += g.type, (e.BINARY_EVENT == g.type || e.BINARY_ACK == g.type) && (y += g.attachments, y += "-"), g.nsp && g.nsp != "/" && (w = !0, y += g.nsp), g.id != null && (w && (y += ",", w = !1), y += g.id), g.data != null && (w && (y += ","), y += c.stringify(g.data)), u("encoded %j as %s", g, y), y;
|
|
2113
2113
|
}
|
|
2114
2114
|
function h(g, y) {
|
|
2115
2115
|
function w(P) {
|
|
2116
|
-
var
|
|
2117
|
-
|
|
2116
|
+
var x = n.deconstructPacket(P), V = o(x.packet), I = x.buffers;
|
|
2117
|
+
I.unshift(V), y(I);
|
|
2118
2118
|
}
|
|
2119
2119
|
n.removeBlobs(g, w);
|
|
2120
2120
|
}
|
|
@@ -2134,17 +2134,17 @@ function qe() {
|
|
|
2134
2134
|
}
|
|
2135
2135
|
if (g.charAt(w + 1) == "/")
|
|
2136
2136
|
for (y.nsp = ""; ++w; ) {
|
|
2137
|
-
var
|
|
2138
|
-
if (
|
|
2137
|
+
var x = g.charAt(w);
|
|
2138
|
+
if (x == "," || (y.nsp += x, w == g.length))
|
|
2139
2139
|
break;
|
|
2140
2140
|
}
|
|
2141
2141
|
else
|
|
2142
2142
|
y.nsp = "/";
|
|
2143
|
-
var
|
|
2144
|
-
if (
|
|
2143
|
+
var V = g.charAt(w + 1);
|
|
2144
|
+
if (V !== "" && Number(V) == V) {
|
|
2145
2145
|
for (y.id = ""; ++w; ) {
|
|
2146
|
-
var
|
|
2147
|
-
if (
|
|
2146
|
+
var x = g.charAt(w);
|
|
2147
|
+
if (x == null || Number(x) != x) {
|
|
2148
2148
|
--w;
|
|
2149
2149
|
break;
|
|
2150
2150
|
}
|
|
@@ -2159,7 +2159,7 @@ function qe() {
|
|
|
2159
2159
|
} catch {
|
|
2160
2160
|
return i();
|
|
2161
2161
|
}
|
|
2162
|
-
return
|
|
2162
|
+
return u("decoded %s as %j", g, y), y;
|
|
2163
2163
|
}
|
|
2164
2164
|
function d(g) {
|
|
2165
2165
|
this.reconPack = g, this.buffers = [];
|
|
@@ -2167,20 +2167,20 @@ function qe() {
|
|
|
2167
2167
|
function i() {
|
|
2168
2168
|
return { type: e.ERROR, data: "parser error" };
|
|
2169
2169
|
}
|
|
2170
|
-
var
|
|
2171
|
-
e.protocol = 4, e.types = ["CONNECT", "DISCONNECT", "EVENT", "BINARY_EVENT", "ACK", "BINARY_ACK", "ERROR"], e.CONNECT = 0, e.DISCONNECT = 1, e.EVENT = 2, e.ACK = 3, e.ERROR = 4, e.BINARY_EVENT = 5, e.BINARY_ACK = 6, e.Encoder =
|
|
2172
|
-
if (
|
|
2170
|
+
var u = a("debug")("socket.io-parser"), c = a("json3"), s = (a("isarray"), a("component-emitter")), n = a("./binary"), p = a("./is-buffer");
|
|
2171
|
+
e.protocol = 4, e.types = ["CONNECT", "DISCONNECT", "EVENT", "BINARY_EVENT", "ACK", "BINARY_ACK", "ERROR"], e.CONNECT = 0, e.DISCONNECT = 1, e.EVENT = 2, e.ACK = 3, e.ERROR = 4, e.BINARY_EVENT = 5, e.BINARY_ACK = 6, e.Encoder = r, e.Decoder = f, r.prototype.encode = function(g, y) {
|
|
2172
|
+
if (u("encoding packet %j", g), e.BINARY_EVENT == g.type || e.BINARY_ACK == g.type)
|
|
2173
2173
|
h(g, y);
|
|
2174
2174
|
else {
|
|
2175
2175
|
var w = o(g);
|
|
2176
2176
|
y([w]);
|
|
2177
2177
|
}
|
|
2178
|
-
},
|
|
2178
|
+
}, s(f.prototype), f.prototype.add = function(g) {
|
|
2179
2179
|
var y;
|
|
2180
2180
|
if (typeof g == "string")
|
|
2181
2181
|
y = l(g), e.BINARY_EVENT == y.type || e.BINARY_ACK == y.type ? (this.reconstructor = new d(y), this.reconstructor.reconPack.attachments === 0 && this.emit("decoded", y)) : this.emit("decoded", y);
|
|
2182
2182
|
else {
|
|
2183
|
-
if (!
|
|
2183
|
+
if (!p(g) && !g.base64)
|
|
2184
2184
|
throw new Error("Unknown type: " + g);
|
|
2185
2185
|
if (!this.reconstructor)
|
|
2186
2186
|
throw new Error("got binary data when not reconstructing a packet");
|
|
@@ -2200,47 +2200,47 @@ function qe() {
|
|
|
2200
2200
|
}, { "./binary": 43, "./is-buffer": 45, "component-emitter": 9, debug: 10, isarray: 46, json3: 47 }],
|
|
2201
2201
|
45: [function(a, t) {
|
|
2202
2202
|
(function(e) {
|
|
2203
|
-
function
|
|
2203
|
+
function r(o) {
|
|
2204
2204
|
return e.Buffer && e.Buffer.isBuffer(o) || e.ArrayBuffer && o instanceof ArrayBuffer;
|
|
2205
2205
|
}
|
|
2206
|
-
t.exports =
|
|
2206
|
+
t.exports = r;
|
|
2207
2207
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2208
2208
|
}, {}],
|
|
2209
2209
|
46: [function(a, t) {
|
|
2210
2210
|
t.exports = a(37);
|
|
2211
2211
|
}, {}],
|
|
2212
2212
|
47: [function(a, t, e) {
|
|
2213
|
-
(function(
|
|
2213
|
+
(function(r) {
|
|
2214
2214
|
function o(E) {
|
|
2215
2215
|
if (o[E] !== l)
|
|
2216
2216
|
return o[E];
|
|
2217
|
-
var
|
|
2217
|
+
var _;
|
|
2218
2218
|
if (E == "bug-string-char-index")
|
|
2219
|
-
|
|
2219
|
+
_ = !1;
|
|
2220
2220
|
else if (E == "json")
|
|
2221
|
-
|
|
2221
|
+
_ = o("json-stringify") && o("json-parse");
|
|
2222
2222
|
else {
|
|
2223
2223
|
var T, j = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
|
|
2224
2224
|
if (E == "json-stringify") {
|
|
2225
|
-
var
|
|
2226
|
-
if (
|
|
2225
|
+
var C = u.stringify, U = typeof C == "function" && c;
|
|
2226
|
+
if (U) {
|
|
2227
2227
|
(T = function() {
|
|
2228
2228
|
return 1;
|
|
2229
2229
|
}).toJSON = T;
|
|
2230
2230
|
try {
|
|
2231
|
-
|
|
2232
|
-
\f\r `] }) == j &&
|
|
2231
|
+
U = C(0) === "0" && C(new Number()) === "0" && C(new String()) == '""' && C(d) === l && C(l) === l && C() === l && C(T) === "1" && C([T]) == "[1]" && C([l]) == "[null]" && C(null) == "null" && C([l, d, null]) == "[null,null,null]" && C({ a: [T, !0, !1, null, `\0\b
|
|
2232
|
+
\f\r `] }) == j && C(null, T) === "1" && C([1, 2], null, 1) == `[
|
|
2233
2233
|
1,
|
|
2234
2234
|
2
|
|
2235
|
-
]` &&
|
|
2235
|
+
]` && C(/* @__PURE__ */ new Date(-864e13)) == '"-271821-04-20T00:00:00.000Z"' && C(/* @__PURE__ */ new Date(864e13)) == '"+275760-09-13T00:00:00.000Z"' && C(/* @__PURE__ */ new Date(-621987552e5)) == '"-000001-01-01T00:00:00.000Z"' && C(/* @__PURE__ */ new Date(-1)) == '"1969-12-31T23:59:59.999Z"';
|
|
2236
2236
|
} catch {
|
|
2237
|
-
|
|
2237
|
+
U = !1;
|
|
2238
2238
|
}
|
|
2239
2239
|
}
|
|
2240
|
-
|
|
2240
|
+
_ = U;
|
|
2241
2241
|
}
|
|
2242
2242
|
if (E == "json-parse") {
|
|
2243
|
-
var D =
|
|
2243
|
+
var D = u.parse;
|
|
2244
2244
|
if (typeof D == "function")
|
|
2245
2245
|
try {
|
|
2246
2246
|
if (D("0") === 0 && !D(!1)) {
|
|
@@ -2266,67 +2266,67 @@ function qe() {
|
|
|
2266
2266
|
} catch {
|
|
2267
2267
|
N = !1;
|
|
2268
2268
|
}
|
|
2269
|
-
|
|
2269
|
+
_ = N;
|
|
2270
2270
|
}
|
|
2271
2271
|
}
|
|
2272
|
-
return o[E] = !!
|
|
2272
|
+
return o[E] = !!_;
|
|
2273
2273
|
}
|
|
2274
|
-
var h, f, l, d = {}.toString, i = typeof JSON == "object" && JSON,
|
|
2275
|
-
|
|
2274
|
+
var h, f, l, d = {}.toString, i = typeof JSON == "object" && JSON, u = typeof e == "object" && e && !e.nodeType && e;
|
|
2275
|
+
u && i ? (u.stringify = i.stringify, u.parse = i.parse) : u = r.JSON = i || {};
|
|
2276
2276
|
var c = /* @__PURE__ */ new Date(-3509827334573292);
|
|
2277
2277
|
try {
|
|
2278
2278
|
c = c.getUTCFullYear() == -109252 && c.getUTCMonth() === 0 && c.getUTCDate() === 1 && c.getUTCHours() == 10 && c.getUTCMinutes() == 37 && c.getUTCSeconds() == 6 && c.getUTCMilliseconds() == 708;
|
|
2279
2279
|
} catch {
|
|
2280
2280
|
}
|
|
2281
2281
|
if (!o("json")) {
|
|
2282
|
-
var
|
|
2282
|
+
var s = "[object Function]", n = "[object Date]", p = "[object Number]", g = "[object String]", y = "[object Array]", w = "[object Boolean]", P = o("bug-string-char-index");
|
|
2283
2283
|
if (!c)
|
|
2284
|
-
var
|
|
2285
|
-
return
|
|
2284
|
+
var x = Math.floor, V = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], I = function(E, _) {
|
|
2285
|
+
return V[_] + 365 * (E - 1970) + x((E - 1969 + (_ = +(_ > 1))) / 4) - x((E - 1901 + _) / 100) + x((E - 1601 + _) / 400);
|
|
2286
2286
|
};
|
|
2287
2287
|
(h = {}.hasOwnProperty) || (h = function(E) {
|
|
2288
|
-
var
|
|
2288
|
+
var _, T = {};
|
|
2289
2289
|
return (T.__proto__ = null, T.__proto__ = { toString: 1 }, T).toString != d ? h = function(j) {
|
|
2290
|
-
var
|
|
2291
|
-
return this.__proto__ =
|
|
2292
|
-
} : (
|
|
2293
|
-
var
|
|
2294
|
-
return j in this && !(j in
|
|
2290
|
+
var C = this.__proto__, U = j in (this.__proto__ = null, this);
|
|
2291
|
+
return this.__proto__ = C, U;
|
|
2292
|
+
} : (_ = T.constructor, h = function(j) {
|
|
2293
|
+
var C = (this.constructor || _).prototype;
|
|
2294
|
+
return j in this && !(j in C && this[j] === C[j]);
|
|
2295
2295
|
}), T = null, h.call(this, E);
|
|
2296
2296
|
});
|
|
2297
|
-
var
|
|
2298
|
-
var T = typeof E[
|
|
2299
|
-
return T == "object" ? !!E[
|
|
2297
|
+
var k = { boolean: 1, number: 1, string: 1, undefined: 1 }, b = function(E, _) {
|
|
2298
|
+
var T = typeof E[_];
|
|
2299
|
+
return T == "object" ? !!E[_] : !k[T];
|
|
2300
2300
|
};
|
|
2301
|
-
if (f = function(E,
|
|
2302
|
-
var T, j,
|
|
2301
|
+
if (f = function(E, _) {
|
|
2302
|
+
var T, j, C, U = 0;
|
|
2303
2303
|
(T = function() {
|
|
2304
2304
|
this.valueOf = 0;
|
|
2305
2305
|
}).prototype.valueOf = 0, j = new T();
|
|
2306
|
-
for (
|
|
2307
|
-
h.call(j,
|
|
2308
|
-
return T = j = null,
|
|
2309
|
-
var F, $ = {}, W = d.call(D) ==
|
|
2306
|
+
for (C in j)
|
|
2307
|
+
h.call(j, C) && U++;
|
|
2308
|
+
return T = j = null, U ? f = U == 2 ? function(D, N) {
|
|
2309
|
+
var F, $ = {}, W = d.call(D) == s;
|
|
2310
2310
|
for (F in D)
|
|
2311
2311
|
W && F == "prototype" || h.call($, F) || !($[F] = 1) || !h.call(D, F) || N(F);
|
|
2312
2312
|
} : function(D, N) {
|
|
2313
|
-
var F, $, W = d.call(D) ==
|
|
2313
|
+
var F, $, W = d.call(D) == s;
|
|
2314
2314
|
for (F in D)
|
|
2315
2315
|
W && F == "prototype" || !h.call(D, F) || ($ = F === "constructor") || N(F);
|
|
2316
2316
|
($ || h.call(D, F = "constructor")) && N(F);
|
|
2317
2317
|
} : (j = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"], f = function(D, N) {
|
|
2318
|
-
var F, $, W = d.call(D) ==
|
|
2318
|
+
var F, $, W = d.call(D) == s, H = !W && typeof D.constructor != "function" && b(D, "hasOwnProperty") ? D.hasOwnProperty : h;
|
|
2319
2319
|
for (F in D)
|
|
2320
2320
|
W && F == "prototype" || !H.call(D, F) || N(F);
|
|
2321
2321
|
for ($ = j.length; F = j[--$]; H.call(D, F) && N(F))
|
|
2322
2322
|
;
|
|
2323
|
-
}), f(E,
|
|
2323
|
+
}), f(E, _);
|
|
2324
2324
|
}, !o("json-stringify")) {
|
|
2325
|
-
var A = { 92: "\\\\", 34: '\\"', 8: "\\b", 12: "\\f", 10: "\\n", 13: "\\r", 9: "\\t" }, v = "000000", m = function(E,
|
|
2326
|
-
return (v + (
|
|
2327
|
-
},
|
|
2328
|
-
var
|
|
2329
|
-
for (
|
|
2325
|
+
var A = { 92: "\\\\", 34: '\\"', 8: "\\b", 12: "\\f", 10: "\\n", 13: "\\r", 9: "\\t" }, v = "000000", m = function(E, _) {
|
|
2326
|
+
return (v + (_ || 0)).slice(-E);
|
|
2327
|
+
}, O = "\\u00", B = function(E) {
|
|
2328
|
+
var _, T = '"', j = 0, C = E.length, U = C > 10 && P;
|
|
2329
|
+
for (U && (_ = E.split("")); C > j; j++) {
|
|
2330
2330
|
var D = E.charCodeAt(j);
|
|
2331
2331
|
switch (D) {
|
|
2332
2332
|
case 8:
|
|
@@ -2340,92 +2340,92 @@ function qe() {
|
|
|
2340
2340
|
break;
|
|
2341
2341
|
default:
|
|
2342
2342
|
if (32 > D) {
|
|
2343
|
-
T +=
|
|
2343
|
+
T += O + m(2, D.toString(16));
|
|
2344
2344
|
break;
|
|
2345
2345
|
}
|
|
2346
|
-
T +=
|
|
2346
|
+
T += U ? _[j] : P ? E.charAt(j) : E[j];
|
|
2347
2347
|
}
|
|
2348
2348
|
}
|
|
2349
2349
|
return T + '"';
|
|
2350
|
-
},
|
|
2351
|
-
var N, F, $, W, H, oe, he,
|
|
2350
|
+
}, R = function(E, _, T, j, C, U, D) {
|
|
2351
|
+
var N, F, $, W, H, oe, he, ue, pe, fe, ee, de, ce, ie, ge, ye;
|
|
2352
2352
|
try {
|
|
2353
|
-
N =
|
|
2353
|
+
N = _[E];
|
|
2354
2354
|
} catch {
|
|
2355
2355
|
}
|
|
2356
2356
|
if (typeof N == "object" && N)
|
|
2357
2357
|
if (F = d.call(N), F != n || h.call(N, "toJSON"))
|
|
2358
|
-
typeof N.toJSON == "function" && (F !=
|
|
2358
|
+
typeof N.toJSON == "function" && (F != p && F != g && F != y || h.call(N, "toJSON")) && (N = N.toJSON(E));
|
|
2359
2359
|
else if (N > -1 / 0 && 1 / 0 > N) {
|
|
2360
|
-
if (
|
|
2361
|
-
for (H =
|
|
2360
|
+
if (I) {
|
|
2361
|
+
for (H = x(N / 864e5), $ = x(H / 365.2425) + 1970 - 1; I($ + 1, 0) <= H; $++)
|
|
2362
2362
|
;
|
|
2363
|
-
for (W =
|
|
2363
|
+
for (W = x((H - I($, 0)) / 30.42); I($, W + 1) <= H; W++)
|
|
2364
2364
|
;
|
|
2365
|
-
H = 1 + H -
|
|
2365
|
+
H = 1 + H - I($, W), oe = (N % 864e5 + 864e5) % 864e5, he = x(oe / 36e5) % 24, ue = x(oe / 6e4) % 60, pe = x(oe / 1e3) % 60, fe = oe % 1e3;
|
|
2366
2366
|
} else
|
|
2367
|
-
$ = N.getUTCFullYear(), W = N.getUTCMonth(), H = N.getUTCDate(), he = N.getUTCHours(),
|
|
2368
|
-
N = (0 >= $ || $ >= 1e4 ? (0 > $ ? "-" : "+") + m(6, 0 > $ ? -$ : $) : m(4, $)) + "-" + m(2, W + 1) + "-" + m(2, H) + "T" + m(2, he) + ":" + m(2,
|
|
2367
|
+
$ = N.getUTCFullYear(), W = N.getUTCMonth(), H = N.getUTCDate(), he = N.getUTCHours(), ue = N.getUTCMinutes(), pe = N.getUTCSeconds(), fe = N.getUTCMilliseconds();
|
|
2368
|
+
N = (0 >= $ || $ >= 1e4 ? (0 > $ ? "-" : "+") + m(6, 0 > $ ? -$ : $) : m(4, $)) + "-" + m(2, W + 1) + "-" + m(2, H) + "T" + m(2, he) + ":" + m(2, ue) + ":" + m(2, pe) + "." + m(3, fe) + "Z";
|
|
2369
2369
|
} else
|
|
2370
2370
|
N = null;
|
|
2371
|
-
if (T && (N = T.call(
|
|
2371
|
+
if (T && (N = T.call(_, E, N)), N === null)
|
|
2372
2372
|
return "null";
|
|
2373
2373
|
if (F = d.call(N), F == w)
|
|
2374
2374
|
return "" + N;
|
|
2375
|
-
if (F ==
|
|
2375
|
+
if (F == p)
|
|
2376
2376
|
return N > -1 / 0 && 1 / 0 > N ? "" + N : "null";
|
|
2377
2377
|
if (F == g)
|
|
2378
|
-
return
|
|
2378
|
+
return B("" + N);
|
|
2379
2379
|
if (typeof N == "object") {
|
|
2380
2380
|
for (ie = D.length; ie--; )
|
|
2381
2381
|
if (D[ie] === N)
|
|
2382
2382
|
throw TypeError();
|
|
2383
|
-
if (D.push(N), ee = [], ge =
|
|
2383
|
+
if (D.push(N), ee = [], ge = U, U += C, F == y) {
|
|
2384
2384
|
for (ce = 0, ie = N.length; ie > ce; ce++)
|
|
2385
|
-
de =
|
|
2386
|
-
ye = ee.length ?
|
|
2387
|
-
` +
|
|
2388
|
-
` +
|
|
2385
|
+
de = R(ce, N, T, j, C, U, D), ee.push(de === l ? "null" : de);
|
|
2386
|
+
ye = ee.length ? C ? `[
|
|
2387
|
+
` + U + ee.join(`,
|
|
2388
|
+
` + U) + `
|
|
2389
2389
|
` + ge + "]" : "[" + ee.join(",") + "]" : "[]";
|
|
2390
2390
|
} else
|
|
2391
2391
|
f(j || N, function(ve) {
|
|
2392
|
-
var Ee =
|
|
2393
|
-
Ee !== l && ee.push(
|
|
2394
|
-
}), ye = ee.length ?
|
|
2395
|
-
` +
|
|
2396
|
-
` +
|
|
2392
|
+
var Ee = R(ve, N, T, j, C, U, D);
|
|
2393
|
+
Ee !== l && ee.push(B(ve) + ":" + (C ? " " : "") + Ee);
|
|
2394
|
+
}), ye = ee.length ? C ? `{
|
|
2395
|
+
` + U + ee.join(`,
|
|
2396
|
+
` + U) + `
|
|
2397
2397
|
` + ge + "}" : "{" + ee.join(",") + "}" : "{}";
|
|
2398
2398
|
return D.pop(), ye;
|
|
2399
2399
|
}
|
|
2400
2400
|
};
|
|
2401
|
-
|
|
2402
|
-
var j,
|
|
2403
|
-
if (typeof
|
|
2404
|
-
if ((D = d.call(
|
|
2405
|
-
|
|
2401
|
+
u.stringify = function(E, _, T) {
|
|
2402
|
+
var j, C, U, D;
|
|
2403
|
+
if (typeof _ == "function" || typeof _ == "object" && _) {
|
|
2404
|
+
if ((D = d.call(_)) == s)
|
|
2405
|
+
C = _;
|
|
2406
2406
|
else if (D == y) {
|
|
2407
|
-
|
|
2408
|
-
for (var N, F = 0, $ =
|
|
2407
|
+
U = {};
|
|
2408
|
+
for (var N, F = 0, $ = _.length; $ > F; N = _[F++], D = d.call(N), (D == g || D == p) && (U[N] = 1))
|
|
2409
2409
|
;
|
|
2410
2410
|
}
|
|
2411
2411
|
}
|
|
2412
2412
|
if (T)
|
|
2413
|
-
if ((D = d.call(T)) ==
|
|
2413
|
+
if ((D = d.call(T)) == p) {
|
|
2414
2414
|
if ((T -= T % 1) > 0)
|
|
2415
2415
|
for (j = "", T > 10 && (T = 10); j.length < T; j += " ")
|
|
2416
2416
|
;
|
|
2417
2417
|
} else
|
|
2418
2418
|
D == g && (j = T.length <= 10 ? T : T.slice(0, 10));
|
|
2419
|
-
return
|
|
2419
|
+
return R("", (N = {}, N[""] = E, N), C, U, j, "", []);
|
|
2420
2420
|
};
|
|
2421
2421
|
}
|
|
2422
2422
|
if (!o("json-parse")) {
|
|
2423
2423
|
var S, X, K = String.fromCharCode, G = { 92: "\\", 34: '"', 47: "/", 98: "\b", 116: " ", 110: `
|
|
2424
|
-
`, 102: "\f", 114: "\r" },
|
|
2424
|
+
`, 102: "\f", 114: "\r" }, M = function() {
|
|
2425
2425
|
throw S = X = null, SyntaxError();
|
|
2426
2426
|
}, J = function() {
|
|
2427
|
-
for (var E,
|
|
2428
|
-
switch (
|
|
2427
|
+
for (var E, _, T, j, C, U = X, D = U.length; D > S; )
|
|
2428
|
+
switch (C = U.charCodeAt(S)) {
|
|
2429
2429
|
case 9:
|
|
2430
2430
|
case 10:
|
|
2431
2431
|
case 13:
|
|
@@ -2438,13 +2438,13 @@ function qe() {
|
|
|
2438
2438
|
case 93:
|
|
2439
2439
|
case 58:
|
|
2440
2440
|
case 44:
|
|
2441
|
-
return E = P ?
|
|
2441
|
+
return E = P ? U.charAt(S) : U[S], S++, E;
|
|
2442
2442
|
case 34:
|
|
2443
2443
|
for (E = "@", S++; D > S; )
|
|
2444
|
-
if (
|
|
2445
|
-
|
|
2446
|
-
else if (
|
|
2447
|
-
switch (
|
|
2444
|
+
if (C = U.charCodeAt(S), 32 > C)
|
|
2445
|
+
M();
|
|
2446
|
+
else if (C == 92)
|
|
2447
|
+
switch (C = U.charCodeAt(++S)) {
|
|
2448
2448
|
case 92:
|
|
2449
2449
|
case 34:
|
|
2450
2450
|
case 47:
|
|
@@ -2453,98 +2453,98 @@ function qe() {
|
|
|
2453
2453
|
case 110:
|
|
2454
2454
|
case 102:
|
|
2455
2455
|
case 114:
|
|
2456
|
-
E += G[
|
|
2456
|
+
E += G[C], S++;
|
|
2457
2457
|
break;
|
|
2458
2458
|
case 117:
|
|
2459
|
-
for (
|
|
2460
|
-
|
|
2461
|
-
E += K("0x" +
|
|
2459
|
+
for (_ = ++S, T = S + 4; T > S; S++)
|
|
2460
|
+
C = U.charCodeAt(S), C >= 48 && 57 >= C || C >= 97 && 102 >= C || C >= 65 && 70 >= C || M();
|
|
2461
|
+
E += K("0x" + U.slice(_, S));
|
|
2462
2462
|
break;
|
|
2463
2463
|
default:
|
|
2464
|
-
|
|
2464
|
+
M();
|
|
2465
2465
|
}
|
|
2466
2466
|
else {
|
|
2467
|
-
if (
|
|
2467
|
+
if (C == 34)
|
|
2468
2468
|
break;
|
|
2469
|
-
for (
|
|
2470
|
-
|
|
2471
|
-
E +=
|
|
2469
|
+
for (C = U.charCodeAt(S), _ = S; C >= 32 && C != 92 && C != 34; )
|
|
2470
|
+
C = U.charCodeAt(++S);
|
|
2471
|
+
E += U.slice(_, S);
|
|
2472
2472
|
}
|
|
2473
|
-
if (
|
|
2473
|
+
if (U.charCodeAt(S) == 34)
|
|
2474
2474
|
return S++, E;
|
|
2475
|
-
|
|
2475
|
+
M();
|
|
2476
2476
|
default:
|
|
2477
|
-
if (
|
|
2478
|
-
for (
|
|
2477
|
+
if (_ = S, C == 45 && (j = !0, C = U.charCodeAt(++S)), C >= 48 && 57 >= C) {
|
|
2478
|
+
for (C == 48 && (C = U.charCodeAt(S + 1), C >= 48 && 57 >= C) && M(), j = !1; D > S && (C = U.charCodeAt(S), C >= 48 && 57 >= C); S++)
|
|
2479
2479
|
;
|
|
2480
|
-
if (
|
|
2481
|
-
for (T = ++S; D > T && (
|
|
2480
|
+
if (U.charCodeAt(S) == 46) {
|
|
2481
|
+
for (T = ++S; D > T && (C = U.charCodeAt(T), C >= 48 && 57 >= C); T++)
|
|
2482
2482
|
;
|
|
2483
|
-
T == S &&
|
|
2483
|
+
T == S && M(), S = T;
|
|
2484
2484
|
}
|
|
2485
|
-
if (
|
|
2486
|
-
for (
|
|
2485
|
+
if (C = U.charCodeAt(S), C == 101 || C == 69) {
|
|
2486
|
+
for (C = U.charCodeAt(++S), (C == 43 || C == 45) && S++, T = S; D > T && (C = U.charCodeAt(T), C >= 48 && 57 >= C); T++)
|
|
2487
2487
|
;
|
|
2488
|
-
T == S &&
|
|
2488
|
+
T == S && M(), S = T;
|
|
2489
2489
|
}
|
|
2490
|
-
return +
|
|
2490
|
+
return +U.slice(_, S);
|
|
2491
2491
|
}
|
|
2492
|
-
if (j &&
|
|
2492
|
+
if (j && M(), U.slice(S, S + 4) == "true")
|
|
2493
2493
|
return S += 4, !0;
|
|
2494
|
-
if (
|
|
2494
|
+
if (U.slice(S, S + 5) == "false")
|
|
2495
2495
|
return S += 5, !1;
|
|
2496
|
-
if (
|
|
2496
|
+
if (U.slice(S, S + 4) == "null")
|
|
2497
2497
|
return S += 4, null;
|
|
2498
|
-
|
|
2498
|
+
M();
|
|
2499
2499
|
}
|
|
2500
2500
|
return "$";
|
|
2501
|
-
},
|
|
2502
|
-
var
|
|
2503
|
-
if (E == "$" &&
|
|
2501
|
+
}, re = function(E) {
|
|
2502
|
+
var _, T;
|
|
2503
|
+
if (E == "$" && M(), typeof E == "string") {
|
|
2504
2504
|
if ((P ? E.charAt(0) : E[0]) == "@")
|
|
2505
2505
|
return E.slice(1);
|
|
2506
2506
|
if (E == "[") {
|
|
2507
|
-
for (
|
|
2508
|
-
T && (E == "," ? (E = J(), E == "]" &&
|
|
2509
|
-
return
|
|
2507
|
+
for (_ = []; E = J(), E != "]"; T || (T = !0))
|
|
2508
|
+
T && (E == "," ? (E = J(), E == "]" && M()) : M()), E == "," && M(), _.push(re(E));
|
|
2509
|
+
return _;
|
|
2510
2510
|
}
|
|
2511
2511
|
if (E == "{") {
|
|
2512
|
-
for (
|
|
2513
|
-
T && (E == "," ? (E = J(), E == "}" &&
|
|
2514
|
-
return
|
|
2512
|
+
for (_ = {}; E = J(), E != "}"; T || (T = !0))
|
|
2513
|
+
T && (E == "," ? (E = J(), E == "}" && M()) : M()), (E == "," || typeof E != "string" || (P ? E.charAt(0) : E[0]) != "@" || J() != ":") && M(), _[E.slice(1)] = re(J());
|
|
2514
|
+
return _;
|
|
2515
2515
|
}
|
|
2516
|
-
|
|
2516
|
+
M();
|
|
2517
2517
|
}
|
|
2518
2518
|
return E;
|
|
2519
|
-
},
|
|
2520
|
-
var j =
|
|
2521
|
-
j === l ? delete E[
|
|
2522
|
-
},
|
|
2523
|
-
var j,
|
|
2524
|
-
if (typeof
|
|
2525
|
-
if (d.call(
|
|
2526
|
-
for (j =
|
|
2527
|
-
|
|
2519
|
+
}, Ce = function(E, _, T) {
|
|
2520
|
+
var j = ke(E, _, T);
|
|
2521
|
+
j === l ? delete E[_] : E[_] = j;
|
|
2522
|
+
}, ke = function(E, _, T) {
|
|
2523
|
+
var j, C = E[_];
|
|
2524
|
+
if (typeof C == "object" && C)
|
|
2525
|
+
if (d.call(C) == y)
|
|
2526
|
+
for (j = C.length; j--; )
|
|
2527
|
+
Ce(C, j, T);
|
|
2528
2528
|
else
|
|
2529
|
-
f(
|
|
2530
|
-
|
|
2529
|
+
f(C, function(U) {
|
|
2530
|
+
Ce(C, U, T);
|
|
2531
2531
|
});
|
|
2532
|
-
return T.call(E,
|
|
2532
|
+
return T.call(E, _, C);
|
|
2533
2533
|
};
|
|
2534
|
-
|
|
2534
|
+
u.parse = function(E, _) {
|
|
2535
2535
|
var T, j;
|
|
2536
|
-
return S = 0, X = "" + E, T =
|
|
2536
|
+
return S = 0, X = "" + E, T = re(J()), J() != "$" && M(), S = X = null, _ && d.call(_) == s ? ke((j = {}, j[""] = T, j), "", _) : T;
|
|
2537
2537
|
};
|
|
2538
2538
|
}
|
|
2539
2539
|
}
|
|
2540
2540
|
})(this);
|
|
2541
2541
|
}, {}],
|
|
2542
2542
|
48: [function(a, t) {
|
|
2543
|
-
function e(
|
|
2543
|
+
function e(r, o) {
|
|
2544
2544
|
var h = [];
|
|
2545
2545
|
o = o || 0;
|
|
2546
|
-
for (var f = o || 0; f <
|
|
2547
|
-
h[f - o] =
|
|
2546
|
+
for (var f = o || 0; f < r.length; f++)
|
|
2547
|
+
h[f - o] = r[f];
|
|
2548
2548
|
return h;
|
|
2549
2549
|
}
|
|
2550
2550
|
t.exports = e;
|
|
@@ -2563,28 +2563,28 @@ function Ge(a) {
|
|
|
2563
2563
|
const Se = Object.entries(Ke).reduce(
|
|
2564
2564
|
(a, t) => {
|
|
2565
2565
|
var o;
|
|
2566
|
-
const e = t[1].default,
|
|
2567
|
-
return Ge(e) &&
|
|
2566
|
+
const e = t[1].default, r = (o = t[0].match($e)) == null ? void 0 : o[0];
|
|
2567
|
+
return Ge(e) && r && (a[r] = e()), a;
|
|
2568
2568
|
},
|
|
2569
2569
|
{}
|
|
2570
|
-
),
|
|
2570
|
+
), Ne = (a) => {
|
|
2571
2571
|
if (a in Se)
|
|
2572
2572
|
return Se[a];
|
|
2573
2573
|
throw new Error(`Socket version ${a} not found`);
|
|
2574
|
-
}, ze = (a, ...t) =>
|
|
2574
|
+
}, ze = (a, ...t) => Ne(a)(...t), Je = {
|
|
2575
2575
|
...Se,
|
|
2576
|
-
getSocketVersion:
|
|
2576
|
+
getSocketVersion: Ne,
|
|
2577
2577
|
makeSocketVersion: ze
|
|
2578
2578
|
};
|
|
2579
|
-
var We = /* @__PURE__ */ ((a) => (a.RINGING = "Ringing", a.TALKING = "Talking", a.DIALING = "Dialing", a.HOLD = "Hold", a))(We || {}), He = /* @__PURE__ */ ((a) => (a.INCOMING = "Incoming", a.OUTGOING = "Outgoing", a))(He || {}),
|
|
2579
|
+
var We = /* @__PURE__ */ ((a) => (a.RINGING = "Ringing", a.TALKING = "Talking", a.DIALING = "Dialing", a.HOLD = "Hold", a))(We || {}), He = /* @__PURE__ */ ((a) => (a.INCOMING = "Incoming", a.OUTGOING = "Outgoing", a))(He || {}), se = /* @__PURE__ */ ((a) => (a.CONNECTED = "connected", a.DISCONNECTED = "disconnected", a.TRYING_TO_CONNECT = "tryingToConnect", a))(se || {}), Ye = /* @__PURE__ */ ((a) => (a.AUTOMATIC = "Automatic", a.IVR = "IVR", a))(Ye || {}), Qe = /* @__PURE__ */ ((a) => (a.INCOMINC = "Incoming", a.OUTGOING = "Outgoing", a.SPY = "Spy", a.CLICK2CALL = "Click2Call", a))(Qe || {}), Ze = /* @__PURE__ */ ((a) => (a.RESPONSE_FROM_API_VALID = "RESPONSE_FROM_API_VALID", a.RESPONSE_FROM_API_INVALID = "RESPONSE_FROM_API_INVALID", a))(Ze || {}), L = /* @__PURE__ */ ((a) => (a.ALL_DIALER_STATUS = "AllDialersStatus", a.ALL_EXTENSION_STATUS = "AllExtensionsStatus", a.ALL_USERS_STATUS = "AllUsersStatus", a.CONNECT = "connect", a.DISCONNECT = "disconnect", a.CONNECT_ERROR_EVENT = "connect_error", a.EXTENSION_EVENT = "ExtensionEvent", a.KEEP_ALIVE = "keepalive", a.KEEP_ALIVE_RESPONSE = "keepaliveResponse", a.LOGIN_STATUS = "loginStatus", a.LOGIN_SUCCESS = "loginSuccess", a.QUEUE_EVENT = "QueueEvent", a.ONLINE_STATUS_EVENT = "onlineStatusEvent", a.DIALER_EVENT = "DialerEvent", a.EXTENSIONS_UPDATED = "ExtensionsUpdated", a.ALL_VOICEBOTS_STATUS = "AllVoicebotsStatus", a.VOICEBOT_SUBSCRIBE_TO_CALL_FAILED = "subscribeToCallFailed", a.VOICEBOT_SUBSCRIBED_TO_CALL = "subscribedToCall", a.VOICEBOT_INITIAL_CALL_HISTORY = "initialCallHistory", a.VOICEBOT_UNSUBSCRIBED_FROM_CALL = "unsubscribedFromCall", a.VOICEBOT_EVENT = "VoicebotEvent", a))(L || {}), Oe = /* @__PURE__ */ ((a) => (a.NEWCALL = "NEWCALL", a.ANSWER = "ANSWER", a.HOLD = "HOLD", a.UNHOLD = "UNHOLD", a.HANGUP = "HANGUP", a.USER_STATUS_UPDATE = "userStatusUpdate", a))(Oe || {}), et = /* @__PURE__ */ ((a) => (a.NORMAL_HANGUP = "Normal hangup", a.USER_BUSY = "User busy", a.CALL_REJECTED = "Call Rejected", a.UNALLOCATED_NUMBER = "Unallocated (unassigned) number", a.UNKNOWN = "Unknown", a.NO_USER_RESPONDING = "No user responding", a.USER_ALERTING = "User alerting, no answer", a.ANSWERED_ELSEWHERE = "Answered elsewhere", a))(et || {}), tt = /* @__PURE__ */ ((a) => (a.ANSWER = "ANSWER", a.ABANDONED = "ABANDONED", a.EXIT = "EXIT", a.JOIN = "JOIN", a))(tt || {});
|
|
2580
2580
|
class le {
|
|
2581
2581
|
static mapExtensionEvent(t) {
|
|
2582
2582
|
var f, l;
|
|
2583
2583
|
const e = t.reason;
|
|
2584
|
-
let
|
|
2584
|
+
let r, o;
|
|
2585
2585
|
t.data.currentCall && (o = this.mapExtensionCall(t, t.data.currentCall));
|
|
2586
2586
|
const h = this.mapExtensionData(t, t.data);
|
|
2587
|
-
return e === Oe.HANGUP ?
|
|
2587
|
+
return e === Oe.HANGUP ? r = {
|
|
2588
2588
|
...t,
|
|
2589
2589
|
reason: e,
|
|
2590
2590
|
data: {
|
|
@@ -2601,7 +2601,7 @@ class le {
|
|
|
2601
2601
|
};
|
|
2602
2602
|
})
|
|
2603
2603
|
}
|
|
2604
|
-
} :
|
|
2604
|
+
} : r = {
|
|
2605
2605
|
...t,
|
|
2606
2606
|
data: {
|
|
2607
2607
|
...h,
|
|
@@ -2609,17 +2609,17 @@ class le {
|
|
|
2609
2609
|
calls: (l = t.data.calls) == null ? void 0 : l.map((d) => this.mapExtensionCall(t, d))
|
|
2610
2610
|
},
|
|
2611
2611
|
reason: e
|
|
2612
|
-
},
|
|
2612
|
+
}, r;
|
|
2613
2613
|
}
|
|
2614
2614
|
static mapAllExtensionStatus(t) {
|
|
2615
2615
|
return {
|
|
2616
2616
|
...t,
|
|
2617
2617
|
extensions: t.extensions.map((e) => {
|
|
2618
|
-
var
|
|
2618
|
+
var r;
|
|
2619
2619
|
return {
|
|
2620
2620
|
...this.mapExtensionData(t, e),
|
|
2621
2621
|
currentCall: e.currentCall ? this.mapExtensionCall(t, e.currentCall) : void 0,
|
|
2622
|
-
calls: (
|
|
2622
|
+
calls: (r = e.calls) == null ? void 0 : r.map((o) => this.mapExtensionCall(t, o))
|
|
2623
2623
|
};
|
|
2624
2624
|
})
|
|
2625
2625
|
};
|
|
@@ -2691,7 +2691,7 @@ class le {
|
|
|
2691
2691
|
...t,
|
|
2692
2692
|
queues: t.queues.map((e) => ({
|
|
2693
2693
|
...e,
|
|
2694
|
-
Calls: e.Calls.map((
|
|
2694
|
+
Calls: e.Calls.map((r) => this.mapQueueCall(t, r))
|
|
2695
2695
|
}))
|
|
2696
2696
|
};
|
|
2697
2697
|
}
|
|
@@ -2704,8 +2704,8 @@ class le {
|
|
|
2704
2704
|
}
|
|
2705
2705
|
};
|
|
2706
2706
|
}
|
|
2707
|
-
static assignProperty(t, e,
|
|
2708
|
-
t[e] =
|
|
2707
|
+
static assignProperty(t, e, r) {
|
|
2708
|
+
t[e] = r;
|
|
2709
2709
|
}
|
|
2710
2710
|
/**
|
|
2711
2711
|
* Configures UTC timestamps for an object by converting server-time properties to both UTC and client-local UTC timestamps
|
|
@@ -2734,17 +2734,17 @@ class le {
|
|
|
2734
2734
|
* @private
|
|
2735
2735
|
* @returns Original object extended with new _UTC and _UTC_CLIENT properties for each configured timestamp
|
|
2736
2736
|
*/
|
|
2737
|
-
static configureUTCForObject(t, e,
|
|
2738
|
-
const h = (
|
|
2737
|
+
static configureUTCForObject(t, e, r, o) {
|
|
2738
|
+
const h = (r - o * 60) * 1e3, f = Date.now() - h, l = {};
|
|
2739
2739
|
return e.forEach((d) => {
|
|
2740
|
-
const i = t[d.key],
|
|
2740
|
+
const i = t[d.key], u = d.key;
|
|
2741
2741
|
if (i !== 0 && typeof i == "number" && !isNaN(i)) {
|
|
2742
2742
|
let c = i;
|
|
2743
2743
|
d.format === "ms" && (c = Math.floor(c / 1e3));
|
|
2744
|
-
const
|
|
2745
|
-
this.assignProperty(l, `${
|
|
2744
|
+
const s = (c - o * 60) * 1e3;
|
|
2745
|
+
this.assignProperty(l, `${u}_UTC`, s), this.assignProperty(l, `${u}_UTC_CLIENT`, s + f);
|
|
2746
2746
|
} else
|
|
2747
|
-
this.assignProperty(l, `${
|
|
2747
|
+
this.assignProperty(l, `${u}_UTC`, 0), this.assignProperty(l, `${u}_UTC_CLIENT`, 0);
|
|
2748
2748
|
}), {
|
|
2749
2749
|
...t,
|
|
2750
2750
|
...l
|
|
@@ -2774,7 +2774,7 @@ class nt {
|
|
|
2774
2774
|
/** Network reconnect timeout handle (debounced) */
|
|
2775
2775
|
q(this, "networkReconnectTimeout");
|
|
2776
2776
|
/** Current reconnection delay in seconds */
|
|
2777
|
-
q(this, "reconnectionTime",
|
|
2777
|
+
q(this, "reconnectionTime", Le.reconnectionDelay);
|
|
2778
2778
|
/** Maximum reconnection delay in seconds */
|
|
2779
2779
|
q(this, "maxReconnectionDelay", 120);
|
|
2780
2780
|
/** Network event cleanup functions */
|
|
@@ -2806,8 +2806,8 @@ class nt {
|
|
|
2806
2806
|
* Determines and sets the appropriate Socket.IO function based on client version.
|
|
2807
2807
|
*/
|
|
2808
2808
|
getSocketIoFunction(t) {
|
|
2809
|
-
const e = t.split("v="),
|
|
2810
|
-
this.ioFunction = Je.getSocketVersion(
|
|
2809
|
+
const e = t.split("v="), r = "v".concat(e[e.length - 1]).replaceAll(".", "_");
|
|
2810
|
+
this.ioFunction = Je.getSocketVersion(r);
|
|
2811
2811
|
}
|
|
2812
2812
|
/**
|
|
2813
2813
|
* Initializes a new Socket.IO connection. Prevents multiple simultaneous connections.
|
|
@@ -2816,9 +2816,9 @@ class nt {
|
|
|
2816
2816
|
if (this.connectionState !== "disconnected")
|
|
2817
2817
|
return;
|
|
2818
2818
|
this.connectionState = "connecting";
|
|
2819
|
-
const t = this.eventsSdkClass.authClass.token, e = this.eventsSdkClass.options.protocol,
|
|
2819
|
+
const t = this.eventsSdkClass.authClass.token, e = this.eventsSdkClass.options.protocol, r = this.eventsSdkClass.server;
|
|
2820
2820
|
try {
|
|
2821
|
-
const o =
|
|
2821
|
+
const o = r ? r.Domain : this.eventsSdkClass.URL, h = r ? `${e}://${o}` : this.eventsSdkClass.URL, f = {
|
|
2822
2822
|
reconnection: !1,
|
|
2823
2823
|
upgrade: !1,
|
|
2824
2824
|
transports: ["websocket"],
|
|
@@ -2828,10 +2828,10 @@ class nt {
|
|
|
2828
2828
|
};
|
|
2829
2829
|
if (this.ioFunction && h)
|
|
2830
2830
|
this.io = this.ioFunction(h, f), this.initSocketEvents(), this.eventsSdkClass.eventEmitterClass.emit(
|
|
2831
|
-
|
|
2831
|
+
L.ONLINE_STATUS_EVENT,
|
|
2832
2832
|
{
|
|
2833
2833
|
attemptToConnect: h,
|
|
2834
|
-
connectionStatus:
|
|
2834
|
+
connectionStatus: se.TRYING_TO_CONNECT
|
|
2835
2835
|
}
|
|
2836
2836
|
), this.eventsSdkClass.loggerClass.sdkAttemptToConnect(o);
|
|
2837
2837
|
else
|
|
@@ -2877,7 +2877,7 @@ class nt {
|
|
|
2877
2877
|
* Sets up event listeners for all Socket.IO events
|
|
2878
2878
|
*/
|
|
2879
2879
|
initSocketEvents() {
|
|
2880
|
-
this.io && (this.io.removeAllListeners(), this.io.on(
|
|
2880
|
+
this.io && (this.io.removeAllListeners(), this.io.on(L.LOGIN_SUCCESS, (t) => this.onLoginSuccessEvent(t, L.LOGIN_SUCCESS)).on(L.QUEUE_EVENT, (t) => this.onQueueEvent(t, L.QUEUE_EVENT)).on(L.EXTENSION_EVENT, (t) => this.onExtensionEvent(t, L.EXTENSION_EVENT)).on(L.DIALER_EVENT, (t) => this.onDialerEvent(t, L.DIALER_EVENT)).on(L.LOGIN_STATUS, (t) => this.onLoginStatusEvent(t, L.LOGIN_STATUS)).on(L.ALL_EXTENSION_STATUS, (t) => this.onAllExtensionStatus(t, L.ALL_EXTENSION_STATUS)).on(L.ALL_DIALER_STATUS, (t) => this.onAllDialerStatus(t, L.ALL_DIALER_STATUS)).on(L.KEEP_ALIVE_RESPONSE, (t) => this.onKeepAliveResponse(t)).on(L.EXTENSIONS_UPDATED, (t) => this.onExtensionsUpdatedEvent(t, L.EXTENSIONS_UPDATED)).on(L.CONNECT, () => this.onConnect()).on(L.DISCONNECT, (t) => this.onDisconnect(t)).on(L.CONNECT_ERROR_EVENT, (t) => this.onConnectError(t)).on(L.ALL_VOICEBOTS_STATUS, (t) => this.onAllVoicebotsStatus(t, L.ALL_VOICEBOTS_STATUS)).on(L.VOICEBOT_EVENT, (t) => this.onVoicebotEvent(t, L.VOICEBOT_EVENT)).on(L.VOICEBOT_SUBSCRIBED_TO_CALL, (t) => this.onVoicebotSubscribedToCall(t, L.VOICEBOT_SUBSCRIBED_TO_CALL)).on(L.VOICEBOT_SUBSCRIBE_TO_CALL_FAILED, (t) => this.onVoicebotSubscribeToCallFailed(t, L.VOICEBOT_SUBSCRIBE_TO_CALL_FAILED)).on(L.VOICEBOT_INITIAL_CALL_HISTORY, (t) => this.onVoicebotInitialCallHistory(t, L.VOICEBOT_INITIAL_CALL_HISTORY)).on(L.VOICEBOT_UNSUBSCRIBED_FROM_CALL, (t) => this.onVoicebotUnsubscribedFromCall(t, L.VOICEBOT_UNSUBSCRIBED_FROM_CALL)));
|
|
2881
2881
|
}
|
|
2882
2882
|
/**
|
|
2883
2883
|
* Updates timestamp on every event to prevent unnecessary keep-alives
|
|
@@ -2894,19 +2894,37 @@ class nt {
|
|
|
2894
2894
|
}
|
|
2895
2895
|
onExtensionEvent(t, e) {
|
|
2896
2896
|
this.updateEventTimestamp();
|
|
2897
|
-
const
|
|
2898
|
-
|
|
2897
|
+
const r = le.mapExtensionEvent(t);
|
|
2898
|
+
r && (this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, r));
|
|
2899
2899
|
}
|
|
2900
2900
|
onDialerEvent(t, e) {
|
|
2901
2901
|
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, t);
|
|
2902
2902
|
}
|
|
2903
|
+
onVoicebotEvent(t, e) {
|
|
2904
|
+
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, t);
|
|
2905
|
+
}
|
|
2906
|
+
onAllVoicebotsStatus(t, e) {
|
|
2907
|
+
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, t);
|
|
2908
|
+
}
|
|
2909
|
+
onVoicebotSubscribedToCall(t, e) {
|
|
2910
|
+
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, t);
|
|
2911
|
+
}
|
|
2912
|
+
onVoicebotSubscribeToCallFailed(t, e) {
|
|
2913
|
+
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, t);
|
|
2914
|
+
}
|
|
2915
|
+
onVoicebotInitialCallHistory(t, e) {
|
|
2916
|
+
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, t);
|
|
2917
|
+
}
|
|
2918
|
+
onVoicebotUnsubscribedFromCall(t, e) {
|
|
2919
|
+
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, t);
|
|
2920
|
+
}
|
|
2903
2921
|
onLoginStatusEvent(t, e) {
|
|
2904
2922
|
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, le.mapLoginStatusEvent(t));
|
|
2905
2923
|
}
|
|
2906
2924
|
onAllExtensionStatus(t, e) {
|
|
2907
2925
|
this.updateEventTimestamp();
|
|
2908
|
-
const
|
|
2909
|
-
this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e,
|
|
2926
|
+
const r = le.mapAllExtensionStatus(t);
|
|
2927
|
+
this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, r);
|
|
2910
2928
|
}
|
|
2911
2929
|
onAllDialerStatus(t, e) {
|
|
2912
2930
|
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, t);
|
|
@@ -2929,8 +2947,8 @@ class nt {
|
|
|
2929
2947
|
* Handles successful connection
|
|
2930
2948
|
*/
|
|
2931
2949
|
onConnect() {
|
|
2932
|
-
this.connectionState = "connected", this.reconnectionTime = this.eventsSdkClass.options.reconnectionDelay, this.reconnectTimeout && (clearTimeout(this.reconnectTimeout), this.reconnectTimeout = void 0), this.eventsSdkClass.eventEmitterClass.emit(
|
|
2933
|
-
connectionStatus:
|
|
2950
|
+
this.connectionState = "connected", this.reconnectionTime = this.eventsSdkClass.options.reconnectionDelay, this.reconnectTimeout && (clearTimeout(this.reconnectTimeout), this.reconnectTimeout = void 0), this.eventsSdkClass.eventEmitterClass.emit(L.ONLINE_STATUS_EVENT, {
|
|
2951
|
+
connectionStatus: se.CONNECTED
|
|
2934
2952
|
}), this.eventsSdkClass.loggerClass.start().then(() => {
|
|
2935
2953
|
this.eventsSdkClass.loggerClass.sdkConnectionSuccess();
|
|
2936
2954
|
});
|
|
@@ -2939,8 +2957,8 @@ class nt {
|
|
|
2939
2957
|
* Schedules reconnection with exponential backoff
|
|
2940
2958
|
*/
|
|
2941
2959
|
scheduleReconnect() {
|
|
2942
|
-
!this.doReconnect || this.reconnectTimeout || (this.eventsSdkClass.eventEmitterClass.emit(
|
|
2943
|
-
connectionStatus:
|
|
2960
|
+
!this.doReconnect || this.reconnectTimeout || (this.eventsSdkClass.eventEmitterClass.emit(L.ONLINE_STATUS_EVENT, {
|
|
2961
|
+
connectionStatus: se.TRYING_TO_CONNECT
|
|
2944
2962
|
}), this.reconnectTimeout = setTimeout(() => {
|
|
2945
2963
|
this.reconnectTimeout = void 0, this.reconnectionTime = Math.min(
|
|
2946
2964
|
this.reconnectionTime * 2,
|
|
@@ -2953,8 +2971,8 @@ class nt {
|
|
|
2953
2971
|
*/
|
|
2954
2972
|
onDisconnect(t) {
|
|
2955
2973
|
if (this.connectionState = "disconnected", this.eventsSdkClass.loggerClass.sdkDisconnect([t]), !this.doReconnect) {
|
|
2956
|
-
this.eventsSdkClass.eventEmitterClass.emit(
|
|
2957
|
-
connectionStatus:
|
|
2974
|
+
this.eventsSdkClass.eventEmitterClass.emit(L.ONLINE_STATUS_EVENT, {
|
|
2975
|
+
connectionStatus: se.DISCONNECTED
|
|
2958
2976
|
});
|
|
2959
2977
|
return;
|
|
2960
2978
|
}
|
|
@@ -2964,8 +2982,8 @@ class nt {
|
|
|
2964
2982
|
* Handles connection errors
|
|
2965
2983
|
*/
|
|
2966
2984
|
onConnectError(t) {
|
|
2967
|
-
this.connectionState = "disconnected", this.eventsSdkClass.loggerClass.sdkAttemptToConnectError(t), this.doReconnect ? this.scheduleReconnect() : this.eventsSdkClass.eventEmitterClass.emit(
|
|
2968
|
-
connectionStatus:
|
|
2985
|
+
this.connectionState = "disconnected", this.eventsSdkClass.loggerClass.sdkAttemptToConnectError(t), this.doReconnect ? this.scheduleReconnect() : this.eventsSdkClass.eventEmitterClass.emit(L.ONLINE_STATUS_EVENT, {
|
|
2986
|
+
connectionStatus: se.DISCONNECTED
|
|
2969
2987
|
});
|
|
2970
2988
|
}
|
|
2971
2989
|
/**
|
|
@@ -2975,7 +2993,7 @@ class nt {
|
|
|
2975
2993
|
this.doReconnect = !1, this.networkCleanup.forEach((t) => t()), await this.closeAllConnections();
|
|
2976
2994
|
}
|
|
2977
2995
|
}
|
|
2978
|
-
class
|
|
2996
|
+
class st {
|
|
2979
2997
|
constructor(t) {
|
|
2980
2998
|
q(this, "storageLogger");
|
|
2981
2999
|
this.eventsSdkClass = t, this.eventsSdkClass = t;
|
|
@@ -3030,119 +3048,119 @@ class rt {
|
|
|
3030
3048
|
this.log({
|
|
3031
3049
|
Message: `Sdk connected to the socket server ${this.eventsSdkClass.server && this.eventsSdkClass.server.Domain ? this.eventsSdkClass.server.Domain : this.eventsSdkClass.URL}`,
|
|
3032
3050
|
Body: JSON.stringify(t, this.eventsSdkClass.getCircularReplacer()),
|
|
3033
|
-
ActionName:
|
|
3051
|
+
ActionName: Q.WSCONNECT,
|
|
3034
3052
|
isShowClient: !1,
|
|
3035
3053
|
Status: "Connection established",
|
|
3036
3054
|
StatusCode: 200,
|
|
3037
3055
|
Level: z.INFO,
|
|
3038
|
-
LogType:
|
|
3056
|
+
LogType: Y.INFO
|
|
3039
3057
|
});
|
|
3040
3058
|
}
|
|
3041
3059
|
sdkDisconnect(t) {
|
|
3042
3060
|
this.log({
|
|
3043
3061
|
Message: `Sdk disconnected from the socket server ${this.eventsSdkClass.server && this.eventsSdkClass.server.Domain ? this.eventsSdkClass.server.Domain : this.eventsSdkClass.URL} (${t})`,
|
|
3044
|
-
ActionName:
|
|
3062
|
+
ActionName: Q.WSCONNECT,
|
|
3045
3063
|
isShowClient: !1,
|
|
3046
3064
|
Status: "Connection closed",
|
|
3047
3065
|
StatusCode: 200,
|
|
3048
3066
|
Level: z.INFO,
|
|
3049
|
-
LogType:
|
|
3067
|
+
LogType: Y.INFO
|
|
3050
3068
|
});
|
|
3051
3069
|
}
|
|
3052
3070
|
sdkAttemptToConnect(t) {
|
|
3053
3071
|
this.log({
|
|
3054
3072
|
Message: `${this.eventsSdkClass.options.loggerConfig.system} is trying to connect to WS server ${t}`,
|
|
3055
|
-
ActionName:
|
|
3073
|
+
ActionName: Q.WSCONNECT,
|
|
3056
3074
|
isShowClient: !1,
|
|
3057
3075
|
Status: "Switching Protocols",
|
|
3058
3076
|
StatusCode: 101,
|
|
3059
3077
|
Level: z.INFO,
|
|
3060
|
-
LogType:
|
|
3078
|
+
LogType: Y.INFO
|
|
3061
3079
|
});
|
|
3062
3080
|
}
|
|
3063
3081
|
sdkAttemptToConnectError(t) {
|
|
3064
3082
|
this.log({
|
|
3065
3083
|
Message: `${t}`,
|
|
3066
|
-
ActionName:
|
|
3084
|
+
ActionName: Q.WSCONNECT,
|
|
3067
3085
|
isShowClient: !1,
|
|
3068
3086
|
Status: "Connection error",
|
|
3069
3087
|
StatusCode: 500,
|
|
3070
3088
|
Level: z.ERROR,
|
|
3071
|
-
LogType:
|
|
3089
|
+
LogType: Y.ERROR
|
|
3072
3090
|
});
|
|
3073
3091
|
}
|
|
3074
|
-
loginError(t, e,
|
|
3092
|
+
loginError(t, e, r, o) {
|
|
3075
3093
|
this.log({
|
|
3076
|
-
Message: `External login request error with the login type ${t} ${t === Z.TOKEN ?
|
|
3077
|
-
ActionName:
|
|
3094
|
+
Message: `External login request error with the login type ${t} ${t === Z.TOKEN ? r : o}`,
|
|
3095
|
+
ActionName: Q.WSCONNECT,
|
|
3078
3096
|
isShowClient: !1,
|
|
3079
3097
|
Status: "External login error",
|
|
3080
3098
|
StatusCode: e || 400,
|
|
3081
3099
|
Level: z.ERROR,
|
|
3082
|
-
LogType:
|
|
3100
|
+
LogType: Y.ERROR
|
|
3083
3101
|
});
|
|
3084
3102
|
}
|
|
3085
3103
|
getSettingsError(t, e) {
|
|
3086
3104
|
this.log({
|
|
3087
3105
|
Message: `Get settings error with token ${t}, error: ${e}`,
|
|
3088
|
-
ActionName:
|
|
3106
|
+
ActionName: Q.WSCONNECT,
|
|
3089
3107
|
isShowClient: !1,
|
|
3090
3108
|
Status: "Get settings error",
|
|
3091
3109
|
StatusCode: 400,
|
|
3092
3110
|
Level: z.ERROR,
|
|
3093
|
-
LogType:
|
|
3111
|
+
LogType: Y.ERROR
|
|
3094
3112
|
});
|
|
3095
3113
|
}
|
|
3096
|
-
refreshTokenError(t, e,
|
|
3114
|
+
refreshTokenError(t, e, r) {
|
|
3097
3115
|
this.log({
|
|
3098
|
-
Message: `Refresh token error with old refresh token ${t}, url: ${e}, error: ${
|
|
3099
|
-
ActionName:
|
|
3116
|
+
Message: `Refresh token error with old refresh token ${t}, url: ${e}, error: ${r}`,
|
|
3117
|
+
ActionName: Q.WSCONNECT,
|
|
3100
3118
|
isShowClient: !1,
|
|
3101
3119
|
Status: "Get settings error",
|
|
3102
3120
|
StatusCode: 400,
|
|
3103
3121
|
Level: z.ERROR,
|
|
3104
|
-
LogType:
|
|
3122
|
+
LogType: Y.ERROR
|
|
3105
3123
|
});
|
|
3106
3124
|
}
|
|
3107
3125
|
keepAliveEmit() {
|
|
3108
3126
|
this.log({
|
|
3109
3127
|
Message: `Keep alive event emitted with this token: ${this.eventsSdkClass.authClass.token}`,
|
|
3110
|
-
ActionName:
|
|
3128
|
+
ActionName: Q.WSCONNECT,
|
|
3111
3129
|
isShowClient: !1,
|
|
3112
3130
|
Level: z.INFO,
|
|
3113
|
-
LogType:
|
|
3131
|
+
LogType: Y.INFO
|
|
3114
3132
|
});
|
|
3115
3133
|
}
|
|
3116
3134
|
keepAliveResponse(t) {
|
|
3117
3135
|
this.log({
|
|
3118
3136
|
Message: `Keep alive response: ${JSON.stringify(t)}`,
|
|
3119
|
-
ActionName:
|
|
3137
|
+
ActionName: Q.WSCONNECT,
|
|
3120
3138
|
isShowClient: !1,
|
|
3121
3139
|
Status: "Successful",
|
|
3122
3140
|
StatusCode: 200,
|
|
3123
3141
|
Level: z.INFO,
|
|
3124
|
-
LogType:
|
|
3142
|
+
LogType: Y.INFO
|
|
3125
3143
|
});
|
|
3126
3144
|
}
|
|
3127
3145
|
eventLog(t, e) {
|
|
3128
|
-
const
|
|
3146
|
+
const r = {
|
|
3129
3147
|
[te.FULL]: [],
|
|
3130
|
-
[te.BOOTSTRAP]: [
|
|
3131
|
-
[te.DEBUG_EXTENSIONS]: [
|
|
3132
|
-
[te.DEBUG_DIALER]: [
|
|
3133
|
-
[te.DEBUG_QUEUE]: [
|
|
3148
|
+
[te.BOOTSTRAP]: [L.LOGIN_STATUS, L.LOGIN_SUCCESS, L.ALL_EXTENSION_STATUS, L.ALL_DIALER_STATUS],
|
|
3149
|
+
[te.DEBUG_EXTENSIONS]: [L.ALL_EXTENSION_STATUS, L.EXTENSION_EVENT, L.EXTENSIONS_UPDATED],
|
|
3150
|
+
[te.DEBUG_DIALER]: [L.ALL_DIALER_STATUS, L.DIALER_EVENT],
|
|
3151
|
+
[te.DEBUG_QUEUE]: [L.QUEUE_EVENT]
|
|
3134
3152
|
};
|
|
3135
|
-
this.eventsSdkClass.options.debugOption && (
|
|
3153
|
+
this.eventsSdkClass.options.debugOption && (r[this.eventsSdkClass.options.debugOption].includes(t) || this.eventsSdkClass.options.debugOption === te.FULL) && this.log({
|
|
3136
3154
|
Message: `Event name: ${t}`,
|
|
3137
3155
|
Body: {
|
|
3138
3156
|
...this.getStaticData(),
|
|
3139
3157
|
...e
|
|
3140
3158
|
},
|
|
3141
|
-
ActionName:
|
|
3159
|
+
ActionName: Q.WSCONNECT,
|
|
3142
3160
|
isShowClient: !1,
|
|
3143
3161
|
Status: "Successful",
|
|
3144
3162
|
Level: z.DEBUG,
|
|
3145
|
-
LogType:
|
|
3163
|
+
LogType: Y.INFO
|
|
3146
3164
|
});
|
|
3147
3165
|
}
|
|
3148
3166
|
getStaticData() {
|
|
@@ -3151,26 +3169,26 @@ class rt {
|
|
|
3151
3169
|
};
|
|
3152
3170
|
}
|
|
3153
3171
|
}
|
|
3154
|
-
class
|
|
3172
|
+
class rt {
|
|
3155
3173
|
constructor(t) {
|
|
3156
3174
|
q(this, "listeners", {
|
|
3157
|
-
[
|
|
3158
|
-
[
|
|
3159
|
-
[
|
|
3160
|
-
[
|
|
3161
|
-
[
|
|
3162
|
-
[
|
|
3163
|
-
[
|
|
3164
|
-
[
|
|
3165
|
-
[
|
|
3166
|
-
[
|
|
3167
|
-
[
|
|
3168
|
-
[
|
|
3169
|
-
[
|
|
3170
|
-
[
|
|
3171
|
-
[
|
|
3172
|
-
[
|
|
3173
|
-
[
|
|
3175
|
+
[L.ALL_EXTENSION_STATUS]: [],
|
|
3176
|
+
[L.ALL_DIALER_STATUS]: [],
|
|
3177
|
+
[L.ALL_USERS_STATUS]: [],
|
|
3178
|
+
[L.ALL_VOICEBOTS_STATUS]: [],
|
|
3179
|
+
[L.QUEUE_EVENT]: [],
|
|
3180
|
+
[L.EXTENSION_EVENT]: [],
|
|
3181
|
+
[L.DIALER_EVENT]: [],
|
|
3182
|
+
[L.LOGIN_SUCCESS]: [],
|
|
3183
|
+
[L.LOGIN_STATUS]: [],
|
|
3184
|
+
[L.KEEP_ALIVE_RESPONSE]: [],
|
|
3185
|
+
[L.ONLINE_STATUS_EVENT]: [],
|
|
3186
|
+
[L.EXTENSIONS_UPDATED]: [],
|
|
3187
|
+
[L.VOICEBOT_SUBSCRIBED_TO_CALL]: [],
|
|
3188
|
+
[L.VOICEBOT_SUBSCRIBE_TO_CALL_FAILED]: [],
|
|
3189
|
+
[L.VOICEBOT_INITIAL_CALL_HISTORY]: [],
|
|
3190
|
+
[L.VOICEBOT_UNSUBSCRIBED_FROM_CALL]: [],
|
|
3191
|
+
[L.VOICEBOT_EVENT]: []
|
|
3174
3192
|
});
|
|
3175
3193
|
q(this, "allListeners", []);
|
|
3176
3194
|
this.eventsSdkClass = t, this.eventsSdkClass = t;
|
|
@@ -3180,7 +3198,7 @@ class st {
|
|
|
3180
3198
|
}
|
|
3181
3199
|
off(t, e) {
|
|
3182
3200
|
if (t === "*")
|
|
3183
|
-
this.allListeners = this.allListeners.filter((
|
|
3201
|
+
this.allListeners = this.allListeners.filter((r) => r !== e);
|
|
3184
3202
|
else {
|
|
3185
3203
|
const o = this.listeners[t].filter((h) => h !== e);
|
|
3186
3204
|
this.listeners = {
|
|
@@ -3194,11 +3212,11 @@ class st {
|
|
|
3194
3212
|
name: t,
|
|
3195
3213
|
data: e
|
|
3196
3214
|
}));
|
|
3197
|
-
const
|
|
3215
|
+
const r = {
|
|
3198
3216
|
name: t,
|
|
3199
3217
|
data: e
|
|
3200
3218
|
};
|
|
3201
|
-
this.allListeners.forEach((o) => o(
|
|
3219
|
+
this.allListeners.forEach((o) => o(r));
|
|
3202
3220
|
}
|
|
3203
3221
|
}
|
|
3204
3222
|
class ct {
|
|
@@ -3211,25 +3229,25 @@ class ct {
|
|
|
3211
3229
|
q(this, "socket");
|
|
3212
3230
|
q(this, "mainServer");
|
|
3213
3231
|
q(this, "alreadyAttemptedOtherServers", []);
|
|
3214
|
-
q(this, "authClass", new
|
|
3232
|
+
q(this, "authClass", new Me(this));
|
|
3215
3233
|
q(this, "socketIoClass");
|
|
3216
|
-
q(this, "loggerClass", new
|
|
3217
|
-
q(this, "eventEmitterClass", new
|
|
3234
|
+
q(this, "loggerClass", new st(this));
|
|
3235
|
+
q(this, "eventEmitterClass", new rt(this));
|
|
3218
3236
|
q(this, "getCircularReplacer", () => {
|
|
3219
3237
|
const t = /* @__PURE__ */ new WeakSet();
|
|
3220
|
-
return (e,
|
|
3238
|
+
return (e, r) => {
|
|
3221
3239
|
if (!(e === "socket" || e === "io" || e === "nsps")) {
|
|
3222
|
-
if (typeof
|
|
3223
|
-
if (t.has(
|
|
3240
|
+
if (typeof r == "object" && r !== null) {
|
|
3241
|
+
if (t.has(r))
|
|
3224
3242
|
return;
|
|
3225
|
-
t.add(
|
|
3243
|
+
t.add(r);
|
|
3226
3244
|
}
|
|
3227
|
-
return
|
|
3245
|
+
return r;
|
|
3228
3246
|
}
|
|
3229
3247
|
};
|
|
3230
3248
|
});
|
|
3231
3249
|
this.options = {
|
|
3232
|
-
...
|
|
3250
|
+
...Le,
|
|
3233
3251
|
...t
|
|
3234
3252
|
}, this.socketIoClass = new nt(this);
|
|
3235
3253
|
}
|
|
@@ -3265,7 +3283,7 @@ class ct {
|
|
|
3265
3283
|
);
|
|
3266
3284
|
t.length || (this.alreadyAttemptedOtherServers = [], t = this.servers.filter(
|
|
3267
3285
|
(e) => e.Priority !== this.mainServer.Priority && this.alreadyAttemptedOtherServers.indexOf(e.Priority) + 1 === 0
|
|
3268
|
-
)), t.length && (this.server = t.reduce((e,
|
|
3286
|
+
)), t.length && (this.server = t.reduce((e, r) => r.Priority > e.Priority ? r : e), this.alreadyAttemptedOtherServers.push(this.server.Priority));
|
|
3269
3287
|
} else
|
|
3270
3288
|
this.server = this.mainServer;
|
|
3271
3289
|
else if (this.URLList.length)
|
|
@@ -3290,12 +3308,12 @@ class ct {
|
|
|
3290
3308
|
export {
|
|
3291
3309
|
We as CallStatusEnum,
|
|
3292
3310
|
He as CallTypeEnum,
|
|
3293
|
-
|
|
3311
|
+
se as ConnectionStatusEnum,
|
|
3294
3312
|
te as DebugOption,
|
|
3295
3313
|
Ye as DialerTypeEnum,
|
|
3296
3314
|
Qe as DirectionEnum,
|
|
3297
3315
|
Ze as DoNotCallMeStatusCodeEnum,
|
|
3298
|
-
|
|
3316
|
+
L as EventsEnum,
|
|
3299
3317
|
Oe as ExtensionEventReasonEnum,
|
|
3300
3318
|
et as ExtensionHangupCauseEnum,
|
|
3301
3319
|
Z as LoginType,
|