@googleworkspace/meet-addons 1.2.0-dev-706864954 → 1.2.0-dev-707679785
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.mjs +56 -54
- package/meet.addons.screenshare.mjs +1 -1
- package/package.json +1 -1
package/meet.addons.d.ts
CHANGED
package/meet.addons.mjs
CHANGED
|
@@ -13,58 +13,60 @@ function xb(a){var b=Math.trunc(Number(a));if(Number.isSafeInteger(b))return Str
|
|
|
13
13
|
e));w*=1E6;u=u*1E6+f;u>=4294967296&&(w+=Math.trunc(u/4294967296),w>>>=0,u>>>=0)}if(b){const [d,e]=lb(u,w);u=d;w=e}}a=u;b=w;if(b&2147483648)if(Ha())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{const [c,d]=lb(a,b);a="-"+mb(c,d)}else a=mb(a,b)}return a}function z(a){if(a!=null&&typeof a!=="string")throw Error();return a}function zb(a,b,c){if(a!=null&&typeof a==="object"&&a.H===Pa)return a;if(Array.isArray(a)){var d=a[r]|0,e=d;e===0&&(e|=c&32);e|=c&2;e!==d&&(a[r]=e);return new b(a)}};function Ab(a){Bb===void 0&&(Bb=typeof Proxy==="function"?Cb(Proxy):null);var b;(b=!Bb)||(Db===void 0&&(Db=typeof WeakMap==="function"?Cb(WeakMap):null),b=!Db);if(b)return a;if(b=Eb(a))return b;if(Math.random()>.01)return a;Fb(a);b=new Bb(a,{set(c,d,e){Gb();c[d]=e;return!0}});Hb(a,b);return b}function Gb(){Fa()}let Ib=void 0,Jb=void 0;function Eb(a){let b;return(b=Ib)==null?void 0:b.get(a)}function Hb(a,b){(Ib||(Ib=new Db)).set(a,b);(Jb||(Jb=new Db)).set(b,a)}let Bb=void 0,Db=void 0;
|
|
14
14
|
function Cb(a){try{return a.toString().indexOf("[native code]")!==-1?a:null}catch{return null}}let Kb=void 0;function Fb(a){if(Kb===void 0){const b=new Bb([],{});Kb=Array.prototype.concat.call([],b).length===1}Kb&&typeof Symbol==="function"&&Symbol.isConcatSpreadable&&(a[Symbol.isConcatSpreadable]=!0)};function Lb(a,b){return Mb(b)}function Mb(a){switch(typeof a){case "number":return isFinite(a)?a:String(a);case "bigint":return ib(a)?Number(a):String(a);case "boolean":return a?1:0;case "object":if(a)if(Array.isArray(a)){if(Ua(a))return}else{if(xa(a))return ta(a);if(a instanceof Ba){const b=a.g;return b==null?"":typeof b==="string"?b:a.g=ta(b)}}}return a};function Nb(a,b,c){a=Ia(a);var d=a.length;const e=b&256?a[d-1]:void 0;d+=e?-1:0;for(b=b&512?1:0;b<d;b++)a[b]=c(a[b]);if(e){b=a[b]={};for(const f in e)b[f]=c(e[f])}return a}function Ob(a,b,c,d,e){if(a!=null){if(Array.isArray(a))a=Ua(a)?void 0:e&&(a[r]|0)&2?a:Pb(a,b,c,d!==void 0,e);else if(Sa(a)){const f={};for(let g in a)f[g]=Ob(a[g],b,c,d,e);a=f}else a=b(a,d);return a}}
|
|
15
15
|
function Pb(a,b,c,d,e){const f=d||c?a[r]|0:0;d=d?!!(f&32):void 0;a=Ia(a);for(let g=0;g<a.length;g++)a[g]=Ob(a[g],b,c,d,e);c&&c(f,a);return a}function Qb(a){return a.H===Pa?a.toJSON():Mb(a)};function Rb(a,b,c=Oa){if(a!=null){if(a instanceof Uint8Array)return b?a:new Uint8Array(a);if(Array.isArray(a)){var d=a[r]|0;if(d&2)return a;b&&(b=d===0||!!(d&32)&&!(d&64||!(d&16)));return b?(a[r]=(d|34)&-12293,a):Pb(a,Rb,d&4?Oa:c,!0,!0)}a.H===Pa&&(c=a.m,d=c[r],a=d&2?a:new a.constructor(Sb(c,d,!0)));return a}}function Sb(a,b,c){const d=c||b&2?Oa:Na,e=!!(b&32);a=Nb(a,b,f=>Rb(f,e,d));a[r]=a[r]|32|(c?2:0);return a}function Tb(a){const b=a.m,c=b[r];return c&2?new a.constructor(Sb(b,c,!1)):a};function A(a,b){a=a.m;return B(a,a[r],b)}function Ub(a,b,c,d){b=d+(+!!(b&512)-1);if(!(b<0||b>=a.length||b>=c))return a[b]}function B(a,b,c,d){if(c===-1)return null;const e=b>>15&1023||536870912;if(c>=e){if(b&256)return a[a.length-1][c]}else{var f=a.length;if(d&&b&256&&(d=a[f-1][c],d!=null)){if(Ub(a,b,e,c)&&La!=null){var g;a=(g=Ea)!=null?g:Ea={};g=a[La]||0;g>=4||(a[La]=g+1,Fa())}return d}return Ub(a,b,e,c)}}function Vb(a,b,c){const d=a.m;let e=d[r];Xa(e);C(d,e,b,c);return a}
|
|
16
|
-
function C(a,b,c,d){const e=b>>15&1023||536870912;if(c>=e){let f,g=b;if(b&256)f=a[a.length-1];else{if(d==null)return g;f=a[e+(+!!(b&512)-1)]={};g|=256}f[c]=d;c<e&&(a[c+(+!!(b&512)-1)]=void 0);g!==b&&(a[r]=g);return g}a[c+(+!!(b&512)-1)]=d;b&256&&(a=a[a.length-1],c in a&&delete a[c]);return b}function
|
|
17
|
-
function
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
-
!0}if(e!==a||f||h){if(!b)e=Array.prototype.slice.call(e,0,t);else if(h||f||k)e.length=t;k&&e.push(k)}h=e}else h=a}return h};function
|
|
24
|
-
|
|
25
|
-
message:"This method is not supported in standalone mode.",i:"Do not call this method in standalone mode."},
|
|
26
|
-
i:"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."},
|
|
27
|
-
message:"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
i:"Ensure
|
|
31
|
-
Oc={errorType:"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
i:"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
function
|
|
47
|
-
function
|
|
48
|
-
function
|
|
49
|
-
function
|
|
50
|
-
function
|
|
51
|
-
function
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
async function
|
|
59
|
-
|
|
60
|
-
function
|
|
61
|
-
|
|
62
|
-
function
|
|
63
|
-
|
|
64
|
-
|
|
16
|
+
function C(a,b,c,d){const e=b>>15&1023||536870912;if(c>=e){let f,g=b;if(b&256)f=a[a.length-1];else{if(d==null)return g;f=a[e+(+!!(b&512)-1)]={};g|=256}f[c]=d;c<e&&(a[c+(+!!(b&512)-1)]=void 0);g!==b&&(a[r]=g);return g}a[c+(+!!(b&512)-1)]=d;b&256&&(a=a[a.length-1],c in a&&delete a[c]);return b}function Wb(a,b,c,d){c=D(a,d)===c?c:-1;return Xb(a,b,c)!==void 0}function Yb(a){return!!(2&a)&&!!(4&a)||!!(2048&a)}
|
|
17
|
+
function E(a,b,c,d){const e=a.m;let f=e[r];Xa(f);C(e,f,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}function D(a,b){a=a.m;return Zb($b(a),a,a[r],b)}function $b(a){let b;return(b=a[Ma])!=null?b:a[Ma]=new Map}function Zb(a,b,c,d){let e=a.get(d);if(e!=null)return e;e=0;for(let f=0;f<d.length;f++){const g=d[f];B(b,c,g)!=null&&(e!==0&&(c=C(b,c,e)),e=g)}a.set(d,e);return e}function Xb(a,b,c,d){a=a.m;let e=a[r];d=B(a,e,c,d);b=zb(d,b,e);b!==d&&b!=null&&C(a,e,c,b);return b}
|
|
18
|
+
function ac(a,b,c){b=Xb(a,b,c,!1);if(b==null)return b;a=a.m;let d=a[r];if(!(d&2)){const e=Tb(b);e!==b&&(b=e,C(a,d,c,b))}return b}function bc(a,b,c){c==null&&(c=void 0);return Vb(a,b,c)}function F(a,b,c,d){d==null&&(d=void 0);a:{const g=a.m;var e=g[r];Xa(e);if(d==null){var f=$b(g);if(Zb(f,g,e,c)===b)f.set(c,0);else break a}else{f=g;const k=$b(f),h=Zb(k,f,e,c);h!==b&&(h&&(e=C(f,e,h)),k.set(c,b))}C(g,e,b,d)}return a}
|
|
19
|
+
function cc(a,b){const c=a.m;let d=c[r];Xa(d);if(b==null)return C(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=Yb(e),k=g||Object.isFrozen(b);let h=!0,t=!0;for(let x=0;x<b.length;x++){var v=b[x];g||(v=!!((v.m[r]|0)&2),h&&(h=!v),t&&(t=v))}g||(e=h?13:5,e=t?e|16:e&-17);k&&e===f||(b=Ia(b),f=0,e=dc(e,d),e=ec(e,d,!0));e!==f&&(b[r]=e);C(c,d,1,b);return a}function dc(a,b){a=(2&b?a|2:a&-3)|32;return a&=-2049}function ec(a,b,c){32&b&&c||(a&=-33);return a}
|
|
20
|
+
function fc(a,b){return a!=null?a:b}function gc(a){a=A(a,1);a!=null&&(typeof a==="bigint"?ib(a)?a=Number(a):(a=BigInt.asIntN(64,a),a=ib(a)?Number(a):String(a)):a=qb(a)?typeof a==="number"?yb(a):xb(a):void 0);return fc(a,0)}function G(a,b){a=A(a,b);return fc(a==null||typeof a==="string"?a:void 0,"")}function H(a,b){a=A(a,b);a=a==null?a:Number.isFinite(a)?a|0:void 0;return fc(a,0)}function I(a,b,c,d){c=D(a,d)===c?c:-1;return ac(a,b,c)};let hc;function ic(a){try{return hc=!0,JSON.stringify(jc(a),Lb)}finally{hc=!1}}function kc(){var a=lc||(lc=mc("[1,2,0]"));a=Tb(a);a=Vb(a,4,z("dev-707679785"));const b=a.m,c=b[r];return c&2?a:new a.constructor(Sb(b,c,!0))}
|
|
21
|
+
var J=class{constructor(a){a:{var b=b!=null?b:0;if(a==null){var c=96;a=[]}else{if(!Array.isArray(a))throw Error("narr");c=a[r]|0;if(c&2048)throw Error("farr");if(c&64)break a;b===1||b===2||(c|=64);b=a;var d=b.length;if(d&&(--d,Sa(b[d]))){c|=256;b=d-(+!!(c&512)-1);if(b>=1024)throw Error("pvtlmt");c=c&-33521665|(b&1023)<<15}}a[r]=c}this.m=a}toJSON(){return jc(this)}};J.prototype.H=Pa;J.prototype.toString=function(){try{return hc=!0,jc(this).toString()}finally{hc=!1}};
|
|
22
|
+
function jc(a){a=a.m;a=hc?a:Pb(a,Qb,void 0,void 0,!1);{var b=!hc;let t=a.length;if(t){var c=a[t-1],d=Sa(c);d?t--:c=void 0;var e=a;if(d){b:{var f=c;var g;var k=!1;if(f)for(let v in f)if(isNaN(+v)){let x;((x=g)!=null?x:g={})[v]=f[v]}else if(d=f[v],Array.isArray(d)&&(Ua(d)||Ra(d)&&d.size===0)&&(d=null),d==null&&(k=!0),d!=null){let x;((x=g)!=null?x:g={})[v]=d}k||(g=f);if(g)for(let v in g){k=g;break b}k=null}f=k==null?c!=null:k!==c}for(;t>0;t--){g=e[t-1];if(!(g==null||Ua(g)||Ra(g)&&g.size===0))break;var h=
|
|
23
|
+
!0}if(e!==a||f||h){if(!b)e=Array.prototype.slice.call(e,0,t);else if(h||f||k)e.length=t;k&&e.push(k)}h=e}else h=a}return h};function nc(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=new a(b)}return b}};var mc=function(a){return b=>{b=JSON.parse(b);if(!Array.isArray(b)){var c=typeof b;throw Error("Expected jspb data to be an array, got "+(c!="object"?c:b?Array.isArray(b)?"array":c:"null")+": "+b);}b[r]|=34;return new a(b)}}(class extends J{});var oc=class extends J{};function pc(a){var b=new qc(500);let c=0,d;return(...e)=>{rc(b)?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;let f;(f=d)==null||f()},sc(b))))}}function tc(a){var b=new qc(100),c=Promise.resolve();return(...d)=>rc(b)?a(...d):c};function rc(a){return uc(a,a.index)>=a.g?(a.h[a.index]=Date.now(),a.index=(a.index+1)%1,!0):!1}function sc(a){const b=a.g;a=uc(a,a.index);return a>=b?0:b-a}function uc(a,b){let c;return Date.now()-((c=a.h[b])!=null?c:-1*a.g)}var qc=class{constructor(a){this.g=a;this.h=[];this.index=0}};var vc=class extends J{},wc=[2,3];var xc=class extends J{};var K=class extends Error{constructor({errorType:a,message:b,i:c}){super(`Meet Add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},L={errorType:"InternalError",message:"An unexpected error has occurred.",i:"No further information is available."},yc={errorType:"MissingUrlParameter",message:"Missing required Meet SDK URL parameter",i:"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)."},
|
|
24
|
+
zc={errorType:"NeedsMainStageContext",message:"This method can only be invoked if the addon is running in the main stage.",i:"Use getFrameType to check whether the addon is running in the main stage before invoking this method."},Ac={errorType:"NeedsSidePanelContext",message:"This method can only be invoked if the addon is running in the side panel.",i:"Use getFrameType to check whether the addon is running in the side panel before invoking this method."},Bc={errorType:"NotSupportedInStandalone",
|
|
25
|
+
message:"This method is not supported in standalone mode.",i:"Do not call this method in standalone mode."},Cc={errorType:"MustBeIframed",message:"The SDK must be run in an iframe as part of a Google Meet add-on.",i:"See https://developers.google.com/meet/add-ons/guides/deploy-add-on to deploy to Meet."},Dc={errorType:"InternalError",message:"The frame type URL parameter is set to an unexpected value.",i:"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)."},
|
|
26
|
+
Ec={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.",i:"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."},Fc={errorType:"DestinationNotReady",
|
|
27
|
+
message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",i:"Make sure the destination frame has connected before sending messages to it."},Gc={errorType:"InvalidActivityStartingState",message:"Origin of the ActivityStartingState iframeURLs does not match the origin of the URLs provided in the Add-on manifest.",i:"Ensure that the ActivityStartingState iframeURL origins match the origins of the URLs provided in the Add-on manifest."},Hc={errorType:"ActivityStartingStateMissingAttributes",
|
|
28
|
+
message:"The supplied ActivityStartingState object does not contain any recognized attributes.",i:"Ensure that the ActivityStartingState object contains at least one of the following attributes: mainStageUrl, sidePanelUrl, additionalData."},Ic={errorType:"ActivityStartingStateUnrecognizedAttributes",message:"The supplied ActivityStartingState object contains attributes that are not recognized.",i:"Ensure that the ActivityStartingState object has only the following attributes: mainStageUrl, sidePanelUrl, additionalData."},
|
|
29
|
+
Jc={errorType:"AddonStartingStateMissingAttributes",message:"The supplied AddonStartingState object does not contain any recognized attributes.",i:"Ensure that the AddonStartingState object contains at least one of the following attributes: sidePanelUrl, additionalData."},Kc={errorType:"AddonStartingStateUnrecognizedAttributes",message:"The supplied AddonStartingState object contains attributes that are not recognized.",i:"Ensure that the AddonStartingState object has only the following attributes: sidePanelUrl, additionalData."},
|
|
30
|
+
Mc=a=>({errorType:"ArgumentNullError",message:`The argument supplied for '${a}' was 'null' but a value was expected.`,i:"Ensure you are passing a value of the expected type for the argument."}),M=(a,b,c)=>({errorType:"ArgumentTypeError",message:`The type '${b}' of argument supplied for '${a}' did not match the expected type '${c}'.`,i:"Ensure the type of the argument provided matches the expected type."}),Nc=a=>({errorType:"InternalError",message:`Could not connect to ${a} channel. Unknown error`,
|
|
31
|
+
i:"No further information is available."}),Oc={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",i:"Ensure that no activity is ongoing."},Pc={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",i:"Send one of the available commands in the frame message."},Qc={errorType:"NoActivityFound",message:"No activity found.",i:"Ensure that the activity is started before performing this operation."},Rc={errorType:"RequiresEapEnrollment",
|
|
32
|
+
message:"This feature is only available to early access partners.",i:"Meet add-on early access enrollment is currently closed."},Sc={errorType:"UserNotInitiator",message:"Operation cannot be performed because the user is not the initiator of the current activity.",i:"Ensure that the user is the initiator of the current activity or that the activity has ended."},Tc={errorType:"SizeLimitExceededActivityStartingState",message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",
|
|
33
|
+
i:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Uc={errorType:"SizeLimitExceededFrameToFrameMessage",message:"The size of the frame to frame message exceeds the limits allowed.",i:"Ensure that the frame to frame message size is less than 1,000,000 characters."},Vc={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",i:"Only instantiate the AddonSession once."},Wc={errorType:"UserCancelled",
|
|
34
|
+
message:"The user cancelled starting an activity.",i:"The user needs to click continue to start the activity."},Xc={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",i:"Do not call this method during a Meet call."},Yc={errorType:"InvalidAddonStartingState",message:"Origin of the AddonStartingState iframeURLs does not match the origin of the URLs provided in the Add-on manifest.",i:"Ensure that the AddonStartingState iframeURL origins match the origins of the URLs provided in the Add-on manifest."},
|
|
35
|
+
Zc={errorType:"SizeLimitExceededAddonStartingState",message:"The size of the AddonStartingState URLs and/or its data exceed the limits allowed.",i:"Ensure that the AddonStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},$c={errorType:"MeetingPolicyPreventsStartingActivity",message:"A meeting policy (such as using host control settings) prevents the user from starting the activity.",i:"Have a meeting host or administrator modify the necessary settings to allow the current user to start the activity."};
|
|
36
|
+
function ad(a){switch(a){case 0:return L;case 1:return Fc;case 2:return Gc;case 3:return Oc;case 4:return Pc;case 5:return Rc;case 6:return Bc;case 7:return Sc;case 8:return Tc;case 9:return Uc;case 10:return Wc;case 11:return Xc;case 12:return Yc;case 13:return Zc;case 14:return Qc;case 15:return $c;default:return L}}
|
|
37
|
+
function bd(a){let b;var c=(b=H(a,1))!=null?b:0;a=cd(D(a,wc));switch(c){case 1:return{errorType:"InternalError",message:`Could not connect to ${a} channel. Meet did not respond with a MessagePort.`,i:"No further information is available."};case 2:return{errorType:"InternalError",message:`Could not connect to ${a}. A conflicting ${a} exists.`,i:"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}.`,
|
|
38
|
+
i:"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}.`,i:"No further information is available."};case 0:return Nc(a);case 5:a:switch(a){case "co":c={errorType:"InternalError",message:`Could not connect to ${a} channel. The coActivity was not found.`,i:`Consider starting the ${a} only after after the startActivity promise returns.`};break a;default:c={errorType:"InternalError",message:`Could not connect to ${a} channel.`,
|
|
39
|
+
i:"No further information is available."}}return c;default:return Nc(a)}}function cd(a){switch(a){case 2:return"co";case 3:return"gd";case 0:return"unknown";default:return"unknown"}}function N({errorType:a,message:b,i:c},d=""){throw new K({errorType:a,message:d?`${b} ${d}`:b,i:c});}function dd(a,b){N({...yc,message:`${yc.message}: ${a}. In URL ${b}`})};function ed(a){var b=new fd;return E(b,1,y(a),0)}function gd(a,b){return E(a,2,z(b),"")}function hd(a,b){return E(a,3,z(b),"")}var fd=class extends J{getFrameType(){return H(this,1)}};function id(a){var b;void 0===Ya?b=2:b=4;var c=a.m[r],d=c,e=!(2&c),f=fd;a=a.m;b=(c=!!(2&d))?1:b;e&&(e=!c);c=B(a,d,1);c=Array.isArray(c)?c:Va;var g=c[r]|0,k=!!(4&g);if(!k){var h=g;h===0&&(h=dc(h,d));g=c;h|=1;var t=d;const Ja=!!(2&h);Ja&&(t|=2);let tb=!Ja,ub=!0,Ka=0,vb=0;for(;Ka<g.length;Ka++){const wb=zb(g[Ka],f,t);if(wb instanceof f){if(!Ja){const Lc=!!((wb.m[r]|0)&2);tb&&(tb=!Lc);ub&&(ub=Lc)}g[vb++]=wb}}vb<Ka&&(g.length=vb);h|=4;h=ub?h|16:h&-17;h=tb?h|8:h&-9;g[r]=h;Ja&&Object.freeze(g);g=h}if(e&&
|
|
40
|
+
!(8&g||!c.length&&(b===1||b===4&&32&g))){Yb(g)&&(c=Ia(c),g=dc(g,d),d=C(a,d,1,c));e=c;f=g;for(g=0;g<e.length;g++)h=e[g],t=Tb(h),h!==t&&(e[g]=t);f|=8;f=e.length?f&-17:f|16;g=e[r]=f}let v;if(b===1||b===4&&32&g){if(!Yb(g)){d=g;var x=!!(32&g);g|=!c.length||16&g&&(!k||x)?2:2048;g!==d&&(c[r]=g);Object.freeze(c)}}else k=b!==5?!1:!!(32&g)||Yb(g)||!!Eb(c),(b===2||k)&&Yb(g)&&(c=Ia(c),g=dc(g,d),g=ec(g,d,!1),c[r]=g,d=C(a,d,1,c)),Yb(g)||(a=g,g=ec(g,d,!1),g!==a&&(c[r]=g)),k?v=Ab(c):b===2&&((x=Ib)==null||x.delete(c));
|
|
41
|
+
return v||c}function jd(a){var b=new kd;return cc(b,a)}var kd=class extends J{};var ld=class extends J{};function md(a){var b=new nd;return E(b,1,y(a),0)}var nd=class extends J{};var od=class extends J{};var pd=class extends J{};var qd=class extends J{};var sd=class extends J{getMeetingInfo(){return I(this,qd,3,rd)}getMeetPlatformInfo(){return I(this,pd,4,rd)}},rd=[2,3,4,5];var td=class extends J{},ud=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17];var vd=class extends J{};var wd=class extends J{};var xd=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),yd=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function zd(a){a&&typeof a.dispose=="function"&&a.dispose()};function O(){this.s=this.s;this.g=this.g}O.prototype.s=!1;O.prototype.dispose=function(){this.s||(this.s=!0,this.G())};O.prototype[Symbol.dispose]=function(){this.dispose()};function Ad(a,b){a.s?b():(a.g||(a.g=[]),a.g.push(b))}O.prototype.G=function(){if(this.g)for(;this.g.length;)this.g.shift()()};function Bd({J:a,R:b}){if(a===null)throw new K(Mc("activityStartingState"));if(b||a!==void 0){if(typeof a!=="object")throw new K(M("activityStartingState",typeof a,`object${b?"":" | undefined"}`));if(a.mainStageUrl!==void 0&&typeof a.mainStageUrl!=="string")throw new K(M("mainStageUrl",typeof a.mainStageUrl,"string | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new K(M("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!==
|
|
42
|
+
"string")throw new K(M("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new K(Ic);if(Object.keys(a).length===0)throw new K(Hc);}}function Cd(a){const b=[];b.push(hd(gd(ed(2),a.mainStageUrl),a.additionalData));b.push(hd(gd(ed(1),a.sidePanelUrl),a.additionalData));return b}
|
|
43
|
+
var Jd=class extends O{constructor(a){super();this.context=a;this.h={};Dd(this.context.g.U,b=>{switch(D(b.content,ud)){case 7:const d=this.h.frameToFrameMessage;b=I(b.content,od,7,ud);if(d&&b){var c=H(b,1);c=xd.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:G(b,2)})}}})}async getMeetingInfo(){const a=await Ed(this.context.g,md(2));return{meetingId:G(a.getMeetingInfo(),1),meetingCode:G(a.getMeetingInfo(),2)}}async getFrameOpenReason(){let a;const b=(a=this.context.h.ca)!=
|
|
44
|
+
null?a:0;let c;return(c=yd.get(b))!=null?c:"UNKNOWN"}async getActivityStartingState(){var a=I(await Ed(this.context.g,md(1)),kd,2,rd);const b=a==null?void 0:id(a).find(c=>c.getFrameType()===2);a=a==null?void 0:id(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){Bd({J:a,R:!0});var b=Cd(a);a=Fd;var c=this.context.g;var d=new vd;b=jd(b);d=
|
|
45
|
+
bc(d,1,b);await a(c,d)}on(a,b){this.h[a]=b}async getMeetPlatformInfo(){const a=await Ed(this.context.g,md(3));return{isMeetHardware:fc(ob(A(a.getMeetPlatformInfo(),1)),!1)}}async closeAddon(){await Gd(this.context.g)}async startActivity(a){Bd({J:a,R:!1});const b=new wd;a&&(a=Cd(a),a=jd(a),bc(b,1,a));await Hd(this.context.g,b)}async endActivity(a){var b=Id,c=this.context.g,d=new ld;a=E(d,1,y(a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0),0);await b(c,a)}};var Kd=nc(class extends J{getFrameOpenReason(){return H(this,5)}});function Ld(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");if(c)b=Kd(atob(c));else{var d;((d=window.top)!=null?d:window)===window?N(Cc):dd("meet_sdk",b);b=void 0}(c=G(b,1))||dd("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new K(Dc);(d=G(b,2))||dd("meet_control_channel_name",a);const e=G(b,4);e||dd("addon_cloud_project_number",a);var f;a=(f=b.getFrameOpenReason())!=null?f:0;f=G(b,3)||"https://meet.google.com";return{ca:a,frameType:c,
|
|
46
|
+
ba:d,cloudProjectNumber:e,S:f}};var Md=class extends J{};var Nd=class extends J{};function Od(){var a=new Pd,b=new Nd;return F(a,1,Qd,b)}var Pd=class extends J{},Qd=[1,2];function Rd(a){var b=new Sd;return bc(b,2,a)}function Td(a,b){return E(a,3,z(b),"")}var Sd=class extends J{};var Ud=class extends J{};var Vd=class extends J{};var Wd=class extends J{};var Xd=class extends J{};var Yd=class extends J{setAddonStartingState(a){return bc(this,1,a)}};var Zd=class extends J{};function $d(a,b){return F(a,2,P,b)}var Q=class extends J{},P=[1,2,5,6,7,8,9,10,11,13,14,15,16];var ae=class extends J{},be=nc(ae),ce=[1,2];class de{constructor(a,b){this.data=a;this.channel=b}};var ee=Promise;function fe(a){const b=new MessageChannel;ge(b.port1,a);return b}function he(a,b){ge(a,b);return new ie(a)}class ie{constructor(a){this.g=a}send(a,b,c=[]){b=fe(b);this.g.postMessage(a,[b.port2].concat(c))}C(a,b){return new ee(c=>{this.send(a,c,b)})}}function ge(a,b){b&&(a.onmessage=c=>{var d=c.data;c=he(c.ports[0]);b(new de(d,c))})};var je=typeof AsyncContext!=="undefined"&&typeof AsyncContext.Snapshot==="function"?a=>a&&AsyncContext.Snapshot.wrap(a):a=>a;function ke(a,b){a.l(b);a.h<100&&(a.h++,b.next=a.g,a.g=b)}class le{constructor(a,b){this.j=a;this.l=b;this.h=0;this.g=null}get(){let a;this.h>0?(this.h--,a=this.g,this.g=a.next,a.next=null):a=this.j();return a}};function me(){var a=ne;let b=null;a.g&&(b=a.g,a.g=a.g.next,a.g||(a.h=null),b.next=null);return b}class oe{constructor(){this.h=this.g=null}add(a,b){const c=pe.get();c.set(a,b);this.h?this.h.next=c:this.g=c;this.h=c}}var pe=new le(()=>new qe,a=>a.reset());class qe{constructor(){this.next=this.g=this.h=null}set(a,b){this.h=a;this.g=b;this.next=null}reset(){this.next=this.g=this.h=null}};let re,se=!1,ne=new oe,ue=(a,b)=>{re||te();se||(re(),se=!0);ne.add(a,b)},te=()=>{const a=Promise.resolve(void 0);re=()=>{a.then(ve)}};function ve(){let a;for(;a=me();){try{a.h.call(a.g)}catch(b){m(b)}ke(pe,a)}se=!1};function we(){};function R(a){this.g=0;this.T=void 0;this.l=this.h=this.j=null;this.v=this.B=!1;if(a!=we)try{const b=this;a.call(void 0,function(c){xe(b,2,c)},function(c){xe(b,3,c)})}catch(b){xe(this,3,b)}}function ye(){this.next=this.context=this.h=this.l=this.g=null;this.j=!1}ye.prototype.reset=function(){this.context=this.h=this.l=this.g=null;this.j=!1};var ze=new le(function(){return new ye},function(a){a.reset()});function Ae(a,b,c){const d=ze.get();d.l=a;d.h=b;d.context=c;return d}
|
|
47
|
+
function Be(){let a,b;const c=new R(function(d,e){a=d;b=e});return new Ce(c,a,b)}R.prototype.then=function(a,b,c){return De(this,je(typeof a==="function"?a:null),je(typeof b==="function"?b:null),c)};R.prototype.$goog_Thenable=!0;function Ee(a,b){b=je(b);b=Ae(b,b);b.j=!0;Fe(a,b)}R.prototype.cancel=function(a){if(this.g==0){const b=new S(a);ue(function(){Ge(this,b)},this)}};
|
|
48
|
+
function Ge(a,b){if(a.g==0)if(a.j){var c=a.j;if(c.h){var d=0,e=null,f=null;for(let g=c.h;g&&(g.j||(d++,g.g==a&&(e=g),!(e&&d>1)));g=g.next)e||(f=g);e&&(c.g==0&&d==1?Ge(c,b):(f?(d=f,d.next==c.l&&(c.l=d),d.next=d.next.next):He(c),Ie(c,e,3,b)))}a.j=null}else xe(a,3,b)}function Fe(a,b){a.h||a.g!=2&&a.g!=3||Je(a);a.l?a.l.next=b:a.h=b;a.l=b}
|
|
49
|
+
function De(a,b,c,d){const e=Ae(null,null,null);e.g=new R(function(f,g){e.l=b?function(k){try{const h=b.call(d,k);f(h)}catch(h){g(h)}}:f;e.h=c?function(k){try{const h=c.call(d,k);h===void 0&&k instanceof S?g(k):f(h)}catch(h){g(h)}}:g});e.g.j=a;Fe(a,e);return e.g}R.prototype.ma=function(a){this.g=0;xe(this,2,a)};R.prototype.na=function(a){this.g=0;xe(this,3,a)};
|
|
50
|
+
function xe(a,b,c){if(a.g==0){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.g=1;a:{var d=c,e=a.ma,f=a.na;if(d instanceof R){Fe(d,Ae(e||we,f||null,a));var g=!0}else{if(d)try{var k=!!d.$goog_Thenable}catch(h){k=!1}else k=!1;if(k)d.then(e,f,a),g=!0;else{k=typeof d;if(k=="object"&&d!=null||k=="function")try{const h=d.then;if(typeof h==="function"){Ke(d,h,e,f,a);g=!0;break a}}catch(h){f.call(a,h);g=!0;break a}g=!1}}}g||(a.T=c,a.g=b,a.j=null,Je(a),b!=3||c instanceof S||Le(a,c))}}
|
|
51
|
+
function Ke(a,b,c,d,e){function f(h){k||(k=!0,d.call(e,h))}function g(h){k||(k=!0,c.call(e,h))}let k=!1;try{b.call(a,g,f)}catch(h){f(h)}}function Je(a){a.B||(a.B=!0,ue(a.la,a))}function He(a){let b=null;a.h&&(b=a.h,a.h=b.next,b.next=null);a.h||(a.l=null);return b}R.prototype.la=function(){let a;for(;a=He(this);)Ie(this,a,this.g,this.T);this.B=!1};
|
|
52
|
+
function Ie(a,b,c,d){if(c==3&&b.h&&!b.j)for(;a&&a.v;a=a.j)a.v=!1;if(b.g)b.g.j=null,Me(b,c,d);else try{b.j?b.l.call(b.context):Me(b,c,d)}catch(e){Ne.call(null,e)}ke(ze,b)}function Me(a,b,c){b==2?a.l.call(a.context,c):a.h&&a.h.call(a.context,c)}function Le(a,b){a.v=!0;ue(function(){a.v&&Ne.call(null,b)})}var Ne=m;function S(a){ha.call(this,a)}fa(S,ha);S.prototype.name="cancel";function Ce(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let Oe=1,Pe=new WeakMap;function Qe(a,b,c){var d=Re;a.h.has(b);d(b,c)}var Te=class extends O{constructor(){super();this.h=new Set}signal(){const a=new Se;this.h.add(a);Ad(this,ea(zd,a));return a}};function Re(a,b){return new Promise(c=>{Ue(()=>{a.L&&(a.ea=b,a.P=!0);for(const {I:d,slot:e}of a.o.values())try{e(b,{signal:a,I:d})}catch(f){m(f)}for(const d of a.A)d.resolve(b);a.A.clear();c()})})}function Dd(a,b,c){const d=Oe++;Ue(()=>{Ve(a,d,b,c)});return d}
|
|
53
|
+
function Ve(a,b,c,d){if(!a.s)if(d){if(!d.s){const e=()=>{Ue(()=>{a.o.delete(b);const f=Pe.get(d);f&&sa(f,e)})};a.o.set(b,{I:b,slot:c,F:e});We(d,e)}}else a.o.set(b,{I:b,slot:c,F:()=>a.o.delete(b)})}
|
|
54
|
+
var Se=class extends O{constructor(){super();this.L=!1;this.o=new Map;this.A=new Set;this.P=!1}detach(a){Ue(()=>{const b=this.o.get(a);b&&b.F()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){const c=Be();Ue(()=>{if(this.s)c.reject(new S("Signal initially disposed"));else if(b&&b.s)c.reject(new S("Owner initially disposed"));else if(a&&this.L&&this.P)c.resolve(this.ea);else if(this.A.add(c),Ee(c.promise,()=>{this.A.delete(c)}),b){const d=()=>{c.reject(new S("Owner asynchronously disposed"))};
|
|
55
|
+
Ee(c.promise,()=>{const e=Pe.get(b);e&&sa(e,d)});We(b,d)}});return c.promise}G(){super.G();Ue(()=>{for(const {F:a}of this.o.values())a();this.o.clear();for(const a of this.A)a.reject(new S("Signal asynchronously disposed"));this.A.clear()})}};const Xe=[];let Ye=!1;function Ue(a){Xe.push(a);Ze()}async function Ze(){if(!Ye)try{Ye=!0;let a=$e(0);for(;a<Xe.length;)await Promise.resolve(),a=$e(a)}catch(a){m(a)}finally{Xe.length=0,Ye=!1}}
|
|
56
|
+
function $e(a){const b=a+100;for(;a<b&&a<Xe.length;)try{Xe[a++]()}catch(c){m(c)}return a}function We(a,b){if(a.s)b();else{var c=Pe.get(a);if(c)c.push(b);else{const d=[b];Pe.set(a,d);Ad(a,()=>{for(const e of[...d])e();Pe.delete(a)})}}};function T(a){var b=new ae;a=F(b,1,ce,a);return{content:ic(a)}}const af=new Te;function bf(a,b){const c=af.signal();return{channel:he(a,d=>{const e=b(d.data);Qe(af,c,{content:e,ka:d})}),signal:c}};let lc;var U=class extends J{};var V=class extends J{};var df=class extends J{h(){return I(this,U,2,cf)}g(){return Wb(this,U,2,cf)}j(){return I(this,V,3,cf)}l(){return Wb(this,V,3,cf)}},cf=[2,3];var ef=nc(class extends J{});var ff=nc(class extends J{}),gf=[1,2];var hf=({destination:a,origin:b,ra:c,Y:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");const f=fe(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return he(f.port1,e)};function jf(a,b,c){const d=new Te,e=d.signal();a=hf({destination:window.parent,origin:b,Y:a,onMessage:f=>{const g=be(f.data.content);D(g,ce)===2&&Qe(d,e,{content:I(g,td,2,ce),ka:f,messagePort:f.data.messagePort})}});return new kf(e,a,c)}async function Ed(a,b){var c=W,d=new Q;b=F(d,9,P,b);a=await c(a,T(b));let e;return(e=I(be(a.data.content),td,2,ce))==null?void 0:I(e,sd,9,ud)}async function Fd(a,b){var c=W,d=new Q;b=F(d,8,P,b);await c(a,T(b))}
|
|
57
|
+
async function Gd(a){var b=W;var c=new Q;var d=new Md;c=F(c,11,P,d);await b(a,T(c))}async function Hd(a,b){var c=W,d=new Q;b=F(d,14,P,b);await c(a,T(b))}async function Id(a,b){var c=W,d=new Q;b=F(d,15,P,b);await c(a,T(b))}async function lf(a){await a.h()}
|
|
58
|
+
async function W(a,b){(a=await a.channel.C(b))||N(L,"Falsy response received from the message channel."+` ${JSON.stringify(a)}`);(b=a.data)||N(L,"Data field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);(b=b.content)||N(L,"Content field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);let c=void 0;try{c=be(b)}catch(d){N(L,"The ControlMessage can't be deserialized."+` ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=I(c,td,2,ce))||N(L,"MeetToAddonMessage field on ControlMessage is falsy."+
|
|
59
|
+
` ${JSON.stringify(b)}`);b=b==null?void 0:I(b,xc,10,ud);if((b==null?void 0:H(b,1))!==void 0)throw new K(ad(H(b,1)));return a}async function mf(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=I(be(d.data.content),td,2,ce))==null?void 0:I(f,vc,1,ud))!=null?f=d:(f=new vc,f=E(f,1,y(0),0));return{channel:a?bf(a,c):void 0,response:f}}async function nf(a){const b=Od(),{channel:c,response:d}=await mf(a,b,e=>ff(e));if(!c)throw new K(bd(d));return c}
|
|
60
|
+
async function of(a){var b=W;var c=new Q;var d=new Zd;c=F(c,5,P,d);await b(a,T(c))}async function pf(a){var b=W;var c=new Q;var d=new Ud;c=F(c,6,P,d);await b(a,T(c))}async function qf(a,b,c){var d=W,e=new Q,f=new Vd;b=E(f,1,y(b),0);c=E(b,2,z(c),"");e=F(e,7,P,c);await d(a,T(e))}async function rf(a,b){var c=W,d=new Q;b=F(d,16,P,b);await c(a,T(b))}
|
|
61
|
+
class kf extends O{constructor(a,b,c){super();this.U=a;this.channel=b;this.h=tc(async()=>{var d=this.channel,e=d.C;var f=new Q;var g=new Wd;f=F(f,13,P,g);await e.call(d,T(f))});a=kc();G(a,4);rb(A(a,1));rb(A(a,2));rb(A(a,3));c=$d(new Q,Td(Rd(a),c));this.channel.send(T(c));Dd(this.U,async d=>{switch(D(d.content,ud)){case 16:await lf(this)}})}};let sf;var tf=class{constructor(a){var b=sf;this.h=a;this.g=b}delete(){throw Error("Not implemented.");}};var vf=class extends J{h(){return I(this,U,2,uf)}g(){return Wb(this,U,2,uf)}j(){return I(this,V,3,uf)}l(){return Wb(this,V,3,uf)}},uf=[2,3];var wf=class extends J{};var xf=class extends J{};var yf=class extends J{};var Af=class extends J{h(){return I(this,U,2,zf)}g(){return Wb(this,U,2,zf)}j(){return I(this,V,3,zf)}l(){return Wb(this,V,3,zf)}},zf=[2,3],Bf=[5,6];var Cf=class extends J{};var Df=class extends J{},Ef=[1,2,3];var Ff=class extends Error{constructor(){super("Failed to create CoActivity: Connection refused - Meet refused to begin Live Sharing")}};var Gf=class{constructor(a){this.config=a}start(){this.g!=null||(this.g=setInterval(()=>{this.config.ha()},this.config.da));return this}shutdown(){clearInterval(this.g)}};function Hf(){const a=new Map,b={set(c,d){a.set(c,d);return b},D:()=>a};return b};function If(a){if(a.g()){a=a.h().m;var b=a[r];var c=B(a,b,1),d=Ta(c,!0);d!=null&&d!==c&&C(a,b,1,d);a=d;b=a==null?za():a;a=Uint8Array;Ca(ya);c=b.g;if(c!=null&&!xa(c))if(typeof c==="string"){ua.test(c)&&(c=c.replace(ua,wa));c=atob(c);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.g=c;return{bytes:new a(b||0)}}}function Jf(a,b){b=Kf(b);F(a,2,zf,b);return a}function Lf(a,b){b=Kf(b);F(a,2,uf,b);return a}
|
|
62
|
+
function Kf(a){var b=new U;return E(b,1,Ta(a.bytes,!1),za())}function Mf(a){if(a.l()){a=a.j();var b,c,d=G(a,1),e=(c=(b=ac(a,oc,2))==null?void 0:gc(b))!=null?c:0;c=a.m;let f=c[r];const g=B(c,f,4);b=g==null||typeof g==="number"?g:g==="NaN"||g==="Infinity"||g==="-Infinity"?Number(g):void 0;b!=null&&b!==g&&C(c,f,4,b);return{mediaId:d,mediaPlayoutPosition:e,mediaPlayoutRate:fc(b,0),playbackState:Nf.get(H(a,3))}}}function Of(a,b){b=Pf(b);F(a,3,zf,b);return a}
|
|
63
|
+
function Qf(a,b){b=Pf(b);F(a,3,uf,b);return a}const Nf=Hf().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED").D(),Rf=Hf().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4).D();
|
|
64
|
+
function Pf(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 oc;c=E(c,1,sb(a.mediaPlayoutPosition),"0");b=bc(b,2,c);a=Rf.get(a.playbackState);return E(b,3,y(a),0)}function Sf({activityTitle:a}){var b=new yf;return Vb(b,4,z(a))}function Tf(a,b){var c=new xf;b=E(c,1,y(b.u),0);F(a,6,Bf,b);return a}function Uf(a){var b=new wf;F(a,5,Bf,b);return a};const Vf=Hf().set("co-doing",1).set("co-watching",2).D();async function Wf(a,b,c){var d=b.C,e=new Df;var f=new Cf;f=E(f,1,z(a.activityTitle),"");var g=Vf.get(a.K);f=E(f,2,y(g),0);e=F(e,3,Ef,f);d=await d.call(b,e,ef);let k;if((k=fc(ob(A(d,1)),!1))!=null&&k)return new Xf(a,b,c,ac(d,df,2));throw new Ff;}function Yf(a,b){const c=a.config.N(b);c&&!a.config.M(a.g,c)&&(a.g=c,a.j=gc(b),a.v(a.g))}function X(a,b){const {state:c,fa:d,context:e}=b(a.g);a.g=c;a.notify(a.g,e,d)}
|
|
65
|
+
class Xf{constructor(a,b,c,d){this.l=a;this.h=b;this.config=c;this.v=pc(e=>void this.l.O(e));Zf(this.h,e=>{const f=D(e,gf);switch(f){case 1:Yf(this,I(e,df,1,gf));break;case 2:case 0:console.warn(`IllegalMessage: ${f} - ${"Unhandled message"} - ${"Please raise a bug with the MeetJS team"}`)}});this.B=(new Gf({da:1E3,ha:()=>{var e,f,g=(f=(e=this.l).ja)==null?void 0:f.call(e);if(this.g!==null){this.g={...this.g,...g};e=new Df;f=this.config;g=f.W;var k=new vf;k=E(k,1,sb(this.j),"0");f=g.call(f,k,this.g);
|
|
66
|
+
e=F(e,1,Ef,f);this.h.send(e)}}})).start();this.g=null;this.j=0;d&&Yf(this,d)}disconnect(){this.h.shutdown();this.B.shutdown()}notify(a,b,c){var d=c?Sf(c):void 0;c=this.config;var e=c.X;var f=new Af;f=E(f,1,sb(this.j),"0");d=bc(f,4,d);a=e.call(c,d,a);a=this.config.V(a,b);b=this.h;c=b.send;e=new Df;a=F(e,2,Ef,a);c.call(b,a)}};var $f=class{constructor(a){this.g=a}broadcastStateUpdate(a){X(this.g,()=>({state:a,context:{}}))}disconnect(){this.g.disconnect()}};function ag(a,b){return a==null||b==null?!1:a.bytes.length===b.bytes.length&&a.bytes.every((c,d)=>c===b.bytes[d])};var bg=class{constructor(a){this.g=a}notifySwitchedToMedia(a,b,c){X(this.g,()=>({state:{mediaId:b,mediaPlayoutRate:1,mediaPlayoutPosition:c,playbackState:"PLAY"},fa:{activityTitle:a},context:{u:1}}))}notifyPauseState(a,b){X(this.g,c=>{if(c==null)throw Error("Invalid before coWatchingState");return{state:{...c,playbackState:a?"PAUSE":"PLAY",mediaPlayoutPosition:b},context:{u:3}}})}notifySeekToTimestamp(a){X(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},
|
|
65
67
|
context:{u:2}}})}notifyPlayoutRate(a){X(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutRate:a},context:{u:4}}})}notifyBuffering(a){X(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a,playbackState:"BUFFERING"},context:{u:3}}})}notifyReady(a){X(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},context:{u:3}}})}disconnect(){this.g.disconnect()}};
|
|
66
|
-
function
|
|
67
|
-
async function
|
|
68
|
-
+!!a.additionalData)throw new
|
|
69
|
-
a)}async createRoomsStandaloneClient(){var a=this.g;if(a.h.frameType!==2)throw new
|
|
70
|
-
return
|
|
68
|
+
function cg(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};function Zf(a,b){const c=Dd(a.signal,d=>{b(d)});a.o.push(c)}var dg=class{constructor(a,b){this.channel=a;this.signal=b;this.o=[]}send(a){this.channel.send(ic(a))}async C(a,b){a=await this.channel.C(ic(a));return b(a.data)}shutdown(){this.o.forEach(a=>{this.signal.detach(a)})}};function eg(a,b){var c=fg;const d=a.signal(),e=a.signal();Dd(b,f=>{const g=c(f)?d:e;Qe(a,g,f)},a);return{ia:d,ga:e}}function gg(a,b,c,d=e=>e){Dd(c,e=>{Qe(a,b,d(e))},a)};async function hg(a,b){if(b)return a=await Wf({activityTitle:b.activityTitle,K:"co-watching",ja:()=>b.onCoWatchingStateQuery(),O:c=>{b.onCoWatchingStateChanged(c)}},a,{X:Of,W:Qf,V:Tf,N:Mf,M:cg}),new bg(a)}async function ig(a,b){if(b)return a=await Wf({activityTitle:b.activityTitle,K:"co-doing",O:c=>{b.onCoDoingStateChanged(c)}},a,{X:Jf,W:Lf,V:Uf,N:If,M:ag}),new $f(a)}
|
|
69
|
+
async function jg(a){const b=new Te,c=b.signal();a=await a;gg(b,c,a.signal,f=>f.content);const {ia:d,ga:e}=eg(b,c);return{Z:new dg(a.channel,d),aa:new dg(a.channel,e)}}function fg(a){a:switch(D(a,gf)){case 1:a=I(a,df,1,gf);break a;default:throw Error("CA Message arrived with no known content message set");}return a.g()};async function kg(a,b){({Z:a}=await jg(nf(a.g)));b=await ig(a,b);if(!b)throw Error("Failed to create co-doing session");return b}async function lg(a,b){({aa:a}=await jg(nf(a.g)));b=await hg(a,b);if(!b)throw Error("Failed to create co-watching session");return b};var mg=class extends Jd{async notifySidePanel(a){await qf(this.context.g,1,a)}async unloadSidePanel(){await of(this.context.g)}async loadSidePanel(){await pf(this.context.g)}};var ng=class extends Jd{async setAddonStartingState(a){if(a===null)throw new K(Mc("addonStartingState"));if(typeof a!=="object")throw new K(M("addonStartingState",typeof a,"object | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new K(M("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!=="string")throw new K(M("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.sidePanelUrl+
|
|
70
|
+
+!!a.additionalData)throw new K(Kc);if(Object.keys(a).length===0)throw new K(Jc);var b=[];b.push(hd(gd(ed(1),a.sidePanelUrl),a.additionalData));a=this.context.g;var c=new Yd,d=c.setAddonStartingState,e=new Xd;b=cc(e,b);await rf(a,d.call(c,b))}};var og=class extends Jd{async notifyMainStage(a){await qf(this.context.g,2,a)}};var pg=class{constructor(a){a=a.cloudProjectNumber;const b=Ld();if(b.cloudProjectNumber!==a)throw new K(Ec);const c=b.S,d=b.ba;let e;sf=(e=sf)!=null?e:jf(d,c,a);this.g=new tf(b)}async createMainStageClient(){var a=this.g;if(a.h.frameType!==2)throw new K(zc);return await Promise.resolve(new mg(a))}async createSidePanelClient(){var a=this.g;if(a.h.frameType!==1)throw new K(Ac);return await Promise.resolve(new og(a))}async createCoWatchingClient(a){return await lg(this.g,a)}async createCoDoingClient(a){return await kg(this.g,
|
|
71
|
+
a)}async createRoomsStandaloneClient(){var a=this.g;if(a.h.frameType!==2)throw new K(zc);return await Promise.resolve(new ng(a))}};let qg=null;var rg={addon:{getFrameType:function(){a:{var a=Ld().frameType;switch(a){case 2:a="MAIN_STAGE";break a;case 1:a="SIDE_PANEL";break a;default:throw Error(`Unknown frame type: ${a}`);}}return a},createAddonSession:async function(a){if(a===null)throw new K(Mc("config"));if(typeof a!=="object")throw new K(M("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new K(M("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(qg&&Ld().S!=="integration.test.google.com")throw new K(Vc);
|
|
72
|
+
return qg=new pg(a)}}},sg=["meet"],Y=l;sg[0]in Y||typeof Y.execScript=="undefined"||Y.execScript("var "+sg[0]);for(var Z;sg.length&&(Z=sg.shift());)sg.length||rg===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=rg;}).apply(topLevel);export const meet = topLevel.meet;
|
|
@@ -11,7 +11,7 @@ function Ba(a,b,c,e){var d;e=(d=e)!=null?d:0;if(a==null)d=96,c?(a=[c],d|=512):a=
|
|
|
11
11
|
function Ga(a,b){a=(2&b?a|2:a&-3)|32;return a&=-2049}function Ha(a,b){32&b||(a&=-33);return a};let P;var Q=class{constructor(a){this.i=Ba(a)}toJSON(){return Ia(this)}};Q.prototype.v=ma;Q.prototype.toString=function(){try{return P=!0,Ia(this).toString()}finally{P=!1}};
|
|
12
12
|
function Ia(a){a=a.i;a=P?a:Ea(a,Fa,void 0,void 0,!1);{var b=!P;let m=a.length;if(m){var c=a[m-1],e=H(c);e?m--:c=void 0;var d=a;if(e){b:{var f=c;var g;var h=!1;if(f)for(let l in f)if(isNaN(+l)){let q;((q=g)!=null?q:g={})[l]=f[l]}else if(e=f[l],Array.isArray(e)&&(I(e)||oa(e)&&e.size===0)&&(e=null),e==null&&(h=!0),e!=null){let q;((q=g)!=null?q:g={})[l]=e}h||(g=f);if(g)for(let l in g){h=g;break b}h=null}f=h==null?c!=null:h!==c}for(;m>0;m--){g=d[m-1];if(!(g==null||I(g)||oa(g)&&g.size===0))break;var k=
|
|
13
13
|
!0}if(d!==a||f||k){if(!b)d=Array.prototype.slice.call(d,0,m);else if(k||f||h)d.length=m;h&&d.push(h)}k=d}else k=a}return k};function R(a,b){for(;b>127;)a.g.push(b&127|128),b>>>=7;a.g.push(b)}var Ja=class{constructor(){this.g=[]}length(){return this.g.length}end(){const a=this.g;this.g=[];return a}};function S(a,b){b.length!==0&&(a.l.push(b),a.h+=b.length)}function Ka(a,b){R(a.g,b*8+2);b=a.g.end();S(a,b);b.push(a.h);return b}function La(a,b){var c=b.pop();for(c=a.h+a.g.length()-c;c>127;)b.push(c&127|128),c>>>=7,a.h++;b.push(c);a.h++}var Ma=class{constructor(){this.l=[];this.h=0;this.g=new Ja}};function T(){const a=class{constructor(){throw Error();}};Object.setPrototypeOf(a,a.prototype);return a}var U=T(),Na=T();var V=class{constructor(a,b){this.g=a;a=aa(U);this.h=!!a&&b===a||!1}};function Oa(a,b,c,e,d){b=Pa(b,e);b!=null&&(c=Ka(a,c),d(b,a),La(a,c))}const Qa=new V(Oa,U),Ra=new V(Oa,U);var Sa=Symbol(),Ta=Symbol();let Ua,Va;
|
|
14
|
-
function W(a){var b=Wa,c=Xa,e=a[Sa];if(e)return e;e={};e.o=za(a[0]);var d=a[1];let f=1;d&&d.constructor===Object&&(e.s=d,d=a[++f],typeof d==="function"&&(e.u=!0,Ua!=null||(Ua=d),Va!=null||(Va=a[f+1]),d=a[f+=2]));const g={};for(;d&&Array.isArray(d)&&d.length&&typeof d[0]==="number"&&d[0]>0;){for(var h=0;h<d.length;h++)g[d[h]]=d;d=a[++f]}for(h=1;d!==void 0;){typeof d==="number"&&(h+=d,d=a[++f]);let l;var k=void 0;d instanceof V?l=d:(l=Qa,f--);let q;if((q=l)==null?0:q.h){d=a[++f];k=a;var m=f;typeof d===
|
|
14
|
+
function W(a){var b=Wa,c=Xa,e=a[Sa];if(e)return e;e={};e.B=a;e.o=za(a[0]);var d=a[1];let f=1;d&&d.constructor===Object&&(e.s=d,d=a[++f],typeof d==="function"&&(e.u=!0,Ua!=null||(Ua=d),Va!=null||(Va=a[f+1]),d=a[f+=2]));const g={};for(;d&&Array.isArray(d)&&d.length&&typeof d[0]==="number"&&d[0]>0;){for(var h=0;h<d.length;h++)g[d[h]]=d;d=a[++f]}for(h=1;d!==void 0;){typeof d==="number"&&(h+=d,d=a[++f]);let l;var k=void 0;d instanceof V?l=d:(l=Qa,f--);let q;if((q=l)==null?0:q.h){d=a[++f];k=a;var m=f;typeof d===
|
|
15
15
|
"function"&&(d=d(),k[m]=d);k=d}d=a[++f];m=h+1;typeof d==="number"&&d<0&&(m-=d,d=a[++f]);for(;h<m;h++){const p=g[h];k?c(e,h,l,k,p):b(e,h,l,p)}}return a[Sa]=e}function Pa(a,b){if(a instanceof Q)return a.i;if(Array.isArray(a))return Aa(a,b,!1)};function Wa(a,b,c){a[b]=c.g}function Xa(a,b,c,e){let d,f;const g=c.g;a[b]=(h,k,m)=>g(h,k,m,f||(f=W(e).o),d||(d=Ya(e)))}function Ya(a){let b=a[Ta];if(!b){const c=W(a);b=(e,d)=>Za(e,d,c);a[Ta]=b}return b}function Za(a,b,c){var e=a[G]|0,d=+!!(e&512)-1,f=a.length,g=e&512?1:0;const h=f+(e&256?-1:0);for(;g<h;g++){const k=a[g];if(k==null)continue;const m=g-d,l=$a(c,m);l&&l(b,k,m)}if(e&256){a=a[f-1];for(const k in a)e=+k,Number.isNaN(e)||(d=a[e],d!=null&&(f=$a(c,e))&&f(b,d,e))}}
|
|
16
16
|
function $a(a,b){var c=a[b];if(c)return c;if(c=a.s)if(c=c[b]){c=Array.isArray(c)?c[0]instanceof V?c:[Ra,c]:[c,void 0];var e=c[0].g;if(c=c[1]){const d=Ya(c),f=W(c).o;c=a.u?Va(f,d):(g,h,k)=>e(g,h,k,f,d)}else c=e;return a[b]=c}};function ab(a,b,c){b=b==null||typeof b==="string"?b:void 0;b!=null&&(b=(ha||(ha=new TextEncoder)).encode(b),R(a.g,c*8+2),R(a.g,b.length),S(a,a.g.end()),S(a,b))};function bb(a){var b=new cb;if(a!=null){if(!Number.isFinite(a))throw b=Error("enum"),b.__closure__error__context__984382||(b.__closure__error__context__984382={}),b.__closure__error__context__984382.severity="warning",b;a|=0}return O(b,1,a,0)}var cb=class extends Q{};var db=class extends Q{};var eb=class extends Q{};eb.prototype.g=function(a){return function(){const b=new Ma;Za(this.i,b,W(a));S(b,b.g.end());const c=new Uint8Array(b.h),e=b.l,d=e.length;let f=0;for(let g=0;g<d;g++){const h=e[g];c.set(h,f);f+=h.length}b.l=[c];return c}}([0,new V(ab,Na),-1,[0,function(a,b,c=U){return new V(b,c)}(function(a,b,c,e,d){if(a.g()!==2)return!1;var f=a.h;e=Aa(void 0,e,!0);var g=b[G];K(g);var h=g;if(c===-1)var k=null;else k=h>>15&1023||536870912,c>=k?k=h&256?b[b.length-1][c]:void 0:(h=c+(+!!(h&512)-1),k=h<0||h>=b.length||
|
|
17
17
|
h>=k?void 0:b[h]);k=Array.isArray(k)?k:J;const m=k!==J;if(64&g||!(16384&g)||!m){let l=h=m?k[G]|0:0;if(!m||2&l||2&l&&4&l||2048&l||4&l&&!(32&l))k=Array.prototype.slice.call(k),l=Ga(l,g),g=N(b,g,c,k);b=l;b===0&&(b=Ga(b,g));l=Ha((b|1)&-29,g);l!==h&&(k[G]=l)}k.push(e);f.call(a,e,d);return!0},function(a,b,c,e,d){if(Array.isArray(b))for(let m=0;m<b.length;m++){var f=a,g=c,h=d,k=Pa(b[m],e);k!=null&&(g=Ka(f,g),h(k,f),La(f,g))}}),[0,new V(function(a,b,c){b=wa(b);if(b!=null)if(b=parseInt(b,10),R(a.g,c*8),a=
|
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-
|
|
4
|
+
"version": "1.2.0-dev-707679785",
|
|
5
5
|
"repository": "googleworkspace/meet",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"homepage": "https://developers.google.com/meet/add-ons/guides/overview",
|