@googleworkspace/meet-addons 1.2.0-dev-747592674 → 1.2.0-dev-748413754
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/meet.addons.screenshare.mjs +16 -16
- package/package.json +1 -1
package/meet.addons.mjs
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
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 ca=ba(this);
|
|
2
|
-
function da(a,b){if(b)a:{var c=ca;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})}}function
|
|
2
|
+
function da(a,b){if(b)a:{var c=ca;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})}}function k(a){return a}da("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 ea=this||self;function fa(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 ha(a,b){function c(){}c.prototype=b.prototype;a.pa=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.na=function(d,e,f){for(var
|
|
8
|
-
function
|
|
9
|
-
function
|
|
10
|
-
function
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
b);a=a.g=btoa(c)}return a}return}return a}let
|
|
17
|
-
function
|
|
18
|
-
function z(a,b,c,d){const e=c+-1;var f=a.length-1;
|
|
19
|
-
function D(a,b,c,d){
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
var K=class{constructor(a){a:{if(a==null){var b=
|
|
24
|
-
K.prototype[za]=Ca;K.prototype.toString=function(){return this.
|
|
25
|
-
|
|
26
|
-
message:"This method is not supported in standalone mode.",i:"Do not call this method in standalone mode."},
|
|
27
|
-
|
|
28
|
-
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."},
|
|
29
|
-
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."},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
i:"No further information is available."}),
|
|
33
|
-
message:"This feature is only available to early access partners.",i:"Meet add-on early access enrollment is currently closed."},
|
|
34
|
-
i:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},
|
|
35
|
-
message:"The user cancelled starting an activity.",i:"The user needs to click continue to start the activity."},
|
|
36
|
-
|
|
37
|
-
function
|
|
38
|
-
function
|
|
39
|
-
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
|
|
40
|
-
i:"No further information is available."}}return c;default:return
|
|
41
|
-
|
|
42
|
-
"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(
|
|
43
|
-
var
|
|
44
|
-
(a=this.context.h.ba)!=null?a:0;let c;return(c
|
|
45
|
-
b=
|
|
46
|
-
aa:d,cloudProjectNumber:e,R:f}};var
|
|
47
|
-
function
|
|
48
|
-
function
|
|
49
|
-
function
|
|
50
|
-
function
|
|
51
|
-
function
|
|
52
|
-
function
|
|
53
|
-
function
|
|
54
|
-
var
|
|
55
|
-
|
|
56
|
-
function
|
|
57
|
-
async function
|
|
58
|
-
async function
|
|
59
|
-
async function Y(a,b){(a=
|
|
60
|
-
` ${JSON.stringify(b)}`);b=b==null?void 0:
|
|
61
|
-
async function
|
|
62
|
-
class
|
|
63
|
-
function
|
|
64
|
-
function
|
|
65
|
-
|
|
66
|
-
function
|
|
67
|
-
function
|
|
68
|
-
class
|
|
69
|
-
e=E(e,1,
|
|
7
|
+
var ea=this||self;function fa(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 ha(a,b){function c(){}c.prototype=b.prototype;a.pa=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.na=function(d,e,f){for(var g=Array(arguments.length-2),l=2;l<arguments.length;l++)g[l-2]=arguments[l];return b.prototype[e].apply(d,g)}};function ia(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,ia);else{const c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}ha(ia,Error);ia.prototype.name="CustomError";function ja(a){ea.setTimeout(()=>{throw a;},0)};function ka(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};const la=/[-_.]/g,ma={"-":"+",_:"/",".":"="};function na(a){return ma[a]||""}var oa={};function pa(){return qa||(qa=new ra(null,oa))}var ra=class{constructor(a,b){sa(b);this.g=a;if(a!=null&&a.length===0)throw Error("ByteString should be constructed with non-empty values");}};let qa;function sa(a){if(a!==oa)throw Error("illegal external caller");};function ta(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let ua=void 0;function va(a){a=Error(a);ta(a,"warning");return a};function wa(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var xa=wa(),ya=wa(),za=wa("m_m",!0);const m=wa("jas",!0);var Aa;const Ba=[];Ba[m]=55;Aa=Object.freeze(Ba);var Ca={};function n(a,b){return b===void 0?a.h!==Da&&!!(2&(a.j[m]|0)):!!(2&b)&&a.h!==Da}const Da={};function Ea(a,b){if(a!=null)if(typeof a==="string")a=a?new ra(a,oa):pa();else if(a.constructor!==ra)if(a!=null&&a instanceof Uint8Array)a=a.length?new ra(new Uint8Array(a),oa):pa();else{if(!b)throw Error();a=void 0}return a}var Fa=Object.freeze({});function Ga(){return typeof BigInt==="function"};function Ha(a){a.oa=!0;return a};var Ia=Ha(a=>typeof a==="number"),Ja=Ha(a=>typeof a==="string"),Ka=Ha(a=>typeof a==="boolean");var La=typeof ea.BigInt==="function"&&typeof ea.BigInt(0)==="bigint";function q(a){var b=a;if(Ja(b)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(b))throw Error(String(b));}else if(Ia(b)&&!Number.isSafeInteger(b))throw Error(String(b));return La?BigInt(a):a=Ka(a)?a?"1":"0":Ja(a)?a.trim()||"0":String(a)}var Ra=Ha(a=>La?a>=Ma&&a<=Na:a[0]==="-"?Oa(a,Pa):Oa(a,Qa));const Pa=Number.MIN_SAFE_INTEGER.toString(),Ma=La?BigInt(Number.MIN_SAFE_INTEGER):void 0,Qa=Number.MAX_SAFE_INTEGER.toString(),Na=La?BigInt(Number.MAX_SAFE_INTEGER):void 0;
|
|
8
|
+
function Oa(a,b){if(a.length>b.length)return!1;if(a.length<b.length||a===b)return!0;for(let c=0;c<a.length;c++){const d=a[c],e=b[c];if(d>e)return!1;if(d<e)return!0}};let r=0,u=0;function Sa(a){const b=a>>>0;r=b;u=(a-b)/4294967296>>>0}function Ta(a){if(a<0){Sa(-a);const [b,c]=Ua(r,u);r=b>>>0;u=c>>>0}else Sa(a)}function Va(a,b){b>>>=0;a>>>=0;if(b<=2097151)var c=""+(4294967296*b+a);else Ga()?c=""+(BigInt(b)<<BigInt(32)|BigInt(a)):(c=(a>>>24|b<<8)&16777215,b=b>>16&65535,a=(a&16777215)+c*6777216+b*6710656,c+=b*8147497,b*=2,a>=1E7&&(c+=a/1E7>>>0,a%=1E7),c>=1E7&&(b+=c/1E7>>>0,c%=1E7),c=b+Wa(c)+Wa(a));return c}
|
|
9
|
+
function Wa(a){a=String(a);return"0000000".slice(a.length)+a}function Xa(){var a=r,b=u;if(b&2147483648)if(Ga())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{const [c,d]=Ua(a,b);a="-"+Va(c,d)}else a=Va(a,b);return a}function Ua(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};const Ya=typeof BigInt==="function"?BigInt.asIntN:void 0,Za=Number.isSafeInteger,$a=Number.isFinite,ab=Math.trunc;function bb(a){if(a==null||typeof a==="number")return a;if(a==="NaN"||a==="Infinity"||a==="-Infinity")return Number(a)}const cb=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function db(a){switch(typeof a){case "bigint":return!0;case "number":return $a(a);case "string":return cb.test(a);default:return!1}}
|
|
10
|
+
function eb(a){if(a!=null){if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;$a(a)}}function fb(a){if(a!=null)a:{if(!db(a))throw va("int64");switch(typeof a){case "string":a=gb(a);break a;case "bigint":a=q(Ya(64,a));break a;default:a=hb(a)}}return a}function kb(a){const b=a.length;return a[0]==="-"?b<20?!0:b===20&&Number(a.substring(0,7))>-922337:b<19?!0:b===19&&Number(a.substring(0,6))<922337}
|
|
11
|
+
function lb(a){if(kb(a))return a;if(a.length<16)Ta(Number(a));else if(Ga())a=BigInt(a),r=Number(a&BigInt(4294967295))>>>0,u=Number(a>>BigInt(32)&BigInt(4294967295));else{const b=+(a[0]==="-");u=r=0;const c=a.length;for(let d=b,e=(c-b)%6+b;e<=c;d=e,e+=6){const f=Number(a.slice(d,e));u*=1E6;r=r*1E6+f;r>=4294967296&&(u+=Math.trunc(r/4294967296),u>>>=0,r>>>=0)}if(b){const [d,e]=Ua(r,u);r=d;u=e}}return Xa()}
|
|
12
|
+
function hb(a){a=ab(a);if(!Za(a)){Ta(a);var b=r,c=u;if(a=c&2147483648)b=~b+1>>>0,c=~c>>>0,b==0&&(c=c+1>>>0);const d=c*4294967296+(b>>>0);b=Number.isSafeInteger(d)?d:Va(b,c);a=typeof b==="number"?a?-b:b:a?"-"+b:b}return a}function gb(a){var b=ab(Number(a));if(Za(b))return String(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));return lb(a)}function v(a){if(a!=null&&typeof a!=="string")throw Error();return a}
|
|
13
|
+
function mb(a,b,c){if(a!=null&&typeof a==="object"&&a[za]===Ca)return a;if(Array.isArray(a)){var d=a[m]|0;c=d|c&32|c&2;c!==d&&(a[m]=c);return new b(a)}};function nb(a){return a};function x(a,b,c,d,e){d=d?!!(b&32):void 0;const f=[];let g=a.length,l,h,p,A=!1;if(b&64){if(b&256?(g--,l=a[g],h=g):(h=4294967295,l=void 0),!(e||b&512)){A=!0;var t;p=((t=ob)!=null?t:nb)(l?h- -1:b>>16&1023||536870912,-1,a,l);h=p+-1}}else h=4294967295,b&1||(l=g&&a[g-1],l!=null&&typeof l==="object"&&l.constructor===Object?(g--,h=g,p=0):l=void 0);t=void 0;for(let w=0;w<g;w++){let B=a[w];if(B!=null&&(B=c(B,d))!=null)if(w>=h){var I=void 0;((I=t)!=null?I:t={})[w- -1]=B}else f[w]=B}if(l)for(let w in l)if(a=
|
|
14
|
+
l[w],a!=null&&(a=c(a,d))!=null)if(I=+w,I<p)f[I+-1]=a;else{let B;((B=t)!=null?B:t={})[w]=a}t&&(A?f.push(t):f[h]=t);e&&(f[m]=b&67043905|(t!=null?290:34));return f}
|
|
15
|
+
function pb(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return Ra(a)?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Array.isArray(a)){var b=a[m]|0;return a.length===0&&b&1?void 0:x(a,b,pb,!1,!1)}if(a[za]===Ca)return qb(a);if(a instanceof ra){b=a.g;if(b==null)a="";else if(typeof b==="string")a=b;else{let c="",d=0;const 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):
|
|
16
|
+
b);a=a.g=btoa(c)}return a}return}return a}let ob;function qb(a){a=a.j;return x(a,a[m]|0,pb,void 0,!1)};function rb(){if(ya!=null){var a;var b=(a=ua)!=null?a:ua={};a=b[ya]||0;a>=5||(b[ya]=a+1,b=Error(),ta(b,"incident"),ja(b))}};function sb(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){const d=a[m]|0;if(a.length===0&&d&1)return;if(d&2)return a;var c;if(c=b)c=(!!(32&d)||!(1&d))&&!(1&d&&!(16&d));return c?(a[m]|=34,d&4&&Object.freeze(a),a):x(a,d,sb,b!==void 0,!0)}if(a[za]===Ca)return b=a.j,c=b[m]|0,n(a,c)?a:x(b,c,sb,!0,!0);if(a instanceof ra)return a}function tb(a){var b=a.j;const c=b[m]|0;if(!n(a,c))return a;a=new a.constructor(x(b,c,sb,!0,!0));b=a.j;b[m]&=-3;return a}
|
|
17
|
+
function ub(a){if(a.h!==Da)return!1;let b=a.j;b=x(b,b[m]|0,sb,!0,!0);b[m]&=-3;a.j=b;a.h=void 0;return!0}function vb(a){if(!ub(a)&&n(a,a.j[m]|0))throw Error();};const wb=q(0);function y(a,b,c,d){if(b===-1)return null;const e=b+(c?0:-1),f=a.length-1;let g,l;if(!(f<1+(c?0:-1))){if(e>=f)if(g=a[f],g!=null&&typeof g==="object"&&g.constructor===Object)c=g[b],l=!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 l?g[b]=d:a[e]=d,d}return c}}function xb(a,b,c){vb(a);const d=a.j;z(d,d[m]|0,b,c);return a}
|
|
18
|
+
function z(a,b,c,d){const e=c+-1;var f=a.length-1;if(f>=0&&e>=f){const 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[m]|0)>>16&1023||536870912;c>=f?d!=null&&(a[f+-1]={[c]:d},b|=256,a[m]=b):a[e]=d}return b}function yb(a,b,c,d){const e=a.j;var f=e[m]|0;a=C(a,d)===c?c:-1;return zb(e,f,b,a)!==void 0}function Ab(a){return!!(2&a)&&!!(4&a)||!!(1024&a)}function Bb(a){return Ea(a,!0)}
|
|
19
|
+
function D(a,b,c,d){vb(a);const e=a.j;z(e,e[m]|0,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}function C(a,b){a=a.j;return Cb(Db(a),a,void 0,b)}function Db(a){let b;return(b=a[xa])!=null?b:a[xa]=new Map}function Cb(a,b,c,d){let e=a.get(d);if(e!=null)return e;e=0;for(let f=0;f<d.length;f++){const g=d[f];y(b,g)!=null&&(e!==0&&(c=z(b,c,e)),e=g)}a.set(d,e);return e}function zb(a,b,c,d){a=y(a,d,void 0,e=>mb(e,c,b));if(a!=null)return a}
|
|
20
|
+
function Eb(a,b,c){let d=a.j,e=d[m]|0;b=zb(d,e,b,c);if(b==null)return b;e=d[m]|0;if(!n(a,e)){const f=tb(b);f!==b&&(ub(a)&&(d=a.j,e=d[m]|0),b=f,z(d,e,c,b))}return b}function Fb(a){a==null&&(a=void 0);return a}function Gb(a,b,c){c=Fb(c);xb(a,b,c);return a}function E(a,b,c,d){d=Fb(d);a:{vb(a);const g=a.j;var e=g[m]|0;if(d==null){var f=Db(g);if(Cb(f,g,e,c)===b)f.set(c,0);else break a}else{f=g;const l=Db(f),h=Cb(l,f,e,c);h!==b&&(h&&(e=z(f,e,h)),l.set(c,b))}z(g,e,b,d)}return a}
|
|
21
|
+
function Hb(a,b){vb(a);const c=a.j;let d=c[m]|0;if(b==null)return z(c,d,1),a;let e=b[m]|0,f=e;const g=Ab(e),l=g||Object.isFrozen(b);let h=!0,p=!0;for(let t=0;t<b.length;t++){var A=b[t];g||(A=n(A),h&&(h=!A),p&&(p=A))}g||(e=h?13:5,e=p?e|16:e&-17);l&&e===f||(b=[...b],f=0,e=Ib(e,d),e=Jb(e,d,!0));e!==f&&(b[m]=e);z(c,d,1,b);return a}function Ib(a,b){2&a&&(a|=16);a=(2&b?a|2:a&-3)|32;return a&=-1025}function Jb(a,b,c){32&b&&c||(a&=-33);return a}
|
|
22
|
+
function Kb(a){a=y(a.j,1);a=a==null||typeof a==="boolean"?a:typeof a==="number"?!!a:void 0;return a!=null?a:!1}function F(a,b){a=y(a.j,b);a=a==null||typeof a==="string"?a:void 0;return a!=null?a:""}function G(a,b){a=y(a.j,b);a=a==null?a:$a(a)?a|0:void 0;return a!=null?a:0}function H(a,b,c,d){c=C(a,d)===c?c:-1;return Eb(a,b,c)}function J(a,b,c){if(c!=null){if(!$a(c))throw va("enum");c|=0}return D(a,b,c,0)};function Lb(){var a=Mb||(Mb=Nb("[1,2,0]"));a=tb(a);a=xb(a,4,v("dev-748413754"));const b=a.j,c=b[m]|0;return n(a,c)?a:new a.constructor(x(b,c,sb,!0,!0))}
|
|
23
|
+
var K=class{constructor(a){a:{if(a==null){var b=32;a=[]}else{if(!Array.isArray(a))throw Error("narr");b=a[m]|0;16384&b&&!(2&b)&&rb();if(b&1024)throw Error("farr");if(b&64){b&16384||(a[m]=b|16384);var c=a;break a}var d=a;b&=-257;var e=d.length;if(e){var f=e-1;e=d[f];if(e!=null&&typeof e==="object"&&e.constructor===Object){b|=256;const g=b&512?0:-1;f-=g;if(f>=1024)throw Error("pvtlmt");for(c in e){const l=+c;if(l<f)d[l+g]=e[c],delete e[c];else break}b=b&-67043329|(f&1023)<<16}}}a[m]=b|16448;c=a}this.j=
|
|
24
|
+
c}toJSON(){return qb(this)}};K.prototype[za]=Ca;K.prototype.toString=function(){return this.j.toString()};function Ob(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[m]|=32;b=new a(b)}return b}};var Nb=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[m]|=34;return new a(b)}}(class extends K{});var Pb=class extends K{};function Qb(a){var b=new Rb(500);let c=0,d;return(...e)=>{Sb(b)?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;let f;(f=d)==null||f()},Tb(b))))}}function Ub(a){var b=new Rb(100),c=Promise.resolve();return(...d)=>Sb(b)?a(...d):c};function Sb(a){return Vb(a,a.index)>=a.g?(a.h[a.index]=Date.now(),a.index=(a.index+1)%1,!0):!1}function Tb(a){const b=a.g;a=Vb(a,a.index);return a>=b?0:b-a}function Vb(a,b){let c;return Date.now()-((c=a.h[b])!=null?c:-1*a.g)}var Rb=class{constructor(a){this.g=a;this.h=[];this.index=0}};var Wb=class extends K{},Xb=[2,3];var Yb=class extends K{};var L=class extends Error{constructor({errorType:a,message:b,i:c}){super(`Meet add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},M={errorType:"InternalError",message:"An unexpected error has occurred.",i:"No further information is available."},Zb={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)."},
|
|
25
|
+
$b={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",
|
|
26
|
+
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)."},
|
|
27
|
+
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",
|
|
28
|
+
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",
|
|
29
|
+
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."},
|
|
30
|
+
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."},
|
|
31
|
+
lc=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."}),N=(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`,
|
|
32
|
+
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",
|
|
33
|
+
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.",
|
|
34
|
+
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",
|
|
35
|
+
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."},
|
|
36
|
+
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."},Ac={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."};
|
|
37
|
+
function Bc(a){switch(a){case 0:return M;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 Ac;default:return M}}
|
|
38
|
+
function Cc(a){let b;var c=(b=G(a,1))!=null?b:0;a=Dc(C(a,Xb));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}.`,
|
|
39
|
+
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.`,
|
|
40
|
+
i:"No further information is available."}}return c;default:return nc(a)}}function Dc(a){switch(a){case 2:return"co";case 3:return"gd";case 0:return"unknown";default:return"unknown"}}function O({errorType:a,message:b,i:c},d=""){throw new L({errorType:a,message:d?`${b} ${d}`:b,i:c});}function Ec(a,b){O({...Zb,message:`${Zb.message}: ${a}. In URL ${b}`})};function Fc(a){var b=new Gc;return J(b,1,a)}function Hc(a,b){return D(a,2,v(b),"")}function Ic(a,b){return D(a,3,v(b),"")}var Gc=class extends K{getFrameType(){return G(this,1)}};function Jc(a){var b=a.j,c=b;b=b[m]|0;var d=Gc,e=void 0===Fa?2:4,f=n(a,b);const g=f?1:e;e=g===3;var l=!f;(g===2||l)&&ub(a)&&(c=a.j,b=c[m]|0);a=y(c,1);a=Array.isArray(a)?a:Aa;var h=a[m]|0;f=!!(4&h);if(!f){var p=h;p===0&&(p=Ib(p,b),p|=16);h=a;p|=1;var A=b;const t=!!(2&p);t&&(A|=2);let I=!t,w=!0,B=0,ib=0;for(;B<h.length;B++){const jb=mb(h[B],d,A);if(jb instanceof d){if(!t){const mc=n(jb);I&&(I=!mc);w&&(w=mc)}h[ib++]=jb}}ib<B&&(h.length=ib);p|=4;p=w?p|16:p&-17;p=I?p|8:p&-9;h[m]=p;t&&Object.freeze(h);
|
|
41
|
+
h=p}if(l&&!(8&h||!a.length&&(g===1||g===4&&32&h))){Ab(h)&&(a=[...a],h=Ib(h,b),b=z(c,b,1,a));d=a;l=h;for(h=0;h<d.length;h++)p=d[h],A=tb(p),p!==A&&(d[h]=A);l|=8;l=d.length?l&-17:l|16;h=d[m]=l}g===1||g===4&&32&h?Ab(h)||(c=h,b=!!(32&h),h|=!a.length||16&h&&(!f||b)?2:1024,h!==c&&(a[m]=h),Object.freeze(a)):(g===2&&Ab(h)&&(a=[...a],h=Ib(h,b),h=Jb(h,b,e),a[m]=h,b=z(c,b,1,a)),Ab(h)||(c=h,h=Jb(h,b,e),h!==c&&(a[m]=h)));return a}function Kc(a){var b=new Lc;return Hb(b,a)}var Lc=class extends K{};var Mc=class extends K{};function Nc(a){return Eb(a,Lc,1)}var Oc=class extends K{};var Pc=class extends K{};var Qc=class extends K{};var Rc=class extends K{};var Sc=class extends K{getMeetPlatformInfo(){return Eb(this,Qc,1)}};var Tc=class extends K{getMeetingInfo(){return Eb(this,Rc,1)}};var Uc=class extends K{},P=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21];var Vc=class extends K{};var Wc=class extends K{};var Xc=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),Yc=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function Zc(a){a&&typeof a.dispose=="function"&&a.dispose()};function Q(){this.s=this.s;this.g=this.g}Q.prototype.s=!1;Q.prototype.dispose=function(){this.s||(this.s=!0,this.G())};Q.prototype[Symbol.dispose]=function(){this.dispose()};function $c(a,b){a.s?b():(a.g||(a.g=[]),a.g.push(b))}Q.prototype.G=function(){if(this.g)for(;this.g.length;)this.g.shift()()};function ad({I:a,P:b}){if(a===null)throw new L(lc("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!==
|
|
42
|
+
"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(ic);if(Object.keys(a).length===0)throw new L(hc);}}function bd(a){const b=[];b.push(Ic(Hc(Fc(2),a.mainStageUrl),a.additionalData));b.push(Ic(Hc(Fc(1),a.sidePanelUrl),a.additionalData));return b}
|
|
43
|
+
var kd=class extends Q{constructor(a){super();this.context=a;this.h={};cd(this.context.g.T,b=>{switch(C(b.content,P)){case 7:const d=this.h.frameToFrameMessage;b=H(b.content,Pc,7,P);if(d&&b){var c=G(b,1);c=Xc.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:F(b,2)})}}})}async getMeetingInfo(){var a=k(await k(dd(this.context.g)));var b=a.getMeetingInfo();b=F(b,1);a=a.getMeetingInfo();a=F(a,2);return{meetingId:b,meetingCode:a}}async getFrameOpenReason(){let a;const b=
|
|
44
|
+
(a=this.context.h.ba)!=null?a:0;let c;return(c=Yc.get(b))!=null?c:"UNKNOWN"}async getActivityStartingState(){var a=Nc(k(await k(ed(this.context.g))));const b=a==null?void 0:Jc(a).find(c=>c.getFrameType()===2);a=a==null?void 0:Jc(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){ad({I:a,P:!0});var b=bd(a);a=fd;var c=this.context.g;var d=new Vc;
|
|
45
|
+
b=Kc(b);d=Gb(d,1,b);k(await k(a(c,d)))}on(a,b){this.h[a]=b}async getMeetPlatformInfo(){var a=k(await k(gd(this.context.g))).getMeetPlatformInfo();return{isMeetHardware:Kb(a)}}async closeAddon(){k(await k(hd(this.context.g)))}async startActivity(a){ad({I:a,P:!1});const b=new Wc;a&&(a=bd(a),a=Kc(a),Gb(b,1,a));k(await k(id(this.context.g,b)))}async endActivity(a){var b=jd,c=this.context.g,d=new Mc;a=J(d,1,a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0);k(await k(b(c,a)))}};var ld=Ob(class extends K{getFrameOpenReason(){return G(this,5)}});function md(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");if(c)b=ld(atob(c));else{var d;((d=window.top)!=null?d:window)===window?O(cc):Ec("meet_sdk",b);b=void 0}(c=F(b,1))||Ec("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new L(dc);(d=F(b,2))||Ec("meet_control_channel_name",a);const e=F(b,4);e||Ec("addon_cloud_project_number",a);var f;a=(f=b.getFrameOpenReason())!=null?f:0;f=F(b,3)||"https://meet.google.com";return{ba:a,frameType:c,
|
|
46
|
+
aa:d,cloudProjectNumber:e,R:f}};var nd=class extends K{};var od=class extends K{};var pd=class extends K{};function qd(){var a=new rd,b=new pd;return E(a,1,sd,b)}var rd=class extends K{},sd=[1,2];function td(a){var b=new ud;return Gb(b,2,a)}function vd(a,b){return D(a,3,v(b),"")}var ud=class extends K{};var wd=class extends K{};var xd=class extends K{};var yd=class extends K{};var zd=class extends K{};var Ad=class extends K{};var Bd=class extends K{};var Cd=class extends K{setAddonStartingState(a){return Gb(this,1,a)}};var Dd=class extends K{};function Ed(a,b){return E(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 Fd(a){return H(a,Uc,2,Gd)}var Hd=class extends K{},Id=Ob(Hd),Gd=[1,2];class Jd{constructor(a,b){this.data=a;this.channel=b}};var Kd=Promise;function Ld(a){const b=new MessageChannel;Md(b.port1,a);return b}function Nd(a,b){Md(a,b);return new Od(a)}class Od{constructor(a){this.g=a}send(a,b,c=[]){b=Ld(b);this.g.postMessage(a,[b.port2].concat(c))}C(a,b){return new Kd(c=>{this.send(a,c,b)})}}function Md(a,b){b&&(a.onmessage=c=>{var d=c.data;c=Nd(c.ports[0]);b(new Jd(d,c))})};var Pd=typeof AsyncContext!=="undefined"&&typeof AsyncContext.Snapshot==="function"?a=>a&&AsyncContext.Snapshot.wrap(a):a=>a;function Qd(a,b){a.m(b);a.h<100&&(a.h++,b.next=a.g,a.g=b)}class Rd{constructor(a,b){this.l=a;this.m=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.l();return a}};function Sd(){var a=Td;let b=null;a.g&&(b=a.g,a.g=a.g.next,a.g||(a.h=null),b.next=null);return b}class Ud{constructor(){this.h=this.g=null}add(a,b){const c=Vd.get();c.set(a,b);this.h?this.h.next=c:this.g=c;this.h=c}}var Vd=new Rd(()=>new Wd,a=>a.reset());class Wd{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 Xd,Yd=!1,Td=new Ud,$d=(a,b)=>{Xd||Zd();Yd||(Xd(),Yd=!0);Td.add(a,b)},Zd=()=>{const a=Promise.resolve(void 0);Xd=()=>{a.then(ae)}};function ae(){let a;for(;a=Sd();){try{a.h.call(a.g)}catch(b){ja(b)}Qd(Vd,a)}Yd=!1};function be(){};function T(a){this.g=0;this.S=void 0;this.m=this.h=this.l=null;this.u=this.B=!1;if(a!=be)try{const b=this;a.call(void 0,function(c){ce(b,2,c)},function(c){ce(b,3,c)})}catch(b){ce(this,3,b)}}function de(){this.next=this.context=this.h=this.m=this.g=null;this.l=!1}de.prototype.reset=function(){this.context=this.h=this.m=this.g=null;this.l=!1};var ee=new Rd(function(){return new de},function(a){a.reset()});function fe(a,b,c){const d=ee.get();d.m=a;d.h=b;d.context=c;return d}
|
|
47
|
+
function ge(){let a,b;const c=new T(function(d,e){a=d;b=e});return new he(c,a,b)}T.prototype.then=function(a,b,c){return ie(this,Pd(typeof a==="function"?a:null),Pd(typeof b==="function"?b:null),c)};T.prototype.$goog_Thenable=!0;function je(a,b){b=Pd(b);b=fe(b,b);b.l=!0;ke(a,b)}T.prototype.cancel=function(a){if(this.g==0){const b=new U(a);$d(function(){le(this,b)},this)}};
|
|
48
|
+
function le(a,b){if(a.g==0)if(a.l){var c=a.l;if(c.h){var d=0,e=null,f=null;for(let g=c.h;g&&(g.l||(d++,g.g==a&&(e=g),!(e&&d>1)));g=g.next)e||(f=g);e&&(c.g==0&&d==1?le(c,b):(f?(d=f,d.next==c.m&&(c.m=d),d.next=d.next.next):me(c),ne(c,e,3,b)))}a.l=null}else ce(a,3,b)}function ke(a,b){a.h||a.g!=2&&a.g!=3||oe(a);a.m?a.m.next=b:a.h=b;a.m=b}
|
|
49
|
+
function ie(a,b,c,d){const e=fe(null,null,null);e.g=new T(function(f,g){e.m=b?function(l){try{const h=b.call(d,l);f(h)}catch(h){g(h)}}:f;e.h=c?function(l){try{const h=c.call(d,l);h===void 0&&l instanceof U?g(l):f(h)}catch(h){g(h)}}:g});e.g.l=a;ke(a,e);return e.g}T.prototype.la=function(a){this.g=0;ce(this,2,a)};T.prototype.ma=function(a){this.g=0;ce(this,3,a)};
|
|
50
|
+
function ce(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.la,f=a.ma;if(d instanceof T){ke(d,fe(e||be,f||null,a));var g=!0}else{if(d)try{var l=!!d.$goog_Thenable}catch(h){l=!1}else l=!1;if(l)d.then(e,f,a),g=!0;else{l=typeof d;if(l=="object"&&d!=null||l=="function")try{const h=d.then;if(typeof h==="function"){pe(d,h,e,f,a);g=!0;break a}}catch(h){f.call(a,h);g=!0;break a}g=!1}}}g||(a.S=c,a.g=b,a.l=null,oe(a),b!=3||c instanceof U||qe(a,c))}}
|
|
51
|
+
function pe(a,b,c,d,e){function f(h){l||(l=!0,d.call(e,h))}function g(h){l||(l=!0,c.call(e,h))}let l=!1;try{b.call(a,g,f)}catch(h){f(h)}}function oe(a){a.B||(a.B=!0,$d(a.ka,a))}function me(a){let b=null;a.h&&(b=a.h,a.h=b.next,b.next=null);a.h||(a.m=null);return b}T.prototype.ka=function(){let a;for(;a=me(this);)ne(this,a,this.g,this.S);this.B=!1};
|
|
52
|
+
function ne(a,b,c,d){if(c==3&&b.h&&!b.l)for(;a&&a.u;a=a.l)a.u=!1;if(b.g)b.g.l=null,re(b,c,d);else try{b.l?b.m.call(b.context):re(b,c,d)}catch(e){se.call(null,e)}Qd(ee,b)}function re(a,b,c){b==2?a.m.call(a.context,c):a.h&&a.h.call(a.context,c)}function qe(a,b){a.u=!0;$d(function(){a.u&&se.call(null,b)})}var se=ja;function U(a){ia.call(this,a)}ha(U,ia);U.prototype.name="cancel";function he(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let te=1,ue=new WeakMap;function ve(a,b,c){var d=we;a.h.has(b);d(b,c)}var ye=class extends Q{constructor(){super();this.h=new Set}signal(){const a=new xe;this.h.add(a);$c(this,fa(Zc,a));return a}};function we(a,b){return new Promise(c=>{ze(()=>{a.K&&(a.da=b,a.O=!0);for(const {H:d,slot:e}of a.o.values())try{e(b,{signal:a,H:d})}catch(f){ja(f)}for(const d of a.A)d.resolve(b);a.A.clear();c()})})}function cd(a,b,c){const d=te++;ze(()=>{Ae(a,d,b,c)});return d}
|
|
53
|
+
function Ae(a,b,c,d){if(!a.s)if(d){if(!d.s){const e=()=>{ze(()=>{a.o.delete(b);const f=ue.get(d);f&&ka(f,e)})};a.o.set(b,{H:b,slot:c,F:e});Be(d,e)}}else a.o.set(b,{H:b,slot:c,F:()=>a.o.delete(b)})}
|
|
54
|
+
var xe=class extends Q{constructor(){super();this.K=!1;this.o=new Map;this.A=new Set;this.O=!1}detach(a){ze(()=>{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=ge();ze(()=>{if(this.s)c.reject(new U("Signal initially disposed"));else if(b&&b.s)c.reject(new U("Owner initially disposed"));else if(a&&this.K&&this.O)c.resolve(this.da);else if(this.A.add(c),je(c.promise,()=>{this.A.delete(c)}),b){const d=()=>{c.reject(new U("Owner asynchronously disposed"))};
|
|
55
|
+
je(c.promise,()=>{const e=ue.get(b);e&&ka(e,d)});Be(b,d)}});return c.promise}G(){super.G();ze(()=>{for(const {F:a}of this.o.values())a();this.o.clear();for(const a of this.A)a.reject(new U("Signal asynchronously disposed"));this.A.clear()})}};const Ce=[];let De=!1;function ze(a){Ce.push(a);Ee()}async function Ee(){if(!De)try{De=!0;let a=Fe(0);for(;a<Ce.length;)k(await k(Promise.resolve())),a=Fe(a)}catch(a){ja(a)}finally{Ce.length=0,De=!1}}
|
|
56
|
+
function Fe(a){const b=a+100;for(;a<b&&a<Ce.length;)try{Ce[a++]()}catch(c){ja(c)}return a}function Be(a,b){if(a.s)b();else{var c=ue.get(a);if(c)c.push(b);else{const d=[b];ue.set(a,d);$c(a,()=>{for(const e of[...d])e();ue.delete(a)})}}};function V(a){var b=new Hd;a=E(b,1,Gd,a);return{content:JSON.stringify(qb(a))}}const Ge=new ye;function He(a,b){const c=Ge.signal();return{channel:Nd(a,d=>{const e=b(d.data);ve(Ge,c,{content:e,ja:d})}),signal:c}};let Mb;var W=class extends K{};var X=class extends K{};var Je=class extends K{l(){return H(this,W,2,Ie)}g(){return yb(this,W,2,Ie)}m(){return H(this,X,3,Ie)}u(){return yb(this,X,3,Ie)}},Ie=[2,3];var Ke=Ob(class extends K{});var Le=Ob(class extends K{}),Me=[1,2];var Ne=({destination:a,origin:b,qa:c,X:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");const f=Ld(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return Nd(f.port1,e)};function Oe(a,b,c){const d=new ye,e=d.signal();a=Ne({destination:window.parent,origin:b,X:a,onMessage:f=>{const g=Id(f.data.content);C(g,Gd)===2&&ve(d,e,{content:Fd(g),ja:f,messagePort:f.data.messagePort})}});return new Pe(e,a,c)}async function dd(a){var b=Y;var c=new S;var d=new yd;c=E(c,19,R,d);a=k(await k(b(a,V(c))));let e;return(e=Fd(Id(a.data.content)))==null?void 0:H(e,Tc,20,P)}
|
|
57
|
+
async function ed(a){var b=Y;var c=new S;var d=new od;c=E(c,17,R,d);a=k(await k(b(a,V(c))));let e;return(e=Fd(Id(a.data.content)))==null?void 0:H(e,Oc,18,P)}async function fd(a,b){var c=Y,d=new S;b=E(d,8,R,b);k(await k(c(a,V(b))))}async function gd(a){var b=Y;var c=new S;var d=new xd;c=E(c,18,R,d);a=k(await k(b(a,V(c))));let e;return(e=Fd(Id(a.data.content)))==null?void 0:H(e,Sc,19,P)}async function hd(a){var b=Y;var c=new S;var d=new nd;c=E(c,11,R,d);k(await k(b(a,V(c))))}
|
|
58
|
+
async function id(a,b){var c=Y,d=new S;b=E(d,14,R,b);k(await k(c(a,V(b))))}async function jd(a,b){var c=Y,d=new S;b=E(d,15,R,b);k(await k(c(a,V(b))))}async function Qe(a){k(await k(a.h()))}
|
|
59
|
+
async function Y(a,b){(a=k(await k(a.channel.C(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)}`);let c=void 0;try{c=Id(b)}catch(d){O(M,"The ControlMessage can't be deserialized."+` ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=Fd(c))||O(M,"MeetToAddonMessage field on ControlMessage is falsy."+
|
|
60
|
+
` ${JSON.stringify(b)}`);b=b==null?void 0:H(b,Yb,10,P);if((b==null?void 0:G(b,1))!==void 0)throw a=G(b,1),new L(Bc(a));return a}async function Re(a,b,c){var d=Y,e=new S;b=E(e,1,R,b);d=k(await k(d(a,V(b))));a=d.data.messagePort;var f;(d=(f=Fd(Id(d.data.content)))==null?void 0:H(f,Wb,1,P))!=null?f=d:(f=new Wb,f=J(f,1,0));return{channel:a?He(a,c):void 0,response:f}}async function Se(a){const b=qd(),{channel:c,response:d}=k(await k(Re(a,b,e=>Le(e))));if(!c)throw new L(Cc(d));return c}
|
|
61
|
+
async function Te(a){var b=Y;var c=new S;var d=new Dd;c=E(c,5,R,d);k(await k(b(a,V(c))))}async function Ue(a){var b=Y;var c=new S;var d=new wd;c=E(c,6,R,d);k(await k(b(a,V(c))))}async function Ve(a,b,c){var d=Y,e=new S,f=new zd;b=J(f,1,b);c=D(b,2,v(c),"");e=E(e,7,R,c);k(await k(d(a,V(e))))}async function We(a,b){var c=Y,d=new S;b=E(d,16,R,b);k(await k(c(a,V(b))))}
|
|
62
|
+
class Pe extends Q{constructor(a,b,c){super();this.T=a;this.channel=b;this.h=Ub(async()=>{var d=this.channel,e=d.C;var f=new S;var g=new Ad;f=E(f,13,R,g);k(await k(e.call(d,V(f))))});a=Lb();F(a,4);eb(y(a.j,1));eb(y(a.j,2));eb(y(a.j,3));c=Ed(new S,vd(td(a),c));this.channel.send(V(c));cd(this.T,async d=>{switch(C(d.content,P)){case 16:k(await k(Qe(this)))}})}};let Xe;var Ye=class{constructor(a){var b=Xe;this.h=a;this.g=b}delete(){throw Error("Not implemented.");}};var $e=class extends K{l(){return H(this,W,2,Ze)}g(){return yb(this,W,2,Ze)}m(){return H(this,X,3,Ze)}u(){return yb(this,X,3,Ze)}},Ze=[2,3];var af=class extends K{};var bf=class extends K{};var cf=class extends K{};var ef=class extends K{l(){return H(this,W,2,df)}g(){return yb(this,W,2,df)}m(){return H(this,X,3,df)}u(){return yb(this,X,3,df)}},df=[2,3],ff=[5,6];var gf=class extends K{};var hf=class extends K{},jf=[1,2,3];var kf=class extends Error{constructor(){super("Failed to create CoActivity: Connection refused - Meet refused to begin Live Sharing")}};var lf=class{constructor(a){this.config=a}start(){this.g!=null||(this.g=setInterval(()=>{this.config.ga()},this.config.ca));return this}shutdown(){clearInterval(this.g)}};function mf(){const a=new Map,b={set(c,d){a.set(c,d);return b},D:()=>a};return b};function nf(a){if(a.g()){a=a.l();a=y(a.j,1,void 0,Bb);var b=a==null?pa():a;a=Uint8Array;sa(oa);var c=b.g;if(!(c==null||c!=null&&c instanceof Uint8Array))if(typeof c==="string"){c=la.test(c)?c.replace(la,na):c;c=atob(c);const d=new Uint8Array(c.length);for(let e=0;e<c.length;e++)d[e]=c.charCodeAt(e);c=d}else c=null;b=c==null?c:b.g=c;return{bytes:new a(b||0)}}}function of(a,b){b=pf(b);E(a,2,df,b);return a}function qf(a,b){b=pf(b);E(a,2,Ze,b);return a}
|
|
63
|
+
function pf(a){var b=new W;return D(b,1,Ea(a.bytes,!1),pa())}
|
|
64
|
+
function rf(a){if(a.u()){a=a.m();var b,c=F(a,1);if((b=Eb(a,Pb,2))==null)b=void 0;else{b=y(b.j,1);var d=typeof b;b!=null&&(d==="bigint"?b=q(Ya(64,b)):db(b)?d==="string"?(d=ab(Number(b)),Za(d)?b=q(d):(d=b.indexOf("."),d!==-1&&(b=b.substring(0,d)),b=Ga()?q(Ya(64,BigInt(b))):q(lb(b)))):Za(b)?b=q(hb(b)):(b=ab(b),Za(b)?b=String(b):(d=String(b),kb(d)?b=d:(Ta(b),b=Xa())),b=q(b)):b=void 0);b=b!=null?b:wb}b=b!=null?Ra(b)?Number(b):String(b):void 0;b=b!=null?b:0;let e;d=(e=y(a.j,4,void 0,bb))!=null?e:0;return{mediaId:c,
|
|
65
|
+
mediaPlayoutPosition:b,mediaPlayoutRate:d,playbackState:sf.get(G(a,3))}}}function tf(a,b){b=uf(b);E(a,3,df,b);return a}function vf(a,b){b=uf(b);E(a,3,Ze,b);return a}const sf=mf().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED").D(),wf=mf().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4).D();
|
|
66
|
+
function uf(a){var b=new X;b=D(b,1,v(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=D(b,4,c,0);c=new Pb;c=D(c,1,fb(a.mediaPlayoutPosition),"0");b=Gb(b,2,c);a=wf.get(a.playbackState);return J(b,3,a)}function xf({activityTitle:a}){var b=new cf;return xb(b,4,v(a))}function yf(a,b){var c=new bf;b=J(c,1,b.v);E(a,6,ff,b);return a}function zf(a){var b=new af;E(a,5,ff,b);return a};const Af=mf().set("co-doing",1).set("co-watching",2).D();async function Bf(a,b,c){var d=b.C,e=new hf;var f=new gf;f=D(f,1,v(a.activityTitle),"");var g=Af.get(a.J);f=J(f,2,g);e=E(e,3,jf,f);d=k(await k(d.call(b,e,Ke)));let l;if((l=Kb(d))!=null&&l)return new Cf(a,b,c,Eb(d,Je,2));throw new kf;}
|
|
67
|
+
function Df(a,b){const c=a.config.M(b);if(c&&!a.config.L(a.g,c)){a.g=c;let d;b=y(b.j,1);b!=null&&(typeof b==="bigint"?Ra(b)?b=Number(b):(b=Ya(64,b),b=Ra(b)?Number(b):String(b)):b=db(b)?typeof b==="number"?hb(b):gb(b):void 0);b=(d=b)!=null?d:0;a.l=b;a.u(a.g)}}function Z(a,b){const {state:c,ea:d,context:e}=b(a.g);a.g=c;a.notify(a.g,e,d)}
|
|
68
|
+
class Cf{constructor(a,b,c,d){this.m=a;this.h=b;this.config=c;this.u=Qb(e=>void this.m.N(e));Ef(this.h,e=>{const f=C(e,Me);switch(f){case 1:Df(this,H(e,Je,1,Me));break;case 2:case 0:console.warn(`IllegalMessage: ${f} - ${"Unhandled message"} - ${"Please raise a bug with the MeetJS team"}`)}});this.B=(new lf({ca:1E3,ga:()=>{var e,f,g=(f=(e=this.m).ia)==null?void 0:f.call(e);if(this.g!==null){this.g={...this.g,...g};e=new hf;f=this.config;g=f.V;var l=new $e;l=D(l,1,fb(this.l),"0");f=g.call(f,l,this.g);
|
|
69
|
+
e=E(e,1,jf,f);this.h.send(e)}}})).start();this.g=null;this.l=0;d&&Df(this,d)}disconnect(){this.h.shutdown();this.B.shutdown()}notify(a,b,c){var d=c?xf(c):void 0;c=this.config;var e=c.W;var f=new ef;f=D(f,1,fb(this.l),"0");d=Gb(f,4,d);a=e.call(c,d,a);a=this.config.U(a,b);b=this.h;c=b.send;e=new hf;a=E(e,2,jf,a);c.call(b,a)}};var Ff=class{constructor(a){this.g=a}broadcastStateUpdate(a){Z(this.g,()=>({state:a,context:{}}))}disconnect(){this.g.disconnect()}};function Gf(a,b){return a==null||b==null?!1:a.bytes.length===b.bytes.length&&a.bytes.every((c,d)=>c===b.bytes[d])};var Hf=class{constructor(a){this.g=a}notifySwitchedToMedia(a,b,c){Z(this.g,()=>({state:{mediaId:b,mediaPlayoutRate:1,mediaPlayoutPosition:c,playbackState:"PLAY"},ea:{activityTitle:a},context:{v:1}}))}notifyPauseState(a,b){Z(this.g,c=>{if(c==null)throw Error("Invalid before coWatchingState");return{state:{...c,playbackState:a?"PAUSE":"PLAY",mediaPlayoutPosition:b},context:{v:3}}})}notifySeekToTimestamp(a){Z(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},
|
|
70
70
|
context:{v:2}}})}notifyPlayoutRate(a){Z(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutRate:a},context:{v:4}}})}notifyBuffering(a){Z(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a,playbackState:"BUFFERING"},context:{v:3}}})}notifyReady(a){Z(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},context:{v:3}}})}disconnect(){this.g.disconnect()}};
|
|
71
|
-
function
|
|
72
|
-
async function
|
|
73
|
-
+!!a.additionalData)throw new L(
|
|
74
|
-
a)}async createRoomsStandaloneClient(){var a=this.g;if(a.h.frameType!==2)throw new L(
|
|
75
|
-
return
|
|
71
|
+
function If(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 Ef(a,b){const c=cd(a.signal,d=>{b(d)});a.o.push(c)}var Jf=class{constructor(a,b){this.channel=a;this.signal=b;this.o=[]}send(a){this.channel.send(JSON.stringify(qb(a)))}async C(a,b){a=k(await k(this.channel.C(JSON.stringify(qb(a)))));return b(a.data)}shutdown(){this.o.forEach(a=>{this.signal.detach(a)})}};function Kf(a,b){var c=Lf;const d=a.signal(),e=a.signal();cd(b,f=>{const g=c(f)?d:e;ve(a,g,f)},a);return{ha:d,fa:e}}function Mf(a,b,c,d=e=>e){cd(c,e=>{ve(a,b,d(e))},a)};async function Nf(a,b){if(b)return a=k(await k(Bf({activityTitle:b.activityTitle,J:"co-watching",ia:()=>b.onCoWatchingStateQuery(),N:c=>{b.onCoWatchingStateChanged(c)}},a,{W:tf,V:vf,U:yf,M:rf,L:If}))),new Hf(a)}async function Of(a,b){if(b)return a=k(await k(Bf({activityTitle:b.activityTitle,J:"co-doing",N:c=>{b.onCoDoingStateChanged(c)}},a,{W:of,V:qf,U:zf,M:nf,L:Gf}))),new Ff(a)}
|
|
72
|
+
async function Pf(a){const b=new ye,c=b.signal();a=k(await a);Mf(b,c,a.signal,f=>f.content);const {ha:d,fa:e}=Kf(b,c);return{Y:new Jf(a.channel,d),Z:new Jf(a.channel,e)}}function Lf(a){a:switch(C(a,Me)){case 1:a=H(a,Je,1,Me);break a;default:throw Error("CA Message arrived with no known content message set");}return a.g()};async function Qf(a,b){({Y:a}=k(await k(Pf(Se(a.g)))));b=k(await k(Of(a,b)));if(!b)throw Error("Failed to create co-doing session");return b}async function Rf(a,b){({Z:a}=k(await k(Pf(Se(a.g)))));b=k(await k(Nf(a,b)));if(!b)throw Error("Failed to create co-watching session");return b};var Sf=class extends kd{async notifySidePanel(a){k(await k(Ve(this.context.g,1,a)))}async unloadSidePanel(){k(await k(Te(this.context.g)))}async loadSidePanel(){k(await k(Ue(this.context.g)))}};var Tf=class extends kd{async setAddonStartingState(a){if(a===null)throw new L(lc("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(kc);if(Object.keys(a).length===0)throw new L(jc);var b=[];b.push(Ic(Hc(Fc(1),a.sidePanelUrl),a.additionalData));a=this.context.g;var c=new Cd,d=c.setAddonStartingState,e=new Bd;b=Hb(e,b);k(await k(We(a,d.call(c,b))))}};var Uf=class extends kd{async notifyMainStage(a){k(await k(Ve(this.context.g,2,a)))}};var Vf=class{constructor(a){a=a.cloudProjectNumber;const b=md();if(b.cloudProjectNumber!==a)throw new L(ec);const c=b.R,d=b.aa;let e;Xe=(e=Xe)!=null?e:Oe(d,c,a);this.g=new Ye(b)}async createMainStageClient(){var a=this.g;if(a.h.frameType!==2)throw new L($b);return await Promise.resolve(new Sf(a))}async createSidePanelClient(){var a=this.g;if(a.h.frameType!==1)throw new L(ac);return await Promise.resolve(new Uf(a))}async createCoWatchingClient(a){return await Rf(this.g,a)}async createCoDoingClient(a){return await Qf(this.g,
|
|
74
|
+
a)}async createRoomsStandaloneClient(){var a=this.g;if(a.h.frameType!==2)throw new L($b);return await Promise.resolve(new Tf(a))}};let Wf=null;for(var Xf={addon:{getFrameType:function(){a:{var a=md().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(lc("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(Wf&&md().R!=="integration.test.google.com")throw new L(vc);
|
|
75
|
+
return Wf=new Vf(a)}}},Yf=["meet"],Zf=ea,$f;Yf.length&&($f=Yf.shift());)Yf.length||Xf===void 0?Zf[$f]&&Zf[$f]!==Object.prototype[$f]?Zf=Zf[$f]:Zf=Zf[$f]={}:Zf[$f]=Xf;}).apply(topLevel);export const meet = topLevel.meet;
|
|
@@ -3,19 +3,19 @@ const topLevel = typeof global !== 'undefined' ? global : typeof self !== 'undef
|
|
|
3
3
|
Copyright The Closure Library Authors.
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
j:u};let
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
function
|
|
12
|
-
d=d&-67043329|(f&1023)<<16;break a}}if(b){
|
|
13
|
-
function
|
|
14
|
-
function
|
|
15
|
-
"function"&&(d=d(),
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
c);else{for(b=0;b<9;b++)a.g.push(c&127|128),c>>=7;a.g.push(1)}},
|
|
19
|
-
Object.isFrozen(d);var
|
|
20
|
-
e=["+/=","+/","-_=","-_.","-_"],d=0;d<5;d++)for(b=c.concat(e[d].split("")),
|
|
21
|
-
(q=p.navigator.mediaDevices)==null||q.setCaptureHandleConfig(a))}},
|
|
6
|
+
var m=this||self;function aa(a){return a};var u=class extends Error{constructor(a,b){super(`Meet Addon Screenshare Info error: ${`${a}${b?` - ${b}`:""}`}`)}};function v(a){throw new a.j(a.message,a.o);}
|
|
7
|
+
var ba={message:"cloudProjectNumber was not defined.",o:"Ensure that cloudProjectNumber is provided in the call to exposeToMeetWhenScreensharing.",j:u},ca={message:"additionalData was defined, but startActivityOnOpen was not true.",o:"Ensure that startActivityOnOpen is set to true if additionalData is provided in the call to exposeToMeetWhenScreensharing.",j:u},da={message:"Received an incorrect value for startActivityOnOpen.",o:"Ensure that startActivityOnOpen is set to true if a mainStageUrl is provided in the call to exposeToMeetWhenScreensharing.",
|
|
8
|
+
j:u};let ea;function fa(a){m.setTimeout(()=>{throw a;},0)};var ha={},w=null;function ia(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let ja=void 0;function x(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var y=x(),z=x("m_m",!0);const A=x("jas",!0);var B;const ka=[];ka[A]=55;B=Object.freeze(ka);var C={};function D(a,b){return b===void 0?a.g!==E&&!!(2&(a.i[A]|0)):!!(2&b)&&a.g!==E}const E={};function la(a,b,c){const e=b&512?0:-1,d=a.length;if(b&64)b&=256;else if(b=!!d)b=a[d-1],b=b!=null&&typeof b==="object"&&b.constructor===Object;const g=d+(b?-1:0);for(let f=0;f<g;f++)c(f-e,a[f]);if(b){a=a[d-1];for(const f in a)!isNaN(f)&&c(+f,a[f])}}var ma={};var F=typeof m.BigInt==="function"&&typeof m.BigInt(0)==="bigint";const na=Number.MIN_SAFE_INTEGER.toString(),oa=F?BigInt(Number.MIN_SAFE_INTEGER):void 0,pa=Number.MAX_SAFE_INTEGER.toString(),qa=F?BigInt(Number.MAX_SAFE_INTEGER):void 0;function ra(a,b){if(a.length>b.length)return!1;if(a.length<b.length||a===b)return!0;for(let c=0;c<a.length;c++){const e=a[c],d=b[c];if(e>d)return!1;if(e<d)return!0}};const sa=Number.isFinite;function ta(a){if(a==null)return a;if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;return sa(a)?a|0:void 0}function G(a){if(a!=null&&typeof a!=="string")throw Error();return a};function ua(a){return a};function H(a,b,c,e,d){e=e?!!(b&32):void 0;const g=[];let f=a.length,h,k,n,l=!1;if(b&64){if(b&256?(f--,h=a[f],k=f):(k=4294967295,h=void 0),!(d||b&512)){l=!0;var q;n=((q=va)!=null?q:ua)(h?k- -1:b>>16&1023||536870912,-1,a,h);k=n+-1}}else k=4294967295,b&1||(h=f&&a[f-1],h!=null&&typeof h==="object"&&h.constructor===Object?(f--,k=f,n=0):h=void 0);q=void 0;for(let r=0;r<f;r++){let t=a[r];if(t!=null&&(t=c(t,e))!=null)if(r>=k){var p=void 0;((p=q)!=null?p:q={})[r- -1]=t}else g[r]=t}if(h)for(let r in h)if(a=
|
|
9
|
+
h[r],a!=null&&(a=c(a,e))!=null)if(p=+r,p<n)g[p+-1]=a;else{let t;((t=q)!=null?t:q={})[r]=a}q&&(l?g.push(q):g[k]=q);d&&(g[A]=b&67043905|(q!=null?290:34));return g}function wa(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return(F?a>=oa&&a<=qa:a[0]==="-"?ra(a,na):ra(a,pa))?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Array.isArray(a)){const b=a[A]|0;return a.length===0&&b&1?void 0:H(a,b,wa,!1,!1)}if(a[z]===C)return xa(a);return}return a}let va;
|
|
10
|
+
function xa(a){a=a.i;return H(a,a[A]|0,wa,void 0,!1)};let I,ya;function za(a){switch(typeof a){case "boolean":return I||(I=[0,void 0,!0]);case "number":return a>0?void 0:a===0?ya||(ya=[0,void 0]):[-a,void 0];case "string":return[0,a];case "object":return a}}function Aa(a,b,c){a=Ba(a,b[0],b[1],c?1:2);b!==I&&c&&(a[A]|=8192);return a}
|
|
11
|
+
function Ba(a,b,c,e){if(a==null){var d=32;c?(a=[c],d|=512):a=[];b&&(d=d&-67043329|(b&1023)<<16)}else{if(!Array.isArray(a))throw Error("narr");d=a[A]|0;16384&d&&!(2&d)&&Ca();if(d&1024)throw Error("farr");if(d&64)return e!==3||d&16384||(a[A]=d|16384),a;if(c&&(d|=512,c!==a[0]))throw Error("mid");a:{c=a;d&=-257;var g=c.length;if(g){var f=g-1;const k=c[f];if(k!=null&&typeof k==="object"&&k.constructor===Object){d|=256;b=d&512?0:-1;f-=b;if(f>=1024)throw Error("pvtlmt");for(var h in k)if(g=+h,g<f)c[g+b]=
|
|
12
|
+
k[h],delete k[h];else break;d=d&-67043329|(f&1023)<<16;break a}}if(b){h=Math.max(b,g-(d&512?0:-1));if(h>1024)throw Error("spvt");d=d&-67043329|(h&1023)<<16}}}d|=64;e===3&&(d|=16384);a[A]=d;return a}function Ca(){if(y!=null){var a;var b=(a=ja)!=null?a:ja={};a=b[y]||0;a>=5||(b[y]=a+1,b=Error(),ia(b,"incident"),fa(b))}};function J(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){const e=a[A]|0;if(a.length===0&&e&1)return;if(e&2)return a;var c;if(c=b)c=(!!(32&e)||!(1&e))&&!(1&e&&!(16&e));return c?(a[A]|=34,e&4&&Object.freeze(a),a):H(a,e,J,b!==void 0,!0)}if(a[z]===C)return b=a.i,c=b[A]|0,D(a,c)?a:H(b,c,J,!0,!0)}function K(a){if(a.g!==E)var b=!1;else b=a.i,b=H(b,b[A]|0,J,!0,!0),b[A]&=-3,a.i=b,a.g=void 0,b=!0;if(!b&&D(a,a.i[A]|0))throw Error();};function L(a,b,c){K(a);const e=a.i;M(e,e[A]|0,b,c);return a}function M(a,b,c,e,d){const g=c+(d?0:-1);var f=a.length-1;if(f>=1+(d?0:-1)&&g>=f){const h=a[f];if(h!=null&&typeof h==="object"&&h.constructor===Object)return h[c]=e,b}if(g<=f)return a[g]=e,b;if(e!==void 0){let h;f=((h=b)!=null?h:b=a[A]|0)>>16&1023||536870912;c>=f?e!=null&&(a[f+(d?0:-1)]={[c]:e},b|=256,a[A]=b):a[g]=e}return b}function N(a,b,c,e){K(a);const d=a.i;M(d,d[A]|0,b,(e==="0"?Number(c)===0:c===e)?void 0:c);return a}
|
|
13
|
+
function O(a,b){2&a&&(a|=16);a=(2&b?a|2:a&-3)|32;return a&=-1025}function Da(a,b){32&b||(a&=-33);return a};var P=class{constructor(a){this.i=Ba(a,void 0,void 0,3)}toJSON(){var a=xa(this);return a}};P.prototype[z]=C;P.prototype.toString=function(){return this.i.toString()};function Q(a,b){for(;b>127;)a.g.push(b&127|128),b>>>=7;a.g.push(b)}var Ea=class{constructor(){this.g=[]}length(){return this.g.length}end(){const a=this.g;this.g=[];return a}};function R(a,b){b.length!==0&&(a.l.push(b),a.h+=b.length)}function Fa(a,b){Q(a.g,b*8+2);b=a.g.end();R(a,b);b.push(a.h);return b}function Ga(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 Ha=class{constructor(){this.l=[];this.h=0;this.g=new Ea}};function S(){const a=class{constructor(){throw Error();}};Object.setPrototypeOf(a,a.prototype);return a}var T=S(),Ia=S();var U=class{constructor(a,b){this.g=a;a=aa(T);this.h=!!a&&b===a||!1}};function Ja(a,b,c,e,d){b=Ka(b,e);b!=null&&(c=Fa(a,c),d(b,a),Ga(a,c))}const La=new U(Ja,T),Ma=new U(Ja,T);var Na=Symbol(),Oa=Symbol();let Pa,V;
|
|
14
|
+
function W(a){var b=Qa,c=Ra,e=a[Na];if(e)return e;e={};e.A=a;e.m=za(a[0]);var d=a[1];let g=1;d&&d.constructor===Object&&(e.s=d,d=a[++g],typeof d==="function"&&(e.u=!0,Pa!=null||(Pa=d),V!=null||(V=a[g+1]),d=a[g+=2]));const f={};for(;d&&Array.isArray(d)&&d.length&&typeof d[0]==="number"&&d[0]>0;){for(var h=0;h<d.length;h++)f[d[h]]=d;d=a[++g]}for(h=1;d!==void 0;){typeof d==="number"&&(h+=d,d=a[++g]);let l;var k=void 0;d instanceof U?l=d:(l=La,g--);let q;if((q=l)==null?0:q.h){d=a[++g];k=a;var n=g;typeof d===
|
|
15
|
+
"function"&&(d=d(),k[n]=d);k=d}d=a[++g];n=h+1;typeof d==="number"&&d<0&&(n-=d,d=a[++g]);for(;h<n;h++){const p=f[h];k?c(e,h,l,k,p):b(e,h,l,p)}}return a[Na]=e}function Ka(a,b){if(a instanceof P)return a.i;if(Array.isArray(a))return Aa(a,b,!1)};function Qa(a,b,c){a[b]=c.g}function Ra(a,b,c,e){let d,g;const f=c.g;a[b]=(h,k,n)=>f(h,k,n,g||(g=W(e).m),d||(d=Sa(e)))}function Sa(a){let b=a[Oa];if(!b){const c=W(a);b=(e,d)=>Ta(e,d,c);a[Oa]=b}return b}function Ta(a,b,c){la(a,a[A]|0|(c.m[1]?512:0),(e,d)=>{if(d!=null){var g=Ua(c,e);g&&g(b,d,e)}})}
|
|
16
|
+
function Ua(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 U?c:[Ma,c]:[c,void 0];var e=c[0].g;if(c=c[1]){const d=Sa(c),g=W(c).m;c=a.u?V(g,d):(f,h,k)=>e(f,h,k,g,d)}else c=e;return a[b]=c}};function Va(a,b,c){b=b==null||typeof b==="string"?b:void 0;b!=null&&(b=(ea||(ea=new TextEncoder)).encode(b),Q(a.g,c*8+2),Q(a.g,b.length),R(a,a.g.end()),R(a,b))};function Wa(a){var b=new Xa;if(a!=null){if(!sa(a))throw b=Error("enum"),ia(b,"warning"),b;a|=0}return N(b,1,a,0)}var Xa=class extends P{};var Ya=class extends P{};var Za=class extends P{};Za.prototype.h=function(a){return function(){const b=new Ha;Ta(this.i,b,W(a));R(b,b.g.end());const c=new Uint8Array(b.h),e=b.l,d=e.length;let g=0;for(let f=0;f<d;f++){const h=e[f];c.set(h,g);g+=h.length}b.l=[c];return c}}([0,new U(Va,Ia),-1,[0,function(a,b,c=T){return new U(b,c)}(function(a,b,c,e,d){if(a.g()!==2)return!1;var g=a.h;e=Aa(void 0,e,!0);var f=b[A]|0;if(f&2)throw Error();const h=f&512?ma:void 0;if(c===-1)var k=null;else{k=c+(h?0:-1);var n=b.length-1;if(n<1+(h?0:-1))k=void 0;else if(k>=
|
|
17
|
+
n){var l=b[n];l!=null&&typeof l==="object"&&l.constructor===Object?k=l[c]:k===n?k=l:k=void 0}else k=b[k]}k=Array.isArray(k)?k:B;n=k!==B;if(64&f||!(8192&f)||!n){l=n=k===B?55:k[A]|0;if(2&l||2&l&&4&l||1024&l||4&l&&!(32&l))k=[...k],n=0,l=O(l,f),f=M(b,f,c,k,h);b=l;b===0&&(b=O(b,f),b|=16);l=Da((b|1)&-13,f);l!==n&&(k[A]=l)}k.push(e);g.call(a,e,d);return!0},function(a,b,c,e,d){if(Array.isArray(b))for(let n=0;n<b.length;n++){var g=a,f=c,h=d,k=Ka(b[n],e);k!=null&&(f=Fa(g,f),h(k,g),Ga(g,f))}}),[0,new U(function(a,
|
|
18
|
+
b,c){b=ta(b);if(b!=null)if(b=parseInt(b,10),Q(a.g,c*8),a=a.g,c=b,c>=0)Q(a,c);else{for(b=0;b<9;b++)a.g.push(c&127|128),c>>=7;a.g.push(1)}},S()),new U(Va,Ia),-1]],new U(function(a,b,c){b=b==null||typeof b==="boolean"?b:typeof b==="number"?!!b:void 0;b!=null&&(Q(a.g,c*8),a.g.g.push(b?1:0))},S())]);function $a(){let a,b;const c=(b=(a=(new URL(ab||window.location.href)).searchParams.get("meet_capture_handle_origins"))==null?void 0:a.split(",").filter(e=>{try{return(new URL(e)).origin.endsWith(".google.com")}catch(d){return!1}}))!=null?b:[];return c.length===0?bb:c}let ab="";const bb=["https://meet.google.com"];for(var cb={exposeToMeetWhenScreensharing:function(a){var b=a.v,c=a.cloudProjectNumber,e=a.additionalData,d=a.mainStageUrl,g=a.sidePanelUrl;a=a.startActivityOnOpen;c||v(ba);var f=new Za;c=L(f,2,G(c));b&&L(c,1,G(b));b=[];e&&!a&&v(ca);d&&!a&&v(da);if(g){f=b.push;var h=Wa(1);g=N(h,2,G(g),"");g=N(g,3,G(e),"");f.call(b,g)}d&&(g=b.push,f=Wa(2),d=N(f,2,G(d),""),e=N(d,3,G(e),""),g.call(b,e));{e=new Ya;d=b;K(e);const r=e.i;let t=r[A]|0;if(d==null)M(r,t,1);else{g=b=d[A]|0;h=(f=!!(2&b)&&!!(4&b)||!!(1024&b))||
|
|
19
|
+
Object.isFrozen(d);var k=!0,n=!0;for(let Z=0;Z<d.length;Z++){var l=d[Z];f||(l=D(l),k&&(k=!l),n&&(n=l))}f||(b=k?13:5,b=n?b|16:b&-17);h&&b===g||(d=[...d],g=0,b=O(b,t),b=Da(b,t));b!==g&&(d[A]=b);M(r,t,1,d)}}e==null&&(e=void 0);L(c,3,e);if(a!=null&&typeof a!=="boolean"){var q=typeof a;throw Error(`Expected boolean but got ${q!="object"?q:a?Array.isArray(a)?"array":q:"null"}: ${a}`);}L(c,4,a);a=c.h();var p;p===void 0&&(p=0);if(!w)for(w={},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),
|
|
20
|
+
e=["+/=","+/","-_=","-_.","-_"],d=0;d<5;d++)for(b=c.concat(e[d].split("")),ha[d]=b,g=0;g<b.length;g++)f=b[g],w[f]===void 0&&(w[f]=g);p=ha[p];c=Array(Math.floor(a.length/3));e=p[64]||"";for(d=b=0;b<a.length-2;b+=3)h=a[b],k=a[b+1],f=a[b+2],g=p[h>>2],h=p[(h&3)<<4|k>>4],k=p[(k&15)<<2|f>>6],f=p[f&63],c[d++]=g+h+k+f;g=0;f=e;switch(a.length-b){case 2:g=a[b+1],f=p[(g&15)<<2]||e;case 1:a=a[b],c[d]=p[a>>2]+p[(a&3)<<4|g>>4]+f+e}a=c.join("");p=window;p.top===p.self&&(a={handle:a,permittedOrigins:$a(),exposeOrigin:!0},
|
|
21
|
+
(q=p.navigator.mediaDevices)==null||q.setCaptureHandleConfig(a))}},db=["meet","addon","screensharing"],X=m,Y;db.length&&(Y=db.shift());)db.length||cb===void 0?X[Y]&&X[Y]!==Object.prototype[Y]?X=X[Y]:X=X[Y]={}:X[Y]=cb;}).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-748413754",
|
|
5
5
|
"repository": "googleworkspace/meet",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"homepage": "https://developers.google.com/meet/add-ons/guides/overview",
|