(function(){'use strict';var f,aa=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}},ba=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}},ca="function"==typeof Object.create?Object.create:function(a){var b=function(){};b.prototype=a;return new b},h;
if("function"==typeof Object.setPrototypeOf)h=Object.setPrototypeOf;else{var k;a:{var da={Vb:!0},ea={};try{ea.__proto__=da;k=ea.Vb;break a}catch(a){}k=!1}h=k?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}
var fa=h,n=function(a,b){a.prototype=ca(b.prototype);a.prototype.constructor=a;if(fa)fa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Ec=b.prototype},p=this||self,ha=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},ia="closure_uid_"+(1E9*Math.random()>>>
0),ja=0,ka=function(a,b,c){return a.call.apply(a.bind,arguments)},la=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}},u=function(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?u=ka:u=la;return u.apply(null,arguments)},v=function(a,b){a=
a.split(".");var c=p;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b},w=function(a,b){function c(){}c.prototype=b.prototype;a.Ec=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Hc=function(d,e,g){for(var l=Array(arguments.length-2),m=2;m<arguments.length;m++)l[m-2]=arguments[m];return b.prototype[e].apply(d,l)}};var chrome=chrome||window.chrome||{};chrome.cast=chrome.cast||{};chrome.cast.media=chrome.cast.media||{};var mojo={};chrome.cast.VERSION=[1,2];v("chrome.cast.VERSION",chrome.cast.VERSION);chrome.cast.Gc=!0;v("chrome.cast.usingPresentationApi",chrome.cast.Gc);chrome.cast.Error=function(a,b,c){this.code=a;this.description=b||null;this.details=c||null};v("chrome.cast.Error",chrome.cast.Error);chrome.cast.Eb=function(a){this.platform=a;this.packageId=this.url=null};v("chrome.cast.SenderApplication",chrome.cast.Eb);chrome.cast.Image=function(a){this.url=a;this.width=this.height=null};v("chrome.cast.Image",chrome.cast.Image);
chrome.cast.Volume=function(a,b){this.level=void 0!==a?a:null;this.muted=void 0!==b?b:null};v("chrome.cast.Volume",chrome.cast.Volume);chrome.cast.ma={CUSTOM_CONTROLLER_SCOPED:"custom_controller_scoped",TAB_AND_ORIGIN_SCOPED:"tab_and_origin_scoped",ORIGIN_SCOPED:"origin_scoped",PAGE_SCOPED:"page_scoped"};v("chrome.cast.AutoJoinPolicy",chrome.cast.ma);chrome.cast.oa={CREATE_SESSION:"create_session",CAST_THIS_TAB:"cast_this_tab"};v("chrome.cast.DefaultActionPolicy",chrome.cast.oa);chrome.cast.V={VIDEO_OUT:"video_out",AUDIO_OUT:"audio_out",VIDEO_IN:"video_in",AUDIO_IN:"audio_in",MULTIZONE_GROUP:"multizone_group"};
v("chrome.cast.Capability",chrome.cast.V);chrome.cast.m={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"};v("chrome.cast.ErrorCode",chrome.cast.m);chrome.cast.N={AVAILABLE:"available",UNAVAILABLE:"unavailable"};
v("chrome.cast.ReceiverAvailability",chrome.cast.N);chrome.cast.Fb={CHROME:"chrome",IOS:"ios",ANDROID:"android"};v("chrome.cast.SenderPlatform",chrome.cast.Fb);chrome.cast.Ba={CAST:"cast",DIAL:"dial",HANGOUT:"hangout",CUSTOM:"custom"};v("chrome.cast.ReceiverType",chrome.cast.Ba);chrome.cast.fb={RUNNING:"running",STOPPED:"stopped",ERROR:"error"};v("chrome.cast.DialAppState",chrome.cast.fb);chrome.cast.Ab={CAST:"cast",STOP:"stop"};v("chrome.cast.ReceiverAction",chrome.cast.Ab);
chrome.cast.H={CONNECTED:"connected",DISCONNECTED:"disconnected",STOPPED:"stopped"};v("chrome.cast.SessionStatus",chrome.cast.H);chrome.cast.Tb={ATTENUATION:"attenuation",FIXED:"fixed",MASTER:"master"};v("chrome.cast.VolumeControlType",chrome.cast.Tb);var x=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,x);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};w(x,Error);x.prototype.name="CustomError";var y=function(a,b){a=a.split("%s");for(var c="",d=a.length-1,e=0;e<d;e++)c+=a[e]+(e<b.length?b[e]:"%s");x.call(this,c+a[d])};w(y,x);y.prototype.name="AssertionError";var ma=function(a,b){throw new y("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var na=Array.prototype.forEach?function(a,b,c){Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e="string"==typeof a?a.split(""):a,g=0;g<d;g++)g in e&&b.call(c,e[g],g,a)},oa=function(a,b){for(var c=a.length,d="string"==typeof a?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return e;return-1};var pa=/&/g,qa=/</g,ra=/>/g,sa=/"/g,ta=/'/g,ua=/\x00/g,va=/[\x00&<>"']/;var z;a:{var wa=p.navigator;if(wa){var xa=wa.userAgent;if(xa){z=xa;break a}}z=""}var B=function(a){return-1!=z.indexOf(a)};var C=function(){this.a="";this.f=ya};C.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var za=function(a){if(a instanceof C&&a.constructor===C&&a.f===ya)return a.a;ma("expected object of type SafeHtml, got '"+a+"' of type "+q(a));return"type_error:SafeHtml"},ya={},D=function(a){var b=new C;b.a=a;return b};D("<!DOCTYPE html>");var Aa=D("");D("<br>");var Ba={MATH:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},Ca=function(a){var b=!1,c;return function(){b||(c=a(),b=!0);return c}}(function(){if("undefined"===typeof document)return!1;var a=document.createElement("div"),b=document.createElement("div");b.appendChild(document.createElement("div"));a.appendChild(b);if(!a.firstChild)return!1;b=a.firstChild.firstChild;a.innerHTML=za(Aa);return!b.parentElement});var Ea=function(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'};var c=p.document.createElement("div");return a.replace(Da,function(d,e){var g=b[d];if(g)return g;"#"==e.charAt(0)&&(e=Number("0"+e.substr(1)),isNaN(e)||(g=String.fromCharCode(e)));if(!g){g=D(d+" ");if(Ba[c.tagName.toUpperCase()])throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of "+c.tagName+".");if(Ca())for(;c.lastChild;)c.removeChild(c.lastChild);c.innerHTML=za(g);g=c.firstChild.nodeValue.slice(0,-1)}return b[d]=
g})},Fa=function(a){return a.replace(/&([^;]+);/g,function(b,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))?b:String.fromCharCode(c)}})},Da=/&([^;\s<&]+);?/g;chrome.cast.Xa=function(a,b,c,d,e){this.sessionRequest=a;this.sessionListener=b;this.receiverListener=c;this.autoJoinPolicy=d||chrome.cast.ma.TAB_AND_ORIGIN_SCOPED;this.defaultActionPolicy=e||chrome.cast.oa.CREATE_SESSION;this.customDialLaunchCallback=null;this.invisibleSender=!1;this.additionalSessionRequests=[]};v("chrome.cast.ApiConfig",chrome.cast.Xa);chrome.cast.ib=function(a,b){this.appName=a;this.launchParameter=b||null};v("chrome.cast.DialRequest",chrome.cast.ib);
chrome.cast.gb=function(a,b,c){this.receiver=a;this.appState=b;this.extraData=c||null};v("chrome.cast.DialLaunchData",chrome.cast.gb);chrome.cast.hb=function(a,b){this.doLaunch=a;this.launchParameter=b||null};v("chrome.cast.DialLaunchResponse",chrome.cast.hb);chrome.cast.Gb=function(a,b,c){this.appId=a;this.capabilities="array"==q(b)?b:[chrome.cast.V.VIDEO_OUT,chrome.cast.V.AUDIO_OUT];this.requestSessionTimeout=c||chrome.cast.timeout.requestSession;this.dialRequest=this.language=null};
v("chrome.cast.SessionRequest",chrome.cast.Gb);
chrome.cast.zb=function(a,b,c,d){this.label=a;a=b;va.test(a)&&(-1!=a.indexOf("&")&&(a=a.replace(pa,"&amp;")),-1!=a.indexOf("<")&&(a=a.replace(qa,"&lt;")),-1!=a.indexOf(">")&&(a=a.replace(ra,"&gt;")),-1!=a.indexOf('"')&&(a=a.replace(sa,"&quot;")),-1!=a.indexOf("'")&&(a=a.replace(ta,"&#39;")),-1!=a.indexOf("\x00")&&(a=a.replace(ua,"&#0;")));this.friendlyName=a;this.capabilities=c||[];this.volume=d||null;this.receiverType=chrome.cast.Ba.CAST;this.displayStatus=this.isActiveInput=null};
v("chrome.cast.Receiver",chrome.cast.zb);chrome.cast.Bb=function(a,b){this.statusText=a;this.appImages=b;this.showStop=null};v("chrome.cast.ReceiverDisplayStatus",chrome.cast.Bb);chrome.cast.Ea=function(){this.requestSession=6E4;this.sendCustomMessage=this.setReceiverVolume=this.stopSession=this.leaveSession=3E3};v("chrome.cast.Timeout",chrome.cast.Ea);chrome.cast.timeout=new chrome.cast.Ea;v("chrome.cast.timeout",chrome.cast.timeout);chrome.cast.Wa="auto-join";chrome.cast.tb="cast-session_";chrome.cast.media.lb={SDR:"sdr",HDR:"hdr",DV:"dv"};v("chrome.cast.media.HdrType",chrome.cast.media.lb);chrome.cast.media.mb={AAC:"aac",AC3:"ac3",MP3:"mp3",TS:"ts",TS_AAC:"ts_aac",E_AC3:"e_ac3",FMP4:"fmp4"};v("chrome.cast.media.HlsSegmentFormat",chrome.cast.media.mb);chrome.cast.media.nb={MPEG2_TS:"mpeg2_ts",FMP4:"fmp4"};v("chrome.cast.media.HlsVideoSegmentFormat",chrome.cast.media.nb);chrome.cast.media.rb={PAUSE:"pause",SEEK:"seek",STREAM_VOLUME:"stream_volume",STREAM_MUTE:"stream_mute"};
v("chrome.cast.media.MediaCommand",chrome.cast.media.rb);chrome.cast.media.xb={ALBUM:"ALBUM",PLAYLIST:"PLAYLIST",AUDIOBOOK:"AUDIOBOOK",RADIO_STATION:"RADIO_STATION",PODCAST_SERIES:"PODCAST_SERIES",TV_SERIES:"TV_SERIES",VIDEO_PLAYLIST:"VIDEO_PLAYLIST",LIVE_TV:"LIVE_TV",MOVIE:"MOVIE"};v("chrome.cast.media.QueueType",chrome.cast.media.xb);chrome.cast.media.X={GENERIC_CONTAINER:0,AUDIOBOOK_CONTAINER:1};v("chrome.cast.media.ContainerType",chrome.cast.media.X);
chrome.cast.media.w={GENERIC:0,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};v("chrome.cast.media.MetadataType",chrome.cast.media.w);chrome.cast.media.G={IDLE:"IDLE",PLAYING:"PLAYING",PAUSED:"PAUSED",BUFFERING:"BUFFERING"};v("chrome.cast.media.PlayerState",chrome.cast.media.G);chrome.cast.media.Y={OFF:"REPEAT_OFF",ALL:"REPEAT_ALL",SINGLE:"REPEAT_SINGLE",ALL_AND_SHUFFLE:"REPEAT_ALL_AND_SHUFFLE"};v("chrome.cast.media.RepeatMode",chrome.cast.media.Y);
chrome.cast.media.Cb={PLAYBACK_START:"PLAYBACK_START",PLAYBACK_PAUSE:"PLAYBACK_PAUSE"};v("chrome.cast.media.ResumeState",chrome.cast.media.Cb);chrome.cast.media.Da={BUFFERED:"BUFFERED",LIVE:"LIVE",OTHER:"OTHER"};v("chrome.cast.media.StreamType",chrome.cast.media.Da);chrome.cast.media.ob={CANCELLED:"CANCELLED",INTERRUPTED:"INTERRUPTED",FINISHED:"FINISHED",ERROR:"ERROR"};v("chrome.cast.media.IdleReason",chrome.cast.media.ob);chrome.cast.media.Ob={TEXT:"TEXT",AUDIO:"AUDIO",VIDEO:"VIDEO"};
v("chrome.cast.media.TrackType",chrome.cast.media.Ob);chrome.cast.media.Lb={SUBTITLES:"SUBTITLES",CAPTIONS:"CAPTIONS",DESCRIPTIONS:"DESCRIPTIONS",CHAPTERS:"CHAPTERS",METADATA:"METADATA"};v("chrome.cast.media.TextTrackType",chrome.cast.media.Lb);chrome.cast.media.Hb={NONE:"NONE",OUTLINE:"OUTLINE",DROP_SHADOW:"DROP_SHADOW",RAISED:"RAISED",DEPRESSED:"DEPRESSED"};v("chrome.cast.media.TextTrackEdgeType",chrome.cast.media.Hb);chrome.cast.media.Mb={NONE:"NONE",NORMAL:"NORMAL",ROUNDED_CORNERS:"ROUNDED_CORNERS"};
v("chrome.cast.media.TextTrackWindowType",chrome.cast.media.Mb);chrome.cast.media.Ib={SANS_SERIF:"SANS_SERIF",MONOSPACED_SANS_SERIF:"MONOSPACED_SANS_SERIF",SERIF:"SERIF",MONOSPACED_SERIF:"MONOSPACED_SERIF",CASUAL:"CASUAL",CURSIVE:"CURSIVE",SMALL_CAPITALS:"SMALL_CAPITALS"};v("chrome.cast.media.TextTrackFontGenericFamily",chrome.cast.media.Ib);chrome.cast.media.Jb={NORMAL:"NORMAL",BOLD:"BOLD",BOLD_ITALIC:"BOLD_ITALIC",ITALIC:"ITALIC"};v("chrome.cast.media.TextTrackFontStyle",chrome.cast.media.Jb);
chrome.cast.media.Pb={LIKE:"LIKE",DISLIKE:"DISLIKE",FOLLOW:"FOLLOW",UNFOLLOW:"UNFOLLOW"};v("chrome.cast.media.UserAction",chrome.cast.media.Pb);chrome.cast.media.qa=function(){this.customData=null};v("chrome.cast.media.GetStatusRequest",chrome.cast.media.qa);chrome.cast.media.ta=function(){this.customData=null};v("chrome.cast.media.PauseRequest",chrome.cast.media.ta);chrome.cast.media.va=function(){this.customData=null};v("chrome.cast.media.PlayRequest",chrome.cast.media.va);chrome.cast.media.Db=function(){this.customData=this.resumeState=this.currentTime=null};v("chrome.cast.media.SeekRequest",chrome.cast.media.Db);
chrome.cast.media.Ca=function(){this.customData=null};v("chrome.cast.media.StopRequest",chrome.cast.media.Ca);chrome.cast.media.Ub=function(a){this.volume=a;this.customData=null};v("chrome.cast.media.VolumeRequest",chrome.cast.media.Ub);chrome.cast.media.qb=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};v("chrome.cast.media.LoadRequest",chrome.cast.media.qb);
chrome.cast.media.ub=function(a){this.type="PRECACHE";this.requestId=0;this.precacheData=a};chrome.cast.media.jb=function(a,b){this.requestId=0;this.activeTrackIds=a||null;this.textTrackStyle=b||null};v("chrome.cast.media.EditTracksInfoRequest",chrome.cast.media.jb);chrome.cast.media.W=function(a){this.containerType=a=void 0===a?chrome.cast.media.X.GENERIC_CONTAINER:a;this.containerDuration=this.containerImages=this.sections=this.title=void 0};v("chrome.cast.media.ContainerMetadata",chrome.cast.media.W);
chrome.cast.media.j=function(a){this.metadataType=this.type=a;this.queueItemId=this.sectionStartTimeInContainer=this.sectionStartAbsoluteTime=this.sectionStartTimeInMedia=this.sectionDuration=void 0};v("chrome.cast.media.MediaMetadata",chrome.cast.media.j);chrome.cast.media.pa=function(){chrome.cast.media.j.call(this,chrome.cast.media.w.GENERIC);this.releaseDate=this.releaseYear=this.images=this.subtitle=this.title=void 0};n(chrome.cast.media.pa,chrome.cast.media.j);
v("chrome.cast.media.GenericMediaMetadata",chrome.cast.media.pa);chrome.cast.media.ra=function(){chrome.cast.media.j.call(this,chrome.cast.media.w.MOVIE);this.releaseDate=this.releaseYear=this.images=this.subtitle=this.studio=this.title=void 0};n(chrome.cast.media.ra,chrome.cast.media.j);v("chrome.cast.media.MovieMediaMetadata",chrome.cast.media.ra);
chrome.cast.media.Fa=function(){chrome.cast.media.j.call(this,chrome.cast.media.w.TV_SHOW);this.originalAirdate=this.releaseYear=this.images=this.episode=this.episodeNumber=this.season=this.seasonNumber=this.episodeTitle=this.title=this.seriesTitle=void 0};n(chrome.cast.media.Fa,chrome.cast.media.j);v("chrome.cast.media.TvShowMediaMetadata",chrome.cast.media.Fa);
chrome.cast.media.sa=function(){chrome.cast.media.j.call(this,chrome.cast.media.w.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=void 0};n(chrome.cast.media.sa,chrome.cast.media.j);v("chrome.cast.media.MusicTrackMediaMetadata",chrome.cast.media.sa);
chrome.cast.media.ua=function(){chrome.cast.media.j.call(this,chrome.cast.media.w.PHOTO);this.creationDateTime=this.height=this.width=this.longitude=this.latitude=this.images=this.location=this.artist=this.title=void 0};n(chrome.cast.media.ua,chrome.cast.media.j);v("chrome.cast.media.PhotoMediaMetadata",chrome.cast.media.ua);chrome.cast.media.la=function(){chrome.cast.media.W.call(this,chrome.cast.media.X.AUDIOBOOK_CONTAINER);this.releaseDate=this.publisher=this.narrators=this.authors=void 0};
n(chrome.cast.media.la,chrome.cast.media.W);v("chrome.cast.media.AudiobookContainerMetadata",chrome.cast.media.la);chrome.cast.media.ka=function(){chrome.cast.media.j.call(this,chrome.cast.media.w.AUDIOBOOK_CHAPTER);this.images=this.subtitle=this.bookTitle=this.chapterNumber=this.title=this.chapterTitle=void 0};n(chrome.cast.media.ka,chrome.cast.media.j);v("chrome.cast.media.AudiobookChapterMediaMetadata",chrome.cast.media.ka);
chrome.cast.media.sb=function(a,b){this.contentId=a;this.contentUrl=void 0;this.streamType=chrome.cast.media.Da.BUFFERED;this.contentType=b;this.metadata=null;this.entity=void 0;this.duration=null;this.startAbsoluteTime=void 0;this.customData=this.textTrackStyle=this.tracks=null;this.userActionStates=this.hlsVideoSegmentFormat=this.hlsSegmentFormat=this.vmapAdsRequest=this.breakClips=this.breaks=void 0};v("chrome.cast.media.MediaInfo",chrome.cast.media.sb);
chrome.cast.media.xa=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};v("chrome.cast.media.QueueItem",chrome.cast.media.xa);chrome.cast.media.eb="CC1AD845";v("chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID",chrome.cast.media.eb);chrome.cast.media.timeout={};chrome.cast.media.timeout.load=0;v("chrome.cast.media.timeout.load",chrome.cast.media.timeout.load);
chrome.cast.media.timeout.P=0;v("chrome.cast.media.timeout.getStatus",chrome.cast.media.timeout.P);chrome.cast.media.timeout.play=0;v("chrome.cast.media.timeout.play",chrome.cast.media.timeout.play);chrome.cast.media.timeout.pause=0;v("chrome.cast.media.timeout.pause",chrome.cast.media.timeout.pause);chrome.cast.media.timeout.seek=0;v("chrome.cast.media.timeout.seek",chrome.cast.media.timeout.seek);chrome.cast.media.timeout.stop=0;v("chrome.cast.media.timeout.stop",chrome.cast.media.timeout.stop);
chrome.cast.media.timeout.T=0;v("chrome.cast.media.timeout.setVolume",chrome.cast.media.timeout.T);chrome.cast.media.timeout.O=0;v("chrome.cast.media.timeout.editTracksInfo",chrome.cast.media.timeout.O);chrome.cast.media.timeout.l=0;v("chrome.cast.media.timeout.queue",chrome.cast.media.timeout.l);chrome.cast.media.Nb=function(a,b){this.trackId=a;this.trackContentType=this.trackContentId=null;this.type=b;this.customData=this.subtype=this.language=this.name=null};v("chrome.cast.media.Track",chrome.cast.media.Nb);
chrome.cast.media.Kb=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};v("chrome.cast.media.TextTrackStyle",chrome.cast.media.Kb);chrome.cast.media.wb=function(a){this.type="QUEUE_LOAD";this.sessionId=this.requestId=null;this.items=a;this.startIndex=0;this.repeatMode=chrome.cast.media.Y.OFF;this.customData=null};
v("chrome.cast.media.QueueLoadRequest",chrome.cast.media.wb);chrome.cast.media.wa=function(a){this.type="QUEUE_INSERT";this.sessionId=this.requestId=null;this.items=a;this.customData=this.insertBefore=null};v("chrome.cast.media.QueueInsertItemsRequest",chrome.cast.media.wa);chrome.cast.media.yb=function(a){this.type="QUEUE_UPDATE";this.sessionId=this.requestId=null;this.items=a;this.customData=null};v("chrome.cast.media.QueueUpdateItemsRequest",chrome.cast.media.yb);
chrome.cast.media.M=function(){this.type="QUEUE_UPDATE";this.customData=this.jump=this.currentItemId=this.sessionId=this.requestId=null};v("chrome.cast.media.QueueJumpRequest",chrome.cast.media.M);chrome.cast.media.Aa=function(){this.type="QUEUE_UPDATE";this.customData=this.repeatMode=this.sessionId=this.requestId=null};v("chrome.cast.media.QueueSetPropertiesRequest",chrome.cast.media.Aa);
chrome.cast.media.ya=function(a){this.type="QUEUE_REMOVE";this.sessionId=this.requestId=null;this.itemIds=a;this.customData=null};v("chrome.cast.media.QueueRemoveItemsRequest",chrome.cast.media.ya);chrome.cast.media.za=function(a){this.type="QUEUE_REORDER";this.sessionId=this.requestId=null;this.itemIds=a;this.customData=this.insertBefore=null};v("chrome.cast.media.QueueReorderItemsRequest",chrome.cast.media.za);
chrome.cast.media.Ya=function(a,b,c){this.id=a;this.breakClipIds=b;this.position=c;this.duration=void 0;this.isWatched=!1;this.isEmbedded=void 0};v("chrome.cast.media.Break",chrome.cast.media.Ya);chrome.cast.media.Za=function(a){this.id=a;this.vastAdsRequest=this.customData=this.hlsSegmentFormat=this.clickThroughUrl=this.posterUrl=this.whenSkippable=this.duration=this.title=this.contentType=this.contentUrl=this.contentId=void 0};v("chrome.cast.media.BreakClip",chrome.cast.media.Za);
chrome.cast.media.Rb=function(){this.adsResponse=this.adTagUrl=void 0};v("chrome.cast.media.VastAdsRequest",chrome.cast.media.Rb);chrome.cast.media.ab=function(){this.whenSkippable=this.breakClipId=this.breakId=this.currentBreakClipTime=this.currentBreakTime=void 0};v("chrome.cast.media.BreakStatus",chrome.cast.media.ab);chrome.cast.media.pb=function(a,b,c,d){this.start=a;this.end=b;this.isMovingWindow=c;this.isLiveDone=d};v("chrome.cast.media.LiveSeekableRange",chrome.cast.media.pb);
chrome.cast.media.vb=function(a,b,c,d,e,g,l){this.id=a;this.queueType=this.entity=void 0;this.name=b;this.description=c;this.repeatMode=d;this.shuffle=!1;this.items=e;this.startIndex=g;this.startTime=l;this.containerMetadata=void 0};v("chrome.cast.media.QueueData",chrome.cast.media.vb);chrome.cast.media.Qb=function(a){this.userAction=a;this.customData=void 0};v("chrome.cast.media.UserActionState",chrome.cast.media.Qb);chrome.cast.media.Sb=function(a,b,c){this.width=a;this.height=b;this.hdrType=c};
v("chrome.cast.media.VideoInformation",chrome.cast.media.Sb);chrome.cast.media.b=function(a,b){this.sessionId=a;this.mediaSessionId=b;this.media=null;this.videoInfo=this.queueData=void 0;this.playbackRate=1;this.playerState=chrome.cast.media.G.IDLE;this.currentTime=0;this.g=-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.Y.OFF;this.breakStatus=void 0;this.f=!1;this.a=[];this.liveSeekableRange=
void 0};v("chrome.cast.media.Media",chrome.cast.media.b);chrome.cast.media.b.prototype.P=function(a,b,c){a||(a=new chrome.cast.media.qa);E.a(this,"MEDIA_GET_STATUS",a,b,c,chrome.cast.media.timeout.P)};chrome.cast.media.b.prototype.getStatus=chrome.cast.media.b.prototype.P;chrome.cast.media.b.prototype.play=function(a,b,c){this.Ka(E,a,b,c)};chrome.cast.media.b.prototype.play=chrome.cast.media.b.prototype.play;
chrome.cast.media.b.prototype.Ka=function(a,b,c,d){b||(b=new chrome.cast.media.va);a.a(this,"PLAY",b,c,d,chrome.cast.media.timeout.play)};chrome.cast.media.b.prototype.playWithContext=chrome.cast.media.b.prototype.Ka;chrome.cast.media.b.prototype.pause=function(a,b,c){this.Ja(E,a,b,c)};chrome.cast.media.b.prototype.pause=chrome.cast.media.b.prototype.pause;chrome.cast.media.b.prototype.Ja=function(a,b,c,d){b||(b=new chrome.cast.media.ta);a.a(this,"PAUSE",b,c,d,chrome.cast.media.timeout.pause)};
chrome.cast.media.b.prototype.pauseWithContext=chrome.cast.media.b.prototype.Ja;chrome.cast.media.b.prototype.seek=function(a,b,c){E.a(this,"SEEK",a,b,c,chrome.cast.media.timeout.seek)};chrome.cast.media.b.prototype.seek=chrome.cast.media.b.prototype.seek;chrome.cast.media.b.prototype.stop=function(a,b,c){a||(a=new chrome.cast.media.Ca);E.a(this,"STOP_MEDIA",a,b,c,chrome.cast.media.timeout.stop)};chrome.cast.media.b.prototype.stop=chrome.cast.media.b.prototype.stop;
chrome.cast.media.b.prototype.T=function(a,b,c){E.a(this,"MEDIA_SET_VOLUME",a,b,c,chrome.cast.media.timeout.T)};chrome.cast.media.b.prototype.setVolume=chrome.cast.media.b.prototype.T;chrome.cast.media.b.prototype.O=function(a,b,c){E.a(this,"EDIT_TRACKS_INFO",a,b,c,chrome.cast.media.timeout.O)};chrome.cast.media.b.prototype.editTracksInfo=chrome.cast.media.b.prototype.O;chrome.cast.media.b.prototype.kc=function(a,b,c){E.a(this,"QUEUE_INSERT",a,b,c,chrome.cast.media.timeout.l)};
chrome.cast.media.b.prototype.queueInsertItems=chrome.cast.media.b.prototype.kc;chrome.cast.media.b.prototype.jc=function(a,b,c){E.a(this,"QUEUE_INSERT",new chrome.cast.media.wa([a]),b,c,chrome.cast.media.timeout.l)};chrome.cast.media.b.prototype.queueAppendItem=chrome.cast.media.b.prototype.jc;chrome.cast.media.b.prototype.uc=function(a,b,c){E.a(this,"QUEUE_UPDATE",a,b,c,chrome.cast.media.timeout.l)};chrome.cast.media.b.prototype.queueUpdateItems=chrome.cast.media.b.prototype.uc;
chrome.cast.media.b.prototype.pc=function(a,b){var c=new chrome.cast.media.M;c.jump=-1;E.a(this,"QUEUE_UPDATE",c,a,b,chrome.cast.media.timeout.l)};chrome.cast.media.b.prototype.queuePrev=chrome.cast.media.b.prototype.pc;chrome.cast.media.b.prototype.oc=function(a,b){var c=new chrome.cast.media.M;c.jump=1;E.a(this,"QUEUE_UPDATE",c,a,b,chrome.cast.media.timeout.l)};chrome.cast.media.b.prototype.queueNext=chrome.cast.media.b.prototype.oc;
chrome.cast.media.b.prototype.lc=function(a,b,c){if(!(0>F(this,a))){var d=new chrome.cast.media.M;d.currentItemId=a;E.a(this,"QUEUE_UPDATE",d,b,c,chrome.cast.media.timeout.l)}};chrome.cast.media.b.prototype.queueJumpToItem=chrome.cast.media.b.prototype.lc;chrome.cast.media.b.prototype.tc=function(a,b,c){var d=new chrome.cast.media.Aa;d.repeatMode=a;E.a(this,"QUEUE_UPDATE",d,b,c,chrome.cast.media.timeout.l)};chrome.cast.media.b.prototype.queueSetRepeatMode=chrome.cast.media.b.prototype.tc;
chrome.cast.media.b.prototype.rc=function(a,b,c){E.a(this,"QUEUE_REMOVE",a,b,c,chrome.cast.media.timeout.l)};chrome.cast.media.b.prototype.queueRemoveItems=chrome.cast.media.b.prototype.rc;chrome.cast.media.b.prototype.qc=function(a,b,c){0>F(this,a)||E.a(this,"QUEUE_REMOVE",new chrome.cast.media.ya([a]),b,c,chrome.cast.media.timeout.l)};chrome.cast.media.b.prototype.queueRemoveItem=chrome.cast.media.b.prototype.qc;chrome.cast.media.b.prototype.sc=function(a,b,c){E.a(this,"QUEUE_REORDER",a,b,c,chrome.cast.media.timeout.l)};
chrome.cast.media.b.prototype.queueReorderItems=chrome.cast.media.b.prototype.sc;chrome.cast.media.b.prototype.nc=function(a,b,c,d){var e=F(this,a);if(!(0>e))if(0>b)d&&d(new chrome.cast.Error(chrome.cast.m.INVALID_PARAMETER));else if(e==b)c&&c();else{var g=null;b=b>e?b+1:b;b<this.items.length&&(g=this.items[b]);a=new chrome.cast.media.za([a]);a.insertBefore=g?g.itemId:null;E.a(this,"QUEUE_REORDER",a,c,d,chrome.cast.media.timeout.l)}};chrome.cast.media.b.prototype.queueMoveItemToNewIndex=chrome.cast.media.b.prototype.nc;
chrome.cast.media.b.prototype.Fc=function(a){return-1<this.supportedMediaCommands.indexOf(a)};chrome.cast.media.b.prototype.supportsCommand=chrome.cast.media.b.prototype.Fc;chrome.cast.media.b.prototype.cc=function(){if(this.playerState==chrome.cast.media.G.PLAYING&&0<=this.g){var a=this.currentTime+(Date.now()-this.g)/1E3*this.playbackRate;this.media&&null!=this.media.duration&&a>this.media.duration&&-1!=this.media.duration&&(a=this.media.duration);0>a&&(a=0);return a}return this.currentTime};
chrome.cast.media.b.prototype.getEstimatedTime=chrome.cast.media.b.prototype.cc;chrome.cast.media.b.prototype.ba=function(a){this.I(E,a)};chrome.cast.media.b.prototype.addUpdateListener=chrome.cast.media.b.prototype.ba;chrome.cast.media.b.prototype.I=function(a,b){a.Xb(this,b)};chrome.cast.media.b.prototype.addUpdateListenerWithContext=chrome.cast.media.b.prototype.I;chrome.cast.media.b.prototype.ea=function(a){this.L(E,a)};chrome.cast.media.b.prototype.removeUpdateListener=chrome.cast.media.b.prototype.ea;
chrome.cast.media.b.prototype.L=function(a,b){E.wc(this,b)};chrome.cast.media.b.prototype.removeUpdateListenerWithContext=chrome.cast.media.b.prototype.L;var F=function(a,b){return oa(a.items,function(c){return c.itemId==b})};var E=null;var Ga=function(a,b,c){this.sessionId=a;this.namespaceName=b;this.message=c};var Ha=function(a,b){this.type="SET_VOLUME";this.requestId=0;this.volume=a;this.expectedVolume=b||null};var Ia=function(a){this.type="STOP";this.requestId=0;this.sessionId=a||null};chrome.cast.c=function(a,b,c,d,e){this.sessionId=a;this.appId=b;this.displayName=c;this.statusText=null;this.appImages=d;this.receiver=e;this.senderApps=[];this.namespaces=[];this.media=[];this.status=chrome.cast.H.CONNECTED;this.transportId=""};v("chrome.cast.Session",chrome.cast.c);chrome.cast.c.prototype.Dc=function(a,b,c){this.Ra(E,a,b,c)};chrome.cast.c.prototype.setReceiverVolumeLevel=chrome.cast.c.prototype.Dc;
chrome.cast.c.prototype.Ra=function(a,b,c,d){b=new Ha(new chrome.cast.Volume(b,null),this.receiver.volume);a.setReceiverVolume(this.sessionId,b,c,d)};chrome.cast.c.prototype.setReceiverVolumeLevelWithContext=chrome.cast.c.prototype.Ra;chrome.cast.c.prototype.Cc=function(a,b,c){this.Qa(E,a,b,c)};chrome.cast.c.prototype.setReceiverMuted=chrome.cast.c.prototype.Cc;
chrome.cast.c.prototype.Qa=function(a,b,c,d){a=new Ha(new chrome.cast.Volume(null,b),this.receiver.volume);E.setReceiverVolume(this.sessionId,a,c,d)};chrome.cast.c.prototype.setReceiverMutedWithContext=chrome.cast.c.prototype.Qa;chrome.cast.c.prototype.ec=function(a,b){E.leaveSession(this.sessionId,a,b)};chrome.cast.c.prototype.leave=chrome.cast.c.prototype.ec;chrome.cast.c.prototype.stop=function(a,b){this.Ta(E,a,b)};chrome.cast.c.prototype.stop=chrome.cast.c.prototype.stop;
chrome.cast.c.prototype.Ta=function(a,b,c){a.Oa(new Ia(this.sessionId),b,c,chrome.cast.timeout.stopSession)};chrome.cast.c.prototype.stopWithContext=chrome.cast.c.prototype.Ta;chrome.cast.c.prototype.sendMessage=function(a,b,c,d){this.Pa(E,a,b,c,d)};chrome.cast.c.prototype.sendMessage=chrome.cast.c.prototype.sendMessage;chrome.cast.c.prototype.Pa=function(a,b,c,d,e){a.zc(new Ga(this.sessionId,b,c),d,e)};chrome.cast.c.prototype.sendMessageWithContext=chrome.cast.c.prototype.Pa;
chrome.cast.c.prototype.ba=function(a){this.I(E,a)};chrome.cast.c.prototype.addUpdateListener=chrome.cast.c.prototype.ba;chrome.cast.c.prototype.I=function(a,b){a.Zb(this.sessionId,b)};chrome.cast.c.prototype.addUpdateListenerWithContext=chrome.cast.c.prototype.I;chrome.cast.c.prototype.ea=function(a){this.L(E,a)};chrome.cast.c.prototype.removeUpdateListener=chrome.cast.c.prototype.ea;chrome.cast.c.prototype.L=function(a,b){a.yc(this.sessionId,b)};
chrome.cast.c.prototype.removeUpdateListenerWithContext=chrome.cast.c.prototype.L;chrome.cast.c.prototype.Yb=function(a,b){this.Ha(E,a,b)};chrome.cast.c.prototype.addMessageListener=chrome.cast.c.prototype.Yb;chrome.cast.c.prototype.Ha=function(a,b,c){a.Wb(this.sessionId,b,c)};chrome.cast.c.prototype.addMessageListenerWithContext=chrome.cast.c.prototype.Ha;chrome.cast.c.prototype.Z=function(a){this.Ga(E,a)};chrome.cast.c.prototype.addMediaListener=chrome.cast.c.prototype.Z;
chrome.cast.c.prototype.Ga=function(a,b){a.Z(this.sessionId,b)};chrome.cast.c.prototype.addMediaListenerWithContext=chrome.cast.c.prototype.Ga;chrome.cast.c.prototype.ca=function(a){this.La(E,a)};chrome.cast.c.prototype.removeMediaListener=chrome.cast.c.prototype.ca;chrome.cast.c.prototype.La=function(a,b){a.ca(this.sessionId,b)};chrome.cast.c.prototype.removeMediaListenerWithContext=chrome.cast.c.prototype.La;chrome.cast.c.prototype.xc=function(a,b){this.Ma(E,a,b)};
chrome.cast.c.prototype.removeMessageListener=chrome.cast.c.prototype.xc;chrome.cast.c.prototype.Ma=function(a,b,c){a.vc(this.sessionId,b,c)};chrome.cast.c.prototype.removeMessageListenerWithContext=chrome.cast.c.prototype.Ma;chrome.cast.c.prototype.fc=function(a,b,c){a.sessionId=this.sessionId;E.na(a,"LOAD",b,c)};chrome.cast.c.prototype.loadMedia=chrome.cast.c.prototype.fc;chrome.cast.c.prototype.mc=function(a,b,c){a.sessionId=this.sessionId;E.na(a,"QUEUE_LOAD",b,c)};
chrome.cast.c.prototype.queueLoad=chrome.cast.c.prototype.mc;var G="StopIteration"in p?p.StopIteration:{message:"StopIteration",stack:""},H=function(){};H.prototype.next=function(){throw G;};H.prototype.o=function(){return this};
var Ja=function(a){if(a instanceof H)return a;if("function"==typeof a.o)return a.o(!1);if(r(a)){var b=0,c=new H;c.next=function(){for(;;){if(b>=a.length)throw G;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},I=function(a,b){if(r(a))try{na(a,b,void 0)}catch(c){if(c!==G)throw c;}else{a=Ja(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==G)throw c;}}};var J=function(a,b){this.a={};this.h=[];this.g=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 if(a)if(a instanceof J)for(K(a),c=a.h.concat(),d=0;d<c.length;d++)this.set(c[d],a.get(c[d]));else for(d in a)this.set(d,a[d])};J.prototype.J=function(){K(this);for(var a=[],b=0;b<this.h.length;b++)a.push(this.a[this.h[b]]);return a};J.prototype.clear=function(){this.a={};this.g=this.f=this.h.length=0};
J.prototype.remove=function(a){return L(this.a,a)?(delete this.a[a],this.f--,this.g++,this.h.length>2*this.f&&K(this),!0):!1};var K=function(a){if(a.f!=a.h.length){for(var b=0,c=0;b<a.h.length;){var d=a.h[b];L(a.a,d)&&(a.h[c++]=d);b++}a.h.length=c}if(a.f!=a.h.length){var e={};for(c=b=0;b<a.h.length;)d=a.h[b],L(e,d)||(a.h[c++]=d,e[d]=1),b++;a.h.length=c}};J.prototype.get=function(a,b){return L(this.a,a)?this.a[a]:b};
J.prototype.set=function(a,b){L(this.a,a)||(this.f++,this.h.push(a),this.g++);this.a[a]=b};J.prototype.o=function(a){K(this);var b=0,c=this.g,d=this,e=new H;e.next=function(){if(c!=d.g)throw Error("The map has changed since the iterator was created");if(b>=d.h.length)throw G;var g=d.h[b++];return a?g:d.a[g]};return e};var L=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var M=function(a,b){this.requestId=a;this.i=b;this.Ua=null};M.prototype.f=function(){};var Ka=function(){this.a=new J},La=function(a,b){a.a.set(b.requestId,b);b.Ua=setTimeout(function(){a.a.remove(b.requestId);b.f()},b.i)},Ma=function(a,b){var c=a.a.get(b);if(!c)return null;clearTimeout(c.Ua);a.a.remove(b);return c};var N=function(a,b,c,d){M.call(this,a,d||6E5);this.g=b;this.a=c};n(N,M);N.prototype.f=function(){this.a(new chrome.cast.Error(chrome.cast.m.TIMEOUT))};var O=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 P=function(a){var b=Error.call(this);this.message=b.message;"stack"in b&&(this.stack=b.stack);this.name="AssertionError";this.message=void 0===a?"":a;Error.captureStackTrace?Error.captureStackTrace(this,P):this.stack=Error().stack};n(P,Error);var Q=function(a){this.a=a},Oa=function(a){var b=Na.get(a);b||(b=new Q(a),Na.set(a,b));return b};Q.prototype.log=function(a,b,c){if(!(1>a)){"function"==typeof b&&(b=b());if("string"!=typeof b)throw new P("Expected message to be a string.");var d={Jc:this.a,level:a,time:Date.now(),message:b,Ic:c};Pa.forEach(function(e){return e(d)})}};Q.prototype.error=function(a,b){this.log(3,a,b)};var Qa=function(a){R.log(1,a,void 0)},Pa=[],Na=new Map;var S=function(a){this.g=a;this.f=String(Date.now())+String(Math.floor(1E5*Math.random()));this.a=null},Ra=function(a,b){if(!a.a)return T.error("No active session"),"No active session";b.clientId=a.f;b=JSON.stringify(b);if(32768<b.length)return T.error("Message length over limit"),"Message length over limit";T.log(0,"Send "+b,void 0);a.a.send(b);return null};S.prototype.connect=function(a){this.a=a;this.a.onmessage=u(this.i,this);Ra(this,new O("client_connect",this.f))};
S.prototype.disconnect=function(){this.a.close();this.a=null};S.prototype.i=function(a){T.log(0,"Receive "+a.data,void 0);a=JSON.parse(a.data);if(a.clientId==this.f)this.g.onMessage(a)};var T=Oa("mr.cast.ExtensionMessenger");var Sa=function(a,b,c){this.g=a;this.f=b;this.a=c},Ta=function(a){var b="cast-dial:"+a.g,c=new URLSearchParams;a.f&&c.set("dialPostData",a.f);a.a&&c.set("clientId",a.a);(a=c.toString())&&(b+="?"+a);return b};var Ua=function(a,b,c,d,e,g,l,m,t,A){this.A=a;this.a=b||null;this.f=c||null;this.s=d||null;this.u=void 0!==e?e:null;this.v=g||null;this.D=l||null;this.C=m||!1;this.i=t||null;this.g=A||null},Va=function(a){var b=a.A.map(function(c){var d="cast:"+c.appId,e=new URLSearchParams;c.capabilities&&0<c.capabilities.length&&e.set("capabilities",c.capabilities.join(","));a.a&&e.set("clientId",a.a);a.f&&e.set("autoJoinPolicy",a.f);a.s&&e.set("defaultActionPolicy",a.s);null!=a.u&&e.set("launchTimeout",String(a.u));
a.C&&e.set("invisibleSender","true");a.i&&(e.set("broadcastNamespace",a.i),e.set("broadcastId",String(Math.random())));a.g&&e.set("broadcastMessage",encodeURIComponent(JSON.stringify(a.g)));return d+"?"+e.toString()});a.v&&b.push(Ta(new Sa(a.v,a.D,a.a)));return b};var Wa=function(){this.a={};this.f={}},Xa=function(a,b,c){var d=a.a[b];return d?(d.status=c,d.media.forEach(function(e){delete a.f[e.sessionId+"#"+e.mediaSessionId]}),delete a.a[b],!0):!1},Za=function(a,b){var c=a.a[b.sessionId];if(c)return c.statusText=b.statusText,c.namespaces=b.namespaces||[],c.receiver.volume=b.receiver.volume,c;c=new chrome.cast.c(b.sessionId,b.appId,b.displayName,b.appImages,b.receiver);for(var d in b)"media"==d?c.media=b.media.map(function(e){e=Ya(a,e);e.i=!1;e.f=!0;return e}):
b.hasOwnProperty(d)&&(c[d]=b[d]);return a.a[b.sessionId]=c},Ya=function(a,b){var c=b.sessionId+"#"+b.mediaSessionId,d=a.f[c];d||(d=new chrome.cast.media.b(b.sessionId,b.mediaSessionId),a.f[c]=d,(a=a.a[b.sessionId])&&a.media.push(d));a=d;a.currentItemId=null;a.loadingItemId=null;a.preloadedItemId=null;for(var e in b)"items"!=e&&b.hasOwnProperty(e)&&("volume"==e?(a.volume.level=b.volume.level,a.volume.muted=b.volume.muted):a[e]=b[e]);e=ba(["idleReason","extendedStatus"]);for(c=e.next();!c.done;c=e.next())c=
c.value,b.hasOwnProperty(c)||(a[c]=null);"currentTime"in b&&(a.g=Date.now());if(a.playerState==chrome.cast.media.G.IDLE&&null==a.loadingItemId)a.currentItemId=null,a.loadingItemId=null,a.preloadedItemId=null,a.items=null;else if(b.hasOwnProperty("items")&&b.items){e=[];var g=a.items;c={};if(g)for(var l=0;l<g.length;l++)c[g[l].itemId]=l;b=ba(b.items);for(g=b.next();!g.done;g=b.next()){g=g.value;if(!g.media){l=g.itemId;var m=a.items?a.items[c[l]]:null;m&&m.media?g.media=m.media:l==a.currentItemId&&
a.media&&(g.media=a.media)}e.push($a(g))}a.items=e}return d},ab=function(a,b){delete a.f[b.sessionId+"#"+b.mediaSessionId];if(a=a.a[b.sessionId])b=a.media.indexOf(b),-1!=b&&a.media.splice(b,1)},$a=function(a){var b=new chrome.cast.media.xa(a.media),c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b};var bb=function(){};var cb=B("Opera"),db=B("Gecko")&&!(-1!=z.toLowerCase().indexOf("webkit")&&!B("Edge"))&&!(B("Trident")||B("MSIE"))&&!B("Edge"),eb=-1!=z.toLowerCase().indexOf("webkit")&&!B("Edge");var fb=function(a,b,c){this.i=null!=c?u(a,c):a;this.g=b;this.f=u(this.hc,this);this.a=[]};w(fb,bb);f=fb.prototype;f.F=!1;f.K=0;f.B=null;f.bc=function(a){this.a=arguments;this.B||this.K?this.F=!0:gb(this)};f.stop=function(){this.B&&(p.clearTimeout(this.B),this.B=null,this.F=!1,this.a=[])};f.pause=function(){this.K++};f.resume=function(){this.K--;this.K||!this.F||this.B||(this.F=!1,gb(this))};f.hc=function(){this.B=null;this.F&&!this.K&&(this.F=!1,gb(this))};
var gb=function(a){var b=a.f;var c=a.g;if("function"!=q(b))if(b&&"function"==typeof b.handleEvent)b=u(b.handleEvent,b);else throw Error("Invalid listener argument");b=2147483647<Number(c)?-1:p.setTimeout(b,c||0);a.B=b;a.i.apply(null,a.a)};var hb=B("Safari")&&!((B("Chrome")||B("CriOS"))&&!B("Edge")||B("Coast")||B("Opera")||B("Edge")||B("Edg/")||B("Firefox")||B("FxiOS")||B("Silk")||B("Android"))&&!(B("iPhone")&&!B("iPod")&&!B("iPad")||B("iPad")||B("iPod"));var U=null,ib=db||eb&&!hb||cb||"function"==typeof p.btoa,jb=function(a){if(ib)var b=p.btoa(a);else{b=[];for(var c=0,d=0;d<a.length;d++){var e=a.charCodeAt(d);255<e&&(b[c++]=e&255,e>>=8);b[c++]=e}if(!U)for(U={},a=0;65>a;a++)U[a]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(a);a=U;c=[];for(d=0;d<b.length;d+=3){var g=b[d],l=(e=d+1<b.length)?b[d+1]:0,m=d+2<b.length,t=m?b[d+2]:0,A=g>>2;g=(g&3)<<4|l>>4;l=(l&15)<<2|t>>6;t&=63;m||(t=64,e||(l=64));c.push(a[A],a[g],a[l],a[t])}b=
c.join("")}return b};var kb=function(a){if(a.J&&"function"==typeof a.J)return a.J();if("string"==typeof a)return a.split("");if(r(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}b=[];c=0;for(d in a)b[c++]=a[d];return b};var lb=function(){this.a=new J},mb=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[ia]||(a[ia]=++ja)):b.substr(0,1)+a};f=lb.prototype;f.add=function(a){this.a.set(mb(a),a)};f.removeAll=function(a){a=kb(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};f.remove=function(a){return this.a.remove(mb(a))};f.clear=function(){this.a.clear()};f.contains=function(a){a=mb(a);return L(this.a.a,a)};f.J=function(){return this.a.J()};f.o=function(){return this.a.o(!1)};var V=function(){this.v=new S(this);this.f=null;this.U=new Wa;this.i=0;this.ia=new Ka;this.A=new J;this.ja=!1;this.u=new J;this.D=new J;this.S=[];this.cb=this.ac.bind(this);this.g=null;this.C=0;this.s=null;this.bb=new fb(this.kb,200,this);this.Va=null},nb=function(a){var b=new chrome.cast.Error(chrome.cast.m.INVALID_PARAMETER,"Already requesting session");a&&a(b)},W=function(a,b,c,d){c&&La(a.ia,c);void 0!==d?b.sequenceNumber=d:(b.sequenceNumber=a.i,a.i=(a.i+1)%9007199254740992);d=Ra(a.v,b);c&&d&&
(a=Ma(a.ia,b.sequenceNumber),b=new chrome.cast.Error(chrome.cast.m.INVALID_PARAMETER,d),(a=a.a)&&a(b))};
V.prototype.R=function(a,b){var c=this;E=this;this.f||(this.f=a,a.invisibleSender||(a=new PresentationRequest(X(this)),a.getAvailability().then(function(d){d.onchange=function(){c.ja=!!d.value;c.f.receiverListener(d.value?chrome.cast.N.AVAILABLE:chrome.cast.N.UNAVAILABLE)};d.onchange()},function(){c.f.receiverListener(chrome.cast.N.AVAILABLE)}),a.onconnectionavailable=function(d){Y(c,d.connection)},this.Va=(p.navigator||null).presentation.defaultRequest=a,a.reconnect(chrome.cast.Wa).then(function(d){Y(c,
d)},ha)));b&&b(void 0)};V.prototype.ga=function(a){a.navigator.presentation.defaultRequest=this.Va};
var Y=function(a,b,c){c=void 0===c?null:c;b.onclose=function(d){a.g=null;switch(d.reason){case "closed":ob(a,chrome.cast.H.DISCONNECTED);break;case "error":c&&(d=new chrome.cast.Error(chrome.cast.m.SESSION_ERROR),c&&c(d))}};b.onterminate=function(){ob(a,chrome.cast.H.STOPPED)};"connected"==b.state?a.v.connect(b):b.onconnect=function(){a.v.connect(b)}},rb=function(a){var b=Z;pb.has(a.type)?b.ja&&(b.s?(a.sessionId=b.s,qb(b,null,a.type,a,function(){Qa("Send Broadcast directly succeeded")},function(c){R.error("Send Broadcast directly failed with code "+
c.code)})):b.bb.bc(X(b,void 0,"urn:x-cast:com.google.cast.media",a))):R.error("Unsupported broadcast message type - "+a.type)};V.prototype.kb=function(a){Qa("Broadcast request "+a);(a=(new PresentationRequest(a)).getAvailability())?a.then(function(){Qa("Broadcast succeeded")},function(){R.log(2,"Broadcast failed",void 0)}):R.error("presentationRequest.getAvailability return undefined")};
V.prototype.requestSession=function(a,b,c){var d=this;this.g?nb(b):(c=X(this,c),this.g=a,(new PresentationRequest(c)).start().then(function(e){Y(d,e,b)}).catch(function(e){d.g=null;e=new chrome.cast.Error("AbortError"==e.name||"NotAllowedError"==e.name?chrome.cast.m.CANCEL:chrome.cast.m.SESSION_ERROR);b&&b(e)}))};
var X=function(a,b,c,d){var e=null,g=null,l=b||a.f.sessionRequest,m=l.dialRequest;m&&(e=m.appName,(g=m.launchParameter)&&!g.match(sb)&&(g=jb(g)));var t=[];t.push({appId:l.appId,capabilities:l.capabilities});b||na(a.f.additionalSessionRequests,function(A){t.push({appId:A.appId,capabilities:A.capabilities})});return Va(new Ua(t,a.v.f,a.f.autoJoinPolicy,a.f.defaultActionPolicy,l.requestSessionTimeout,e,g,a.f.invisibleSender,c,d))};
V.prototype.na=function(a,b,c,d){var e=this;this.C++;qb(this,null,b,a,function(g){e.C--;g.f=!0;c&&c(g)},function(g){e.C--;d(g)},chrome.cast.media.timeout.load)};V.prototype.a=function(a,b,c,d,e,g){var l=this;qb(this,a,b,c,function(m){l.Ia(m);d&&d(void 0)},e,g)};
var qb=function(a,b,c,d,e,g,l){d.type=c;null!=b&&(d.mediaSessionId=b.mediaSessionId,d.sessionId=b.sessionId);a.Oa(d,function(m){m.status&&1==m.status.length?e&&e(m.status[0]):(m=new chrome.cast.Error(chrome.cast.m.SESSION_ERROR),g&&g(m))},g,l)};f=V.prototype;f.setReceiverVolume=function(a,b,c,d){b.sessionId=a;W(this,new O("v2_message",b,void 0,chrome.cast.timeout.setReceiverVolume),new N(this.i,c,d,chrome.cast.timeout.sendCustomMessage))};
f.fa=function(a){var b=this;(new PresentationRequest(X(this))).reconnect(chrome.cast.tb+a).then(function(c){Y(b,c)},ha)};f.leaveSession=function(a,b,c){W(this,new O("leave_session",a,void 0,chrome.cast.timeout.leaveSession),new N(this.i,b,c,chrome.cast.timeout.leaveSession))};f.zc=function(a,b,c){W(this,new O("app_message",a,void 0,chrome.cast.timeout.sendCustomMessage),new N(this.i,b,c,chrome.cast.timeout.sendCustomMessage))};
f.Oa=function(a,b,c,d){W(this,new O("v2_message",a,void 0,d),new N(this.i,b,c,d))};var tb=function(a,b,c){var d=a.get(b);d||(d=new lb,a.set(b,d));d.add(c)};f=V.prototype;f.Zb=function(a,b){tb(this.A,a,b)};f.yc=function(a,b){(a=this.A.get(a))&&a.remove(b)};f.aa=function(a){this.S.push(a)};f.da=function(a){a=this.S.indexOf(a);0<=a&&this.S.splice(a,1)};f.Wb=function(a,b,c){var d=this.u.get(a);d||(d=new J,this.u.set(a,d));a=d.get(b);a||(a=new lb,d.set(b,a));a.add(c)};
f.vc=function(a,b,c){(a=this.u.get(a))&&(b=a.get(b))&&b.remove(c)};f.Z=function(a,b){tb(this.D,a,b)};f.ca=function(a,b){(a=this.D.get(a))&&a.remove(b)};f.Xb=function(a,b){-1==a.a.indexOf(b)&&a.a.push(b)};f.wc=function(a,b){b=a.a.indexOf(b);-1!=b&&a.a.splice(b,1)};f.Ia=function(a){if(a.f){var b=a.playerState!=chrome.cast.media.G.IDLE||null!=a.loadingItemId;a.a.forEach(function(d){d(b)});b||ab(this.U,a)}else if(!(0<this.C)){a.f=!0;var c=this.D.get(a.sessionId);c&&I(c.o(),function(d){d(a)})}};
f.ac=function(a){return Ya(this.U,a)};var ob=function(a,b){if(a.s){var c=a.s;a.s=null;a.v.disconnect();var d=b!=chrome.cast.H.STOPPED;Xa(a.U,c,b)&&(a.u.remove(c),a.D.remove(c),b=a.A.get(c))&&(a.A.remove(c),I(b.o(),function(e){e(d)}))}};
V.prototype.onMessage=function(a){switch(a.type){case "new_session":case "update_session":a.message=Za(this.U,a.message);break;case "v2_message":var b=a.message;b&&"MEDIA_STATUS"==b.type&&b.status&&(b.status=b.status.map(this.cb))}if(b=Ma(this.ia,a.sequenceNumber))"error"==a.type?(b=b.a)&&b(a.message):(b=b.g)&&b(a.message);if(b=a.message)switch(a.type){case "receiver_action":ub(this,b);break;case "new_session":this.s=b.sessionId;this.g?(this.g(b),this.g=null):this.f&&this.f.sessionListener(b);break;
case "update_session":vb(this,b);break;case "app_message":wb(this,b);break;case "v2_message":"MEDIA_STATUS"==b.type&&b.status.forEach(this.Ia.bind(this));break;case "custom_dial_launch":xb(this,a.sequenceNumber,b)}};
var vb=function(a,b){(a=a.A.get(b.sessionId))&&I(a.o(),function(c){c(!0)})},ub=function(a,b){a.S.forEach(function(c){c(b.receiver,b.action)})},wb=function(a,b){(a=a.u.get(b.sessionId))&&(a=a.get(b.namespaceName))&&I(a.o(),function(c){c(b.namespaceName,b.message)})},yb=function(a,b,c){W(a,new O("custom_dial_launch",c,void 0,chrome.cast.timeout.sendCustomMessage),null,b)},xb=function(a,b,c){a.f.customDialLaunchCallback?a.f.customDialLaunchCallback(c).then(function(d){yb(a,b,d)},function(){yb(a,b)}):
yb(a,b)},sb=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,pb=new Set(["PRECACHE"]),Z=new V,R=Oa("mr.cast.Api");chrome.cast.R=function(a,b,c){Z.R(a,b,c)};v("chrome.cast.initialize",chrome.cast.R);chrome.cast.dc=function(a,b,c){var d=new V;d.R(a,b,c);return d};v("chrome.cast.initializeWithContext",chrome.cast.dc);chrome.cast.ga=function(a){Z.ga(a)};v("chrome.cast.setPageContext",chrome.cast.ga);chrome.cast.requestSession=function(a,b,c){Z.requestSession(a,b,c)};v("chrome.cast.requestSession",chrome.cast.requestSession);chrome.cast.ic=function(a){rb(new chrome.cast.media.ub(a))};v("chrome.cast.precache",chrome.cast.ic);
chrome.cast.fa=function(a){chrome.cast.Na(Z,a)};v("chrome.cast.requestSessionById",chrome.cast.fa);chrome.cast.Na=function(a,b){a.fa(b)};v("chrome.cast.requestSessionByIdWithContext",chrome.cast.Na);chrome.cast.aa=function(a){Z.aa(a)};v("chrome.cast.addReceiverActionListener",chrome.cast.aa);chrome.cast.da=function(a){Z.da(a)};v("chrome.cast.removeReceiverActionListener",chrome.cast.da);chrome.cast.gc=function(){};v("chrome.cast.logMessage",chrome.cast.gc);chrome.cast.Ac=function(a,b){b()};
v("chrome.cast.setCustomReceivers",chrome.cast.Ac);chrome.cast.Bc=function(a,b){b()};v("chrome.cast.setReceiverDisplayStatus",chrome.cast.Bc);chrome.cast.unescape=function(a){return-1!=a.indexOf("&")?"document"in p?Ea(a):Fa(a):a};v("chrome.cast.unescape",chrome.cast.unescape);chrome.cast.isAvailable=!1;v("chrome.cast.isAvailable",chrome.cast.isAvailable);chrome.cast.Sa=!1;
chrome.cast.ha=function(){if(!chrome.cast.Sa){chrome.cast.Sa=!0;chrome.cast.isAvailable=!0;var a=window.__onGCastApiAvailable;a&&"function"==typeof a&&a(!0)}};"complete"==document.readyState?chrome.cast.ha():(window.addEventListener("load",chrome.cast.ha,!1),window.addEventListener("DOMContentLoaded",chrome.cast.ha,!1));}).call(this);
