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