// Source URI: // https://www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js (function(){var _=window.caf_={};/* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ /* Copyright Google LLC SPDX-License-Identifier: Apache-2.0 */ 'use strict';var aa,ba,p,ea,ha,ja,na,oa,pa,qa,sa,ta,ua,xa,va,wa,ya,za,Aa,Ca,Da,Fa,Ha,Ia,Ja,Ra,Sa,Wa,Xa,cb,bb,fb,db,gb,hb,kb,mb,nb,ob,qb,rb,tb,vb,Bb,Db,Eb,Fb,C,Gb,D,Ob,Pb,Nb,Wb,ac,bc,gc,jc,kc,lc,pc,sc,xc,uc,wc,Cc,Dc,Fc,Gc,Hc,Jc,Lc,Mc,Qc,Uc,$c,bd,cd,jd,gd,kd,od,pd,rd,sd,ud,vd,wd,yd,Ad,Bd,zd,Gd,nd,td,Id,Ed,Cd,Dd,Jd,Hd,Fd,xd,Pd,Rd,Qd,Sd,Td,Ud,Vd,Wd,Xd,Yd,Zd,$d,be,ce,de,fe,ie,he,ke,je,le,me,ne,oe,pe,qe,re,se,te,xe,ye,we,Be,Ae,Ke,Je,Ie,Le,Me,Oe,Pe,Re,Te,Ue,Ve,We,Xe,Ze,af,bf,cf,ef,ff,gf,hf,jf,kf,qf,rf,ve, sf,pf,wf,zf,Bf,Df,Ff,Hf,Qf,Sf,Uf,Wf,Yf,Zf,$f,vf,ag,Af,xf,Ef,Gf,Cf,uf,bg,Tf,cg,If,Rf,Vf,Xf,dg,gg,fg,eg,jg,kg,lg,mg,ng,og,ig,rg,qg,tg,ug,pg,sg,wg,xg,yg,Bg,zg,Eg,Fg,Lg,Mg,Kg,Gg,Hg,Ng,Pg,Ig,Qg,Rg,Jg,Sg,Tg,Ug,Vg,Wg,Zg,Yg,Xg,$g,ch,eh,hh,dh,ih,fh,jh,kh,lh,mh,nh,ph,qh,gh,sh,rh,th,ah,oh,uh,wh,xh,yh,Jh,Nh,Lh,Uh,Mh,Vh,Rh,Yh,Zh,ai,di,bi,gi,hi,ii,ji,ki,li,mi,ni,oi,pi,qi,ri,si,ti,ui,vi,wi,xi,yi,I,Ai,Bi,Ci,Ei,Fi,Gi,Hi,Ii,Ji,Ki,Li,Mi,Ni,Oi,Pi,Qi,Ri,Si,Ti,Ui,zi,Vi,Xi,Yi,Zi,$i,aj,bj,cj,dj,ej,fj,Di,gj,hj,ij,jj,kj,lj, mj,nj,oj,sj,tj,uj,vj,wj,xj,yj,zj,Aj,Bj,Cj,Dj,Ej,Fj,Gj,Ij,Jj,Kj,Lj,Mj,Nj,Pj,Qj,Rj,Sj,Tj,Uj,Vj,Wj,Xj,Yj,Zj,ak,bk,ck,dk,ek,fk,gk,hk,ik,jk,kk,lk,mk,nk,pk,qk,rk,K,vk,xk,yk,zk,Ak,Ck,Dk,Ek,Hk,Ik,Lk,Nk,Mk,Kk,Uk,Vk,Xk,Yk,Zk,Wk,$k,al,bl,dl,fl,hl,il,jl,el,cl,kl,ll,gl,ml,nl,pl,ql,rl,sl,vl,Al,tl,ul,zl,xl,yl,Bl,Cl,Dl,El,Fl,Gl,Hl,Il,Jl,Kl,Nl,Ll,Ol,Pl,Ql,Rl,Tl,Ul,Sl,Vl,Wl,Xl,Yl,Zl,$l,L,bm,cm,dm,em,fm,gm,hm,im,jm,km,mm,lm,nm,am,qm,rm,sm,xm,wm,ym,Am,Bm,vm,tm,om,Cm,Dm,Em,um,Fm,Gm,Hm,Im,Jm,Km,Lm,pm,Mm,zm,Nm,Om,Pm,Qm, Rm,Tm,Um,Wm,Vm,Xm,Ym,$m,an,bn,cn,dn,en,gn,kn,ln,mn,nn,on,qn,M,rn,sn,tn,un,zn,An,Cn,Dn,En,Fn,Gn,Hn,In,Jn,Tn,Un,Vn,Sn,Rn,On,Pn,Yn,Nn,Mn,$n,ao,Zn,bo,co,eo,fo,go,ho,io,jo,ko,lo,mo,po,no,qo,to,uo,wo,vo,yo,zo,Ao,Bo,Co,Eo,Fo,Go,Ho,Io,Jo,Do,Ko,Lo,Mo,No,Oo,Po,Qo,Ro,So,Wo,Xo,To,Yo,Vo,Zo,$o,ep,ap,fp,gp,hp,dp,cp,jp,ip,kp,lp,mp,N,op,up,vp,wp,xp,Ap,Bp,Ep,Fp,Hp,Gp,Ip,Jp,Kp,qp,hq,sp,iq,jq,nq,oq,O,rq,qq,sq,tq,vq,yq,zq,Aq,Cq,Dq,Eq,Hq,Fq,Gq,Iq,Kq,Lq,Mq,Nq,Oq,Sq,Tq,Yq,Zq,$q,ar,Qq,er,fr,lr,dr,Vq,gr,kr,Xq,jr,pr,or,nr, hr,ir,Wq,cr,Uq,Pq,rr,sr,vr,wr,xr,zr,Ar,Br,Cr,Dr,Er,da,ca;aa=function(a){var b=0;return function(){return b2){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)}}; _.Ta=function(a,b,c){_.Ta=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?Ra:Sa;return _.Ta.apply(null,arguments)};_.Ua=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}}; _.Va=function(a,b){function c(){}c.prototype=b.prototype;a.ec=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.ku=function(d,e,f){for(var g=Array(arguments.length-2),k=2;k=0}; _.ab=function(a,b){b=Ya(a,b);var c;(c=b>=0)&&Array.prototype.splice.call(a,b,1);return c};cb=function(a,b,c,d){return Array.prototype.splice.apply(a,bb(arguments,1))};bb=function(a,b,c){return arguments.length<=2?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};fb=function(a,b){if(!_.Ka(a)||!_.Ka(b)||a.length!=b.length)return!1;for(var c=a.length,d=db,e=0;e=f.value}e&&(b=b||jb,e=rb(tb(),a.g()),typeof c==="function"&&(c=c()),ub||(ub=new hb),a=new kb(b,c,a.g()),a.g=d,ob(e,a))};_.z=function(a,b,c){a&&vb(a,wb,b,c)}; _.A=function(a,b,c){a&&vb(a,xb,b,c)};_.B=function(a,b,c){a&&vb(a,yb,b,c)};_.Ab=function(a,b){a&&vb(a,zb,b)};Bb=function(){return!(!cast.__platform__||!cast.__platform__.metrics)};Db=function(a){var b=Number.isSafeInteger(a);b||_.z(Cb,"Expected integer but got "+typeof a+" with value "+a);return b};Eb=function(a){a=typeof a;var b=a==="string";b||_.z(Cb,"Expected string but got "+a);return b}; Fb=function(a,b){var c;if(c=Eb(a)){c=typeof b;var d=c==="boolean";d||_.z(Cb,"Expected boolean but got "+c);c=d}c&&Bb()&&cast.__platform__.metrics.logBoolToUma(a,b)};C=function(a){Eb(a)&&Bb()&&cast.__platform__.metrics.logEventToUma(a)};Gb=function(a,b,c,d,e){Eb(a)&&Db(b)&&Db(c)&&Db(d)&&Db(e)&&Bb()&&cast.__platform__.metrics.logHistogramValueToUma(a,b,c,d,e)};D=function(a,b){b=Math.trunc(b);Eb(a)&&Db(b)&&Bb()&&cast.__platform__.metrics.logIntToUma(a,b)}; _.Hb=function(a){a&&typeof a.dispose=="function"&&a.dispose()};_.E=function(){this.I=this.I;this.D=this.D};_.Ib=function(a,b){a.I?b():(a.D||(a.D=[]),a.D.push(b))};_.Lb=function(a,b){this.type=a;this.g=this.target=b;this.defaultPrevented=!1};_.Mb=function(a,b){return a.lastIndexOf(b,0)==0};Ob=function(a,b){return Nb(b,a.slice(0,b.length))==0};Pb=function(a,b){return Nb(b,a.slice(a.length-b.length))==0};Nb=function(a,b){a=String(a).toLowerCase();b=String(b).toLowerCase();return a0:!1};_.Vb=function(a){_.Vb[" "](a);return a}; Wb=function(a,b){_.Lb.call(this,a?a.type:"");this.relatedTarget=this.g=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=0;this.key="";this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.pointerId=0;this.pointerType="";this.l=null;if(a){var c=this.type=a.type,d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.g=b;b=a.relatedTarget;b||(c=="mouseover"?b=a.fromElement:c=="mouseout"&&(b=a.toElement)); this.relatedTarget=b;d?(this.clientX=d.clientX!==void 0?d.clientX:d.pageX,this.clientY=d.clientY!==void 0?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0):(this.clientX=a.clientX!==void 0?a.clientX:a.pageX,this.clientY=a.clientY!==void 0?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0);this.button=a.button;this.key=a.key||"";this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.pointerId=a.pointerId||0;this.pointerType= a.pointerType;this.state=a.state;this.l=a;a.defaultPrevented&&Wb.ec.j.call(this)}};_.Yb=function(a){return!(!a||!a[Xb])};ac=function(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.Ge=e;this.key=++$b;this.Gd=this.oe=!1};bc=function(a){a.Gd=!0;a.listener=null;a.proxy=null;a.src=null;a.Ge=null};_.cc=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)};_.ec=function(a,b){for(var c in a)if(a[c]==b)return!0;return!1}; _.fc=function(a){var b={},c;for(c in a)b[c]=a[c];return b}; gc=function(a){if(!a||typeof a!=="object")return a;if(typeof a.clone==="function")return a.clone();if(typeof Map!=="undefined"&&a instanceof Map)return new Map(a);if(typeof Set!=="undefined"&&a instanceof Set)return new Set(a);if(a instanceof Date)return new Date(a.getTime());var b=Array.isArray(a)?[]:typeof ArrayBuffer!=="function"||typeof ArrayBuffer.isView!=="function"||!ArrayBuffer.isView(a)||a instanceof DataView?{}:new a.constructor(a.length),c;for(c in a)b[c]=gc(a[c]);return b}; _.ic=function(a,b){for(var c,d,e=1;e1)));g=g.next)e||(f=g);e&&(c.g==0&&d==1?Bd(c,b):(f?(d=f,d.next==c.o&&(c.o=d),d.next=d.next.next):Cd(c),Dd(c,e,3,b)))}a.l=null}else nd(a,3,b)};zd=function(a,b){a.j||a.g!=2&&a.g!=3||Ed(a);a.o?a.o.next=b:a.j=b;a.o=b}; Gd=function(a,b,c,d){var e=rd(null,null,null);e.g=new od(function(f,g){e.o=b?function(k){try{var l=b.call(d,k);f(l)}catch(m){g(m)}}:f;e.j=c?function(k){try{var l=c.call(d,k);l===void 0&&k instanceof Fd?g(k):f(l)}catch(m){g(m)}}:g});e.g.l=a;zd(a,e);return e.g};nd=function(a,b,c){a.g==0&&(a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself")),a.g=1,td(c,a.Os,a.Ps,a)||(a.C=c,a.g=b,a.l=null,Ed(a),b!=3||c instanceof Fd||Hd(a,c)))}; td=function(a,b,c,d){if(a instanceof od)return zd(a,rd(b||_.Ic,c||null,d)),!0;if(a)try{var e=!!a.$goog_Thenable}catch(g){e=!1}else e=!1;if(e)return a.then(b,c,d),!0;if(_.Na(a))try{var f=a.then;if(typeof f==="function")return Id(a,f,b,c,d),!0}catch(g){return c.call(d,g),!0}return!1};Id=function(a,b,c,d,e){function f(l){k||(k=!0,d.call(e,l))}function g(l){k||(k=!0,c.call(e,l))}var k=!1;try{b.call(a,g,f)}catch(l){f(l)}};Ed=function(a){a.D||(a.D=!0,jd(a.lp,a))}; Cd=function(a){var b=null;a.j&&(b=a.j,a.j=b.next,b.next=null);a.j||(a.o=null);return b};Dd=function(a,b,c,d){if(c==3&&b.j&&!b.l)for(;a&&a.B;a=a.l)a.B=!1;if(b.g)b.g.l=null,Jd(b,c,d);else try{b.l?b.o.call(b.context):Jd(b,c,d)}catch(e){Kd.call(null,e)}Hc(qd,b)};Jd=function(a,b,c){b==2?a.o.call(a.context,c):a.j&&a.j.call(a.context,c)};Hd=function(a,b){a.B=!0;jd(function(){a.B&&Kd.call(null,b)})};Fd=function(a){Xa.call(this,a)};xd=function(a,b,c){this.promise=a;this.resolve=b;this.reject=c}; _.Od=function(a,b){_.Bc.call(this);this.l=a||1;this.g=b||_.u;this.o=(0,_.Ta)(this.ys,this);this.B=Date.now()};Pd=function(a,b,c){if(typeof a==="function")c&&(a=(0,_.Ta)(a,c));else if(a&&typeof a.handleEvent=="function")a=(0,_.Ta)(a.handleEvent,a);else throw Error("Invalid listener argument");return Number(b)>2147483647?-1:_.u.setTimeout(a,b||0)};Rd=function(a){_.Bc.call(this);a||(a={});this.o=a.Io!=0;this.l=a.pu||Qd;this.B=a.binaryType||"blob";this.g=this.l(this.Fd)}; Qd=function(a){return Math.min(Math.pow(2,a)*1E3,6E4)};Sd=function(a,b,c){_.Lb.call(this,"a");this.code=a;this.reason=b;this.wasClean=c};Td=function(a){_.Lb.call(this,"c");this.message=a};Ud=function(a){_.Lb.call(this,"b");this.data=a};Vd=function(){this.j=new _.Bc;this.g=!1};Wd=function(a,b){b=typeof b==="string"?new _.Lb(b):b;b.target=a;a.j.dispatchEvent(b)};Xd=function(){this.playbackType=0;this.deviceName=""};Yd=function(a){return Ob(a,"text/")||a==="application/ttml+xml"}; Zd=function(a){if(!a)return 100;switch(a.code){case MediaError.MEDIA_ERR_ABORTED:return 101;case MediaError.MEDIA_ERR_NETWORK:return 103;case MediaError.MEDIA_ERR_DECODE:return 102;case MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:return 104;default:return 100}};$d=function(a,b){a=[a];for(var c=b.length-1;c>=0;--c)a.push(typeof b[c],b[c]);return a.join("\v")}; be=function(a){var b=ae[a];return b?b:_.Mb(a,"avc1")?ae.avc1:_.Mb(a,"mp4a.40")?ae["mp4a.40"]:_.Mb(a,"hev1.2")?ae["hev1.2"]:_.Mb(a,"hev1")?ae.hev1:_.Mb(a,"dvhe")?ae.dvhe:_.Mb(a,"mhm1")?ae.mhm1:_.Mb(a,"vp09.01")?ae["vp09.01"]:_.Mb(a,"vp09.02")?ae["vp09.02"]:ae.Bm}; ce=function(a,b){a:{if(b){if(Ob(b,"video/")){b="Video";break a}if(Ob(b,"audio/")){b="Audio";break a}}b=void 0}if(b!==void 0){D("Cast.Shaka.Available"+b+"Bitrates",a.length);for(var c=0;c0&&(c=Math.min(a.j[b],2E3));return c}; we=function(a,b,c,d){if(c==="urn:x-cast:com.google.cast.media"&&(a.o.g[c]||null).o=="STRING")try{d=JSON.parse(d)}catch(k){return _.z(ze,"Parse failed: "+d),!1}var e=d.type;c==="urn:x-cast:com.google.cast.media"&&e=="MEDIA_STATUS"&&d.status&&d.status[0]&&(a.D=d.status[0].mediaSessionId);if(b!=="__inject__"&&b!=="*:*")return!1;b=b==="*:*";var f=d.requestId,g=a.g.get(f);if(f===void 0)return b||_.A(ze,"No requestId in "+d),!b;if(c==="urn:x-cast:com.google.cast.media"){switch(e){case "INVALID_REQUEST":case "INVALID_PLAYER_STATE":case "LOAD_CANCELLED":case "LOAD_FAILED":case "ERROR":c= d.reason;a.l={type:"ERROR",code:c?c:e};break;case "MEDIA_STATUS":g&&(a.g.delete(f),Ae(a,g,f))}return!b}if(!g)return _.z(ze,"Request not found "+f),!b;a.g.delete(f);if(c!=="urn:x-cast:com.google.cast.cac")return _.z(ze,"Unsupported namespace "+c),!b;e=d;switch(e.type){case "SUCCESS":Ae(a,g,f,Object.getOwnPropertyNames(d).some(function(k){return k!="type"&&k!="requestId"&&d[k]!==void 0})?JSON.stringify(d):void 0);break;case "ERROR":Be(a,"Wrapped error",g,f,"WRAPPED_ERROR",e);break;default:Be(a,"Unknown message type "+ d,g,f)}return!b};Be=function(a,b,c,d,e,f){_.z(ze,b);a.B.send(c,new Ie(d,e||"INJECT_ERROR",f!==void 0?JSON.stringify(f):void 0));e=="WRAPPED_ERROR"?cast.receiver.Oa.Kg(f&&f.code||""):cast.receiver.Oa.Kg("INJECT_ERROR")};Ae=function(a,b,c,d){a.B.send(b,new Je(c,d));cast.receiver.Oa.Kg("SUCCESS")};Ke=function(a,b,c){this.type=a;this.requestId=b;this.data=c};Je=function(a,b){Ke.call(this,"SUCCESS",a,b)};Ie=function(a,b,c){Ke.call(this,"ERROR",a,c);this.code=b};Le=function(){this.j=new Map;this.g=null}; Me=function(a,b){(b=(b=b.match(RegExp('(?:codecs="([^"]+)")|(?:codecs=([^"]+))')))&&(b[1]||b[2]))&&b.trim().split(",").forEach(function(c){ee(a,be(c.trim()))})};Oe=function(a){var b=MediaSource.prototype.addSourceBuffer;a.j.set("addSourceBuffer",b);MediaSource.prototype.addSourceBuffer=function(){var c=b.apply(this,arguments),d=arguments[0];if(d)try{Me("Cast.Receiver.ActiveCodec",d);var e=d.match(/^(\w+\/[-+.\w]+)/);e&&ee("Cast.Receiver.ActiveMimeType",Ne[e[0].trim()]||0)}catch(f){}return c}}; Pe=function(a){if(navigator.mediaCapabilities){var b=navigator.mediaCapabilities.decodingInfo;a.g=b;navigator.mediaCapabilities.decodingInfo=function(){var c=this,d=arguments,e,f;return Aa(function(g){if(g.g==1)return qa(g,b.apply(c,d),2);e=g.j;if(f=d[0])try{f.video&&f.video.contentType&&Me("Cast.Receiver.QueriedCodec",f.video.contentType),f.audio&&f.audio.contentType&&Me("Cast.Receiver.QueriedCodec",f.audio.contentType)}catch(k){}return g.return(e)})}}};_.Qe=function(){this.g=null}; Re=function(a){a.g=a.g||Fc("receiver-flags")||null;return a.g};_.Se=function(a,b,c){c=c===void 0?!1:c;return(a=Re(a))&&a.hasOwnProperty(b)?!!a[b]:c};Te=function(){var a=_.Qe.K();return _.Se(a,"use_new_android_tablet_ui",!0)};Ue=function(){var a=_.Qe.K();return(a=Re(a))&&a.shaka_version_for_w_release||null};Ve=function(){var a=_.Qe.K();return _.Se(a,"create_seek_break_only_for_multiple_breaks",!0)};We=function(){var a=_.Qe.K();return _.Se(a,"tear_down_on_recoverable_error",!1)}; Xe=function(){var a=_.Qe.K();return _.Se(a,"mirror_crossorigin_exactly",!0)};_.Ye=function(){var a=_.Qe.K();return _.Se(a,"ignore_allow_multiple_adds",!0)};Ze=function(){var a=Fc("device-capabilities");return!(!a||!a.touch_input_supported)};af=function(){var a;(a=Fc("device-capabilities"))&&a.display_supported?Ze()?(a=_.Qe.K(),a=_.Se(a,"is_android")?4:3):(a=_.Qe.K(),a=_.Se(a,"enable_dpad_ui")?2:1):a=5;_.B($e,"Device Type = "+a);return a}; bf=function(){var a=this;this.promise=new Promise(function(b,c){a.resolve=b;a.reject=c})};cf=function(){this.g=Date.now()};ef=function(a){this.o=a||"";df||(df=new cf);this.B=df};ff=function(a){return a<10?"0"+a:String(a)};gf=function(a){ef.call(this,a)}; hf=function(a,b){var c=[];c.push(a.o," ");if(a.j){var d=new Date(b.l);c.push("[",ff(d.getFullYear()-2E3)+ff(d.getMonth()+1)+ff(d.getDate())+" "+ff(d.getHours())+":"+ff(d.getMinutes())+":"+ff(d.getSeconds())+"."+ff(Math.floor(d.getMilliseconds()/10)),"] ")}d=c.push;var e=a.B.get();e=(b.l-e)/1E3;var f=e.toFixed(3),g=0;if(e<1)g=2;else for(;e<100;)g++,e*=10;for(;g-- >0;)f=" "+f;d.call(c,"[",f,"s] ");c.push("[",b.j,"] ");c.push(b.B);a.l&&(b=b.g,b!==void 0&&c.push("\n",b instanceof Error?b.message:String(b))); a.g&&c.push("\n");return c.join("")};jf=function(){this.B=(0,_.Ta)(this.l,this);this.g=new gf;this.g.j=!1;this.g.l=!1;this.j=this.g.g=!1;this.o={}};kf=function(a,b,c,d){if(a[b])a[b](c,d===void 0?"":d);else a.log(c,d===void 0?"":d)}; _.ue=function(){_.E.call(this);lf||(lf=new jf);if(lf){var a=lf;if(1!=a.j){var b=rb(tb(),"").Wb,c=a.B;b&&rb(tb(),b.g()).j.push(c);a.j=!0}}this.j=_.fc(mf);this.W=!1;this.R=new ie;this.B={};this.O=new _.Bc;this.l=new pe(cast.receiver.ua.fe,this.R,Object.keys(this.B),"JSON");_.Ib(this,_.Ua(_.Hb,this.l));this.o=this.L=this.T=null;this.fa=!1;this.G=this.J=null;this.C="notstarted";this.pa=null;this.la=0;this.g={};this.Z=this.V=this.ea=this.da=this.ca=null;this.ma=this.ka=!1;this.l.addEventListener(cast.receiver.ua.Ra, this.nr.bind(this));_.nc(window,"unload",this.Vg,!1,this);nf||D(cast.receiver.F.H.wo,Number(cast.receiver.Jf));of&&of(this);this.na=new bf;this.M=new bf;(a=Fc("device-capabilities"))&&pf(this,a)};qf=function(a){var b=a.toLocaleLowerCase();return["com.vizio.vue","com.vizio.smartcast"].some(function(c){return b.includes(c)})};rf=function(a,b,c){var d={type:"setappstate"};b!=void 0&&(d.statusText=b);c!=void 0&&(d.dialData=c);a.l.send(cast.receiver.ua.Ra,d)}; ve=function(a,b,c){if(b==cast.receiver.ua.fe)throw Error("Protected namespace");if(!_.Mb(b,cast.receiver.ua.xm))throw Error("Invalid namespace prefix");if(!a.g[b]){if(a.fa)throw Error("New namespaces can not be requested after start has been called");a.g[b]=new pe(b,a.R,Object.keys(a.B),c);_.Ib(a,_.Ua(_.Hb,a.g[b]))}if(c&&a.g[b].o!=c)throw Error("Invalid messageType for the namespace");return a.g[b]}; sf=function(a){var b=Object.keys(a.g),c=a.j.statusText,d=a.j.ip,e={type:"ready"};c&&(e.statusText=c);d&&(e.dialData=d);e.activeNamespaces=b;var f;e.version=(f=nf)!=null?f:cast.receiver.VERSION+"."+cast.receiver.Jf;e.messagesVersion=cast.receiver.ua.vl;e.sdkCapabilities={show_media_controls_supported:!0,group_capabilities_supported:!0,playback_device_status_supported:!0};a.l.send(cast.receiver.ua.Ra,e);a.j.maxInactivity&&a.sf(a.j.maxInactivity)}; pf=function(a,b){var c;a.o=b?_.fc(b):{};if(Dc()){a.o.hasOwnProperty("is_hdr_supported")||(a.o.is_hdr_supported=cast.__platform__.canDisplayType("video/mp4; codecs=hev1.2.4.L153.B0; eotf=smpte2084"));a.o.hasOwnProperty("is_dv_supported")||(a.o.is_dv_supported=cast.__platform__.canDisplayType("video/mp4; codecs=dvhe.04.06"));var d=!a.o.hasOwnProperty("is_dolby_atmos_supported");b=(c=_.u.navigator.userAgent.match(/CrKey\/(\d+)\.(\d+)\.[\d]{6}/))&&parseFloat(c[1])||-1;c=c&&parseFloat(c[2])||-1;d&&b>= 1&&c>=47&&(a.o.is_dolby_atmos_supported=cast.__platform__.canDisplayType("audio/mp4; codecs=ec-3; spatialRendering=true"));Fc("enabled-for-dev")&&(a.o.is_device_registered=!0);Fc("enable-hls-sample-aes")&&(a.o.is_cbcs_supported=!0)}}; wf=function(a,b){var c=b.launchingSenderId,d=Object.keys(a.g);pf(a,b.deviceCapabilities);a.T={id:b.applicationId,name:b.applicationName,iconUrl:b.iconUrl,sessionId:b.sessionId,namespaces:d,launchingSenderId:c,launchedFrom:b.launchedFrom||"UNKNOWN"};a.C="ready";for(var e in a.g)a.g[e].G=!0;a.na.resolve(a.T);a.W&&(a.W=!1,rf(a,a.j.statusText,a.j.ip));_.B(tf,"Dispatching CastReceiverManager system ready event");b=new uf(a.T);a.ca&&a.ca(b);vf(a,b)}; zf=function(a,b){if(qf(b.id))_.B(tf,"Ignored connection from "+b.id);else{_.B(tf,"Dispatching CastReceiverManager sender connected event ["+b.id+"]");b.id in a.B&&_.z(tf,"Unexpected connected message for already connected sender: "+b.id);a.B[b.id]=b;var c=new xf(b.id,b.userAgent),d;for(d in a.g){var e=a.g[d],f=b.id;f in e.g?_.z(yf,"Unexpected sender already registered ["+e.j+", "+f+"]"):(_.B(yf,"Registering sender ["+e.j+", "+f+"]"),e.g[f]=null)}a.getSenders().length>1&&!a.ma&&(C(cast.receiver.F.H.tm), a.ma=!0);vf(a,c)}}; Bf=function(a,b,c){if(qf(b))_.B(tf,"Ignored disconnection from "+b);else{switch(c){case "closed_by_peer":c="requested_by_sender";break;case "transport_invalid_message":c="error";break;default:c="unknown"}_.B(tf,"Dispatching sender disconnected event ["+b+"] Reason: "+c);if(b in a.B){var d=a.B[b].userAgent;delete a.B[b];c=new Af(b,d,c);for(var e in a.g){d=a.g[e];var f=b;f in d.g&&(_.B(yf,"Unregistering sender ["+d.j+", "+f+"]"),d.g[f]&&d.g[f].close(),delete d.g[f])}vf(a,_.fc(c));a.da&&a.da(c)}else _.z(tf, "Unknown sender disconnected: "+b)}};Df=function(a,b){a.pa=b;_.B(tf,"Dispatching system volume changed event ["+b.level+", "+b.muted+"]");vf(a,new Cf(b))};Ff=function(a,b){b==a.J?_.B(tf,"Ignoring visibility changed event, state is already "+b):(_.B(tf,"Dispatching visibility changed event "+b),a.J=b,b=new Ef(b!=0),a.ea&&a.ea(b),vf(a,b))};Hf=function(a,b){b!=a.G&&(_.B(tf,"Dispatching standby changed event "+b),a.G=b,vf(a,new Gf(b==1)))}; Qf=function(a,b){_.B(tf,"Dispatching showmediacontrols "+b);a.la=b;vf(a,new If(b))};Sf=function(a,b){_.B(tf,"Dispatching maxvideoresolutionchanged "+b);vf(a,new Rf(b))};Uf=function(a){_.B(tf,"Dispatching feedback started event");var b=new Tf;a.V?a.V(b):a.Hd("")};Wf=function(a,b){var c=new Vf;c.capabilities=b.capabilities;vf(a,c)}; Yf=function(a,b){var c=new Xf;c.requestId=b.requestId;c.newGroupCapabilities=b.newGroupCapabilities;a.l.send(cast.receiver.ua.Ra,{type:"allowgroupchangeresponse",requestId:c.requestId,allowChange:!0,reason:void 0});vf(a,c)}; Zf=function(a,b){_.B(tf,"Touchscreen-optimized app: "+b);(cast.__platform__&&typeof cast.__platform__.setTouchInputSupport==="function"?cast.__platform__.setTouchInputSupport(b):Promise.reject()).then(function(c){_.B(tf,function(){return"Touch supported options: "+JSON.stringify(c)});b?a.M.resolve("touch-optimized"):c&&c.displayControls?a.M.resolve("non-touch-optimized"):a.M.resolve("no-controls")},function(){_.B(tf,"Touch support is blocked");a.M.resolve("no-controls")});a.ka=!0}; $f=function(a){return Ze()?a.M.promise:Promise.resolve("no-controls")};vf=function(a,b){b.target=a;var c=!1;try{c=a.O.dispatchEvent(b)}catch(d){window.setTimeout(function(){throw d;},0)}return c};ag=function(a,b){_.Lb.call(this,a);this.data=b};Af=function(a,b,c){ag.call(this,"senderdisconnected",a);this.senderId=a;this.userAgent=b;this.reason=c};xf=function(a,b){ag.call(this,"senderconnected",a);this.senderId=a;this.userAgent=b};Ef=function(a){ag.call(this,"visibilitychanged",a);this.isVisible=a}; Gf=function(a){ag.call(this,"standbychanged",null);this.isStandby=a};Cf=function(a){ag.call(this,"systemvolumechanged",a);this.data=a};uf=function(a){ag.call(this,"ready",a);this.data=a};bg=function(){ag.call(this,"shutdown",null)};Tf=function(){ag.call(this,"feedbackstarted",null)};cg=function(a){ag.call(this,"playbackdevicestatus",null);this.playbackDeviceStatus=a};If=function(a){ag.call(this,"showmediacontrols",null);this.mediaControlsState=a}; Rf=function(a){ag.call(this,"maxvideoresolutionchanged",null);this.height=a};Vf=function(){ag.call(this,"groupcapabilities",null);this.capabilities=void 0};Xf=function(){ag.call(this,"allowgroupchange",null);this.newGroupCapabilities=void 0};dg=function(){this.J=this.G=this.C=this.I=this.D=this.l=this.o=null;this.B=_.ue.K();this.g=ve(this.B,"urn:x-cast:com.google.cast.cac","JSON");this.g.l=this.L.bind(this);this.j=new Map}; gg=function(a,b,c,d){var e,f,g,k,l;Aa(function(m){if(m.g==1)return m.l=2,qa(m,d(c),4);if(m.g!=2)return e=m.j,f=eg(c,e),a.g.send(b,f),sa(m);g=ta(m);if(((k=g)==null?void 0:k.type)==="ERROR")l=eg(c,g),a.g.send(b,l);else{var n="Got a rejected promise "+JSON.stringify(g);fg(n,c,"APP_ERROR");a.g.send(b,fg(n,c,"APP_ERROR"))}m.g=0})};fg=function(a,b,c){_.z(hg,a);a=new ig(c);a.requestId=b.requestId;return a}; eg=function(a,b){if(!b)return fg("No response data",a,"APP_ERROR");switch(b.type){case "SUCCESS":case "ERROR":return b.requestId=a.requestId,b}return fg("Invalid response data "+JSON.stringify(b),a,"APP_ERROR")};jg=function(a,b,c){if(b){var d=a.j.get(b);d?(a.j.delete(b),d(c)):_.A(hg,"No matching request for response "+JSON.stringify(c))}};kg=function(a){this.type=a};lg=function(){this.type="REFRESH_CREDENTIALS"};mg=function(a,b){this.type="PLAY_STRING";this.stringId=a;this.arguments=b}; ng=function(a){this.type=a};og=function(a){this.type="SUCCESS";this.status=a};ig=function(a,b,c){this.type="ERROR";this.code=a;this.reason=b;this.customData=c};rg=function(a,b,c){_.E.call(this);var d=this;this.o=b;this.G=c;this.C=_.ue.K();this.g=this.B=null;this.l=new bf;this.j=new bf;ve(_.ue.K(),"urn:x-cast:com.google.cast.cac","JSON");var e=af()===2?3:af()===3?1:af()===4?Te()?2:1:af()===1?4:0;Promise.all([a(e),this.C.Td(),pg()]).then(function(){qg(d,e)})}; qg=function(a,b){b===0?(sg(cast.receiver.F.fc.zm),a.j.resolve(!1),a.l.resolve(!1)):Ze()?(tg(a,document),$f(a.C).then(function(c){c==="touch-optimized"?(sg(cast.receiver.F.fc.po),a.g=a.o(!0),a.l.resolve(!0),a.j.resolve(!0)):(c==="non-touch-optimized"?(a.g=a.o(!1),sg(cast.receiver.F.fc.no),a.j.resolve(!0)):(sg(cast.receiver.F.fc.oo),a.j.resolve(!1)),a.l.resolve(!1))})):Fc("dpad-controls-overlay-disabled")?(sg(cast.receiver.F.fc.qo),a.j.resolve(!1),a.l.resolve(!1)):af()===2?(a.g=a.o(!0),b=a.g.getTouchControlsElement(), tg(a,b,!0),a.j.resolve(!0),a.l.resolve(!0),sg(cast.receiver.F.fc.ro)):(tg(a,document),a.j.resolve(!1),a.l.resolve(!1),sg(cast.receiver.F.fc.so))};tg=function(a,b,c){a.B=a.G(b,c===void 0?!1:c)};ug=function(a,b){Aa(function(c){if(c.g==1)return qa(c,a.l.promise,2);c.j&&b.call(a);c.g=0})};pg=function(){return Aa(function(a){return a.return(new Promise(function(b){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){b()}):b()}))})}; sg=function(a){_.B(vg,"Controls type is: "+a);D(cast.receiver.F.H.lk,a)};wg=function(){var a=_.ue.K();this.M=ve(a,"urn:x-cast:com.google.cast.debugoverlay","JSON");this.M.l=this.L.bind(this);this.j=this.g=this.D=this.B=null;this.l=[];this.o=[];this.C=null};xg=function(a){a.g||a.j||(a.l.length=0,a.o.length=0,a.J(),a.g||(a.j=window.setInterval(a.J.bind(a),1E3)))}; yg=function(a){if(a.g||a.j)a.B&&(document.body.removeChild(a.B.parentElement),a.B=null),a.D&&(window.clearInterval(a.D),a.D=null),a.g&&(xc(a.g,"seeking",a.G,!1,a),a.g=null),a.j&&(window.clearInterval(a.j),a.j=null)}; Bg=function(a,b){if(zg(b)){_.B(Ag,"found active video");a.g=b;b=document.createElement("div");b.style.cssText="position:fixed;box-sizing:border-box;top:0;left:0;max-width:100vw;max-height:100vh;z-index:2000000;color:yellowgreen;text-shadow:1px 1px 2px #000;padding-left:5vw;padding-top:5vh;margin:0;font-size:24px;pointer-events:none;";var c=_.Ga("cast.framework.VERSION"),d=cast.receiver.Jf,e="";c?e="CAF: "+c+" ":d&&(e+="V2: "+d+" ");c=document.createTextNode("");b.appendChild(c);c.textContent=e;e= document.createTextNode("");b.appendChild(e);b.id="__CAST_DEBUG_OVERLAY__";document.body.appendChild(b);a.B=e;_.nc(a.g,"seeking",a.G,!1,a);a.j&&(window.clearInterval(a.j),a.j=null);a.D=window.setInterval(a.I.bind(a),1E3);a.I()}};zg=function(a){return!(!a.src||a.error||a.ended||!(a.readyState>=1))}; Eg=function(a){if(!Cg.test(a))throw Error("'"+a+"' is not a valid alpha hex color");a.length==5&&(a=a.replace(Dg,"#$1$1$2$2$3$3$4$4"));a=a.toLowerCase();return[parseInt(a.slice(1,3),16),parseInt(a.slice(3,5),16),parseInt(a.slice(5,7),16),parseInt(a.slice(7,9),16)/255]};Fg=function(a){var b=a.slice(0);b[3]=Math.round(a[3]*1E3)/1E3;return"rgba("+b.join(",")+")"}; Lg=function(a,b,c,d){_.E.call(this);this.g=a;this.j=this.l=null;for(a=this.g;a.parentNode;)a=a.parentNode;this.B=a.toString().toLowerCase().indexOf("shadow")<0?document.head:a;this.o=[];this.G=!1;this.C="castcaptions"+Math.floor(Math.random()*1E6).toString();this.L="[data-"+this.C+"]::cue ";this.M=new RegExp(/^[\.'":%,;\s\-0-9a-z]+$/i);this.J=void 0;Gg(this,b);Hg(this);Ig(this);d&&Jg(this,d);Kg(this,c)}; Mg=function(a,b){a=_.q(a.o);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.track;b(c)?d.mode="showing":(d.mode="showing",d.mode="disabled")}};Kg=function(a,b){Mg(a,function(c){return _.$a(b,parseInt(c.id,10))})}; Gg=function(a,b){b=_.q(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;var d=c.trackContentId;if(c.type=="TEXT"&&d){var e=c.trackContentType;if(Pb(d,"vtt")||e!==void 0&&Nb(e,"text/vtt")==0)d=document.createElement("track"),d.src=c.trackContentId,d.id=c.trackId,d.label=c.name,d.srclang=c.language,d.kind=(c.subtype||"CAPTIONS").toLowerCase(),a.o.push(d)}}Ng(a);a.o.length>0&&!a.g.getAttribute("crossorigin")&&(a.g.setAttribute("crossorigin","anonymous"),a.G=!0);b=_.q(a.o);for(c=b.next();!c.done;c= b.next())c=c.value,a.g.contains(c)||a.g.appendChild(c)};Hg=function(a,b){if(b===void 0?0:b)delete a.g.dataset[a.C],a.B.contains(a.j)&&a.B.removeChild(a.j),a.l=null,a.j=null;else if(a.j)for(b=a.l.cssRules.length-1;b>=0;b--)a.l.deleteRule(b)};Ng=function(a){a.G&&(a.g.removeAttribute("crossorigin"),a.G=!1)};Pg=function(a,b,c){c==1||a.M.test(b)?a.l.insertRule(a.L+"{ "+b+" }",a.l.cssRules.length):_.A(Og,"Invalid css cue: "+b)}; Ig=function(a){if(!a.j){var b;a.B.getElementById?b=a.B.getElementById("cue-style"):b=document.getElementById("cue-style");b||(b=document.createElement("style"),b.id="cue-style",b.type="text/css",a.B.appendChild(b),b.appendChild(document.createTextNode("")));a.j=b;a.l=a.j.sheet}Pg(a,"font-size: 4.1vh;");Pg(a,"font-family: monospace;");Pg(a,"font-style: normal;");Pg(a,"font-weight: normal;");Pg(a,"background-color: black;");Pg(a,"color: white;");a.g.dataset[a.C]=""}; Qg=function(a,b){try{var c=Fg(Eg(a))}catch(d){_.A(Og,"Invalid color: "+a)}if(c)switch(a="rgba(204, 204, 204, "+parseInt(a.substring(7,9),16)+")",b){case "OUTLINE":return"text-shadow: 0 0 4px "+c+", 0 0 4px "+c+", 0 0 4px "+c+", 0 0 4px "+c+";";case "DROP_SHADOW":return"text-shadow: 0px 2px 3px "+c+", 0px 2px 4px "+c+", 0px 2px 5px "+c+";";case "RAISED":return"text-shadow: 1px 1px "+c+", 2px 2px "+c+", 3px 3px "+c+";";case "DEPRESSED":return"text-shadow: 1px 1px "+a+", 0 1px "+a+", -1px -1px "+c+", 0 -1px "+ c+";"}return""};Rg=function(a){switch(a){case "BOLD":return"font-weight: bold;";case "BOLD_ITALIC":return"font-style: italic; font-weight: bold;";case "ITALIC":return"font-style: italic;"}return"font-style: normal;"}; Jg=function(a,b){a.J=b;if(b.foregroundColor!==void 0)try{var c=Fg(Eg(b.foregroundColor));Pg(a,"color: "+c+";",!0)}catch(k){_.A(Og,"Invalid color: "+b.foregroundColor)}if(b.backgroundColor!==void 0)try{var d=Fg(Eg(b.backgroundColor));Pg(a,"background-color: "+d+";",!0)}catch(k){_.A(Og,"Invalid color: "+b.backgroundColor)}b.fontScale!==void 0&&Pg(a,"font-size: "+b.fontScale*100+"%;");if(b.fontFamily!==void 0||b.fontGenericFamily!==void 0){c=b.fontFamily;d=b.fontGenericFamily;var e="font-family: ",f= "";c!==void 0&&(e+='"'+c+'"',f=", ");if(d!==void 0){switch(d){case "SANS_SERIF":var g='"Droid Sans", sans-serif';break;case "MONOSPACED_SANS_SERIF":g='"Droid Sans Mono", monospace';break;case "SERIF":g='"Droid Serif", serif';break;case "MONOSPACED_SERIF":g='"Cutive Mono", serif-monospace';break;case "CASUAL":g='"Short Stack", casual';break;case "CURSIVE":g="Quintessential, cursive";break;case "SMALL_CAPITALS":g='"Alegreya Sans SC", sans-serif-smallcaps'}e+=f+g}Pg(a,e+";")}b.fontStyle!==void 0&&Pg(a, Rg(b.fontStyle));b.edgeType!==void 0&&(g=b.foregroundColor!==void 0?b.foregroundColor:"#FFFFFFFF",b=b.edgeColor!==void 0?Qg(b.edgeColor,b.edgeType):Qg(g,b.edgeType),Pg(a,b,!0))};Sg=function(a){this.itemId=a;this.customData=this.activeTrackIds=this.preloadTime=this.playbackDuration=this.startTime=this.autoplay=this.media=void 0};Tg=function(a){this.g=void 0;this.B="REPEAT_OFF";this.l=0;this.o=this.j=this.C=void 0;this.I=a;this.G=1;this.D=0}; Ug=function(a){a.D=0;a.g.forEach(function(b,c){b.orderId=c;a.D++})};Vg=function(a,b){a.o&&(a.o.shuffle=b)};Wg=function(a){return!(!a.o||!a.o.shuffle)};Zg=function(a,b){if(a.j)return Promise.resolve(a.j.initialize(b)).then(function(c){c?(Xg(a,c,!0,!0),Ug(a)):Yg(a,b)});Yg(a,b)};Yg=function(a,b){var c=b.queueData;c&&c.items?Xg(a,c):(c=new Sg(a.I()),c.media=b.media,c.autoplay=b.autoplay,c.activeTrackIds=b.activeTrackIds,c.customData=b.customData,c.itemId=1,a.g=[c],b.queueData&&$g(a,b.queueData));Ug(a)}; Xg=function(a,b,c,d){d=d===void 0?!1:d;ah(a,b,c===void 0?!1:c)||_.A(bh,"The passed in queueData is not completely valid: "+b);d&&b.items&&ch(b.items);a.g=b.items;$g(a,b)};$g=function(a,b){a.o=b;a.B=b.repeatMode||a.B;a.l=b.startIndex||0;a.C=b.startTime||void 0};ch=function(a){a=_.q(a);for(var b=a.next();!b.done;b=a.next())b=b.value,b.preloadTime=b.preloadTime!=null?b.preloadTime:0}; eh=function(a,b){var c=new oe;c.requestId=b;c.itemIds=a.sc().map(function(d){return d.itemId});c.sequenceNumber=dh(a,!1);return c}; hh=function(a,b){return new Promise(function(c,d){var e=void 0,f=a.l+b;f>=0&&f1?e=a.j.fetchItems.bind(a.j,f,b,0):b<-1?e=a.j.fetchItems.bind(a.j,f,0,-b):d("Should not be requesting more items on the current item"),Promise.resolve(e()).then(function(g){ch(g);var k=new me;if(g.length>0){_.B(bh,"Fetched more items "+g);var l=b>=0?void 0:a.g[0].itemId;gh(a,g,l);k.changeType= "INSERT";k.itemIds=g.map(function(m){return m.itemId});k.insertBefore=l;k.sequenceNumber=dh(a,!0)}else k.changeType="NO_CHANGE",k.sequenceNumber=dh(a,!1);c(k)},function(){return d("Failed to get more items from the queue.")}))})};dh=function(a,b){return b?a.G++:a.G-1};ih=function(a){return a.g!==void 0};fh=function(a){if(!(a.l<0)&&a.g)return a.g[a.l].itemId};jh=function(a,b){a.B=b;a.o&&(a.o.repeatMode=b)}; kh=function(a,b){for(var c=[],d=0;d=a.g.length&&(a.B=="REPEAT_ALL_AND_SHUFFLE"||a.B=="REPEAT_OFF")?null:a.g[(a.l+1)%a.g.length]}; ph=function(a,b){b=lh(a,b);if(b==-1||a.l==b)return!1;oh(a,b);return!0}; qh=function(a,b,c){if(b&&b.length!=0){for(var d=a.g[a.l].itemId,e=c!==void 0?c:-1,f=a.g.length-b.length,g=[],k=e==-1?!0:!1,l=0;l=e&&(a.l+=b.length);if(a.j&&a.j.onItemsInserted)a.j.onItemsInserted(b,c);Wg(a)?b.forEach(function(g){g.orderId=a.D;a.D++}):Ug(a);return b.map(function(g){return g.itemId})}; sh=function(a,b,c){if(a.l<0)return"QUEUE_ENDED";b=a.l+b;var d=!1;b>=a.g.length?(b=mh(a)?b%a.g.length:-1,d=!0):b<0&&(b=mh(a)?a.g.length+(b+1)%a.g.length-1:0,d=!0);c&&oh(a,b);return b==-1?"QUEUE_ENDED":d?(a.B==="REPEAT_ALL_AND_SHUFFLE"&&Vg(a,!0),Wg(a)?(rh(a),"QUEUE_SHUFFLED"):"QUEUE_LOOP"):"QUEUE_ACTIVE"};rh=function(a){var b=a.g.length;if(!(a.g.length<3))for(Vg(a,!0);b>0;){var c=Math.floor(Math.random()*b);--b;var d=a.g[c];a.g[c]=a.g[b];a.g[b]=d}}; th=function(a){a.g.length<3||(Vg(a,!1),a.g.sort(function(b,c){return b.orderId-c.orderId}))}; ah=function(a,b,c){c=c===void 0?!1:c;if(b.startIndex!==void 0&&(typeof b.startIndex!=="number"||b.startIndex<0))return _.z(bh,"Invalid startIndex "+b.startIndex),!1;var d=(b.startIndex||0)+1;if(!b.items||b.items.length=0&&b0&&a.l==a.g.length-1?hh(a,1):Promise.reject("No need to prefetch more for now.")};wh=function(a){return a===vh?2:a==="__touch_controls__"?3:a==="system-0"?4:a==="__physical_remote__"?5:a==="*:*"?6:1};xh=function(){};yh=function(a){var b;(b=a.g)||(b=a.g={});return b};Jh=function(){}; _.Kh=function(a){_.Bc.call(this);this.headers=new Map;this.da=a||null;this.l=!1;this.R=this.g=null;this.Z=this.O="";this.B=0;this.C="";this.o=this.V=this.M=this.T=!1;this.G=0;this.L=null;this.ca="";this.W=!1};Nh=function(a,b){a.l=!1;a.g&&(a.o=!0,a.g.abort(),a.o=!1);a.C=b;a.B=5;Lh(a);Mh(a)};Lh=function(a){a.T||(a.T=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))}; Uh=function(a){if(a.l&&typeof Oh!="undefined")if(a.R[1]&&_.Ph(a)==4&&_.Qh(a)==2)_.Ab(a.Y,Rh(a,"Local request error detected and ignored"));else if(a.M&&_.Ph(a)==4)Pd(a.dj,0,a);else if(a.dispatchEvent("readystatechange"),_.Ph(a)==4){_.Ab(a.Y,Rh(a,"Request complete"));a.l=!1;try{var b=_.Qh(a);a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=b===0){var f=String(a.O).match(_.Sh)[1]||null;!f&&_.u.self&&_.u.self.location&& (f=_.u.self.location.protocol.slice(0,-1));e=!Th.test(f?f.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{a.B=6;try{var g=_.Ph(a)>2?a.g.statusText:""}catch(k){_.Ab(a.Y,"Can not get status: "+k.message),g=""}a.C=g+" ["+_.Qh(a)+"]";Lh(a)}}finally{Mh(a)}}}; Mh=function(a,b){if(a.g){Vh(a);var c=a.g,d=a.R[0]?function(){}:null;a.g=null;a.R=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){_.z(a.Y,"Problem encountered resetting onreadystatechange: "+e.message)}}};Vh=function(a){a.L&&(_.u.clearTimeout(a.L),a.L=null)};_.Ph=function(a){return a.g?a.g.readyState:0};_.Qh=function(a){try{return _.Ph(a)>2?a.g.status:-1}catch(b){return-1}};Rh=function(a,b){return b+" ["+a.Z+" "+a.O+" "+_.Qh(a)+"]"}; _.Wh=function(){return Reflect.construct(HTMLElement,[],this.constructor)};Yh=function(){var a=(0,cast.A.media.util.nf)(60);if(Xh.has("ACTIVE_PLAYER_LOGGING")&&Xh.get("ACTIVE_PLAYER_LOGGING"))return Xh.get("ACTIVE_PLAYER_LOGGING");a=new _.Od(a);Xh.set("ACTIVE_PLAYER_LOGGING",a);return Xh.get("ACTIVE_PLAYER_LOGGING")};Zh=function(){return Xh.has("ACTIVE_PLAYER_LOGGING")?Xh.get("ACTIVE_PLAYER_LOGGING"):null}; ai=function(a){return new Promise(function(b,c){var d=document.createElement("script");d.type="text/javascript";_.Wc(d,a);d.onload=function(){_.B($h,"library("+a+") is loaded");b()};d.onerror=function(){_.z($h,"library("+a+") failed to load");c()};(document.head||document.body||document).appendChild(d)})};_.ci=function(a){a=bi(a);var b=Lc();return new Qc(b?b.createHTML(a):a)};di=function(a){a=bi(a);return _.Pc(a)};bi=function(a){return a===null?"null":a===void 0?"undefined":a}; _.ei=function(a){return typeof a==="number"&&isFinite(a)&&!isNaN(a)};_.fi=function(a){return'url("'+String(a).replace(/"/g,'\\"')+'")'};gi=function(a){this.type=a};hi=function(a,b,c){this.type=a;this.senderId=b;this.data=c};ii=function(){this.level=1;this.muted=!1};ji=function(a,b,c){this.type="senderdisconnected";this.senderId=a;this.userAgent=b;this.reason=c};ki=function(a,b){this.type="senderconnected";this.senderId=a;this.userAgent=b}; li=function(a){this.type="visibilitychanged";this.isVisible=a};mi=function(a){this.type="standbychanged";this.isStandby=a};ni=function(a){this.type="systemvolumechanged";this.data=a};oi=function(a){this.type="ready";this.data=a};pi=function(){this.type="shutdown"};qi=function(){this.type="feedbackstarted"};ri=function(a){this.type="playbackdevicestatus";this.playbackDeviceStatus=a};si=function(a){this.type="showmediacontrols";this.mediaControlsState=a}; ti=function(a){this.type="maxvideoresolutionchanged";this.height=a};ui=function(){this.type="groupcapabilities";this.capabilities=void 0};vi=function(){this.type="allowgroupchange";this.newGroupCapabilities=void 0};wi=function(a){this.type=a;this.reason=void 0;this.requestId=0;this.itemId=this.customData=this.detailedErrorCode=void 0};xi=function(a,b){this.start=a;this.end=b};yi=function(a){this.type="CUSTOM_STATE";this.state=a}; I=function(a){this.type=a;this.requestId=0;this.sequenceNumber=this.customData=this.mediaSessionId=void 0};Ai=function(){I.call(this,"LOAD");this.media=new zi;this.autoplay=!1;this.loadOptions=this.credentialsType=this.credentials=this.queueData=this.activeTrackIds=this.playbackRate=this.currentTime=void 0};Bi=function(a){Ai.call(this);this.type="PRELOAD";this.itemId=a};Ci=function(a){Ai.call(this);this.type="PRECACHE";this.precacheData=a};Ei=function(){I.call(this,"SET_VOLUME");this.volume=new Di}; Fi=function(){I.call(this,"EDIT_TRACKS_INFO");this.enableTextTracks=this.isSuggestedLanguage=this.textTrackStyle=this.language=this.activeTrackIds=void 0};Gi=function(){I.call(this,"EDIT_AUDIO_TRACKS");this.isSuggestedLanguage=this.language=void 0};Hi=function(){I.call(this,"SEEK");this.relativeTime=this.currentTime=this.resumeState=void 0};Ii=function(){I.call(this,"SET_PLAYBACK_RATE");this.relativePlaybackRate=this.playbackRate=void 0};Ji=function(){I.call(this,"GET_STATUS");this.options=void 0}; Ki=function(a){I.call(this,"QUEUE_LOAD");this.repeatMode=void 0;this.items=a;this.currentTime=this.startIndex=void 0};Li=function(a){I.call(this,"QUEUE_INSERT");this.currentTime=this.currentItemId=this.currentItemIndex=this.insertBefore=void 0;this.items=a};Mi=function(){I.call(this,"QUEUE_UPDATE");this.shuffle=this.repeatMode=this.items=this.jump=this.currentTime=this.currentItemId=void 0};Ni=function(a){I.call(this,"QUEUE_REMOVE");this.currentTime=this.currentItemId=void 0;this.itemIds=a}; Oi=function(a){I.call(this,"QUEUE_REORDER");this.insertBefore=this.currentTime=this.currentItemId=void 0;this.itemIds=a};Pi=function(a,b,c){I.call(this,"QUEUE_GET_ITEM_RANGE");this.itemId=a;this.nextCount=b;this.prevCount=c};Qi=function(a){I.call(this,"QUEUE_GET_ITEMS");this.itemIds=a};Ri=function(){this.customData=this.loadRequestData=void 0};Si=function(){I.call(this,"STORE_SESSION")};Ti=function(){I.call(this,"RESUME_SESSION")};Ui=function(a){I.call(this,"SESSION_STATE");this.sessionState=a}; zi=function(){this.contentId="";this.contentUrl=void 0;this.streamType="NONE";this.mediaCategory=void 0;this.contentType="";this.userActionStates=this.vmapAdsRequest=this.hlsVideoSegmentFormat=this.hlsSegmentFormat=this.breakClips=this.breaks=this.customData=this.textTrackStyle=this.tracks=this.startAbsoluteTime=this.duration=this.entity=this.metadata=void 0};Vi=function(a,b){this.start=a;this.end=b};_.Wi=function(a,b,c,d){Vi.call(this,a,b);this.isMovingWindow=c;this.isLiveDone=d}; Xi=function(a,b,c,d,e,f,g){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=f;this.startTime=g;this.containerMetadata=void 0};Yi=function(a){this.containerType=a===void 0?0:a;this.containerDuration=this.containerImages=this.sections=this.title=void 0}; Zi=function(a){this.metadataType=a;this.queueItemId=this.sectionStartTimeInContainer=this.sectionStartAbsoluteTime=this.sectionStartTimeInMedia=this.sectionDuration=this.posterUrl=void 0};$i=function(){Zi.call(this,0);this.releaseDate=this.releaseYear=this.images=this.subtitle=this.contentRating=this.title=void 0};aj=function(){Zi.call(this,1);this.releaseDate=this.releaseYear=this.images=this.subtitle=this.studio=this.contentRating=this.title=void 0}; bj=function(){Zi.call(this,2);this.originalAirdate=this.releaseYear=this.images=this.episode=this.episodeNumber=this.season=this.seasonNumber=this.episodeTitle=this.contentRating=this.title=this.seriesTitle=void 0};cj=function(){Zi.call(this,3);this.releaseDate=this.releaseYear=this.secondaryImage=this.images=this.discNumber=this.trackNumber=this.artistName=this.songName=this.composer=this.artist=this.albumArtist=this.contentRating=this.title=this.albumName=void 0}; dj=function(){Zi.call(this,4);this.creationDateTime=this.height=this.width=this.longitude=this.latitude=this.images=this.location=this.artist=this.contentRating=this.title=void 0};ej=function(){Yi.call(this,1);this.releaseDate=this.publisher=this.narrators=this.authors=void 0};fj=function(){Zi.call(this,5);this.images=this.subtitle=this.bookTitle=this.chapterNumber=this.contentRating=this.title=this.chapterTitle=void 0};Di=function(){this.muted=this.level=void 0}; gj=function(a,b,c){this.width=a;this.height=b;this.hdrType=c}; hj=function(){this.type="MEDIA_STATUS";this.mediaSessionId=0;this.videoInfo=this.queueData=this.media=void 0;this.playbackRate=1;this.playerState="IDLE";this.idleReason=void 0;this.supportedMediaCommands=this.currentTime=0;this.volume=new Di;this.disableStreamGrouping=this.liveSeekableRange=this.extendedStatus=this.breakStatus=this.repeatMode=this.items=this.customData=this.preloadedItemId=this.loadingItemId=this.currentItemId=this.activeTrackIds=void 0}; ij=function(){this.type="MEDIA_STATUS";this.status=[];this.requestId=void 0};jj=function(a,b,c){this.playerState=a;this.media=b;this.mediaSessionId=c};kj=function(){hj.call(this)};lj=function(a,b){this.trackId=a;this.trackContentType=this.trackContentId=void 0;this.type=b;this.audioTrackInfo=this.roles=this.assocLanguage=this.customData=this.isInband=this.subtype=this.language=this.name=void 0};mj=function(){this.audioCodec=this.spatialAudio=this.numAudioChannels=void 0}; nj=function(){this.textTrackStyle=this.language=this.activeTrackIds=this.tracks=void 0};oj=function(){this.type="QUEUE_CHANGE";this.sequenceNumber=this.reorderItemIds=this.insertBefore=this.itemIds=this.changeType=this.requestId=void 0};_.pj=function(a,b,c){this.id=a;this.breakClipIds=b;this.position=c;this.duration=void 0;this.isWatched=!1;this.expanded=this.isEmbedded=void 0}; _.qj=function(a){this.id=a;this.vastAdsRequest=this.customData=this.hlsVideoSegmentFormat=this.hlsSegmentFormat=this.clickThroughUrl=this.posterUrl=this.whenSkippable=this.duration=this.title=this.contentType=this.contentUrl=this.contentId=void 0};_.rj=function(){this.adsResponse=this.adTagUrl=void 0};sj=function(a,b){this.currentBreakTime=a;this.currentBreakClipTime=b;this.seekBreak=this.whenSkippable=this.breakClipId=this.breakId=void 0};tj=function(){I.call(this,"SET_CREDENTIALS")}; uj=function(){I.call(this,"LOAD_BY_ENTITY")};vj=function(){I.call(this,"CUSTOM_COMMAND")};wj=function(){I.call(this,"REFRESH_CREDENTIALS")};xj=function(a,b){I.call(this,"PLAY_STRING");this.stringId=a;this.arguments=b};yj=function(a){I.call(this,"EXECUTE_ACTION_SCRIPT");this.actionScript=JSON.stringify(a)};zj=function(a){I.call(this,"SET_APPLICATION_CONTEXT");this.context=JSON.stringify(a?a:{});this.requestId=Date.now()};Aj=function(){I.call(this,"SCREEN_NAVIGATION")};Bj=function(){I.call(this,"USER_ACTION")}; Cj=function(){I.call(this,"DISPLAY_STATUS")};Dj=function(){I.call(this,"FOCUS_STATE")};Ej=function(a){this.itemId=a;this.customData=this.activeTrackIds=this.preloadTime=this.playbackDuration=this.startTime=this.autoplay=this.media=void 0};Fj=function(a,b){return b.filter(function(c){return c.language&&(0,cast.receiver.Oe)(c.language,a)})};Gj=function(){}; Ij=function(a){if(!(a instanceof Gj))throw _.z(Hj,"Proper AudioTracksManager object can be acquried by calling cast.framework.PlayerManager.getAudioTracksManager()"),Error("AudioTracksManager is not created properly.");this.g=this.j=null};Jj=function(a){if(!a.g||!a.g.oa())throw Error("Tracks info is not available.");};Kj=function(){this.headers=null};Lj=function(){};Mj=function(){};Nj=function(a){this.Y=_.y(a)};Pj=function(a){vb(J.Y,Oj,a)};Qj=function(a){this.type=a}; Rj=function(a){this.type="BITRATE_CHANGED";this.totalBitrate=a};Sj=function(a){this.type="EMSG";this.messageData=a.messageData;this.schemeIdUri=a.schemeIdUri;this.value=a.value;this.startTime=a.startTime;this.endTime=a.endTime;this.timescale=a.timescale;this.presentationTimeDelta=a.presentationTimeDelta;this.eventDuration=a.eventDuration;this.id=a.id;this.segmentData=a.segmentData};Tj=function(a,b,c,d){this.type="ERROR";this.detailedErrorCode=a;this.reason=c;this.severity=d;this.error=b||void 0}; Uj=function(a,b,c){this.type="ID3";this.frameDescription=c;this.segmentData=a;this.timestamp=b};Vj=function(a,b){this.type=a;this.currentMediaTime=b};Wj=function(a,b){b=b===void 0?!1:b;Vj.call(this,"PAUSE",a);this.ended=b};Xj=function(a){this.type="MEDIA_STATUS";this.mediaStatus=a};Yj=function(a){this.type="CUSTOM_STATE";this.state=a};Zj=function(a,b){this.type="MEDIA_FINISHED";this.currentMediaTime=a;this.endedReason=b};ak=function(a,b,c){this.type=a;this.requestData=b;this.senderId=c}; bk=function(a,b){this.type=a;this.media=b};ck=function(a){bk.call(this,"MEDIA_INFORMATION_CHANGED",a)};dk=function(a,b,c,d,e,f,g,k){this.type=a;this.currentMediaTime=b;this.index=c;this.total=d;this.whenSkippable=typeof e==="number"?e:void 0;this.endedReason=f;this.breakClipId=g;this.breakId=k};ek=function(a){this.type="BUFFERING";this.isBuffering=a};fk=function(a){this.type="TIME_DRIFTED";this.currentMediaTime=a};gk=function(a,b){this.type="CLIP_ENDED";this.currentMediaTime=a;this.endedReason=b}; hk=function(a,b){this.type="SEGMENT_DOWNLOADED";this.downloadTime=a;this.size=b};ik=function(a){this.type="CACHE_LOADED";this.media=a};jk=function(a){this.type="INBAND_TRACK_ADDED";this.track=a};kk=function(){this.type="TRACKS_CHANGED"};lk=function(a,b){this.type=a;this.url=b};mk=function(a,b){this.type=a;this.liveSeekableRange=b};nk=function(a,b){this.type=a;this.timedMetadataInfo=b}; pk=function(a,b,c){c=c===void 0?null:c;b=b.toLowerCase();var d=null;typeof a!=="string"?d="Url("+a+") should be string":typeof b!=="string"&&(d="mimeType("+b+") should be string");if(d)throw _.z(ok,d),Error(d);this.mimeType=b;this.url=a;this.playbackConfig=c||new Mj;this.hlsVideoSegmentFormat=this.hlsSegmentFormat=null;this.startTime=void 0;this.tracksInfo=this.breakClip=this.media=null};qk=function(a,b,c){this.seekFrom=a;this.seekTo=b;this.breaks=c};rk=function(a){this.break=a}; _.sk=function(a,b){this.breaks=a;this.breakClips=b};_.tk=function(){this.universalAdIds=this.creativeAdId=this.creativeId=void 0};_.uk=function(a,b){this.breakClip=a;this.g=b;this.Ya=this.qc=!0;this.fg=this.Fa=this.oc=null};K=function(){this.g=null;this.I=this.ui.bind(this);this.G=this.vi.bind(this);this.o=!1;this.D=this.l=this.B=this.j=null;this.C=void 0};vk=function(a,b,c){try{var d=a(b,c);return _.G(d)}catch(e){return sd(e)}}; xk=function(a){if(a!==null&&typeof a!=="function")throw _.z(wk,"Fail to set interceptor since interceptor is not a function"),Error("Fail to set interceptor since interceptor is not a function");};yk=function(a,b){_.B(wk,"break seek interceptor is invoked.");return vk(a.G,b)}; zk=function(a,b,c){_.B(wk,"break clip initialize interceptor is invoked. ");return vk(a.I,b,c).then(function(d){if(!d)return[];d instanceof Array||(d=[d]);d=d.map(function(e){return a.j&&e.vastAdsRequest&&!e.contentId?a.j.Jo(e):[new _.uk(e,null)]});return wd(d).then(function(e){var f=[];e=_.q(e);for(var g=e.next();!g.done;g=e.next())g=g.value,g.jg?f.push.apply(f,_.ia(g.value)):a.g.ta.dispatchEvent(new Tj(901,Error(g.reason)));return f})})}; Ak=function(a){if(a.vmapAdsRequest)return!0;if(a.breakClips){a=_.q(a.breakClips);for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.vastAdsRequest&&!b.contentId)return!0}return!1};Ck=function(a,b){if(!Ak(b))return _.G();a.B||(C(cast.A.common.F.H.xo),a.B=cast.A.common.ob.ob.Bq(),a.B.then(function(){a.j=new _.Bk(a.l);a.l.addEventListener("BREAK_CLIP_LOADING",a.Iq.bind(a));a.D&&a.j.mj(a.D);a.C!==void 0&&a.j.vf(a.C)}));return a.B}; Dk=function(a,b){return a.j?a.j.nl(b):(_.z(wk,"VastManager hasn't been loaded"),_.G(null))};Ek=function(a,b){this.handleEvent=a;this.g=b};_.Fk=function(){_.E.call(this);this.g={};this.j=this.l=null};Hk=function(a,b,c){var d=a.g[b];d&&d.slice().forEach(function(e){try{e.handleEvent.call(e.g,c)}catch(f){_.z(Gk,"Handler for "+b+" encountered an error."),a.j&&a.j(b,f),window.setTimeout(function(){throw f;},0)}})};Ik=function(a,b){a.j=b}; Lk=function(a,b,c){_.E.call(this);this.V=b;a=this.player=a;this.ignoreTtmlPositionInfo=a.j.playbackConfig&&a.j.playbackConfig.ignoreTtmlPositionInfo?a.j.playbackConfig.ignoreTtmlPositionInfo:!1;this.tracks=[];this.G=[];this.T=new Map;this.J=[];this.l=null;this.o=[];this.M=-1;this.R=1;this.g=null;b&&(this.g=new Lg(b,[],[],null),_.Ib(this,_.Ua(_.Hb,this.g)));this.B=null;this.W=!0;this.Ia()?_.z(Jk,"Cannot change tracks info in disposed state"):c&&(c.activeTrackIds&&(this.J=c.activeTrackIds),c.textTrackStyle&& this.g&&this.g.rb(cast.A.P.Bj(c.textTrackStyle)),c.tracks&&Kk(this,c.tracks))};Nk=function(a,b){var c=a.type;var d=a.name;var e=a.language;var f=a.trackContentType;var g=a.subtype;var k=a.roles;return b.length===0?null:c==="VIDEO"?b.find(function(l){return l.type===c})||null:b.find(function(l){return c===l.type&&Mk(d,l.name)&&Mk(e,l.language)&&Mk(f,l.trackContentType)&&Mk(g,l.subtype)&&(!k&&!l.roles||!!k&&!!l.roles&&fb(k,l.roles))})||null};Mk=function(a,b){return!a&&!b||!(!a||!b||a!==b)}; Kk=function(a,b,c){c=c===void 0?!1:c;if(b.length!==0){b.sort(function(e,f){return e.trackId-f.trackId});if(b[0].trackId<=a.M)throw Error("track id conflicts: adding track #"+b[0].trackId+" but existing tracks end at #"+a.M);for(var d=1;d0||f.length>0;a.W&&!d&&((d=$k(a,b))||(d=a.rd()),d&&(d=Uk(d,a.G))&&e.push(d.trackId));a.g?Kg(a.g,f):f.length>0&&_.A(Jk,"Cannot enable sideloaded tracks without media element.");d=null;c?d=b:a.l!==null&&(d=a.l);a.lj(d,b,e,g,f)}}; $k=function(a,b){var c,d;return(d=(c=a.tracks.find(function(e){return e.trackId===b}))==null?void 0:c.language)!=null?d:null};al=function(a,b,c){if(b!=null||c)b!=null&&(a.l=b),a.o=c.filter(function(d){return(d=a.T.get(d))&&!a.G.includes(d)}),a.J=a.l!=null?a.o.concat(a.l):a.o,a.J.sort()}; bl=function(a,b,c){if(a.B||b!=null){if(!a.B){if(!a.V){_.z(Jk,"Media element is not ready yet.");return}c=new cast.player.api.Host({url:"",mediaElement:a.V,ignoreTtmlPositionInfo:c});a.B=new cast.player.api.Player(c)}a.B.enableCaptions(!1,"ttml");b!==null&&(b=a.T.get(b),a.B.enableCaptions(!0,"ttml",b.trackContentId))}}; dl=function(a,b){b=b===void 0?null:b;this.mediaElement=null;this.j=a;this.ta=new _.Fk;this.o=1;this.Tb=this.hb=null;this.Rd=!1;this.Xc=b||cl;this.l=null;this.xc=[];this.T=!1;this.I=null;this.C=yd();this.da=!1;this.Wc=null;this.la=this.ka=void 0;this.O=this.ca=this.Z=this.ma=null;this.ib=1;this.fa=!1;this.Bf=a.media&&a.media.mediaCategory?a.media.mediaCategory:null};fl=function(a,b,c,d,e){a.o!==6&&(el(a,new Tj(b,c,d&&d.reason,e)),We()?(a.o=5,a.end("ERROR",d)):e!==1&&(a.o=5,a.end("ERROR",d)))}; hl=function(a){if(a.o!==6){a.l=a.Xc(a,a.mediaElement,a.j.tracksInfo);a.j.playbackConfig.disableForcedCaptions&&(a.l.W=!1);a.l.Qd();var b=a.l;b.l=b.mg();Wk(b,b.J);a.Jc(a.getPlaybackRate());a.Rd?gl(a,!0):a.o=3;a.I&&(a.I.resolve(),a.I=null)}};il=function(a,b){if(!a.l)return null;b.textTrackStyle&&a.l.rb(b.textTrackStyle);b.language?Xk(a.l,b.language):b.activeTrackIds&&Wk(a.l,b.activeTrackIds);return a.l.getTracksInfo().activeTrackIds};jl=function(a,b){if(!a.l)return null;Zk(a.l,b.language);return a.l.getTracksInfo().activeTrackIds}; el=function(a,b){a.ta.dispatchEvent(b)};cl=function(a,b,c){return new Lk(a,b,c)};kl=function(a,b,c,d){_.nc(b,c,d);a.xc.push({type:c,listener:d})};ll=function(a,b){for(var c=_.q(a.xc),d=c.next();!d.done;d=c.next())d=d.value,xc(b,d.type,d.listener);a.xc.length=0}; gl=function(a,b){b=b===void 0?!1:b;ml(a);a.Wc=a.getCurrentTimeSec();b||a.ka!==void 0||a.la!==void 0||(a.ka=a.isLiveDone(),a.la=a.Ic());nl(a);a.ca=setTimeout(function(){var c=1E3*(a.getCurrentTimeSec()-a.Wc);a.dc(Math.abs(c)<100*a.ib);var d;if(d=a.hd()==="PLAYING")d=Date.now()-a.Z,d=(a.getCurrentTimeSec()-a.ma)*1E3-d*a.ib,d=Math.abs(d)>500;d&&(el(a,new fk(a.getCurrentTimeSec())),_.B(ol,"Time drifted: "+c),a.Z=null,a.ma=null);c=a.getLiveSeekableRange();!a.ka&&a.isLiveDone()&&c&&(el(a,new mk("LIVE_ENDED", c)),a.ka=!0);!a.la&&a.Ic()&&c&&(el(a,new mk("LIVE_IS_MOVING_WINDOW_CHANGED",c)),a.la=!0);gl(a)},500)};ml=function(a){a.ca!=null&&(clearTimeout(a.ca),a.ca=null,a.Z=null,a.ma=null)};nl=function(a){a.Z===null&&(a.ma=a.getCurrentTimeSec(),a.Z=Date.now())};pl=function(a,b,c){this.g=a;this.l=b;this.j=c};ql=function(a,b){return b!==null&&a.g==b.g&&a.j==b.j}; rl=function(a,b){b.breakId=a.g.id;b.breakClipId=a.j.id;var c=a.j.whenSkippable;typeof c==="number"&&(b.whenSkippable=c);String(a.g.id).startsWith("seek-")&&(b.seekBreak=a.g)};sl=function(a,b,c,d){pl.call(this,a,b,c);this.o=d};vl=function(a,b,c,d){c=c===void 0?[]:c;d=d===void 0?[]:d;this.g=[];this.l=new Map;this.D=new Map;this.J=new Map;this.isEmbedded=a;this.B=b;this.ta=new _.Fk;this.L=0;this.C=!1;tl(this,d);ul(this,c);b=this.g;a=this.getBreakClips();b=gc(b);a=gc(a);this.M=new _.sk(b,a)}; Al=function(a,b,c){var d=[],e=0;c.forEach(function(f){d.includes(f.id)?_.z(wl,"Duplicate dynamic break clip id "+JSON.stringify(f)):xl(a,f)&&(d.push(f.id),e+=f.duration)});if(c.length===0||c.length!==d.length)return!1;b.duration=e;b.breakClipIds=d;if(!yl(a,b,!1))return!1;c.forEach(function(f){a.l.set(f.id,f)});zl(a,b);a.yf();return!0};tl=function(a,b){b.forEach(function(c){xl(a,c)&&a.l.set(c.id,c)})};ul=function(a,b){b.forEach(function(c){return a.Pf(c)})}; zl=function(a,b){if(b.position<0)a.g.length==0||a.g[a.g.length-1].position>=0?a.g.push(b):a.g[a.g.length-1].breakClipIds.push.apply(a.g[a.g.length-1].breakClipIds,_.ia(b.breakClipIds));else{for(var c=0;cb.position||d.position<0){a.g.splice(c,0,b);return}}a.g.push(b)}}; xl=function(a,b){return b.id?a.isEmbedded&&(typeof b.duration!=="number"||b.duration<=0)?(_.z(wl,"Break Clip with invalid duration is ignored"),!1):a.l.has(b.id)?(_.A(wl,"Duplicate break clip id, "+b.id+", clip is ignored"),!1):!0:(_.z(wl,"Break Clip with no clip id is ignored"),!1)}; yl=function(a,b,c){c=c===void 0?!0:c;if(!b.id)return _.z(wl,"Break with no clip is ignored"),!1;if(a.g.find(function(e){return e.id===b.id}))return _.z(wl,"Duplicate break id "+JSON.stringify(b)),!1;if(a.isEmbedded&&!b.isEmbedded)return _.z(wl,"Stitched break is ignored in embedded timeline"),!1;if(!a.isEmbedded&&b.isEmbedded)return _.z(wl,"Embedded break is ignored in stitched timeline"),!1;if(!a.isEmbedded&&b.expanded)return _.z(wl,"Expanded break is ignored in stitched timeline"),!1;if(typeof b.position!== "number")return _.z(wl,"Break with no position is ignored."),!1;if(b.position<0&&b.isEmbedded)return _.z(wl,"Break with negative position is ignored."),!1;if(c){c=b.breakClipIds||[];var d=c.filter(function(e){return a.l.has(e)});d.lengthc,e=d?c:b,f=d?b:c;return a.g.filter(function(g){return g.position>e&&g.position<=f})}; Fl=function(a,b,c,d,e){this.za=a;this.jb=b.contentUrl||b.contentId;this.D=c;this.mb=e;this.ta=new _.Fk;this.g=this.mediaElement=null;this.timeline=d;this.j=null;this.R=this.isPlayingBreak=!1;this.fa=function(){};this.B=1;this.T=0;this.G=null;this.pa=!1;this.J=yd();this.ma=!1;this.W=this.V=this.ka=null;this.Z=!1;this.ta.addEventListener("BREAK_STARTED",this.Is,this);this.ta.addEventListener("BREAK_ENDED",this.Hs,this);this.ta.addEventListener("CLIP_STARTED",this.Ks,this);this.ta.addEventListener("CLIP_ENDED", this.Js,this)};Gl=function(a){var b=new Di;a.mediaElement?(b.level=a.mediaElement.volume,b.muted=a.mediaElement.muted):(b.level=1,b.muted=!1);return b};Hl=function(a){a.fa=function(){}};Il=function(a){if(!a.j)return!1;var b=a.j.j.whenSkippable;if(typeof b!=="number")return!1;a=a.Ta();return Number(b)<=a};Jl=function(a){switch(a.B){case 1:case 2:return"BUFFERING";case 3:case 4:return a.g?a.g.hd():"PLAYING";case 5:case 6:return"IDLE";default:return"IDLE"}}; Kl=function(a){return a.g&&a.g.getLiveSeekableRange()?(a=a.g.getLiveSeekableRange(),a.start===a.end):!0};Nl=function(a,b,c,d){a.mediaElement=b;b=a.Me(c);Ll();return b.then(function(){a.B<3&&(a.B=3);a.Zi();a.setPlaybackRate(d).eb(function(){_.A(Ml,"Set playback rate after load failed")})},function(e){a.Z||(a.Z=!0);return Promise.reject(e)})};Ll=function(){var a=Zh();a&&a.start()};Ol=function(){var a=Zh();a&&(a.stop(),a.dispose(),Xh.set("ACTIVE_PLAYER_LOGGING",null))}; Pl=function(a,b){a.isLiveStream()&&Kl(a)&&(b&=-3);a.j&&(b&=-3,Il(a)&&(b|=512));return b}; Ql=function(a,b){a.g&&a.g.isLiveStream()&&(b.metadata?b.metadata.sectionStartAbsoluteTime?typeof b.metadata.sectionStartTimeInMedia==="number"?(typeof b.startAbsoluteTime==="number"&&_.A(Ml,"media.startAbsoluteTime will be updated based on section start absolute time and section start media time."),b.startAbsoluteTime=b.metadata.sectionStartAbsoluteTime-b.metadata.sectionStartTimeInMedia):(b.startAbsoluteTime||(b.startAbsoluteTime=a.getStartAbsoluteTime()||void 0),b.startAbsoluteTime&&(b.metadata.sectionStartTimeInMedia= b.metadata.sectionStartAbsoluteTime-b.startAbsoluteTime)):b.startAbsoluteTime=void 0:(typeof b.startAbsoluteTime==="number"&&_.z(Ml,"media.startAbsoluteTime should not be provided if no metadata"),b.startAbsoluteTime=void 0))};Rl=function(a,b,c,d,e){var f=b.g,g=b.j;b=b.l+1;var k=f.breakClipIds.length,l=g.whenSkippable,m=a.Ta()||0;c==="BREAK_CLIP_ENDED"&&(m=e!==void 0?e:m);a.ta.dispatchEvent(new dk(c,m,b,k,l,d,g.id,f.id))};Tl=function(a){a.B=4;Jl(a)=="PAUSED"&&Sl(a,!1)}; Ul=function(a,b,c,d,e){c=c===void 0?null:c;var f=c!=a.j,g=!1;a.j&&f&&Rl(a,a.j,"BREAK_CLIP_ENDED",d,e);a.j&&b=="BREAK_ENDED"&&(Rl(a,a.j,b,d,e),g=!0,a.isPlayingBreak=!1,a.R=!1);if(a.j=c)D(cast.A.common.F.H.Pj,Ne[a.j.j.contentType||""]||0),d=a.j.j,e=d.whenSkippable,Fb(cast.A.common.F.H.Qj,e!=null&&e0&&(e=yk(a.za,new qk(c,b,d)).eb(function(f){a.ta.dispatchEvent(new Tj(902,Error(f)));return null}));return _.G(e)};Zl=function(){this.j=!1;this.l=new bf};$l=function(a){if(a.j)throw"REQUEST_CANCELLED_ERROR";}; L=function(a,b,c){var d=this;this.xc=_.ue.K();this.R=c||"local";cast.receiver.Oa.Zr(this.R);this.B=ve(this.xc,cast.receiver.media.If,"JSON");this.C=0;this.V=this.D=null;this.I=1;this.Ub=b||12303;this.J=this.j=this.yc=this.o=null;this.Od=void 0;this.G=this.l=null;this.g=new Tg(this.Fi.bind(this));this.T=!1;this.L=null;this.Zj=1;this.Xc=-1;this.Dc=[];this.Cc=!1;this.M=[];this.Ac=this.Qo;this.ca=this.W=null;this.Sa=this.Yo;this.Z=this.la=this.ma=this.ka=null;this.Tb=this.gp;this.Pb=this.fp;this.Aa=this.To; this.za=this.So;this.ib=this.ap;this.hb=this.Zo;this.ea=this.wi;this.jb=this.bp;this.mb=this.ep;this.zc=null;this.Lj=function(){};this.Mj=function(){};this.da=null;this.Rd=this.Uo;this.Af=this.Vo;this.Bf=this.Wo;this.Wc=null;this.Ja=this.Xo;this.fa=this.na=null;this.pa=new cast.receiver.Bo(this.ba.bind(this,!1));this.xc.Z=function(e){var f=d.pa;f.j=e;f.l()};this.Nd=this.O=!1;a&&this.setMediaElement(a);this.B.l=this.Ug.bind(this);am(this)};bm=function(a){if(a.j)return a.j.customData||void 0}; cm=function(a){return a.j?a.j.activeTrackIds||null:null};dm=function(a){return ih(a.g)?a.g:null};em=function(a){return a.every(function(b){return b.trackId!==void 0&&b.type!==void 0})};fm=function(a,b){return b?a?a.filter(function(c){return c.type==="TEXT"&&c.language!==void 0}).some(function(c){return(0,cast.receiver.Oe)(c.language,b)}):!1:!0}; gm=function(a,b){return b?a?a.filter(function(c){return c.type==="AUDIO"&&c.language!==void 0}).some(function(c){return(0,cast.receiver.Oe)(c.language,b)}):!1:!0}; hm=function(a,b){if(!b||b.length===0)return!0;if(!a||b.length>a.length)return J.error("Too many track IDs"),!1;for(var c=_.q(b),d=c.next(),e={};!d.done;e={Mf:void 0},d=c.next())if(e.Mf=d.value,!a.find(function(f){return function(g){return g.trackId===f.Mf}}(e)))return J.error("Track ID does not exist: "+e.Mf),!1;c=a.filter(function(f){return b.includes(f.trackId)});a=c.filter(function(f){return f.type==="AUDIO"});c=c.filter(function(f){return f.type==="VIDEO"});return a.length>1||c.length>1?(J.error("Maximum one active video and one active audio track supported"), !1):!0};im=function(a,b,c,d){c.mediaSessionId=a.C;cast.receiver.Oa.Vi(c.type,b);a.Ug(new te("message",b,c),d)};jm=function(a){return a.j&&a.o?Jl(a.o):"IDLE"};km=function(a,b){var c=new ij;c.status=a?[a]:[];c.requestId=b;return c}; mm=function(a,b,c,d){d=d===void 0?!1:d;var e,f,g,k,l,m,n,t;return Aa(function(x){if(x.g==1){e=a.l&&a.l.message.media||null;if(!a.j&&!a.J&&!e)return x.return(null);var v=a.C,H=a.I,T=jm(a),Ea=(g=(f=a.o)==null?void 0:f.getCurrentTimeSec())!=null?g:0,La=a.Ub;if(a.o)var ra=Gl(a.o);else{ra=new Di;var Ma,Zb;ra.level=(Zb=(Ma=a.yc)==null?void 0:Ma.volume)!=null?Zb:1;var ib,ma;ra.muted=(ma=(ib=a.yc)==null?void 0:ib.muted)!=null?ma:!1}k={mediaSessionId:v,playbackRate:H,playerState:T,currentTime:Ea,supportedMediaCommands:La, volume:ra};a.L&&(k.preloadedItemId=a.L);v=a.pa;l=v.g?v.g.videoWidth:0;v=a.pa;m=v.g?v.g.videoHeight:0;l>0&&m>0&&(k.videoInfo=new gj(l,m,cast.A.P.np(a.pa.j)));if(a.j)k.activeTrackIds=a.j.activeTrackIds,b&&(k.media=a.kb()||void 0,k.queueData=lm(a)),k.currentItemId=a.j.itemId;else if(a.J&&(b&&(k.media=a.J.media||void 0),k.currentItemId=a.J.itemId,a.J=null),ih(a.g)&&(n=a.g.vb()))k.loadingItemId=n.itemId;k.playerState==="IDLE"?(a.G&&(k.idleReason=a.G),e&&(k.extendedStatus=new jj("LOADING",e,a.l.mediaSessionId), k.queueData=lm(a))):a.G=null;c!=null&&(k.customData=c);ih(a.g)&&(d&&(k.items=cast.A.P.ig(a.g.sc(b,a.O))),k.repeatMode=cast.A.P.sp(a.g.B));return a.Ac?qa(x,a.Ac(k),2):x.return(k)}t=x.j;a.Nd=!!k.breakStatus&&k.breakStatus.currentBreakClipTime!==void 0;if(t===null)throw"Customized callback returned NULL.";return x.return(t)})};lm=function(a){if(a=a.g.o)a=_.fc(a),a.items=void 0;return a};nm=function(a){a.V!=null&&(_.u.clearTimeout(a.V),a.V=null)}; am=function(a){setTimeout(function(){am(a);a.Cc||jm(a)!=="PLAYING"||(a.l&&(_.A(J.Y,"Triggering load complete, since media is playing."),om(a)),pm(a))},1E3)};qm=function(a,b){var c=new wi("ERROR");c.customData=b==null?void 0:b.customData;c.reason=b==null?void 0:b.reason;c.detailedErrorCode=b==null?void 0:b.detailedErrorCode;var d;c.itemId=(d=a.j)==null?void 0:d.itemId;a.Ea("*:*",c)};rm=function(a){a.l=null;for(a.Cc=!1;a.Dc.length!==0&&!a.l;)a.Ug(a.Dc.shift())}; sm=function(a){if(!a.media&&!a.queueData)return J.error("Media or QueueData is mandatory"),!1;if(a.media&&a.media.tracks&&!em(a.media.tracks))return J.error("Invalid tracks information"),!1;if(a.activeTrackIds&&a.media&&!hm(a.media.tracks,a.activeTrackIds))return!1;a=a.playbackRate;return a!==void 0&&(typeof a!=="number"||a<.5||a>2)?(J.error("Bad value for playback rate "+a),!1):!0}; xm=function(a,b,c,d,e,f,g){g=g===void 0?null:g;J.info(function(){return"Load message received:"+JSON.stringify(c)});var k=f;if(!sm(c))return k&&k(),d=new wi("INVALID_REQUEST"),d.reason="INVALID_PARAMS",d;e!=null||(e=new cast.A.media.hc.hc);if(a.l){f=new wi("LOAD_CANCELLED");var l;f.customData=(l=g)==null?void 0:l.customData;var m;f.reason=(m=g)==null?void 0:m.reason;var n;f.detailedErrorCode=(n=g)==null?void 0:n.detailedErrorCode;tm(a,f)}else a.j&&(um(a,"INTERRUPTED",!1),k=a.ba.bind(a,!1));a.l={senderId:b, message:c,mediaSessionId:d?a.C+1:a.C,g:e};vm(a,c.media,!1);k&&k();if(d&&(a.C++,a.G=null,a.T=c.queueData!==void 0,(d=Zg(a.g,cast.A.P.Ds(c)))&&typeof d.then==="function"))return d.then(function(){a.T=!0;var t=cast.A.P.qd(a.g.vb());!t||!t.media||c.media&&t.media.contentId==c.media.contentId||(c.media&&J.info("Implementation of queueing has provided "+t.media.contentId+" as the first item whilethe original media portion of the LOAD provided "+c.media.contentId),c.media=t.media,c.autoplay=c.autoplay|| t.autoplay,c.currentTime=c.currentTime||t.startTime||a.g.C);wm(a,b,c,e,k)},function(){tm(a,new wi("LOAD_FAILED"))}),null;wm(a,b,c,e,k);return null};wm=function(a,b,c,d,e){a.j=gc(cast.A.P.qd(a.g.vb()));a.M=[];c.media=a.j.media||c.media;a.j.activeTrackIds=c.activeTrackIds;nm(a);a.D=c;var f=new ak("REQUEST_LOAD",c,b),g=void 0;a.W&&(a.I=c.playbackRate?c.playbackRate:1,g=a.W(f,d));e||a.ba(!0,c.requestId);a.L=null;Promise.resolve(g).then(function(){ym(a,b,c)},function(){ym(a,b,c)})}; ym=function(a,b,c){uh(a.g).then(function(d){zm(a,cast.A.P.Ci(d),b,c)},function(d){J.info(d)})};Am=function(a,b,c){c=c===void 0?!0:c;a.j&&a.j.media&&(a.j.activeTrackIds=b.activeTrackIds,c&&(a.j.media.tracks=b.tracks,a.j.media.textTrackStyle=b.textTrackStyle),a.l||a.ba(c))}; Bm=function(a){if(a.l){var b;if((b=a.j)==null?0:b.media){b=a.o.getDurationSec();a.j.media.duration=b;var c;if((c=a.g.vb())==null?0:c.media)a.g.vb().media.duration=b;c=a.j.media;c.streamType&&c.streamType!=="NONE"||(b=b===-1||b===Infinity,c.streamType=b?"LIVE":"BUFFERED",_.A(J.Y,"Media streamType is initially set wrong, changed to "+(b?"live":"buffered")));vm(a,a.j.media,!0)}}}; vm=function(a,b,c){b&&((c===void 0?0:c)&&a.o&&(c=a.o.getMediaCategory())&&(a.j.media.mediaCategory=c),b.mediaCategory||(a=cast.A.P.pp(cast.receiver.Gb.getMediaCategory(cast.A.P.yj(b))),b.mediaCategory=a||void 0))};tm=function(a,b){var c;b.itemId=(c=a.j)==null?void 0:c.itemId;var d;(d=a.l)==null||d.g.cancel(b);a.j&&um(a,"ERROR",!1);a.l.senderId!==a.R&&a.l.senderId!==""&&(b.requestId=a.l.message.requestId,a.Ea(a.l.senderId,b));rm(a)}; om=function(a){if(a.l){var b=a.l.message.requestId;a.ba(!0,b,void 0,b!=0||a.O);a.l.g.resolve();rm(a)}else J.error("Not sending status as there is no on going LOAD request")}; Cm=function(a,b){b=b===void 0?null:b;var c;if(We()||((c=b)==null?void 0:c.severity)!==1){c=a.g.td();var d;if(d=ih(a.g)&&c!=-1)d=a.g,d=c<(d.g&&d.g.length||0)-1;if(d)qm(a,b),a.aj("ERROR",b);else{if(a.l){c=new wi("LOAD_FAILED");var e;c.customData=(e=b)==null?void 0:e.customData;var f;c.reason=(f=b)==null?void 0:f.reason;var g;c.detailedErrorCode=(g=b)==null?void 0:g.detailedErrorCode;tm(a,c)}else qm(a,b);um(a,"ERROR",!0)}}}; Dm=function(a,b,c,d,e,f,g,k,l){c=a.xq.bind(a,b,c,d,e,f,g,k,l===void 0?null:l);d=a.g.j?!0:!1;d?hh(a.g,b).then(c,c):c()};Em=function(a,b){a.I=b};um=function(a,b,c,d){c=c===void 0||c;if(d&&!c)throw Error("customData and requestId should only be provided in broadcast mode");a.j?(a.g.clear(),a.Mj(b),b&&(a.G=b),a.J=a.j,a.j=null,a.M=[]):J.info("Nothing to reset, Media is already null");c&&a.ba(!1,d,void 0,void 0);a.D&&(nm(a),a.V=Pd(function(){a.D=null;a.V=null},9E5))}; Fm=function(a,b){var c=a.j&&a.j.media&&a.j.media.tracks;if(!c||c.length==0)return J.error("No tracks available"),null;c=c.filter(function(f){return f.type=="TEXT"}).map(function(f){return f.trackId});if(c.length==0)return J.error("No text tracks available"),null;var d=a.j.activeTrackIds||[],e=c.filter(function(f){return d.indexOf(f)>=0});if(!b.enableTextTracks){if(e.length>0)return a.M=e,d.filter(function(f){return e.indexOf(f)<0})}else if(e.length==0)return b=d.concat(a.M.length>0?a.M:[c[0]]),a.M= [],b;return d};Gm=function(a){if(a.length<2)return!0;for(var b=0;b0&&(b=b[0].toUpperCase()+b.slice(1));return b}).join("")+"RequestHandler"};Rm=function(a){this.bh=a};Tm=function(a){if(!(a instanceof Rm))throw _.z(Sm,"Proper QueueManager object can be acquried by calling cast.framework.PlayerManager.getQueueManager()"),Error("QueueManager is not created properly.");this.g=null;this.l=!0;this.j=a.bh;this.o=!1};Um=function(a,b){a.g=b;a.g.O=a.l}; Wm=function(a,b){var c=a.j.kb(),d=dm(a.g);if(d&&c){if(b&&c.metadata){var e=c.metadata;if(e.sectionStartTimeInMedia===void 0||e.sectionDuration===void 0)return;var f=a.j.getCurrentTimeSec();if(f>=e.sectionStartTimeInMedia&&f<=e.sectionStartTimeInMedia+e.sectionDuration)return}e=a.j.getCurrentTimeSec();d=Vm(a,e,fh(d));b&&!d?a.o||(_.z(Sm,"Cannot find section metadata for current time "+e),a.o=!0,C(cast.A.common.F.H.bn)):(a.o=!1,d&&c.metadata!=d&&(c.metadata=d,_.B(Sm,"Updating current section metadata"), C(cast.A.common.F.H.cn),a.j.Yc(c,!0)))}};Vm=function(a,b,c){return(a=a.kg())&&a.sections?a.sections.find(function(d){return(d.queueItemId===void 0||d.queueItemId==c)&&d.sectionStartTimeInMedia!==void 0&&d.sectionDuration!==void 0&&b>=d.sectionStartTimeInMedia&&b<=d.sectionStartTimeInMedia+d.sectionDuration})||null:null}; Xm=function(a){var b=fh(dm(a.g)),c=a.kg(),d=a.j.getStartAbsoluteTime();d&&c&&c.sections&&c.sections.forEach(function(e){e.queueItemId!==void 0&&e.queueItemId!==b||e.sectionStartAbsoluteTime===void 0||e.sectionStartTimeInMedia!==void 0||(e.sectionStartTimeInMedia=e.sectionStartAbsoluteTime-d)})};Ym=function(){}; $m=function(a){if(!(a instanceof Ym))throw _.z(Zm,"Proper TextTracksManager object can be acquried by calling cast.framework.PlayerManager.getTextTracksManager()"),Error("TextTracksManager is not created properly.");this.g=this.j=null};an=function(a){if(!a.g||!a.g.oa())throw Error("Tracks info is not available.");};bn=function(){this.j={};this.l={};this.o={};this.g=this.B.bind(this)};cn=function(a,b,c){a.o[b]=c||_.Ic};dn=function(a,b,c){a.l[b]=c||_.Ic}; en=function(a,b){a=a.j[b];return a==_.Ic?null:a};gn=function(a){_.A(fn,a+" is not supported based on supported media commands.")};kn=function(a,b,c,d,e){var f=cast.A.media.util.Ae(a.toLowerCase());b=(b||"").toLowerCase();var g=hn[f];!_.ec(_.jn,b)&&g&&_.ec(_.jn,g)&&(b=g);b=b||cast.A.media.util.Fe(f);a=new pk(a,b,c);d!==void 0&&(a.hlsSegmentFormat=d);e!==void 0&&(a.hlsVideoSegmentFormat=e);return a};ln=function(){this.B=Date.now();this.o=this.D=0;this.j=this.l=!1;this.g=null;this.C=0}; mn=function(a){a.l=!0;a.B=Date.now()};nn=function(a){var b=Date.now(),c=(b-a.B)/1E3;a.B=b;a.l&&(a.j?a.o+=c:a.D+=c)};on=function(a){var b=a.getVideoPlaybackQuality&&a.getVideoPlaybackQuality();return b?{droppedFrames:b.droppedVideoFrames,decodedFrames:b.totalVideoFrames,height:a.videoHeight,width:a.videoWidth}:a.webkitDecodedFrameCount?{droppedFrames:a.webkitDroppedFrameCount,decodedFrames:a.webkitDecodedFrameCount,height:a.videoHeight,width:a.videoWidth}:{}}; qn=function(a){Yh().listen("tick",function(){if(a.g){var b=a.C;var c=on(a.g).droppedFrames;c!==void 0&&(b=c-b,b>0&&(pn.info("Dropped "+b+" new video frames in the past minute. Total dropped: "+a.C),a.C=c,D(cast.A.common.F.H.vk,b)))}})};M=function(){};rn=function(a){this.type=a};sn=function(a,b){this.type="BITRATE_CHANGED";this.newBitrate=a;this.previousBitrate=b};tn=function(a,b){this.type="TIME_TO_TARGET_BITRATE";this.bitrate=a;this.timeToTargetSec=b};un=function(a,b){ai(di(a)).then(function(){b.resolve()}).catch(function(){b.reject()})}; zn=function(a){var b=Ue()||vn.Ih,c=vn.Cb(b),d=vn.Cb(a);if(d===-1)return _.z(wn,'Shaka version format is incorrect. It should be MAJOR.MINOR.PATCH, for example "3.2.1".'),b;if(d=3)&&el(a,e);b!=="TIMED_METADATA_CHANGED"||a.Pb.has(c)||(a.Pb.add(c),a.Cc.push(d))}; Vn=function(a){var b=a.R.playbackConfig;a.g.configure({textDisplayFactory:function(){if(b.enableUITextDisplayer&&a.mediaElement&&a.mediaElement.parentElement){var c=a.mediaElement.parentElement;a.W=window.document.createElement("div");a.W.className="shaka-styles";(0,cast.A.mn)(c.insertBefore(a.W,c.firstChild));Fb(cast.A.common.F.H.di,!0);c=new shaka.text.UITextDisplayer(a.mediaElement,a.mediaElement.parentElement,{captionsUpdatePeriod:.25})}else Fb(cast.A.common.F.H.di,!1),c=new shaka.text.SimpleTextDisplayer(a.mediaElement, "Shaka Player TextTrack");return c}})};Sn=function(a,b,c,d){d=d===void 0?"":d;Object.keys(c).forEach(function(e){var f=d?d+"."+e:e;_.Na(b[e])&&_.Na(c[e])?Sn(a,b[e],c[e],f):(e in b&&_.B(Ln,"overriding "+f+" Shaka configuration with custom value"),b[e]=c[e])})}; Rn=function(a){var b={},c=a.licenseUrl;a=a.protectionSystem;if(!c)return{};if(a){if(!_.ec(Wn,a.toLowerCase()))return _.A(Ln,a+" is not a supported protection system by Shaka player."),{};var d=Xn[a.toLowerCase()];if(!d)return{};b[d]=c;return b}for(d in Xn)b[Xn[d]]=c;return b}; On=function(a,b){typeof a.g.getNetworkingEngine().clearAllRequestFilters==="function"&&a.g.getNetworkingEngine().clearAllRequestFilters();(b.manifestRequestHandler||b.segmentRequestHandler||b.licenseRequestHandler)&&a.g.getNetworkingEngine().registerRequestFilter(function(c,d){var e,f;return Aa(function(g){switch(g.g){case 1:e=d.body?new Uint8Array(d.body):null;f={url:d.uris[0],headers:d.headers,content:e,withCredentials:d.allowCrossSiteCredentials};f.timeoutInterval=d.retryParameters.timeout;switch(c){case a.J.net.NetworkingEngine.RequestType.MANIFEST:return g.ja(2); case a.J.net.NetworkingEngine.RequestType.SEGMENT:return g.ja(3);case a.J.net.NetworkingEngine.RequestType.LICENSE:case a.J.net.NetworkingEngine.RequestType.KEY:return g.ja(4)}g.ja(5);break;case 2:if(typeof b.manifestRequestHandler!=="function"){g.ja(6);break}return qa(g,b.manifestRequestHandler(f),6);case 6:g.ja(5);break;case 3:if(typeof b.segmentRequestHandler!=="function"){g.ja(8);break}return qa(g,b.segmentRequestHandler(f),8);case 8:g.ja(5);break;case 4:if(typeof b.licenseRequestHandler!=="function"){g.ja(10); break}return qa(g,b.licenseRequestHandler(f),10);case 10:g.ja(5);break;case 5:d.uris[0]=f.url,d.headers=f.headers,d.body=f.content,d.allowCrossSiteCredentials=f.withCredentials,f.timeoutInterval?d.retryParameters.timeout=f.timeoutInterval:_.B(Ln,"NetworkRequestInfo timeoutInterval missing, overriding with default value"),g.g=0}})})}; Pn=function(a,b){var c=a.g.getNetworkingEngine(),d=a.J.net.NetworkingEngine.RequestType;typeof a.g.getNetworkingEngine().clearAllResponseFilters==="function"&&a.g.getNetworkingEngine().clearAllResponseFilters();c.registerResponseFilter(function(e,f){var g,k,l,m,n,t,x;return Aa(function(v){switch(v.g){case 1:g=f.data;k=new Kj;k.headers=f.headers;switch(e){case d.MANIFEST:return v.ja(2);case d.SEGMENT:return v.ja(3);case d.LICENSE:case d.KEY:return v.ja(4)}v.ja(0);break;case 2:if(typeof b.manifestHandler!== "function"){v.ja(6);break}if(!g){v.ja(6);break}l=new TextDecoder;return qa(v,b.manifestHandler(l.decode(g),k),8);case 8:m=v.j,n=new TextEncoder,f.data=n.encode(m).buffer;case 6:v.ja(0);break;case 3:a.Af();el(a,new hk(f.timeMs,g.byteLength));if(typeof b.segmentHandler!=="function"){v.ja(9);break}return qa(v,b.segmentHandler(new Uint8Array(g),k),10);case 10:t=v.j,f.data=t.buffer;case 9:v.ja(0);break;case 4:if(typeof b.licenseHandler!=="function"||!g){v.ja(11);break}return qa(v,b.licenseHandler(new Uint8Array(g), k),12);case 12:x=v.j,f.data=x.buffer;case 11:v.ja(0)}})})};Yn=function(a,b){if(b&&b.code){var c="category: "+b.category+"\ncode: "+(b.code+"\nstack: ")+(b.stack+"\nseverity: ")+((b.severity===2?"CRITICAL":"RECOVERABLE")+"\ndata: ")+(JSON.stringify(b.data)+"\n");b.severity===2?_.z(Ln,c):_.A(Ln,c);c=b.code;fl(a,cast.A.media.tj.ng(b),{shakaErrorCode:c,shakaErrorData:b.data,shakaErrorStack:b.stack,shakaErrorSeverity:b.severity},void 0,b.severity);D(cast.A.common.F.H.pn,c)}else _.z(Ln,JSON.stringify(b))}; Nn=function(a){Yh().listen("tick",function(){a.L!==null&&(a.M+=Date.now()-a.L,a.L=Date.now());var b=a.g.getStats(),c=(0,cast.A.media.util.nf)(b.playTime);b=(0,cast.A.media.util.nf)(b.bufferingTime)-a.Ub-a.M;isNaN(c)||D(cast.A.common.F.H.Nn,c);isNaN(b)||D(cast.A.common.F.H.Mn,b);D(cast.A.common.F.H.On,a.Sa);D(cast.A.common.F.H.Ln,a.zc);D(cast.A.common.F.H.Kn,a.M);D(cast.A.common.F.H.wn,Math.floor(c/(a.Sa+1)));isNaN(c)||isNaN(b)||(c=b+c,D(cast.A.common.F.H.Jn,c?Math.floor(b/c*100):0))})}; Mn=function(a){var b=a.Nd;b.listen(a.g,"error",function(c){Yn(a,c.detail)});b.listen(a.g,"variantchanged",function(){Zn(a)});b.listen(a.g,"adaptation",function(){a.zc++;Zn(a);a.xi()});b.listen(a.g,"emsg",function(c){el(a,new Sj(c.detail))});b.listen(a.g,"timelineregionadded",function(c){Un(a,"TIMED_METADATA_CHANGED",c.detail)});b.listen(a.g,"timelineregionenter",function(c){Un(a,"TIMED_METADATA_ENTER",c.detail)});b.listen(a.g,"timelineregionexit",function(c){Un(a,"TIMED_METADATA_EXIT",c.detail)}); b.listen(a.g,"buffering",function(c){a.Od||c.buffering||(c=a.g.getStats().bufferingTime,a.Ub=(0,cast.A.media.util.nf)(c),a.Od=!0);a.dc(a.g.isBuffering())});b.listen(a.g,"trackschanged",function(){a.ea||(a.l.Qd(),el(a,new kk))});b.listen(a.g,"gapjumped",function(){C(cast.A.common.F.H.yn)});b.listen(a.g,"stalldetected",function(){var c=a.g.getConfiguration().streaming.stallThreshold;c!==void 0&&D(cast.A.common.F.H.Bn,c);a.Ac=!0});b.listen(a.g,"metadata",function(c){if(c.metadataType==="org.id3"){var d= c.payload.data;typeof d==="string"&&(d=shaka.util.StringUtils.toUTF8(d));var e=_.Qe.K();if(_.Se(e,"report_more_id3_frame_fields",!0)){d=shaka.util.BufferUtils.toUint8(d);e=c.payload.key;var f=shaka.util.BufferUtils.toUint8(shaka.util.StringUtils.toUTF8(c.payload.description));el(a,new Uj(d,c.startTime,f,e))}else el(a,new Uj(new Uint8Array(d),c.startTime))}});b.listen(a.g,"streaming",function(){$n(a)})}; $n=function(a){var b=new Set;a.g.getVariantTracks().forEach(function(c){for(var d=_.q(c.codecs.split(",")),e=d.next();!e.done;e=d.next()){e=e.value.trim();var f;if(f=c.spatialAudio)f=e,f=f.includes("ec-3")||f.includes("mp4a.a6");f&&(e="DOLBY_ATMOS");b.has(e)||(fe("Cast.Receiver.AvailableCodec",e),b.add(e))}})}; ao=function(a){var b={};a=_.q(a.g.getVariantTracks());for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=void 0;c.videoId?d="video":c.audioId&&(d="audio");b[d]||(b[d]=[]);b[d].push(c.bandwidth)}b.video&&b.video.sort();b.audio&&b.audio.sort();return b}; Zn=function(a){a.g.getVariantTracks().forEach(function(b){b.active&&b.codecs&&(b.audioCodec&&fe(cast.A.common.F.H.bi,b.audioCodec),b.videoCodec&&fe(cast.A.common.F.H.bi,b.videoCodec));b.active&&b.mimeType&&D(cast.A.common.F.H.gn,Ne[b.mimeType]||0)})}; bo=function(a){var b=!1;C(cast.A.common.F.H.vn);de(cast.A.common.F.H.un,a.g.isLive());Zn(a);a.g.getVariantTracks().forEach(function(f){f.type==="variant"&&(b=f.originalVideoId&&f.originalVideoId.includes(",")||f.originalAudioId&&f.originalAudioId.includes(",")||b)});Fb(cast.A.common.F.H.rn,b);var c=a.mediaElement.duration;a.isLiveStream()&&(c=-1,a.j.startTime!==void 0&&(a.yc=!0));isNaN(c)||D(cast.A.common.F.H.xn,c);c=ao(a);for(var d=_.q(["audio","video"]),e=d.next();!e.done;e=d.next())e=e.value,c[e]&& ce(c[e],e+"/*");hl(a);a.l.L=a.xi.bind(a)};co=function(a){var b=a.g.getStats();isNaN(b.licenseTime)||D(cast.A.common.F.H.tn,b.licenseTime);isNaN(b.playTime)||D(cast.A.common.F.H.Fn,b.playTime);isNaN(b.pauseTime)||D(cast.A.common.F.H.An,b.pauseTime);isNaN(b.bufferingTime)||D(cast.A.common.F.H.ln,b.bufferingTime);isNaN(b.drmTimeSeconds)||D(cast.A.common.F.H.nn,b.drmTimeSeconds);a.D!==null&&D(cast.A.common.F.H.ci,Date.now()-a.D)}; eo=function(a){cast.A.common.Vb.th.then(function(){console.log("CAST SDK Shaka Version: "+shaka.Player.version);cast.A.media.uj.sq();a&&shaka.polyfill.installAll()})};fo=function(a,b,c){Lk.call(this,a,b,c);this.j=a.rg();this.C=new Map;this.L=null};go=function(a){var b=new Map;a.forEach(function(c){c.audioId===null||b.has(c.audioId)||b.set(c.audioId,c)});return Array.from(b.values())};ho=function(a,b){dl.call(this,a,b)}; io=function(a,b){kl(a,b,"loadedmetadata",a.g.bind(a,b));kl(a,b,"error",function(){fl(a,Zd(b.error))})};jo=function(){Lk.apply(this,arguments)};ko=function(a,b){b=b===void 0?{}:b;b.url=b.url||a;return new cast.player.api.Host(b)}; lo=function(a,b,c,d){switch(a.toLowerCase()){case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "audio/mpegurl":case "audio/x-mpegurl":return cast.player.api.CreateHlsStreamingProtocol(d,cast.A.media.Zb.Ip(b),cast.A.media.Zb.Jp(c));case "application/vnd.ms-sstr+xml":return cast.player.api.CreateSmoothStreamingProtocol(d);case "application/dash+xml":return cast.player.api.CreateDashStreamingProtocol(d);default:return cast.player.api.CreateHlsStreamingProtocol(d)}}; mo=function(a,b,c){dl.call(this,a,c===void 0?null:c);this.J=new Set;this.L=[]}; po=function(a){if(!a.D){var b=a.j.playbackConfig,c=b.mplConfig||{};b.disableSourceBufferTimeAdjust!=null&&(c.disableSourceBufferTimeAdjust=b.disableSourceBufferTimeAdjust);b.enableSmoothLiveRefresh!=null&&(c.enableSmoothLiveRefresh=b.enableSmoothLiveRefresh);b.ignoreTtmlPositionInfo!=null&&(c.ignoreTtmlPositionInfo=b.ignoreTtmlPositionInfo);b.enableDurationOnLive!=null&&(c.enableDurationOnLive=b.enableDurationOnLive);c.enableSideloadedTextTrackStyling=!!b.enableSideloadedTextTrackStyling;a.B=ko(a.j.url, c);no(a.B,b);a.B.onError=a.Tq.bind(a);a.B.processMetadata=function(d,e,f,g){if(d==="EMSG"){if(g!==void 0)for(d=_.q(g),f=d.next();!f.done;f=d.next())f=f.value,el(a,new Sj({endTime:f.endTime,eventDuration:f.eventDuration,id:f.id,messageData:f.messageData,presentationTimeDelta:f.presentationTimeDelta,schemeIdUri:f.schemeIdUri,segmentData:e,startTime:f.startTime,timescale:f.timescale,value:f.value}))}else d==="ID3"?el(a,new Uj(e,f)):_.A(oo,"MPL metadata event of type "+d+" was ignored.")};a.B.onTimedMetadata= function(d,e){var f={id:e.id,startTime:e.startTime,endTime:e.endTime,hlsTimedMetadata:{rangeClass:e.rangeClass,startDate:e.startDate,endDate:e.endDate,duration:e.duration,plannedDuration:e.plannedDuration,scte35Cmd:e.scte35Cmd,scte35Out:e.scte35Out,scte35In:e.scte35In,clientAttributes:e.clientAttributes,endOnNext:e.endOnNext}};switch(d){case cast.player.api.DateRangeEventType.DATE_RANGE_CHANGED:d=new nk("TIMED_METADATA_CHANGED",f);a.o>=3&&el(a,d);break;case cast.player.api.DateRangeEventType.DATE_RANGE_ENTER:d= new nk("TIMED_METADATA_ENTER",f);el(a,d);break;case cast.player.api.DateRangeEventType.DATE_RANGE_EXIT:d=new nk("TIMED_METADATA_EXIT",f),el(a,d)}a.J.has(e)||(a.L.push(f),a.J.add(e))};a.B.trackBandwidth=a.Xk.bind(a);a.B.getQualityLevel=a.Up.bind(a);a.g=lo(a.j.mimeType,a.j.hlsSegmentFormat,a.j.hlsVideoSegmentFormat,a.B);a.D=new cast.player.api.Player(a.B)}}; no=function(a,b){b.initialBandwidth!=null&&(a.initialBandwidth=b.initialBandwidth);b.autoResumeDuration!=null&&(a.autoResumeDuration=b.autoResumeDuration);b.autoResumeNumberOfSegments!=null&&(a.autoResumeNumberOfSegments=b.autoResumeNumberOfSegments);b.autoPauseDuration!=null&&(a.autoPauseDuration=b.autoPauseDuration);b.segmentRequestRetryLimit!=null&&(a.segmentRequestRetryLimit=b.segmentRequestRetryLimit);b.licenseUrl!=null&&(a.licenseUrl=b.licenseUrl);b.protectionSystem!=null&&(a.protectionSystem= b.protectionSystem);b.licenseCustomData!=null&&(a.licenseCustomData=b.licenseCustomData);b.manifestRequestHandler!=null&&(a.updateManifestRequestInfo=b.manifestRequestHandler);b.segmentRequestHandler!=null&&(a.updateSegmentRequestInfo=function(c){b.segmentRequestHandler(c)});b.licenseRequestHandler!=null&&(a.updateLicenseRequestInfo=b.licenseRequestHandler);b.captionsRequestHandler!=null&&(a.updateCaptionsRequestInfo=b.captionsRequestHandler);b.manifestHandler!=null&&(a.processManifest=b.manifestHandler); b.segmentHandler!=null&&(a.processSegment=function(c,d,e){return b.segmentHandler(d,e)});b.licenseHandler!=null&&(a.processLicense=b.licenseHandler)};qo=function(a,b,c){Lk.call(this,a,b,c);this.B=this.j=a.D;this.C=a.g;this.L=new Map;this.O=[]}; to=function(a,b){a=a.toLowerCase();if(_.ec(ro,a))return a;if(a=="text/mp2t")return"text/cea608";b=b?b.toLowerCase():null;switch(b){case "ttml":return"application/ttml+xml";case "webvtt":return"text/vtt"}_.A(so,"cannot guess text mime type. Defaults to VTT");return"text/vtt"};uo=function(){this.g=null}; wo=function(a,b){return _.G(vo(a,b)).then(function(c){if(!c)a:{c=cast.A.Cf.get();var d=_.Qe.K();d=_.Se(d,"use_shaka_for_hls");d=c&&c.useShakaForHls||d;D(cast.A.common.F.H.ho,cast.A.media.util.Li(b.mimeType));c=b.mimeType.toLowerCase();switch(c){case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "audio/mpegurl":case "audio/x-mpegurl":if(d){Fb(cast.A.common.F.H.qn,!0);c=cast.A.media.Kc.Kc.create(b,cast.A.media.Lc.Lc.create);break a}case "application/vnd.ms-sstr+xml":case "application/dash+xml":d= cast.A.media.he.he.create;var e=cast.A.media.ie.ie.create;cast.A.common.Vb.Ej&&c==="application/dash+xml"&&(d=cast.A.media.Kc.Kc.create,e=cast.A.media.Lc.Lc.create);c=d(b,e);break a}c=c.startsWith("image/")?cast.A.media.Bg.create(b):_.G(new ho(b,cast.A.media.jo.create))}return c})}; vo=function(a,b){function c(d,e,f){return new cast.A.media.sk(d,e,f)}return a.g?_.G(a.g(b)).then(function(d){var e;if(e=d)if(d.getPlayerVersion){var f=d.getPlayerVersion();f||typeof f==="number"?(e=cast.A.common.F.H.Qm,f=cast.A.common.hash.Tg(f),D(e,f),e=!0):(_.z(xo,"Player getPlayerVersion should return a number."),C(cast.A.common.F.H.Yh),e=!1)}else _.z(xo,"Missing implementation of player interface getPlayerVersion method."),C(cast.A.common.F.H.Yh),e=!1;return e?new An(d,b,c):null}):null}; yo=function(a,b,c){this.o=a;this.j=b;this.g=-1;this.l=null;this.seekTo=c};zo=function(){this.g=this.j=this.l=null};Ao=function(a,b){return a.jb}),e=b,f=f?f.j:Infinity,c=null;a.I.cache(c,e,f);return c};Go=function(a){if(a.j.g===a.j.j.length-1)return null;var b=a.j.j[a.j.g+1];return new pl(a.j.o,b.B,b.breakClip)};Ho=function(a,b){a.j.g++;a.j.l=b};Io=function(a,b){return a.o.slice(0).reverse().find(function(c){return c.o===b}).g}; Jo=function(a,b,c,d,e,f,g,k){this.o=a;this.breakClip=b;this.l=c;this.D=d;this.j=e;this.g=f;this.B=g;this.expanded=k};Do=function(a,b){return a.j-.001<=b&&(a.g<0||b<=a.g+.001)};Ko=function(a,b,c,d,e){cast.A.media.Player.call(this,a,b,c,d,e);this.C=this.l=this.I=null;this.o=!1};Lo=function(a){var b=a.timeline;a.D.startTime&&(a.D.startTime=Co(b,a.D.startTime));return wo(uo.K(),a.D)}; Mo=function(a){var b=a.Ua(),c=a.timeline,d=null,e=_.G();if(a.l)c.j.g<0||!Do(c.j.j[c.j.g],b)?(d=Go(c))?(e=a.g.seek(c.j.j[c.j.g+1].j),Ho(c,d)):(c.j=null,a.l.resolve(),a.l=null,e=a.C,a.C=null):d=c.j.l;else if(d=Fo(c,b))b=d.g,a.j||!b.isWatched||c.B.o||(e=a.g.seek(Io(c,b)),d=null);return e.then(function(){var f=d,g=a.o?"SKIPPED":void 0;f?a.j&&ql(a.j,f)||(a.o=!1,Ul(a,"BREAK_CLIP_STARTED",f,g)):a.j&&(a.o=!1,Ul(a,"BREAK_ENDED",null,g))})};No=function(a){vl.call(this,!0,a,[],[]);this.j=null}; Oo=function(a,b,c){a.reset();tl(a,c||[]);b&&b.forEach(function(d){return d.isEmbedded=!0});ul(a,b||[])};Po=function(a,b,c,d,e){cast.A.media.Player.call(this,a,b,c,d,e);this.o=d;this.l=this.C=null};Qo=function(a){if(a.l){var b=a.l.getBreaks();Oo(a.o,b,a.l.getBreakClips());b&&b.length>0&&D(cast.A.common.F.H.Rm,b.length)}};Ro=function(a,b,c,d){d=d===void 0?Infinity:d;this.g=a;this.breakStatus=b;this.startTime=c===void 0?0:c;this.endTime=d}; So=function(a,b,c){b=b===void 0?[]:b;c=c===void 0?[]:c;vl.call(this,!1,a,b,c)};Wo=function(a,b,c){return _.G().then(function(){var d=a.g.find(function(e){return!(e.isWatched&&!a.B.o)&&e.position==b});return d?To(a,d,0,c,d.position).eb(function(){_.B(Uo,"createMediaClipAt: Cannot create a stitching media clip");return null}):null}).then(function(d){return d?d:new Ro(c,null,b,Vo(a,b))})}; Xo=function(a,b,c){return _.G().then(function(){if(b.isPlayingBreak()){var d=b.breakStatus,e=d.g,f=d.getPosition(),g=d.l+1;return _.G().then(function(){if(e.breakClipIds.length>g)return To(a,e,g,c,f).eb(function(l){if(l instanceof Fd)return sd(l);_.B(Uo,"createNextMediaClip: Cannot create stitching clip in break.")});_.B(Uo,"createNextMediaClip: No more break clip");return null}).then(function(l){if(l)return l;l=d.getPosition();_.B(Uo,"createNextMediaClip: The current break status position is: "+ l);return l})}var k=a.g.find(function(l){return!(l.isWatched&&!a.B.o)&&(l.position>=b.endTime||l.position<0)});if(k)return To(a,k,0,c,k.position).eb(function(l){return l instanceof Fd?sd(l):null}).then(function(l){if(l)return l;_.B(Uo,"createNextMediaClip: next break is skipped.");return k.position});_.B(Uo,"createNextMediaClip: No next break");return-1}).then(function(d){return typeof d!=="number"?d:d<0?(_.B(Uo,"createNextMediaClip: No more clip"),null):new Ro(c,null,d,Vo(a,d))})}; To=function(a,b,c,d,e){var f=_.G();c===0&&(f=Yo(a,b));return f.then(function(){for(var g=c;gb});return c?c.position:Infinity};Zo=function(a,b,c,d,e,f){cast.A.media.Player.call(this,a,b,c,d,e);this.C=this.da=null;this.O=this.timeline;this.na=this.I=this.o=this.l=null;this.L=this.M=void 0;this.ea=yd();this.Sa=1;this.Aa=0;this.Ja=this.la=null;this.ib=f||5;this.hb=f!==void 0;this.O.ta.tf(this.ta)};$o=function(a){var b=_.Qe.K();return _.Se(b,"delay_break_clip_preloading",!0)||a.hb}; ep=function(a,b,c,d){ap(a);var e=Ve();return To(a.O,b,0,a.D,e?c:b.position).then(function(f){if(!f)return _.B(bp,"Fail to create seek clip"),!1;cp(a,f).then(function(g){if(d===void 0){var k=!0;a.g&&(k=a.g.hd()!=="PAUSED")}else k=d=="PLAYBACK_START";if(a.g){Xl(a,a.Ff);var l=a.g.end("STOPPED")}else l=_.G();a.I=c;l.then(function(){dp(a,g,f,k)})});return!0})};ap=function(a){a.o&&(a.o.cancel("0"),a.o=null);a.C&&(a.C.cancel("0"),a.C=null)}; fp=function(a,b){return Xo(a.O,b,a.D).then(function(c){return c&&!b.isPlayingBreak()&&!c.isPlayingBreak()&&b.g.url===c.g.url&&a.Ua()0&&!c.breaks[0].isEmbedded){D(cast.A.common.F.H.Ud,cast.A.common.F.Vd.fo); var k=new So(b,c.breaks,c.breakClips);var l=new cast.A.media.lo(b,c,d,k,a.g,e.adBreakPreloadTime)}else c.breaks&&c.breaks.length>0?D(cast.A.common.F.H.Ud,cast.A.common.F.Vd.zk):D(cast.A.common.F.H.Ud,cast.A.common.F.Vd.Ak),k=new Bo(b,c.breaks,c.breakClips),l=new Ko(b,c,d,k,a.g);b.g=k;return _.G(l)})})};mp=function(a){this.g=a}; N=function(a){if(!(a instanceof mp))throw np.error("Proper Player object can be acquried by calling getPlayer() of cast.framework.Application object"),Error("player is not created properly.");this.o=new _.Fk;this.Aa=new kp(this.ba.bind(this));this.l=new bn;this.D=new bn;this.j=null;this.L=yd();this.B=dg.K();this.g=this.na=this.ka=this.ea=this.la=this.fa=null;this.ma=_.G();this.ca=this.G=null;this.T=new Ij(new Gj);this.C=new $m(new Ym);this.Z=new Tm(new Rm(this));this.J=a.g;this.za=Date.now();this.V= null;this.I=1;this.W=this.M=null;this.O=new cast.A.common.ge.ge;this.da=this.R=!1;this.pa=null;op(this)}; op=function(a){Ik(a.o,function(e,f){e!=="ERROR"&&e!=="*"&&a.o.dispatchEvent(new Tj(900,f))});a.o.addEventListener("MEDIA_FINISHED",a.Sq,a);a.o.addEventListener("LIVE_IS_MOVING_WINDOW_CHANGED",a.ba,a);a.o.addEventListener("LIVE_ENDED",a.ba,a);a.o.addEventListener("RATE_CHANGE",a.hr,a);a.o.addEventListener("ERROR",a.bl,a);a.o.addEventListener("BUFFERING",a.Jq,a);a.o.addEventListener("TIME_DRIFTED",a.pr,a);a.o.addEventListener("TIME_UPDATE",function(){Wm(a.Z,!0)});a.o.addEventListener("DURATION_CHANGE", a.Oq,a);a.o.addEventListener("TRACKS_CHANGED",a.qr,a);a.o.addEventListener("PLAYING",a.Ko,a);a.B.o=a.lr.bind(a);a.B.l=a.Pq.bind(a);cn(a.D,"LOAD_BY_ENTITY",a.B.l.bind(a.B));a.B.l=a.D.g;cn(a.D,"SET_CREDENTIALS",a.B.o.bind(a.B));a.B.o=a.D.g;a.B.D=a.D.g;a.B.I=a.D.g;a.B.C=a.D.g;a.B.G=a.D.g;a.B.J=a.D.g;_.cc(pp,function(e){dn(a.l,e,function(f){qp(a,f)})});var b=rp,c={},d;for(d in b)c={ne:c.ne},c.ne=d,dn(a.D,c.ne,function(e){return function(f){var g=rp[e.ne];sp(a,g);a.o.dispatchEvent(new ak(g,_.fc(f),""))}}(c))}; up=function(a,b,c){ee(cast.A.common.F.H.Ek,cast.A.common.F.Hp(b));if(!_.ec(tp,b))throw a="addEventListener("+b+") failed due to invalid event type",np.error(a),Error(a);a.o.addEventListener(b,c)};vp=function(a,b,c,d,e){c||(c=b.requestData.type==="LOAD"?"LOAD_FAILED":"ERROR");c=new wi(c);c.reason=d===void 0?"APP_ERROR":d;c.requestId=b.requestData.requestId;c.customData=e;a.j.Ea(b.senderId,c)}; wp=function(a){return function(){var b=Date.now();return Promise.resolve(a.apply(null,_.ia(_.Ba.apply(0,arguments)))).then(function(c){D(cast.A.common.F.H.Wh,Date.now()-b);return c}).catch(function(c){D(cast.A.common.F.H.Wh,Date.now()-b);return Promise.reject(c)})}};xp=function(a,b){if(a.g){var c=a.g;a.g=null;a.T.reset();a.C.reset();a.R=!1;var d=a.O;nn(d);d.j=!1;d.l=!1;d=a.j;d.o&&Hl(d.o);d.o=null;b!=null||(b="INTERRUPTED");a.ma=c.reset(b)}return a.ma}; Ap=function(a,b,c){var d="ERROR",e="APP_ERROR",f=void 0;c&&(_.ec(yp,c)?d=c:_.ec(zp,c)?e=c:(_.ec(yp,c.type)&&(d=c.type),_.ec(zp,c.reason)&&(e=c.reason)),f=c.customData);vp(a,b,d,e,f)};Bp=function(a){var b=a.C.getTracks().length;D(cast.A.common.F.H.Am,b);a.C.getTracks().forEach(function(c){(c=c.trackContentType)&&D(cast.A.common.F.H.io,Ne[c]||0)})}; Ep=function(a){if(a=a.kb()){var b=0;a.streamType&&(b=Cp[a.streamType]||0);var c=0;a.mediaCategory&&(c=Dp[a.mediaCategory]||0);D(cast.A.common.F.H.tl,Ne[a.contentType]||0);D(cast.A.common.F.H.ul,b);D(cast.A.common.F.H.sl,c)}};Fp=function(a){var b;(a=(b=a.queueData)==null?void 0:b.items)&&D(cast.A.common.F.H.QUEUE_ITEMS,a.length)}; Hp=function(a,b){var c=b.media,d=Object.assign(new Mj,a.ca);a.fa&&(d=a.fa(b,d));var e=a.la?a.la(b):c.contentUrl||c.contentId;return _.G(d).then(function(f){if(!f)return np.error("Load failed, missing playback config."),sd();Gp(f);return _.G(e).then(function(g){if(!g)return np.error("Load failed, missing content url."),sd();var k=cast.A.media.util,l=k.aq,m=b.currentTime,n=b.activeTrackIds,t=new nj;c.tracks&&(t.tracks=c.tracks||[]);c.textTrackStyle&&(t.textTrackStyle=c.textTrackStyle);t.activeTrackIds= n;g=l.call(k,c,m,f,g,t);c.contentType=g.mimeType;return lp(a.Aa,a.J,c,g)})})};Gp=function(a){var b=cast.A.common.F;for(c in b.Zh)a[c]!==void 0&&D(b.H.Om,b.Zh[c]);var c=a.mplConfig;for(var d in b.Xh)(a[d]!==void 0||c&&c[d]!==void 0)&&D(b.H.sm,b.Xh[d])};Ip=function(a){a&&a.media&&(a.media.vmapAdsRequest=void 0,(a=a.media.breakClips)&&a.forEach(function(b){b.vastAdsRequest=void 0}))}; Jp=function(a,b){if(a.g&&a.g.oa()){var c=a.C,d=c.Gi();d.length>0?a.M=d[0].language||null:b&&a.M!=null?c.Ee(a.M).length>0&&c.rf(a.M):a.M=null;(d=c.tc())?a.W=d:b&&a.W!=null&&c.rb(a.W)}}; Kp=function(a,b){a.j=b;a.L.resolve();a.T.j=b;a.C.j=b;b.Mj=function(c){xp(a,c)};b.W=a.Uq.bind(a);b.da=a.Xq.bind(a);b.Wc=function(){a.o.dispatchEvent(new bk("PLAYER_PRELOADING_CANCELLED"))};b.Ac=a.Nq.bind(a);b.Lj=function(){};b.ma=a.ar.bind(a);b.ka=a.Yq.bind(a);b.ca=a.Wq.bind(a);b.Z=a.Vq.bind(a);b.la=a.Zq.bind(a);cn(a.l,"REQUEST_LOAD",b.W.bind(b));b.W=function(c,d){a.l.g(c,d)};cn(a.l,"REQUEST_PRELOAD",b.da.bind(b));b.da=a.l.g;cn(a.l,"REQUEST_STOP",b.Tb.bind(b));b.Tb=a.l.g;cn(a.l,"REQUEST_PAUSE",a.Hb.bind(a, b.Z.bind(b)));b.Z=a.l.g;cn(a.l,"REQUEST_PLAY",b.ca.bind(b));b.ca=a.l.g;cn(a.l,"REQUEST_PLAY_AGAIN",b.Sa.bind(b));b.Sa=a.l.g;cn(a.l,"REQUEST_SKIP_AD",a.Hb.bind(a,b.ma.bind(b)));b.ma=a.l.g;cn(a.l,"REQUEST_SEEK",a.Hb.bind(a,b.ka.bind(b)));b.ka=a.l.g;cn(a.l,"REQUEST_PLAYBACK_RATE_CHANGE",a.Hb.bind(a,b.la.bind(b)));b.la=a.l.g;cn(a.l,"REQUEST_VOLUME_CHANGE",a.Hb.bind(a,b.Pb.bind(b)));b.Pb=a.l.g;cn(a.l,"REQUEST_GET_STATUS",b.Ja.bind(b));b.Ja=a.l.g;cn(a.l,"REQUEST_EDIT_AUDIO_TRACKS",b.za.bind(b));b.za=a.l.g; cn(a.l,"REQUEST_EDIT_TRACKS_INFO",a.Hb.bind(a,b.Aa.bind(b)));b.Aa=a.l.g;cn(a.l,"REQUEST_QUEUE_LOAD",b.ib.bind(b));b.ib=a.l.g;cn(a.l,"REQUEST_QUEUE_INSERT",b.hb.bind(b));b.hb=a.l.g;cn(a.l,"REQUEST_QUEUE_UPDATE",a.Hb.bind(a,b.ea.bind(b)));b.ea=a.l.g;cn(a.l,"REQUEST_QUEUE_REMOVE",b.jb.bind(b));b.jb=a.l.g;cn(a.l,"REQUEST_QUEUE_REORDER",b.mb.bind(b));b.mb=a.l.g;b.na=a.mr.bind(a);cn(a.l,"REQUEST_STORE_SESSION",a.Hb.bind(a,b.na.bind(b)));b.na=a.l.g;b.fa=a.jr.bind(a);cn(a.l,"REQUEST_RESUME_SESSION",a.Hb.bind(a, b.fa.bind(b)));b.fa=a.l.g;Um(a.Z,b)};qp=function(a,b){sp(a,b.type);a.o.dispatchEvent(new ak(b.type,_.fc(b.requestData),b.senderId))};hq=function(a,b){vp(a,b,"ERROR","NOT_SUPPORTED");C(cast.A.common.F.H.vo)}; sp=function(a,b){switch(b){case "REQUEST_LOAD":case "REQUEST_LOAD_BY_ENTITY":case "REQUEST_SKIP_AD":case "REQUEST_SEEK":case "REQUEST_PLAY":case "REQUEST_PAUSE":case "REQUEST_STOP":case "REQUEST_PLAYBACK_RATE_CHANGE":case "REQUEST_PLAY_AGAIN":case "REQUEST_VOLUME_CHANGE":case "REQUEST_QUEUE_LOAD":case "REQUEST_QUEUE_INSERT":case "REQUEST_QUEUE_UPDATE":case "REQUEST_QUEUE_REMOVE":case "REQUEST_QUEUE_REORDER":case "REQUEST_USER_ACTION":a.pa=Date.now()}}; iq=function(a,b){this.l=a;this.o=b;this.g=this.j=null};jq=function(a){clearTimeout(a.j);a.j=null};nq=function(a,b){b==a.g?_.Ab(kq,"state is already set to idle due to "+b):(a.g=b,b=lq[b],jq(a),a.j=setTimeout(function(){_.B(kq,"timer expired");cast.A.common.Wd.Ne(mq[this.g||"no_media"]);this.o()}.bind(a),b*6E4))};oq=function(){}; O=function(a){if(!(a instanceof oq))throw _.z(pq,"CastReceiverContext is a singleton.Please call CastReceiverContext.getInstance() instead."),Error("CastReceiverContext is not created properly.");cast.A.common.F.Cq();cast.Df&&Fb(cast.A.common.F.H.Kk,cast.Df);nf=cast.A.VERSION;this.j=_.ue.K();this.C=new K;this.l=new N(new mp(this.C));this.C.l=this.l;this.g=null;this.D=!1;this.B=null;this.j.addEventListener("shutdown",function(){cast.A.common.Wd.Ne(7)});this.o=new Map}; rq=function(){var a=document.getElementsByTagName("video"),b=document.getElementsByTagName("audio"),c=qq();if(a.length==0&&b.length==0&&!c)return _.A(pq,"MediaElement is not created yet"),null;if(c)return c.getMediaElement();c=_.q(a);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.classList&&d.classList.contains("castMediaElement"))return d;c=_.q(b);for(d=c.next();!d.done;d=c.next())if(d=d.value,d.classList&&d.classList.contains("castMediaElement"))return d;return a.length>0?a[0]:b[0]}; qq=function(){var a=document.getElementsByTagName("cast-media-player");return a.length>0?a[0]:null};sq=function(a,b){return ve(a.j,b,cast.A.P.Aj(a.g&&a.g.customNamespaces&&a.g.customNamespaces[b]||"JSON"))};tq=function(a){var b=a.l;b.addEventListener("PLAYER_LOADING",a.Sr.bind(a));b.addEventListener("MEDIA_FINISHED",a.Lr.bind(a))};vq=function(){uq||(uq=new O(new oq));return uq}; yq=function(){var a=this;this.j=new _.Fk;this.l=new _.Fk;this.g=vq();if(this.o=this.g.isRemoteControl())vb(wq,xq,"App Running as a Remote Control"),this.D=sq(this.g,"urn:x-cast:com.google.cast.remotecontrol"),this.D.addEventListener("send",function(b){a.l.dispatchEvent(b.data)}),this.g.mi("urn:x-cast:com.google.cast.remotecontrol",this.B.bind(this)),this.addEventListener("APPLICATION_CHANGED",function(){a.g.kj("urn:x-cast:com.google.cast.remotecontrol","system-0",new Ji)})}; zq=function(a,b){a.l.addEventListener("SEEK",b)};Aq=function(){};Cq=function(a){if(!(a instanceof Aq))throw _.z(Bq,"SignalCollector is a singleton. Please call cast.framework.pal.SignalCollector.getInstance() instead."),Error("SignalCollector was not created properly.");this.g=vq()}; Dq=function(a){if(a=a.g.l.g)switch(a.g&&a.g.wb()||0){case cast.A.common.F.Xa.Lh:case cast.A.common.F.Xa.ei:return"HTML Media Player";case cast.A.common.F.Xa.Lf:return"Shaka Player";case cast.A.common.F.Xa.gi:return"MPL";case cast.A.common.F.Xa.Eh:return"Custom Player"}return""};Eq=function(a){return a.g.wc()?Promise.resolve():new Promise(function(b){a.g.addEventListener("ready",function(){b()})})}; Hq=function(){var a=this;this.g=new cast.receiver.U.Gc.Gc(function(b){return Fq(b)},function(b){return new cast.controls.ControlsImplementationCaf(b)},function(b,c){return new cast.controls.KeyEventHandler(b,c)});cast.A.Kf.K().addEventListener("APPLICATION_CHANGED",function(b){Gq(a,b)})};Fq=function(a){var b,c,d,e,f,g;return Aa(function(k){b=cast.receiver.U.Gc.rk;c=cast.A.common.ob;d=c.ob;e=c.wm;f={};g=(f[b.Vn]=e.kk,f[b.uk]=e.ik,f[b.Tj]=e.hk,f[b.pl]=e.jk,f);return g[a]?qa(k,d.Hg(g[a]),0):k.ja(0)})}; Gq=function(a,b){ug(a.g,function(){a.g.g.setIsBluetoothPlayback(b.playbackType===5)})};Iq=function(a,b,c,d,e){this.name=a;this.isRemoteControl=d===void 0?!1:d;this.isActiveGroupPlayback=e===void 0?!1:e;this.iconUrl=b;this.groupName=c===void 0?"":c}; _.Jq=function(){this.applicationData=null;this.state="launching";this.isSeeking=!1;this.currentTime=this.duration=0;this.playbackRate=1;this.metadata=null;this.mediaSessionId=0;this.queueData=this.media=null;this.nextThumbnailUrl=this.nextSubtitle=this.nextTitle=this.secondaryImageUrl=this.thumbnailUrl=this.subtitle=this.title="";this.nextMetadata=null;this.preloadingNext=!1;this.mediaCategory=this.contentType=null;this.supportedMediaCommands=0;this.isAtLiveEdge=this.isLive=!1;this.sectionDuration= this.sectionStartTimeInMedia=this.mediaStartAbsoluteTime=this.liveSeekableRange=null;this.breakPercentagePositions=[];this.isBreakSkippable=this.isPlayingBreak=!1;this.whenSkippable=void 0;this.currentBreakClipNumber=this.numberBreakClips=0;this.breakTitle="";this.displayStatus=!1;this.displayType="tv";this.dpadUi=!1;this.customState=this.presentation=null;this.activeTrackIds=[]};Kq=function(a,b,c){this.type=a;this.field=b;this.value=c}; Lq=function(){_.E.call(this);var a=this;this.l=0;this.B=(new Date).getTime();this.C=1;this.g=!1;this.j=function(){};this.G=function(){a.g&&a.j()}};Mq=function(a){return a.g?a.l+(Date.now()-a.B)/1E3*a.C:a.l||0};Nq=function(a){a.g=!0;clearInterval(a.o);a.o=setInterval(function(){a.G()},200)};_.Rq=function(a){this.l=vq();this.j=this.l.l;this.J=cast.A.Kf.K();this.I=new _.Fk;this.C=void 0;this.T=!1;this.R=[];this.G=0;this.g=Oq(this,a);Pq(this);this.L=this.M=this.O=this.D=this.B=null;this.o=new Lq;Qq(this)}; Oq=function(a,b){return new window.Proxy(b,{set:function(c,d,e){if(e===c[d]&&typeof e!="object")return!0;c[d]=e;c=new Kq(d+cast.A.U.aa,d,e);a.T?a.R.push(c):a.I.dispatchEvent(c);return!0}})};Sq=function(a,b){return function(){var c=_.Ba.apply(0,arguments);a.T=!0;b.apply(null,_.ia(c));for(a.T=!1;a.R.length>0;)c=a.R.shift(),a.I.dispatchEvent(c)}}; Tq=function(a){var b=a.l.Pc();if(b){var c="",d=!1,e=cast.A.P.rp(a.l.j.L);e&&(c=e&&e.deviceName,d=[3,2,4].includes(e.playbackType));a.g.applicationData=new Iq(b.name,b.iconUrl,c,!1,d)}}; Yq=function(a,b){b=(a.g.media=b)||new zi;a:{switch((b.contentType||"").toLowerCase().split("/")[0]){case "image":var c="image";break a;case "audio":c="audio";break a}c="video"}a.g.contentType=c;a.g.mediaCategory=b.mediaCategory||cast.receiver.Gb.getMediaCategory(cast.A.P.yj(b))||"VIDEO";a.g.isLive=b.streamType==="LIVE";a.g.metadata=b.metadata||null;c=b.metadata||{};a.g.title=c.title||"";a.g.subtitle=c.subtitle||"";var d=c.images;a.g.thumbnailUrl=d&&d[0]&&d[0].url||"";a.g.secondaryImageUrl=c.secondaryImage&& c.secondaryImage.url||"";a.G=0;Uq(a,Vq(a));Wq(a);Xq(a,b)};Zq=function(a,b){b?(a.g.preloadingNext=!0,a.g.nextTitle=b.title||"",a.g.nextSubtitle=b.subtitle||"",a.g.nextThumbnailUrl=b.images&&b.images[0]&&b.images[0].url||"",a.g.nextMetadata=b):(a.g.preloadingNext=!1,a.g.nextTitle="",a.g.nextSubtitle="",a.g.nextThumbnailUrl="",a.g.nextMetadata=null)};$q=function(a,b){return!a||typeof b!=="number"||isNaN(b)||b==0?[]:a.map(function(c){return c.position<0?100:Math.min(100,c.position/b*100)})}; ar=function(a){a=a.l.g;return!!(a&&a.uiConfig&&a.uiConfig.useStatusOnlyForUi)}; Qq=function(a){var b=a.l.j,c=a.l.isRemoteControl();_.B(br,"Remote control mode enabled: "+c);c?(a.o.j=Sq(a,function(){a.g.currentTime=Mq(a.o);cr(a)}),zq(a.J,Sq(a,function(){var d=a.o;d.g=!1;clearInterval(d.o);a.g.isSeeking=!0})),a.J.addEventListener("MEDIA_STATUS",Sq(a,function(d){d&&d.status&&d.status[0]&&dr(a,d.status[0])})),a.J.addEventListener("APPLICATION_CHANGED",function(d){a.g.applicationData=new Iq(d.application&&d.application.displayName||"",d.iconUrl,d.deviceName,!0,!0)}),a.J.addEventListener("CUSTOM_STATE", function(d){a.g.customState=d.state})):a.l.wc()?er(a):a.l.addEventListener("ready",function(){return er(a)});b.Td().then(function(){Ze()?a.g.displayType="touch":a.g.displayType="tv";af()===2&&(a.g.dpadUi=!0)})};er=function(a){Tq(a);a.l.addEventListener("playbackdevicestatus",function(){Tq(a)});fr(a);setTimeout(function(){a.g.state=="launching"&&gr(a,"idle")},1E3)}; fr=function(a){ar(a)?(a.j.addEventListener("REQUEST_SEEK",Sq(a,function(){var b=a.o;b.g=!1;clearInterval(b.o);a.g.isSeeking=!0})),a.j.addEventListener("MEDIA_STATUS",Sq(a,function(b){b.mediaStatus&&dr(a,b.mediaStatus)})),a.o.j=Sq(a,function(){a.g.currentTime=Mq(a.o);cr(a)})):(a.j.addEventListener("MEDIA_FINISHED",Sq(a,function(b){b.endedReason==="INTERRUPTED"?gr(a,"loading"):gr(a,"idle");hr(a);Zq(a)})),a.j.addEventListener("PLAYER_LOADING",Sq(a,function(b){Zq(a);Yq(a,b.media);a.g.mediaCategory=== "IMAGE"?gr(a,"playing"):gr(a,"loading")})),a.j.addEventListener("PLAYER_LOAD_COMPLETE",Sq(a,function(b){Yq(a,b.media);a.j.getPlayerState()=="PAUSED"&&gr(a,"paused");ir(a);jr(a,b.media,a.j.getLiveSeekableRange())})),a.j.addEventListener("MEDIA_INFORMATION_CHANGED",Sq(a,function(b){Yq(a,b.media)})),a.j.addEventListener("PLAYING",Sq(a,function(){return gr(a,"playing")})),a.j.addEventListener("PAUSE",Sq(a,function(b){b.ended?Zq(a):gr(a,"paused")})),a.j.addEventListener("BUFFERING",Sq(a,function(b){b.isBuffering? gr(a,"buffering"):a.g.state==="buffering"&&gr(a,"playing")})),a.j.addEventListener("SEEKING",Sq(a,function(){a.g.isSeeking=!0;Uq(a,Vq(a));ir(a);Zq(a)})),a.j.addEventListener("SEEKED",Sq(a,function(){a.g.isSeeking=!1;Uq(a,Vq(a));ir(a)})),a.j.addEventListener("BREAK_STARTED",Sq(a,function(b){return kr(a,b)})),a.j.addEventListener("BREAK_ENDED",Sq(a,function(b){return kr(a,b)})),a.j.addEventListener("BREAK_CLIP_LOADING",Sq(a,function(b){return kr(a,b)})),a.j.addEventListener("BREAK_CLIP_STARTED",Sq(a, function(b){return kr(a,b)})),a.j.addEventListener("BREAK_CLIP_ENDED",Sq(a,function(b){return kr(a,b)})),a.j.addEventListener("DURATION_CHANGE",Sq(a,function(){return ir(a)})),a.j.addEventListener("TIME_UPDATE",Sq(a,function(){return ir(a)})),a.j.addEventListener("REQUEST_DISPLAY_STATUS",Sq(a,function(){a.g.mediaCategory==="VIDEO"&&Uq(a,!0)})),a.j.addEventListener("REQUEST_PLAY",function(){a.g.mediaCategory==="VIDEO"&&a.g.state==="playing"&&Uq(a,!0)}),a.j.addEventListener("PLAYER_PRELOADING",Sq(a, function(b){Zq(a,b.media.metadata)})),a.j.addEventListener("MEDIA_STATUS",Sq(a,function(b){b.mediaStatus&&lr(a,b.mediaStatus)})),a.j.addEventListener("CUSTOM_STATE",function(b){a.g.customState=b.state}))}; lr=function(a,b){b.extendedStatus&&(b=_.fc(b),Object.assign(b,b.extendedStatus));a.g.mediaSessionId!==b.mediaSessionId?(a.g.mediaSessionId=b.mediaSessionId,Yq(a,b.media),a.g.queueData=b.queueData):(b.queueData&&(a.g.queueData=b.queueData),b.media&&Yq(a,b.media));typeof b.supportedMediaCommands==="number"&&(a.g.supportedMediaCommands=b.supportedMediaCommands);if(b.liveSeekableRange){var c=b.liveSeekableRange;a.g.isLive&&(hr(a),_.mr(a)?(a.g.liveSeekableRange=new _.Wi,Object.assign(a.g.liveSeekableRange, c),nr(a),or(a)):a.g.liveSeekableRange=null)}a.g.activeTrackIds=b.activeTrackIds||[];switch(b.playerState){case "PLAYING":gr(a,"playing");break;case "PAUSED":gr(a,"paused");break;case "BUFFERING":gr(a,"buffering");break;case "IDLE":gr(a,"idle");break;case "LOADING":gr(a,"loading")}pr(a)}; dr=function(a,b){a.g.isSeeking=!1;lr(a,b);var c=b.breakStatus,d=a.g.media,e=a.o,f=cast.A.P.Es(b),g=cast.receiver.Gb.zd(f.breakStatus),k=g?f.breakStatus.currentBreakClipTime:f.currentTime;k=k||0;_.ei(k)?(e.l=Number(k),e.B=Date.now(),e.j()):e.g&&(e.l+=(Date.now()-e.B)/1E3*e.C,e.B=Date.now(),e.j(),f.playerState!=="IDLE"&&_.A(qr,"currentTime was not synchronized from Media Status. Possible incorrect progress bar position"));f.playerState==="PLAYING"?Nq(e):(e.g=!1,clearInterval(e.o));e.C=!g&&_.ei(f.playbackRate)? f.playbackRate:1;a.g.isPlayingBreak=!!cast.receiver.Gb.zd(c);e=rr(c,d);f=sr(c,d);a:{if(a.g.isPlayingBreak){if(!f){_.z(br,"Break clip data is not found for currently playing break.");d=void 0;break a}d=f.duration}else{if(!d){d=void 0;break a}d=d.duration}_.ei(d)||(_.A(br,"Duration is not a valid number. Duration: "+d),d=void 0)}a.g.isPlayingBreak?(Uq(a,!1,!0),a.g.breakTitle=f&&f.title||""):a.g.breakTitle="";a.g.duration=d===void 0?0:d;Wq(a);a.C=cast.receiver.Gb.zd(c)?c.whenSkippable:void 0;cr(a);a.g.numberBreakClips= e&&Array.isArray(e.breakClipIds)?e.breakClipIds.length:0;e&&f?(c=e.breakClipIds.indexOf(f.id),c=c<0?0:c+1):c=0;a.g.currentBreakClipNumber=c;b.media&&jr(a,b.media,b.liveSeekableRange)};_.mr=function(a){return!!(a.g.supportedMediaCommands&2)}; Vq=function(a){if(a.g.isPlayingBreak)return!1;if(a.g.mediaCategory==="AUDIO"||a.g.mediaCategory==="VIDEO"&&a.g.applicationData&&a.g.applicationData.isRemoteControl)switch(a.g.state){case "playing":case "loading":case "buffering":case "paused":return!0;default:return!1}if(a.g.mediaCategory==="VIDEO")switch(a.g.state){case "loading":return!0;case "buffering":case "playing":case "paused":return a.g.isSeeking}return!1}; gr=function(a,b){a.g.state!=b&&(a.g.state=b,a.g.mediaCategory!=="VIDEO"||b!=="paused"||a.g.isPlayingBreak?Uq(a,Vq(a)):Uq(a,!0))}; kr=function(a,b){b.type=="BREAK_STARTED"?(a.g.isPlayingBreak=!0,Uq(a,!1,!0)):b.type=="BREAK_ENDED"&&(a.g.isPlayingBreak=!1);if(a.g.isPlayingBreak){a.g.numberBreakClips=b.total||0;a.g.currentBreakClipNumber=b.index||0;a.C=b.whenSkippable;var c=(a.g.media&&a.g.media.breakClips||[]).find(function(d){return d.id==b.breakClipId});a.g.breakTitle=c&&c.title||""}else a.C=void 0,a.g.numberBreakClips=0,a.g.currentBreakClipNumber=0,a.g.breakTitle="";ir(a)}; Xq=function(a,b){a.g.mediaStartAbsoluteTime=b.startAbsoluteTime||null;b.metadata?(a.g.sectionStartTimeInMedia=typeof b.metadata.sectionStartTimeInMedia==="number"?b.metadata.sectionStartTimeInMedia:null,a.g.sectionDuration=b.metadata.sectionDuration||null):(a.g.sectionStartTimeInMedia=null,a.g.sectionDuration=null)}; jr=function(a,b,c){b&&(a.g.isLive=b.streamType=="LIVE",Xq(a,b),a.g.isLive&&_.mr(a)&&c&&typeof c.start==="number"&&typeof c.end==="number"?(a.g.liveSeekableRange=new _.Wi,Object.assign(a.g.liveSeekableRange,c),nr(a),or(a)):a.g.liveSeekableRange=null)}; pr=function(a){if(a.g.isLive){var b=_.Qe.K();_.Se(b,"use_new_live_edge_logic",!0)?a.g.isAtLiveEdge=_.mr(a)&&a.g.liveSeekableRange?Math.abs(a.g.liveSeekableRange.end-a.g.currentTime)<10:a.g.state==="playing":a.g.isAtLiveEdge=_.mr(a)?typeof a.g.currentTime==="number"&&a.g.liveSeekableRange?Math.abs(a.g.currentTime-a.g.liveSeekableRange.end)<10:!1:a.j.getPlayerState()==="PLAYING"}else a.g.isAtLiveEdge=!1}; or=function(a){clearTimeout(a.D);a.D=null;if(a.g.isLive&&_.mr(a)&&a.g.liveSeekableRange){var b=Date.now()/1E3-a.O;a.g.liveSeekableRange.isMovingWindow&&(a.g.liveSeekableRange.start=a.M+b);a.g.liveSeekableRange.isLiveDone||(a.g.liveSeekableRange.end=a.L+b);pr(a);a.I.dispatchEvent(new Kq(_.tr,"liveSeekableRange",a.g.liveSeekableRange));a.D=setTimeout(function(){or(a)},500)}};nr=function(a){a.M=a.g.liveSeekableRange.start;a.L=a.g.liveSeekableRange.end;a.O=Date.now()/1E3}; hr=function(a){a.D!=null&&(clearTimeout(a.D),a.D=null,a.O=null,a.M=null,a.L=null)};ir=function(a){if(a.g.isPlayingBreak){a.g.duration=a.j.rc()||0;var b=a.j.Ta();b!==null&&(a.g.currentTime=b)}else a.g.duration=a.j.getDurationSec()||0,a.g.currentTime=a.j.getCurrentTimeSec()||0,pr(a);Wq(a);cr(a);or(a)};Wq=function(a){a.g.isPlayingBreak?(a.g.breakPercentagePositions=[],a.G=0):a.G!=a.g.duration&&(a.g.breakPercentagePositions=$q(a.g.media&&a.g.media.breaks,a.g.duration),a.G=a.g.duration)}; cr=function(a){if(typeof a.C==="number"&&a.C>=0){var b=a.C-a.g.currentTime;b>0?(a.g.whenSkippable=b,a.g.isBreakSkippable=!1):(a.g.whenSkippable=0,a.g.isBreakSkippable=!0)}else a.g.whenSkippable=void 0,a.g.isBreakSkippable=!1};Uq=function(a,b,c){if(b||!a.B||(c===void 0?0:c))if(a.B!==null&&(clearTimeout(a.B),a.B=null),a.g.displayStatus=b)a.B=setTimeout(function(){a.g.displayStatus=Vq(a);a.B=null},5E3)}; Pq=function(a){var b=ur;if(b){var c=a.g;Object.keys(b).forEach(function(d){return c[d]=b[d]})}else a.g.supportedMediaCommands=a.j.Nb()};rr=function(a,b){return cast.receiver.Gb.zd(a)?(b&&b.breaks||[]).find(function(c){return c.id===a.breakId})||null:null};sr=function(a,b){return cast.receiver.Gb.zd(a)?(b&&b.breakClips||[]).find(function(c){return c.id===a.breakClipId})||null:null};vr=function(a){this.j=a;this.G=window.getComputedStyle(this.j);this.g=[]}; wr=function(a){a.I=setTimeout(function(){a.o!==void 0&&a.g[a.o].classList.remove("visible")},a.B)};xr=function(a){return a.j&&a.j.children?Array.from(a.j.children).filter(function(b){var c=window.getComputedStyle(b).backgroundImage;if(c&&c!=="none")return b}):[]}; zr=function(a,b){a=a.G.getPropertyValue(b)||"";a=a.toLocaleLowerCase().trim();var c=parseFloat(a);switch(a.replace(/[-+.0-9]/g,"").trim()){case "ms":return c;case "s":return c*1E3;default:return _.z(yr,"Cannot parse value "+a+" of CSS style "+b),0}};Ar=function(){var a=_.Wh.call(this)||this;window.customElements&&window.customElements.define&&a.createdCallback();return a}; Br=function(a){Aa(function(b){if(b.g==1)return af()===1?qa(b,cast.A.common.ob.ob.Aq(),3):b.ja(0);a.j=document.createElement("tv-overlay");var c=a.j,d=a.B.querySelector("tv-overlay-placeholder"),e=d.parentNode;e&&e.replaceChild(c,d);a.D&&a.j.setTopRightVideoOverlayImageElement(a.D);b.g=0})};Cr=function(a,b,c){a.I.addEventListener(b,c);c()};Dr=function(){this.g=document.querySelector("cast-media-player")};Er=function(){}; da=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};ca=ba(this); p("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;da(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(Math.random()*1E9>>>0)+"_",e=0;return b}); p("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c0&&c>0;)if(d[--c]!=b[--e])return!1;return e<=0}}); p("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)ja(b,d)&&c.push([d,b[d]]);return c}});p("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Fa(this,b,"startsWith");b+="";var e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g=f}}); p("String.prototype.repeat",function(a){return a?a:function(b){var c=Fa(this,null,"repeat");if(b<0||b>1342177279)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});p("Object.is",function(a){return a?a:function(b,c){return b===c?b!==0||1/b===1/c:b!==b&&c!==c}}); p("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(c<0&&(c=Math.max(c+e,0));c0&&c?c.repeat(Math.ceil(b/c.length)).substring(0,b):"")+d}});p("Math.sign",function(a){return a?a:function(b){b=Number(b);return b===0||isNaN(b)?b:b>0?1:-1}});p("Number.isNaN",function(a){return a?a:function(b){return typeof b==="number"&&isNaN(b)}});p("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Da(this,b,c).Ri}}); p("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)ja(b,d)&&c.push(b[d]);return c}});var Oh,Oa,Pa;Oh=Oh||{};_.u=this||self;Oa="closure_uid_"+(Math.random()*1E9>>>0);Pa=0;_.u.cast=_.u.cast||{};cast=_.u.cast;cast.Df=!1;_.Va(Xa,Error);Xa.prototype.name="CustomError";var Ya;Ya=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(typeof a==="string")return typeof b!=="string"||b.length!=1?-1:a.indexOf(b,0);for(var c=0;c-1?(b=a[g],c||(b.oe=!1)):(b=new ac(b,this.src,f,!!d,e),b.oe=c,a.push(b));return b};jc.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.g))return!1;var e=this.g[a];b=lc(e,b,c,d);return b>-1?(bc(e[b]),Array.prototype.splice.call(e,b,1),e.length==0&&(delete this.g[a],this.j--),!0):!1}; jc.prototype.wd=function(a,b,c,d){a=this.g[a.toString()];var e=-1;a&&(e=lc(a,b,c,d));return e>-1?a[e]:null};var rc="closure_lm_"+(Math.random()*1E6|0),zc={},vc=0,Ac="__closure_events_fn_"+(Math.random()*1E9>>>0);_.Va(_.Bc,_.E);_.Bc.prototype[Xb]=!0;_.h=_.Bc.prototype;_.h.tf=function(a){this.J=a};_.h.addEventListener=function(a,b,c,d){_.nc(this,a,b,c,d)};_.h.removeEventListener=function(a,b,c,d){xc(this,a,b,c,d)}; _.h.dispatchEvent=function(a){var b,c=this.J;if(c)for(b=[];c;c=c.J)b.push(c);c=this.ea;var d=a.type||a;if(typeof a==="string")a=new _.Lb(a,c);else if(a instanceof _.Lb)a.target=a.target||c;else{var e=a;a=new _.Lb(d,c);_.ic(a,e)}e=!0;if(b)for(var f=b.length-1;f>=0;f--){var g=a.g=b[f];e=Cc(g,d,!0,a)&&e}g=a.g=c;e=Cc(g,d,!0,a)&&e;e=Cc(g,d,!1,a)&&e;if(b)for(f=0;f0){this.j--;var a=this.g;this.g=a.next;a.next=null}else a=this.l();return a};var Kc;var Oc={};Mc.prototype.toString=function(){return this.g+""};Qc.prototype.toString=function(){return this.g+""};"ARTICLE SECTION NAV ASIDE H1 H2 H3 H4 H5 H6 HEADER FOOTER ADDRESS P HR PRE BLOCKQUOTE OL UL LH LI DL DT DD FIGURE FIGCAPTION MAIN DIV EM STRONG SMALL S CITE Q DFN ABBR RUBY RB RT RTC RP DATA TIME CODE VAR SAMP KBD SUB SUP I B U MARK BDI BDO SPAN BR WBR NOBR INS DEL PICTURE PARAM TRACK MAP TABLE CAPTION COLGROUP COL TBODY THEAD TFOOT TR TD TH SELECT DATALIST OPTGROUP OPTION OUTPUT PROGRESS METER FIELDSET LEGEND DETAILS SUMMARY MENU DIALOG SLOT CANVAS FONT CENTER ACRONYM BASEFONT BIG DIR HGROUP STRIKE TT".split(" ").concat(["BUTTON", "INPUT"]);var Xc=String.prototype.repeat?function(a,b){return a.repeat(b)}:function(a,b){return Array(b+1).join(a)};var ld;bd.prototype.add=function(a,b){var c=md.get();c.set(a,b);this.j?this.j.next=c:this.g=c;this.j=c};bd.prototype.remove=function(){var a=null;this.g&&(a=this.g,this.g=this.g.next,this.g||(this.j=null),a.next=null);return a};var md=new Gc(function(){return new cd},function(a){return a.reset()});cd.prototype.set=function(a,b){this.j=a;this.g=b;this.next=null};cd.prototype.reset=function(){this.next=this.g=this.j=null};var dd,hd=!1,id=new bd;pd.prototype.reset=function(){this.context=this.j=this.o=this.g=null;this.l=!1};var qd=new Gc(function(){return new pd},function(a){a.reset()});od.prototype.then=function(a,b,c){return Gd(this,typeof a==="function"?a:null,typeof b==="function"?b:null,c)};od.prototype.$goog_Thenable=!0;_.h=od.prototype;_.h.eb=function(a,b){return Gd(this,null,a,b)};_.h.catch=od.prototype.eb;_.h.cancel=function(a){if(this.g==0){var b=new Fd(a);jd(function(){Bd(this,b)},this)}}; _.h.Os=function(a){this.g=0;nd(this,2,a)};_.h.Ps=function(a){this.g=0;nd(this,3,a)};_.h.lp=function(){for(var a;a=Cd(this);)Dd(this,a,this.g,this.C);this.D=!1};var Kd=_.ad;_.Va(Fd,Xa);Fd.prototype.name="cancel";_.Va(_.Od,_.Bc);_.h=_.Od.prototype;_.h.enabled=!1;_.h.tb=null;_.h.ys=function(){if(this.enabled){var a=Date.now()-this.B;a>0&&a=wb.value)return"error";if(f.value>=xb.value)return"warn";if(f.value>=pb.value)return"log"}return"debug"}if(!this.o[a.j]){var c=hf(this.g,a),d=fs;if(d){var e=b(a.o);kf(d,e,c,a.g)}}};var lf=null,fs=_.u.console;_.r(_.ue,_.E);_.h=_.ue.prototype; _.h.start=function(a){if(a){if(!a)throw Error("Cannot validate undefined config.");if(a.maxInactivity!=void 0&&a.maxInactivity<5)throw Error("config.maxInactivity must be greater than or equal to 5 seconds.");Object.assign(this.j,a||{})}this.j.versionCode&&this.j.versionCode>=0&&(Number.isInteger(this.j.versionCode)?(D(cast.receiver.F.H.yo,this.j.versionCode),_.B(tf,"App Version "+this.j.versionCode)):_.z(tf,"Receiver versionCode needs to be an integer"));xe.K();this.ka||Zf(this,!1);this.fa=!0;this.R.open(); Le.K().create()};_.h.stop=function(){this.dispose();window.close()};_.h.isRemoteControl=function(){return!!Fc("is-remote-control-mode-enabled")};_.h.wc=function(){return this.C=="ready"};_.h.getSenders=function(){return Object.keys(this.B)};_.h.Ce=function(a){return this.B[a]?_.fc(this.B[a]):null};_.h.ug=function(){return this.J==null?this.G?"notvisible":"unknown":this.J?"visible":"notvisible"};_.h.sg=function(){return this.G==null?this.J?"notstandby":"unknown":this.G?"standby":"notstandby"}; _.h.De=function(){this.C=="notstarted"&&(this.C=/[&?]google_cast_bg=true(&|$)/.test(window.location.search)?"startinginbackground":"starting");return this.C};_.h.Pc=function(){return this.T};_.h.ud=function(){return this.o};_.h.Id=function(a){this.wc()?rf(this,a):this.j.statusText!=a&&(this.j.statusText=a,this.W=!0)};_.h.rh=function(a){if(a<0||a>1)throw Error("Invalid level value");this.l.send(cast.receiver.ua.Ra,{type:"setvolume",level:a})}; _.h.sh=function(a){this.l.send(cast.receiver.ua.Ra,{type:"setvolume",muted:a})};_.h.Rc=function(){return this.pa};_.h.og=function(){return this.la};_.h.sf=function(a){this.l.send(cast.receiver.ua.Ra,{type:"startheartbeat",maxInactivity:a})};_.h.xf=function(){this.l.send(cast.receiver.ua.Ra,{type:"showremotecontroloverlay"})};_.h.uh=function(){this.l.send(cast.receiver.ua.Ra,{type:"showsleeptimeroverlay"})}; _.h.oh=function(a){this.l.send(cast.receiver.ua.Ra,{type:"cast2smartdisplaymessage",message:a,requestId:Math.random()})};_.h.Hd=function(a){this.l.send(cast.receiver.ua.Ra,{type:"sendfeedbackmessage",message:a})}; _.h.nr=function(a){var b=a.data;switch(b.type){case "opened":_.B(tf,"Underlying message bus is open");sf(this);break;case "closed":this.Vg();break;case "error":vf(this,new ag("error",null));break;case "ready":_.B(tf,function(){return"System ready event: "+JSON.stringify(b)});wf(this,b);break;case "senderconnected":zf(this,{id:b.senderId,userAgent:b.userAgent});break;case "senderdisconnected":Bf(this,b.senderId,b.reason);break;case "volumechanged":Df(this,{level:b.level,muted:b.muted});break;case "visibilitychanged":a= b.visible;Ff(this,a!==void 0?a:null);break;case "standbychanged":a=b.standby;Hf(this,a!==void 0?a:null);break;case "maxvideoresolutionchanged":Sf(this,b.height);break;case "showmediacontrols":Qf(this,b.controls);break;case "playbackdevicestatus":_.B(tf,"Dispatching playbackdevicestatus "+b.playbackType);this.L=new Xd;this.L.playbackType=b.playbackType;this.L.deviceName=b.deviceName;vf(this,new cg(this.L));break;case "hdroutputtypechanged":this.Z&&this.Z(b.hdrType);break;case "screenresolutionchanged":break; case "feedbackstarted":Uf(this);break;case "groupcapabilities":Wf(this,b);break;case "allowgroupchange":Yf(this,b);break;default:_.z(tf,"Unexpected system message type: "+b.type)}}; _.h.canDisplayType=function(a,b,c,d,e){if(!Dc())return!0;if(!Ob(a,"video/")&&!Ob(a,"audio/"))return!1;b&&(a+="; codecs="+b,fe("Cast.Receiver.QueriedCodec",b));c&&d&&(a+="; width="+c+"; height="+d);e&&(a+="; framerate="+e);if(c=b)a:for(c=!1,b=b.split(","),d=0;d0&&this.o.length>0){var f=this.l[0],g=this.o[0];a>f&&d>g&&(e=(d-g)/(a-f))}this.l.push(a);this.o.push(d);this.l.length>=5&&this.o.length>=5&&(this.l.splice(0,this.l.length-5),this.o.splice(0,this.o.length-5));d=e}b=b+"x"+c+"("+(d>0?Math.round(d).toString(): "?")+")";_.Ab(Ag,"video is "+b);this.B.textContent=b}else if(_.Ab(Ag,"video is no longer active, restarting search procedure"),this.g||this.j)yg(this),xg(this)};wg.prototype.G=function(){_.B(Ag,"onSeeking");this.l=[this.g.currentTime];this.o=[this.g.webkitDecodedFrameCount]}; wg.prototype.J=function(){function a(c){for(var d=_.q(c.document.getElementsByTagName("video")),e=d.next();!e.done;e=d.next())if(e=e.value,zg(e))return e;for(d=0;d0&&d>0?f="Queue operations only support expanding the front or back.":g<0&&(f="Reference item id is not in current queue."):f="Fetch items is only supported with an external queue.";if(f)return _.A(bh,f),Promise.reject(f);c>0?(f=this.g.length-1,c-=f-g,b=this.g[f].itemId):d>0&&(d-=g,b=this.g[0].itemId);var k=new me;k.requestId=a;return c<=0&&d<=0?(k.changeType="NO_CHANGE",k.sequenceNumber=dh(this,!1),Promise.resolve(k)):Promise.resolve(this.j.fetchItems(b, c,d)).then(function(l){if(l&&l.length!==0){var m=c>0?void 0:b;gh(e,l,m);k.changeType="INSERT";k.itemIds=l.map(function(n){return n.itemId});k.insertBefore=m;k.sequenceNumber=dh(e,!0)}else k.changeType="NO_CHANGE",k.sequenceNumber=dh(e,!1);return k})};_.h.clear=function(){this.g=void 0;this.B="REPEAT_OFF";this.o=void 0;this.C=this.l=0}; _.h.sc=function(a,b){a=a===void 0?!0:a;b=b===void 0?!1:b;var c=[],d=this.g&&this.g.length||0;d=b&&this.l0?this.l-1:0;b<=d;b++){var e=c,f=e.push;if(a)var g=this.g[b];else{g=this.g[b];var k=a,l=new Sg(g.itemId);l.autoplay=g.autoplay;l.startTime=g.startTime;l.playbackDuration=g.playbackDuration;l.preloadTime=g.preloadTime;l.activeTrackIds=g.activeTrackIds;l.customData=g.customData;if(k===void 0||k)l.media=g.media;g=l}f.call(e,g)}return c}; _.h.vb=function(){return!this.g||this.l<0?null:this.g[this.l]};_.h.td=function(){return this.l};_.h.zh=function(a){for(var b=0;bd&&this.l--;break}this.l>=this.g.length&&(this.l=mh(this)?0:-1,Wg(this)&&this.l==0&&rh(this));if(this.j&&this.j.onItemsRemoved)this.j.onItemsRemoved(a);return b};_.h.shuffle=function(){var a=this;if(this.j&&this.j.shuffle)return Promise.resolve(this.j.shuffle()).then(function(b){b?(Vg(a,!0),a.g=b):rh(a)});rh(this);return Promise.resolve()}; _.h.Pd=function(){var a=this;if(this.j&&this.j.Pd)return Promise.resolve(this.j.Pd()).then(function(b){b?(Vg(a,!1),a.g=b):th(a)});th(this);return Promise.resolve()};var bh=_.y("cast.receiver.MediaQueue");cast.receiver.Oa={}; var ls={},ms=(ls.LOAD=cast.receiver.F.H.Fl,ls.GET_STATUS=cast.receiver.F.H.Dl,ls.PAUSE=cast.receiver.F.H.Il,ls.STOP=cast.receiver.F.H.lm,ls.SKIP_AD=cast.receiver.F.H.km,ls.PLAY=cast.receiver.F.H.Jl,ls.PLAY_AGAIN=cast.receiver.F.H.Kl,ls.SEEK=cast.receiver.F.H.em,ls.SET_PLAYBACK_RATE=cast.receiver.F.H.hm,ls.SET_VOLUME=cast.receiver.F.H.im,ls.EDIT_TRACKS_INFO=cast.receiver.F.H.Al,ls.EDIT_AUDIO_TRACKS=cast.receiver.F.H.zl,ls.PRELOAD=cast.receiver.F.H.Nl,ls.CANCEL_PRELOAD=cast.receiver.F.H.wl,ls.PRECACHE= cast.receiver.F.H.Ml,ls.QUEUE_LOAD=cast.receiver.F.H.Sl,ls.QUEUE_INSERT=cast.receiver.F.H.Rl,ls.QUEUE_UPDATE=cast.receiver.F.H.Yl,ls.QUEUE_REMOVE=cast.receiver.F.H.Vl,ls.QUEUE_REORDER=cast.receiver.F.H.Wl,ls.QUEUE_NEXT=cast.receiver.F.H.Tl,ls.QUEUE_PREV=cast.receiver.F.H.Ul,ls.QUEUE_GET_ITEM_RANGE=cast.receiver.F.H.Ql,ls.QUEUE_GET_ITEMS=cast.receiver.F.H.Ol,ls.QUEUE_GET_ITEM_IDS=cast.receiver.F.H.Pl,ls.QUEUE_SHUFFLE=cast.receiver.F.H.Xl,ls.USER_ACTION=cast.receiver.F.H.Hl,ls.SHUTDOWN=cast.receiver.F.H.jm, ls.STORE_SESSION=cast.receiver.F.H.mm,ls.RESUME_SESSION=cast.receiver.F.H.cm,ls),ns={},os=(ns.SET_CREDENTIALS=cast.receiver.F.H.gm,ns.LOAD_BY_ENTITY=cast.receiver.F.H.Gl,ns.USER_ACTION=cast.receiver.F.H.om,ns.PLAY_STRING=cast.receiver.F.H.Ll,ns.EXECUTE_ACTION_SCRIPT=cast.receiver.F.H.Bl,ns.FOCUS_STATE=cast.receiver.F.H.Cl,ns.REFRESH_CREDENTIALS=cast.receiver.F.H.Zl,ns.SET_APPLICATION_CONTEXT=cast.receiver.F.H.fm,ns.SCREEN_NAVIGATION=cast.receiver.F.H.dm,ns.DISPLAY_STATUS=cast.receiver.F.H.yl,ns.CUSTOM_COMMAND= cast.receiver.F.H.xl,ns),ps=cast.receiver.F.H.nm,qs={},rs=(qs.UNKNOWN=1,qs.SUCCESS=2,qs.INJECT_ERROR=3,qs.INVALID_COMMAND=3,qs.INVALID_PARAMS=4,qs.INVALID_MEDIA_SESSION_ID=5,qs.SKIP_LIMIT_REACHED=6,qs.NOT_SUPPORTED=7,qs.LANGUAGE_NOT_SUPPORTED=8,qs.END_OF_QUEUE=9,qs.DUPLICATE_REQUEST_ID=10,qs.APP_ERROR=11,qs.AUTHENTICATION_EXPIRED=12,qs.PREMIUM_ACCOUNT_REQUIRED=13,qs.CONCURRENT_STREAM_LIMIT=14,qs.PARENTAL_CONTROL_RESTRICTED=15,qs.NOT_AVAILABLE_IN_REGION=16,qs.CONTENT_ALREADY_PLAYING=17,qs.INVALID_REQUEST= 18,qs.GENERIC_LOAD_ERROR=19,qs.VIDEO_DEVICE_REQUIRED=20,qs.CONTENT_FILTERED=21,qs),ss={},ts=(ss.MEDIA_STATUS=cast.receiver.F.H.Im,ss.CLOUD_STATUS=cast.receiver.F.H.Cm,ss.QUEUE_CHANGE=cast.receiver.F.H.Jm,ss.QUEUE_ITEMS=cast.receiver.F.H.Km,ss.QUEUE_ITEM_IDS=cast.receiver.F.H.Lm,ss.SESSION_STATE=cast.receiver.F.H.Mm,ss.INVALID_PLAYER_STATE=cast.receiver.F.H.Em,ss.LOAD_FAILED=cast.receiver.F.H.Hm,ss.LOAD_CANCELLED=cast.receiver.F.H.Gm,ss.INVALID_REQUEST=cast.receiver.F.H.Fm,ss.ERROR=cast.receiver.F.H.Dm, ss),us=cast.receiver.F.H.Nm,vh="local";cast.receiver.Oa.Zr=function(a){vh=a};cast.receiver.Oa.Vi=function(a,b){D(ms[a]||ps,wh(b))};cast.receiver.Oa.Eq=function(a,b){D(os[a]||ps,wh(b))}; cast.receiver.Oa.Ls=function(){var a=_.ue.K(),b=a.g[cast.receiver.media.If]||null;b&&(b.addEventListener("message",function(c){c.data&&c.data.type&&cast.receiver.Oa.Vi(c.data.type,c.senderId)}),b.addEventListener("send",function(c){c.data&&c.data.type&&D(ts[c.data.type]||us,wh(c.senderId))}));(a=a.g["urn:x-cast:com.google.cast.cac"]||null)&&a.addEventListener("message",function(c){c.data&&c.data.type&&cast.receiver.Oa.Eq(c.data.type,c.senderId)})}; cast.receiver.Oa.Kg=function(a){D(cast.receiver.F.H.fk,rs[a]||1)};_.ue.K().addEventListener("ready",cast.receiver.Oa.Ls);cast.receiver.Gb={};cast.receiver.Gb.zd=function(a){return!!a&&a.currentBreakClipTime!==void 0&&a.breakClipId!==void 0};cast.receiver.Gb.getMediaCategory=function(a){if(!a)return null;if(a.metadata)switch(a.metadata.metadataType){case 1:return"VIDEO";case 2:return"VIDEO";case 3:return"AUDIO";case 5:return"AUDIO";case 4:return"IMAGE"}a=(a.contentType||"").toUpperCase().split("/")[0];return es[a]?es[a]:null};cast.receiver.Bo=function(a){var b=this;this.l=a;this.g=null;this.j="sdr";this.o=function(){b.l()}};_.y("cast.receiver.MediaManager");xh.prototype.g=null;var vs;_.Va(Jh,xh);vs=new Jh;_.Sh=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");_.Va(_.Kh,_.Bc);_.Kh.prototype.Y=_.y("goog.net.XhrIo");var Th=/^https?$/i,ws=["POST","PUT"];_.h=_.Kh.prototype; _.h.send=function(a,b,c,d){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.O+"; newUri="+a);b=b?b.toUpperCase():"GET";this.O=a;this.C="";this.B=0;this.Z=b;this.T=!1;this.l=!0;this.g=new XMLHttpRequest;this.R=this.da?yh(this.da):yh(vs);this.g.onreadystatechange=(0,_.Ta)(this.dj,this);try{_.Ab(this.Y,Rh(this,"Opening Xhr")),this.V=!0,this.g.open(b,String(a),!0),this.V=!1}catch(g){_.Ab(this.Y,Rh(this,"Error opening Xhr: "+g.message));Nh(this,g);return}a=c||"";c=new Map(this.headers); if(d)if(Object.getPrototypeOf(d)===Object.prototype)for(var e in d)c.set(e,d[e]);else if(typeof d.keys==="function"&&typeof d.get==="function"){e=_.q(d.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,c.set(f,d.get(f))}else throw Error("Unknown input type for opt_headers: "+String(d));d=Array.from(c.keys()).find(function(g){return"content-type"==g.toLowerCase()});e=_.u.FormData&&a instanceof _.u.FormData;!_.$a(ws,b)||d||e||c.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"); b=_.q(c);for(d=b.next();!d.done;d=b.next())c=_.q(d.value),d=c.next().value,c=c.next().value,this.g.setRequestHeader(d,c);this.ca&&(this.g.responseType=this.ca);"withCredentials"in this.g&&this.g.withCredentials!==this.W&&(this.g.withCredentials=this.W);try{Vh(this),this.G>0&&(_.Ab(this.Y,Rh(this,"Will abort after "+this.G+"ms if incomplete")),this.L=Pd(this.Sk,this.G,this)),_.Ab(this.Y,Rh(this,"Sending request")),this.M=!0,this.g.send(a),this.M=!1}catch(g){_.Ab(this.Y,Rh(this,"Send error: "+g.message)), Nh(this,g)}};_.h.Sk=function(){typeof Oh!="undefined"&&this.g&&(this.C="Timed out after "+this.G+"ms, aborting",this.B=8,_.Ab(this.Y,Rh(this,this.C)),this.dispatchEvent("timeout"),this.abort(8))};_.h.abort=function(a){this.g&&this.l&&(_.Ab(this.Y,Rh(this,"Aborting")),this.l=!1,this.o=!0,this.g.abort(),this.o=!1,this.B=a||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Mh(this))};_.h.ha=function(){this.g&&(this.l&&(this.l=!1,this.o=!0,this.g.abort(),this.o=!1),Mh(this,!0));_.Kh.ec.ha.call(this)}; _.h.dj=function(){this.Ia()||(this.V||this.M||this.o?Uh(this):this.ir())};_.h.ir=function(){Uh(this)};_.h.isActive=function(){return!!this.g};_.Wh.prototype=HTMLElement.prototype;_.Wh.prototype.constructor=_.Wh;Object.setPrototypeOf(_.Wh,HTMLElement);var Xh=new Map;var $h=_.y("castx.common.scriptLoader");cast.A={}; cast.A.qk=function(a){var b=_.ci("
");_.Vc(a, b)};cast.A.mn=function(a){var b=_.ci("");_.Vc(a,b)};cast.A.ya={}; _.w("cast.framework.events.DetailedErrorCode",{MEDIA_UNKNOWN:100,MEDIA_ABORTED:101,MEDIA_DECODE:102,MEDIA_NETWORK:103,MEDIA_SRC_NOT_SUPPORTED:104,SOURCE_BUFFER_FAILURE:110,MEDIAKEYS_UNKNOWN:200,MEDIAKEYS_NETWORK:201,MEDIAKEYS_UNSUPPORTED:202,MEDIAKEYS_WEBCRYPTO:203,NETWORK_UNKNOWN:300,SEGMENT_NETWORK:301,HLS_NETWORK_MASTER_PLAYLIST:311,HLS_NETWORK_PLAYLIST:312,HLS_NETWORK_NO_KEY_RESPONSE:313,HLS_NETWORK_KEY_LOAD:314,HLS_NETWORK_INVALID_SEGMENT:315,HLS_SEGMENT_PARSING:316,DASH_NETWORK:321,DASH_NO_INIT:322, SMOOTH_NETWORK:331,SMOOTH_NO_MEDIA_DATA:332,MANIFEST_UNKNOWN:400,HLS_MANIFEST_MASTER:411,HLS_MANIFEST_PLAYLIST:412,DASH_MANIFEST_UNKNOWN:420,DASH_MANIFEST_NO_PERIODS:421,DASH_MANIFEST_NO_MIMETYPE:422,DASH_INVALID_SEGMENT_INFO:423,SMOOTH_MANIFEST:431,SEGMENT_UNKNOWN:500,TEXT_UNKNOWN:600,APP:900,BREAK_CLIP_LOADING_ERROR:901,BREAK_SEEK_INTERCEPTOR_ERROR:902,IMAGE_ERROR:903,LOAD_INTERRUPTED:904,LOAD_FAILED:905,MEDIA_ERROR_MESSAGE:906,GENERIC:999});cast.A.ua={};_.w("cast.framework.system.Event",gi);_.w("cast.framework.system.Message",hi);_.w("cast.framework.system.MessageType",{STRING:"STRING",JSON:"JSON"});_.w("cast.framework.system.LaunchedFrom",{UNKNOWN:"UNKNOWN",DIAL:"DIAL",CAST:"CAST",CLOUD:"CLOUD"});_.w("cast.framework.system.ApplicationData",function(){this.iconUrl=this.name=this.id="";this.sessionId=0;this.namespaces=[];this.launchingSenderId="";this.launchedFrom="UNKNOWN"}); _.w("cast.framework.system.PlaybackType",{UNKNOWN:0,SINGLE_DEVICE:1,STATIC_GROUP:2,DYNAMIC_GROUP:3,REMOTE:4,BLUETOOTH:5});_.w("cast.framework.system.PlaybackDeviceStatus",function(){this.playbackType=0;this.deviceName=""});_.w("cast.framework.system.SystemVolumeData",ii);_.w("cast.framework.system.Sender",function(){this.userAgent=this.id="";this.largeMessageSupported=void 0});_.w("cast.framework.system.VisibilityState",{VISIBLE:"visible",NOT_VISIBLE:"notvisible",UNKNOWN:"unknown"}); _.w("cast.framework.system.StandbyState",{STANDBY:"standby",NOT_STANDBY:"notstandby",UNKNOWN:"unknown"});_.w("cast.framework.system.MediaControlsState",{HIDE:0,SHOW:1});_.w("cast.framework.system.SystemState",{NOT_STARTED:"notstarted",STARTING_IN_BACKGROUND:"startinginbackground",STARTING:"starting",READY:"ready",STOPPING_IN_BACKGROUND:"stoppinginbackground",STOPPING:"stopping"}); _.w("cast.framework.system.DeviceCapabilities",{AUDIO_ASSISTANT:"audio_assistant",BLUETOOTH_SUPPORTED:"bluetooth_supported",DISPLAY_SUPPORTED:"display_supported",HI_RES_AUDIO_SUPPORTED:"hi_res_audio_supported",IS_DV_SUPPORTED:"is_dv_supported",IS_HDR_SUPPORTED:"is_hdr_supported",TOUCH_INPUT_SUPPORTED:"touch_input_supported",IS_GROUP:"is_group",REMOTE_CONTROL_OVERLAY_SUPPORTED:"remote_control_overlay_supported",SLEEP_TIMER_OVERLAY_SUPPORTED:"sleep_timer_overlay_supported",APP_FOREGROUND:"app_foreground", IS_DEVICE_REGISTERED:"is_device_registered",IS_CBCS_SUPPORTED:"is_cbcs_supported",IS_DOLBY_ATMOS_SUPPORTED:"is_dolby_atmos_supported"}); _.w("cast.framework.system.EventType",{READY:"ready",SHUTDOWN:"shutdown",SENDER_CONNECTED:"senderconnected",SENDER_DISCONNECTED:"senderdisconnected",ERROR:"error",SYSTEM_VOLUME_CHANGED:"systemvolumechanged",VISIBILITY_CHANGED:"visibilitychanged",STANDBY_CHANGED:"standbychanged",MAX_VIDEO_RESOLUTION_CHANGED:"maxvideoresolutionchanged",SHOW_MEDIA_CONTROLS:"showmediacontrols",FEEDBACK_STARTED:"feedbackstarted",GROUP_CAPABILITIES:"groupcapabilities",ALLOW_GROUP_CHANGE:"allowgroupchange",PLAYBACK_DEVICE_STATUS:"playbackdevicestatus"}); _.w("cast.framework.system.DisconnectReason",{REQUESTED_BY_SENDER:"requested_by_sender",ERROR:"error",UNKNOWN:"unknown"});_.r(ji,gi);_.w("cast.framework.system.SenderDisconnectedEvent",ji);_.r(ki,gi);_.w("cast.framework.system.SenderConnectedEvent",ki);_.r(li,gi);_.w("cast.framework.system.VisibilityChangedEvent",li);_.r(mi,gi);_.w("cast.framework.system.StandbyChangedEvent",mi);_.r(ni,gi);_.w("cast.framework.system.SystemVolumeChangedEvent",ni);_.r(oi,gi);_.w("cast.framework.system.ReadyEvent",oi); _.r(pi,gi);_.w("cast.framework.system.ShutdownEvent",pi);_.r(qi,gi);_.w("cast.framework.system.FeedbackStartedEvent",qi);_.r(ri,gi);_.w("cast.framework.system.PlaybackDeviceStatusEvent",ri);_.r(si,gi);_.w("cast.framework.system.ShowMediaControlsEvent",si);_.r(ti,gi);_.w("cast.framework.system.MaxVideoResolutionChangedEvent",ti);_.r(ui,gi);_.w("cast.framework.system.GroupCapabilitiesChangeEvent",ui);_.r(vi,gi);_.w("cast.framework.system.AllowGroupChangeEvent",vi);cast.A.zu={}; var xs={MEDIA_STATUS:"MEDIA_STATUS",CUSTOM_STATE:"CUSTOM_STATE",CLOUD_STATUS:"CLOUD_STATUS",QUEUE_CHANGE:"QUEUE_CHANGE",QUEUE_ITEMS:"QUEUE_ITEMS",QUEUE_ITEM_IDS:"QUEUE_ITEM_IDS",GET_STATUS:"GET_STATUS",LOAD:"LOAD",PAUSE:"PAUSE",STOP:"STOP",SHUTDOWN:"SHUTDOWN",PLAY:"PLAY",SKIP_AD:"SKIP_AD",PLAY_AGAIN:"PLAY_AGAIN",SEEK:"SEEK",SET_PLAYBACK_RATE:"SET_PLAYBACK_RATE",SET_VOLUME:"SET_VOLUME",EDIT_TRACKS_INFO:"EDIT_TRACKS_INFO",EDIT_AUDIO_TRACKS:"EDIT_AUDIO_TRACKS",PRECACHE:"PRECACHE",PRELOAD:"PRELOAD",QUEUE_LOAD:"QUEUE_LOAD", QUEUE_INSERT:"QUEUE_INSERT",QUEUE_UPDATE:"QUEUE_UPDATE",QUEUE_REMOVE:"QUEUE_REMOVE",QUEUE_REORDER:"QUEUE_REORDER",QUEUE_NEXT:"QUEUE_NEXT",QUEUE_PREV:"QUEUE_PREV",QUEUE_GET_ITEM_RANGE:"QUEUE_GET_ITEM_RANGE",QUEUE_GET_ITEMS:"QUEUE_GET_ITEMS",QUEUE_GET_ITEM_IDS:"QUEUE_GET_ITEM_IDS",QUEUE_SHUFFLE:"QUEUE_SHUFFLE",SET_CREDENTIALS:"SET_CREDENTIALS",LOAD_BY_ENTITY:"LOAD_BY_ENTITY",USER_ACTION:"USER_ACTION",DISPLAY_STATUS:"DISPLAY_STATUS",FOCUS_STATE:"FOCUS_STATE",CUSTOM_COMMAND:"CUSTOM_COMMAND",STORE_SESSION:"STORE_SESSION", RESUME_SESSION:"RESUME_SESSION",SESSION_STATE:"SESSION_STATE",REFRESH_CREDENTIALS:"REFRESH_CREDENTIALS",PLAY_STRING:"PLAY_STRING",EXECUTE_ACTION_SCRIPT:"EXECUTE_ACTION_SCRIPT",APPLICATION_CHANGED:"APPLICATION_CHANGED",SCREEN_NAVIGATION:"SCREEN_NAVIGATION",au:"SET_APPLICATION_CONTEXT"};_.w("cast.framework.messages.MessageType",xs); var zp={INVALID_COMMAND:"INVALID_COMMAND",INVALID_PARAMS:"INVALID_PARAMS",INVALID_MEDIA_SESSION_ID:"INVALID_MEDIA_SESSION_ID",INVALID_REQUEST_ID:"INVALID_REQUEST_ID",SKIP_LIMIT_REACHED:"SKIP_LIMIT_REACHED",NOT_SUPPORTED:"NOT_SUPPORTED",LANGUAGE_NOT_SUPPORTED:"LANGUAGE_NOT_SUPPORTED",END_OF_QUEUE:"END_OF_QUEUE",DUPLICATE_REQUEST_ID:"DUPLICATE_REQUEST_ID",VIDEO_DEVICE_REQUIRED:"VIDEO_DEVICE_REQUIRED",PREMIUM_ACCOUNT_REQUIRED:"PREMIUM_ACCOUNT_REQUIRED",APP_ERROR:"APP_ERROR",AUTHENTICATION_EXPIRED:"AUTHENTICATION_EXPIRED", CONCURRENT_STREAM_LIMIT:"CONCURRENT_STREAM_LIMIT",PARENTAL_CONTROL_RESTRICTED:"PARENTAL_CONTROL_RESTRICTED",CONTENT_FILTERED:"CONTENT_FILTERED",NOT_AVAILABLE_IN_REGION:"NOT_AVAILABLE_IN_REGION",CONTENT_ALREADY_PLAYING:"CONTENT_ALREADY_PLAYING",INVALID_REQUEST:"INVALID_REQUEST",GENERIC_LOAD_ERROR:"GENERIC_LOAD_ERROR"};_.w("cast.framework.messages.ErrorReason",zp);_.w("cast.framework.messages.ErrorData",wi);_.w("cast.framework.messages.Range",xi);_.w("cast.framework.messages.CustomStateMessage",yi); _.w("cast.framework.messages.RequestData",I);_.r(Ai,I);_.w("cast.framework.messages.LoadRequestData",Ai);_.r(Bi,Ai);_.w("cast.framework.messages.PreloadRequestData",Bi);_.r(Ci,Ai);_.w("cast.framework.messages.PrecacheRequestData",Ci);_.r(Ei,I);_.w("cast.framework.messages.VolumeRequestData",Ei);_.r(Fi,I);_.w("cast.framework.messages.EditTracksInfoRequestData",Fi);_.r(Gi,I);_.w("cast.framework.messages.EditAudioTracksRequestData",Gi);_.r(Hi,I);_.w("cast.framework.messages.SeekRequestData",Hi); _.r(Ii,I);_.w("cast.framework.messages.SetPlaybackRateRequestData",Ii);_.r(Ji,I);_.w("cast.framework.messages.GetStatusRequestData",Ji);_.r(Ki,I);_.w("cast.framework.messages.QueueLoadRequestData",Ki);_.r(Li,I);_.w("cast.framework.messages.QueueInsertRequestData",Li);_.r(Mi,I);_.w("cast.framework.messages.QueueUpdateRequestData",Mi);_.r(Ni,I);_.w("cast.framework.messages.QueueRemoveRequestData",Ni);_.r(Oi,I);_.w("cast.framework.messages.QueueReorderRequestData",Oi);_.r(Pi,I); _.w("cast.framework.messages.FetchItemsRequestData",Pi);_.r(Qi,I);_.w("cast.framework.messages.GetItemsInfoRequestData",Qi);_.w("cast.framework.messages.SessionState",Ri);_.r(Si,I);_.w("cast.framework.messages.StoreSessionRequestData",Si);_.r(Ti,I);_.w("cast.framework.messages.ResumeSessionRequestData",Ti);_.r(Ui,I);_.w("cast.framework.messages.StoreSessionResponseData",Ui); _.w("cast.framework.messages.HlsSegmentFormat",{AAC:"aac",AC3:"ac3",MP3:"mp3",TS:"ts",TS_AAC:"ts_aac",TS_HE_AAC:"ts_he_aac",E_AC3:"e_ac3",FMP4:"fmp4"});_.w("cast.framework.messages.HlsVideoSegmentFormat",{MPEG2_TS:"mpeg2_ts",FMP4:"fmp4"});_.w("cast.framework.messages.StreamType",{BUFFERED:"BUFFERED",LIVE:"LIVE",NONE:"NONE"});_.w("cast.framework.messages.MediaCategory",{AUDIO:"AUDIO",VIDEO:"VIDEO",IMAGE:"IMAGE"});_.w("cast.framework.messages.HdrType",{SDR:"sdr",HDR:"hdr",DV:"dv"}); var yp={INVALID_PLAYER_STATE:"INVALID_PLAYER_STATE",LOAD_FAILED:"LOAD_FAILED",LOAD_CANCELLED:"LOAD_CANCELLED",INVALID_REQUEST:"INVALID_REQUEST",ERROR:"ERROR"};_.w("cast.framework.messages.ErrorType",yp);_.w("cast.framework.messages.IdleReason",{CANCELLED:"CANCELLED",INTERRUPTED:"INTERRUPTED",FINISHED:"FINISHED",ERROR:"ERROR"});_.w("cast.framework.messages.SeekResumeState",{PLAYBACK_START:"PLAYBACK_START",PLAYBACK_PAUSE:"PLAYBACK_PAUSE"}); _.w("cast.framework.messages.PlayerState",{IDLE:"IDLE",PLAYING:"PLAYING",PAUSED:"PAUSED",BUFFERING:"BUFFERING"});_.w("cast.framework.messages.ExtendedPlayerState",{LOADING:"LOADING"});_.w("cast.framework.messages.MediaInformation",zi);_.w("cast.framework.messages.SeekableRange",Vi);_.r(_.Wi,Vi);_.w("cast.framework.messages.LiveSeekableRange",_.Wi);_.w("cast.framework.messages.QueueData",Xi); _.w("cast.framework.messages.QueueType",{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"});_.w("cast.framework.messages.ContainerType",{GENERIC_CONTAINER:0,AUDIOBOOK_CONTAINER:1});_.w("cast.framework.messages.ContainerMetadata",Yi);_.w("cast.framework.messages.StreamingProtocolType",{UNKNOWN:0,MPEG_DASH:1,HLS:2,SMOOTH_STREAMING:3}); _.w("cast.framework.messages.MetadataType",{GENERIC:0,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5});_.w("cast.framework.messages.MediaMetadata",Zi);_.r($i,Zi);_.w("cast.framework.messages.GenericMediaMetadata",$i);_.r(aj,Zi);_.w("cast.framework.messages.MovieMediaMetadata",aj);_.r(bj,Zi);_.w("cast.framework.messages.TvShowMediaMetadata",bj);_.r(cj,Zi);_.w("cast.framework.messages.MusicTrackMediaMetadata",cj);_.r(dj,Zi);_.w("cast.framework.messages.PhotoMediaMetadata",dj);_.r(ej,Yi); _.w("cast.framework.messages.AudiobookContainerMetadata",ej);_.r(fj,Zi);_.w("cast.framework.messages.AudiobookChapterMediaMetadata",fj);_.w("cast.framework.messages.ContentRating",function(){this.ratingIcon=void 0});_.w("cast.framework.messages.Image",function(a){this.url=a;this.width=this.height=void 0});_.w("cast.framework.messages.Volume",Di);_.w("cast.framework.messages.VideoInformation",gj);_.w("cast.framework.messages.MediaStatus",hj);_.w("cast.framework.messages.MediaStatusMessage",ij); _.w("cast.framework.messages.ExtendedMediaStatus",jj);_.r(kj,hj);_.w("cast.framework.messages.CloudMediaStatus",kj);_.w("cast.framework.messages.Command",{PAUSE:1,SEEK:2,STREAM_VOLUME:4,STREAM_MUTE:8,ALL_BASIC_MEDIA:12303,QUEUE_NEXT:64,QUEUE_PREV:128,QUEUE_SHUFFLE:256,QUEUE_REPEAT_ALL:1024,QUEUE_REPEAT_ONE:2048,QUEUE_REPEAT:3072,SKIP_AD:512,EDIT_TRACKS:4096,PLAYBACK_RATE:8192,LIKE:16384,DISLIKE:32768,FOLLOW:65536,UNFOLLOW:131072,STREAM_TRANSFER:262144,LYRICS:524288}); _.w("cast.framework.messages.TrackType",{TEXT:"TEXT",AUDIO:"AUDIO",VIDEO:"VIDEO"});var ro={CEA608:"text/cea608",TTML:"application/ttml+xml",VTT:"text/vtt",TTML_MP4:"application/mp4"};_.w("cast.framework.messages.CaptionMimeType",ro);_.w("cast.framework.messages.TextTrackType",{SUBTITLES:"SUBTITLES",CAPTIONS:"CAPTIONS",DESCRIPTIONS:"DESCRIPTIONS",CHAPTERS:"CHAPTERS",METADATA:"METADATA"}); _.w("cast.framework.messages.TextTrackEdgeType",{NONE:"NONE",OUTLINE:"OUTLINE",DROP_SHADOW:"DROP_SHADOW",RAISED:"RAISED",DEPRESSED:"DEPRESSED"});_.w("cast.framework.messages.TextTrackWindowType",{NONE:"NONE",NORMAL:"NORMAL",ROUNDED_CORNERS:"ROUNDED_CORNERS"});_.w("cast.framework.messages.TextTrackFontGenericFamily",{SANS_SERIF:"SANS_SERIF",MONOSPACED_SANS_SERIF:"MONOSPACED_SANS_SERIF",SERIF:"SERIF",MONOSPACED_SERIF:"MONOSPACED_SERIF",CASUAL:"CASUAL",CURSIVE:"CURSIVE",SMALL_CAPITALS:"SMALL_CAPITALS"}); _.w("cast.framework.messages.TextTrackFontStyle",{NORMAL:"NORMAL",BOLD:"BOLD",BOLD_ITALIC:"BOLD_ITALIC",ITALIC:"ITALIC"});_.w("cast.framework.messages.Track",lj);_.w("cast.framework.messages.AudioTrackInfo",mj);_.w("cast.framework.messages.TextTrackStyle",function(){this.customData=this.fontStyle=this.fontGenericFamily=this.fontFamily=this.windowRoundedCornerRadius=this.windowColor=this.windowType=this.edgeColor=this.edgeType=this.backgroundColor=this.foregroundColor=this.fontScale=void 0}); _.w("cast.framework.messages.TracksInfo",nj);_.w("cast.framework.messages.RepeatMode",{REPEAT_OFF:"REPEAT_OFF",REPEAT_ALL:"REPEAT_ALL",REPEAT_SINGLE:"REPEAT_SINGLE",REPEAT_ALL_AND_SHUFFLE:"REPEAT_ALL_AND_SHUFFLE"});_.w("cast.framework.messages.QueueChangeType",{INSERT:"INSERT",REMOVE:"REMOVE",ITEMS_CHANGE:"ITEMS_CHANGE",UPDATE:"UPDATE",NO_CHANGE:"NO_CHANGE"});_.w("cast.framework.messages.QueueChange",oj); _.w("cast.framework.messages.ItemsInfo",function(){this.type="QUEUE_ITEMS";this.sequenceNumber=this.items=this.requestId=void 0});_.w("cast.framework.messages.QueueIds",function(){this.type="QUEUE_ITEM_IDS";this.sequenceNumber=this.itemIds=this.requestId=void 0});_.w("cast.framework.messages.GetStatusOptions",{NO_METADATA:1,NO_QUEUE_ITEMS:2});_.w("cast.framework.messages.Break",_.pj);_.w("cast.framework.messages.BreakClip",_.qj);_.w("cast.framework.messages.VastAdsRequest",_.rj); _.w("cast.framework.messages.BreakStatus",sj);_.w("cast.framework.messages.UserActionState",function(a){this.userAction=a;this.customData=void 0});_.w("cast.framework.messages.ContentFilteringMode",{FILTER_EXPLICIT:"FILTER_EXPLICIT"});_.w("cast.framework.messages.LoadOptions",function(){this.contentFilteringMode=void 0}); _.w("cast.framework.messages.PlayStringId",{FREE_TRIAL_ABOUT_TO_EXPIRE:"FREE_TRIAL_ABOUT_TO_EXPIRE",SUBSCRIPTION_ABOUT_TO_EXPIRE:"SUBSCRIPTION_ABOUT_TO_EXPIRE",STREAM_HIJACKED:"STREAM_HIJACKED",PLAYING_ALTERNATE_MIX:"PLAYING_ALTERNATE_MIX"});_.r(tj,I);_.w("cast.framework.messages.SetCredentialsRequestData",tj);_.r(uj,I);_.w("cast.framework.messages.LoadByEntityRequestData",uj);_.r(vj,I);_.w("cast.framework.messages.CustomCommandRequestData",vj);_.r(wj,I); _.w("cast.framework.messages.RefreshCredentialsRequestData",wj);_.r(xj,I);_.w("cast.framework.messages.PlayStringRequestData",xj);_.r(yj,I);_.w("cast.framework.messages.ExecuteActionScriptRequestData",yj);_.w("cast.framework.messages.DisplayItem",function(a,b){this.title=a;this.entity=b});_.w("cast.framework.messages.DisplayItemList",function(a,b){this.listTitle=a||"";this.displayItems=b});_.w("cast.framework.messages.DisplayContext",function(a){this.displayItemLists=a}); _.w("cast.framework.messages.Context",function(a){this.opaqueContext="";this.displayContext=a});_.r(zj,I);_.w("cast.framework.messages.DisplayContextRequestData",zj);_.r(Aj,I);_.w("cast.framework.messages.ScreenNavigationRequestData",Aj);_.w("cast.framework.messages.ScriptAction",function(a,b){this.app_id=a;this.action=b;this.custom_data=void 0});_.w("cast.framework.messages.UserAction",{LIKE:"LIKE",DISLIKE:"DISLIKE",FOLLOW:"FOLLOW",UNFOLLOW:"UNFOLLOW",FLAG:"FLAG",SKIP_AD:"SKIP_AD",LYRICS:"LYRICS"}); _.w("cast.framework.messages.UserActionContext",{UNKNOWN_CONTEXT:"UNKNOWN_CONTEXT",TRACK:"TRACK",ALBUM:"ALBUM",ARTIST:"ARTIST",PLAYLIST:"PLAYLIST",EPISODE:"EPISODE",SERIES:"SERIES",MOVIE:"MOVIE",CHANNEL:"CHANNEL",TEAM:"TEAM",PLAYER:"PLAYER",COACH:"COACH"});_.w("cast.framework.messages.NavigationType",{SCROLL_LEFT:"SCROLL_LEFT",SCROLL_RIGHT:"SCROLL_RIGHT"});_.r(Bj,I);_.w("cast.framework.messages.UserActionRequestData",Bj);_.r(Cj,I);_.w("cast.framework.messages.DisplayStatusRequestData",Cj); _.r(Dj,I);_.w("cast.framework.messages.FocusStateRequestData",Dj);_.w("cast.framework.messages.FocusState",{IN_FOCUS:"IN_FOCUS",NOT_IN_FOCUS:"NOT_IN_FOCUS"});_.w("cast.framework.messages.QueueItem",Ej);cast.Fh=1706828312;cast.A.VERSION="3.0.0137";_.w("cast.framework.VERSION",cast.A.VERSION);console.log("CAST SDK CAF Version: "+cast.A.VERSION);_.jn={HLS:"application/x-mpegurl",Dt:"application/vnd.apple.mpegurl",Et:"audio/mpegurl",Ft:"audio/x-mpegurl",DASH:"application/dash+xml",SMOOTH:"application/vnd.ms-sstr+xml"};cast.A.media={};cast.A.media.Na={};cast.A.media.Na.Ji=Fj;cast.A.media.Na.getTrackById=function(a,b){return b.find(function(c){return c.trackId==a})||null};cast.A.media.Na.Qi=function(a,b){return Fj(a,b).length!==0};cast.A.media.Na.Hj=function(a,b){if(b.filter(function(c){return a.includes(c.trackId)}).length!==a.length)throw Error("Invalid id.");};cast.A.media.Na.Vs=function(a){if(a.find(function(b){return b.type!="TEXT"}))throw Error("Type is not matching.");};_.h=Ij.prototype;_.h.reset=function(){this.g=null};_.h.getTracks=function(){Jj(this);return this.g.oa().getTracks("AUDIO")};_.h.getTrackById=function(a){Jj(this);if(a<0)throw Error("Invalid track id.");return cast.A.media.Na.getTrackById(a,this.getTracks())};_.h.Ee=function(a){if(!a)throw Error("Need language as input.");return cast.A.media.Na.Ji(a,this.getTracks())};_.h.Cp=function(){Jj(this);var a=this.g.oa().l;return a===null?null:this.getTrackById(a)};_.h.Ap=function(){Jj(this);return this.g.oa().l}; _.h.Qr=function(a){Jj(this);if(a===null)_.A(Hj,"No valid id, persist the current behavior.");else{cast.A.media.Na.Hj([a],this.getTracks());var b=this.g.oa().o.sort();b=b.concat(a);Wk(this.g.oa(),b);this.j&&Am(this.j,this.g.oa().getTracksInfo(),!1)}};_.h.rf=function(a){Jj(this);if(!cast.A.media.Na.Qi(a,this.getTracks()))throw Error("No matching track.");Zk(this.g.oa(),a);this.j&&Am(this.j,this.g.oa().getTracksInfo(),!1)};_.h.getTracksInfo=function(){Jj(this);return this.g.oa().getTracksInfo()}; _.w("cast.framework.AudioTracksManager",Ij);Ij.prototype.setActiveByLanguage=Ij.prototype.rf;Ij.prototype.setActiveById=Ij.prototype.Qr;Ij.prototype.getActiveId=Ij.prototype.Ap;Ij.prototype.getActiveTrack=Ij.prototype.Cp;Ij.prototype.getTracksByLanguage=Ij.prototype.Ee;Ij.prototype.getTrackById=Ij.prototype.getTrackById;Ij.prototype.getTracks=Ij.prototype.getTracks;var Hj=_.y("cast.framework.AudioTracksManager");_.w("cast.framework.NetworkRequestInfo",function(){this.headers=this.url=null;this.withCredentials=!1;this.timeoutInterval=this.content=null});_.w("cast.framework.NetworkResponseInfo",Kj);_.w("cast.framework.TimedMetadata",function(){});_.w("cast.framework.HlsTimedMetadata",function(){});_.w("cast.framework.DashTimedMetadata",function(){});_.w("cast.framework.ShakaVariant",{STANDARD:"STANDARD",DEBUG:"DEBUG"});cast.A.U={};_.w("cast.framework.ui.UiConfig",function(){});_.w("cast.framework.CastReceiverOptions",Lj);var ys=null;cast.A.Cf={set:function(a){ys=a},get:function(){return ys}};cast.A.P={};cast.A.P.Bi=function(a){return a};cast.A.P.rp=function(a){return a};cast.A.P.mp=function(a){return a};cast.A.P.np=function(a){return a};cast.A.P.op=function(a){return a};cast.A.P.pp=function(a){return a};cast.A.P.qp=function(a){return a};cast.A.P.Ci=function(a){return a};cast.A.P.qd=function(a){return a};cast.A.P.ig=function(a){return a};cast.A.P.sp=function(a){return a};cast.A.P.Di=function(a){return a};cast.A.P.tp=function(a){return a};cast.A.P.up=function(a){return a};cast.A.P.vp=function(a){return a}; cast.A.P.wp=function(a){return a};cast.A.P.Ei=function(a){return a};cast.A.P.xp=function(a){return a};cast.A.P.As=function(a){return a};cast.A.P.Bs=function(a){return a};cast.A.P.Cs=function(a){return a};cast.A.P.Ds=function(a){return a};cast.A.P.yj=function(a){return a};cast.A.P.Es=function(a){return a};cast.A.P.xh=function(a){return a};cast.A.P.Fs=function(a){return a};cast.A.P.zj=function(a){return a};cast.A.P.Aj=function(a){return a};cast.A.P.Bj=function(a){return a};cast.A.P.Gs=function(a){return a};var Wn={NONE:"none",CLEARKEY:"clearkey",PLAYREADY:"playready",WIDEVINE:"widevine",AES_128:"aes_128",AES_128_CKP:"aes_128_ckp"};_.w("cast.framework.ContentProtection",Wn);_.w("cast.framework.PlaybackConfig",Mj);_.w("cast.framework.events.EndedReason",{END_OF_STREAM:"END_OF_STREAM",ERROR:"ERROR",STOPPED:"STOPPED",INTERRUPTED:"INTERRUPTED",SKIPPED:"SKIPPED",BREAK_SWITCH:"BREAK_SWITCH"});var tp={ALL:"*",ABORT:"ABORT",CAN_PLAY:"CAN_PLAY",CAN_PLAY_THROUGH:"CAN_PLAY_THROUGH",DURATION_CHANGE:"DURATION_CHANGE",EMPTIED:"EMPTIED",ENDED:"ENDED",LOADED_DATA:"LOADED_DATA",LOADED_METADATA:"LOADED_METADATA",LOAD_START:"LOAD_START",PAUSE:"PAUSE",PLAY:"PLAY",PLAYING:"PLAYING",PROGRESS:"PROGRESS",RATE_CHANGE:"RATE_CHANGE",SEEKED:"SEEKED",SEEKING:"SEEKING",STALLED:"STALLED",TIME_UPDATE:"TIME_UPDATE",SUSPEND:"SUSPEND",WAITING:"WAITING",BITRATE_CHANGED:"BITRATE_CHANGED",BREAK_STARTED:"BREAK_STARTED", BREAK_ENDED:"BREAK_ENDED",BREAK_CLIP_LOADING:"BREAK_CLIP_LOADING",BREAK_CLIP_STARTED:"BREAK_CLIP_STARTED",BREAK_CLIP_ENDED:"BREAK_CLIP_ENDED",BUFFERING:"BUFFERING",TIME_DRIFTED:"TIME_DRIFTED",CACHE_LOADED:"CACHE_LOADED",CACHE_HIT:"CACHE_HIT",CACHE_INSERTED:"CACHE_INSERTED",CLIP_STARTED:"CLIP_STARTED",CLIP_ENDED:"CLIP_ENDED",EMSG:"EMSG",ERROR:"ERROR",ID3:"ID3",MEDIA_STATUS:"MEDIA_STATUS",CUSTOM_STATE:"CUSTOM_STATE",MEDIA_INFORMATION_CHANGED:"MEDIA_INFORMATION_CHANGED",MEDIA_FINISHED:"MEDIA_FINISHED", PLAYER_PRELOADING:"PLAYER_PRELOADING",PLAYER_PRELOADING_CANCELLED:"PLAYER_PRELOADING_CANCELLED",PLAYER_LOAD_COMPLETE:"PLAYER_LOAD_COMPLETE",PLAYER_LOADING:"PLAYER_LOADING",SEGMENT_DOWNLOADED:"SEGMENT_DOWNLOADED",REQUEST_GET_STATUS:"REQUEST_GET_STATUS",REQUEST_SEEK:"REQUEST_SEEK",REQUEST_LOAD:"REQUEST_LOAD",REQUEST_PRELOAD:"REQUEST_PRELOAD",REQUEST_STOP:"REQUEST_STOP",REQUEST_PAUSE:"REQUEST_PAUSE",REQUEST_PRECACHE:"REQUEST_PRECACHE",REQUEST_PLAY:"REQUEST_PLAY",REQUEST_SKIP_AD:"REQUEST_SKIP_AD",REQUEST_PLAY_AGAIN:"REQUEST_PLAY_AGAIN", REQUEST_PLAYBACK_RATE_CHANGE:"REQUEST_PLAYBACK_RATE_CHANGE",REQUEST_VOLUME_CHANGE:"REQUEST_VOLUME_CHANGE",REQUEST_EDIT_TRACKS_INFO:"REQUEST_EDIT_TRACKS_INFO",REQUEST_EDIT_AUDIO_TRACKS:"REQUEST_EDIT_AUDIO_TRACKS",REQUEST_SET_CREDENTIALS:"REQUEST_SET_CREDENTIALS",REQUEST_LOAD_BY_ENTITY:"REQUEST_LOAD_BY_ENTITY",REQUEST_USER_ACTION:"REQUEST_USER_ACTION",REQUEST_DISPLAY_STATUS:"REQUEST_DISPLAY_STATUS",REQUEST_CUSTOM_COMMAND:"REQUEST_CUSTOM_COMMAND",REQUEST_FOCUS_STATE:"REQUEST_FOCUS_STATE",REQUEST_QUEUE_LOAD:"REQUEST_QUEUE_LOAD", REQUEST_QUEUE_INSERT:"REQUEST_QUEUE_INSERT",REQUEST_QUEUE_UPDATE:"REQUEST_QUEUE_UPDATE",REQUEST_QUEUE_REMOVE:"REQUEST_QUEUE_REMOVE",REQUEST_QUEUE_REORDER:"REQUEST_QUEUE_REORDER",REQUEST_QUEUE_GET_ITEM_RANGE:"REQUEST_QUEUE_GET_ITEM_RANGE",REQUEST_QUEUE_GET_ITEMS:"REQUEST_QUEUE_GET_ITEMS",REQUEST_QUEUE_GET_ITEM_IDS:"REQUEST_QUEUE_GET_ITEM_IDS",INBAND_TRACK_ADDED:"INBAND_TRACK_ADDED",TRACKS_CHANGED:"TRACKS_CHANGED",LIVE_IS_MOVING_WINDOW_CHANGED:"LIVE_IS_MOVING_WINDOW_CHANGED",LIVE_ENDED:"LIVE_ENDED", REQUEST_STORE_SESSION:"REQUEST_STORE_SESSION",REQUEST_RESUME_SESSION:"REQUEST_RESUME_SESSION",TIMED_METADATA_CHANGED:"TIMED_METADATA_CHANGED",TIMED_METADATA_ENTER:"TIMED_METADATA_ENTER",TIMED_METADATA_EXIT:"TIMED_METADATA_EXIT"};_.w("cast.framework.events.EventType",tp);cast.A.common={};cast.A.common.F={}; var P={},zs=(P["*"]=1,P.ABORT=2,P.CAN_PLAY=3,P.CAN_PLAY_THROUGH=4,P.DURATION_CHANGE=5,P.EMPTIED=6,P.ENDED=7,P.LOADED_DATA=8,P.LOADED_METADATA=9,P.LOAD_START=10,P.PAUSE=11,P.PLAY=12,P.PLAYING=13,P.PROGRESS=14,P.RATE_CHANGE=15,P.SEEKED=16,P.SEEKING=17,P.STALLED=18,P.TIME_UPDATE=19,P.SUSPEND=20,P.WAITING=21,P.BITRATE_CHANGED=22,P.BREAK_STARTED=23,P.BREAK_ENDED=24,P.BREAK_CLIP_LOADING=25,P.BREAK_CLIP_STARTED=26,P.BREAK_CLIP_ENDED=27,P.BUFFERING=28,P.CACHE_LOADED=29,P.CACHE_HIT=30,P.CACHE_INSERTED=31, P.CLIP_STARTED=32,P.CLIP_ENDED=33,P.EMSG=34,P.ERROR=35,P.ID3=36,P.MEDIA_STATUS=37,P.MEDIA_FINISHED=38,P.PLAYER_PRELOADING=39,P.PLAYER_PRELOADING_CANCELLED=40,P.PLAYER_LOAD_COMPLETE=41,P.PLAYER_LOADING=42,P.SEGMENT_DOWNLOADED=43,P.REQUEST_SEEK=44,P.REQUEST_LOAD=45,P.REQUEST_STOP=46,P.REQUEST_PAUSE=47,P.REQUEST_PLAY=48,P.REQUEST_SKIP_AD=49,P.REQUEST_PLAY_AGAIN=50,P.REQUEST_PLAYBACK_RATE_CHANGE=51,P.REQUEST_VOLUME_CHANGE=52,P.REQUEST_EDIT_TRACKS_INFO=53,P.REQUEST_EDIT_AUDIO_TRACKS=54,P.REQUEST_SET_CREDENTIALS= 55,P.REQUEST_LOAD_BY_ENTITY=56,P.REQUEST_USER_ACTION=57,P.REQUEST_DISPLAY_STATUS=58,P.REQUEST_CUSTOM_COMMAND=59,P.REQUEST_FOCUS_STATE=60,P.REQUEST_QUEUE_LOAD=61,P.REQUEST_QUEUE_INSERT=62,P.REQUEST_QUEUE_UPDATE=63,P.REQUEST_QUEUE_REMOVE=64,P.REQUEST_QUEUE_REORDER=65,P.REQUEST_QUEUE_GET_ITEM_RANGE=66,P.REQUEST_QUEUE_GET_ITEMS=67,P.REQUEST_QUEUE_GET_ITEM_IDS=68,P.INBAND_TRACK_ADDED=69,P.REQUEST_PRECACHE=70,P.LIVE_IS_MOVING_WINDOW_CHANGED=71,P.LIVE_ENDED=72,P.MEDIA_INFORMATION_CHANGED=73,P.REQUEST_STORE_SESSION= 74,P.REQUEST_RESUME_SESSION=75,P.CUSTOM_STATE=76,P.TIMED_METADATA_CHANGED=77,P.TIMED_METADATA_ENTER=78,P.TIMED_METADATA_EXIT=79,P.TRACKS_CHANGED=80,P.REQUEST_GET_STATUS=81,P.REQUEST_PRELOAD=82,P.TIME_DRIFTED=83,P),Q={},As=(Q.MEDIA_STATUS=1,Q.CLOUD_STATUS=2,Q.QUEUE_CHANGE=3,Q.QUEUE_ITEMS=4,Q.QUEUE_ITEM_IDS=5,Q.GET_STATUS=6,Q.LOAD=7,Q.PAUSE=8,Q.STOP=9,Q.PLAY=10,Q.SKIP_AD=11,Q.PLAY_AGAIN=12,Q.SEEK=13,Q.SET_PLAYBACK_RATE=14,Q.SET_VOLUME=15,Q.EDIT_TRACKS_INFO=16,Q.EDIT_AUDIO_TRACKS=17,Q.PRECACHE=18,Q.PRELOAD= 19,Q.QUEUE_LOAD=20,Q.QUEUE_INSERT=21,Q.QUEUE_UPDATE=22,Q.QUEUE_REMOVE=23,Q.QUEUE_REORDER=24,Q.QUEUE_NEXT=25,Q.QUEUE_PREV=26,Q.QUEUE_GET_ITEM_RANGE=27,Q.QUEUE_GET_ITEMS=28,Q.QUEUE_GET_ITEM_IDS=29,Q.QUEUE_SHUFFLE=30,Q.SET_CREDENTIALS=31,Q.LOAD_BY_ENTITY=32,Q.USER_ACTION=33,Q.DISPLAY_STATUS=34,Q.FOCUS_STATE=35,Q.CUSTOM_COMMAND=36,Q.STORE_SESSION=37,Q.RESUME_SESSION=38,Q.SESSION_STATE=39,Q.SCREEN_NAVIGATION=40,Q),Bs={},Cs=(Bs.INVALID_COMMAND=0,Bs.INVALID_PARAMS=1,Bs.INVALID_MEDIA_SESSION_ID=2,Bs.SKIP_LIMIT_REACHED= 3,Bs.NOT_SUPPORTED=4,Bs.LANGUAGE_NOT_SUPPORTED=5,Bs.END_OF_QUEUE=6,Bs.DUPLICATE_REQUEST_ID=7,Bs.APP_ERROR=8,Bs.AUTHENTICATION_EXPIRED=9,Bs.PREMIUM_ACCOUNT_REQUIRED=10,Bs.CONCURRENT_STREAM_LIMIT=11,Bs.PARENTAL_CONTROL_RESTRICTED=12,Bs.NOT_AVAILABLE_IN_REGION=13,Bs.CONTENT_ALREADY_PLAYING=14,Bs.INVALID_REQUEST=15,Bs.GENERIC_LOAD_ERROR=16,Bs.VIDEO_DEVICE_REQUIRED=17,Bs.CONTENT_FILTERED=18,Bs.INVALID_REQUEST_ID=19,Bs),Ds={},Es=(Ds.END_OF_STREAM=0,Ds.ERROR=1,Ds.STOPPED=2,Ds.INTERRUPTED=3,Ds.SKIPPED=4, Ds.BREAK_SWITCH=5,Ds);cast.A.common.F.Xa={Lh:1,Lf:2,ei:3,gi:4,Eh:5}; cast.A.common.F.Hh={useLegacyDashSupport:1,loadMux:2,localSenderId:3,mediaElement:4,statusText:5,maxInactivity:6,disableIdleTimeout:7,mplUrl:8,shakaUrl:9,supportedCommands:10,playbackConfig:11,queue:12,customNamespaces:13,versionCode:14,preferredPlaybackRate:15,preferredTextLanguage:16,preferredTextStyle:17,playWatchedBreak:18,uiConfig:19,touchScreenOptimizedApp:20,skipPlayersLoad:21,skipShakaLoad:22,skipMplLoad:23,receiverManager:24,mediaManager:25,playerManager:26,usePlayerBreaks:27,shakaVersion:28, mediaMessageTimeouts:29,enforceSupportedCommands:30,useShakaPolyfills:31,useShakaForHls:32};cast.A.common.F.Zh={shakaConfig:1,enableUITextDisplayer:2,mplConfig:3}; cast.A.common.F.Xh={initialBandwidth:1,autoResumeDuration:2,autoResumeNumberOfSegments:3,autoPauseDuration:4,segmentRequestRetryLimit:5,mediaElement:6,url:7,licenseUrl:8,decodeContentId:9,protectionSystem:10,licenseCustomData:11,aggressiveStallHandling:12,disableSourceBufferTimeAdjust:13,hlsContentKeyProtection:14,enableSmoothLiveRefresh:15,enableDurationOnLive:16,skipSegmentOnNetworkFailure:17,preferSequenceNumberForPlaylistMatching:18,ignoreTtmlPositionInfo:19,enableSideloadedTextTrackStyling:20, useRelativeCueTimestamps:21,emeServerCertificate:22,useWidevineL3:23,optInRedundantStreams:24,manifestRequestHandler:25,licenseRequestHandler:26,captionsRequestHandler:27,segmentRequestHandler:28,manifestHandler:29,segmentHandler:30,licenseHandler:31};cast.A.common.F.Hp=function(a){var b;return(b=zs[a])!=null?b:0};cast.A.common.F.Lp=function(a){var b;return(b=As[a])!=null?b:0};cast.A.common.F.Yp=function(a){return Cs[a===void 0?"GENERIC_LOAD_ERROR":a]}; cast.A.common.F.Cq=function(){D("Cast.CAF.Version",Number(cast.A.VERSION.split(".")[2]))};cast.A.common.F.Wi=function(a,b){D("Cast.CAF.PlayerStarted",a);b&&b.protectionSystem&&Fs[b.protectionSystem]&&D("Cast.CAF.PlayerProtectionSystem",Fs[b.protectionSystem])}; var Gs={},Fs=(Gs.none=1,Gs.clearkey=2,Gs.playready=3,Gs.widevine=4,Gs.aes_128=5,Gs.aes_128_ckp=6,Gs),Hs={},Is=(Hs["port-for-web-server"]=1,Hs["log-level-cast-receiver"]=2,Hs["max-video-resolution-vpx"]=3,Hs["device-model"]=4,Hs["cast-receiver-version"]=5,Hs["system-version"]=6,Hs["volume-controllable"]=7,Hs["device-capabilities"]=8,Hs["is-remote-control-mode-enabled"]=9,Hs["dpad-controls-overlay-disabled"]=10,Hs["receiver-flags"]=11,Hs["enabled-for-dev"]=12,Hs["enable-hls-sample-aes"]=13,Hs); cast.A.common.F.Fq=function(a){D("Cast.CAF.PlatformValueKey",Is[a]||0)};cast.A.common.F.Dq=function(a){D("Cast.CAF.EndedReason",Es[a])};cast.A.common.F.Xi=function(a){D("Cast.Receiver.SecondaryImage.setImage",a)}; cast.A.common.F.H={VERSION:"Cast.CAF.Version",gk:"Cast.CAF.CloseReason",Kk:"Cast.CAF.IsDogfood",Ym:"Cast.CAF.Queue",Rt:"Cast.CAF.PlayerProtectionSystem",en:"Cast.CAF.SetLastSenderDisconnectedHandler",Om:"Cast.CAF.PlaybackConfigOption",sm:"Cast.CAF.MplHostOption",eo:"Cast.CAF.StartOption",Uj:"Cast.CAF.AppVersionCode",Qt:"Cast.CAF.PlatformValueKey",SHUFFLE:"Cast.CAF.Shuffle",ERROR:"Cast.CAF.Error",Ek:"Cast.CAF.EventListenerAdded",El:"Cast.CAF.MessageInterceptorSet",Wh:"Cast.CAF.MessageInterceptorDuration", Zt:"Cast.Receiver.SecondaryImage.setImage",Un:"Cast.Receiver.SlideshowUsed",Ik:"Cast.CAF.GetCafSignals",Jk:"Cast.Controls.getSafeAreaHeight",fn:"Cast.Receiver.setScrubberVisibility",dn:"Cast.Receiver.setDcVisibility",QUEUE_ITEMS:"Cast.CAF.QueueItems",ql:"Cast.CAF.LoadError",Am:"Cast.CAF.NumSubtitles",io:"Cast.CAF.SubtitleType",tl:"Cast.CAF.MediaMimeType",ul:"Cast.CAF.MediaStreamType",sl:"Cast.CAF.MediaCategory",ho:"Cast.CAF.StreamingProtocol",vo:"Cast.CAF.UnsupportedMediaMessage",bn:"Cast.CAF.SectionMetadataMissing", cn:"Cast.CAF.SectionMetadataUpdated",St:"Cast.CAF.PlayerStarted",BUFFERING:"Cast.CAF.Buffering",PLAYING:"Cast.CAF.Playing",ut:"Cast.CAF.EndedReason",vk:"Cast.CAF.DroppedVideoFrames",zo:"Cast.CAF.VideoToAdLatency",Rj:"Cast.CAF.AdToVideoLatency",Pj:"Cast.CAF.AdMimeType",Qj:"Cast.CAF.AdSkippable",Ud:"Cast.CAF.AdTimelineType",xo:"Cast.CAF.VastLibRequested",xk:"Cast.CAF.DynamicBreakAdded",yk:"Cast.CAF.DynamicBreakRemoved",ak:"Cast.CAF.BreakSeekInterceptorAdded",Pm:"Cast.CAF.PlayerProvided",Yh:"Cast.CAF.PlayerCreationFailed", Qm:"Cast.CAF.PlayerVersion",Sm:"Cast.CAF.3PPBreakInfoChanged",Tm:"Cast.CAF.3PPBreakStateChanged",Rm:"Cast.CAF.3PPBreaks",Gh:"Cast.CAF.CustomShakaVersion",qn:"Cast.CAF.ShakaForHlsEnabled",kn:"Cast.Shaka.Bandwidth",Ln:"Cast.Shaka.TotalAbrSwitches",Pn:"Cast.Shaka.ShakaVersion",Qn:"Cast.Shaka.ShakaVersionNormalized",di:"Cast.Shaka.UITextDisplayer",pn:"Cast.Shaka.Error",Gn:"Cast.Shaka.PlayTimeBeforeAutoPause",ci:"Cast.Shaka.PlayingPeriod",Nn:"Cast.Shaka.TotalPlayTime",hn:"Cast.Shaka.AutoPauseTime",Mn:"Cast.Shaka.TotalBufferTime", Kn:"Cast.Shaka.SeekInducedBufferTime",On:"Cast.Shaka.TotalRebufferCount",Jn:"Cast.Shaka.RebufferRate",wn:"Cast.Shaka.MeanTimeBetweenRebuffers",jn:"Cast.Shaka.AutoplayStartupLatency",En:"Cast.Shaka.PlayLatency",bi:"Cast.Shaka.ActiveCodec",gn:"Cast.Shaka.ActiveMimeType",vn:"Cast.Shaka.Load",un:"Cast.Shaka.Live",rn:"Cast.Shaka.IsMultiPeriod",xn:"Cast.Shaka.MediaDuration",zn:"Cast.Shaka.Pause",Dn:"Cast.Shaka.Playing",on:"Cast.Shaka.Ended",yn:"Cast.Shaka.MediaGapJumped",Bn:"Cast.Shaka.PlaybackStallDetected", Cn:"Cast.Shaka.PlaybackStallPrevented",tn:"Cast.Shaka.LicenseTime",Fn:"Cast.Shaka.PlayTime",An:"Cast.Shaka.PausedTime",ln:"Cast.Shaka.BufferingTime",nn:"Cast.Shaka.DrmTime",Hn:"Cast.Shaka.Preload",In:"Cast.Shaka.PreloadFailed"};cast.A.common.F.ai={TOP_RIGHT_VIDEO_OVERLAY:1,mo:2};cast.A.common.F.Vd={Ak:1,zk:2,fo:3,Um:4};cast.A.common.Ib={};Nj.prototype.error=function(a,b){_.z(this.Y,a,b)};Nj.prototype.info=function(a,b){_.B(this.Y,a,b)};cast.A.common.Ib.Ib=Nj;_.w("cast.framework.events.ErrorSeverity",{RECOVERABLE:1,CRITICAL:2});cast.A.ya.xt={};_.w("cast.framework.events.Event",Qj);_.r(Rj,Qj);_.w("cast.framework.events.BitrateChangedEvent",Rj);_.r(Sj,Qj);_.w("cast.framework.events.EmsgEvent",Sj);_.r(Tj,Qj);_.w("cast.framework.events.ErrorEvent",Tj);_.r(Uj,Qj);_.w("cast.framework.events.Id3Event",Uj);_.r(Vj,Qj);_.w("cast.framework.events.MediaElementEvent",Vj);_.r(Wj,Vj);_.w("cast.framework.events.MediaPauseEvent",Wj);_.r(Xj,Qj);_.w("cast.framework.events.MediaStatusEvent",Xj);_.r(Yj,Qj); _.w("cast.framework.events.CustomStateEvent",Yj);_.r(Zj,Qj);_.w("cast.framework.events.MediaFinishedEvent",Zj);_.r(ak,Qj);_.w("cast.framework.events.RequestEvent",ak);_.r(bk,Qj);_.w("cast.framework.events.LoadEvent",bk);_.r(ck,bk);_.w("cast.framework.events.MediaInformationChangedEvent",ck);_.r(dk,Qj);_.w("cast.framework.events.BreaksEvent",dk);_.r(ek,Qj);_.w("cast.framework.events.BufferingEvent",ek);_.r(fk,Qj);_.r(gk,Qj);_.w("cast.framework.events.ClipEndedEvent",gk);_.r(hk,Qj); _.w("cast.framework.events.SegmentDownloadedEvent",hk);_.r(ik,Qj);_.w("cast.framework.events.CacheLoadedEvent",ik);_.r(jk,Qj);_.w("cast.framework.events.InbandTrackAddedEvent",jk);_.r(kk,Qj);_.w("cast.framework.events.TracksChangedEvent",kk);_.r(lk,Qj);_.w("cast.framework.events.CacheItemEvent",lk);_.r(mk,Qj);_.w("cast.framework.events.LiveStatusEvent",mk);_.r(nk,Qj);_.w("cast.framework.events.TimedMetadataEvent",nk);_.w("cast.framework.ContentConfig",pk);var ok=_.y("cast.framework.ContentConfig");cast.A.breaks={};_.w("cast.framework.breaks.BreakSeekData",qk);_.w("cast.framework.breaks.BreakClipLoadInterceptorContext",rk);_.w("cast.framework.breaks.CreativeInformation",_.tk);var Js=_.fa(["https://www.gstatic.com/cast/sdk/libs/caf_receiver/"]);cast.A.common.ob={};var Ks=_.y("cast.framework.common.moduleloader"),Ls={},Ms={},Ns=document.currentScript.src; Ls.Hg=function(a){if(Ms[a])return Ms[a];try{var b=_.q(/gstatic\.com\/cast\/sdk\/libs\/caf_receiver\/(partner\/)?(.*)\/cast_receiver_framework?\.js/.exec(Ns));b.next();var c=b.next().value;var d=b.next().value}catch(e){throw Error("Failed to calculate the "+a+" lib URL");}b=_.Tc(Js);b=c?Uc(b,"partner"):b;c=Uc(Uc(b,""+d),"cast_receiver_framework_"+a+".js");Ms[a]=ai(c);return Ms[a]}; Ls.Bq=function(){return Aa(function(a){if(a.g==1)return qa(a,Ls.Hg("vast_module"),2);if(cast.Fh!==cast.ek)return _.z(Ks,"Wrong version of vast_module module is loaded."),a.return(Promise.reject("Wrong version of vast_module module is loaded."));a.g=0})}; Ls.Aq=function(){var a;return Aa(function(b){if(b.g==1)return qa(b,Ls.Hg("tv_overlay_module"),2);a=cast.dk;if(cast.Fh!==a)return _.z(Ks,"Wrong version of tv_overlay_module module is loaded."),b.return(Promise.reject("Wrong version of tv_overlay_module module is loaded."));b.g=0})};Ls.reset=function(){Ia();Ms={}};cast.A.common.ob.jt=function(){};cast.A.common.ob.wm={fu:"tv_overlay_module",gu:"vast_module",hk:"controls_android_tablet",ik:"controls_dpad_tv",kk:"controls_smart_display",jk:"controls_key_handler"}; cast.A.common.ob.ob=Ls;_.h=K.prototype;_.h.setMediaElement=function(a){this.D=a;this.j&&this.j.mj(a)};_.h.reset=function(){this.g=null;this.j&&this.j.reset()};_.h.getBreaks=function(){return this.g?this.g.g.slice():[]};_.h.xe=function(a){return this.g?this.g.xe(a):null};_.h.getBreakClips=function(){return this.g?this.g.getBreakClips().slice():[]};_.h.ub=function(a){return this.g?this.g.ub(a):null};_.h.Gp=function(a){return this.g?this.g.J.get(a):null}; _.h.Pf=function(a,b,c){c=c===void 0?!0:c;if(!this.g)return _.z(wk,"addBreak() can be called only during playback."),!1;if(a.isEmbedded)if(a.expanded)var d=!0;else _.z(wk,"Only expanded breaks can be added dynamically"),d=!1;else _.z(wk,"Only embedded breaks can be added dynamically"),d=!1;if(!d||!Al(this.g,a,b))return!1;D(cast.A.common.F.H.xk,a.duration||0);c&&this.l.ba(!0);return!0}; _.h.lf=function(a){if(!this.g)return _.z(wk,"removeBreakById() can be called only during playback."),!1;if(!this.g.lf(a))return!1;C(cast.A.common.F.H.yk);this.l.ba(!0);return!0};_.h.rc=function(){var a=this.l.g;return a?a.rc():null};_.h.Ta=function(){var a=this.l.g;return a?a.Ta():null};_.h.Ur=function(a){C(cast.A.common.F.H.ak);a&&xk(a);this.G=a||this.vi.bind(this)}; _.h.vi=function(a){var b=this,c=a.seekFrom>a.seekTo,d=a.breaks.reverse().find(function(e){return!e.isWatched||b.o});a.breaks=c||!d?[]:[d];return a};_.h.Tr=function(a){a&&xk(a);this.I=a||this.ui.bind(this)};_.h.ui=function(a){return a};_.h.uf=function(a){this.o=a};_.h.Np=function(){return this.o};_.h.vf=function(a){a!==null&&typeof a!=="function"?_.z(wk,"setVastTrackingInterceptor failed since handler is not a function"):(this.C=a,this.j&&this.j.vf(a))}; _.h.Iq=function(a){a=this.ub(a.breakClipId);this.j.vq(a)&&this.j.ol(a)};_.w("cast.framework.breaks.BreakManager",K);K.prototype.setVastTrackingInterceptor=K.prototype.vf;K.prototype.getPlayWatchedBreak=K.prototype.Np;K.prototype.setPlayWatchedBreak=K.prototype.uf;K.prototype.setBreakClipLoadInterceptor=K.prototype.Tr;K.prototype.setBreakSeekInterceptor=K.prototype.Ur;K.prototype.getBreakClipCurrentTimeSec=K.prototype.Ta;K.prototype.getBreakClipDurationSec=K.prototype.rc; K.prototype.removeBreakById=K.prototype.lf;K.prototype.addBreak=K.prototype.Pf;K.prototype.getCreativeInfoByClipId=K.prototype.Gp;K.prototype.getBreakClipById=K.prototype.ub;K.prototype.getBreakClips=K.prototype.getBreakClips;K.prototype.getBreakById=K.prototype.xe;K.prototype.getBreaks=K.prototype.getBreaks;var wk=_.y("cast.framework.breaks.BreakManager");var Gk=_.y("cast.framework.events.EventTarget");_.r(_.Fk,_.E);_.h=_.Fk.prototype;_.h.addEventListener=function(a,b,c){if(this.Ia())_.z(Gk,"Trying to add an event listener for "+a+" to a disposed EventTarget");else{this.g[a]||(this.g[a]=[]);for(var d=_.q(this.g[a]),e=d.next();!e.done;e=d.next())if(e.value.handleEvent===b)return;this.g[a].push(new Ek(b,c))}}; _.h.removeEventListener=function(a,b){if(this.Ia())_.z(Gk,"Trying to remove an event listener for "+a+" from a disposed EventTarget");else if(a=this.g[a]){var c=a.findIndex(function(d){return d.handleEvent===b});c>=0&&a.splice(c,1)}};_.h.tf=function(a){this.Ia()?_.z(Gk,"Trying to set a parent EventTarget for a disposed EventTarget"):this.l=a}; _.h.dispatchEvent=function(a){var b=a.type;this.Ia()?_.z(Gk,"Trying to dispatch an event ("+a.type+") on a disposed EventTarget"):(Hk(this,b,a),Hk(this,"*",a),this.l&&this.l.dispatchEvent(a))};_.h.ha=function(){this.g={};this.j=this.l=null};_.r(Lk,_.E);_.h=Lk.prototype;_.h.Mc=function(a){return new lj(this.R++,a)};_.h.getTracks=function(a){return a!==void 0?this.tracks.filter(function(b){return b.type==a}):this.tracks};_.h.rd=function(){return $k(this,this.l)};_.h.getTracksInfo=function(){var a=new nj;a.tracks=this.tracks;a.activeTrackIds=this.J;this.g&&(a.textTrackStyle=cast.A.P.Ei(this.g.tc()));return a};_.h.Qd=function(){};_.h.Oc=function(){};_.h.Md=function(){};_.h.mg=function(){return null};_.h.Fg=function(a){return!a.trackContentId}; _.h.lj=function(a,b,c,d,e){c.length>1&&(_.A(Jk,"Cannot enable more than one inband tracks. Will only enable track "+c[0]+"."),c=[c[0]]);al(this,b,c.concat(d!=null?d:[],e));this.Oc(c);bl(this,d,this.ignoreTtmlPositionInfo);b!=null&&this.Md(a,b)};_.h.rb=function(a){this.Ia()?_.z(Jk,"Cannot change tracks style in disposed state"):this.g&&this.g.rb(cast.A.P.Bj(a))};_.h.tc=function(){if(this.g)return cast.A.P.Ei(this.g.tc())};_.h.ha=function(){this.B&&this.B.unload();_.E.prototype.ha.call(this)}; var Jk=_.y("cast.framework.media.TracksManager");cast.A.media.mt={};_.h=dl.prototype;_.h.ni=function(a){var b=this;a&&(Object.keys(Os).forEach(function(c){kl(b,a,c,function(){var d=new Vj(Os[c],b.getCurrentTimeSec());el(b,d)})}),kl(this,a,"playing",function(){b.o<4&&(b.o=4,el(b,new Qj("CLIP_STARTED")));C(cast.A.common.F.H.PLAYING)}),kl(this,a,"ended",function(){b.end("END_OF_STREAM")}),kl(this,a,"pause",function(){var c=new Wj(b.getCurrentTimeSec(),a.ended);el(b,c)}),kl(this,a,"ratechange",function(){b.Jc(a.playbackRate)}))};_.h.wb=function(){return 0}; _.h.bj=function(){};_.h.Ef=function(){return{}};_.h.getPlayerVersion=function(){return""};_.h.pause=function(){this.T=!0;ml(this);this.dc(!1);return this.ej()};_.h.ej=function(){if(!this.mediaElement)return sd("INVALID_REQUEST");this.mediaElement.pause();return _.G()};_.h.play=function(){this.T=!1;var a=this.fj();gl(this);return a};_.h.fj=function(){return _.G(this.mediaElement&&this.mediaElement.play())}; _.h.seek=function(a,b){var c=this;b=b===void 0?null:b;if(this.isLiveStream()){var d=this.getLiveSeekableRange();if(!d)return _.A(ol,"No seekable range available, could not seek."),sd("INVALID_REQUEST");ad.end&&(_.A(ol,"Seek time is not available yet, jump to live edge."),a=d.end)}Math.abs(this.getCurrentTimeSec()-a)<1?(_.B(ol,"ignore seek which tries to jump to too close time"),a=_.G()):(a=this.Zd(a),this.T|| a.then(function(){gl(c)},function(){}));return b?a.then(function(){if(c.Yd()&&b=="PLAYBACK_START")return c.play();if(!c.Yd()&&b=="PLAYBACK_PAUSE")return c.pause()}):a};_.h.Zd=function(a){if(!this.mediaElement)return _.A(ol,"could not seek while media was not loaded yet"),sd("INVALID_REQUEST");this.fa=!0;this.mediaElement.currentTime=a;return _.G()};_.h.getMediaCategory=function(){return this.Bf};_.h.hd=function(){return this.T&&this.Yd()?"PAUSED":this.isBuffering()?"BUFFERING":"PLAYING"}; _.h.Yd=function(){return!!this.mediaElement&&this.mediaElement.paused};_.h.isLiveStream=function(){return!1};_.h.Ic=function(){};_.h.isLiveDone=function(){};_.h.Va=function(){return null};_.h.getLiveSeekableRange=function(){return null};_.h.getStartAbsoluteTime=function(){var a=this.getLiveSeekableRange();return a?Date.now()/1E3-a.end:null};_.h.getCurrentTimeSec=function(){return this.hb?this.hb:this.mediaElement?this.mediaElement.currentTime:0}; _.h.getDurationSec=function(){return this.mediaElement?this.mediaElement.duration:0};_.h.getPlaybackRate=function(){return this.mediaElement?this.mediaElement.playbackRate:1};_.h.Jc=function(a){this.ib=a;gl(this)};_.h.getBufferedRanges=function(){if(!this.mediaElement)return[];for(var a=[],b=this.mediaElement.buffered,c=0;c=4&&(this.O=Date.now()):this.O&&(D(cast.A.common.F.H.BUFFERING,Date.now()-this.O),this.O=null,this.fa=!1)};_.h.setPlaybackRate=function(a){var b=this;return this.rj((a===void 0?1:a)||1).then(function(){b.Jc(b.getPlaybackRate())})}; _.h.rj=function(a){if(!this.mediaElement)return sd("INVALID_REQUEST");this.mediaElement.playbackRate=a;return _.G()}; var ol=_.y("cast.framework.media.BasePlayer"),Os={abort:"ABORT",canplay:"CAN_PLAY",canplaythrough:"CAN_PLAY_THROUGH",durationchange:"DURATION_CHANGE",ended:"ENDED",emptied:"EMPTIED",loadeddata:"LOADED_DATA",loadedmetadata:"LOADED_METADATA",loadstart:"LOAD_START",play:"PLAY",playing:"PLAYING",progress:"PROGRESS",ratechange:"RATE_CHANGE",seeked:"SEEKED",seeking:"SEEKING",stalled:"STALLED",suspend:"SUSPEND",timeupdate:"TIME_UPDATE",waiting:"WAITING"};cast.A.timeline={};_.r(sl,pl);sl.prototype.getPosition=function(){return this.o};var wl=_.y("cast.framework.timeline.Timeline");_.h=vl.prototype;_.h.reset=function(){this.g.length=0;this.l.clear();this.D.clear()};_.h.Pf=function(a){yl(this,a)&&zl(this,a)}; _.h.lf=function(a){var b=this.g.find(function(e){return e.id===a&&!!e.isEmbedded&&!!e.expanded});if(!b)return _.z(wl,"Unknown break id "+a),!1;if(!b.isEmbedded||!b.expanded)return _.z(wl,"Only embedded and expanded breaks can be dynamically removed"+a),!1;this.g=this.g.filter(function(e){return a!==e.id});for(var c=_.q(this.l.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.breakClipIds.includes(this.l.get(d).id)&&this.l.delete(d);this.yf();return!0};_.h.yf=function(){};_.h.ub=function(a){return this.l.get(a)}; _.h.getBreakClips=function(){return Array.from(this.l.values())};_.h.xe=function(a){return this.g.find(function(b){return a==b.id})||null};_.h.se=function(){};_.h.vd=function(){};_.h.ye=function(){};vl.prototype.removeBreakById=vl.prototype.lf;_.h=Fl.prototype;_.h.Is=function(){this.ka!=null&&D(cast.A.common.F.H.zo,Date.now()-this.ka)};_.h.Hs=function(){this.V=Date.now()};_.h.Ks=function(){this.V!=null&&(D(cast.A.common.F.H.Rj,Date.now()-this.V),this.V=null)};_.h.Js=function(){this.ka=Date.now()};_.h.reset=function(a){_.B(Ml,"reset()");return this.end(a&&Ps[a]||"STOPPED")};_.h.getDurationSec=function(){return this.T};_.h.getCurrentTimeSec=function(){return this.ze()}; _.h.Oh=function(a){return this.g?il(this.g,a):(_.z(Ml,"Can not edit tracks info, player is not available"),[])};_.h.pause=function(){if(!this.g)return _.z(Ml,"Can not pause, player is not available"),_.G();_.Ab(Ml,"pause");return this.g.pause()};_.h.play=function(){if(!this.g)return _.z(Ml,"Can not play, player is not available"),_.G();_.Ab(Ml,"play");return this.g.play()}; _.h.skipAd=function(){if(!this.j)return _.B(Ml,"skipAd - not playing ad"),sd("INVALID_COMMAND");if(!Il(this))return _.B(Ml,"skipAd - ad cannot be skipped"),sd("INVALID_COMMAND");_.B(Ml,"skipAd");return this.vh()};_.h.vh=function(){return sd("NOT_SUPPORTED")};_.h.ae=function(){_.A(Ml,"Seek Not implemented");return sd("NOT_SUPPORTED")}; _.h.seek=function(a,b){var c=this;if(this.isPlayingBreak)return _.A(Ml,"seek request during break was ignored."),sd("INVALID_REQUEST");a<0&&(_.B(Ml,"Invalid seek value - "+a),a=0);return this.W?(_.A(Ml,"seek request before previous seek was finished was ignored."),sd("INVALID_REQUEST")):this.W=Ad(this.ae(a,b),function(){c.W=null})};_.h.isLiveStream=function(){return this.g?this.g.isLiveStream():!1};_.h.getLiveSeekableRange=function(){return!this.g||Kl(this)?null:this.g.getLiveSeekableRange()}; _.h.Va=function(){return this.g?this.g.Va():null};_.h.getMediaCategory=function(){return this.g?this.g.getMediaCategory():null};_.h.ac=function(){this.df()};_.h.rc=function(){return this.j?this.j.j.duration||null:null};_.h.Ta=function(){return this.j?this.timeline.ye(this.Ua()):null};_.h.Ua=function(){return this.g?this.g.getCurrentTimeSec():0};_.h.getPlaybackRate=function(){return this.g?this.g.getPlaybackRate():1};_.h.ze=function(){var a=this.Ua();return this.timeline.vd(a)}; _.h.qg=function(){return this.g?this.g.getDurationSec():0};_.h.uc=function(){return!this.g||this.B<3?[]:this.g.uc()};_.h.getStartAbsoluteTime=function(){return this.G};_.h.Eg=function(){if(!this.g)return!1;var a=this.g.getBufferedRanges();if(a.length<1)return!1;var b=a.length-1,c=a[b].end;return a[b].start<=this.Ua()&&c>=this.qg()}; _.h.Bh=function(a){if(a.media){var b=a.media;b.breakClips=this.timeline.getBreakClips()||void 0;b.breaks=this.timeline.g||void 0}a.currentTime=this.ze();a.liveSeekableRange=this.getLiveSeekableRange()||void 0;this.j?((b=this.j.g)&&!b.expanded&&(a.playbackRate=0),a.supportedMediaCommands=Pl(this,a.supportedMediaCommands),b=this.timeline.se(this.j,this.Ua()),a.breakStatus=b):this.za.getBreaks().length>0&&(a.breakStatus=new sj(void 0,void 0))}; _.h.end=function(a){var b=this;Ol();if(this.B==6)return this.J.promise;this.ca===void 0&&(this.ca=this.getCurrentTimeSec());var c=this.B;this.B=6;cast.A.common.F.Dq(a);this.Ph(a);this.isPlayingBreak&&Ul(this,"BREAK_ENDED",null,a);return this.J.promise.then(function(){a!=="END_OF_STREAM"&&a!=="SKIPPED"||b.fa();c<5&&b.ta.dispatchEvent(new Zj(b.ca,a));b.ta.dispose()})};_.h.Ph=function(a){var b=this;_.B(Ml,"endInternal(): "+a);this.g?(this.g.end(a).then(function(){b.J.resolve()}),this.g=null):this.J.resolve()}; _.h.Me=function(){return sd("INVALID_COMMAND")};_.h.df=function(){};_.h.Kd=function(){this.g.ta.tf(this.ta);Wl(this,"ERROR",this.af);Wl(this,"TIME_UPDATE",this.Bc);Wl(this,"DURATION_CHANGE",this.Zi)};_.h.af=function(){_.B(Ml,"player event: error");this.Z||(this.Z=!0)};_.h.Bc=function(){var a=Il(this);a!=this.R&&(this.R=a,Sl(this,!1));this.pa&&(a=this.g.getStartAbsoluteTime(),a!=this.G&&(this.G=a,_.B(Ml,"Updating startAbsoluteTime "+this.G)),this.pa=!1)}; _.h.Zi=function(){if(!(this.B<3)){this.T=this.timeline.vd(this.qg());var a=this.timeline,b=this.T;if(!a.isEmbedded){for(var c=null,d=a.g.length,e=0;e=b||f.position<0)c?c.breakClipIds.push.apply(c.breakClipIds,_.ia(f.breakClipIds)):(c=f,d=e,c.position=-1)}d2)return J.error("Bad value for playback rate "+c),a=new wi("INVALID_REQUEST"),a.reason="INVALID_PARAMS",a;a=new ak("REQUEST_PLAYBACK_RATE_CHANGE",b,a);this.la&&this.la(a);return null};_.h.getPlaybackRate=function(){return this.I};_.h.ts=function(a,b){a=new ak("REQUEST_STOP",b,a);this.Tb&&this.Tb(a);return null};_.h.gp=function(a){um(this,"CANCELLED",!0,a.requestData.requestId)}; _.h.vr=function(a,b){a=new ak("REQUEST_PAUSE",b,a);this.Z&&this.Z(a);return null};_.h.qs=function(a,b){a=new ak("REQUEST_SKIP_AD",b,a);this.ma&&this.ma(a);return null}; _.h.ms=function(a,b){if(!b.volume||b.volume.level===void 0&&b.volume.muted===void 0)return J.error("volume is invalid"),a=new wi("INVALID_REQUEST"),a.reason="INVALID_PARAMS",a;if(b.volume.level!=void 0&&b.volume.level<0||b.volume.level>1)return J.error("volume level is invalid"),a=new wi("INVALID_REQUEST"),a.reason="INVALID_PARAMS",a;a=new ak("REQUEST_VOLUME_CHANGE",b,a);this.Pb&&this.Pb(a);return null}; _.h.fp=function(a){a=a.requestData;var b=this.o,c=a.volume;b.mediaElement?(c.level!==void 0&&(b.mediaElement.volume=c.level),c.muted!==void 0&&(b.mediaElement.muted=c.muted)):_.A(Ml,"Cannot set media volume");this.ba(!1,a.requestId)}; _.h.kp=function(a,b){if(!hm(this.j.media.tracks,b.activeTrackIds))return J.error("Invalid track info"),b=new wi("INVALID_REQUEST"),b.reason="INVALID_PARAMS",b;a=new ak("REQUEST_EDIT_TRACKS_INFO",b,a);b.textTrackStyle&&(this.j.media.textTrackStyle=b.textTrackStyle);b.activeTrackIds&&(this.j.activeTrackIds=b.activeTrackIds);this.Aa&&this.Aa(a);return null}; _.h.To=function(a){var b=a.requestData;if(fm(this.j.media.tracks,b.language)){if(!b.activeTrackIds&&!b.language&&b.enableTextTracks!==void 0){var c=Fm(this,b);if(c)b.activeTrackIds=c;else{var d=new wi("INVALID_REQUEST");d.requestId=b.requestId;d.reason="INVALID_PARAMS";this.Ea(a.senderId,d);return}}a=new nj;a.activeTrackIds=b.activeTrackIds;a.language=b.language;a.textTrackStyle=(d=b.textTrackStyle)!=null?d:void 0;this.j.activeTrackIds=this.o.Oh(a)||void 0;this.ba(b.textTrackStyle?!0:!1,b.requestId)}else J.error("Invalid track language"), d=new wi("INVALID_REQUEST"),d.requestId=b.requestId,d.reason="LANGUAGE_NOT_SUPPORTED",this.Ea(a.senderId,d)};_.h.jp=function(a,b){a=new ak("REQUEST_EDIT_AUDIO_TRACKS",b,a);this.za&&this.za(a);return null};_.h.So=function(a){var b=a.requestData;if(gm(this.j.media.tracks,b.language))this.j.activeTrackIds=this.o.Nh(b),this.ba(!1,b.requestId);else{J.error("Invalid audio track language");var c=new wi("INVALID_REQUEST");c.requestId=b.requestId;c.reason="LANGUAGE_NOT_SUPPORTED";this.Ea(a.senderId,c)}}; _.h.Dr=function(a,b){this.T=!0;if(!ah(this.g,cast.A.P.Fs(b)))return a=new wi("INVALID_REQUEST"),a.reason="INVALID_PARAMS",a;b.items=Im(b.items);a=new ak("REQUEST_QUEUE_LOAD",b,a);this.ib&&this.ib(a);return null};_.h.ap=function(a){var b=a.requestData,c=Jm(this,b.items?b.items[b.startIndex||0]:null,b.requestId,b.currentTime),d=new Xi;d.items=b.items;d.startIndex=b.startIndex||0;d.startTime=b.currentTime;d.repeatMode=b.repeatMode||"REPEAT_OFF";c.queueData=d;c?xm(this,a.senderId,c,!0):J.error("Queue Load request is invalid")}; _.h.Cr=function(a,b){this.T=!0;var c=!1;if(ih(this.g))if(b.items&&b.items.length!=0)if(b.currentItemId!==void 0&&b.currentItemIndex!==void 0)J.error("Maximum one currentItem must be provided"),c=!0;else if(b.currentItemIndex!==void 0&&(typeof b.currentItemIndex!=="number"||b.currentItemIndex<0||b.currentItemIndex>=b.items.length))J.error("Invalid currentItemIndex"),c=!0;else if(b.currentItemId!==void 0&&(typeof b.currentItemId!=="number"||b.currentItemId<0))J.error("Invalid currentItemId"),c=!0;else{for(var d= 0;d0){c=cast.A.P;for(var d=c.ig,e=this.g,f=cast.A.P.xh(b.items),g=[],k=0;k0){this.g.zh(cast.A.P.xh(c.items));d=!0;var f="ITEMS_CHANGE";var g=c.items.map(function(l){return l.itemId})}c.shuffle!==void 0?(c.shuffle?this.g.shuffle():this.g.Pd()).then(function(){e= !0;f="UPDATE";g=b.g.sc().map(function(l){return l.itemId});Pm(b,e,f,g,d,c)}):Pm(this,e,f,g,d,c)}else{var k=new wi("INVALID_REQUEST");k.requestId=c.requestId;k.reason="INVALID_PARAMS";this.Ea(a.senderId,k)}else a=a.senderId,c.repeatMode&&!c.jump?(jh(this.g,cast.A.P.zj(c.repeatMode)),J.info("repeatMode set. The rest of QUEUE_UPDATE was ignored.")):a==="__inject__"&&this.ea==this.wi?(k=new wi("INVALID_REQUEST"),k.requestId=c.requestId,k.reason="INVALID_COMMAND",this.Ea(a,k)):(J.info("QUEUE_UPDATE request ignored"), this.ba(!1,c.requestId))};_.h.Gr=function(a,b){var c=!1;ih(this.g)?b.itemIds&&b.itemIds.length!=0?Gm(b.itemIds)||(c=!0):(J.error("No itemIds to remove"),c=!0):(J.error("Queue does not exist"),c=!0);if(c)return a=new wi("INVALID_REQUEST"),a.reason="INVALID_PARAMS",a;b.itemIds&&(b.itemIds=kh(this.g,b.itemIds));a=new ak("REQUEST_QUEUE_REMOVE",b,a);this.jb&&this.jb(a);return null}; _.h.bp=function(a){var b=a.requestData;J.info(function(){return"Queue remove data: "+JSON.stringify(b)});a=!1;typeof b.currentItemId==="number"&&(a=ph(this.g,b.currentItemId));b.itemIds&&b.itemIds.length!=0?(a=a||this.g.kh(b.itemIds),Nm(this,"REMOVE",b.itemIds),a?Dm(this,0,!1,b.requestId,b.customData,!0,b.currentTime):this.ba(!1,b.requestId,b.customData,!0)):J.error("No itemIds to remove")}; _.h.Hr=function(a,b){var c=!1;ih(this.g)?b.itemIds&&b.itemIds.length!=0?Gm(b.itemIds)?b.insertBefore!==void 0&&_.$a(b.itemIds,b.insertBefore)?(J.error("insertBefore can not be one of the reordered items"),c=!0):Om(this,b)||(c=!0):c=!0:(J.error("No itemIds to reorder"),c=!0):(J.error("Queue does not exist"),c=!0);if(c)return a=new wi("INVALID_REQUEST"),a.reason="INVALID_PARAMS",a;b.itemIds&&(b.itemIds=kh(this.g,b.itemIds));a=new ak("REQUEST_QUEUE_REORDER",b,a);this.mb&&this.mb(a);return null}; _.h.ep=function(a){var b=a.requestData;J.info(function(){return"Queue reorder data: "+JSON.stringify(b)});var c=a=!1;typeof b.currentItemId==="number"&&(c=ph(this.g,b.currentItemId));b.itemIds&&b.itemIds.length>0&&(qh(this.g,b.itemIds,b.insertBefore),a=!0);var d=this.g.sc().map(function(e){return e.itemId});Nm(this,"UPDATE",d,b.insertBefore,b.itemIds);c?Dm(this,0,!1,b.requestId,b.customData,a,b.currentTime):this.ba(!1,b.requestId,b.customData,a)};L.prototype.queueReorderRequestHandler=L.prototype.Hr; L.prototype.queueRemoveRequestHandler=L.prototype.Gr;L.prototype.resumeSessionRequestHandler=L.prototype.Mr;L.prototype.storeSessionRequestHandler=L.prototype.ws;L.prototype.userActionRequestHandler=L.prototype.Ts;L.prototype.queueGetItemIdsRequestHandler=L.prototype.zr;L.prototype.queueGetItemsRequestHandler=L.prototype.Br;L.prototype.queueGetItemRangeRequestHandler=L.prototype.Ar;L.prototype.queuePrevRequestHandler=L.prototype.Fr;L.prototype.queueNextRequestHandler=L.prototype.Er; L.prototype.queueUpdateRequestHandler=L.prototype.ih;L.prototype.queueInsertRequestHandler=L.prototype.Cr;L.prototype.queueLoadRequestHandler=L.prototype.Dr;L.prototype.editAudioTracksRequestHandler=L.prototype.jp;L.prototype.editTracksInfoRequestHandler=L.prototype.kp;L.prototype.setVolumeRequestHandler=L.prototype.ms;L.prototype.skipAdRequestHandler=L.prototype.qs;L.prototype.pauseRequestHandler=L.prototype.vr;L.prototype.stopRequestHandler=L.prototype.ts; L.prototype.setPlaybackRateRequestHandler=L.prototype.gs;L.prototype.seekRequestHandler=L.prototype.Or;L.prototype.playAgainRequestHandler=L.prototype.wr;L.prototype.playRequestHandler=L.prototype.xr;L.prototype.getStatusRequestHandler=L.prototype.Wp;L.prototype.loadRequestHandler=L.prototype.zq;cast.A.media.de.de=L;_.h=Tm.prototype;_.h.js=function(a){this.l=a;this.g&&(this.g.O=this.l)};_.h.kg=function(){var a=dm(this.g);return a&&(a=a.o)?cast.A.P.mp(a.containerMetadata||null):null};_.h.Vr=function(a){var b=dm(this.g);if(b){var c=b.o;if(!c){var d=c=new le;d.repeatMode=b.B;b.o=d}c.containerMetadata=cast.A.P.Cs(a)||void 0;Xm(this);Wm(this,!1)}else _.z(Sm,"Cannot set container metadata if no queue available.")};_.h.sc=function(){var a=[],b=dm(this.g);b&&(a=b.sc(!0));return cast.A.P.ig(a)}; _.h.vb=function(){var a=null,b=dm(this.g);b&&(a=b.vb());return cast.A.P.qd(a)};_.h.td=function(){var a=-1,b=dm(this.g);b&&(a=b.td());return a};_.h.Dg=function(a,b){a=new Li(a);a.insertBefore=b;this.j.qb(a)};_.h.kh=function(a){this.j.qb(new Ni(a))};_.h.zh=function(a){var b=new Mi;b.items=a;this.j.qb(b)};_.w("cast.framework.QueueManager",Tm);Tm.prototype.updateItems=Tm.prototype.zh;Tm.prototype.removeItems=Tm.prototype.kh;Tm.prototype.insertItems=Tm.prototype.Dg;Tm.prototype.getCurrentItemIndex=Tm.prototype.td; Tm.prototype.getCurrentItem=Tm.prototype.vb;Tm.prototype.getItems=Tm.prototype.sc;Tm.prototype.setContainerMetadata=Tm.prototype.Vr;Tm.prototype.getContainerMetadata=Tm.prototype.kg;Tm.prototype.setQueueStatusLimit=Tm.prototype.js;var Sm=_.y("cast.framework.PlayerManager");_.h=$m.prototype;_.h.reset=function(){this.g=null};_.h.getTracks=function(){an(this);return this.g.oa().getTracks("TEXT")};_.h.getTrackById=function(a){an(this);if(a<0)throw Error("Invalid input.");return cast.A.media.Na.getTrackById(a,this.getTracks())};_.h.Ee=function(a){if(!a)throw Error("Need language as input.");return cast.A.media.Na.Ji(a,this.getTracks())}; _.h.Gi=function(){var a=this.getTracks(),b=this.g.oa().o.sort(),c=[];a=_.q(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b.includes(d.trackId)&&c.push(d);return c};_.h.Bp=function(){an(this);return this.g.oa().o.sort()};_.h.Mc=function(){an(this);return this.g.oa().Mc("TEXT")};_.h.Ho=function(a){an(this);cast.A.media.Na.Vs(a);Kk(this.g.oa(),a);this.j&&Am(this.j,this.g.oa().getTracksInfo())}; _.h.Rr=function(a){an(this);var b=this.g.oa();if(a===null||a.length===0)if(b.o.sort().length>0)Wk(b,[]);else return;else cast.A.media.Na.Hj(a,this.getTracks()),Wk(b,a);this.j&&Am(this.j,b.getTracksInfo(),!1)};_.h.rf=function(a){an(this);if(!cast.A.media.Na.Qi(a,this.getTracks()))throw Error("No matching track.");Xk(this.g.oa(),a);this.j&&Am(this.j,this.g.oa().getTracksInfo(),!1)};_.h.rb=function(a){an(this);this.g.oa().rb(a);this.j&&Am(this.j,this.g.oa().getTracksInfo())}; _.h.tc=function(){an(this);return this.g.oa().tc()};_.h.getTracksInfo=function(){an(this);return this.g.oa().getTracksInfo()};_.w("cast.framework.TextTracksManager",$m);$m.prototype.getTextTracksStyle=$m.prototype.tc;$m.prototype.setTextTrackStyle=$m.prototype.rb;$m.prototype.setActiveByLanguage=$m.prototype.rf;$m.prototype.setActiveByIds=$m.prototype.Rr;$m.prototype.addTracks=$m.prototype.Ho;$m.prototype.createTrack=$m.prototype.Mc;$m.prototype.getActiveIds=$m.prototype.Bp; $m.prototype.getActiveTracks=$m.prototype.Gi;$m.prototype.getTracksByLanguage=$m.prototype.Ee;$m.prototype.getTrackById=$m.prototype.getTrackById;$m.prototype.getTracks=$m.prototype.getTracks;var Zm=_.y("cast.framework.TextTracksManager");bn.prototype.Zc=function(a,b){this.j[a]=b||_.Ic};bn.prototype.B=function(a,b){var c=a.type;_.B(Rs,"onEvent for "+c);var d=this.j[c],e=this.l[c],f=this.o[c];e&&e(a);d&&(a=d(a));return Promise.resolve(a).then(function(g){return g&&g.type==c&&f?f(g,b):g})};var Rs=_.y("cast.framework.common.EventHandler");cast.A.common.eh={};var fn=_.y("cast.framework.common.playerManagerUtils"),Ss={},Ts=(Ss.REQUEST_PAUSE=1,Ss.REQUEST_SKIP_AD=512,Ss.REQUEST_SEEK=2,Ss.REQUEST_PLAYBACK_RATE_CHANGE=8192,Ss.REQUEST_VOLUME_CHANGE=4,Ss.REQUEST_EDIT_TRACKS_INFO=4096,Ss.REQUEST_STORE_SESSION=262144,Ss.REQUEST_RESUME_SESSION=262144,Ss); cast.A.common.eh.Gj=function(a,b){var c=a.type;if(c==="REQUEST_QUEUE_UPDATE"){if(a.requestData){c=a.requestData;if((b&64)===0&&c.jump>0||(b&128)===0&&c.jump<0)return gn("QUEUE_UPDATE with Jump = "+c.jump),!1;if((b&256)===0&&c.shuffle)return gn("QUEUE_UPDATE with Shuffle"),!1;if((b&1024)===0&&c.repeatMode==="REPEAT_ALL")return gn("QUEUE_UPDATE with Repeat_All"),!1;if((b&2048)===0&&c.repeatMode==="REPEAT_SINGLE")return gn("QUEUE_UPDATE with Repeat_One"),!1;if((b&3072)===0&&(c.repeatMode!==void 0||c.repeatMode=== "REPEAT_OFF"))return gn("QUEUE_UPDATE with Repeat"),!1}}else if((a=Ts[c])&&!(b&a))return gn(c),!1;return!0};cast.A.Fu={};_.w("cast.framework.stats.Stats",function(){});_.w("cast.framework.stats.TrackChoice",function(){});_.w("cast.framework.stats.StateChange",function(){});cast.A.media.util={};var Us=_.y("cast.framework.media.util"),hn={m3u8:"application/x-mpegurl",manifest:"application/vnd.ms-sstr+xml",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",m4v:"video/mp4",mp4:"video/mp4",ogv:"video/ogg",aac:"audio/aac",m4a:"audio/mp4",mp3:"audio/mp3",oga:"audio/ogg",wav:"audio/wav",jpg:"image/jpg",gif:"image/gif",png:"image/png"};cast.A.media.util.nf=function(a){return a*1E3}; cast.A.media.util.Ae=function(a){a=a.split("?")[0]||"";a=a.split("/").pop()||"";return a.split(".").pop()||""};cast.A.media.util.Fe=function(a,b){b=b===void 0?"video/mp4":b;if(a=hn[a])return a;_.A(Us,"cannot guess mime type from given contenId/Type. Assume that this is "+b);return b};cast.A.media.util.aq=function(a,b,c,d,e){c=kn(d||a.contentUrl||a.contentId,a.contentType,c,a.hlsSegmentFormat,a.hlsVideoSegmentFormat);c.media=a;c.startTime=b;e&&(c.tracksInfo=e);return c}; cast.A.media.util.Zp=function(a,b){b=kn(String(a.contentUrl||a.contentId),a.contentType,b,a.hlsSegmentFormat,a.hlsVideoSegmentFormat);b.breakClip=a;return b};cast.A.media.util.Li=function(a){switch(a.toLowerCase()){case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "audio/mpegurl":case "audio/x-mpegurl":return 2;case "application/vnd.ms-sstr+xml":return 3;case "application/dash+xml":return 1;default:return 0}};cast.A.common.ge={};var pn=new cast.A.common.Ib.Ib("cast.framework.common.StatsTracker");ln.prototype.setMediaElement=function(a){this.g=a};ln.prototype.getStats=function(){nn(this);var a={bufferingTime:this.o,playTime:this.D};this.g&&Object.assign(a,on(this.g));return a};cast.A.common.ge.ge=ln;_.h=M.prototype;_.h.setEventsListener=function(){};_.h.getPlayerVersion=function(){};_.h.getPlayerState=function(){};_.h.getDurationSec=function(){};_.h.getCurrentTimeSec=function(){};_.h.getMediaCategory=function(){};_.h.isLiveStream=function(){};_.h.getPlaybackRate=function(){};_.h.getLiveSeekableRange=function(){};_.h.getStartAbsoluteTime=function(){};_.h.getBufferedRanges=function(){};_.h.getTracksInfo=function(){};_.h.getCurrentBitRate=function(){};_.h.getBreakStatus=function(){}; _.h.getBreaks=function(){};_.h.getBreakClips=function(){};_.h.skipAd=function(){};_.h.preload=function(){};_.h.load=function(){};_.h.unload=function(){};_.h.play=function(){};_.h.pause=function(){};_.h.seek=function(){};_.h.setPlaybackRate=function(){};_.h.setActiveAudioTrack=function(){};_.h.setActiveTextTracks=function(){};_.w("cast.framework.PlayerInterface",M);M.prototype.setActiveTextTracks=M.prototype.setActiveTextTracks;M.prototype.setActiveAudioTrack=M.prototype.setActiveAudioTrack; M.prototype.setPlaybackRate=M.prototype.setPlaybackRate;M.prototype.seek=M.prototype.seek;M.prototype.pause=M.prototype.pause;M.prototype.play=M.prototype.play;M.prototype.unload=M.prototype.unload;M.prototype.load=M.prototype.load;M.prototype.preload=M.prototype.preload;M.prototype.skipAd=M.prototype.skipAd;M.prototype.getBreakClips=M.prototype.getBreakClips;M.prototype.getBreaks=M.prototype.getBreaks;M.prototype.getBreakStatus=M.prototype.getBreakStatus;M.prototype.getCurrentBitRate=M.prototype.getCurrentBitRate; M.prototype.getTracksInfo=M.prototype.getTracksInfo;M.prototype.getBufferedRanges=M.prototype.getBufferedRanges;M.prototype.getStartAbsoluteTime=M.prototype.getStartAbsoluteTime;M.prototype.getLiveSeekableRange=M.prototype.getLiveSeekableRange;M.prototype.getPlaybackRate=M.prototype.getPlaybackRate;M.prototype.isLiveStream=M.prototype.isLiveStream;M.prototype.getMediaCategory=M.prototype.getMediaCategory;M.prototype.getCurrentTimeSec=M.prototype.getCurrentTimeSec;M.prototype.getDurationSec=M.prototype.getDurationSec; M.prototype.getPlayerState=M.prototype.getPlayerState;M.prototype.getPlayerVersion=M.prototype.getPlayerVersion;M.prototype.setEventsListener=M.prototype.setEventsListener; M.EventType={STATE_CHANGED:"STATE_CHANGED",CLIP_ENDED:"CLIP_ENDED",ERROR:"ERROR",TIME_UPDATE:"TIME_UPDATE",DURATION_CHANGED:"DURATION_CHANGED",RATE_CHANGED:"RATE_CHANGED",TEXT_TRACKS_CHANGED:"TEXT_TRACKS_CHANGED",AUDIO_TRACKS_CHANGED:"AUDIO_TRACKS_CHANGED",BITRATE_CHANGED:"BITRATE_CHANGED",TIME_TO_TARGET_BITRATE:"TIME_TO_TARGET_BITRATE",BREAK_INFO_CHANGED:"BREAK_INFO_CHANGED",BREAK_STATE_CHANGED:"BREAK_STATE_CHANGED"};M.Event=rn;_.r(sn,rn);M.BitrateChangedEvent=sn;_.r(tn,rn); M.TargetBitrateEvent=tn;cast.A.common.hash={};var Vs=_.y("cast.framework.common.hash");cast.A.common.hash.nq=function(a){var b=0,c;for(c=0;c=vn.Cb("3.1.0")&&_.z(wn,"Mux.js is not supported for Shaka 3.1.0 and above."),un("//ajax.googleapis.com/ajax/libs/shaka-player/"+g+"/mux.min.js",Ys))};vn.reset=function(){Ia();Ws=new bf;Xs=new bf;Ys=new bf;vn.gj=Ws.promise;vn.th=Xs.promise;vn.Hq=Ys.promise};cast.A.common.Vb=vn;var Bn=_.y("cast.framework.media.CustomPlayer");_.r(An,dl);_.h=An.prototype;_.h.wb=function(){return cast.A.common.F.Xa.Eh};_.h.ni=function(){};_.h.Bd=function(a,b){var c=this;Aa(function(d){Cn(c,"load",function(){return c.g.load(a,b)}).then(function(){var e=c.getLiveSeekableRange();return c.isLiveStream()&&c.j.startTime===void 0&&e&&e.end&&!e.isLiveDone?c.seek(e.end):_.G()}).then(function(){hl(c)},function(e){fl(c,e&&e.detailedErrorCode||900,e&&e.error,e)});d.g=0})}; _.h.cf=function(){var a=this;return Aa(function(b){if(a.g.preload){try{a.g.preload()}catch(c){_.z(Bn,"preload failed ",c)}a.o=2}b.g=0})};_.h.gd=function(a){var b=this;this.C.resolve(new od(function(c){return c(b.g.unload(a))}))};_.h.fj=function(){var a=this;return Cn(this,"play",function(){return a.g.play()})};_.h.ej=function(){var a=this;return Cn(this,"pause",function(){return Promise.resolve(a.g.pause()).then(function(){return Dn(a,500)})})}; _.h.Zd=function(a){var b=this;if(this.g.seek)return Cn(this,"seek",function(){return b.g.seek(a)});_.A(Bn,"Seek is not supported");return sd("NOT_SUPPORTED")};_.h.rj=function(a){var b=this;if(this.g.setPlaybackRate)return Cn(this,"setPlaybackRate",function(){return b.g.setPlaybackRate(a)});_.A(Bn,"Set playback rate is not supported");return sd("NOT_SUPPORTED")};_.h.getDurationSec=function(){return this.g.getDurationSec()};_.h.getCurrentTimeSec=function(){return this.g.getCurrentTimeSec()}; _.h.getPlaybackRate=function(){return this.g.getPlaybackRate?this.g.getPlaybackRate():1};_.h.getBufferedRanges=function(){return this.g.getBufferedRanges?this.g.getBufferedRanges()||[]:[]};_.h.isLiveStream=function(){return!!this.g.isLiveStream&&this.g.isLiveStream()};_.h.getLiveSeekableRange=function(){return this.g.getLiveSeekableRange?this.g.getLiveSeekableRange():null};_.h.Va=function(){var a=this.getLiveSeekableRange();return a?new xi(a.start||0,a.end||0):null}; _.h.getStartAbsoluteTime=function(){if(!this.isLiveStream())return null;var a=null;this.g.getStartAbsoluteTime&&(a=this.g.getStartAbsoluteTime());return a||dl.prototype.getStartAbsoluteTime.call(this)};_.h.Yd=function(){return this.g.getPlayerState()=="PAUSED"};_.h.hd=function(){return this.isBuffering()?"BUFFERING":this.g.getPlayerState()};_.h.getBreaks=function(){return this.g&&this.g.getBreaks?this.g.getBreaks():null}; _.h.getBreakClips=function(){return this.g&&this.g.getBreakClips?this.g.getBreakClips():null};_.h.getBreakStatus=function(){return this.g&&this.g.getBreakStatus?this.g.getBreakStatus():null};_.h.skipAd=function(){var a=this;if(this.g&&this.g.skipAd)return Cn(this,"skipAd",function(){return a.g.skipAd()});_.A(Bn,"skipAd is not supported");return sd("NOT_SUPPORTED")};_.h.getPlayerVersion=function(){return String(this.g.getPlayerVersion())||dl.prototype.getPlayerVersion.call(this)};_.r(En,Lk);En.prototype.Fg=function(a){return a&&!!a.isInband};En.prototype.Oc=function(a){this.j.setActiveTextTracks(a)};En.prototype.Md=function(a,b){this.j.setActiveAudioTrack(b)};cast.A.media.sk=En;cast.A.media.Bg={};var Zs=_.y("cast.framework.media.ImagePlayer");_.r(Gn,dl);_.h=Gn.prototype;_.h.jd=function(a){var b=this;_.B(Zs,"loadContent");this.mediaElement=a;cast.A.common.F.Wi(this.wb(),this.j.playbackConfig);var c=this.j.url;return Fn(c).then(function(){a.style.backgroundImage=_.fi(c);b.g=a;_.B(Zs,"image is set");b.l=b.Xc(b,a,b.j.tracksInfo)},function(){fl(b,903);return sd()})};_.h.getDurationSec=function(){return 0};_.h.wb=function(){return cast.A.common.F.Xa.Lh};_.h.hd=function(){return"PAUSED"}; _.h.ac=function(){Aa(function(a){_.B(Zs,"ImagePlayer does not handle preload");a.g=0})};_.h.play=function(){_.B(Zs,"ImagePlayer does not support PLAY");return sd("NOT_SUPPORTED")};_.h.pause=function(){_.B(Zs,"ImagePlayer does not support PAUSE");return sd("NOT_SUPPORTED")};_.h.seek=function(){_.B(Zs,"ImagePlayer does not support SEEK");return sd("NOT_SUPPORTED")};_.h.gd=function(){this.g&&(this.g.style.backgroundImage="none");this.C.resolve()};_.h.dc=function(){};cast.A.media.Bg.It=Gn; cast.A.media.Bg.create=function(a){return _.G(new Gn(a))};cast.A.media.tj={}; cast.A.media.tj.ng=function(a){if(a.code)switch(a.code){case shaka.util.Error.Code.LOAD_INTERRUPTED:return 904;case shaka.util.Error.Code.LICENSE_REQUEST_FAILED:return 201;case shaka.util.Error.Code.NO_RECOGNIZED_KEY_SYSTEMS:case shaka.util.Error.Code.REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:return 202;case shaka.util.Error.Code.DASH_EMPTY_PERIOD:return 421}switch(a.category){case shaka.util.Error.Category.NETWORK:return 321;case shaka.util.Error.Category.TEXT:return 600;case shaka.util.Error.Category.MEDIA:return 100;case shaka.util.Error.Category.MANIFEST:return 420; case shaka.util.Error.Category.DRM:return 200}return 999};cast.A.media.uj={};cast.A.media.uj.sq=function(){shaka.util.BufferUtils||(shaka.util.BufferUtils={});shaka.util.BufferUtils.toUint8||(shaka.util.BufferUtils.toUint8=Hn);shaka.util.Dom||(shaka.util.Dom={});shaka.util.Dom.createHTMLElement||(shaka.util.Dom.createHTMLElement=In)};cast.A.media.Kc={};var Qn={maxAttempts:4,baseDelay:400,backoffFactor:2,timeout:3E4},$s={},Xn=($s.clearkey="org.w3.clearkey",$s.playready="com.chromecast.playready",$s.widevine="com.widevine.alpha",$s),Ln=_.y("cast.framework.media.ShakaPlayer");_.r(Jn,dl);_.h=Jn.prototype;_.h.rg=function(){return this.g};_.h.wb=function(){return cast.A.common.F.Xa.Lf};_.h.uc=function(){return this.Cc};_.h.Zd=function(a){return dl.prototype.Zd.call(this,a+this.B)}; _.h.isLiveStream=function(){this.mb||(this.mb=!!this.g&&(this.g.isLive()||this.g.isInProgress()));return this.mb};_.h.Ic=function(){return!!this.g&&!this.g.isInProgress()};_.h.isLiveDone=function(){return!!this.g&&!this.g.isLive()&&!this.g.isInProgress()};_.h.Va=function(){var a,b=(a=this.g)==null?void 0:a.seekRange();if(a=b)a=_.Qe.K(),a=_.Se(a,"check_shaka_seek_range_validity",!0)?b.start!==0||b.end!==0:1;return a?new xi(b.start,b.end):null}; _.h.Ef=function(){if(!this.g)return{};for(var a=this.g.getStats(),b=a.width,c=a.height,d=a.streamBandwidth,e=a.decodedFrames,f=a.droppedFrames,g=a.corruptedFrames,k=a.estimatedBandwidth,l=a.gapsJumped,m=a.stallsDetected,n=a.completionPercent,t=a.loadLatency,x=a.manifestTimeSeconds,v=a.drmTimeSeconds,H=a.playTime,T=a.pauseTime,Ea=a.bufferingTime,La=a.licenseTime,ra=a.liveLatency,Ma=a.maxSegmentDuration,Zb=[],ib=_.q(a.switchHistory),ma=ib.next();!ma.done;ma=ib.next())ma=ma.value,Zb.push({timestamp:ma.timestamp, type:ma.type,fromAdaptation:ma.fromAdaptation,bandwidth:ma.bandwidth});ib=[];a=_.q(a.stateHistory);for(ma=a.next();!ma.done;ma=a.next())ma=ma.value,ib.push({timestamp:ma.timestamp,state:ma.state,duration:ma.duration});return{width:b,height:c,streamBandwidth:d,decodedFrames:e,droppedFrames:f,corruptedFrames:g,estimatedBandwidth:k,gapsJumped:l,stallsDetected:m,completionPercent:n,loadLatency:t,manifestTimeSeconds:x,drmTimeSeconds:v,absolutePlayTime:H,pauseTime:T,bufferingTime:Ea,licenseTime:La,liveLatency:ra, maxSegmentDuration:Ma,switchHistory:Zb,stateHistory:ib}};_.h.getLiveSeekableRange=function(){if(!this.isLiveStream())return null;var a=this.Va();if(!a||typeof a.start!=="number"||typeof a.end!=="number")return null;this.B===null&&(this.B=a.start);var b=this.Ic(),c=this.isLiveDone();return new _.Wi(a.start-this.B,a.end-this.B,b,c)}; _.h.getStartAbsoluteTime=function(){if(!this.isLiveStream())return null;var a=dl.prototype.getStartAbsoluteTime.call(this),b=dl.prototype.getCurrentTimeSec.call(this)-this.getCurrentTimeSec();return a&&b&&Math.abs(a-b)<1800?b:a};_.h.getCurrentTimeSec=function(){var a=dl.prototype.getCurrentTimeSec.call(this);if(this.o!=6&&this.isLiveStream()&&a){if(this.B===null)return 0;a-=this.B}return a}; _.h.cf=function(){var a=this;return Aa(function(b){if(b.g==1){if(!a.Dc)return _.A(Ln,"Shaka API doesn't support preload."),b.return();if(a.V!==void 0&&a.Va.end&&(_.A(Ln,"Start time is out of seek range, jump to live."),b=a.end);this.mediaElement.currentTime=b;this.yc=!1}};_.h.gr=function(){C(cast.A.common.F.H.Dn)};_.h.Vk=function(){this.Ac&&(C(cast.A.common.F.H.Cn),this.Ac=!1)};_.h.bj=function(){C(cast.A.common.F.H.on)}; _.h.gd=function(){var a=this;this.g?(co(this),this.Nd.removeAll(),this.g.unload().then(function(){a.C.resolve()}),this.G&&this.G.destroy(),this.W&&this.W.remove(),this.Pb.clear(),this.Cc=[],this.Ub=this.zc=this.Sa=0):this.C.resolve()};_.h.getPlayerVersion=function(){return shaka.Player.version||dl.prototype.getPlayerVersion.call(this)};Jn.create=function(a,b){return cast.A.common.Vb.th.then(function(){return new Jn(a,shaka,b)})};var Kn=null;cast.A.media.Kc.Kc=Jn;cast.A.media.Lc={};var at=_.y("cast.framework.media.ShakaTracksManager");_.r(fo,Lk);fo.create=function(a,b,c){return new fo(a,b,c)};_.h=fo.prototype; _.h.Qd=function(){var a=go(this.j.getVariantTracks()),b=this.j.getTextTracks();a=a.concat(b);a=_.q(a);for(b=a.next();!b.done;b=a.next()){b=b.value;var c=b.type==="variant"?"AUDIO":b.type.toUpperCase();var d=b.type==="variant"?b.audioMimeType||void 0:b.mimeType?b.mimeType:void 0;var e=void 0;c==="AUDIO"&&(e=new mj,e.audioCodec=b.audioCodec||void 0,e.numAudioChannels=b.channelsCount||void 0,e.spatialAudio=b.spatialAudio!==null?b.spatialAudio:void 0);var f=b.kind?b.kind.toUpperCase():void 0,g=b.type=== "variant"?b.audioRoles:b.roles;g===null&&(g=void 0);var k=b.label||void 0,l=b.forced,m=Nk({type:c,language:b.language,trackContentType:d,subtype:f,roles:g,name:k},l?this.G:this.tracks);m||(m=this.Mc(c),m.language=b.language,m.trackContentType=d,m.subtype=f,m.roles=g,m.name=k,m.audioTrackInfo=e,Kk(this,[m],l));this.C.set(m.trackId,c==="AUDIO"?b.audioId:b.id)}}; _.h.Oc=function(a){var b=this;if(a&&a.length!==0){a=a.map(function(e){return b.C.get(e)});for(var c=_.q(this.j.getTextTracks()),d=c.next();!d.done;d=c.next())d=d.value,a.includes(d.id)&&this.j.selectTextTrack(d);this.j.setTextTrackVisibility(!0)}else this.j.setTextTrackVisibility(!1)}; _.h.Md=function(a,b){if(b!==null){var c=null;a!==null&&(c=this.C.get(a));var d=this.C.get(b);if(c!==d){var e=this.j.getVariantTracks(),f=e.find(function(k){return k.active}).videoId,g=e.find(function(k){return k.audioId===d&&k.videoId===f});g?(g.language?(g.language==="und"&&_.A(at,"switching to matching track with language 'und'"),(a=g.audioRoles&&g.audioRoles.find(function(k){return e.every(function(l){return l.language===g.language&&l.audioId!==g.audioId&&l.videoId===g.videoId&&l.audioRoles&&l.audioRoles.includes(k)? !1:!0})}))?this.j.selectAudioLanguage(g.language,a):this.j.selectAudioLanguage(g.language)):(_.A(at,"matching track is missing language, selecting variant track and disabling ABR"),this.j.configure({abr:{enabled:!1}}),this.j.selectVariantTrack(g,!0)),this.L&&this.L()):_.z(at,"cannot find matching shaka variant track")}}}; _.h.mg=function(){var a=go(this.j.getVariantTracks());a=_.q(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.primary){a:{a=b.audioId;b=_.q(this.C);for(var c=b.next();!c.done;c=b.next()){c=_.q(c.value);var d=c.next().value;if(c.next().value===a){a=d;break a}}a=null}if(a!==null)return a;break}return null};_.h.rd=function(){var a=Lk.prototype.rd.call(this);a||(a=Array.from(this.C.keys())[0],a=$k(this,a));return a};_.h.ha=function(){this.L=null;Lk.prototype.ha.call(this)};cast.A.media.Lc.Lc=fo;_.r(ho,dl);ho.prototype.Bd=function(a,b){var c=this;Aa(function(d){_.B(bt,"loadContent: autoplay = "+b+", initial_time = "+c.j.startTime);if(!a)return fl(c,905),d.return();io(c,a);a.src=c.j.url;a.autoplay=b;d.g=0})};ho.prototype.g=function(a){var b=this.j.startTime||0;b<0&&(b+=a.duration);b>=0&&b!=a.currentTime&&(a.currentTime=b);hl(this)};ho.prototype.wb=function(){return cast.A.common.F.Xa.ei};var bt=_.y("cast.framework.media.SimplePlayer");_.r(jo,Lk);jo.prototype.Qd=function(){var a=this.player.getMediaCategory()=="AUDIO"?"AUDIO":"VIDEO";Nk({type:a},this.tracks)||(a=this.Mc(a),Kk(this,[a]))};cast.A.media.jo=jo;cast.A.media.Zb={};cast.A.media.Zb.Mo=function(a){var b=a.getStreamCount(),c=0,d={};return d[Symbol.iterator]=function(){return{next:function(){return c0&&Math.abs(c-this.getCurrentTimeSec())>1&&(b=this.seek(c))}b.then(function(){return hl(a)})}; _.h.gd=function(){this.D.unload();this.C.resolve();this.J.clear();this.L=[]};mo.create=function(a,b){return cast.A.common.Vb.gj.then(function(){return new mo(a,new cast.A.media.ee.ee,b)})};cast.A.media.he.he=mo;cast.A.media.ie={};var ct={foregroundColor:"#FFFFFFFF",backgroundColor:"#00000000",fontFamily:"Helvetica",fontScale:1,windowColor:"#00000080",windowRoundedCornerRadius:8,windowType:"ROUNDED_CORNERS",fontStyle:"NORMAL",fontGenericFamily:"SANS_SERIF",customData:void 0,edgeColor:void 0,edgeType:void 0},so=_.y("cast.framework.media.StreamingTracksManager");_.r(qo,Lk);qo.create=function(a,b,c){return new qo(a,b,c)};_.h=qo.prototype; _.h.Qd=function(){var a=cast.A.media.Zb.Mo(this.C),b=0;a=_.q(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.mimeType;if(d){var e;var f=d;var g=c.codecs;f=f.toLowerCase();Yd(f)||f=="application/mp4"&&g=="stpp"?f="TEXT":(!(e=Ob(f,"audio/"))&&(e=g)&&(g=g.toLowerCase(),e=!g.includes(",")&&!!g.match(/^(mhm|mp4a|[ae]c-3)/)),f=e?"AUDIO":Ob(f,"video/")?"VIDEO":null);f&&(f=="TEXT"&&(d=to(d,c.codecs)),g=c.hlsMediaInfo?c.hlsMediaInfo.forced:!1,e=Nk({type:f,subtype:c.subtype,name:c.name,language:c.language, trackContentType:d},g?this.G:this.tracks),e||(e=this.Mc(f),e.name=c.name,e.language=c.language,e.subtype=c.subtype,e.trackContentType=d,c.hlsMediaInfo&&(e.assocLanguage=c.hlsMediaInfo.assocLanguage),Kk(this,[e],g)),f==="AUDIO"&&this.O.push(e.trackId),this.L.set(e.trackId,b),b++)}}}; _.h.Md=function(a,b){var c=-1,d=-1,e=this.C;a==null?c=e.getDefaultAudioStreamIndex():a>-1&&(c=this.L.get(a));b==null?d=e.getDefaultAudioStreamIndex():b>-1&&(d=this.L.get(b));c!=d&&(e.enableStream(c,!1),e.enableStream(d,!0),this.j.onAudioChanged())};_.h.rd=function(){var a=Lk.prototype.rd.call(this);a||this.C.getInbandAudioLanguage&&(a=this.C.getInbandAudioLanguage());a||(a=$k(this,this.O.length?this.O[0]:null));return a}; _.h.mg=function(){for(var a=this.C.getDefaultAudioStreamIndex(),b=null,c=_.q(this.L),d=c.next();!d.done;d=c.next()){d=_.q(d.value);var e=d.next().value;if(d.next().value===a){b=e;break}}return b};_.h.lj=function(a,b,c,d,e){c.length+(d==null?0:1)>1&&(_.A(so,"Can only enable one track. Will enable track "+c[0]),c=[c[0]],d=null);al(this,b,c.concat(d!=null?d:[],e));d==null?(bl(this,d,this.ignoreTtmlPositionInfo),this.Oc(c)):(this.Oc(c),bl(this,d,this.ignoreTtmlPositionInfo));b!=null&&this.Md(a,b)}; _.h.Oc=function(a){var b=a.length==0?null:a[0];a=b!=null?this.L.get(b):void 0;for(var c=!1,d=this.C,e=d.getStreamCount(),f=a===void 0,g=0;gb.g?b.l+(a-b.g):b.l:a}; Bo.prototype.se=function(a,b){var c=Eo(this,b),d=0,e=0;c?(d=b-c.D,e=b-c.j):_.B(dt,"No matching break for break status, assuming beginning of break.");b=new sj(d,e);rl(a,b);return b};Bo.prototype.ye=function(a){var b=Eo(this,a);return b?a-b.j:null}; Bo.prototype.yf=function(){var a=0;this.o=[];this.G=new Map;this.I=new zo;for(var b=_.q(this.g),c=b.next();!c.done;c=b.next()){c=c.value;for(var d=0,e=0;e0)){var g=Cl(e,f);if(g.breakClipIds.length>0){for(var k=[],l=0,m=_.q(f.breaks),n=m.next();!n.done;n=m.next()){n=n.value;for(var t=_.q(n.breakClipIds),x=t.next();!x.done;x=t.next()){x=x.value;var v=e.G.get(n.id+"___"+x);v?(k.push(new Jo(g, v.breakClip,v.l,v.D,v.j,v.g,l,!1)),l++):_.z(dt,"Invalid break id and break clip id combination in BreakSeekData. break id = "+(n.id+"; break clip id = ")+x)}}e.j=new yo(g,k,f.seekTo);d.l=yd();d.C=d.l.promise.then(c);return Mo(d)}}_.B(et,"No seek break.");return c()})};_.h.vh=function(){var a=this.Ua(),b=this.timeline;this.o=!0;var c=this.g,d=c.seek;b=Eo(b,a);return d.call(c,b?b.g:a,"PLAYBACK_START")};_.h.Bc=function(a){Mo(this);cast.A.media.Player.prototype.Bc.call(this,a)}; _.h.Zk=function(){_.B(et,"started");Tl(this)};_.h.Yk=function(a){_.B(et,"ended");this.B<5&&(Ul(this,"BREAK_ENDED",null,a.endedReason),Vl(this,a))};var et=_.y("cast.framework.media.EmbeddedPlayer");var ft=_.y("cast.framework.timeline.EmbeddedTimeline");_.r(No,vl);No.prototype.getBreakStatus=function(){if(!this.j||!this.j.breakId||!this.j.breakClipId)return null;var a=this.xe(this.j.breakId),b=this.ub(this.j.breakClipId);return a&&b?new pl(a,a.breakClipIds.indexOf(this.j.breakClipId)||0,b):(_.z(ft,"Error in break status, unknown break or break clip."),null)};No.prototype.vd=function(a){return a};No.prototype.ye=function(){return this.j?this.j.currentBreakClipTime||0:null}; No.prototype.se=function(a){var b=this.j;rl(a,b);return b};cast.A.timeline.Wm=No;_.r(Po,cast.A.media.Player);_.h=Po.prototype;_.h.df=function(){this.C=wo(uo.K(),this.D).then(function(a){a.ac();return a})};_.h.Me=function(a){var b=this;return(this.C||wo(uo.K(),this.D)).then(function(c){b.g=c;c instanceof An&&(b.l=c);b.Kd();return c.jd(b.mediaElement,a)}).then(function(c){Qo(b);return c})}; _.h.Kd=function(){var a=this;cast.A.media.Player.prototype.Kd.call(this);Wl(this,"CLIP_STARTED",function(){_.B(gt,"started");Tl(a)});Wl(this,"CLIP_ENDED",function(b){_.B(gt,"ended");a.B<5&&(Ul(a,"BREAK_ENDED",null,b.endedReason),Vl(a,b))});this.l&&(this.l.D=function(){a.l?(C(cast.A.common.F.H.Sm),Qo(a),Sl(a,!0)):_.z(gt,"Error getting breaks info changed for non custom player")},this.l.G=function(){if(a.l){C(cast.A.common.F.H.Tm);var b=a.o,c=a.l.getBreakStatus();b.j=c;b=a.o.getBreakStatus();a.j&&b&& ql(b,a.j)||(a.j&&!b?Ul(a,"BREAK_ENDED",null):Ul(a,"BREAK_CLIP_STARTED",b))}else _.z(gt,"Error getting break state changed for non custom player")})};_.h.Bc=function(a){if(this.isPlayingBreak){var b=this.o,c=this.l.getBreakStatus();b.j=c}cast.A.media.Player.prototype.Bc.call(this,a)};_.h.ae=function(a,b){return this.g.seek(a,b)};_.h.skipAd=function(){return this.l?this.l.skipAd():sd("NOT_SUPPORTED")};var gt=_.y("cast.framework.media.ProxyPlayer");cast.A.media.Vm=Po;Ro.prototype.isPlayingBreak=function(){return this.breakStatus!=null};var Uo=_.y("cast.framework.timeline.StitchingTimeline");_.r(So,vl);So.prototype.se=function(a,b){for(var c=a.g,d=a.l,e=0,f=0;f0&&(d=Cl(c.timeline,d),d.breakClipIds.length>0)))return ep(c,d,a,b);_.B(bp,"No seek break.");return!1}).eb(function(){_.B(bp,"Fail to create seek clip");return!1}).then(function(d){if(!d){d=a;if(d>=c.l.endTime||d=1){var d=c.length-1,e=c[d].end;c[d].start<=a&&e>=b&&this.ea.resolve()}a>=b-this.ib&&!this.C&&$o(this)&&gp(this,this.l);a>=this.l.endTime&&this.g.end("BREAK_SWITCH")};_.h.Bh=function(a){cast.A.media.Player.prototype.Bh.call(this,a);var b;if((b=this.l)==null?0:b.breakStatus)a.currentTime=this.l.breakStatus.getPosition()}; var bp=_.y("StitchingPlayer");cast.A.media.lo=Zo;var np=new cast.A.common.Ib.Ib("cast.framework.PlayerManager");_.h=N.prototype;_.h.Jq=function(a){var b=this.O;a=a.isBuffering;nn(b);b.j=a;this.ba()};_.h.pr=function(){this.ba()};_.h.getStats=function(){var a=this.O.getStats();if(this.g){var b=Object,c=b.assign;var d=this.g;d=d.g?d.g.Ef():{};a=c.call(b,a,d)}return a};_.h.qj=function(a){this.ca=a};_.h.Op=function(){return this.ca};_.h.Rp=function(){return this.I};_.h.Sp=function(){return this.M};_.h.Tp=function(){return this.W};_.h.Dp=function(){return this.T}; _.h.Xp=function(){return this.C};_.h.Vp=function(){return this.Z};_.h.Ep=function(){return this.J};_.h.Sq=function(){var a=this.O;nn(a);a.j=!1;a.l=!1;this.g=null;this.R=!1;this.T.reset();this.C.reset();this.J.reset()};_.h.hr=function(){var a=this.g.getPlaybackRate();if(this.Ta()===null&&this.I!==a){this.I=a;a=this.j;var b=this.g.getPlaybackRate();a.I=b;this.ba()}};_.h.Oq=function(){if(this.g&&this.R){var a=this.kb(),b=this.getDurationSec();a.duration!==b&&(a.duration=b,this.Yc(a,!0))}}; _.h.qr=function(){if(this.g&&this.R){var a=this.C.getTracksInfo();a&&Am(this.j,a)}};_.h.Ko=function(){this.j&&this.R&&this.j.Od!=="PLAYING"&&this.ba()};_.h.lr=function(a){this.V=a.credentials;return new og}; _.h.Pq=function(a){var b=this,c,d,e,f,g,k;return Aa(function(l){if(l.g==1)return c=new Ai,c.media=new zi,c.autoplay=!0,c.media.entity=a.entity,b.V&&(c.credentials=b.V,c.credentialsType="cloud"),a.shuffle!==void 0&&(Fb(cast.A.common.F.H.SHUFFLE,a.shuffle),d=new Xi,a.shuffle?(d.repeatMode="REPEAT_ALL_AND_SHUFFLE",d.shuffle=!0):(d.repeatMode="REPEAT_OFF",d.shuffle=!1),c.queueData=d),c.loadOptions=cast.A.P.op(a.loadOptions),l.l=2,qa(l,b.load(c),4);if(l.g!=2)return l.return(new og);e=ta(l);var m;if(m= (f=e)==null?0:f.reason)m=(g=e)==null?void 0:g.type,m=_.ec(yp,m);k=m?e.reason:"APP_ERROR";return l.return(new ig(k))})};_.h.bl=function(a){D(cast.A.common.F.H.ERROR,a.detailedErrorCode||0)};_.h.addEventListener=function(a,b){var c=this;if(typeof b!=="function")throw np.error("addEventListener failed since handler is not a function"),Error("addEventListener failed since handler is not a function");Array.isArray(a)?a.forEach(function(d){up(c,d,b)}):up(this,a,b)}; _.h.removeEventListener=function(a,b){var c=this;Array.isArray(a)?a.forEach(function(d){c.o.removeEventListener(d,b)}):this.o.removeEventListener(a,b)}; _.h.Zc=function(a,b){var c=this,d=null;_.ec(xs,a)?b!=null&&typeof b!=="function"&&(d="setMessageInterceptor("+a+") failed since handler is not a function"):d="setMessageInterceptor("+a+") failed due to invalid request type";if(d)throw np.error(d),Error(d);D(cast.A.common.F.H.El,cast.A.common.F.Lp(a));b=b&&wp(b);switch(a){case "MEDIA_STATUS":this.ka=b;break;case "GET_STATUS":case "LOAD":case "PAUSE":case "STOP":case "PLAY":case "PLAY_AGAIN":case "SEEK":case "SET_PLAYBACK_RATE":case "SET_VOLUME":case "SKIP_AD":case "EDIT_TRACKS_INFO":case "EDIT_AUDIO_TRACKS":case "PRELOAD":case "QUEUE_LOAD":case "QUEUE_INSERT":case "QUEUE_UPDATE":case "QUEUE_REMOVE":case "QUEUE_REORDER":case "QUEUE_GET_ITEM_RANGE":case "QUEUE_GET_ITEMS":case "QUEUE_GET_ITEM_IDS":case "STORE_SESSION":case "RESUME_SESSION":b= b&&this.Ys.bind(this,a,b);if(a=="LOAD"){d=en(this.l,pp.LOAD);var e=en(this.l,pp.PRELOAD);e&&e!==d||this.l.Zc(pp.PRELOAD,b)}this.l.Zc(pp[a],b);break;case "SET_CREDENTIALS":case "LOAD_BY_ENTITY":case "DISPLAY_STATUS":case "FOCUS_STATE":case "CUSTOM_COMMAND":case "SCREEN_NAVIGATION":this.D.Zc(a,b&&this.Kj.bind(this,a,b));break;case "SESSION_STATE":this.na=b;break;case "USER_ACTION":this.D.Zc(a,b&&this.Kj.bind(this,a,b));var f=b&&this.Ss.bind(this,b);this.L.promise.then(function(){return c.j.zc=f});break; case "CLOUD_STATUS":np.error("Message type "+a+" is deprecated. No interceptor set.");break;default:throw d="Unknown message type - "+a,np.error(d),Error(d);}}; _.h.Ss=function(a,b){var c=this;qp(this,b);var d=null;try{d=a(b.requestData)}catch(e){throw np.error("UserAction Interceptor Exception "+e),vp(this,b),e;}Promise.resolve(d).then(function(e){if(_.ec(yp,e==null?void 0:e.type))return Promise.reject(e);c.ba(!0,b.requestData.requestId)}).then(function(){},function(e){np.error("UserAction failed "+e);vp(c,b);if(e instanceof Error)throw e;})}; _.h.Ys=function(a,b,c){function d(k){if(a=="LOAD"){Cm(e.j,k);e.o.dispatchEvent(new Tj(905,k));var l,m;(l=e.j)==null||(m=l.l)==null||m.g.cancel(k)}else vp(e,c,k.type,k.reason,k.customData)}var e=this;if(this.da){var f=this.lg();if(!cast.A.common.eh.Gj(c,f))return hq(this,c),Promise.resolve(null)}f=null;var g=c.requestData&&c.requestData.requestId;try{f=b(c.requestData)}catch(k){throw d(k),k;}return Promise.resolve(f).then(function(k){if(!k){var l,m;(l=e.j)==null||(m=l.l)==null||m.g.resolve();return null}if(_.ec(yp, k==null?void 0:k.type))return d(k),null;g&&g!==k.requestId&&(_.A(np.Y,c.type+" Interceptor changed requestId, using original requestId"),k.requestId=g);return c=new ak(c.type,k,c.senderId)}).catch(function(k){_.ec(yp,k==null?void 0:k.type)||np.error(a+" Interceptor Error "+k);d(k);if(k instanceof Error)throw k;return null})}; _.h.Kj=function(a,b,c){var d=this,e,f,g,k;return Aa(function(l){if(l.g==1)return l.l=2,qa(l,b(c),4);if(l.g!=2){if(e=l.j){if(_.ec(yp,e.type))throw e;return l.return(e)}return l.return(new og)}f=ta(l);a==="LOAD_BY_ENTITY"&&d.o.dispatchEvent(new Tj(905,f));k=((g=f)==null?void 0:g.reason)||"APP_ERROR";return l.return(new ig(k,void 0,f.customData))})};_.h.ds=function(a){a!=null&&typeof a!=="function"?np.error("setMediaPlaybackInfoHandler() cannot set handler since it's not a function"):this.fa=a}; _.h.es=function(a){a!=null&&typeof a!=="function"?np.error("setMediaUrlHandler() cannot set handler since it's not a function"):this.la=a};_.h.ah=function(a,b){return this.B.ah(a,b).then(function(c){var d=null;c.type=="ERROR"&&(d=new wi("ERROR"),d.reason=c.code);return d})};_.h.jh=function(){return this.B.jh().then(function(a){if(a.type=="ERROR"){var b=new wi("ERROR");b.reason=a.code;return Promise.reject(b)}})}; _.h.setMediaElement=function(a){var b=this;!this.g&&this.j&&(this.ea=_.G(a),this.ea.then(function(c){b.O.setMediaElement(c);b.j.setMediaElement(c);b.J.setMediaElement(c);try{is.C=c}catch(d){np.error("debug overlay update failed",d)}}))};_.h.kb=function(){return this.j?this.j.kb():null};_.h.Yc=function(a,b){this.j&&(this.g&&Ql(this.g,a),this.j.Yc(a,b),this.o.dispatchEvent(new ck(a)))}; _.h.Nb=function(){return this.j?this.j.Nb():(np.error("getSupportedMediaCommands should not be called before CastReceiverContext#start"),0)};_.h.lg=function(){if(!this.j)return np.error("getCurrentSupportedMediaCommands should not be called before CastReceiverContext#start"),0;var a=this.j.Nb();this.g&&(a=Pl(this.g,a));return a};_.h.Jd=function(a,b){var c=this;b=b===void 0?!0:b;this.L.promise.then(function(){return c.j.Jd(a,b)})}; _.h.Qf=function(a,b){var c=this;b=b===void 0?!0:b;this.L.promise.then(function(){return c.j.Qf(a,b)})};_.h.lh=function(a,b){var c=this;b=b===void 0?!0:b;this.L.promise.then(function(){return c.j.lh(a,b)})};_.h.ba=function(a,b,c,d){this.j&&this.j.ba(a===void 0?!1:a,b,c,d)};_.h.qf=function(a,b,c,d,e){this.j&&this.j.qf(a,b,c===void 0?!1:c,d,e)};_.h.Pr=function(a){this.j&&(this.j.B.send("*:*",new yi(a)),this.o.dispatchEvent(new Yj(a)))};_.h.ph=function(a){this.j&&this.j.ph(a)}; _.h.Ea=function(a,b,c,d,e){if(this.j){c=new wi(c);c.requestId=b;var f;c.reason=(f=d===void 0?null:d)!=null?f:void 0;var g;c.customData=(g=e===void 0?null:e)!=null?g:void 0;this.j.Ea(a,c)}};_.h.getCurrentTimeSec=function(){return this.g?this.g.ze():0};_.h.Ua=function(){return this.g?this.g.Ua():0};_.h.getStartAbsoluteTime=function(){return this.g?this.g.getStartAbsoluteTime():null};_.h.zp=function(a){var b=this.getStartAbsoluteTime();return b===null?null:a+b}; _.h.Kp=function(a){var b=this.getStartAbsoluteTime();return b===null?null:a-b};_.h.getPlayerState=function(){return this.g?Jl(this.g):"IDLE"};_.h.getDurationSec=function(){return this.g?this.g.T:NaN};_.h.Ta=function(){return this.J.Ta()};_.h.getPlaybackRate=function(){return this.j?this.j.getPlaybackRate():1};_.h.rc=function(){return this.J.rc()};_.h.getBreaks=function(){return this.g?this.g.timeline.g:[]};_.h.getLiveSeekableRange=function(){return this.g?this.g.getLiveSeekableRange():null}; _.h.Va=function(){return this.g?this.g.Va():null};_.h.rg=function(){return Kn};_.h.uc=function(){return this.g?this.g.uc():[]};_.h.load=function(a){var b=this;a.requestId||(a.requestId=this.za++);var c=new cast.A.media.hc.hc;this.L.promise.then(function(){return b.j.load(a,c)});return c.promise};_.h.pause=function(){this.qb(new I("PAUSE"))};_.h.play=function(){this.qb(new I("PLAY"))};_.h.seek=function(a){var b=new Hi;b.currentTime=a;this.qb(b)};_.h.stop=function(){this.qb(new I("STOP"))}; _.h.qb=function(a){var b=this;this.L.promise.then(function(){return b.j.qb(a)})};_.h.hs=function(a){var b=uo.K();C(cast.A.common.F.H.Pm);b.g=a}; _.h.Uq=function(a,b){var c=this;np.info("MediaManagerLoad");var d=a.requestData;if(b.g)np.info("Load cancelled");else{var e=d.media;Fp(d);var f=!1,g=this.j;e!==g.kb()&&(this.Yc(e,!1),this.ba(!0,d.requestId));xp(this).then(function(){$l(b);if(e&&(e.contentUrl||e.contentId))if(c.G&&c.G.jb==(e.contentUrl||e.contentId)){var k=_.G(c.G);c.G=null}else k=Hp(c,d);else np.error("LoadRequest data was corrupted"),k=sd();return k}).then(function(k){b.g&&(c.ma=k.end("INTERRUPTED"),$l(b));g.o&&Hl(g.o);if(g.o=k)g.o.fa= g.aj.bind(g);k.ta.tf(c.o);c.g=k;return c.ea}).then(function(k){$l(b);var l=d.autoplay!==void 0?d.autoplay:!0;c.I=d.playbackRate||c.I;c.o.dispatchEvent(new bk("PLAYER_LOADING",e));f=!0;return Nl(c.g,k,l,c.I)}).then(function(){$l(b);np.info("Load complete.");Bm(c.j);c.T.g=c.g;c.C.g=c.g;var k=c.g.oa();k&&Am(g,k.getTracksInfo());Em(g,c.g.getPlaybackRate());Jp(c,!0);Ql(c.g,e);c.R=!0;c.o.dispatchEvent(new bk("PLAYER_LOAD_COMPLETE",e));Bp(c);Ep(c);mn(c.O);qn(c.O);Xm(c.Z);Wm(c.Z,!1);om(g);c.g.ta.addEventListener("ERROR", function(l){qm(c.j,l);Cm(c.j,l)})}).eb(function(k){if(b.g)np.info("Load cancelled.");else{var l,m;np.error("Load failed: "+((m=(l=k)==null?void 0:l.message)!=null?m:""));k=typeof k==="object"?k:null;Cm(c.j,k);f||c.o.dispatchEvent(new Zj(void 0,"ERROR"));D(cast.A.common.F.H.ql,cast.A.common.F.Yp(k==null?void 0:k.reason)||0);c.o.dispatchEvent(new Tj(905,k))}})}}; _.h.Xq=function(a){var b=this,c=a.requestData,d=c.media;if(!d||!d.contentUrl&&!d.contentId)return np.error("PreloadRequest data was corrupted"),!1;this.G?(a=this.G.end("STOPPED"),this.G=null):a=_.G();a.then(function(){return Hp(b,c)}).then(function(e){b.o.dispatchEvent(new bk("PLAYER_PRELOADING",d));b.G=e;e.ac()},function(){np.error("Cannot create player on preload")});return!0}; _.h.Yq=function(a){var b=this;if(this.g){var c=a.requestData,d=c.relativeTime!==void 0?this.getCurrentTimeSec()+c.relativeTime:Number(c.currentTime);Promise.resolve(this.g.seek(d,c.resumeState)).then(function(){b.ba(!1,c.requestId)},function(e){Ap(b,a,e)})}else vp(this,a,"INVALID_PLAYER_STATE")}; _.h.Nq=function(a){var b=this;this.g&&this.g.Bh(a);a&&!a.breakStatus&&["PLAYING","PAUSED"].includes(a.playerState)&&Jp(this,!1);var c=a;this.ka&&(c=this.ka(a));return Promise.resolve(c).then(function(d){d=gc(d);Ip(d);b.o.dispatchEvent(new Xj(d));return d})};_.h.ar=function(a){var b=this;this.g?this.g.skipAd().then(function(){b.ba(!1,a.requestData.requestId)},function(c){Ap(b,a,c)}):vp(this,a,"INVALID_PLAYER_STATE")}; _.h.Wq=function(a){var b=this;if(this.g){if(this.g.isLiveStream()){var c=this.g.getLiveSeekableRange(),d=this.Nb(),e=this.getCurrentTimeSec(),f=e;c?d&2?e=0&&(d.queueData.startIndex=c,d.queueData.startTime=d.currentTime);d.customData= bm(this.j);c=new Ri;c.loadRequestData=d;d=c;this.na&&(d=this.na(c));Promise.resolve(d).then(function(f){f?Mm(b.j,a.senderId,a.requestData.requestId,f):vp(b,a,"ERROR","NOT_SUPPORTED")},function(){vp(b,a,"ERROR","APP_ERROR")})}else np.error("No media is being played on StoreSession"),vp(this,a,"INVALID_PLAYER_STATE")}; _.h.jr=function(a){var b=a.requestData;b.sessionState.loadRequestData?(a=b.sessionState.loadRequestData,a.requestId=b.requestId,this.V&&(a.credentials=this.V,a.credentialsType="cloud"),this.load(a)):vp(this,a,"INVALID_REQUEST")};_.h.uf=function(a){this.J.uf(a)};_.h.Hb=function(a,b){if(this.da){var c=this.lg();if(!cast.A.common.eh.Gj(b,c)){hq(this,b);return}}a(b)};_.w("cast.framework.PlayerManager",N);N.prototype.setPlayerFactory=N.prototype.hs;N.prototype.sendLocalMediaRequest=N.prototype.qb; N.prototype.stop=N.prototype.stop;N.prototype.seek=N.prototype.seek;N.prototype.play=N.prototype.play;N.prototype.pause=N.prototype.pause;N.prototype.load=N.prototype.load;N.prototype.getTimedMetadata=N.prototype.uc;N.prototype.getShakaPlayer=N.prototype.rg;N.prototype.getRawSeekableRange=N.prototype.Va;N.prototype.getLiveSeekableRange=N.prototype.getLiveSeekableRange;N.prototype.getBreaks=N.prototype.getBreaks;N.prototype.getBreakClipDurationSec=N.prototype.rc;N.prototype.getPlaybackRate=N.prototype.getPlaybackRate; N.prototype.getBreakClipCurrentTimeSec=N.prototype.Ta;N.prototype.getDurationSec=N.prototype.getDurationSec;N.prototype.getPlayerState=N.prototype.getPlayerState;N.prototype.getMediaTimeForAbsoluteTime=N.prototype.Kp;N.prototype.getAbsoluteTimeForMediaTime=N.prototype.zp;N.prototype.getStartAbsoluteTime=N.prototype.getStartAbsoluteTime;N.prototype.getRawCurrentTimeSec=N.prototype.Ua;N.prototype.getCurrentTimeSec=N.prototype.getCurrentTimeSec;N.prototype.sendError=N.prototype.Ea; N.prototype.setIdleReason=N.prototype.ph;N.prototype.sendCustomState=N.prototype.Pr;N.prototype.sendStatus=N.prototype.qf;N.prototype.broadcastStatus=N.prototype.ba;N.prototype.removeSupportedMediaCommands=N.prototype.lh;N.prototype.addSupportedMediaCommands=N.prototype.Qf;N.prototype.setSupportedMediaCommands=N.prototype.Jd;N.prototype.getCurrentSupportedMediaCommands=N.prototype.lg;N.prototype.getSupportedMediaCommands=N.prototype.Nb;N.prototype.setMediaInformation=N.prototype.Yc; N.prototype.getMediaInformation=N.prototype.kb;N.prototype.setMediaElement=N.prototype.setMediaElement;N.prototype.refreshCredentials=N.prototype.jh;N.prototype.playString=N.prototype.ah;N.prototype.setMediaUrlResolver=N.prototype.es;N.prototype.setMediaPlaybackInfoHandler=N.prototype.ds;N.prototype.setMessageInterceptor=N.prototype.Zc;N.prototype.removeEventListener=N.prototype.removeEventListener;N.prototype.addEventListener=N.prototype.addEventListener;N.prototype.getBreakManager=N.prototype.Ep; N.prototype.getQueueManager=N.prototype.Vp;N.prototype.getTextTracksManager=N.prototype.Xp;N.prototype.getAudioTracksManager=N.prototype.Dp;N.prototype.getPreferredTextStyle=N.prototype.Tp;N.prototype.getPreferredTextLanguage=N.prototype.Sp;N.prototype.getPreferredPlaybackRate=N.prototype.Rp;N.prototype.getPlaybackConfig=N.prototype.Op;N.prototype.setPlaybackConfig=N.prototype.qj;N.prototype.getStats=N.prototype.getStats; var ht={},pp=(ht.GET_STATUS="REQUEST_GET_STATUS",ht.LOAD="REQUEST_LOAD",ht.PAUSE="REQUEST_PAUSE",ht.STOP="REQUEST_STOP",ht.PLAY="REQUEST_PLAY",ht.SKIP_AD="REQUEST_SKIP_AD",ht.PLAY_AGAIN="REQUEST_PLAY_AGAIN",ht.SEEK="REQUEST_SEEK",ht.SET_PLAYBACK_RATE="REQUEST_PLAYBACK_RATE_CHANGE",ht.SET_VOLUME="REQUEST_VOLUME_CHANGE",ht.EDIT_TRACKS_INFO="REQUEST_EDIT_TRACKS_INFO",ht.EDIT_AUDIO_TRACKS="REQUEST_EDIT_AUDIO_TRACKS",ht.PRELOAD="REQUEST_PRELOAD",ht.QUEUE_LOAD="REQUEST_QUEUE_LOAD",ht.QUEUE_INSERT="REQUEST_QUEUE_INSERT", ht.QUEUE_UPDATE="REQUEST_QUEUE_UPDATE",ht.QUEUE_REMOVE="REQUEST_QUEUE_REMOVE",ht.QUEUE_REORDER="REQUEST_QUEUE_REORDER",ht.QUEUE_GET_ITEM_RANGE="REQUEST_QUEUE_GET_ITEM_RANGE",ht.QUEUE_GET_ITEMS="REQUEST_QUEUE_GET_ITEMS",ht.QUEUE_GET_ITEM_IDS="REQUEST_QUEUE_GET_ITEM_IDS",ht.USER_ACTION="REQUEST_USER_ACTION",ht.STORE_SESSION="REQUEST_STORE_SESSION",ht.RESUME_SESSION="REQUEST_RESUME_SESSION",ht),it={},rp=(it.SET_CREDENTIALS="REQUEST_SET_CREDENTIALS",it.LOAD_BY_ENTITY="REQUEST_LOAD_BY_ENTITY",it.USER_ACTION= "REQUEST_USER_ACTION",it.DISPLAY_STATUS="REQUEST_DISPLAY_STATUS",it.CUSTOM_COMMAND="REQUEST_CUSTOM_COMMAND",it.FOCUS_STATE="REQUEST_FOCUS_STATE",it),jt={},Cp=(jt.BUFFERED=1,jt.LIVE=2,jt.NONE=3,jt),kt={},Dp=(kt.VIDEO=1,kt.AUDIO=2,kt.IMAGE=3,kt);var lt=null;cast.A.common.Wd={Ne:function(a){lt||(lt=a,D(cast.A.common.F.H.gk,a))}};var mt={},lq=(mt.no_media=5,mt.loading=5,mt.paused=20,mt),nt={},mq=(nt.no_media=2,nt.loading=4,nt.paused=3,nt),kq=_.y("IdleTimeoutManager");_.h=iq.prototype; _.h.start=function(){var a=this.l;a.addEventListener("ERROR",this.cj.bind(this));a.addEventListener("MEDIA_FINISHED",this.cj.bind(this));a.addEventListener("PAUSE",this.er.bind(this));a.addEventListener("PLAYER_LOADING",this.dr.bind(this));a.addEventListener("PLAYER_LOAD_COMPLETE",this.cr.bind(this));a.addEventListener("TIME_UPDATE",this.fr.bind(this));nq(this,"no_media")};_.h.cj=function(){_.Ab(kq,"onPlayerIdle");nq(this,"no_media")};_.h.er=function(){_.Ab(kq,"onPlayerPaused");nq(this,"paused")}; _.h.dr=function(){_.Ab(kq,"onPlayerLoading");nq(this,"loading")};_.h.cr=function(){_.Ab(kq,"onPlayerLoadComplete");this.l.getPlayerState()==="PAUSED"&&nq(this,"paused")};_.h.fr=function(){this.g=null;jq(this)};cast.A.common.Lk=iq;cast.A.U.Y=_.y("cast.framework.ui");cast.A.U.oq=function(){if(document.getElementsByTagName("cast-media-player")[0]){var a=document.getElementsByClassName("castSplashScreen")[0];cast.A.U.qq(document.getElementsByClassName("castWelcomeScreen")[0]||a)}};cast.A.U.qq=function(a){a=a===void 0?null:a;var b=cast.A.U.Y;a&&(_.B(b,"remove welcome screen"),a.remove())};_.h=O.prototype;_.h.reset=function(){this.g=null;this.D=!1};_.h.yq=function(a){this.Ig(a===void 0?!1:a)};_.h.Ig=function(a,b,c,d,e,f,g){this.D||(cast.A.common.Vb.load({useLegacyDashSupport:a===void 0?!1:a,mplUrl:b,shakaUrl:c,loadMux:d===void 0?!1:d,skipMplLoad:e===void 0?!1:e,shakaVersion:f,shakaVariant:g===void 0?"STANDARD":g}),this.D=!0)}; _.h.initialize=function(){this.g.Ir&&(this.j=this.g.Ir);this.g.bh&&(this.l=this.g.bh);this.g.playbackConfig&&this.l.qj(this.g.playbackConfig);this.g.preferredPlaybackRate&&(this.l.I=this.g.preferredPlaybackRate);this.g.preferredTextLanguage&&(this.l.M=this.g.preferredTextLanguage);this.g.yr&&(this.l.W=this.g.yr);if(this.g.customNamespaces)for(var a in this.g.customNamespaces)this.g.customNamespaces.hasOwnProperty(a)&&ve(this.j,a,cast.A.P.Aj(this.g.customNamespaces[a]));this.g.mediaMessageTimeouts&& (xe.K().j=this.g.mediaMessageTimeouts);this.l.uf(!!this.g.playWatchedBreak);a=this.j;a.da=this.kr.bind(this);a.ea=this.rr.bind(this);a.ca=this.cl.bind(this);this.isRemoteControl()||this.g.skipPlayersLoad||(this.Ig(this.g.useLegacyDashSupport||this.g.skipShakaLoad,this.g.mplUrl,this.g.shakaUrl,this.g.loadMux,this.g.skipMplLoad,this.g.shakaVersion,this.g.shakaVariant),eo(this.g.useShakaPolyfills||this.g.useShakaPolyfills===void 0));this.l.da=!!this.g.enforceSupportedCommands};_.h.Qp=function(){return this.l}; _.h.getSenders=function(){var a=this;return this.j.getSenders().map(function(b){return cast.A.P.Di(a.j.Ce(b))})};_.h.Ce=function(a){return cast.A.P.Di(this.j.Ce(a))}; _.h.start=function(a){_.B(pq,"start");a||(a=new Lj);var b=a;if(this.g)throw Error("Cast receiver options already provided");this.g=b;cast.A.Cf.set(this.g);var c=cast.A.common.F,d;for(d in c.Hh)b[d]!==void 0&&D(c.H.eo,c.Hh[d]);b.versionCode!==void 0&&(c=c.H.Uj,b=cast.A.common.hash.Tg(b.versionCode),D(c,b));this.initialize();a=a.yu||new cast.A.media.de.de(this.g.mediaElement||null,this.g.supportedCommands||void 0,this.g.localSenderId||void 0);this.g.queue!==void 0&&(C(cast.A.common.F.H.Ym),a.qh(cast.A.P.As(this.g.queue))); Kp(this.l,a);(a=this.g.mediaElement||rq())&&this.l.setMediaElement(a);b=this.g.uiConfig;c=qq();a=this.j;b=!!(b&&b.touchScreenOptimizedApp||this.g.touchScreenOptimizedApp||c);a.wc()?_.z(tf,"initTouchScreenOptimizedApp() method cannot be called after CastReceiverManager.start() has been called"):(b===void 0&&_.z(tf,"setTouchScreenOptimizedApp() has to be called with 1 required argument"),Zf(a,b));this.j.start(cast.A.P.Bs(this.g));return this};_.h.stop=function(){cast.A.common.Wd.Ne(6);this.j.stop()}; _.h.xf=function(){this.j.xf()};_.h.uh=function(){this.j.uh()};_.h.isRemoteControl=function(){return this.j.isRemoteControl()};_.h.wc=function(){return this.j.wc()};_.h.ug=function(){return cast.A.P.xp(this.j.ug())};_.h.sg=function(){return cast.A.P.up(this.j.sg())};_.h.De=function(){return cast.A.P.vp(this.j.De())};_.h.Pc=function(){return cast.A.P.Bi(this.j.Pc())};_.h.og=function(){return cast.A.P.qp(this.j.og())};_.h.Id=function(a){this.j.Id(a)};_.h.rh=function(a){this.j.rh(a)};_.h.sh=function(a){this.j.sh(a)}; _.h.Rc=function(){return cast.A.P.wp(this.j.Rc())};_.h.sf=function(a){this.j.sf(a)};_.h.Yr=function(a){C(cast.A.common.F.H.en);this.B=a};_.h.Xr=function(a){var b=this;a?this.j.V=function(){(new Promise(function(c){c(a())})).then(function(c){b.j.Hd(c)},function(c){_.z(pq,"Feedback handler failed "+JSON.stringify(c))})}:this.j.V=null};_.h.Hd=function(a){this.j.Hd(a)};_.h.oh=function(a){this.j.oh(a)}; _.h.mi=function(a,b){function c(d){b(new hi(d.type,d.senderId,d.data))}a=sq(this,a);if(typeof b!=="function")throw Error("listener on custom channel should be a function");this.o.set(b,c);a.addEventListener("message",c)};_.h.Jr=function(a,b){a=sq(this,a);var c=this.o.get(b);c&&(a.removeEventListener("message",c),this.o.delete(b))};_.h.Go=function(a,b){a=sq(this,a);if(typeof b!=="function")throw Error("interceptor on custom channel should be a function");re(a,b)}; _.h.kj=function(a,b,c){b===void 0&&(b="*:*");sq(this,a).send(b,c)};_.h.rq=function(a,b,c){a=sq(this,a);qe(a,b,a.M(c))};_.h.kr=function(a){_.B(pq,"onSenderDisconnected");if(a.senderId===void 0||a.reason===void 0)_.B(pq,"SenderDisconnectedEvent is corrupted");else{var b=this.j.getSenders().length===0,c=a.reason==="requested_by_sender";b&&c&&(cast.A.common.Wd.Ne(5),this.B?this.B(cast.A.P.tp(a)):this.stop())}}; _.h.rr=function(a){_.B(pq,"onVisibilityChanged");a.isVisible===void 0?_.B(pq,"VisibilityChangedEvent is corrupted"):a.isVisible||this.l.getPlayerState()==="IDLE"||this.l.pause()};_.h.cl=function(){var a=this;_.B(pq,"onReady");this.isRemoteControl()||(this.g.disableIdleTimeout||(new cast.A.common.Lk(this.l,function(){return a.stop()})).start(),tq(this));cast.A.U.oq()};_.h.Td=function(){var a=this,b,c;return Aa(function(d){if(d.g==1)return qa(d,a.j.Td(),2);b=d.j;c=cast.A.P.Bi(b);return d.return(c)})}; _.h.addEventListener=function(a,b){a==="feedbackstarted"?_.A(pq,"FEEDBACK_STARTED event is not fired, use setFeedbackHandler instead"):this.j.addEventListener(a,b)};_.h.removeEventListener=function(a,b){this.j.removeEventListener(a,b)};_.h.Lr=function(){this.j.Id("")};_.h.Sr=function(a){(a=a.media.metadata)&&a.title&&this.j.Id("Casting: "+a.title)};_.h.ud=function(){return this.j.ud()};_.h.canDisplayType=function(a,b,c,d,e){return this.j.canDisplayType(a,b,c,d,e)};_.h.setLoggerLevel=function(a){cast.receiver.Wb.pj(a)}; _.h.Mp=function(a){cast.A.common.F.Fq(a);return Fc(a)};_.w("cast.framework.CastReceiverContext",O);O.getInstance=vq;O.prototype.getPlatformValue=O.prototype.Mp;O.prototype.setLoggerLevel=O.prototype.setLoggerLevel;O.prototype.canDisplayType=O.prototype.canDisplayType;O.prototype.getDeviceCapabilities=O.prototype.ud;O.prototype.removeEventListener=O.prototype.removeEventListener;O.prototype.addEventListener=O.prototype.addEventListener;O.prototype.waitForReady=O.prototype.Td; O.prototype.injectCustomMessage=O.prototype.rq;O.prototype.sendCustomMessage=O.prototype.kj;O.prototype.addCustomMessageSendInterceptor=O.prototype.Go;O.prototype.removeCustomMessageListener=O.prototype.Jr;O.prototype.addCustomMessageListener=O.prototype.mi;O.prototype.sendSmartDisplayMessage=O.prototype.oh;O.prototype.sendFeedbackMessage=O.prototype.Hd;O.prototype.setFeedbackHandler=O.prototype.Xr;O.prototype.setLastSenderDisconnectedHandler=O.prototype.Yr;O.prototype.setInactivityTimeout=O.prototype.sf; O.prototype.getSystemVolume=O.prototype.Rc;O.prototype.setSystemVolumeMuted=O.prototype.sh;O.prototype.setSystemVolumeLevel=O.prototype.rh;O.prototype.setApplicationState=O.prototype.Id;O.prototype.getMediaControlsState=O.prototype.og;O.prototype.getApplicationData=O.prototype.Pc;O.prototype.getSystemState=O.prototype.De;O.prototype.getStandbyState=O.prototype.sg;O.prototype.getVisibilityState=O.prototype.ug;O.prototype.isSystemReady=O.prototype.wc;O.prototype.isRemoteControl=O.prototype.isRemoteControl; O.prototype.showSleepTimerOverlay=O.prototype.uh;O.prototype.showRemoteControlOverlay=O.prototype.xf;O.prototype.stop=O.prototype.stop;O.prototype.start=O.prototype.start;O.prototype.getSender=O.prototype.Ce;O.prototype.getSenders=O.prototype.getSenders;O.prototype.getPlayerManager=O.prototype.Qp;O.prototype.loadPlayerLibrariesWithOptions=O.prototype.Ig;O.prototype.loadPlayerLibraries=O.prototype.yq;var uq=null,pq=_.y("cast.framework.Application");var wq=_.y("cast.framework.RemoteMedia");yq.prototype.B=function(a){a.data&&a.data.type?this.j.dispatchEvent(a.data):_.z(wq,"Bad message on remote control channel"+JSON.stringify(a))};yq.prototype.addEventListener=function(a,b){this.j.addEventListener(a,b)};yq.prototype.removeEventListener=function(a,b){this.j.removeEventListener(a,b)};var ot=new yq;cast.A.Kf=yq;cast.A.Kf.K=function(){return ot};cast.A.Cu={}; Cq.prototype.Fp=function(){var a=this,b,c,d,e;return Aa(function(f){if(f.g==1)return qa(f,Eq(a),2);if(f.g!=3){b=new Map;var g=a.g.Pc();b.set("castAppId",g?g.id:"");g=a.g.Pc();b.set("sessionId",String(g?g.sessionId:0));c=a.g.Rc()||new ii;b.set("systemAudioVolumeLevel",String(c.level));b.set("systemAudioMuteStatus",String(c.muted));d=(g=a.g.l.g)?Gl(g):new Di;b.set("mediaAudioVolumeLevel",String(d.level));b.set("mediaAudioMuteStatus",String(d.muted));b.set("playerType",Dq(a));g=b;var k=g.set,l;a:{if(l= a.g.l.g)switch(l.g&&l.g.wb()||0){case cast.A.common.F.Xa.Lf:l=l.g&&l.g.getPlayerVersion()||"";break a}l=""}k.call(g,"playerVersion",l);return qa(f,a.g.l.pa,3)}e=f.j;b.set("lastUserEngagementTimestamp",String(e));C(cast.A.common.F.H.Ik);return f.return(b)})};_.w("cast.framework.pal.SignalCollector",Cq);Cq.getInstance=function(){pt||(pt=new Cq(new Aq));return pt};Cq.prototype.getCafSignals=Cq.prototype.Fp;var pt=null,Bq=_.y("cast.framework.SignalCollector");cast.A.ya.category={};cast.A.ya.category.Zm="REQUEST_GET_STATUS REQUEST_SEEK REQUEST_LOAD REQUEST_PRELOAD REQUEST_STOP REQUEST_PAUSE REQUEST_PLAY REQUEST_PLAY_AGAIN REQUEST_PLAYBACK_RATE_CHANGE REQUEST_VOLUME_CHANGE REQUEST_EDIT_TRACKS_INFO REQUEST_EDIT_AUDIO_TRACKS REQUEST_SET_CREDENTIALS REQUEST_SKIP_AD REQUEST_LOAD_BY_ENTITY REQUEST_USER_ACTION REQUEST_DISPLAY_STATUS REQUEST_CUSTOM_COMMAND REQUEST_STORE_SESSION REQUEST_RESUME_SESSION REQUEST_FOCUS_STATE REQUEST_QUEUE_LOAD REQUEST_QUEUE_INSERT REQUEST_QUEUE_UPDATE REQUEST_QUEUE_REMOVE REQUEST_QUEUE_REORDER REQUEST_QUEUE_GET_ITEM_RANGE REQUEST_QUEUE_GET_ITEMS REQUEST_QUEUE_GET_ITEM_IDS".split(" "); _.w("cast.framework.events.category.REQUEST",cast.A.ya.category.Zm);cast.A.ya.category.mk="REQUEST_GET_STATUS REQUEST_SEEK REQUEST_LOAD REQUEST_PRELOAD REQUEST_STOP REQUEST_PAUSE REQUEST_PLAY REQUEST_PLAY_AGAIN REQUEST_PLAYBACK_RATE_CHANGE REQUEST_SKIP_AD REQUEST_VOLUME_CHANGE REQUEST_EDIT_TRACKS_INFO REQUEST_EDIT_AUDIO_TRACKS REQUEST_SET_CREDENTIALS REQUEST_LOAD_BY_ENTITY REQUEST_USER_ACTION REQUEST_DISPLAY_STATUS REQUEST_CUSTOM_COMMAND REQUEST_STORE_SESSION REQUEST_RESUME_SESSION REQUEST_FOCUS_STATE REQUEST_QUEUE_LOAD REQUEST_QUEUE_INSERT REQUEST_QUEUE_UPDATE REQUEST_QUEUE_REMOVE REQUEST_QUEUE_REORDER REQUEST_QUEUE_GET_ITEM_RANGE REQUEST_QUEUE_GET_ITEMS REQUEST_QUEUE_GET_ITEM_IDS BREAK_ENDED BREAK_STARTED BREAK_CLIP_ENDED BREAK_CLIP_LOADING BREAK_CLIP_STARTED BUFFERING ERROR LIVE_ENDED LIVE_IS_MOVING_WINDOW_CHANGED MEDIA_FINISHED MEDIA_STATUS CUSTOM_STATE MEDIA_INFORMATION_CHANGED PAUSE PLAYER_LOADING PLAYER_LOAD_COMPLETE PLAYER_PRELOADING PLAYER_PRELOADING_CANCELLED PLAYING RATE_CHANGE TIME_DRIFTED TRACKS_CHANGED SEEKED SEEKING".split(" "); _.w("cast.framework.events.category.CORE",cast.A.ya.category.mk);cast.A.ya.category.DEBUG="ABORT BITRATE_CHANGED CAN_PLAY CAN_PLAY_THROUGH CLIP_STARTED CLIP_ENDED CACHE_LOADED CACHE_HIT CACHE_INSERTED DURATION_CHANGE EMPTIED EMSG ENDED ID3 LOADED_DATA LOADED_METADATA LOAD_START PLAY STALLED INBAND_TRACK_ADDED WAITING TIMED_METADATA_CHANGED TIMED_METADATA_ENTER TIMED_METADATA_EXIT".split(" ");_.w("cast.framework.events.category.DEBUG",cast.A.ya.category.DEBUG); cast.A.ya.category.Gk=["SEGMENT_DOWNLOADED","PROGRESS","SUSPEND","TIME_UPDATE"];_.w("cast.framework.events.category.FINE",cast.A.ya.category.Gk);_.w("cast.framework.ui.BrowseContent",function(a,b){this.title=b;this.items=a;this.targetAspectRatio=void 0});_.w("cast.framework.ui.BrowseItem",function(a,b,c,d){this.entity=a;this.title=b;this.subtitle=c;this.image=d;this.mediaBadge=this.imageType=this.duration=void 0}); _.w("cast.framework.ui.BrowseImageType",{MUSIC_TRACK:"MUSIC_TRACK",MUSIC_ALBUM:"MUSIC_ALBUM",ARTIST:"ARTIST",PLAYLIST:"PLAYLIST",EPISODE:"EPISODE",MOVIE:"MOVIE",PHOTO:"PHOTO",PODCAST:"PODCAST",MUSIC_GENRE:"MUSIC_GENRE",AUDIO_BOOK:"AUDIO_BOOK",RADIO_STATION:"RADIO_STATION",MUSIC_MIX:"MUSIC_MIX",VIDEO:"VIDEO",TV_SHOW:"TV_SHOW",NEWS:"NEWS"});_.w("cast.framework.ui.BrowseImageAspectRatio",{SQUARE_1_TO_1:"SQUARE_1_TO_1",PORTRAIT_2_TO_3:"PORTRAIT_2_TO_3",LANDSCAPE_16_TO_9:"LANDSCAPE_16_TO_9"}); _.w("cast.framework.ui.BrowseMediaBadge",{LIVE:"LIVE"});_.h=Hq.prototype;_.h.assignButton=function(a,b){this.g.assignButton(a,b)};_.h.setBrowseContent=function(a){var b=this;ug(this.g,function(){b.g.g.setBrowseContent(a)})};_.h.setTopRightVideoOverlayImageElement=function(a){var b=this;ug(this.g,function(){b.g.g.setTopRightVideoOverlayImageElement(a)})};_.h.clearDefaultSlotAssignments=function(){this.g.clearDefaultSlotAssignments()};_.h.ks=function(){C(cast.A.common.F.H.fn)};_.h.Wr=function(a){var b=this;Fb(cast.A.common.F.H.dn,a);ug(this.g,function(){b.g.g.setDeviceControllerVisibility(a)})}; _.h.getSafeAreaHeight=function(){C(cast.A.common.F.H.Jk);return this.g.getSafeAreaHeight()};_.h.wg=function(){return this.g.wg()};_.h.ns=function(){_.ue.K().xf()};_.h.dispose=function(){this.g.dispose()};_.w("cast.framework.ui.Controls",Hq);Hq.prototype.showOutputSwitcher=Hq.prototype.ns;Hq.prototype.hasMediaControlsOverlay=Hq.prototype.wg;Hq.prototype.getSafeAreaHeight=Hq.prototype.getSafeAreaHeight;Hq.prototype.setDcVisibility=Hq.prototype.Wr;Hq.prototype.setScrubberVisibility=Hq.prototype.ks; Hq.prototype.clearDefaultSlotAssignments=Hq.prototype.clearDefaultSlotAssignments;Hq.prototype.setBrowseContent=Hq.prototype.setBrowseContent;Hq.prototype.assignButton=Hq.prototype.assignButton;Ja(Hq);Hq.K();Hq.getInstance=Hq.K;_.w("cast.framework.ui.ControlsButton",{QUEUE_NEXT:"queue-next",QUEUE_PREV:"queue-prev",SEEK_FORWARD_10:"seek-forward-10",SEEK_FORWARD_15:"seek-forward-15",SEEK_FORWARD_30:"seek-forward-30",SEEK_BACKWARD_10:"seek-backward-10",SEEK_BACKWARD_15:"seek-backward-15",SEEK_BACKWARD_30:"seek-backward-30",CAPTIONS:"captions",NO_BUTTON:"no-button",REPEAT:"repeat",SHUFFLE:"shuffle",LIKE:"like",LIKE_HEART:"like-heart",DISLIKE:"dislike",LYRICS:"lyrics",SLEEP_TIMER:"sleep-timer"});_.w("cast.framework.ui.ControlsSlot",{SLOT_1:"slot-1",SLOT_2:"slot-2",SLOT_3:"slot-3",SLOT_4:"slot-4",SLOT_PRIMARY_1:"slot-primary-1",SLOT_PRIMARY_2:"slot-primary-2",SLOT_SECONDARY_1:"slot-secondary-1",SLOT_SECONDARY_2:"slot-secondary-2"});_.w("cast.framework.ui.State",{LAUNCHING:"launching",IDLE:"idle",LOADING:"loading",BUFFERING:"buffering",PAUSED:"paused",PLAYING:"playing"});_.w("cast.framework.ui.ContentType",{VIDEO:"video",AUDIO:"audio",IMAGE:"image"});_.w("cast.framework.ui.DisplayType",{TV:"tv",TOUCH:"touch"});_.w("cast.framework.ui.ApplicationData",Iq);_.w("cast.framework.ui.PlayerData",_.Jq);cast.A.U.aa="Changed";_.qt="applicationData"+cast.A.U.aa;_.rt="state"+cast.A.U.aa;_.st="duration"+cast.A.U.aa;_.tt="currentTime"+cast.A.U.aa; _.ut="metadata"+cast.A.U.aa;_.vt="media"+cast.A.U.aa;_.wt="queueData"+cast.A.U.aa;_.xt="thumbnailUrl"+cast.A.U.aa;_.yt="secondaryImageUrl"+cast.A.U.aa;_.zt="nextMetadata"+cast.A.U.aa;_.At="mediaCategory"+cast.A.U.aa;_.Bt="supportedMediaCommands"+cast.A.U.aa;_.Ct="isLive"+cast.A.U.aa;_.Dt="isAtLiveEdge"+cast.A.U.aa;_.Et="breakPercentagePositions"+cast.A.U.aa;_.Ft="isPlayingBreak"+cast.A.U.aa;_.Gt="whenSkippable"+cast.A.U.aa;_.Ht="numberBreakClips"+cast.A.U.aa;_.It="currentBreakClipNumber"+cast.A.U.aa; _.Jt="displayStatus"+cast.A.U.aa;_.tr="liveSeekableRange"+cast.A.U.aa;_.Kt="mediaStartAbsoluteTime"+cast.A.U.aa;_.Lt="sectionStartTimeInMedia"+cast.A.U.aa;_.Mt="sectionDuration"+cast.A.U.aa; _.w("cast.framework.ui.PlayerDataEventType",{ANY_CHANGE:"*",APPLICATION_DATA_CHANGED:_.qt,STATE_CHANGED:_.rt,IS_SEEKING_CHANGED:"isSeeking"+cast.A.U.aa,DURATION_CHANGED:_.st,CURRENT_TIME_CHANGED:_.tt,PLAYBACK_RATE_CHANGED:"playbackRate"+cast.A.U.aa,METADATA_CHANGED:_.ut,MEDIA_SESSION_ID_CHANGED:"mediaSessionId"+cast.A.U.aa,MEDIA_CHANGED:_.vt,QUEUE_DATA_CHANGED:_.wt,TITLE_CHANGED:"title"+cast.A.U.aa,SUBTITLE_CHANGED:"subtitle"+cast.A.U.aa,THUMBNAIL_URL_CHANGED:_.xt,SECONDARY_IMAGE_URL_CHANGED:_.yt, NEXT_TITLE_CHANGED:"nextTitle"+cast.A.U.aa,NEXT_SUBTITLE_CHANGED:"nextSubtitle"+cast.A.U.aa,NEXT_THUMBNAIL_URL_CHANGED:"nextThumbnailUrl"+cast.A.U.aa,NEXT_METADATA_CHANGED:_.zt,PRELOADING_NEXT_CHANGED:"preloadingNext"+cast.A.U.aa,CONTENT_TYPE_CHANGED:"contentType"+cast.A.U.aa,MEDIA_CATEGORY_CHANGED:_.At,SUPPORTED_MEDIA_COMMANDS_CHANGED:_.Bt,IS_LIVE_CHANGED:_.Ct,IS_AT_LIVE_EDGE_CHANGED:_.Dt,BREAK_PERCENTAGE_POSITIONS_CHANGED:_.Et,IS_PLAYING_BREAK_CHANGED:_.Ft,IS_BREAK_SKIPPABLE_CHANGED:"isBreakSkippable"+ cast.A.U.aa,WHEN_SKIPPABLE_CHANGED:_.Gt,NUMBER_BREAK_CLIPS_CHANGED:_.Ht,CURRENT_BREAK_CLIP_NUMBER_CHANGED:_.It,BREAK_TITLE_CHANGED:"breakTitle"+cast.A.U.aa,DISPLAY_STATUS_CHANGED:_.Jt,DISPLAY_TYPE_CHANGED:"displayType"+cast.A.U.aa,LIVE_SEEKABLE_RANGE_CHANGED:_.tr,MEDIA_START_ABSOLUTE_TIME_CHANGED:_.Kt,SECTION_START_TIME_IN_MEDIA_CHANGED:_.Lt,SECTION_DURATION_CHANGED:_.Mt,PRESENTATION_CHANGED:"presentation"+cast.A.U.aa,CUSTOM_STATE_CHANGED:"customState"+cast.A.U.aa,ACTIVE_TRACK_IDS_CHANGED:"activeTrackIds"+ cast.A.U.aa});_.w("cast.framework.ui.PlayerDataChangedEvent",Kq);var qr=_.y("cast.framework.ui.PlaybackTimeTracker");_.r(Lq,_.E);Lq.prototype.dispose=function(){_.E.prototype.dispose.call(this);clearInterval(this.o)};_.Rq.prototype.addEventListener=function(a,b){this.I.addEventListener(a,b)};_.Rq.prototype.removeEventListener=function(a,b){this.I.removeEventListener(a,b)};_.Rq.prototype.Pp=function(){return this.g};_.w("cast.framework.ui.PlayerDataBinder",_.Rq);_.Rq.prototype.getPlayerData=_.Rq.prototype.Pp;_.Rq.prototype.removeEventListener=_.Rq.prototype.removeEventListener;_.Rq.prototype.addEventListener=_.Rq.prototype.addEventListener;var ur=new _.Jq;new _.Rq(ur);var br=_.y("cast.framework.ui.PlayerDataBinder");vr.prototype.start=function(){var a=this;this.g=xr(this);this.g.length>0&&C(cast.A.common.F.H.Un);this.g.length<2||(this.B=zr(this,"--animation-duration"),this.D=Math.max(zr(this,"--interval-duration"),this.B),this.D>0&&(this.C=setInterval(function(){return a.next()},this.D)))};vr.prototype.stop=function(){clearInterval(this.C);this.C=void 0;clearInterval(this.I);this.I=void 0;for(var a=_.q(this.g),b=a.next();!b.done;b=a.next())b.value.classList.remove("visible","top");this.l=void 0}; vr.prototype.next=function(){this.o=this.l;this.l=this.l===void 0?0:(this.l+1)%this.g.length;this.g[this.l].classList.add("top","visible");this.o!==void 0&&this.g[this.o].classList.remove("top");wr(this)};var yr=_.y("cast.framework.ui.SlideshowManager");cast.A.U.ko=vr;_.r(Ar,_.Wh);_.h=Ar.prototype; _.h.createdCallback=function(){var a=this;(0,cast.A.qk)(this.attachShadow?this.attachShadow({mode:"open"}):this.createShadowRoot());this.B=this.shadowRoot.getElementById("castPlayer");this.o=this.shadowRoot.getElementById("castMediaElement");this.C=this.l=null;this.g=new _.Jq;this.I=new _.Rq(this.g);this.D=this.j=null;Cr(this,_.qt,function(){var b=a.g.applicationData;if(b){var c=a.shadowRoot.getElementById("logo"),d=window.getComputedStyle(c,null),e=a.shadowRoot.getElementById("splash"),f=window.getComputedStyle(e, null);d.backgroundImage==="none"&&(c.textContent=b.name);f.backgroundImage==="none"&&(d.backgroundImage==="none"?e.textContent=b.name:e.classList.add("logo"))}});Cr(this,_.ut,function(){var b=a.g.metadata&&a.g.metadata.posterUrl||"";b?a.o.poster=b:a.o.removeAttribute("poster")});Cr(this,_.rt,function(){if(a.l){var b=a.l,c=a.g.state;b.stop();c==="idle"?(b.j.classList.add("active"),b.start()):b.j.classList.remove("active")}if(a.C!=="loading"||a.g.state!=="buffering")a.C=a.g.state,a.B.dataset.state= a.g.state});Cr(this,_.At,function(){a.B.dataset.mediaCategory=a.g.mediaCategory||"VIDEO"});Br(this)};_.h.connectedCallback=function(){Xe()||this.hasAttribute("crossorigin")&&this.getAttribute("crossorigin")!==""&&this.getMediaElement().setAttribute("crossorigin",this.getAttribute("crossorigin"));var a=this.shadowRoot.getElementById("castSlideshowElement");this.l=new cast.A.U.ko(a);this.g.state==="idle"&&this.l.start()}; _.h.attributeChangedCallback=function(a,b,c){Xe()&&a==="crossorigin"&&(c===null?this.getMediaElement().removeAttribute("crossorigin"):this.getMediaElement().setAttribute("crossorigin",c))};_.h.attachedCallback=function(){var a=this;Ar.observedAttributes.forEach(function(b){a.attributeChangedCallback(b,null,a.getAttribute(b))});this.connectedCallback()};_.h.getMediaElement=function(){return this.o};_.h.setTopRightVideoOverlayImageElement=function(a){this.D=a;this.j&&this.j.setTopRightVideoOverlayImageElement(a)}; ca.Object.defineProperties(Ar,{observedAttributes:{configurable:!0,enumerable:!0,get:function(){return["crossorigin"]}}});Ar.prototype.getMediaElement=Ar.prototype.getMediaElement;window.customElements&&window.customElements.define?window.customElements.define("cast-media-player",Ar):document.registerElement("cast-media-player",{prototype:Ar.prototype});cast.A.U.nt=Ar;_.w("cast.framework.ui.SecondaryImagePosition",{TOP_RIGHT_VIDEO_OVERLAY:"TOP_RIGHT_VIDEO_OVERLAY"});Dr.prototype.ls=function(a,b){Hq.K().setTopRightVideoOverlayImageElement(null);this.g&&this.g.setTopRightVideoOverlayImageElement(null);switch(a){case "TOP_RIGHT_VIDEO_OVERLAY":Hq.K().setTopRightVideoOverlayImageElement(b),this.g&&this.g.setTopRightVideoOverlayImageElement(b),cast.A.common.F.Xi(cast.A.common.F.ai.TOP_RIGHT_VIDEO_OVERLAY)}};_.w("cast.framework.ui.UiManager",Dr);Dr.prototype.setSecondaryImage=Dr.prototype.ls;Ja(Dr);Dr.getInstance=Dr.K;_.w("cast.framework.LoggerLevel",{DEBUG:0,VERBOSE:500,INFO:800,WARNING:900,ERROR:1E3,NONE:1500});_.h=Er.prototype;_.h.initialize=function(){return null};_.h.onCurrentItemIdChanged=function(){};_.h.nextItems=function(){return[]};_.h.prevItems=function(){return[]};_.h.fetchItems=function(){return[]};_.h.onItemsInserted=function(){};_.h.onItemsRemoved=function(){};_.h.onItemsReordered=function(){};_.h.shuffle=function(){return null};_.h.Pd=function(){return null};_.w("cast.framework.QueueBase",Er);Er.prototype.unshuffle=Er.prototype.Pd;Er.prototype.shuffle=Er.prototype.shuffle; Er.prototype.onItemsReordered=Er.prototype.onItemsReordered;Er.prototype.onItemsRemoved=Er.prototype.onItemsRemoved;Er.prototype.onItemsInserted=Er.prototype.onItemsInserted;Er.prototype.fetchItems=Er.prototype.fetchItems;Er.prototype.prevItems=Er.prototype.prevItems;Er.prototype.nextItems=Er.prototype.nextItems;Er.prototype.onCurrentItemIdChanged=Er.prototype.onCurrentItemIdChanged;Er.prototype.initialize=Er.prototype.initialize;})();