@voicenter-team/events-sdk 0.0.111 → 0.0.112
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 +591 -585
- 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 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
1
|
+
var Ie = Object.defineProperty;
|
|
2
|
+
var Re = (a, t, e) => t in a ? Ie(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
|
+
var q = (a, t, e) => (Re(a, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
import xe from "ws";
|
|
5
5
|
import Ue, { LevelEnum as z, ActionNameEnum as Y, LogTypeEnum as Q } from "@voicenter-team/socketio-storage-logger";
|
|
6
6
|
function Be(a) {
|
|
7
7
|
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
8
8
|
}
|
|
9
|
-
var
|
|
9
|
+
var we = { exports: {} }, be = { exports: {} };
|
|
10
10
|
(function() {
|
|
11
11
|
var a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", t = {
|
|
12
12
|
// Bit-wise rotation left
|
|
@@ -99,7 +99,7 @@ var De = be.exports, me = {
|
|
|
99
99
|
return t.join("");
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
},
|
|
102
|
+
}, Te = me;
|
|
103
103
|
/*!
|
|
104
104
|
* Determine if an object is a Buffer
|
|
105
105
|
*
|
|
@@ -116,37 +116,37 @@ function Pe(a) {
|
|
|
116
116
|
return typeof a.readFloatLE == "function" && typeof a.slice == "function" && Ae(a.slice(0, 0));
|
|
117
117
|
}
|
|
118
118
|
(function() {
|
|
119
|
-
var a = De, t =
|
|
119
|
+
var a = De, t = Te.utf8, e = je, s = Te.bin, o = function(h, f) {
|
|
120
120
|
h.constructor == String ? f && f.encoding === "binary" ? h = s.stringToBytes(h) : h = t.stringToBytes(h) : e(h) ? h = Array.prototype.slice.call(h, 0) : !Array.isArray(h) && h.constructor !== Uint8Array && (h = h.toString());
|
|
121
|
-
for (var l = a.bytesToWords(h), d = h.length * 8, i = 1732584193,
|
|
121
|
+
for (var l = a.bytesToWords(h), d = h.length * 8, i = 1732584193, p = -271733879, c = -1732584194, r = 271733878, n = 0; n < l.length; n++)
|
|
122
122
|
l[n] = (l[n] << 8 | l[n] >>> 24) & 16711935 | (l[n] << 24 | l[n] >>> 8) & 4278255360;
|
|
123
123
|
l[d >>> 5] |= 128 << d % 32, l[(d + 64 >>> 9 << 4) + 14] = d;
|
|
124
|
-
for (var
|
|
125
|
-
var P = i,
|
|
126
|
-
i =
|
|
124
|
+
for (var u = o._ff, g = o._gg, y = o._hh, w = o._ii, n = 0; n < l.length; n += 16) {
|
|
125
|
+
var P = i, B = p, M = c, _ = r;
|
|
126
|
+
i = u(i, p, c, r, l[n + 0], 7, -680876936), r = u(r, i, p, c, l[n + 1], 12, -389564586), c = u(c, r, i, p, l[n + 2], 17, 606105819), p = u(p, c, r, i, l[n + 3], 22, -1044525330), i = u(i, p, c, r, l[n + 4], 7, -176418897), r = u(r, i, p, c, l[n + 5], 12, 1200080426), c = u(c, r, i, p, l[n + 6], 17, -1473231341), p = u(p, c, r, i, l[n + 7], 22, -45705983), i = u(i, p, c, r, l[n + 8], 7, 1770035416), r = u(r, i, p, c, l[n + 9], 12, -1958414417), c = u(c, r, i, p, l[n + 10], 17, -42063), p = u(p, c, r, i, l[n + 11], 22, -1990404162), i = u(i, p, c, r, l[n + 12], 7, 1804603682), r = u(r, i, p, c, l[n + 13], 12, -40341101), c = u(c, r, i, p, l[n + 14], 17, -1502002290), p = u(p, c, r, i, l[n + 15], 22, 1236535329), i = g(i, p, c, r, l[n + 1], 5, -165796510), r = g(r, i, p, c, l[n + 6], 9, -1069501632), c = g(c, r, i, p, l[n + 11], 14, 643717713), p = g(p, c, r, i, l[n + 0], 20, -373897302), i = g(i, p, c, r, l[n + 5], 5, -701558691), r = g(r, i, p, c, l[n + 10], 9, 38016083), c = g(c, r, i, p, l[n + 15], 14, -660478335), p = g(p, c, r, i, l[n + 4], 20, -405537848), i = g(i, p, c, r, l[n + 9], 5, 568446438), r = g(r, i, p, c, l[n + 14], 9, -1019803690), c = g(c, r, i, p, l[n + 3], 14, -187363961), p = g(p, c, r, i, l[n + 8], 20, 1163531501), i = g(i, p, c, r, l[n + 13], 5, -1444681467), r = g(r, i, p, c, l[n + 2], 9, -51403784), c = g(c, r, i, p, l[n + 7], 14, 1735328473), p = g(p, c, r, i, l[n + 12], 20, -1926607734), i = y(i, p, c, r, l[n + 5], 4, -378558), r = y(r, i, p, c, l[n + 8], 11, -2022574463), c = y(c, r, i, p, l[n + 11], 16, 1839030562), p = y(p, c, r, i, l[n + 14], 23, -35309556), i = y(i, p, c, r, l[n + 1], 4, -1530992060), r = y(r, i, p, c, l[n + 4], 11, 1272893353), c = y(c, r, i, p, l[n + 7], 16, -155497632), p = y(p, c, r, i, l[n + 10], 23, -1094730640), i = y(i, p, c, r, l[n + 13], 4, 681279174), r = y(r, i, p, c, l[n + 0], 11, -358537222), c = y(c, r, i, p, l[n + 3], 16, -722521979), p = y(p, c, r, i, l[n + 6], 23, 76029189), i = y(i, p, c, r, l[n + 9], 4, -640364487), r = y(r, i, p, c, l[n + 12], 11, -421815835), c = y(c, r, i, p, l[n + 15], 16, 530742520), p = y(p, c, r, i, l[n + 2], 23, -995338651), i = w(i, p, c, r, l[n + 0], 6, -198630844), r = w(r, i, p, c, l[n + 7], 10, 1126891415), c = w(c, r, i, p, l[n + 14], 15, -1416354905), p = w(p, c, r, i, l[n + 5], 21, -57434055), i = w(i, p, c, r, l[n + 12], 6, 1700485571), r = w(r, i, p, c, l[n + 3], 10, -1894986606), c = w(c, r, i, p, l[n + 10], 15, -1051523), p = w(p, c, r, i, l[n + 1], 21, -2054922799), i = w(i, p, c, r, l[n + 8], 6, 1873313359), r = w(r, i, p, c, l[n + 15], 10, -30611744), c = w(c, r, i, p, l[n + 6], 15, -1560198380), p = w(p, c, r, i, l[n + 13], 21, 1309151649), i = w(i, p, c, r, l[n + 4], 6, -145523070), r = w(r, i, p, c, l[n + 11], 10, -1120210379), c = w(c, r, i, p, l[n + 2], 15, 718787259), p = w(p, c, r, i, l[n + 9], 21, -343485551), i = i + P >>> 0, p = p + B >>> 0, c = c + M >>> 0, r = r + _ >>> 0;
|
|
127
127
|
}
|
|
128
|
-
return a.endian([i,
|
|
128
|
+
return a.endian([i, p, c, r]);
|
|
129
129
|
};
|
|
130
|
-
o._ff = function(h, f, l, d, i,
|
|
130
|
+
o._ff = function(h, f, l, d, i, p, c) {
|
|
131
131
|
var r = h + (f & l | ~f & d) + (i >>> 0) + c;
|
|
132
|
-
return (r <<
|
|
133
|
-
}, o._gg = function(h, f, l, d, i,
|
|
132
|
+
return (r << p | r >>> 32 - p) + f;
|
|
133
|
+
}, o._gg = function(h, f, l, d, i, p, c) {
|
|
134
134
|
var r = h + (f & d | l & ~d) + (i >>> 0) + c;
|
|
135
|
-
return (r <<
|
|
136
|
-
}, o._hh = function(h, f, l, d, i,
|
|
135
|
+
return (r << p | r >>> 32 - p) + f;
|
|
136
|
+
}, o._hh = function(h, f, l, d, i, p, c) {
|
|
137
137
|
var r = h + (f ^ l ^ d) + (i >>> 0) + c;
|
|
138
|
-
return (r <<
|
|
139
|
-
}, o._ii = function(h, f, l, d, i,
|
|
138
|
+
return (r << p | r >>> 32 - p) + f;
|
|
139
|
+
}, o._ii = function(h, f, l, d, i, p, c) {
|
|
140
140
|
var r = h + (l ^ (f | ~d)) + (i >>> 0) + c;
|
|
141
|
-
return (r <<
|
|
142
|
-
}, o._blocksize = 16, o._digestsize = 16,
|
|
141
|
+
return (r << p | r >>> 32 - p) + f;
|
|
142
|
+
}, o._blocksize = 16, o._digestsize = 16, we.exports = function(h, f) {
|
|
143
143
|
if (h == null)
|
|
144
144
|
throw new Error("Illegal argument " + h);
|
|
145
145
|
var l = a.wordsToBytes(o(h, f));
|
|
146
146
|
return f && f.asBytes ? l : f && f.asString ? s.bytesToString(l) : a.bytesToHex(l);
|
|
147
147
|
};
|
|
148
148
|
})();
|
|
149
|
-
var Fe =
|
|
149
|
+
var Fe = we.exports;
|
|
150
150
|
const Me = /* @__PURE__ */ Be(Fe);
|
|
151
151
|
var te = /* @__PURE__ */ ((a) => (a.BOOTSTRAP = "bootstrap", a.DEBUG_EXTENSIONS = "debugExtensions", a.DEBUG_QUEUE = "debugQueue", a.DEBUG_DIALER = "debugDialer", a.FULL = "full", a))(te || {}), ne = /* @__PURE__ */ ((a) => (a.MAIN = "main", a.NEXT = "next", a))(ne || {}), Z = /* @__PURE__ */ ((a) => (a.USER = "User", a.TOKEN = "Token", a))(Z || {});
|
|
152
152
|
class ae {
|
|
@@ -171,14 +171,14 @@ class ae {
|
|
|
171
171
|
typeof chrome < "u" && typeof chrome.storage < "u" && chrome.storage.session.clear(), typeof window < "u" && typeof window.sessionStorage < "u" && typeof window.sessionStorage.clear == "function" && window.sessionStorage.clear();
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
class
|
|
174
|
+
class Ve {
|
|
175
175
|
constructor(t) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
176
|
+
q(this, "delay", 1e3);
|
|
177
|
+
q(this, "lastLoginTimestamp");
|
|
178
|
+
q(this, "token");
|
|
179
|
+
q(this, "refreshToken");
|
|
180
|
+
q(this, "tokenExpiry");
|
|
181
|
+
q(this, "storageKey");
|
|
182
182
|
this.eventsSdkClass = t, this.eventsSdkClass = t, this.storageKey = "";
|
|
183
183
|
}
|
|
184
184
|
async login() {
|
|
@@ -370,8 +370,8 @@ const Ne = {
|
|
|
370
370
|
debug: !1
|
|
371
371
|
}
|
|
372
372
|
};
|
|
373
|
-
function
|
|
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 =
|
|
373
|
+
function qe() {
|
|
374
|
+
return typeof window < "u" && (typeof window.navigator > "u" || typeof window.navigator.userAgent > "u") && (window.navigator.userAgent = "react-native"), typeof self > "u" && typeof global == "object" && (global.self = global, global.WebSocket = xe, typeof self.navigator > "u" && (self.navigator = { userAgent: "node" })), function a(t, e, s) {
|
|
375
375
|
function o(l, d) {
|
|
376
376
|
if (!e[l]) {
|
|
377
377
|
if (!t[l]) {
|
|
@@ -382,11 +382,11 @@ function Xe() {
|
|
|
382
382
|
return h(l, !0);
|
|
383
383
|
throw new Error("Cannot find module '" + l + "'");
|
|
384
384
|
}
|
|
385
|
-
var
|
|
386
|
-
t[l][0].call(
|
|
385
|
+
var p = e[l] = { exports: {} };
|
|
386
|
+
t[l][0].call(p.exports, function(c) {
|
|
387
387
|
var r = t[l][1][c];
|
|
388
388
|
return o(r || c);
|
|
389
|
-
},
|
|
389
|
+
}, p, p.exports, a, t, e, s);
|
|
390
390
|
}
|
|
391
391
|
return e[l].exports;
|
|
392
392
|
}
|
|
@@ -398,10 +398,10 @@ function Xe() {
|
|
|
398
398
|
t.exports = a("./lib/");
|
|
399
399
|
}, { "./lib/": 2 }],
|
|
400
400
|
2: [function(a, t, e) {
|
|
401
|
-
function s(i,
|
|
402
|
-
typeof i == "object" && (
|
|
403
|
-
var c, r = o(i), n = r.source,
|
|
404
|
-
return
|
|
401
|
+
function s(i, p) {
|
|
402
|
+
typeof i == "object" && (p = i, i = void 0), p = p || {};
|
|
403
|
+
var c, r = o(i), n = r.source, u = r.id;
|
|
404
|
+
return p.forceNew || p["force new connection"] || p.multiplex === !1 ? (l("ignoring socket cache for %s", n), c = f(n, p)) : (d[u] || (l("new io instance for %s", n), d[u] = f(n, p)), c = d[u]), c.socket(r.path);
|
|
405
405
|
}
|
|
406
406
|
var o = a("./url"), h = a("socket.io-parser"), f = a("./manager"), l = a("debug")("socket.io-client");
|
|
407
407
|
t.exports = e = s;
|
|
@@ -416,7 +416,7 @@ function Xe() {
|
|
|
416
416
|
jitter: this.randomizationFactor()
|
|
417
417
|
}), this.timeout(n.timeout == null ? 2e4 : n.timeout), this.readyState = "closed", this.uri = r, 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(r, n);
|
|
418
418
|
}
|
|
419
|
-
var s = (a("./url"), a("engine.io-client")), o = a("./socket"), h = a("component-emitter"), f = a("socket.io-parser"), l = a("./on"), d = a("component-bind"), i = (a("object-component"), a("debug")("socket.io-client:manager")),
|
|
419
|
+
var s = (a("./url"), a("engine.io-client")), o = a("./socket"), h = a("component-emitter"), f = a("socket.io-parser"), l = a("./on"), d = a("component-bind"), i = (a("object-component"), a("debug")("socket.io-client:manager")), p = a("indexof"), c = a("backo2");
|
|
420
420
|
t.exports = e, e.prototype.emitAll = function() {
|
|
421
421
|
this.emit.apply(this, arguments);
|
|
422
422
|
for (var r in this.nsps)
|
|
@@ -442,23 +442,23 @@ function Xe() {
|
|
|
442
442
|
if (i("readyState %s", this.readyState), ~this.readyState.indexOf("open"))
|
|
443
443
|
return this;
|
|
444
444
|
i("opening %s", this.uri), this.engine = s(this.uri, this.opts);
|
|
445
|
-
var n = this.engine,
|
|
445
|
+
var n = this.engine, u = this;
|
|
446
446
|
this.readyState = "opening", this.skipReconnect = !1;
|
|
447
447
|
var g = l(n, "open", function() {
|
|
448
|
-
|
|
449
|
-
}), y = l(n, "error", function(
|
|
450
|
-
if (i("connect_error"),
|
|
448
|
+
u.onopen(), r && r();
|
|
449
|
+
}), y = l(n, "error", function(B) {
|
|
450
|
+
if (i("connect_error"), u.cleanup(), u.readyState = "closed", u.emitAll("connect_error", B), r) {
|
|
451
451
|
var M = new Error("Connection error");
|
|
452
|
-
M.data =
|
|
452
|
+
M.data = B, r(M);
|
|
453
453
|
} else
|
|
454
|
-
|
|
454
|
+
u.maybeReconnectOnOpen();
|
|
455
455
|
});
|
|
456
456
|
if (this._timeout !== !1) {
|
|
457
|
-
var
|
|
458
|
-
i("connect attempt will timeout after %d",
|
|
457
|
+
var w = this._timeout;
|
|
458
|
+
i("connect attempt will timeout after %d", w);
|
|
459
459
|
var P = setTimeout(function() {
|
|
460
|
-
i("connect attempt timed out after %d",
|
|
461
|
-
},
|
|
460
|
+
i("connect attempt timed out after %d", w), g.destroy(), n.close(), n.emit("error", "timeout"), u.emitAll("connect_timeout", w);
|
|
461
|
+
}, w);
|
|
462
462
|
this.subs.push({
|
|
463
463
|
destroy: function() {
|
|
464
464
|
clearTimeout(P);
|
|
@@ -480,21 +480,21 @@ function Xe() {
|
|
|
480
480
|
var n = this.nsps[r];
|
|
481
481
|
if (!n) {
|
|
482
482
|
n = new o(this, r), this.nsps[r] = n;
|
|
483
|
-
var
|
|
483
|
+
var u = this;
|
|
484
484
|
n.on("connect", function() {
|
|
485
|
-
n.id =
|
|
485
|
+
n.id = u.engine.id, ~p(u.connected, n) || u.connected.push(n);
|
|
486
486
|
});
|
|
487
487
|
}
|
|
488
488
|
return n;
|
|
489
489
|
}, e.prototype.destroy = function(r) {
|
|
490
|
-
var n =
|
|
490
|
+
var n = p(this.connected, r);
|
|
491
491
|
~n && this.connected.splice(n, 1), this.connected.length || this.close();
|
|
492
492
|
}, e.prototype.packet = function(r) {
|
|
493
493
|
i("writing packet %j", r);
|
|
494
494
|
var n = this;
|
|
495
|
-
n.encoding ? n.packetBuffer.push(r) : (n.encoding = !0, this.encoder.encode(r, function(
|
|
496
|
-
for (var g = 0; g <
|
|
497
|
-
n.engine.write(
|
|
495
|
+
n.encoding ? n.packetBuffer.push(r) : (n.encoding = !0, this.encoder.encode(r, function(u) {
|
|
496
|
+
for (var g = 0; g < u.length; g++)
|
|
497
|
+
n.engine.write(u[g]);
|
|
498
498
|
n.encoding = !1, n.processPacketQueue();
|
|
499
499
|
}));
|
|
500
500
|
}, e.prototype.processPacketQueue = function() {
|
|
@@ -519,14 +519,14 @@ function Xe() {
|
|
|
519
519
|
else {
|
|
520
520
|
var n = this.backoff.duration();
|
|
521
521
|
i("will wait %dms before reconnect attempt", n), this.reconnecting = !0;
|
|
522
|
-
var
|
|
522
|
+
var u = setTimeout(function() {
|
|
523
523
|
r.skipReconnect || (i("attempting reconnect"), r.emitAll("reconnect_attempt", r.backoff.attempts), r.emitAll("reconnecting", r.backoff.attempts), r.skipReconnect || r.open(function(g) {
|
|
524
524
|
g ? (i("reconnect attempt error"), r.reconnecting = !1, r.reconnect(), r.emitAll("reconnect_error", g.data)) : (i("reconnect success"), r.onreconnect());
|
|
525
525
|
}));
|
|
526
526
|
}, n);
|
|
527
527
|
this.subs.push({
|
|
528
528
|
destroy: function() {
|
|
529
|
-
clearTimeout(
|
|
529
|
+
clearTimeout(u);
|
|
530
530
|
}
|
|
531
531
|
});
|
|
532
532
|
}
|
|
@@ -558,10 +558,10 @@ function Xe() {
|
|
|
558
558
|
t.exports = e;
|
|
559
559
|
}, {}],
|
|
560
560
|
5: [function(a, t, e) {
|
|
561
|
-
function s(n,
|
|
562
|
-
this.io = n, this.nsp =
|
|
561
|
+
function s(n, u) {
|
|
562
|
+
this.io = n, this.nsp = u, this.json = this, this.ids = 0, this.acks = {}, this.io.autoConnect && this.open(), this.receiveBuffer = [], this.sendBuffer = [], this.connected = !1, this.disconnected = !0;
|
|
563
563
|
}
|
|
564
|
-
var o = a("socket.io-parser"), h = a("component-emitter"), f = a("to-array"), l = a("./on"), d = a("component-bind"), i = a("debug")("socket.io-client:socket"),
|
|
564
|
+
var o = a("socket.io-parser"), h = a("component-emitter"), f = a("to-array"), l = a("./on"), d = a("component-bind"), i = a("debug")("socket.io-client:socket"), p = a("has-binary");
|
|
565
565
|
t.exports = s;
|
|
566
566
|
var c = {
|
|
567
567
|
connect: 1,
|
|
@@ -588,10 +588,10 @@ function Xe() {
|
|
|
588
588
|
}, s.prototype.emit = function(n) {
|
|
589
589
|
if (c.hasOwnProperty(n))
|
|
590
590
|
return r.apply(this, arguments), this;
|
|
591
|
-
var
|
|
592
|
-
u
|
|
593
|
-
var y = { type: g, data:
|
|
594
|
-
return typeof
|
|
591
|
+
var u = f(arguments), g = o.EVENT;
|
|
592
|
+
p(u) && (g = o.BINARY_EVENT);
|
|
593
|
+
var y = { type: g, data: u };
|
|
594
|
+
return typeof u[u.length - 1] == "function" && (i("emitting packet with ack id %d", this.ids), this.acks[this.ids] = u.pop(), y.id = this.ids++), this.connected ? this.packet(y) : this.sendBuffer.push(y), this;
|
|
595
595
|
}, s.prototype.packet = function(n) {
|
|
596
596
|
n.nsp = this.nsp, this.io.packet(n);
|
|
597
597
|
}, s.prototype.onopen = function() {
|
|
@@ -623,23 +623,23 @@ function Xe() {
|
|
|
623
623
|
this.emit("error", n.data);
|
|
624
624
|
}
|
|
625
625
|
}, s.prototype.onevent = function(n) {
|
|
626
|
-
var
|
|
627
|
-
i("emitting event %j",
|
|
626
|
+
var u = n.data || [];
|
|
627
|
+
i("emitting event %j", u), n.id != null && (i("attaching ack callback to event"), u.push(this.ack(n.id))), this.connected ? r.apply(this, u) : this.receiveBuffer.push(u);
|
|
628
628
|
}, s.prototype.ack = function(n) {
|
|
629
|
-
var
|
|
629
|
+
var u = this, g = !1;
|
|
630
630
|
return function() {
|
|
631
631
|
if (!g) {
|
|
632
632
|
g = !0;
|
|
633
633
|
var y = f(arguments);
|
|
634
634
|
i("sending ack %j", y);
|
|
635
|
-
var
|
|
636
|
-
|
|
635
|
+
var w = p(y) ? o.BINARY_ACK : o.ACK;
|
|
636
|
+
u.packet({ type: w, id: n, data: y });
|
|
637
637
|
}
|
|
638
638
|
};
|
|
639
639
|
}, s.prototype.onack = function(n) {
|
|
640
640
|
i("calling ack %s with %j", n.id, n.data);
|
|
641
|
-
var
|
|
642
|
-
|
|
641
|
+
var u = this.acks[n.id];
|
|
642
|
+
u.apply(this, n.data), delete this.acks[n.id];
|
|
643
643
|
}, s.prototype.onconnect = function() {
|
|
644
644
|
this.connected = !0, this.disconnected = !1, this.emit("connect"), this.emitBuffered();
|
|
645
645
|
}, s.prototype.emitBuffered = function() {
|
|
@@ -804,33 +804,33 @@ function Xe() {
|
|
|
804
804
|
}, { "./socket": 13, "engine.io-parser": 25 }],
|
|
805
805
|
13: [function(a, t) {
|
|
806
806
|
(function(e) {
|
|
807
|
-
function s(n,
|
|
807
|
+
function s(n, u) {
|
|
808
808
|
if (!(this instanceof s))
|
|
809
|
-
return new s(n,
|
|
810
|
-
if (
|
|
811
|
-
var g =
|
|
812
|
-
|
|
809
|
+
return new s(n, u);
|
|
810
|
+
if (u = u || {}, n && typeof n == "object" && (u = n, n = null), n && (n = p(n), u.host = n.host, u.secure = n.protocol == "https" || n.protocol == "wss", u.port = n.port, n.query && (u.query = n.query)), this.secure = u.secure != null ? u.secure : e.location && location.protocol == "https:", u.host) {
|
|
811
|
+
var g = u.host.split(":");
|
|
812
|
+
u.hostname = g.shift(), g.length ? u.port = g.pop() : u.port || (u.port = this.secure ? "443" : "80");
|
|
813
813
|
}
|
|
814
|
-
this.agent =
|
|
814
|
+
this.agent = u.agent || !1, this.hostname = u.hostname || (e.location ? location.hostname : "localhost"), this.port = u.port || (e.location && location.port ? location.port : this.secure ? 443 : 80), this.query = u.query || {}, typeof this.query == "string" && (this.query = r.decode(this.query)), this.upgrade = u.upgrade !== !1, this.path = (u.path || "/engine.io").replace(/\/$/, "") + "/", this.forceJSONP = !!u.forceJSONP, this.jsonp = u.jsonp !== !1, this.forceBase64 = !!u.forceBase64, this.enablesXDR = !!u.enablesXDR, this.timestampParam = u.timestampParam || "t", this.timestampRequests = u.timestampRequests, this.transports = u.transports || ["polling", "websocket"], this.readyState = "", this.writeBuffer = [], this.callbackBuffer = [], this.policyPort = u.policyPort || 843, this.rememberUpgrade = u.rememberUpgrade || !1, this.binaryType = null, this.onlyBinaryUpgrades = u.onlyBinaryUpgrades, this.pfx = u.pfx || null, this.key = u.key || null, this.passphrase = u.passphrase || null, this.cert = u.cert || null, this.ca = u.ca || null, this.ciphers = u.ciphers || null, this.rejectUnauthorized = u.rejectUnauthorized || null, this.open();
|
|
815
815
|
}
|
|
816
816
|
function o(n) {
|
|
817
|
-
var
|
|
817
|
+
var u = {};
|
|
818
818
|
for (var g in n)
|
|
819
|
-
n.hasOwnProperty(g) && (
|
|
820
|
-
return
|
|
819
|
+
n.hasOwnProperty(g) && (u[g] = n[g]);
|
|
820
|
+
return u;
|
|
821
821
|
}
|
|
822
|
-
var h = a("./transports"), f = a("component-emitter"), l = a("debug")("engine.io-client:socket"), d = a("indexof"), i = a("engine.io-parser"),
|
|
822
|
+
var h = a("./transports"), f = a("component-emitter"), l = a("debug")("engine.io-client:socket"), d = a("indexof"), i = a("engine.io-parser"), p = a("parseuri"), c = a("parsejson"), r = a("parseqs");
|
|
823
823
|
t.exports = s, s.priorWebsocketSuccess = !1, f(s.prototype), s.protocol = i.protocol, s.Socket = s, s.Transport = a("./transport"), s.transports = a("./transports"), s.parser = a("engine.io-parser"), s.prototype.createTransport = function(n) {
|
|
824
824
|
l('creating transport "%s"', n);
|
|
825
|
-
var
|
|
826
|
-
|
|
825
|
+
var u = o(this.query);
|
|
826
|
+
u.EIO = i.protocol, u.transport = n, this.id && (u.sid = this.id);
|
|
827
827
|
var g = new h[n]({
|
|
828
828
|
agent: this.agent,
|
|
829
829
|
hostname: this.hostname,
|
|
830
830
|
port: this.port,
|
|
831
831
|
secure: this.secure,
|
|
832
832
|
path: this.path,
|
|
833
|
-
query:
|
|
833
|
+
query: u,
|
|
834
834
|
forceJSONP: this.forceJSONP,
|
|
835
835
|
jsonp: this.jsonp,
|
|
836
836
|
forceBase64: this.forceBase64,
|
|
@@ -849,9 +849,9 @@ function Xe() {
|
|
|
849
849
|
});
|
|
850
850
|
return g;
|
|
851
851
|
}, s.prototype.open = function() {
|
|
852
|
-
var
|
|
852
|
+
var u;
|
|
853
853
|
if (this.rememberUpgrade && s.priorWebsocketSuccess && this.transports.indexOf("websocket") != -1)
|
|
854
|
-
|
|
854
|
+
u = "websocket";
|
|
855
855
|
else {
|
|
856
856
|
if (this.transports.length == 0) {
|
|
857
857
|
var n = this;
|
|
@@ -859,30 +859,30 @@ function Xe() {
|
|
|
859
859
|
n.emit("error", "No transports available");
|
|
860
860
|
}, 0);
|
|
861
861
|
}
|
|
862
|
-
|
|
862
|
+
u = this.transports[0];
|
|
863
863
|
}
|
|
864
864
|
this.readyState = "opening";
|
|
865
|
-
var
|
|
865
|
+
var u;
|
|
866
866
|
try {
|
|
867
|
-
|
|
867
|
+
u = this.createTransport(u);
|
|
868
868
|
} catch {
|
|
869
869
|
return this.transports.shift(), void this.open();
|
|
870
870
|
}
|
|
871
|
-
|
|
871
|
+
u.open(), this.setTransport(u);
|
|
872
872
|
}, s.prototype.setTransport = function(n) {
|
|
873
873
|
l("setting transport %s", n.name);
|
|
874
|
-
var
|
|
874
|
+
var u = this;
|
|
875
875
|
this.transport && (l("clearing existing transport %s", this.transport.name), this.transport.removeAllListeners()), this.transport = n, n.on("drain", function() {
|
|
876
|
-
|
|
876
|
+
u.onDrain();
|
|
877
877
|
}).on("packet", function(g) {
|
|
878
|
-
|
|
878
|
+
u.onPacket(g);
|
|
879
879
|
}).on("error", function(g) {
|
|
880
|
-
|
|
880
|
+
u.onError(g);
|
|
881
881
|
}).on("close", function() {
|
|
882
|
-
|
|
882
|
+
u.onClose("transport close");
|
|
883
883
|
});
|
|
884
884
|
}, s.prototype.probe = function(n) {
|
|
885
|
-
function
|
|
885
|
+
function u() {
|
|
886
886
|
if (b.onlyBinaryUpgrades) {
|
|
887
887
|
var A = !this.supportsBinary && b.transport.supportsBinary;
|
|
888
888
|
C = C || A;
|
|
@@ -912,25 +912,25 @@ function Xe() {
|
|
|
912
912
|
var v = new Error("probe error: " + A);
|
|
913
913
|
v.transport = _.name, g(), l('probe transport "%s" failed because of error: %s', n, A), b.emit("upgradeError", v);
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function w() {
|
|
916
916
|
y("transport closed");
|
|
917
917
|
}
|
|
918
918
|
function P() {
|
|
919
919
|
y("socket closed");
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function B(A) {
|
|
922
922
|
_ && A.name != _.name && (l('"%s" works - aborting "%s"', A.name, _.name), g());
|
|
923
923
|
}
|
|
924
924
|
function M() {
|
|
925
|
-
_.removeListener("open",
|
|
925
|
+
_.removeListener("open", u), _.removeListener("error", y), _.removeListener("close", w), b.removeListener("close", P), b.removeListener("upgrading", B);
|
|
926
926
|
}
|
|
927
927
|
l('probing transport "%s"', n);
|
|
928
928
|
var _ = this.createTransport(n, { probe: 1 }), C = !1, b = this;
|
|
929
|
-
s.priorWebsocketSuccess = !1, _.once("open",
|
|
929
|
+
s.priorWebsocketSuccess = !1, _.once("open", u), _.once("error", y), _.once("close", w), this.once("close", P), this.once("upgrading", B), _.open();
|
|
930
930
|
}, s.prototype.onOpen = function() {
|
|
931
931
|
if (l("socket open"), this.readyState = "open", s.priorWebsocketSuccess = this.transport.name == "websocket", this.emit("open"), this.flush(), this.readyState == "open" && this.upgrade && this.transport.pause) {
|
|
932
932
|
l("starting upgrade probes");
|
|
933
|
-
for (var n = 0,
|
|
933
|
+
for (var n = 0, u = this.upgrades.length; u > n; n++)
|
|
934
934
|
this.probe(this.upgrades[n]);
|
|
935
935
|
}
|
|
936
936
|
}, s.prototype.onPacket = function(n) {
|
|
@@ -943,8 +943,8 @@ function Xe() {
|
|
|
943
943
|
this.setPing();
|
|
944
944
|
break;
|
|
945
945
|
case "error":
|
|
946
|
-
var
|
|
947
|
-
|
|
946
|
+
var u = new Error("server error");
|
|
947
|
+
u.code = n.data, this.emit("error", u);
|
|
948
948
|
break;
|
|
949
949
|
case "message":
|
|
950
950
|
this.emit("data", n.data), this.emit("message", n.data);
|
|
@@ -955,10 +955,10 @@ function Xe() {
|
|
|
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
|
}, s.prototype.onHeartbeat = function(n) {
|
|
957
957
|
clearTimeout(this.pingTimeoutTimer);
|
|
958
|
-
var
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
}, n ||
|
|
958
|
+
var u = this;
|
|
959
|
+
u.pingTimeoutTimer = setTimeout(function() {
|
|
960
|
+
u.readyState != "closed" && u.onClose("ping timeout");
|
|
961
|
+
}, n || u.pingInterval + u.pingTimeout);
|
|
962
962
|
}, s.prototype.setPing = function() {
|
|
963
963
|
var n = this;
|
|
964
964
|
clearTimeout(n.pingIntervalTimer), n.pingIntervalTimer = setTimeout(function() {
|
|
@@ -972,22 +972,22 @@ function Xe() {
|
|
|
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
|
}, s.prototype.flush = function() {
|
|
974
974
|
this.readyState != "closed" && this.transport.writable && !this.upgrading && this.writeBuffer.length && (l("flushing %d packets in socket", this.writeBuffer.length), this.transport.send(this.writeBuffer), this.prevBufferLen = this.writeBuffer.length, this.emit("flush"));
|
|
975
|
-
}, s.prototype.write = s.prototype.send = function(n,
|
|
976
|
-
return this.sendPacket("message", n,
|
|
977
|
-
}, s.prototype.sendPacket = function(n,
|
|
975
|
+
}, s.prototype.write = s.prototype.send = function(n, u) {
|
|
976
|
+
return this.sendPacket("message", n, u), this;
|
|
977
|
+
}, s.prototype.sendPacket = function(n, u, g) {
|
|
978
978
|
if (this.readyState != "closing" && this.readyState != "closed") {
|
|
979
|
-
var y = { type: n, data:
|
|
979
|
+
var y = { type: n, data: u };
|
|
980
980
|
this.emit("packetCreate", y), this.writeBuffer.push(y), this.callbackBuffer.push(g), this.flush();
|
|
981
981
|
}
|
|
982
982
|
}, s.prototype.close = function() {
|
|
983
983
|
function n() {
|
|
984
984
|
y.onClose("forced close"), l("socket closing - telling transport to close"), y.transport.close();
|
|
985
985
|
}
|
|
986
|
-
function
|
|
987
|
-
y.removeListener("upgrade",
|
|
986
|
+
function u() {
|
|
987
|
+
y.removeListener("upgrade", u), y.removeListener("upgradeError", u), n();
|
|
988
988
|
}
|
|
989
989
|
function g() {
|
|
990
|
-
y.once("upgrade",
|
|
990
|
+
y.once("upgrade", u), y.once("upgradeError", u);
|
|
991
991
|
}
|
|
992
992
|
if (this.readyState == "opening" || this.readyState == "open") {
|
|
993
993
|
this.readyState = "closing";
|
|
@@ -999,18 +999,18 @@ function Xe() {
|
|
|
999
999
|
return this;
|
|
1000
1000
|
}, s.prototype.onError = function(n) {
|
|
1001
1001
|
l("socket error %j", n), s.priorWebsocketSuccess = !1, this.emit("error", n), this.onClose("transport error", n);
|
|
1002
|
-
}, s.prototype.onClose = function(n,
|
|
1002
|
+
}, s.prototype.onClose = function(n, u) {
|
|
1003
1003
|
if (this.readyState == "opening" || this.readyState == "open" || this.readyState == "closing") {
|
|
1004
1004
|
l('socket close with reason: "%s"', n);
|
|
1005
1005
|
var g = this;
|
|
1006
1006
|
clearTimeout(this.pingIntervalTimer), clearTimeout(this.pingTimeoutTimer), setTimeout(function() {
|
|
1007
1007
|
g.writeBuffer = [], g.callbackBuffer = [], g.prevBufferLen = 0;
|
|
1008
|
-
}, 0), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), this.readyState = "closed", this.id = null, this.emit("close", n,
|
|
1008
|
+
}, 0), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), this.readyState = "closed", this.id = null, this.emit("close", n, u);
|
|
1009
1009
|
}
|
|
1010
1010
|
}, s.prototype.filterUpgrades = function(n) {
|
|
1011
|
-
for (var
|
|
1012
|
-
~d(this.transports, n[g]) &&
|
|
1013
|
-
return
|
|
1011
|
+
for (var u = [], g = 0, y = n.length; y > g; g++)
|
|
1012
|
+
~d(this.transports, n[g]) && u.push(n[g]);
|
|
1013
|
+
return u;
|
|
1014
1014
|
};
|
|
1015
1015
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1016
1016
|
}, {
|
|
@@ -1054,12 +1054,12 @@ function Xe() {
|
|
|
1054
1054
|
15: [function(a, t, e) {
|
|
1055
1055
|
(function(s) {
|
|
1056
1056
|
function o(i) {
|
|
1057
|
-
var
|
|
1057
|
+
var p, c = !1, r = !1, n = i.jsonp !== !1;
|
|
1058
1058
|
if (s.location) {
|
|
1059
|
-
var
|
|
1060
|
-
g || (g =
|
|
1059
|
+
var u = location.protocol == "https:", g = location.port;
|
|
1060
|
+
g || (g = u ? 443 : 80), c = i.hostname != location.hostname || g != i.port, r = i.secure != u;
|
|
1061
1061
|
}
|
|
1062
|
-
if (i.xdomain = c, i.xscheme = r,
|
|
1062
|
+
if (i.xdomain = c, i.xscheme = r, p = new h(i), "open" in p && !i.forceJSONP)
|
|
1063
1063
|
return new f(i);
|
|
1064
1064
|
if (!n)
|
|
1065
1065
|
throw new Error("JSONP disabled");
|
|
@@ -1073,8 +1073,8 @@ function Xe() {
|
|
|
1073
1073
|
(function(e) {
|
|
1074
1074
|
function s() {
|
|
1075
1075
|
}
|
|
1076
|
-
function o(
|
|
1077
|
-
h.call(this,
|
|
1076
|
+
function o(p) {
|
|
1077
|
+
h.call(this, p), this.query = this.query || {}, l || (e.___eio || (e.___eio = []), l = e.___eio), this.index = l.length;
|
|
1078
1078
|
var c = this;
|
|
1079
1079
|
l.push(function(r) {
|
|
1080
1080
|
c.onData(r);
|
|
@@ -1088,49 +1088,49 @@ function Xe() {
|
|
|
1088
1088
|
f(o, h), o.prototype.supportsBinary = !1, o.prototype.doClose = function() {
|
|
1089
1089
|
this.script && (this.script.parentNode.removeChild(this.script), this.script = null), this.form && (this.form.parentNode.removeChild(this.form), this.form = null, this.iframe = null), h.prototype.doClose.call(this);
|
|
1090
1090
|
}, o.prototype.doPoll = function() {
|
|
1091
|
-
var
|
|
1092
|
-
this.script && (this.script.parentNode.removeChild(this.script), this.script = null), c.async = !0, c.src = this.uri(), c.onerror = function(
|
|
1093
|
-
|
|
1091
|
+
var p = this, c = document.createElement("script");
|
|
1092
|
+
this.script && (this.script.parentNode.removeChild(this.script), this.script = null), c.async = !0, c.src = this.uri(), c.onerror = function(u) {
|
|
1093
|
+
p.onError("jsonp poll error", u);
|
|
1094
1094
|
};
|
|
1095
1095
|
var r = document.getElementsByTagName("script")[0];
|
|
1096
1096
|
r.parentNode.insertBefore(c, r), this.script = c;
|
|
1097
1097
|
var n = typeof navigator < "u" && /gecko/i.test(navigator.userAgent);
|
|
1098
1098
|
n && setTimeout(function() {
|
|
1099
|
-
var
|
|
1100
|
-
document.body.appendChild(
|
|
1099
|
+
var u = document.createElement("iframe");
|
|
1100
|
+
document.body.appendChild(u), document.body.removeChild(u);
|
|
1101
1101
|
}, 100);
|
|
1102
|
-
}, o.prototype.doWrite = function(
|
|
1102
|
+
}, o.prototype.doWrite = function(p, c) {
|
|
1103
1103
|
function r() {
|
|
1104
1104
|
n(), c();
|
|
1105
1105
|
}
|
|
1106
1106
|
function n() {
|
|
1107
|
-
if (
|
|
1107
|
+
if (u.iframe)
|
|
1108
1108
|
try {
|
|
1109
|
-
|
|
1109
|
+
u.form.removeChild(u.iframe);
|
|
1110
1110
|
} catch (M) {
|
|
1111
|
-
|
|
1111
|
+
u.onError("jsonp polling iframe removal error", M);
|
|
1112
1112
|
}
|
|
1113
1113
|
try {
|
|
1114
|
-
var
|
|
1115
|
-
g = document.createElement(
|
|
1114
|
+
var B = '<iframe src="javascript:0" name="' + u.iframeId + '">';
|
|
1115
|
+
g = document.createElement(B);
|
|
1116
1116
|
} catch {
|
|
1117
|
-
g = document.createElement("iframe"), g.name =
|
|
1117
|
+
g = document.createElement("iframe"), g.name = u.iframeId, g.src = "javascript:0";
|
|
1118
1118
|
}
|
|
1119
|
-
g.id =
|
|
1119
|
+
g.id = u.iframeId, u.form.appendChild(g), u.iframe = g;
|
|
1120
1120
|
}
|
|
1121
|
-
var
|
|
1121
|
+
var u = 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 = P, y.method = "POST", y.setAttribute("accept-charset", "utf-8"),
|
|
1123
|
+
var g, y = document.createElement("form"), w = document.createElement("textarea"), P = this.iframeId = "eio_iframe_" + this.index;
|
|
1124
|
+
y.className = "socketio", y.style.position = "absolute", y.style.top = "-1000px", y.style.left = "-1000px", y.target = P, y.method = "POST", y.setAttribute("accept-charset", "utf-8"), w.name = "d", y.appendChild(w), document.body.appendChild(y), this.form = y, this.area = w;
|
|
1125
1125
|
}
|
|
1126
|
-
this.form.action = this.uri(), n(),
|
|
1127
|
-
`), this.area.value =
|
|
1126
|
+
this.form.action = this.uri(), n(), p = p.replace(i, `\\
|
|
1127
|
+
`), this.area.value = p.replace(d, "\\n");
|
|
1128
1128
|
try {
|
|
1129
1129
|
this.form.submit();
|
|
1130
1130
|
} catch {
|
|
1131
1131
|
}
|
|
1132
1132
|
this.iframe.attachEvent ? this.iframe.onreadystatechange = function() {
|
|
1133
|
-
|
|
1133
|
+
u.iframe.readyState == "complete" && r();
|
|
1134
1134
|
} : this.iframe.onload = r;
|
|
1135
1135
|
};
|
|
1136
1136
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -1141,8 +1141,8 @@ function Xe() {
|
|
|
1141
1141
|
}
|
|
1142
1142
|
function o(r) {
|
|
1143
1143
|
if (d.call(this, r), e.location) {
|
|
1144
|
-
var n = location.protocol == "https:",
|
|
1145
|
-
|
|
1144
|
+
var n = location.protocol == "https:", u = location.port;
|
|
1145
|
+
u || (u = n ? 443 : 80), this.xd = r.hostname != e.location.hostname || u != r.port, this.xs = r.secure != n;
|
|
1146
1146
|
}
|
|
1147
1147
|
}
|
|
1148
1148
|
function h(r) {
|
|
@@ -1152,26 +1152,26 @@ function Xe() {
|
|
|
1152
1152
|
for (var r in h.requests)
|
|
1153
1153
|
h.requests.hasOwnProperty(r) && h.requests[r].abort();
|
|
1154
1154
|
}
|
|
1155
|
-
var l = a("xmlhttprequest"), d = a("./polling"), i = a("component-emitter"),
|
|
1156
|
-
t.exports = o, t.exports.Request = h,
|
|
1155
|
+
var l = a("xmlhttprequest"), d = a("./polling"), i = a("component-emitter"), p = a("component-inherit"), c = a("debug")("engine.io-client:polling-xhr");
|
|
1156
|
+
t.exports = o, t.exports.Request = h, p(o, d), o.prototype.supportsBinary = !0, o.prototype.request = function(r) {
|
|
1157
1157
|
return r = r || {}, r.uri = this.uri(), r.xd = this.xd, r.xs = this.xs, r.agent = this.agent || !1, r.supportsBinary = this.supportsBinary, r.enablesXDR = this.enablesXDR, r.pfx = this.pfx, r.key = this.key, r.passphrase = this.passphrase, r.cert = this.cert, r.ca = this.ca, r.ciphers = this.ciphers, r.rejectUnauthorized = this.rejectUnauthorized, new h(r);
|
|
1158
1158
|
}, o.prototype.doWrite = function(r, n) {
|
|
1159
|
-
var
|
|
1160
|
-
g.on("success", n), g.on("error", function(
|
|
1161
|
-
y.onError("xhr post error",
|
|
1159
|
+
var u = typeof r != "string" && r !== void 0, g = this.request({ method: "POST", data: r, isBinary: u }), y = this;
|
|
1160
|
+
g.on("success", n), g.on("error", function(w) {
|
|
1161
|
+
y.onError("xhr post error", w);
|
|
1162
1162
|
}), this.sendXhr = g;
|
|
1163
1163
|
}, o.prototype.doPoll = function() {
|
|
1164
1164
|
c("xhr poll");
|
|
1165
1165
|
var r = this.request(), n = this;
|
|
1166
|
-
r.on("data", function(
|
|
1167
|
-
n.onData(
|
|
1168
|
-
}), r.on("error", function(
|
|
1169
|
-
n.onError("xhr poll error",
|
|
1166
|
+
r.on("data", function(u) {
|
|
1167
|
+
n.onData(u);
|
|
1168
|
+
}), r.on("error", function(u) {
|
|
1169
|
+
n.onError("xhr poll error", u);
|
|
1170
1170
|
}), this.pollXhr = r;
|
|
1171
1171
|
}, i(h.prototype), h.prototype.create = function() {
|
|
1172
1172
|
var r = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };
|
|
1173
1173
|
r.pfx = this.pfx, r.key = this.key, r.passphrase = this.passphrase, r.cert = this.cert, r.ca = this.ca, r.ciphers = this.ciphers, r.rejectUnauthorized = this.rejectUnauthorized;
|
|
1174
|
-
var n = this.xhr = new l(r),
|
|
1174
|
+
var n = this.xhr = new l(r), u = this;
|
|
1175
1175
|
try {
|
|
1176
1176
|
if (c("xhr open %s: %s", this.method, this.uri), n.open(this.method, this.uri, this.async), this.supportsBinary && (n.responseType = "arraybuffer"), this.method == "POST")
|
|
1177
1177
|
try {
|
|
@@ -1179,17 +1179,17 @@ function Xe() {
|
|
|
1179
1179
|
} catch {
|
|
1180
1180
|
}
|
|
1181
1181
|
"withCredentials" in n && (n.withCredentials = !0), this.hasXDR() ? (n.onload = function() {
|
|
1182
|
-
|
|
1182
|
+
u.onLoad();
|
|
1183
1183
|
}, n.onerror = function() {
|
|
1184
|
-
|
|
1184
|
+
u.onError(n.responseText);
|
|
1185
1185
|
}) : n.onreadystatechange = function() {
|
|
1186
|
-
n.readyState == 4 && (n.status == 200 || n.status == 1223 ?
|
|
1187
|
-
|
|
1186
|
+
n.readyState == 4 && (n.status == 200 || n.status == 1223 ? u.onLoad() : setTimeout(function() {
|
|
1187
|
+
u.onError(n.status);
|
|
1188
1188
|
}, 0));
|
|
1189
1189
|
}, c("xhr data %s", this.data), n.send(this.data);
|
|
1190
1190
|
} catch (g) {
|
|
1191
1191
|
return void setTimeout(function() {
|
|
1192
|
-
|
|
1192
|
+
u.onError(g);
|
|
1193
1193
|
}, 0);
|
|
1194
1194
|
}
|
|
1195
1195
|
e.document && (this.index = h.requestsCount++, h.requests[this.index] = this);
|
|
@@ -1217,8 +1217,8 @@ function Xe() {
|
|
|
1217
1217
|
} catch {
|
|
1218
1218
|
}
|
|
1219
1219
|
r = n === "application/octet-stream" ? this.xhr.response : this.supportsBinary ? "ok" : this.xhr.responseText;
|
|
1220
|
-
} catch (
|
|
1221
|
-
this.onError(
|
|
1220
|
+
} catch (u) {
|
|
1221
|
+
this.onError(u);
|
|
1222
1222
|
}
|
|
1223
1223
|
r != null && this.onData(r);
|
|
1224
1224
|
}, h.prototype.hasXDR = function() {
|
|
@@ -1230,58 +1230,58 @@ function Xe() {
|
|
|
1230
1230
|
}, { "./polling": 18, "component-emitter": 9, "component-inherit": 21, debug: 22, xmlhttprequest: 20 }],
|
|
1231
1231
|
18: [function(a, t) {
|
|
1232
1232
|
function e(i) {
|
|
1233
|
-
var
|
|
1234
|
-
(!d ||
|
|
1233
|
+
var p = i && i.forceBase64;
|
|
1234
|
+
(!d || p) && (this.supportsBinary = !1), s.call(this, i);
|
|
1235
1235
|
}
|
|
1236
1236
|
var s = a("../transport"), o = a("parseqs"), h = a("engine.io-parser"), f = a("component-inherit"), l = a("debug")("engine.io-client:polling");
|
|
1237
1237
|
t.exports = e;
|
|
1238
1238
|
var d = function() {
|
|
1239
|
-
var i = a("xmlhttprequest"),
|
|
1240
|
-
return
|
|
1239
|
+
var i = a("xmlhttprequest"), p = new i({ xdomain: !1 });
|
|
1240
|
+
return p.responseType != null;
|
|
1241
1241
|
}();
|
|
1242
1242
|
f(e, s), e.prototype.name = "polling", e.prototype.doOpen = function() {
|
|
1243
1243
|
this.poll();
|
|
1244
1244
|
}, e.prototype.pause = function(i) {
|
|
1245
|
-
function
|
|
1245
|
+
function p() {
|
|
1246
1246
|
l("paused"), c.readyState = "paused", i();
|
|
1247
1247
|
}
|
|
1248
1248
|
var c = this;
|
|
1249
1249
|
if (this.readyState = "pausing", this.polling || !this.writable) {
|
|
1250
1250
|
var r = 0;
|
|
1251
1251
|
this.polling && (l("we are currently polling - waiting to pause"), r++, this.once("pollComplete", function() {
|
|
1252
|
-
l("pre-pause polling complete"), --r ||
|
|
1252
|
+
l("pre-pause polling complete"), --r || p();
|
|
1253
1253
|
})), this.writable || (l("we are currently writing - waiting to pause"), r++, this.once("drain", function() {
|
|
1254
|
-
l("pre-pause writing complete"), --r ||
|
|
1254
|
+
l("pre-pause writing complete"), --r || p();
|
|
1255
1255
|
}));
|
|
1256
1256
|
} else
|
|
1257
|
-
|
|
1257
|
+
p();
|
|
1258
1258
|
}, e.prototype.poll = function() {
|
|
1259
1259
|
l("polling"), this.polling = !0, this.doPoll(), this.emit("poll");
|
|
1260
1260
|
}, e.prototype.onData = function(i) {
|
|
1261
|
-
var
|
|
1261
|
+
var p = this;
|
|
1262
1262
|
l("polling got data %s", i);
|
|
1263
1263
|
var c = function(r) {
|
|
1264
|
-
return
|
|
1264
|
+
return p.readyState == "opening" && p.onOpen(), r.type == "close" ? (p.onClose(), !1) : void p.onPacket(r);
|
|
1265
1265
|
};
|
|
1266
1266
|
h.decodePayload(i, this.socket.binaryType, c), this.readyState != "closed" && (this.polling = !1, this.emit("pollComplete"), this.readyState == "open" ? this.poll() : l('ignoring poll - transport state "%s"', this.readyState));
|
|
1267
1267
|
}, e.prototype.doClose = function() {
|
|
1268
1268
|
function i() {
|
|
1269
|
-
l("writing close packet"),
|
|
1269
|
+
l("writing close packet"), p.write([{ type: "close" }]);
|
|
1270
1270
|
}
|
|
1271
|
-
var
|
|
1271
|
+
var p = this;
|
|
1272
1272
|
this.readyState == "open" ? (l("transport open - closing"), i()) : (l("transport not open - deferring close"), this.once("open", i));
|
|
1273
1273
|
}, e.prototype.write = function(i) {
|
|
1274
1274
|
var c = this;
|
|
1275
1275
|
this.writable = !1;
|
|
1276
|
-
var
|
|
1276
|
+
var p = function() {
|
|
1277
1277
|
c.writable = !0, c.emit("drain");
|
|
1278
1278
|
}, c = this;
|
|
1279
1279
|
h.encodePayload(i, this.supportsBinary, function(r) {
|
|
1280
|
-
c.doWrite(r,
|
|
1280
|
+
c.doWrite(r, p);
|
|
1281
1281
|
});
|
|
1282
1282
|
}, e.prototype.uri = function() {
|
|
1283
|
-
var i = this.query || {},
|
|
1284
|
-
return this.timestampRequests !== !1 && (i[this.timestampParam] = +/* @__PURE__ */ new Date() + "-" + s.timestamps++), this.supportsBinary || i.sid || (i.b64 = 1), i = o.encode(i), this.port && (
|
|
1283
|
+
var i = this.query || {}, p = this.secure ? "https" : "http", c = "";
|
|
1284
|
+
return this.timestampRequests !== !1 && (i[this.timestampParam] = +/* @__PURE__ */ new Date() + "-" + s.timestamps++), this.supportsBinary || i.sid || (i.b64 = 1), i = o.encode(i), this.port && (p == "https" && this.port != 443 || p == "http" && this.port != 80) && (c = ":" + this.port), i.length && (i = "?" + i), p + "://" + this.hostname + c + this.path + i;
|
|
1285
1285
|
};
|
|
1286
1286
|
}, {
|
|
1287
1287
|
"../transport": 14,
|
|
@@ -1293,14 +1293,14 @@ function Xe() {
|
|
|
1293
1293
|
}],
|
|
1294
1294
|
19: [function(a, t) {
|
|
1295
1295
|
function e(i) {
|
|
1296
|
-
var
|
|
1297
|
-
|
|
1296
|
+
var p = i && i.forceBase64;
|
|
1297
|
+
p && (this.supportsBinary = !1), s.call(this, i);
|
|
1298
1298
|
}
|
|
1299
1299
|
var s = a("../transport"), o = a("engine.io-parser"), h = a("parseqs"), f = a("component-inherit"), l = a("debug")("engine.io-client:websocket"), d = a("ws");
|
|
1300
1300
|
t.exports = e, f(e, s), e.prototype.name = "websocket", e.prototype.supportsBinary = !0, e.prototype.doOpen = function() {
|
|
1301
1301
|
if (this.check()) {
|
|
1302
|
-
var i = this.uri(),
|
|
1303
|
-
c.pfx = this.pfx, c.key = this.key, c.passphrase = this.passphrase, c.cert = this.cert, c.ca = this.ca, c.ciphers = this.ciphers, c.rejectUnauthorized = this.rejectUnauthorized, this.ws = new d(i,
|
|
1302
|
+
var i = this.uri(), p = void 0, c = { agent: this.agent };
|
|
1303
|
+
c.pfx = this.pfx, c.key = this.key, c.passphrase = this.passphrase, c.cert = this.cert, c.ca = this.ca, c.ciphers = this.ciphers, c.rejectUnauthorized = this.rejectUnauthorized, this.ws = new d(i, p, c), this.ws.binaryType === void 0 && (this.supportsBinary = !1), this.ws.binaryType = "arraybuffer", this.addEventListeners();
|
|
1304
1304
|
}
|
|
1305
1305
|
}, e.prototype.addEventListeners = function() {
|
|
1306
1306
|
var i = this;
|
|
@@ -1308,38 +1308,38 @@ function Xe() {
|
|
|
1308
1308
|
i.onOpen();
|
|
1309
1309
|
}, this.ws.onclose = function() {
|
|
1310
1310
|
i.onClose();
|
|
1311
|
-
}, this.ws.onmessage = function(
|
|
1312
|
-
i.onData(
|
|
1313
|
-
}, this.ws.onerror = function(
|
|
1314
|
-
i.onError("websocket error",
|
|
1311
|
+
}, this.ws.onmessage = function(p) {
|
|
1312
|
+
i.onData(p.data);
|
|
1313
|
+
}, this.ws.onerror = function(p) {
|
|
1314
|
+
i.onError("websocket error", p);
|
|
1315
1315
|
};
|
|
1316
1316
|
}, typeof navigator < "u" && /iPad|iPhone|iPod/i.test(navigator.userAgent) && (e.prototype.onData = function(i) {
|
|
1317
|
-
var
|
|
1317
|
+
var p = this;
|
|
1318
1318
|
setTimeout(function() {
|
|
1319
|
-
s.prototype.onData.call(
|
|
1319
|
+
s.prototype.onData.call(p, i);
|
|
1320
1320
|
}, 0);
|
|
1321
1321
|
}), e.prototype.write = function(i) {
|
|
1322
|
-
function
|
|
1322
|
+
function p() {
|
|
1323
1323
|
c.writable = !0, c.emit("drain");
|
|
1324
1324
|
}
|
|
1325
1325
|
var c = this;
|
|
1326
1326
|
this.writable = !1;
|
|
1327
1327
|
for (var r = 0, n = i.length; n > r; r++)
|
|
1328
|
-
o.encodePacket(i[r], this.supportsBinary, function(
|
|
1328
|
+
o.encodePacket(i[r], this.supportsBinary, function(u) {
|
|
1329
1329
|
try {
|
|
1330
|
-
c.ws.send(
|
|
1330
|
+
c.ws.send(u);
|
|
1331
1331
|
} catch {
|
|
1332
1332
|
l("websocket closed before onclose event");
|
|
1333
1333
|
}
|
|
1334
1334
|
});
|
|
1335
|
-
setTimeout(
|
|
1335
|
+
setTimeout(p, 0);
|
|
1336
1336
|
}, e.prototype.onClose = function() {
|
|
1337
1337
|
s.prototype.onClose.call(this);
|
|
1338
1338
|
}, e.prototype.doClose = function() {
|
|
1339
1339
|
typeof this.ws < "u" && this.ws.close();
|
|
1340
1340
|
}, e.prototype.uri = function() {
|
|
1341
|
-
var i = this.query || {},
|
|
1342
|
-
return this.port && (
|
|
1341
|
+
var i = this.query || {}, p = this.secure ? "wss" : "ws", c = "";
|
|
1342
|
+
return this.port && (p == "wss" && this.port != 443 || p == "ws" && this.port != 80) && (c = ":" + this.port), this.timestampRequests && (i[this.timestampParam] = +/* @__PURE__ */ new Date()), this.supportsBinary || (i.b64 = 1), i = h.encode(i), i.length && (i = "?" + i), p + "://" + this.hostname + c + this.path + i;
|
|
1343
1343
|
}, e.prototype.check = function() {
|
|
1344
1344
|
return !(!d || "__initialize" in d && this.name === e.prototype.name);
|
|
1345
1345
|
};
|
|
@@ -1380,12 +1380,12 @@ function Xe() {
|
|
|
1380
1380
|
var d = arguments, i = this.useColors;
|
|
1381
1381
|
if (d[0] = (i ? "%c" : "") + this.namespace + (i ? " %c" : " ") + d[0] + (i ? "%c " : " ") + "+" + e.humanize(this.diff), !i)
|
|
1382
1382
|
return d;
|
|
1383
|
-
var
|
|
1384
|
-
d = [d[0],
|
|
1383
|
+
var p = "color: " + this.color;
|
|
1384
|
+
d = [d[0], p, "color: inherit"].concat(Array.prototype.slice.call(d, 1));
|
|
1385
1385
|
var c = 0, r = 0;
|
|
1386
1386
|
return d[0].replace(/%[a-z%]/g, function(n) {
|
|
1387
1387
|
n !== "%%" && (c++, n === "%c" && (r = c));
|
|
1388
|
-
}), d.splice(r, 0,
|
|
1388
|
+
}), d.splice(r, 0, p), d;
|
|
1389
1389
|
}
|
|
1390
1390
|
function h() {
|
|
1391
1391
|
return typeof console == "object" && typeof console.log == "function" && Function.prototype.apply.call(console.log, console, arguments);
|
|
@@ -1410,25 +1410,25 @@ function Xe() {
|
|
|
1410
1410
|
}, { "./debug": 23 }],
|
|
1411
1411
|
23: [function(a, t, e) {
|
|
1412
1412
|
function s() {
|
|
1413
|
-
return e.colors[
|
|
1413
|
+
return e.colors[p++ % e.colors.length];
|
|
1414
1414
|
}
|
|
1415
1415
|
function o(c) {
|
|
1416
1416
|
function r() {
|
|
1417
1417
|
}
|
|
1418
1418
|
function n() {
|
|
1419
|
-
var g = n, y = +/* @__PURE__ */ new Date(),
|
|
1420
|
-
g.diff =
|
|
1419
|
+
var g = n, y = +/* @__PURE__ */ new Date(), w = y - (i || y);
|
|
1420
|
+
g.diff = w, g.prev = i, g.curr = y, i = y, g.useColors == null && (g.useColors = e.useColors()), g.color == null && g.useColors && (g.color = s());
|
|
1421
1421
|
var P = Array.prototype.slice.call(arguments);
|
|
1422
1422
|
P[0] = e.coerce(P[0]), typeof P[0] != "string" && (P = ["%o"].concat(P));
|
|
1423
|
-
var
|
|
1423
|
+
var B = 0;
|
|
1424
1424
|
P[0] = P[0].replace(/%([a-z%])/g, function(_, C) {
|
|
1425
1425
|
if (_ === "%%")
|
|
1426
1426
|
return _;
|
|
1427
|
-
|
|
1427
|
+
B++;
|
|
1428
1428
|
var b = e.formatters[C];
|
|
1429
1429
|
if (typeof b == "function") {
|
|
1430
|
-
var A = P[
|
|
1431
|
-
_ = b.call(g, A), P.splice(
|
|
1430
|
+
var A = P[B];
|
|
1431
|
+
_ = b.call(g, A), P.splice(B, 1), B--;
|
|
1432
1432
|
}
|
|
1433
1433
|
return _;
|
|
1434
1434
|
}), typeof e.formatArgs == "function" && (P = e.formatArgs.apply(g, P));
|
|
@@ -1436,13 +1436,13 @@ function Xe() {
|
|
|
1436
1436
|
M.apply(g, P);
|
|
1437
1437
|
}
|
|
1438
1438
|
r.enabled = !1, n.enabled = !0;
|
|
1439
|
-
var
|
|
1440
|
-
return
|
|
1439
|
+
var u = e.enabled(c) ? n : r;
|
|
1440
|
+
return u.namespace = c, u;
|
|
1441
1441
|
}
|
|
1442
1442
|
function h(c) {
|
|
1443
1443
|
e.save(c);
|
|
1444
|
-
for (var r = (c || "").split(/[\s,]+/), n = r.length,
|
|
1445
|
-
r[
|
|
1444
|
+
for (var r = (c || "").split(/[\s,]+/), n = r.length, u = 0; n > u; u++)
|
|
1445
|
+
r[u] && (c = r[u].replace(/\*/g, ".*?"), c[0] === "-" ? e.skips.push(new RegExp("^" + c.substr(1) + "$")) : e.names.push(new RegExp("^" + c + "$")));
|
|
1446
1446
|
}
|
|
1447
1447
|
function f() {
|
|
1448
1448
|
e.enable("");
|
|
@@ -1461,18 +1461,18 @@ function Xe() {
|
|
|
1461
1461
|
return c instanceof Error ? c.stack || c.message : c;
|
|
1462
1462
|
}
|
|
1463
1463
|
e = t.exports = o, e.coerce = d, e.disable = f, e.enable = h, e.enabled = l, e.humanize = a("ms"), e.names = [], e.skips = [], e.formatters = {};
|
|
1464
|
-
var i,
|
|
1464
|
+
var i, p = 0;
|
|
1465
1465
|
}, { ms: 24 }],
|
|
1466
1466
|
24: [function(a, t) {
|
|
1467
1467
|
function e(c) {
|
|
1468
1468
|
var r = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(c);
|
|
1469
1469
|
if (r) {
|
|
1470
|
-
var n = parseFloat(r[1]),
|
|
1471
|
-
switch (
|
|
1470
|
+
var n = parseFloat(r[1]), u = (r[2] || "ms").toLowerCase();
|
|
1471
|
+
switch (u) {
|
|
1472
1472
|
case "years":
|
|
1473
1473
|
case "year":
|
|
1474
1474
|
case "y":
|
|
1475
|
-
return n *
|
|
1475
|
+
return n * p;
|
|
1476
1476
|
case "days":
|
|
1477
1477
|
case "day":
|
|
1478
1478
|
case "d":
|
|
@@ -1503,7 +1503,7 @@ function Xe() {
|
|
|
1503
1503
|
function h(c, r, n) {
|
|
1504
1504
|
return r > c ? void 0 : 1.5 * r > c ? Math.floor(c / r) + " " + n : Math.ceil(c / r) + " " + n + "s";
|
|
1505
1505
|
}
|
|
1506
|
-
var f = 1e3, l = 60 * f, d = 60 * l, i = 24 * d,
|
|
1506
|
+
var f = 1e3, l = 60 * f, d = 60 * l, i = 24 * d, p = 365.25 * i;
|
|
1507
1507
|
t.exports = function(c, r) {
|
|
1508
1508
|
return r = r || {}, typeof c == "string" ? e(c) : r.long ? o(c) : s(c);
|
|
1509
1509
|
};
|
|
@@ -1519,8 +1519,8 @@ function Xe() {
|
|
|
1519
1519
|
return e.encodeBase64Packet(C, A);
|
|
1520
1520
|
var v = C.data, m = new Uint8Array(v), L = new Uint8Array(1 + v.byteLength);
|
|
1521
1521
|
L[0] = P[C.type];
|
|
1522
|
-
for (var
|
|
1523
|
-
L[
|
|
1522
|
+
for (var R = 0; R < m.length; R++)
|
|
1523
|
+
L[R + 1] = m[R];
|
|
1524
1524
|
return A(L.buffer);
|
|
1525
1525
|
}
|
|
1526
1526
|
function f(C, b, A) {
|
|
@@ -1534,7 +1534,7 @@ function Xe() {
|
|
|
1534
1534
|
function l(C, b, A) {
|
|
1535
1535
|
if (!b)
|
|
1536
1536
|
return e.encodeBase64Packet(C, A);
|
|
1537
|
-
if (
|
|
1537
|
+
if (w)
|
|
1538
1538
|
return f(C, b, A);
|
|
1539
1539
|
var v = new Uint8Array(1);
|
|
1540
1540
|
v[0] = P[C.type];
|
|
@@ -1542,16 +1542,16 @@ function Xe() {
|
|
|
1542
1542
|
return A(m);
|
|
1543
1543
|
}
|
|
1544
1544
|
function d(C, b, A) {
|
|
1545
|
-
for (var v = new Array(C.length), m = n(C.length, A), L = function(
|
|
1546
|
-
b(S, function(
|
|
1547
|
-
v[
|
|
1545
|
+
for (var v = new Array(C.length), m = n(C.length, A), L = function(I, S, X) {
|
|
1546
|
+
b(S, function(K, G) {
|
|
1547
|
+
v[I] = G, X(K, v);
|
|
1548
1548
|
});
|
|
1549
|
-
},
|
|
1550
|
-
L(
|
|
1549
|
+
}, R = 0; R < C.length; R++)
|
|
1550
|
+
L(R, C[R], m);
|
|
1551
1551
|
}
|
|
1552
|
-
var i = a("./keys"),
|
|
1552
|
+
var i = a("./keys"), p = a("has-binary"), c = a("arraybuffer.slice"), r = a("base64-arraybuffer"), n = a("after"), u = a("utf8"), g = navigator.userAgent.match(/Android/i), y = /PhantomJS/i.test(navigator.userAgent), w = g || y;
|
|
1553
1553
|
e.protocol = 3;
|
|
1554
|
-
var P = e.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 },
|
|
1554
|
+
var P = e.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 }, B = i(P), M = { type: "error", data: "parser error" }, _ = a("blob");
|
|
1555
1555
|
e.encodePacket = function(C, b, A, v) {
|
|
1556
1556
|
typeof b == "function" && (v = b, b = !1), typeof A == "function" && (v = A, A = null);
|
|
1557
1557
|
var m = C.data === void 0 ? void 0 : C.data.buffer || C.data;
|
|
@@ -1562,7 +1562,7 @@ function Xe() {
|
|
|
1562
1562
|
if (m && m.base64)
|
|
1563
1563
|
return o(C, v);
|
|
1564
1564
|
var L = P[C.type];
|
|
1565
|
-
return C.data !== void 0 && (L += A ?
|
|
1565
|
+
return C.data !== void 0 && (L += A ? u.encode(String(C.data)) : String(C.data)), v("" + L);
|
|
1566
1566
|
}, e.encodeBase64Packet = function(C, b) {
|
|
1567
1567
|
var A = "b" + e.packets[C.type];
|
|
1568
1568
|
if (_ && C.data instanceof _) {
|
|
@@ -1576,9 +1576,9 @@ function Xe() {
|
|
|
1576
1576
|
try {
|
|
1577
1577
|
m = String.fromCharCode.apply(null, new Uint8Array(C.data));
|
|
1578
1578
|
} catch {
|
|
1579
|
-
for (var L = new Uint8Array(C.data),
|
|
1580
|
-
|
|
1581
|
-
m = String.fromCharCode.apply(null,
|
|
1579
|
+
for (var L = new Uint8Array(C.data), R = new Array(L.length), I = 0; I < L.length; I++)
|
|
1580
|
+
R[I] = L[I];
|
|
1581
|
+
m = String.fromCharCode.apply(null, R);
|
|
1582
1582
|
}
|
|
1583
1583
|
return A += s.btoa(m), b(A);
|
|
1584
1584
|
}, e.decodePacket = function(C, b, A) {
|
|
@@ -1587,37 +1587,37 @@ function Xe() {
|
|
|
1587
1587
|
return e.decodeBase64Packet(C.substr(1), b);
|
|
1588
1588
|
if (A)
|
|
1589
1589
|
try {
|
|
1590
|
-
C =
|
|
1590
|
+
C = u.decode(C);
|
|
1591
1591
|
} catch {
|
|
1592
1592
|
return M;
|
|
1593
1593
|
}
|
|
1594
1594
|
var m = C.charAt(0);
|
|
1595
|
-
return Number(m) == m &&
|
|
1596
|
-
type:
|
|
1595
|
+
return Number(m) == m && B[m] ? C.length > 1 ? {
|
|
1596
|
+
type: B[m],
|
|
1597
1597
|
data: C.substring(1)
|
|
1598
|
-
} : { type:
|
|
1598
|
+
} : { type: B[m] } : M;
|
|
1599
1599
|
}
|
|
1600
1600
|
var v = new Uint8Array(C), m = v[0], L = c(C, 1);
|
|
1601
|
-
return _ && b === "blob" && (L = new _([L])), { type:
|
|
1601
|
+
return _ && b === "blob" && (L = new _([L])), { type: B[m], data: L };
|
|
1602
1602
|
}, e.decodeBase64Packet = function(C, b) {
|
|
1603
|
-
var A =
|
|
1603
|
+
var A = B[C.charAt(0)];
|
|
1604
1604
|
if (!s.ArrayBuffer)
|
|
1605
1605
|
return { type: A, data: { base64: !0, data: C.substr(1) } };
|
|
1606
1606
|
var v = r.decode(C.substr(1));
|
|
1607
1607
|
return b === "blob" && _ && (v = new _([v])), { type: A, data: v };
|
|
1608
1608
|
}, e.encodePayload = function(C, b, A) {
|
|
1609
|
-
function v(
|
|
1610
|
-
return
|
|
1609
|
+
function v(R) {
|
|
1610
|
+
return R.length + ":" + R;
|
|
1611
1611
|
}
|
|
1612
|
-
function m(
|
|
1613
|
-
e.encodePacket(
|
|
1614
|
-
|
|
1612
|
+
function m(R, I) {
|
|
1613
|
+
e.encodePacket(R, L ? b : !1, !0, function(S) {
|
|
1614
|
+
I(null, v(S));
|
|
1615
1615
|
});
|
|
1616
1616
|
}
|
|
1617
1617
|
typeof b == "function" && (A = b, b = null);
|
|
1618
|
-
var L =
|
|
1619
|
-
return b && L ? _ && !
|
|
1620
|
-
return A(
|
|
1618
|
+
var L = p(C);
|
|
1619
|
+
return b && L ? _ && !w ? e.encodePayloadAsBlob(C, A) : e.encodePayloadAsArrayBuffer(C, A) : C.length ? void d(C, m, function(R, I) {
|
|
1620
|
+
return A(I.join(""));
|
|
1621
1621
|
}) : A("0:");
|
|
1622
1622
|
}, e.decodePayload = function(C, b, A) {
|
|
1623
1623
|
if (typeof C != "string")
|
|
@@ -1626,24 +1626,24 @@ function Xe() {
|
|
|
1626
1626
|
var v;
|
|
1627
1627
|
if (C == "")
|
|
1628
1628
|
return A(M, 0, 1);
|
|
1629
|
-
for (var m, L,
|
|
1630
|
-
var
|
|
1631
|
-
if (
|
|
1632
|
-
|
|
1629
|
+
for (var m, L, R = "", I = 0, S = C.length; S > I; I++) {
|
|
1630
|
+
var X = C.charAt(I);
|
|
1631
|
+
if (X != ":")
|
|
1632
|
+
R += X;
|
|
1633
1633
|
else {
|
|
1634
|
-
if (
|
|
1634
|
+
if (R == "" || R != (m = Number(R)) || (L = C.substr(I + 1, m), R != L.length))
|
|
1635
1635
|
return A(M, 0, 1);
|
|
1636
1636
|
if (L.length) {
|
|
1637
1637
|
if (v = e.decodePacket(L, b, !0), M.type == v.type && M.data == v.data)
|
|
1638
1638
|
return A(M, 0, 1);
|
|
1639
|
-
var
|
|
1640
|
-
if (
|
|
1639
|
+
var K = A(v, I + m, S);
|
|
1640
|
+
if (K === !1)
|
|
1641
1641
|
return;
|
|
1642
1642
|
}
|
|
1643
|
-
|
|
1643
|
+
I += m, R = "";
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
1646
|
-
return
|
|
1646
|
+
return R != "" ? A(M, 0, 1) : void 0;
|
|
1647
1647
|
}, e.encodePayloadAsArrayBuffer = function(C, b) {
|
|
1648
1648
|
function A(v, m) {
|
|
1649
1649
|
e.encodePacket(v, !0, !0, function(L) {
|
|
@@ -1651,39 +1651,39 @@ function Xe() {
|
|
|
1651
1651
|
});
|
|
1652
1652
|
}
|
|
1653
1653
|
return C.length ? void d(C, A, function(v, m) {
|
|
1654
|
-
var L = m.reduce(function(S,
|
|
1655
|
-
var
|
|
1656
|
-
return
|
|
1657
|
-
}, 0),
|
|
1654
|
+
var L = m.reduce(function(S, X) {
|
|
1655
|
+
var K;
|
|
1656
|
+
return K = typeof X == "string" ? X.length : X.byteLength, S + K.toString().length + K + 2;
|
|
1657
|
+
}, 0), R = new Uint8Array(L), I = 0;
|
|
1658
1658
|
return m.forEach(function(S) {
|
|
1659
|
-
var
|
|
1660
|
-
if (
|
|
1661
|
-
for (var G = new Uint8Array(S.length),
|
|
1662
|
-
G[
|
|
1663
|
-
|
|
1659
|
+
var X = typeof S == "string", K = S;
|
|
1660
|
+
if (X) {
|
|
1661
|
+
for (var G = new Uint8Array(S.length), V = 0; V < S.length; V++)
|
|
1662
|
+
G[V] = S.charCodeAt(V);
|
|
1663
|
+
K = G.buffer;
|
|
1664
1664
|
}
|
|
1665
|
-
|
|
1666
|
-
for (var J =
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
for (var G = new Uint8Array(
|
|
1670
|
-
|
|
1671
|
-
}), b(
|
|
1665
|
+
R[I++] = X ? 0 : 1;
|
|
1666
|
+
for (var J = K.byteLength.toString(), V = 0; V < J.length; V++)
|
|
1667
|
+
R[I++] = parseInt(J[V]);
|
|
1668
|
+
R[I++] = 255;
|
|
1669
|
+
for (var G = new Uint8Array(K), V = 0; V < G.length; V++)
|
|
1670
|
+
R[I++] = G[V];
|
|
1671
|
+
}), b(R.buffer);
|
|
1672
1672
|
}) : b(new ArrayBuffer(0));
|
|
1673
1673
|
}, e.encodePayloadAsBlob = function(C, b) {
|
|
1674
1674
|
function A(v, m) {
|
|
1675
1675
|
e.encodePacket(v, !0, !0, function(L) {
|
|
1676
|
-
var
|
|
1677
|
-
if (
|
|
1678
|
-
for (var
|
|
1679
|
-
|
|
1680
|
-
L =
|
|
1676
|
+
var R = new Uint8Array(1);
|
|
1677
|
+
if (R[0] = 1, typeof L == "string") {
|
|
1678
|
+
for (var I = new Uint8Array(L.length), S = 0; S < L.length; S++)
|
|
1679
|
+
I[S] = L.charCodeAt(S);
|
|
1680
|
+
L = I.buffer, R[0] = 0;
|
|
1681
1681
|
}
|
|
1682
|
-
for (var
|
|
1683
|
-
G[S] = parseInt(
|
|
1684
|
-
if (G[
|
|
1685
|
-
var
|
|
1686
|
-
m(null,
|
|
1682
|
+
for (var X = L instanceof ArrayBuffer ? L.byteLength : L.size, K = X.toString(), G = new Uint8Array(K.length + 1), S = 0; S < K.length; S++)
|
|
1683
|
+
G[S] = parseInt(K[S]);
|
|
1684
|
+
if (G[K.length] = 255, _) {
|
|
1685
|
+
var V = new _([R.buffer, G.buffer, L]);
|
|
1686
|
+
m(null, V);
|
|
1687
1687
|
}
|
|
1688
1688
|
});
|
|
1689
1689
|
}
|
|
@@ -1693,31 +1693,31 @@ function Xe() {
|
|
|
1693
1693
|
}, e.decodePayloadAsBinary = function(C, b, A) {
|
|
1694
1694
|
typeof b == "function" && (A = b, b = null);
|
|
1695
1695
|
for (var v = C, m = [], L = !1; v.byteLength > 0; ) {
|
|
1696
|
-
for (var
|
|
1696
|
+
for (var R = new Uint8Array(v), I = R[0] === 0, S = "", X = 1; R[X] != 255; X++) {
|
|
1697
1697
|
if (S.length > 310) {
|
|
1698
1698
|
L = !0;
|
|
1699
1699
|
break;
|
|
1700
1700
|
}
|
|
1701
|
-
S +=
|
|
1701
|
+
S += R[X];
|
|
1702
1702
|
}
|
|
1703
1703
|
if (L)
|
|
1704
1704
|
return A(M, 0, 1);
|
|
1705
1705
|
v = c(v, 2 + S.length), S = parseInt(S);
|
|
1706
|
-
var
|
|
1707
|
-
if (
|
|
1706
|
+
var K = c(v, 0, S);
|
|
1707
|
+
if (I)
|
|
1708
1708
|
try {
|
|
1709
|
-
|
|
1709
|
+
K = String.fromCharCode.apply(null, new Uint8Array(K));
|
|
1710
1710
|
} catch {
|
|
1711
|
-
var G = new Uint8Array(
|
|
1712
|
-
|
|
1713
|
-
for (var
|
|
1714
|
-
|
|
1711
|
+
var G = new Uint8Array(K);
|
|
1712
|
+
K = "";
|
|
1713
|
+
for (var X = 0; X < G.length; X++)
|
|
1714
|
+
K += String.fromCharCode(G[X]);
|
|
1715
1715
|
}
|
|
1716
|
-
m.push(
|
|
1716
|
+
m.push(K), v = c(v, S);
|
|
1717
1717
|
}
|
|
1718
|
-
var
|
|
1718
|
+
var V = m.length;
|
|
1719
1719
|
m.forEach(function(J, se) {
|
|
1720
|
-
A(e.decodePacket(J, b, !0), se,
|
|
1720
|
+
A(e.decodePacket(J, b, !0), se, V);
|
|
1721
1721
|
});
|
|
1722
1722
|
};
|
|
1723
1723
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -1740,10 +1740,10 @@ function Xe() {
|
|
|
1740
1740
|
}, {}],
|
|
1741
1741
|
27: [function(a, t) {
|
|
1742
1742
|
function e(o, h, f) {
|
|
1743
|
-
function l(i,
|
|
1743
|
+
function l(i, p) {
|
|
1744
1744
|
if (l.count <= 0)
|
|
1745
1745
|
throw new Error("after called too many times");
|
|
1746
|
-
--l.count, i ? (d = !0, h(i), h = f) : l.count !== 0 || d || h(null,
|
|
1746
|
+
--l.count, i ? (d = !0, h(i), h = f) : l.count !== 0 || d || h(null, p);
|
|
1747
1747
|
}
|
|
1748
1748
|
var d = !1;
|
|
1749
1749
|
return f = f || s, l.count = o, o === 0 ? h() : l;
|
|
@@ -1772,52 +1772,52 @@ function Xe() {
|
|
|
1772
1772
|
d += s[f[h] >> 2], d += s[(3 & f[h]) << 4 | f[h + 1] >> 4], d += s[(15 & f[h + 1]) << 2 | f[h + 2] >> 6], d += s[63 & f[h + 2]];
|
|
1773
1773
|
return l % 3 === 2 ? d = d.substring(0, d.length - 1) + "=" : l % 3 === 1 && (d = d.substring(0, d.length - 2) + "=="), d;
|
|
1774
1774
|
}, e.decode = function(o) {
|
|
1775
|
-
var h, f, l, d, i,
|
|
1776
|
-
o[o.length - 1] === "=" && (
|
|
1777
|
-
var n = new ArrayBuffer(
|
|
1775
|
+
var h, f, l, d, i, p = 0.75 * o.length, c = o.length, r = 0;
|
|
1776
|
+
o[o.length - 1] === "=" && (p--, o[o.length - 2] === "=" && p--);
|
|
1777
|
+
var n = new ArrayBuffer(p), u = new Uint8Array(n);
|
|
1778
1778
|
for (h = 0; c > h; h += 4)
|
|
1779
|
-
f = s.indexOf(o[h]), l = s.indexOf(o[h + 1]), d = s.indexOf(o[h + 2]), i = s.indexOf(o[h + 3]),
|
|
1779
|
+
f = s.indexOf(o[h]), l = s.indexOf(o[h + 1]), d = s.indexOf(o[h + 2]), i = s.indexOf(o[h + 3]), u[r++] = f << 2 | l >> 4, u[r++] = (15 & l) << 4 | d >> 2, u[r++] = (3 & d) << 6 | 63 & i;
|
|
1780
1780
|
return n;
|
|
1781
1781
|
};
|
|
1782
1782
|
})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
|
|
1783
1783
|
}, {}],
|
|
1784
1784
|
30: [function(a, t) {
|
|
1785
1785
|
(function(e) {
|
|
1786
|
-
function s(
|
|
1787
|
-
for (var c = 0; c <
|
|
1788
|
-
var r =
|
|
1786
|
+
function s(p) {
|
|
1787
|
+
for (var c = 0; c < p.length; c++) {
|
|
1788
|
+
var r = p[c];
|
|
1789
1789
|
if (r.buffer instanceof ArrayBuffer) {
|
|
1790
1790
|
var n = r.buffer;
|
|
1791
1791
|
if (r.byteLength !== n.byteLength) {
|
|
1792
|
-
var
|
|
1793
|
-
|
|
1792
|
+
var u = new Uint8Array(r.byteLength);
|
|
1793
|
+
u.set(new Uint8Array(n, r.byteOffset, r.byteLength)), n = u.buffer;
|
|
1794
1794
|
}
|
|
1795
|
-
|
|
1795
|
+
p[c] = n;
|
|
1796
1796
|
}
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
|
-
function o(
|
|
1799
|
+
function o(p, c) {
|
|
1800
1800
|
c = c || {};
|
|
1801
1801
|
var r = new f();
|
|
1802
|
-
s(
|
|
1803
|
-
for (var n = 0; n <
|
|
1804
|
-
r.append(
|
|
1802
|
+
s(p);
|
|
1803
|
+
for (var n = 0; n < p.length; n++)
|
|
1804
|
+
r.append(p[n]);
|
|
1805
1805
|
return c.type ? r.getBlob(c.type) : r.getBlob();
|
|
1806
1806
|
}
|
|
1807
|
-
function h(
|
|
1808
|
-
return s(
|
|
1807
|
+
function h(p, c) {
|
|
1808
|
+
return s(p), new Blob(p, c || {});
|
|
1809
1809
|
}
|
|
1810
1810
|
var f = e.BlobBuilder || e.WebKitBlobBuilder || e.MSBlobBuilder || e.MozBlobBuilder, l = function() {
|
|
1811
1811
|
try {
|
|
1812
|
-
var
|
|
1813
|
-
return
|
|
1812
|
+
var p = new Blob(["hi"]);
|
|
1813
|
+
return p.size === 2;
|
|
1814
1814
|
} catch {
|
|
1815
1815
|
return !1;
|
|
1816
1816
|
}
|
|
1817
1817
|
}(), d = l && function() {
|
|
1818
1818
|
try {
|
|
1819
|
-
var
|
|
1820
|
-
return
|
|
1819
|
+
var p = new Blob([new Uint8Array([1, 2])]);
|
|
1820
|
+
return p.size === 2;
|
|
1821
1821
|
} catch {
|
|
1822
1822
|
return !1;
|
|
1823
1823
|
}
|
|
@@ -1831,14 +1831,14 @@ function Xe() {
|
|
|
1831
1831
|
(function(s) {
|
|
1832
1832
|
(function(o) {
|
|
1833
1833
|
function h(v) {
|
|
1834
|
-
for (var m, L,
|
|
1835
|
-
m = v.charCodeAt(
|
|
1836
|
-
return
|
|
1834
|
+
for (var m, L, R = [], I = 0, S = v.length; S > I; )
|
|
1835
|
+
m = v.charCodeAt(I++), m >= 55296 && 56319 >= m && S > I ? (L = v.charCodeAt(I++), (64512 & L) == 56320 ? R.push(((1023 & m) << 10) + (1023 & L) + 65536) : (R.push(m), I--)) : R.push(m);
|
|
1836
|
+
return R;
|
|
1837
1837
|
}
|
|
1838
1838
|
function f(v) {
|
|
1839
|
-
for (var m, L = v.length,
|
|
1840
|
-
m = v[
|
|
1841
|
-
return
|
|
1839
|
+
for (var m, L = v.length, R = -1, I = ""; ++R < L; )
|
|
1840
|
+
m = v[R], m > 65535 && (m -= 65536, I += M(m >>> 10 & 1023 | 55296), m = 56320 | 1023 & m), I += M(m);
|
|
1841
|
+
return I;
|
|
1842
1842
|
}
|
|
1843
1843
|
function l(v) {
|
|
1844
1844
|
if (v >= 55296 && 57343 >= v)
|
|
@@ -1853,58 +1853,58 @@ function Xe() {
|
|
|
1853
1853
|
var m = "";
|
|
1854
1854
|
return 4294965248 & v ? 4294901760 & v ? !(4292870144 & v) && (m = M(v >> 18 & 7 | 240), m += d(v, 12), m += d(v, 6)) : (l(v), m = M(v >> 12 & 15 | 224), m += d(v, 6)) : m = M(v >> 6 & 31 | 192), m += M(63 & v | 128);
|
|
1855
1855
|
}
|
|
1856
|
-
function
|
|
1857
|
-
for (var m, L = h(v),
|
|
1858
|
-
m = L[
|
|
1856
|
+
function p(v) {
|
|
1857
|
+
for (var m, L = h(v), R = L.length, I = -1, S = ""; ++I < R; )
|
|
1858
|
+
m = L[I], S += i(m);
|
|
1859
1859
|
return S;
|
|
1860
1860
|
}
|
|
1861
1861
|
function c() {
|
|
1862
|
-
if (
|
|
1862
|
+
if (B >= P)
|
|
1863
1863
|
throw Error("Invalid byte index");
|
|
1864
|
-
var v = 255 &
|
|
1865
|
-
if (
|
|
1864
|
+
var v = 255 & w[B];
|
|
1865
|
+
if (B++, (192 & v) == 128)
|
|
1866
1866
|
return 63 & v;
|
|
1867
1867
|
throw Error("Invalid continuation byte");
|
|
1868
1868
|
}
|
|
1869
1869
|
function r() {
|
|
1870
|
-
var v, m, L,
|
|
1871
|
-
if (
|
|
1870
|
+
var v, m, L, R, I;
|
|
1871
|
+
if (B > P)
|
|
1872
1872
|
throw Error("Invalid byte index");
|
|
1873
|
-
if (
|
|
1873
|
+
if (B == P)
|
|
1874
1874
|
return !1;
|
|
1875
|
-
if (v = 255 &
|
|
1875
|
+
if (v = 255 & w[B], B++, (128 & v) == 0)
|
|
1876
1876
|
return v;
|
|
1877
1877
|
if ((224 & v) == 192) {
|
|
1878
1878
|
var m = c();
|
|
1879
|
-
if (
|
|
1880
|
-
return
|
|
1879
|
+
if (I = (31 & v) << 6 | m, I >= 128)
|
|
1880
|
+
return I;
|
|
1881
1881
|
throw Error("Invalid continuation byte");
|
|
1882
1882
|
}
|
|
1883
1883
|
if ((240 & v) == 224) {
|
|
1884
|
-
if (m = c(), L = c(),
|
|
1885
|
-
return l(
|
|
1884
|
+
if (m = c(), L = c(), I = (15 & v) << 12 | m << 6 | L, I >= 2048)
|
|
1885
|
+
return l(I), I;
|
|
1886
1886
|
throw Error("Invalid continuation byte");
|
|
1887
1887
|
}
|
|
1888
|
-
if ((248 & v) == 240 && (m = c(), L = c(),
|
|
1889
|
-
return
|
|
1888
|
+
if ((248 & v) == 240 && (m = c(), L = c(), R = c(), I = (15 & v) << 18 | m << 12 | L << 6 | R, I >= 65536 && 1114111 >= I))
|
|
1889
|
+
return I;
|
|
1890
1890
|
throw Error("Invalid UTF-8 detected");
|
|
1891
1891
|
}
|
|
1892
1892
|
function n(v) {
|
|
1893
|
-
|
|
1893
|
+
w = h(v), P = w.length, B = 0;
|
|
1894
1894
|
for (var m, L = []; (m = r()) !== !1; )
|
|
1895
1895
|
L.push(m);
|
|
1896
1896
|
return f(L);
|
|
1897
1897
|
}
|
|
1898
|
-
var
|
|
1898
|
+
var u = typeof e == "object" && e, g = typeof t == "object" && t && t.exports == u && t, y = typeof s == "object" && s;
|
|
1899
1899
|
(y.global === y || y.window === y) && (o = y);
|
|
1900
|
-
var
|
|
1901
|
-
if (
|
|
1900
|
+
var w, P, B, M = String.fromCharCode, _ = { version: "2.0.0", encode: p, decode: n };
|
|
1901
|
+
if (u && !u.nodeType)
|
|
1902
1902
|
if (g)
|
|
1903
1903
|
g.exports = _;
|
|
1904
1904
|
else {
|
|
1905
1905
|
var C = {}, b = C.hasOwnProperty;
|
|
1906
1906
|
for (var A in _)
|
|
1907
|
-
b.call(_, A) && (
|
|
1907
|
+
b.call(_, A) && (u[A] = _[A]);
|
|
1908
1908
|
}
|
|
1909
1909
|
else
|
|
1910
1910
|
o.utf8 = _;
|
|
@@ -1938,8 +1938,8 @@ function Xe() {
|
|
|
1938
1938
|
t.exports = function(o) {
|
|
1939
1939
|
var h = o, f = o.indexOf("["), l = o.indexOf("]");
|
|
1940
1940
|
f != -1 && l != -1 && (o = o.substring(0, f) + o.substring(f, l).replace(/:/g, ";") + o.substring(l, o.length));
|
|
1941
|
-
for (var d = e.exec(o || ""), i = {},
|
|
1942
|
-
i[s[
|
|
1941
|
+
for (var d = e.exec(o || ""), i = {}, p = 14; p--; )
|
|
1942
|
+
i[s[p]] = d[p] || "";
|
|
1943
1943
|
return f != -1 && l != -1 && (i.source = h, i.host = i.host.substring(1, i.host.length - 1).replace(/;/g, ":"), i.authority = i.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), i.ipv6uri = !0), i;
|
|
1944
1944
|
};
|
|
1945
1945
|
}, {}],
|
|
@@ -2049,8 +2049,8 @@ function Xe() {
|
|
|
2049
2049
|
return d.push(c), r;
|
|
2050
2050
|
}
|
|
2051
2051
|
if (o(c)) {
|
|
2052
|
-
for (var n = new Array(c.length),
|
|
2053
|
-
n[
|
|
2052
|
+
for (var n = new Array(c.length), u = 0; u < c.length; u++)
|
|
2053
|
+
n[u] = l(c[u]);
|
|
2054
2054
|
return n;
|
|
2055
2055
|
}
|
|
2056
2056
|
if (typeof c == "object" && !(c instanceof Date)) {
|
|
@@ -2061,13 +2061,13 @@ function Xe() {
|
|
|
2061
2061
|
}
|
|
2062
2062
|
return c;
|
|
2063
2063
|
}
|
|
2064
|
-
var d = [], i = f.data,
|
|
2065
|
-
return
|
|
2064
|
+
var d = [], i = f.data, p = f;
|
|
2065
|
+
return p.data = l(i), p.attachments = d.length, { packet: p, buffers: d };
|
|
2066
2066
|
}, e.reconstructPacket = function(f, l) {
|
|
2067
2067
|
function d(i) {
|
|
2068
2068
|
if (i && i._placeholder) {
|
|
2069
|
-
var
|
|
2070
|
-
return
|
|
2069
|
+
var p = l[i.num];
|
|
2070
|
+
return p;
|
|
2071
2071
|
}
|
|
2072
2072
|
if (o(i)) {
|
|
2073
2073
|
for (var c = 0; c < i.length; c++)
|
|
@@ -2088,10 +2088,10 @@ function Xe() {
|
|
|
2088
2088
|
return c;
|
|
2089
2089
|
if (s.Blob && c instanceof Blob || s.File && c instanceof File) {
|
|
2090
2090
|
i++;
|
|
2091
|
-
var
|
|
2092
|
-
|
|
2093
|
-
n ? n[r] = this.result :
|
|
2094
|
-
},
|
|
2091
|
+
var u = new FileReader();
|
|
2092
|
+
u.onload = function() {
|
|
2093
|
+
n ? n[r] = this.result : p = this.result, --i || l(p);
|
|
2094
|
+
}, u.readAsArrayBuffer(c);
|
|
2095
2095
|
} else if (o(c))
|
|
2096
2096
|
for (var g = 0; g < c.length; g++)
|
|
2097
2097
|
d(c[g], g, c);
|
|
@@ -2099,8 +2099,8 @@ function Xe() {
|
|
|
2099
2099
|
for (var y in c)
|
|
2100
2100
|
d(c[y], y, c);
|
|
2101
2101
|
}
|
|
2102
|
-
var i = 0,
|
|
2103
|
-
d(
|
|
2102
|
+
var i = 0, p = f;
|
|
2103
|
+
d(p), i || l(p);
|
|
2104
2104
|
};
|
|
2105
2105
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2106
2106
|
}, { "./is-buffer": 45, isarray: 46 }],
|
|
@@ -2108,58 +2108,58 @@ function Xe() {
|
|
|
2108
2108
|
function s() {
|
|
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 = "", w = !1;
|
|
2112
|
+
return y += g.type, (e.BINARY_EVENT == g.type || e.BINARY_ACK == g.type) && (y += g.attachments, y += "-"), g.nsp && g.nsp != "/" && (w = !0, y += g.nsp), g.id != null && (w && (y += ",", w = !1), y += g.id), g.data != null && (w && (y += ","), y += c.stringify(g.data)), p("encoded %j as %s", g, y), y;
|
|
2113
2113
|
}
|
|
2114
2114
|
function h(g, y) {
|
|
2115
|
-
function
|
|
2116
|
-
var
|
|
2115
|
+
function w(P) {
|
|
2116
|
+
var B = n.deconstructPacket(P), M = o(B.packet), _ = B.buffers;
|
|
2117
2117
|
_.unshift(M), y(_);
|
|
2118
2118
|
}
|
|
2119
|
-
n.removeBlobs(g,
|
|
2119
|
+
n.removeBlobs(g, w);
|
|
2120
2120
|
}
|
|
2121
2121
|
function f() {
|
|
2122
2122
|
this.reconstructor = null;
|
|
2123
2123
|
}
|
|
2124
2124
|
function l(g) {
|
|
2125
|
-
var y = {},
|
|
2125
|
+
var y = {}, w = 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 P = ""; g.charAt(++
|
|
2129
|
+
for (var P = ""; g.charAt(++w) != "-" && (P += g.charAt(w), w != g.length); )
|
|
2130
2130
|
;
|
|
2131
|
-
if (P != Number(P) || g.charAt(
|
|
2131
|
+
if (P != Number(P) || g.charAt(w) != "-")
|
|
2132
2132
|
throw new Error("Illegal attachments");
|
|
2133
2133
|
y.attachments = Number(P);
|
|
2134
2134
|
}
|
|
2135
|
-
if (g.charAt(
|
|
2136
|
-
for (y.nsp = ""; ++
|
|
2137
|
-
var
|
|
2138
|
-
if (
|
|
2135
|
+
if (g.charAt(w + 1) == "/")
|
|
2136
|
+
for (y.nsp = ""; ++w; ) {
|
|
2137
|
+
var B = g.charAt(w);
|
|
2138
|
+
if (B == "," || (y.nsp += B, w == g.length))
|
|
2139
2139
|
break;
|
|
2140
2140
|
}
|
|
2141
2141
|
else
|
|
2142
2142
|
y.nsp = "/";
|
|
2143
|
-
var M = g.charAt(
|
|
2143
|
+
var M = g.charAt(w + 1);
|
|
2144
2144
|
if (M !== "" && Number(M) == M) {
|
|
2145
|
-
for (y.id = ""; ++
|
|
2146
|
-
var
|
|
2147
|
-
if (
|
|
2148
|
-
--
|
|
2145
|
+
for (y.id = ""; ++w; ) {
|
|
2146
|
+
var B = g.charAt(w);
|
|
2147
|
+
if (B == null || Number(B) != B) {
|
|
2148
|
+
--w;
|
|
2149
2149
|
break;
|
|
2150
2150
|
}
|
|
2151
|
-
if (y.id += g.charAt(
|
|
2151
|
+
if (y.id += g.charAt(w), w == g.length)
|
|
2152
2152
|
break;
|
|
2153
2153
|
}
|
|
2154
2154
|
y.id = Number(y.id);
|
|
2155
2155
|
}
|
|
2156
|
-
if (g.charAt(++
|
|
2156
|
+
if (g.charAt(++w))
|
|
2157
2157
|
try {
|
|
2158
|
-
y.data = c.parse(g.substr(
|
|
2158
|
+
y.data = c.parse(g.substr(w));
|
|
2159
2159
|
} catch {
|
|
2160
2160
|
return i();
|
|
2161
2161
|
}
|
|
2162
|
-
return
|
|
2162
|
+
return p("decoded %s as %j", g, y), y;
|
|
2163
2163
|
}
|
|
2164
2164
|
function d(g) {
|
|
2165
2165
|
this.reconPack = g, this.buffers = [];
|
|
@@ -2167,20 +2167,20 @@ function Xe() {
|
|
|
2167
2167
|
function i() {
|
|
2168
2168
|
return { type: e.ERROR, data: "parser error" };
|
|
2169
2169
|
}
|
|
2170
|
-
var
|
|
2170
|
+
var p = a("debug")("socket.io-parser"), c = a("json3"), r = (a("isarray"), a("component-emitter")), n = a("./binary"), u = 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 = s, e.Decoder = f, s.prototype.encode = function(g, y) {
|
|
2172
|
-
if (
|
|
2172
|
+
if (p("encoding packet %j", g), e.BINARY_EVENT == g.type || e.BINARY_ACK == g.type)
|
|
2173
2173
|
h(g, y);
|
|
2174
2174
|
else {
|
|
2175
|
-
var
|
|
2176
|
-
y([
|
|
2175
|
+
var w = o(g);
|
|
2176
|
+
y([w]);
|
|
2177
2177
|
}
|
|
2178
2178
|
}, r(f.prototype), f.prototype.add = function(g) {
|
|
2179
2179
|
var y;
|
|
2180
2180
|
if (typeof g == "string")
|
|
2181
2181
|
y = l(g), e.BINARY_EVENT == y.type || e.BINARY_ACK == y.type ? (this.reconstructor = new d(y), this.reconstructor.reconPack.attachments === 0 && this.emit("decoded", y)) : this.emit("decoded", y);
|
|
2182
2182
|
else {
|
|
2183
|
-
if (!
|
|
2183
|
+
if (!u(g) && !g.base64)
|
|
2184
2184
|
throw new Error("Unknown type: " + g);
|
|
2185
2185
|
if (!this.reconstructor)
|
|
2186
2186
|
throw new Error("got binary data when not reconstructing a packet");
|
|
@@ -2220,45 +2220,45 @@ function Xe() {
|
|
|
2220
2220
|
else if (E == "json")
|
|
2221
2221
|
O = o("json-stringify") && o("json-parse");
|
|
2222
2222
|
else {
|
|
2223
|
-
var
|
|
2223
|
+
var T, j = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
|
|
2224
2224
|
if (E == "json-stringify") {
|
|
2225
|
-
var k =
|
|
2226
|
-
if (
|
|
2227
|
-
(
|
|
2225
|
+
var k = p.stringify, x = typeof k == "function" && c;
|
|
2226
|
+
if (x) {
|
|
2227
|
+
(T = function() {
|
|
2228
2228
|
return 1;
|
|
2229
|
-
}).toJSON =
|
|
2229
|
+
}).toJSON = T;
|
|
2230
2230
|
try {
|
|
2231
|
-
|
|
2232
|
-
\f\r `] }) ==
|
|
2231
|
+
x = k(0) === "0" && k(new Number()) === "0" && k(new String()) == '""' && k(d) === l && k(l) === l && k() === l && k(T) === "1" && k([T]) == "[1]" && k([l]) == "[null]" && k(null) == "null" && k([l, d, null]) == "[null,null,null]" && k({ a: [T, !0, !1, null, `\0\b
|
|
2232
|
+
\f\r `] }) == j && k(null, T) === "1" && k([1, 2], null, 1) == `[
|
|
2233
2233
|
1,
|
|
2234
2234
|
2
|
|
2235
2235
|
]` && k(/* @__PURE__ */ new Date(-864e13)) == '"-271821-04-20T00:00:00.000Z"' && k(/* @__PURE__ */ new Date(864e13)) == '"+275760-09-13T00:00:00.000Z"' && k(/* @__PURE__ */ new Date(-621987552e5)) == '"-000001-01-01T00:00:00.000Z"' && k(/* @__PURE__ */ new Date(-1)) == '"1969-12-31T23:59:59.999Z"';
|
|
2236
2236
|
} catch {
|
|
2237
|
-
|
|
2237
|
+
x = !1;
|
|
2238
2238
|
}
|
|
2239
2239
|
}
|
|
2240
|
-
O =
|
|
2240
|
+
O = x;
|
|
2241
2241
|
}
|
|
2242
2242
|
if (E == "json-parse") {
|
|
2243
|
-
var
|
|
2244
|
-
if (typeof
|
|
2243
|
+
var D = p.parse;
|
|
2244
|
+
if (typeof D == "function")
|
|
2245
2245
|
try {
|
|
2246
|
-
if (
|
|
2247
|
-
|
|
2248
|
-
var N =
|
|
2246
|
+
if (D("0") === 0 && !D(!1)) {
|
|
2247
|
+
T = D(j);
|
|
2248
|
+
var N = T.a.length == 5 && T.a[0] === 1;
|
|
2249
2249
|
if (N) {
|
|
2250
2250
|
try {
|
|
2251
|
-
N = !
|
|
2251
|
+
N = !D('" "');
|
|
2252
2252
|
} catch {
|
|
2253
2253
|
}
|
|
2254
2254
|
if (N)
|
|
2255
2255
|
try {
|
|
2256
|
-
N =
|
|
2256
|
+
N = D("01") !== 1;
|
|
2257
2257
|
} catch {
|
|
2258
2258
|
}
|
|
2259
2259
|
if (N)
|
|
2260
2260
|
try {
|
|
2261
|
-
N =
|
|
2261
|
+
N = D("1.") !== 1;
|
|
2262
2262
|
} catch {
|
|
2263
2263
|
}
|
|
2264
2264
|
}
|
|
@@ -2271,64 +2271,64 @@ function Xe() {
|
|
|
2271
2271
|
}
|
|
2272
2272
|
return o[E] = !!O;
|
|
2273
2273
|
}
|
|
2274
|
-
var h, f, l, d = {}.toString, i = typeof JSON == "object" && JSON,
|
|
2275
|
-
|
|
2274
|
+
var h, f, l, d = {}.toString, i = typeof JSON == "object" && JSON, p = typeof e == "object" && e && !e.nodeType && e;
|
|
2275
|
+
p && i ? (p.stringify = i.stringify, p.parse = i.parse) : p = s.JSON = i || {};
|
|
2276
2276
|
var c = /* @__PURE__ */ new Date(-3509827334573292);
|
|
2277
2277
|
try {
|
|
2278
2278
|
c = c.getUTCFullYear() == -109252 && c.getUTCMonth() === 0 && c.getUTCDate() === 1 && c.getUTCHours() == 10 && c.getUTCMinutes() == 37 && c.getUTCSeconds() == 6 && c.getUTCMilliseconds() == 708;
|
|
2279
2279
|
} catch {
|
|
2280
2280
|
}
|
|
2281
2281
|
if (!o("json")) {
|
|
2282
|
-
var r = "[object Function]", n = "[object Date]",
|
|
2282
|
+
var r = "[object Function]", n = "[object Date]", u = "[object Number]", g = "[object String]", y = "[object Array]", w = "[object Boolean]", P = o("bug-string-char-index");
|
|
2283
2283
|
if (!c)
|
|
2284
|
-
var
|
|
2285
|
-
return M[O] + 365 * (E - 1970) +
|
|
2284
|
+
var B = Math.floor, M = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], _ = function(E, O) {
|
|
2285
|
+
return M[O] + 365 * (E - 1970) + B((E - 1969 + (O = +(O > 1))) / 4) - B((E - 1901 + O) / 100) + B((E - 1601 + O) / 400);
|
|
2286
2286
|
};
|
|
2287
2287
|
(h = {}.hasOwnProperty) || (h = function(E) {
|
|
2288
|
-
var O,
|
|
2289
|
-
return (
|
|
2290
|
-
var k = this.__proto__,
|
|
2291
|
-
return this.__proto__ = k,
|
|
2292
|
-
} : (O =
|
|
2288
|
+
var O, T = {};
|
|
2289
|
+
return (T.__proto__ = null, T.__proto__ = { toString: 1 }, T).toString != d ? h = function(j) {
|
|
2290
|
+
var k = this.__proto__, x = j in (this.__proto__ = null, this);
|
|
2291
|
+
return this.__proto__ = k, x;
|
|
2292
|
+
} : (O = T.constructor, h = function(j) {
|
|
2293
2293
|
var k = (this.constructor || O).prototype;
|
|
2294
|
-
return
|
|
2295
|
-
}),
|
|
2294
|
+
return j in this && !(j in k && this[j] === k[j]);
|
|
2295
|
+
}), T = null, h.call(this, E);
|
|
2296
2296
|
});
|
|
2297
2297
|
var C = { boolean: 1, number: 1, string: 1, undefined: 1 }, b = function(E, O) {
|
|
2298
|
-
var
|
|
2299
|
-
return
|
|
2298
|
+
var T = typeof E[O];
|
|
2299
|
+
return T == "object" ? !!E[O] : !C[T];
|
|
2300
2300
|
};
|
|
2301
2301
|
if (f = function(E, O) {
|
|
2302
|
-
var
|
|
2303
|
-
(
|
|
2302
|
+
var T, j, k, x = 0;
|
|
2303
|
+
(T = function() {
|
|
2304
2304
|
this.valueOf = 0;
|
|
2305
|
-
}).prototype.valueOf = 0,
|
|
2306
|
-
for (k in
|
|
2307
|
-
h.call(
|
|
2308
|
-
return
|
|
2309
|
-
var F, $ = {}, W = d.call(
|
|
2310
|
-
for (F in
|
|
2311
|
-
W && F == "prototype" || h.call($, F) || !($[F] = 1) || !h.call(
|
|
2312
|
-
} : function(
|
|
2313
|
-
var F, $, W = d.call(
|
|
2314
|
-
for (F in
|
|
2315
|
-
W && F == "prototype" || !h.call(
|
|
2316
|
-
($ || h.call(
|
|
2317
|
-
} : (
|
|
2318
|
-
var F, $, W = d.call(
|
|
2319
|
-
for (F in
|
|
2320
|
-
W && F == "prototype" || !H.call(
|
|
2321
|
-
for ($ =
|
|
2305
|
+
}).prototype.valueOf = 0, j = new T();
|
|
2306
|
+
for (k in j)
|
|
2307
|
+
h.call(j, k) && x++;
|
|
2308
|
+
return T = j = null, x ? f = x == 2 ? function(D, N) {
|
|
2309
|
+
var F, $ = {}, W = d.call(D) == r;
|
|
2310
|
+
for (F in D)
|
|
2311
|
+
W && F == "prototype" || h.call($, F) || !($[F] = 1) || !h.call(D, F) || N(F);
|
|
2312
|
+
} : function(D, N) {
|
|
2313
|
+
var F, $, W = d.call(D) == r;
|
|
2314
|
+
for (F in D)
|
|
2315
|
+
W && F == "prototype" || !h.call(D, F) || ($ = F === "constructor") || N(F);
|
|
2316
|
+
($ || h.call(D, F = "constructor")) && N(F);
|
|
2317
|
+
} : (j = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"], f = function(D, N) {
|
|
2318
|
+
var F, $, W = d.call(D) == r, H = !W && typeof D.constructor != "function" && b(D, "hasOwnProperty") ? D.hasOwnProperty : h;
|
|
2319
|
+
for (F in D)
|
|
2320
|
+
W && F == "prototype" || !H.call(D, F) || N(F);
|
|
2321
|
+
for ($ = j.length; F = j[--$]; H.call(D, F) && N(F))
|
|
2322
2322
|
;
|
|
2323
2323
|
}), f(E, O);
|
|
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, O) {
|
|
2326
2326
|
return (v + (O || 0)).slice(-E);
|
|
2327
|
-
}, L = "\\u00",
|
|
2328
|
-
var O,
|
|
2329
|
-
for (
|
|
2330
|
-
var
|
|
2331
|
-
switch (
|
|
2327
|
+
}, L = "\\u00", R = function(E) {
|
|
2328
|
+
var O, T = '"', j = 0, k = E.length, x = k > 10 && P;
|
|
2329
|
+
for (x && (O = E.split("")); k > j; j++) {
|
|
2330
|
+
var D = E.charCodeAt(j);
|
|
2331
|
+
switch (D) {
|
|
2332
2332
|
case 8:
|
|
2333
2333
|
case 9:
|
|
2334
2334
|
case 10:
|
|
@@ -2336,96 +2336,96 @@ function Xe() {
|
|
|
2336
2336
|
case 13:
|
|
2337
2337
|
case 34:
|
|
2338
2338
|
case 92:
|
|
2339
|
-
|
|
2339
|
+
T += A[D];
|
|
2340
2340
|
break;
|
|
2341
2341
|
default:
|
|
2342
|
-
if (32 >
|
|
2343
|
-
|
|
2342
|
+
if (32 > D) {
|
|
2343
|
+
T += L + m(2, D.toString(16));
|
|
2344
2344
|
break;
|
|
2345
2345
|
}
|
|
2346
|
-
|
|
2346
|
+
T += x ? O[j] : P ? E.charAt(j) : E[j];
|
|
2347
2347
|
}
|
|
2348
2348
|
}
|
|
2349
|
-
return
|
|
2350
|
-
},
|
|
2351
|
-
var N, F, $, W, H, oe, he,
|
|
2349
|
+
return T + '"';
|
|
2350
|
+
}, I = function(E, O, T, j, k, x, D) {
|
|
2351
|
+
var N, F, $, W, H, oe, he, pe, ue, fe, ee, de, ce, ie, ge, ye;
|
|
2352
2352
|
try {
|
|
2353
2353
|
N = O[E];
|
|
2354
2354
|
} catch {
|
|
2355
2355
|
}
|
|
2356
2356
|
if (typeof N == "object" && N)
|
|
2357
2357
|
if (F = d.call(N), F != n || h.call(N, "toJSON"))
|
|
2358
|
-
typeof N.toJSON == "function" && (F !=
|
|
2358
|
+
typeof N.toJSON == "function" && (F != u && F != g && F != y || h.call(N, "toJSON")) && (N = N.toJSON(E));
|
|
2359
2359
|
else if (N > -1 / 0 && 1 / 0 > N) {
|
|
2360
2360
|
if (_) {
|
|
2361
|
-
for (H =
|
|
2361
|
+
for (H = B(N / 864e5), $ = B(H / 365.2425) + 1970 - 1; _($ + 1, 0) <= H; $++)
|
|
2362
2362
|
;
|
|
2363
|
-
for (W =
|
|
2363
|
+
for (W = B((H - _($, 0)) / 30.42); _($, W + 1) <= H; W++)
|
|
2364
2364
|
;
|
|
2365
|
-
H = 1 + H - _($, W), oe = (N % 864e5 + 864e5) % 864e5, he =
|
|
2365
|
+
H = 1 + H - _($, W), oe = (N % 864e5 + 864e5) % 864e5, he = B(oe / 36e5) % 24, pe = B(oe / 6e4) % 60, ue = B(oe / 1e3) % 60, fe = oe % 1e3;
|
|
2366
2366
|
} else
|
|
2367
|
-
$ = N.getUTCFullYear(), W = N.getUTCMonth(), H = N.getUTCDate(), he = N.getUTCHours(),
|
|
2368
|
-
N = (0 >= $ || $ >= 1e4 ? (0 > $ ? "-" : "+") + m(6, 0 > $ ? -$ : $) : m(4, $)) + "-" + m(2, W + 1) + "-" + m(2, H) + "T" + m(2, he) + ":" + m(2,
|
|
2367
|
+
$ = N.getUTCFullYear(), W = N.getUTCMonth(), H = N.getUTCDate(), he = N.getUTCHours(), pe = N.getUTCMinutes(), ue = N.getUTCSeconds(), fe = N.getUTCMilliseconds();
|
|
2368
|
+
N = (0 >= $ || $ >= 1e4 ? (0 > $ ? "-" : "+") + m(6, 0 > $ ? -$ : $) : m(4, $)) + "-" + m(2, W + 1) + "-" + m(2, H) + "T" + m(2, he) + ":" + m(2, pe) + ":" + m(2, ue) + "." + m(3, fe) + "Z";
|
|
2369
2369
|
} else
|
|
2370
2370
|
N = null;
|
|
2371
|
-
if (
|
|
2371
|
+
if (T && (N = T.call(O, E, N)), N === null)
|
|
2372
2372
|
return "null";
|
|
2373
|
-
if (F = d.call(N), F ==
|
|
2373
|
+
if (F = d.call(N), F == w)
|
|
2374
2374
|
return "" + N;
|
|
2375
|
-
if (F ==
|
|
2375
|
+
if (F == u)
|
|
2376
2376
|
return N > -1 / 0 && 1 / 0 > N ? "" + N : "null";
|
|
2377
2377
|
if (F == g)
|
|
2378
|
-
return
|
|
2378
|
+
return R("" + N);
|
|
2379
2379
|
if (typeof N == "object") {
|
|
2380
|
-
for (ie =
|
|
2381
|
-
if (
|
|
2380
|
+
for (ie = D.length; ie--; )
|
|
2381
|
+
if (D[ie] === N)
|
|
2382
2382
|
throw TypeError();
|
|
2383
|
-
if (
|
|
2383
|
+
if (D.push(N), ee = [], ge = x, x += k, F == y) {
|
|
2384
2384
|
for (ce = 0, ie = N.length; ie > ce; ce++)
|
|
2385
|
-
de =
|
|
2385
|
+
de = I(ce, N, T, j, k, x, D), ee.push(de === l ? "null" : de);
|
|
2386
2386
|
ye = ee.length ? k ? `[
|
|
2387
|
-
` +
|
|
2388
|
-
` +
|
|
2387
|
+
` + x + ee.join(`,
|
|
2388
|
+
` + x) + `
|
|
2389
2389
|
` + ge + "]" : "[" + ee.join(",") + "]" : "[]";
|
|
2390
2390
|
} else
|
|
2391
|
-
f(
|
|
2392
|
-
var Ee =
|
|
2393
|
-
Ee !== l && ee.push(
|
|
2391
|
+
f(j || N, function(ve) {
|
|
2392
|
+
var Ee = I(ve, N, T, j, k, x, D);
|
|
2393
|
+
Ee !== l && ee.push(R(ve) + ":" + (k ? " " : "") + Ee);
|
|
2394
2394
|
}), ye = ee.length ? k ? `{
|
|
2395
|
-
` +
|
|
2396
|
-
` +
|
|
2395
|
+
` + x + ee.join(`,
|
|
2396
|
+
` + x) + `
|
|
2397
2397
|
` + ge + "}" : "{" + ee.join(",") + "}" : "{}";
|
|
2398
|
-
return
|
|
2398
|
+
return D.pop(), ye;
|
|
2399
2399
|
}
|
|
2400
2400
|
};
|
|
2401
|
-
|
|
2402
|
-
var
|
|
2401
|
+
p.stringify = function(E, O, T) {
|
|
2402
|
+
var j, k, x, D;
|
|
2403
2403
|
if (typeof O == "function" || typeof O == "object" && O) {
|
|
2404
|
-
if ((
|
|
2404
|
+
if ((D = d.call(O)) == r)
|
|
2405
2405
|
k = O;
|
|
2406
|
-
else if (
|
|
2407
|
-
|
|
2408
|
-
for (var N, F = 0, $ = O.length; $ > F; N = O[F++],
|
|
2406
|
+
else if (D == y) {
|
|
2407
|
+
x = {};
|
|
2408
|
+
for (var N, F = 0, $ = O.length; $ > F; N = O[F++], D = d.call(N), (D == g || D == u) && (x[N] = 1))
|
|
2409
2409
|
;
|
|
2410
2410
|
}
|
|
2411
2411
|
}
|
|
2412
|
-
if (
|
|
2413
|
-
if ((
|
|
2414
|
-
if ((
|
|
2415
|
-
for (
|
|
2412
|
+
if (T)
|
|
2413
|
+
if ((D = d.call(T)) == u) {
|
|
2414
|
+
if ((T -= T % 1) > 0)
|
|
2415
|
+
for (j = "", T > 10 && (T = 10); j.length < T; j += " ")
|
|
2416
2416
|
;
|
|
2417
2417
|
} else
|
|
2418
|
-
|
|
2419
|
-
return
|
|
2418
|
+
D == g && (j = T.length <= 10 ? T : T.slice(0, 10));
|
|
2419
|
+
return I("", (N = {}, N[""] = E, N), k, x, j, "", []);
|
|
2420
2420
|
};
|
|
2421
2421
|
}
|
|
2422
2422
|
if (!o("json-parse")) {
|
|
2423
|
-
var S,
|
|
2424
|
-
`, 102: "\f", 114: "\r" },
|
|
2425
|
-
throw S =
|
|
2423
|
+
var S, X, K = String.fromCharCode, G = { 92: "\\", 34: '"', 47: "/", 98: "\b", 116: " ", 110: `
|
|
2424
|
+
`, 102: "\f", 114: "\r" }, V = function() {
|
|
2425
|
+
throw S = X = null, SyntaxError();
|
|
2426
2426
|
}, J = function() {
|
|
2427
|
-
for (var E, O,
|
|
2428
|
-
switch (k =
|
|
2427
|
+
for (var E, O, T, j, k, x = X, D = x.length; D > S; )
|
|
2428
|
+
switch (k = x.charCodeAt(S)) {
|
|
2429
2429
|
case 9:
|
|
2430
2430
|
case 10:
|
|
2431
2431
|
case 13:
|
|
@@ -2438,13 +2438,13 @@ function Xe() {
|
|
|
2438
2438
|
case 93:
|
|
2439
2439
|
case 58:
|
|
2440
2440
|
case 44:
|
|
2441
|
-
return E = P ?
|
|
2441
|
+
return E = P ? x.charAt(S) : x[S], S++, E;
|
|
2442
2442
|
case 34:
|
|
2443
|
-
for (E = "@", S++;
|
|
2444
|
-
if (k =
|
|
2445
|
-
|
|
2443
|
+
for (E = "@", S++; D > S; )
|
|
2444
|
+
if (k = x.charCodeAt(S), 32 > k)
|
|
2445
|
+
V();
|
|
2446
2446
|
else if (k == 92)
|
|
2447
|
-
switch (k =
|
|
2447
|
+
switch (k = x.charCodeAt(++S)) {
|
|
2448
2448
|
case 92:
|
|
2449
2449
|
case 34:
|
|
2450
2450
|
case 47:
|
|
@@ -2456,84 +2456,84 @@ function Xe() {
|
|
|
2456
2456
|
E += G[k], S++;
|
|
2457
2457
|
break;
|
|
2458
2458
|
case 117:
|
|
2459
|
-
for (O = ++S,
|
|
2460
|
-
k =
|
|
2461
|
-
E +=
|
|
2459
|
+
for (O = ++S, T = S + 4; T > S; S++)
|
|
2460
|
+
k = x.charCodeAt(S), k >= 48 && 57 >= k || k >= 97 && 102 >= k || k >= 65 && 70 >= k || V();
|
|
2461
|
+
E += K("0x" + x.slice(O, S));
|
|
2462
2462
|
break;
|
|
2463
2463
|
default:
|
|
2464
|
-
|
|
2464
|
+
V();
|
|
2465
2465
|
}
|
|
2466
2466
|
else {
|
|
2467
2467
|
if (k == 34)
|
|
2468
2468
|
break;
|
|
2469
|
-
for (k =
|
|
2470
|
-
k =
|
|
2471
|
-
E +=
|
|
2469
|
+
for (k = x.charCodeAt(S), O = S; k >= 32 && k != 92 && k != 34; )
|
|
2470
|
+
k = x.charCodeAt(++S);
|
|
2471
|
+
E += x.slice(O, S);
|
|
2472
2472
|
}
|
|
2473
|
-
if (
|
|
2473
|
+
if (x.charCodeAt(S) == 34)
|
|
2474
2474
|
return S++, E;
|
|
2475
|
-
|
|
2475
|
+
V();
|
|
2476
2476
|
default:
|
|
2477
|
-
if (O = S, k == 45 && (
|
|
2478
|
-
for (k == 48 && (k =
|
|
2477
|
+
if (O = S, k == 45 && (j = !0, k = x.charCodeAt(++S)), k >= 48 && 57 >= k) {
|
|
2478
|
+
for (k == 48 && (k = x.charCodeAt(S + 1), k >= 48 && 57 >= k) && V(), j = !1; D > S && (k = x.charCodeAt(S), k >= 48 && 57 >= k); S++)
|
|
2479
2479
|
;
|
|
2480
|
-
if (
|
|
2481
|
-
for (
|
|
2480
|
+
if (x.charCodeAt(S) == 46) {
|
|
2481
|
+
for (T = ++S; D > T && (k = x.charCodeAt(T), k >= 48 && 57 >= k); T++)
|
|
2482
2482
|
;
|
|
2483
|
-
|
|
2483
|
+
T == S && V(), S = T;
|
|
2484
2484
|
}
|
|
2485
|
-
if (k =
|
|
2486
|
-
for (k =
|
|
2485
|
+
if (k = x.charCodeAt(S), k == 101 || k == 69) {
|
|
2486
|
+
for (k = x.charCodeAt(++S), (k == 43 || k == 45) && S++, T = S; D > T && (k = x.charCodeAt(T), k >= 48 && 57 >= k); T++)
|
|
2487
2487
|
;
|
|
2488
|
-
|
|
2488
|
+
T == S && V(), S = T;
|
|
2489
2489
|
}
|
|
2490
|
-
return +
|
|
2490
|
+
return +x.slice(O, S);
|
|
2491
2491
|
}
|
|
2492
|
-
if (
|
|
2492
|
+
if (j && V(), 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
|
+
V();
|
|
2499
2499
|
}
|
|
2500
2500
|
return "$";
|
|
2501
2501
|
}, se = function(E) {
|
|
2502
|
-
var O,
|
|
2503
|
-
if (E == "$" &&
|
|
2502
|
+
var O, T;
|
|
2503
|
+
if (E == "$" && V(), typeof E == "string") {
|
|
2504
2504
|
if ((P ? E.charAt(0) : E[0]) == "@")
|
|
2505
2505
|
return E.slice(1);
|
|
2506
2506
|
if (E == "[") {
|
|
2507
|
-
for (O = []; E = J(), E != "]";
|
|
2508
|
-
|
|
2507
|
+
for (O = []; E = J(), E != "]"; T || (T = !0))
|
|
2508
|
+
T && (E == "," ? (E = J(), E == "]" && V()) : V()), E == "," && V(), O.push(se(E));
|
|
2509
2509
|
return O;
|
|
2510
2510
|
}
|
|
2511
2511
|
if (E == "{") {
|
|
2512
|
-
for (O = {}; E = J(), E != "}";
|
|
2513
|
-
|
|
2512
|
+
for (O = {}; E = J(), E != "}"; T || (T = !0))
|
|
2513
|
+
T && (E == "," ? (E = J(), E == "}" && V()) : V()), (E == "," || typeof E != "string" || (P ? E.charAt(0) : E[0]) != "@" || J() != ":") && V(), O[E.slice(1)] = se(J());
|
|
2514
2514
|
return O;
|
|
2515
2515
|
}
|
|
2516
|
-
|
|
2516
|
+
V();
|
|
2517
2517
|
}
|
|
2518
2518
|
return E;
|
|
2519
|
-
}, ke = function(E, O,
|
|
2520
|
-
var
|
|
2521
|
-
|
|
2522
|
-
}, Ce = function(E, O,
|
|
2523
|
-
var
|
|
2519
|
+
}, ke = function(E, O, T) {
|
|
2520
|
+
var j = Ce(E, O, T);
|
|
2521
|
+
j === l ? delete E[O] : E[O] = j;
|
|
2522
|
+
}, Ce = function(E, O, T) {
|
|
2523
|
+
var j, k = E[O];
|
|
2524
2524
|
if (typeof k == "object" && k)
|
|
2525
2525
|
if (d.call(k) == y)
|
|
2526
|
-
for (
|
|
2527
|
-
ke(k,
|
|
2526
|
+
for (j = k.length; j--; )
|
|
2527
|
+
ke(k, j, T);
|
|
2528
2528
|
else
|
|
2529
|
-
f(k, function(
|
|
2530
|
-
ke(k,
|
|
2529
|
+
f(k, function(x) {
|
|
2530
|
+
ke(k, x, T);
|
|
2531
2531
|
});
|
|
2532
|
-
return
|
|
2532
|
+
return T.call(E, O, k);
|
|
2533
2533
|
};
|
|
2534
|
-
|
|
2535
|
-
var
|
|
2536
|
-
return S = 0,
|
|
2534
|
+
p.parse = function(E, O) {
|
|
2535
|
+
var T, j;
|
|
2536
|
+
return S = 0, X = "" + E, T = se(J()), J() != "$" && V(), S = X = null, O && d.call(O) == r ? Ce((j = {}, j[""] = T, j), "", O) : T;
|
|
2537
2537
|
};
|
|
2538
2538
|
}
|
|
2539
2539
|
}
|
|
@@ -2551,16 +2551,16 @@ function Xe() {
|
|
|
2551
2551
|
}, {}]
|
|
2552
2552
|
}, {}, [1])(1);
|
|
2553
2553
|
}
|
|
2554
|
-
const
|
|
2554
|
+
const Xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2555
2555
|
__proto__: null,
|
|
2556
|
-
default:
|
|
2557
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2558
|
-
"./v1_3_7.js":
|
|
2556
|
+
default: qe
|
|
2557
|
+
}, Symbol.toStringTag, { value: "Module" })), Ke = /* @__PURE__ */ Object.assign({
|
|
2558
|
+
"./v1_3_7.js": Xe
|
|
2559
2559
|
}), $e = /v\d+_\d+_\d+/;
|
|
2560
2560
|
function Ge(a) {
|
|
2561
2561
|
return typeof a == "function";
|
|
2562
2562
|
}
|
|
2563
|
-
const Se = Object.entries(
|
|
2563
|
+
const Se = Object.entries(Ke).reduce(
|
|
2564
2564
|
(a, t) => {
|
|
2565
2565
|
var o;
|
|
2566
2566
|
const e = t[1].default, s = (o = t[0].match($e)) == null ? void 0 : o[0];
|
|
@@ -2576,7 +2576,7 @@ const Se = Object.entries(Ve).reduce(
|
|
|
2576
2576
|
getSocketVersion: Le,
|
|
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 || {}), 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 || {}),
|
|
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 || {}), U = /* @__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))(U || {}), Oe = /* @__PURE__ */ ((a) => (a.NEWCALL = "NEWCALL", a.ANSWER = "ANSWER", a.HOLD = "HOLD", a.UNHOLD = "UNHOLD", a.HANGUP = "HANGUP", a.USER_STATUS_UPDATE = "userStatusUpdate", a))(Oe || {}), et = /* @__PURE__ */ ((a) => (a.NORMAL_HANGUP = "Normal hangup", a.USER_BUSY = "User busy", a.CALL_REJECTED = "Call Rejected", a.UNALLOCATED_NUMBER = "Unallocated (unassigned) number", a.UNKNOWN = "Unknown", a.NO_USER_RESPONDING = "No user responding", a.USER_ALERTING = "User alerting, no answer", a.ANSWERED_ELSEWHERE = "Answered elsewhere", a))(et || {}), tt = /* @__PURE__ */ ((a) => (a.ANSWER = "ANSWER", a.ABANDONED = "ABANDONED", a.EXIT = "EXIT", a.JOIN = "JOIN", a))(tt || {});
|
|
2580
2580
|
class le {
|
|
2581
2581
|
static mapExtensionEvent(t) {
|
|
2582
2582
|
var f, l;
|
|
@@ -2737,48 +2737,48 @@ class le {
|
|
|
2737
2737
|
static configureUTCForObject(t, e, s, o) {
|
|
2738
2738
|
const h = (s - o * 60) * 1e3, f = Date.now() - h, l = {};
|
|
2739
2739
|
return e.forEach((d) => {
|
|
2740
|
-
const i = t[d.key],
|
|
2740
|
+
const i = t[d.key], p = d.key;
|
|
2741
2741
|
if (i !== 0 && typeof i == "number" && !isNaN(i)) {
|
|
2742
2742
|
let c = i;
|
|
2743
2743
|
d.format === "ms" && (c = Math.floor(c / 1e3));
|
|
2744
2744
|
const r = (c - o * 60) * 1e3;
|
|
2745
|
-
this.assignProperty(l, `${
|
|
2745
|
+
this.assignProperty(l, `${p}_UTC`, r), this.assignProperty(l, `${p}_UTC_CLIENT`, r + f);
|
|
2746
2746
|
} else
|
|
2747
|
-
this.assignProperty(l, `${
|
|
2747
|
+
this.assignProperty(l, `${p}_UTC`, 0), this.assignProperty(l, `${p}_UTC_CLIENT`, 0);
|
|
2748
2748
|
}), {
|
|
2749
2749
|
...t,
|
|
2750
2750
|
...l
|
|
2751
2751
|
};
|
|
2752
2752
|
}
|
|
2753
2753
|
}
|
|
2754
|
-
var _e = /* @__PURE__ */ ((a) => (a.UPDATE_MONITORED_EXTENSIONS = "updateMonitoredExtensions", a.KEEP_ALIVE = "keepalive", a))(_e || {});
|
|
2754
|
+
var _e = /* @__PURE__ */ ((a) => (a.UPDATE_MONITORED_EXTENSIONS = "updateMonitoredExtensions", a.KEEP_ALIVE = "keepalive", a.SUBSCRIBE_VOICEBOT_CALL_UPDATES = "subscribeVoicebotCallUpdates", a.UNSUBSCRIBE_VOICEBOT_CALL_UPDATES = "unsubscribeVoicebotCallUpdates", a))(_e || {});
|
|
2755
2755
|
class nt {
|
|
2756
2756
|
/**
|
|
2757
2757
|
* Creates an instance of SocketIoClass and sets up network event listeners.
|
|
2758
2758
|
*/
|
|
2759
2759
|
constructor(t) {
|
|
2760
2760
|
/** The active Socket.IO connection instance */
|
|
2761
|
-
|
|
2761
|
+
q(this, "io");
|
|
2762
2762
|
/** The Socket.IO function used to create connections based on version */
|
|
2763
|
-
|
|
2763
|
+
q(this, "ioFunction");
|
|
2764
2764
|
/** Timestamp of the last received event, used for keep-alive calculations */
|
|
2765
|
-
|
|
2765
|
+
q(this, "lastEventTimestamp", (/* @__PURE__ */ new Date()).getTime());
|
|
2766
2766
|
/** Flag indicating whether automatic reconnection should be attempted */
|
|
2767
|
-
|
|
2767
|
+
q(this, "doReconnect", !0);
|
|
2768
2768
|
/** Current connection state */
|
|
2769
|
-
|
|
2769
|
+
q(this, "connectionState", "disconnected");
|
|
2770
2770
|
/** Keep-alive interval handle */
|
|
2771
|
-
|
|
2771
|
+
q(this, "keepAliveInterval");
|
|
2772
2772
|
/** Reconnection timeout handle */
|
|
2773
|
-
|
|
2773
|
+
q(this, "reconnectTimeout");
|
|
2774
2774
|
/** Network reconnect timeout handle (debounced) */
|
|
2775
|
-
|
|
2775
|
+
q(this, "networkReconnectTimeout");
|
|
2776
2776
|
/** Current reconnection delay in seconds */
|
|
2777
|
-
|
|
2777
|
+
q(this, "reconnectionTime", Ne.reconnectionDelay);
|
|
2778
2778
|
/** Maximum reconnection delay in seconds */
|
|
2779
|
-
|
|
2779
|
+
q(this, "maxReconnectionDelay", 120);
|
|
2780
2780
|
/** Network event cleanup functions */
|
|
2781
|
-
|
|
2781
|
+
q(this, "networkCleanup", []);
|
|
2782
2782
|
this.eventsSdkClass = t, this.reconnectionTime = t.options.reconnectionDelay, this.setupNetworkListeners();
|
|
2783
2783
|
}
|
|
2784
2784
|
/**
|
|
@@ -2828,7 +2828,7 @@ class nt {
|
|
|
2828
2828
|
};
|
|
2829
2829
|
if (this.ioFunction && h)
|
|
2830
2830
|
this.io = this.ioFunction(h, f), this.initSocketEvents(), this.eventsSdkClass.eventEmitterClass.emit(
|
|
2831
|
-
|
|
2831
|
+
U.ONLINE_STATUS_EVENT,
|
|
2832
2832
|
{
|
|
2833
2833
|
attemptToConnect: h,
|
|
2834
2834
|
connectionStatus: re.TRYING_TO_CONNECT
|
|
@@ -2877,7 +2877,7 @@ class nt {
|
|
|
2877
2877
|
* Sets up event listeners for all Socket.IO events
|
|
2878
2878
|
*/
|
|
2879
2879
|
initSocketEvents() {
|
|
2880
|
-
this.io && (this.io.removeAllListeners(), this.io.on(
|
|
2880
|
+
this.io && (this.io.removeAllListeners(), this.io.on(U.LOGIN_SUCCESS, (t) => this.onLoginSuccessEvent(t, U.LOGIN_SUCCESS)).on(U.QUEUE_EVENT, (t) => this.onQueueEvent(t, U.QUEUE_EVENT)).on(U.EXTENSION_EVENT, (t) => this.onExtensionEvent(t, U.EXTENSION_EVENT)).on(U.DIALER_EVENT, (t) => this.onDialerEvent(t, U.DIALER_EVENT)).on(U.LOGIN_STATUS, (t) => this.onLoginStatusEvent(t, U.LOGIN_STATUS)).on(U.ALL_EXTENSION_STATUS, (t) => this.onAllExtensionStatus(t, U.ALL_EXTENSION_STATUS)).on(U.ALL_DIALER_STATUS, (t) => this.onAllDialerStatus(t, U.ALL_DIALER_STATUS)).on(U.KEEP_ALIVE_RESPONSE, (t) => this.onKeepAliveResponse(t)).on(U.EXTENSIONS_UPDATED, (t) => this.onExtensionsUpdatedEvent(t, U.EXTENSIONS_UPDATED)).on(U.CONNECT, () => this.onConnect()).on(U.DISCONNECT, (t) => this.onDisconnect(t)).on(U.CONNECT_ERROR_EVENT, (t) => this.onConnectError(t)));
|
|
2881
2881
|
}
|
|
2882
2882
|
/**
|
|
2883
2883
|
* Updates timestamp on every event to prevent unnecessary keep-alives
|
|
@@ -2929,7 +2929,7 @@ class nt {
|
|
|
2929
2929
|
* Handles successful connection
|
|
2930
2930
|
*/
|
|
2931
2931
|
onConnect() {
|
|
2932
|
-
this.connectionState = "connected", this.reconnectionTime = this.eventsSdkClass.options.reconnectionDelay, this.reconnectTimeout && (clearTimeout(this.reconnectTimeout), this.reconnectTimeout = void 0), this.eventsSdkClass.eventEmitterClass.emit(
|
|
2932
|
+
this.connectionState = "connected", this.reconnectionTime = this.eventsSdkClass.options.reconnectionDelay, this.reconnectTimeout && (clearTimeout(this.reconnectTimeout), this.reconnectTimeout = void 0), this.eventsSdkClass.eventEmitterClass.emit(U.ONLINE_STATUS_EVENT, {
|
|
2933
2933
|
connectionStatus: re.CONNECTED
|
|
2934
2934
|
}), this.eventsSdkClass.loggerClass.start().then(() => {
|
|
2935
2935
|
this.eventsSdkClass.loggerClass.sdkConnectionSuccess();
|
|
@@ -2939,7 +2939,7 @@ class nt {
|
|
|
2939
2939
|
* Schedules reconnection with exponential backoff
|
|
2940
2940
|
*/
|
|
2941
2941
|
scheduleReconnect() {
|
|
2942
|
-
!this.doReconnect || this.reconnectTimeout || (this.eventsSdkClass.eventEmitterClass.emit(
|
|
2942
|
+
!this.doReconnect || this.reconnectTimeout || (this.eventsSdkClass.eventEmitterClass.emit(U.ONLINE_STATUS_EVENT, {
|
|
2943
2943
|
connectionStatus: re.TRYING_TO_CONNECT
|
|
2944
2944
|
}), this.reconnectTimeout = setTimeout(() => {
|
|
2945
2945
|
this.reconnectTimeout = void 0, this.reconnectionTime = Math.min(
|
|
@@ -2953,7 +2953,7 @@ class nt {
|
|
|
2953
2953
|
*/
|
|
2954
2954
|
onDisconnect(t) {
|
|
2955
2955
|
if (this.connectionState = "disconnected", this.eventsSdkClass.loggerClass.sdkDisconnect([t]), !this.doReconnect) {
|
|
2956
|
-
this.eventsSdkClass.eventEmitterClass.emit(
|
|
2956
|
+
this.eventsSdkClass.eventEmitterClass.emit(U.ONLINE_STATUS_EVENT, {
|
|
2957
2957
|
connectionStatus: re.DISCONNECTED
|
|
2958
2958
|
});
|
|
2959
2959
|
return;
|
|
@@ -2964,7 +2964,7 @@ class nt {
|
|
|
2964
2964
|
* Handles connection errors
|
|
2965
2965
|
*/
|
|
2966
2966
|
onConnectError(t) {
|
|
2967
|
-
this.connectionState = "disconnected", this.eventsSdkClass.loggerClass.sdkAttemptToConnectError(t), this.doReconnect ? this.scheduleReconnect() : this.eventsSdkClass.eventEmitterClass.emit(
|
|
2967
|
+
this.connectionState = "disconnected", this.eventsSdkClass.loggerClass.sdkAttemptToConnectError(t), this.doReconnect ? this.scheduleReconnect() : this.eventsSdkClass.eventEmitterClass.emit(U.ONLINE_STATUS_EVENT, {
|
|
2968
2968
|
connectionStatus: re.DISCONNECTED
|
|
2969
2969
|
});
|
|
2970
2970
|
}
|
|
@@ -2977,7 +2977,7 @@ class nt {
|
|
|
2977
2977
|
}
|
|
2978
2978
|
class rt {
|
|
2979
2979
|
constructor(t) {
|
|
2980
|
-
|
|
2980
|
+
q(this, "storageLogger");
|
|
2981
2981
|
this.eventsSdkClass = t, this.eventsSdkClass = t;
|
|
2982
2982
|
}
|
|
2983
2983
|
init() {
|
|
@@ -3127,10 +3127,10 @@ class rt {
|
|
|
3127
3127
|
eventLog(t, e) {
|
|
3128
3128
|
const s = {
|
|
3129
3129
|
[te.FULL]: [],
|
|
3130
|
-
[te.BOOTSTRAP]: [
|
|
3131
|
-
[te.DEBUG_EXTENSIONS]: [
|
|
3132
|
-
[te.DEBUG_DIALER]: [
|
|
3133
|
-
[te.DEBUG_QUEUE]: [
|
|
3130
|
+
[te.BOOTSTRAP]: [U.LOGIN_STATUS, U.LOGIN_SUCCESS, U.ALL_EXTENSION_STATUS, U.ALL_DIALER_STATUS],
|
|
3131
|
+
[te.DEBUG_EXTENSIONS]: [U.ALL_EXTENSION_STATUS, U.EXTENSION_EVENT, U.EXTENSIONS_UPDATED],
|
|
3132
|
+
[te.DEBUG_DIALER]: [U.ALL_DIALER_STATUS, U.DIALER_EVENT],
|
|
3133
|
+
[te.DEBUG_QUEUE]: [U.QUEUE_EVENT]
|
|
3134
3134
|
};
|
|
3135
3135
|
this.eventsSdkClass.options.debugOption && (s[this.eventsSdkClass.options.debugOption].includes(t) || this.eventsSdkClass.options.debugOption === te.FULL) && this.log({
|
|
3136
3136
|
Message: `Event name: ${t}`,
|
|
@@ -3153,20 +3153,26 @@ class rt {
|
|
|
3153
3153
|
}
|
|
3154
3154
|
class st {
|
|
3155
3155
|
constructor(t) {
|
|
3156
|
-
|
|
3157
|
-
[
|
|
3158
|
-
[
|
|
3159
|
-
[
|
|
3160
|
-
[
|
|
3161
|
-
[
|
|
3162
|
-
[
|
|
3163
|
-
[
|
|
3164
|
-
[
|
|
3165
|
-
[
|
|
3166
|
-
[
|
|
3167
|
-
[
|
|
3156
|
+
q(this, "listeners", {
|
|
3157
|
+
[U.ALL_EXTENSION_STATUS]: [],
|
|
3158
|
+
[U.ALL_DIALER_STATUS]: [],
|
|
3159
|
+
[U.ALL_USERS_STATUS]: [],
|
|
3160
|
+
[U.ALL_VOICEBOTS_STATUS]: [],
|
|
3161
|
+
[U.QUEUE_EVENT]: [],
|
|
3162
|
+
[U.EXTENSION_EVENT]: [],
|
|
3163
|
+
[U.DIALER_EVENT]: [],
|
|
3164
|
+
[U.LOGIN_SUCCESS]: [],
|
|
3165
|
+
[U.LOGIN_STATUS]: [],
|
|
3166
|
+
[U.KEEP_ALIVE_RESPONSE]: [],
|
|
3167
|
+
[U.ONLINE_STATUS_EVENT]: [],
|
|
3168
|
+
[U.EXTENSIONS_UPDATED]: [],
|
|
3169
|
+
[U.VOICEBOT_SUBSCRIBED_TO_CALL]: [],
|
|
3170
|
+
[U.VOICEBOT_SUBSCRIBE_TO_CALL_FAILED]: [],
|
|
3171
|
+
[U.VOICEBOT_INITIAL_CALL_HISTORY]: [],
|
|
3172
|
+
[U.VOICEBOT_UNSUBSCRIBED_FROM_CALL]: [],
|
|
3173
|
+
[U.VOICEBOT_EVENT]: []
|
|
3168
3174
|
});
|
|
3169
|
-
|
|
3175
|
+
q(this, "allListeners", []);
|
|
3170
3176
|
this.eventsSdkClass = t, this.eventsSdkClass = t;
|
|
3171
3177
|
}
|
|
3172
3178
|
on(t, e) {
|
|
@@ -3197,19 +3203,19 @@ class st {
|
|
|
3197
3203
|
}
|
|
3198
3204
|
class ct {
|
|
3199
3205
|
constructor(t) {
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3206
|
+
q(this, "options");
|
|
3207
|
+
q(this, "servers", []);
|
|
3208
|
+
q(this, "URLList", []);
|
|
3209
|
+
q(this, "server");
|
|
3210
|
+
q(this, "URL");
|
|
3211
|
+
q(this, "socket");
|
|
3212
|
+
q(this, "mainServer");
|
|
3213
|
+
q(this, "alreadyAttemptedOtherServers", []);
|
|
3214
|
+
q(this, "authClass", new Ve(this));
|
|
3215
|
+
q(this, "socketIoClass");
|
|
3216
|
+
q(this, "loggerClass", new rt(this));
|
|
3217
|
+
q(this, "eventEmitterClass", new st(this));
|
|
3218
|
+
q(this, "getCircularReplacer", () => {
|
|
3213
3219
|
const t = /* @__PURE__ */ new WeakSet();
|
|
3214
3220
|
return (e, s) => {
|
|
3215
3221
|
if (!(e === "socket" || e === "io" || e === "nsps")) {
|
|
@@ -3289,7 +3295,7 @@ export {
|
|
|
3289
3295
|
Ye as DialerTypeEnum,
|
|
3290
3296
|
Qe as DirectionEnum,
|
|
3291
3297
|
Ze as DoNotCallMeStatusCodeEnum,
|
|
3292
|
-
|
|
3298
|
+
U as EventsEnum,
|
|
3293
3299
|
Oe as ExtensionEventReasonEnum,
|
|
3294
3300
|
et as ExtensionHangupCauseEnum,
|
|
3295
3301
|
Z as LoginType,
|