akeyless-client-commons 1.1.17-test.8 → 1.1.18

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.
@@ -1189,300 +1189,6 @@ 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
- var dataSocketDomain = isLocal ? "http://localhost:9009/api/data-socket" : baseDomain + "/data-socket";
1193
- var dataSyncDomain = isLocal ? "http://localhost:9010/api/data-sync" : baseDomain + "/data-sync";
1194
- // src/helpers/socket.ts
1195
- var import_socket = require("socket.io-client");
1196
- var SocketService = /*#__PURE__*/ function() {
1197
- "use strict";
1198
- function _SocketService() {
1199
- _class_call_check(this, _SocketService);
1200
- this.socket = null;
1201
- this.connectCallbacks = [];
1202
- this.disconnectCallbacks = [];
1203
- this.authToken = null;
1204
- }
1205
- _create_class(_SocketService, [
1206
- {
1207
- /// Initialize the socket connection
1208
- key: "initSocket",
1209
- value: function initSocket() {
1210
- var _this = this;
1211
- if (!this.socket) {
1212
- var socketUrl = isLocal ? "http://localhost:9009" : mode === "qa" ? "https://nx-api.xyz" : "https://nx-api.info";
1213
- this.socket = (0, import_socket.io)(socketUrl, {
1214
- path: "/api/data-socket/connect",
1215
- transports: [
1216
- "websocket"
1217
- ],
1218
- auth: this.authToken ? {
1219
- token: this.authToken
1220
- } : void 0
1221
- });
1222
- this.socket.on("connect", function() {
1223
- var _this_socket;
1224
- console.log("Socket connected:", (_this_socket = _this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.id);
1225
- });
1226
- this.connectCallbacks.forEach(function(cb) {
1227
- return cb();
1228
- });
1229
- this.socket.on("disconnect", function(reason) {
1230
- console.log("Socket disconnected:", reason);
1231
- _this.disconnectCallbacks.forEach(function(cb) {
1232
- return cb();
1233
- });
1234
- });
1235
- this.socket.on("connect_error", function(error) {
1236
- console.error("Socket connection error:", error);
1237
- });
1238
- }
1239
- }
1240
- },
1241
- {
1242
- /// get socket instance
1243
- key: "getSocketInstance",
1244
- value: function getSocketInstance() {
1245
- if (!this.socket) {
1246
- this.initSocket();
1247
- }
1248
- if (!this.socket) {
1249
- throw new Error("Socket not initialized");
1250
- }
1251
- if (!this.socket.connected) {
1252
- this.socket.connect();
1253
- }
1254
- return this.socket;
1255
- }
1256
- },
1257
- {
1258
- /// subscribe to collections
1259
- key: "subscribeToCollections",
1260
- value: function subscribeToCollections(config) {
1261
- if (config.length === 0) {
1262
- return function() {};
1263
- }
1264
- var s = this.getSocketInstance();
1265
- var collectionsNames = config.map(function(c) {
1266
- return c.collectionName;
1267
- });
1268
- var eventHandlers = [];
1269
- config.forEach(function(configuration) {
1270
- 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;
1271
- s.on("initial:".concat(collectionName), onFirstTime);
1272
- eventHandlers.push({
1273
- eventName: "initial:".concat(collectionName),
1274
- handler: onFirstTime
1275
- });
1276
- s.on("add:".concat(collectionName), onAdd);
1277
- eventHandlers.push({
1278
- eventName: "add:".concat(collectionName),
1279
- handler: onAdd
1280
- });
1281
- s.on("update:".concat(collectionName), onModify);
1282
- eventHandlers.push({
1283
- eventName: "update:".concat(collectionName),
1284
- handler: onModify
1285
- });
1286
- s.on("delete:".concat(collectionName), onRemove);
1287
- eventHandlers.push({
1288
- eventName: "delete:".concat(collectionName),
1289
- handler: onRemove
1290
- });
1291
- extraParsers === null || extraParsers === void 0 ? void 0 : extraParsers.forEach(function(parsers) {
1292
- var extraOnAdd = parsers.onAdd, extraOnFirstTime = parsers.onFirstTime, extraOnModify = parsers.onModify, extraOnRemove = parsers.onRemove;
1293
- s.on("initial:".concat(collectionName), extraOnFirstTime);
1294
- eventHandlers.push({
1295
- eventName: "initial:".concat(collectionName),
1296
- handler: extraOnFirstTime
1297
- });
1298
- s.on("add:".concat(collectionName), extraOnAdd);
1299
- eventHandlers.push({
1300
- eventName: "add:".concat(collectionName),
1301
- handler: extraOnAdd
1302
- });
1303
- s.on("update:".concat(collectionName), extraOnModify);
1304
- eventHandlers.push({
1305
- eventName: "update:".concat(collectionName),
1306
- handler: extraOnModify
1307
- });
1308
- s.on("delete:".concat(collectionName), extraOnRemove);
1309
- eventHandlers.push({
1310
- eventName: "delete:".concat(collectionName),
1311
- handler: extraOnRemove
1312
- });
1313
- });
1314
- });
1315
- s.emit("subscribe_collections", collectionsNames, function(callback) {
1316
- if (callback.success) {
1317
- console.log("Successfully subscribed to: ".concat(collectionsNames.join(", ")));
1318
- } else {
1319
- console.error("Failed to subscribe to ".concat(config.join(", "), ": ").concat(callback.message));
1320
- }
1321
- });
1322
- return function() {
1323
- console.log("Cleaning up subscriptions for: ".concat(collectionsNames.join(", ")));
1324
- s.emit("unsubscribe_collections", collectionsNames);
1325
- eventHandlers.forEach(function(eh) {
1326
- s.off(eh.eventName, eh.handler);
1327
- });
1328
- };
1329
- }
1330
- },
1331
- {
1332
- /// set data
1333
- key: "setData",
1334
- value: function setData(payload) {
1335
- var s = this.getSocketInstance();
1336
- return new Promise(function(resolve, reject) {
1337
- s.emit("set_data", payload, function(callback) {
1338
- if (callback.success) {
1339
- console.log("Data saved successfully:", payload);
1340
- console.log("ack", callback);
1341
- resolve(callback);
1342
- } else {
1343
- reject(new Error(callback.message || "Save operation failed"));
1344
- }
1345
- });
1346
- });
1347
- }
1348
- },
1349
- {
1350
- /// get data
1351
- key: "getCollectionData",
1352
- value: function getCollectionData(payload) {
1353
- var s = this.getSocketInstance();
1354
- s.emit("get_data", {
1355
- collection_name: payload.collection_name
1356
- }, function(socketCallback) {
1357
- if (socketCallback.success && socketCallback.data) {
1358
- payload.callback(socketCallback.data);
1359
- } else {
1360
- payload.callback(payload.defaultValue);
1361
- }
1362
- });
1363
- }
1364
- },
1365
- {
1366
- key: "getDocumentData",
1367
- value: function getDocumentData(payload) {
1368
- var s = this.getSocketInstance();
1369
- s.emit("get_data", {
1370
- collection_name: payload.collection_name,
1371
- key: payload.key
1372
- }, function(socketCallback) {
1373
- if (socketCallback.success && socketCallback.data) {
1374
- payload.callback(socketCallback.data);
1375
- } else {
1376
- payload.callback(payload.defaultValue);
1377
- }
1378
- });
1379
- }
1380
- },
1381
- {
1382
- /// delete data
1383
- key: "deleteData",
1384
- value: function deleteData(payload) {
1385
- var s = this.getSocketInstance();
1386
- return new Promise(function(resolve, reject) {
1387
- s.emit("delete_data", payload, function(callback) {
1388
- if (callback.success) {
1389
- console.log("Data deleted successfully:", payload);
1390
- console.log("delete ack", callback);
1391
- resolve(callback);
1392
- } else {
1393
- reject(new Error(callback.message || "Delete operation failed"));
1394
- }
1395
- });
1396
- });
1397
- }
1398
- },
1399
- {
1400
- key: "clearAllRedisData",
1401
- value: function clearAllRedisData() {
1402
- var s = this.getSocketInstance();
1403
- return new Promise(function(resolve, reject) {
1404
- s.emit("clear_all_redis_data", function(ack) {
1405
- if (ack.success) {
1406
- resolve(ack);
1407
- } else {
1408
- reject(new Error(ack.message || "Clear all Redis data operation failed"));
1409
- }
1410
- });
1411
- });
1412
- }
1413
- },
1414
- {
1415
- /// connection management methods
1416
- key: "onConnect",
1417
- value: function onConnect(callback) {
1418
- var _this_socket;
1419
- this.connectCallbacks.push(callback);
1420
- if ((_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.connected) {
1421
- callback();
1422
- }
1423
- }
1424
- },
1425
- {
1426
- key: "offConnect",
1427
- value: function offConnect(callback) {
1428
- this.connectCallbacks = this.connectCallbacks.filter(function(cb) {
1429
- return cb !== callback;
1430
- });
1431
- }
1432
- },
1433
- {
1434
- key: "onDisconnect",
1435
- value: function onDisconnect(callback) {
1436
- this.disconnectCallbacks.push(callback);
1437
- if (this.socket && !this.socket.connected) {
1438
- callback();
1439
- }
1440
- }
1441
- },
1442
- {
1443
- key: "offDisconnect",
1444
- value: function offDisconnect(callback) {
1445
- this.disconnectCallbacks = this.disconnectCallbacks.filter(function(cb) {
1446
- return cb !== callback;
1447
- });
1448
- }
1449
- },
1450
- {
1451
- key: "isConnected",
1452
- value: function isConnected() {
1453
- var _this_socket;
1454
- return ((_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.connected) || false;
1455
- }
1456
- },
1457
- {
1458
- key: "setAuthToken",
1459
- value: function setAuthToken(token) {
1460
- this.authToken = token;
1461
- if (this.socket) {
1462
- this.socket.auth = {
1463
- token: token
1464
- };
1465
- if (this.socket.connected) {
1466
- this.socket.disconnect();
1467
- }
1468
- this.socket.connect();
1469
- }
1470
- }
1471
- }
1472
- ], [
1473
- {
1474
- key: "getInstance",
1475
- value: function getInstance() {
1476
- if (!_SocketService.instance) {
1477
- _SocketService.instance = new _SocketService();
1478
- }
1479
- return _SocketService.instance;
1480
- }
1481
- }
1482
- ]);
1483
- return _SocketService;
1484
- }();
1485
- var socketServiceInstance = SocketService.getInstance();
1486
1192
  // src/components/utils/Checkboxes.tsx
1487
1193
  var import_react2 = require("react");
1488
1194
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -4035,14 +3741,14 @@ function rectsAreEqual(a, b) {
4035
3741
  return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
4036
3742
  }
4037
3743
  function observeMove(element, onMove) {
4038
- var io2 = null;
3744
+ var io = null;
4039
3745
  var timeoutId;
4040
3746
  var root = getDocumentElement(element);
4041
3747
  function cleanup() {
4042
3748
  var _io;
4043
3749
  clearTimeout(timeoutId);
4044
- (_io = io2) == null || _io.disconnect();
4045
- io2 = null;
3750
+ (_io = io) == null || _io.disconnect();
3751
+ io = null;
4046
3752
  }
4047
3753
  function refresh(skip, threshold) {
4048
3754
  if (skip === void 0) {
@@ -4090,14 +3796,14 @@ function observeMove(element, onMove) {
4090
3796
  isFirstUpdate = false;
4091
3797
  }
4092
3798
  try {
4093
- io2 = new IntersectionObserver(handleObserve, _object_spread_props(_object_spread({}, options), {
3799
+ io = new IntersectionObserver(handleObserve, _object_spread_props(_object_spread({}, options), {
4094
3800
  // Handle <iframe>s
4095
3801
  root: root.ownerDocument
4096
3802
  }));
4097
3803
  } catch (e) {
4098
- io2 = new IntersectionObserver(handleObserve, options);
3804
+ io = new IntersectionObserver(handleObserve, options);
4099
3805
  }
4100
- io2.observe(element);
3806
+ io.observe(element);
4101
3807
  }
4102
3808
  refresh(true);
4103
3809
  return cleanup;
@@ -967,300 +967,6 @@ 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
- var dataSocketDomain = isLocal ? "http://localhost:9009/api/data-socket" : baseDomain + "/data-socket";
971
- var dataSyncDomain = isLocal ? "http://localhost:9010/api/data-sync" : baseDomain + "/data-sync";
972
- // src/helpers/socket.ts
973
- import { io } from "socket.io-client";
974
- var SocketService = /*#__PURE__*/ function() {
975
- "use strict";
976
- function _SocketService() {
977
- _class_call_check(this, _SocketService);
978
- this.socket = null;
979
- this.connectCallbacks = [];
980
- this.disconnectCallbacks = [];
981
- this.authToken = null;
982
- }
983
- _create_class(_SocketService, [
984
- {
985
- /// Initialize the socket connection
986
- key: "initSocket",
987
- value: function initSocket() {
988
- var _this = this;
989
- if (!this.socket) {
990
- var socketUrl = isLocal ? "http://localhost:9009" : mode === "qa" ? "https://nx-api.xyz" : "https://nx-api.info";
991
- this.socket = io(socketUrl, {
992
- path: "/api/data-socket/connect",
993
- transports: [
994
- "websocket"
995
- ],
996
- auth: this.authToken ? {
997
- token: this.authToken
998
- } : void 0
999
- });
1000
- this.socket.on("connect", function() {
1001
- var _this_socket;
1002
- console.log("Socket connected:", (_this_socket = _this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.id);
1003
- });
1004
- this.connectCallbacks.forEach(function(cb) {
1005
- return cb();
1006
- });
1007
- this.socket.on("disconnect", function(reason) {
1008
- console.log("Socket disconnected:", reason);
1009
- _this.disconnectCallbacks.forEach(function(cb) {
1010
- return cb();
1011
- });
1012
- });
1013
- this.socket.on("connect_error", function(error) {
1014
- console.error("Socket connection error:", error);
1015
- });
1016
- }
1017
- }
1018
- },
1019
- {
1020
- /// get socket instance
1021
- key: "getSocketInstance",
1022
- value: function getSocketInstance() {
1023
- if (!this.socket) {
1024
- this.initSocket();
1025
- }
1026
- if (!this.socket) {
1027
- throw new Error("Socket not initialized");
1028
- }
1029
- if (!this.socket.connected) {
1030
- this.socket.connect();
1031
- }
1032
- return this.socket;
1033
- }
1034
- },
1035
- {
1036
- /// subscribe to collections
1037
- key: "subscribeToCollections",
1038
- value: function subscribeToCollections(config) {
1039
- if (config.length === 0) {
1040
- return function() {};
1041
- }
1042
- var s = this.getSocketInstance();
1043
- var collectionsNames = config.map(function(c) {
1044
- return c.collectionName;
1045
- });
1046
- var eventHandlers = [];
1047
- config.forEach(function(configuration) {
1048
- 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;
1049
- s.on("initial:".concat(collectionName), onFirstTime);
1050
- eventHandlers.push({
1051
- eventName: "initial:".concat(collectionName),
1052
- handler: onFirstTime
1053
- });
1054
- s.on("add:".concat(collectionName), onAdd);
1055
- eventHandlers.push({
1056
- eventName: "add:".concat(collectionName),
1057
- handler: onAdd
1058
- });
1059
- s.on("update:".concat(collectionName), onModify);
1060
- eventHandlers.push({
1061
- eventName: "update:".concat(collectionName),
1062
- handler: onModify
1063
- });
1064
- s.on("delete:".concat(collectionName), onRemove);
1065
- eventHandlers.push({
1066
- eventName: "delete:".concat(collectionName),
1067
- handler: onRemove
1068
- });
1069
- extraParsers === null || extraParsers === void 0 ? void 0 : extraParsers.forEach(function(parsers) {
1070
- var extraOnAdd = parsers.onAdd, extraOnFirstTime = parsers.onFirstTime, extraOnModify = parsers.onModify, extraOnRemove = parsers.onRemove;
1071
- s.on("initial:".concat(collectionName), extraOnFirstTime);
1072
- eventHandlers.push({
1073
- eventName: "initial:".concat(collectionName),
1074
- handler: extraOnFirstTime
1075
- });
1076
- s.on("add:".concat(collectionName), extraOnAdd);
1077
- eventHandlers.push({
1078
- eventName: "add:".concat(collectionName),
1079
- handler: extraOnAdd
1080
- });
1081
- s.on("update:".concat(collectionName), extraOnModify);
1082
- eventHandlers.push({
1083
- eventName: "update:".concat(collectionName),
1084
- handler: extraOnModify
1085
- });
1086
- s.on("delete:".concat(collectionName), extraOnRemove);
1087
- eventHandlers.push({
1088
- eventName: "delete:".concat(collectionName),
1089
- handler: extraOnRemove
1090
- });
1091
- });
1092
- });
1093
- s.emit("subscribe_collections", collectionsNames, function(callback) {
1094
- if (callback.success) {
1095
- console.log("Successfully subscribed to: ".concat(collectionsNames.join(", ")));
1096
- } else {
1097
- console.error("Failed to subscribe to ".concat(config.join(", "), ": ").concat(callback.message));
1098
- }
1099
- });
1100
- return function() {
1101
- console.log("Cleaning up subscriptions for: ".concat(collectionsNames.join(", ")));
1102
- s.emit("unsubscribe_collections", collectionsNames);
1103
- eventHandlers.forEach(function(eh) {
1104
- s.off(eh.eventName, eh.handler);
1105
- });
1106
- };
1107
- }
1108
- },
1109
- {
1110
- /// set data
1111
- key: "setData",
1112
- value: function setData(payload) {
1113
- var s = this.getSocketInstance();
1114
- return new Promise(function(resolve, reject) {
1115
- s.emit("set_data", payload, function(callback) {
1116
- if (callback.success) {
1117
- console.log("Data saved successfully:", payload);
1118
- console.log("ack", callback);
1119
- resolve(callback);
1120
- } else {
1121
- reject(new Error(callback.message || "Save operation failed"));
1122
- }
1123
- });
1124
- });
1125
- }
1126
- },
1127
- {
1128
- /// get data
1129
- key: "getCollectionData",
1130
- value: function getCollectionData(payload) {
1131
- var s = this.getSocketInstance();
1132
- s.emit("get_data", {
1133
- collection_name: payload.collection_name
1134
- }, function(socketCallback) {
1135
- if (socketCallback.success && socketCallback.data) {
1136
- payload.callback(socketCallback.data);
1137
- } else {
1138
- payload.callback(payload.defaultValue);
1139
- }
1140
- });
1141
- }
1142
- },
1143
- {
1144
- key: "getDocumentData",
1145
- value: function getDocumentData(payload) {
1146
- var s = this.getSocketInstance();
1147
- s.emit("get_data", {
1148
- collection_name: payload.collection_name,
1149
- key: payload.key
1150
- }, function(socketCallback) {
1151
- if (socketCallback.success && socketCallback.data) {
1152
- payload.callback(socketCallback.data);
1153
- } else {
1154
- payload.callback(payload.defaultValue);
1155
- }
1156
- });
1157
- }
1158
- },
1159
- {
1160
- /// delete data
1161
- key: "deleteData",
1162
- value: function deleteData(payload) {
1163
- var s = this.getSocketInstance();
1164
- return new Promise(function(resolve, reject) {
1165
- s.emit("delete_data", payload, function(callback) {
1166
- if (callback.success) {
1167
- console.log("Data deleted successfully:", payload);
1168
- console.log("delete ack", callback);
1169
- resolve(callback);
1170
- } else {
1171
- reject(new Error(callback.message || "Delete operation failed"));
1172
- }
1173
- });
1174
- });
1175
- }
1176
- },
1177
- {
1178
- key: "clearAllRedisData",
1179
- value: function clearAllRedisData() {
1180
- var s = this.getSocketInstance();
1181
- return new Promise(function(resolve, reject) {
1182
- s.emit("clear_all_redis_data", function(ack) {
1183
- if (ack.success) {
1184
- resolve(ack);
1185
- } else {
1186
- reject(new Error(ack.message || "Clear all Redis data operation failed"));
1187
- }
1188
- });
1189
- });
1190
- }
1191
- },
1192
- {
1193
- /// connection management methods
1194
- key: "onConnect",
1195
- value: function onConnect(callback) {
1196
- var _this_socket;
1197
- this.connectCallbacks.push(callback);
1198
- if ((_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.connected) {
1199
- callback();
1200
- }
1201
- }
1202
- },
1203
- {
1204
- key: "offConnect",
1205
- value: function offConnect(callback) {
1206
- this.connectCallbacks = this.connectCallbacks.filter(function(cb) {
1207
- return cb !== callback;
1208
- });
1209
- }
1210
- },
1211
- {
1212
- key: "onDisconnect",
1213
- value: function onDisconnect(callback) {
1214
- this.disconnectCallbacks.push(callback);
1215
- if (this.socket && !this.socket.connected) {
1216
- callback();
1217
- }
1218
- }
1219
- },
1220
- {
1221
- key: "offDisconnect",
1222
- value: function offDisconnect(callback) {
1223
- this.disconnectCallbacks = this.disconnectCallbacks.filter(function(cb) {
1224
- return cb !== callback;
1225
- });
1226
- }
1227
- },
1228
- {
1229
- key: "isConnected",
1230
- value: function isConnected() {
1231
- var _this_socket;
1232
- return ((_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.connected) || false;
1233
- }
1234
- },
1235
- {
1236
- key: "setAuthToken",
1237
- value: function setAuthToken(token) {
1238
- this.authToken = token;
1239
- if (this.socket) {
1240
- this.socket.auth = {
1241
- token: token
1242
- };
1243
- if (this.socket.connected) {
1244
- this.socket.disconnect();
1245
- }
1246
- this.socket.connect();
1247
- }
1248
- }
1249
- }
1250
- ], [
1251
- {
1252
- key: "getInstance",
1253
- value: function getInstance() {
1254
- if (!_SocketService.instance) {
1255
- _SocketService.instance = new _SocketService();
1256
- }
1257
- return _SocketService.instance;
1258
- }
1259
- }
1260
- ]);
1261
- return _SocketService;
1262
- }();
1263
- var socketServiceInstance = SocketService.getInstance();
1264
970
  // src/components/utils/Checkboxes.tsx
1265
971
  import { useEffect, useState } from "react";
1266
972
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -3813,14 +3519,14 @@ function rectsAreEqual(a, b) {
3813
3519
  return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
3814
3520
  }
3815
3521
  function observeMove(element, onMove) {
3816
- var io2 = null;
3522
+ var io = null;
3817
3523
  var timeoutId;
3818
3524
  var root = getDocumentElement(element);
3819
3525
  function cleanup() {
3820
3526
  var _io;
3821
3527
  clearTimeout(timeoutId);
3822
- (_io = io2) == null || _io.disconnect();
3823
- io2 = null;
3528
+ (_io = io) == null || _io.disconnect();
3529
+ io = null;
3824
3530
  }
3825
3531
  function refresh(skip, threshold) {
3826
3532
  if (skip === void 0) {
@@ -3868,14 +3574,14 @@ function observeMove(element, onMove) {
3868
3574
  isFirstUpdate = false;
3869
3575
  }
3870
3576
  try {
3871
- io2 = new IntersectionObserver(handleObserve, _object_spread_props(_object_spread({}, options), {
3577
+ io = new IntersectionObserver(handleObserve, _object_spread_props(_object_spread({}, options), {
3872
3578
  // Handle <iframe>s
3873
3579
  root: root.ownerDocument
3874
3580
  }));
3875
3581
  } catch (e) {
3876
- io2 = new IntersectionObserver(handleObserve, options);
3582
+ io = new IntersectionObserver(handleObserve, options);
3877
3583
  }
3878
- io2.observe(element);
3584
+ io.observe(element);
3879
3585
  }
3880
3586
  refresh(true);
3881
3587
  return cleanup;