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