yoto-nodejs-client 0.0.2 → 0.0.4

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 (75) hide show
  1. package/README.md +523 -30
  2. package/bin/auth.js +36 -46
  3. package/bin/content.js +0 -0
  4. package/bin/device-model.d.ts +3 -0
  5. package/bin/device-model.d.ts.map +1 -0
  6. package/bin/device-model.js +360 -0
  7. package/bin/device-tui.TODO.md +125 -0
  8. package/bin/device-tui.d.ts +31 -0
  9. package/bin/device-tui.d.ts.map +1 -0
  10. package/bin/device-tui.js +1123 -0
  11. package/bin/devices.js +166 -28
  12. package/bin/groups.js +0 -0
  13. package/bin/icons.js +0 -0
  14. package/bin/lib/cli-helpers.d.ts +1 -1
  15. package/bin/lib/cli-helpers.d.ts.map +1 -1
  16. package/bin/lib/cli-helpers.js +5 -5
  17. package/bin/refresh-token.js +6 -6
  18. package/bin/token-info.js +3 -3
  19. package/index.d.ts +4 -585
  20. package/index.d.ts.map +1 -1
  21. package/index.js +11 -689
  22. package/lib/api-client.d.ts +576 -0
  23. package/lib/api-client.d.ts.map +1 -0
  24. package/lib/api-client.js +681 -0
  25. package/lib/api-endpoints/auth.d.ts +199 -8
  26. package/lib/api-endpoints/auth.d.ts.map +1 -1
  27. package/lib/api-endpoints/auth.js +224 -7
  28. package/lib/api-endpoints/auth.test.js +54 -2
  29. package/lib/api-endpoints/constants.d.ts +14 -8
  30. package/lib/api-endpoints/constants.d.ts.map +1 -1
  31. package/lib/api-endpoints/constants.js +17 -10
  32. package/lib/api-endpoints/content.test.js +1 -1
  33. package/lib/api-endpoints/devices.d.ts +405 -117
  34. package/lib/api-endpoints/devices.d.ts.map +1 -1
  35. package/lib/api-endpoints/devices.js +114 -52
  36. package/lib/api-endpoints/devices.test.js +1 -1
  37. package/lib/api-endpoints/{test-helpers.d.ts → endpoint-test-helpers.d.ts} +1 -1
  38. package/lib/api-endpoints/endpoint-test-helpers.d.ts.map +1 -0
  39. package/lib/api-endpoints/family-library-groups.test.js +1 -1
  40. package/lib/api-endpoints/family.test.js +1 -1
  41. package/lib/api-endpoints/icons.test.js +1 -1
  42. package/lib/helpers/power-state.d.ts +53 -0
  43. package/lib/helpers/power-state.d.ts.map +1 -0
  44. package/lib/helpers/power-state.js +73 -0
  45. package/lib/helpers/power-state.test.js +100 -0
  46. package/lib/helpers/temperature.d.ts +24 -0
  47. package/lib/helpers/temperature.d.ts.map +1 -0
  48. package/lib/helpers/temperature.js +61 -0
  49. package/lib/helpers/temperature.test.js +58 -0
  50. package/lib/helpers/typed-keys.d.ts +7 -0
  51. package/lib/helpers/typed-keys.d.ts.map +1 -0
  52. package/lib/helpers/typed-keys.js +8 -0
  53. package/lib/mqtt/client.d.ts +348 -22
  54. package/lib/mqtt/client.d.ts.map +1 -1
  55. package/lib/mqtt/client.js +213 -31
  56. package/lib/mqtt/factory.d.ts +22 -4
  57. package/lib/mqtt/factory.d.ts.map +1 -1
  58. package/lib/mqtt/factory.js +27 -5
  59. package/lib/mqtt/mqtt.test.js +85 -28
  60. package/lib/mqtt/topics.d.ts +41 -13
  61. package/lib/mqtt/topics.d.ts.map +1 -1
  62. package/lib/mqtt/topics.js +54 -20
  63. package/lib/pkg.d.cts +8 -0
  64. package/lib/token.d.ts +21 -6
  65. package/lib/token.d.ts.map +1 -1
  66. package/lib/token.js +30 -23
  67. package/lib/yoto-account.d.ts +163 -0
  68. package/lib/yoto-account.d.ts.map +1 -0
  69. package/lib/yoto-account.js +340 -0
  70. package/lib/yoto-device.d.ts +656 -0
  71. package/lib/yoto-device.d.ts.map +1 -0
  72. package/lib/yoto-device.js +2850 -0
  73. package/package.json +21 -15
  74. package/lib/api-endpoints/test-helpers.d.ts.map +0 -1
  75. /package/lib/api-endpoints/{test-helpers.js → endpoint-test-helpers.js} +0 -0
@@ -0,0 +1,58 @@
1
+ import test from 'node:test'
2
+ import assert from 'node:assert'
3
+ import { parseTemperature } from './temperature.js'
4
+
5
+ test('parseTemperature', async (t) => {
6
+ await t.test('should parse standard two-part format', () => {
7
+ assert.strictEqual(parseTemperature('0:19'), 19)
8
+ assert.strictEqual(parseTemperature('0:25'), 25)
9
+ assert.strictEqual(parseTemperature('0:0'), 0)
10
+ })
11
+
12
+ await t.test('should parse three-part format using middle value', () => {
13
+ assert.strictEqual(parseTemperature('12:20:23'), 20)
14
+ assert.strictEqual(parseTemperature('10:15:20'), 15)
15
+ assert.strictEqual(parseTemperature('0:42:100'), 42)
16
+ })
17
+
18
+ await t.test('should return null for unavailable/unsupported', () => {
19
+ assert.strictEqual(parseTemperature('0:unavailable'), null)
20
+ assert.strictEqual(parseTemperature('0:notSupported'), null)
21
+ assert.strictEqual(parseTemperature('notSupported'), null)
22
+ })
23
+
24
+ await t.test('should handle null and undefined', () => {
25
+ assert.strictEqual(parseTemperature(null), null)
26
+ assert.strictEqual(parseTemperature(undefined), null)
27
+ })
28
+
29
+ await t.test('should handle empty string', () => {
30
+ assert.strictEqual(parseTemperature(''), null)
31
+ })
32
+
33
+ await t.test('should parse plain numbers as fallback', () => {
34
+ assert.strictEqual(parseTemperature('25'), 25)
35
+ assert.strictEqual(parseTemperature('0'), 0)
36
+ assert.strictEqual(parseTemperature(25), 25)
37
+ assert.strictEqual(parseTemperature(0), 0)
38
+ })
39
+
40
+ await t.test('should handle decimal temperatures', () => {
41
+ assert.strictEqual(parseTemperature('0:19.5'), 19.5)
42
+ assert.strictEqual(parseTemperature('12:20.75:23'), 20.75)
43
+ assert.strictEqual(parseTemperature('19.5'), 19.5)
44
+ })
45
+
46
+ await t.test('should handle negative temperatures', () => {
47
+ assert.strictEqual(parseTemperature('0:-5'), -5)
48
+ assert.strictEqual(parseTemperature('10:-2:15'), -2)
49
+ assert.strictEqual(parseTemperature('-5'), -5)
50
+ })
51
+
52
+ await t.test('should return null for invalid formats', () => {
53
+ assert.strictEqual(parseTemperature('invalid'), null)
54
+ assert.strictEqual(parseTemperature('abc:xyz'), null)
55
+ assert.strictEqual(parseTemperature(':'), null)
56
+ assert.strictEqual(parseTemperature('::'), null)
57
+ })
58
+ })
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @template {Record<PropertyKey, unknown>} T
3
+ * @param {T} obj
4
+ * @returns {(keyof T)[]}
5
+ */
6
+ export function typedKeys<T extends Record<PropertyKey, unknown>>(obj: T): (keyof T)[];
7
+ //# sourceMappingURL=typed-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typed-keys.d.ts","sourceRoot":"","sources":["typed-keys.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,0BAJ4C,CAAC,SAA/B,MAAM,CAAC,WAAW,EAAE,OAAO,CAAE,OAChC,CAAC,GACC,CAAC,MAAM,CAAC,CAAC,EAAE,CAIvB"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @template {Record<PropertyKey, unknown>} T
3
+ * @param {T} obj
4
+ * @returns {(keyof T)[]}
5
+ */
6
+ export function typedKeys (obj) {
7
+ return Object.keys(obj)
8
+ }
@@ -2,9 +2,14 @@
2
2
  * Yoto MQTT Client class
3
3
  * @extends EventEmitter
4
4
  *
5
- * @fires YotoMqttClient#events
6
- * @fires YotoMqttClient#status
7
- * @fires YotoMqttClient#response
5
+ * Device automatically publishes status updates every 5 minutes when connected.
6
+ * Status can also be requested on-demand via requestStatus() and requestEvents().
7
+ *
8
+ * @fires YotoMqttClient#events - Emits (topic, payload) when device sends events
9
+ * @fires YotoMqttClient#status - Emits (topic, payload) when device sends status (automatic every 5 min, or on-demand)
10
+ * @fires YotoMqttClient#status-legacy - Emits (topic, payload) when device sends legacy status with lifecycle events
11
+ * @fires YotoMqttClient#response - Emits (topic, payload) when device responds to commands
12
+ * @fires YotoMqttClient#unknown - Emits (topic, payload) when receiving unknown message type
8
13
  * @fires YotoMqttClient#connected
9
14
  * @fires YotoMqttClient#disconnected
10
15
  * @fires YotoMqttClient#reconnecting
@@ -45,6 +50,20 @@ export class YotoMqttClient extends EventEmitter<any> {
45
50
  * @returns {boolean}
46
51
  */
47
52
  get connected(): boolean;
53
+ /**
54
+ * Subscribe to device topics
55
+ * @param {Array<'events' | 'status' | 'response'> | 'all'} [types='all'] - Topic types to subscribe to, or 'all' for all topics
56
+ * @returns {Promise<void>}
57
+ * @example
58
+ * // Subscribe to all topics (default)
59
+ * await client.subscribe()
60
+ * await client.subscribe('all')
61
+ *
62
+ * // Subscribe to specific topics
63
+ * await client.subscribe(['events', 'status'])
64
+ * await client.subscribe(['response'])
65
+ */
66
+ subscribe(types?: Array<"events" | "status" | "response"> | "all"): Promise<void>;
48
67
  /**
49
68
  * Connect to MQTT broker
50
69
  * @returns {Promise<void>}
@@ -57,14 +76,16 @@ export class YotoMqttClient extends EventEmitter<any> {
57
76
  disconnect(): Promise<void>;
58
77
  /**
59
78
  * Request current events from device
79
+ * @param {string} [body=''] - Optional request body for tracking/identification
60
80
  * @returns {Promise<void>}
61
81
  */
62
- requestEvents(): Promise<void>;
82
+ requestEvents(body?: string): Promise<void>;
63
83
  /**
64
84
  * Request current status from device
85
+ * @param {string} [body=''] - Optional request body for tracking/identification
65
86
  * @returns {Promise<void>}
66
87
  */
67
- requestStatus(): Promise<void>;
88
+ requestStatus(body?: string): Promise<void>;
68
89
  /**
69
90
  * Set device volume
70
91
  * @param {number} volume - Volume level [0-100]
@@ -211,11 +232,11 @@ export type YotoEventsMessage = {
211
232
  */
212
233
  streaming?: boolean;
213
234
  /**
214
- * - Current volume level
235
+ * - Current user volume level (0-16 scale, maps to userVolumePercentage in status)
215
236
  */
216
237
  volume?: number;
217
238
  /**
218
- * - Maximum volume level
239
+ * - Maximum volume limit (0-16 scale, maps to systemVolumePercentage in status)
219
240
  */
220
241
  volumeMax?: number;
221
242
  /**
@@ -267,18 +288,35 @@ export type YotoEventsMessage = {
267
288
  */
268
289
  trackKey?: string;
269
290
  /**
270
- * - Playback status (e.g., "playing", "paused", "stopped")
291
+ * - Playback status
271
292
  */
272
- playbackStatus?: string;
293
+ playbackStatus?: "playing" | "paused" | "stopped" | "loading" | string;
273
294
  /**
274
295
  * - Seconds remaining on sleep timer
275
296
  */
276
297
  sleepTimerSeconds?: number;
277
298
  };
278
299
  /**
279
- * Status message from device
300
+ * Status message from device (MQTT /data/status)
301
+ *
302
+ * Device automatically publishes status updates every 5 minutes (matching keepalive interval).
303
+ * Can also be requested on-demand via requestStatus().
304
+ *
305
+ * Note: MQTT types differ from HTTP - uses booleans, non-nullable fields
280
306
  */
281
307
  export type YotoStatusMessage = {
308
+ /**
309
+ * - Status object
310
+ */
311
+ status: YotoMqttStatus;
312
+ };
313
+ /**
314
+ * MQTT status payload structure (documented spec)
315
+ *
316
+ * Automatic updates (every 5 minutes): 21 fields (excludes nightlightMode and temp)
317
+ * Requested status: All 23 fields including nightlightMode and temp
318
+ */
319
+ export type YotoMqttStatus = {
282
320
  /**
283
321
  * - Status message version
284
322
  */
@@ -300,7 +338,7 @@ export type YotoStatusMessage = {
300
338
  */
301
339
  als: number;
302
340
  /**
303
- * - Free disk space
341
+ * - Free disk space in bytes
304
342
  */
305
343
  freeDisk: number;
306
344
  /**
@@ -316,13 +354,13 @@ export type YotoStatusMessage = {
316
354
  */
317
355
  charging: number;
318
356
  /**
319
- * - Active card ID
357
+ * - Active card ID or 'none'
320
358
  */
321
359
  activeCard: string;
322
360
  /**
323
- * - Card insertion state
361
+ * - Card insertion state (0=none, 1=physical, 2=remote)
324
362
  */
325
- cardInserted: number;
363
+ cardInserted: 0 | 1 | 2;
326
364
  /**
327
365
  * - Playing status code
328
366
  */
@@ -348,11 +386,11 @@ export type YotoStatusMessage = {
348
386
  */
349
387
  bluetoothHp: boolean;
350
388
  /**
351
- * - Current volume
389
+ * - System/max volume level (0-100 percentage, represents 0-16 hardware scale, maps to volumeMax in events)
352
390
  */
353
391
  volume: number;
354
392
  /**
355
- * - User volume setting
393
+ * - User volume setting (0-100 percentage, represents 0-16 hardware scale, maps to volume in events)
356
394
  */
357
395
  userVolume: number;
358
396
  /**
@@ -360,17 +398,17 @@ export type YotoStatusMessage = {
360
398
  */
361
399
  timeFormat: "12" | "24";
362
400
  /**
363
- * - Nightlight mode setting
401
+ * - Current nightlight color (actual hex color like '0xff5733' or 'off') - only in requested status, most accurate source
364
402
  */
365
- nightlightMode: string;
403
+ nightlightMode?: string;
366
404
  /**
367
- * - Temperature reading
405
+ * - Temperature reading (format varies: 'value1:value2:value3' or 'value1:notSupported') - only in requested status
368
406
  */
369
- temp: string;
407
+ temp?: string;
370
408
  /**
371
- * - Day mode (0 or 1)
409
+ * - Day mode (0=night, 1=day, -1=unknown)
372
410
  */
373
- day: number;
411
+ day: -1 | 0 | 1;
374
412
  };
375
413
  /**
376
414
  * Response message from device
@@ -392,10 +430,298 @@ export type YotoResponseMessage = {
392
430
  sleepTimer: "OK" | "FAIL";
393
431
  };
394
432
  };
433
+ /**
434
+ * Legacy status message from device (MQTT /status)
435
+ *
436
+ * This is the older undocumented status topic that contains critical lifecycle information
437
+ * not available in the documented /data/status topic, including:
438
+ * - shutDown field: Indicates device power state changes ('userShutdown', 'nA', etc.)
439
+ * - Startup detection: Low upTime values, utcTime: 0 after power on
440
+ * - Full hardware diagnostics: battery voltage, memory stats, temperatures
441
+ *
442
+ * Both documented and legacy status topics are necessary for complete device monitoring.
443
+ */
444
+ export type YotoStatusLegacyMessage = {
445
+ /**
446
+ * - Legacy status object with full hardware details
447
+ */
448
+ status: YotoLegacyStatus;
449
+ };
450
+ /**
451
+ * Legacy MQTT status payload structure (undocumented)
452
+ *
453
+ * Contains all fields from documented status plus additional lifecycle and diagnostic fields.
454
+ */
455
+ export type YotoLegacyStatus = {
456
+ /**
457
+ * - Status message version
458
+ */
459
+ statusVersion: number;
460
+ /**
461
+ * - Firmware version
462
+ */
463
+ fwVersion: string;
464
+ /**
465
+ * - Power state: 'nA' = device running, any other value = shutting down/shut down (e.g., 'userShutdown') - ONLY in legacy topic
466
+ */
467
+ shutDown: string;
468
+ /**
469
+ * - Total disk space in bytes
470
+ */
471
+ totalDisk: number;
472
+ /**
473
+ * - Product type identifier
474
+ */
475
+ productType: string;
476
+ /**
477
+ * - WiFi signal strength in dBm
478
+ */
479
+ wifiStrength: number;
480
+ /**
481
+ * - WiFi SSID
482
+ */
483
+ ssid: string;
484
+ /**
485
+ * - RTC reset reason (PRO)
486
+ */
487
+ rtcResetReasonPRO: number;
488
+ /**
489
+ * - RTC reset reason (APP)
490
+ */
491
+ rtcResetReasonAPP: number;
492
+ /**
493
+ * - RTC wakeup cause code
494
+ */
495
+ rtcWakeupCause: number;
496
+ /**
497
+ * - ESP reset reason code
498
+ */
499
+ espResetReason: number;
500
+ /**
501
+ * - SD card information string
502
+ */
503
+ sd_info: string;
504
+ /**
505
+ * - Raw battery voltage in millivolts
506
+ */
507
+ battery: number;
508
+ /**
509
+ * - Power capabilities
510
+ */
511
+ powerCaps: string;
512
+ /**
513
+ * - Battery level percentage
514
+ */
515
+ batteryLevel: number;
516
+ /**
517
+ * - Battery temperature
518
+ */
519
+ batteryTemp: number;
520
+ /**
521
+ * - Battery data string (format: 'val1:val2:val3')
522
+ */
523
+ batteryData: string;
524
+ /**
525
+ * - Raw battery level reading
526
+ */
527
+ batteryLevelRaw: number;
528
+ /**
529
+ * - Free memory in bytes
530
+ */
531
+ free: number;
532
+ /**
533
+ * - Free DMA memory in bytes
534
+ */
535
+ freeDMA: number;
536
+ /**
537
+ * - Free 32-bit memory in bytes
538
+ */
539
+ free32: number;
540
+ /**
541
+ * - Device uptime in seconds (low values indicate recent startup)
542
+ */
543
+ upTime: number;
544
+ /**
545
+ * - UTC timestamp (0 indicates fresh startup before time sync)
546
+ */
547
+ utcTime: number;
548
+ /**
549
+ * - Total alive time in seconds
550
+ */
551
+ aliveTime: number;
552
+ /**
553
+ * - Accelerometer temperature in Celsius
554
+ */
555
+ accelTemp: number;
556
+ /**
557
+ * - Battery profile identifier
558
+ */
559
+ batteryProfile: string;
560
+ /**
561
+ * - Free disk space in bytes
562
+ */
563
+ freeDisk: number;
564
+ /**
565
+ * - Failure reason code
566
+ */
567
+ failReason: number;
568
+ /**
569
+ * - Failure data
570
+ */
571
+ failData: number;
572
+ /**
573
+ * - Shutdown timeout in seconds
574
+ */
575
+ shutdownTimeout: number;
576
+ /**
577
+ * - UTC offset in seconds
578
+ */
579
+ utcOffset: number;
580
+ /**
581
+ * - NFC error rates (format: 'xx.xx%-xx.xx%')
582
+ */
583
+ nfcErrs: string;
584
+ /**
585
+ * - DBAT timeout in seconds
586
+ */
587
+ dbatTimeout: number;
588
+ /**
589
+ * - Charging state (0 or 1)
590
+ */
591
+ charging: number;
592
+ /**
593
+ * - Power source (0=battery, 1=V2 dock, 2=USB-C, 3=Qi)
594
+ */
595
+ powerSrc: 0 | 1 | 2 | 3;
596
+ /**
597
+ * - Active card ID or 'none'
598
+ */
599
+ activeCard: string;
600
+ /**
601
+ * - Card insertion state (0=none, 1=physical, 2=remote)
602
+ */
603
+ cardInserted: 0 | 1 | 2;
604
+ /**
605
+ * - Playing status code
606
+ */
607
+ playingStatus: number;
608
+ /**
609
+ * - Headphones connected (0 or 1)
610
+ */
611
+ headphones: number;
612
+ /**
613
+ * - WiFi restart count
614
+ */
615
+ wifiRestarts: number;
616
+ /**
617
+ * - Qi OTP value
618
+ */
619
+ qiOtp: number;
620
+ /**
621
+ * - Buzzer error count
622
+ */
623
+ buzzErrors: number;
624
+ /**
625
+ * - Current display brightness
626
+ */
627
+ dnowBrightness: number;
628
+ /**
629
+ * - Day brightness setting
630
+ */
631
+ dayBright: number;
632
+ /**
633
+ * - Night brightness setting
634
+ */
635
+ nightBright: number;
636
+ /**
637
+ * - Number of errors logged
638
+ */
639
+ errorsLogged: number;
640
+ /**
641
+ * - Task watchdog timer value
642
+ */
643
+ twdt: number;
644
+ /**
645
+ * - Bluetooth headphones state (0 or 1)
646
+ */
647
+ bluetoothHp: number;
648
+ /**
649
+ * - Current nightlight color (hex color like '0xff5733' or 'off')
650
+ */
651
+ nightlightMode: string;
652
+ /**
653
+ * - Background download state
654
+ */
655
+ bgDownload: number;
656
+ /**
657
+ * - Bytes per second
658
+ */
659
+ bytesPS: number;
660
+ /**
661
+ * - Day mode (0=night, 1=day, -1=unknown)
662
+ */
663
+ day: -1 | 0 | 1;
664
+ /**
665
+ * - Temperature readings (format: 'val1:val2:val3')
666
+ */
667
+ temp: string;
668
+ /**
669
+ * - Ambient light sensor reading
670
+ */
671
+ als: number;
672
+ /**
673
+ * - System/max volume level (0-100 percentage, represents 0-16 hardware scale, maps to volumeMax in events)
674
+ */
675
+ volume: number;
676
+ /**
677
+ * - User volume setting (0-100 percentage, represents 0-16 hardware scale, maps to volume in events)
678
+ */
679
+ userVolume: number;
680
+ /**
681
+ * - Time format preference
682
+ */
683
+ timeFormat: "12" | "24";
684
+ /**
685
+ * - Charge state level
686
+ */
687
+ chgStatLevel: number;
688
+ /**
689
+ * - Missed log count
690
+ */
691
+ missedLogs: number;
692
+ /**
693
+ * - NFC lock state
694
+ */
695
+ nfcLock: number;
696
+ /**
697
+ * - Battery full percentage threshold
698
+ */
699
+ batteryFullPct: number;
700
+ };
395
701
  /**
396
702
  * MQTT connection state
397
703
  */
398
704
  export type YotoMqttConnectionState = "disconnected" | "connected" | "reconnecting";
705
+ /**
706
+ * Events message callback
707
+ */
708
+ export type EventsCallback = (topic: string, payload: YotoEventsMessage) => any;
709
+ /**
710
+ * Status message callback
711
+ */
712
+ export type StatusCallback = (topic: string, payload: YotoStatusMessage) => any;
713
+ /**
714
+ * Legacy status message callback
715
+ */
716
+ export type StatusLegacyCallback = (topic: string, payload: YotoStatusLegacyMessage) => any;
717
+ /**
718
+ * Response message callback
719
+ */
720
+ export type ResponseCallback = (topic: string, payload: YotoResponseMessage) => any;
721
+ /**
722
+ * Unknown message callback
723
+ */
724
+ export type UnknownCallback = (topic: string, payload: any) => any;
399
725
  import { EventEmitter } from 'events';
400
726
  import type { MqttClient } from 'mqtt';
401
727
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["client.js"],"names":[],"mappings":"A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