@googleworkspace/meet-addons 0.9.1-668624766 → 0.9.1-669470925

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
@@ -573,8 +573,6 @@ export interface AddonSession {
573
573
  createCoWatchingClient(
574
574
  coWatchingDelegate: CoWatchingDelegate,
575
575
  ): Promise<CoWatchingClient>;
576
- /** Creates a `RoomsStandaloneClient`. */
577
- createRoomsStandaloneClient(): Promise<MeetRoomsStandaloneClient>;
578
576
  }
579
577
 
580
578
  /**
package/meet.addons.js CHANGED
@@ -4,70 +4,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=
4
4
  Copyright The Closure Library Authors.
5
5
  SPDX-License-Identifier: Apache-2.0
6
6
  */
7
- var k=this||self,ea=function(a,b){a:{var c=["CLOSURE_FLAGS"];for(var d=k,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.ub=b.prototype;a.prototype=
8
- new c;a.prototype.constructor=a;a.qb=function(d,e,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[e].apply(d,g)}};function 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 l(a){k.setTimeout(()=>{throw a;},0)};var la=ea(610401301,!1),ma=ea(645172343,!0);var na;const oa=k.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 n(a){var b;a:{if(b=k.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"):(n("Chrome")||n("CriOS"))&&!(q()?0:n("Edge"))||n("Silk")};function ra(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};!n("Android")||qa();qa();n("Safari")&&(qa()||(q()?0:n("Coast"))||(q()?0:n("Opera"))||(q()?0:n("Edge"))||(q()?pa("Microsoft Edge"):n("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.ba=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");l(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(),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.tb!==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
- function Va(a){if(a&2)throw Error();}var Wa=Object.freeze({});Object.freeze({});var Xa=Object.freeze({});let t=0,u=0;function Ya(a){const b=a>>>0;t=b;u=(a-b)/4294967296>>>0}function Za(a){if(a<0){Ya(0-a);const [b,c]=$a(t,u);t=b>>>0;u=c>>>0}else Ya(a)}function ab(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+bb(c)+bb(a));return c}
10
- function bb(a){a=String(a);return"0000000".slice(a.length)+a}function $a(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};function cb(a){a.sb=!0;return a};var db=cb(a=>typeof a==="number"),eb=cb(a=>typeof a==="string"),fb=cb(a=>typeof a==="boolean");var gb=typeof k.BigInt==="function"&&typeof k.BigInt(0)==="bigint";var pb=cb(a=>gb?a>=hb&&a<=ib:a[0]==="-"?jb(a,kb):jb(a,ob));const kb=Number.MIN_SAFE_INTEGER.toString(),hb=gb?BigInt(Number.MIN_SAFE_INTEGER):void 0,ob=Number.MAX_SAFE_INTEGER.toString(),ib=gb?BigInt(Number.MAX_SAFE_INTEGER):void 0;function jb(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}};function qb(a){if(a==null||typeof a==="boolean")return a;if(typeof a==="number")return!!a}const rb=/^-?([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:rb.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(eb(b)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(b))throw Error(String(b));}else if(db(b)&&!Number.isSafeInteger(b))throw Error(String(b));a=gb?BigInt(a):fb(a)?a?"1":"0":eb(a)?a.trim()||"0":String(a);return a;default:return vb(a)}}
12
- function vb(a){a=Math.trunc(a);if(!Number.isSafeInteger(a)){Za(a);var b=t,c=u;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)Za(Number(a));else if(Ga())a=BigInt(a),t=Number(a&BigInt(4294967295))>>>0,u=Number(a>>BigInt(32)&BigInt(4294967295));else{b=+(a[0]==="-");u=t=0;const c=a.length;for(let d=0+b,e=(c-b)%6+b;e<=c;d=e,e+=6){const f=Number(a.slice(d,
14
- e));u*=1E6;t=t*1E6+f;t>=4294967296&&(u+=Math.trunc(t/4294967296),u>>>=0,t>>>=0)}if(b){const [d,e]=$a(t,u);t=d;u=e}}a=t;b=u;if(b&2147483648)if(Ga())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{const [c,d]=$a(a,b);a="-"+ab(c,d)}else a=ab(a,b)}return a}function x(a){if(a!=null&&typeof a!=="string")throw Error();return a}function wb(a,b,c){if(a!=null&&typeof a==="object"&&a.pa===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 pb(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.ba;return b==null?"":typeof b==="string"?b:a.ba=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 f in e)b[f]=c(e[f])}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 f={};for(let g in a)f[g]=Jb(a[g],b,c,d,e);a=f}else a=b(a,d);return a}}
15
- function Kb(a,b,c,d,e){const f=d||c?a[r]|0:0;d=d?!!(f&32):void 0;a=Ha(a);for(let g=0;g<a.length;g++)a[g]=Jb(a[g],b,c,d,e);c&&c(f,a);return a}function Lb(a){return a.pa===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.pa===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,f=>Mb(f,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 y(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 y=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 f=a.length;if(d&&b&256&&(d=a[f-1][c],d!=null)){if(Qb(a,b,e,c)&&Ia!=null){var g;a=(g=Da)!=null?g:Da={};g=a[Ia]||0;g>=4||(a[Ia]=g+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);z(d,e,b,c);return a};
16
- function z(a,b,c,d,e){const f=b>>14&1023||536870912;if(c>=f||e&&!ma){let g=b;if(b&256)e=a[a.length-1];else{if(d==null)return g;e=a[f+(+!!(b&512)-1)]={};g|=256}e[c]=d;c<f&&(a[c+(+!!(b&512)-1)]=void 0);g!==b&&(a[r]=g);return g}a[c+(+!!(b&512)-1)]=d;b&256&&(a=a[a.length-1],c in a&&delete a[c]);return b}var B=function(a,b,c,d){c=A(a,d)===c?c:-1;return Sb(a,b,c)!==void 0};function Tb(a){return!!(2&a)&&!!(4&a)||!!(2048&a)}
17
- function C(a,b,c,d){const e=a.h;let f=e[r];Va(f);z(e,f,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}var A=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 f=0;f<d.length;f++){const g=d[f];y(b,c,g)!=null&&(e!==0&&(c=z(b,c,e)),e=g)}a.set(d,e);return e}function Sb(a,b,c,d){a=a.h;let e=a[r];const f=y(a,e,c,d);b=wb(f,b,e);b!==f&&b!=null&&z(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,z(a,d,c,b,!1))}return b},$b=function(a){var b=void 0===Wa?2:5,c=a.h,d=c[r];a=d;var e=!(2&d),f=!!(2&a);d=f?1:b;e&&(e=!f);b=y(c,a,1);b=Array.isArray(b)?b:Ta;var g=b[r]|0;f=!!(4&g);if(!f){var h=g;h===0&&(h=Xb(h,a));g=b;h|=1;var m=a,p=Yb;const I=!!(2&h);I&&(m|=2);let P=!I,lb=!0,Ja=0,mb=0;for(;Ja<g.length;Ja++){const nb=wb(g[Ja],p,m);if(nb instanceof p){if(!I){const uc=!!((nb.h[r]|0)&2);P&&(P=
19
- !uc);lb&&(lb=uc)}g[mb++]=nb}}mb<Ja&&(g.length=mb);h|=4;h=lb?h|16:h&-17;h=P?h|8:h&-9;g[r]=h;I&&Object.freeze(g);g=h}if(e&&!(8&g||!b.length&&(d===1||d===4&&32&g))){Tb(g)&&(b=Ha(b),g=Xb(g,a),a=z(c,a,1,b));e=b;for(h=0;h<e.length;h++)m=e[h],p=Ob(m),m!==p&&(e[h]=p);g|=8;g=e.length?g&-17:g|16;e[r]=g}let v;d===1||d===4&&32&g?Tb(g)||(a=g,c=!!(32&g),g|=!b.length||16&g&&(!f||c)?2:2048,g!==a&&(b[r]=g),Object.freeze(b)):(f=d!==5?!1:!!(32&g)||Tb(g)||!!xb(b),(d===2||f)&&Tb(g)&&(b=Ha(b),g=Xb(g,a),g=Zb(g,a,!1),b[r]=
20
- g,a=z(c,a,1,b)),Tb(g)||(c=g,g=Zb(g,a,!1),g!==c&&(b[r]=g)),f&&(v=Bb(b)));return v||b},D=function(a,b,c){c==null&&(c=void 0);return Rb(a,b,c)},E=function(a,b,c,d){d==null&&(d=void 0);a:{const g=a.h;var e=g[r];Va(e);if(d==null){var f=Vb(g);if(Ub(f,g,e,c)===b)f.set(c,0);else break a}else{f=g;const h=Vb(f),m=Ub(h,f,e,c);m!==b&&(m&&(e=z(f,e,m)),h.set(c,b))}z(g,e,b,d)}return a},ac=function(a,b){const c=a.h;let d=c[r];Va(d);if(b==null)return z(c,d,1),a;var e=b,f;b=((f=Db)==null?void 0:f.get(e))||e;f=e=b[r]|
21
- 0;const g=!!(2&e)||!!(2048&e),h=g||Object.isFrozen(b);var m;if(m=!h)(m=void 0===Xa)||(m=!1);let p=!0,v=!0;for(let P=0;P<b.length;P++){var I=b[P];g||(I=!!((I.h[r]|0)&2),p&&(p=!I),v&&(v=I))}g||(e|=5,e=p?e|8:e&-9,e=v?e|16:e&-17);if(m||h&&e!==f)b=Ha(b),f=0,e=Xb(e,d),e=Zb(e,d,!0);e!==f&&(b[r]=e);z(c,d,1,b);return a};function Xb(a,b){a=(2&b?a|2:a&-3)|32;return a&=-2049}function Zb(a,b,c){32&b&&c||(a&=-33);return a}function F(a,b){return a!=null?a:b}
22
- var bc=function(a){a=Pb(a,1);a!=null&&(typeof a==="bigint"?pb(a)?a=Number(a):(a=BigInt.asIntN(64,a),a=pb(a)?Number(a):String(a)):a=sb(a)?typeof a==="number"?vb(a):ub(a):void 0);return F(a,0)},G=function(a,b){a=Pb(a,b);return F(a==null||typeof a==="string"?a:void 0,"")},H=function(a,b){a=Pb(a,b);a=a==null?a:Number.isFinite(a)?a|0:void 0;return F(a,0)},J=function(a,b,c,d){c=A(a,d)===c?c:-1;return Wb(a,b,c)};let cc;
23
- var ec=function(a){try{return cc=!0,JSON.stringify(dc(a),Gb)}finally{cc=!1}},K=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 dc(this)}getExtension(a){const b=a.D?a.Za?a.M(this,a.D,a.F,void 0===Wa?2:4,
24
- !0):a.M(this,a.D,a.F,!0):a.Za?a.M(this,a.F,void 0===Wa?2:4,!0):a.M(this,a.F,a.defaultValue,!0);return a.rb&&b==null?a.defaultValue:b}hasExtension(a){a.D?a=Sb(this,a.D,a.F,!0)!==void 0:(a=a.D?a.M(this,a.D,a.F,!0):a.M(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))}};K.prototype.pa=Na;K.prototype.toString=function(){try{return cc=!0,dc(this).toString()}finally{cc=!1}};
25
- function dc(a){a=cc?a.h:Kb(a.h,Lb,void 0,void 0,!1);{var b=!cc;let p=a.length;if(p){var c=a[p-1],d=Qa(c);d?p--:c=void 0;var e=a;if(d){b:{var f=c;var g={};d=!1;if(f)for(var h in f){if(isNaN(+h)){g[h]=f[h];continue}let v=f[h];Array.isArray(v)&&(Sa(v)||Pa(v)&&v.size===0)&&(v=null);v==null&&(d=!0);v!=null&&(g[h]=v)}if(d){for(let v in g)break b;g=null}else g=f}f=g==null?c!=null:g!==c}for(;p>0;p--){h=e[p-1];if(!(h==null||Sa(h)||Pa(h)&&h.size===0))break;var m=!0}if(e!==a||f||m){if(!b)e=Array.prototype.slice.call(e,
26
- 0,p);else if(m||f||g)e.length=p;g&&e.push(g)}m=e}else m=a}return m};function fc(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 gc=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 hc=class extends K{setSeconds(a){return C(this,1,a==null?a:tb(a),"0")}};var jc=class extends K{Aa(){return A(this,ic)}},ic=[2,3];var kc=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}},lc={errorType:"InternalError",message:"An unexpected error has occurred.",g:"No further information is available."},mc={errorType:"InternalError",message:"An unexpected error has occurred.",g:"No further information is available."},nc={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)."},
27
- oc={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."},pc={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."},qc={errorType:"NotSupportedInStandalone",
28
- message:"This method is not supported in standalone mode.",g:"Do not call this method in standalone mode."},rc={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)."},sc={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.",
29
- 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."},tc={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."},vc={errorType:"InvalidActivityStartingState",
30
- 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."},wc={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."},
31
- xc={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."},yc={errorType:"AddonStartingStateMissingAttributes",message:"The supplied AddonStartingState object does not contain any recognized attributes.",g:"Ensure that the AddonStartingState object contains at least one of the following attributes: sidePanelUrl, additionalData."},
32
- zc={errorType:"AddonStartingStateUnrecognizedAttributes",message:"The supplied AddonStartingState object contains attributes that are not recognized.",g:"Ensure that the AddonStartingState object has only the following attributes: sidePanelUrl, additionalData."},Ac=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",message:`The type '${b}' of argument supplied for '${a}' did not match the expected type '${c}'.`,
33
- g:"Ensure the type of the argument provided matches the expected type."}),Bc=a=>({errorType:"InternalError",message:`Could not connect to ${a} channel. Unknown error`,g:"No further information is available."}),Cc={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",g:"Ensure that no activity is ongoing."},Dc={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",g:"Send one of the available commands in the frame message."},
34
- Ec={errorType:"RequiresEapEnrollment",message:"This feature is only available to early access partners.",g:"Meet add-on early access enrollment is currently closed."},Fc={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."},Gc={errorType:"SizeLimitExceededActivityStartingState",message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",
35
- g:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Hc={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."},Ic={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",g:"Only instantiate the AddonSession once."},Jc={errorType:"UserCancelled",
36
- message:"The user cancelled starting an activity.",g:"The user needs to click continue to start the activity."},Kc={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",g:"Do not call this method during a Meet call."},Lc={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."},
37
- Mc={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."};
38
- function Nc(a){switch(a){case 0:return lc;case 1:return tc;case 2:return vc;case 3:return Cc;case 4:return Dc;case 5:return Ec;case 6:return qc;case 7:return Fc;case 8:return Gc;case 9:return Hc;case 10:return Jc;case 11:return Kc;case 12:return Lc;case 13:return Mc;default:return mc}}
39
- function Oc(a){let b;var c=(b=H(a,1))!=null?b:0;a=Pc(a.Aa());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}.`,
40
- g:"No further information is available."};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 Bc(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",
41
- message:`Could not connect to ${a} channel.`,g:"No further information is available."}}return c;default:return Bc(a)}}function Pc(a){switch(a){case 2:return"coActivity";case 3:return"guaranteed delivery";case 0:return"unknown";default:return"unknown"}}function Qc({errorType:a,message:b,g:c},d=""){throw new L({errorType:a,message:d?`${b} ${d}`:b,g:c});}function Rc(a,b){Qc({...nc,message:`${nc.message}: ${a}. In URL ${b}`})};var Sc=function(a){var b=new Yb;return C(b,1,w(a),0)},Tc=function(a,b){return C(a,2,x(b),"")},Uc=function(a,b){return C(a,3,x(b),"")},Yb=class extends K{getFrameType(){return H(this,1)}};var Vc=class extends K{ia(){return $b(this)}X(a){return ac(this,a)}};var Wc=class extends K{constructor(){super()}};var Yc=function(a){var b=new Xc;return C(b,1,w(a),0)},Xc=class extends K{constructor(){super()}};var Zc=class extends K{La(a){return C(this,2,x(a),"")}};var $c=class extends K{};var ad=class extends K{};var cd=class extends K{S(){return A(this,bd)}la(){return J(this,Vc,2,bd)}aa(a){return E(this,2,bd,a)}getMeetingInfo(){return J(this,ad,3,bd)}getMeetPlatformInfo(){return J(this,$c,4,bd)}},bd=[2,3,4,5];var ed=class extends K{Ba(){return A(this,dd)}},dd=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17];var fd=class extends K{constructor(){super()}la(){return Wb(this,Vc,1)}aa(a){return D(this,1,a)}};var gd=class extends K{constructor(){super()}la(){return Wb(this,Vc,1)}aa(a){return D(this,1,a)}};var hd=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),id=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function jd(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.fa())};N.prototype[Symbol.dispose]=function(){this.dispose()};var kd=function(a,b){a.o?b():(a.A||(a.A=[]),a.A.push(b))};N.prototype.fa=function(){if(this.A)for(;this.A.length;)this.A.shift()()};var ld=function({ta:a,Ha:b}){if(a===null)throw new L(Ac("activityStartingState"));if(b||a!==void 0){if(typeof a!=="object")throw new L(M("activityStartingState",typeof a,`object${b?"":" | undefined"}`));if(a.mainStageUrl!==void 0&&typeof a.mainStageUrl!=="string")throw new L(M("mainStageUrl",typeof a.mainStageUrl,"string | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new L(M("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&
42
- typeof a.additionalData!=="string")throw new L(M("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new L(xc);if(Object.keys(a).length===0)throw new L(wc);}},md=function(a){const b=[];b.push(Uc(Tc(Sc(2),a.mainStageUrl),a.additionalData));b.push(Uc(Tc(Sc(1),a.sidePanelUrl),a.additionalData));return b},ud=class extends N{constructor(a){super();this.context=a;this.Fa={};nd(this.context.i.hb,b=>{switch(b.content.Ba()){case 7:const d=
43
- this.Fa.frameToFrameMessage;b=J(b.content,Zc,7,dd);if(d&&b){var c=H(b,1);c=hd.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:G(b,2)})}break;case 16:od(this.context.i)}})}async getMeetingInfo(){const a=await pd(this.context.i,Yc(2));return{meetingId:G(a.getMeetingInfo(),1)}}async getFrameOpenReason(){let a;const b=(a=this.context.P.Wa)!=null?a:0;let c;return(c=id.get(b))!=null?c:"UNKNOWN"}async getActivityStartingState(){var a=(await pd(this.context.i,Yc(1))).la();
44
- const b=a==null?void 0:a.ia().find(c=>c.getFrameType()===2);a=a==null?void 0:a.ia().find(c=>c.getFrameType()===1);return{mainStageUrl:(b==null?void 0:G(b,2))||void 0,sidePanelUrl:(a==null?void 0:G(a,2))||void 0,additionalData:(a==null?void 0:G(a,3))||void 0}}async setActivityStartingState(a){ld({ta:a,Ha:!0});a=md(a);await qd(this.context.i,(new fd).aa((new Vc).X(a)))}on(a,b){this.Fa[a]=b}async getMeetPlatformInfo(){const a=await pd(this.context.i,Yc(3));return{isMeetHardware:F(qb(Pb(a.getMeetPlatformInfo(),
45
- 1)),!1)}}async closeAddon(){await rd(this.context.i)}async startActivity(a){ld({ta:a,Ha:!1});const b=new gd;a&&(a=md(a),b.aa((new Vc).X(a)));await sd(this.context.i,b)}async endActivity(a){var b=td,c=this.context.i,d=new Wc;a=C(d,1,w(a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0),0);await b(c,a)}};var vd=fc(class extends K{getFrameOpenReason(){return H(this,5)}});function wd(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");c?b=vd(atob(c)):(Rc("meet_sdk",b),b=void 0);(c=G(b,1))||Rc("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new L(rc);const d=G(b,2);d||Rc("meet_control_channel_name",a);const e=G(b,4);e||Rc("addon_cloud_project_number",a);var f;a=(f=b.getFrameOpenReason())!=null?f:0;f=G(b,3)||"https://meet.google.com";return{Wa:a,frameType:c,Sa:d,cloudProjectNumber:e,Ia:f}};var xd=class extends K{constructor(){super()}};var yd=class extends K{constructor(){super()}};var Bd=function(){var a=new zd,b=new yd;return E(a,1,Ad,b)},zd=class extends K{constructor(){super()}Aa(){return A(this,Ad)}},Ad=[1,2];var Cd=class extends K{constructor(){super()}};var Dd=class extends K{constructor(){super()}};var Ed=class extends K{constructor(){super()}La(a){return C(this,2,x(a),"")}};var Fd=class extends K{constructor(){super()}};var Gd=class extends K{constructor(){super()}ia(){return $b(this)}X(a){return ac(this,a)}};var Hd=class extends K{constructor(){super()}setAddonStartingState(a){return D(this,1,a)}};var Id=class extends K{constructor(){super()}};var Q=class extends K{constructor(){super()}Ba(){return A(this,O)}},O=[1,2,5,6,7,8,9,10,11,13,14,15,16];var Jd=class extends K{},Kd=fc(Jd),Ld=[1,2];class Md{constructor(a,b){this.data=a;this.channel=b}};var Nd=Promise;var Pd=function(a){const b=new MessageChannel;Od(b.port1,a);return b},Rd=function(a,b){Od(a,b);return new Qd(a)};class Qd{constructor(a){this.jb=a}send(a,b,c=[]){b=Pd(b);this.jb.postMessage(a,[b.port2].concat(c))}O(a,b){return new Nd(c=>{this.send(a,c,b)})}}const Od=function(a,b){b&&(a.onmessage=c=>{var d=c.data;c=Rd(c.ports[0]);b(new Md(d,c))})};class Sd{constructor(a,b){this.bb=100;this.Ta=a;this.mb=b;this.W=0;this.V=null}get(){let a;this.W>0?(this.W--,a=this.V,this.V=a.next,a.next=null):a=this.Ta();return a}put(a){this.mb(a);this.W<this.bb&&(this.W++,a.next=this.V,this.V=a)}};var Td=function(){var a=document;var b="IFRAME";a.contentType==="application/xhtml+xml"&&(b=b.toLowerCase());return a.createElement(b)};var Ud=function(){};var Vd,Wd=function(){var a=k.MessageChannel;typeof a==="undefined"&&typeof window!=="undefined"&&window.postMessage&&window.addEventListener&&!n("Presto")&&(a=function(){var e=Td();e.style.display="none";document.documentElement.appendChild(e);var f=e.contentWindow;e=f.document;e.open();e.close();var g="callImmediate"+Math.random(),h=f.location.protocol=="file:"?"*":f.location.protocol+"//"+f.location.host;e=ha(function(m){if((h=="*"||m.origin==h)&&m.data==g)this.port1.onmessage()},this);f.addEventListener("message",
46
- e,!1);this.port1={};this.port2={postMessage:function(){f.postMessage(g,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.wa;c.wa=null;e()}};return function(e){d.next={wa:e};d=d.next;b.port2.postMessage(0)}}return function(e){k.setTimeout(e,0)}};class Xd{constructor(){this.ca=this.J=null}add(a,b){const c=Yd.get();c.set(a,b);this.ca?this.ca.next=c:this.J=c;this.ca=c}remove(){let a=null;this.J&&(a=this.J,this.J=this.J.next,this.J||(this.ca=null),a.next=null);return a}}var Yd=new Sd(()=>new Zd,a=>a.reset());class Zd{constructor(){this.next=this.scope=this.ha=null}set(a,b){this.ha=a;this.scope=b;this.next=null}reset(){this.next=this.scope=this.ha=null}};let $d,ae=!1,be=new Xd,de=(a,b)=>{$d||ce();ae||($d(),ae=!0);be.add(a,b)},ce=()=>{if(k.Promise&&k.Promise.resolve){const a=k.Promise.resolve(void 0);$d=()=>{a.then(ee)}}else $d=()=>{var a=ee;typeof k.setImmediate!=="function"||k.Window&&k.Window.prototype&&k.Window.prototype.setImmediate==k.setImmediate?(Vd||(Vd=Wd()),Vd(a)):k.setImmediate(a)}};var ee=()=>{let a;for(;a=be.remove();){try{a.ha.call(a.scope)}catch(b){l(b)}Yd.put(a)}ae=!1};var R=function(a){this.l=0;this.Ja=void 0;this.C=this.u=this.B=null;this.T=this.ga=!1;if(a!=Ud)try{var b=this;a.call(void 0,function(c){fe(b,2,c)},function(c){fe(b,3,c)})}catch(c){fe(this,3,c)}},ge=function(){this.next=this.context=this.H=this.N=this.v=null;this.L=!1};ge.prototype.reset=function(){this.context=this.H=this.N=this.v=null;this.L=!1};
47
- var he=new Sd(function(){return new ge},function(a){a.reset()}),ie=function(a,b,c){var d=he.get();d.N=a;d.H=b;d.context=c;return d},ke=function(){var a,b,c=new R(function(d,e){a=d;b=e});return new je(c,a,b)};R.prototype.then=function(a,b,c){return le(this,typeof a==="function"?a:null,typeof b==="function"?b:null,c)};R.prototype.$goog_Thenable=!0;var ne=function(a,b){b=ie(b,b);b.L=!0;me(a,b)};R.prototype.nb=function(a,b){return le(this,null,a,b)};R.prototype.catch=R.prototype.nb;
48
- R.prototype.cancel=function(a){if(this.l==0){var b=new S(a);de(function(){oe(this,b)},this)}};
49
- var oe=function(a,b){if(a.l==0)if(a.B){var c=a.B;if(c.u){for(var d=0,e=null,f=null,g=c.u;g&&(g.L||(d++,g.v==a&&(e=g),!(e&&d>1)));g=g.next)e||(f=g);e&&(c.l==0&&d==1?oe(c,b):(f?(d=f,d.next==c.C&&(c.C=d),d.next=d.next.next):pe(c),qe(c,e,3,b)))}a.B=null}else fe(a,3,b)},me=function(a,b){a.u||a.l!=2&&a.l!=3||re(a);a.C?a.C.next=b:a.u=b;a.C=b},le=function(a,b,c,d){var e=ie(null,null,null);e.v=new R(function(f,g){e.N=b?function(h){try{var m=b.call(d,h);f(m)}catch(p){g(p)}}:f;e.H=c?function(h){try{var m=c.call(d,
50
- h);m===void 0&&h instanceof S?g(h):f(m)}catch(p){g(p)}}:g});e.v.B=a;me(a,e);return e.v};R.prototype.ob=function(a){this.l=0;fe(this,2,a)};R.prototype.pb=function(a){this.l=0;fe(this,3,a)};
51
- var fe=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.ob,f=a.pb;if(d instanceof R){me(d,ie(e||Ud,f||null,a));var g=!0}else{if(d)try{var h=!!d.$goog_Thenable}catch(p){h=!1}else h=!1;if(h)d.then(e,f,a),g=!0;else{h=typeof d;if(h=="object"&&d!=null||h=="function")try{var m=d.then;if(typeof m==="function"){se(d,m,e,f,a);g=!0;break a}}catch(p){f.call(a,p);g=!0;break a}g=!1}}}g||(a.Ja=c,a.l=b,a.B=null,re(a),b!=3||c instanceof S||te(a,c))}},
52
- se=function(a,b,c,d,e){var f=!1,g=function(m){f||(f=!0,c.call(e,m))},h=function(m){f||(f=!0,d.call(e,m))};try{b.call(a,g,h)}catch(m){h(m)}},re=function(a){a.ga||(a.ga=!0,de(a.Va,a))},pe=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.Va=function(){for(var a;a=pe(this);)qe(this,a,this.l,this.Ja);this.ga=!1};
53
- var qe=function(a,b,c,d){if(c==3&&b.H&&!b.L)for(;a&&a.T;a=a.B)a.T=!1;if(b.v)b.v.B=null,ue(b,c,d);else try{b.L?b.N.call(b.context):ue(b,c,d)}catch(e){ve.call(null,e)}he.put(b)},ue=function(a,b,c){b==2?a.N.call(a.context,c):a.H&&a.H.call(a.context,c)},te=function(a,b){a.T=!0;de(function(){a.T&&ve.call(null,b)})},ve=l,S=function(a){ka.call(this,a)};ja(S,ka);S.prototype.name="cancel";var je=function(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let we=1,xe=new WeakMap;
54
- var ze=function(a,b,c){var d=ye;a.Oa.has(b);d(b,c)},Be=class extends N{constructor(){super();this.Oa=new Set}signal(){const a=new Ae;this.Oa.add(a);kd(this,ia(jd,a));return a}},ye=function(a,b){return new Promise(c=>{Ce(()=>{a.va&&(a.ab=b,a.Ea=!0);for(const {sa:d,slot:e}of a.j.values())try{e(b,{signal:a,sa:d})}catch(f){l(f)}for(const d of a.I)d.resolve(b);a.I.clear();c()})})},nd=function(a,b,c){const d=we++;Ce(()=>{De(a,d,b,c)});return d},De=function(a,b,c,d){if(!a.o)if(d){if(!d.o){const e=()=>{Ce(()=>
55
- {a.j.delete(b);const f=xe.get(d);f&&ra(f,e)})};a.j.set(b,{sa:b,slot:c,ea:e});Ee(d,e)}}else a.j.set(b,{sa:b,slot:c,ea:()=>a.j.delete(b)})},Ae=class extends N{constructor(){super();this.va=!1;this.j=new Map;this.I=new Set;this.Ea=!1}detach(a){Ce(()=>{const b=this.j.get(a);b&&b.ea()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){const c=ke();Ce(()=>{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&&
56
- this.va&&this.Ea)c.resolve(this.ab);else if(this.I.add(c),ne(c.promise,()=>{this.I.delete(c)}),b){const d=()=>{c.reject(new S("Owner asynchronously disposed"))};ne(c.promise,()=>{const e=xe.get(b);e&&ra(e,d)});Ee(b,d)}});return c.promise}fa(){super.fa();Ce(()=>{for(const {ea: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 Fe=[];let Ge=!1;function Ce(a){Fe.push(a);He()}
57
- async function He(){if(!Ge)try{Ge=!0;let a=Ie(0);for(;a<Fe.length;)await Promise.resolve(),a=Ie(a)}catch(a){l(a)}finally{Fe.length=0,Ge=!1}}function Ie(a){const b=a+100;for(;a<b&&a<Fe.length;)try{Fe[a++]()}catch(c){l(c)}return a}function Ee(a,b){if(a.o)b();else{var c=xe.get(a);if(c)c.push(b);else{const d=[b];xe.set(a,d);kd(a,()=>{for(const e of[...d])e();xe.delete(a)})}}};function T(a){var b=new Jd;a=E(b,1,Ld,a);return{content:ec(a)}}const Je=new Be;function Ke(a,b){const c=Je.signal();return{channel:Rd(a,d=>{const e=b(d.data);ze(Je,c,{content:e,lb:d})}),signal:c}};let Le;var U=class extends K{getState(){const a=this.h;let b=a[r];const c=y(a,b,1),d=Ra(c,!0,!!(b&34));d!=null&&d!==c&&z(a,b,1,d);return d==null?Ba():d}};var V=class extends K{};var Ne=class extends K{ja(){return J(this,U,2,Me)}Y(a){E(this,2,Me,a)}U(){return B(this,U,2,Me)}ka(){return J(this,V,3,Me)}Z(a){E(this,3,Me,a)}ma(){return B(this,V,3,Me)}},Me=[2,3];var Oe=fc(class extends K{});var Qe=fc(class extends K{S(){return A(this,Pe)}}),Pe=[1,2];var Re=({destination:a,origin:b,vb:c,Pa:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");const f=Pd(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return Rd(f.port1,e)};function Se(a,b,c){const d=new Be,e=d.signal();a=Re({destination:window.parent,origin:b,Pa:a,onMessage:f=>{const g=Kd(f.data.content);A(g,Ld)===2&&ze(d,e,{content:J(g,ed,2,Ld),lb:f,messagePort:f.data.messagePort})}});return new Te(e,a,c)}
58
- var od=async function(a){a=a.channel;var b=a.O;var c=new Q;var d=new Fd;c=E(c,13,O,d);await b.call(a,T(c))},pd=async function(a,b){var c=W,d=new Q;b=E(d,9,O,b);a=await c(a,T(b));let e;return(e=J(Kd(a.data.content),ed,2,Ld))==null?void 0:J(e,cd,9,dd)},qd=async function(a,b){var c=W,d=new Q;b=E(d,8,O,b);await c(a,T(b))},rd=async function(a){var b=W;var c=new Q;var d=new xd;c=E(c,11,O,d);await b(a,T(c))},sd=async function(a,b){var c=W,d=new Q;b=E(d,14,O,b);await c(a,T(b))},td=async function(a,b){var c=
59
- W,d=new Q;b=E(d,15,O,b);await c(a,T(b))},Ue=async function(a){setInterval(async()=>{await od(a)},1E3)},W=async function(a,b){(a=await a.channel.O(b))||Qc(mc,"Falsy response received from the message channel."+` ${JSON.stringify(a)}`);(b=a.data)||Qc(mc,"Data field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);(b=b.content)||Qc(mc,"Content field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);let c=void 0;try{c=Kd(b)}catch(d){Qc(mc,"The ControlMessage can't be deserialized."+
60
- ` ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=J(c,ed,2,Ld))||Qc(mc,"MeetToAddonMessage field on ControlMessage is falsy."+` ${JSON.stringify(b)}`);b=b==null?void 0:J(b,kc,10,dd);if((b==null?void 0:H(b,1))!==void 0)throw new L(Nc(H(b,1)));return a},Ve=async function(a,b,c){var d=W,e=new Q;b=E(e,1,O,b);d=await d(a,T(b));a=d.data.messagePort;var f;(d=(f=J(Kd(d.data.content),ed,2,Ld))==null?void 0:J(f,jc,1,dd))!=null?f=d:(f=new jc,f=C(f,1,w(0),0));return{channel:a?Ke(a,c):void 0,response:f}},We=async function(a){const b=
61
- Bd(),{channel:c,response:d}=await Ve(a,b,e=>Qe(e));if(!c)throw new L(Oc(d));return c},Xe=async function(a){var b=W;var c=new Q;var d=new Id;c=E(c,5,O,d);await b(a,T(c))},Ye=async function(a){var b=W;var c=new Q;var d=new Dd;c=E(c,6,O,d);await b(a,T(c))},Ze=async function(a,b,c){var d=W,e=new Q,f=new Ed;b=C(f,1,w(b),0).La(c);e=E(e,7,O,b);await d(a,T(e))},$e=async function(a,b){var c=W,d=new Q;b=E(d,16,O,b);await c(a,T(b))};
62
- class Te extends N{constructor(a,b,c){super();this.hb=a;this.channel=b;a=Le||(Le=gc("[0,9,1]"));a=Ob(a);a=Rb(a,4,x("668624766"));b=a.h;var d=b[r];b=d&2?a:Fb(a.constructor,Nb(b,d,!0));a=new Q;d=new Cd;b=D(d,2,b);c=C(b,3,x(c),"");c=E(a,2,O,c);this.channel.send(T(c));Ue(this)}};let af;var bf=class{constructor(a){var b=af;this.P=a;this.i=b}delete(){throw Error("Not implemented.");}};var df=class extends K{constructor(){super()}ra(a){return C(this,1,a==null?a:tb(a),"0")}ja(){return J(this,U,2,cf)}Y(a){E(this,2,cf,a)}U(){return B(this,U,2,cf)}ka(){return J(this,V,3,cf)}Z(a){E(this,3,cf,a)}ma(){return B(this,V,3,cf)}},cf=[2,3];var ef=class extends K{constructor(){super()}};var ff=class extends K{constructor(){super()}};var gf=class extends K{constructor(){super()}qa(a){return Rb(this,4,x(a))}};var jf=class extends K{constructor(){super()}ra(a){return C(this,1,a==null?a:tb(a),"0")}ja(){return J(this,U,2,hf)}Y(a){E(this,2,hf,a)}U(){return B(this,U,2,hf)}ka(){return J(this,V,3,hf)}Z(a){E(this,3,hf,a)}ma(){return B(this,V,3,hf)}},hf=[2,3],kf=[5,6];var lf=class extends K{constructor(){super()}qa(a){return C(this,1,x(a),"")}};var nf=class extends K{constructor(){super()}S(){return A(this,mf)}},mf=[1,2,3];function of(a){var b=new pf;let c=0,d;return(...e)=>{if(qf(b)){rf(b);var f=!0}else f=!1;f?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;let g;(g=d)==null||g()},sf(b))))}};var sf=function(a){const b=a.ya;let c;a=Date.now()-((c=a.na[a.index])!=null?c:0);return a>=b?0:b-a},qf=function(a){const b=a.ya;let c;return Date.now()-((c=a.na[a.index])!=null?c:0)>=b},rf=function(a){a.na[a.index]=Date.now();a.index=(a.index+1)%a.cb},pf=class{constructor(){this.cb=1;this.ya=500;this.na=[];this.index=0}};var tf=class extends Error{constructor(){super("Failed to create CoActivity: Connection refused - Meet refused to begin Live Sharing")}};var uf=class{constructor(a){this.config=a}start(){this.Ga!=null||(this.Ga=setInterval(()=>{this.config.gb()},this.config.Ya));return this}shutdown(){clearInterval(this.Ga)}};function vf(){const a=new Map,b={set(c,d){a.set(c,d);return b},da:()=>a};return b};function wf(a){if(a.U()){var b=a.ja().getState();a=Uint8Array;za(xa);var c=b.ba;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.ba=c;return{bytes:new a(b||0)}}}function xf(a,b){a.Y(yf(b));return a}function zf(a,b){a.Y(yf(b));return a}function yf(a){var b=new U;return C(b,1,Ra(a.bytes,!1,!1),Ba())}
63
- function Af(a){if(a.ma()){a=a.ka();var b,c,d=G(a,1),e=(c=(b=Wb(a,hc,2))==null?void 0:bc(b))!=null?c:0;c=a.h;let f=c[r];const g=y(c,f,4);b=g==null||typeof g==="number"?g:g==="NaN"||g==="Infinity"||g==="-Infinity"?Number(g):void 0;b!=null&&b!==g&&z(c,f,4,b);return{mediaId:d,mediaPlayoutPosition:e,mediaPlayoutRate:F(b,0),playbackState:Bf.get(H(a,3))}}}function Cf(a,b){a.Z(Df(b));return a}function Ef(a,b){a.Z(Df(b));return a}
64
- const Bf=vf().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED").da(),Ff=vf().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4).da();
65
- function Df(a){var b=new V;b=C(b,1,x(a.mediaId),"");var c=a.mediaPlayoutRate;if(c!=null&&typeof c!=="number")throw Error(`Value of float/double field must be a number, found ${typeof c}: ${c}`);b=C(b,4,c,0);c=(new hc).setSeconds(a.mediaPlayoutPosition);b=D(b,2,c);a=Ff.get(a.playbackState);return C(b,3,w(a),0)}function Gf({activityTitle:a}){return(new gf).qa(a)}function Hf(a,b){var c=new ff;b=C(c,1,w(b.G),0);E(a,6,kf,b);return a}function If(a){var b=new ef;E(a,5,kf,b);return a};const Jf=vf().set("co-doing",1).set("co-watching",2).da();async function Kf(a,b,c){var d=b.O,e=new nf;var f=(new lf).qa(a.activityTitle);var g=Jf.get(a.ua);f=C(f,2,w(g),0);e=E(e,3,mf,f);d=await d.call(b,e,Oe);let h;if((h=F(qb(Pb(d,1)),!1))!=null&&h)return new Lf(a,b,c,Wb(d,Ne,2));throw new tf;}var Mf=function(a,b){const c=a.config.Ca(b);c&&!a.config.za(a.s,c)&&(a.s=c,a.oa=bc(b),a.Ua(a.s))},X=function(a,b){const {state:c,eb:d,context:e}=b(a.s);a.s=c;a.notify(a.s,e,d)};
66
- class Lf{constructor(a,b,c,d){this.xa=a;this.R=b;this.config=c;this.Ua=of(e=>void this.xa.Da(e));Nf(this.R,e=>{const f=e.S();switch(f){case 1:Mf(this,J(e,Ne,1,Pe));break;case 2:case 0:console.warn(`IllegalMessage: ${f} - ${"Unhandled message"} - ${"Please raise a bug with the MeetJS team"}`)}});this.Xa=(new uf({Ya:1E3,gb:()=>{var e,f;const g=(f=(e=this.xa).kb)==null?void 0:f.call(e);this.s!==null&&(this.s={...this.s,...g},e=new nf,f=this.config.Ma((new df).ra(this.oa),this.s),e=E(e,1,mf,f),this.R.send(e))}})).start();
67
- this.s=null;this.oa=0;d&&Mf(this,d)}disconnect(){this.R.shutdown();this.Xa.shutdown()}notify(a,b,c){var d=c?Gf(c):void 0;c=this.config;var e=c.Na,f=(new jf).ra(this.oa);d=D(f,4,d);a=e.call(c,d,a);a=this.config.Ka(a,b);b=this.R;c=b.send;e=new nf;a=E(e,2,mf,a);c.call(b,a)}};var Of=class{constructor(a){this.m=a}broadcastStateUpdate(a){X(this.m,()=>({state:a,context:{}}))}disconnect(){this.m.disconnect()}};function Pf(a,b){return a==null||b==null?!1:a.bytes.length===b.bytes.length&&a.bytes.every((c,d)=>c===b.bytes[d])};var Qf=class{constructor(a){this.m=a}notifySwitchedToMedia(a,b,c){X(this.m,()=>({state:{mediaId:b,mediaPlayoutRate:1,mediaPlayoutPosition:c,playbackState:"PLAY"},eb:{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},
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);
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("669470925"));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},
68
67
  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()}};
69
- function Rf(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 Nf=function(a,b){const c=nd(a.signal,d=>{b(d)});a.j.push(c)},Sf=class{constructor(a,b){this.channel=a;this.signal=b;this.j=[]}send(a){this.channel.send(ec(a))}async O(a,b){a=await this.channel.O(ec(a));return b(a.data)}shutdown(){this.j.forEach(a=>{this.signal.detach(a)})}};function Tf(a,b){var c=Uf;const d=a.signal(),e=a.signal();nd(b,f=>{const g=c(f)?d:e;ze(a,g,f)},a);return{ib:d,fb:e}}function Vf(a,b,c,d=e=>e){nd(c,e=>{ze(a,b,d(e))},a)};async function Wf(a,b){if(b)return a=await Kf({activityTitle:b.activityTitle,ua:"co-watching",kb:()=>b.onCoWatchingStateQuery(),Da:c=>{b.onCoWatchingStateChanged(c)}},a,{Na:Cf,Ma:Ef,Ka:Hf,Ca:Af,za:Rf}),new Qf(a)}async function Xf(a,b){if(b)return a=await Kf({activityTitle:b.activityTitle,ua:"co-doing",Da:c=>{b.onCoDoingStateChanged(c)}},a,{Na:xf,Ma:zf,Ka:If,Ca:wf,za:Pf}),new Of(a)}
70
- async function Yf(a){const b=new Be,c=b.signal();a=await a;Vf(b,c,a.signal,f=>f.content);const {ib:d,fb:e}=Tf(b,c);return{Qa:new Sf(a.channel,d),Ra:new Sf(a.channel,e)}}function Uf(a){a:switch(a.S()){case 1:a=J(a,Ne,1,Pe);break a;default:throw Error("CA Message arrived with no known content message set");}return a.U()};async function Zf(a,b){({Qa:a}=await Yf(We(a.i)));b=await Xf(a,b);if(!b)throw Error("Failed to create co-doing session");return b}async function $f(a,b){({Ra:a}=await Yf(We(a.i)));b=await Wf(a,b);if(!b)throw Error("Failed to create co-watching session");return b};var ag=class extends ud{async notifySidePanel(a){await Ze(this.context.i,1,a)}async unloadSidePanel(){await Xe(this.context.i)}async loadSidePanel(){await Ye(this.context.i)}};var bg=class extends ud{async setAddonStartingState(a){if(a===null)throw new L(Ac("addonStartingState"));if(typeof a!=="object")throw new L(M("addonStartingState",typeof a,"object | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new L(M("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!=="string")throw new L(M("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.sidePanelUrl+
71
- +!!a.additionalData)throw new L(zc);if(Object.keys(a).length===0)throw new L(yc);const b=[];b.push(Uc(Tc(Sc(1),a.sidePanelUrl),a.additionalData));await $e(this.context.i,(new Hd).setAddonStartingState((new Gd).X(b)))}};var cg=class extends ud{async notifyMainStage(a){await Ze(this.context.i,2,a)}};var dg=class{constructor(a){a=a.cloudProjectNumber;const b=wd();if(b.cloudProjectNumber!==a)throw new L(sc);const c=b.Ia,d=b.Sa;let e;af=(e=af)!=null?e:Se(d,c,a);this.K=new bf(b)}async createMainStageClient(){var a=this.K;if(a.P.frameType!==2)throw new L(oc);return await Promise.resolve(new ag(a))}async createSidePanelClient(){var a=this.K;if(a.P.frameType!==1)throw new L(pc);return await Promise.resolve(new cg(a))}async createCoWatchingClient(a){return await $f(this.K,a)}async createCoDoingClient(a){return await Zf(this.K,
72
- a)}async createRoomsStandaloneClient(){var a=this.K;if(a.P.frameType!==2)throw new L(oc);return await Promise.resolve(new bg(a))}};let eg=null;var fg={addon:{getFrameType:function(){a:{var a=wd().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(Ac("config"));if(typeof a!=="object")throw new L(M("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new L(M("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(eg&&wd().Ia!=="integration.test.google.com")throw new L(Ic);
73
- return eg=new dg(a)}}},gg=["meet"],Y=k;gg[0]in Y||typeof Y.execScript=="undefined"||Y.execScript("var "+gg[0]);for(var Z;gg.length&&(Z=gg.shift());)gg.length||fg===void 0?Y=Y[Z]&&Y[Z]!==Object.prototype[Z]?Y[Z]:Y[Z]={}:Y[Z]=fg;}).call(this);
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);
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-668624766",
4
+ "version": "0.9.1-669470925",
5
5
  "repository": "googleworkspace/meet",
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "homepage": "https://developers.google.com/meet/add-ons/guides/overview",