@memberjunction/livekit-room-core 0.0.1 → 5.42.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.
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @fileoverview {@link LiveKitMediaPreview} — a small, room-free helper for a **PreJoin** lobby: create
3
+ * preview camera/mic tracks before connecting, switch devices, read a live mic level, and tear down. It
4
+ * lets the UI show "what you'll look/sound like" and pick devices ahead of joining (the livekit-client
5
+ * `createLocalTracks` path), then hand the chosen device ids to {@link LiveKitRoomController.Connect}.
6
+ *
7
+ * @module @memberjunction/livekit-room-core
8
+ */
9
+ import { type LocalAudioTrack, type LocalVideoTrack } from 'livekit-client';
10
+ /** A live, room-free media preview for a PreJoin screen. */
11
+ export declare class LiveKitMediaPreview {
12
+ private videoTrack;
13
+ private audioTrack;
14
+ private analyser;
15
+ private audioContext;
16
+ /** The current preview video track, if started. */
17
+ get VideoTrack(): LocalVideoTrack | null;
18
+ /**
19
+ * Starts (or restarts) the preview camera track, optionally on a specific device.
20
+ *
21
+ * @param deviceId Optional camera device id.
22
+ * @returns The preview video track.
23
+ */
24
+ StartVideo(deviceId?: string): Promise<LocalVideoTrack>;
25
+ /**
26
+ * Starts (or restarts) the preview microphone track and wires a live-level analyser.
27
+ *
28
+ * @param deviceId Optional microphone device id.
29
+ * @returns The preview audio track.
30
+ */
31
+ StartAudio(deviceId?: string): Promise<LocalAudioTrack>;
32
+ /**
33
+ * Reads the current microphone level (0..1) for a preview meter. Returns 0 when audio is not started.
34
+ */
35
+ ReadMicLevel(): number;
36
+ /** Stops the preview video track. */
37
+ StopVideo(): Promise<void>;
38
+ /** Stops the preview audio track and tears down the analyser. */
39
+ StopAudio(): Promise<void>;
40
+ /** Stops all preview tracks. Call when leaving the PreJoin screen. */
41
+ Stop(): Promise<void>;
42
+ /** Wires a WebAudio analyser to the preview audio track for the level meter. */
43
+ private wireLevelAnalyser;
44
+ }
45
+ //# sourceMappingURL=livekit-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"livekit-preview.d.ts","sourceRoot":"","sources":["../src/livekit-preview.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAgD,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE1H,4DAA4D;AAC5D,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,QAAQ,CAA6B;IAC7C,OAAO,CAAC,YAAY,CAA6B;IAEjD,mDAAmD;IACnD,IAAW,UAAU,IAAI,eAAe,GAAG,IAAI,CAE9C;IAED;;;;;OAKG;IACU,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAMpE;;;;;OAKG;IACU,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAOpE;;OAEG;IACI,YAAY,IAAI,MAAM;IAa7B,qCAAqC;IACxB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAKvC,iEAAiE;IACpD,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAUvC,sEAAsE;IACzD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIlC,gFAAgF;IAChF,OAAO,CAAC,iBAAiB;CAW1B"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * @fileoverview {@link LiveKitMediaPreview} — a small, room-free helper for a **PreJoin** lobby: create
3
+ * preview camera/mic tracks before connecting, switch devices, read a live mic level, and tear down. It
4
+ * lets the UI show "what you'll look/sound like" and pick devices ahead of joining (the livekit-client
5
+ * `createLocalTracks` path), then hand the chosen device ids to {@link LiveKitRoomController.Connect}.
6
+ *
7
+ * @module @memberjunction/livekit-room-core
8
+ */
9
+ import { createLocalAudioTrack, createLocalVideoTrack } from 'livekit-client';
10
+ /** A live, room-free media preview for a PreJoin screen. */
11
+ export class LiveKitMediaPreview {
12
+ constructor() {
13
+ this.videoTrack = null;
14
+ this.audioTrack = null;
15
+ this.analyser = null;
16
+ this.audioContext = null;
17
+ }
18
+ /** The current preview video track, if started. */
19
+ get VideoTrack() {
20
+ return this.videoTrack;
21
+ }
22
+ /**
23
+ * Starts (or restarts) the preview camera track, optionally on a specific device.
24
+ *
25
+ * @param deviceId Optional camera device id.
26
+ * @returns The preview video track.
27
+ */
28
+ async StartVideo(deviceId) {
29
+ await this.StopVideo();
30
+ this.videoTrack = await createLocalVideoTrack({ deviceId });
31
+ return this.videoTrack;
32
+ }
33
+ /**
34
+ * Starts (or restarts) the preview microphone track and wires a live-level analyser.
35
+ *
36
+ * @param deviceId Optional microphone device id.
37
+ * @returns The preview audio track.
38
+ */
39
+ async StartAudio(deviceId) {
40
+ await this.StopAudio();
41
+ this.audioTrack = await createLocalAudioTrack({ deviceId });
42
+ this.wireLevelAnalyser(this.audioTrack);
43
+ return this.audioTrack;
44
+ }
45
+ /**
46
+ * Reads the current microphone level (0..1) for a preview meter. Returns 0 when audio is not started.
47
+ */
48
+ ReadMicLevel() {
49
+ if (!this.analyser) {
50
+ return 0;
51
+ }
52
+ const data = new Uint8Array(this.analyser.frequencyBinCount);
53
+ this.analyser.getByteFrequencyData(data);
54
+ let sum = 0;
55
+ for (const v of data) {
56
+ sum += v;
57
+ }
58
+ return Math.min(1, sum / data.length / 128);
59
+ }
60
+ /** Stops the preview video track. */
61
+ async StopVideo() {
62
+ this.videoTrack?.stop();
63
+ this.videoTrack = null;
64
+ }
65
+ /** Stops the preview audio track and tears down the analyser. */
66
+ async StopAudio() {
67
+ this.audioTrack?.stop();
68
+ this.audioTrack = null;
69
+ this.analyser = null;
70
+ if (this.audioContext) {
71
+ await this.audioContext.close().catch(() => undefined);
72
+ this.audioContext = null;
73
+ }
74
+ }
75
+ /** Stops all preview tracks. Call when leaving the PreJoin screen. */
76
+ async Stop() {
77
+ await Promise.all([this.StopVideo(), this.StopAudio()]);
78
+ }
79
+ /** Wires a WebAudio analyser to the preview audio track for the level meter. */
80
+ wireLevelAnalyser(track) {
81
+ const mediaTrack = track.mediaStreamTrack;
82
+ if (!mediaTrack || typeof AudioContext === 'undefined') {
83
+ return;
84
+ }
85
+ this.audioContext = new AudioContext();
86
+ const source = this.audioContext.createMediaStreamSource(new MediaStream([mediaTrack]));
87
+ this.analyser = this.audioContext.createAnalyser();
88
+ this.analyser.fftSize = 256;
89
+ source.connect(this.analyser);
90
+ }
91
+ }
92
+ //# sourceMappingURL=livekit-preview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"livekit-preview.js","sourceRoot":"","sources":["../src/livekit-preview.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAA8C,MAAM,gBAAgB,CAAC;AAE1H,4DAA4D;AAC5D,MAAM,OAAO,mBAAmB;IAAhC;QACU,eAAU,GAA2B,IAAI,CAAC;QAC1C,eAAU,GAA2B,IAAI,CAAC;QAC1C,aAAQ,GAAwB,IAAI,CAAC;QACrC,iBAAY,GAAwB,IAAI,CAAC;IAkFnD,CAAC;IAhFC,mDAAmD;IACnD,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,UAAU,CAAC,QAAiB;QACvC,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,MAAM,qBAAqB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC5D,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,UAAU,CAAC,QAAiB;QACvC,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,MAAM,qBAAqB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,iBAAiB,CAAC,IA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AAC,CAAC,CAAC;IAC1D,CAAC;IAED,gFAAgF;IACxE,iBAAiB,CAAC,KAAsB;QAC9C,MAAM,UAAU,GAAG,KAAK,CAAC,gBAAgB,CAAC;QAC1C,IAAI,CAAC,UAAU,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE,CAAC;YACvD,OAAO;QACT,CAAC;QACD,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;QACvC,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,uBAAuB,CAAC,IAAI,WAAW,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACxF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;QACnD,IAAI,CAAC,QAAQ,CAAC,OAAO,GAAG,GAAG,CAAC;QAC5B,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;CACF"}
@@ -0,0 +1,202 @@
1
+ /**
2
+ * @fileoverview {@link LiveKitRoomController} — the framework-agnostic controller for ONE LiveKit room
3
+ * connection. Wraps the livekit-client `Room` behind an injectable factory seam so the controller (and
4
+ * every UI built on it) unit-tests with an in-memory fake `Room` — no WebRTC, no network, no browser.
5
+ *
6
+ * It normalizes LiveKit's event-rich, mutable `Room`/`Participant` surface into:
7
+ * - a single observable {@link LiveKitRoomState} snapshot ({@link State$}) the UI renders from, and
8
+ * - narrow event streams for transient things ({@link Data$}, {@link Errors$}).
9
+ *
10
+ * Media DOM-attach (`track.attach(element)`) stays in the UI layer via {@link LiveKitParticipantView.Raw};
11
+ * the controller never touches the DOM, which is what keeps it framework-agnostic.
12
+ *
13
+ * @module @memberjunction/livekit-room-core
14
+ */
15
+ import { Participant, Room, type RoomOptions } from 'livekit-client';
16
+ import { Observable } from 'rxjs';
17
+ import { LiveKitRoomEventBus } from './events.js';
18
+ import { LiveKitBackgroundEffect, LiveKitConnectionStatus, LiveKitDevice, LiveKitParticipantRole, LiveKitRoomConnectOptions, LiveKitRoomState } from './types.js';
19
+ /**
20
+ * Factory seam that constructs the livekit-client `Room`. Production uses the default
21
+ * ({@link defaultRoomFactory}); tests inject a fake that structurally satisfies the subset of `Room` the
22
+ * controller uses, cast via `as unknown as Room`.
23
+ */
24
+ export type LiveKitRoomFactory = (options?: RoomOptions) => Room;
25
+ /** The default factory — constructs a real livekit-client `Room`. */
26
+ export declare const defaultRoomFactory: LiveKitRoomFactory;
27
+ /** Resolves a participant's {@link LiveKitParticipantRole} from its LiveKit metadata / flags. */
28
+ export type LiveKitRoleResolver = (participant: Participant) => LiveKitParticipantRole;
29
+ /**
30
+ * Default role resolver: reads a JSON `metadata` string for `{ "mjRole": "agent" | "host" }`, falling
31
+ * back to `'participant'`. The MJ bridge stamps the agent bot's metadata so its tile renders as the agent.
32
+ */
33
+ export declare const defaultRoleResolver: LiveKitRoleResolver;
34
+ /** Construction options for the controller (all optional — sensible defaults applied). */
35
+ export interface LiveKitRoomControllerOptions {
36
+ /** Override the `Room` factory (tests inject a fake). */
37
+ RoomFactory?: LiveKitRoomFactory;
38
+ /** Override how a participant's role is derived. */
39
+ RoleResolver?: LiveKitRoleResolver;
40
+ /** Supply a shared event bus (e.g. so a host can subscribe before the controller connects). */
41
+ EventBus?: LiveKitRoomEventBus;
42
+ }
43
+ /**
44
+ * Controls a single LiveKit room: connect/disconnect, local-media toggles, data messages, device
45
+ * switching, and a normalized observable state snapshot. One controller == one room connection.
46
+ */
47
+ export declare class LiveKitRoomController {
48
+ private room;
49
+ private readonly roomFactory;
50
+ private readonly roleResolver;
51
+ private noiseFilterEnabled;
52
+ private backgroundEffect;
53
+ private e2eeEnabled;
54
+ private e2eeKeyProvider;
55
+ private readonly stateSubject;
56
+ private readonly textDecoder;
57
+ private readonly textEncoder;
58
+ /**
59
+ * The room's cancelable event bus (Before-events + notifications). Subscribe with `Events.On(...)`;
60
+ * the Angular layer re-surfaces these as `@Output()` emitters. See {@link LiveKitRoomEventBus}.
61
+ */
62
+ readonly Events: LiveKitRoomEventBus;
63
+ constructor(options?: LiveKitRoomControllerOptions);
64
+ /** The normalized room-state snapshot. Emits the current value on subscribe, then on every change. */
65
+ get State$(): Observable<LiveKitRoomState>;
66
+ /** The current room-state snapshot (synchronous). */
67
+ get State(): LiveKitRoomState;
68
+ /** The current connection status (synchronous convenience). */
69
+ get Status(): LiveKitConnectionStatus;
70
+ /**
71
+ * Connects to a LiveKit room and brings the local participant online with the requested media.
72
+ *
73
+ * @param serverUrl The LiveKit server URL (e.g. `wss://livekit.myorg.com`).
74
+ * @param token The signed access token authorizing this participant to join a specific room.
75
+ * @param options Initial media + display-name options.
76
+ */
77
+ Connect(serverUrl: string, token: string, options?: LiveKitRoomConnectOptions): Promise<void>;
78
+ /**
79
+ * Disconnects from the room and releases all resources. Safe to call when not connected.
80
+ *
81
+ * @param userInitiated Whether the user requested the leave (raises a cancelable `beforeDisconnect`).
82
+ * Internal reconnect cycles pass `false` to skip the veto hook. Defaults to `true`.
83
+ * @returns `true` if the disconnect proceeded, `false` if a `beforeDisconnect` handler canceled it.
84
+ */
85
+ Disconnect(userInitiated?: boolean): Promise<boolean>;
86
+ /** Resets the cloud-effect / E2EE tracking fields to defaults (on disconnect). */
87
+ private resetEffectState;
88
+ /** Disposes the controller, tears down the connection, and clears all subscribers. */
89
+ Dispose(): void;
90
+ /** Enables or disables the local microphone. */
91
+ SetMicrophoneEnabled(enabled: boolean): Promise<void>;
92
+ /** Enables or disables the local camera. */
93
+ SetCameraEnabled(enabled: boolean): Promise<void>;
94
+ /** Starts or stops local screen sharing. */
95
+ SetScreenShareEnabled(enabled: boolean): Promise<void>;
96
+ /** Toggles the microphone and returns the new state. */
97
+ ToggleMicrophone(): Promise<boolean>;
98
+ /** Toggles the camera and returns the new state. */
99
+ ToggleCamera(): Promise<boolean>;
100
+ /** Toggles screen sharing and returns the new state. */
101
+ ToggleScreenShare(): Promise<boolean>;
102
+ /**
103
+ * Sends a text message on the LiveKit data channel (reliable publish to all participants).
104
+ *
105
+ * @param text The message text.
106
+ * @param topic Optional topic to publish under (for routing on the receiving side).
107
+ */
108
+ SendData(text: string, topic?: string): Promise<void>;
109
+ /**
110
+ * Resumes audio playback after a browser autoplay block (must be called from a user-gesture handler).
111
+ * Clears {@link LiveKitRoomState.AudioPlaybackBlocked} on success.
112
+ */
113
+ StartAudio(): Promise<void>;
114
+ /**
115
+ * Enables/disables the Krisp noise filter on the local microphone (LiveKit Cloud).
116
+ *
117
+ * @param enabled Whether the filter should be on.
118
+ * @returns `true` if applied; `false` if unsupported or the SDK is unavailable.
119
+ */
120
+ SetNoiseFilterEnabled(enabled: boolean): Promise<boolean>;
121
+ /**
122
+ * Applies a camera background effect (blur / virtual background), or clears it with `{ Kind: 'none' }`.
123
+ *
124
+ * @param effect The effect to apply.
125
+ * @returns `true` if applied; `false` if the SDK is unavailable or no camera track exists.
126
+ */
127
+ SetBackgroundEffect(effect: LiveKitBackgroundEffect): Promise<boolean>;
128
+ /**
129
+ * Enumerates available media devices of a given kind.
130
+ *
131
+ * @param kind The device kind to enumerate.
132
+ * @returns The available devices.
133
+ */
134
+ ListDevices(kind: LiveKitDevice['Kind']): Promise<LiveKitDevice[]>;
135
+ /**
136
+ * Returns the `deviceId` of the currently-active device for a given kind, or `null`
137
+ * when no room is connected or the active device is unknown. Used by hosts to
138
+ * pre-select the active device in a device-picker UI.
139
+ *
140
+ * @param kind The device kind to query.
141
+ * @returns The active `deviceId`, or `null` if unavailable.
142
+ */
143
+ GetActiveDeviceId(kind: LiveKitDevice['Kind']): string | null;
144
+ /**
145
+ * Switches the active device for a given kind.
146
+ *
147
+ * @param kind The device kind to switch.
148
+ * @param deviceId The `deviceId` to switch to.
149
+ */
150
+ SwitchDevice(kind: LiveKitDevice['Kind'], deviceId: string): Promise<void>;
151
+ /** Wires the room's event stream to state rebuilds + transient streams. */
152
+ private wireRoomEvents;
153
+ /** Reflects browser autoplay-policy changes into state + the `audioPlaybackChanged` event. */
154
+ private handleAudioPlayback;
155
+ /** Returns the local microphone track (for processors), or null. */
156
+ private getLocalAudioTrack;
157
+ /** Returns the local camera track (for processors), or null. */
158
+ private getLocalVideoTrack;
159
+ /** Handles a participant joining — emits `participantJoined` then rebuilds. */
160
+ private handleParticipantJoined;
161
+ /** Handles a participant leaving — emits `participantLeft` then rebuilds. */
162
+ private handleParticipantLeft;
163
+ /** Handles the `ActiveSpeakersChanged` event — updates the active-speaker identity list. */
164
+ private handleActiveSpeakers;
165
+ /** Handles connection-state transitions, mapping to the normalized status. */
166
+ private handleConnectionState;
167
+ /** Handles an inbound data-channel message. */
168
+ private handleData;
169
+ /** Handles a room disconnect — records the reason and resets to disconnected state. */
170
+ private handleDisconnected;
171
+ /** Rebuilds the full state snapshot from the live room and emits it. */
172
+ private rebuildState;
173
+ /** Maps a livekit-client participant onto the normalized {@link LiveKitParticipantView}. */
174
+ private buildView;
175
+ /** Whether the participant has a published, unmuted track for the given source. */
176
+ private hasLiveTrack;
177
+ /** Reads the local-media toggle state from the room's local participant. */
178
+ private readLocalMedia;
179
+ /** Toggles a local-media kind via the local participant, surfacing failures as device errors. */
180
+ private toggleLocalMedia;
181
+ /** Applies the requested initial media (mic on by default, camera off — voice-first), honoring device ids. */
182
+ private applyInitialMedia;
183
+ /** Applies the requested initial cloud effects (noise filter, background) after media is published. */
184
+ private applyInitialEffects;
185
+ /** Merges E2EE into the livekit-client room options when requested. */
186
+ private buildRoomOptions;
187
+ /** Sets the E2EE key from the passphrase and enables encryption (no-op when not requested). */
188
+ private enableE2EEIfRequested;
189
+ /** Maps livekit-client `ConnectionState` to the normalized {@link LiveKitConnectionStatus}. */
190
+ private mapConnectionStatus;
191
+ /** Maps livekit-client `ConnectionQuality` to the normalized bucket. */
192
+ private mapConnectionQuality;
193
+ /** Maps livekit-client `DisconnectReason` to the normalized {@link LiveKitDisconnectReason}. */
194
+ private mapDisconnectReason;
195
+ /** Pushes a partial update onto the current state snapshot, emits it, and fires `stateChanged`. */
196
+ private patchState;
197
+ /** Emits a normalized error via the `error` event. */
198
+ private emitError;
199
+ /** The initial / reset room state. */
200
+ private initialState;
201
+ }
202
+ //# sourceMappingURL=livekit-room-controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"livekit-room-controller.d.ts","sourceRoot":"","sources":["../src/livekit-room-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAKL,WAAW,EAEX,IAAI,EAKJ,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAmB,UAAU,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,aAAa,EAGb,sBAAsB,EAEtB,yBAAyB,EAEzB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;AAEjE,qEAAqE;AACrE,eAAO,MAAM,kBAAkB,EAAE,kBAAmD,CAAC;AAErF,iGAAiG;AACjG,MAAM,MAAM,mBAAmB,GAAG,CAAC,WAAW,EAAE,WAAW,KAAK,sBAAsB,CAAC;AAEvF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,mBAcjC,CAAC;AAEF,0FAA0F;AAC1F,MAAM,WAAW,4BAA4B;IAC3C,yDAAyD;IACzD,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,oDAAoD;IACpD,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAChC;AAED;;;GAGG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,IAAI,CAAqB;IACjC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IACjD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAsB;IACnD,OAAO,CAA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