@googleworkspace/meet-addons 1.2.0-dev-1012501748 → 1.2.0-dev-1014190519

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.
Files changed (2) hide show
  1. package/meet.addons.mjs +47 -47
  2. package/package.json +1 -1
package/meet.addons.mjs CHANGED
@@ -4,50 +4,50 @@ function da(a,b){if(b)a:{var c=ca;a=a.split(".");for(var d=0;d<a.length-1;d++){v
4
4
  Copyright The Closure Library Authors.
5
5
  SPDX-License-Identifier: Apache-2.0
6
6
  */
7
- var l=this||self;function ea(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}}function fa(a,b){function c(){}c.prototype=b.prototype;a.ba=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Z=function(d,e,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[e].apply(d,g)}};function m(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,m);else{let c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}fa(m,Error);m.prototype.name="CustomError";function n(a){l.setTimeout(()=>{throw a;},0)};function ha(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};function ia(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let ja=void 0;var ka,la;a:{for(var ma=["CLOSURE_FLAGS"],na=l,oa=0;oa<ma.length;oa++)if(na=na[ma[oa]],na==null){la=null;break a}la=na}var pa=la&&la[748402147];ka=pa!=null?pa:!0;function qa(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var ra=qa(),sa=qa(),ta=qa("m_m",!0);const t=qa("jas",!0);var ua;const va=[];va[t]=7;ua=Object.freeze(va);var wa={};function u(a,b){return b===void 0?a.h!==v&&!!(2&(a.l[t]|0)):!!(2&b)&&a.h!==v}const v={};Object.freeze({});var xa=typeof l.BigInt==="function"&&typeof l.BigInt(0)==="bigint";const ya=Number.MIN_SAFE_INTEGER.toString(),za=xa?BigInt(Number.MIN_SAFE_INTEGER):void 0,Aa=Number.MAX_SAFE_INTEGER.toString(),Ba=xa?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Ca(a,b){if(a.length>b.length)return!1;if(a.length<b.length||a===b)return!0;for(let c=0;c<a.length;c++){let d=a[c],e=b[c];if(d>e)return!1;if(d<e)return!0}};const Da=Number.isFinite;function Ea(a){if(a!=null){if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;Da(a)}}function w(a){if(a!=null&&typeof a!=="string")throw Error();return a}function Fa(a,b,c){if(a!=null&&a[ta]===wa)return a;if(Array.isArray(a)){var d=a[t]|0;c=d|c&32|c&2;c!==d&&(a[t]=c);return new b(a)}};function Ga(a){return a};function Ha(a,b,c,d){var e=d!==void 0;d=!!d;var f=[],g=a.length,h=4294967295,k=!1,q=!!(b&64),r=q?b&128?0:-1:void 0;if(!(b&1)){var p=g&&a[g-1];p!=null&&typeof p==="object"&&p.constructor===Object?(g--,h=g):p=void 0;if(q&&!(b&128)&&!e){k=!0;var y;h=((y=Ia)!=null?y:Ga)(h-r,r,a,p,void 0)+r}}b=void 0;for(e=0;e<g;e++)if(y=a[e],y!=null&&(y=c(y,d))!=null)if(q&&e>=h){let B=e-r,C;((C=b)!=null?C:b={})[B]=y}else f[e]=y;if(p)for(let B in p){a=p[B];if(a==null||(a=c(a,d))==null)continue;g=+B;let C;if(q&&!Number.isNaN(g)&&
8
- (C=g+r)<h)f[C]=a;else{let P;((P=b)!=null?P:b={})[B]=a}}b&&(k?f.push(b):f[h]=b);return f}function Ja(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return(xa?a>=za&&a<=Ba:a[0]==="-"?Ca(a,ya):Ca(a,Aa))?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Array.isArray(a)){let b=a[t]|0;return a.length===0&&b&1?void 0:Ha(a,b,Ja)}if(a!=null&&a[ta]===wa)return Ka(a);return}return a}let Ia;function Ka(a){a=a.l;return Ha(a,a[t]|0,Ja)};function La(a,b,c,d=0){if(a==null){var e=32;c?(a=[c],e|=128):a=[];b&&(e=e&-16760833|(b&1023)<<14)}else{if(!Array.isArray(a))throw Error("narr");e=a[t]|0;if(ka&&1&e)throw Error("rfarr");2048&e&&!(2&e)&&Ma();if(e&256)throw Error("farr");if(e&64)return(e|d)!==e&&(a[t]=e|d),a;if(c&&(e|=128,c!==a[0]))throw Error("mid");a:{c=a;e|=64;var f=c.length;if(f){var g=f-1;let k=c[g];if(k!=null&&typeof k==="object"&&k.constructor===Object){b=e&128?0:-1;g-=b;if(g>=1024)throw Error("pvtlmt");for(var h in k)if(f=+h,
9
- f<g)c[f+b]=k[h],delete k[h];else break;e=e&-16760833|(g&1023)<<14;break a}}if(b){h=Math.max(b,f-(e&128?0:-1));if(h>1024)throw Error("spvt");e=e&-16760833|(h&1023)<<14}}}a[t]=e|64|d;return a}function Ma(){if(ka)throw Error("carr");if(sa!=null){var a;var b=(a=ja)!=null?a:ja={};a=b[sa]||0;a>=5||(b[sa]=a+1,b=Error(),ia(b,"incident"),n(b))}};function Na(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){var c=a[t]|0;a.length===0&&c&1?a=void 0:c&2||(!b||4096&c||16&c?a=x(a,c,!1,b&&!(c&16)):(a[t]|=34,c&4&&Object.freeze(a)));return a}if(a!=null&&a[ta]===wa)return b=a.l,c=b[t]|0,u(a,c)?a:Oa(a,b,c)?Pa(a,b):x(b,c)}function Pa(a,b,c){a=new a.constructor(b);c&&(a.h=v);a.i=v;return a}function x(a,b,c,d){d!=null||(d=!!(34&b));a=Ha(a,b,Na,d);d=32;c&&(d|=2);b=b&16769217|d;a[t]=b;return a}
10
- function Qa(a){var b=a.l,c=b[t]|0;return u(a,c)?Oa(a,b,c)?Pa(a,b,!0):new a.constructor(x(b,c,!1)):a}function Ra(a){if(a.h!==v)return!1;var b=a.l;b=x(b,b[t]|0);b[t]|=2048;a.l=b;a.h=void 0;a.i=void 0;return!0}function Sa(a){if(!Ra(a)&&u(a,a.l[t]|0))throw Error();}function z(a,b){b===void 0&&(b=a[t]|0);b&32&&!(b&4096)&&(a[t]=b|4096)}function Oa(a,b,c){return c&2?!0:c&32&&!(c&4096)?(b[t]=c|2,a.h=v,!0):!1};function A(a,b){a=Ta(a.l,b);if(a!==null)return a}function Ta(a,b,c,d){if(b===-1)return null;var e=b+(c?0:-1),f=a.length-1;if(!(f<1+(c?0:-1))){if(e>=f){var g=a[f];if(g!=null&&typeof g==="object"&&g.constructor===Object){c=g[b];var h=!0}else if(e===f)c=g;else return}else c=a[e];if(d&&c!=null){d=d(c);if(d==null)return d;if(!Object.is(d,c))return h?g[b]=d:a[e]=d,d}return c}}function Ua(a,b,c){Sa(a);var d=a.l;D(d,d[t]|0,b,c);return a}
11
- function D(a,b,c,d){var e=c+-1,f=a.length-1;if(f>=0&&e>=f){let g=a[f];if(g!=null&&typeof g==="object"&&g.constructor===Object)return g[c]=d,b}if(e<=f)return a[e]=d,b;if(d!==void 0){let g;f=((g=b)!=null?g:b=a[t]|0)>>14&1023||536870912;c>=f?d!=null&&(a[f+-1]={[c]:d}):a[e]=d}return b}function Va(a){return!!(2&a)&&!!(4&a)||!!(256&a)}function E(a,b,c,d){Sa(a);var e=a.l;D(e,e[t]|0,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}function Wa(a,b){a=a.l;return Xa(Ya(a),a,void 0,b)}
12
- function Ya(a){var b;return(b=a[ra])!=null?b:a[ra]=new Map}function Xa(a,b,c,d){var e=a.get(d);if(e!=null)return e;e=0;for(let f=0;f<d.length;f++){let g=d[f];Ta(b,g)!=null&&(e!==0&&(c=D(b,c,e)),e=g)}a.set(d,e);return e}function Za(a,b,c,d){var e=!1;d=Ta(a,d,void 0,f=>{var g=Fa(f,c,b);e=g!==f&&g!=null;return g});if(d!=null)return e&&!u(d)&&z(a,b),d}
13
- function $a(a,b,c){var d=a.l,e=d[t]|0;b=Za(d,e,b,c);if(b==null)return b;e=d[t]|0;if(!u(a,e)){let f=Qa(b);f!==b&&(Ra(a)&&(d=a.l,e=d[t]|0),b=f,e=D(d,e,c,b),z(d,e))}return b}function ab(a){a==null&&(a=void 0);return a}function bb(a,b,c){c=ab(c);Ua(a,b,c);c&&!u(c)&&z(a.l);return a}
14
- function F(a,b,c,d){d=ab(d);a:{var e=d;Sa(a);let h=a.l;var f=h[t]|0;if(e==null){var g=Ya(h);if(Xa(g,h,f,c)===b)g.set(c,0);else break a}else{g=h;let k=Ya(g),q=Xa(k,g,f,c);q!==b&&(q&&(f=D(g,f,q)),k.set(c,b))}D(h,f,b,e)}d&&!u(d)&&z(a.l);return a}
15
- function cb(a,b){Sa(a);var c=a.l,d=c[t]|0;if(b==null)D(c,d,1);else{var e=b===ua?7:b[t]|0,f=e,g=Va(e),h=g||Object.isFrozen(b),k=!0,q=!0;for(let p=0;p<b.length;p++){var r=b[p];g||(r=u(r),k&&(k=!r),q&&(q=r))}g||(e=k?13:5,e=q?e&-4097:e|4096);h&&e===f||(b=[...b],f=0,e=db(e,d));e!==f&&(b[t]=e);d=D(c,d,1,b);2&e||!(4096&e||16&e)||z(c,d)}return a}function db(a,b){return a=(2&b?a|2:a&-3)&-273}function G(a,b){a=A(a,b);a=a==null||typeof a==="string"?a:void 0;return a!=null?a:""}
16
- function eb(a,b){a=A(a,b);a=a==null?a:Da(a)?a|0:void 0;return a!=null?a:0}function H(a,b,c,d){c=Wa(a,d)===c?c:-1;return $a(a,b,c)}function fb(a,b){if(b!=null){if(!Da(b))throw a=Error("enum"),ia(a,"warning"),a;b|=0}return E(a,1,b,0)};function gb(){var a=hb||(hb=ib("[1,2,0]"));a=Qa(a);a=Ua(a,4,w("dev-1012501748"));var b=a.l,c=b[t]|0;return u(a,c)?a:Oa(a,b,c)?Pa(a,b):new a.constructor(x(b,c,!0))}var I=class{constructor(a){this.l=La(a,void 0,void 0,2048)}toJSON(){return Ka(this)}};I.prototype[ta]=wa;I.prototype.toString=function(){return this.l.toString()};function jb(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[t]|=32;b=new a(b)}return b}};var ib=function(a){return b=>{b=JSON.parse(b);if(!Array.isArray(b)){var c=typeof b;throw Error("Expected jspb data to be an array, got "+(c!="object"?c:b?Array.isArray(b)?"array":c:"null")+": "+b);}b[t]|=34;return new a(b)}}(class extends I{});function kb(a){var b=new lb,c=Promise.resolve();return(...d)=>{var e;Date.now()-((e=b.L[b.index])!=null?e:-1*b.J)>=b.J?(b.L[b.index]=Date.now(),b.index=(b.index+1)%b.X,e=!0):e=!1;return e?a(...d):c}};var lb=class{constructor(){this.X=1;this.J=100;this.L=[];this.index=0}};var mb=class extends I{};var J=class extends Error{constructor({errorType:a,message:b,j:c}){super(`Meet add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},K={errorType:"InternalError",message:"An unexpected error has occurred.",j:"No further information is available."},nb={errorType:"MissingUrlParameter",message:"Missing required Meet SDK URL parameter",j:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not strip URL parameters (e.g. as part of a redirect)."},
17
- ob={errorType:"NeedsMainStageContext",message:"This method can only be invoked if the addon is running in the main stage.",j:"Use getFrameType to check whether the addon is running in the main stage before invoking this method."},pb={errorType:"NeedsSidePanelContext",message:"This method can only be invoked if the addon is running in the side panel.",j:"Use getFrameType to check whether the addon is running in the side panel before invoking this method."},qb={errorType:"NotSupportedInStandalone",
18
- message:"This method is not supported in standalone mode.",j:"Do not call this method in standalone mode."},rb={errorType:"MustBeIframed",message:"The SDK must be run in an iframe as part of a Google Meet add-on.",j:"See https://developers.google.com/meet/add-ons/guides/deploy-add-on to deploy to Meet."},tb={errorType:"InternalError",message:"The frame type URL parameter is set to an unexpected value.",j:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not modify URL parameters (e.g. as part of a redirect)."},
19
- ub={errorType:"InvalidCloudProjectNumber",message:"Cloud Project Number provided by meet does not match the one passed in by the SDK. Ensure that the correct Cloud Project Number is passed to the SDK as a string.",j:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not modify URL parameters (e.g. as part of a redirect) and ensure that the correct Cloud Project Number was passed into the SDK as a string."},vb={errorType:"DestinationNotReady",
20
- message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",j:"Make sure the destination frame has connected before sending messages to it."},wb={errorType:"InvalidActivityStartingState",message:"Origin of the ActivityStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",j:"Ensure that the ActivityStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},xb={errorType:"ActivityStartingStateMissingAttributes",
21
- message:"The supplied ActivityStartingState object does not contain any recognized attributes.",j:"Ensure that the ActivityStartingState object contains at least one of the following attributes: mainStageUrl, sidePanelUrl, additionalData."},yb={errorType:"ActivityStartingStateUnrecognizedAttributes",message:"The supplied ActivityStartingState object contains attributes that are not recognized.",j:"Ensure that the ActivityStartingState object has only the following attributes: mainStageUrl, sidePanelUrl, additionalData."},
22
- zb={errorType:"AddonStartingStateMissingAttributes",message:"The supplied AddonStartingState object does not contain any recognized attributes.",j:"Ensure that the AddonStartingState object contains at least one of the following attributes: sidePanelUrl, additionalData."},Ab={errorType:"AddonStartingStateUnrecognizedAttributes",message:"The supplied AddonStartingState object contains attributes that are not recognized.",j:"Ensure that the AddonStartingState object has only the following attributes: sidePanelUrl, additionalData."},
23
- Bb=a=>({errorType:"ArgumentNullError",message:`The argument supplied for '${a}' was 'null' but a value was expected.`,j:"Ensure you are passing a value of the expected type for the argument."}),L=(a,b,c)=>({errorType:"ArgumentTypeError",message:`The type '${b}' of argument supplied for '${a}' did not match the expected type '${c}'.`,j:"Ensure the type of the argument provided matches the expected type."}),Cb={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",
24
- j:"Ensure that no activity is ongoing."},Db={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",j:"Send one of the available commands in the frame message."},Eb={errorType:"NoActivityFound",message:"No activity found.",j:"Ensure that the activity is started before performing this operation."},Fb={errorType:"RequiresEapEnrollment",message:"This feature is only available to early access partners.",j:"Meet add-on early access enrollment is currently closed."},Gb={errorType:"UserNotInitiator",
25
- message:"Operation cannot be performed because the user is not the initiator of the current activity.",j:"Ensure that the user is the initiator of the current activity or that the activity has ended."},Hb={errorType:"SizeLimitExceededActivityStartingState",message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",j:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Ib={errorType:"SizeLimitExceededFrameToFrameMessage",
26
- message:"The size of the frame to frame message exceeds the limits allowed.",j:"Ensure that the frame to frame message size is less than 1,000,000 characters."},Jb={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",j:"Only instantiate the AddonSession once."},Kb={errorType:"UserCancelled",message:"The user cancelled starting an activity.",j:"The user needs to click continue to start the activity."},Lb={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",
27
- j:"Do not call this method during a Meet call."},Mb={errorType:"InvalidAddonStartingState",message:"Origin of the AddonStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",j:"Ensure that the AddonStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},Nb={errorType:"SizeLimitExceededAddonStartingState",message:"The size of the AddonStartingState URLs and/or its data exceed the limits allowed.",j:"Ensure that the AddonStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},
28
- Ob={errorType:"MeetingPolicyPreventsStartingActivity",message:"A meeting policy (such as using host control settings) prevents the user from starting the activity.",j:"Have a meeting host or administrator modify the necessary settings to allow the current user to start the activity."};
29
- function Pb(a){switch(a){case 0:return K;case 1:return vb;case 2:return wb;case 3:return Cb;case 4:return Db;case 5:return Fb;case 6:return qb;case 7:return Gb;case 8:return Hb;case 9:return Ib;case 10:return Kb;case 11:return Lb;case 12:return Mb;case 13:return Nb;case 14:return Eb;case 15:return Ob;default:return K}}function M({errorType:a,message:b,j:c},d=""){throw new J({errorType:a,message:d?`${b} ${d}`:b,j:c});}function Qb(a,b){M({...nb,message:`${nb.message}: ${a}. In URL ${b}`})};function Rb(a){var b=new Sb;return fb(b,a)}function Tb(a,b){return E(a,2,w(b),"")}function Ub(a,b){return E(a,3,w(b),"")}var Sb=class extends I{getFrameType(){return eb(this,1)}};function Vb(a){var b=a.l,c=b;b=b[t]|0;var d=Sb,e=!(a?u(a,b):2&b);e&&a&&Ra(a)&&(c=a.l,b=c[t]|0);a=Ta(c,1);var f=Array.isArray(a)?a:ua,g=f===ua?7:f[t]|0;a=g;2&b&&(a|=2);var h=a|1;if(a=!(4&h)){var k=f,q=b;let r=!!(2&h);r&&(q|=2);let p=!r,y=!0,B=0,C=0;for(;B<k.length;B++){let P=Fa(k[B],d,q);if(P instanceof d){if(!r){let sb=u(P);p&&(p=!sb);y&&(y=sb)}k[C++]=P}}C<B&&(k.length=C);h|=4;h=y?h&-4097:h|4096;h=p?h|8:h&-9}h!==g&&(f[t]=h,2&h&&Object.freeze(f));if(e&&!(8&h||!f.length&&(2&h||!(16&h)&&32&b))){Va(h)&&
30
- (f=[...f],h=db(h,b),b=D(c,b,1,f));d=f;e=h;for(g=0;g<d.length;g++)k=d[g],h=Qa(k),k!==h&&(d[g]=h);e|=8;h=e=d.length?e|4096:e&-4097;f[t]=h}e=d=h;Va(d)||(2&d||!(16&d)&&32&b?(d|=!f.length||a&&!(4096&d)||32&b&&!(4096&d||16&d)?2:256,d!==e&&(f[t]=d),Object.freeze(f)):(d|=16,d!==e&&(f[t]=d)));2&d||!(4096&d||16&d)||z(c,b);return f}function Wb(a){var b=new Xb;return cb(b,a)}var Xb=class extends I{};var Yb=class extends I{};function Zb(a){return $a(a,Xb,1)}var $b=class extends I{};var ac=class extends I{};var bc=class extends I{};var cc=class extends I{};var dc=class extends I{getMeetPlatformInfo(){return $a(this,bc,1)}};var ec=class extends I{getMeetingInfo(){return $a(this,cc,1)}};var fc=class extends I{},N=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21];var hc=class extends I{};var ic=class extends I{};var jc=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),kc=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function lc(a){a&&typeof a.dispose=="function"&&a.dispose()};function O(){this.u=this.u;this.i=this.i}O.prototype.u=!1;O.prototype.dispose=function(){this.u||(this.u=!0,this.D())};O.prototype[Symbol.dispose]=function(){this.dispose()};function mc(a,b){a.u?b():(a.i||(a.i=[]),a.i.push(b))}O.prototype.D=function(){if(this.i)for(;this.i.length;)this.i.shift()()};function nc({H:a,M:b}){if(a===null)throw new J(Bb("activityStartingState"));if(b||a!==void 0){if(typeof a!=="object")throw new J(L("activityStartingState",typeof a,`object${b?"":" | undefined"}`));if(a.mainStageUrl!==void 0&&typeof a.mainStageUrl!=="string")throw new J(L("mainStageUrl",typeof a.mainStageUrl,"string | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new J(L("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!==
31
- "string")throw new J(L("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new J(yb);if(Object.keys(a).length===0)throw new J(xb);}}function oc(a){var b=[];b.push(Ub(Tb(Rb(2),a.mainStageUrl),a.additionalData));b.push(Ub(Tb(Rb(1),a.sidePanelUrl),a.additionalData));return b}
32
- var xc=class extends O{constructor(a){super();this.h=a;this.m={};pc(this.h.h.O,b=>{switch(Wa(b.content,N)){case 7:let d=this.m.frameToFrameMessage;b=H(b.content,ac,7,N);if(d&&b){var c=eb(b,1);c=jc.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:G(b,2)})}}},this)}async getMeetingInfo(){var a=await qc(this.h.h);var b=a.getMeetingInfo();b=G(b,1);a=a.getMeetingInfo();a=G(a,2);return{meetingId:b,meetingCode:a}}async getFrameOpenReason(){var a,b=(a=this.h.i.V)!=null?a:0,
33
- c;return(c=kc.get(b))!=null?c:"UNKNOWN"}async getActivityStartingState(){var a=Zb(await rc(this.h.h)),b=a==null?void 0:Vb(a).find(c=>c.getFrameType()===2);a=a==null?void 0:Vb(a).find(c=>c.getFrameType()===1);a==null||G(a,3);b==null||G(b,3);return{mainStageUrl:(b==null?void 0:G(b,2))||void 0,sidePanelUrl:(a==null?void 0:G(a,2))||void 0,additionalData:(a==null?void 0:G(a,3))||void 0}}async setActivityStartingState(a){nc({H:a,M:!0});var b=oc(a);a=sc;var c=this.h.h;var d=new hc;b=Wb(b);d=bb(d,1,b);await a(c,
34
- d)}on(a,b){this.m[a]=b}async getMeetPlatformInfo(){var a=(await tc(this.h.h)).getMeetPlatformInfo();a=A(a,1);a=a==null||typeof a==="boolean"?a:typeof a==="number"?!!a:void 0;return{isMeetHardware:a!=null?a:!1}}async closeAddon(){await uc(this.h.h)}async startActivity(a){nc({H:a,M:!1});var b=new ic;a&&(a=oc(a),a=Wb(a),bb(b,1,a));await vc(this.h.h,b)}async endActivity(a){var b=wc,c=this.h.h,d=new Yb;a=fb(d,a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0);await b(c,a)}};var yc=jb(class extends I{getFrameOpenReason(){return eb(this,5)}});function zc(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");if(c)b=yc(atob(c));else{var d;((d=window.top)!=null?d:window)===window?M(rb):Qb("meet_sdk",b);b=void 0}(c=G(b,1))||Qb("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new J(tb);(d=G(b,2))||Qb("meet_control_channel_name",a);var e=G(b,4);e||Qb("addon_cloud_project_number",a);var f;a=(f=b.getFrameOpenReason())!=null?f:0;f=G(b,3)||"https://meet.google.com";return{V:a,frameType:c,
35
- U:d,cloudProjectNumber:e,N:f}};var Ac=class extends I{};var Bc=class extends I{};function Cc(a){var b=new Dc;return bb(b,2,a)}function Ec(a,b){return E(a,3,w(b),"")}var Dc=class extends I{};var Fc=class extends I{};var Gc=class extends I{};var Hc=class extends I{};var Ic=class extends I{};var Jc=class extends I{};var Kc=class extends I{};var Lc=class extends I{setAddonStartingState(a){return bb(this,1,a)}};var Mc=class extends I{};function Nc(a,b){return F(a,2,Q,b)}var R=class extends I{},Q=[1,2,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20];function Oc(a){return H(a,fc,2,Pc)}var Qc=class extends I{},Rc=jb(Qc),Pc=[1,2];class Sc{constructor(a){this.data=a}};var Tc=Promise;function Uc(a){var b=new MessageChannel;Vc(b.port1,a);return b}function Wc(a,b){Vc(a,b);return new Xc(a)}function Yc(a,b,c){c=Uc(c);a.h.postMessage(b,[c.port2].concat([]))}function Zc(a,b){return new Tc(c=>{Yc(a,b,c)})}class Xc{constructor(a){this.h=a}}function Vc(a,b){b&&(a.onmessage=c=>{var d=c.data;Wc(c.ports[0]);b(new Sc(d))})};var $c=typeof AsyncContext!=="undefined"&&typeof AsyncContext.Snapshot==="function"?a=>a&&AsyncContext.Snapshot.wrap(a):a=>a;function ad(a,b){a.o(b);a.i<100&&(a.i++,b.next=a.h,a.h=b)}class bd{constructor(a,b){this.m=a;this.o=b;this.i=0;this.h=null}get(){if(this.i>0){this.i--;var a=this.h;this.h=a.next;a.next=null}else a=this.m();return a}};function cd(){var a=dd,b=null;a.h&&(b=a.h,a.h=a.h.next,a.h||(a.i=null),b.next=null);return b}class ed{constructor(){this.i=this.h=null}add(a,b){var c=fd.get();c.set(a,b);this.i?this.i.next=c:this.h=c;this.i=c}}var fd=new bd(()=>new gd,a=>a.reset());class gd{constructor(){this.next=this.h=this.i=null}set(a,b){this.i=a;this.h=b;this.next=null}reset(){this.next=this.h=this.i=null}};let hd,id=!1,dd=new ed,kd=(a,b)=>{hd||jd();id||(hd(),id=!0);dd.add(a,b)},jd=()=>{var a=Promise.resolve(void 0);hd=()=>{a.then(ld)}};function ld(){for(var a;a=cd();){try{a.i.call(a.h)}catch(b){n(b)}ad(fd,a)}id=!1};function md(){};function S(a){this.h=0;this.P=void 0;this.o=this.i=this.m=null;this.v=this.F=!1;if(a!=md)try{let b=this;a.call(void 0,function(c){T(b,2,c)},function(c){T(b,3,c)})}catch(b){T(this,3,b)}}function nd(){this.next=this.m=this.i=this.v=this.h=null;this.o=!1}nd.prototype.reset=function(){this.m=this.i=this.v=this.h=null;this.o=!1};var od=new bd(function(){return new nd},function(a){a.reset()});function pd(a,b,c){var d=od.get();d.v=a;d.i=b;d.m=c;return d}
36
- function qd(){var a,b,c=new S(function(d,e){a=d;b=e});return new rd(c,a,b)}S.prototype.then=function(a,b,c){return sd(this,$c(typeof a==="function"?a:null),$c(typeof b==="function"?b:null),c)};S.prototype.$goog_Thenable=!0;function td(a,b){b=$c(b);b=pd(b,b);b.o=!0;ud(a,b)}S.prototype.cancel=function(a){if(this.h==0){let b=new U(a);kd(function(){vd(this,b)},this)}};
37
- function vd(a,b){if(a.h==0)if(a.m){var c=a.m;if(c.i){var d=0,e=null,f=null;for(let g=c.i;g&&(g.o||(d++,g.h==a&&(e=g),!(e&&d>1)));g=g.next)e||(f=g);e&&(c.h==0&&d==1?vd(c,b):(f?(d=f,d.next==c.o&&(c.o=d),d.next=d.next.next):wd(c),xd(c,e,3,b)))}a.m=null}else T(a,3,b)}function ud(a,b){a.i||a.h!=2&&a.h!=3||yd(a);a.o?a.o.next=b:a.i=b;a.o=b}
38
- function sd(a,b,c,d){var e=pd(null,null,null);e.h=new S(function(f,g){e.v=b?function(h){try{let k=b.call(d,h);f(k)}catch(k){g(k)}}:f;e.i=c?function(h){try{let k=c.call(d,h);k===void 0&&h instanceof U?g(h):f(k)}catch(k){g(k)}}:g});e.h.m=a;ud(a,e);return e.h}S.prototype.R=function(a){this.h=0;T(this,2,a)};S.prototype.S=function(a){this.h=0;T(this,3,a)};
39
- function T(a,b,c){if(a.h==0){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.h=1;a:{var d=c,e=a.R,f=a.S;if(d instanceof S){ud(d,pd(e||md,f||null,a));var g=!0}else{if(d)try{var h=!!d.$goog_Thenable}catch(k){h=!1}else h=!1;if(h)d.then(e,f,a),g=!0;else{h=typeof d;if(h=="object"&&d!=null||h=="function")try{let k=d.then;if(typeof k==="function"){zd(d,k,e,f,a);g=!0;break a}}catch(k){f.call(a,k);g=!0;break a}g=!1}}}g||(a.P=c,a.h=b,a.m=null,yd(a),b!=3||c instanceof U||Ad(a,c))}}
40
- function zd(a,b,c,d,e){function f(k){h||(h=!0,d.call(e,k))}function g(k){h||(h=!0,c.call(e,k))}var h=!1;try{b.call(a,g,f)}catch(k){f(k)}}function yd(a){a.F||(a.F=!0,kd(a.Y,a))}function wd(a){var b=null;a.i&&(b=a.i,a.i=b.next,b.next=null);a.i||(a.o=null);return b}S.prototype.Y=function(){for(var a;a=wd(this);)xd(this,a,this.h,this.P);this.F=!1};
41
- function xd(a,b,c,d){if(c==3&&b.i&&!b.o)for(;a&&a.v;a=a.m)a.v=!1;if(b.h)b.h.m=null,Bd(b,c,d);else try{b.o?b.v.call(b.m):Bd(b,c,d)}catch(e){Cd.call(null,e)}ad(od,b)}function Bd(a,b,c){b==2?a.v.call(a.m,c):a.i&&a.i.call(a.m,c)}function Ad(a,b){a.v=!0;kd(function(){a.v&&Cd.call(null,b)})}var Cd=n;function U(a){m.call(this,a)}fa(U,m);U.prototype.name="cancel";function rd(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let Dd=1,Ed=new WeakMap;var Gd=class extends O{constructor(){super();this.h=new Set}signal(){var a=new Fd;this.h.add(a);mc(this,ea(lc,a));return a}};function Hd(a,b){new Promise(c=>{V(()=>{a.I&&(a.W=b,a.K=!0);for(let {G:d,slot:e}of a.A.values())try{e(b,{signal:a,G:d})}catch(f){n(f)}for(let d of a.B)d.resolve(b);a.B.clear();c()})})}function pc(a,b,c){var d=Dd++;V(()=>{Id(a,d,b,c)})}
42
- function Id(a,b,c,d){if(!a.u)if(d){if(!d.u){let e=()=>{V(()=>{a.A.delete(b);var f=Ed.get(d);f&&ha(f,e)})};a.A.set(b,{G:b,slot:c,C:e});Jd(d,e)}}else a.A.set(b,{G:b,slot:c,C:()=>a.A.delete(b)})}
43
- var Fd=class extends O{constructor(){super();this.I=!1;this.A=new Map;this.B=new Set;this.K=!1}detach(a){V(()=>{var b=this.A.get(a);b&&b.C()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){var c=qd();V(()=>{if(this.u)c.reject(new U("Signal initially disposed"));else if(b&&b.u)c.reject(new U("Owner initially disposed"));else if(a&&this.I&&this.K)c.resolve(this.W);else if(this.B.add(c),td(c.promise,()=>{this.B.delete(c)}),b){let d=()=>{c.reject(new U("Owner asynchronously disposed"))};
44
- td(c.promise,()=>{var e=Ed.get(b);e&&ha(e,d)});Jd(b,d)}});return c.promise}D(){super.D();V(()=>{for(let {C:a}of this.A.values())a();this.A.clear();for(let a of this.B)a.reject(new U("Signal asynchronously disposed"));this.B.clear()})}};const Kd=[];let Ld=!1;function V(a){Kd.push(a);Md()}async function Md(){if(!Ld)try{Ld=!0;let a=Nd(0);for(;a<Kd.length;)await Promise.resolve(),a=Nd(a)}catch(a){n(a)}finally{Kd.length=0,Ld=!1}}
45
- function Nd(a){for(var b=a+100;a<b&&a<Kd.length;)try{Kd[a++]()}catch(c){n(c)}return a}function Jd(a,b){if(a.u)b();else{var c=Ed.get(a);if(c)c.push(b);else{let d=[b];Ed.set(a,d);mc(a,()=>{for(let e of[...d])e();Ed.delete(a)})}}};function W(a){var b=new Qc;a=F(b,1,Pc,a);return{content:JSON.stringify(Ka(a))}}new Gd;let hb;var Od=({destination:a,origin:b,ca:c,T:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");var f=Uc(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return Wc(f.port1,e)};function Pd(a,b,c){var d=new Gd,e=d.signal();a=Od({destination:window.parent,origin:b,T:a,onMessage:f=>{var g=Rc(f.data.content);Wa(g,Pc)===2&&(f={content:Oc(g),aa:f,messagePort:f.data.messagePort},d.h.has(e),Hd(e,f))}});return new Qd(e,a,c)}async function qc(a){var b=X;var c=new R;var d=new Hc;c=F(c,19,Q,d);a=await b(a,W(c));var e;return(e=Oc(Rc(a.data.content)))==null?void 0:H(e,ec,20,N)}
46
- async function rc(a){var b=X;var c=new R;var d=new Bc;c=F(c,17,Q,d);a=await b(a,W(c));var e;return(e=Oc(Rc(a.data.content)))==null?void 0:H(e,$b,18,N)}async function sc(a,b){var c=X,d=new R;b=F(d,8,Q,b);await c(a,W(b))}async function tc(a){var b=X;var c=new R;var d=new Gc;c=F(c,18,Q,d);a=await b(a,W(c));var e;return(e=Oc(Rc(a.data.content)))==null?void 0:H(e,dc,19,N)}async function uc(a){var b=X;var c=new R;var d=new Ac;c=F(c,11,Q,d);await b(a,W(c))}
47
- async function vc(a,b){var c=X,d=new R;b=F(d,14,Q,b);await c(a,W(b))}async function wc(a,b){var c=X,d=new R;b=F(d,15,Q,b);await c(a,W(b))}async function Rd(a){await a.m()}
48
- async function X(a,b){(a=await Zc(a.h,b))||M(K,`Falsy response received from the message channel. ${JSON.stringify(a)}`);(b=a.data)||M(K,`Data field in the response from the message channel is falsy. ${JSON.stringify(b)}`);(b=b.content)||M(K,`Content field in the response from the message channel is falsy. ${JSON.stringify(b)}`);var c=void 0;try{c=Rc(b)}catch(d){M(K,`The ControlMessage can't be deserialized. ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=Oc(c))||M(K,`MeetToAddonMessage field on ControlMessage is falsy. ${JSON.stringify(b)}`);
49
- b=b==null?void 0:H(b,mb,10,N);if((b==null?void 0:eb(b,1))!==void 0)throw a=eb(b,1),new J(Pb(a));return a}async function Sd(a){var b=X;var c=new R;var d=new Mc;c=F(c,5,Q,d);await b(a,W(c))}async function Td(a){var b=X;var c=new R;var d=new Fc;c=F(c,6,Q,d);await b(a,W(c))}async function Ud(a,b,c){var d=X,e=new R,f=new Ic;b=fb(f,b);c=E(b,2,w(c),"");e=F(e,7,Q,c);await d(a,W(e))}async function Vd(a,b){var c=X,d=new R;b=F(d,16,Q,b);await c(a,W(b))}
50
- class Qd extends O{constructor(a,b,c){super();this.O=a;this.h=b;this.m=kb(async()=>{var d=this.h;var e=new R;var f=new Jc;e=F(e,13,Q,f);await Zc(d,W(e))});a=gb();G(a,4);Ea(A(a,1));Ea(A(a,2));Ea(A(a,3));c=Nc(new R,Ec(Cc(a),c));Yc(this.h,W(c));pc(this.O,async d=>{switch(Wa(d.content,N)){case 16:await Rd(this)}},this)}};let Wd;var Xd=class{constructor(a){var b=Wd;this.i=a;this.h=b}delete(){throw Error("Not implemented.");}};var Yd=class extends xc{async notifySidePanel(a){await Ud(this.h.h,1,a)}async unloadSidePanel(){await Sd(this.h.h)}async loadSidePanel(){await Td(this.h.h)}};var Zd=class extends xc{async setAddonStartingState(a){if(a===null)throw new J(Bb("addonStartingState"));if(typeof a!=="object")throw new J(L("addonStartingState",typeof a,"object | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new J(L("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!=="string")throw new J(L("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.sidePanelUrl+
51
- +!!a.additionalData)throw new J(Ab);if(Object.keys(a).length===0)throw new J(zb);var b=[];b.push(Ub(Tb(Rb(1),a.sidePanelUrl),a.additionalData));a=this.h.h;var c=new Lc,d=c.setAddonStartingState,e=new Kc;b=cb(e,b);await Vd(a,d.call(c,b))}};var $d=class extends xc{async notifyMainStage(a){await Ud(this.h.h,2,a)}};var ae=class{constructor(a){a=a.cloudProjectNumber;var b=zc();if(b.cloudProjectNumber!==a)throw new J(ub);var c=b.N,d=b.U,e;Wd=(e=Wd)!=null?e:Pd(d,c,a);this.h=new Xd(b)}async createMainStageClient(){var a=this.h;if(a.i.frameType!==2)throw new J(ob);return await Promise.resolve(new Yd(a))}async createSidePanelClient(){var a=this.h;if(a.i.frameType!==1)throw new J(pb);return await Promise.resolve(new $d(a))}async createRoomsStandaloneClient(){var a=this.h;if(a.i.frameType!==2)throw new J(ob);return await Promise.resolve(new Zd(a))}};
52
- let be=null;for(var ce={addon:{getFrameType:function(){a:{var a=zc().frameType;switch(a){case 2:a="MAIN_STAGE";break a;case 1:a="SIDE_PANEL";break a;default:throw Error(`Unknown frame type: ${a}`);}}return a},createAddonSession:async function(a){if(a===null)throw new J(Bb("config"));if(typeof a!=="object")throw new J(L("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new J(L("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(be&&zc().N!=="integration.test.google.com")throw new J(Jb);
53
- return be=new ae(a)}}},de=["meet"],Y=l,Z;de.length&&(Z=de.shift());)de.length||ce===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=ce;}).apply(topLevel);export const meet = topLevel.meet;
7
+ var l=this||self;function ea(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}}function fa(a,b){function c(){}c.prototype=b.prototype;a.ba=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Z=function(d,e,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[e].apply(d,g)}};function m(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,m);else{let c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}fa(m,Error);m.prototype.name="CustomError";function n(a){l.setTimeout(()=>{throw a;},0)};function ha(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};function ia(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let ja=void 0;var ka,la;a:{for(var ma=["CLOSURE_FLAGS"],na=l,oa=0;oa<ma.length;oa++)if(na=na[ma[oa]],na==null){la=null;break a}la=na}var pa=la&&la[748402147];ka=pa!=null?pa:!0;function qa(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var ra=qa(),sa=qa(),ta=qa("m_m",!0);const t=qa("jas",!0);var ua;const va=[];va[t]=7;ua=Object.freeze(va);var wa={};function u(a,b){return b===void 0?a.h!==v&&!!(2&(a.l[t]|0)):!!(2&b)&&a.h!==v}const v={};Object.freeze({});var xa=typeof l.BigInt==="function"&&typeof l.BigInt(0)==="bigint";const ya=Number.MIN_SAFE_INTEGER.toString(),za=xa?BigInt(Number.MIN_SAFE_INTEGER):void 0,Aa=Number.MAX_SAFE_INTEGER.toString(),Ba=xa?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Ca(a,b){if(a.length>b.length)return!1;if(a.length<b.length||a===b)return!0;for(let c=0;c<a.length;c++){let d=a[c],e=b[c];if(d>e)return!1;if(d<e)return!0}};const Da=Number.isFinite;function Ea(a){if(a!=null){if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;Da(a)}}function w(a){if(a!=null&&typeof a!=="string")throw Error();return a}function Fa(a,b,c){if(a!=null&&a[ta]===wa)return a;if(Array.isArray(a)){var d=a[t]|0;c=d|c&32|c&2;c!==d&&(a[t]=c);return new b(a)}};function Ga(a){return a};function Ha(a,b,c,d){var e=d!==void 0;d=!!d;var f=[],g=a.length,h=4294967295,k=!1,q=!!(b&64),r=q?b&128?0:-1:void 0;if(!(b&1)){var p=g&&a[g-1];p!=null&&typeof p==="object"&&p.constructor===Object?(g--,h=g):p=void 0;if(q&&!(b&128)&&!e){k=!0;var x;h=((x=Ia)!=null?x:Ga)(h-r,r,a,p,void 0)+r}}b=void 0;for(e=0;e<g;e++)if(x=a[e],x!=null&&(x=c(x,d))!=null)if(q&&e>=h){let A=e-r,C;((C=b)!=null?C:b={})[A]=x}else f[e]=x;if(p)for(let A in p){a=p[A];if(a==null||(a=c(a,d))==null)continue;g=+A;let C;if(q&&!Number.isNaN(g)&&
8
+ (C=g+r)<h)f[C]=a;else{let P;((P=b)!=null?P:b={})[A]=a}}b&&(k?f.push(b):f[h]=b);return f}function Ja(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return(xa?a>=za&&a<=Ba:a[0]==="-"?Ca(a,ya):Ca(a,Aa))?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Array.isArray(a)){let b=a[t]|0;return a.length===0&&b&1?void 0:Ha(a,b,Ja)}if(a!=null&&a[ta]===wa)return Ka(a);return}return a}let Ia;function Ka(a){a=a.l;return Ha(a,a[t]|0,Ja)};function La(a,b,c,d=0){if(a==null){var e=32;c?(a=[c],e|=128):a=[];b&&(e=e&-16760833|(b&1023)<<14)}else{if(!Array.isArray(a))throw Error("narr");e=a[t]|0;if(ka&&1&e)throw Error("rfarr");2048&e&&!(2&e)&&Ma();if(e&256)throw Error("farr");if(e&64)return(e|d)!==e&&(a[t]=e|d),a;if(c&&(e|=128,c!==a[0]))throw Error("mid");a:{c=a;e|=64;var f=c.length;if(f){var g=f-1;let k=c[g];if(k!=null&&typeof k==="object"&&k.constructor===Object){b=e&128?0:-1;g-=b;if(g>=1024)throw Error("pvtlmt");for(var h in k)if(f=+h,
9
+ f<g)c[f+b]=k[h],delete k[h];else break;e=e&-16760833|(g&1023)<<14;break a}}if(b){h=Math.max(b,f-(e&128?0:-1));if(h>1024)throw Error("spvt");e=e&-16760833|(h&1023)<<14}}}a[t]=e|64|d;return a}function Ma(){if(ka)throw Error("carr");if(sa!=null){var a;var b=(a=ja)!=null?a:ja={};a=b[sa]||0;a>=5||(b[sa]=a+1,b=Error(),ia(b,"incident"),n(b))}};function Na(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){var c=a[t]|0;a.length===0&&c&1?a=void 0:c&2||(!b||4096&c||16&c?a=y(a,c,!1,b&&!(c&16)):(a[t]|=34,c&4&&Object.freeze(a)));return a}if(a!=null&&a[ta]===wa)return b=a.l,c=b[t]|0,u(a,c)?a:Oa(a,b,c)?Pa(a,b):y(b,c)}function Pa(a,b,c){a=new a.constructor(b);c&&(a.h=v);a.i=v;return a}function y(a,b,c,d){d!=null||(d=!!(34&b));a=Ha(a,b,Na,d);d=32;c&&(d|=2);b=b&16769217|d;a[t]=b;return a}
10
+ function Qa(a){var b=a.l,c=b[t]|0;return u(a,c)?Oa(a,b,c)?Pa(a,b,!0):new a.constructor(y(b,c,!1)):a}function Ra(a){if(a.h!==v)return!1;var b=a.l;b=y(b,b[t]|0);b[t]|=2048;a.l=b;a.h=void 0;a.i=void 0;return!0}function Sa(a){if(!Ra(a)&&u(a,a.l[t]|0))throw Error();}function z(a,b){b===void 0&&(b=a[t]|0);b&32&&!(b&4096)&&(a[t]=b|4096)}function Oa(a,b,c){return c&2?!0:c&32&&!(c&4096)?(b[t]=c|2,a.h=v,!0):!1};function B(a,b){a=Ta(a.l,b);if(a!==null)return a}function Ua(a,b,c){return Ta(a,b,void 0,c)}function Ta(a,b,c,d){if(b===-1)return null;var e=b+(c?0:-1),f=a.length-1;if(!(f<1+(c?0:-1))){if(e>=f){var g=a[f];if(g!=null&&typeof g==="object"&&g.constructor===Object){c=g[b];var h=!0}else if(e===f)c=g;else return}else c=a[e];if(d&&c!=null){d=d(c);if(d==null)return d;if(!Object.is(d,c))return h?g[b]=d:a[e]=d,d}return c}}function Va(a,b,c){Sa(a);var d=a.l;D(d,d[t]|0,b,c);return a}
11
+ function D(a,b,c,d){var e=c+-1,f=a.length-1;if(f>=0&&e>=f){let g=a[f];if(g!=null&&typeof g==="object"&&g.constructor===Object)return g[c]=d,b}if(e<=f)return a[e]=d,b;if(d!==void 0){let g;f=((g=b)!=null?g:b=a[t]|0)>>14&1023||536870912;c>=f?d!=null&&(a[f+-1]={[c]:d}):a[e]=d}return b}function Wa(a){return!!(2&a)&&!!(4&a)||!!(256&a)}function E(a,b,c,d){Sa(a);var e=a.l;D(e,e[t]|0,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}function Xa(a,b){a=a.l;return Ya(Za(a),a,void 0,b)}
12
+ function Za(a){var b;return(b=a[ra])!=null?b:a[ra]=new Map}function Ya(a,b,c,d){var e=a.get(d);if(e!=null)return e;e=0;for(let f=0;f<d.length;f++){let g=d[f];Ta(b,g)!=null&&(e!==0&&(c=D(b,c,e)),e=g)}a.set(d,e);return e}function $a(a,b,c,d){var e=!1;d=Ua(a,d,f=>{var g=Fa(f,c,b);e=g!==f&&g!=null;return g});if(d!=null)return e&&!u(d)&&z(a,b),d}
13
+ function ab(a,b,c){var d=a.l,e=d[t]|0;b=$a(d,e,b,c);if(b==null)return b;e=d[t]|0;if(!u(a,e)){let f=Qa(b);f!==b&&(Ra(a)&&(d=a.l,e=d[t]|0),b=f,e=D(d,e,c,b),z(d,e))}return b}function bb(a){a==null&&(a=void 0);return a}function cb(a,b,c){c=bb(c);Va(a,b,c);c&&!u(c)&&z(a.l);return a}
14
+ function F(a,b,c,d){d=bb(d);a:{var e=d;Sa(a);let h=a.l;var f=h[t]|0;if(e==null){var g=Za(h);if(Ya(g,h,f,c)===b)g.set(c,0);else break a}else{g=h;let k=Za(g),q=Ya(k,g,f,c);q!==b&&(q&&(f=D(g,f,q)),k.set(c,b))}D(h,f,b,e)}d&&!u(d)&&z(a.l);return a}
15
+ function db(a,b){Sa(a);var c=a.l,d=c[t]|0;if(b==null)D(c,d,1);else{var e=b===ua?7:b[t]|0,f=e,g=Wa(e),h=g||Object.isFrozen(b),k=!0,q=!0;for(let p=0;p<b.length;p++){var r=b[p];g||(r=u(r),k&&(k=!r),q&&(q=r))}g||(e=k?13:5,e=q?e&-4097:e|4096);h&&e===f||(b=[...b],f=0,e=eb(e,d));e!==f&&(b[t]=e);d=D(c,d,1,b);2&e||!(4096&e||16&e)||z(c,d)}return a}function eb(a,b){return a=(2&b?a|2:a&-3)&-273}function G(a,b){a=B(a,b);a=a==null||typeof a==="string"?a:void 0;return a!=null?a:""}
16
+ function fb(a,b){a=B(a,b);a=a==null?a:Da(a)?a|0:void 0;return a!=null?a:0}function H(a,b,c,d){c=Xa(a,d)===c?c:-1;return ab(a,b,c)}function gb(a,b){if(b!=null){if(!Da(b))throw a=Error("enum"),ia(a,"warning"),a;b|=0}return E(a,1,b,0)};function hb(){var a=ib||(ib=jb("[1,2,0]"));a=Qa(a);a=Va(a,4,w("dev-1014190519"));var b=a.l,c=b[t]|0;return u(a,c)?a:Oa(a,b,c)?Pa(a,b):new a.constructor(y(b,c,!0))}var I=class{constructor(a){this.l=La(a,void 0,void 0,2048)}toJSON(){return Ka(this)}};I.prototype[ta]=wa;I.prototype.toString=function(){return this.l.toString()};function kb(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[t]|=32;b=new a(b)}return b}};var jb=function(a){return b=>{b=JSON.parse(b);if(!Array.isArray(b)){var c=typeof b;throw Error("Expected jspb data to be an array, got "+(c!="object"?c:b?Array.isArray(b)?"array":c:"null")+": "+b);}b[t]|=34;return new a(b)}}(class extends I{});function lb(a){var b=new mb,c=Promise.resolve();return(...d)=>{var e;Date.now()-((e=b.L[b.index])!=null?e:-1*b.J)>=b.J?(b.L[b.index]=Date.now(),b.index=(b.index+1)%b.X,e=!0):e=!1;return e?a(...d):c}};var mb=class{constructor(){this.X=1;this.J=100;this.L=[];this.index=0}};var nb=class extends I{};var J=class extends Error{constructor({errorType:a,message:b,j:c}){super(`Meet add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},K={errorType:"InternalError",message:"An unexpected error has occurred.",j:"No further information is available."},ob={errorType:"MissingUrlParameter",message:"Missing required Meet SDK URL parameter",j:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not strip URL parameters (e.g. as part of a redirect)."},
17
+ pb={errorType:"NeedsMainStageContext",message:"This method can only be invoked if the addon is running in the main stage.",j:"Use getFrameType to check whether the addon is running in the main stage before invoking this method."},qb={errorType:"NeedsSidePanelContext",message:"This method can only be invoked if the addon is running in the side panel.",j:"Use getFrameType to check whether the addon is running in the side panel before invoking this method."},rb={errorType:"NotSupportedInStandalone",
18
+ message:"This method is not supported in standalone mode.",j:"Do not call this method in standalone mode."},tb={errorType:"MustBeIframed",message:"The SDK must be run in an iframe as part of a Google Meet add-on.",j:"See https://developers.google.com/meet/add-ons/guides/deploy-add-on to deploy to Meet."},ub={errorType:"InternalError",message:"The frame type URL parameter is set to an unexpected value.",j:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not modify URL parameters (e.g. as part of a redirect)."},
19
+ vb={errorType:"InvalidCloudProjectNumber",message:"Cloud Project Number provided by meet does not match the one passed in by the SDK. Ensure that the correct Cloud Project Number is passed to the SDK as a string.",j:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not modify URL parameters (e.g. as part of a redirect) and ensure that the correct Cloud Project Number was passed into the SDK as a string."},wb={errorType:"DestinationNotReady",
20
+ message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",j:"Make sure the destination frame has connected before sending messages to it."},xb={errorType:"InvalidActivityStartingState",message:"Origin of the ActivityStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",j:"Ensure that the ActivityStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},yb={errorType:"ActivityStartingStateMissingAttributes",
21
+ message:"The supplied ActivityStartingState object does not contain any recognized attributes.",j:"Ensure that the ActivityStartingState object contains at least one of the following attributes: mainStageUrl, sidePanelUrl, additionalData."},zb={errorType:"ActivityStartingStateUnrecognizedAttributes",message:"The supplied ActivityStartingState object contains attributes that are not recognized.",j:"Ensure that the ActivityStartingState object has only the following attributes: mainStageUrl, sidePanelUrl, additionalData."},
22
+ Ab={errorType:"AddonStartingStateMissingAttributes",message:"The supplied AddonStartingState object does not contain any recognized attributes.",j:"Ensure that the AddonStartingState object contains at least one of the following attributes: sidePanelUrl, additionalData."},Bb={errorType:"AddonStartingStateUnrecognizedAttributes",message:"The supplied AddonStartingState object contains attributes that are not recognized.",j:"Ensure that the AddonStartingState object has only the following attributes: sidePanelUrl, additionalData."},
23
+ Cb=a=>({errorType:"ArgumentNullError",message:`The argument supplied for '${a}' was 'null' but a value was expected.`,j:"Ensure you are passing a value of the expected type for the argument."}),L=(a,b,c)=>({errorType:"ArgumentTypeError",message:`The type '${b}' of argument supplied for '${a}' did not match the expected type '${c}'.`,j:"Ensure the type of the argument provided matches the expected type."}),Db={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",
24
+ j:"Ensure that no activity is ongoing."},Eb={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",j:"Send one of the available commands in the frame message."},Fb={errorType:"NoActivityFound",message:"No activity found.",j:"Ensure that the activity is started before performing this operation."},Gb={errorType:"RequiresEapEnrollment",message:"This feature is only available to early access partners.",j:"Meet add-on early access enrollment is currently closed."},Hb={errorType:"UserNotInitiator",
25
+ message:"Operation cannot be performed because the user is not the initiator of the current activity.",j:"Ensure that the user is the initiator of the current activity or that the activity has ended."},Ib={errorType:"SizeLimitExceededActivityStartingState",message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",j:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Jb={errorType:"SizeLimitExceededFrameToFrameMessage",
26
+ message:"The size of the frame to frame message exceeds the limits allowed.",j:"Ensure that the frame to frame message size is less than 1,000,000 characters."},Kb={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",j:"Only instantiate the AddonSession once."},Lb={errorType:"UserCancelled",message:"The user cancelled starting an activity.",j:"The user needs to click continue to start the activity."},Mb={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",
27
+ j:"Do not call this method during a Meet call."},Nb={errorType:"InvalidAddonStartingState",message:"Origin of the AddonStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",j:"Ensure that the AddonStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},Ob={errorType:"SizeLimitExceededAddonStartingState",message:"The size of the AddonStartingState URLs and/or its data exceed the limits allowed.",j:"Ensure that the AddonStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},
28
+ Pb={errorType:"MeetingPolicyPreventsStartingActivity",message:"A meeting policy (such as using host control settings) prevents the user from starting the activity.",j:"Have a meeting host or administrator modify the necessary settings to allow the current user to start the activity."};
29
+ function Qb(a){switch(a){case 0:return K;case 1:return wb;case 2:return xb;case 3:return Db;case 4:return Eb;case 5:return Gb;case 6:return rb;case 7:return Hb;case 8:return Ib;case 9:return Jb;case 10:return Lb;case 11:return Mb;case 12:return Nb;case 13:return Ob;case 14:return Fb;case 15:return Pb;default:return K}}function M({errorType:a,message:b,j:c},d=""){throw new J({errorType:a,message:d?`${b} ${d}`:b,j:c});}function Rb(a,b){M({...ob,message:`${ob.message}: ${a}. In URL ${b}`})};function Sb(a){var b=new Tb;return gb(b,a)}function Ub(a,b){return E(a,2,w(b),"")}function Vb(a,b){return E(a,3,w(b),"")}var Tb=class extends I{getFrameType(){return fb(this,1)}};function Wb(a){var b=a.l,c=b;b=b[t]|0;var d=Tb,e=!(a?u(a,b):2&b);e&&a&&Ra(a)&&(c=a.l,b=c[t]|0);a=Ta(c,1);var f=Array.isArray(a)?a:ua,g=f===ua?7:f[t]|0;a=g;2&b&&(a|=2);var h=a|1;if(a=!(4&h)){var k=f,q=b;let r=!!(2&h);r&&(q|=2);let p=!r,x=!0,A=0,C=0;for(;A<k.length;A++){let P=Fa(k[A],d,q);if(P instanceof d){if(!r){let sb=u(P);p&&(p=!sb);x&&(x=sb)}k[C++]=P}}C<A&&(k.length=C);h|=4;h=x?h&-4097:h|4096;h=p?h|8:h&-9}h!==g&&(f[t]=h,2&h&&Object.freeze(f));if(e&&!(8&h||!f.length&&(2&h||!(16&h)&&32&b))){Wa(h)&&
30
+ (f=[...f],h=eb(h,b),b=D(c,b,1,f));d=f;e=h;for(g=0;g<d.length;g++)k=d[g],h=Qa(k),k!==h&&(d[g]=h);e|=8;h=e=d.length?e|4096:e&-4097;f[t]=h}e=d=h;Wa(d)||(2&d||!(16&d)&&32&b?(d|=!f.length||a&&!(4096&d)||32&b&&!(4096&d||16&d)?2:256,d!==e&&(f[t]=d),Object.freeze(f)):(d|=16,d!==e&&(f[t]=d)));2&d||!(4096&d||16&d)||z(c,b);return f}function Xb(a){var b=new Yb;return db(b,a)}var Yb=class extends I{};var Zb=class extends I{};function $b(a){return ab(a,Yb,1)}var ac=class extends I{};var bc=class extends I{};var cc=class extends I{};var dc=class extends I{};var ec=class extends I{getMeetPlatformInfo(){return ab(this,cc,1)}};var fc=class extends I{getMeetingInfo(){return ab(this,dc,1)}};var hc=class extends I{},N=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21];var ic=class extends I{};var jc=class extends I{};var kc=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),lc=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function mc(a){a&&typeof a.dispose=="function"&&a.dispose()};function O(){this.u=this.u;this.i=this.i}O.prototype.u=!1;O.prototype.dispose=function(){this.u||(this.u=!0,this.D())};O.prototype[Symbol.dispose]=function(){this.dispose()};function nc(a,b){a.u?b():(a.i||(a.i=[]),a.i.push(b))}O.prototype.D=function(){if(this.i)for(;this.i.length;)this.i.shift()()};function oc({H:a,M:b}){if(a===null)throw new J(Cb("activityStartingState"));if(b||a!==void 0){if(typeof a!=="object")throw new J(L("activityStartingState",typeof a,`object${b?"":" | undefined"}`));if(a.mainStageUrl!==void 0&&typeof a.mainStageUrl!=="string")throw new J(L("mainStageUrl",typeof a.mainStageUrl,"string | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new J(L("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!==
31
+ "string")throw new J(L("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new J(zb);if(Object.keys(a).length===0)throw new J(yb);}}function pc(a){var b=[];b.push(Vb(Ub(Sb(2),a.mainStageUrl),a.additionalData));b.push(Vb(Ub(Sb(1),a.sidePanelUrl),a.additionalData));return b}
32
+ var yc=class extends O{constructor(a){super();this.h=a;this.m={};qc(this.h.h.O,b=>{switch(Xa(b.content,N)){case 7:let d=this.m.frameToFrameMessage;b=H(b.content,bc,7,N);if(d&&b){var c=fb(b,1);c=kc.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:G(b,2)})}}},this)}async getMeetingInfo(){var a=await rc(this.h.h);var b=a.getMeetingInfo();b=G(b,1);a=a.getMeetingInfo();return{meetingId:b,meetingCode:G(a,2)}}async getFrameOpenReason(){var a,b=(a=this.h.i.V)!=null?a:0,c;return(c=
33
+ lc.get(b))!=null?c:"UNKNOWN"}async getActivityStartingState(){var a=$b(await sc(this.h.h)),b=a==null?void 0:Wb(a).find(c=>c.getFrameType()===2);a=a==null?void 0:Wb(a).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){oc({H:a,M:!0});var b=pc(a);a=tc;var c=this.h.h;var d=new ic;b=Xb(b);d=cb(d,1,b);await a(c,d)}on(a,b){this.m[a]=b}async getMeetPlatformInfo(){var a=
34
+ (await uc(this.h.h)).getMeetPlatformInfo();a=B(a,1);a=a==null||typeof a==="boolean"?a:typeof a==="number"?!!a:void 0;return{isMeetHardware:a!=null?a:!1}}async closeAddon(){await vc(this.h.h)}async startActivity(a){oc({H:a,M:!1});var b=new jc;a&&(a=pc(a),a=Xb(a),cb(b,1,a));await wc(this.h.h,b)}async endActivity(a){var b=xc,c=this.h.h,d=new Zb;a=gb(d,a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0);await b(c,a)}};var zc=kb(class extends I{getFrameOpenReason(){return fb(this,5)}});function Ac(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");if(c)b=zc(atob(c));else{var d;((d=window.top)!=null?d:window)===window?M(tb):Rb("meet_sdk",b);b=void 0}(c=G(b,1))||Rb("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new J(ub);(d=G(b,2))||Rb("meet_control_channel_name",a);var e=G(b,4);e||Rb("addon_cloud_project_number",a);var f;return{V:(f=b.getFrameOpenReason())!=null?f:0,frameType:c,U:d,cloudProjectNumber:e,N:G(b,3)||
35
+ "https://meet.google.com"}};var Bc=class extends I{};var Cc=class extends I{};function Dc(a){var b=new Ec;return cb(b,2,a)}function Fc(a,b){return E(a,3,w(b),"")}var Ec=class extends I{};var Gc=class extends I{};var Hc=class extends I{};var Ic=class extends I{};var Jc=class extends I{};var Kc=class extends I{};var Lc=class extends I{};var Mc=class extends I{setAddonStartingState(a){return cb(this,1,a)}};var Nc=class extends I{};function Oc(a,b){return F(a,2,Q,b)}var R=class extends I{},Q=[1,2,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20];function Pc(a){return H(a,hc,2,Qc)}var Rc=class extends I{},Sc=kb(Rc),Qc=[1,2];class Tc{constructor(a){this.data=a}};var Uc=Promise;function Vc(a){var b=new MessageChannel;Wc(b.port1,a);return b}function Xc(a,b){Wc(a,b);return new Yc(a)}function Zc(a,b,c){c=Vc(c);a.h.postMessage(b,[c.port2].concat([]))}function $c(a,b){return new Uc(c=>{Zc(a,b,c)})}class Yc{constructor(a){this.h=a}}function Wc(a,b){b&&(a.onmessage=c=>{var d=c.data;Xc(c.ports[0]);b(new Tc(d))})};var ad=typeof AsyncContext!=="undefined"&&typeof AsyncContext.Snapshot==="function"?a=>a&&AsyncContext.Snapshot.wrap(a):a=>a;function bd(a,b){a.o(b);a.i<100&&(a.i++,b.next=a.h,a.h=b)}class cd{constructor(a,b){this.m=a;this.o=b;this.i=0;this.h=null}get(){if(this.i>0){this.i--;var a=this.h;this.h=a.next;a.next=null}else a=this.m();return a}};function dd(){var a=ed,b=null;a.h&&(b=a.h,a.h=a.h.next,a.h||(a.i=null),b.next=null);return b}class fd{constructor(){this.i=this.h=null}add(a,b){var c=gd.get();c.set(a,b);this.i?this.i.next=c:this.h=c;this.i=c}}var gd=new cd(()=>new hd,a=>a.reset());class hd{constructor(){this.next=this.h=this.i=null}set(a,b){this.i=a;this.h=b;this.next=null}reset(){this.next=this.h=this.i=null}};let id,jd=!1,ed=new fd,ld=(a,b)=>{id||kd();jd||(id(),jd=!0);ed.add(a,b)},kd=()=>{var a=Promise.resolve(void 0);id=()=>{a.then(md)}};function md(){for(var a;a=dd();){try{a.i.call(a.h)}catch(b){n(b)}bd(gd,a)}jd=!1};function nd(){};function S(a){this.h=0;this.P=void 0;this.o=this.i=this.m=null;this.v=this.F=!1;if(a!=nd)try{let b=this;a.call(void 0,function(c){T(b,2,c)},function(c){T(b,3,c)})}catch(b){T(this,3,b)}}function od(){this.next=this.m=this.i=this.v=this.h=null;this.o=!1}od.prototype.reset=function(){this.m=this.i=this.v=this.h=null;this.o=!1};var pd=new cd(function(){return new od},function(a){a.reset()});function qd(a,b,c){var d=pd.get();d.v=a;d.i=b;d.m=c;return d}
36
+ function rd(){var a,b,c=new S(function(d,e){a=d;b=e});return new sd(c,a,b)}S.prototype.then=function(a,b,c){return td(this,ad(typeof a==="function"?a:null),ad(typeof b==="function"?b:null),c)};S.prototype.$goog_Thenable=!0;function ud(a,b){b=ad(b);b=qd(b,b);b.o=!0;vd(a,b)}S.prototype.cancel=function(a){if(this.h==0){let b=new U(a);ld(function(){wd(this,b)},this)}};
37
+ function wd(a,b){if(a.h==0)if(a.m){var c=a.m;if(c.i){var d=0,e=null,f=null;for(let g=c.i;g&&(g.o||(d++,g.h==a&&(e=g),!(e&&d>1)));g=g.next)e||(f=g);e&&(c.h==0&&d==1?wd(c,b):(f?(d=f,d.next==c.o&&(c.o=d),d.next=d.next.next):xd(c),yd(c,e,3,b)))}a.m=null}else T(a,3,b)}function vd(a,b){a.i||a.h!=2&&a.h!=3||zd(a);a.o?a.o.next=b:a.i=b;a.o=b}
38
+ function td(a,b,c,d){var e=qd(null,null,null);e.h=new S(function(f,g){e.v=b?function(h){try{let k=b.call(d,h);f(k)}catch(k){g(k)}}:f;e.i=c?function(h){try{let k=c.call(d,h);k===void 0&&h instanceof U?g(h):f(k)}catch(k){g(k)}}:g});e.h.m=a;vd(a,e);return e.h}S.prototype.R=function(a){this.h=0;T(this,2,a)};S.prototype.S=function(a){this.h=0;T(this,3,a)};
39
+ function T(a,b,c){if(a.h==0){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.h=1;a:{var d=c,e=a.R,f=a.S;if(d instanceof S){vd(d,qd(e||nd,f||null,a));var g=!0}else{if(d)try{var h=!!d.$goog_Thenable}catch(k){h=!1}else h=!1;if(h)d.then(e,f,a),g=!0;else{h=typeof d;if(h=="object"&&d!=null||h=="function")try{let k=d.then;if(typeof k==="function"){Ad(d,k,e,f,a);g=!0;break a}}catch(k){f.call(a,k);g=!0;break a}g=!1}}}g||(a.P=c,a.h=b,a.m=null,zd(a),b!=3||c instanceof U||Bd(a,c))}}
40
+ function Ad(a,b,c,d,e){function f(k){h||(h=!0,d.call(e,k))}function g(k){h||(h=!0,c.call(e,k))}var h=!1;try{b.call(a,g,f)}catch(k){f(k)}}function zd(a){a.F||(a.F=!0,ld(a.Y,a))}function xd(a){var b=null;a.i&&(b=a.i,a.i=b.next,b.next=null);a.i||(a.o=null);return b}S.prototype.Y=function(){for(var a;a=xd(this);)yd(this,a,this.h,this.P);this.F=!1};
41
+ function yd(a,b,c,d){if(c==3&&b.i&&!b.o)for(;a&&a.v;a=a.m)a.v=!1;if(b.h)b.h.m=null,Cd(b,c,d);else try{b.o?b.v.call(b.m):Cd(b,c,d)}catch(e){Dd.call(null,e)}bd(pd,b)}function Cd(a,b,c){b==2?a.v.call(a.m,c):a.i&&a.i.call(a.m,c)}function Bd(a,b){a.v=!0;ld(function(){a.v&&Dd.call(null,b)})}var Dd=n;function U(a){m.call(this,a)}fa(U,m);U.prototype.name="cancel";function sd(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let Ed=1,Fd=new WeakMap;var Hd=class extends O{constructor(){super();this.h=new Set}signal(){var a=new Gd;this.h.add(a);nc(this,ea(mc,a));return a}};function Id(a,b){new Promise(c=>{V(()=>{a.I&&(a.W=b,a.K=!0);for(let {G:d,slot:e}of a.A.values())try{e(b,{signal:a,G:d})}catch(f){n(f)}for(let d of a.B)d.resolve(b);a.B.clear();c()})})}function qc(a,b,c){var d=Ed++;V(()=>{Jd(a,d,b,c)})}
42
+ function Jd(a,b,c,d){if(!a.u)if(d){if(!d.u){let e=()=>{V(()=>{a.A.delete(b);var f=Fd.get(d);f&&ha(f,e)})};a.A.set(b,{G:b,slot:c,C:e});Kd(d,e)}}else a.A.set(b,{G:b,slot:c,C:()=>a.A.delete(b)})}
43
+ var Gd=class extends O{constructor(){super();this.I=!1;this.A=new Map;this.B=new Set;this.K=!1}detach(a){V(()=>{var b=this.A.get(a);b&&b.C()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){var c=rd();V(()=>{if(this.u)c.reject(new U("Signal initially disposed"));else if(b&&b.u)c.reject(new U("Owner initially disposed"));else if(a&&this.I&&this.K)c.resolve(this.W);else if(this.B.add(c),ud(c.promise,()=>{this.B.delete(c)}),b){let d=()=>{c.reject(new U("Owner asynchronously disposed"))};
44
+ ud(c.promise,()=>{var e=Fd.get(b);e&&ha(e,d)});Kd(b,d)}});return c.promise}D(){super.D();V(()=>{for(let {C:a}of this.A.values())a();this.A.clear();for(let a of this.B)a.reject(new U("Signal asynchronously disposed"));this.B.clear()})}};const Ld=[];let Md=!1;function V(a){Ld.push(a);Nd()}async function Nd(){if(!Md)try{Md=!0;let a=Od(0);for(;a<Ld.length;)await Promise.resolve(),a=Od(a)}catch(a){n(a)}finally{Ld.length=0,Md=!1}}
45
+ function Od(a){for(var b=a+100;a<b&&a<Ld.length;)try{Ld[a++]()}catch(c){n(c)}return a}function Kd(a,b){if(a.u)b();else{var c=Fd.get(a);if(c)c.push(b);else{let d=[b];Fd.set(a,d);nc(a,()=>{for(let e of[...d])e();Fd.delete(a)})}}};function W(a){var b=new Rc;a=F(b,1,Qc,a);return{content:JSON.stringify(Ka(a))}}new Hd;let ib;var Pd=({destination:a,origin:b,ca:c,T:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");var f=Vc(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return Xc(f.port1,e)};function Qd(a,b,c){var d=new Hd,e=d.signal();a=Pd({destination:window.parent,origin:b,T:a,onMessage:f=>{var g=Sc(f.data.content);Xa(g,Qc)===2&&(f={content:Pc(g),aa:f,messagePort:f.data.messagePort},d.h.has(e),Id(e,f))}});return new Rd(e,a,c)}async function rc(a){var b=X;var c=new R;var d=new Ic;c=F(c,19,Q,d);a=await b(a,W(c));var e;return(e=Pc(Sc(a.data.content)))==null?void 0:H(e,fc,20,N)}
46
+ async function sc(a){var b=X;var c=new R;var d=new Cc;c=F(c,17,Q,d);a=await b(a,W(c));var e;return(e=Pc(Sc(a.data.content)))==null?void 0:H(e,ac,18,N)}async function tc(a,b){var c=X,d=new R;b=F(d,8,Q,b);await c(a,W(b))}async function uc(a){var b=X;var c=new R;var d=new Hc;c=F(c,18,Q,d);a=await b(a,W(c));var e;return(e=Pc(Sc(a.data.content)))==null?void 0:H(e,ec,19,N)}async function vc(a){var b=X;var c=new R;var d=new Bc;c=F(c,11,Q,d);await b(a,W(c))}
47
+ async function wc(a,b){var c=X,d=new R;b=F(d,14,Q,b);await c(a,W(b))}async function xc(a,b){var c=X,d=new R;b=F(d,15,Q,b);await c(a,W(b))}async function Sd(a){await a.m()}
48
+ async function X(a,b){(a=await $c(a.h,b))||M(K,`Falsy response received from the message channel. ${JSON.stringify(a)}`);(b=a.data)||M(K,`Data field in the response from the message channel is falsy. ${JSON.stringify(b)}`);(b=b.content)||M(K,`Content field in the response from the message channel is falsy. ${JSON.stringify(b)}`);var c=void 0;try{c=Sc(b)}catch(d){M(K,`The ControlMessage can't be deserialized. ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=Pc(c))||M(K,`MeetToAddonMessage field on ControlMessage is falsy. ${JSON.stringify(b)}`);
49
+ b=b==null?void 0:H(b,nb,10,N);if((b==null?void 0:fb(b,1))!==void 0)throw a=fb(b,1),new J(Qb(a));return a}async function Td(a){var b=X;var c=new R;var d=new Nc;c=F(c,5,Q,d);await b(a,W(c))}async function Ud(a){var b=X;var c=new R;var d=new Gc;c=F(c,6,Q,d);await b(a,W(c))}async function Vd(a,b,c){var d=X,e=new R,f=new Jc;b=gb(f,b);c=E(b,2,w(c),"");e=F(e,7,Q,c);await d(a,W(e))}async function Wd(a,b){var c=X,d=new R;b=F(d,16,Q,b);await c(a,W(b))}
50
+ class Rd extends O{constructor(a,b,c){super();this.O=a;this.h=b;this.m=lb(async()=>{var d=this.h;var e=new R;var f=new Kc;e=F(e,13,Q,f);await $c(d,W(e))});a=hb();Ea(B(a,1));Ea(B(a,2));Ea(B(a,3));c=Oc(new R,Fc(Dc(a),c));Zc(this.h,W(c));qc(this.O,async d=>{switch(Xa(d.content,N)){case 16:await Sd(this)}},this)}};let Xd;var Yd=class{constructor(a){var b=Xd;this.i=a;this.h=b}delete(){throw Error("Not implemented.");}};var Zd=class extends yc{async notifySidePanel(a){await Vd(this.h.h,1,a)}async unloadSidePanel(){await Td(this.h.h)}async loadSidePanel(){await Ud(this.h.h)}};var $d=class extends yc{async setAddonStartingState(a){if(a===null)throw new J(Cb("addonStartingState"));if(typeof a!=="object")throw new J(L("addonStartingState",typeof a,"object | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new J(L("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!=="string")throw new J(L("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.sidePanelUrl+
51
+ +!!a.additionalData)throw new J(Bb);if(Object.keys(a).length===0)throw new J(Ab);var b=[];b.push(Vb(Ub(Sb(1),a.sidePanelUrl),a.additionalData));a=this.h.h;var c=new Mc,d=c.setAddonStartingState,e=new Lc;b=db(e,b);await Wd(a,d.call(c,b))}};var ae=class extends yc{async notifyMainStage(a){await Vd(this.h.h,2,a)}};var be=class{constructor(a){a=a.cloudProjectNumber;var b=Ac();if(b.cloudProjectNumber!==a)throw new J(vb);var c=b.N,d=b.U,e;Xd=(e=Xd)!=null?e:Qd(d,c,a);this.h=new Yd(b)}async createMainStageClient(){var a=this.h;if(a.i.frameType!==2)throw new J(pb);return await Promise.resolve(new Zd(a))}async createSidePanelClient(){var a=this.h;if(a.i.frameType!==1)throw new J(qb);return await Promise.resolve(new ae(a))}async createRoomsStandaloneClient(){var a=this.h;if(a.i.frameType!==2)throw new J(pb);return await Promise.resolve(new $d(a))}};
52
+ let ce=null;for(var de={addon:{getFrameType:function(){a:{var a=Ac().frameType;switch(a){case 2:a="MAIN_STAGE";break a;case 1:a="SIDE_PANEL";break a;default:throw Error(`Unknown frame type: ${a}`);}}return a},createAddonSession:async function(a){if(a===null)throw new J(Cb("config"));if(typeof a!=="object")throw new J(L("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new J(L("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(ce&&Ac().N!=="integration.test.google.com")throw new J(Kb);
53
+ return ce=new be(a)}}},ee=["meet"],Y=l,Z;ee.length&&(Z=ee.shift());)ee.length||de===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=de;}).apply(topLevel);export const meet = topLevel.meet;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@googleworkspace/meet-addons",
3
3
  "description": "The Google Meet add-ons SDK lets you embed your app into Google Meet as an add-on where users can discover, share, and collaborate in the app without leaving Meet",
4
- "version": "1.2.0-dev-1012501748",
4
+ "version": "1.2.0-dev-1014190519",
5
5
  "repository": "googleworkspace/meet",
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "homepage": "https://developers.google.com/meet/add-ons/guides/overview",