"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__tsfTypeAliases = exports.SrpcStreamClosedError = exports.SrpcStaleConnectionError = exports.SrpcOwnerUnavailableError = exports.SrpcMeshProtocolError = exports.SrpcMeshAuthenticationError = exports.SrpcIndeterminateDeliveryError = exports.SrpcError = exports.SrpcClientNotFoundError = exports.SrpcBackpressureError = exports.SrpcServer = exports.registerSrpcObserver = exports.notifySrpcObservers = exports.SrpcConflictError = exports.SrpcClient = exports.SrpcByteStream = void 0;
const tslib_1 = require("tslib");
const _a = tslib_1.__importStar(require("@zyno-io/ts-reflection/type-metadata-runtime"));
var SrpcByteStream_1 = require("./SrpcByteStream");
Object.defineProperty(exports, "SrpcByteStream", { enumerable: true, get: function () { return SrpcByteStream_1.SrpcByteStream; } });
var SrpcClient_1 = require("./SrpcClient");
Object.defineProperty(exports, "SrpcClient", { enumerable: true, get: function () { return SrpcClient_1.SrpcClient; } });
Object.defineProperty(exports, "SrpcConflictError", { enumerable: true, get: function () { return SrpcClient_1.SrpcConflictError; } });
var observer_1 = require("./observer");
Object.defineProperty(exports, "notifySrpcObservers", { enumerable: true, get: function () { return observer_1.notifySrpcObservers; } });
Object.defineProperty(exports, "registerSrpcObserver", { enumerable: true, get: function () { return observer_1.registerSrpcObserver; } });
var SrpcServer_1 = require("./SrpcServer");
Object.defineProperty(exports, "SrpcServer", { enumerable: true, get: function () { return SrpcServer_1.SrpcServer; } });
var types_1 = require("./types");
Object.defineProperty(exports, "SrpcBackpressureError", { enumerable: true, get: function () { return types_1.SrpcBackpressureError; } });
Object.defineProperty(exports, "SrpcClientNotFoundError", { enumerable: true, get: function () { return types_1.SrpcClientNotFoundError; } });
Object.defineProperty(exports, "SrpcError", { enumerable: true, get: function () { return types_1.SrpcError; } });
Object.defineProperty(exports, "SrpcIndeterminateDeliveryError", { enumerable: true, get: function () { return types_1.SrpcIndeterminateDeliveryError; } });
Object.defineProperty(exports, "SrpcMeshAuthenticationError", { enumerable: true, get: function () { return types_1.SrpcMeshAuthenticationError; } });
Object.defineProperty(exports, "SrpcMeshProtocolError", { enumerable: true, get: function () { return types_1.SrpcMeshProtocolError; } });
Object.defineProperty(exports, "SrpcOwnerUnavailableError", { enumerable: true, get: function () { return types_1.SrpcOwnerUnavailableError; } });
Object.defineProperty(exports, "SrpcStaleConnectionError", { enumerable: true, get: function () { return types_1.SrpcStaleConnectionError; } });
Object.defineProperty(exports, "SrpcStreamClosedError", { enumerable: true, get: function () { return types_1.SrpcStreamClosedError; } });
exports.__tsfTypeAliases = _a.decodeCompactMetadataV1("[1,{\"BaseMessage\":{\"kind\":18,\"typeName\":\"BaseMessage\",\"types\":[{\"kind\":20,\"name\":\"requestId\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"reply\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"error\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"userError\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"trace\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"traceId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"spanId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"traceFlags\",\"type\":{\"kind\":7},\"optional\":false}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"pingPong\",\"type\":{\"kind\":12,\"types\":[{\"kind\":17},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"byteStreamOperation\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"streamId\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"write\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"chunk\",\"type\":{\"kind\":16,\"typeName\":\"Uint8Array\",\"classType\":{\"$tsf\":0}},\"optional\":false}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"finish\",\"type\":{\"kind\":12,\"types\":[{\"kind\":17},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"destroy\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"error\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true}]},{\"kind\":4}]},\"optional\":true}]},{\"kind\":4}]},\"optional\":true}]},\"IByteStream\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"IByteStreamable\":{\"kind\":18,\"typeName\":\"IByteStreamable\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false}]},\"ISrpcMessageHandler\":{\"kind\":18,\"typeName\":\"ISrpcMessageHandler\",\"types\":[{\"kind\":20,\"name\":\"handle\",\"type\":{\"kind\":2,\"typeName\":\"SrpcMessageHandlerFn\",\"typeArguments\":[{\"kind\":2,\"typeName\":\"C\"},{\"kind\":2,\"typeName\":\"I\"},{\"kind\":2,\"typeName\":\"O\"}]},\"optional\":false}],\"typeParameters\":[\"C\",\"I\",\"O\"]},\"ISrpcServerOptions\":{\"kind\":18,\"typeName\":\"ISrpcServerOptions\",\"types\":[{\"kind\":20,\"name\":\"logger\",\"type\":{\"kind\":18,\"typeName\":\"ISrpcLogger\",\"types\":[]},\"optional\":false},{\"kind\":20,\"name\":\"clientMessage\",\"type\":{\"kind\":18,\"typeName\":\"SrpcMessageFns\",\"types\":[]},\"optional\":false},{\"kind\":20,\"name\":\"serverMessage\",\"type\":{\"kind\":18,\"typeName\":\"SrpcMessageFns\",\"types\":[]},\"optional\":false},{\"kind\":20,\"name\":\"wsPath\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"defaultUnspecifiedProtocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2},{\"kind\":10,\"literal\":3}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"logTraffic\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":18,\"typeName\":\"SrpcTrafficLoggingOptions\",\"types\":[{\"kind\":20,\"name\":\"bodies\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true}]}],\"typeName\":\"SrpcTrafficLogging\"},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"httpServer\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"Server\",\"classType\":{\"$tsfImport\":[1,\"node:http\",\"Server\"]}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"lateReplyTombstoneTtlMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingClientRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingClientRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightClientRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightClientRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxBufferedBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxMessageBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingServerRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingServerRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingHandshakes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxActiveStreams\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxClientIdBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxClientMetadataBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxAuthReplayPrincipals\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"authAudience\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true}],\"typeParameters\":[\"TClientOutput\",\"TServerOutput\"]},\"SrpcClientOptions\":{\"kind\":18,\"typeName\":\"SrpcClientOptions\",\"types\":[{\"kind\":20,\"name\":\"enableReconnect\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"logTraffic\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":18,\"typeName\":\"SrpcTrafficLoggingOptions\",\"types\":[{\"kind\":20,\"name\":\"bodies\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true}]}],\"typeName\":\"SrpcTrafficLogging\"},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"authAudience\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"senderAnnouncements\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightServerRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightServerRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxBufferedBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxMessageBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"connectTimeoutMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"lateReplyTombstoneTtlMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true}]},\"SrpcConnection\":{\"kind\":18,\"typeName\":\"SrpcConnection\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"readonly id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"readonly clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"readonly meta\",\"type\":{\"kind\":2,\"typeName\":\"T\"},\"optional\":false},{\"kind\":20,\"name\":\"readonly connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"readonly connected\",\"type\":{\"kind\":8},\"optional\":false}],\"typeParameters\":[\"T\"]},\"SrpcDisconnectCause\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":\"disconnect\"},{\"kind\":10,\"literal\":\"conflict\"},{\"kind\":10,\"literal\":\"supersede\"},{\"kind\":10,\"literal\":\"timeout\"},{\"kind\":10,\"literal\":\"badArg\"}],\"typeName\":\"SrpcDisconnectCause\"},\"SrpcMessageFns\":{\"kind\":18,\"typeName\":\"SrpcMessageFns\",\"types\":[],\"typeParameters\":[\"T\"]},\"SrpcMeta\":{\"kind\":17,\"typeName\":\"SrpcMeta\"},\"SrpcObservation\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"type\",\"type\":{\"kind\":10,\"literal\":\"connection\"},\"optional\":false},{\"kind\":20,\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":2}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2},{\"kind\":10,\"literal\":3}]},\"optional\":false},{\"kind\":20,\"name\":\"capabilities\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":4},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":2,\"typeName\":\"T\"},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}],\"typeParameters\":[\"T\"]},\"optional\":false},{\"kind\":20,\"name\":\"at\",\"type\":{\"kind\":7},\"optional\":false}]},{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"type\",\"type\":{\"kind\":10,\"literal\":\"disconnection\"},\"optional\":false},{\"kind\":20,\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":2}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2},{\"kind\":10,\"literal\":3}]},\"optional\":false},{\"kind\":20,\"name\":\"capabilities\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":4},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":2,\"typeName\":\"T\"},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}],\"typeParameters\":[\"T\"]},\"optional\":false},{\"kind\":20,\"name\":\"cause\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":\"disconnect\"},{\"kind\":10,\"literal\":\"conflict\"},{\"kind\":10,\"literal\":\"supersede\"},{\"kind\":10,\"literal\":\"timeout\"},{\"kind\":10,\"literal\":\"badArg\"}],\"typeName\":\"SrpcDisconnectCause\"},\"optional\":false},{\"kind\":20,\"name\":\"at\",\"type\":{\"kind\":7},\"optional\":false}]},{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"type\",\"type\":{\"kind\":10,\"literal\":\"message\"},\"optional\":false},{\"kind\":20,\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":2}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2},{\"kind\":10,\"literal\":3}]},\"optional\":false},{\"kind\":20,\"name\":\"capabilities\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":4},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":2,\"typeName\":\"T\"},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}],\"typeParameters\":[\"T\"]},\"optional\":false},{\"kind\":20,\"name\":\"direction\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":\"inbound\"},{\"kind\":10,\"literal\":\"outbound\"}]},\"optional\":false},{\"kind\":20,\"name\":\"data\",\"type\":{\"kind\":18,\"typeName\":\"BaseMessage\",\"types\":[{\"kind\":20,\"name\":\"requestId\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"reply\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"error\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"userError\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"trace\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"traceId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"spanId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"traceFlags\",\"type\":{\"kind\":7},\"optional\":false}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"pingPong\",\"type\":{\"kind\":12,\"types\":[{\"kind\":17},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"byteStreamOperation\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"streamId\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"write\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"chunk\",\"type\":{\"kind\":16,\"typeName\":\"Uint8Array\",\"classType\":{\"$tsf\":0}},\"optional\":false}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"finish\",\"type\":{\"kind\":12,\"types\":[{\"kind\":17},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"destroy\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"error\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true}]},{\"kind\":4}]},\"optional\":true}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"at\",\"type\":{\"kind\":7},\"optional\":false}]}],\"typeName\":\"SrpcObservation\"},\"SrpcObserver\":{\"kind\":2,\"typeName\":\"(entry: SrpcObservation) =\\u003e void\",\"typeName\":\"SrpcObserver\"},\"SrpcStream\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":2}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2},{\"kind\":10,\"literal\":3}]},\"optional\":false},{\"kind\":20,\"name\":\"capabilities\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":4},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":2,\"typeName\":\"T\"},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}],\"typeParameters\":[\"T\"]}}]", [() => (typeof Uint8Array !== "undefined" ? Uint8Array : (typeof exports !== "undefined" ? exports.Uint8Array : undefined)), require, () => (typeof WebSocket !== "undefined" ? WebSocket : (typeof exports !== "undefined" ? exports.WebSocket : undefined)), () => (typeof Map !== "undefined" ? Map : (typeof exports !== "undefined" ? exports.Map : undefined)), () => (typeof ReadonlySet !== "undefined" ? ReadonlySet : (typeof exports !== "undefined" ? exports.ReadonlySet : undefined))]);
//# sourceMappingURL=index.js.map