@googleworkspace/meet-addons 0.7.0-640139460
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/LICENSE +3 -0
- package/README.md +11 -0
- package/index.d.ts +551 -0
- package/meet.addons.js +85 -0
- package/meet.addons.screenshare.js +23 -0
- package/package.json +17 -0
package/LICENSE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Meet Addons Web SDK
|
|
2
|
+
|
|
3
|
+
Embed your app in Google Meet as an Addon.
|
|
4
|
+
|
|
5
|
+
You can view the official documentation
|
|
6
|
+
[here](https://developers.google.com/meet/add-ons/guides/overview).
|
|
7
|
+
|
|
8
|
+
## Where's the source code?
|
|
9
|
+
|
|
10
|
+
Unfortunately, the code has some dependencies on Google proprietary libraries
|
|
11
|
+
that mean we can't open source it at this time.
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
// Original file: live_sharing.v2.types.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Represents that a failure event occurred before, during, or after a live
|
|
7
|
+
* sharing activity.
|
|
8
|
+
*
|
|
9
|
+
* - `FAILURE_EVENT_UNSPECIFIED`: Failure event that's not specified in the
|
|
10
|
+
* predefined types.
|
|
11
|
+
*
|
|
12
|
+
* - `FAILURE_USER_INSUFFICIENT_TIER`: Failure due to the user membership tier not
|
|
13
|
+
* having sufficient privileges. For example, user not having a premium
|
|
14
|
+
* membership for the Live Sharing Application.
|
|
15
|
+
*
|
|
16
|
+
* - `FAILURE_USER_UNKNOWN`: Failure due to user sign-in or a related failure.
|
|
17
|
+
*
|
|
18
|
+
* - `FAILURE_USER_CANCELLED`: Failure due to cancellation of the operation by the
|
|
19
|
+
* user.
|
|
20
|
+
*
|
|
21
|
+
* - `FAILURE_USER_UNAUTHORIZED`: Failure due to the user being in the wrong locale
|
|
22
|
+
* or age group, etc., effectively being an unauthorized user for the live
|
|
23
|
+
* sharing activity.
|
|
24
|
+
*
|
|
25
|
+
* - `FAILURE_APP_GENERIC_ERROR`: Failure due to a generic error with the Live
|
|
26
|
+
* Sharing Application.
|
|
27
|
+
*
|
|
28
|
+
* - `FAILURE_APP_NETWORK_CONNECTIVITY`: Failure due to a network connectivity issue
|
|
29
|
+
* between the Live Sharing Application and its servers.
|
|
30
|
+
*
|
|
31
|
+
* - `FAILURE_APP_STARTUP`: Failure due to an error in starting the Live Sharing
|
|
32
|
+
* Application.
|
|
33
|
+
*/
|
|
34
|
+
export type LiveSharingFailureEventType =
|
|
35
|
+
| 'FAILURE_EVENT_UNSPECIFIED'
|
|
36
|
+
| 'FAILURE_USER_INSUFFICIENT_TIER'
|
|
37
|
+
| 'FAILURE_USER_UNKNOWN'
|
|
38
|
+
| 'FAILURE_USER_CANCELLED'
|
|
39
|
+
| 'FAILURE_USER_UNAUTHORIZED'
|
|
40
|
+
| 'FAILURE_APP_GENERIC_ERROR'
|
|
41
|
+
| 'FAILURE_APP_NETWORK_CONNECTIVITY'
|
|
42
|
+
| 'FAILURE_APP_STARTUP';
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Binary-encoded state for CoDoing experiences.
|
|
48
|
+
*/
|
|
49
|
+
export interface CoDoingState {
|
|
50
|
+
bytes: Uint8Array;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Host-provided set of base configuration options.
|
|
56
|
+
*/
|
|
57
|
+
export interface CoActivityDelegate {
|
|
58
|
+
/**
|
|
59
|
+
* User-suitable string describing the CoActivity.
|
|
60
|
+
*/
|
|
61
|
+
activityTitle: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Host-provided set of callbacks required to operate a CoDoing experience.
|
|
67
|
+
*/
|
|
68
|
+
export interface CoDoingDelegate extends CoActivityDelegate {
|
|
69
|
+
/**
|
|
70
|
+
* Callback for state updates broadcast by other participants in the meeting.
|
|
71
|
+
*
|
|
72
|
+
* Note: This isn't called in response to local changes.
|
|
73
|
+
*
|
|
74
|
+
* @param update the state update to be applied.
|
|
75
|
+
*/
|
|
76
|
+
onCoDoingStateChanged(newState: CoDoingState): void;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Client-constructed CoDoing experience with hooks for hosts to notify
|
|
83
|
+
* of state updates.
|
|
84
|
+
*/
|
|
85
|
+
export interface CoDoingClient {
|
|
86
|
+
/**
|
|
87
|
+
* Broadcasts state to all other current participants, and is the default
|
|
88
|
+
* state for any participant until some other state is broadcast.
|
|
89
|
+
*
|
|
90
|
+
* **Note:** This shared state is eventually consistent across
|
|
91
|
+
* participants. For predictable behavior, this binary state should be
|
|
92
|
+
* complete, not partial, as the Live Sharing SDK doesn't provide
|
|
93
|
+
* guarantees around the delivery of individual messages -- only eventual
|
|
94
|
+
* consistency.
|
|
95
|
+
*
|
|
96
|
+
* **Note:** In a race condition where two participants call this method
|
|
97
|
+
* simultaneously, the Live Sharing SDK selects a canonical winning
|
|
98
|
+
* update. The losing update might or might not be applied to participants,
|
|
99
|
+
* but the winning update is always applied later.
|
|
100
|
+
*/
|
|
101
|
+
broadcastStateUpdate(newState: CoDoingState): void;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Current PlaybackState for CoWatching experiences.
|
|
108
|
+
*/
|
|
109
|
+
export type PlaybackState =
|
|
110
|
+
| 'INVALID'
|
|
111
|
+
| 'BUFFERING'
|
|
112
|
+
| 'PLAY'
|
|
113
|
+
| 'PAUSE'
|
|
114
|
+
| 'ENDED';
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* State for CoWatching experiences.
|
|
118
|
+
*/
|
|
119
|
+
export interface CoWatchingState {
|
|
120
|
+
/**
|
|
121
|
+
* The identifier for the media being played.
|
|
122
|
+
*
|
|
123
|
+
* Note: The actual format only matters to the co-watching app.
|
|
124
|
+
*/
|
|
125
|
+
mediaId: string;
|
|
126
|
+
|
|
127
|
+
/** The current position of the media playout, in seconds. */
|
|
128
|
+
mediaPlayoutPosition: number;
|
|
129
|
+
|
|
130
|
+
/** The current playout rate, where {@code 1.0} is normal speed. */
|
|
131
|
+
mediaPlayoutRate: number;
|
|
132
|
+
|
|
133
|
+
/** The current player state, such as Paused, Playing, Buffering, etc. */
|
|
134
|
+
playbackState: PlaybackState;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
type CoWatchingQueryResponse = Pick<CoWatchingState, 'mediaPlayoutPosition'>;
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Host-provided set of callbacks required to operate a CoWatching experience.
|
|
144
|
+
*/
|
|
145
|
+
export interface CoWatchingDelegate extends CoActivityDelegate {
|
|
146
|
+
/**
|
|
147
|
+
* Apply the supplied state to media playout, up to and including switching
|
|
148
|
+
* to a new media stream if the mediaId changes.
|
|
149
|
+
*
|
|
150
|
+
* @param state the new state to be applied to the player.
|
|
151
|
+
*/
|
|
152
|
+
onCoWatchingStateChanged(newState: CoWatchingState): void;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Return the current state of the local media playout. This is called
|
|
156
|
+
* regularly so it should be written to be performant.
|
|
157
|
+
*
|
|
158
|
+
* @return a {@link CoWatchingState} describing the current state.
|
|
159
|
+
*/
|
|
160
|
+
onCoWatchingStateQuery(): CoWatchingQueryResponse;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Client-constructed CoWatching experience with hooks for hosts to manage the
|
|
167
|
+
* state.
|
|
168
|
+
*/
|
|
169
|
+
export interface CoWatchingClient {
|
|
170
|
+
/**
|
|
171
|
+
* Notify Meet that the user has switched media so Meet can pass that along
|
|
172
|
+
* to other users.
|
|
173
|
+
*
|
|
174
|
+
* @param mediaTitle The title of the media switched to. This title is
|
|
175
|
+
* reflected in the Meet UI when other users are considering connecting to
|
|
176
|
+
* the co-watching session.
|
|
177
|
+
* @param mediaId The string URI of the media switched to.
|
|
178
|
+
* @param mediaPlayoutPosition The position at which the media began playout.
|
|
179
|
+
*/
|
|
180
|
+
notifySwitchedToMedia(
|
|
181
|
+
mediaTitle: string,
|
|
182
|
+
mediaId: string,
|
|
183
|
+
mediaPlayoutPosition: number,
|
|
184
|
+
): void;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Notify Meet that the user has paused or unpaused the playback of media, so
|
|
188
|
+
* Meet can mirror that action for other users.
|
|
189
|
+
*
|
|
190
|
+
* @param paused The new paused or unpaused state.
|
|
191
|
+
*/
|
|
192
|
+
notifyPauseState(paused: boolean, mediaPlayoutPosition: number): void;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Notify Meet that the user has sought the playback point of the media, so
|
|
196
|
+
* Meet can mirror that action for other users.
|
|
197
|
+
*
|
|
198
|
+
* @param mediaPlayoutPosition The timestamp that the user sought.
|
|
199
|
+
*/
|
|
200
|
+
notifySeekToTimestamp(mediaPlayoutPosition: number): void;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Notify Meet that the user updated the playout rate of the media to a new
|
|
204
|
+
* value (for example, 1.25x).
|
|
205
|
+
*
|
|
206
|
+
* @param rate The rate at which the media is now being played.
|
|
207
|
+
* @param mediaPlayoutPosition The position at which the media began playout
|
|
208
|
+
*/
|
|
209
|
+
notifyPlayoutRate(rate: number, mediaPlayoutPosition: number): void;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Notify Meet that the media isn't ready to be played due to
|
|
213
|
+
* buffering, a prior media switch, seeking, or normal network
|
|
214
|
+
* congestion.
|
|
215
|
+
*
|
|
216
|
+
* @param mediaPlayoutPosition The timestamp at which the media is paused or
|
|
217
|
+
* waiting for buffering to complete.
|
|
218
|
+
*/
|
|
219
|
+
notifyBuffering(mediaPlayoutPosition: number): void;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Notify Meet that the buffering is complete and the media is now ready to
|
|
223
|
+
* play, starting at the supplied timestamp.
|
|
224
|
+
*
|
|
225
|
+
* @param mediaPlayoutPosition The timestamp at which the media is buffered
|
|
226
|
+
* and is now ready to play.
|
|
227
|
+
*/
|
|
228
|
+
notifyReady(mediaPlayoutPosition: number): void;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
// Original file: index.types.d.ts
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Parameters to retrieve the add-on session.
|
|
238
|
+
*/
|
|
239
|
+
export interface AddonSessionOptions {
|
|
240
|
+
/**
|
|
241
|
+
* The Google Cloud project number of the add-on.
|
|
242
|
+
*/
|
|
243
|
+
cloudProjectNumber: string;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* The main entry point for accessing Meet Add-on functionality. Available
|
|
248
|
+
* globally under `window.meet.addon`.
|
|
249
|
+
*/
|
|
250
|
+
export interface MeetAddon {
|
|
251
|
+
/**
|
|
252
|
+
* Returns the {@link
|
|
253
|
+
* https://developers.google.com/meet/add-ons/reference/websdk/addon_sdk.frametype
|
|
254
|
+
* | FrameType} in which the add-on is running in.
|
|
255
|
+
*/
|
|
256
|
+
getFrameType: () => FrameType;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Creates an add-on session.
|
|
260
|
+
*/
|
|
261
|
+
createAddonSession: (options: AddonSessionOptions) => Promise<AddonSession>;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
declare global {
|
|
265
|
+
export interface Window {
|
|
266
|
+
meet: {addon: MeetAddon};
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
// Original file: client.types.d.ts
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Information about the meeting in which the add-on is running.
|
|
277
|
+
*/
|
|
278
|
+
export interface MeetingInfo {
|
|
279
|
+
/**
|
|
280
|
+
* The `meetingId` for the current meeting. Can be used to retrieve
|
|
281
|
+
* meeting information from the Meet REST API. The `meetingId` is a globally unique
|
|
282
|
+
* identifier for the meeting.
|
|
283
|
+
*/
|
|
284
|
+
meetingId: string;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* The different places in Meet that the iframed add-on can be running in:
|
|
289
|
+
*
|
|
290
|
+
* - `SIDE_PANEL`: The iframed add-on running in the Meet side panel.
|
|
291
|
+
*
|
|
292
|
+
* - `MAIN_STAGE`: The iframed add-on running as a tile in the Meet main stage.
|
|
293
|
+
*/
|
|
294
|
+
export type FrameType = 'SIDE_PANEL' | 'MAIN_STAGE';
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* The different reasons why the frame was opened:
|
|
298
|
+
*
|
|
299
|
+
* - `OPEN_ADDON`: The frame was opened because the add-on was selected in the
|
|
300
|
+
* activities panel.
|
|
301
|
+
*
|
|
302
|
+
* - `START_COLLABORATION`: The frame was opened because the local user started a
|
|
303
|
+
* collaboration.
|
|
304
|
+
*
|
|
305
|
+
* - `JOIN_COLLABORATION`: The frame was opened because the user joined a
|
|
306
|
+
* collaboration started by another user.
|
|
307
|
+
*/
|
|
308
|
+
export type FrameOpenReason =
|
|
309
|
+
| 'UNKNOWN'
|
|
310
|
+
| 'OPEN_ADDON'
|
|
311
|
+
| 'START_COLLABORATION'
|
|
312
|
+
| 'JOIN_COLLABORATION';
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* A client-initiated message sent from one add-on frame to another.
|
|
316
|
+
*/
|
|
317
|
+
export interface FrameToFrameMessage {
|
|
318
|
+
/**
|
|
319
|
+
* The add-on frame that sent the message.
|
|
320
|
+
*/
|
|
321
|
+
originator: FrameType;
|
|
322
|
+
/**
|
|
323
|
+
* The message payload. Value set by the add-on running in the frame specified
|
|
324
|
+
* by the originator field.
|
|
325
|
+
* The length of this string must be less than 1,000,000 characters.
|
|
326
|
+
*/
|
|
327
|
+
payload: string;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* All of the callbacks that add-ons can attach to.
|
|
332
|
+
*/
|
|
333
|
+
export interface AddonCallbacks {
|
|
334
|
+
/**
|
|
335
|
+
* Message sent by the add-on running in one frame to the add-on running in
|
|
336
|
+
* another frame.
|
|
337
|
+
*/
|
|
338
|
+
readonly frameToFrameMessage?: (message: FrameToFrameMessage) => void;
|
|
339
|
+
/**
|
|
340
|
+
* Callback that's triggered when the user initiates a collaboration in Meet.
|
|
341
|
+
*/
|
|
342
|
+
readonly userInitiatedCollaboration?: () => void;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Starting state of the add-on when the participant accepts the invitation to
|
|
347
|
+
* collaborate.
|
|
348
|
+
*/
|
|
349
|
+
export interface CollaborationStartingState {
|
|
350
|
+
/**
|
|
351
|
+
* The URL that the main stage opens for users joining the collaboration.
|
|
352
|
+
* The length of this URL must be less than 512 characters.
|
|
353
|
+
*/
|
|
354
|
+
mainStageUrl?: string;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* The URL that the side panel opens for users joining the collaboration.
|
|
358
|
+
* The length of this URL must be less than 512 characters.
|
|
359
|
+
*/
|
|
360
|
+
sidePanelUrl?: string;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Data internal to the add-on that it can use to initialize itself. Useful
|
|
364
|
+
* for communicating application-specific state to users joining the
|
|
365
|
+
* collaboration that cannot be stored in the URLs.
|
|
366
|
+
* The length of this string must be less than 4,096 characters.
|
|
367
|
+
*/
|
|
368
|
+
additionalData?: string;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* The client object that an add-on uses to communicate with Meet web.
|
|
373
|
+
*/
|
|
374
|
+
export interface MeetAddonClient {
|
|
375
|
+
/**
|
|
376
|
+
* Retrieves information about the meeting in which the add-on is running.
|
|
377
|
+
*/
|
|
378
|
+
getMeetingInfo(): Promise<MeetingInfo>;
|
|
379
|
+
/**
|
|
380
|
+
* Retrieves information about the initial state of the add-on when the
|
|
381
|
+
* participant accepts the invitation to collaborate.
|
|
382
|
+
*/
|
|
383
|
+
getCollaborationStartingState(): Promise<CollaborationStartingState>;
|
|
384
|
+
/**
|
|
385
|
+
* Sets or updates information about the initial state of the add-on that's
|
|
386
|
+
* used when the participant accepts the invitation to collaborate.
|
|
387
|
+
*/
|
|
388
|
+
setCollaborationStartingState(
|
|
389
|
+
collaborationStartingState: CollaborationStartingState,
|
|
390
|
+
): Promise<void>;
|
|
391
|
+
/**
|
|
392
|
+
* Clears the information about the initial state of the add-on used in the
|
|
393
|
+
* collaboration.
|
|
394
|
+
*/
|
|
395
|
+
clearCollaborationStartingState(): Promise<void>;
|
|
396
|
+
/**
|
|
397
|
+
* Provides access to the {@link
|
|
398
|
+
* https://developers.google.com/meet/add-ons/reference/websdk/addon_sdk.addoncallbacks
|
|
399
|
+
* | AddonCallbacks} that the add-on can utilize.
|
|
400
|
+
*/
|
|
401
|
+
on<T extends keyof AddonCallbacks>(
|
|
402
|
+
eventId: T,
|
|
403
|
+
eventHandler: AddonCallbacks[T],
|
|
404
|
+
): void;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Retrieves information about the Meet platform in which the add-on is
|
|
408
|
+
* running.
|
|
409
|
+
*/
|
|
410
|
+
getMeetPlatformInfo(): Promise<MeetPlatformInfo>;
|
|
411
|
+
/**
|
|
412
|
+
* Retrieves the action causing the add-on frame to be opened.
|
|
413
|
+
*/
|
|
414
|
+
getFrameOpenReason(): Promise<FrameOpenReason>;
|
|
415
|
+
|
|
416
|
+
/** Retrieves the meeting's current recording status. */
|
|
417
|
+
getCurrentMeetingRecordingStatus(): Promise<RecordingStatus>;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Starts a collaboration with the provided starting state of frames that the
|
|
421
|
+
* initiator and participants can use during the activity.
|
|
422
|
+
*/
|
|
423
|
+
startCollaboration(
|
|
424
|
+
collaborationStartingState?: CollaborationStartingState,
|
|
425
|
+
): Promise<void>;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Close the add-on that is running in the Meet iframe.
|
|
429
|
+
*/
|
|
430
|
+
closeAddon(): Promise<void>;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* The `MeetAddonClient` for the side panel component of an add-on.
|
|
435
|
+
*/
|
|
436
|
+
export interface MeetSidePanelClient extends MeetAddonClient {
|
|
437
|
+
/**
|
|
438
|
+
* Sends a message from the side panel add-on iframe to the main stage add-on
|
|
439
|
+
* iframe. The add-on running in the main stage iframe can react to this
|
|
440
|
+
* message using the {@link
|
|
441
|
+
* https://developers.google.com/meet/add-ons/reference/websdk/addon_sdk.addoncallbacks.frametoframemessage
|
|
442
|
+
* | frameToFrameMessage} add-on callback (see {@link
|
|
443
|
+
* https://developers.google.com/meet/add-ons/reference/websdk/addon_sdk.addoncallbacks
|
|
444
|
+
* | AddonCallbacks}).
|
|
445
|
+
*/
|
|
446
|
+
notifyMainStage(payload: string): Promise<void>;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* The `MeetAddonClient` for the main stage component of an add-on.
|
|
451
|
+
*/
|
|
452
|
+
export interface MeetMainStageClient extends MeetAddonClient {
|
|
453
|
+
/**
|
|
454
|
+
* Sends a message from the main stage add-on iframe to the side panel add-on
|
|
455
|
+
* iframe. The add-on running in the side panel iframe can react to this
|
|
456
|
+
* message using the {@link
|
|
457
|
+
* https://developers.google.com/meet/add-ons/reference/websdk/addon_sdk.addoncallbacks.frametoframemessage
|
|
458
|
+
* | frameToFrameMessage} add-on callback.
|
|
459
|
+
*/
|
|
460
|
+
notifySidePanel(payload: string): Promise<void>;
|
|
461
|
+
/**
|
|
462
|
+
* Closes the side panel iframe. Note that side panel add-on state isn't
|
|
463
|
+
* retained within Meet when the method is called. If the side panel iframe
|
|
464
|
+
* is opened again, for instance using a call to {@link
|
|
465
|
+
* https://developers.google.com/meet/add-ons/reference/websdk/addon_sdk.meetmainstageclient.loadsidepanel
|
|
466
|
+
* | loadSidePanel}, the side panel iframe source URL is set to its original
|
|
467
|
+
* value from the {@link
|
|
468
|
+
* https://developers.google.com/meet/add-ons/guides/build-add-on#manifest |
|
|
469
|
+
* add-on manifest}. It's up to the add-on to persist any add-on state in the
|
|
470
|
+
* add-on backend before this method is called.
|
|
471
|
+
*/
|
|
472
|
+
unloadSidePanel(): Promise<void>;
|
|
473
|
+
/**
|
|
474
|
+
* Opens the side panel iframe with the iframe source set to the side panel
|
|
475
|
+
* URL from the {@link
|
|
476
|
+
* https://developers.google.com/meet/add-ons/guides/build-add-on#manifest |
|
|
477
|
+
* add-on manifest}.
|
|
478
|
+
*/
|
|
479
|
+
loadSidePanel(): Promise<void>;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* The AddonSession interface. Used to interact with Meet.
|
|
484
|
+
*/
|
|
485
|
+
export interface AddonSession {
|
|
486
|
+
/** Creates a `MainStageClient`. */
|
|
487
|
+
createMainStageClient(): Promise<MeetMainStageClient>;
|
|
488
|
+
/** Creates a `SidePanelClient`. */
|
|
489
|
+
createSidePanelClient(): Promise<MeetSidePanelClient>;
|
|
490
|
+
/** Creates a `CoDoingClient`. */
|
|
491
|
+
createCoDoingClient(coDoingDelegate: CoDoingDelegate): Promise<CoDoingClient>;
|
|
492
|
+
/** Creates a `CoWatchingClient`. */
|
|
493
|
+
createCoWatchingClient(
|
|
494
|
+
coWatchingDelegate: CoWatchingDelegate,
|
|
495
|
+
): Promise<CoWatchingClient>;
|
|
496
|
+
/** Creates a GuaranteedDeliveryClient */
|
|
497
|
+
createGuaranteedDeliveryClient(
|
|
498
|
+
guaranteedDeliveryDelegate: GuaranteedDeliveryClientDelegate,
|
|
499
|
+
): Promise<MeetGuaranteedDeliveryClient>;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Information about the Meet platform in which the add-on is running.
|
|
504
|
+
*/
|
|
505
|
+
export interface MeetPlatformInfo {
|
|
506
|
+
/**
|
|
507
|
+
* Whether the meeting is running on Meet Rooms hardware.
|
|
508
|
+
*/
|
|
509
|
+
isMeetHardware: boolean;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
// Original file: guaranteed_delivery_types.d.ts
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* A temporary types files to hold the types until they can be
|
|
517
|
+
* added to the addon public types upon release.
|
|
518
|
+
*/
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* The client object that an add-on uses to subscribe to state change events
|
|
522
|
+
* from Meet web with guarantees about the reliability of the state.
|
|
523
|
+
*/
|
|
524
|
+
export interface MeetGuaranteedDeliveryClient {
|
|
525
|
+
disconnect(): void;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Host-provided set of callbacks required to instantiate a Guaranteed Delivery
|
|
530
|
+
* Client
|
|
531
|
+
*/
|
|
532
|
+
export interface GuaranteedDeliveryClientDelegate {
|
|
533
|
+
/**
|
|
534
|
+
* Callback that is triggered when Meet's recording status changes.
|
|
535
|
+
*/
|
|
536
|
+
onRecordingStatusChanged(message: RecordingStatusChanged): Promise<boolean>;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Information about Meet's recording status
|
|
541
|
+
*/
|
|
542
|
+
export interface RecordingStatusChanged {
|
|
543
|
+
recordingStatus: RecordingStatus;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/** Current recording status for the meeting. */
|
|
547
|
+
export type RecordingStatus =
|
|
548
|
+
| 'RECORDING_STARTING'
|
|
549
|
+
| 'RECORDING_IN_PROGRESS'
|
|
550
|
+
| 'NOT_RECORDING'
|
|
551
|
+
| 'RECORDING_STATUS_UNKNOWN';
|
package/meet.addons.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
(function(){var h;/*
|
|
2
|
+
|
|
3
|
+
Copyright The Closure Library Authors.
|
|
4
|
+
SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
var m=this||self,aa=function(a){a:{var b=["CLOSURE_FLAGS"];for(var c=m,d=0;d<b.length;d++)if(c=c[b[d]],null==c){b=null;break a}b=c}a=b&&b[a];return null!=a?a:!1},ba=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},ca="closure_uid_"+(1E9*Math.random()>>>0),da=0,ea=function(a,b,c){return a.call.apply(a.bind,arguments)},fa=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);
|
|
7
|
+
Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}},ha=function(a,b,c){ha=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ea:fa;return ha.apply(null,arguments)},ia=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}},ja=function(a,b){function c(){}c.prototype=b.prototype;a.U=b.prototype;a.prototype=new c;a.prototype.constructor=
|
|
8
|
+
a;a.Zb=function(d,e,f){for(var g=Array(arguments.length-2),l=2;l<arguments.length;l++)g[l-2]=arguments[l];return b.prototype[e].apply(d,g)}};function ka(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,ka);else{const c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));void 0!==b&&(this.cause=b)}ja(ka,Error);ka.prototype.name="CustomError";function la(a){m.setTimeout(()=>{throw a;},0)};var na=aa(610401301),oa=aa(188588736);function pa(){var a=m.navigator;return a&&(a=a.userAgent)?a:""}var qa;const ra=m.navigator;qa=ra?ra.userAgentData||null:null;function sa(a){return na?qa?qa.brands.some(({brand:b})=>b&&-1!=b.indexOf(a)):!1:!1}function n(a){return-1!=pa().indexOf(a)};function p(){return na?!!qa&&0<qa.brands.length:!1}function ta(){return p()?sa("Chromium"):(n("Chrome")||n("CriOS"))&&!(p()?0:n("Edge"))||n("Silk")};function ua(a,b){b=Array.prototype.indexOf.call(a,b,void 0);let c;(c=0<=b)&&Array.prototype.splice.call(a,b,1);return c};var va=function(a){va[" "](a);return a};va[" "]=function(){};var wa=n("Gecko")&&!(-1!=pa().toLowerCase().indexOf("webkit")&&!n("Edge"))&&!(n("Trident")||n("MSIE"))&&!n("Edge"),xa=-1!=pa().toLowerCase().indexOf("webkit")&&!n("Edge");!n("Android")||ta();ta();var ya=n("Safari")&&!(ta()||(p()?0:n("Coast"))||(p()?0:n("Opera"))||(p()?0:n("Edge"))||(p()?sa("Microsoft Edge"):n("Edg/"))||(p()?sa("Opera"):n("OPR"))||n("Firefox")||n("FxiOS")||n("Silk")||n("Android"))&&!(n("iPhone")&&!n("iPod")&&!n("iPad")||n("iPad")||n("iPod"));var za=null,Aa=wa||xa||!ya&&"function"==typeof m.atob,Ca=function(a){if(Aa)return m.atob(a);var b="";Ba(a,function(c){b+=String.fromCharCode(c)});return b},Ba=function(a,b){function c(k){for(;d<a.length;){var q=a.charAt(d++),x=za[q];if(null!=x)return x;if(!/^[\s\xa0]*$/.test(q))throw Error("Unknown base64 encoding at char: "+q);}return k}Da();for(var d=0;;){var e=c(-1),f=c(0),g=c(64),l=c(64);if(64===l&&-1===e)break;b(e<<2|f>>4);64!=g&&(b(f<<4&240|g>>2),64!=l&&b(g<<6&192|l))}},Da=function(){if(!za){za=
|
|
9
|
+
{};for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),b=["+/=","+/","-_=","-_.","-_"],c=0;5>c;c++)for(var d=a.concat(b[c].split("")),e=0;e<d.length;e++){var f=d[e];void 0===za[f]&&(za[f]=e)}}};function Ea(a){let b="",c=0;const d=a.length-10240;for(;c<d;)b+=String.fromCharCode.apply(null,a.subarray(c,c+=10240));b+=String.fromCharCode.apply(null,c?a.subarray(c):a);return btoa(b)}const Fa=/[-_.]/g,Ga={"-":"+",_:"/",".":"="};function Ha(a){return Ga[a]||""}function Ia(a){return null!=a&&a instanceof Uint8Array}let Ja;var Ka={};let La;function Ma(a){if(a!==Ka)throw Error("illegal external caller");}var Oa=function(){return La||(La=new Na(null,Ka))},Na=class{constructor(a,b){Ma(b);this.va=a;if(null!=a&&0===a.length)throw Error("ByteString should be constructed with non-empty values");}};function Pa(){return"function"===typeof BigInt};let r=0,t=0;function Qa(a){const b=0>a;a=Math.abs(a);let c=a>>>0;a=Math.floor((a-c)/4294967296);if(b){const [d,e]=Ra(c,a);a=e;c=d}r=c>>>0;t=a>>>0}function Sa(a,b){b>>>=0;a>>>=0;if(2097151>=b)var c=""+(4294967296*b+a);else Pa()?c=""+(BigInt(b)<<BigInt(32)|BigInt(a)):(c=(a>>>24|b<<8)&16777215,b=b>>16&65535,a=(a&16777215)+6777216*c+6710656*b,c+=8147497*b,b*=2,1E7<=a&&(c+=Math.floor(a/1E7),a%=1E7),1E7<=c&&(b+=Math.floor(c/1E7),c%=1E7),c=b+Ta(c)+Ta(a));return c}
|
|
10
|
+
function Ta(a){a=String(a);return"0000000".slice(a.length)+a}function Ua(){var a=r,b=t;if(b&2147483648)if(Pa())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{const [c,d]=Ra(a,b);a="-"+Sa(c,d)}else a=Sa(a,b);return a}function Ra(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};function Va(a){return Array.prototype.slice.call(a)};var u=Symbol(),Wa=Symbol();function v(a,b,c){return c?a|b:a&~b}var y=(a,b)=>{a[u]=b;return a};function Xa(a,b){y(b,(a|0)&-14591)}function Ya(a,b){y(b,(a|34)&-14557)}function Za(a){a=a>>14&1023;return 0===a?536870912:a};var $a={},ab={};function bb(a){return!(!a||"object"!==typeof a||a.fc!==ab)}function cb(a){return null!==a&&"object"===typeof a&&!Array.isArray(a)&&a.constructor===Object}let db;function eb(a,b,c){if(null!=a)if("string"===typeof a)a=a?new Na(a,Ka):Oa();else if(a.constructor!==Na)if(Ia(a))a=a.length?new Na(c?a:new Uint8Array(a),Ka):Oa();else{if(!b)throw Error();a=void 0}return a}
|
|
11
|
+
function fb(a,b,c){if(!Array.isArray(a)||a.length)return!1;const d=a[u]|0;if(d&1)return!0;if(!(b&&(Array.isArray(b)?b.includes(c):b.has(c))))return!1;y(a,d|1);return!0}var gb;const hb=[];y(hb,55);gb=Object.freeze(hb);function ib(a){if(a&2)throw Error();}class jb{}class kb{}var lb=Object.freeze(new jb);Object.freeze(new kb);var mb=Object.freeze(new kb);var nb=function(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let ob;function pb(a){a=Error(a);nb(a,"warning");return a};function qb(a){if(null==a||"boolean"===typeof a)return a;if("number"===typeof a)return!!a}const rb=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function sb(a){const b=typeof a;return"number"===b?Number.isFinite(a):"string"!==b?!1:rb.test(a)}function tb(a){return"-"===a[0]?20>a.length?!0:20===a.length&&-922337<Number(a.substring(0,7)):19>a.length?!0:19===a.length&&922337>Number(a.substring(0,6))}
|
|
12
|
+
function ub(a){a=Math.trunc(a);if(!Number.isSafeInteger(a)){Qa(a);var b=r,c=t;if(a=c&2147483648)b=~b+1>>>0,c=~c>>>0,0==b&&(c=c+1>>>0);b=4294967296*c+(b>>>0);a=a?-b:b}return a}
|
|
13
|
+
function vb(a){var b=Math.trunc(Number(a));if(Number.isSafeInteger(b))return String(b);b=a.indexOf(".");-1!==b&&(a=a.substring(0,b));if(!tb(a)){if(16>a.length)Qa(Number(a));else if(Pa())a=BigInt(a),r=Number(a&BigInt(4294967295))>>>0,t=Number(a>>BigInt(32)&BigInt(4294967295));else{b=+("-"===a[0]);t=r=0;const c=a.length;for(let d=0+b,e=(c-b)%6+b;e<=c;d=e,e+=6){const f=Number(a.slice(d,e));t*=1E6;r=1E6*r+f;4294967296<=r&&(t+=Math.trunc(r/4294967296),t>>>=0,r>>>=0)}if(b){const [d,e]=Ra(r,t);r=d;t=e}}a=
|
|
14
|
+
Ua()}return a}function wb(a){if(null!=a&&"string"!==typeof a)throw Error();return a}function xb(a,b,c){if(null!=a&&"object"===typeof a&&a.Oa===$a)return a;if(Array.isArray(a)){var d=a[u]|0,e=d;0===e&&(e|=c&32);e|=c&2;e!==d&&y(a,e);return new b(a)}};let yb;function zb(a,b){yb=b;a=new a(b);yb=void 0;return a};function Ab(a,b){return Bb(b)}function Bb(a){switch(typeof a){case "number":return isFinite(a)?a:String(a);case "boolean":return a?1:0;case "object":if(a)if(Array.isArray(a)){if(fb(a,void 0,0))return}else{if(Ia(a))return Ea(a);if(a instanceof Na){const b=a.va;return null==b?"":"string"===typeof b?b:a.va=Ea(b)}}}return a};function Cb(a,b,c){a=Va(a);var d=a.length;const e=b&256?a[d-1]:void 0;d+=e?-1:0;for(b=b&512?1:0;b<d;b++)a[b]=c(a[b]);if(e){b=a[b]={};for(const f in e)b[f]=c(e[f])}return a}function Db(a,b,c,d,e){if(null!=a){if(Array.isArray(a))a=fb(a,void 0,0)?void 0:e&&(a[u]|0)&2?a:Eb(a,b,c,void 0!==d,e);else if(cb(a)){const f={};for(let g in a)f[g]=Db(a[g],b,c,d,e);a=f}else a=b(a,d);return a}}
|
|
15
|
+
function Eb(a,b,c,d,e){const f=d||c?a[u]|0:0;d=d?!!(f&32):void 0;a=Va(a);for(let g=0;g<a.length;g++)a[g]=Db(a[g],b,c,d,e);c&&c(f,a);return a}function Fb(a){return a.Oa===$a?a.toJSON():Bb(a)};function Gb(a,b,c=Ya){if(null!=a){if(a instanceof Uint8Array)return b?a:new Uint8Array(a);if(Array.isArray(a)){var d=a[u]|0;d&2||(b&&(b=0===d||!!(d&32)&&!(d&64||!(d&16))),a=b?y(a,(d|34)&-12293):Eb(a,Gb,d&4?Ya:c,!0,!0));return a}a.Oa===$a&&(c=a.g,d=c[u],a=d&2?a:zb(a.constructor,Hb(c,d,!0)));return a}}function Hb(a,b,c){const d=c||b&2?Ya:Xa,e=!!(b&32);a=Cb(a,b,f=>Gb(f,e,d));a[u]=a[u]|32|(c?2:0);return a}function Ib(a){const b=a.g,c=b[u];return c&2?zb(a.constructor,Hb(b,c,!1)):a};var Kb=function(a,b){a=a.g;return Jb(a,a[u],b)};function Lb(a,b,c,d){b=d+(+!!(b&512)-1);if(!(0>b||b>=a.length||b>=c))return a[b]}var Jb=function(a,b,c,d){if(-1===c)return null;const e=Za(b);if(c>=e){if(b&256)return a[a.length-1][c]}else{var f=a.length;if(d&&b&256&&(d=a[f-1][c],null!=d)){if(Lb(a,b,e,c)&&null!=Wa){var g;a=null!=(g=ob)?g:ob={};g=a[Wa]||0;4<=g||(a[Wa]=g+1,g=Error(),nb(g,"incident"),la(g))}return d}return Lb(a,b,e,c)}},Mb=function(a,b,c){const d=a.g;let e=d[u];ib(e);z(d,e,b,c);return a};
|
|
16
|
+
function z(a,b,c,d,e){const f=Za(b);if(c>=f||e){let g=b;if(b&256)e=a[a.length-1];else{if(null==d)return g;e=a[f+(+!!(b&512)-1)]={};g|=256}e[c]=d;c<f&&(a[c+(+!!(b&512)-1)]=void 0);g!==b&&y(a,g);return g}a[c+(+!!(b&512)-1)]=d;b&256&&(a=a[a.length-1],c in a&&delete a[c]);return b}var A=function(a,b,c,d){return void 0!==Pb(a,b,Qb(a,d,c))};function Rb(a){return!!(2&a)&&!!(4&a)||!!(2048&a)}function Sb(a,b,c,d){const e=a.g;let f=e[u];ib(f);z(e,f,b,("0"===d?0===Number(c):c===d)?void 0:c);return a}
|
|
17
|
+
var Qb=function(a,b,c){a=a.g;return Tb(a,a[u],b)===c?c:-1},B=function(a,b){a=a.g;return Tb(a,a[u],b)};function Tb(a,b,c){let d=0;for(let e=0;e<c.length;e++){const f=c[e];null!=Jb(a,b,f)&&(0!==d&&(b=z(a,b,d)),d=f)}return d}function Pb(a,b,c,d){a=a.g;let e=a[u];const f=Jb(a,e,c,d);b=xb(f,b,e);b!==f&&null!=b&&z(a,e,c,b,d);return b}
|
|
18
|
+
var D=function(a,b,c){b=Pb(a,b,c,!1);if(null==b)return b;a=a.g;let d=a[u];if(!(d&2)){const e=Ib(b);e!==b&&(b=e,z(a,d,c,b,!1))}return b},E=function(a,b,c){null==c&&(c=void 0);return Mb(a,b,c)},F=function(a,b,c,d){null==d&&(d=void 0);const e=a.g;let f=e[u];ib(f);(c=Tb(e,f,c))&&c!==b&&null!=d&&(f=z(e,f,c));z(e,f,b,d);return a};function Ub(a,b){a=v(a,2,!!(2&b));a=v(a,32,!0);return a=v(a,2048,!1)}function Vb(a,b,c){32&b&&c||(a=v(a,32,!1));return a}function Wb(a,b){return null!=a?a:b}
|
|
19
|
+
var Xb=function(a){a=Kb(a,1);a=null==a?a:sb(a)?"number"===typeof a?ub(a):vb(a):void 0;return Wb(a,0)},G=function(a,b){a=Kb(a,b);return Wb(null==a||"string"===typeof a?a:void 0,"")},H=function(a,b){a=Kb(a,b);a=null==a?a:Number.isFinite(a)?a|0:void 0;return Wb(a,0)},I=function(a,b,c,d){return D(a,b,Qb(a,d,c))},Yb=function(a,b){if(null!=b){var c=!!c;if(!sb(b))throw pb("int64");"string"===typeof b?b=vb(b):c?(b=Math.trunc(b),Number.isSafeInteger(b)?b=String(b):(c=String(b),tb(c)?b=c:(Qa(b),b=Ua()))):b=
|
|
20
|
+
ub(b)}return Sb(a,1,b,"0")},J=function(a,b,c){return Sb(a,b,wb(c),"")},K=function(a,b,c){if(null!=c){if(!Number.isFinite(c))throw pb("enum");c|=0}return Sb(a,b,c,0)};var Zb=function(a){db=!0;try{return JSON.stringify(a.toJSON(),Ab)}finally{db=!1}},L=class{constructor(a){a:{null==a&&(a=yb);yb=void 0;if(null==a){var b=96;a=[]}else{if(!Array.isArray(a))throw Error("narr");b=a[u]|0;if(b&2048)throw Error("farr");if(b&64)break a;var c=a;b|=64;var d=c.length;if(d&&(--d,cb(c[d]))){b|=256;c=d-(+!!(b&512)-1);if(1024<=c)throw Error("pvtlmt");b=b&-16760833|(c&1023)<<14}}y(a,b)}this.g=a}toJSON(){return db?$b(this,this.g,!1):$b(this,Eb(this.g,Fb,void 0,void 0,!1),!0)}getExtension(a){const b=
|
|
21
|
+
a.N?a.Hb?a.Z(this,a.N,a.P,void 0!==lb?4:2,!0):a.Z(this,a.N,a.P,!0):a.Hb?a.Z(this,a.P,void 0!==lb?4:2,!0):a.Z(this,a.P,a.defaultValue,!0);return a.ec&&null==b?a.defaultValue:b}hasExtension(a){a.N?a=void 0!==Pb(this,a.N,a.P,!0):(a=a.N?a.Z(this,a.N,a.P,!0):a.Z(this,a.P,null,!0),a=void 0!==(null===a?void 0:a));return a}clone(){const a=this.g;return zb(this.constructor,Hb(a,a[u],!1))}};L.prototype.Oa=$a;L.prototype.toString=function(){return $b(this,this.g,!1).toString()};
|
|
22
|
+
function $b(a,b,c){var d=oa?void 0:a.constructor.Tb;const e=(c?a.g:b)[u];a=b.length;if(!a)return b;let f,g;if(cb(c=b[a-1])){a:{var l=c;let x={},C=!1;for(var k in l){let w=l[k];if(Array.isArray(w)){let ma=w;if(fb(w,d,+k)||bb(w)&&0===w.size)w=null;w!=ma&&(C=!0)}null!=w?x[k]=w:C=!0}if(C){for(var q in x){l=x;break a}l=null}}l!=c&&(f=!0);a--}for(k=+!!(e&512)-1;0<a;a--){q=a-1;c=b[q];q-=k;if(!(null==c||fb(c,d,q)||bb(c)&&0===c.size))break;g=!0}if(!f&&!g)return b;b=Array.prototype.slice.call(b,0,a);l&&b.push(l);
|
|
23
|
+
return b};function ac(a){return b=>{if(null==b||""==b)b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[u]|=32;b=zb(a,b)}return b}};var bc=function(a){return b=>{b=JSON.parse(b);if(!Array.isArray(b)){var c=typeof b;throw Error("Expected jspb data to be an array, got "+("object"!=c?c:b?Array.isArray(b)?"array":c:"null")+": "+b);}b[u]|=34;return new a(b)}}(class extends L{});var cc=class extends L{getSeconds(){return Xb(this)}setSeconds(a){return Yb(this,a)}};var ec=function(a){var b=new dc;return K(b,1,a)},dc=class extends L{getFrameType(){return H(this,1)}};var fc=function(a){a=a.g;var b=a[u],c=b,d=!(2&b),e=dc,f=!!(2&c);b=f?1:2;d&&(d=!f);f=Jb(a,c,1);f=Array.isArray(f)?f:gb;var g=f[u]|0;const l=!!(4&g);if(!l){var k=g;0===k&&(k=Ub(k,c));k=v(k,1,!0);g=f;var q=c;const x=!!(2&k);x&&(q=v(q,2,!0));let C=!x,w=!0,ma=0,Nb=0;for(;ma<g.length;ma++){const Ob=xb(g[ma],e,q);if(Ob instanceof e){if(!x){const bd=!!((Ob.g[u]|0)&2);C&&(C=!bd);w&&(w=bd)}g[Nb++]=Ob}}Nb<ma&&(g.length=Nb);k=v(k,4,!0);k=v(k,16,w);k=v(k,8,C);y(g,k);x&&Object.freeze(g);g=k}if(d&&!(8&g||!f.length&&
|
|
24
|
+
(1===b||4===b&&32&g))){Rb(g)&&(f=Va(f),g=Ub(g,c),c=z(a,c,1,f));d=f;e=g;for(g=0;g<d.length;g++)k=d[g],q=Ib(k),k!==q&&(d[g]=q);e=v(e,8,!0);e=v(e,16,!d.length);y(d,e);g=e}Rb(g)||(d=g,(e=1===b||4===b&&!!(32&g))?(k=!!(32&g),g=v(g,!f.length||16&g&&(!l||k)?2:2048,!0)):g=Vb(g,c,!1),g!==d&&y(f,g),e&&Object.freeze(f));2===b&&Rb(g)&&(f=Va(f),g=Ub(g,c),g=Vb(g,c,!1),y(f,g),z(a,c,1,f));return f},hc=function(a){{var b=new gc;const x=b.g;let C=x[u];ib(C);if(null==a)z(x,C,1);else{var c=a[u]|0,d=c,e=!!(2&c)||!!(2048&
|
|
25
|
+
c),f=e||Object.isFrozen(a),g;if(g=!f)g=void 0===mb||!1;var l=!0,k=!0;for(let w=0;w<a.length;w++){var q=a[w];e||(q=!!((q.g[u]|0)&2),l&&(l=!q),k&&(k=q))}e||(c=v(c,5,!0),c=v(c,8,l),c=v(c,16,k));if(g||f&&c!==d)a=Va(a),d=0,c=Ub(c,C),c=Vb(c,C,!0);c!==d&&y(a,c);z(x,C,1,a)}}return b},gc=class extends L{};gc.Tb=[1];var jc=function(a){var b=new ic;return K(b,1,a)},ic=class extends L{constructor(){super()}};var kc=class extends L{};var mc=class extends L{cb(){return B(this,lc)}},lc=[2,3];var nc=class extends L{};var oc=class extends L{qb(a){return J(this,2,a)}};var pc=class extends L{};var qc=class extends L{};var sc=class extends L{I(){return B(this,rc)}getCollaborationStartingState(){return I(this,gc,2,rc)}setCollaborationStartingState(a){return F(this,2,rc,a)}clearCollaborationStartingState(){return Mb(this,2)}getMeetingInfo(){return I(this,qc,3,rc)}getMeetPlatformInfo(){return I(this,pc,4,rc)}},rc=[2,3,4,5];var tc=class extends L{};var uc=class extends L{},vc=[3];var xc=class extends L{eb(){return B(this,wc)}},wc=[1,4,5,6,7,8,9,10,11,12,13,14,15,16];var yc=class extends L{constructor(){super()}getCollaborationStartingState(){return D(this,gc,1)}setCollaborationStartingState(a){return E(this,1,a)}clearCollaborationStartingState(){return Mb(this,1)}};var zc=class extends L{constructor(){super()}getCollaborationStartingState(){return D(this,gc,1)}setCollaborationStartingState(a){return E(this,1,a)}clearCollaborationStartingState(){return Mb(this,1)}};var Ac=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),Bc=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_COLLABORATION"],[3,"JOIN_COLLABORATION"]]),Cc=new Map([[0,"RECORDING_STATUS_UNKNOWN"],[1,"RECORDING_STARTING"],[2,"RECORDING_IN_PROGRESS"],[3,"NOT_RECORDING"]]);function Dc(a){a&&"function"==typeof a.Za&&a.Za()};var M=function(){this.A=this.A;this.J=this.J};M.prototype.A=!1;M.prototype.Za=function(){this.A||(this.A=!0,this.H())};var Ec=function(a,b){a.A?b():(a.J||(a.J=[]),a.J.push(b))};M.prototype.H=function(){if(this.J)for(;this.J.length;)this.J.shift()()};var Fc=function(a){const b=[];var c=b.push;var d=ec(2);d=J(d,2,a.mainStageUrl);d=J(d,3,a.additionalData);c.call(b,d);c=b.push;d=ec(1);d=J(d,2,a.sidePanelUrl);a=J(d,3,a.additionalData);c.call(b,a);return b},Nc=class extends M{constructor(a){super();this.context=a;this.La={};Gc(this.context.j.Pb,b=>{switch(b.content.eb()){case 7:var c=this.La.frameToFrameMessage;b=I(b.content,oc,7,wc);if(c&&b){var d=H(b,1);d=Ac.get(d);if(void 0===d)throw Error("Unknown frame type.");c({originator:d,payload:G(b,2)})}break;
|
|
26
|
+
case 11:c=this.La.userInitiatedCollaboration;b=I(b.content,uc,11,wc);c&&(null==b?0:A(b,tc,3,vc))&&c();break;case 16:Hc(this.context.j)}})}async getMeetingInfo(){const a=await Ic(this.context.j,jc(2));return{meetingId:G(a.getMeetingInfo(),1)}}async getFrameOpenReason(){let a;const b=null!=(a=this.context.ya.Db)?a:0;let c;return null!=(c=Bc.get(b))?c:"UNKNOWN"}async getCollaborationStartingState(){var a=(await Ic(this.context.j,jc(1))).getCollaborationStartingState();const b=null==a?void 0:fc(a).find(c=>
|
|
27
|
+
2===c.getFrameType());a=null==a?void 0:fc(a).find(c=>1===c.getFrameType());return{mainStageUrl:(null==b?void 0:G(b,2))||void 0,sidePanelUrl:(null==a?void 0:G(a,2))||void 0,additionalData:(null==a?void 0:G(a,3))||void 0}}async setCollaborationStartingState(a){a=Fc(a);await Jc(this.context.j,(new yc).setCollaborationStartingState(hc(a)))}async clearCollaborationStartingState(){await Kc(this.context.j)}on(a,b){this.La[a]=b}async getMeetPlatformInfo(){const a=await Ic(this.context.j,jc(3));return{isMeetHardware:Wb(qb(Kb(a.getMeetPlatformInfo(),
|
|
28
|
+
1)),!1)}}async getCurrentMeetingRecordingStatus(){var a=await Ic(this.context.j,jc(4));let b;a=null!=(b=H(a,Qb(a,rc,5)))?b:0;let c;return null!=(c=Cc.get(a))?c:"RECORDING_STATUS_UNKNOWN"}async closeAddon(){await Lc(this.context.j)}async startCollaboration(a){const b=new zc;a&&(a=Fc(a),b.setCollaborationStartingState(hc(a)));await Mc(this.context.j,b)}};var Oc=ac(class extends L{getFrameOpenReason(){return H(this,5)}});var N=class extends Error{constructor(a,b){super(`Meet Addon SDK error: ${`${a}${b?` - ${b}`:""}`}`)}},O=class extends Error{constructor(a,b){super(`Meet Addon SDK error: ${`${a}${b?` - ${b}`:""}`}`)}},Pc={message:"An unexpected error has occurred.",i:"No further information is available.",h:O},Qc={message:"An unexpected error has occurred.",i:"No further information is available.",h:N},Rc={message:"This method is not supported in standalone mode.",i:"Do not call this method in standalone mode.",
|
|
29
|
+
h:N},Sc={message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",i:"Make sure the destination frame has connected before sending messages to it.",h:N},Tc={message:"Origin of the CollaborationStartingState iframeURLs does not match the origin of the URLs provided in the Add-on manifest.",i:"Ensure that the CollaborationStartingState iframeURL origins match the origins of the URLs provided in the Add-on manifest.",h:N},Uc=a=>({message:`Could not connect to ${a} channel. Unknown error`,
|
|
30
|
+
i:"No further information is available.",h:O}),Vc={message:"clearCollaborationStartingState cannot be called while a collaboration is ongoing.",i:"Ensure that no collaboration is ongoing before calling clearCollaborationStartingState.",h:N},Wc={message:"Frame message missing required Meet SDK command.",i:"Send one of the available commands in the frame message.",h:N},Xc={message:"Requested method requires EAP enrollment",i:"No further information is available.",h:N},Yc={message:"The collaborationStartingState cannot be updated while the user is not the initiator of the current collaboration.",
|
|
31
|
+
i:"Ensure that the user is the initiator of the current collaboration or that the collaboration has ended before updating the collaborationStartingState.",h:N},Zc={message:"The size of the collaborationStartingState URLs and/or its data exceed the limits allowed.",i:"Ensure that the collaborationStartingState URL size is less than 512 characters and the data size is less than 4096 characters.",h:N},$c={message:"The size of the frame to frame message exceeds the limits allowed.",i:"Ensure that the frame to frame message size is less than 1 megabyte.",
|
|
32
|
+
h:N};function ad(a){switch(a){case 0:return Pc;case 1:return Sc;case 2:return Tc;case 3:return Vc;case 4:return Wc;case 5:return Xc;case 6:return Rc;case 7:return Yc;case 8:return Zc;case 9:return $c;default:return Qc}}
|
|
33
|
+
function cd(a){let b;var c=null!=(b=H(a,1))?b:0;a=dd(a.cb());switch(c){case 1:return{message:`Could not connect to ${a} channel. Meet did not respond with a MessagePort.`,i:"No further information is available.",h:O};case 2:return{message:`Could not connect to ${a}. A conflicting ${a} exists.`,i:"No further information is available.",h:O};case 3:return{message:`Could not connect to ${a} channel. The addon does not have permission to open a ${a}.`,i:"No further information is available.",h:O};case 4:return{message:`Could not connect to ${a} channel. The addon is not authorized for this ${a}.`,
|
|
34
|
+
i:"No further information is available.",h:O};case 0:return Uc(a);case 5:a:switch(a){case "coActivity":c={message:`Could not connect to ${a} channel. The coActivity was not found.`,i:`Consider starting the ${a} only after receiving a callback from the 'userInitiatedCollaboration' callback.`,h:O};break a;default:c={message:`Could not connect to ${a} channel.`,i:"No further information is available.",h:O}}return c;default:return Uc(a)}}
|
|
35
|
+
function dd(a){switch(a){case 2:return"coActivity";case 3:return"guaranteed delivery";case 0:return"unknown";default:return"unknown"}}function ed(a){a=cd(a);return new a.h(a.message,a.i)}function fd(a=""){throw new Qc.h(Qc.message+(a?` ${a}`:""),Qc.i);};class gd{constructor(a,b){this.wb=a[m.Symbol.iterator]();this.Kb=b}[Symbol.iterator](){return this}next(){const a=this.wb.next();return{value:a.done?void 0:this.Kb.call(void 0,a.value),done:a.done}}}var hd=function(a,b){return new gd(a,b)};var id=function(){};function jd(a,b){for(const c in a)if(b.call(void 0,a[c],c,a))return!0;return!1}const kd="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function ld(a,b){let c,d;for(let e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(let f=0;f<kd.length;f++)c=kd[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var md=function(){var a=document;var b="IFRAME";"application/xhtml+xml"===a.contentType&&(b=b.toLowerCase());return a.createElement(b)};const nd=m.URL;function od(){var a=window.location.href,b;if(b=(new nd(a)).searchParams.get("meet_sdk"))b=Oc(Ca(b));else throw new N(`${"Missing required Meet SDK URL parameter"}: ${"meet_sdk"}. In URL ${a}`,"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not strip URL parameters (e.g. as part of a redirect).");var c=G(b,1);if(!c)throw new N(`${"Missing required Meet SDK URL parameter"}: ${"meet_addon_frame_type"}. In URL ${a}`,"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not strip URL parameters (e.g. as part of a redirect).");
|
|
36
|
+
c=Number(c);if(2!==c&&1!==c)throw new N("The frame type URL parameter is set to an unexpected value.","This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not modify URL parameters (e.g. as part of a redirect).");const d=G(b,2);if(!d)throw new N(`${"Missing required Meet SDK URL parameter"}: ${"meet_control_channel_name"}. In URL ${a}`,"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not strip URL parameters (e.g. as part of a redirect).");
|
|
37
|
+
const e=G(b,4);if(!e)throw new N(`${"Missing required Meet SDK URL parameter"}: ${"addon_cloud_project_number"}. In URL ${a}`,"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not strip URL parameters (e.g. as part of a redirect).");var f;a=null!=(f=b.getFrameOpenReason())?f:0;f=G(b,3)||"https://meet.google.com";return{Db:a,frameType:c,zb:d,cloudProjectNumber:e,lb:f}};var pd=class extends L{constructor(){super()}};var qd=class extends L{constructor(){super()}};var rd=class extends L{constructor(){super()}};var sd=class extends L{constructor(){super()}};var vd=function(){var a=new td,b=new rd;return F(a,1,ud,b)},wd=function(){var a=new td,b=new sd;return F(a,2,ud,b)},td=class extends L{constructor(){super()}cb(){return B(this,ud)}},ud=[1,2];var xd=class extends L{constructor(){super()}};var yd=class extends L{constructor(){super()}};var zd=class extends L{constructor(){super()}qb(a){return J(this,2,a)}};var Ad=class extends L{constructor(){super()}};var Bd=class extends L{constructor(){super()}};var Q=class extends L{constructor(){super()}eb(){return B(this,P)}},P=[1,2,5,6,7,8,9,10,11,13,14,15];var Cd=class extends L{},Dd=ac(Cd),Ed=[1,2];class Fd{constructor(a,b){this.data=a;this.channel=b}};var Gd=Promise;var Id=function(a){const b=new MessageChannel;Hd(b.port1,a);return b},Kd=function(a,b){Hd(a,b);return new Jd(a)};class Jd{constructor(a){this.Rb=a}send(a,b,c=[]){b=Id(b);this.Rb.postMessage(a,[b.port2].concat(c))}ea(a,b){return new Gd(c=>{this.send(a,c,b)})}}const Hd=function(a,b){b&&(a.onmessage=c=>{var d=c.data;c=Kd(c.ports[0]);b(new Fd(d,c))})};class Ld{constructor(a,b){this.Jb=100;this.Ab=a;this.Ub=b;this.ra=0;this.oa=null}get(){let a;0<this.ra?(this.ra--,a=this.oa,this.oa=a.next,a.next=null):a=this.Ab();return a}put(a){this.Ub(a);this.ra<this.Jb&&(this.ra++,a.next=this.oa,this.oa=a)}};var Md,Nd=function(){var a=m.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!n("Presto")&&(a=function(){var e=md();e.style.display="none";document.documentElement.appendChild(e);var f=e.contentWindow;e=f.document;e.open();e.close();var g="callImmediate"+Math.random(),l="file:"==f.location.protocol?"*":f.location.protocol+"//"+f.location.host;e=ha(function(k){if(("*"==l||k.origin==l)&&k.data==g)this.port1.onmessage()},this);f.addEventListener("message",
|
|
38
|
+
e,!1);this.port1={};this.port2={postMessage:function(){f.postMessage(g,l)}}});if("undefined"!==typeof a){var b=new a,c={},d=c;b.port1.onmessage=function(){if(void 0!==c.next){c=c.next;var e=c.Ya;c.Ya=null;e()}};return function(e){d.next={Ya:e};d=d.next;b.port2.postMessage(0)}}return function(e){m.setTimeout(e,0)}};class Od{constructor(){this.wa=this.V=null}add(a,b){const c=Pd.get();c.set(a,b);this.wa?this.wa.next=c:this.V=c;this.wa=c}remove(){let a=null;this.V&&(a=this.V,this.V=this.V.next,this.V||(this.wa=null),a.next=null);return a}}var Pd=new Ld(()=>new Qd,a=>a.reset());class Qd{constructor(){this.next=this.scope=this.Da=null}set(a,b){this.Da=a;this.scope=b;this.next=null}reset(){this.next=this.scope=this.Da=null}};let Rd,Sd=!1,Td=new Od,Vd=(a,b)=>{Rd||Ud();Sd||(Rd(),Sd=!0);Td.add(a,b)},Ud=()=>{if(m.Promise&&m.Promise.resolve){const a=m.Promise.resolve(void 0);Rd=()=>{a.then(Wd)}}else Rd=()=>{var a=Wd;"function"!==typeof m.setImmediate||m.Window&&m.Window.prototype&&m.Window.prototype.setImmediate==m.setImmediate?(Md||(Md=Nd()),Md(a)):m.setImmediate(a)}};var Wd=()=>{let a;for(;a=Td.remove();){try{a.Da.call(a.scope)}catch(b){la(b)}Pd.put(a)}Sd=!1};var R=function(a){this.s=0;this.nb=void 0;this.M=this.F=this.K=null;this.la=this.Ca=!1;if(a!=id)try{var b=this;a.call(void 0,function(c){Xd(b,2,c)},function(c){Xd(b,3,c)})}catch(c){Xd(this,3,c)}},Yd=function(){this.next=this.context=this.S=this.ba=this.G=null;this.X=!1};Yd.prototype.reset=function(){this.context=this.S=this.ba=this.G=null;this.X=!1};
|
|
39
|
+
var Zd=new Ld(function(){return new Yd},function(a){a.reset()}),$d=function(a,b,c){var d=Zd.get();d.ba=a;d.S=b;d.context=c;return d},be=function(){var a,b,c=new R(function(d,e){a=d;b=e});return new ae(c,a,b)};R.prototype.then=function(a,b,c){return ce(this,"function"===typeof a?a:null,"function"===typeof b?b:null,c)};R.prototype.$goog_Thenable=!0;var ee=function(a,b){b=$d(b,b);b.X=!0;de(a,b)};R.prototype.Vb=function(a,b){return ce(this,null,a,b)};R.prototype.catch=R.prototype.Vb;
|
|
40
|
+
R.prototype.cancel=function(a){if(0==this.s){var b=new S(a);Vd(function(){fe(this,b)},this)}};
|
|
41
|
+
var fe=function(a,b){if(0==a.s)if(a.K){var c=a.K;if(c.F){for(var d=0,e=null,f=null,g=c.F;g&&(g.X||(d++,g.G==a&&(e=g),!(e&&1<d)));g=g.next)e||(f=g);e&&(0==c.s&&1==d?fe(c,b):(f?(d=f,d.next==c.M&&(c.M=d),d.next=d.next.next):ge(c),he(c,e,3,b)))}a.K=null}else Xd(a,3,b)},de=function(a,b){a.F||2!=a.s&&3!=a.s||ie(a);a.M?a.M.next=b:a.F=b;a.M=b},ce=function(a,b,c,d){var e=$d(null,null,null);e.G=new R(function(f,g){e.ba=b?function(l){try{var k=b.call(d,l);f(k)}catch(q){g(q)}}:f;e.S=c?function(l){try{var k=c.call(d,
|
|
42
|
+
l);void 0===k&&l instanceof S?g(l):f(k)}catch(q){g(q)}}:g});e.G.K=a;de(a,e);return e.G};R.prototype.Xb=function(a){this.s=0;Xd(this,2,a)};R.prototype.Yb=function(a){this.s=0;Xd(this,3,a)};
|
|
43
|
+
var Xd=function(a,b,c){if(0==a.s){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.s=1;a:{var d=c,e=a.Xb,f=a.Yb;if(d instanceof R){de(d,$d(e||id,f||null,a));var g=!0}else{if(d)try{var l=!!d.$goog_Thenable}catch(q){l=!1}else l=!1;if(l)d.then(e,f,a),g=!0;else{if(ba(d))try{var k=d.then;if("function"===typeof k){je(d,k,e,f,a);g=!0;break a}}catch(q){f.call(a,q);g=!0;break a}g=!1}}}g||(a.nb=c,a.s=b,a.K=null,ie(a),3!=b||c instanceof S||ke(a,c))}},je=function(a,b,c,d,e){var f=!1,g=function(k){f||
|
|
44
|
+
(f=!0,c.call(e,k))},l=function(k){f||(f=!0,d.call(e,k))};try{b.call(a,g,l)}catch(k){l(k)}},ie=function(a){a.Ca||(a.Ca=!0,Vd(a.Cb,a))},ge=function(a){var b=null;a.F&&(b=a.F,a.F=b.next,b.next=null);a.F||(a.M=null);return b};R.prototype.Cb=function(){for(var a;a=ge(this);)he(this,a,this.s,this.nb);this.Ca=!1};
|
|
45
|
+
var he=function(a,b,c,d){if(3==c&&b.S&&!b.X)for(;a&&a.la;a=a.K)a.la=!1;if(b.G)b.G.K=null,le(b,c,d);else try{b.X?b.ba.call(b.context):le(b,c,d)}catch(e){me.call(null,e)}Zd.put(b)},le=function(a,b,c){2==b?a.ba.call(a.context,c):a.S&&a.S.call(a.context,c)},ke=function(a,b){a.la=!0;Vd(function(){a.la&&me.call(null,b)})},me=la,S=function(a){ka.call(this,a)};ja(S,ka);S.prototype.name="cancel";var ae=function(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let ne=1,oe=new WeakMap;
|
|
46
|
+
var qe=function(a,b,c){var d=pe;a.tb.has(b);d({signal:b,data:c})},se=class extends M{constructor(){super();this.tb=new Set}signal(){const a=new re;this.tb.add(a);Ec(this,ia(Dc,a));return a}},pe=function(...a){if(0===a.length)return Promise.resolve();if(1===a.length){const {signal:b,data:c}=a[0];return te(b,c)}return Promise.all(a.map(({signal:b,data:c})=>te(b,c))).then()},te=function(a,b){return new Promise(c=>{ue(()=>{a.Xa&&(a.Ib=b,a.ib=!0);for(const {Ta:d,slot:e}of a.o.values())try{e(b,{signal:a,
|
|
47
|
+
Ta:d})}catch(f){la(f)}for(const d of a.T)d.resolve(b);a.T.clear();c()})})},Gc=function(a,b,c){const d=ne++;ue(()=>{ve(a,d,b,c)});return d},ve=function(a,b,c,d){if(!a.A)if(d){if(!d.A){const e=()=>{ue(()=>{a.o.delete(b);const f=oe.get(d);f&&ua(f,e)})};a.o.set(b,{Ta:b,slot:c,Aa:e});we(d,e)}}else a.o.set(b,{Ta:b,slot:c,Aa:()=>a.o.delete(b)})},re=class extends M{constructor(){super();this.Xa=!1;this.o=new Map;this.T=new Set;this.ib=!1}detach(a){ue(()=>{const b=this.o.get(a);b&&b.Aa()})}value(a){return this.promise(!0,
|
|
48
|
+
a)}next(a){return this.promise(!1,a)}promise(a,b){const c=be();ue(()=>{if(this.A)c.reject(new S("Signal initially disposed"));else if(b&&b.A)c.reject(new S("Owner initially disposed"));else if(a&&this.Xa&&this.ib)c.resolve(this.Ib);else if(this.T.add(c),ee(c.promise,()=>{this.T.delete(c)}),b){const d=()=>{c.reject(new S("Owner asynchronously disposed"))};ee(c.promise,()=>{const e=oe.get(b);e&&ua(e,d)});we(b,d)}});return c.promise}H(){super.H();ue(()=>{for(const {Aa:a}of this.o.values())a();this.o.clear();
|
|
49
|
+
for(const a of this.T)a.reject(new S("Signal asynchronously disposed"));this.T.clear()})}};const xe=[];let ye=!1;function ue(a){xe.push(a);ze()}async function ze(){if(!ye)try{ye=!0;let a=Ae(0);for(;a<xe.length;)await Promise.resolve(),a=Ae(a)}catch(a){la(a)}finally{xe.length=0,ye=!1}}function Ae(a){const b=a+100;for(;a<b&&a<xe.length;)try{xe[a++]()}catch(c){la(c)}return a}
|
|
50
|
+
function we(a,b){if(a.A)b();else{var c=oe.get(a);if(c)c.push(b);else{const d=[b];oe.set(a,d);Ec(a,()=>{for(const e of[...d])e();oe.delete(a)})}}};function T(a){var b=new Cd;a=F(b,1,Ed,a);return{content:Zb(a)}}const Be=new se;function Ce(a,b){const c=Be.signal();return{channel:Kd(a,d=>{const e=b(d.data);qe(Be,c,{content:e,mb:d})}),signal:c}};var De=function(a,b){return K(a,1,b)},Ee=class extends L{};var Fe=class extends L{pb(a){return E(this,1,a)}};var Ge=class extends L{pb(a){return E(this,1,a)}};var Ie=ac(class extends L{I(){return B(this,He)}Ha(){return I(this,Fe,1,He)}ua(a){return F(this,1,He,a)}}),He=[1,2];let Je;var U=class extends L{getState(){const a=this.g;let b=a[u];const c=Jb(a,b,1),d=eb(c,!0,!!(b&34));null!=d&&d!==c&&z(a,b,1,d);return null==d?Oa():d}};var V=class extends L{};var Le=class extends L{Fa(){return I(this,U,2,Ke)}sa(a){F(this,2,Ke,a)}na(){return A(this,U,2,Ke)}Ga(){return I(this,V,3,Ke)}ta(a){F(this,3,Ke,a)}Ja(){return A(this,V,3,Ke)}},Ke=[2,3];var Me=ac(class extends L{});var Oe=ac(class extends L{I(){return B(this,Ne)}}),Ne=[1,2];var Pe=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.ca=!1};Pe.prototype.stopPropagation=function(){this.ca=!0};Pe.prototype.preventDefault=function(){this.defaultPrevented=!0};var Qe=function(){if(!m.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});try{const c=()=>{};m.addEventListener("test",c,b);m.removeEventListener("test",c,b)}catch(c){}return a}();var Se=function(a,b){Pe.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.pointerId=0;this.pointerType="";this.timeStamp=0;this.Y=null;if(a){var c=this.type=a.type,d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||a.srcElement;
|
|
51
|
+
this.currentTarget=b;if(b=a.relatedTarget){if(wa){a:{try{va(b.nodeName);var e=!0;break a}catch(f){}e=!1}e||(b=null)}}else"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;d?(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0):(this.offsetX=xa||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=xa||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?
|
|
52
|
+
a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.key=a.key||"";this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.pointerId=a.pointerId||0;this.pointerType="string"===typeof a.pointerType?a.pointerType:Re[a.pointerType]||"";this.state=a.state;this.timeStamp=a.timeStamp;this.Y=
|
|
53
|
+
a;a.defaultPrevented&&Se.U.preventDefault.call(this)}};ja(Se,Pe);var Re={2:"touch",3:"pen",4:"mouse"};Se.prototype.stopPropagation=function(){Se.U.stopPropagation.call(this);this.Y.stopPropagation?this.Y.stopPropagation():this.Y.cancelBubble=!0};Se.prototype.preventDefault=function(){Se.U.preventDefault.call(this);var a=this.Y;a.preventDefault?a.preventDefault():a.returnValue=!1};var Te="closure_listenable_"+(1E6*Math.random()|0);var Ue=0;var Ve=function(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.ma=e;this.key=++Ue;this.da=this.ia=!1},We=function(a){a.da=!0;a.listener=null;a.proxy=null;a.src=null;a.ma=null};var Xe=function(a){this.src=a;this.m={};this.ga=0};Xe.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.m[f];a||(a=this.m[f]=[],this.ga++);var g=Ye(a,b,d,e);-1<g?(b=a[g],c||(b.ia=!1)):(b=new Ve(b,this.src,f,!!d,e),b.ia=c,a.push(b));return b};Xe.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.m))return!1;var e=this.m[a];b=Ye(e,b,c,d);return-1<b?(We(e[b]),Array.prototype.splice.call(e,b,1),0==e.length&&(delete this.m[a],this.ga--),!0):!1};
|
|
54
|
+
var Ze=function(a,b){var c=b.type;c in a.m&&ua(a.m[c],b)&&(We(b),0==a.m[c].length&&(delete a.m[c],a.ga--))};Xe.prototype.Ia=function(a,b,c,d){a=this.m[a.toString()];var e=-1;a&&(e=Ye(a,b,c,d));return-1<e?a[e]:null};Xe.prototype.hasListener=function(a,b){var c=void 0!==a,d=c?a.toString():"",e=void 0!==b;return jd(this.m,function(f){for(var g=0;g<f.length;++g)if(!(c&&f[g].type!=d||e&&f[g].capture!=b))return!0;return!1})};
|
|
55
|
+
var Ye=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.da&&f.listener==b&&f.capture==!!c&&f.ma==d)return e}return-1};var $e="closure_lm_"+(1E6*Math.random()|0),af={},bf=0,df=function(a,b,c,d,e){if(d&&d.once)cf(a,b,c,d,e);else if(Array.isArray(b))for(var f=0;f<b.length;f++)df(a,b[f],c,d,e);else c=ef(c),a&&a[Te]?ff(a,b,c,ba(d)?!!d.capture:!!d,e):gf(a,b,c,!1,d,e)},gf=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=ba(e)?!!e.capture:!!e,l=hf(a);l||(a[$e]=l=new Xe(a));c=l.add(b,c,d,g,f);if(!c.proxy){d=jf();c.proxy=d;d.src=a;d.listener=c;if(a.addEventListener)Qe||(e=g),void 0===e&&(e=!1),a.addEventListener(b.toString(),
|
|
56
|
+
d,e);else if(a.attachEvent)a.attachEvent(kf(b.toString()),d);else if(a.addListener&&a.removeListener)a.addListener(d);else throw Error("addEventListener and attachEvent are unavailable.");bf++}},jf=function(){const a=lf,b=function(c){return a.call(b.src,b.listener,c)};return b},cf=function(a,b,c,d,e){if(Array.isArray(b))for(var f=0;f<b.length;f++)cf(a,b[f],c,d,e);else c=ef(c),a&&a[Te]?a.B.add(String(b),c,!0,ba(d)?!!d.capture:!!d,e):gf(a,b,c,!0,d,e)},mf=function(a,b,c,d,e){if(Array.isArray(b))for(var f=
|
|
57
|
+
0;f<b.length;f++)mf(a,b[f],c,d,e);else d=ba(d)?!!d.capture:!!d,c=ef(c),a&&a[Te]?a.B.remove(String(b),c,d,e):a&&(a=hf(a))&&(b=a.Ia(b,c,d,e))&&nf(b)},nf=function(a){if("number"!==typeof a&&a&&!a.da){var b=a.src;if(b&&b[Te])Ze(b.B,a);else{var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent?b.detachEvent(kf(c),d):b.addListener&&b.removeListener&&b.removeListener(d);bf--;(c=hf(b))?(Ze(c,a),0==c.ga&&(c.src=null,b[$e]=null)):We(a)}}},kf=function(a){return a in
|
|
58
|
+
af?af[a]:af[a]="on"+a},lf=function(a,b){if(a.da)a=!0;else{b=new Se(b,this);var c=a.listener,d=a.ma||a.src;a.ia&&nf(a);a=c.call(d,b)}return a},hf=function(a){a=a[$e];return a instanceof Xe?a:null},of="__closure_events_fn_"+(1E9*Math.random()>>>0),ef=function(a){if("function"===typeof a)return a;a[of]||(a[of]=function(b){return a.handleEvent(b)});return a[of]};var pf=function(){};pf.prototype.next=function(){return qf};var qf={done:!0,value:void 0};pf.prototype.L=function(){return this};var uf=function(a){if(a instanceof rf||a instanceof sf||a instanceof tf)return a;if("function"==typeof a.next)return new rf(()=>a);if("function"==typeof a[Symbol.iterator])return new rf(()=>a[Symbol.iterator]());if("function"==typeof a.L)return new rf(()=>a.L());throw Error("Not an iterator or iterable.");};class rf{constructor(a){this.Ea=a}L(){return new sf(this.Ea())}[Symbol.iterator](){return new tf(this.Ea())}Ua(){return new tf(this.Ea())}}
|
|
59
|
+
class sf extends pf{constructor(a){super();this.aa=a}next(){return this.aa.next()}[Symbol.iterator](){return new tf(this.aa)}Ua(){return new tf(this.aa)}}class tf extends rf{constructor(a){super(()=>a);this.aa=a}next(){return this.aa.next()}};var W=function(a,b){this.D={};this.l=[];this.ha=this.size=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)},wf=function(a){vf(a);return a.l.concat()};W.prototype.has=function(a){return xf(this.D,a)};W.prototype.clear=function(){this.D={};this.ha=this.size=this.l.length=0};W.prototype.remove=function(a){return this.delete(a)};
|
|
60
|
+
W.prototype.delete=function(a){return xf(this.D,a)?(delete this.D[a],--this.size,this.ha++,this.l.length>2*this.size&&vf(this),!0):!1};var vf=function(a){if(a.size!=a.l.length){for(var b=0,c=0;b<a.l.length;){var d=a.l[b];xf(a.D,d)&&(a.l[c++]=d);b++}a.l.length=c}if(a.size!=a.l.length){var e={};for(c=b=0;b<a.l.length;)d=a.l[b],xf(e,d)||(a.l[c++]=d,e[d]=1),b++;a.l.length=c}};h=W.prototype;h.get=function(a,b){return xf(this.D,a)?this.D[a]:b};
|
|
61
|
+
h.set=function(a,b){xf(this.D,a)||(this.size+=1,this.l.push(a),this.ha++);this.D[a]=b};h.addAll=function(a){if(a instanceof W)for(var b=wf(a),c=0;c<b.length;c++)this.set(b[c],a.get(b[c]));else for(b in a)this.set(b,a[b])};h.forEach=function(a,b){for(var c=wf(this),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};h.clone=function(){return new W(this)};h.keys=function(){return uf(this.L(!0)).Ua()};h.values=function(){return uf(this.L(!1)).Ua()};
|
|
62
|
+
h.entries=function(){const a=this;return hd(this.keys(),function(b){return[b,a.get(b)]})};h.L=function(a){vf(this);var b=0,c=this.ha,d=this,e=new pf;e.next=function(){if(c!=d.ha)throw Error("The map has changed since the iterator was created");if(b>=d.l.length)return qf;var f=d.l[b++];return{value:a?f:d.D[f],done:!1}};return e};var xf=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var X=function(){M.call(this);this.B=new Xe(this);this.ub=this;this.Qa=null};ja(X,M);X.prototype[Te]=!0;X.prototype.addEventListener=function(a,b,c,d){df(this,a,b,c,d)};X.prototype.removeEventListener=function(a,b,c,d){mf(this,a,b,c,d)};
|
|
63
|
+
X.prototype.dispatchEvent=function(a){var b,c=this.Qa;if(c)for(b=[];c;c=c.Qa)b.push(c);c=this.ub;var d=a.type||a;if("string"===typeof a)a=new Pe(a,c);else if(a instanceof Pe)a.target=a.target||c;else{var e=a;a=new Pe(d,c);ld(a,e)}e=!0;if(b)for(var f=b.length-1;!a.ca&&0<=f;f--){var g=a.currentTarget=b[f];e=yf(g,d,!0,a)&&e}a.ca||(g=a.currentTarget=c,e=yf(g,d,!0,a)&&e,a.ca||(e=yf(g,d,!1,a)&&e));if(b)for(f=0;!a.ca&&f<b.length;f++)g=a.currentTarget=b[f],e=yf(g,d,!1,a)&&e;return e};
|
|
64
|
+
X.prototype.H=function(){X.U.H.call(this);if(this.B){var a=this.B,b=0,c;for(c in a.m){for(var d=a.m[c],e=0;e<d.length;e++)++b,We(d[e]);delete a.m[c];a.ga--}}this.Qa=null};var ff=function(a,b,c,d,e){a.B.add(String(b),c,!1,d,e)},yf=function(a,b,c,d){b=a.B.m[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var g=b[f];if(g&&!g.da&&g.capture==c){var l=g.listener,k=g.ma||g.src;g.ia&&Ze(a.B,g);e=!1!==l.call(k,d)&&e}}return e&&!d.defaultPrevented};
|
|
65
|
+
X.prototype.Ia=function(a,b,c,d){return this.B.Ia(String(a),b,c,d)};X.prototype.hasListener=function(a,b){return this.B.hasListener(void 0!==a?String(a):void 0,b)};var zf=function(a,b){X.call(this);this.qa=a||1;this.fa=b||m;this.Wa=ha(this.Wb,this);this.kb=Date.now()};ja(zf,X);h=zf.prototype;h.enabled=!1;h.u=null;h.setInterval=function(a){this.qa=a;this.u&&this.enabled?(this.stop(),this.start()):this.u&&this.stop()};h.Wb=function(){if(this.enabled){var a=Date.now()-this.kb;0<a&&a<.8*this.qa?this.u=this.fa.setTimeout(this.Wa,this.qa-a):(this.u&&(this.fa.clearTimeout(this.u),this.u=null),this.Ba(),this.enabled&&(this.stop(),this.start()))}};h.Ba=function(){this.dispatchEvent("tick")};
|
|
66
|
+
h.start=function(){this.enabled=!0;this.u||(this.u=this.fa.setTimeout(this.Wa,this.qa),this.kb=Date.now())};h.stop=function(){this.enabled=!1;this.u&&(this.fa.clearTimeout(this.u),this.u=null)};h.H=function(){zf.U.H.call(this);this.stop();delete this.fa};var Af=function(a,b,c){zf.call(this,b,c)},Bf;ja(Af,zf);Af.prototype.Ba=function(){Af.U.Ba.call(this)};var Cf=function(a){Bf||(Bf=new W);const b=new Af("heartbeat interval",1E3),c=Object.prototype.hasOwnProperty.call(b,ca)&&b[ca]||(b[ca]=++da);Bf.set(c,b);df(b,"tick",a,!1);b.start()};var Df=({destination:a,origin:b,hc:c,vb:d="ZNWN1d",onMessage:e})=>{if("*"===b)throw Error("Sending to wildcard origin not allowed.");const f=Id(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return Kd(f.port1,e)};function Ef(a,b){const c=new se,d=c.signal();a=Df({destination:window.parent,origin:b,vb:a,onMessage:e=>{const f=Dd(e.data.content);2===B(f,Ed)&&qe(c,d,{content:I(f,xc,2,Ed),mb:e,messagePort:e.data.messagePort})}});return new Ff(d,a)}
|
|
67
|
+
var Hc=async function(a){a=a.channel;var b=a.ea;var c=new Q;var d=new Ad;c=F(c,13,P,d);await b.call(a,T(c))},Ic=async function(a,b){var c=Y,d=new Q;b=F(d,9,P,b);a=await c(a,T(b));let e;return null==(e=I(Dd(a.data.content),xc,2,Ed))?void 0:I(e,sc,9,wc)},Jc=async function(a,b){var c=Y,d=new Q;b=F(d,8,P,b);await c(a,T(b))},Kc=async function(a){var b=Y;var c=new Q;var d=new pd;c=F(c,10,P,d);await b(a,T(c))},Lc=async function(a){var b=Y;var c=new Q;var d=new qd;c=F(c,11,P,d);await b(a,T(c))},Mc=async function(a,
|
|
68
|
+
b){var c=Y,d=new Q;b=F(d,14,P,b);await c(a,T(b))},Gf=async function(a){Cf(async()=>{await Hc(a)})},Y=async function(a,b){(a=await a.channel.ea(b))||fd("Falsy response received from the message channel."+` ${JSON.stringify(a)}`);(b=a.data)||fd("Data field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);(b=b.content)||fd("Content field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);let c=void 0;try{c=Dd(b)}catch(d){fd("The ControlMessage can't be deserialized."+
|
|
69
|
+
` ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=I(c,xc,2,Ed))||fd("MeetToAddonMessage field on ControlMessage is falsy."+` ${JSON.stringify(b)}`);b=null==b?void 0:I(b,nc,10,wc);if(void 0!==(null==b?void 0:H(b,1)))throw a=H(b,1),a=ad(a),new a.h(a.message,a.i);return a},Hf=async function(a,b,c){var d=Y,e=new Q;b=F(e,1,P,b);d=await d(a,T(b));a=d.data.messagePort;var f;null!=(d=null==(f=I(Dd(d.data.content),xc,2,Ed))?void 0:I(f,mc,1,wc))?f=d:(f=new mc,f=K(f,1,0));return{channel:a?Ce(a,c):void 0,response:f}},
|
|
70
|
+
If=async function(a){const b=vd(),{channel:c,response:d}=await Hf(a,b,e=>Oe(e));if(!c)throw ed(d);return c},Jf=async function(a){const b=wd(),{channel:c,response:d}=await Hf(a,b,e=>Ie(e));if(!c)throw ed(d);return{channel:c,response:d}},Kf=async function(a){var b=Y;var c=new Q;var d=new Bd;c=F(c,5,P,d);await b(a,T(c))},Lf=async function(a){var b=Y;var c=new Q;var d=new yd;c=F(c,6,P,d);await b(a,T(c))},Mf=async function(a,b,c){var d=Y,e=new Q,f=new zd;b=K(f,1,b).qb(c);e=F(e,7,P,b);await d(a,T(e))};
|
|
71
|
+
class Ff extends M{constructor(a,b){super();this.Pb=a;this.channel=b;a=Je||(Je=bc("[0,7,0]"));a=Ib(a);a=Mb(a,4,wb("640139460"));b=a.g;var c=b[u];b=c&2?a:zb(a.constructor,Hb(b,c,!0));a=new Q;c=new xd;b=E(c,2,b);a=F(a,2,P,b);this.channel.send(T(a));Gf(this)}};let Nf;
|
|
72
|
+
function Of(a){var b=a.cloudProjectNumber;a=od();if(a.cloudProjectNumber!==b)throw new N("Cloud Project Number provided by meet does not match the one passed in by the SDK. Ensure that the correct Cloud Project Number is passed to the SDK as a string.","This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not modify URL parameters (e.g. as part of a redirect) and ensure that the correct Cloud Project Number was passed into the SDK as a string.");b=
|
|
73
|
+
a.lb;const c=a.zb;let d;Nf=null!=(d=Nf)?d:Ef(c,b);return new Pf(a)}var Pf=class{constructor(a){var b=Nf;this.ya=a;this.j=b}delete(){throw Error("Not implemented.");}};var Qf=class extends L{constructor(){super()}};var Rf=class extends L{constructor(){super()}};var Tf=class extends L{constructor(){super()}I(){return B(this,Sf)}Ha(){return I(this,Fe,1,Sf)}ua(a){return F(this,1,Sf,a)}},Sf=[1,2,3];var Wf=async function(a,b){switch(b.I()){case 1:var c=Uf;b=b.Ha();await c(a,b);break;case 2:return c=Vf,b=I(b,Ge,2,He),await c(a,b)}},Yf=function(a){a.Ka=setTimeout(async()=>{await Xf(a)},3E3)},Uf=async function(a,b){a.Ka&&(clearTimeout(a.Ka),Yf(a));let c;(null==(c=D(b,Ee,1))?void 0:H(c,1))!==H(a.za,1)?(a.Pa++,await Zf(a)):a.Pa=0},Vf=async function(a,b){var c=new Rf;b=D(b,Ee,1);if(!b)return c=new Tf,a=new Rf,a=K(a,1,4),F(c,2,Sf,a);var d;const e=null!=(d=Cc.get(H(b,1)))?d:"RECORDING_STATUS_UNKNOWN";
|
|
74
|
+
d=await $f(a,e);K(c,1,d);2===d&&De(a.za,H(b,1));a=new Tf;return F(a,2,Sf,c)},Zf=async function(a){if(3<a.Pa)try{await a.O.onRecordingStatusChanged({recordingStatus:"RECORDING_STATUS_UNKNOWN"})}catch(b){}},$f=async function(a,b){const c=new Promise((d,e)=>{setTimeout(()=>{e(new ag)},5E3)});try{return await Promise.race([c,(async()=>a.O.onRecordingStatusChanged({recordingStatus:b}))()])?2:3}catch(d){return d instanceof ag?5:4}},Xf=async function(a){try{await a.O.onRecordingStatusChanged({recordingStatus:"RECORDING_STATUS_UNKNOWN"})}catch(b){}},
|
|
75
|
+
bg=class extends M{constructor(a,b){super();this.gb=a;this.O=b;this.pa=new zf(1E3);this.Pa=0;a=this.gb.response;this.ka=this.gb.channel;this.Eb=Gc(this.ka.signal,async e=>{var f=await Wf(this,e.content);f&&(e=e.mb,f=Zb(f),e.channel.send(f,void 0,void 0))},this);let c,d;a=null!=(d=null==(c=I(a,kc,3,lc))?void 0:H(c,1))?d:0;this.za=De(new Ee,a);Ec(this,ia(Dc,this.pa));ff(this.pa,"tick",()=>{this.ka.channel.send(Zb((new Tf).ua((new Fe).pb(this.za))))});this.pa.start();Yf(this)}disconnect(){var a=this.ka.channel,
|
|
76
|
+
b=a.send;var c=new Tf;var d=new Qf;c=F(c,3,Sf,d);b.call(a,Zb(c));this.pa.stop();clearTimeout(this.Ka);this.ka.signal.detach(this.Eb)}},ag=class extends Error{constructor(){super("Timed out waiting for guaranteed delivery delegate method to return")}};async function cg(a,b){a=await Jf(a.j);return new bg(a,b)};var eg=class extends L{Sa(a){return Yb(this,a)}Fa(){return I(this,U,2,dg)}sa(a){F(this,2,dg,a)}na(){return A(this,U,2,dg)}Ga(){return I(this,V,3,dg)}ta(a){F(this,3,dg,a)}Ja(){return A(this,V,3,dg)}},dg=[2,3];var fg=class extends L{constructor(){super()}};var gg=class extends L{constructor(){super()}};var hg=class extends L{constructor(){super()}Ra(a){return Mb(this,4,wb(a))}};var jg=class extends L{constructor(){super()}Sa(a){return Yb(this,a)}Fa(){return I(this,U,2,ig)}sa(a){F(this,2,ig,a)}na(){return A(this,U,2,ig)}Ga(){return I(this,V,3,ig)}ta(a){F(this,3,ig,a)}Ja(){return A(this,V,3,ig)}},ig=[2,3],kg=[5,6];var lg=class extends L{constructor(){super()}Ra(a){return J(this,1,a)}};var ng=class extends L{constructor(){super()}I(){return B(this,mg)}Ha(){return I(this,eg,1,mg)}ua(a){return F(this,1,mg,a)}},mg=[1,2,3];function og(a){var b=new pg;let c=0,d;return(...e)=>{if(qg(b)){rg(b);var f=!0}else f=!1;f?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;let g;null==(g=d)||g()},sg(b))))}};var sg=function(a){const b=a.ab;let c;a=Date.now()-(null!=(c=a.Ma[a.index])?c:0);return a>=b?0:b-a},qg=function(a){const b=a.ab;let c;return Date.now()-(null!=(c=a.Ma[a.index])?c:0)>=b},rg=function(a){a.Ma[a.index]=Date.now();a.index=(a.index+1)%a.Lb},pg=class{constructor(){this.Lb=1;this.ab=500;this.Ma=[];this.index=0}};var tg=class extends Error{constructor(){super("Failed to create CoActivity: Connection refused - Meet refused to begin Live Sharing")}};var ug=class{constructor(a){this.config=a}start(){null!=this.jb||(this.jb=setInterval(()=>{this.config.Ob()},this.config.Gb));return this}shutdown(){clearInterval(this.jb)}};function vg(){const a=new Map,b={set(c,d){a.set(c,d);return b},xa:()=>a};return b};function wg(a){if(a.na()){a=a.Fa().getState();Ma(Ka);var b=a.va;if(null!=b&&!Ia(b))if("string"===typeof b){Fa.test(b)&&(b=b.replace(Fa,Ha));b=atob(b);const c=new Uint8Array(b.length);for(let d=0;d<b.length;d++)c[d]=b.charCodeAt(d);b=c}else b=null;a=null==b?b:a.va=b;return{bytes:a?new Uint8Array(a):Ja||(Ja=new Uint8Array(0))}}}function xg(a,b){a.sa(yg(b));return a}function zg(a,b){a.sa(yg(b));return a}function yg(a){var b=new U;return Sb(b,1,eb(a.bytes,!1,!1),Oa())}
|
|
77
|
+
function Ag(a){if(a.Ja()){a=a.Ga();var b,c,d=G(a,1),e=null!=(c=null==(b=D(a,cc,2))?void 0:Xb(b))?c:0;c=a.g;let f=c[u];const g=Jb(c,f,4);b=null==g||"number"===typeof g?g:"NaN"===g||"Infinity"===g||"-Infinity"===g?Number(g):void 0;null!=b&&b!==g&&z(c,f,4,b);return{mediaId:d,mediaPlayoutPosition:e,mediaPlayoutRate:Wb(b,0),playbackState:Bg.get(H(a,3))}}}function Cg(a,b){a.ta(Dg(b));return a}function Eg(a,b){a.ta(Dg(b));return a}
|
|
78
|
+
const Bg=vg().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED").xa(),Fg=vg().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4).xa();function Dg(a){var b=new V;b=J(b,1,a.mediaId);var c=a.mediaPlayoutRate;if(null!=c&&"number"!==typeof c)throw Error(`Value of float/double field must be a number, found ${typeof c}: ${c}`);b=Sb(b,4,c,0);c=(new cc).setSeconds(a.mediaPlayoutPosition);b=E(b,2,c);a=Fg.get(a.playbackState);return K(b,3,a)}
|
|
79
|
+
function Gg({activityTitle:a}){return(new hg).Ra(a)}function Hg(a,b){var c=new gg;b=K(c,1,b.R);F(a,6,kg,b);return a}function Ig(a){var b=new fg;F(a,5,kg,b);return a};const Jg=vg().set("co-doing",1).set("co-watching",2).xa();async function Kg(a,b,c){var d=b.ea,e=new ng;var f=(new lg).Ra(a.activityTitle);var g=Jg.get(a.Va);f=K(f,2,g);e=F(e,3,mg,f);d=await d.call(b,e,Me);let l;if(null!=(l=Wb(qb(Kb(d,1)),!1))&&l)return new Lg(a,b,c,D(d,Le,2));throw new tg;}var Mg=function(a,b){const c=a.config.fb(b);c&&!a.config.bb(a.C,c)&&(a.C=c,a.Na=Xb(b),a.Bb(a.C))},Ng=function(a,b){const {state:c,Mb:d,context:e}=b(a.C);a.C=c;a.notify(a.C,e,d)};
|
|
80
|
+
class Lg{constructor(a,b,c,d){this.O=a;this.ja=b;this.config=c;this.Bb=og(e=>void this.O.hb(e));Og(this.ja,e=>{const f=e.I();switch(f){case 1:Mg(this,I(e,Le,1,Ne));break;case 2:case 0:console.warn(`IllegalMessage: ${f} - ${"Unhandled message"} - ${"Please raise a bug with the MeetJS team"}`)}});this.Fb=(new ug({Gb:1E3,Ob:()=>{var e;let f;const g=null==(f=(e=this.O).Sb)?void 0:f.call(e);null!==this.C&&(this.C={...this.C,...g},e=(new ng).ua(this.config.rb((new eg).Sa(this.Na),this.C)),this.ja.send(e))}})).start();
|
|
81
|
+
this.C=null;this.Na=0;d&&Mg(this,d)}disconnect(){this.ja.shutdown();this.Fb.shutdown()}notify(a,b,c){var d=c?Gg(c):void 0;c=this.config;var e=c.sb,f=(new jg).Sa(this.Na);d=E(f,4,d);a=e.call(c,d,a);a=this.config.ob(a,b);b=this.ja;c=b.send;e=new ng;a=F(e,2,mg,a);c.call(b,a)}};var Pg=class{constructor(a){this.v=a}broadcastStateUpdate(a){Ng(this.v,()=>({state:a,context:{}}))}disconnect(){this.v.disconnect()}};function Qg(a,b){return null==a||null==b?!1:a.bytes.length===b.bytes.length&&a.bytes.every((c,d)=>c===b.bytes[d])};var Rg=class{constructor(a){this.v=a}notifySwitchedToMedia(a,b,c){Ng(this.v,()=>({state:{mediaId:b,mediaPlayoutRate:1,mediaPlayoutPosition:c,playbackState:"PLAY"},Mb:{activityTitle:a},context:{R:1}}))}notifyPauseState(a,b){Ng(this.v,c=>{if(null==c)throw Error("Invalid before coWatchingState");return{state:{...c,playbackState:a?"PAUSE":"PLAY",mediaPlayoutPosition:b},context:{R:3}}})}notifySeekToTimestamp(a){Ng(this.v,b=>{if(null==b)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},
|
|
82
|
+
context:{R:2}}})}notifyPlayoutRate(a){Ng(this.v,b=>{if(null==b)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutRate:a},context:{R:4}}})}notifyBuffering(a){Ng(this.v,b=>{if(null==b)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a,playbackState:"BUFFERING"},context:{R:3}}})}notifyReady(a){Ng(this.v,b=>{if(null==b)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},context:{R:3}}})}disconnect(){this.v.disconnect()}};
|
|
83
|
+
function Sg(a,b){if(null==a||null==b)return!1;const c="PLAY"===a.playbackState?3*Math.max(a.mediaPlayoutRate,1):0,d=Math.abs(a.mediaPlayoutPosition-b.mediaPlayoutPosition);return a.mediaId===b.mediaId&&a.mediaPlayoutRate===b.mediaPlayoutRate&&d<=c&&a.playbackState===b.playbackState};var Og=function(a,b){const c=Gc(a.signal,d=>{b(d)});a.o.push(c)},Tg=class{constructor(a,b){this.channel=a;this.signal=b;this.o=[]}send(a){this.channel.send(Zb(a))}async ea(a,b){a=await this.channel.ea(Zb(a));return b(a.data)}shutdown(){this.o.forEach(a=>{this.signal.detach(a)})}};function Ug(a,b){var c=Vg;const d=a.signal(),e=a.signal();Gc(b,f=>{const g=c(f)?d:e;qe(a,g,f)},a);return{Qb:d,Nb:e}}function Wg(a,b,c,d=e=>e){Gc(c,e=>{qe(a,b,d(e))},a)};async function Xg(a,b){if(b)return a=await Kg({activityTitle:b.activityTitle,Va:"co-watching",Sb:()=>b.onCoWatchingStateQuery(),hb:c=>{b.onCoWatchingStateChanged(c)}},a,{sb:Cg,rb:Eg,ob:Hg,fb:Ag,bb:Sg}),new Rg(a)}async function Yg(a,b){if(b)return a=await Kg({activityTitle:b.activityTitle,Va:"co-doing",hb:c=>{b.onCoDoingStateChanged(c)}},a,{sb:xg,rb:zg,ob:Ig,fb:wg,bb:Qg}),new Pg(a)}
|
|
84
|
+
async function Zg(a){const b=new se,c=b.signal();a=await a;Wg(b,c,a.signal,f=>f.content);const {Qb:d,Nb:e}=Ug(b,c);return{xb:new Tg(a.channel,d),yb:new Tg(a.channel,e)}}function Vg(a){a:switch(a.I()){case 1:a=I(a,Le,1,Ne);break a;default:throw Error("CA Message arrived with no known content message set");}return a.na()};async function $g(a,b){({xb:a}=await Zg(If(a.j)));b=await Yg(a,b);if(!b)throw Error("Failed to create co-doing session");return b}async function ah(a,b){({yb:a}=await Zg(If(a.j)));b=await Xg(a,b);if(!b)throw Error("Failed to create co-watching session");return b};function bh(a){if(2!==a.ya.frameType)throw new N("This method can only be invoked if the addon is running in the main stage.","Use getFrameType to check whether the addon is running in the main stage before invoking this method.");return Promise.resolve(new ch(a))}var ch=class extends Nc{async notifySidePanel(a){await Mf(this.context.j,1,a)}async unloadSidePanel(){await Kf(this.context.j)}async loadSidePanel(){await Lf(this.context.j)}};function dh(a){if(1!==a.ya.frameType)throw new N("This method can only be invoked if the addon is running in the side panel.","Use getFrameType to check whether the addon is running in the side panel before invoking this method.");return Promise.resolve(new eh(a))}var eh=class extends Nc{async notifyMainStage(a){await Mf(this.context.j,2,a)}};class fh{constructor(a){this.W=Of(a)}async createMainStageClient(){return await bh(this.W)}async createSidePanelClient(){return await dh(this.W)}async createCoWatchingClient(a){return await ah(this.W,a)}async createCoDoingClient(a){return await $g(this.W,a)}async createGuaranteedDeliveryClient(a){return await cg(this.W,a)}}let gh=null;var hh=class{};var ih={addon:{bc:Of,getFrameType:function(){a:{var a=od().frameType;switch(a){case 2:a="MAIN_STAGE";break a;case 1:a="SIDE_PANEL";break a;default:throw Error(`Unknown frame type: ${a}`);}}return a},cc:bh,dc:dh,ac:function(a){a=If(a.j);Zg(a);return new hh},createAddonSession:async function(a){if(gh&&"integration.test.google.com"!==od().lb)throw Error("AddonSession already created");return gh=new fh(a)}}},jh=["meet"],Z=m;jh[0]in Z||"undefined"==typeof Z.execScript||Z.execScript("var "+jh[0]);
|
|
85
|
+
for(var kh;jh.length&&(kh=jh.shift());)jh.length||void 0===ih?Z=Z[kh]&&Z[kh]!==Object.prototype[kh]?Z[kh]:Z[kh]={}:Z[kh]=ih;}).call(this);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
(function(){/*
|
|
2
|
+
|
|
3
|
+
Copyright The Closure Library Authors.
|
|
4
|
+
SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
var l=this||self,aa=function(a){a:{var b=["CLOSURE_FLAGS"];for(var c=l,d=0;d<b.length;d++)if(c=c[b[d]],null==c){b=null;break a}b=c}a=b&&b[a];return null!=a?a:!1};var r=class extends Error{constructor(a,b){super(`Meet Addon Screenshare Info error: ${`${a}${b?` - ${b}`:""}`}`)}};function t(a){throw new a.v(a.message+"",a.C);}
|
|
7
|
+
var ba={message:"cloudProjectNumber was not defined.",C:"Ensure that cloudProjectNumber is provided in the call to exposeToMeetWhenScreensharing.",v:r},ca={message:"additionalData was defined, but startActivityOnOpen was not true.",C:"Ensure that startActivityOnOpen is set to true if additionalData is provided in the call to exposeToMeetWhenScreensharing.",v:r},ea={message:"Received an incorrect value for startActivityOnOpen.",C:"Ensure that startActivityOnOpen is set to true if a mainStageUrl is provided in the call to exposeToMeetWhenScreensharing.",
|
|
8
|
+
v:r};let fa;function ha(a){l.setTimeout(()=>{throw a;},0)};var ia=aa(610401301),ja=aa(188588736);var u;const ka=l.navigator;u=ka?ka.userAgentData||null:null;function x(a){return ia?u?u.brands.some(({brand:b})=>b&&-1!=b.indexOf(a)):!1:!1}function y(a){var b;a:{if(b=l.navigator)if(b=b.userAgent)break a;b=""}return-1!=b.indexOf(a)};function z(){return ia?!!u&&0<u.brands.length:!1}function A(){return z()?x("Chromium"):(y("Chrome")||y("CriOS"))&&!(z()?0:y("Edge"))||y("Silk")};!y("Android")||A();A();y("Safari")&&(A()||(z()?0:y("Coast"))||(z()?0:y("Opera"))||(z()?0:y("Edge"))||(z()?x("Microsoft Edge"):y("Edg/"))||z()&&x("Opera"));var la={},B=null;var C=function(a,b){for(;127<b;)a.i.push(b&127|128),b>>>=7;a.i.push(b)},ma=function(a,b){if(0<=b)C(a,b);else{for(let c=0;9>c;c++)a.i.push(b&127|128),b>>=7;a.i.push(1)}},na=class{constructor(){this.i=[]}length(){return this.i.length}end(){const a=this.i;this.i=[];return a}D(a){this.i.push(a?1:0)}G(a){ma(this,a)}};var D=function(a,b){0!==b.length&&(a.u.push(b),a.j+=b.length)},oa=class{constructor(){this.u=[];this.j=0;this.h=new na}D(a,b){null!=b&&(C(this.h,8*a),this.h.D(b))}G(a,b){null!=b&&(b=parseInt(b,10),C(this.h,8*a),ma(this.h,b))}};class E{constructor(a,b){this.s=a;this.H=b}};var F=Symbol(),G=Symbol();var I=(a,b)=>{a[F]=b;return a};function pa(a,b){I(b,(a|0)&-14591)}function J(a,b){I(b,(a|34)&-14557)}function qa(a){a=a>>14&1023;return 0===a?536870912:a};var K={},ra={};function sa(a){return!(!a||"object"!==typeof a||a.P!==ra)}function L(a){return null!==a&&"object"===typeof a&&!Array.isArray(a)&&a.constructor===Object}function M(a,b,c){if(!Array.isArray(a)||a.length)return!1;const d=a[F]|0;if(d&1)return!0;if(!(b&&(Array.isArray(b)?b.includes(c):b.has(c))))return!1;I(a,d|1);return!0}const ta=[];I(ta,55);Object.freeze(ta);function N(a){if(a&2)throw Error();}class ua{}class va{}var wa=Object.freeze(new ua);Object.freeze(new va);var xa=Object.freeze(new va);var ya=function(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let za;function Aa(a){if(null==a)return a;if("string"===typeof a){if(!a)return;a=+a}if("number"===typeof a)return Number.isFinite(a)?a|0:void 0}function O(a){if(null!=a&&"string"!==typeof a)throw Error();return a};let P,Ba,Ca;function Da(a){switch(typeof a){case "boolean":return Ba||(Ba=[0,void 0,!0]);case "number":return 0<a?void 0:0===a?Ca||(Ca=[0,void 0]):[-a,void 0];case "string":return[0,a];case "object":return a}}
|
|
9
|
+
function Ea(a,b,c){null==a&&(a=P);P=void 0;if(null==a){var d=96;c?(a=[c],d|=512):a=[];b&&(d=d&-16760833|(b&1023)<<14)}else{if(!Array.isArray(a))throw Error("narr");d=a[F]|0;if(d&2048)throw Error("farr");if(d&64)return a;d|=64;if(c&&(d|=512,c!==a[0]))throw Error("mid");a:{c=a;const e=c.length;if(e){const f=e-1;if(L(c[f])){d|=256;b=f-(+!!(d&512)-1);if(1024<=b)throw Error("pvtlmt");d=d&-16760833|(b&1023)<<14;break a}}if(b){b=Math.max(b,e-(+!!(d&512)-1));if(1024<b)throw Error("spvt");d=d&-16760833|(b&
|
|
10
|
+
1023)<<14}}}I(a,d);return a};function Fa(a){switch(typeof a){case "number":return isFinite(a)?a:String(a);case "boolean":return a?1:0;case "object":if(a)if(Array.isArray(a)){if(M(a,void 0,0))return}else if(null!=a&&a instanceof Uint8Array){let b="",c=0;const d=a.length-10240;for(;c<d;)b+=String.fromCharCode.apply(null,a.subarray(c,c+=10240));b+=String.fromCharCode.apply(null,c?a.subarray(c):a);return btoa(b)}}return a};function Ga(a,b,c){a=Array.prototype.slice.call(a);var d=a.length;const e=b&256?a[d-1]:void 0;d+=e?-1:0;for(b=b&512?1:0;b<d;b++)a[b]=c(a[b]);if(e){b=a[b]={};for(const f in e)b[f]=c(e[f])}return a}function Ha(a,b,c,d,e){if(null!=a){if(Array.isArray(a))a=M(a,void 0,0)?void 0:e&&(a[F]|0)&2?a:Q(a,b,c,void 0!==d,e);else if(L(a)){const f={};for(let g in a)f[g]=Ha(a[g],b,c,d,e);a=f}else a=b(a,d);return a}}
|
|
11
|
+
function Q(a,b,c,d,e){const f=d||c?a[F]|0:0;d=d?!!(f&32):void 0;a=Array.prototype.slice.call(a);for(let g=0;g<a.length;g++)a[g]=Ha(a[g],b,c,d,e);c&&c(f,a);return a}function Ia(a){return a.A===K?a.toJSON():Fa(a)};function Ja(a,b,c=J){if(null!=a){if(a instanceof Uint8Array)return b?a:new Uint8Array(a);if(Array.isArray(a)){var d=a[F]|0;d&2||(b&&(b=0===d||!!(d&32)&&!(d&64||!(d&16))),a=b?I(a,(d|34)&-12293):Q(a,Ja,d&4?J:c,!0,!0));return a}a.A===K&&(c=a.g,d=c[F],a=d&2?a:Ka(a,c,d,!0));return a}}function Ka(a,b,c,d){a=a.constructor;P=b=La(b,c,d);b=new a(b);P=void 0;return b}function La(a,b,c){const d=c||b&2?J:pa,e=!!(b&32);a=Ga(a,b,f=>Ja(f,e,d));a[F]=a[F]|32|(c?2:0);return a};function Ma(a,b,c,d){b=d+(+!!(b&512)-1);if(!(0>b||b>=a.length||b>=c))return a[b]}var S=function(a,b,c){const d=a.g;let e=d[F];N(e);R(d,e,b,c);return a};function R(a,b,c,d,e){const f=qa(b);if(c>=f||e){let g=b;if(b&256)e=a[a.length-1];else{if(null==d)return;e=a[f+(+!!(b&512)-1)]={};g|=256}e[c]=d;c<f&&(a[c+(+!!(b&512)-1)]=void 0);g!==b&&I(a,g)}else a[c+(+!!(b&512)-1)]=d,b&256&&(a=a[a.length-1],c in a&&delete a[c])}
|
|
12
|
+
function T(a,b,c,d){const e=a.g;let f=e[F];N(f);R(e,f,b,("0"===d?0===Number(c):c===d)?void 0:c);return a};var U=class{constructor(){this.g=Ea()}toJSON(){return Na(this,Q(this.g,Ia,void 0,void 0,!1),!0)}getExtension(a){const b=a.l?a.J?a.o(this,a.l,a.m,void 0!==wa?4:2,!0):a.o(this,a.l,a.m,!0):a.J?a.o(this,a.m,void 0!==wa?4:2,!0):a.o(this,a.m,a.defaultValue,!0);return a.O&&null==b?a.defaultValue:b}hasExtension(a){if(a.l){var b=a.l;a=a.m;const h=this.g;let k=h[F];a:{var c=h,d=k;if(-1===a)var e=null;else{var f=qa(d);if(a>=f)e=d&256?c[c.length-1][a]:void 0;else{e=c.length;if(d&256&&(e=c[e-1][a],null!=e)){if(Ma(c,
|
|
13
|
+
d,f,a)&&null!=G){var g;c=null!=(g=za)?g:za={};g=c[G]||0;4<=g||(c[G]=g+1,g=Error(),ya(g,"incident"),ha(g))}break a}e=Ma(c,d,f,a)}}}g=k;null!=e&&"object"===typeof e&&e.A===K?b=e:Array.isArray(e)?(d=c=e[F]|0,0===d&&(d|=g&32),d|=g&2,d!==c&&I(e,d),b=new b(e)):b=void 0;b!==e&&null!=b&&R(h,k,a,b,!0);a=void 0!==b}else a=a.l?a.o(this,a.l,a.m,!0):a.o(this,a.m,null,!0),a=void 0!==(null===a?void 0:a);return a}clone(){const a=this.g;return Ka(this,a,a[F],!1)}};U.prototype.A=K;
|
|
14
|
+
U.prototype.toString=function(){return Na(this,this.g,!1).toString()};
|
|
15
|
+
function Na(a,b,c){var d=ja?void 0:a.constructor.L;const e=(c?a.g:b)[F];a=b.length;if(!a)return b;let f,g;if(L(c=b[a-1])){a:{var h=c;let p={},v=!1;for(var k in h){let m=h[k];if(Array.isArray(m)){let w=m;if(M(m,d,+k)||sa(m)&&0===m.size)m=null;m!=w&&(v=!0)}null!=m?p[k]=m:v=!0}if(v){for(var q in p){h=p;break a}h=null}}h!=c&&(f=!0);a--}for(k=+!!(e&512)-1;0<a;a--){q=a-1;c=b[q];q-=k;if(!(null==c||M(c,d,q)||sa(c)&&0===c.size))break;g=!0}if(!f&&!g)return b;b=Array.prototype.slice.call(b,0,a);h&&b.push(h);
|
|
16
|
+
return b};const Oa=Symbol(),Pa=Symbol();function Qa(a){let b=a[Pa];if(!b){const c=V(a);b=(d,e)=>Ra(d,e,c);a[Pa]=b}return b}const W=Symbol();function Sa(a){return a.s}function Ta(a,b){let c,d;const e=a.s;return(f,g,h)=>e(f,g,h,d||(d=V(b).F),c||(c=Qa(b)))}
|
|
17
|
+
function V(a){var b=a[W];if(b)return b;b=a[W]={};var c=Sa,d=Ta;b.F=Da(a[0]);let e=0;var f=a[++e];f&&f.constructor===Object&&(b.I=f,f=a[++e],"function"===typeof f&&(b.N=f,b.K=a[++e],f=a[++e]));const g={};for(;Array.isArray(f)&&"number"===typeof f[0]&&0<f[0];){for(var h=0;h<f.length;h++)g[f[h]]=f;f=a[++e]}for(h=1;void 0!==f;){"number"===typeof f&&(h+=f,f=a[++e]);let m;var k=void 0;f instanceof E?m=f:(m=Ua,e--);if(m.H){f=a[++e];k=a;var q=e;"function"==typeof f&&(f=f(),k[q]=f);k=f}f=a[++e];let w=h+1;
|
|
18
|
+
"number"===typeof f&&0>f&&(w-=f,f=a[++e]);for(;h<w;h++){var p=g[h];q=b;var v=h;p=k?d(m,k,p):c(m,p);q[v]=p}}Va in a&&Oa in a&&W in a&&(a.length=0);return b}const Va=Symbol();function Wa(a,b){var c=a[b];if(c)return c;if(c=a.I)if(c=c[b]){c=Array.isArray(c)?c[0]instanceof E?c:[Xa,c]:[c,void 0];var d=c[0].s;if(c=c[1]){const e=Qa(c),f=V(c).F;c=(c=a.K)?c(f,e):(g,h,k)=>d(g,h,k,f,e)}else c=d;return a[b]=c}}
|
|
19
|
+
function Ra(a,b,c){var d=a[F],e=+!!(d&512)-1,f=a.length,g=d&512?1:0;const h=f+(d&256?-1:0);for(;g<h;g++){const k=a[g];if(null==k)continue;const q=g-e,p=Wa(c,q);p&&p(b,k,q)}if(d&256){a=a[f-1];for(let k in a)d=+k,Number.isNaN(d)||(e=a[k],null!=e&&(f=Wa(c,d))&&f(b,e,d))}}function Ya(a,b,c){b=null==b||"string"===typeof b?b:void 0;null!=b&&(b=(fa||(fa=new TextEncoder)).encode(b),C(a.h,8*c+2),C(a.h,b.length),D(a,a.h.end()),D(a,b))}
|
|
20
|
+
function Za(a,b,c,d,e){b=b instanceof U?b.g:Array.isArray(b)?Ea(b,d[0],d[1]):void 0;if(null!=b){C(a.h,8*c+2);c=a.h.end();D(a,c);c.push(a.j);e(b,a);e=c.pop();for(e=a.j+a.h.length()-e;127<e;)c.push(e&127|128),e>>>=7,a.j++;c.push(e);a.j++}}var $a;$a=new E(function(a,b,c){a.D(c,null==b||"boolean"===typeof b?b:"number"===typeof b?!!b:void 0)},!1);var ab=new E(Ya,!1),Xa=new E(Za,!0),Ua=new E(Za,!0),bb;bb=new E(function(a,b,c,d,e){if(Array.isArray(b))for(let f=0;f<b.length;f++)Za(a,b[f],c,d,e)},!0);function cb(a){return function(){const b=new oa;Ra(this.g,b,V(a));D(b,b.h.end());const c=new Uint8Array(b.j),d=b.u,e=d.length;let f=0;for(let g=0;g<e;g++){const h=d[g];c.set(h,f);f+=h.length}b.u=[c];return c}};var eb=function(a){var b=new db;if(null!=a){if(!Number.isFinite(a))throw b=Error("enum"),ya(b,"warning"),b;a|=0}return T(b,1,a,0)},db=class extends U{},fb=[0,new E(function(a,b,c){a.G(c,Aa(b))},!1),new E(Ya,!1),-1];db.prototype.B=cb(fb);var gb=class extends U{};gb.L=[1];var hb=[0,bb,fb];gb.prototype.B=cb(hb);var ib=class extends U{};ib.prototype.B=cb([0,ab,-1,hb,$a]);function jb(){let a,b;const c=null!=(b=null==(a=(new URL(kb||window.location.href)).searchParams.get("meet_capture_handle_origins"))?void 0:a.split(",").filter(d=>{try{return(new URL(d)).origin.endsWith(".google.com")}catch(e){return!1}}))?b:[];return 0===c.length?lb:c}let kb="";const lb=["https://meet.google.com"];var mb={exposeToMeetWhenScreensharing:function(a){var b=a.M,c=a.cloudProjectNumber,d=a.additionalData,e=a.mainStageUrl,f=a.sidePanelUrl;a=a.startActivityOnOpen;c||t(ba);var g=new ib;c=S(g,2,O(c));b&&S(c,1,O(b));b=[];d&&!a&&t(ca);e&&!a&&t(ea);if(f){g=b.push;var h=eb(1);f=T(h,2,O(f),"");f=T(f,3,O(d),"");g.call(b,f)}e&&(f=b.push,g=eb(2),e=T(g,2,O(e),""),d=T(e,3,O(d),""),f.call(b,d));d=new gb;e=b;f=d.g;g=f[F];N(g);if(null==e)R(f,g,1);else{b=h=e[F]|0;var k=!!(2&h)||!!(2048&h),q=k||Object.isFrozen(e),p;
|
|
21
|
+
if(p=!q)p=void 0===xa||!1;var v=!0,m=!0;for(let da=0;da<e.length;da++){var w=e[da];k||(w=!!((w.g[F]|0)&2),v&&(v=!w),m&&(m=w))}k||(h|=5,h=v?h|8:h&-9,h=m?h|16:h&-17);if(p||q&&h!==b)e=Array.prototype.slice.call(e),b=0,h=2&g?h|2:h&-3,h=(h|32)&-2049,32&g||(h&=-33);h!==b&&I(e,h);R(f,g,1,e)}null==d&&(d=void 0);d=S(c,3,d);if(null!=a&&"boolean"!==typeof a){var H=typeof a;throw Error(`Expected boolean but got ${"object"!=H?H:a?Array.isArray(a)?"array":H:"null"}: ${a}`);}S(d,4,a);var n;a=c.B();void 0===n&&(n=
|
|
22
|
+
0);if(!B)for(B={},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),d=["+/=","+/","-_=","-_.","-_"],e=0;5>e;e++)for(b=c.concat(d[e].split("")),la[e]=b,f=0;f<b.length;f++)g=b[f],void 0===B[g]&&(B[g]=f);n=la[n];c=Array(Math.floor(a.length/3));d=n[64]||"";for(e=b=0;b<a.length-2;b+=3)h=a[b],k=a[b+1],g=a[b+2],f=n[h>>2],h=n[(h&3)<<4|k>>4],k=n[(k&15)<<2|g>>6],g=n[g&63],c[e++]=""+f+h+k+g;f=0;g=d;switch(a.length-b){case 2:f=a[b+1],g=n[(f&15)<<2]||d;case 1:a=a[b],c[e]=""+n[a>>2]+
|
|
23
|
+
n[(a&3)<<4|f>>4]+g+d}n=c.join("");a=window;a.top===a.self&&(a=l.navigator||null,n={handle:n,permittedOrigins:jb(),exposeOrigin:!0},null==a?0:a.mediaDevices)&&(null==a||null==(H=a.mediaDevices)||H.setCaptureHandleConfig(n))}},X=["meet","addon","screensharing"],Y=l;X[0]in Y||"undefined"==typeof Y.execScript||Y.execScript("var "+X[0]);for(var Z;X.length&&(Z=X.shift());)X.length||void 0===mb?Y=Y[Z]&&Y[Z]!==Object.prototype[Z]?Y[Z]:Y[Z]={}:Y[Z]=mb;}).call(this);
|
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@googleworkspace/meet-addons",
|
|
3
|
+
"description": "The Google Meet Add-ons SDK lets you embed your app into Google Meet as an add-on where users can discover, share, and collaborate in the app without leaving Meet",
|
|
4
|
+
"version": "0.7.0-640139460",
|
|
5
|
+
"repository": "googleworkspace/meet",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
7
|
+
"homepage": "https://developers.google.com/meet/add-ons/guides/overview",
|
|
8
|
+
"author": "Addons Team <meet-addons-support@google.com>",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"google",
|
|
11
|
+
"meet",
|
|
12
|
+
"addon",
|
|
13
|
+
"addons",
|
|
14
|
+
"add-on",
|
|
15
|
+
"add-ons"
|
|
16
|
+
]
|
|
17
|
+
}
|