text: (function() {'use strict';var e,aa=function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;for(var d in b)if(Object.defineProperties){var f=Object.getOwnPropertyDescriptor(b,d);f&&Object.defineProperty(a,d,f)}else a[d]=b[d]},ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},h="undefined"!=typeof window&&
  window===this?this:"undefined"!=typeof global&&null!=global?global:this,ca=function(){ca=function(){};h.Symbol||(h.Symbol=da)},ea=0,da=function(a){return"jscomp_symbol_"+(a||"")+ea++},l=function(){ca();var a=h.Symbol.iterator;a||(a=h.Symbol.iterator=h.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&ba(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(this)}});l=function(){}},fa=function(a){var b=0;return ga(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})},
  ga=function(a){l();a={next:a};a[h.Symbol.iterator]=function(){return this};return a},ia=function(a){l();var b=a[Symbol.iterator];return b?b.call(a):fa(a)},n=this,p=function(a,b,c){a=a.split(".");c=c||n;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}:c[d]=b},ja=function(){},q=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=
  Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},r=function(a){var b=
  q(a);return"array"==b||"object"==b&&"number"==typeof a.length},t=function(a){return"string"==typeof a},ka="closure_uid_"+(1E9*Math.random()>>>0),la=0,ma=function(a,b,c){return a.call.apply(a.bind,arguments)},na=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}},u=function(a,b,c){u=
  Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ma:na;return u.apply(null,arguments)},oa=function(a,b){function c(){}c.prototype=b.prototype;a.le=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.he=function(a,c,g){for(var d=Array(arguments.length-2),f=2;f<arguments.length;f++)d[f-2]=arguments[f];return b.prototype[c].apply(a,d)}};var chrome=chrome||window.chrome||{};chrome.cast=chrome.cast||{};chrome.cast.media=chrome.cast.media||{};chrome.cast.VERSION=[1,2];p("chrome.cast.VERSION",chrome.cast.VERSION,void 0);chrome.cast.fe=!0;p("chrome.cast.usingPresentationApi",chrome.cast.fe,void 0);chrome.cast.Error=function(a,b,c){this.code=a;this.description=b||null;this.details=c||null};p("chrome.cast.Error",chrome.cast.Error,void 0);chrome.cast.xc=function(a){this.platform=a;this.packageId=this.url=null};p("chrome.cast.SenderApplication",chrome.cast.xc,void 0);chrome.cast.Image=function(a){this.url=a;this.width=this.height=null};
  p("chrome.cast.Image",chrome.cast.Image,void 0);chrome.cast.Volume=function(a,b){this.level=void 0!==a?a:null;this.muted=void 0!==b?b:null};p("chrome.cast.Volume",chrome.cast.Volume,void 0);var pa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},qa=/&/g,ra=/</g,sa=/>/g,ta=/"/g,ua=/'/g,va=/\x00/g,wa=/[\x00&<>"']/,ya=function(a,b){var c={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'},d;d=b?b.createElement("div"):n.document.createElement("div");return a.replace(xa,function(a,b){var f=c[a];if(f)return f;"#"==b.charAt(0)&&(b=Number("0"+b.substr(1)),isNaN(b)||(f=String.fromCharCode(b)));f||(d.innerHTML=a+" ",f=d.firstChild.nodeValue.slice(0,
  -1));return c[a]=f})},za=function(a){return a.replace(/&([^;]+);/g,function(a,c){switch(c){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:return"#"!=c.charAt(0)||(c=Number("0"+c.substr(1)),isNaN(c))?a:String.fromCharCode(c)}})},xa=/&([^;\s<&]+);?/g,w=function(a,b){return a<b?-1:a>b?1:0};chrome.cast.eb={CUSTOM_CONTROLLER_SCOPED:"custom_controller_scoped",TAB_AND_ORIGIN_SCOPED:"tab_and_origin_scoped",ORIGIN_SCOPED:"origin_scoped",PAGE_SCOPED:"page_scoped"};p("chrome.cast.AutoJoinPolicy",chrome.cast.eb,void 0);chrome.cast.fb={CREATE_SESSION:"create_session",CAST_THIS_TAB:"cast_this_tab"};p("chrome.cast.DefaultActionPolicy",chrome.cast.fb,void 0);chrome.cast.Da={VIDEO_OUT:"video_out",AUDIO_OUT:"audio_out",VIDEO_IN:"video_in",AUDIO_IN:"audio_in",MULTIZONE_GROUP:"multizone_group"};
  p("chrome.cast.Capability",chrome.cast.Da,void 0);chrome.cast.u={CANCEL:"cancel",TIMEOUT:"timeout",API_NOT_INITIALIZED:"api_not_initialized",INVALID_PARAMETER:"invalid_parameter",EXTENSION_NOT_COMPATIBLE:"extension_not_compatible",EXTENSION_MISSING:"extension_missing",RECEIVER_UNAVAILABLE:"receiver_unavailable",SESSION_ERROR:"session_error",CHANNEL_ERROR:"channel_error",LOAD_MEDIA_FAILED:"load_media_failed"};p("chrome.cast.ErrorCode",chrome.cast.u,void 0);chrome.cast.ia={AVAILABLE:"available",UNAVAILABLE:"unavailable"};
  p("chrome.cast.ReceiverAvailability",chrome.cast.ia,void 0);chrome.cast.yc={CHROME:"chrome",IOS:"ios",ANDROID:"android"};p("chrome.cast.SenderPlatform",chrome.cast.yc,void 0);chrome.cast.ob={CAST:"cast",DIAL:"dial",HANGOUT:"hangout",CUSTOM:"custom"};p("chrome.cast.ReceiverType",chrome.cast.ob,void 0);chrome.cast.bc={RUNNING:"running",STOPPED:"stopped",ERROR:"error"};p("chrome.cast.DialAppState",chrome.cast.bc,void 0);chrome.cast.tc={CAST:"cast",STOP:"stop"};
  p("chrome.cast.ReceiverAction",chrome.cast.tc,void 0);chrome.cast.U={CONNECTED:"connected",DISCONNECTED:"disconnected",STOPPED:"stopped"};p("chrome.cast.SessionStatus",chrome.cast.U,void 0);chrome.cast.Zb=function(a,b,c,d,f){this.sessionRequest=a;this.sessionListener=b;this.receiverListener=c;this.autoJoinPolicy=d||chrome.cast.eb.TAB_AND_ORIGIN_SCOPED;this.defaultActionPolicy=f||chrome.cast.fb.CREATE_SESSION;this.customDialLaunchCallback=null;this.invisibleSender=!1;this.additionalSessionRequests=[]};p("chrome.cast.ApiConfig",chrome.cast.Zb,void 0);chrome.cast.ec=function(a,b){this.appName=a;this.launchParameter=b||null};p("chrome.cast.DialRequest",chrome.cast.ec,void 0);
  chrome.cast.cc=function(a,b,c){this.receiver=a;this.appState=b;this.extraData=c||null};p("chrome.cast.DialLaunchData",chrome.cast.cc,void 0);chrome.cast.dc=function(a,b){this.doLaunch=a;this.launchParameter=b||null};p("chrome.cast.DialLaunchResponse",chrome.cast.dc,void 0);chrome.cast.zc=function(a,b,c){this.appId=a;this.capabilities="array"==q(b)?b:[chrome.cast.Da.VIDEO_OUT,chrome.cast.Da.AUDIO_OUT];this.requestSessionTimeout=c||chrome.cast.timeout.requestSession;this.dialRequest=this.language=null};
  p("chrome.cast.SessionRequest",chrome.cast.zc,void 0);
  chrome.cast.sc=function(a,b,c,d){this.label=a;a=b;wa.test(a)&&(-1!=a.indexOf("&")&&(a=a.replace(qa,"&amp;")),-1!=a.indexOf("<")&&(a=a.replace(ra,"&lt;")),-1!=a.indexOf(">")&&(a=a.replace(sa,"&gt;")),-1!=a.indexOf('"')&&(a=a.replace(ta,"&quot;")),-1!=a.indexOf("'")&&(a=a.replace(ua,"&#39;")),-1!=a.indexOf("\x00")&&(a=a.replace(va,"&#0;")));this.friendlyName=a;this.capabilities=c||[];this.volume=d||null;this.receiverType=chrome.cast.ob.CAST;this.displayStatus=this.isActiveInput=null};
  p("chrome.cast.Receiver",chrome.cast.sc,void 0);chrome.cast.uc=function(a,b){this.statusText=a;this.appImages=b;this.showStop=null};p("chrome.cast.ReceiverDisplayStatus",chrome.cast.uc,void 0);chrome.cast.rb=function(){this.requestSession=6E4;this.sendCustomMessage=this.setReceiverVolume=this.stopSession=this.leaveSession=3E3};p("chrome.cast.Timeout",chrome.cast.rb,void 0);chrome.cast.timeout=new chrome.cast.rb;p("chrome.cast.timeout",chrome.cast.timeout,void 0);chrome.cast.Yb="auto-join";
  chrome.cast.nc="cast-session_";chrome.cast.media.jc={PAUSE:"pause",SEEK:"seek",STREAM_VOLUME:"stream_volume",STREAM_MUTE:"stream_mute"};p("chrome.cast.media.MediaCommand",chrome.cast.media.jc,void 0);chrome.cast.media.s={GENERIC:0,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4};p("chrome.cast.media.MetadataType",chrome.cast.media.s,void 0);chrome.cast.media.T={IDLE:"IDLE",PLAYING:"PLAYING",PAUSED:"PAUSED",BUFFERING:"BUFFERING"};p("chrome.cast.media.PlayerState",chrome.cast.media.T,void 0);
  chrome.cast.media.Ea={OFF:"REPEAT_OFF",ALL:"REPEAT_ALL",SINGLE:"REPEAT_SINGLE",ALL_AND_SHUFFLE:"REPEAT_ALL_AND_SHUFFLE"};p("chrome.cast.media.RepeatMode",chrome.cast.media.Ea,void 0);chrome.cast.media.vc={PLAYBACK_START:"PLAYBACK_START",PLAYBACK_PAUSE:"PLAYBACK_PAUSE"};p("chrome.cast.media.ResumeState",chrome.cast.media.vc,void 0);chrome.cast.media.qb={BUFFERED:"BUFFERED",LIVE:"LIVE",OTHER:"OTHER"};p("chrome.cast.media.StreamType",chrome.cast.media.qb,void 0);
  chrome.cast.media.hc={CANCELLED:"CANCELLED",INTERRUPTED:"INTERRUPTED",FINISHED:"FINISHED",ERROR:"ERROR"};p("chrome.cast.media.IdleReason",chrome.cast.media.hc,void 0);chrome.cast.media.Hc={TEXT:"TEXT",AUDIO:"AUDIO",VIDEO:"VIDEO"};p("chrome.cast.media.TrackType",chrome.cast.media.Hc,void 0);chrome.cast.media.Ec={SUBTITLES:"SUBTITLES",CAPTIONS:"CAPTIONS",DESCRIPTIONS:"DESCRIPTIONS",CHAPTERS:"CHAPTERS",METADATA:"METADATA"};p("chrome.cast.media.TextTrackType",chrome.cast.media.Ec,void 0);
  chrome.cast.media.Ac={NONE:"NONE",OUTLINE:"OUTLINE",DROP_SHADOW:"DROP_SHADOW",RAISED:"RAISED",DEPRESSED:"DEPRESSED"};p("chrome.cast.media.TextTrackEdgeType",chrome.cast.media.Ac,void 0);chrome.cast.media.Fc={NONE:"NONE",NORMAL:"NORMAL",ROUNDED_CORNERS:"ROUNDED_CORNERS"};p("chrome.cast.media.TextTrackWindowType",chrome.cast.media.Fc,void 0);
  chrome.cast.media.Bc={SANS_SERIF:"SANS_SERIF",MONOSPACED_SANS_SERIF:"MONOSPACED_SANS_SERIF",SERIF:"SERIF",MONOSPACED_SERIF:"MONOSPACED_SERIF",CASUAL:"CASUAL",CURSIVE:"CURSIVE",SMALL_CAPITALS:"SMALL_CAPITALS"};p("chrome.cast.media.TextTrackFontGenericFamily",chrome.cast.media.Bc,void 0);chrome.cast.media.Cc={NORMAL:"NORMAL",BOLD:"BOLD",BOLD_ITALIC:"BOLD_ITALIC",ITALIC:"ITALIC"};p("chrome.cast.media.TextTrackFontStyle",chrome.cast.media.Cc,void 0);chrome.cast.media.gb=function(){this.customData=null};p("chrome.cast.media.GetStatusRequest",chrome.cast.media.gb,void 0);chrome.cast.media.hb=function(){this.customData=null};p("chrome.cast.media.PauseRequest",chrome.cast.media.hb,void 0);chrome.cast.media.ib=function(){this.customData=null};p("chrome.cast.media.PlayRequest",chrome.cast.media.ib,void 0);chrome.cast.media.wc=function(){this.customData=this.resumeState=this.currentTime=null};p("chrome.cast.media.SeekRequest",chrome.cast.media.wc,void 0);
  chrome.cast.media.pb=function(){this.customData=null};p("chrome.cast.media.StopRequest",chrome.cast.media.pb,void 0);chrome.cast.media.Jc=function(a){this.volume=a;this.customData=null};p("chrome.cast.media.VolumeRequest",chrome.cast.media.Jc,void 0);chrome.cast.media.ic=function(a){this.type="LOAD";this.requestId=0;this.sessionId=null;this.media=a;this.activeTrackIds=null;this.autoplay=!0;this.customData=this.currentTime=null};p("chrome.cast.media.LoadRequest",chrome.cast.media.ic,void 0);
  chrome.cast.media.pc=function(a){this.type="PRECACHE";this.requestId=0;this.data=a};chrome.cast.media.fc=function(a,b){this.requestId=0;this.activeTrackIds=a||null;this.textTrackStyle=b||null};p("chrome.cast.media.EditTracksInfoRequest",chrome.cast.media.fc,void 0);chrome.cast.media.gc=function(){this.metadataType=this.type=chrome.cast.media.s.GENERIC;this.releaseDate=this.releaseYear=this.images=this.subtitle=this.title=null};p("chrome.cast.media.GenericMediaMetadata",chrome.cast.media.gc,void 0);
  chrome.cast.media.lc=function(){this.metadataType=this.type=chrome.cast.media.s.MOVIE;this.releaseDate=this.releaseYear=this.images=this.subtitle=this.studio=this.title=null};p("chrome.cast.media.MovieMediaMetadata",chrome.cast.media.lc,void 0);chrome.cast.media.Ic=function(){this.metadataType=this.type=chrome.cast.media.s.TV_SHOW;this.originalAirdate=this.releaseYear=this.images=this.episode=this.episodeNumber=this.season=this.seasonNumber=this.episodeTitle=this.title=this.seriesTitle=null};
  p("chrome.cast.media.TvShowMediaMetadata",chrome.cast.media.Ic,void 0);chrome.cast.media.mc=function(){this.metadataType=this.type=chrome.cast.media.s.MUSIC_TRACK;this.releaseDate=this.releaseYear=this.images=this.discNumber=this.trackNumber=this.artistName=this.songName=this.composer=this.artist=this.albumArtist=this.title=this.albumName=null};p("chrome.cast.media.MusicTrackMediaMetadata",chrome.cast.media.mc,void 0);
  chrome.cast.media.oc=function(){this.metadataType=this.type=chrome.cast.media.s.PHOTO;this.creationDateTime=this.height=this.width=this.longitude=this.latitude=this.images=this.location=this.artist=this.title=null};p("chrome.cast.media.PhotoMediaMetadata",chrome.cast.media.oc,void 0);chrome.cast.media.kc=function(a,b){this.contentId=a;this.streamType=chrome.cast.media.qb.BUFFERED;this.contentType=b;this.customData=this.textTrackStyle=this.tracks=this.duration=this.metadata=null};
  p("chrome.cast.media.MediaInfo",chrome.cast.media.kc,void 0);chrome.cast.media.kb=function(a){this.itemId=null;this.media=a;this.autoplay=!0;this.startTime=0;this.playbackDuration=null;this.preloadTime=0;this.customData=this.activeTrackIds=null};p("chrome.cast.media.QueueItem",chrome.cast.media.kb,void 0);chrome.cast.media.ac="CC1AD845";p("chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID",chrome.cast.media.ac,void 0);chrome.cast.media.timeout={};
  p("chrome.cast.media.timeout",chrome.cast.media.timeout,void 0);chrome.cast.media.timeout.load=0;chrome.cast.media.timeout.load=chrome.cast.media.timeout.load;chrome.cast.media.timeout.na=0;chrome.cast.media.timeout.getStatus=chrome.cast.media.timeout.na;chrome.cast.media.timeout.play=0;chrome.cast.media.timeout.play=chrome.cast.media.timeout.play;chrome.cast.media.timeout.pause=0;chrome.cast.media.timeout.pause=chrome.cast.media.timeout.pause;chrome.cast.media.timeout.seek=0;
  chrome.cast.media.timeout.seek=chrome.cast.media.timeout.seek;chrome.cast.media.timeout.stop=0;chrome.cast.media.timeout.stop=chrome.cast.media.timeout.stop;chrome.cast.media.timeout.Ca=0;chrome.cast.media.timeout.setVolume=chrome.cast.media.timeout.Ca;chrome.cast.media.timeout.la=0;chrome.cast.media.timeout.editTracksInfo=chrome.cast.media.timeout.la;chrome.cast.media.timeout.o=0;chrome.cast.media.timeout.queue=chrome.cast.media.timeout.o;
  chrome.cast.media.Gc=function(a,b){this.trackId=a;this.trackContentType=this.trackContentId=null;this.type=b;this.customData=this.subtype=this.language=this.name=null};p("chrome.cast.media.Track",chrome.cast.media.Gc,void 0);chrome.cast.media.Dc=function(){this.customData=this.fontStyle=this.fontGenericFamily=this.fontFamily=this.fontScale=this.windowRoundedCornerRadius=this.windowColor=this.windowType=this.edgeColor=this.edgeType=this.backgroundColor=this.foregroundColor=null};
  p("chrome.cast.media.TextTrackStyle",chrome.cast.media.Dc,void 0);chrome.cast.media.qc=function(a){this.type="QUEUE_LOAD";this.sessionId=this.requestId=null;this.items=a;this.startIndex=0;this.repeatMode=chrome.cast.media.Ea.OFF;this.customData=null};p("chrome.cast.media.QueueLoadRequest",chrome.cast.media.qc,void 0);chrome.cast.media.jb=function(a){this.type="QUEUE_INSERT";this.sessionId=this.requestId=null;this.items=a;this.customData=this.insertBefore=null};
  p("chrome.cast.media.QueueInsertItemsRequest",chrome.cast.media.jb,void 0);chrome.cast.media.rc=function(a){this.type="QUEUE_UPDATE";this.sessionId=this.requestId=null;this.items=a;this.customData=null};p("chrome.cast.media.QueueUpdateItemsRequest",chrome.cast.media.rc,void 0);chrome.cast.media.ha=function(){this.type="QUEUE_UPDATE";this.customData=this.jump=this.currentItemId=this.sessionId=this.requestId=null};p("chrome.cast.media.QueueJumpRequest",chrome.cast.media.ha,void 0);
  chrome.cast.media.nb=function(){this.type="QUEUE_UPDATE";this.customData=this.repeatMode=this.sessionId=this.requestId=null};p("chrome.cast.media.QueueSetPropertiesRequest",chrome.cast.media.nb,void 0);chrome.cast.media.lb=function(a){this.type="QUEUE_REMOVE";this.sessionId=this.requestId=null;this.itemIds=a;this.customData=null};p("chrome.cast.media.QueueRemoveItemsRequest",chrome.cast.media.lb,void 0);
  chrome.cast.media.mb=function(a){this.type="QUEUE_REORDER";this.sessionId=this.requestId=null;this.itemIds=a;this.customData=this.insertBefore=null};p("chrome.cast.media.QueueReorderItemsRequest",chrome.cast.media.mb,void 0);var x=Array.prototype.forEach?function(a,b,c){Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,f=t(a)?a.split(""):a,g=0;g<d;g++)g in f&&b.call(c,f[g],g,a)},Aa=function(a,b,c){for(var d=a.length,f=t(a)?a.split(""):a,g=0;g<d;g++)if(g in f&&b.call(c,f[g],g,a))return g;return-1},Ba=function(a){return Array.prototype.concat.apply([],arguments)},Ca=function(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]};chrome.cast.media.a=function(a,b){this.sessionId=a;this.mediaSessionId=b;this.media=null;this.playbackRate=1;this.playerState=chrome.cast.media.T.IDLE;this.currentTime=0;this.Qa=-1;this.supportedMediaCommands=[];this.volume=new chrome.cast.Volume;this.items=this.preloadedItemId=this.loadingItemId=this.currentItemId=this.customData=this.activeTrackIds=this.idleReason=null;this.repeatMode=chrome.cast.media.Ea.OFF;this.oa=!1;this.ea=[]};p("chrome.cast.media.Media",chrome.cast.media.a,void 0);
  chrome.cast.media.a.prototype.na=function(a,b,c){a||(a=new chrome.cast.media.gb);y.i(this,"MEDIA_GET_STATUS",a,b,c,chrome.cast.media.timeout.na)};chrome.cast.media.a.prototype.getStatus=chrome.cast.media.a.prototype.na;chrome.cast.media.a.prototype.play=function(a,b,c){this.Ib(y,a,b,c)};chrome.cast.media.a.prototype.play=chrome.cast.media.a.prototype.play;chrome.cast.media.a.prototype.Ib=function(a,b,c,d){b||(b=new chrome.cast.media.ib);a.i(this,"PLAY",b,c,d,chrome.cast.media.timeout.play)};
  chrome.cast.media.a.prototype.playWithContext=chrome.cast.media.a.prototype.Ib;chrome.cast.media.a.prototype.pause=function(a,b,c){this.Hb(y,a,b,c)};chrome.cast.media.a.prototype.pause=chrome.cast.media.a.prototype.pause;chrome.cast.media.a.prototype.Hb=function(a,b,c,d){b||(b=new chrome.cast.media.hb);a.i(this,"PAUSE",b,c,d,chrome.cast.media.timeout.pause)};chrome.cast.media.a.prototype.pauseWithContext=chrome.cast.media.a.prototype.Hb;
  chrome.cast.media.a.prototype.seek=function(a,b,c){y.i(this,"SEEK",a,b,c,chrome.cast.media.timeout.seek)};chrome.cast.media.a.prototype.seek=chrome.cast.media.a.prototype.seek;chrome.cast.media.a.prototype.stop=function(a,b,c){a||(a=new chrome.cast.media.pb);y.i(this,"STOP_MEDIA",a,b,c,chrome.cast.media.timeout.stop)};chrome.cast.media.a.prototype.stop=chrome.cast.media.a.prototype.stop;chrome.cast.media.a.prototype.Ca=function(a,b,c){y.i(this,"MEDIA_SET_VOLUME",a,b,c,chrome.cast.media.timeout.Ca)};
  chrome.cast.media.a.prototype.setVolume=chrome.cast.media.a.prototype.Ca;chrome.cast.media.a.prototype.la=function(a,b,c){y.i(this,"EDIT_TRACKS_INFO",a,b,c,chrome.cast.media.timeout.la)};chrome.cast.media.a.prototype.editTracksInfo=chrome.cast.media.a.prototype.la;chrome.cast.media.a.prototype.Ed=function(a,b,c){y.i(this,"QUEUE_INSERT",a,b,c,chrome.cast.media.timeout.o)};chrome.cast.media.a.prototype.queueInsertItems=chrome.cast.media.a.prototype.Ed;
  chrome.cast.media.a.prototype.Dd=function(a,b,c){y.i(this,"QUEUE_INSERT",new chrome.cast.media.jb([a]),b,c,chrome.cast.media.timeout.o)};chrome.cast.media.a.prototype.queueAppendItem=chrome.cast.media.a.prototype.Dd;chrome.cast.media.a.prototype.Od=function(a,b,c){y.i(this,"QUEUE_UPDATE",a,b,c,chrome.cast.media.timeout.o)};chrome.cast.media.a.prototype.queueUpdateItems=chrome.cast.media.a.prototype.Od;
  chrome.cast.media.a.prototype.Jd=function(a,b){var c=new chrome.cast.media.ha;c.jump=-1;y.i(this,"QUEUE_UPDATE",c,a,b,chrome.cast.media.timeout.o)};chrome.cast.media.a.prototype.queuePrev=chrome.cast.media.a.prototype.Jd;chrome.cast.media.a.prototype.Id=function(a,b){var c=new chrome.cast.media.ha;c.jump=1;y.i(this,"QUEUE_UPDATE",c,a,b,chrome.cast.media.timeout.o)};chrome.cast.media.a.prototype.queueNext=chrome.cast.media.a.prototype.Id;
  chrome.cast.media.a.prototype.Fd=function(a,b,c){if(!(0>this.Oa(a))){var d=new chrome.cast.media.ha;d.currentItemId=a;y.i(this,"QUEUE_UPDATE",d,b,c,chrome.cast.media.timeout.o)}};chrome.cast.media.a.prototype.queueJumpToItem=chrome.cast.media.a.prototype.Fd;chrome.cast.media.a.prototype.Nd=function(a,b,c){var d=new chrome.cast.media.nb;d.repeatMode=a;y.i(this,"QUEUE_UPDATE",d,b,c,chrome.cast.media.timeout.o)};chrome.cast.media.a.prototype.queueSetRepeatMode=chrome.cast.media.a.prototype.Nd;
  chrome.cast.media.a.prototype.Ld=function(a,b,c){y.i(this,"QUEUE_REMOVE",a,b,c,chrome.cast.media.timeout.o)};chrome.cast.media.a.prototype.queueRemoveItems=chrome.cast.media.a.prototype.Ld;chrome.cast.media.a.prototype.Kd=function(a,b,c){0>this.Oa(a)||y.i(this,"QUEUE_REMOVE",new chrome.cast.media.lb([a]),b,c,chrome.cast.media.timeout.o)};chrome.cast.media.a.prototype.queueRemoveItem=chrome.cast.media.a.prototype.Kd;chrome.cast.media.a.prototype.Md=function(a,b,c){y.i(this,"QUEUE_REORDER",a,b,c,chrome.cast.media.timeout.o)};
  chrome.cast.media.a.prototype.queueReorderItems=chrome.cast.media.a.prototype.Md;chrome.cast.media.a.prototype.Hd=function(a,b,c,d){var f=this.Oa(a);if(!(0>f))if(0>b)d&&d(new chrome.cast.Error(chrome.cast.u.INVALID_PARAMETER));else if(f==b)c&&c();else{var g=null;b=b>f?b+1:b;b<this.items.length&&(g=this.items[b]);a=new chrome.cast.media.mb([a]);a.insertBefore=g?g.itemId:null;y.i(this,"QUEUE_REORDER",a,c,d,chrome.cast.media.timeout.o)}};chrome.cast.media.a.prototype.queueMoveItemToNewIndex=chrome.cast.media.a.prototype.Hd;
  chrome.cast.media.a.prototype.de=function(a){return-1<this.supportedMediaCommands.indexOf(a)};chrome.cast.media.a.prototype.supportsCommand=chrome.cast.media.a.prototype.de;chrome.cast.media.a.prototype.Xc=function(){if(this.playerState==chrome.cast.media.T.PLAYING&&0<=this.Qa){var a=this.currentTime+(Date.now()-this.Qa)/1E3*this.playbackRate;this.media&&null!=this.media.duration&&a>this.media.duration&&(a=this.media.duration);0>a&&(a=0);return a}return this.currentTime};
  chrome.cast.media.a.prototype.getEstimatedTime=chrome.cast.media.a.prototype.Xc;chrome.cast.media.a.prototype.Ha=function(a){this.V(y,a)};chrome.cast.media.a.prototype.addUpdateListener=chrome.cast.media.a.prototype.Ha;chrome.cast.media.a.prototype.V=function(a,b){a.Lc(this,b)};chrome.cast.media.a.prototype.addUpdateListenerWithContext=chrome.cast.media.a.prototype.V;chrome.cast.media.a.prototype.Ta=function(a){this.ba(y,a)};chrome.cast.media.a.prototype.removeUpdateListener=chrome.cast.media.a.prototype.Ta;
  chrome.cast.media.a.prototype.ba=function(a,b){y.Rd(this,b)};chrome.cast.media.a.prototype.removeUpdateListenerWithContext=chrome.cast.media.a.prototype.ba;chrome.cast.media.a.prototype.Oa=function(a){return Aa(this.items,function(b){return b.itemId==a})};var y=null;var Da=function(a,b,c){this.sessionId=a;this.namespaceName=b;this.message=c};var Ea=function(a,b){this.type="SET_VOLUME";this.requestId=0;this.volume=a;this.expectedVolume=b||null};var Fa=function(a){this.type="STOP";this.requestId=0;this.sessionId=a||null};chrome.cast.b=function(a,b,c,d,f){this.sessionId=a;this.appId=b;this.displayName=c;this.statusText=null;this.appImages=d;this.receiver=f;this.senderApps=[];this.namespaces=[];this.media=[];this.status=chrome.cast.U.CONNECTED;this.transportId=""};p("chrome.cast.Session",chrome.cast.b,void 0);chrome.cast.b.prototype.ae=function(a,b,c){this.Ub(y,a,b,c)};chrome.cast.b.prototype.setReceiverVolumeLevel=chrome.cast.b.prototype.ae;
  chrome.cast.b.prototype.Ub=function(a,b,c,d){b=new Ea(new chrome.cast.Volume(b,null),this.receiver.volume);a.setReceiverVolume(this.sessionId,b,c,d)};chrome.cast.b.prototype.setReceiverVolumeLevelWithContext=chrome.cast.b.prototype.Ub;chrome.cast.b.prototype.Zd=function(a,b,c){this.Tb(y,a,b,c)};chrome.cast.b.prototype.setReceiverMuted=chrome.cast.b.prototype.Zd;
  chrome.cast.b.prototype.Tb=function(a,b,c,d){a=new Ea(new chrome.cast.Volume(null,b),this.receiver.volume);y.setReceiverVolume(this.sessionId,a,c,d)};chrome.cast.b.prototype.setReceiverMutedWithContext=chrome.cast.b.prototype.Tb;chrome.cast.b.prototype.kd=function(a,b){y.leaveSession(this.sessionId,a,b)};chrome.cast.b.prototype.leave=chrome.cast.b.prototype.kd;chrome.cast.b.prototype.stop=function(a,b){this.Wb(y,a,b)};chrome.cast.b.prototype.stop=chrome.cast.b.prototype.stop;
  chrome.cast.b.prototype.Wb=function(a,b,c){a.Pb(new Fa(this.sessionId),b,c,chrome.cast.timeout.stopSession)};chrome.cast.b.prototype.stopWithContext=chrome.cast.b.prototype.Wb;chrome.cast.b.prototype.sendMessage=function(a,b,c,d){this.Rb(y,a,b,c,d)};chrome.cast.b.prototype.sendMessage=chrome.cast.b.prototype.sendMessage;chrome.cast.b.prototype.Rb=function(a,b,c,d,f){a.Vd(new Da(this.sessionId,b,c),d,f)};chrome.cast.b.prototype.sendMessageWithContext=chrome.cast.b.prototype.Rb;
  chrome.cast.b.prototype.Ha=function(a){this.V(y,a)};chrome.cast.b.prototype.addUpdateListener=chrome.cast.b.prototype.Ha;chrome.cast.b.prototype.V=function(a,b){a.Oc(this.sessionId,b)};chrome.cast.b.prototype.addUpdateListenerWithContext=chrome.cast.b.prototype.V;chrome.cast.b.prototype.Ta=function(a){this.ba(y,a)};chrome.cast.b.prototype.removeUpdateListener=chrome.cast.b.prototype.Ta;chrome.cast.b.prototype.ba=function(a,b){a.Ud(this.sessionId,b)};
  chrome.cast.b.prototype.removeUpdateListenerWithContext=chrome.cast.b.prototype.ba;chrome.cast.b.prototype.Mc=function(a,b){this.tb(y,a,b)};chrome.cast.b.prototype.addMessageListener=chrome.cast.b.prototype.Mc;chrome.cast.b.prototype.tb=function(a,b,c){a.Kc(this.sessionId,b,c)};chrome.cast.b.prototype.addMessageListenerWithContext=chrome.cast.b.prototype.tb;chrome.cast.b.prototype.Fa=function(a){this.sb(y,a)};chrome.cast.b.prototype.addMediaListener=chrome.cast.b.prototype.Fa;
  chrome.cast.b.prototype.sb=function(a,b){a.Fa(this.sessionId,b)};chrome.cast.b.prototype.addMediaListenerWithContext=chrome.cast.b.prototype.sb;chrome.cast.b.prototype.Ra=function(a){this.Kb(y,a)};chrome.cast.b.prototype.removeMediaListener=chrome.cast.b.prototype.Ra;chrome.cast.b.prototype.Kb=function(a,b){a.Ra(this.sessionId,b)};chrome.cast.b.prototype.removeMediaListenerWithContext=chrome.cast.b.prototype.Kb;chrome.cast.b.prototype.Sd=function(a,b){this.Lb(y,a,b)};
  chrome.cast.b.prototype.removeMessageListener=chrome.cast.b.prototype.Sd;chrome.cast.b.prototype.Lb=function(a,b,c){a.Pd(this.sessionId,b,c)};chrome.cast.b.prototype.removeMessageListenerWithContext=chrome.cast.b.prototype.Lb;chrome.cast.b.prototype.md=function(a,b,c){a.sessionId=this.sessionId;y.Qb(a,"LOAD",b,c)};chrome.cast.b.prototype.loadMedia=chrome.cast.b.prototype.md;chrome.cast.b.prototype.Gd=function(a,b,c){a.sessionId=this.sessionId;y.Qb(a,"QUEUE_LOAD",b,c)};
  chrome.cast.b.prototype.queueLoad=chrome.cast.b.prototype.Gd;var Ga=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},Ha=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b};var z="StopIteration"in n?n.StopIteration:{message:"StopIteration",stack:""},A=function(){};A.prototype.next=function(){throw z;};A.prototype.v=function(){return this};
  var Ia=function(a){if(a instanceof A)return a;if("function"==typeof a.v)return a.v(!1);if(r(a)){var b=0,c=new A;c.next=function(){for(;;){if(b>=a.length)throw z;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},B=function(a,b,c){if(r(a))try{x(a,b,c)}catch(d){if(d!==z)throw d;}else{a=Ia(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(d){if(d!==z)throw d;}}};var C=function(a,b){this.h={};this.g=[];this.ga=this.f=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)};e=C.prototype;e.l=function(){this.ja();for(var a=[],b=0;b<this.g.length;b++)a.push(this.h[this.g[b]]);return a};e.B=function(){this.ja();return this.g.concat()};e.M=function(a){return D(this.h,a)};e.clear=function(){this.h={};this.ga=this.f=this.g.length=0};
  e.remove=function(a){return D(this.h,a)?(delete this.h[a],this.f--,this.ga++,this.g.length>2*this.f&&this.ja(),!0):!1};e.ja=function(){if(this.f!=this.g.length){for(var a=0,b=0;a<this.g.length;){var c=this.g[a];D(this.h,c)&&(this.g[b++]=c);a++}this.g.length=b}if(this.f!=this.g.length){for(var d={},b=a=0;a<this.g.length;)c=this.g[a],D(d,c)||(this.g[b++]=c,d[c]=1),a++;this.g.length=b}};e.get=function(a,b){return D(this.h,a)?this.h[a]:b};
  e.set=function(a,b){D(this.h,a)||(this.f++,this.g.push(a),this.ga++);this.h[a]=b};e.addAll=function(a){var b;a instanceof C?(b=a.B(),a=a.l()):(b=Ha(a),a=Ga(a));for(var c=0;c<b.length;c++)this.set(b[c],a[c])};e.forEach=function(a,b){for(var c=this.B(),d=0;d<c.length;d++){var f=c[d],g=this.get(f);a.call(b,g,f,this)}};e.clone=function(){return new C(this)};
  e.v=function(a){this.ja();var b=0,c=this.ga,d=this,f=new A;f.next=function(){if(c!=d.ga)throw Error("The map has changed since the iterator was created");if(b>=d.g.length)throw z;var f=d.g[b++];return a?f:d.h[f]};return f};var D=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Ja=function(a,b){this.requestId=a;this.ee=b;this.Xb=null};Ja.prototype.Gb=function(){};var E=function(){this.ua=new C};E.prototype.Nc=function(a){var b=this;this.ua.set(a.requestId,a);a.Xb=setTimeout(function(){return b.yd(a)},a.ee)};E.prototype.Mb=function(a){var b=this.ua.get(a);if(!b)return null;clearTimeout(b.Xb);this.ua.remove(a);return b};E.prototype.yd=function(a){this.ua.remove(a.requestId);a.Gb()};var Ka=function(a){this.pd=a},Ma=function(a){var b=La.get(a);b||(b=new Ka(a),La.set(a,b));return b};e=Ka.prototype;e.log=function(a,b,c){if(1<=a){"function"==typeof b&&(b=b());var d={ke:this.pd,level:a,time:Date.now(),message:b,ie:c};Na.forEach(function(a){return a(d)})}};e.error=function(a,b){this.log(3,a,b)};e.ge=function(a,b){this.log(2,a,b)};e.info=function(a,b){this.log(1,a,b)};e.Db=function(a,b){this.log(0,a,b)};var Na=[],La=new Map;var F=function(){this.La=this.La;this.td=this.td};F.prototype.La=!1;F.prototype.isDisposed=function(){return this.La};var Oa=function(a,b,c,d){d=d?d(b):b;return Object.prototype.hasOwnProperty.call(a,d)?a[d]:a[d]=c(b)};var G;a:{var Pa=n.navigator;if(Pa){var Qa=Pa.userAgent;if(Qa){G=Qa;break a}}G=""}var H=function(a){return-1!=G.indexOf(a)};var Ra=H("Opera"),I=H("Trident")||H("MSIE"),Sa=H("Edge"),J=H("Gecko")&&!(-1!=G.toLowerCase().indexOf("webkit")&&!H("Edge"))&&!(H("Trident")||H("MSIE"))&&!H("Edge"),K=-1!=G.toLowerCase().indexOf("webkit")&&!H("Edge"),Ta;
  a:{var Ua="",Va=function(){var a=G;if(J)return/rv\:([^\);]+)(\)|;)/.exec(a);if(Sa)return/Edge\/([\d\.]+)/.exec(a);if(I)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(K)return/WebKit\/(\S+)/.exec(a);if(Ra)return/(?:Version)[ \/]?(\S+)/.exec(a)}();Va&&(Ua=Va?Va[1]:"");if(I){var L,Wa=n.document;L=Wa?Wa.documentMode:void 0;if(null!=L&&L>parseFloat(Ua)){Ta=String(L);break a}}Ta=Ua}
  var Xa=Ta,Ya={},M=function(a){return Oa(Ya,a,function(){for(var b=0,c=pa(String(Xa)).split("."),d=pa(String(a)).split("."),f=Math.max(c.length,d.length),g=0;0==b&&g<f;g++){var k=c[g]||"",m=d[g]||"";do{k=/(\d*)(\D*)(.*)/.exec(k)||["","","",""];m=/(\d*)(\D*)(.*)/.exec(m)||["","","",""];if(0==k[0].length&&0==m[0].length)break;b=w(0==k[1].length?0:parseInt(k[1],10),0==m[1].length?0:parseInt(m[1],10))||w(0==k[2].length,0==m[2].length)||w(k[2],m[2]);k=k[3];m=m[3]}while(0==b)}return 0<=b})};I&&M("9");!K||M("528");J&&M("1.9b")||I&&M("8")||Ra&&M("9.5")||K&&M("528");J&&!M("8")||I&&M("9");var Za=function(a,b,c){F.call(this);this.ld=null!=c?u(a,c):a;this.ed=b;this.Ja=u(this.zd,this);this.Ia=[]};oa(Za,F);e=Za.prototype;e.S=!1;e.aa=0;e.J=null;e.Vc=function(a){this.Ia=arguments;this.J||this.aa?this.S=!0:this.Ma()};e.stop=function(){this.J&&(n.clearTimeout(this.J),this.J=null,this.S=!1,this.Ia=[])};e.pause=function(){this.aa++};e.resume=function(){this.aa--;this.aa||!this.S||this.J||(this.S=!1,this.Ma())};e.zd=function(){this.J=null;this.S&&!this.aa&&(this.S=!1,this.Ma())};
  e.Ma=function(){var a=this.Ja,b=this.ed;if("function"!=q(a))if(a&&"function"==typeof a.handleEvent)a=u(a.handleEvent,a);else throw Error("Invalid listener argument");this.J=2147483647<Number(b)?-1:n.setTimeout(a,b||0);this.ld.apply(null,this.Ia)};var $a=H("Safari")&&!((H("Chrome")||H("CriOS"))&&!H("Edge")||H("Coast")||H("Opera")||H("Edge")||H("Silk")||H("Android"))&&!(H("iPhone")&&!H("iPod")&&!H("iPad")||H("iPad")||H("iPod"));var N=null,ab=null,bb=J||K&&!$a||Ra||"function"==typeof n.btoa,cb=function(a,b){var c;if(bb&&!b)c=n.btoa(a);else{c=[];for(var d=0,f=0;f<a.length;f++){for(var g=a.charCodeAt(f);255<g;)c[d++]=g&255,g>>=8;c[d++]=g}if(!N)for(N={},ab={},a=0;65>a;a++)N[a]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(a),ab[a]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(a);b=b?ab:N;a=[];for(d=0;d<c.length;d+=3){var k=c[d],m=(f=d+1<c.length)?c[d+1]:0,v=(g=d+2<c.length)?
  c[d+2]:0,ha=k>>2,k=(k&3)<<4|m>>4,m=(m&15)<<2|v>>6,v=v&63;g||(v=64,f||(m=64));a.push(b[ha],b[k],b[m],b[v])}c=a.join("")}return c};var db=function(a){if(a.l&&"function"==typeof a.l)return a.l();if(t(a))return a.split("");if(r(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return Ga(a)},eb=function(a,b,c){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,c);else if(r(a)||t(a))x(a,b,c);else{var d;if(a.B&&"function"==typeof a.B)d=a.B();else if(a.l&&"function"==typeof a.l)d=void 0;else if(r(a)||t(a)){d=[];for(var f=a.length,g=0;g<f;g++)d.push(g)}else d=Ha(a);for(var f=db(a),g=f.length,k=0;k<g;k++)b.call(c,f[k],
  d&&d[k],a)}};var O=function(a){this.h=new C;a&&this.addAll(a)},fb=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[ka]||(a[ka]=++la)):b.substr(0,1)+a};e=O.prototype;e.add=function(a){this.h.set(fb(a),a)};e.addAll=function(a){a=db(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};e.removeAll=function(a){a=db(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};e.remove=function(a){return this.h.remove(fb(a))};e.clear=function(){this.h.clear()};e.contains=function(a){return this.h.M(fb(a))};
  e.l=function(){return this.h.l()};e.clone=function(){return new O(this)};e.v=function(){return this.h.v(!1)};var gb=function(a,b,c,d){Ja.call(this,a,d||6E5);this.ce=b;this.Na=c};aa(gb,Ja);gb.prototype.Gb=function(){this.Na(new chrome.cast.Error(chrome.cast.u.TIMEOUT))};var P=function(a,b,c,d){this.type=a;this.message=b;this.sequenceNumber=void 0!==c?c:-1;this.timeoutMillis=d||0;this.clientId=""};var Q=function(a,b){this.Ja=a;this.D=b||String(Date.now())+String(Math.floor(1E5*Math.random()));this.L=null};Q.prototype.Sb=function(a){if(!this.L)return R.error("No active session"),"No active session";a.clientId=this.D;a=JSON.stringify(a);if(32768<a.length)return R.error("Message length over limit"),"Message length over limit";R.Db("Send "+a);this.L.send(a);return null};Q.prototype.connect=function(a){this.L=a;this.L.onmessage=u(this.ud,this);this.Sb(new P("client_connect",this.D))};
  Q.prototype.disconnect=function(){this.L.close();this.L=null};Q.prototype.ud=function(a){R.Db("Receive "+a.data);a=JSON.parse(a.data);if(a.clientId==this.D)this.Ja.onMessage(a)};var R=Ma("mr.cast.ExtensionMessenger");var hb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/,ib=function(a,b){if(a){a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),f,g=null;0<=d?(f=a[c].substring(0,d),g=a[c].substring(d+1)):f=a[c];b(f,g?decodeURIComponent(g.replace(/\+/g," ")):"")}}};var S=function(a,b){this.X=this.fa=this.C="";this.P=null;this.Z=this.H="";this.m=this.jd=!1;var c;a instanceof S?(this.m=void 0!==b?b:a.m,this.Ba(a.C),this.bb(a.fa),this.ya(a.X),this.Za(a.P),this.Aa(a.H),this.ab(a.w.clone()),this.za(a.Z)):a&&(c=String(a).match(hb))?(this.m=!!b,this.Ba(c[1]||"",!0),this.bb(c[2]||"",!0),this.ya(c[3]||"",!0),this.Za(c[4]),this.Aa(c[5]||"",!0),this.ab(c[6]||"",!0),this.za(c[7]||"",!0)):(this.m=!!b,this.w=new T(null,null,this.m))};e=S.prototype;
  e.toString=function(){var a=[],b=this.C;b&&a.push(U(b,jb,!0),":");var c=this.X;if(c||"file"==b)a.push("//"),(b=this.fa)&&a.push(U(b,jb,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.P,null!=c&&a.push(":",String(c));if(c=this.H)this.Pa()&&"/"!=c.charAt(0)&&a.push("/"),a.push(U(c,"/"==c.charAt(0)?kb:lb,!0));(c=this.Wc())&&a.push("?",c);(c=this.Z)&&a.push("#",U(c,mb));return a.join("")};
  e.resolve=function(a){var b=this.clone(),c=a.bd();c?b.Ba(a.C):c=a.cd();c?b.bb(a.fa):c=a.Pa();c?b.ya(a.X):c=a.Zc();var d=a.H;if(c)b.Za(a.P);else if(c=a.Eb()){if("/"!=d.charAt(0))if(this.Pa()&&!this.Eb())d="/"+d;else{var f=b.H.lastIndexOf("/");-1!=f&&(d=b.H.substr(0,f+1)+d)}f=d;if(".."==f||"."==f)d="";else if(-1!=f.indexOf("./")||-1!=f.indexOf("/.")){for(var d=0==f.lastIndexOf("/",0),f=f.split("/"),g=[],k=0;k<f.length;){var m=f[k++];"."==m?d&&k==f.length&&g.push(""):".."==m?((1<g.length||1==g.length&&
  ""!=g[0])&&g.pop(),d&&k==f.length&&g.push("")):(g.push(m),d=!0)}d=g.join("/")}else d=f}c?b.Aa(d):c=a.ad();c?b.ab(a.w.clone()):c=a.Yc();c&&b.za(a.Z);return b};e.clone=function(){return new S(this)};e.Ba=function(a,b){this.F();if(this.C=b?V(a,!0):a)this.C=this.C.replace(/:$/,"");return this};e.bd=function(){return!!this.C};e.bb=function(a,b){this.F();this.fa=b?V(a):a;return this};e.cd=function(){return!!this.fa};e.ya=function(a,b){this.F();this.X=b?V(a,!0):a;return this};e.Pa=function(){return!!this.X};
  e.Za=function(a){this.F();if(a){a=Number(a);if(isNaN(a)||0>a)throw Error("Bad port number "+a);this.P=a}else this.P=null;return this};e.Zc=function(){return null!=this.P};e.Aa=function(a,b){this.F();this.H=b?V(a,!0):a;return this};e.Eb=function(){return!!this.H};e.ad=function(){return""!==this.w.toString()};e.ab=function(a,b){this.F();a instanceof T?(this.w=a,this.w.Xa(this.m)):(b||(a=U(a,nb)),this.w=new T(a,null,this.m));return this};e.Wc=function(){return this.w.toString()};
  e.za=function(a,b){this.F();this.Z=b?V(a):a;return this};e.Yc=function(){return!!this.Z};e.F=function(){if(this.jd)throw Error("Tried to modify a read-only Uri");};e.Xa=function(a){this.m=a;this.w&&this.w.Xa(a);return this};
  var V=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},U=function(a,b,c){return t(a)?(a=encodeURI(a).replace(b,ob),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},ob=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},jb=/[#\/\?@]/g,lb=/[\#\?:]/g,kb=/[\#\?]/g,nb=/[\#\?@]/g,mb=/#/g,T=function(a,b,c){this.f=this.c=null;this.A=a||null;this.m=!!c};e=T.prototype;
  e.G=function(){if(!this.c&&(this.c=new C,this.f=0,this.A)){var a=this;ib(this.A,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)})}};e.add=function(a,b){this.G();this.O();a=this.N(a);var c=this.c.get(a);c||this.c.set(a,c=[]);c.push(b);this.f+=1;return this};e.remove=function(a){this.G();a=this.N(a);return this.c.M(a)?(this.O(),this.f-=this.c.get(a).length,this.c.remove(a)):!1};e.clear=function(){this.O();this.c=null;this.f=0};e.M=function(a){this.G();a=this.N(a);return this.c.M(a)};
  e.B=function(){this.G();for(var a=this.c.l(),b=this.c.B(),c=[],d=0;d<b.length;d++)for(var f=a[d],g=0;g<f.length;g++)c.push(b[d]);return c};e.l=function(a){this.G();var b=[];if(t(a))this.M(a)&&(b=Ba(b,this.c.get(this.N(a))));else{a=this.c.l();for(var c=0;c<a.length;c++)b=Ba(b,a[c])}return b};e.set=function(a,b){this.G();this.O();a=this.N(a);this.M(a)&&(this.f-=this.c.get(a).length);this.c.set(a,[b]);this.f+=1;return this};e.get=function(a,b){a=a?this.l(a):[];return 0<a.length?String(a[0]):b};
  e.be=function(a,b){this.remove(a);0<b.length&&(this.O(),this.c.set(this.N(a),Ca(b)),this.f+=b.length)};e.toString=function(){if(this.A)return this.A;if(!this.c)return"";for(var a=[],b=this.c.B(),c=0;c<b.length;c++)for(var d=b[c],f=encodeURIComponent(String(d)),d=this.l(d),g=0;g<d.length;g++){var k=f;""!==d[g]&&(k+="="+encodeURIComponent(String(d[g])));a.push(k)}return this.A=a.join("&")};e.O=function(){this.A=null};
  e.clone=function(){var a=new T;a.A=this.A;this.c&&(a.c=this.c.clone(),a.f=this.f);return a};e.N=function(a){a=String(a);this.m&&(a=a.toLowerCase());return a};e.Xa=function(a){a&&!this.m&&(this.G(),this.O(),this.c.forEach(function(a,c){var b=c.toLowerCase();c!=b&&(this.remove(c),this.be(b,a))},this));this.m=a};e.extend=function(a){for(var b=0;b<arguments.length;b++)eb(arguments[b],function(a,b){this.add(b,a)},this)};var pb=function(a,b,c,d,f,g,k,m,v,ha){this.Pc=a;this.D=b||null;this.vb=c||null;this.Ab=d||null;this.Fb=void 0!==f?f:null;this.ub=g||null;this.Cb=k||null;this.fd=m||!1;this.xb=v||null;this.wb=ha||null};
  pb.prototype.toString=function(){var a=new S;a.Ba("https");a.ya("google.com");a.Aa("/cast");var b=[];x(this.Pc,function(a){var c="__castAppId__="+a.appId;a.capabilities&&0<a.capabilities.length&&(c=c+"("+a.capabilities.join(","),c+=")");b.push(c)});this.D&&b.push("__castClientId__="+this.D);this.vb&&b.push("__castAutoJoinPolicy__="+this.vb);this.Ab&&b.push("__castDefaultActionPolicy__="+this.Ab);null!=this.Fb&&b.push("__castLaunchTimeout__="+this.Fb);this.ub&&b.push("__dialAppName__="+this.ub);this.Cb&&
  b.push("__dialPostData__="+this.Cb);this.fd&&b.push("__castInvisibleSender__=true");this.xb&&(b.push("__castBroadcastNamespace__="+this.xb),b.push("__castBroadcastId__="+Math.random()));this.wb&&b.push("__castBroadcastMessage__="+encodeURIComponent(JSON.stringify(this.wb)));a.za(b.join("/"));return a.toString()};var W=function(){this.R={};this.sa={}};W.prototype.Td=function(a,b){var c=this,d=this.R[a];return d?(d.status=b,d.media.forEach(function(a){delete c.sa[a.sessionId+"#"+a.mediaSessionId]}),delete this.R[a],!0):!1};
  W.prototype.Uc=function(a){var b=this,c=this.R[a.sessionId];if(c)return c.statusText=a.statusText,c.namespaces=a.namespaces||[],c.receiver.volume=a.receiver.volume,c;var c=new chrome.cast.b(a.sessionId,a.appId,a.displayName,a.appImages,a.receiver),d;for(d in a)"media"==d?c.media=a.media.map(function(a){a=b.zb(a);a.je=!1;a.oa=!0;return a}):a.hasOwnProperty(d)&&(c[d]=a[d]);return this.R[a.sessionId]=c};
  W.prototype.zb=function(a){var b=a.sessionId+"#"+a.mediaSessionId,c=this.sa[b];c||(c=new chrome.cast.media.a(a.sessionId,a.mediaSessionId),this.sa[b]=c,(b=this.R[a.sessionId])&&b.media.push(c));b=c;b.currentItemId=null;b.loadingItemId=null;b.preloadedItemId=null;for(var d in a)"items"!=d&&a.hasOwnProperty(d)&&("volume"==d?(b.volume.level=a.volume.level,b.volume.muted=a.volume.muted):b[d]=a[d]);d=ia(["idleReason","extendedStatus"]);for(var f=d.next();!f.done;f=d.next())f=f.value,a.hasOwnProperty(f)||
  (b[f]=null);"currentTime"in a&&(b.Qa=Date.now());if(b.playerState==chrome.cast.media.T.IDLE&&null==b.loadingItemId)b.currentItemId=null,b.loadingItemId=null,b.preloadedItemId=null,b.items=null;else if(a.hasOwnProperty("items")&&a.items){d=[];var g=b.items,f={};if(g)for(var k=0;k<g.length;k++)f[g[k].itemId]=k;a=ia(a.items);for(g=a.next();!g.done;g=a.next()){g=g.value;if(!g.media){var k=g.itemId,m=b.items?b.items[f[k]]:null;m&&m.media?g.media=m.media:k==b.currentItemId&&b.media&&(g.media=b.media)}d.push(qb(g))}b.items=
  d}return c};W.prototype.Qd=function(a){delete this.sa[a.sessionId+"#"+a.mediaSessionId];var b=this.R[a.sessionId];b&&(a=b.media.indexOf(a),-1!=a&&b.media.splice(a,1))};var qb=function(a){var b=new chrome.cast.media.kb(a.media),c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b};var X=function(){this.Y=new Q(this);this.j=null;this.xa=new W;this.wa=0;this.Ka=new E;this.da=new C;this.Jb=!1;this.W=new C;this.ra=new C;this.va=[];this.Sc=this.Tc.bind(this);this.I=null;this.qa=0;this.K=null;this.Rc=new Za(this.Wd,200,this);this.Bb=null},rb=function(a,b){a&&a(b)};e=X.prototype;e.ka=function(a,b,c){return new gb(this.wa,a,b,c)};
  e.ca=function(a,b,c){b&&this.Ka.Nc(b);void 0!==c?a.sequenceNumber=c:(a.sequenceNumber=this.wa,this.wa=(this.wa+1)%9007199254740992);c=this.Y.Sb(a);b&&c&&(a=this.Ka.Mb(a.sequenceNumber),b=new chrome.cast.Error(chrome.cast.u.INVALID_PARAMETER,c),(a=a.Na)&&a(b))};
  e.pa=function(a,b){var c=this;y=this;this.j||(this.j=a,a.invisibleSender||(a=new PresentationRequest(this.ma()),a.getAvailability().then(function(a){a.onchange=function(){c.Jb=!!a.value;c.j.receiverListener(a.value?chrome.cast.ia.AVAILABLE:chrome.cast.ia.UNAVAILABLE)};a.onchange()},function(){c.j.receiverListener(chrome.cast.ia.AVAILABLE)}),a.onconnectionavailable=function(a){c.ta(a.connection)},this.Bb=(n.navigator||null).presentation.defaultRequest=a,a.reconnect(chrome.cast.Yb).then(function(a){c.ta(a)},
  ja)));b&&b(void 0)};e.Ya=function(a){a.navigator.presentation.defaultRequest=this.Bb};e.ta=function(a,b){b=void 0===b?null:b;var c=this;a.onclose=function(a){c.I=null;switch(a.reason){case "closed":c.sd();break;case "error":b&&(a=new chrome.cast.Error(chrome.cast.u.SESSION_ERROR),b&&b(a))}};a.onterminate=function(){c.xd()};"connected"==a.state?this.Y.connect(a):a.onconnect=function(){c.Y.connect(a)}};
  e.Qc=function(a,b){"urn:x-cast:com.google.cast.media"!=a?Y.error("Unsupported broadcast message namespace - "+a):sb.has(b.type)?this.Jb&&(this.K?(b.sessionId=this.K,this.Wa(null,b.type,b,function(){Y.info("Send Broadcast directly succeeded")},function(a){Y.error("Send Broadcast directly failed with code "+a.code)})):this.Rc.Vc(this.ma(void 0,a,b))):Y.error("Unsupported broadcast message type - "+b.type)};
  e.Wd=function(a){Y.info("Broadcast request "+a);(a=(new PresentationRequest(a)).getAvailability())?a.then(function(){Y.info("Broadcast succeeded")},function(){Y.ge("Broadcast failed")}):Y.error("presentationRequest.getAvailability return undefined")};
  e.requestSession=function(a,b,c){var d=this;this.I?rb(b,new chrome.cast.Error(chrome.cast.u.INVALID_PARAMETER,"Already requesting session")):(c=this.ma(c),this.I=a,(new PresentationRequest(c.toString())).start().then(function(a){d.ta(a,b)}).catch(function(a){d.I=null;a=new chrome.cast.Error("AbortError"==a.name||"NotAllowedError"==a.name?chrome.cast.u.CANCEL:chrome.cast.u.SESSION_ERROR);b&&b(a)}))};
  e.ma=function(a,b,c){var d=null,f=null,g=a||this.j.sessionRequest,k=g.dialRequest;k&&(d=k.appName,(f=k.launchParameter)&&!f.match(tb)&&(f=cb(f)));var m=[];m.push({appId:g.appId,capabilities:g.capabilities});a||x(this.j.additionalSessionRequests,function(a){m.push({appId:a.appId,capabilities:a.capabilities})});return(new pb(m,this.Y.D,this.j.autoJoinPolicy,this.j.defaultActionPolicy,g.requestSessionTimeout,d,f,this.j.invisibleSender,b,c)).toString()};
  e.Qb=function(a,b,c,d){var f=this;this.qa++;this.Wa(null,b,a,function(a){f.qa--;a.oa=!0;c&&c(a)},function(a){f.qa--;d(a)},chrome.cast.media.timeout.load)};e.i=function(a,b,c,d,f,g){var k=this;this.Wa(a,b,c,function(a){k.yb(a);d&&d(void 0)},f,g)};e.Wa=function(a,b,c,d,f,g){c.type=b;null!=a&&(c.mediaSessionId=a.mediaSessionId,c.sessionId=a.sessionId);this.Pb(c,function(a){a.status&&1==a.status.length?d&&d(a.status[0]):(a=new chrome.cast.Error(chrome.cast.u.SESSION_ERROR),f&&f(a))},f,g)};
  e.setReceiverVolume=function(a,b,c,d){b.sessionId=a;this.ca(new P("v2_message",b,void 0,chrome.cast.timeout.setReceiverVolume),this.ka(c,d,chrome.cast.timeout.sendCustomMessage))};e.Ua=function(a){var b=this;(new PresentationRequest(this.ma())).reconnect(chrome.cast.nc+a).then(function(a){b.ta(a)},ja)};e.leaveSession=function(a,b,c){this.ca(new P("leave_session",a,void 0,chrome.cast.timeout.leaveSession),this.ka(b,c,chrome.cast.timeout.leaveSession))};
  e.Vd=function(a,b,c){this.ca(new P("app_message",a,void 0,chrome.cast.timeout.sendCustomMessage),this.ka(b,c,chrome.cast.timeout.sendCustomMessage))};e.Pb=function(a,b,c,d){this.ca(new P("v2_message",a,void 0,d),this.ka(b,c,d))};var ub=function(a,b,c){var d=a.get(b);d||(d=new O,a.set(b,d));d.add(c)};e=X.prototype;e.Oc=function(a,b){ub(this.da,a,b)};e.Ud=function(a,b){(a=this.da.get(a))&&a.remove(b)};e.Ga=function(a){this.va.push(a)};e.Sa=function(a){a=this.va.indexOf(a);0<=a&&this.va.splice(a,1)};
  e.Kc=function(a,b,c){var d=this.W.get(a);d||(d=new C,this.W.set(a,d));a=d.get(b);a||(a=new O,d.set(b,a));a.add(c)};e.Pd=function(a,b,c){(a=this.W.get(a))&&(b=a.get(b))&&b.remove(c)};e.Fa=function(a,b){ub(this.ra,a,b)};e.Ra=function(a,b){(a=this.ra.get(a))&&a.remove(b)};e.Lc=function(a,b){-1==a.ea.indexOf(b)&&a.ea.push(b)};e.Rd=function(a,b){b=a.ea.indexOf(b);-1!=b&&a.ea.splice(b,1)};e.gd=function(a){var b=this.Ka.Mb(a.sequenceNumber);b&&(b="error"==a.type?b.Na:b.ce)&&b(a.message)};
  e.hd=function(a){return a.playerState!=chrome.cast.media.T.IDLE||null!=a.loadingItemId};e.yb=function(a){if(a.oa){var b=this.hd(a);a.ea.forEach(function(a){a(b)});b||this.xa.Qd(a)}else if(!(0<this.qa)){a.oa=!0;var c=this.ra.get(a.sessionId);c&&B(c.v(),function(b){b(a)})}};e.Tc=function(a){return this.xa.zb(a)};e.od=function(a){switch(a.type){case "new_session":case "update_session":a.message=this.xa.Uc(a.message);break;case "v2_message":(a=a.message)&&"MEDIA_STATUS"==a.type&&a.status&&(a.status=a.status.map(this.Sc))}};
  e.Nb=function(a){if(this.K){var b=this.K;this.K=null;this.Y.disconnect();var c=a!=chrome.cast.U.STOPPED;this.xa.Td(b,a)&&(this.W.remove(b),this.ra.remove(b),a=this.da.get(b))&&(this.da.remove(b),B(a.v(),function(a){a(c)}))}};
  e.onMessage=function(a){this.od(a);this.gd(a);var b=a.message;if(b)switch(a.type){case "receiver_action":this.wd(b);break;case "new_session":this.vd(b);break;case "update_session":this.Ad(b);break;case "app_message":this.qd(b);break;case "v2_message":this.Bd(b);break;case "custom_dial_launch":this.rd(a.sequenceNumber,b)}};e.vd=function(a){this.K=a.sessionId;this.I?(this.I(a),this.I=null):this.j&&this.j.sessionListener(a)};e.Ad=function(a){(a=this.da.get(a.sessionId))&&B(a.v(),function(a){a(!0)})};
  e.wd=function(a){this.va.forEach(function(b){b(a.receiver,a.action)})};e.sd=function(){this.Nb(chrome.cast.U.DISCONNECTED)};e.xd=function(){this.Nb(chrome.cast.U.STOPPED)};e.qd=function(a){var b=this.W.get(a.sessionId);b&&(b=b.get(a.namespaceName))&&B(b.v(),function(b){b(a.namespaceName,a.message)})};e.Bd=function(a){"MEDIA_STATUS"==a.type&&a.status.forEach(this.yb.bind(this))};e.Va=function(a,b){this.ca(new P("custom_dial_launch",b,void 0,chrome.cast.timeout.sendCustomMessage),null,a)};
  e.rd=function(a,b){var c=this;this.j.customDialLaunchCallback?this.j.customDialLaunchCallback(b).then(function(b){c.Va(a,b)},function(){c.Va(a)}):this.Va(a)};var tb=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,sb=new Set(["PRECACHE"]),Z=new X,Y=Ma("mr.cast.Api");chrome.cast.pa=function(a,b,c){Z.pa(a,b,c)};p("chrome.cast.initialize",chrome.cast.pa,void 0);chrome.cast.dd=function(a,b,c){var d=new X;d.pa(a,b,c);return d};p("chrome.cast.initializeWithContext",chrome.cast.dd,void 0);chrome.cast.Ya=function(a){Z.Ya(a)};p("chrome.cast.setPageContext",chrome.cast.Ya,void 0);chrome.cast.requestSession=function(a,b,c){Z.requestSession(a,b,c)};p("chrome.cast.requestSession",chrome.cast.requestSession,void 0);
  chrome.cast.Cd=function(a){Z.Qc("urn:x-cast:com.google.cast.media",new chrome.cast.media.pc(a))};p("chrome.cast.precache",chrome.cast.Cd,void 0);chrome.cast.Ua=function(a){chrome.cast.Ob(Z,a)};p("chrome.cast.requestSessionById",chrome.cast.Ua,void 0);chrome.cast.Ob=function(a,b){a.Ua(b)};p("chrome.cast.requestSessionByIdWithContext",chrome.cast.Ob,void 0);chrome.cast.Ga=function(a){Z.Ga(a)};p("chrome.cast.addReceiverActionListener",chrome.cast.Ga,void 0);chrome.cast.Sa=function(a){Z.Sa(a)};
  p("chrome.cast.removeReceiverActionListener",chrome.cast.Sa,void 0);chrome.cast.nd=function(){};p("chrome.cast.logMessage",chrome.cast.nd,void 0);chrome.cast.Xd=function(a,b){b()};p("chrome.cast.setCustomReceivers",chrome.cast.Xd,void 0);chrome.cast.Yd=function(a,b){b()};p("chrome.cast.setReceiverDisplayStatus",chrome.cast.Yd,void 0);chrome.cast.unescape=function(a){return-1!=a.indexOf("&")?"document"in n?ya(a):za(a):a};p("chrome.cast.unescape",chrome.cast.unescape,void 0);
  chrome.cast.isAvailable=!1;p("chrome.cast.isAvailable",chrome.cast.isAvailable,void 0);chrome.cast.Vb=!1;chrome.cast.cb=function(){if(!chrome.cast.Vb){chrome.cast.Vb=!0;chrome.cast.isAvailable=!0;var a=window.__onGCastApiAvailable;a&&"function"==typeof a&&a(!0)}};"complete"==document.readyState?chrome.cast.cb():(window.addEventListener("load",chrome.cast.cb,!1),window.addEventListener("DOMContentLoaded",chrome.cast.cb,!1));}).call(window);
  (function() {'use strict';var h,k=this,l=function(a,b,c){a=a.split(".");c=c||k;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}:c[d]=b},m=function(){},aa=function(a){a.wa=void 0;a.ub=function(){return a.wa?a.wa:a.wa=new a}},n=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";
  if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},ba=function(a){var b=n(a);return"array"==b||"object"==b&&"number"==typeof a.length},p=function(a){return"string"==
  typeof a},ca=function(a,b,c){return a.call.apply(a.bind,arguments)},da=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}},r=function(a,b,c){r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ca:da;return r.apply(null,arguments)},ea=Date.now||function(){return+new Date},
  t=function(a,b){function c(){}c.prototype=b.prototype;a.Fa=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.rc=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};var fa=fa||{};var u={};l("chrome.cast.games",u,void 0);u.ma="urn:x-cast:com.google.cast.games";u.NAMESPACE=u.ma;u.na="1.0.0";u.SDK_VERSION_NUMBER=u.na;u.GameplayState={UNKNOWN:0,LOADING:1,RUNNING:2,PAUSED:3,SHOWING_INFO_SCREEN:4};u.LobbyState={UNKNOWN:0,OPEN:1,CLOSED:2};u.GameManagerErrorCode={INVALID_REQUEST:"invalid_request",NOT_ALLOWED:"not_allowed",INCORRECT_VERSION:"incorrect_version",TOO_MANY_PLAYERS:"too_many_players",oc:"cast_error"};u.tc={};var ga=function(a){switch(a){case 1:return"invalid_request";case 2:return"not_allowed";case 3:return"incorrect_version";case 4:return"too_many_players";default:throw Error("Cannot get error code for status code "+a);}};l("chrome.cast.games.internal.GameManagerMessage",function(){this.type=1;this.requestId=0;this.playerId="";this.playerToken=null;this.statusCode=0;this.errorDescription="";this.lobbyState=this.gameplayState=0;this.players=[];this.gameData=null;this.gameStatusText="";this.extraMessageData=this.gameManagerConfig=null},void 0);l("chrome.cast.games.internal.GameManagerMessageType",{UNKNOWN:0,GAME_MANAGER_PROCESSED_RESULT:1,GAME_MESSAGE:2},void 0);var w={UNKNOWN:0,DROPPED:1,QUIT:2,AVAILABLE:3,READY:4,IDLE:5,PLAYING:6};u.PlayerState=w;var ha=function(){this.Na=1E3*Math.floor(1E5*Math.random())};aa(ha);ha.prototype.yb=function(){var a=this.Na++;0==a&&(a=this.Na++);return a};var x={UNKNOWN:0,Ya:1,cb:2,Za:3,ab:4,bb:5,pc:6,GAME_MESSAGE:7,qc:1100};l("chrome.cast.games.internal.GameManagerRequestType",x,void 0);var ia=function(){this.type=0;this.requestId=ha.ub().yb();this.playerId="";this.extraMessageData=this.playerToken=null},ja=function(a){switch(a){case w.QUIT:return x.bb;case w.AVAILABLE:return x.Ya;case w.READY:return x.cb;case w.IDLE:return x.Za;case w.PLAYING:return x.ab;default:throw Error("No mapping to a game manager request type for player state: "+a);}};var y=function(a,b,c,d){this.errorCode=a;this.errorDescription=b;this.result=c;this.castError=d};u.GameManagerError=y;var ka=function(a,b,c){this.playerId=a;this.requestId=b;this.extraMessageData=c};u.GameManagerResult=ka;var la=function(a){return/^\s*$/.test(a)?!1:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""))},ma=function(a){a=String(a);if(la(a))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);};var A=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,A);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};t(A,Error);A.prototype.name="CustomError";var na=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")},oa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},pa=function(a,b){return a<b?-1:a>b?1:0};var qa=function(a,b){b.unshift(a);A.call(this,na.apply(null,b));b.shift()};t(qa,A);qa.prototype.name="AssertionError";var ra=function(a,b){throw new qa("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var sa=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(p(a))return p(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};var ta=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return!0;return!1},ua="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),va=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<ua.length;f++)c=ua[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var B;a:{var wa=k.navigator;if(wa){var xa=wa.userAgent;if(xa){B=xa;break a}}B=""};var ya="StopIteration"in k?k.StopIteration:{message:"StopIteration",stack:""},za=function(){};za.prototype.next=function(){throw ya;};za.prototype.eb=function(){return this};var C=function(a,b){this.f={};this.a=[];this.X=this.o=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)};C.prototype.C=function(){this.H();for(var a=[],b=0;b<this.a.length;b++)a.push(this.f[this.a[b]]);return a};C.prototype.ta=function(){this.H();return this.a.concat()};C.prototype.qa=function(a){return D(this.f,a)};
  C.prototype.l=function(a,b){if(this===a)return!0;if(this.o!=a.o)return!1;b=b||Aa;this.H();for(var c,d=0;c=this.a[d];d++)if(!b(this.get(c),a.get(c)))return!1;return!0};var Aa=function(a,b){return a===b};h=C.prototype;h.clear=function(){this.f={};this.X=this.o=this.a.length=0};h.remove=function(a){return D(this.f,a)?(delete this.f[a],this.o--,this.X++,this.a.length>2*this.o&&this.H(),!0):!1};
  h.H=function(){if(this.o!=this.a.length){for(var a=0,b=0;a<this.a.length;){var c=this.a[a];D(this.f,c)&&(this.a[b++]=c);a++}this.a.length=b}if(this.o!=this.a.length){for(var d={},b=a=0;a<this.a.length;)c=this.a[a],D(d,c)||(this.a[b++]=c,d[c]=1),a++;this.a.length=b}};h.get=function(a,b){return D(this.f,a)?this.f[a]:b};h.set=function(a,b){D(this.f,a)||(this.o++,this.a.push(a),this.X++);this.f[a]=b};
  h.addAll=function(a){var b;if(a instanceof C)b=a.ta(),a=a.C();else{b=[];var c=0,d;for(d in a)b[c++]=d;c=[];d=0;for(var e in a)c[d++]=a[e];a=c}for(e=0;e<b.length;e++)this.set(b[e],a[e])};h.forEach=function(a,b){for(var c=this.ta(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};h.clone=function(){return new C(this)};
  h.eb=function(a){this.H();var b=0,c=this.X,d=this,e=new za;e.next=function(){if(c!=d.X)throw Error("The map has changed since the iterator was created");if(b>=d.a.length)throw ya;var e=d.a[b++];return a?e:d.f[e]};return e};var D=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Ba=function(a){Ba[" "](a);return a};Ba[" "]=m;var Ca=function(a,b,c,d){d=d?d(b):b;return Object.prototype.hasOwnProperty.call(a,d)?a[d]:a[d]=c(b)};var Da=-1!=B.indexOf("Opera"),E=-1!=B.indexOf("Trident")||-1!=B.indexOf("MSIE"),Ea=-1!=B.indexOf("Edge"),F=-1!=B.indexOf("Gecko")&&!(-1!=B.toLowerCase().indexOf("webkit")&&-1==B.indexOf("Edge"))&&!(-1!=B.indexOf("Trident")||-1!=B.indexOf("MSIE"))&&-1==B.indexOf("Edge"),G=-1!=B.toLowerCase().indexOf("webkit")&&-1==B.indexOf("Edge"),Fa=function(){var a=k.document;return a?a.documentMode:void 0},Ga;
  a:{var Ha="",Ia=function(){var a=B;if(F)return/rv\:([^\);]+)(\)|;)/.exec(a);if(Ea)return/Edge\/([\d\.]+)/.exec(a);if(E)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(G)return/WebKit\/(\S+)/.exec(a);if(Da)return/(?:Version)[ \/]?(\S+)/.exec(a)}();Ia&&(Ha=Ia?Ia[1]:"");if(E){var Ja=Fa();if(null!=Ja&&Ja>parseFloat(Ha)){Ga=String(Ja);break a}}Ga=Ha}
  var Ka=Ga,La={},I=function(a){return Ca(La,a,function(){for(var b=0,c=oa(String(Ka)).split("."),d=oa(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",q=d[f]||"";do{g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];q=/(\d*)(\D*)(.*)/.exec(q)||["","","",""];if(0==g[0].length&&0==q[0].length)break;b=pa(0==g[1].length?0:parseInt(g[1],10),0==q[1].length?0:parseInt(q[1],10))||pa(0==g[2].length,0==q[2].length)||pa(g[2],q[2]);g=g[3];q=q[3]}while(0==b)}return 0<=b})},Ma;
  var Na=k.document;Ma=Na&&E?Fa()||("CSS1Compat"==Na.compatMode?parseInt(Ka,10):5):void 0;var J=function(a,b,c,d,e){this.reset(a,b,c,d,e)};J.prototype.Ha=null;var Oa=0;J.prototype.reset=function(a,b,c,d,e){"number"==typeof e||Oa++;d||ea();this.P=a;this.Qb=b;delete this.Ha};J.prototype.ic=function(a){this.Ha=a};J.prototype.Va=function(a){this.P=a};J.prototype.getMessage=function(){return this.Qb};var Pa=function(a){this.v=a;this.Ka=this.pa=this.P=this.ia=null},Qa=function(a,b){this.name=a;this.value=b};Qa.prototype.toString=function(){return this.name};var Ra=new Qa("SEVERE",1E3),Sa=new Qa("INFO",800),Ta=new Qa("CONFIG",700);h=Pa.prototype;h.getName=function(){return this.v};h.getParent=function(){return this.ia};h.getChildren=function(){this.pa||(this.pa={});return this.pa};h.Va=function(a){this.P=a};
  h.Ia=function(){if(this.P)return this.P;if(this.ia)return this.ia.Ia();ra("Root logger has no level set.");return null};h.Ob=function(a){return a.value>=this.Ia().value};h.log=function(a,b,c){this.Ob(a)&&("function"==n(b)&&(b=b()),this.mb(this.wb(a,b,c)))};h.wb=function(a,b,c){a=new J(a,String(b),this.v);c&&a.ic(c);return a};h.lc=function(a,b){this.log(Ra,a,b)};h.info=function(a,b){this.log(Sa,a,b)};h.config=function(a,b){this.log(Ta,a,b)};
  h.mb=function(a){var b="log:"+a.getMessage();k.console&&(k.console.timeStamp?k.console.timeStamp(b):k.console.markTimeline&&k.console.markTimeline(b));k.msWriteProfilerMark&&k.msWriteProfilerMark(b);for(b=this;b;)b.jb(a),b=b.getParent()};h.jb=function(a){if(this.Ka)for(var b=0,c;c=this.Ka[b];b++)c(a)};h.jc=function(a){this.ia=a};h.gb=function(a,b){this.getChildren()[a]=b};
  var Ua={},Va=null,Wa=function(a){Va||(Va=new Pa(""),Ua[""]=Va,Va.Va(Ta));var b;if(!(b=Ua[a])){b=new Pa(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Wa(a.substr(0,c));c.gb(d,b);b.jc(c);Ua[a]=b}return b};var K=function(a){this.ka=a;this.za=Wa("chrome.cast.games.internal.GameManagerSession");this.fa=null;this.Ea=new C;this.u=new C;this.V=new C;this.U=new C;this.Ca=new C;this.ya=this.ja=this.la=null;this.ka.addMessageListener(this.da(),r(this.Oa,this))};h=K.prototype;h.I=function(){this.ka.removeMessageListener(u.ma,r(this.Oa,this));for(var a=this.V.ta(),b=0;b<a.length;b++)this.F(a[b]);this.ja=this.la=null};h.da=function(){return u.ma};
  h.Vb=function(a,b){var c=new ia;c.type=1100;if(!c.requestId)throw Error("Missing requestId field from request.");if(!a)throw Error("No success callback provided.");this.fa=a;a=m;b&&(this.u.set(c.requestId,b),a=function(a){b(new y("cast_error",a.description,null,a));this.F(c.requestId)}.bind(this));var d=k.setTimeout(r(this.Pa,this,c.requestId),6E4);this.V.set(c.requestId,d);this.U.set(c.requestId,c.type);this.ka.sendMessage(this.da(),c,m,a)};
  h.Da=function(a,b,c,d,e){if(0==b)throw Error("Cannot send an UNKNOWN game manager request.");if(!a&&1!=b&&1100!=b)throw Error("Missing player ID for game manager request type:"+b);var f=new ia;f.type=b;f.playerId=a?a:"";f.playerToken=this.Ca.get(f.playerId,null);f.extraMessageData=c;if(!f.requestId)throw Error("Missing requestId field from request");d&&this.Ea.set(f.requestId,d);a=m;e&&(this.u.set(f.requestId,e),a=function(a){e(new y("cast_error",a.description,null,a));this.F(f.requestId)}.bind(this));
  7!=f.type&&(b=k.setTimeout(r(this.Pa,this,f.requestId),6E4),this.V.set(f.requestId,b));this.U.set(f.requestId,f.type);this.ka.sendMessage(this.da(),f,m,a)};h.kc=function(a,b){this.la=a;this.ja=b};h.Pb=function(a){return this.Ca.qa(a)};h.g=function(){return this.ya};K.prototype.getLastUsedPlayerId=K.prototype.g;h=K.prototype;
  h.Oa=function(a,b){if(a!=this.da())throw Error("Incoming message has unexpected namespace: "+a);a=ma(b);b=a.type;if(1!=b&&2!=b)(a=this.za)&&a.lc("Ignoring message, type is not GAME_MANAGER_PROCESSED_RESULT or  GAME_MESSAGE Type: "+b,void 0);else if(a.gameManagerConfig&&a.gameManagerConfig.version!=u.na&&(a.statusCode=3,a.errorDescription="Incorrect version of the GameManager SDK. Sender: "+u.na+"Receiver: "+a.gameManagerConfig.version),0!=a.statusCode)this.Rb(a);else{b=a.playerId;var c=a.playerToken;
  b&&c&&this.Ca.set(b,c);this.la&&this.la(a);a.requestId&&(this.ya=b||this.ya,this.Tb(a));this.ja&&this.ja()}};h.Rb=function(a){var b=a.requestId;if(this.u.qa(b)){var c=this.u.get(b),d=new ka(a.playerId,a.requestId,a.extraMessageData),e=ga(a.statusCode);c(new y(e,a.errorDescription,d,null));this.F(b)}else(a=this.za)&&a.info("Ignoring error message, no callback for request ID: "+b,void 0)};
  h.Tb=function(a){var b=a.requestId,c=this.U.get(b),d=this.Ea.get(a.requestId);this.F(b);if(1100==c){if(!this.fa)throw Error("Got a response for a GET_GAME_MANAGER_CONFIG request but no initialization callback was set.");this.fa();this.fa=null}else d?d(new ka(a.playerId,a.requestId,a.extraMessageData)):(a=this.za)&&a.info("Ignoring message, no callback for request ID: "+b,void 0)};
  h.Pa=function(a){var b=this.U.get(a),b="Did not receive a response to player request within a time period. request ID="+a+" request type ="+b;if(this.u.qa(a)){var c=this.u.get(a),d=new fa.Error(fa.ErrorCode.TIMEOUT,b,null);c(new y("cast_error",b,null,d));this.F(a)}else throw Error(b);};h.F=function(a){this.Ea.remove(a);this.u.remove(a);var b=this.V.get(a);k.clearTimeout(b);this.V.remove(a);this.U.remove(a)};var L=function(){this.J=this.J;this.ha=this.ha};L.prototype.J=!1;L.prototype.isDisposed=function(){return this.J};L.prototype.I=function(){this.J||(this.J=!0,this.sa())};L.prototype.sa=function(){if(this.ha)for(;this.ha.length;)this.ha.shift()()};var M=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.A=!1;this.Sa=!0};M.prototype.stopPropagation=function(){this.A=!0};M.prototype.preventDefault=function(){this.defaultPrevented=!0;this.Sa=!1};var Xa=!E||9<=Number(Ma),Ya=E&&!I("9");!G||I("528");F&&I("1.9b")||E&&I("8")||Da&&I("9.5")||G&&I("528");F&&!I("8")||E&&I("9");var N=function(a,b){M.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.L=this.state=null;a&&this.init(a,b)};t(N,M);
  N.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;if(b=a.relatedTarget){if(F){var e;a:{try{Ba(b.nodeName);e=!0;break a}catch(f){}e=!1}e||(b=null)}}else"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;null===d?(this.offsetX=G||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=G||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,
  this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0):(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.key=a.key||"";this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.state=a.state;this.L=a;a.defaultPrevented&&
  this.preventDefault()};N.prototype.stopPropagation=function(){N.Fa.stopPropagation.call(this);this.L.stopPropagation?this.L.stopPropagation():this.L.cancelBubble=!0};N.prototype.preventDefault=function(){N.Fa.preventDefault.call(this);var a=this.L;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Ya)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Za="closure_listenable_"+(1E6*Math.random()|0),$a=0;var ab=function(a,b,c,d,e,f){this.listener=a;this.proxy=b;this.src=c;this.type=d;this.capture=!!e;this.ea=f;this.key=++$a;this.removed=this.aa=!1};ab.prototype.ga=function(){this.removed=!0;this.ea=this.src=this.proxy=this.listener=null};var bb=function(a){this.src=a;this.c={};this.W=0};h=bb.prototype;h.add=function(a,b,c,d,e){var f=a.toString();a=this.c[f];a||(a=this.c[f]=[],this.W++);var g=cb(a,b,d,e);-1<g?(b=a[g],c||(b.aa=!1)):(b=new ab(b,null,this.src,f,!!d,e),b.aa=c,a.push(b));return b};h.remove=function(a,b,c,d){a=a.toString();if(!(a in this.c))return!1;var e=this.c[a];b=cb(e,b,c,d);return-1<b?(e[b].ga(),Array.prototype.splice.call(e,b,1),0==e.length&&(delete this.c[a],this.W--),!0):!1};
  h.Ra=function(a){var b=a.type;if(!(b in this.c))return!1;var c=this.c[b],d=sa(c,a),e;(e=0<=d)&&Array.prototype.splice.call(c,d,1);e&&(a.ga(),0==this.c[b].length&&(delete this.c[b],this.W--));return e};h.removeAll=function(a){a=a&&a.toString();var b=0,c;for(c in this.c)if(!a||c==a){for(var d=this.c[c],e=0;e<d.length;e++)++b,d[e].ga();delete this.c[c];this.W--}return b};h.ua=function(a,b,c,d){a=this.c[a.toString()];var e=-1;a&&(e=cb(a,b,c,d));return-1<e?a[e]:null};
  h.hasListener=function(a,b){var c=void 0!==a,d=c?a.toString():"",e=void 0!==b;return ta(this.c,function(a){for(var f=0;f<a.length;++f)if(!(c&&a[f].type!=d||e&&a[f].capture!=b))return!0;return!1})};var cb=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.removed&&f.listener==b&&f.capture==!!c&&f.ea==d)return e}return-1};var db="closure_lm_"+(1E6*Math.random()|0),eb={},fb=0,gb=function(a,b,c,d,e){if("array"==n(b)){for(var f=0;f<b.length;f++)gb(a,b[f],c,d,e);return null}c=hb(c);if(a&&a[Za])a=a.listen(b,c,d,e);else{if(!b)throw Error("Invalid event type");var f=!!d,g=ib(a);g||(a[db]=g=new bb(a));c=g.add(b,c,!1,d,e);if(!c.proxy){d=jb();c.proxy=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,f);else if(a.attachEvent)a.attachEvent(kb(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");
  fb++}a=c}return a},jb=function(){var a=lb,b=Xa?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b},mb=function(a,b,c,d,e){if("array"==n(b)){for(var f=0;f<b.length;f++)mb(a,b[f],c,d,e);return null}c=hb(c);if(a&&a[Za])return a.Wa(b,c,d,e);if(!a)return!1;if(a=ib(a))if(b=a.ua(b,c,!!d,e))return nb(b);return!1},nb=function(a){if("number"==typeof a||!a||a.removed)return!1;var b=a.src;if(b&&b[Za])return b.Xa(a);var c=a.type,d=a.proxy;b.removeEventListener?
  b.removeEventListener(c,d,a.capture):b.detachEvent&&b.detachEvent(kb(c),d);fb--;(c=ib(b))?(c.Ra(a),0==c.W&&(c.src=null,b[db]=null)):a.ga();return!0},kb=function(a){return a in eb?eb[a]:eb[a]="on"+a},pb=function(a,b,c,d){var e=!0;if(a=ib(a))if(b=a.c[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.capture==c&&!f.removed&&(f=ob(f,d),e=e&&!1!==f)}return e},ob=function(a,b){var c=a.listener,d=a.ea||a.src;a.aa&&nb(a);return c.call(d,b)},lb=function(a,b){if(a.removed)return!0;if(!Xa){if(!b)a:{b=
  ["window","event"];for(var c=k,d;d=b.shift();)if(null!=c[d])c=c[d];else{b=null;break a}b=c}d=b;b=new N(d,this);c=!0;if(!(0>d.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(g){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.currentTarget;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;!b.A&&0<=e;e--){b.currentTarget=d[e];var f=pb(d[e],a,!0,b),c=c&&f}for(e=0;!b.A&&e<d.length;e++)b.currentTarget=d[e],f=pb(d[e],a,!1,b),c=c&&f}return c}return ob(a,
  new N(b,this))},ib=function(a){a=a[db];return a instanceof bb?a:null},qb="__closure_events_fn_"+(1E9*Math.random()>>>0),hb=function(a){if("function"==n(a))return a;a[qb]||(a[qb]=function(b){return a.handleEvent(b)});return a[qb]};var O=function(){L.call(this);this.s=new bb(this);this.fb=this;this.Ba=null};t(O,L);O.prototype[Za]=!0;h=O.prototype;h.addEventListener=function(a,b,c,d){gb(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){mb(this,a,b,c,d)};
  h.dispatchEvent=function(a){var b,c=this.Ba;if(c)for(b=[];c;c=c.Ba)b.push(c);var c=this.fb,d=a.type||a;if(p(a))a=new M(a,c);else if(a instanceof M)a.target=a.target||c;else{var e=a;a=new M(d,c);va(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.A&&0<=g;g--)f=a.currentTarget=b[g],e=f.ba(d,!0,a)&&e;a.A||(f=a.currentTarget=c,e=f.ba(d,!0,a)&&e,a.A||(e=f.ba(d,!1,a)&&e));if(b)for(g=0;!a.A&&g<b.length;g++)f=a.currentTarget=b[g],e=f.ba(d,!1,a)&&e;return e};
  h.sa=function(){O.Fa.sa.call(this);this.Ub();this.Ba=null};h.listen=function(a,b,c,d){return this.s.add(String(a),b,!1,c,d)};h.Wa=function(a,b,c,d){return this.s.remove(String(a),b,c,d)};h.Xa=function(a){return this.s.Ra(a)};h.Ub=function(a){return this.s?this.s.removeAll(a):0};
  h.ba=function(a,b,c){a=this.s.c[String(a)];if(!a)return!0;a=a.concat();for(var d=!0,e=0;e<a.length;++e){var f=a[e];if(f&&!f.removed&&f.capture==b){var g=f.listener,q=f.ea||f.src;f.aa&&this.Xa(f);d=!1!==g.call(q,c)&&d}}return d&&0!=c.Sa};h.ua=function(a,b,c,d){return this.s.ua(String(a),b,c,d)};h.hasListener=function(a,b){return this.s.hasListener(void 0!==a?String(a):void 0,b)};var rb,Q=function(a,b,c,d){this.ra=a;this.v=b;this.Ga=c;this.Qa=d};Q.prototype.getName=function(){return this.v};Q.prototype.Lb=function(){return!this.v||"[object Object]"==this.ra};Q.prototype.mc=function(){var a=[this.ra?sb(this.ra)+".":"",this.v?sb(tb(this.v)):"anonymous",this.Ga?" [as "+sb(tb(this.Ga))+"]":""];this.Qa&&(a.push(" at "),a.push(sb(this.Qa)));return a.join("")};
  var ub=/^    at(?: (?:((?:new )?(?:\[object Object\]|[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*))\.)?((?:new )?(?:[a-zA-Z_$][\w$]*|<anonymous>))(?: \[as ([a-zA-Z_$][\w$]*)\])?)? (?:\(unknown source\)|\(native\)|\((.+)\)|(.+))$/,vb=/^([a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*)?(\(.*\))?@(?::0|((?:http|https|file):\/\/[^\s)]+|javascript:.*))$/,wb=/^(?:(?:([a-zA-Z_$][\w$]*)|<anonymous function(?:\: (?:([a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*)\.)?([a-zA-Z_$][\w$]*))?>)(\(.*\)))?@((?:http|https|file):\/\/[^\s)]+|javascript:.*)?$/,
  xb=/^function ([a-zA-Z_$][\w$]*)/,yb=/^   at ([a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*(?:\s+\w+)*)\s*\((eval code:[^)]*|Unknown script code:[^)]*|((?:http|https|file):\/\/[^\s)]+|javascript:.*))\)?$/,zb=function(){for(var a=[],b=arguments.callee.caller,c=0;b&&20>c;){var d=Function.prototype.toString.call(b).match(xb);a.push(new Q("",d?d[1]:"","",""));try{b=b.caller}catch(e){break}c++}return a},Ab=function(a){var b=a.match(ub);return b?new Q(b[1]||"",b[2]||"",b[3]||"",b[4]||b[5]||b[6]||""):5E5<a.length?
  null:(b=a.match(vb))?new Q("",b[1]||"","",b[3]||""):(b=a.match(wb))?new Q(b[2]||"",b[1]||b[3]||"","",b[5]||""):(b=a.match(yb))?new Q("",b[1]||"","",b[2]||""):null},tb=function(a){return rb?rb(a):a},sb=function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},Bb=function(){var a=Error();if(a.stack)return a.stack;try{null.x()}catch(b){return b.stack}return""};l("setDeobfuscateFunctionName",function(a){rb=a},void 0);var R=function(a,b){this.Nb=!0;this.message=(a?a:"")+(a&&b?"\n":"")+(b?b:"");if(b=Bb()){if("array"==n(b))for(var c=[],d=0;d<b.length;d++){var e=b[d],f=e.getFunctionName()||"unknown",g=e.getFileName(),e=g?g+":"+e.getLineNumber()+":"+e.getColumnNumber():"unknown";c.push(new Q("",f,"",e))}else for(b=b.replace(/\s*$/,"").split("\n"),c=[],d=0;d<b.length;d++)c.push(Ab(b[d]));b=c}else b=zb();for(c=b.length-1;b[c]&&b[c].Lb();)c--;d=-1;for(f=0;f<b.length;f++)if(b[f]&&"_assert"==b[f].getName()){d=f;break}e=
  [];for(f=d+1;f<=c;f++)e.push("> "),b[f]?e.push(b[f].mc()):e.push("(unknown)"),e.push("\n");this.comment=a||null;Error.captureStackTrace?Error.captureStackTrace(this,R):this.stack=Error().stack||""};t(R,Error);R.prototype.toString=function(){return this.message};var Cb=function(a,b){return a==b},Db=function(a,b){return a.toString()===b.toString()},Eb={String:Cb,Number:Cb,Boolean:Cb,Date:function(a,b){return a.getTime()==b.getTime()},RegExp:Db,Function:Db},Fb=function(a,b,c){return Math.abs(a-b)<=c},Gb={Number:Fb},_trueTypeOf=function(a){var b=typeof a;try{switch(b){case "object":if(null==a){b="null";break}case "function":switch(a.constructor){case (new String("")).constructor:b="String";break;case (new Boolean(!0)).constructor:b="Boolean";break;case (new Number(0)).constructor:b=
  "Number";break;case [].constructor:b="Array";break;case RegExp().constructor:b="RegExp";break;case (new Date).constructor:b="Date";break;case Function:b="Function";break;default:var c=a.constructor.toString().match(/function\s*([^( ]+)\(/);c&&(b=c[1])}}}catch(d){}finally{b=b.substr(0,1).toUpperCase()+b.substr(1)}return b},_displayStringForValue=function(a){var b;try{b="<"+String(a)+">"}catch(c){b="<toString failed: "+c.message+">"}null!==a&&void 0!==a&&(b+=" ("+_trueTypeOf(a)+")");return b},Hb=function(a){S("Call to fail()",
  a)},T=function(a,b){return b.length==a+1?b[0]:null},U=function(a,b,c){return c.length==b+1?c[a]:c[a-1]},_validateArguments=function(a,b){_assert(null,b.length==a||b.length==a+1&&p(b[0]),"Incorrect arguments passed to assert function")},_getCurrentTestCase=function(){var a=k.G_testRunner;return a?a.wc:null},_assert=function(a,b,c){b||S(a,c)},V=function(a,b){var c="Expected "+_displayStringForValue(a)+" but was "+_displayStringForValue(b);if("string"==typeof a&&"string"==typeof b){for(var d=Math.min(a.length,
  b.length),e=0;e<d&&a.charAt(e)==b.charAt(e);)e++;for(var f=0;f<d&&a.charAt(a.length-f-1)==b.charAt(b.length-f-1);)f++;e+f>d&&(f=0);if(2<e||2<f)d=function(a){var b=Math.max(0,e-2),c=Math.min(a.length,a.length-(f-2));return(0<b?"...":"")+a.substring(b,c)+(c<a.length?"...":"")},c+="\nDifference was at position "+e+". Expected ["+d(a)+"] vs. actual ["+d(b)+"]"}return c},Ib=function(a,b){_validateArguments(1,arguments);var c=T(1,arguments),d=U(1,1,arguments);_assert(c,"boolean"==typeof d,"Bad argument to assert(boolean)");
  _assert(c,d,"Call to assert(boolean) with false")},Jb=function(a,b){_validateArguments(1,arguments);var c=T(1,arguments),d=U(1,1,arguments);_assert(c,"boolean"==typeof d,"Bad argument to assertTrue(boolean)");_assert(c,d,"Call to assertTrue(boolean) with false")},Kb=function(a,b,c){_validateArguments(2,arguments);var d=U(1,2,arguments),e=U(2,2,arguments);_assert(T(2,arguments),d===e,V(d,e))},Lb=function(a,b){_validateArguments(1,arguments);_assert(T(1,arguments),null!==U(1,1,arguments),"Expected not to be "+
  _displayStringForValue(null))},Mb=function(a,b){_validateArguments(1,arguments);_assert(T(1,arguments),void 0!==U(1,1,arguments),"Expected not to be "+_displayStringForValue(void 0))},W=function(a,b,c){function d(a,b,c){for(var d=0;d<g.length;++d){var P=g[d]===a,H=q[d]===b;if(P||H){P&&H||f.push("Asymmetric cycle detected at "+c);return}}g.push(a);q.push(b);e(a,b,c);g.pop();q.pop()}function e(a,b,c){if(a!==b){var e=_trueTypeOf(a),g=_trueTypeOf(b);if(e==g){var q="Array"==e,P=z(e,a,b);if(null!=P)""!=
  P&&f.push(c+": "+P);else if(q&&a.length!=b.length)f.push(c+": Expected "+a.length+"-element array but got a "+b.length+"-element array");else{var H=c+(q?"[%s]":c?".%s":"%s");if("undefined"!=typeof Map&&a instanceof Map||"undefined"!=typeof Set&&a instanceof Set)a.forEach(function(a,e){b.has(e)?b.get&&d(a,b.get(e),H.replace("%s",e)):f.push(e+" not present in actual "+(c||g))}),b.forEach(function(b,d){a.has(d)||f.push(d+" not present in expected "+(c||e))});else if(a.__iterator__)"function"==n(a.l)?
  a.l(b)||f.push("equals() returned false for "+(c||e)):a.f?d(a.f,b.f,H.replace("%s","map_")):f.push("unable to check "+(c||e)+" for equality: it has an iterator we do not know how to handle. please add an equals method");else{for(var v in a)q&&(v|0)==v||(v in b?d(a[v],b[v],H.replace("%s",v)):f.push("property "+v+" not present in actual "+(c||g)));for(v in b)q&&(v|0)==v||v in a||f.push("property "+v+" not present in expected "+(c||e));if(q)for(v=0;v<a.length;v++)d(a[v],b[v],H.replace("%s",String(v)))}}}else f.push(c+
  " "+V(a,b))}}var f=[],g=[],q=[],z=c||function(a,b,c){return(a=Eb[a])?a(b,c)?"":V(b,c):null};d(a,b,"");return 0==f.length?null:V(a,b)+"\n   "+f.join("\n   ")},Nb=function(a,b,c){_validateArguments(2,arguments);var d=T(2,arguments)?T(2,arguments):"",e=W(U(1,2,arguments),U(2,2,arguments));_assert(d,!e,e)},Ob=function(a,b,c,d){_validateArguments(3,arguments);var e=U(1,3,arguments),f=U(2,3,arguments),g=U(3,3,arguments);_assert(T(3,arguments),Fb(e,f,g),"Expected "+e+", but got "+f+" which was more than "+
  g+" away")},Pb=function(a){for(var b=[],c=0;c<a.length;c++)b[c]=a[c];return b},Qb=function(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1},Rb=function(a){var b=document.createElement("DIV");b.innerHTML=a;return b.innerHTML.replace(/^\s+|\s+$/g,"")},S=function(a,b){a=new R(a,b);if(b=_getCurrentTestCase())b.vc(a);else throw k.console.error("Failed to save thrown exception: no test case is installed."),a;};l("fail",Hb,void 0);l("assert",Ib,void 0);
  l("assertThrows",function(a,b){_validateArguments(1,arguments);var c=U(1,1,arguments),d=T(1,arguments);_assert(d,"function"==typeof c,"Argument passed to assertThrows is not a function");try{c()}catch(e){return e&&p(e.stacktrace)&&p(e.message)&&(c=e.message.length-e.stacktrace.length,e.message.indexOf(e.stacktrace,c)==c&&(e.message=e.message.substr(0,c-14))),c=_getCurrentTestCase(),e&&e.isJsUnitException&&c&&c.sc&&S(d,"Function passed to assertThrows caught a JsUnitException (usually from an assert or call to fail()). If this is expected, use assertThrowsJsUnitException instead."),
  e}S(d,"No exception thrown from function passed to assertThrows")},void 0);l("assertNotThrows",function(a,b){_validateArguments(1,arguments);var c=T(1,arguments),d=U(1,1,arguments);_assert(c,"function"==typeof d,"Argument passed to assertNotThrows is not a function");try{return d()}catch(e){S((c?c+"\n":"")+"A non expected exception was thrown from function passed to assertNotThrows",e.stack||e.stacktrace||e.toString())}},void 0);
  l("assertThrowsJsUnitException",function(a,b){try{var c=k.G_testRunner,d=c.logTestFailure;try{c.logTestFailure=void 0,a()}finally{c.logTestFailure=d}}catch(e){return(a=_getCurrentTestCase())?a.uc(e):k.console.error("Failed to remove expected exception: no test case is installed."),e.Nb||Hb("Expected a JsUnitException"),"undefined"!=typeof b&&e.message!=b&&Hb("Expected message ["+b+"] but got ["+e.message+"]"),e}a="Expected a failure";"undefined"!=typeof b&&(a+=": "+b);throw new R(a);},void 0);
  l("assertTrue",Jb,void 0);l("assertFalse",function(a,b){_validateArguments(1,arguments);var c=T(1,arguments),d=U(1,1,arguments);_assert(c,"boolean"==typeof d,"Bad argument to assertFalse(boolean)");_assert(c,!d,"Call to assertFalse(boolean) with true")},void 0);l("assertEquals",Kb,void 0);l("assertNotEquals",function(a,b,c){_validateArguments(2,arguments);var d=U(2,2,arguments);_assert(T(2,arguments),U(1,2,arguments)!==d,"Expected not to be "+_displayStringForValue(d))},void 0);
  l("assertNull",function(a,b){_validateArguments(1,arguments);var c=U(1,1,arguments);_assert(T(1,arguments),null===c,V(null,c))},void 0);l("assertNotNull",Lb,void 0);l("assertUndefined",function(a,b){_validateArguments(1,arguments);var c=U(1,1,arguments);_assert(T(1,arguments),void 0===c,V(void 0,c))},void 0);l("assertNotUndefined",Mb,void 0);l("assertNotNullNorUndefined",function(a,b){_validateArguments(1,arguments);Lb.apply(null,arguments);Mb.apply(null,arguments)},void 0);
  l("assertNonEmptyString",function(a,b){_validateArguments(1,arguments);var c=U(1,1,arguments);_assert(T(1,arguments),void 0!==c&&null!==c&&"string"==typeof c&&""!==c,"Expected non-empty string but was "+_displayStringForValue(c))},void 0);l("assertNaN",function(a,b){_validateArguments(1,arguments);_assert(T(1,arguments),isNaN(U(1,1,arguments)),"Expected NaN")},void 0);
  l("assertNotNaN",function(a,b){_validateArguments(1,arguments);_assert(T(1,arguments),!isNaN(U(1,1,arguments)),"Expected not NaN")},void 0);l("assertObjectEquals",Nb,void 0);l("assertObjectRoughlyEquals",function(a,b,c,d){_validateArguments(3,arguments);var e=U(3,3,arguments),f=T(3,arguments)?T(3,arguments):"",g=W(U(1,3,arguments),U(2,3,arguments),function(a,b,c){return(a=Gb[a])?a(b,c,e)?"":V(b,c)+" which was more than "+e+" away":null});_assert(f,!g,g)},void 0);
  l("assertObjectNotEquals",function(a,b,c){_validateArguments(2,arguments);var d=T(2,arguments)?T(2,arguments):"",e=W(U(1,2,arguments),U(2,2,arguments));_assert(d,e,"Objects should not be equal")},void 0);
  l("assertArrayEquals",function(a,b,c){_validateArguments(2,arguments);var d=U(1,2,arguments),e=U(2,2,arguments),f=T(2,arguments)?T(2,arguments):"",g=_trueTypeOf(d);_assert(f,"Array"==g,"Expected an array for assertArrayEquals but found a "+g);g=_trueTypeOf(e);_assert(f,"Array"==g,"Expected an array for assertArrayEquals but found a "+g);Nb(f,Array.prototype.concat.call(d),Array.prototype.concat.call(e))},void 0);
  l("assertElementsEquals",function(a,b,c){_validateArguments(2,arguments);var d=U(1,2,arguments),e=U(2,2,arguments),f=T(2,arguments)?T(2,arguments):"";if(d){Kb("length mismatch: "+f,d.length,e.length);for(var g=0;g<d.length;++g)Kb("mismatch at index "+g+": "+f,d[g],e[g])}else Ib(f,!e)},void 0);
  l("assertElementsRoughlyEqual",function(a,b,c,d){_validateArguments(3,arguments);var e=U(1,3,arguments),f=U(2,3,arguments),g=U(3,3,arguments),q=T(3,arguments)?T(3,arguments):"";if(e){Kb("length mismatch: "+q,e.length,f.length);for(var z=0;z<e.length;++z)Ob(q,e[z],f[z],g)}else Ib(q,!f)},void 0);
  l("assertSameElements",function(a,b,c){_validateArguments(2,arguments);var d=U(1,2,arguments),e=U(2,2,arguments),f=T(2,arguments);Jb("Bad arguments to assertSameElements(opt_message, expected: ArrayLike, actual: ArrayLike)",ba(d)&&ba(e));d=Pb(d);e=Pb(e);_assert(f,d.length==e.length,"Expected "+d.length+" elements: ["+d+"], got "+e.length+" elements: ["+e+"]");for(var g=Pb(d),q=0;q<e.length;q++){var z=Qb(g,e[q]);_assert(f,-1!=z,"Expected ["+d+"], got ["+e+"]");g.splice(z,1)}},void 0);
  l("assertEvaluatesToTrue",function(a,b){_validateArguments(1,arguments);U(1,1,arguments)||_assert(T(1,arguments),!1,"Expected to evaluate to true")},void 0);l("assertEvaluatesToFalse",function(a,b){_validateArguments(1,arguments);U(1,1,arguments)&&_assert(T(1,arguments),!1,"Expected to evaluate to false")},void 0);l("assertHTMLEquals",function(a,b,c){_validateArguments(2,arguments);var d=U(2,2,arguments),e=Rb(U(1,2,arguments)),d=Rb(d);_assert(T(2,arguments),e===d,V(e,d))},void 0);
  l("assertHashEquals",function(a,b,c){_validateArguments(2,arguments);var d=U(1,2,arguments),e=U(2,2,arguments),f=T(2,arguments),g;for(g in d)_assert(f,g in e,"Expected hash had key "+g+" that was not found"),_assert(f,d[g]==e[g],"Value for key "+g+" mismatch - expected = "+d[g]+", actual = "+e[g]);for(g in e)_assert(f,g in d,"Actual hash had key "+g+" that was not expected")},void 0);l("assertRoughlyEquals",Ob,void 0);
  l("assertContains",function(a,b,c){_validateArguments(2,arguments);var d=U(1,2,arguments),e=U(2,2,arguments);_assert(T(2,arguments),-1!=Qb(e,d),"Expected '"+e+"' to contain '"+d+"'")},void 0);l("assertNotContains",function(a,b,c){_validateArguments(2,arguments);var d=U(1,2,arguments),e=U(2,2,arguments);_assert(T(2,arguments),-1==Qb(e,d),"Expected '"+e+"' not to contain '"+d+"'")},void 0);
  l("assertRegExp",function(a,b,c){_validateArguments(2,arguments);var d=U(1,2,arguments),e=U(2,2,arguments);"string"==typeof d&&(d=new RegExp(d));_assert(T(2,arguments),d.test(e),"Expected '"+e+"' to match RegExp "+d.toString())},void 0);u.GameManagerEventType={UNKNOWN:"unknown",STATE_CHANGED:"state_changed",GAME_MESSAGE_RECEIVED:"game_message_received"};u.GameManagerEvent=function(){};var Sb=function(a,b){this.type="state_changed";this.currentState=a;this.previousState=b};u.GameManagerStateChangedEvent=Sb;var Tb=function(a,b){this.type="game_message_received";this.playerId=a;this.gameMessage=b};u.GameManagerGameMessageReceivedEvent=Tb;var Ub=function(a){this.gameManagerClient=a};u.GameManagerInstanceResult=Ub;var X=function(a,b,c,d,e,f,g){this.oa=a;this.Aa=b;this.R=c;this.O=d;this.M=e;this.N=f;this.w=new C;for(a=0;a<g.length;a++)b=g[a],this.w.set(b.m,b)};u.GameManagerState=X;X.prototype.nb=function(){return this.oa};X.prototype.getApplicationName=X.prototype.nb;X.prototype.xb=function(){return this.Aa};X.prototype.getMaxPlayers=X.prototype.xb;X.prototype.vb=function(){return this.R};X.prototype.getLobbyState=X.prototype.vb;X.prototype.tb=function(){return this.O};X.prototype.getGameplayState=X.prototype.tb;
  X.prototype.rb=function(){return this.M};X.prototype.getGameData=X.prototype.rb;X.prototype.sb=function(){return this.N};X.prototype.getGameStatusText=X.prototype.sb;X.prototype.va=function(){return this.w.C()};X.prototype.getPlayers=X.prototype.va;X.prototype.h=function(a){return this.w.get(a,null)};X.prototype.getPlayer=X.prototype.h;X.prototype.qb=function(){for(var a=[],b=this.w.C(),c=0;c<b.length;c++){var d=b[c];d.D&&a.push(d)}return a};X.prototype.getControllablePlayers=X.prototype.qb;
  X.prototype.pb=function(){for(var a=[],b=this.w.C(),c=0;c<b.length;c++){var d=b[c];d.isConnected()&&a.push(d)}return a};X.prototype.getConnectedPlayers=X.prototype.pb;X.prototype.ob=function(){for(var a=[],b=this.w.C(),c=0;c<b.length;c++){var d=b[c];d.isConnected()&&d.D&&a.push(d)}return a};X.prototype.getConnectedControllablePlayers=X.prototype.ob;X.prototype.Cb=function(a){for(var b=[],c=this.w.C(),d=0;d<c.length;d++){var e=c[d];e.i==a&&b.push(e)}return b};X.prototype.getPlayersInState=X.prototype.Cb;
  X.prototype.Gb=function(a){return this.R!=a.R};X.prototype.hasLobbyStateChanged=X.prototype.Gb;X.prototype.Fb=function(a){return this.O!=a.O};X.prototype.hasGameplayStateChanged=X.prototype.Fb;X.prototype.Db=function(a){return null!=W(this.M,a.M)};X.prototype.hasGameDataChanged=X.prototype.Db;X.prototype.Eb=function(a){return this.N!=a.N};X.prototype.hasGameStatusTextChanged=X.prototype.Eb;X.prototype.Hb=function(a,b){var c=this.h(a);a=b.h(a);return null==c&&null==a?!1:null!=c&&null!=a?!c.l(a):!0};
  X.prototype.hasPlayerChanged=X.prototype.Hb;X.prototype.Jb=function(a,b){var c=this.h(a);a=b.h(a);return null==c&&null==a?!1:null!=c&&null!=a?c.i!=a.i:!0};X.prototype.hasPlayerStateChanged=X.prototype.Jb;X.prototype.Ib=function(a,b){var c=this.h(a);a=b.h(a);return null==c&&null==a?!1:null!=c&&null!=a?null!=W(c.S,a.S):!0};X.prototype.hasPlayerDataChanged=X.prototype.Ib;
  X.prototype.Ja=function(a){for(var b=[],c=this.va(),d=0;d<c.length;d++){var e=c[d],f=a.h(e.m);null!=f&&e.l(f)||b.push(e.m)}a=a.va();for(d=0;d<a.length;d++)f=a[d],e=this.h(f.m),null!=e||0<=sa(b,f.m)||b.push(f.m);return b};X.prototype.getListOfChangedPlayers=X.prototype.Ja;X.prototype.l=function(a){return this.oa==a.oa&&this.Aa==a.Aa&&this.R==a.R&&this.O==a.O&&this.N==a.N&&0==this.Ja(a).length&&!W(this.M,a.M)};X.prototype.equals=X.prototype.l;var Y=function(a,b,c,d){this.m=a;this.i=b;this.S=c;this.D=d};u.PlayerInfo=Y;Y.prototype.Ab=function(){return this.m};Y.prototype.getPlayerId=Y.prototype.Ab;Y.prototype.Bb=function(){return this.i};Y.prototype.getPlayerState=Y.prototype.Bb;Y.prototype.zb=function(){return this.S};Y.prototype.getPlayerData=Y.prototype.zb;Y.prototype.Mb=function(){return this.D};Y.prototype.isControllable=Y.prototype.Mb;Y.prototype.isConnected=function(){return 5==this.i||3==this.i||6==this.i||4==this.i};
  Y.prototype.isConnected=Y.prototype.isConnected;Y.prototype.l=function(a){return this.m==a.m&&this.i==a.i&&this.D==a.D&&!W(this.S,a.S)};Y.prototype.equals=Y.prototype.l;var Z=function(a){this.b=new K(a);this.K=new O;this.T=this.B=this.ca=null;this.Ma=this.La=!1;this.hb=r(this.Sb,this);this.ib=r(this.nc,this);this.Z=this.Y=null;this.b.kc(this.hb,this.ib)};u.GameManagerClient=Z;Z.getInstanceFor=function(a,b,c){(new Z(a)).Kb(b,c)};
  Z.prototype.Kb=function(a,b){if(this.La)throw Error("Attempted to initialize the GameManagerClient more than once.");if(this.isDisposed())throw Error("Attempted to initialize the GameManagerClient after it was disposed.");this.La=!0;var c=this;this.b.Vb(function(){a(new Ub(c))},b)};Z.prototype.I=function(){this.isDisposed()||(this.b.I(),this.K.I(),this.b=null,this.Ma=!0)};Z.prototype.dispose=Z.prototype.I;Z.prototype.isDisposed=function(){return this.Ma};Z.prototype.isDisposed=Z.prototype.isDisposed;
  Z.prototype.Yb=function(a,b,c){var d=this.b.g();this.j(d,3,a,b,c)};Z.prototype.sendPlayerAvailableRequest=Z.prototype.Yb;Z.prototype.Zb=function(a,b,c,d){this.j(a,3,b,c,d)};Z.prototype.sendPlayerAvailableRequestWithPlayerId=Z.prototype.Zb;Z.prototype.gc=function(a,b,c){var d=this.b.g();if(!d)throw Error("Cannot send player request - no last used player ID found.To register a new player, use setPlayerAvailableRequest()");this.j(d,4,a,b,c)};Z.prototype.sendPlayerReadyRequest=Z.prototype.gc;
  Z.prototype.hc=function(a,b,c,d){if(!a)throw Error("Cannot send player request - no player ID provided.To register a new player, use setPlayerAvailableRequest()");this.j(a,4,b,c,d)};Z.prototype.sendPlayerReadyRequestWithPlayerId=Z.prototype.hc;Z.prototype.ac=function(a,b,c){var d=this.b.g();if(!d)throw Error("Cannot send player request - no last used player ID found.To register a new player, use setPlayerAvailableRequest()");this.j(d,5,a,b,c)};Z.prototype.sendPlayerIdleRequest=Z.prototype.ac;
  Z.prototype.bc=function(a,b,c,d){if(!a)throw Error("Cannot send player request - no player ID provided.To register a new player, use setPlayerAvailableRequest()");this.j(a,5,b,c,d)};Z.prototype.sendPlayerIdleRequestWithPlayerId=Z.prototype.bc;Z.prototype.cc=function(a,b,c){var d=this.b.g();if(!d)throw Error("Cannot send player request - no last used player ID found.To register a new player, use setPlayerAvailableRequest()");this.j(d,6,a,b,c)};Z.prototype.sendPlayerPlayingRequest=Z.prototype.cc;
  Z.prototype.dc=function(a,b,c,d){if(!a)throw Error("Cannot send player request - no player ID provided.To register a new player, use setPlayerAvailableRequest()");this.j(a,6,b,c,d)};Z.prototype.sendPlayerPlayingRequestWithPlayerId=Z.prototype.dc;Z.prototype.ec=function(a,b,c){var d=this.b.g();if(!d)throw Error("Cannot send player request - no last used player ID found.To register a new player, use setPlayerAvailableRequest()");this.j(d,2,a,b,c)};Z.prototype.sendPlayerQuitRequest=Z.prototype.ec;
  Z.prototype.fc=function(a,b,c,d){if(!a)throw Error("Cannot send player request - no player ID provided.To register a new player, use setPlayerAvailableRequest()");this.j(a,2,b,c,d)};Z.prototype.sendPlayerQuitRequestWithPlayerId=Z.prototype.fc;Z.prototype.j=function(a,b,c,d,e){this.G();b=ja(b);this.b.Da(a,b,c,d,e)};Z.prototype.Xb=function(a,b,c){var d=this.b.g();if(!d)throw Error("Cannot send game request - no last used player ID found.");this.Ua(d,a,b,c)};Z.prototype.sendGameRequest=Z.prototype.Xb;
  Z.prototype.Ua=function(a,b,c,d){this.G();this.b.Da(a,6,b,c,d)};Z.prototype.sendGameRequestWithPlayerId=Z.prototype.Ua;Z.prototype.Wb=function(a){var b=this.b.g();if(!b)throw Error("Cannot send game message - no last used player ID found.");this.Ta(b,a)};Z.prototype.sendGameMessage=Z.prototype.Wb;Z.prototype.Ta=function(a,b){this.G();this.b.Da(a,7,b,null,null)};Z.prototype.sendGameMessageWithPlayerId=Z.prototype.Ta;Z.prototype.addEventListener=function(a,b){this.K.listen(a,b)};
  Z.prototype.addEventListener=Z.prototype.addEventListener;Z.prototype.removeEventListener=function(a,b){this.K.Wa(a,b)};Z.prototype.removeEventListener=Z.prototype.removeEventListener;Z.prototype.getCurrentState=function(){this.G();return this.B};Z.prototype.getCurrentState=Z.prototype.getCurrentState;Z.prototype.g=function(){this.G();return this.b.g()};Z.prototype.getLastUsedPlayerId=Z.prototype.g;h=Z.prototype;
  h.Sb=function(a){if(0!=a.statusCode)throw Error("Expecting a successful response message but got an error for request ID "+a.requestId);if(this.xa()||a.gameManagerConfig)if(a.gameManagerConfig&&(this.ca=a.gameManagerConfig),this.xa()){this.T=this.B;for(var b=[],c=0;c<a.players.length;c++){var d=a.players[c],e=d.playerId;b.push(new Y(e,d.playerState,d.playerData,this.b.Pb(e)))}this.B=new X(this.ca.applicationName,this.ca.maxPlayers,a.lobbyState,a.gameplayState,a.gameData,a.gameStatusText,b);b=this.B.h(a.playerId);
  null!=b&&b.D&&2==a.type&&(this.Y=a.playerId,this.Z=a.extraMessageData)}};h.nc=function(){null==this.T||this.B.l(this.T)||this.lb(this.B,this.T);null!=this.Y&&null!=this.Z&&this.kb(this.Y,this.Z);this.Z=this.Y=this.T=null};h.xa=function(){return null!=this.ca};h.lb=function(a,b){this.K.dispatchEvent(new Sb(a,b))};h.kb=function(a,b){this.K.dispatchEvent(new Tb(a,b))};
  h.G=function(){if(!this.xa())throw Error("Attempted to perform an operation on the GameManagerClient before it was initialized.");if(this.isDisposed())throw Error("Attempted to perform an operation on the GameManagerClient after it was disposed.");};l("chrome.cast.games.internal.GameManagerConfig",function(){this.applicationName="[APPLICATION_NAME_NOT_SET]";this.maxPlayers=-1;this.version="[INVALID_VERSION]"},void 0);l("chrome.cast.games.internal.PlayerInfoMessageComponent",function(){this.playerId="";this.playerState=0;this.playerData=null},void 0);}).call(window);
  