@atlaskit/collab-provider 10.2.1 → 10.3.0

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 (38) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/analytics/analytics-helper.js +1 -2
  3. package/dist/cjs/api/api.js +5 -7
  4. package/dist/cjs/api/null-api.js +1 -2
  5. package/dist/cjs/channel.js +34 -37
  6. package/dist/cjs/connectivity/network.js +1 -2
  7. package/dist/cjs/connectivity/reconnect-helper.js +1 -2
  8. package/dist/cjs/document/document-service.js +75 -49
  9. package/dist/cjs/document/null-document-service.js +1 -2
  10. package/dist/cjs/document/step-queue-state.js +1 -2
  11. package/dist/cjs/emitter.js +1 -2
  12. package/dist/cjs/errors/custom-errors.js +54 -69
  13. package/dist/cjs/metadata/metadata-service.js +1 -2
  14. package/dist/cjs/participants/participants-service.js +21 -26
  15. package/dist/cjs/provider/index.js +37 -34
  16. package/dist/cjs/version-wrapper.js +1 -1
  17. package/dist/es2019/document/document-service.js +67 -46
  18. package/dist/es2019/participants/participants-service.js +18 -22
  19. package/dist/es2019/provider/index.js +5 -0
  20. package/dist/es2019/version-wrapper.js +1 -1
  21. package/dist/esm/analytics/analytics-helper.js +1 -2
  22. package/dist/esm/api/api.js +5 -7
  23. package/dist/esm/api/null-api.js +1 -2
  24. package/dist/esm/channel.js +34 -37
  25. package/dist/esm/connectivity/network.js +1 -2
  26. package/dist/esm/connectivity/reconnect-helper.js +1 -2
  27. package/dist/esm/document/document-service.js +75 -49
  28. package/dist/esm/document/null-document-service.js +1 -2
  29. package/dist/esm/document/step-queue-state.js +1 -2
  30. package/dist/esm/emitter.js +1 -2
  31. package/dist/esm/errors/custom-errors.js +54 -69
  32. package/dist/esm/metadata/metadata-service.js +1 -2
  33. package/dist/esm/participants/participants-service.js +21 -26
  34. package/dist/esm/provider/index.js +37 -34
  35. package/dist/esm/version-wrapper.js +1 -1
  36. package/dist/types/document/document-service.d.ts +1 -2
  37. package/dist/types-ts4.5/document/document-service.d.ts +1 -2
  38. package/package.json +5 -2
@@ -1,10 +1,9 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime/helpers/inherits";
8
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
8
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(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; } } }; }
10
9
  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; } }
@@ -12,7 +11,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
12
11
  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; }
13
12
  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) { _defineProperty(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; }
14
13
  import _regeneratorRuntime from "@babel/runtime/regenerator";
15
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
14
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
16
15
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
17
16
  import { utils } from '@atlaskit/util-service-support';
18
17
  import { Emitter } from './emitter';
@@ -28,40 +27,38 @@ import { NCS_ERROR_CODE } from './errors/ncs-errors';
28
27
  import { NotConnectedError, NotInitializedError } from './errors/custom-errors';
29
28
  var logger = createLogger('Channel', 'green');
30
29
  export var Channel = /*#__PURE__*/function (_Emitter) {
31
- _inherits(Channel, _Emitter);
32
- var _super = _createSuper(Channel);
33
30
  function Channel(config, analyticsHelper) {
34
31
  var _this;
35
32
  _classCallCheck(this, Channel);
36
- _this = _super.call(this);
37
- _defineProperty(_assertThisInitialized(_this), "RATE_LIMIT_TYPE_NONE", 0);
38
- _defineProperty(_assertThisInitialized(_this), "RATE_LIMIT_TYPE_SOFT", 1);
39
- _defineProperty(_assertThisInitialized(_this), "RATE_LIMIT_TYPE_HARD", 2);
40
- _defineProperty(_assertThisInitialized(_this), "connected", false);
41
- _defineProperty(_assertThisInitialized(_this), "socket", null);
42
- _defineProperty(_assertThisInitialized(_this), "reconnectHelper", null);
43
- _defineProperty(_assertThisInitialized(_this), "initialized", false);
44
- _defineProperty(_assertThisInitialized(_this), "network", null);
45
- _defineProperty(_assertThisInitialized(_this), "rateLimitWindowDurationMs", 60000);
46
- _defineProperty(_assertThisInitialized(_this), "rateLimitWindowStartMs", 0);
47
- _defineProperty(_assertThisInitialized(_this), "stepCounter", 0);
48
- _defineProperty(_assertThisInitialized(_this), "stepSizeCounter", 0);
49
- _defineProperty(_assertThisInitialized(_this), "maxStepSize", 0);
33
+ _this = _callSuper(this, Channel);
34
+ _defineProperty(_this, "RATE_LIMIT_TYPE_NONE", 0);
35
+ _defineProperty(_this, "RATE_LIMIT_TYPE_SOFT", 1);
36
+ _defineProperty(_this, "RATE_LIMIT_TYPE_HARD", 2);
37
+ _defineProperty(_this, "connected", false);
38
+ _defineProperty(_this, "socket", null);
39
+ _defineProperty(_this, "reconnectHelper", null);
40
+ _defineProperty(_this, "initialized", false);
41
+ _defineProperty(_this, "network", null);
42
+ _defineProperty(_this, "rateLimitWindowDurationMs", 60000);
43
+ _defineProperty(_this, "rateLimitWindowStartMs", 0);
44
+ _defineProperty(_this, "stepCounter", 0);
45
+ _defineProperty(_this, "stepSizeCounter", 0);
46
+ _defineProperty(_this, "maxStepSize", 0);
50
47
  // read-only getters used for tests
51
- _defineProperty(_assertThisInitialized(_this), "getInitialized", function () {
48
+ _defineProperty(_this, "getInitialized", function () {
52
49
  return _this.initialized;
53
50
  });
54
- _defineProperty(_assertThisInitialized(_this), "getConnected", function () {
51
+ _defineProperty(_this, "getConnected", function () {
55
52
  return _this.connected;
56
53
  });
57
- _defineProperty(_assertThisInitialized(_this), "getSocket", function () {
54
+ _defineProperty(_this, "getSocket", function () {
58
55
  return _this.socket;
59
56
  });
60
- _defineProperty(_assertThisInitialized(_this), "getToken", function () {
57
+ _defineProperty(_this, "getToken", function () {
61
58
  return _this.token;
62
59
  });
63
60
  // Used to retrieve the x-token for API requests
64
- _defineProperty(_assertThisInitialized(_this), "getChannelToken", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
61
+ _defineProperty(_this, "getChannelToken", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
65
62
  var _yield$_this$config$p;
66
63
  var token;
67
64
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -108,7 +105,7 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
108
105
  }
109
106
  }, _callee);
110
107
  })));
111
- _defineProperty(_assertThisInitialized(_this), "handlePermissionInvalidateToken", function (data) {
108
+ _defineProperty(_this, "handlePermissionInvalidateToken", function (data) {
112
109
  var _this$analyticsHelper;
113
110
  logger('Received permission invalidate event ', data);
114
111
  (_this$analyticsHelper = _this.analyticsHelper) === null || _this$analyticsHelper === void 0 || _this$analyticsHelper.sendActionEvent(EVENT_ACTION.INVALIDATE_TOKEN, EVENT_STATUS.SUCCESS, {
@@ -118,7 +115,7 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
118
115
  usedCachedToken: !!_this.token
119
116
  });
120
117
  });
121
- _defineProperty(_assertThisInitialized(_this), "onConnectError", function (error) {
118
+ _defineProperty(_this, "onConnectError", function (error) {
122
119
  var _this$analyticsHelper2, _this$analyticsHelper3, _message, _errorData$code;
123
120
  var measure = stopMeasure(MEASURE_NAME.SOCKET_CONNECT, _this.analyticsHelper);
124
121
  (_this$analyticsHelper2 = _this.analyticsHelper) === null || _this$analyticsHelper2 === void 0 || _this$analyticsHelper2.sendActionEvent(EVENT_ACTION.CONNECTION, EVENT_STATUS.FAILURE, {
@@ -146,7 +143,7 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
146
143
  };
147
144
  _this.emit('error', connectionError);
148
145
  });
149
- _defineProperty(_assertThisInitialized(_this), "onReconnectError", function (error) {
146
+ _defineProperty(_this, "onReconnectError", function (error) {
150
147
  var _this$reconnectHelper, _this$reconnectHelper2;
151
148
  (_this$reconnectHelper = _this.reconnectHelper) === null || _this$reconnectHelper === void 0 || _this$reconnectHelper.countReconnectError();
152
149
  if ((_this$reconnectHelper2 = _this.reconnectHelper) !== null && _this$reconnectHelper2 !== void 0 && _this$reconnectHelper2.isLikelyNetworkIssue()) {
@@ -161,7 +158,7 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
161
158
  _this.emit('error', reconnectionError);
162
159
  }
163
160
  });
164
- _defineProperty(_assertThisInitialized(_this), "onConnect", function () {
161
+ _defineProperty(_this, "onConnect", function () {
165
162
  var _this$analyticsHelper5;
166
163
  _this.connected = true;
167
164
  logger('Connected.', _this.socket.id);
@@ -177,7 +174,7 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
177
174
  initialized: _this.initialized
178
175
  });
179
176
  });
180
- _defineProperty(_assertThisInitialized(_this), "onReceiveData", function (data) {
177
+ _defineProperty(_this, "onReceiveData", function (data) {
181
178
  logger('Received data', data);
182
179
  logger('Session ID is', _this.socket.id);
183
180
  if (data.type === 'initial') {
@@ -222,7 +219,7 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
222
219
  _this.emit('steps:added', data);
223
220
  }
224
221
  });
225
- _defineProperty(_assertThisInitialized(_this), "fetchCatchupv2", /*#__PURE__*/function () {
222
+ _defineProperty(_this, "fetchCatchupv2", /*#__PURE__*/function () {
226
223
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(fromVersion, clientId, catchUpOutofSync, reason) {
227
224
  var _yield$utils$requestS, steps, metadata, errorNotFound, errorCatchupv2;
228
225
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
@@ -297,7 +294,7 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
297
294
  return _ref2.apply(this, arguments);
298
295
  };
299
296
  }());
300
- _defineProperty(_assertThisInitialized(_this), "fetchReconcile", /*#__PURE__*/function () {
297
+ _defineProperty(_this, "fetchReconcile", /*#__PURE__*/function () {
301
298
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(currentStateDoc, reason) {
302
299
  var reqBody, reconcileResponse, _this$analyticsHelper7;
303
300
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
@@ -360,7 +357,7 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
360
357
  * @throws {NotInitializedError} Channel not initialized
361
358
  * @throws {NotConnectedError} Channel not connected
362
359
  */
363
- _defineProperty(_assertThisInitialized(_this), "broadcast", function (type, data, callback) {
360
+ _defineProperty(_this, "broadcast", function (type, data, callback) {
364
361
  if (!_this.socket) {
365
362
  throw new NotInitializedError('Cannot broadcast, not initialized yet');
366
363
  }
@@ -379,7 +376,7 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
379
376
  * @throws {NotInitializedError} Channel not initialized
380
377
  * @throws {NotConnectedError} Channel not connected
381
378
  */
382
- _defineProperty(_assertThisInitialized(_this), "sendMetadata", function (metadata) {
379
+ _defineProperty(_this, "sendMetadata", function (metadata) {
383
380
  if (!_this.socket) {
384
381
  throw new NotInitializedError('Cannot send metadata, not initialized yet');
385
382
  }
@@ -390,13 +387,13 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
390
387
  }
391
388
  _this.socket.emit('metadata', metadata);
392
389
  });
393
- _defineProperty(_assertThisInitialized(_this), "sendPresenceJoined", function () {
390
+ _defineProperty(_this, "sendPresenceJoined", function () {
394
391
  if (!_this.connected || !_this.socket) {
395
392
  return;
396
393
  }
397
394
  _this.socket.emit('presence:joined');
398
395
  });
399
- _defineProperty(_assertThisInitialized(_this), "onOnlineHandler", function () {
396
+ _defineProperty(_this, "onOnlineHandler", function () {
400
397
  // Force an immediate reconnect, the socket must first be closed to reset reconnection delay logic
401
398
  if (!_this.connected) {
402
399
  var _this$socket2, _this$socket3;
@@ -409,7 +406,8 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
409
406
  _this.initExperience = createDocInitExp(_this.analyticsHelper);
410
407
  return _this;
411
408
  }
412
- _createClass(Channel, [{
409
+ _inherits(Channel, _Emitter);
410
+ return _createClass(Channel, [{
413
411
  key: "connect",
414
412
  value:
415
413
  /**
@@ -774,5 +772,4 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
774
772
  }
775
773
  }
776
774
  }]);
777
- return Channel;
778
775
  }(Emitter);
@@ -30,7 +30,7 @@ var Network = /*#__PURE__*/function () {
30
30
  window.addEventListener('online', this.onlineHandler);
31
31
  }
32
32
  }
33
- _createClass(Network, [{
33
+ return _createClass(Network, [{
34
34
  key: "getStatus",
35
35
  value: function getStatus() {
36
36
  return this.status || null;
@@ -42,6 +42,5 @@ var Network = /*#__PURE__*/function () {
42
42
  window.removeEventListener('online', this.onlineHandler);
43
43
  }
44
44
  }]);
45
- return Network;
46
45
  }();
47
46
  export { Network as default };
@@ -17,7 +17,7 @@ var ReconnectHelper = /*#__PURE__*/function () {
17
17
  });
18
18
  window.addEventListener('online', this.onlineHandler);
19
19
  }
20
- _createClass(ReconnectHelper, [{
20
+ return _createClass(ReconnectHelper, [{
21
21
  key: "countReconnectError",
22
22
  value: function countReconnectError() {
23
23
  // Only count the reconnection attempts when offline
@@ -37,6 +37,5 @@ var ReconnectHelper = /*#__PURE__*/function () {
37
37
  window.removeEventListener('online', this.onlineHandler);
38
38
  }
39
39
  }]);
40
- return ReconnectHelper;
41
40
  }();
42
41
  export { ReconnectHelper as default };
@@ -5,6 +5,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
5
  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; }
6
6
  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) { _defineProperty(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; }
7
7
  import _regeneratorRuntime from "@babel/runtime/regenerator";
8
+ import { fg } from '@atlaskit/platform-feature-flags';
8
9
  import { ACK_MAX_TRY, EVENT_ACTION, EVENT_STATUS, CatchupEventReason } from '../helpers/const';
9
10
  import { getCollabState, sendableSteps } from '@atlaskit/prosemirror-collab';
10
11
  import { JSONTransformer } from '@atlaskit/editor-json-transformer';
@@ -277,7 +278,7 @@ export var DocumentService = /*#__PURE__*/function () {
277
278
  // Triggered when page recovery has emitted an 'init' event on a page client is currently connected to.
278
279
  _defineProperty(this, "onRestore", /*#__PURE__*/function () {
279
280
  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref6) {
280
- var doc, version, metadata, targetClientId, unconfirmedSteps, currentState, useReconcile, _this$analyticsHelper12, _this$analyticsHelper13, _this$analyticsHelper14;
281
+ var doc, version, metadata, targetClientId, unconfirmedSteps, currentState, useReconcile, _this$analyticsHelper14, _this$analyticsHelper12, _this$analyticsHelper13, _this$analyticsHelper15, _this$analyticsHelper16;
281
282
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
282
283
  while (1) switch (_context3.prev = _context3.next) {
283
284
  case 0:
@@ -310,25 +311,51 @@ export var DocumentService = /*#__PURE__*/function () {
310
311
  reserveCursor: true
311
312
  });
312
313
  _this.metadataService.updateMetadata(metadata);
313
-
314
- // If there are unconfirmed steps, attempt to reconcile our current state with with recovered document
314
+ if (!fg('restore_localstep_fallback_reconcile')) {
315
+ _context3.next = 25;
316
+ break;
317
+ }
318
+ _context3.prev = 12;
319
+ (_this$analyticsHelper12 = _this.analyticsHelper) === null || _this$analyticsHelper12 === void 0 || _this$analyticsHelper12.sendActionEvent(EVENT_ACTION.REINITIALISE_DOCUMENT, EVENT_STATUS.INFO, {
320
+ numUnconfirmedSteps: unconfirmedSteps === null || unconfirmedSteps === void 0 ? void 0 : unconfirmedSteps.length,
321
+ hasTitle: !!(metadata !== null && metadata !== void 0 && metadata.title),
322
+ clientId: _this.clientId,
323
+ targetClientId: targetClientId,
324
+ triggeredByCatchup: targetClientId ? true : false
325
+ });
326
+ if (unconfirmedSteps !== null && unconfirmedSteps !== void 0 && unconfirmedSteps.length) {
327
+ _this.applyLocalSteps(unconfirmedSteps);
328
+ }
329
+ _context3.next = 23;
330
+ break;
331
+ case 17:
332
+ _context3.prev = 17;
333
+ _context3.t0 = _context3["catch"](12);
334
+ (_this$analyticsHelper13 = _this.analyticsHelper) === null || _this$analyticsHelper13 === void 0 || _this$analyticsHelper13.sendErrorEvent(_context3.t0, "Error while onRestore with applyLocalSteps. Will fallback to fetchReconcile");
335
+ useReconcile = true;
336
+ _context3.next = 23;
337
+ return _this.fetchReconcile(JSON.stringify(currentState.content), 'fe-restore');
338
+ case 23:
339
+ _context3.next = 31;
340
+ break;
341
+ case 25:
315
342
  if (!(useReconcile && currentState)) {
316
- _context3.next = 16;
343
+ _context3.next = 30;
317
344
  break;
318
345
  }
319
- _context3.next = 14;
346
+ _context3.next = 28;
320
347
  return _this.fetchReconcile(JSON.stringify(currentState.content), 'fe-restore');
321
- case 14:
322
- _context3.next = 17;
348
+ case 28:
349
+ _context3.next = 31;
323
350
  break;
324
- case 16:
351
+ case 30:
325
352
  if (unconfirmedSteps !== null && unconfirmedSteps !== void 0 && unconfirmedSteps.length) {
326
353
  // we don't want to use reconcile for restore triggered by catchup client out of sync (when targetClientId is provided)
327
354
  // as this results in all changes made while the client was out of sync being lost
328
355
  _this.applyLocalSteps(unconfirmedSteps);
329
356
  }
330
- case 17:
331
- (_this$analyticsHelper12 = _this.analyticsHelper) === null || _this$analyticsHelper12 === void 0 || _this$analyticsHelper12.sendActionEvent(EVENT_ACTION.REINITIALISE_DOCUMENT, EVENT_STATUS.SUCCESS, {
357
+ case 31:
358
+ (_this$analyticsHelper14 = _this.analyticsHelper) === null || _this$analyticsHelper14 === void 0 || _this$analyticsHelper14.sendActionEvent(EVENT_ACTION.REINITIALISE_DOCUMENT, EVENT_STATUS.SUCCESS, {
332
359
  numUnconfirmedSteps: unconfirmedSteps === null || unconfirmedSteps === void 0 ? void 0 : unconfirmedSteps.length,
333
360
  hasTitle: !!(metadata !== null && metadata !== void 0 && metadata.title),
334
361
  useReconcile: useReconcile,
@@ -336,19 +363,19 @@ export var DocumentService = /*#__PURE__*/function () {
336
363
  targetClientId: targetClientId,
337
364
  triggeredByCatchup: targetClientId ? true : false
338
365
  });
339
- _context3.next = 25;
366
+ _context3.next = 39;
340
367
  break;
341
- case 20:
342
- _context3.prev = 20;
343
- _context3.t0 = _context3["catch"](8);
344
- (_this$analyticsHelper13 = _this.analyticsHelper) === null || _this$analyticsHelper13 === void 0 || _this$analyticsHelper13.sendActionEvent(EVENT_ACTION.REINITIALISE_DOCUMENT, EVENT_STATUS.FAILURE, {
368
+ case 34:
369
+ _context3.prev = 34;
370
+ _context3.t1 = _context3["catch"](8);
371
+ (_this$analyticsHelper15 = _this.analyticsHelper) === null || _this$analyticsHelper15 === void 0 || _this$analyticsHelper15.sendActionEvent(EVENT_ACTION.REINITIALISE_DOCUMENT, EVENT_STATUS.FAILURE, {
345
372
  numUnconfirmedSteps: unconfirmedSteps === null || unconfirmedSteps === void 0 ? void 0 : unconfirmedSteps.length,
346
373
  useReconcile: useReconcile,
347
374
  clientId: _this.clientId,
348
375
  targetClientId: targetClientId,
349
376
  triggeredByCatchup: targetClientId ? true : false
350
377
  });
351
- (_this$analyticsHelper14 = _this.analyticsHelper) === null || _this$analyticsHelper14 === void 0 || _this$analyticsHelper14.sendErrorEvent(_context3.t0, "Error while reinitialising document. Use Reconcile: ".concat(useReconcile));
378
+ (_this$analyticsHelper16 = _this.analyticsHelper) === null || _this$analyticsHelper16 === void 0 || _this$analyticsHelper16.sendErrorEvent(_context3.t1, "Error while reinitialising document. Use Reconcile: ".concat(useReconcile));
352
379
  _this.onErrorHandled({
353
380
  message: 'Caught error while trying to recover the document',
354
381
  data: {
@@ -357,18 +384,18 @@ export var DocumentService = /*#__PURE__*/function () {
357
384
  code: INTERNAL_ERROR_CODE.DOCUMENT_RESTORE_ERROR
358
385
  }
359
386
  });
360
- case 25:
387
+ case 39:
361
388
  case "end":
362
389
  return _context3.stop();
363
390
  }
364
- }, _callee3, null, [[8, 20]]);
391
+ }, _callee3, null, [[8, 34], [12, 17]]);
365
392
  }));
366
393
  return function (_x2) {
367
394
  return _ref7.apply(this, arguments);
368
395
  };
369
396
  }());
370
397
  _defineProperty(this, "getFinalAcknowledgedState", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
371
- var _this$analyticsHelper15, finalAcknowledgedState, currentState, reconcileResponse, measure, _this$analyticsHelper16, _this$analyticsHelper17, _measure2;
398
+ var _this$analyticsHelper17, finalAcknowledgedState, currentState, reconcileResponse, measure, _this$analyticsHelper18, _this$analyticsHelper19, _measure2;
372
399
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
373
400
  while (1) switch (_context4.prev = _context4.next) {
374
401
  case 0:
@@ -403,7 +430,7 @@ export var DocumentService = /*#__PURE__*/function () {
403
430
  };
404
431
  case 20:
405
432
  measure = stopMeasure(MEASURE_NAME.PUBLISH_PAGE, _this.analyticsHelper);
406
- (_this$analyticsHelper15 = _this.analyticsHelper) === null || _this$analyticsHelper15 === void 0 || _this$analyticsHelper15.sendActionEvent(EVENT_ACTION.PUBLISH_PAGE, EVENT_STATUS.SUCCESS, {
433
+ (_this$analyticsHelper17 = _this.analyticsHelper) === null || _this$analyticsHelper17 === void 0 || _this$analyticsHelper17.sendActionEvent(EVENT_ACTION.PUBLISH_PAGE, EVENT_STATUS.SUCCESS, {
407
434
  latency: measure === null || measure === void 0 ? void 0 : measure.duration
408
435
  });
409
436
  _this.aggressiveCatchup = false;
@@ -413,10 +440,10 @@ export var DocumentService = /*#__PURE__*/function () {
413
440
  _context4.t1 = _context4["catch"](1);
414
441
  _this.aggressiveCatchup = false;
415
442
  _measure2 = stopMeasure(MEASURE_NAME.PUBLISH_PAGE, _this.analyticsHelper);
416
- (_this$analyticsHelper16 = _this.analyticsHelper) === null || _this$analyticsHelper16 === void 0 || _this$analyticsHelper16.sendActionEvent(EVENT_ACTION.PUBLISH_PAGE, EVENT_STATUS.FAILURE, {
443
+ (_this$analyticsHelper18 = _this.analyticsHelper) === null || _this$analyticsHelper18 === void 0 || _this$analyticsHelper18.sendActionEvent(EVENT_ACTION.PUBLISH_PAGE, EVENT_STATUS.FAILURE, {
417
444
  latency: _measure2 === null || _measure2 === void 0 ? void 0 : _measure2.duration
418
445
  });
419
- (_this$analyticsHelper17 = _this.analyticsHelper) === null || _this$analyticsHelper17 === void 0 || _this$analyticsHelper17.sendErrorEvent(_context4.t1, 'Error while returning ADF version of the final draft document');
446
+ (_this$analyticsHelper19 = _this.analyticsHelper) === null || _this$analyticsHelper19 === void 0 || _this$analyticsHelper19.sendErrorEvent(_context4.t1, 'Error while returning ADF version of the final draft document');
420
447
  throw _context4.t1;
421
448
  case 33:
422
449
  case "end":
@@ -444,7 +471,7 @@ export var DocumentService = /*#__PURE__*/function () {
444
471
  // ESS-5023: only emit error event if updated client version is still behind server version
445
472
  // client version could become higher than server version due to user editing or plugin adding steps
446
473
  if (updatedVersion < version) {
447
- var _doc$content, _this$analyticsHelper18;
474
+ var _doc$content, _this$analyticsHelper20;
448
475
  var error = new UpdateDocumentError('Failed to update the document', {
449
476
  newVersion: version,
450
477
  editorVersion: updatedVersion,
@@ -452,7 +479,7 @@ export var DocumentService = /*#__PURE__*/function () {
452
479
  docHasContent: (doc === null || doc === void 0 || (_doc$content = doc.content) === null || _doc$content === void 0 ? void 0 : _doc$content.length) >= 1,
453
480
  isDocContentValid: isDocContentValid
454
481
  });
455
- (_this$analyticsHelper18 = _this.analyticsHelper) === null || _this$analyticsHelper18 === void 0 || _this$analyticsHelper18.sendErrorEvent(error, 'Failed to update the document in document service');
482
+ (_this$analyticsHelper20 = _this.analyticsHelper) === null || _this$analyticsHelper20 === void 0 || _this$analyticsHelper20.sendErrorEvent(error, 'Failed to update the document in document service');
456
483
  if (_this.enableErrorOnFailedDocumentApply) {
457
484
  _this.onErrorHandled({
458
485
  message: 'The provider failed to apply changes to the editor',
@@ -469,8 +496,8 @@ export var DocumentService = /*#__PURE__*/function () {
469
496
  }
470
497
  // Otherwise just fail silently for now
471
498
  } else {
472
- var _this$analyticsHelper19, _doc$content2;
473
- (_this$analyticsHelper19 = _this.analyticsHelper) === null || _this$analyticsHelper19 === void 0 || _this$analyticsHelper19.sendActionEvent(EVENT_ACTION.UPDATE_DOCUMENT, EVENT_STATUS.SUCCESS, {
499
+ var _this$analyticsHelper21, _doc$content2;
500
+ (_this$analyticsHelper21 = _this.analyticsHelper) === null || _this$analyticsHelper21 === void 0 || _this$analyticsHelper21.sendActionEvent(EVENT_ACTION.UPDATE_DOCUMENT, EVENT_STATUS.SUCCESS, {
474
501
  newVersion: version,
475
502
  editorVersion: updatedVersion,
476
503
  isDocTruthy: !!doc,
@@ -483,8 +510,8 @@ export var DocumentService = /*#__PURE__*/function () {
483
510
  try {
484
511
  var _this$getState5;
485
512
  if (!((_this$getState5 = _this.getState) !== null && _this$getState5 !== void 0 && _this$getState5.call(_this))) {
486
- var _this$analyticsHelper20;
487
- (_this$analyticsHelper20 = _this.analyticsHelper) === null || _this$analyticsHelper20 === void 0 || _this$analyticsHelper20.sendErrorEvent(new Error('Editor state is undefined'), 'validatePMJSONDocument called without state');
513
+ var _this$analyticsHelper22;
514
+ (_this$analyticsHelper22 = _this.analyticsHelper) === null || _this$analyticsHelper22 === void 0 || _this$analyticsHelper22.sendErrorEvent(new Error('Editor state is undefined'), 'validatePMJSONDocument called without state');
488
515
  }
489
516
  var state = _this.getState();
490
517
  var content = (doc.content || []).map(function (child) {
@@ -507,7 +534,7 @@ export var DocumentService = /*#__PURE__*/function () {
507
534
  * @throws {Error} Couldn't sync the steps after retrying 30 times
508
535
  */
509
536
  _defineProperty(this, "commitUnconfirmedSteps", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
510
- var unconfirmedSteps, _this$getState6, _this$analyticsHelper22, count, unconfirmedTrs, lastTr, isLastTrConfirmed, _this$analyticsHelper21, nextUnconfirmedSteps, nextUnconfirmedTrs, _this$getUnconfirmedS, state, version, unconfirmedStepsInfoUGCRemoved, error, measure, _this$analyticsHelper23, _this$analyticsHelper24, _measure3;
537
+ var unconfirmedSteps, _this$getState6, _this$analyticsHelper24, count, unconfirmedTrs, lastTr, isLastTrConfirmed, _this$analyticsHelper23, nextUnconfirmedSteps, nextUnconfirmedTrs, _this$getUnconfirmedS, state, version, unconfirmedStepsInfoUGCRemoved, error, measure, _this$analyticsHelper25, _this$analyticsHelper26, _measure3;
511
538
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
512
539
  while (1) switch (_context5.prev = _context5.next) {
513
540
  case 0:
@@ -526,7 +553,7 @@ export var DocumentService = /*#__PURE__*/function () {
526
553
  lastTr = unconfirmedTrs === null || unconfirmedTrs === void 0 ? void 0 : unconfirmedTrs[unconfirmedTrs.length - 1];
527
554
  isLastTrConfirmed = false;
528
555
  if (!((_this$getState6 = _this.getState) !== null && _this$getState6 !== void 0 && _this$getState6.call(_this))) {
529
- (_this$analyticsHelper21 = _this.analyticsHelper) === null || _this$analyticsHelper21 === void 0 || _this$analyticsHelper21.sendErrorEvent(new Error('Editor state is undefined'), 'commitUnconfirmedSteps called without state');
556
+ (_this$analyticsHelper23 = _this.analyticsHelper) === null || _this$analyticsHelper23 === void 0 || _this$analyticsHelper23.sendErrorEvent(new Error('Editor state is undefined'), 'commitUnconfirmedSteps called without state');
530
557
  }
531
558
  case 9:
532
559
  if (isLastTrConfirmed) {
@@ -573,7 +600,7 @@ export var DocumentService = /*#__PURE__*/function () {
573
600
  break;
574
601
  case 22:
575
602
  measure = stopMeasure(MEASURE_NAME.COMMIT_UNCONFIRMED_STEPS, _this.analyticsHelper);
576
- (_this$analyticsHelper22 = _this.analyticsHelper) === null || _this$analyticsHelper22 === void 0 || _this$analyticsHelper22.sendActionEvent(EVENT_ACTION.COMMIT_UNCONFIRMED_STEPS, EVENT_STATUS.SUCCESS, {
603
+ (_this$analyticsHelper24 = _this.analyticsHelper) === null || _this$analyticsHelper24 === void 0 || _this$analyticsHelper24.sendActionEvent(EVENT_ACTION.COMMIT_UNCONFIRMED_STEPS, EVENT_STATUS.SUCCESS, {
577
604
  latency: measure === null || measure === void 0 ? void 0 : measure.duration,
578
605
  // upon success, emit the total number of unconfirmed steps we synced
579
606
  numUnconfirmedSteps: unconfirmedSteps === null || unconfirmedSteps === void 0 ? void 0 : unconfirmedSteps.length
@@ -585,11 +612,11 @@ export var DocumentService = /*#__PURE__*/function () {
585
612
  _context5.prev = 26;
586
613
  _context5.t0 = _context5["catch"](1);
587
614
  _measure3 = stopMeasure(MEASURE_NAME.COMMIT_UNCONFIRMED_STEPS, _this.analyticsHelper);
588
- (_this$analyticsHelper23 = _this.analyticsHelper) === null || _this$analyticsHelper23 === void 0 || _this$analyticsHelper23.sendActionEvent(EVENT_ACTION.COMMIT_UNCONFIRMED_STEPS, EVENT_STATUS.FAILURE, {
615
+ (_this$analyticsHelper25 = _this.analyticsHelper) === null || _this$analyticsHelper25 === void 0 || _this$analyticsHelper25.sendActionEvent(EVENT_ACTION.COMMIT_UNCONFIRMED_STEPS, EVENT_STATUS.FAILURE, {
589
616
  latency: _measure3 === null || _measure3 === void 0 ? void 0 : _measure3.duration,
590
617
  numUnconfirmedSteps: unconfirmedSteps === null || unconfirmedSteps === void 0 ? void 0 : unconfirmedSteps.length
591
618
  });
592
- (_this$analyticsHelper24 = _this.analyticsHelper) === null || _this$analyticsHelper24 === void 0 || _this$analyticsHelper24.sendErrorEvent(_context5.t0, 'Error while committing unconfirmed steps');
619
+ (_this$analyticsHelper26 = _this.analyticsHelper) === null || _this$analyticsHelper26 === void 0 || _this$analyticsHelper26.sendErrorEvent(_context5.t0, 'Error while committing unconfirmed steps');
593
620
  throw _context5.t0;
594
621
  case 32:
595
622
  case "end":
@@ -598,17 +625,17 @@ export var DocumentService = /*#__PURE__*/function () {
598
625
  }, _callee5, null, [[1, 26]]);
599
626
  })));
600
627
  _defineProperty(this, "onStepRejectedError", function () {
601
- var _this$analyticsHelper25;
628
+ var _this$analyticsHelper27;
602
629
  _this.stepRejectCounter++;
603
630
  logger("Steps rejected (tries=".concat(_this.stepRejectCounter, ")"));
604
- (_this$analyticsHelper25 = _this.analyticsHelper) === null || _this$analyticsHelper25 === void 0 || _this$analyticsHelper25.sendActionEvent(EVENT_ACTION.SEND_STEPS_RETRY, EVENT_STATUS.INFO, {
631
+ (_this$analyticsHelper27 = _this.analyticsHelper) === null || _this$analyticsHelper27 === void 0 || _this$analyticsHelper27.sendActionEvent(EVENT_ACTION.SEND_STEPS_RETRY, EVENT_STATUS.INFO, {
605
632
  count: _this.stepRejectCounter
606
633
  });
607
634
  var maxRetries = _this.aggressiveCatchup ? MAX_STEP_REJECTED_ERROR_AGGRESSIVE : MAX_STEP_REJECTED_ERROR;
608
635
  if (_this.stepRejectCounter >= maxRetries) {
609
- var _this$analyticsHelper26;
636
+ var _this$analyticsHelper28;
610
637
  logger("The steps were rejected too many times (tries=".concat(_this.stepRejectCounter, ", limit=").concat(MAX_STEP_REJECTED_ERROR, "). Trying to catch-up."));
611
- (_this$analyticsHelper26 = _this.analyticsHelper) === null || _this$analyticsHelper26 === void 0 || _this$analyticsHelper26.sendActionEvent(EVENT_ACTION.CATCHUP_AFTER_MAX_SEND_STEPS_RETRY, EVENT_STATUS.INFO);
638
+ (_this$analyticsHelper28 = _this.analyticsHelper) === null || _this$analyticsHelper28 === void 0 || _this$analyticsHelper28.sendActionEvent(EVENT_ACTION.CATCHUP_AFTER_MAX_SEND_STEPS_RETRY, EVENT_STATUS.INFO);
612
639
  _this.throttledCatchupv2(CatchupEventReason.STEPS_REJECTED);
613
640
  } else {
614
641
  // If committing steps failed try again automatically in 1s
@@ -634,20 +661,20 @@ export var DocumentService = /*#__PURE__*/function () {
634
661
  this.stepQueue = new StepQueueState();
635
662
  this.onErrorHandled = onErrorHandled;
636
663
  }
637
- _createClass(DocumentService, [{
664
+ return _createClass(DocumentService, [{
638
665
  key: "getVersionFromCollabState",
639
666
  value: function getVersionFromCollabState(state, resource) {
640
667
  var collabState = getCollabState(state);
641
668
  if (!collabState) {
642
- var _this$analyticsHelper27;
643
- (_this$analyticsHelper27 = this.analyticsHelper) === null || _this$analyticsHelper27 === void 0 || _this$analyticsHelper27.sendErrorEvent(new Error('No collab state when calling ProseMirror function'), "".concat(resource, " called without collab state"));
669
+ var _this$analyticsHelper29;
670
+ (_this$analyticsHelper29 = this.analyticsHelper) === null || _this$analyticsHelper29 === void 0 || _this$analyticsHelper29.sendErrorEvent(new Error('No collab state when calling ProseMirror function'), "".concat(resource, " called without collab state"));
644
671
  return 0;
645
672
  }
646
673
 
647
674
  // This should not happen in usual, just add error event in case it happens
648
675
  if (collabState.version === undefined) {
649
- var _this$analyticsHelper28;
650
- (_this$analyticsHelper28 = this.analyticsHelper) === null || _this$analyticsHelper28 === void 0 || _this$analyticsHelper28.sendErrorEvent(new Error('Collab state missing version info when calling ProseMirror function'), "".concat(resource, " called with collab state missing version info"));
676
+ var _this$analyticsHelper30;
677
+ (_this$analyticsHelper30 = this.analyticsHelper) === null || _this$analyticsHelper30 === void 0 || _this$analyticsHelper30.sendErrorEvent(new Error('Collab state missing version info when calling ProseMirror function'), "".concat(resource, " called with collab state missing version info"));
651
678
  return 0;
652
679
  }
653
680
  return collabState.version;
@@ -701,11 +728,11 @@ export var DocumentService = /*#__PURE__*/function () {
701
728
  }, 100);
702
729
  }
703
730
  } catch (error) {
704
- var _this$analyticsHelper29;
731
+ var _this$analyticsHelper31;
705
732
  // ESS-6421: log if error processing steps when there are steps from the same userId but not the same clientId
706
733
  var userIdMatch = this.isStepsFromNewClientIdForSameUserId(steps);
707
734
  logger("Processing steps failed with error: ".concat(error, ". Triggering catch up call."));
708
- (_this$analyticsHelper29 = this.analyticsHelper) === null || _this$analyticsHelper29 === void 0 || _this$analyticsHelper29.sendErrorEvent(error, userIdMatch ? "Error while processing steps with new clientId" : "Error while processing steps");
735
+ (_this$analyticsHelper31 = this.analyticsHelper) === null || _this$analyticsHelper31 === void 0 || _this$analyticsHelper31.sendErrorEvent(error, userIdMatch ? "Error while processing steps with new clientId" : "Error while processing steps");
709
736
  this.throttledCatchupv2(CatchupEventReason.PROCESS_STEPS);
710
737
  }
711
738
  }
@@ -740,8 +767,8 @@ export var DocumentService = /*#__PURE__*/function () {
740
767
  var _this$getState7;
741
768
  var state = (_this$getState7 = this.getState) === null || _this$getState7 === void 0 ? void 0 : _this$getState7.call(this);
742
769
  if (!state) {
743
- var _this$analyticsHelper30;
744
- (_this$analyticsHelper30 = this.analyticsHelper) === null || _this$analyticsHelper30 === void 0 || _this$analyticsHelper30.sendErrorEvent(new Error('Editor state is undefined'), 'sendStepsFromCurrentState called without state');
770
+ var _this$analyticsHelper32;
771
+ (_this$analyticsHelper32 = this.analyticsHelper) === null || _this$analyticsHelper32 === void 0 || _this$analyticsHelper32.sendErrorEvent(new Error('Editor state is undefined'), 'sendStepsFromCurrentState called without state');
745
772
  return;
746
773
  }
747
774
  this.send(null, null, state, sendAnalyticsEvent);
@@ -766,8 +793,8 @@ export var DocumentService = /*#__PURE__*/function () {
766
793
  // to ensure that analytics events with the number of unconfirmed steps is only
767
794
  // sent once on connection (as opposed to on every step)
768
795
  if (sendAnalyticsEvent) {
769
- var _this$analyticsHelper31;
770
- (_this$analyticsHelper31 = this.analyticsHelper) === null || _this$analyticsHelper31 === void 0 || _this$analyticsHelper31.sendActionEvent(EVENT_ACTION.HAS_UNCONFIRMED_STEPS, EVENT_STATUS.INFO, {
796
+ var _this$analyticsHelper33;
797
+ (_this$analyticsHelper33 = this.analyticsHelper) === null || _this$analyticsHelper33 === void 0 || _this$analyticsHelper33.sendActionEvent(EVENT_ACTION.HAS_UNCONFIRMED_STEPS, EVENT_STATUS.INFO, {
771
798
  numUnconfirmedSteps: (unconfirmedSteps === null || unconfirmedSteps === void 0 ? void 0 : unconfirmedSteps.length) || 0
772
799
  });
773
800
  }
@@ -792,5 +819,4 @@ export var DocumentService = /*#__PURE__*/function () {
792
819
  });
793
820
  }
794
821
  }]);
795
- return DocumentService;
796
822
  }();
@@ -11,7 +11,7 @@ export var NullDocumentService = /*#__PURE__*/function () {
11
11
  });
12
12
  _defineProperty(this, "onErrorHandled", function () {});
13
13
  }
14
- _createClass(NullDocumentService, [{
14
+ return _createClass(NullDocumentService, [{
15
15
  key: "updateDocument",
16
16
  value: function updateDocument() {}
17
17
  }, {
@@ -58,5 +58,4 @@ export var NullDocumentService = /*#__PURE__*/function () {
58
58
  return -1;
59
59
  }
60
60
  }]);
61
- return NullDocumentService;
62
61
  }();
@@ -33,7 +33,7 @@ export var StepQueueState = /*#__PURE__*/function () {
33
33
  return _this.queue.shift();
34
34
  });
35
35
  }
36
- _createClass(StepQueueState, [{
36
+ return _createClass(StepQueueState, [{
37
37
  key: "queueSteps",
38
38
  value: function queueSteps(data) {
39
39
  logger("Queueing data for version \"".concat(data.version, "\"."));
@@ -43,5 +43,4 @@ export var StepQueueState = /*#__PURE__*/function () {
43
43
  this.queue = orderedQueue;
44
44
  }
45
45
  }]);
46
- return StepQueueState;
47
46
  }();
@@ -7,7 +7,7 @@ export var Emitter = /*#__PURE__*/function () {
7
7
  _classCallCheck(this, Emitter);
8
8
  _defineProperty(this, "eventEmitter", new EventEmitter2());
9
9
  }
10
- _createClass(Emitter, [{
10
+ return _createClass(Emitter, [{
11
11
  key: "emit",
12
12
  value:
13
13
  /**
@@ -48,5 +48,4 @@ export var Emitter = /*#__PURE__*/function () {
48
48
  return this;
49
49
  }
50
50
  }]);
51
- return Emitter;
52
51
  }();