@googleworkspace/meet-addons 1.2.0-dev-1005108874 → 1.2.0-dev-1007604002

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/meet.addons.d.ts CHANGED
@@ -1,195 +1,5 @@
1
1
 
2
2
 
3
- // Original file: live_sharing.v2.types.d.ts
4
-
5
-
6
- /**
7
- * Binary-encoded state for CoDoing experiences.
8
- */
9
- export interface CoDoingState {
10
- bytes: Uint8Array;
11
- }
12
-
13
-
14
- /**
15
- * Host-provided set of base configuration options.
16
- */
17
- export interface CoActivityDelegate {
18
- /**
19
- * User-suitable string describing the CoActivity.
20
- */
21
- activityTitle: string;
22
- }
23
-
24
-
25
- /**
26
- * Host-provided set of callbacks required to operate a CoDoing experience.
27
- */
28
- export interface CoDoingDelegate extends CoActivityDelegate {
29
- /**
30
- * Callback for state updates broadcast by other participants in the meeting.
31
- *
32
- * Note: This isn't called in response to local changes.
33
- *
34
- * @param update the state update to be applied.
35
- */
36
- onCoDoingStateChanged(newState: CoDoingState): void;
37
- }
38
-
39
-
40
-
41
- /**
42
- * Client-constructed CoDoing experience with hooks for hosts to notify
43
- * of state updates.
44
- */
45
- export interface CoDoingClient {
46
- /**
47
- * Broadcasts state to all other current participants, and is the default
48
- * state for any participant until some other state is broadcast.
49
- *
50
- * **Note:** This shared state is eventually consistent across
51
- * participants. For predictable behavior, this binary state should be
52
- * complete, not partial, as the Meet add-ons SDK doesn't provide
53
- * guarantees around the delivery of individual messages -- only eventual
54
- * consistency.
55
- *
56
- * **Note:** In a race condition where two participants call this method
57
- * simultaneously, the Meet add-ons SDK selects a canonical winning
58
- * update. The losing update might or might not be applied to participants,
59
- * but the winning update is always applied later.
60
- */
61
- broadcastStateUpdate(newState: CoDoingState): void;
62
- }
63
-
64
-
65
-
66
- /**
67
- * Current PlaybackState for CoWatching experiences.
68
- */
69
- export type PlaybackState =
70
- | 'INVALID'
71
- | 'BUFFERING'
72
- | 'PLAY'
73
- | 'PAUSE'
74
- | 'ENDED';
75
-
76
- /**
77
- * State for CoWatching experiences.
78
- */
79
- export interface CoWatchingState {
80
- /**
81
- * The identifier for the media being played.
82
- *
83
- * Note: The actual format only matters to the co-watching app.
84
- */
85
- mediaId: string;
86
-
87
- /** The current position of the media playout, in seconds. */
88
- mediaPlayoutPosition: number;
89
-
90
- /** The current playout rate, where {@code 1.0} is normal speed. */
91
- mediaPlayoutRate: number;
92
-
93
- /** The current player state, such as Paused, Playing, Buffering, etc. */
94
- playbackState: PlaybackState;
95
- }
96
-
97
-
98
-
99
- type CoWatchingQueryResponse = Pick<CoWatchingState, 'mediaPlayoutPosition'>;
100
-
101
-
102
- /**
103
- * Host-provided set of callbacks required to operate a CoWatching experience.
104
- */
105
- export interface CoWatchingDelegate extends CoActivityDelegate {
106
- /**
107
- * Apply the supplied state to media playout, up to and including switching
108
- * to a new media stream if the mediaId changes.
109
- *
110
- * @param state the new state to be applied to the player.
111
- */
112
- onCoWatchingStateChanged(newState: CoWatchingState): void;
113
-
114
- /**
115
- * Return the current state of the local media playout. This is called
116
- * regularly so it should be written to be performant.
117
- *
118
- * @return a {@link CoWatchingState} describing the current state.
119
- */
120
- onCoWatchingStateQuery(): CoWatchingQueryResponse;
121
- }
122
-
123
-
124
-
125
- /**
126
- * Client-constructed CoWatching experience with hooks for hosts to manage the
127
- * state.
128
- */
129
- export interface CoWatchingClient {
130
- /**
131
- * Notify Meet that the user has switched media so Meet can pass that along
132
- * to other users.
133
- *
134
- * @param mediaTitle The title of the media switched to. This title is
135
- * reflected in the Meet UI when other users are considering connecting to
136
- * the co-watching session.
137
- * @param mediaId The string URI of the media switched to.
138
- * @param mediaPlayoutPosition The position at which the media began playout.
139
- */
140
- notifySwitchedToMedia(
141
- mediaTitle: string,
142
- mediaId: string,
143
- mediaPlayoutPosition: number,
144
- ): void;
145
-
146
- /**
147
- * Notify Meet that the user has paused or unpaused the playback of media, so
148
- * Meet can mirror that action for other users.
149
- *
150
- * @param paused The new paused or unpaused state.
151
- */
152
- notifyPauseState(paused: boolean, mediaPlayoutPosition: number): void;
153
-
154
- /**
155
- * Notify Meet that the user has sought the playback point of the media, so
156
- * Meet can mirror that action for other users.
157
- *
158
- * @param mediaPlayoutPosition The timestamp that the user sought.
159
- */
160
- notifySeekToTimestamp(mediaPlayoutPosition: number): void;
161
-
162
- /**
163
- * Notify Meet that the user updated the playout rate of the media to a new
164
- * value (for example, 1.25x).
165
- *
166
- * @param rate The rate at which the media is now being played.
167
- * @param mediaPlayoutPosition The position at which the media began playout
168
- */
169
- notifyPlayoutRate(rate: number, mediaPlayoutPosition: number): void;
170
-
171
- /**
172
- * Notify Meet that the media isn't ready to be played due to
173
- * buffering, a prior media switch, seeking, or normal network
174
- * congestion.
175
- *
176
- * @param mediaPlayoutPosition The timestamp at which the media is paused or
177
- * waiting for buffering to complete.
178
- */
179
- notifyBuffering(mediaPlayoutPosition: number): void;
180
-
181
- /**
182
- * Notify Meet that the buffering is complete and the media is now ready to
183
- * play, starting at the supplied timestamp.
184
- *
185
- * @param mediaPlayoutPosition The timestamp at which the media is buffered
186
- * and is now ready to play.
187
- */
188
- notifyReady(mediaPlayoutPosition: number): void;
189
- }
190
-
191
-
192
-
193
3
  // Original file: index.types.d.ts
194
4
 
195
5
 
@@ -245,7 +55,6 @@ declare global {
245
55
 
246
56
  // Original file: client.types.d.ts
247
57
 
248
-
249
58
  /**
250
59
  * Information about the meeting in which the add-on is running.
251
60
  */
@@ -493,10 +302,4 @@ export interface AddonSession {
493
302
  createMainStageClient(): Promise<MeetMainStageClient>;
494
303
  /** Creates a `SidePanelClient`. */
495
304
  createSidePanelClient(): Promise<MeetSidePanelClient>;
496
- /** Creates a `CoDoingClient`. */
497
- createCoDoingClient(coDoingDelegate: CoDoingDelegate): Promise<CoDoingClient>;
498
- /** Creates a `CoWatchingClient`. */
499
- createCoWatchingClient(
500
- coWatchingDelegate: CoWatchingDelegate,
501
- ): Promise<CoWatchingClient>;
502
305
  }
package/meet.addons.mjs CHANGED
@@ -1,75 +1,53 @@
1
1
  const topLevel = typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : {};(function() {'use strict';var aa=Object.defineProperty;function ba(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ca=ba(this);
2
- function ea(a,b){if(b)a:{var c=ca;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&b!=null&&aa(c,a,{configurable:!0,writable:!0,value:b})}}ea("Symbol.dispose",function(a){return a?a:Symbol("Symbol.dispose")});/*
2
+ function da(a,b){if(b)a:{var c=ca;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&b!=null&&aa(c,a,{configurable:!0,writable:!0,value:b})}}da("Symbol.dispose",function(a){return a?a:Symbol("Symbol.dispose")});/*
3
3
 
4
4
  Copyright The Closure Library Authors.
5
5
  SPDX-License-Identifier: Apache-2.0
6
6
  */
7
- var fa=this||self;function ha(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)}}function ia(a,b){function c(){}c.prototype=b.prototype;a.ra=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.pa=function(d,e,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[e].apply(d,g)}};function ja(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,ja);else{let c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}ia(ja,Error);ja.prototype.name="CustomError";function k(a){fa.setTimeout(()=>{throw a;},0)};var ka,la;a:{for(var ma=["CLOSURE_FLAGS"],na=fa,oa=0;oa<ma.length;oa++)if(na=na[ma[oa]],na==null){la=null;break a}la=na}var pa=la&&la[748402147];ka=pa!=null?pa:!0;function qa(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};const ra=/[-_.]/g,sa={"-":"+",_:"/",".":"="};function ta(a){return sa[a]||""}var ua={};function va(){return wa||(wa=new m(null,ua))}var m=class{constructor(a,b){xa(b);this.h=a;if(a!=null&&a.length===0)throw Error("ByteString should be constructed with non-empty values");}};let wa;function xa(a){if(a!==ua)throw Error("illegal external caller");};function ya(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let za=void 0;function Aa(a){a=Error(a);ya(a,"warning");return a};function Ba(){return typeof BigInt==="function"};function Ca(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var Da=Ca(),Ea=Ca(),Fa=Ca("m_m",!0);const n=Ca("jas",!0);var Ga;const Ha=[];Ha[n]=7;Ga=Object.freeze(Ha);var Ia={};function p(a,b){return b===void 0?a.h!==Ja&&!!(2&(a.m[n]|0)):!!(2&b)&&a.h!==Ja}const Ja={};function Ka(a,b){if(a!=null)if(typeof a==="string")a=a?new m(a,ua):va();else if(a.constructor!==m)if(a!=null&&a instanceof Uint8Array)a=a.length?new m(new Uint8Array(a),ua):va();else{if(!b)throw Error();a=void 0}return a}Object.freeze({});function La(a){a.qa=!0;return a};var Ma=La(a=>typeof a==="number"),Na=La(a=>typeof a==="string"),Oa=La(a=>typeof a==="boolean"),Pa=La(a=>typeof a==="bigint");var Qa=typeof fa.BigInt==="function"&&typeof fa.BigInt(0)==="bigint";function t(a){var b=a;if(Na(b)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(b))throw Error(String(b));}else if(Ma(b)&&!Number.isSafeInteger(b))throw Error(String(b));return Qa?BigInt(a):a=Oa(a)?a?"1":"0":Na(a)?a.trim()||"0":String(a)}var Ra=La(a=>Qa?Pa(a):Na(a)&&/^(?:-?[1-9]\d*|0)$/.test(a)),Xa=La(a=>Qa?a>=Sa&&a<=Ta:a[0]==="-"?Ua(a,Va):Ua(a,Wa));
8
- const Va=Number.MIN_SAFE_INTEGER.toString(),Sa=Qa?BigInt(Number.MIN_SAFE_INTEGER):void 0,Wa=Number.MAX_SAFE_INTEGER.toString(),Ta=Qa?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Ua(a,b){if(a.length>b.length)return!1;if(a.length<b.length||a===b)return!0;for(let c=0;c<a.length;c++){let d=a[c],e=b[c];if(d>e)return!1;if(d<e)return!0}};let u=0,w=0;function Ya(a){var b=a>>>0;u=b;w=(a-b)/4294967296>>>0}function Za(a){if(a<0){Ya(-a);let [b,c]=$a(u,w);u=b>>>0;w=c>>>0}else Ya(a)}function ab(a,b){b>>>=0;a>>>=0;if(b<=2097151)var c=""+(4294967296*b+a);else Ba()?c=""+(BigInt(b)<<BigInt(32)|BigInt(a)):(c=(a>>>24|b<<8)&16777215,b=b>>16&65535,a=(a&16777215)+c*6777216+b*6710656,c+=b*8147497,b*=2,a>=1E7&&(c+=a/1E7>>>0,a%=1E7),c>=1E7&&(b+=c/1E7>>>0,c%=1E7),c=b+bb(c)+bb(a));return c}
9
- function bb(a){a=String(a);return"0000000".slice(a.length)+a}function cb(){var a=u,b=w;if(b&2147483648)if(Ba())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{let [c,d]=$a(a,b);a="-"+ab(c,d)}else a=ab(a,b);return a}function $a(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};function db(a,b=`unexpected value ${a}!`){throw Error(b);};const eb=typeof BigInt==="function"?BigInt.asIntN:void 0,fb=Number.isSafeInteger,gb=Number.isFinite,hb=Math.trunc;function ib(a){if(a==null||typeof a==="number")return a;if(a==="NaN"||a==="Infinity"||a==="-Infinity")return Number(a)}const jb=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function kb(a){switch(typeof a){case "bigint":return!0;case "number":return gb(a);case "string":return jb.test(a);default:return!1}}
10
- function lb(a){if(a!=null){if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;gb(a)}}
11
- function mb(a){var b=void 0;b!=null||(b=1024);if(!kb(a))throw Aa("int64");var c=typeof a;switch(b){case 512:switch(c){case "string":return nb(a);case "bigint":return String(eb(64,a));default:return ob(a)}case 1024:switch(c){case "string":return pb(a);case "bigint":return t(eb(64,a));default:return t(fb(a)?a:ob(a))}case 0:switch(c){case "string":return nb(a);case "bigint":return t(eb(64,a));default:a=hb(a);if(!fb(a)){Za(a);b=u;c=w;if(a=c&2147483648)b=~b+1>>>0,c=~c>>>0,b==0&&(c=c+1>>>0);let d=c*4294967296+
12
- (b>>>0);b=Number.isSafeInteger(d)?d:ab(b,c);a=typeof b==="number"?a?-b:b:a?"-"+b:b}return a}default:return db(b,"Unknown format requested type for int64")}}
13
- function qb(a){var b=a.length;if(a[0]==="-"?b<20||b===20&&a<="-9223372036854775808":b<19||b===19&&a<="9223372036854775807")return a;if(a.length<16)Za(Number(a));else if(Ba())a=BigInt(a),u=Number(a&BigInt(4294967295))>>>0,w=Number(a>>BigInt(32)&BigInt(4294967295));else{b=+(a[0]==="-");w=u=0;let c=a.length;for(let d=b,e=(c-b)%6+b;e<=c;d=e,e+=6){let f=Number(a.slice(d,e));w*=1E6;u=u*1E6+f;u>=4294967296&&(w+=Math.trunc(u/4294967296),w>>>=0,u>>>=0)}if(b){let [d,e]=$a(u,w);u=d;w=e}}return cb()}
14
- function ob(a){a=hb(a);fb(a)?a=String(a):(Za(a),a=cb());return a}function nb(a){var b=hb(Number(a));if(fb(b))return String(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));return qb(a)}function pb(a){var b=hb(Number(a));if(fb(b))return t(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));return Ba()?t(eb(64,BigInt(a))):t(qb(a))}function rb(a){var b=typeof a;if(a==null)return a;if(b==="bigint")return t(eb(64,a));if(kb(a))return b==="string"?pb(a):t(fb(a)?a:ob(a))}
15
- function x(a){if(a!=null&&typeof a!=="string")throw Error();return a}function sb(a,b,c){if(a!=null&&a[Fa]===Ia)return a;if(Array.isArray(a)){var d=a[n]|0;c=d|c&32|c&2;c!==d&&(a[n]=c);return new b(a)}};function tb(a){return a};function ub(a,b,c,d){var e=d!==void 0;d=!!d;var f=[],g=a.length,h=4294967295,l=!1,r=!!(b&64),v=r?b&128?0:-1:void 0;if(!(b&1)){var q=g&&a[g-1];q!=null&&typeof q==="object"&&q.constructor===Object?(g--,h=g):q=void 0;if(r&&!(b&128)&&!e){l=!0;var B;h=((B=vb)!=null?B:tb)(h-v,v,a,q,void 0)+v}}b=void 0;for(e=0;e<g;e++)if(B=a[e],B!=null&&(B=c(B,d))!=null)if(r&&e>=h){let E=e-v,H;((H=b)!=null?H:b={})[E]=B}else f[e]=B;if(q)for(let E in q){a=q[E];if(a==null||(a=c(a,d))==null)continue;g=+E;let H;if(r&&!Number.isNaN(g)&&
16
- (H=g+v)<h)f[H]=a;else{let da;((da=b)!=null?da:b={})[E]=a}}b&&(l?f.push(b):f[h]=b);return f}
17
- function wb(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return Xa(a)?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Array.isArray(a)){var b=a[n]|0;return a.length===0&&b&1?void 0:ub(a,b,wb)}if(a!=null&&a[Fa]===Ia)return xb(a);if(a instanceof m){b=a.h;if(b==null)a="";else if(typeof b==="string")a=b;else{let c="",d=0,e=b.length-10240;for(;d<e;)c+=String.fromCharCode.apply(null,b.subarray(d,d+=10240));c+=String.fromCharCode.apply(null,d?b.subarray(d):
18
- b);b=btoa(c);a=a.h=b}return a}return}return a}let vb;function xb(a){a=a.m;return ub(a,a[n]|0,wb)};function yb(a,b,c,d=0){if(a==null){var e=32;c?(a=[c],e|=128):a=[];b&&(e=e&-16760833|(b&1023)<<14)}else{if(!Array.isArray(a))throw Error("narr");e=a[n]|0;if(ka&&1&e)throw Error("rfarr");2048&e&&!(2&e)&&zb();if(e&256)throw Error("farr");if(e&64)return(e|d)!==e&&(a[n]=e|d),a;if(c&&(e|=128,c!==a[0]))throw Error("mid");a:{c=a;e|=64;var f=c.length;if(f){var g=f-1;let l=c[g];if(l!=null&&typeof l==="object"&&l.constructor===Object){b=e&128?0:-1;g-=b;if(g>=1024)throw Error("pvtlmt");for(var h in l)if(f=+h,
19
- f<g)c[f+b]=l[h],delete l[h];else break;e=e&-16760833|(g&1023)<<14;break a}}if(b){h=Math.max(b,f-(e&128?0:-1));if(h>1024)throw Error("spvt");e=e&-16760833|(h&1023)<<14}}}a[n]=e|64|d;return a}function zb(){if(ka)throw Error("carr");if(Ea!=null){var a;var b=(a=za)!=null?a:za={};a=b[Ea]||0;a>=5||(b[Ea]=a+1,b=Error(),ya(b,"incident"),k(b))}};function Ab(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){var c=a[n]|0;a.length===0&&c&1?a=void 0:c&2||(!b||4096&c||16&c?a=Bb(a,c,!1,b&&!(c&16)):(a[n]|=34,c&4&&Object.freeze(a)));return a}if(a!=null&&a[Fa]===Ia)return b=a.m,c=b[n]|0,p(a,c)?a:Cb(a,b,c)?Db(a,b):Bb(b,c);if(a instanceof m)return a}function Db(a,b,c){a=new a.constructor(b);c&&(a.h=Ja);a.B=Ja;return a}function Bb(a,b,c,d){d!=null||(d=!!(34&b));a=ub(a,b,Ab,d);d=32;c&&(d|=2);b=b&16769217|d;a[n]=b;return a}
20
- function Eb(a){var b=a.m,c=b[n]|0;return p(a,c)?Cb(a,b,c)?Db(a,b,!0):new a.constructor(Bb(b,c,!1)):a}function Fb(a){if(a.h!==Ja)return!1;var b=a.m;b=Bb(b,b[n]|0);b[n]|=2048;a.m=b;a.h=void 0;a.B=void 0;return!0}function Gb(a){if(!Fb(a)&&p(a,a.m[n]|0))throw Error();}function Hb(a,b){b===void 0&&(b=a[n]|0);b&32&&!(b&4096)&&(a[n]=b|4096)}function Cb(a,b,c){return c&2?!0:c&32&&!(c&4096)?(b[n]=c|2,a.h=Ja,!0):!1};const Ib=t(0);function y(a,b,c,d){a=Jb(a.m,b,c,d);if(a!==null)return a}function Jb(a,b,c,d){if(b===-1)return null;var e=b+(c?0:-1),f=a.length-1;if(!(f<1+(c?0:-1))){if(e>=f){var g=a[f];if(g!=null&&typeof g==="object"&&g.constructor===Object){c=g[b];var h=!0}else if(e===f)c=g;else return}else c=a[e];if(d&&c!=null){d=d(c);if(d==null)return d;if(!Object.is(d,c))return h?g[b]=d:a[e]=d,d}return c}}function Kb(a,b,c){Gb(a);var d=a.m;z(d,d[n]|0,b,c);return a}
21
- function z(a,b,c,d){var e=c+-1,f=a.length-1;if(f>=0&&e>=f){let g=a[f];if(g!=null&&typeof g==="object"&&g.constructor===Object)return g[c]=d,b}if(e<=f)return a[e]=d,b;if(d!==void 0){let g;f=((g=b)!=null?g:b=a[n]|0)>>14&1023||536870912;c>=f?d!=null&&(a[f+-1]={[c]:d}):a[e]=d}return b}function Lb(a,b,c){b=A(a,c)===b?b:-1;a=Jb(a.m,b);return a!=null&&a[Fa]===Ia||Array.isArray(a)}function Mb(a){return!!(2&a)&&!!(4&a)||!!(256&a)}function Nb(a){return Ka(a,!0)}
22
- function C(a,b,c,d){Gb(a);var e=a.m;z(e,e[n]|0,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}function A(a,b){a=a.m;return Ob(Pb(a),a,void 0,b)}function Pb(a){var b;return(b=a[Da])!=null?b:a[Da]=new Map}function Ob(a,b,c,d){var e=a.get(d);if(e!=null)return e;e=0;for(let f=0;f<d.length;f++){let g=d[f];Jb(b,g)!=null&&(e!==0&&(c=z(b,c,e)),e=g)}a.set(d,e);return e}function Qb(a,b,c,d){var e=!1;d=Jb(a,d,void 0,f=>{var g=sb(f,c,b);e=g!==f&&g!=null;return g});if(d!=null)return e&&!p(d)&&Hb(a,b),d}
23
- function Rb(a,b,c){var d=a.m,e=d[n]|0;b=Qb(d,e,b,c);if(b==null)return b;e=d[n]|0;if(!p(a,e)){let f=Eb(b);f!==b&&(Fb(a)&&(d=a.m,e=d[n]|0),b=f,e=z(d,e,c,b),Hb(d,e))}return b}function Sb(a){a==null&&(a=void 0);return a}function Tb(a,b,c){c=Sb(c);Kb(a,b,c);c&&!p(c)&&Hb(a.m);return a}
24
- function D(a,b,c,d){d=Sb(d);a:{var e=d;Gb(a);let h=a.m;var f=h[n]|0;if(e==null){var g=Pb(h);if(Ob(g,h,f,c)===b)g.set(c,0);else break a}else{g=h;let l=Pb(g),r=Ob(l,g,f,c);r!==b&&(r&&(f=z(g,f,r)),l.set(c,b))}z(h,f,b,e)}d&&!p(d)&&Hb(a.m);return a}
25
- function Ub(a,b){Gb(a);var c=a.m,d=c[n]|0;if(b==null)return z(c,d,1),a;var e=b===Ga?7:b[n]|0,f=e,g=Mb(e),h=g||Object.isFrozen(b),l=!0,r=!0;for(let q=0;q<b.length;q++){var v=b[q];g||(v=p(v),l&&(l=!v),r&&(r=v))}g||(e=l?13:5,e=r?e&-4097:e|4096);h&&e===f||(b=[...b],f=0,e=Vb(e,d));e!==f&&(b[n]=e);d=z(c,d,1,b);2&e||!(4096&e||16&e)||Hb(c,d);return a}function Vb(a,b){return a=(2&b?a|2:a&-3)&-273}function Wb(a){a=y(a,1);a=a==null||typeof a==="boolean"?a:typeof a==="number"?!!a:void 0;return a!=null?a:!1}
26
- function Xb(a){a=y(a,1,void 0,rb);return a!=null?a:Ib}function F(a,b){a=y(a,b);a=a==null||typeof a==="string"?a:void 0;return a!=null?a:""}function G(a,b){a=y(a,b);a=a==null?a:gb(a)?a|0:void 0;return a!=null?a:0}function I(a,b,c,d){c=A(a,d)===c?c:-1;return Rb(a,b,c)}function Yb(a,b){return C(a,1,b==null?b:mb(b),"0")}function J(a,b,c){if(c!=null){if(!gb(c))throw Aa("enum");c|=0}return C(a,b,c,0)};function Zb(){var a=$b||($b=ac("[1,2,0]"));a=Eb(a);a=Kb(a,4,x("dev-1005108874"));var b=a.m,c=b[n]|0;return p(a,c)?a:Cb(a,b,c)?Db(a,b):new a.constructor(Bb(b,c,!0))}var K=class{constructor(a){this.m=yb(a,void 0,void 0,2048)}toJSON(){return xb(this)}};K.prototype[Fa]=Ia;K.prototype.toString=function(){return this.m.toString()};function bc(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[n]|=32;b=new a(b)}return b}};var ac=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 "+(c!="object"?c:b?Array.isArray(b)?"array":c:"null")+": "+b);}b[n]|=34;return new a(b)}}(class extends K{});var cc=class extends K{};function dc(a){var b=new ec(500),c=0,d;return(...e)=>{fc(b)?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;var f;(f=d)==null||f()},hc(b))))}}function ic(a){var b=new ec(100),c=Promise.resolve();return(...d)=>fc(b)?a(...d):c};function fc(a){return jc(a,a.index)>=a.h?(a.i[a.index]=Date.now(),a.index=(a.index+1)%1,!0):!1}function hc(a){var b=a.h;a=jc(a,a.index);return a>=b?0:b-a}function jc(a,b){var c;return Date.now()-((c=a.i[b])!=null?c:-1*a.h)}var ec=class{constructor(a){this.h=a;this.i=[];this.index=0}};var kc=class extends K{},lc=[2,3];var mc=class extends K{};var L=class extends Error{constructor({errorType:a,message:b,j:c}){super(`Meet add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},M={errorType:"InternalError",message:"An unexpected error has occurred.",j:"No further information is available."},nc={errorType:"MissingUrlParameter",message:"Missing required Meet SDK URL parameter",j:"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)."},
27
- oc={errorType:"NeedsMainStageContext",message:"This method can only be invoked if the addon is running in the main stage.",j:"Use getFrameType to check whether the addon is running in the main stage before invoking this method."},pc={errorType:"NeedsSidePanelContext",message:"This method can only be invoked if the addon is running in the side panel.",j:"Use getFrameType to check whether the addon is running in the side panel before invoking this method."},qc={errorType:"NotSupportedInStandalone",
28
- message:"This method is not supported in standalone mode.",j:"Do not call this method in standalone mode."},rc={errorType:"MustBeIframed",message:"The SDK must be run in an iframe as part of a Google Meet add-on.",j:"See https://developers.google.com/meet/add-ons/guides/deploy-add-on to deploy to Meet."},sc={errorType:"InternalError",message:"The frame type URL parameter is set to an unexpected value.",j:"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)."},
29
- tc={errorType:"InvalidCloudProjectNumber",message:"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.",j:"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."},vc={errorType:"DestinationNotReady",
30
- message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",j:"Make sure the destination frame has connected before sending messages to it."},wc={errorType:"InvalidActivityStartingState",message:"Origin of the ActivityStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",j:"Ensure that the ActivityStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},xc={errorType:"ActivityStartingStateMissingAttributes",
31
- message:"The supplied ActivityStartingState object does not contain any recognized attributes.",j:"Ensure that the ActivityStartingState object contains at least one of the following attributes: mainStageUrl, sidePanelUrl, additionalData."},yc={errorType:"ActivityStartingStateUnrecognizedAttributes",message:"The supplied ActivityStartingState object contains attributes that are not recognized.",j:"Ensure that the ActivityStartingState object has only the following attributes: mainStageUrl, sidePanelUrl, additionalData."},
32
- zc={errorType:"AddonStartingStateMissingAttributes",message:"The supplied AddonStartingState object does not contain any recognized attributes.",j:"Ensure that the AddonStartingState object contains at least one of the following attributes: sidePanelUrl, additionalData."},Ac={errorType:"AddonStartingStateUnrecognizedAttributes",message:"The supplied AddonStartingState object contains attributes that are not recognized.",j:"Ensure that the AddonStartingState object has only the following attributes: sidePanelUrl, additionalData."},
33
- Bc=a=>({errorType:"ArgumentNullError",message:`The argument supplied for '${a}' was 'null' but a value was expected.`,j:"Ensure you are passing a value of the expected type for the argument."}),N=(a,b,c)=>({errorType:"ArgumentTypeError",message:`The type '${b}' of argument supplied for '${a}' did not match the expected type '${c}'.`,j:"Ensure the type of the argument provided matches the expected type."}),Cc=a=>({errorType:"InternalError",message:`Could not connect to ${a} channel. Unknown error`,
34
- j:"No further information is available."}),Dc={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",j:"Ensure that no activity is ongoing."},Ec={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",j:"Send one of the available commands in the frame message."},Fc={errorType:"NoActivityFound",message:"No activity found.",j:"Ensure that the activity is started before performing this operation."},Gc={errorType:"RequiresEapEnrollment",
35
- message:"This feature is only available to early access partners.",j:"Meet add-on early access enrollment is currently closed."},Hc={errorType:"UserNotInitiator",message:"Operation cannot be performed because the user is not the initiator of the current activity.",j:"Ensure that the user is the initiator of the current activity or that the activity has ended."},Ic={errorType:"SizeLimitExceededActivityStartingState",message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",
36
- j:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Jc={errorType:"SizeLimitExceededFrameToFrameMessage",message:"The size of the frame to frame message exceeds the limits allowed.",j:"Ensure that the frame to frame message size is less than 1,000,000 characters."},Kc={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",j:"Only instantiate the AddonSession once."},Lc={errorType:"UserCancelled",
37
- message:"The user cancelled starting an activity.",j:"The user needs to click continue to start the activity."},Mc={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",j:"Do not call this method during a Meet call."},Nc={errorType:"InvalidAddonStartingState",message:"Origin of the AddonStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",j:"Ensure that the AddonStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},
38
- Oc={errorType:"SizeLimitExceededAddonStartingState",message:"The size of the AddonStartingState URLs and/or its data exceed the limits allowed.",j:"Ensure that the AddonStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Pc={errorType:"MeetingPolicyPreventsStartingActivity",message:"A meeting policy (such as using host control settings) prevents the user from starting the activity.",j:"Have a meeting host or administrator modify the necessary settings to allow the current user to start the activity."};
39
- function Qc(a){switch(a){case 0:return M;case 1:return vc;case 2:return wc;case 3:return Dc;case 4:return Ec;case 5:return Gc;case 6:return qc;case 7:return Hc;case 8:return Ic;case 9:return Jc;case 10:return Lc;case 11:return Mc;case 12:return Nc;case 13:return Oc;case 14:return Fc;case 15:return Pc;default:return M}}
40
- function Rc(a){var b,c=(b=G(a,1))!=null?b:0;a=Sc(A(a,lc));switch(c){case 1:return{errorType:"InternalError",message:`Could not connect to ${a} channel. Meet did not respond with a MessagePort.`,j:"No further information is available."};case 2:return{errorType:"InternalError",message:`Could not connect to ${a}. A conflicting ${a} exists.`,j:"No further information is available."};case 3:return{errorType:"InternalError",message:`Could not connect to ${a} channel. The addon does not have permission to open a ${a}.`,
41
- j:"This method might require EAP enrollment."};case 4:return{errorType:"InternalError",message:`Could not connect to ${a} channel. The addon is not authorized for this ${a}.`,j:"No further information is available."};case 0:return Cc(a);case 5:a:switch(a){case "co":c={errorType:"InternalError",message:`Could not connect to ${a} channel. The coActivity was not found.`,j:`Consider starting the ${a} only after after the startActivity promise returns.`};break a;default:c={errorType:"InternalError",message:`Could not connect to ${a} channel.`,
42
- j:"No further information is available."}}return c;default:return Cc(a)}}function Sc(a){switch(a){case 2:return"co";case 3:return"gd";case 0:return"unknown";default:return"unknown"}}function O({errorType:a,message:b,j:c},d=""){throw new L({errorType:a,message:d?`${b} ${d}`:b,j:c});}function Tc(a,b){O({...nc,message:`${nc.message}: ${a}. In URL ${b}`})};function Uc(a){var b=new Vc;return J(b,1,a)}function Wc(a,b){return C(a,2,x(b),"")}function Xc(a,b){return C(a,3,x(b),"")}var Vc=class extends K{getFrameType(){return G(this,1)}};function Yc(a){var b=a.m,c=b;b=b[n]|0;var d=Vc,e=!p(a,b);e&&Fb(a)&&(c=a.m,b=c[n]|0);a=Jb(c,1);var f=Array.isArray(a)?a:Ga,g=f===Ga?7:f[n]|0;a=g;2&b&&(a|=2);var h=a|1;if(a=!(4&h)){var l=f,r=b;let v=!!(2&h);v&&(r|=2);let q=!v,B=!0,E=0,H=0;for(;E<l.length;E++){let da=sb(l[E],d,r);if(da instanceof d){if(!v){let uc=p(da);q&&(q=!uc);B&&(B=uc)}l[H++]=da}}H<E&&(l.length=H);h|=4;h=B?h&-4097:h|4096;h=q?h|8:h&-9}h!==g&&(f[n]=h,2&h&&Object.freeze(f));if(e&&!(8&h||!f.length&&(2&h||!(16&h)&&32&b))){Mb(h)&&(f=[...f],
43
- h=Vb(h,b),b=z(c,b,1,f));d=f;e=h;for(g=0;g<d.length;g++)l=d[g],h=Eb(l),l!==h&&(d[g]=h);e|=8;h=e=d.length?e|4096:e&-4097;f[n]=h}e=d=h;Mb(d)||(2&d||!(16&d)&&32&b?(d|=!f.length||a&&!(4096&d)||32&b&&!(4096&d||16&d)?2:256,d!==e&&(f[n]=d),Object.freeze(f)):(d|=16,d!==e&&(f[n]=d)));2&d||!(4096&d||16&d)||Hb(c,b);return f}function Zc(a){var b=new $c;return Ub(b,a)}var $c=class extends K{};var ad=class extends K{};function bd(a){return Rb(a,$c,1)}var cd=class extends K{};var dd=class extends K{};var ed=class extends K{};var fd=class extends K{};var gd=class extends K{getMeetPlatformInfo(){return Rb(this,ed,1)}};var hd=class extends K{getMeetingInfo(){return Rb(this,fd,1)}};var id=class extends K{},P=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21];var jd=class extends K{};var kd=class extends K{};var ld=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),md=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function nd(a){a&&typeof a.dispose=="function"&&a.dispose()};function Q(){this.u=this.u;this.h=this.h}Q.prototype.u=!1;Q.prototype.dispose=function(){this.u||(this.u=!0,this.I())};Q.prototype[Symbol.dispose]=function(){this.dispose()};function od(a,b){a.u?b():(a.h||(a.h=[]),a.h.push(b))}Q.prototype.I=function(){if(this.h)for(;this.h.length;)this.h.shift()()};function pd({K:a,S:b}){if(a===null)throw new L(Bc("activityStartingState"));if(b||a!==void 0){if(typeof a!=="object")throw new L(N("activityStartingState",typeof a,`object${b?"":" | undefined"}`));if(a.mainStageUrl!==void 0&&typeof a.mainStageUrl!=="string")throw new L(N("mainStageUrl",typeof a.mainStageUrl,"string | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new L(N("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!==
44
- "string")throw new L(N("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new L(yc);if(Object.keys(a).length===0)throw new L(xc);}}function qd(a){var b=[];b.push(Xc(Wc(Uc(2),a.mainStageUrl),a.additionalData));b.push(Xc(Wc(Uc(1),a.sidePanelUrl),a.additionalData));return b}
45
- var zd=class extends Q{constructor(a){super();this.context=a;this.i={};rd(this.context.h.U,b=>{switch(A(b.content,P)){case 7:let d=this.i.frameToFrameMessage;b=I(b.content,dd,7,P);if(d&&b){var c=G(b,1);c=ld.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:F(b,2)})}}},this)}async getMeetingInfo(){var a=await sd(this.context.h);var b=a.getMeetingInfo();b=F(b,1);a=a.getMeetingInfo();a=F(a,2);return{meetingId:b,meetingCode:a}}async getFrameOpenReason(){var a,b=(a=this.context.i.fa)!=
46
- null?a:0,c;return(c=md.get(b))!=null?c:"UNKNOWN"}async getActivityStartingState(){var a=bd(await td(this.context.h)),b=a==null?void 0:Yc(a).find(c=>c.getFrameType()===2);a=a==null?void 0:Yc(a).find(c=>c.getFrameType()===1);a==null||F(a,3);b==null||F(b,3);return{mainStageUrl:(b==null?void 0:F(b,2))||void 0,sidePanelUrl:(a==null?void 0:F(a,2))||void 0,additionalData:(a==null?void 0:F(a,3))||void 0}}async setActivityStartingState(a){pd({K:a,S:!0});var b=qd(a);a=ud;var c=this.context.h;var d=new jd;b=
47
- Zc(b);d=Tb(d,1,b);await a(c,d)}on(a,b){this.i[a]=b}async getMeetPlatformInfo(){var a=(await vd(this.context.h)).getMeetPlatformInfo();return{isMeetHardware:Wb(a)}}async closeAddon(){await wd(this.context.h)}async startActivity(a){pd({K:a,S:!1});var b=new kd;a&&(a=qd(a),a=Zc(a),Tb(b,1,a));await xd(this.context.h,b)}async endActivity(a){var b=yd,c=this.context.h,d=new ad;a=J(d,1,a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0);await b(c,a)}};var Ad=bc(class extends K{getFrameOpenReason(){return G(this,5)}});function Bd(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");if(c)b=Ad(atob(c));else{var d;((d=window.top)!=null?d:window)===window?O(rc):Tc("meet_sdk",b);b=void 0}(c=F(b,1))||Tc("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new L(sc);(d=F(b,2))||Tc("meet_control_channel_name",a);var e=F(b,4);e||Tc("addon_cloud_project_number",a);var f;a=(f=b.getFrameOpenReason())!=null?f:0;f=F(b,3)||"https://meet.google.com";return{fa:a,frameType:c,
48
- ea:d,cloudProjectNumber:e,T:f}};var Cd=class extends K{};var Dd=class extends K{};var Ed=class extends K{};function Fd(){var a=new Gd,b=new Ed;return D(a,1,Hd,b)}var Gd=class extends K{},Hd=[1,2];function Id(a){var b=new Jd;return Tb(b,2,a)}function Kd(a,b){return C(a,3,x(b),"")}var Jd=class extends K{};var Ld=class extends K{};var Md=class extends K{};var Nd=class extends K{};var Od=class extends K{};var Pd=class extends K{};var Qd=class extends K{};var Rd=class extends K{setAddonStartingState(a){return Tb(this,1,a)}};var Sd=class extends K{};function Td(a,b){return D(a,2,R,b)}var S=class extends K{},R=[1,2,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20];function Ud(a){return I(a,id,2,Vd)}var Wd=class extends K{},Xd=bc(Wd),Vd=[1,2];class Yd{constructor(a,b){this.data=a;this.channel=b}};var Zd=Promise;function $d(a){var b=new MessageChannel;ae(b.port1,a);return b}function be(a,b){ae(a,b);return new ce(a)}class ce{constructor(a){this.h=a}send(a,b,c=[]){b=$d(b);this.h.postMessage(a,[b.port2].concat(c))}F(a,b){return new Zd(c=>{this.send(a,c,b)})}}function ae(a,b){b&&(a.onmessage=c=>{var d=c.data;c=be(c.ports[0]);b(new Yd(d,c))})};var de=typeof AsyncContext!=="undefined"&&typeof AsyncContext.Snapshot==="function"?a=>a&&AsyncContext.Snapshot.wrap(a):a=>a;function ee(a,b){a.o(b);a.i<100&&(a.i++,b.next=a.h,a.h=b)}class fe{constructor(a,b){this.l=a;this.o=b;this.i=0;this.h=null}get(){if(this.i>0){this.i--;var a=this.h;this.h=a.next;a.next=null}else a=this.l();return a}};function ge(){var a=he,b=null;a.h&&(b=a.h,a.h=a.h.next,a.h||(a.i=null),b.next=null);return b}class ie{constructor(){this.i=this.h=null}add(a,b){var c=je.get();c.set(a,b);this.i?this.i.next=c:this.h=c;this.i=c}}var je=new fe(()=>new ke,a=>a.reset());class ke{constructor(){this.next=this.h=this.i=null}set(a,b){this.i=a;this.h=b;this.next=null}reset(){this.next=this.h=this.i=null}};let le,me=!1,he=new ie,oe=(a,b)=>{le||ne();me||(le(),me=!0);he.add(a,b)},ne=()=>{var a=Promise.resolve(void 0);le=()=>{a.then(pe)}};function pe(){for(var a;a=ge();){try{a.i.call(a.h)}catch(b){k(b)}ee(je,a)}me=!1};function qe(){};function T(a){this.h=0;this.Y=void 0;this.o=this.i=this.l=null;this.v=this.B=!1;if(a!=qe)try{let b=this;a.call(void 0,function(c){re(b,2,c)},function(c){re(b,3,c)})}catch(b){re(this,3,b)}}function se(){this.next=this.context=this.i=this.o=this.h=null;this.l=!1}se.prototype.reset=function(){this.context=this.i=this.o=this.h=null;this.l=!1};var te=new fe(function(){return new se},function(a){a.reset()});function ue(a,b,c){var d=te.get();d.o=a;d.i=b;d.context=c;return d}
49
- function ve(){var a,b,c=new T(function(d,e){a=d;b=e});return new we(c,a,b)}T.prototype.then=function(a,b,c){return xe(this,de(typeof a==="function"?a:null),de(typeof b==="function"?b:null),c)};T.prototype.$goog_Thenable=!0;function ye(a,b){b=de(b);b=ue(b,b);b.l=!0;ze(a,b)}T.prototype.cancel=function(a){if(this.h==0){let b=new U(a);oe(function(){Ae(this,b)},this)}};
50
- function Ae(a,b){if(a.h==0)if(a.l){var c=a.l;if(c.i){var d=0,e=null,f=null;for(let g=c.i;g&&(g.l||(d++,g.h==a&&(e=g),!(e&&d>1)));g=g.next)e||(f=g);e&&(c.h==0&&d==1?Ae(c,b):(f?(d=f,d.next==c.o&&(c.o=d),d.next=d.next.next):Be(c),Ce(c,e,3,b)))}a.l=null}else re(a,3,b)}function ze(a,b){a.i||a.h!=2&&a.h!=3||De(a);a.o?a.o.next=b:a.i=b;a.o=b}
51
- function xe(a,b,c,d){var e=ue(null,null,null);e.h=new T(function(f,g){e.o=b?function(h){try{let l=b.call(d,h);f(l)}catch(l){g(l)}}:f;e.i=c?function(h){try{let l=c.call(d,h);l===void 0&&h instanceof U?g(h):f(l)}catch(l){g(l)}}:g});e.h.l=a;ze(a,e);return e.h}T.prototype.Z=function(a){this.h=0;re(this,2,a)};T.prototype.aa=function(a){this.h=0;re(this,3,a)};
52
- function re(a,b,c){if(a.h==0){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.h=1;a:{var d=c,e=a.Z,f=a.aa;if(d instanceof T){ze(d,ue(e||qe,f||null,a));var g=!0}else{if(d)try{var h=!!d.$goog_Thenable}catch(l){h=!1}else h=!1;if(h)d.then(e,f,a),g=!0;else{h=typeof d;if(h=="object"&&d!=null||h=="function")try{let l=d.then;if(typeof l==="function"){Ee(d,l,e,f,a);g=!0;break a}}catch(l){f.call(a,l);g=!0;break a}g=!1}}}g||(a.Y=c,a.h=b,a.l=null,De(a),b!=3||c instanceof U||Fe(a,c))}}
53
- function Ee(a,b,c,d,e){function f(l){h||(h=!0,d.call(e,l))}function g(l){h||(h=!0,c.call(e,l))}var h=!1;try{b.call(a,g,f)}catch(l){f(l)}}function De(a){a.B||(a.B=!0,oe(a.oa,a))}function Be(a){var b=null;a.i&&(b=a.i,a.i=b.next,b.next=null);a.i||(a.o=null);return b}T.prototype.oa=function(){for(var a;a=Be(this);)Ce(this,a,this.h,this.Y);this.B=!1};
54
- function Ce(a,b,c,d){if(c==3&&b.i&&!b.l)for(;a&&a.v;a=a.l)a.v=!1;if(b.h)b.h.l=null,Ge(b,c,d);else try{b.l?b.o.call(b.context):Ge(b,c,d)}catch(e){He.call(null,e)}ee(te,b)}function Ge(a,b,c){b==2?a.o.call(a.context,c):a.i&&a.i.call(a.context,c)}function Fe(a,b){a.v=!0;oe(function(){a.v&&He.call(null,b)})}var He=k;function U(a){ja.call(this,a)}ia(U,ja);U.prototype.name="cancel";function we(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let Ie=1,Je=new WeakMap;function Ke(a,b,c){var d=Le;a.i.has(b);d(b,c)}var Ne=class extends Q{constructor(){super();this.i=new Set}signal(){var a=new Me;this.i.add(a);od(this,ha(nd,a));return a}};function Le(a,b){return new Promise(c=>{Oe(()=>{a.M&&(a.ha=b,a.R=!0);for(let {J:d,slot:e}of a.A.values())try{e(b,{signal:a,J:d})}catch(f){k(f)}for(let d of a.D)d.resolve(b);a.D.clear();c()})})}function rd(a,b,c){var d=Ie++;Oe(()=>{Pe(a,d,b,c)})}
55
- function Pe(a,b,c,d){if(!a.u)if(d){if(!d.u){let e=()=>{Oe(()=>{a.A.delete(b);var f=Je.get(d);f&&qa(f,e)})};a.A.set(b,{J:b,slot:c,H:e});Qe(d,e)}}else a.A.set(b,{J:b,slot:c,H:()=>a.A.delete(b)})}
56
- var Me=class extends Q{constructor(){super();this.M=!1;this.A=new Map;this.D=new Set;this.R=!1}detach(a){Oe(()=>{var b=this.A.get(a);b&&b.H()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){var c=ve();Oe(()=>{if(this.u)c.reject(new U("Signal initially disposed"));else if(b&&b.u)c.reject(new U("Owner initially disposed"));else if(a&&this.M&&this.R)c.resolve(this.ha);else if(this.D.add(c),ye(c.promise,()=>{this.D.delete(c)}),b){let d=()=>{c.reject(new U("Owner asynchronously disposed"))};
57
- ye(c.promise,()=>{var e=Je.get(b);e&&qa(e,d)});Qe(b,d)}});return c.promise}I(){super.I();Oe(()=>{for(let {H:a}of this.A.values())a();this.A.clear();for(let a of this.D)a.reject(new U("Signal asynchronously disposed"));this.D.clear()})}};const Re=[];let Se=!1;function Oe(a){Re.push(a);Te()}async function Te(){if(!Se)try{Se=!0;let a=Ue(0);for(;a<Re.length;)await Promise.resolve(),a=Ue(a)}catch(a){k(a)}finally{Re.length=0,Se=!1}}
58
- function Ue(a){for(var b=a+100;a<b&&a<Re.length;)try{Re[a++]()}catch(c){k(c)}return a}function Qe(a,b){if(a.u)b();else{var c=Je.get(a);if(c)c.push(b);else{let d=[b];Je.set(a,d);od(a,()=>{for(let e of[...d])e();Je.delete(a)})}}};function V(a){var b=new Wd;a=D(b,1,Vd,a);return{content:JSON.stringify(xb(a))}}const Ve=new Ne;function We(a,b){var c=Ve.signal();return{channel:be(a,d=>{var e=b(d.data);Ke(Ve,c,{content:e,na:d})}),signal:c}};let $b;var Xe=class extends K{};var Ye=class extends K{};var $e=class extends K{l(){return I(this,Xe,2,Ze)}i(){return Lb(this,2,Ze)}o(){return I(this,Ye,3,Ze)}v(){return Lb(this,3,Ze)}},Ze=[2,3];var af=bc(class extends K{});var bf=bc(class extends K{}),cf=[1,2];var df=({destination:a,origin:b,sa:c,ba:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");var f=$d(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return be(f.port1,e)};function ef(a,b,c){var d=new Ne,e=d.signal();a=df({destination:window.parent,origin:b,ba:a,onMessage:f=>{var g=Xd(f.data.content);A(g,Vd)===2&&Ke(d,e,{content:Ud(g),na:f,messagePort:f.data.messagePort})}});return new ff(e,a,c)}async function sd(a){var b=W;var c=new S;var d=new Nd;c=D(c,19,R,d);a=await b(a,V(c));var e;return(e=Ud(Xd(a.data.content)))==null?void 0:I(e,hd,20,P)}
59
- async function td(a){var b=W;var c=new S;var d=new Dd;c=D(c,17,R,d);a=await b(a,V(c));var e;return(e=Ud(Xd(a.data.content)))==null?void 0:I(e,cd,18,P)}async function ud(a,b){var c=W,d=new S;b=D(d,8,R,b);await c(a,V(b))}async function vd(a){var b=W;var c=new S;var d=new Md;c=D(c,18,R,d);a=await b(a,V(c));var e;return(e=Ud(Xd(a.data.content)))==null?void 0:I(e,gd,19,P)}async function wd(a){var b=W;var c=new S;var d=new Cd;c=D(c,11,R,d);await b(a,V(c))}
60
- async function xd(a,b){var c=W,d=new S;b=D(d,14,R,b);await c(a,V(b))}async function yd(a,b){var c=W,d=new S;b=D(d,15,R,b);await c(a,V(b))}async function gf(a){await a.i()}
61
- async function W(a,b){(a=await a.channel.F(b))||O(M,`Falsy response received from the message channel. ${JSON.stringify(a)}`);(b=a.data)||O(M,`Data field in the response from the message channel is falsy. ${JSON.stringify(b)}`);(b=b.content)||O(M,`Content field in the response from the message channel is falsy. ${JSON.stringify(b)}`);var c=void 0;try{c=Xd(b)}catch(d){O(M,`The ControlMessage can't be deserialized. ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=Ud(c))||O(M,`MeetToAddonMessage field on ControlMessage is falsy. ${JSON.stringify(b)}`);
62
- b=b==null?void 0:I(b,mc,10,P);if((b==null?void 0:G(b,1))!==void 0)throw a=G(b,1),new L(Qc(a));return a}async function hf(a,b,c){var d=W,e=new S;b=D(e,1,R,b);d=await d(a,V(b));a=d.data.messagePort;var f;(d=(f=Ud(Xd(d.data.content)))==null?void 0:I(f,kc,1,P))!=null?f=d:(f=new kc,f=J(f,1,0));return{channel:a?We(a,c):void 0,response:f}}async function jf(a){var b=Fd(),{channel:c,response:d}=await hf(a,b,e=>bf(e));if(!c)throw new L(Rc(d));return c}
63
- async function kf(a){var b=W;var c=new S;var d=new Sd;c=D(c,5,R,d);await b(a,V(c))}async function lf(a){var b=W;var c=new S;var d=new Ld;c=D(c,6,R,d);await b(a,V(c))}async function mf(a,b,c){var d=W,e=new S,f=new Od;b=J(f,1,b);c=C(b,2,x(c),"");e=D(e,7,R,c);await d(a,V(e))}async function nf(a,b){var c=W,d=new S;b=D(d,16,R,b);await c(a,V(b))}
64
- class ff extends Q{constructor(a,b,c){super();this.U=a;this.channel=b;this.i=ic(async()=>{var d=this.channel,e=d.F;var f=new S;var g=new Pd;f=D(f,13,R,g);await e.call(d,V(f))});a=Zb();F(a,4);lb(y(a,1));lb(y(a,2));lb(y(a,3));c=Td(new S,Kd(Id(a),c));this.channel.send(V(c));rd(this.U,async d=>{switch(A(d.content,P)){case 16:await gf(this)}},this)}};let of;var pf=class{constructor(a){var b=of;this.i=a;this.h=b}delete(){throw Error("Not implemented.");}};var rf=class extends K{l(){return I(this,Xe,2,qf)}i(){return Lb(this,2,qf)}o(){return I(this,Ye,3,qf)}v(){return Lb(this,3,qf)}},qf=[2,3];var sf=class extends K{};var tf=class extends K{};var uf=class extends K{};var wf=class extends K{l(){return I(this,Xe,2,vf)}i(){return Lb(this,2,vf)}o(){return I(this,Ye,3,vf)}v(){return Lb(this,3,vf)}},vf=[2,3],xf=[5,6];var yf=class extends K{};var zf=class extends K{},Af=[1,2,3];var Bf=class extends Error{constructor(){super("Failed to create CoActivity: Connection refused - Meet refused to begin Live Sharing")}};var Cf=class{constructor(a){this.config=a}start(){this.h!=null||(this.h=setInterval(()=>{this.config.ka()},this.config.ga));return this}shutdown(){clearInterval(this.h)}};function Df(a){Xa(a);return Xa(a)?Number(a):String(a)};function Ef(){var a=new Map,b={set(c,d){a.set(c,d);return b},G:()=>a};return b};function Ff(a){if(a.i()){a=a.l();a=y(a,1,void 0,Nb);var b=a==null?va():a;a=Uint8Array;xa(ua);var c=b.h;if(!(c==null||c!=null&&c instanceof Uint8Array))if(typeof c==="string"){c=ra.test(c)?c.replace(ra,ta):c;c=atob(c);let d=new Uint8Array(c.length);for(let e=0;e<c.length;e++)d[e]=c.charCodeAt(e);c=d}else c=null;b=c==null?c:b.h=c;return{bytes:new a(b||0)}}}function Gf(a,b){b=Hf(b);D(a,2,vf,b);return a}function If(a,b){b=Hf(b);D(a,2,qf,b);return a}
65
- function Hf(a){var b=new Xe;return C(b,1,Ka(a.bytes,!1),va())}function Jf(a){if(a.v()){a=a.o();var b,c=F(a,1);var d=(b=Rb(a,cc,2))==null?void 0:Xb(b);d==null||Ra(d);b=d!=null?Df(d):void 0;b=b!=null?b:0;let e;d=(e=y(a,4,void 0,ib))!=null?e:0;return{mediaId:c,mediaPlayoutPosition:b,mediaPlayoutRate:d,playbackState:Kf.get(G(a,3))}}}function Lf(a,b){b=Mf(b);D(a,3,vf,b);return a}function Nf(a,b){b=Mf(b);D(a,3,qf,b);return a}
66
- const Kf=Ef().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED").G(),Of=Ef().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4).G();function Mf(a){var b=new Ye;b=C(b,1,x(a.mediaId),"");var c=a.mediaPlayoutRate;if(c!=null&&typeof c!=="number")throw Error(`Value of float/double field must be a number, found ${typeof c}: ${c}`);b=C(b,4,c,0);c=new cc;c=Yb(c,a.mediaPlayoutPosition);b=Tb(b,2,c);a=Of.get(a.playbackState);return J(b,3,a)}
67
- function Pf({activityTitle:a}){var b=new uf;return Kb(b,4,x(a))}function Qf(a,b){var c=new tf;b=J(c,1,b.C);D(a,6,xf,b);return a}function Rf(a){var b=new sf;D(a,5,xf,b);return a};const Sf=Ef().set("co-doing",1).set("co-watching",2).G();async function Tf(a,b,c){var d=b.F,e=new zf;var f=new yf;f=C(f,1,x(a.activityTitle),"");var g=Sf.get(a.L);f=J(f,2,g);e=D(e,3,Af,f);d=await d.call(b,e,af);var h;if((h=Wb(d))!=null&&h)return new Uf(a,b,c,Rb(d,$e,2));throw new Bf;}function Vf(a,b){var c=a.config.O(b);c&&!a.config.N(a.h,c)&&(a.h=c,a.l=Df(Xb(b)),a.v(a.h))}function X(a,b){var {state:c,ia:d,context:e}=b(a.h);a.h=c;a.notify(a.h,e,d)}
68
- class Uf{constructor(a,b,c,d){this.o=a;this.i=b;this.config=c;this.v=dc(e=>void this.o.P(e));Wf(this.i,e=>{var f=A(e,cf);switch(f){case 1:Vf(this,I(e,$e,1,cf));break;case 2:case 0:console.warn(`IllegalMessage: ${f} - Unhandled message - Please raise a bug with the MeetJS team`)}});this.B=(new Cf({ga:1E3,ka:()=>{var e,f,g=(f=(e=this.o).ma)==null?void 0:f.call(e);if(this.h!==null){this.h={...this.h,...g};e=new zf;f=this.config;g=f.W;var h=new rf;h=Yb(h,this.l);f=g.call(f,h,this.h);e=D(e,1,Af,f);this.i.send(e)}}})).start();
69
- this.h=null;this.l=0;d&&Vf(this,d)}disconnect(){this.i.shutdown();this.B.shutdown()}notify(a,b,c){var d=c?Pf(c):void 0;c=this.config;var e=c.X;var f=new wf;f=Yb(f,this.l);d=Tb(f,4,d);a=e.call(c,d,a);a=this.config.V(a,b);b=this.i;c=b.send;e=new zf;a=D(e,2,Af,a);c.call(b,a)}};var Xf=class{constructor(a){this.h=a}broadcastStateUpdate(a){X(this.h,()=>({state:a,context:{}}))}disconnect(){this.h.disconnect()}};function Yf(a,b){return a==null||b==null?!1:a.bytes.length===b.bytes.length&&a.bytes.every((c,d)=>c===b.bytes[d])};var Zf=class{constructor(a){this.h=a}notifySwitchedToMedia(a,b,c){X(this.h,()=>({state:{mediaId:b,mediaPlayoutRate:1,mediaPlayoutPosition:c,playbackState:"PLAY"},ia:{activityTitle:a},context:{C:1}}))}notifyPauseState(a,b){X(this.h,c=>{if(c==null)throw Error("Invalid before coWatchingState");return{state:{...c,playbackState:a?"PAUSE":"PLAY",mediaPlayoutPosition:b},context:{C:3}}})}notifySeekToTimestamp(a){X(this.h,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},
70
- context:{C:2}}})}notifyPlayoutRate(a){X(this.h,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutRate:a},context:{C:4}}})}notifyBuffering(a){X(this.h,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a,playbackState:"BUFFERING"},context:{C:3}}})}notifyReady(a){X(this.h,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},context:{C:3}}})}disconnect(){this.h.disconnect()}};
71
- function $f(a,b){if(a==null||b==null)return!1;var c=a.playbackState==="PLAY"?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};function Wf(a,b){rd(a.signal,c=>{b(c)},a.h)}var ag=class{constructor(a,b){this.channel=a;this.signal=b;this.h=new Q}send(a){this.channel.send(JSON.stringify(xb(a)))}async F(a,b){a=await this.channel.F(JSON.stringify(xb(a)));return b(a.data)}shutdown(){this.h.dispose()}};function bg(a,b){var c=cg,d=a.signal(),e=a.signal();rd(b,f=>{var g=c(f)?d:e;Ke(a,g,f)},a);return{la:d,ja:e}}function dg(a,b,c,d){var e=d!=null?d:f=>f;rd(c,f=>{Ke(a,b,e(f))},a)};async function eg(a,b){if(b)return a=await Tf({activityTitle:b.activityTitle,L:"co-watching",ma:()=>b.onCoWatchingStateQuery(),P:c=>{b.onCoWatchingStateChanged(c)}},a,{X:Lf,W:Nf,V:Qf,O:Jf,N:$f}),new Zf(a)}async function fg(a,b){if(b)return a=await Tf({activityTitle:b.activityTitle,L:"co-doing",P:c=>{b.onCoDoingStateChanged(c)}},a,{X:Gf,W:If,V:Rf,O:Ff,N:Yf}),new Xf(a)}
72
- async function gg(a){var b=new Ne,c=b.signal();a=await a;dg(b,c,a.signal,f=>f.content);var {la:d,ja:e}=bg(b,c);b=new ag(a.channel,d);c=new ag(a.channel,e);return{ca:b,da:c}}function cg(a){a:switch(A(a,cf)){case 1:a=I(a,$e,1,cf);break a;default:throw Error("CA Message arrived with no known content message set");}return a.i()};async function hg(a,b){({ca:a}=await gg(jf(a.h)));b=await fg(a,b);if(!b)throw Error("Failed to create co-doing session");return b}async function ig(a,b){({da:a}=await gg(jf(a.h)));b=await eg(a,b);if(!b)throw Error("Failed to create co-watching session");return b};var jg=class extends zd{async notifySidePanel(a){await mf(this.context.h,1,a)}async unloadSidePanel(){await kf(this.context.h)}async loadSidePanel(){await lf(this.context.h)}};var kg=class extends zd{async setAddonStartingState(a){if(a===null)throw new L(Bc("addonStartingState"));if(typeof a!=="object")throw new L(N("addonStartingState",typeof a,"object | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new L(N("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!=="string")throw new L(N("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.sidePanelUrl+
73
- +!!a.additionalData)throw new L(Ac);if(Object.keys(a).length===0)throw new L(zc);var b=[];b.push(Xc(Wc(Uc(1),a.sidePanelUrl),a.additionalData));a=this.context.h;var c=new Rd,d=c.setAddonStartingState,e=new Qd;b=Ub(e,b);await nf(a,d.call(c,b))}};var lg=class extends zd{async notifyMainStage(a){await mf(this.context.h,2,a)}};var mg=class{constructor(a){a=a.cloudProjectNumber;var b=Bd();if(b.cloudProjectNumber!==a)throw new L(tc);var c=b.T,d=b.ea,e;of=(e=of)!=null?e:ef(d,c,a);this.h=new pf(b)}async createMainStageClient(){var a=this.h;if(a.i.frameType!==2)throw new L(oc);return await Promise.resolve(new jg(a))}async createSidePanelClient(){var a=this.h;if(a.i.frameType!==1)throw new L(pc);return await Promise.resolve(new lg(a))}async createCoWatchingClient(a){return await ig(this.h,a)}async createCoDoingClient(a){return await hg(this.h,
74
- a)}async createRoomsStandaloneClient(){var a=this.h;if(a.i.frameType!==2)throw new L(oc);return await Promise.resolve(new kg(a))}};let ng=null;for(var og={addon:{getFrameType:function(){a:{var a=Bd().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},createAddonSession:async function(a){if(a===null)throw new L(Bc("config"));if(typeof a!=="object")throw new L(N("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new L(N("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(ng&&Bd().T!=="integration.test.google.com")throw new L(Kc);
75
- return ng=new mg(a)}}},pg=["meet"],Y=fa,Z;pg.length&&(Z=pg.shift());)pg.length||og===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=og;}).apply(topLevel);export const meet = topLevel.meet;
7
+ var l=this||self;function ea(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)}}function fa(a,b){function c(){}c.prototype=b.prototype;a.ba=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Z=function(d,e,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[e].apply(d,g)}};function m(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,m);else{let c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}fa(m,Error);m.prototype.name="CustomError";function n(a){l.setTimeout(()=>{throw a;},0)};var ha,ia;a:{for(var ja=["CLOSURE_FLAGS"],ka=l,la=0;la<ja.length;la++)if(ka=ka[ja[la]],ka==null){ia=null;break a}ia=ka}var ma=ia&&ia[748402147];ha=ma!=null?ma:!0;function na(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};function oa(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let pa=void 0;function qa(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var ra=qa(),sa=qa(),ta=qa("m_m",!0);const t=qa("jas",!0);var ua;const va=[];va[t]=7;ua=Object.freeze(va);var wa={};function u(a,b){return b===void 0?a.h!==v&&!!(2&(a.l[t]|0)):!!(2&b)&&a.h!==v}const v={};Object.freeze({});var xa=typeof l.BigInt==="function"&&typeof l.BigInt(0)==="bigint";const ya=Number.MIN_SAFE_INTEGER.toString(),za=xa?BigInt(Number.MIN_SAFE_INTEGER):void 0,Aa=Number.MAX_SAFE_INTEGER.toString(),Ba=xa?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Ca(a,b){if(a.length>b.length)return!1;if(a.length<b.length||a===b)return!0;for(let c=0;c<a.length;c++){let d=a[c],e=b[c];if(d>e)return!1;if(d<e)return!0}};const Da=Number.isFinite;function Ea(a){if(a!=null){if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;Da(a)}}function w(a){if(a!=null&&typeof a!=="string")throw Error();return a}function Fa(a,b,c){if(a!=null&&a[ta]===wa)return a;if(Array.isArray(a)){var d=a[t]|0;c=d|c&32|c&2;c!==d&&(a[t]=c);return new b(a)}};function Ga(a){return a};function Ha(a,b,c,d){var e=d!==void 0;d=!!d;var f=[],g=a.length,h=4294967295,k=!1,q=!!(b&64),r=q?b&128?0:-1:void 0;if(!(b&1)){var p=g&&a[g-1];p!=null&&typeof p==="object"&&p.constructor===Object?(g--,h=g):p=void 0;if(q&&!(b&128)&&!e){k=!0;var y;h=((y=Ia)!=null?y:Ga)(h-r,r,a,p,void 0)+r}}b=void 0;for(e=0;e<g;e++)if(y=a[e],y!=null&&(y=c(y,d))!=null)if(q&&e>=h){let B=e-r,C;((C=b)!=null?C:b={})[B]=y}else f[e]=y;if(p)for(let B in p){a=p[B];if(a==null||(a=c(a,d))==null)continue;g=+B;let C;if(q&&!Number.isNaN(g)&&
8
+ (C=g+r)<h)f[C]=a;else{let P;((P=b)!=null?P:b={})[B]=a}}b&&(k?f.push(b):f[h]=b);return f}function Ja(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return(xa?a>=za&&a<=Ba:a[0]==="-"?Ca(a,ya):Ca(a,Aa))?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Array.isArray(a)){let b=a[t]|0;return a.length===0&&b&1?void 0:Ha(a,b,Ja)}if(a!=null&&a[ta]===wa)return Ka(a);return}return a}let Ia;function Ka(a){a=a.l;return Ha(a,a[t]|0,Ja)};function La(a,b,c,d=0){if(a==null){var e=32;c?(a=[c],e|=128):a=[];b&&(e=e&-16760833|(b&1023)<<14)}else{if(!Array.isArray(a))throw Error("narr");e=a[t]|0;if(ha&&1&e)throw Error("rfarr");2048&e&&!(2&e)&&Ma();if(e&256)throw Error("farr");if(e&64)return(e|d)!==e&&(a[t]=e|d),a;if(c&&(e|=128,c!==a[0]))throw Error("mid");a:{c=a;e|=64;var f=c.length;if(f){var g=f-1;let k=c[g];if(k!=null&&typeof k==="object"&&k.constructor===Object){b=e&128?0:-1;g-=b;if(g>=1024)throw Error("pvtlmt");for(var h in k)if(f=+h,
9
+ f<g)c[f+b]=k[h],delete k[h];else break;e=e&-16760833|(g&1023)<<14;break a}}if(b){h=Math.max(b,f-(e&128?0:-1));if(h>1024)throw Error("spvt");e=e&-16760833|(h&1023)<<14}}}a[t]=e|64|d;return a}function Ma(){if(ha)throw Error("carr");if(sa!=null){var a;var b=(a=pa)!=null?a:pa={};a=b[sa]||0;a>=5||(b[sa]=a+1,b=Error(),oa(b,"incident"),n(b))}};function Na(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){var c=a[t]|0;a.length===0&&c&1?a=void 0:c&2||(!b||4096&c||16&c?a=x(a,c,!1,b&&!(c&16)):(a[t]|=34,c&4&&Object.freeze(a)));return a}if(a!=null&&a[ta]===wa)return b=a.l,c=b[t]|0,u(a,c)?a:Oa(a,b,c)?Pa(a,b):x(b,c)}function Pa(a,b,c){a=new a.constructor(b);c&&(a.h=v);a.i=v;return a}function x(a,b,c,d){d!=null||(d=!!(34&b));a=Ha(a,b,Na,d);d=32;c&&(d|=2);b=b&16769217|d;a[t]=b;return a}
10
+ function Qa(a){var b=a.l,c=b[t]|0;return u(a,c)?Oa(a,b,c)?Pa(a,b,!0):new a.constructor(x(b,c,!1)):a}function Ra(a){if(a.h!==v)return!1;var b=a.l;b=x(b,b[t]|0);b[t]|=2048;a.l=b;a.h=void 0;a.i=void 0;return!0}function Sa(a){if(!Ra(a)&&u(a,a.l[t]|0))throw Error();}function z(a,b){b===void 0&&(b=a[t]|0);b&32&&!(b&4096)&&(a[t]=b|4096)}function Oa(a,b,c){return c&2?!0:c&32&&!(c&4096)?(b[t]=c|2,a.h=v,!0):!1};function A(a,b){a=Ta(a.l,b);if(a!==null)return a}function Ta(a,b,c,d){if(b===-1)return null;var e=b+(c?0:-1),f=a.length-1;if(!(f<1+(c?0:-1))){if(e>=f){var g=a[f];if(g!=null&&typeof g==="object"&&g.constructor===Object){c=g[b];var h=!0}else if(e===f)c=g;else return}else c=a[e];if(d&&c!=null){d=d(c);if(d==null)return d;if(!Object.is(d,c))return h?g[b]=d:a[e]=d,d}return c}}function Ua(a,b,c){Sa(a);var d=a.l;D(d,d[t]|0,b,c);return a}
11
+ function D(a,b,c,d){var e=c+-1,f=a.length-1;if(f>=0&&e>=f){let g=a[f];if(g!=null&&typeof g==="object"&&g.constructor===Object)return g[c]=d,b}if(e<=f)return a[e]=d,b;if(d!==void 0){let g;f=((g=b)!=null?g:b=a[t]|0)>>14&1023||536870912;c>=f?d!=null&&(a[f+-1]={[c]:d}):a[e]=d}return b}function Va(a){return!!(2&a)&&!!(4&a)||!!(256&a)}function E(a,b,c,d){Sa(a);var e=a.l;D(e,e[t]|0,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}function Wa(a,b){a=a.l;return Xa(Ya(a),a,void 0,b)}
12
+ function Ya(a){var b;return(b=a[ra])!=null?b:a[ra]=new Map}function Xa(a,b,c,d){var e=a.get(d);if(e!=null)return e;e=0;for(let f=0;f<d.length;f++){let g=d[f];Ta(b,g)!=null&&(e!==0&&(c=D(b,c,e)),e=g)}a.set(d,e);return e}function Za(a,b,c,d){var e=!1;d=Ta(a,d,void 0,f=>{var g=Fa(f,c,b);e=g!==f&&g!=null;return g});if(d!=null)return e&&!u(d)&&z(a,b),d}
13
+ function $a(a,b,c){var d=a.l,e=d[t]|0;b=Za(d,e,b,c);if(b==null)return b;e=d[t]|0;if(!u(a,e)){let f=Qa(b);f!==b&&(Ra(a)&&(d=a.l,e=d[t]|0),b=f,e=D(d,e,c,b),z(d,e))}return b}function ab(a){a==null&&(a=void 0);return a}function bb(a,b,c){c=ab(c);Ua(a,b,c);c&&!u(c)&&z(a.l);return a}
14
+ function F(a,b,c,d){d=ab(d);a:{var e=d;Sa(a);let h=a.l;var f=h[t]|0;if(e==null){var g=Ya(h);if(Xa(g,h,f,c)===b)g.set(c,0);else break a}else{g=h;let k=Ya(g),q=Xa(k,g,f,c);q!==b&&(q&&(f=D(g,f,q)),k.set(c,b))}D(h,f,b,e)}d&&!u(d)&&z(a.l);return a}
15
+ function cb(a,b){Sa(a);var c=a.l,d=c[t]|0;if(b==null)D(c,d,1);else{var e=b===ua?7:b[t]|0,f=e,g=Va(e),h=g||Object.isFrozen(b),k=!0,q=!0;for(let p=0;p<b.length;p++){var r=b[p];g||(r=u(r),k&&(k=!r),q&&(q=r))}g||(e=k?13:5,e=q?e&-4097:e|4096);h&&e===f||(b=[...b],f=0,e=db(e,d));e!==f&&(b[t]=e);d=D(c,d,1,b);2&e||!(4096&e||16&e)||z(c,d)}return a}function db(a,b){return a=(2&b?a|2:a&-3)&-273}function G(a,b){a=A(a,b);a=a==null||typeof a==="string"?a:void 0;return a!=null?a:""}
16
+ function eb(a,b){a=A(a,b);a=a==null?a:Da(a)?a|0:void 0;return a!=null?a:0}function H(a,b,c,d){c=Wa(a,d)===c?c:-1;return $a(a,b,c)}function fb(a,b){if(b!=null){if(!Da(b))throw a=Error("enum"),oa(a,"warning"),a;b|=0}return E(a,1,b,0)};function gb(){var a=hb||(hb=ib("[1,2,0]"));a=Qa(a);a=Ua(a,4,w("dev-1007604002"));var b=a.l,c=b[t]|0;return u(a,c)?a:Oa(a,b,c)?Pa(a,b):new a.constructor(x(b,c,!0))}var I=class{constructor(a){this.l=La(a,void 0,void 0,2048)}toJSON(){return Ka(this)}};I.prototype[ta]=wa;I.prototype.toString=function(){return this.l.toString()};function jb(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[t]|=32;b=new a(b)}return b}};var ib=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 "+(c!="object"?c:b?Array.isArray(b)?"array":c:"null")+": "+b);}b[t]|=34;return new a(b)}}(class extends I{});function kb(a){var b=new lb,c=Promise.resolve();return(...d)=>{var e;Date.now()-((e=b.L[b.index])!=null?e:-1*b.J)>=b.J?(b.L[b.index]=Date.now(),b.index=(b.index+1)%b.X,e=!0):e=!1;return e?a(...d):c}};var lb=class{constructor(){this.X=1;this.J=100;this.L=[];this.index=0}};var mb=class extends I{};var J=class extends Error{constructor({errorType:a,message:b,j:c}){super(`Meet add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},K={errorType:"InternalError",message:"An unexpected error has occurred.",j:"No further information is available."},nb={errorType:"MissingUrlParameter",message:"Missing required Meet SDK URL parameter",j:"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)."},
17
+ ob={errorType:"NeedsMainStageContext",message:"This method can only be invoked if the addon is running in the main stage.",j:"Use getFrameType to check whether the addon is running in the main stage before invoking this method."},pb={errorType:"NeedsSidePanelContext",message:"This method can only be invoked if the addon is running in the side panel.",j:"Use getFrameType to check whether the addon is running in the side panel before invoking this method."},qb={errorType:"NotSupportedInStandalone",
18
+ message:"This method is not supported in standalone mode.",j:"Do not call this method in standalone mode."},rb={errorType:"MustBeIframed",message:"The SDK must be run in an iframe as part of a Google Meet add-on.",j:"See https://developers.google.com/meet/add-ons/guides/deploy-add-on to deploy to Meet."},tb={errorType:"InternalError",message:"The frame type URL parameter is set to an unexpected value.",j:"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)."},
19
+ ub={errorType:"InvalidCloudProjectNumber",message:"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.",j:"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."},vb={errorType:"DestinationNotReady",
20
+ message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",j:"Make sure the destination frame has connected before sending messages to it."},wb={errorType:"InvalidActivityStartingState",message:"Origin of the ActivityStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",j:"Ensure that the ActivityStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},xb={errorType:"ActivityStartingStateMissingAttributes",
21
+ message:"The supplied ActivityStartingState object does not contain any recognized attributes.",j:"Ensure that the ActivityStartingState object contains at least one of the following attributes: mainStageUrl, sidePanelUrl, additionalData."},yb={errorType:"ActivityStartingStateUnrecognizedAttributes",message:"The supplied ActivityStartingState object contains attributes that are not recognized.",j:"Ensure that the ActivityStartingState object has only the following attributes: mainStageUrl, sidePanelUrl, additionalData."},
22
+ zb={errorType:"AddonStartingStateMissingAttributes",message:"The supplied AddonStartingState object does not contain any recognized attributes.",j:"Ensure that the AddonStartingState object contains at least one of the following attributes: sidePanelUrl, additionalData."},Ab={errorType:"AddonStartingStateUnrecognizedAttributes",message:"The supplied AddonStartingState object contains attributes that are not recognized.",j:"Ensure that the AddonStartingState object has only the following attributes: sidePanelUrl, additionalData."},
23
+ Bb=a=>({errorType:"ArgumentNullError",message:`The argument supplied for '${a}' was 'null' but a value was expected.`,j:"Ensure you are passing a value of the expected type for the argument."}),L=(a,b,c)=>({errorType:"ArgumentTypeError",message:`The type '${b}' of argument supplied for '${a}' did not match the expected type '${c}'.`,j:"Ensure the type of the argument provided matches the expected type."}),Cb={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",
24
+ j:"Ensure that no activity is ongoing."},Db={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",j:"Send one of the available commands in the frame message."},Eb={errorType:"NoActivityFound",message:"No activity found.",j:"Ensure that the activity is started before performing this operation."},Fb={errorType:"RequiresEapEnrollment",message:"This feature is only available to early access partners.",j:"Meet add-on early access enrollment is currently closed."},Gb={errorType:"UserNotInitiator",
25
+ message:"Operation cannot be performed because the user is not the initiator of the current activity.",j:"Ensure that the user is the initiator of the current activity or that the activity has ended."},Hb={errorType:"SizeLimitExceededActivityStartingState",message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",j:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Ib={errorType:"SizeLimitExceededFrameToFrameMessage",
26
+ message:"The size of the frame to frame message exceeds the limits allowed.",j:"Ensure that the frame to frame message size is less than 1,000,000 characters."},Jb={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",j:"Only instantiate the AddonSession once."},Kb={errorType:"UserCancelled",message:"The user cancelled starting an activity.",j:"The user needs to click continue to start the activity."},Lb={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",
27
+ j:"Do not call this method during a Meet call."},Mb={errorType:"InvalidAddonStartingState",message:"Origin of the AddonStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",j:"Ensure that the AddonStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},Nb={errorType:"SizeLimitExceededAddonStartingState",message:"The size of the AddonStartingState URLs and/or its data exceed the limits allowed.",j:"Ensure that the AddonStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},
28
+ Ob={errorType:"MeetingPolicyPreventsStartingActivity",message:"A meeting policy (such as using host control settings) prevents the user from starting the activity.",j:"Have a meeting host or administrator modify the necessary settings to allow the current user to start the activity."};
29
+ function Pb(a){switch(a){case 0:return K;case 1:return vb;case 2:return wb;case 3:return Cb;case 4:return Db;case 5:return Fb;case 6:return qb;case 7:return Gb;case 8:return Hb;case 9:return Ib;case 10:return Kb;case 11:return Lb;case 12:return Mb;case 13:return Nb;case 14:return Eb;case 15:return Ob;default:return K}}function M({errorType:a,message:b,j:c},d=""){throw new J({errorType:a,message:d?`${b} ${d}`:b,j:c});}function Qb(a,b){M({...nb,message:`${nb.message}: ${a}. In URL ${b}`})};function Rb(a){var b=new Sb;return fb(b,a)}function Tb(a,b){return E(a,2,w(b),"")}function Ub(a,b){return E(a,3,w(b),"")}var Sb=class extends I{getFrameType(){return eb(this,1)}};function Vb(a){var b=a.l,c=b;b=b[t]|0;var d=Sb,e=!(a?u(a,b):2&b);e&&a&&Ra(a)&&(c=a.l,b=c[t]|0);a=Ta(c,1);var f=Array.isArray(a)?a:ua,g=f===ua?7:f[t]|0;a=g;2&b&&(a|=2);var h=a|1;if(a=!(4&h)){var k=f,q=b;let r=!!(2&h);r&&(q|=2);let p=!r,y=!0,B=0,C=0;for(;B<k.length;B++){let P=Fa(k[B],d,q);if(P instanceof d){if(!r){let sb=u(P);p&&(p=!sb);y&&(y=sb)}k[C++]=P}}C<B&&(k.length=C);h|=4;h=y?h&-4097:h|4096;h=p?h|8:h&-9}h!==g&&(f[t]=h,2&h&&Object.freeze(f));if(e&&!(8&h||!f.length&&(2&h||!(16&h)&&32&b))){Va(h)&&
30
+ (f=[...f],h=db(h,b),b=D(c,b,1,f));d=f;e=h;for(g=0;g<d.length;g++)k=d[g],h=Qa(k),k!==h&&(d[g]=h);e|=8;h=e=d.length?e|4096:e&-4097;f[t]=h}e=d=h;Va(d)||(2&d||!(16&d)&&32&b?(d|=!f.length||a&&!(4096&d)||32&b&&!(4096&d||16&d)?2:256,d!==e&&(f[t]=d),Object.freeze(f)):(d|=16,d!==e&&(f[t]=d)));2&d||!(4096&d||16&d)||z(c,b);return f}function Wb(a){var b=new Xb;return cb(b,a)}var Xb=class extends I{};var Yb=class extends I{};function Zb(a){return $a(a,Xb,1)}var $b=class extends I{};var ac=class extends I{};var bc=class extends I{};var cc=class extends I{};var dc=class extends I{getMeetPlatformInfo(){return $a(this,bc,1)}};var ec=class extends I{getMeetingInfo(){return $a(this,cc,1)}};var fc=class extends I{},N=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21];var hc=class extends I{};var ic=class extends I{};var jc=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),kc=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function lc(a){a&&typeof a.dispose=="function"&&a.dispose()};function O(){this.u=this.u;this.i=this.i}O.prototype.u=!1;O.prototype.dispose=function(){this.u||(this.u=!0,this.D())};O.prototype[Symbol.dispose]=function(){this.dispose()};function mc(a,b){a.u?b():(a.i||(a.i=[]),a.i.push(b))}O.prototype.D=function(){if(this.i)for(;this.i.length;)this.i.shift()()};function nc({H:a,M:b}){if(a===null)throw new J(Bb("activityStartingState"));if(b||a!==void 0){if(typeof a!=="object")throw new J(L("activityStartingState",typeof a,`object${b?"":" | undefined"}`));if(a.mainStageUrl!==void 0&&typeof a.mainStageUrl!=="string")throw new J(L("mainStageUrl",typeof a.mainStageUrl,"string | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new J(L("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!==
31
+ "string")throw new J(L("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new J(yb);if(Object.keys(a).length===0)throw new J(xb);}}function oc(a){var b=[];b.push(Ub(Tb(Rb(2),a.mainStageUrl),a.additionalData));b.push(Ub(Tb(Rb(1),a.sidePanelUrl),a.additionalData));return b}
32
+ var xc=class extends O{constructor(a){super();this.h=a;this.m={};pc(this.h.h.O,b=>{switch(Wa(b.content,N)){case 7:let d=this.m.frameToFrameMessage;b=H(b.content,ac,7,N);if(d&&b){var c=eb(b,1);c=jc.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:G(b,2)})}}},this)}async getMeetingInfo(){var a=await qc(this.h.h);var b=a.getMeetingInfo();b=G(b,1);a=a.getMeetingInfo();a=G(a,2);return{meetingId:b,meetingCode:a}}async getFrameOpenReason(){var a,b=(a=this.h.i.V)!=null?a:0,
33
+ c;return(c=kc.get(b))!=null?c:"UNKNOWN"}async getActivityStartingState(){var a=Zb(await rc(this.h.h)),b=a==null?void 0:Vb(a).find(c=>c.getFrameType()===2);a=a==null?void 0:Vb(a).find(c=>c.getFrameType()===1);a==null||G(a,3);b==null||G(b,3);return{mainStageUrl:(b==null?void 0:G(b,2))||void 0,sidePanelUrl:(a==null?void 0:G(a,2))||void 0,additionalData:(a==null?void 0:G(a,3))||void 0}}async setActivityStartingState(a){nc({H:a,M:!0});var b=oc(a);a=sc;var c=this.h.h;var d=new hc;b=Wb(b);d=bb(d,1,b);await a(c,
34
+ d)}on(a,b){this.m[a]=b}async getMeetPlatformInfo(){var a=(await tc(this.h.h)).getMeetPlatformInfo();a=A(a,1);a=a==null||typeof a==="boolean"?a:typeof a==="number"?!!a:void 0;return{isMeetHardware:a!=null?a:!1}}async closeAddon(){await uc(this.h.h)}async startActivity(a){nc({H:a,M:!1});var b=new ic;a&&(a=oc(a),a=Wb(a),bb(b,1,a));await vc(this.h.h,b)}async endActivity(a){var b=wc,c=this.h.h,d=new Yb;a=fb(d,a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0);await b(c,a)}};var yc=jb(class extends I{getFrameOpenReason(){return eb(this,5)}});function zc(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");if(c)b=yc(atob(c));else{var d;((d=window.top)!=null?d:window)===window?M(rb):Qb("meet_sdk",b);b=void 0}(c=G(b,1))||Qb("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new J(tb);(d=G(b,2))||Qb("meet_control_channel_name",a);var e=G(b,4);e||Qb("addon_cloud_project_number",a);var f;a=(f=b.getFrameOpenReason())!=null?f:0;f=G(b,3)||"https://meet.google.com";return{V:a,frameType:c,
35
+ U:d,cloudProjectNumber:e,N:f}};var Ac=class extends I{};var Bc=class extends I{};function Cc(a){var b=new Dc;return bb(b,2,a)}function Ec(a,b){return E(a,3,w(b),"")}var Dc=class extends I{};var Fc=class extends I{};var Gc=class extends I{};var Hc=class extends I{};var Ic=class extends I{};var Jc=class extends I{};var Kc=class extends I{};var Lc=class extends I{setAddonStartingState(a){return bb(this,1,a)}};var Mc=class extends I{};function Nc(a,b){return F(a,2,Q,b)}var R=class extends I{},Q=[1,2,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20];function Oc(a){return H(a,fc,2,Pc)}var Qc=class extends I{},Rc=jb(Qc),Pc=[1,2];class Sc{constructor(a){this.data=a}};var Tc=Promise;function Uc(a){var b=new MessageChannel;Vc(b.port1,a);return b}function Wc(a,b){Vc(a,b);return new Xc(a)}function Yc(a,b,c){c=Uc(c);a.h.postMessage(b,[c.port2].concat([]))}function Zc(a,b){return new Tc(c=>{Yc(a,b,c)})}class Xc{constructor(a){this.h=a}}function Vc(a,b){b&&(a.onmessage=c=>{var d=c.data;Wc(c.ports[0]);b(new Sc(d))})};var $c=typeof AsyncContext!=="undefined"&&typeof AsyncContext.Snapshot==="function"?a=>a&&AsyncContext.Snapshot.wrap(a):a=>a;function ad(a,b){a.o(b);a.i<100&&(a.i++,b.next=a.h,a.h=b)}class bd{constructor(a,b){this.m=a;this.o=b;this.i=0;this.h=null}get(){if(this.i>0){this.i--;var a=this.h;this.h=a.next;a.next=null}else a=this.m();return a}};function cd(){var a=dd,b=null;a.h&&(b=a.h,a.h=a.h.next,a.h||(a.i=null),b.next=null);return b}class ed{constructor(){this.i=this.h=null}add(a,b){var c=fd.get();c.set(a,b);this.i?this.i.next=c:this.h=c;this.i=c}}var fd=new bd(()=>new gd,a=>a.reset());class gd{constructor(){this.next=this.h=this.i=null}set(a,b){this.i=a;this.h=b;this.next=null}reset(){this.next=this.h=this.i=null}};let hd,id=!1,dd=new ed,kd=(a,b)=>{hd||jd();id||(hd(),id=!0);dd.add(a,b)},jd=()=>{var a=Promise.resolve(void 0);hd=()=>{a.then(ld)}};function ld(){for(var a;a=cd();){try{a.i.call(a.h)}catch(b){n(b)}ad(fd,a)}id=!1};function md(){};function S(a){this.h=0;this.P=void 0;this.o=this.i=this.m=null;this.v=this.F=!1;if(a!=md)try{let b=this;a.call(void 0,function(c){T(b,2,c)},function(c){T(b,3,c)})}catch(b){T(this,3,b)}}function nd(){this.next=this.m=this.i=this.v=this.h=null;this.o=!1}nd.prototype.reset=function(){this.m=this.i=this.v=this.h=null;this.o=!1};var od=new bd(function(){return new nd},function(a){a.reset()});function pd(a,b,c){var d=od.get();d.v=a;d.i=b;d.m=c;return d}
36
+ function qd(){var a,b,c=new S(function(d,e){a=d;b=e});return new rd(c,a,b)}S.prototype.then=function(a,b,c){return sd(this,$c(typeof a==="function"?a:null),$c(typeof b==="function"?b:null),c)};S.prototype.$goog_Thenable=!0;function td(a,b){b=$c(b);b=pd(b,b);b.o=!0;ud(a,b)}S.prototype.cancel=function(a){if(this.h==0){let b=new U(a);kd(function(){vd(this,b)},this)}};
37
+ function vd(a,b){if(a.h==0)if(a.m){var c=a.m;if(c.i){var d=0,e=null,f=null;for(let g=c.i;g&&(g.o||(d++,g.h==a&&(e=g),!(e&&d>1)));g=g.next)e||(f=g);e&&(c.h==0&&d==1?vd(c,b):(f?(d=f,d.next==c.o&&(c.o=d),d.next=d.next.next):wd(c),xd(c,e,3,b)))}a.m=null}else T(a,3,b)}function ud(a,b){a.i||a.h!=2&&a.h!=3||yd(a);a.o?a.o.next=b:a.i=b;a.o=b}
38
+ function sd(a,b,c,d){var e=pd(null,null,null);e.h=new S(function(f,g){e.v=b?function(h){try{let k=b.call(d,h);f(k)}catch(k){g(k)}}:f;e.i=c?function(h){try{let k=c.call(d,h);k===void 0&&h instanceof U?g(h):f(k)}catch(k){g(k)}}:g});e.h.m=a;ud(a,e);return e.h}S.prototype.R=function(a){this.h=0;T(this,2,a)};S.prototype.S=function(a){this.h=0;T(this,3,a)};
39
+ function T(a,b,c){if(a.h==0){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.h=1;a:{var d=c,e=a.R,f=a.S;if(d instanceof S){ud(d,pd(e||md,f||null,a));var g=!0}else{if(d)try{var h=!!d.$goog_Thenable}catch(k){h=!1}else h=!1;if(h)d.then(e,f,a),g=!0;else{h=typeof d;if(h=="object"&&d!=null||h=="function")try{let k=d.then;if(typeof k==="function"){zd(d,k,e,f,a);g=!0;break a}}catch(k){f.call(a,k);g=!0;break a}g=!1}}}g||(a.P=c,a.h=b,a.m=null,yd(a),b!=3||c instanceof U||Ad(a,c))}}
40
+ function zd(a,b,c,d,e){function f(k){h||(h=!0,d.call(e,k))}function g(k){h||(h=!0,c.call(e,k))}var h=!1;try{b.call(a,g,f)}catch(k){f(k)}}function yd(a){a.F||(a.F=!0,kd(a.Y,a))}function wd(a){var b=null;a.i&&(b=a.i,a.i=b.next,b.next=null);a.i||(a.o=null);return b}S.prototype.Y=function(){for(var a;a=wd(this);)xd(this,a,this.h,this.P);this.F=!1};
41
+ function xd(a,b,c,d){if(c==3&&b.i&&!b.o)for(;a&&a.v;a=a.m)a.v=!1;if(b.h)b.h.m=null,Bd(b,c,d);else try{b.o?b.v.call(b.m):Bd(b,c,d)}catch(e){Cd.call(null,e)}ad(od,b)}function Bd(a,b,c){b==2?a.v.call(a.m,c):a.i&&a.i.call(a.m,c)}function Ad(a,b){a.v=!0;kd(function(){a.v&&Cd.call(null,b)})}var Cd=n;function U(a){m.call(this,a)}fa(U,m);U.prototype.name="cancel";function rd(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let Dd=1,Ed=new WeakMap;var Gd=class extends O{constructor(){super();this.h=new Set}signal(){var a=new Fd;this.h.add(a);mc(this,ea(lc,a));return a}};function Hd(a,b){new Promise(c=>{V(()=>{a.I&&(a.W=b,a.K=!0);for(let {G:d,slot:e}of a.A.values())try{e(b,{signal:a,G:d})}catch(f){n(f)}for(let d of a.B)d.resolve(b);a.B.clear();c()})})}function pc(a,b,c){var d=Dd++;V(()=>{Id(a,d,b,c)})}
42
+ function Id(a,b,c,d){if(!a.u)if(d){if(!d.u){let e=()=>{V(()=>{a.A.delete(b);var f=Ed.get(d);f&&na(f,e)})};a.A.set(b,{G:b,slot:c,C:e});Jd(d,e)}}else a.A.set(b,{G:b,slot:c,C:()=>a.A.delete(b)})}
43
+ var Fd=class extends O{constructor(){super();this.I=!1;this.A=new Map;this.B=new Set;this.K=!1}detach(a){V(()=>{var b=this.A.get(a);b&&b.C()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){var c=qd();V(()=>{if(this.u)c.reject(new U("Signal initially disposed"));else if(b&&b.u)c.reject(new U("Owner initially disposed"));else if(a&&this.I&&this.K)c.resolve(this.W);else if(this.B.add(c),td(c.promise,()=>{this.B.delete(c)}),b){let d=()=>{c.reject(new U("Owner asynchronously disposed"))};
44
+ td(c.promise,()=>{var e=Ed.get(b);e&&na(e,d)});Jd(b,d)}});return c.promise}D(){super.D();V(()=>{for(let {C:a}of this.A.values())a();this.A.clear();for(let a of this.B)a.reject(new U("Signal asynchronously disposed"));this.B.clear()})}};const Kd=[];let Ld=!1;function V(a){Kd.push(a);Md()}async function Md(){if(!Ld)try{Ld=!0;let a=Nd(0);for(;a<Kd.length;)await Promise.resolve(),a=Nd(a)}catch(a){n(a)}finally{Kd.length=0,Ld=!1}}
45
+ function Nd(a){for(var b=a+100;a<b&&a<Kd.length;)try{Kd[a++]()}catch(c){n(c)}return a}function Jd(a,b){if(a.u)b();else{var c=Ed.get(a);if(c)c.push(b);else{let d=[b];Ed.set(a,d);mc(a,()=>{for(let e of[...d])e();Ed.delete(a)})}}};function W(a){var b=new Qc;a=F(b,1,Pc,a);return{content:JSON.stringify(Ka(a))}}new Gd;let hb;var Od=({destination:a,origin:b,ca:c,T:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");var f=Uc(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return Wc(f.port1,e)};function Pd(a,b,c){var d=new Gd,e=d.signal();a=Od({destination:window.parent,origin:b,T:a,onMessage:f=>{var g=Rc(f.data.content);Wa(g,Pc)===2&&(f={content:Oc(g),aa:f,messagePort:f.data.messagePort},d.h.has(e),Hd(e,f))}});return new Qd(e,a,c)}async function qc(a){var b=X;var c=new R;var d=new Hc;c=F(c,19,Q,d);a=await b(a,W(c));var e;return(e=Oc(Rc(a.data.content)))==null?void 0:H(e,ec,20,N)}
46
+ async function rc(a){var b=X;var c=new R;var d=new Bc;c=F(c,17,Q,d);a=await b(a,W(c));var e;return(e=Oc(Rc(a.data.content)))==null?void 0:H(e,$b,18,N)}async function sc(a,b){var c=X,d=new R;b=F(d,8,Q,b);await c(a,W(b))}async function tc(a){var b=X;var c=new R;var d=new Gc;c=F(c,18,Q,d);a=await b(a,W(c));var e;return(e=Oc(Rc(a.data.content)))==null?void 0:H(e,dc,19,N)}async function uc(a){var b=X;var c=new R;var d=new Ac;c=F(c,11,Q,d);await b(a,W(c))}
47
+ async function vc(a,b){var c=X,d=new R;b=F(d,14,Q,b);await c(a,W(b))}async function wc(a,b){var c=X,d=new R;b=F(d,15,Q,b);await c(a,W(b))}async function Rd(a){await a.m()}
48
+ async function X(a,b){(a=await Zc(a.h,b))||M(K,`Falsy response received from the message channel. ${JSON.stringify(a)}`);(b=a.data)||M(K,`Data field in the response from the message channel is falsy. ${JSON.stringify(b)}`);(b=b.content)||M(K,`Content field in the response from the message channel is falsy. ${JSON.stringify(b)}`);var c=void 0;try{c=Rc(b)}catch(d){M(K,`The ControlMessage can't be deserialized. ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=Oc(c))||M(K,`MeetToAddonMessage field on ControlMessage is falsy. ${JSON.stringify(b)}`);
49
+ b=b==null?void 0:H(b,mb,10,N);if((b==null?void 0:eb(b,1))!==void 0)throw a=eb(b,1),new J(Pb(a));return a}async function Sd(a){var b=X;var c=new R;var d=new Mc;c=F(c,5,Q,d);await b(a,W(c))}async function Td(a){var b=X;var c=new R;var d=new Fc;c=F(c,6,Q,d);await b(a,W(c))}async function Ud(a,b,c){var d=X,e=new R,f=new Ic;b=fb(f,b);c=E(b,2,w(c),"");e=F(e,7,Q,c);await d(a,W(e))}async function Vd(a,b){var c=X,d=new R;b=F(d,16,Q,b);await c(a,W(b))}
50
+ class Qd extends O{constructor(a,b,c){super();this.O=a;this.h=b;this.m=kb(async()=>{var d=this.h;var e=new R;var f=new Jc;e=F(e,13,Q,f);await Zc(d,W(e))});a=gb();G(a,4);Ea(A(a,1));Ea(A(a,2));Ea(A(a,3));c=Nc(new R,Ec(Cc(a),c));Yc(this.h,W(c));pc(this.O,async d=>{switch(Wa(d.content,N)){case 16:await Rd(this)}},this)}};let Wd;var Xd=class{constructor(a){var b=Wd;this.i=a;this.h=b}delete(){throw Error("Not implemented.");}};var Yd=class extends xc{async notifySidePanel(a){await Ud(this.h.h,1,a)}async unloadSidePanel(){await Sd(this.h.h)}async loadSidePanel(){await Td(this.h.h)}};var Zd=class extends xc{async setAddonStartingState(a){if(a===null)throw new J(Bb("addonStartingState"));if(typeof a!=="object")throw new J(L("addonStartingState",typeof a,"object | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new J(L("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!=="string")throw new J(L("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.sidePanelUrl+
51
+ +!!a.additionalData)throw new J(Ab);if(Object.keys(a).length===0)throw new J(zb);var b=[];b.push(Ub(Tb(Rb(1),a.sidePanelUrl),a.additionalData));a=this.h.h;var c=new Lc,d=c.setAddonStartingState,e=new Kc;b=cb(e,b);await Vd(a,d.call(c,b))}};var $d=class extends xc{async notifyMainStage(a){await Ud(this.h.h,2,a)}};var ae=class{constructor(a){a=a.cloudProjectNumber;var b=zc();if(b.cloudProjectNumber!==a)throw new J(ub);var c=b.N,d=b.U,e;Wd=(e=Wd)!=null?e:Pd(d,c,a);this.h=new Xd(b)}async createMainStageClient(){var a=this.h;if(a.i.frameType!==2)throw new J(ob);return await Promise.resolve(new Yd(a))}async createSidePanelClient(){var a=this.h;if(a.i.frameType!==1)throw new J(pb);return await Promise.resolve(new $d(a))}async createRoomsStandaloneClient(){var a=this.h;if(a.i.frameType!==2)throw new J(ob);return await Promise.resolve(new Zd(a))}};
52
+ let be=null;for(var ce={addon:{getFrameType:function(){a:{var a=zc().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},createAddonSession:async function(a){if(a===null)throw new J(Bb("config"));if(typeof a!=="object")throw new J(L("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new J(L("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(be&&zc().N!=="integration.test.google.com")throw new J(Jb);
53
+ return be=new ae(a)}}},de=["meet"],Y=l,Z;de.length&&(Z=de.shift());)de.length||ce===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=ce;}).apply(topLevel);export const meet = topLevel.meet;
@@ -5,17 +5,17 @@ const topLevel = typeof global !== 'undefined' ? global : typeof self !== 'undef
5
5
  */
6
6
  var m=this||self;function aa(a){return a};var u=class extends Error{constructor(a,b){super(`Meet Addon Screenshare Info error: ${`${a}${b?` - ${b}`:""}`}`)}};function v(a){throw new a.o(a.message,a.u);}
7
7
  var ba={message:"cloudProjectNumber was not defined.",u:"Ensure that cloudProjectNumber is provided in the call to exposeToMeetWhenScreensharing.",o:u},ca={message:"additionalData was defined, but startActivityOnOpen was not true.",u:"Ensure that startActivityOnOpen is set to true if additionalData is provided in the call to exposeToMeetWhenScreensharing.",o:u},da={message:"Received an incorrect value for startActivityOnOpen.",u:"Ensure that startActivityOnOpen is set to true if a mainStageUrl is provided in the call to exposeToMeetWhenScreensharing.",
8
- o:u};let ea;function fa(a){m.setTimeout(()=>{throw a;},0)};var w,x;a:{for(var ha=["CLOSURE_FLAGS"],z=m,A=0;A<ha.length;A++)if(z=z[ha[A]],z==null){x=null;break a}x=z}var ia=x&&x[748402147];w=ia!=null?ia:!0;const ja={};let B=null;function ka(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let la=void 0;function ma(a,b){if(a!=null){var c;var e=(c=la)!=null?c:la={};c=e[a]||0;c>=b||(e[a]=c+1,a=Error(),ka(a,"incident"),fa(a))}};function C(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var na=C(),oa=C(),D=C("m_m",!0);const E=C("jas",!0);var F;const pa=[];pa[E]=7;F=Object.freeze(pa);var G={};function H(a,b){return b===void 0?a.h!==I&&!!(2&(a.i[E]|0)):!!(2&b)&&a.h!==I}const I={};function qa(a,b,c){var e=b&128?0:-1,d=a.length,f;if(f=!!d)f=a[d-1],f=f!=null&&typeof f==="object"&&f.constructor===Object;var g=d+(f?-1:0);for(b=b&128?1:0;b<g;b++)c(b-e,a[b]);if(f){a=a[d-1];for(let h in a)!isNaN(h)&&c(+h,a[h])}}var ra={};var J=typeof m.BigInt==="function"&&typeof m.BigInt(0)==="bigint";const sa=Number.MIN_SAFE_INTEGER.toString(),ta=J?BigInt(Number.MIN_SAFE_INTEGER):void 0,ua=Number.MAX_SAFE_INTEGER.toString(),va=J?BigInt(Number.MAX_SAFE_INTEGER):void 0;function wa(a,b){if(a.length>b.length)return!1;if(a.length<b.length||a===b)return!0;for(let c=0;c<a.length;c++){let e=a[c],d=b[c];if(e>d)return!1;if(e<d)return!0}};const xa=Number.isFinite;function ya(a){if(a==null)return a;if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;return xa(a)?a|0:void 0}function K(a){if(a!=null&&typeof a!=="string")throw Error();return a};function za(a){return a};function L(a,b,c,e){var d=e!==void 0;e=!!e;var f=[],g=a.length,h=4294967295,k=!1,n=!!(b&64),l=n?b&128?0:-1:void 0;if(!(b&1)){var q=g&&a[g-1];q!=null&&typeof q==="object"&&q.constructor===Object?(g--,h=g):q=void 0;if(n&&!(b&128)&&!d){k=!0;var p;h=((p=Aa)!=null?p:za)(h-l,l,a,q,void 0)+l}}b=void 0;for(d=0;d<g;d++)if(p=a[d],p!=null&&(p=c(p,e))!=null)if(n&&d>=h){let t=d-l,r;((r=b)!=null?r:b={})[t]=p}else f[d]=p;if(q)for(let t in q){a=q[t];if(a==null||(a=c(a,e))==null)continue;g=+t;let r;if(n&&!Number.isNaN(g)&&
9
- (r=g+l)<h)f[r]=a;else{let y;((y=b)!=null?y:b={})[t]=a}}b&&(k?f.push(b):f[h]=b);return f}function Ba(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return(J?a>=ta&&a<=va:a[0]==="-"?wa(a,sa):wa(a,ua))?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Array.isArray(a)){let b=a[E]|0;return a.length===0&&b&1?void 0:L(a,b,Ba)}if(a!=null&&a[D]===G)return Ca(a);return}return a}let Aa;function Ca(a){a=a.i;return L(a,a[E]|0,Ba)};let Da,Ea;function Fa(a){switch(typeof a){case "boolean":return Da||(Da=[0,void 0,!0]);case "number":return a>0?void 0:a===0?Ea||(Ea=[0,void 0]):[-a,void 0];case "string":return[0,a];case "object":return a}}
8
+ o:u};let ea;function fa(a){m.setTimeout(()=>{throw a;},0)};var w,x;a:{for(var ha=["CLOSURE_FLAGS"],z=m,A=0;A<ha.length;A++)if(z=z[ha[A]],z==null){x=null;break a}x=z}var ia=x&&x[748402147];w=ia!=null?ia:!0;const ja={};let B=null;function ka(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let la=void 0;function ma(a,b){if(a!=null){var c;var e=(c=la)!=null?c:la={};c=e[a]||0;c>=b||(e[a]=c+1,a=Error(),ka(a,"incident"),fa(a))}};function C(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var na=C(),oa=C(),D=C("m_m",!0);const E=C("jas",!0);var F;const pa=[];pa[E]=7;F=Object.freeze(pa);var G={};function H(a,b){return b===void 0?a.h!==I&&!!(2&(a.i[E]|0)):!!(2&b)&&a.h!==I}const I={};function qa(a,b,c){var e=b&128?0:-1,d=a.length,f;if(f=!!d)f=a[d-1],f=f!=null&&typeof f==="object"&&f.constructor===Object;var g=d+(f?-1:0);for(b=b&128?1:0;b<g;b++)c(b-e,a[b]);if(f){a=a[d-1];for(let h in a)!isNaN(h)&&c(+h,a[h])}}var ra={};var J=typeof m.BigInt==="function"&&typeof m.BigInt(0)==="bigint";const sa=Number.MIN_SAFE_INTEGER.toString(),ta=J?BigInt(Number.MIN_SAFE_INTEGER):void 0,ua=Number.MAX_SAFE_INTEGER.toString(),va=J?BigInt(Number.MAX_SAFE_INTEGER):void 0;function wa(a,b){if(a.length>b.length)return!1;if(a.length<b.length||a===b)return!0;for(let c=0;c<a.length;c++){let e=a[c],d=b[c];if(e>d)return!1;if(e<d)return!0}};const xa=Number.isFinite;function ya(a){if(a==null)return a;if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;return xa(a)?a|0:void 0}function K(a){if(a!=null&&typeof a!=="string")throw Error();return a};function za(a){return a};function L(a,b,c,e){var d=e!==void 0;e=!!e;var f=[],g=a.length,h=4294967295,k=!1,n=!!(b&64),l=n?b&128?0:-1:void 0;if(!(b&1)){var r=g&&a[g-1];r!=null&&typeof r==="object"&&r.constructor===Object?(g--,h=g):r=void 0;if(n&&!(b&128)&&!d){k=!0;var q;h=((q=Aa)!=null?q:za)(h-l,l,a,r,void 0)+l}}b=void 0;for(d=0;d<g;d++)if(q=a[d],q!=null&&(q=c(q,e))!=null)if(n&&d>=h){let t=d-l,p;((p=b)!=null?p:b={})[t]=q}else f[d]=q;if(r)for(let t in r){a=r[t];if(a==null||(a=c(a,e))==null)continue;g=+t;let p;if(n&&!Number.isNaN(g)&&
9
+ (p=g+l)<h)f[p]=a;else{let y;((y=b)!=null?y:b={})[t]=a}}b&&(k?f.push(b):f[h]=b);return f}function Ba(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return(J?a>=ta&&a<=va:a[0]==="-"?wa(a,sa):wa(a,ua))?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Array.isArray(a)){let b=a[E]|0;return a.length===0&&b&1?void 0:L(a,b,Ba)}if(a!=null&&a[D]===G)return Ca(a);return}return a}let Aa;function Ca(a){a=a.i;return L(a,a[E]|0,Ba)};let Da,Ea;function Fa(a){switch(typeof a){case "boolean":return Da||(Da=[0,void 0,!0]);case "number":return a>0?void 0:a===0?Ea||(Ea=[0,void 0]):[-a,void 0];case "string":return[0,a];case "object":return a}}
10
10
  function M(a,b,c,e=0){if(a==null){var d=32;c?(a=[c],d|=128):a=[];b&&(d=d&-16760833|(b&1023)<<14)}else{if(!Array.isArray(a))throw Error("narr");d=a[E]|0;if(w&&1&d)throw Error("rfarr");2048&d&&!(2&d)&&Ga();if(d&256)throw Error("farr");if(d&64)return(d|e)!==d&&(a[E]=d|e),a;if(c&&(d|=128,c!==a[0]))throw Error("mid");a:{c=a;d|=64;var f=c.length;if(f){var g=f-1;let k=c[g];if(k!=null&&typeof k==="object"&&k.constructor===Object){b=d&128?0:-1;g-=b;if(g>=1024)throw Error("pvtlmt");for(var h in k)if(f=+h,f<
11
11
  g)c[f+b]=k[h],delete k[h];else break;d=d&-16760833|(g&1023)<<14;break a}}if(b){h=Math.max(b,f-(d&128?0:-1));if(h>1024)throw Error("spvt");d=d&-16760833|(h&1023)<<14}}}a[E]=d|64|e;return a}function Ga(){if(w)throw Error("carr");ma(oa,5)};function Ha(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){var c=a[E]|0;a.length===0&&c&1?a=void 0:c&2||(!b||4096&c||16&c?a=N(a,c,!1,b&&!(c&16)):(a[E]|=34,c&4&&Object.freeze(a)));return a}if(a!=null&&a[D]===G){c=a.i;let e=c[E]|0;H(a,e)||(e&2?b=!0:e&32&&!(e&4096)?(c[E]=e|2,a.h=I,b=!0):b=!1,b?(a=new a.constructor(c),a.l=I):a=N(c,e));return a}}function N(a,b,c,e){e!=null||(e=!!(34&b));a=L(a,b,Ha,e);e=32;c&&(e|=2);b=b&16769217|e;a[E]=b;return a}
12
12
  function Ia(a){if(a.h!==I)var b=!1;else b=a.i,b=N(b,b[E]|0),b[E]|=2048,a.i=b,a.h=void 0,a.l=void 0,b=!0;if(!b&&H(a,a.i[E]|0))throw Error();}function Ja(a,b){b===void 0&&(b=a[E]|0);b&32&&!(b&4096)&&(a[E]=b|4096)};function O(a,b,c){Ia(a);var e=a.i;P(e,e[E]|0,b,c);return a}function P(a,b,c,e,d){var f=c+(d?0:-1),g=a.length-1;if(g>=1+(d?0:-1)&&f>=g){let h=a[g];if(h!=null&&typeof h==="object"&&h.constructor===Object)return h[c]=e,b}if(f<=g)return a[f]=e,b;if(e!==void 0){let h;g=((h=b)!=null?h:b=a[E]|0)>>14&1023||536870912;c>=g?e!=null&&(a[g+(d?0:-1)]={[c]:e}):a[f]=e}return b}function Ka(a){return!!(2&a)&&!!(4&a)||!!(256&a)}
13
13
  function Q(a,b,c,e){Ia(a);var d=a.i;P(d,d[E]|0,b,(e==="0"?Number(c)===0:c===e)?void 0:c);return a}function La(a,b){return a=(2&b?a|2:a&-3)&-273};function R(a,b){for(;b>127;)a.h.push(b&127|128),b>>>=7;a.h.push(b)}var Ma=class{constructor(){this.h=[]}length(){return this.h.length}end(){var a=this.h;this.h=[];return a}};function S(a,b){b.length!==0&&(a.l.push(b),a.j+=b.length)}function Na(a,b){R(a.h,b*8+2);b=a.h.end();S(a,b);b.push(a.j);return b}function Oa(a,b){var c=b.pop();for(c=a.j+a.h.length()-c;c>127;)b.push(c&127|128),c>>>=7,a.j++;b.push(c);a.j++}var Pa=class{constructor(){this.l=[];this.j=0;this.h=new Ma}};function T(){var a=class{constructor(){throw Error();}};Object.setPrototypeOf(a,a.prototype);return a}var U=T(),Qa=T(),Ra=T(),Sa=T();var V=class{constructor(a){this.i=M(a,void 0,void 0,2048)}toJSON(){var a=Ca(this);return a}};V.prototype[D]=G;V.prototype.toString=function(){return this.i.toString()};var W=class{constructor(a,b){this.m=a;a=aa(U);this.h=!!a&&b===a||!1}};function Ta(a,b,c,e,d){b=Ua(b,e);b!=null&&(c=Na(a,c),d(b,a),Oa(a,c))}const Va=new W(Ta,U),Wa=new W(Ta,U);var Xa=Symbol(),Ya=Symbol();let Za,$a;
14
- function X(a){var b=ab,c=bb,e=a[Xa];if(e)return e;e={};e.D=a;e.v=Fa(a[0]);var d=a[1],f=1;d&&d.constructor===Object&&(e.A=d,d=a[++f],typeof d==="function"&&(e.B=!0,Za!=null||(Za=d),$a!=null||($a=a[f+1]),d=a[f+=2]));for(var g={};d&&Array.isArray(d)&&d.length&&typeof d[0]==="number"&&d[0]>0;){for(var h=0;h<d.length;h++)g[d[h]]=d;d=a[++f]}for(h=1;d!==void 0;){typeof d==="number"&&(h+=d,d=a[++f]);let l;var k=void 0;d instanceof W?l=d:(l=Va,f--);let q;if((q=l)==null?0:q.h){d=a[++f];k=a;var n=f;typeof d===
15
- "function"&&(d=d(),k[n]=d);k=d}d=a[++f];n=h+1;typeof d==="number"&&d<0&&(n-=d,d=a[++f]);for(;h<n;h++){let p=g[h];k?c(e,h,l,k,p):b(e,h,l,p)}}return a[Xa]=e}function Ua(a,b){if(a instanceof V)return a.i;if(Array.isArray(a))return M(a,b[0],b[1])};function ab(a,b,c){a[b]=c.m}function bb(a,b,c,e){var d,f,g=c.m;a[b]=(h,k,n)=>g(h,k,n,f||(f=X(e).v),d||(d=cb(e)))}function cb(a){var b=a[Ya];if(!b){let c=X(a);b=(e,d)=>db(e,d,c);a[Ya]=b}return b}function db(a,b,c){qa(a,a[E]|0,(e,d)=>{if(d!=null){var f=eb(c,e);f?f(b,d,e):e<500||ma(na,3)}})}
14
+ function X(a){var b=ab,c=bb,e=a[Xa];if(e)return e;e={};e.D=a;e.v=Fa(a[0]);var d=a[1],f=1;d&&d.constructor===Object&&(e.A=d,d=a[++f],typeof d==="function"&&(e.B=!0,Za!=null||(Za=d),$a!=null||($a=a[f+1]),d=a[f+=2]));for(var g={};d&&Array.isArray(d)&&d.length&&typeof d[0]==="number"&&d[0]>0;){for(var h=0;h<d.length;h++)g[d[h]]=d;d=a[++f]}for(h=1;d!==void 0;){typeof d==="number"&&(h+=d,d=a[++f]);let l;var k=void 0;d instanceof W?l=d:(l=Va,f--);let r;if((r=l)==null?0:r.h){d=a[++f];k=a;var n=f;typeof d===
15
+ "function"&&(d=d(),k[n]=d);k=d}d=a[++f];n=h+1;typeof d==="number"&&d<0&&(n-=d,d=a[++f]);for(;h<n;h++){let q=g[h];k?c(e,h,l,k,q):b(e,h,l,q)}}return a[Xa]=e}function Ua(a,b){if(a instanceof V)return a.i;if(Array.isArray(a))return M(a,b[0],b[1])};function ab(a,b,c){a[b]=c.m}function bb(a,b,c,e){var d,f,g=c.m;a[b]=(h,k,n)=>g(h,k,n,f||(f=X(e).v),d||(d=cb(e)))}function cb(a){var b=a[Ya];if(!b){let c=X(a);b=(e,d)=>db(e,d,c);a[Ya]=b}return b}function db(a,b,c){qa(a,a[E]|0,(e,d)=>{if(d!=null){var f=eb(c,e);f?f(b,d,e):e<500||ma(na,3)}})}
16
16
  function eb(a,b){var c=a[b];if(c)return c;if(c=a.A)if(c=c[b]){c=Array.isArray(c)?c[0]instanceof W?c:[Wa,c]:[c,void 0];var e=c[0].m;if(c=c[1]){let d=cb(c),f=X(c).v;c=a.B?$a(f,d):(g,h,k)=>e(g,h,k,f,d)}else c=e;return a[b]=c}};function fb(a,b,c){b=b==null||typeof b==="string"?b:void 0;b!=null&&(b=(ea||(ea=new TextEncoder)).encode(b),R(a.h,c*8+2),R(a.h,b.length),S(a,a.h.end()),S(a,b))};function gb(a){var b=new hb;if(a!=null){if(!xa(a))throw b=Error("enum"),ka(b,"warning"),b;a|=0}return Q(b,1,a,0)}var hb=class extends V{};var ib=class extends V{};var jb=class extends V{};jb.prototype.j=function(a){return function(){var b=new Pa;db(this.i,b,X(a));S(b,b.h.end());var c=new Uint8Array(b.j),e=b.l,d=e.length,f=0;for(let g=0;g<d;g++){let h=e[g];c.set(h,f);f+=h.length}b.l=[c];return c}}([0,new W(fb,Ra),-1,[0,function(a,b,c=U){return new W(b,c)}(function(a,b,c,e,d){if(a.h()!==2)return!1;var f=a.j;e=M(void 0,e[0],e[1]);var g=b[E]|0;if(g&2)throw Error();var h=g&128?ra:void 0;a:if(c===-1)var k=null;else{k=c+(h?0:-1);var n=b.length-1;if(n<1+(h?0:-1))k=void 0;else if(k>=n){var l=
17
17
  b[n];if(l!=null&&typeof l==="object"&&l.constructor===Object)k=l[c];else if(k===n)k=l;else{k=void 0;break a}}else k=b[k]}k=Array.isArray(k)?k:F;l=n=k===F?7:k[E]|0;2&g&&(l|=2);l|=1;if(2&l||Ka(l)||16&l)l===n||Ka(l)||(k[E]=l),k=[...k],n=0,l=La(l,g),P(b,g,c,k,h);l&=-13;l!==n&&(k[E]=l);k.push(e);f.call(a,e,d);return!0},function(a,b,c,e,d){if(Array.isArray(b)){for(let n=0;n<b.length;n++){var f=a,g=c,h=d,k=Ua(b[n],e);k!=null&&(g=Na(f,g),h(k,f),Oa(f,g))}a=b[E]|0;a&1||(b[E]=a|1)}}),[0,new W(function(a,b,c){b=
18
- ya(b);if(b!=null)if(b=parseInt(b,10),R(a.h,c*8),a=a.h,c=b,c>=0)R(a,c);else{for(b=0;b<9;b++)a.h.push(c&127|128),c>>=7;a.h.push(1)}},Sa),new W(fb,Ra),-1]],new W(function(a,b,c){b=b==null||typeof b==="boolean"?b:typeof b==="number"?!!b:void 0;b!=null&&(R(a.h,c*8),a.h.h.push(b?1:0))},Qa)]);function kb(){var a,b,c=(b=(a=(new URL(lb||window.location.href)).searchParams.get("meet_capture_handle_origins"))==null?void 0:a.split(",").filter(e=>{try{return(new URL(e)).origin.endsWith(".google.com")}catch(d){return!1}}))!=null?b:[];return c.length===0?mb:c}let lb="";const mb=["https://meet.google.com"];for(var nb={exposeToMeetWhenScreensharing:function(a){var b=a.C,c=a.cloudProjectNumber,e=a.additionalData,d=a.mainStageUrl,f=a.sidePanelUrl;a=a.startActivityOnOpen;c||v(ba);var g=new jb;c=O(g,2,K(c));b&&O(c,1,K(b));b=[];e&&!a&&v(ca);d&&!a&&v(da);if(f){g=b.push;var h=gb(1);f=Q(h,2,K(f),"");f=Q(f,3,K(e),"");g.call(b,f)}d&&(f=b.push,g=gb(2),d=Q(g,2,K(d),""),e=Q(d,3,K(e),""),f.call(b,e));{e=new ib;d=b;Ia(e);let t=e.i,r=t[E]|0;if(d==null)P(t,r,1);else{f=b=d===F?7:d[E]|0;h=(g=Ka(b))||Object.isFrozen(d);
19
- var k=!0,n=!0;for(let y=0;y<d.length;y++){var l=d[y];g||(l=H(l),k&&(k=!l),n&&(n=l))}g||(b=k?13:5,b=n?b&-4097:b|4096);h&&b===f||(d=[...d],f=0,b=La(b,r));b!==f&&(d[E]=b);r=P(t,r,1,d);2&b||!(4096&b||16&b)||Ja(t,r)}}e==null&&(e=void 0);O(c,3,e);e&&!H(e)&&Ja(c.i);if(a!=null&&typeof a!=="boolean"){var q=typeof a;throw Error(`Expected boolean but got ${q!="object"?q:a?Array.isArray(a)?"array":q:"null"}: ${a}`);}O(c,4,a);a=c.j();var p;p===void 0&&(p=0);if(!B)for(B={},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),
20
- e=["+/=","+/","-_=","-_.","-_"],d=0;d<5;d++)for(b=c.concat(e[d].split("")),ja[d]=b,f=0;f<b.length;f++)g=b[f],B[g]===void 0&&(B[g]=f);p=ja[p];c=Array(Math.floor(a.length/3));e=p[64]||"";for(d=b=0;b<a.length-2;b+=3)h=a[b],k=a[b+1],g=a[b+2],f=p[h>>2],h=p[(h&3)<<4|k>>4],k=p[(k&15)<<2|g>>6],g=p[g&63],c[d++]=f+h+k+g;f=0;g=e;switch(a.length-b){case 2:f=a[b+1],g=p[(f&15)<<2]||e;case 1:a=a[b],c[d]=p[a>>2]+p[(a&3)<<4|f>>4]+g+e}a=c.join("");p=window;p.top===p.self&&(a={handle:a,permittedOrigins:kb(),exposeOrigin:!0},
21
- (q=p.navigator.mediaDevices)==null||q.setCaptureHandleConfig(a))}},ob=["meet","addon","screensharing"],Y=m,Z;ob.length&&(Z=ob.shift());)ob.length||nb===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=nb;}).apply(topLevel);export const meet = topLevel.meet;
18
+ ya(b);if(b!=null)if(b=parseInt(b,10),R(a.h,c*8),a=a.h,c=b,c>=0)R(a,c);else{for(b=0;b<9;b++)a.h.push(c&127|128),c>>=7;a.h.push(1)}},Sa),new W(fb,Ra),-1]],new W(function(a,b,c){b=b==null||typeof b==="boolean"?b:typeof b==="number"?!!b:void 0;b!=null&&(R(a.h,c*8),a.h.h.push(b?1:0))},Qa)]);function kb(){var a,b,c=(b=(a=(new URL(lb||window.location.href)).searchParams.get("meet_capture_handle_origins"))==null?void 0:a.split(",").filter(e=>{try{return(new URL(e)).origin.endsWith(".google.com")}catch(d){return!1}}))!=null?b:[];return c.length===0?mb:c}let lb="";const mb=["https://meet.google.com"];for(var nb={exposeToMeetWhenScreensharing:function(a){var b=a.C,c=a.cloudProjectNumber,e=a.additionalData,d=a.mainStageUrl,f=a.sidePanelUrl;a=a.startActivityOnOpen;c||v(ba);var g=new jb;c=O(g,2,K(c));b&&O(c,1,K(b));b=[];e&&!a&&v(ca);d&&!a&&v(da);if(f){g=b.push;var h=gb(1);f=Q(h,2,K(f),"");f=Q(f,3,K(e),"");g.call(b,f)}d&&(f=b.push,g=gb(2),d=Q(g,2,K(d),""),e=Q(d,3,K(e),""),f.call(b,e));e=new ib;Ia(e);d=e.i;f=d[E]|0;if(b==null)P(d,f,1);else{h=g=b===F?7:b[E]|0;var k=Ka(g),n=k||Object.isFrozen(b),l=!0,
19
+ r=!0;for(let y=0;y<b.length;y++){var q=b[y];k||(q=H(q),l&&(l=!q),r&&(r=q))}k||(g=l?13:5,g=r?g&-4097:g|4096);n&&g===h||(b=[...b],h=0,g=La(g,f));g!==h&&(b[E]=g);f=P(d,f,1,b);2&g||!(4096&g||16&g)||Ja(d,f)}e==null&&(e=void 0);O(c,3,e);e&&!H(e)&&Ja(c.i);if(a!=null&&typeof a!=="boolean"){var t=typeof a;throw Error(`Expected boolean but got ${t!="object"?t:a?Array.isArray(a)?"array":t:"null"}: ${a}`);}O(c,4,a);a=c.j();var p;p===void 0&&(p=0);if(!B)for(B={},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),
20
+ e=["+/=","+/","-_=","-_.","-_"],b=0;b<5;b++)for(d=c.concat(e[b].split("")),ja[b]=d,f=0;f<d.length;f++)g=d[f],B[g]===void 0&&(B[g]=f);p=ja[p];c=Array(Math.floor(a.length/3));e=p[64]||"";for(b=d=0;d<a.length-2;d+=3)h=a[d],k=a[d+1],g=a[d+2],f=p[h>>2],h=p[(h&3)<<4|k>>4],k=p[(k&15)<<2|g>>6],g=p[g&63],c[b++]=f+h+k+g;f=0;g=e;switch(a.length-d){case 2:f=a[d+1],g=p[(f&15)<<2]||e;case 1:a=a[d],c[b]=p[a>>2]+p[(a&3)<<4|f>>4]+g+e}a=c.join("");p=window;p.top===p.self&&(a={handle:a,permittedOrigins:kb(),exposeOrigin:!0},
21
+ (t=p.navigator.mediaDevices)==null||t.setCaptureHandleConfig(a))}},ob=["meet","addon","screensharing"],Y=m,Z;ob.length&&(Z=ob.shift());)ob.length||nb===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=nb;}).apply(topLevel);export const meet = topLevel.meet;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@googleworkspace/meet-addons",
3
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": "1.2.0-dev-1005108874",
4
+ "version": "1.2.0-dev-1007604002",
5
5
  "repository": "googleworkspace/meet",
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "homepage": "https://developers.google.com/meet/add-ons/guides/overview",