akeyless-client-commons 1.1.6 → 1.1.8

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.
@@ -374,9 +374,9 @@ declare const Version: ({ version, className }: {
374
374
  version: string;
375
375
  className?: string;
376
376
  }) => react_jsx_runtime.JSX.Element;
377
- declare const LeftToRightDiv: ({ direction, className, value }: {
377
+ declare const LeftToRightDiv: ({ direction, className, children }: {
378
378
  direction: Direction;
379
- value: ReactNode;
379
+ children: ReactNode;
380
380
  className?: string;
381
381
  }) => react_jsx_runtime.JSX.Element;
382
382
 
@@ -374,9 +374,9 @@ declare const Version: ({ version, className }: {
374
374
  version: string;
375
375
  className?: string;
376
376
  }) => react_jsx_runtime.JSX.Element;
377
- declare const LeftToRightDiv: ({ direction, className, value }: {
377
+ declare const LeftToRightDiv: ({ direction, className, children }: {
378
378
  direction: Direction;
379
- value: ReactNode;
379
+ children: ReactNode;
380
380
  className?: string;
381
381
  }) => react_jsx_runtime.JSX.Element;
382
382
 
@@ -1189,6 +1189,277 @@ var biDomain = isLocal ? "http://localhost:9002/api/bi" : baseDomain + "/bi";
1189
1189
  var notificationsDomain = isLocal ? "http://localhost:9006/api/notifications" : baseDomain + "/notifications";
1190
1190
  var callCenterGeoDomain = isLocal ? "http://localhost:9007/api/call-center/geo" : baseDomain + "/call-center/geo";
1191
1191
  var callCenterEventsDomain = isLocal ? "http://localhost:9008/api/call-center/events" : baseDomain + "/call-center/events";
1192
+ // src/helpers/socket.ts
1193
+ var import_socket = require("socket.io-client");
1194
+ var SocketService = /*#__PURE__*/ function() {
1195
+ "use strict";
1196
+ function _SocketService() {
1197
+ _class_call_check(this, _SocketService);
1198
+ this.socket = null;
1199
+ this.connectCallbacks = [];
1200
+ this.disconnectCallbacks = [];
1201
+ }
1202
+ _create_class(_SocketService, [
1203
+ {
1204
+ /// Initialize the socket connection
1205
+ key: "initSocket",
1206
+ value: function initSocket() {
1207
+ var _this = this;
1208
+ if (!this.socket) {
1209
+ var SOCKET_SERVER_URL = "http://localhost:9009";
1210
+ var SOCKET_PATH = "/api/data-socket/connect";
1211
+ this.socket = (0, import_socket.io)(SOCKET_SERVER_URL, {
1212
+ path: SOCKET_PATH,
1213
+ transports: [
1214
+ "websocket"
1215
+ ]
1216
+ });
1217
+ this.socket.on("connect", function() {
1218
+ var _this_socket;
1219
+ console.log("Socket connected:", (_this_socket = _this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.id);
1220
+ _this.connectCallbacks.forEach(function(cb) {
1221
+ return cb();
1222
+ });
1223
+ });
1224
+ this.socket.on("disconnect", function(reason) {
1225
+ console.log("Socket disconnected:", reason);
1226
+ _this.disconnectCallbacks.forEach(function(cb) {
1227
+ return cb();
1228
+ });
1229
+ });
1230
+ this.socket.on("connect_error", function(error) {
1231
+ console.error("Socket connection error:", error);
1232
+ });
1233
+ }
1234
+ }
1235
+ },
1236
+ {
1237
+ /// get socket instance
1238
+ key: "getSocketInstance",
1239
+ value: function getSocketInstance() {
1240
+ if (!this.socket) {
1241
+ this.initSocket();
1242
+ }
1243
+ if (!this.socket) {
1244
+ throw new Error("Socket not initialized");
1245
+ }
1246
+ if (!this.socket.connected) {
1247
+ this.socket.connect();
1248
+ }
1249
+ return this.socket;
1250
+ }
1251
+ },
1252
+ {
1253
+ /// subscribe to collections
1254
+ key: "subscribeToCollections",
1255
+ value: function subscribeToCollections(config) {
1256
+ var s = this.getSocketInstance();
1257
+ var collectionsNames = config.map(function(c) {
1258
+ return c.collectionName;
1259
+ });
1260
+ var eventHandlers = [];
1261
+ config.forEach(function(configuration) {
1262
+ var collectionName = configuration.collectionName, onAdd = configuration.onAdd, onFirstTime = configuration.onFirstTime, onModify = configuration.onModify, onRemove = configuration.onRemove, extraParsers = configuration.extraParsers, conditions = configuration.conditions, orderBy2 = configuration.orderBy;
1263
+ s.on("initial:".concat(collectionName), onFirstTime);
1264
+ eventHandlers.push({
1265
+ eventName: "initial:".concat(collectionName),
1266
+ handler: onFirstTime
1267
+ });
1268
+ s.on("add:".concat(collectionName), onAdd);
1269
+ eventHandlers.push({
1270
+ eventName: "add:".concat(collectionName),
1271
+ handler: onAdd
1272
+ });
1273
+ s.on("update:".concat(collectionName), onModify);
1274
+ eventHandlers.push({
1275
+ eventName: "update:".concat(collectionName),
1276
+ handler: onModify
1277
+ });
1278
+ s.on("delete:".concat(collectionName), onRemove);
1279
+ eventHandlers.push({
1280
+ eventName: "delete:".concat(collectionName),
1281
+ handler: onRemove
1282
+ });
1283
+ extraParsers === null || extraParsers === void 0 ? void 0 : extraParsers.forEach(function(parsers) {
1284
+ var extraOnAdd = parsers.onAdd, extraOnFirstTime = parsers.onFirstTime, extraOnModify = parsers.onModify, extraOnRemove = parsers.onRemove;
1285
+ s.on("initial:".concat(collectionName), extraOnFirstTime);
1286
+ eventHandlers.push({
1287
+ eventName: "initial:".concat(collectionName),
1288
+ handler: extraOnFirstTime
1289
+ });
1290
+ s.on("add:".concat(collectionName), extraOnAdd);
1291
+ eventHandlers.push({
1292
+ eventName: "add:".concat(collectionName),
1293
+ handler: extraOnAdd
1294
+ });
1295
+ s.on("update:".concat(collectionName), extraOnModify);
1296
+ eventHandlers.push({
1297
+ eventName: "update:".concat(collectionName),
1298
+ handler: extraOnModify
1299
+ });
1300
+ s.on("delete:".concat(collectionName), extraOnRemove);
1301
+ eventHandlers.push({
1302
+ eventName: "delete:".concat(collectionName),
1303
+ handler: extraOnRemove
1304
+ });
1305
+ });
1306
+ });
1307
+ s.emit("subscribe_collections", collectionsNames, function(callback) {
1308
+ if (callback.success) {
1309
+ console.log("Successfully subscribed to: ".concat(collectionsNames.join(", ")));
1310
+ } else {
1311
+ console.error("Failed to subscribe to ".concat(config.join(", "), ": ").concat(callback.message));
1312
+ }
1313
+ });
1314
+ return function() {
1315
+ console.log("Cleaning up subscriptions for: ".concat(collectionsNames.join(", ")));
1316
+ s.emit("unsubscribe_collections", collectionsNames);
1317
+ eventHandlers.forEach(function(eh) {
1318
+ s.off(eh.eventName, eh.handler);
1319
+ });
1320
+ };
1321
+ }
1322
+ },
1323
+ {
1324
+ /// set data
1325
+ key: "setData",
1326
+ value: function setData(payload) {
1327
+ var s = this.getSocketInstance();
1328
+ return new Promise(function(resolve, reject) {
1329
+ s.emit("set_data", payload, function(callback) {
1330
+ if (callback.success) {
1331
+ console.log("Data saved successfully:", payload);
1332
+ console.log("ack", callback);
1333
+ resolve(callback);
1334
+ } else {
1335
+ reject(new Error(callback.message || "Save operation failed"));
1336
+ }
1337
+ });
1338
+ });
1339
+ }
1340
+ },
1341
+ {
1342
+ /// get data
1343
+ key: "getCollectionData",
1344
+ value: function getCollectionData(payload) {
1345
+ var s = this.getSocketInstance();
1346
+ s.emit("get_data", {
1347
+ collection_name: payload.collection_name
1348
+ }, function(socketCallback) {
1349
+ if (socketCallback.success && socketCallback.data) {
1350
+ payload.callback(socketCallback.data);
1351
+ } else {
1352
+ payload.callback(payload.defaultValue);
1353
+ }
1354
+ });
1355
+ }
1356
+ },
1357
+ {
1358
+ key: "getDocumentData",
1359
+ value: function getDocumentData(payload) {
1360
+ var s = this.getSocketInstance();
1361
+ s.emit("get_data", {
1362
+ collection_name: payload.collection_name,
1363
+ key: payload.key
1364
+ }, function(socketCallback) {
1365
+ if (socketCallback.success && socketCallback.data) {
1366
+ payload.callback(socketCallback.data);
1367
+ } else {
1368
+ payload.callback(payload.defaultValue);
1369
+ }
1370
+ });
1371
+ }
1372
+ },
1373
+ {
1374
+ /// delete data
1375
+ key: "deleteData",
1376
+ value: function deleteData(payload) {
1377
+ var s = this.getSocketInstance();
1378
+ return new Promise(function(resolve, reject) {
1379
+ s.emit("delete_data", payload, function(callback) {
1380
+ if (callback.success) {
1381
+ console.log("Data deleted successfully:", payload);
1382
+ console.log("delete ack", callback);
1383
+ resolve(callback);
1384
+ } else {
1385
+ reject(new Error(callback.message || "Delete operation failed"));
1386
+ }
1387
+ });
1388
+ });
1389
+ }
1390
+ },
1391
+ {
1392
+ key: "clearAllRedisData",
1393
+ value: function clearAllRedisData() {
1394
+ var s = this.getSocketInstance();
1395
+ return new Promise(function(resolve, reject) {
1396
+ s.emit("clear_all_redis_data", function(ack) {
1397
+ if (ack.success) {
1398
+ resolve(ack);
1399
+ } else {
1400
+ reject(new Error(ack.message || "Clear all Redis data operation failed"));
1401
+ }
1402
+ });
1403
+ });
1404
+ }
1405
+ },
1406
+ {
1407
+ /// connection management methods
1408
+ key: "onConnect",
1409
+ value: function onConnect(callback) {
1410
+ var _this_socket;
1411
+ this.connectCallbacks.push(callback);
1412
+ if ((_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.connected) {
1413
+ callback();
1414
+ }
1415
+ }
1416
+ },
1417
+ {
1418
+ key: "offConnect",
1419
+ value: function offConnect(callback) {
1420
+ this.connectCallbacks = this.connectCallbacks.filter(function(cb) {
1421
+ return cb !== callback;
1422
+ });
1423
+ }
1424
+ },
1425
+ {
1426
+ key: "onDisconnect",
1427
+ value: function onDisconnect(callback) {
1428
+ this.disconnectCallbacks.push(callback);
1429
+ if (this.socket && !this.socket.connected) {
1430
+ callback();
1431
+ }
1432
+ }
1433
+ },
1434
+ {
1435
+ key: "offDisconnect",
1436
+ value: function offDisconnect(callback) {
1437
+ this.disconnectCallbacks = this.disconnectCallbacks.filter(function(cb) {
1438
+ return cb !== callback;
1439
+ });
1440
+ }
1441
+ },
1442
+ {
1443
+ key: "isConnected",
1444
+ value: function isConnected() {
1445
+ var _this_socket;
1446
+ return ((_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.connected) || false;
1447
+ }
1448
+ }
1449
+ ], [
1450
+ {
1451
+ key: "getInstance",
1452
+ value: function getInstance() {
1453
+ if (!_SocketService.instance) {
1454
+ _SocketService.instance = new _SocketService();
1455
+ }
1456
+ return _SocketService.instance;
1457
+ }
1458
+ }
1459
+ ]);
1460
+ return _SocketService;
1461
+ }();
1462
+ var socketServiceInstance = SocketService.getInstance();
1192
1463
  // src/components/utils/Checkboxes.tsx
1193
1464
  var import_react2 = require("react");
1194
1465
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -1339,13 +1610,13 @@ var Version = function(param) {
1339
1610
  });
1340
1611
  };
1341
1612
  var LeftToRightDiv = function(param) {
1342
- var direction = param.direction, className = param.className, value = param.value;
1613
+ var direction = param.direction, className = param.className, children = param.children;
1343
1614
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", {
1344
1615
  style: {
1345
1616
  direction: "ltr"
1346
1617
  },
1347
1618
  className: cn("_ellipsis ".concat(direction === "rtl" ? "text-right" : "text-left"), className),
1348
- children: value
1619
+ children: children
1349
1620
  });
1350
1621
  };
1351
1622
  // src/components/utils/LoginWithGoogle.tsx
@@ -3741,14 +4012,14 @@ function rectsAreEqual(a, b) {
3741
4012
  return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
3742
4013
  }
3743
4014
  function observeMove(element, onMove) {
3744
- var io = null;
4015
+ var io2 = null;
3745
4016
  var timeoutId;
3746
4017
  var root = getDocumentElement(element);
3747
4018
  function cleanup() {
3748
4019
  var _io;
3749
4020
  clearTimeout(timeoutId);
3750
- (_io = io) == null || _io.disconnect();
3751
- io = null;
4021
+ (_io = io2) == null || _io.disconnect();
4022
+ io2 = null;
3752
4023
  }
3753
4024
  function refresh(skip, threshold) {
3754
4025
  if (skip === void 0) {
@@ -3796,14 +4067,14 @@ function observeMove(element, onMove) {
3796
4067
  isFirstUpdate = false;
3797
4068
  }
3798
4069
  try {
3799
- io = new IntersectionObserver(handleObserve, _object_spread_props(_object_spread({}, options), {
4070
+ io2 = new IntersectionObserver(handleObserve, _object_spread_props(_object_spread({}, options), {
3800
4071
  // Handle <iframe>s
3801
4072
  root: root.ownerDocument
3802
4073
  }));
3803
4074
  } catch (e) {
3804
- io = new IntersectionObserver(handleObserve, options);
4075
+ io2 = new IntersectionObserver(handleObserve, options);
3805
4076
  }
3806
- io.observe(element);
4077
+ io2.observe(element);
3807
4078
  }
3808
4079
  refresh(true);
3809
4080
  return cleanup;
@@ -967,6 +967,277 @@ var biDomain = isLocal ? "http://localhost:9002/api/bi" : baseDomain + "/bi";
967
967
  var notificationsDomain = isLocal ? "http://localhost:9006/api/notifications" : baseDomain + "/notifications";
968
968
  var callCenterGeoDomain = isLocal ? "http://localhost:9007/api/call-center/geo" : baseDomain + "/call-center/geo";
969
969
  var callCenterEventsDomain = isLocal ? "http://localhost:9008/api/call-center/events" : baseDomain + "/call-center/events";
970
+ // src/helpers/socket.ts
971
+ import { io } from "socket.io-client";
972
+ var SocketService = /*#__PURE__*/ function() {
973
+ "use strict";
974
+ function _SocketService() {
975
+ _class_call_check(this, _SocketService);
976
+ this.socket = null;
977
+ this.connectCallbacks = [];
978
+ this.disconnectCallbacks = [];
979
+ }
980
+ _create_class(_SocketService, [
981
+ {
982
+ /// Initialize the socket connection
983
+ key: "initSocket",
984
+ value: function initSocket() {
985
+ var _this = this;
986
+ if (!this.socket) {
987
+ var SOCKET_SERVER_URL = "http://localhost:9009";
988
+ var SOCKET_PATH = "/api/data-socket/connect";
989
+ this.socket = io(SOCKET_SERVER_URL, {
990
+ path: SOCKET_PATH,
991
+ transports: [
992
+ "websocket"
993
+ ]
994
+ });
995
+ this.socket.on("connect", function() {
996
+ var _this_socket;
997
+ console.log("Socket connected:", (_this_socket = _this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.id);
998
+ _this.connectCallbacks.forEach(function(cb) {
999
+ return cb();
1000
+ });
1001
+ });
1002
+ this.socket.on("disconnect", function(reason) {
1003
+ console.log("Socket disconnected:", reason);
1004
+ _this.disconnectCallbacks.forEach(function(cb) {
1005
+ return cb();
1006
+ });
1007
+ });
1008
+ this.socket.on("connect_error", function(error) {
1009
+ console.error("Socket connection error:", error);
1010
+ });
1011
+ }
1012
+ }
1013
+ },
1014
+ {
1015
+ /// get socket instance
1016
+ key: "getSocketInstance",
1017
+ value: function getSocketInstance() {
1018
+ if (!this.socket) {
1019
+ this.initSocket();
1020
+ }
1021
+ if (!this.socket) {
1022
+ throw new Error("Socket not initialized");
1023
+ }
1024
+ if (!this.socket.connected) {
1025
+ this.socket.connect();
1026
+ }
1027
+ return this.socket;
1028
+ }
1029
+ },
1030
+ {
1031
+ /// subscribe to collections
1032
+ key: "subscribeToCollections",
1033
+ value: function subscribeToCollections(config) {
1034
+ var s = this.getSocketInstance();
1035
+ var collectionsNames = config.map(function(c) {
1036
+ return c.collectionName;
1037
+ });
1038
+ var eventHandlers = [];
1039
+ config.forEach(function(configuration) {
1040
+ var collectionName = configuration.collectionName, onAdd = configuration.onAdd, onFirstTime = configuration.onFirstTime, onModify = configuration.onModify, onRemove = configuration.onRemove, extraParsers = configuration.extraParsers, conditions = configuration.conditions, orderBy2 = configuration.orderBy;
1041
+ s.on("initial:".concat(collectionName), onFirstTime);
1042
+ eventHandlers.push({
1043
+ eventName: "initial:".concat(collectionName),
1044
+ handler: onFirstTime
1045
+ });
1046
+ s.on("add:".concat(collectionName), onAdd);
1047
+ eventHandlers.push({
1048
+ eventName: "add:".concat(collectionName),
1049
+ handler: onAdd
1050
+ });
1051
+ s.on("update:".concat(collectionName), onModify);
1052
+ eventHandlers.push({
1053
+ eventName: "update:".concat(collectionName),
1054
+ handler: onModify
1055
+ });
1056
+ s.on("delete:".concat(collectionName), onRemove);
1057
+ eventHandlers.push({
1058
+ eventName: "delete:".concat(collectionName),
1059
+ handler: onRemove
1060
+ });
1061
+ extraParsers === null || extraParsers === void 0 ? void 0 : extraParsers.forEach(function(parsers) {
1062
+ var extraOnAdd = parsers.onAdd, extraOnFirstTime = parsers.onFirstTime, extraOnModify = parsers.onModify, extraOnRemove = parsers.onRemove;
1063
+ s.on("initial:".concat(collectionName), extraOnFirstTime);
1064
+ eventHandlers.push({
1065
+ eventName: "initial:".concat(collectionName),
1066
+ handler: extraOnFirstTime
1067
+ });
1068
+ s.on("add:".concat(collectionName), extraOnAdd);
1069
+ eventHandlers.push({
1070
+ eventName: "add:".concat(collectionName),
1071
+ handler: extraOnAdd
1072
+ });
1073
+ s.on("update:".concat(collectionName), extraOnModify);
1074
+ eventHandlers.push({
1075
+ eventName: "update:".concat(collectionName),
1076
+ handler: extraOnModify
1077
+ });
1078
+ s.on("delete:".concat(collectionName), extraOnRemove);
1079
+ eventHandlers.push({
1080
+ eventName: "delete:".concat(collectionName),
1081
+ handler: extraOnRemove
1082
+ });
1083
+ });
1084
+ });
1085
+ s.emit("subscribe_collections", collectionsNames, function(callback) {
1086
+ if (callback.success) {
1087
+ console.log("Successfully subscribed to: ".concat(collectionsNames.join(", ")));
1088
+ } else {
1089
+ console.error("Failed to subscribe to ".concat(config.join(", "), ": ").concat(callback.message));
1090
+ }
1091
+ });
1092
+ return function() {
1093
+ console.log("Cleaning up subscriptions for: ".concat(collectionsNames.join(", ")));
1094
+ s.emit("unsubscribe_collections", collectionsNames);
1095
+ eventHandlers.forEach(function(eh) {
1096
+ s.off(eh.eventName, eh.handler);
1097
+ });
1098
+ };
1099
+ }
1100
+ },
1101
+ {
1102
+ /// set data
1103
+ key: "setData",
1104
+ value: function setData(payload) {
1105
+ var s = this.getSocketInstance();
1106
+ return new Promise(function(resolve, reject) {
1107
+ s.emit("set_data", payload, function(callback) {
1108
+ if (callback.success) {
1109
+ console.log("Data saved successfully:", payload);
1110
+ console.log("ack", callback);
1111
+ resolve(callback);
1112
+ } else {
1113
+ reject(new Error(callback.message || "Save operation failed"));
1114
+ }
1115
+ });
1116
+ });
1117
+ }
1118
+ },
1119
+ {
1120
+ /// get data
1121
+ key: "getCollectionData",
1122
+ value: function getCollectionData(payload) {
1123
+ var s = this.getSocketInstance();
1124
+ s.emit("get_data", {
1125
+ collection_name: payload.collection_name
1126
+ }, function(socketCallback) {
1127
+ if (socketCallback.success && socketCallback.data) {
1128
+ payload.callback(socketCallback.data);
1129
+ } else {
1130
+ payload.callback(payload.defaultValue);
1131
+ }
1132
+ });
1133
+ }
1134
+ },
1135
+ {
1136
+ key: "getDocumentData",
1137
+ value: function getDocumentData(payload) {
1138
+ var s = this.getSocketInstance();
1139
+ s.emit("get_data", {
1140
+ collection_name: payload.collection_name,
1141
+ key: payload.key
1142
+ }, function(socketCallback) {
1143
+ if (socketCallback.success && socketCallback.data) {
1144
+ payload.callback(socketCallback.data);
1145
+ } else {
1146
+ payload.callback(payload.defaultValue);
1147
+ }
1148
+ });
1149
+ }
1150
+ },
1151
+ {
1152
+ /// delete data
1153
+ key: "deleteData",
1154
+ value: function deleteData(payload) {
1155
+ var s = this.getSocketInstance();
1156
+ return new Promise(function(resolve, reject) {
1157
+ s.emit("delete_data", payload, function(callback) {
1158
+ if (callback.success) {
1159
+ console.log("Data deleted successfully:", payload);
1160
+ console.log("delete ack", callback);
1161
+ resolve(callback);
1162
+ } else {
1163
+ reject(new Error(callback.message || "Delete operation failed"));
1164
+ }
1165
+ });
1166
+ });
1167
+ }
1168
+ },
1169
+ {
1170
+ key: "clearAllRedisData",
1171
+ value: function clearAllRedisData() {
1172
+ var s = this.getSocketInstance();
1173
+ return new Promise(function(resolve, reject) {
1174
+ s.emit("clear_all_redis_data", function(ack) {
1175
+ if (ack.success) {
1176
+ resolve(ack);
1177
+ } else {
1178
+ reject(new Error(ack.message || "Clear all Redis data operation failed"));
1179
+ }
1180
+ });
1181
+ });
1182
+ }
1183
+ },
1184
+ {
1185
+ /// connection management methods
1186
+ key: "onConnect",
1187
+ value: function onConnect(callback) {
1188
+ var _this_socket;
1189
+ this.connectCallbacks.push(callback);
1190
+ if ((_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.connected) {
1191
+ callback();
1192
+ }
1193
+ }
1194
+ },
1195
+ {
1196
+ key: "offConnect",
1197
+ value: function offConnect(callback) {
1198
+ this.connectCallbacks = this.connectCallbacks.filter(function(cb) {
1199
+ return cb !== callback;
1200
+ });
1201
+ }
1202
+ },
1203
+ {
1204
+ key: "onDisconnect",
1205
+ value: function onDisconnect(callback) {
1206
+ this.disconnectCallbacks.push(callback);
1207
+ if (this.socket && !this.socket.connected) {
1208
+ callback();
1209
+ }
1210
+ }
1211
+ },
1212
+ {
1213
+ key: "offDisconnect",
1214
+ value: function offDisconnect(callback) {
1215
+ this.disconnectCallbacks = this.disconnectCallbacks.filter(function(cb) {
1216
+ return cb !== callback;
1217
+ });
1218
+ }
1219
+ },
1220
+ {
1221
+ key: "isConnected",
1222
+ value: function isConnected() {
1223
+ var _this_socket;
1224
+ return ((_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.connected) || false;
1225
+ }
1226
+ }
1227
+ ], [
1228
+ {
1229
+ key: "getInstance",
1230
+ value: function getInstance() {
1231
+ if (!_SocketService.instance) {
1232
+ _SocketService.instance = new _SocketService();
1233
+ }
1234
+ return _SocketService.instance;
1235
+ }
1236
+ }
1237
+ ]);
1238
+ return _SocketService;
1239
+ }();
1240
+ var socketServiceInstance = SocketService.getInstance();
970
1241
  // src/components/utils/Checkboxes.tsx
971
1242
  import { useEffect, useState } from "react";
972
1243
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1117,13 +1388,13 @@ var Version = function(param) {
1117
1388
  });
1118
1389
  };
1119
1390
  var LeftToRightDiv = function(param) {
1120
- var direction = param.direction, className = param.className, value = param.value;
1391
+ var direction = param.direction, className = param.className, children = param.children;
1121
1392
  return /* @__PURE__ */ jsx4("div", {
1122
1393
  style: {
1123
1394
  direction: "ltr"
1124
1395
  },
1125
1396
  className: cn("_ellipsis ".concat(direction === "rtl" ? "text-right" : "text-left"), className),
1126
- children: value
1397
+ children: children
1127
1398
  });
1128
1399
  };
1129
1400
  // src/components/utils/LoginWithGoogle.tsx
@@ -3519,14 +3790,14 @@ function rectsAreEqual(a, b) {
3519
3790
  return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
3520
3791
  }
3521
3792
  function observeMove(element, onMove) {
3522
- var io = null;
3793
+ var io2 = null;
3523
3794
  var timeoutId;
3524
3795
  var root = getDocumentElement(element);
3525
3796
  function cleanup() {
3526
3797
  var _io;
3527
3798
  clearTimeout(timeoutId);
3528
- (_io = io) == null || _io.disconnect();
3529
- io = null;
3799
+ (_io = io2) == null || _io.disconnect();
3800
+ io2 = null;
3530
3801
  }
3531
3802
  function refresh(skip, threshold) {
3532
3803
  if (skip === void 0) {
@@ -3574,14 +3845,14 @@ function observeMove(element, onMove) {
3574
3845
  isFirstUpdate = false;
3575
3846
  }
3576
3847
  try {
3577
- io = new IntersectionObserver(handleObserve, _object_spread_props(_object_spread({}, options), {
3848
+ io2 = new IntersectionObserver(handleObserve, _object_spread_props(_object_spread({}, options), {
3578
3849
  // Handle <iframe>s
3579
3850
  root: root.ownerDocument
3580
3851
  }));
3581
3852
  } catch (e) {
3582
- io = new IntersectionObserver(handleObserve, options);
3853
+ io2 = new IntersectionObserver(handleObserve, options);
3583
3854
  }
3584
- io.observe(element);
3855
+ io2.observe(element);
3585
3856
  }
3586
3857
  refresh(true);
3587
3858
  return cleanup;