motion-master-client 0.0.247 → 0.0.248

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.
package/src/lib/util.js CHANGED
@@ -1,8 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mergeUint8Arrays = exports.parseUnitValue = exports.isElectronApp = exports.convertBlobToBase64 = exports.toFixedFormat = exports.setBitHigh = exports.setBitLow = exports.camelCaseToWords = exports.findDuplicates = exports.getMapKeyByValue = exports.createRandomColor = exports.convertRgbToLedColor = exports.resolveAfter = exports.decodeTextContent = exports.convertMotionMasterMessageToLoggerContext = exports.createPlainObjectFromMotionMasterMessage = exports.diffSystemLogContents = exports.parseSystemLogContent = exports.parseSystemLogLine = void 0;
3
+ exports.convertCTypeToStructFormatCharacter = exports.mapByProperty = exports.groupByProperty = exports.uniqueItems = exports.mergeUint8Arrays = exports.parseUnitValue = exports.isElectronApp = exports.convertBlobToBase64 = exports.toFixedFormat = exports.updateBit = exports.clearBit = exports.setBit = exports.isBitOn = exports.getBit = exports.setBitHigh = exports.setBitLow = exports.camelCaseToWords = exports.findDuplicates = exports.getMapKeyByValue = exports.createRandomColor = exports.convertRgbToLedColor = exports.resolveAfter = exports.decodeTextContent = exports.convertMotionMasterMessageToLoggerContext = exports.createPlainObjectFromMotionMasterMessage = exports.diffSystemLogContents = exports.parseSystemLogContent = exports.parseSystemLogLine = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const types_1 = require("./types");
6
+ /**
7
+ * Parses a single line of system log into a structured `SystemLogLine` object.
8
+ *
9
+ * This function uses a regular expression to extract key parts of a log line: the timestamp, uptime, ID,
10
+ * file, log level, and message. If the line matches the expected format, it returns an object with these
11
+ * extracted properties. If the line doesn't match the format, it returns `undefined`.
12
+ *
13
+ * **Note:** The regular expression uses the `s` flag (dot-all mode), which may not be supported in all browsers.
14
+ * This is suppressed with `@ts-ignore`.
15
+ *
16
+ * @param {string} line - A single log line to parse.
17
+ * @returns {SystemLogLine | undefined} A `SystemLogLine` object with the parsed data, or `undefined` if the line doesn't match the expected format.
18
+ */
6
19
  function parseSystemLogLine(line) {
7
20
  // @ts-ignore - The 's' flag is not supported in all browsers.
8
21
  const re = /(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d{1,3})\s\((.+)\)\s(?:\[(.+)\])?(.+:\d+)(.+?)\|(.*)/s;
@@ -21,6 +34,19 @@ function parseSystemLogLine(line) {
21
34
  return;
22
35
  }
23
36
  exports.parseSystemLogLine = parseSystemLogLine;
37
+ /**
38
+ * Parses the content of a system log into an array of `SystemLogLine` objects.
39
+ *
40
+ * This function uses a regular expression to split the log content into individual log lines. It then parses
41
+ * each log line into a structured `SystemLogLine` object. The function also filters out any empty lines
42
+ * and ensures only valid `SystemLogLine` objects are returned.
43
+ *
44
+ * **Note:** The regular expression uses the `s` flag, which may not be supported in all browsers. This is suppressed
45
+ * with `@ts-ignore` to allow the use of dot-all mode in the regex.
46
+ *
47
+ * @param {string} content - The raw system log content to parse.
48
+ * @returns {SystemLogLine[]} An array of `SystemLogLine` objects parsed from the log content.
49
+ */
24
50
  function parseSystemLogContent(content) {
25
51
  // @ts-ignore - The 's' flag is not supported in all browsers.
26
52
  const re = /(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d{1,3}.+?)(?=\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d{1,3}|$)/gs;
@@ -31,6 +57,19 @@ function parseSystemLogContent(content) {
31
57
  .filter((l) => l !== undefined);
32
58
  }
33
59
  exports.parseSystemLogContent = parseSystemLogContent;
60
+ /**
61
+ * Differs two system log contents and returns the new content after the last matching line.
62
+ *
63
+ * This function compares two log contents, `oldContent` and `newContent`, and returns the portion of
64
+ * the `newContent` that appears after the last matching line in the `oldContent`. It splits the content
65
+ * based on the provided `lineSeparator` and uses the `lastLineIndex` to find the line to compare.
66
+ *
67
+ * @param {string} oldContent - The original system log content to compare against.
68
+ * @param {string} newContent - The new system log content to find the difference from the old content.
69
+ * @param {string} [lineSeparator='\n'] - The character(s) used to separate lines in the content (default is newline).
70
+ * @param {number} [lastLineIndex=-2] - The index of the last line to compare, negative index can be used (default is -2, the second-to-last line).
71
+ * @returns {string} The portion of `newContent` after the last matching line in `oldContent`. If no match is found, returns the entire `newContent`.
72
+ */
34
73
  function diffSystemLogContents(oldContent, newContent, lineSeparator = '\n', lastLineIndex = -2) {
35
74
  const oldLines = oldContent.split(lineSeparator);
36
75
  const oldLastLine = oldLines.at(lastLineIndex);
@@ -50,7 +89,18 @@ function diffSystemLogContents(oldContent, newContent, lineSeparator = '\n', las
50
89
  return newContent;
51
90
  }
52
91
  exports.diffSystemLogContents = diffSystemLogContents;
53
- // Using bytes fixes: ERROR TypeError: Cannot freeze array buffer views with elements in NgRx
92
+ /**
93
+ * Converts a `MotionMasterMessage` to a plain JavaScript object with specific field handling options.
94
+ *
95
+ * This function utilizes the `MotionMasterMessage.toObject()` method to create a plain object
96
+ * from the provided `MotionMasterMessage`. It includes various options for how fields are processed,
97
+ * such as handling arrays, default values, and JSON compatibility.
98
+ *
99
+ * **Note:** The function includes a fix for the error `TypeError: Cannot freeze array buffer views with elements in NgRx`.
100
+ *
101
+ * @param {MotionMasterMessage} motionMasterMessage - The `MotionMasterMessage` instance to convert.
102
+ * @returns {object} A plain JavaScript object representing the message with the specified options applied.
103
+ */
54
104
  function createPlainObjectFromMotionMasterMessage(motionMasterMessage) {
55
105
  return types_1.MotionMasterMessage.toObject(motionMasterMessage, {
56
106
  bytes: Array,
@@ -62,9 +112,21 @@ function createPlainObjectFromMotionMasterMessage(motionMasterMessage) {
62
112
  });
63
113
  }
64
114
  exports.createPlainObjectFromMotionMasterMessage = createPlainObjectFromMotionMasterMessage;
115
+ /**
116
+ * Converts a `motionMasterMessage` into a logger context object.
117
+ *
118
+ * This function extracts relevant details from the provided `motionMasterMessage` and
119
+ * constructs an object to be used as context in logging. It determines whether the message
120
+ * is a request or status type and stores the associated keys from the respective properties.
121
+ *
122
+ * @param {IMotionMasterMessage} motionMasterMessage - The message to convert into a logger context.
123
+ * @param {string} [namespace='reqResMessage'] - The namespace to associate with the context (default is 'reqResMessage').
124
+ * @returns {object} An object containing the `namespace`, the original `motionMasterMessage`, the `type` of message
125
+ * (either 'request' or 'status'), and the `name` (a string of keys from the request or status).
126
+ */
65
127
  function convertMotionMasterMessageToLoggerContext(motionMasterMessage, namespace = 'reqResMessage') {
66
- let type;
67
- let name;
128
+ let type = '';
129
+ let name = '';
68
130
  if (motionMasterMessage.request) {
69
131
  type = 'request';
70
132
  name = Object.keys(motionMasterMessage.request).join();
@@ -76,18 +138,47 @@ function convertMotionMasterMessageToLoggerContext(motionMasterMessage, namespac
76
138
  return { namespace, motionMasterMessage, type, name };
77
139
  }
78
140
  exports.convertMotionMasterMessageToLoggerContext = convertMotionMasterMessageToLoggerContext;
141
+ /**
142
+ * Decodes a `Uint8Array` of text content into a string.
143
+ *
144
+ * This function uses the `TextDecoder` API to decode the given `Uint8Array` (representing
145
+ * text encoded in a specific encoding, such as UTF-8) into a readable string.
146
+ *
147
+ * @param {Uint8Array} content - The `Uint8Array` containing the encoded text.
148
+ * @returns {string} The decoded string.
149
+ */
79
150
  function decodeTextContent(content) {
80
151
  const decoder = new TextDecoder();
81
152
  const buffer = Uint8Array.from(content);
82
153
  return decoder.decode(buffer);
83
154
  }
84
155
  exports.decodeTextContent = decodeTextContent;
156
+ /**
157
+ * Resolves a promise after a specified delay.
158
+ *
159
+ * This function returns a promise that resolves after the given number of milliseconds (`ms`),
160
+ * optionally resolving with a provided value.
161
+ *
162
+ * @param {number} ms - The number of milliseconds to wait before resolving the promise.
163
+ * @param {unknown} [value] - The value to resolve with once the delay has passed. Default is `undefined`.
164
+ * @returns {Promise<unknown>} A promise that resolves with the specified value after the delay.
165
+ */
85
166
  function resolveAfter(ms, value) {
86
167
  return new Promise(function (resolve) {
87
168
  setTimeout(resolve.bind(null, value), ms);
88
169
  });
89
170
  }
90
171
  exports.resolveAfter = resolveAfter;
172
+ /**
173
+ * Converts a 24-bit RGB color value to a format used by LED controllers.
174
+ *
175
+ * This function takes an RGB color value (represented as a single 24-bit number)
176
+ * and rearranges the color channels to match a typical LED color format, which may
177
+ * require swapping the red and green channels.
178
+ *
179
+ * @param {number} value - A 24-bit integer representing the RGB color value (0xRRGGBB).
180
+ * @returns {number} A new integer representing the color in the LED format (0xGRB).
181
+ */
91
182
  function convertRgbToLedColor(value) {
92
183
  const r = (value >> 16) & 0xff;
93
184
  const g = (value >> 8) & 0xff;
@@ -96,6 +187,18 @@ function convertRgbToLedColor(value) {
96
187
  return ledColorValue;
97
188
  }
98
189
  exports.convertRgbToLedColor = convertRgbToLedColor;
190
+ /**
191
+ * Generates a random hex color code with a specified brightness.
192
+ *
193
+ * This function creates a random color by generating random values for the red, green, and blue
194
+ * color channels. The brightness parameter ensures the generated color is not too dark by
195
+ * limiting the possible range for each channel.
196
+ *
197
+ * @param {number} brightness - The minimum brightness of the generated color. Should be between 0 and 255.
198
+ * @returns {string} A random hex color code, in the form of `#RRGGBB`.
199
+ *
200
+ * @throws {Error} Throws an error if the brightness is not between 0 and 255.
201
+ */
99
202
  function createRandomColor(brightness) {
100
203
  function randomChannel(brightness) {
101
204
  const r = 255 - brightness;
@@ -106,6 +209,19 @@ function createRandomColor(brightness) {
106
209
  return '#' + randomChannel(brightness) + randomChannel(brightness) + randomChannel(brightness);
107
210
  }
108
211
  exports.createRandomColor = createRandomColor;
212
+ /**
213
+ * Retrieves the first key from a `Map` that matches a given value.
214
+ *
215
+ * This function iterates over the entries of the map and returns the first key
216
+ * whose corresponding value strictly equals (`===`) the provided `searchValue`.
217
+ * If no matching value is found, it returns `undefined`.
218
+ *
219
+ * @template K - The type of the map's keys.
220
+ * @template V - The type of the map's values.
221
+ * @param {Map<K, V>} map - The map to search through.
222
+ * @param {V} searchValue - The value to find the corresponding key for.
223
+ * @returns {K | undefined} The key associated with the given value, or `undefined` if not found.
224
+ */
109
225
  function getMapKeyByValue(map, searchValue) {
110
226
  for (let [key, value] of map.entries()) {
111
227
  if (value === searchValue) {
@@ -115,6 +231,16 @@ function getMapKeyByValue(map, searchValue) {
115
231
  return;
116
232
  }
117
233
  exports.getMapKeyByValue = getMapKeyByValue;
234
+ /**
235
+ * Finds and returns the duplicate elements in an array.
236
+ *
237
+ * This function iterates through the array and identifies elements that appear more than once.
238
+ * It preserves only one instance of each duplicate in the output.
239
+ *
240
+ * @template T - The type of elements in the array.
241
+ * @param {T[]} arr - The input array to search for duplicates.
242
+ * @returns {T[]} An array of the duplicate elements, without repetition.
243
+ */
118
244
  function findDuplicates(arr) {
119
245
  const uniqueElements = new Set();
120
246
  const duplicates = new Set();
@@ -129,6 +255,15 @@ function findDuplicates(arr) {
129
255
  return Array.from(duplicates);
130
256
  }
131
257
  exports.findDuplicates = findDuplicates;
258
+ /**
259
+ * Converts a camelCase string into a space-separated lowercase string.
260
+ *
261
+ * This function inserts spaces before each uppercase letter in the string (except the first one)
262
+ * and converts the entire string to lowercase.
263
+ *
264
+ * @param {string} str - The camelCase string to convert.
265
+ * @returns {string} A space-separated, lowercase version of the input string.
266
+ */
132
267
  function camelCaseToWords(str) {
133
268
  return str.replace(/([A-Z])/g, ' $1').toLowerCase();
134
269
  }
@@ -155,6 +290,78 @@ function setBitHigh(value, position) {
155
290
  return value | (1 << position);
156
291
  }
157
292
  exports.setBitHigh = setBitHigh;
293
+ /**
294
+ * Returns the bit at the specified position in a number.
295
+ *
296
+ * This function performs a bitwise AND operation to isolate the bit at the `k`th position.
297
+ * If the bit is 0, it returns `0`; otherwise, it returns `1`.
298
+ *
299
+ * @param {number} n - The number whose bit will be retrieved.
300
+ * @param {number} k - The position of the bit to retrieve (0-indexed).
301
+ * @returns {number} The bit at position `k` (either 0 or 1).
302
+ */
303
+ function getBit(n, k) {
304
+ return (n & (1 << k)) === 0 ? 0 : 1;
305
+ }
306
+ exports.getBit = getBit;
307
+ /**
308
+ * Checks if the bit at the specified position is on (1).
309
+ *
310
+ * This function performs a bitwise AND operation to check if the bit at the `k`th position is set to `1`.
311
+ * It returns `true` if the bit is set, otherwise `false`.
312
+ *
313
+ * @param {number} n - The number to check.
314
+ * @param {number} k - The position of the bit to check (0-indexed).
315
+ * @returns {boolean} `true` if the bit is on (1), otherwise `false`.
316
+ */
317
+ function isBitOn(n, k) {
318
+ return (n & (1 << k)) > 0;
319
+ }
320
+ exports.isBitOn = isBitOn;
321
+ /**
322
+ * Sets the bit at the specified position to 1.
323
+ *
324
+ * This function performs a bitwise OR operation to ensure that the bit at the `k`th position is set to `1`.
325
+ *
326
+ * @param {number} n - The number in which the bit will be set.
327
+ * @param {number} k - The position of the bit to set (0-indexed).
328
+ * @returns {number} The new number with the bit at position `k` set to 1.
329
+ */
330
+ function setBit(n, k) {
331
+ return n | (1 << k);
332
+ }
333
+ exports.setBit = setBit;
334
+ /**
335
+ * Clears the bit at the specified position (sets it to 0).
336
+ *
337
+ * This function performs a bitwise AND operation with a mask to ensure that the bit at the `k`th position is set to `0`.
338
+ *
339
+ * @param {number} n - The number in which the bit will be cleared.
340
+ * @param {number} k - The position of the bit to clear (0-indexed).
341
+ * @returns {number} The new number with the bit at position `k` cleared (set to 0).
342
+ */
343
+ function clearBit(n, k) {
344
+ const mask = ~(1 << k);
345
+ return n & mask;
346
+ }
347
+ exports.clearBit = clearBit;
348
+ /**
349
+ * Updates the bit at the specified position with the given value.
350
+ *
351
+ * This function updates the bit at the `k`th position to either `1` or `0` depending on the provided value.
352
+ * If the value is a boolean, it will be normalized to `1` (true) or `0` (false).
353
+ *
354
+ * @param {number} n - The number in which the bit will be updated.
355
+ * @param {number} k - The position of the bit to update (0-indexed).
356
+ * @param {number | boolean} value - The value to set the bit to (1 or 0, or `true`/`false`).
357
+ * @returns {number} The new number with the bit at position `k` updated.
358
+ */
359
+ function updateBit(n, k, value) {
360
+ const normalizedValue = value ? 1 : 0;
361
+ const clearMask = ~(1 << k);
362
+ return (n & clearMask) | (normalizedValue << k);
363
+ }
364
+ exports.updateBit = updateBit;
158
365
  /**
159
366
  * Converts a number (or string) to a fixed-point format with specified precision.
160
367
  *
@@ -185,6 +392,17 @@ function toFixedFormat(x, n = 6, rightTrimZero = true) {
185
392
  return v;
186
393
  }
187
394
  exports.toFixedFormat = toFixedFormat;
395
+ /**
396
+ * Converts a `Blob` into a Base64-encoded string.
397
+ *
398
+ * This function reads the provided `Blob` using `FileReader` and extracts the Base64 content
399
+ * from the resulting data URL.
400
+ *
401
+ * @param {Blob} blob - The `Blob` to convert into a Base64 string.
402
+ * @returns {Promise<string>} A promise that resolves with the Base64 string representation of the blob.
403
+ *
404
+ * @throws {string} If the blob cannot be read (e.g., due to an error), the promise rejects with an error message.
405
+ */
188
406
  function convertBlobToBase64(blob) {
189
407
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
190
408
  return new Promise((resolve, reject) => {
@@ -252,6 +470,15 @@ function parseUnitValue(value) {
252
470
  return { prefix, numerator, denominator, reserved };
253
471
  }
254
472
  exports.parseUnitValue = parseUnitValue;
473
+ /**
474
+ * Merges multiple `Uint8Array` instances into a single `Uint8Array`.
475
+ *
476
+ * This function concatenates all provided `Uint8Array` instances in the order they are given,
477
+ * producing a new array containing all their bytes sequentially.
478
+ *
479
+ * @param {...Uint8Array[]} ary - An array of `Uint8Array` instances to merge.
480
+ * @returns {Uint8Array} A new `Uint8Array` containing the concatenated bytes from all input arrays.
481
+ */
255
482
  function mergeUint8Arrays(...ary) {
256
483
  const elements = ary.map((v) => v.length).reduce((a, b) => a + b, 0);
257
484
  const bytes = new Uint8Array(elements);
@@ -263,4 +490,101 @@ function mergeUint8Arrays(...ary) {
263
490
  return bytes;
264
491
  }
265
492
  exports.mergeUint8Arrays = mergeUint8Arrays;
493
+ /**
494
+ * Returns an array of unique items by removing duplicates from the given array.
495
+ *
496
+ * This function utilizes the `Set` object to remove duplicate values, ensuring that only unique items
497
+ * remain in the returned array. The order of items in the resulting array is preserved as in the input.
498
+ *
499
+ * @param {Array<T>} items - The array from which duplicates will be removed.
500
+ * @returns {Array<T>} A new array containing only the unique items from the input array.
501
+ */
502
+ function uniqueItems(items) {
503
+ return [...new Set(items)];
504
+ }
505
+ exports.uniqueItems = uniqueItems;
506
+ /**
507
+ * Groups an array of objects by the value of a specified property.
508
+ *
509
+ * This function iterates over the array of objects and groups them into a new object,
510
+ * where the key is the value of the specified property and the value is an array of
511
+ * objects that have that property value.
512
+ *
513
+ * @param {T[]} objects - The array of objects to be grouped.
514
+ * @param {string} prop - The property name by which the objects will be grouped.
515
+ * @returns {{ [key: string]: T[] }} An object where the keys are the unique property values and the values are arrays of objects that have that property value.
516
+ */
517
+ function groupByProperty(objects, prop) {
518
+ return objects.reduce((obj, p) => {
519
+ const key = p[prop]; // Explicitly type as string
520
+ if (!obj[key]) {
521
+ obj[key] = [];
522
+ }
523
+ obj[key].push(p);
524
+ return obj;
525
+ }, {});
526
+ }
527
+ exports.groupByProperty = groupByProperty;
528
+ /**
529
+ * Maps an array of objects by a specified property, creating a map where the key is
530
+ * the value of the specified property and the value is an array of objects that have
531
+ * the same property value.
532
+ *
533
+ * @param {V[]} objects - The array of objects to be mapped.
534
+ * @param {keyof V} prop - The property name by which the objects will be mapped.
535
+ * @returns {Map<K, V[]>} A map where the keys are the unique property values and the values are arrays of objects that share that property value.
536
+ */
537
+ function mapByProperty(objects, prop) {
538
+ const map = new Map();
539
+ objects.forEach((obj) => {
540
+ var _a;
541
+ const key = obj[prop]; // Type assertion to ensure key is of type K
542
+ if (!map.has(key)) {
543
+ map.set(key, []);
544
+ }
545
+ (_a = map.get(key)) === null || _a === void 0 ? void 0 : _a.push(obj);
546
+ });
547
+ return map;
548
+ }
549
+ exports.mapByProperty = mapByProperty;
550
+ /**
551
+ * Converts a C type to its corresponding struct format character.
552
+ *
553
+ * @param cType - The C type as a string (e.g., `int8_t`, `uint32_t`, `char[24]`, etc.).
554
+ * @returns A string representing the struct format equivalent of the given C type.
555
+ * For example, `int8_t` becomes `b`, `uint16_t` becomes `H`, `char[24]` becomes `24s`, etc.
556
+ * @throws Error if the given C type is not recognized.
557
+ */
558
+ function convertCTypeToStructFormatCharacter(cType) {
559
+ if (cType === 'enum') {
560
+ return 'B';
561
+ }
562
+ else if (cType === 'int8_t') {
563
+ return 'b';
564
+ }
565
+ else if (cType === 'uint8_t') {
566
+ return 'B';
567
+ }
568
+ else if (cType === 'int16_t') {
569
+ return 'h';
570
+ }
571
+ else if (cType === 'uint16_t') {
572
+ return 'H';
573
+ }
574
+ else if (cType === 'int32_t') {
575
+ return 'i';
576
+ }
577
+ else if (cType === 'uint32_t') {
578
+ return 'I';
579
+ }
580
+ else if (cType.startsWith('char')) {
581
+ const match = cType.match(/\d+/);
582
+ const length = match ? parseInt(match[0]) : 1;
583
+ return `${length}s`;
584
+ }
585
+ else {
586
+ throw new Error(`Unrecognized C type: ${cType}`);
587
+ }
588
+ }
589
+ exports.convertCTypeToStructFormatCharacter = convertCTypeToStructFormatCharacter;
266
590
  //# sourceMappingURL=util.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/util.ts"],"names":[],"mappings":";;;;AACA,mCAAoE;AAEpE,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,8DAA8D;IAC9D,MAAM,EAAE,GAAG,8FAA8F,CAAC;IAC1G,MAAM,MAAM,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,MAAM,EAAE;QACV,OAAO;YACL,IAAI;YACJ,IAAI,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;YACxB,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE;YACrC,IAAI,EAAE,MAAM,C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