@observertc/client-monitor-js 1.3.2 → 2.0.1-8dfd576.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 (191) hide show
  1. package/lib/Accumulator.d.ts +3 -3
  2. package/lib/Accumulator.d.ts.map +1 -1
  3. package/lib/Accumulator.js +4 -4
  4. package/lib/ClientDevices.d.ts +2 -2
  5. package/lib/ClientDevices.d.ts.map +1 -1
  6. package/lib/ClientDevices.js +11 -11
  7. package/lib/ClientMonitor.d.ts +117 -105
  8. package/lib/ClientMonitor.d.ts.map +1 -1
  9. package/lib/ClientMonitorImpl.d.ts +16 -20
  10. package/lib/ClientMonitorImpl.d.ts.map +1 -1
  11. package/lib/ClientMonitorImpl.js +95 -152
  12. package/lib/Collectors.d.ts +1 -1
  13. package/lib/Collectors.d.ts.map +1 -1
  14. package/lib/Collectors.js +5 -4
  15. package/lib/Sampler.d.ts +4 -60
  16. package/lib/Sampler.d.ts.map +1 -1
  17. package/lib/Sampler.js +27 -172
  18. package/lib/adapters/Adapter.d.ts +1 -1
  19. package/lib/adapters/Adapter.d.ts.map +1 -1
  20. package/lib/adapters/Adapter.js +41 -41
  21. package/lib/collectors/MediasoupStatsCollector.d.ts +2 -2
  22. package/lib/collectors/MediasoupStatsCollector.d.ts.map +1 -1
  23. package/lib/collectors/MediasoupStatsCollector.js +69 -42
  24. package/lib/collectors/MediasoupSurrogates.d.ts +7 -7
  25. package/lib/collectors/MediasoupSurrogates.d.ts.map +1 -1
  26. package/lib/collectors/PeerConnectionStatsCollector.d.ts.map +1 -1
  27. package/lib/collectors/PeerConnectionStatsCollector.js +1 -6
  28. package/lib/collectors/StatsCollector.d.ts +1 -1
  29. package/lib/collectors/StatsCollector.d.ts.map +1 -1
  30. package/lib/entries/PeerConnectionEntryImpl.d.ts +8 -13
  31. package/lib/entries/PeerConnectionEntryImpl.d.ts.map +1 -1
  32. package/lib/entries/PeerConnectionEntryImpl.js +715 -890
  33. package/lib/entries/StatsEntryInterfaces.d.ts +6 -13
  34. package/lib/entries/StatsEntryInterfaces.d.ts.map +1 -1
  35. package/lib/entries/StatsStorage.d.ts +6 -8
  36. package/lib/entries/StatsStorage.d.ts.map +1 -1
  37. package/lib/entries/StatsStorage.js +20 -24
  38. package/lib/index.d.ts +3 -9
  39. package/lib/index.d.ts.map +1 -1
  40. package/lib/index.js +5 -11
  41. package/lib/utils/MediaDevices.d.ts +2 -2
  42. package/lib/utils/MediaDevices.d.ts.map +1 -1
  43. package/lib/utils/StatsVisitor.d.ts +4 -9
  44. package/lib/utils/StatsVisitor.d.ts.map +1 -1
  45. package/lib/utils/StatsVisitor.js +21 -37
  46. package/lib/utils/Timer.d.ts +2 -2
  47. package/lib/utils/Timer.d.ts.map +1 -1
  48. package/lib/utils/callEvents.d.ts +12 -0
  49. package/lib/utils/callEvents.d.ts.map +1 -0
  50. package/lib/utils/callEvents.js +15 -0
  51. package/lib/utils/common.d.ts +1 -0
  52. package/lib/utils/common.d.ts.map +1 -1
  53. package/lib/utils/common.js +2 -2
  54. package/lib/utils/logger.d.ts +18 -5
  55. package/lib/utils/logger.d.ts.map +1 -1
  56. package/lib/utils/logger.js +140 -49
  57. package/lib/utils/{hash.d.ts → makeStamp.d.ts} +1 -1
  58. package/lib/utils/makeStamp.d.ts.map +1 -0
  59. package/lib/utils/{hash.js → makeStamp.js} +1 -0
  60. package/lib/utils/reverseEnums.d.ts +1 -1
  61. package/lib/utils/reverseEnums.d.ts.map +1 -1
  62. package/package.json +5 -5
  63. package/src/Accumulator.ts +1 -1
  64. package/src/ClientDevices.ts +9 -9
  65. package/src/ClientMonitor.ts +125 -109
  66. package/src/ClientMonitorImpl.ts +111 -166
  67. package/src/Collectors.ts +1 -0
  68. package/src/Sampler.ts +27 -229
  69. package/src/adapters/Adapter.ts +1 -1
  70. package/src/collectors/MediasoupStatsCollector.ts +82 -37
  71. package/src/collectors/MediasoupSurrogates.ts +3 -1
  72. package/src/collectors/PeerConnectionStatsCollector.ts +4 -6
  73. package/src/collectors/StatsCollector.ts +1 -0
  74. package/src/entries/PeerConnectionEntryImpl.ts +132 -278
  75. package/src/entries/StatsEntryInterfaces.ts +14 -13
  76. package/src/entries/StatsStorage.ts +28 -31
  77. package/src/index.ts +3 -12
  78. package/src/utils/MediaDevices.ts +1 -1
  79. package/src/utils/StatsVisitor.ts +6 -22
  80. package/src/utils/callEvents.ts +12 -0
  81. package/src/utils/common.ts +1 -1
  82. package/src/utils/logger.ts +171 -30
  83. package/src/utils/{hash.ts → makeStamp.ts} +2 -1
  84. package/.github/workflows/publish.yaml +0 -42
  85. package/CHANGELOG.md +0 -37
  86. package/CONTRIBUTING.md +0 -29
  87. package/docs/.nojekyll +0 -1
  88. package/docs/assets/highlight.css +0 -92
  89. package/docs/assets/icons.css +0 -1043
  90. package/docs/assets/icons.png +0 -0
  91. package/docs/assets/icons@2x.png +0 -0
  92. package/docs/assets/main.js +0 -52
  93. package/docs/assets/search.js +0 -1
  94. package/docs/assets/style.css +0 -1413
  95. package/docs/assets/widgets.png +0 -0
  96. package/docs/assets/widgets@2x.png +0 -0
  97. package/docs/classes/MediaDevices.html +0 -1
  98. package/docs/index.html +0 -100
  99. package/docs/interfaces/CertificateEntry.html +0 -4
  100. package/docs/interfaces/ClientMonitor.ClientMonitor-1.html +0 -82
  101. package/docs/interfaces/CodecEntry.html +0 -6
  102. package/docs/interfaces/ContributingSourceEntry.html +0 -4
  103. package/docs/interfaces/DataChannelEntry.html +0 -4
  104. package/docs/interfaces/IceCandidatePairEntry.html +0 -4
  105. package/docs/interfaces/IceServerEntry.html +0 -4
  106. package/docs/interfaces/InboundRtpEntry.html +0 -14
  107. package/docs/interfaces/LocalCandidateEntry.html +0 -4
  108. package/docs/interfaces/MediaSourceEntry.html +0 -4
  109. package/docs/interfaces/OutboundRtpEntry.html +0 -10
  110. package/docs/interfaces/PcStatsCollector.html +0 -9
  111. package/docs/interfaces/PeerConnectionEntry.html +0 -6
  112. package/docs/interfaces/ReceiverEntry.html +0 -5
  113. package/docs/interfaces/RemoteCandidateEntry.html +0 -4
  114. package/docs/interfaces/RemoteInboundRtpEntry.html +0 -8
  115. package/docs/interfaces/RemoteOutboundRtpEntry.html +0 -8
  116. package/docs/interfaces/SctpTransportEntry.html +0 -4
  117. package/docs/interfaces/SenderEntry.html +0 -5
  118. package/docs/interfaces/StatsReader.html +0 -41
  119. package/docs/interfaces/TransceiverEntry.html +0 -4
  120. package/docs/interfaces/TransportEntry.html +0 -4
  121. package/docs/modules/ClientMonitor.html +0 -33
  122. package/docs/modules.html +0 -1
  123. package/figures/navigation.png +0 -0
  124. package/figures/navigation.puml +0 -150
  125. package/lib/EventsRelayer.d.ts +0 -47
  126. package/lib/EventsRelayer.d.ts.map +0 -1
  127. package/lib/EventsRelayer.js +0 -73
  128. package/lib/Sender.d.ts +0 -43
  129. package/lib/Sender.d.ts.map +0 -1
  130. package/lib/Sender.js +0 -157
  131. package/lib/codecs/Base64Codec.d.ts +0 -12
  132. package/lib/codecs/Base64Codec.d.ts.map +0 -1
  133. package/lib/codecs/Base64Codec.js +0 -25
  134. package/lib/codecs/Codec.d.ts +0 -11
  135. package/lib/codecs/Codec.d.ts.map +0 -1
  136. package/lib/codecs/Codec.js +0 -52
  137. package/lib/codecs/FacadedCodec.d.ts +0 -10
  138. package/lib/codecs/FacadedCodec.d.ts.map +0 -1
  139. package/lib/codecs/FacadedCodec.js +0 -34
  140. package/lib/codecs/JsonCodec.d.ts +0 -12
  141. package/lib/codecs/JsonCodec.d.ts.map +0 -1
  142. package/lib/codecs/JsonCodec.js +0 -30
  143. package/lib/codecs/ProtobufCodec.d.ts +0 -14
  144. package/lib/codecs/ProtobufCodec.d.ts.map +0 -1
  145. package/lib/codecs/ProtobufCodec.js +0 -67
  146. package/lib/codecs/TextCodec.d.ts +0 -14
  147. package/lib/codecs/TextCodec.d.ts.map +0 -1
  148. package/lib/codecs/TextCodec.js +0 -22
  149. package/lib/transports/Transport.d.ts +0 -16
  150. package/lib/transports/Transport.d.ts.map +0 -1
  151. package/lib/transports/Transport.js +0 -16
  152. package/lib/transports/WebsocketTransport.d.ts +0 -58
  153. package/lib/transports/WebsocketTransport.d.ts.map +0 -1
  154. package/lib/transports/WebsocketTransport.js +0 -217
  155. package/lib/utils/hash.d.ts.map +0 -1
  156. package/src/EventsRelayer.ts +0 -119
  157. package/src/Sender.ts +0 -190
  158. package/src/codecs/Base64Codec.ts +0 -32
  159. package/src/codecs/Codec.ts +0 -38
  160. package/src/codecs/FacadedCodec.ts +0 -36
  161. package/src/codecs/JsonCodec.ts +0 -39
  162. package/src/codecs/ProtobufCodec.ts +0 -53
  163. package/src/codecs/TextCodec.ts +0 -32
  164. package/src/transports/Transport.ts +0 -30
  165. package/src/transports/WebsocketTransport.ts +0 -260
  166. package/tests/Accumulator.spec.ts +0 -74
  167. package/tests/Collectors.spec.ts +0 -373
  168. package/tests/EventsRelayer.spec.ts +0 -122
  169. package/tests/Metrics.spec.ts +0 -40
  170. package/tests/Sampler.spec.ts +0 -237
  171. package/tests/Sender.spec.ts +0 -7
  172. package/tests/adapters/Adapter.spec.ts +0 -39
  173. package/tests/adapters/ChromeAdapter86.spec.ts +0 -62
  174. package/tests/adapters/DefaultAdapter.spec.ts +0 -6
  175. package/tests/adapters/Firefox94Adapter.spec.ts +0 -92
  176. package/tests/adapters/Safari14Adapter.spec.ts +0 -66
  177. package/tests/codecs/Base64Codec.spec.ts +0 -10
  178. package/tests/codecs/FacadedCodec.spec.ts +0 -18
  179. package/tests/codecs/JsonCodec.spec.ts +0 -10
  180. package/tests/codecs/ProtobufCodec.spec.ts +0 -41
  181. package/tests/codecs/TextCodec.spec.ts +0 -12
  182. package/tests/entries/StatsStorage.spec.ts +0 -399
  183. package/tests/helpers/ClientMonitorGenerator.ts +0 -173
  184. package/tests/helpers/StatsGenerator.ts +0 -310
  185. package/tests/helpers/createBaseAdapterTests.ts +0 -192
  186. package/tests/transports/WebsocketTransport.spec.ts +0 -17
  187. package/tests/utils/MediaDevices.spec.ts +0 -68
  188. package/tests/utils/Timer.spec.ts +0 -167
  189. package/tests/utils/common.spec.ts +0 -113
  190. package/tests/utils/hash.spec.ts +0 -110
  191. package/tests/utils/validators.spec.ts +0 -35
@@ -1,5 +1,5 @@
1
- import { ClientSample, Samples } from "@observertc/monitor-schemas";
2
- export declare type AccumulatorConfig = {
1
+ import { ClientSample, Samples } from '@observertc/sample-schemas-js';
2
+ export type AccumulatorConfig = {
3
3
  /**
4
4
  * Sets the maximum number of client sample allowed to be in one Sample
5
5
  *
@@ -19,7 +19,7 @@ export declare type AccumulatorConfig = {
19
19
  */
20
20
  forwardIfEmpty?: boolean;
21
21
  };
22
- export declare type SamplesListener = (samples?: Samples) => void;
22
+ export type SamplesListener = (samples?: Samples) => void;
23
23
  export declare class Accumulator {
24
24
  static create(config?: AccumulatorConfig): Accumulator;
25
25
  private _samples;
@@ -1 +1 @@
1
- {"version":3,"file":"Accumulator.d.ts","sourceRoot":"","sources":["../src/Accumulator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAKpE,oBAAY,iBAAiB,GAAG;IAC5B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAWF,oBAAY,eAAe,GAAG,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;AAE1D,qBAAa,WAAW;WACN,MAAM,CAAC,MAAM,CAAC,EAAE,iBAAiB;IAM/C,OAAO,CAAC,QAAQ,CAAe;IAC/B,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,OAAO,CAAoB;gBAChB,MAAM,EAAE,iBAAiB;IAI5C,IAAW,OAAO,IAAI,OAAO,CAE5B;IAEM,OAAO,CAAC,QAAQ,EAAE,eAAe;IAejC,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAaxD,OAAO,CAAC,UAAU;CAYrB"}
1
+ {"version":3,"file":"Accumulator.d.ts","sourceRoot":"","sources":["../src/Accumulator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAKtE,MAAM,MAAM,iBAAiB,GAAG;IAC5B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAWF,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;AAE1D,qBAAa,WAAW;WACN,MAAM,CAAC,MAAM,CAAC,EAAE,iBAAiB;IAM/C,OAAO,CAAC,QAAQ,CAAe;IAC/B,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,OAAO,CAAoB;gBAChB,MAAM,EAAE,iBAAiB;IAI5C,IAAW,OAAO,IAAI,OAAO,CAE5B;IAEM,OAAO,CAAC,QAAQ,EAAE,eAAe;IAejC,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAaxD,OAAO,CAAC,UAAU;CAYrB"}
@@ -12,6 +12,10 @@ const supplyDefaultConfig = () => {
12
12
  return defaultConfig;
13
13
  };
14
14
  class Accumulator {
15
+ static create(config) {
16
+ const appliedConfig = Object.assign(supplyDefaultConfig(), config);
17
+ return new Accumulator(appliedConfig);
18
+ }
15
19
  constructor(config) {
16
20
  // the first message constains the schema version
17
21
  this._samples = {};
@@ -19,10 +23,6 @@ class Accumulator {
19
23
  this._empty = true;
20
24
  this._config = config;
21
25
  }
22
- static create(config) {
23
- const appliedConfig = Object.assign(supplyDefaultConfig(), config);
24
- return new Accumulator(appliedConfig);
25
- }
26
26
  get isEmpty() {
27
27
  return this._empty;
28
28
  }
@@ -1,11 +1,11 @@
1
- import { Browser, Engine, OperationSystem, Platform } from "@observertc/monitor-schemas";
1
+ import { OperationSystem, Browser, Platform, Engine } from "@observertc/sample-schemas-js";
2
2
  export declare class ClientDevices {
3
3
  private _os;
4
4
  private _browser;
5
5
  private _platform;
6
6
  private _engine;
7
7
  private _warned;
8
- private _actualHashes?;
8
+ private _actualStamps?;
9
9
  private _pivotHashes?;
10
10
  constructor();
11
11
  collect(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"ClientDevices.d.ts","sourceRoot":"","sources":["../src/ClientDevices.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAoCzF,qBAAa,aAAa;IACtB,OAAO,CAAC,GAAG,CAA+B;IAC1C,OAAO,CAAC,QAAQ,CAA4B;IAC5C,OAAO,CAAC,SAAS,CAA8B;IAC/C,OAAO,CAAC,OAAO,CAA0B;IACzC,OAAO,CAAC,OAAO,CAAS;IAExB,OAAO,CAAC,aAAa,CAAC,CAAS;IAC/B,OAAO,CAAC,YAAY,CAAC,CAAS;;IAMvB,OAAO;IAyBd,IAAW,EAAE,IAAI,eAAe,CAE/B;IAED,IAAW,OAAO,IAAI,OAAO,CAE5B;IAED,IAAW,QAAQ,IAAI,QAAQ,CAE9B;IAED,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED,IAAW,WAAW,IAAI,OAAO,CAEhC;IAED,IAAW,gBAAgB,IAAI,OAAO,CAErC;IAED,IAAW,iBAAiB,IAAI,OAAO,CAEtC;IAED,IAAW,eAAe,IAAI,OAAO,CAEpC;IAED,IAAW,OAAO,IAAI,OAAO,CAE5B;IAEM,KAAK,IAAI,IAAI;CAKvB"}
1
+ {"version":3,"file":"ClientDevices.d.ts","sourceRoot":"","sources":["../src/ClientDevices.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAkC3F,qBAAa,aAAa;IACtB,OAAO,CAAC,GAAG,CAA+B;IAC1C,OAAO,CAAC,QAAQ,CAA4B;IAC5C,OAAO,CAAC,SAAS,CAA8B;IAC/C,OAAO,CAAC,OAAO,CAA0B;IACzC,OAAO,CAAC,OAAO,CAAS;IAExB,OAAO,CAAC,aAAa,CAAC,CAAS;IAC/B,OAAO,CAAC,YAAY,CAAC,CAAS;;IAMvB,OAAO;IAyBd,IAAW,EAAE,IAAI,eAAe,CAE/B;IAED,IAAW,OAAO,IAAI,OAAO,CAE5B;IAED,IAAW,QAAQ,IAAI,QAAQ,CAE9B;IAED,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED,IAAW,WAAW,IAAI,OAAO,CAEhC;IAED,IAAW,gBAAgB,IAAI,OAAO,CAErC;IAED,IAAW,iBAAiB,IAAI,OAAO,CAEtC;IAED,IAAW,eAAe,IAAI,OAAO,CAEpC;IAED,IAAW,OAAO,IAAI,OAAO,CAE5B;IAEM,KAAK,IAAI,IAAI;CAKvB"}
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.ClientDevices = void 0;
27
27
  const Bowser = __importStar(require("bowser"));
28
28
  const logger_1 = require("./utils/logger");
29
- const hash_1 = require("./utils/hash");
29
+ const makeStamp_1 = require("./utils/makeStamp");
30
30
  // import * as proto from "./ProtobufSamples"
31
31
  const logger = (0, logger_1.createLogger)("ClientDevices");
32
32
  const UNKNOWN_OS = {
@@ -77,11 +77,11 @@ class ClientDevices {
77
77
  logger.warn(`Cannot collect media devices and navigator data, because an error occurred`, err);
78
78
  }
79
79
  }
80
- this._actualHashes = {
81
- os: (0, hash_1.makeStamp)(this._os),
82
- browser: (0, hash_1.makeStamp)(this._browser),
83
- platform: (0, hash_1.makeStamp)(this._platform),
84
- engine: (0, hash_1.makeStamp)(this._engine),
80
+ this._actualStamps = {
81
+ os: (0, makeStamp_1.makeStamp)(this._os),
82
+ browser: (0, makeStamp_1.makeStamp)(this._browser),
83
+ platform: (0, makeStamp_1.makeStamp)(this._platform),
84
+ engine: (0, makeStamp_1.makeStamp)(this._engine),
85
85
  };
86
86
  }
87
87
  get os() {
@@ -98,26 +98,26 @@ class ClientDevices {
98
98
  }
99
99
  get isOsChanged() {
100
100
  var _a, _b;
101
- return ((_a = this._pivotHashes) === null || _a === void 0 ? void 0 : _a.os) !== ((_b = this._actualHashes) === null || _b === void 0 ? void 0 : _b.os);
101
+ return ((_a = this._pivotHashes) === null || _a === void 0 ? void 0 : _a.os) !== ((_b = this._actualStamps) === null || _b === void 0 ? void 0 : _b.os);
102
102
  }
103
103
  get isBrowserChanged() {
104
104
  var _a, _b;
105
- return ((_a = this._pivotHashes) === null || _a === void 0 ? void 0 : _a.browser) !== ((_b = this._actualHashes) === null || _b === void 0 ? void 0 : _b.browser);
105
+ return ((_a = this._pivotHashes) === null || _a === void 0 ? void 0 : _a.browser) !== ((_b = this._actualStamps) === null || _b === void 0 ? void 0 : _b.browser);
106
106
  }
107
107
  get isPlatformChanged() {
108
108
  var _a, _b;
109
- return ((_a = this._pivotHashes) === null || _a === void 0 ? void 0 : _a.platform) !== ((_b = this._actualHashes) === null || _b === void 0 ? void 0 : _b.platform);
109
+ return ((_a = this._pivotHashes) === null || _a === void 0 ? void 0 : _a.platform) !== ((_b = this._actualStamps) === null || _b === void 0 ? void 0 : _b.platform);
110
110
  }
111
111
  get isEngineChanged() {
112
112
  var _a, _b;
113
- return ((_a = this._pivotHashes) === null || _a === void 0 ? void 0 : _a.engine) !== ((_b = this._actualHashes) === null || _b === void 0 ? void 0 : _b.engine);
113
+ return ((_a = this._pivotHashes) === null || _a === void 0 ? void 0 : _a.engine) !== ((_b = this._actualStamps) === null || _b === void 0 ? void 0 : _b.engine);
114
114
  }
115
115
  get changed() {
116
116
  return this.isOsChanged || this.isBrowserChanged || this.isPlatformChanged || this.isEngineChanged;
117
117
  }
118
118
  pivot() {
119
119
  this._pivotHashes = {
120
- ...this._actualHashes,
120
+ ...this._actualStamps,
121
121
  };
122
122
  }
123
123
  }
@@ -1,222 +1,241 @@
1
- import { OperationSystem, Browser, Platform, Engine, MediaDevice, ExtensionStat, CustomCallEvent } from "@observertc/monitor-schemas";
1
+ import { OperationSystem, Browser, Platform, Engine, MediaDevice, CustomCallEvent, ExtensionStat, ClientSample, Samples } from "@observertc/sample-schemas-js";
2
2
  import { AccumulatorConfig } from "./Accumulator";
3
3
  import { Collectors, CollectorsConfig } from "./Collectors";
4
4
  import { StatsReader } from "./entries/StatsStorage";
5
- import { EventsRegister } from "./EventsRelayer";
6
5
  import { MetricsReader } from "./Metrics";
7
- import { SamplerConfig, TrackRelation } from "./Sampler";
8
- import { SenderConfig, SentSamplesCallback } from "./Sender";
9
- export declare type ClientMonitorConfig = {
6
+ import { TrackRelation } from "./Sampler";
7
+ import { StatsEntry } from "./utils/StatsVisitor";
8
+ export type ClientMonitorConfig = {
10
9
  /**
11
- * Sets the maximum number of listeners for event emitters
10
+ * Sets the maximum number of listeners for event emitters.
12
11
  */
13
12
  maxListeners?: number;
14
13
  /**
15
- * By setting it, the observer calls the added statsCollectors periodically
14
+ * By setting this, the observer calls the added statsCollectors periodically
16
15
  * and pulls the stats.
17
16
  *
18
17
  * DEFAULT: undefined
19
18
  */
20
19
  collectingPeriodInMs?: number;
21
20
  /**
22
- * By setting it, the observer make samples periodically.
21
+ * By setting this, the observer makes samples periodically.
23
22
  *
24
23
  * DEFAULT: undefined
25
24
  */
26
25
  samplingPeriodInMs?: number;
27
26
  /**
28
- * By setting it, the observer sends the samples periodically.
27
+ * By setting this, the observer sends the samples periodically.
29
28
  *
30
29
  * DEFAULT: undefined
31
30
  */
32
31
  sendingPeriodInMs?: number;
33
32
  /**
34
- * Set the ticking time of the timer invokes processes for collecting, sampling, and sending.
33
+ * Sets the ticking time of the timer that invokes processes for collecting, sampling, and sending.
35
34
  *
36
35
  * DEFAULT: 1000
37
36
  */
38
37
  tickingTimeInMs?: number;
39
38
  /**
40
- * By setting it stats items and entries are deleted if they are not updated.
39
+ * Flag indicating if the monitor creates call events.
40
+ * If true, events happening on the collected media source create call events such as MEDIA_TRACK_ADDED or MEDIA_TRACK_REMOVED.
41
+ * Similarly, if a peer connection is added, corresponding call events are generated.
41
42
  *
42
- * DEFAULT: undefined
43
- */
44
- statsExpirationTimeInMs?: number;
45
- /**
46
- * Collector Component related configurations
47
- */
48
- collectors?: CollectorsConfig;
49
- /**
50
- * Sampling Component Related configurations
43
+ * If this flag is false, the application is responsible for adding call events by calling the appropriate ClientMonitor method for the corresponding event.
51
44
  *
45
+ * DEFAULT: false
52
46
  */
53
- sampler?: SamplerConfig;
47
+ createCallEvents?: boolean;
54
48
  /**
55
- * Sending Component Related congurations
56
- *
57
- * default: undefined, means no sample is sent
49
+ * Collector Component related configurations.
58
50
  */
59
- sender?: SenderConfig;
51
+ collectors?: CollectorsConfig;
60
52
  /**
61
53
  * If the sender component is configured,
62
- * accumulator sets the buffer between sampling and sending.
54
+ * the accumulator sets the buffer between sampling and sending.
63
55
  */
64
56
  accumulator?: AccumulatorConfig;
65
57
  };
58
+ export interface ClientMonitorEvents {
59
+ 'stats-collected': {
60
+ stats: StatsEntry[];
61
+ };
62
+ 'sample-created': {
63
+ clientSample: ClientSample;
64
+ };
65
+ 'send': {
66
+ samples: Samples[];
67
+ };
68
+ }
66
69
  /**
67
70
  * Client Integration of ObserveRTC to monitor WebRTC clients.
68
71
  */
69
72
  export interface ClientMonitor {
70
73
  /**
71
- * Information about operation system the observer is obtained.
74
+ * The assigned configuration for the ClientMonitor upon creation.
75
+ */
76
+ readonly config: ClientMonitorConfig;
77
+ /**
78
+ * Information about the operating system from which the observer is obtained.
72
79
  */
73
80
  readonly os: OperationSystem;
74
81
  /**
75
- * Information about the browser the observer is obtained.
82
+ * Information about the browser from which the observer is obtained.
76
83
  */
77
84
  readonly browser: Browser;
78
85
  /**
79
- * Information about the platform the observer is obtained.
86
+ * Information about the platform from which the observer is obtained.
80
87
  */
81
88
  readonly platform: Platform;
82
89
  /**
83
- * Information about the engine the observer is obtained.
90
+ * Information about the engine from which the observer is obtained.
84
91
  */
85
92
  readonly engine: Engine;
86
93
  /**
87
- * Iterable iterator for the audio input devices the observer obtained.
94
+ * Iterable iterator for the audio input devices obtained by the observer.
88
95
  */
89
96
  readonly audioInputs: IterableIterator<MediaDevice>;
90
97
  /**
91
- * Iterable iterator for the audio output devices the observer obtained.
98
+ * Iterable iterator for the audio output devices obtained by the observer.
92
99
  */
93
100
  readonly audioOutputs: IterableIterator<MediaDevice>;
94
101
  /**
95
- * Iterable iterator for the video input devices the observer obtained.
102
+ * Iterable iterator for the video input devices obtained by the observer.
96
103
  */
97
104
  readonly videoInputs: IterableIterator<MediaDevice>;
98
105
  /**
99
- * Accessing the observer self metrics (last collecting time, etc)
106
+ * Provides access to the observer's self metrics (last collection time, etc.).
100
107
  */
101
108
  readonly metrics: MetricsReader;
102
109
  /**
103
- * Accessing to the collected stats
110
+ * Provides access to the collected stats.
104
111
  */
105
112
  readonly storage: StatsReader;
106
113
  /**
107
- * Accessing to the possible events an application can subscibe to
114
+ * Provides access to built-in integrations for different providers.
108
115
  */
109
- readonly events: EventsRegister;
116
+ readonly collectors: Collectors;
110
117
  /**
111
- * Accessing to built-in integrations for different providers
118
+ * Subscribe to events emitted by the monitor.
119
+ * @param event
120
+ * @param listener
112
121
  */
113
- readonly collectors: Collectors;
122
+ on<K extends keyof ClientMonitorEvents>(event: K, listener: (data: ClientMonitorEvents[K]) => void): this;
123
+ /**
124
+ * Subscribe to events emitted by the monitor only once.
125
+ * @param event
126
+ * @param listener
127
+ */
128
+ once<K extends keyof ClientMonitorEvents>(event: K, listener: (data: ClientMonitorEvents[K]) => void): this;
129
+ /**
130
+ * Unsubscribe from events emitted by the monitor.
131
+ * @param event
132
+ * @param listener
133
+ */
134
+ off<K extends keyof ClientMonitorEvents>(event: K, listener: (data: ClientMonitorEvents[K]) => void): this;
114
135
  /**
115
- * Adds a track relations to bind tracks to clients and SFUs
136
+ * Adds a track relation to bind tracks to clients and SFUs.
116
137
  *
117
138
  * @param trackRelation
118
139
  */
119
140
  addTrackRelation(trackRelation: TrackRelation): void;
120
141
  /**
121
- * Removes a track relation assoviated with the given track id.
142
+ * Removes a track relation associated with the given track id.
122
143
  *
123
144
  * @param trackId
124
145
  */
125
146
  removeTrackRelation(trackId: string): void;
126
147
  /**
127
- * Add the local part of the Signal Description Protocol.
128
- * The Monitor adds it to the next sample it creates and send it to the observer
148
+ * Adds the local part of the Session Description Protocol (SDP).
149
+ * The Monitor adds it to the next sample it creates and sends it to the observer.
129
150
  * @param localSDP
130
151
  */
131
152
  addLocalSDP(localSDP: string[]): void;
132
153
  /**
133
- * Adds media constrain used to obtain media.
134
- * Typically this is the parameter given to MediaDevices.getUserMedia()
154
+ * Adds media constraints used to obtain media.
155
+ * Typically, these are the parameters given to MediaDevices.getUserMedia().
135
156
  *
136
- * constrain added to the observer are sampled by a sampler when a ClientSample is created.
157
+ * Constraints added to the observer are sampled by a sampler when a ClientSample is created.
137
158
  *
138
159
  * @param constrain
139
160
  */
140
161
  addMediaConstraints(constrain: MediaStreamConstraints | MediaTrackConstraints): void;
141
162
  /**
142
- * Adds a user media error. Typically this is an error catched while obtaining getUserMedia from MediaDEevices
163
+ * Adds a user media error. Typically, this is an error caught while obtaining getUserMedia from MediaDevices.
143
164
  *
144
- * The obtained user media error is added to the observer are sampled by a sampler when a ClientSample is created.
165
+ * The obtained user media error is added to the observer and sampled by a sampler when a ClientSample is created.
145
166
  * @param message
146
167
  */
147
168
  addUserMediaError(err: any): void;
148
169
  /**
149
- * Adds custom call event will be sent along with the sample to the observer. The
150
- * added event will be reported as CallEvent by the observer.
170
+ * Adds a MEDIA_TRACK_ADDED type call event
171
+ * @param peerConnectionId - The identifier of the peer connection to which the track is added
172
+ * @param mediaTrackId - The ID of the added track
173
+ * @param timestamp - The timestamp when the event occurred (optional)
151
174
  */
152
- addCustomCallEvent(event: CustomCallEvent): void;
175
+ addMediaTrackAddedCallEvent(peerConnectionId: string, mediaTrackId: string, timestamp?: number): void;
153
176
  /**
154
- * Adds an application provided custom payload object to the observer.
155
- * This is typically extra information the application wants to obtain and send to the backend.
156
- * The added information is obtained by the sampler and ClientSample holds and send these information to the observer.
157
- * The observer will send forward this information together with which call it belonged to.
158
- *
159
- * @param stats arbitrary information intended to send
177
+ * Adds a MEDIA_TRACK_REMOVED type call event
178
+ * @param peerConnectionId - The identifier of the peer connection from which the track is removed
179
+ * @param mediaTrackId - The ID of the removed track
180
+ * @param timestamp - The timestamp when the event occurred (optional)
160
181
  */
161
- addExtensionStats(stats: ExtensionStat): void;
182
+ addMediaTrackRemovedCallEvent(peerConnectionId: string, mediaTrackId: string, timestamp?: number): void;
162
183
  /**
163
- * Set the media devices used by the webrtc app
164
- * Typically this is a list of [MediaDevices.getUserMedia()](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia).
165
- *
166
- * The client monitor kepp track of the already added devices, removes the one not updated,
167
- * and in the next sample sent to the observer only the new devices will be sent
168
- *
184
+ * Adds a PEER_CONNECTION_OPENED type call event
185
+ * @param peerConnectionId - The identifier of the opened peer connection
186
+ * @param timestamp - The timestamp when the event occurred (optional)
169
187
  */
170
- setMediaDevices(...devices: MediaDevice[]): void;
188
+ addPeerConnectionOpenedCallEvent(peerConnectionId: string, timestamp?: number): void;
171
189
  /**
172
- * Sets the client displayed userId.
173
- *
174
- * This can change during the call, but the clientId must remain the same
175
- * @param value
190
+ * Adds a PEER_CONNECTION_CLOSED type call event
191
+ * @param peerConnectionId - The identifier of the closed peer connection
192
+ * @param timestamp - The timestamp when the event occurred (optional)
176
193
  */
177
- setUserId(value?: string | undefined): void;
194
+ addPeerConnectionClosedCallEvent(peerConnectionId: string, timestamp?: number): void;
178
195
  /**
179
- * Sets the roomId for samples. If the roomId is set by configuration, this cause a warning, but no effect.
180
- * If the roomId was not set before the first sample is created, the Sampler assign a random UUID value.
181
- * @param value the id of the room matches among participants in the same service
196
+ * Adds an ICE_CONNECTION_STATE_CHANGED type call event
197
+ * @param peerConnectionId - The identifier of the peer connection with the changed ICE connection state
198
+ * @param iceConnectionState - The new ICE connection state
199
+ * @param timestamp - The timestamp when the event occurred (optional)
182
200
  */
183
- setRoomId(value?: string): void;
201
+ addIceConnectionStateChangedCallEvent(peerConnectionId: string, connectionState: RTCPeerConnectionState, timestamp?: number): void;
184
202
  /**
185
- * Sets the clientId for samples. If the clientId is set by configuration, this cause no effect.
186
- * If the clientId was not set before the first sample is created, the Sampler assign a random UUID value.
187
- * @param value the identifier of the client, must be a valid UUID
203
+ * Adds a custom call event that will be sent along with the sample to the observer. The
204
+ * added event will be reported as a CallEvent by the observer.
188
205
  */
189
- setClientId(value?: string): void;
206
+ addCustomCallEvent(event: CustomCallEvent): void;
190
207
  /**
191
- * Sets the identifier of the call the client participates.
192
- * If the value is given then sample will contain the provided value, and the observer will (try) to use it.
193
- * how strongly influence it the callId assigning process in the observer for samples coming from other client
194
- * is depend on the callIdAssignMode of the observer.
195
- * @param value a valid UUID
208
+ * Adds an application-provided custom payload object to the observer.
209
+ * This is typically extra information that the application wants to obtain and send to the backend.
210
+ * The added information is obtained by the sampler, and the ClientSample holds and sends this information to the observer.
211
+ * The observer will forward this information along with the call it belongs to.
212
+ *
213
+ * @param stats - Arbitrary information intended to be sent
196
214
  */
197
- setCallId(value: string): void;
215
+ addExtensionStats(stats: ExtensionStat): void;
198
216
  /**
199
- * Sets the marker added to every sample created by this observer.
200
- * Typically this is a delicate information for certain situation like develop, or debugging, where
201
- * the generated reports by the observer can be distinguished by the markers.
217
+ * Sets the media devices used by the WebRTC app
218
+ * Typically, this is a list of [MediaDevices.getUserMedia()](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia).
219
+ *
220
+ * The client monitor keeps track of the already added devices, removes the ones not updated,
221
+ * and in the next sample sent to the observer, only the new devices will be sent
202
222
  *
203
- * @param marker
204
223
  */
205
- setMarker(marker: string): void;
224
+ setMediaDevices(...devices: MediaDevice[]): void;
206
225
  /**
207
- * Sets the collecting period in milliseconds. Thee Monitor calls its collect method
208
- * with a given time period
226
+ * Sets the collecting period in milliseconds. The Monitor calls its collect method
227
+ * at the specified time interval.
209
228
  *
210
- * NOTE: if a timer has previously set for collecting this set will overrides it
211
- * @param collectingPeriodInMs
229
+ * NOTE: If a timer has been previously set for collecting, this setting will override it.
230
+ * @param collectingPeriodInMs - Collecting period in milliseconds
212
231
  */
213
232
  setCollectingPeriod(collectingPeriodInMs: number): void;
214
233
  /**
215
- * Sets the sampling period in milliseconds. Thee Monitor calls its sample method
216
- * with a given time period
234
+ * Sets the sampling period in milliseconds. The Monitor calls its sample method
235
+ * at the specified time interval.
217
236
  *
218
- * NOTE: if a timer has previously set for sampling this set will overrides it
219
- * @param samplingPeriodInMs
237
+ * NOTE: If a timer has been previously set for sampling, this setting will override it.
238
+ * @param samplingPeriodInMs - Sampling period in milliseconds
220
239
  */
221
240
  setSamplingPeriod(samplingPeriodInMs: number): void;
222
241
  /**
@@ -227,13 +246,6 @@ export interface ClientMonitor {
227
246
  * @param sendingPeriodInMs
228
247
  */
229
248
  setSendingPeriod(sendingPeriodInMs: number): void;
230
- /**
231
- * Connect the client monitor to an observer
232
- *
233
- * NOTE: if the monitor is already connected then the open connection will be closed first.
234
- * @param config
235
- */
236
- connect(config: SenderConfig): void;
237
249
  /**
238
250
  * Collect all stats simultenously and update the #this.stats storage.
239
251
  */
@@ -246,7 +258,7 @@ export interface ClientMonitor {
246
258
  * Send Samples to an observer endpoint. [Samples](https://www.npmjs.com/package/@observertc/schemas#Samples) are
247
259
  * accumulated ClientSamples (and/or SfuSamples) send to an endpoint for further analysis.
248
260
  */
249
- send(callback?: SentSamplesCallback): void;
261
+ send(): void;
250
262
  /**
251
263
  * Close the ClientObserver, clear the storage, and statscollectors.
252
264
  */
@@ -1 +1 @@
1
-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,CAAC,CAAC;IAEzB;;OAEG;IACH,MAAM,IAAI,IAAI,CAAC;IAEf;;;OAGG;IACH,IAAI,IAAI,IAAI,CAAC;IAEb;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;CACjB"}
@@ -1,29 +1,24 @@
1
- import { Browser, CustomCallEvent, Engine, ExtensionStat, MediaDevice, OperationSystem, Platform } from "@observertc/monitor-schemas";
2
- import { EventsRegister } from "./EventsRelayer";
3
1
  import { TrackRelation } from "./Sampler";
4
- import { SenderConfig, SentSamplesCallback } from "./Sender";
5
2
  import { StatsReader } from "./entries/StatsStorage";
6
- import { ClientMonitor, ClientMonitorConfig } from "./ClientMonitor";
3
+ import { ClientMonitor, ClientMonitorConfig, ClientMonitorEvents } from "./ClientMonitor";
7
4
  import { MetricsReader } from "./Metrics";
8
5
  import { Collectors } from "./Collectors";
6
+ import { OperationSystem, Browser, Platform, Engine, MediaDevice, ExtensionStat, CustomCallEvent } from "@observertc/sample-schemas-js";
7
+ type ConstructorConfig = ClientMonitorConfig;
9
8
  export declare class ClientMonitorImpl implements ClientMonitor {
9
+ readonly config: ConstructorConfig;
10
10
  static create(config?: ClientMonitorConfig): ClientMonitor;
11
11
  private _closed;
12
- private _flags;
13
- private _config;
14
12
  private _mediaDevices;
15
13
  private _clientDevices;
16
14
  private _collectors;
17
15
  private _sampler;
18
- private _sender?;
19
16
  private _timer?;
20
- private _eventer;
21
17
  private _statsStorage;
22
18
  private _accumulator;
23
19
  private _metrics;
20
+ private _emitter;
24
21
  private constructor();
25
- get clientId(): string | undefined;
26
- get callId(): string | undefined;
27
22
  get os(): OperationSystem;
28
23
  get metrics(): MetricsReader;
29
24
  get browser(): Browser;
@@ -32,35 +27,36 @@ export declare class ClientMonitorImpl implements ClientMonitor {
32
27
  get audioInputs(): IterableIterator<MediaDevice>;
33
28
  get audioOutputs(): IterableIterator<MediaDevice>;
34
29
  get videoInputs(): IterableIterator<MediaDevice>;
35
- get events(): EventsRegister;
36
30
  get storage(): StatsReader;
37
31
  get collectors(): Collectors;
38
- setRoomId(value: string): void;
39
- setClientId(value: string): void;
40
- setCallId(value: string): void;
41
- connect(senderConfig: SenderConfig): void;
42
- disconnect(): void;
43
32
  addTrackRelation(trackRelation: TrackRelation): void;
44
33
  removeTrackRelation(trackId: string): void;
45
34
  setMediaDevices(...devices: MediaDevice[]): void;
46
- setUserId(value?: string | null): void;
47
35
  addMediaConstraints(constrains: MediaStreamConstraints | MediaTrackConstraints): void;
48
36
  addUserMediaError(err: any): void;
37
+ addMediaTrackAddedCallEvent(peerConnectionId: string, mediaTrackId: string, timestamp?: number): void;
38
+ addMediaTrackRemovedCallEvent(peerConnectionId: string, mediaTrackId: string, timestamp?: number): void;
39
+ addPeerConnectionOpenedCallEvent(peerConnectionId: string, timestamp?: number): void;
40
+ addPeerConnectionClosedCallEvent(peerConnectionId: string, timestamp?: number): void;
41
+ addIceConnectionStateChangedCallEvent(peerConnectionId: string, connectionState: RTCPeerConnectionState, timestamp?: number): void;
49
42
  addExtensionStats(stats: ExtensionStat): void;
50
43
  addCustomCallEvent(event: CustomCallEvent): void;
51
44
  addLocalSDP(localSDP: string[]): void;
52
- setMarker(marker: string): void;
53
45
  collect(): Promise<void>;
54
46
  sample(): void;
55
- send(callback?: SentSamplesCallback): void;
47
+ send(): void;
56
48
  close(): void;
57
49
  setCollectingPeriod(collectingPeriodInMs: number): void;
58
50
  setSamplingPeriod(samplingPeriodInMs: number): void;
59
51
  setSendingPeriod(sendingPeriodInMs: number): void;
52
+ on<K extends keyof ClientMonitorEvents>(event: K, listener: (data: ClientMonitorEvents[K]) => void): this;
53
+ once<K extends keyof ClientMonitorEvents>(event: K, listener: (data: ClientMonitorEvents[K]) => void): this;
54
+ off<K extends keyof ClientMonitorEvents>(event: K, listener: (data: ClientMonitorEvents[K]) => void): this;
55
+ _emit<K extends keyof ClientMonitorEvents>(event: K, data: ClientMonitorEvents[K]): boolean;
60
56
  private _collectClientDevices;
61
57
  private _makeCollector;
62
58
  private _makeSampler;
63
- private _createSender;
64
59
  private _createTimer;
65
60
  }
61
+ export {};
66
62
  //# sourceMappingURL=ClientMonitorImpl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClientMonitorImpl.d.ts","sourceRoot":"","sources":["../src/ClientMonitorImpl.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,OAAO,EACP,eAAe,EACf,MAAM,EACN,aAAa,EACb,WAAW,EACX,eAAe,EACf,QAAQ,EAGX,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,cAAc,EAAiB,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAW,aAAa,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAU,YAAY,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKrE,OAAO,EAAE,WAAW,EAAgB,MAAM,wBAAwB,CAAC;AAInE,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAW,aAAa,EAAE,MAAM,WAAW,CAAC;AAGnD,OAAO,EAAE,UAAU,EAAoC,MAAM,cAAc,CAAC;AAqB5E,qBAAa,iBAAkB,YAAW,aAAa;WACrC,MAAM,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,aAAa;IAUjE,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,aAAa,CAAe;IACpC,OAAO,CAAC,cAAc,CAAgB;IACtC,OAAO,CAAC,WAAW,CAAiB;IACpC,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,MAAM,CAAC,CAAQ;IACvB,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,aAAa,CAAe;IACpC,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,QAAQ,CAAU;IAE1B,OAAO;IAcP,IAAW,QAAQ,IAAI,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