(function(){var g,ba=ba||{},m=this;function n(a){return void 0!==a}function p(a,b,c){a=a.split(".");c=c||m;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&n(b)?c[d]=b:c[d]?c=c[d]:c=c[d]={}}function q(a,b){for(var c=a.split("."),d=b||m,e;e=c.shift();)if(null!=d[e])d=d[e];else return null;return d}function t(){}function ca(a){a.getInstance=function(){return a.Q?a.Q:a.Q=new a}}
function da(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ea(a){return"array"==da(a)}function fa(a){var b=da(a);return"array"==b||"object"==b&&"number"==typeof a.length}function u(a){return"string"==typeof a}function ga(a){return"number"==typeof a}function ha(a){return"function"==da(a)}function ia(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ja(a){return a[ka]||(a[ka]=++ma)}var ka="closure_uid_"+(1E9*Math.random()>>>0),ma=0;
function na(a,b,c){return a.call.apply(a.bind,arguments)}function oa(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function v(a,b,c){v=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?na:oa;return v.apply(null,arguments)}
function pa(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}}var w=Date.now||function(){return+new Date};function x(a,b){function c(){}c.prototype=b.prototype;a.G=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.base=function(a,c,f){for(var h=Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return b.prototype[c].apply(a,h)}}
Function.prototype.bind=Function.prototype.bind||function(a,b){if(1<arguments.length){var c=Array.prototype.slice.call(arguments,1);c.unshift(this,a);return v.apply(null,c)}return v(this,a)};function qa(a){if(Error.captureStackTrace)Error.captureStackTrace(this,qa);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}x(qa,Error);qa.prototype.name="CustomError";var ra;function sa(a){var b=a.length-5;return 0<=b&&a.indexOf("_html",b)==b}var ta=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};function ua(a){return decodeURIComponent(a.replace(/\+/g," "))}
function va(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'},c;c=m.document.createElement("div");return a.replace(wa,function(a,e){var f=b[a];if(f)return f;if("#"==e.charAt(0)){var h=Number("0"+e.substr(1));isNaN(h)||(f=String.fromCharCode(h))}f||(c.innerHTML=a+" ",f=c.firstChild.nodeValue.slice(0,-1));return b[a]=f})}
function xa(a){return a.replace(/&([^;]+);/g,function(a,c){switch(c){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:if("#"==c.charAt(0)){var d=Number("0"+c.substr(1));if(!isNaN(d))return String.fromCharCode(d)}return a}})}var wa=/&([^;\s<&]+);?/g;
function ya(a,b){for(var c=0,d=ta(String(a)).split("."),e=ta(String(b)).split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var k=d[h]||"",l=e[h]||"",r=RegExp("(\\d*)(\\D*)","g"),N=RegExp("(\\d*)(\\D*)","g");do{var aa=r.exec(k)||["","",""],la=N.exec(l)||["","",""];if(0==aa[0].length&&0==la[0].length)break;c=za(0==aa[1].length?0:parseInt(aa[1],10),0==la[1].length?0:parseInt(la[1],10))||za(0==aa[2].length,0==la[2].length)||za(aa[2],la[2])}while(0==c)}return c}
function za(a,b){return a<b?-1:a>b?1:0}function Aa(a){for(var b=0,c=0;c<a.length;++c)b=31*b+a.charCodeAt(c),b%=4294967296;return b};function Ba(){};var y=Array.prototype,Ca=y.indexOf?function(a,b,c){return y.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(u(a))return u(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},z=y.forEach?function(a,b,c){y.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Da=y.filter?function(a,b,c){return y.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,h=u(a)?
a.split(""):a,k=0;k<d;k++)if(k in h){var l=h[k];b.call(c,l,k,a)&&(e[f++]=l)}return e},A=y.map?function(a,b,c){return y.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=u(a)?a.split(""):a,h=0;h<d;h++)h in f&&(e[h]=b.call(c,f[h],h,a));return e},Ea=y.some?function(a,b,c){return y.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return!0;return!1},Fa=y.every?function(a,b,c){return y.every.call(a,b,c)}:function(a,b,c){for(var d=
a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],f,a))return!1;return!0};function Ga(a,b,c){b=Ha(a,b,c);return 0>b?null:u(a)?a.charAt(b):a[b]}function Ha(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return f;return-1}function Ia(a,b){return 0<=Ca(a,b)}function Ja(){var a=Ka;if(!ea(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function La(a,b){Ia(a,b)||a.push(b)}
function Ma(a,b){var c=Ca(a,b),d;(d=0<=c)&&y.splice.call(a,c,1);return d}function Na(a,b){var c=Ha(a,b,void 0);0<=c&&y.splice.call(a,c,1)}function Oa(a){return y.concat.apply(y,arguments)}function Pa(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]}function Qa(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(fa(d)){var e=a.length||0,f=d.length||0;a.length=e+f;for(var h=0;h<f;h++)a[e+h]=d[h]}else a.push(d)}}
function Ra(a,b,c,d){return y.splice.apply(a,Sa(arguments,1))}function Sa(a,b,c){return 2>=arguments.length?y.slice.call(a,b):y.slice.call(a,b,c)}function Ta(a,b,c){if(!fa(a)||!fa(b)||a.length!=b.length)return!1;var d=a.length;c=c||Ua;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0}function Va(a,b){return a>b?1:a<b?-1:0}function Ua(a,b){return a===b};function Wa(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function Xa(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d}function Ya(a){var b=0,c;for(c in a)b++;return b}function Za(a,b){return $a(a,b)}function ab(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function bb(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function $a(a,b){for(var c in a)if(a[c]==b)return!0;return!1}function cb(a){var b=db,c;for(c in b)if(a.call(void 0,b[c],c,b))return c}
function eb(a){for(var b in a)return!1;return!0}function fb(a,b){if(b in a)throw Error('The object already contains the key "'+b+'"');a[b]=!0}function gb(a){var b={},c;for(c in a)b[c]=a[c];return b}function hb(a){var b=da(a);if("object"==b||"array"==b){if(a.clone)return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=hb(a[c]);return b}return a}var ib="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
function jb(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<ib.length;f++)c=ib[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}}function kb(a){var b=arguments.length;if(1==b&&ea(arguments[0]))return kb.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=!0;return c};kb("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));function lb(){this.e=""}lb.prototype.Tb=!0;lb.prototype.Ob=function(){return this.e};lb.prototype.toString=function(){return"Const{"+this.e+"}"};function mb(){var a=new lb;a.e="HTML that is escaped and sanitized server-side and passed through yt.net.ajax";return a};function nb(){this.e="";this.f=ob}nb.prototype.Tb=!0;nb.prototype.Ob=function(){return this.e};function pb(a){return a instanceof nb&&a.constructor===nb&&a.f===ob?a.e:"type_error:SafeUrl"}var qb=/^(?:(?:https?|mailto|ftp):|[^&:/?#]*(?:[/?#]|$))/i;function rb(a){if(a instanceof nb)return a;a=a.Tb?a.Ob():String(a);a=qb.test(a)?sb(a):"about:invalid#zClosurez";var b=new nb;b.e=a;return b}
function sb(a){try{var b=encodeURI(a)}catch(c){return"about:invalid#zClosurez"}return b.replace(tb,function(a){return ub[a]})}var tb=/[()']|%5B|%5D|%25/g,ub={"'":"%27","(":"%28",")":"%29","%5B":"[","%5D":"]","%25":"%"},ob={};function vb(){this.e="";this.f=null}vb.prototype.Tb=!0;vb.prototype.Ob=function(){return this.e};function wb(a,b){var c=new vb;c.e=a;c.f=b;return c}wb("<!DOCTYPE html>",0);wb("",0);function xb(a,b){var c;c=b instanceof nb?b:rb(b);a.href=pb(c)};function yb(a,b,c){a&&(a.dataset?a.dataset[zb(b)]=c:a.setAttribute("data-"+b,c))}function B(a,b){return a?a.dataset?a.dataset[zb(b)]:a.getAttribute("data-"+b):null}var Ab={};function zb(a){return Ab[a]||(Ab[a]=String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()}))};function C(){this.Ha=this.Ha;this.la=this.la}C.prototype.Ha=!1;C.prototype.F=function(){return this.Ha};C.prototype.dispose=function(){this.Ha||(this.Ha=!0,this.C())};function Bb(a,b){a.Ha?b.call(void 0):(a.la||(a.la=[]),a.la.push(n(void 0)?v(b,void 0):b))}C.prototype.C=function(){if(this.la)for(;this.la.length;)this.la.shift()()};function Cb(a){a&&"function"==typeof a.dispose&&a.dispose()}function Db(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];fa(d)?Db.apply(null,d):Cb(d)}};function D(){C.call(this);this.j=1;this.f=[];this.h=0;this.e=[];this.aa={}}x(D,C);g=D.prototype;g.subscribe=function(a,b,c){var d=this.aa[a];d||(d=this.aa[a]=[]);var e=this.j;this.e[e]=a;this.e[e+1]=b;this.e[e+2]=c;this.j=e+3;d.push(e);return e};g.Ga=function(a,b,c){if(a=this.aa[a]){var d=this.e;if(a=Ga(a,function(a){return d[a+1]==b&&d[a+2]==c}))return this.ka(a)}return!1};
g.ka=function(a){if(0!=this.h)return this.f.push(a),!1;var b=this.e[a];if(b){var c=this.aa[b];c&&Ma(c,a);delete this.e[a];delete this.e[a+1];delete this.e[a+2]}return!!b};g.A=function(a,b){var c=this.aa[a];if(c){this.h++;for(var d=Array(arguments.length-1),e=1,f=arguments.length;e<f;e++)d[e-1]=arguments[e];e=0;for(f=c.length;e<f;e++){var h=c[e];this.e[h+1].apply(this.e[h+2],d)}this.h--;if(0<this.f.length&&0==this.h)for(;c=this.f.pop();)this.ka(c);return 0!=e}return!1};
g.clear=function(a){if(a){var b=this.aa[a];b&&(z(b,this.ka,this),delete this.aa[a])}else this.e.length=0,this.aa={}};g.U=function(a){if(a){var b=this.aa[a];return b?b.length:0}a=0;for(b in this.aa)a+=this.U(b);return a};g.C=function(){D.G.C.call(this);this.clear();this.f.length=0};var Eb=window.yt&&window.yt.config_||window.ytcfg&&window.ytcfg.data_||{};p("yt.config_",Eb,void 0);p("yt.tokens_",window.yt&&window.yt.tokens_||{},void 0);var Fb=window.yt&&window.yt.msgs_||{};p("yt.msgs_",Fb,void 0);function Gb(a){Hb(Eb,arguments)}function E(a,b){return a in Eb?Eb[a]:b}function F(a,b){ha(a)&&(a=Ib(a));return window.setTimeout(a,b)}function Jb(a,b){ha(a)&&(a=Ib(a));window.setInterval(a,b)}function G(a){window.clearTimeout(a)}
function Ib(a){return a&&window.yterr?function(){try{return a.apply(this,arguments)}catch(b){throw Kb(b),b;}}:a}function Kb(a,b){var c=q("yt.www.errors.log");c?c(a,b):(c=E("ERRORS")||[],c.push([a,b]),Gb("ERRORS",c))}
function Lb(){var a={},b="FLASH_UPGRADE"in Fb?Fb.FLASH_UPGRADE:'You need to upgrade your Adobe Flash Player to watchthis video. <br> <a href="http://get.adobe.com/flashplayer/">Download it from Adobe.</a>';if(b)for(var c in a)b=b.replace(new RegExp("\\$"+c,"gi"),function(){return a[c]});return b}function Hb(a,b){if(1<b.length){var c=b[0];a[c]=b[1]}else{var d=b[0];for(c in d)a[c]=d[c]}}var Mb="Microsoft Internet Explorer"==navigator.appName;var Nb=q("yt.pubsub.instance_")||new D;D.prototype.subscribe=D.prototype.subscribe;D.prototype.unsubscribeByKey=D.prototype.ka;D.prototype.publish=D.prototype.A;D.prototype.clear=D.prototype.clear;p("yt.pubsub.instance_",Nb,void 0);var Ob=q("yt.pubsub.subscribedKeys_")||{};p("yt.pubsub.subscribedKeys_",Ob,void 0);var Pb=q("yt.pubsub.topicToKeys_")||{};p("yt.pubsub.topicToKeys_",Pb,void 0);var Qb=q("yt.pubsub.isSynchronous_")||{};p("yt.pubsub.isSynchronous_",Qb,void 0);
var Rb=q("yt.pubsub.skipSubId_")||null;p("yt.pubsub.skipSubId_",Rb,void 0);function H(a,b,c){var d=Sb();if(d){var e=d.subscribe(a,function(){if(!Rb||Rb!=e){var d=arguments,h=function(){Ob[e]&&b.apply(c||window,d)};try{Qb[a]?h():F(h,0)}catch(k){Kb(k)}}},c);Ob[e]=!0;Pb[a]||(Pb[a]=[]);Pb[a].push(e);return e}return 0}function Tb(a){var b=Sb();b&&("number"==typeof a?a=[a]:"string"==typeof a&&(a=[parseInt(a,10)]),z(a,function(a){b.unsubscribeByKey(a);delete Ob[a]}))}
function I(a,b){var c=Sb();return c?c.publish.apply(c,arguments):!1}function Ub(a,b){Qb[a]=!0;var c=Sb();c&&c.publish.apply(c,arguments);Qb[a]=!1}function Vb(a){Pb[a]&&(a=Pb[a],z(a,function(a){Ob[a]&&delete Ob[a]}),a.length=0)}function Wb(a){var b=Sb();if(b)if(b.clear(a),a)Vb(a);else for(var c in Pb)Vb(c)}function Sb(){return q("yt.pubsub.instance_")};function Xb(a,b){if(window.spf){var c="";if(a){var d=a.indexOf("jsbin/"),e=a.lastIndexOf(".js"),f=d+6;-1<d&&-1<e&&e>f&&(c=a.substring(f,e),c=c.replace(Yb,""),c=c.replace(Zb,""),c=c.replace("debug-",""),c=c.replace("tracing-",""))}spf.script.load(a,c,b)}else $b(a,b)}function $b(a,b){var c=ac(a),d=document.getElementById(c),e=d&&B(d,"loaded"),f=d&&!e;if(e)b&&b();else{if(b){var e=H(c,b),h=""+ja(b);bc[h]=e}f||(d=cc(a,c,function(){B(d,"loaded")||(yb(d,"loaded","true"),I(c),F(pa(Wb,c),0))}))}}
function cc(a,b,c){var d=document.createElement("script");d.id=b;d.onload=function(){c&&setTimeout(c,0)};d.onreadystatechange=function(){switch(d.readyState){case "loaded":case "complete":d.onload()}};d.src=a;a=document.getElementsByTagName("head")[0]||document.body;a.insertBefore(d,a.firstChild);return d}function ac(a){var b=document.createElement("a");xb(b,a);a=b.href.replace(/^[a-zA-Z]+:\/\//,"//");return"js-"+Aa(a)}
var Yb=/\.vflset|-vfl[a-zA-Z0-9_+=-]+/,Zb=/-[a-zA-Z]{2,3}_[a-zA-Z]{2,3}(?=(\/|$))/,bc={};var dc=null;function ec(){var a=E("BG_I",null),b=E("BG_IU",null),c=E("BG_P");b?Xb(b,function(){dc=new botguard.bg(c)}):a&&(eval(a),dc=new botguard.bg(c))}function fc(){return null!=dc}function gc(){return dc?dc.invoke():null};function hc(a){if(a.classList)return a.classList;a=a.className;return u(a)&&a.match(/\S+/g)||[]}function ic(a,b){return a.classList?a.classList.contains(b):Ia(hc(a),b)}function jc(a,b){a.classList?a.classList.add(b):ic(a,b)||(a.className+=0<a.className.length?" "+b:b)}function kc(a,b){a.classList?a.classList.remove(b):ic(a,b)&&(a.className=Da(hc(a),function(a){return a!=b}).join(" "))}function lc(a,b,c){c?jc(a,b):kc(a,b)};function mc(a,b){this.x=n(a)?a:0;this.y=n(b)?b:0}mc.prototype.clone=function(){return new mc(this.x,this.y)};mc.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};mc.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function nc(a,b){this.width=a;this.height=b}nc.prototype.clone=function(){return new nc(this.width,this.height)};nc.prototype.isEmpty=function(){return!(this.width*this.height)};nc.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};nc.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};var oc;a:{var pc=m.navigator;if(pc){var qc=pc.userAgent;if(qc){oc=qc;break a}}oc=""}function J(a){return-1!=oc.indexOf(a)};function rc(){return J("Opera")||J("OPR")}function sc(){return J("Edge")||J("Trident")||J("MSIE")}function tc(){return(J("Chrome")||J("CriOS"))&&!rc()&&!sc()};function uc(){return J("Edge")};function vc(){return J("iPhone")&&!J("iPod")&&!J("iPad")};var wc=rc(),K=sc(),xc=J("Gecko")&&!(-1!=oc.toLowerCase().indexOf("webkit")&&!uc())&&!(J("Trident")||J("MSIE"))&&!uc(),yc=-1!=oc.toLowerCase().indexOf("webkit")&&!uc(),zc=J("Macintosh"),Ac=J("Windows");function Bc(){var a=oc;if(xc)return/rv\:([^\);]+)(\)|;)/.exec(a);if(K&&uc())return/Edge\/([\d\.]+)/.exec(a);if(K)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(yc)return/WebKit\/(\S+)/.exec(a)}function Cc(){var a=m.document;return a?a.documentMode:void 0}
var Dc=function(){if(wc&&m.opera){var a=m.opera.version;return ha(a)?a():a}var a="",b=Bc();b&&(a=b?b[1]:"");return K&&!uc()&&(b=Cc(),b>parseFloat(a))?String(b):a}(),Ec={};function Fc(a){return Ec[a]||(Ec[a]=0<=ya(Dc,a))}function Gc(a){return K&&(uc()||Hc>=a)}var Ic=m.document,Jc=Cc(),Hc=!Ic||!K||!Jc&&uc()?void 0:Jc||("CSS1Compat"==Ic.compatMode?parseInt(Dc,10):5);!xc&&!K||K&&Gc(9)||xc&&Fc("1.9.1");K&&Fc("9");function Kc(a){return a?new Lc(Mc(a)):ra||(ra=new Lc)}function Nc(a){return u(a)?document.getElementById(a):a}function Oc(a){var b=document;return u(a)?b.getElementById(a):a}function Pc(a){var b=document;return b.querySelectorAll&&b.querySelector?b.querySelectorAll("."+a):Qc(a,void 0)}
function Qc(a,b){var c,d,e,f;c=document;c=b||c;if(c.querySelectorAll&&c.querySelector&&a)return c.querySelectorAll(""+(a?"."+a:""));if(a&&c.getElementsByClassName){var h=c.getElementsByClassName(a);return h}h=c.getElementsByTagName("*");if(a){f={};for(d=e=0;c=h[d];d++){var k=c.className;"function"==typeof k.split&&Ia(k.split(/\s+/),a)&&(f[e++]=c)}f.length=e;return f}return h}
function Rc(a){var b=!yc&&Sc(a)?a.documentElement:a.body||a.documentElement;a=a.parentWindow||a.defaultView;return K&&Fc("10")&&a.pageYOffset!=b.scrollTop?new mc(b.scrollLeft,b.scrollTop):new mc(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function Sc(a){return"CSS1Compat"==a.compatMode}function Tc(a){for(var b;b=a.firstChild;)a.removeChild(b)}function Uc(a){if(!a)return null;if(a.firstChild)return a.firstChild;for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}
function Vc(a){if(!a)return null;if(!a.previousSibling)return a.parentNode;for(a=a.previousSibling;a&&a.lastChild;)a=a.lastChild;return a}function Wc(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}function Mc(a){return 9==a.nodeType?a:a.ownerDocument||a.document}
function Xc(a){var b=Yc.cd;return b?Zc(a,function(a){return!b||u(a.className)&&Ia(a.className.split(/\s+/),b)},!0,void 0):null}function Zc(a,b,c,d){c||(a=a.parentNode);c=null==d;for(var e=0;a&&(c||e<=d);){if(b(a))return a;a=a.parentNode;e++}return null}function Lc(a){this.e=a||m.document||document}Lc.prototype.createElement=function(a){return this.e.createElement(a)};Lc.prototype.appendChild=function(a,b){a.appendChild(b)};Lc.prototype.contains=Wc;var $c=yc?"webkit":xc?"moz":K?"ms":wc?"o":"",ad=q("yt.dom.getNextId_");if(!ad){ad=function(){return++bd};p("yt.dom.getNextId_",ad,void 0);var bd=0}function cd(){var a=document,b;Ea(["fullscreenElement","fullScreenElement"],function(c){c in a?b=a[c]:(c=$c+c.charAt(0).toUpperCase()+c.substr(1),b=c in a?a[c]:void 0);return!!b});return b};function dd(a){if(a=a||window.event){for(var b in a)b in ed||(this[b]=a[b]);this.Eb=a;(b=a.target||a.srcElement)&&3==b.nodeType&&(b=b.parentNode);this.target=b;if(b=a.relatedTarget)try{b=b.nodeName?b:null}catch(c){b=null}else"mouseover"==this.type?b=a.fromElement:"mouseout"==this.type&&(b=a.toElement);this.relatedTarget=b;this.clientX=void 0!=a.clientX?a.clientX:a.pageX;this.clientY=void 0!=a.clientY?a.clientY:a.pageY;this.keyCode=a.keyCode?a.keyCode:a.which;this.charCode=a.charCode||("keypress"==
this.type?this.keyCode:0);this.altKey=a.altKey;this.ctrlKey=a.ctrlKey;this.shiftKey=a.shiftKey;"MozMousePixelScroll"==this.type?(this.wheelDeltaX=a.axis==a.HORIZONTAL_AXIS?a.detail:0,this.wheelDeltaY=a.axis==a.HORIZONTAL_AXIS?0:a.detail):window.opera?(this.wheelDeltaX=0,this.wheelDeltaY=a.detail):0==a.wheelDelta%120?"WebkitTransform"in document.documentElement.style?window.chrome&&0==navigator.platform.indexOf("Mac")?(this.wheelDeltaX=a.wheelDeltaX/-30,this.wheelDeltaY=a.wheelDeltaY/-30):(this.wheelDeltaX=
a.wheelDeltaX/-1.2,this.wheelDeltaY=a.wheelDeltaY/-1.2):(this.wheelDeltaX=0,this.wheelDeltaY=a.wheelDelta/-1.6):(this.wheelDeltaX=a.wheelDeltaX/-3,this.wheelDeltaY=a.wheelDeltaY/-3)}}g=dd.prototype;g.Eb=null;g.type="";g.target=null;g.relatedTarget=null;g.currentTarget=null;g.data=null;g.source=null;g.state=null;g.keyCode=0;g.charCode=0;g.altKey=!1;g.ctrlKey=!1;g.shiftKey=!1;g.clientX=0;g.clientY=0;g.wheelDeltaX=0;g.wheelDeltaY=0;
g.preventDefault=function(){this.Eb.returnValue=!1;this.Eb.preventDefault&&this.Eb.preventDefault()};var ed={stopImmediatePropagation:1,stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,scale:1,rotation:1};var db=q("yt.events.listeners_")||{};p("yt.events.listeners_",db,void 0);var fd=q("yt.events.counter_")||{count:0};p("yt.events.counter_",fd,void 0);function gd(a,b,c,d){return cb(function(e){return e[0]==a&&e[1]==b&&e[2]==c&&e[4]==!!d})}
function L(a,b,c,d){if(!a||!a.addEventListener&&!a.attachEvent)return"";d=!!d;var e=gd(a,b,c,d);if(e)return e;var e=++fd.count+"",f=!("mouseenter"!=b&&"mouseleave"!=b||!a.addEventListener||"onmouseenter"in document),h;h=f?function(d){d=new dd(d);if(!Zc(d.relatedTarget,function(b){return b==a},!0))return d.currentTarget=a,d.type=b,c.call(a,d)}:function(b){b=new dd(b);b.currentTarget=a;return c.call(a,b)};h=Ib(h);db[e]=[a,b,c,h,d];a.addEventListener?"mouseenter"==b&&f?a.addEventListener("mouseover",
h,d):"mouseleave"==b&&f?a.addEventListener("mouseout",h,d):"mousewheel"==b&&"MozBoxSizing"in document.documentElement.style?a.addEventListener("MozMousePixelScroll",h,d):a.addEventListener(b,h,d):a.attachEvent("on"+b,h);return e}function hd(a){a&&("string"==typeof a&&(a=[a]),z(a,function(a){if(a in db){var c=db[a],d=c[0],e=c[1],f=c[3],c=c[4];d.removeEventListener?d.removeEventListener(e,f,c):d.detachEvent&&d.detachEvent("on"+e,f);delete db[a]}}))};function id(a){this.e=a}var jd=/\s*;\s*/;g=id.prototype;g.isEnabled=function(){return navigator.cookieEnabled};function kd(a,b,c,d,e,f){if(/[;=\s]/.test(b))throw Error('Invalid cookie name "'+b+'"');if(/[;\r\n]/.test(c))throw Error('Invalid cookie value "'+c+'"');n(d)||(d=-1);f=f?";domain="+f:"";e=e?";path="+e:"";d=0>d?"":0==d?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(w()+1E3*d)).toUTCString();a.e.cookie=b+"="+c+f+e+d+""}
g.get=function(a,b){for(var c=a+"=",d=(this.e.cookie||"").split(jd),e=0,f;f=d[e];e++){if(0==f.lastIndexOf(c,0))return f.substr(c.length);if(f==a)return""}return b};g.remove=function(a,b,c){var d=n(this.get(a));kd(this,a,"",0,b,c);return d};g.pa=function(){return ld(this).keys};g.W=function(){return ld(this).values};g.isEmpty=function(){return!this.e.cookie};g.U=function(){return this.e.cookie?(this.e.cookie||"").split(jd).length:0};
g.lb=function(a){for(var b=ld(this).values,c=0;c<b.length;c++)if(b[c]==a)return!0;return!1};g.clear=function(){for(var a=ld(this).keys,b=a.length-1;0<=b;b--)this.remove(a[b])};function ld(a){a=(a.e.cookie||"").split(jd);for(var b=[],c=[],d,e,f=0;e=a[f];f++)d=e.indexOf("="),-1==d?(b.push(""),c.push(e)):(b.push(e.substring(0,d)),c.push(e.substring(d+1)));return{keys:b,values:c}}var md=new id(document);md.f=3950;function nd(a,b,c){kd(md,""+a,b,c,"/","youtube.com")}function od(a,b){return md.get(""+a,b)};function pd(a,b){a=!!a;p("_lactCookie",a,window);if(null==q("_lact",window)){if(E("EXP_LACT_TEMPDATA")){var c=parseInt(E("LACT"),10),c=isFinite(c)?w()-Math.max(c,0):-1;p("_lact",c,window);-1==c&&qd()}else a&&b?(c=od("ACTIVITY","-1"),p("_lact",parseInt(c,10),window)):(p("_lact",-1,window),qd());L(document,"keydown",qd);L(document,"keyup",qd);L(document,"mousedown",qd);L(document,"mouseup",qd);E("EXP_LACT_MOUSE")&&H("page-mouse",qd);E("EXP_LACT_SCROLL")&&H("page-scroll",qd);E("EXP_LACT_RESIZE")&&H("page-resize",
qd)}}function qd(){var a=q("_lact",window);null==a&&(pd(),a=q("_lact",window));var b=w();p("_lact",b,window);E("EXP_LACT_TEMPDATA")||q("_lactCookie",window)&&1E3<=b-a&&nd("ACTIVITY",""+b,-1);I("USER_ACTIVE")}function rd(){var a=q("_lact",window);return null==a?-1:Math.max(w()-a,0)};var sd=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function td(a){if(ud){ud=!1;var b=m.location;if(b){var c=b.href;if(c&&(c=vd(c))&&c!=b.hostname)throw ud=!0,Error();}}return a.match(sd)}var ud=yc;function vd(a){return(a=td(a)[3]||null)?decodeURI(a):a}function wd(a,b){for(var c=a.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null,h=null;0<=e?(f=c[d].substring(0,e),h=c[d].substring(e+1)):f=c[d];b(f,h?ua(h):"")}}
function xd(a){if(a[1]){var b=a[0],c=b.indexOf("#");0<=c&&(a.push(b.substr(c)),a[0]=b=b.substr(0,c));c=b.indexOf("?");0>c?a[1]="?":c==b.length-1&&(a[1]=void 0)}return a.join("")}function yd(a,b,c){if(ea(b))for(var d=0;d<b.length;d++)yd(a,String(b[d]),c);else null!=b&&c.push("&",a,""===b?"":"=",encodeURIComponent(String(b)))}function zd(a,b,c){Math.max(b.length-(c||0),0);for(c=c||0;c<b.length;c+=2)yd(b[c],b[c+1],a);return a}function Ad(a,b){for(var c in b)yd(c,b[c],a);return a}
function Bd(a){a=Ad([],a);a[0]="";return a.join("")}function Cd(a,b){return xd(2==arguments.length?zd([a],arguments[1],0):zd([a],arguments,1))}function Dd(a,b){return xd(Ad([a],b))};function Ed(a){"?"==a.charAt(0)&&(a=a.substr(1));a=a.split("&");for(var b={},c=0,d=a.length;c<d;c++){var e=a[c].split("=");if(1==e.length&&e[0]||2==e.length){var f=ua(e[0]||""),e=ua(e[1]||"");f in b?ea(b[f])?Qa(b[f],e):b[f]=[b[f],e]:b[f]=e}}return b}var Fd=vd;function Gd(a,b){var c=a.split("#",2);a=c[0];var c=1<c.length?"#"+c[1]:"",d=a.split("?",2);a=d[0];var d=Ed(d[1]||""),e;for(e in b)d[e]=b[e];return Dd(a,d)+c}
function Hd(a){a=Fd(a);a=null===a?null:a.split(".").reverse();return(null===a?!1:"com"==a[0]&&a[1].match(/^youtube(?:-nocookie)?$/)?!0:!1)||(null===a?!1:"google"==a[1]?!0:"google"==a[2]?"au"==a[0]&&"com"==a[1]?!0:"uk"==a[0]&&"co"==a[1]?!0:!1:!1)};function Id(a,b){var c=vd(a);if(c==vd(window.location.href)||!c&&0==a.lastIndexOf("/",0)){var d=td(a),c=d[5],e=d[6],d=d[7],f="";c&&(f+=c);e&&(f+="?"+e);d&&(f+="#"+d);c=f;e=c.indexOf("#");if(c=0>e?c:c.substr(0,e))c=E("SMALLER_SESSION_TEMPDATA_NAME")?"ST-"+Aa(c).toString(36):"s_tempdata-"+Aa(c),e=b?Bd(b):"",nd(c,e,5)}};function Jd(a,b,c){var d=E("EVENT_ID");d&&(b||(b={}),b.ei||(b.ei=d));b&&Id(a,b);if(c)return!1;(window.ytspf||{}).enabled?spf.navigate(a):(b=window.location,a=Dd(a,{})+"",a=a instanceof nb?a:rb(a),b.href=pb(a));return!0};function Kd(a,b){return wb(b,null)};var Ld="StopIteration"in m?m.StopIteration:Error("StopIteration");function Md(){}Md.prototype.next=function(){throw Ld;};Md.prototype.na=function(){return this};function Nd(a){if(a instanceof Md)return a;if("function"==typeof a.na)return a.na(!1);if(fa(a)){var b=0,c=new Md;c.next=function(){for(;;){if(b>=a.length)throw Ld;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");}
function Od(a,b,c){if(fa(a))try{z(a,b,c)}catch(d){if(d!==Ld)throw d;}else{a=Nd(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(e){if(e!==Ld)throw e;}}}function Pd(a){if(fa(a))return Pa(a);a=Nd(a);var b=[];Od(a,function(a){b.push(a)});return b};function Qd(a,b){this.f={};this.e=[];this.xa=this.h=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)Rd(this,arguments[d],arguments[d+1])}else if(a){a instanceof Qd?(c=a.pa(),d=a.W()):(c=bb(a),d=ab(a));for(var e=0;e<c.length;e++)Rd(this,c[e],d[e])}}g=Qd.prototype;g.U=function(){return this.h};g.W=function(){Sd(this);for(var a=[],b=0;b<this.e.length;b++)a.push(this.f[this.e[b]]);return a};g.pa=function(){Sd(this);return this.e.concat()};
g.lb=function(a){for(var b=0;b<this.e.length;b++){var c=this.e[b];if(Td(this.f,c)&&this.f[c]==a)return!0}return!1};g.equals=function(a,b){if(this===a)return!0;if(this.h!=a.U())return!1;var c=b||Ud;Sd(this);for(var d,e=0;d=this.e[e];e++)if(!c(this.get(d),a.get(d)))return!1;return!0};function Ud(a,b){return a===b}g.isEmpty=function(){return 0==this.h};g.clear=function(){this.f={};this.xa=this.h=this.e.length=0};
g.remove=function(a){return Td(this.f,a)?(delete this.f[a],this.h--,this.xa++,this.e.length>2*this.h&&Sd(this),!0):!1};function Sd(a){if(a.h!=a.e.length){for(var b=0,c=0;b<a.e.length;){var d=a.e[b];Td(a.f,d)&&(a.e[c++]=d);b++}a.e.length=c}if(a.h!=a.e.length){for(var e={},c=b=0;b<a.e.length;)d=a.e[b],Td(e,d)||(a.e[c++]=d,e[d]=1),b++;a.e.length=c}}g.get=function(a,b){return Td(this.f,a)?this.f[a]:b};function Rd(a,b,c){Td(a.f,b)||(a.h++,a.e.push(b),a.xa++);a.f[b]=c}
g.forEach=function(a,b){for(var c=this.pa(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};g.clone=function(){return new Qd(this)};g.na=function(a){Sd(this);var b=0,c=this.e,d=this.f,e=this.xa,f=this,h=new Md;h.next=function(){for(;;){if(e!=f.xa)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw Ld;var h=c[b++];return a?h:d[h]}};return h};function Td(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Vd(a){return"function"==typeof a.U?a.U():fa(a)||u(a)?a.length:Ya(a)}function Wd(a){if("function"==typeof a.W)return a.W();if(u(a))return a.split("");if(fa(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return ab(a)}function Xd(a){if("function"==typeof a.pa)return a.pa();if("function"!=typeof a.W){if(fa(a)||u(a)){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}return bb(a)}}
function Yd(a,b){if("function"==typeof a.forEach)a.forEach(b,void 0);else if(fa(a)||u(a))z(a,b,void 0);else for(var c=Xd(a),d=Wd(a),e=d.length,f=0;f<e;f++)b.call(void 0,d[f],c&&c[f],a)}function Zd(a,b){if("function"==typeof a.every)return a.every(b,void 0);if(fa(a)||u(a))return Fa(a,b,void 0);for(var c=Xd(a),d=Wd(a),e=d.length,f=0;f<e;f++)if(!b.call(void 0,d[f],c&&c[f],a))return!1;return!0};function $d(a){this.e=new Qd;if(a){a=Wd(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])}}function ae(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+ja(a):b.substr(0,1)+a}g=$d.prototype;g.U=function(){return this.e.U()};g.add=function(a){Rd(this.e,ae(a),a)};g.removeAll=function(a){a=Wd(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};g.remove=function(a){return this.e.remove(ae(a))};g.clear=function(){this.e.clear()};g.isEmpty=function(){return this.e.isEmpty()};
g.contains=function(a){a=ae(a);return Td(this.e.f,a)};g.W=function(){return this.e.W()};g.clone=function(){return new $d(this)};g.equals=function(a){return this.U()==Vd(a)&&be(this,a)};function be(a,b){var c=Vd(b);if(a.U()>c)return!1;!(b instanceof $d)&&5<c&&(b=new $d(b));return Zd(a,function(a){var c=b;return"function"==typeof c.contains?c.contains(a):"function"==typeof c.lb?c.lb(a):fa(c)||u(c)?Ia(c,a):$a(c,a)})}g.na=function(){return this.e.na(!1)};function ce(){};function de(a,b,c){this.j=c;this.h=a;this.k=b;this.f=0;this.e=null}de.prototype.get=function(){var a;0<this.f?(this.f--,a=this.e,this.e=a.next,a.next=null):a=this.h();return a};de.prototype.put=function(a){this.k(a);this.f<this.j&&(this.f++,a.next=this.e,this.e=a)};function ee(a){m.setTimeout(function(){throw a;},0)}var fe;
function ge(){var a=m.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!J("Presto")&&(a=function(){var a=document.createElement("IFRAME");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow,a=b.document;a.open();a.write("");a.close();var c="callImmediate"+Math.random(),d="file:"==b.location.protocol?"*":b.location.protocol+"//"+b.location.host,a=v(function(a){if(("*"==d||a.origin==d)&&a.data==
c)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&!sc()){var b=new a,c={},d=c;b.port1.onmessage=function(){if(n(c.next)){c=c.next;var a=c.mc;c.mc=null;a()}};return function(a){d.next={mc:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(a){var b=document.createElement("SCRIPT");b.onreadystatechange=
function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){m.setTimeout(a,0)}};function he(){this.f=this.e=null}var je=new de(function(){return new ie},function(a){a.reset()},100);he.prototype.add=function(a,b){var c=je.get();c.e=a;c.scope=b;c.next=null;this.f?this.f.next=c:this.e=c;this.f=c};he.prototype.remove=function(){var a=null;this.e&&(a=this.e,this.e=this.e.next,this.e||(this.f=null),a.next=null);return a};function ie(){this.next=this.scope=this.e=null}ie.prototype.reset=function(){this.next=this.scope=this.e=null};function ke(a,b){le||me();ne||(le(),ne=!0);oe.add(a,b)}var le;function me(){if(m.Promise&&m.Promise.resolve){var a=m.Promise.resolve();le=function(){a.then(pe)}}else le=function(){var a=pe;!ha(m.setImmediate)||m.Window&&m.Window.prototype&&m.Window.prototype.setImmediate==m.setImmediate?(fe||(fe=ge()),fe(a)):m.setImmediate(a)}}var ne=!1,oe=new he;function pe(){for(var a=null;a=oe.remove();){try{a.e.call(a.scope)}catch(b){ee(b)}je.put(a)}ne=!1};function qe(a,b){this.e=0;this.n=void 0;this.j=this.f=this.h=null;this.k=this.l=!1;if(a==re)se(this,2,b);else try{var c=this;a.call(b,function(a){se(c,2,a)},function(a){se(c,3,a)})}catch(d){se(this,3,d)}}function te(){this.next=this.context=this.f=this.h=this.e=null;this.j=!1}te.prototype.reset=function(){this.context=this.f=this.h=this.e=null;this.j=!1};var ue=new de(function(){return new te},function(a){a.reset()},100);function ve(a,b,c){var d=ue.get();d.h=a;d.f=b;d.context=c;return d}
function re(){}qe.prototype.then=function(a,b,c){return we(this,ha(a)?a:null,ha(b)?b:null,c)};qe.prototype.then=qe.prototype.then;qe.prototype.$goog_Thenable=!0;qe.prototype.cancel=function(a){0==this.e&&ke(function(){var b=new xe(a);ye(this,b)},this)};
function ye(a,b){if(0==a.e)if(a.h){var c=a.h;if(c.f){for(var d=0,e=null,f=null,h=c.f;h&&(h.j||(d++,h.e==a&&(e=h),!(e&&1<d)));h=h.next)e||(f=h);e&&(0==c.e&&1==d?ye(c,b):(f?(d=f,d.next==c.j&&(c.j=d),d.next=d.next.next):ze(c),Ae(c,e,3,b)))}a.h=null}else se(a,3,b)}function Be(a,b){a.f||2!=a.e&&3!=a.e||Ce(a);a.j?a.j.next=b:a.f=b;a.j=b}
function we(a,b,c,d){var e=ve(null,null,null);e.e=new qe(function(a,h){e.h=b?function(c){try{var e=b.call(d,c);a(e)}catch(r){h(r)}}:a;e.f=c?function(b){try{var e=c.call(d,b);!n(e)&&b instanceof xe?h(b):a(e)}catch(r){h(r)}}:h});e.e.h=a;Be(a,e);return e.e}qe.prototype.B=function(a){this.e=0;se(this,2,a)};qe.prototype.H=function(a){this.e=0;se(this,3,a)};
function se(a,b,c){if(0==a.e){if(a==c)b=3,c=new TypeError("Promise cannot resolve to itself");else{var d;if(c)try{d=!!c.$goog_Thenable}catch(e){d=!1}else d=!1;if(d){a.e=1;b=c;c=a.B;d=a.H;b instanceof qe?Be(b,ve(c||t,d||null,a)):b.then(c,d,a);return}if(ia(c))try{var f=c.then;if(ha(f)){De(a,c,f);return}}catch(h){b=3,c=h}}a.n=c;a.e=b;a.h=null;Ce(a);3!=b||c instanceof xe||Ee(a,c)}}
function De(a,b,c){function d(b){f||(f=!0,a.H(b))}function e(b){f||(f=!0,a.B(b))}a.e=1;var f=!1;try{c.call(b,e,d)}catch(h){d(h)}}function Ce(a){a.l||(a.l=!0,ke(a.I,a))}function ze(a){var b=null;a.f&&(b=a.f,a.f=b.next,b.next=null);a.f||(a.j=null);return b}qe.prototype.I=function(){for(var a=null;a=ze(this);)Ae(this,a,this.e,this.n);this.l=!1};function Ae(a,b,c,d){b.e&&(b.e.h=null);if(2==c)b.h.call(b.context,d);else if(null!=b.f){if(!b.j)for(;a&&a.k;a=a.h)a.k=!1;b.f.call(b.context,d)}ue.put(b)}
function Ee(a,b){a.k=!0;ke(function(){a.k&&Fe.call(null,b)})}var Fe=ee;function xe(a){qa.call(this,a)}x(xe,qa);xe.prototype.name="cancel";function Ge(a){this.e=a;a.then(v(function(){},this))}function He(a,b,c,d){for(var e=Array(arguments.length-3),f=3;f<arguments.length;f++)e[f-3]=arguments[f];f=Ie(a,b,c).then(function(a){return a.apply(null,e)});return new Ge(f)}var Je={};
function Ie(a,b,c){var d="https://www.gstatic.com/feedback/js/help/"+(a&&"prod"!=a&&"canary"!=a?"nonprod":"prod")+"/"+b;if(a=Je[c])return a;a=(a=q(c))?new qe(re,a):(new qe(function(a,b){var c=document.createElement("script");c.async=!0;c.src=d;c.onload=c.onreadystatechange=function(){c.readyState&&"loaded"!=c.readyState&&"complete"!=c.readyState||a()};c.onerror=b;(document.head||document.getElementsByTagName("head")[0]).appendChild(c)})).then(function(){var a=q(c);if(!a)throw Error("Failed to load "+
c+" from "+d);return a});return Je[c]=a}function Ke(a,b,c){a.e.then(function(a){var e=a[b];if(!e)throw Error("Method not found: "+b);return e.apply(a,c)})};function Le(a){this.e=a}function Me(a,b){var c=b||{},c={apiKey:c.cf||c.apiKey,environment:c.ef||c.environment,helpCenterPath:c.gf||c.helpCenterPath,locale:c.locale||c.locale||"en".replace(/-/g,"_"),productData:c.kf||c.productData,receiverUri:c.lf||c.receiverUri,theme:c.theme||c.theme,window:c.window||c.window},c=He("prod","service/lazy.min.js","help.service.Lazy.create",a,c);return new Le(c)}Le.prototype.f=function(a){Ke(this.e,"startFeedback",arguments)};
Le.prototype.h=function(a){Ke(this.e,"startHelp",arguments)};var Ne=!1;function Oe(a){if(a=a.match(/[\d]+/g))a.length=3,a.join(".")}
if(navigator.plugins&&navigator.plugins.length){var Pe=navigator.plugins["Shockwave Flash"];Pe&&(Ne=!0,Pe.description&&Oe(Pe.description));navigator.plugins["Shockwave Flash 2.0"]&&(Ne=!0)}else if(navigator.mimeTypes&&navigator.mimeTypes.length){var Qe=navigator.mimeTypes["application/x-shockwave-flash"];(Ne=Qe&&Qe.enabledPlugin)&&Oe(Qe.enabledPlugin.description)}else try{var Re=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),Ne=!0;Oe(Re.GetVariable("$version"))}catch(Se){try{Re=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),
Ne=!0}catch(Te){try{Re=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),Ne=!0,Oe(Re.GetVariable("$version"))}catch(Ue){}}};var Ve=J("Firefox"),We=vc()||J("iPod"),Xe=J("iPad"),Ye=J("Android")&&!(tc()||J("Firefox")||rc()||J("Silk")),Ze=tc(),$e=J("Safari")&&!(tc()||J("Coast")||rc()||sc()||J("Silk")||J("Android"))&&!(vc()||J("iPad")||J("iPod"));function af(a){return(a=a.exec(oc))?a[1]:""}(function(){if(Ve)return af(/Firefox\/([0-9.]+)/);if(K||wc)return Dc;if(Ze)return af(/Chrome\/([0-9.]+)/);if($e&&!(vc()||J("iPad")||J("iPod")))return af(/Version\/([0-9.]+)/);if(We||Xe){var a;if(a=/Version\/(\S+).*Mobile\/(\S+)/.exec(oc))return a[1]+"."+a[2]}else if(Ye)return(a=af(/Android\s+([0-9.]+)/))?a:af(/Version\/([0-9.]+)/);return""})();function bf(){this.h=this.f=this.e=0;this.j="";var a=q("window.navigator.plugins"),b=q("window.navigator.mimeTypes"),a=a&&a["Shockwave Flash"],b=b&&b["application/x-shockwave-flash"],b=a&&b&&b.enabledPlugin&&a.description||"";if(a=b){var c=a.indexOf("Shockwave Flash");0<=c&&(a=a.substr(c+15));for(var c=a.split(" "),d="",a="",e=0,f=c.length;e<f;e++)if(d)if(a)break;else a=c[e];else d=c[e];d=d.split(".");c=parseInt(d[0],10)||0;d=parseInt(d[1],10)||0;e=0;if("r"==a.charAt(0)||"d"==a.charAt(0))e=parseInt(a.substr(1),
10)||0;a=[c,d,e]}else a=[0,0,0];this.j=b;b=a;this.e=b[0];this.f=b[1];this.h=b[2];if(0>=this.e){var h,k,l,r;if(Mb)try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(N){h=null}else l=document.body,r=document.createElement("object"),r.setAttribute("type","application/x-shockwave-flash"),h=l.appendChild(r);if(h&&"GetVariable"in h)try{k=h.GetVariable("$version")}catch(aa){k=""}l&&r&&l.removeChild(r);(h=k||"")?(h=h.split(" ")[1].split(","),h=[parseInt(h[0],10)||0,parseInt(h[1],10)||0,parseInt(h[2],
10)||0]):h=[0,0,0];this.e=h[0];this.f=h[1];this.h=h[2]}}ca(bf);bf.prototype.getVersion=function(){return[this.e,this.f,this.h]};function cf(a,b,c,d){b="string"==typeof b?b.split("."):[b,c,d];b[0]=parseInt(b[0],10)||0;b[1]=parseInt(b[1],10)||0;b[2]=parseInt(b[2],10)||0;return a.e>b[0]||a.e==b[0]&&a.f>b[1]||a.e==b[0]&&a.f==b[1]&&a.h>=b[2]}function df(a){return-1<a.j.indexOf("Gnash")&&-1==a.j.indexOf("AVM2")||9==a.e&&1==a.f||9==a.e&&0==a.f&&1==a.h?!1:9<=a.e}
function ef(a){return Ac?!cf(a,11,2):zc?!cf(a,11,3):!df(a)};function ff(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}ff.prototype.clone=function(){return new ff(this.top,this.right,this.bottom,this.left)};ff.prototype.contains=function(a){return this&&a?a instanceof ff?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1};
ff.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};ff.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};function gf(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}gf.prototype.clone=function(){return new gf(this.left,this.top,this.width,this.height)};gf.prototype.contains=function(a){return a instanceof gf?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};
gf.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};gf.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function hf(a,b){var c=Mc(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function jf(a,b){return hf(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}
function kf(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}K&&a.ownerDocument.body&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}function lf(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}
function mf(a){var b=nf;if("none"!=jf(a,"display"))return b(a);var c=a.style,d=c.display,e=c.visibility,f=c.position;c.visibility="hidden";c.position="absolute";c.display="inline";a=b(a);c.display=d;c.position=f;c.visibility=e;return a}function nf(a){var b=a.offsetWidth,c=a.offsetHeight,d=yc&&!b&&!c;return n(b)&&!d||!a.getBoundingClientRect?new nc(b,c):(a=kf(a),new nc(a.right-a.left,a.bottom-a.top))}
function of(a,b){if(/^\d+px?$/.test(b))return parseInt(b,10);var c=a.style.left,d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b;var e=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return e}function pf(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?of(a,c):0}var qf={thin:2,medium:4,thick:6};
function rf(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null;return c in qf?qf[c]:of(a,c)};function sf(a,b){(a=Nc(a))&&a.style&&(a.style.display=b?"":"none",lc(a,"hid",!b))}function tf(a){z(arguments,function(a){sf(a,!0)})}function uf(a){z(arguments,function(a){sf(a,!1)})};var vf={};function wf(a,b){var c=E("FEEDBACK_LOCALE_LANGUAGE"),d=E("FEEDBACK_LOCALE_EXTRAS",{});a?jb(vf,a):jb(vf,d);try{var e,f=q("yt.player.getPlayerByElement");(e=f?f("player-api"):null)&&e.pauseVideo&&e.pauseVideo();var h=bf.getInstance();vf.flashVersion=h.getVersion().join(".");e&&(vf.playback_id=e.getVideoData().cpn)}catch(k){}b&&jb(vf,{trackingParam:b});return{helpCenterPath:"/youtube",locale:c,productData:vf}}
function xf(){var a=E("SESSION_INDEX"),b=E("FEEDBACK_BUCKET_ID"),c={abuseLink:"https://support.google.com/youtube/bin/answer.py?answer=140536",customZIndex:"2000000005"};a&&(c.authuser=a+"");b&&(c.bucket=b);return c}function yf(a,b){try{var c=(a||"59")+"",d=wf(b),e=xf();Me(c,d).f(e);return!1}catch(f){return!0}}function zf(a,b,c,d){var e;d=(d||"59")+"";c=wf(c,void 0);a={context:b,anchor:void 0,enableSendFeedback:!0,defaultHelpArticleId:a};jb(a,xf());try{Me(d,c).h(a),e=!1}catch(f){e=!0}return e};function Af(a){a=a||{};this.url=a.url||"";this.urlV9As2=a.url_v9as2||"";this.args=a.args||gb(Bf);this.assets=a.assets||{};this.attrs=a.attrs||gb(Cf);this.params=a.params||gb(Df);this.minVersion=a.min_version||"8.0.0";this.fallback=a.fallback||null;this.fallbackMessage=a.fallbackMessage||null;this.html5=!!a.html5;this.disable=a.disable||{};this.loaded=!!a.loaded;this.messages=a.messages||{}}var Bf={enablejsapi:1},Cf={},Df={allowscriptaccess:"always",allowfullscreen:"true",bgcolor:"#000000"};
function Ef(a){a instanceof Af||(a=new Af(a));return a}Af.prototype.clone=function(){var a=new Af,b;for(b in this){var c=this[b];"object"==da(c)?a[b]=gb(c):a[b]=c}return a};function Ff(a){Ff[" "](a);return a}Ff[" "]=t;var Gf=!K||Gc(9),Hf=K&&!Fc("9");!yc||Fc("528");xc&&Fc("1.9b")||K&&Fc("8")||wc&&Fc("9.5")||yc&&Fc("528");xc&&!Fc("8")||K&&Fc("9");function If(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=!1;this.Oc=!0}If.prototype.preventDefault=function(){this.defaultPrevented=!0;this.Oc=!1};function Jf(a,b){If.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.clientY=this.clientX=0;this.shiftKey=this.altKey=this.ctrlKey=!1;this.e=this.state=null;a&&this.init(a,b)}x(Jf,If);
Jf.prototype.init=function(a,b){var c=this.type=a.type;this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(xc){var e;a:{try{Ff(d.nodeName);e=!0;break a}catch(f){}e=!1}e||(d=null)}}else"mouseover"==c?d=a.fromElement:"mouseout"==c&&(d=a.toElement);this.relatedTarget=d;this.clientX=void 0!==a.clientX?a.clientX:a.pageX;this.clientY=void 0!==a.clientY?a.clientY:a.pageY;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);
this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.state=a.state;this.e=a;a.defaultPrevented&&this.preventDefault()};Jf.prototype.preventDefault=function(){Jf.G.preventDefault.call(this);var a=this.e;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Hf)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};Jf.prototype.f=function(){return this.e};var Kf="closure_listenable_"+(1E6*Math.random()|0),Lf=0;function Mf(a,b,c,d,e){this.ra=a;this.e=null;this.src=b;this.type=c;this.jb=!!d;this.pb=e;this.key=++Lf;this.Pa=this.ib=!1}function Nf(a){a.Pa=!0;a.ra=null;a.e=null;a.src=null;a.pb=null};function Of(a){this.src=a;this.e={};this.f=0}Of.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.e[f];a||(a=this.e[f]=[],this.f++);var h=Pf(a,b,d,e);-1<h?(b=a[h],c||(b.ib=!1)):(b=new Mf(b,this.src,f,!!d,e),b.ib=c,a.push(b));return b};Of.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.e))return!1;var e=this.e[a];b=Pf(e,b,c,d);return-1<b?(Nf(e[b]),y.splice.call(e,b,1),0==e.length&&(delete this.e[a],this.f--),!0):!1};
function Qf(a,b){var c=b.type;if(!(c in a.e))return!1;var d=Ma(a.e[c],b);d&&(Nf(b),0==a.e[c].length&&(delete a.e[c],a.f--));return d}Of.prototype.removeAll=function(a){a=a&&a.toString();var b=0,c;for(c in this.e)if(!a||c==a){for(var d=this.e[c],e=0;e<d.length;e++)++b,Nf(d[e]);delete this.e[c];this.f--}return b};function Rf(a,b,c,d,e){a=a.e[b.toString()];b=-1;a&&(b=Pf(a,c,d,e));return-1<b?a[b]:null}
function Pf(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.Pa&&f.ra==b&&f.jb==!!c&&f.pb==d)return e}return-1};var Sf="closure_lm_"+(1E6*Math.random()|0),Tf={},Uf=0;function Vf(a,b,c,d,e){if(ea(b)){for(var f=0;f<b.length;f++)Vf(a,b[f],c,d,e);return null}c=Wf(c);if(a&&a[Kf])a=a.sb(b,c,d,e);else{if(!b)throw Error("Invalid event type");var f=!!d,h=Xf(a);h||(a[Sf]=h=new Of(a));c=h.add(b,c,!1,d,e);c.e||(d=Yf(),c.e=d,d.src=a,d.ra=c,a.addEventListener?a.addEventListener(b.toString(),d,f):a.attachEvent(Zf(b.toString()),d),Uf++);a=c}return a}
function Yf(){var a=$f,b=Gf?function(c){return a.call(b.src,b.ra,c)}:function(c){c=a.call(b.src,b.ra,c);if(!c)return c};return b}function ag(a,b,c,d,e){if(ea(b))for(var f=0;f<b.length;f++)ag(a,b[f],c,d,e);else c=Wf(c),a&&a[Kf]?a.bc(b,c,d,e):a&&(a=Xf(a))&&(b=Rf(a,b,c,!!d,e))&&bg(b)}
function bg(a){if(ga(a)||!a||a.Pa)return!1;var b=a.src;if(b&&b[Kf])return Qf(b.ua,a);var c=a.type,d=a.e;b.removeEventListener?b.removeEventListener(c,d,a.jb):b.detachEvent&&b.detachEvent(Zf(c),d);Uf--;(c=Xf(b))?(Qf(c,a),0==c.f&&(c.src=null,b[Sf]=null)):Nf(a);return!0}function Zf(a){return a in Tf?Tf[a]:Tf[a]="on"+a}function cg(a,b,c,d){var e=!0;if(a=Xf(a))if(b=a.e[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.jb==c&&!f.Pa&&(f=dg(f,d),e=e&&!1!==f)}return e}
function dg(a,b){var c=a.ra,d=a.pb||a.src;a.ib&&bg(a);return c.call(d,b)}
function $f(a,b){if(a.Pa)return!0;if(!Gf){var c=b||q("window.event"),d=new Jf(c,this),e=!0;if(!(0>c.keyCode||void 0!=c.returnValue)){a:{var f=!1;if(0==c.keyCode)try{c.keyCode=-1;break a}catch(h){f=!0}if(f||void 0==c.returnValue)c.returnValue=!0}c=[];for(f=d.currentTarget;f;f=f.parentNode)c.push(f);for(var f=a.type,k=c.length-1;0<=k;k--){d.currentTarget=c[k];var l=cg(c[k],f,!0,d),e=e&&l}for(k=0;k<c.length;k++)d.currentTarget=c[k],l=cg(c[k],f,!1,d),e=e&&l}return e}return dg(a,new Jf(b,this))}
function Xf(a){a=a[Sf];return a instanceof Of?a:null}var eg="__closure_events_fn_"+(1E9*Math.random()>>>0);function Wf(a){if(ha(a))return a;a[eg]||(a[eg]=function(b){return a.handleEvent(b)});return a[eg]};function fg(){var a=od("PREF");if(a)for(var a=unescape(a).split("&"),b=0;b<a.length;b++){var c=a[b].split("="),d=c[0];(c=c[1])&&(gg[d]=c.toString())}}ca(fg);var gg=q("yt.prefs.UserPrefs.prefs_")||{};p("yt.prefs.UserPrefs.prefs_",gg,void 0);function hg(a){if(/^f([1-9][0-9]*)$/.test(a))throw"ExpectedRegexMatch: "+a;}function ig(a){if(!/^\w+$/.test(a))throw"ExpectedRegexMismatch: "+a;}function jg(a){return void 0!==gg[a]?gg[a].toString():null}
fg.prototype.get=function(a,b){ig(a);hg(a);var c=jg(a);return null!=c?c:b?b:""};fg.prototype.remove=function(a){ig(a);hg(a);delete gg[a]};fg.prototype.clear=function(){gg={}};function kg(a,b,c){if(b){a=u(a)?Oc(a):a;c=Ef(c);var d=gb(c.attrs);d.tabindex=0;var e=gb(c.params);e.flashvars=Bd(c.args);if(Mb){d.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";e.movie=b;b=document.createElement("object");for(var f in d)b.setAttribute(f,d[f]);for(f in e)d=document.createElement("param"),d.setAttribute("name",f),d.setAttribute("value",e[f]),b.appendChild(d)}else{d.type="application/x-shockwave-flash";d.src=b;b=document.createElement("embed");b.setAttribute("name",d.id);for(f in d)b.setAttribute(f,
d[f]);for(f in e)b.setAttribute(f,e[f])}e=document.createElement("div");e.appendChild(b);a.innerHTML=e.innerHTML}}
function lg(a,b,c){if(a&&a.attrs&&a.attrs.id){a=Ef(a);var d=!!b,e=Nc(a.attrs.id),f=e?e.parentNode:null;if(e&&f){if(window!=window.top){var h=null;if(document.referrer){var k=document.referrer.substring(0,128);Hd(k)||(h=k)}else h="unknown";h&&(d=!0,a.args.framer=h)}h=bf.getInstance();if(cf(h,a.minVersion)){var k=mg(a,h),l="";-1<navigator.userAgent.indexOf("Sony/COM2")||(l=e.getAttribute("src")||e.movie);(l!=k||d)&&kg(f,k,a);ef(h)&&ng()}else og(f,a,h);c&&c()}else F(function(){lg(a,b,c)},50)}}
function og(a,b,c){0==c.e&&b.fallback?b.fallback():0==c.e&&b.fallbackMessage?b.fallbackMessage():a.innerHTML='<div id="flash-upgrade">'+Lb()+"</div>"}function mg(a,b){return df(b)&&a.url||(-1<navigator.userAgent.indexOf("Sony/COM2")&&!cf(b,9,1,58)?!1:!0)&&a.urlV9As2||a.url}function ng(){var a=Nc("flash10-promo-div"),b;fg.getInstance();b=jg("f"+(Math.floor(107/31)+1));b=!!(((null!=b&&/^[A-Fa-f0-9]+$/.test(b)?parseInt(b,16):null)||0)&16384);a&&!b&&tf(a)};function pg(a){if(window.spf){var b=a.match(qg);spf.style.load(a,b?b[1]:"",void 0)}else rg(a)}function rg(a){var b=sg(a),c=document.getElementById(b),d=c&&B(c,"loaded");d||c&&!d||(c=tg(a,b,function(){B(c,"loaded")||(yb(c,"loaded","true"),I(b),F(pa(Wb,b),0))}))}function tg(a,b,c){var d=document.createElement("link");d.id=b;d.rel="stylesheet";d.onload=function(){c&&setTimeout(c,0)};xb(d,a);(document.getElementsByTagName("head")[0]||document.body).appendChild(d);return d}
function sg(a){var b=document.createElement("a");xb(b,a);a=b.href.replace(/^[a-zA-Z]+:\/\//,"//");return"css-"+Aa(a)}var qg=/cssbin\/(?:debug-)?([a-zA-Z0-9_-]+?)(?:-2x|-web|-rtl|-vfl|.css)/;var ug;var vg=oc,vg=vg.toLowerCase();if(-1!=vg.indexOf("android")){var wg=vg.match(/android\D*(\d\.\d)[^\;|\)]*[\;\)]/);if(wg)ug=Number(wg[1]);else{var xg={cupcake:1.5,donut:1.6,eclair:2,froyo:2.2,gingerbread:2.3,honeycomb:3,"ice cream sandwich":4,jellybean:4.1},yg=vg.match("("+bb(xg).join("|")+")");ug=yg?xg[yg[0]]:0}}else ug=void 0;function zg(){if(2.2==ug)return!0;var a;a=q("yt.player.utils.videoElement_");a||(a=document.createElement("video"),p("yt.player.utils.videoElement_",a,void 0));try{return!(!a||!a.canPlayType||!a.canPlayType('video/mp4; codecs="avc1.42001E, mp4a.40.2"')&&!a.canPlayType('video/webm; codecs="vp8.0, vorbis"'))}catch(b){return!1}};function Ag(a,b){this.f=this.B=this.j="";this.n=null;this.k=this.e="";this.l=!1;var c;a instanceof Ag?(this.l=n(b)?b:a.l,Bg(this,a.j),this.B=a.B,Cg(this,a.f),Dg(this,a.n),this.e=a.e,Eg(this,a.h.clone()),this.k=a.k):a&&(c=td(String(a)))?(this.l=!!b,Bg(this,c[1]||"",!0),this.B=Fg(c[2]||""),Cg(this,c[3]||"",!0),Dg(this,c[4]),this.e=Fg(c[5]||"",!0),Eg(this,c[6]||"",!0),this.k=Fg(c[7]||"")):(this.l=!!b,this.h=new Gg(null,0,this.l))}
Ag.prototype.toString=function(){var a=[],b=this.j;b&&a.push(Hg(b,Ig,!0),":");if(b=this.f){a.push("//");var c=this.B;c&&a.push(Hg(c,Ig,!0),"@");a.push(encodeURIComponent(String(b)).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.n;null!=b&&a.push(":",String(b))}if(b=this.e)this.f&&"/"!=b.charAt(0)&&a.push("/"),a.push(Hg(b,"/"==b.charAt(0)?Jg:Kg,!0));(b=this.h.toString())&&a.push("?",b);(b=this.k)&&a.push("#",Hg(b,Lg));return a.join("")};
Ag.prototype.resolve=function(a){var b=this.clone(),c=!!a.j;c?Bg(b,a.j):c=!!a.B;c?b.B=a.B:c=!!a.f;c?Cg(b,a.f):c=null!=a.n;var d=a.e;if(c)Dg(b,a.n);else if(c=!!a.e){if("/"!=d.charAt(0))if(this.f&&!this.e)d="/"+d;else{var e=b.e.lastIndexOf("/");-1!=e&&(d=b.e.substr(0,e+1)+d)}e=d;if(".."==e||"."==e)d="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){for(var d=0==e.lastIndexOf("/",0),e=e.split("/"),f=[],h=0;h<e.length;){var k=e[h++];"."==k?d&&h==e.length&&f.push(""):".."==k?((1<f.length||1==f.length&&
""!=f[0])&&f.pop(),d&&h==e.length&&f.push("")):(f.push(k),d=!0)}d=f.join("/")}else d=e}c?b.e=d:c=""!==a.h.toString();c?Eg(b,Fg(a.h.toString())):c=!!a.k;c&&(b.k=a.k);return b};Ag.prototype.clone=function(){return new Ag(this)};function Bg(a,b,c){a.j=c?Fg(b,!0):b;a.j&&(a.j=a.j.replace(/:$/,""))}function Cg(a,b,c){a.f=c?Fg(b,!0):b}function Dg(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.n=b}else a.n=null}
function Eg(a,b,c){b instanceof Gg?(a.h=b,Mg(a.h,a.l)):(c||(b=Hg(b,Ng)),a.h=new Gg(b,0,a.l))}function M(a,b,c){a=a.h;Og(a);a.h=null;b=Pg(a,b);Qg(a,b)&&(a.f-=a.e.get(b).length);Rd(a.e,b,[c]);a.f++}function Rg(a,b,c){ea(c)||(c=[String(c)]);Sg(a.h,b,c)}function Tg(a){M(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^w()).toString(36));return a}function Ug(a){return a instanceof Ag?a.clone():new Ag(a,void 0)}
function Vg(a,b,c,d){var e=new Ag(null,void 0);a&&Bg(e,a);b&&Cg(e,b);c&&Dg(e,c);d&&(e.e=d);return e}function Fg(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Hg(a,b,c){return u(a)?(a=encodeURI(a).replace(b,Wg),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Wg(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ig=/[#\/\?@]/g,Kg=/[\#\?:]/g,Jg=/[\#\?]/g,Ng=/[\#\?@]/g,Lg=/#/g;function Gg(a,b,c){this.f=this.e=null;this.h=a||null;this.j=!!c}
function Og(a){a.e||(a.e=new Qd,a.f=0,a.h&&wd(a.h,function(b,c){a.add(ua(b),c)}))}g=Gg.prototype;g.U=function(){Og(this);return this.f};g.add=function(a,b){Og(this);this.h=null;a=Pg(this,a);var c=this.e.get(a);c||Rd(this.e,a,c=[]);c.push(b);this.f++;return this};g.remove=function(a){Og(this);a=Pg(this,a);return Td(this.e.f,a)?(this.h=null,this.f-=this.e.get(a).length,this.e.remove(a)):!1};g.clear=function(){this.e=this.h=null;this.f=0};g.isEmpty=function(){Og(this);return 0==this.f};
function Qg(a,b){Og(a);b=Pg(a,b);return Td(a.e.f,b)}g.lb=function(a){var b=this.W();return Ia(b,a)};g.pa=function(){Og(this);for(var a=this.e.W(),b=this.e.pa(),c=[],d=0;d<b.length;d++)for(var e=a[d],f=0;f<e.length;f++)c.push(b[d]);return c};g.W=function(a){Og(this);var b=[];if(u(a))Qg(this,a)&&(b=Oa(b,this.e.get(Pg(this,a))));else{a=this.e.W();for(var c=0;c<a.length;c++)b=Oa(b,a[c])}return b};g.get=function(a,b){var c=a?this.W(a):[];return 0<c.length?String(c[0]):b};
function Sg(a,b,c){a.remove(b);0<c.length&&(a.h=null,Rd(a.e,Pg(a,b),Pa(c)),a.f+=c.length)}g.toString=function(){if(this.h)return this.h;if(!this.e)return"";for(var a=[],b=this.e.pa(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.W(d),f=0;f<d.length;f++){var h=e;""!==d[f]&&(h+="="+encodeURIComponent(String(d[f])));a.push(h)}return this.h=a.join("&")};g.clone=function(){var a=new Gg;a.h=this.h;this.e&&(a.e=this.e.clone(),a.f=this.f);return a};
function Pg(a,b){var c=String(b);a.j&&(c=c.toLowerCase());return c}function Mg(a,b){b&&!a.j&&(Og(a),a.h=null,a.e.forEach(function(a,b){var e=b.toLowerCase();b!=e&&(this.remove(b),Sg(this,e,a))},a));a.j=b};var Xg="corp.google.com googleplex.com youtube.com youtube-nocookie.com youtubeeducation.com borg.google.com prod.google.com sandbox.google.com books.googleusercontent.com docs.google.com drive.google.com mail.google.com photos.google.com plus.google.com play.google.com googlevideo.com talkgadget.google.com survey.g.doubleclick.net youtube.googleapis.com vevo.com".split(" "),Yg="";
function Zg(a){return a&&a==Yg?!0:(new RegExp("^(https?:)?//([a-z0-9-]{1,63}\\.)*("+Xg.join("|").replace(/\./g,".")+")(:[0-9]+)?([/?#]|$)","i")).test(a)?(Yg=a,!0):!1};var $g={},ah=0,bh=q("yt.net.ping.workerUrl_")||null;p("yt.net.ping.workerUrl_",bh,void 0);function ch(a){var b=new Image,c=""+ah++;$g[c]=b;b.onload=b.onerror=function(){delete $g[c]};b.src=a;b=eval("null")};function dh(a){var b=void 0;void 0===b&&(b=NaN);var c=q("yt.scheduler.instance.addJob");c?(isNaN(b)&&(b=0),c(a,0,b)):isNaN(b)?a():F(a,b||0)};function O(a,b){this.version=a;this.args=b}function eh(a){if(!a.xa){var b={};a.call(b);a.xa=b.version}return a.xa}
function fh(a,b){function c(){a.apply(this,b.args)}if(!b.args||!b.version)throw Error("yt.pubsub2.Data.deserialize(): serializedData is incomplete.");var d;try{d=eh(a)}catch(e){}if(!d||b.version!=d)throw Error("yt.pubsub2.Data.deserialize(): serializedData version is incompatible.");c.prototype=a.prototype;try{return new c}catch(f){throw f.message="yt.pubsub2.Data.deserialize(): "+f.message,f;}}function P(a,b){this.f=a;this.e=b}P.prototype.toString=function(){return this.f};var gh=q("yt.pubsub2.instance_")||new D;D.prototype.subscribe=D.prototype.subscribe;D.prototype.unsubscribeByKey=D.prototype.ka;D.prototype.publish=D.prototype.A;D.prototype.clear=D.prototype.clear;p("yt.pubsub2.instance_",gh,void 0);var hh=q("yt.pubsub2.subscribedKeys_")||{};p("yt.pubsub2.subscribedKeys_",hh,void 0);var ih=q("yt.pubsub2.topicToKeys_")||{};p("yt.pubsub2.topicToKeys_",ih,void 0);var jh=q("yt.pubsub2.isAsync_")||{};p("yt.pubsub2.isAsync_",jh,void 0);
p("yt.pubsub2.skipSubKey_",null,void 0);function Q(a,b){var c=kh();c&&c.publish.call(c,a.toString(),a,b)}
function lh(a,b,c){var d=kh();if(!d)return 0;var e=d.subscribe(a.toString(),function(d,h){if(!window.yt.pubsub2.skipSubKey_||window.yt.pubsub2.skipSubKey_!=e){var k=function(){if(hh[e])try{if(h&&a instanceof P&&a!=d)try{h=fh(a.e,h)}catch(k){throw k.message="yt.pubsub2 cross-binary conversion error for "+a.toString()+": "+k.message,k;}b.call(c||window,h)}catch(r){Kb(r)}};jh[a.toString()]?q("yt.scheduler.instance")?dh(k):F(k,0):k()}});hh[e]=!0;ih[a.toString()]||(ih[a.toString()]=[]);ih[a.toString()].push(e);
return e}function mh(a){var b=kh();b&&(ga(a)&&(a=[a]),z(a,function(a){b.unsubscribeByKey(a);delete hh[a]}))}function kh(){return q("yt.pubsub2.instance_")};function nh(a){O.call(this,1,arguments)}x(nh,O);var oh=new P("timing-sent",nh);var R=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{},ph=v(R.clearResourceTimings||R.webkitClearResourceTimings||R.mozClearResourceTimings||R.msClearResourceTimings||R.oClearResourceTimings||t,R),qh=R.mark?function(a){R.mark(a)}:t;function rh(a){sh().tick[a]=w();qh(a);E("CSI_LOG_ON_TICK")&&th()}function uh(){vh();ph();p("yt.timing.pingSent_",!1,void 0)}
function wh(){var a=sh().tick;if(a.aft)return a.aft;for(var b=E("TIMING_AFT_KEYS",["ol"]),c=b.length,d=0;d<c;d++){var e=a[b[d]];if(e)return e}return NaN}function xh(a){return Math.round(R.timing.navigationStart+a)}
function yh(a){var b=window.location.protocol,c=R.getEntriesByType("resource"),d=c.filter(function(a){return 0==a.name.indexOf(b+"//fonts.googleapis.com/css?family=")})[0],c=c.filter(function(a){return 0==a.name.indexOf(b+"//fonts.gstatic.com/s/")}).reduce(function(a,b){return b.duration>a.duration?b:a},{duration:0});d&&0<d.startTime&&0<d.responseEnd&&(a.wfcs=xh(d.startTime),a.wfce=xh(d.responseEnd));c&&0<c.startTime&&0<c.responseEnd&&(a.wffs=xh(c.startTime),a.wffe=xh(c.responseEnd))}
function th(){var a=E("TIMING_ACTION"),b=sh().tick,c=!0;E("CSI_LOG_ON_TICK")&&(c=!!q("yt.timing.ready_"));if(c&&a&&b._start&&wh()){a=!0;c=E("TIMING_WAIT",[]);if(c.length)for(var d=0,e=c.length;d<e;++d)if(!(c[d]in b)){a=!1;break}if(a)if(c=sh().tick,b=sh().span,d=sh().info,a=q("yt.timing.reportbuilder_")){if(a=a(c,b,d,void 0))zh(a),uh()}else{a={v:2,s:E("CSI_SERVICE_NAME","youtube"),action:E("TIMING_ACTION")};R.now&&R.timing&&(e=R.timing.navigationStart+R.now(),e=Math.round(w()-e),d.yt_hrd=e);var e=
E("TIMING_INFO")||{},f;for(f in e)d[f]=e[f];f=d.srt;delete d.srt;var h;f||0===f||(h=R.timing||{},f=Math.max(0,h.responseStart-h.navigationStart),isNaN(f)&&d.pt&&(f=d.pt));if(f||0===f)d.srt=f;d.h5jse&&(e=window.location.protocol+q("ytplayer.config.assets.js"),(e=R.getEntriesByName?R.getEntriesByName(e)[0]:null)?d.h5jse=Math.round(d.h5jse-e.responseEnd):delete d.h5jse);c.aft=wh();e=c._start;if("cold"==d.yt_lt){h||(h=R.timing||{});var k;a:if(k=h,k.msFirstPaint)k=Math.max(0,k.msFirstPaint);else{var l=
window.chrome;if(l&&(l=l.loadTimes,ha(l))){var l=l(),r=1E3*Math.min(l.requestTime||Infinity,l.startLoadTime||Infinity),r=Infinity===r?0:k.navigationStart-r;k=Math.max(0,Math.round(1E3*l.firstPaintTime+r)||0);break a}k=0}0<k&&k>e&&(c.fpt=k);k=sh().span;l=h.redirectEnd-h.redirectStart;0<l&&(k.rtime_=l);l=h.domainLookupEnd-h.domainLookupStart;0<l&&(k.dns_=l);l=h.connectEnd-h.connectStart;0<l&&(k.tcp_=l);l=h.connectEnd-h.secureConnectionStart;h.secureConnectionStart>=h.navigationStart&&0<l&&(k.stcp_=
l);l=h.responseStart-h.requestStart;0<l&&(k.req_=l);l=h.responseEnd-h.responseStart;0<l&&(k.rcv_=l);E("EXP_WEBFONT_ENABLED")&&R.getEntriesByType&&yh(c)}d.p=E("CLIENT_PROTOCOL")||"unknown";d.t=E("CLIENT_TRANSPORT")||"unknown";E("EXP_CSI_BEACON_API")&&navigator.sendBeacon&&(d.ba=1);for(var N in d)"_"!=N.charAt(0)&&(a[N]=d[N]);E("CSI_MORE")&&(c.ps=w());N={};h=[];for(var aa in c)"_"!=aa.charAt(0)&&(k=Math.max(Math.round(c[aa]-e),0),N[aa]=k,h.push(aa+"."+k));a.rt=h.join(",");aa={};h=[];for(var la in b)"_"!=
la.charAt(0)&&(aa[la]=b[la],h.push(la+"."+b[la]));a.it=h.join(",");(la=q("ytdebug.logTiming"))&&la(a,N,aa);uh();E("EXP_DEFER_CSI_PING")?(Ah(),p("yt.timing.deferredPingArgs_",a,void 0),la=F(Ah,0),p("yt.timing.deferredPingTimer_",la,void 0)):zh(a);Q(oh,new nh(N.aft+(f||0)))}}}
function zh(a){E("EXP_DEFER_CSI_PING")&&(G(q("yt.timing.deferredPingTimer_")),p("yt.timing.deferredPingArgs_",null,void 0));var b="https:"==window.location.protocol?"https://gg.google.com/csi":"http://csi.gstatic.com/csi",c="",d;for(d in a)c+="&"+d+"="+a[d];a=b+"?"+c.substring(1);E("EXP_CSI_BEACON_API")&&navigator.sendBeacon?navigator.sendBeacon&&navigator.sendBeacon(a)||a&&ch(a):a&&ch(a);p("yt.timing.pingSent_",!0,void 0)}
function Ah(a){if(E("EXP_DEFER_CSI_PING")){var b=q("yt.timing.deferredPingArgs_");b&&(a&&(b.yt_fss=a),zh(b))}}function sh(){return q("ytcsi.data_")||vh()}function vh(){var a={tick:{},span:{},info:{}};p("ytcsi.data_",a,void 0);return a};function Bh(){};function Ch(){}x(Ch,Bh);Ch.prototype.U=function(){var a=0;Od(this.na(!0),function(){a++});return a};Ch.prototype.clear=function(){var a=Pd(this.na(!0)),b=this;z(a,function(a){b.remove(a)})};function Dh(a){this.e=a}x(Dh,Ch);g=Dh.prototype;g.isAvailable=function(){if(!this.e)return!1;try{return this.e.setItem("__sak","1"),this.e.removeItem("__sak"),!0}catch(a){return!1}};g.zd=function(a,b){try{this.e.setItem(a,b)}catch(c){if(0==this.e.length)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded";}};g.get=function(a){a=this.e.getItem(a);if(!u(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a};g.remove=function(a){this.e.removeItem(a)};
g.U=function(){return this.e.length};g.na=function(a){var b=0,c=this.e,d=new Md;d.next=function(){if(b>=c.length)throw Ld;var d;d=c.key(b++);if(a)return d;d=c.getItem(d);if(!u(d))throw"Storage mechanism: Invalid value was encountered";return d};return d};g.clear=function(){this.e.clear()};g.key=function(a){return this.e.key(a)};function Eh(){var a=null;try{a=window.localStorage||null}catch(b){}this.e=a}x(Eh,Dh);function Fh(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.e=a}x(Fh,Dh);function Gh(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);}function Hh(a){return eval("("+a+")")}function S(a){return Ih(new Jh(void 0),a)}function Jh(a){this.e=a}
function Ih(a,b){var c=[];Kh(a,b,c);return c.join("")}
function Kh(a,b,c){switch(typeof b){case "string":Lh(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(ea(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Kh(a,a.e?a.e.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Lh(f,c),
c.push(":"),Kh(a,a.e?a.e.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Mh={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Nh=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
function Lh(a,b){b.push('"',a.replace(Nh,function(a){if(a in Mh)return Mh[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Mh[a]=e+b.toString(16)}),'"')};function Oh(a){this.e=a}Oh.prototype.f=function(a,b){n(b)?this.e.zd(a,S(b)):this.e.remove(a)};Oh.prototype.get=function(a){var b;try{b=this.e.get(a)}catch(c){return}if(null!==b)try{return Gh(b)}catch(d){throw"Storage: Invalid value was encountered";}};Oh.prototype.remove=function(a){this.e.remove(a)};function Ph(a){this.e=a}x(Ph,Oh);function Qh(a){this.data=a}function Rh(a){return!n(a)||a instanceof Qh?a:new Qh(a)}Ph.prototype.f=function(a,b){Ph.G.f.call(this,a,Rh(b))};Ph.prototype.h=function(a){a=Ph.G.get.call(this,a);if(!n(a)||a instanceof Object)return a;throw"Storage: Invalid value was encountered";};Ph.prototype.get=function(a){if(a=this.h(a)){if(a=a.data,!n(a))throw"Storage: Invalid value was encountered";}else a=void 0;return a};function Sh(a){this.e=a}x(Sh,Ph);function Th(a){var b=a.creation;a=a.expiration;return!!a&&a<w()||!!b&&b>w()}Sh.prototype.f=function(a,b,c){if(b=Rh(b)){if(c){if(c<w()){Sh.prototype.remove.call(this,a);return}b.expiration=c}b.creation=w()}Sh.G.f.call(this,a,b)};Sh.prototype.h=function(a,b){var c=Sh.G.h.call(this,a);if(c)if(!b&&Th(c))Sh.prototype.remove.call(this,a);else return c};function Uh(a){this.e=a}x(Uh,Sh);function Vh(a,b){var c=[];Od(b,function(a){var b;try{b=Uh.prototype.h.call(this,a,!0)}catch(f){if("Storage: Invalid value was encountered"==f)return;throw f;}n(b)?Th(b)&&c.push(a):c.push(a)},a);return c}function Wh(a,b){var c=Vh(a,b);z(c,function(a){Uh.prototype.remove.call(this,a)},a)}function Xh(){var a=Yh;Wh(a,a.e.na(!0))};function T(a,b,c){var d=c&&0<c?c:0;c=d?w()+1E3*d:0;if((d=d?Yh:Zh)&&window.JSON){u(b)||(b=JSON.stringify(b,void 0));try{d.f(a,b,c)}catch(e){d.remove(a)}}}function U(a){if(!Zh&&!Yh||!window.JSON)return null;var b;try{b=Zh.get(a)}catch(c){}if(!u(b))try{b=Yh.get(a)}catch(d){}if(!u(b))return null;try{b=JSON.parse(b,void 0)}catch(e){}return b}function $h(a){Zh&&Zh.remove(a);Yh&&Yh.remove(a)}var Yh,ai=new Eh;Yh=ai.isAvailable()?new Uh(ai):null;var Zh,bi=new Fh;Zh=bi.isAvailable()?new Uh(bi):null;function ci(){var a={volume:100,muted:!1},b=U("yt-player-volume")||{};a.volume=isNaN(b.volume)?100:Math.min(Math.max(b.volume,0),100);a.muted=void 0==b.muted?!1:b.muted;return a};function di(a,b){C.call(this);this.j=this.l=a;this.R=b;this.I=!1;this.f={};this.fb=this.P=null;this.da=new D;Bb(this,pa(Cb,this.da));this.k={};this.B=this.gb=this.h=this.Gb=this.e=null;this.ma=!1;this.M=this.H=this.Fb=this.n=null;this.hb={};this.kd=["onReady"];this.Ia=[];this.Hb=null;this.ic=0;this.ya={};ei(this);this.ea("onVolumeChange",v(this.Xd,this));this.ea("onError",v(this.Wd,this));this.ea("onTabOrderChange",v(this.od,this));this.ea("onTabAnnounce",v(this.kc,this));this.ea("WATCH_LATER_VIDEO_ADDED",
v(this.Yd,this));this.ea("WATCH_LATER_VIDEO_REMOVED",v(this.Zd,this));this.ea("onMouseWheelCapture",v(this.Td,this));this.ea("onMouseWheelRelease",v(this.Ud,this));this.ea("onMouseMoveCapture",v(this.Rd,this));this.ea("onAdAnnounce",v(this.kc,this));this.eb=!1;this.jc=Ze||Ve;this.za=this.ca=null;Vf(this.l,"mousewheel",this.Bc,!1,this);Vf(this.l,"wheel",this.Bc,!1,this)}x(di,C);g=di.prototype;g.ec=function(a,b){this.F()||(fi(this,a),gi(this,b),this.I&&hi(this))};
function fi(a,b){a.Gb=b;a.e=b.clone();a.h=a.e.attrs.id||a.h;"video-player"==a.h&&(a.h=a.R,a.e.attrs.id=a.R);a.j.id==a.h&&(a.h=a.h+"-player",a.e.attrs.id=a.h);a.e.args.enablejsapi="1";a.e.args.playerapiid=a.R;a.gb||(a.gb=ii(a,a.e.args.jsapicallback||"onYouTubePlayerReady"));a.e.args.jsapicallback=null;var c=a.e.attrs.width;c&&(a.j.style.width=lf(Number(c)||c,!0));if(c=a.e.attrs.height)a.j.style.height=lf(Number(c)||c,!0);a.j.style.overflow="hidden"}g.wd=function(){return this.Gb};
function hi(a){a.e.loaded||(a.e.loaded=!0,"0"!=a.e.args.autoplay?a.f.loadVideoByPlayerVars(a.e.args):a.f.cueVideoByPlayerVars(a.e.args))}function ji(a){if(!n(a.e.disable.flash)){var b=a.e.disable,c;c=cf(bf.getInstance(),a.e.minVersion);b.flash=!c}return!a.e.disable.flash}function ki(a){var b=li(a);b&&b.stopVideo&&b.stopVideo();if(ji(a)){var c=a.e;b&&b.getUpdatedConfigurationData&&(c=Ef(b.getUpdatedConfigurationData()));c.args.autoplay=1;c.args.html5_unavailable="1";fi(a,c);gi(a,"flash")}}
function gi(a,b){if(!a.F()){if(!b){var c;if(!(c=!a.e.html5&&ji(a))){if(!n(a.e.disable.html5)){if(c=zg())c=mi(a)||a.e.assets.js;a.e.disable.html5=!c;c||(a.e.args.html5_unavailable="1")}c=!!a.e.disable.html5}b=c?ji(a)?"flash":"unsupported":"html5"}("flash"==b?a.He:"html5"==b?a.Ie:a.Je).call(a)}}function mi(a){var b=!0,c=li(a);c&&a.e&&(a=a.e,b=B(c,"version")==a.assets.js);return b&&!!q("yt.player.Application.create")}
g.Ie=function(){if(!this.ma){var a=mi(this);if(a&&"html5"==ni(this))this.B="html5",this.I||this.Oa();else if(oi(this),this.B="html5",a&&this.Fb)this.l.appendChild(this.Fb),this.Oa();else{this.e.loaded=!0;var b=v(function(){var a=this.l,b=this.e.clone();q("yt.player.Application.create")(a,b);this.Oa()},this);this.n=b;this.ma=!0;a?this.n():(this.e.assets.js2?(this.n=a=v(function(){Xb(this.e.assets.js2,b);this.n=b},this),Xb(this.e.assets.js,a)):Xb(this.e.assets.js,this.n),pg(this.e.assets.css))}}};
g.He=function(){var a=this.e.clone();if(!this.H){var b=li(this);b&&(this.H=document.createElement("span"),this.H.tabIndex=0,this.Ia.push(L(this.H,"focus",v(this.yc,this))),this.M=document.createElement("span"),this.M.tabIndex=0,this.Ia.push(L(this.M,"focus",v(this.yc,this))),b.parentNode&&b.parentNode.insertBefore(this.H,b),b.parentNode&&b.parentNode.insertBefore(this.M,b.nextSibling))}a.attrs.width=a.attrs.width||"100%";a.attrs.height=a.attrs.height||"100%";if("flash"==ni(this))this.B="flash",this.I||
lg(a,!1,v(this.Oa,this));else{oi(this);this.B="flash";this.e.loaded=!0;b=this.l;b=u(b)?Oc(b):b;a=Ef(a);if(window!=window.top){var c=null;document.referrer&&(c=document.referrer.substring(0,128));a.args.framer=c}c=bf.getInstance();cf(c,a.minVersion)?(c=mg(a,c),kg(b,c,a)):og(b,a,c);this.Oa()}};g.yc=function(){li(this).focus()};function li(a){var b=Nc(a.h);!b&&a.j&&a.j.querySelector&&(b=a.j.querySelector("#"+a.h));return b}
g.Oa=function(){if(!this.F()){var a=li(this),b=!1;try{a&&a.getApiInterface&&a.getApiInterface()&&(b=!0)}catch(c){}if(b)if(this.ma=!1,a.isNotServable&&a.isNotServable(this.e.args.video_id))ki(this);else{ei(this);this.I=!0;a=li(this);a.addEventListener&&(this.P=pi(this,a,"addEventListener"));a.removeEventListener&&(this.fb=pi(this,a,"removeEventListener"));for(var b=a.getApiInterface(),b=b.concat(a.getInternalApiInterface()),d=0;d<b.length;d++){var e=b[d];this.f[e]||(this.f[e]=pi(this,a,e))}for(var f in this.k)this.P(f,
this.k[f]);hi(this);this.gb&&this.gb(this.f);this.da.A("onReady",this.f);a.apiProxyReady&&a.apiProxyReady()}else this.ic=F(v(this.Oa,this),50)}};function pi(a,b,c){var d=b[c];return function(){try{return a.Hb=null,d.apply(b,arguments)}catch(e){"Bad NPObject as private data!"!=e.message&&"sendAbandonmentPing"!=c&&(e.message+=" ("+c+")",a.Hb=e,Kb(e,"WARNING"))}}}
function ei(a){a.I=!1;if(a.fb)for(var b in a.k)a.fb(b,a.k[b]);for(var c in a.ya)G(parseInt(c,10));a.ya={};a.P=null;a.fb=null;for(var d in a.f)a.f[d]=null;a.f.addEventListener=v(a.ea,a);a.f.removeEventListener=v(a.se,a);a.f.destroy=v(a.dispose,a);a.f.getLastError=v(a.xd,a);a.f.getPlayerType=v(a.yd,a);a.f.getCurrentVideoConfig=v(a.wd,a);a.f.loadNewVideoConfig=v(a.ec,a);a.f.isReady=v(a.Te,a)}g.Te=function(){return this.I};
g.ea=function(a,b){if(!this.F()){var c=ii(this,b);if(c){if(!Ia(this.kd,a)&&!this.k[a]){var d=qi(this,a);this.P&&this.P(a,d)}this.da.subscribe(a,c);"onReady"==a&&this.I&&F(pa(c,this.f),0)}}};g.se=function(a,b){if(!this.F()){var c=ii(this,b);c&&this.da.Ga(a,c)}};function ii(a,b){var c=b;if("string"==typeof b){if(a.hb[b])return a.hb[b];c=function(){var a=q(b);a&&a.apply(m,arguments)};a.hb[b]=c}return c?c:null}
function qi(a,b){var c="ytPlayer"+b+a.R;a.k[b]=c;m[c]=function(c){var e=F(function(){if(!a.F()){a.da.A(b,c);var f=a.ya,h=String(e);h in f&&delete f[h]}},0);fb(a.ya,String(e))};return c}g.od=function(a){a=a?Vc:Uc;for(var b=a(document.activeElement);b&&(1!=b.nodeType||b==this.H||b==this.M||(b.focus(),b!=document.activeElement));)b=a(b)};g.kc=function(a){I("a11y-announce",a)};
g.Xd=function(a){var b={};b.volume=isNaN(a.volume)?ci().volume:Math.min(Math.max(a.volume,0),100);b.muted=void 0==a.muted?ci().muted:a.muted;T("yt-player-volume",b,2592E3)};g.Wd=function(a){5==a&&ki(this)};g.Yd=function(a){I("WATCH_LATER_VIDEO_ADDED",a)};g.Zd=function(a){I("WATCH_LATER_VIDEO_REMOVED",a)};g.Sd=function(a){a=a||window.event;a=a.target||a.srcElement;3==a.nodeType&&(a=a.parentNode);if(!Wc(this.l,a))this.f.onExternalMouseMove()};g.Rd=function(){Vf(document,"mousemove",this.Sd,!1,this)};
g.Td=function(){this.jc&&(this.eb||(this.za=Rc(document)),this.ca||(this.ca=Vf(window,"scroll",this.ne,!1,this)));this.eb=!0};g.Ud=function(){this.ca&&(bg(this.ca),this.ca=null);this.eb=!1};g.Bc=function(a){this.eb&&!this.jc&&a.preventDefault()};g.ne=function(){this.za&&window.scrollTo(this.za.x,this.za.y)};
g.Je=function(){oi(this);this.B="unsupported";var a='Adobe Flash Player or an HTML5 supported browser is required for video playback. <br> <a href="http://get.adobe.com/flashplayer/">Get the latest Flash Player</a> <br> <a href="/html5">Learn more about upgrading to an HTML5 browser</a>',b=navigator.userAgent.match(/Version\/(\d).*Safari/);b&&5<=parseInt(b[1],10)&&(a='Adobe Flash Player or QuickTime is required for video playback. <br> <a href="http://get.adobe.com/flashplayer/"> Get the latest Flash Player</a> <br> <a href="http://www.apple.com/quicktime/download/">Get the latest version of QuickTime</a>');
b=this.e.messages.player_fallback||a;a=Nc("player-unavailable");if(Nc("unavailable-submessage")&&a){Nc("unavailable-submessage").innerHTML=b;var b=a||document,c=null;b.getElementsByClassName?c=b.getElementsByClassName("icon")[0]:b.querySelectorAll&&b.querySelector?c=b.querySelector(".icon"):c=Qc("icon",a)[0];if(c=b=c||null)c=b?b.dataset?zb("icon")in b.dataset:b.hasAttribute?!!b.hasAttribute("data-icon"):!!b.getAttribute("data-icon"):!1;c&&(b.src=B(b,"icon"));kc(a,"hid");jc(Nc("player"),"off-screen-trigger")}};
g.yd=function(){return this.B||ni(this)};g.xd=function(){return this.Hb};function ni(a){return(a=li(a))?"div"==a.tagName.toLowerCase()?"html5":"flash":null}function oi(a){rh("dcp");a.cancel();ei(a);a.B=null;a.e&&(a.e.loaded=!1);var b=li(a);"html5"==ni(a)?a.Fb=b:b&&b.destroy&&b.destroy();Tc(a.l);hd(a.Ia);a.Ia.length=0;a.H=null;a.M=null}g.cancel=function(){if(this.n){var a=this.n;this.e.assets.js&&a&&(a=""+ja(a),(a=bc[a])&&Tb(a))}G(this.ic);this.ma=!1};
g.C=function(){oi(this);this.hb=null;for(var a in this.k)m[this.k[a]]=null;this.f=null;delete this.l;delete this.j;this.e&&(this.Gb=this.e=this.e.fallback=null);di.G.C.call(this)};var ri={},si="player_uid_"+(1E9*Math.random()>>>0);function ti(a,b){a=u(a)?Oc(a):a;b=Ef(b);var c=si+"_"+ja(a),d=ri[c];if(d)return d.ec(b),d.f;d=new di(a,c);ri[c]=d;I("player-added",d.f);Bb(d,pa(ui,d));F(function(){d.ec(b)},0);return d.f}function vi(){for(var a in ri){var b=ri[a];b&&b.cancel()}}function wi(a){if(a=Nc(a))a=si+"_"+ja(a),(a=ri[a])&&a.dispose()}function ui(a){ri[a.R]=null}function xi(a){a=Nc(a);if(!a)return null;var b=si+"_"+ja(a),c=ri[b];c||(c=new di(a,b),ri[b]=c);return c.f};var yi=q("yt.abuse.botguardInitialized")||fc;p("yt.abuse.botguardInitialized",yi,void 0);var zi=q("yt.abuse.invokeBotguard")||gc;p("yt.abuse.invokeBotguard",zi,void 0);var Ai=q("yt.player.exports.navigate")||Jd;p("yt.player.exports.navigate",Ai,void 0);var Bi=q("yt.player.embed")||ti;p("yt.player.embed",Bi,void 0);var Ci=q("yt.player.destroy")||wi;p("yt.player.destroy",Ci,void 0);var Di=q("yt.player.cancelAll")||vi;p("yt.player.cancelAll",Di,void 0);var Ei=q("yt.player.getPlayerByElement")||xi;
p("yt.player.getPlayerByElement",Ei,void 0);var Fi=q("yt.player.exports.feedbackStart")||yf;p("yt.player.exports.feedbackStart",Fi,void 0);var Gi=q("yt.player.exports.feedbackShowArticle")||zf;p("yt.player.exports.feedbackShowArticle",Gi,void 0);var Hi=q("yt.util.activity.init")||pd;p("yt.util.activity.init",Hi,void 0);var Ii=q("yt.util.activity.getTimeSinceActive")||rd;p("yt.util.activity.getTimeSinceActive",Ii,void 0);var Ji=q("yt.util.activity.setTimestamp")||qd;
p("yt.util.activity.setTimestamp",Ji,void 0);function Ki(a){O.call(this,1,arguments);this.e=a}x(Ki,O);function Li(a){O.call(this,1,arguments);this.e=a}x(Li,O);function Mi(a,b,c){O.call(this,1,arguments);this.f=a;this.isEnabled=b;this.e=c||null}x(Mi,O);function Ni(a,b){O.call(this,1,arguments);this.e=a;this.isEnabled=b}x(Ni,O);function Oi(a,b,c,d,e){O.call(this,2,arguments);this.f=a;this.e=b;this.j=c||null;this.h=d||null;this.source=e||null}x(Oi,O);function Pi(a,b,c){O.call(this,1,arguments);this.e=a;this.Qa=b}x(Pi,O);
function Qi(a,b,c,d,e,f,h){O.call(this,1,arguments);this.f=a;this.Qa=b;this.e=c;this.k=d||null;this.j=e||null;this.h=f||null;this.source=h||null}x(Qi,O);
var Ri=new P("subscription-batch-pref-email",Mi),Si=new P("subscription-batch-pref-uploads",Mi),Ti=new P("subscription-batch-subscribe",Ki),Ui=new P("subscription-batch-unsubscribe",Ki),Vi=new P("subscription-pref-email",Ni),Wi=new P("subscription-pref-uploads",Ni),Xi=new P("subscription-subscribe",Oi),Yi=new P("subscription-subscribe-loading",Li),Zi=new P("subscription-subscribe-loaded",Li),$i=new P("subscription-subscribe-success",Pi),aj=new P("subscription-subscribe-external",Oi),bj=new P("subscription-unsubscribe",
Qi),cj=new P("subscription-unsubscirbe-loading",Li),dj=new P("subscription-unsubscribe-loaded",Li),ej=new P("subscription-unsubscribe-success",Li),fj=new P("subscription-external-unsubscribe",Qi),gj=new P("subscription-enable-ypc",Li),hj=new P("subscription-disable-ypc",Li);function ij(a,b,c){var d=document.location.protocol+"//"+document.domain+"/post_login";b&&(d=Cd(d,"mode",b));b=Cd("/signin?context=popup","next",d);c&&(b=Cd(b,"feature",c));if(c=window.open(b,"loginPopup","width=375,height=440,resizable=yes,scrollbars=yes",!0))b=H("LOGGED_IN",function(b){Tb(E("LOGGED_IN_PUBSUB_KEY"));Gb("LOGGED_IN",!0);a(b)}),Gb("LOGGED_IN_PUBSUB_KEY",b),c.moveTo((screen.width-375)/2,(screen.height-440)/2)}p("yt.pubsub.publish",I,void 0);var jj=null;"undefined"!=typeof XMLHttpRequest?jj=function(){return new XMLHttpRequest}:"undefined"!=typeof ActiveXObject&&(jj=function(){return new ActiveXObject("Microsoft.XMLHTTP")});function kj(a,b,c,d,e,f,h){function k(){4==(l&&"readyState"in l?l.readyState:0)&&b&&Ib(b)(l)}var l=jj&&jj();if(!("open"in l))return null;"onloadend"in l?l.addEventListener("loadend",k,!1):l.onreadystatechange=k;c=(c||"GET").toUpperCase();d=d||"";l.open(c,a,!0);f&&(l.responseType=f);h&&(l.withCredentials=!0);f="POST"==c;if(e=lj(a,e))for(var r in e)l.setRequestHeader(r,e[r]),"content-type"==r.toLowerCase()&&(f=!1);f&&l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.send(d);return l}
function lj(a,b){b=b||{};for(var c in mj){var d=E(mj[c]),e;if(e=d){e=a;var f=void 0;f=window.location.href;var h=td(e)[1]||null,k=Fd(e);h&&k?(e=td(e),f=td(f),e=e[3]==f[3]&&e[1]==f[1]&&e[4]==f[4]):e=k?Fd(f)==k&&(Number(td(f)[4]||null)||null)==(Number(td(e)[4]||null)||null):!0;e||(e=c,f=E("CORS_HEADER_WHITELIST")||{},e=(h=Fd(a))?(f=f[h])?Ia(f,e):!1:!0)}e&&(b[c]=d)}return b}
function nj(a,b){var c=E("XSRF_FIELD_NAME"),d;b.headers&&(d=b.headers["Content-Type"]);return!b.ff&&(!Fd(a)||Fd(a)==document.location.hostname)&&"POST"==b.method&&(!d||"application/x-www-form-urlencoded"==d)&&!(b.N&&b.N[c])}
function oj(a,b){var c=b.format||"JSON";b.hf&&(a=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+a);var d=E("XSRF_FIELD_NAME"),e=E("XSRF_TOKEN"),f=b.cc;f&&(f[d]&&delete f[d],a=Gd(a,f));var h=b.jf||"",f=b.N;nj(a,b)&&(f||(f={}),f[d]=e);f&&u(h)&&(d=Ed(h),jb(d,f),h=Bd(d));var k=!1,l,r=kj(a,function(a){if(!k){k=!0;l&&G(l);var d;a:switch(a&&"status"in a?a.status:-1){case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 304:d=
!0;break a;default:d=!1}var e=null;if(d||400<=a.status&&500>a.status)e=pj(c,a,b.df);if(d)a:{switch(c){case "XML":d=0==parseInt(e&&e.return_code,10);break a;case "RAW":d=!0;break a}d=!!e}var e=e||{},f=b.context||m;d?b.X&&b.X.call(f,a,e):b.onError&&b.onError.call(f,a,e);b.Wb&&b.Wb.call(f,a,e)}},b.method,h,b.headers,b.responseType,b.withCredentials);b.vb&&0<b.timeout&&(l=F(function(){k||(k=!0,r.abort(),G(l),b.vb.call(b.context||m,r))},b.timeout));return r}
function pj(a,b,c){var d=null;switch(a){case "JSON":a=b.responseText;b=b.getResponseHeader("Content-Type")||"";a&&0<=b.indexOf("json")&&(d=Hh(a));break;case "XML":if(b=(b=b.responseXML)?qj(b):null)d={},z(b.getElementsByTagName("*"),function(a){d[a.tagName]=rj(a)})}if(c)for(var e in d)if("html_content"==e||sa(e))d[e]=Kd(mb(),d[e]);return d}function qj(a){return a?(a=("responseXML"in a?a.responseXML:a).getElementsByTagName("root"))&&0<a.length?a[0]:null:null}
function rj(a){var b="";z(a.childNodes,function(a){b+=a.nodeValue});return b}var mj={"X-YouTube-Page-CL":"PAGE_CL","X-YouTube-Page-Timestamp":"PAGE_BUILD_TIMESTAMP","X-YouTube-Variants-Checksum":"VARIANTS_CHECKSUM"};function sj(){var a=E("PLAYER_CONFIG");return a&&a.args&&void 0!==a.args.authuser?!0:!(!E("SESSION_INDEX")&&!E("LOGGED_IN"))};var tj={},uj="ontouchstart"in document;function vj(a,b,c){var d;switch(a){case "mouseover":case "mouseout":d=3;break;case "mouseenter":case "mouseleave":d=9}return Zc(c,function(a){return ic(a,b)},!0,d)}
function wj(a){var b="mouseover"==a.type&&"mouseenter"in tj||"mouseout"==a.type&&"mouseleave"in tj,c=a.type in tj||b;if("HTML"!=a.target.tagName&&c){if(b){var b="mouseover"==a.type?"mouseenter":"mouseleave",c=tj[b],d;for(d in c.aa){var e=vj(b,d,a.target);e&&!Zc(a.relatedTarget,function(a){return a==e},!0)&&c.A(d,e,b,a)}}if(b=tj[a.type])for(d in b.aa)(e=vj(a.type,d,a.target))&&b.A(d,e,a.type,a)}}L(document,"blur",wj,!0);L(document,"change",wj,!0);L(document,"click",wj);L(document,"focus",wj,!0);
L(document,"mouseover",wj);L(document,"mouseout",wj);L(document,"mousedown",wj);L(document,"keydown",wj);L(document,"keyup",wj);L(document,"keypress",wj);L(document,"cut",wj);L(document,"paste",wj);uj&&(L(document,"touchstart",wj),L(document,"touchend",wj),L(document,"touchcancel",wj));function xj(){this.f={};this.Lc=[];this.h=[]}function yj(a,b){return"yt-uix"+(a.Lb?"-"+a.Lb:"")+(b?"-"+b:"")}xj.prototype.init=t;xj.prototype.dispose=t;function zj(a,b,c){a.h.push(lh(b,c,a))}function Aj(a,b,c){var d=yj(a,void 0),e=v(c,a);b in tj||(tj[b]=new D);tj[b].subscribe(d,e);a.f[c]=e}function Bj(a,b){yb(a,"tooltip-text",b)}xj.prototype.removeData=function(a,b){a&&(a.dataset?delete a.dataset[zb(b)]:a.removeAttribute("data-"+b))};function Cj(){xj.call(this);this.e={}}x(Cj,xj);ca(Cj);g=Cj.prototype;g.Lb="tooltip";g.rb=0;g.register=function(){Aj(this,"mouseover",this.xc);Aj(this,"mouseout",this.tb);Aj(this,"click",this.tb);Aj(this,"touchstart",this.Fe);Aj(this,"touchend",this.Tc);Aj(this,"touchcancel",this.Tc)};g.dispose=function(){for(var a in this.e)this.tb(this.e[a]);this.e={}};
g.xc=function(a){if(!(this.rb&&1E3>w()-this.rb)){var b=parseInt(B(a,"tooltip-hide-timer"),10);b&&(this.removeData(a,"tooltip-hide-timer"),G(b));var b=v(function(){Dj(this,a);this.removeData(a,"tooltip-show-timer")},this),c=parseInt(B(a,"tooltip-show-delay"),10)||0,b=F(b,c);yb(a,"tooltip-show-timer",b.toString());a.title&&(Bj(a,Ej(a)),a.title="");b=ja(a).toString();this.e[b]=a}};
g.tb=function(a){var b=parseInt(B(a,"tooltip-show-timer"),10);b&&(G(b),this.removeData(a,"tooltip-show-timer"));b=v(function(){if(a){var b=Nc(Fj(this,a));b&&(Gj(b),b&&b.parentNode&&b.parentNode.removeChild(b),this.removeData(a,"content-id"))}this.removeData(a,"tooltip-hide-timer")},this);b=F(b,50);yb(a,"tooltip-hide-timer",b.toString());if(b=B(a,"tooltip-text"))a.title=b;b=ja(a).toString();delete this.e[b]};g.Fe=function(a,b){this.rb=0;var c=vj(b,yj(this),null[0].target);this.xc(c)};
g.Tc=function(a,b){this.rb=w();var c=vj(b,yj(this),null[0].target);this.tb(c)};function Hj(a,b){Bj(a,b);var c=B(a,"content-id");if(c=Nc(c))if("textContent"in c)c.textContent=b;else if(3==c.nodeType)c.data=b;else if(c.firstChild&&3==c.firstChild.nodeType){for(;c.lastChild!=c.firstChild;)c.removeChild(c.lastChild);c.firstChild.data=b}else{Tc(c);var d=Mc(c);c.appendChild(d.createTextNode(String(b)))}}function Ej(a){return B(a,"tooltip-text")||a.title}
function Dj(a,b){if(b){var c=Ej(b);if(c){var d=Nc(Fj(a,b));if(!d){d=document.createElement("div");d.id=Fj(a,b);d.className=yj(a,"tip");var e=document.createElement("div");e.className=yj(a,"tip-body");var f=document.createElement("div");f.className=yj(a,"tip-arrow");var h=document.createElement("div");h.className=yj(a,"tip-content");var k=Ij(a,b),l=Fj(a,b,"content");h.id=l;yb(b,"content-id",l);e.appendChild(h);k&&d.appendChild(k);d.appendChild(e);d.appendChild(f);(cd()||document.body).appendChild(d);
Hj(b,c);(c=parseInt(B(b,"tooltip-max-width"),10))&&e.offsetWidth>c&&(e.style.width=c+"px",jc(h,yj(a,"normal-wrap")));h=ic(b,yj(a,"reverse"));Jj(a,b,d,e,k,h)||Jj(a,b,d,e,k,!h);var r=yj(a,"tip-visible");F(function(){jc(d,r)},0)}}}}
function Jj(a,b,c,d,e,f){lc(c,yj(a,"tip-reverse"),f);var h=0;f&&(h=1);a=mf(b);f=new mc((a.width-10)/2,f?a.height:0);var k=Mc(b),l=new mc(0,0),r;r=k?Mc(k):document;var N;(N=!K||Gc(9))||(N=Kc(r),N=Sc(N.e));b!=(N?r.documentElement:r.body)&&(r=kf(b),k=Kc(k),k=Rc(k.e),l.x=r.left+k.x,l.y=r.top+k.y);f=new mc(l.x+f.x,l.y+f.y);f=f.clone();l=(h&4&&"rtl"==jf(c,"direction")?h^2:h)&-5;h=mf(c);k=h.clone();r=f.clone();k=k.clone();0!=l&&(l&2&&(r.x-=k.width+0),l&1&&(r.y-=k.height+0));f=new gf(0,0,0,0);f.left=r.x;
f.top=r.y;f.width=k.width;f.height=k.height;k=new mc(f.left,f.top);k instanceof mc?(l=k.x,k=k.y):(l=k,k=void 0);c.style.left=lf(l,!1);c.style.top=lf(k,!1);k=new nc(f.width,f.height);if(!(h==k||h&&k&&h.width==k.width&&h.height==k.height))if(h=k,f=Mc(c),f=Kc(f),l=Sc(f.e),!K||Fc("10")||l&&Fc("8"))f=c.style,xc?f.MozBoxSizing="border-box":yc?f.WebkitBoxSizing="border-box":f.boxSizing="border-box",f.width=Math.max(h.width,0)+"px",f.height=Math.max(h.height,0)+"px";else if(f=c.style,l){K?(l=pf(c,"paddingLeft"),
k=pf(c,"paddingRight"),r=pf(c,"paddingTop"),N=pf(c,"paddingBottom"),l=new ff(r,k,N,l)):(l=hf(c,"paddingLeft"),k=hf(c,"paddingRight"),r=hf(c,"paddingTop"),N=hf(c,"paddingBottom"),l=new ff(parseFloat(r),parseFloat(k),parseFloat(N),parseFloat(l)));if(K&&!Gc(9)){k=rf(c,"borderLeft");r=rf(c,"borderRight");N=rf(c,"borderTop");var aa=rf(c,"borderBottom"),k=new ff(N,r,aa,k)}else k=hf(c,"borderLeftWidth"),r=hf(c,"borderRightWidth"),N=hf(c,"borderTopWidth"),aa=hf(c,"borderBottomWidth"),k=new ff(parseFloat(N),
parseFloat(r),parseFloat(aa),parseFloat(k));f.pixelWidth=h.width-k.left-l.left-l.right-k.right;f.pixelHeight=h.height-k.top-l.top-l.bottom-k.bottom}else f.pixelWidth=h.width,f.pixelHeight=h.height;h=window.document;h=Sc(h)?h.documentElement:h.body;h=new nc(h.clientWidth,h.clientHeight);1==c.nodeType?(c=kf(c),k=new mc(c.left,c.top)):(f=ha(c.f),l=c,c.targetTouches&&c.targetTouches.length?l=c.targetTouches[0]:f&&c.e.targetTouches&&c.e.targetTouches.length&&(l=c.e.targetTouches[0]),k=new mc(l.clientX,
l.clientY));c=mf(d);r=Math.floor(c.width/2);f=!!(h.height<k.y+a.height);a=!!(k.y<a.height);l=!!(k.x<r);h=!!(h.width<k.x+r);k=(c.width+3)/-2- -5;b=B(b,"force-tooltip-direction");if("left"==b||l)k=-5;else if("right"==b||h)k=20-c.width-3;b=Math.floor(k)+"px";d.style.left=b;e&&(e.style.left=b,e.style.height=c.height+"px",e.style.width=c.width+"px");return!(f||a)}function Fj(a,b,c){a=yj(a);var d=b.__yt_uid_key;d||(d=ad(),b.__yt_uid_key=d);b=a+d;c&&(b+="-"+c);return b}
function Ij(a,b){var c=null;Ac&&ic(b,yj(a,"masked"))&&((c=Nc("yt-uix-tooltip-shared-mask"))?(c.parentNode.removeChild(c),tf(c)):(c=document.createElement("iframe"),c.src='javascript:""',c.id="yt-uix-tooltip-shared-mask",c.className=yj(a,"tip-mask")));return c}function Gj(a){var b=Nc("yt-uix-tooltip-shared-mask"),c=b&&Zc(b,function(b){return b==a},!1,2);b&&c&&(b.parentNode.removeChild(b),uf(b),document.body.appendChild(b))};function Kj(){xj.call(this)}x(Kj,xj);ca(Kj);Kj.prototype.Lb="subscription-button";Kj.prototype.register=function(){Aj(this,"click",this.qc);zj(this,Yi,this.Ac);zj(this,Zi,this.zc);zj(this,$i,this.ge);zj(this,cj,this.Ac);zj(this,dj,this.zc);zj(this,ej,this.le);zj(this,gj,this.Qd);zj(this,hj,this.Pd)};
var Yc={fc:"hover-enabled",ad:"yt-uix-button-subscribe",bd:"yt-uix-button-subscribed",Ue:"ypc-enabled",cd:"yt-uix-button-subscription-container",ed:"yt-subscription-button-disabled-mask-container"},Lj={Ve:"channel-external-id",fd:"subscriber-count-show-when-subscribed",gd:"subscriber-count-tooltip",hd:"subscriber-count-title",We:"href",gc:"is-subscribed",Ye:"parent-url",$e:"sessionlink",jd:"style-type",hc:"subscription-id",bf:"target",ld:"ypc-enabled"};g=Kj.prototype;
g.qc=function(a){var b=B(a,"href"),c=sj();if(b)a=B(a,"target")||"_self",window.open(b,a);else if(c){var b=B(a,"channel-external-id"),c=B(a,"sessionlink"),d;if(B(a,"ypc-enabled")){d=B(a,"ypc-item-type");var e=B(a,"ypc-item-id");d={itemType:d,itemId:e,subscriptionElement:a}}else d=null;e=B(a,"parent-url");if(B(a,"is-subscribed")){var f=B(a,"subscription-id");Q(bj,new Qi(b,f,d,a,c,e))}else Q(Xi,new Oi(b,d,c,e))}else Mj(this,a)};g.Ac=function(a){this.Ja(a.e,this.Qc,!0)};
g.zc=function(a){this.Ja(a.e,this.Qc,!1)};g.ge=function(a){this.Ja(a.e,this.Rc,!0,a.Qa)};g.le=function(a){this.Ja(a.e,this.Rc,!1)};g.Qd=function(a){this.Ja(a.e,this.rd)};g.Pd=function(a){this.Ja(a.e,this.qd)};g.Rc=function(a,b,c){b?(yb(a,Lj.gc,"true"),c&&yb(a,Lj.hc,c)):(this.removeData(a,Lj.gc),this.removeData(a,Lj.hc));Nj(a)};g.Qc=function(a,b){var c;c=Xc(a);lc(c,Yc.ed,b);a.setAttribute("aria-busy",b?"true":"false");a.disabled=b};
function Nj(a){var b=B(a,Lj.jd),c=!!B(a,"is-subscribed"),b="-"+b,d=Yc.bd+b;lc(a,Yc.ad+b,!c);lc(a,d,c);B(a,Lj.gd)&&!B(a,Lj.fd)&&(b=yj(Cj.getInstance()),lc(a,b,!c),a.title=c?"":B(a,Lj.hd));c?F(function(){jc(a,Yc.fc)},1E3):kc(a,Yc.fc)}g.rd=function(a){var b=!!B(a,"ypc-item-type"),c=!!B(a,"ypc-item-id");!B(a,"ypc-enabled")&&b&&c&&(jc(a,"ypc-enabled"),yb(a,Lj.ld,"true"))};g.qd=function(a){B(a,"ypc-enabled")&&(kc(a,"ypc-enabled"),this.removeData(a,"ypc-enabled"))};
function Oj(a,b){var c=Pc(yj(a));return Da(c,function(a){return b==B(a,"channel-external-id")},a)}g.nd=function(a,b,c){var d=Sa(arguments,2);z(a,function(a){b.apply(this,Oa(a,d))},this)};g.Ja=function(a,b,c){var d=Oj(this,a),d=Oa([d],Sa(arguments,1));this.nd.apply(this,d)};function Mj(a,b){var c=v(function(a){a.discoverable_subscriptions&&Gb("SUBSCRIBE_EMBED_DISCOVERABLE_SUBSCRIPTIONS",a.discoverable_subscriptions);this.qc(b)},a);ij(c,"subscribe","sub_button")};var Pj=window.yt&&window.yt.uix&&window.yt.uix.widgets_||{};p("yt.uix.widgets_",Pj,void 0);function Qj(a){return(0==a.search("cue")||0==a.search("load"))&&"loadModule"!=a}function Rj(a,b,c){u(a)&&(a={mediaContentUrl:a,startSeconds:b,suggestedQuality:c});b=a;c=/\/([ve]|embed)\/([^#?]+)/.exec(a.mediaContentUrl);b.videoId=c&&c[2]?c[2]:null;return Sj(a)}
function Sj(a,b,c){if(ia(a)){b="endSeconds startSeconds mediaContentUrl suggestedQuality videoId two_stage_token".split(" ");c={};for(var d=0;d<b.length;d++){var e=b[d];a[e]&&(c[e]=a[e])}return c}return{videoId:a,startSeconds:b,suggestedQuality:c}}
function Tj(a,b,c,d){if(ia(a)&&!ea(a)){b="playlist list listType index startSeconds suggestedQuality".split(" ");c={};for(d=0;d<b.length;d++){var e=b[d];a[e]&&(c[e]=a[e])}return c}c={index:b,startSeconds:c,suggestedQuality:d};u(a)&&16==a.length?c.list="PL"+a:c.playlist=a;return c}
function Uj(a){var b=a.video_id||a.videoId;if(u(b)){var c=U("yt-player-two-stage-token")||{},d=U("yt-player-two-stage-token")||{};n(void 0)?d[b]=void 0:delete d[b];T("yt-player-two-stage-token",d,300);(b=c[b])&&(a.two_stage_token=b)}};var Vj=w(),Wj=null,Xj=Array(50),Yj=-1,Zj=!1;function ak(a){bk();Wj.push(a);ck(Wj)}function dk(a){var b=q("yt.mdx.remote.debug.handlers_");Ma(b||[],a)}function ek(a,b){bk();var c=Wj,d=fk(a,String(b));0==c.length?gk(d):(ck(c),z(c,function(a){a(d)}))}function bk(){Wj||(Wj=q("yt.mdx.remote.debug.handlers_")||[],p("yt.mdx.remote.debug.handlers_",Wj,void 0))}function gk(a){var b=(Yj+1)%50;Yj=b;Xj[b]=a;Zj||(Zj=49==b)}
function ck(a){var b=Xj;if(b[0]){var c=Yj,d=Zj?c:-1;do{var d=(d+1)%50,e=b[d];z(a,function(a){a(e)})}while(d!=c);Xj=Array(50);Yj=-1;Zj=!1}}function fk(a,b){var c=(w()-Vj)/1E3;c.toFixed&&(c=c.toFixed(3));var d=[];d.push("[",c+"s","] ");d.push("[","yt.mdx.remote","] ");d.push(a+": "+b,"\n");return d.join("")};function hk(a){a=a||{};this.name=a.name||"";this.id=a.id||a.screenId||"";this.token=a.token||a.loungeToken||"";this.uuid=a.uuid||a.dialId||""}function ik(a,b){return!!b&&(a.id==b||a.uuid==b)}function jk(a,b){return a||b?!a!=!b?!1:a.id==b.id:!0}function kk(a,b){return a||b?!a!=!b?!1:a.id==b.id&&a.token==b.token&&a.name==b.name&&a.uuid==b.uuid:!0}function lk(a){return{name:a.name,screenId:a.id,loungeToken:a.token,dialId:a.uuid}}function mk(a){return new hk(a)}
function nk(a){return ea(a)?A(a,mk):[]}function ok(a){return a?'{name:"'+a.name+'",id:'+a.id.substr(0,6)+"..,token:"+(a.token?".."+a.token.slice(-6):"-")+",uuid:"+(a.uuid?".."+a.uuid.slice(-6):"-")+"}":"null"}function pk(a){return ea(a)?"["+A(a,ok).join(",")+"]":"null"};var qk=["boadgeojelhgndaghljhdicfkmllpafd","dliochdbjfkdbacpmhlcpmleaejidimm","hfaagokkkhdbgiakmmlclaapfelnkoah","fmfcbgogabcbclcofgocippekhfcmgfj","enhhojjnijigcajfphajepfemndkmdlo"];function rk(a,b){a==qk.length?b(null):sk(qk[a],function(c){c?(c=qk[a],T("yt-remote-cast-last-extension",c),b(c)):rk(a+1,b)})}function tk(a){return"chrome-extension://"+a+"/cast_sender.js"}
function sk(a,b){var c=new XMLHttpRequest;c.onreadystatechange=function(){4==c.readyState&&200==c.status&&b(!0)};c.onerror=function(){b(!1)};try{c.open("GET",tk(a),!0),c.send()}catch(d){b(!1)}}
function uk(a){window.__onGCastApiAvailable=a;vk(function(b){if(b){ek("bootstrap","Found cast extension: "+b);p("chrome.cast.extensionId",b,void 0);var c=document.createElement("script");c.src=tk(b);c.onerror=function(){wk();$h("yt-remote-cast-last-extension");a(!1,"Extension JS failed to load.")};(document.head||document.documentElement).appendChild(c)}else ek("bootstrap","No cast extension found"),a(!1,"No cast extension found")})}
function wk(){window.__onGCastApiAvailable&&delete window.__onGCastApiAvailable}function vk(a){var b=U("yt-remote-cast-last-extension");b?a(b):rk(0,a)};var xk={SKA_SKIPPABLE_ADS:"ska",Ze:"que",Xe:"mus",af:"sus"};function yk(a){this.port=this.h="";this.e="/api/lounge";this.f=!0;a=a||document.location.href;var b=Number(td(a)[4]||null)||null||"";b&&(this.port=":"+b);this.h=vd(a)||"";a=oc;0<=a.search("MSIE")&&(a=a.match(/MSIE ([\d.]+)/)[1],0>ya(a,"10.0")&&(this.f=!1))}function zk(a,b,c,d){var e=a.e;if(n(d)?d:a.f)e="https://"+a.h+a.port+a.e;return Dd(e+b,c||{})}
function Ak(a,b,c,d,e){a={format:"JSON",method:"POST",context:a,timeout:5E3,withCredentials:!1,X:pa(a.k,d,!0),onError:pa(a.j,e),vb:pa(a.l,e)};c&&(a.N=c,a.headers={"Content-Type":"application/x-www-form-urlencoded"});return oj(b,a)}yk.prototype.k=function(a,b,c,d){b?a(d):a({text:c.responseText})};yk.prototype.j=function(a,b){a(Error("Request error: "+b.status))};yk.prototype.l=function(a){a(Error("request timed out"))};function Bk(a){a&&(this.id=a.id||"",this.name=a.name||"",this.e=a.activityId||"",this.status=a.status||"UNKNOWN")}Bk.prototype.id="";Bk.prototype.name="";Bk.prototype.e="";Bk.prototype.status="UNKNOWN";function Ck(a){return{id:a.id,name:a.name,activityId:a.e,status:a.status}}Bk.prototype.toString=function(){return"{id:"+this.id+",name:"+this.name+",activityId:"+this.e+",status:"+this.status+"}"};function Dk(a){a=a||[];return"["+A(a,function(a){return a?a.toString():"null"}).join(",")+"]"};function Ek(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)})}function Fk(a,b){return Ga(a,function(a){return a.key==b})}function Gk(a){return A(a,function(a){return{key:a.id,name:a.name}})}function Hk(a){return A(a,function(a){return Ck(a)})}function Ik(a){return A(a,function(a){return new Bk(a)})}function Jk(a,b){return a||b?a&&b?a.id==b.id&&a.name==b.name:!1:!0}
function Kk(a,b){return Ga(a,function(a){return a.id==b})}function Lk(a,b){return Ga(a,function(a){return jk(a,b)})}function Mk(a,b){return Ga(a,function(a){return ik(a,b)})};function V(){C.call(this);this.j=new D;Bb(this,pa(Cb,this.j))}x(V,C);V.prototype.subscribe=function(a,b,c){return this.F()?0:this.j.subscribe(a,b,c)};V.prototype.Ga=function(a,b,c){return this.F()?!1:this.j.Ga(a,b,c)};V.prototype.ka=function(a){return this.F()?!1:this.j.ka(a)};V.prototype.A=function(a,b){return this.F()?!1:this.j.A.apply(this.j,arguments)};function Nk(a){V.call(this);this.n=a;this.screens=[]}x(Nk,V);g=Nk.prototype;g.V=function(){return this.screens};g.contains=function(a){return!!Lk(this.screens,a)};g.get=function(a){return a?Mk(this.screens,a):null};function Ok(a,b){var c=a.get(b.uuid)||a.get(b.id);if(c){var d=c.name;c.id=b.id||c.id;c.name=b.name;c.token=b.token;c.uuid=b.uuid||c.uuid;return c.name!=d}a.screens.push(b);return!0}
function Pk(a,b){var c=a.screens.length!=b.length;a.screens=Da(a.screens,function(a){return!!Lk(b,a)});for(var d=0,e=b.length;d<e;d++)c=Ok(a,b[d])||c;return c}function Qk(a,b){var c=a.screens.length;a.screens=Da(a.screens,function(a){return!jk(a,b)});return a.screens.length<c}g.info=function(a){ek(this.n,a)};g.warn=function(a){ek(this.n,a)};function Rk(a,b,c,d){V.call(this);this.B=a;this.n=b;this.k=c;this.l=d;this.h=0;this.e=null;this.f=NaN}x(Rk,V);var Sk=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g=Rk.prototype;g.start=function(){!this.e&&isNaN(this.f)&&this.Kc()};g.stop=function(){this.e&&(this.e.abort(),this.e=null);isNaN(this.f)||(G(this.f),this.f=NaN)};g.C=function(){this.stop();Rk.G.C.call(this)};
g.Kc=function(){this.f=NaN;this.e=oj(zk(this.B,"/pairing/get_screen"),{method:"POST",N:{pairing_code:this.n},timeout:5E3,X:v(this.Me,this),onError:v(this.Le,this),vb:v(this.Ne,this)})};g.Me=function(a,b){this.e=null;var c=b.screen||{};c.dialId=this.k;c.name=this.l;this.A("pairingComplete",new hk(c))};
g.Le=function(a){this.e=null;a.status&&404==a.status?this.h>=Sk.length?this.A("pairingFailed",Error("DIAL polling timed out")):(a=Sk[this.h],this.f=F(v(this.Kc,this),a),this.h++):this.A("pairingFailed",Error("Server error "+a.status))};g.Ne=function(){this.e=null;this.A("pairingFailed",Error("Server not responding"))};function Tk(a){a&&(this.id=a.id||a.name,this.name=a.name,this.md=a.app,this.type=a.type||"REMOTE_CONTROL",this.avatar=a.userAvatarUri||"",this.theme=a.theme||"u",this.capabilities=new $d(Da((a.capabilities||"").split(","),pa(Za,xk))))}Tk.prototype.id="";Tk.prototype.name="";g=Tk.prototype;g.md="";g.type="REMOTE_CONTROL";g.avatar="";g.theme="u";g.equals=function(a){return a?this.id==a.id:!1};var Uk;function Vk(){var a=Wk(),b=Xk();Ia(a,b);if(Yk()){var c=a,d;d=0;for(var e=c.length,f;d<e;){var h=d+e>>1,k;k=Va(b,c[h]);0<k?d=h+1:(e=h,f=!k)}d=f?d:~d;0>d&&Ra(c,-(d+1),0,b)}a=Zk(a);if(0==a.length)try{a="remote_sid",md.remove(""+a,"/","youtube.com")}catch(l){}else try{nd("remote_sid",a.join(","),-1)}catch(r){}}function Wk(){var a=U("yt-remote-connected-devices")||[];a.sort(Va);return a}
function Zk(a){if(0==a.length)return[];var b=a[0].indexOf("#"),c=-1==b?a[0]:a[0].substring(0,b);return A(a,function(a,b){return 0==b?a:a.substring(c.length)})}function $k(a){T("yt-remote-connected-devices",a,86400)}function Xk(){if(al)return al;var a=U("yt-remote-device-id");a||(a=Ek(),T("yt-remote-device-id",a,31536E3));for(var b=Wk(),c=1,d=a;Ia(b,d);)c++,d=a+"#"+c;return al=d}function bl(){return U("yt-remote-session-browser-channel")}function Yk(){return U("yt-remote-session-screen-id")}
function cl(a){5<a.length&&(a=a.slice(a.length-5));var b=A(dl(),function(a){return a.loungeToken}),c=A(a,function(a){return a.loungeToken});Fa(c,function(a){return!Ia(b,a)})&&el();T("yt-remote-local-screens",a,31536E3)}function dl(){return U("yt-remote-local-screens")||[]}function el(){T("yt-remote-lounge-token-expiration",!0,86400)}function fl(){return!U("yt-remote-lounge-token-expiration")}function gl(a){T("yt-remote-online-screens",a,60)}function hl(){return U("yt-remote-online-screens")||[]}
function il(a){T("yt-remote-online-dial-devices",a,30)}function jl(){return U("yt-remote-online-dial-devices")||[]}function kl(a,b){T("yt-remote-session-browser-channel",a);T("yt-remote-session-screen-id",b);var c=Wk(),d=Xk();Ia(c,d)||c.push(d);$k(c);Vk()}function ll(a){a||($h("yt-remote-session-screen-id"),$h("yt-remote-session-video-id"));Vk();a=Wk();Ma(a,Xk());$k(a)}
function ml(){if(!Uk){var a;a=new Eh;(a=a.isAvailable()?a:null)&&(Uk=new Oh(a))}return Uk?!!Uk.get("yt-remote-use-staging-server"):!1}var al="";function nl(a){Nk.call(this,"LocalScreenService");this.f=a;this.e=NaN;ol(this);this.info("Initializing with "+pk(this.screens))}x(nl,Nk);g=nl.prototype;g.start=function(){ol(this)&&this.A("screenChange");fl()&&pl(this);G(this.e);this.e=F(v(this.start,this),1E4)};g.add=function(a,b){ol(this);Ok(this,a);ql(this,!1);this.A("screenChange");b(a);a.token||pl(this)};g.remove=function(a,b){var c=ol(this);Qk(this,a)&&(ql(this,!1),c=!0);b(a);c&&this.A("screenChange")};
g.Bb=function(a,b,c,d){var e=ol(this),f=this.get(a.id);f?(f.name!=b&&(f.name=b,ql(this,!1),e=!0),c(a)):d(Error("no such local screen."));e&&this.A("screenChange")};g.C=function(){G(this.e);nl.G.C.call(this)};function pl(a){if(a.screens.length){var b=A(a.screens,function(a){return a.id}),c=zk(a.f,"/pairing/get_lounge_token_batch");Ak(a.f,c,{screen_ids:b.join(",")},v(a.Dd,a),v(a.Cd,a))}}
g.Dd=function(a){ol(this);var b=this.screens.length;a=a&&a.screens||[];for(var c=0,d=a.length;c<d;++c){var e=a[c],f=this.get(e.screenId);f&&(f.token=e.loungeToken,--b)}ql(this,!b);b&&this.warn("Missed "+b+" lounge tokens.")};g.Cd=function(a){this.warn("Requesting lounge tokens failed: "+a)};function ol(a){var b=nk(dl()),b=Da(b,function(a){return!a.uuid});return Pk(a,b)}function ql(a,b){cl(A(a.screens,lk));b&&el()};function rl(a,b){V.call(this);this.l=b;for(var c=U("yt-remote-online-screen-ids")||"",c=c?c.split(","):[],d={},e=this.l(),f=0,h=e.length;f<h;++f){var k=e[f].id;d[k]=Ia(c,k)}this.e=d;this.n=a;this.h=this.k=NaN;this.f=null;sl("Initialized with "+S(this.e))}x(rl,V);g=rl.prototype;g.start=function(){var a=parseInt(U("yt-remote-fast-check-period")||"0",10);(this.k=w()-144E5<a?0:a)?tl(this):(this.k=w()+3E5,T("yt-remote-fast-check-period",this.k),this.Zb())};g.isEmpty=function(){return eb(this.e)};
g.update=function(){sl("Updating availability on schedule.");var a=this.l(),b=Xa(this.e,function(b,d){return b&&!!Mk(a,d)},this);ul(this,b)};function vl(a,b,c){var d=zk(a.n,"/pairing/get_screen_availability");Ak(a.n,d,{lounge_token:b.token},v(function(a){a=a.screens||[];for(var d=0,h=a.length;d<h;++d)if(a[d].loungeToken==b.token){c("online"==a[d].status);return}c(!1)},a),v(function(){c(!1)},a))}g.C=function(){G(this.h);this.h=NaN;this.f&&(this.f.abort(),this.f=null);rl.G.C.call(this)};
function ul(a,b){var c;a:if(Ya(b)!=Ya(a.e))c=!1;else{c=bb(b);for(var d=0,e=c.length;d<e;++d)if(!a.e[c[d]]){c=!1;break a}c=!0}c||(sl("Updated online screens: "+S(a.e)),a.e=b,a.A("screenChange"));wl(a)}function tl(a){isNaN(a.h)||G(a.h);a.h=F(v(a.Zb,a),0<a.k&&a.k<w()?2E4:1E4)}
g.Zb=function(){G(this.h);this.h=NaN;this.f&&this.f.abort();var a=xl(this);if(Ya(a)){var b=zk(this.n,"/pairing/get_screen_availability"),c={lounge_token:bb(a).join(",")};this.f=Ak(this.n,b,c,v(this.ee,this,a),v(this.de,this))}else ul(this,{}),tl(this)};g.ee=function(a,b){this.f=null;var c=bb(xl(this));if(Ta(c,bb(a))){for(var c=b.screens||[],d={},e=0,f=c.length;e<f;++e)d[a[c[e].loungeToken]]="online"==c[e].status;ul(this,d);tl(this)}else this.K("Changing Screen set during request."),this.Zb()};
g.de=function(a){this.K("Screen availability failed: "+a);this.f=null;tl(this)};function sl(a){ek("OnlineScreenService",a)}g.K=function(a){ek("OnlineScreenService",a)};function xl(a){var b={};z(a.l(),function(a){a.token?b[a.token]=a.id:this.K("Requesting availability of screen w/o lounge token.")});return b}
function wl(a){var b=bb(Xa(a.e,function(a){return a}));b.sort(Va);b.length?T("yt-remote-online-screen-ids",b.join(","),60):$h("yt-remote-online-screen-ids");a=Da(a.l(),function(a){return!!this.e[a.id]},a);gl(A(a,lk))};function W(a){Nk.call(this,"ScreenService");this.l=a;this.e=this.f=null;this.h=[];this.k={};yl(this)}x(W,Nk);g=W.prototype;g.start=function(){this.f.start();this.e.start();this.screens.length&&(this.A("screenChange"),this.e.isEmpty()||this.A("onlineScreenChange"))};g.add=function(a,b,c){this.f.add(a,b,c)};g.remove=function(a,b,c){this.f.remove(a,b,c);this.e.update()};g.Bb=function(a,b,c,d){this.f.contains(a)?this.f.Bb(a,b,c,d):(a="Updating name of unknown screen: "+a.name,this.warn(a),d(Error(a)))};
g.V=function(a){return a?this.screens:Oa(this.screens,Da(this.h,function(a){return!this.contains(a)},this))};g.Vc=function(){return Da(this.V(!0),function(a){return!!this.e.e[a.id]},this)};
function zl(a,b,c,d,e,f){a.info("getAutomaticScreenByIds "+c+" / "+b);c||(c=a.k[b]);var h=a.V();if(h=(c?Mk(h,c):null)||Mk(h,b)){h.uuid=b;var k=Al(a,h);vl(a.e,k,function(a){e(a?k:null)})}else c?Bl(a,c,v(function(a){var f=Al(this,new hk({name:d,screenId:c,loungeToken:a,dialId:b||""}));vl(this.e,f,function(a){e(a?f:null)})},a),f):e(null)}
g.Wc=function(a,b,c,d,e){this.info("getDialScreenByPairingCode "+a+" / "+b);var f=new Rk(this.l,a,b,c);f.subscribe("pairingComplete",v(function(a){Cb(f);d(Al(this,a))},this));f.subscribe("pairingFailed",function(a){Cb(f);e(a)});f.start();return v(f.stop,f)};function Cl(a,b){for(var c=0,d=a.screens.length;c<d;++c)if(a.screens[c].name==b)return a.screens[c];return null}g.tc=function(a,b){for(var c=2,d=b(a,c);Cl(this,d);){c++;if(20<c)return a;d=b(a,c)}return d};
g.Pe=function(a,b,c,d){oj(zk(this.l,"/pairing/get_screen"),{method:"POST",N:{pairing_code:a},timeout:5E3,X:v(function(a,d){var h=new hk(d.screen||{});if(!h.name||Cl(this,h.name))h.name=this.tc(h.name,b);c(Al(this,h))},this),onError:v(function(a){d(Error("pairing request failed: "+a.status))},this),vb:v(function(){d(Error("pairing request timed out."))},this)})};g.C=function(){Cb(this.f);Cb(this.e);W.G.C.call(this)};
function Bl(a,b,c,d){a.info("requestLoungeToken_ for "+b);var e={N:{screen_ids:b},method:"POST",context:a,X:function(a,e){var k=e&&e.screens||[];k[0]&&k[0].screenId==b?c(k[0].loungeToken):d(Error("Missing lounge token in token response"))},onError:function(){d(Error("Request screen lounge token failed"))}};oj(zk(a.l,"/pairing/get_lounge_token_batch"),e)}
function Dl(a){a.screens=a.f.V();var b=a.k,c={},d;for(d in b)c[b[d]]=d;b=0;for(d=a.screens.length;b<d;++b){var e=a.screens[b];e.uuid=c[e.id]||""}a.info("Updated manual screens: "+pk(a.screens))}g.Ed=function(){Dl(this);this.A("screenChange");this.e.update()};
function yl(a){El(a);a.f=new nl(a.l);a.f.subscribe("screenChange",v(a.Ed,a));Dl(a);a.h=nk(U("yt-remote-automatic-screen-cache")||[]);El(a);a.info("Initializing automatic screens: "+pk(a.h));a.e=new rl(a.l,v(a.V,a,!0));a.e.subscribe("screenChange",v(function(){this.A("onlineScreenChange")},a))}
function Al(a,b){var c=a.get(b.id);c?(c.uuid=b.uuid,b=c):((c=Mk(a.h,b.uuid))?(c.id=b.id,c.token=b.token,b=c):a.h.push(b),T("yt-remote-automatic-screen-cache",A(a.h,lk)));El(a);a.k[b.uuid]=b.id;T("yt-remote-device-id-map",a.k,31536E3);return b}function El(a){a.k=U("yt-remote-device-id-map")||{}}W.prototype.dispose=W.prototype.dispose;function Fl(a,b,c){V.call(this);this.R=c;this.I=a;this.f=b;this.h=null}x(Fl,V);function Gl(a,b){a.h=b;a.A("sessionScreen",a.h)}g=Fl.prototype;g.T=function(a){this.F()||(a&&this.warn(""+a),this.h=null,this.A("sessionScreen",null))};g.info=function(a){ek(this.R,a)};g.warn=function(a){ek(this.R,a)};g.Yc=function(){return null};
g.ac=function(a){var b=this.f;a?(b.displayStatus=new chrome.cast.ReceiverDisplayStatus(a,[]),b.displayStatus.showStop=!0):b.displayStatus=null;chrome.cast.setReceiverDisplayStatus(b,v(function(){this.info("Updated receiver status for "+b.friendlyName+": "+a)},this),v(function(){this.warn("Failed to update receiver status for: "+b.friendlyName)},this))};g.C=function(){this.ac("");Fl.G.C.call(this)};function Hl(a,b){Fl.call(this,a,b,"CastSession");this.e=null;this.l=0;this.k=null;this.B=v(this.Qe,this);this.n=v(this.oe,this);this.l=F(v(function(){Il(this,null)},this),12E4)}x(Hl,Fl);g=Hl.prototype;
g.$b=function(a){if(this.e){if(this.e==a)return;this.warn("Overriding cast sesison with new session object");this.e.removeUpdateListener(this.B);this.e.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.n)}this.e=a;this.e.addUpdateListener(this.B);this.e.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.n);this.k&&Jl(this);Kl(this,"getMdxSessionStatus")};g.Na=function(a){this.info("launchWithParams: "+S(a));this.k=a;this.e&&Jl(this)};
g.stop=function(){this.e?this.e.stop(v(function(){this.T()},this),v(function(){this.T(Error("Failed to stop receiver app."))},this)):this.T(Error("Stopping cast device witout session."))};g.ac=t;g.C=function(){this.info("disposeInternal");G(this.l);this.l=0;this.e&&(this.e.removeUpdateListener(this.B),this.e.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.n));this.e=null;Hl.G.C.call(this)};
function Jl(a){var b=a.k.videoId||a.k.videoIds[a.k.index];b&&Kl(a,"flingVideo",{videoId:b,currentTime:a.k.currentTime||0});a.k=null}function Kl(a,b,c){a.info("sendYoutubeMessage_: "+b+" "+S(c));var d={};d.type=b;c&&(d.data=c);a.e?a.e.sendMessage("urn:x-cast:com.google.youtube.mdx",d,t,v(function(){this.warn("Failed to send message: "+b+".")},a)):a.warn("Sending yt message without session: "+S(d))}
g.oe=function(a,b){if(!this.F())if(b){var c=Hh(b);if(c){var d=""+c.type,c=c.data||{};this.info("onYoutubeMessage_: "+d+" "+S(c));switch(d){case "mdxSessionStatus":Il(this,c.screenId);break;default:this.warn("Unknown youtube message: "+d)}}else this.warn("Unable to parse message.")}else this.warn("No data in message.")};
function Il(a,b){G(a.l);b?(a.info("onConnectedScreenId_: Received screenId: "+b),a.h&&a.h.id==b||zl(a.I,a.f.label,b,a.f.friendlyName,v(function(a){a?Gl(this,a):this.T(Error("Unable to fetch screen."))},a),v(a.T,a))):a.T(Error("Waiting for session status timed out."))}g.Yc=function(){return this.e};g.Qe=function(a){this.F()||a||(this.warn("Cast session died."),this.T())};function Ll(a,b){Fl.call(this,a,b,"DialSession");this.l=this.H=null;this.M="";this.k=null;this.B=t;this.n=NaN;this.P=v(this.Se,this);this.e=t}x(Ll,Fl);g=Ll.prototype;g.$b=function(a){this.l=a;this.l.addUpdateListener(this.P)};g.Na=function(a){this.k=a;this.B()};g.stop=function(){this.e();this.e=t;G(this.n);this.l?this.l.stop(v(this.T,this,null),v(this.T,this,"Failed to stop DIAL device.")):this.T()};
g.C=function(){this.e();this.e=t;G(this.n);this.l&&this.l.removeUpdateListener(this.P);this.l=null;Ll.G.C.call(this)};function Ml(a){a.e=a.I.Wc(a.M,a.f.label,a.f.friendlyName,v(function(a){this.e=t;Gl(this,a)},a),v(function(a){this.e=t;this.T(a)},a))}g.Se=function(a){this.F()||a||(this.warn("DIAL session died."),this.e(),this.e=t,this.T())};
function Nl(a){var b={};b.pairingCode=a.M;if(a.k){var c=a.k.index||0,d=a.k.currentTime||0;b.v=a.k.videoId||a.k.videoIds[c];b.t=d}ml()&&(b.env_useStageMdx=1);return Bd(b)}g.Ub=function(a){this.M=Ek();if(this.k){var b=new chrome.cast.DialLaunchResponse(!0,Nl(this));a(b);Ml(this)}else this.B=v(function(){G(this.n);this.B=t;this.n=NaN;var b=new chrome.cast.DialLaunchResponse(!0,Nl(this));a(b);Ml(this)},this),this.n=F(v(function(){this.B()},this),100)};
g.Fd=function(a,b){zl(this.I,this.H.receiver.label,a,this.f.friendlyName,v(function(a){a&&a.token?(Gl(this,a),b(new chrome.cast.DialLaunchResponse(!1))):this.Ub(b)},this),v(function(a){this.warn("Failed to get DIAL screen: "+a);this.Ub(b)},this))};function Ol(a,b){Fl.call(this,a,b,"ManualSession");this.e=F(v(this.Na,this,null),150)}x(Ol,Fl);Ol.prototype.stop=function(){this.T()};Ol.prototype.$b=t;Ol.prototype.Na=function(){G(this.e);this.e=NaN;var a=Mk(this.I.V(),this.f.label);a?Gl(this,a):this.T(Error("No such screen"))};Ol.prototype.C=function(){G(this.e);this.e=NaN;Ol.G.C.call(this)};function Pl(a){V.call(this);this.f=a;this.e=null;this.l=!1;this.h=[];this.k=v(this.be,this)}x(Pl,V);g=Pl.prototype;
g.init=function(a,b){chrome.cast.timeout.requestSession=3E4;var c=new chrome.cast.SessionRequest("233637DE");c.dialRequest=new chrome.cast.DialRequest("YouTube");var d=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED,e=a?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION,c=new chrome.cast.ApiConfig(c,v(this.Ec,this),v(this.ce,this),d,e);c.customDialLaunchCallback=v(this.Od,this);chrome.cast.initialize(c,v(function(){this.F()||(chrome.cast.addReceiverActionListener(this.k),
ak(Ql),this.f.subscribe("onlineScreenChange",v(this.Xc,this)),this.h=Rl(this),chrome.cast.setCustomReceivers(this.h,t,v(function(a){this.K("Failed to set initial custom receivers: "+S(a))},this)),this.A("yt-remote-cast2-availability-change",Sl(this)),b(!0))},this),function(a){this.K("Failed to initialize API: "+S(a));b(!1)})};
g.Be=function(a,b){Tl("Setting connected screen ID: "+a+" -> "+b);if(this.e){var c=this.e.h;if(!a||c&&c.id!=a)Tl("Unsetting old screen status: "+this.e.f.friendlyName),Cb(this.e),this.e=null}if(a&&b){if(!this.e){c=Mk(this.f.V(),a);if(!c){Tl("setConnectedScreenStatus: Unknown screen.");return}var d=Ul(this,c);d||(Tl("setConnectedScreenStatus: Connected receiver not custom..."),d=new chrome.cast.Receiver(c.uuid?c.uuid:c.id,c.name),d.receiverType=chrome.cast.ReceiverType.CUSTOM,this.h.push(d),chrome.cast.setCustomReceivers(this.h,
t,v(function(a){this.K("Failed to set initial custom receivers: "+S(a))},this)));Tl("setConnectedScreenStatus: new active receiver: "+d.friendlyName);Vl(this,new Ol(this.f,d),!0)}this.e.ac(b)}else Tl("setConnectedScreenStatus: no screen.")};function Ul(a,b){return b?Ga(a.h,function(a){return ik(b,a.label)},a):null}g.Ce=function(a){this.F()?this.K("Setting connection data on disposed cast v2"):this.e?this.e.Na(a):this.K("Setting connection data without a session")};
g.stopSession=function(){this.F()?this.K("Stopping session on disposed cast v2"):this.e?(this.e.stop(),Cb(this.e),this.e=null):Tl("Stopping non-existing session")};g.requestSession=function(){chrome.cast.requestSession(v(this.Ec,this),v(this.fe,this))};g.C=function(){this.f.Ga("onlineScreenChange",v(this.Xc,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.k);dk(Ql);Cb(this.e);Pl.G.C.call(this)};function Tl(a){ek("Controller",a)}g.K=function(a){ek("Controller",a)};
function Ql(a){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(a)}function Sl(a){return a.l||!!a.h.length||!!a.e}function Vl(a,b,c){Cb(a.e);(a.e=b)?(c?a.A("yt-remote-cast2-receiver-resumed",b.f):a.A("yt-remote-cast2-receiver-selected",b.f),b.subscribe("sessionScreen",v(a.Fc,a,b)),b.h?a.A("yt-remote-cast2-session-change",b.h):c&&a.e.Na(null)):a.A("yt-remote-cast2-session-change",null)}
g.Fc=function(a,b){this.e==a&&(b||Vl(this,null),this.A("yt-remote-cast2-session-change",b))};
g.be=function(a,b){if(!this.F())if(a)switch(Tl("onReceiverAction_ "+a.label+" / "+a.friendlyName+"-- "+b),b){case chrome.cast.ReceiverAction.CAST:if(this.e)if(this.e.f.label!=a.label)Tl("onReceiverAction_: Stopping active receiver: "+this.e.f.friendlyName),this.e.stop();else{Tl("onReceiverAction_: Casting to active receiver.");this.e.h&&this.A("yt-remote-cast2-session-change",this.e.h);break}switch(a.receiverType){case chrome.cast.ReceiverType.CUSTOM:Vl(this,new Ol(this.f,a));break;case chrome.cast.ReceiverType.DIAL:Vl(this,
new Ll(this.f,a));break;case chrome.cast.ReceiverType.CAST:Vl(this,new Hl(this.f,a));break;default:this.K("Unknown receiver type: "+a.receiverType);return}break;case chrome.cast.ReceiverAction.STOP:this.e&&this.e.f.label==a.label?this.e.stop():this.K("Stopping receiver w/o session: "+a.friendlyName)}else this.K("onReceiverAction_ called without receiver.")};
g.Od=function(a){if(this.F())return Promise.reject(Error("disposed"));var b=a.receiver;b.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.K("Not DIAL receiver: "+b.friendlyName),b.receiverType=chrome.cast.ReceiverType.DIAL);var c=this.e?this.e.f:null;if(!c||c.label!=b.label)return this.K("Receiving DIAL launch request for non-clicked DIAL receiver: "+b.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(c&&c.label==b.label&&c.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.e.h)return Tl("Reselecting dial screen."),
this.A("yt-remote-cast2-session-change",this.e.h),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.K('Changing CAST intent from "'+c.receiverType+'" to "dial" for '+b.friendlyName);Vl(this,new Ll(this.f,b))}b=this.e;b.H=a;return b.H.appState==chrome.cast.DialAppState.RUNNING?new Promise(v(b.Fd,b,(b.H.extraData||{}).screenId||null)):new Promise(v(b.Ub,b))};
g.Ec=function(a){if(!this.F()){Tl("New cast session ID: "+a.sessionId);var b=a.receiver;if(b.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.e)if(b.receiverType==chrome.cast.ReceiverType.CAST)Tl("Got resumed cast session before resumed mdx connection."),Vl(this,new Hl(this.f,b),!0);else{this.K("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var c=this.e.f,d=Mk(this.f.V(),c.label);d&&ik(d,b.label)&&c.receiverType!=chrome.cast.ReceiverType.CAST&&b.receiverType==
chrome.cast.ReceiverType.CAST&&(Tl("onSessionEstablished_: manual to cast session change "+b.friendlyName),Cb(this.e),this.e=new Hl(this.f,b),this.e.subscribe("sessionScreen",v(this.Fc,this,this.e)),this.e.Na(null));this.e.$b(a)}}};g.Re=function(){return this.e?this.e.Yc():null};g.fe=function(a){this.F()||(this.K("Failed to estabilish a session: "+S(a)),a.code!=chrome.cast.ErrorCode.CANCEL&&Vl(this,null))};
g.ce=function(a){Tl("Receiver availability updated: "+a);if(!this.F()){var b=Sl(this);this.l=a==chrome.cast.ReceiverAvailability.AVAILABLE;Sl(this)!=b&&this.A("yt-remote-cast2-availability-change",Sl(this))}};
function Rl(a){var b=a.f.Vc(),c=a.e&&a.e.f;a=A(b,function(a){c&&ik(a,c.label)&&(c=null);var b=a.uuid?a.uuid:a.id,f=Ul(this,a);f?(f.label=b,f.friendlyName=a.name):(f=new chrome.cast.Receiver(b,a.name),f.receiverType=chrome.cast.ReceiverType.CUSTOM);return f},a);c&&(c.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(c=new chrome.cast.Receiver(c.label,c.friendlyName),c.receiverType=chrome.cast.ReceiverType.CUSTOM),a.push(c));return a}
g.Xc=function(){if(!this.F()){var a=Sl(this);this.h=Rl(this);Tl("Updating custom receivers: "+S(this.h));chrome.cast.setCustomReceivers(this.h,t,v(function(){this.K("Failed to set custom receivers.")},this));var b=Sl(this);b!=a&&this.A("yt-remote-cast2-availability-change",b)}};Pl.prototype.setLaunchParams=Pl.prototype.Ce;Pl.prototype.setConnectedScreenStatus=Pl.prototype.Be;Pl.prototype.stopSession=Pl.prototype.stopSession;Pl.prototype.getCastSession=Pl.prototype.Re;Pl.prototype.requestSession=Pl.prototype.requestSession;
Pl.prototype.init=Pl.prototype.init;Pl.prototype.dispose=Pl.prototype.dispose;function Wl(a,b,c){Xl()?Zl(a)&&($l(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?am(b):c?(window.__onGCastApiAvailable=function(a,c){bm(b,a,c)},Xb("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js")):uk(function(a,c){bm(b,a,c)})):Yl("Cannot initialize because not running Chrome")}function cm(){Yl("dispose");wk();var a=dm();a&&a.dispose();em=null;p("yt.mdx.remote.cloudview.instance_",null,void 0);fm(!1);Tb(gm);gm.length=0}function hm(){return!!U("yt-remote-cast-installed")}
function im(){var a=U("yt-remote-cast-receiver");return a?a.friendlyName:null}function jm(){Yl("clearCurrentReciever");$h("yt-remote-cast-receiver")}function km(){hm()?dm()?lm()?(Yl("Requesting cast selector."),em.requestSession()):(Yl("Wait for cast API to be ready to request the session."),gm.push(H("yt-remote-cast2-api-ready",km))):mm("requestCastSelector: Cast is not initialized."):mm("requestCastSelector: Cast API is not installed!")}
function nm(a){lm()?dm().setLaunchParams(a):mm("setLaunchParams called before ready.")}function om(a,b){lm()?dm().setConnectedScreenStatus(a,b):mm("setConnectedScreenStatus called before ready.")}var em=null;function Xl(){var a;a=0<=oc.search(/\ (CrMo|Chrome|CriOS)\//);return Ze||a}function bm(a,b,c){b?am(a):(mm("Failed to load cast API: "+c),pm(!1),$l(!1),$h("yt-remote-cast-available"),$h("yt-remote-cast-receiver"),cm(),a(!1))}function qm(a){em.init(!0,a)}
function Zl(a){var b=!1;if(!em){var c=q("yt.mdx.remote.cloudview.instance_");c||(c=new Pl(a),c.subscribe("yt-remote-cast2-availability-change",function(a){T("yt-remote-cast-available",a);I("yt-remote-cast2-availability-change",a)}),c.subscribe("yt-remote-cast2-receiver-selected",function(a){Yl("onReceiverSelected: "+a.friendlyName);T("yt-remote-cast-receiver",a);I("yt-remote-cast2-receiver-selected",a)}),c.subscribe("yt-remote-cast2-receiver-resumed",function(a){Yl("onReceiverResumed: "+a.friendlyName);
T("yt-remote-cast-receiver",a)}),c.subscribe("yt-remote-cast2-session-change",function(a){Yl("onSessionChange: "+ok(a));a||$h("yt-remote-cast-receiver");I("yt-remote-cast2-session-change",a)}),p("yt.mdx.remote.cloudview.instance_",c,void 0),b=!0);em=c}Yl("cloudview.createSingleton_: "+b);return b}function dm(){em||(em=q("yt.mdx.remote.cloudview.instance_"));return em}
function am(a){pm(!0);$l(!1);qm(function(b){b?(fm(!0),I("yt-remote-cast2-api-ready")):(mm("Failed to initialize cast API."),pm(!1),$h("yt-remote-cast-available"),$h("yt-remote-cast-receiver"),cm());a(b)})}function Yl(a){ek("cloudview",a)}function mm(a){ek("cloudview",a)}function pm(a){Yl("setCastInstalled_ "+a);T("yt-remote-cast-installed",a)}function lm(){return!!q("yt.mdx.remote.cloudview.apiReady_")}function fm(a){Yl("setApiReady_ "+a);p("yt.mdx.remote.cloudview.apiReady_",a,void 0)}
function $l(a){p("yt.mdx.remote.cloudview.initializing_",a,void 0)}var gm=[];function rm(){if(!("cast"in window))return!1;var a=window.cast||{};return"ActivityStatus"in a&&"Api"in a&&"LaunchRequest"in a&&"Receiver"in a}function sm(a){ek("CAST",a)}function tm(a){var b=um();b&&b.logMessage&&b.logMessage(a)}function vm(a){if(a.source==window&&a.data&&"CastApi"==a.data.source&&"Hello"==a.data.event)for(;wm.length;)wm.shift()()}
function xm(){if(!q("yt.mdx.remote.castv2_")&&!ym&&(0==Ka.length&&Qa(Ka,jl()),rm())){var a=um();a?(a.removeReceiverListener("YouTube",zm),a.addReceiverListener("YouTube",zm),sm("API initialized in the other binary")):(a=new cast.Api,Am(a),a.addReceiverListener("YouTube",zm),a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(function(){F(function(){window.location.reload(!0)},1E3)}),ak(tm),sm("API initialized"));ym=!0}}
function Bm(){var a=um();a&&(sm("API disposed"),dk(tm),a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(t),a.removeReceiverListener("YouTube",zm),Am(null));ym=!1;wm=null;(a=gd(window,"message",vm,!1))&&hd(a)}function Cm(a){var b=Ha(Ka,function(b){return b.id==a.id});0<=b&&(Ka[b]=Ck(a))}
function zm(a){a.length&&sm("Updating receivers: "+S(a));Dm(a);I("yt-remote-cast-device-list-update");z(Em(),function(a){Fm(a.id)});z(a,function(a){if(a.isTabProjected){var c=Gm(a.id);sm("Detected device: "+c.id+" is tab projected. Firing DEVICE_TAB_PROJECTED event.");F(function(){I("yt-remote-cast-device-tab-projected",c.id)},1E3)}})}
function Hm(a,b){sm("Updating "+a+" activity status: "+S(b));var c=Gm(a);c?(b.activityId&&(c.e=b.activityId),c.status="running"==b.status?"RUNNING":"stopped"==b.status?"STOPPED":"error"==b.status?"ERROR":"UNKNOWN","RUNNING"!=c.status&&(c.e=""),Cm(c),I("yt-remote-cast-device-status-update",c)):sm("Device not found")}function Em(){xm();return Ik(Ka)}
function Dm(a){a=A(a,function(a){var c=a.id,d;d=a.name;d=-1!=d.indexOf("&")?"document"in m?va(d):xa(d):d;c={id:c,name:d};if(a=Gm(a.id))c.activityId=a.e,c.status=a.status;return c});Ja();Qa(Ka,a)}function Gm(a){var b=Em();return Ga(b,function(b){return b.id==a})||null}function Fm(a){var b=Gm(a),c=um();c&&b&&b.e&&c.getActivityStatus(b.e,function(b){"error"==b.status&&(b.status="stopped");Hm(a,b)})}
function Im(a){xm();var b=Gm(a),c=um();c&&b&&b.e?(sm("Stopping cast activity"),c.stopActivity(b.e,pa(Hm,a))):sm("Dropping cast activity stop")}function um(){return q("yt.mdx.remote.castapi.api_")}function Am(a){p("yt.mdx.remote.castapi.api_",a,void 0)}var ym=!1,wm=null,Ka=q("yt.mdx.remote.castapi.devices_")||[];p("yt.mdx.remote.castapi.devices_",Ka,void 0);function Jm(a,b){this.action=a;this.params=b||null};function Km(){this.e=w()}new Km;Km.prototype.reset=function(){this.e=w()};Km.prototype.get=function(){return this.e};function Lm(){C.call(this);this.ua=new Of(this);this.Ia=this;this.da=null}x(Lm,C);Lm.prototype[Kf]=!0;g=Lm.prototype;g.addEventListener=function(a,b,c,d){Vf(this,a,b,c,d)};g.removeEventListener=function(a,b,c,d){ag(this,a,b,c,d)};
function Mm(a,b){var c,d=a.da;if(d){c=[];for(var e=1;d;d=d.da)c.push(d),++e}var d=a.Ia,e=b,f=e.type||e;if(u(e))e=new If(e,d);else if(e instanceof If)e.target=e.target||d;else{var h=e,e=new If(f,d);jb(e,h)}var h=!0,k;if(c)for(var l=c.length-1;0<=l;l--)k=e.currentTarget=c[l],h=Nm(k,f,!0,e)&&h;k=e.currentTarget=d;h=Nm(k,f,!0,e)&&h;h=Nm(k,f,!1,e)&&h;if(c)for(l=0;l<c.length;l++)k=e.currentTarget=c[l],h=Nm(k,f,!1,e)&&h}g.C=function(){Lm.G.C.call(this);this.removeAllListeners();this.da=null};
g.sb=function(a,b,c,d){return this.ua.add(String(a),b,!1,c,d)};g.bc=function(a,b,c,d){return this.ua.remove(String(a),b,c,d)};g.removeAllListeners=function(a){return this.ua?this.ua.removeAll(a):0};function Nm(a,b,c,d){b=a.ua.e[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var h=b[f];if(h&&!h.Pa&&h.jb==c){var k=h.ra,l=h.pb||h.src;h.ib&&Qf(a.ua,h);e=!1!==k.call(l,d)&&e}}return e&&0!=d.Oc};function Om(a,b){this.f=new Jh(a);this.e=b?Hh:Gh}Om.prototype.stringify=function(a){return Ih(this.f,a)};Om.prototype.parse=function(a){return this.e(a)};function Pm(a,b){Lm.call(this);this.e=a||1;this.f=b||m;this.h=v(this.Ee,this);this.j=w()}x(Pm,Lm);g=Pm.prototype;g.enabled=!1;g.Z=null;function Qm(a,b){a.e=b;a.Z&&a.enabled?(a.stop(),a.start()):a.Z&&a.stop()}g.Ee=function(){if(this.enabled){var a=w()-this.j;0<a&&a<.8*this.e?this.Z=this.f.setTimeout(this.h,this.e-a):(this.Z&&(this.f.clearTimeout(this.Z),this.Z=null),Mm(this,"tick"),this.enabled&&(this.Z=this.f.setTimeout(this.h,this.e),this.j=w()))}};
g.start=function(){this.enabled=!0;this.Z||(this.Z=this.f.setTimeout(this.h,this.e),this.j=w())};g.stop=function(){this.enabled=!1;this.Z&&(this.f.clearTimeout(this.Z),this.Z=null)};g.C=function(){Pm.G.C.call(this);this.stop();delete this.f};function Rm(a,b,c){if(ha(a))c&&(a=v(a,c));else if(a&&"function"==typeof a.handleEvent)a=v(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:m.setTimeout(a,b||0)};function Sm(a,b,c){C.call(this);this.j=a;this.h=b;this.f=c;this.e=v(this.he,this)}x(Sm,C);g=Sm.prototype;g.Ab=!1;g.La=null;g.stop=function(){this.La&&(m.clearTimeout(this.La),this.La=null,this.Ab=!1)};g.C=function(){Sm.G.C.call(this);this.stop()};g.he=function(){this.La=null;this.Ab&&(this.Ab=!1,Tm(this))};function Tm(a){a.La=Rm(a.e,a.h);a.j.call(a.f)};function Um(a){C.call(this);this.f=a;this.e={}}x(Um,C);var Vm=[];g=Um.prototype;g.sb=function(a,b,c,d){ea(b)||(b&&(Vm[0]=b.toString()),b=Vm);for(var e=0;e<b.length;e++){var f=Vf(a,b[e],c||this.handleEvent,d||!1,this.f||this);if(!f)break;this.e[f.key]=f}return this};
g.bc=function(a,b,c,d,e){if(ea(b))for(var f=0;f<b.length;f++)this.bc(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.f||this,c=Wf(c),d=!!d,b=a&&a[Kf]?Rf(a.ua,String(b),c,d,e):a?(a=Xf(a))?Rf(a,b,c,d,e):null:null,b&&(bg(b),delete this.e[b.key]);return this};g.removeAll=function(){Wa(this.e,bg);this.e={}};g.C=function(){Um.G.C.call(this);this.removeAll()};g.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function Wm(){}Wm.prototype.e=null;function Xm(a){var b;(b=a.e)||(b={},Ym(a)&&(b[0]=!0,b[1]=!0),b=a.e=b);return b};var Zm;function $m(){}x($m,Wm);function an(a){return(a=Ym(a))?new ActiveXObject(a):new XMLHttpRequest}function Ym(a){if(!a.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.f=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.f}Zm=new $m;function bn(a,b,c,d,e){this.e=a;this.h=c;this.B=d;this.n=e||1;this.k=45E3;this.j=new Um(this);this.f=new Pm;Qm(this.f,250)}g=bn.prototype;g.Da=null;g.ia=!1;g.Sa=null;g.dc=null;g.ab=null;g.Ra=null;g.sa=null;g.wa=null;g.Fa=null;g.L=null;g.cb=0;g.ja=null;g.Db=null;g.Ea=null;g.Za=-1;g.Pc=!0;g.Aa=!1;g.Sb=0;g.xb=null;var cn={},dn={};g=bn.prototype;g.setTimeout=function(a){this.k=a};function en(a,b,c){a.Ra=1;a.sa=Tg(b.clone());a.Fa=c;a.l=!0;fn(a,null)}
function gn(a,b,c,d,e){a.Ra=1;a.sa=Tg(b.clone());a.Fa=null;a.l=c;e&&(a.Pc=!1);fn(a,d)}function fn(a,b){a.ab=w();hn(a);a.wa=a.sa.clone();Rg(a.wa,"t",a.n);a.cb=0;a.L=a.e.Kb(a.e.bb()?b:null);0<a.Sb&&(a.xb=new Sm(v(a.Uc,a,a.L),a.Sb));a.j.sb(a.L,"readystatechange",a.qe);var c=a.Da?gb(a.Da):{};a.Fa?(a.Db="POST",c["Content-Type"]="application/x-www-form-urlencoded",a.L.send(a.wa,a.Db,a.Fa,c)):(a.Db="GET",a.Pc&&!yc&&(c.Connection="close"),a.L.send(a.wa,a.Db,null,c));a.e.ha(1)}
g.qe=function(a){a=a.target;var b=this.xb;b&&3==jn(a)?b.La?b.Ab=!0:Tm(b):this.Uc(a)};
g.Uc=function(a){try{if(a==this.L)a:{var b=jn(this.L),c=this.L.j,d=this.L.getStatus();if(K&&!Gc(10)||yc&&!Fc("420+")){if(4>b)break a}else if(3>b||3==b&&!wc&&!kn(this.L))break a;this.Aa||4!=b||7==c||(8==c||0>=d?this.e.ha(3):this.e.ha(2));ln(this);var e=this.L.getStatus();this.Za=e;var f=kn(this.L);(this.ia=200==e)?(4==b&&mn(this),this.l?(nn(this,b,f),wc&&this.ia&&3==b&&(this.j.sb(this.f,"tick",this.pe),this.f.start())):on(this,f),this.ia&&!this.Aa&&(4==b?this.e.ub(this):(this.ia=!1,hn(this)))):(this.Ea=
400==e&&0<f.indexOf("Unknown SID")?3:0,X(),mn(this),pn(this))}}catch(h){this.L&&kn(this.L)}finally{}};function nn(a,b,c){for(var d=!0;!a.Aa&&a.cb<c.length;){var e=qn(a,c);if(e==dn){4==b&&(a.Ea=4,X(),d=!1);break}else if(e==cn){a.Ea=4;X();d=!1;break}else on(a,e)}4==b&&0==c.length&&(a.Ea=1,X(),d=!1);a.ia=a.ia&&d;d||(mn(a),pn(a))}g.pe=function(){var a=jn(this.L),b=kn(this.L);this.cb<b.length&&(ln(this),nn(this,a,b),this.ia&&4!=a&&hn(this))};
function qn(a,b){var c=a.cb,d=b.indexOf("\n",c);if(-1==d)return dn;c=Number(b.substring(c,d));if(isNaN(c))return cn;d+=1;if(d+c>b.length)return dn;var e=b.substr(d,c);a.cb=d+c;return e}
function rn(a,b){a.ab=w();hn(a);var c=b?window.location.hostname:"";a.wa=a.sa.clone();M(a.wa,"DOMAIN",c);M(a.wa,"t",a.n);try{a.ja=new ActiveXObject("htmlfile")}catch(d){mn(a);a.Ea=7;X();pn(a);return}var e="<html><body>";b&&(e+='<script>document.domain="'+c+'"\x3c/script>');e+="</body></html>";a.ja.open();a.ja.write(e);a.ja.close();a.ja.parentWindow.m=v(a.ke,a);a.ja.parentWindow.d=v(a.Ic,a,!0);a.ja.parentWindow.rpcClose=v(a.Ic,a,!1);c=a.ja.createElement("DIV");a.ja.parentWindow.document.body.appendChild(c);
c.innerHTML='<iframe src="'+a.wa+'"></iframe>';a.e.ha(1)}g.ke=function(a){sn(v(this.je,this,a),0)};g.je=function(a){this.Aa||(ln(this),on(this,a),hn(this))};g.Ic=function(a){sn(v(this.ie,this,a),0)};g.ie=function(a){this.Aa||(mn(this),this.ia=a,this.e.ub(this),this.e.ha(4))};g.cancel=function(){this.Aa=!0;mn(this)};function hn(a){a.dc=w()+a.k;tn(a,a.k)}function tn(a,b){if(null!=a.Sa)throw Error("WatchDog timer not null");a.Sa=sn(v(a.me,a),b)}function ln(a){a.Sa&&(m.clearTimeout(a.Sa),a.Sa=null)}
g.me=function(){this.Sa=null;var a=w();0<=a-this.dc?(2!=this.Ra&&this.e.ha(3),mn(this),this.Ea=2,X(),pn(this)):tn(this,this.dc-a)};function pn(a){a.e.vc()||a.Aa||a.e.ub(a)}function mn(a){ln(a);Cb(a.xb);a.xb=null;a.f.stop();a.j.removeAll();if(a.L){var b=a.L;a.L=null;un(b);b.dispose()}a.ja&&(a.ja=null)}function on(a,b){try{a.e.Dc(a,b),a.e.ha(4)}catch(c){}};function vn(a,b,c,d,e){if(0==d)c(!1);else{var f=e||0;d--;wn(a,b,function(e){e?c(!0):m.setTimeout(function(){vn(a,b,c,d,f)},f)})}}function wn(a,b,c){var d=new Image;d.onload=function(){try{xn(d),c(!0)}catch(a){}};d.onerror=function(){try{xn(d),c(!1)}catch(a){}};d.onabort=function(){try{xn(d),c(!1)}catch(a){}};d.ontimeout=function(){try{xn(d),c(!1)}catch(a){}};m.setTimeout(function(){if(d.ontimeout)d.ontimeout()},b);d.src=a}
function xn(a){a.onload=null;a.onerror=null;a.onabort=null;a.ontimeout=null};function yn(a){this.e=a;this.f=new Om(null,!0)}g=yn.prototype;g.Qb=null;g.Y=null;g.yb=!1;g.Sc=null;g.mb=null;g.Vb=null;g.Rb=null;g.$=null;g.qa=-1;g.Ya=null;g.Ta=null;g.connect=function(a){this.Rb=a;a=zn(this.e,null,this.Rb);X();this.Sc=w();var b=this.e.B;null!=b?(this.Ya=b[0],(this.Ta=b[1])?(this.$=1,An(this)):(this.$=2,Bn(this))):(Rg(a,"MODE","init"),this.Y=new bn(this,0,void 0,void 0,void 0),this.Y.Da=this.Qb,gn(this.Y,a,!1,null,!0),this.$=0)};
function An(a){var b=zn(a.e,a.Ta,"/mail/images/cleardot.gif");Tg(b);vn(b.toString(),5E3,v(a.pd,a),3,2E3);a.ha(1)}g.pd=function(a){if(a)this.$=2,Bn(this);else{X();var b=this.e;b.fa=b.ta.qa;Cn(b,9)}a&&this.ha(2)};
function Bn(a){var b=a.e.H;if(null!=b)X(),b?(X(),Dn(a.e,a,!1)):(X(),Dn(a.e,a,!0));else if(a.Y=new bn(a,0,void 0,void 0,void 0),a.Y.Da=a.Qb,b=a.e,b=zn(b,b.bb()?a.Ya:null,a.Rb),X(),!K||Gc(10))Rg(b,"TYPE","xmlhttp"),gn(a.Y,b,!1,a.Ya,!1);else{Rg(b,"TYPE","html");var c=a.Y;a=Boolean(a.Ya);c.Ra=3;c.sa=Tg(b.clone());rn(c,a)}}g.Kb=function(a){return this.e.Kb(a)};g.vc=function(){return!1};
g.Dc=function(a,b){this.qa=a.Za;if(0==this.$)if(b){try{var c=this.f.parse(b)}catch(d){c=this.e;c.fa=this.qa;Cn(c,2);return}this.Ya=c[0];this.Ta=c[1]}else c=this.e,c.fa=this.qa,Cn(c,2);else if(2==this.$)if(this.yb)X(),this.Vb=w();else if("11111"==b){if(X(),this.yb=!0,this.mb=w(),c=this.mb-this.Sc,!K||Gc(10)||500>c)this.qa=200,this.Y.cancel(),X(),Dn(this.e,this,!0)}else X(),this.mb=this.Vb=w(),this.yb=!1};
g.ub=function(){this.qa=this.Y.Za;if(this.Y.ia)0==this.$?this.Ta?(this.$=1,An(this)):(this.$=2,Bn(this)):2==this.$&&(a=!1,(a=!K||Gc(10)?this.yb:200>this.Vb-this.mb?!1:!0)?(X(),Dn(this.e,this,!0)):(X(),Dn(this.e,this,!1)));else{0==this.$?X():2==this.$&&X();var a=this.e;a.fa=this.qa;Cn(a,2)}};g.bb=function(){return this.e.bb()};g.isActive=function(){return this.e.isActive()};g.ha=function(a){this.e.ha(a)};function En(a){Lm.call(this);this.headers=new Qd;this.P=a||null;this.f=!1;this.M=this.e=null;this.ma=this.B="";this.j=0;this.k="";this.h=this.ca=this.n=this.R=!1;this.l=0;this.H=null;this.ya="";this.I=this.za=!1}x(En,Lm);var Fn=/^https?$/i,Gn=["POST","PUT"];g=En.prototype;
g.send=function(a,b,c,d){if(this.e)throw Error("[goog.net.XhrIo] Object is active with another request="+this.B+"; newUri="+a);b=b?b.toUpperCase():"GET";this.B=a;this.k="";this.j=0;this.ma=b;this.R=!1;this.f=!0;this.e=this.P?an(this.P):an(Zm);this.M=this.P?Xm(this.P):Xm(Zm);this.e.onreadystatechange=v(this.Cc,this);try{ce(Hn(this,"Opening Xhr")),this.ca=!0,this.e.open(b,String(a),!0),this.ca=!1}catch(e){ce(Hn(this,"Error opening Xhr: "+e.message));In(this,e);return}a=c||"";var f=this.headers.clone();
d&&Yd(d,function(a,b){Rd(f,b,a)});d=Ga(f.pa(),Jn);c=m.FormData&&a instanceof m.FormData;!Ia(Gn,b)||d||c||Rd(f,"Content-Type","application/x-www-form-urlencoded;charset=utf-8");f.forEach(function(a,b){this.e.setRequestHeader(b,a)},this);this.ya&&(this.e.responseType=this.ya);"withCredentials"in this.e&&(this.e.withCredentials=this.za);try{Kn(this),0<this.l&&(this.I=Ln(this.e),ce(Hn(this,"Will abort after "+this.l+"ms if incomplete, xhr2 "+this.I)),this.I?(this.e.timeout=this.l,this.e.ontimeout=v(this.uc,
this)):this.H=Rm(this.uc,this.l,this)),ce(Hn(this,"Sending request")),this.n=!0,this.e.send(a),this.n=!1}catch(h){ce(Hn(this,"Send error: "+h.message)),In(this,h)}};function Ln(a){return K&&Fc(9)&&ga(a.timeout)&&n(a.ontimeout)}function Jn(a){return"content-type"==a.toLowerCase()}g.uc=function(){"undefined"!=typeof ba&&this.e&&(this.k="Timed out after "+this.l+"ms, aborting",this.j=8,Hn(this,this.k),Mm(this,"timeout"),un(this,8))};
function In(a,b){a.f=!1;a.e&&(a.h=!0,a.e.abort(),a.h=!1);a.k=b;a.j=5;Mn(a);Nn(a)}function Mn(a){a.R||(a.R=!0,Mm(a,"complete"),Mm(a,"error"))}function un(a,b){a.e&&a.f&&(Hn(a,"Aborting"),a.f=!1,a.h=!0,a.e.abort(),a.h=!1,a.j=b||7,Mm(a,"complete"),Mm(a,"abort"),Nn(a))}g.C=function(){this.e&&(this.f&&(this.f=!1,this.h=!0,this.e.abort(),this.h=!1),Nn(this,!0));En.G.C.call(this)};g.Cc=function(){this.F()||(this.ca||this.n||this.h?On(this):this.$d())};g.$d=function(){On(this)};
function On(a){if(a.f&&"undefined"!=typeof ba)if(a.M[1]&&4==jn(a)&&2==a.getStatus())Hn(a,"Local request error detected and ignored");else if(a.n&&4==jn(a))Rm(a.Cc,0,a);else if(Mm(a,"readystatechange"),4==jn(a)){Hn(a,"Request complete");a.f=!1;try{var b=a.getStatus(),c;a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var f=td(String(a.B))[1]||null;if(!f&&self.location)var h=self.location.protocol,f=h.substr(0,h.length-
1);e=!Fn.test(f?f.toLowerCase():"")}d=e}if(d)Mm(a,"complete"),Mm(a,"success");else{a.j=6;var k;try{k=2<jn(a)?a.e.statusText:""}catch(l){k=""}a.k=k+" ["+a.getStatus()+"]";Mn(a)}}finally{Nn(a)}}}function Nn(a,b){if(a.e){Kn(a);var c=a.e,d=a.M[0]?t:null;a.e=null;a.M=null;b||Mm(a,"ready");try{c.onreadystatechange=d}catch(e){}}}function Kn(a){a.e&&a.I&&(a.e.ontimeout=null);ga(a.H)&&(m.clearTimeout(a.H),a.H=null)}g.isActive=function(){return!!this.e};function jn(a){return a.e?a.e.readyState:0}
g.getStatus=function(){try{return 2<jn(this)?this.e.status:-1}catch(a){return-1}};function kn(a){try{return a.e?a.e.responseText:""}catch(b){return""}}function Hn(a,b){return b+" ["+a.ma+" "+a.B+" "+a.getStatus()+"]"};function Pn(a,b,c){this.n=a||null;this.e=1;this.f=[];this.j=[];this.k=new Om(null,!0);this.B=b||null;this.H=null!=c?c:null}function Qn(a,b){this.e=a;this.map=b;this.context=null}g=Pn.prototype;g.Wa=null;g.S=null;g.J=null;g.Pb=null;g.nb=null;g.lc=null;g.ob=null;g.$a=0;g.Hd=0;g.O=null;g.va=null;g.oa=null;g.Ca=null;g.ta=null;g.Cb=null;g.Ma=-1;g.wc=-1;g.fa=-1;g.Xa=0;g.Ka=0;g.Ba=8;var Rn=new Lm;function Sn(a){If.call(this,"statevent",a)}x(Sn,If);
function Tn(a,b){If.call(this,"timingevent",a);this.size=b}x(Tn,If);function Un(a){If.call(this,"serverreachability",a)}x(Un,If);g=Pn.prototype;g.connect=function(a,b,c,d,e){X();this.Pb=b;this.Wa=c||{};d&&n(e)&&(this.Wa.OSID=d,this.Wa.OAID=e);this.ta=new yn(this);this.ta.Qb=null;this.ta.f=this.k;this.ta.connect(a)};
function Vn(a){Wn(a);if(3==a.e){var b=a.$a++,c=a.nb.clone();M(c,"SID",a.h);M(c,"RID",b);M(c,"TYPE","terminate");Xn(a,c);b=new bn(a,0,a.h,b,void 0);b.Ra=2;b.sa=Tg(c.clone());(new Image).src=b.sa;b.ab=w();hn(b)}Yn(a)}function Wn(a){if(a.ta){var b=a.ta;b.Y&&(b.Y.cancel(),b.Y=null);b.qa=-1;a.ta=null}a.J&&(a.J.cancel(),a.J=null);a.oa&&(m.clearTimeout(a.oa),a.oa=null);Zn(a);a.S&&(a.S.cancel(),a.S=null);a.va&&(m.clearTimeout(a.va),a.va=null)}
function $n(a,b){if(0==a.e)throw Error("Invalid operation: sending map when state is closed");a.f.push(new Qn(a.Hd++,b));2!=a.e&&3!=a.e||ao(a)}g.vc=function(){return 0==this.e};function ao(a){a.S||a.va||(a.va=sn(v(a.Hc,a),0),a.Xa=0)}g.Hc=function(a){this.va=null;bo(this,a)};
function bo(a,b){if(1==a.e){if(!b){a.$a=Math.floor(1E5*Math.random());var c=a.$a++,d=new bn(a,0,"",c,void 0);d.Da=null;var e=co(a),f=a.nb.clone();M(f,"RID",c);a.n&&M(f,"CVER",a.n);Xn(a,f);en(d,f,e);a.S=d;a.e=2}}else 3==a.e&&(b?eo(a,b):0!=a.f.length&&(a.S||eo(a)))}
function eo(a,b){var c,d;b?6<a.Ba?(a.f=a.j.concat(a.f),a.j.length=0,c=a.$a-1,d=co(a)):(c=b.B,d=b.Fa):(c=a.$a++,d=co(a));var e=a.nb.clone();M(e,"SID",a.h);M(e,"RID",c);M(e,"AID",a.Ma);Xn(a,e);c=new bn(a,0,a.h,c,a.Xa+1);c.Da=null;c.setTimeout(Math.round(1E4)+Math.round(1E4*Math.random()));a.S=c;en(c,e,d)}function Xn(a,b){if(a.O){var c=a.O.sc(a);c&&Wa(c,function(a,c){M(b,c,a)})}}
function co(a){var b=Math.min(a.f.length,1E3),c=["count="+b],d;6<a.Ba&&0<b?(d=a.f[0].e,c.push("ofs="+d)):d=0;for(var e=0;e<b;e++){var f=a.f[e].e,h=a.f[e].map,f=6>=a.Ba?e:f-d;try{Yd(h,function(a,b){c.push("req"+f+"_"+b+"="+encodeURIComponent(a))})}catch(k){c.push("req"+f+"_type="+encodeURIComponent("_badmap"))}}a.j=a.j.concat(a.f.splice(0,b));return c.join("&")}function fo(a){a.J||a.oa||(a.l=1,a.oa=sn(v(a.Gc,a),0),a.Ka=0)}
function go(a){if(a.J||a.oa||3<=a.Ka)return!1;a.l++;a.oa=sn(v(a.Gc,a),ho(a,a.Ka));a.Ka++;return!0}g.Gc=function(){this.oa=null;this.J=new bn(this,0,this.h,"rpc",this.l);this.J.Da=null;this.J.Sb=0;var a=this.lc.clone();M(a,"RID","rpc");M(a,"SID",this.h);M(a,"CI",this.Cb?"0":"1");M(a,"AID",this.Ma);Xn(this,a);if(!K||Gc(10))M(a,"TYPE","xmlhttp"),gn(this.J,a,!0,this.ob,!1);else{M(a,"TYPE","html");var b=this.J,c=Boolean(this.ob);b.Ra=3;b.sa=Tg(a.clone());rn(b,c)}};
function Dn(a,b,c){a.Cb=c;a.fa=b.qa;a.sd(1,0);a.nb=zn(a,null,a.Pb);ao(a)}
g.Dc=function(a,b){if(0!=this.e&&(this.J==a||this.S==a))if(this.fa=a.Za,this.S==a&&3==this.e)if(7<this.Ba){var c;try{c=this.k.parse(b)}catch(d){c=null}if(ea(c)&&3==c.length)if(0==c[0])a:{if(!this.oa){if(this.J)if(this.J.ab+3E3<this.S.ab)Zn(this),this.J.cancel(),this.J=null;else break a;go(this);X()}}else this.wc=c[1],0<this.wc-this.Ma&&37500>c[2]&&this.Cb&&0==this.Ka&&!this.Ca&&(this.Ca=sn(v(this.Id,this),6E3));else Cn(this,11)}else"y2f%"!=b&&Cn(this,11);else if(this.J==a&&Zn(this),!/^[\s\xa0]*$/.test(b)){c=
this.k.parse(b);ea(c);for(var e=0;e<c.length;e++){var f=c[e];this.Ma=f[0];f=f[1];2==this.e?"c"==f[0]?(this.h=f[1],this.ob=f[2],f=f[3],null!=f?this.Ba=f:this.Ba=6,this.e=3,this.O&&this.O.pc(this),this.lc=zn(this,this.bb()?this.ob:null,this.Pb),fo(this)):"stop"==f[0]&&Cn(this,7):3==this.e&&("stop"==f[0]?Cn(this,7):"noop"!=f[0]&&this.O&&this.O.oc(this,f),this.Ka=0)}}};g.Id=function(){null!=this.Ca&&(this.Ca=null,this.J.cancel(),this.J=null,go(this),X())};
function Zn(a){null!=a.Ca&&(m.clearTimeout(a.Ca),a.Ca=null)}
g.ub=function(a){var b;if(this.J==a)Zn(this),this.J=null,b=2;else if(this.S==a)this.S=null,b=1;else return;this.fa=a.Za;if(0!=this.e)if(a.ia)1==b?(w(),Mm(Rn,new Tn(Rn,a.Fa?a.Fa.length:0)),ao(this),this.j.length=0):fo(this);else{var c=a.Ea,d;if(!(d=3==c||7==c||0==c&&0<this.fa)){if(d=1==b)this.S||this.va||1==this.e||2<=this.Xa?d=!1:(this.va=sn(v(this.Hc,this,a),ho(this,this.Xa)),this.Xa++,d=!0);d=!(d||2==b&&go(this))}if(d)switch(c){case 1:Cn(this,5);break;case 4:Cn(this,10);break;case 3:Cn(this,6);
break;case 7:Cn(this,12);break;default:Cn(this,2)}}};function ho(a,b){var c=5E3+Math.floor(1E4*Math.random());a.isActive()||(c*=2);return c*b}g.sd=function(a){if(!Ia(arguments,this.e))throw Error("Unexpected channel state: "+this.e);};function Cn(a,b){if(2==b||9==b){var c=null;a.O&&(c=null);var d=v(a.De,a);c||(c=new Ag("//www.google.com/images/cleardot.gif"),Tg(c));wn(c.toString(),1E4,d)}else X();io(a,b)}g.De=function(a){a?X():(X(),io(this,8))};
function io(a,b){a.e=0;a.O&&a.O.nc(a,b);Yn(a);Wn(a)}function Yn(a){a.e=0;a.fa=-1;if(a.O)if(0==a.j.length&&0==a.f.length)a.O.Ib(a);else{var b=Pa(a.j),c=Pa(a.f);a.j.length=0;a.f.length=0;a.O.Ib(a,b,c)}}function zn(a,b,c){var d=Ug(c);if(""!=d.f)b&&Cg(d,b+"."+d.f),Dg(d,d.n);else var e=window.location,d=Vg(e.protocol,b?b+"."+e.hostname:e.hostname,e.port,c);a.Wa&&Wa(a.Wa,function(a,b){M(d,b,a)});M(d,"VER",a.Ba);Xn(a,d);return d}
g.Kb=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new En;a.za=!1;return a};g.isActive=function(){return!!this.O&&this.O.isActive(this)};function sn(a,b){if(!ha(a))throw Error("Fn must not be null and must be a function");return m.setTimeout(function(){a()},b)}g.ha=function(){Mm(Rn,new Un(Rn))};function X(){Mm(Rn,new Sn(Rn))}g.bb=function(){return!(!K||Gc(10))};function jo(){}g=jo.prototype;g.pc=function(){};g.oc=function(){};g.nc=function(){};g.Ib=function(){};
g.sc=function(){return{}};g.isActive=function(){return!0};function ko(a,b){Pm.call(this);if(ha(a))b&&(a=v(a,b));else if(a&&ha(a.handleEvent))a=v(a.handleEvent,a);else throw Error("Invalid listener argument");this.n=a;Vf(this,"tick",v(this.l,this));this.stop();Qm(this,5E3+2E4*Math.random())}x(ko,Pm);ko.prototype.k=0;ko.prototype.l=function(){if(500<this.e){var a=this.e;24E4>2*a&&(a*=2);Qm(this,a)}this.n()};ko.prototype.start=function(){ko.G.start.call(this);this.k=w()+this.e};ko.prototype.stop=function(){this.k=0;ko.G.stop.call(this)};function lo(a,b){this.la=a;this.j=b;this.h=new D;this.f=new ko(this.Ke,this);this.e=null;this.I=!1;this.l=null;this.H="";this.B=this.k=0;this.n=[]}x(lo,jo);g=lo.prototype;g.subscribe=function(a,b,c){return this.h.subscribe(a,b,c)};g.Ga=function(a,b,c){return this.h.Ga(a,b,c)};g.ka=function(a){return this.h.ka(a)};g.A=function(a,b){return this.h.A.apply(this.h,arguments)};g.dispose=function(){this.I||(this.I=!0,this.h.clear(),mo(this),Cb(this.h))};g.F=function(){return this.I};
function no(a){return{firstTestResults:[""],secondTestResults:!a.e.Cb,sessionId:a.e.h,arrayId:a.e.Ma}}g.connect=function(a,b,c){if(!this.e||2!=this.e.e){this.H="";this.f.stop();this.l=a||null;this.k=b||0;a=this.la+"/test";b=this.la+"/bind";var d=new Pn("1",c?c.firstTestResults:null,c?c.secondTestResults:null),e=this.e;e&&(e.O=null);d.O=this;this.e=d;e?this.e.connect(a,b,this.j,e.h,e.Ma):c?this.e.connect(a,b,this.j,c.sessionId,c.arrayId):this.e.connect(a,b,this.j)}};
function mo(a,b){a.B=b||0;a.f.stop();a.e&&(3==a.e.e&&bo(a.e),Vn(a.e));a.B=0}g.sendMessage=function(a,b){var c={_sc:a};b&&jb(c,b);this.f.enabled||2==(this.e?this.e.e:0)?this.n.push(c):this.e&&3==this.e.e&&$n(this.e,c)};g.pc=function(){var a=this.f;a.stop();Qm(a,5E3+2E4*Math.random());this.l=null;this.k=0;if(this.n.length){a=this.n;this.n=[];for(var b=0,c=a.length;b<c;++b)$n(this.e,a[b])}this.A("handlerOpened")};
g.nc=function(a,b){var c=2==b&&401==this.e.fa;if(4!=b&&!c){if(6==b||410==this.e.fa)c=this.f,c.stop(),Qm(c,500);this.f.start()}this.A("handlerError",b)};g.Ib=function(a,b,c){if(!this.f.enabled)this.A("handlerClosed");else if(c)for(a=0,b=c.length;a<b;++a)this.n.push(c[a].map)};g.sc=function(){var a={v:2};this.H&&(a.gsessionid=this.H);0!=this.k&&(a.ui=""+this.k);0!=this.B&&(a.ui=""+this.B);this.l&&jb(a,this.l);return a};
g.oc=function(a,b){if("S"==b[0])this.H=b[1];else if("gracefulReconnect"==b[0]){var c=this.f;c.stop();Qm(c,500);this.f.start();Vn(this.e)}else this.A("handlerMessage",new Jm(b[0],b[1]))};function oo(a,b){(a.j.loungeIdToken=b)||a.f.stop()}g.Ke=function(){this.f.stop();var a=this.e,b=0;a.J&&b++;a.S&&b++;0!=b?this.f.start():this.connect(this.l,this.k)};function po(a){this.reset(a)}function qo(a,b){if(a.f)throw Error(b+" is not allowed in V3.");}function ro(a){a.volume=-1;a.l=!1;a.j=null;a.e=-1;a.h=null;a.k=0;a.n=w()}g=po.prototype;g.reset=function(a){this.videoIds=[];this.f="";this.index=-1;this.videoId="";ro(this);a&&(this.videoIds=a.videoIds,this.index=a.index,this.f=a.listId,this.videoId=a.videoId,this.e=a.playerState,this.h=a.errorReason,this.volume=a.volume,this.l=a.muted,this.j=a.trackData,this.k=a.playerTime,this.n=a.playerTimeAt)};
function so(a){return a.f?a.videoId:a.videoIds[a.index]}function to(a){switch(a.e){case 1:return(w()-a.n)/1E3+a.k;case -1E3:return 0}return a.k}g.setVideoId=function(a){qo(this,"setVideoId");var b=this.index;this.index=Ca(this.videoIds,a);b!=this.index&&ro(this);return-1!=b};function uo(a,b,c){qo(a,"setPlaylist");c=c||so(a);Ta(a.videoIds,b)&&c==so(a)||(a.videoIds=Pa(b),a.setVideoId(c))}g.add=function(a){qo(this,"add");return a&&!Ia(this.videoIds,a)?(this.videoIds.push(a),!0):!1};
g.remove=function(a){qo(this,"remove");var b=so(this);return Ma(this.videoIds,a)?(this.index=Ca(this.videoIds,b),!0):!1};function vo(a){var b={};b.videoIds=Pa(a.videoIds);b.index=a.index;b.listId=a.f;b.videoId=a.videoId;b.playerState=a.e;b.errorReason=a.h;b.volume=a.volume;b.muted=a.l;b.trackData=hb(a.j);b.playerTime=a.k;b.playerTimeAt=a.n;return b}g.clone=function(){return new po(vo(this))};function Y(a,b,c){V.call(this);this.da=a;this.B=[];this.B.push(L(window,"beforeunload",v(this.Bd,this)));this.f=[];this.o=new po;3==c["mdx-version"]&&(this.o.f="RQ"+b.token);this.H=b.id;this.e=wo(this,c);this.e.subscribe("handlerOpened",this.Nd,this);this.e.subscribe("handlerClosed",this.Jd,this);this.e.subscribe("handlerError",this.Kd,this);this.o.f?this.e.subscribe("handlerMessage",this.Ld,this):this.e.subscribe("handlerMessage",this.Md,this);oo(this.e,b.token);this.subscribe("remoteQueueChange",
function(){var a=this.o.videoId;Yk()&&T("yt-remote-session-video-id",a)},this)}x(Y,V);g=Y.prototype;g.Ua=NaN;g.Yb=!1;g.zb=NaN;g.Xb=NaN;g.kb=NaN;g.qb=NaN;
g.connect=function(a,b){if(b){if(this.o.f){var c=b.listId,d=b.videoId,e=b.index,f=b.currentTime||0;5>=f&&(f=0);h={videoId:d,currentTime:f};c&&(h.listId=c);n(e)&&(h.currentIndex=e);c&&(this.o.f=c);this.o.videoId=d;this.o.index=e||0}else{var d=b.videoIds[b.index],f=b.currentTime||0;5>=f&&(f=0);var h={videoIds:d,videoId:d,currentTime:f};this.o.videoIds=[d];this.o.index=0}this.o.state=3;c=this.o;c.k=f;c.n=w();this.D("Connecting with setPlaylist and params: "+S(h));this.e.connect({method:"setPlaylist",
params:S(h)},a,bl())}else this.D("Connecting without params"),this.e.connect({},a,bl());xo(this)};g.dispose=function(){this.F()||(this.A("beforeDispose"),yo(this,3));Y.G.dispose.call(this)};g.C=function(){zo(this);Ao(this);Bo(this);G(this.kb);this.kb=NaN;G(this.qb);this.qb=NaN;this.k=null;hd(this.B);this.B.length=0;this.e.dispose();Y.G.C.call(this);this.f=this.o=this.e=null};g.D=function(a){ek("conn",a)};g.Bd=function(){this.h(2)};function wo(a,b){return new lo(zk(a.da,"/bc",void 0,!1),b)}
function yo(a,b){a.A("proxyStateChange",b)}function xo(a){a.Ua=F(v(function(){this.D("Connecting timeout");this.h(1)},a),2E4)}function zo(a){G(a.Ua);a.Ua=NaN}function Bo(a){G(a.zb);a.zb=NaN}function Co(a){Ao(a);a.Xb=F(v(function(){Do(this,"getNowPlaying")},a),2E4)}function Ao(a){G(a.Xb);a.Xb=NaN}function Eo(a){var b=a.e;return!!b.e&&3==b.e.e&&isNaN(a.Ua)}
g.Nd=function(){this.D("Channel opened");this.Yb&&(this.Yb=!1,Bo(this),this.zb=F(v(function(){this.D("Timing out waiting for a screen.");this.h(1)},this),15E3));kl(no(this.e),this.H)};g.Jd=function(){this.D("Channel closed");isNaN(this.Ua)?ll(!0):ll();this.dispose()};g.Kd=function(a){ll();isNaN(this.l())?(this.D("Channel error: "+a+" without reconnection"),this.dispose()):(this.Yb=!0,this.D("Channel error: "+a+" with reconnection in "+this.l()+" ms"),yo(this,2))};
function Fo(a,b){b&&(zo(a),Bo(a));b==Eo(a)?b&&(yo(a,1),Do(a,"getSubtitlesTrack")):b?(a.n()&&a.o.reset(),yo(a,1),Do(a,"getNowPlaying"),Go(a)):a.h(1)}function Ho(a,b){var c=b.params.videoId;delete b.params.videoId;c==a.o.videoId&&(eb(b.params)?a.o.j=null:a.o.j=b.params,a.A("remotePlayerChange"))}
function Io(a,b){var c=b.params.videoId||b.params.video_id,d=parseInt(b.params.currentIndex,10);a.o.f=b.params.listId||a.o.f;var e=a.o,f=e.videoId;e.videoId=c;e.index=d;c!=f&&ro(e);a.A("remoteQueueChange")}function Jo(a,b){b.params=b.params||{};Io(a,b);Ko(a,b)}
function Ko(a,b){var c=parseInt(b.params.currentTime||b.params.current_time,10),d=a.o;d.k=isNaN(c)?0:c;d.n=w();c=parseInt(b.params.state,10);c=isNaN(c)?-1:c;-1==c&&-1E3==a.o.e&&(c=-1E3);a.o.e=c;d=null;-1E3==c&&(d=a.o.h||"unknown",n(b.params.currentError)&&(d=Gh(b.params.currentError).reason||d));a.o.h=d;1==a.o.e?Co(a):Ao(a);a.A("remotePlayerChange")}function Lo(a,b){var c="true"==b.params.muted;a.o.volume=parseInt(b.params.volume,10);a.o.l=c;a.A("remotePlayerChange")}
g.Ld=function(a){a.params?this.D("Received: action="+a.action+", params="+S(a.params)):this.D("Received: action="+a.action+" {}");switch(a.action){case "loungeStatus":a=Gh(a.params.devices);this.f=A(a,function(a){return new Tk(a)});a=!!Ga(this.f,function(a){return"LOUNGE_SCREEN"==a.type});Fo(this,a);break;case "loungeScreenConnected":Fo(this,!0);break;case "loungeScreenDisconnected":Na(this.f,function(a){return"LOUNGE_SCREEN"==a.type});Fo(this,!1);break;case "remoteConnected":var b=new Tk(Gh(a.params.device));
Ga(this.f,function(a){return a.equals(b)})||La(this.f,b);break;case "remoteDisconnected":b=new Tk(Gh(a.params.device));Na(this.f,function(a){return a.equals(b)});break;case "gracefulDisconnect":break;case "playlistModified":Io(this,a);break;case "nowPlaying":Jo(this,a);break;case "onStateChange":Ko(this,a);break;case "onVolumeChanged":Lo(this,a);break;case "onSubtitlesTrackChanged":Ho(this,a);break;default:this.D("Unrecognized action: "+a.action)}};
g.Md=function(a){a.params?this.D("Received: action="+a.action+", params="+S(a.params)):this.D("Received: action="+a.action);Mo(this,a);No(this,a);if(Eo(this)){var b=this.o.clone(),c=!1,d,e,f,h,k,l,r;a.params&&(d=a.params.videoId||a.params.video_id,e=a.params.videoIds||a.params.video_ids,f=a.params.state,h=a.params.currentTime||a.params.current_time,k=a.params.volume,l=a.params.muted,n(a.params.currentError)&&(r=Gh(a.params.currentError)));if("onSubtitlesTrackChanged"==a.action)d==so(this.o)&&(delete a.params.videoId,
eb(a.params)?this.o.j=null:this.o.j=a.params,this.A("remotePlayerChange"));else if(so(this.o)||"onStateChange"!=a.action)"playlistModified"!=a.action&&"nowPlayingPlaylist"!=a.action||e?(d||"nowPlaying"!=a.action&&"nowPlayingPlaylist"!=a.action?d||(d=so(this.o)):this.o.setVideoId(""),e&&(e=e.split(","),uo(this.o,e,d))):uo(this.o,[]),this.o.add(d)&&Do(this,"getPlaylist"),d&&this.o.setVideoId(d),b.index==this.o.index&&Ta(b.videoIds,this.o.videoIds)||this.A("remoteQueueChange"),n(f)&&(b=parseInt(f,10),
b=isNaN(b)?-1:b,-1==b&&-1E3==this.o.e&&(b=-1E3),0==b&&"0"==h&&(b=-1),c=c||b!=this.o.e,this.o.e=b,d=null,-1E3==b&&(d=this.o.h||"unknown",r&&(d=r.reason||d)),c=c||this.o.h!=d,this.o.h=d,1==this.o.e?Co(this):Ao(this)),"onError"!=a.action||-1!=this.o.e&&-1E3!=this.o.e||(a=Gh(a.params.errors)||[],1==a.length&&"PLAYER_ERROR"==a[0].error&&a[0].videoId==so(this.o)&&(this.o.e=-1E3,this.o.h=a[0].reason||"unknown",c=!0)),h&&(b=parseInt(h,10),c=this.o,c.k=isNaN(b)?0:b,c.n=w(),c=!0),n(k)&&(b=parseInt(k,10),isNaN(b)||
(c=c||this.o.volume!=b,this.o.volume=b),n(l)&&(l="true"==l,c=c||this.o.l!=l,this.o.l=l)),c&&this.A("remotePlayerChange")}};
function Mo(a,b){switch(b.action){case "loungeStatus":var c=Gh(b.params.devices);a.f=A(c,function(a){return new Tk(a)});break;case "loungeScreenDisconnected":Na(a.f,function(a){return"LOUNGE_SCREEN"==a.type});break;case "remoteConnected":var d=new Tk(Gh(b.params.device));Ga(a.f,function(a){return a.equals(d)})||La(a.f,d);break;case "remoteDisconnected":d=new Tk(Gh(b.params.device)),Na(a.f,function(a){return a.equals(d)})}}
function No(a,b){var c=!1;if("loungeStatus"==b.action)c=!!Ga(a.f,function(a){return"LOUNGE_SCREEN"==a.type});else if("loungeScreenConnected"==b.action)c=!0;else if("loungeScreenDisconnected"==b.action)c=!1;else return;if(!isNaN(a.zb))if(c)Bo(a);else return;c==Eo(a)?c&&yo(a,1):c?(zo(a),a.n()&&a.o.reset(),yo(a,1),Do(a,"getNowPlaying"),Go(a)):a.h(1)}g.te=function(){if(this.k){var a=this.k;this.k=null;this.o.videoId!=a&&Do(this,"getNowPlaying")}};Y.prototype.subscribe=Y.prototype.subscribe;
Y.prototype.unsubscribeByKey=Y.prototype.ka;Y.prototype.P=function(){var a=3;this.F()||(a=0,isNaN(this.l())?Eo(this)&&(a=1):a=2);return a};Y.prototype.getProxyState=Y.prototype.P;Y.prototype.h=function(a){this.D("Disconnecting with "+a);zo(this);this.A("beforeDisconnect",a);1==a&&ll();mo(this.e,a);this.dispose()};Y.prototype.disconnect=Y.prototype.h;Y.prototype.M=function(){var a=this.o;if(this.k){var b=a=this.o.clone(),c=this.k,d=a.index,e=b.videoId;b.videoId=c;b.index=d;c!=e&&ro(b)}return vo(a)};
Y.prototype.getPlayerContextData=Y.prototype.M;Y.prototype.ca=function(a){var b=new po(a);b.videoId&&b.videoId!=this.o.videoId&&(this.k=b.videoId,G(this.kb),this.kb=F(v(this.te,this),5E3));var c=[];this.o.f==b.f&&this.o.videoId==b.videoId&&this.o.index==b.index&&Ta(this.o.videoIds,b.videoIds)||c.push("remoteQueueChange");this.o.e==b.e&&this.o.volume==b.volume&&this.o.l==b.l&&to(this.o)==to(b)&&S(this.o.j)==S(b.j)||c.push("remotePlayerChange");this.o.reset(a);z(c,function(a){this.A(a)},this)};
Y.prototype.setPlayerContextData=Y.prototype.ca;Y.prototype.I=function(){return this.e.j.loungeIdToken};Y.prototype.getLoungeToken=Y.prototype.I;Y.prototype.n=function(){var a=this.e.j.id,b=Ga(this.f,function(b){return"REMOTE_CONTROL"==b.type&&b.id!=a});return b?b.id:""};Y.prototype.getOtherConnectedRemoteId=Y.prototype.n;Y.prototype.l=function(){var a=this.e;return a.f.enabled?a.f.k-w():NaN};Y.prototype.getReconnectTimeout=Y.prototype.l;
Y.prototype.ma=function(){if(!isNaN(this.l())){var a=this.e.f;a.enabled&&(a.stop(),a.start(),a.l())}};Y.prototype.reconnect=Y.prototype.ma;function Go(a){G(a.qb);a.qb=F(v(a.h,a,1),864E5)}function Do(a,b,c){c?a.D("Sending: action="+b+", params="+S(c)):a.D("Sending: action="+b);a.e.sendMessage(b,c)}Y.prototype.R=function(a,b){Do(this,a,b);Go(this)};Y.prototype.sendMessage=Y.prototype.R;function Oo(a){V.call(this);this.k=a;this.ga=Po();this.D("Initializing local screens: "+pk(this.ga));this.h=Qo();this.D("Initializing account screens: "+pk(this.h));this.Jb=null;this.e=[];this.f=[];Ro(this,Em()||[]);this.D("Initializing DIAL devices: "+Dk(this.f));a=nk(hl());So(this,a);this.D("Initializing online screens: "+pk(this.e));this.l=w()+3E5;To(this)}x(Oo,V);var Uo=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g=Oo.prototype;g.Va=NaN;g.wb="";g.D=function(a){ek("RM",a)};
g.K=function(a){ek("RM",a)};function Qo(){var a=Po(),b=nk(hl());return Da(b,function(b){return!Lk(a,b)})}function Po(){var a=nk(dl());return Da(a,function(a){return!a.uuid})}function To(a){H("yt-remote-cast-device-list-update",function(){var a=Em();Ro(this,a||[])},a);H("yt-remote-cast-device-status-update",a.Ge,a);a.Nc();var b=w()>a.l?2E4:1E4;Jb(v(a.Nc,a),b)}g.A=function(a,b){if(this.F())return!1;this.D("Firing "+a);return this.j.A.apply(this.j,arguments)};
g.Nc=function(){var a=Em()||[];0==a.length||Ro(this,a);a=Vo(this);0==a.length||(Ea(a,function(a){return!Lk(this.h,a)},this)&&fl()?Wo(this):Xo(this,a))};function Yo(a,b){var c=Vo(a);return Da(b,function(a){return a.uuid?(a=Kk(this.f,a.uuid),!!a&&"RUNNING"==a.status):!!Lk(c,a)},a)}
function Ro(a,b){var c=!1;z(b,function(a){var b=Mk(this.ga,a.id);b&&b.name!=a.name&&(this.D("Renaming screen id "+b.id+" from "+b.name+" to "+a.name),b.name=a.name,c=!0)},a);c&&(a.D("Renaming due to DIAL."),Zo(a));il(Hk(b));var d=!Ta(a.f,b,Jk);d&&a.D("Updating DIAL devices: "+Dk(a.f)+" to "+Dk(b));a.f=b;So(a,a.e);d&&a.A("onlineReceiverChange")}
g.Ge=function(a){var b=Kk(this.f,a.id);b&&(this.D("Updating DIAL device: "+b.id+"("+b.name+") from status: "+b.status+" to status: "+a.status+" and from activityId: "+b.e+" to activityId: "+a.e),b.e=a.e,b.status=a.status,il(Hk(this.f)));So(this,this.e)};function So(a,b,c){var d=Yo(a,b),e=!Ta(a.e,d,kk);if(e||c)0==b.length||gl(A(d,lk));e&&(a.D("Updating online screens: "+pk(a.e)+" -> "+pk(d)),a.e=d,a.A("onlineReceiverChange"))}
function Xo(a,b){var c=[],d={};z(b,function(a){a.token&&(d[a.token]=a,c.push(a.token))});var e={method:"POST",N:{lounge_token:c.join(",")},context:a,X:function(a,b){var c=[];z(b.screens||[],function(a){"online"==a.status&&c.push(d[a.loungeToken])});var e=this.Jb?$o(this,this.Jb):null;e&&!Lk(c,e)&&c.push(e);So(this,c,!0)}};oj(zk(a.k,"/pairing/get_screen_availability"),e)}
function Wo(a){var b=Vo(a),c=A(b,function(a){return a.id});0!=c.length&&(a.D("Updating lounge tokens for: "+S(c)),oj(zk(a.k,"/pairing/get_lounge_token_batch"),{N:{screen_ids:c.join(",")},method:"POST",context:a,X:function(a,c){ap(this,c.screens||[]);this.ga=Da(this.ga,function(a){return!!a.token});Zo(this);Xo(this,b)}}))}function ap(a,b){z(Oa(a.ga,a.h),function(a){var d=Ga(b,function(b){return a.id==b.screenId});d&&(a.token=d.loungeToken)})}
function Zo(a){var b=Po();Ta(a.ga,b,kk)||(a.D("Saving local screens: "+pk(b)+" to "+pk(a.ga)),cl(A(a.ga,lk)),So(a,a.e,!0),Ro(a,Em()||[]),a.A("managedScreenChange",Vo(a)))}function bp(a,b,c){var d=Ha(b,function(a){return jk(c,a)}),e=0>d;0>d?b.push(c):b[d]=c;Lk(a.e,c)||a.e.push(c);return e}g.tc=function(a,b){for(var c=Vo(this),c=A(c,function(a){return a.name}),d=a,e=2;Ia(c,d);)d=b.call(m,e),e++;return d};
g.Jc=function(a,b,c){var d=!1;b>=Uo.length&&(this.D("Pairing DIAL device "+a+" with "+c+" timed out."),d=!0);var e=Kk(this.f,a);if(!e)this.D("Pairing DIAL device "+a+" with "+c+" failed: no device for "+a),d=!0;else if("ERROR"==e.status||"STOPPED"==e.status)this.D("Pairing DIAL device "+a+" with "+c+" failed: launch error on "+a),d=!0;d?(cp(this),this.A("screenPair",null)):oj(zk(this.k,"/pairing/get_screen"),{method:"POST",N:{pairing_code:c},context:this,X:function(a,b){if(c==this.wb){cp(this);var d=
new hk(b.screen);d.name=e.name;d.uuid=e.id;this.D("Pairing "+c+" succeeded.");var l=bp(this,this.ga,d);this.D("Paired with "+(l?"a new":"an old")+" local screen:"+ok(d));Zo(this);this.A("screenPair",d)}},onError:function(){c==this.wb&&(this.D("Polling pairing code: "+c),G(this.Va),this.Va=F(v(this.Jc,this,a,b+1,c),Uo[b]))}})};
function dp(a,b,c){var d=Z,e="";cp(d);if(Kk(d.f,a)){if(!e){var f=e=Ek();xm();var h=Gm(a),k=um();if(k&&h){var l=new cast.Receiver(h.id,h.name),l=new cast.LaunchRequest("YouTube",l);l.parameters="pairingCode="+f;l.description=new cast.LaunchDescription;l.description.text=document.title;b&&(l.parameters+="&v="+b,c&&(l.parameters+="&t="+Math.round(c)),l.description.url="http://i.ytimg.com/vi/"+b+"/default.jpg");"UNKNOWN"!=h.status&&(h.status="UNKNOWN",Cm(h),I("yt-remote-cast-device-status-update",h));
sm("Sending a cast launch request with params: "+l.parameters);k.launch(l,pa(Hm,a))}else sm("No cast API or no cast device. Dropping cast launch.")}d.wb=e;d.Va=F(v(d.Jc,d,a,0,e),Uo[0])}else d.D("No DIAL device with id: "+a)}function cp(a){G(a.Va);a.Va=NaN;a.wb=""}function $o(a,b){var c=Mk(Vo(a),b);a.D("Found screen: "+ok(c)+" with key: "+b);return c}function ep(a){var b=Z,c=Mk(b.e,a);b.D("Found online screen: "+ok(c)+" with key: "+a);return c}
function fp(a){var b=Z,c=Kk(b.f,a);if(!c){var d=Mk(b.ga,a);d&&(c=Kk(b.f,d.uuid))}b.D("Found DIAL: "+(c?c.toString():"null")+" with key: "+a);return c}function Vo(a){return Oa(a.h,Da(a.ga,function(a){return!Lk(this.h,a)},a))};function gp(a){Nk.call(this,"ScreenServiceProxy");this.Q=a;this.e=[];this.e.push(this.Q.$_s("screenChange",v(this.Oe,this)));this.e.push(this.Q.$_s("onlineScreenChange",v(this.Vd,this)))}x(gp,Nk);g=gp.prototype;g.V=function(a){return this.Q.$_gs(a)};g.contains=function(a){return!!this.Q.$_c(a)};g.get=function(a){return this.Q.$_g(a)};g.start=function(){this.Q.$_st()};g.add=function(a,b,c){this.Q.$_a(a,b,c)};g.remove=function(a,b,c){this.Q.$_r(a,b,c)};g.Bb=function(a,b,c,d){this.Q.$_un(a,b,c,d)};
g.C=function(){for(var a=0,b=this.e.length;a<b;++a)this.Q.$_ubk(this.e[a]);this.e.length=0;this.Q=null;gp.G.C.call(this)};g.Oe=function(){this.A("screenChange")};g.Vd=function(){this.A("onlineScreenChange")};W.prototype.$_st=W.prototype.start;W.prototype.$_gspc=W.prototype.Pe;W.prototype.$_gsppc=W.prototype.Wc;W.prototype.$_c=W.prototype.contains;W.prototype.$_g=W.prototype.get;W.prototype.$_a=W.prototype.add;W.prototype.$_un=W.prototype.Bb;W.prototype.$_r=W.prototype.remove;W.prototype.$_gs=W.prototype.V;
W.prototype.$_gos=W.prototype.Vc;W.prototype.$_s=W.prototype.subscribe;W.prototype.$_ubk=W.prototype.ka;function hp(){var a=!!E("MDX_ENABLE_CASTV2"),b=!!E("MDX_ENABLE_QUEUE"),c={device:"Desktop",app:"youtube-desktop"};a?p("yt.mdx.remote.castv2_",!0,void 0):xm();Yh&&Xh();Vk();ip||(ip=new yk,ml()&&(ip.e="/api/loungedev"));Z||a||(Z=new Oo(ip),Z.subscribe("screenPair",jp),Z.subscribe("managedScreenChange",kp),Z.subscribe("onlineReceiverChange",function(){I("yt-remote-receiver-availability-change")}));lp||(lp=q("yt.mdx.remote.deferredProxies_")||[],p("yt.mdx.remote.deferredProxies_",lp,void 0));mp(b);b=
np();if(a&&!b){var d=new W(ip);p("yt.mdx.remote.screenService_",d,void 0);b=np();Wl(d,function(a){a?op()&&om(op(),"YouTube TV"):d.subscribe("onlineScreenChange",function(){I("yt-remote-receiver-availability-change")})},!(!c||!c.loadCastApiSetupScript))}if(c&&!q("yt.mdx.remote.initialized_")){p("yt.mdx.remote.initialized_",!0,void 0);pp("Initializing: "+S(c));qp.push(H("yt-remote-cast2-availability-change",function(){I("yt-remote-receiver-availability-change")}));qp.push(H("yt-remote-cast2-receiver-selected",
function(){rp(null);I("yt-remote-auto-connect","cast-selector-receiver")}));qp.push(H("yt-remote-cast2-session-change",sp));qp.push(H("yt-remote-connection-change",function(a){a?om(op(),"YouTube TV"):tp()||(om(null,null),jm())}));var e=up();c.isAuto&&(e.id+="#dial");e.name=c.device;e.app=c.app;pp(" -- with channel params: "+S(e));vp(e);a&&b.start();op()||wp()}}
function xp(){Tb(qp);qp.length=0;Cb(yp);yp=null;lp&&(z(lp,function(a){a(null)}),lp.length=0,lp=null,p("yt.mdx.remote.deferredProxies_",null,void 0));Z&&(Cb(Z),Z=null);ip=null;Bm()}function zp(){if(Ap()&&hm()){var a=[];if(U("yt-remote-cast-available")||q("yt.mdx.remote.cloudview.castButtonShown_")||Bp())a.push({key:"cast-selector-receiver",name:Cp()}),p("yt.mdx.remote.cloudview.castButtonShown_",!0,void 0);return a}return q("yt.mdx.remote.cloudview.initializing_")?[]:Dp()}
function Dp(){var a=[],a=Ep()?np().Q.$_gos():nk(hl()),b=Fp();b&&Bp()&&(Lk(a,b)||a.push(b));Ep()||(b=Ik(jl()),b=Da(b,function(b){return!Mk(a,b.id)}),a=Oa(a,b));return Gk(a)}function Gp(){if(Ap()&&hm()){var a=im();return a?{key:"cast-selector-receiver",name:a}:null}return Hp()}function Hp(){var a=Dp(),b=Ip(),c=Fp();c||(c=tp());return Ga(a,function(a){return c&&ik(c,a.key)||b&&(a=fp(a.key))&&a.id==b?!0:!1})}function Cp(){if(Ap()&&hm())return im();var a=Fp();return a?a.name:null}
function Fp(){var a=op();if(!a)return null;if(!Z){var b=np().V();return Mk(b,a)}return $o(Z,a)}function sp(a){pp("remote.onCastSessionChange_: "+ok(a));if(a){var b=Fp();b&&b.id==a.id?om(b.id,"YouTube TV"):(b&&Jp(),Kp(a,1))}else Jp()}function Lp(a,b){pp("Connecting to: "+S(a));if("cast-selector-receiver"==a.key)rp(b||null),nm(b||null);else{Jp();rp(b||null);var c=null;Z?c=ep(a.key):(c=np().V(),c=Mk(c,a.key));if(c)Kp(c,1);else{if(Z&&(c=fp(a.key))){Mp(c);return}F(function(){Np(null)},0)}}}
function Jp(){Z&&cp(Z);a:{var a=Bp();if(a&&(a=a.getOtherConnectedRemoteId())){pp("Do not stop DIAL due to "+a);Op("");break a}(a=Ip())?(pp("Stopping DIAL: "+a),Im(a),Op("")):(a=Fp())&&a.uuid&&(pp("Stopping DIAL: "+a.uuid),Im(a.uuid))}lm()?dm().stopSession():mm("stopSession called before API ready.");(a=Bp())?a.disconnect(1):(Ub("yt-remote-before-disconnect",1),Ub("yt-remote-connection-change",!1));Np(null)}function pp(a){ek("remote",a)}function Ap(){return!!q("yt.mdx.remote.castv2_")}
function Ep(){return q("yt.mdx.remote.screenService_")}function np(){if(!yp){var a=Ep();yp=a?new gp(a):null}return yp}function op(){return q("yt.mdx.remote.currentScreenId_")}function Pp(a){p("yt.mdx.remote.currentScreenId_",a,void 0);if(Z){var b=Z;b.l=w()+3E5;if((b.Jb=a)&&(a=$o(b,a))&&!Lk(b.e,a)){var c=Pa(b.e);c.push(a);So(b,c,!0)}}}function Ip(){return q("yt.mdx.remote.currentDialId_")}function Op(a){p("yt.mdx.remote.currentDialId_",a,void 0)}
function Qp(){return q("yt.mdx.remote.connectData_")}function rp(a){p("yt.mdx.remote.connectData_",a,void 0)}function Bp(){return q("yt.mdx.remote.connection_")}function Np(a){var b=Bp();rp(null);a?Ba(!Bp()):(Pp(""),Op(""));p("yt.mdx.remote.connection_",a,void 0);lp&&(z(lp,function(b){b(a)}),lp.length=0);b&&!a?Ub("yt-remote-connection-change",!1):!b&&a&&I("yt-remote-connection-change",!0)}function tp(){var a=Yk();if(!a)return null;if(Ep()){var b=np().V();return Mk(b,a)}return Z?$o(Z,a):null}
function Kp(a,b){Ba(!op());Pp(a.id);var c=new Y(ip,a,up());c.connect(b,Qp());c.subscribe("beforeDisconnect",function(a){Ub("yt-remote-before-disconnect",a)});c.subscribe("beforeDispose",function(){Bp()&&(Bp(),Np(null))});Np(c)}function Mp(a){Ip();pp("Connecting to: "+(a?a.toString():"null"));Op(a.id);var b=Qp();b?dp(a.id,b.videoIds[b.index],b.currentTime):dp(a.id)}
function wp(){var a=tp();a?(pp("Resume connection to: "+ok(a)),Kp(a,0)):(ll(),jm(),pp("Skipping connecting because no session screen found."))}function jp(a){pp("Paired with: "+ok(a));a?Kp(a,1):Np(null)}function kp(){var a=op();a&&!Fp()&&(pp("Dropping current screen with id: "+a),Jp());tp()||ll()}var ip=null,lp=null,yp=null,Z=null;
function mp(a){var b=up();if(eb(b)){var b=Xk(),c=U("yt-remote-session-name")||"",d=U("yt-remote-session-app")||"",b={device:"REMOTE_CONTROL",id:b,name:c,app:d};a&&(b["mdx-version"]=3);p("yt.mdx.remote.channelParams_",b,void 0)}}function up(){return q("yt.mdx.remote.channelParams_")||{}}function vp(a){a?(T("yt-remote-session-app",a.app),T("yt-remote-session-name",a.name)):($h("yt-remote-session-app"),$h("yt-remote-session-name"));p("yt.mdx.remote.channelParams_",a,void 0)}var qp=[];var Rp=null,Sp=[];function Tp(){Up();if(Gp()){var a=Rp;"html5"!=a.getPlayerType()&&a.loadNewVideoConfig(a.getCurrentVideoConfig(),"html5")}}function Vp(a){"cast-selector-receiver"==a?km():Wp(a)}
function Wp(a){var b=zp();if(a=Fk(b,a)){var c=Rp,d=c.getVideoData().video_id,e=c.getVideoData().list,f=c.getCurrentTime();Lp(a,{videoIds:[d],listId:e,videoId:d,index:0,currentTime:f});"html5"!=c.getPlayerType()?c.loadNewVideoConfig(c.getCurrentVideoConfig(),"html5"):c.updateRemoteReceivers&&c.updateRemoteReceivers(b,a)}}function Up(){var a=Rp;a&&a.updateRemoteReceivers&&a.updateRemoteReceivers(zp(),Gp())};var Xp=null,Yp=[];function Zp(a){return{externalChannelId:a.externalChannelId,Gd:!!a.isChannelPaid,source:a.source,Qa:a.subscriptionId}}function $p(a){aq(Zp(a))}function aq(a){sj()?(Q(Xi,new Oi(a.externalChannelId,a.Gd?{itemType:"U",itemId:a.externalChannelId}:null)),(a="/gen_204?"+Bd({event:"subscribe",source:a.source}))&&ch(a)):bq(a)}function bq(a){ij(function(b){b.subscription_ajax&&aq(a)},null,"sub_button")}
function cq(a){a=Zp(a);Q(bj,new Qi(a.externalChannelId,a.Qa,null));(a="/gen_204?"+Bd({event:"unsubscribe",source:a.source}))&&ch(a)}function dq(a){Xp&&Xp.channelSubscribed(a.e,a.Qa)}function eq(a){Xp&&Xp.channelUnsubscribed(a.e)};function fq(a){C.call(this);this.f=a;this.f.subscribe("command",this.Mc,this);this.h={};this.j=!1}x(fq,C);g=fq.prototype;g.start=function(){this.j||this.F()||(this.j=!0,gq(this.f,"RECEIVING"))};
g.Mc=function(a,b){if(this.j&&!this.F()){var c=b||{};switch(a){case "addEventListener":if(u(c.event)&&(c=c.event,!(c in this.h))){var d=v(this.ve,this,c);this.h[c]=d;this.addEventListener(c,d)}break;case "removeEventListener":u(c.event)&&hq(this,c.event);break;default:this.e.isReady()&&this.e[a]&&(c=iq(a,b||{}),c=this.e[a].apply(this.e,c),(c=jq(a,c))&&this.j&&!this.F()&&gq(this.f,a,c))}}};g.ve=function(a,b){this.j&&!this.F()&&gq(this.f,a,this.Mb(a,b))};g.Mb=function(a,b){if(null!=b)return{value:b}};
function hq(a,b){b in a.h&&(a.removeEventListener(b,a.h[b]),delete a.h[b])}g.C=function(){this.f.Ga("command",this.Mc,this);this.f=null;for(var a in this.h)hq(this,a);fq.G.C.call(this)};function kq(a,b){fq.call(this,b);this.e=a;this.start()}x(kq,fq);kq.prototype.addEventListener=function(a,b){this.e.addEventListener(a,b)};kq.prototype.removeEventListener=function(a,b){this.e.removeEventListener(a,b)};
function iq(a,b){switch(a){case "loadVideoById":return b=Sj(b),Uj(b),[b];case "cueVideoById":return b=Sj(b),Uj(b),[b];case "loadVideoByPlayerVars":return Uj(b),[b];case "cueVideoByPlayerVars":return Uj(b),[b];case "loadPlaylist":return b=Tj(b),Uj(b),[b];case "cuePlaylist":return b=Tj(b),Uj(b),[b];case "seekTo":return[b.seconds,b.allowSeekAhead];case "playVideoAt":return[b.index];case "setVolume":return[b.volume];case "setPlaybackQuality":return[b.suggestedQuality];case "setPlaybackRate":return[b.suggestedRate];
case "setLoop":return[b.loopPlaylists];case "setShuffle":return[b.shufflePlaylist];case "getOptions":return[b.module];case "getOption":return[b.module,b.option];case "setOption":return[b.module,b.option,b.value]}return[]}
function jq(a,b){switch(a){case "isMuted":return{muted:b};case "getVolume":return{volume:b};case "getPlaybackRate":return{playbackRate:b};case "getAvailablePlaybackRates":return{availablePlaybackRates:b};case "getVideoLoadedFraction":return{videoLoadedFraction:b};case "getPlayerState":return{playerState:b};case "getCurrentTime":return{currentTime:b};case "getPlaybackQuality":return{playbackQuality:b};case "getAvailableQualityLevels":return{availableQualityLevels:b};case "getDuration":return{duration:b};
case "getVideoUrl":return{videoUrl:b};case "getVideoEmbedCode":return{videoEmbedCode:b};case "getPlaylist":return{playlist:b};case "getPlaylistIndex":return{playlistIndex:b};case "getOptions":return{options:b};case "getOption":return{option:b}}}
kq.prototype.Mb=function(a,b){switch(a){case "onReady":return;case "onStateChange":return{playerState:b};case "onPlaybackQualityChange":return{playbackQuality:b};case "onPlaybackRateChange":return{playbackRate:b};case "onError":return{errorCode:b}}return kq.G.Mb.call(this,a,b)};kq.prototype.C=function(){kq.G.C.call(this);delete this.e};function lq(a,b){this.source=null;this.j=a||null;this.origin="*";this.B=window.document.location.protocol+"//"+window.document.location.hostname;this.l=b;this.h=this.e=this.f=this.k=null;L(window,"message",v(this.n,this))}
lq.prototype.n=function(a){var b=this.l||E("POST_MESSAGE_ORIGIN")||this.B;if("*"!=b&&a.origin!=b)window.console&&window.console.warn("Untrusted origin: "+a.origin);else if(!this.j||a.source==this.j)if(this.source=a.source,this.origin="null"==a.origin?this.origin:a.origin,a=a.data,u(a)){try{a=Gh(a)}catch(c){return}this.k=a.id;switch(a.event){case "listening":this.e&&(this.e(),this.e=null);break;case "command":this.f&&(this.h&&!Ia(this.h,a.func)||this.f(a.func,a.args))}}};
lq.prototype.sendMessage=function(a){this.source&&(a.id=this.k,a=S(a),this.source.postMessage(a,this.origin))};function mq(){var a=this.f=new lq,b=v(this.re,this);a.f=b;a.h=null;this.j=[];this.n=!1;this.k=(a=E("POST_MESSAGE_ORIGIN"))&&Zg(a)?a:null;this.l={}}g=mq.prototype;g.re=function(a,b){if(this.k&&this.k!=this.f.origin)this.dispose();else if("addEventListener"==a&&b){var c=b[0];this.l[c]||"onReady"==c||(this.addEventListener(c,nq(this,c)),this.l[c]=!0)}else this.Zc(a,b)};g.Zc=function(){};function nq(a,b){return v(function(a){this.sendMessage(b,a)},a)}g.addEventListener=function(){};
g.vd=function(){this.n=!0;this.sendMessage("initialDelivery",this.Nb());this.sendMessage("onReady");z(this.j,this.$c,this);this.j=[]};g.Nb=function(){return null};function oq(a,b){a.sendMessage("infoDelivery",b)}g.$c=function(a){this.n?this.f.sendMessage(a):this.j.push(a)};g.sendMessage=function(a,b){this.$c({event:a,info:void 0==b?null:b})};g.dispose=function(){this.f=null};function pq(a){mq.call(this);this.e=a;this.h=[];this.addEventListener("onReady",v(this.ae,this));this.addEventListener("onVideoProgress",v(this.ze,this));this.addEventListener("onVolumeChange",v(this.Ae,this));this.addEventListener("onApiChange",v(this.ue,this));this.addEventListener("onPlaybackQualityChange",v(this.we,this));this.addEventListener("onPlaybackRateChange",v(this.xe,this));this.addEventListener("onStateChange",v(this.ye,this))}x(pq,mq);g=pq.prototype;
g.Zc=function(a,b){if(this.e[a]){b=b||[];if(0<b.length&&Qj(a)){var c;c=b;if(ia(c[0])&&!ea(c[0]))c=c[0];else{var d={};switch(a){case "loadVideoById":case "cueVideoById":d=Sj.apply(window,c);break;case "loadVideoByUrl":case "cueVideoByUrl":d=Rj.apply(window,c);break;case "loadPlaylist":case "cuePlaylist":d=Tj.apply(window,c)}c=d}Uj(c);b.length=1;b[0]=c}this.e[a].apply(this.e,b);Qj(a)&&oq(this,this.Nb())}};g.ae=function(){var a=v(this.vd,this);this.f.e=a};
g.addEventListener=function(a,b){this.h.push({ud:a,ra:b});this.e.addEventListener(a,b)};g.Nb=function(){if(!this.e)return null;var a=this.e.getApiInterface();Ma(a,"getVideoData");for(var b={apiInterface:a},c=0,d=a.length;c<d;c++){var e=a[c],f=e;if(0==f.search("get")||0==f.search("is")){var f=e,h=0;0==f.search("get")?h=3:0==f.search("is")&&(h=2);f=f.charAt(h).toLowerCase()+f.substr(h+1);try{var k=this.e[e]();b[f]=k}catch(l){}}}b.videoData=this.e.getVideoData();return b};
g.ye=function(a){a={playerState:a,currentTime:this.e.getCurrentTime(),duration:this.e.getDuration(),videoData:this.e.getVideoData(),videoStartBytes:0,videoBytesTotal:this.e.getVideoBytesTotal(),videoLoadedFraction:this.e.getVideoLoadedFraction(),playbackQuality:this.e.getPlaybackQuality(),availableQualityLevels:this.e.getAvailableQualityLevels(),videoUrl:this.e.getVideoUrl(),playlist:this.e.getPlaylist(),playlistIndex:this.e.getPlaylistIndex()};this.e.getProgressState&&(a.progressState=this.e.getProgressState());
this.e.getStoryboardFormat&&(a.storyboardFormat=this.e.getStoryboardFormat());oq(this,a)};g.we=function(a){oq(this,{playbackQuality:a})};g.xe=function(a){oq(this,{playbackRate:a})};g.ue=function(){for(var a=this.e.getOptions(),b={namespaces:a},c=0,d=a.length;c<d;c++){var e=a[c],f=this.e.getOptions(e);b[e]={options:f};for(var h=0,k=f.length;h<k;h++){var l=f[h],r=this.e.getOption(e,l);b[e][l]=r}}this.sendMessage("apiInfoDelivery",b)};g.Ae=function(){oq(this,{muted:this.e.isMuted(),volume:this.e.getVolume()})};
g.ze=function(a){a={currentTime:a,videoBytesLoaded:this.e.getVideoBytesLoaded(),videoLoadedFraction:this.e.getVideoLoadedFraction()};this.e.getProgressState&&(a.progressState=this.e.getProgressState());oq(this,a)};g.dispose=function(){pq.G.dispose.call(this);for(var a=0;a<this.h.length;a++){var b=this.h[a];this.e.removeEventListener(b.ud,b.ra)}this.h=[]};function qq(a,b,c){V.call(this);this.e=a;this.f=b;this.h=c}x(qq,V);function gq(a,b,c){if(!a.F()){var d=a.e;d.F()||a.f!=d.e||(a={id:a.h,command:b},c&&(a.data=c),d.e.postMessage(S(a),d.h))}}qq.prototype.C=function(){this.f=this.e=null;qq.G.C.call(this)};function rq(a,b,c){C.call(this);this.e=a;this.h=c;this.j=L(window,"message",v(this.k,this));this.f=new qq(this,a,b);Bb(this,pa(Cb,this.f))}x(rq,C);rq.prototype.k=function(a){var b;if(b=!this.F())if(b=a.origin==this.h){b=a.source;var c=!1;do{if(b==this.e){c=!0;break}if(b==b.parent)break;b=b.parent}while(b);b=c}if(b&&(a=a.data,u(a))){try{a=Gh(a)}catch(d){return}a.command&&(b=this.f,b.F()||b.A("command",a.command,a.data))}};rq.prototype.C=function(){hd(this.j);this.e=null;rq.G.C.call(this)};var sq={};function tq(a){return a?24==a.length&&"UC"==a.slice(0,2)?a.substr(2):22==a.length?a:null:null};var uq=[],vq=[];
function wq(a,b){if("view"!=a&&"cvisit"!=a){if(!b){var c=E("CONVERSION_CONFIG_DICT");if(!c)return;b=c.uid||null;if(!b)return}if("subscribe"==a||"unsubscribe"==a){if(u(b)){var d=tq(b);d&&(d={label:"followon_"+a,foc_id:d,r:Math.round(1E4*Math.random())},(d=Dd("//googleads.g.doubleclick.net/pagead/viewthroughconversion/962985656/",d))&&d&&ch(d))}}else a:{c=E("CONVERSION_CONFIG_DICT");if(u(b)){var e=tq(b);if(!c||c.uid!=e)if(c=sq[e],!c||c.uid!=e)break a}if(a&&c&&c.baseUrl&&c.uid){var f=c.rmktEnabled,e=
c.focEnabled&&(!c.isAd||"view"!=a);if(f||e){var h={};if(f){f={utuid:c.uid,type:a,client_name:"html5"};"cvisit"==a&&(f.type="cview");c.vid&&(f.utvid=c.vid);c.eventLabel&&(f.el=c.eventLabel);c.playerStyle&&(f.ps=c.playerStyle);c.feature&&(f.feature=c.feature);c.ppe&&(f.ppe=c.ppe);c.subscribed&&(f.subscribed=c.subscribed);c.engaged&&(f.engaged=c.engaged);var k=[];for(d in f)k.push(encodeURIComponent(d)+"="+encodeURIComponent(f[d]));d=k.join(";");h.data=d}e&&(h.label="followon_"+a,h.foc_id=c.uid,h.r=
Math.round(1E4*Math.random()));if("unsubscribe"==a||"dislike"==a)h.r=Math.round(1E4*Math.random());d=Dd(c.baseUrl,h)}else d=null}else d=null;d&&d&&ch(d)}}}function xq(a){wq("subscribe",a.e)}function yq(a){wq("unsubscribe",a.e)};function zq(a){O.call(this,1,arguments)}x(zq,O);function Aq(a,b){O.call(this,2,arguments);this.f=a;this.e=b}x(Aq,O);function Bq(a,b,c,d){O.call(this,1,arguments);this.e=b;this.h=c||null;this.f=d||null}x(Bq,O);function Cq(a,b){O.call(this,1,arguments);this.f=a;this.e=b||null}x(Cq,O);function Dq(a){O.call(this,1,arguments)}x(Dq,O);
var Eq=new P("ypc-core-load",zq),Fq=new P("ypc-guide-sync-success",Aq),Gq=new P("ypc-purchase-success",Bq),Hq=new P("ypc-subscription-cancel",Dq),Iq=new P("ypc-subscription-cancel-success",Cq),Jq=new P("ypc-init-subscription",Dq);var Kq=!1,Lq=[],Mq=[];function Nq(a){a.e?Kq?Q(aj,a):Q(Eq,new zq(function(){Q(Jq,new Dq(a.e))})):Oq(a.f,a.j,a.h,a.source)}function Pq(a){a.e?Kq?Q(fj,a):Q(Eq,new zq(function(){Q(Hq,new Dq(a.e))})):Qq(a.f,a.Qa,a.j,a.h,a.source)}function Rq(a){Sq(Pa(a.e))}function Tq(a){Uq(Pa(a.e))}function Vq(a){Wq(a.e,a.isEnabled,null,null)}function Xq(a){Wq(a.e,null,null,a.isEnabled)}function Yq(a){Zq(a.f,a.isEnabled,null,a.e)}function $q(a){Zq(a.f,null,a.isEnabled,a.e)}function ar(a,b,c,d,e){Wq(a,b,c,d,e)}
function br(a){var b=a.f,c=a.e.subscriptionId;b&&c&&Q($i,new Pi(b,c,a.e.channelInfo))}function cr(a){var b=a.e;Wa(a.f,function(a,d){Q($i,new Pi(d,a,b[d]))})}function dr(a){Q(ej,new Li(a.f.itemId));a.e&&a.e.length&&(er(a.e,ej),er(a.e,gj))}
function Oq(a,b,c,d){var e=new Li(a);Q(Yi,e);var f={};f.c=a;c&&(f.eurl=c);d&&(f.source=d);c={};(d=E("PLAYBACK_ID"))&&(c.plid=d);(d=E("EVENT_ID"))&&(c.ei=d);b&&fr("/subscription_ajax?action_create_subscription_to_channel=1",f,b);oj("/subscription_ajax?action_create_subscription_to_channel=1",{method:"POST",cc:f,N:c,X:function(b,c){var d=c.response;Q($i,new Pi(a,d.id,d.channel_info));d.show_feed_privacy_dialog&&I("SHOW-FEED-PRIVACY-SUBSCRIBE-DIALOG",a)},Wb:function(){Q(Zi,e)}})}
function Qq(a,b,c,d,e){var f=new Li(a);Q(cj,f);var h={};d&&(h.eurl=d);e&&(h.source=e);d={};d.c=a;d.s=b;(a=E("PLAYBACK_ID"))&&(d.plid=a);(a=E("EVENT_ID"))&&(d.ei=a);c&&fr("/subscription_ajax?action_remove_subscriptions=1",{},c);oj("/subscription_ajax?action_remove_subscriptions=1",{method:"POST",cc:h,N:d,X:function(){Q(ej,f)},Wb:function(){Q(dj,f)}})}
function Wq(a,b,c,d,e){if(null!==b||null!==c||null!==d){var f={};a&&(f.channel_id=a);null===b||(f.email_on_upload=b);null===c||(f.receive_no_updates=c);null===d||(f.uploads_only=d);oj("/subscription_ajax?action_update_subscription_preferences=1",{method:"POST",N:f,onError:function(){e&&e()}})}}
function Sq(a){if(a.length){var b=Ra(a,0,40);Q("subscription-batch-subscribe-loading");er(b,Yi);var c={};c.a=b.join(",");var d=function(){Q("subscription-batch-subscribe-loaded");er(b,Zi)};oj("/subscription_ajax?action_create_subscription_to_all=1",{method:"POST",N:c,X:function(c,f){d();var h=f.response,k=h.id;if(ea(k)&&k.length==b.length){var l=h.channel_info_map;z(k,function(a,c){var d=b[c];Q($i,new Pi(d,a,l[d]))});a.length?Sq(a):Q("subscription-batch-subscribe-finished")}},onError:function(){d();
Q("subscription-batch-subscribe-failure")}})}}function Uq(a){if(a.length){var b=Ra(a,0,40);Q("subscription-batch-unsubscribe-loading");er(b,cj);var c={};c.c=b.join(",");var d=function(){Q("subscription-batch-unsubscribe-loaded");er(b,dj)};oj("/subscription_ajax?action_remove_subscriptions=1",{method:"POST",N:c,X:function(){d();er(b,ej);a.length&&Uq(a)},onError:function(){d()}})}}
function Zq(a,b,c,d){if(a.length&&(null!==b||null!==c)){var e=Ra(a,0,40);I("subscription-batch-prefs-loading",e);var f={};f.s=e.join(",");null!==b&&(f.email_on_upload=b,f.receive_no_updates=!b);null===c||(f.uploads_only=c);var h=function(){I("subscription-batch-prefs-loaded",e)};oj("/subscription_ajax?action_update_subscription_preferences_batch=1",{method:"POST",N:f,X:function(){h();I("subscription-batch-prefs-success",e);a.length&&Zq(a,b,c,d)},onError:function(){h();d&&d();I("subscription-batch-prefs-failure",
e)}})}}function er(a,b){z(a,function(a){Q(b,new Li(a))})}function fr(a,b,c){a=Gd(a,b);c=Ed(c);Id(a,c)};var gr=null,hr=null,ir=null,jr=!1;var kr={},lr=0;p("yt.setConfig",Gb,void 0);p("yt.setMsg",function(a){Hb(Fb,arguments)},void 0);
p("yt.www.errors.log",function(a,b){if(a&&window&&window.yterr&&!(5<=lr)){var c=a.stacktrace,d=a.columnNumber;var e=a,f=q("window.location.href");if(u(e))a={message:e,name:"Unknown error",lineNumber:"Not available",fileName:f,stack:"Not available"};else{var h,k,l=!1;try{h=e.lineNumber||e.line||"Not available"}catch(r){h="Not available",l=!0}try{k=e.fileName||e.filename||e.sourceURL||m.$googDebugFname||f}catch(N){k="Not available",l=!0}a=!l&&e.lineNumber&&e.fileName&&e.stack&&e.message&&e.name?e:{message:e.message||
"Not available",name:e.name||"UnknownError",lineNumber:h,fileName:k,stack:e.stack||"Not available"}}c=c||a.stack;e=a.lineNumber.toString();isNaN(e)||isNaN(d)||(e=e+":"+d);kr[a.message]||(d={cc:{a:"logerror",t:"jserror",type:a.name,msg:a.message.substr(0,1E3),line:e,level:b||"ERROR"},N:{url:E("PAGE_NAME",window.location.href),file:a.fileName},method:"POST"},c&&(d.N.stack=c),oj("/gen_204",d),kr[a.message]=!0,lr++)}},void 0);
p("yt.embed.openLoginDialog",function(){ij(function(a){if(gr.onLoginDialogSuccess)gr.onLoginDialogSuccess(a)})},void 0);
p("writeEmbed",function(){var a=new Af(E("PLAYER_CONFIG")),b=document.referrer,c=E("POST_MESSAGE_ORIGIN"),d=!1;u(b)&&u(c)&&-1<b.indexOf(c)&&Zg(c)&&Zg(b)&&(d=!0);window!=window.top&&b&&b!=document.URL&&(a.args.loaderUrl=b);E("LIGHTWEIGHT_AUTOPLAY")&&(a.args.autoplay="1");a.args.autoplay&&Uj(a.args);gr=ti("player",a);b=E("POST_MESSAGE_ID","player");E("ENABLE_JS_API")?ir=new pq(gr):E("ENABLE_POST_API")&&u(b)&&u(c)&&(hr=new rq(window.parent,b,c),ir=new kq(gr,hr.f));(jr=d&&!E("ENABLE_CAST_API"))?a.args.disableCast=
"1":(a=gr,hp(),Rp=a,Rp.addEventListener("onReady",Tp),Rp.addEventListener("onRemoteReceiverSelected",Vp),Sp.push(H("yt-remote-receiver-availability-change",Up)),Sp.push(H("yt-remote-auto-connect",Wp)));E("BG_P")&&(E("BG_I")||E("BG_IU"))&&ec();Xp=gr;Xp.addEventListener("SUBSCRIBE",$p);Xp.addEventListener("UNSUBSCRIBE",cq);Yp.push(lh($i,dq),lh(ej,eq))},void 0);p("yt.www.watch.ads.restrictioncookie.spr",function(a){(a=a+"mac_204?action_fcts=1")&&ch(a);return!0},void 0);
L(window,"load",function(){rh("ol");E("CSI_LOG_ON_TICK")||th();Kq=!0;Mq.push(lh(Xi,Nq),lh(bj,Pq));Kq||(Mq.push(lh(aj,Nq),lh(fj,Pq),lh(Ti,Rq),lh(Ui,Tq),lh(Vi,Vq),lh(Wi,Xq),lh(Ri,Yq),lh(Si,$q)),Lq.push(H("subscription-prefs",ar)),Mq.push(lh(Gq,br),lh(Iq,dr),lh(Fq,cr)),uq.push(H("player-subscribe",pa(wq,"subscribe")),H("player-unsubscribe",pa(wq,"unsubscribe"))),vq.push(lh($i,xq),lh(ej,yq)))});
L(window,"unload",function(){var a=gr;a&&a.sendAbandonmentPing&&a.sendAbandonmentPing();E("PL_ATT")&&(dc=null);Tb(Lq);Lq.length=0;mh(Mq);Mq.length=0;Kq=!1;Tb(uq);uq.length=0;mh(vq);vq.length=0;Xp&&(Xp.removeEventListener("SUBSCRIBE",aq),Xp.removeEventListener("UNSUBSCRIBE",cq));Xp=null;mh(Yp);Yp.length=0;jr||(Tb(Sp),Sp.length=0,Rp&&(Rp.removeEventListener("onRemoteReceiverSelected",Vp),Rp.removeEventListener("onReady",Tp),Rp=null),xp());Db(ir,hr);gr&&gr.destroy()});var mr=Kj.getInstance(),nr=yj(mr);
nr in Pj||(mr.register(),mr.Lc.push(H("yt-uix-init-"+nr,mr.init,mr)),mr.Lc.push(H("yt-uix-dispose-"+nr,mr.dispose,mr)),Pj[nr]=mr);})();
