Files
NapCatQQ/.pnpm-store/v3/files/95/83b2f1d98e35c4d335b7a59530aa59389ae614b9c16b38b2b39449ab3629c9d311dde618bbba5d6758624c36ba16cfcb5320d4aa654fd971c1b56a5db22c4f
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

41 lines
1.8 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isEventSourceSupported = exports.isReactNative = exports.ReadyState = exports.DEFAULT_HEARTBEAT = exports.UNPARSABLE_JSON_OBJECT = exports.DEFAULT_RECONNECT_INTERVAL_MS = exports.DEFAULT_RECONNECT_LIMIT = exports.SOCKET_IO_PING_CODE = exports.SOCKET_IO_PATH = exports.SOCKET_IO_PING_INTERVAL = exports.DEFAULT_EVENT_SOURCE_OPTIONS = exports.EMPTY_EVENT_HANDLERS = exports.DEFAULT_OPTIONS = void 0;
var MILLISECONDS = 1;
var SECONDS = 1000 * MILLISECONDS;
exports.DEFAULT_OPTIONS = {};
exports.EMPTY_EVENT_HANDLERS = {};
exports.DEFAULT_EVENT_SOURCE_OPTIONS = {
withCredentials: false,
events: exports.EMPTY_EVENT_HANDLERS,
};
exports.SOCKET_IO_PING_INTERVAL = 25 * SECONDS;
exports.SOCKET_IO_PATH = '/socket.io/?EIO=3&transport=websocket';
exports.SOCKET_IO_PING_CODE = '2';
exports.DEFAULT_RECONNECT_LIMIT = 20;
exports.DEFAULT_RECONNECT_INTERVAL_MS = 5000;
exports.UNPARSABLE_JSON_OBJECT = {};
exports.DEFAULT_HEARTBEAT = {
message: 'ping',
timeout: 60000,
interval: 25000,
};
var ReadyState;
(function (ReadyState) {
ReadyState[ReadyState["UNINSTANTIATED"] = -1] = "UNINSTANTIATED";
ReadyState[ReadyState["CONNECTING"] = 0] = "CONNECTING";
ReadyState[ReadyState["OPEN"] = 1] = "OPEN";
ReadyState[ReadyState["CLOSING"] = 2] = "CLOSING";
ReadyState[ReadyState["CLOSED"] = 3] = "CLOSED";
})(ReadyState || (exports.ReadyState = ReadyState = {}));
var eventSourceSupported = function () {
try {
return 'EventSource' in globalThis;
}
catch (e) {
return false;
}
};
exports.isReactNative = typeof navigator !== 'undefined' && navigator.product === 'ReactNative';
exports.isEventSourceSupported = !exports.isReactNative && eventSourceSupported();
//# sourceMappingURL=constants.js.map