@voicenter-team/events-sdk 0.0.114 → 0.0.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/voicenter-events-sdk.cjs.js +12 -12
- package/dist/voicenter-events-sdk.cjs.js.map +1 -1
- package/dist/voicenter-events-sdk.es.js +735 -664
- package/dist/voicenter-events-sdk.es.js.map +1 -1
- package/dist/voicenter-events-sdk.iife.js +8 -8
- package/dist/voicenter-events-sdk.iife.js.map +1 -1
- package/dist/voicenter-events-sdk.umd.js +8 -8
- package/dist/voicenter-events-sdk.umd.js.map +1 -1
- package/package.json +2 -3
|
@@ -2,11 +2,11 @@ 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
4
|
import Be from "ws";
|
|
5
|
-
import
|
|
6
|
-
function
|
|
5
|
+
import xe, { LevelEnum as z, LogTypeEnum as Y, ActionNameEnum as Q } from "@voicenter-team/socketio-storage-logger";
|
|
6
|
+
function Ue(a) {
|
|
7
7
|
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
8
8
|
}
|
|
9
|
-
var
|
|
9
|
+
var be = { exports: {} }, we = { exports: {} };
|
|
10
10
|
(function() {
|
|
11
11
|
var a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", t = {
|
|
12
12
|
// Bit-wise rotation left
|
|
@@ -33,8 +33,8 @@ var we = { exports: {} }, be = { exports: {} };
|
|
|
33
33
|
},
|
|
34
34
|
// Convert a byte array to big-endian 32-bit words
|
|
35
35
|
bytesToWords: function(e) {
|
|
36
|
-
for (var r = [], o = 0,
|
|
37
|
-
r[
|
|
36
|
+
for (var r = [], o = 0, c = 0; o < e.length; o++, c += 8)
|
|
37
|
+
r[c >>> 5] |= e[o] << 24 - c % 32;
|
|
38
38
|
return r;
|
|
39
39
|
},
|
|
40
40
|
// Convert big-endian 32-bit words to a byte array
|
|
@@ -58,21 +58,21 @@ var we = { exports: {} }, be = { exports: {} };
|
|
|
58
58
|
// Convert a byte array to a base-64 string
|
|
59
59
|
bytesToBase64: function(e) {
|
|
60
60
|
for (var r = [], o = 0; o < e.length; o += 3)
|
|
61
|
-
for (var
|
|
62
|
-
o * 8 + f * 6 <= e.length * 8 ? r.push(a.charAt(
|
|
61
|
+
for (var c = e[o] << 16 | e[o + 1] << 8 | e[o + 2], f = 0; f < 4; f++)
|
|
62
|
+
o * 8 + f * 6 <= e.length * 8 ? r.push(a.charAt(c >>> 6 * (3 - f) & 63)) : r.push("=");
|
|
63
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 r = [], o = 0,
|
|
69
|
-
|
|
68
|
+
for (var r = [], o = 0, c = 0; o < e.length; c = ++o % 4)
|
|
69
|
+
c != 0 && r.push((a.indexOf(e.charAt(o - 1)) & Math.pow(2, -2 * c + 8) - 1) << c * 2 | a.indexOf(e.charAt(o)) >>> 6 - c * 2);
|
|
70
70
|
return r;
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
|
-
|
|
73
|
+
we.exports = t;
|
|
74
74
|
})();
|
|
75
|
-
var De =
|
|
75
|
+
var De = we.exports, me = {
|
|
76
76
|
// UTF-8 encoding
|
|
77
77
|
utf8: {
|
|
78
78
|
// Convert a string to a byte array
|
|
@@ -106,50 +106,50 @@ var De = be.exports, me = {
|
|
|
106
106
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
107
107
|
* @license MIT
|
|
108
108
|
*/
|
|
109
|
-
var
|
|
110
|
-
return a != null && (Ae(a) ||
|
|
109
|
+
var Ve = function(a) {
|
|
110
|
+
return a != null && (Ae(a) || je(a) || !!a._isBuffer);
|
|
111
111
|
};
|
|
112
112
|
function Ae(a) {
|
|
113
113
|
return !!a.constructor && typeof a.constructor.isBuffer == "function" && a.constructor.isBuffer(a);
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function je(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 =
|
|
120
|
-
|
|
121
|
-
for (var
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
for (var p = o._ff, g = o._gg, y = o._hh,
|
|
125
|
-
var
|
|
126
|
-
i = p(i, u,
|
|
119
|
+
var a = De, t = Te.utf8, e = Ve, r = Te.bin, o = function(c, f) {
|
|
120
|
+
c.constructor == String ? f && f.encoding === "binary" ? c = r.stringToBytes(c) : c = t.stringToBytes(c) : e(c) ? c = Array.prototype.slice.call(c, 0) : !Array.isArray(c) && c.constructor !== Uint8Array && (c = c.toString());
|
|
121
|
+
for (var h = a.bytesToWords(c), d = c.length * 8, i = 1732584193, u = -271733879, l = -1732584194, s = 271733878, n = 0; n < h.length; n++)
|
|
122
|
+
h[n] = (h[n] << 8 | h[n] >>> 24) & 16711935 | (h[n] << 24 | h[n] >>> 8) & 4278255360;
|
|
123
|
+
h[d >>> 5] |= 128 << d % 32, h[(d + 64 >>> 9 << 4) + 14] = d;
|
|
124
|
+
for (var p = o._ff, g = o._gg, y = o._hh, b = o._ii, n = 0; n < h.length; n += 16) {
|
|
125
|
+
var j = i, U = u, P = l, I = s;
|
|
126
|
+
i = p(i, u, l, s, h[n + 0], 7, -680876936), s = p(s, i, u, l, h[n + 1], 12, -389564586), l = p(l, s, i, u, h[n + 2], 17, 606105819), u = p(u, l, s, i, h[n + 3], 22, -1044525330), i = p(i, u, l, s, h[n + 4], 7, -176418897), s = p(s, i, u, l, h[n + 5], 12, 1200080426), l = p(l, s, i, u, h[n + 6], 17, -1473231341), u = p(u, l, s, i, h[n + 7], 22, -45705983), i = p(i, u, l, s, h[n + 8], 7, 1770035416), s = p(s, i, u, l, h[n + 9], 12, -1958414417), l = p(l, s, i, u, h[n + 10], 17, -42063), u = p(u, l, s, i, h[n + 11], 22, -1990404162), i = p(i, u, l, s, h[n + 12], 7, 1804603682), s = p(s, i, u, l, h[n + 13], 12, -40341101), l = p(l, s, i, u, h[n + 14], 17, -1502002290), u = p(u, l, s, i, h[n + 15], 22, 1236535329), i = g(i, u, l, s, h[n + 1], 5, -165796510), s = g(s, i, u, l, h[n + 6], 9, -1069501632), l = g(l, s, i, u, h[n + 11], 14, 643717713), u = g(u, l, s, i, h[n + 0], 20, -373897302), i = g(i, u, l, s, h[n + 5], 5, -701558691), s = g(s, i, u, l, h[n + 10], 9, 38016083), l = g(l, s, i, u, h[n + 15], 14, -660478335), u = g(u, l, s, i, h[n + 4], 20, -405537848), i = g(i, u, l, s, h[n + 9], 5, 568446438), s = g(s, i, u, l, h[n + 14], 9, -1019803690), l = g(l, s, i, u, h[n + 3], 14, -187363961), u = g(u, l, s, i, h[n + 8], 20, 1163531501), i = g(i, u, l, s, h[n + 13], 5, -1444681467), s = g(s, i, u, l, h[n + 2], 9, -51403784), l = g(l, s, i, u, h[n + 7], 14, 1735328473), u = g(u, l, s, i, h[n + 12], 20, -1926607734), i = y(i, u, l, s, h[n + 5], 4, -378558), s = y(s, i, u, l, h[n + 8], 11, -2022574463), l = y(l, s, i, u, h[n + 11], 16, 1839030562), u = y(u, l, s, i, h[n + 14], 23, -35309556), i = y(i, u, l, s, h[n + 1], 4, -1530992060), s = y(s, i, u, l, h[n + 4], 11, 1272893353), l = y(l, s, i, u, h[n + 7], 16, -155497632), u = y(u, l, s, i, h[n + 10], 23, -1094730640), i = y(i, u, l, s, h[n + 13], 4, 681279174), s = y(s, i, u, l, h[n + 0], 11, -358537222), l = y(l, s, i, u, h[n + 3], 16, -722521979), u = y(u, l, s, i, h[n + 6], 23, 76029189), i = y(i, u, l, s, h[n + 9], 4, -640364487), s = y(s, i, u, l, h[n + 12], 11, -421815835), l = y(l, s, i, u, h[n + 15], 16, 530742520), u = y(u, l, s, i, h[n + 2], 23, -995338651), i = b(i, u, l, s, h[n + 0], 6, -198630844), s = b(s, i, u, l, h[n + 7], 10, 1126891415), l = b(l, s, i, u, h[n + 14], 15, -1416354905), u = b(u, l, s, i, h[n + 5], 21, -57434055), i = b(i, u, l, s, h[n + 12], 6, 1700485571), s = b(s, i, u, l, h[n + 3], 10, -1894986606), l = b(l, s, i, u, h[n + 10], 15, -1051523), u = b(u, l, s, i, h[n + 1], 21, -2054922799), i = b(i, u, l, s, h[n + 8], 6, 1873313359), s = b(s, i, u, l, h[n + 15], 10, -30611744), l = b(l, s, i, u, h[n + 6], 15, -1560198380), u = b(u, l, s, i, h[n + 13], 21, 1309151649), i = b(i, u, l, s, h[n + 4], 6, -145523070), s = b(s, i, u, l, h[n + 11], 10, -1120210379), l = b(l, s, i, u, h[n + 2], 15, 718787259), u = b(u, l, s, i, h[n + 9], 21, -343485551), i = i + j >>> 0, u = u + U >>> 0, l = l + P >>> 0, s = s + I >>> 0;
|
|
127
127
|
}
|
|
128
|
-
return a.endian([i, u,
|
|
128
|
+
return a.endian([i, u, l, s]);
|
|
129
129
|
};
|
|
130
|
-
o._ff = function(
|
|
131
|
-
var s =
|
|
130
|
+
o._ff = function(c, f, h, d, i, u, l) {
|
|
131
|
+
var s = c + (f & h | ~f & d) + (i >>> 0) + l;
|
|
132
132
|
return (s << u | s >>> 32 - u) + f;
|
|
133
|
-
}, o._gg = function(
|
|
134
|
-
var s =
|
|
133
|
+
}, o._gg = function(c, f, h, d, i, u, l) {
|
|
134
|
+
var s = c + (f & d | h & ~d) + (i >>> 0) + l;
|
|
135
135
|
return (s << u | s >>> 32 - u) + f;
|
|
136
|
-
}, o._hh = function(
|
|
137
|
-
var s =
|
|
136
|
+
}, o._hh = function(c, f, h, d, i, u, l) {
|
|
137
|
+
var s = c + (f ^ h ^ d) + (i >>> 0) + l;
|
|
138
138
|
return (s << u | s >>> 32 - u) + f;
|
|
139
|
-
}, o._ii = function(
|
|
140
|
-
var s =
|
|
139
|
+
}, o._ii = function(c, f, h, d, i, u, l) {
|
|
140
|
+
var s = c + (h ^ (f | ~d)) + (i >>> 0) + l;
|
|
141
141
|
return (s << u | s >>> 32 - u) + f;
|
|
142
|
-
}, o._blocksize = 16, o._digestsize = 16,
|
|
143
|
-
if (
|
|
144
|
-
throw new Error("Illegal argument " +
|
|
145
|
-
var
|
|
146
|
-
return f && f.asBytes ?
|
|
142
|
+
}, o._blocksize = 16, o._digestsize = 16, be.exports = function(c, f) {
|
|
143
|
+
if (c == null)
|
|
144
|
+
throw new Error("Illegal argument " + c);
|
|
145
|
+
var h = a.wordsToBytes(o(c, f));
|
|
146
|
+
return f && f.asBytes ? h : f && f.asString ? r.bytesToString(h) : a.bytesToHex(h);
|
|
147
147
|
};
|
|
148
148
|
})();
|
|
149
|
-
var Fe =
|
|
150
|
-
const
|
|
151
|
-
var
|
|
152
|
-
class
|
|
149
|
+
var Fe = be.exports;
|
|
150
|
+
const Pe = /* @__PURE__ */ Ue(Fe);
|
|
151
|
+
var ne = /* @__PURE__ */ ((a) => (a.BOOTSTRAP = "bootstrap", a.DEBUG_EXTENSIONS = "debugExtensions", a.DEBUG_QUEUE = "debugQueue", a.DEBUG_DIALER = "debugDialer", a.FULL = "full", a))(ne || {}), se = /* @__PURE__ */ ((a) => (a.MAIN = "main", a.NEXT = "next", a))(se || {}), Z = /* @__PURE__ */ ((a) => (a.USER = "User", a.TOKEN = "Token", a))(Z || {});
|
|
152
|
+
class ce {
|
|
153
153
|
static async getSessionStorageDataByKey(t, e = !0) {
|
|
154
154
|
if (typeof chrome < "u" && typeof chrome.storage < "u") {
|
|
155
155
|
const r = await chrome.storage.session.get(t);
|
|
@@ -187,39 +187,39 @@ class Me {
|
|
|
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 = Pe(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())
|
|
194
194
|
return;
|
|
195
195
|
this.updateLastLoginTimestamp();
|
|
196
196
|
const e = await this.checkLoginStatus(this.storageKey);
|
|
197
|
-
return e || (
|
|
197
|
+
return e || (ce.clearSessionStorage(), await this.userLoginFunction(t, this.storageKey, this.eventsSdkClass.options.loginType));
|
|
198
198
|
}
|
|
199
199
|
updateLastLoginTimestamp() {
|
|
200
200
|
this.lastLoginTimestamp = (/* @__PURE__ */ new Date()).getTime();
|
|
201
201
|
}
|
|
202
202
|
async checkLoginStatus(t) {
|
|
203
|
-
const e = await
|
|
203
|
+
const e = await ce.getSessionStorageDataByKey(t);
|
|
204
204
|
if (e)
|
|
205
205
|
return e;
|
|
206
206
|
}
|
|
207
207
|
async userLoginFunction(t, e, r) {
|
|
208
|
-
let o,
|
|
208
|
+
let o, c, 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
|
+
), c = await this.getSettings(o.Data.AccessToken), f = {
|
|
214
214
|
...o.Data,
|
|
215
|
-
...
|
|
215
|
+
...c
|
|
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
|
-
}), await
|
|
222
|
+
}), await ce.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(
|
|
@@ -232,7 +232,7 @@ class Me {
|
|
|
232
232
|
throw new Error("Socket servers not defined");
|
|
233
233
|
if (this.eventsSdkClass.options.isNewStack && !this.eventsSdkClass.servers.length)
|
|
234
234
|
throw new Error("Socket servers not defined");
|
|
235
|
-
this.eventsSdkClass.server && this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${this.eventsSdkClass.server.Version}`), !this.eventsSdkClass.server && this.eventsSdkClass.URLList.length && this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${t.Version}`), t.IdentityCode && (this.token = t.IdentityCode, this.eventsSdkClass.connect(
|
|
235
|
+
this.eventsSdkClass.server && this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${this.eventsSdkClass.server.Version}`), !this.eventsSdkClass.server && this.eventsSdkClass.URLList.length && this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${t.Version}`), t.IdentityCode && (this.token = t.IdentityCode, this.eventsSdkClass.connect(se.MAIN)), t.Token && (this.token = t.Token, this.eventsSdkClass.connect(se.MAIN)), t.RefreshToken && t.IdentityCodeExpiry && this.eventsSdkClass.options.loginType === Z.USER && (this.refreshToken = t.RefreshToken, this.tokenExpiry = t.IdentityCodeExpiry, this.handleTokenExpiry()), t.RefreshToken && t.TokenExpiry && this.normalizeLoginType(this.eventsSdkClass.options.loginType) === Z.USER && (this.refreshToken = t.RefreshToken, this.tokenExpiry = t.TokenExpiry, this.handleTokenExpiry());
|
|
236
236
|
}
|
|
237
237
|
handleTokenExpiry() {
|
|
238
238
|
if (!this.eventsSdkClass.options.refreshTokenUrl)
|
|
@@ -247,34 +247,34 @@ class Me {
|
|
|
247
247
|
async () => {
|
|
248
248
|
if (this.refreshToken) {
|
|
249
249
|
this.eventsSdkClass.socketIoClass.closeAllConnections();
|
|
250
|
-
let o,
|
|
250
|
+
let o, c;
|
|
251
251
|
if (this.eventsSdkClass.options.isNewStack) {
|
|
252
252
|
const f = await this.externalRefreshToken(
|
|
253
253
|
this.eventsSdkClass.options.refreshTokenUrl,
|
|
254
254
|
this.refreshToken
|
|
255
255
|
);
|
|
256
|
-
o = await this.getSettings(f.Data.AccessToken),
|
|
256
|
+
o = await this.getSettings(f.Data.AccessToken), c = {
|
|
257
257
|
...f.Data,
|
|
258
258
|
...o
|
|
259
259
|
};
|
|
260
260
|
} else
|
|
261
|
-
|
|
261
|
+
c = {
|
|
262
262
|
...(await this.externalRefreshToken(
|
|
263
263
|
this.eventsSdkClass.options.refreshTokenUrl,
|
|
264
264
|
this.refreshToken
|
|
265
265
|
)).Data.Socket
|
|
266
266
|
};
|
|
267
|
-
this.onLoginResponse(
|
|
267
|
+
this.onLoginResponse(c), await ce.updateSessionStorageKey(this.storageKey, c);
|
|
268
268
|
}
|
|
269
269
|
},
|
|
270
270
|
r
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
|
-
async externalLogin(t, { password: e, token: r, email: o },
|
|
273
|
+
async externalLogin(t, { password: e, token: r, email: o }, c) {
|
|
274
274
|
if (!t)
|
|
275
275
|
throw new Error("loginUrl not provided");
|
|
276
276
|
let f;
|
|
277
|
-
this.eventsSdkClass.options.isNewStack ?
|
|
277
|
+
this.eventsSdkClass.options.isNewStack ? c === Z.TOKEN ? f = JSON.stringify({
|
|
278
278
|
identityType: Z.TOKEN,
|
|
279
279
|
token: r
|
|
280
280
|
}) : f = JSON.stringify({
|
|
@@ -285,7 +285,7 @@ class Me {
|
|
|
285
285
|
email: o,
|
|
286
286
|
pin: e
|
|
287
287
|
}), t = `${t}/${Z.USER}`);
|
|
288
|
-
let
|
|
288
|
+
let h;
|
|
289
289
|
try {
|
|
290
290
|
const d = await fetch(t, {
|
|
291
291
|
method: "POST",
|
|
@@ -295,17 +295,17 @@ class Me {
|
|
|
295
295
|
body: f
|
|
296
296
|
});
|
|
297
297
|
if (!d.ok && d.status === 400)
|
|
298
|
-
throw
|
|
298
|
+
throw h = 400, new Error("Bad body request. Login type or isNewStack values not correct or not provided");
|
|
299
299
|
if (!d.ok && d.status === 401)
|
|
300
|
-
throw
|
|
300
|
+
throw h = 401, new Error("Unauthorized. Invalid token provided");
|
|
301
301
|
if (!d.ok && d.status === 403)
|
|
302
|
-
throw
|
|
302
|
+
throw h = 403, new Error("Forbidden. Identity token not provided or not valid");
|
|
303
303
|
const i = await d.json();
|
|
304
304
|
if (i.error)
|
|
305
305
|
throw new Error(i.error);
|
|
306
306
|
return i;
|
|
307
307
|
} catch (d) {
|
|
308
|
-
throw this.eventsSdkClass.loggerClass.loginError(
|
|
308
|
+
throw this.eventsSdkClass.loggerClass.loginError(c, h, r, o), d;
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
async getSettings(t) {
|
|
@@ -372,25 +372,25 @@ const Le = {
|
|
|
372
372
|
};
|
|
373
373
|
function qe() {
|
|
374
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
|
-
function o(
|
|
376
|
-
if (!e[
|
|
377
|
-
if (!t[
|
|
375
|
+
function o(h, d) {
|
|
376
|
+
if (!e[h]) {
|
|
377
|
+
if (!t[h]) {
|
|
378
378
|
var i = typeof require == "function" && require;
|
|
379
379
|
if (!d && i)
|
|
380
|
-
return i(
|
|
381
|
-
if (
|
|
382
|
-
return h
|
|
383
|
-
throw new Error("Cannot find module '" +
|
|
384
|
-
}
|
|
385
|
-
var u = e[
|
|
386
|
-
t[
|
|
387
|
-
var s = t[
|
|
388
|
-
return o(s ||
|
|
380
|
+
return i(h, !0);
|
|
381
|
+
if (c)
|
|
382
|
+
return c(h, !0);
|
|
383
|
+
throw new Error("Cannot find module '" + h + "'");
|
|
384
|
+
}
|
|
385
|
+
var u = e[h] = { exports: {} };
|
|
386
|
+
t[h][0].call(u.exports, function(l) {
|
|
387
|
+
var s = t[h][1][l];
|
|
388
|
+
return o(s || l);
|
|
389
389
|
}, u, u.exports, a, t, e, r);
|
|
390
390
|
}
|
|
391
|
-
return e[
|
|
391
|
+
return e[h].exports;
|
|
392
392
|
}
|
|
393
|
-
for (var
|
|
393
|
+
for (var c = typeof require == "function" && require, f = 0; f < r.length; f++)
|
|
394
394
|
o(r[f]);
|
|
395
395
|
return o;
|
|
396
396
|
}({
|
|
@@ -400,23 +400,23 @@ function qe() {
|
|
|
400
400
|
2: [function(a, t, e) {
|
|
401
401
|
function r(i, u) {
|
|
402
402
|
typeof i == "object" && (u = i, i = void 0), u = u || {};
|
|
403
|
-
var
|
|
404
|
-
return u.forceNew || u["force new connection"] || u.multiplex === !1 ? (
|
|
403
|
+
var l, s = o(i), n = s.source, p = s.id;
|
|
404
|
+
return u.forceNew || u["force new connection"] || u.multiplex === !1 ? (h("ignoring socket cache for %s", n), l = f(n, u)) : (d[p] || (h("new io instance for %s", n), d[p] = f(n, u)), l = d[p]), l.socket(s.path);
|
|
405
405
|
}
|
|
406
|
-
var o = a("./url"),
|
|
406
|
+
var o = a("./url"), c = a("socket.io-parser"), f = a("./manager"), h = a("debug")("socket.io-client");
|
|
407
407
|
t.exports = e = r;
|
|
408
408
|
var d = e.managers = {};
|
|
409
|
-
e.protocol =
|
|
409
|
+
e.protocol = c.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
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
|
|
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 l({
|
|
414
414
|
min: this.reconnectionDelay(),
|
|
415
415
|
max: this.reconnectionDelayMax(),
|
|
416
416
|
jitter: this.randomizationFactor()
|
|
417
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 r = (a("./url"), a("engine.io-client")), o = a("./socket"),
|
|
419
|
+
var r = (a("./url"), a("engine.io-client")), o = a("./socket"), c = a("component-emitter"), f = a("socket.io-parser"), h = a("./on"), d = a("component-bind"), i = (a("object-component"), a("debug")("socket.io-client:manager")), u = a("indexof"), l = a("backo2");
|
|
420
420
|
t.exports = e, e.prototype.emitAll = function() {
|
|
421
421
|
this.emit.apply(this, arguments);
|
|
422
422
|
for (var s in this.nsps)
|
|
@@ -424,7 +424,7 @@ function qe() {
|
|
|
424
424
|
}, e.prototype.updateSocketIds = function() {
|
|
425
425
|
for (var s in this.nsps)
|
|
426
426
|
this.nsps[s].id = this.engine.id;
|
|
427
|
-
},
|
|
427
|
+
}, c(e.prototype), e.prototype.reconnection = function(s) {
|
|
428
428
|
return arguments.length ? (this._reconnection = !!s, this) : this._reconnection;
|
|
429
429
|
}, e.prototype.reconnectionAttempts = function(s) {
|
|
430
430
|
return arguments.length ? (this._reconnectionAttempts = s, this) : this._reconnectionAttempts;
|
|
@@ -444,24 +444,24 @@ function qe() {
|
|
|
444
444
|
i("opening %s", this.uri), this.engine = r(this.uri, this.opts);
|
|
445
445
|
var n = this.engine, p = this;
|
|
446
446
|
this.readyState = "opening", this.skipReconnect = !1;
|
|
447
|
-
var g =
|
|
447
|
+
var g = h(n, "open", function() {
|
|
448
448
|
p.onopen(), s && s();
|
|
449
|
-
}), y =
|
|
450
|
-
if (i("connect_error"), p.cleanup(), p.readyState = "closed", p.emitAll("connect_error",
|
|
451
|
-
var
|
|
452
|
-
|
|
449
|
+
}), y = h(n, "error", function(U) {
|
|
450
|
+
if (i("connect_error"), p.cleanup(), p.readyState = "closed", p.emitAll("connect_error", U), s) {
|
|
451
|
+
var P = new Error("Connection error");
|
|
452
|
+
P.data = U, s(P);
|
|
453
453
|
} else
|
|
454
454
|
p.maybeReconnectOnOpen();
|
|
455
455
|
});
|
|
456
456
|
if (this._timeout !== !1) {
|
|
457
|
-
var
|
|
458
|
-
i("connect attempt will timeout after %d",
|
|
459
|
-
var
|
|
460
|
-
i("connect attempt timed out after %d",
|
|
461
|
-
},
|
|
457
|
+
var b = this._timeout;
|
|
458
|
+
i("connect attempt will timeout after %d", b);
|
|
459
|
+
var j = setTimeout(function() {
|
|
460
|
+
i("connect attempt timed out after %d", b), g.destroy(), n.close(), n.emit("error", "timeout"), p.emitAll("connect_timeout", b);
|
|
461
|
+
}, b);
|
|
462
462
|
this.subs.push({
|
|
463
463
|
destroy: function() {
|
|
464
|
-
clearTimeout(
|
|
464
|
+
clearTimeout(j);
|
|
465
465
|
}
|
|
466
466
|
});
|
|
467
467
|
}
|
|
@@ -469,7 +469,7 @@ function qe() {
|
|
|
469
469
|
}, e.prototype.onopen = function() {
|
|
470
470
|
i("open"), this.cleanup(), this.readyState = "open", this.emit("open");
|
|
471
471
|
var s = this.engine;
|
|
472
|
-
this.subs.push(
|
|
472
|
+
this.subs.push(h(s, "data", d(this, "ondata"))), this.subs.push(h(this.decoder, "decoded", d(this, "ondecoded"))), this.subs.push(h(s, "error", d(this, "onerror"))), this.subs.push(h(s, "close", d(this, "onclose")));
|
|
473
473
|
}, e.prototype.ondata = function(s) {
|
|
474
474
|
this.decoder.add(s);
|
|
475
475
|
}, e.prototype.ondecoded = function(s) {
|
|
@@ -548,10 +548,10 @@ function qe() {
|
|
|
548
548
|
"socket.io-parser": 44
|
|
549
549
|
}],
|
|
550
550
|
4: [function(a, t) {
|
|
551
|
-
function e(r, o,
|
|
552
|
-
return r.on(o,
|
|
551
|
+
function e(r, o, c) {
|
|
552
|
+
return r.on(o, c), {
|
|
553
553
|
destroy: function() {
|
|
554
|
-
r.removeListener(o,
|
|
554
|
+
r.removeListener(o, c);
|
|
555
555
|
}
|
|
556
556
|
};
|
|
557
557
|
}
|
|
@@ -561,9 +561,9 @@ function qe() {
|
|
|
561
561
|
function r(n, p) {
|
|
562
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"),
|
|
564
|
+
var o = a("socket.io-parser"), c = a("component-emitter"), f = a("to-array"), h = a("./on"), d = a("component-bind"), i = a("debug")("socket.io-client:socket"), u = a("has-binary");
|
|
565
565
|
t.exports = r;
|
|
566
|
-
var
|
|
566
|
+
var l = {
|
|
567
567
|
connect: 1,
|
|
568
568
|
connect_error: 1,
|
|
569
569
|
connect_timeout: 1,
|
|
@@ -574,11 +574,11 @@ function qe() {
|
|
|
574
574
|
reconnect_failed: 1,
|
|
575
575
|
reconnect_error: 1,
|
|
576
576
|
reconnecting: 1
|
|
577
|
-
}, s =
|
|
578
|
-
|
|
577
|
+
}, s = c.prototype.emit;
|
|
578
|
+
c(r.prototype), r.prototype.subEvents = function() {
|
|
579
579
|
if (!this.subs) {
|
|
580
580
|
var n = this.io;
|
|
581
|
-
this.subs = [
|
|
581
|
+
this.subs = [h(n, "open", d(this, "onopen")), h(n, "packet", d(this, "onpacket")), h(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);
|
|
@@ -586,7 +586,7 @@ function qe() {
|
|
|
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
|
-
if (
|
|
589
|
+
if (l.hasOwnProperty(n))
|
|
590
590
|
return s.apply(this, arguments), this;
|
|
591
591
|
var p = f(arguments), g = o.EVENT;
|
|
592
592
|
u(p) && (g = o.BINARY_EVENT);
|
|
@@ -632,8 +632,8 @@ function qe() {
|
|
|
632
632
|
g = !0;
|
|
633
633
|
var y = f(arguments);
|
|
634
634
|
i("sending ack %j", y);
|
|
635
|
-
var
|
|
636
|
-
p.packet({ type:
|
|
635
|
+
var b = u(y) ? o.BINARY_ACK : o.ACK;
|
|
636
|
+
p.packet({ type: b, id: n, data: y });
|
|
637
637
|
}
|
|
638
638
|
};
|
|
639
639
|
}, r.prototype.onack = function(n) {
|
|
@@ -674,9 +674,9 @@ function qe() {
|
|
|
674
674
|
(function(e) {
|
|
675
675
|
function r(f, i) {
|
|
676
676
|
var d = f, i = i || e.location;
|
|
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) || (
|
|
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) || (c("protocol-less url %s", f), f = typeof i < "u" ? i.protocol + "//" + f : "https://" + f), c("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
|
-
var o = a("parseuri"),
|
|
679
|
+
var o = a("parseuri"), c = a("debug")("socket.io-client:url");
|
|
680
680
|
t.exports = r;
|
|
681
681
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
682
682
|
}, { debug: 10, parseuri: 42 }],
|
|
@@ -687,8 +687,8 @@ function qe() {
|
|
|
687
687
|
t.exports = e, e.prototype.duration = function() {
|
|
688
688
|
var r = this.ms * Math.pow(this.factor, this.attempts++);
|
|
689
689
|
if (this.jitter) {
|
|
690
|
-
var o = Math.random(),
|
|
691
|
-
r = 1 & Math.floor(10 * o) ? r +
|
|
690
|
+
var o = Math.random(), c = Math.floor(o * this.jitter * r);
|
|
691
|
+
r = 1 & Math.floor(10 * o) ? r + c : r - c;
|
|
692
692
|
}
|
|
693
693
|
return 0 | Math.min(r, this.max);
|
|
694
694
|
}, e.prototype.reset = function() {
|
|
@@ -706,9 +706,9 @@ function qe() {
|
|
|
706
706
|
t.exports = function(r, o) {
|
|
707
707
|
if (typeof o == "string" && (o = r[o]), typeof o != "function")
|
|
708
708
|
throw new Error("bind() requires a function");
|
|
709
|
-
var
|
|
709
|
+
var c = e.call(arguments, 2);
|
|
710
710
|
return function() {
|
|
711
|
-
return o.apply(r,
|
|
711
|
+
return o.apply(r, c.concat(e.call(arguments)));
|
|
712
712
|
};
|
|
713
713
|
};
|
|
714
714
|
}, {}],
|
|
@@ -717,19 +717,19 @@ function qe() {
|
|
|
717
717
|
return o ? r(o) : void 0;
|
|
718
718
|
}
|
|
719
719
|
function r(o) {
|
|
720
|
-
for (var
|
|
721
|
-
o[
|
|
720
|
+
for (var c in e.prototype)
|
|
721
|
+
o[c] = e.prototype[c];
|
|
722
722
|
return o;
|
|
723
723
|
}
|
|
724
|
-
t.exports = e, e.prototype.on = e.prototype.addEventListener = function(o,
|
|
725
|
-
return this._callbacks = this._callbacks || {}, (this._callbacks[o] = this._callbacks[o] || []).push(
|
|
726
|
-
}, e.prototype.once = function(o,
|
|
724
|
+
t.exports = e, e.prototype.on = e.prototype.addEventListener = function(o, c) {
|
|
725
|
+
return this._callbacks = this._callbacks || {}, (this._callbacks[o] = this._callbacks[o] || []).push(c), this;
|
|
726
|
+
}, e.prototype.once = function(o, c) {
|
|
727
727
|
function f() {
|
|
728
|
-
|
|
728
|
+
h.off(o, f), c.apply(this, arguments);
|
|
729
729
|
}
|
|
730
|
-
var
|
|
731
|
-
return this._callbacks = this._callbacks || {}, f.fn =
|
|
732
|
-
}, e.prototype.off = e.prototype.removeListener = e.prototype.removeAllListeners = e.prototype.removeEventListener = function(o,
|
|
730
|
+
var h = this;
|
|
731
|
+
return this._callbacks = this._callbacks || {}, f.fn = c, this.on(o, f), this;
|
|
732
|
+
}, e.prototype.off = e.prototype.removeListener = e.prototype.removeAllListeners = e.prototype.removeEventListener = function(o, c) {
|
|
733
733
|
if (this._callbacks = this._callbacks || {}, arguments.length == 0)
|
|
734
734
|
return this._callbacks = {}, this;
|
|
735
735
|
var f = this._callbacks[o];
|
|
@@ -737,19 +737,19 @@ function qe() {
|
|
|
737
737
|
return this;
|
|
738
738
|
if (arguments.length == 1)
|
|
739
739
|
return delete this._callbacks[o], this;
|
|
740
|
-
for (var
|
|
741
|
-
if (
|
|
740
|
+
for (var h, d = 0; d < f.length; d++)
|
|
741
|
+
if (h = f[d], h === c || h.fn === c) {
|
|
742
742
|
f.splice(d, 1);
|
|
743
743
|
break;
|
|
744
744
|
}
|
|
745
745
|
return this;
|
|
746
746
|
}, e.prototype.emit = function(o) {
|
|
747
747
|
this._callbacks = this._callbacks || {};
|
|
748
|
-
var
|
|
748
|
+
var c = [].slice.call(arguments, 1), f = this._callbacks[o];
|
|
749
749
|
if (f) {
|
|
750
750
|
f = f.slice(0);
|
|
751
|
-
for (var
|
|
752
|
-
f[
|
|
751
|
+
for (var h = 0, d = f.length; d > h; ++h)
|
|
752
|
+
f[h].apply(this, c);
|
|
753
753
|
}
|
|
754
754
|
return this;
|
|
755
755
|
}, e.prototype.listeners = function(o) {
|
|
@@ -760,10 +760,10 @@ function qe() {
|
|
|
760
760
|
}, {}],
|
|
761
761
|
10: [function(a, t) {
|
|
762
762
|
function e(o) {
|
|
763
|
-
return e.enabled(o) ? function(
|
|
764
|
-
|
|
765
|
-
var f = /* @__PURE__ */ new Date(),
|
|
766
|
-
e[o] = f,
|
|
763
|
+
return e.enabled(o) ? function(c) {
|
|
764
|
+
c = r(c);
|
|
765
|
+
var f = /* @__PURE__ */ new Date(), h = f - (e[o] || f);
|
|
766
|
+
e[o] = f, c = o + " " + c + " +" + e.humanize(h), window.console && console.log && Function.prototype.apply.call(console.log, console, arguments);
|
|
767
767
|
} : function() {
|
|
768
768
|
};
|
|
769
769
|
}
|
|
@@ -775,19 +775,19 @@ function qe() {
|
|
|
775
775
|
localStorage.debug = o;
|
|
776
776
|
} catch {
|
|
777
777
|
}
|
|
778
|
-
for (var
|
|
779
|
-
o = h
|
|
778
|
+
for (var c = (o || "").split(/[\s,]+/), f = c.length, h = 0; f > h; h++)
|
|
779
|
+
o = c[h].replace("*", ".*?"), o[0] === "-" ? e.skips.push(new RegExp("^" + o.substr(1) + "$")) : e.names.push(new RegExp("^" + o + "$"));
|
|
780
780
|
}, e.disable = function() {
|
|
781
781
|
e.enable("");
|
|
782
782
|
}, e.humanize = function(o) {
|
|
783
|
-
var
|
|
784
|
-
return o >=
|
|
783
|
+
var c = 1e3, f = 6e4, h = 60 * f;
|
|
784
|
+
return o >= h ? (o / h).toFixed(1) + "h" : o >= f ? (o / f).toFixed(1) + "m" : o >= c ? (o / c | 0) + "s" : o + "ms";
|
|
785
785
|
}, e.enabled = function(o) {
|
|
786
|
-
for (var
|
|
787
|
-
if (e.skips[
|
|
786
|
+
for (var c = 0, f = e.skips.length; f > c; c++)
|
|
787
|
+
if (e.skips[c].test(o))
|
|
788
788
|
return !1;
|
|
789
|
-
for (var
|
|
790
|
-
if (e.names[
|
|
789
|
+
for (var c = 0, f = e.names.length; f > c; c++)
|
|
790
|
+
if (e.names[c].test(o))
|
|
791
791
|
return !0;
|
|
792
792
|
return !1;
|
|
793
793
|
};
|
|
@@ -819,12 +819,12 @@ function qe() {
|
|
|
819
819
|
n.hasOwnProperty(g) && (p[g] = n[g]);
|
|
820
820
|
return p;
|
|
821
821
|
}
|
|
822
|
-
var
|
|
822
|
+
var c = a("./transports"), f = a("component-emitter"), h = a("debug")("engine.io-client:socket"), d = a("indexof"), i = a("engine.io-parser"), u = a("parseuri"), l = a("parsejson"), s = a("parseqs");
|
|
823
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
|
+
h('creating transport "%s"', n);
|
|
825
825
|
var p = o(this.query);
|
|
826
826
|
p.EIO = i.protocol, p.transport = n, this.id && (p.sid = this.id);
|
|
827
|
-
var g = new
|
|
827
|
+
var g = new c[n]({
|
|
828
828
|
agent: this.agent,
|
|
829
829
|
hostname: this.hostname,
|
|
830
830
|
port: this.port,
|
|
@@ -870,9 +870,9 @@ function qe() {
|
|
|
870
870
|
}
|
|
871
871
|
p.open(), this.setTransport(p);
|
|
872
872
|
}, r.prototype.setTransport = function(n) {
|
|
873
|
-
|
|
873
|
+
h("setting transport %s", n.name);
|
|
874
874
|
var p = this;
|
|
875
|
-
this.transport && (
|
|
875
|
+
this.transport && (h("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);
|
|
@@ -883,61 +883,61 @@ function qe() {
|
|
|
883
883
|
});
|
|
884
884
|
}, r.prototype.probe = function(n) {
|
|
885
885
|
function p() {
|
|
886
|
-
if (
|
|
887
|
-
var A = !this.supportsBinary &&
|
|
886
|
+
if (w.onlyBinaryUpgrades) {
|
|
887
|
+
var A = !this.supportsBinary && w.transport.supportsBinary;
|
|
888
888
|
k = k || A;
|
|
889
889
|
}
|
|
890
|
-
k || (
|
|
890
|
+
k || (h('probe transport "%s" opened', n), I.send([{
|
|
891
891
|
type: "ping",
|
|
892
892
|
data: "probe"
|
|
893
893
|
}]), I.once("packet", function(v) {
|
|
894
894
|
if (!k)
|
|
895
895
|
if (v.type == "pong" && v.data == "probe") {
|
|
896
|
-
if (
|
|
896
|
+
if (h('probe transport "%s" pong', n), w.upgrading = !0, w.emit("upgrading", I), !I)
|
|
897
897
|
return;
|
|
898
|
-
r.priorWebsocketSuccess = I.name == "websocket",
|
|
899
|
-
k ||
|
|
898
|
+
r.priorWebsocketSuccess = I.name == "websocket", h('pausing current transport "%s"', w.transport.name), w.transport.pause(function() {
|
|
899
|
+
k || w.readyState != "closed" && (h("changing transport and sending upgrade packet"), P(), w.setTransport(I), I.send([{ type: "upgrade" }]), w.emit("upgrade", I), I = null, w.upgrading = !1, w.flush());
|
|
900
900
|
});
|
|
901
901
|
} else {
|
|
902
|
-
|
|
902
|
+
h('probe transport "%s" failed', n);
|
|
903
903
|
var m = new Error("probe error");
|
|
904
|
-
m.transport = I.name,
|
|
904
|
+
m.transport = I.name, w.emit("upgradeError", m);
|
|
905
905
|
}
|
|
906
906
|
}));
|
|
907
907
|
}
|
|
908
908
|
function g() {
|
|
909
|
-
k || (k = !0,
|
|
909
|
+
k || (k = !0, P(), I.close(), I = null);
|
|
910
910
|
}
|
|
911
911
|
function y(A) {
|
|
912
912
|
var v = new Error("probe error: " + A);
|
|
913
|
-
v.transport = I.name, g(),
|
|
913
|
+
v.transport = I.name, g(), h('probe transport "%s" failed because of error: %s', n, A), w.emit("upgradeError", v);
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function b() {
|
|
916
916
|
y("transport closed");
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function j() {
|
|
919
919
|
y("socket closed");
|
|
920
920
|
}
|
|
921
|
-
function
|
|
922
|
-
I && A.name != I.name && (
|
|
921
|
+
function U(A) {
|
|
922
|
+
I && A.name != I.name && (h('"%s" works - aborting "%s"', A.name, I.name), g());
|
|
923
923
|
}
|
|
924
|
-
function
|
|
925
|
-
I.removeListener("open", p), I.removeListener("error", y), I.removeListener("close",
|
|
924
|
+
function P() {
|
|
925
|
+
I.removeListener("open", p), I.removeListener("error", y), I.removeListener("close", b), w.removeListener("close", j), w.removeListener("upgrading", U);
|
|
926
926
|
}
|
|
927
|
-
|
|
928
|
-
var I = this.createTransport(n, { probe: 1 }), k = !1,
|
|
929
|
-
r.priorWebsocketSuccess = !1, I.once("open", p), I.once("error", y), I.once("close",
|
|
927
|
+
h('probing transport "%s"', n);
|
|
928
|
+
var I = this.createTransport(n, { probe: 1 }), k = !1, w = this;
|
|
929
|
+
r.priorWebsocketSuccess = !1, I.once("open", p), I.once("error", y), I.once("close", b), this.once("close", j), this.once("upgrading", U), I.open();
|
|
930
930
|
}, r.prototype.onOpen = function() {
|
|
931
|
-
if (
|
|
932
|
-
|
|
931
|
+
if (h("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
|
+
h("starting upgrade probes");
|
|
933
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
|
-
switch (
|
|
938
|
+
switch (h('socket receive: type "%s", data "%s"', n.type, n.data), this.emit("packet", n), this.emit("heartbeat"), n.type) {
|
|
939
939
|
case "open":
|
|
940
|
-
this.onHandshake(
|
|
940
|
+
this.onHandshake(l(n.data));
|
|
941
941
|
break;
|
|
942
942
|
case "pong":
|
|
943
943
|
this.setPing();
|
|
@@ -950,7 +950,7 @@ function qe() {
|
|
|
950
950
|
this.emit("data", n.data), this.emit("message", n.data);
|
|
951
951
|
}
|
|
952
952
|
else
|
|
953
|
-
|
|
953
|
+
h('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) {
|
|
@@ -962,7 +962,7 @@ function qe() {
|
|
|
962
962
|
}, r.prototype.setPing = function() {
|
|
963
963
|
var n = this;
|
|
964
964
|
clearTimeout(n.pingIntervalTimer), n.pingIntervalTimer = setTimeout(function() {
|
|
965
|
-
|
|
965
|
+
h("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");
|
|
@@ -971,7 +971,7 @@ function qe() {
|
|
|
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
|
-
this.readyState != "closed" && this.transport.writable && !this.upgrading && this.writeBuffer.length && (
|
|
974
|
+
this.readyState != "closed" && this.transport.writable && !this.upgrading && this.writeBuffer.length && (h("flushing %d packets in socket", this.writeBuffer.length), this.transport.send(this.writeBuffer), this.prevBufferLen = this.writeBuffer.length, this.emit("flush"));
|
|
975
975
|
}, r.prototype.write = r.prototype.send = function(n, p) {
|
|
976
976
|
return this.sendPacket("message", n, p), this;
|
|
977
977
|
}, r.prototype.sendPacket = function(n, p, g) {
|
|
@@ -981,7 +981,7 @@ function qe() {
|
|
|
981
981
|
}
|
|
982
982
|
}, r.prototype.close = function() {
|
|
983
983
|
function n() {
|
|
984
|
-
y.onClose("forced close"),
|
|
984
|
+
y.onClose("forced close"), h("socket closing - telling transport to close"), y.transport.close();
|
|
985
985
|
}
|
|
986
986
|
function p() {
|
|
987
987
|
y.removeListener("upgrade", p), y.removeListener("upgradeError", p), n();
|
|
@@ -998,10 +998,10 @@ function qe() {
|
|
|
998
998
|
}
|
|
999
999
|
return this;
|
|
1000
1000
|
}, r.prototype.onError = function(n) {
|
|
1001
|
-
|
|
1001
|
+
h("socket error %j", n), r.priorWebsocketSuccess = !1, this.emit("error", n), this.onClose("transport error", n);
|
|
1002
1002
|
}, r.prototype.onClose = function(n, p) {
|
|
1003
1003
|
if (this.readyState == "opening" || this.readyState == "open" || this.readyState == "closing") {
|
|
1004
|
-
|
|
1004
|
+
h('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;
|
|
@@ -1025,28 +1025,28 @@ function qe() {
|
|
|
1025
1025
|
parseuri: 34
|
|
1026
1026
|
}],
|
|
1027
1027
|
14: [function(a, t) {
|
|
1028
|
-
function e(
|
|
1029
|
-
this.path =
|
|
1028
|
+
function e(c) {
|
|
1029
|
+
this.path = c.path, this.hostname = c.hostname, this.port = c.port, this.secure = c.secure, this.query = c.query, this.timestampParam = c.timestampParam, this.timestampRequests = c.timestampRequests, this.readyState = "", this.agent = c.agent || !1, this.socket = c.socket, this.enablesXDR = c.enablesXDR, this.pfx = c.pfx, this.key = c.key, this.passphrase = c.passphrase, this.cert = c.cert, this.ca = c.ca, this.ciphers = c.ciphers, this.rejectUnauthorized = c.rejectUnauthorized;
|
|
1030
1030
|
}
|
|
1031
1031
|
var r = a("engine.io-parser"), o = a("component-emitter");
|
|
1032
|
-
t.exports = e, o(e.prototype), e.timestamps = 0, e.prototype.onError = function(
|
|
1033
|
-
var
|
|
1034
|
-
return
|
|
1032
|
+
t.exports = e, o(e.prototype), e.timestamps = 0, e.prototype.onError = function(c, f) {
|
|
1033
|
+
var h = new Error(c);
|
|
1034
|
+
return h.type = "TransportError", h.description = f, this.emit("error", h), this;
|
|
1035
1035
|
}, e.prototype.open = function() {
|
|
1036
1036
|
return (this.readyState == "closed" || this.readyState == "") && (this.readyState = "opening", this.doOpen()), this;
|
|
1037
1037
|
}, e.prototype.close = function() {
|
|
1038
1038
|
return (this.readyState == "opening" || this.readyState == "open") && (this.doClose(), this.onClose()), this;
|
|
1039
|
-
}, e.prototype.send = function(
|
|
1039
|
+
}, e.prototype.send = function(c) {
|
|
1040
1040
|
if (this.readyState != "open")
|
|
1041
1041
|
throw new Error("Transport not open");
|
|
1042
|
-
this.write(
|
|
1042
|
+
this.write(c);
|
|
1043
1043
|
}, e.prototype.onOpen = function() {
|
|
1044
1044
|
this.readyState = "open", this.writable = !0, this.emit("open");
|
|
1045
|
-
}, e.prototype.onData = function(
|
|
1046
|
-
var f = r.decodePacket(
|
|
1045
|
+
}, e.prototype.onData = function(c) {
|
|
1046
|
+
var f = r.decodePacket(c, this.socket.binaryType);
|
|
1047
1047
|
this.onPacket(f);
|
|
1048
|
-
}, e.prototype.onPacket = function(
|
|
1049
|
-
this.emit("packet",
|
|
1048
|
+
}, e.prototype.onPacket = function(c) {
|
|
1049
|
+
this.emit("packet", c);
|
|
1050
1050
|
}, e.prototype.onClose = function() {
|
|
1051
1051
|
this.readyState = "closed", this.emit("close");
|
|
1052
1052
|
};
|
|
@@ -1054,18 +1054,18 @@ function qe() {
|
|
|
1054
1054
|
15: [function(a, t, e) {
|
|
1055
1055
|
(function(r) {
|
|
1056
1056
|
function o(i) {
|
|
1057
|
-
var u,
|
|
1057
|
+
var u, l = !1, s = !1, n = i.jsonp !== !1;
|
|
1058
1058
|
if (r.location) {
|
|
1059
1059
|
var p = location.protocol == "https:", g = location.port;
|
|
1060
|
-
g || (g = p ? 443 : 80),
|
|
1060
|
+
g || (g = p ? 443 : 80), l = i.hostname != location.hostname || g != i.port, s = i.secure != p;
|
|
1061
1061
|
}
|
|
1062
|
-
if (i.xdomain =
|
|
1062
|
+
if (i.xdomain = l, i.xscheme = s, u = new c(i), "open" in u && !i.forceJSONP)
|
|
1063
1063
|
return new f(i);
|
|
1064
1064
|
if (!n)
|
|
1065
1065
|
throw new Error("JSONP disabled");
|
|
1066
|
-
return new
|
|
1066
|
+
return new h(i);
|
|
1067
1067
|
}
|
|
1068
|
-
var
|
|
1068
|
+
var c = a("xmlhttprequest"), f = a("./polling-xhr"), h = a("./polling-jsonp"), d = a("./websocket");
|
|
1069
1069
|
e.polling = o, e.websocket = d;
|
|
1070
1070
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1071
1071
|
}, { "./polling-jsonp": 16, "./polling-xhr": 17, "./websocket": 19, xmlhttprequest: 20 }],
|
|
@@ -1074,45 +1074,45 @@ function qe() {
|
|
|
1074
1074
|
function r() {
|
|
1075
1075
|
}
|
|
1076
1076
|
function o(u) {
|
|
1077
|
-
|
|
1078
|
-
var
|
|
1079
|
-
|
|
1080
|
-
|
|
1077
|
+
c.call(this, u), this.query = this.query || {}, h || (e.___eio || (e.___eio = []), h = e.___eio), this.index = h.length;
|
|
1078
|
+
var l = this;
|
|
1079
|
+
h.push(function(s) {
|
|
1080
|
+
l.onData(s);
|
|
1081
1081
|
}), this.query.j = this.index, e.document && e.addEventListener && e.addEventListener("beforeunload", function() {
|
|
1082
|
-
|
|
1082
|
+
l.script && (l.script.onerror = r);
|
|
1083
1083
|
}, !1);
|
|
1084
1084
|
}
|
|
1085
|
-
var
|
|
1085
|
+
var c = a("./polling"), f = a("component-inherit");
|
|
1086
1086
|
t.exports = o;
|
|
1087
|
-
var
|
|
1088
|
-
f(o,
|
|
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),
|
|
1087
|
+
var h, d = /\n/g, i = /\\n/g;
|
|
1088
|
+
f(o, c), o.prototype.supportsBinary = !1, o.prototype.doClose = function() {
|
|
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), c.prototype.doClose.call(this);
|
|
1090
1090
|
}, o.prototype.doPoll = function() {
|
|
1091
|
-
var u = this,
|
|
1092
|
-
this.script && (this.script.parentNode.removeChild(this.script), this.script = null),
|
|
1091
|
+
var u = this, l = document.createElement("script");
|
|
1092
|
+
this.script && (this.script.parentNode.removeChild(this.script), this.script = null), l.async = !0, l.src = this.uri(), l.onerror = function(p) {
|
|
1093
1093
|
u.onError("jsonp poll error", p);
|
|
1094
1094
|
};
|
|
1095
1095
|
var s = document.getElementsByTagName("script")[0];
|
|
1096
|
-
s.parentNode.insertBefore(
|
|
1096
|
+
s.parentNode.insertBefore(l, s), this.script = l;
|
|
1097
1097
|
var n = typeof navigator < "u" && /gecko/i.test(navigator.userAgent);
|
|
1098
1098
|
n && setTimeout(function() {
|
|
1099
1099
|
var p = document.createElement("iframe");
|
|
1100
1100
|
document.body.appendChild(p), document.body.removeChild(p);
|
|
1101
1101
|
}, 100);
|
|
1102
|
-
}, o.prototype.doWrite = function(u,
|
|
1102
|
+
}, o.prototype.doWrite = function(u, l) {
|
|
1103
1103
|
function s() {
|
|
1104
|
-
n(),
|
|
1104
|
+
n(), l();
|
|
1105
1105
|
}
|
|
1106
1106
|
function n() {
|
|
1107
1107
|
if (p.iframe)
|
|
1108
1108
|
try {
|
|
1109
1109
|
p.form.removeChild(p.iframe);
|
|
1110
|
-
} catch (
|
|
1111
|
-
p.onError("jsonp polling iframe removal error",
|
|
1110
|
+
} catch (P) {
|
|
1111
|
+
p.onError("jsonp polling iframe removal error", P);
|
|
1112
1112
|
}
|
|
1113
1113
|
try {
|
|
1114
|
-
var
|
|
1115
|
-
g = document.createElement(
|
|
1114
|
+
var U = '<iframe src="javascript:0" name="' + p.iframeId + '">';
|
|
1115
|
+
g = document.createElement(U);
|
|
1116
1116
|
} catch {
|
|
1117
1117
|
g = document.createElement("iframe"), g.name = p.iframeId, g.src = "javascript:0";
|
|
1118
1118
|
}
|
|
@@ -1120,8 +1120,8 @@ function qe() {
|
|
|
1120
1120
|
}
|
|
1121
1121
|
var p = this;
|
|
1122
1122
|
if (!this.form) {
|
|
1123
|
-
var g, y = document.createElement("form"),
|
|
1124
|
-
y.className = "socketio", y.style.position = "absolute", y.style.top = "-1000px", y.style.left = "-1000px", y.target =
|
|
1123
|
+
var g, y = document.createElement("form"), b = document.createElement("textarea"), j = this.iframeId = "eio_iframe_" + this.index;
|
|
1124
|
+
y.className = "socketio", y.style.position = "absolute", y.style.top = "-1000px", y.style.left = "-1000px", y.target = j, y.method = "POST", y.setAttribute("accept-charset", "utf-8"), b.name = "d", y.appendChild(b), document.body.appendChild(y), this.form = y, this.area = b;
|
|
1125
1125
|
}
|
|
1126
1126
|
this.form.action = this.uri(), n(), u = u.replace(i, `\\
|
|
1127
1127
|
`), this.area.value = u.replace(d, "\\n");
|
|
@@ -1145,35 +1145,35 @@ function qe() {
|
|
|
1145
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
|
|
1148
|
+
function c(s) {
|
|
1149
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 s in
|
|
1153
|
-
|
|
1152
|
+
for (var s in c.requests)
|
|
1153
|
+
c.requests.hasOwnProperty(s) && c.requests[s].abort();
|
|
1154
1154
|
}
|
|
1155
|
-
var
|
|
1156
|
-
t.exports = o, t.exports.Request =
|
|
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
|
|
1155
|
+
var h = a("xmlhttprequest"), d = a("./polling"), i = a("component-emitter"), u = a("component-inherit"), l = a("debug")("engine.io-client:polling-xhr");
|
|
1156
|
+
t.exports = o, t.exports.Request = c, 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 c(s);
|
|
1158
1158
|
}, o.prototype.doWrite = function(s, n) {
|
|
1159
1159
|
var p = typeof s != "string" && s !== void 0, g = this.request({ method: "POST", data: s, isBinary: p }), y = this;
|
|
1160
|
-
g.on("success", n), g.on("error", function(
|
|
1161
|
-
y.onError("xhr post error",
|
|
1160
|
+
g.on("success", n), g.on("error", function(b) {
|
|
1161
|
+
y.onError("xhr post error", b);
|
|
1162
1162
|
}), this.sendXhr = g;
|
|
1163
1163
|
}, o.prototype.doPoll = function() {
|
|
1164
|
-
|
|
1164
|
+
l("xhr poll");
|
|
1165
1165
|
var s = this.request(), n = this;
|
|
1166
1166
|
s.on("data", function(p) {
|
|
1167
1167
|
n.onData(p);
|
|
1168
1168
|
}), s.on("error", function(p) {
|
|
1169
1169
|
n.onError("xhr poll error", p);
|
|
1170
1170
|
}), this.pollXhr = s;
|
|
1171
|
-
}, i(
|
|
1171
|
+
}, i(c.prototype), c.prototype.create = function() {
|
|
1172
1172
|
var s = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };
|
|
1173
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
|
|
1174
|
+
var n = this.xhr = new h(s), p = this;
|
|
1175
1175
|
try {
|
|
1176
|
-
if (
|
|
1176
|
+
if (l("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 {
|
|
1178
1178
|
this.isBinary ? n.setRequestHeader("Content-type", "application/octet-stream") : n.setRequestHeader("Content-type", "text/plain;charset=UTF-8");
|
|
1179
1179
|
} catch {
|
|
@@ -1186,29 +1186,29 @@ function qe() {
|
|
|
1186
1186
|
n.readyState == 4 && (n.status == 200 || n.status == 1223 ? p.onLoad() : setTimeout(function() {
|
|
1187
1187
|
p.onError(n.status);
|
|
1188
1188
|
}, 0));
|
|
1189
|
-
},
|
|
1189
|
+
}, l("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
|
-
e.document && (this.index =
|
|
1196
|
-
},
|
|
1195
|
+
e.document && (this.index = c.requestsCount++, c.requests[this.index] = this);
|
|
1196
|
+
}, c.prototype.onSuccess = function() {
|
|
1197
1197
|
this.emit("success"), this.cleanup();
|
|
1198
|
-
},
|
|
1198
|
+
}, c.prototype.onData = function(s) {
|
|
1199
1199
|
this.emit("data", s), this.onSuccess();
|
|
1200
|
-
},
|
|
1200
|
+
}, c.prototype.onError = function(s) {
|
|
1201
1201
|
this.emit("error", s), this.cleanup(!0);
|
|
1202
|
-
},
|
|
1202
|
+
}, c.prototype.cleanup = function(s) {
|
|
1203
1203
|
if (typeof this.xhr < "u" && this.xhr !== null) {
|
|
1204
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 {
|
|
1208
1208
|
}
|
|
1209
|
-
e.document && delete
|
|
1209
|
+
e.document && delete c.requests[this.index], this.xhr = null;
|
|
1210
1210
|
}
|
|
1211
|
-
},
|
|
1211
|
+
}, c.prototype.onLoad = function() {
|
|
1212
1212
|
var s;
|
|
1213
1213
|
try {
|
|
1214
1214
|
var n;
|
|
@@ -1221,11 +1221,11 @@ function qe() {
|
|
|
1221
1221
|
this.onError(p);
|
|
1222
1222
|
}
|
|
1223
1223
|
s != null && this.onData(s);
|
|
1224
|
-
},
|
|
1224
|
+
}, c.prototype.hasXDR = function() {
|
|
1225
1225
|
return typeof e.XDomainRequest < "u" && !this.xs && this.enablesXDR;
|
|
1226
|
-
},
|
|
1226
|
+
}, c.prototype.abort = function() {
|
|
1227
1227
|
this.cleanup();
|
|
1228
|
-
}, e.document && (
|
|
1228
|
+
}, e.document && (c.requestsCount = 0, c.requests = {}, e.attachEvent ? e.attachEvent("onunload", f) : e.addEventListener && e.addEventListener("beforeunload", f, !1));
|
|
1229
1229
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1230
1230
|
}, { "./polling": 18, "component-emitter": 9, "component-inherit": 21, debug: 22, xmlhttprequest: 20 }],
|
|
1231
1231
|
18: [function(a, t) {
|
|
@@ -1233,7 +1233,7 @@ function qe() {
|
|
|
1233
1233
|
var u = i && i.forceBase64;
|
|
1234
1234
|
(!d || u) && (this.supportsBinary = !1), r.call(this, i);
|
|
1235
1235
|
}
|
|
1236
|
-
var r = a("../transport"), o = a("parseqs"),
|
|
1236
|
+
var r = a("../transport"), o = a("parseqs"), c = a("engine.io-parser"), f = a("component-inherit"), h = a("debug")("engine.io-client:polling");
|
|
1237
1237
|
t.exports = e;
|
|
1238
1238
|
var d = function() {
|
|
1239
1239
|
var i = a("xmlhttprequest"), u = new i({ xdomain: !1 });
|
|
@@ -1243,45 +1243,45 @@ function qe() {
|
|
|
1243
1243
|
this.poll();
|
|
1244
1244
|
}, e.prototype.pause = function(i) {
|
|
1245
1245
|
function u() {
|
|
1246
|
-
|
|
1246
|
+
h("paused"), l.readyState = "paused", i();
|
|
1247
1247
|
}
|
|
1248
|
-
var
|
|
1248
|
+
var l = this;
|
|
1249
1249
|
if (this.readyState = "pausing", this.polling || !this.writable) {
|
|
1250
1250
|
var s = 0;
|
|
1251
|
-
this.polling && (
|
|
1252
|
-
|
|
1253
|
-
})), this.writable || (
|
|
1254
|
-
|
|
1251
|
+
this.polling && (h("we are currently polling - waiting to pause"), s++, this.once("pollComplete", function() {
|
|
1252
|
+
h("pre-pause polling complete"), --s || u();
|
|
1253
|
+
})), this.writable || (h("we are currently writing - waiting to pause"), s++, this.once("drain", function() {
|
|
1254
|
+
h("pre-pause writing complete"), --s || u();
|
|
1255
1255
|
}));
|
|
1256
1256
|
} else
|
|
1257
1257
|
u();
|
|
1258
1258
|
}, e.prototype.poll = function() {
|
|
1259
|
-
|
|
1259
|
+
h("polling"), this.polling = !0, this.doPoll(), this.emit("poll");
|
|
1260
1260
|
}, e.prototype.onData = function(i) {
|
|
1261
1261
|
var u = this;
|
|
1262
|
-
|
|
1263
|
-
var
|
|
1262
|
+
h("polling got data %s", i);
|
|
1263
|
+
var l = function(s) {
|
|
1264
1264
|
return u.readyState == "opening" && u.onOpen(), s.type == "close" ? (u.onClose(), !1) : void u.onPacket(s);
|
|
1265
1265
|
};
|
|
1266
|
-
|
|
1266
|
+
c.decodePayload(i, this.socket.binaryType, l), this.readyState != "closed" && (this.polling = !1, this.emit("pollComplete"), this.readyState == "open" ? this.poll() : h('ignoring poll - transport state "%s"', this.readyState));
|
|
1267
1267
|
}, e.prototype.doClose = function() {
|
|
1268
1268
|
function i() {
|
|
1269
|
-
|
|
1269
|
+
h("writing close packet"), u.write([{ type: "close" }]);
|
|
1270
1270
|
}
|
|
1271
1271
|
var u = this;
|
|
1272
|
-
this.readyState == "open" ? (
|
|
1272
|
+
this.readyState == "open" ? (h("transport open - closing"), i()) : (h("transport not open - deferring close"), this.once("open", i));
|
|
1273
1273
|
}, e.prototype.write = function(i) {
|
|
1274
|
-
var
|
|
1274
|
+
var l = this;
|
|
1275
1275
|
this.writable = !1;
|
|
1276
1276
|
var u = function() {
|
|
1277
|
-
|
|
1278
|
-
},
|
|
1279
|
-
|
|
1280
|
-
|
|
1277
|
+
l.writable = !0, l.emit("drain");
|
|
1278
|
+
}, l = this;
|
|
1279
|
+
c.encodePayload(i, this.supportsBinary, function(s) {
|
|
1280
|
+
l.doWrite(s, u);
|
|
1281
1281
|
});
|
|
1282
1282
|
}, e.prototype.uri = function() {
|
|
1283
|
-
var i = this.query || {}, u = this.secure ? "https" : "http",
|
|
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) && (
|
|
1283
|
+
var i = this.query || {}, u = this.secure ? "https" : "http", l = "";
|
|
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) && (l = ":" + this.port), i.length && (i = "?" + i), u + "://" + this.hostname + l + this.path + i;
|
|
1285
1285
|
};
|
|
1286
1286
|
}, {
|
|
1287
1287
|
"../transport": 14,
|
|
@@ -1296,11 +1296,11 @@ function qe() {
|
|
|
1296
1296
|
var u = i && i.forceBase64;
|
|
1297
1297
|
u && (this.supportsBinary = !1), r.call(this, i);
|
|
1298
1298
|
}
|
|
1299
|
-
var r = a("../transport"), o = a("engine.io-parser"),
|
|
1299
|
+
var r = a("../transport"), o = a("engine.io-parser"), c = a("parseqs"), f = a("component-inherit"), h = a("debug")("engine.io-client:websocket"), d = a("ws");
|
|
1300
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(), u = void 0,
|
|
1303
|
-
|
|
1302
|
+
var i = this.uri(), u = void 0, l = { agent: this.agent };
|
|
1303
|
+
l.pfx = this.pfx, l.key = this.key, l.passphrase = this.passphrase, l.cert = this.cert, l.ca = this.ca, l.ciphers = this.ciphers, l.rejectUnauthorized = this.rejectUnauthorized, this.ws = new d(i, u, l), 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;
|
|
@@ -1320,16 +1320,16 @@ function qe() {
|
|
|
1320
1320
|
}, 0);
|
|
1321
1321
|
}), e.prototype.write = function(i) {
|
|
1322
1322
|
function u() {
|
|
1323
|
-
|
|
1323
|
+
l.writable = !0, l.emit("drain");
|
|
1324
1324
|
}
|
|
1325
|
-
var
|
|
1325
|
+
var l = this;
|
|
1326
1326
|
this.writable = !1;
|
|
1327
1327
|
for (var s = 0, n = i.length; n > s; s++)
|
|
1328
1328
|
o.encodePacket(i[s], this.supportsBinary, function(p) {
|
|
1329
1329
|
try {
|
|
1330
|
-
|
|
1330
|
+
l.ws.send(p);
|
|
1331
1331
|
} catch {
|
|
1332
|
-
|
|
1332
|
+
h("websocket closed before onclose event");
|
|
1333
1333
|
}
|
|
1334
1334
|
});
|
|
1335
1335
|
setTimeout(u, 0);
|
|
@@ -1338,8 +1338,8 @@ function qe() {
|
|
|
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 || {}, u = this.secure ? "wss" : "ws",
|
|
1342
|
-
return this.port && (u == "wss" && this.port != 443 || u == "ws" && this.port != 80) && (
|
|
1341
|
+
var i = this.query || {}, u = this.secure ? "wss" : "ws", l = "";
|
|
1342
|
+
return this.port && (u == "wss" && this.port != 443 || u == "ws" && this.port != 80) && (l = ":" + this.port), this.timestampRequests && (i[this.timestampParam] = +/* @__PURE__ */ new Date()), this.supportsBinary || (i.b64 = 1), i = c.encode(i), i.length && (i = "?" + i), u + "://" + this.hostname + l + this.path + i;
|
|
1343
1343
|
}, e.prototype.check = function() {
|
|
1344
1344
|
return !(!d || "__initialize" in d && this.name === e.prototype.name);
|
|
1345
1345
|
};
|
|
@@ -1347,14 +1347,14 @@ function qe() {
|
|
|
1347
1347
|
20: [function(a, t) {
|
|
1348
1348
|
var e = a("has-cors");
|
|
1349
1349
|
t.exports = function(r) {
|
|
1350
|
-
var o = r.xdomain,
|
|
1350
|
+
var o = r.xdomain, c = r.xscheme, f = r.enablesXDR;
|
|
1351
1351
|
try {
|
|
1352
1352
|
if (typeof XMLHttpRequest < "u" && (!o || e))
|
|
1353
1353
|
return new XMLHttpRequest();
|
|
1354
1354
|
} catch {
|
|
1355
1355
|
}
|
|
1356
1356
|
try {
|
|
1357
|
-
if (typeof XDomainRequest < "u" && !
|
|
1357
|
+
if (typeof XDomainRequest < "u" && !c && f)
|
|
1358
1358
|
return new XDomainRequest();
|
|
1359
1359
|
} catch {
|
|
1360
1360
|
}
|
|
@@ -1382,12 +1382,12 @@ function qe() {
|
|
|
1382
1382
|
return d;
|
|
1383
1383
|
var u = "color: " + this.color;
|
|
1384
1384
|
d = [d[0], u, "color: inherit"].concat(Array.prototype.slice.call(d, 1));
|
|
1385
|
-
var
|
|
1385
|
+
var l = 0, s = 0;
|
|
1386
1386
|
return d[0].replace(/%[a-z%]/g, function(n) {
|
|
1387
|
-
n !== "%%" && (
|
|
1387
|
+
n !== "%%" && (l++, n === "%c" && (s = l));
|
|
1388
1388
|
}), d.splice(s, 0, u), d;
|
|
1389
1389
|
}
|
|
1390
|
-
function
|
|
1390
|
+
function c() {
|
|
1391
1391
|
return typeof console == "object" && typeof console.log == "function" && Function.prototype.apply.call(console.log, console, arguments);
|
|
1392
1392
|
}
|
|
1393
1393
|
function f(d) {
|
|
@@ -1396,7 +1396,7 @@ function qe() {
|
|
|
1396
1396
|
} catch {
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
|
-
function
|
|
1399
|
+
function h() {
|
|
1400
1400
|
var d;
|
|
1401
1401
|
try {
|
|
1402
1402
|
d = localStorage.debug;
|
|
@@ -1404,68 +1404,68 @@ function qe() {
|
|
|
1404
1404
|
}
|
|
1405
1405
|
return d;
|
|
1406
1406
|
}
|
|
1407
|
-
e = t.exports = a("./debug"), e.log =
|
|
1407
|
+
e = t.exports = a("./debug"), e.log = c, e.formatArgs = o, e.save = f, e.load = h, e.useColors = r, e.colors = ["lightseagreen", "forestgreen", "goldenrod", "dodgerblue", "darkorchid", "crimson"], e.formatters.j = function(d) {
|
|
1408
1408
|
return JSON.stringify(d);
|
|
1409
|
-
}, e.enable(
|
|
1409
|
+
}, e.enable(h());
|
|
1410
1410
|
}, { "./debug": 23 }],
|
|
1411
1411
|
23: [function(a, t, e) {
|
|
1412
1412
|
function r() {
|
|
1413
1413
|
return e.colors[u++ % e.colors.length];
|
|
1414
1414
|
}
|
|
1415
|
-
function o(
|
|
1415
|
+
function o(l) {
|
|
1416
1416
|
function s() {
|
|
1417
1417
|
}
|
|
1418
1418
|
function n() {
|
|
1419
|
-
var g = n, y = +/* @__PURE__ */ new Date(),
|
|
1420
|
-
g.diff =
|
|
1421
|
-
var
|
|
1422
|
-
|
|
1423
|
-
var
|
|
1424
|
-
|
|
1419
|
+
var g = n, y = +/* @__PURE__ */ new Date(), b = y - (i || y);
|
|
1420
|
+
g.diff = b, g.prev = i, g.curr = y, i = y, g.useColors == null && (g.useColors = e.useColors()), g.color == null && g.useColors && (g.color = r());
|
|
1421
|
+
var j = Array.prototype.slice.call(arguments);
|
|
1422
|
+
j[0] = e.coerce(j[0]), typeof j[0] != "string" && (j = ["%o"].concat(j));
|
|
1423
|
+
var U = 0;
|
|
1424
|
+
j[0] = j[0].replace(/%([a-z%])/g, function(I, k) {
|
|
1425
1425
|
if (I === "%%")
|
|
1426
1426
|
return I;
|
|
1427
|
-
|
|
1428
|
-
var
|
|
1429
|
-
if (typeof
|
|
1430
|
-
var A =
|
|
1431
|
-
I =
|
|
1427
|
+
U++;
|
|
1428
|
+
var w = e.formatters[k];
|
|
1429
|
+
if (typeof w == "function") {
|
|
1430
|
+
var A = j[U];
|
|
1431
|
+
I = w.call(g, A), j.splice(U, 1), U--;
|
|
1432
1432
|
}
|
|
1433
1433
|
return I;
|
|
1434
|
-
}), typeof e.formatArgs == "function" && (
|
|
1435
|
-
var
|
|
1436
|
-
|
|
1434
|
+
}), typeof e.formatArgs == "function" && (j = e.formatArgs.apply(g, j));
|
|
1435
|
+
var P = n.log || e.log || console.log.bind(console);
|
|
1436
|
+
P.apply(g, j);
|
|
1437
1437
|
}
|
|
1438
1438
|
s.enabled = !1, n.enabled = !0;
|
|
1439
|
-
var p = e.enabled(
|
|
1440
|
-
return p.namespace =
|
|
1439
|
+
var p = e.enabled(l) ? n : s;
|
|
1440
|
+
return p.namespace = l, p;
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1443
|
-
e.save(
|
|
1444
|
-
for (var s = (
|
|
1445
|
-
s[p] && (
|
|
1442
|
+
function c(l) {
|
|
1443
|
+
e.save(l);
|
|
1444
|
+
for (var s = (l || "").split(/[\s,]+/), n = s.length, p = 0; n > p; p++)
|
|
1445
|
+
s[p] && (l = s[p].replace(/\*/g, ".*?"), l[0] === "-" ? e.skips.push(new RegExp("^" + l.substr(1) + "$")) : e.names.push(new RegExp("^" + l + "$")));
|
|
1446
1446
|
}
|
|
1447
1447
|
function f() {
|
|
1448
1448
|
e.enable("");
|
|
1449
1449
|
}
|
|
1450
|
-
function l
|
|
1450
|
+
function h(l) {
|
|
1451
1451
|
var s, n;
|
|
1452
1452
|
for (s = 0, n = e.skips.length; n > s; s++)
|
|
1453
|
-
if (e.skips[s].test(
|
|
1453
|
+
if (e.skips[s].test(l))
|
|
1454
1454
|
return !1;
|
|
1455
1455
|
for (s = 0, n = e.names.length; n > s; s++)
|
|
1456
|
-
if (e.names[s].test(
|
|
1456
|
+
if (e.names[s].test(l))
|
|
1457
1457
|
return !0;
|
|
1458
1458
|
return !1;
|
|
1459
1459
|
}
|
|
1460
|
-
function d(
|
|
1461
|
-
return
|
|
1460
|
+
function d(l) {
|
|
1461
|
+
return l instanceof Error ? l.stack || l.message : l;
|
|
1462
1462
|
}
|
|
1463
|
-
e = t.exports = o, e.coerce = d, e.disable = f, e.enable =
|
|
1463
|
+
e = t.exports = o, e.coerce = d, e.disable = f, e.enable = c, e.enabled = h, e.humanize = a("ms"), e.names = [], e.skips = [], e.formatters = {};
|
|
1464
1464
|
var i, u = 0;
|
|
1465
1465
|
}, { ms: 24 }],
|
|
1466
1466
|
24: [function(a, t) {
|
|
1467
|
-
function e(
|
|
1468
|
-
var s = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(
|
|
1467
|
+
function e(l) {
|
|
1468
|
+
var s = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(l);
|
|
1469
1469
|
if (s) {
|
|
1470
1470
|
var n = parseFloat(s[1]), p = (s[2] || "ms").toLowerCase();
|
|
1471
1471
|
switch (p) {
|
|
@@ -1484,7 +1484,7 @@ function qe() {
|
|
|
1484
1484
|
case "minutes":
|
|
1485
1485
|
case "minute":
|
|
1486
1486
|
case "m":
|
|
1487
|
-
return n *
|
|
1487
|
+
return n * h;
|
|
1488
1488
|
case "seconds":
|
|
1489
1489
|
case "second":
|
|
1490
1490
|
case "s":
|
|
@@ -1494,82 +1494,82 @@ function qe() {
|
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
1496
|
}
|
|
1497
|
-
function r(
|
|
1498
|
-
return
|
|
1497
|
+
function r(l) {
|
|
1498
|
+
return l >= i ? Math.round(l / i) + "d" : l >= d ? Math.round(l / d) + "h" : l >= h ? Math.round(l / h) + "m" : l >= f ? Math.round(l / f) + "s" : l + "ms";
|
|
1499
1499
|
}
|
|
1500
|
-
function o(
|
|
1501
|
-
return
|
|
1500
|
+
function o(l) {
|
|
1501
|
+
return c(l, i, "day") || c(l, d, "hour") || c(l, h, "minute") || c(l, f, "second") || l + " ms";
|
|
1502
1502
|
}
|
|
1503
|
-
function
|
|
1504
|
-
return s >
|
|
1503
|
+
function c(l, s, n) {
|
|
1504
|
+
return s > l ? void 0 : 1.5 * s > l ? Math.floor(l / s) + " " + n : Math.ceil(l / s) + " " + n + "s";
|
|
1505
1505
|
}
|
|
1506
|
-
var f = 1e3,
|
|
1507
|
-
t.exports = function(
|
|
1508
|
-
return s = s || {}, typeof
|
|
1506
|
+
var f = 1e3, h = 60 * f, d = 60 * h, i = 24 * d, u = 365.25 * i;
|
|
1507
|
+
t.exports = function(l, s) {
|
|
1508
|
+
return s = s || {}, typeof l == "string" ? e(l) : s.long ? o(l) : r(l);
|
|
1509
1509
|
};
|
|
1510
1510
|
}, {}],
|
|
1511
1511
|
25: [function(a, t, e) {
|
|
1512
1512
|
(function(r) {
|
|
1513
|
-
function o(k,
|
|
1513
|
+
function o(k, w) {
|
|
1514
1514
|
var A = "b" + e.packets[k.type] + k.data.data;
|
|
1515
|
-
return
|
|
1515
|
+
return w(A);
|
|
1516
1516
|
}
|
|
1517
|
-
function
|
|
1518
|
-
if (!
|
|
1517
|
+
function c(k, w, A) {
|
|
1518
|
+
if (!w)
|
|
1519
1519
|
return e.encodeBase64Packet(k, A);
|
|
1520
1520
|
var v = k.data, m = new Uint8Array(v), O = new Uint8Array(1 + v.byteLength);
|
|
1521
|
-
O[0] =
|
|
1521
|
+
O[0] = j[k.type];
|
|
1522
1522
|
for (var B = 0; B < m.length; B++)
|
|
1523
1523
|
O[B + 1] = m[B];
|
|
1524
1524
|
return A(O.buffer);
|
|
1525
1525
|
}
|
|
1526
|
-
function f(k,
|
|
1527
|
-
if (!
|
|
1526
|
+
function f(k, w, A) {
|
|
1527
|
+
if (!w)
|
|
1528
1528
|
return e.encodeBase64Packet(k, A);
|
|
1529
1529
|
var v = new FileReader();
|
|
1530
1530
|
return v.onload = function() {
|
|
1531
|
-
k.data = v.result, e.encodePacket(k,
|
|
1531
|
+
k.data = v.result, e.encodePacket(k, w, !0, A);
|
|
1532
1532
|
}, v.readAsArrayBuffer(k.data);
|
|
1533
1533
|
}
|
|
1534
|
-
function
|
|
1535
|
-
if (!
|
|
1534
|
+
function h(k, w, A) {
|
|
1535
|
+
if (!w)
|
|
1536
1536
|
return e.encodeBase64Packet(k, A);
|
|
1537
|
-
if (
|
|
1538
|
-
return f(k,
|
|
1537
|
+
if (b)
|
|
1538
|
+
return f(k, w, A);
|
|
1539
1539
|
var v = new Uint8Array(1);
|
|
1540
|
-
v[0] =
|
|
1540
|
+
v[0] = j[k.type];
|
|
1541
1541
|
var m = new I([v.buffer, k.data]);
|
|
1542
1542
|
return A(m);
|
|
1543
1543
|
}
|
|
1544
|
-
function d(k,
|
|
1544
|
+
function d(k, w, A) {
|
|
1545
1545
|
for (var v = new Array(k.length), m = n(k.length, A), O = function(R, S, X) {
|
|
1546
|
-
|
|
1546
|
+
w(S, function(K, G) {
|
|
1547
1547
|
v[R] = G, X(K, v);
|
|
1548
1548
|
});
|
|
1549
1549
|
}, B = 0; B < k.length; B++)
|
|
1550
1550
|
O(B, k[B], m);
|
|
1551
1551
|
}
|
|
1552
|
-
var i = a("./keys"), u = a("has-binary"),
|
|
1552
|
+
var i = a("./keys"), u = a("has-binary"), l = 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), b = g || y;
|
|
1553
1553
|
e.protocol = 3;
|
|
1554
|
-
var
|
|
1555
|
-
e.encodePacket = function(k,
|
|
1556
|
-
typeof
|
|
1554
|
+
var j = e.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 }, U = i(j), P = { type: "error", data: "parser error" }, I = a("blob");
|
|
1555
|
+
e.encodePacket = function(k, w, A, v) {
|
|
1556
|
+
typeof w == "function" && (v = w, w = !1), typeof A == "function" && (v = A, A = null);
|
|
1557
1557
|
var m = k.data === void 0 ? void 0 : k.data.buffer || k.data;
|
|
1558
1558
|
if (r.ArrayBuffer && m instanceof ArrayBuffer)
|
|
1559
|
-
return
|
|
1559
|
+
return c(k, w, v);
|
|
1560
1560
|
if (I && m instanceof r.Blob)
|
|
1561
|
-
return
|
|
1561
|
+
return h(k, w, v);
|
|
1562
1562
|
if (m && m.base64)
|
|
1563
1563
|
return o(k, v);
|
|
1564
|
-
var O =
|
|
1564
|
+
var O = j[k.type];
|
|
1565
1565
|
return k.data !== void 0 && (O += A ? p.encode(String(k.data)) : String(k.data)), v("" + O);
|
|
1566
|
-
}, e.encodeBase64Packet = function(k,
|
|
1566
|
+
}, e.encodeBase64Packet = function(k, w) {
|
|
1567
1567
|
var A = "b" + e.packets[k.type];
|
|
1568
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
|
+
w(A + S);
|
|
1573
1573
|
}, v.readAsDataURL(k.data);
|
|
1574
1574
|
}
|
|
1575
1575
|
var m;
|
|
@@ -1580,62 +1580,62 @@ function qe() {
|
|
|
1580
1580
|
B[R] = O[R];
|
|
1581
1581
|
m = String.fromCharCode.apply(null, B);
|
|
1582
1582
|
}
|
|
1583
|
-
return A += r.btoa(m),
|
|
1584
|
-
}, e.decodePacket = function(k,
|
|
1583
|
+
return A += r.btoa(m), w(A);
|
|
1584
|
+
}, e.decodePacket = function(k, w, A) {
|
|
1585
1585
|
if (typeof k == "string" || k === void 0) {
|
|
1586
1586
|
if (k.charAt(0) == "b")
|
|
1587
|
-
return e.decodeBase64Packet(k.substr(1),
|
|
1587
|
+
return e.decodeBase64Packet(k.substr(1), w);
|
|
1588
1588
|
if (A)
|
|
1589
1589
|
try {
|
|
1590
1590
|
k = p.decode(k);
|
|
1591
1591
|
} catch {
|
|
1592
|
-
return
|
|
1592
|
+
return P;
|
|
1593
1593
|
}
|
|
1594
1594
|
var m = k.charAt(0);
|
|
1595
|
-
return Number(m) == m &&
|
|
1596
|
-
type:
|
|
1595
|
+
return Number(m) == m && U[m] ? k.length > 1 ? {
|
|
1596
|
+
type: U[m],
|
|
1597
1597
|
data: k.substring(1)
|
|
1598
|
-
} : { type:
|
|
1598
|
+
} : { type: U[m] } : P;
|
|
1599
1599
|
}
|
|
1600
|
-
var v = new Uint8Array(k), m = v[0], O =
|
|
1601
|
-
return I &&
|
|
1602
|
-
}, e.decodeBase64Packet = function(k,
|
|
1603
|
-
var A =
|
|
1600
|
+
var v = new Uint8Array(k), m = v[0], O = l(k, 1);
|
|
1601
|
+
return I && w === "blob" && (O = new I([O])), { type: U[m], data: O };
|
|
1602
|
+
}, e.decodeBase64Packet = function(k, w) {
|
|
1603
|
+
var A = U[k.charAt(0)];
|
|
1604
1604
|
if (!r.ArrayBuffer)
|
|
1605
1605
|
return { type: A, data: { base64: !0, data: k.substr(1) } };
|
|
1606
1606
|
var v = s.decode(k.substr(1));
|
|
1607
|
-
return
|
|
1608
|
-
}, e.encodePayload = function(k,
|
|
1607
|
+
return w === "blob" && I && (v = new I([v])), { type: A, data: v };
|
|
1608
|
+
}, e.encodePayload = function(k, w, A) {
|
|
1609
1609
|
function v(B) {
|
|
1610
1610
|
return B.length + ":" + B;
|
|
1611
1611
|
}
|
|
1612
1612
|
function m(B, R) {
|
|
1613
|
-
e.encodePacket(B, O ?
|
|
1613
|
+
e.encodePacket(B, O ? w : !1, !0, function(S) {
|
|
1614
1614
|
R(null, v(S));
|
|
1615
1615
|
});
|
|
1616
1616
|
}
|
|
1617
|
-
typeof
|
|
1617
|
+
typeof w == "function" && (A = w, w = null);
|
|
1618
1618
|
var O = u(k);
|
|
1619
|
-
return
|
|
1619
|
+
return w && O ? I && !b ? e.encodePayloadAsBlob(k, A) : e.encodePayloadAsArrayBuffer(k, A) : k.length ? void d(k, m, function(B, R) {
|
|
1620
1620
|
return A(R.join(""));
|
|
1621
1621
|
}) : A("0:");
|
|
1622
|
-
}, e.decodePayload = function(k,
|
|
1622
|
+
}, e.decodePayload = function(k, w, A) {
|
|
1623
1623
|
if (typeof k != "string")
|
|
1624
|
-
return e.decodePayloadAsBinary(k,
|
|
1625
|
-
typeof
|
|
1624
|
+
return e.decodePayloadAsBinary(k, w, A);
|
|
1625
|
+
typeof w == "function" && (A = w, w = null);
|
|
1626
1626
|
var v;
|
|
1627
1627
|
if (k == "")
|
|
1628
|
-
return A(
|
|
1628
|
+
return A(P, 0, 1);
|
|
1629
1629
|
for (var m, O, B = "", R = 0, S = k.length; S > R; R++) {
|
|
1630
1630
|
var X = k.charAt(R);
|
|
1631
1631
|
if (X != ":")
|
|
1632
1632
|
B += X;
|
|
1633
1633
|
else {
|
|
1634
1634
|
if (B == "" || B != (m = Number(B)) || (O = k.substr(R + 1, m), B != O.length))
|
|
1635
|
-
return A(
|
|
1635
|
+
return A(P, 0, 1);
|
|
1636
1636
|
if (O.length) {
|
|
1637
|
-
if (v = e.decodePacket(O,
|
|
1638
|
-
return A(
|
|
1637
|
+
if (v = e.decodePacket(O, w, !0), P.type == v.type && P.data == v.data)
|
|
1638
|
+
return A(P, 0, 1);
|
|
1639
1639
|
var K = A(v, R + m, S);
|
|
1640
1640
|
if (K === !1)
|
|
1641
1641
|
return;
|
|
@@ -1643,8 +1643,8 @@ function qe() {
|
|
|
1643
1643
|
R += m, B = "";
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
1646
|
-
return B != "" ? A(
|
|
1647
|
-
}, e.encodePayloadAsArrayBuffer = function(k,
|
|
1646
|
+
return B != "" ? A(P, 0, 1) : void 0;
|
|
1647
|
+
}, e.encodePayloadAsArrayBuffer = function(k, w) {
|
|
1648
1648
|
function A(v, m) {
|
|
1649
1649
|
e.encodePacket(v, !0, !0, function(O) {
|
|
1650
1650
|
return m(null, O);
|
|
@@ -1668,9 +1668,9 @@ function qe() {
|
|
|
1668
1668
|
B[R++] = 255;
|
|
1669
1669
|
for (var G = new Uint8Array(K), M = 0; M < G.length; M++)
|
|
1670
1670
|
B[R++] = G[M];
|
|
1671
|
-
}),
|
|
1672
|
-
}) :
|
|
1673
|
-
}, e.encodePayloadAsBlob = function(k,
|
|
1671
|
+
}), w(B.buffer);
|
|
1672
|
+
}) : w(new ArrayBuffer(0));
|
|
1673
|
+
}, e.encodePayloadAsBlob = function(k, w) {
|
|
1674
1674
|
function A(v, m) {
|
|
1675
1675
|
e.encodePacket(v, !0, !0, function(O) {
|
|
1676
1676
|
var B = new Uint8Array(1);
|
|
@@ -1688,10 +1688,10 @@ function qe() {
|
|
|
1688
1688
|
});
|
|
1689
1689
|
}
|
|
1690
1690
|
d(k, A, function(v, m) {
|
|
1691
|
-
return
|
|
1691
|
+
return w(new I(m));
|
|
1692
1692
|
});
|
|
1693
|
-
}, e.decodePayloadAsBinary = function(k,
|
|
1694
|
-
typeof
|
|
1693
|
+
}, e.decodePayloadAsBinary = function(k, w, A) {
|
|
1694
|
+
typeof w == "function" && (A = w, w = null);
|
|
1695
1695
|
for (var v = k, m = [], O = !1; v.byteLength > 0; ) {
|
|
1696
1696
|
for (var B = new Uint8Array(v), R = B[0] === 0, S = "", X = 1; B[X] != 255; X++) {
|
|
1697
1697
|
if (S.length > 310) {
|
|
@@ -1701,9 +1701,9 @@ function qe() {
|
|
|
1701
1701
|
S += B[X];
|
|
1702
1702
|
}
|
|
1703
1703
|
if (O)
|
|
1704
|
-
return A(
|
|
1705
|
-
v =
|
|
1706
|
-
var K =
|
|
1704
|
+
return A(P, 0, 1);
|
|
1705
|
+
v = l(v, 2 + S.length), S = parseInt(S);
|
|
1706
|
+
var K = l(v, 0, S);
|
|
1707
1707
|
if (R)
|
|
1708
1708
|
try {
|
|
1709
1709
|
K = String.fromCharCode.apply(null, new Uint8Array(K));
|
|
@@ -1713,11 +1713,11 @@ function qe() {
|
|
|
1713
1713
|
for (var X = 0; X < G.length; X++)
|
|
1714
1714
|
K += String.fromCharCode(G[X]);
|
|
1715
1715
|
}
|
|
1716
|
-
m.push(K), v =
|
|
1716
|
+
m.push(K), v = l(v, S);
|
|
1717
1717
|
}
|
|
1718
1718
|
var M = m.length;
|
|
1719
|
-
m.forEach(function(J,
|
|
1720
|
-
A(e.decodePacket(J,
|
|
1719
|
+
m.forEach(function(J, oe) {
|
|
1720
|
+
A(e.decodePacket(J, w, !0), oe, M);
|
|
1721
1721
|
});
|
|
1722
1722
|
};
|
|
1723
1723
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -1733,20 +1733,20 @@ function qe() {
|
|
|
1733
1733
|
26: [function(a, t) {
|
|
1734
1734
|
t.exports = Object.keys || function(e) {
|
|
1735
1735
|
var r = [], o = Object.prototype.hasOwnProperty;
|
|
1736
|
-
for (var
|
|
1737
|
-
o.call(e,
|
|
1736
|
+
for (var c in e)
|
|
1737
|
+
o.call(e, c) && r.push(c);
|
|
1738
1738
|
return r;
|
|
1739
1739
|
};
|
|
1740
1740
|
}, {}],
|
|
1741
1741
|
27: [function(a, t) {
|
|
1742
|
-
function e(o,
|
|
1743
|
-
function
|
|
1744
|
-
if (
|
|
1742
|
+
function e(o, c, f) {
|
|
1743
|
+
function h(i, u) {
|
|
1744
|
+
if (h.count <= 0)
|
|
1745
1745
|
throw new Error("after called too many times");
|
|
1746
|
-
--
|
|
1746
|
+
--h.count, i ? (d = !0, c(i), c = f) : h.count !== 0 || d || c(null, u);
|
|
1747
1747
|
}
|
|
1748
1748
|
var d = !1;
|
|
1749
|
-
return f = f || r,
|
|
1749
|
+
return f = f || r, h.count = o, o === 0 ? c() : h;
|
|
1750
1750
|
}
|
|
1751
1751
|
function r() {
|
|
1752
1752
|
}
|
|
@@ -1754,29 +1754,29 @@ function qe() {
|
|
|
1754
1754
|
}, {}],
|
|
1755
1755
|
28: [function(a, t) {
|
|
1756
1756
|
t.exports = function(e, r, o) {
|
|
1757
|
-
var
|
|
1758
|
-
if (r = r || 0, o = o ||
|
|
1757
|
+
var c = e.byteLength;
|
|
1758
|
+
if (r = r || 0, o = o || c, e.slice)
|
|
1759
1759
|
return e.slice(r, o);
|
|
1760
|
-
if (0 > r && (r +=
|
|
1760
|
+
if (0 > r && (r += c), 0 > o && (o += c), o > c && (o = c), r >= c || r >= o || c === 0)
|
|
1761
1761
|
return new ArrayBuffer(0);
|
|
1762
|
-
for (var f = new Uint8Array(e),
|
|
1763
|
-
|
|
1764
|
-
return
|
|
1762
|
+
for (var f = new Uint8Array(e), h = new Uint8Array(o - r), d = r, i = 0; o > d; d++, i++)
|
|
1763
|
+
h[i] = f[d];
|
|
1764
|
+
return h.buffer;
|
|
1765
1765
|
};
|
|
1766
1766
|
}, {}],
|
|
1767
1767
|
29: [function(a, t, e) {
|
|
1768
1768
|
(function(r) {
|
|
1769
1769
|
e.encode = function(o) {
|
|
1770
|
-
var
|
|
1771
|
-
for (
|
|
1772
|
-
d += r[f[
|
|
1773
|
-
return
|
|
1770
|
+
var c, f = new Uint8Array(o), h = f.length, d = "";
|
|
1771
|
+
for (c = 0; h > c; c += 3)
|
|
1772
|
+
d += r[f[c] >> 2], d += r[(3 & f[c]) << 4 | f[c + 1] >> 4], d += r[(15 & f[c + 1]) << 2 | f[c + 2] >> 6], d += r[63 & f[c + 2]];
|
|
1773
|
+
return h % 3 === 2 ? d = d.substring(0, d.length - 1) + "=" : h % 3 === 1 && (d = d.substring(0, d.length - 2) + "=="), d;
|
|
1774
1774
|
}, e.decode = function(o) {
|
|
1775
|
-
var
|
|
1775
|
+
var c, f, h, d, i, u = 0.75 * o.length, l = o.length, s = 0;
|
|
1776
1776
|
o[o.length - 1] === "=" && (u--, o[o.length - 2] === "=" && u--);
|
|
1777
1777
|
var n = new ArrayBuffer(u), p = new Uint8Array(n);
|
|
1778
|
-
for (
|
|
1779
|
-
f = r.indexOf(o[
|
|
1778
|
+
for (c = 0; l > c; c += 4)
|
|
1779
|
+
f = r.indexOf(o[c]), h = r.indexOf(o[c + 1]), d = r.indexOf(o[c + 2]), i = r.indexOf(o[c + 3]), p[s++] = f << 2 | h >> 4, p[s++] = (15 & h) << 4 | d >> 2, p[s++] = (3 & d) << 6 | 63 & i;
|
|
1780
1780
|
return n;
|
|
1781
1781
|
};
|
|
1782
1782
|
})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
|
|
@@ -1784,37 +1784,37 @@ function qe() {
|
|
|
1784
1784
|
30: [function(a, t) {
|
|
1785
1785
|
(function(e) {
|
|
1786
1786
|
function r(u) {
|
|
1787
|
-
for (var
|
|
1788
|
-
var s = u[
|
|
1787
|
+
for (var l = 0; l < u.length; l++) {
|
|
1788
|
+
var s = u[l];
|
|
1789
1789
|
if (s.buffer instanceof ArrayBuffer) {
|
|
1790
1790
|
var n = s.buffer;
|
|
1791
1791
|
if (s.byteLength !== n.byteLength) {
|
|
1792
1792
|
var p = new Uint8Array(s.byteLength);
|
|
1793
1793
|
p.set(new Uint8Array(n, s.byteOffset, s.byteLength)), n = p.buffer;
|
|
1794
1794
|
}
|
|
1795
|
-
u[
|
|
1795
|
+
u[l] = n;
|
|
1796
1796
|
}
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
|
-
function o(u,
|
|
1800
|
-
|
|
1799
|
+
function o(u, l) {
|
|
1800
|
+
l = l || {};
|
|
1801
1801
|
var s = new f();
|
|
1802
1802
|
r(u);
|
|
1803
1803
|
for (var n = 0; n < u.length; n++)
|
|
1804
1804
|
s.append(u[n]);
|
|
1805
|
-
return
|
|
1805
|
+
return l.type ? s.getBlob(l.type) : s.getBlob();
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1808
|
-
return r(u), new Blob(u,
|
|
1807
|
+
function c(u, l) {
|
|
1808
|
+
return r(u), new Blob(u, l || {});
|
|
1809
1809
|
}
|
|
1810
|
-
var f = e.BlobBuilder || e.WebKitBlobBuilder || e.MSBlobBuilder || e.MozBlobBuilder,
|
|
1810
|
+
var f = e.BlobBuilder || e.WebKitBlobBuilder || e.MSBlobBuilder || e.MozBlobBuilder, h = function() {
|
|
1811
1811
|
try {
|
|
1812
1812
|
var u = new Blob(["hi"]);
|
|
1813
1813
|
return u.size === 2;
|
|
1814
1814
|
} catch {
|
|
1815
1815
|
return !1;
|
|
1816
1816
|
}
|
|
1817
|
-
}(), d =
|
|
1817
|
+
}(), d = h && function() {
|
|
1818
1818
|
try {
|
|
1819
1819
|
var u = new Blob([new Uint8Array([1, 2])]);
|
|
1820
1820
|
return u.size === 2;
|
|
@@ -1823,88 +1823,88 @@ function qe() {
|
|
|
1823
1823
|
}
|
|
1824
1824
|
}(), i = f && f.prototype.append && f.prototype.getBlob;
|
|
1825
1825
|
t.exports = function() {
|
|
1826
|
-
return
|
|
1826
|
+
return h ? d ? e.Blob : c : i ? o : void 0;
|
|
1827
1827
|
}();
|
|
1828
1828
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1829
1829
|
}, {}],
|
|
1830
1830
|
31: [function(a, t, e) {
|
|
1831
1831
|
(function(r) {
|
|
1832
1832
|
(function(o) {
|
|
1833
|
-
function
|
|
1833
|
+
function c(v) {
|
|
1834
1834
|
for (var m, O, B = [], R = 0, S = v.length; S > R; )
|
|
1835
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
1836
|
return B;
|
|
1837
1837
|
}
|
|
1838
1838
|
function f(v) {
|
|
1839
1839
|
for (var m, O = v.length, B = -1, R = ""; ++B < O; )
|
|
1840
|
-
m = v[B], m > 65535 && (m -= 65536, R +=
|
|
1840
|
+
m = v[B], m > 65535 && (m -= 65536, R += P(m >>> 10 & 1023 | 55296), m = 56320 | 1023 & m), R += P(m);
|
|
1841
1841
|
return R;
|
|
1842
1842
|
}
|
|
1843
|
-
function
|
|
1843
|
+
function h(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 P(v >> m & 63 | 128);
|
|
1849
1849
|
}
|
|
1850
1850
|
function i(v) {
|
|
1851
1851
|
if (!(4294967168 & v))
|
|
1852
|
-
return
|
|
1852
|
+
return P(v);
|
|
1853
1853
|
var m = "";
|
|
1854
|
-
return 4294965248 & v ? 4294901760 & v ? !(4292870144 & v) && (m =
|
|
1854
|
+
return 4294965248 & v ? 4294901760 & v ? !(4292870144 & v) && (m = P(v >> 18 & 7 | 240), m += d(v, 12), m += d(v, 6)) : (h(v), m = P(v >> 12 & 15 | 224), m += d(v, 6)) : m = P(v >> 6 & 31 | 192), m += P(63 & v | 128);
|
|
1855
1855
|
}
|
|
1856
1856
|
function u(v) {
|
|
1857
|
-
for (var m, O =
|
|
1857
|
+
for (var m, O = c(v), B = O.length, R = -1, S = ""; ++R < B; )
|
|
1858
1858
|
m = O[R], S += i(m);
|
|
1859
1859
|
return S;
|
|
1860
1860
|
}
|
|
1861
|
-
function
|
|
1862
|
-
if (
|
|
1861
|
+
function l() {
|
|
1862
|
+
if (U >= j)
|
|
1863
1863
|
throw Error("Invalid byte index");
|
|
1864
|
-
var v = 255 &
|
|
1865
|
-
if (
|
|
1864
|
+
var v = 255 & b[U];
|
|
1865
|
+
if (U++, (192 & v) == 128)
|
|
1866
1866
|
return 63 & v;
|
|
1867
1867
|
throw Error("Invalid continuation byte");
|
|
1868
1868
|
}
|
|
1869
1869
|
function s() {
|
|
1870
1870
|
var v, m, O, B, R;
|
|
1871
|
-
if (
|
|
1871
|
+
if (U > j)
|
|
1872
1872
|
throw Error("Invalid byte index");
|
|
1873
|
-
if (
|
|
1873
|
+
if (U == j)
|
|
1874
1874
|
return !1;
|
|
1875
|
-
if (v = 255 &
|
|
1875
|
+
if (v = 255 & b[U], U++, (128 & v) == 0)
|
|
1876
1876
|
return v;
|
|
1877
1877
|
if ((224 & v) == 192) {
|
|
1878
|
-
var m =
|
|
1878
|
+
var m = l();
|
|
1879
1879
|
if (R = (31 & v) << 6 | m, R >= 128)
|
|
1880
1880
|
return R;
|
|
1881
1881
|
throw Error("Invalid continuation byte");
|
|
1882
1882
|
}
|
|
1883
1883
|
if ((240 & v) == 224) {
|
|
1884
|
-
if (m =
|
|
1885
|
-
return
|
|
1884
|
+
if (m = l(), O = l(), R = (15 & v) << 12 | m << 6 | O, R >= 2048)
|
|
1885
|
+
return h(R), R;
|
|
1886
1886
|
throw Error("Invalid continuation byte");
|
|
1887
1887
|
}
|
|
1888
|
-
if ((248 & v) == 240 && (m =
|
|
1888
|
+
if ((248 & v) == 240 && (m = l(), O = l(), B = l(), R = (15 & v) << 18 | m << 12 | O << 6 | B, R >= 65536 && 1114111 >= R))
|
|
1889
1889
|
return R;
|
|
1890
1890
|
throw Error("Invalid UTF-8 detected");
|
|
1891
1891
|
}
|
|
1892
1892
|
function n(v) {
|
|
1893
|
-
|
|
1893
|
+
b = c(v), j = b.length, U = 0;
|
|
1894
1894
|
for (var m, O = []; (m = s()) !== !1; )
|
|
1895
1895
|
O.push(m);
|
|
1896
1896
|
return f(O);
|
|
1897
1897
|
}
|
|
1898
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
|
|
1900
|
+
var b, j, U, P = String.fromCharCode, I = { version: "2.0.0", encode: u, decode: n };
|
|
1901
1901
|
if (p && !p.nodeType)
|
|
1902
1902
|
if (g)
|
|
1903
1903
|
g.exports = I;
|
|
1904
1904
|
else {
|
|
1905
|
-
var k = {},
|
|
1905
|
+
var k = {}, w = k.hasOwnProperty;
|
|
1906
1906
|
for (var A in I)
|
|
1907
|
-
|
|
1907
|
+
w.call(I, A) && (p[A] = I[A]);
|
|
1908
1908
|
}
|
|
1909
1909
|
else
|
|
1910
1910
|
o.utf8 = I;
|
|
@@ -1913,21 +1913,21 @@ function qe() {
|
|
|
1913
1913
|
}, {}],
|
|
1914
1914
|
32: [function(a, t) {
|
|
1915
1915
|
(function(e) {
|
|
1916
|
-
var r = /^[\],:{}\s]*$/, o = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
|
|
1916
|
+
var r = /^[\],:{}\s]*$/, o = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, c = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, f = /(?:^|:|,)(?:\s*\[)+/g, h = /^\s+/, d = /\s+$/;
|
|
1917
1917
|
t.exports = function(i) {
|
|
1918
|
-
return typeof i == "string" && i ? (i = i.replace(
|
|
1918
|
+
return typeof i == "string" && i ? (i = i.replace(h, "").replace(d, ""), e.JSON && JSON.parse ? JSON.parse(i) : r.test(i.replace(o, "@").replace(c, "]").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
1923
|
e.encode = function(r) {
|
|
1924
1924
|
var o = "";
|
|
1925
|
-
for (var
|
|
1926
|
-
r.hasOwnProperty(
|
|
1925
|
+
for (var c in r)
|
|
1926
|
+
r.hasOwnProperty(c) && (o.length && (o += "&"), o += encodeURIComponent(c) + "=" + encodeURIComponent(r[c]));
|
|
1927
1927
|
return o;
|
|
1928
1928
|
}, e.decode = function(r) {
|
|
1929
|
-
for (var o = {},
|
|
1930
|
-
var d =
|
|
1929
|
+
for (var o = {}, c = r.split("&"), f = 0, h = c.length; h > f; f++) {
|
|
1930
|
+
var d = c[f].split("=");
|
|
1931
1931
|
o[decodeURIComponent(d[0])] = decodeURIComponent(d[1]);
|
|
1932
1932
|
}
|
|
1933
1933
|
return o;
|
|
@@ -1936,16 +1936,16 @@ function qe() {
|
|
|
1936
1936
|
34: [function(a, t) {
|
|
1937
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
|
-
var
|
|
1940
|
-
f != -1 &&
|
|
1939
|
+
var c = o, f = o.indexOf("["), h = o.indexOf("]");
|
|
1940
|
+
f != -1 && h != -1 && (o = o.substring(0, f) + o.substring(f, h).replace(/:/g, ";") + o.substring(h, o.length));
|
|
1941
1941
|
for (var d = e.exec(o || ""), i = {}, u = 14; u--; )
|
|
1942
1942
|
i[r[u]] = d[u] || "";
|
|
1943
|
-
return f != -1 &&
|
|
1943
|
+
return f != -1 && h != -1 && (i.source = c, 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
|
}, {}],
|
|
1946
1946
|
35: [function(a, t) {
|
|
1947
|
-
function e(
|
|
1948
|
-
return f ? new o(
|
|
1947
|
+
function e(c, f) {
|
|
1948
|
+
return f ? new o(c, f) : new o(c);
|
|
1949
1949
|
}
|
|
1950
1950
|
var r = /* @__PURE__ */ function() {
|
|
1951
1951
|
return self;
|
|
@@ -1954,25 +1954,25 @@ function qe() {
|
|
|
1954
1954
|
}, {}],
|
|
1955
1955
|
36: [function(a, t) {
|
|
1956
1956
|
(function(e) {
|
|
1957
|
-
function r(
|
|
1958
|
-
function f(
|
|
1959
|
-
if (!
|
|
1957
|
+
function r(c) {
|
|
1958
|
+
function f(h) {
|
|
1959
|
+
if (!h)
|
|
1960
1960
|
return !1;
|
|
1961
|
-
if (e.Buffer && e.Buffer.isBuffer(
|
|
1961
|
+
if (e.Buffer && e.Buffer.isBuffer(h) || e.ArrayBuffer && h instanceof ArrayBuffer || e.Blob && h instanceof Blob || e.File && h instanceof File)
|
|
1962
1962
|
return !0;
|
|
1963
|
-
if (o(
|
|
1964
|
-
for (var d = 0; d <
|
|
1965
|
-
if (f(
|
|
1963
|
+
if (o(h)) {
|
|
1964
|
+
for (var d = 0; d < h.length; d++)
|
|
1965
|
+
if (f(h[d]))
|
|
1966
1966
|
return !0;
|
|
1967
|
-
} else if (
|
|
1968
|
-
|
|
1969
|
-
for (var i in
|
|
1970
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1967
|
+
} else if (h && typeof h == "object") {
|
|
1968
|
+
h.toJSON && (h = h.toJSON());
|
|
1969
|
+
for (var i in h)
|
|
1970
|
+
if (Object.prototype.hasOwnProperty.call(h, i) && f(h[i]))
|
|
1971
1971
|
return !0;
|
|
1972
1972
|
}
|
|
1973
1973
|
return !1;
|
|
1974
1974
|
}
|
|
1975
|
-
return f(
|
|
1975
|
+
return f(c);
|
|
1976
1976
|
}
|
|
1977
1977
|
var o = a("isarray");
|
|
1978
1978
|
t.exports = r;
|
|
@@ -2001,27 +2001,27 @@ function qe() {
|
|
|
2001
2001
|
t.exports = function(r, o) {
|
|
2002
2002
|
if (e)
|
|
2003
2003
|
return r.indexOf(o);
|
|
2004
|
-
for (var
|
|
2005
|
-
if (r[
|
|
2006
|
-
return
|
|
2004
|
+
for (var c = 0; c < r.length; ++c)
|
|
2005
|
+
if (r[c] === o)
|
|
2006
|
+
return c;
|
|
2007
2007
|
return -1;
|
|
2008
2008
|
};
|
|
2009
2009
|
}, {}],
|
|
2010
2010
|
41: [function(a, t, e) {
|
|
2011
2011
|
var r = Object.prototype.hasOwnProperty;
|
|
2012
2012
|
e.keys = Object.keys || function(o) {
|
|
2013
|
-
var
|
|
2013
|
+
var c = [];
|
|
2014
2014
|
for (var f in o)
|
|
2015
|
-
r.call(o, f) &&
|
|
2016
|
-
return
|
|
2015
|
+
r.call(o, f) && c.push(f);
|
|
2016
|
+
return c;
|
|
2017
2017
|
}, e.values = function(o) {
|
|
2018
|
-
var
|
|
2018
|
+
var c = [];
|
|
2019
2019
|
for (var f in o)
|
|
2020
|
-
r.call(o, f) &&
|
|
2021
|
-
return
|
|
2022
|
-
}, e.merge = function(o,
|
|
2023
|
-
for (var f in
|
|
2024
|
-
r.call(
|
|
2020
|
+
r.call(o, f) && c.push(o[f]);
|
|
2021
|
+
return c;
|
|
2022
|
+
}, e.merge = function(o, c) {
|
|
2023
|
+
for (var f in c)
|
|
2024
|
+
r.call(c, f) && (o[f] = c[f]);
|
|
2025
2025
|
return o;
|
|
2026
2026
|
}, e.length = function(o) {
|
|
2027
2027
|
return e.keys(o).length;
|
|
@@ -2032,46 +2032,46 @@ function qe() {
|
|
|
2032
2032
|
42: [function(a, t) {
|
|
2033
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
|
-
for (var
|
|
2036
|
-
f[r[
|
|
2035
|
+
for (var c = e.exec(o || ""), f = {}, h = 14; h--; )
|
|
2036
|
+
f[r[h]] = c[h] || "";
|
|
2037
2037
|
return f;
|
|
2038
2038
|
};
|
|
2039
2039
|
}, {}],
|
|
2040
2040
|
43: [function(a, t, e) {
|
|
2041
2041
|
(function(r) {
|
|
2042
|
-
var o = a("isarray"),
|
|
2042
|
+
var o = a("isarray"), c = a("./is-buffer");
|
|
2043
2043
|
e.deconstructPacket = function(f) {
|
|
2044
|
-
function l
|
|
2045
|
-
if (!
|
|
2046
|
-
return
|
|
2047
|
-
if (
|
|
2044
|
+
function h(l) {
|
|
2045
|
+
if (!l)
|
|
2046
|
+
return l;
|
|
2047
|
+
if (c(l)) {
|
|
2048
2048
|
var s = { _placeholder: !0, num: d.length };
|
|
2049
|
-
return d.push(
|
|
2049
|
+
return d.push(l), s;
|
|
2050
2050
|
}
|
|
2051
|
-
if (o(
|
|
2052
|
-
for (var n = new Array(
|
|
2053
|
-
n[p] = l
|
|
2051
|
+
if (o(l)) {
|
|
2052
|
+
for (var n = new Array(l.length), p = 0; p < l.length; p++)
|
|
2053
|
+
n[p] = h(l[p]);
|
|
2054
2054
|
return n;
|
|
2055
2055
|
}
|
|
2056
|
-
if (typeof
|
|
2056
|
+
if (typeof l == "object" && !(l instanceof Date)) {
|
|
2057
2057
|
var n = {};
|
|
2058
|
-
for (var g in
|
|
2059
|
-
n[g] = l
|
|
2058
|
+
for (var g in l)
|
|
2059
|
+
n[g] = h(l[g]);
|
|
2060
2060
|
return n;
|
|
2061
2061
|
}
|
|
2062
|
-
return
|
|
2062
|
+
return l;
|
|
2063
2063
|
}
|
|
2064
2064
|
var d = [], i = f.data, u = f;
|
|
2065
|
-
return u.data =
|
|
2066
|
-
}, e.reconstructPacket = function(f,
|
|
2065
|
+
return u.data = h(i), u.attachments = d.length, { packet: u, buffers: d };
|
|
2066
|
+
}, e.reconstructPacket = function(f, h) {
|
|
2067
2067
|
function d(i) {
|
|
2068
2068
|
if (i && i._placeholder) {
|
|
2069
|
-
var u =
|
|
2069
|
+
var u = h[i.num];
|
|
2070
2070
|
return u;
|
|
2071
2071
|
}
|
|
2072
2072
|
if (o(i)) {
|
|
2073
|
-
for (var
|
|
2074
|
-
i[
|
|
2073
|
+
for (var l = 0; l < i.length; l++)
|
|
2074
|
+
i[l] = d(i[l]);
|
|
2075
2075
|
return i;
|
|
2076
2076
|
}
|
|
2077
2077
|
if (i && typeof i == "object") {
|
|
@@ -2082,25 +2082,25 @@ function qe() {
|
|
|
2082
2082
|
return i;
|
|
2083
2083
|
}
|
|
2084
2084
|
return f.data = d(f.data), f.attachments = void 0, f;
|
|
2085
|
-
}, e.removeBlobs = function(f,
|
|
2086
|
-
function d(
|
|
2087
|
-
if (!
|
|
2088
|
-
return
|
|
2089
|
-
if (r.Blob &&
|
|
2085
|
+
}, e.removeBlobs = function(f, h) {
|
|
2086
|
+
function d(l, s, n) {
|
|
2087
|
+
if (!l)
|
|
2088
|
+
return l;
|
|
2089
|
+
if (r.Blob && l instanceof Blob || r.File && l instanceof File) {
|
|
2090
2090
|
i++;
|
|
2091
2091
|
var p = new FileReader();
|
|
2092
2092
|
p.onload = function() {
|
|
2093
|
-
n ? n[s] = this.result : u = this.result, --i ||
|
|
2094
|
-
}, p.readAsArrayBuffer(
|
|
2095
|
-
} else if (o(
|
|
2096
|
-
for (var g = 0; g <
|
|
2097
|
-
d(
|
|
2098
|
-
else if (
|
|
2099
|
-
for (var y in
|
|
2100
|
-
d(
|
|
2093
|
+
n ? n[s] = this.result : u = this.result, --i || h(u);
|
|
2094
|
+
}, p.readAsArrayBuffer(l);
|
|
2095
|
+
} else if (o(l))
|
|
2096
|
+
for (var g = 0; g < l.length; g++)
|
|
2097
|
+
d(l[g], g, l);
|
|
2098
|
+
else if (l && typeof l == "object" && !c(l))
|
|
2099
|
+
for (var y in l)
|
|
2100
|
+
d(l[y], y, l);
|
|
2101
2101
|
}
|
|
2102
2102
|
var i = 0, u = f;
|
|
2103
|
-
d(u), i ||
|
|
2103
|
+
d(u), i || h(u);
|
|
2104
2104
|
};
|
|
2105
2105
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2106
2106
|
}, { "./is-buffer": 45, isarray: 46 }],
|
|
@@ -2108,54 +2108,54 @@ function qe() {
|
|
|
2108
2108
|
function r() {
|
|
2109
2109
|
}
|
|
2110
2110
|
function o(g) {
|
|
2111
|
-
var y = "",
|
|
2112
|
-
return y += g.type, (e.BINARY_EVENT == g.type || e.BINARY_ACK == g.type) && (y += g.attachments, y += "-"), g.nsp && g.nsp != "/" && (
|
|
2111
|
+
var y = "", b = !1;
|
|
2112
|
+
return y += g.type, (e.BINARY_EVENT == g.type || e.BINARY_ACK == g.type) && (y += g.attachments, y += "-"), g.nsp && g.nsp != "/" && (b = !0, y += g.nsp), g.id != null && (b && (y += ",", b = !1), y += g.id), g.data != null && (b && (y += ","), y += l.stringify(g.data)), u("encoded %j as %s", g, y), y;
|
|
2113
2113
|
}
|
|
2114
|
-
function
|
|
2115
|
-
function
|
|
2116
|
-
var
|
|
2117
|
-
I.unshift(
|
|
2114
|
+
function c(g, y) {
|
|
2115
|
+
function b(j) {
|
|
2116
|
+
var U = n.deconstructPacket(j), P = o(U.packet), I = U.buffers;
|
|
2117
|
+
I.unshift(P), y(I);
|
|
2118
2118
|
}
|
|
2119
|
-
n.removeBlobs(g,
|
|
2119
|
+
n.removeBlobs(g, b);
|
|
2120
2120
|
}
|
|
2121
2121
|
function f() {
|
|
2122
2122
|
this.reconstructor = null;
|
|
2123
2123
|
}
|
|
2124
|
-
function
|
|
2125
|
-
var y = {},
|
|
2124
|
+
function h(g) {
|
|
2125
|
+
var y = {}, b = 0;
|
|
2126
2126
|
if (y.type = Number(g.charAt(0)), e.types[y.type] == null)
|
|
2127
2127
|
return i();
|
|
2128
2128
|
if (e.BINARY_EVENT == y.type || e.BINARY_ACK == y.type) {
|
|
2129
|
-
for (var
|
|
2129
|
+
for (var j = ""; g.charAt(++b) != "-" && (j += g.charAt(b), b != g.length); )
|
|
2130
2130
|
;
|
|
2131
|
-
if (
|
|
2131
|
+
if (j != Number(j) || g.charAt(b) != "-")
|
|
2132
2132
|
throw new Error("Illegal attachments");
|
|
2133
|
-
y.attachments = Number(
|
|
2133
|
+
y.attachments = Number(j);
|
|
2134
2134
|
}
|
|
2135
|
-
if (g.charAt(
|
|
2136
|
-
for (y.nsp = ""; ++
|
|
2137
|
-
var
|
|
2138
|
-
if (
|
|
2135
|
+
if (g.charAt(b + 1) == "/")
|
|
2136
|
+
for (y.nsp = ""; ++b; ) {
|
|
2137
|
+
var U = g.charAt(b);
|
|
2138
|
+
if (U == "," || (y.nsp += U, b == g.length))
|
|
2139
2139
|
break;
|
|
2140
2140
|
}
|
|
2141
2141
|
else
|
|
2142
2142
|
y.nsp = "/";
|
|
2143
|
-
var
|
|
2144
|
-
if (
|
|
2145
|
-
for (y.id = ""; ++
|
|
2146
|
-
var
|
|
2147
|
-
if (
|
|
2148
|
-
--
|
|
2143
|
+
var P = g.charAt(b + 1);
|
|
2144
|
+
if (P !== "" && Number(P) == P) {
|
|
2145
|
+
for (y.id = ""; ++b; ) {
|
|
2146
|
+
var U = g.charAt(b);
|
|
2147
|
+
if (U == null || Number(U) != U) {
|
|
2148
|
+
--b;
|
|
2149
2149
|
break;
|
|
2150
2150
|
}
|
|
2151
|
-
if (y.id += g.charAt(
|
|
2151
|
+
if (y.id += g.charAt(b), b == g.length)
|
|
2152
2152
|
break;
|
|
2153
2153
|
}
|
|
2154
2154
|
y.id = Number(y.id);
|
|
2155
2155
|
}
|
|
2156
|
-
if (g.charAt(++
|
|
2156
|
+
if (g.charAt(++b))
|
|
2157
2157
|
try {
|
|
2158
|
-
y.data =
|
|
2158
|
+
y.data = l.parse(g.substr(b));
|
|
2159
2159
|
} catch {
|
|
2160
2160
|
return i();
|
|
2161
2161
|
}
|
|
@@ -2167,18 +2167,18 @@ function qe() {
|
|
|
2167
2167
|
function i() {
|
|
2168
2168
|
return { type: e.ERROR, data: "parser error" };
|
|
2169
2169
|
}
|
|
2170
|
-
var u = a("debug")("socket.io-parser"),
|
|
2170
|
+
var u = a("debug")("socket.io-parser"), l = a("json3"), s = (a("isarray"), a("component-emitter")), n = a("./binary"), p = a("./is-buffer");
|
|
2171
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
2172
|
if (u("encoding packet %j", g), e.BINARY_EVENT == g.type || e.BINARY_ACK == g.type)
|
|
2173
|
-
|
|
2173
|
+
c(g, y);
|
|
2174
2174
|
else {
|
|
2175
|
-
var
|
|
2176
|
-
y([
|
|
2175
|
+
var b = o(g);
|
|
2176
|
+
y([b]);
|
|
2177
2177
|
}
|
|
2178
2178
|
}, s(f.prototype), f.prototype.add = function(g) {
|
|
2179
2179
|
var y;
|
|
2180
2180
|
if (typeof g == "string")
|
|
2181
|
-
y =
|
|
2181
|
+
y = h(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
2183
|
if (!p(g) && !g.base64)
|
|
2184
2184
|
throw new Error("Unknown type: " + g);
|
|
@@ -2212,7 +2212,7 @@ function qe() {
|
|
|
2212
2212
|
47: [function(a, t, e) {
|
|
2213
2213
|
(function(r) {
|
|
2214
2214
|
function o(E) {
|
|
2215
|
-
if (o[E] !==
|
|
2215
|
+
if (o[E] !== h)
|
|
2216
2216
|
return o[E];
|
|
2217
2217
|
var _;
|
|
2218
2218
|
if (E == "bug-string-char-index")
|
|
@@ -2220,31 +2220,31 @@ function qe() {
|
|
|
2220
2220
|
else if (E == "json")
|
|
2221
2221
|
_ = o("json-stringify") && o("json-parse");
|
|
2222
2222
|
else {
|
|
2223
|
-
var T,
|
|
2223
|
+
var T, V = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
|
|
2224
2224
|
if (E == "json-stringify") {
|
|
2225
|
-
var C = u.stringify,
|
|
2226
|
-
if (
|
|
2225
|
+
var C = u.stringify, x = typeof C == "function" && l;
|
|
2226
|
+
if (x) {
|
|
2227
2227
|
(T = function() {
|
|
2228
2228
|
return 1;
|
|
2229
2229
|
}).toJSON = T;
|
|
2230
2230
|
try {
|
|
2231
|
-
|
|
2232
|
-
\f\r `] }) ==
|
|
2231
|
+
x = C(0) === "0" && C(new Number()) === "0" && C(new String()) == '""' && C(d) === h && C(h) === h && C() === h && C(T) === "1" && C([T]) == "[1]" && C([h]) == "[null]" && C(null) == "null" && C([h, d, null]) == "[null,null,null]" && C({ a: [T, !0, !1, null, `\0\b
|
|
2232
|
+
\f\r `] }) == V && 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
|
+
x = !1;
|
|
2238
2238
|
}
|
|
2239
2239
|
}
|
|
2240
|
-
_ =
|
|
2240
|
+
_ = x;
|
|
2241
2241
|
}
|
|
2242
2242
|
if (E == "json-parse") {
|
|
2243
2243
|
var D = u.parse;
|
|
2244
2244
|
if (typeof D == "function")
|
|
2245
2245
|
try {
|
|
2246
2246
|
if (D("0") === 0 && !D(!1)) {
|
|
2247
|
-
T = D(
|
|
2247
|
+
T = D(V);
|
|
2248
2248
|
var N = T.a.length == 5 && T.a[0] === 1;
|
|
2249
2249
|
if (N) {
|
|
2250
2250
|
try {
|
|
@@ -2271,63 +2271,63 @@ function qe() {
|
|
|
2271
2271
|
}
|
|
2272
2272
|
return o[E] = !!_;
|
|
2273
2273
|
}
|
|
2274
|
-
var
|
|
2274
|
+
var c, f, h, d = {}.toString, i = typeof JSON == "object" && JSON, u = typeof e == "object" && e && !e.nodeType && e;
|
|
2275
2275
|
u && i ? (u.stringify = i.stringify, u.parse = i.parse) : u = r.JSON = i || {};
|
|
2276
|
-
var
|
|
2276
|
+
var l = /* @__PURE__ */ new Date(-3509827334573292);
|
|
2277
2277
|
try {
|
|
2278
|
-
|
|
2278
|
+
l = l.getUTCFullYear() == -109252 && l.getUTCMonth() === 0 && l.getUTCDate() === 1 && l.getUTCHours() == 10 && l.getUTCMinutes() == 37 && l.getUTCSeconds() == 6 && l.getUTCMilliseconds() == 708;
|
|
2279
2279
|
} catch {
|
|
2280
2280
|
}
|
|
2281
2281
|
if (!o("json")) {
|
|
2282
|
-
var s = "[object Function]", n = "[object Date]", p = "[object Number]", g = "[object String]", y = "[object Array]",
|
|
2283
|
-
if (!
|
|
2284
|
-
var
|
|
2285
|
-
return
|
|
2282
|
+
var s = "[object Function]", n = "[object Date]", p = "[object Number]", g = "[object String]", y = "[object Array]", b = "[object Boolean]", j = o("bug-string-char-index");
|
|
2283
|
+
if (!l)
|
|
2284
|
+
var U = Math.floor, P = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], I = function(E, _) {
|
|
2285
|
+
return P[_] + 365 * (E - 1970) + U((E - 1969 + (_ = +(_ > 1))) / 4) - U((E - 1901 + _) / 100) + U((E - 1601 + _) / 400);
|
|
2286
2286
|
};
|
|
2287
|
-
(
|
|
2287
|
+
(c = {}.hasOwnProperty) || (c = function(E) {
|
|
2288
2288
|
var _, T = {};
|
|
2289
|
-
return (T.__proto__ = null, T.__proto__ = { toString: 1 }, T).toString != d ?
|
|
2290
|
-
var C = this.__proto__,
|
|
2291
|
-
return this.__proto__ = C,
|
|
2292
|
-
} : (_ = T.constructor,
|
|
2289
|
+
return (T.__proto__ = null, T.__proto__ = { toString: 1 }, T).toString != d ? c = function(V) {
|
|
2290
|
+
var C = this.__proto__, x = V in (this.__proto__ = null, this);
|
|
2291
|
+
return this.__proto__ = C, x;
|
|
2292
|
+
} : (_ = T.constructor, c = function(V) {
|
|
2293
2293
|
var C = (this.constructor || _).prototype;
|
|
2294
|
-
return
|
|
2295
|
-
}), T = null,
|
|
2294
|
+
return V in this && !(V in C && this[V] === C[V]);
|
|
2295
|
+
}), T = null, c.call(this, E);
|
|
2296
2296
|
});
|
|
2297
|
-
var k = { boolean: 1, number: 1, string: 1, undefined: 1 },
|
|
2297
|
+
var k = { boolean: 1, number: 1, string: 1, undefined: 1 }, w = function(E, _) {
|
|
2298
2298
|
var T = typeof E[_];
|
|
2299
2299
|
return T == "object" ? !!E[_] : !k[T];
|
|
2300
2300
|
};
|
|
2301
2301
|
if (f = function(E, _) {
|
|
2302
|
-
var T,
|
|
2302
|
+
var T, V, C, x = 0;
|
|
2303
2303
|
(T = function() {
|
|
2304
2304
|
this.valueOf = 0;
|
|
2305
|
-
}).prototype.valueOf = 0,
|
|
2306
|
-
for (C in
|
|
2307
|
-
|
|
2308
|
-
return T =
|
|
2305
|
+
}).prototype.valueOf = 0, V = new T();
|
|
2306
|
+
for (C in V)
|
|
2307
|
+
c.call(V, C) && x++;
|
|
2308
|
+
return T = V = null, x ? f = x == 2 ? function(D, N) {
|
|
2309
2309
|
var F, $ = {}, W = d.call(D) == s;
|
|
2310
2310
|
for (F in D)
|
|
2311
|
-
W && F == "prototype" ||
|
|
2311
|
+
W && F == "prototype" || c.call($, F) || !($[F] = 1) || !c.call(D, F) || N(F);
|
|
2312
2312
|
} : function(D, N) {
|
|
2313
2313
|
var F, $, W = d.call(D) == s;
|
|
2314
2314
|
for (F in D)
|
|
2315
|
-
W && F == "prototype" || !
|
|
2316
|
-
($ ||
|
|
2317
|
-
} : (
|
|
2318
|
-
var F, $, W = d.call(D) == s, H = !W && typeof D.constructor != "function" &&
|
|
2315
|
+
W && F == "prototype" || !c.call(D, F) || ($ = F === "constructor") || N(F);
|
|
2316
|
+
($ || c.call(D, F = "constructor")) && N(F);
|
|
2317
|
+
} : (V = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"], f = function(D, N) {
|
|
2318
|
+
var F, $, W = d.call(D) == s, H = !W && typeof D.constructor != "function" && w(D, "hasOwnProperty") ? D.hasOwnProperty : c;
|
|
2319
2319
|
for (F in D)
|
|
2320
2320
|
W && F == "prototype" || !H.call(D, F) || N(F);
|
|
2321
|
-
for ($ =
|
|
2321
|
+
for ($ = V.length; F = V[--$]; H.call(D, F) && N(F))
|
|
2322
2322
|
;
|
|
2323
2323
|
}), f(E, _);
|
|
2324
2324
|
}, !o("json-stringify")) {
|
|
2325
2325
|
var A = { 92: "\\\\", 34: '\\"', 8: "\\b", 12: "\\f", 10: "\\n", 13: "\\r", 9: "\\t" }, v = "000000", m = function(E, _) {
|
|
2326
2326
|
return (v + (_ || 0)).slice(-E);
|
|
2327
2327
|
}, O = "\\u00", B = function(E) {
|
|
2328
|
-
var _, T = '"',
|
|
2329
|
-
for (
|
|
2330
|
-
var D = E.charCodeAt(
|
|
2328
|
+
var _, T = '"', V = 0, C = E.length, x = C > 10 && j;
|
|
2329
|
+
for (x && (_ = E.split("")); C > V; V++) {
|
|
2330
|
+
var D = E.charCodeAt(V);
|
|
2331
2331
|
switch (D) {
|
|
2332
2332
|
case 8:
|
|
2333
2333
|
case 9:
|
|
@@ -2343,26 +2343,26 @@ function qe() {
|
|
|
2343
2343
|
T += O + m(2, D.toString(16));
|
|
2344
2344
|
break;
|
|
2345
2345
|
}
|
|
2346
|
-
T +=
|
|
2346
|
+
T += x ? _[V] : j ? E.charAt(V) : E[V];
|
|
2347
2347
|
}
|
|
2348
2348
|
}
|
|
2349
2349
|
return T + '"';
|
|
2350
|
-
}, R = function(E, _, T,
|
|
2351
|
-
var N, F, $, W, H,
|
|
2350
|
+
}, R = function(E, _, T, V, C, x, D) {
|
|
2351
|
+
var N, F, $, W, H, ie, he, ue, pe, fe, ee, de, le, ae, ge, ye;
|
|
2352
2352
|
try {
|
|
2353
2353
|
N = _[E];
|
|
2354
2354
|
} catch {
|
|
2355
2355
|
}
|
|
2356
2356
|
if (typeof N == "object" && N)
|
|
2357
|
-
if (F = d.call(N), F != n ||
|
|
2358
|
-
typeof N.toJSON == "function" && (F != p && F != g && F != y ||
|
|
2357
|
+
if (F = d.call(N), F != n || c.call(N, "toJSON"))
|
|
2358
|
+
typeof N.toJSON == "function" && (F != p && F != g && F != y || c.call(N, "toJSON")) && (N = N.toJSON(E));
|
|
2359
2359
|
else if (N > -1 / 0 && 1 / 0 > N) {
|
|
2360
2360
|
if (I) {
|
|
2361
|
-
for (H =
|
|
2361
|
+
for (H = U(N / 864e5), $ = U(H / 365.2425) + 1970 - 1; I($ + 1, 0) <= H; $++)
|
|
2362
2362
|
;
|
|
2363
|
-
for (W =
|
|
2363
|
+
for (W = U((H - I($, 0)) / 30.42); I($, W + 1) <= H; W++)
|
|
2364
2364
|
;
|
|
2365
|
-
H = 1 + H - I($, W),
|
|
2365
|
+
H = 1 + H - I($, W), ie = (N % 864e5 + 864e5) % 864e5, he = U(ie / 36e5) % 24, ue = U(ie / 6e4) % 60, pe = U(ie / 1e3) % 60, fe = ie % 1e3;
|
|
2366
2366
|
} else
|
|
2367
2367
|
$ = N.getUTCFullYear(), W = N.getUTCMonth(), H = N.getUTCDate(), he = N.getUTCHours(), ue = N.getUTCMinutes(), pe = N.getUTCSeconds(), fe = N.getUTCMilliseconds();
|
|
2368
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";
|
|
@@ -2370,53 +2370,53 @@ function qe() {
|
|
|
2370
2370
|
N = null;
|
|
2371
2371
|
if (T && (N = T.call(_, E, N)), N === null)
|
|
2372
2372
|
return "null";
|
|
2373
|
-
if (F = d.call(N), F ==
|
|
2373
|
+
if (F = d.call(N), F == b)
|
|
2374
2374
|
return "" + N;
|
|
2375
2375
|
if (F == p)
|
|
2376
2376
|
return N > -1 / 0 && 1 / 0 > N ? "" + N : "null";
|
|
2377
2377
|
if (F == g)
|
|
2378
2378
|
return B("" + N);
|
|
2379
2379
|
if (typeof N == "object") {
|
|
2380
|
-
for (
|
|
2381
|
-
if (D[
|
|
2380
|
+
for (ae = D.length; ae--; )
|
|
2381
|
+
if (D[ae] === N)
|
|
2382
2382
|
throw TypeError();
|
|
2383
|
-
if (D.push(N), ee = [], ge =
|
|
2384
|
-
for (
|
|
2385
|
-
de = R(
|
|
2383
|
+
if (D.push(N), ee = [], ge = x, x += C, F == y) {
|
|
2384
|
+
for (le = 0, ae = N.length; ae > le; le++)
|
|
2385
|
+
de = R(le, N, T, V, C, x, D), ee.push(de === h ? "null" : de);
|
|
2386
2386
|
ye = ee.length ? C ? `[
|
|
2387
|
-
` +
|
|
2388
|
-
` +
|
|
2387
|
+
` + x + ee.join(`,
|
|
2388
|
+
` + x) + `
|
|
2389
2389
|
` + ge + "]" : "[" + ee.join(",") + "]" : "[]";
|
|
2390
2390
|
} else
|
|
2391
|
-
f(
|
|
2392
|
-
var Ee = R(ve, N, T,
|
|
2393
|
-
Ee !==
|
|
2391
|
+
f(V || N, function(ve) {
|
|
2392
|
+
var Ee = R(ve, N, T, V, C, x, D);
|
|
2393
|
+
Ee !== h && ee.push(B(ve) + ":" + (C ? " " : "") + Ee);
|
|
2394
2394
|
}), ye = ee.length ? C ? `{
|
|
2395
|
-
` +
|
|
2396
|
-
` +
|
|
2395
|
+
` + x + ee.join(`,
|
|
2396
|
+
` + x) + `
|
|
2397
2397
|
` + ge + "}" : "{" + ee.join(",") + "}" : "{}";
|
|
2398
2398
|
return D.pop(), ye;
|
|
2399
2399
|
}
|
|
2400
2400
|
};
|
|
2401
2401
|
u.stringify = function(E, _, T) {
|
|
2402
|
-
var
|
|
2402
|
+
var V, C, x, D;
|
|
2403
2403
|
if (typeof _ == "function" || typeof _ == "object" && _) {
|
|
2404
2404
|
if ((D = d.call(_)) == s)
|
|
2405
2405
|
C = _;
|
|
2406
2406
|
else if (D == y) {
|
|
2407
|
-
|
|
2408
|
-
for (var N, F = 0, $ = _.length; $ > F; N = _[F++], D = d.call(N), (D == g || D == p) && (
|
|
2407
|
+
x = {};
|
|
2408
|
+
for (var N, F = 0, $ = _.length; $ > F; N = _[F++], D = d.call(N), (D == g || D == p) && (x[N] = 1))
|
|
2409
2409
|
;
|
|
2410
2410
|
}
|
|
2411
2411
|
}
|
|
2412
2412
|
if (T)
|
|
2413
2413
|
if ((D = d.call(T)) == p) {
|
|
2414
2414
|
if ((T -= T % 1) > 0)
|
|
2415
|
-
for (
|
|
2415
|
+
for (V = "", T > 10 && (T = 10); V.length < T; V += " ")
|
|
2416
2416
|
;
|
|
2417
2417
|
} else
|
|
2418
|
-
D == g && (
|
|
2419
|
-
return R("", (N = {}, N[""] = E, N), C,
|
|
2418
|
+
D == g && (V = T.length <= 10 ? T : T.slice(0, 10));
|
|
2419
|
+
return R("", (N = {}, N[""] = E, N), C, x, V, "", []);
|
|
2420
2420
|
};
|
|
2421
2421
|
}
|
|
2422
2422
|
if (!o("json-parse")) {
|
|
@@ -2424,8 +2424,8 @@ function qe() {
|
|
|
2424
2424
|
`, 102: "\f", 114: "\r" }, M = function() {
|
|
2425
2425
|
throw S = X = null, SyntaxError();
|
|
2426
2426
|
}, J = function() {
|
|
2427
|
-
for (var E, _, T,
|
|
2428
|
-
switch (C =
|
|
2427
|
+
for (var E, _, T, V, C, x = X, D = x.length; D > S; )
|
|
2428
|
+
switch (C = x.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 =
|
|
2441
|
+
return E = j ? x.charAt(S) : x[S], S++, E;
|
|
2442
2442
|
case 34:
|
|
2443
2443
|
for (E = "@", S++; D > S; )
|
|
2444
|
-
if (C =
|
|
2444
|
+
if (C = x.charCodeAt(S), 32 > C)
|
|
2445
2445
|
M();
|
|
2446
2446
|
else if (C == 92)
|
|
2447
|
-
switch (C =
|
|
2447
|
+
switch (C = x.charCodeAt(++S)) {
|
|
2448
2448
|
case 92:
|
|
2449
2449
|
case 34:
|
|
2450
2450
|
case 47:
|
|
@@ -2457,8 +2457,8 @@ function qe() {
|
|
|
2457
2457
|
break;
|
|
2458
2458
|
case 117:
|
|
2459
2459
|
for (_ = ++S, T = S + 4; T > S; S++)
|
|
2460
|
-
C =
|
|
2461
|
-
E += K("0x" +
|
|
2460
|
+
C = x.charCodeAt(S), C >= 48 && 57 >= C || C >= 97 && 102 >= C || C >= 65 && 70 >= C || M();
|
|
2461
|
+
E += K("0x" + x.slice(_, S));
|
|
2462
2462
|
break;
|
|
2463
2463
|
default:
|
|
2464
2464
|
M();
|
|
@@ -2466,74 +2466,74 @@ function qe() {
|
|
|
2466
2466
|
else {
|
|
2467
2467
|
if (C == 34)
|
|
2468
2468
|
break;
|
|
2469
|
-
for (C =
|
|
2470
|
-
C =
|
|
2471
|
-
E +=
|
|
2469
|
+
for (C = x.charCodeAt(S), _ = S; C >= 32 && C != 92 && C != 34; )
|
|
2470
|
+
C = x.charCodeAt(++S);
|
|
2471
|
+
E += x.slice(_, S);
|
|
2472
2472
|
}
|
|
2473
|
-
if (
|
|
2473
|
+
if (x.charCodeAt(S) == 34)
|
|
2474
2474
|
return S++, E;
|
|
2475
2475
|
M();
|
|
2476
2476
|
default:
|
|
2477
|
-
if (_ = S, C == 45 && (
|
|
2478
|
-
for (C == 48 && (C =
|
|
2477
|
+
if (_ = S, C == 45 && (V = !0, C = x.charCodeAt(++S)), C >= 48 && 57 >= C) {
|
|
2478
|
+
for (C == 48 && (C = x.charCodeAt(S + 1), C >= 48 && 57 >= C) && M(), V = !1; D > S && (C = x.charCodeAt(S), C >= 48 && 57 >= C); S++)
|
|
2479
2479
|
;
|
|
2480
|
-
if (
|
|
2481
|
-
for (T = ++S; D > T && (C =
|
|
2480
|
+
if (x.charCodeAt(S) == 46) {
|
|
2481
|
+
for (T = ++S; D > T && (C = x.charCodeAt(T), C >= 48 && 57 >= C); T++)
|
|
2482
2482
|
;
|
|
2483
2483
|
T == S && M(), S = T;
|
|
2484
2484
|
}
|
|
2485
|
-
if (C =
|
|
2486
|
-
for (C =
|
|
2485
|
+
if (C = x.charCodeAt(S), C == 101 || C == 69) {
|
|
2486
|
+
for (C = x.charCodeAt(++S), (C == 43 || C == 45) && S++, T = S; D > T && (C = x.charCodeAt(T), C >= 48 && 57 >= C); T++)
|
|
2487
2487
|
;
|
|
2488
2488
|
T == S && M(), S = T;
|
|
2489
2489
|
}
|
|
2490
|
-
return +
|
|
2490
|
+
return +x.slice(_, S);
|
|
2491
2491
|
}
|
|
2492
|
-
if (
|
|
2492
|
+
if (V && M(), x.slice(S, S + 4) == "true")
|
|
2493
2493
|
return S += 4, !0;
|
|
2494
|
-
if (
|
|
2494
|
+
if (x.slice(S, S + 5) == "false")
|
|
2495
2495
|
return S += 5, !1;
|
|
2496
|
-
if (
|
|
2496
|
+
if (x.slice(S, S + 4) == "null")
|
|
2497
2497
|
return S += 4, null;
|
|
2498
2498
|
M();
|
|
2499
2499
|
}
|
|
2500
2500
|
return "$";
|
|
2501
|
-
},
|
|
2501
|
+
}, oe = function(E) {
|
|
2502
2502
|
var _, T;
|
|
2503
2503
|
if (E == "$" && M(), typeof E == "string") {
|
|
2504
|
-
if ((
|
|
2504
|
+
if ((j ? E.charAt(0) : E[0]) == "@")
|
|
2505
2505
|
return E.slice(1);
|
|
2506
2506
|
if (E == "[") {
|
|
2507
2507
|
for (_ = []; E = J(), E != "]"; T || (T = !0))
|
|
2508
|
-
T && (E == "," ? (E = J(), E == "]" && M()) : M()), E == "," && M(), _.push(
|
|
2508
|
+
T && (E == "," ? (E = J(), E == "]" && M()) : M()), E == "," && M(), _.push(oe(E));
|
|
2509
2509
|
return _;
|
|
2510
2510
|
}
|
|
2511
2511
|
if (E == "{") {
|
|
2512
2512
|
for (_ = {}; E = J(), E != "}"; T || (T = !0))
|
|
2513
|
-
T && (E == "," ? (E = J(), E == "}" && M()) : M()), (E == "," || typeof E != "string" || (
|
|
2513
|
+
T && (E == "," ? (E = J(), E == "}" && M()) : M()), (E == "," || typeof E != "string" || (j ? E.charAt(0) : E[0]) != "@" || J() != ":") && M(), _[E.slice(1)] = oe(J());
|
|
2514
2514
|
return _;
|
|
2515
2515
|
}
|
|
2516
2516
|
M();
|
|
2517
2517
|
}
|
|
2518
2518
|
return E;
|
|
2519
2519
|
}, Ce = function(E, _, T) {
|
|
2520
|
-
var
|
|
2521
|
-
|
|
2520
|
+
var V = ke(E, _, T);
|
|
2521
|
+
V === h ? delete E[_] : E[_] = V;
|
|
2522
2522
|
}, ke = function(E, _, T) {
|
|
2523
|
-
var
|
|
2523
|
+
var V, C = E[_];
|
|
2524
2524
|
if (typeof C == "object" && C)
|
|
2525
2525
|
if (d.call(C) == y)
|
|
2526
|
-
for (
|
|
2527
|
-
Ce(C,
|
|
2526
|
+
for (V = C.length; V--; )
|
|
2527
|
+
Ce(C, V, T);
|
|
2528
2528
|
else
|
|
2529
|
-
f(C, function(
|
|
2530
|
-
Ce(C,
|
|
2529
|
+
f(C, function(x) {
|
|
2530
|
+
Ce(C, x, T);
|
|
2531
2531
|
});
|
|
2532
2532
|
return T.call(E, _, C);
|
|
2533
2533
|
};
|
|
2534
2534
|
u.parse = function(E, _) {
|
|
2535
|
-
var T,
|
|
2536
|
-
return S = 0, X = "" + E, T =
|
|
2535
|
+
var T, V;
|
|
2536
|
+
return S = 0, X = "" + E, T = oe(J()), J() != "$" && M(), S = X = null, _ && d.call(_) == s ? ke((V = {}, V[""] = T, V), "", _) : T;
|
|
2537
2537
|
};
|
|
2538
2538
|
}
|
|
2539
2539
|
}
|
|
@@ -2541,11 +2541,11 @@ function qe() {
|
|
|
2541
2541
|
}, {}],
|
|
2542
2542
|
48: [function(a, t) {
|
|
2543
2543
|
function e(r, o) {
|
|
2544
|
-
var
|
|
2544
|
+
var c = [];
|
|
2545
2545
|
o = o || 0;
|
|
2546
2546
|
for (var f = o || 0; f < r.length; f++)
|
|
2547
|
-
|
|
2548
|
-
return
|
|
2547
|
+
c[f - o] = r[f];
|
|
2548
|
+
return c;
|
|
2549
2549
|
}
|
|
2550
2550
|
t.exports = e;
|
|
2551
2551
|
}, {}]
|
|
@@ -2576,19 +2576,19 @@ const Se = Object.entries(Ke).reduce(
|
|
|
2576
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 || {}),
|
|
2580
|
-
class
|
|
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 || {}), re = /* @__PURE__ */ ((a) => (a.CONNECTED = "connected", a.DISCONNECTED = "disconnected", a.TRYING_TO_CONNECT = "tryingToConnect", a))(re || {}), 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
|
+
class te {
|
|
2581
2581
|
static mapExtensionEvent(t) {
|
|
2582
|
-
var f,
|
|
2582
|
+
var f, h;
|
|
2583
2583
|
const e = t.reason;
|
|
2584
2584
|
let r, o;
|
|
2585
2585
|
t.data.currentCall && (o = this.mapExtensionCall(t, t.data.currentCall));
|
|
2586
|
-
const
|
|
2586
|
+
const c = this.mapExtensionData(t, t.data);
|
|
2587
2587
|
return e === Oe.HANGUP ? r = {
|
|
2588
2588
|
...t,
|
|
2589
2589
|
reason: e,
|
|
2590
2590
|
data: {
|
|
2591
|
-
...
|
|
2591
|
+
...c,
|
|
2592
2592
|
currentCall: o ? {
|
|
2593
2593
|
...o,
|
|
2594
2594
|
duration: o.callAnswered_UTC_CLIENT ? Date.now() - o.callAnswered_UTC_CLIENT : 0
|
|
@@ -2604,9 +2604,9 @@ class le {
|
|
|
2604
2604
|
} : r = {
|
|
2605
2605
|
...t,
|
|
2606
2606
|
data: {
|
|
2607
|
-
...
|
|
2607
|
+
...c,
|
|
2608
2608
|
currentCall: o,
|
|
2609
|
-
calls: (
|
|
2609
|
+
calls: (h = t.data.calls) == null ? void 0 : h.map((d) => this.mapExtensionCall(t, d))
|
|
2610
2610
|
},
|
|
2611
2611
|
reason: e
|
|
2612
2612
|
}, r;
|
|
@@ -2624,6 +2624,71 @@ class le {
|
|
|
2624
2624
|
})
|
|
2625
2625
|
};
|
|
2626
2626
|
}
|
|
2627
|
+
static mapAllVoicebotStatus(t) {
|
|
2628
|
+
return {
|
|
2629
|
+
...t,
|
|
2630
|
+
voicebots: t.voicebots.map((e) => ({
|
|
2631
|
+
...e,
|
|
2632
|
+
Calls: e.Calls.map((r) => {
|
|
2633
|
+
var o;
|
|
2634
|
+
return {
|
|
2635
|
+
...this.mapVoicebotCall(t, r),
|
|
2636
|
+
eventsData: (o = r == null ? void 0 : r.eventsData) == null ? void 0 : o.map(
|
|
2637
|
+
(c) => this.mapVoicebotEventsData(t, c)
|
|
2638
|
+
)
|
|
2639
|
+
};
|
|
2640
|
+
})
|
|
2641
|
+
}))
|
|
2642
|
+
};
|
|
2643
|
+
}
|
|
2644
|
+
static mapVoicebotEvent(t) {
|
|
2645
|
+
var e, r;
|
|
2646
|
+
return {
|
|
2647
|
+
...t,
|
|
2648
|
+
data: {
|
|
2649
|
+
...t.data,
|
|
2650
|
+
Call: {
|
|
2651
|
+
...this.mapVoicebotCall(t, t.data.Call),
|
|
2652
|
+
eventsData: (r = (e = t.data.Call) == null ? void 0 : e.eventsData) == null ? void 0 : r.map((o) => this.mapVoicebotEventsData(t, o))
|
|
2653
|
+
}
|
|
2654
|
+
}
|
|
2655
|
+
};
|
|
2656
|
+
}
|
|
2657
|
+
static mapVoicebotInitialCallHistory(t) {
|
|
2658
|
+
return {
|
|
2659
|
+
...t,
|
|
2660
|
+
history: t.history.map((e) => ({
|
|
2661
|
+
...this.mapVoicebotCall(t, e),
|
|
2662
|
+
eventsData: this.mapVoicebotEventsData(t, e)
|
|
2663
|
+
}))
|
|
2664
|
+
};
|
|
2665
|
+
}
|
|
2666
|
+
static mapVoicebotCall(t, e) {
|
|
2667
|
+
return this.configureUTCForObject(
|
|
2668
|
+
e,
|
|
2669
|
+
[
|
|
2670
|
+
{
|
|
2671
|
+
key: "callStarted",
|
|
2672
|
+
format: "sec"
|
|
2673
|
+
}
|
|
2674
|
+
],
|
|
2675
|
+
t.servertime,
|
|
2676
|
+
t.servertimeoffset
|
|
2677
|
+
);
|
|
2678
|
+
}
|
|
2679
|
+
static mapVoicebotEventsData(t, e) {
|
|
2680
|
+
return this.configureUTCForObject(
|
|
2681
|
+
e,
|
|
2682
|
+
[
|
|
2683
|
+
{
|
|
2684
|
+
key: "Timestamp",
|
|
2685
|
+
format: "sec"
|
|
2686
|
+
}
|
|
2687
|
+
],
|
|
2688
|
+
t.servertime,
|
|
2689
|
+
t.servertimeoffset
|
|
2690
|
+
);
|
|
2691
|
+
}
|
|
2627
2692
|
static mapExtensionData(t, e) {
|
|
2628
2693
|
return this.configureUTCForObject(
|
|
2629
2694
|
e,
|
|
@@ -2735,19 +2800,19 @@ class le {
|
|
|
2735
2800
|
* @returns Original object extended with new _UTC and _UTC_CLIENT properties for each configured timestamp
|
|
2736
2801
|
*/
|
|
2737
2802
|
static configureUTCForObject(t, e, r, o) {
|
|
2738
|
-
const
|
|
2803
|
+
const c = (r - o * 60) * 1e3, f = Date.now() - c, h = {};
|
|
2739
2804
|
return e.forEach((d) => {
|
|
2740
2805
|
const i = t[d.key], u = d.key;
|
|
2741
2806
|
if (i !== 0 && typeof i == "number" && !isNaN(i)) {
|
|
2742
|
-
let
|
|
2743
|
-
d.format === "ms" && (
|
|
2744
|
-
const s = (
|
|
2745
|
-
this.assignProperty(
|
|
2807
|
+
let l = i;
|
|
2808
|
+
d.format === "ms" && (l = Math.floor(l / 1e3));
|
|
2809
|
+
const s = (l - o * 60) * 1e3;
|
|
2810
|
+
this.assignProperty(h, `${u}_UTC`, s), this.assignProperty(h, `${u}_UTC_CLIENT`, s + f);
|
|
2746
2811
|
} else
|
|
2747
|
-
this.assignProperty(
|
|
2812
|
+
this.assignProperty(h, `${u}_UTC`, 0), this.assignProperty(h, `${u}_UTC_CLIENT`, 0);
|
|
2748
2813
|
}), {
|
|
2749
2814
|
...t,
|
|
2750
|
-
...
|
|
2815
|
+
...h
|
|
2751
2816
|
};
|
|
2752
2817
|
}
|
|
2753
2818
|
}
|
|
@@ -2799,7 +2864,7 @@ class nt {
|
|
|
2799
2864
|
*/
|
|
2800
2865
|
handleNetworkOnline() {
|
|
2801
2866
|
this.networkReconnectTimeout && clearTimeout(this.networkReconnectTimeout), this.networkReconnectTimeout = setTimeout(() => {
|
|
2802
|
-
this.connectionState === "disconnected" && this.doReconnect && this.eventsSdkClass.connect(
|
|
2867
|
+
this.connectionState === "disconnected" && this.doReconnect && this.eventsSdkClass.connect(se.NEXT);
|
|
2803
2868
|
}, 500);
|
|
2804
2869
|
}
|
|
2805
2870
|
/**
|
|
@@ -2818,7 +2883,7 @@ class nt {
|
|
|
2818
2883
|
this.connectionState = "connecting";
|
|
2819
2884
|
const t = this.eventsSdkClass.authClass.token, e = this.eventsSdkClass.options.protocol, r = this.eventsSdkClass.server;
|
|
2820
2885
|
try {
|
|
2821
|
-
const o = r ? r.Domain : this.eventsSdkClass.URL,
|
|
2886
|
+
const o = r ? r.Domain : this.eventsSdkClass.URL, c = r ? `${e}://${o}` : this.eventsSdkClass.URL, f = {
|
|
2822
2887
|
reconnection: !1,
|
|
2823
2888
|
upgrade: !1,
|
|
2824
2889
|
transports: ["websocket"],
|
|
@@ -2826,12 +2891,12 @@ class nt {
|
|
|
2826
2891
|
query: { token: t },
|
|
2827
2892
|
timeout: this.eventsSdkClass.options.timeout
|
|
2828
2893
|
};
|
|
2829
|
-
if (this.ioFunction &&
|
|
2830
|
-
this.io = this.ioFunction(
|
|
2894
|
+
if (this.ioFunction && c)
|
|
2895
|
+
this.io = this.ioFunction(c, f), this.initSocketEvents(), this.eventsSdkClass.eventEmitterClass.emit(
|
|
2831
2896
|
L.ONLINE_STATUS_EVENT,
|
|
2832
2897
|
{
|
|
2833
|
-
attemptToConnect:
|
|
2834
|
-
connectionStatus:
|
|
2898
|
+
attemptToConnect: c,
|
|
2899
|
+
connectionStatus: re.TRYING_TO_CONNECT
|
|
2835
2900
|
}
|
|
2836
2901
|
), this.eventsSdkClass.loggerClass.sdkAttemptToConnect(o);
|
|
2837
2902
|
else
|
|
@@ -2871,7 +2936,7 @@ class nt {
|
|
|
2871
2936
|
} catch {
|
|
2872
2937
|
}
|
|
2873
2938
|
}
|
|
2874
|
-
this.connectionState = "disconnected", this.eventsSdkClass.loggerClass.stop(),
|
|
2939
|
+
this.connectionState = "disconnected", this.eventsSdkClass.loggerClass.stop(), ce.clearSessionStorage();
|
|
2875
2940
|
}
|
|
2876
2941
|
/**
|
|
2877
2942
|
* Sets up event listeners for all Socket.IO events
|
|
@@ -2890,21 +2955,25 @@ class nt {
|
|
|
2890
2955
|
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, t);
|
|
2891
2956
|
}
|
|
2892
2957
|
onQueueEvent(t, e) {
|
|
2893
|
-
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e,
|
|
2958
|
+
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, te.mapQueueEvent(t));
|
|
2894
2959
|
}
|
|
2895
2960
|
onExtensionEvent(t, e) {
|
|
2896
2961
|
this.updateEventTimestamp();
|
|
2897
|
-
const r =
|
|
2962
|
+
const r = te.mapExtensionEvent(t);
|
|
2898
2963
|
r && (this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, r));
|
|
2899
2964
|
}
|
|
2900
2965
|
onDialerEvent(t, e) {
|
|
2901
2966
|
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, t);
|
|
2902
2967
|
}
|
|
2903
2968
|
onVoicebotEvent(t, e) {
|
|
2904
|
-
this.updateEventTimestamp()
|
|
2969
|
+
this.updateEventTimestamp();
|
|
2970
|
+
const r = te.mapVoicebotEvent(t);
|
|
2971
|
+
this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, r);
|
|
2905
2972
|
}
|
|
2906
2973
|
onAllVoicebotsStatus(t, e) {
|
|
2907
|
-
this.updateEventTimestamp()
|
|
2974
|
+
this.updateEventTimestamp();
|
|
2975
|
+
const r = te.mapAllVoicebotStatus(t);
|
|
2976
|
+
this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, r);
|
|
2908
2977
|
}
|
|
2909
2978
|
onVoicebotSubscribedToCall(t, e) {
|
|
2910
2979
|
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, t);
|
|
@@ -2913,17 +2982,19 @@ class nt {
|
|
|
2913
2982
|
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, t);
|
|
2914
2983
|
}
|
|
2915
2984
|
onVoicebotInitialCallHistory(t, e) {
|
|
2916
|
-
this.updateEventTimestamp()
|
|
2985
|
+
this.updateEventTimestamp();
|
|
2986
|
+
const r = te.mapVoicebotInitialCallHistory(t);
|
|
2987
|
+
this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, r);
|
|
2917
2988
|
}
|
|
2918
2989
|
onVoicebotUnsubscribedFromCall(t, e) {
|
|
2919
2990
|
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, t);
|
|
2920
2991
|
}
|
|
2921
2992
|
onLoginStatusEvent(t, e) {
|
|
2922
|
-
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e,
|
|
2993
|
+
this.updateEventTimestamp(), this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, te.mapLoginStatusEvent(t));
|
|
2923
2994
|
}
|
|
2924
2995
|
onAllExtensionStatus(t, e) {
|
|
2925
2996
|
this.updateEventTimestamp();
|
|
2926
|
-
const r =
|
|
2997
|
+
const r = te.mapAllExtensionStatus(t);
|
|
2927
2998
|
this.eventsSdkClass.loggerClass.eventLog(e, t), this.eventsSdkClass.eventEmitterClass.emit(e, r);
|
|
2928
2999
|
}
|
|
2929
3000
|
onAllDialerStatus(t, e) {
|
|
@@ -2948,7 +3019,7 @@ class nt {
|
|
|
2948
3019
|
*/
|
|
2949
3020
|
onConnect() {
|
|
2950
3021
|
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:
|
|
3022
|
+
connectionStatus: re.CONNECTED
|
|
2952
3023
|
}), this.eventsSdkClass.loggerClass.start().then(() => {
|
|
2953
3024
|
this.eventsSdkClass.loggerClass.sdkConnectionSuccess();
|
|
2954
3025
|
});
|
|
@@ -2958,12 +3029,12 @@ class nt {
|
|
|
2958
3029
|
*/
|
|
2959
3030
|
scheduleReconnect() {
|
|
2960
3031
|
!this.doReconnect || this.reconnectTimeout || (this.eventsSdkClass.eventEmitterClass.emit(L.ONLINE_STATUS_EVENT, {
|
|
2961
|
-
connectionStatus:
|
|
3032
|
+
connectionStatus: re.TRYING_TO_CONNECT
|
|
2962
3033
|
}), this.reconnectTimeout = setTimeout(() => {
|
|
2963
3034
|
this.reconnectTimeout = void 0, this.reconnectionTime = Math.min(
|
|
2964
3035
|
this.reconnectionTime * 2,
|
|
2965
3036
|
this.maxReconnectionDelay
|
|
2966
|
-
), this.reconnectionTime > this.maxReconnectionDelay && (this.reconnectionTime = this.eventsSdkClass.options.reconnectionDelay), this.eventsSdkClass.connect(
|
|
3037
|
+
), this.reconnectionTime > this.maxReconnectionDelay && (this.reconnectionTime = this.eventsSdkClass.options.reconnectionDelay), this.eventsSdkClass.connect(se.NEXT);
|
|
2967
3038
|
}, this.reconnectionTime * 1e3));
|
|
2968
3039
|
}
|
|
2969
3040
|
/**
|
|
@@ -2972,7 +3043,7 @@ class nt {
|
|
|
2972
3043
|
onDisconnect(t) {
|
|
2973
3044
|
if (this.connectionState = "disconnected", this.eventsSdkClass.loggerClass.sdkDisconnect([t]), !this.doReconnect) {
|
|
2974
3045
|
this.eventsSdkClass.eventEmitterClass.emit(L.ONLINE_STATUS_EVENT, {
|
|
2975
|
-
connectionStatus:
|
|
3046
|
+
connectionStatus: re.DISCONNECTED
|
|
2976
3047
|
});
|
|
2977
3048
|
return;
|
|
2978
3049
|
}
|
|
@@ -2983,7 +3054,7 @@ class nt {
|
|
|
2983
3054
|
*/
|
|
2984
3055
|
onConnectError(t) {
|
|
2985
3056
|
this.connectionState = "disconnected", this.eventsSdkClass.loggerClass.sdkAttemptToConnectError(t), this.doReconnect ? this.scheduleReconnect() : this.eventsSdkClass.eventEmitterClass.emit(L.ONLINE_STATUS_EVENT, {
|
|
2986
|
-
connectionStatus:
|
|
3057
|
+
connectionStatus: re.DISCONNECTED
|
|
2987
3058
|
});
|
|
2988
3059
|
}
|
|
2989
3060
|
/**
|
|
@@ -3009,7 +3080,7 @@ class st {
|
|
|
3009
3080
|
this.eventsSdkClass.options.loggerSocketConnection && (t = this.eventsSdkClass.options.loggerSocketConnection), this.eventsSdkClass.socketIoClass.ioFunction && !t && (t = this.eventsSdkClass.socketIoClass.ioFunction(
|
|
3010
3081
|
this.eventsSdkClass.options.loggerServer,
|
|
3011
3082
|
this.eventsSdkClass.options.loggerConnectOptions
|
|
3012
|
-
)), t && (this.storageLogger = new
|
|
3083
|
+
)), t && (this.storageLogger = new xe({
|
|
3013
3084
|
socket: t,
|
|
3014
3085
|
loggerOptions: this.eventsSdkClass.options.loggerConfig
|
|
3015
3086
|
}));
|
|
@@ -3144,13 +3215,13 @@ class st {
|
|
|
3144
3215
|
}
|
|
3145
3216
|
eventLog(t, e) {
|
|
3146
3217
|
const r = {
|
|
3147
|
-
[
|
|
3148
|
-
[
|
|
3149
|
-
[
|
|
3150
|
-
[
|
|
3151
|
-
[
|
|
3218
|
+
[ne.FULL]: [],
|
|
3219
|
+
[ne.BOOTSTRAP]: [L.LOGIN_STATUS, L.LOGIN_SUCCESS, L.ALL_EXTENSION_STATUS, L.ALL_DIALER_STATUS],
|
|
3220
|
+
[ne.DEBUG_EXTENSIONS]: [L.ALL_EXTENSION_STATUS, L.EXTENSION_EVENT, L.EXTENSIONS_UPDATED],
|
|
3221
|
+
[ne.DEBUG_DIALER]: [L.ALL_DIALER_STATUS, L.DIALER_EVENT],
|
|
3222
|
+
[ne.DEBUG_QUEUE]: [L.QUEUE_EVENT]
|
|
3152
3223
|
};
|
|
3153
|
-
this.eventsSdkClass.options.debugOption && (r[this.eventsSdkClass.options.debugOption].includes(t) || this.eventsSdkClass.options.debugOption ===
|
|
3224
|
+
this.eventsSdkClass.options.debugOption && (r[this.eventsSdkClass.options.debugOption].includes(t) || this.eventsSdkClass.options.debugOption === ne.FULL) && this.log({
|
|
3154
3225
|
Message: `Event name: ${t}`,
|
|
3155
3226
|
Body: {
|
|
3156
3227
|
...this.getStaticData(),
|
|
@@ -3200,7 +3271,7 @@ class rt {
|
|
|
3200
3271
|
if (t === "*")
|
|
3201
3272
|
this.allListeners = this.allListeners.filter((r) => r !== e);
|
|
3202
3273
|
else {
|
|
3203
|
-
const o = this.listeners[t].filter((
|
|
3274
|
+
const o = this.listeners[t].filter((c) => c !== e);
|
|
3204
3275
|
this.listeners = {
|
|
3205
3276
|
...this.listeners,
|
|
3206
3277
|
[t]: o
|
|
@@ -3258,7 +3329,7 @@ class ct {
|
|
|
3258
3329
|
this.socketIoClass.io && this.socketIoClass.io.emit(t, ...e);
|
|
3259
3330
|
}
|
|
3260
3331
|
connect(t) {
|
|
3261
|
-
t ===
|
|
3332
|
+
t === se.MAIN && this.findMainServer(), t === se.NEXT && this.findNextServer(), this.socketIoClass.doReconnect = !0;
|
|
3262
3333
|
try {
|
|
3263
3334
|
this.loggerClass.init();
|
|
3264
3335
|
} catch (e) {
|
|
@@ -3308,8 +3379,8 @@ class ct {
|
|
|
3308
3379
|
export {
|
|
3309
3380
|
We as CallStatusEnum,
|
|
3310
3381
|
He as CallTypeEnum,
|
|
3311
|
-
|
|
3312
|
-
|
|
3382
|
+
re as ConnectionStatusEnum,
|
|
3383
|
+
ne as DebugOption,
|
|
3313
3384
|
Ye as DialerTypeEnum,
|
|
3314
3385
|
Qe as DirectionEnum,
|
|
3315
3386
|
Ze as DoNotCallMeStatusCodeEnum,
|
|
@@ -3319,7 +3390,7 @@ export {
|
|
|
3319
3390
|
Z as LoginType,
|
|
3320
3391
|
tt as QueueEventReasonEnum,
|
|
3321
3392
|
_e as ServerListenerEventsEnum,
|
|
3322
|
-
|
|
3393
|
+
se as ServerParameter,
|
|
3323
3394
|
ct as default
|
|
3324
3395
|
};
|
|
3325
3396
|
//# sourceMappingURL=voicenter-events-sdk.es.js.map
|