@googleworkspace/meet-addons 0.9.1-670722405 → 0.10.0-671117181

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
@@ -2,42 +2,6 @@
2
2
 
3
3
  // Original file: live_sharing.v2.types.d.ts
4
4
 
5
- /**
6
- * Represents that a failure event occurred before, during, or after a co-activity.
7
- *
8
- * - `FAILURE_EVENT_UNSPECIFIED`: Failure event that's not specified in the
9
- * predefined types.
10
- *
11
- * - `FAILURE_USER_INSUFFICIENT_TIER`: Failure due to the user membership tier not
12
- * having sufficient privileges. For example, user not having a premium
13
- * membership for the add-on app.
14
- *
15
- * - `FAILURE_USER_UNKNOWN`: Failure due to user sign-in or a related failure.
16
- *
17
- * - `FAILURE_USER_CANCELLED`: Failure due to cancellation of the operation by the
18
- * user.
19
- *
20
- * - `FAILURE_USER_UNAUTHORIZED`: Failure due to the user being in the wrong locale
21
- * or age group, etc., effectively being an unauthorized user for the co-activity.
22
- *
23
- * - `FAILURE_APP_GENERIC_ERROR`: Failure due to a generic error with the add-on app.
24
- *
25
- * - `FAILURE_APP_NETWORK_CONNECTIVITY`: Failure due to a network connectivity issue
26
- * between the add-on app and its servers.
27
- *
28
- * - `FAILURE_APP_STARTUP`: Failure due to an error in starting the add-on app.
29
- */
30
- export type LiveSharingFailureEventType =
31
- | 'FAILURE_EVENT_UNSPECIFIED'
32
- | 'FAILURE_USER_INSUFFICIENT_TIER'
33
- | 'FAILURE_USER_UNKNOWN'
34
- | 'FAILURE_USER_CANCELLED'
35
- | 'FAILURE_USER_UNAUTHORIZED'
36
- | 'FAILURE_APP_GENERIC_ERROR'
37
- | 'FAILURE_APP_NETWORK_CONNECTIVITY'
38
- | 'FAILURE_APP_STARTUP';
39
-
40
-
41
5
 
42
6
  /**
43
7
  * Binary-encoded state for CoDoing experiences.
@@ -321,14 +285,6 @@ export type FrameOpenReason =
321
285
  | 'START_ACTIVITY'
322
286
  | 'JOIN_ACTIVITY';
323
287
 
324
- /**
325
- * The different reasons why the activity was ended:
326
- *
327
- * - `END_REASON_UNSPECIFIED`: The reason for ending the activity is
328
- * unspecified.
329
- */
330
- export type EndActivityReason = 'END_REASON_UNSPECIFIED';
331
-
332
288
  /**
333
289
  * A client-initiated message sent from one add-on frame to another.
334
290
  */
@@ -368,6 +324,7 @@ export type ErrorType =
368
324
  | 'MissingUrlParameter'
369
325
  | 'NeedsMainStageContext'
370
326
  | 'NeedsSidePanelContext'
327
+ | 'NoActivityFound'
371
328
  | 'NotSupportedInMeetCall'
372
329
  | 'NotSupportedInStandalone'
373
330
  | 'RequiresEapEnrollment'
@@ -414,26 +371,6 @@ export interface ActivityStartingState {
414
371
  additionalData?: string;
415
372
  }
416
373
 
417
- /**
418
- * Starting state of an individual add-on frame.
419
- * @ignore Exclusively intended for use by the rooms standalone add-on.
420
- */
421
- export interface AddonStartingState {
422
- /**
423
- * The URL that the side panel opens for users starting the add-on.
424
- * The length of this URL must be less than 512 characters.
425
- */
426
- sidePanelUrl?: string;
427
-
428
- /**
429
- * Data internal to the add-on that it can use to initialize itself. Useful
430
- * for communicating application-specific state to users joining the
431
- * activity that cannot be stored in the URLs.
432
- * The length of this string must be less than 4,096 characters.
433
- */
434
- additionalData?: string;
435
- }
436
-
437
374
  /**
438
375
  * The client object that an add-on uses to communicate with Meet web.
439
376
  */
@@ -464,11 +401,6 @@ export interface MeetAddonClient {
464
401
  eventHandler: AddonCallbacks[T],
465
402
  ): void;
466
403
 
467
- /**
468
- * Retrieves information about the Meet platform in which the add-on is
469
- * running.
470
- */
471
- getMeetPlatformInfo(): Promise<MeetPlatformInfo>;
472
404
  /**
473
405
  * Retrieves the action causing the add-on frame to be opened.
474
406
  */
@@ -547,18 +479,6 @@ export interface MeetMainStageClient extends MeetAddonClient {
547
479
  loadSidePanel(): Promise<void>;
548
480
  }
549
481
 
550
- /**
551
- * The `MeetAddonClient` for the rooms standalone component of an add-on.
552
- * @ignore Exclusively intended for use by the rooms standalone add-on.
553
- */
554
- export interface MeetRoomsStandaloneClient extends MeetAddonClient {
555
- /**
556
- * Sets or updates information about the initial state of the add-on that's
557
- * used when the add-on is transferred into a Meet call.
558
- */
559
- setAddonStartingState(addonStartingState: AddonStartingState): Promise<void>;
560
- }
561
-
562
482
  /**
563
483
  * The AddonSession interface. Used to interact with Meet.
564
484
  */
@@ -575,16 +495,6 @@ export interface AddonSession {
575
495
  ): Promise<CoWatchingClient>;
576
496
  }
577
497
 
578
- /**
579
- * Information about the Meet platform in which the add-on is running.
580
- */
581
- export interface MeetPlatformInfo {
582
- /**
583
- * Whether the meeting is running on Meet Rooms hardware.
584
- */
585
- isMeetHardware: boolean;
586
- }
587
-
588
498
 
589
499
  // Original file: guaranteed_delivery_types.d.ts
590
500
 
package/meet.addons.js CHANGED
@@ -5,67 +5,68 @@ 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=
5
5
  SPDX-License-Identifier: Apache-2.0
6
6
  */
7
7
  var l=this||self,ea=function(a,b){a:{var c=["CLOSURE_FLAGS"];for(var d=l,e=0;e<c.length;e++)if(d=d[c[e]],d==null){c=null;break a}c=d}a=c&&c[a];return a!=null?a:b},fa=function(a,b,c){return a.call.apply(a.bind,arguments)},ha=function(a,b,c){ha=fa;return ha.apply(null,arguments)},ia=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}},ja=function(a,b){function c(){}c.prototype=b.prototype;a.sb=b.prototype;a.prototype=
8
- new c;a.prototype.constructor=a;a.ob=function(d,e,g){for(var f=Array(arguments.length-2),h=2;h<arguments.length;h++)f[h-2]=arguments[h];return b.prototype[e].apply(d,f)}};function ka(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,ka);else{const c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}ja(ka,Error);ka.prototype.name="CustomError";function m(a){l.setTimeout(()=>{throw a;},0)};var la=ea(610401301,!1),ma=ea(645172343,!0);var na;const oa=l.navigator;na=oa?oa.userAgentData||null:null;function pa(a){return la?na?na.brands.some(({brand:b})=>b&&b.indexOf(a)!=-1):!1:!1}function p(a){var b;a:{if(b=l.navigator)if(b=b.userAgent)break a;b=""}return b.indexOf(a)!=-1};function q(){return la?!!na&&na.brands.length>0:!1}function qa(){return q()?pa("Chromium"):(p("Chrome")||p("CriOS"))&&!(q()?0:p("Edge"))||p("Silk")};function ra(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};!p("Android")||qa();qa();p("Safari")&&(qa()||(q()?0:p("Coast"))||(q()?0:p("Opera"))||(q()?0:p("Edge"))||(q()?pa("Microsoft Edge"):p("Edg/"))||q()&&pa("Opera"));function sa(a){let b="",c=0;const d=a.length-10240;for(;c<d;)b+=String.fromCharCode.apply(null,a.subarray(c,c+=10240));b+=String.fromCharCode.apply(null,c?a.subarray(c):a);return btoa(b)}const ta=/[-_.]/g,ua={"-":"+",_:"/",".":"="};function va(a){return ua[a]||""}function wa(a){return a!=null&&a instanceof Uint8Array}var xa={};let ya;function za(a){if(a!==xa)throw Error("illegal external caller");}var Ba=function(){return ya||(ya=new Aa(null,xa))},Aa=class{constructor(a,b){za(b);this.Z=a;if(a!=null&&a.length===0)throw Error("ByteString should be constructed with non-empty values");}};var Ca=function(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let Da;function Ea(){const a=Error();Ca(a,"incident");m(a)}function Fa(a){a=Error(a);Ca(a,"warning");return a};function Ga(){return typeof BigInt==="function"};function Ha(a){return Array.prototype.slice.call(a)};var r=Symbol(),Ia=Symbol(),Ja=Symbol();function La(a,b){b[r]=(a|0)&-14591}function Ma(a,b){b[r]=(a|34)&-14557};var Na={},Oa={};function Pa(a){return!(!a||typeof a!=="object"||a.rb!==Oa)}function Qa(a){return a!==null&&typeof a==="object"&&!Array.isArray(a)&&a.constructor===Object}function Ra(a,b,c){if(a!=null)if(typeof a==="string")a=a?new Aa(a,xa):Ba();else if(a.constructor!==Aa)if(wa(a))a=a.length?new Aa(c?a:new Uint8Array(a),xa):Ba();else{if(!b)throw Error();a=void 0}return a}function Sa(a){return!Array.isArray(a)||a.length?!1:(a[r]|0)&1?!0:!1}var Ta;const Ua=[];Ua[r]=55;Ta=Object.freeze(Ua);
8
+ new c;a.prototype.constructor=a;a.ob=function(d,e,g){for(var f=Array(arguments.length-2),h=2;h<arguments.length;h++)f[h-2]=arguments[h];return b.prototype[e].apply(d,f)}};function ka(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,ka);else{const c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}ja(ka,Error);ka.prototype.name="CustomError";function m(a){l.setTimeout(()=>{throw a;},0)};var la=ea(610401301,!1),ma=ea(645172343,!0);var na;const oa=l.navigator;na=oa?oa.userAgentData||null:null;function pa(a){return la?na?na.brands.some(({brand:b})=>b&&b.indexOf(a)!=-1):!1:!1}function p(a){var b;a:{if(b=l.navigator)if(b=b.userAgent)break a;b=""}return b.indexOf(a)!=-1};function q(){return la?!!na&&na.brands.length>0:!1}function qa(){return q()?pa("Chromium"):(p("Chrome")||p("CriOS"))&&!(q()?0:p("Edge"))||p("Silk")};function ra(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};!p("Android")||qa();qa();p("Safari")&&(qa()||(q()?0:p("Coast"))||(q()?0:p("Opera"))||(q()?0:p("Edge"))||(q()?pa("Microsoft Edge"):p("Edg/"))||q()&&pa("Opera"));function sa(a){let b="",c=0;const d=a.length-10240;for(;c<d;)b+=String.fromCharCode.apply(null,a.subarray(c,c+=10240));b+=String.fromCharCode.apply(null,c?a.subarray(c):a);return btoa(b)}const ta=/[-_.]/g,ua={"-":"+",_:"/",".":"="};function va(a){return ua[a]||""}function wa(a){return a!=null&&a instanceof Uint8Array}var xa={};let ya;function za(a){if(a!==xa)throw Error("illegal external caller");}var Ba=function(){return ya||(ya=new Aa(null,xa))},Aa=class{constructor(a,b){za(b);this.Z=a;if(a!=null&&a.length===0)throw Error("ByteString should be constructed with non-empty values");}};var Ca=function(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let Da;function Ea(){const a=Error();Ca(a,"incident");m(a)}function Fa(a){a=Error(a);Ca(a,"warning");return a};function Ga(){return typeof BigInt==="function"};function Ha(a){return Array.prototype.slice.call(a)};var r=Symbol(),Ja=Symbol(),Ka=Symbol();function La(a,b){b[r]=(a|0)&-14591}function Ma(a,b){b[r]=(a|34)&-14557};var Na={},Oa={};function Pa(a){return!(!a||typeof a!=="object"||a.rb!==Oa)}function Qa(a){return a!==null&&typeof a==="object"&&!Array.isArray(a)&&a.constructor===Object}function Ra(a,b,c){if(a!=null)if(typeof a==="string")a=a?new Aa(a,xa):Ba();else if(a.constructor!==Aa)if(wa(a))a=a.length?new Aa(c?a:new Uint8Array(a),xa):Ba();else{if(!b)throw Error();a=void 0}return a}function Sa(a){return!Array.isArray(a)||a.length?!1:(a[r]|0)&1?!0:!1}var Ta;const Ua=[];Ua[r]=55;Ta=Object.freeze(Ua);
9
9
  function Va(a){if(a&2)throw Error();}var Wa=Object.freeze({});Object.freeze({});var Xa=Object.freeze({});function Ya(a){a.qb=!0;return a};var Za=Ya(a=>typeof a==="number"),$a=Ya(a=>typeof a==="string"),ab=Ya(a=>typeof a==="boolean");var bb=typeof l.BigInt==="function"&&typeof l.BigInt(0)==="bigint";var hb=Ya(a=>bb?a>=cb&&a<=db:a[0]==="-"?eb(a,fb):eb(a,gb));const fb=Number.MIN_SAFE_INTEGER.toString(),cb=bb?BigInt(Number.MIN_SAFE_INTEGER):void 0,gb=Number.MAX_SAFE_INTEGER.toString(),db=bb?BigInt(Number.MAX_SAFE_INTEGER):void 0;function eb(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++){const d=a[c],e=b[c];if(d>e)return!1;if(d<e)return!0}};let t=0,v=0;function ib(a){const b=a>>>0;t=b;v=(a-b)/4294967296>>>0}function jb(a){if(a<0){ib(0-a);const [b,c]=kb(t,v);t=b>>>0;v=c>>>0}else ib(a)}function lb(a,b){b>>>=0;a>>>=0;if(b<=2097151)var c=""+(4294967296*b+a);else Ga()?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+mb(c)+mb(a));return c}
10
- function mb(a){a=String(a);return"0000000".slice(a.length)+a}function kb(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};function nb(a){if(a==null||typeof a==="boolean")return a;if(typeof a==="number")return!!a}const ob=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function sb(a){const b=typeof a;switch(b){case "bigint":return!0;case "number":return Number.isFinite(a)}return b!=="string"?!1:ob.test(a)}function w(a){if(a!=null){if(!Number.isFinite(a))throw Fa("enum");a|=0}return a}
11
- function tb(a){if(!sb(a))throw Fa("int64");switch(typeof a){case "string":return ub(a);case "bigint":var b=a=BigInt.asIntN(64,a);if($a(b)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(b))throw Error(String(b));}else if(Za(b)&&!Number.isSafeInteger(b))throw Error(String(b));a=bb?BigInt(a):ab(a)?a?"1":"0":$a(a)?a.trim()||"0":String(a);return a;default:return vb(a)}}
12
- function vb(a){a=Math.trunc(a);if(!Number.isSafeInteger(a)){jb(a);var b=t,c=v;if(a=c&2147483648)b=~b+1>>>0,c=~c>>>0,b==0&&(c=c+1>>>0);b=c*4294967296+(b>>>0);a=a?-b:b}return a}
13
- function ub(a){var b=Math.trunc(Number(a));if(Number.isSafeInteger(b))return String(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));if(!(a[0]==="-"?a.length<20||a.length===20&&Number(a.substring(0,7))>-922337:a.length<19||a.length===19&&Number(a.substring(0,6))<922337)){if(a.length<16)jb(Number(a));else if(Ga())a=BigInt(a),t=Number(a&BigInt(4294967295))>>>0,v=Number(a>>BigInt(32)&BigInt(4294967295));else{b=+(a[0]==="-");v=t=0;const c=a.length;for(let d=0+b,e=(c-b)%6+b;e<=c;d=e,e+=6){const g=Number(a.slice(d,
14
- e));v*=1E6;t=t*1E6+g;t>=4294967296&&(v+=Math.trunc(t/4294967296),v>>>=0,t>>>=0)}if(b){const [d,e]=kb(t,v);t=d;v=e}}a=t;b=v;if(b&2147483648)if(Ga())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{const [c,d]=kb(a,b);a="-"+lb(c,d)}else a=lb(a,b)}return a}function wb(a){if(a!=null&&typeof a!=="string")throw Error();return a}function xb(a,b,c){if(a!=null&&typeof a==="object"&&a.na===Na)return a;if(Array.isArray(a)){var d=a[r]|0,e=d;e===0&&(e|=c&32);e|=c&2;e!==d&&(a[r]=e);return new b(a)}};var Cb=function(a){var b=yb(a);if(b)return b;if(Math.random()>.01)return a;if(zb===void 0)if(typeof Proxy!=="function")zb=null;else try{zb=Proxy.toString().indexOf("[native code]")!==-1?Proxy:null}catch{zb=null}b=zb;if(!b)return a;b=new b(a,{set(c,d,e){Ab();c[d]=e;return!0}});Bb(a,b);return b};function Ab(){Ea()}let Db=void 0,Eb=void 0;var yb=function(a){let b;return(b=Db)==null?void 0:b.get(a)};function Bb(a,b){(Db||(Db=new WeakMap)).set(a,b);(Eb||(Eb=new WeakMap)).set(b,a)}let zb=void 0;let Fb;function Gb(a,b){Fb=b;a=new a(b);Fb=void 0;return a};function Hb(a,b){return Ib(b)}function Ib(a){switch(typeof a){case "number":return isFinite(a)?a:String(a);case "bigint":return hb(a)?Number(a):String(a);case "boolean":return a?1:0;case "object":if(a)if(Array.isArray(a)){if(Sa(a))return}else{if(wa(a))return sa(a);if(a instanceof Aa){const b=a.Z;return b==null?"":typeof b==="string"?b:a.Z=sa(b)}}}return a};function Jb(a,b,c){a=Ha(a);var d=a.length;const e=b&256?a[d-1]:void 0;d+=e?-1:0;for(b=b&512?1:0;b<d;b++)a[b]=c(a[b]);if(e){b=a[b]={};for(const g in e)b[g]=c(e[g])}return a}function Kb(a,b,c,d,e){if(a!=null){if(Array.isArray(a))a=Sa(a)?void 0:e&&(a[r]|0)&2?a:Lb(a,b,c,d!==void 0,e);else if(Qa(a)){const g={};for(let f in a)g[f]=Kb(a[f],b,c,d,e);a=g}else a=b(a,d);return a}}
15
- function Lb(a,b,c,d,e){const g=d||c?a[r]|0:0;d=d?!!(g&32):void 0;a=Ha(a);for(let f=0;f<a.length;f++)a[f]=Kb(a[f],b,c,d,e);c&&c(g,a);return a}function Mb(a){return a.na===Na?a.toJSON():Ib(a)};function Nb(a,b,c=Ma){if(a!=null){if(a instanceof Uint8Array)return b?a:new Uint8Array(a);if(Array.isArray(a)){var d=a[r]|0;if(d&2)return a;b&&(b=d===0||!!(d&32)&&!(d&64||!(d&16)));return b?(a[r]=(d|34)&-12293,a):Lb(a,Nb,d&4?Ma:c,!0,!0)}a.na===Na&&(c=a.h,d=c[r],a=d&2?a:Gb(a.constructor,Ob(c,d,!0)));return a}}function Ob(a,b,c){const d=c||b&2?Ma:La,e=!!(b&32);a=Jb(a,b,g=>Nb(g,e,d));a[r]=a[r]|32|(c?2:0);return a}function Pb(a){const b=a.h,c=b[r];return c&2?Gb(a.constructor,Ob(b,c,!1)):a};var Qb=function(a,b){a=a.h;return x(a,a[r],b)};function Rb(a,b,c,d){b=d+(+!!(b&512)-1);if(!(b<0||b>=a.length||b>=c))return a[b]}var x=function(a,b,c,d){if(c===-1)return null;const e=b>>14&1023||536870912;if(c>=e){if(b&256)return a[a.length-1][c]}else{var g=a.length;if(d&&b&256&&(d=a[g-1][c],d!=null)){if(Rb(a,b,e,c)&&Ia!=null){var f;a=(f=Da)!=null?f:Da={};f=a[Ia]||0;f>=4||(a[Ia]=f+1,Ea())}return d}return Rb(a,b,e,c)}},Sb=function(a,b,c){const d=a.h;let e=d[r];Va(e);y(d,e,b,c);return a};
16
- function y(a,b,c,d,e){const g=b>>14&1023||536870912;if(c>=g||e&&!ma){let f=b;if(b&256)e=a[a.length-1];else{if(d==null)return f;e=a[g+(+!!(b&512)-1)]={};f|=256}e[c]=d;c<g&&(a[c+(+!!(b&512)-1)]=void 0);f!==b&&(a[r]=f);return f}a[c+(+!!(b&512)-1)]=d;b&256&&(a=a[a.length-1],c in a&&delete a[c]);return b}var A=function(a,b,c,d){c=z(a,d)===c?c:-1;return Tb(a,b,c)!==void 0};function Ub(a){return!!(2&a)&&!!(4&a)||!!(2048&a)}
17
- function B(a,b,c,d){const e=a.h;let g=e[r];Va(g);y(e,g,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}var z=function(a,b){a=a.h;return Vb(Wb(a),a,a[r],b)};function Wb(a){let b;return(b=a[Ja])!=null?b:a[Ja]=new Map}function Vb(a,b,c,d){let e=a.get(d);if(e!=null)return e;e=0;for(let g=0;g<d.length;g++){const f=d[g];x(b,c,f)!=null&&(e!==0&&(c=y(b,c,e)),e=f)}a.set(d,e);return e}function Tb(a,b,c,d){a=a.h;let e=a[r];const g=x(a,e,c,d);b=xb(g,b,e);b!==g&&b!=null&&y(a,e,c,b,d);return b}
18
- var Xb=function(a,b,c){b=Tb(a,b,c,!1);if(b==null)return b;a=a.h;let d=a[r];if(!(d&2)){const e=Pb(b);e!==b&&(b=e,y(a,d,c,b,!1))}return b},Yb=function(a,b,c){c==null&&(c=void 0);return Sb(a,b,c)},C=function(a,b,c,d){d==null&&(d=void 0);a:{const f=a.h;var e=f[r];Va(e);if(d==null){var g=Wb(f);if(Vb(g,f,e,c)===b)g.set(c,0);else break a}else{g=f;const h=Wb(g),k=Vb(h,g,e,c);k!==b&&(k&&(e=y(g,e,k)),h.set(c,b))}y(f,e,b,d)}return a};function Zb(a,b){a=(2&b?a|2:a&-3)|32;return a&=-2049}
19
- function $b(a,b,c){32&b&&c||(a&=-33);return a}function D(a,b){return a!=null?a:b}
20
- var ac=function(a){a=Qb(a,1);a!=null&&(typeof a==="bigint"?hb(a)?a=Number(a):(a=BigInt.asIntN(64,a),a=hb(a)?Number(a):String(a)):a=sb(a)?typeof a==="number"?vb(a):ub(a):void 0);return D(a,0)},E=function(a,b){a=Qb(a,b);return D(a==null||typeof a==="string"?a:void 0,"")},F=function(a,b){a=Qb(a,b);a=a==null?a:Number.isFinite(a)?a|0:void 0;return D(a,0)},H=function(a,b,c,d){c=z(a,d)===c?c:-1;return Xb(a,b,c)},I=function(a,b,c){return B(a,b,wb(c),"")};let J;
21
- var cc=function(a){try{return J=!0,JSON.stringify(bc(a),Hb)}finally{J=!1}},K=class{constructor(a){a:{a==null&&(a=Fb);Fb=void 0;if(a==null){var b=96;a=[]}else{if(!Array.isArray(a))throw Error("narr");b=a[r]|0;if(b&2048)throw Error("farr");if(b&64)break a;var c=a;b|=64;var d=c.length;if(d&&(--d,Qa(c[d]))){b|=256;c=d-(+!!(b&512)-1);if(c>=1024)throw Error("pvtlmt");b=b&-16760833|(c&1023)<<14}}a[r]=b}this.h=a}toJSON(){return bc(this)}getExtension(a){const b=a.D?a.Xa?a.L(this,a.D,a.F,void 0===Wa?2:4,!0):
22
- a.L(this,a.D,a.F,!0):a.Xa?a.L(this,a.F,void 0===Wa?2:4,!0):a.L(this,a.F,a.defaultValue,!0);return a.pb&&b==null?a.defaultValue:b}hasExtension(a){a.D?a=Tb(this,a.D,a.F,!0)!==void 0:(a=a.D?a.L(this,a.D,a.F,!0):a.L(this,a.F,null,!0),a=(a===null?void 0:a)!==void 0);return a}clone(){const a=this.h;return Gb(this.constructor,Ob(a,a[r],!1))}};K.prototype.na=Na;K.prototype.toString=function(){try{return J=!0,bc(this).toString()}finally{J=!1}};
23
- function bc(a){a=J?a.h:Lb(a.h,Mb,void 0,void 0,!1);{var b=!J;let n=a.length;if(n){var c=a[n-1],d=Qa(c);d?n--:c=void 0;var e=a;if(d){b:{var g=c;var f={};d=!1;if(g)for(var h in g){if(isNaN(+h)){f[h]=g[h];continue}let u=g[h];Array.isArray(u)&&(Sa(u)||Pa(u)&&u.size===0)&&(u=null);u==null&&(d=!0);u!=null&&(f[h]=u)}if(d){for(let u in f)break b;f=null}else f=g}g=f==null?c!=null:f!==c}for(;n>0;n--){h=e[n-1];if(!(h==null||Sa(h)||Pa(h)&&h.size===0))break;var k=!0}if(e!==a||g||k){if(!b)e=Array.prototype.slice.call(e,
24
- 0,n);else if(k||g||f)e.length=n;f&&e.push(f)}k=e}else k=a}return k};function dc(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[r]|=32;b=Gb(a,b)}return b}};var ec=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[r]|=34;return new a(b)}}(class extends K{});var fc=class extends K{setSeconds(a){return B(this,1,a==null?a:tb(a),"0")}};var hc=class extends K{ya(){return z(this,gc)}},gc=[2,3];var ic=class extends K{};var L=class extends Error{constructor({errorType:a,message:b,g:c}){super(`Meet Add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},jc={errorType:"InternalError",message:"An unexpected error has occurred.",g:"No further information is available."},M={errorType:"InternalError",message:"An unexpected error has occurred.",g:"No further information is available."},kc={errorType:"MissingUrlParameter",message:"Missing required Meet SDK URL parameter",g:"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)."},
25
- lc={errorType:"NeedsMainStageContext",message:"This method can only be invoked if the addon is running in the main stage.",g:"Use getFrameType to check whether the addon is running in the main stage before invoking this method."},mc={errorType:"NeedsSidePanelContext",message:"This method can only be invoked if the addon is running in the side panel.",g:"Use getFrameType to check whether the addon is running in the side panel before invoking this method."},nc={errorType:"NotSupportedInStandalone",
26
- message:"This method is not supported in standalone mode.",g:"Do not call this method in standalone mode."},oc={errorType:"InternalError",message:"The frame type URL parameter is set to an unexpected value.",g:"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)."},pc={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.",
27
- g:"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."},qc={errorType:"DestinationNotReady",message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",g:"Make sure the destination frame has connected before sending messages to it."},rc={errorType:"InvalidActivityStartingState",
28
- message:"Origin of the ActivityStartingState iframeURLs does not match the origin of the URLs provided in the Add-on manifest.",g:"Ensure that the ActivityStartingState iframeURL origins match the origins of the URLs provided in the Add-on manifest."},sc={errorType:"ActivityStartingStateMissingAttributes",message:"The supplied ActivityStartingState object does not contain any recognized attributes.",g:"Ensure that the ActivityStartingState object contains at least one of the following attributes: mainStageUrl, sidePanelUrl, additionalData."},
29
- tc={errorType:"ActivityStartingStateUnrecognizedAttributes",message:"The supplied ActivityStartingState object contains attributes that are not recognized.",g:"Ensure that the ActivityStartingState object has only the following attributes: mainStageUrl, sidePanelUrl, additionalData."},uc=a=>({errorType:"ArgumentNullError",message:`The argument supplied for '${a}' was 'null' but a value was expected.`,g:"Ensure you are passing a value of the expected type for the argument."}),vc=(a,b,c)=>({errorType:"ArgumentTypeError",
30
- message:`The type '${b}' of argument supplied for '${a}' did not match the expected type '${c}'.`,g:"Ensure the type of the argument provided matches the expected type."}),wc=a=>({errorType:"InternalError",message:`Could not connect to ${a} channel. Unknown error`,g:"No further information is available."}),yc={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",g:"Ensure that no activity is ongoing."},zc={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",
31
- g:"Send one of the available commands in the frame message."},Ac={errorType:"RequiresEapEnrollment",message:"This feature is only available to early access partners.",g:"Meet add-on early access enrollment is currently closed."},Bc={errorType:"UserNotInitiator",message:"Operation cannot be performed because the user is not the initiator of the current activity.",g:"Ensure that the user is the initiator of the current activity or that the activity has ended."},Cc={errorType:"SizeLimitExceededActivityStartingState",
32
- message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",g:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Dc={errorType:"SizeLimitExceededFrameToFrameMessage",message:"The size of the frame to frame message exceeds the limits allowed.",g:"Ensure that the frame to frame message size is less than 1,000,000 characters."},Ec={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",
33
- g:"Only instantiate the AddonSession once."},Fc={errorType:"UserCancelled",message:"The user cancelled starting an activity.",g:"The user needs to click continue to start the activity."},Gc={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",g:"Do not call this method during a Meet call."},Hc={errorType:"InvalidAddonStartingState",message:"Origin of the AddonStartingState iframeURLs does not match the origin of the URLs provided in the Add-on manifest.",
34
- g:"Ensure that the AddonStartingState iframeURL origins match the origins of the URLs provided in the Add-on manifest."},Ic={errorType:"SizeLimitExceededAddonStartingState",message:"The size of the AddonStartingState URLs and/or its data exceed the limits allowed.",g:"Ensure that the AddonStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."};
35
- function Jc(a){switch(a){case 0:return jc;case 1:return qc;case 2:return rc;case 3:return yc;case 4:return zc;case 5:return Ac;case 6:return nc;case 7:return Bc;case 8:return Cc;case 9:return Dc;case 10:return Fc;case 11:return Gc;case 12:return Hc;case 13:return Ic;default:return M}}
36
- function Kc(a){let b;var c=(b=F(a,1))!=null?b:0;a=Lc(a.ya());switch(c){case 1:return{errorType:"InternalError",message:`Could not connect to ${a} channel. Meet did not respond with a MessagePort.`,g:"No further information is available."};case 2:return{errorType:"InternalError",message:`Could not connect to ${a}. A conflicting ${a} exists.`,g:"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}.`,
37
- g:"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}.`,g:"No further information is available."};case 0:return wc(a);case 5:a:switch(a){case "coActivity":c={errorType:"InternalError",message:`Could not connect to ${a} channel. The coActivity was not found.`,g:`Consider starting the ${a} only after after the startActivity promise returns.`};break a;default:c={errorType:"InternalError",
38
- message:`Could not connect to ${a} channel.`,g:"No further information is available."}}return c;default:return wc(a)}}function Lc(a){switch(a){case 2:return"coActivity";case 3:return"guaranteed delivery";case 0:return"unknown";default:return"unknown"}}function Mc({errorType:a,message:b,g:c},d=""){throw new L({errorType:a,message:d?`${b} ${d}`:b,g:c});}function Nc(a,b){Mc({...kc,message:`${kc.message}: ${a}. In URL ${b}`})};var Pc=function(a){var b=new Oc;return B(b,1,w(a),0)},Oc=class extends K{getFrameType(){return F(this,1)}};var Qc=function(a){var b=a.h,c=b[r];a=c;var d=!(2&c),e=Oc,g=void 0===Wa?2:5;g=(c=!!(2&a))?1:g;d&&(d=!c);c=x(b,a,1);c=Array.isArray(c)?c:Ta;var f=c[r]|0,h=!!(4&f);if(!h){var k=f;k===0&&(k=Zb(k,a));f=c;k|=1;var n=a;const G=!!(2&k);G&&(n|=2);let P=!G,pb=!0,Ka=0,qb=0;for(;Ka<f.length;Ka++){const rb=xb(f[Ka],e,n);if(rb instanceof e){if(!G){const xc=!!((rb.h[r]|0)&2);P&&(P=!xc);pb&&(pb=xc)}f[qb++]=rb}}qb<Ka&&(f.length=qb);k|=4;k=pb?k|16:k&-17;k=P?k|8:k&-9;f[r]=k;G&&Object.freeze(f);f=k}if(d&&!(8&f||!c.length&&
39
- (g===1||g===4&&32&f))){Ub(f)&&(c=Ha(c),f=Zb(f,a),a=y(b,a,1,c));d=c;e=f;for(f=0;f<d.length;f++)k=d[f],n=Pb(k),k!==n&&(d[f]=n);e|=8;e=d.length?e&-17:e|16;f=d[r]=e}let u;g===1||g===4&&32&f?Ub(f)||(a=f,b=!!(32&f),f|=!c.length||16&f&&(!h||b)?2:2048,f!==a&&(c[r]=f),Object.freeze(c)):(h=g!==5?!1:!!(32&f)||Ub(f)||!!yb(c),(g===2||h)&&Ub(f)&&(c=Ha(c),f=Zb(f,a),f=$b(f,a,!1),c[r]=f,a=y(b,a,1,c)),Ub(f)||(b=f,f=$b(f,a,!1),f!==b&&(c[r]=f)),h&&(u=Cb(c)));return u||c},Sc=function(a){{var b=new Rc;const u=b.h;let G=
40
- u[r];Va(G);if(a==null)y(u,G,1);else{var c=a,d;a=((d=Eb)==null?void 0:d.get(c))||c;c=d=a[r]|0;var e=!!(2&d)||!!(2048&d),g=e||Object.isFrozen(a),f;if(f=!g)f=void 0===Xa||!1;var h=!0,k=!0;for(let P=0;P<a.length;P++){var n=a[P];e||(n=!!((n.h[r]|0)&2),h&&(h=!n),k&&(k=n))}e||(d|=5,d=h?d|8:d&-9,d=k?d|16:d&-17);if(f||g&&d!==c)a=Ha(a),c=0,d=Zb(d,G),d=$b(d,G,!0);d!==c&&(a[r]=d);y(u,G,1,a)}}return b},Rc=class extends K{};var Tc=class extends K{constructor(){super()}};var Vc=function(a){var b=new Uc;return B(b,1,w(a),0)},Uc=class extends K{constructor(){super()}};var Wc=class extends K{Ja(a){return I(this,2,a)}};var Xc=class extends K{};var Yc=class extends K{};var $c=class extends K{R(){return z(this,Zc)}ja(){return H(this,Rc,2,Zc)}Y(a){return C(this,2,Zc,a)}getMeetingInfo(){return H(this,Yc,3,Zc)}getMeetPlatformInfo(){return H(this,Xc,4,Zc)}},Zc=[2,3,4,5];var bd=class extends K{za(){return z(this,ad)}},ad=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17];var cd=class extends K{constructor(){super()}ja(){return Xb(this,Rc,1)}Y(a){return Yb(this,1,a)}};var dd=class extends K{constructor(){super()}ja(){return Xb(this,Rc,1)}Y(a){return Yb(this,1,a)}};var ed=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),fd=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function gd(a){a&&typeof a.dispose=="function"&&a.dispose()};var N=function(){this.o=this.o;this.A=this.A};N.prototype.o=!1;N.prototype.dispose=function(){this.o||(this.o=!0,this.ea())};N.prototype[Symbol.dispose]=function(){this.dispose()};var hd=function(a,b){a.o?b():(a.A||(a.A=[]),a.A.push(b))};N.prototype.ea=function(){if(this.A)for(;this.A.length;)this.A.shift()()};var id=function({ra:a,Fa:b}){if(a===null)throw new L(uc("activityStartingState"));if(b||a!==void 0){if(typeof a!=="object")throw new L(vc("activityStartingState",typeof a,`object${b?"":" | undefined"}`));if(a.mainStageUrl!==void 0&&typeof a.mainStageUrl!=="string")throw new L(vc("mainStageUrl",typeof a.mainStageUrl,"string | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new L(vc("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&
41
- typeof a.additionalData!=="string")throw new L(vc("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new L(tc);if(Object.keys(a).length===0)throw new L(sc);}},jd=function(a){const b=[];var c=b.push;var d=Pc(2);d=I(d,2,a.mainStageUrl);d=I(d,3,a.additionalData);c.call(b,d);c=b.push;d=Pc(1);d=I(d,2,a.sidePanelUrl);a=I(d,3,a.additionalData);c.call(b,a);return b},rd=class extends N{constructor(a){super();
42
- this.context=a;this.Da={};kd(this.context.i.fb,b=>{switch(b.content.za()){case 7:const d=this.Da.frameToFrameMessage;b=H(b.content,Wc,7,ad);if(d&&b){var c=F(b,1);c=ed.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:E(b,2)})}break;case 16:ld(this.context.i)}})}async getMeetingInfo(){const a=await md(this.context.i,Vc(2));return{meetingId:E(a.getMeetingInfo(),1)}}async getFrameOpenReason(){let a;const b=(a=this.context.ca.Ua)!=null?a:0;let c;return(c=fd.get(b))!=null?
43
- c:"UNKNOWN"}async getActivityStartingState(){var a=(await md(this.context.i,Vc(1))).ja();const b=a==null?void 0:Qc(a).find(c=>c.getFrameType()===2);a=a==null?void 0:Qc(a).find(c=>c.getFrameType()===1);return{mainStageUrl:(b==null?void 0:E(b,2))||void 0,sidePanelUrl:(a==null?void 0:E(a,2))||void 0,additionalData:(a==null?void 0:E(a,3))||void 0}}async setActivityStartingState(a){id({ra:a,Fa:!0});a=jd(a);await nd(this.context.i,(new cd).Y(Sc(a)))}on(a,b){this.Da[a]=b}async getMeetPlatformInfo(){const a=
44
- await md(this.context.i,Vc(3));return{isMeetHardware:D(nb(Qb(a.getMeetPlatformInfo(),1)),!1)}}async closeAddon(){await od(this.context.i)}async startActivity(a){id({ra:a,Fa:!1});const b=new dd;a&&(a=jd(a),b.Y(Sc(a)));await pd(this.context.i,b)}async endActivity(a){var b=qd,c=this.context.i,d=new Tc;a=B(d,1,w(a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0),0);await b(c,a)}};var sd=dc(class extends K{getFrameOpenReason(){return F(this,5)}});function td(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");c?b=sd(atob(c)):(Nc("meet_sdk",b),b=void 0);(c=E(b,1))||Nc("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new L(oc);const d=E(b,2);d||Nc("meet_control_channel_name",a);const e=E(b,4);e||Nc("addon_cloud_project_number",a);var g;a=(g=b.getFrameOpenReason())!=null?g:0;g=E(b,3)||"https://meet.google.com";return{Ua:a,frameType:c,Qa:d,cloudProjectNumber:e,Ga:g}};var ud=class extends K{constructor(){super()}};var vd=class extends K{constructor(){super()}};var yd=function(){var a=new wd,b=new vd;return C(a,1,xd,b)},wd=class extends K{constructor(){super()}ya(){return z(this,xd)}},xd=[1,2];var zd=class extends K{constructor(){super()}};var Ad=class extends K{constructor(){super()}};var Bd=class extends K{constructor(){super()}Ja(a){return I(this,2,a)}};var Cd=class extends K{constructor(){super()}};var Dd=class extends K{constructor(){super()}};var Q=class extends K{constructor(){super()}za(){return z(this,O)}},O=[1,2,5,6,7,8,9,10,11,13,14,15,16];var Ed=class extends K{},Fd=dc(Ed),Gd=[1,2];class Hd{constructor(a,b){this.data=a;this.channel=b}};var Id=Promise;var Kd=function(a){const b=new MessageChannel;Jd(b.port1,a);return b},Md=function(a,b){Jd(a,b);return new Ld(a)};class Ld{constructor(a){this.hb=a}send(a,b,c=[]){b=Kd(b);this.hb.postMessage(a,[b.port2].concat(c))}N(a,b){return new Id(c=>{this.send(a,c,b)})}}const Jd=function(a,b){b&&(a.onmessage=c=>{var d=c.data;c=Md(c.ports[0]);b(new Hd(d,c))})};class Nd{constructor(a,b){this.Za=100;this.Ra=a;this.kb=b;this.V=0;this.U=null}get(){let a;this.V>0?(this.V--,a=this.U,this.U=a.next,a.next=null):a=this.Ra();return a}put(a){this.kb(a);this.V<this.Za&&(this.V++,a.next=this.U,this.U=a)}};var Od=function(){var a=document;var b="IFRAME";a.contentType==="application/xhtml+xml"&&(b=b.toLowerCase());return a.createElement(b)};var Pd=function(){};var Qd,Rd=function(){var a=l.MessageChannel;typeof a==="undefined"&&typeof window!=="undefined"&&window.postMessage&&window.addEventListener&&!p("Presto")&&(a=function(){var e=Od();e.style.display="none";document.documentElement.appendChild(e);var g=e.contentWindow;e=g.document;e.open();e.close();var f="callImmediate"+Math.random(),h=g.location.protocol=="file:"?"*":g.location.protocol+"//"+g.location.host;e=ha(function(k){if((h=="*"||k.origin==h)&&k.data==f)this.port1.onmessage()},this);g.addEventListener("message",
45
- e,!1);this.port1={};this.port2={postMessage:function(){g.postMessage(f,h)}}});if(typeof a!=="undefined"){var b=new a,c={},d=c;b.port1.onmessage=function(){if(c.next!==void 0){c=c.next;var e=c.ua;c.ua=null;e()}};return function(e){d.next={ua:e};d=d.next;b.port2.postMessage(0)}}return function(e){l.setTimeout(e,0)}};class Sd{constructor(){this.aa=this.J=null}add(a,b){const c=Td.get();c.set(a,b);this.aa?this.aa.next=c:this.J=c;this.aa=c}remove(){let a=null;this.J&&(a=this.J,this.J=this.J.next,this.J||(this.aa=null),a.next=null);return a}}var Td=new Nd(()=>new Ud,a=>a.reset());class Ud{constructor(){this.next=this.scope=this.ga=null}set(a,b){this.ga=a;this.scope=b;this.next=null}reset(){this.next=this.scope=this.ga=null}};let Vd,Wd=!1,Xd=new Sd,Zd=(a,b)=>{Vd||Yd();Wd||(Vd(),Wd=!0);Xd.add(a,b)},Yd=()=>{if(l.Promise&&l.Promise.resolve){const a=l.Promise.resolve(void 0);Vd=()=>{a.then($d)}}else Vd=()=>{var a=$d;typeof l.setImmediate!=="function"||l.Window&&l.Window.prototype&&l.Window.prototype.setImmediate==l.setImmediate?(Qd||(Qd=Rd()),Qd(a)):l.setImmediate(a)}};var $d=()=>{let a;for(;a=Xd.remove();){try{a.ga.call(a.scope)}catch(b){m(b)}Td.put(a)}Wd=!1};var R=function(a){this.l=0;this.Ha=void 0;this.C=this.u=this.B=null;this.S=this.fa=!1;if(a!=Pd)try{var b=this;a.call(void 0,function(c){ae(b,2,c)},function(c){ae(b,3,c)})}catch(c){ae(this,3,c)}},be=function(){this.next=this.context=this.H=this.M=this.v=null;this.K=!1};be.prototype.reset=function(){this.context=this.H=this.M=this.v=null;this.K=!1};
46
- var ce=new Nd(function(){return new be},function(a){a.reset()}),de=function(a,b,c){var d=ce.get();d.M=a;d.H=b;d.context=c;return d},fe=function(){var a,b,c=new R(function(d,e){a=d;b=e});return new ee(c,a,b)};R.prototype.then=function(a,b,c){return ge(this,typeof a==="function"?a:null,typeof b==="function"?b:null,c)};R.prototype.$goog_Thenable=!0;var ie=function(a,b){b=de(b,b);b.K=!0;he(a,b)};R.prototype.lb=function(a,b){return ge(this,null,a,b)};R.prototype.catch=R.prototype.lb;
47
- R.prototype.cancel=function(a){if(this.l==0){var b=new S(a);Zd(function(){je(this,b)},this)}};
48
- var je=function(a,b){if(a.l==0)if(a.B){var c=a.B;if(c.u){for(var d=0,e=null,g=null,f=c.u;f&&(f.K||(d++,f.v==a&&(e=f),!(e&&d>1)));f=f.next)e||(g=f);e&&(c.l==0&&d==1?je(c,b):(g?(d=g,d.next==c.C&&(c.C=d),d.next=d.next.next):ke(c),le(c,e,3,b)))}a.B=null}else ae(a,3,b)},he=function(a,b){a.u||a.l!=2&&a.l!=3||me(a);a.C?a.C.next=b:a.u=b;a.C=b},ge=function(a,b,c,d){var e=de(null,null,null);e.v=new R(function(g,f){e.M=b?function(h){try{var k=b.call(d,h);g(k)}catch(n){f(n)}}:g;e.H=c?function(h){try{var k=c.call(d,
49
- h);k===void 0&&h instanceof S?f(h):g(k)}catch(n){f(n)}}:f});e.v.B=a;he(a,e);return e.v};R.prototype.mb=function(a){this.l=0;ae(this,2,a)};R.prototype.nb=function(a){this.l=0;ae(this,3,a)};
50
- var ae=function(a,b,c){if(a.l==0){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.l=1;a:{var d=c,e=a.mb,g=a.nb;if(d instanceof R){he(d,de(e||Pd,g||null,a));var f=!0}else{if(d)try{var h=!!d.$goog_Thenable}catch(n){h=!1}else h=!1;if(h)d.then(e,g,a),f=!0;else{h=typeof d;if(h=="object"&&d!=null||h=="function")try{var k=d.then;if(typeof k==="function"){ne(d,k,e,g,a);f=!0;break a}}catch(n){g.call(a,n);f=!0;break a}f=!1}}}f||(a.Ha=c,a.l=b,a.B=null,me(a),b!=3||c instanceof S||oe(a,c))}},
51
- ne=function(a,b,c,d,e){var g=!1,f=function(k){g||(g=!0,c.call(e,k))},h=function(k){g||(g=!0,d.call(e,k))};try{b.call(a,f,h)}catch(k){h(k)}},me=function(a){a.fa||(a.fa=!0,Zd(a.Ta,a))},ke=function(a){var b=null;a.u&&(b=a.u,a.u=b.next,b.next=null);a.u||(a.C=null);return b};R.prototype.Ta=function(){for(var a;a=ke(this);)le(this,a,this.l,this.Ha);this.fa=!1};
52
- var le=function(a,b,c,d){if(c==3&&b.H&&!b.K)for(;a&&a.S;a=a.B)a.S=!1;if(b.v)b.v.B=null,pe(b,c,d);else try{b.K?b.M.call(b.context):pe(b,c,d)}catch(e){qe.call(null,e)}ce.put(b)},pe=function(a,b,c){b==2?a.M.call(a.context,c):a.H&&a.H.call(a.context,c)},oe=function(a,b){a.S=!0;Zd(function(){a.S&&qe.call(null,b)})},qe=m,S=function(a){ka.call(this,a)};ja(S,ka);S.prototype.name="cancel";var ee=function(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let re=1,se=new WeakMap;
53
- var ue=function(a,b,c){var d=te;a.Ma.has(b);d(b,c)},we=class extends N{constructor(){super();this.Ma=new Set}signal(){const a=new ve;this.Ma.add(a);hd(this,ia(gd,a));return a}},te=function(a,b){return new Promise(c=>{xe(()=>{a.ta&&(a.Ya=b,a.Ca=!0);for(const {qa:d,slot:e}of a.j.values())try{e(b,{signal:a,qa:d})}catch(g){m(g)}for(const d of a.I)d.resolve(b);a.I.clear();c()})})},kd=function(a,b,c){const d=re++;xe(()=>{ye(a,d,b,c)});return d},ye=function(a,b,c,d){if(!a.o)if(d){if(!d.o){const e=()=>{xe(()=>
54
- {a.j.delete(b);const g=se.get(d);g&&ra(g,e)})};a.j.set(b,{qa:b,slot:c,da:e});ze(d,e)}}else a.j.set(b,{qa:b,slot:c,da:()=>a.j.delete(b)})},ve=class extends N{constructor(){super();this.ta=!1;this.j=new Map;this.I=new Set;this.Ca=!1}detach(a){xe(()=>{const b=this.j.get(a);b&&b.da()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){const c=fe();xe(()=>{if(this.o)c.reject(new S("Signal initially disposed"));else if(b&&b.o)c.reject(new S("Owner initially disposed"));else if(a&&
55
- this.ta&&this.Ca)c.resolve(this.Ya);else if(this.I.add(c),ie(c.promise,()=>{this.I.delete(c)}),b){const d=()=>{c.reject(new S("Owner asynchronously disposed"))};ie(c.promise,()=>{const e=se.get(b);e&&ra(e,d)});ze(b,d)}});return c.promise}ea(){super.ea();xe(()=>{for(const {da:a}of this.j.values())a();this.j.clear();for(const a of this.I)a.reject(new S("Signal asynchronously disposed"));this.I.clear()})}};const Ae=[];let Be=!1;function xe(a){Ae.push(a);Ce()}
56
- async function Ce(){if(!Be)try{Be=!0;let a=De(0);for(;a<Ae.length;)await Promise.resolve(),a=De(a)}catch(a){m(a)}finally{Ae.length=0,Be=!1}}function De(a){const b=a+100;for(;a<b&&a<Ae.length;)try{Ae[a++]()}catch(c){m(c)}return a}function ze(a,b){if(a.o)b();else{var c=se.get(a);if(c)c.push(b);else{const d=[b];se.set(a,d);hd(a,()=>{for(const e of[...d])e();se.delete(a)})}}};function T(a){var b=new Ed;a=C(b,1,Gd,a);return{content:cc(a)}}const Ee=new we;function Fe(a,b){const c=Ee.signal();return{channel:Md(a,d=>{const e=b(d.data);ue(Ee,c,{content:e,jb:d})}),signal:c}};let Ge;var U=class extends K{getState(){const a=this.h;let b=a[r];const c=x(a,b,1),d=Ra(c,!0,!!(b&34));d!=null&&d!==c&&y(a,b,1,d);return d==null?Ba():d}};var V=class extends K{};var Ie=class extends K{ha(){return H(this,U,2,He)}W(a){C(this,2,He,a)}T(){return A(this,U,2,He)}ia(){return H(this,V,3,He)}X(a){C(this,3,He,a)}ka(){return A(this,V,3,He)}},He=[2,3];var Je=dc(class extends K{});var Le=dc(class extends K{R(){return z(this,Ke)}}),Ke=[1,2];var Me=({destination:a,origin:b,tb:c,Na:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");const g=Kd(e);a.postMessage(c?{n:d,t:c}:d,b,[g.port2]);return Md(g.port1,e)};function Ne(a,b,c){const d=new we,e=d.signal();a=Me({destination:window.parent,origin:b,Na:a,onMessage:g=>{const f=Fd(g.data.content);z(f,Gd)===2&&ue(d,e,{content:H(f,bd,2,Gd),jb:g,messagePort:g.data.messagePort})}});return new Oe(e,a,c)}
57
- var ld=async function(a){a=a.channel;var b=a.N;var c=new Q;var d=new Cd;c=C(c,13,O,d);await b.call(a,T(c))},md=async function(a,b){var c=W,d=new Q;b=C(d,9,O,b);a=await c(a,T(b));let e;return(e=H(Fd(a.data.content),bd,2,Gd))==null?void 0:H(e,$c,9,ad)},nd=async function(a,b){var c=W,d=new Q;b=C(d,8,O,b);await c(a,T(b))},od=async function(a){var b=W;var c=new Q;var d=new ud;c=C(c,11,O,d);await b(a,T(c))},pd=async function(a,b){var c=W,d=new Q;b=C(d,14,O,b);await c(a,T(b))},qd=async function(a,b){var c=
58
- W,d=new Q;b=C(d,15,O,b);await c(a,T(b))},Pe=async function(a){setInterval(async()=>{await ld(a)},1E3)},W=async function(a,b){(a=await a.channel.N(b))||Mc(M,"Falsy response received from the message channel."+` ${JSON.stringify(a)}`);(b=a.data)||Mc(M,"Data field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);(b=b.content)||Mc(M,"Content field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);let c=void 0;try{c=Fd(b)}catch(d){Mc(M,"The ControlMessage can't be deserialized."+
59
- ` ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=H(c,bd,2,Gd))||Mc(M,"MeetToAddonMessage field on ControlMessage is falsy."+` ${JSON.stringify(b)}`);b=b==null?void 0:H(b,ic,10,ad);if((b==null?void 0:F(b,1))!==void 0)throw new L(Jc(F(b,1)));return a},Qe=async function(a,b,c){var d=W,e=new Q;b=C(e,1,O,b);d=await d(a,T(b));a=d.data.messagePort;var g;(d=(g=H(Fd(d.data.content),bd,2,Gd))==null?void 0:H(g,hc,1,ad))!=null?g=d:(g=new hc,g=B(g,1,w(0),0));return{channel:a?Fe(a,c):void 0,response:g}},Re=async function(a){const b=
60
- yd(),{channel:c,response:d}=await Qe(a,b,e=>Le(e));if(!c)throw new L(Kc(d));return c},Se=async function(a){var b=W;var c=new Q;var d=new Dd;c=C(c,5,O,d);await b(a,T(c))},Te=async function(a){var b=W;var c=new Q;var d=new Ad;c=C(c,6,O,d);await b(a,T(c))},Ue=async function(a,b,c){var d=W,e=new Q,g=new Bd;b=B(g,1,w(b),0).Ja(c);e=C(e,7,O,b);await d(a,T(e))};
61
- class Oe extends N{constructor(a,b,c){super();this.fb=a;this.channel=b;a=Ge||(Ge=ec("[0,9,1]"));a=Pb(a);a=Sb(a,4,wb("670722405"));b=a.h;var d=b[r];b=d&2?a:Gb(a.constructor,Ob(b,d,!0));a=new Q;d=new zd;b=Yb(d,2,b);c=I(b,3,c);c=C(a,2,O,c);this.channel.send(T(c));Pe(this)}};let Ve;var We=class{constructor(a){var b=Ve;this.ca=a;this.i=b}delete(){throw Error("Not implemented.");}};var Ye=class extends K{constructor(){super()}pa(a){return B(this,1,a==null?a:tb(a),"0")}ha(){return H(this,U,2,Xe)}W(a){C(this,2,Xe,a)}T(){return A(this,U,2,Xe)}ia(){return H(this,V,3,Xe)}X(a){C(this,3,Xe,a)}ka(){return A(this,V,3,Xe)}},Xe=[2,3];var Ze=class extends K{constructor(){super()}};var $e=class extends K{constructor(){super()}};var af=class extends K{constructor(){super()}oa(a){return Sb(this,4,wb(a))}};var cf=class extends K{constructor(){super()}pa(a){return B(this,1,a==null?a:tb(a),"0")}ha(){return H(this,U,2,bf)}W(a){C(this,2,bf,a)}T(){return A(this,U,2,bf)}ia(){return H(this,V,3,bf)}X(a){C(this,3,bf,a)}ka(){return A(this,V,3,bf)}},bf=[2,3],df=[5,6];var ef=class extends K{constructor(){super()}oa(a){return I(this,1,a)}};var gf=class extends K{constructor(){super()}R(){return z(this,ff)}},ff=[1,2,3];function hf(a){var b=new jf;let c=0,d;return(...e)=>{if(kf(b)){lf(b);var g=!0}else g=!1;g?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;let f;(f=d)==null||f()},mf(b))))}};var mf=function(a){const b=a.wa;let c;a=Date.now()-((c=a.la[a.index])!=null?c:0);return a>=b?0:b-a},kf=function(a){const b=a.wa;let c;return Date.now()-((c=a.la[a.index])!=null?c:0)>=b},lf=function(a){a.la[a.index]=Date.now();a.index=(a.index+1)%a.ab},jf=class{constructor(){this.ab=1;this.wa=500;this.la=[];this.index=0}};var nf=class extends Error{constructor(){super("Failed to create CoActivity: Connection refused - Meet refused to begin Live Sharing")}};var of=class{constructor(a){this.config=a}start(){this.Ea!=null||(this.Ea=setInterval(()=>{this.config.eb()},this.config.Wa));return this}shutdown(){clearInterval(this.Ea)}};function pf(){const a=new Map,b={set(c,d){a.set(c,d);return b},ba:()=>a};return b};function qf(a){if(a.T()){var b=a.ha().getState();a=Uint8Array;za(xa);var c=b.Z;if(c!=null&&!wa(c))if(typeof c==="string"){ta.test(c)&&(c=c.replace(ta,va));c=atob(c);const 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.Z=c;return{bytes:new a(b||0)}}}function rf(a,b){a.W(sf(b));return a}function tf(a,b){a.W(sf(b));return a}function sf(a){var b=new U;return B(b,1,Ra(a.bytes,!1,!1),Ba())}
62
- function uf(a){if(a.ka()){a=a.ia();var b,c,d=E(a,1),e=(c=(b=Xb(a,fc,2))==null?void 0:ac(b))!=null?c:0;c=a.h;let g=c[r];const f=x(c,g,4);b=f==null||typeof f==="number"?f:f==="NaN"||f==="Infinity"||f==="-Infinity"?Number(f):void 0;b!=null&&b!==f&&y(c,g,4,b);return{mediaId:d,mediaPlayoutPosition:e,mediaPlayoutRate:D(b,0),playbackState:vf.get(F(a,3))}}}function wf(a,b){a.X(xf(b));return a}function yf(a,b){a.X(xf(b));return a}
63
- const vf=pf().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED").ba(),zf=pf().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4).ba();function xf(a){var b=new V;b=I(b,1,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=B(b,4,c,0);c=(new fc).setSeconds(a.mediaPlayoutPosition);b=Yb(b,2,c);a=zf.get(a.playbackState);return B(b,3,w(a),0)}
64
- function Af({activityTitle:a}){return(new af).oa(a)}function Bf(a,b){var c=new $e;b=B(c,1,w(b.G),0);C(a,6,df,b);return a}function Cf(a){var b=new Ze;C(a,5,df,b);return a};const Df=pf().set("co-doing",1).set("co-watching",2).ba();async function Ef(a,b,c){var d=b.N,e=new gf;var g=(new ef).oa(a.activityTitle);var f=Df.get(a.sa);g=B(g,2,w(f),0);e=C(e,3,ff,g);d=await d.call(b,e,Je);let h;if((h=D(nb(Qb(d,1)),!1))!=null&&h)return new Ff(a,b,c,Xb(d,Ie,2));throw new nf;}var Gf=function(a,b){const c=a.config.Aa(b);c&&!a.config.xa(a.s,c)&&(a.s=c,a.ma=ac(b),a.Sa(a.s))},X=function(a,b){const {state:c,bb:d,context:e}=b(a.s);a.s=c;a.notify(a.s,e,d)};
65
- class Ff{constructor(a,b,c,d){this.va=a;this.P=b;this.config=c;this.Sa=hf(e=>void this.va.Ba(e));Hf(this.P,e=>{const g=e.R();switch(g){case 1:Gf(this,H(e,Ie,1,Ke));break;case 2:case 0:console.warn(`IllegalMessage: ${g} - ${"Unhandled message"} - ${"Please raise a bug with the MeetJS team"}`)}});this.Va=(new of({Wa:1E3,eb:()=>{var e,g;const f=(g=(e=this.va).ib)==null?void 0:g.call(e);this.s!==null&&(this.s={...this.s,...f},e=new gf,g=this.config.Ka((new Ye).pa(this.ma),this.s),e=C(e,1,ff,g),this.P.send(e))}})).start();
66
- this.s=null;this.ma=0;d&&Gf(this,d)}disconnect(){this.P.shutdown();this.Va.shutdown()}notify(a,b,c){var d=c?Af(c):void 0;c=this.config;var e=c.La,g=(new cf).pa(this.ma);d=Yb(g,4,d);a=e.call(c,d,a);a=this.config.Ia(a,b);b=this.P;c=b.send;e=new gf;a=C(e,2,ff,a);c.call(b,a)}};var If=class{constructor(a){this.m=a}broadcastStateUpdate(a){X(this.m,()=>({state:a,context:{}}))}disconnect(){this.m.disconnect()}};function Jf(a,b){return a==null||b==null?!1:a.bytes.length===b.bytes.length&&a.bytes.every((c,d)=>c===b.bytes[d])};var Kf=class{constructor(a){this.m=a}notifySwitchedToMedia(a,b,c){X(this.m,()=>({state:{mediaId:b,mediaPlayoutRate:1,mediaPlayoutPosition:c,playbackState:"PLAY"},bb:{activityTitle:a},context:{G:1}}))}notifyPauseState(a,b){X(this.m,c=>{if(c==null)throw Error("Invalid before coWatchingState");return{state:{...c,playbackState:a?"PAUSE":"PLAY",mediaPlayoutPosition:b},context:{G:3}}})}notifySeekToTimestamp(a){X(this.m,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},
10
+ function mb(a){a=String(a);return"0000000".slice(a.length)+a}function kb(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};const nb=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function rb(a){const b=typeof a;switch(b){case "bigint":return!0;case "number":return Number.isFinite(a)}return b!=="string"?!1:nb.test(a)}function w(a){if(a!=null){if(!Number.isFinite(a))throw Fa("enum");a|=0}return a}
11
+ function sb(a){if(!rb(a))throw Fa("int64");switch(typeof a){case "string":return tb(a);case "bigint":var b=a=BigInt.asIntN(64,a);if($a(b)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(b))throw Error(String(b));}else if(Za(b)&&!Number.isSafeInteger(b))throw Error(String(b));a=bb?BigInt(a):ab(a)?a?"1":"0":$a(a)?a.trim()||"0":String(a);return a;default:return ub(a)}}
12
+ function ub(a){a=Math.trunc(a);if(!Number.isSafeInteger(a)){jb(a);var b=t,c=v;if(a=c&2147483648)b=~b+1>>>0,c=~c>>>0,b==0&&(c=c+1>>>0);b=c*4294967296+(b>>>0);a=a?-b:b}return a}
13
+ function tb(a){var b=Math.trunc(Number(a));if(Number.isSafeInteger(b))return String(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));if(!(a[0]==="-"?a.length<20||a.length===20&&Number(a.substring(0,7))>-922337:a.length<19||a.length===19&&Number(a.substring(0,6))<922337)){if(a.length<16)jb(Number(a));else if(Ga())a=BigInt(a),t=Number(a&BigInt(4294967295))>>>0,v=Number(a>>BigInt(32)&BigInt(4294967295));else{b=+(a[0]==="-");v=t=0;const c=a.length;for(let d=0+b,e=(c-b)%6+b;e<=c;d=e,e+=6){const g=Number(a.slice(d,
14
+ e));v*=1E6;t=t*1E6+g;t>=4294967296&&(v+=Math.trunc(t/4294967296),v>>>=0,t>>>=0)}if(b){const [d,e]=kb(t,v);t=d;v=e}}a=t;b=v;if(b&2147483648)if(Ga())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{const [c,d]=kb(a,b);a="-"+lb(c,d)}else a=lb(a,b)}return a}function vb(a){if(a!=null&&typeof a!=="string")throw Error();return a}function wb(a,b,c){if(a!=null&&typeof a==="object"&&a.na===Na)return a;if(Array.isArray(a)){var d=a[r]|0,e=d;e===0&&(e|=c&32);e|=c&2;e!==d&&(a[r]=e);return new b(a)}};var Bb=function(a){var b=xb(a);if(b)return b;if(Math.random()>.01)return a;if(yb===void 0)if(typeof Proxy!=="function")yb=null;else try{yb=Proxy.toString().indexOf("[native code]")!==-1?Proxy:null}catch{yb=null}b=yb;if(!b)return a;b=new b(a,{set(c,d,e){zb();c[d]=e;return!0}});Ab(a,b);return b};function zb(){Ea()}let Cb=void 0,Db=void 0;var xb=function(a){let b;return(b=Cb)==null?void 0:b.get(a)};function Ab(a,b){(Cb||(Cb=new WeakMap)).set(a,b);(Db||(Db=new WeakMap)).set(b,a)}let yb=void 0;let Eb;function Fb(a,b){Eb=b;a=new a(b);Eb=void 0;return a};function Gb(a,b){return Hb(b)}function Hb(a){switch(typeof a){case "number":return isFinite(a)?a:String(a);case "bigint":return hb(a)?Number(a):String(a);case "boolean":return a?1:0;case "object":if(a)if(Array.isArray(a)){if(Sa(a))return}else{if(wa(a))return sa(a);if(a instanceof Aa){const b=a.Z;return b==null?"":typeof b==="string"?b:a.Z=sa(b)}}}return a};function Ib(a,b,c){a=Ha(a);var d=a.length;const e=b&256?a[d-1]:void 0;d+=e?-1:0;for(b=b&512?1:0;b<d;b++)a[b]=c(a[b]);if(e){b=a[b]={};for(const g in e)b[g]=c(e[g])}return a}function Jb(a,b,c,d,e){if(a!=null){if(Array.isArray(a))a=Sa(a)?void 0:e&&(a[r]|0)&2?a:Kb(a,b,c,d!==void 0,e);else if(Qa(a)){const g={};for(let f in a)g[f]=Jb(a[f],b,c,d,e);a=g}else a=b(a,d);return a}}
15
+ function Kb(a,b,c,d,e){const g=d||c?a[r]|0:0;d=d?!!(g&32):void 0;a=Ha(a);for(let f=0;f<a.length;f++)a[f]=Jb(a[f],b,c,d,e);c&&c(g,a);return a}function Lb(a){return a.na===Na?a.toJSON():Hb(a)};function Mb(a,b,c=Ma){if(a!=null){if(a instanceof Uint8Array)return b?a:new Uint8Array(a);if(Array.isArray(a)){var d=a[r]|0;if(d&2)return a;b&&(b=d===0||!!(d&32)&&!(d&64||!(d&16)));return b?(a[r]=(d|34)&-12293,a):Kb(a,Mb,d&4?Ma:c,!0,!0)}a.na===Na&&(c=a.h,d=c[r],a=d&2?a:Fb(a.constructor,Nb(c,d,!0)));return a}}function Nb(a,b,c){const d=c||b&2?Ma:La,e=!!(b&32);a=Ib(a,b,g=>Mb(g,e,d));a[r]=a[r]|32|(c?2:0);return a}function Ob(a){const b=a.h,c=b[r];return c&2?Fb(a.constructor,Nb(b,c,!1)):a};var Pb=function(a,b){a=a.h;return x(a,a[r],b)};function Qb(a,b,c,d){b=d+(+!!(b&512)-1);if(!(b<0||b>=a.length||b>=c))return a[b]}var x=function(a,b,c,d){if(c===-1)return null;const e=b>>14&1023||536870912;if(c>=e){if(b&256)return a[a.length-1][c]}else{var g=a.length;if(d&&b&256&&(d=a[g-1][c],d!=null)){if(Qb(a,b,e,c)&&Ja!=null){var f;a=(f=Da)!=null?f:Da={};f=a[Ja]||0;f>=4||(a[Ja]=f+1,Ea())}return d}return Qb(a,b,e,c)}},Rb=function(a,b,c){const d=a.h;let e=d[r];Va(e);y(d,e,b,c);return a};
16
+ function y(a,b,c,d,e){const g=b>>14&1023||536870912;if(c>=g||e&&!ma){let f=b;if(b&256)e=a[a.length-1];else{if(d==null)return f;e=a[g+(+!!(b&512)-1)]={};f|=256}e[c]=d;c<g&&(a[c+(+!!(b&512)-1)]=void 0);f!==b&&(a[r]=f);return f}a[c+(+!!(b&512)-1)]=d;b&256&&(a=a[a.length-1],c in a&&delete a[c]);return b}var A=function(a,b,c,d){c=z(a,d)===c?c:-1;return Sb(a,b,c)!==void 0};function Tb(a){return!!(2&a)&&!!(4&a)||!!(2048&a)}
17
+ function B(a,b,c,d){const e=a.h;let g=e[r];Va(g);y(e,g,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}var z=function(a,b){a=a.h;return Ub(Vb(a),a,a[r],b)};function Vb(a){let b;return(b=a[Ka])!=null?b:a[Ka]=new Map}function Ub(a,b,c,d){let e=a.get(d);if(e!=null)return e;e=0;for(let g=0;g<d.length;g++){const f=d[g];x(b,c,f)!=null&&(e!==0&&(c=y(b,c,e)),e=f)}a.set(d,e);return e}function Sb(a,b,c,d){a=a.h;let e=a[r];const g=x(a,e,c,d);b=wb(g,b,e);b!==g&&b!=null&&y(a,e,c,b,d);return b}
18
+ var Wb=function(a,b,c){b=Sb(a,b,c,!1);if(b==null)return b;a=a.h;let d=a[r];if(!(d&2)){const e=Ob(b);e!==b&&(b=e,y(a,d,c,b,!1))}return b},Xb=function(a,b,c){c==null&&(c=void 0);return Rb(a,b,c)},C=function(a,b,c,d){d==null&&(d=void 0);a:{const f=a.h;var e=f[r];Va(e);if(d==null){var g=Vb(f);if(Ub(g,f,e,c)===b)g.set(c,0);else break a}else{g=f;const h=Vb(g),k=Ub(h,g,e,c);k!==b&&(k&&(e=y(g,e,k)),h.set(c,b))}y(f,e,b,d)}return a};function Yb(a,b){a=(2&b?a|2:a&-3)|32;return a&=-2049}
19
+ function Zb(a,b,c){32&b&&c||(a&=-33);return a}
20
+ var $b=function(a){a=Pb(a,1);a!=null&&(typeof a==="bigint"?hb(a)?a=Number(a):(a=BigInt.asIntN(64,a),a=hb(a)?Number(a):String(a)):a=rb(a)?typeof a==="number"?ub(a):tb(a):void 0);return a!=null?a:0},D=function(a,b){a=Pb(a,b);a=a==null||typeof a==="string"?a:void 0;return a!=null?a:""},E=function(a,b){a=Pb(a,b);a=a==null?a:Number.isFinite(a)?a|0:void 0;return a!=null?a:0},F=function(a,b,c,d){c=z(a,d)===c?c:-1;return Wb(a,b,c)},H=function(a,b,c){return B(a,b,vb(c),"")};let I;
21
+ var bc=function(a){try{return I=!0,JSON.stringify(ac(a),Gb)}finally{I=!1}},J=class{constructor(a){a:{a==null&&(a=Eb);Eb=void 0;if(a==null){var b=96;a=[]}else{if(!Array.isArray(a))throw Error("narr");b=a[r]|0;if(b&2048)throw Error("farr");if(b&64)break a;var c=a;b|=64;var d=c.length;if(d&&(--d,Qa(c[d]))){b|=256;c=d-(+!!(b&512)-1);if(c>=1024)throw Error("pvtlmt");b=b&-16760833|(c&1023)<<14}}a[r]=b}this.h=a}toJSON(){return ac(this)}getExtension(a){const b=a.D?a.Xa?a.L(this,a.D,a.F,void 0===Wa?2:4,!0):
22
+ a.L(this,a.D,a.F,!0):a.Xa?a.L(this,a.F,void 0===Wa?2:4,!0):a.L(this,a.F,a.defaultValue,!0);return a.pb&&b==null?a.defaultValue:b}hasExtension(a){a.D?a=Sb(this,a.D,a.F,!0)!==void 0:(a=a.D?a.L(this,a.D,a.F,!0):a.L(this,a.F,null,!0),a=(a===null?void 0:a)!==void 0);return a}clone(){const a=this.h;return Fb(this.constructor,Nb(a,a[r],!1))}};J.prototype.na=Na;J.prototype.toString=function(){try{return I=!0,ac(this).toString()}finally{I=!1}};
23
+ function ac(a){a=I?a.h:Kb(a.h,Lb,void 0,void 0,!1);{var b=!I;let n=a.length;if(n){var c=a[n-1],d=Qa(c);d?n--:c=void 0;var e=a;if(d){b:{var g=c;var f={};d=!1;if(g)for(var h in g){if(isNaN(+h)){f[h]=g[h];continue}let u=g[h];Array.isArray(u)&&(Sa(u)||Pa(u)&&u.size===0)&&(u=null);u==null&&(d=!0);u!=null&&(f[h]=u)}if(d){for(let u in f)break b;f=null}else f=g}g=f==null?c!=null:f!==c}for(;n>0;n--){h=e[n-1];if(!(h==null||Sa(h)||Pa(h)&&h.size===0))break;var k=!0}if(e!==a||g||k){if(!b)e=Array.prototype.slice.call(e,
24
+ 0,n);else if(k||g||f)e.length=n;f&&e.push(f)}k=e}else k=a}return k};function cc(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[r]|=32;b=Fb(a,b)}return b}};var dc=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[r]|=34;return new a(b)}}(class extends J{});var ec=class extends J{setSeconds(a){return B(this,1,a==null?a:sb(a),"0")}};var gc=class extends J{ya(){return z(this,fc)}},fc=[2,3];var hc=class extends J{};var K=class extends Error{constructor({errorType:a,message:b,g:c}){super(`Meet Add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},ic={errorType:"InternalError",message:"An unexpected error has occurred.",g:"No further information is available."},L={errorType:"InternalError",message:"An unexpected error has occurred.",g:"No further information is available."},jc={errorType:"MissingUrlParameter",message:"Missing required Meet SDK URL parameter",g:"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)."},
25
+ kc={errorType:"NeedsMainStageContext",message:"This method can only be invoked if the addon is running in the main stage.",g:"Use getFrameType to check whether the addon is running in the main stage before invoking this method."},lc={errorType:"NeedsSidePanelContext",message:"This method can only be invoked if the addon is running in the side panel.",g:"Use getFrameType to check whether the addon is running in the side panel before invoking this method."},mc={errorType:"NotSupportedInStandalone",
26
+ message:"This method is not supported in standalone mode.",g:"Do not call this method in standalone mode."},nc={errorType:"InternalError",message:"The frame type URL parameter is set to an unexpected value.",g:"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)."},oc={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.",
27
+ g:"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."},pc={errorType:"DestinationNotReady",message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",g:"Make sure the destination frame has connected before sending messages to it."},qc={errorType:"InvalidActivityStartingState",
28
+ message:"Origin of the ActivityStartingState iframeURLs does not match the origin of the URLs provided in the Add-on manifest.",g:"Ensure that the ActivityStartingState iframeURL origins match the origins of the URLs provided in the Add-on manifest."},rc={errorType:"ActivityStartingStateMissingAttributes",message:"The supplied ActivityStartingState object does not contain any recognized attributes.",g:"Ensure that the ActivityStartingState object contains at least one of the following attributes: mainStageUrl, sidePanelUrl, additionalData."},
29
+ sc={errorType:"ActivityStartingStateUnrecognizedAttributes",message:"The supplied ActivityStartingState object contains attributes that are not recognized.",g:"Ensure that the ActivityStartingState object has only the following attributes: mainStageUrl, sidePanelUrl, additionalData."},uc=a=>({errorType:"ArgumentNullError",message:`The argument supplied for '${a}' was 'null' but a value was expected.`,g:"Ensure you are passing a value of the expected type for the argument."}),M=(a,b,c)=>({errorType:"ArgumentTypeError",
30
+ message:`The type '${b}' of argument supplied for '${a}' did not match the expected type '${c}'.`,g:"Ensure the type of the argument provided matches the expected type."}),vc=a=>({errorType:"InternalError",message:`Could not connect to ${a} channel. Unknown error`,g:"No further information is available."}),wc={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",g:"Ensure that no activity is ongoing."},xc={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",
31
+ g:"Send one of the available commands in the frame message."},yc={errorType:"NoActivityFound",message:"No activity found.",g:"Ensure that the activity is started before performing this operation."},zc={errorType:"RequiresEapEnrollment",message:"This feature is only available to early access partners.",g:"Meet add-on early access enrollment is currently closed."},Ac={errorType:"UserNotInitiator",message:"Operation cannot be performed because the user is not the initiator of the current activity.",
32
+ g:"Ensure that the user is the initiator of the current activity or that the activity has ended."},Bc={errorType:"SizeLimitExceededActivityStartingState",message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",g:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Cc={errorType:"SizeLimitExceededFrameToFrameMessage",message:"The size of the frame to frame message exceeds the limits allowed.",
33
+ g:"Ensure that the frame to frame message size is less than 1,000,000 characters."},Dc={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",g:"Only instantiate the AddonSession once."},Ec={errorType:"UserCancelled",message:"The user cancelled starting an activity.",g:"The user needs to click continue to start the activity."},Fc={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",g:"Do not call this method during a Meet call."},
34
+ Gc={errorType:"InvalidAddonStartingState",message:"Origin of the AddonStartingState iframeURLs does not match the origin of the URLs provided in the Add-on manifest.",g:"Ensure that the AddonStartingState iframeURL origins match the origins of the URLs provided in the Add-on manifest."},Hc={errorType:"SizeLimitExceededAddonStartingState",message:"The size of the AddonStartingState URLs and/or its data exceed the limits allowed.",g:"Ensure that the AddonStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."};
35
+ function Ic(a){switch(a){case 0:return ic;case 1:return pc;case 2:return qc;case 3:return wc;case 4:return xc;case 5:return zc;case 6:return mc;case 7:return Ac;case 8:return Bc;case 9:return Cc;case 10:return Ec;case 11:return Fc;case 12:return Gc;case 13:return Hc;case 14:return yc;default:return L}}
36
+ function Jc(a){let b;var c=(b=E(a,1))!=null?b:0;a=Kc(a.ya());switch(c){case 1:return{errorType:"InternalError",message:`Could not connect to ${a} channel. Meet did not respond with a MessagePort.`,g:"No further information is available."};case 2:return{errorType:"InternalError",message:`Could not connect to ${a}. A conflicting ${a} exists.`,g:"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}.`,
37
+ g:"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}.`,g:"No further information is available."};case 0:return vc(a);case 5:a:switch(a){case "coActivity":c={errorType:"InternalError",message:`Could not connect to ${a} channel. The coActivity was not found.`,g:`Consider starting the ${a} only after after the startActivity promise returns.`};break a;default:c={errorType:"InternalError",
38
+ message:`Could not connect to ${a} channel.`,g:"No further information is available."}}return c;default:return vc(a)}}function Kc(a){switch(a){case 2:return"coActivity";case 3:return"guaranteed delivery";case 0:return"unknown";default:return"unknown"}}function Lc({errorType:a,message:b,g:c},d=""){throw new K({errorType:a,message:d?`${b} ${d}`:b,g:c});}function Mc(a,b){Lc({...jc,message:`${jc.message}: ${a}. In URL ${b}`})};var Oc=function(a){var b=new Nc;return B(b,1,w(a),0)},Nc=class extends J{getFrameType(){return E(this,1)}};var Pc=function(a){var b=a.h,c=b[r];a=c;var d=!(2&c),e=Nc,g=void 0===Wa?2:5;g=(c=!!(2&a))?1:g;d&&(d=!c);c=x(b,a,1);c=Array.isArray(c)?c:Ta;var f=c[r]|0,h=!!(4&f);if(!h){var k=f;k===0&&(k=Yb(k,a));f=c;k|=1;var n=a;const G=!!(2&k);G&&(n|=2);let P=!G,ob=!0,Ia=0,pb=0;for(;Ia<f.length;Ia++){const qb=wb(f[Ia],e,n);if(qb instanceof e){if(!G){const tc=!!((qb.h[r]|0)&2);P&&(P=!tc);ob&&(ob=tc)}f[pb++]=qb}}pb<Ia&&(f.length=pb);k|=4;k=ob?k|16:k&-17;k=P?k|8:k&-9;f[r]=k;G&&Object.freeze(f);f=k}if(d&&!(8&f||!c.length&&
39
+ (g===1||g===4&&32&f))){Tb(f)&&(c=Ha(c),f=Yb(f,a),a=y(b,a,1,c));d=c;e=f;for(f=0;f<d.length;f++)k=d[f],n=Ob(k),k!==n&&(d[f]=n);e|=8;e=d.length?e&-17:e|16;f=d[r]=e}let u;g===1||g===4&&32&f?Tb(f)||(a=f,b=!!(32&f),f|=!c.length||16&f&&(!h||b)?2:2048,f!==a&&(c[r]=f),Object.freeze(c)):(h=g!==5?!1:!!(32&f)||Tb(f)||!!xb(c),(g===2||h)&&Tb(f)&&(c=Ha(c),f=Yb(f,a),f=Zb(f,a,!1),c[r]=f,a=y(b,a,1,c)),Tb(f)||(b=f,f=Zb(f,a,!1),f!==b&&(c[r]=f)),h&&(u=Bb(c)));return u||c},Rc=function(a){{var b=new Qc;const u=b.h;let G=
40
+ u[r];Va(G);if(a==null)y(u,G,1);else{var c=a,d;a=((d=Db)==null?void 0:d.get(c))||c;c=d=a[r]|0;var e=!!(2&d)||!!(2048&d),g=e||Object.isFrozen(a),f;if(f=!g)f=void 0===Xa||!1;var h=!0,k=!0;for(let P=0;P<a.length;P++){var n=a[P];e||(n=!!((n.h[r]|0)&2),h&&(h=!n),k&&(k=n))}e||(d|=5,d=h?d|8:d&-9,d=k?d|16:d&-17);if(f||g&&d!==c)a=Ha(a),c=0,d=Yb(d,G),d=Zb(d,G,!0);d!==c&&(a[r]=d);y(u,G,1,a)}}return b},Qc=class extends J{};var Sc=class extends J{constructor(){super()}};var Uc=function(a){var b=new Tc;return B(b,1,w(a),0)},Tc=class extends J{constructor(){super()}};var Vc=class extends J{Ja(a){return H(this,2,a)}};var Wc=class extends J{};var Yc=class extends J{R(){return z(this,Xc)}ja(){return F(this,Qc,2,Xc)}Y(a){return C(this,2,Xc,a)}getMeetingInfo(){return F(this,Wc,3,Xc)}},Xc=[2,3,4,5];var $c=class extends J{za(){return z(this,Zc)}},Zc=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17];var ad=class extends J{constructor(){super()}ja(){return Wb(this,Qc,1)}Y(a){return Xb(this,1,a)}};var bd=class extends J{constructor(){super()}ja(){return Wb(this,Qc,1)}Y(a){return Xb(this,1,a)}};var cd=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),dd=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function ed(a){a&&typeof a.dispose=="function"&&a.dispose()};var N=function(){this.o=this.o;this.A=this.A};N.prototype.o=!1;N.prototype.dispose=function(){this.o||(this.o=!0,this.ea())};N.prototype[Symbol.dispose]=function(){this.dispose()};var fd=function(a,b){a.o?b():(a.A||(a.A=[]),a.A.push(b))};N.prototype.ea=function(){if(this.A)for(;this.A.length;)this.A.shift()()};var gd=function({ra:a,Fa:b}){if(a===null)throw new K(uc("activityStartingState"));if(b||a!==void 0){if(typeof a!=="object")throw new K(M("activityStartingState",typeof a,`object${b?"":" | undefined"}`));if(a.mainStageUrl!==void 0&&typeof a.mainStageUrl!=="string")throw new K(M("mainStageUrl",typeof a.mainStageUrl,"string | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new K(M("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&
41
+ typeof a.additionalData!=="string")throw new K(M("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new K(sc);if(Object.keys(a).length===0)throw new K(rc);}},hd=function(a){const b=[];var c=b.push;var d=Oc(2);d=H(d,2,a.mainStageUrl);d=H(d,3,a.additionalData);c.call(b,d);c=b.push;d=Oc(1);d=H(d,2,a.sidePanelUrl);a=H(d,3,a.additionalData);c.call(b,a);return b},pd=class extends N{constructor(a){super();
42
+ this.context=a;this.Da={};id(this.context.i.fb,b=>{switch(b.content.za()){case 7:const d=this.Da.frameToFrameMessage;b=F(b.content,Vc,7,Zc);if(d&&b){var c=E(b,1);c=cd.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:D(b,2)})}break;case 16:jd(this.context.i)}})}async getMeetingInfo(){const a=await kd(this.context.i,Uc(2));return{meetingId:D(a.getMeetingInfo(),1)}}async getFrameOpenReason(){let a;const b=(a=this.context.ca.Ua)!=null?a:0;let c;return(c=dd.get(b))!=null?
43
+ c:"UNKNOWN"}async getActivityStartingState(){var a=(await kd(this.context.i,Uc(1))).ja();const b=a==null?void 0:Pc(a).find(c=>c.getFrameType()===2);a=a==null?void 0:Pc(a).find(c=>c.getFrameType()===1);return{mainStageUrl:(b==null?void 0:D(b,2))||void 0,sidePanelUrl:(a==null?void 0:D(a,2))||void 0,additionalData:(a==null?void 0:D(a,3))||void 0}}async setActivityStartingState(a){gd({ra:a,Fa:!0});a=hd(a);await ld(this.context.i,(new ad).Y(Rc(a)))}on(a,b){this.Da[a]=b}async closeAddon(){await md(this.context.i)}async startActivity(a){gd({ra:a,
44
+ Fa:!1});const b=new bd;a&&(a=hd(a),b.Y(Rc(a)));await nd(this.context.i,b)}async endActivity(a){var b=od,c=this.context.i,d=new Sc;a=B(d,1,w(a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0),0);await b(c,a)}};var qd=cc(class extends J{getFrameOpenReason(){return E(this,5)}});function rd(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");c?b=qd(atob(c)):(Mc("meet_sdk",b),b=void 0);(c=D(b,1))||Mc("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new K(nc);const d=D(b,2);d||Mc("meet_control_channel_name",a);const e=D(b,4);e||Mc("addon_cloud_project_number",a);var g;a=(g=b.getFrameOpenReason())!=null?g:0;g=D(b,3)||"https://meet.google.com";return{Ua:a,frameType:c,Qa:d,cloudProjectNumber:e,Ga:g}};var sd=class extends J{constructor(){super()}};var td=class extends J{constructor(){super()}};var wd=function(){var a=new ud,b=new td;return C(a,1,vd,b)},ud=class extends J{constructor(){super()}ya(){return z(this,vd)}},vd=[1,2];var xd=class extends J{constructor(){super()}};var yd=class extends J{constructor(){super()}};var zd=class extends J{constructor(){super()}Ja(a){return H(this,2,a)}};var Ad=class extends J{constructor(){super()}};var Bd=class extends J{constructor(){super()}};var Q=class extends J{constructor(){super()}za(){return z(this,O)}},O=[1,2,5,6,7,8,9,10,11,13,14,15,16];var Cd=class extends J{},Dd=cc(Cd),Ed=[1,2];class Fd{constructor(a,b){this.data=a;this.channel=b}};var Gd=Promise;var Id=function(a){const b=new MessageChannel;Hd(b.port1,a);return b},Kd=function(a,b){Hd(a,b);return new Jd(a)};class Jd{constructor(a){this.hb=a}send(a,b,c=[]){b=Id(b);this.hb.postMessage(a,[b.port2].concat(c))}N(a,b){return new Gd(c=>{this.send(a,c,b)})}}const Hd=function(a,b){b&&(a.onmessage=c=>{var d=c.data;c=Kd(c.ports[0]);b(new Fd(d,c))})};class Ld{constructor(a,b){this.Za=100;this.Ra=a;this.kb=b;this.V=0;this.U=null}get(){let a;this.V>0?(this.V--,a=this.U,this.U=a.next,a.next=null):a=this.Ra();return a}put(a){this.kb(a);this.V<this.Za&&(this.V++,a.next=this.U,this.U=a)}};var Md=function(){var a=document;var b="IFRAME";a.contentType==="application/xhtml+xml"&&(b=b.toLowerCase());return a.createElement(b)};var Nd=function(){};var Od,Pd=function(){var a=l.MessageChannel;typeof a==="undefined"&&typeof window!=="undefined"&&window.postMessage&&window.addEventListener&&!p("Presto")&&(a=function(){var e=Md();e.style.display="none";document.documentElement.appendChild(e);var g=e.contentWindow;e=g.document;e.open();e.close();var f="callImmediate"+Math.random(),h=g.location.protocol=="file:"?"*":g.location.protocol+"//"+g.location.host;e=ha(function(k){if((h=="*"||k.origin==h)&&k.data==f)this.port1.onmessage()},this);g.addEventListener("message",
45
+ e,!1);this.port1={};this.port2={postMessage:function(){g.postMessage(f,h)}}});if(typeof a!=="undefined"){var b=new a,c={},d=c;b.port1.onmessage=function(){if(c.next!==void 0){c=c.next;var e=c.ua;c.ua=null;e()}};return function(e){d.next={ua:e};d=d.next;b.port2.postMessage(0)}}return function(e){l.setTimeout(e,0)}};class Qd{constructor(){this.aa=this.J=null}add(a,b){const c=Rd.get();c.set(a,b);this.aa?this.aa.next=c:this.J=c;this.aa=c}remove(){let a=null;this.J&&(a=this.J,this.J=this.J.next,this.J||(this.aa=null),a.next=null);return a}}var Rd=new Ld(()=>new Sd,a=>a.reset());class Sd{constructor(){this.next=this.scope=this.ga=null}set(a,b){this.ga=a;this.scope=b;this.next=null}reset(){this.next=this.scope=this.ga=null}};let Td,Ud=!1,Vd=new Qd,Xd=(a,b)=>{Td||Wd();Ud||(Td(),Ud=!0);Vd.add(a,b)},Wd=()=>{if(l.Promise&&l.Promise.resolve){const a=l.Promise.resolve(void 0);Td=()=>{a.then(Yd)}}else Td=()=>{var a=Yd;typeof l.setImmediate!=="function"||l.Window&&l.Window.prototype&&l.Window.prototype.setImmediate==l.setImmediate?(Od||(Od=Pd()),Od(a)):l.setImmediate(a)}};var Yd=()=>{let a;for(;a=Vd.remove();){try{a.ga.call(a.scope)}catch(b){m(b)}Rd.put(a)}Ud=!1};var R=function(a){this.l=0;this.Ha=void 0;this.C=this.u=this.B=null;this.S=this.fa=!1;if(a!=Nd)try{var b=this;a.call(void 0,function(c){Zd(b,2,c)},function(c){Zd(b,3,c)})}catch(c){Zd(this,3,c)}},$d=function(){this.next=this.context=this.H=this.M=this.v=null;this.K=!1};$d.prototype.reset=function(){this.context=this.H=this.M=this.v=null;this.K=!1};
46
+ var ae=new Ld(function(){return new $d},function(a){a.reset()}),be=function(a,b,c){var d=ae.get();d.M=a;d.H=b;d.context=c;return d},de=function(){var a,b,c=new R(function(d,e){a=d;b=e});return new ce(c,a,b)};R.prototype.then=function(a,b,c){return ee(this,typeof a==="function"?a:null,typeof b==="function"?b:null,c)};R.prototype.$goog_Thenable=!0;var ge=function(a,b){b=be(b,b);b.K=!0;fe(a,b)};R.prototype.lb=function(a,b){return ee(this,null,a,b)};R.prototype.catch=R.prototype.lb;
47
+ R.prototype.cancel=function(a){if(this.l==0){var b=new S(a);Xd(function(){he(this,b)},this)}};
48
+ var he=function(a,b){if(a.l==0)if(a.B){var c=a.B;if(c.u){for(var d=0,e=null,g=null,f=c.u;f&&(f.K||(d++,f.v==a&&(e=f),!(e&&d>1)));f=f.next)e||(g=f);e&&(c.l==0&&d==1?he(c,b):(g?(d=g,d.next==c.C&&(c.C=d),d.next=d.next.next):ie(c),je(c,e,3,b)))}a.B=null}else Zd(a,3,b)},fe=function(a,b){a.u||a.l!=2&&a.l!=3||ke(a);a.C?a.C.next=b:a.u=b;a.C=b},ee=function(a,b,c,d){var e=be(null,null,null);e.v=new R(function(g,f){e.M=b?function(h){try{var k=b.call(d,h);g(k)}catch(n){f(n)}}:g;e.H=c?function(h){try{var k=c.call(d,
49
+ h);k===void 0&&h instanceof S?f(h):g(k)}catch(n){f(n)}}:f});e.v.B=a;fe(a,e);return e.v};R.prototype.mb=function(a){this.l=0;Zd(this,2,a)};R.prototype.nb=function(a){this.l=0;Zd(this,3,a)};
50
+ var Zd=function(a,b,c){if(a.l==0){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.l=1;a:{var d=c,e=a.mb,g=a.nb;if(d instanceof R){fe(d,be(e||Nd,g||null,a));var f=!0}else{if(d)try{var h=!!d.$goog_Thenable}catch(n){h=!1}else h=!1;if(h)d.then(e,g,a),f=!0;else{h=typeof d;if(h=="object"&&d!=null||h=="function")try{var k=d.then;if(typeof k==="function"){le(d,k,e,g,a);f=!0;break a}}catch(n){g.call(a,n);f=!0;break a}f=!1}}}f||(a.Ha=c,a.l=b,a.B=null,ke(a),b!=3||c instanceof S||me(a,c))}},
51
+ le=function(a,b,c,d,e){var g=!1,f=function(k){g||(g=!0,c.call(e,k))},h=function(k){g||(g=!0,d.call(e,k))};try{b.call(a,f,h)}catch(k){h(k)}},ke=function(a){a.fa||(a.fa=!0,Xd(a.Ta,a))},ie=function(a){var b=null;a.u&&(b=a.u,a.u=b.next,b.next=null);a.u||(a.C=null);return b};R.prototype.Ta=function(){for(var a;a=ie(this);)je(this,a,this.l,this.Ha);this.fa=!1};
52
+ var je=function(a,b,c,d){if(c==3&&b.H&&!b.K)for(;a&&a.S;a=a.B)a.S=!1;if(b.v)b.v.B=null,ne(b,c,d);else try{b.K?b.M.call(b.context):ne(b,c,d)}catch(e){oe.call(null,e)}ae.put(b)},ne=function(a,b,c){b==2?a.M.call(a.context,c):a.H&&a.H.call(a.context,c)},me=function(a,b){a.S=!0;Xd(function(){a.S&&oe.call(null,b)})},oe=m,S=function(a){ka.call(this,a)};ja(S,ka);S.prototype.name="cancel";var ce=function(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let pe=1,qe=new WeakMap;
53
+ var se=function(a,b,c){var d=re;a.Ma.has(b);d(b,c)},ue=class extends N{constructor(){super();this.Ma=new Set}signal(){const a=new te;this.Ma.add(a);fd(this,ia(ed,a));return a}},re=function(a,b){return new Promise(c=>{ve(()=>{a.ta&&(a.Ya=b,a.Ca=!0);for(const {qa:d,slot:e}of a.j.values())try{e(b,{signal:a,qa:d})}catch(g){m(g)}for(const d of a.I)d.resolve(b);a.I.clear();c()})})},id=function(a,b,c){const d=pe++;ve(()=>{we(a,d,b,c)});return d},we=function(a,b,c,d){if(!a.o)if(d){if(!d.o){const e=()=>{ve(()=>
54
+ {a.j.delete(b);const g=qe.get(d);g&&ra(g,e)})};a.j.set(b,{qa:b,slot:c,da:e});xe(d,e)}}else a.j.set(b,{qa:b,slot:c,da:()=>a.j.delete(b)})},te=class extends N{constructor(){super();this.ta=!1;this.j=new Map;this.I=new Set;this.Ca=!1}detach(a){ve(()=>{const b=this.j.get(a);b&&b.da()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){const c=de();ve(()=>{if(this.o)c.reject(new S("Signal initially disposed"));else if(b&&b.o)c.reject(new S("Owner initially disposed"));else if(a&&
55
+ this.ta&&this.Ca)c.resolve(this.Ya);else if(this.I.add(c),ge(c.promise,()=>{this.I.delete(c)}),b){const d=()=>{c.reject(new S("Owner asynchronously disposed"))};ge(c.promise,()=>{const e=qe.get(b);e&&ra(e,d)});xe(b,d)}});return c.promise}ea(){super.ea();ve(()=>{for(const {da:a}of this.j.values())a();this.j.clear();for(const a of this.I)a.reject(new S("Signal asynchronously disposed"));this.I.clear()})}};const ye=[];let ze=!1;function ve(a){ye.push(a);Ae()}
56
+ async function Ae(){if(!ze)try{ze=!0;let a=Be(0);for(;a<ye.length;)await Promise.resolve(),a=Be(a)}catch(a){m(a)}finally{ye.length=0,ze=!1}}function Be(a){const b=a+100;for(;a<b&&a<ye.length;)try{ye[a++]()}catch(c){m(c)}return a}function xe(a,b){if(a.o)b();else{var c=qe.get(a);if(c)c.push(b);else{const d=[b];qe.set(a,d);fd(a,()=>{for(const e of[...d])e();qe.delete(a)})}}};function T(a){var b=new Cd;a=C(b,1,Ed,a);return{content:bc(a)}}const Ce=new ue;function De(a,b){const c=Ce.signal();return{channel:Kd(a,d=>{const e=b(d.data);se(Ce,c,{content:e,jb:d})}),signal:c}};let Ee;var U=class extends J{getState(){const a=this.h;let b=a[r];const c=x(a,b,1),d=Ra(c,!0,!!(b&34));d!=null&&d!==c&&y(a,b,1,d);return d==null?Ba():d}};var V=class extends J{};var Ge=class extends J{ha(){return F(this,U,2,Fe)}W(a){C(this,2,Fe,a)}T(){return A(this,U,2,Fe)}ia(){return F(this,V,3,Fe)}X(a){C(this,3,Fe,a)}ka(){return A(this,V,3,Fe)}},Fe=[2,3];var He=cc(class extends J{});var Je=cc(class extends J{R(){return z(this,Ie)}}),Ie=[1,2];var Ke=({destination:a,origin:b,tb:c,Na:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");const g=Id(e);a.postMessage(c?{n:d,t:c}:d,b,[g.port2]);return Kd(g.port1,e)};function Le(a,b,c){const d=new ue,e=d.signal();a=Ke({destination:window.parent,origin:b,Na:a,onMessage:g=>{const f=Dd(g.data.content);z(f,Ed)===2&&se(d,e,{content:F(f,$c,2,Ed),jb:g,messagePort:g.data.messagePort})}});return new Me(e,a,c)}
57
+ var jd=async function(a){a=a.channel;var b=a.N;var c=new Q;var d=new Ad;c=C(c,13,O,d);await b.call(a,T(c))},kd=async function(a,b){var c=W,d=new Q;b=C(d,9,O,b);a=await c(a,T(b));let e;return(e=F(Dd(a.data.content),$c,2,Ed))==null?void 0:F(e,Yc,9,Zc)},ld=async function(a,b){var c=W,d=new Q;b=C(d,8,O,b);await c(a,T(b))},md=async function(a){var b=W;var c=new Q;var d=new sd;c=C(c,11,O,d);await b(a,T(c))},nd=async function(a,b){var c=W,d=new Q;b=C(d,14,O,b);await c(a,T(b))},od=async function(a,b){var c=
58
+ W,d=new Q;b=C(d,15,O,b);await c(a,T(b))},Ne=async function(a){setInterval(async()=>{await jd(a)},1E3)},W=async function(a,b){(a=await a.channel.N(b))||Lc(L,"Falsy response received from the message channel."+` ${JSON.stringify(a)}`);(b=a.data)||Lc(L,"Data field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);(b=b.content)||Lc(L,"Content field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);let c=void 0;try{c=Dd(b)}catch(d){Lc(L,"The ControlMessage can't be deserialized."+
59
+ ` ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=F(c,$c,2,Ed))||Lc(L,"MeetToAddonMessage field on ControlMessage is falsy."+` ${JSON.stringify(b)}`);b=b==null?void 0:F(b,hc,10,Zc);if((b==null?void 0:E(b,1))!==void 0)throw new K(Ic(E(b,1)));return a},Oe=async function(a,b,c){var d=W,e=new Q;b=C(e,1,O,b);d=await d(a,T(b));a=d.data.messagePort;var g;(d=(g=F(Dd(d.data.content),$c,2,Ed))==null?void 0:F(g,gc,1,Zc))!=null?g=d:(g=new gc,g=B(g,1,w(0),0));return{channel:a?De(a,c):void 0,response:g}},Pe=async function(a){const b=
60
+ wd(),{channel:c,response:d}=await Oe(a,b,e=>Je(e));if(!c)throw new K(Jc(d));return c},Qe=async function(a){var b=W;var c=new Q;var d=new Bd;c=C(c,5,O,d);await b(a,T(c))},Re=async function(a){var b=W;var c=new Q;var d=new yd;c=C(c,6,O,d);await b(a,T(c))},Se=async function(a,b,c){var d=W,e=new Q,g=new zd;b=B(g,1,w(b),0).Ja(c);e=C(e,7,O,b);await d(a,T(e))};
61
+ class Me extends N{constructor(a,b,c){super();this.fb=a;this.channel=b;a=Ee||(Ee=dc("[0,10,0]"));a=Ob(a);a=Rb(a,4,vb("671117181"));b=a.h;var d=b[r];b=d&2?a:Fb(a.constructor,Nb(b,d,!0));a=new Q;d=new xd;b=Xb(d,2,b);c=H(b,3,c);c=C(a,2,O,c);this.channel.send(T(c));Ne(this)}};let Te;var Ue=class{constructor(a){var b=Te;this.ca=a;this.i=b}delete(){throw Error("Not implemented.");}};var We=class extends J{constructor(){super()}pa(a){return B(this,1,a==null?a:sb(a),"0")}ha(){return F(this,U,2,Ve)}W(a){C(this,2,Ve,a)}T(){return A(this,U,2,Ve)}ia(){return F(this,V,3,Ve)}X(a){C(this,3,Ve,a)}ka(){return A(this,V,3,Ve)}},Ve=[2,3];var Xe=class extends J{constructor(){super()}};var Ye=class extends J{constructor(){super()}};var Ze=class extends J{constructor(){super()}oa(a){return Rb(this,4,vb(a))}};var af=class extends J{constructor(){super()}pa(a){return B(this,1,a==null?a:sb(a),"0")}ha(){return F(this,U,2,$e)}W(a){C(this,2,$e,a)}T(){return A(this,U,2,$e)}ia(){return F(this,V,3,$e)}X(a){C(this,3,$e,a)}ka(){return A(this,V,3,$e)}},$e=[2,3],bf=[5,6];var cf=class extends J{constructor(){super()}oa(a){return H(this,1,a)}};var ef=class extends J{constructor(){super()}R(){return z(this,df)}},df=[1,2,3];function ff(a){var b=new gf;let c=0,d;return(...e)=>{if(hf(b)){jf(b);var g=!0}else g=!1;g?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;let f;(f=d)==null||f()},kf(b))))}};var kf=function(a){const b=a.wa;let c;a=Date.now()-((c=a.la[a.index])!=null?c:0);return a>=b?0:b-a},hf=function(a){const b=a.wa;let c;return Date.now()-((c=a.la[a.index])!=null?c:0)>=b},jf=function(a){a.la[a.index]=Date.now();a.index=(a.index+1)%a.ab},gf=class{constructor(){this.ab=1;this.wa=500;this.la=[];this.index=0}};var lf=class extends Error{constructor(){super("Failed to create CoActivity: Connection refused - Meet refused to begin Live Sharing")}};var mf=class{constructor(a){this.config=a}start(){this.Ea!=null||(this.Ea=setInterval(()=>{this.config.eb()},this.config.Wa));return this}shutdown(){clearInterval(this.Ea)}};function nf(){const a=new Map,b={set(c,d){a.set(c,d);return b},ba:()=>a};return b};function of(a){if(a.T()){var b=a.ha().getState();a=Uint8Array;za(xa);var c=b.Z;if(c!=null&&!wa(c))if(typeof c==="string"){ta.test(c)&&(c=c.replace(ta,va));c=atob(c);const 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.Z=c;return{bytes:new a(b||0)}}}function pf(a,b){a.W(qf(b));return a}function rf(a,b){a.W(qf(b));return a}function qf(a){var b=new U;return B(b,1,Ra(a.bytes,!1,!1),Ba())}
62
+ function sf(a){if(a.ka()){a=a.ia();var b,c,d=D(a,1),e=(c=(b=Wb(a,ec,2))==null?void 0:$b(b))!=null?c:0;c=a.h;let g=c[r];const f=x(c,g,4);b=f==null||typeof f==="number"?f:f==="NaN"||f==="Infinity"||f==="-Infinity"?Number(f):void 0;b!=null&&b!==f&&y(c,g,4,b);return{mediaId:d,mediaPlayoutPosition:e,mediaPlayoutRate:b!=null?b:0,playbackState:tf.get(E(a,3))}}}function uf(a,b){a.X(vf(b));return a}function wf(a,b){a.X(vf(b));return a}
63
+ const tf=nf().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED").ba(),xf=nf().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4).ba();function vf(a){var b=new V;b=H(b,1,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=B(b,4,c,0);c=(new ec).setSeconds(a.mediaPlayoutPosition);b=Xb(b,2,c);a=xf.get(a.playbackState);return B(b,3,w(a),0)}
64
+ function yf({activityTitle:a}){return(new Ze).oa(a)}function zf(a,b){var c=new Ye;b=B(c,1,w(b.G),0);C(a,6,bf,b);return a}function Af(a){var b=new Xe;C(a,5,bf,b);return a};const Bf=nf().set("co-doing",1).set("co-watching",2).ba();async function Cf(a,b,c){var d=b.N,e=new ef;var g=(new cf).oa(a.activityTitle);var f=Bf.get(a.sa);g=B(g,2,w(f),0);e=C(e,3,df,g);d=await d.call(b,e,He);let h;e=Pb(d,1);e=e==null||typeof e==="boolean"?e:typeof e==="number"?!!e:void 0;if((h=e!=null?e:!1)!=null&&h)return new Df(a,b,c,Wb(d,Ge,2));throw new lf;}
65
+ var Ef=function(a,b){const c=a.config.Aa(b);c&&!a.config.xa(a.s,c)&&(a.s=c,a.ma=$b(b),a.Sa(a.s))},X=function(a,b){const {state:c,bb:d,context:e}=b(a.s);a.s=c;a.notify(a.s,e,d)};
66
+ class Df{constructor(a,b,c,d){this.va=a;this.P=b;this.config=c;this.Sa=ff(e=>void this.va.Ba(e));Ff(this.P,e=>{const g=e.R();switch(g){case 1:Ef(this,F(e,Ge,1,Ie));break;case 2:case 0:console.warn(`IllegalMessage: ${g} - ${"Unhandled message"} - ${"Please raise a bug with the MeetJS team"}`)}});this.Va=(new mf({Wa:1E3,eb:()=>{var e,g;const f=(g=(e=this.va).ib)==null?void 0:g.call(e);this.s!==null&&(this.s={...this.s,...f},e=new ef,g=this.config.Ka((new We).pa(this.ma),this.s),e=C(e,1,df,g),this.P.send(e))}})).start();
67
+ this.s=null;this.ma=0;d&&Ef(this,d)}disconnect(){this.P.shutdown();this.Va.shutdown()}notify(a,b,c){var d=c?yf(c):void 0;c=this.config;var e=c.La,g=(new af).pa(this.ma);d=Xb(g,4,d);a=e.call(c,d,a);a=this.config.Ia(a,b);b=this.P;c=b.send;e=new ef;a=C(e,2,df,a);c.call(b,a)}};var Gf=class{constructor(a){this.m=a}broadcastStateUpdate(a){X(this.m,()=>({state:a,context:{}}))}disconnect(){this.m.disconnect()}};function Hf(a,b){return a==null||b==null?!1:a.bytes.length===b.bytes.length&&a.bytes.every((c,d)=>c===b.bytes[d])};var If=class{constructor(a){this.m=a}notifySwitchedToMedia(a,b,c){X(this.m,()=>({state:{mediaId:b,mediaPlayoutRate:1,mediaPlayoutPosition:c,playbackState:"PLAY"},bb:{activityTitle:a},context:{G:1}}))}notifyPauseState(a,b){X(this.m,c=>{if(c==null)throw Error("Invalid before coWatchingState");return{state:{...c,playbackState:a?"PAUSE":"PLAY",mediaPlayoutPosition:b},context:{G:3}}})}notifySeekToTimestamp(a){X(this.m,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},
67
68
  context:{G:2}}})}notifyPlayoutRate(a){X(this.m,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutRate:a},context:{G:4}}})}notifyBuffering(a){X(this.m,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a,playbackState:"BUFFERING"},context:{G:3}}})}notifyReady(a){X(this.m,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},context:{G:3}}})}disconnect(){this.m.disconnect()}};
68
- function Lf(a,b){if(a==null||b==null)return!1;const 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};var Hf=function(a,b){const c=kd(a.signal,d=>{b(d)});a.j.push(c)},Mf=class{constructor(a,b){this.channel=a;this.signal=b;this.j=[]}send(a){this.channel.send(cc(a))}async N(a,b){a=await this.channel.N(cc(a));return b(a.data)}shutdown(){this.j.forEach(a=>{this.signal.detach(a)})}};function Nf(a,b){var c=Of;const d=a.signal(),e=a.signal();kd(b,g=>{const f=c(g)?d:e;ue(a,f,g)},a);return{gb:d,cb:e}}function Pf(a,b,c,d=e=>e){kd(c,e=>{ue(a,b,d(e))},a)};async function Qf(a,b){if(b)return a=await Ef({activityTitle:b.activityTitle,sa:"co-watching",ib:()=>b.onCoWatchingStateQuery(),Ba:c=>{b.onCoWatchingStateChanged(c)}},a,{La:wf,Ka:yf,Ia:Bf,Aa:uf,xa:Lf}),new Kf(a)}async function Rf(a,b){if(b)return a=await Ef({activityTitle:b.activityTitle,sa:"co-doing",Ba:c=>{b.onCoDoingStateChanged(c)}},a,{La:rf,Ka:tf,Ia:Cf,Aa:qf,xa:Jf}),new If(a)}
69
- async function Sf(a){const b=new we,c=b.signal();a=await a;Pf(b,c,a.signal,g=>g.content);const {gb:d,cb:e}=Nf(b,c);return{Oa:new Mf(a.channel,d),Pa:new Mf(a.channel,e)}}function Of(a){a:switch(a.R()){case 1:a=H(a,Ie,1,Ke);break a;default:throw Error("CA Message arrived with no known content message set");}return a.T()};async function Tf(a,b){({Oa:a}=await Sf(Re(a.i)));b=await Rf(a,b);if(!b)throw Error("Failed to create co-doing session");return b}async function Uf(a,b){({Pa:a}=await Sf(Re(a.i)));b=await Qf(a,b);if(!b)throw Error("Failed to create co-watching session");return b};var Vf=class extends rd{async notifySidePanel(a){await Ue(this.context.i,1,a)}async unloadSidePanel(){await Se(this.context.i)}async loadSidePanel(){await Te(this.context.i)}};var Wf=class extends rd{async notifyMainStage(a){await Ue(this.context.i,2,a)}};var Xf=class{constructor(a){a=a.cloudProjectNumber;const b=td();if(b.cloudProjectNumber!==a)throw new L(pc);const c=b.Ga,d=b.Qa;let e;Ve=(e=Ve)!=null?e:Ne(d,c,a);this.O=new We(b)}async createMainStageClient(){var a=this.O;if(a.ca.frameType!==2)throw new L(lc);return await Promise.resolve(new Vf(a))}async createSidePanelClient(){var a=this.O;if(a.ca.frameType!==1)throw new L(mc);return await Promise.resolve(new Wf(a))}async createCoWatchingClient(a){return await Uf(this.O,a)}async createCoDoingClient(a){return await Tf(this.O,
70
- a)}};let Yf=null;var Zf={addon:{getFrameType:function(){a:{var a=td().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(uc("config"));if(typeof a!=="object")throw new L(vc("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new L(vc("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(Yf&&td().Ga!=="integration.test.google.com")throw new L(Ec);
71
- return Yf=new Xf(a)}}},$f=["meet"],Y=l;$f[0]in Y||typeof Y.execScript=="undefined"||Y.execScript("var "+$f[0]);for(var Z;$f.length&&(Z=$f.shift());)$f.length||Zf===void 0?Y=Y[Z]&&Y[Z]!==Object.prototype[Z]?Y[Z]:Y[Z]={}:Y[Z]=Zf;}).call(this);
69
+ function Jf(a,b){if(a==null||b==null)return!1;const 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};var Ff=function(a,b){const c=id(a.signal,d=>{b(d)});a.j.push(c)},Kf=class{constructor(a,b){this.channel=a;this.signal=b;this.j=[]}send(a){this.channel.send(bc(a))}async N(a,b){a=await this.channel.N(bc(a));return b(a.data)}shutdown(){this.j.forEach(a=>{this.signal.detach(a)})}};function Lf(a,b){var c=Mf;const d=a.signal(),e=a.signal();id(b,g=>{const f=c(g)?d:e;se(a,f,g)},a);return{gb:d,cb:e}}function Nf(a,b,c,d=e=>e){id(c,e=>{se(a,b,d(e))},a)};async function Of(a,b){if(b)return a=await Cf({activityTitle:b.activityTitle,sa:"co-watching",ib:()=>b.onCoWatchingStateQuery(),Ba:c=>{b.onCoWatchingStateChanged(c)}},a,{La:uf,Ka:wf,Ia:zf,Aa:sf,xa:Jf}),new If(a)}async function Pf(a,b){if(b)return a=await Cf({activityTitle:b.activityTitle,sa:"co-doing",Ba:c=>{b.onCoDoingStateChanged(c)}},a,{La:pf,Ka:rf,Ia:Af,Aa:of,xa:Hf}),new Gf(a)}
70
+ async function Qf(a){const b=new ue,c=b.signal();a=await a;Nf(b,c,a.signal,g=>g.content);const {gb:d,cb:e}=Lf(b,c);return{Oa:new Kf(a.channel,d),Pa:new Kf(a.channel,e)}}function Mf(a){a:switch(a.R()){case 1:a=F(a,Ge,1,Ie);break a;default:throw Error("CA Message arrived with no known content message set");}return a.T()};async function Rf(a,b){({Oa:a}=await Qf(Pe(a.i)));b=await Pf(a,b);if(!b)throw Error("Failed to create co-doing session");return b}async function Sf(a,b){({Pa:a}=await Qf(Pe(a.i)));b=await Of(a,b);if(!b)throw Error("Failed to create co-watching session");return b};var Tf=class extends pd{async notifySidePanel(a){await Se(this.context.i,1,a)}async unloadSidePanel(){await Qe(this.context.i)}async loadSidePanel(){await Re(this.context.i)}};var Uf=class extends pd{async notifyMainStage(a){await Se(this.context.i,2,a)}};var Vf=class{constructor(a){a=a.cloudProjectNumber;const b=rd();if(b.cloudProjectNumber!==a)throw new K(oc);const c=b.Ga,d=b.Qa;let e;Te=(e=Te)!=null?e:Le(d,c,a);this.O=new Ue(b)}async createMainStageClient(){var a=this.O;if(a.ca.frameType!==2)throw new K(kc);return await Promise.resolve(new Tf(a))}async createSidePanelClient(){var a=this.O;if(a.ca.frameType!==1)throw new K(lc);return await Promise.resolve(new Uf(a))}async createCoWatchingClient(a){return await Sf(this.O,a)}async createCoDoingClient(a){return await Rf(this.O,
71
+ a)}};let Wf=null;var Xf={addon:{getFrameType:function(){a:{var a=rd().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 K(uc("config"));if(typeof a!=="object")throw new K(M("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new K(M("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(Wf&&rd().Ga!=="integration.test.google.com")throw new K(Dc);
72
+ return Wf=new Vf(a)}}},Yf=["meet"],Y=l;Yf[0]in Y||typeof Y.execScript=="undefined"||Y.execScript("var "+Yf[0]);for(var Z;Yf.length&&(Z=Yf.shift());)Yf.length||Xf===void 0?Y=Y[Z]&&Y[Z]!==Object.prototype[Z]?Y[Z]:Y[Z]={}:Y[Z]=Xf;}).call(this);
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": "0.9.1-670722405",
4
+ "version": "0.10.0-671117181",
5
5
  "repository": "googleworkspace/meet",
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "homepage": "https://developers.google.com/meet/add-ons/guides/overview",