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