'use strict';var dI=function(){this.f=new zi;this.a=2;this.b=4294967295;this.a=Math.max(this.a,2);this.b=Math.min(this.b,4294967295);this.a>this.b&&(this.a=2,this.b=4294967295)},eI=function(a){for(var b=a.b-a.a+1,c=Math.floor(a.a+b*Math.random()),d=0;a.f.contains(c);)if(c<a.b?++c:c=a.a,++d>=b)return null;a.f.add(c);return c};new C({neon:1,sse2:2,ssse3:4,sse4_1:8,sse4_2:16,avx:32});var fI=function(){};var gI=function(){};r(gI,fI);gI.prototype.fa=function(){var a=0;ji(this.Na(!0),function(){a++});return a};gI.prototype.clear=function(){var a=li(this.Na(!0)),b=this;t(a,function(a){b.remove(a)})};var hI=function(a){this.a=a};r(hI,gI);h=hI.prototype;h.isAvailable=function(){if(!this.a)return!1;try{return this.a.setItem("__sak","1"),this.a.removeItem("__sak"),!0}catch(a){return!1}};h.set=function(a,b){try{this.a.setItem(a,b)}catch(c){if(0==this.a.length)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded";}};h.get=function(a){a=this.a.getItem(a);if(!va(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a};h.remove=function(a){this.a.removeItem(a)};
h.fa=function(){return this.a.length};h.Na=function(a){var b=0,c=this.a,d=new hi;d.next=function(){if(b>=c.length)throw gi;var d=c.key(b++);if(a)return d;d=c.getItem(d);if(!va(d))throw"Storage mechanism: Invalid value was encountered";return d};return d};h.clear=function(){this.a.clear()};h.key=function(a){return this.a.key(a)};var iI=function(){var a=null;try{a=window.localStorage||null}catch(b){}this.a=a};r(iI,hI);var jI=new C("wduck","googDucking","audio_echo_cancellation","googEchoCancellation","audio_echo_cancellation_delay_correction","googEchoCancellation2","audio_auto_gain_control","googAutoGainControl","internal_audio_auto_gain_control","googAutoGainControl2","audio_noise_suppression","googNoiseSuppression","audio_highpass_filter","googHighpassFilter","audio_stereo_swapping","googAudioMirroring","audio_transient_suppression","googNoiseSuppression2");new zi(jI.La());var kI=new C("vnr","googNoiseReduction");
new zi(["vnr"]);new zi(kI.La());var lI=function(){kd.call(this)};r(lI,kd);lI.prototype.j=Xi("fava.debug.ErrorReporter");lI.prototype.init=function(){};new lI;Xi("fava.debug.errorContext");var mI=function(a,b){kd.call(this);this.g=b;this.a=[];if(a>this.g)throw Error("[goog.structs.SimplePool] Initial cannot be greater than max");for(b=0;b<a;b++)this.a.push(this.b())};r(mI,kd);var nI=function(a,b){a.a.length<a.g?a.a.push(b):a.f(b)};mI.prototype.b=function(){return{}};mI.prototype.f=function(a){if(ya(a))if(xa(a.Ba))a.Ba();else for(var b in a)delete a[b]};mI.prototype.X=function(){mI.W.X.call(this);for(var a=this.a;a.length;)this.f(a.pop());delete this.a};var qI=function(){this.a=[];this.g=new C;this.o=this.u=this.A=this.m=0;this.b=new C;this.l=this.v=0;this.B=1;this.h=new mI(0,4E3);this.h.b=function(){return new oI};this.w=new mI(0,50);this.w.b=function(){return new pI};var a=this;this.f=new mI(0,2E3);this.f.b=function(){return String(a.B++)};this.f.f=function(){}};qI.prototype.j=Xi("goog.debug.Trace");var pI=function(){this.Kf=this.time=this.count=0};
pI.prototype.toString=function(){var a=[];a.push(this.type," ",this.count," (",Math.round(10*this.time)/10," ms)");this.Kf&&a.push(" [VarAlloc = ",this.Kf,"]");return a.join("")};var oI=function(){},tI=function(a,b,c,d){var e=[];-1==c?e.push("    "):e.push(rI(a.eventTime-c));e.push(" ",sI(a.eventTime-b));0==a.eventType?e.push(" Start        "):1==a.eventType?(e.push(" Done "),e.push(rI(a.b-a.startTime)," ms ")):e.push(" Comment      ");e.push(d,a);0<a.a&&e.push("[VarAlloc ",a.a,"] ");return e.join("")};
oI.prototype.toString=function(){return null==this.type?this.comment:"["+this.type+"] "+this.comment};qI.prototype.reset=function(){for(var a=0;a<this.a.length;a++){var b=this.a[a];b.id&&nI(this.f,b.id);nI(this.h,b)}this.a.length=0;this.g.clear();this.m=Fa();this.l=this.v=this.o=this.u=this.A=0;a=this.b.La();for(b=0;b<a.length;b++){var c=this.b.get(a[b]);c.count=0;c.time=0;c.Kf=0;nI(this.w,c)}this.b.clear()};
qI.prototype.toString=function(){for(var a=[],b=-1,c=[],d=0;d<this.a.length;d++){var e=this.a[d];1==e.eventType&&c.pop();a.push(" ",tI(e,this.m,b,c.join("")));b=e.eventTime;a.push("\n");0==e.eventType&&c.push("|  ")}if(0!=this.g.fa()){var f=Fa();a.push(" Unstopped timers:\n");ji(this.g,function(b){a.push("  ",b," (",f-b.startTime," ms, started at ",sI(b.startTime),")\n")})}b=this.b.La();for(d=0;d<b.length;d++)c=this.b.get(b[d]),1<c.count&&a.push(" TOTAL ",c,"\n");a.push("Total tracers created ",this.v,
"\n","Total comments created ",this.l,"\n","Overhead start: ",this.A," ms\n","Overhead end: ",this.u," ms\n","Overhead comment: ",this.o," ms\n");return a.join("")};var rI=function(a){a=Math.round(a);var b="";1E3>a&&(b=" ");100>a&&(b="  ");10>a&&(b="   ");return b+a},sI=function(a){a=Math.round(a);return String(100+a/1E3%60).substring(1,3)+"."+String(1E3+a%1E3).substring(1,4)};new qI;Xi("goog.debug.ErrorReporter");var uI=function(){this.a=Fa()};new uI;uI.prototype.set=function(a){this.a=a};uI.prototype.reset=function(){this.set(Fa())};uI.prototype.get=function(){return this.a};Xi("fava.debug.DebugService");var vI="https://clients2.google.com/cr/report",wI=function(a,b,c,d){var e=new FormData;e.append("prod",pc?"Google_Talk_Plugin_Mac":qc?"Google_Talk_Plugin":"Google_Talk_Plugin_Linux");e.append("ver","10.0.0.0-calls");e.append("email",b);e.append("type","log");e.append("log",new Blob([a]),d);if(a=c)try{a=!!navigator.sendBeacon&&navigator.sendBeacon(vI,e)}catch(g){a=!1}if(a)return or();try{var f=new Yq;mj(vI,function(a){a=a.target;wj(a)?f.callback(new nr(a.Aa(),xj(a))):(a=Error(a.h+" "+a.Aa()+" "+xj(a)),
f.a(a))},e);return f}catch(g){return pr(g)}},nr=function(a,b){this.a=a;this.b=b};var xI=function(a,b){B.call(this);a=a||4194304;this.o=this.A=null;this.f=new Uint8Array(a+(b||10485760));this.h=this.f.subarray(0,a);this.a=this.f.subarray(a);this.b=this.m=0;this.g=[]};r(xI,B);xI.prototype.open=function(a,b,c){if(!this.A){var d=Vb();this.A=d.a;a=yI(a,b,!!c);b=zI(a);b=AI(this,b);BI(this,b,a).then(function(a){this.o=a;this.u();d.resolve()},n(d.b,d),this)}return this.A};
var CI=function(a){if(Uint8Array.__proto__&&Uint8Array.__proto__.from)return Uint8Array.from(a);a=Object(a);if(!a.length)return new Uint8Array(0);for(var b=new Uint8Array(a.length),c=0;c<b.length;c++)b[c]=a[c];return b};xI.prototype.write=function(a){t(a,function(a){this.g.push(CI(Tj(a)))},this);this.u()};xI.prototype.jb=function(){return 0==this.b&&0==this.g.length};
var DI=function(a){var b=0,c=[];if(a.b>a.f.length){for(var d=a.h.length;d&&127<a.h[d-1];)d--;for(var e=a.a.length,f=a.m;e&&127<a.a[f];)f++,e--,f==a.a.length&&(f=0);c.push(a.h.subarray(0,d));b+=d;d=CI(Tj("...\r\n\r\n##### LOG TRUNCATED - REMOVED "+(a.b-d-e)+" BYTES#####\r\n\r\n..."));c.push(d);b+=d.length;f+e<=a.a.length?c.push(a.a.subarray(f,f+e)):(c.push(a.a.subarray(f)),c.push(a.a.subarray(0,e-(a.a.length-f))));b+=e}else a.b&&(b+=a.b,c.push(a.f.subarray(0,a.b)));a.g.length&&t(a.g,function(a){c.push(a);
b+=a.length});var g=new Uint8Array(b),m=0;t(c,function(a){g.set(a,m);m+=a.length});return g},yI=function(a,b,c){var d=Vb();a.then(function(a){a.getFile(b,c?{}:{create:!0},n(d.resolve,d),n(d.b,d))},n(d.b,d));return d.a},zI=function(a){var b=Vb();a.then(function(a){a.file(n(b.resolve,b),n(b.b,b))},n(b.b,b));return b.a},AI=function(a,b){var c=Vb();b.then(function(a){this.b=a.size;if(this.b>this.f.length){var b=Vb(),d=new FileReader;d.onload=n(function(){this.h.set(new Uint8Array(d.result));b.resolve()},
this);d.readAsArrayBuffer(a.slice(0,this.h.length));var g=Vb(),m=new FileReader;m.onload=n(function(){this.a.set(new Uint8Array(m.result));g.resolve()},this);m.readAsArrayBuffer(a.slice(a.size-this.a.length,a.size));c.resolve(he([b.a,g.a]))}else{var q=new FileReader;q.onload=n(function(){var a=new Uint8Array(q.result);this.f.set(a);this.b>this.h.length&&(this.m=(this.b-this.h.length)%this.a.length);c.resolve()},this);q.readAsArrayBuffer(a)}},n(c.b,c),a);return c.a},BI=function(a,b,c){var d=Vb();ge([b,
c]).then(function(a){a[1].createWriter(n(function(a){a.seek(a.length);a.onwriteend=n(this.u,this);d.resolve(a)},this),n(d.b,d))},n(d.b,d),a);return d.a};
xI.prototype.u=function(){this.o&&this.o.readyState!=this.o.WRITING&&0<this.g.length&&(this.o.write(new Blob(this.g)),t(this.g,function(a){var b=this.b;this.b+=a.length;if(b<this.f.length){var c=a.subarray(0,Math.min(this.f.length-b,a.length));this.f.set(c,b);a=a.subarray(c.length)}for(b=this.a.length-this.m;a.length;)c=a.subarray(0,Math.min(b,a.length)),this.a.set(c,this.m),a=a.subarray(c.length),this.m=c.length==b?0:this.m+c.length,b=this.a.length},this),this.g.length=0)};var FI=function(a){P(this,a,"cl:plu",-1,EI)};r(FI,O);var EI=[1];FI.prototype.s=function(){var a=new G,b;b=V(this,GI,1);0<b.length&&N(a,1,b,HI);return H(a)};var GI=function(a){P(this,a,0,-1,null)};r(GI,O);GI.prototype.s=function(){var a=new G;HI(this,a);return H(a)};var HI=function(a,b){var c;c=Q(a,1);null!=c&&null!=c&&lq(b,1,c);c=Q(a,2);null!=c&&L(b,2,c);c=Q(a,3);null!=c&&mq(b,3,c)};GI.prototype.na=function(a){S(this,2,a)};Qq("cl:plu",FI);var II=function(){this.a=new iI;this.b=new zi};qa(II);var JI=[31,37,41,43,47,53,61,67,71,73];II.prototype.j=Xi("talk.media.webrtc.PendingLogUploadManager");
var KI=function(a){for(var b=[],c=0,d=0;d<a.length;d++){for(var e=a.charCodeAt(d);255<e;)b[c++]=e&255,e>>=8;b[c++]=e}for(a=0;a<b.length;a++)b[a]^=JI[a%JI.length];return"wrplumplu-"+gk(b)},LI=function(a,b,c){var d=Fa()-432E6;b=a.a.get(KI(b));if(null!=b)try{var e=Yi(b);if("cl:plu"==e[0]){var f=new FI(e),g=eb(V(f,GI,1),function(a){return null!=Q(a,1)&&null!=Q(a,2)&&null!=Q(a,3)&&0<Q(a,1)&&Q(a,3)>d&&Q(a,2)!=c});Gq(f,1,g);return f}}catch(m){E(a.j,"Invalid pending JS log upload storage: "+b,m)}return new FI};
II.prototype.add=function(a,b){F(this.j,"Recording pending upload for session "+b+" for "+a);this.b.add(b);var c=LI(this,a,b),d=V(c,GI,1),e=new GI;S(e,1,5);e.na(b);b=Fa();S(e,3,b);qb(d,void 0,0,e);Gq(c,1,d);this.a.set(KI(a),c.la())};II.prototype.remove=function(a,b){F(this.j,"Removing record for session "+b+" for "+a);b=LI(this,a,b);this.a.set(KI(a),b.la())};var NI=function(){this.m=null;this.g=new xI;this.a={};this.f=MI();me(this.f,pa);this.h=II.S();this.b=null};qa(NI);
var PI=function(a,b){a.b=b;a.a[b]=a.g;a.g=new xI;a.a[b].open(a.f,"hangouts-call-"+b+".log");var c=new Date;OI(a,b,"### Start ["+c.toString()+"] ### "+b);OI(a,b,"Current time is "+c.toUTCString());OI(a,b,"Google Talk Plugin Version: 10.0.0.0");OI(a,b,"User agent: "+Ib)},OI=function(a,b,c,d){var e=Fa();null==a.m&&(a.m=e);c="["+((e-a.m)/1E3).toFixed(3)+"s]"+(null!=d?d:8)+" "+c+"\n";if(null!=b)a=a.a[b],null!=a&&a.write([c]);else{for(b in a.a)a.a[b].write([c]);null!=b||a.g.write([c])}},RI=function(a,b,
c){a.h.add(c,b);return QI(a,b,c)},QI=function(a,b,c){var d="hangouts-call-"+b+".log",e=a.a[b];if(null!=e)return fr(er(wI(DI(e),c,!0,d),n(a.w,a,b,c)),n(a.l,a,b,c));var e=new xI,f=new Yq;e.open(a.f,d,!0).then(function(){if(e.jb())OI(this,this.b,"JS log for "+b+" has no content",9),f.callback(new nr(null,"No log content for session "+b));else{var a=fr(er(wI(DI(e),c,!1),n(this.w,this,b,c)),n(this.l,this,b,c));dr(a,f.callback,f.a,f)}},function(a){this.l(b,0,a);f.a(a)},a);return f},MI=function(){var a=
na.requestFileSystem||na.webkitRequestFileSystem;if(!a)return ce("Filesystem API not accessible");var b=Vb();a(window.TEMPORARY,0,function(a){a.root.getDirectory("log_v2",{create:!0},n(b.resolve,b),n(b.b,b))},n(b.b,b));return b.a};NI.prototype.w=function(a,b,c){200==c.a?(OI(this,this.b,"JS log upload for "+a+" successful: "+c.b),this.h.remove(b,a)):OI(this,this.b,"JS log upload for "+a+" failure "+c.a+": "+c.b,10)};
NI.prototype.l=function(a,b,c){OI(this,this.b,"JS log upload for "+a+" failed: "+c,10)};var SI=function(){var a=Vq(),b=null,c=a;try{do{try{c.location.origin==a.location.origin&&(b=c.chrome&&c.chrome.runtime||b)}catch(d){}if(c==c.parent)break;c=c.parent}while(null!=c)}catch(d){}return b},TI=function(){return"https:"==Vq().location.protocol?"nkeimhogjdpnpccoofpliimaahmaaome":"hoblmflfjcnhdllclikeemgdcbbflkhi"},VI=function(a){OI(NI.S(),null,"talk.media.webrtc.Extension: Sending message "+Zi(a));var b=new Yq,c=SI(),d=a.method;if(c&&null!=c.sendMessage){var d=UI(b,d),e=Vq().location;a.origin=
e.origin+"/";var f=uh(e.href,"tabId");f&&(a.tabId=f);(e=uh(e.href,"winUrl"))&&(a.winUrl=e);c.sendMessage(TI(),a,d)}else OI(NI.S(),null,"talk.media.webrtc.Extension: Cannot find appropriate chrome.runtime when sending "+d,10),b.a("Cannot find appropriate chrome.runtime");return b},WI=function(){var a=SI();if(a&&null!=a.connect){OI(NI.S(),null,"talk.media.webrtc.Extension: Opening port named processCpu");var a=a.connect(TI(),{name:"processCpu"}),b=n(a.disconnect,a);Fd(Vq(),"unload",b);a.onDisconnect.addListener(function(){Od(window,
"unload",b)});return a}return null},UI=function(a,b){return function(c){var d="No response from extension";if(null!=c)if(d=c.error,null!=d)d="Extension reported "+d.name+": "+d.message;else{OI(NI.S(),null,"talk.media.webrtc.Extension: Received response to "+b+": "+Zi(c.value));a.callback(c.value);return}(c=SI())&&null!=c.lastError&&(d=d+" Chrome reported: "+c.lastError.message);OI(NI.S(),null,"talk.media.webrtc.Extension: Received error to "+b+": "+d,10);a.a(d)}},gr=function(){return VI({method:"cpu.getInfo"})};var XI=function(){this.b=this.w=null;this.v=this.f=this.u=0;this.o=1;this.a=this.h=this.l=this.g=this.m=this.A=0};XI.prototype.B=function(a){this.m+=a.tabCpuUsage;this.g+=a.browserCpuUsage;this.l+=a.gpuCpuUsage;this.h+=a.pluginCpuUsage;this.a++};XI.prototype.toJson=function(){return{jmiVersion:3,numOfProcessors:this.o,totalCpuUsage:this.A,tabCpuUsage:this.a?this.m/this.a:null,browserCpuUsage:this.a?this.g/this.a:null,gpuCpuUsage:this.a?this.l/this.a:null,pluginCpuUsage:this.a?this.h/this.a:null}};var YI=function(a,b){this.b=a;this.f=b||null;this.j=Xi(a);this.a=NI.S()},ZI=function(a,b){E(a.j,b);OI(a.a,a.f,"Warning("+a.b+"): "+b,9)},$I=function(a,b){F(a.j,b);OI(a.a,a.f,a.b+": "+b,8)};YI.prototype.config=function(a){$i(this.j,Oi,a);OI(this.a,this.f,this.b+": "+a,7)};var aJ=function(a,b){bj(a.j,b);OI(a.a,a.f,a.b+": "+b,8)};var bJ=function(a){P(this,a,0,-1,null)};r(bJ,O);bJ.prototype.s=function(){var a=new G;cJ(this,a);return H(a)};var cJ=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&K(b,2,c);c=Q(a,3);null!=c&&K(b,3,c);c=Q(a,4);null!=c&&K(b,4,c)};bJ.prototype.ib=function(){return Q(this,2)};var dJ=function(a){P(this,a,0,-1,null)};r(dJ,O);dJ.prototype.s=function(){var a=new G;eJ(this,a);return H(a)};var eJ=function(a,b){var c;c=Q(a,1);null!=c&&I(b,1,c);c=Q(a,2);null!=c&&I(b,2,c);c=Q(a,3);null!=c&&I(b,3,c);c=Q(a,4);null!=c&&I(b,4,c);c=Q(a,5);null!=c&&I(b,5,c)};dJ.prototype.fa=function(){return Q(this,5)};var gJ=function(a){P(this,a,0,-1,fJ)};r(gJ,O);var fJ=[5,52];gJ.prototype.s=function(){var a=new G;hJ(this,a);return H(a)};
var hJ=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&L(b,2,c);c=Q(a,133);null!=c&&mq(b,133,c);c=Q(a,3);null!=c&&I(b,3,c);c=Q(a,105);null!=c&&K(b,105,c);c=Q(a,107);null!=c&&mq(b,107,c);c=Q(a,104);null!=c&&mq(b,104,c);c=Q(a,4);null!=c&&L(b,4,c);c=Q(a,43);null!=c&&L(b,43,c);c=V(a,iJ,5);0<c.length&&wq(b,5,c,jJ);c=Q(a,28);null!=c&&J(b,28,c);c=Q(a,29);null!=c&&I(b,29,c);c=Q(a,30);null!=c&&I(b,30,c);c=Q(a,112);null!=c&&L(b,112,c);c=Q(a,106);null!=c&&I(b,106,c);c=Q(a,100);null!=c&&L(b,
100,c);c=Q(a,68);null!=c&&I(b,68,c);c=U(a,kJ,69);null!=c&&M(b,69,c,lJ);c=Q(a,42);null!=c&&mq(b,42,c);c=V(a,mJ,52);0<c.length&&N(b,52,c,nJ);c=U(a,oJ,135);null!=c&&M(b,135,c,pJ)},iJ=function(a){P(this,a,0,-1,qJ)};r(iJ,O);var qJ=[2,13];iJ.prototype.s=function(){var a=new G;jJ(this,a);return H(a)};
var jJ=function(a,b){var c;c=Q(a,1);null!=c&&I(b,6,c);c=Q(a,113);null!=c&&I(b,118,c);c=Q(a,118);null!=c&&I(b,123,c);c=rJ(a);0<c.length&&wq(b,7,c,sJ);c=V(a,tJ,13);0<c.length&&wq(b,18,c,uJ);c=Q(a,34);null!=c&&I(b,39,c);c=Q(a,92);null!=c&&I(b,97,c);c=Q(a,94);null!=c&&I(b,99,c);c=Q(a,93);null!=c&&I(b,98,c);c=Q(a,35);null!=c&&I(b,40,c);c=Q(a,36);null!=c&&I(b,41,c);c=Q(a,54);null!=c&&I(b,59,c);c=Q(a,66);null!=c&&K(b,71,c);c=Q(a,71);null!=c&&pq(b,76,c);c=Q(a,72);null!=c&&I(b,77,c);c=Q(a,73);null!=c&&I(b,
78,c);c=Q(a,74);null!=c&&J(b,79,c);c=Q(a,75);null!=c&&I(b,80,c);c=U(a,vJ,129);null!=c&&M(b,134,c,wJ)},yJ=function(a){P(this,a,0,-1,xJ)};r(yJ,O);var xJ=[53,54];yJ.prototype.s=function(){var a=new G;sJ(this,a);return H(a)};
var sJ=function(a,b){var c;c=Q(a,1);null!=c&&K(b,8,c);c=Q(a,2);null!=c&&I(b,9,c);c=Q(a,3);null!=c&&I(b,10,c);c=Q(a,4);null!=c&&I(b,11,c);c=Q(a,5);null!=c&&I(b,12,c);c=Q(a,6);null!=c&&I(b,13,c);c=Q(a,7);null!=c&&mq(b,14,c);c=Q(a,8);null!=c&&I(b,15,c);c=Q(a,9);null!=c&&mq(b,16,c);c=Q(a,10);null!=c&&I(b,17,c);c=Q(a,24);null!=c&&K(b,31,c);c=Q(a,25);null!=c&&null!=c&&(iq(b,32,5),hq(b.a,c));c=Q(a,117);null!=c&&pq(b,124,c);c=Q(a,26);null!=c&&I(b,33,c);c=Q(a,27);null!=c&&I(b,34,c);c=Q(a,28);null!=c&&I(b,
35,c);c=Q(a,29);null!=c&&I(b,36,c);c=Q(a,30);null!=c&&I(b,37,c);c=Q(a,31);null!=c&&I(b,38,c);c=Q(a,50);null!=c&&pq(b,57,c);c=Q(a,87);null!=c&&pq(b,94,c);c=Q(a,51);null!=c&&pq(b,58,c);c=Q(a,88);null!=c&&pq(b,95,c);c=Q(a,37);null!=c&&I(b,44,c);c=Q(a,38);null!=c&&I(b,45,c);c=Q(a,39);null!=c&&I(b,46,c);c=Q(a,40);null!=c&&I(b,47,c);c=Q(a,41);null!=c&&I(b,48,c);c=Q(a,42);null!=c&&I(b,49,c);c=Q(a,43);null!=c&&I(b,50,c);c=Q(a,124);null!=c&&I(b,131,c);c=Q(a,125);null!=c&&I(b,132,c);c=Q(a,96);null!=c&&I(b,
103,c);c=Q(a,80);null!=c&&I(b,87,c);c=Q(a,44);null!=c&&L(b,51,c);c=Q(a,94);null!=c&&L(b,101,c);c=Q(a,46);null!=c&&I(b,53,c);c=Q(a,47);null!=c&&I(b,54,c);c=Q(a,48);null!=c&&I(b,55,c);c=Q(a,49);null!=c&&I(b,56,c);c=Q(a,63);null!=c&&pq(b,70,c);c=Q(a,129);null!=c&&pq(b,136,c);c=Q(a,133);null!=c&&pq(b,140,c);c=Q(a,53);0<c.length&&tq(b,60,c);c=V(a,zJ,54);0<c.length&&wq(b,61,c,AJ);c=Q(a,57);null!=c&&I(b,64,c);c=Q(a,58);null!=c&&I(b,65,c);c=Q(a,114);null!=c&&I(b,121,c);c=Q(a,115);null!=c&&I(b,122,c);c=Q(a,
113);null!=c&&I(b,120,c);c=Q(a,78);null!=c&&I(b,85,c);c=Q(a,79);null!=c&&I(b,86,c);c=Q(a,59);null!=c&&J(b,66,c);c=Q(a,60);null!=c&&J(b,67,c);c=Q(a,65);null!=c&&I(b,72,c);c=Q(a,95);null!=c&&I(b,102,c);c=Q(a,68);null!=c&&pq(b,75,c);c=Q(a,103);null!=c&&pq(b,110,c);c=Q(a,106);null!=c&&pq(b,113,c);c=Q(a,107);null!=c&&pq(b,114,c);c=Q(a,104);null!=c&&pq(b,111,c);c=Q(a,74);null!=c&&I(b,81,c);c=Q(a,75);null!=c&&I(b,82,c);c=Q(a,76);null!=c&&I(b,83,c);c=Q(a,77);null!=c&&I(b,84,c);c=Q(a,81);null!=c&&I(b,88,c);
c=Q(a,82);null!=c&&I(b,89,c);c=Q(a,83);null!=c&&I(b,90,c);c=Q(a,84);null!=c&&I(b,91,c);c=Q(a,85);null!=c&&I(b,92,c);c=Q(a,86);null!=c&&I(b,93,c);c=Q(a,134);null!=c&&I(b,141,c);c=Q(a,89);null!=c&&I(b,96,c);c=Q(a,112);null!=c&&I(b,119,c);c=Q(a,118);null!=c&&I(b,125,c);c=Q(a,119);null!=c&&I(b,126,c);c=U(a,dJ,132);null!=c&&M(b,139,c,eJ);c=U(a,dJ,120);null!=c&&M(b,127,c,eJ);c=U(a,dJ,121);null!=c&&M(b,128,c,eJ);c=U(a,dJ,122);null!=c&&M(b,129,c,eJ);c=U(a,dJ,123);null!=c&&M(b,130,c,eJ);c=Q(a,108);null!=c&&
I(b,115,c);c=Q(a,109);null!=c&&I(b,116,c);c=Q(a,110);null!=c&&I(b,117,c);c=Q(a,130);null!=c&&mq(b,137,c);c=Q(a,131);null!=c&&mq(b,138,c)},BJ={Aq:0,xq:1,kj:2,zq:3},CJ={jj:0,ij:1,yq:2},DJ={Nf:0,Mf:1,Lf:2,Of:4,Sl:8,Vl:16,Ul:32,Wl:64,Tl:128,Ol:256,Rl:512,Ql:1024,Pl:2048,Xl:1073741824},zJ=function(a){P(this,a,0,-1,EJ)};r(zJ,O);var EJ=[2];zJ.prototype.s=function(){var a=new G;AJ(this,a);return H(a)};var AJ=function(a,b){var c;c=Q(a,1);null!=c&&L(b,62,c);c=Q(a,2);0<c.length&&tq(b,63,c)};
yJ.prototype.g=function(a){S(this,6,a)};yJ.prototype.h=function(a){S(this,57,a)};yJ.prototype.l=function(a){S(this,58,a)};var tJ=function(a){P(this,a,0,-1,null)};r(tJ,O);tJ.prototype.s=function(){var a=new G;uJ(this,a);return H(a)};
var uJ=function(a,b){var c;c=Q(a,1);null!=c&&I(b,19,c);c=Q(a,2);null!=c&&I(b,20,c);c=Q(a,3);null!=c&&I(b,21,c);c=Q(a,4);null!=c&&mq(b,22,c);c=Q(a,5);null!=c&&I(b,23,c);c=Q(a,90);null!=c&&I(b,108,c);c=Q(a,91);null!=c&&I(b,109,c);c=Q(a,6);null!=c&&mq(b,24,c);c=Q(a,7);null!=c&&I(b,25,c);c=U(a,bJ,8,1);null!=c&&M(b,26,c,cJ);c=U(a,bJ,9,1);null!=c&&M(b,27,c,cJ);c=Q(a,55);null!=c&&I(b,73,c);c=U(a,FJ,56);null!=c&&M(b,74,c,GJ)},FJ=function(a){P(this,a,0,-1,null)};r(FJ,O);
FJ.prototype.s=function(){var a=new G;GJ(this,a);return H(a)};var GJ=function(a,b){var c;c=Q(a,1);null!=c&&I(b,1,c);c=Q(a,2);null!=c&&I(b,2,c);c=Q(a,3);null!=c&&I(b,3,c);c=Q(a,4);null!=c&&I(b,4,c)};tJ.prototype.g=function(a){S(this,3,a)};var vJ=function(a){P(this,a,0,-1,HJ)};r(vJ,O);var HJ=[3];vJ.prototype.s=function(){var a=new G;wJ(this,a);return H(a)};var wJ=function(a,b){var c;c=Q(a,1);null!=c&&I(b,1,c);c=Q(a,2);null!=c&&I(b,2,c);c=Q(a,3);0<c.length&&rq(b,3,c)},rJ=function(a){return V(a,yJ,2)};
iJ.prototype.g=function(a){S(this,36,a)};var kJ=function(a){P(this,a,0,-1,null)};r(kJ,O);kJ.prototype.s=function(){var a=new G;lJ(this,a);return H(a)};var lJ=function(a,b){var c;c=Q(a,1);null!=c&&K(b,1,c);c=Q(a,2);null!=c&&mq(b,2,c)},mJ=function(a){P(this,a,0,-1,IJ)};r(mJ,O);var IJ=[3,4];mJ.prototype.s=function(){var a=new G;nJ(this,a);return H(a)};
var nJ=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&L(b,2,c);c=Q(a,3);0<c.length&&tq(b,3,c);c=Q(a,4);0<c.length&&tq(b,4,c)},oJ=function(a){P(this,a,0,-1,null)};r(oJ,O);oJ.prototype.s=function(){var a=new G;pJ(this,a);return H(a)};var pJ=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&K(b,2,c)};var JJ=new Date(0)-new Date("1900/01/01 00:00 GMT");var KJ=function(){tr.call(this);this.g=new C;this.b=new C;this.a=new C;vr(this,document,"visibilitychange",this.o,!1,this);this.h=new YI("talk.media.webrtc.OutputTracker")};r(KJ,tr);var LJ=new sr("Y2E25b"),MJ=function(a,b){var c=b.b-a.b;0==c&&(c=Q(b,29)-Q(a,29));return c},NJ=function(a){this.oh=a};NJ.prototype.qd=function(){return this.oh.qd()};
var OJ=function(a,b,c){var d=a.a.get(b);null!=d?ub(d,function(a){return a.oh==c},a)?nb(d)&&a.a.remove(b):ZI(a.h,"recordBeforeAudioStop: No matching element found for ssrc "+b):ZI(a.h,"recordBeforeAudioStop: No info found for ssrc "+b)},SJ=function(a,b){var c=a.g.get(b);null!=c&&t(c,function(a){PJ(this,b,a)},a);c=a.b.get(b);if(null==c)return null;a.b.remove(b);a=QJ(c);c=RJ(c);return null!=a||null!=c?{Qg:a,Rg:c}:null},PJ=function(a,b,c){c=c.a();c.a.a<c.start.a?ZI(a.h,"Non-monotonic frame count: "+c.a.a):
(a.b.Ra(b)||a.b.set(b,[]),-1>c.f()&&ZI(a.h,"Negative fps! s:{"+c.start.toString()+"} e:{"+c.a.toString()+"}"),a.b.get(b).push(c))};KJ.prototype.o=function(){this.g.forEach(function(a,b){t(a,function(a){PJ(this,b,a)},this)},this)};
var QJ=function(a){var b=0,c=0;t(a,function(a){b+=a.a.a-a.start.a;c+=a.a.timestamp-a.start.timestamp});return 0==c?null:b/c},RJ=function(a){var b=[];t(a,function(a){a.g||(b.push({t:a.start.timestamp,c:1,i:a}),b.push({t:a.a.timestamp,c:-1,i:a}))});Eb(b);var c=0,d=0,e=-Infinity,f=[];t(b,function(a){var b=a.t,g=b-e;0<f.length&&(c+=b-e,d+=Q(f[0],29)*g);1==a.c?(pb(f,a.i),Cb(f,MJ)):tb(f,a.i);e=b});return 0==c?null:d/c};
KJ.prototype.qd=function(a){a=this.g.get(a)||this.a.get(a);if(null==a)return null;var b=0,c=!1;t(a,function(a){a=a.qd();null!=a&&(b=Math.max(a,b),c=!0)});return c?b:null};KJ.prototype.X=function(){this.g.clear();this.a.clear();this.b.clear();KJ.W.X.call(this)};var TJ=function(a){P(this,a,0,-1,null)};r(TJ,O);TJ.prototype.s=function(){var a=new G;UJ(this,a);return H(a)};var UJ=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=U(a,VJ,2);null!=c&&M(b,2,c,WJ)},VJ=function(a){P(this,a,0,-1,null)};r(VJ,O);VJ.prototype.s=function(){var a=new G;WJ(this,a);return H(a)};var WJ=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&L(b,2,c);c=Q(a,3);null!=c&&I(b,3,c);c=Q(a,4);null!=c&&L(b,4,c);c=Q(a,5);null!=c&&J(b,5,c);c=Q(a,6);null!=c&&K(b,6,c)};var YJ=function(a){P(this,a,"chbarp",-1,XJ)};r(YJ,O);var XJ=[4];YJ.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=U(this,Ir,2);null!=b&&M(a,2,b,Jr);b=this.C();null!=b&&M(a,3,b,Y);b=V(this,Ir,4);0<b.length&&N(a,4,b,Jr);return H(a)};Qq("chbarp",YJ);YJ.prototype.getResponseHeader=function(){return U(this,ss,1)};YJ.prototype.C=function(){return U(this,X,3)};YJ.prototype.D=function(a){W(this,3,a)};YJ.prototype.O=function(){this.D(void 0)};var $J=function(a){P(this,a,"chbmrp",-1,ZJ)};r($J,O);var ZJ=[4];$J.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=U(this,Ir,2);null!=b&&M(a,2,b,Jr);b=this.C();null!=b&&M(a,3,b,Y);b=V(this,Ir,4);0<b.length&&N(a,4,b,Jr);return H(a)};Qq("chbmrp",$J);$J.prototype.getResponseHeader=function(){return U(this,ss,1)};$J.prototype.C=function(){return U(this,X,3)};$J.prototype.D=function(a){W(this,3,a)};$J.prototype.O=function(){this.D(void 0)};var aK=function(a){P(this,a,"chbqrp",-1,null)};r(aK,O);aK.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=U(this,Ir,2);null!=b&&M(a,2,b,Jr);b=this.C();null!=b&&M(a,3,b,Y);return H(a)};Qq("chbqrp",aK);aK.prototype.getResponseHeader=function(){return U(this,ss,1)};aK.prototype.C=function(){return U(this,X,3)};aK.prototype.D=function(a){W(this,3,a)};aK.prototype.O=function(){this.D(void 0)};var bK=function(a){P(this,a,"chbrrp",-1,null)};r(bK,O);bK.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=this.C();null!=b&&M(a,2,b,Y);return H(a)};Qq("chbrrp",bK);bK.prototype.getResponseHeader=function(){return U(this,ss,1)};bK.prototype.C=function(){return U(this,X,2)};bK.prototype.D=function(a){W(this,2,a)};bK.prototype.O=function(){this.D(void 0)};var dK=function(a){P(this,a,"chbsrp",-1,cK)};r(dK,O);var cK=[2];dK.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=V(this,Ir,2);0<b.length&&N(a,2,b,Jr);b=this.C();null!=b&&M(a,3,b,Y);return H(a)};Qq("chbsrp",dK);dK.prototype.getResponseHeader=function(){return U(this,ss,1)};dK.prototype.C=function(){return U(this,X,3)};dK.prototype.D=function(a){W(this,3,a)};dK.prototype.O=function(){this.D(void 0)};var fK=function(a){P(this,a,"carp",-1,eK)};r(fK,O);var eK=[2];fK.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=V(this,As,2);0<b.length&&N(a,2,b,Bs);return H(a)};Qq("carp",fK);fK.prototype.getResponseHeader=function(){return U(this,ss,1)};var hK=function(a){P(this,a,0,-1,gK)};r(hK,O);var gK=[6];hK.prototype.s=function(){var a=new G;iK(this,a);return H(a)};var iK=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&L(b,2,c);c=Q(a,3);null!=c&&L(b,3,c);c=U(a,TJ,7);null!=c&&M(b,7,c,UJ);c=Q(a,4);null!=c&&L(b,4,c);c=V(a,jK,6);0<c.length&&N(b,6,c,kK);c=Q(a,5);null!=c&&qq(b,5,c)},jK=function(a){P(this,a,0,-1,null)};r(jK,O);jK.prototype.s=function(){var a=new G;kK(this,a);return H(a)};
var kK=function(a,b){var c;c=U(a,lK,1);null!=c&&M(b,1,c,mK);c=U(a,nK,2);null!=c&&M(b,2,c,oK);c=U(a,pK,3);null!=c&&M(b,3,c,qK)},lK=function(a){P(this,a,0,-1,null)};r(lK,O);lK.prototype.s=function(){var a=new G;mK(this,a);return H(a)};var mK=function(a,b){a=U(a,TJ,1);null!=a&&M(b,1,a,UJ)},nK=function(a){P(this,a,0,-1,null)};r(nK,O);nK.prototype.s=function(){var a=new G;oK(this,a);return H(a)};var oK=function(a,b){a=Q(a,1);null!=a&&L(b,1,a)},pK=function(a){P(this,a,0,-1,null)};r(pK,O);
pK.prototype.s=function(){var a=new G;qK(this,a);return H(a)};var qK=function(a,b){a=Q(a,1);null!=a&&L(b,1,a)};var sK=function(a){P(this,a,0,-1,rK)};r(sK,O);var rK=[4];sK.prototype.s=function(){var a=new G;tK(this,a);return H(a)};var tK=function(a,b){var c;c=U(a,ms,1);null!=c&&M(b,1,c,ns);c=U(a,mt,2);null!=c&&M(b,2,c,nt);c=a.C();null!=c&&M(b,3,c,Y);c=V(a,mt,4);0<c.length&&N(b,4,c,nt)};sK.prototype.setRequestHeader=function(a){W(this,1,a)};sK.prototype.C=function(){return U(this,X,3)};sK.prototype.D=function(a){W(this,3,a)};sK.prototype.O=function(){this.D(void 0)};var vK=function(a){P(this,a,"charp",-1,uK)};r(vK,O);var uK=[5];vK.prototype.s=function(){var a=new G;wK(this,a);return H(a)};var wK=function(a,b){var c;c=a.getResponseHeader();null!=c&&M(b,1,c,ts);c=U(a,mt,2);null!=c&&M(b,2,c,nt);c=Q(a,4);null!=c&&L(b,4,c);c=a.C();null!=c&&M(b,3,c,Y);c=V(a,mt,5);0<c.length&&N(b,5,c,nt)};Qq("charp",vK);vK.prototype.getResponseHeader=function(){return U(this,ss,1)};vK.prototype.C=function(){return U(this,X,3)};vK.prototype.D=function(a){W(this,3,a)};
vK.prototype.O=function(){this.D(void 0)};var xK=function(a){P(this,a,0,-1,null)};r(xK,O);xK.prototype.s=function(){var a=new G;yK(this,a);return H(a)};var yK=function(a,b){var c;c=U(a,TJ,1);null!=c&&M(b,1,c,UJ);c=Q(a,2);null!=c&&qq(b,2,c);c=Q(a,3);null!=c&&nq(b,3,c)};var zK=function(a){P(this,a,0,-1,null)};r(zK,O);zK.prototype.s=function(){var a=new G;AK(this,a);return H(a)};var AK=function(a,b){var c;c=Q(a,1);null!=c&&mq(b,1,c);c=Q(a,2);null!=c&&L(b,2,c);c=U(a,TJ,3);null!=c&&M(b,3,c,UJ);c=Q(a,4);null!=c&&J(b,4,c);c=Q(a,5);null!=c&&J(b,5,c);c=U(a,xK,6);null!=c&&M(b,6,c,yK)};zK.prototype.T=function(){return Q(this,2)};zK.prototype.R=function(a){S(this,2,a)};var BK=function(a){P(this,a,0,-1,null)};r(BK,O);BK.prototype.s=function(){var a=new G;CK(this,a);return H(a)};var CK=function(a,b){var c;c=U(a,ms,1);null!=c&&M(b,1,c,ns);c=U(a,zK,2);null!=c&&M(b,2,c,AK);c=a.C();null!=c&&M(b,3,c,Y)};BK.prototype.setRequestHeader=function(a){W(this,1,a)};BK.prototype.C=function(){return U(this,X,3)};BK.prototype.D=function(a){W(this,3,a)};BK.prototype.O=function(){this.D(void 0)};var DK=function(a){P(this,a,0,-1,null)};r(DK,O);DK.prototype.s=function(){var a=new G;EK(this,a);return H(a)};var EK=function(a,b){var c;c=Q(a,1);null!=c&&mq(b,1,c);c=Q(a,2);null!=c&&mq(b,2,c);c=Q(a,3);null!=c&&K(b,3,c)};var GK=function(a){P(this,a,0,-1,FK)};r(GK,O);var FK=[2];GK.prototype.s=function(){var a=new G;HK(this,a);return H(a)};var HK=function(a,b){var c;c=U(a,IK,1);null!=c&&M(b,1,c,JK);c=Q(a,2);0<c.length&&uq(b,2,c);c=Q(a,3);null!=c&&L(b,3,c);c=Q(a,4);null!=c&&L(b,4,c)},IK=function(a){P(this,a,0,-1,null)};r(IK,O);IK.prototype.s=function(){var a=new G;JK(this,a);return H(a)};var JK=function(a,b){var c;c=U(a,KK,1);null!=c&&M(b,1,c,LK);c=U(a,Ns,4);null!=c&&M(b,4,c,Os)},KK=function(a){P(this,a,0,-1,null)};
r(KK,O);KK.prototype.s=function(){var a=new G;LK(this,a);return H(a)};var LK=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&L(b,2,c)};var NK=function(a){P(this,a,0,-1,MK)};r(NK,O);var MK=[11];NK.prototype.s=function(){var a=new G;OK(this,a);return H(a)};var OK=function(a,b){var c;c=Q(a,8);null!=c&&mq(b,8,c);c=Q(a,1);null!=c&&L(b,1,c);c=U(a,hK,2);null!=c&&M(b,2,c,iK);c=V(a,GK,11);0<c.length&&N(b,11,c,HK);c=Q(a,3);null!=c&&K(b,3,c);c=Q(a,4);null!=c&&J(b,4,c);c=Q(a,6);null!=c&&K(b,6,c);c=U(a,DK,7);null!=c&&M(b,7,c,EK);c=Q(a,9);null!=c&&L(b,9,c);c=Q(a,99);null!=c&&L(b,99,c)};NK.prototype.T=function(){return Q(this,1)};
NK.prototype.R=function(a){S(this,1,a)};var PK=function(a){P(this,a,0,-1,null)};r(PK,O);PK.prototype.s=function(){var a=new G;QK(this,a);return H(a)};var QK=function(a,b){var c;c=U(a,ms,1);null!=c&&M(b,1,c,ns);c=U(a,NK,2);null!=c&&M(b,2,c,OK);c=a.C();null!=c&&M(b,3,c,Y)};PK.prototype.setRequestHeader=function(a){W(this,1,a)};PK.prototype.C=function(){return U(this,X,3)};PK.prototype.D=function(a){W(this,3,a)};PK.prototype.O=function(){this.D(void 0)};var RK=function(a){P(this,a,0,-1,null)};r(RK,O);RK.prototype.s=function(){var a=new G;SK(this,a);return H(a)};var SK=function(a,b){var c;c=Q(a,3);null!=c&&J(b,3,c);c=Q(a,4);null!=c&&J(b,4,c)};var UK=function(a){P(this,a,0,-1,TK)};r(UK,O);var TK=[6];UK.prototype.s=function(){var a=new G;VK(this,a);return H(a)};var VK=function(a,b){var c;c=U(a,ms,1);null!=c&&M(b,1,c,ns);c=U(a,rt,2);null!=c&&M(b,2,c,st);c=U(a,RK,3);null!=c&&M(b,3,c,SK);c=Q(a,4);null!=c&&J(b,4,c);c=a.C();null!=c&&M(b,5,c,Y);c=V(a,rt,6);0<c.length&&N(b,6,c,st)};UK.prototype.setRequestHeader=function(a){W(this,1,a)};UK.prototype.C=function(){return U(this,X,5)};UK.prototype.D=function(a){W(this,5,a)};UK.prototype.O=function(){this.D(void 0)};var WK=function(a){P(this,a,0,-1,null)};r(WK,O);WK.prototype.s=function(){var a=new G;XK(this,a);return H(a)};var XK=function(a,b){var c;c=U(a,ms,1);null!=c&&M(b,1,c,ns);c=Q(a,2);null!=c&&L(b,2,c);c=a.C();null!=c&&M(b,3,c,Y)};h=WK.prototype;h.setRequestHeader=function(a){W(this,1,a)};h.T=function(){return Q(this,2)};h.R=function(a){S(this,2,a)};h.C=function(){return U(this,X,3)};h.D=function(a){W(this,3,a)};h.O=function(){this.D(void 0)};var YK=function(a){P(this,a,0,-1,null)};r(YK,O);YK.prototype.s=function(){var a=new G;ZK(this,a);return H(a)};var ZK=function(a,b){var c;c=U(a,ms,1);null!=c&&M(b,1,c,ns);c=Q(a,2);null!=c&&L(b,2,c);c=a.C();null!=c&&M(b,3,c,Y)};h=YK.prototype;h.setRequestHeader=function(a){W(this,1,a)};h.T=function(){return Q(this,2)};h.R=function(a){S(this,2,a)};h.C=function(){return U(this,X,3)};h.D=function(a){W(this,3,a)};h.O=function(){this.D(void 0)};var $K=function(a){P(this,a,0,-1,null)};r($K,O);$K.prototype.s=function(){var a=new G;aL(this,a);return H(a)};var aL=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&L(b,2,c);c=Q(a,3);null!=c&&L(b,3,c);c=Q(a,4);null!=c&&L(b,4,c)};$K.prototype.getName=function(){return Q(this,1)};var cL=function(a){P(this,a,0,-1,bL)};r(cL,O);var bL=[3];cL.prototype.s=function(){var a=new G;dL(this,a);return H(a)};var dL=function(a,b){var c;c=U(a,ms,1);null!=c&&M(b,1,c,ns);c=U(a,ht,2);null!=c&&M(b,2,c,it);c=V(a,hK,3);0<c.length&&N(b,3,c,iK);c=U(a,$K,4);null!=c&&M(b,4,c,aL);c=Q(a,5);null!=c&&J(b,5,c);c=Q(a,6);null!=c&&K(b,6,c);c=Q(a,7);null!=c&&L(b,7,c);c=a.C();null!=c&&M(b,8,c,Y)};h=cL.prototype;h.setRequestHeader=function(a){W(this,1,a)};h.U=function(){return R(this,6,1)};
h.Ma=function(a){S(this,6,a)};h.C=function(){return U(this,X,8)};h.D=function(a){W(this,8,a)};h.O=function(){this.D(void 0)};var fL=function(a){P(this,a,0,-1,eL)};r(fL,O);var eL=[4];fL.prototype.s=function(){var a=new G;gL(this,a);return H(a)};var gL=function(a,b){var c;c=U(a,ms,1);null!=c&&M(b,1,c,ns);c=a.C();null!=c&&M(b,3,c,Y);c=V(a,eu,4);0<c.length&&N(b,4,c,fu)};fL.prototype.setRequestHeader=function(a){W(this,1,a)};fL.prototype.C=function(){return U(this,X,3)};fL.prototype.D=function(a){W(this,3,a)};fL.prototype.O=function(){this.D(void 0)};var hL=function(a){P(this,a,0,-1,null)};r(hL,O);hL.prototype.s=function(){var a=new G;iL(this,a);return H(a)};var iL=function(a,b){var c;c=U(a,ms,1);null!=c&&M(b,1,c,ns);c=Q(a,2);null!=c&&L(b,2,c);c=a.C();null!=c&&M(b,3,c,Y)};h=hL.prototype;h.setRequestHeader=function(a){W(this,1,a)};h.na=function(a){S(this,2,a)};h.C=function(){return U(this,X,3)};h.D=function(a){W(this,3,a)};h.O=function(){this.D(void 0)};var kL=function(a){P(this,a,0,-1,jL)};r(kL,O);var jL=[4];kL.prototype.s=function(){var a=new G;lL(this,a);return H(a)};var lL=function(a,b){var c;c=U(a,ms,1);null!=c&&M(b,1,c,ns);c=a.Y();null!=c&&M(b,2,c,ju);c=a.C();null!=c&&M(b,3,c,Y);c=V(a,iu,4);0<c.length&&N(b,4,c,ju)};h=kL.prototype;h.setRequestHeader=function(a){W(this,1,a)};h.Y=function(){return U(this,iu,2)};h.C=function(){return U(this,X,3)};h.D=function(a){W(this,3,a)};h.O=function(){this.D(void 0)};var mL=function(a){P(this,a,0,-1,null)};r(mL,O);mL.prototype.s=function(){var a=new G;nL(this,a);return H(a)};var nL=function(a,b){var c;c=U(a,ms,1);null!=c&&M(b,1,c,ns);c=Q(a,2);null!=c&&L(b,2,c);c=Q(a,3);null!=c&&L(b,3,c);c=a.C();null!=c&&M(b,4,c,Y)};h=mL.prototype;h.setRequestHeader=function(a){W(this,1,a)};h.T=function(){return Q(this,2)};h.R=function(a){S(this,2,a)};h.M=function(){return Q(this,3)};h.ma=function(a){S(this,3,a)};h.C=function(){return U(this,X,4)};h.D=function(a){W(this,4,a)};
h.O=function(){this.D(void 0)};var pL=function(a){P(this,a,0,-1,oL)};r(pL,O);var oL=[4];pL.prototype.s=function(){var a=new G;qL(this,a);return H(a)};var qL=function(a,b){var c;c=U(a,ms,1);null!=c&&M(b,1,c,ns);c=a.C();null!=c&&M(b,3,c,Y);c=V(a,vu,4);0<c.length&&N(b,4,c,wu)};pL.prototype.setRequestHeader=function(a){W(this,1,a)};pL.prototype.C=function(){return U(this,X,3)};pL.prototype.D=function(a){W(this,3,a)};pL.prototype.O=function(){this.D(void 0)};var rL=function(a){P(this,a,0,-1,null)};r(rL,O);rL.prototype.s=function(){var a=new G;sL(this,a);return H(a)};var sL=function(a,b){var c;c=U(a,ms,1);null!=c&&M(b,1,c,ns);c=Q(a,2);null!=c&&K(b,2,c);c=Q(a,3);null!=c&&L(b,3,c);c=Q(a,4);null!=c&&L(b,4,c);c=a.C();null!=c&&M(b,5,c,Y)};h=rL.prototype;h.setRequestHeader=function(a){W(this,1,a)};h.na=function(a){S(this,3,a)};h.T=function(){return Q(this,4)};h.R=function(a){S(this,4,a)};h.C=function(){return U(this,X,5)};h.D=function(a){W(this,5,a)};h.O=function(){this.D(void 0)};var tL=function(a){P(this,a,0,-1,null)};r(tL,O);tL.prototype.s=function(){var a=new G;uL(this,a);return H(a)};
var uL=function(a,b){var c;c=U(a,UK,1);null!=c&&M(b,1,c,VK);c=U(a,fL,2);null!=c&&M(b,2,c,gL);c=U(a,pL,3);null!=c&&M(b,3,c,qL);c=U(a,rL,4);null!=c&&M(b,4,c,sL);c=U(a,kL,5);null!=c&&M(b,5,c,lL);c=U(a,mL,6);null!=c&&M(b,6,c,nL);c=U(a,WK,7);null!=c&&M(b,7,c,XK);c=U(a,YK,8);null!=c&&M(b,8,c,ZK);c=U(a,sK,9);null!=c&&M(b,9,c,tK);c=U(a,cL,10);null!=c&&M(b,10,c,dL);c=U(a,PK,11);null!=c&&M(b,11,c,QK);c=U(a,BK,12);null!=c&&M(b,12,c,CK);c=U(a,hL,13);null!=c&&M(b,13,c,iL)};
tL.prototype.v=function(a){W(this,4,a)};tL.prototype.h=function(a){W(this,6,a)};tL.prototype.g=function(a){W(this,7,a)};tL.prototype.l=function(a){W(this,8,a)};var wL=function(a){P(this,a,0,-1,vL)};r(wL,O);var vL=[2];wL.prototype.s=function(){var a=new G,b;b=U(this,ms,1);null!=b&&M(a,1,b,ns);b=V(this,tL,2);0<b.length&&N(a,2,b,uL);b=this.C();null!=b&&M(a,3,b,Y);return H(a)};wL.prototype.setRequestHeader=function(a){W(this,1,a)};var xL=function(a,b){Gq(a,2,b)};wL.prototype.C=function(){return U(this,X,3)};wL.prototype.D=function(a){W(this,3,a)};wL.prototype.O=function(){this.D(void 0)};var yL=function(a){P(this,a,"chpara",-1,null)};r(yL,O);yL.prototype.s=function(){var a=new G;zL(this,a);return H(a)};var zL=function(a,b){var c;c=a.getResponseHeader();null!=c&&M(b,1,c,ts);c=U(a,zK,2);null!=c&&M(b,2,c,AK);c=a.C();null!=c&&M(b,3,c,Y)};Qq("chpara",yL);yL.prototype.getResponseHeader=function(){return U(this,ss,1)};yL.prototype.C=function(){return U(this,X,3)};yL.prototype.D=function(a){W(this,3,a)};yL.prototype.O=function(){this.D(void 0)};var AL=function(a){P(this,a,"chiarp",-1,null)};r(AL,O);AL.prototype.s=function(){var a=new G;BL(this,a);return H(a)};var BL=function(a,b){var c;c=a.getResponseHeader();null!=c&&M(b,1,c,ts);c=U(a,NK,2);null!=c&&M(b,2,c,OK);c=Q(a,3);null!=c&&K(b,3,c);c=a.C();null!=c&&M(b,4,c,Y)};Qq("chiarp",AL);AL.prototype.getResponseHeader=function(){return U(this,ss,1)};AL.prototype.C=function(){return U(this,X,4)};AL.prototype.D=function(a){W(this,4,a)};AL.prototype.O=function(){this.D(void 0)};var DL=function(a){P(this,a,"chparp",-1,CL)};r(DL,O);var CL=[5];DL.prototype.s=function(){var a=new G;EL(this,a);return H(a)};var EL=function(a,b){var c;c=a.getResponseHeader();null!=c&&M(b,1,c,ts);c=U(a,rt,2);null!=c&&M(b,2,c,st);c=a.C();null!=c&&M(b,3,c,Y);c=Q(a,4);null!=c&&K(b,4,c);c=V(a,rt,5);0<c.length&&N(b,5,c,st)};Qq("chparp",DL);DL.prototype.getResponseHeader=function(){return U(this,ss,1)};DL.prototype.C=function(){return U(this,X,3)};DL.prototype.D=function(a){W(this,3,a)};
DL.prototype.O=function(){this.D(void 0)};var FL=function(a){P(this,a,0,-1,null)};r(FL,O);FL.prototype.s=function(){var a=new G;GL(this,a);return H(a)};var GL=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&K(b,2,c)};FL.prototype.M=function(){return Q(this,1)};FL.prototype.ma=function(a){S(this,1,a)};var IL=function(a){P(this,a,"chpsrp",-1,HL)};r(IL,O);var HL=[2,4];IL.prototype.s=function(){var a=new G;JL(this,a);return H(a)};var JL=function(a,b){var c;c=a.getResponseHeader();null!=c&&M(b,1,c,ts);c=V(a,rt,2);0<c.length&&N(b,2,c,st);c=a.C();null!=c&&M(b,3,c,Y);c=V(a,FL,4);0<c.length&&N(b,4,c,GL)};Qq("chpsrp",IL);IL.prototype.getResponseHeader=function(){return U(this,ss,1)};IL.prototype.C=function(){return U(this,X,3)};IL.prototype.D=function(a){W(this,3,a)};IL.prototype.O=function(){this.D(void 0)};var KL=function(a){P(this,a,"chqrp",-1,null)};r(KL,O);KL.prototype.s=function(){var a=new G;LL(this,a);return H(a)};var LL=function(a,b){var c;c=a.getResponseHeader();null!=c&&M(b,1,c,ts);c=U(a,mt,2);null!=c&&M(b,2,c,nt);c=a.C();null!=c&&M(b,3,c,Y)};Qq("chqrp",KL);KL.prototype.getResponseHeader=function(){return U(this,ss,1)};KL.prototype.C=function(){return U(this,X,3)};KL.prototype.D=function(a){W(this,3,a)};KL.prototype.O=function(){this.D(void 0)};var ML=function(a){P(this,a,"chrrp",-1,null)};r(ML,O);ML.prototype.s=function(){var a=new G;NL(this,a);return H(a)};var NL=function(a,b){var c;c=a.getResponseHeader();null!=c&&M(b,1,c,ts);c=Q(a,2);null!=c&&L(b,2,c);c=Q(a,3);null!=c&&K(b,3,c);c=Q(a,4);null!=c&&L(b,4,c);c=a.C();null!=c&&M(b,5,c,Y)};Qq("chrrp",ML);h=ML.prototype;h.getResponseHeader=function(){return U(this,ss,1)};h.T=function(){return Q(this,2)};h.R=function(a){S(this,2,a)};h.C=function(){return U(this,X,5)};
h.D=function(a){W(this,5,a)};h.O=function(){this.D(void 0)};var PL=function(a){P(this,a,"chsearp",-1,OL)};r(PL,O);var OL=[4];PL.prototype.s=function(){var a=new G;QL(this,a);return H(a)};var QL=function(a,b){var c;c=a.getResponseHeader();null!=c&&M(b,1,c,ts);c=a.C();null!=c&&M(b,3,c,Y);c=V(a,eu,4);0<c.length&&N(b,4,c,fu)};Qq("chsearp",PL);PL.prototype.getResponseHeader=function(){return U(this,ss,1)};PL.prototype.C=function(){return U(this,X,3)};PL.prototype.D=function(a){W(this,3,a)};PL.prototype.O=function(){this.D(void 0)};var RL=function(a){P(this,a,"chseqrp",-1,null)};r(RL,O);RL.prototype.s=function(){var a=new G;SL(this,a);return H(a)};var SL=function(a,b){var c;c=a.getResponseHeader();null!=c&&M(b,1,c,ts);c=U(a,eu,2);null!=c&&M(b,2,c,fu);c=a.C();null!=c&&M(b,3,c,Y)};Qq("chseqrp",RL);RL.prototype.getResponseHeader=function(){return U(this,ss,1)};RL.prototype.C=function(){return U(this,X,3)};RL.prototype.D=function(a){W(this,3,a)};RL.prototype.O=function(){this.D(void 0)};var UL=function(a){P(this,a,"chsoarp",-1,TL)};r(UL,O);var TL=[4];UL.prototype.s=function(){var a=new G;VL(this,a);return H(a)};var VL=function(a,b){var c;c=a.getResponseHeader();null!=c&&M(b,1,c,ts);c=a.Y();null!=c&&M(b,2,c,ju);c=a.C();null!=c&&M(b,3,c,Y);c=V(a,iu,4);0<c.length&&N(b,4,c,ju)};Qq("chsoarp",UL);h=UL.prototype;h.getResponseHeader=function(){return U(this,ss,1)};h.Y=function(){return U(this,iu,2)};h.C=function(){return U(this,X,3)};h.D=function(a){W(this,3,a)};h.O=function(){this.D(void 0)};var XL=function(a){P(this,a,"chsosrp",-1,WL)};r(XL,O);var WL=[2];XL.prototype.s=function(){var a=new G;YL(this,a);return H(a)};var YL=function(a,b){var c;c=a.getResponseHeader();null!=c&&M(b,1,c,ts);c=V(a,iu,2);0<c.length&&N(b,2,c,ju);c=a.C();null!=c&&M(b,3,c,Y)};Qq("chsosrp",XL);XL.prototype.getResponseHeader=function(){return U(this,ss,1)};XL.prototype.C=function(){return U(this,X,3)};XL.prototype.D=function(a){W(this,3,a)};XL.prototype.O=function(){this.D(void 0)};var $L=function(a){P(this,a,"chstarp",-1,ZL)};r($L,O);var ZL=[4];$L.prototype.s=function(){var a=new G;aM(this,a);return H(a)};var aM=function(a,b){var c;c=a.getResponseHeader();null!=c&&M(b,1,c,ts);c=a.C();null!=c&&M(b,3,c,Y);c=V(a,vu,4);0<c.length&&N(b,4,c,wu)};Qq("chstarp",$L);$L.prototype.getResponseHeader=function(){return U(this,ss,1)};$L.prototype.C=function(){return U(this,X,3)};$L.prototype.D=function(a){W(this,3,a)};$L.prototype.O=function(){this.D(void 0)};var cM=function(a){P(this,a,"chstsrp",-1,bM)};r(cM,O);var bM=[2];cM.prototype.s=function(){var a=new G;dM(this,a);return H(a)};var dM=function(a,b){var c;c=a.getResponseHeader();null!=c&&M(b,1,c,ts);c=V(a,vu,2);0<c.length&&N(b,2,c,wu);c=a.C();null!=c&&M(b,3,c,Y)};Qq("chstsrp",cM);cM.prototype.getResponseHeader=function(){return U(this,ss,1)};cM.prototype.C=function(){return U(this,X,3)};cM.prototype.D=function(a){W(this,3,a)};cM.prototype.O=function(){this.D(void 0)};var eM=function(a){P(this,a,0,-1,null)};r(eM,O);eM.prototype.s=function(){var a=new G;fM(this,a);return H(a)};
var fM=function(a,b){var c;c=U(a,DL,1);null!=c&&M(b,1,c,EL);c=U(a,PL,2);null!=c&&M(b,2,c,QL);c=U(a,$L,3);null!=c&&M(b,3,c,aM);c=a.v();null!=c&&M(b,4,c,dM);c=U(a,UL,5);null!=c&&M(b,5,c,VL);c=a.h();null!=c&&M(b,6,c,YL);c=a.g();null!=c&&M(b,7,c,JL);c=a.l();null!=c&&M(b,8,c,LL);c=U(a,vK,9);null!=c&&M(b,9,c,wK);c=U(a,ML,10);null!=c&&M(b,10,c,NL);c=U(a,AL,11);null!=c&&M(b,11,c,BL);c=U(a,yL,12);null!=c&&M(b,12,c,zL);c=U(a,RL,13);null!=c&&M(b,13,c,SL)};eM.prototype.v=function(){return U(this,cM,4)};
eM.prototype.h=function(){return U(this,XL,6)};eM.prototype.g=function(){return U(this,IL,7)};eM.prototype.l=function(){return U(this,KL,8)};var hM=function(a){P(this,a,"chbrp",-1,gM)};r(hM,O);var gM=[2];hM.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=V(this,eM,2);0<b.length&&N(a,2,b,fM);b=this.C();null!=b&&M(a,3,b,Y);return H(a)};Qq("chbrp",hM);hM.prototype.getResponseHeader=function(){return U(this,ss,1)};hM.prototype.C=function(){return U(this,X,3)};hM.prototype.D=function(a){W(this,3,a)};hM.prototype.O=function(){this.D(void 0)};var jM=function(a){P(this,a,0,-1,iM)};r(jM,O);var iM=[4];h=jM.prototype;h.s=function(){var a=new G,b;b=U(this,ms,1);null!=b&&M(a,1,b,ns);b=U(this,mt,2);null!=b&&M(a,2,b,nt);b=this.C();null!=b&&M(a,3,b,Y);b=V(this,mt,4);0<b.length&&N(a,4,b,nt);return H(a)};h.setRequestHeader=function(a){W(this,1,a)};h.C=function(){return U(this,X,3)};h.D=function(a){W(this,3,a)};h.O=function(){this.D(void 0)};var lM=function(a){P(this,a,"chmrp",-1,kM)};r(lM,O);var kM=[4];lM.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=U(this,mt,2);null!=b&&M(a,2,b,nt);b=this.C();null!=b&&M(a,3,b,Y);b=V(this,mt,4);0<b.length&&N(a,4,b,nt);return H(a)};Qq("chmrp",lM);lM.prototype.getResponseHeader=function(){return U(this,ss,1)};lM.prototype.C=function(){return U(this,X,3)};lM.prototype.D=function(a){W(this,3,a)};lM.prototype.O=function(){this.D(void 0)};var nM=function(a){P(this,a,0,-1,mM)};r(nM,O);var mM=[4];h=nM.prototype;h.s=function(){var a=new G,b;b=U(this,ms,1);null!=b&&M(a,1,b,ns);b=U(this,rt,2);null!=b&&M(a,2,b,st);b=this.C();null!=b&&M(a,3,b,Y);b=V(this,rt,4);0<b.length&&N(a,4,b,st);return H(a)};h.setRequestHeader=function(a){W(this,1,a)};h.C=function(){return U(this,X,3)};h.D=function(a){W(this,3,a)};h.O=function(){this.D(void 0)};var pM=function(a){P(this,a,"chpmrp",-1,oM)};r(pM,O);var oM=[4];pM.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=U(this,rt,2);null!=b&&M(a,2,b,st);b=this.C();null!=b&&M(a,3,b,Y);b=V(this,rt,4);0<b.length&&N(a,4,b,st);return H(a)};Qq("chpmrp",pM);pM.prototype.getResponseHeader=function(){return U(this,ss,1)};pM.prototype.C=function(){return U(this,X,3)};pM.prototype.D=function(a){W(this,3,a)};pM.prototype.O=function(){this.D(void 0)};var qM=function(a){P(this,a,0,-1,null)};r(qM,O);h=qM.prototype;h.s=function(){var a=new G,b;b=U(this,ms,1);null!=b&&M(a,1,b,ns);b=Q(this,2);null!=b&&L(a,2,b);b=Q(this,3);null!=b&&L(a,3,b);b=this.C();null!=b&&M(a,4,b,Y);return H(a)};h.setRequestHeader=function(a){W(this,1,a)};h.T=function(){return Q(this,2)};h.R=function(a){S(this,2,a)};h.M=function(){return Q(this,3)};h.ma=function(a){S(this,3,a)};h.C=function(){return U(this,X,4)};h.D=function(a){W(this,4,a)};h.O=function(){this.D(void 0)};var rM=function(a){P(this,a,"chpqrp",-1,null)};r(rM,O);rM.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=U(this,rt,2);null!=b&&M(a,2,b,st);b=this.C();null!=b&&M(a,3,b,Y);return H(a)};Qq("chpqrp",rM);rM.prototype.getResponseHeader=function(){return U(this,ss,1)};rM.prototype.C=function(){return U(this,X,3)};rM.prototype.D=function(a){W(this,3,a)};rM.prototype.O=function(){this.D(void 0)};var tM=function(a){P(this,a,0,-1,sM)};r(tM,O);var sM=[6,7];h=tM.prototype;h.s=function(){var a=new G,b;b=U(this,ms,1);null!=b&&M(a,1,b,ns);b=Q(this,2);null!=b&&L(a,2,b);b=Q(this,3);null!=b&&L(a,3,b);b=Q(this,5);null!=b&&K(a,5,b);b=this.C();null!=b&&M(a,4,b,Y);b=Q(this,6);0<b.length&&vq(a,6,b);b=V(this,Ku,7);0<b.length&&N(a,7,b,Lu);return H(a)};h.setRequestHeader=function(a){W(this,1,a)};h.T=function(){return Q(this,2)};h.R=function(a){S(this,2,a)};h.M=function(){return Q(this,3)};
h.ma=function(a){S(this,3,a)};h.C=function(){return U(this,X,4)};h.D=function(a){W(this,4,a)};h.O=function(){this.D(void 0)};var uM=function(a,b){Gq(a,7,b)};var vM=function(a){P(this,a,"chprrp",-1,null)};r(vM,O);vM.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=this.C();null!=b&&M(a,2,b,Y);b=Q(this,3);null!=b&&K(a,3,b);return H(a)};Qq("chprrp",vM);vM.prototype.getResponseHeader=function(){return U(this,ss,1)};vM.prototype.C=function(){return U(this,X,2)};vM.prototype.D=function(a){W(this,2,a)};vM.prototype.O=function(){this.D(void 0)};var xM=function(a){P(this,a,"chsetcrp",-1,wM)};r(xM,O);var wM=[2];xM.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=V(this,$t,2);0<b.length&&N(a,2,b,au);return H(a)};Qq("chsetcrp",xM);xM.prototype.getResponseHeader=function(){return U(this,ss,1)};var yM=function(a){P(this,a,0,-1,null)};r(yM,O);yM.prototype.s=function(){var a=new G;zM(this,a);return H(a)};var zM=function(a,b){var c;c=U(a,AM,1);null!=c&&M(b,1,c,BM);c=U(a,AM,2);null!=c&&M(b,2,c,BM);c=Q(a,3);null!=c&&K(b,3,c)},AM=function(a){P(this,a,0,-1,null)};r(AM,O);AM.prototype.s=function(){var a=new G;BM(this,a);return H(a)};var BM=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&L(b,2,c);c=Q(a,3);null!=c&&L(b,3,c)};var CM=function(a){P(this,a,0,-1,null)};r(CM,O);CM.prototype.s=function(){var a=new G;DM(this,a);return H(a)};var DM=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&L(b,2,c);c=Q(a,3);null!=c&&J(b,3,c);c=Q(a,4);null!=c&&L(b,4,c);c=Q(a,5);null!=c&&L(b,5,c);c=Q(a,6);null!=c&&L(b,6,c);c=Q(a,7);null!=c&&K(b,7,c)};CM.prototype.T=function(){return Q(this,6)};CM.prototype.R=function(a){S(this,6,a)};var EM=function(a){P(this,a,0,-1,null)};r(EM,O);EM.prototype.s=function(){var a=new G;FM(this,a);return H(a)};var FM=function(a,b){var c;c=Q(a,1);null!=c&&K(b,1,c);c=U(a,CM,2);null!=c&&M(b,2,c,DM);c=U(a,yM,6);null!=c&&M(b,6,c,zM);c=Q(a,3);null!=c&&L(b,3,c);c=Q(a,4);null!=c&&L(b,4,c);c=Q(a,5);null!=c&&I(b,5,c);c=Q(a,7);null!=c&&mq(b,7,c);c=Q(a,8);null!=c&&L(b,8,c)};var HM=function(a){P(this,a,0,-1,GM)};r(HM,O);var GM=[5];HM.prototype.s=function(){var a=new G;IM(this,a);return H(a)};var IM=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&L(b,2,c);c=Q(a,3);null!=c&&I(b,3,c);c=Q(a,4);null!=c&&I(b,4,c);c=V(a,JM,5);0<c.length&&wq(b,5,c,KM)},JM=function(a){P(this,a,0,-1,null)};r(JM,O);JM.prototype.s=function(){var a=new G;KM(this,a);return H(a)};var KM=function(a,b){var c;c=Q(a,1);null!=c&&L(b,6,c);c=Q(a,2);null!=c&&L(b,7,c)};var MM=function(a){P(this,a,0,-1,LM)};r(MM,O);var LM=[1];MM.prototype.s=function(){var a=new G;NM(this,a);return H(a)};var NM=function(a,b){var c;c=V(a,OM,1);0<c.length&&wq(b,1,c,PM);c=Q(a,15);null!=c&&K(b,15,c);c=Q(a,16);null!=c&&I(b,16,c);c=Q(a,17);null!=c&&I(b,17,c);c=U(a,FJ,18);null!=c&&M(b,18,c,GJ)},OM=function(a){P(this,a,0,-1,QM)};r(OM,O);var QM=[8,9,10,11,12,13];OM.prototype.s=function(){var a=new G;PM(this,a);return H(a)};
var PM=function(a,b){var c;c=Q(a,1);null!=c&&L(b,2,c);c=Q(a,2);null!=c&&L(b,3,c);c=Q(a,3);null!=c&&L(b,4,c);c=Q(a,4);null!=c&&L(b,5,c);c=Q(a,5);null!=c&&L(b,6,c);c=Q(a,6);null!=c&&K(b,7,c);c=Q(a,7);null!=c&&K(b,8,c);c=V(a,RM,8);0<c.length&&N(b,9,c,SM);c=V(a,RM,9);0<c.length&&N(b,10,c,SM);c=V(a,RM,10);0<c.length&&N(b,11,c,SM);c=V(a,RM,11);0<c.length&&N(b,12,c,SM);c=V(a,RM,12);0<c.length&&N(b,13,c,SM);c=V(a,RM,13);0<c.length&&N(b,14,c,SM)},RM=function(a){P(this,a,0,-1,null)};r(RM,O);
RM.prototype.s=function(){var a=new G;SM(this,a);return H(a)};var SM=function(a,b){var c;c=Q(a,1);null!=c&&I(b,1,c);c=Q(a,2);null!=c&&I(b,2,c)};RM.prototype.g=function(a){S(this,1,a)};var TM=function(a){P(this,a,0,-1,null)};r(TM,O);TM.prototype.s=function(){var a=new G;UM(this,a);return H(a)};var UM=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&L(b,2,c);c=Q(a,3);null!=c&&L(b,3,c);c=Q(a,4);null!=c&&I(b,4,c);c=Q(a,5);null!=c&&I(b,5,c);c=U(a,VM,6);null!=c&&M(b,6,c,WM)},VM=function(a){P(this,a,0,-1,null)};r(VM,O);VM.prototype.s=function(){var a=new G;WM(this,a);return H(a)};
var WM=function(a,b){var c;c=Q(a,1);null!=c&&J(b,1,c);c=Q(a,4);null!=c&&J(b,4,c);c=Q(a,7);null!=c&&J(b,7,c);c=Q(a,14);null!=c&&J(b,14,c);c=Q(a,15);null!=c&&I(b,15,c);c=Q(a,16);null!=c&&I(b,16,c);c=Q(a,31);null!=c&&I(b,31,c);c=Q(a,33);null!=c&&J(b,33,c);c=Q(a,35);null!=c&&J(b,35,c);c=Q(a,36);null!=c&&J(b,36,c);c=Q(a,37);null!=c&&J(b,37,c);c=Q(a,38);null!=c&&J(b,38,c);c=Q(a,43);null!=c&&J(b,43,c);c=Q(a,44);null!=c&&J(b,44,c)};var XM=function(a){P(this,a,0,-1,null)};r(XM,O);XM.prototype.s=function(){var a=new G;YM(this,a);return H(a)};var YM=function(a,b){var c;c=Q(a,1);null!=c&&K(b,1,c);c=Q(a,2);null!=c&&K(b,2,c);c=Q(a,3);null!=c&&L(b,3,c);c=Q(a,4);null!=c&&L(b,4,c);c=Q(a,5);null!=c&&mq(b,5,c)},ZM=function(a){var b=Fa();S(a,5,b)};var $M=function(a){P(this,a,0,-1,null)};r($M,O);$M.prototype.s=function(){var a=new G;aN(this,a);return H(a)};var aN=function(a,b){var c;c=Q(a,1);null!=c&&I(b,1,c);c=Q(a,2);null!=c&&I(b,2,c);c=Q(a,3);null!=c&&mq(b,3,c);c=Q(a,4);null!=c&&mq(b,4,c)};var bN=function(a){P(this,a,0,-1,null)};r(bN,O);bN.prototype.s=function(){var a=new G;cN(this,a);return H(a)};
var cN=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&I(b,2,c);c=Q(a,3);null!=c&&I(b,3,c);c=Q(a,4);null!=c&&I(b,4,c);c=Q(a,5);null!=c&&L(b,5,c);c=Q(a,6);null!=c&&I(b,6,c);c=Q(a,7);null!=c&&I(b,7,c);c=Q(a,8);null!=c&&L(b,8,c);c=Q(a,9);null!=c&&I(b,9,c);c=Q(a,10);null!=c&&I(b,10,c);c=Q(a,11);null!=c&&L(b,11,c);c=Q(a,12);null!=c&&L(b,12,c);c=Q(a,13);null!=c&&L(b,13,c);c=Q(a,14);null!=c&&L(b,14,c);c=Q(a,15);null!=c&&L(b,15,c);c=Q(a,16);null!=c&&L(b,16,c);c=Q(a,17);null!=c&&I(b,17,c);
c=Q(a,18);null!=c&&I(b,18,c);c=Q(a,19);null!=c&&L(b,19,c);c=Q(a,20);null!=c&&L(b,20,c);c=U(a,dN,21);null!=c&&M(b,21,c,eN);c=Q(a,22);null!=c&&L(b,22,c);c=U(a,fN,23);null!=c&&M(b,23,c,gN)},dN=function(a){P(this,a,0,-1,null)};r(dN,O);dN.prototype.s=function(){var a=new G;eN(this,a);return H(a)};var eN=function(a,b){var c;c=Q(a,1);null!=c&&J(b,1,c);c=Q(a,2);null!=c&&I(b,2,c);c=Q(a,3);null!=c&&I(b,3,c);c=Q(a,4);null!=c&&I(b,4,c);c=Q(a,5);null!=c&&I(b,5,c)},fN=function(a){P(this,a,0,-1,hN)};r(fN,O);
var hN=[3];fN.prototype.s=function(){var a=new G;gN(this,a);return H(a)};var gN=function(a,b){var c;c=Q(a,1);null!=c&&I(b,1,c);c=Q(a,2);null!=c&&I(b,2,c);c=V(a,iN,3);0<c.length&&N(b,3,c,jN)},iN=function(a){P(this,a,0,-1,null)};r(iN,O);iN.prototype.s=function(){var a=new G;jN(this,a);return H(a)};var jN=function(a,b){var c;c=Q(a,1);null!=c&&K(b,1,c);c=Q(a,2);null!=c&&K(b,2,c);c=Q(a,4);null!=c&&K(b,4,c);c=Q(a,3);null!=c&&K(b,3,c)};bN.prototype.g=function(a){S(this,6,a)};var lN=function(a){P(this,a,0,-1,kN)};r(lN,O);var kN=[11];lN.prototype.s=function(){var a=new G;mN(this,a);return H(a)};
var mN=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&L(b,2,c);c=Q(a,14);null!=c&&L(b,14,c);c=Q(a,21);null!=c&&L(b,21,c);c=Q(a,3);null!=c&&L(b,3,c);c=U(a,gJ,4);null!=c&&M(b,4,c,hJ);c=U(a,HM,5);null!=c&&M(b,5,c,IM);c=U(a,MM,6);null!=c&&M(b,6,c,NM);c=U(a,TM,7);null!=c&&M(b,7,c,UM);c=U(a,bN,8);null!=c&&M(b,8,c,cN);c=U(a,EM,10);null!=c&&M(b,10,c,FM);c=U(a,$M,17);null!=c&&M(b,17,c,aN);c=U(a,XM,15);null!=c&&M(b,15,c,YM);c=Q(a,11);0<c.length&&vq(b,11,c);c=Q(a,12);null!=c&&J(b,12,c);c=Q(a,
9);null!=c&&K(b,9,c);c=Q(a,13);null!=c&&L(b,13,c);c=Q(a,16);null!=c&&L(b,16,c);c=Q(a,18);null!=c&&J(b,18,c);c=Q(a,19);null!=c&&mq(b,19,c);c=Q(a,20);null!=c&&mq(b,20,c);c=Q(a,22);null!=c&&L(b,22,c);c=Q(a,23);null!=c&&L(b,23,c)};h=lN.prototype;h.T=function(){return Q(this,2)};h.R=function(a){S(this,2,a)};h.da=function(){return Q(this,21)};h.M=function(){return Q(this,3)};h.ma=function(a){S(this,3,a)};var nN=function(a){P(this,a,0,-1,null)};r(nN,O);h=nN.prototype;h.s=function(){var a=new G,b;b=U(this,ms,1);null!=b&&M(a,1,b,ns);b=Q(this,2);null!=b&&L(a,2,b);b=U(this,lN,3);null!=b&&M(a,3,b,mN);b=this.C();null!=b&&M(a,4,b,Y);return H(a)};h.setRequestHeader=function(a){W(this,1,a)};h.na=function(a){S(this,2,a)};h.C=function(){return U(this,X,4)};h.D=function(a){W(this,4,a)};h.O=function(){this.D(void 0)};var oN=function(a){P(this,a,"chselrp",-1,null)};r(oN,O);oN.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=this.C();null!=b&&M(a,2,b,Y);return H(a)};Qq("chselrp",oN);oN.prototype.getResponseHeader=function(){return U(this,ss,1)};oN.prototype.C=function(){return U(this,X,2)};oN.prototype.D=function(a){W(this,2,a)};oN.prototype.O=function(){this.D(void 0)};var qN=function(a){P(this,a,0,-1,pN)};r(qN,O);var pN=[4];h=qN.prototype;h.s=function(){var a=new G,b;b=U(this,ms,1);null!=b&&M(a,1,b,ns);b=this.C();null!=b&&M(a,3,b,Y);b=V(this,eu,4);0<b.length&&N(a,4,b,fu);return H(a)};h.setRequestHeader=function(a){W(this,1,a)};h.C=function(){return U(this,X,3)};h.D=function(a){W(this,3,a)};h.O=function(){this.D(void 0)};var sN=function(a){P(this,a,"chsemrp",-1,rN)};r(sN,O);var rN=[4];sN.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=this.C();null!=b&&M(a,3,b,Y);b=V(this,eu,4);0<b.length&&N(a,4,b,fu);return H(a)};Qq("chsemrp",sN);sN.prototype.getResponseHeader=function(){return U(this,ss,1)};sN.prototype.C=function(){return U(this,X,3)};sN.prototype.D=function(a){W(this,3,a)};sN.prototype.O=function(){this.D(void 0)};var uN=function(a){P(this,a,0,-1,tN)};r(uN,O);var tN=[4];h=uN.prototype;h.s=function(){var a=new G,b;b=U(this,ms,1);null!=b&&M(a,1,b,ns);b=this.Y();null!=b&&M(a,2,b,ju);b=this.C();null!=b&&M(a,3,b,Y);b=V(this,iu,4);0<b.length&&N(a,4,b,ju);return H(a)};h.setRequestHeader=function(a){W(this,1,a)};h.Y=function(){return U(this,iu,2)};h.C=function(){return U(this,X,3)};h.D=function(a){W(this,3,a)};h.O=function(){this.D(void 0)};var wN=function(a){P(this,a,"chsomrp",-1,vN)};r(wN,O);var vN=[4];wN.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=this.Y();null!=b&&M(a,2,b,ju);b=this.C();null!=b&&M(a,3,b,Y);b=V(this,iu,4);0<b.length&&N(a,4,b,ju);return H(a)};Qq("chsomrp",wN);h=wN.prototype;h.getResponseHeader=function(){return U(this,ss,1)};h.Y=function(){return U(this,iu,2)};h.C=function(){return U(this,X,3)};h.D=function(a){W(this,3,a)};h.O=function(){this.D(void 0)};var xN=function(a){P(this,a,0,-1,null)};r(xN,O);h=xN.prototype;h.s=function(){var a=new G,b;b=U(this,ms,1);null!=b&&M(a,1,b,ns);b=Q(this,2);null!=b&&L(a,2,b);b=Q(this,3);null!=b&&L(a,3,b);b=Q(this,4);null!=b&&L(a,4,b);return H(a)};h.setRequestHeader=function(a){W(this,1,a)};h.T=function(){return Q(this,2)};h.R=function(a){S(this,2,a)};h.M=function(){return Q(this,3)};h.ma=function(a){S(this,3,a)};h.ga=function(){return Q(this,4)};var yN=function(a){P(this,a,"chsoqrp",-1,null)};r(yN,O);yN.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=this.Y();null!=b&&M(a,2,b,ju);return H(a)};Qq("chsoqrp",yN);yN.prototype.getResponseHeader=function(){return U(this,ss,1)};yN.prototype.Y=function(){return U(this,iu,2)};var AN=function(a){P(this,a,0,-1,zN)};r(AN,O);var zN=[4];h=AN.prototype;h.s=function(){var a=new G,b;b=U(this,ms,1);null!=b&&M(a,1,b,ns);b=this.C();null!=b&&M(a,3,b,Y);b=V(this,vu,4);0<b.length&&N(a,4,b,wu);return H(a)};h.setRequestHeader=function(a){W(this,1,a)};h.C=function(){return U(this,X,3)};h.D=function(a){W(this,3,a)};h.O=function(){this.D(void 0)};var CN=function(a){P(this,a,"chstmrp",-1,BN)};r(CN,O);var BN=[4];CN.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=this.C();null!=b&&M(a,3,b,Y);b=V(this,vu,4);0<b.length&&N(a,4,b,wu);return H(a)};Qq("chstmrp",CN);CN.prototype.getResponseHeader=function(){return U(this,ss,1)};CN.prototype.C=function(){return U(this,X,3)};CN.prototype.D=function(a){W(this,3,a)};CN.prototype.O=function(){this.D(void 0)};var DN=function(a){P(this,a,0,-1,null)};r(DN,O);h=DN.prototype;h.s=function(){var a=new G,b;b=U(this,ms,1);null!=b&&M(a,1,b,ns);b=Q(this,2);null!=b&&K(a,2,b);b=Q(this,3);null!=b&&L(a,3,b);b=Q(this,4);null!=b&&L(a,4,b);b=Q(this,5);null!=b&&L(a,5,b);return H(a)};h.setRequestHeader=function(a){W(this,1,a)};h.na=function(a){S(this,3,a)};h.Qa=function(){return Q(this,4)};h.T=function(){return Q(this,5)};h.R=function(a){S(this,5,a)};var EN=function(a){P(this,a,"chstqrp",-1,null)};r(EN,O);EN.prototype.s=function(){var a=new G,b;b=this.getResponseHeader();null!=b&&M(a,1,b,ts);b=this.ib();null!=b&&M(a,2,b,wu);return H(a)};Qq("chstqrp",EN);EN.prototype.getResponseHeader=function(){return U(this,ss,1)};EN.prototype.ib=function(){return U(this,vu,2)};var FN={So:0,hn:1,gn:2,sp:3,rq:4,qq:5,pq:6,SUCCESS:7};var GN=function(a){this.a=a.a;this.b=u(a.b)};GN.prototype.toString=function(){return"SsrcGroup(semantics="+this.a+", ssrcs="+this.b+")"};GN.prototype.tb=function(){return u(this.b)};var HN=function(){this.a=null;this.b=[]},IN=function(a,b){a.a=b;return a},JN=function(a,b){a.b=u(b);return a};var KN=function(a){this.l=a.a;this.m=a.o;this.w=a.f;this.o=a.l;this.h=a.v;this.g=a.h;this.oc=a.m;this.b=a.w;this.v=u(a.g);this.a=u(a.b);this.f=u(a.u)};h=KN.prototype;h.toString=function(){return"Stream(participantId="+this.m+", mediaType="+this.l+", sourceId="+this.w+", streamId="+this.o+", muted="+this.h+", croppable="+this.g+", mediaStreamId="+this.oc+", mediaStreamTrackId="+this.b+", ssrcs="+this.v+", rids="+this.a+", ssrcGroups="+this.f+")"};h.U=function(){return this.l};h.M=function(){return this.m};
h.ga=function(){return this.w};h.Qa=function(){return this.o};h.cc=function(){return this.h};h.fe=function(){return this.g};h.tb=function(){return u(this.v)};
var LN=function(a,b){return a.M()==b.M()&&a.U()==b.U()&&a.ga()==b.ga()&&a.Qa()==b.Qa()},MN=function(a){this.a=a?a.l:null;this.o=a?a.m:"";this.f=a?a.w:null;this.l=a?a.o:null;this.v=a?a.h:!1;this.h=a?a.g:!0;this.m=a?a.oc:null;this.w=a?a.b:null;this.g=a?u(a.v):[];this.b=a?u(a.a):[];this.u=a?u(a.f):[]},NN=function(a){return new KN(a)},ON=function(a,b){a.a=b;return a},PN=function(a,b){a.o=b;return a},QN=function(a,b){a.f=b;return a},RN=function(a,b){a.l=b;return a},SN=function(a,b){a.v=b;return a},TN=
function(a,b){a.h=b;return a},UN=function(a,b){a.m=b;return a},VN=function(a,b){a.w=b;return a},WN=function(a,b){a.g=u(b);return a},XN=function(a,b){a.u=u(b);return a};var YN=function(a,b,c,d){B.call(this);this.m=a;this.o=b;this.b=c;this.f=k(d)?d:"za"};r(YN,B);h=YN.prototype;h.M=function(){return this.m};h.ga=function(){return this.o};h.getState=function(){return this.f};h.Ha=function(a){a!=this.f&&(this.f=a,this.dispatchEvent("R"))};h.getInfo=function(){return this.b};var ZN=function(a,b,c){var d=a.Y();YN.call(this,d.M(),d.getId(),b,c);this.a=a};r(ZN,YN);var $N=function(a){B.call(this);this.H=a;this.H.K=this;this.l(this.H)};r($N,B);$N.prototype.f="Ca";var bO=function(a){return{config:a.N(),muted:a.vd(),state:aO(a)}};$N.prototype.Y=function(){return this.H};$N.prototype.vd=function(){return"c"==this.Y().getState()};$N.prototype.N=function(){return null};
var aO=function(a){switch(a.f){case "Ba":return chrome.i18n.getMessage("6950033741572394811");case "Ca":return chrome.i18n.getMessage("8757444822404164848");case "Da":return chrome.i18n.getMessage("4782049665629043191");case "Ea":return chrome.i18n.getMessage("2100823569845184829");case "Fa":return chrome.i18n.getMessage("99290588561553105");case "Ga":return chrome.i18n.getMessage("7017840133230118615")}return""};$N.prototype.Eh=pa;$N.prototype.Jf=pa;$N.prototype.V=pa;var cO={On:"INITIAL",mq:"STARTING",lq:"STARTED",Rn:"INPROGRESS",PAUSED:"PAUSED",STOPPED:"STOPPED",FINISHED:"FINISHED"},dO=function(a,b,c){A.call(this,"X");this.state=a;this.a=b;this.ac=c};r(dO,A);var eO=function(a,b,c,d,e,f,g,m,q,y,D){this.Yb=a;this.Uc=b;this.nc=c;this.kc=d;this.Kc=e;this.ya=f;this.od=g;this.Cc=m;this.yd=q;this.Fd=k(y)?y:null;this.Gd=k(D)?D:null};eO.prototype.ta=function(){return this.ya};var fO=function(a){this.a=a.a;this.b=a.b};fO.prototype.toString=function(){return"CodecParam(key="+this.a+", value="+this.b+")"};var gO=function(){this.b=this.a=null},hO=function(a){var b=new gO;b.a=a;return b},iO=function(a,b){a.b=b;return a};var jO=function(a){this.h=a.l;this.a=a.m;this.m=a.h;this.l=a.b;this.f=a.g;this.b=a.f;this.g=a.a};jO.prototype.toString=function(){return"Codec(name="+this.m+", mediaType="+this.h+", payloadType="+this.a+", bitrate="+this.l+", clockrate="+this.f+", channels="+this.b+", params="+this.g+")"};jO.prototype.U=function(){return this.h};jO.prototype.getName=function(){return this.m};
var kO=function(a){return(a=kb(a.g,function(a){return"apt"==a.a}))?a.b:null},lO=function(a,b){a=a.getName();a=String(a).toLowerCase();b=String(b).toLowerCase();return 0==(a<b?-1:a==b?0:1)},mO=function(a){this.l=a?a.h:null;this.m=a?a.a:null;this.h=a?a.m:null;this.b=a?a.l:null;this.g=a?a.f:null;this.f=a?a.b:null;this.a=a?u(a.g):[]},nO=function(a,b){a.l=b;return a},oO=function(a,b){a.m=b;return a},pO=function(a,b){a.h=b;return a},qO=function(a,b){a.g=b;return a},rO=function(a,b){a.f=b;return a},sO=function(a,
b,c){c=new fO(iO(hO(b),c));var d=jb(a.a,function(a){return a.a==b});-1==d?a.a.push(c):a.a[d]=c;return a};var tO=function(a){this.a=a.f;this.f=a.a;this.g=a.b;this.b=a.g};tO.prototype.toString=function(){return"Crypto(suite="+this.a+", keyParams=<redacted>, sessionParams_="+(null!=this.g?"<redacted>":null)+", tag="+this.b+")"};var uO=function(){this.g=this.b=this.a=this.f=null};var vO=function(a,b,c,d){this.b=a;this.g=b;this.a=c;this.f=d};vO.prototype.toString=function(){return"DataChannelDescriptor(label="+this.f+" id="+this.b+", SSRC="+this.a+", format="+this.g+")"};vO.prototype.getChannelId=function(){return this.b};vO.prototype.Sb=function(){return this.f};vO.prototype.equals=function(a){return null==a?!1:this.b==a.b&&this.f==a.f&&this.a==a.a};var wO=function(a){this.a=a.a;this.b=a.b;this.f=a.f};wO.prototype.toString=function(){return"BandwidthConstraints("+("minBandwidthKbps="+this.b+", ")+("maxBandwidthKbps="+this.a+", ")+("startBandwidthKbps="+this.f)};var xO=function(){this.f=this.b=this.a=-1};var yO=function(a){this.a=a.b;this.xa=a.xa;this.b=a.a};yO.prototype.toString=function(){return"RtpHeaderExtension(uri="+this.a+", id="+this.xa+", mediaType="+this.b+")"};yO.prototype.getId=function(){return this.xa};yO.prototype.U=function(){return this.b};var zO=function(){this.a=this.xa=this.b=null},AO=function(a){var b=new zO;b.b=a;return b};var BO=function(a){this.ya=a.ya;this.f=a.b;this.b=a.f;this.a=a.a},CO=function(a){return{port:a.ta(),name:a.getName(),messagesize:a.b,numstreams:a.a}};BO.prototype.ta=function(){return this.ya};BO.prototype.getName=function(){return this.f};var DO=function(){this.a=this.f=this.b=this.ya=null},EO=function(a,b){a.ya=b;return a},FO=function(a,b){a.b=b;return a},GO=function(a,b){a.a=b;return a};var HO=function(a,b,c){this.g=a;this.v=b;this.b=null;this.f=c;this.o=[];this.w="";this.l=[];this.m=this.h=!0;this.a=null},LO=function(a){var b=a.b?CO(a.b):{};return{type:a.g,mediaId:IO(a),bandwidthConstraints:a.a&&a.a.toString(),codecs:JO(a),streams:KO(a),sctpSettings:b,defaultRequests:fb(u(a.l),function(a){return a.toString()}),send:a.h,receive:a.m}},JO=function(a){return u(a.v)},MO=function(a,b){a=Xb(a);a.v=b;return a},NO=function(a,b){a=Xb(a);a.b=b;return a},OO=function(a,b){a=Xb(a);a.f=b;return a},
KO=function(a){return u(a.o)},PO=function(a,b){a=Xb(a);a.o=b;return a},IO=function(a){if(a.w)return a.w;switch(a.g){case "a":return"audio";case "v":return"video";case "d":return"data";default:return ab("No default media ID for unknown type: "+a.g),""}},QO=function(a,b){a=Xb(a);a.w=b;return a},RO=function(a,b){a=Xb(a);a.l=b;return a},SO=function(a,b){null==b&&(b=-1);a=Xb(a);var c=new xO;c.a=b;a.a=new wO(c);return a},TO=function(a){return a.a?a.a.a:null},UO=function(a,b){a=Xb(a);a.a=b;return a},VO=
function(a,b){a=Xb(a);a.h=b;return a},WO=function(a,b){a=Xb(a);a.m=b;return a},XO=function(a,b,c){var d=KO(a),e=Hb(c,function(a){return a.Qa()});vb(d,function(a){return a.Qa()in e});d=wb(d,b);return PO(a,d)},ZO=function(a){return YO(a,function(a){return lO(a,"opus")})},YO=function(a,b){b=jb(a.v,b);if(-1==b)return a;var c=JO(a),d=c[b];sb(c,b);qb(c,0,0,d);return MO(a,c)},aP=function(a,b){if(null==b)return a;var c=Xb(a),d=TO(b);d&&(c=SO(c,d));d=JO(b);nb(d)||(c=MO(c,d));(d=b.b)&&(c=NO(c,d));d=u(b.f);
nb(d)||(c=OO(c,d));d=u(b.l);nb(d)||(c=RO(c,d));a=$O(KO(a),KO(b),function(a){return a.Qa()});return PO(c,a)},$O=function(a,b,c){a=Hb(a,c);ac(a,Hb(b,c));return Pb(a)};var bP=function(a,b,c,d,e,f){this.m=a;this.f=b;this.b=c;this.a=d||null;this.l=null;this.g=e||[];this.h=f||"full"};bP.prototype.ub=function(){return this.m};var cP=function(a,b){a=Xb(a);a.l=b;return a};var dP=function(a,b,c,d,e,f,g){this.b=a||null;this.a=b||null;this.f=c||null;this.m=k(d)?d:null;this.l=new C;mi(this.l,Hb(e||[],function(a){return a.Sb()},this));this.g=f||null;this.h=g||[]},fP=function(a,b){var c=a.a;if(!c)return a;b=eb(JO(c),b);var d=fb(b,function(a){return a.a.toString()});b=eb(b,function(a){return!lO(a,"rtx")||mb(d,kO(a))});return eP(a,MO(c,b))},gP=function(a){return{sessionId:a.m,audio:a.b&&LO(a.b),video:a.a&&LO(a.a),data:a.f&&LO(a.f),pushChannels:a.l.P()&&a.l.P().toString(),
cryptos:u(a.h)}},hP=function(a){var b=Xb(a);b.l=a.l.clone();return b},iP=function(a,b){a=hP(a);a.b=b;return a},eP=function(a,b){a=hP(a);a.a=b;return a},jP=function(a,b){a=hP(a);a.f=b;return a},kP=function(a,b){a=hP(a);a.g=b;return a},lP=function(a,b){a=hP(a);a.h=b;return a},nP=function(a,b,c){a=hP(a);a.b=mP(a.b,b,c);a.a=mP(a.a,b,c);a.f=mP(a.f,b,c);return a},mP=function(a,b,c){if(null==a)return null;b=eb(b,function(b){return b.U()==a.g});c=eb(c,function(b){return b.U()==a.g});return XO(a,b,c)},oP=
function(a,b){var c=a.b;null!=c?c=aP(c,b.b):c=b.b;var d=a.a;null!=d?d=aP(d,b.a):d=b.a;return eP(iP(a,c),d)};var pP=function(){},qP=function(){return{autoGainControl:!0,echoCancellation:!0,highPassFilter:!0,inbandFec:!0,dtx:!0,noiseSuppression:!0,preferredSendCodec:null,sendComfortNoise:!0,sendOpus:!0,sendStereo:!1,stereoSwapping:!1,transientSuppression:!0}};var rP=function(a){B.call(this);this.a=a;this.g=R(this.a,3,0);this.f=0;this.b=!1};r(rP,B);var sP=function(a){A.call(this,"Y");this.id=a};r(sP,A);var tP=function(a,b,c,d,e,f,g){this.h=a;this.m=b;this.l=c;this.f=k(d)?Xb(d):null;this.a=k(e)?e:null;this.b=k(f)?f:!0;this.g=k(g)?g:null;this.w=[]};tP.prototype.toString=function(){return"{participantId: "+this.h+", sourceId: "+this.m+", mediaType: "+this.l+", resolution: "+(null==this.f?"":this.f.width+"x"+this.f.height)+", frameRate: "+this.a+", adaptationReason: 0, send: "+this.b+", ssrcs: "+this.w+"}"};tP.prototype.M=function(){return this.h};tP.prototype.U=function(){return this.l};
tP.prototype.ga=function(){return this.m};var uP=function(a){return null!=a.f?Xb(a.f):null};tP.prototype.tb=function(){return this.w};
var vP=function(a){return new tP(a.h,a.m,a.l,null!=a.f?a.f:void 0,null!=a.a?a.a:void 0,!1,null!=a.g?a.g:void 0)},wP=function(a){return null!=a.f?a.f.width:null},xP=function(a){return null!=a.f?a.f.height:null},yP=function(a){var b=a;if(null==wP(a)||0<wP(a))b=new tP(b.h,b.m,b.l,new Sq(0,xP(b)||0),null!=b.a?b.a:void 0,null!=b.b?b.b:void 0,null!=b.g?b.g:void 0);if(null==xP(a)||0<xP(a))b=new tP(b.h,b.m,b.l,new Sq(wP(b)||0,0),null!=b.a?b.a:void 0,null!=b.b?b.b:void 0,null!=b.g?b.g:void 0);return b},zP=
function(a){return null==a.a||0<a.a?new tP(a.h,a.m,a.l,null!=a.f?a.f:void 0,0,null!=a.b?a.b:void 0,null!=a.g?a.g:void 0):a};var AP=function(){this.B=this.m=this.l=!0;this.K=!1;this.b=null;this.h=[];this.g=this.f=!1;this.v=null;this.A=!0;this.a=!1;this.F=[{urls:["stun:stun.l.google.com:19302","stun:stun1.l.google.com:19302","stun:stun2.l.google.com:19302","stun:stun3.l.google.com:19302","stun:stun4.l.google.com:19302"]}];this.J=!0;this.H=new pP;this.u=!1;this.aa=!0;this.N=!1;this.w=null;this.o=void 0},BP=function(a){return{useAudio:a.l,useVideo:a.m,useData:!0,useVideoRtx:a.B,dumpRtpHeaders:a.K,allowEarlyMedia:!0,earlyMediaHangoutId:a.b,
defaultRequests:a.h,useStandardIce:!0,debugLogUploadAllowed:a.f,debugLogUploadForced:a.g,clientResource:a.v,useSimulcast:a.A,useP2P:a.a,useTURN:!1,startMuted:a.J,useDtls:a.u,playAudio:!0,useConferenceMode:a.aa,useDetours:!1,allowH264:!1,allowVP9:!1,useAdaptiveLayering_:a.N,useMsodc:!1,useWebrtcCpuAdaptation:!0,bandwidthConstraints:a.w,jmiIntervalMs:a.o}},CP=function(){var a=Xb(new AP);a.m=!0;a=Xb(a);a.l=!1;return a},DP=function(a,b){if(a.f&&a.g)return a;a=Xb(a);a.f=b;return a},EP=function(a){a=Xb(a);
a.g=!0;return a},FP=function(a,b){a=Xb(a);a.b=b;return a},GP=function(a,b){a=Xb(a);a.h=b;return a},HP=function(a){a=Xb(a);a.A=!1;return a},IP=function(a,b){a=Xb(a);a.aa=b;return a};var JP=function(){B.call(this);this.Ta=this.B=null};r(JP,B);var KP=function(a){return{hangoutId:a.Ta,isInProgress:"INPROGRESS"==a.getState(),remoteJid:a.B,sessionId:a.b,state:a.getState()}};h=JP.prototype;h.pc=pa;h.update=function(){return!0};h.zc=pa;h.zh=pa;h.kg=pa;h.R=function(a){this.Ta=a};var LP=function(a,b){A.call(this,"$");this.a=a;this.b=b};r(LP,A);var MP=function(a){A.call(this,"aa");this.a=a};r(MP,A);var NP=function(a){A.call(this,"ca");this.a=a};r(NP,A);
var OP=function(a,b){A.call(this,"ba");this.b=a;this.a=b};r(OP,A);var PP=function(a,b,c){A.call(this,"Z");this.b=a;this.label=b;this.payload=c};r(PP,A);var QP=function(a){A.call(this,"ea");this.a=a};r(QP,A);var RP=function(){B.call(this)};r(RP,B);var SP=function(a){return{id:a.a,isInProgress:"INPROGRESS"==a.getState(),state:a.getState()}};RP.prototype.pause=pa;RP.prototype.resume=pa;RP.prototype.Kb=pa;var TP=function(a,b,c){A.call(this,"ha");this.b=u(a);this.a=u(b);this.removed=u(c)};r(TP,A);var UP=function(a){A.call(this,"ia");this.a=u(a)};r(UP,A);var VP=function(){this.b=this.a=this.g=this.l=this.f=null},WP=function(a,b){a.f=b;return a},XP=function(a,b){a.f&&S(b,14,a.f);a.g&&S(b,16,a.g);a.a&&S(b,22,a.a);a.b&&S(b,23,a.b)};VP.prototype.toString=function(){return"{ ParticipantLogId: "+(this.f||"")+", MucJid: "+(this.l||"")+", SyntheticId: "+(this.g||"")+", MeetingCode: "+(this.a||"")+", MeetingSpaceId: "+(this.b||"")+" }"};var YP=function(a,b,c){YN.call(this,b.M(),b.ga(),b,c);this.a=!1};r(YP,YN);var ZP=function(){B.call(this);this.Oa="INITIAL";this.wc=void 0};r(ZP,B);ZP.prototype.Ua=function(){return{state:this.getState(),endCause:this.wc,id:this.b.a,isInProgress:"INPROGRESS"==this.getState(),localId:this.da(),localDescription:gP(this.a.a.b),localSession:KP(this.a),options:BP(this.g),remoteAudioCodecs:fb(u(this.Wa),function(a){return a.toString()}),remoteSession:SP(this.b),useEarlyMedia:null!=this.g.b&&0<this.g.h.length}};ZP.prototype.getState=function(){return this.Oa};ZP.prototype.Ah=pa;
var $P=function(){A.call(this,"qa")};r($P,A);var aQ=function(a){A.call(this,"sa");this.sessionId=a};r(aQ,A);var bQ=function(a){A.call(this,"la");this.id=a};r(bQ,A);var cQ=function(a){A.call(this,"ma");this.sessionDescription=a};r(cQ,A);var dQ=function(a,b,c){A.call(this,"va");this.lg=a;this.Gh=b;this.sessionId=c||null};r(dQ,A);var eQ=function(){A.call(this,"ta")};r(eQ,A);var fQ=function(a,b){A.call(this,"pa");this.a=a;this.sessionId=b};r(fQ,A);var gQ=function(a){A.call(this,"oa");this.message=a};
r(gQ,A);var hQ=function(a,b,c,d){this.a=a;this.b=b;this.width=c;this.height=d};hQ.prototype.clone=function(){return new hQ(this.a,this.b,this.width,this.height)};hQ.prototype.toString=function(){return"("+this.a+", "+this.b+" - "+this.width+"w x "+this.height+"h)"};var iQ=function(a,b){return a==b?!0:a&&b?a.a==b.a&&a.width==b.width&&a.b==b.b&&a.height==b.height:!1};hQ.prototype.contains=function(a){return this.a<=a.a&&this.a+this.width>=a.a+a.width&&this.b<=a.b&&this.b+this.height>=a.b+a.height};
hQ.prototype.ceil=function(){this.a=Math.ceil(this.a);this.b=Math.ceil(this.b);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};hQ.prototype.floor=function(){this.a=Math.floor(this.a);this.b=Math.floor(this.b);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};hQ.prototype.round=function(){this.a=Math.round(this.a);this.b=Math.round(this.b);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};var kQ=function(a,b,c,d,e,f,g){B.call(this);this.h=a;this.xa=b;this.a=c;this.cb=k(d)?d:"f";this.f=k(e)?e:"b";this.g=!1;this.b=null;jQ(this,g||null);this.Hd=k(f)?f:null};r(kQ,B);h=kQ.prototype;h.toString=function(){return"Source(id="+this.xa+" type="+this.a+" content="+this.cb+" state="+this.f+" participantId="+this.h+")"};h.M=function(){return this.h};h.ma=function(a){this.h=a};h.getId=function(){return this.xa};h.getState=function(){return this.f};h.Ha=function(a){this.f!=a&&(this.f=a,this.dispatchEvent("ya"))};
h.fe=function(){return this.g};var jQ=function(a,b){var c=null!=a.b&&!nb(a.b),d=null!=b&&!nb(b);d?(b=u(b),Cb(b,function(a,b){return a.a-b.a||a.b-b.b||a.width-b.width||a.height-b.height})):b=null;if(c=d!=c||d&&!Gb(a.b,b,iQ))a.b=b;return c};kQ.prototype.dispatchEvent=function(a){return kQ.W.dispatchEvent.call(this,a)};var lQ=function(a){B.call(this);this.b=a||!1;this.a=[]};r(lQ,B);lQ.prototype.add=function(a,b){if(null!=mQ(this,a.a,a.getId(),a.M()))return!1;this.a.push(a);if(!k(b)||b)a.K=this;this.dispatchEvent(new nQ("Aa",a));return!0};lQ.prototype.remove=function(a){return tb(this.a,a)?(a.K==this&&(a.K=null),this.dispatchEvent(new nQ("Ba",a)),!0):!1};
var mQ=function(a,b,c,d){return kb(a.a,function(a){var e=a.a==b,g=null==c||a.getId()==c,m=null==d||this.b&&""===d||a.M()==d;!m&&this.b&&""==a.M()&&(ab("Should never allow Source matching against empty participantId"),m=!0);return e&&g&&m},a)},nQ=function(a,b){A.call(this,a);this.source=b};r(nQ,A);var oQ=function(){B.call(this)};r(oQ,B);var pQ=function(a,b){A.call(this,a);this.a=b};r(pQ,A);pQ.prototype.M=function(){return this.a};var qQ=function(a){this.ra=a.ra;this.b=a};r(qQ,Nw);h=qQ.prototype;h.Ga=Uw();h.ve=Uw();h.tf=Uw();h.th=Uw();h.sh=Uw();h.Bd=Uw();var sQ=function(a,b,c){ZN.call(this,a,c,"za");this.h=b;this.g=new tr(this);this.l(this.g);this.g.listen(this.a,"V",function(a){a=a.Fl;null==a||La(a)||this.dispatchEvent(new rQ(this.h,a))})};r(sQ,ZN);var rQ=function(a,b){A.call(this,"$a");this.sessionId=a;this.url=b};r(rQ,A);var tQ=function(a){var b=na.navigator||null;if(Zj&&null!=b.webkitGetUserMedia){var c=Vb();b.webkitGetUserMedia(a,c.resolve,c.b);return c.a}return Vj&&b.mediaDevices&&b.mediaDevices.getUserMedia?be(b.mediaDevices.getUserMedia(a)):ce("Missing getUserMedia API.")};var uQ=function(a,b){this.hc=a;this.deviceId=null!=b?b:null};uQ.prototype.equals=function(a){return a===this?!0:a?this.hc===a.hc&&this.deviceId===a.deviceId:!1};uQ.prototype.a=function(){var a={};Zj?(a.optional=[],a.optional.push({sourceId:this.deviceId})):Vj&&(a.deviceId=this.deviceId);return a};uQ.prototype.toString=function(){return na.JSON.stringify(this)};var vQ=function(a,b,c,d,e,f,g,m){uQ.call(this,a,m);this.f=b;this.minWidth=c;this.minHeight=d;this.b=e;this.maxWidth=f;this.maxHeight=g};
r(vQ,uQ);vQ.prototype.equals=function(a){return this===a?!0:a instanceof vQ?vQ.W.equals.call(this,a)&&this.f===a.f&&this.minWidth===a.minWidth&&this.minHeight===a.minHeight&&this.b===a.b&&this.maxWidth===a.maxWidth&&this.maxHeight===a.maxHeight:!1};
vQ.prototype.a=function(){var a=vQ.W.a.call(this);if(Zj)a.optional.push({minRefreshRate:this.f}),a.optional.push({minHeight:this.minHeight}),a.optional.push({minWidth:this.minWidth}),a.optional.push({maxRefreshRate:this.b}),a.optional.push({maxWidth:this.maxWidth}),a.optional.push({maxHeight:this.maxHeight});else if(Vj){var b={};b.max=this.maxHeight;b.min=this.minHeight;var c={};c.max=this.maxWidth;c.min=this.minWidth;a.height=b;a.width=c}return a};var wQ=function(a){this.a=new YI(a)};wQ.prototype.error=function(a){var b=this.a;aj(b.j,a);OI(b.a,b.f,"Error("+b.b+"): "+a,10)};var xQ=function(a,b){ZI(a.a,b)},Z=function(a,b){$I(a.a,b)};var yQ=function(a,b){$N.call(this,a);this.a=new wQ("realtime.media.api.webrtc.Capture");this.settings=b;this.o=this.b=null;this.A=new zi;this.m=new C;this.h=!1;this.Z="";this.g=!1;this.J=null};r(yQ,$N);yQ.prototype.X=function(){zQ(this);this.A.clear();this.J=null;yQ.W.X.call(this)};yQ.prototype.toString=function(){return"Capture(source="+this.Y()+" muted="+this.h+" paused="+this.g+" stream="+(this.b?this.b.id:null)+" streamUrl="+this.o+")"};
yQ.prototype.B=function(a){a&&t(wb(a.getAudioTracks(),a.getVideoTracks()),function(a){if(a)if(td(a))a.sb&&a.sb.removeAll(void 0);else{var b=Id(a);if(b){var d=0,e;for(e in b.a)for(var f=b.a[e].concat(),g=0;g<f.length;++g)Pd(f[g])&&++d}}a.stop()})};var zQ=function(a){a.m.forEach(a.B,a);a.m.clear();a.B(a.b);a.b=null;a.o&&(window.URL.revokeObjectURL(a.o),a.o=null)},AQ=function(a){Z(a.a,"Starting media for "+a);a.f="Ba";a.dispatchEvent("U");a.u().then(Uc(a))};
yQ.prototype.V=function(a){this.Z=a;if(this.b){var b=wb([this.b],this.m.P());t(b,function(b){t(b.getVideoTracks(),function(b){"contentHint"in b&&(b.contentHint=a)})})}};yQ.prototype.getDeviceId=function(){return this.settings.deviceId};yQ.prototype.N=function(){return this.J};yQ.prototype.ib=function(a){return this.b?this.m.get(a,null):null};var BQ=function(a,b,c){return new sQ(a,b,c)};h=yQ.prototype;
h.Eh=function(a){Z(this.a,"Registering sessionId="+a+" with "+this);this.A.add(a);this.b&&this.m.set(a,this.b.clone())};h.Jf=function(a){Z(this.a,"Unregistering sessionId="+a+" with "+this);this.A.remove(a);this.B(this.ib(a));this.m.remove(a)};h.Il=pa;h.stop=function(){Z(this.a,"Stopping "+this);zQ(this);this.A.clear();this.dispatchEvent(new CQ(this.o));this.f="Ga";this.dispatchEvent("U");return!0};h.hc=function(){if("Ga"==this.f)return!1;DQ(this,!0);return!0};
h.vd=function(){switch(this.f){case "Da":case "Ea":case "Fa":return!0;default:return this.h}};var DQ=function(a,b){Z(a.a,"Setting mute state to mute="+b+" for "+a);a.h=b;b=Xb(a.settings);b.hc=a.h;a.settings=b;a.h?zQ(a):a.u();a.Y().Ha(a.vd()?"c":"b");a.dispatchEvent("T")};yQ.prototype.pause=function(){this.g||"Ga"==this.f||(Z(this.a,"Pausing "+this),this.g=!0,zQ(this))};yQ.prototype.resume=function(){this.g&&"Ga"!=this.f&&(Z(this.a,"Resuming "+this),this.g=!1,this.u())};
yQ.prototype.u=function(){if("Ba"!=this.f)return Z(this.a,"Skipping update usermedia for "+this+" while device in state="+this.f),be();if(this.h)return Z(this.a,"Skipping update usermedia for "+this+" because capture is currently muted."),be();if(this.g)return Z(this.a,"Skipping update usermedia for "+this+" because capture is currently paused."),be();var a=EQ(this);if(!a)return a="Attempting to update usermedia for "+this+" with null constraints",this.a.error(a),ce(a);if(Tb(a))return Z(this.a,"Skipping update usermedia for "+
this+" with empty constraints."),be();var b=this.settings;Z(this.a,"Attempting to update UserMedia for "+this);return tQ(a).then(function(a){this.h||this.g||!this.settings.equals(b)?(Z(this.a,"Capture settings changed during stream acquisition for "+this),this.B(a)):FQ(this,a)},function(a){xQ(this.a,"Error calling getUserMedia="+a+" in "+this);throw a;},this)};
var EQ=function(a){var b={};if(null==a.settings.deviceId)return Z(a.a,"Return empty user media constraints for "+a+" with null deviceId."),b;b.audio=!1;b.video=!1;var c=a.Y().a;switch(c){case "a":a=a.settings.a();b.audio=a;break;case "v":a=a.settings.a();b.video=a;break;default:return a.a.error("Invalid mediaType="+c+" for "+a),null}return b},FQ=function(a,b){Z(a.a,"getUserMedia success for stream="+b.id+" in "+a);0==b.getAudioTracks().length&&0==b.getVideoTracks().length?xQ(a.a,"No media tracks for stream="+
b.id+" in "+a):(zQ(a),a.b=b,a.o=window.URL.createObjectURL(b),t(wb(a.b.getAudioTracks(),a.b.getVideoTracks()),function(a){Fd(a,"ended",this.ba,void 0,this)},a),t(a.A.P(),function(a){this.m.set(a,this.b.clone())},a),Z(a.a,"Stream changed in "+a),a.V(a.Z),a.dispatchEvent(new CQ(a.o)))};yQ.prototype.ba=pa;var CQ=function(a){A.call(this,"V");this.Fl=a};r(CQ,A);var GQ=function(){jx(this)};qa(GQ);var HQ=function(a,b){a.ka.vf(b)},IQ=function(a,b){return a.ka.uh(b)},JQ=function(a,b,c){return a.ka.vh(b,c)},KQ=function(a,b){return a.ka.uf(b)},LQ=function(){};r(LQ,Nw);Ow(LQ,GQ);h=LQ.prototype;h.vf=Uw();h.wf=Uw();h.uh=Uw();h.vh=Uw();h.uf=Uw();h.wh=Uw();var MQ=function(){this.b=new wQ("realtime.media.api.webrtc.ExtensionDelegate")};r(MQ,LQ);Pw(MQ,LQ,1);MQ.prototype.vf=function(a){return hr(function(b){a(b)})};MQ.prototype.wf=function(){return WI()};
var NQ=function(a,b,c){var d=VI({method:"logging.setMetadata",metaData:[{key:"sessionId",value:b},{key:"url",value:window.location.href}]}).then(function(){aJ(this.b.a,"Extension logging setMetadata succeeded for "+b)},function(a){aJ(this.b.a,"Extension loggings setMetadata failed for session: "+b+", error: "+a)},a);c&&me(d,function(){return NQ(this,b,!1)},a);return d};MQ.prototype.uh=function(a){return NQ(this,a,!0).then(function(){return OQ(this,!0)},void 0,this)};
MQ.prototype.vh=function(a,b){if(b)return VI({method:"logging.stopAndUpload"}).then(function(a){Z(this.b,"logging.stopAndUpload succeeded with result="+Zi(a))},function(a){xQ(this.b,"logging.stopAndUpload failed with error="+a);throw a;},this);this.uf(!1);return me(VI({method:"logging.stop"}).then(function(){Z(this.b,"logging.stop succeeded");if(a)return(0<=Ya(Nn,42)?VI({method:"logging.store",logId:a}):VI({method:"logging.stop"})).then()},void 0,this),function(a){xQ(this.b,"logging.stop failed with error="+
a);throw a;},this)};MQ.prototype.uf=function(a){return a?VI({method:"logging.startRtpDump",incoming:!0,outgoing:!0}).then(function(){Z(this.b,"logging.startRtpDump succeeded")},function(a){Z(this.b,"logging.startRtpDump failed with error="+a);throw a;},this):VI({method:"logging.stopRtpDump",incoming:!0,outgoing:!0}).then(function(){Z(this.b,"logging.stopRtpDump succeeded")},function(a){Z(this.b,"logging.stopRtpDump failed with error="+a);throw a;},this)};
var OQ=function(a,b){var c=VI({method:"logging.start"}).then();b&&me(c,function(){return OQ(this,!1)},a);return c};MQ.prototype.wh=function(){return VI({method:"logging.uploadOnRenderClose"}).then()};var PQ=new sr("FolmWb","dlh"),QQ=new sr("Mv4R6b","dds"),RQ=new sr("T3bcCc",void 0,[new sr("EitxU","hl",[QQ])]),SQ=new sr("TjR1Nb","ma",[Ww]);var UQ=function(a){Zy(a,RQ)||Ox(a,RQ,TQ.S())},TQ=function(){this.j=Xi("realtime.analytics.ImpressionLogger")};qa(TQ);var VQ=function(a,b,c,d,e,f,g){b="Impression: "+b;c&&(b+=" SID: "+c);d&&(b+=" PLID: "+d);e&&(b+=" HID: "+e);f&&(b+=" TS: "+f);g&&(b+=" XN: "+g);F(a.j,b)};var XQ=function(a,b,c){bj(WQ,"Asynchronously loading appContext service ("+b+")");var d=Vb();try{null!=c&&xa(c)&&c(a),az(a,b).then(function(a){d.resolve(a)},function(a){aj(WQ,"Error getting service ("+b+"): "+a);d.b(a)})}catch(e){aj(WQ,"Exception thrown getting service ("+b+")",e),d.b(e)}return d.a},WQ=Xi("realtime.util.AsyncServiceResolver");var YQ=function(a){this.a=new wQ("realtime.media.api.webrtc.LoggingManager");this.l=XQ(a,RQ,UQ);this.B=NI.S();this.m=null;this.g=new zi;this.w=new zi;this.f=!1;this.v=this.h=this.b=null;this.A=this.u=!1};YQ.prototype.Ga=function(a){Z(this.a,"Logging manager initialized with userId="+a);this.m=a;return be(7)};
var ZQ=function(a,b,c){Z(a.a,"enableRtpHeaderDump called with sessionId="+b+" and enable="+c);a.A==c?Z(a.a,"Ignoring enableRtpHeaderDump call for sessionId="+b+" as header dump already in state with enable="+c):a.f?KQ(GQ.S(),c).then(function(){Z(this.a,"RTP header dump succeeded for sessionId="+b+" and enable="+c);this.A=c},function(a){xQ(this.a,"Error setting RTP header dump for sessionId="+b+" and enable="+c+". Error="+a);throw a;},a):a.b?(Z(a.a,"Delaying rtp header dump request until native WebRTC logging has started."),
a.b.then(function(){ZQ(this,b,c)},void 0,a)):xQ(a.a,"enableRtpHeaderDump called when native logging is not active or pending")},aR=function(a,b){Z(a.a,"Starting logging for sessionId="+b);a.g.add(b);a.l.then(function(a){VQ(a,3220)});PI(NI.S(),b);$Q(a,b)},cR=function(a,b){if(a.g.contains(b)){Z(a.a,"Stopping logging for sessionId="+b);a.g.remove(b);a.l.then(function(a){VQ(a,3221)});var c=a.w.contains(b);a.w.remove(b);c?(Z(a.a,"Uploading logs for "+b),a.l.then(function(a){VQ(a,2494)}),a.m?(Z(a.a,"################# Save #################"),
c=RI(a.B,b,a.m).then(function(){this.l.then(function(a){VQ(a,2495)})},function(){this.l.then(function(a){VQ(a,2496)})},a)):(xQ(a.a,"Failed to upload beacause of missing user identifier."),c=be())):c=be();var d=bR(a);le(ge([c,d]),function(){var a=NI.S(),c=new Date;OI(a,b,"### Stop ["+c.toString()+"] ### "+b);OI(a,b,"Current time is "+c.toUTCString());delete a.a[b]},a)}else Z(a.a,"Skipping stopLogging call for sessionId="+b+" as logging is not active for this session.")},$Q=function(a,b){a.f||a.b||
(Z(a.a,"Requesting native WebRTC logging for sessionId="+b),a.b=le(IQ(GQ.S(),b).then(function(){this.f=!0;this.v=b;Z(this.a,"Native WebRTC logging started for sessionId="+b)},function(a){xQ(this.a,"Native WebRTC logging failed to start for sessionId="+b+", error: "+a);throw a;},a),function(){this.b=null},a),a.w.contains(b)&&a.b.then(function(){this.o()},void 0,a))},bR=function(a){if(a.h)return a.h;if(!a.f)return be();if(a.b)return a.b.then(function(){bR(this)},void 0,a);if(!a.g.jb())return Z(a.a,
"Ignoring native WebRTC logging stop request due to active session ids="+a.g.P()),be();Z(a.a,"Stopping native WebRTC logging.");a.h=le(JQ(GQ.S(),a.v,a.u).then(function(){Z(this.a,"Request to stop native WebRTC logging succeeded")},function(a){xQ(this.a,"Request to stop native WebRTC logging failed with error="+a);throw a;},a),function(){this.f=!1;this.h=this.v=null},a);return a.h};
YQ.prototype.o=function(){this.u||(Z(this.a,"Requesting upload of the native WebRTC logs"),this.u=!0,GQ.S().ka.wh().then(function(){Z(this.a,"Native uploadLogOnRenderClose succeeded.")},function(a){xQ(this.a,"Native uploadLogOnRenderClose failed with error="+a);throw a;},this))};var dR=function(a,b,c){A.call(this,"ab");this.sessionId=a;c.clone()};ka(dR,A);var eR=function(a,b,c,d){this.b=a;this.key=b;this.a=k(c)?c:null;this.params=d||[]},fR={host:"LOCAL",srflx:"STUN",relay:"RELAY",prflx:"PEER_REFLEX"},gR={audio:"a",video:"v",data:"d",application:"d"};var hR=function(){this.j=Xi("realtime.media.api.webrtc.sdp.Parser");this.a="session";this.h=new C;this.J=new C;this.N=new C;this.o="";this.f=new bP("ICE","","");this.g=[];this.u=null;this.w=new C;this.V=[];this.F=[];this.A=new C;this.B=new C;this.l=[];this.v=this.m=null;this.aa=this.H=!0;this.K=[]},iR=function(a){a.o="";a.g=[];a.u=null;a.w.clear();a.F=[];a.A.clear();a.l=[];a.B.clear();a.m=null;a.v=null;a.H=!0;a.aa=!0};
hR.prototype.parse=function(a){this.b&&(this.b=null,this.f=new bP("ICE","",""),iR(this),this.a="session",this.h.clear(),this.J.clear(),this.N.clear(),this.K=[]);this.b=new dP;t(a.split(/\r?\n/),function(a){if(!La(a)){var b=Za(a,"=",1),d=b[0];2==b.length&&1==d.length||jR(this,"Invalid SDP line: "+a);var b=b[1].split(" "),e=b.shift().split(":");2<e.length&&jR(this,"Invalid key parts: "+e);var f=e[0],b=new eR(a,f,e[1],b);switch(d){case "m":kR(this);iR(this);this.a=f;break;case "a":switch(b.key){case "group":b.a||
jR(this,"Invalid group line: "+b.b);"BUNDLE"!=b.a&&lR(this.h,this.a,b.b);break;case "mid":this.o=b.a;break;case "ice-ufrag":a=b.a;/^[0-9a-zA-Z\+\/]{4,256}$/.test(a)||jR(this,"Invalid ice ufrag line: "+b.b);b=Xb(this.f);b.f=a;this.f=b;break;case "ice-pwd":a=b.a;/^[0-9a-zA-Z\+\/]{22,256}$/.test(a)||jR(this,"Invalid ice pwd line: "+b.b);b=Xb(this.f);b.b=a;this.f=b;break;case "ice-options":(a=b.a)||jR(this,"Empty ice options line: "+b.b);F(this.j,"Ignoring unrecognized ice option: "+a);break;case "fingerprint":(a=
b.a)||jR(this,"Empty fingerprint hash type: "+b.b);1!=b.params.length&&jR(this,"Malformed fingerprint hash value: "+b.b);d=Xb(this.f);d.a=a+" "+b.params[0];this.f=d;break;case "setup":this.f=cP(this.f,b.a);break;case "extmap":a=parseInt(b.a,10);d=b.params[0];(isNaN(a)||!d||1>b.params.length)&&jR(this,"Invalid extmap line: "+b.b);b=AO(d);b.xa=a;if(a=gR[this.a])b.a=a;this.F.push(new yO(b));break;case "crypto":a=parseInt(b.a,10);(isNaN(a)||2>b.params.length)&&jR(this,"Invalid crypto line: "+b.b);d=new uO;
f=b.params.shift();d.f=f;f=b.params.shift();d.a=f;d.b=b.params.join(" ");d.g=a;this.V.push(new tO(d));break;case "rtpmap":a=b.params[0].split("/");d=a[0];(!b.a||1!=b.params.length||2>a.length)&&jR(this,"Invalid rtpmap line: "+b.b);b=qO(rO(oO(pO(nO(new mO,gR[this.a]),d),parseInt(b.a,10)),a[2]?parseInt(a[2],10):1),parseInt(a[1],10));this.g.push(new jO(b));break;case "sctpmap":"application"!=this.a&&"data"!=this.a&&jR(this,"Sctpmap lines with incompatible media type: "+this.a);a=parseInt(b.a,10);(!a||
2>b.params.length)&&jR(this,"Invalid sctpmap line: "+b.b);d=parseInt(b.params[1],10);this.u=new BO(GO(FO(EO(new DO,a),b.params[0]),d));break;case "fmtp":a=b.a;b=b.params.join(" ").split(";");this.w.Ra(a)&&jR(this,"Duplicated fmtp line for payload "+a);this.w.set(a,b);break;case "rtcp-fb":lR(this.J,parseInt(b.a,10),b.b);break;case "ssrc-group":mR(this,b);break;case "msid":b.a||jR(this,"Invalid msid line: "+b.b);1>b.params.length&&jR(this,"Invalid msid line: "+b.b);this.m=b.a;this.v=b.params[0];break;
case "ssrc":(!b.a||1>b.params.length)&&jR(this,"Invalid ssrc line: "+b.b);a=parseInt(b.a,10);d=nR(this,a);nb(this.l)||(f=this.l.reverse(),d.b=u(f),this.l=[]);this.m?(RN(d,this.m),UN(d,this.m)):"data"!=this.a&&"application"!=this.a||RN(d,"");this.v&&VN(d,this.v);f=b.params[0].split(":");switch(f[0]){case "cname":QN(d,f[1]);break;case "msid":VN(UN(RN(d,b.params[1]),f[1]),b.params[1]);break;default:lR(this.N,a,b.b)}break;case "rid":if(1==b.params.length||"send"==b.params[0])b.a?this.l.push(b.a):jR(this,
"rid line has no label.");break;case "simulcast":oR(this,b);case "sendrecv":case "sendonly":case "recvonly":case "inactive":if("recvonly"==b.key||"inactive"==b.key)this.H=!1;if("sendonly"==b.key||"inactive"==b.key)this.aa=!1;break;default:lR(this.h,this.a,b.b)}break;default:lR(this.h,this.a,a)}}},this);kR(this);this.b=lP(kP(this.b,this.f),this.V);F(this.j,"Parsed session data: "+Zi(gP(this.b)));return this.b};
var mR=function(a,b){var c=b.a;1>b.params.length&&jR(a,"Invalid ssrc-group line: "+b.b);b=b.params.map(Number);var d=new GN(JN(IN(new HN,c),b));t(b,function(a){var b=this.A.get(a);b?b.push(d):b=[d];this.A.set(a,b)},a)},oR=function(a,b){if(!(b.a||2>b.params.length||"send"!=b.params[0]||"rid"!=b.params[1].split("=")[0])){var c=b.params[1].split("=")[1].split(";");c.length!=a.l.length&&jR(a,"simulcast line does not match specified rids. "+b.params[1]);c.forEach(function(b){mb(a.l,b)||jR(a,"simulcast line contains unknown rid "+
b)});a.l=c}},nR=function(a,b){var c=a.B.get(b);if(c)return c;var c=a.A.get(b),d=[];c?t(c,function(a){d=d.concat(a.tb())},a):(d.push(b),c=[]);c=XN(WN(ON(new MN,gR[a.a]),d),c);pR(a,c,d);return c},pR=function(a,b,c){t(c,function(a){this.B.set(a,b)},a)},qR=function(a){if(!Ja(a.getName(),"H264"))return!1;var b=!1;u(a.g).forEach(function(a){Ja(a.a,"packetization-mode")&&1==a.b&&(b=!0)});return b},kR=function(a){if("session"!=a.a){var b=fb(eb(a.B.P(),function(a,b,e){return b==e.indexOf(a)&&null!=a.a&&null!=
a.f&&null!=a.l}),function(a){return NN(a)});a.w.forEach(function(a,b){var c=jb(this.g,function(a){return b==a.a});-1==c&&jR(this,"fmtp line has no corresponding codec line, pt="+b);a=a.reduce(function(a,b){b=b.trim().split("=");return 2!=b.length?a:new jO(sO(new mO(a),b[0],b[1]))},this.g[c]);this.g[c]=a},a);a.g=eb(a.g,function(a,b,e){var c=!0;e.forEach(function(d,e){e!=b&&d.getName()==a.getName()&&"v"==a.U()&&(c=c&&qR(a))},this);return c},a);0<a.g.length&&a.u&&jR(a,"Media "+a.o+" contained both RTP and SCTP Settings.");
b=WO(VO(NO(QO(PO(new HO(gR[a.a],a.g,a.F),b),a.o),a.u),a.H),a.aa);switch(a.a){case "audio":a.b=iP(a.b,b);break;case "video":a.b=eP(a.b,b);break;case "application":case "data":a.b=jP(a.b,b)}a.K.push({type:b.g})}},jR=function(a,b){b=Error(b);aj(a.j,"Parsing failed.",b);throw b;},rR=function(a,b){b=b.candidate.trim().split(" ");var c=b[0].split(":")[1],d=Number(b[1]),e=b[2].toUpperCase(),f=Number(b[3]),g=b[4],m=Number(b[5]),q=fR[b[7]],y;t(b,function(a,b){"generation"==a&&(y=b+1)});switch(q){case "LOCAL":break;
case "STUN":case "RELAY":case "PEER_REFLEX":var D=b[9],T=Number(b[11]);break;default:jR(a,"Unknown candidate type: "+q)}a=0;y&&(a=Number(b[y]));return new eO(d,f,q,e,g,m,c,a,"",D,T)},lR=function(a,b,c){var d=a.get(b);d||(d=[],a.set(b,d));d.push(c)};var sR=function(){this.b=this.f=null;this.g=[];this.l=[];this.o=new zi;this.a=[];this.m="ICE";this.h="full";this.v=[];this.w=null},tR=function(a){return Zj&&Cc(50)&&hb(a,function(a){return a.a.includes("http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions")})},vR=function(a){t([a.f.b,a.f.a,a.f.f],function(a){null!=a&&uR(this,a,KO(a),this.f.g,u(this.f.h))},a)},wR=function(a){var b=[];a=[a.b,a.a,a.f];for(var c=Math.max.apply(Math,[].concat([1],la(a.map(function(a){return KO(a).length})))),
d=!0,e=0;e<c;e++)t(a,function(a){var c=KO(a)[e],f=a.g;c?b.push({type:f,description:a,stream:c,active:!0}):b.push({type:f,description:a,stream:null,active:d})}),d=!1;return b},uR=function(a,b,c,d,e){var f=b.g,g=Zb(gR)[f],m=IO(b);a.l.includes(m)||a.l.push(m);var q=JO(b),y=b.b,D="RTP/SAVPF";d&&d.a&&(D=y?"DTLS/SCTP":"UDP/TLS/RTP/SAVPF");var T="m="+g+" 9 "+D;"DTLS/SCTP"==D?T+=" "+y.ta():t(q,function(a){T+=" "+a.a},a);a.a.push(T);D="inactive";b.h&&b.m?D="sendrecv":b.m?D="recvonly":b.h&&(D="sendonly");xR(a,
g,m,D);yR(a,d);zR(a,e);AR(a,u(b.f));BR(a,q,f,tR(u(b.f)));(b=b.a)&&CR(a,0<q.length?q[0].a:null,b);DR(a,y);ER(a,c)},FR=function(a,b){a="a="+a;null==b||La(b)||(a=a+" "+b);return a},xR=function(a,b,c,d){if(a.b){if(b=a.b.h.get(b))a.a=a.a.concat(b)}else a.a.push("c=IN IP6 ::"),a.a.push(FR("rtcp:9","IN IP6 ::")),a.a.push(FR("rtcp-mux"));a.a.push(FR("mid:"+c));a.a.push(FR(d));c=fb(a.v,function(a){return FR("x-google-flag:"+a)},a);a.a=a.a.concat(c)},yR=function(a,b){var c=b&&b.b||"123456789012345678901234";
a.a.push(FR("ice-ufrag:"+(b&&b.f||"1234567890123456")));a.a.push(FR("ice-pwd:"+c));b&&(a.m=b.ub(),a.h=b.h);GR(a.a,a.m,a.h);b&&b.a&&(a.a.push(FR("fingerprint:"+b.a)),a.a.push(FR("setup:"+(b.l||"actpass"))))},GR=function(a,b,c){"ICE"==b?"lite"==c&&a.push(FR("ice-lite")):ab("google-ice is no longer supported.")},zR=function(a,b){var c;0<b.length&&(c=b[0]);null!=c&&a.a.push(FR("crypto:"+c.b,c.a+" "+c.f))},AR=function(a,b){t(b,function(a){this.a.push(FR("extmap:"+a.getId(),a.a))},a)},BR=function(a,b,c,
d){t(b,function(a){var b=a.a,e=a.getName(),m=a.f;if("v"==c||"d"==c)m=9E4;e=e+"/"+m;"a"==c&&1<a.b&&(e+="/"+a.b);this.a.push(FR("rtpmap:"+b,e));e=u(a.g);if(0<e.length){var q=[];t(e,function(a){a.a&&a.b&&q.push(a.a+"="+a.b)},this);e="";0<q.length&&(e=q.join("; "));this.a.push(FR("fmtp:"+b,e))}if(lO(a,"vp8")||lO(a,"vp9")||lO(a,"h264"))a="rtcp-fb:"+b,e=[FR(a,"ccm fir"),FR(a,"nack"),FR(a,"goog-remb")],d&&e.push(FR(a,"transport-cc")),this.a=this.a.concat(e);this.b&&(b=this.b.J.get(b))&&(this.a=this.a.concat(b))},
a)},CR=function(a,b,c){var d=c.a;-1!=d&&a.a.push("b=AS:"+d);Zj&&null!=b&&(b="fmtp:"+b,d=c.f,-1!=d&&a.a.push(FR(b,"x-google-start-bitrate="+d)),c=c.b,-1!=c&&a.a.push(FR(b,"x-google-min-bitrate="+c)))},DR=function(a,b){b&&a.a.push(FR("sctpmap:"+b.ta()+" "+b.getName()+" "+b.a))},ER=function(a,b){t(b,function(a){if(!La(Ua(a.oc))){var b=a.ga(),c=a.oc,f=a.b?a.b:c;this.o.add(c);var g=fb(u(a.f),function(a){return FR("ssrc-group:"+a.a,a.tb().join(" "))},this);this.a=this.a.concat(g);g=fb(u(a.a),function(a){return FR("rid:"+
a+" send")});1<g.length&&(this.a=this.a.concat(g),g=FR("simulcast:","send rid="+u(a.a).join(";")),this.a=this.a.concat([g]));t(a.tb(),function(a){var d="ssrc:"+a,d=[FR(d,"cname:"+b),FR(d,"msid:"+c+" "+f)];null!=this.b&&(a=this.b.N.get(a))&&(d=d.concat(a));this.a=this.a.concat(d)},this)}},a)},HR=function(a){var b=a.Yb,c=a.kc,d=a.Kc,e=a.ta(),f=a.Fd,g=a.Gd,m=a.nc,q=a.Cc;a=[a.od,b,c.toLowerCase(),a.Uc,d,e,"typ",Zb(fR)[m]];switch(m){case "LOCAL":"TCP"==c&&a.push("tcptyp","active");break;case "STUN":case "RELAY":case "PEER_REFLEX":f&&
g&&a.push("raddr",f,"rport",g);break;default:ab("Unexpected candidate type: "+m)}a.push("generation",q);return new RTCIceCandidate({sdpMLineIndex:0,candidate:"candidate:"+a.join(" ")})};var IR=null,JR=function(){IR||(IR=new AudioContext);return IR};var KR=function(a,b,c,d){B.call(this);this.o=new YI("talk.media.webrtc.AudioOutput");this.f=a;this.g=window.URL.createObjectURL(b);this.m=new tr(this);this.l(this.m);this.a=[];this.u=0;this.b=null;c&&(a=JR().createAnalyser(),a.fftSize=2048,JR().createMediaStreamSource(b).connect(a),this.b=a);this.h=d;this.Yc(1)};r(KR,B);KR.prototype.toString=function(){return"AudioOutput(url="+this.g+", volume="+this.u+", elements.length="+this.a.length+")"};var LR=function(a,b){$I(a.o,"["+a+"] "+b)};
KR.prototype.Yc=function(a){if(this.f){LR(this,"Setting volume to "+a+".");var b=Math.ceil(a)-this.a.length;if(0<b)MR(this,b);else if(0>b){b=-b;LR(this,"Removing "+b+" elements.");for(var c=0;c<b;++c){var d=this.a.pop();d.src="";d&&d.parentNode&&d.parentNode.removeChild(d)}}0<a&&(this.a[0].volume=a-(this.a.length-1));this.u=a}};
var MR=function(a,b){LR(a,"Adding "+b+" elements.");for(var c=[],d=[],e={},f=0;f<b;e={qe:e.qe},++f){var g=a.f.a.createElement("AUDIO");e.qe=Vb();c.push(e.qe.a);g.autoplay=!0;g.src=a.g;xr(a.m,g,function(a){return function(){return a.qe.resolve()}}(e));a.a.push(g);d.push(g);a.f.a.body.appendChild(g)}ge(c).then(function(){return a.dispatchEvent("playing")});""!==a.h&&me(NR(a,d),function(b){ZI(a.o,"["+a+"] "+("Failed to set sink IDs.  Most likely sinkIds are not supported. Error: "+b))})},NR=function(a,
b){b=b.map(function(b){return be().then(function(){return b.setSinkId(a.h)})});return ge(b).then(function(){})};KR.prototype.X=function(){this.Yc(0);window.URL.revokeObjectURL(this.g);KR.W.X.call(this)};KR.prototype.qd=function(){return 0==this.a.length?null:this.a[0].currentTime};var OR=function(a){if(!a.b)return null;var b=new Uint8Array(a.b.fftSize);a.b.getByteTimeDomainData(b);a=gb(b,function(a,b){return Math.max(a,Math.abs(b-128))},0);return Math.floor(6*a/129)};var QR=function(a){B.call(this);this.g=a;this.A=a.u;this.b=new wQ("realtime.media.api.webrtc.PeerConnection");a={iceServers:this.g.F,bundlePolicy:"max-bundle"};if(Zj){var b={mandatory:{RtpDataChannels:!this.A,DtlsSrtpKeyAgreement:this.g.u},optional:[{googHighStartBitrate:!0},{googHighBitrate:!0},{googPayloadPadding:!0},{googSkipEncodingUnusedStreams:!0},{googScreencastMinBitrate:400},{googVeryHighBitrate:!0}]};b.optional.push({googCpuOveruseDetection:!0});b.optional.push({googCpuOveruseEncodeUsage:!0});
b.optional.push({googCpuUnderuseThreshold:55});b.optional.push({googCpuOveruseThreshold:85});Z(this.b,"Creating new PeerConnection with config="+Zi(a)+" constraints="+Zi(b));a=new webkitRTCPeerConnection(a,b)}else Vj?(Z(this.b,"Creating new PeerConnection with config="+Zi(a)),a=new RTCPeerConnection(a)):(ab(),a=void 0);this.a=a;this.m=this.h=this.u=this.o=this.f=null;Vj?(this.f=JR().createMediaStreamDestination().stream,this.h=this.f.getAudioTracks()[0],this.h.enabled=!1,this.a.addTrack(this.h,this.f),
this.u=new KR(null,this.f,Vj,""),a=document.createElement("canvas"),a.getContext("2d"),this.o=a.captureStream(),this.m=this.o.getVideoTracks()[0],this.m.enabled=!1,a=this.a.addTrack(this.m,this.o)):a=null;PR(this,a);this.a.onicecandidate=this.H.bind(this);Zj?this.a.onaddstream=this.F.bind(this):this.a.ontrack=this.B.bind(this);this.a.onremovestream=this.J.bind(this)};r(QR,B);
var PR=function(a,b){if(b){var c={rid:"f"},d=a.g.w;d&&0<d.a&&(c.maxBitrate=d.a);c=[c];a.g.A&&(c.push({rid:"h",scaleResolutionDownBy:2}),c.push({rid:"q",scaleResolutionDownBy:4}));b.setParameters({encodings:c}).then(function(){},function(b){return xQ(a.b,"Failed to enable simulcast: "+b)})}},RR=function(a){var b;Zj&&!a.A&&(b={reliable:!1});return a.a.createDataChannel("dataSendChannel",b)};
QR.prototype.close=function(){"closed"!=this.a.signalingState&&this.a.close();this.a.onicecandidate=null;this.a.oniceconnectionstatechange=null;this.a.onaddstream=null;this.a.onremovestream=null;this.a.ondatachannel=null};var SR=function(a,b){t(a.a.getSenders(),function(a){a.track.kind==b.kind&&a.replaceTrack(b)})},TR=function(a,b){a="audio"==b.kind?a.f:a.o;a.removeTrack(a.getTracks()[0]);a.addTrack(b);return a};QR.prototype.F=function(a){a.stream&&this.dispatchEvent(new UR(a.stream))};
QR.prototype.B=function(a){nb(a.streams)||this.dispatchEvent(new UR(a.streams[0]))};QR.prototype.J=function(a){a.stream&&this.dispatchEvent(new VR(a.stream))};QR.prototype.H=function(a){if(a=a.candidate)a=rR(new hR,a),this.dispatchEvent(new WR(a))};
var YR=function(a,b){b=b||XR(!1);var c=Vb();Zj?a.a.createOffer(function(a){c.resolve(a)},function(a){c.b(a)},b):Vj?c.resolve(a.a.createOffer(b)):c.b("Unsupported platform");return c.a.then(function(a){return(new hR).parse(a.sdp)},function(b){a.b.error("createOffer Failed: "+b);throw b;})},ZR=function(a){var b=Vb();Zj?a.a.createAnswer(function(a){b.resolve(a)},function(a){b.b(a)}):Vj?b.resolve(a.a.createAnswer()):b.b("Unsupported platform");return me(b.a,function(b){a.b.error("nativeCreateAnswer_ Failed: "+
b);throw b;})},$R=function(a){return ZR(a).then(function(a){return(new hR).parse(a.sdp)},function(b){a.b.error("createAnswer Failed: "+b);throw b;})},aS=function(a,b){var c=Vb();Zj?a.a.setLocalDescription(b,function(){return c.resolve()},function(a){return c.b(a)}):Vj?c.resolve(a.a.setLocalDescription(b)):c.b("Unsupported platform");return me(c.a,function(b){a.b.error("nativeSetLocalDescription_ Failed: "+b);throw b;})},bS=function(a){return ZR(a).then(function(b){return aS(a,b)})},XR=function(a){if(Zj){var b=
{mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0}};a&&(b.mandatory.IceRestart=!0);return b}if(Vj)return b={offerToReceiveAudio:1,offerToReceiveVideo:1},a&&(b.iceRestart=!0),b;ab();return{}},dS=function(a){return a.u?OR(a.u):null};QR.prototype.getStats=function(){var a=Vb();Zj?this.a.getStats(function(b){a.resolve(b)}):Vj?a.resolve(this.a.getStats()):a.b("Unsupported platform");return a.a};
var eS=function(a,b){b=HR(b);var c=Vb();Zj?a.a.addIceCandidate(b,function(){c.resolve()},function(a){c.b(a)}):Vj?c.resolve(a.a.addIceCandidate(b)):c.b("Unsupported platform");me(c.a,function(a){xQ(this.b,"addIceCandidate Failed: "+a);throw a;},a)},gS=function(a,b,c){var d=fS(a,b,c,!1),e=Vb();Zj?a.a.setLocalDescription(d,function(){e.resolve()},function(a){e.b(a)}):Vj?e.resolve(a.a.setLocalDescription(d)):e.b("Unsupported platform");me(e.a,function(a){xQ(this.b,"setLocalDescription Failed: "+a);xQ(this.b,
"The current signalingState is : "+this.a.signalingState);xQ(this.b,"The offending SDP was: \n"+d.sdp);throw a;},a);return e.a},hS=function(a,b,c){var d=fS(a,b,c,a.g.aa),e=Vb();Zj?a.a.setRemoteDescription(d,function(){e.resolve()},function(a){e.b(a)}):Vj?e.resolve(a.a.setRemoteDescription(d)):e.b("Unsupported platform");me(e.a,function(a){xQ(this.b,"setRemoteDescription Failed: "+a);xQ(this.b,"The current signalingState is : "+this.a.signalingState);xQ(this.b,"The offending SDP was: \n"+d.sdp);throw a;
},a);return e.a},fS=function(a,b,c,d){var e=new sR;d=d?["conference"]:[];var f=void 0;"offer"===b&&a.a.remoteDescription&&a.a.remoteDescription.sdp&&(f=new hR,f.parse(a.a.remoteDescription.sdp),f=f.K);a=f;e.f&&(e.f=null,e.b=null,e.g=[],e.l=[],e.o.clear(),e.a=[],e.m="ICE",e.h="full",e.v=[],e.w=null);e.f=c;e.b=null;e.v=d||[];e.w=a||null;e.b?c=e.b.h.get("session"):(c=Math.pow(2,53)*Math.random(),a=[],a.push("v=0"),a.push("o=- "+c+" 2 IN IP4 127.0.0.1"),a.push("s=-"),a.push("t=0 0"),c=a);e.g=c;if(Zj)vR(e);
else for(c=wR(e.f),a=e.w||[],d=Math.max(c.length,a.length),f=0;f<d;f++){var g=c[f];if(g&&g.active){var m=g.stream;uR(e,g.description,m?[m]:[],e.f.g,u(e.f.h))}else m=e,m.a.push("m="+Zb(gR)[(a[f]||g).type]+" 0 RTP/SAVPF 0"),m.a.push("c=IN IP6 ::"),m.a.push(FR("inactive"))}0<e.l.length&&e.g.push(FR("group:BUNDLE",e.l.join(" ")));e.g.push(FR("ice-options:trickle"));e.b||(GR(e.g,e.m,e.h),e.g.push(FR("msid-semantic:","WMS *")));e.a.push("");return new RTCSessionDescription({type:b,sdp:e.g.concat(e.a).join("\r\n")})},
WR=function(a){A.call(this,"bb");this.candidate=a};r(WR,A);var UR=function(a){A.call(this,"cb");this.stream=a};r(UR,A);var VR=function(a){A.call(this,"db");this.stream=a};r(VR,A);var iS=function(){var a;return qc?(a=/Windows NT ([0-9.]+)/,(a=a.exec(Ib))?a[1]:"0"):pc?(a=/10[_.][0-9_.]+/,(a=a.exec(Ib))?a[0].replace(/_/g,"."):"10"):sc?(a=/Android\s+([^\);]+)(\)|;)/,(a=a.exec(Ib))?a[1]:""):tc||uc||vc?(a=/(?:iPhone|CPU)\s+OS\s+(\S+)/,(a=a.exec(Ib))?a[1].replace(/_/g,"."):""):""}();var jS=function(a,b){var c=window.crypto||window.msCrypto;c&&c.getRandomValues&&!b&&(this.bi=!0,this.nd=Infinity);a&&160>a&&a>this.nd&&(b=this.le,c=this.nd,this.le="",this.nd=a,a=Math.max(0,c),this.bi||(b=this.kf+b,c=new lk,c.update(b),b=String.fromCharCode.apply(String,c.digest()),this.pe+=a,this.pe>=this.nd?(c.reset(),c.update("SEED_SALT:"+b+this.le),this.le=String.fromCharCode.apply(String,c.digest()),this.kf="",this.pe=0):this.kf=b))};h=jS.prototype;h.bi=!1;h.le="";h.kf="";h.pe=0;h.nd=-1;var lS=function(){this.f=new wQ("realtime.media.api.webrtc.Utils");this.b=new iI;new jS(16,!1);this.a={};var a;a=n(this.g,this);var b=null;if(this.b.isAvailable()){var c=this.b.get("scp"),d=null!=c;try{b=Yi(c)}catch(e){d=!1}!d&&a&&(b=a())}else this.f.error("Error in retrieving cpu info from local storage.");if(a=b)this.a=a;kS(this)},mS=new C({neon:1,sse2:2,ssse3:4,sse4_1:8,sse4_2:16,avx:32}),nS=function(a,b){HQ(GQ.S(),n(function(a){a&&b&&b(a)},a))},oS=function(a,b){if(null==b)return xQ(a.f,"Cannot get cpuFlags from null."),
-1;if(a=b.features){var c=0;t(a,function(a){c|=mS.get(a,0)});return c}return b.cpuHasSSE2?2:-1},kS=function(a){nS(a,n(function(a){a&&(this.a=a,this.b.isAvailable()?this.b.set("scp",Zi(a)):this.f.error("Error in saving scp to local storage."))},a))};lS.prototype.g=function(){return-1!=oc.indexOf("armv7l")?{archName:"armv7l",modelName:"Unknown ARM device",numOfProcessors:2}:{archName:"x86",modelName:"Unknown x86 device",numOfProcessors:4}};var pS=function(a){return l(a)?a:k(void 0)?void 0:-1};var qS={dd:"bytesReceived",ed:"bytesSent",vi:"id",no:"localCandidateId",Ip:"remoteCandidateId",dj:"selected"},rS={di:"googActiveConnection",dd:"bytesReceived",ed:"bytesSent",Ai:"googLocalAddress",Yi:"googRemoteAddress"},sS={om:"bitrateMean",pm:"bitrateStdDev",qn:"framerateMean",rn:"framerateStdDev",dd:"bytesReceived",ed:"bytesSent",Wn:"isRemote",Yn:"jitter",Eo:"mozRtt",uo:"mediaType",Zf:"packetsReceived",Ge:"packetsLost",ag:"packetsSent",Jp:"remoteId",eg:"ssrc"},tS={dd:"bytesReceived",ed:"bytesSent",
Zf:"packetsReceived",Ge:"packetsLost",ag:"packetsSent",eg:"ssrc"},uS=function(a,b){if(!a)return null;if(b){b=rS;if("false"==a[b.di])return null;a=a[b.Ai]+a[b.Yi]}else{b=qS;if("false"==a[b.dj])return null;a=a[b.vi]}return a};var vS=function(){this.f=new C;this.b=new C;this.a=new C};vS.prototype.clear=function(){this.f.clear();this.b.clear();this.a.clear()};var xS=function(a,b,c,d,e){var f=(e=k(e)?e:!0)?tS:sS,g=b[f.eg];if(null==g)return null;if(d)return a=wS(a.f,g,n(a.g,a,d)),a.update(c,b[f.ed],b[f.ag],e?b[f.Ge]:0);a=wS(a.b,g,n(a.g,a,d));return a.update(c,b[f.dd],b[f.Zf],b[f.Ge])},wS=function(a,b,c){var d=a.get(b);null==d&&(d=c(),a.set(b,d));return d};vS.prototype.g=function(a){return new yS(a)};vS.prototype.l=function(){return new zS};
var yS=function(a){this.a=-1;this.f=this.g=this.b=0;this.l=a};yS.prototype.update=function(a,b,c,d){var e=null;if(l(a)&&l(b)&&l(c)&&l(d)){if(a>this.a){var f=c-this.g,e=d-this.f,f=this.l?f:f+e,e=0<f?Math.round(100*e/f):-1,f=-1;if(0<=this.a)var f=a-this.a,g=b-this.b,f=0<g?Math.round(8*g/f):0;e={Yd:f,Vg:e}}this.a=a;this.b=b;this.g=c;this.f=d}return e};var zS=function(){this.a=-1;this.b=this.f=0};
zS.prototype.update=function(a,b,c){var d=null;if(l(a)&&l(b)&&l(c)){if(0<=this.a&&a>this.a)var d=a-this.a,e=b-this.f,f=c-this.b,d={zl:0<e?Math.round(e/d):0,ml:0<f?Math.round(f/d):0};this.a=a;this.f=b;this.b=c}return d};var AS=function(a){this.g=new wQ("realtime.media.api.webrtc.JmiStatsParser");this.w=a;this.h=new vS;this.f=-1;this.l={};this.b=new XI;this.v=new lS;this.a=null},ES=function(a,b,c,d,e){t(b,function(a){if(a.timestamp&&0<a.timestamp.getTime()){var b=this.b,e=a.timestamp;null==b.w&&(b.w=e);if(null==b.b||e.getTime()>b.b.getTime())b.b=e}switch(a.type){case "ssrc":var f=BS(a);a=this.w;c&&(null!==f&&"googFrameWidthSent"in f&&(f.googFrameWidthSent=0),null!==f&&"googFrameHeightSent"in f&&(f.googFrameHeightSent=
0));b=Number(f.ssrc);if(null!=b){e=f.googCaptureStartNtpTimeMs;if(null!=e&&0<e){var y=a.qd(b);null!=y&&(e=e-JJ+1E3*y,f.oneWayDelayMs=Fa()-e)}null!=f.bytesReceived&&(a=SJ(a,b),null!=a&&(null!=a.Qg&&(f.fpsGraphicsInput=a.Qg),null!=a.Rg&&(f.fpsGraphicsOutput=a.Rg)));a=DJ.Nf;b=f.googCpuLimitedResolution;e=f.googBandwidthLimitedResolution;y=f.googViewLimitedResolution;if(null!=b||null!=e||null!=y)"true"==b&&(a|=DJ.Mf),"true"==e&&(a|=DJ.Lf),"true"==y&&(a|=DJ.Of),f.googAdaptationReason=a}a="SSRC: "+Zi(f);
aJ(this.g.a,a);if(null!=f){e=null!==f&&"audioInputLevel"in f||null!==f&&"audioOutputLevel"in f;a=null!==f&&"bytesSent"in f;b=new yJ;S(b,1,e?1:2);S(b,24,a?0:1);l(f.ssrc)&&(S(b,25,f.ssrc),S(b,53,[f.ssrc]));S(b,2,Math.round(pS(f.fractionLost)));S(b,3,Math.round(pS(f.packetsLost)));S(b,4,Math.round(pS(f.highestSequenceNumber)));S(b,5,Math.round(pS(f.googJitterReceived)));b.g(Math.round(pS(f.googRtt)));S(b,7,Math.round(pS(f.bytesSent)));S(b,8,Math.round(pS(f.packetsSent)));S(b,9,Math.round(pS(f.bytesReceived)));
S(b,10,Math.round(pS(f.packetsReceived)));a?null!=f.googCodecName&&S(b,44,f.googCodecName):(null!=f.googCodecName&&S(b,94,f.googCodecName),l(f.oneWayDelayMs)&&S(b,89,Math.round(f.oneWayDelayMs)),l(f.oneWayMaxDelayMs)&&S(b,112,Math.round(f.oneWayMaxDelayMs)),l(f.oneWayStddevDelayMs)&&S(b,118,Math.round(f.oneWayStddevDelayMs)),l(f.oneWayMinDelayMs)&&S(b,119,Math.round(f.oneWayMinDelayMs)));if(e)a?(l(f.aecDivergentFilterFraction)&&S(b,117,f.aecDivergentFilterFraction),l(f.audioInputLevel)&&S(b,26,Math.round(f.audioInputLevel)),
l(f.googEchoCancellationEchoDelayMedian)&&S(b,46,Math.round(f.googEchoCancellationEchoDelayMedian)),l(f.googEchoCancellationEchoDelayStdDev)&&S(b,47,Math.round(f.googEchoCancellationEchoDelayStdDev)),l(f.googEchoCancellationReturnLoss)&&S(b,48,Math.round(f.googEchoCancellationReturnLoss)),l(f.googEchoCancellationReturnLossEnhancement)&&S(b,49,Math.round(f.googEchoCancellationReturnLossEnhancement)),l(f.googEchoCancellationQualityMin)&&S(b,63,f.googEchoCancellationQualityMin),l(f.googResidualEchoLikelihood)&&
S(b,129,f.googResidualEchoLikelihood),l(f.googResidualEchoLikelihoodRecentMax)&&S(b,133,f.googResidualEchoLikelihoodRecentMax)):(l(f.audioOutputLevel)&&S(b,26,Math.round(f.audioOutputLevel)),l(f.googJitterBufferMs)&&S(b,37,Math.round(f.googJitterBufferMs)),l(f.googPreferredJitterBufferMs)&&S(b,38,Math.round(f.googPreferredJitterBufferMs)),l(f.googCurrentDelayMs)&&S(b,39,Math.round(f.googCurrentDelayMs)),l(f.googExpandRate)&&S(b,68,f.googExpandRate),l(f.googSpeechExpandRate)&&S(b,103,f.googSpeechExpandRate),
l(f.googPreemptiveExpandRate)&&S(b,106,f.googPreemptiveExpandRate),l(f.googAccelerateRate)&&S(b,107,f.googAccelerateRate),l(f.googSecondaryDecodedRate)&&S(b,104,f.googSecondaryDecodedRate),l(f.googDecodingCTSG)&&S(b,81,Math.round(f.googDecodingCTSG)),l(f.googDecodingCTN)&&S(b,82,Math.round(f.googDecodingCTN)),l(f.googDecodingNormal)&&S(b,83,Math.round(f.googDecodingNormal)),l(f.googDecodingPLC)&&S(b,84,Math.round(f.googDecodingPLC)),l(f.googDecodingCNG)&&S(b,85,Math.round(f.googDecodingCNG)),l(f.googDecodingPLCCNG)&&
S(b,86,Math.round(f.googDecodingPLCCNG)),l(f.googDecodingMuted)&&S(b,134,Math.round(f.googDecodingMuted)));else if(a?(l(f.googFirsReceived)&&S(b,27,Math.round(f.googFirsReceived)),l(f.googNacksReceived)&&S(b,28,Math.round(f.googNacksReceived)),l(f.googFrameRateInput)&&S(b,29,Math.round(f.googFrameRateInput)),l(f.googFrameRateSent)&&S(b,30,Math.round(f.googFrameRateSent)),l(f.googFrameWidthSent)&&b.h(Math.round(f.googFrameWidthSent)),l(f.googFrameHeightSent)&&b.l(Math.round(f.googFrameHeightSent)),
l(f.googQpSent)&&S(b,113,Math.round(f.googQpSent)),l(f.googAdaptationChanges)&&S(b,95,Math.round(f.googAdaptationChanges)),l(f.googAvgEncodeMs)&&S(b,75,Math.round(f.googAvgEncodeMs))):(l(f.googFirsSent)&&S(b,27,Math.round(f.googFirsSent)),l(f.googNacksSent)&&S(b,28,Math.round(f.googNacksSent)),l(f.googFrameRateOutput)&&S(b,29,Math.round(f.googFrameRateOutput)),l(f.googFrameRateReceived)&&S(b,30,Math.round(f.googFrameRateReceived)),l(f.googFrameRateDecoded)&&S(b,31,Math.round(f.googFrameRateDecoded)),
l(f.fpsGraphicsInput)&&S(b,50,f.fpsGraphicsInput),l(f.fpsGraphicsOutput)&&S(b,51,f.fpsGraphicsOutput),l(f.googFrameWidthReceived)&&b.h(Math.round(f.googFrameWidthReceived)),l(f.googFrameHeightReceived)&&b.l(Math.round(f.googFrameHeightReceived)),l(f.googQpReceived)&&S(b,113,Math.round(f.googQpReceived))),a){var e=DJ.Nf,y=CS(f.googCpuLimitedResolution),D=CS(f.googBandwidthLimitedResolution),T=CS(f.googViewLimitedResolution);null!=y&&null!=D&&null!=T&&(y&&(e|=DJ.Mf),D&&(e|=DJ.Lf),T&&(e|=DJ.Of));S(b,
65,e)}f=xS(this.h,f,this.f,a);null!=f&&(S(b,2,f.Vg),a?S(b,42,f.Yd):S(b,96,f.Yd));DS(d,b)}break;case "VideoBwe":f=BS(a);a="Bwe: "+Zi(f);aJ(this.g.a,a);null!=f&&(a=new yJ,S(a,1,2),S(a,24,2),l(f.googAvailableSendBandwidth)&&S(a,40,Math.round(f.googAvailableSendBandwidth)),l(f.googAvailableReceiveBandwidth)&&S(a,41,Math.round(f.googAvailableReceiveBandwidth)),l(f.googTransmitBitrate)&&S(a,42,Math.round(f.googTransmitBitrate)),l(f.googRetransmitBitrate)&&S(a,43,Math.round(f.googRetransmitBitrate)),l(f.googTargetEncBitrate)&&
S(a,124,Math.round(f.googTargetEncBitrate)),l(f.googActualEncBitrate)&&S(a,125,Math.round(f.googActualEncBitrate)),l(f.googBucketDelay)&&S(a,80,Math.round(f.googBucketDelay)),S(a,2,-1),S(a,3,-1),S(a,4,-1),S(a,5,-1),a.g(-1),S(a,7,-1),S(a,8,-1),S(a,9,-1),S(a,10,-1),DS(d,a));break;case "googCandidatePair":if(a=BS(a),b="CandidatePair: "+Zi(a),aJ(this.g.a,b),null!=a){b=V(d,tJ,13);e=new tJ;e.g(Math.round(pS(a.googRtt)));S(e,4,Math.round(pS(a.bytesSent)));l(a.packetsSent)&&S(e,90,Math.round(a.packetsSent));
l(a.packetsDiscardedOnSend)&&S(e,91,Math.round(a.packetsDiscardedOnSend));S(e,6,Math.round(pS(a.bytesReceived)));y=0;"true"==a.googActiveConnection&&(y|=1);"true"==a.googWritable&&(y|=2);"true"==a.googReadable&&(y|=4);S(e,2,y);y=new bJ;D=new bJ;S(y,1,a.googLocalAddress||"");S(D,1,a.googRemoteAddress||"");var T=a.googChannelId,ea=0;Ia(T,"Channel-audio-")?ea=1:Ia(T,"Channel-video-")&&(ea=2);S(y,2,ea);S(D,2,ea);T={local:1,stun:2,relay:3};S(y,3,T[a.googLocalCandidateType]||0);S(D,3,T[a.googRemoteCandidateType]||
0);T={udp:1,tcp:2,ssltcp:3}[a.googTransportType]||0;S(y,4,T);S(D,4,T);W(e,8,y);W(e,9,D);y=y.ib();S(e,1,y);y=this.h;D=this.f;f=k(f)?f:!0;T=uS(a,f);null==T?f=null:(f=f?rS:qS,f=wS(y.a,T,n(y.l,y)).update(D,a[f.ed],a[f.dd]));S(e,5,f?f.zl:-1);S(e,7,f?f.ml:-1);b.push(e);Gq(d,13,b)}}},a);nS(a.v,n(a.m,a,d,e))},GS=function(a,b){var c=0;t(b,function(a){a=a.stat("audioInputLevel");La(Ua(a))||(c=FS(a))},a);return c},HS=function(a,b){var c=new C;t(b,function(a){var b=a.stat("ssrc");a=a.stat("audioOutputLevel");
La(Ua(b))||La(Ua(a))||c.set(b,FS(a))},a);return c},IS=function(a,b){var c={audio:!1,video:!1};t(b,function(a){if("ssrc"==a.type){var b=a.names();if(mb(b,"packetsReceived")){var d=Number(a.stat("ssrc"));this.l[d]=this.l[d]||0;a=Number(a.stat("packetsReceived"));0>=a-this.l[d]||(this.l[d]=a,mb(b,"audioOutputLevel")?c.audio=!0:mb(b,"googFrameRateReceived")&&(c.video=!0))}}},a);return c};
AS.prototype.m=function(a,b,c){var d;d=this.b.toJson();null!=d?(l(d.tabCpuUsage)&&S(a,34,Math.round(d.tabCpuUsage)),l(d.browserCpuUsage)&&S(a,92,Math.round(d.browserCpuUsage)),l(d.gpuCpuUsage)&&S(a,94,Math.round(d.gpuCpuUsage)),l(d.pluginCpuUsage)&&S(a,93,Math.round(d.pluginCpuUsage)),l(d.totalCpuUsage)&&S(a,35,Math.round(d.totalCpuUsage)),l(d.numOfProcessors)&&a.g(Math.round(d.numOfProcessors)),d=d.jmiVersion,d=l(d)?d:k(void 0)?void 0:-1):d=0;if(3!=d)this.g.error("Uncompatible version number: "+
d);else{d=this.b;var e=c&&c.numOfProcessors;if(e){var f=0,g=0;if(c=c.processors)for(var m=0;m<c.length;m++)var q=c[m].usage,f=f+(q.user+q.kernel),g=g+q.total;else f=d.v,g=d.f;c=g==d.f?d.u:100*e*(f-d.v)/(g-d.f);d.v=f;d.f=g;d.u=c;d.A=c;d.o=e}d=this.b;d=null!=d.b&&null!=d.w?(d.b.getTime()-d.w.getTime())/1E3:-1;0>d||(S(a,1,Math.round(d)),this.f>=d&&xQ(this.g,"Elapsed time in jmidata decreased from "+this.f+" to "+d),this.f=d,d=this.b,d.m=0,d.g=0,d.l=0,d.h=0,d.a=0,b(a))}};
var BS=function(a){var b={};t(a.names(),function(c){var d=a.stat(c);null!=d&&(isNaN(d)||va(d)&&La(d)||(d=Number(d)));b[c]=d});return b},DS=function(a,b){b=b||new yJ;var c=rJ(a);c.push(b);Gq(a,2,c)},CS=function(a){return"true"!=a&&"false"!=a?null:"true"==a},FS=function(a){var b=Number(a);a=0==b&&La(a)?NaN:b;for(var b=[2E3,4E3,1E4,19E3,22E3,32769],c=0;b[c]<=a;)++c;return c};var JS=function(){this.g=new wQ("realtime.media.api.webrtc.RtcStatsParser");this.l=new vS;this.a=this.b=null;this.f={}},KS={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},LS={host:1,serverreflexive:2,peerreflexive:2,relayed:3},MS={udp:1,tcp:2},XS=function(a,b,c,d){var e=NS(b);e?(OS(a,e),e=PS(a),0>e?xQ(a.g,"Ignore report with timestamp prior to initial stats: "+QS(b)):(S(c,1,Math.round(e)),b.forEach(function(a){switch(KS[a.type]||
a.type){case "candidate-pair":if(a){var d=a.selected;if("boolean"==typeof d&&0!=d){var d=V(c,tJ,13),e=new tJ,f=new bJ,y=new bJ;RS(f);RS(y);W(e,8,f);W(e,9,y);S(e,7,-1);S(e,5,-1);var D=Q(f,3);S(e,1,D);S(e,2,0);e.g(-1);S(e,6,-1);S(e,4,-1);D=a.remoteCandidateId||"";SS(b.get(a.localCandidateId||""),f);SS(b.get(D),y);W(e,8,f);W(e,9,y);a=Q(f,3);S(e,1,a);d.push(e);Gq(c,13,d)}}break;case "inbound-rtp":case "outbound-rtp":a&&!TS(a)&&(d=rJ(c),e=new yJ,S(e,9,-1),S(e,7,-1),S(e,3,-1),S(e,2,-1),S(e,5,-1),S(e,4,
-1),S(e,1,0),S(e,10,-1),S(e,8,-1),e.g(-1),f="outbound-rtp"==(KS[a.type]||a.type),a&&(S(e,24,f?0:1),y="audio"==a.mediaType,S(e,1,y?1:2),D=a.ssrc,va(D)&&!La(D)&&(D=Number(D),S(e,25,D),S(e,53,[D])),y||TS(a)||(S(e,29,Math.round(US(a,"framerateMean"))),f?S(e,42,Math.round(US(a,"bitrateMean"))):S(e,96,Math.round(US(a,"bitrateMean"))))),f?VS(this,a,e,b):WS(this,a,e,b),a=xS(this.l,a,PS(this),f,!1),null!=a&&(f?S(e,42,a.Yd):(S(e,96,a.Yd),S(e,2,a.Vg))),d.push(e),Gq(c,2,d))}},a),d(c))):xQ(a.g,"No valid timestamp for the stats: "+
QS(b))},YS=function(a,b){var c={audio:!1,video:!1};b.forEach(function(a){if("inbound-rtp"==(KS[a.type]||a.type)&&!TS(a)){var b=a.ssrc,d=a.packetsReceived;va(b)&&!La(b)&&l(d)&&(b=Number(b),this.f[b]=this.f[b]||0,0>=d-this.f[b]||(this.f[b]=d,"audio"==a.mediaType&&(c.audio=!0),"video"==a.mediaType&&(c.video=!0)))}},a);return c},TS=function(a){return a&&(a=a.isRemote,"boolean"==typeof a&&1==a)?!0:!1},NS=function(a){for(var b=null,c=ja(a.keys()),d=c.next();!d.done;d=c.next())if(d=a.get(d.value),!TS(d)){b=
d.timestamp;break}return l(b)?new Date(Math.round(b)):null},OS=function(a,b){null==a.b&&(a.b=b);if(null==a.a||b.getTime()>a.a.getTime())a.a=b},PS=function(a){return a.a&&a.b?(a.a.getTime()-a.b.getTime())/1E3:-1},SS=function(a,b){if(a){var c=a.ipAddress||"",d=a.portNumber||"";La(c)||La(d)||S(b,1,c+":"+d);S(b,3,LS[a.candidateType||""]||0);S(b,4,MS[a.transport||""]||0)}},WS=function(a,b,c,d){if(b){var e=TS(b),f=b.remoteId;e||!va(f)||La(f)||VS(a,d.get(f),c,d);S(c,5,Math.round(US(b,"jitter")));c.g(Math.round(US(b,
"mozRtt")));S(c,3,US(b,"packetsLost"));e||(S(c,10,US(b,"packetsReceived")),S(c,9,US(b,"bytesReceived")))}},VS=function(a,b,c,d){if(b){var e=TS(b),f=b.remoteId;e||!va(f)||La(f)||WS(a,d.get(f),c,d);e||(S(c,8,US(b,"packetsSent")),S(c,7,US(b,"bytesSent")))}},RS=function(a){S(a,3,0);S(a,4,0);S(a,2,0)},US=function(a,b){return a&&l(a[b])?a[b]:-1},QS=function(a){for(var b={},c=ja(a.keys()),d=c.next();!d.done;d=c.next())d=d.value,b[d]=a.get(d);return na.JSON.stringify(b)};var ZS=function(){};r(ZS,kd);var $S=function(a){var b={networkType:0};t(V(a,tJ,13),function(a){S(a,55,b.networkType);if(2===b.networkType){var c=new FJ;S(c,1,void 0!==b.Ml?b.Ml:-1);W(a,56,c)}})},aT=function(){};r(aT,ZS);var bT=new aT,cT=new sr("QfoKtd");var dT=function(a,b){this.b=new wQ("realtime.media.api.webrtc.StatsManager");this.m=a;this.g=null;b.then(function(a){this.g=a},function(a){Z(this.b,"NetworkInfoService unable to be loaded: "+String(a))},this);this.a=new AS(this.m);this.l=new JS;this.f=0};dT.prototype.start=function(){Z(this.b,"Stats manager started.");if(Zj){var a=this.a;a.a||(a.a=GQ.S().ka.wf(),a.a&&a.a.onMessage.addListener(n(a.b.B,a.b)))}else Vj||this.b.error("Unsupported platform. All stats ignored.")};
dT.prototype.stop=function(){Z(this.b,"Stats manager stopped.");if(Zj){var a=this.a;a.a&&(a.a.disconnect(),a.a=null)}};var eT=function(a,b,c){var d=0,e=new C;Zj?(d=GS(a.a,b),e=HS(a.a,b)):Vj&&(d=0,e=new C);c(d,e)},fT=function(a,b,c){var d=Fa();1E3>d-a.f||(a.f=d,d={audio:!1,video:!1},Zj?d=IS(a.a,b):Vj&&(d=YS(a.l,b)),c(d.audio,d.video))},gT=function(a,b,c,d){d=n(a.h,a,d);var e=new iJ;Zj?ES(a.a,b,c,e,d):Vj&&XS(a.l,b,e,d)};dT.prototype.h=function(a,b){this.g&&$S(b);a(b)};var hT=function(a,b,c){B.call(this);this.h=a;this.f=b;this.a=new Map;this.g=c||function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];return new (Function.prototype.bind.apply(KR,[null].concat(la(b))))};this.b=new YI("realtime.media.capture.OutputManager")};ka(hT,B);
var jT=function(a,b,c){var d=b.id;$I(a.b,"["+a+"] "+("Creating audio output for stream (id="+d+"), "+("ssrc ("+c+"), and output device (id=)")));b=a.g(a.h,b,Vj,"");a.a.set(d,{Dj:b,ssrc:c});c?(a=a.f,a.a.Ra(c)||a.a.set(c,[]),a.a.get(c).push(new NJ(b))):iT(a,"Stream (id="+d+") with no SSRC added.");return b},kT=function(a,b){if(a.a.has(b)){var c=a.a.get(b),d=c.Dj,c=c.ssrc;$I(a.b,"["+a+"] "+("Removing audio output for stream (id="+b+"), ssrc ("+c+")."));c?OJ(a.f,c,d):iT(a,"Unusual removal of stream (id="+
b+") which had no SSRC.");a.a.delete(b);nd(d)}else iT(a,"Attempted to remove a non-existing or already removed audio"+("stream (id="+b+") in output manager."))},iT=function(a,b){ZI(a.b,"["+a+"] "+b)};hT.prototype.toString=function(){return"OutputManager"};var lT=function(a,b,c,d,e){B.call(this);this.qa=c;this.ba=new wQ("realtime.media.api.webrtc.PeerController");Vj&&(d=Xb(d),d.u=!0,d=Xb(d),d.B=!1,d=HP(d));this.h=d;this.g=b;this.ia=k(e)?e:3;this.Kb=new dI;this.u=new tr(this);this.l(this.u);this.m=this.a=null;this.oa=[];b=XQ(a,cT);this.H=new dT(c.f,b);this.Pa={};this.Ka=this.h.o||1E4;this.F=Fa();this.za=!1;this.ha=1;this.B={};this.o=this.b=null;this.J={};this.N=new C;this.Ca=new C;this.ja=null;this.Z=[];this.A=null;this.V=!1;this.f=null;this.Db=0;this.Da=
!1;this.ab=XQ(a,RQ,UQ)};r(lT,B);var mT=!Zj||0<=Ya(Nn,40)?100:200;lT.prototype.toString=function(){return"PeerController(sessionId="+this.g+")"};
var nT=function(a,b){Z(a.ba,"["+a+"] "+b)},oT=function(a,b){xQ(a.ba,"["+a+"] "+b)},pT=function(a,b){for(var c=[],d=0;d<b;d++)c.push(eI(a.Kb));return c},qT=function(a,b){var c=a.h.A?3:1,c=a.h.a?[8579374]:pT(a,c),d=[];if(1<c.length){var e=new GN(JN(IN(new HN,"SIM"),c));d.push(e)}if(a.h.B)for(var e=a.h.a?[8579375]:pT(a,c.length),f=0;f<e.length;f++){var g=new GN(JN(IN(new HN,"FID"),[c[f],e[f]]));c.push(e[f]);d.push(g)}return NN(XN(WN(RN(QN(ON(new MN,"v"),b),a.g+"/"+b),c),d))},rT=function(a,b){var c=new MN;
if(nb(KO(b.b)))var d=a.h.a?[8579373]:pT(a,1),c=WN(ON(c,"a"),d);else c=new MN(KO(b.b)[0]);var d=NN(RN(QN(c,"1"),a.g+"/1")),e;e=nb(KO(b.a))?qT(a,"2"):NN(RN(QN(new MN(KO(b.a)[0]),"2"),a.g+"/2"));c=new MN;c=nb(KO(b.f))?WN(ON(c,"d"),pT(a,1)):new MN(KO(b.f)[0]);c=RN(QN(c,"3"),a.g+"/3");a.h.a||UN(c,"dataSendChannel");a=NN(c);return new dP(PO(new HO("a",[],[]),[d]),PO(new HO("v",[],[]),[e]),PO(new HO("d",[],[]),[a]))},tT=function(a,b){a.Pa[b]||(a.Pa[b]=!0,a.dispatchEvent(new sT(a.g,b)))};
lT.prototype.pb=function(a){a=a.stream;var b=a.getAudioTracks(),c=a.getVideoTracks(),d=a.id;nT(this,"Remote stream added with id="+a.id+" audioTracks="+b.length+" videoTracks="+c.length);c=function(a){return a.oc==d};hb(KO(this.o.b),c)||hb(KO(this.o.a),c)?0<b.length?this.h.l?(b=uT(this.o,d),c=jT(this.qa,a,b),this.B[a.id]=c,b||oT(this,"Participant left before their audio was added")):nT(this,"Ignoring incoming audio track as audio output is disabled."):(b=Wb(this.J,d),a=window.URL.createObjectURL(a),
nT(this,"Creating video url for stream id="+d+" url="+a),b.wa.resolve(a),b.Bg=!0):nT(this,"Ignoring incoming tracks with no matching msid.")};
lT.prototype.Cb=function(a){var b=a.stream,c=b.getAudioTracks(),d=b.getVideoTracks();a=b.id;nT(this,"Remote stream removed with id="+a+" audioTracks="+c.length+" videoTracks="+d.length);0<c.length&&(kT(this.qa,b.id),delete this.B[b.id]);0<d.length&&(b=this.J[a],delete this.J[a],null!=b?b.Bg?oT(this,"Asked to remove stream that was never added."):b.wa.a.then(window.URL.revokeObjectURL):oT(this,"Video stream was deleted before removal."))};
lT.prototype.Ja=function(a){a=a.target;var b=a.ib(this.g);b&&vT(this,b,a.Y())};
var wT=function(a,b){var c;switch(b){case "a":c=KO(a.b.b)[0];break;case "v":c=kb(KO(a.b.a),function(a){return"2"==a.ga()});break;case "d":c=KO(a.b.f)[0]}return c},xT=function(a,b){if(!a.b)return null;if("v"!=b.a)return wT(a,b.a);var c=kb(KO(a.b.a),function(a){return a.ga()==b.getId()});c||(c=qT(a,b.getId()));return c},yT=function(a,b,c){var d=c.a,e=xT(a,c),f=null,g=null,m=!0,q="c"==c.getState();if(b){f=b.id;b="a"==d?b.getAudioTracks():b.getVideoTracks();if(0==b.length)return a.ba.error("["+a+"] Got MediaStream without associated tracks."),
null;g=b[0].id;m="e"!=c.cb}e=NN(SN(TN(VN(UN(new MN(e),f),g),m),q));"a"==d?a.b=iP(a.b,PO(a.b.b,[e])):(d=KO(a.b.a),ub(d,function(a){return a.ga()==c.getId()}),d.push(e),a.b=eP(a.b,PO(a.b.a,d)));nT(a,"StreamInfo="+e+" updated.");return e},zT=function(a,b){b&&!a.za&&a.a&&(nT(a,"Adding stream with id="+b.id+" to peer"),a=a.a,Zj?a.a.addStream(b):(b=b.getTracks()[0],SR(a,b),b=TR(a,b)));return b},AT=function(a,b){b&&a.a&&(nT(a,"Removing stream with id="+b.id+" to peer"),a=a.a,Zj?a.a.removeStream(b):(b="audio"==
b.getTracks()[0].kind?a.h:a.m,SR(a,b),TR(a,b)))},vT=function(a,b,c){if(!a.b)return null;b=zT(a,b);b=yT(a,b,c);a.o?BT(a):nT(a,"Skipping SDP renegotiation on local stream change because we are still waiting on the remote description.");return b};
lT.prototype.stopSession=function(a){this.a&&(this.u.v(this.a.a,"signalingstatechange",this.Oa),this.a.close(),this.a=null);this.m&&(this.m.close(),this.m=null);this.f&&(this.f.cancel(),this.f=null);this.A&&(this.A.stop(),this.V=!1,this.F=0,this.dispatchEvent(new CT(a)));this.H.stop();for(var b in this.J)this.J[b].wa.a.then(window.URL.revokeObjectURL);DT(this,0)};
lT.prototype.Ga=function(){(this.a||this.f)&&ab("Attempted to recreate a peer connection.");tT(this,"send initiate");nT(this,"Instantiating new peer");this.a=new QR(this.h);this.u.listen(this.a.a,"signalingstatechange",this.Oa);this.ha=1;this.u.listen(this.a,"bb",this.Ab);this.a.a.oniceconnectionstatechange=n(this.Xa,this);this.u.listen(this.a,"cb",this.pb);this.u.listen(this.a,"db",this.Cb);this.a.a.ondatachannel=n(function(a){ET(this,a.channel)},this);this.m=RR(this.a);this.m.onopen=n(function(){nT(this,
"send datachannel is open.")},this);this.m.onclose=n(function(){nT(this,"send datachannel is closed.")},this);this.m.onerror=n(function(a){oT(this,"send datachannel error: "+a)},this);this.H.start();this.A||(this.A=new ve(mT),this.u.listen(this.A,"tick",this.Ua),3==this.ia&&this.A.start());return this.f=FT(this,!1).then(function(a){nT(this,"Initial createOffer_ succeeded");return GT(this,a)},function(a){this.ba.error("["+this+"] "+("Initial createOffer_ failed: "+a));return null},this)};
var FT=function(a,b){nT(a,"Calling createOffer for local description");b=XR(!!b);return me(YR(a.a,b),function(a){nT(this,"createOffer failed with error="+a);throw a;},a)},GT=function(a,b){var c=a.h.w;c&&(b=eP(b,UO(b.a,c)));c=rT(a,b);b=jP(eP(iP(b,VO(PO(b.b,KO(c.b)),!0)),VO(PO(b.a,KO(c.a)),!0)),VO(PO(b.f,KO(c.f)),!0));-1==jb(JO(b.a),function(a){return"rtx"==a.getName()})&&oT(a,"Video offer does not contain RTX codec.");b=HT(a,b);(c=b.b)&&(b=iP(b,MO(c,fb(JO(c),function(a){a=new mO(a);a.a=u([]);return new jO(a)}))));
a.h.m||(b=eP(b,null));a.b=b;a.f=null;return b},JT=function(a){var b=a.b;tT(a,"recv local description");nT(a,"Calling setLocalDescription");a.f=gS(a.a,"offer",b).then(function(){return nT(a,"Initial setLocalDescription offer succeeded")},function(b){nT(a,"Initial setLocalDescription offer failed with error="+b);if(b instanceof Xd)throw b;a.dispatchEvent(new IT(19,a.g,b.toString()));throw b;})},HT=function(a,b){return fP(b,n(function(a){a=a.getName();return Ja(a,"vp8")||Ja(a,"h264-svc")||this.h.B&&
Ja(a,"rtx")||!1||!1},a))};lT.prototype.Ua=function(){if(this.A.enabled||3!=this.ia){if(Vj){var a=new C,b;for(b in this.B){var c=this.B[b],d=uT(this.o,b);d&&a.set(d,OR(c)||0)}this.dispatchEvent(new dR(this.g,dS(this.a)||0,a))}this.V||(Zj?0:Fa()-this.F<Math.min(1E4,1E3))||(this.V=!0,this.a.getStats().then(this.Ya,void 0,this))}};
lT.prototype.Ya=function(a){this.V=!1;var b=null;if(Zj)b=a.result();else if(Vj)b=a;else return;KT(this,b);Vj||LT(this,b);a=Fa();a-this.F>=this.Ka&&(this.F=0==this.F?a:this.F+this.Ka,a=hb(this.Z,function(a){return"v"==a.Y().a&&!a.vd()}),gT(this.H,b,!a,n(function(a){this.dispatchEvent(new MT(a))},this)))};
var LT=function(a,b){eT(a.H,b,n(function(a,b){this.dispatchEvent(new dR(this.g,0,b))},a))},KT=function(a,b){fT(a.H,b,n(function(a,b){this.dispatchEvent(new NT(a,b))},a))},uT=function(a,b){if(!a||!a.b)return null;a=KO(a.b);if(a=kb(a,function(a){return a.Qa()==b}))if(a=a.tb(),!nb(a))return a[0];return null},OT=function(a,b){var c=a.a&&a.a.a.remoteDescription&&a.a.a.remoteDescription.sdp;t(b,function(b){tT(a,"recv candidate ");c?eS(a.a,b):a.oa.push(b)},a)},PT=function(a){1==a.ha&&4!=a.ia&&(a.ja=we(function(){if(1==
this.ha){oT(this,"Transport writable timeout failed, aborting.");var a=27;this.Da||(this.ab.then(function(a){VQ(a,3736)}),a=24);this.dispatchEvent(new IT(a,this.g))}},55E3,a))},DT=function(a,b){null!=a.ja&&(xe(a.ja),a.ja=null,a.ha=b)};
lT.prototype.Xa=function(){nT(this,"ICE connection state changed to: "+this.a.a.iceConnectionState);if("disconnected"==this.a.a.iceConnectionState)tT(this,"transport not writable"),this.dispatchEvent(new QT(!1)),nT(this,"Initiating ICE restart"),this.f&&this.f.cancel(),this.f=FT(this,!0),BT(this);else if("connected"==this.a.a.iceConnectionState||"completed"==this.a.a.iceConnectionState)DT(this,2),tT(this,"transport writable"),this.dispatchEvent(new QT(!0))};
lT.prototype.Ab=function(a){a=a.candidate;nT(this,"Got local ICE candidate: "+Zi(a));this.dispatchEvent(new RT(this.g,[a]));a=a.nc;tT(this,"send candidate "+a);"STUN"!=a&&(this.Da=!0)};
var BT=function(a){if(a.a)if(a.f){var b=a.Db++;nT(a,"Queuing renegotiation with id="+b);a.f=a.f.then(function(){nT(this,"Setting offer in renegotiation with id="+b);return ST(this,"offer",this.o)},void 0,a);a.f=Zj?a.f.then(function(){nT(a,"Creating answer for renegotiation with id="+b);return $R(a.a)}).then(function(){var c;c=a.b;var d=c.g,e=d.a,f=d.l;c=!e||f&&"actpass"!==f?c:a.h.a?kP(c,cP(d,a.o.g.a>e?"active":"passive")):kP(c,cP(d,"active"));nT(a,"Setting answer in renegotiation with id="+b);return gS(a.a,
"answer",c)}):a.f.then(function(){nT(a,"Creating and setting answer for renegotiation with id="+b);return bS(a.a)});a.f=a.f.then(function(){nT(this,"Renegotiation successfull with id="+b)},function(a){oT(this,"Renegotiation failed with id="+b+" with error="+a);if(a instanceof Xd)throw a;this.dispatchEvent(new IT(19,this.g,a.toString()));throw a;},a)}else oT(a,"Attempting to reneogitate before offer is created."),ce("Attempting to reneogitate before offer is created.");else be()},TT=function(a,b){tT(a,
"recv remote description");var c=null==a.o;a.o=b;c?(PT(a),a.f=a.f.then(function(){return ST(this,"answer",b)},void 0,a).then(function(){nT(this,"Initial setRemoteDescription answer succeeded")},function(a){oT(this,"Initial setRemoteDescription answer failed for with error="+a);oT(this,"Initial local offer was "+this.a.a.localDescription.sdp);if(a instanceof Xd)throw a;this.dispatchEvent(new IT(19,this.g,a.toString()));throw a;},a)):BT(a)},ST=function(a,b,c){var d=Hb(KO(c.f),function(a){return a.oc||
a.ga()},a);a.Ca=new C(d);c=UT(a,b,c);nT(a,"Calling setRemoteDescription with type="+b);return hS(a.a,b,c).then(function(){nT(this,"setRemoteDescription succeeded");t(this.oa,function(a){eS(this.a,a)},this);this.oa=[]},function(a){nT(this,"setRemoteDescription failed with error="+a);throw a;},a)},UT=function(a,b,c){if(c.f.b)c=jP(c,PO(c.f,[]));else{var d=NN(UN(WN(RN(QN(ON(new MN,"d"),"dataSendChannel"),"dataSendChannel"),[0]),"dataSendChannel")),e=KO(c.f);e.push(d);c=jP(c,PO(c.f,e))}(d=c.g.a)&&(c=kP(c,
cP(c.g,"offer"==b?"actpass":a.h.a?d>a.b.g.a?"passive":"active":"passive")));Vj&&"answer"==b&&(a=a.a.a.localDescription,a=(new hR).parse(a.sdp),b=c.b.h&&a.b.m&&!nb(KO(c.b)),d=c.b.m&&a.b.h,c=iP(c,WO(VO(c.b,b),d)),b=c.a.h&&a.a.m&&!nb(KO(c.a)),d=c.a.m&&a.a.h,c=eP(c,WO(VO(c.a,b),d)));return c},VT=function(a){var b=a.a.a.getLocalStreams();t(b,function(a){AT(this,a)},a);a.za=!0},WT=function(a){a.za=!1;t(a.Z,function(a){(a=a.ib(this.g))&&zT(this,a)},a)};
lT.prototype.X=function(){var a=this;Object.keys(this.B).forEach(function(b){return kT(a.qa,b)});this.B={};this.a&&(this.a.close(),this.a=null);this.m&&(this.m.close(),this.m=null);lT.W.X.call(this)};lT.prototype.zc=function(){tT(this,"recv view request")};
var ET=function(a,b){nT(a,"receive datachannel "+b.label+" created.");a.N.set(b.label,b);b.onopen=n(function(a){nT(this,"receive datachannel "+a.label+" is open.")},a,b);b.onclose=n(function(a){nT(this,"receive datachannel "+a.label+" is closed.");this.N.remove(a.label)},a,b);b.onerror=n(function(a,b){oT(this,"receive datachannel "+a.label+" threw error: "+b);this.N.remove(a.label)},a,b);b.onmessage=n(a.Wa,a,b)};
lT.prototype.Wa=function(a,b){b=b.data;var c=this.Ca.get(a.label),c=c?c.M():a.label;nT(this,"dataReceived: participantId:"+c+" label:"+a.label+"data: "+b);null!=b&&this.dispatchEvent(new XT(this.g,c,a.label,b))};lT.prototype.Oa=function(a){a.target==this.a.a&&"closed"==this.a.a.signalingState&&this.dispatchEvent(new IT(4,this.g))};var NT=function(a,b){A.call(this,"ib");this.a=a;this.b=b};r(NT,A);var MT=function(a){A.call(this,"mb");this.a=a};r(MT,A);var CT=function(a){A.call(this,"nb");this.a=a};
r(CT,A);var RT=function(a,b){A.call(this,"kb");this.sessionId=a;this.a=b};r(RT,A);var sT=function(a,b){A.call(this,"jb");this.sessionId=a;this.message=b};r(sT,A);var QT=function(a){A.call(this,"pb");this.a=a};r(QT,A);var XT=function(a,b,c,d){A.call(this,"gb");this.sessionId=a;this.b=b;this.label=c;this.payload=d};r(XT,A);var IT=function(a,b,c){A.call(this,"hb");this.a=a;this.sessionId=b;this.ac=c};r(IT,A);var YT=function(a,b,c,d){JP.call(this);this.f=new wQ("realtime.media.api.webrtc.LocalSession");this.b=a;this.a=b;this.u=d;this.h=new tr(this);this.l(this.h);this.h.listen(this.a,"gb",this.yk);this.h.listen(this.a,"hb",this.zk);this.h.listen(this.a,"ib",this.Ak);this.h.listen(this.a,"jb",this.Bk);this.h.listen(this.a,"kb",this.Ck);this.h.listen(this.a,"mb",this.Ek);this.h.listen(this.a,"nb",this.Dk);this.h.listen(this.a,"pb",this.Fk);this.g="INITIAL";this.m=new zi;this.o=void 0};r(YT,JP);
var ZT=function(a,b,c,d){a.g!=b&&(a.g=b,!l(a.o)&&l(c)&&(a.o=c),a.dispatchEvent(new dO(a.g,a.o,d)))};h=YT.prototype;h.getState=function(){return this.g};h.Ga=function(){return"INITIAL"!=this.g?(xQ(this.f,"Called initialize in a bad state."),ce()):this.a.Ga()};h.Wb=function(){if("INITIAL"!=this.g)return xQ(this.f,"Called prepare in a bad state."),!1;if(!this.a.b)return xQ(this.f,"Prepare called before local offer has been generated."),!1;aR(this.u,this.b);JT(this.a);ZT(this,"STARTING");return!0};
h.start=function(a){if("STARTING"!=this.g)return xQ(this.f,"Called start in a bad state."),!1;Z(this.f,"sendLogComment: RemoteSessionId="+a.m);ZT(this,"INPROGRESS");$T(this,a);return!0};h.connect=pa;h.update=function(a){switch(this.g){case "INITIAL":return xQ(this.f,"Update called before started."),!1;case "STOPPED":return xQ(this.f,"Update called after stopped."),!1}$T(this,a);return!0};
h.stop=function(a,b){if("STOPPED"==this.g)return!1;ZT(this,"STOPPED",a,b);this.a.stopSession(this.o);cR(this.u,this.b);return!0};h.pause=function(){if("INPROGRESS"!=this.getState())return!1;VT(this.a);ZT(this,"PAUSED");return!0};h.resume=function(){if("PAUSED"!=this.getState())return!1;WT(this.a);ZT(this,"INPROGRESS");return!0};
var aU=function(a){var b=a.u;a=a.b;Z(b.a,"Log upload requested for sessionId="+a);b.w.add(a);b.m&&b.B.h.add(b.m,a);b.f?b.o():b.b&&b.b.then(b.o,void 0,b)},bU=function(a,b){var c=b.Y().a;switch(a.g){case "STOPPED":case "FINISHED":return xQ(a.f,"Add local stream called after ended."),null}if(a.m.contains(b))return a.f.error("Capture "+b+" has already been added."),null;b.Eh(a.b);var d;d=a.a;nT(d,"Adding capture="+b);pb(d.Z,b);d.u.listen(b,"V",d.Ja);var e=b.ib(d.g);d=e?vT(d,e,b.Y()):xT(d,b.Y());if(null==
d)return a.f.error("A stream for capture of type: "+c+", was not created."),null;a.m.add(b);return d},cU=function(a,b){if("INPROGRESS"==a.g&&0!=b.length){var c=b[0];t(a.m.P(),function(a){if(c.U()==a.Y().a){var b=uP(c);if(b){var d=a.settings;d.minHeight=b.height;d.maxHeight=b.height;d.minWidth=b.width;d.maxWidth=b.width}if(b=c.a)d=a.settings,d.f=b,d.b=b}},a)}};h=YT.prototype;
h.zh=function(a,b){if(null!=wT(this.a,"d")){var c=this.a;nT(c,"sendData: label:"+a+"data: "+b);var d=c.N.get(a)||c.m;if(d){var e=d.readyState;"open"==e?d.send(b):nT(c,"Message dropped: dataChannel "+a+" is in "+e+" state")}else oT(c,"Unknown dataChannel for label "+a+", cannot send data: "+b)}else xQ(this.f,"Sending data without data stream.")};h.Ak=function(a){this.dispatchEvent(new LP(a.a,a.b))};h.Ck=function(a){a.sessionId==this.b&&this.dispatchEvent(new MP(a.a))};
h.Bk=function(a){a.sessionId==this.b&&this.dispatchEvent(new gQ(a.message))};h.Ek=function(a){this.dispatchEvent(new NP(a.a))};h.Dk=function(a){this.dispatchEvent(new OP(0,a.a))};h.zk=function(a){a.sessionId==this.b&&this.stop(a.a,a.ac)};h.Fk=function(a){this.dispatchEvent(new QP(a.a))};h.yk=function(a){this.b==a.sessionId&&this.dispatchEvent(new PP(a.b,a.label,a.payload))};h.kg=function(a){var b=KO(this.a.b.f);hb(b,function(b){return b.oc==a.Sb()})||(b.push(this.A(a)),this.f.error("Ignoring post-setup addDataChannel call!"))};
var $T=function(a,b){if(null!=b.l.get("collections")&&null!=b.f){var c=fb(b.l.P(),a.A,a),c=PO(b.f,wb(KO(b.f),c));b=jP(b,c)}Z(a.f,"Session "+a.b+" setting remote descriptions: "+Zi(gP(b)));TT(a.a,b)};YT.prototype.A=function(a){var b=a.a,c=a.Sb()||"local_push_channel",d=a.getChannelId()||"",c=RN(QN(PN(ON(new MN,"d"),d),c),b.toString());c.g.push(b);return NN(UN(c,a.Sb()))};var dU=function(a){qQ.call(this,a);this.l=new Xq;this.f=!1;this.g=new YQ(this.ra);this.h=new lS};ka(dU,qQ);h=dU.prototype;h.Ga=function(){var a=this;return this.b.f.a.then(function(b){return a.g.Ga(Q(b,7))}).then(function(b){a.f=7==b;vI=Q(a.ra.get(Nx),11);return b})};h.ve=function(){return this.f};
h.tf=function(){if(this.ve()){var a=new lN,b=new TM;S(b,1,"11.0.0.0");W(a,7,b);var b=this.h,c=new bN,d="other";qc?d="windows":pc?d=-1!=oc.indexOf("Intel")?"mac":"mac-ppc":0<=Ib.indexOf("CrOS")?d="cros":rc&&(d="linux");S(c,1,d);S(c,14,iS);d="Other";hc?d="Opera":ic?d="Internet Explorer":Vj?d="Firefox":Zj?d="Chrome":ak&&(d="Safari");S(c,15,d);S(c,16,Nn);-1!=oc.indexOf("armv7l")?S(c,5,"ARM"):(S(c,2,6),S(c,3,14),S(c,5,"GenuineIntel"),d=oS(b,b.a),S(c,18,d),c.g(b.a.numOfProcessors));W(a,8,c);return a}};
h.Bd=function(a){return this.ve()?new wQ(a):null};h.sh=function(a,b,c){if(this.ve()){a.get(Nx);var d=Xy(a,LJ);null==d&&(d=new KJ,Ox(a,LJ,d));d=new hT(this.l,d);a=new lT(a,b,d,c);b=new YT(b,a,0,this.g);b.l(a);return b}return null};Pw(dU,qQ,6);var fU=function(a,b){yQ.call(this,a,eU);this.F=b};ka(fU,yQ);fU.prototype.u=function(){FQ(this,this.F.clone());return be()};var eU=new vQ(!1,30,320,180,30,640,360);var gU=function(){};gU.prototype.load=function(a){z(this.j,"Loading gapi for realtime client");var b=window.gapi;b&&b.auth?a(b):(new Qx("notneeded",void 0,void 0,!0,!1,void 0)).init().then(function(b){a(b)})};gU.prototype.j=v("mr.mirror.hangouts.ClientLoader");var hU=function(){};ka(hU,LQ);hU.prototype.vf=function(a){var b=new Yq;chrome.system.cpu.getInfo(function(a){b.callback(a)});return er(b,function(b){a(b)})};
hU.prototype.wf=function(){function a(a){Og(10);if(void 0==c)Zg("mr.mirror.hangouts.HangoutsService").then(function(a){if(a=a.a)a=a.Ib().mediaSource,-1!=a.indexOf(":tab:")&&(a=a.split(":"),chrome.processes.getProcessIdForTab(parseInt(a[a.length-1],10),function(a){chrome.runtime.lastError||(c=a)}))});else{var d=a[c];if(d){var f=0,g=0,m=0,q;for(q in a){var y=a[q];"browser"==y.type?g=y.cpu:"gpu"==y.type?m=y.cpu:"extension"==y.type&&y.title==chrome.runtime.getManifest().name&&(f=y.cpu)}b({tabCpuUsage:d.cpu,
browserCpuUsage:g,gpuCpuUsage:m,pluginCpuUsage:f})}}}if(!chrome.processes)return null;var b=pa,c;return{onMessage:{addListener:function(c){b=c;chrome.processes.onUpdated.addListener(a)}},disconnect:function(){chrome.processes.onUpdated.removeListener(a);b=pa}}};Pw(hU,LQ,2);var iU=function(a){B.call(this);this.ra=a;this.b=null;this.f=Vb();this.g=0;this.m=Vb();ge([this.f.a,this.m.a]);this.a=null;jx(this)};r(iU,B);Ow(qQ,iU);var jU=function(a){Zy(a,SQ)||(SQ.a="",Ox(a,SQ,new iU(a)))};iU.prototype.Ga=function(a){null==this.a&&(this.a=ge([this.ka.Ga(a||{})||be(7),this.f.a]).then(function(a){return a[0]}),this.a.then(this.h,this.h,this),me(this.a,n(function(){this.a=null},this)));return this.a};iU.prototype.h=function(a){a!=this.g&&l(a)&&Rb(FN,a)&&(this.g=a,this.dispatchEvent("qb"))};var kU=function(){kd.call(this);this.j=Xi("realtime.diagnostics.DiagnosticDataService");this.a=0;this.b=new C};r(kU,kd);var lU=function(a){Zy(a,QQ)||Ox(a,QQ,new kU)};kU.prototype.X=function(){var a=[];this.b.forEach(function(b){a.push(b.key)},this);a.length&&E(this.j,"Leftover callbacks for diagnostic data collection: "+a.join(", "));kU.W.X.call(this)};var mU=function(a,b,c){a.a++;a.b.set(a.a,{key:b,Se:c});return a.a};kU.prototype.f=function(a){null!=a&&this.b.remove(a)};var nU=function(){this.j=Xi("realtime.media.apiary.Parser")};nU.prototype.l=function(a){var b=new tu;S(b,1,a.a);S(b,2,a.b);b.h(a.width);b.l(a.height);return b};nU.prototype.w=function(a){var b=+Q(a,1),c=+Q(a,2),d=+Q(a,3);a=+Q(a,4);return null!=b&&null!=c&&null!=d&&null!=a?new hQ(b,c,d,a):null};
var qU=function(a,b,c,d,e){var f=new eu;null!=b.m&&f.na(b.m);S(f,7,e?2:1);e=[];null!=c&&(hu(f,[c]),null!=d&&(e=d));e=e.concat(u(b.b.l));c=b.a;null!=c&&(e=e.concat(u(c.l)));c=[];d=oU([b.b,b.a,b.f]);a=pU(a,d,e,b.g,u(b.h));a.Ma(4);c.push(a);gu(f,c);b=fb(b.l.P(),function(a){var b=new bu,c=a.getChannelId();S(b,1,c);S(b,2,a.g);c=a.Sb();S(b,4,c);switch(c){case "collections":S(b,5,1);break;case "msodc":S(b,5,2)}a=a.a;null!=a&&S(b,3,a);return b});Gq(f,5,b);return f},vU=function(a,b,c){var d=null,e=null,f=
null,g=null,m=[],q=k(c)?c:!0;c=b.g();var y=V(b,Xt,4);if(0<y.length){var f=rU(a,y[0]),d=sU(f,"a"),e=sU(f,"v"),f=sU(f,"d"),D=U(y[0],St,2);D&&(g=tU(a,D,q));(q=V(y[0],Et,4))&&(m=uU(a,q,a.il,a)||[])}a=fb(V(b,bu,5),function(a){return new vO(a.getChannelId(),Q(a,2),Q(a,3),a.Sb())},a);return new dP(d,e,f,null==c?void 0:c,a,g,m)},sU=function(a,b){var c=eb(JO(a),function(a){return a.U()==b}),d="d"==b?a.b:null;if(0==c.length&&null==d)return null;var e=eb(u(a.f),function(a){return a.U()==b});a=eb(u(a.l),function(a){return a.U()==
b});return NO(RO(new HO(b,c,e),a),d)},pU=function(a,b,c,d,e){var f=new Xt;f.Ma(wU(a,b.g)||void 0);var g=fb(JO(b),a.Fj,a);Gq(f,3,g);e=fb(e,a.tg,a);Gq(f,4,e);e=fb(u(b.f),a.Gj,a);Gq(f,5,e);if(null!=d){e=new St;a:{g=d.ub();switch(g){case "GICE":g=1;break a;case "ICE":g=2;break a}E(a.j,"Unknown ICE version: "+g);g=void 0}S(e,1,g);S(e,4,d.f);S(e,5,d.b);g=fb(u(d.g),a.a,a);Gq(e,6,g);if(g=d.a)d=new Ut,g=g.split(" "),S(d,1,g[0]),S(d,2,g[1]),W(e,2,d);W(f,2,e)}b.b&&(d=b.b.getName(),S(f,8,d));b.a&&(b=b.a,d=new vt,
-1!=b.b&&S(d,1,b.b),-1!=b.a&&S(d,2,b.a),-1!=b.f&&S(d,3,b.f),W(f,7,d));a=fb(c,a.f,a);Gq(f,6,a);return f};nU.prototype.f=function(a){var b=new Jt;S(b,2,a.b);var c=new Gt;c.l(xP(a));c.h(wP(a));S(c,3,a.a);W(b,3,c);c=new Lt;W(c,2,b);c.Ma(wU(this,a.U())||void 0);return c};
var oU=function(a){for(var b=[],c=[],d=[],e=null,f=null,g=0;g<a.length;g++)null!=a[g]&&(b=b.concat(JO(a[g])),c=c.concat(u(a[g].f)),d=d.concat(u(a[g].l)),!e&&a[g].b&&(e=a[g].b),!f&&a[g].a&&(f=a[g].a));return NO(UO(RO(OO(MO(a[0],b),c),d),f),e)},rU=function(a,b){var c=xU(a,b.U());if(null==c)return null;var d=uU(a,V(b,yt,3),a.hl,a)||[],e=uU(a,V(b,Nt,5),n(function(a){var b;var d=c||void 0,e=Q(a,2)||"";b=a.getId();d=xU(this,a.U(),d);null!=e&&null!=b?(a=AO(e),a.xa=b,d&&(a.a=d),b=new yO(a)):(E(this.j,"Missing RTP header extension id or uri: "+
a),b=null);return b},a))||[],f=[];t(V(b,Lt,6),function(a){var b=xU(this,a.U());null!=b&&(a=yU(U(a,Jt,2),b,"",""),f.push(a))},a);a=null;(b=Q(b,8))&&(a=new BO(GO(EO(FO(new DO,b),5E3),256)));return NO(RO(new HO(c,d,e),f),a)},wU=function(a,b){switch(b){case "a":return 1;case "v":return 2;case "d":return 3}E(a.j,"Unknown media type: "+b)},xU=function(a,b,c){switch(b){case 1:return"a";case 2:return"v";case 3:return"d";case 4:return"a"}if(k(c))return c;E(a.j,"Unknown media type: "+b);return null};h=nU.prototype;
h.Fj=function(a){var b=new yt;b.Ma(wU(this,a.U()));S(b,1,a.a);Ct(b,a.getName());Dt(b,fb(u(a.g),function(a){var b=new At;S(b,1,a.a);S(b,2,a.b);return b},this));var c=a.l;S(b,5,null==c?0:c);S(b,6,a.f);S(b,7,a.b);return b};
h.hl=function(a){var b=xU(this,a.U()),c=Q(a,1),d=a.getName();if(null==b||null==c||null==d)return E(this.j,"Bad codec: "+a),null;var e=pO(oO(nO(new mO,b),c),d),b=Q(a,5);null!=b&&(e.b=b);b=Q(a,6);null!=b&&qO(e,b);b=Q(a,7);null!=b&&rO(e,b);t(V(a,At,8),function(a){var b=Q(a,1)||"";a=Q(a,2)||"";sO(e,b,a)},this);return new jO(e)};
h.tg=function(a){var b;a:{b=a.a;switch(b){case "AES_CM_128_HMAC_SHA1_32":b=2;break a;case "AES_CM_128_HMAC_SHA1_80":b=1;break a}E(this.j,"Unknown crypto suite: "+b);b=null}if(null==b)return E(this.j,"Unknown crypto suite: "+a.a),null;var c=new Et;S(c,1,b);S(c,2,a.f);S(c,3,a.g||void 0);S(c,4,a.b);return c};
h.il=function(a){var b;a:{b=Q(a,1);switch(b){case 2:b="AES_CM_128_HMAC_SHA1_32";break a;case 1:b="AES_CM_128_HMAC_SHA1_80";break a}E(this.j,"Unknown crypto suite: "+b);b=null}if(null==b)return E(this.j,"Unknown crypto suite: "+Q(a,1)),null;var c=Q(a,2),d=Q(a,3);if(null==c)return E(this.j,"Bad crypto: "+a),null;a=new uO;a.f=b;a.a=c;a.g=1;d&&(a.b=d);return new tO(a)};h.Gj=function(a){var b=new Nt;S(b,2,a.a);var c=a.getId();S(b,1,c);a=a.U();b.Ma(a?wU(this,a):void 0);return b};
var tU=function(a,b,c){var d;a:{d=Q(b,1);switch(d){case 1:d="GICE";break a;case 2:d="ICE";break a}E(a.j,"Unknown ICE version: "+d);d=null}if(null==d)return null;c=c&&"ICE"===d?"lite":"full";var e=Q(b,4)||"",f=Q(b,5)||"";a=zU(a,V(b,Pt,6));b=U(b,Ut,2);var g;b&&(g=Q(b,1)+" "+Q(b,2));return new bP(d,e,f,g,a,c)},zU=function(a,b){return uU(a,b,n(function(a){var b;b:{b=Q(a,1);switch(b){case 1:b=1;break b;case 2:b=2;break b}E(this.j,"Unknown ICE component: "+b);b=null}var c=Q(a,6);null!=c||(c=0);var f=AU(this,
Q(a,5)),g=BU(this,Q(a,2)),m=Q(a,3),q=a.ta();if(b&&f&&g&&m&&q){var y=c.toString(),D=Q(a,7)||"";a=Q(a,8)||0;a=new eO(b,c,f,g,m,q,y,a,D)}else E(this.j,"Missing or unknown candidate parmeters: "+a),a=null;return a},a))||[]};
nU.prototype.a=function(a){var b=new Pt,c;a:{c=a.Yb;switch(c){case 1:c=1;break a;case 2:c=2;break a}E(this.j,"Unknown ICE component: "+c);c=void 0}S(b,1,c);a:{c=a.kc;switch(c){case "UDP":c=1;break a;case "TCP":c=2;break a;case "SSLTCP":c=3;break a}E(this.j,"Unknown candidate protocol: "+c);c=void 0}S(b,2,c);S(b,3,a.Kc);c=a.ta();S(b,4,c);c=CU(this,a.nc);S(b,5,c);S(b,6,a.Uc);S(b,7,a.yd);S(b,8,a.Cc);return b};
var BU=function(a,b){switch(b){case 1:return"UDP";case 2:return"TCP";case 3:return"SSLTCP"}E(a.j,"Unknown candidate protocol: "+b);return null},CU=function(a,b){switch(b){case "LOCAL":return 1;case "PEER_REFLEX":return 2;case "STUN":return 3;case "RELAY":return 4}E(a.j,"Unknown candidate type: "+b)},AU=function(a,b){switch(b){case 1:return"LOCAL";case 2:return"PEER_REFLEX";case 3:return"STUN";case 4:return"RELAY"}E(a.j,"Unknown ICE type: "+b);return null},DU=function(a,b,c,d){var e=new vu;e.rf(2);
null!=b&&e.na(b);e.R(c);e.ma(d.M());e.Ma(wU(a,d.U()));b=d.ga();S(e,7,b);e.sf(d.Qa());"v"==d.U()&&S(e,11,d.fe());b=new zu;c=d.cc();S(b,1,c);e.Id(b);b=new xu;c=d.tb();S(b,1,c||[]);c=u(d.a);S(b,3,c||[]);a=fb(u(d.f),a.g,a);Gq(b,2,a);W(e,8,b);return e},EU=function(a,b){return uU(a,b,a.h,a)||[]};
nU.prototype.h=function(a){var b=xU(this,a.U());if(null==b)return E(this.j,"Unknown stream media type: "+a),null;var c=a.M(),d=a.ga(),e=a.Qa();if(null==c||null==d||null==e)return E(this.j,"Missing stream parmeters: "+a),null;var f=U(a,zu,10),g=f&&f.cc()||!1,m=null!=Q(a,11)?Q(a,11):!0,q=[],y=[],f=[];a=U(a,xu,8);null!=a&&(q=uU(this,Q(a,1),this.b,this)||[],y=uU(this,V(a,Cu,2),this.v,this)||[],f=Q(a,3));b=XN(WN(TN(SN(RN(QN(PN(ON(new MN,b),c),d),e),g),m||!1),q),y);b.b=u(f);return NN(UN(b,e))};
nU.prototype.b=function(a){return a>>>0};nU.prototype.g=function(a){var b=new Cu;S(b,1,a.a);a=a.tb();S(b,2,a||[]);return b};nU.prototype.v=function(a){var b=uU(this,Q(a,2),this.b)||[],c=Q(a,1);return null==c?(E(this.j,"Unknown ssrc group semantics: "+a),null):new GN(JN(IN(new HN,c),b))};var FU=function(a,b){return uU(a,b,a.m,a)||[]};
nU.prototype.m=function(a){var b=xU(this,a.U());if(null==b)return E(this.j,"Unknown stream request media type: "+a),null;var c=a.M(),d=a.ga();if(null==c||null==d)return E(this.j,"Missing stream request parmeters: "+a),null;a=U(a,Jt,9);return yU(a,b,c,d)};
var yU=function(a,b,c,d){var e=!1,f=void 0,g=void 0;if(null!=a&&Q(a,2)&&(e=Q(a,2),null==e&&(e=void 0),null!=U(a,Gt,3))){var m=Q(U(a,Gt,3),2),q=Q(U(a,Gt,3),1),g=Q(U(a,Gt,3),3);null==g&&(g=void 0);null!=m&&null!=q&&(f=new Sq(m,q))}return new tP(c,d,b,f,g,e)},uU=function(a,b,c,d){null!=d&&(c=n(c,d));if(null==b||!ta(b))return null;d=[];for(var e=0;e<b.length;e++){var f=b[e];if(null==f)return E(a.j,"Failed to parse: "+b),null;var g=c(f);if(null==g)return E(a.j,"Failed to parse: "+f),null;d.push(g)}return d};var GU=function(a,b,c,d,e,f){B.call(this);this.j=Xi("realtime.media.apiary.Client");this.a=a;this.F=b;this.h=c;this.m=k(f)?f:8;this.u=e||Wa();this.A=lx(d);this.b=37;"hangout_lite"==c&&(this.b=55)};r(GU,B);GU.prototype.f=function(a){return null!=a?U(a,eu,2):null};
var JU=function(a,b,c){b=HU(a,b,c);return me(IU(a,"media_sessions/log",b),function(a){E(this.j,"Failed to upload log data: "+a);throw a;},a)},HU=function(a,b,c){b=Oq(b);S(b,9,a.b);S(b,13,a.h);var d=new nN;d.setRequestHeader(KU(a));d.na(c);W(d,3,b);return d},KU=function(a){var b=new ms,c=new is;W(b,1,c);c=U(b,is,1);S(c,1,a.m);c=new es;S(c,1,a.F);S(c,4,a.u);W(b,2,c);b.Xc("en");W(b,7,a.A);return b};
GU.prototype.g=function(a){if(null==a)throw new LU("Got empty response.");if(k(a.getResponseHeader)){var b=a.getResponseHeader();if(null!=b){if(b=b.Aa(),1!=b)throw new LU("Got bad status in response header.",b);}else throw new LU("Missing response header.");}return a};
var IU=function(a,b,c){if(null==a.a){var d="Failed to "+b+" "+c+": no service";E(a.j,d);return ce(d)}return a.a.b(b,c,a.B,a.o).then(a.g,function(a){E(this.j,"Failed to "+b+" "+c+": "+a);throw a;},a)},LU=function(a,b){Ga.call(this);this.desc=a;this.status=b||0};r(LU,Ga);var MU=function(a,b,c){A.call(this,"rb");this.state=b;this.sessionId=c};r(MU,A);var NU=function(a,b,c,d){if(null==a)return d=Xi("realtime.media.apiary.RpcEventDispatcher"),aj(d,"Failed to report impression on RPC request because thenable is null for rpc "+b+"with sessionId "+c),ce();b=a.then();d.dispatchEvent(new MU(0,"Ma",c));var e=we(b.cancel,9E4,b),f=!1;me(b,function(a){f=!0;return a}).then(function(a){xe(e);var b="Na";a instanceof Xd?b="Pa":f&&(b="Oa");La(Ua(c))&&(1>a.length||!(a[0]instanceof eu)?c=null:(a=a[0],c=null!=a?a.g():null));this.dispatchEvent(new MU(0,b,c))},null,
d);return b};var PU=function(a,b,c,d,e){kd.call(this);this.g=a;this.A=b;this.K=c||this.F;this.u=d||null;this.B=e||null;this.b=-1;this.o=Vb();this.a=null;this.f=!1;this.m=0;this.v=this.h=void 0;this.xa=++OU};r(PU,kd);var OU=0;PU.prototype.Hf=function(a){this.b=a;QU(this)};PU.prototype.Hc=function(){return this.o};PU.prototype.se=function(){return this.o.a};PU.prototype.ke=function(){return this.f};var RU=function(a){null==a.a&&(a.a=a.A(),QU(a));return a.a};h=PU.prototype;h.te=function(a){this.m=a};h.Ad=function(){return this.m};
h.ue=function(a,b){k(b)&&(b=Math.max(a,b));this.h=a;this.v=b};h.Ec=function(){return this.h};h.he=function(){return this.v};var QU=function(a){if(null!=a.a&&-1!=a.b){var b=a.a;if(xa(b.D)){var c=new X;S(c,1,a.b);b.D(c)}else xa(b.O)&&b.O()}};PU.prototype.Ye=function(){return RU(this).toString()};PU.prototype.toString=function(){return"[Operation id: "+this.xa+": "+this.g+", version: "+this.b+"]"};PU.prototype.F=function(){return[]};var SU=function(){Ga.call(this)};r(SU,Ga);SU.prototype.message="Operation has already been executed.";
SU.prototype.name="AlreadyExecutedError";var TU=function(a){this.a=a};r(TU,Bz);h=TU.prototype;h.Lb=function(a){return new PU("hangout_participants/add",function(){var b=new UK;Gq(b,6,a);return b},function(a){return V(a,rt,5)})};h.Mb=function(a){return new PU("hangout_participants/modify",function(){var b=new nM;Gq(b,4,a);return b},function(a){return V(a,rt,4)})};h.Ub=function(a,b){var c=b&&b.jYdIne||0;return new PU("hangout_participants/remove",function(){var b=new tM;uM(b,a);S(b,5,c);return b})};
h.Nb=function(a){return new PU("hangout_participants/query",function(){var b=new qM;b.R(a.T());b.ma(a.M());return b},function(a){return[U(a,rt,2)]})};h.Vb=function(a){return new PU("hangout_participants/search",function(){var b=new WK;b.R(a.T());return b},function(a){return V(a,rt,2)},tL.prototype.g,eM.prototype.g)};var UU=function(a){this.a=a};r(UU,Bz);h=UU.prototype;h.Lb=function(a){return new PU("hangouts/add",function(){var b=new sK;Gq(b,4,a);return b},function(a){return V(a,mt,5)})};h.Mb=function(a){return new PU("hangouts/modify",function(){var b=new jM;Gq(b,4,a);return b},function(a){return V(a,mt,4)})};h.Ub=function(){return null};h.Nb=function(a){return new PU("hangouts/query",function(){var b=new YK;b.R(a.T());return b},function(a){return[U(a,mt,2)]},tL.prototype.l,eM.prototype.l)};h.Vb=function(a){return this.Nb(a)};var VU=function(a){this.a=a};r(VU,ay);VU.prototype.Lb=function(a){return new PU("media_sessions/add",function(){var b=new fL;Gq(b,4,a);return b},function(a){return V(a,eu,4)})};VU.prototype.Mb=function(a){return new PU("media_sessions/modify",function(){var b=new qN;Gq(b,4,a);return b},function(a){return V(a,eu,4)})};VU.prototype.Ub=function(){return null};var WU=function(a){this.a=a};r(WU,Bz);h=WU.prototype;h.Lb=function(a){return new PU("media_sources/add",function(){var b=new kL;Gq(b,4,a);return b},function(a){return V(a,iu,4)})};h.Mb=function(a){return new PU("media_sources/modify",function(){var b=new uN;Gq(b,4,a);return b},function(a){return V(a,iu,4)})};h.Ub=function(){return null};h.Nb=function(a){return new PU("media_sources/query",function(){var b=new xN;b.R(a.T());b.ma(a.M());var c=a.ga();S(b,4,c);return b},function(a){return[a.Y()]})};
h.Vb=function(a){return new PU("media_sources/search",n(function(){var b=new mL;b.R(a.T());return b},this),function(a){return V(a,iu,2)},tL.prototype.h,eM.prototype.h)};var XU=function(a){this.a=a};r(XU,Bz);h=XU.prototype;h.Lb=function(a){return new PU("media_streams/add",function(){var b=new pL;Gq(b,4,a);return b},function(a){return V(a,vu,4)})};h.Mb=function(a){return new PU("media_streams/modify",function(){var b=new AN;Gq(b,4,a);return b},function(a){return V(a,vu,4)})};h.Ub=function(){return null};h.Nb=function(a){return new PU("media_streams/query",function(){var b=new DN;b.R(a.T());var c=a.pf();S(b,2,c);b.na(a.qf());c=a.Qa();S(b,4,c);return b},function(a){return[a.ib()]})};
h.Vb=function(a){return new PU("media_streams/search",n(function(){var b=new rL;b.R(a.T());b.na(a.qf());var c=a.pf();S(b,2,c);return b},this),function(a){return V(a,vu,2)},tL.prototype.v,eM.prototype.v)};var YU=function(){return new cy(mt,[mt.prototype.T],[mt.prototype.R],[],[],Zu,[Zu.prototype.T],[Zu.prototype.R],[],[])};var ZU=function(){return new cy(vu,[vu.prototype.T,vu.prototype.Sk,vu.prototype.Tk],[vu.prototype.R,vu.prototype.rf,vu.prototype.na],[vu.prototype.Qa],[vu.prototype.sf],nv,[nv.prototype.T,nv.prototype.pf,nv.prototype.qf],[nv.prototype.R,nv.prototype.Qk,nv.prototype.na],[nv.prototype.Qa],[nv.prototype.Rk])};var aV=function(a,b,c){return $U(a,b,[c],new cy(iu,[iu.prototype.T],[iu.prototype.R],[iu.prototype.M,iu.prototype.ga],[iu.prototype.ma,iu.prototype.nf],iv,[iv.prototype.T],[iv.prototype.R],[iv.prototype.M,iv.prototype.ga],[iv.prototype.ma,iv.prototype.Pk]),WU,"k")},$U=function(a,b,c,d,e,f){var g=lz.S();e=new e(mz(g,a,b));f=new by(g.ka.g(a,b),f);return new pz(0,g.ka.b(a,b),c,d,e,f,g.ka.f(a,b))};var bV=function(){jx(this)},cV=function(a){(a=a.ka.b())||(a=new wO(new xO));return a},dV=function(){};r(dV,Nw);Ow(dV,bV);dV.prototype.b=Uw();var eV=function(a,b){A.call(this,"sb");this.b=a;this.data=b};r(eV,A);var fV=function(a){A.call(this,"tb");this.data=a};r(fV,A);var gV=function(){B.call(this)};r(gV,B);var hV=function(a){A.call(this,"ub");this.a=u(a)};r(hV,A);var jV=function(a,b,c,d,e){ZP.call(this);this.j=Xi("realtime.media.session.SessionImpl");this.f=b.ka.Bd("realtime.media.session.SessionImpl");Z(this.f,"Creating a new session with localSessionId="+c.b+" remoteSessionId="+iV(d)+" earlyMediaHangoutId="+e.b+" P2P="+e.a+" useAudio="+e.l+" useVideo="+e.m+" jmiIntervalMs="+e.o);this.Kd=XQ(a,RQ,UQ);this.h=new tr(this);this.l(this.h);this.a=c;this.l(this.a);this.h.listen(this.a,"Z",this.Qd);this.h.listen(this.a,"aa",this.Rd);this.h.listen(this.a,"$",this.vk);
this.h.listen(this.a,"oa",this.sk);this.h.listen(this.a,"ca",this.uk);this.h.listen(this.a,"ba",this.tk);this.h.listen(this.a,"X",this.gh);this.h.listen(this.a,"ea",this.Lk);this.b=d;this.l(this.b);this.h.listen(this.b,"X",this.mh);this.h.listen(this.b,"ma",this.jl);this.h.listen(this.b,"ra",this.wk);this.h.listen(this.b,"ia",this.Gk);this.h.listen(this.b,"ja",this.Hk);this.h.listen(this.b,"ha",this.kl,!0);this.oa=this.Ab=!1;this.Wa=[];this.Xa=Vb();this.Od=Vb();this.g=e;this.Ld="";this.u={};this.N=
this.J=null;this.V=new C;this.m=this.Ca=null;this.Pa=[];this.ja=[];this.o=[];this.Ka={};this.ha=new qr(20);this.A=this.qa=null;this.Da=this.za=this.ia=Fa();this.Db=this.Cb=!1;this.Z=!0;this.H=this.Pd=!1;this.Kb=0;this.Nd=b;a=(a=b.b)&&U(a,fx,19)||new fx;this.Ja=void 0;this.pb=new rP(a);this.h.listen(this.pb,"Y",this.qk);this.ba=Vb();this.ab=this.F=null;this.B=[]};r(jV,ZP);var kV=new Sq(1280,720);h=jV.prototype;h.Ah=function(a,b){this.a.zh(a,b)};
h.Ga=function(){return this.a.Ga().then(this.rk,null,this)};h.rk=function(a){this.oa=!0;t(this.ja,function(a){lV(this,a)},this);this.ja=[];return a};
h.Wb=function(a){if("INITIAL"!=this.getState())return E(this.j,"Starting session after already started."),!1;mV(this,"STARTING");if(!this.a.a.b)return xQ(this.f,this.a.b+" preparation failed because local session failed to create an offer."),!1;null!=a&&(a=a.l.get("msodc"),null!=a&&this.a.kg(a));if(!this.a.Wb())return xQ(this.f,this.a.b+" preparation failed because because local session failed to prepare."),!1;a=this.a;var b=this.g.K;Z(a.f,"enableRtpHeaderDump called with enable="+b+" for sessionId="+
a.b);ZQ(a.u,a.b,b);this.g.b&&this.g.h.length&&Z(this.f,"Request early media for hangout "+this.g.b);return this.b.Wb(null!=this.g.b&&0<this.g.h.length?this.g.b:null)?!0:(xQ(this.f,"Failed to prepare session because remote session failed to prepare."),!1)};
h.start=function(a){this.Ab=!0;if("INITIAL"==this.getState()&&!this.Wb(a))return!1;this.Ca=a;Z(this.f,this.da()+" starting with remote description: "+Zi(a));var b=a.b;null!=b&&(a=iP(a,ZO(b)),this.Wa=JO(b),this.dispatchEvent(new eQ));a=fP(a,function(a){return!Ja(a.getName(),"h264")});this.m=a=nV(this,a);b=a.m;if(null==b)return E(this.j,"Received remote description without session id."),this.stop(16),!1;t(this.Pa,function(b){a=nP(a,b.lg,b.Gh)},this);ob(this.Pa);this.na(b);this.b.start(b);this.a.start(a);
cU(this.a,this.B);mV(this,"STARTED");b=oV(a);0<b.length&&OT(this.a.a,b);pV(this);qV(this);this.Xa.resolve();this.g.g&&this.g.f&&aU(this.a);return!0};h.pc=function(){this.b.pc();this.a.pc()};h.ae=function(a,b,c){Z(this.f,"Connecting session "+this.a.b+" to hangout id: "+a);this.Ld=b;this.a.R(a);this.a.connect();this.b.ae(a,b,c);this.Xa.a.then(function(){rV(this.b,this.Nd.ka.tf()||null)},null,this)};
h.pause=function(){Z(this.f,"Attempting to pause session "+this.a.b);if("INPROGRESS"!=this.getState())return!1;t(this.o,function(a){"d"!=a.getInfo().U()&&a.Ha("Aa")});if(!this.a.pause())return this.f.error("Failed to pause session "+this.a.b),!1;xe(this.A);this.A=null;mV(this,"PAUSED");return!0};
h.resume=function(){Z(this.f,"Attempting to resume session "+this.a.b);if("PAUSED"!=this.getState())return!1;if(!this.a.resume())return this.f.error("Failed to resume session "+this.a.b),!1;this.b.resume();t(this.o,function(a){"d"!=a.getInfo().U()&&a.Ha("za")});this.dispatchEvent("ua");mV(this,"INPROGRESS");this.dispatchEvent(new dQ([],[],this.da()));pV(this);return!0};
h.stop=function(a,b){if("STOPPED"==this.getState()||"FINISHED"==this.getState())return Z(this.f,this.a.b+" ignoring call to stop with endCause: "+a+" and debug information: "+b+", because it has already stopped."),!0;Z(this.f,this.a.b+" stopping because stop called with endCause: "+a+" and debug information: "+b);this.h.v(this.a,"X",this.gh);this.h.v(this.b,"X",this.mh);this.h.v(this.J,"ub",this.tc);this.h.v(this.N,"ub",this.uc);var c;if(c=this.g.f)a:switch(a){case 3:case 8:case 10:case 102:case 13:case 58:case 19:case 15:case 16:case 17:case 23:case 26:case 28:case 29:case 32:case 33:case 34:c=
!0;break a;default:c=!1}c&&aU(this.a);xe(this.A);this.A=null;this.a.stop(a);this.b.stop(a,b);mV(this,"STOPPED",a,b);le(ye(2E3),this.ba.resolve,this.ba);return!0};h.X=function(){this.stop(this.Ab?6:72);le(this.ba.a,B.prototype.X,this)};
var lV=function(a,b){switch(a.getState()){case "STOPPED":case "FINISHED":return E(a.j,"Adding stream after end."),!1}if(!a.oa)return a.ja.push(b),!0;var c=b.Y(),d=a.u[sV(c)];if(d)return b.Il(),tV(d,"e"!=c.cb),!1;d=bU(a.a,b);if(null==d)return!1;"v"==c.a&&a.Xa.a.then(function(){var a=[];if(this.g.a){var b=this.m.a;null!=b&&(a=u(b.l))}else a.push(new tP("","","v",kV,30,!0,this.b.a||void 0));0<a.length&&uV(this,a)},null,a);vV(a.b,[d]);"v"==c.a&&a.h.listen(c,"wa",a.mc);d=BQ(b,a.da(),d);a.u[sV(c)]=d;a.dispatchEvent(new dQ([d.getInfo()],
[]));a.h.listen(b,"T",a.lc);Z(a.f,a.da()+" successfully added capture: "+Zi(bO(b)));return!0};jV.prototype.mc=function(a){a=a.target;if("e"==a.cb)a=a.getId(),tV(this.u[a+"d"],!1),wV(this.b);else if("d"==a.cb){var b=this.u[sV(a)];tV(b,!0);xV(this.b);yV(this.b,this.u[sV(a)].getInfo())}};
var AV=function(a,b){Z(a.f,a.a.b+" now has these participants: "+Zi(b));if(a.g.a){if(2<b.length){a.stop(51);return}if(2>b.length&&"INPROGRESS"==a.getState()){a.stop(52);return}}zV(a.b,b)},mV=function(a,b,c,d){Z(a.f,a.a.b+" changed state from "+a.getState()+" to "+b);d&&Z(a.f,"State change due to "+d);a.Oa!=b&&(a.Oa=b,a.wc=c,a.dispatchEvent(new dO(b,c,d)))};
jV.prototype.zc=function(a){switch(this.getState()){case "STOPPED":case "FINISHED":return E(this.j,"Changing stream requests after end."),!1}a=eb(a,function(a){return null==BV(this,new kQ(a.M(),a.ga(),a.U()))},this);t(a,function(a){Z(this.f,this.da()+" received stream request for DOWN stream from UI: "+a)},this);if(null!=this.J)return CV(this.J,a),!0;DV(this,a);return!0};jV.prototype.tc=function(a){EV(this,a.a);DV(this,a.a)};
var DV=function(a,b){a.b.zc(b);a.Ka={};t(b,function(a){if(a.b){var b=a.M();a=a.ga();this.Ka[b+a]=!0}},a);t(a.o,a.Ya,a)};jV.prototype.Ya=function(a){var b=a.M(),c=a.ga(),b=this.Ka[b+c]||!1;b!=a.a&&(a.a=b,a.dispatchEvent("ka"))};var EV=function(a,b){for(var c=0;c<b.length;c++)if(null!=b[c].tb())for(var d=b[c].tb(),e=0;e<d.length;e++){var f=d[e];null===f||a.V.set(f,0)}},uV=function(a,b){F(a.j,"Stream Requests for UP streams received from remote side: "+Zi(b));null!=a.N?CV(a.N,b):FV(a,b)};
jV.prototype.lc=function(a){var b=a.target;a=b.vd();b=b.Y();(b=this.u[sV(b)])?(a=NN(SN(new MN(b.getInfo()),a)),b.b=a,yV(this.b,a)):xQ(this.f,this.da()+" muted unknown capture.")};var tV=function(a,b){a&&(b=NN(TN(new MN(a.getInfo()),b)),a.b=b)};jV.prototype.uc=function(a){FV(this,a.a)};
var FV=function(a,b){var c=eb(b,function(a){a=a.g;return!(null!=a&&this.b.a!=a)},a);0!=c.length&&(EV(a,c),a.B=wb(eb(a.B,function(a){return-1==jb(c,function(b){return a.U()==b.U()&&a.ga()==b.ga()})},a),eb(c,function(a){return a.b},a)),F(a.j,"Sending stream requests for UP streams to local session: "+Zi(a.B)),cU(a.a,a.B),a.m&&a.m.a&&(b=TO(a.m.a),a.m=GV(a,a.m),a.m&&a.m.a&&TO(a.m.a)!=b&&a.a.update(a.m,[])))},GV=function(a,b){if(!(Zj&&0<=Ya(Nn,56)&&a.g.N))return b;a=kb(a.B,function(a){return!La(a.ga())&&
!!uP(a)},a);if(!a)return b;a=uP(a);var c=3150;57600>=a.height*a.width&&(c=150);return eP(b,SO(b.a,c))};jV.prototype.ib=function(a){var b=BV(this,a);return null!=b?b:lb(this.o,function(b){b=b.getInfo();return b.M()==a.M()&&b.U()==a.a&&b.ga()==a.getId()},this)};jV.prototype.Ua=function(){var a=jV.W.Ua.call(this),b=this.Nd.ka.tf()||null;ac(a,{audioOptions:qP(),systemInfo:b?b.la():"Unavailable"});return a};
var BV=function(a,b){if(b.M()!=a.Ld&&""!=b.M())return null;a=eb(Pb(a.u),function(a){a=a.a.Y();return b.getId()==a.getId()&&b.a==a.a});return 1<a.length?kb(a,function(a){return"e"==a.a.Y().cb}):1==a.length?a[0]:null},sV=function(a){return a.getId()+a.cb};jV.prototype.da=function(){return this.a.b};var oV=function(a){return(a=a.g)?u(a.g):[]};
jV.prototype.Rd=function(a){switch(this.getState()){case "INITIAL":E(this.j,"Received local candidates before starting.");return;case "STOPPED":case "FINISHED":E(this.j,"Received local candidates after stopped.");return}t(a.a,function(a){2!=a.Yb&&(this.g.a&&"UDP"!=a.kc||0>jb(this.ha.P(),function(b){return b==a?!0:b&&a?b.Yb===a.Yb&&b.Uc===a.Uc&&b.nc===a.nc&&b.kc===a.kc&&b.Kc===a.Kc&&b.ya===a.ya&&b.od===a.od&&b.Cc===a.Cc&&b.yd===a.yd&&b.Fd===a.Fd&&b.Gd===a.Gd:!1})&&this.ha.add(a))},this);null==this.qa&&
(this.qa=we(function(){this.Od.a.then(this.Sd,null,this);this.qa=null},500,this))};jV.prototype.Sd=function(a){Z(this.f,this.da()+" Sending local ICE candidates over to the other side: "+Zi(this.ha.P()));this.dispatchEvent(new fQ(this.ha.P(),a))};
var HV=function(a,b){(b=rJ(b))&&t(b,function(a){if(a&&Q(a,1)==BJ.kj){var b=!1,c=Q(a,53)[0];if(Q(a,24)==CJ.ij){var f=lb(this.o,function(a){return a.getInfo().Qa()==c},this);f&&(b=!f.getInfo().fe())}else Q(a,24)==CJ.jj&&(f=Sb(this.u,function(a){return a.getInfo().tb()[0]==c},this))&&(b="e"==f.a.Y().cb);S(a,59,b)}},a)};h=jV.prototype;h.qk=function(a){this.dispatchEvent(new bQ(a.id))};
h.uk=function(a){if(null!=a.a){var b=rJ(a.a);if(null!=b)for(var c=0;c<b.length;c++){var d=b[c];if(null!=d&&2==Q(d,1)){var e=null!=Q(d,65)?Q(d,65):0;if(null!=Q(d,25)&&null!=this.V.get(Q(d,25)))e|=this.V.get(Q(d,25));else if(null!=Q(d,53))for(var f=Q(d,53),g=0;g<f.length;g++)if(null!=f[g]&&null!=this.V.get(f[g])){e|=this.V.get(f[g]);break}S(d,65,e)}}HV(this,a.a);this.Ja=a.a;this.Z||(this.Z="PAUSED"!=this.getState());this.Z&&0>=--this.Kb&&(this.Kb=1,b=this.b,c=a.a,d=b.a,e=b.m,null!=d?null!=e?(c=IV(b,
c),b.za=c,JV(b,d,e,c)):E(b.j,"Upload log data before we have a hangoutId."):E(b.j,"Upload log data before we have a sessionId."),this.Ja=void 0,this.Z="PAUSED"!=this.getState());a:if(b=this.pb,a=rJ(a.a),null!=a){for(c=0;c<a.length;++c)if(0==Q(a[c],24)&&2==Q(a[c],1)&&(0==Q(a[c],57)||0==Q(a[c],58))){b.g=R(b.a,3,0);break a}for(c=0;c<a.length;++c)switch(Q(a[c],24)){case 2:d=b,e=a[c],0<d.g?--d.g:Q(e,40)<R(d.a,1,6E4)?d.b||(++d.f,d.f>=R(d.a,2,1)&&(d.dispatchEvent(new sP(0)),d.b=!0)):(d.b&&(d.dispatchEvent(new sP(1)),
d.b=!1),d.f=0)}}this.dispatchEvent(new $P)}};h.tk=function(a){KV(this.b,a.b,a.a,this.Ja)};h.sk=function(a){Z(this.f,this.da()+" latency event: "+a.message);"transport writable"==a.message?(this.Pd=!0,this.H||we(this.bk,1E4,this),this.dispatchEvent(new dQ([],[],this.da())),qV(this)):"render first video frame"==a.message?(this.H=!0,qV(this)):"transport not writable"==a.message&&(this.g.a?this.stop(10,"P2P session ending. Falling back to cloud."):this.pc())};h.bk=function(){this.H||(this.H=!0,qV(this))};
var qV=function(a){"STARTED"==a.getState()&&a.Pd&&a.H&&mV(a,"INPROGRESS")};jV.prototype.Qd=function(a){switch(a.label){case "collections":this.dispatchEvent(new fV(a.payload));break;case "msodc":this.b.Kb(a.label,a.payload);break;case "dataSendChannel":this.f.error("Received data on the broadcast data channel. Data:"+a.payload);break;default:this.dispatchEvent(new eV(a.b,a.payload))}};var pV=function(a){a.A=we(a.Wj,5E3,a)};h=jV.prototype;
h.vk=function(a){if(null!=this.A){a.a!=this.Cb&&(a.a?Z(this.f,this.da()+" started receiving audio"):xQ(this.f,this.da()+" stopped receiving audio!"),this.Cb=a.a);a.b!=this.Db&&(a.b?Z(this.f,this.da()+" started receiving video"):xQ(this.f,this.da()+" stopped receiving video!"),this.Db=a.b);var b=Fa();a.a&&(this.za=b);a.b&&(this.Da=b);if(a.a||a.b)xe(this.A),this.A=null,pV(this)}};
h.Wj=function(){var a=Fa(),b=(a-this.za)/1E3,a=(a-this.Da)/1E3;this.dispatchEvent(new aQ(this.b.a));this.za==this.ia?Z(this.f,this.da()+" has never received audio"):5E3<b&&Z(this.f,this.da()+" has not received audio for "+b+" seconds");this.Da==this.ia?Z(this.f,this.da()+" has never received video"):5E3<a&&Z(this.f,this.da()+" has not received video for "+a+" seconds");pV(this)};
h.gh=function(a){if("STOPPED"==this.a.getState()){F(this.j,"Stopping session because local session stopped with endCause: "+a.a);switch(this.getState()){case "INITIAL":E(this.j,"Local session stopped before starting.");mV(this,"STOPPED",a.a,a.ac);return;case "STOPPED":E(this.j,"Local session stopped after already stopped.");return}this.stop(a.a,a.ac)}};
h.mh=function(a){if("STOPPED"==this.b.getState()){switch(this.getState()){case "INITIAL":E(this.j,"Remote session stopped before starting.");return;case "STOPPED":E(this.j,"Remote session stopped after already stopped.");return}this.stop(a.a,a.ac)}};
h.Lk=function(a){Z(this.f,this.da()+" transport state event: transport IS "+(a.a?"":"NOT ")+"writable");if(a.a){if(null!=this.F){var b=Math.round((Fa()-this.ab)/1E3);xe(this.F);this.F=null;this.Kd.then(function(a){VQ(a,3062,this.b.a||void 0,void 0,void 0,void 0,b)},null,this)}}else null==this.F&&(this.ab=Fa(),this.F=we(n(this.stop,this,10),4E4),this.Kd.then(function(a){VQ(a,3061)},null,this))};h.jl=function(a){this.dispatchEvent(a)};
var NV=function(a,b){switch(a.getState()){case "INITIAL":case "STARTING":E(a.j,"Remote description changed before starting.");return;case "STOPPED":case "FINISHED":E(a.j,"Remote description changed after end.");return}if(LV(a.Ca,b)){a.Ca=Yb(b);Z(a.f,a.da()+" received modified remote description: "+Zi(b));var c=oV(b);0<c.length&&OT(a.a.a,c);b=MV(b);b=GV(a,b);b=fP(b,function(a){return!Ja(a.getName(),"h264")});a.m=lP(kP(a.m,b.g),u(b.h));a.m=oP(a.m,b);b=a.m.b;null!=b&&(a.Wa=JO(b),a.dispatchEvent(new eQ));
null==b&&null==a.m.a||a.a.update(a.m,[])}};jV.prototype.na=function(a){null!=a&&null==this.b.a&&(this.b.na(a),this.Od.resolve(a),Z(this.f,"Session IDs are now set: LocalSession ID: "+this.da()+", RemoteSession ID: "+iV(this.b)),Z(this.f,"Note: Session "+this.da()+" is not yet active."))};
var LV=function(a,b){if(null!=a){var c;if(!(c=OV(a.b,b.b)||OV(a.a,b.a))){c=a.g;var d=b.g;if(null==c&&null==d)c=!1;else{var e;if(!(e=null==c||null==d||c.ub()!=d.ub()||c.f!=d.f||c.b!=d.b))a:if(c=u(c.g),d=u(d.g),c.length!=d.length)e=!0;else{for(e=0;e<c.length;e++){var f=c[e],g=d[e];if(f.Yb!=g.Yb||f.Uc!=g.Uc||f.nc!=g.nc||f.kc!=g.kc||f.Kc!=g.Kc||f.ta()!=g.ta()||f.od!=g.od||f.Cc!=g.Cc||f.yd!=g.yd||f.Fd!=g.Fd||f.Gd!=g.Gd){e=!0;break a}}e=!1}c=e?!0:!1}}if(!c)a:if(a=u(a.h),b=u(b.h),a.length!=b.length)c=!0;
else{for(c=0;c<a.length;c++)if(d=a[c],e=b[c],d.a!=e.a||d.f!=e.f||d.g!=e.g||d.b!=e.b){c=!0;break a}c=!1}b=c}else b=!0;return b},OV=function(a,b){if(null!=a||null!=b)if(null!=a&&null!=b){var c;a:{c=JO(a);var d=JO(b);if(c.length!=d.length)c=!0;else{for(var e=0;e<c.length;e++){var f=c[e],g=d[e];if(f.a!=g.a||f.getName()!=g.getName()||f.l!=g.l||f.f!=g.f||f.b!=g.b){c=!0;break a}}c=!1}}if(!c)a:if(a=u(a.f),b=u(b.f),a.length!=b.length)c=!0;else{for(c=0;c<a.length;c++)if(d=a[c],e=b[c],d.a!=e.a||d.getId()!=e.getId()){c=
!0;break a}c=!1}b=c}else b=!0;else b=!1;return b};h=jV.prototype;h.wk=function(){"STOPPED"!=this.getState()?E(this.j,"Logging finished before media stopped!"):(mV(this,"FINISHED"),this.ba.resolve())};
h.kl=function(a){switch(this.getState()){case "INITIAL":xQ(this.f,"Received remote streams before starting.");return;case "STOPPED":case "FINISHED":E(this.j,"Received remote streams after end.");return}var b=eb(a.b,function(a){return"a"!=a.U()?!0:this.g.l},this);if(0<b.length||0<a.removed.length)"STARTING"==this.getState()?(Z(this.f,this.da()+" queuing stream changes:."),this.Pa.push({lg:b,Gh:a.removed})):(Z(this.f,this.da()+" sending stream adds."),this.m=nP(this.m,b,a.removed),this.a.update(this.m,
a.removed));t(a.removed,this.rl,this);t(a.a,this.Kl,this);t(b,this.Bj,this);(0<a.removed.length||0<a.a.length||0<b.length)&&this.dispatchEvent(new dQ(wb(b,a.a),a.removed))};h.Bj=function(a){a=new YP(0,a);this.Ya(a);this.o.push(a)};h.Kl=function(a){var b=jb(this.o,function(b){return LN(b.getInfo(),a)},this);if(-1==b)E(this.j,"Tried to update non-existant remote stream: "+a);else{var c=new YP(0,a);this.Ya(c);this.o[b]=c}};
h.rl=function(a){var b=jb(this.o,function(b){return LN(b.getInfo(),a)},this);if(-1==b)E(this.j,"Tried to remove non-existant remote stream: "+a);else{var c=this.o[b];sb(this.o,b);c.Ha("Aa")}};h.Gk=function(a){switch(this.getState()){case "INITIAL":xQ(this.f,"Received remote stream requests before starting.");return;case "STOPPED":case "FINISHED":E(this.j,"Received remote stream requests after end.");return}uV(this,a.a)};h.Hk=function(a){this.Ah(a.label,a.payload)};
var PV=function(a,b){if(null!=b){Z(a.f,a.da()+" setting audio options to: "+Zi(qP()));var c=Xb(a.g);c.H=b;a.g=c;a.m=MV(a.m);b=a.m;null!=b.b&&$T(a.a,b)}},MV=function(a){var b=a.b,c=JO(b),d=jb(c,function(a){return lO(a,"OPUS")});if(-1!=d){var e=!(Zj&&!(0<=Ya(Nn,"48")));c[d]=new jO(sO(sO(sO(new mO(c[d]),"stereo","0"),"useinbandfec","1"),"usedtx",e?"1":"0"));b=MO(b,c)}return iP(a,b)},nV=function(a,b){if(b.b&&IO(b.b)!=IO(a.a.a.b.b)){var c=IO(a.a.a.b.b);b=iP(b,QO(b.b,c))}b.a&&IO(b.a)!=IO(a.a.a.b.a)&&(c=
IO(a.a.a.b.a),b=eP(b,QO(b.a,c)));b.f&&IO(b.f)!=IO(a.a.a.b.f)&&(c=IO(a.a.a.b.f),b=jP(b,QO(b.f,c)));return b};jV.prototype.toString=function(){return"Session(Id="+this.b.a+" p2p="+this.g.a+" useAudio="+this.g.l+" useVideo="+this.g.m+")"};var QV={SUCCESS:0,ii:100,gp:101,Np:102,Op:103,Nl:200,bm:221,fi:201,qm:202,wm:203,vn:204,yn:205,Ao:206,Bo:207,Do:208,Qo:209,Ii:210,bp:211,Oo:222,Gq:223,ep:212,yp:213,xp:214,Dp:215,Rp:216,Wp:217,Dq:218,USER_CANCELED:219,Mq:220,Zm:224,ap:225,Yo:226,Bq:227,Mm:228,Fn:229,tp:230,Zo:231,Vn:232,ho:233,io:234,Bp:235,Ro:236,Zl:237,Yl:238,Ym:239,To:240,jm:300,tm:301,Jm:302,bo:303,eo:304,Jo:305,Sp:306,gq:307,Qm:308,kq:309,Xn:310,bn:311,Qp:312,Pp:313,co:314,Qn:315,Rm:316,Bn:317,ym:318,cm:319,Xo:320,cp:321,Cq:322,
Tn:323,zo:324,wo:325,dm:326,Tp:327,Vp:328,Up:329,yo:330,xo:331};var TV=function(a,b,c,d,e){B.call(this);this.j=Xi("realtime.media.session.SessionManager");this.J=b;this.za=this.J.b;this.a=this.J.ka.Bd("realtime.media.session.SessionManager");this.m=new tr(this);this.l(this.m);this.B=a;this.Wa=e;this.qa=this.ia=this.g=null;this.F="INITIAL";this.o=null;this.f=new C;vi(cO,function(a){this.f.set(a,new zi)},this);this.b=new zi;this.V=new C;this.u=null;this.h=new AP;this.H=new nU;this.pb=c;this.Ja=d;this.N=[];this.ja=[];this.oa=new bV;this.Ca=this.A=null;RV(this);this.ba=
Vb();this.Z=Vb();this.ha=Vb();this.Ua=[];this.ba.a.then(function(){Z(this.a,"P2P enabled, but ICE with TURN disabled.");this.ha.resolve(!1)},function(){this.ha.b()},this);ge([this.ba.a,this.Z.a,this.ha.a]).then(function(){SV(this,!0)},null,this);this.Da=XQ(a,RQ,UQ)};r(TV,B);
var UV=new tP("","","a"),VV=new tP("","","v",new Sq(320,180),30),WV=new tP("","","v",kV,30),RV=function(a){lU(a.B);az(a.B,QQ).then(function(a){this.A=a;this.Ca=[mU(this.A,"sessionManagerState",n(this.getState,this)),mU(this.A,"p2pSessionActive",n(function(){return hb(XV(this),function(a){return a.g.a})},this)),mU(this.A,"sessions",n(function(){return fb(this.b.P(),function(a){return a.Ua()},this)},this))]},function(a){E(this.j,"Error getting DiagnosticDataService: "+a)},a)};h=TV.prototype;
h.X=function(){t(this.b.P(),nd);null!=this.A&&t(this.Ca,this.A.f,this.A);TV.W.X.call(this)};h.getState=function(){return this.F};h.Ha=function(a,b,c){a!=this.F&&(Z(this.a,"SessionManager changed state from "+this.F+" to "+a),this.F=a,this.dispatchEvent(new dO(a,b,c)))};
h.Wb=function(a){if("INITIAL"!=this.getState())return!1;var b=this.B,c=this.za,d=new cy(eu,[],[],[eu.prototype.g],[eu.prototype.na],dv,[],[],[dv.prototype.g],[dv.prototype.na]),e=lz.S(),f=new VU(mz(e,b,c)),g=new by(e.ka.g(b,c),"j");this.o=new ky(0,e.ka.b(b,c),[],d,f,g,e.ka.f(b,c));this.l(this.o);py(this.o);this.m.listen(this.o,"w",this.Oa);this.m.listen(this.o,"y",this.Pa);Z(this.a,"Updating default options to: "+Zi(BP(a)));this.h=a;this.h.a&&this.ba.resolve(!0);if(null==this.g||La(this.g))this.g=
this.h.b;null==this.g||La(this.g)||this.Z.resolve(this.g);this.u=SV(this,!1);if(null==this.u)return this.a.error("Failed to create the cloud session."),this.stop(16),!1;this.Ha("STARTING");return!0};h.start=function(){};h.pc=function(){this.o&&this.o.zd();t(this.b.P(),function(a){a.pc()})};
h.connect=function(a,b,c){if("STARTING"!=this.getState()&&"INPROGRESS"!=this.getState())return!1;this.g=a;this.ia=b;this.qa=c;Z(this.a,"Connecting to hangoutId: "+a+", with participantId: "+b+" and sessionLogData: "+c);this.Z.resolve(this.g);var d=wb(XV(this),YV(this),ZV(this));t(d,function(d){d.ae(a,b,c)},this);return!0};
var $V=function(a,b,c){c.a||(c.v?(a=new vO("call/"+c.v,1,null,"collections"),b=hP(b),b.l.set(a.Sb(),a)):E(a.j,"Collections' push channel not added. ClientResource not available"));return b},aW=function(a){var b={};t(a.b.P(),function(a){a.g.a||(b[a.da()]=a.b.a)});return b},cW=function(a){var b=XV(a);0==b.length&&(b=ZV(a));0==b.length&&(b=bW(a));var c=[];t(b,function(a){yb(c,Pb(a.u))});return c},dW=function(a){var b=XV(a);0==b.length&&(b=ZV(a));0==b.length&&(b=bW(a));var c=[];t(b,function(a){yb(c,a.o)});
return c},eW=function(a,b){t(a.b.P(),function(a){a.g.f||(a.g=DP(a.g,b),a.g.g&&aU(a.a))});a.h=DP(a.h,b)},fW=function(a){a.h.g||(t(a.b.P(),function(a){a.g.g||(a.g=EP(a.g),a.g.f&&aU(a.a))}),a.h=EP(a.h))},iW=function(a,b){Z(a.a,"Adding capture: "+Zi(bO(b)));var c=!0;t(gW(a),function(a){a=lV(a,b);c=c&&a});"e"==b.Y().cb&&(c=!0);c?a.N.push(b):hW(a,b)},hW=function(a,b){var c=!0;t(gW(a),function(a){var d;if(d=c)a:{switch(a.getState()){case "STOPPED":case "FINISHED":E(a.j,"Removing stream after end.");d=!1;
break a}if(a.oa){d=b.Y();"e"==d.cb?xV(a.b):"v"==d.a&&a.h.v(d,"wa",a.mc);a.h.v(b,"T",a.lc);var f=a.a;switch(f.g){case "STOPPED":xQ(f.f,"Remove local stream called after stopped.")}var g=f.a;nT(g,"Removing capture="+b);var m=b.ib(g.g);tb(g.Z,b);g.u.v(b,"V",g.Ja);"d"!=b.Y().a&&(AT(g,m),yT(g,null,b.Y()),g.o?BT(g):nT(g,"Skipping SDP renegotiation on local stream change because we are still waiting on the remote description."));b.Jf(f.b);f.m.remove(b);if(f=a.u[sV(d)])delete a.u[sV(d)],a.dispatchEvent(new dQ([],
[f.getInfo()]));d=!0}else d=tb(a.ja,b)}c=d});c=c&&tb(a.N,b)};
TV.prototype.ib=function(a,b){var c=wb(XV(this),ZV(this),bW(this));if(null!=b){var d=kb(this.b.P(),function(a){return a.da()==b});d&&c.unshift(d)}if(0==c.length)return Z(this.a,"No active session to get stream from to render source: "+a),null;for(d=0;d<c.length;d++){var e=c[d],f=e.ib(a);if(null!=f)return Z(this.a,"Using stream: "+f.getInfo()+" from "+e.da()+" to render source: "+a),f}xQ(this.a,"Unable to find stream to use to render source: "+a);return null};
TV.prototype.zc=function(a){var b=wb(bW(this),ZV(this),XV(this));t(b,function(b){b.zc(a)})};var jW=function(a,b){t(a.b.P(),function(a){AV(a,b)},a);a.ja=b};TV.prototype.stop=function(a,b){Z(this.a,"Stopping video call because stop called with endCause: "+a);if("INITIAL"==this.getState()||"STOPPED"==this.getState()||"FINISHED"==this.getState())return!1;this.Ha("STOPPED",a,b);t(this.b.P(),function(c){c.stop(a,b)});return!0};
var SV=function(a,b){var c=kW(a,a.h,b);if(!c)return null;var d=lW(a,c);if(null==d)return xQ(a.a,"Failed to build session."),null;d.Ga().then(function(a){a?(Z(this.a,"Local session initialize completed."),a=$V(this,a,c),(a=qU(this.H,a,c.b,c.h,b))?(a=me(this.o.add(a).then(function(a){F(this.j,"Session add response received.");if(1>a.length||!(a[0]instanceof eu))Z(this.a,"Stopping remote session due to receiving null session proto."),d.stop(16);else{var b=a[0];null!=b?(b=vU(this.H,b,!c.a),null!=b?mW(this,
d,b):(Z(this.a,"Stopping session due to inability to parse session proto."),d.stop(16))):(Z(this.a,"Stopping session due to inability to parse session proto."),d.stop(16))}return a},null,this),function(a){xQ(this.a,"Failed to add session to collection. Error: "+a);d.stop(16);throw a;},this),NU(a,"Ra",null,this)):(xQ(this.a,"Failed to parse session info."),d.stop(16))):(this.a.error("Local session initialize failed to create local offer."),d.stop(16))},function(a){xQ(this.a,"Failed to initialize session.");
d.stop(16);throw a;},a);return d},lW=function(a,b){a:{if(!b.w){var c=cV(a.oa);b=Xb(b);b.w=c}if(c=Q(a.za,20))b=Xb(b),b.o=c;c=a.J.ka.sh(a.B,"c"+Math.round(2147483648*Math.random())+Math.round(2147483648*Math.random())+(b.a?"_P2P":"_NMS"),b);if(b.a){if(!Zj){Z(a.a,"Not creating p2p session because local does not support p2p");b=null;break a}if(2<a.ja.length){Z(a.a,"Not creating p2p session due to too many participants.");b=null;break a}}var d=a.J.ka.th(a.B,b,a.Wa);b=new jV(a.B,a.J,c,d,b)}if(null==b)return null;
a.b.add(b);a.f.get(b.getState()).add(b);a.V.set(b.da(),b.getState());c=b;c.J=a.Ja;c.h.listen(c.J,"ub",c.tc);c=b;c.N=a.pb;c.h.listen(c.N,"ub",c.uc);AV(b,a.ja);a.m.listen(b,["sb","tb","sa","va","qa"],a.dispatchEvent);a.m.listen(b.a,"oa",a.dispatchEvent);a.m.listen(b.b,"ha",a.dispatchEvent);a.m.listen(b,"X",a.ab);a.m.listen(b,"pa",a.Xa);a.m.listen(b,"ma",a.Ya);a.m.listen(b,"na",a.Ka);return b},nW=function(a,b,c){b.start(c);t(a.N,function(a){lV(b,a)})},gW=function(a){return wb(a.f.get("INITIAL").P(),
bW(a),ZV(a),YV(a),XV(a))},YV=function(a){return a.f.get("PAUSED").P()},XV=function(a){return a.f.get("INPROGRESS").P()},ZV=function(a){return a.f.get("STARTED").P()},bW=function(a){return a.f.get("STARTING").P()},kW=function(a,b,c){var d=b.b||a.g;null!=d?(b=GP(b,[UV,VV]),b=FP(b,d)):b=FP(b,null);b=Xb(b);if(b.a=c){b=HP(b);if(null==a.u)return aj(a.j,"P2P session starting first! This is bad!"),null;b=Xb(b);b.J=!1;b=GP(b,[UV,WV]);c=Xb(b);c.F=xb(a.Ua,b.F);b=c}return b};
TV.prototype.Oa=function(a){null!=a.a&&0<a.a.length&&oW(this,a.a);null!=a.removed&&0<a.removed.length&&pW(this,a.removed)};TV.prototype.Pa=function(a){this.a.error("Stopping video call because session collection failed, with reason: "+a.reason);this.stop(a.a)};
var oW=function(a,b){t(b,function(a){var b=kb(this.b.P(),function(b){return a.g()==b.b.a});if(b){var c=vU(this.H,a,!b.g.a);null!=c&&mW(this,b,c)}else aj(this.j,"Received modification for a session that we don't have!")},a)},pW=function(a,b){t(b,function(a){var b=kb(this.b.P(),function(b){return a.g()==b.b.a});b?b.stop(25):this.a.error("Received removal of a session that we don't have! Session id: "+a.g())},a)};TV.prototype.Ya=function(a){mW(this,a.f,a.sessionDescription)};
var mW=function(a,b,c){var d=b.getState(),e="INITIAL"==d,f="INITIAL"==d||"STARTING"==d,d="INITIAL"!=d&&"STARTING"!=d,g=0!=u(c.h).length,m=!1,q=c.g;q&&null!=q.a&&(m=2==q.a.split(" ").length);g==m&&(f=e=!1);g=c.g;null!=g&&null!=g.f&&null!=g.b&&0!=u(g.g).length||(f=!1);g=c.m;null!=g&&b.na(g);e&&(Z(a.a,"Received remote description for session "+iV(b.b)+" with sufficient data to allow session preparation."),b.Wb(c));f?(Z(a.a,"Received remote description for session "+iV(b.b)+" with sufficient data to allow starting the session."),
nW(a,b,c)):d&&NV(b,c)};TV.prototype.Ka=function(a){if("INPROGRESS"!=this.getState())E(this.j,"Ingress bandwidth updated before started.");else{var b=cV(this.oa),c=new vt;-1!=b.b&&S(c,1,b.b);-1!=b.a&&S(c,2,b.a);-1!=b.f&&S(c,3,b.f);b=new Xt;W(b,7,c);c=new eu;c.na(a.sessionId);a=this.g||this.h.b;null===a||hu(c,[a]);gu(c,[b]);this.o.modify(c)}};
TV.prototype.Xa=function(a){switch(this.getState()){case "INITIAL":E(this.j,"Received local candidates before starting.");return;case "STOPPED":case "FINISHED":E(this.j,"Received local candiates after end.");return}var b=a.target,c=[];t(a.a,function(a){a=this.H.a(a);c.push(a);S(a,9,void 0)},this);if(!(1>c.length)){var d=new St;Gq(d,6,c);var e=b.a.a.b.g;if(e&&(S(d,4,e.f),S(d,5,e.b),e.a)){var f=new Ut;S(f,1,e.a.split(" ")[0]);S(f,2,e.a.split(" ")[1]);W(d,2,f)}var g=[];t(u(b.a.a.b.h),function(a){g.push(this.H.tg(a))},
this);b=new Xt;b.Ma(4);W(b,2,d);Gq(b,4,g);d=new eu;d.na(a.sessionId);gu(d,[b]);this.o.modify(d)}};
TV.prototype.ab=function(a){var b=a.target,c=this.V.get(b.da()),d=b.getState();if(c!=d){this.V.set(b.da(),d);this.f.get(c).remove(b);this.f.get(d).add(b);switch(d){case "STARTED":null!=this.g&&null!=this.ia&&null!=this.qa&&b.ae(this.g,this.ia,this.qa);break;case "INPROGRESS":qW(this,b);break;case "STOPPED":rW(this,b,a.a,a.ac);break;case "FINISHED":this.f.get(b.getState()).remove(b),this.V.remove(b.da()),this.b.remove(b),nd(b),this.b.fa()==this.f.get("FINISHED").fa()&&("STOPPED"!=this.F?E(this.j,"Session Manager finished before stopping."):
this.Ha("FINISHED"))}this.dispatchEvent(a)}};
var qW=function(a,b){if("INITIAL"==a.getState()||"STOPPED"==a.getState()||"FINISHED"==a.getState())aj(a.j,"Should not have new active sessions now.");else{"STARTING"==a.getState()&&a.Ha("INPROGRESS");PV(b,a.h.H);var c=b.da(),d=XV(a);t(d,function(a){c!=a.da()&&(a.pause(),sW(this,a,b))},a)}},rW=function(a,b,c,d){t(a.N,function(a){a.Jf(b.da())});if(26==c)c=a.u,a.u=SV(a,!1),c&&(a.u?sW(a,c,a.u):a.a.error("Cloud session"+c.b.a+" to cloud handoff failed"));else{55==c&&a.Da.then(function(a){VQ(a,3262,b.b.a||
void 0)},null,a);var e=a.f.get("STOPPED").fa()+a.f.get("FINISHED").fa();a.b.fa()==e?"STOPPED"!=a.F&&(Z(a.a,"All sessions now stopped."),a.stop(c,d)):0==XV(a).length&&t(YV(a),function(a){a.resume();sW(this,b,a)},a)}},sW=function(a,b,c){var d;d=b.g.a?5:c.g.a?4:6;var e=new XM;S(e,1,d);S(e,2,0);S(e,3,b.b.a);S(e,4,c.b.a);ZM(e);var f=new lN;W(f,15,e);rV(b.b,f);4==d&&a.Da.then(function(a){VQ(a,3260,c.b.a||void 0)},null,a);Z(a.a,"Handing off from "+(b.g.a?"P2P":"RF")+" session to "+(c.g.a?"P2P":"RF")+" session")};var tW=function(a,b){tr.call(this);this.B=a;this.A=b;this.a=null;this.b=[];this.h=this.o=!1;this.F=new nU;this.u=null};r(tW,tr);tW.prototype.X=function(){t(this.b,function(a){hW(this.B,a)},this);this.b=[];this.a=null;tW.W.X.call(this)};var vW=function(a){var b=a.a,c=a.b[a.b.length-1]||null;t(a.b,function(a){"e"==a.Y().cb&&(c=a)});b!=c&&(a.a=c,uW(a))};tW.prototype.K=function(a){var b=this.a;vW(this);b&&b==this.a&&a.target==b.Y()&&uW(this)};
var uW=function(a){a.w||(a.h?a.o=!0:(a.o=!1,a.h=!0,ge([a.A.Ta,a.A.b,a.A.m]).then(function(a){var b=a[0],d=a[1];a=a[2];var e;if(null!=this.a){var f=this.F,g=this.a.Y();e=new iu;e.R(b);e.ma(g.M());e.nf(g.getId());e.Ma(wU(f,g.a));var m="c"==g.getState();e.Id(new ku);var q=U(e,ku,5);S(q,1,m);if("a"==g.a)null!=g.Hd&&(f=new qu,S(f,2,g.Hd),g=g.M(),S(f,1,g),W(e,8,f));else if("v"==g.a){m=new ou;W(e,7,m);m=U(e,ou,7);a:{q=g.cb;switch(q){case "d":q=1;break a;case "e":q=2;break a}E(f.j,"Unknown media content: "+
q);q=void 0}S(m,1,q);m=null!=g.b?u(g.b):null;null!=m&&(g=U(e,ou,7),f=fb(m,f.l,f),Gq(g,3,f))}e.R(b);e.ma(d);e.nf(this.a.Y().getId());this.u=e}else this.u&&(e=this.u,b=U(e,ku,5),S(b,1,!0));e?a.add(e).then(this.g,this.g,this):this.g()},a.g,a)))};tW.prototype.g=function(){this.h=!1;this.o&&uW(this)};var xW=function(a){P(this,a,"hc:rc",-1,wW)};r(xW,O);var wW=[7];
xW.prototype.s=function(){var a=new G,b;b=Q(this,1);null!=b&&mq(a,1,b);b=Q(this,2);null!=b&&L(a,2,b);b=Q(this,3);null!=b&&L(a,3,b);b=Q(this,4);null!=b&&L(a,4,b);b=Q(this,5);null!=b&&K(a,5,b);b=Q(this,6);null!=b&&L(a,6,b);b=V(this,yW,7);0<b.length&&N(a,7,b,zW);b=Q(this,8);null!=b&&I(a,8,b);b=Q(this,9);null!=b&&K(a,9,b);b=Q(this,10);null!=b&&L(a,10,b);b=Q(this,11);null!=b&&L(a,11,b);b=Q(this,12);null!=b&&L(a,12,b);b=Q(this,13);null!=b&&L(a,13,b);return H(a)};var yW=function(a){P(this,a,0,-1,null)};
r(yW,O);yW.prototype.s=function(){var a=new G;zW(this,a);return H(a)};var zW=function(a,b){var c;c=Q(a,1);null!=c&&L(b,1,c);c=Q(a,2);null!=c&&L(b,2,c)};Qq("hc:rc",xW);var AW=function(a,b){S(a,2,b)};xW.prototype.T=function(){return Q(this,3)};xW.prototype.R=function(a){S(this,3,a)};var BW=function(a,b){S(a,4,b)},CW=function(a,b){S(a,5,b)},DW=function(a,b){S(a,8,b)},EW=function(a,b){S(a,11,b)};var FW=function(){this.a=!1;this.b=Vb();this.f=null};FW.prototype.then=function(a,b,c){return this.b.a.then(a,b,c)};Ud(FW);FW.prototype.get=function(){return this.f};var GW=function(){this.a=new FW};GW.prototype.resolve=function(a){this.a.a||(this.a.a=!0,this.a.f=a,this.a.b.resolve(a))};var HW=function(a,b){a.a.a||(a.a.a=!0,a.a.b.b(b))};var IW=function(){this.b=64;this.a=Array(4);this.l=Array(this.b);this.g=this.f=0;this.reset()};r(IW,kk);IW.prototype.reset=function(){this.a[0]=1732584193;this.a[1]=4023233417;this.a[2]=2562383102;this.a[3]=271733878;this.g=this.f=0};
var JW=function(a,b,c){c||(c=0);var d=Array(16);if(va(b))for(var e=0;16>e;++e)d[e]=b.charCodeAt(c++)|b.charCodeAt(c++)<<8|b.charCodeAt(c++)<<16|b.charCodeAt(c++)<<24;else for(e=0;16>e;++e)d[e]=b[c++]|b[c++]<<8|b[c++]<<16|b[c++]<<24;b=a.a[0];c=a.a[1];var e=a.a[2],f=a.a[3],g;g=b+(f^c&(e^f))+d[0]+3614090360&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[1]+3905402710&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[2]+606105819&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^
b))+d[3]+3250441966&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[4]+4118548399&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[5]+1200080426&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[6]+2821735955&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[7]+4249261313&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[8]+1770035416&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[9]+2336552879&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+
(c^f&(b^c))+d[10]+4294925233&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[11]+2304563134&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[12]+1804603682&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[13]+4254626195&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[14]+2792965006&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[15]+1236535329&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(e^f&(c^e))+d[1]+4129170786&4294967295;b=c+(g<<5&4294967295|
g>>>27);g=f+(c^e&(b^c))+d[6]+3225465664&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[11]+643717713&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[0]+3921069994&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[5]+3593408605&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[10]+38016083&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[15]+3634488961&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[4]+3889429448&4294967295;c=e+(g<<20&4294967295|
g>>>12);g=b+(e^f&(c^e))+d[9]+568446438&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[14]+3275163606&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[3]+4107603335&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[8]+1163531501&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[13]+2850285829&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[2]+4243563512&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[7]+1735328473&4294967295;e=f+(g<<14&4294967295|
g>>>18);g=c+(f^b&(e^f))+d[12]+2368359562&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(c^e^f)+d[5]+4294588738&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[8]+2272392833&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[11]+1839030562&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[14]+4259657740&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[1]+2763975236&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[4]+1272893353&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^
b^c)+d[7]+4139469664&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[10]+3200236656&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[13]+681279174&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[0]+3936430074&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[3]+3572445317&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[6]+76029189&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[9]+3654602809&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[12]+3873151461&4294967295;
f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[15]+530742520&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[2]+3299628645&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(e^(c|~f))+d[0]+4096336452&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[7]+1126891415&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[14]+2878612391&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[5]+4237533241&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[12]+1700485571&4294967295;b=c+
(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[3]+2399980690&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[10]+4293915773&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[1]+2240044497&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[8]+1873313359&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[15]+4264355552&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[6]+2734768916&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[13]+1309151649&4294967295;
c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[4]+4149444226&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[11]+3174756917&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[2]+718787259&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[9]+3951481745&4294967295;a.a[0]=a.a[0]+b&4294967295;a.a[1]=a.a[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.a[2]=a.a[2]+e&4294967295;a.a[3]=a.a[3]+f&4294967295};
IW.prototype.update=function(a,b){k(b)||(b=a.length);for(var c=b-this.b,d=this.l,e=this.f,f=0;f<b;){if(0==e)for(;f<=c;)JW(this,a,f),f+=this.b;if(va(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.b){JW(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.b){JW(this,d);e=0;break}}this.f=e;this.g+=b};
IW.prototype.digest=function(){var a=Array((56>this.f?this.b:2*this.b)-this.f);a[0]=128;for(var b=1;b<a.length-8;++b)a[b]=0;for(var c=8*this.g,b=a.length-8;b<a.length;++b)a[b]=c&255,c/=256;this.update(a);a=Array(16);for(b=c=0;4>b;++b)for(var d=0;32>d;d+=8)a[c++]=this.a[b]>>>d&255;return a};var KW=function(a){this.a=new iI;this.bb=null;this.h=XQ(a,Nx).then(function(a){return this.bb=a},null,this);this.re=null;this.o=XQ(a,SQ,jU).then(function(a){return this.re=a},null,this);this.l=Vb();this.m=this.l.a;this.f=null;this.b=!1;this.Oe=[];this.cf=this.g=!1},LW=function(a){Zy(a,PQ)||Ox(a,PQ,new KW(a))},NW=function(a){a.cf||MW(a);return a.f||!1},OW=function(a,b){a.bb?b():a.h.then(b)},PW=function(a,b){a.re?b():a.o.then(b)};KW.prototype.pk=function(a){QW(this,a);RW(this,a)};
KW.prototype.fh=function(a){RW(this,a);tb(this.Oe,a)};var MW=function(a,b){OW(a,n(function(){this.cf=!0;this.b=null;var a=Vb();a.a.then(n(this.v,this),n(this.w,this,b));var d=Q(this.bb,10);if(null!=d){null!=b&&(d=sh(d,"set",String(b)));var e=hj(fj);e.open("GET",d,!0);e.onreadystatechange=function(){4==e.readyState&&(200==e.status?a.resolve(e.responseText):a.b(null))};e.send(null)}else a.b(null)},a))};KW.prototype.v=function(a){this.b="true"==a;SW(this)};
KW.prototype.w=function(a){this.b=k(a)?a:NW(this);SW(this)};
var SW=function(a){a.l.resolve();null===a.f&&(a.f=a.b,t(a.Oe,function(a){eW(a.a,NW(this))},a));a.b!=a.f&&MW(a,NW(a))},QW=function(a,b){if(!a.g){a.g=!0;var c=TW(a);null!=c&&(null!=Q(c,8)&&3456E5>Fa()-Q(c,1)&&UW(a,c),b=b.Ta,c.T()==b.get()&&6E4>Fa()-Q(c,1)&&a.m.then(function(){NW(this)&&PW(this,n(function(){t(V(c,yW,7)||[],function(a){Q(a,2);c.T()},this)},this))},void 0,a))}},VW=function(a,b){a+=b;b=new IW;b.update(a,a.length);return String.fromCharCode.apply(String,b.digest())},UW=function(a,b){if(null!=
Q(b,4)&&null!=Q(b,5)&&null!=Q(b,6)&&0!=(V(b,yW,7)||[]).length){var c=WW(a,b);t(V(b,yW,7),function(a){JU(c,XW(this,b,a),Q(a,1))},a)}},YW=function(a){var b=TW(a);if(null==b||null==Q(b,4)||null==Q(b,5)||null==Q(b,6)||0==(V(b,yW,7)||[]).length)return[];var c=WW(a,b);return fb(V(b,yW,7),function(a){return HU(c,XW(this,b,a),Q(a,1))},a)},WW=function(a,b){return new GU(a.bb.o,Q(b,11)||Q(b,6),Q(b,4),Q(b,5)||0,void 0,Q(b,9)||Q(a.bb,1))},XW=function(a,b,c){var d=new gJ,e=(new Date(Q(b,1))).toString();S(d,2,
e);e=Q(b,8);S(d,30,e);S(d,3,-2);c=Q(c,1);S(d,1,c);c=new lN;W(c,4,d);c.R(b.T());d=Q(a.bb,14);S(c,11,d||[]);a=Q(a.bb,8);S(c,12,a);a=Q(b,6);S(c,14,a);a=Q(b,10);S(c,16,a);a=Q(b,12);S(c,22,a);b=Q(b,13);S(c,23,b);return c},TW=function(a){if(!a.a.isAvailable())return null;var b=a.a.get("report_luak");a.a.remove("report_luak");if("hc:rc"!=Yi(b||"[]")[0])return null;b=new xW(Yi(b));return Q(b,2)==VW(Q(a.bb,7),Q(b,1))?b:null},RW=function(a,b){if(a.a.isAvailable()){var c=new xW;c.R(b.Ta.get());var d=Fa();S(c,
1,d);AW(c,VW(Q(a.bb,7),d));BW(c,Q(a.bb,2));CW(c,Q(a.bb,5));S(c,6,b.H);EW(c,Q(a.bb,6));var e=[];Mb(aW(b.a),function(a,b){var c=new yW;S(c,1,a);S(c,2,b);e.push(c)});0!=e.length&&(Gq(c,7,e),d=b.onDisconnect,d.a&&DW(c,d.get()),b=b.ba,(d=b.g)&&S(c,10,d),(d=b.a)&&S(c,12,d),(b=b.b)&&S(c,13,b),a.a.set("report_luak",c.la()))}};var ZW=function(){B.call(this)};r(ZW,oQ);var aX=function(){kd.call(this);this.b=[];this.a=new $W(n(this.f,this));this.l(this.a)};r(aX,kd);aX.prototype.f=function(a){t(this.b,function(b){a=b.filter(a)});return a};var $W=function(a){B.call(this);this.g=a;this.b=[];this.a=!1};r($W,gV);var CV=function(a,b){a.b=u(b);a.a||(a.a=!0,id(a.f,a))};$W.prototype.f=function(){this.a=!1;this.dispatchEvent(new hV(this.g(this.b)))};var bX=function(){B.call(this);this.a=new tr(this);this.l(this.a)};r(bX,B);var cX=function(a,b,c){B.call(this);this.f=b;this.a=c;this.b=new tr(this);this.l(this.b);this.b.removeAll();this.b.listen(a,"tb",this.h)};r(cX,B);cX.prototype.h=function(a){this.a.a("I");var b=this.f,c=nx(a.data),c=new Mw(c),c=V(c,Jw,1);F(b.j,"handlePushNotification invoked, batch size: "+c.length);t(c,b.a,b);a=nx(a.data);a=V(new Mw(a),Jw,1);0==a.length?this.a.a("M"):1==a.length?t(a,this.g,this):this.a.a("N")};
cX.prototype.g=function(a){var b=U(a,Ts,1);(b=b&&Q(b,3))&&this.a.a("aa",b);a=U(a,Hw,2);if(null!=a){for(var c,d=0;d<Ix.length;d++)if(b=Ix[d].Va.call(a),null!=b){c=Ix[d].eventType;switch(c){case "j":a="Q";break;case "l":a="R";break;case "g":a="S";break;case "h":a="T";break;case "k":a="U";break;case "c":a="V";break;case "d":a="W";break;case "e":a="X";break;case "r":a="Y";break;case "f":a="$";break;case "m":a="ba";break;case "n":a="ca";break;case "o":a="da";break;case "p":a="ea";break;case "q":a="fa";
break;default:a="P"}this.a.a(a);break}c||this.a.a("Z")}else this.a.a("O")};var eX=function(a,b,c){B.call(this);this.Ab=new GW;this.onConnect=this.Ab.a;this.tc=new GW;this.onDisconnect=this.tc.a;this.qa=new GW;this.uc=this.qa.a;this.ra=new dX(a);this.l(this.ra);this.Nd=b;this.f=this.Nd.b;this.G=Xi("realtime.media.call.BaseCall");this.Sa=new tr(this);this.l(this.Sa);this.pb=new GW;this.Ta=this.pb.a;this.Cb=new GW;this.b=this.Cb.a;this.ab=[];this.H=c||Q(this.f,2)+"^"+Wa();this.ba=new VP;this.ja=new GW;this.m=this.ja.a;this.Oa=new GW;this.ha=this.Oa.a;this.wc=new GW;this.Yf=
new aX;this.l(this.Yf);this.Kb=new aX;this.l(this.Kb);this.a=new TV(a,b,this.Yf.a,this.Kb.a,this.H);this.l(this.a);(new GW).resolve(this.a);this.V={};this.Ca=0;this.Sa.listen(this.a,["oa","qa","sb"],this.dispatchEvent);this.Sa.listen(this.a,"X",this.wi);XQ(a,PQ,LW).then(function(a){a.bb=a.bb||this.f;a.re=a.re||this.Nd;a.cf||MW(a);eW(this.a,NW(a));Math.random()<=Dq(a.bb,9)&&fW(this.a);a.Oe.push(this);this.onConnect.then(n(a.pk,a,this));this.onDisconnect.then(n(a.fh,a,this),n(a.fh,a,this))},null,this);
this.Od=[];XQ(a,QQ,lU).then(function(a){this.za=a;Mb(this.rd(),function(a,b){this.Od.push(mU(this.za,b,a))},this)},null,this)};r(eX,B);h=eX.prototype;h.Cd=function(a){var b=Q(this.f,6);a=Xb(a);a.v=b;b=Q(this.f,18);null!=b&&(a=Xb(a),a.K=b);bj(this.G,"Starting the media session.");this.a.Wb(a)?this.qa.resolve(null):HW(this.qa,"Failed to create session.")};
h.rd=function(){return{callState:n(this.getState,this),hangoutId:n(this.Ta.get,this.Ta),pid:n(this.b.get,this.b),plid:Uc(this.H),sessionId:n(this.xf,this)}};h.sd=function(){return{callState:Uc(this.getState()),hangoutId:Uc(this.Ta.get()),pid:Uc(this.b.get()),plid:Uc(this.H),sessionId:Uc(this.xf())}};h.X=function(){bj(this.G,"Disposing call.");this.disconnect(0);t(this.Od,this.za.f,this.za);Mb(this.sd(),n(function(a,b){mU(this.za,b,a)},this));eX.W.X.call(this)};
h.Ha=function(a){a!=this.Ca&&(F(this.G,"Call state changed from "+this.Ca+" to "+a),this.Ca=a,this.dispatchEvent("Eb"))};h.xf=function(){return this.a.u&&this.a.u.da()};h.getState=function(){return this.Ca};
var fX=function(a,b,c,d){F(a.G,"triggerConnected() called. HangoutId: "+c+" ParticipantId: "+d);a.pb.resolve(c);a.Cb.resolve(d);a.vg();a.ha.then(function(){var a=new bX;this.wc.resolve(a);this.l(a)},void 0,a);b.resolve();a.Ab.resolve(null);a.Ha(2);WP(a.ba,a.H).l="jid";a.a.connect(c,d,a.ba);a.l(new cX(a.a,a.f.v,a.f.h));F(a.G,"Call connected")};eX.prototype.l=function(a){a=n(B.prototype.l,this,a);this.onDisconnect.a?a():this.onDisconnect.then(a,a)};
var gX=function(a,b){a.ab=u(b);jW(a.a,a.ab);a.ha.then(function(a){a.yh(this.ab)},void 0,a)};eX.prototype.disconnect=function(a){if(3==this.getState()||4==this.getState())return F(this.G,"disconnect() skipped, already disconnecting."),this.onDisconnect;F(this.G,"disconnect() called. Endcause: "+a);var b=2==this.getState();this.Ha(3);this.Jd(b,a);return this.onDisconnect};
eX.prototype.Jd=function(a,b){F(this.G,"triggerDisconnected(). Endcause: "+b);a=new hX(b);HW(this.pb,a);HW(this.Cb,a);HW(this.Oa,a);HW(this.wc,a);HW(this.Ab,a);HW(this.qa,a);Mb(this.V,function(a){nd(a)});Ub(this.V);this.f.g.o.a=null;this.tc.resolve(b);this.Ha(4);this.a.stop(b)};
var iX=function(a,b){if(3==a.getState()||4==a.getState())F(a.G,"addCapture() failed, because we are disconnecting");else{var c=a.V[b.Y().getId()];if(c&&mb(c.b,b))E(a.G,"addCapture() failed, because we already added this capture");else{c||(c=new tW(a.a,a),a.V[b.Y().getId()]=c);F(a.G,"addCapture() succeeded. Capture Id:"+b.Y().getId());var d=c.a,e=c;e.listen(b.Y(),["wa","xa","ya","za"],e.K);e.b.push(b);iW(e.B,b);vW(e);b=c.a;a.ha.a&&d!=b&&b!=d&&(d&&a.ha.get().Fh(d.Y()),b&&a.ha.get().Wd(b.Y()))}}},jX=
function(a){return fb(Pb(a.V),function(a){return a.a})};eX.prototype.wi=function(a){a.target==this.a&&("STOPPED"==a.state?(F(this.G,"Disconnect received from session. Endcause: "+a.a),this.disconnect(a.a)):"INPROGRESS"==a.state&&this.dispatchEvent("Db"))};var kX=function(){},hX=function(a){this.a=a},dX=function(a){Vy.call(this,a)};r(dX,Vy);var lX=function(a,b,c,d,e){B.call(this);this.o=new nU;this.b=a;this.m=b;this.h=e;this.a=new C;this.g=new lQ;this.f=new tr(this);this.l(this.f);this.f.listen(this.m,"w",this.yf);this.f.listen(this.h,["va","X"],this.yf);t(d,this.Wd,this)};r(lX,ZW);h=lX.prototype;h.Wd=function(a){""==a.M()&&a.ma(this.b);this.g.add(a)};h.Fh=function(a){this.g.remove(a)};h.Bh=function(a){return a==this.b?this.g:this.a.get(a,null)};
h.yh=function(a){var b=new zi;t(a,function(a){if(a!=this.b&&(b.add(a),!this.a.Ra(a))){var c=new lQ;this.a.set(a,c);this.dispatchEvent(new pQ("Ca",a))}},this);t(this.a.La(),function(a){b.contains(a)||(this.a.get(a),this.a.remove(a)&&this.dispatchEvent(new pQ("Da",a)))},this);this.yf()};
h.yf=function(){var a=new zi;t(this.m.get(),function(b){var c=this.a.get(b.M());if(null!=c){var d=this.o,e=b.M(),f=b.ga(),g=xU(d,b.U()),m="f",q;if(null!=U(b,ou,7)){a:{m=Q(U(b,ou,7),1);switch(m){case 1:m="d";break a;case 2:m="e";break a}E(d.j,"Unknown capture type: "+m);m="f"}q=uU(d,V(U(b,ou,7),tu,3),d.w,d)||void 0}var y;null!=U(b,qu,8)&&(y=Dq(U(b,qu,8),2),y=l(y)?y:void 0);var d=U(b,ku,5)&&U(b,ku,5).cc()?"c":"b",D=null;null!=e&&null!=f&&null!=g&&(D=new kQ(e,f,g,null!=m?m:void 0,d,y,q));null!=U(b,ku,
5)&&Q(U(b,ku,5),2);null!=U(b,mu,6)&&Q(U(b,mu,6),1);f=D;null!=f&&(e=mQ(c,f.a,f.getId(),f.M()),null!=e?(c=f.cb,e.cb!=c&&(e.cb=c,e.dispatchEvent("wa")),c=f.Hd,e.Hd!=c&&(e.Hd=c,e.dispatchEvent("xa")),e.Ha(f.getState()),c=null!=f.b?u(f.b):null,jQ(e,c)&&e.dispatchEvent("za")):c.add(f))}a.add(mX(b.M(),b.ga()))},this);t(dW(this.h),function(b){var c=b.M(),d=b.ga();if(c!=this.b&&!a.contains(c+"/"+d)){b=b.getInfo().U();var e=this.a.get(c);null!=e&&!mQ(e,b,d,c)&&e.add(new kQ(c,d,b));a.add(c+"/"+d)}},this);t(this.a.P(),
function(b){t(u(b.a),function(c){a.contains(mX(c.M(),c.getId()))||b.remove(c)},this)},this)};var mX=function(a,b){return a+"/"+b};var nX=function(a,b,c,d){eX.call(this,a,b,d);this.h=!1;this.u=new GW;this.A=this.u.a;this.N=new GW;this.g=this.N.a;this.g.then(function(a){this.Sa.listen(a,"w",Ea(this.oa,a));this.oa(a)},null,this);this.J=this.ia=this.F=this.Z=null;az(a,PQ,!1).then(n(function(a){this.J=a},this));c&&this.Cd(c)};r(nX,eX);var oX={1:200,2:201,3:202,4:206,5:207,6:209,7:216,11:223,17:235,12:236,13:237,14:238,15:239,16:240},pX={1:0,2:307,3:303,4:217,5:305,6:307,7:307,8:306,11:217};
nX.prototype.oa=function(a){gX(this,fb(a.get(),function(a){return a.M()}))};nX.prototype.connect=function(a,b){return this.uc.then(function(){F(this.G,"connect() was called");if(0!=this.getState())return E(this.G,"connect() failed. Not in INITIALIZED. State: "+this.getState()),ce(new kX(this.getState()));var c=Vb();this.Ha(1);if(va(a)){bj(this.G,"Skipping Hangout resolution");var d=$U(this.ra,this.f,[a],YU(),UU,"g");qX(this,c,d,b||null)}else rX(this,c,a,b);return c.a},void 0,this)};
var rX=function(a,b,c,d){bj(a.G,"Resolving Hangout");c.then(function(a){qX(this,b,a,d||null)},function(a){E(this.G,"Hangout resolve failed, reverting to INITIALIZED state");this.Ha(0);b.b(new sX(306,a))},a)},qX=function(a,b,c,d){var e=Oq(c.g).T();bj(a.G,"connectToHangout(). HangoutId: "+e);1!=a.getState()?(E(a.G,"connectToHangout() failed, not in CONNECTING state. State: "+a.getState()),b.b(new sX(302,new kX(a.getState()))),nd(c)):(a.F=Md(Vq(),"beforeunload",n(a.xh,a,e,d)),a.ia=Md(Vq(),"unload",n(a.xh,
a,e,d)),a.qg(e,d,b,c,0))};h=nX.prototype;h.qg=function(a,b,c,d,e){a=$U(this.ra,this.f,[a],new cy(rt,[rt.prototype.T],[rt.prototype.R],[rt.prototype.M],[rt.prototype.ma],Ku,[Ku.prototype.T],[Ku.prototype.R],[Ku.prototype.M],[Ku.prototype.ma]),TU,"h");bj(this.G,"Adding participant");var f=a.mb();La(b||"")||f.ma(b);a.add(f).then(n(this.xk,this,c,d,a,e),n(this.kh,this,c,d,a))};
h.xk=function(a,b,c,d,e){if(1!=this.getState())E(this.G,"add participant succeeded, but we are no longer CONNECTING. State: "+this.getState()),a.b(new sX(302,new kX(this.getState()))),a=new rt,a.R(e[0].T()),a.ma(e[0].M()),c.remove(a).then(this.we,null,this),nd(b),nd(c);else{F(this.G,"add participant succeeded");var f=e[0].M();10==R(e[0],17,0)?(F(this.G,"participant in knocking state"),30>d?(F(this.G,"will attempt again after delay"),ye(1E3).then(n(this.qg,this,e[0].T(),e[0].M(),a,b,d+1))):(F(this.G,
"max knock attempt, failing join"),this.kh(a,b,c,234))):(F(this.G,"success adding and not a knock result"),e=Oq(b.g).T(),this.u.resolve(b),this.N.resolve(c),this.l(b),this.l(c),fX(this,a,e,f),b.start(),c.start())}};h.kh=function(a,b,c,d){this.we();E(this.G,"add participant failed, moving back to INITIALIZED state");this.Ha(0);nd(b);nd(c);a.b(new sX(tX(d),d))};
h.rd=function(){var a=nX.W.rd.call(this);a.hangout=n(function(){return this.A.get()&&uy(this.A.get())},this);a.participants=n(function(){return this.g.get()&&uy(this.g.get())},this);a.mediaSources=n(function(){return this.m.get()&&uy(this.m.get())},this);return a};h.sd=function(){var a=nX.W.sd.call(this);a.hangout=Uc(this.A.get()&&uy(this.A.get()));a.participants=Uc(this.g.get()&&uy(this.g.get()));a.mediaSources=Uc(this.m.get()&&uy(this.m.get()));return a};
h.vg=function(){ge([this.Ta,this.b,this.g]).then(function(){var a=aV(this.ra,this.f,this.Ta.get());this.l(a);this.ja.resolve(a);a.start();a=new lX(this.b.get(),a,this.g.get(),fb(jX(this),function(a){return a.Y()}),this.a);this.l(a);this.Oa.resolve(a)},void 0,this)};
h.Jd=function(a,b){this.Z=b;if(a&&!this.h){F(this.G,"Removing participant on disconnect");var c=new rt;c.R(this.Ta.get());c.ma(this.b.get());var d={};d.jYdIne=b;this.g.get().remove(c,d,2).then(this.we,null,this)}nX.W.Jd.call(this,a,b);a=new hX(b);HW(this.u,a);HW(this.N,a);HW(this.ja,a);null!=this.A.get()&&this.A.get().stop();null!=this.g.get()&&this.g.get().stop();null!=this.m.get()&&this.m.get().stop()};h.we=function(){null!=this.F&&Pd(this.F);null!=this.ia&&Pd(this.ia)};
h.xh=function(a,b){this.we();var c=Q(this.f,12),d=null!=this.Z?this.Z:63;if(null!=c){var e=new tM;S(e,5,d);var f=new Ku;f.R(a);La(b||"")||f.ma(b);uM(e,[f]);e.setRequestHeader(Px(this.f));a=new X;W(a,3,this.f.g.o.a);e.D(a);e=e.la();a=this.J?YW(this.J):[];a=fb(a,function(a){return a.la()},this);if(null!=navigator.sendBeacon){var g=new FormData;g.append("r",e);t(a,function(a){g.append("l",a)});this.h=navigator.sendBeacon(c,g)}this.h||(c=sh(c,"r",e),c=sh(c,"l",a),e=hj(fj),e.open("GET",c,!1),e.send(null));
this.h=!0}this.disconnect(d)};var tX=function(a){var b=null;try{b=Lq(a.response.Wq)}catch(d){}var c;b instanceof DL?(a=b.getResponseHeader())&&(c=10==a.Aa()?oX[Q(b,4)]||209:pX[a.Aa()]):l(a)&&(c=a);return k(c)?c:302},sX=function(a,b){this.Uh=a;this.de=b};var uX=function(a,b,c,d,e){B.call(this);this.j=Xi("realtime.collections.apiary.OperationExecutor");this.a=[];this.f=b;this.h=b instanceof Ex?b:null;this.g=a;this.m=c||null;this.H=k(d)?d:8;this.J=lx(e||0)};r(uX,$x);var vX=function(a){var b=new ms,c=new is;W(b,1,c);c=U(b,is,1);S(c,1,a.H);c=new es;null!=a.m&&S(c,4,a.m);W(b,2,c);c=U(b,es,2);S(c,1,a.g);b.Xc("en");W(b,7,a.J);return b};
uX.prototype.execute=function(a,b){if(a.ke())throw new SU;this.h&&!k(b)&&a.u?(this.a.push(a),1==this.a.length&&id(this.F,this)):wX(this,a,b)};uX.prototype.F=function(){for(var a=0;a+5<this.a.length;)xX(this,zb(this.a,a,a+5)),a+=5;1==this.a.length-a?wX(this,this.a[a]):xX(this,zb(this.a,a));this.a.length=0};
var wX=function(a,b,c){var d=b.g,e=RU(b);e.setRequestHeader(vX(a));F(a.j,"Making request for operation: "+b+", jid: "+a.g);var f=b.Ad();c=k(c)?c:b.Ec();var g=Math.max(c,b.he()||0);me(a.f.b(d,e,c,f,g).then(n(a.o,a,b)),n(a.b,a,b))};
uX.prototype.o=function(a,b){var c=b.getResponseHeader();if(1==c.Aa())c=a.K(b),b=xa(b.C)&&null!=b.C()?b.C().ub():-1,b=new Zx(c,b),F(this.j,"Apiary operation succeeded for "+a+", result: "+b),a.f=!0,a.Hc().resolve(b);else{var d=Error(Q(c,8));d.stack=Q(c,2);aj(this.j,"Apiary operation "+a+" failed with status "+c.Aa(),d);this.b(a,new ox("fatal","backend",null,b))}};uX.prototype.b=function(a,b){a.f=!0;aj(this.j,"Apiary operation failed for "+a+": "+b);a.Hc().b(b)};
var xX=function(a,b){var c=new wL;c.setRequestHeader(vX(a));xL(c,fb(b,function(a){var b=RU(a),c=new tL;a.u.call(c,b);return c},a));F(a.j,"Making bulk request for "+b.length+"operations , jid: "+a.g);var d=Math.max.apply(null,fb(b,function(a){return a.Ad()})),e=fb(b,function(a){return a.Ec()}),e=eb(e,k),e=e.length?Math.min.apply(null,e):void 0;me(a.f.b("hangouts/bulk",c,e,d).then(n(a.B,a,b)),n(a.A,a,b))};
uX.prototype.B=function(a,b){Gx(this.h,b);var c=V(b,eM,2);t(a,function(a,e){(e=a.B.call(c[e]))?(Gx(this.h,e),this.o(a,e)):this.b(a,new ox("fatal","backend",null,b))},this)};uX.prototype.A=function(a,b){t(a,function(a){this.b(a,b)},this)};var yX=function(a,b,c){var d=0;k(void 0)&&(c=Oq(c),S(c,5,!0),d=Fa()+void 0);var e=Vb(),f=function(a){Fa()>=d?e.b(a):we(m,5E3)},g=function(c){1==c.getResponseHeader().Aa()?(c=c.T(),e.resolve($U(a,b,[c],YU(),UU,"g"))):f(new ox("fatal","backend",null,c))},m=function(){var d;d=c;var e=mz(lz.S(),a,b),m=e.f;d=Oq(d);d.setRequestHeader(vX(e));d=m.b("hangouts/resolve",d);me(d.then(g),f)};m();return e.a};var zX=function(){};r(zX,nz);Pw(zX,nz,10);zX.prototype.h=function(a,b,c,d){return d?new KA(a):null};var AX=function(a,b,c){B.call(this);new nU;this.b=a;this.g=c;this.a=new C;this.f=new lQ(!0);this.h=new tr(this);this.l(this.h);this.h.listen(this.g,["va","X"],this.Ch);t(b,this.Wd,this)};r(AX,ZW);h=AX.prototype;h.Wd=function(a){""==a.M()&&a.ma(this.b);this.f.add(a)};h.Fh=function(a){this.f.remove(a)};h.Bh=function(a){return""==a||a==this.b?this.f:this.a.get(a,null)};
h.yh=function(a){var b=new zi;t(a,function(a){if(a!=this.b&&(b.add(a),!this.a.Ra(a))){var c=new lQ;this.a.set(a,c);this.dispatchEvent(new pQ("Ca",a))}},this);t(this.a.La(),function(a){b.contains(a)||(this.a.get(a),this.a.remove(a)&&this.dispatchEvent(new pQ("Da",a)))},this);this.Ch()};
h.Ch=function(){var a=new zi,b=wb(dW(this.g),cW(this.g));t(b,function(b){var c=b.M()||this.b,e=b.ga(),f=c+"/"+e;if(!a.contains(f)){a.add(f);f=this.Bh(c);null==f&&(f=new lQ,this.a.set(c,f),this.dispatchEvent(new pQ("Ca",c)));b=b.getInfo();var g=b.U(),m=b.cc()?"c":"b",q=mQ(f,g,e,c);null==q?(q=new kQ(c,e,g,void 0,m),f.add(q)):""!=q.M()&&q.M()!=this.b&&q.Ha(m);c=q;e=b.fe();c.g!=e&&(c.g=e,c.dispatchEvent("za"))}},this);t(this.a.P(),function(b){t(u(b.a),function(c){a.contains(BX(c.M(),c.getId()))||b.remove(c)},
this)},this)};var BX=function(a,b){return a+"/"+b};var CX=function(a,b,c,d){eX.call(this,a,b,d);this.J=b.ka.Bd("realtime.meetings.call.MeetingCall");this.u=c;this.Bi=az(a,ux).then();this.F=null;this.Xa=new GW;this.B=this.Xa.a;this.g=null;this.Wa=new GW;this.o=this.Wa.a;this.Pd=null;this.N=new GW;this.Qd=new GW;this.Ua=this.Qd.a;this.yi=new GW;this.lc=Vb();this.mc=Vb();this.Ka=this.Da=this.Ja=this.oa=this.Kd=null;this.Rd=!1;this.Db=null;er(az(a,PQ,!1),function(a){this.Db=a},this);this.Ya=new qr(20);this.Sd=new GW;this.Z=this.Sd.a;this.h=null;this.Pa=
new ve(3E4);this.l(this.Pa);this.Sa.listen(this.Pa,"tick",this.zi);this.Ld=function(){return ce("No prerequisite handler")};this.ia=null;this.u&&this.lc.resolve(!0);this.o.then(function(a){this.Sa.listen(a,"w",this.Xf);this.Xf()},pa,this);this.Sa.listen(this.a,"X",this.Zj)};r(CX,eX);var DX={404:217,401:300},EX={400:324,429:216},FX={403:200};h=CX.prototype;
h.rd=function(){var a=CX.W.rd.call(this);a.meetingSpace=n(function(){return this.B.get()&&uy(this.B.get())},this);a.meetingDevices=n(function(){return this.o.get()&&uy(this.o.get())},this);a.mediaSources=n(function(){return this.m.get()&&uy(this.m.get())},this);a.recentMeetingOperations=n(function(){return this.Ya.P()},this);return a};
h.sd=function(){var a=CX.W.sd.call(this);a.meetingSpace=Uc(this.B.get()&&uy(this.B.get()));a.meetingDevices=Uc(this.o.get()&&uy(this.o.get()));a.mediaSources=Uc(this.m.get()&&uy(this.m.get()));a.recentMeetingOperations=n(function(){return this.Ya.P()},this);a.endCause=Uc(this.Ja);return a};
h.Jd=function(a,b){var c=be(b);67==b&&this.h&&(c=this.g.search().then(function(a){return(a=kb(a,function(a){return a.ob()==this.h},this))&&7==R(a,4,0)?43:b},void 0,this));c.then(function(b){var c;this.Ja=b;this.Rd||!a&&!this.h?c=be():(F(this.G,"Removing meeting device on disconnect"),c=this.b.get()||this.h,c=this.g.mb(c),S(c,4,6),c=this.g.modify(c,2));this.ia&&this.ia.cancel();le(c,function(){GX(this);this.h=null;eX.prototype.Jd.call(this,a,b)},this);c=new hX(b);HW(this.Xa,c);HW(this.Wa,c);HW(this.ja,
c);this.mc.b(c);this.B.get()&&this.B.get().stop();this.o.get()&&this.o.get().stop();this.m.get()&&this.m.get().stop()},void 0,this)};
h.resolve=function(a,b){if(this.Pd)return ce(HX("Meeting already resolved"));var c=IX(this,0,"resolve");if(c)return ce(c);this.Pd=a;return nB(this.ra,this.f,a,b).then(function(b){var c=b.g();this.F=kB(this.ra,this.f,[c],new cy(kw,[kw.prototype.g],[kw.prototype.l],[],[],QA,[QA.prototype.g],[QA.prototype.l],[],[],TA),jB,"q");S(this.F.config,8,5E3);this.l(this.F);this.g=kB(this.ra,this.f,[c],new cy(NA,[NA.prototype.v],[NA.prototype.o],[NA.prototype.ob],[NA.prototype.g],RA,[RA.prototype.ph],[RA.prototype.rh],
[RA.prototype.ob],[RA.prototype.qh],SA),bB,"n");S(this.g.config,8,5E3);this.l(this.g);this.u&&this.Pa.start();this.N.resolve(c);var d=this.ba;d.a=a;d.b=c;return b},function(b){var c="Resolve code "+a;b instanceof Nz&&(c+=", error message: "+b.getMessage());var d=306,g=JX(b);null!=g&&(d=DX[g]||d,this.u&&(d=FX[g]||d),c=c+(", statusCode: "+g)+(", response:"+KX(b)));this.Ya.add(c);this.J.error(c);b=new LX(d,b);HW(this.N,b);this.N=new GW;throw b;},this)};
h.Cd=function(a){this.u?this.N.a.then(function(){eX.prototype.Cd.call(this,a)},void 0,this):CX.W.Cd.call(this,a)};
h.connect=function(a,b){return this.u&&!a?ce(new LX(302,"Missing name for anonymous user")):this.uc.then(function(){F(this.G,"connect() was called");var c=IX(this,0,"connect");if(c)return ce(c);this.Ha(1);this.Pa.stop();return this.oa?this.oa.then(function(){return MX(this)},void 0,this):NX(this,a,b).then(function(a){this.lc.resolve(3==R(a,4,0));return OX(this,a,Fa())},void 0,this)},void 0,this)};
h.Zj=function(a){if(a.target!=this.a){var b=a.target;"STARTING"==a.state&&(a=b.b.a,this.Z.a?PX(this,a):this.Sd.resolve(a))}};var PX=function(a,b){var c;if(a.Z.get()==b)c="Should not update the same session id.",aj(a.G,c),a.J.error(c);else{c="Modifying the session id: "+b;bj(a.G,c);Z(a.J,c);var d=new NA;d.g(a.h);Kv(d,[b]);a.g.modify(d).then(function(b){return QX(a,b[0])},function(){c="Failed to update the session id: "+b;aj(a.G,c);a.J.error(c)})}};
CX.prototype.Xf=function(){var a=this.o.get().get(),b=eb(a,function(a){return a.ge()}),b=fb(b,function(a){return a.ob()});gX(this,b);F(this.G,a.length+" raw devices; "+b.length+" joined.")};
var NX=function(a,b,c){return ge([a.N.a,a.Z]).then(function(){var a=this.N.a.get(),e=this.Z.get(),f=new NA;f.o(a);S(f,4,1);Kv(f,[e]);this.u&&(S(f,2,b),c&&(f.l=c));return this.Bi.then(function(b){RX(this,b,a);return this.g.add(f).then(function(a){a=a[0];this.h=a.ob();var c=this.h.split("/")[3]||this.H;this.u&&(this.ba.g=c,this.yi.resolve(c));this.Qd.resolve(b.f);QX(this,a);return a},this.ui,this)},function(a){throw HX(a);},this)},function(a){throw HX(a);},a)};
CX.prototype.ui=function(a){GX(this);E(this.G,"add device failed, moving back to INITIALIZED state");this.Ha(0);this.oa=null;var b=325,c=JX(a);null!=c&&(b=EX[c]||b,this.u&&(b=FX[c]||b),c="Device add error: "+KX(a),this.J.error(c));throw new LX(b,a);};
var MX=function(a){return a.Z.then(function(a){bj(this.G,"Modifying the meeting device as JOINED");var b=new NA;b.g(this.h);Kv(b,[a]);S(b,4,1);return this.g.modify(b).then(function(a){QX(this,a[0]);return OX(this,a[0],Fa())},function(a){var b=303,c=JX(a);null!=c&&(b=EX[c]||b,c="Device modify error: "+KX(a),this.J.error(c));return SX(this,new LX(b,a))},this)},function(a){return SX(this,HX(a))},a)},OX=function(a,b,c){var d=IX(a,1,"checkJoinState");if(d)return SX(a,d);F(a.G,"checking the join state.");
switch(R(b,4,0)){case 1:return TX(a);case 3:if(6E5<=Fa()-c)return SX(a,new LX(234));a.ia=ye(5E3).then(function(){return UX(this,c)},function(){SX(this,new LX(219))},a);return a.ia;case 4:return SX(a,new LX(233));case 9:return a.Ld(a.F,a.g,VX(a)).then(function(){return MX(a)},function(){return SX(a,new LX(325))});default:return b="Unexpected join state: "+R(b,4,0),aj(a.G,b),SX(a,b)}},UX=function(a,b){return a.g.search().then(function(a){a=kb(a,function(a){return a.ob()==this.h},this);QX(this,a);return OX(this,
a,b)},function(a){var b=303,c=JX(a);null!=c&&(b=EX[c]||b);return SX(this,new LX(b,a))},a)},TX=function(a){a.Xa.resolve(a.F);a.F.start();a.Wa.resolve(a.g);a.g.start();var b=Vb();fX(a,b,a.Ua.get(),a.h);return b.a};CX.prototype.vg=function(){ge([this.Ua,this.b]).then(function(){var a=aV(this.ra,this.f,this.Ua.get());this.l(a);this.ja.resolve(a);a.start();a=new AX(this.b.get(),fb(jX(this),function(a){return a.Y()}),this.a);this.l(a);this.Oa.resolve(a)},void 0,this)};
var SX=function(a,b){E(a.G,"connect failed, moving back to DISCONNECTED state");a.Ha(4);if(a.h){var c=new NA;c.g(a.h);S(c,4,6);le(a.g.modify(c,2),function(){GX(this)},a);a.h=null;a.oa=null}return ce(HX(b))},RX=function(a,b,c){a.Da=Md(Vq(),"beforeunload",n(a.Uf,a,b,c));a.Ka=Md(Vq(),"unload",n(a.Uf,a,b,c))},GX=function(a){null!=a.Da&&(Pd(a.Da),a.Da=null);null!=a.Ka&&(Pd(a.Ka),a.Ka=null)};
CX.prototype.Uf=function(a,b){GX(this);var c={meetingToken:Cx(a.a)};JA(a,b+"/devices:close",c);this.Rd=!0;this.Db&&t(YW(this.Db),function(a){var b=this.f.g,c=vh(b.m,"/"+b.g+"/"+b.h+"/media_sessions/log");b.f&&(c=sh(c,"key",b.f));Fx(b,a);Dx(c,a.la(),"application/json+protobuf")},this);this.disconnect(null!=this.Ja?this.Ja:63)};CX.prototype.zi=function(){this.u?this.F.search():this.g.search()};
var IX=function(a,b,c){return a.getState()!=b?(E(a.G,"Unexpected state while in "+c+": "+a.getState()+" != "+b),new LX(302,new kX(a.getState()))):null},HX=function(a){return a instanceof LX||a instanceof Xd?a:new LX(302,a)},JX=function(a){return a instanceof Nz?a.b:null},KX=function(a){var b,c;a instanceof Nz?(c="",a.g&&(c+=" exception: "+a.g.name),a.f&&(c+=" status: "+Di(a.f)),a.sc&&(c+=" response: "+Di(a.sc)),a=c):a=Di(a);return c=a},WX=function(a,b){a.Ld=b},QX=function(a,b){b&&(a.Kd=b,a.mc.resolve(!0))},
VX=function(a){return a.g&&a.h&&a.g.ab(a.h)||a.Kd},LX=function(a,b){Ga.call(this,"startupCode: "+a+", error = "+Di(b));this.Uh=a;this.de=b};r(LX,Ga);var YX=function(a,b,c,d){this.j=v("mr.mirror.hangouts.HangoutCallService");this.b=a;this.g=d;this.f=new tr(this);this.a=null;this.w=!1;this.o=new Qc;this.h=new Qc;this.u=!1;this.v=new Qc;this.m=this.l=null;this.A=this.B=!1;XX(this,b,c)},XX=function(a,b,c){a.g(new Ch("REFRESH_AUTH"));b.then(function(){return c}).then(function(b){if(!a.A){z(a.j,"Creating call for hangout id: "+b.Ta+" resolvedId: "+b.qc+" conferenceMode: "+b.Zb);var c=CP();void 0!=b.Zb&&(c=IP(c,b.Zb));jU(a.b);b.vb?(a.a=new CX(a.b,a.b.get(SQ),
!1),a.a.Cd(c),a.a.o.then(a.H,null,a),ZX(a)):(a.a=new nX(a.b,a.b.get(SQ),c),a.a.g.then(a.J,null,a));a.a.m.then(a.N,null,a);a.a.onConnect.then(a.K,null,a);a.a.onDisconnect.then(a.F,function(b){w(a.j,"Error on disconnect: "+b)},a);a.o.resolve(b)}})},gY=function(a,b){x(a.j,"Connecting to hangout");setTimeout(function(){a.h.b(Error("Timed out before connecting"))},3E4);a.o.a.then(function(b){z(a.j,"Call ready.");a.w=b.vb;if(a.w)b=$X(a,b);else{var c=b.Ta,e=b.qc;b=a.b.get(Nx);if(e)z(a.j,"Already resolved id: "+
e),b=be($U(a.b,b,[e],YU(),UU,"g"));else{z(a.j,"resolving hangout id: "+c);var e=a.b,c=c.split("@"),f=new cL;S(f,5,!0);if(-1!=c[1].indexOf(".")){var g=new $K;S(g,1,c[0]);S(g,2,c[1]);W(f,4,g)}else g=new ht,S(g,1,c[1]),S(g,2,c[0]),W(f,2,g);b=yX(e,b,f)}b=a.a.connect(b)}return b}).then(null,function(b){aY(a,"Connect error",b);if(b.de){for(var c="",e=ja(Object.entries(QV)),f=e.next();!f.done;f=e.next()){var g=ja(f.value),f=g.next().value,g=g.next().value;if(g==b.Uh){c=f+"("+g+")";break}}a.j.error("Call connect error startupCode: "+
c);b=b.de}c="SESSION_FAILURE";b.response&&b.response.Pj&&"chrrp"==b.response.Wg&&(c="HANGOUT_INVALID");a.g(new Ch(c));a.h.b(b);bY(a,16)});return a.h.a.then(function(){return a.a.b}).then(function(c){cY(a,b,c);if(a.w)return dY(a,c);eY(a,c);fY(a,a.a.A.get())})},$X=function(a,b){return a.a.resolve(b.Ta).then(function(){return a.a.connect()})},hY=function(a,b){return new Promise(function(c,d){a.a.b.then(function(e){cY(a,b,e);if(!a.B){if(a.w){dY(a,e).then(c,d);return}eY(a,e)}c()},d)})},cY=function(a,b,
c){if(0<b.getAudioTracks().length)if(a.l){var d=a.l;d.F=b;d.u()}else a.l=new fU(new kQ(c,"1","a"),b),AQ(a.l),iX(a.a,a.l);a.m?(a=a.m,a.F=b,a.u()):(c=new kQ(c,"2","v","e"),jQ(c,[new hQ(0,0,1,1)])&&c.dispatchEvent("za"),a.m=new fU(c,b),AQ(a.m),iX(a.a,a.m))},dY=function(a,b){var c=new ww;S(c,1,b);var d=a.a.B.get();a=new pw;W(a,1,c);var e=d.mb();W(e,6,a);return new Promise(function(a,b){d.modify(e).then(a,b)})},eY=function(a,b){var c=new jt;S(c,1,b);b=new mt;W(b,17,c);b.R(a.a.Ta.get());a.a.A.get().modify(b)},
fY=function(a,b){a.f.listen(b,"w",function(b){a.a.b.then(function(c){a.B=Array.prototype.some.call(b.target.get(),function(a){return a.td()&&Q(a.td(),1)==c})})})};YX.prototype.H=function(a){this.f.listen(a,"w",this.aa)};
YX.prototype.aa=function(a){var b=this;a.a.forEach(function(a){if(U(a,wv,12)&&R(U(a,wv,12),1,"")){var c=a.ob();b.a.b.get()==c&&jX(b.a).forEach(function(c){"a"==c.Y().a&&(c.hc(),b.g(new Ch("STATUS_RESPONSE",{mute:!0})),c=b.a.o.get().mb(a),yv(c,new wv),me(b.a.o.get().modify(c),function(a){aY(b,"Failed to clear AudioMuteRequest",a)}))})}})};YX.prototype.J=function(a){var b=this;this.f.listen(a,"w",function(a){iY(b,a)});this.f.listen(a,"y",function(a){jY(b,a)})};
var iY=function(a,b){var c=b.target;z(a.j,function(){return"Participants updated: "+c.get().filter(function(a){return a.ge()}).map(function(a){return Q(a,4)}).join(", ")});!a.u&&2>c.get().length&&(a.g(new Ch("HANGOUT_INACTIVE")),bY(a,61))};YX.prototype.N=function(a){var b=this;this.f.listen(a,"w",function(a){kY(b,b.a,a)});this.f.listen(a,"y",function(a){jY(b,a)})};
var kY=function(a,b,c){for(var d={},e=0;e<c.a.length;d={source:d.source},e++)d.source=c.a[e],d.source.M()==b.b.get()&&U(d.source,mu,6)&&Q(U(d.source,mu,6),1)&&jX(b).forEach(function(b){return function(c){c.Y().getId()==b.source.ga()&&(c.hc(),a.g(new Ch("STATUS_RESPONSE",{mute:!0})))}}(d))},lY=function(a,b){jX(a.a).forEach(function(a){"a"==a.Y().a&&(b?a.hc():"Ga"!=a.f&&DQ(a,!1))})},jY=function(a,b){a.j.error("Failure in collection: "+b.reason);a.h.b(b.reason);bY(a,3)};
YX.prototype.K=function(){x(this.j,"Call connected");this.g(new Ch("SESSION_START_SUCCESS"));this.h.resolve(void 0)};YX.prototype.F=function(a){this.g(new Ch("SESSION_END"));var b="",c;for(c in kx)if(kx[c]==a){b=c+"("+a+")";break}x(this.j,"Call ended with endcause: "+b);0!=a&&61!=a&&16!=a&&this.g(new Ch("SESSION_FAILURE"))};YX.prototype.stop=function(){bY(this,0);return this.v.a};
var bY=function(a,b){x(a.j,"Stopping call with end Cause: "+b);a.u?x(a.j,"Ignore stop, already stopping."):(a.u=!0,a.a?a.a.disconnect(b).then(function(b){z(a.j,"Call disconnected with endCause: "+b);a.v.resolve(void 0)}):a.v.resolve(void 0))};YX.prototype.Ba=function(){var a=this;this.A=!0;this.f.Ba();this.l&&this.l.Ba();this.m&&this.m.Ba();this.o.b(Error("Disposed"));this.h.b(Error("Disposed"));setTimeout(function(){a.v.b(Error("Timed out before stopping"))},1E4);this.a&&this.a.Ba()};
var aY=function(a,b,c){c instanceof Error?a.j.error(b,c):ua(c)?a.j.error(function(){return b+": "+JSON.stringify(c)}):ya(c)?a.j.error(b+": "+JSON.stringify(c)):a.j.error(b+": "+c)},mY=function(a){return a.h.a.then(function(){fW(a.a.a)}).catch(function(){if(a.a)fW(a.a.a);else throw Error("call was never created");})},ZX=function(a){var b=a.a;WX(b,function(b,d,e){return nY(a,b,d,e).then(function(a){if(!a)throw Error("Prerequisite not handled");})});b.onConnect.then(function(){var c=b.B.get(),d=b.o.get();
a.f.listen(c,"w",function(){nY(a,c,d,VX(b))});nY(a,c,d,VX(b))})},nY=function(a,b,c,d){var e=function(a){var b=new Bv;S(b,1,a);S(b,2,2);return b};if(!d)return ce(Error("No local device"));b=(b=(b=b.ab())&&U(b,pw,6))&&U(b,zw,2);var f=2==(b&&b.ie())?b.yb():null,g=!1,m=!1,q=[];(V(d,Bv,16)||[]).forEach(function(a){m|=1==R(a,2,0);g|=a.yb()==f;q.push(e(a.yb()))});f&&!g&&(m=!0,q.push(e(f)));return m?(d=c.mb(d.ob()),Gq(d,16,q),c.modify(d).then(function(){z(a.j,"Recording acked");return!0})):be(!1)};var oY={TAB:0,Tf:1},pY=function(a){Cg("MediaRouter.Hangouts.Start.Success",a,oY)};var rY=function(a,b,c){wh.call(this,a);this.aa=b;this.F=c;this.j=v("mr.mirror.hangouts.HangoutSession");this.B=xp(a.id);this.w=new Qc;this.g=!1;this.v=!0;this.l=this.m=null;this.h=new Qc;this.u=this.K=null;qY(this);this.a=null};ka(rY,wh);
rY.prototype.start=function(a){var b=this;z(this.j,"Starting new hangouts mirror session.");this.m=a;if(this.a)return Promise.reject(Error("Mirroring already started"));if(this.l)return Promise.reject(Error("Session permanently stopped"));this.K=new sg("MediaRouter.Hangouts.Session.Launch");this.a=new YX(this.aa,this.F,this.h.a,n(this.f,this));gY(this.a,this.m).then(function(){z(b.j,"Call connected");b.f(new Ch("SESSION_START_SUCCESS"));b.K.a();b.K=null;b.u=new yg("MediaRouter.Hangouts.Session.Length");
b.w.resolve(b)},function(a){b.w.b(a);b.stop()});return this.w.a};var sY=function(a){if(!a.a||a.l)return Promise.resolve();z(a.j,"Resetting session call.");return a.a.stop().then(function(){if(a.l)return Promise.resolve();a.g=!1;a.h=new Qc;a.a.Ba();a.a=new YX(a.aa,a.F,a.h.a,n(a.f,a));a.m.getTracks().forEach(function(a){a.enabled=!0});return gY(a.a,a.m).then(function(){z(a.j,"Reset call connected")},function(){a.stop()})})};rY.prototype.Wh=function(){return!0};
rY.prototype.Zh=function(a){var b=this;return new Promise(function(c,d){b.a?hY(b.a,a).then(function(){b.m=a;c()},d):d(Error("Mirroring was never started"))})};
rY.prototype.stop=function(){var a=this;z(this.j,"Stopping hangouts mirror session.");this.w.b(Error("Session stop requested."));this.u&&(this.u.a(),this.u=null);if(!this.a)return Promise.resolve();if(this.l)return this.l;this.w.b(Error("Stopped"));this.h.b(Error("Stopped"));var b=function(){try{a.B.Ba()}catch(c){a.j.error("Error while disposing message port",c)}try{a.a.Ba()}catch(c){a.j.error("Error while disposing call service",c)}};return this.l=new Promise(function(c,d){setTimeout(function(){b();
d(Error("Timed out before stopping"))},1E4);a.a.stop().then(function(){b();c()}).catch(function(a){b();d(a)})})};
var qY=function(a){a.B.onMessage=function(b){if(va(b)){b=JSON.parse(b);var c=b.clientId;if(c){"client_connect"==b.type?a.f({message:{sessionId:"castouts"},clientId:c,type:"new_session"}):"v2_message"==b.type&&"STOP"==b.message.type&&a.f({message:"castouts",clientId:c,type:"remove_session"});return}}if(!b.type)throw Error("Message has no type.");switch(b.type){case "AUTH_READY":var d=b.data;if(void 0!=d.Zb&&d.Zb!=a.v){z(a.j,"received auth ready message with new conference mode");a.v=d.Zb;var e=a.g;
sY(a).then(function(){a.g=e;a.a&&lY(a.a,e);a.h.resolve(d)})}else z(a.j,"received auth ready message"),d.Zb=a.v,a.h.resolve(d);break;case "LOCAL_PRESENT":z(a.j,"local present message");a.f(b);break;case "MUTE":b.data&&(a.g=!!b.data.mute,a.a&&lY(a.a,a.g));break;case "STATUS_RESPONSE":z(a.j,"route status response message");b.data&&(a.g=!!b.data.mute);break;case "STATUS_REQUEST":z(a.j,"route status request message");a.f(new Ch("STATUS_RESPONSE",{routeDescription:a.b.description,mute:a.g,local:!a.v}));
break;default:throw Error("Unknown message type: "+b.type);}}};rY.prototype.f=function(a){z(this.j,function(){return"sending message to mrp: "+JSON.stringify(a)});this.B.sendMessage(a,tY)};var uY=function(a){return a.a?mY(a.a):Promise.reject(Error("no call in the session"))},tY={channelType:"mesi"};var vY=function(a){this.a=a};vY.prototype.onError=function(a,b){401==b.a&&this.a(new Ch("REFRESH_AUTH"))};vY.prototype.onRequest=pa;vY.prototype.b=pa;var wY=function(a){B.call(this);this.a=a||window;this.f=Fd(this.a,"resize",this.g,!1,this);this.b=Uq(this.a||window)};r(wY,B);wY.prototype.X=function(){wY.W.X.call(this);this.f&&(Pd(this.f),this.f=null);this.b=this.a=null};wY.prototype.g=function(){var a=Uq(this.a||window),b=this.b;a==b||a&&b&&a.width==b.width&&a.height==b.height||(this.b=a,this.dispatchEvent("resize"))};var xY=function(a){B.call(this);a?(a=a.a,a=a.parentWindow||a.defaultView):a=window;this.a=a;this.g=1.5<=this.a.devicePixelRatio?2:1;this.f=n(this.h,this);this.b=this.a.matchMedia?this.a.matchMedia("(min-resolution: 1.5dppx), (-webkit-min-device-pixel-ratio: 1.5)"):null};r(xY,B);xY.prototype.start=function(){this.b&&this.b.addListener(this.f)};xY.prototype.h=function(){var a=1.5<=this.a.devicePixelRatio?2:1;this.g!=a&&(this.g=a,this.dispatchEvent("Fb"))};
xY.prototype.X=function(){this.b&&this.b.removeListener(this.f);xY.W.X.call(this)};var yY=function(a,b){kd.call(this);this.h=a;if(b){if(this.g)throw Error("[fava.component.DomServices] Owner document already initialized");this.f=(this.g=b)?new Xq(9==b.nodeType?b:b.ownerDocument||b.document):Ha||(Ha=new Xq);this.a=new wY(Vq(b));this.a.K=this.h.h;this.b=new xY(this.f);this.b.start()}};r(yY,kd);yY.prototype.X=function(){this.f=this.g=null;this.a&&(this.a.Ba(),this.a=null);nd(this.b);this.b=null};var AY=function(){this.a=new zY;this.b=null;this.version=0};r(AY,Bz);h=AY.prototype;h.Lb=function(a){return new BY(this,0,a)};h.Mb=function(a){return new BY(this,1,a)};h.Ub=function(a){return new BY(this,2,a)};h.Nb=function(a){return new BY(this,3,[a])};h.Vb=function(){return new BY(this,4,[])};var zY=function(){B.call(this)};r(zY,$x);zY.prototype.execute=function(a){a.execute()};var BY=function(a,b,c){this.a=a;this.l=b;this.b=c;this.version=null;this.f=Vb();this.g=!1};
BY.prototype.execute=function(){this.g=!0;id(n(this.Gl,this))};var CY=function(a){if(!a.a.b)return null;switch(a.l){case 0:return a.b;case 1:var b=[];t(fb(a.b,a.zg,a),function(a,d){null===a||b.push(this.b[d])},a);return b;case 2:case 3:return a=fb(a.b,a.zg,a),ub(a,sa),a;case 4:return a.a.b.get();default:return null}};h=BY.prototype;h.zg=function(a){var b=this.a.b;if(!b)return null;var c=Dy(b,a);return kb(b.get(),function(a){return c.equals(Dy(b,a))})};
h.Gl=function(a,b){if(a=a||CY(this)){if(k(b))b>this.a.version&&(this.a.version=b);else switch(this.l){case 0:case 1:case 2:this.a.version++}this.f.resolve(new Zx(a,k(b)?b:this.a.version))}else this.f.b("Could not perform operation")};h.Hf=function(a){this.version=a};h.Hc=function(){return this.f};h.se=function(){return this.f.a};h.Ad=Uc(0);h.te=pa;h.Ec=Uc(0);h.he=Uc(void 0);h.ue=pa;h.ke=function(){return this.g};h.Ye=function(){return this.b.toString()};var DY=function(a,b,c){var d=ZU(),e=lz.S(),f=new AY;a=new pz(0,e.ka.b(a,b),c,d,f);return f.b=a};var FY=function(a,b,c,d,e,f){B.call(this);this.j=Xi("realtime.media.api.apiary.RemoteSession");this.g=b.ka.Bd("realtime.media.api.apiary.RemoteSession");this.ja=a;this.ia=b.b;this.qa=c;this.B=this.A=this.m=this.Da=this.a=null;this.V=d;this.V.o=8;this.V.B=3E3;this.N=e;this.J=f;Z(this.g,"Creating a new remote session with earlyMediaHangoutId="+f.b+" P2P="+f.a+" useAudio="+f.l+" useVideo="+f.m);this.f=this.b=null;this.ab=!1;this.H=new tr(this);this.l(this.H);this.u=new nU;this.h="INITIAL";this.Ca=[];
this.ha=[];this.Z=[];this.ba={};this.F={};this.o={};this.Wa={};this.oa=Vb();this.Ua=Vb();this.Oa=new zi;this.za=null;lU(a);az(a,QQ).then(function(a){var b=[mU(a,"mediaSessionStartTime",n(this.Pa,this)),mU(a,"mediaUpStreams",n(this.Db,this)),mU(a,"mediaDownStreams",n(this.Ab,this)),mU(a,"mediaPerfDataPoint",n(this.Cb,this))];ld(this,function(){t(b,a.f,a)})},function(a){E(this.j,"Error getting DiagnosticDataService: "+a)},this);this.Ya=Vb();this.Ya.a.then(function(){EY(this)},null,this)};r(FY,RP);
FY.prototype.Pa=function(){return(new Date(this.Ka)).toString()};FY.prototype.Db=function(){return null!=this.b?uy(this.b):null};FY.prototype.Ab=function(){return null!=this.f?uy(this.f):null};FY.prototype.Cb=function(){return null!=this.za?this.za.la():null};var GY=function(a,b,c,d){a.h!=b&&(Z(a.g,"Session "+iV(a)+" state changed from "+a.h+" to "+b),a.h=b,a.dispatchEvent(new dO(b,c,d)))};FY.prototype.getState=function(){return this.h};
var IY=function(a,b,c){var d=a.f,e=Oq(d.g);e.na(b);e.R(c);c=d.start(e);HY(a);a.J.a||me(NU(c,"Qa",b,a),function(){this.g.error("Stopping session "+iV(this)+" because downstream search failed.");this.stop(16)},a)},HY=function(a){a.J.a||(null==a.Ca?E(a.j,"Attempting to install collection filters with null participants. setParticipants() must be called prior to this call!"):My(a.f,n(function(a){return mb(this.Ca,a.M()||"")},a)))};
FY.prototype.Wb=function(a){if("INITIAL"!=this.h)return!1;this.ab=null!=a;a=a||"";null!=this.f?aj(this.j,"Remote streams collection already initiated"):(this.J.a?(F(this.j,"Preparing p2p remote streams collection."),this.f=DY(this.ja,this.ia,[a,1,""])):(F(this.j,"Preparing normal remote streams collection."),this.f=$U(this.ja,this.ia,[a,1,""],ZU(),XU,"l"),this.H.listen(this.f,"y",this.Xa),this.H.listen(this.f,"x",this.lc)),this.l(this.f),py(this.f),this.H.listen(this.f,"w",this.wc));GY(this,"STARTING");
return!0};FY.prototype.start=function(a){this.na(a);GY(this,"STARTED");this.oa.a.then(this.pb,null,this);return!0};
FY.prototype.ae=function(a,b,c){Z(this.g,"Attempting to connect session "+iV(this)+" to Hangout: "+a);switch(this.h){case "INITIAL":E(this.j,"Connect to hangout called before starting.");return;case "STOPPED":case "FINISHED":E(this.j,"Connect to hangout called after end.");return}null!=this.m?aj(this.j,"Multiple hangouts per RemoteSession not yet supported."):(this.m=a,this.A=b,this.B=c,this.Ka=Fa(),this.Ja=JY(),this.oa.resolve())};
FY.prototype.pb=function(){var a=this.B&&this.B.f||"";Z(this.g,"Session "+iV(this)+" is started and connected to Hangout: "+this.m+" with participantId: "+this.A+" and participantLogId: "+a);var a=this.a,b=this.m;null!=this.b?aj(this.j,"Local streams collection already initiated"):(this.J.a?(F(this.j,"Preparing p2p local streams collection."),this.b=DY(this.ja,this.ia,[b,2,a])):(F(this.j,"Starting normal local streams collection."),this.b=$U(this.ja,this.ia,[b,2,a],ZU(),XU,"l"),this.H.listen(this.b,
"y",this.Xa),this.b.start()),this.H.listen(this.b,"w",this.mc),this.l(this.b));KY(this,this.a,this.m,this.ha);ob(this.ha);IY(this,this.a,this.m);0<this.Z.length&&(LY(this,this.Z),ob(this.Z));GY(this,"INPROGRESS");this.Ua.resolve();MY(this)};
var zV=function(a,b){a.Ca=b;null!=a.f&&Ky(a.f);a.J.a&&a.oa.a.then(function(){var a=eb(b,function(a){return a!=this.A},this);if(1!=a.length)1<a.length&&this.stop(51);else{var d=new vu([1,1,this.a,"8579373",this.m,a[0],"1",[[8579373],[]]]),a=new vu([1,2,this.a,"8579374",this.m,a[0],"2",[[8579374,8579375],[["FID",[8579374,8579375]]]]]);this.f.add(d);this.f.add(a)}},null,a)};FY.prototype.pc=function(){this.b&&this.b.zd();this.f&&this.f.zd()};FY.prototype.resume=function(){this.F={}};
FY.prototype.stop=function(a,b){Z(this.g,"Session "+iV(this)+" stopping because stop was called with endCause: "+a);if("STOPPED"==this.h)return!1;null==this.a||"STARTING"!=this.h&&"INPROGRESS"!=this.h||(nd(this.b),this.b=null,nd(this.f),this.f=null,Mb(this.o,function(a){a.cancel()}),this.o={});GY(this,"STOPPED",a,b);return!0};
var rV=function(a,b){var c=a.a,d=a.m,e=a.A;null!=c?null!=d?(b.R(d),null!=a.qa&&S(b,1,a.qa),null!=e&&b.ma(e),d=u(a.N.a),S(b,11,d||[]),S(b,12,a.N.b),S(b,18,a.N.f),a.B&&XP(a.B,b),JU(a.V,b,c)):E(a.j,"UploadLogData before we have a hangoutId."):E(a.j,"UploadLogData before we have a sessionId.")},KV=function(a,b,c,d){var e=a.a,f=a.m;null!=e?null!=f?JV(a,e,f,d,b,c).then(function(){this.dispatchEvent("ra")},null,a):E(a.j,"Finalize log data uploads before we have a hangoutId."):E(a.j,"Finalize log data uploads before we have a sessionId.")},
JY=function(){return window.performance&&window.performance.now?window.performance.now():Fa()},EY=function(a){a.w||"STOPPED"==a.h||"FINISHED"==a.h||we(function(){var a=this.V,c=this.a,d=new hL;d.setRequestHeader(KU(a));d.na(c);IU(a,"media_sessions/query",d).then(a.f,null,a).then(this.uc,this.tc,this)},1E4,a)};
FY.prototype.uc=function(a){this.w||(null!=a?(a=vU(this.u,a,!this.J.a),null!=a?(this.dispatchEvent(new cQ(a)),EY(this)):Z(this.g,"Session "+iV(this)+" could not parse description from session query.")):E(this.j,"Received null session proto."))};FY.prototype.tc=function(a){if(!this.w)switch(a.status){case 4:case 5:case 7:this.stop(15,"ClientResponseStatus: "+a.status+" with desc: "+a.desc);break;case 11:this.stop(41,"ClientResponseStatus: "+a.status+" with desc: "+a.desc);break;default:EY(this)}};
var NY=function(a,b){return null!=a||null!=b?null!=a&&null!=b?a.width!=b.width||a.height!=b.height:!0:!1},IV=function(a,b){null!=rJ(b)&&(b=Oq(b),t(rJ(b),function(a){if(2==Q(a,1)){var b=Q(a,53)[0]>>>0,c=this.Wa[b];null!=c&&(S(a,78,c.width),S(a,79,c.height),bj(this.j,"Set last request width/height "+c.width+"/"+c.height+" for ssrc "+b+" in jmidata"))}},a));return b},JV=function(a,b,c,d,e,f){if(null==d&&null==e)return ce("Nothing to upload");var g=new gJ;S(g,2,a.Pa());S(g,133,a.Ka);var m=-2;null!=a.Ja&&
(m=(JY()-a.Ja)/1E3,m=Math.round(m));S(g,3,m);null!=b&&S(g,1,b);null!=e&&S(g,29,e);null!=f&&S(g,30,f);null!=d&&Gq(g,5,[d]);d=new lN;W(d,4,g);d.R(c);null!=a.A&&d.ma(a.A);null!=a.qa&&S(d,1,a.qa);c=u(a.N.a);S(d,11,c||[]);S(d,12,a.N.b);S(d,18,a.N.f);a.B&&(c=a.B,c.l&&(g=U(d,gJ,4)||new gJ,S(g,4,c.l),W(d,4,g)),XP(c,d));return JU(a.V,d,b)},vV=function(a,b){switch(a.h){case "INITIAL":case "STARTING":case "STARTED":yb(a.ha,b);return;case "STOPPED":case "FINISHED":E(a.j,"Add local streams called after end.");
return}var c=a.a,d=a.m;null==c?a.g.error("Attempting to add local streams before we have a sessionId."):null!=d?KY(a,c,d,b):yb(a.ha,b)},KY=function(a,b,c,d){t(d,function(a){a=NN(PN(new MN(a),this.A));var d=DU(this.u,b,c,a),e=this.b.b,m=!!kb(this.b.get(),function(a){return hy(e,d,a)}),m=NU(m?this.b.modify(d):this.b.add(d),"Sa",b,this);"d"!=a.U()&&me(m,function(a){this.g.error("Stopping because addLocalStream failed with error: "+a);this.stop(16)},this)},a)},yV=function(a,b){a.Ua.a.then(n(function(){var a=
b.Qa(),a=this.b.mb(a);a.Ma(wU(this.u,b.U()));var d=new zu,e=b.cc();S(d,1,e);a.Id(d);this.b.modify(a)},a))};FY.prototype.na=function(a){this.a!=a&&(Z(this.g,"Session id changing from "+iV(this)+" to "+(a||"{unset}")),this.a=a,this.Ya.resolve())};
var iV=function(a){if(null==a.a)return"{unset}";null==a.Da&&(a.Da=a.a.substring(0,6)+"{#"+(a.a.length-7)+"}"+a.a.substring(a.a.length-1));return a.Da},wV=function(a){if(null!=a.b){var b=kb(a.b.get(),function(a){return 2==a.U()});if(null==b)xQ(a.g,"Attempting to signal screencast started, but no video stream found!");else{b=a.b.mb(b);b.Ma(2);S(b,11,!1);var c=new zu;S(c,1,!1);b.Id(c);a.b.modify(b)}}},xV=function(a){if(null!=a.b){var b=kb(a.b.get(),function(a){return 2==a.U()});null==b?xQ(a.g,"Attempting to signal screencast ended, but no video stream found!"):
(b=a.b.mb(b),b.Ma(2),S(b,11,!0),a.b.modify(b))}};FY.prototype.zc=function(a){this.ba={};t(a,function(a){this.ba[OY(a)]=a},this);MY(this)};
var MY=function(a){switch(a.h){case "INITIAL":case "STARTING":case "STOPPED":case "FINISHED":return}if(null==a.a)a.g.error("Ignoring changed stream requests because we don't have a sessionId.");else if(null==a.m)a.g.error("Ignoring changed stream requests because we don't have a hangoutId.");else{var b={},c=wU(a.u,"v");t(a.f.get(),function(a){a.U()==c&&(b[OY(a)]=a)},a);Mb(a.ba,function(a,c){if(b[c]){var d=b[c],e=d.Qa(),m=this.F[e];if(!m||m.b!=a.b||m.a!=a.a||NY(uP(m),uP(a)))this.F[e]=a,PY(this,d,a),
this.o[c]&&this.o[c].cancel(),delete this.o[c]}else F(this.j,"Skipping stream request for "+a.M()+" (no matching stream was found).")},a);Mb(b,function(a,b){var c=a.Qa();if(!this.ba[b]){var d=this.F[c];if(d){var e=vP(zP(yP(d)));if(d.b!=e.b||d.a!=e.a||NY(uP(d),uP(e)))this.F[c]=e,PY(this,a,e)}else if(!this.o[b]){var q=vP(zP(yP(FU(this.u,[a])[0])));this.o[b]=ye(2E3);this.o[b].then(function(){delete this.o[b];this.F[c]=q;PY(this,a,q)},void 0,this)}}},a);Mb(a.o,function(a,c){b[c]||(a.cancel(),delete this.o[c])},
a)}},PY=function(a,b,c){if("STOPPED"!=a.h&&"FINISHED"!=a.h){a.Oa.contains(c.M())&&(c=new tP(c.h,"",c.l,null!=c.f?c.f:void 0,null!=c.a?c.a:void 0,null!=c.b?c.b:void 0,null!=c.g?c.g:void 0));var d=b.Qa(),e=c.b;if(!uP(c)||0>=uP(c).height||0>=uP(c).width||0>=c.a)e=!1;var f=a.u,g=a.a,m=a.m,q=c,y=e,e=new vu;e.rf(1);e.na(g);e.R(m);e.ma(q.M());e.Ma(wU(f,q.U()));f=q.ga();S(e,7,f);f=new Jt;S(f,1,!0);S(f,2,y);y=uP(q);null!=y&&(g=new Gt,g.l(y.height),g.h(y.width),S(g,3,q.a),W(f,3,g));W(e,9,f);e.sf(d);Z(a.g,"Session "+
iV(a)+" sending stream request: "+c.toString()+" with streamId: "+d);d=U(b,xu,8);W(e,8,d);a.f.modify(e);c=uP(c);null!=c&&null!=U(b,xu,8)&&null!=Q(U(b,xu,8),1)&&(b=Q(U(b,xu,8),1)[0]>>>0,null!=b&&(a.Wa[b]=c,bj(a.j,"Building map: last request width/height "+c.width+"/"+c.height+" for ssrc "+b)))}},OY=function(a){return(a.M()||"")+"/"+(a.ga()||"")};FY.prototype.wc=function(a){null!=a.b&&0<a.b.length&&LY(this,a.b);null!=a.a&&0<a.a.length&&QY(this,a.a);null!=a.removed&&0<a.removed.length&&RY(this,a.removed)};
FY.prototype.lc=function(a){var b=a.a?a.a.length:0;bj(this.j,"Received early streams push notification with "+b+" modified streams");if(this.ab&&0!=b)if("INPROGRESS"==this.h)LY(this,a.a);else if("STARTING"==this.h||"STARTED"==this.h)this.Z=wb(this.Z,a.a)};
var LY=function(a,b){var c=SY(a,b);null!=c?0==c.length?E(a.j,"Got empty streamInfos: "+b):(b=eb(c,function(a){return a.M()!=this.A},a),MY(a),t(b,function(a){Z(this.g,"Session "+iV(this)+" notified of new remote stream: "+a.toString())},a),a.dispatchEvent(new TP(b,[],[]))):E(a.j,"Failed to parse streamInfos: "+c)},QY=function(a,b){var c=SY(a,b);null==c?E(a.j,"Failed to parse streamInfos: "+c):0==c.length?E(a.j,"Got empty streamInfos: "+b):(t(c,function(a){Z(this.g,"Session "+iV(this)+" received modified remote stream: "+
a.toString())},a),a.dispatchEvent(new TP([],c,[])))},RY=function(a,b){var c=SY(a,b);null!=c?0==c.length?E(a.j,"Got empty streamInfos: "+b):(t(c,function(a){Z(this.g,"Session "+iV(this)+" removing remote stream: "+a.toString())},a),a.dispatchEvent(new TP([],[],c))):E(a.j,"Failed to parse streamInfos: "+c)},SY=function(a,b){b=EU(a.u,b);return b=fb(b,function(a){if(""==a.ga()){var b;"a"==a.U()?b="1":"v"==a.U()?b="2":"d"==a.U()&&(b="3");a=NN(QN(new MN(a),b));this.Oa.add(a.M())}return a},a)};
FY.prototype.mc=function(a){if(ta(a.removed)&&0<a.removed.length)0==this.b.get().length&&(Z(this.g,"Session "+iV(this)+" terminating to handle Reflector failover."),GY(this,"STOPPED",26));else if(ta(a.a)&&0<a.a.length){var b=FU(this.u,a.a);null!=b?0==b.length?E(this.j,"Got empty stream requests: "+a):this.dispatchEvent(new UP(b)):E(this.j,"Failed to parse stream requests: "+a)}};
FY.prototype.Xa=function(a){this.g.error("Stopping session "+this.a+" because stream collection failed, with reason: "+a.reason);this.stop(a.a)};var TY=function(a){qQ.call(this,a)};r(TY,qQ);Pw(TY,qQ,1);TY.prototype.th=function(a,b,c){var d=this.b.b;c=new GU(d.g,Q(d,6),Q(d,2),Q(d,5),c,Q(d,1));var e=this.b,f=Q(d,6),d=new mx(Q(d,14),Q(d,8)||!1,!!Q(d,16));a=new FY(a,e,f,c,d,b);a.l(c);return a};var UY=function(){this.l=null};r(UY,nz);Pw(UY,nz);UY.prototype.b=function(a,b){return U(b,Xw,13)};UY.prototype.h=function(a,b,c){if(c)return new uX(c||Q(b,6),b.g,void 0,Q(b,1),Q(b,5));this.l||(this.l=new uX(Q(b,6),b.g,void 0,Q(b,1),Q(b,5)));return this.l};UY.prototype.g=function(a,b){return b.v};UY.prototype.f=function(a,b){return b.h};var VY=function(a,b){this.a=a;this.b=b};VY.prototype.execute=function(a){this.a&&(this.a.call(this.b||null,a),this.a=this.b=null)};VY.prototype.abort=function(){this.b=this.a=null};var WY=function(a,b){kd.call(this);this.a=a;this.xa=b;this.f=[];this.b=[];this.g=[]};r(WY,kd);WY.prototype.getId=function(){return this.xa};var XY=function(a,b){a.b.push(new VY(b,void 0))};WY.prototype.onError=function(a){for(var b=this.b,c=[],d=0;d<b.length;d++)try{b[d].execute(a)}catch(e){Zc(e),c.push(e)}b.length=0;(a=c.length?c:null)&&window.setTimeout(Yc("Module errback failures: "+a),0);this.g.length=0;this.f.length=0};WY.prototype.X=function(){WY.W.X.call(this);nd(null)};var YY=function(){kd.call(this);this.g={};this.b=[];this.f=[];this.m=[];this.a=[];this.h=[];this.o={};this.K=new WY([],"");this.j=Xi("goog.module.ModuleManager");this.v=0;this.B=this.A=!1};r(YY,kd);qa(YY);
var $Y=function(a){var b=0<a.b.length;b!=a.A&&(ZY(a,b?"active":"idle"),a.A=b);b=0<a.h.length;b!=a.B&&(ZY(a,b?"userActive":"userIdle"),a.B=b)},cZ=function(a,b,c){var d=[];Ab(b,d);b=[];for(var e={},f=0;f<d.length;f++){var g=d[f],m=a.g[g];if(!m)throw Error("Unknown module: "+g);var q=new Yq;e[g]=q;aZ(a,g,m,!!c,q);bZ(a,g)||b.push(g)}0<b.length&&(nb(a.b)?a.u(b):(a.a.push(b),$Y(a)));return e},aZ=function(a,b,c,d,e){c.f.push(new VY(e.callback,e));XY(c,function(a){e.a(Error(a))});bZ(a,b)?d&&(F(a.j,"User initiated module already loading: "+
b),mb(a.h,b)||a.h.push(b),$Y(a)):d?(F(a.j,"User initiated module load: "+b),mb(a.h,b)||a.h.push(b)):F(a.j,"Initiating module load: "+b)};YY.prototype.u=function(a,b,c){b||(this.v=0);a=dZ(this,a);F(this.j,"Loading module(s): "+a);this.b=a;this.f=u(a);$Y(this);nb(a)||(this.m.push.apply(this.m,a),c=n(null.dr,null,u(a),this.g,null,n(this.F,this,this.f,a),n(this.H,this),!!c),(a=5E3*Math.pow(this.v,2))?window.setTimeout(c,a):c())};
var dZ=function(a,b){for(var c=0;c<b.length;c++);for(var d=[],c=0;c<b.length;c++)d=d.concat(eZ(a,b[c]));Ab(d);return 1<d.length?(c=d.shift(),F(a.j,"Must load "+c+" module before "+b),a.a=fb(d,function(a){return[a]}).concat(a.a),[c]):d},eZ=function(a,b){var c=[];mb(a.m,b)||c.push(b);for(b=u(a.g[b].a);b.length;){var d=b.pop();mb(a.m,d)||(c.unshift(d),Array.prototype.unshift.apply(b,a.g[d].a))}Ab(c);return c},bZ=function(a,b){if(mb(a.b,b))return!0;for(var c=0;c<a.a.length;c++)if(mb(a.a[c],b))return!0;
return!1};YY.prototype.load=function(a,b){return cZ(this,[a],b)[a]};YY.prototype.J=function(a){return cZ(this,a,void 0)};YY.prototype.F=function(a,b,c){this.v++;this.f=a;t(b,Ea(tb,this.m),this);401==c?(F(this.j,"Module loading unauthorized"),fZ(this,0),this.a.length=0):410==c?(gZ(this,3),hZ(this)):3<=this.v?(F(this.j,"Aborting after failure to load: "+this.b),gZ(this,1),hZ(this)):(F(this.j,"Retrying after failure to load: "+this.b),this.u(this.f,!0,8001==c))};
YY.prototype.H=function(){F(this.j,"Aborting after timeout: "+this.b);gZ(this,2);hZ(this)};
var gZ=function(a,b){1<a.f.length?a.a=fb(a.f,function(a){return[a]}).concat(a.a):fZ(a,b)},fZ=function(a,b){var c=a.f;a.b.length=0;for(var d=[],e=0;e<a.a.length;e++){var f=eb(a.a[e],function(a){var b=eZ(this,a);return hb(c,function(a){return mb(b,a)})},a);yb(d,f)}for(e=0;e<c.length;e++)pb(d,c[e]);for(e=0;e<d.length;e++){for(f=0;f<a.a.length;f++)tb(a.a[f],d[e]);tb(a.h,d[e])}var g=a.o.error;if(g)for(e=0;e<g.length;e++)for(var m=g[e],f=0;f<d.length;f++)m("error",d[f],b);for(e=0;e<c.length;e++)if(a.g[c[e]])a.g[c[e]].onError(b);
a.f.length=0;$Y(a)},hZ=function(a){for(;a.a.length;){var b=eb(a.a.shift(),function(){return!0},a);if(0<b.length){a.u(b);return}}$Y(a)},ZY=function(a,b){a=a.o[b];for(var c=0;a&&c<a.length;c++)a[c](b)};YY.prototype.X=function(){YY.W.X.call(this);od(Pb(this.g),this.K);this.o=this.a=this.h=this.f=this.b=this.g=null};var iZ=function(a){gh.call(this,a);a=this.ra=new Vy;var b=YY.S();a.F=b;a=this.ra;b=new yY(a,document);Ox(a,Ww,b);this.f=this.o=this.m=this.w=null;this.A=rE(qE.S())};ka(iZ,gh);h=iZ.prototype;h.ce=function(){jZ(this);Xh(this)};h.ea=function(){throw Error("not implemented");};h.pa=function(){return[{lastSessionId:this.f}]};h.ua=function(){var a=Uh(this);a&&a.lastSessionId&&(this.f=a.lastSessionId)};
h.gf=function(){var a=this;return this.f||this.a?new Promise(function(b,c){setTimeout(c,5E3);var d=function(){a.m.then(function(){a.f?(a.f=null,b()):c(Error("No session to upload"))})};a.a?uY(a.a).then(function(){b()}).catch(d):a.f?d():c(Error("No session to upload"))}):Promise.reject(Error("No session to upload"))};h.Qe=function(a){a.a?(a=a.a,a=a.a?a.a.xf():null):a=null;this.f=a;return Promise.resolve()};h.be=function(a,b){a=new rY(b,this.ra,this.m);this.w=a.f.bind(a);return a};h.Ae=function(){pY(0)};
h.xe=function(){pY(1)};h.ye=function(){Bg("MediaRouter.Hangouts.Session.End")};h.ze=function(a){Cg("MediaRouter.Hangouts.Start.Failure",a,Eg)};h.Ed=function(){Bg("MediaRouter.Hangouts.Stream.End")};h.hk=function(a){this.w&&this.w(a)};h.Jg=function(){var a="v1";.1>Math.random()&&(a+="_preprod");return a};
var jZ=function(a){Ox(a.ra,cT,bT);var b=new vx(new gU,new vY(a.hk.bind(a))),b=new Ex(b,"hangouts",a.Jg(),"","https://www.googleapis.com",a.A),c=new Mx(b);S(c,1,39);S(c,5,158);S(c,2,"castouts");S(c,3,"castouts");hx(c,chrome.runtime.id+chrome.runtime.getManifest().version);c.l("castouts",!0);b=.01;"google.com"==JC(sE(qE.S()))&&(b=1);S(c,9,b);S(c,10,"https://hangouts.google.com/hangouts/_/logpref");S(c,11,"https://clients2.google.com/cr/report");c.register(a.ra);jU(a.ra);a.m=new Promise(function(b,e){a.o=
a.ra.get(SQ);var d=a.o;d.b=c;d.f.resolve(c);d.Ga().then(b,e)})};var kZ=function(){iZ.call(this,"hangouts")};ka(kZ,iZ);kZ.prototype.ea=function(){return"HangoutsService"};var lZ=new kZ;eh("mr.mirror.hangouts.HangoutsService",lZ);var mZ=function(){iZ.call(this,"meetings")};ka(mZ,iZ);mZ.prototype.ea=function(){return"MeetingsService"};mZ.prototype.Jg=function(){return"v1_meetings"};mZ.prototype.ce=function(){iZ.prototype.ce.call(this);var a=tE(qE.S());Ox(this.ra,ux,a)};var nZ=new mZ;eh("mr.mirror.hangouts.MeetingsService",nZ);
