@webex/plugin-meetings 3.11.0-next.34 → 3.11.0-next.36

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.
@@ -178,7 +178,7 @@ var AIEnableRequest = _webexCore.WebexPlugin.extend({
178
178
  method: _constants.HTTP_VERBS.PUT
179
179
  });
180
180
  },
181
- version: "3.11.0-next.34"
181
+ version: "3.11.0-next.36"
182
182
  });
183
183
  var _default = exports.default = AIEnableRequest;
184
184
  //# sourceMappingURL=index.js.map
@@ -209,7 +209,7 @@ var Breakout = _webexCore.WebexPlugin.extend({
209
209
  sessionId: this.sessionId
210
210
  });
211
211
  },
212
- version: "3.11.0-next.34"
212
+ version: "3.11.0-next.36"
213
213
  });
214
214
  var _default = exports.default = Breakout;
215
215
  //# sourceMappingURL=breakout.js.map
@@ -1109,7 +1109,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
1109
1109
  this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
1110
1110
  }
1111
1111
  },
1112
- version: "3.11.0-next.34"
1112
+ version: "3.11.0-next.36"
1113
1113
  });
1114
1114
  var _default = exports.default = Breakouts;
1115
1115
  //# sourceMappingURL=index.js.map
@@ -233,7 +233,10 @@ var HashTreeParser = /*#__PURE__*/function () {
233
233
  _loggerProxy.default.logger.info("HashTreeParser#sendInitializationSyncRequestToLocus --> ".concat(this.debugId, " Sending initial sync request to Locus for data set \"").concat(datasetName, "\" with empty leaf data"));
234
234
  return this.sendSyncRequestToLocus(this.dataSets[datasetName], emptyLeavesData).then(function (syncResponse) {
235
235
  if (syncResponse) {
236
- return _this2.parseMessage(syncResponse, "via empty leaves /sync API call for ".concat(debugText));
236
+ return {
237
+ updateType: LocusInfoUpdateType.OBJECTS_UPDATED,
238
+ updatedObjects: _this2.parseMessage(syncResponse, "via empty leaves /sync API call for ".concat(debugText))
239
+ };
237
240
  }
238
241
  return {
239
242
  updateType: LocusInfoUpdateType.OBJECTS_UPDATED,
@@ -366,7 +369,7 @@ var HashTreeParser = /*#__PURE__*/function () {
366
369
  _iterator2.s();
367
370
  case 2:
368
371
  if ((_step2 = _iterator2.n()).done) {
369
- _context3.next = 7;
372
+ _context3.next = 6;
370
373
  break;
371
374
  }
372
375
  dataSet = _step2.value;
@@ -388,10 +391,10 @@ var HashTreeParser = /*#__PURE__*/function () {
388
391
  _context3.next = 3;
389
392
  break;
390
393
  }
391
- return _context3.abrupt("continue", 6);
394
+ return _context3.abrupt("continue", 5);
392
395
  case 3:
393
396
  if (this.dataSets[name].hashTree) {
394
- _context3.next = 6;
397
+ _context3.next = 5;
395
398
  break;
396
399
  }
397
400
  _loggerProxy.default.logger.info("HashTreeParser#initializeDataSets --> ".concat(this.debugId, " creating hash tree for visible dataset \"").concat(name, "\" (").concat(debugText, ")"));
@@ -402,42 +405,33 @@ var HashTreeParser = /*#__PURE__*/function () {
402
405
  return this.sendInitializationSyncRequestToLocus(name, debugText);
403
406
  case 4:
404
407
  _data = _context3.sent;
405
- if (!(_data.updateType === LocusInfoUpdateType.MEETING_ENDED)) {
406
- _context3.next = 5;
407
- break;
408
- }
409
- _loggerProxy.default.logger.warn("HashTreeParser#initializeDataSets --> ".concat(this.debugId, " meeting ended while initializing new visible data set \"").concat(name, "\""));
410
-
411
- // throw an error, it will be caught higher up and the meeting will be destroyed
412
- throw new MeetingEndedError();
413
- case 5:
414
408
  if (_data.updateType === LocusInfoUpdateType.OBJECTS_UPDATED) {
415
409
  updatedObjects.push.apply(updatedObjects, (0, _toConsumableArray2.default)(_data.updatedObjects || []));
416
410
  }
417
- case 6:
411
+ case 5:
418
412
  _context3.next = 2;
419
413
  break;
420
- case 7:
421
- _context3.next = 9;
414
+ case 6:
415
+ _context3.next = 8;
422
416
  break;
423
- case 8:
424
- _context3.prev = 8;
417
+ case 7:
418
+ _context3.prev = 7;
425
419
  _t = _context3["catch"](1);
426
420
  _iterator2.e(_t);
427
- case 9:
428
- _context3.prev = 9;
421
+ case 8:
422
+ _context3.prev = 8;
429
423
  _iterator2.f();
430
- return _context3.finish(9);
431
- case 10:
424
+ return _context3.finish(8);
425
+ case 9:
432
426
  this.callLocusInfoUpdateCallback({
433
427
  updateType: LocusInfoUpdateType.OBJECTS_UPDATED,
434
428
  updatedObjects: updatedObjects
435
429
  });
436
- case 11:
430
+ case 10:
437
431
  case "end":
438
432
  return _context3.stop();
439
433
  }
440
- }, _callee3, this, [[1, 8, 9, 10]]);
434
+ }, _callee3, this, [[1, 7, 8, 9]]);
441
435
  }));
442
436
  function initializeDataSets(_x3, _x4) {
443
437
  return _initializeDataSets.apply(this, arguments);
@@ -1027,143 +1021,116 @@ var HashTreeParser = /*#__PURE__*/function () {
1027
1021
  *
1028
1022
  * @param {HashTreeMessage} message - The hash tree message containing data sets and objects to be processed
1029
1023
  * @param {string} [debugText] - Optional debug text to include in logs
1030
- * @returns {Promise}
1024
+ * @returns {HashTreeObject[]} list of hash tree objects that were updated as a result of processing the message
1031
1025
  */
1032
1026
  )
1033
1027
  }, {
1034
1028
  key: "parseMessage",
1035
- value: (function () {
1036
- var _parseMessage = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5(message, debugText) {
1037
- var _message$locusStateEl,
1038
- _this1 = this,
1039
- _message$locusStateEl2;
1040
- var dataSets, visibleDataSetsUrl, isRosterDropped, updatedObjects, dataSetsRequiringInitialization, metadataUpdates, updatedMetadataObjects, _this$checkForVisible2, changeDetected, removedDataSets, addedDataSets;
1041
- return _regenerator.default.wrap(function (_context6) {
1042
- while (1) switch (_context6.prev = _context6.next) {
1043
- case 0:
1044
- dataSets = message.dataSets, visibleDataSetsUrl = message.visibleDataSetsUrl;
1045
- _loggerProxy.default.logger.info("HashTreeParser#parseMessage --> ".concat(this.debugId, " received message ").concat(debugText || '', ":"), message);
1046
- if (((_message$locusStateEl = message.locusStateElements) === null || _message$locusStateEl === void 0 ? void 0 : _message$locusStateEl.length) === 0) {
1047
- _loggerProxy.default.logger.warn("HashTreeParser#parseMessage --> ".concat(this.debugId, " got empty locusStateElements!!!"));
1048
- // todo: send a metric
1049
- }
1029
+ value: function parseMessage(message, debugText) {
1030
+ var _message$locusStateEl,
1031
+ _this1 = this,
1032
+ _message$locusStateEl2;
1033
+ var dataSets = message.dataSets,
1034
+ visibleDataSetsUrl = message.visibleDataSetsUrl;
1035
+ _loggerProxy.default.logger.info("HashTreeParser#parseMessage --> ".concat(this.debugId, " received message ").concat(debugText || '', ":"), message);
1036
+ if (((_message$locusStateEl = message.locusStateElements) === null || _message$locusStateEl === void 0 ? void 0 : _message$locusStateEl.length) === 0) {
1037
+ _loggerProxy.default.logger.warn("HashTreeParser#parseMessage --> ".concat(this.debugId, " got empty locusStateElements!!!"));
1038
+ // todo: send a metric
1039
+ }
1050
1040
 
1051
- // first, update our metadata about the datasets with info from the message
1052
- this.visibleDataSetsUrl = visibleDataSetsUrl;
1053
- dataSets.forEach(function (dataSet) {
1054
- return _this1.updateDataSetInfo(dataSet);
1055
- });
1056
- isRosterDropped = false;
1057
- updatedObjects = []; // when we detect new visible datasets, it may be that the metadata about them is not
1058
- // available in the message, they will require separate async initialization
1059
- dataSetsRequiringInitialization = []; // first find out if there are any visible data set changes - they're signalled in Metadata object updates
1060
- metadataUpdates = (message.locusStateElements || []).filter(function (object) {
1061
- return (0, _utils.isMetadata)(object);
1062
- });
1063
- if (metadataUpdates.length > 0) {
1064
- updatedMetadataObjects = [];
1065
- metadataUpdates.forEach(function (object) {
1066
- // todo: once Locus supports it, we will use the "view" field here instead of dataSetNames
1067
- var _iterator8 = _createForOfIteratorHelper(object.htMeta.dataSetNames),
1068
- _step8;
1069
- try {
1070
- for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
1071
- var _this1$dataSets$dataS;
1072
- var dataSetName = _step8.value;
1073
- var hashTree = (_this1$dataSets$dataS = _this1.dataSets[dataSetName]) === null || _this1$dataSets$dataS === void 0 ? void 0 : _this1$dataSets$dataS.hashTree;
1074
- if (hashTree && object.data) {
1075
- if (hashTree.putItem(object.htMeta.elementId)) {
1076
- updatedMetadataObjects.push(object);
1077
- }
1078
- }
1079
- }
1080
- } catch (err) {
1081
- _iterator8.e(err);
1082
- } finally {
1083
- _iterator8.f();
1084
- }
1085
- });
1086
- updatedObjects.push.apply(updatedObjects, updatedMetadataObjects);
1087
- _this$checkForVisible2 = this.checkForVisibleDataSetChanges(updatedMetadataObjects), changeDetected = _this$checkForVisible2.changeDetected, removedDataSets = _this$checkForVisible2.removedDataSets, addedDataSets = _this$checkForVisible2.addedDataSets;
1088
- if (changeDetected) {
1089
- dataSetsRequiringInitialization = this.processVisibleDataSetChanges(removedDataSets, addedDataSets, updatedObjects);
1041
+ // first, update our metadata about the datasets with info from the message
1042
+ this.visibleDataSetsUrl = visibleDataSetsUrl;
1043
+ dataSets.forEach(function (dataSet) {
1044
+ return _this1.updateDataSetInfo(dataSet);
1045
+ });
1046
+ var updatedObjects = [];
1047
+
1048
+ // when we detect new visible datasets, it may be that the metadata about them is not
1049
+ // available in the message, they will require separate async initialization
1050
+ var dataSetsRequiringInitialization = [];
1051
+
1052
+ // first find out if there are any visible data set changes - they're signalled in Metadata object updates
1053
+ var metadataUpdates = (message.locusStateElements || []).filter(function (object) {
1054
+ return (0, _utils.isMetadata)(object);
1055
+ });
1056
+ if (metadataUpdates.length > 0) {
1057
+ var updatedMetadataObjects = [];
1058
+ metadataUpdates.forEach(function (object) {
1059
+ // todo: once Locus supports it, we will use the "view" field here instead of dataSetNames
1060
+ var _iterator8 = _createForOfIteratorHelper(object.htMeta.dataSetNames),
1061
+ _step8;
1062
+ try {
1063
+ for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
1064
+ var _this1$dataSets$dataS;
1065
+ var dataSetName = _step8.value;
1066
+ var hashTree = (_this1$dataSets$dataS = _this1.dataSets[dataSetName]) === null || _this1$dataSets$dataS === void 0 ? void 0 : _this1$dataSets$dataS.hashTree;
1067
+ if (hashTree && object.data) {
1068
+ if (hashTree.putItem(object.htMeta.elementId)) {
1069
+ updatedMetadataObjects.push(object);
1090
1070
  }
1091
1071
  }
1092
- if (((_message$locusStateEl2 = message.locusStateElements) === null || _message$locusStateEl2 === void 0 ? void 0 : _message$locusStateEl2.length) > 0) {
1093
- // by this point we now have this.dataSets setup for data sets from this message
1094
- // and hash trees created for the new visible data sets,
1095
- // so we can now process all the updates from the message
1096
- dataSets.forEach(function (dataSet) {
1097
- if (_this1.dataSets[dataSet.name]) {
1098
- var hashTree = _this1.dataSets[dataSet.name].hashTree;
1099
- if (hashTree) {
1100
- var locusStateElementsForThisSet = message.locusStateElements.filter(function (object) {
1101
- return object.htMeta.dataSetNames.includes(dataSet.name);
1102
- });
1103
- var appliedChangesList = hashTree.updateItems(locusStateElementsForThisSet.map(function (object) {
1104
- return object.data ? {
1105
- operation: 'update',
1106
- item: object.htMeta.elementId
1107
- } : {
1108
- operation: 'remove',
1109
- item: object.htMeta.elementId
1110
- };
1111
- }));
1112
- (0, _lodash.zip)(appliedChangesList, locusStateElementsForThisSet).forEach(function (_ref5) {
1113
- var _ref6 = (0, _slicedToArray2.default)(_ref5, 2),
1114
- changeApplied = _ref6[0],
1115
- object = _ref6[1];
1116
- if (changeApplied) {
1117
- if ((0, _utils.isSelf)(object) && !object.data) {
1118
- isRosterDropped = true;
1119
- }
1120
- // add to updatedObjects so that our locus DTO will get updated with the new object
1121
- updatedObjects.push(object);
1122
- }
1123
- });
1124
- } else {
1125
- _loggerProxy.default.logger.info("Locus-info:index#parseMessage --> ".concat(_this1.debugId, " unexpected (not visible) dataSet ").concat(dataSet.name, " received in hash tree message"));
1126
- }
1127
- }
1128
- if (!isRosterDropped) {
1129
- _this1.runSyncAlgorithm(dataSet);
1130
- }
1131
- });
1132
- }
1133
- if (!isRosterDropped) {
1134
- _context6.next = 1;
1135
- break;
1136
- }
1137
- _loggerProxy.default.logger.info("HashTreeParser#parseMessage --> ".concat(this.debugId, " detected roster drop"));
1138
- this.stopAllTimers();
1139
-
1140
- // in case of roster drop we don't care about other updates
1141
- return _context6.abrupt("return", {
1142
- updateType: LocusInfoUpdateType.MEETING_ENDED
1072
+ }
1073
+ } catch (err) {
1074
+ _iterator8.e(err);
1075
+ } finally {
1076
+ _iterator8.f();
1077
+ }
1078
+ });
1079
+ updatedObjects.push.apply(updatedObjects, updatedMetadataObjects);
1080
+ var _this$checkForVisible2 = this.checkForVisibleDataSetChanges(updatedMetadataObjects),
1081
+ changeDetected = _this$checkForVisible2.changeDetected,
1082
+ removedDataSets = _this$checkForVisible2.removedDataSets,
1083
+ addedDataSets = _this$checkForVisible2.addedDataSets;
1084
+ if (changeDetected) {
1085
+ dataSetsRequiringInitialization = this.processVisibleDataSetChanges(removedDataSets, addedDataSets, updatedObjects);
1086
+ }
1087
+ }
1088
+ if (((_message$locusStateEl2 = message.locusStateElements) === null || _message$locusStateEl2 === void 0 ? void 0 : _message$locusStateEl2.length) > 0) {
1089
+ // by this point we now have this.dataSets setup for data sets from this message
1090
+ // and hash trees created for the new visible data sets,
1091
+ // so we can now process all the updates from the message
1092
+ dataSets.forEach(function (dataSet) {
1093
+ if (_this1.dataSets[dataSet.name]) {
1094
+ var hashTree = _this1.dataSets[dataSet.name].hashTree;
1095
+ if (hashTree) {
1096
+ var locusStateElementsForThisSet = message.locusStateElements.filter(function (object) {
1097
+ return object.htMeta.dataSetNames.includes(dataSet.name);
1143
1098
  });
1144
- case 1:
1145
- if (dataSetsRequiringInitialization.length > 0) {
1146
- // there are some data sets that we need to initialize asynchronously
1147
- this.queueInitForNewVisibleDataSets(dataSetsRequiringInitialization);
1148
- }
1149
- if (updatedObjects.length === 0) {
1150
- _loggerProxy.default.logger.info("HashTreeParser#parseMessage --> ".concat(this.debugId, " No objects updated as a result of received message"));
1151
- }
1152
- return _context6.abrupt("return", {
1153
- updateType: LocusInfoUpdateType.OBJECTS_UPDATED,
1154
- updatedObjects: updatedObjects
1099
+ var appliedChangesList = hashTree.updateItems(locusStateElementsForThisSet.map(function (object) {
1100
+ return object.data ? {
1101
+ operation: 'update',
1102
+ item: object.htMeta.elementId
1103
+ } : {
1104
+ operation: 'remove',
1105
+ item: object.htMeta.elementId
1106
+ };
1107
+ }));
1108
+ (0, _lodash.zip)(appliedChangesList, locusStateElementsForThisSet).forEach(function (_ref5) {
1109
+ var _ref6 = (0, _slicedToArray2.default)(_ref5, 2),
1110
+ changeApplied = _ref6[0],
1111
+ object = _ref6[1];
1112
+ if (changeApplied) {
1113
+ // add to updatedObjects so that our locus DTO will get updated with the new object
1114
+ updatedObjects.push(object);
1115
+ }
1155
1116
  });
1156
- case 2:
1157
- case "end":
1158
- return _context6.stop();
1117
+ } else {
1118
+ _loggerProxy.default.logger.info("Locus-info:index#parseMessage --> ".concat(_this1.debugId, " unexpected (not visible) dataSet ").concat(dataSet.name, " received in hash tree message"));
1119
+ }
1159
1120
  }
1160
- }, _callee5, this);
1161
- }));
1162
- function parseMessage(_x6, _x7) {
1163
- return _parseMessage.apply(this, arguments);
1121
+ _this1.runSyncAlgorithm(dataSet);
1122
+ });
1164
1123
  }
1165
- return parseMessage;
1166
- }()
1124
+ if (dataSetsRequiringInitialization.length > 0) {
1125
+ // there are some data sets that we need to initialize asynchronously
1126
+ this.queueInitForNewVisibleDataSets(dataSetsRequiringInitialization);
1127
+ }
1128
+ if (updatedObjects.length === 0) {
1129
+ _loggerProxy.default.logger.info("HashTreeParser#parseMessage --> ".concat(this.debugId, " No objects updated as a result of received message"));
1130
+ }
1131
+ return updatedObjects;
1132
+ }
1133
+
1167
1134
  /**
1168
1135
  * Handles incoming hash tree messages, updates the hash trees and calls locusInfoUpdateCallback
1169
1136
  *
@@ -1171,66 +1138,37 @@ var HashTreeParser = /*#__PURE__*/function () {
1171
1138
  * @param {string} [debugText] - Optional debug text to include in logs
1172
1139
  * @returns {void}
1173
1140
  */
1174
- )
1175
1141
  }, {
1176
1142
  key: "handleMessage",
1177
- value: (function () {
1178
- var _handleMessage = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6(message, debugText) {
1179
- var updates;
1180
- return _regenerator.default.wrap(function (_context7) {
1181
- while (1) switch (_context7.prev = _context7.next) {
1182
- case 0:
1183
- if (message.heartbeatIntervalMs) {
1184
- this.heartbeatIntervalMs = message.heartbeatIntervalMs;
1185
- }
1186
- if (!this.isEndMessage(message)) {
1187
- _context7.next = 1;
1188
- break;
1189
- }
1190
- _loggerProxy.default.logger.info("HashTreeParser#parseMessage --> ".concat(this.debugId, " received sentinel END MEETING message"));
1191
- this.stopAllTimers();
1192
- this.callLocusInfoUpdateCallback({
1193
- updateType: LocusInfoUpdateType.MEETING_ENDED
1194
- });
1195
- _context7.next = 4;
1196
- break;
1197
- case 1:
1198
- if (!(message.locusStateElements === undefined)) {
1199
- _context7.next = 2;
1200
- break;
1201
- }
1202
- this.handleRootHashHeartBeatMessage(message);
1203
- this.resetHeartbeatWatchdogs(message.dataSets);
1204
- _context7.next = 4;
1205
- break;
1206
- case 2:
1207
- _context7.next = 3;
1208
- return this.parseMessage(message, debugText);
1209
- case 3:
1210
- updates = _context7.sent;
1211
- // Only reset watchdogs if the meeting hasn't ended
1212
- if (updates.updateType !== LocusInfoUpdateType.MEETING_ENDED) {
1213
- this.resetHeartbeatWatchdogs(message.dataSets);
1214
- }
1215
- this.callLocusInfoUpdateCallback(updates);
1216
- case 4:
1217
- case "end":
1218
- return _context7.stop();
1219
- }
1220
- }, _callee6, this);
1221
- }));
1222
- function handleMessage(_x8, _x9) {
1223
- return _handleMessage.apply(this, arguments);
1143
+ value: function handleMessage(message, debugText) {
1144
+ if (message.heartbeatIntervalMs) {
1145
+ this.heartbeatIntervalMs = message.heartbeatIntervalMs;
1224
1146
  }
1225
- return handleMessage;
1226
- }()
1147
+ if (this.isEndMessage(message)) {
1148
+ _loggerProxy.default.logger.info("HashTreeParser#parseMessage --> ".concat(this.debugId, " received sentinel END MEETING message"));
1149
+ this.stopAllTimers();
1150
+ this.callLocusInfoUpdateCallback({
1151
+ updateType: LocusInfoUpdateType.MEETING_ENDED
1152
+ });
1153
+ } else if (message.locusStateElements === undefined) {
1154
+ this.handleRootHashHeartBeatMessage(message);
1155
+ this.resetHeartbeatWatchdogs(message.dataSets);
1156
+ } else {
1157
+ var updatedObjects = this.parseMessage(message, debugText);
1158
+ this.resetHeartbeatWatchdogs(message.dataSets);
1159
+ this.callLocusInfoUpdateCallback({
1160
+ updateType: LocusInfoUpdateType.OBJECTS_UPDATED,
1161
+ updatedObjects: updatedObjects
1162
+ });
1163
+ }
1164
+ }
1165
+
1227
1166
  /**
1228
1167
  * Calls the updateInfo callback if there are any updates to report
1229
1168
  *
1230
1169
  * @param {Object} updates parsed from a Locus message
1231
1170
  * @returns {void}
1232
1171
  */
1233
- )
1234
1172
  }, {
1235
1173
  key: "callLocusInfoUpdateCallback",
1236
1174
  value: function callLocusInfoUpdateCallback(updates) {
@@ -1309,45 +1247,45 @@ var HashTreeParser = /*#__PURE__*/function () {
1309
1247
  }, {
1310
1248
  key: "performSync",
1311
1249
  value: (function () {
1312
- var _performSync = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7(dataSet, rootHash, reason) {
1250
+ var _performSync = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5(dataSet, rootHash, reason) {
1313
1251
  var mismatchedLeavesData, receivedHashes, _yield$this$getHashes, hashes, latestDataSetInfo, mismatchedLeaveIndexes, syncResponse, _t3, _t4;
1314
- return _regenerator.default.wrap(function (_context8) {
1315
- while (1) switch (_context8.prev = _context8.next) {
1252
+ return _regenerator.default.wrap(function (_context6) {
1253
+ while (1) switch (_context6.prev = _context6.next) {
1316
1254
  case 0:
1317
1255
  if (dataSet.hashTree) {
1318
- _context8.next = 1;
1256
+ _context6.next = 1;
1319
1257
  break;
1320
1258
  }
1321
- return _context8.abrupt("return");
1259
+ return _context6.abrupt("return");
1322
1260
  case 1:
1323
- _context8.prev = 1;
1261
+ _context6.prev = 1;
1324
1262
  _loggerProxy.default.logger.info("HashTreeParser#performSync --> ".concat(this.debugId, " ").concat(reason, ", syncing data set \"").concat(dataSet.name, "\""));
1325
1263
  mismatchedLeavesData = {};
1326
1264
  if (!(dataSet.leafCount !== 1)) {
1327
- _context8.next = 7;
1265
+ _context6.next = 7;
1328
1266
  break;
1329
1267
  }
1330
- _context8.prev = 2;
1331
- _context8.next = 3;
1268
+ _context6.prev = 2;
1269
+ _context6.next = 3;
1332
1270
  return this.getHashesFromLocus(dataSet.name, rootHash);
1333
1271
  case 3:
1334
- _yield$this$getHashes = _context8.sent;
1272
+ _yield$this$getHashes = _context6.sent;
1335
1273
  hashes = _yield$this$getHashes.hashes;
1336
1274
  latestDataSetInfo = _yield$this$getHashes.dataSet;
1337
1275
  receivedHashes = hashes;
1338
1276
  dataSet.hashTree.resize(latestDataSetInfo.leafCount);
1339
- _context8.next = 6;
1277
+ _context6.next = 6;
1340
1278
  break;
1341
1279
  case 4:
1342
- _context8.prev = 4;
1343
- _t3 = _context8["catch"](2);
1280
+ _context6.prev = 4;
1281
+ _t3 = _context6["catch"](2);
1344
1282
  if (!(_t3.statusCode === 409)) {
1345
- _context8.next = 5;
1283
+ _context6.next = 5;
1346
1284
  break;
1347
1285
  }
1348
1286
  // this is a leaf count mismatch, we should do nothing, just wait for another heartbeat message from Locus
1349
1287
  _loggerProxy.default.logger.info("HashTreeParser#getHashesFromLocus --> ".concat(this.debugId, " Got 409 when fetching hashes for data set \"").concat(dataSet.name, "\": ").concat(_t3.message));
1350
- return _context8.abrupt("return");
1288
+ return _context6.abrupt("return");
1351
1289
  case 5:
1352
1290
  throw _t3;
1353
1291
  case 6:
@@ -1356,30 +1294,30 @@ var HashTreeParser = /*#__PURE__*/function () {
1356
1294
  mismatchedLeaveIndexes.forEach(function (index) {
1357
1295
  mismatchedLeavesData[index] = dataSet.hashTree.getLeafData(index);
1358
1296
  });
1359
- _context8.next = 8;
1297
+ _context6.next = 8;
1360
1298
  break;
1361
1299
  case 7:
1362
1300
  mismatchedLeavesData[0] = dataSet.hashTree.getLeafData(0);
1363
1301
  case 8:
1364
1302
  if (!((0, _keys.default)(mismatchedLeavesData).length > 0)) {
1365
- _context8.next = 10;
1303
+ _context6.next = 10;
1366
1304
  break;
1367
1305
  }
1368
- _context8.next = 9;
1306
+ _context6.next = 9;
1369
1307
  return this.sendSyncRequestToLocus(dataSet, mismatchedLeavesData);
1370
1308
  case 9:
1371
- syncResponse = _context8.sent;
1309
+ syncResponse = _context6.sent;
1372
1310
  // sync API may return nothing (in that case data will arrive via messages)
1373
1311
  // or it may return a response in the same format as messages
1374
1312
  if (syncResponse) {
1375
1313
  this.handleMessage(syncResponse, 'via sync API');
1376
1314
  }
1377
1315
  case 10:
1378
- _context8.next = 12;
1316
+ _context6.next = 12;
1379
1317
  break;
1380
1318
  case 11:
1381
- _context8.prev = 11;
1382
- _t4 = _context8["catch"](1);
1319
+ _context6.prev = 11;
1320
+ _t4 = _context6["catch"](1);
1383
1321
  if (_t4 instanceof MeetingEndedError) {
1384
1322
  this.callLocusInfoUpdateCallback({
1385
1323
  updateType: LocusInfoUpdateType.MEETING_ENDED
@@ -1389,11 +1327,11 @@ var HashTreeParser = /*#__PURE__*/function () {
1389
1327
  }
1390
1328
  case 12:
1391
1329
  case "end":
1392
- return _context8.stop();
1330
+ return _context6.stop();
1393
1331
  }
1394
- }, _callee7, this, [[1, 11], [2, 4]]);
1332
+ }, _callee5, this, [[1, 11], [2, 4]]);
1395
1333
  }));
1396
- function performSync(_x0, _x1, _x10) {
1334
+ function performSync(_x6, _x7, _x8) {
1397
1335
  return _performSync.apply(this, arguments);
1398
1336
  }
1399
1337
  return performSync;
@@ -1429,36 +1367,36 @@ var HashTreeParser = /*#__PURE__*/function () {
1429
1367
  clearTimeout(dataSet.timer);
1430
1368
  }
1431
1369
  _loggerProxy.default.logger.info("HashTreeParser#runSyncAlgorithm --> ".concat(this.debugId, " setting \"").concat(dataSet.name, "\" sync timer for ").concat(delay));
1432
- dataSet.timer = setTimeout(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
1370
+ dataSet.timer = setTimeout(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
1433
1371
  var rootHash;
1434
- return _regenerator.default.wrap(function (_context9) {
1435
- while (1) switch (_context9.prev = _context9.next) {
1372
+ return _regenerator.default.wrap(function (_context7) {
1373
+ while (1) switch (_context7.prev = _context7.next) {
1436
1374
  case 0:
1437
1375
  dataSet.timer = undefined;
1438
1376
  if (dataSet.hashTree) {
1439
- _context9.next = 1;
1377
+ _context7.next = 1;
1440
1378
  break;
1441
1379
  }
1442
1380
  _loggerProxy.default.logger.warn("HashTreeParser#runSyncAlgorithm --> ".concat(_this11.debugId, " Data set \"").concat(dataSet.name, "\" no longer has a hash tree, cannot run sync algorithm"));
1443
- return _context9.abrupt("return");
1381
+ return _context7.abrupt("return");
1444
1382
  case 1:
1445
1383
  rootHash = dataSet.hashTree.getRootHash();
1446
1384
  if (!(dataSet.root !== rootHash)) {
1447
- _context9.next = 3;
1385
+ _context7.next = 3;
1448
1386
  break;
1449
1387
  }
1450
- _context9.next = 2;
1388
+ _context7.next = 2;
1451
1389
  return _this11.performSync(dataSet, rootHash, "Root hash mismatch: received=".concat(dataSet.root, ", ours=").concat(rootHash));
1452
1390
  case 2:
1453
- _context9.next = 4;
1391
+ _context7.next = 4;
1454
1392
  break;
1455
1393
  case 3:
1456
1394
  _loggerProxy.default.logger.info("HashTreeParser#runSyncAlgorithm --> ".concat(_this11.debugId, " \"").concat(dataSet.name, "\" root hash matching: ").concat(rootHash, ", version=").concat(dataSet.version));
1457
1395
  case 4:
1458
1396
  case "end":
1459
- return _context9.stop();
1397
+ return _context7.stop();
1460
1398
  }
1461
- }, _callee8);
1399
+ }, _callee6);
1462
1400
  })), delay);
1463
1401
  } else {
1464
1402
  _loggerProxy.default.logger.info("HashTreeParser#runSyncAlgorithm --> ".concat(this.debugId, " No delay for \"").concat(dataSet.name, "\" data set, skipping sync timer reset/setup"));
@@ -1497,19 +1435,19 @@ var HashTreeParser = /*#__PURE__*/function () {
1497
1435
  }
1498
1436
  var backoffTime = _this12.getWeightedBackoffTime(dataSet.backoff);
1499
1437
  var delay = _this12.heartbeatIntervalMs + backoffTime;
1500
- dataSet.heartbeatWatchdogTimer = setTimeout(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
1501
- return _regenerator.default.wrap(function (_context0) {
1502
- while (1) switch (_context0.prev = _context0.next) {
1438
+ dataSet.heartbeatWatchdogTimer = setTimeout(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
1439
+ return _regenerator.default.wrap(function (_context8) {
1440
+ while (1) switch (_context8.prev = _context8.next) {
1503
1441
  case 0:
1504
1442
  dataSet.heartbeatWatchdogTimer = undefined;
1505
1443
  _loggerProxy.default.logger.warn("HashTreeParser#resetHeartbeatWatchdogs --> ".concat(_this12.debugId, " Heartbeat watchdog fired for data set \"").concat(dataSet.name, "\" - no heartbeat received within expected interval, initiating sync"));
1506
- _context0.next = 1;
1444
+ _context8.next = 1;
1507
1445
  return _this12.performSync(dataSet, dataSet.hashTree.getRootHash(), "heartbeat watchdog expired");
1508
1446
  case 1:
1509
1447
  case "end":
1510
- return _context0.stop();
1448
+ return _context8.stop();
1511
1449
  }
1512
- }, _callee9);
1450
+ }, _callee7);
1513
1451
  })), delay);
1514
1452
  };
1515
1453
  for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {