@hortiview/modulebase 1.0.4 → 1.1.0-alpha.8ea7f643.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{IsRestoringProvider-BfrdLTDw.js → IsRestoringProvider-CBSZo7ur.js} +83 -181
- package/dist/{ModuleCore-U32BXXin.js → ModuleCore-DuJVrj6v.js} +5052 -5011
- package/dist/{QueryClientProvider-Bak-4BVu.js → QueryClientProvider-DyiNrPkn.js} +160 -177
- package/dist/assets/ModuleCore.css +1 -1
- package/dist/{chunk-EVOBXE3Y-BoyVF_Ri.js → chunk-LFPYN7LY-DmQ3La_a.js} +2784 -2921
- package/dist/components/ModuleBase.js +19 -28
- package/dist/components/ModuleCore.js +1 -1
- package/dist/hooks/useCustom.js +12 -10
- package/dist/hooks/useCustomMutation.js +11 -9
- package/dist/hooks/useEntity.js +1 -1
- package/dist/hooks/useOffline.js +1 -1
- package/dist/hooks/useOption.js +1 -1
- package/dist/hooks/useServiceBus.js +1 -1
- package/dist/hooks/useStores.js +1 -1
- package/dist/lib/hooks/useCustom.d.ts +3 -4
- package/dist/lib/hooks/useCustomMutation.d.ts +3 -3
- package/dist/lib/module-router.d.ts +1 -1
- package/dist/main.js +178 -175
- package/dist/module-router.js +845 -889
- package/dist/{mutation-DztCHC7y.js → mutation-CmhiEgfA.js} +1 -1
- package/dist/{omit-DYPaIq41.js → omit-Do6MFRwA.js} +128 -121
- package/dist/provider/SignalR/SignalRProvider.js +463 -469
- package/dist/{useMutation-a0q2LJY6.js → useMutation-Aoachkw_.js} +2 -2
- package/dist/{useQuery-Cepqe-Ee.js → useQuery-DEU_AUtf.js} +105 -105
- package/dist/utils/helper.js +1 -1
- package/package.json +24 -24
|
@@ -15,7 +15,7 @@ class fe extends Error {
|
|
|
15
15
|
super(`${e}: Status code '${t}'`), this.statusCode = t, this.__proto__ = n;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
class
|
|
18
|
+
class lt extends Error {
|
|
19
19
|
/** Constructs a new instance of {@link @microsoft/signalr.TimeoutError}.
|
|
20
20
|
*
|
|
21
21
|
* @param {string} errorMessage A descriptive error message.
|
|
@@ -190,8 +190,8 @@ function Be(r) {
|
|
|
190
190
|
r.constructor && r.constructor.name === "ArrayBuffer");
|
|
191
191
|
}
|
|
192
192
|
async function Gn(r, e, t, n, i, o) {
|
|
193
|
-
const s = {}, [
|
|
194
|
-
s[
|
|
193
|
+
const s = {}, [u, h] = qe();
|
|
194
|
+
s[u] = h, r.log(y.Trace, `(${e} transport) sending data. ${Ze(i, o.logMessageContent)}.`);
|
|
195
195
|
const c = Be(i) ? "arraybuffer" : "text", a = await t.post(n, {
|
|
196
196
|
content: i,
|
|
197
197
|
headers: { ...s, ...o.headers },
|
|
@@ -202,7 +202,7 @@ async function Gn(r, e, t, n, i, o) {
|
|
|
202
202
|
r.log(y.Trace, `(${e} transport) request complete. Response status: ${a.statusCode}.`);
|
|
203
203
|
}
|
|
204
204
|
function Er(r) {
|
|
205
|
-
return r === void 0 ? new
|
|
205
|
+
return r === void 0 ? new ut(y.Information) : r === null ? Fe.instance : r.log !== void 0 ? r : new ut(r);
|
|
206
206
|
}
|
|
207
207
|
class Tr {
|
|
208
208
|
constructor(e, t) {
|
|
@@ -214,7 +214,7 @@ class Tr {
|
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
class
|
|
217
|
+
class ut {
|
|
218
218
|
constructor(e) {
|
|
219
219
|
this._minLevel = e, this.out = console;
|
|
220
220
|
}
|
|
@@ -314,7 +314,7 @@ class Nr extends et {
|
|
|
314
314
|
if (e.timeout) {
|
|
315
315
|
const h = e.timeout;
|
|
316
316
|
i = setTimeout(() => {
|
|
317
|
-
t.abort(), this._logger.log(y.Warning, "Timeout from HTTP request."), n = new
|
|
317
|
+
t.abort(), this._logger.log(y.Warning, "Timeout from HTTP request."), n = new lt();
|
|
318
318
|
}, h);
|
|
319
319
|
}
|
|
320
320
|
e.content === "" && (e.content = void 0), e.content && (e.headers = e.headers || {}, Be(e.content) ? e.headers["Content-Type"] = "application/octet-stream" : e.headers["Content-Type"] = "text/plain;charset=UTF-8");
|
|
@@ -342,8 +342,8 @@ class Nr extends et {
|
|
|
342
342
|
const h = await Wt(o, "text");
|
|
343
343
|
throw new fe(h || o.statusText, o.status);
|
|
344
344
|
}
|
|
345
|
-
const
|
|
346
|
-
return new Nt(o.status, o.statusText,
|
|
345
|
+
const u = await Wt(o, e.responseType);
|
|
346
|
+
return new Nt(o.status, o.statusText, u);
|
|
347
347
|
}
|
|
348
348
|
getCookieString(e) {
|
|
349
349
|
let t = "";
|
|
@@ -388,7 +388,7 @@ class Dr extends et {
|
|
|
388
388
|
}, i.onerror = () => {
|
|
389
389
|
this._logger.log(y.Warning, `Error from HTTP request. ${i.status}: ${i.statusText}.`), n(new fe(i.statusText, i.status));
|
|
390
390
|
}, i.ontimeout = () => {
|
|
391
|
-
this._logger.log(y.Warning, "Timeout from HTTP request."), n(new
|
|
391
|
+
this._logger.log(y.Warning, "Timeout from HTTP request."), n(new lt());
|
|
392
392
|
}, i.send(e.content);
|
|
393
393
|
}) : Promise.reject(new Error("No url defined.")) : Promise.reject(new Error("No method defined."));
|
|
394
394
|
}
|
|
@@ -432,17 +432,17 @@ class Br {
|
|
|
432
432
|
parseHandshakeResponse(e) {
|
|
433
433
|
let t, n;
|
|
434
434
|
if (Be(e)) {
|
|
435
|
-
const
|
|
435
|
+
const u = new Uint8Array(e), h = u.indexOf(X.RecordSeparatorCode);
|
|
436
436
|
if (h === -1)
|
|
437
437
|
throw new Error("Message is incomplete.");
|
|
438
438
|
const c = h + 1;
|
|
439
|
-
t = String.fromCharCode.apply(null, Array.prototype.slice.call(
|
|
439
|
+
t = String.fromCharCode.apply(null, Array.prototype.slice.call(u.slice(0, c))), n = u.byteLength > c ? u.slice(c).buffer : null;
|
|
440
440
|
} else {
|
|
441
|
-
const
|
|
441
|
+
const u = e, h = u.indexOf(X.RecordSeparator);
|
|
442
442
|
if (h === -1)
|
|
443
443
|
throw new Error("Message is incomplete.");
|
|
444
444
|
const c = h + 1;
|
|
445
|
-
t =
|
|
445
|
+
t = u.substring(0, c), n = u.length > c ? u.substring(c) : null;
|
|
446
446
|
}
|
|
447
447
|
const i = X.parse(t), o = JSON.parse(i[0]);
|
|
448
448
|
if (o.type)
|
|
@@ -486,8 +486,8 @@ class Mr {
|
|
|
486
486
|
let i = () => {
|
|
487
487
|
}, o = () => {
|
|
488
488
|
};
|
|
489
|
-
Be(t) ? this._bufferedByteCount += t.byteLength : this._bufferedByteCount += t.length, this._bufferedByteCount >= this._bufferSize && (n = new Promise((s,
|
|
490
|
-
i = s, o =
|
|
489
|
+
Be(t) ? this._bufferedByteCount += t.byteLength : this._bufferedByteCount += t.length, this._bufferedByteCount >= this._bufferSize && (n = new Promise((s, u) => {
|
|
490
|
+
i = s, o = u;
|
|
491
491
|
})), this._messages.push(new jr(t, this._totalMessageCount, i, o));
|
|
492
492
|
}
|
|
493
493
|
try {
|
|
@@ -582,13 +582,13 @@ class ht {
|
|
|
582
582
|
// create method that can be used by HubConnectionBuilder. An "internal" constructor would just
|
|
583
583
|
// be stripped away and the '.d.ts' file would have no constructor, which is interpreted as a
|
|
584
584
|
// public parameter-less constructor.
|
|
585
|
-
static create(e, t, n, i, o, s,
|
|
586
|
-
return new ht(e, t, n, i, o, s,
|
|
585
|
+
static create(e, t, n, i, o, s, u) {
|
|
586
|
+
return new ht(e, t, n, i, o, s, u);
|
|
587
587
|
}
|
|
588
|
-
constructor(e, t, n, i, o, s,
|
|
588
|
+
constructor(e, t, n, i, o, s, u) {
|
|
589
589
|
this._nextKeepAlive = 0, this._freezeEventListener = () => {
|
|
590
590
|
this._logger.log(y.Warning, "The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep");
|
|
591
|
-
}, B.isRequired(e, "connection"), B.isRequired(t, "logger"), B.isRequired(n, "protocol"), this.serverTimeoutInMilliseconds = o ?? Fr, this.keepAliveIntervalInMilliseconds = s ?? qr, this._statefulReconnectBufferSize =
|
|
591
|
+
}, B.isRequired(e, "connection"), B.isRequired(t, "logger"), B.isRequired(n, "protocol"), this.serverTimeoutInMilliseconds = o ?? Fr, this.keepAliveIntervalInMilliseconds = s ?? qr, this._statefulReconnectBufferSize = u ?? xr, this._logger = t, this._protocol = n, this.connection = e, this._reconnectPolicy = i, this._handshakeProtocol = new Br(), this.connection.onreceive = (h) => this._processIncomingData(h), this.connection.onclose = (h) => this._connectionClosed(h), this._callbacks = {}, this._methods = {}, this._closedCallbacks = [], this._reconnectingCallbacks = [], this._reconnectedCallbacks = [], this._invocationId = 0, this._receivedHandshakeResponse = !1, this._connectionState = R.Disconnected, this._connectionStarted = !1, this._cachedPingMessage = this._protocol.writeMessage({ type: S.Ping });
|
|
592
592
|
}
|
|
593
593
|
/** Indicates the state of the {@link HubConnection} to the server. */
|
|
594
594
|
get state() {
|
|
@@ -692,18 +692,18 @@ class ht {
|
|
|
692
692
|
stream(e, ...t) {
|
|
693
693
|
const [n, i] = this._replaceStreamingParams(t), o = this._createStreamInvocation(e, t, i);
|
|
694
694
|
let s;
|
|
695
|
-
const
|
|
696
|
-
return
|
|
695
|
+
const u = new Zn();
|
|
696
|
+
return u.cancelCallback = () => {
|
|
697
697
|
const h = this._createCancelInvocation(o.invocationId);
|
|
698
698
|
return delete this._callbacks[o.invocationId], s.then(() => this._sendWithProtocol(h));
|
|
699
699
|
}, this._callbacks[o.invocationId] = (h, c) => {
|
|
700
700
|
if (c) {
|
|
701
|
-
|
|
701
|
+
u.error(c);
|
|
702
702
|
return;
|
|
703
|
-
} else h && (h.type === S.Completion ? h.error ?
|
|
703
|
+
} else h && (h.type === S.Completion ? h.error ? u.error(new Error(h.error)) : u.complete() : u.next(h.item));
|
|
704
704
|
}, s = this._sendWithProtocol(o).catch((h) => {
|
|
705
|
-
|
|
706
|
-
}), this._launchStreams(n, s),
|
|
705
|
+
u.error(h), delete this._callbacks[o.invocationId];
|
|
706
|
+
}), this._launchStreams(n, s), u;
|
|
707
707
|
}
|
|
708
708
|
_sendMessage(e) {
|
|
709
709
|
return this._resetKeepAliveInterval(), this.connection.send(e);
|
|
@@ -741,12 +741,12 @@ class ht {
|
|
|
741
741
|
*/
|
|
742
742
|
invoke(e, ...t) {
|
|
743
743
|
const [n, i] = this._replaceStreamingParams(t), o = this._createInvocation(e, t, !1, i);
|
|
744
|
-
return new Promise((
|
|
745
|
-
this._callbacks[o.invocationId] = (a,
|
|
746
|
-
if (
|
|
747
|
-
h(
|
|
744
|
+
return new Promise((u, h) => {
|
|
745
|
+
this._callbacks[o.invocationId] = (a, l) => {
|
|
746
|
+
if (l) {
|
|
747
|
+
h(l);
|
|
748
748
|
return;
|
|
749
|
-
} else a && (a.type === S.Completion ? a.error ? h(new Error(a.error)) :
|
|
749
|
+
} else a && (a.type === S.Completion ? a.error ? h(new Error(a.error)) : u(a.result) : h(new Error(`Unexpected message type: ${a.type}`)));
|
|
750
750
|
};
|
|
751
751
|
const c = this._sendWithProtocol(o).catch((a) => {
|
|
752
752
|
h(a), delete this._callbacks[o.invocationId];
|
|
@@ -881,15 +881,15 @@ class ht {
|
|
|
881
881
|
return;
|
|
882
882
|
}
|
|
883
883
|
const i = n.slice(), o = !!e.invocationId;
|
|
884
|
-
let s,
|
|
884
|
+
let s, u, h;
|
|
885
885
|
for (const c of i)
|
|
886
886
|
try {
|
|
887
887
|
const a = s;
|
|
888
|
-
s = await c.apply(this, e.arguments), o && s && a && (this._logger.log(y.Error, `Multiple results provided for '${t}'. Sending error to server.`), h = this._createCompletionMessage(e.invocationId, "Client provided multiple results.", null)),
|
|
888
|
+
s = await c.apply(this, e.arguments), o && s && a && (this._logger.log(y.Error, `Multiple results provided for '${t}'. Sending error to server.`), h = this._createCompletionMessage(e.invocationId, "Client provided multiple results.", null)), u = void 0;
|
|
889
889
|
} catch (a) {
|
|
890
|
-
|
|
890
|
+
u = a, this._logger.log(y.Error, `A callback for the method '${t}' threw error '${a}'.`);
|
|
891
891
|
}
|
|
892
|
-
h ? await this._sendWithProtocol(h) : o ? (
|
|
892
|
+
h ? await this._sendWithProtocol(h) : o ? (u ? h = this._createCompletionMessage(e.invocationId, `${u}`, null) : s !== void 0 ? h = this._createCompletionMessage(e.invocationId, null, s) : (this._logger.log(y.Warning, `No result given for '${t}' method and invocation ID '${e.invocationId}'.`), h = this._createCompletionMessage(e.invocationId, "Client didn't provide a result.", null)), await this._sendWithProtocol(h)) : s && this._logger.log(y.Error, `Result given for '${t}' method but server is not expecting a result.`);
|
|
893
893
|
}
|
|
894
894
|
_connectionClosed(e) {
|
|
895
895
|
this._logger.log(y.Debug, `HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`), this._stopDuringStartError = this._stopDuringStartError || e || new Q("The underlying connection was closed before the hub handshake could complete."), this._handshakeResolver && this._handshakeResolver(), this._cancelCallbacksWithError(e || new Error("Invocation canceled due to the underlying connection being closed.")), this._cleanupTimeout(), this._cleanupPingTimer(), this._connectionState === R.Disconnecting ? this._completeClose(e) : this._connectionState === R.Connected && this._reconnectPolicy ? this._reconnect(e) : this._connectionState === R.Connected && this._completeClose(e);
|
|
@@ -1148,9 +1148,9 @@ class Vt {
|
|
|
1148
1148
|
withCredentials: this._options.withCredentials
|
|
1149
1149
|
};
|
|
1150
1150
|
t === j.Binary && (s.responseType = "arraybuffer");
|
|
1151
|
-
const
|
|
1152
|
-
this._logger.log(y.Trace, `(LongPolling transport) polling: ${
|
|
1153
|
-
const h = await this._httpClient.get(
|
|
1151
|
+
const u = `${e}&_=${Date.now()}`;
|
|
1152
|
+
this._logger.log(y.Trace, `(LongPolling transport) polling: ${u}.`);
|
|
1153
|
+
const h = await this._httpClient.get(u, s);
|
|
1154
1154
|
h.statusCode !== 200 ? (this._logger.log(y.Error, `(LongPolling transport) Unexpected response code: ${h.statusCode}.`), this._closeError = new fe(h.statusText || "", h.statusCode), this._running = !1) : this._running = !0, this._receiving = this._poll(this._url, s);
|
|
1155
1155
|
}
|
|
1156
1156
|
async _poll(e, t) {
|
|
@@ -1162,7 +1162,7 @@ class Vt {
|
|
|
1162
1162
|
const i = await this._httpClient.get(n, t);
|
|
1163
1163
|
i.statusCode === 204 ? (this._logger.log(y.Information, "(LongPolling transport) Poll terminated by server."), this._running = !1) : i.statusCode !== 200 ? (this._logger.log(y.Error, `(LongPolling transport) Unexpected response code: ${i.statusCode}.`), this._closeError = new fe(i.statusText || "", i.statusCode), this._running = !1) : i.content ? (this._logger.log(y.Trace, `(LongPolling transport) data received. ${Ze(i.content, this._options.logMessageContent)}.`), this.onreceive && this.onreceive(i.content)) : this._logger.log(y.Trace, "(LongPolling transport) Poll timed out, reissuing.");
|
|
1164
1164
|
} catch (n) {
|
|
1165
|
-
this._running ? n instanceof
|
|
1165
|
+
this._running ? n instanceof lt ? this._logger.log(y.Trace, "(LongPolling transport) Poll timed out, reissuing.") : (this._closeError = n, this._running = !1) : this._logger.log(y.Trace, `(LongPolling transport) Poll errored after shutdown: ${n.message}`);
|
|
1166
1166
|
}
|
|
1167
1167
|
} finally {
|
|
1168
1168
|
this._logger.log(y.Trace, "(LongPolling transport) Polling complete."), this.pollAborted || this._raiseOnClose();
|
|
@@ -1215,27 +1215,27 @@ class Wr {
|
|
|
1215
1215
|
if (A.isBrowser || A.isWebWorker)
|
|
1216
1216
|
s = new this._options.EventSource(e, { withCredentials: this._options.withCredentials });
|
|
1217
1217
|
else {
|
|
1218
|
-
const
|
|
1219
|
-
h.Cookie =
|
|
1218
|
+
const u = this._httpClient.getCookieString(e), h = {};
|
|
1219
|
+
h.Cookie = u;
|
|
1220
1220
|
const [c, a] = qe();
|
|
1221
1221
|
h[c] = a, s = new this._options.EventSource(e, { withCredentials: this._options.withCredentials, headers: { ...h, ...this._options.headers } });
|
|
1222
1222
|
}
|
|
1223
1223
|
try {
|
|
1224
|
-
s.onmessage = (
|
|
1224
|
+
s.onmessage = (u) => {
|
|
1225
1225
|
if (this.onreceive)
|
|
1226
1226
|
try {
|
|
1227
|
-
this._logger.log(y.Trace, `(SSE transport) data received. ${Ze(
|
|
1227
|
+
this._logger.log(y.Trace, `(SSE transport) data received. ${Ze(u.data, this._options.logMessageContent)}.`), this.onreceive(u.data);
|
|
1228
1228
|
} catch (h) {
|
|
1229
1229
|
this._close(h);
|
|
1230
1230
|
return;
|
|
1231
1231
|
}
|
|
1232
|
-
}, s.onerror = (
|
|
1232
|
+
}, s.onerror = (u) => {
|
|
1233
1233
|
o ? this._close() : i(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."));
|
|
1234
1234
|
}, s.onopen = () => {
|
|
1235
1235
|
this._logger.log(y.Information, `SSE connected to ${this._url}`), this._eventSource = s, o = !0, n();
|
|
1236
1236
|
};
|
|
1237
|
-
} catch (
|
|
1238
|
-
i(
|
|
1237
|
+
} catch (u) {
|
|
1238
|
+
i(u);
|
|
1239
1239
|
return;
|
|
1240
1240
|
}
|
|
1241
1241
|
});
|
|
@@ -1260,11 +1260,11 @@ class $r {
|
|
|
1260
1260
|
return this._accessTokenFactory && (n = await this._accessTokenFactory()), new Promise((i, o) => {
|
|
1261
1261
|
e = e.replace(/^http/, "ws");
|
|
1262
1262
|
let s;
|
|
1263
|
-
const
|
|
1263
|
+
const u = this._httpClient.getCookieString(e);
|
|
1264
1264
|
let h = !1;
|
|
1265
1265
|
if (A.isNode || A.isReactNative) {
|
|
1266
|
-
const c = {}, [a,
|
|
1267
|
-
c[a] =
|
|
1266
|
+
const c = {}, [a, l] = qe();
|
|
1267
|
+
c[a] = l, n && (c[De.Authorization] = `Bearer ${n}`), u && (c[De.Cookie] = u), s = new this._webSocketConstructor(e, void 0, {
|
|
1268
1268
|
headers: { ...c, ...this._headers }
|
|
1269
1269
|
});
|
|
1270
1270
|
} else
|
|
@@ -1411,11 +1411,11 @@ class Vr {
|
|
|
1411
1411
|
});
|
|
1412
1412
|
if (s.statusCode !== 200)
|
|
1413
1413
|
return Promise.reject(new Error(`Unexpected status code returned from negotiate '${s.statusCode}'`));
|
|
1414
|
-
const
|
|
1415
|
-
return (!
|
|
1414
|
+
const u = JSON.parse(s.content);
|
|
1415
|
+
return (!u.negotiateVersion || u.negotiateVersion < 1) && (u.connectionToken = u.connectionId), u.useStatefulReconnect && this._options._useStatefulReconnect !== !0 ? Promise.reject(new Ht("Client didn't negotiate Stateful Reconnect but the server did.")) : u;
|
|
1416
1416
|
} catch (s) {
|
|
1417
|
-
let
|
|
1418
|
-
return s instanceof fe && s.statusCode === 404 && (
|
|
1417
|
+
let u = "Failed to complete negotiation with the server: " + s;
|
|
1418
|
+
return s instanceof fe && s.statusCode === 404 && (u = u + " Either this is not a SignalR endpoint or there is a proxy blocking the connection."), this._logger.log(y.Error, u), Promise.reject(new Ht(u));
|
|
1419
1419
|
}
|
|
1420
1420
|
}
|
|
1421
1421
|
_createConnectUrl(e, t) {
|
|
@@ -1427,9 +1427,9 @@ class Vr {
|
|
|
1427
1427
|
this._logger.log(y.Debug, "Connection was provided an instance of ITransport, using that directly."), this.transport = t, await this._startTransport(o, i), this.connectionId = n.connectionId;
|
|
1428
1428
|
return;
|
|
1429
1429
|
}
|
|
1430
|
-
const s = [],
|
|
1430
|
+
const s = [], u = n.availableTransports || [];
|
|
1431
1431
|
let h = n;
|
|
1432
|
-
for (const c of
|
|
1432
|
+
for (const c of u) {
|
|
1433
1433
|
const a = this._resolveTransportOrError(c, t, i, h?.useStatefulReconnect === !0);
|
|
1434
1434
|
if (a instanceof Error)
|
|
1435
1435
|
s.push(`${c.transport} failed:`), s.push(a);
|
|
@@ -1437,16 +1437,16 @@ class Vr {
|
|
|
1437
1437
|
if (this.transport = a, !h) {
|
|
1438
1438
|
try {
|
|
1439
1439
|
h = await this._getNegotiationResponse(e);
|
|
1440
|
-
} catch (
|
|
1441
|
-
return Promise.reject(
|
|
1440
|
+
} catch (l) {
|
|
1441
|
+
return Promise.reject(l);
|
|
1442
1442
|
}
|
|
1443
1443
|
o = this._createConnectUrl(e, h.connectionToken);
|
|
1444
1444
|
}
|
|
1445
1445
|
try {
|
|
1446
1446
|
await this._startTransport(o, i), this.connectionId = h.connectionId;
|
|
1447
1447
|
return;
|
|
1448
|
-
} catch (
|
|
1449
|
-
if (this._logger.log(y.Error, `Failed to start the transport '${c.transport}': ${
|
|
1448
|
+
} catch (l) {
|
|
1449
|
+
if (this._logger.log(y.Error, `Failed to start the transport '${c.transport}': ${l}`), h = void 0, s.push(new Cr(`${c.transport} failed: ${l}`, D[c.transport])), this._connectionState !== "Connecting") {
|
|
1450
1450
|
const d = "Failed to select transport before stop() was called.";
|
|
1451
1451
|
return this._logger.log(y.Debug, d), Promise.reject(new Q(d));
|
|
1452
1452
|
}
|
|
@@ -1492,14 +1492,14 @@ class Vr {
|
|
|
1492
1492
|
if (o == null)
|
|
1493
1493
|
return this._logger.log(y.Debug, `Skipping transport '${e.transport}' because it is not supported by this client.`), new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);
|
|
1494
1494
|
if (Kr(t, o))
|
|
1495
|
-
if (e.transferFormats.map((
|
|
1495
|
+
if (e.transferFormats.map((u) => j[u]).indexOf(n) >= 0) {
|
|
1496
1496
|
if (o === D.WebSockets && !this._options.WebSocket || o === D.ServerSentEvents && !this._options.EventSource)
|
|
1497
1497
|
return this._logger.log(y.Debug, `Skipping transport '${D[o]}' because it is not supported in your environment.'`), new br(`'${D[o]}' is not supported in your environment.`, o);
|
|
1498
1498
|
this._logger.log(y.Debug, `Selecting transport '${D[o]}'.`);
|
|
1499
1499
|
try {
|
|
1500
1500
|
return this.features.reconnect = o === D.WebSockets ? i : void 0, this._constructTransport(o);
|
|
1501
|
-
} catch (
|
|
1502
|
-
return
|
|
1501
|
+
} catch (u) {
|
|
1502
|
+
return u;
|
|
1503
1503
|
}
|
|
1504
1504
|
} else
|
|
1505
1505
|
return this._logger.log(y.Debug, `Skipping transport '${D[o]}' because it does not support the requested transfer format '${j[n]}'.`), new Error(`'${D[o]}' does not support ${j[n]}.`);
|
|
@@ -1702,9 +1702,9 @@ class Yr {
|
|
|
1702
1702
|
this.logger = e;
|
|
1703
1703
|
else if (typeof e == "string") {
|
|
1704
1704
|
const t = Jr(e);
|
|
1705
|
-
this.logger = new
|
|
1705
|
+
this.logger = new ut(t);
|
|
1706
1706
|
} else
|
|
1707
|
-
this.logger = new
|
|
1707
|
+
this.logger = new ut(e);
|
|
1708
1708
|
return this;
|
|
1709
1709
|
}
|
|
1710
1710
|
withUrl(e, t) {
|
|
@@ -1785,7 +1785,7 @@ const Qr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1785
1785
|
},
|
|
1786
1786
|
NullLogger: Fe,
|
|
1787
1787
|
Subject: Zn,
|
|
1788
|
-
TimeoutError:
|
|
1788
|
+
TimeoutError: lt,
|
|
1789
1789
|
get TransferFormat() {
|
|
1790
1790
|
return j;
|
|
1791
1791
|
},
|
|
@@ -1803,25 +1803,25 @@ function se() {
|
|
|
1803
1803
|
function i(c, a) {
|
|
1804
1804
|
if (c in t) {
|
|
1805
1805
|
if (typeof a == "function") {
|
|
1806
|
-
const
|
|
1807
|
-
t[c].splice(
|
|
1806
|
+
const l = t[c].indexOf(a);
|
|
1807
|
+
t[c].splice(l, 1);
|
|
1808
1808
|
}
|
|
1809
1809
|
(typeof a != "function" || t[c].length === 0) && delete t[c];
|
|
1810
1810
|
}
|
|
1811
1811
|
}
|
|
1812
1812
|
function o(c, a) {
|
|
1813
|
-
c in t && t[c].forEach((
|
|
1813
|
+
c in t && t[c].forEach((l) => l(a));
|
|
1814
1814
|
}
|
|
1815
1815
|
function s() {
|
|
1816
1816
|
const c = new BroadcastChannel("hermes");
|
|
1817
|
-
return c.onmessage = (
|
|
1818
|
-
(v === "all" || v === "other") && c.postMessage({ topic:
|
|
1817
|
+
return c.onmessage = (l) => o(l.data.topic, l.data.data), { on: n, off: i, send: (l, d, v = "other") => {
|
|
1818
|
+
(v === "all" || v === "other") && c.postMessage({ topic: l, data: d }), (v === "all" || v === "current") && o(l, d);
|
|
1819
1819
|
} };
|
|
1820
1820
|
}
|
|
1821
|
-
function
|
|
1822
|
-
const c = window.localStorage, a = "__hermes:",
|
|
1821
|
+
function u() {
|
|
1822
|
+
const c = window.localStorage, a = "__hermes:", l = {}, d = (v, _, g = "other") => {
|
|
1823
1823
|
const f = a + v;
|
|
1824
|
-
c.getItem(f) === null || c.getItem(f) === "" ? ((g === "all" || g === "other") && (c.setItem(f, JSON.stringify(_)), c.removeItem(f)), (g === "all" || g === "current") && o(v, _)) : (f in
|
|
1824
|
+
c.getItem(f) === null || c.getItem(f) === "" ? ((g === "all" || g === "other") && (c.setItem(f, JSON.stringify(_)), c.removeItem(f)), (g === "all" || g === "current") && o(v, _)) : (f in l || (l[f] = []), l[f].push(_));
|
|
1825
1825
|
};
|
|
1826
1826
|
return window.addEventListener("storage", (v) => {
|
|
1827
1827
|
if (v.key && v.key.indexOf(a) === 0 && (v.oldValue === null || v.oldValue === "")) {
|
|
@@ -1831,20 +1831,20 @@ function se() {
|
|
|
1831
1831
|
}), window.addEventListener("storage", (v) => {
|
|
1832
1832
|
if (v.key && v.key.indexOf(a) === 0 && (v.newValue === null || v.newValue === "")) {
|
|
1833
1833
|
const _ = v.key.replace(a, "");
|
|
1834
|
-
_ in
|
|
1834
|
+
_ in l && (d(_, l[_].shift()), l[_].length === 0 && delete l[_]);
|
|
1835
1835
|
}
|
|
1836
1836
|
}), { on: n, off: i, send: d };
|
|
1837
1837
|
}
|
|
1838
1838
|
function h() {
|
|
1839
|
-
return { on: n, off: i, send: (a,
|
|
1840
|
-
d !== "other" && (d === "all" || d === "current") && o(a,
|
|
1839
|
+
return { on: n, off: i, send: (a, l, d = "other") => {
|
|
1840
|
+
d !== "other" && (d === "all" || d === "current") && o(a, l);
|
|
1841
1841
|
} };
|
|
1842
1842
|
}
|
|
1843
1843
|
if (typeof window < "u") {
|
|
1844
1844
|
if ("BroadcastChannel" in window)
|
|
1845
1845
|
return s();
|
|
1846
1846
|
if ("localStorage" in window)
|
|
1847
|
-
return
|
|
1847
|
+
return u();
|
|
1848
1848
|
}
|
|
1849
1849
|
return h();
|
|
1850
1850
|
}
|
|
@@ -1855,26 +1855,26 @@ var K = {}, Xt;
|
|
|
1855
1855
|
function J() {
|
|
1856
1856
|
if (Xt) return K;
|
|
1857
1857
|
Xt = 1;
|
|
1858
|
-
var r = K && K.__importDefault || function(
|
|
1859
|
-
return
|
|
1858
|
+
var r = K && K.__importDefault || function(u) {
|
|
1859
|
+
return u && u.__esModule ? u : { default: u };
|
|
1860
1860
|
};
|
|
1861
1861
|
Object.defineProperty(K, "__esModule", { value: !0 }), K.__DEV__ = K.useEvent = K.sendWithHermes = K.removeDuplicates = void 0;
|
|
1862
1862
|
const e = r(se()), t = ie, n = process.env.NODE_ENV !== "production";
|
|
1863
1863
|
K.__DEV__ = n;
|
|
1864
|
-
function i(
|
|
1865
|
-
const c = new Set(
|
|
1864
|
+
function i(u) {
|
|
1865
|
+
const c = new Set(u).values();
|
|
1866
1866
|
return Array.from(c);
|
|
1867
1867
|
}
|
|
1868
1868
|
K.removeDuplicates = i;
|
|
1869
|
-
function o(
|
|
1870
|
-
e.default.send(
|
|
1869
|
+
function o(u, h, c) {
|
|
1870
|
+
e.default.send(u, h, c ? "all" : "current");
|
|
1871
1871
|
}
|
|
1872
1872
|
K.sendWithHermes = o;
|
|
1873
|
-
function s(
|
|
1874
|
-
const h = (0, t.useRef)(
|
|
1875
|
-
h.current !==
|
|
1873
|
+
function s(u) {
|
|
1874
|
+
const h = (0, t.useRef)(u);
|
|
1875
|
+
h.current !== u && (h.current = u);
|
|
1876
1876
|
const c = (0, t.useCallback)((...a) => h.current(...a), []);
|
|
1877
|
-
return
|
|
1877
|
+
return u && c;
|
|
1878
1878
|
}
|
|
1879
1879
|
return K.useEvent = s, K;
|
|
1880
1880
|
}
|
|
@@ -1888,16 +1888,16 @@ function Zr() {
|
|
|
1888
1888
|
Object.defineProperty(ge, "__esModule", { value: !0 }), ge.createUseSignalREffect = void 0;
|
|
1889
1889
|
const e = r(se()), t = ie, n = J();
|
|
1890
1890
|
function i(o) {
|
|
1891
|
-
return (
|
|
1891
|
+
return (u, h) => {
|
|
1892
1892
|
const c = (0, n.useEvent)(h);
|
|
1893
1893
|
(0, t.useEffect)(() => {
|
|
1894
1894
|
var a;
|
|
1895
|
-
function
|
|
1895
|
+
function l(d) {
|
|
1896
1896
|
c(...d);
|
|
1897
1897
|
}
|
|
1898
|
-
return (a = o.on) === null || a === void 0 || a.call(o,
|
|
1898
|
+
return (a = o.on) === null || a === void 0 || a.call(o, u), e.default.on(u, l), () => {
|
|
1899
1899
|
var d;
|
|
1900
|
-
(d = o.off) === null || d === void 0 || d.call(o,
|
|
1900
|
+
(d = o.off) === null || d === void 0 || d.call(o, u), e.default.off(u, l);
|
|
1901
1901
|
};
|
|
1902
1902
|
}, []);
|
|
1903
1903
|
};
|
|
@@ -1919,9 +1919,9 @@ function Bt() {
|
|
|
1919
1919
|
})(function() {
|
|
1920
1920
|
function t() {
|
|
1921
1921
|
for (var o = 0, s = {}; o < arguments.length; o++) {
|
|
1922
|
-
var
|
|
1923
|
-
for (var h in
|
|
1924
|
-
s[h] =
|
|
1922
|
+
var u = arguments[o];
|
|
1923
|
+
for (var h in u)
|
|
1924
|
+
s[h] = u[h];
|
|
1925
1925
|
}
|
|
1926
1926
|
return s;
|
|
1927
1927
|
}
|
|
@@ -1931,11 +1931,11 @@ function Bt() {
|
|
|
1931
1931
|
function i(o) {
|
|
1932
1932
|
function s() {
|
|
1933
1933
|
}
|
|
1934
|
-
function
|
|
1934
|
+
function u(c, a, l) {
|
|
1935
1935
|
if (!(typeof document > "u")) {
|
|
1936
|
-
|
|
1936
|
+
l = t({
|
|
1937
1937
|
path: "/"
|
|
1938
|
-
}, s.defaults,
|
|
1938
|
+
}, s.defaults, l), typeof l.expires == "number" && (l.expires = new Date(/* @__PURE__ */ new Date() * 1 + l.expires * 864e5)), l.expires = l.expires ? l.expires.toUTCString() : "";
|
|
1939
1939
|
try {
|
|
1940
1940
|
var d = JSON.stringify(a);
|
|
1941
1941
|
/^[\{\[]/.test(d) && (a = d);
|
|
@@ -1943,14 +1943,14 @@ function Bt() {
|
|
|
1943
1943
|
}
|
|
1944
1944
|
a = o.write ? o.write(a, c) : encodeURIComponent(String(a)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), c = encodeURIComponent(String(c)).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent).replace(/[\(\)]/g, escape);
|
|
1945
1945
|
var v = "";
|
|
1946
|
-
for (var _ in
|
|
1947
|
-
|
|
1946
|
+
for (var _ in l)
|
|
1947
|
+
l[_] && (v += "; " + _, l[_] !== !0 && (v += "=" + l[_].split(";")[0]));
|
|
1948
1948
|
return document.cookie = c + "=" + a + v;
|
|
1949
1949
|
}
|
|
1950
1950
|
}
|
|
1951
1951
|
function h(c, a) {
|
|
1952
1952
|
if (!(typeof document > "u")) {
|
|
1953
|
-
for (var
|
|
1953
|
+
for (var l = {}, d = document.cookie ? document.cookie.split("; ") : [], v = 0; v < d.length; v++) {
|
|
1954
1954
|
var _ = d[v].split("="), g = _.slice(1).join("=");
|
|
1955
1955
|
!a && g.charAt(0) === '"' && (g = g.slice(1, -1));
|
|
1956
1956
|
try {
|
|
@@ -1960,15 +1960,15 @@ function Bt() {
|
|
|
1960
1960
|
g = JSON.parse(g);
|
|
1961
1961
|
} catch {
|
|
1962
1962
|
}
|
|
1963
|
-
if (
|
|
1963
|
+
if (l[f] = g, c === f)
|
|
1964
1964
|
break;
|
|
1965
1965
|
} catch {
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
|
-
return c ?
|
|
1968
|
+
return c ? l[c] : l;
|
|
1969
1969
|
}
|
|
1970
1970
|
}
|
|
1971
|
-
return s.set =
|
|
1971
|
+
return s.set = u, s.get = function(c) {
|
|
1972
1972
|
return h(
|
|
1973
1973
|
c,
|
|
1974
1974
|
!1
|
|
@@ -1981,7 +1981,7 @@ function Bt() {
|
|
|
1981
1981
|
/* read as json */
|
|
1982
1982
|
);
|
|
1983
1983
|
}, s.remove = function(c, a) {
|
|
1984
|
-
|
|
1984
|
+
u(c, "", t(a, {
|
|
1985
1985
|
expires: -1
|
|
1986
1986
|
}));
|
|
1987
1987
|
}, s.defaults = {}, s.withConverter = i, s;
|
|
@@ -2014,7 +2014,7 @@ function eo() {
|
|
|
2014
2014
|
return a && a.__esModule ? a : { default: a };
|
|
2015
2015
|
};
|
|
2016
2016
|
Object.defineProperty(ve, "__esModule", { value: !0 }), ve.providerFactory = void 0;
|
|
2017
|
-
const e = r(se()), t = ie, n = r(Bt()), i = nr(), o = J(), s = "IS_SIGNAL_R_CONNECTED",
|
|
2017
|
+
const e = r(se()), t = ie, n = r(Bt()), i = nr(), o = J(), s = "IS_SIGNAL_R_CONNECTED", u = "KEY_LAST_CONNECTION_TIME";
|
|
2018
2018
|
function h(a) {
|
|
2019
2019
|
return ({ url: d, connectEnabled: v = !0, automaticReconnect: _ = !0, children: g, dependencies: f = [], accessTokenFactory: p, onError: m, onOpen: b, onReconnect: w, onClosed: C, onBeforeClose: E, logger: P, ...F }) => {
|
|
2020
2020
|
const I = (0, o.useEvent)(m), k = (0, o.useEvent)(p), O = (0, t.useRef)(() => {
|
|
@@ -2031,7 +2031,7 @@ function eo() {
|
|
|
2031
2031
|
T.onreconnecting((V) => I?.(V)), T.onreconnected(() => w?.(T)), a.connection = T, a.reOn(), T.onclose((V) => {
|
|
2032
2032
|
C?.(V);
|
|
2033
2033
|
});
|
|
2034
|
-
let N = Number(n.default.get(
|
|
2034
|
+
let N = Number(n.default.get(u)) || null, $ = null;
|
|
2035
2035
|
e.default.on(s, (V) => {
|
|
2036
2036
|
if (!V) {
|
|
2037
2037
|
N = null, $ = null, gt();
|
|
@@ -2077,13 +2077,13 @@ function eo() {
|
|
|
2077
2077
|
ve.providerFactory = h;
|
|
2078
2078
|
function c(a) {
|
|
2079
2079
|
if (!a) {
|
|
2080
|
-
e.default.send(s, ""), n.default.set(
|
|
2080
|
+
e.default.send(s, ""), n.default.set(u, "");
|
|
2081
2081
|
return;
|
|
2082
2082
|
}
|
|
2083
2083
|
e.default.send(s, a);
|
|
2084
|
-
const
|
|
2085
|
-
|
|
2086
|
-
expires:
|
|
2084
|
+
const l = /* @__PURE__ */ new Date();
|
|
2085
|
+
l.setSeconds(l.getSeconds() + 10), n.default.set(u, Date.now().toString(), {
|
|
2086
|
+
expires: l,
|
|
2087
2087
|
path: "/"
|
|
2088
2088
|
});
|
|
2089
2089
|
}
|
|
@@ -2114,15 +2114,15 @@ function ro(r, e, t) {
|
|
|
2114
2114
|
r = r || {};
|
|
2115
2115
|
var o = r.node || Zt, s = r.clockseq !== void 0 ? r.clockseq : wt;
|
|
2116
2116
|
if (o == null || s == null) {
|
|
2117
|
-
var
|
|
2118
|
-
o == null && (o = Zt = [
|
|
2117
|
+
var u = r.random || (r.rng || rr)();
|
|
2118
|
+
o == null && (o = Zt = [u[0] | 1, u[1], u[2], u[3], u[4], u[5]]), s == null && (s = wt = (u[6] << 8 | u[7]) & 16383);
|
|
2119
2119
|
}
|
|
2120
2120
|
var h = r.msecs !== void 0 ? r.msecs : Date.now(), c = r.nsecs !== void 0 ? r.nsecs : St + 1, a = h - Ct + (c - St) / 1e4;
|
|
2121
2121
|
if (a < 0 && r.clockseq === void 0 && (s = s + 1 & 16383), (a < 0 || h > Ct) && r.nsecs === void 0 && (c = 0), c >= 1e4)
|
|
2122
2122
|
throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
|
|
2123
2123
|
Ct = h, St = c, wt = s, h += 122192928e5;
|
|
2124
|
-
var
|
|
2125
|
-
i[n++] =
|
|
2124
|
+
var l = ((h & 268435455) * 1e4 + c) % 4294967296;
|
|
2125
|
+
i[n++] = l >>> 24 & 255, i[n++] = l >>> 16 & 255, i[n++] = l >>> 8 & 255, i[n++] = l & 255;
|
|
2126
2126
|
var d = h / 4294967296 * 1e4 & 268435455;
|
|
2127
2127
|
i[n++] = d >>> 8 & 255, i[n++] = d & 255, i[n++] = d >>> 24 & 15 | 16, i[n++] = d >>> 16 & 255, i[n++] = s >>> 8 | 128, i[n++] = s & 255;
|
|
2128
2128
|
for (var v = 0; v < 6; ++v)
|
|
@@ -2143,14 +2143,14 @@ function oo(r) {
|
|
|
2143
2143
|
}
|
|
2144
2144
|
var io = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", so = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
2145
2145
|
function ir(r, e, t) {
|
|
2146
|
-
function n(i, o, s,
|
|
2146
|
+
function n(i, o, s, u) {
|
|
2147
2147
|
if (typeof i == "string" && (i = oo(i)), typeof o == "string" && (o = or(o)), o.length !== 16)
|
|
2148
2148
|
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
2149
2149
|
var h = new Uint8Array(16 + i.length);
|
|
2150
2150
|
if (h.set(o), h.set(i, o.length), h = t(h), h[6] = h[6] & 15 | e, h[8] = h[8] & 63 | 128, s) {
|
|
2151
|
-
|
|
2151
|
+
u = u || 0;
|
|
2152
2152
|
for (var c = 0; c < 16; ++c)
|
|
2153
|
-
s[
|
|
2153
|
+
s[u + c] = h[c];
|
|
2154
2154
|
return s;
|
|
2155
2155
|
}
|
|
2156
2156
|
return dt(h);
|
|
@@ -2168,7 +2168,7 @@ function co(r) {
|
|
|
2168
2168
|
for (var t = 0; t < e.length; ++t)
|
|
2169
2169
|
r[t] = e.charCodeAt(t);
|
|
2170
2170
|
}
|
|
2171
|
-
return ao(lo(
|
|
2171
|
+
return ao(uo(lo(r), r.length * 8));
|
|
2172
2172
|
}
|
|
2173
2173
|
function ao(r) {
|
|
2174
2174
|
for (var e = [], t = r.length * 32, n = "0123456789abcdef", i = 0; i < t; i += 8) {
|
|
@@ -2180,15 +2180,15 @@ function ao(r) {
|
|
|
2180
2180
|
function sr(r) {
|
|
2181
2181
|
return (r + 64 >>> 9 << 4) + 14 + 1;
|
|
2182
2182
|
}
|
|
2183
|
-
function
|
|
2183
|
+
function uo(r, e) {
|
|
2184
2184
|
r[e >> 5] |= 128 << e % 32, r[sr(e) - 1] = e;
|
|
2185
2185
|
for (var t = 1732584193, n = -271733879, i = -1732584194, o = 271733878, s = 0; s < r.length; s += 16) {
|
|
2186
|
-
var
|
|
2187
|
-
t = q(t, n, i, o, r[s], 7, -680876936), o = q(o, t, n, i, r[s + 1], 12, -389564586), i = q(i, o, t, n, r[s + 2], 17, 606105819), n = q(n, i, o, t, r[s + 3], 22, -1044525330), t = q(t, n, i, o, r[s + 4], 7, -176418897), o = q(o, t, n, i, r[s + 5], 12, 1200080426), i = q(i, o, t, n, r[s + 6], 17, -1473231341), n = q(n, i, o, t, r[s + 7], 22, -45705983), t = q(t, n, i, o, r[s + 8], 7, 1770035416), o = q(o, t, n, i, r[s + 9], 12, -1958414417), i = q(i, o, t, n, r[s + 10], 17, -42063), n = q(n, i, o, t, r[s + 11], 22, -1990404162), t = q(t, n, i, o, r[s + 12], 7, 1804603682), o = q(o, t, n, i, r[s + 13], 12, -40341101), i = q(i, o, t, n, r[s + 14], 17, -1502002290), n = q(n, i, o, t, r[s + 15], 22, 1236535329), t = x(t, n, i, o, r[s + 1], 5, -165796510), o = x(o, t, n, i, r[s + 6], 9, -1069501632), i = x(i, o, t, n, r[s + 11], 14, 643717713), n = x(n, i, o, t, r[s], 20, -373897302), t = x(t, n, i, o, r[s + 5], 5, -701558691), o = x(o, t, n, i, r[s + 10], 9, 38016083), i = x(i, o, t, n, r[s + 15], 14, -660478335), n = x(n, i, o, t, r[s + 4], 20, -405537848), t = x(t, n, i, o, r[s + 9], 5, 568446438), o = x(o, t, n, i, r[s + 14], 9, -1019803690), i = x(i, o, t, n, r[s + 3], 14, -187363961), n = x(n, i, o, t, r[s + 8], 20, 1163531501), t = x(t, n, i, o, r[s + 13], 5, -1444681467), o = x(o, t, n, i, r[s + 2], 9, -51403784), i = x(i, o, t, n, r[s + 7], 14, 1735328473), n = x(n, i, o, t, r[s + 12], 20, -1926607734), t = L(t, n, i, o, r[s + 5], 4, -378558), o = L(o, t, n, i, r[s + 8], 11, -2022574463), i = L(i, o, t, n, r[s + 11], 16, 1839030562), n = L(n, i, o, t, r[s + 14], 23, -35309556), t = L(t, n, i, o, r[s + 1], 4, -1530992060), o = L(o, t, n, i, r[s + 4], 11, 1272893353), i = L(i, o, t, n, r[s + 7], 16, -155497632), n = L(n, i, o, t, r[s + 10], 23, -1094730640), t = L(t, n, i, o, r[s + 13], 4, 681279174), o = L(o, t, n, i, r[s], 11, -358537222), i = L(i, o, t, n, r[s + 3], 16, -722521979), n = L(n, i, o, t, r[s + 6], 23, 76029189), t = L(t, n, i, o, r[s + 9], 4, -640364487), o = L(o, t, n, i, r[s + 12], 11, -421815835), i = L(i, o, t, n, r[s + 15], 16, 530742520), n = L(n, i, o, t, r[s + 2], 23, -995338651), t = U(t, n, i, o, r[s], 6, -198630844), o = U(o, t, n, i, r[s + 7], 10, 1126891415), i = U(i, o, t, n, r[s + 14], 15, -1416354905), n = U(n, i, o, t, r[s + 5], 21, -57434055), t = U(t, n, i, o, r[s + 12], 6, 1700485571), o = U(o, t, n, i, r[s + 3], 10, -1894986606), i = U(i, o, t, n, r[s + 10], 15, -1051523), n = U(n, i, o, t, r[s + 1], 21, -2054922799), t = U(t, n, i, o, r[s + 8], 6, 1873313359), o = U(o, t, n, i, r[s + 15], 10, -30611744), i = U(i, o, t, n, r[s + 6], 15, -1560198380), n = U(n, i, o, t, r[s + 13], 21, 1309151649), t = U(t, n, i, o, r[s + 4], 6, -145523070), o = U(o, t, n, i, r[s + 11], 10, -1120210379), i = U(i, o, t, n, r[s + 2], 15, 718787259), n = U(n, i, o, t, r[s + 9], 21, -343485551), t = he(t,
|
|
2186
|
+
var u = t, h = n, c = i, a = o;
|
|
2187
|
+
t = q(t, n, i, o, r[s], 7, -680876936), o = q(o, t, n, i, r[s + 1], 12, -389564586), i = q(i, o, t, n, r[s + 2], 17, 606105819), n = q(n, i, o, t, r[s + 3], 22, -1044525330), t = q(t, n, i, o, r[s + 4], 7, -176418897), o = q(o, t, n, i, r[s + 5], 12, 1200080426), i = q(i, o, t, n, r[s + 6], 17, -1473231341), n = q(n, i, o, t, r[s + 7], 22, -45705983), t = q(t, n, i, o, r[s + 8], 7, 1770035416), o = q(o, t, n, i, r[s + 9], 12, -1958414417), i = q(i, o, t, n, r[s + 10], 17, -42063), n = q(n, i, o, t, r[s + 11], 22, -1990404162), t = q(t, n, i, o, r[s + 12], 7, 1804603682), o = q(o, t, n, i, r[s + 13], 12, -40341101), i = q(i, o, t, n, r[s + 14], 17, -1502002290), n = q(n, i, o, t, r[s + 15], 22, 1236535329), t = x(t, n, i, o, r[s + 1], 5, -165796510), o = x(o, t, n, i, r[s + 6], 9, -1069501632), i = x(i, o, t, n, r[s + 11], 14, 643717713), n = x(n, i, o, t, r[s], 20, -373897302), t = x(t, n, i, o, r[s + 5], 5, -701558691), o = x(o, t, n, i, r[s + 10], 9, 38016083), i = x(i, o, t, n, r[s + 15], 14, -660478335), n = x(n, i, o, t, r[s + 4], 20, -405537848), t = x(t, n, i, o, r[s + 9], 5, 568446438), o = x(o, t, n, i, r[s + 14], 9, -1019803690), i = x(i, o, t, n, r[s + 3], 14, -187363961), n = x(n, i, o, t, r[s + 8], 20, 1163531501), t = x(t, n, i, o, r[s + 13], 5, -1444681467), o = x(o, t, n, i, r[s + 2], 9, -51403784), i = x(i, o, t, n, r[s + 7], 14, 1735328473), n = x(n, i, o, t, r[s + 12], 20, -1926607734), t = L(t, n, i, o, r[s + 5], 4, -378558), o = L(o, t, n, i, r[s + 8], 11, -2022574463), i = L(i, o, t, n, r[s + 11], 16, 1839030562), n = L(n, i, o, t, r[s + 14], 23, -35309556), t = L(t, n, i, o, r[s + 1], 4, -1530992060), o = L(o, t, n, i, r[s + 4], 11, 1272893353), i = L(i, o, t, n, r[s + 7], 16, -155497632), n = L(n, i, o, t, r[s + 10], 23, -1094730640), t = L(t, n, i, o, r[s + 13], 4, 681279174), o = L(o, t, n, i, r[s], 11, -358537222), i = L(i, o, t, n, r[s + 3], 16, -722521979), n = L(n, i, o, t, r[s + 6], 23, 76029189), t = L(t, n, i, o, r[s + 9], 4, -640364487), o = L(o, t, n, i, r[s + 12], 11, -421815835), i = L(i, o, t, n, r[s + 15], 16, 530742520), n = L(n, i, o, t, r[s + 2], 23, -995338651), t = U(t, n, i, o, r[s], 6, -198630844), o = U(o, t, n, i, r[s + 7], 10, 1126891415), i = U(i, o, t, n, r[s + 14], 15, -1416354905), n = U(n, i, o, t, r[s + 5], 21, -57434055), t = U(t, n, i, o, r[s + 12], 6, 1700485571), o = U(o, t, n, i, r[s + 3], 10, -1894986606), i = U(i, o, t, n, r[s + 10], 15, -1051523), n = U(n, i, o, t, r[s + 1], 21, -2054922799), t = U(t, n, i, o, r[s + 8], 6, 1873313359), o = U(o, t, n, i, r[s + 15], 10, -30611744), i = U(i, o, t, n, r[s + 6], 15, -1560198380), n = U(n, i, o, t, r[s + 13], 21, 1309151649), t = U(t, n, i, o, r[s + 4], 6, -145523070), o = U(o, t, n, i, r[s + 11], 10, -1120210379), i = U(i, o, t, n, r[s + 2], 15, 718787259), n = U(n, i, o, t, r[s + 9], 21, -343485551), t = he(t, u), n = he(n, h), i = he(i, c), o = he(o, a);
|
|
2188
2188
|
}
|
|
2189
2189
|
return [t, n, i, o];
|
|
2190
2190
|
}
|
|
2191
|
-
function
|
|
2191
|
+
function lo(r) {
|
|
2192
2192
|
if (r.length === 0)
|
|
2193
2193
|
return [];
|
|
2194
2194
|
for (var e = r.length * 8, t = new Uint32Array(sr(e)), n = 0; n < e; n += 8)
|
|
@@ -2253,15 +2253,15 @@ function go(r) {
|
|
|
2253
2253
|
r.push(n.charCodeAt(i));
|
|
2254
2254
|
} else Array.isArray(r) || (r = Array.prototype.slice.call(r));
|
|
2255
2255
|
r.push(128);
|
|
2256
|
-
for (var o = r.length / 4 + 2, s = Math.ceil(o / 16),
|
|
2256
|
+
for (var o = r.length / 4 + 2, s = Math.ceil(o / 16), u = new Array(s), h = 0; h < s; ++h) {
|
|
2257
2257
|
for (var c = new Uint32Array(16), a = 0; a < 16; ++a)
|
|
2258
2258
|
c[a] = r[h * 64 + a * 4] << 24 | r[h * 64 + a * 4 + 1] << 16 | r[h * 64 + a * 4 + 2] << 8 | r[h * 64 + a * 4 + 3];
|
|
2259
|
-
|
|
2259
|
+
u[h] = c;
|
|
2260
2260
|
}
|
|
2261
|
-
|
|
2262
|
-
for (var
|
|
2261
|
+
u[s - 1][14] = (r.length - 1) * 8 / Math.pow(2, 32), u[s - 1][14] = Math.floor(u[s - 1][14]), u[s - 1][15] = (r.length - 1) * 8 & 4294967295;
|
|
2262
|
+
for (var l = 0; l < s; ++l) {
|
|
2263
2263
|
for (var d = new Uint32Array(80), v = 0; v < 16; ++v)
|
|
2264
|
-
d[v] = l
|
|
2264
|
+
d[v] = u[l][v];
|
|
2265
2265
|
for (var _ = 16; _ < 80; ++_)
|
|
2266
2266
|
d[_] = kt(d[_ - 3] ^ d[_ - 8] ^ d[_ - 14] ^ d[_ - 16], 1);
|
|
2267
2267
|
for (var g = t[0], f = t[1], p = t[2], m = t[3], b = t[4], w = 0; w < 80; ++w) {
|
|
@@ -2297,11 +2297,11 @@ function Co() {
|
|
|
2297
2297
|
en = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.providerNativeFactory = void 0;
|
|
2298
2298
|
const r = ie, e = J(), t = nr();
|
|
2299
2299
|
function n(i) {
|
|
2300
|
-
return ({ url: s, connectEnabled:
|
|
2301
|
-
const m = (0, e.useEvent)(d), b = (0, e.useEvent)(
|
|
2300
|
+
return ({ url: s, connectEnabled: u = !0, automaticReconnect: h = !0, children: c, dependencies: a = [], accessTokenFactory: l, onError: d, onOpen: v, onClosed: _, onReconnect: g, onBeforeClose: f, ...p }) => {
|
|
2301
|
+
const m = (0, e.useEvent)(d), b = (0, e.useEvent)(l), w = (0, r.useRef)(() => {
|
|
2302
2302
|
});
|
|
2303
2303
|
function C() {
|
|
2304
|
-
if (!
|
|
2304
|
+
if (!u)
|
|
2305
2305
|
return;
|
|
2306
2306
|
const P = (0, t.createConnection)(s, {
|
|
2307
2307
|
accessTokenFactory: () => b?.() || "",
|
|
@@ -2330,7 +2330,7 @@ function Co() {
|
|
|
2330
2330
|
const E = (0, r.useRef)(!1);
|
|
2331
2331
|
return (0, r.useEffect)(() => (E.current && C(), E.current = !0, () => {
|
|
2332
2332
|
w.current();
|
|
2333
|
-
}), [
|
|
2333
|
+
}), [u, s, ...a]), c;
|
|
2334
2334
|
};
|
|
2335
2335
|
}
|
|
2336
2336
|
return He.providerNativeFactory = n, He;
|
|
@@ -2343,9 +2343,9 @@ function So() {
|
|
|
2343
2343
|
return a && a.__esModule ? a : { default: a };
|
|
2344
2344
|
};
|
|
2345
2345
|
Object.defineProperty(_e, "__esModule", { value: !0 }), _e.createSignalRContext = void 0;
|
|
2346
|
-
const e = tr, t = r(se()), n = J(), i = Zr(), o = eo(), s = wo,
|
|
2346
|
+
const e = tr, t = r(se()), n = J(), i = Zr(), o = eo(), s = wo, u = Co(), h = "SIGNAL_R_INVOKE";
|
|
2347
2347
|
function c(a) {
|
|
2348
|
-
const
|
|
2348
|
+
const l = [], d = {
|
|
2349
2349
|
connection: null,
|
|
2350
2350
|
useSignalREffect: null,
|
|
2351
2351
|
shareConnectionBetweenTab: a?.shareConnectionBetweenTab || !1,
|
|
@@ -2363,17 +2363,17 @@ function So() {
|
|
|
2363
2363
|
Provider: null,
|
|
2364
2364
|
on: (_) => {
|
|
2365
2365
|
var g;
|
|
2366
|
-
|
|
2366
|
+
l.includes(_) || (g = d.connection) === null || g === void 0 || g.on(_, (...f) => {
|
|
2367
2367
|
(0, n.sendWithHermes)(_, f, d.shareConnectionBetweenTab);
|
|
2368
|
-
}),
|
|
2368
|
+
}), l.push(_);
|
|
2369
2369
|
},
|
|
2370
2370
|
off: (_) => {
|
|
2371
2371
|
var g;
|
|
2372
|
-
|
|
2372
|
+
l.includes(_) && l.splice(l.indexOf(_), 1), l.includes(_) || (g = d.connection) === null || g === void 0 || g.off(_);
|
|
2373
2373
|
},
|
|
2374
2374
|
//@ts-ignore
|
|
2375
2375
|
reOn: () => {
|
|
2376
|
-
(0, n.removeDuplicates)(
|
|
2376
|
+
(0, n.removeDuplicates)(l).forEach((g) => {
|
|
2377
2377
|
var f;
|
|
2378
2378
|
(f = d.connection) === null || f === void 0 || f.on(g, (...p) => {
|
|
2379
2379
|
(0, n.sendWithHermes)(g, p, d.shareConnectionBetweenTab);
|
|
@@ -2381,7 +2381,7 @@ function So() {
|
|
|
2381
2381
|
});
|
|
2382
2382
|
}
|
|
2383
2383
|
};
|
|
2384
|
-
d.Provider = d.shareConnectionBetweenTab ? (0, o.providerFactory)(d) : (0,
|
|
2384
|
+
d.Provider = d.shareConnectionBetweenTab ? (0, o.providerFactory)(d) : (0, u.providerNativeFactory)(d);
|
|
2385
2385
|
async function v(_) {
|
|
2386
2386
|
var g;
|
|
2387
2387
|
const f = await ((g = d.connection) === null || g === void 0 ? void 0 : g.invoke(_.methodName, ..._.args));
|
|
@@ -2399,10 +2399,10 @@ function ko() {
|
|
|
2399
2399
|
return nn || (nn = 1, (function(r) {
|
|
2400
2400
|
var e = pe && pe.__createBinding || (Object.create ? (function(n, i, o, s) {
|
|
2401
2401
|
s === void 0 && (s = o);
|
|
2402
|
-
var
|
|
2403
|
-
(!
|
|
2402
|
+
var u = Object.getOwnPropertyDescriptor(i, o);
|
|
2403
|
+
(!u || ("get" in u ? !i.__esModule : u.writable || u.configurable)) && (u = { enumerable: !0, get: function() {
|
|
2404
2404
|
return i[o];
|
|
2405
|
-
} }), Object.defineProperty(n, s,
|
|
2405
|
+
} }), Object.defineProperty(n, s, u);
|
|
2406
2406
|
}) : (function(n, i, o, s) {
|
|
2407
2407
|
s === void 0 && (s = o), n[s] = i[o];
|
|
2408
2408
|
})), t = pe && pe.__exportStar || function(n, i) {
|
|
@@ -2421,16 +2421,16 @@ function Eo() {
|
|
|
2421
2421
|
Object.defineProperty(we, "__esModule", { value: !0 }), we.createUseSocketEffect = void 0;
|
|
2422
2422
|
const e = r(se()), t = ie, n = J();
|
|
2423
2423
|
function i(o) {
|
|
2424
|
-
return (
|
|
2424
|
+
return (u, h) => {
|
|
2425
2425
|
const c = (0, n.useEvent)(h);
|
|
2426
2426
|
(0, t.useEffect)(() => {
|
|
2427
2427
|
var a;
|
|
2428
|
-
function
|
|
2428
|
+
function l(d) {
|
|
2429
2429
|
c(...Array.isArray(d) ? d : [d]);
|
|
2430
2430
|
}
|
|
2431
|
-
return (a = o.on) === null || a === void 0 || a.call(o,
|
|
2431
|
+
return (a = o.on) === null || a === void 0 || a.call(o, u), e.default.on(u, l), () => {
|
|
2432
2432
|
var d;
|
|
2433
|
-
(d = o.off) === null || d === void 0 || d.call(o,
|
|
2433
|
+
(d = o.off) === null || d === void 0 || d.call(o, u), e.default.off(u, l);
|
|
2434
2434
|
};
|
|
2435
2435
|
}, []);
|
|
2436
2436
|
};
|
|
@@ -2454,26 +2454,26 @@ var sn;
|
|
|
2454
2454
|
function To() {
|
|
2455
2455
|
if (sn) return je;
|
|
2456
2456
|
sn = 1, Object.defineProperty(je, "__esModule", { value: !0 }), je.encodePacket = void 0, je.encodePacketToBinary = h;
|
|
2457
|
-
const r = Mt(), e = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", t = typeof ArrayBuffer == "function", n = (c) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(c) : c && c.buffer instanceof ArrayBuffer, i = ({ type: c, data: a },
|
|
2457
|
+
const r = Mt(), e = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", t = typeof ArrayBuffer == "function", n = (c) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(c) : c && c.buffer instanceof ArrayBuffer, i = ({ type: c, data: a }, l, d) => e && a instanceof Blob ? l ? d(a) : o(a, d) : t && (a instanceof ArrayBuffer || n(a)) ? l ? d(a) : o(new Blob([a]), d) : d(r.PACKET_TYPES[c] + (a || ""));
|
|
2458
2458
|
je.encodePacket = i;
|
|
2459
2459
|
const o = (c, a) => {
|
|
2460
|
-
const
|
|
2461
|
-
return
|
|
2462
|
-
const d =
|
|
2460
|
+
const l = new FileReader();
|
|
2461
|
+
return l.onload = function() {
|
|
2462
|
+
const d = l.result.split(",")[1];
|
|
2463
2463
|
a("b" + (d || ""));
|
|
2464
|
-
},
|
|
2464
|
+
}, l.readAsDataURL(c);
|
|
2465
2465
|
};
|
|
2466
2466
|
function s(c) {
|
|
2467
2467
|
return c instanceof Uint8Array ? c : c instanceof ArrayBuffer ? new Uint8Array(c) : new Uint8Array(c.buffer, c.byteOffset, c.byteLength);
|
|
2468
2468
|
}
|
|
2469
|
-
let
|
|
2469
|
+
let u;
|
|
2470
2470
|
function h(c, a) {
|
|
2471
2471
|
if (e && c.data instanceof Blob)
|
|
2472
2472
|
return c.data.arrayBuffer().then(s).then(a);
|
|
2473
2473
|
if (t && (c.data instanceof ArrayBuffer || n(c.data)))
|
|
2474
2474
|
return a(s(c.data));
|
|
2475
|
-
i(c, !1, (
|
|
2476
|
-
|
|
2475
|
+
i(c, !1, (l) => {
|
|
2476
|
+
u || (u = new TextEncoder()), a(u.encode(l));
|
|
2477
2477
|
});
|
|
2478
2478
|
}
|
|
2479
2479
|
return je;
|
|
@@ -2486,18 +2486,18 @@ function Po() {
|
|
|
2486
2486
|
for (let i = 0; i < r.length; i++)
|
|
2487
2487
|
e[r.charCodeAt(i)] = i;
|
|
2488
2488
|
const t = (i) => {
|
|
2489
|
-
let o = new Uint8Array(i), s,
|
|
2490
|
-
for (s = 0; s <
|
|
2489
|
+
let o = new Uint8Array(i), s, u = o.length, h = "";
|
|
2490
|
+
for (s = 0; s < u; s += 3)
|
|
2491
2491
|
h += r[o[s] >> 2], h += r[(o[s] & 3) << 4 | o[s + 1] >> 4], h += r[(o[s + 1] & 15) << 2 | o[s + 2] >> 6], h += r[o[s + 2] & 63];
|
|
2492
|
-
return
|
|
2492
|
+
return u % 3 === 2 ? h = h.substring(0, h.length - 1) + "=" : u % 3 === 1 && (h = h.substring(0, h.length - 2) + "=="), h;
|
|
2493
2493
|
};
|
|
2494
2494
|
Ee.encode = t;
|
|
2495
2495
|
const n = (i) => {
|
|
2496
|
-
let o = i.length * 0.75, s = i.length,
|
|
2496
|
+
let o = i.length * 0.75, s = i.length, u, h = 0, c, a, l, d;
|
|
2497
2497
|
i[i.length - 1] === "=" && (o--, i[i.length - 2] === "=" && o--);
|
|
2498
2498
|
const v = new ArrayBuffer(o), _ = new Uint8Array(v);
|
|
2499
|
-
for (
|
|
2500
|
-
c = e[i.charCodeAt(
|
|
2499
|
+
for (u = 0; u < s; u += 4)
|
|
2500
|
+
c = e[i.charCodeAt(u)], a = e[i.charCodeAt(u + 1)], l = e[i.charCodeAt(u + 2)], d = e[i.charCodeAt(u + 3)], _[h++] = c << 2 | a >> 4, _[h++] = (a & 15) << 4 | l >> 2, _[h++] = (l & 3) << 6 | d & 63;
|
|
2501
2501
|
return v;
|
|
2502
2502
|
};
|
|
2503
2503
|
return Ee.decode = n, Ee;
|
|
@@ -2506,16 +2506,16 @@ var an;
|
|
|
2506
2506
|
function Ro() {
|
|
2507
2507
|
if (an) return $e;
|
|
2508
2508
|
an = 1, Object.defineProperty($e, "__esModule", { value: !0 }), $e.decodePacket = void 0;
|
|
2509
|
-
const r = Mt(), e = Po(), t = typeof ArrayBuffer == "function", n = (s,
|
|
2509
|
+
const r = Mt(), e = Po(), t = typeof ArrayBuffer == "function", n = (s, u) => {
|
|
2510
2510
|
if (typeof s != "string")
|
|
2511
2511
|
return {
|
|
2512
2512
|
type: "message",
|
|
2513
|
-
data: o(s,
|
|
2513
|
+
data: o(s, u)
|
|
2514
2514
|
};
|
|
2515
2515
|
const h = s.charAt(0);
|
|
2516
2516
|
return h === "b" ? {
|
|
2517
2517
|
type: "message",
|
|
2518
|
-
data: i(s.substring(1),
|
|
2518
|
+
data: i(s.substring(1), u)
|
|
2519
2519
|
} : r.PACKET_TYPES_REVERSE[h] ? s.length > 1 ? {
|
|
2520
2520
|
type: r.PACKET_TYPES_REVERSE[h],
|
|
2521
2521
|
data: s.substring(1)
|
|
@@ -2524,19 +2524,19 @@ function Ro() {
|
|
|
2524
2524
|
} : r.ERROR_PACKET;
|
|
2525
2525
|
};
|
|
2526
2526
|
$e.decodePacket = n;
|
|
2527
|
-
const i = (s,
|
|
2527
|
+
const i = (s, u) => {
|
|
2528
2528
|
if (t) {
|
|
2529
2529
|
const h = (0, e.decode)(s);
|
|
2530
|
-
return o(h,
|
|
2530
|
+
return o(h, u);
|
|
2531
2531
|
} else
|
|
2532
2532
|
return { base64: !0, data: s };
|
|
2533
|
-
}, o = (s,
|
|
2533
|
+
}, o = (s, u) => u === "blob" ? s instanceof Blob ? s : new Blob([s]) : s instanceof ArrayBuffer ? s : s.buffer;
|
|
2534
2534
|
return $e;
|
|
2535
2535
|
}
|
|
2536
|
-
var
|
|
2536
|
+
var un;
|
|
2537
2537
|
function tt() {
|
|
2538
|
-
return
|
|
2539
|
-
Object.defineProperty(r, "__esModule", { value: !0 }), r.decodePayload = r.decodePacket = r.encodePayload = r.encodePacket = r.protocol = void 0, r.createPacketEncoderStream =
|
|
2538
|
+
return un || (un = 1, (function(r) {
|
|
2539
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.decodePayload = r.decodePacket = r.encodePayload = r.encodePacket = r.protocol = void 0, r.createPacketEncoderStream = u, r.createPacketDecoderStream = l;
|
|
2540
2540
|
const e = To();
|
|
2541
2541
|
Object.defineProperty(r, "encodePacket", { enumerable: !0, get: function() {
|
|
2542
2542
|
return e.encodePacket;
|
|
@@ -2565,7 +2565,7 @@ function tt() {
|
|
|
2565
2565
|
return g;
|
|
2566
2566
|
};
|
|
2567
2567
|
r.decodePayload = s;
|
|
2568
|
-
function
|
|
2568
|
+
function u() {
|
|
2569
2569
|
return new TransformStream({
|
|
2570
2570
|
transform(d, v) {
|
|
2571
2571
|
(0, e.encodePacketToBinary)(d, (_) => {
|
|
@@ -2600,7 +2600,7 @@ function tt() {
|
|
|
2600
2600
|
_[f] = d[0][g++], g === d[0].length && (d.shift(), g = 0);
|
|
2601
2601
|
return d.length && g < d[0].length && (d[0] = d[0].slice(g)), _;
|
|
2602
2602
|
}
|
|
2603
|
-
function
|
|
2603
|
+
function l(d, v) {
|
|
2604
2604
|
h || (h = new TextDecoder());
|
|
2605
2605
|
const _ = [];
|
|
2606
2606
|
let g = 0, f = -1, p = !1;
|
|
@@ -2696,10 +2696,10 @@ const Oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2696
2696
|
__proto__: null,
|
|
2697
2697
|
Emitter: H
|
|
2698
2698
|
}, Symbol.toStringTag, { value: "Module" })), xe = /* @__PURE__ */ At(Oo);
|
|
2699
|
-
var Te = {}, oe = {},
|
|
2699
|
+
var Te = {}, oe = {}, ln;
|
|
2700
2700
|
function Le() {
|
|
2701
|
-
if (
|
|
2702
|
-
|
|
2701
|
+
if (ln) return oe;
|
|
2702
|
+
ln = 1, Object.defineProperty(oe, "__esModule", { value: !0 }), oe.defaultBinaryType = oe.globalThisShim = oe.nextTick = void 0, oe.createCookieJar = r, oe.nextTick = typeof Promise == "function" && typeof Promise.resolve == "function" ? (t) => Promise.resolve().then(t) : (t, n) => n(t, 0), oe.globalThisShim = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")(), oe.defaultBinaryType = "arraybuffer";
|
|
2703
2703
|
function r() {
|
|
2704
2704
|
}
|
|
2705
2705
|
return oe;
|
|
@@ -2710,7 +2710,7 @@ function Ue() {
|
|
|
2710
2710
|
hn = 1, Object.defineProperty(Te, "__esModule", { value: !0 }), Te.pick = e, Te.installTimerFunctions = i, Te.byteLength = s, Te.randomString = h;
|
|
2711
2711
|
const r = Le();
|
|
2712
2712
|
function e(c, ...a) {
|
|
2713
|
-
return a.reduce((
|
|
2713
|
+
return a.reduce((l, d) => (c.hasOwnProperty(d) && (l[d] = c[d]), l), {});
|
|
2714
2714
|
}
|
|
2715
2715
|
const t = r.globalThisShim.setTimeout, n = r.globalThisShim.clearTimeout;
|
|
2716
2716
|
function i(c, a) {
|
|
@@ -2718,13 +2718,13 @@ function Ue() {
|
|
|
2718
2718
|
}
|
|
2719
2719
|
const o = 1.33;
|
|
2720
2720
|
function s(c) {
|
|
2721
|
-
return typeof c == "string" ?
|
|
2721
|
+
return typeof c == "string" ? u(c) : Math.ceil((c.byteLength || c.size) * o);
|
|
2722
2722
|
}
|
|
2723
|
-
function
|
|
2724
|
-
let a = 0,
|
|
2723
|
+
function u(c) {
|
|
2724
|
+
let a = 0, l = 0;
|
|
2725
2725
|
for (let d = 0, v = c.length; d < v; d++)
|
|
2726
|
-
a = c.charCodeAt(d), a < 128 ?
|
|
2727
|
-
return
|
|
2726
|
+
a = c.charCodeAt(d), a < 128 ? l += 1 : a < 2048 ? l += 2 : a < 55296 || a >= 57344 ? l += 3 : (d++, l += 4);
|
|
2727
|
+
return l;
|
|
2728
2728
|
}
|
|
2729
2729
|
function h() {
|
|
2730
2730
|
return Date.now().toString(36).substring(3) + Math.random().toString(36).substring(2, 5);
|
|
@@ -2744,8 +2744,8 @@ function cr() {
|
|
|
2744
2744
|
function e(t) {
|
|
2745
2745
|
let n = {}, i = t.split("&");
|
|
2746
2746
|
for (let o = 0, s = i.length; o < s; o++) {
|
|
2747
|
-
let
|
|
2748
|
-
n[decodeURIComponent(
|
|
2747
|
+
let u = i[o].split("=");
|
|
2748
|
+
n[decodeURIComponent(u[0])] = decodeURIComponent(u[1]);
|
|
2749
2749
|
}
|
|
2750
2750
|
return n;
|
|
2751
2751
|
}
|
|
@@ -2756,24 +2756,24 @@ function Ao() {
|
|
|
2756
2756
|
if (dn) return Pt;
|
|
2757
2757
|
dn = 1;
|
|
2758
2758
|
var r = 1e3, e = r * 60, t = e * 60, n = t * 24, i = n * 7, o = n * 365.25;
|
|
2759
|
-
Pt = function(a,
|
|
2760
|
-
|
|
2759
|
+
Pt = function(a, l) {
|
|
2760
|
+
l = l || {};
|
|
2761
2761
|
var d = typeof a;
|
|
2762
2762
|
if (d === "string" && a.length > 0)
|
|
2763
2763
|
return s(a);
|
|
2764
2764
|
if (d === "number" && isFinite(a))
|
|
2765
|
-
return
|
|
2765
|
+
return l.long ? h(a) : u(a);
|
|
2766
2766
|
throw new Error(
|
|
2767
2767
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(a)
|
|
2768
2768
|
);
|
|
2769
2769
|
};
|
|
2770
2770
|
function s(a) {
|
|
2771
2771
|
if (a = String(a), !(a.length > 100)) {
|
|
2772
|
-
var
|
|
2772
|
+
var l = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
2773
2773
|
a
|
|
2774
2774
|
);
|
|
2775
|
-
if (
|
|
2776
|
-
var d = parseFloat(
|
|
2775
|
+
if (l) {
|
|
2776
|
+
var d = parseFloat(l[1]), v = (l[2] || "ms").toLowerCase();
|
|
2777
2777
|
switch (v) {
|
|
2778
2778
|
case "years":
|
|
2779
2779
|
case "year":
|
|
@@ -2819,16 +2819,16 @@ function Ao() {
|
|
|
2819
2819
|
}
|
|
2820
2820
|
}
|
|
2821
2821
|
}
|
|
2822
|
-
function
|
|
2823
|
-
var
|
|
2824
|
-
return
|
|
2822
|
+
function u(a) {
|
|
2823
|
+
var l = Math.abs(a);
|
|
2824
|
+
return l >= n ? Math.round(a / n) + "d" : l >= t ? Math.round(a / t) + "h" : l >= e ? Math.round(a / e) + "m" : l >= r ? Math.round(a / r) + "s" : a + "ms";
|
|
2825
2825
|
}
|
|
2826
2826
|
function h(a) {
|
|
2827
|
-
var
|
|
2828
|
-
return
|
|
2827
|
+
var l = Math.abs(a);
|
|
2828
|
+
return l >= n ? c(a, l, n, "day") : l >= t ? c(a, l, t, "hour") : l >= e ? c(a, l, e, "minute") : l >= r ? c(a, l, r, "second") : a + " ms";
|
|
2829
2829
|
}
|
|
2830
|
-
function c(a,
|
|
2831
|
-
var _ =
|
|
2830
|
+
function c(a, l, d, v) {
|
|
2831
|
+
var _ = l >= d * 1.5;
|
|
2832
2832
|
return Math.round(a / d) + " " + v + (_ ? "s" : "");
|
|
2833
2833
|
}
|
|
2834
2834
|
return Pt;
|
|
@@ -2838,17 +2838,17 @@ function No() {
|
|
|
2838
2838
|
if (pn) return Rt;
|
|
2839
2839
|
pn = 1;
|
|
2840
2840
|
function r(e) {
|
|
2841
|
-
n.debug = n, n.default = n, n.coerce = c, n.disable =
|
|
2842
|
-
n[
|
|
2841
|
+
n.debug = n, n.default = n, n.coerce = c, n.disable = u, n.enable = o, n.enabled = h, n.humanize = Ao(), n.destroy = a, Object.keys(e).forEach((l) => {
|
|
2842
|
+
n[l] = e[l];
|
|
2843
2843
|
}), n.names = [], n.skips = [], n.formatters = {};
|
|
2844
|
-
function t(
|
|
2844
|
+
function t(l) {
|
|
2845
2845
|
let d = 0;
|
|
2846
|
-
for (let v = 0; v <
|
|
2847
|
-
d = (d << 5) - d +
|
|
2846
|
+
for (let v = 0; v < l.length; v++)
|
|
2847
|
+
d = (d << 5) - d + l.charCodeAt(v), d |= 0;
|
|
2848
2848
|
return n.colors[Math.abs(d) % n.colors.length];
|
|
2849
2849
|
}
|
|
2850
2850
|
n.selectColor = t;
|
|
2851
|
-
function n(
|
|
2851
|
+
function n(l) {
|
|
2852
2852
|
let d, v = null, _, g;
|
|
2853
2853
|
function f(...p) {
|
|
2854
2854
|
if (!f.enabled)
|
|
@@ -2868,29 +2868,29 @@ function No() {
|
|
|
2868
2868
|
return P;
|
|
2869
2869
|
}), n.formatArgs.call(m, p), (m.log || n.log).apply(m, p);
|
|
2870
2870
|
}
|
|
2871
|
-
return f.namespace =
|
|
2871
|
+
return f.namespace = l, f.useColors = n.useColors(), f.color = n.selectColor(l), f.extend = i, f.destroy = n.destroy, Object.defineProperty(f, "enabled", {
|
|
2872
2872
|
enumerable: !0,
|
|
2873
2873
|
configurable: !1,
|
|
2874
|
-
get: () => v !== null ? v : (_ !== n.namespaces && (_ = n.namespaces, g = n.enabled(
|
|
2874
|
+
get: () => v !== null ? v : (_ !== n.namespaces && (_ = n.namespaces, g = n.enabled(l)), g),
|
|
2875
2875
|
set: (p) => {
|
|
2876
2876
|
v = p;
|
|
2877
2877
|
}
|
|
2878
2878
|
}), typeof n.init == "function" && n.init(f), f;
|
|
2879
2879
|
}
|
|
2880
|
-
function i(
|
|
2881
|
-
const v = n(this.namespace + (typeof d > "u" ? ":" : d) +
|
|
2880
|
+
function i(l, d) {
|
|
2881
|
+
const v = n(this.namespace + (typeof d > "u" ? ":" : d) + l);
|
|
2882
2882
|
return v.log = this.log, v;
|
|
2883
2883
|
}
|
|
2884
|
-
function o(
|
|
2885
|
-
n.save(
|
|
2886
|
-
const d = (typeof
|
|
2884
|
+
function o(l) {
|
|
2885
|
+
n.save(l), n.namespaces = l, n.names = [], n.skips = [];
|
|
2886
|
+
const d = (typeof l == "string" ? l : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
2887
2887
|
for (const v of d)
|
|
2888
2888
|
v[0] === "-" ? n.skips.push(v.slice(1)) : n.names.push(v);
|
|
2889
2889
|
}
|
|
2890
|
-
function s(
|
|
2890
|
+
function s(l, d) {
|
|
2891
2891
|
let v = 0, _ = 0, g = -1, f = 0;
|
|
2892
|
-
for (; v <
|
|
2893
|
-
if (_ < d.length && (d[_] ===
|
|
2892
|
+
for (; v < l.length; )
|
|
2893
|
+
if (_ < d.length && (d[_] === l[v] || d[_] === "*"))
|
|
2894
2894
|
d[_] === "*" ? (g = _, f = v, _++) : (v++, _++);
|
|
2895
2895
|
else if (g !== -1)
|
|
2896
2896
|
_ = g + 1, f++, v = f;
|
|
@@ -2900,24 +2900,24 @@ function No() {
|
|
|
2900
2900
|
_++;
|
|
2901
2901
|
return _ === d.length;
|
|
2902
2902
|
}
|
|
2903
|
-
function
|
|
2904
|
-
const
|
|
2903
|
+
function u() {
|
|
2904
|
+
const l = [
|
|
2905
2905
|
...n.names,
|
|
2906
2906
|
...n.skips.map((d) => "-" + d)
|
|
2907
2907
|
].join(",");
|
|
2908
|
-
return n.enable(""),
|
|
2908
|
+
return n.enable(""), l;
|
|
2909
2909
|
}
|
|
2910
|
-
function h(
|
|
2910
|
+
function h(l) {
|
|
2911
2911
|
for (const d of n.skips)
|
|
2912
|
-
if (s(
|
|
2912
|
+
if (s(l, d))
|
|
2913
2913
|
return !1;
|
|
2914
2914
|
for (const d of n.names)
|
|
2915
|
-
if (s(
|
|
2915
|
+
if (s(l, d))
|
|
2916
2916
|
return !0;
|
|
2917
2917
|
return !1;
|
|
2918
2918
|
}
|
|
2919
|
-
function c(
|
|
2920
|
-
return
|
|
2919
|
+
function c(l) {
|
|
2920
|
+
return l instanceof Error ? l.stack || l.message : l;
|
|
2921
2921
|
}
|
|
2922
2922
|
function a() {
|
|
2923
2923
|
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
@@ -3029,10 +3029,10 @@ function te() {
|
|
|
3029
3029
|
return;
|
|
3030
3030
|
const c = "color: " + this.color;
|
|
3031
3031
|
h.splice(1, 0, c, "color: inherit");
|
|
3032
|
-
let a = 0,
|
|
3032
|
+
let a = 0, l = 0;
|
|
3033
3033
|
h[0].replace(/%[a-zA-Z%]/g, (d) => {
|
|
3034
|
-
d !== "%%" && (a++, d === "%c" && (
|
|
3035
|
-
}), h.splice(
|
|
3034
|
+
d !== "%%" && (a++, d === "%c" && (l = a));
|
|
3035
|
+
}), h.splice(l, 0, c);
|
|
3036
3036
|
}
|
|
3037
3037
|
e.log = console.debug || console.log || (() => {
|
|
3038
3038
|
});
|
|
@@ -3057,8 +3057,8 @@ function te() {
|
|
|
3057
3057
|
}
|
|
3058
3058
|
}
|
|
3059
3059
|
r.exports = No()(e);
|
|
3060
|
-
const { formatters:
|
|
3061
|
-
|
|
3060
|
+
const { formatters: u } = r.exports;
|
|
3061
|
+
u.j = function(h) {
|
|
3062
3062
|
try {
|
|
3063
3063
|
return JSON.stringify(h);
|
|
3064
3064
|
} catch (c) {
|
|
@@ -3076,12 +3076,12 @@ function _t() {
|
|
|
3076
3076
|
};
|
|
3077
3077
|
Object.defineProperty(ce, "__esModule", { value: !0 }), ce.Transport = ce.TransportError = void 0;
|
|
3078
3078
|
const e = tt(), t = xe, n = Ue(), i = cr(), s = (0, r(te()).default)("engine.io-client:transport");
|
|
3079
|
-
class
|
|
3080
|
-
constructor(a,
|
|
3081
|
-
super(a), this.description =
|
|
3079
|
+
class u extends Error {
|
|
3080
|
+
constructor(a, l, d) {
|
|
3081
|
+
super(a), this.description = l, this.context = d, this.type = "TransportError";
|
|
3082
3082
|
}
|
|
3083
3083
|
}
|
|
3084
|
-
ce.TransportError =
|
|
3084
|
+
ce.TransportError = u;
|
|
3085
3085
|
class h extends t.Emitter {
|
|
3086
3086
|
/**
|
|
3087
3087
|
* Transport abstract constructor.
|
|
@@ -3101,8 +3101,8 @@ function _t() {
|
|
|
3101
3101
|
* @return {Transport} for chaining
|
|
3102
3102
|
* @protected
|
|
3103
3103
|
*/
|
|
3104
|
-
onError(a,
|
|
3105
|
-
return super.emitReserved("error", new
|
|
3104
|
+
onError(a, l, d) {
|
|
3105
|
+
return super.emitReserved("error", new u(a, l, d)), this;
|
|
3106
3106
|
}
|
|
3107
3107
|
/**
|
|
3108
3108
|
* Opens the transport.
|
|
@@ -3139,8 +3139,8 @@ function _t() {
|
|
|
3139
3139
|
* @protected
|
|
3140
3140
|
*/
|
|
3141
3141
|
onData(a) {
|
|
3142
|
-
const
|
|
3143
|
-
this.onPacket(
|
|
3142
|
+
const l = (0, e.decodePacket)(a, this.socket.binaryType);
|
|
3143
|
+
this.onPacket(l);
|
|
3144
3144
|
}
|
|
3145
3145
|
/**
|
|
3146
3146
|
* Called with a decoded packet.
|
|
@@ -3165,8 +3165,8 @@ function _t() {
|
|
|
3165
3165
|
*/
|
|
3166
3166
|
pause(a) {
|
|
3167
3167
|
}
|
|
3168
|
-
createUri(a,
|
|
3169
|
-
return a + "://" + this._hostname() + this._port() + this.opts.path + this._query(
|
|
3168
|
+
createUri(a, l = {}) {
|
|
3169
|
+
return a + "://" + this._hostname() + this._port() + this.opts.path + this._query(l);
|
|
3170
3170
|
}
|
|
3171
3171
|
_hostname() {
|
|
3172
3172
|
const a = this.opts.hostname;
|
|
@@ -3176,8 +3176,8 @@ function _t() {
|
|
|
3176
3176
|
return this.opts.port && (this.opts.secure && Number(this.opts.port) !== 443 || !this.opts.secure && Number(this.opts.port) !== 80) ? ":" + this.opts.port : "";
|
|
3177
3177
|
}
|
|
3178
3178
|
_query(a) {
|
|
3179
|
-
const
|
|
3180
|
-
return
|
|
3179
|
+
const l = (0, i.encode)(a);
|
|
3180
|
+
return l.length ? "?" + l : "";
|
|
3181
3181
|
}
|
|
3182
3182
|
}
|
|
3183
3183
|
return ce.Transport = h, ce;
|
|
@@ -3186,8 +3186,8 @@ var vn;
|
|
|
3186
3186
|
function ar() {
|
|
3187
3187
|
if (vn) return ke;
|
|
3188
3188
|
vn = 1;
|
|
3189
|
-
var r = ke && ke.__importDefault || function(
|
|
3190
|
-
return
|
|
3189
|
+
var r = ke && ke.__importDefault || function(u) {
|
|
3190
|
+
return u && u.__esModule ? u : { default: u };
|
|
3191
3191
|
};
|
|
3192
3192
|
Object.defineProperty(ke, "__esModule", { value: !0 }), ke.Polling = void 0;
|
|
3193
3193
|
const e = _t(), t = Ue(), n = tt(), o = (0, r(te()).default)("engine.io-client:polling");
|
|
@@ -3305,7 +3305,7 @@ function It() {
|
|
|
3305
3305
|
return g && g.__esModule ? g : { default: g };
|
|
3306
3306
|
};
|
|
3307
3307
|
Object.defineProperty(ee, "__esModule", { value: !0 }), ee.XHR = ee.Request = ee.BaseXHR = void 0;
|
|
3308
|
-
const e = ar(), t = xe, n = Ue(), i = Le(), o = Do(),
|
|
3308
|
+
const e = ar(), t = xe, n = Ue(), i = Le(), o = Do(), u = (0, r(te()).default)("engine.io-client:polling");
|
|
3309
3309
|
function h() {
|
|
3310
3310
|
}
|
|
3311
3311
|
class c extends e.Polling {
|
|
@@ -3344,7 +3344,7 @@ function It() {
|
|
|
3344
3344
|
* @private
|
|
3345
3345
|
*/
|
|
3346
3346
|
doPoll() {
|
|
3347
|
-
|
|
3347
|
+
u("xhr poll");
|
|
3348
3348
|
const f = this.request();
|
|
3349
3349
|
f.on("data", this.onData.bind(this)), f.on("error", (p, m) => {
|
|
3350
3350
|
this.onError("xhr poll error", p, m);
|
|
@@ -3373,7 +3373,7 @@ function It() {
|
|
|
3373
3373
|
p.xdomain = !!this._opts.xd;
|
|
3374
3374
|
const m = this._xhr = this.createRequest(p);
|
|
3375
3375
|
try {
|
|
3376
|
-
|
|
3376
|
+
u("xhr open %s: %s", this._method, this._uri), m.open(this._method, this._uri, !0);
|
|
3377
3377
|
try {
|
|
3378
3378
|
if (this._opts.extraHeaders) {
|
|
3379
3379
|
m.setDisableHeaderCheck && m.setDisableHeaderCheck(!0);
|
|
@@ -3399,7 +3399,7 @@ function It() {
|
|
|
3399
3399
|
)), m.readyState === 4 && (m.status === 200 || m.status === 1223 ? this._onLoad() : this.setTimeoutFn(() => {
|
|
3400
3400
|
this._onError(typeof m.status == "number" ? m.status : 0);
|
|
3401
3401
|
}, 0));
|
|
3402
|
-
},
|
|
3402
|
+
}, u("xhr data %s", this._data), m.send(this._data);
|
|
3403
3403
|
} catch (b) {
|
|
3404
3404
|
this.setTimeoutFn(() => {
|
|
3405
3405
|
this._onError(b);
|
|
@@ -3451,13 +3451,13 @@ function It() {
|
|
|
3451
3451
|
}
|
|
3452
3452
|
if (ee.Request = a, a.requestsCount = 0, a.requests = {}, typeof document < "u") {
|
|
3453
3453
|
if (typeof attachEvent == "function")
|
|
3454
|
-
attachEvent("onunload",
|
|
3454
|
+
attachEvent("onunload", l);
|
|
3455
3455
|
else if (typeof addEventListener == "function") {
|
|
3456
3456
|
const g = "onpagehide" in i.globalThisShim ? "pagehide" : "unload";
|
|
3457
|
-
addEventListener(g,
|
|
3457
|
+
addEventListener(g, l, !1);
|
|
3458
3458
|
}
|
|
3459
3459
|
}
|
|
3460
|
-
function
|
|
3460
|
+
function l() {
|
|
3461
3461
|
for (let g in a.requests)
|
|
3462
3462
|
a.requests.hasOwnProperty(g) && a.requests[g].abort();
|
|
3463
3463
|
}
|
|
@@ -3493,21 +3493,21 @@ function It() {
|
|
|
3493
3493
|
}
|
|
3494
3494
|
return ee;
|
|
3495
3495
|
}
|
|
3496
|
-
var
|
|
3496
|
+
var ue = {}, bn;
|
|
3497
3497
|
function Ot() {
|
|
3498
|
-
if (bn) return
|
|
3498
|
+
if (bn) return ue;
|
|
3499
3499
|
bn = 1;
|
|
3500
|
-
var r =
|
|
3501
|
-
return
|
|
3500
|
+
var r = ue && ue.__importDefault || function(l) {
|
|
3501
|
+
return l && l.__esModule ? l : { default: l };
|
|
3502
3502
|
};
|
|
3503
|
-
Object.defineProperty(
|
|
3504
|
-
const e = _t(), t = Ue(), n = tt(), i = Le(), s = (0, r(te()).default)("engine.io-client:websocket"),
|
|
3503
|
+
Object.defineProperty(ue, "__esModule", { value: !0 }), ue.WS = ue.BaseWS = void 0;
|
|
3504
|
+
const e = _t(), t = Ue(), n = tt(), i = Le(), s = (0, r(te()).default)("engine.io-client:websocket"), u = typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative";
|
|
3505
3505
|
class h extends e.Transport {
|
|
3506
3506
|
get name() {
|
|
3507
3507
|
return "websocket";
|
|
3508
3508
|
}
|
|
3509
3509
|
doOpen() {
|
|
3510
|
-
const d = this.uri(), v = this.opts.protocols, _ =
|
|
3510
|
+
const d = this.uri(), v = this.opts.protocols, _ = u ? {} : (0, t.pick)(this.opts, "agent", "perMessageDeflate", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "localAddress", "protocolVersion", "origin", "maxPayload", "family", "checkServerIdentity");
|
|
3511
3511
|
this.opts.extraHeaders && (_.headers = this.opts.extraHeaders);
|
|
3512
3512
|
try {
|
|
3513
3513
|
this.ws = this.createSocket(d, v, _);
|
|
@@ -3559,24 +3559,24 @@ function Ot() {
|
|
|
3559
3559
|
return this.opts.timestampRequests && (v[this.opts.timestampParam] = (0, t.randomString)()), this.supportsBinary || (v.b64 = 1), this.createUri(d, v);
|
|
3560
3560
|
}
|
|
3561
3561
|
}
|
|
3562
|
-
|
|
3562
|
+
ue.BaseWS = h;
|
|
3563
3563
|
const c = i.globalThisShim.WebSocket || i.globalThisShim.MozWebSocket;
|
|
3564
3564
|
class a extends h {
|
|
3565
3565
|
createSocket(d, v, _) {
|
|
3566
|
-
return
|
|
3566
|
+
return u ? new c(d, v, _) : v ? new c(d, v) : new c(d);
|
|
3567
3567
|
}
|
|
3568
3568
|
doWrite(d, v) {
|
|
3569
3569
|
this.ws.send(v);
|
|
3570
3570
|
}
|
|
3571
3571
|
}
|
|
3572
|
-
return
|
|
3572
|
+
return ue.WS = a, ue;
|
|
3573
3573
|
}
|
|
3574
3574
|
var Pe = {}, wn;
|
|
3575
|
-
function
|
|
3575
|
+
function ur() {
|
|
3576
3576
|
if (wn) return Pe;
|
|
3577
3577
|
wn = 1;
|
|
3578
|
-
var r = Pe && Pe.__importDefault || function(
|
|
3579
|
-
return
|
|
3578
|
+
var r = Pe && Pe.__importDefault || function(u) {
|
|
3579
|
+
return u && u.__esModule ? u : { default: u };
|
|
3580
3580
|
};
|
|
3581
3581
|
Object.defineProperty(Pe, "__esModule", { value: !0 }), Pe.WT = void 0;
|
|
3582
3582
|
const e = _t(), t = Le(), n = tt(), o = (0, r(te()).default)("engine.io-client:webtransport");
|
|
@@ -3596,8 +3596,8 @@ function lr() {
|
|
|
3596
3596
|
o("transport closed due to %s", h), this.onError("webtransport error", h);
|
|
3597
3597
|
}), this._transport.ready.then(() => {
|
|
3598
3598
|
this._transport.createBidirectionalStream().then((h) => {
|
|
3599
|
-
const c = (0, n.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER, this.socket.binaryType), a = h.readable.pipeThrough(c).getReader(),
|
|
3600
|
-
|
|
3599
|
+
const c = (0, n.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER, this.socket.binaryType), a = h.readable.pipeThrough(c).getReader(), l = (0, n.createPacketEncoderStream)();
|
|
3600
|
+
l.readable.pipeTo(h.writable), this._writer = l.writable.getWriter();
|
|
3601
3601
|
const d = () => {
|
|
3602
3602
|
a.read().then(({ done: _, value: g }) => {
|
|
3603
3603
|
if (_) {
|
|
@@ -3618,9 +3618,9 @@ function lr() {
|
|
|
3618
3618
|
write(h) {
|
|
3619
3619
|
this.writable = !1;
|
|
3620
3620
|
for (let c = 0; c < h.length; c++) {
|
|
3621
|
-
const a = h[c],
|
|
3621
|
+
const a = h[c], l = c === h.length - 1;
|
|
3622
3622
|
this._writer.write(a).then(() => {
|
|
3623
|
-
|
|
3623
|
+
l && (0, t.nextTick)(() => {
|
|
3624
3624
|
this.writable = !0, this.emitReserved("drain");
|
|
3625
3625
|
}, this.setTimeoutFn);
|
|
3626
3626
|
});
|
|
@@ -3634,10 +3634,10 @@ function lr() {
|
|
|
3634
3634
|
return Pe.WT = s, Pe;
|
|
3635
3635
|
}
|
|
3636
3636
|
var Cn;
|
|
3637
|
-
function
|
|
3637
|
+
function lr() {
|
|
3638
3638
|
if (Cn) return We;
|
|
3639
3639
|
Cn = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.transports = void 0;
|
|
3640
|
-
const r = It(), e = Ot(), t =
|
|
3640
|
+
const r = It(), e = Ot(), t = ur();
|
|
3641
3641
|
return We.transports = {
|
|
3642
3642
|
websocket: e.WS,
|
|
3643
3643
|
webtransport: t.WT,
|
|
@@ -3667,22 +3667,22 @@ function hr() {
|
|
|
3667
3667
|
function t(o) {
|
|
3668
3668
|
if (o.length > 8e3)
|
|
3669
3669
|
throw "URI too long";
|
|
3670
|
-
const s = o,
|
|
3671
|
-
|
|
3672
|
-
let c = r.exec(o || ""), a = {},
|
|
3673
|
-
for (;
|
|
3674
|
-
a[e[
|
|
3675
|
-
return
|
|
3670
|
+
const s = o, u = o.indexOf("["), h = o.indexOf("]");
|
|
3671
|
+
u != -1 && h != -1 && (o = o.substring(0, u) + o.substring(u, h).replace(/:/g, ";") + o.substring(h, o.length));
|
|
3672
|
+
let c = r.exec(o || ""), a = {}, l = 14;
|
|
3673
|
+
for (; l--; )
|
|
3674
|
+
a[e[l]] = c[l] || "";
|
|
3675
|
+
return u != -1 && h != -1 && (a.source = s, a.host = a.host.substring(1, a.host.length - 1).replace(/;/g, ":"), a.authority = a.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), a.ipv6uri = !0), a.pathNames = n(a, a.path), a.queryKey = i(a, a.query), a;
|
|
3676
3676
|
}
|
|
3677
3677
|
function n(o, s) {
|
|
3678
|
-
const
|
|
3678
|
+
const u = /\/{2,9}/g, h = s.replace(u, "/").split("/");
|
|
3679
3679
|
return (s.slice(0, 1) == "/" || s.length === 0) && h.splice(0, 1), s.slice(-1) == "/" && h.splice(h.length - 1, 1), h;
|
|
3680
3680
|
}
|
|
3681
3681
|
function i(o, s) {
|
|
3682
|
-
const
|
|
3682
|
+
const u = {};
|
|
3683
3683
|
return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function(h, c, a) {
|
|
3684
|
-
c && (
|
|
3685
|
-
}),
|
|
3684
|
+
c && (u[c] = a);
|
|
3685
|
+
}), u;
|
|
3686
3686
|
}
|
|
3687
3687
|
return st;
|
|
3688
3688
|
}
|
|
@@ -3694,9 +3694,9 @@ function En() {
|
|
|
3694
3694
|
return g && g.__esModule ? g : { default: g };
|
|
3695
3695
|
};
|
|
3696
3696
|
Object.defineProperty(Z, "__esModule", { value: !0 }), Z.Socket = Z.SocketWithUpgrade = Z.SocketWithoutUpgrade = void 0;
|
|
3697
|
-
const e =
|
|
3697
|
+
const e = lr(), t = Ue(), n = cr(), i = hr(), o = xe, s = tt(), u = Le(), c = (0, r(te()).default)("engine.io-client:socket"), a = typeof addEventListener == "function" && typeof removeEventListener == "function", l = [];
|
|
3698
3698
|
a && addEventListener("offline", () => {
|
|
3699
|
-
c("closing %d connection(s) because the network was lost",
|
|
3699
|
+
c("closing %d connection(s) because the network was lost", l.length), l.forEach((g) => g());
|
|
3700
3700
|
}, !1);
|
|
3701
3701
|
class d extends o.Emitter {
|
|
3702
3702
|
/**
|
|
@@ -3706,7 +3706,7 @@ function En() {
|
|
|
3706
3706
|
* @param {Object} opts - options
|
|
3707
3707
|
*/
|
|
3708
3708
|
constructor(f, p) {
|
|
3709
|
-
if (super(), this.binaryType =
|
|
3709
|
+
if (super(), this.binaryType = u.defaultBinaryType, this.writeBuffer = [], this._prevBufferLen = 0, this._pingInterval = -1, this._pingTimeout = -1, this._maxPayload = -1, this._pingTimeoutTime = 1 / 0, f && typeof f == "object" && (p = f, f = null), f) {
|
|
3710
3710
|
const m = (0, i.parse)(f);
|
|
3711
3711
|
p.hostname = m.host, p.secure = m.protocol === "https" || m.protocol === "wss", p.port = m.port, m.query && (p.query = m.query);
|
|
3712
3712
|
} else p.host && (p.hostname = (0, i.parse)(p.host).host);
|
|
@@ -3733,7 +3733,7 @@ function En() {
|
|
|
3733
3733
|
this._onClose("transport close", {
|
|
3734
3734
|
description: "network connection lost"
|
|
3735
3735
|
});
|
|
3736
|
-
},
|
|
3736
|
+
}, l.push(this._offlineEventListener))), this.opts.withCredentials && (this._cookieJar = (0, u.createCookieJar)()), this._open();
|
|
3737
3737
|
}
|
|
3738
3738
|
/**
|
|
3739
3739
|
* Creates transport of the given type.
|
|
@@ -3885,7 +3885,7 @@ function En() {
|
|
|
3885
3885
|
if (!this._pingTimeoutTime)
|
|
3886
3886
|
return !0;
|
|
3887
3887
|
const f = Date.now() > this._pingTimeoutTime;
|
|
3888
|
-
return f && (c("throttled timer detected, scheduling connection close"), this._pingTimeoutTime = 0, (0,
|
|
3888
|
+
return f && (c("throttled timer detected, scheduling connection close"), this._pingTimeoutTime = 0, (0, u.nextTick)(() => {
|
|
3889
3889
|
this._onClose("ping timeout");
|
|
3890
3890
|
}, this.setTimeoutFn)), f;
|
|
3891
3891
|
}
|
|
@@ -3964,8 +3964,8 @@ function En() {
|
|
|
3964
3964
|
_onClose(f, p) {
|
|
3965
3965
|
if (this.readyState === "opening" || this.readyState === "open" || this.readyState === "closing") {
|
|
3966
3966
|
if (c('socket close with reason: "%s"', f), this.clearTimeoutFn(this._pingTimeoutTimer), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), a && (this._beforeunloadEventListener && removeEventListener("beforeunload", this._beforeunloadEventListener, !1), this._offlineEventListener)) {
|
|
3967
|
-
const m =
|
|
3968
|
-
m !== -1 && (c("removing listener for the 'offline' event"),
|
|
3967
|
+
const m = l.indexOf(this._offlineEventListener);
|
|
3968
|
+
m !== -1 && (c("removing listener for the 'offline' event"), l.splice(m, 1));
|
|
3969
3969
|
}
|
|
3970
3970
|
this.readyState = "closed", this.id = null, this.emitReserved("close", f, p), this.writeBuffer = [], this._prevBufferLen = 0;
|
|
3971
3971
|
}
|
|
@@ -4089,9 +4089,9 @@ function Bo() {
|
|
|
4089
4089
|
body: o ? n : null,
|
|
4090
4090
|
headers: s,
|
|
4091
4091
|
credentials: this.opts.withCredentials ? "include" : "omit"
|
|
4092
|
-
}).then((
|
|
4092
|
+
}).then((u) => {
|
|
4093
4093
|
var h;
|
|
4094
|
-
return (h = this.socket._cookieJar) === null || h === void 0 || h.parseCookies(
|
|
4094
|
+
return (h = this.socket._cookieJar) === null || h === void 0 || h.parseCookies(u.headers.getSetCookie()), u;
|
|
4095
4095
|
});
|
|
4096
4096
|
}
|
|
4097
4097
|
}
|
|
@@ -4117,7 +4117,7 @@ function jt() {
|
|
|
4117
4117
|
} }), Object.defineProperty(r, "TransportError", { enumerable: !0, get: function() {
|
|
4118
4118
|
return n.TransportError;
|
|
4119
4119
|
} });
|
|
4120
|
-
var i =
|
|
4120
|
+
var i = lr();
|
|
4121
4121
|
Object.defineProperty(r, "transports", { enumerable: !0, get: function() {
|
|
4122
4122
|
return i.transports;
|
|
4123
4123
|
} });
|
|
@@ -4129,9 +4129,9 @@ function jt() {
|
|
|
4129
4129
|
Object.defineProperty(r, "parse", { enumerable: !0, get: function() {
|
|
4130
4130
|
return s.parse;
|
|
4131
4131
|
} });
|
|
4132
|
-
var
|
|
4132
|
+
var u = Le();
|
|
4133
4133
|
Object.defineProperty(r, "nextTick", { enumerable: !0, get: function() {
|
|
4134
|
-
return
|
|
4134
|
+
return u.nextTick;
|
|
4135
4135
|
} });
|
|
4136
4136
|
var h = Bo();
|
|
4137
4137
|
Object.defineProperty(r, "Fetch", { enumerable: !0, get: function() {
|
|
@@ -4145,15 +4145,15 @@ function jt() {
|
|
|
4145
4145
|
Object.defineProperty(r, "XHR", { enumerable: !0, get: function() {
|
|
4146
4146
|
return a.XHR;
|
|
4147
4147
|
} });
|
|
4148
|
-
var
|
|
4148
|
+
var l = Ot();
|
|
4149
4149
|
Object.defineProperty(r, "NodeWebSocket", { enumerable: !0, get: function() {
|
|
4150
|
-
return
|
|
4150
|
+
return l.WS;
|
|
4151
4151
|
} });
|
|
4152
4152
|
var d = Ot();
|
|
4153
4153
|
Object.defineProperty(r, "WebSocket", { enumerable: !0, get: function() {
|
|
4154
4154
|
return d.WS;
|
|
4155
4155
|
} });
|
|
4156
|
-
var v =
|
|
4156
|
+
var v = ur();
|
|
4157
4157
|
Object.defineProperty(r, "WebTransport", { enumerable: !0, get: function() {
|
|
4158
4158
|
return v.WT;
|
|
4159
4159
|
} });
|
|
@@ -4168,11 +4168,11 @@ function Mo() {
|
|
|
4168
4168
|
};
|
|
4169
4169
|
Object.defineProperty(Me, "__esModule", { value: !0 }), Me.url = i;
|
|
4170
4170
|
const e = jt(), n = (0, r(te()).default)("socket.io-client:url");
|
|
4171
|
-
function i(o, s = "",
|
|
4171
|
+
function i(o, s = "", u) {
|
|
4172
4172
|
let h = o;
|
|
4173
|
-
|
|
4173
|
+
u = u || typeof location < "u" && location, o == null && (o = u.protocol + "//" + u.host), typeof o == "string" && (o.charAt(0) === "/" && (o.charAt(1) === "/" ? o = u.protocol + o : o = u.host + o), /^(https?|wss?):\/\//.test(o) || (n("protocol-less url %s", o), typeof u < "u" ? o = u.protocol + "//" + o : o = "https://" + o), n("parse %s", o), h = (0, e.parse)(o)), h.port || (/^(http|ws)$/.test(h.protocol) ? h.port = "80" : /^(http|ws)s$/.test(h.protocol) && (h.port = "443")), h.path = h.path || "/";
|
|
4174
4174
|
const a = h.host.indexOf(":") !== -1 ? "[" + h.host + "]" : h.host;
|
|
4175
|
-
return h.id = h.protocol + "://" + a + ":" + h.port + s, h.href = h.protocol + "://" + a + (
|
|
4175
|
+
return h.id = h.protocol + "://" + a + ":" + h.port + s, h.href = h.protocol + "://" + a + (u && u.port === h.port ? "" : ":" + h.port), h;
|
|
4176
4176
|
}
|
|
4177
4177
|
return Me;
|
|
4178
4178
|
}
|
|
@@ -4180,25 +4180,25 @@ var z = {}, Re = {}, G = {}, Xe = {}, Je = {}, In;
|
|
|
4180
4180
|
function fr() {
|
|
4181
4181
|
if (In) return Je;
|
|
4182
4182
|
In = 1, Object.defineProperty(Je, "__esModule", { value: !0 }), Je.isBinary = o, Je.hasBinary = s;
|
|
4183
|
-
const r = typeof ArrayBuffer == "function", e = (
|
|
4184
|
-
function o(
|
|
4185
|
-
return r && (
|
|
4183
|
+
const r = typeof ArrayBuffer == "function", e = (u) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(u) : u.buffer instanceof ArrayBuffer, t = Object.prototype.toString, n = typeof Blob == "function" || typeof Blob < "u" && t.call(Blob) === "[object BlobConstructor]", i = typeof File == "function" || typeof File < "u" && t.call(File) === "[object FileConstructor]";
|
|
4184
|
+
function o(u) {
|
|
4185
|
+
return r && (u instanceof ArrayBuffer || e(u)) || n && u instanceof Blob || i && u instanceof File;
|
|
4186
4186
|
}
|
|
4187
|
-
function s(
|
|
4188
|
-
if (!
|
|
4187
|
+
function s(u, h) {
|
|
4188
|
+
if (!u || typeof u != "object")
|
|
4189
4189
|
return !1;
|
|
4190
|
-
if (Array.isArray(
|
|
4191
|
-
for (let c = 0, a =
|
|
4192
|
-
if (s(
|
|
4190
|
+
if (Array.isArray(u)) {
|
|
4191
|
+
for (let c = 0, a = u.length; c < a; c++)
|
|
4192
|
+
if (s(u[c]))
|
|
4193
4193
|
return !0;
|
|
4194
4194
|
return !1;
|
|
4195
4195
|
}
|
|
4196
|
-
if (o(
|
|
4196
|
+
if (o(u))
|
|
4197
4197
|
return !0;
|
|
4198
|
-
if (
|
|
4199
|
-
return s(
|
|
4200
|
-
for (const c in
|
|
4201
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
4198
|
+
if (u.toJSON && typeof u.toJSON == "function" && arguments.length === 1)
|
|
4199
|
+
return s(u.toJSON(), !0);
|
|
4200
|
+
for (const c in u)
|
|
4201
|
+
if (Object.prototype.hasOwnProperty.call(u, c) && s(u[c]))
|
|
4202
4202
|
return !0;
|
|
4203
4203
|
return !1;
|
|
4204
4204
|
}
|
|
@@ -4210,25 +4210,25 @@ function jo() {
|
|
|
4210
4210
|
On = 1, Object.defineProperty(Xe, "__esModule", { value: !0 }), Xe.deconstructPacket = e, Xe.reconstructPacket = n;
|
|
4211
4211
|
const r = fr();
|
|
4212
4212
|
function e(o) {
|
|
4213
|
-
const s = [],
|
|
4214
|
-
return h.data = t(
|
|
4213
|
+
const s = [], u = o.data, h = o;
|
|
4214
|
+
return h.data = t(u, s), h.attachments = s.length, { packet: h, buffers: s };
|
|
4215
4215
|
}
|
|
4216
4216
|
function t(o, s) {
|
|
4217
4217
|
if (!o)
|
|
4218
4218
|
return o;
|
|
4219
4219
|
if ((0, r.isBinary)(o)) {
|
|
4220
|
-
const
|
|
4221
|
-
return s.push(o),
|
|
4220
|
+
const u = { _placeholder: !0, num: s.length };
|
|
4221
|
+
return s.push(o), u;
|
|
4222
4222
|
} else if (Array.isArray(o)) {
|
|
4223
|
-
const
|
|
4223
|
+
const u = new Array(o.length);
|
|
4224
4224
|
for (let h = 0; h < o.length; h++)
|
|
4225
|
-
|
|
4226
|
-
return
|
|
4225
|
+
u[h] = t(o[h], s);
|
|
4226
|
+
return u;
|
|
4227
4227
|
} else if (typeof o == "object" && !(o instanceof Date)) {
|
|
4228
|
-
const
|
|
4228
|
+
const u = {};
|
|
4229
4229
|
for (const h in o)
|
|
4230
|
-
Object.prototype.hasOwnProperty.call(o, h) && (
|
|
4231
|
-
return
|
|
4230
|
+
Object.prototype.hasOwnProperty.call(o, h) && (u[h] = t(o[h], s));
|
|
4231
|
+
return u;
|
|
4232
4232
|
}
|
|
4233
4233
|
return o;
|
|
4234
4234
|
}
|
|
@@ -4243,11 +4243,11 @@ function jo() {
|
|
|
4243
4243
|
return s[o.num];
|
|
4244
4244
|
throw new Error("illegal attachments");
|
|
4245
4245
|
} else if (Array.isArray(o))
|
|
4246
|
-
for (let
|
|
4247
|
-
o[
|
|
4246
|
+
for (let u = 0; u < o.length; u++)
|
|
4247
|
+
o[u] = i(o[u], s);
|
|
4248
4248
|
else if (typeof o == "object")
|
|
4249
|
-
for (const
|
|
4250
|
-
Object.prototype.hasOwnProperty.call(o,
|
|
4249
|
+
for (const u in o)
|
|
4250
|
+
Object.prototype.hasOwnProperty.call(o, u) && (o[u] = i(o[u], s));
|
|
4251
4251
|
return o;
|
|
4252
4252
|
}
|
|
4253
4253
|
return Xe;
|
|
@@ -4275,7 +4275,7 @@ function Ft() {
|
|
|
4275
4275
|
(function(f) {
|
|
4276
4276
|
f[f.CONNECT = 0] = "CONNECT", f[f.DISCONNECT = 1] = "DISCONNECT", f[f.EVENT = 2] = "EVENT", f[f.ACK = 3] = "ACK", f[f.CONNECT_ERROR = 4] = "CONNECT_ERROR", f[f.BINARY_EVENT = 5] = "BINARY_EVENT", f[f.BINARY_ACK = 6] = "BINARY_ACK";
|
|
4277
4277
|
})(s || (G.PacketType = s = {}));
|
|
4278
|
-
class
|
|
4278
|
+
class u {
|
|
4279
4279
|
/**
|
|
4280
4280
|
* Encoder constructor
|
|
4281
4281
|
*
|
|
@@ -4315,16 +4315,15 @@ function Ft() {
|
|
|
4315
4315
|
return w.unshift(b), w;
|
|
4316
4316
|
}
|
|
4317
4317
|
}
|
|
4318
|
-
G.Encoder =
|
|
4318
|
+
G.Encoder = u;
|
|
4319
4319
|
class h extends r.Emitter {
|
|
4320
4320
|
/**
|
|
4321
4321
|
* Decoder constructor
|
|
4322
|
+
*
|
|
4323
|
+
* @param {function} reviver - custom reviver to pass down to JSON.stringify
|
|
4322
4324
|
*/
|
|
4323
4325
|
constructor(p) {
|
|
4324
|
-
super(), this.
|
|
4325
|
-
reviver: void 0,
|
|
4326
|
-
maxAttachments: 10
|
|
4327
|
-
}, typeof p == "function" ? { reviver: p } : p);
|
|
4326
|
+
super(), this.reviver = p;
|
|
4328
4327
|
}
|
|
4329
4328
|
/**
|
|
4330
4329
|
* Decodes an encoded packet string into packet JSON.
|
|
@@ -4367,12 +4366,7 @@ function Ft() {
|
|
|
4367
4366
|
const E = p.substring(C, m);
|
|
4368
4367
|
if (E != Number(E) || p.charAt(m) !== "-")
|
|
4369
4368
|
throw new Error("Illegal attachments");
|
|
4370
|
-
|
|
4371
|
-
if (!u(P) || P < 0)
|
|
4372
|
-
throw new Error("Illegal attachments");
|
|
4373
|
-
if (P > this.opts.maxAttachments)
|
|
4374
|
-
throw new Error("too many attachments");
|
|
4375
|
-
b.attachments = P;
|
|
4369
|
+
b.attachments = Number(E);
|
|
4376
4370
|
}
|
|
4377
4371
|
if (p.charAt(m + 1) === "/") {
|
|
4378
4372
|
const C = m + 1;
|
|
@@ -4406,7 +4400,7 @@ function Ft() {
|
|
|
4406
4400
|
}
|
|
4407
4401
|
tryParse(p) {
|
|
4408
4402
|
try {
|
|
4409
|
-
return JSON.parse(p, this.
|
|
4403
|
+
return JSON.parse(p, this.reviver);
|
|
4410
4404
|
} catch {
|
|
4411
4405
|
return !1;
|
|
4412
4406
|
}
|
|
@@ -4464,11 +4458,11 @@ function Ft() {
|
|
|
4464
4458
|
function a(f) {
|
|
4465
4459
|
return typeof f == "string";
|
|
4466
4460
|
}
|
|
4467
|
-
const
|
|
4461
|
+
const l = Number.isInteger || function(f) {
|
|
4468
4462
|
return typeof f == "number" && isFinite(f) && Math.floor(f) === f;
|
|
4469
4463
|
};
|
|
4470
4464
|
function d(f) {
|
|
4471
|
-
return f === void 0 ||
|
|
4465
|
+
return f === void 0 || l(f);
|
|
4472
4466
|
}
|
|
4473
4467
|
function v(f) {
|
|
4474
4468
|
return Object.prototype.toString.call(f) === "[object Object]";
|
|
@@ -4522,12 +4516,12 @@ function pr() {
|
|
|
4522
4516
|
newListener: 1,
|
|
4523
4517
|
removeListener: 1
|
|
4524
4518
|
});
|
|
4525
|
-
class
|
|
4519
|
+
class u extends n.Emitter {
|
|
4526
4520
|
/**
|
|
4527
4521
|
* `Socket` constructor.
|
|
4528
4522
|
*/
|
|
4529
|
-
constructor(c, a,
|
|
4530
|
-
super(), this.connected = !1, this.recovered = !1, this.receiveBuffer = [], this.sendBuffer = [], this._queue = [], this._queueSeq = 0, this.ids = 0, this.acks = {}, this.flags = {}, this.io = c, this.nsp = a,
|
|
4523
|
+
constructor(c, a, l) {
|
|
4524
|
+
super(), this.connected = !1, this.recovered = !1, this.receiveBuffer = [], this.sendBuffer = [], this._queue = [], this._queueSeq = 0, this.ids = 0, this.acks = {}, this.flags = {}, this.io = c, this.nsp = a, l && l.auth && (this.auth = l.auth), this._opts = Object.assign({}, l), this.io._autoConnect && this.open();
|
|
4531
4525
|
}
|
|
4532
4526
|
/**
|
|
4533
4527
|
* Whether the socket is currently disconnected
|
|
@@ -4637,7 +4631,7 @@ function pr() {
|
|
|
4637
4631
|
* @return self
|
|
4638
4632
|
*/
|
|
4639
4633
|
emit(c, ...a) {
|
|
4640
|
-
var
|
|
4634
|
+
var l, d, v;
|
|
4641
4635
|
if (s.hasOwnProperty(c))
|
|
4642
4636
|
throw new Error('"' + c.toString() + '" is a reserved event name');
|
|
4643
4637
|
if (a.unshift(c), this._opts.retries && !this.flags.fromQueue && !this.flags.volatile)
|
|
@@ -4652,15 +4646,15 @@ function pr() {
|
|
|
4652
4646
|
const b = a.pop();
|
|
4653
4647
|
this._registerAckCallback(m, b), _.id = m;
|
|
4654
4648
|
}
|
|
4655
|
-
const g = (d = (
|
|
4649
|
+
const g = (d = (l = this.io.engine) === null || l === void 0 ? void 0 : l.transport) === null || d === void 0 ? void 0 : d.writable, f = this.connected && !(!((v = this.io.engine) === null || v === void 0) && v._hasPingExpired());
|
|
4656
4650
|
return this.flags.volatile && !g ? o("discard packet as the transport is not currently writable") : f ? (this.notifyOutgoingListeners(_), this.packet(_)) : this.sendBuffer.push(_), this.flags = {}, this;
|
|
4657
4651
|
}
|
|
4658
4652
|
/**
|
|
4659
4653
|
* @private
|
|
4660
4654
|
*/
|
|
4661
4655
|
_registerAckCallback(c, a) {
|
|
4662
|
-
var
|
|
4663
|
-
const d = (
|
|
4656
|
+
var l;
|
|
4657
|
+
const d = (l = this.flags.timeout) !== null && l !== void 0 ? l : this._opts.ackTimeout;
|
|
4664
4658
|
if (d === void 0) {
|
|
4665
4659
|
this.acks[c] = a;
|
|
4666
4660
|
return;
|
|
@@ -4692,8 +4686,8 @@ function pr() {
|
|
|
4692
4686
|
* @return a Promise that will be fulfilled when the server acknowledges the event
|
|
4693
4687
|
*/
|
|
4694
4688
|
emitWithAck(c, ...a) {
|
|
4695
|
-
return new Promise((
|
|
4696
|
-
const v = (_, g) => _ ? d(_) :
|
|
4689
|
+
return new Promise((l, d) => {
|
|
4690
|
+
const v = (_, g) => _ ? d(_) : l(g);
|
|
4697
4691
|
v.withError = !0, a.push(v), this.emit(c, ...a);
|
|
4698
4692
|
});
|
|
4699
4693
|
}
|
|
@@ -4705,14 +4699,14 @@ function pr() {
|
|
|
4705
4699
|
_addToQueue(c) {
|
|
4706
4700
|
let a;
|
|
4707
4701
|
typeof c[c.length - 1] == "function" && (a = c.pop());
|
|
4708
|
-
const
|
|
4702
|
+
const l = {
|
|
4709
4703
|
id: this._queueSeq++,
|
|
4710
4704
|
tryCount: 0,
|
|
4711
4705
|
pending: !1,
|
|
4712
4706
|
args: c,
|
|
4713
4707
|
flags: Object.assign({ fromQueue: !0 }, this.flags)
|
|
4714
4708
|
};
|
|
4715
|
-
c.push((d, ...v) =>
|
|
4709
|
+
c.push((d, ...v) => l !== this._queue[0] ? o("packet [%d] already acknowledged", l.id) : (d !== null ? l.tryCount > this._opts.retries && (o("packet [%d] is discarded after %d tries", l.id, l.tryCount), this._queue.shift(), a && a(d)) : (o("packet [%d] was successfully sent", l.id), this._queue.shift(), a && a(null, ...v)), l.pending = !1, this._drainQueue())), this._queue.push(l), this._drainQueue();
|
|
4716
4710
|
}
|
|
4717
4711
|
/**
|
|
4718
4712
|
* Send the first packet of the queue, and wait for an acknowledgement from the server.
|
|
@@ -4788,9 +4782,9 @@ function pr() {
|
|
|
4788
4782
|
*/
|
|
4789
4783
|
_clearAcks() {
|
|
4790
4784
|
Object.keys(this.acks).forEach((c) => {
|
|
4791
|
-
if (!this.sendBuffer.some((
|
|
4792
|
-
const
|
|
4793
|
-
delete this.acks[c],
|
|
4785
|
+
if (!this.sendBuffer.some((l) => String(l.id) === c)) {
|
|
4786
|
+
const l = this.acks[c];
|
|
4787
|
+
delete this.acks[c], l.withError && l.call(this, new Error("socket has been disconnected"));
|
|
4794
4788
|
}
|
|
4795
4789
|
});
|
|
4796
4790
|
}
|
|
@@ -4819,8 +4813,8 @@ function pr() {
|
|
|
4819
4813
|
break;
|
|
4820
4814
|
case e.PacketType.CONNECT_ERROR:
|
|
4821
4815
|
this.destroy();
|
|
4822
|
-
const
|
|
4823
|
-
|
|
4816
|
+
const l = new Error(c.data.message);
|
|
4817
|
+
l.data = c.data.data, this.emitReserved("connect_error", l);
|
|
4824
4818
|
break;
|
|
4825
4819
|
}
|
|
4826
4820
|
}
|
|
@@ -4837,8 +4831,8 @@ function pr() {
|
|
|
4837
4831
|
emitEvent(c) {
|
|
4838
4832
|
if (this._anyListeners && this._anyListeners.length) {
|
|
4839
4833
|
const a = this._anyListeners.slice();
|
|
4840
|
-
for (const
|
|
4841
|
-
|
|
4834
|
+
for (const l of a)
|
|
4835
|
+
l.apply(this, c);
|
|
4842
4836
|
}
|
|
4843
4837
|
super.emit.apply(this, c), this._pid && c.length && typeof c[c.length - 1] == "string" && (this._lastOffset = c[c.length - 1]);
|
|
4844
4838
|
}
|
|
@@ -4849,9 +4843,9 @@ function pr() {
|
|
|
4849
4843
|
*/
|
|
4850
4844
|
ack(c) {
|
|
4851
4845
|
const a = this;
|
|
4852
|
-
let
|
|
4846
|
+
let l = !1;
|
|
4853
4847
|
return function(...d) {
|
|
4854
|
-
|
|
4848
|
+
l || (l = !0, o("sending ack %j", d), a.packet({
|
|
4855
4849
|
type: e.PacketType.ACK,
|
|
4856
4850
|
id: c,
|
|
4857
4851
|
data: d
|
|
@@ -5026,9 +5020,9 @@ function pr() {
|
|
|
5026
5020
|
return this;
|
|
5027
5021
|
if (c) {
|
|
5028
5022
|
const a = this._anyListeners;
|
|
5029
|
-
for (let
|
|
5030
|
-
if (c === a[
|
|
5031
|
-
return a.splice(
|
|
5023
|
+
for (let l = 0; l < a.length; l++)
|
|
5024
|
+
if (c === a[l])
|
|
5025
|
+
return a.splice(l, 1), this;
|
|
5032
5026
|
} else
|
|
5033
5027
|
this._anyListeners = [];
|
|
5034
5028
|
return this;
|
|
@@ -5095,9 +5089,9 @@ function pr() {
|
|
|
5095
5089
|
return this;
|
|
5096
5090
|
if (c) {
|
|
5097
5091
|
const a = this._anyOutgoingListeners;
|
|
5098
|
-
for (let
|
|
5099
|
-
if (c === a[
|
|
5100
|
-
return a.splice(
|
|
5092
|
+
for (let l = 0; l < a.length; l++)
|
|
5093
|
+
if (c === a[l])
|
|
5094
|
+
return a.splice(l, 1), this;
|
|
5101
5095
|
} else
|
|
5102
5096
|
this._anyOutgoingListeners = [];
|
|
5103
5097
|
return this;
|
|
@@ -5119,12 +5113,12 @@ function pr() {
|
|
|
5119
5113
|
notifyOutgoingListeners(c) {
|
|
5120
5114
|
if (this._anyOutgoingListeners && this._anyOutgoingListeners.length) {
|
|
5121
5115
|
const a = this._anyOutgoingListeners.slice();
|
|
5122
|
-
for (const
|
|
5123
|
-
|
|
5116
|
+
for (const l of a)
|
|
5117
|
+
l.apply(this, c.data);
|
|
5124
5118
|
}
|
|
5125
5119
|
}
|
|
5126
5120
|
}
|
|
5127
|
-
return Re.Socket =
|
|
5121
|
+
return Re.Socket = u, Re;
|
|
5128
5122
|
}
|
|
5129
5123
|
var at = {}, Bn;
|
|
5130
5124
|
function Fo() {
|
|
@@ -5175,7 +5169,7 @@ function qo() {
|
|
|
5175
5169
|
return v && v.__esModule ? v : { default: v };
|
|
5176
5170
|
};
|
|
5177
5171
|
Object.defineProperty(z, "__esModule", { value: !0 }), z.Manager = void 0;
|
|
5178
|
-
const i = jt(), o = pr(), s = t(Ft()),
|
|
5172
|
+
const i = jt(), o = pr(), s = t(Ft()), u = dr(), h = Fo(), c = xe, l = (0, n(te()).default)("socket.io-client:manager");
|
|
5179
5173
|
class d extends c.Emitter {
|
|
5180
5174
|
constructor(_, g) {
|
|
5181
5175
|
var f;
|
|
@@ -5225,21 +5219,21 @@ function qo() {
|
|
|
5225
5219
|
* @public
|
|
5226
5220
|
*/
|
|
5227
5221
|
open(_) {
|
|
5228
|
-
if (
|
|
5222
|
+
if (l("readyState %s", this._readyState), ~this._readyState.indexOf("open"))
|
|
5229
5223
|
return this;
|
|
5230
|
-
|
|
5224
|
+
l("opening %s", this.uri), this.engine = new i.Socket(this.uri, this.opts);
|
|
5231
5225
|
const g = this.engine, f = this;
|
|
5232
5226
|
this._readyState = "opening", this.skipReconnect = !1;
|
|
5233
|
-
const p = (0,
|
|
5227
|
+
const p = (0, u.on)(g, "open", function() {
|
|
5234
5228
|
f.onopen(), _ && _();
|
|
5235
5229
|
}), m = (w) => {
|
|
5236
|
-
|
|
5237
|
-
}, b = (0,
|
|
5230
|
+
l("error"), this.cleanup(), this._readyState = "closed", this.emitReserved("error", w), _ ? _(w) : this.maybeReconnectOnOpen();
|
|
5231
|
+
}, b = (0, u.on)(g, "error", m);
|
|
5238
5232
|
if (this._timeout !== !1) {
|
|
5239
5233
|
const w = this._timeout;
|
|
5240
|
-
|
|
5234
|
+
l("connect attempt will timeout after %d", w);
|
|
5241
5235
|
const C = this.setTimeoutFn(() => {
|
|
5242
|
-
|
|
5236
|
+
l("connect attempt timed out after %d", w), p(), m(new Error("timeout")), g.close();
|
|
5243
5237
|
}, w);
|
|
5244
5238
|
this.opts.autoUnref && C.unref(), this.subs.push(() => {
|
|
5245
5239
|
this.clearTimeoutFn(C);
|
|
@@ -5262,15 +5256,15 @@ function qo() {
|
|
|
5262
5256
|
* @private
|
|
5263
5257
|
*/
|
|
5264
5258
|
onopen() {
|
|
5265
|
-
|
|
5259
|
+
l("open"), this.cleanup(), this._readyState = "open", this.emitReserved("open");
|
|
5266
5260
|
const _ = this.engine;
|
|
5267
5261
|
this.subs.push(
|
|
5268
|
-
(0,
|
|
5269
|
-
(0,
|
|
5270
|
-
(0,
|
|
5271
|
-
(0,
|
|
5262
|
+
(0, u.on)(_, "ping", this.onping.bind(this)),
|
|
5263
|
+
(0, u.on)(_, "data", this.ondata.bind(this)),
|
|
5264
|
+
(0, u.on)(_, "error", this.onerror.bind(this)),
|
|
5265
|
+
(0, u.on)(_, "close", this.onclose.bind(this)),
|
|
5272
5266
|
// @ts-ignore
|
|
5273
|
-
(0,
|
|
5267
|
+
(0, u.on)(this.decoder, "decoded", this.ondecoded.bind(this))
|
|
5274
5268
|
);
|
|
5275
5269
|
}
|
|
5276
5270
|
/**
|
|
@@ -5309,7 +5303,7 @@ function qo() {
|
|
|
5309
5303
|
* @private
|
|
5310
5304
|
*/
|
|
5311
5305
|
onerror(_) {
|
|
5312
|
-
|
|
5306
|
+
l("error", _), this.emitReserved("error", _);
|
|
5313
5307
|
}
|
|
5314
5308
|
/**
|
|
5315
5309
|
* Creates a new socket for the given `nsp`.
|
|
@@ -5331,7 +5325,7 @@ function qo() {
|
|
|
5331
5325
|
const g = Object.keys(this.nsps);
|
|
5332
5326
|
for (const f of g)
|
|
5333
5327
|
if (this.nsps[f].active) {
|
|
5334
|
-
|
|
5328
|
+
l("socket %s is still active, skipping close", f);
|
|
5335
5329
|
return;
|
|
5336
5330
|
}
|
|
5337
5331
|
this._close();
|
|
@@ -5343,7 +5337,7 @@ function qo() {
|
|
|
5343
5337
|
* @private
|
|
5344
5338
|
*/
|
|
5345
5339
|
_packet(_) {
|
|
5346
|
-
|
|
5340
|
+
l("writing packet %j", _);
|
|
5347
5341
|
const g = this.encoder.encode(_);
|
|
5348
5342
|
for (let f = 0; f < g.length; f++)
|
|
5349
5343
|
this.engine.write(g[f], _.options);
|
|
@@ -5354,7 +5348,7 @@ function qo() {
|
|
|
5354
5348
|
* @private
|
|
5355
5349
|
*/
|
|
5356
5350
|
cleanup() {
|
|
5357
|
-
|
|
5351
|
+
l("cleanup"), this.subs.forEach((_) => _()), this.subs.length = 0, this.decoder.destroy();
|
|
5358
5352
|
}
|
|
5359
5353
|
/**
|
|
5360
5354
|
* Close the current socket.
|
|
@@ -5362,7 +5356,7 @@ function qo() {
|
|
|
5362
5356
|
* @private
|
|
5363
5357
|
*/
|
|
5364
5358
|
_close() {
|
|
5365
|
-
|
|
5359
|
+
l("disconnect"), this.skipReconnect = !0, this._reconnecting = !1, this.onclose("forced close");
|
|
5366
5360
|
}
|
|
5367
5361
|
/**
|
|
5368
5362
|
* Alias for close()
|
|
@@ -5383,7 +5377,7 @@ function qo() {
|
|
|
5383
5377
|
*/
|
|
5384
5378
|
onclose(_, g) {
|
|
5385
5379
|
var f;
|
|
5386
|
-
|
|
5380
|
+
l("closed due to %s", _), this.cleanup(), (f = this.engine) === null || f === void 0 || f.close(), this.backoff.reset(), this._readyState = "closed", this.emitReserved("close", _, g), this._reconnection && !this.skipReconnect && this.reconnect();
|
|
5387
5381
|
}
|
|
5388
5382
|
/**
|
|
5389
5383
|
* Attempt a reconnection.
|
|
@@ -5395,13 +5389,13 @@ function qo() {
|
|
|
5395
5389
|
return this;
|
|
5396
5390
|
const _ = this;
|
|
5397
5391
|
if (this.backoff.attempts >= this._reconnectionAttempts)
|
|
5398
|
-
|
|
5392
|
+
l("reconnect failed"), this.backoff.reset(), this.emitReserved("reconnect_failed"), this._reconnecting = !1;
|
|
5399
5393
|
else {
|
|
5400
5394
|
const g = this.backoff.duration();
|
|
5401
|
-
|
|
5395
|
+
l("will wait %dms before reconnect attempt", g), this._reconnecting = !0;
|
|
5402
5396
|
const f = this.setTimeoutFn(() => {
|
|
5403
|
-
_.skipReconnect || (
|
|
5404
|
-
p ? (
|
|
5397
|
+
_.skipReconnect || (l("attempting reconnect"), this.emitReserved("reconnect_attempt", _.backoff.attempts), !_.skipReconnect && _.open((p) => {
|
|
5398
|
+
p ? (l("reconnect attempt error"), _._reconnecting = !1, _.reconnect(), this.emitReserved("reconnect_error", p)) : (l("reconnect success"), _.onreconnect());
|
|
5405
5399
|
}));
|
|
5406
5400
|
}, g);
|
|
5407
5401
|
this.opts.autoUnref && f.unref(), this.subs.push(() => {
|
|
@@ -5436,12 +5430,12 @@ function xo() {
|
|
|
5436
5430
|
Object.defineProperty(e, "Socket", { enumerable: !0, get: function() {
|
|
5437
5431
|
return o.Socket;
|
|
5438
5432
|
} });
|
|
5439
|
-
const
|
|
5433
|
+
const u = (0, t(te()).default)("socket.io-client"), h = {};
|
|
5440
5434
|
function c(d, v) {
|
|
5441
5435
|
typeof d == "object" && (v = d, d = void 0), v = v || {};
|
|
5442
5436
|
const _ = (0, n.url)(d, v.path || "/socket.io"), g = _.source, f = _.id, p = _.path, m = h[f] && p in h[f].nsps, b = v.forceNew || v["force new connection"] || v.multiplex === !1 || m;
|
|
5443
5437
|
let w;
|
|
5444
|
-
return b ? (
|
|
5438
|
+
return b ? (u("ignoring socket cache for %s", g), w = new i.Manager(g, v)) : (h[f] || (u("new io instance for %s", g), h[f] = new i.Manager(g, v)), w = h[f]), _.query && !v.query && (v.query = _.queryKey), w.socket(_.path, v);
|
|
5445
5439
|
}
|
|
5446
5440
|
Object.assign(c, {
|
|
5447
5441
|
Manager: i.Manager,
|
|
@@ -5453,19 +5447,19 @@ function xo() {
|
|
|
5453
5447
|
Object.defineProperty(e, "protocol", { enumerable: !0, get: function() {
|
|
5454
5448
|
return a.protocol;
|
|
5455
5449
|
} });
|
|
5456
|
-
var
|
|
5450
|
+
var l = jt();
|
|
5457
5451
|
Object.defineProperty(e, "Fetch", { enumerable: !0, get: function() {
|
|
5458
|
-
return
|
|
5452
|
+
return l.Fetch;
|
|
5459
5453
|
} }), Object.defineProperty(e, "NodeXHR", { enumerable: !0, get: function() {
|
|
5460
|
-
return
|
|
5454
|
+
return l.NodeXHR;
|
|
5461
5455
|
} }), Object.defineProperty(e, "XHR", { enumerable: !0, get: function() {
|
|
5462
|
-
return
|
|
5456
|
+
return l.XHR;
|
|
5463
5457
|
} }), Object.defineProperty(e, "NodeWebSocket", { enumerable: !0, get: function() {
|
|
5464
|
-
return
|
|
5458
|
+
return l.NodeWebSocket;
|
|
5465
5459
|
} }), Object.defineProperty(e, "WebSocket", { enumerable: !0, get: function() {
|
|
5466
|
-
return
|
|
5460
|
+
return l.WebSocket;
|
|
5467
5461
|
} }), Object.defineProperty(e, "WebTransport", { enumerable: !0, get: function() {
|
|
5468
|
-
return
|
|
5462
|
+
return l.WebTransport;
|
|
5469
5463
|
} }), r.exports = c;
|
|
5470
5464
|
})(Qe, Qe.exports)), Qe.exports;
|
|
5471
5465
|
}
|
|
@@ -5491,7 +5485,7 @@ function Lo() {
|
|
|
5491
5485
|
return a && a.__esModule ? a : { default: a };
|
|
5492
5486
|
};
|
|
5493
5487
|
Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.providerFactory = void 0;
|
|
5494
|
-
const e = r(se()), t = ie, n = r(Bt()), i = _r(), o = J(), s = "IS_SOCKET_CONNECTED",
|
|
5488
|
+
const e = r(se()), t = ie, n = r(Bt()), i = _r(), o = J(), s = "IS_SOCKET_CONNECTED", u = "KEY_LAST_CONNECTION_TIME";
|
|
5495
5489
|
function h(a) {
|
|
5496
5490
|
return ({ url: d, connectEnabled: v = !0, automaticReconnect: _ = !0, children: g, dependencies: f = [], accessTokenFactory: p, onError: m, ...b }) => {
|
|
5497
5491
|
const w = (0, o.useEvent)(m), C = (0, o.useEvent)(p), E = (0, t.useRef)(() => {
|
|
@@ -5513,7 +5507,7 @@ function Lo() {
|
|
|
5513
5507
|
...b
|
|
5514
5508
|
});
|
|
5515
5509
|
a.connection = k, a.reOn();
|
|
5516
|
-
let O = Number(n.default.get(
|
|
5510
|
+
let O = Number(n.default.get(u)) || null, ne = null;
|
|
5517
5511
|
e.default.on(s, ($) => {
|
|
5518
5512
|
if (!$) {
|
|
5519
5513
|
O = null, ne = null, re();
|
|
@@ -5562,13 +5556,13 @@ function Lo() {
|
|
|
5562
5556
|
Ce.providerFactory = h;
|
|
5563
5557
|
function c(a) {
|
|
5564
5558
|
if (!a) {
|
|
5565
|
-
e.default.send(s, ""), n.default.set(
|
|
5559
|
+
e.default.send(s, ""), n.default.set(u, "");
|
|
5566
5560
|
return;
|
|
5567
5561
|
}
|
|
5568
5562
|
e.default.send(s, a);
|
|
5569
|
-
const
|
|
5570
|
-
|
|
5571
|
-
expires:
|
|
5563
|
+
const l = /* @__PURE__ */ new Date();
|
|
5564
|
+
l.setSeconds(l.getSeconds() + 10), n.default.set(u, Date.now().toString(), {
|
|
5565
|
+
expires: l,
|
|
5572
5566
|
path: "/"
|
|
5573
5567
|
});
|
|
5574
5568
|
}
|
|
@@ -5580,11 +5574,11 @@ function Uo() {
|
|
|
5580
5574
|
Ln = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.providerNativeFactory = void 0;
|
|
5581
5575
|
const r = ie, e = J(), t = _r();
|
|
5582
5576
|
function n(i) {
|
|
5583
|
-
return ({ url: s, connectEnabled:
|
|
5584
|
-
const _ = (0, e.useEvent)(d), g = (0, e.useEvent)(
|
|
5577
|
+
return ({ url: s, connectEnabled: u = !0, automaticReconnect: h = !0, children: c, dependencies: a = [], accessTokenFactory: l, onError: d, ...v }) => {
|
|
5578
|
+
const _ = (0, e.useEvent)(d), g = (0, e.useEvent)(l), f = (0, r.useRef)(() => {
|
|
5585
5579
|
});
|
|
5586
5580
|
async function p() {
|
|
5587
|
-
if (!
|
|
5581
|
+
if (!u)
|
|
5588
5582
|
return;
|
|
5589
5583
|
const b = (0, t.createConnection)(s, {
|
|
5590
5584
|
extraHeaders: {
|
|
@@ -5614,7 +5608,7 @@ function Uo() {
|
|
|
5614
5608
|
const m = (0, r.useRef)(!1);
|
|
5615
5609
|
return (0, r.useEffect)(() => (m.current && p(), m.current = !0, () => {
|
|
5616
5610
|
f.current();
|
|
5617
|
-
}), [
|
|
5611
|
+
}), [u, s, ...a]), c;
|
|
5618
5612
|
};
|
|
5619
5613
|
}
|
|
5620
5614
|
return Ye.providerNativeFactory = n, Ye;
|
|
@@ -5628,29 +5622,29 @@ function Ho() {
|
|
|
5628
5622
|
};
|
|
5629
5623
|
Object.defineProperty(be, "__esModule", { value: !0 }), be.createSocketIoContext = void 0;
|
|
5630
5624
|
const e = r(se()), t = J(), n = Eo(), i = Lo(), o = Uo(), s = "SOCEKT_IO_SEND";
|
|
5631
|
-
function
|
|
5625
|
+
function u(h) {
|
|
5632
5626
|
const c = [], a = {
|
|
5633
5627
|
connection: null,
|
|
5634
5628
|
useSocketEffect: null,
|
|
5635
5629
|
shareConnectionBetweenTab: h?.shareConnectionBetweenTab || !1,
|
|
5636
|
-
invoke: (
|
|
5630
|
+
invoke: (l, ...d) => {
|
|
5637
5631
|
var v;
|
|
5638
5632
|
if (!a.shareConnectionBetweenTab) {
|
|
5639
|
-
(v = a.connection) === null || v === void 0 || v.emit(
|
|
5633
|
+
(v = a.connection) === null || v === void 0 || v.emit(l, ...d);
|
|
5640
5634
|
return;
|
|
5641
5635
|
}
|
|
5642
|
-
(0, t.sendWithHermes)(s, { methodName:
|
|
5636
|
+
(0, t.sendWithHermes)(s, { methodName: l, args: d }, a.shareConnectionBetweenTab);
|
|
5643
5637
|
},
|
|
5644
5638
|
Provider: null,
|
|
5645
|
-
on: (
|
|
5639
|
+
on: (l) => {
|
|
5646
5640
|
var d;
|
|
5647
|
-
c.includes(
|
|
5648
|
-
(0, t.sendWithHermes)(
|
|
5649
|
-
}), c.push(
|
|
5641
|
+
c.includes(l) || (d = a.connection) === null || d === void 0 || d.on(l, (v) => {
|
|
5642
|
+
(0, t.sendWithHermes)(l, v, a.shareConnectionBetweenTab);
|
|
5643
|
+
}), c.push(l);
|
|
5650
5644
|
},
|
|
5651
|
-
off: (
|
|
5645
|
+
off: (l) => {
|
|
5652
5646
|
var d;
|
|
5653
|
-
c.includes(
|
|
5647
|
+
c.includes(l) && c.splice(c.indexOf(l), 1), c.includes(l) || (d = a.connection) === null || d === void 0 || d.off(l);
|
|
5654
5648
|
},
|
|
5655
5649
|
//@ts-ignore
|
|
5656
5650
|
reOn: () => {
|
|
@@ -5662,22 +5656,22 @@ function Ho() {
|
|
|
5662
5656
|
});
|
|
5663
5657
|
}
|
|
5664
5658
|
};
|
|
5665
|
-
return a.Provider = a.shareConnectionBetweenTab ? (0, i.providerFactory)(a) : (0, o.providerNativeFactory)(a), a.useSocketEffect = (0, n.createUseSocketEffect)(a), e.default.on(s, (
|
|
5659
|
+
return a.Provider = a.shareConnectionBetweenTab ? (0, i.providerFactory)(a) : (0, o.providerNativeFactory)(a), a.useSocketEffect = (0, n.createUseSocketEffect)(a), e.default.on(s, (l) => {
|
|
5666
5660
|
var d;
|
|
5667
|
-
!((d = a.connection) === null || d === void 0) && d.connected && a.connection.emit(
|
|
5661
|
+
!((d = a.connection) === null || d === void 0) && d.connected && a.connection.emit(l.methodName, ...l.args);
|
|
5668
5662
|
}), a;
|
|
5669
5663
|
}
|
|
5670
|
-
return be.createSocketIoContext =
|
|
5664
|
+
return be.createSocketIoContext = u, be;
|
|
5671
5665
|
}
|
|
5672
5666
|
var Hn;
|
|
5673
5667
|
function Wo() {
|
|
5674
5668
|
return Hn || (Hn = 1, (function(r) {
|
|
5675
5669
|
var e = ye && ye.__createBinding || (Object.create ? (function(n, i, o, s) {
|
|
5676
5670
|
s === void 0 && (s = o);
|
|
5677
|
-
var
|
|
5678
|
-
(!
|
|
5671
|
+
var u = Object.getOwnPropertyDescriptor(i, o);
|
|
5672
|
+
(!u || ("get" in u ? !i.__esModule : u.writable || u.configurable)) && (u = { enumerable: !0, get: function() {
|
|
5679
5673
|
return i[o];
|
|
5680
|
-
} }), Object.defineProperty(n, s,
|
|
5674
|
+
} }), Object.defineProperty(n, s, u);
|
|
5681
5675
|
}) : (function(n, i, o, s) {
|
|
5682
5676
|
s === void 0 && (s = o), n[s] = i[o];
|
|
5683
5677
|
})), t = ye && ye.__exportStar || function(n, i) {
|
|
@@ -5686,36 +5680,36 @@ function Wo() {
|
|
|
5686
5680
|
Object.defineProperty(r, "__esModule", { value: !0 }), t(Ho(), r);
|
|
5687
5681
|
})(ye)), ye;
|
|
5688
5682
|
}
|
|
5689
|
-
var Ie = {}, Oe = {}, Ae = {},
|
|
5683
|
+
var Ie = {}, Oe = {}, Ae = {}, le = {}, Wn;
|
|
5690
5684
|
function qt() {
|
|
5691
|
-
if (Wn) return
|
|
5692
|
-
Wn = 1, Object.defineProperty(
|
|
5685
|
+
if (Wn) return le;
|
|
5686
|
+
Wn = 1, Object.defineProperty(le, "__esModule", { value: !0 }), le.getMessageEvent = le.createConnection = le.isConnectionConnecting = void 0;
|
|
5693
5687
|
const r = J();
|
|
5694
5688
|
function e(i) {
|
|
5695
5689
|
return i && (i.readyState === WebSocket.CONNECTING || i.readyState === WebSocket.OPEN);
|
|
5696
5690
|
}
|
|
5697
|
-
|
|
5698
|
-
function t(i, { url: o, onOpen: s, onClose:
|
|
5699
|
-
let
|
|
5700
|
-
return a ?
|
|
5691
|
+
le.isConnectionConnecting = e;
|
|
5692
|
+
function t(i, { url: o, onOpen: s, onClose: u, onErrorRef: h, logger: c, headers: a }) {
|
|
5693
|
+
let l;
|
|
5694
|
+
return a ? l = new WebSocket(o, null, {
|
|
5701
5695
|
headers: a
|
|
5702
|
-
}) :
|
|
5703
|
-
s?.(
|
|
5704
|
-
},
|
|
5696
|
+
}) : l = new WebSocket(o), l.onopen = () => {
|
|
5697
|
+
s?.(l), c?.log("webSocket connected");
|
|
5698
|
+
}, l.onmessage = (d) => {
|
|
5705
5699
|
const v = d.data ? JSON.parse(d.data.toString()) : {};
|
|
5706
5700
|
(0, r.sendWithHermes)(n(i), v, i.shareConnectionBetweenTab);
|
|
5707
|
-
},
|
|
5708
|
-
|
|
5709
|
-
},
|
|
5701
|
+
}, l.onclose = (d) => {
|
|
5702
|
+
u?.(d), c?.log("webSocket closed", d);
|
|
5703
|
+
}, l.onerror = (d) => {
|
|
5710
5704
|
var v;
|
|
5711
5705
|
return (v = h.current) === null || v === void 0 ? void 0 : v.call(h, d);
|
|
5712
|
-
}, i.connection =
|
|
5706
|
+
}, i.connection = l, l;
|
|
5713
5707
|
}
|
|
5714
|
-
|
|
5708
|
+
le.createConnection = t;
|
|
5715
5709
|
function n(i) {
|
|
5716
5710
|
return i.key + "WEB_SOCKET_EVENT";
|
|
5717
5711
|
}
|
|
5718
|
-
return
|
|
5712
|
+
return le.getMessageEvent = n, le;
|
|
5719
5713
|
}
|
|
5720
5714
|
var $n;
|
|
5721
5715
|
function $o() {
|
|
@@ -5730,8 +5724,8 @@ function $o() {
|
|
|
5730
5724
|
return (h) => {
|
|
5731
5725
|
const c = (0, n.useEvent)(h);
|
|
5732
5726
|
(0, t.useEffect)(() => {
|
|
5733
|
-
function a(
|
|
5734
|
-
c(
|
|
5727
|
+
function a(l) {
|
|
5728
|
+
c(l);
|
|
5735
5729
|
}
|
|
5736
5730
|
return e.default.on((0, i.getMessageEvent)(s), a), () => {
|
|
5737
5731
|
e.default.off((0, i.getMessageEvent)(s), a);
|
|
@@ -5749,7 +5743,7 @@ function Vo() {
|
|
|
5749
5743
|
return a && a.__esModule ? a : { default: a };
|
|
5750
5744
|
};
|
|
5751
5745
|
Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.providerFactory = void 0;
|
|
5752
|
-
const e = r(se()), t = ie, n = r(Bt()), i = qt(), o = J(), s = "IS_SIGNAL_R_CONNECTED",
|
|
5746
|
+
const e = r(se()), t = ie, n = r(Bt()), i = qt(), o = J(), s = "IS_SIGNAL_R_CONNECTED", u = "KEY_LAST_CONNECTION_TIME";
|
|
5753
5747
|
function h(a) {
|
|
5754
5748
|
return ({ url: d, connectEnabled: v = !0, children: _, dependencies: g = [], onError: f, onOpen: p, onClose: m, logger: b = o.__DEV__ ? console : null }) => {
|
|
5755
5749
|
const w = (0, o.useEvent)(f), C = (0, t.useRef)(() => {
|
|
@@ -5758,7 +5752,7 @@ function Vo() {
|
|
|
5758
5752
|
var F;
|
|
5759
5753
|
if (!v)
|
|
5760
5754
|
return;
|
|
5761
|
-
let I = Number(n.default.get(
|
|
5755
|
+
let I = Number(n.default.get(u)) || null, k = null;
|
|
5762
5756
|
e.default.on(s, (T) => {
|
|
5763
5757
|
var N;
|
|
5764
5758
|
if (!T) {
|
|
@@ -5816,13 +5810,13 @@ function Vo() {
|
|
|
5816
5810
|
Ne.providerFactory = h;
|
|
5817
5811
|
function c(a) {
|
|
5818
5812
|
if (!a) {
|
|
5819
|
-
e.default.send(s, ""), n.default.set(
|
|
5813
|
+
e.default.send(s, ""), n.default.set(u, "");
|
|
5820
5814
|
return;
|
|
5821
5815
|
}
|
|
5822
5816
|
e.default.send(s, a);
|
|
5823
|
-
const
|
|
5824
|
-
|
|
5825
|
-
expires:
|
|
5817
|
+
const l = /* @__PURE__ */ new Date();
|
|
5818
|
+
l.setSeconds(l.getSeconds() + 10), n.default.set(u, Date.now().toString(), {
|
|
5819
|
+
expires: l,
|
|
5826
5820
|
path: "/"
|
|
5827
5821
|
});
|
|
5828
5822
|
}
|
|
@@ -5834,18 +5828,18 @@ function Ko() {
|
|
|
5834
5828
|
Kn = 1, Object.defineProperty(Ge, "__esModule", { value: !0 }), Ge.providerNativeFactory = void 0;
|
|
5835
5829
|
const r = ie, e = J(), t = qt();
|
|
5836
5830
|
function n(i) {
|
|
5837
|
-
return ({ url: s, connectEnabled:
|
|
5831
|
+
return ({ url: s, connectEnabled: u = !0, children: h, dependencies: c = [], onError: a, onOpen: l, onClose: d, logger: v = console, headers: _ }) => {
|
|
5838
5832
|
const g = (0, e.useEvent)(a), f = (0, r.useRef)(() => {
|
|
5839
5833
|
});
|
|
5840
5834
|
function p() {
|
|
5841
|
-
if (!
|
|
5835
|
+
if (!u)
|
|
5842
5836
|
return;
|
|
5843
5837
|
async function b() {
|
|
5844
5838
|
if (!(0, t.isConnectionConnecting)(i.connection))
|
|
5845
5839
|
try {
|
|
5846
5840
|
(0, t.createConnection)(i, {
|
|
5847
5841
|
onClose: d,
|
|
5848
|
-
onOpen:
|
|
5842
|
+
onOpen: l,
|
|
5849
5843
|
logger: v,
|
|
5850
5844
|
url: s,
|
|
5851
5845
|
onErrorRef: g,
|
|
@@ -5868,7 +5862,7 @@ function Ko() {
|
|
|
5868
5862
|
const m = (0, r.useRef)(!1);
|
|
5869
5863
|
return (0, r.useEffect)(() => (m.current && p(), m.current = !0, () => {
|
|
5870
5864
|
f.current();
|
|
5871
|
-
}), [
|
|
5865
|
+
}), [u, s, ...c]), h;
|
|
5872
5866
|
};
|
|
5873
5867
|
}
|
|
5874
5868
|
return Ge.providerNativeFactory = n, Ge;
|
|
@@ -5877,36 +5871,36 @@ var zn;
|
|
|
5877
5871
|
function zo() {
|
|
5878
5872
|
if (zn) return Oe;
|
|
5879
5873
|
zn = 1;
|
|
5880
|
-
var r = Oe && Oe.__importDefault || function(
|
|
5881
|
-
return
|
|
5874
|
+
var r = Oe && Oe.__importDefault || function(u) {
|
|
5875
|
+
return u && u.__esModule ? u : { default: u };
|
|
5882
5876
|
};
|
|
5883
5877
|
Object.defineProperty(Oe, "__esModule", { value: !0 }), Oe.createWebSocketContext = void 0;
|
|
5884
5878
|
const e = r(se()), t = J(), n = $o(), i = Vo(), o = Ko();
|
|
5885
|
-
function s(
|
|
5886
|
-
const h =
|
|
5887
|
-
key:
|
|
5879
|
+
function s(u) {
|
|
5880
|
+
const h = u.key + "SOCKET_INVOKE", c = {
|
|
5881
|
+
key: u.key,
|
|
5888
5882
|
connection: null,
|
|
5889
5883
|
useWebSocketEffect: null,
|
|
5890
|
-
shareConnectionBetweenTab:
|
|
5891
|
-
invoke: (
|
|
5884
|
+
shareConnectionBetweenTab: u?.shareConnectionBetweenTab || !1,
|
|
5885
|
+
invoke: (l) => {
|
|
5892
5886
|
var d;
|
|
5893
5887
|
if (!c.shareConnectionBetweenTab) {
|
|
5894
|
-
(d = c.connection) === null || d === void 0 || d.send(JSON.stringify(
|
|
5888
|
+
(d = c.connection) === null || d === void 0 || d.send(JSON.stringify(l));
|
|
5895
5889
|
return;
|
|
5896
5890
|
}
|
|
5897
|
-
(0, t.sendWithHermes)(h,
|
|
5891
|
+
(0, t.sendWithHermes)(h, l, c.shareConnectionBetweenTab);
|
|
5898
5892
|
},
|
|
5899
5893
|
Provider: null
|
|
5900
5894
|
// just for ts ignore
|
|
5901
5895
|
};
|
|
5902
5896
|
c.Provider = c.shareConnectionBetweenTab ? (0, i.providerFactory)(c) : (0, o.providerNativeFactory)(c);
|
|
5903
|
-
async function a(
|
|
5897
|
+
async function a(l) {
|
|
5904
5898
|
var d;
|
|
5905
|
-
(d = c.connection) === null || d === void 0 || d.send(JSON.stringify(
|
|
5899
|
+
(d = c.connection) === null || d === void 0 || d.send(JSON.stringify(l.data));
|
|
5906
5900
|
}
|
|
5907
|
-
return c.useWebSocketEffect = (0, n.createUseSignalREffect)(c), e.default.on(h, (
|
|
5901
|
+
return c.useWebSocketEffect = (0, n.createUseSignalREffect)(c), e.default.on(h, (l) => {
|
|
5908
5902
|
var d;
|
|
5909
|
-
((d = c.connection) === null || d === void 0 ? void 0 : d.readyState) === WebSocket.OPEN && a(
|
|
5903
|
+
((d = c.connection) === null || d === void 0 ? void 0 : d.readyState) === WebSocket.OPEN && a(l);
|
|
5910
5904
|
}), c;
|
|
5911
5905
|
}
|
|
5912
5906
|
return Oe.createWebSocketContext = s, Oe;
|
|
@@ -5916,10 +5910,10 @@ function Xo() {
|
|
|
5916
5910
|
return Xn || (Xn = 1, (function(r) {
|
|
5917
5911
|
var e = Ie && Ie.__createBinding || (Object.create ? (function(n, i, o, s) {
|
|
5918
5912
|
s === void 0 && (s = o);
|
|
5919
|
-
var
|
|
5920
|
-
(!
|
|
5913
|
+
var u = Object.getOwnPropertyDescriptor(i, o);
|
|
5914
|
+
(!u || ("get" in u ? !i.__esModule : u.writable || u.configurable)) && (u = { enumerable: !0, get: function() {
|
|
5921
5915
|
return i[o];
|
|
5922
|
-
} }), Object.defineProperty(n, s,
|
|
5916
|
+
} }), Object.defineProperty(n, s, u);
|
|
5923
5917
|
}) : (function(n, i, o, s) {
|
|
5924
5918
|
s === void 0 && (s = o), n[s] = i[o];
|
|
5925
5919
|
})), t = Ie && Ie.__exportStar || function(n, i) {
|
|
@@ -5933,10 +5927,10 @@ function Jo() {
|
|
|
5933
5927
|
return Jn || (Jn = 1, (function(r) {
|
|
5934
5928
|
var e = de && de.__createBinding || (Object.create ? (function(n, i, o, s) {
|
|
5935
5929
|
s === void 0 && (s = o);
|
|
5936
|
-
var
|
|
5937
|
-
(!
|
|
5930
|
+
var u = Object.getOwnPropertyDescriptor(i, o);
|
|
5931
|
+
(!u || ("get" in u ? !i.__esModule : u.writable || u.configurable)) && (u = { enumerable: !0, get: function() {
|
|
5938
5932
|
return i[o];
|
|
5939
|
-
} }), Object.defineProperty(n, s,
|
|
5933
|
+
} }), Object.defineProperty(n, s, u);
|
|
5940
5934
|
}) : (function(n, i, o, s) {
|
|
5941
5935
|
s === void 0 && (s = o), n[s] = i[o];
|
|
5942
5936
|
})), t = de && de.__exportStar || function(n, i) {
|
|
@@ -5950,7 +5944,7 @@ const Go = Yo.createSignalRContext(), oi = ({
|
|
|
5950
5944
|
children: r,
|
|
5951
5945
|
enabled: e
|
|
5952
5946
|
}) => {
|
|
5953
|
-
const t = vt((
|
|
5947
|
+
const t = vt((u) => u.modulePermissionToken), n = vt((u) => u.moduleId), i = vt((u) => u.organizationId), o = yr((u) => u.environment), s = mr(
|
|
5954
5948
|
() => ({
|
|
5955
5949
|
accessTokenFactory: () => t ?? "",
|
|
5956
5950
|
headers: {
|
|
@@ -5958,7 +5952,7 @@ const Go = Yo.createSignalRContext(), oi = ({
|
|
|
5958
5952
|
},
|
|
5959
5953
|
automaticReconnect: [1e4, 2e4, 3e4, 6e4],
|
|
5960
5954
|
// 10s, 20s, 30s, 60s four retries
|
|
5961
|
-
onError: async (
|
|
5955
|
+
onError: async (u) => console.error("SignalR connection error", u)
|
|
5962
5956
|
}),
|
|
5963
5957
|
[t]
|
|
5964
5958
|
);
|