@webex/plugin-meetings 3.10.0-next.8 → 3.10.0-set-bitrate.1

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.
Files changed (265) hide show
  1. package/dist/annotation/annotation.types.js.map +1 -1
  2. package/dist/annotation/constants.js.map +1 -1
  3. package/dist/annotation/index.js +19 -22
  4. package/dist/annotation/index.js.map +1 -1
  5. package/dist/breakouts/breakout.js +6 -6
  6. package/dist/breakouts/breakout.js.map +1 -1
  7. package/dist/breakouts/collection.js.map +1 -1
  8. package/dist/breakouts/edit-lock-error.js +9 -11
  9. package/dist/breakouts/edit-lock-error.js.map +1 -1
  10. package/dist/breakouts/events.js.map +1 -1
  11. package/dist/breakouts/index.js +126 -127
  12. package/dist/breakouts/index.js.map +1 -1
  13. package/dist/breakouts/request.js +6 -8
  14. package/dist/breakouts/request.js.map +1 -1
  15. package/dist/breakouts/utils.js.map +1 -1
  16. package/dist/common/browser-detection.js.map +1 -1
  17. package/dist/common/collection.js +1 -2
  18. package/dist/common/collection.js.map +1 -1
  19. package/dist/common/config.js.map +1 -1
  20. package/dist/common/errors/captcha-error.js +9 -11
  21. package/dist/common/errors/captcha-error.js.map +1 -1
  22. package/dist/common/errors/intent-to-join.js +10 -12
  23. package/dist/common/errors/intent-to-join.js.map +1 -1
  24. package/dist/common/errors/join-forbidden-error.js +10 -12
  25. package/dist/common/errors/join-forbidden-error.js.map +1 -1
  26. package/dist/common/errors/join-meeting.js +10 -12
  27. package/dist/common/errors/join-meeting.js.map +1 -1
  28. package/dist/common/errors/join-webinar-error.js +9 -11
  29. package/dist/common/errors/join-webinar-error.js.map +1 -1
  30. package/dist/common/errors/media.js +9 -11
  31. package/dist/common/errors/media.js.map +1 -1
  32. package/dist/common/errors/multistream-not-supported-error.js +9 -11
  33. package/dist/common/errors/multistream-not-supported-error.js.map +1 -1
  34. package/dist/common/errors/no-meeting-info.js +9 -11
  35. package/dist/common/errors/no-meeting-info.js.map +1 -1
  36. package/dist/common/errors/parameter.js +11 -14
  37. package/dist/common/errors/parameter.js.map +1 -1
  38. package/dist/common/errors/password-error.js +9 -11
  39. package/dist/common/errors/password-error.js.map +1 -1
  40. package/dist/common/errors/permission.js +9 -11
  41. package/dist/common/errors/permission.js.map +1 -1
  42. package/dist/common/errors/reclaim-host-role-errors.js +32 -38
  43. package/dist/common/errors/reclaim-host-role-errors.js.map +1 -1
  44. package/dist/common/errors/reconnection-not-started.js +5 -6
  45. package/dist/common/errors/reconnection-not-started.js.map +1 -1
  46. package/dist/common/errors/reconnection.js +9 -11
  47. package/dist/common/errors/reconnection.js.map +1 -1
  48. package/dist/common/errors/stats.js +9 -11
  49. package/dist/common/errors/stats.js.map +1 -1
  50. package/dist/common/errors/webex-errors.js +20 -29
  51. package/dist/common/errors/webex-errors.js.map +1 -1
  52. package/dist/common/errors/webex-meetings-error.js +9 -12
  53. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  54. package/dist/common/events/events-scope.js +9 -10
  55. package/dist/common/events/events-scope.js.map +1 -1
  56. package/dist/common/events/events.js +9 -10
  57. package/dist/common/events/events.js.map +1 -1
  58. package/dist/common/events/trigger-proxy.js.map +1 -1
  59. package/dist/common/events/util.js.map +1 -1
  60. package/dist/common/logs/logger-config.js.map +1 -1
  61. package/dist/common/logs/logger-proxy.js.map +1 -1
  62. package/dist/common/logs/request.js +17 -17
  63. package/dist/common/logs/request.js.map +1 -1
  64. package/dist/common/queue.js +1 -2
  65. package/dist/common/queue.js.map +1 -1
  66. package/dist/config.js +0 -1
  67. package/dist/config.js.map +1 -1
  68. package/dist/constants.js +11 -8
  69. package/dist/constants.js.map +1 -1
  70. package/dist/controls-options-manager/constants.js.map +1 -1
  71. package/dist/controls-options-manager/enums.js.map +1 -1
  72. package/dist/controls-options-manager/index.js +1 -2
  73. package/dist/controls-options-manager/index.js.map +1 -1
  74. package/dist/controls-options-manager/types.js.map +1 -1
  75. package/dist/controls-options-manager/util.js +1 -2
  76. package/dist/controls-options-manager/util.js.map +1 -1
  77. package/dist/hashTree/constants.js +20 -0
  78. package/dist/hashTree/constants.js.map +1 -0
  79. package/dist/hashTree/hashTree.js +515 -0
  80. package/dist/hashTree/hashTree.js.map +1 -0
  81. package/dist/hashTree/hashTreeParser.js +1266 -0
  82. package/dist/hashTree/hashTreeParser.js.map +1 -0
  83. package/dist/hashTree/types.js +22 -0
  84. package/dist/hashTree/types.js.map +1 -0
  85. package/dist/hashTree/utils.js +48 -0
  86. package/dist/hashTree/utils.js.map +1 -0
  87. package/dist/index.js +1 -2
  88. package/dist/index.js.map +1 -1
  89. package/dist/interceptors/index.js.map +1 -1
  90. package/dist/interceptors/locusRetry.js +6 -8
  91. package/dist/interceptors/locusRetry.js.map +1 -1
  92. package/dist/interceptors/locusRouteToken.js +6 -8
  93. package/dist/interceptors/locusRouteToken.js.map +1 -1
  94. package/dist/interpretation/collection.js.map +1 -1
  95. package/dist/interpretation/index.js +1 -2
  96. package/dist/interpretation/index.js.map +1 -1
  97. package/dist/interpretation/siLanguage.js +1 -1
  98. package/dist/interpretation/siLanguage.js.map +1 -1
  99. package/dist/locus-info/controlsUtils.js.map +1 -1
  100. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  101. package/dist/locus-info/fullState.js.map +1 -1
  102. package/dist/locus-info/hostUtils.js.map +1 -1
  103. package/dist/locus-info/index.js +584 -170
  104. package/dist/locus-info/index.js.map +1 -1
  105. package/dist/locus-info/infoUtils.js.map +1 -1
  106. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  107. package/dist/locus-info/parser.js +3 -4
  108. package/dist/locus-info/parser.js.map +1 -1
  109. package/dist/locus-info/selfUtils.js.map +1 -1
  110. package/dist/locus-info/types.js +7 -0
  111. package/dist/locus-info/types.js.map +1 -0
  112. package/dist/media/MediaConnectionAwaiter.js +1 -2
  113. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  114. package/dist/media/index.js +0 -2
  115. package/dist/media/index.js.map +1 -1
  116. package/dist/media/properties.js +15 -17
  117. package/dist/media/properties.js.map +1 -1
  118. package/dist/media/util.js.map +1 -1
  119. package/dist/meeting/brbState.js +8 -9
  120. package/dist/meeting/brbState.js.map +1 -1
  121. package/dist/meeting/connectionStateHandler.js +10 -13
  122. package/dist/meeting/connectionStateHandler.js.map +1 -1
  123. package/dist/meeting/in-meeting-actions.js.map +1 -1
  124. package/dist/meeting/index.js +1576 -1533
  125. package/dist/meeting/index.js.map +1 -1
  126. package/dist/meeting/locusMediaRequest.js +13 -17
  127. package/dist/meeting/locusMediaRequest.js.map +1 -1
  128. package/dist/meeting/muteState.js +11 -12
  129. package/dist/meeting/muteState.js.map +1 -1
  130. package/dist/meeting/request.js +101 -104
  131. package/dist/meeting/request.js.map +1 -1
  132. package/dist/meeting/request.type.js.map +1 -1
  133. package/dist/meeting/state.js.map +1 -1
  134. package/dist/meeting/type.js.map +1 -1
  135. package/dist/meeting/util.js +24 -23
  136. package/dist/meeting/util.js.map +1 -1
  137. package/dist/meeting/voicea-meeting.js +3 -3
  138. package/dist/meeting/voicea-meeting.js.map +1 -1
  139. package/dist/meeting-info/collection.js +7 -10
  140. package/dist/meeting-info/collection.js.map +1 -1
  141. package/dist/meeting-info/index.js +1 -2
  142. package/dist/meeting-info/index.js.map +1 -1
  143. package/dist/meeting-info/meeting-info-v2.js +135 -146
  144. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  145. package/dist/meeting-info/request.js +1 -2
  146. package/dist/meeting-info/request.js.map +1 -1
  147. package/dist/meeting-info/util.js +36 -37
  148. package/dist/meeting-info/util.js.map +1 -1
  149. package/dist/meeting-info/utilv2.js +30 -31
  150. package/dist/meeting-info/utilv2.js.map +1 -1
  151. package/dist/meetings/collection.js +6 -8
  152. package/dist/meetings/collection.js.map +1 -1
  153. package/dist/meetings/index.js +179 -141
  154. package/dist/meetings/index.js.map +1 -1
  155. package/dist/meetings/meetings.types.js.map +1 -1
  156. package/dist/meetings/request.js +6 -8
  157. package/dist/meetings/request.js.map +1 -1
  158. package/dist/meetings/util.js +25 -23
  159. package/dist/meetings/util.js.map +1 -1
  160. package/dist/member/index.js +1 -2
  161. package/dist/member/index.js.map +1 -1
  162. package/dist/member/types.js +6 -3
  163. package/dist/member/types.js.map +1 -1
  164. package/dist/member/util.js.map +1 -1
  165. package/dist/members/collection.js +1 -2
  166. package/dist/members/collection.js.map +1 -1
  167. package/dist/members/index.js +18 -21
  168. package/dist/members/index.js.map +1 -1
  169. package/dist/members/request.js +8 -11
  170. package/dist/members/request.js.map +1 -1
  171. package/dist/members/types.js.map +1 -1
  172. package/dist/members/util.js.map +1 -1
  173. package/dist/metrics/constants.js +3 -1
  174. package/dist/metrics/constants.js.map +1 -1
  175. package/dist/metrics/index.js +3 -4
  176. package/dist/metrics/index.js.map +1 -1
  177. package/dist/multistream/mediaRequestManager.js +1 -2
  178. package/dist/multistream/mediaRequestManager.js.map +1 -1
  179. package/dist/multistream/receiveSlot.js +34 -45
  180. package/dist/multistream/receiveSlot.js.map +1 -1
  181. package/dist/multistream/receiveSlotManager.js +8 -9
  182. package/dist/multistream/receiveSlotManager.js.map +1 -1
  183. package/dist/multistream/remoteMedia.js +12 -15
  184. package/dist/multistream/remoteMedia.js.map +1 -1
  185. package/dist/multistream/remoteMediaGroup.js +1 -2
  186. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  187. package/dist/multistream/remoteMediaManager.js +122 -123
  188. package/dist/multistream/remoteMediaManager.js.map +1 -1
  189. package/dist/multistream/sendSlotManager.js +29 -30
  190. package/dist/multistream/sendSlotManager.js.map +1 -1
  191. package/dist/personal-meeting-room/index.js +16 -19
  192. package/dist/personal-meeting-room/index.js.map +1 -1
  193. package/dist/personal-meeting-room/request.js +7 -10
  194. package/dist/personal-meeting-room/request.js.map +1 -1
  195. package/dist/personal-meeting-room/util.js.map +1 -1
  196. package/dist/reachability/clusterReachability.js +56 -373
  197. package/dist/reachability/clusterReachability.js.map +1 -1
  198. package/dist/reachability/index.js +203 -205
  199. package/dist/reachability/index.js.map +1 -1
  200. package/dist/reachability/reachability.types.js +14 -1
  201. package/dist/reachability/reachability.types.js.map +1 -1
  202. package/dist/reachability/reachabilityPeerConnection.js +445 -0
  203. package/dist/reachability/reachabilityPeerConnection.js.map +1 -0
  204. package/dist/reachability/request.js.map +1 -1
  205. package/dist/reachability/util.js.map +1 -1
  206. package/dist/reactions/constants.js.map +1 -1
  207. package/dist/reactions/reactions.js.map +1 -1
  208. package/dist/reactions/reactions.type.js.map +1 -1
  209. package/dist/reconnection-manager/index.js +178 -176
  210. package/dist/reconnection-manager/index.js.map +1 -1
  211. package/dist/recording-controller/enums.js.map +1 -1
  212. package/dist/recording-controller/index.js +1 -2
  213. package/dist/recording-controller/index.js.map +1 -1
  214. package/dist/recording-controller/util.js.map +1 -1
  215. package/dist/roap/index.js +12 -15
  216. package/dist/roap/index.js.map +1 -1
  217. package/dist/roap/request.js +24 -26
  218. package/dist/roap/request.js.map +1 -1
  219. package/dist/roap/turnDiscovery.js +75 -76
  220. package/dist/roap/turnDiscovery.js.map +1 -1
  221. package/dist/roap/types.js.map +1 -1
  222. package/dist/transcription/index.js +4 -5
  223. package/dist/transcription/index.js.map +1 -1
  224. package/dist/types/constants.d.ts +26 -21
  225. package/dist/types/hashTree/constants.d.ts +8 -0
  226. package/dist/types/hashTree/hashTree.d.ts +129 -0
  227. package/dist/types/hashTree/hashTreeParser.d.ts +260 -0
  228. package/dist/types/hashTree/types.d.ts +27 -0
  229. package/dist/types/hashTree/utils.d.ts +9 -0
  230. package/dist/types/locus-info/index.d.ts +97 -80
  231. package/dist/types/locus-info/types.d.ts +54 -0
  232. package/dist/types/meeting/index.d.ts +22 -9
  233. package/dist/types/meetings/index.d.ts +9 -2
  234. package/dist/types/metrics/constants.d.ts +2 -0
  235. package/dist/types/reachability/clusterReachability.d.ts +10 -88
  236. package/dist/types/reachability/reachability.types.d.ts +12 -1
  237. package/dist/types/reachability/reachabilityPeerConnection.d.ts +111 -0
  238. package/dist/webinar/collection.js +1 -2
  239. package/dist/webinar/collection.js.map +1 -1
  240. package/dist/webinar/index.js +148 -158
  241. package/dist/webinar/index.js.map +1 -1
  242. package/package.json +22 -21
  243. package/src/constants.ts +13 -1
  244. package/src/hashTree/constants.ts +9 -0
  245. package/src/hashTree/hashTree.ts +463 -0
  246. package/src/hashTree/hashTreeParser.ts +1161 -0
  247. package/src/hashTree/types.ts +32 -0
  248. package/src/hashTree/utils.ts +42 -0
  249. package/src/locus-info/index.ts +597 -154
  250. package/src/locus-info/types.ts +53 -0
  251. package/src/meeting/index.ts +78 -27
  252. package/src/meeting/util.ts +1 -0
  253. package/src/meetings/index.ts +104 -51
  254. package/src/metrics/constants.ts +2 -0
  255. package/src/reachability/clusterReachability.ts +50 -347
  256. package/src/reachability/reachability.types.ts +15 -1
  257. package/src/reachability/reachabilityPeerConnection.ts +416 -0
  258. package/test/unit/spec/hashTree/hashTree.ts +655 -0
  259. package/test/unit/spec/hashTree/hashTreeParser.ts +1532 -0
  260. package/test/unit/spec/hashTree/utils.ts +103 -0
  261. package/test/unit/spec/locus-info/index.js +795 -16
  262. package/test/unit/spec/meeting/index.js +120 -20
  263. package/test/unit/spec/meeting/utils.js +77 -0
  264. package/test/unit/spec/meetings/index.js +71 -26
  265. package/test/unit/spec/reachability/clusterReachability.ts +281 -138
@@ -1,23 +1,35 @@
1
1
  "use strict";
2
2
 
3
+ var _typeof = require("@babel/runtime-corejs2/helpers/typeof");
3
4
  var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
5
+ var _Object$keys = require("@babel/runtime-corejs2/core-js/object/keys");
6
+ var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
7
+ var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
8
+ var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
9
+ var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
10
+ var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
11
  var _Array$from = require("@babel/runtime-corejs2/core-js/array/from");
5
12
  var _Symbol = require("@babel/runtime-corejs2/core-js/symbol");
6
13
  var _Symbol$iterator = require("@babel/runtime-corejs2/core-js/symbol/iterator");
7
14
  var _Array$isArray2 = require("@babel/runtime-corejs2/core-js/array/is-array");
8
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
15
+ var _WeakMap = require("@babel/runtime-corejs2/core-js/weak-map");
9
16
  var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
10
17
  _Object$defineProperty(exports, "__esModule", {
11
18
  value: true
12
19
  });
13
20
  exports.default = void 0;
21
+ var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
22
+ var _map = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/map"));
23
+ var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
24
+ var _assign = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/assign"));
25
+ var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
14
26
  var _isArray = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/array/is-array"));
27
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
15
28
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
16
29
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
17
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
18
- var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
19
30
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
20
31
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
32
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
21
33
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
22
34
  var _lodash = require("lodash");
23
35
  var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
@@ -33,11 +45,25 @@ var _mediaSharesUtils = _interopRequireDefault(require("./mediaSharesUtils"));
33
45
  var _parser = _interopRequireDefault(require("./parser"));
34
46
  var _metrics = _interopRequireDefault(require("../metrics"));
35
47
  var _constants2 = _interopRequireDefault(require("../metrics/constants"));
36
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && o[_Symbol$iterator] || o["@@iterator"]; if (!it) { if (_Array$isArray2(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
37
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
38
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
39
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
40
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
48
+ var _hashTreeParser = _interopRequireWildcard(require("../hashTree/hashTreeParser"));
49
+ var _types = require("../hashTree/types");
50
+ function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
51
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && r[_Symbol$iterator] || r["@@iterator"]; if (!t) { if (_Array$isArray2(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
52
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
53
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
54
+ function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
55
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
56
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
57
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
58
+ // list of top level keys in Locus DTO relevant for Hash Tree DTOs processing
59
+ // it does not contain fields specific to classic Locus DTOs like sequence or baseSequence
60
+ var LocusDtoTopLevelKeys = ['controls', 'fullState', 'host', 'info', 'links', 'mediaShares', 'meetings', 'participants', 'replaces', 'self', 'sequence', 'syncUrl', 'url', 'htMeta' // only exists when hash trees are used
61
+ ];
62
+ var LocusObjectStateAfterUpdates = {
63
+ unchanged: 'unchanged',
64
+ removed: 'removed',
65
+ updated: 'updated'
66
+ };
41
67
  /**
42
68
  * @description LocusInfo extends ChildEmitter to convert locusInfo info a private emitter to parent object
43
69
  * @export
@@ -45,8 +71,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
45
71
  * @class LocusInfo
46
72
  */
47
73
  var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
48
- (0, _inherits2.default)(LocusInfo, _EventsScope);
49
- var _super = _createSuper(LocusInfo);
50
74
  /**
51
75
  * Constructor
52
76
  * @param {function} updateMeeting callback to update the meeting object from an object
@@ -57,38 +81,37 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
57
81
  function LocusInfo(updateMeeting, webex, meetingId) {
58
82
  var _this;
59
83
  (0, _classCallCheck2.default)(this, LocusInfo);
60
- _this = _super.call(this);
61
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "compareAndUpdateFlags", void 0);
62
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "emitChange", void 0);
63
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "locusParser", void 0);
64
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingId", void 0);
65
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "parsedLocus", void 0);
66
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateMeeting", void 0);
67
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "webex", void 0);
68
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "aclUrl", void 0);
69
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "baseSequence", void 0);
70
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "created", void 0);
71
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "identities", void 0);
72
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "membership", void 0);
73
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "participants", void 0);
74
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "participantsUrl", void 0);
75
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "replaces", void 0);
76
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "scheduledMeeting", void 0);
77
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sequence", void 0);
78
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "controls", void 0);
79
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "conversationUrl", void 0);
80
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "embeddedApps", void 0);
81
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "fullState", void 0);
82
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "host", void 0);
83
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "info", void 0);
84
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "roles", void 0);
85
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaShares", void 0);
86
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "replace", void 0);
87
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "url", void 0);
88
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "services", void 0);
89
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "resources", void 0);
90
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mainSessionLocusCache", void 0);
91
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "self", void 0);
84
+ _this = _callSuper(this, LocusInfo);
85
+ (0, _defineProperty2.default)(_this, "compareAndUpdateFlags", void 0);
86
+ (0, _defineProperty2.default)(_this, "emitChange", void 0);
87
+ (0, _defineProperty2.default)(_this, "locusParser", void 0);
88
+ (0, _defineProperty2.default)(_this, "meetingId", void 0);
89
+ (0, _defineProperty2.default)(_this, "parsedLocus", void 0);
90
+ (0, _defineProperty2.default)(_this, "updateMeeting", void 0);
91
+ (0, _defineProperty2.default)(_this, "webex", void 0);
92
+ (0, _defineProperty2.default)(_this, "aclUrl", void 0);
93
+ (0, _defineProperty2.default)(_this, "baseSequence", void 0);
94
+ (0, _defineProperty2.default)(_this, "created", void 0);
95
+ (0, _defineProperty2.default)(_this, "participants", void 0);
96
+ (0, _defineProperty2.default)(_this, "replaces", void 0);
97
+ (0, _defineProperty2.default)(_this, "scheduledMeeting", void 0);
98
+ (0, _defineProperty2.default)(_this, "sequence", void 0);
99
+ (0, _defineProperty2.default)(_this, "controls", void 0);
100
+ (0, _defineProperty2.default)(_this, "conversationUrl", void 0);
101
+ (0, _defineProperty2.default)(_this, "embeddedApps", void 0);
102
+ (0, _defineProperty2.default)(_this, "fullState", void 0);
103
+ (0, _defineProperty2.default)(_this, "host", void 0);
104
+ (0, _defineProperty2.default)(_this, "info", void 0);
105
+ (0, _defineProperty2.default)(_this, "roles", void 0);
106
+ (0, _defineProperty2.default)(_this, "mediaShares", void 0);
107
+ (0, _defineProperty2.default)(_this, "url", void 0);
108
+ (0, _defineProperty2.default)(_this, "links", void 0);
109
+ (0, _defineProperty2.default)(_this, "mainSessionLocusCache", void 0);
110
+ (0, _defineProperty2.default)(_this, "self", void 0);
111
+ (0, _defineProperty2.default)(_this, "hashTreeParser", void 0);
112
+ (0, _defineProperty2.default)(_this, "hashTreeObjectId2ParticipantId", void 0);
113
+ // mapping of hash tree object ids to participant ids
114
+ (0, _defineProperty2.default)(_this, "classicVsHashTreeMismatchMetricCounter", 0);
92
115
  _this.parsedLocus = {
93
116
  states: []
94
117
  };
@@ -98,18 +121,21 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
98
121
  _this.meetingId = meetingId;
99
122
  _this.updateMeeting = updateMeeting;
100
123
  _this.locusParser = new _parser.default();
124
+ _this.hashTreeObjectId2ParticipantId = new _map.default();
101
125
  return _this;
102
126
  }
103
127
 
104
128
  /**
105
129
  * Does a Locus sync. It tries to get the latest delta DTO or if it can't, it falls back to getting the full Locus DTO.
130
+ * WARNING: This function must not be used for hash tree based Locus meetings.
106
131
  *
107
132
  * @param {Meeting} meeting
108
133
  * @param {boolean} isLocusUrlChanged
109
134
  * @param {Locus} locus
110
135
  * @returns {undefined}
111
136
  */
112
- (0, _createClass2.default)(LocusInfo, [{
137
+ (0, _inherits2.default)(LocusInfo, _EventsScope);
138
+ return (0, _createClass2.default)(LocusInfo, [{
113
139
  key: "doLocusSync",
114
140
  value: function doLocusSync(meeting, isLocusUrlChanged, locus) {
115
141
  var _this$locusParser$wor,
@@ -268,17 +294,13 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
268
294
  }, {
269
295
  key: "init",
270
296
  value: function init() {
271
- var _locus$links, _locus$links2;
272
297
  var locus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
273
298
  this.created = locus.created || null;
274
299
  this.scheduledMeeting = locus.meeting || null;
275
- this.participantsUrl = locus.participantsUrl || null;
276
300
  this.replaces = locus.replaces || null;
277
301
  this.aclUrl = locus.aclUrl || null;
278
302
  this.baseSequence = locus.baseSequence || null;
279
303
  this.sequence = locus.sequence || null;
280
- this.membership = locus.membership || null;
281
- this.identities = locus.identities || null;
282
304
  this.participants = locus.participants || null;
283
305
 
284
306
  /**
@@ -304,35 +326,400 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
304
326
  this.updateSelf(locus.self);
305
327
  this.updateHostInfo(locus.host);
306
328
  this.updateMediaShares(locus.mediaShares);
307
- this.updateServices((_locus$links = locus.links) === null || _locus$links === void 0 ? void 0 : _locus$links.services);
308
- this.updateResources((_locus$links2 = locus.links) === null || _locus$links2 === void 0 ? void 0 : _locus$links2.resources);
329
+ this.updateLinks(locus.links);
309
330
  }
310
331
 
311
332
  /**
312
- * @param {Object} locus
333
+ * Creates the HashTreeParser instance.
334
+ * @param {Object} initial locus data
335
+ * @returns {void}
336
+ */
337
+ }, {
338
+ key: "createHashTreeParser",
339
+ value: function createHashTreeParser(_ref) {
340
+ var initialLocus = _ref.initialLocus;
341
+ return new _hashTreeParser.default({
342
+ initialLocus: initialLocus,
343
+ webexRequest: this.webex.request.bind(this.webex),
344
+ locusInfoUpdateCallback: this.updateFromHashTree.bind(this),
345
+ debugId: "HT-".concat(this.meetingId.substring(0, 4))
346
+ });
347
+ }
348
+
349
+ /**
350
+ * @param {Object} data - data to initialize locus info with. It may be from a join or GET /loci response or from a Mercury event that triggers a creation of meeting object
313
351
  * @returns {undefined}
314
352
  * @memberof LocusInfo
315
353
  */
316
354
  }, {
317
355
  key: "initialSetup",
318
- value: function initialSetup(locus) {
319
- this.updateLocusCache(locus);
320
- this.onFullLocus(locus);
356
+ value: (function () {
357
+ var _initialSetup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(data) {
358
+ var _data$locus, _data$locus$links, _data$locus$links$res, _data$locus$links$res2;
359
+ var _data$hashTreeMessage, _selfObject$data, selfObject, _data$locus2, _data$locus2$self, _t;
360
+ return _regenerator.default.wrap(function (_context) {
361
+ while (1) switch (_context.prev = _context.next) {
362
+ case 0:
363
+ _t = data.trigger;
364
+ _context.next = _t === 'locus-message' ? 1 : _t === 'join-response' ? 6 : _t === 'get-loci-response' ? 7 : 10;
365
+ break;
366
+ case 1:
367
+ if (!data.hashTreeMessage) {
368
+ _context.next = 4;
369
+ break;
370
+ }
371
+ // we need the SELF object to be in the received message, because it contains visibleDataSets
372
+ // and these are needed to initialize all the hash trees
373
+ selfObject = (_data$hashTreeMessage = data.hashTreeMessage.locusStateElements) === null || _data$hashTreeMessage === void 0 ? void 0 : _data$hashTreeMessage.find(function (el) {
374
+ return (0, _hashTreeParser.isSelf)(el);
375
+ });
376
+ if (selfObject !== null && selfObject !== void 0 && (_selfObject$data = selfObject.data) !== null && _selfObject$data !== void 0 && _selfObject$data.visibleDataSets) {
377
+ _context.next = 2;
378
+ break;
379
+ }
380
+ _loggerProxy.default.logger.warn("Locus-info:index#initialSetup --> cannot initialize HashTreeParser, SELF object with visibleDataSets is missing in the message");
381
+ throw new Error('SELF object with visibleDataSets is missing in the message');
382
+ case 2:
383
+ _loggerProxy.default.logger.info('Locus-info:index#initialSetup --> creating HashTreeParser from message');
384
+ // first create the HashTreeParser, but don't initialize it with any data yet
385
+ // pass just a fake locus that contains only the visibleDataSets
386
+ this.hashTreeParser = this.createHashTreeParser({
387
+ initialLocus: {
388
+ locus: {
389
+ self: {
390
+ visibleDataSets: selfObject.data.visibleDataSets
391
+ }
392
+ },
393
+ dataSets: [] // empty, because they will be populated in initializeFromMessage() call // dataSets: data.hashTreeMessage.dataSets,
394
+ }
395
+ });
321
396
 
322
- // Change it to true after it receives it first locus object
323
- this.emitChange = true;
324
- }
397
+ // now handle the message - that should populate all the visible datasets
398
+ _context.next = 3;
399
+ return this.hashTreeParser.initializeFromMessage(data.hashTreeMessage);
400
+ case 3:
401
+ _context.next = 5;
402
+ break;
403
+ case 4:
404
+ // "classic" Locus case, no hash trees involved
405
+ this.updateLocusCache(data.locus);
406
+ this.onFullLocus(data.locus, undefined);
407
+ case 5:
408
+ return _context.abrupt("continue", 10);
409
+ case 6:
410
+ this.updateLocusCache(data.locus);
411
+ this.onFullLocus(data.locus, undefined, data.dataSets);
412
+ return _context.abrupt("continue", 10);
413
+ case 7:
414
+ if (!((_data$locus = data.locus) !== null && _data$locus !== void 0 && (_data$locus$links = _data$locus.links) !== null && _data$locus$links !== void 0 && (_data$locus$links$res = _data$locus$links.resources) !== null && _data$locus$links$res !== void 0 && (_data$locus$links$res2 = _data$locus$links$res.visibleDataSets) !== null && _data$locus$links$res2 !== void 0 && _data$locus$links$res2.url)) {
415
+ _context.next = 9;
416
+ break;
417
+ }
418
+ _loggerProxy.default.logger.info('Locus-info:index#initialSetup --> creating HashTreeParser from get-loci-response');
419
+ // first create the HashTreeParser, but don't initialize it with any data yet
420
+ // pass just a fake locus that contains only the visibleDataSets
421
+ this.hashTreeParser = this.createHashTreeParser({
422
+ initialLocus: {
423
+ locus: {
424
+ self: {
425
+ visibleDataSets: (_data$locus2 = data.locus) === null || _data$locus2 === void 0 ? void 0 : (_data$locus2$self = _data$locus2.self) === null || _data$locus2$self === void 0 ? void 0 : _data$locus2$self.visibleDataSets
426
+ }
427
+ },
428
+ dataSets: [] // empty, because we don't have them yet
429
+ }
430
+ });
325
431
 
432
+ // now initialize all the data
433
+ _context.next = 8;
434
+ return this.hashTreeParser.initializeFromGetLociResponse(data.locus);
435
+ case 8:
436
+ _context.next = 10;
437
+ break;
438
+ case 9:
439
+ // "classic" Locus case, no hash trees involved
440
+ this.updateLocusCache(data.locus);
441
+ this.onFullLocus(data.locus, undefined);
442
+ case 10:
443
+ // Change it to true after it receives it first locus object
444
+ this.emitChange = true;
445
+ case 11:
446
+ case "end":
447
+ return _context.stop();
448
+ }
449
+ }, _callee, this);
450
+ }));
451
+ function initialSetup(_x) {
452
+ return _initialSetup.apply(this, arguments);
453
+ }
454
+ return initialSetup;
455
+ }()
326
456
  /**
327
457
  * Handles HTTP response from Locus API call.
328
458
  * @param {Meeting} meeting meeting object
329
459
  * @param {LocusApiResponseBody} responseBody body of the http response from Locus API call
330
460
  * @returns {void}
331
461
  */
462
+ )
332
463
  }, {
333
464
  key: "handleLocusAPIResponse",
334
465
  value: function handleLocusAPIResponse(meeting, responseBody) {
335
- this.handleLocusDelta(responseBody.locus, meeting);
466
+ if (this.hashTreeParser) {
467
+ if (!responseBody.dataSets) {
468
+ this.sendClassicVsHashTreeMismatchMetric(meeting, "expected hash tree dataSets in API response but they are missing");
469
+ // continuing as we can still manage without responseBody.dataSets, but this is very suspicious
470
+ }
471
+ _loggerProxy.default.logger.info('Locus-info:index#handleLocusAPIResponse --> passing Locus API response to HashTreeParser: ', responseBody);
472
+ // update the data in our hash trees
473
+ this.hashTreeParser.handleLocusUpdate(responseBody);
474
+ } else {
475
+ if (responseBody.dataSets) {
476
+ this.sendClassicVsHashTreeMismatchMetric(meeting, "unexpected hash tree dataSets in API response");
477
+ }
478
+ // classic Locus delta
479
+ this.handleLocusDelta(responseBody.locus, meeting);
480
+ }
481
+ }
482
+
483
+ /**
484
+ *
485
+ * @param {HashTreeObject} object data set object
486
+ * @param {any} locus
487
+ * @returns {void}
488
+ */
489
+ }, {
490
+ key: "updateLocusFromHashTreeObject",
491
+ value: function updateLocusFromHashTreeObject(object, locus) {
492
+ var _this4 = this;
493
+ var type = object.htMeta.elementId.type.toLowerCase();
494
+ var addParticipantObject = function addParticipantObject(obj) {
495
+ if (!locus.participants) {
496
+ locus.participants = [];
497
+ }
498
+ locus.participants.push(obj.data);
499
+ _this4.hashTreeObjectId2ParticipantId.set(obj.htMeta.elementId.id, obj.data.id);
500
+ };
501
+ switch (type) {
502
+ case _types.ObjectType.locus:
503
+ {
504
+ if (!object.data) {
505
+ // not doing anything here, as we need Locus to always be there (at least some fields)
506
+ // and that's already taken care of in updateFromHashTree()
507
+ _loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> LOCUS object removed, version=".concat(object.htMeta.elementId.version));
508
+ return locus;
509
+ }
510
+ // replace the main locus
511
+
512
+ // The Locus object we receive from backend has empty participants array,
513
+ // and may have (although it shouldn't) other fields that are managed by other ObjectTypes
514
+ // like "fullState" or "info", so we're making sure to delete them here
515
+ var locusObjectFromData = object.data;
516
+ (0, _values.default)(_types.ObjectTypeToLocusKeyMap).forEach(function (locusDtoKey) {
517
+ delete locusObjectFromData[locusDtoKey];
518
+ });
519
+ locus = _objectSpread(_objectSpread({}, locus), locusObjectFromData);
520
+ _loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> LOCUS object updated to version=".concat(object.htMeta.elementId.version));
521
+ break;
522
+ }
523
+ case _types.ObjectType.mediaShare:
524
+ if (object.data) {
525
+ var _object$data$floor, _object$data$floor2, _object$data$floor2$b, _locus$mediaShares;
526
+ _loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> mediaShare id=".concat(object.htMeta.elementId.id, " name='").concat(object.data.name, "' updated ").concat(object.data.name === 'content' ? "floor=".concat((_object$data$floor = object.data.floor) === null || _object$data$floor === void 0 ? void 0 : _object$data$floor.disposition, ", ").concat((_object$data$floor2 = object.data.floor) === null || _object$data$floor2 === void 0 ? void 0 : (_object$data$floor2$b = _object$data$floor2.beneficiary) === null || _object$data$floor2$b === void 0 ? void 0 : _object$data$floor2$b.id) : '', " version=").concat(object.htMeta.elementId.version));
527
+ var existingMediaShare = (_locus$mediaShares = locus.mediaShares) === null || _locus$mediaShares === void 0 ? void 0 : _locus$mediaShares.find(function (ms) {
528
+ return ms.htMeta.elementId.id === object.htMeta.elementId.id;
529
+ });
530
+ if (existingMediaShare) {
531
+ (0, _assign.default)(existingMediaShare, object.data);
532
+ } else {
533
+ locus.mediaShares = locus.mediaShares || [];
534
+ locus.mediaShares.push(object.data);
535
+ }
536
+ } else {
537
+ var _locus$mediaShares2;
538
+ _loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> mediaShare id=".concat(object.htMeta.elementId.id, " removed, version=").concat(object.htMeta.elementId.version));
539
+ locus.mediaShares = (_locus$mediaShares2 = locus.mediaShares) === null || _locus$mediaShares2 === void 0 ? void 0 : _locus$mediaShares2.filter(function (ms) {
540
+ return ms.htMeta.elementId.id !== object.htMeta.elementId.id;
541
+ });
542
+ }
543
+ break;
544
+ case _types.ObjectType.participant:
545
+ _loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> participant id=".concat(object.htMeta.elementId.id, " ").concat(object.data ? 'updated' : 'removed', " version=").concat(object.htMeta.elementId.version));
546
+ if (object.data) {
547
+ addParticipantObject(object);
548
+ } else {
549
+ var participantId = this.hashTreeObjectId2ParticipantId.get(object.htMeta.elementId.id);
550
+ if (!locus.jsSdkMeta) {
551
+ locus.jsSdkMeta = {
552
+ removedParticipantIds: []
553
+ };
554
+ }
555
+ locus.jsSdkMeta.removedParticipantIds.push(participantId);
556
+ this.hashTreeObjectId2ParticipantId.delete(object.htMeta.elementId.id);
557
+ }
558
+ break;
559
+ case _types.ObjectType.links:
560
+ case _types.ObjectType.info:
561
+ case _types.ObjectType.fullState:
562
+ case _types.ObjectType.self:
563
+ if (!object.data) {
564
+ // self without data is handled inside HashTreeParser and results in LocusInfoUpdateType.MEETING_ENDED, so we should never get here
565
+ // all other types info, fullstate, etc - Locus should never send them without data
566
+ _loggerProxy.default.logger.warn("Locus-info:index#updateLocusFromHashTreeObject --> received ".concat(type, " object without data, this is not expected! version=").concat(object.htMeta.elementId.version));
567
+ } else {
568
+ var _locus$info, _object$data$controls, _object$data$controls2, _object$data$controls3;
569
+ _loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> ".concat(type, " object updated to version ").concat(object.htMeta.elementId.version));
570
+ var locusDtoKey = _types.ObjectTypeToLocusKeyMap[type];
571
+ locus[locusDtoKey] = object.data;
572
+
573
+ /* Hash tree based webinar attendees don't receive a Participant object for themselves from Locus,
574
+ but a lot of existing code in SDK and web app expects a member object for self to exist,
575
+ so whenever SELF changes for a webinar attendee, we copy it into a participant object.
576
+ We can do it, because SELF has always all the same properties as a participant object.
577
+ */
578
+ if (type === _types.ObjectType.self && (_locus$info = locus.info) !== null && _locus$info !== void 0 && _locus$info.isWebinar && (_object$data$controls = object.data.controls) !== null && _object$data$controls !== void 0 && (_object$data$controls2 = _object$data$controls.role) !== null && _object$data$controls2 !== void 0 && (_object$data$controls3 = _object$data$controls2.roles) !== null && _object$data$controls3 !== void 0 && _object$data$controls3.find(function (r) {
579
+ return r.type === _constants.SELF_ROLES.ATTENDEE && r.hasRole;
580
+ })) {
581
+ _loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> webinar attendee: creating participant object from self");
582
+ addParticipantObject(object);
583
+ }
584
+ }
585
+ break;
586
+ default:
587
+ _loggerProxy.default.logger.warn("Locus-info:index#updateLocusFromHashTreeObject --> received unsupported object type ".concat(type));
588
+ break;
589
+ }
590
+ return locus;
591
+ }
592
+
593
+ /**
594
+ * Sends a metric when we receive something from Locus that uses hash trees while we
595
+ * expect classic deltas or the other way around.
596
+ * @param {Meeting} meeting
597
+ * @param {string} message
598
+ * @returns {void}
599
+ */
600
+ }, {
601
+ key: "sendClassicVsHashTreeMismatchMetric",
602
+ value: function sendClassicVsHashTreeMismatchMetric(meeting, message) {
603
+ _loggerProxy.default.logger.warn("Locus-info:index#sendClassicVsHashTreeMismatchMetric --> classic vs hash tree mismatch! ".concat(message));
604
+
605
+ // we don't want to flood the metrics system
606
+ if (this.classicVsHashTreeMismatchMetricCounter < 5) {
607
+ _metrics.default.sendBehavioralMetric(_constants2.default.LOCUS_CLASSIC_VS_HASH_TREE_MISMATCH, {
608
+ correlationId: meeting.correlationId,
609
+ message: message
610
+ });
611
+ this.classicVsHashTreeMismatchMetricCounter += 1;
612
+ }
613
+ }
614
+
615
+ /**
616
+ * Handles a hash tree message received from Locus.
617
+ *
618
+ * @param {Meeting} meeting - The meeting object
619
+ * @param {eventType} eventType - The event type
620
+ * @param {HashTreeMessage} message incoming hash tree message
621
+ * @returns {void}
622
+ */
623
+ }, {
624
+ key: "handleHashTreeMessage",
625
+ value: function handleHashTreeMessage(meeting, eventType, message) {
626
+ if (eventType !== _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
627
+ this.sendClassicVsHashTreeMismatchMetric(meeting, "got ".concat(eventType, ", expected ").concat(_constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED));
628
+ return;
629
+ }
630
+ this.hashTreeParser.handleMessage(message);
631
+ }
632
+
633
+ /**
634
+ * Callback registered with HashTreeParser to receive locus info updates.
635
+ * Updates our locus info based on the data parsed by the hash tree parser.
636
+ *
637
+ * @param {LocusInfoUpdateType} updateType - The type of update received.
638
+ * @param {Object} [data] - Additional data for the update, if applicable.
639
+ * @returns {void}
640
+ */
641
+ }, {
642
+ key: "updateFromHashTree",
643
+ value: function updateFromHashTree(updateType, data) {
644
+ var _this5 = this;
645
+ switch (updateType) {
646
+ case _hashTreeParser.LocusInfoUpdateType.OBJECTS_UPDATED:
647
+ {
648
+ // initialize our new locus
649
+ var locus = {
650
+ participants: [],
651
+ jsSdkMeta: {
652
+ removedParticipantIds: []
653
+ }
654
+ };
655
+
656
+ // first go over all the updates and check what happens with the main locus object
657
+ var locusObjectStateAfterUpdates = LocusObjectStateAfterUpdates.unchanged;
658
+ data.updatedObjects.forEach(function (object) {
659
+ if (object.htMeta.elementId.type.toLowerCase() === _types.ObjectType.locus) {
660
+ if (locusObjectStateAfterUpdates === LocusObjectStateAfterUpdates.updated) {
661
+ var _object$data;
662
+ // this code doesn't supported it right now,
663
+ // cases for "updated" followed by "removed", or multiple "updated" would need more handling
664
+ // but these should never happen
665
+ _loggerProxy.default.logger.warn("Locus-info:index#updateFromHashTree --> received multiple LOCUS objects in one update, this is unexpected!");
666
+ _metrics.default.sendBehavioralMetric(_constants2.default.LOCUS_HASH_TREE_UNSUPPORTED_OPERATION, {
667
+ locusUrl: ((_object$data = object.data) === null || _object$data === void 0 ? void 0 : _object$data.url) || _this5.url,
668
+ message: object.data ? 'multiple LOCUS object updates' : 'LOCUS object update followed by removal'
669
+ });
670
+ }
671
+ if (object.data) {
672
+ locusObjectStateAfterUpdates = LocusObjectStateAfterUpdates.updated;
673
+ } else {
674
+ locusObjectStateAfterUpdates = LocusObjectStateAfterUpdates.removed;
675
+ }
676
+ }
677
+ });
678
+
679
+ // if Locus object is unchanged or removed, we need to keep using the existing locus
680
+ // because the rest of the locusInfo code expects locus to always be present (with at least some of the fields)
681
+ // if it gets updated, we only need to have the fields that are not part of "locus" object (like "info" or "mediaShares")
682
+ // so that when Locus object gets updated, if the new one is missing some field, that field will
683
+ // be removed from our locusInfo
684
+ if (locusObjectStateAfterUpdates === LocusObjectStateAfterUpdates.unchanged || locusObjectStateAfterUpdates === LocusObjectStateAfterUpdates.removed) {
685
+ // copy over all of existing locus except participants
686
+ LocusDtoTopLevelKeys.forEach(function (key) {
687
+ if (key !== 'participants') {
688
+ locus[key] = (0, _lodash.cloneDeep)(_this5[key]);
689
+ }
690
+ });
691
+ } else {
692
+ // initialize only the fields that are not part of main "Locus" object
693
+ // (except participants, which need to stay empty - that means "no participant changes")
694
+ (0, _values.default)(_types.ObjectTypeToLocusKeyMap).forEach(function (locusDtoKey) {
695
+ if (locusDtoKey !== 'participants') {
696
+ locus[locusDtoKey] = (0, _lodash.cloneDeep)(_this5[locusDtoKey]);
697
+ }
698
+ });
699
+ }
700
+ _loggerProxy.default.logger.info("Locus-info:index#updateFromHashTree --> LOCUS object is ".concat(locusObjectStateAfterUpdates, ", all updates: ").concat((0, _stringify.default)(data.updatedObjects.map(function (o) {
701
+ return {
702
+ type: o.htMeta.elementId.type,
703
+ id: o.htMeta.elementId.id,
704
+ hasData: !!o.data
705
+ };
706
+ }))));
707
+ // now apply all the updates from the hash tree onto the locus
708
+ data.updatedObjects.forEach(function (object) {
709
+ locus = _this5.updateLocusFromHashTreeObject(object, locus);
710
+ });
711
+
712
+ // update our locus info with the new locus
713
+ this.onDeltaLocus(locus);
714
+ break;
715
+ }
716
+ case _hashTreeParser.LocusInfoUpdateType.MEETING_ENDED:
717
+ {
718
+ _loggerProxy.default.logger.info("Locus-info:index#updateFromHashTree --> received signal that meeting ended, destroying meeting ".concat(this.meetingId));
719
+ var meeting = this.webex.meetings.meetingCollection.get(this.meetingId);
720
+ this.webex.meetings.destroy(meeting, _constants.MEETING_REMOVED_REASON.SELF_REMOVED);
721
+ }
722
+ }
336
723
  }
337
724
 
338
725
  /**
@@ -344,37 +731,44 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
344
731
  }, {
345
732
  key: "parse",
346
733
  value: function parse(meeting, data) {
347
- // eslint-disable-next-line @typescript-eslint/no-shadow
348
- var eventType = data.eventType;
349
- var locus = this.getTheLocusToUpdate(data.locus);
350
- _loggerProxy.default.logger.info("Locus-info:index#parse --> received locus data: ".concat(eventType));
351
- locus.jsSdkMeta = {
352
- removedParticipantIds: []
353
- };
354
- switch (eventType) {
355
- case _constants.LOCUSEVENT.PARTICIPANT_JOIN:
356
- case _constants.LOCUSEVENT.PARTICIPANT_LEFT:
357
- case _constants.LOCUSEVENT.CONTROLS_UPDATED:
358
- case _constants.LOCUSEVENT.PARTICIPANT_AUDIO_MUTED:
359
- case _constants.LOCUSEVENT.PARTICIPANT_AUDIO_UNMUTED:
360
- case _constants.LOCUSEVENT.PARTICIPANT_VIDEO_MUTED:
361
- case _constants.LOCUSEVENT.PARTICIPANT_VIDEO_UNMUTED:
362
- case _constants.LOCUSEVENT.SELF_CHANGED:
363
- case _constants.LOCUSEVENT.PARTICIPANT_UPDATED:
364
- case _constants.LOCUSEVENT.PARTICIPANT_CONTROLS_UPDATED:
365
- case _constants.LOCUSEVENT.PARTICIPANT_ROLES_UPDATED:
366
- case _constants.LOCUSEVENT.PARTICIPANT_DECLINED:
367
- case _constants.LOCUSEVENT.FLOOR_GRANTED:
368
- case _constants.LOCUSEVENT.FLOOR_RELEASED:
369
- this.onFullLocus(locus, eventType);
370
- break;
371
- case _constants.LOCUSEVENT.DIFFERENCE:
372
- this.handleLocusDelta(locus, meeting);
373
- break;
374
- default:
375
- // Why will there be a event with no eventType ????
376
- // we may not need this, we can get full locus
377
- this.handleLocusDelta(locus, meeting);
734
+ if (this.hashTreeParser) {
735
+ this.handleHashTreeMessage(meeting, data.eventType, data.stateElementsMessage);
736
+ } else {
737
+ // eslint-disable-next-line @typescript-eslint/no-shadow
738
+ var eventType = data.eventType;
739
+ var locus = this.getTheLocusToUpdate(data.locus);
740
+ _loggerProxy.default.logger.info("Locus-info:index#parse --> received locus data: ".concat(eventType));
741
+ locus.jsSdkMeta = {
742
+ removedParticipantIds: []
743
+ };
744
+ switch (eventType) {
745
+ case _constants.LOCUSEVENT.PARTICIPANT_JOIN:
746
+ case _constants.LOCUSEVENT.PARTICIPANT_LEFT:
747
+ case _constants.LOCUSEVENT.CONTROLS_UPDATED:
748
+ case _constants.LOCUSEVENT.PARTICIPANT_AUDIO_MUTED:
749
+ case _constants.LOCUSEVENT.PARTICIPANT_AUDIO_UNMUTED:
750
+ case _constants.LOCUSEVENT.PARTICIPANT_VIDEO_MUTED:
751
+ case _constants.LOCUSEVENT.PARTICIPANT_VIDEO_UNMUTED:
752
+ case _constants.LOCUSEVENT.SELF_CHANGED:
753
+ case _constants.LOCUSEVENT.PARTICIPANT_UPDATED:
754
+ case _constants.LOCUSEVENT.PARTICIPANT_CONTROLS_UPDATED:
755
+ case _constants.LOCUSEVENT.PARTICIPANT_ROLES_UPDATED:
756
+ case _constants.LOCUSEVENT.PARTICIPANT_DECLINED:
757
+ case _constants.LOCUSEVENT.FLOOR_GRANTED:
758
+ case _constants.LOCUSEVENT.FLOOR_RELEASED:
759
+ this.onFullLocus(locus, eventType);
760
+ break;
761
+ case _constants.LOCUSEVENT.DIFFERENCE:
762
+ this.handleLocusDelta(locus, meeting);
763
+ break;
764
+ case _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED:
765
+ this.sendClassicVsHashTreeMismatchMetric(meeting, "got ".concat(eventType, ", expected classic events"));
766
+ break;
767
+ default:
768
+ // Why will there be a event with no eventType ????
769
+ // we may not need this, we can get full locus
770
+ this.handleLocusDelta(locus, meeting);
771
+ }
378
772
  }
379
773
  }
380
774
 
@@ -391,26 +785,99 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
391
785
  return this.emit(scope, eventName, args);
392
786
  }
393
787
 
788
+ /**
789
+ * Function for handling full locus when it's using hash trees (so not the "classic" one).
790
+ *
791
+ * @param {object} locus locus object
792
+ * @param {string} eventType locus event
793
+ * @param {DataSet[]} dataSets
794
+ * @returns {void}
795
+ */
796
+ }, {
797
+ key: "onFullLocusWithHashTrees",
798
+ value: function onFullLocusWithHashTrees(locus, eventType, dataSets) {
799
+ if (!this.hashTreeParser) {
800
+ _loggerProxy.default.logger.info("Locus-info:index#onFullLocus --> creating hash tree parser");
801
+ _loggerProxy.default.logger.info('Locus-info:index#onFullLocus --> dataSets:', dataSets, ' and locus:', locus);
802
+ this.hashTreeParser = this.createHashTreeParser({
803
+ initialLocus: {
804
+ locus: locus,
805
+ dataSets: dataSets
806
+ }
807
+ });
808
+ this.onFullLocusCommon(locus, eventType);
809
+ } else {
810
+ // in this case the Locus we're getting is not necessarily the full one
811
+ // so treat it like if we just got it in any api response
812
+
813
+ _loggerProxy.default.logger.info('Locus-info:index#onFullLocus --> hash tree parser already exists, handling it like a normal API response');
814
+ this.handleLocusAPIResponse(undefined, {
815
+ dataSets: dataSets,
816
+ locus: locus
817
+ });
818
+ }
819
+ }
820
+
821
+ /**
822
+ * Function for handling full locus when it's the "classic" one (not hash trees)
823
+ *
824
+ * @param {object} locus locus object
825
+ * @param {string} eventType locus event
826
+ * @returns {void}
827
+ */
828
+ }, {
829
+ key: "onFullLocusClassic",
830
+ value: function onFullLocusClassic(locus, eventType) {
831
+ if (!this.locusParser.isNewFullLocus(locus)) {
832
+ _loggerProxy.default.logger.info("Locus-info:index#onFullLocus --> ignoring old full locus DTO, eventType=".concat(eventType));
833
+ return;
834
+ }
835
+ this.onFullLocusCommon(locus, eventType);
836
+ }
837
+
394
838
  /**
395
839
  * updates the locus with full locus object
396
840
  * @param {object} locus locus object
397
- * @param {string} eventType particulat locus event
841
+ * @param {string} eventType locus event
842
+ * @param {DataSet[]} dataSets
398
843
  * @returns {object} null
399
844
  * @memberof LocusInfo
400
845
  */
401
846
  }, {
402
847
  key: "onFullLocus",
403
- value: function onFullLocus(locus, eventType) {
404
- var _locus$jsSdkMeta;
848
+ value: function onFullLocus(locus, eventType, dataSets) {
405
849
  if (!locus) {
406
850
  _loggerProxy.default.logger.error('Locus-info:index#onFullLocus --> object passed as argument was invalid, continuing.');
407
851
  }
408
- if (!this.locusParser.isNewFullLocus(locus)) {
409
- _loggerProxy.default.logger.info("Locus-info:index#onFullLocus --> ignoring old full locus DTO, eventType=".concat(eventType));
410
- return;
852
+ if (dataSets) {
853
+ // this is the new hashmap Locus DTO format (only applicable to webinars for now)
854
+ this.onFullLocusWithHashTrees(locus, eventType, dataSets);
855
+ } else {
856
+ this.onFullLocusClassic(locus, eventType);
411
857
  }
858
+ }
859
+
860
+ /**
861
+ * Common part of handling full locus, used by both classic and hash tree based locus handling
862
+ * @param {object} locus locus object
863
+ * @param {string} eventType locus event
864
+ * @returns {void}
865
+ */
866
+ }, {
867
+ key: "onFullLocusCommon",
868
+ value: function onFullLocusCommon(locus, eventType) {
869
+ var _this$participants,
870
+ _this6 = this,
871
+ _locus$jsSdkMeta;
412
872
  this.scheduledMeeting = locus.meeting || null;
413
873
  this.participants = locus.participants;
874
+ (_this$participants = this.participants) === null || _this$participants === void 0 ? void 0 : _this$participants.forEach(function (participant) {
875
+ var _participant$htMeta;
876
+ // participant.htMeta is set only for hash tree based locus
877
+ if ((_participant$htMeta = participant.htMeta) !== null && _participant$htMeta !== void 0 && _participant$htMeta.elementId.id) {
878
+ _this6.hashTreeObjectId2ParticipantId.set(participant.htMeta.elementId.id, participant.id);
879
+ }
880
+ });
414
881
  var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
415
882
  this.updateLocusInfo(locus);
416
883
  this.updateParticipants(locus.participants, (_locus$jsSdkMeta = locus.jsSdkMeta) === null || _locus$jsSdkMeta === void 0 ? void 0 : _locus$jsSdkMeta.removedParticipantIds, isReplaceMembers);
@@ -481,7 +948,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
481
948
  }, {
482
949
  key: "updateLocusInfo",
483
950
  value: function updateLocusInfo(locus) {
484
- var _locus$self, _locus$self2, _locus$links3, _locus$links4;
951
+ var _locus$self, _locus$self2;
485
952
  if (((_locus$self = locus.self) === null || _locus$self === void 0 ? void 0 : _locus$self.reason) === 'MOVED' && ((_locus$self2 = locus.self) === null || _locus$self2 === void 0 ? void 0 : _locus$self2.state) === 'LEFT') {
486
953
  // When moved to a breakout session locus sends a message for the previous locus
487
954
  // indicating that we have been moved. It isn't helpful to continue parsing this
@@ -496,17 +963,13 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
496
963
  this.updateLocusUrl(locus.url, _controlsUtils.default.isMainSessionDTO(locus));
497
964
  this.updateMeetingInfo(locus.info, locus.self);
498
965
  this.updateMediaShares(locus.mediaShares);
499
- this.updateParticipantsUrl(locus.participantsUrl);
500
- this.updateReplace(locus.replace);
966
+ this.updateReplaces(locus.replaces);
501
967
  this.updateSelf(locus.self);
502
968
  this.updateAclUrl(locus.aclUrl);
503
969
  this.updateBasequence(locus.baseSequence);
504
970
  this.updateSequence(locus.sequence);
505
- this.updateMemberShip(locus.membership);
506
- this.updateIdentifiers(locus.identities);
507
971
  this.updateEmbeddedApps(locus.embeddedApps);
508
- this.updateServices((_locus$links3 = locus.links) === null || _locus$links3 === void 0 ? void 0 : _locus$links3.services);
509
- this.updateResources((_locus$links4 = locus.links) === null || _locus$links4 === void 0 ? void 0 : _locus$links4.resources);
972
+ this.updateLinks(locus.links);
510
973
  this.compareAndUpdate();
511
974
  // update which required to compare different objects from locus
512
975
  }
@@ -1055,41 +1518,35 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1055
1518
  }
1056
1519
 
1057
1520
  /**
1058
- * @param {Object} services
1521
+ * Updates links and emits appropriate events if services or resources have changed
1522
+ * @param {Object} links
1059
1523
  * @returns {undefined}
1060
1524
  * @memberof LocusInfo
1061
1525
  */
1062
1526
  }, {
1063
- key: "updateServices",
1064
- value: function updateServices(services) {
1065
- if (services && !(0, _lodash.isEqual)(this.services, services)) {
1066
- this.services = services;
1527
+ key: "updateLinks",
1528
+ value: function updateLinks(links) {
1529
+ var _this$links, _this$links2;
1530
+ var _ref2 = links || {},
1531
+ services = _ref2.services,
1532
+ resources = _ref2.resources;
1533
+ if (services && !(0, _lodash.isEqual)((_this$links = this.links) === null || _this$links === void 0 ? void 0 : _this$links.services, services)) {
1067
1534
  this.emitScoped({
1068
1535
  file: 'locus-info',
1069
- function: 'updateServices'
1536
+ function: 'updateLinks'
1070
1537
  }, _constants.LOCUSINFO.EVENTS.LINKS_SERVICES, {
1071
1538
  services: services
1072
1539
  });
1073
1540
  }
1074
- }
1075
-
1076
- /**
1077
- * @param {Object} resources
1078
- * @returns {undefined}
1079
- * @memberof LocusInfo
1080
- */
1081
- }, {
1082
- key: "updateResources",
1083
- value: function updateResources(resources) {
1084
- if (resources && !(0, _lodash.isEqual)(this.resources, resources)) {
1085
- this.resources = resources;
1541
+ if (resources && !(0, _lodash.isEqual)((_this$links2 = this.links) === null || _this$links2 === void 0 ? void 0 : _this$links2.resources, resources)) {
1086
1542
  this.emitScoped({
1087
1543
  file: 'locus-info',
1088
- function: 'updateResources'
1544
+ function: 'updateLinks'
1089
1545
  }, _constants.LOCUSINFO.EVENTS.LINKS_RESOURCES, {
1090
1546
  resources: resources
1091
1547
  });
1092
1548
  }
1549
+ this.links = links;
1093
1550
  }
1094
1551
 
1095
1552
  /**
@@ -1192,7 +1649,6 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1192
1649
  isInitializing: !self // if self is undefined, then the update is caused by locus init
1193
1650
  });
1194
1651
  }
1195
-
1196
1652
  this.roles = roles;
1197
1653
  }
1198
1654
 
@@ -1248,28 +1704,15 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1248
1704
  }
1249
1705
 
1250
1706
  /**
1251
- * @param {String} participantsUrl
1707
+ * @param {Object} replaces
1252
1708
  * @returns {undefined}
1253
1709
  * @memberof LocusInfo
1254
1710
  */
1255
1711
  }, {
1256
- key: "updateParticipantsUrl",
1257
- value: function updateParticipantsUrl(participantsUrl) {
1258
- if (participantsUrl && !(0, _lodash.isEqual)(this.participantsUrl, participantsUrl)) {
1259
- this.participantsUrl = participantsUrl;
1260
- }
1261
- }
1262
-
1263
- /**
1264
- * @param {Object} replace
1265
- * @returns {undefined}
1266
- * @memberof LocusInfo
1267
- */
1268
- }, {
1269
- key: "updateReplace",
1270
- value: function updateReplace(replace) {
1271
- if (replace && !(0, _lodash.isEqual)(this.replace, replace)) {
1272
- this.replace = replace;
1712
+ key: "updateReplaces",
1713
+ value: function updateReplaces(replaces) {
1714
+ if (replaces && !(0, _lodash.isEqual)(this.replaces, replaces)) {
1715
+ this.replaces = replaces;
1273
1716
  }
1274
1717
  }
1275
1718
 
@@ -1287,7 +1730,6 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1287
1730
  // @ts-ignore
1288
1731
  var parsedSelves = _selfUtils.default.getSelves(this.parsedLocus.self, self, this.webex.internal.device.url, this.participants // using this.participants instead of locus.participants here, because with delta DTOs locus.participants will only contain a small subset of participants
1289
1732
  );
1290
-
1291
1733
  this.updateMeeting(parsedSelves.current);
1292
1734
  this.parsedLocus.self = parsedSelves.current;
1293
1735
  var element = this.parsedLocus.states[this.parsedLocus.states.length - 1];
@@ -1372,7 +1814,6 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1372
1814
  // unmuteAllowed: not part of .self
1373
1815
  });
1374
1816
  }
1375
-
1376
1817
  if (parsedSelves.updates.localAudioUnmuteRequiredByServer) {
1377
1818
  this.emitScoped({
1378
1819
  file: 'locus-info',
@@ -1530,32 +1971,6 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1530
1971
  }
1531
1972
  }
1532
1973
 
1533
- /**
1534
- * @param {Object} membership
1535
- * @returns {undefined}
1536
- * @memberof LocusInfo
1537
- */
1538
- }, {
1539
- key: "updateMemberShip",
1540
- value: function updateMemberShip(membership) {
1541
- if (membership && !(0, _lodash.isEqual)(this.membership, membership)) {
1542
- this.membership = membership;
1543
- }
1544
- }
1545
-
1546
- /**
1547
- * @param {Array} identities
1548
- * @returns {undefined}
1549
- * @memberof LocusInfo
1550
- */
1551
- }, {
1552
- key: "updateIdentifiers",
1553
- value: function updateIdentifiers(identities) {
1554
- if (identities && !(0, _lodash.isEqual)(this.identities, identities)) {
1555
- this.identities = identities;
1556
- }
1557
- }
1558
-
1559
1974
  /**
1560
1975
  * check the locus is main session's one or not, if is main session's, update main session cache
1561
1976
  * @param {Object} locus
@@ -1633,7 +2048,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1633
2048
  }, {
1634
2049
  key: "updateMainSessionLocusCache",
1635
2050
  value: function updateMainSessionLocusCache(mainLocus) {
1636
- var _this4 = this;
2051
+ var _this7 = this;
1637
2052
  if (!mainLocus) {
1638
2053
  return;
1639
2054
  }
@@ -1642,7 +2057,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1642
2057
  // shallow merge and do special merge for participants
1643
2058
  (0, _lodash.assignWith)(this.mainSessionLocusCache, locusClone, function (objValue, srcValue, key) {
1644
2059
  if (key === 'participants') {
1645
- return _this4.mergeParticipants(objValue, srcValue);
2060
+ return _this7.mergeParticipants(objValue, srcValue);
1646
2061
  }
1647
2062
  return srcValue || objValue;
1648
2063
  });
@@ -1662,6 +2077,5 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1662
2077
  this.mainSessionLocusCache = null;
1663
2078
  }
1664
2079
  }]);
1665
- return LocusInfo;
1666
2080
  }(_eventsScope.default);
1667
2081
  //# sourceMappingURL=index.js.map