@googleworkspace/meet-addons 1.1.1-dev-688299045 → 1.1.1-dev-689137866
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 +1 -0
- package/meet.addons.js +47 -47
- package/package.json +1 -1
package/meet.addons.d.ts
CHANGED
|
@@ -325,6 +325,7 @@ export type ErrorType =
|
|
|
325
325
|
| 'InvalidActivityStartingState'
|
|
326
326
|
| 'InvalidAddonStartingState'
|
|
327
327
|
| 'InvalidCloudProjectNumber'
|
|
328
|
+
| 'MeetingPolicyPreventsStartingActivity'
|
|
328
329
|
| 'MissingUrlParameter'
|
|
329
330
|
| 'NeedsMainStageContext'
|
|
330
331
|
| 'NeedsSidePanelContext'
|
package/meet.addons.js
CHANGED
|
@@ -26,54 +26,54 @@ var oc=function(a,b,c){b=jc(a,b,c,!1);if(b==null)return b;a=a.h;let d=a[r];if(!(
|
|
|
26
26
|
lc(g)&&(f=Fa(f),g=pc(g,d),g=rc(g,d,!1),f[r]=g,d=B(c,d,1,f)),lc(g)||(c=g,g=rc(g,d,!1),g!==c&&(f[r]=g)),h)x=Hb(f),Pb(f,a,!0);else if(b===2){let D;(D=Ib)==null||D.delete(f)}return x||f},tc=function(a,b,c){c==null&&(c=void 0);return ic(a,b,c)},F=function(a,b,c,d){d==null&&(d=void 0);a:{const g=a.h;var e=g[r];Ta(e);if(d==null){var f=nc(g);if(mc(f,g,e,c)===b)f.set(c,0);else break a}else{f=g;const h=nc(f),k=mc(h,f,e,c);k!==b&&(k&&(e=B(f,e,k)),h.set(c,b))}B(g,e,b,d)}return a},uc=function(a,b){const c=a.h;
|
|
27
27
|
let d=c[r];Ta(d);if(b==null)return B(c,d,1),a;var e=b,f;b=((f=Jb)==null?void 0:f.get(e))||e;f=e=b[r]|0;const g=!!(2&e)||!!(2048&e),h=g||Object.isFrozen(b);var k;if(k=!h)(k=void 0===Wa)||(k=(ka||!1)&&void 0!==Va);let p=!0,u=!0;for(let D=0;D<b.length;D++){var x=b[D];g||(x=!!((x.h[r]|0)&2),p&&(p=!x),u&&(u=x))}g||(e|=5,e=p?e|8:e&-9,e=u?e|16:e&-17);k||h&&e!==f?(b=Fa(b),f=0,e=pc(e,d),e=rc(e,d,!0)):h||Pb(b,a);e!==f&&(b[r]=e);B(c,d,1,b);return a};function pc(a,b){a=(2&b?a|2:a&-3)|32;return a&=-2049}
|
|
28
28
|
function rc(a,b,c){32&b&&c||(a&=-33);return a}function G(a,b){return a!=null?a:b}var vc=function(a){a=gc(a,1);a!=null&&(typeof a==="bigint"?gb(a)?a=Number(a):(a=BigInt.asIntN(64,a),a=gb(a)?Number(a):String(a)):a=pb(a)?typeof a==="number"?sb(a):rb(a):void 0);return G(a,0)},H=function(a,b){a=gc(a,b);return G(a==null||typeof a==="string"?a:void 0,"")},I=function(a,b){a=gc(a,b);a=a==null?a:Number.isFinite(a)?a|0:void 0;return G(a,0)},J=function(a,b,c,d){c=C(a,d)===c?c:-1;return oc(a,b,c)};let wc;
|
|
29
|
-
var yc=function(a){try{return wc=!0,JSON.stringify(xc(a),Vb)}finally{wc=!1}},Bc=function(){var a=zc||(zc=Ac("[1,1,1]"));a=dc(a);a=ic(a,4,z("dev-
|
|
29
|
+
var yc=function(a){try{return wc=!0,JSON.stringify(xc(a),Vb)}finally{wc=!1}},Bc=function(){var a=zc||(zc=Ac("[1,1,1]"));a=dc(a);a=ic(a,4,z("dev-689137866"));const b=a.h,c=b[r];return c&2?a:bc(a,b,c,!0)},K=class{constructor(a){a:{a==null&&(a=Tb);Tb=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,Na(c[d]))){b|=256;c=d-(+!!(b&512)-1);if(c>=1024)throw Error("pvtlmt");b=b&-33521665|
|
|
30
30
|
(c&1023)<<15}}a[r]=b}this.h=a}toJSON(){return xc(this)}getExtension(a){const b=a.D?a.Za?a.M(this,a.D,a.F,void 0===Ua?2:4,!0):a.M(this,a.D,a.F,!0):a.Za?a.M(this,a.F,void 0===Ua?2:4,!0):a.M(this,a.F,a.defaultValue,!0);return a.rb&&b==null?a.defaultValue:b}hasExtension(a){a.D?a=jc(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 bc(this,a,a[r],!1)}};K.prototype.qa=Ka;
|
|
31
31
|
K.prototype.toString=function(){try{return wc=!0,xc(this).toString()}finally{wc=!1}};
|
|
32
32
|
function xc(a){Sb(a);a=wc?a.h:Zb(a.h,$b,void 0,void 0,!1);{var b=!wc;let p=a.length;if(p){var c=a[p-1],d=Na(c);d?p--:c=void 0;var e=a;if(d){b:{var f=c;var g;var h=!1;if(f)for(let u in f)if(isNaN(+u)){let x;((x=g)!=null?x:g={})[u]=f[u]}else if(d=f[u],Array.isArray(d)&&(Pa(d)||Ma(d)&&d.size===0)&&(d=null),d==null&&(h=!0),d!=null){let x;((x=g)!=null?x:g={})[u]=d}h||(g=f);if(g)for(let u in g){h=g;break b}h=null}f=h==null?c!=null:h!==c}for(;p>0;p--){g=e[p-1];if(!(g==null||Pa(g)||Ma(g)&&g.size===0))break;
|
|
33
|
-
var k=!0}if(e!==a||f||k){if(!b)e=Array.prototype.slice.call(e,0,p);else if(k||f||h)e.length=p;h&&e.push(h)}k=e}else k=a}return k};function Cc(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[r]|=32;b=Ub(a,b)}return b}};var Ac=function(a){return b=>{b=JSON.parse(b);if(!Array.isArray(b)){var c=typeof b;throw Error("Expected jspb data to be an array, got "+(c!="object"?c:b?Array.isArray(b)?"array":c:"null")+": "+b);}b[r]|=34;return new a(b)}}(class extends K{});var Dc=class extends K{getSeconds(){var a=gc(this,1),b=typeof a;a!=null&&(b==="bigint"?a=t(BigInt.asIntN(64,a)):pb(a)?b==="string"?(b=Math.trunc(Number(a)),Number.isSafeInteger(b)?a=t(b):(b=a.indexOf("."),b!==-1&&(a=a.substring(0,b)),a=Ea()?t(BigInt.asIntN(64,BigInt(a))):t(yb(a)))):Number.isSafeInteger(a)?a=t(sb(a)):(a=Math.trunc(a),Number.isSafeInteger(a)?a=String(a):(b=String(a),xb(b)?a=b:(ib(a),a=mb())),a=t(a)):a=void 0);return G(a,ec)}setSeconds(a){return E(this,1,a==null?a:qb(a),"0")}};var Fc=class extends K{za(){return C(this,
|
|
34
|
-
|
|
35
|
-
message:"This method is not supported in standalone mode.",g:"Do not call this method in standalone mode."},
|
|
36
|
-
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."},
|
|
37
|
-
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."},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
g:"Ensure the type of the argument provided matches the expected type."}),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
g:"Ensure that the AddonStartingState iframeURL origins match the origins of the URLs provided in the Add-on manifest."},
|
|
45
|
-
function
|
|
46
|
-
function
|
|
47
|
-
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
|
|
48
|
-
g:"No further information is available."}}return c;default:return
|
|
49
|
-
typeof a.additionalData!=="string")throw new L(N("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new L(
|
|
50
|
-
this.Da.frameToFrameMessage;b=J(b.content,
|
|
51
|
-
const b=a==null?void 0:a.ja().find(c=>c.getFrameType()===2);a=a==null?void 0:a.ja().find(c=>c.getFrameType()===1);return{mainStageUrl:(b==null?void 0:H(b,2))||void 0,sidePanelUrl:(a==null?void 0:H(a,2))||void 0,additionalData:(a==null?void 0:H(a,3))||void 0}}async setActivityStartingState(a){
|
|
52
|
-
1)),!1)}}async closeAddon(){await
|
|
53
|
-
var
|
|
54
|
-
R.prototype.cancel=function(a){if(this.l==0){var b=new S(a);
|
|
55
|
-
var
|
|
56
|
-
h);k===void 0&&h instanceof S?g(h):f(k)}catch(p){g(p)}}:g});e.v.B=a;
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
{a.j.delete(b);const f=
|
|
62
|
-
this.wa&&this.Ca)c.resolve(this.ab);else if(this.I.add(c),
|
|
63
|
-
async function
|
|
64
|
-
var
|
|
65
|
-
await a.channel.O(b))||
|
|
66
|
-
` ${JSON.stringify(b)}`);b=b==null?void 0:J(b,
|
|
67
|
-
W;var c=new Q;var d=new
|
|
68
|
-
class
|
|
69
|
-
function
|
|
70
|
-
const
|
|
71
|
-
function
|
|
72
|
-
class
|
|
73
|
-
this.s=null;this.pa=0;d&&
|
|
33
|
+
var k=!0}if(e!==a||f||k){if(!b)e=Array.prototype.slice.call(e,0,p);else if(k||f||h)e.length=p;h&&e.push(h)}k=e}else k=a}return k};function Cc(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[r]|=32;b=Ub(a,b)}return b}};var Ac=function(a){return b=>{b=JSON.parse(b);if(!Array.isArray(b)){var c=typeof b;throw Error("Expected jspb data to be an array, got "+(c!="object"?c:b?Array.isArray(b)?"array":c:"null")+": "+b);}b[r]|=34;return new a(b)}}(class extends K{});var Dc=class extends K{getSeconds(){var a=gc(this,1),b=typeof a;a!=null&&(b==="bigint"?a=t(BigInt.asIntN(64,a)):pb(a)?b==="string"?(b=Math.trunc(Number(a)),Number.isSafeInteger(b)?a=t(b):(b=a.indexOf("."),b!==-1&&(a=a.substring(0,b)),a=Ea()?t(BigInt.asIntN(64,BigInt(a))):t(yb(a)))):Number.isSafeInteger(a)?a=t(sb(a)):(a=Math.trunc(a),Number.isSafeInteger(a)?a=String(a):(b=String(a),xb(b)?a=b:(ib(a),a=mb())),a=t(a)):a=void 0);return G(a,ec)}setSeconds(a){return E(this,1,a==null?a:qb(a),"0")}};function Ec(a){var b=new Fc(500);let c=0,d;return(...e)=>{Gc(b)?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;let f;(f=d)==null||f()},Hc(b))))}}function Jc(a){var b=new Fc(100),c=Promise.resolve();return(...d)=>Gc(b)?a(...d):c};var Gc=function(a){return Kc(a,a.index)>=a.ga?(a.Fa[a.index]=Date.now(),a.index=(a.index+1)%a.cb,!0):!1},Hc=function(a){const b=a.ga;a=Kc(a,a.index);return a>=b?0:b-a},Kc=function(a,b){let c;return Date.now()-((c=a.Fa[b])!=null?c:-1*a.ga)},Fc=class{constructor(a){this.cb=1;this.ga=a;this.Fa=[];this.index=0}};var Mc=class extends K{za(){return C(this,Lc)}},Lc=[2,3];var Nc=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}},M={errorType:"InternalError",message:"An unexpected error has occurred.",g:"No further information is available."},Oc={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)."},
|
|
34
|
+
Pc={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."},Qc={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."},Rc={errorType:"NotSupportedInStandalone",
|
|
35
|
+
message:"This method is not supported in standalone mode.",g:"Do not call this method in standalone mode."},Sc={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)."},Tc={errorType:"InvalidCloudProjectNumber",message:"Cloud Project Number provided by meet does not match the one passed in by the SDK. Ensure that the correct Cloud Project Number is passed to the SDK as a string.",
|
|
36
|
+
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."},Uc={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",
|
|
37
|
+
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."},
|
|
38
|
+
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."},
|
|
39
|
+
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."},$c=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."}),N=(a,b,c)=>({errorType:"ArgumentTypeError",message:`The type '${b}' of argument supplied for '${a}' did not match the expected type '${c}'.`,
|
|
40
|
+
g:"Ensure the type of the argument provided matches the expected type."}),ad=a=>({errorType:"InternalError",message:`Could not connect to ${a} channel. Unknown error`,g:"No further information is available."}),bd={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",g:"Ensure that no activity is ongoing."},cd={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",g:"Send one of the available commands in the frame message."},
|
|
41
|
+
dd={errorType:"NoActivityFound",message:"No activity found.",g:"Ensure that the activity is started before performing this operation."},ed={errorType:"RequiresEapEnrollment",message:"This feature is only available to early access partners.",g:"Meet add-on early access enrollment is currently closed."},fd={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."},
|
|
42
|
+
gd={errorType:"SizeLimitExceededActivityStartingState",message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",g:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},hd={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."},
|
|
43
|
+
id={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",g:"Only instantiate the AddonSession once."},jd={errorType:"UserCancelled",message:"The user cancelled starting an activity.",g:"The user needs to click continue to start the activity."},kd={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",g:"Do not call this method during a Meet call."},ld={errorType:"InvalidAddonStartingState",message:"Origin of the AddonStartingState iframeURLs does not match the origin of the URLs provided in the Add-on manifest.",
|
|
44
|
+
g:"Ensure that the AddonStartingState iframeURL origins match the origins of the URLs provided in the Add-on manifest."},md={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."},nd={errorType:"MeetingPolicyPreventsStartingActivity",message:"A meeting policy (such as using host control settings) prevents the user from starting the activity.",
|
|
45
|
+
g:"Have a meeting host or administrator modify the necessary settings to allow the current user to start the activity."};function od(a){switch(a){case 0:return M;case 1:return Uc;case 2:return Vc;case 3:return bd;case 4:return cd;case 5:return ed;case 6:return Rc;case 7:return fd;case 8:return gd;case 9:return hd;case 10:return jd;case 11:return kd;case 12:return ld;case 13:return md;case 14:return dd;case 15:return nd;default:return M}}
|
|
46
|
+
function pd(a){let b;var c=(b=I(a,1))!=null?b:0;a=qd(a.za());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}.`,
|
|
47
|
+
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 ad(a);case 5:a:switch(a){case "co":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",message:`Could not connect to ${a} channel.`,
|
|
48
|
+
g:"No further information is available."}}return c;default:return ad(a)}}function qd(a){switch(a){case 2:return"co";case 3:return"gd";case 0:return"unknown";default:return"unknown"}}function rd({errorType:a,message:b,g:c},d=""){throw new L({errorType:a,message:d?`${b} ${d}`:b,g:c});}function sd(a,b){rd({...Oc,message:`${Oc.message}: ${a}. In URL ${b}`})};var td=function(a){var b=new qc;return E(b,1,y(a),0)},ud=function(a,b){return E(a,2,z(b),"")},vd=function(a,b){return E(a,3,z(b),"")},qc=class extends K{getFrameType(){return I(this,1)}};var wd=class extends K{ja(){return sc(this)}X(a){return uc(this,a)}};var xd=class extends K{constructor(){super()}};var zd=function(a){var b=new yd;return E(b,1,y(a),0)},yd=class extends K{constructor(){super()}};var Ad=class extends K{La(a){return E(this,2,z(a),"")}};var Bd=class extends K{};var Cd=class extends K{};var Ed=class extends K{S(){return C(this,Dd)}ma(){return J(this,wd,2,Dd)}aa(a){return F(this,2,Dd,a)}getMeetingInfo(){return J(this,Cd,3,Dd)}getMeetPlatformInfo(){return J(this,Bd,4,Dd)}},Dd=[2,3,4,5];var Gd=class extends K{na(){return C(this,Fd)}},Fd=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17];var Hd=class extends K{constructor(){super()}ma(){return oc(this,wd,1)}aa(a){return tc(this,1,a)}};var Id=class extends K{constructor(){super()}ma(){return oc(this,wd,1)}aa(a){return tc(this,1,a)}};var Jd=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),Kd=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function Ld(a){a&&typeof a.dispose=="function"&&a.dispose()};var O=function(){this.o=this.o;this.A=this.A};O.prototype.o=!1;O.prototype.dispose=function(){this.o||(this.o=!0,this.fa())};O.prototype[Symbol.dispose]=function(){this.dispose()};var Md=function(a,b){a.o?b():(a.A||(a.A=[]),a.A.push(b))};O.prototype.fa=function(){if(this.A)for(;this.A.length;)this.A.shift()()};var Nd=function({ua:a,Ga:b}){if(a===null)throw new L($c("activityStartingState"));if(b||a!==void 0){if(typeof a!=="object")throw new L(N("activityStartingState",typeof a,`object${b?"":" | undefined"}`));if(a.mainStageUrl!==void 0&&typeof a.mainStageUrl!=="string")throw new L(N("mainStageUrl",typeof a.mainStageUrl,"string | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new L(N("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&
|
|
49
|
+
typeof a.additionalData!=="string")throw new L(N("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new L(Xc);if(Object.keys(a).length===0)throw new L(Wc);}},Od=function(a){const b=[];b.push(vd(ud(td(2),a.mainStageUrl),a.additionalData));b.push(vd(ud(td(1),a.sidePanelUrl),a.additionalData));return b},Vd=class extends O{constructor(a){super();this.context=a;this.Da={};Pd(this.context.i.Ia,b=>{switch(b.content.na()){case 7:const d=
|
|
50
|
+
this.Da.frameToFrameMessage;b=J(b.content,Ad,7,Fd);if(d&&b){var c=I(b,1);c=Jd.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:H(b,2)})}}})}async getMeetingInfo(){const a=await Qd(this.context.i,zd(2));return{meetingId:H(a.getMeetingInfo(),1),meetingCode:H(a.getMeetingInfo(),2)}}async getFrameOpenReason(){let a;const b=(a=this.context.P.Wa)!=null?a:0;let c;return(c=Kd.get(b))!=null?c:"UNKNOWN"}async getActivityStartingState(){var a=(await Qd(this.context.i,zd(1))).ma();
|
|
51
|
+
const b=a==null?void 0:a.ja().find(c=>c.getFrameType()===2);a=a==null?void 0:a.ja().find(c=>c.getFrameType()===1);return{mainStageUrl:(b==null?void 0:H(b,2))||void 0,sidePanelUrl:(a==null?void 0:H(a,2))||void 0,additionalData:(a==null?void 0:H(a,3))||void 0}}async setActivityStartingState(a){Nd({ua:a,Ga:!0});a=Od(a);await Rd(this.context.i,(new Hd).aa((new wd).X(a)))}on(a,b){this.Da[a]=b}async getMeetPlatformInfo(){const a=await Qd(this.context.i,zd(3));return{isMeetHardware:G(nb(gc(a.getMeetPlatformInfo(),
|
|
52
|
+
1)),!1)}}async closeAddon(){await Sd(this.context.i)}async startActivity(a){Nd({ua:a,Ga:!1});const b=new Id;a&&(a=Od(a),b.aa((new wd).X(a)));await Td(this.context.i,b)}async endActivity(a){var b=Ud,c=this.context.i,d=new xd;a=E(d,1,y(a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0),0);await b(c,a)}};var Wd=Cc(class extends K{getFrameOpenReason(){return I(this,5)}});function Xd(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");c?b=Wd(atob(c)):(sd("meet_sdk",b),b=void 0);(c=H(b,1))||sd("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new L(Sc);const d=H(b,2);d||sd("meet_control_channel_name",a);const e=H(b,4);e||sd("addon_cloud_project_number",a);var f;a=(f=b.getFrameOpenReason())!=null?f:0;f=H(b,3)||"https://meet.google.com";return{Wa:a,frameType:c,Sa:d,cloudProjectNumber:e,Ha:f}};var Yd=class extends K{constructor(){super()}};var Zd=class extends K{constructor(){super()}};var be=function(){var a=new $d,b=new Zd;return F(a,1,ae,b)},$d=class extends K{constructor(){super()}za(){return C(this,ae)}},ae=[1,2];var de=function(a){var b=new ce;return tc(b,2,a)},ee=function(a,b){return E(a,3,z(b),"")},ce=class extends K{constructor(){super()}};var fe=class extends K{constructor(){super()}};var ge=class extends K{constructor(){super()}La(a){return E(this,2,z(a),"")}};var he=class extends K{constructor(){super()}};var ie=class extends K{constructor(){super()}ja(){return sc(this)}X(a){return uc(this,a)}};var je=class extends K{constructor(){super()}setAddonStartingState(a){return tc(this,1,a)}};var ke=class extends K{constructor(){super()}};var le=function(a,b){return F(a,2,P,b)},Q=class extends K{constructor(){super()}na(){return C(this,P)}},P=[1,2,5,6,7,8,9,10,11,13,14,15,16];var me=class extends K{},ne=Cc(me),oe=[1,2];class pe{constructor(a,b){this.data=a;this.channel=b}};var qe=Promise;var se=function(a){const b=new MessageChannel;re(b.port1,a);return b},ue=function(a,b){re(a,b);return new te(a)};class te{constructor(a){this.ib=a}send(a,b,c=[]){b=se(b);this.ib.postMessage(a,[b.port2].concat(c))}O(a,b){return new qe(c=>{this.send(a,c,b)})}}const re=function(a,b){b&&(a.onmessage=c=>{var d=c.data;c=ue(c.ports[0]);b(new pe(d,c))})};class ve{constructor(a,b){this.bb=100;this.Ta=a;this.lb=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.lb(a);this.W<this.bb&&(this.W++,a.next=this.V,this.V=a)}};class we{constructor(){this.ca=this.J=null}add(a,b){const c=xe.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 xe=new ve(()=>new ye,a=>a.reset());class ye{constructor(){this.next=this.scope=this.ia=null}set(a,b){this.ia=a;this.scope=b;this.next=null}reset(){this.next=this.scope=this.ia=null}};let ze,Ae=!1,Be=new we,De=(a,b)=>{ze||Ce();Ae||(ze(),Ae=!0);Be.add(a,b)},Ce=()=>{const a=Promise.resolve(void 0);ze=()=>{a.then(Ee)}};function Ee(){let a;for(;a=Be.remove();){try{a.ia.call(a.scope)}catch(b){m(b)}xe.put(a)}Ae=!1};var Fe=function(){};var R=function(a){this.l=0;this.Ja=void 0;this.C=this.u=this.B=null;this.T=this.ha=!1;if(a!=Fe)try{var b=this;a.call(void 0,function(c){Ge(b,2,c)},function(c){Ge(b,3,c)})}catch(c){Ge(this,3,c)}},He=function(){this.next=this.context=this.H=this.N=this.v=null;this.L=!1};He.prototype.reset=function(){this.context=this.H=this.N=this.v=null;this.L=!1};
|
|
53
|
+
var Ie=new ve(function(){return new He},function(a){a.reset()}),Je=function(a,b,c){var d=Ie.get();d.N=a;d.H=b;d.context=c;return d},Le=function(){var a,b,c=new R(function(d,e){a=d;b=e});return new Ke(c,a,b)};R.prototype.then=function(a,b,c){return Me(this,typeof a==="function"?a:null,typeof b==="function"?b:null,c)};R.prototype.$goog_Thenable=!0;var Oe=function(a,b){b=Je(b,b);b.L=!0;Ne(a,b)};R.prototype.nb=function(a,b){return Me(this,null,a,b)};R.prototype.catch=R.prototype.nb;
|
|
54
|
+
R.prototype.cancel=function(a){if(this.l==0){var b=new S(a);De(function(){Pe(this,b)},this)}};
|
|
55
|
+
var Pe=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?Pe(c,b):(f?(d=f,d.next==c.C&&(c.C=d),d.next=d.next.next):Qe(c),Re(c,e,3,b)))}a.B=null}else Ge(a,3,b)},Ne=function(a,b){a.u||a.l!=2&&a.l!=3||Se(a);a.C?a.C.next=b:a.u=b;a.C=b},Me=function(a,b,c,d){var e=Je(null,null,null);e.v=new R(function(f,g){e.N=b?function(h){try{var k=b.call(d,h);f(k)}catch(p){g(p)}}:f;e.H=c?function(h){try{var k=c.call(d,
|
|
56
|
+
h);k===void 0&&h instanceof S?g(h):f(k)}catch(p){g(p)}}:g});e.v.B=a;Ne(a,e);return e.v};R.prototype.ob=function(a){this.l=0;Ge(this,2,a)};R.prototype.pb=function(a){this.l=0;Ge(this,3,a)};
|
|
57
|
+
var Ge=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){Ne(d,Je(e||Fe,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 k=d.then;if(typeof k==="function"){Te(d,k,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,Se(a),b!=3||c instanceof S||Ue(a,c))}},
|
|
58
|
+
Te=function(a,b,c,d,e){var f=!1,g=function(k){f||(f=!0,c.call(e,k))},h=function(k){f||(f=!0,d.call(e,k))};try{b.call(a,g,h)}catch(k){h(k)}},Se=function(a){a.ha||(a.ha=!0,De(a.Va,a))},Qe=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=Qe(this);)Re(this,a,this.l,this.Ja);this.ha=!1};
|
|
59
|
+
var Re=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,Ve(b,c,d);else try{b.L?b.N.call(b.context):Ve(b,c,d)}catch(e){We.call(null,e)}Ie.put(b)},Ve=function(a,b,c){b==2?a.N.call(a.context,c):a.H&&a.H.call(a.context,c)},Ue=function(a,b){a.T=!0;De(function(){a.T&&We.call(null,b)})},We=m,S=function(a){ia.call(this,a)};ha(S,ia);S.prototype.name="cancel";var Ke=function(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let Xe=1,Ye=new WeakMap;
|
|
60
|
+
var $e=function(a,b,c){var d=Ze;a.Oa.has(b);d(b,c)},bf=class extends O{constructor(){super();this.Oa=new Set}signal(){const a=new af;this.Oa.add(a);Md(this,fa(Ld,a));return a}},Ze=function(a,b){return new Promise(c=>{cf(()=>{a.wa&&(a.ab=b,a.Ca=!0);for(const {ta:d,slot:e}of a.j.values())try{e(b,{signal:a,ta:d})}catch(f){m(f)}for(const d of a.I)d.resolve(b);a.I.clear();c()})})},Pd=function(a,b,c){const d=Xe++;cf(()=>{df(a,d,b,c)});return d},df=function(a,b,c,d){if(!a.o)if(d){if(!d.o){const e=()=>{cf(()=>
|
|
61
|
+
{a.j.delete(b);const f=Ye.get(d);f&&pa(f,e)})};a.j.set(b,{ta:b,slot:c,ea:e});ef(d,e)}}else a.j.set(b,{ta:b,slot:c,ea:()=>a.j.delete(b)})},af=class extends O{constructor(){super();this.wa=!1;this.j=new Map;this.I=new Set;this.Ca=!1}detach(a){cf(()=>{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=Le();cf(()=>{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&&
|
|
62
|
+
this.wa&&this.Ca)c.resolve(this.ab);else if(this.I.add(c),Oe(c.promise,()=>{this.I.delete(c)}),b){const d=()=>{c.reject(new S("Owner asynchronously disposed"))};Oe(c.promise,()=>{const e=Ye.get(b);e&&pa(e,d)});ef(b,d)}});return c.promise}fa(){super.fa();cf(()=>{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 ff=[];let gf=!1;function cf(a){ff.push(a);hf()}
|
|
63
|
+
async function hf(){if(!gf)try{gf=!0;let a=jf(0);for(;a<ff.length;)await Promise.resolve(),a=jf(a)}catch(a){m(a)}finally{ff.length=0,gf=!1}}function jf(a){const b=a+100;for(;a<b&&a<ff.length;)try{ff[a++]()}catch(c){m(c)}return a}function ef(a,b){if(a.o)b();else{var c=Ye.get(a);if(c)c.push(b);else{const d=[b];Ye.set(a,d);Md(a,()=>{for(const e of[...d])e();Ye.delete(a)})}}};function T(a){var b=new me;a=F(b,1,oe,a);return{content:yc(a)}}const kf=new bf;function lf(a,b){const c=kf.signal();return{channel:ue(a,d=>{const e=b(d.data);$e(kf,c,{content:e,kb:d})}),signal:c}};let zc;var U=class extends K{getState(){const a=this.h;let b=a[r];const c=fc(a,b,1),d=Oa(c,!0,!!(b&34));d!=null&&d!==c&&B(a,b,1,d);return d==null?za():d}};var V=class extends K{};var nf=class extends K{ka(){return J(this,U,2,mf)}Y(a){F(this,2,mf,a)}U(){return kc(this,U,2,mf)}la(){return J(this,V,3,mf)}Z(a){F(this,3,mf,a)}oa(){return kc(this,V,3,mf)}},mf=[2,3];var of=Cc(class extends K{});var qf=Cc(class extends K{S(){return C(this,pf)}}),pf=[1,2];var rf=({destination:a,origin:b,vb:c,Pa:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");const f=se(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return ue(f.port1,e)};function sf(a,b,c){const d=new bf,e=d.signal();a=rf({destination:window.parent,origin:b,Pa:a,onMessage:f=>{const g=ne(f.data.content);C(g,oe)===2&&$e(d,e,{content:J(g,Gd,2,oe),kb:f,messagePort:f.data.messagePort})}});return new tf(e,a,c)}
|
|
64
|
+
var Qd=async function(a,b){var c=W,d=new Q;b=F(d,9,P,b);a=await c(a,T(b));let e;return(e=J(ne(a.data.content),Gd,2,oe))==null?void 0:J(e,Ed,9,Fd)},Rd=async function(a,b){var c=W,d=new Q;b=F(d,8,P,b);await c(a,T(b))},Sd=async function(a){var b=W;var c=new Q;var d=new Yd;c=F(c,11,P,d);await b(a,T(c))},Td=async function(a,b){var c=W,d=new Q;b=F(d,14,P,b);await c(a,T(b))},Ud=async function(a,b){var c=W,d=new Q;b=F(d,15,P,b);await c(a,T(b))},uf=async function(a){await a.mb()},W=async function(a,b){(a=
|
|
65
|
+
await a.channel.O(b))||rd(M,"Falsy response received from the message channel."+` ${JSON.stringify(a)}`);(b=a.data)||rd(M,"Data field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);(b=b.content)||rd(M,"Content field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);let c=void 0;try{c=ne(b)}catch(d){rd(M,"The ControlMessage can't be deserialized."+` ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=J(c,Gd,2,oe))||rd(M,"MeetToAddonMessage field on ControlMessage is falsy."+
|
|
66
|
+
` ${JSON.stringify(b)}`);b=b==null?void 0:J(b,Nc,10,Fd);if((b==null?void 0:I(b,1))!==void 0)throw new L(od(I(b,1)));return a},vf=async function(a,b,c){var d=W,e=new Q;b=F(e,1,P,b);d=await d(a,T(b));a=d.data.messagePort;var f;(d=(f=J(ne(d.data.content),Gd,2,oe))==null?void 0:J(f,Mc,1,Fd))!=null?f=d:(f=new Mc,f=E(f,1,y(0),0));return{channel:a?lf(a,c):void 0,response:f}},wf=async function(a){const b=be(),{channel:c,response:d}=await vf(a,b,e=>qf(e));if(!c)throw new L(pd(d));return c},xf=async function(a){var b=
|
|
67
|
+
W;var c=new Q;var d=new ke;c=F(c,5,P,d);await b(a,T(c))},yf=async function(a){var b=W;var c=new Q;var d=new fe;c=F(c,6,P,d);await b(a,T(c))},zf=async function(a,b,c){var d=W,e=new Q,f=new ge;b=E(f,1,y(b),0).La(c);e=F(e,7,P,b);await d(a,T(e))},Af=async function(a,b){var c=W,d=new Q;b=F(d,16,P,b);await c(a,T(b))};
|
|
68
|
+
class tf extends O{constructor(a,b,c){super();this.Ia=a;this.channel=b;this.mb=Jc(async()=>{var d=this.channel,e=d.O;var f=new Q;var g=new he;f=F(f,13,P,g);await e.call(d,T(f))});a=Bc();c=le(new Q,ee(de(a),c));this.channel.send(T(c));Pd(this.Ia,async d=>{switch(d.content.na()){case 16:await uf(this)}})}};let Bf;var Cf=class{constructor(a){var b=Bf;this.P=a;this.i=b}delete(){throw Error("Not implemented.");}};var Ef=class extends K{constructor(){super()}sa(a){return E(this,1,a==null?a:qb(a),"0")}ka(){return J(this,U,2,Df)}Y(a){F(this,2,Df,a)}U(){return kc(this,U,2,Df)}la(){return J(this,V,3,Df)}Z(a){F(this,3,Df,a)}oa(){return kc(this,V,3,Df)}},Df=[2,3];var Ff=class extends K{constructor(){super()}};var Gf=class extends K{constructor(){super()}};var Hf=class extends K{constructor(){super()}ra(a){return ic(this,4,z(a))}};var Jf=class extends K{constructor(){super()}sa(a){return E(this,1,a==null?a:qb(a),"0")}ka(){return J(this,U,2,If)}Y(a){F(this,2,If,a)}U(){return kc(this,U,2,If)}la(){return J(this,V,3,If)}Z(a){F(this,3,If,a)}oa(){return kc(this,V,3,If)}},If=[2,3],Kf=[5,6];var Lf=class extends K{constructor(){super()}ra(a){return E(this,1,z(a),"")}};var Nf=class extends K{constructor(){super()}S(){return C(this,Mf)}},Mf=[1,2,3];var Of=class extends Error{constructor(){super("Failed to create CoActivity: Connection refused - Meet refused to begin Live Sharing")}};var Pf=class{constructor(a){this.config=a}start(){this.Ea!=null||(this.Ea=setInterval(()=>{this.config.gb()},this.config.Ya));return this}shutdown(){clearInterval(this.Ea)}};function Qf(){const a=new Map,b={set(c,d){a.set(c,d);return b},da:()=>a};return b};function Rf(a){if(a.U()){var b=a.ka().getState();a=Uint8Array;xa(va);var c=b.ba;if(c!=null&&!ua(c))if(typeof c==="string"){ra.test(c)&&(c=c.replace(ra,ta));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 Sf(a,b){a.Y(Tf(b));return a}function Uf(a,b){a.Y(Tf(b));return a}function Tf(a){var b=new U;return E(b,1,Oa(a.bytes,!1,!1),za())}
|
|
69
|
+
function Vf(a){if(a.oa()){a=a.la();var b,c,d=H(a,1),e=(c=(b=oc(a,Dc,2))==null?void 0:vc(b))!=null?c:0;c=a.h;let f=c[r];const g=fc(c,f,4);b=g==null||typeof g==="number"?g:g==="NaN"||g==="Infinity"||g==="-Infinity"?Number(g):void 0;b!=null&&b!==g&&B(c,f,4,b);return{mediaId:d,mediaPlayoutPosition:e,mediaPlayoutRate:G(b,0),playbackState:Wf.get(I(a,3))}}}function Xf(a,b){a.Z(Yf(b));return a}function Zf(a,b){a.Z(Yf(b));return a}
|
|
70
|
+
const Wf=Qf().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED").da(),$f=Qf().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4).da();
|
|
71
|
+
function Yf(a){var b=new V;b=E(b,1,z(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=E(b,4,c,0);c=(new Dc).setSeconds(a.mediaPlayoutPosition);b=tc(b,2,c);a=$f.get(a.playbackState);return E(b,3,y(a),0)}function ag({activityTitle:a}){return(new Hf).ra(a)}function bg(a,b){var c=new Gf;b=E(c,1,y(b.G),0);F(a,6,Kf,b);return a}function cg(a){var b=new Ff;F(a,5,Kf,b);return a};const dg=Qf().set("co-doing",1).set("co-watching",2).da();async function eg(a,b,c){var d=b.O,e=new Nf;var f=(new Lf).ra(a.activityTitle);var g=dg.get(a.va);f=E(f,2,y(g),0);e=F(e,3,Mf,f);d=await d.call(b,e,of);let h;if((h=G(nb(gc(d,1)),!1))!=null&&h)return new fg(a,b,c,oc(d,nf,2));throw new Of;}var gg=function(a,b){const c=a.config.Aa(b);c&&!a.config.ya(a.s,c)&&(a.s=c,a.pa=vc(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)};
|
|
72
|
+
class fg{constructor(a,b,c,d){this.xa=a;this.R=b;this.config=c;this.Ua=Ec(e=>void this.xa.Ba(e));hg(this.R,e=>{const f=e.S();switch(f){case 1:gg(this,J(e,nf,1,pf));break;case 2:case 0:console.warn(`IllegalMessage: ${f} - ${"Unhandled message"} - ${"Please raise a bug with the MeetJS team"}`)}});this.Xa=(new Pf({Ya:1E3,gb:()=>{var e,f;const g=(f=(e=this.xa).jb)==null?void 0:f.call(e);this.s!==null&&(this.s={...this.s,...g},e=new Nf,f=this.config.Ma((new Ef).sa(this.pa),this.s),e=F(e,1,Mf,f),this.R.send(e))}})).start();
|
|
73
|
+
this.s=null;this.pa=0;d&&gg(this,d)}disconnect(){this.R.shutdown();this.Xa.shutdown()}notify(a,b,c){var d=c?ag(c):void 0;c=this.config;var e=c.Na,f=(new Jf).sa(this.pa);d=tc(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=F(e,2,Mf,a);c.call(b,a)}};var ig=class{constructor(a){this.m=a}broadcastStateUpdate(a){X(this.m,()=>({state:a,context:{}}))}disconnect(){this.m.disconnect()}};function jg(a,b){return a==null||b==null?!1:a.bytes.length===b.bytes.length&&a.bytes.every((c,d)=>c===b.bytes[d])};var kg=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},
|
|
74
74
|
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()}};
|
|
75
|
-
function
|
|
76
|
-
async function
|
|
77
|
-
+!!a.additionalData)throw new L(
|
|
78
|
-
a)}async createRoomsStandaloneClient(){var a=this.K;if(a.P.frameType!==2)throw new L(
|
|
79
|
-
return
|
|
75
|
+
function lg(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 hg=function(a,b){const c=Pd(a.signal,d=>{b(d)});a.j.push(c)},mg=class{constructor(a,b){this.channel=a;this.signal=b;this.j=[]}send(a){this.channel.send(yc(a))}async O(a,b){a=await this.channel.O(yc(a));return b(a.data)}shutdown(){this.j.forEach(a=>{this.signal.detach(a)})}};function ng(a,b){var c=og;const d=a.signal(),e=a.signal();Pd(b,f=>{const g=c(f)?d:e;$e(a,g,f)},a);return{hb:d,fb:e}}function pg(a,b,c,d=e=>e){Pd(c,e=>{$e(a,b,d(e))},a)};async function qg(a,b){if(b)return a=await eg({activityTitle:b.activityTitle,va:"co-watching",jb:()=>b.onCoWatchingStateQuery(),Ba:c=>{b.onCoWatchingStateChanged(c)}},a,{Na:Xf,Ma:Zf,Ka:bg,Aa:Vf,ya:lg}),new kg(a)}async function rg(a,b){if(b)return a=await eg({activityTitle:b.activityTitle,va:"co-doing",Ba:c=>{b.onCoDoingStateChanged(c)}},a,{Na:Sf,Ma:Uf,Ka:cg,Aa:Rf,ya:jg}),new ig(a)}
|
|
76
|
+
async function sg(a){const b=new bf,c=b.signal();a=await a;pg(b,c,a.signal,f=>f.content);const {hb:d,fb:e}=ng(b,c);return{Qa:new mg(a.channel,d),Ra:new mg(a.channel,e)}}function og(a){a:switch(a.S()){case 1:a=J(a,nf,1,pf);break a;default:throw Error("CA Message arrived with no known content message set");}return a.U()};async function tg(a,b){({Qa:a}=await sg(wf(a.i)));b=await rg(a,b);if(!b)throw Error("Failed to create co-doing session");return b}async function ug(a,b){({Ra:a}=await sg(wf(a.i)));b=await qg(a,b);if(!b)throw Error("Failed to create co-watching session");return b};var vg=class extends Vd{async notifySidePanel(a){await zf(this.context.i,1,a)}async unloadSidePanel(){await xf(this.context.i)}async loadSidePanel(){await yf(this.context.i)}};var wg=class extends Vd{async setAddonStartingState(a){if(a===null)throw new L($c("addonStartingState"));if(typeof a!=="object")throw new L(N("addonStartingState",typeof a,"object | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new L(N("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!=="string")throw new L(N("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.sidePanelUrl+
|
|
77
|
+
+!!a.additionalData)throw new L(Zc);if(Object.keys(a).length===0)throw new L(Yc);const b=[];b.push(vd(ud(td(1),a.sidePanelUrl),a.additionalData));await Af(this.context.i,(new je).setAddonStartingState((new ie).X(b)))}};var xg=class extends Vd{async notifyMainStage(a){await zf(this.context.i,2,a)}};var yg=class{constructor(a){a=a.cloudProjectNumber;const b=Xd();if(b.cloudProjectNumber!==a)throw new L(Tc);const c=b.Ha,d=b.Sa;let e;Bf=(e=Bf)!=null?e:sf(d,c,a);this.K=new Cf(b)}async createMainStageClient(){var a=this.K;if(a.P.frameType!==2)throw new L(Pc);return await Promise.resolve(new vg(a))}async createSidePanelClient(){var a=this.K;if(a.P.frameType!==1)throw new L(Qc);return await Promise.resolve(new xg(a))}async createCoWatchingClient(a){return await ug(this.K,a)}async createCoDoingClient(a){return await tg(this.K,
|
|
78
|
+
a)}async createRoomsStandaloneClient(){var a=this.K;if(a.P.frameType!==2)throw new L(Pc);return await Promise.resolve(new wg(a))}};let zg=null;var Ag={addon:{getFrameType:function(){a:{var a=Xd().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($c("config"));if(typeof a!=="object")throw new L(N("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new L(N("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(zg&&Xd().Ha!=="integration.test.google.com")throw new L(id);
|
|
79
|
+
return zg=new yg(a)}}},Bg=["meet"],Y=l;Bg[0]in Y||typeof Y.execScript=="undefined"||Y.execScript("var "+Bg[0]);for(var Z;Bg.length&&(Z=Bg.shift());)Bg.length||Ag===void 0?Y=Y[Z]&&Y[Z]!==Object.prototype[Z]?Y[Z]:Y[Z]={}:Y[Z]=Ag;}).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": "1.1.1-dev-
|
|
4
|
+
"version": "1.1.1-dev-689137866",
|
|
5
5
|
"repository": "googleworkspace/meet",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"homepage": "https://developers.google.com/meet/add-ons/guides/overview",
|