(function(){var g,aa=aa||{},n=this;function p(a){a=a.split(".");for(var b=n,c;c=a.shift();)if(null!=b[c])b=b[c];else return null;return b}function ba(){}function ca(a){a.getInstance=function(){return a.Sc?a.Sc:a.Sc=new a}}
function da(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function r(a){return void 0!==a}function s(a){return"array"==da(a)}function ea(a){var b=da(a);return"array"==b||"object"==b&&"number"==typeof a.length}function t(a){return"string"==typeof a}function fa(a){return"number"==typeof a}function u(a){return"function"==da(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ha(a){return a[ia]||(a[ia]=++ja)}
var ia="closure_uid_"+(1E9*Math.random()>>>0),ja=0;function ka(a,b,c){return a.call.apply(a.bind,arguments)}function la(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")?ka:la;return v.apply(null,arguments)}function x(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 y=Date.now||function(){return+new Date};
function z(a,b){var c=a.split("."),d=n;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]?d=d[e]:d=d[e]={}:d[e]=b}function A(a,b){function c(){}c.prototype=b.prototype;a.A=b.prototype;a.prototype=new c;a.he=function(a,c,f){return b.prototype[c].apply(a,Array.prototype.slice.call(arguments,2))}}
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 ma(a){if(Error.captureStackTrace)Error.captureStackTrace(this,ma);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}A(ma,Error);ma.prototype.name="CustomError";var na;function oa(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}function pa(a){return decodeURIComponent(a.replace(/\+/g," "))}function qa(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'},c;c=document.createElement("div");return a.replace(ra,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 sa(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 ra=/&([^;\s<&]+);?/g;function B(a,b){return-1!=a.indexOf(b)}function ta(a){a=r(void 0)?a.toFixed(void 0):String(a);var b=a.indexOf(".");-1==b&&(b=a.length);b=Math.max(0,2-b);return Array(b+1).join("0")+a}
function ua(a,b){for(var c=0,d=oa(String(a)).split("."),e=oa(String(b)).split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var k=d[h]||"",l=e[h]||"",m=RegExp("(\\d*)(\\D*)","g"),q=RegExp("(\\d*)(\\D*)","g");do{var w=m.exec(k)||["","",""],M=q.exec(l)||["","",""];if(0==w[0].length&&0==M[0].length)break;c=va(0==w[1].length?0:parseInt(w[1],10),0==M[1].length?0:parseInt(M[1],10))||va(0==w[2].length,0==M[2].length)||va(w[2],M[2])}while(0==c)}return c}function va(a,b){return a<b?-1:a>b?1:0}
function wa(a){for(var b=0,c=0;c<a.length;++c)b=31*b+a.charCodeAt(c),b%=4294967296;return b}function xa(){return"transform".replace(/\-([a-z])/g,function(a,b){return b.toUpperCase()})}function ya(){var a=t(void 0)?"undefined".replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08"):"\\s";return"transform".replace(RegExp("(^"+(a?"|["+a+"]+":"")+")([a-z])","g"),function(a,c,d){return c+d.toUpperCase()})};function Aa(){};var C=Array.prototype,Ba=C.indexOf?function(a,b,c){return C.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(t(a))return t(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},D=C.forEach?function(a,b,c){C.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=t(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Ca=C.filter?function(a,b,c){return C.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,h=t(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},E=C.map?function(a,b,c){return C.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=t(a)?a.split(""):a,h=0;h<d;h++)h in f&&(e[h]=b.call(c,f[h],h,a));return e},Da=C.some?function(a,b,c){return C.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=t(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=C.every?function(a,b,c){return C.every.call(a,b,c)}:function(a,b,c){for(var d=
a.length,e=t(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){var c=Ga(a,b,void 0);return 0>c?null:t(a)?a.charAt(c):a[c]}function Ga(a,b,c){for(var d=a.length,e=t(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 F(a,b){return 0<=Ba(a,b)}function Ha(a){return 0==a.length}function Ia(){var a=Ka;if(!s(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function La(a,b){F(a,b)||a.push(b)}
function Ma(a,b){var c=Ba(a,b),d;(d=0<=c)&&C.splice.call(a,c,1);return d}function Na(a,b){var c=Ga(a,b,void 0);0<=c&&C.splice.call(a,c,1)}function Oa(a){return C.concat.apply(C,arguments)}function Pa(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]}
function Qa(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c],e;if(s(d)||(e=ea(d))&&Object.prototype.hasOwnProperty.call(d,"callee"))a.push.apply(a,d);else if(e)for(var f=a.length,h=d.length,k=0;k<h;k++)a[f+k]=d[k];else a.push(d)}}function Ra(a,b,c,d){return C.splice.apply(a,Sa(arguments,1))}function Sa(a,b,c){return 2>=arguments.length?C.slice.call(a,b):C.slice.call(a,b,c)}function Ta(a,b){a.sort(b||Ua)}
function Va(a,b,c){if(!ea(a)||!ea(b)||a.length!=b.length)return!1;var d=a.length;c=c||Wa;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0}function Ua(a,b){return a>b?1:a<b?-1:0}function Wa(a,b){return a===b};function Xa(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function Ya(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function Za(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function $a(a){var b=ab,c;for(c in b)if(a.call(void 0,b[c],c,b))return c}function bb(a){for(var b in a)return!1;return!0}function cb(a){var b={},c;for(c in a)b[c]=a[c];return b}
function db(a){var b=da(a);if("object"==b||"array"==b){if(a.clone)return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=db(a[c]);return b}return a}var eb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function fb(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<eb.length;f++)c=eb[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};function gb(a,b,c){a.dataset?a.dataset[hb(b)]=c:a.setAttribute("data-"+b,c)}function G(a,b){return a.dataset?a.dataset[hb(b)]:a.getAttribute("data-"+b)}var ib={};function hb(a){return ib[a]||(ib[a]=String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()}))};function jb(){}jb.prototype.Fb=!1;jb.prototype.C=function(){return this.Fb};jb.prototype.dispose=function(){this.Fb||(this.Fb=!0,this.B())};function kb(a,b){a.P||(a.P=[]);a.P.push(v(b,void 0))}jb.prototype.B=function(){if(this.P)for(;this.P.length;)this.P.shift()()};function lb(a){a&&"function"==typeof a.dispose&&a.dispose()}function mb(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];ea(d)?mb.apply(null,d):lb(d)}};function H(){this.b=[];this.R={}}A(H,jb);g=H.prototype;g.qc=1;g.wb=0;g.I=function(a,b,c){var d=this.R[a];d||(d=this.R[a]=[]);var e=this.qc;this.b[e]=a;this.b[e+1]=b;this.b[e+2]=c;this.qc=e+3;d.push(e);return e};g.ma=function(a,b,c){if(a=this.R[a]){var d=this.b;if(a=Fa(a,function(a){return d[a+1]==b&&d[a+2]==c}))return this.ka(a)}return!1};
g.ka=function(a){if(0!=this.wb)return this.g||(this.g=[]),this.g.push(a),!1;var b=this.b[a];if(b){var c=this.R[b];c&&Ma(c,a);delete this.b[a];delete this.b[a+1];delete this.b[a+2]}return!!b};g.u=function(a,b){var c=this.R[a];if(c){this.wb++;for(var d=Sa(arguments,1),e=0,f=c.length;e<f;e++){var h=c[e];this.b[h+1].apply(this.b[h+2],d)}this.wb--;if(this.g&&0==this.wb)for(;c=this.g.pop();)this.ka(c);return 0!=e}return!1};
g.clear=function(a){if(a){var b=this.R[a];b&&(D(b,this.ka,this),delete this.R[a])}else this.b.length=0,this.R={}};g.va=function(a){if(a){var b=this.R[a];return b?b.length:0}a=0;for(b in this.R)a+=this.va(b);return a};g.B=function(){H.A.B.call(this);delete this.b;delete this.R;delete this.g};var nb=window.yt&&window.yt.config_||{};z("yt.config_",nb);var ob=window.yt&&window.yt.tokens_||{};z("yt.tokens_",ob);var pb=window.yt&&window.yt.msgs_||{};z("yt.msgs_",pb);function qb(a){rb(nb,arguments)}function I(a,b){return a in nb?nb[a]:b}function sb(a){rb(ob,arguments)}function tb(){return"subscription_ajax"in ob?ob.subscription_ajax:void 0}
function J(a,b){if(u(a)&&p("ytsched.enableSetTimeout")){var c=p("yt.scheduler.instance.addJob");if(c)return c(a,0,b);z("ytsched.enableSetTimeout",!1)}u(a)&&(a=ub(a));return window.setTimeout(a,b)}function vb(a){u(a)&&(a=ub(a));window.setInterval(a,1E4)}function wb(a){p("ytsched.enableSetTimeout")?p("yt.scheduler.instance.cancelJob")(a):window.clearTimeout(a)}function ub(a){return a&&window.yterr?function(){try{return a.apply(this,arguments)}catch(b){throw xb(b),b;}}:a}
function xb(a,b){if(window&&window.yterr){var c=p("yt.www.errors.log");c?c(a,b):(c=I("ERRORS")||[],c.push(a),qb("ERRORS",c))}}function yb(a,b){var c={},d=a in pb?pb[a]:b;if(d)for(var e in c)d=d.replace(RegExp("\\$"+e,"gi"),function(){return c[e]});return d}function rb(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 zb="Microsoft Internet Explorer"==navigator.appName;var Ab=p("yt.pubsub.instance_")||new H;H.prototype.subscribe=H.prototype.I;H.prototype.unsubscribeByKey=H.prototype.ka;H.prototype.publish=H.prototype.u;H.prototype.clear=H.prototype.clear;z("yt.pubsub.instance_",Ab);var Bb=p("yt.pubsub.subscribedKeys_")||{};z("yt.pubsub.subscribedKeys_",Bb);var Cb=p("yt.pubsub.topicToKeys_")||{};z("yt.pubsub.topicToKeys_",Cb);var Db=p("yt.pubsub.isSynchronous_")||{};z("yt.pubsub.isSynchronous_",Db);var Eb=p("yt.pubsub.skipSubId_")||null;
z("yt.pubsub.skipSubId_",Eb);function K(a,b,c){var d=Fb();if(d){var e=d.subscribe(a,function(){if(!Eb||Eb!=e){var d=arguments,h=function(){Bb[e]&&b.apply(c||window,d)};try{Db[a]?h():J(h,0)}catch(k){xb(k)}}},c);Bb[e]=!0;Cb[a]||(Cb[a]=[]);Cb[a].push(e);return e}return 0}function Gb(a){var b=Fb();b&&("number"==typeof a?a=[a]:"string"==typeof a&&(a=[parseInt(a,10)]),D(a,function(a){b.unsubscribeByKey(a);delete Bb[a]}))}function L(a,b){var c=Fb();return c?c.publish.apply(c,arguments):!1}
function Hb(a){Cb[a]&&(a=Cb[a],D(a,function(a){Bb[a]&&delete Bb[a]}),a.length=0)}function Ib(a){var b=Fb();if(b)if(b.clear(a),a)Hb(a);else for(var c in Cb)Hb(c)}function Fb(){return p("yt.pubsub.instance_")};function Jb(a,b){if(window.spf){var c;if(a)if(-1<a.indexOf("_mod"))c=(c=a.match(Kb))?c[1]:"";else{c="";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(Lb,""),c=c.replace(Mb,""),c=c.replace("debug-",""));-1<c.indexOf("/")&&(c=c.split("/").join("_")+"_mod")}else c="";spf.beta?spf.script.load(a,c,b):spf.scripts.load(a,b,c)}else Nb(a,b)}
function Nb(a,b){var c=Ob(a),d=document.getElementById(c),e=d&&G(d,"loaded"),f=d&&!e;if(e)b&&b();else{if(b){var e=K(c,b),h=""+ha(b);Pb[h]=e}f||(d=Qb(a,c,function(){G(d,"loaded")||(gb(d,"loaded","true"),L(c),J(x(Ib,c),0))}))}}
function Qb(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 Ob(a){var b=document.createElement("a");b.href=a;a=b.href.replace(/^[a-zA-Z]+:\/\//,"//");return"js-"+wa(a)}
var Lb=/-vfl[a-zA-Z0-9_+=-]+/,Mb=/-[a-zA-Z]{2,3}_[a-zA-Z]{2,3}(?=(\/|$))/,Kb=/jsbin\/(?:[a-zA-Z0-9_-]+\/)*(?:debug-)?([a-zA-Z0-9_-]+?)(?:-vfl|.js)/,Pb={};var Rb=null;function Sb(){var a=I("BG_I",null),b=I("BG_IU",null),c=I("BG_P");b?Jb(b,function(){Rb=new botguard.bg(c)}):a&&(eval(a),Rb=new botguard.bg(c))};function Tb(a){if(a.classList)return a.classList;a=a.className;return t(a)&&a.match(/\S+/g)||[]}function Ub(a,b){return a.classList?a.classList.contains(b):F(Tb(a),b)}function Vb(a,b){a.classList?a.classList.add(b):Ub(a,b)||(a.className+=0<a.className.length?" "+b:b)}function Wb(a,b){a.classList?a.classList.remove(b):Ub(a,b)&&(a.className=Ca(Tb(a),function(a){return a!=b}).join(" "))}function Xb(a,b,c){c?Vb(a,b):Wb(a,b)};function N(a,b){this.x=r(a)?a:0;this.y=r(b)?b:0}N.prototype.clone=function(){return new N(this.x,this.y)};N.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};N.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function Yb(a,b){this.width=a;this.height=b}Yb.prototype.clone=function(){return new Yb(this.width,this.height)};Yb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};Yb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};var O;t:{var Zb=n.navigator;if(Zb){var $b=Zb.userAgent;if($b){O=$b;break t}}O=""};var ac,bc;function cc(){return n.navigator||null}var dc=B(O,"Opera")||B(O,"OPR"),P=B(O,"Trident")||B(O,"MSIE"),ec=B(O,"Gecko")&&!B(O.toLowerCase(),"webkit")&&!(B(O,"Trident")||B(O,"MSIE")),fc=B(O.toLowerCase(),"webkit"),gc=cc(),hc=gc&&gc.platform||"";ac=B(hc,"Mac");bc=B(hc,"Win");var ic=!!cc()&&B(cc().appVersion||"","X11");function jc(){var a=n.document;return a?a.documentMode:void 0}
var kc=function(){var a="",b;if(dc&&n.opera)return a=n.opera.version,u(a)?a():a;ec?b=/rv\:([^\);]+)(\)|;)/:P?b=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:fc&&(b=/WebKit\/(\S+)/);b&&(a=(a=b.exec(O))?a[1]:"");return P&&(b=jc(),b>parseFloat(a))?String(b):a}(),lc={};function Q(a){return lc[a]||(lc[a]=0<=ua(kc,a))}function mc(a){return P&&nc>=a}var oc=n.document,nc=oc&&P?jc()||("CSS1Compat"==oc.compatMode?parseInt(kc,10):5):void 0;!ec&&!P||P&&mc(9)||ec&&Q("1.9.1");P&&Q("9");function pc(a){return a?new qc(rc(a)):na||(na=new qc)}function sc(a){return R(a)}function R(a){var b=document;return t(a)?b.getElementById(a):a}function tc(a){var b=document;return b.querySelectorAll&&b.querySelector?b.querySelectorAll("."+a):uc(a,void 0)}
function uc(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&&F(k.split(/\s+/),a)&&(f[e++]=c)}f.length=e;return f}return h}
function vc(a){Xa({type:"text/javascript",charset:"UTF-8",src:"https://ssl.gstatic.com/cv/js/sender/v1/cast_sender.js"},function(b,c){"style"==c?a.style.cssText=b:"class"==c?a.className=b:"for"==c?a.htmlFor=b:c in wc?a.setAttribute(wc[c],b):0==c.lastIndexOf("aria-",0)||0==c.lastIndexOf("data-",0)?a.setAttribute(c,b):a[c]=b})}
var wc={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function xc(a){a&&a.parentNode&&a.parentNode.removeChild(a)}function yc(a){if(!a)return null;if(a.firstChild)return a.firstChild;for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}
function zc(a){if(!a)return null;if(!a.previousSibling)return a.parentNode;for(a=a.previousSibling;a&&a.lastChild;)a=a.lastChild;return a}function rc(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function Ac(a){var b=Bc.Zd;return b?Cc(a,function(a){var d;(d=!b)||(a=a.className,a=t(a)&&a.match(/\S+/g)||[],d=F(a,b));return d},!0):null}function Cc(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 qc(a){this.b=a||n.document||document}qc.prototype.createElement=function(a){return this.b.createElement(a)};function Dc(a){return"CSS1Compat"==a.b.compatMode}function Ec(a){var b=a.b;a=fc||"CSS1Compat"!=b.compatMode?b.body||b.documentElement:b.documentElement;b=b.parentWindow||b.defaultView;return P&&Q("10")&&b.pageYOffset!=a.scrollTop?new N(a.scrollLeft,a.scrollTop):new N(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}qc.prototype.appendChild=function(a,b){a.appendChild(b)};
qc.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 Fc=p("yt.dom.getNextId_");if(!Fc){Fc=function(){return++Gc};z("yt.dom.getNextId_",Fc);var Gc=0}function Hc(a,b){if(a in b)return b[a];var c=a.charAt(0).toUpperCase()+a.substr(1);if("moz"+c in b)return b["moz"+c];if("ms"+c in b)return b["ms"+c];if("o"+c in b)return b["o"+c];if("webkit"+c in b)return b["webkit"+c]}function Ic(){var a=document,b;Da(["fullscreenElement","fullScreenElement"],function(c){b=Hc(c,a);return!!b});return b};function Jc(a){if(a=a||window.event){for(var b in a)b in Kc||(this[b]=a[b]);this.Ib=a;(b=a.target||a.srcElement)&&3==b.nodeType&&(b=b.parentNode);this.target=b;if(b=a.relatedTarget)try{b=b.nodeName&&b}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=Jc.prototype;g.Ib=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.Ib.returnValue=!1;this.Ib.preventDefault&&this.Ib.preventDefault()};var Kc={stopImmediatePropagation:1,stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,scale:1,rotation:1};var ab=p("yt.events.listeners_")||{};z("yt.events.listeners_",ab);var Lc=p("yt.events.counter_")||{count:0};z("yt.events.counter_",Lc);function Mc(a,b,c,d){return $a(function(e){return e[0]==a&&e[1]==b&&e[2]==c&&e[4]==!!d})}
function S(a,b,c,d){if(!a||!a.addEventListener&&!a.attachEvent)return"";d=!!d;var e=Mc(a,b,c,d);if(e)return e;var e=++Lc.count+"",f=!("mouseenter"!=b&&"mouseleave"!=b||!a.addEventListener||"onmouseenter"in document),h;h=f?function(d){d=new Jc(d);if(!Cc(d.relatedTarget,function(b){return b==a},!0))return d.currentTarget=a,d.type=b,c.call(a,d)}:function(b){b=new Jc(b);b.currentTarget=a;return c.call(a,b)};h=ub(h);ab[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 Nc(a){a&&("string"==typeof a&&(a=[a]),D(a,function(a){if(a in ab){var c=ab[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 ab[a]}}))};function Oc(a,b,c,d,e){var f="";a&&(f+=a+":");b&&(f=f+"//"+b);c&&(f+=c);d&&(f+="?"+d);e&&(f+="#"+e);return f}var Pc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function Qc(a){if(Rc){Rc=!1;var b=n.location;if(b){var c=b.href;if(c&&(c=Sc(c))&&c!=b.hostname)throw Rc=!0,Error();}}return a.match(Pc)}var Rc=fc;function Sc(a){return(a=Qc(a)[3]||null)&&decodeURIComponent(a)}
function Tc(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 Uc(a,b,c){if(s(b))for(var d=0;d<b.length;d++)Uc(a,String(b[d]),c);else null!=b&&c.push("&",a,""===b?"":"=",encodeURIComponent(String(b)))}function Vc(a,b,c){Math.max(b.length-(c||0),0);for(c=c||0;c<b.length;c+=2)Uc(b[c],b[c+1],a);return a}function Wc(a,b){for(var c in b)Uc(c,b[c],a);return a}
function Xc(a,b){return Tc(2==arguments.length?Vc([a],arguments[1],0):Vc([a],arguments,1))};function Yc(a){this.b=a}var Zc=/\s*;\s*/;g=Yc.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+'"');r(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(y()+1E3*c)).toUTCString();this.b.cookie=a+"="+b+e+d+c+f};
g.get=function(a,b){for(var c=a+"=",d=(this.b.cookie||"").split(Zc),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=r(this.get(a));this.set(a,"",0,b,c);return d};g.ga=function(){return $c(this).keys};g.fa=function(){return $c(this).yd};g.va=function(){return this.b.cookie?(this.b.cookie||"").split(Zc).length:0};g.clear=function(){for(var a=$c(this).keys,b=a.length-1;0<=b;b--)this.remove(a[b])};
function $c(a){a=(a.b.cookie||"").split(Zc);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,yd:c}}var ad=new Yc(document);ad.g=3950;function bd(a,b,c){ad.set(""+a,b,c,"/","youtube.com")};function cd(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=pa(e[0]||""),e=pa(e[1]||"");f in b?s(b[f])?Qa(b[f],e):b[f]=[b[f],e]:b[f]=e}}return b}function dd(a){a=Wc([],a);a[0]="";return a.join("")}function ed(a,b){return Tc(Wc([a],b))}var fd=Sc;
function gd(a,b){var c=a.split("#",2);a=c[0];var c=1<c.length?"#"+c[1]:"",d=a.split("?",2);a=d[0];var d=cd(d[1]||""),e;for(e in b)d[e]=b[e];return ed(a,d)+c}function hd(a){a=fd(a);a=null===a?null:a.split(".").reverse();return(null===a?!1:"com"==a[0]&&a[1].match(/^youtube(?:-nocookie)?$/)?!0:!1)||(null===a?!1:"google"==a[1]?!0:"google"==a[2]?"au"==a[0]&&"com"==a[1]?!0:"uk"==a[0]&&"co"==a[1]?!0:!1:!1)};function id(a,b){var c=Sc(a);if(c==Sc(window.location.href)||!c&&0==a.lastIndexOf("/",0)){var c=Qc(a),c=Oc(null,null,c[5],c[6],c[7]),d=c.indexOf("#");if(c=0>d?c:c.substr(0,d))c="s_tempdata-"+wa(c),d=b?dd(b):"",bd(c,d,5)}};function jd(a,b,c){var d=I("EVENT_ID");d&&(b||(b={}),b.ei||(b.ei=d));b&&id(a,b);if(c)return!1;(window.ytspf||{}).enabled?spf.navigate(a):window.location=ed(a,{})+"";return!0};function kd(a,b,c){a.timeOfStartCall=(new Date).getTime();if(b&&JSON&&JSON.stringify){var d=JSON.stringify(b);200>=d.length&&(a.psdJson=d)}d=c||n;d.GOOGLE_FEEDBACK_START_ARGUMENTS=arguments;var e=a.serverUri||"//www.google.com/tools/feedback",f=d.GOOGLE_FEEDBACK_START;if(f)f.apply(d,arguments);else{var e=e+"/load.js?",h;for(h in a)f=a[h],null!=f&&!ga(f)&&(e+=encodeURIComponent(h)+"="+encodeURIComponent(f)+"&");h=d.document;d=h.createElement("script");d.src=e;h.body.appendChild(d)}};var ld=!1;function md(a){if(a=a.match(/[\d]+/g))a.length=3,a.join(".")}
if(navigator.plugins&&navigator.plugins.length){var nd=navigator.plugins["Shockwave Flash"];nd&&(ld=!0,nd.description&&md(nd.description));navigator.plugins["Shockwave Flash 2.0"]&&(ld=!0)}else if(navigator.mimeTypes&&navigator.mimeTypes.length){var od=navigator.mimeTypes["application/x-shockwave-flash"];(ld=od&&od.enabledPlugin)&&md(od.enabledPlugin.description)}else try{var pd=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),ld=!0;md(pd.GetVariable("$version"))}catch(qd){try{pd=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),
ld=!0}catch(rd){try{pd=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),ld=!0,md(pd.GetVariable("$version"))}catch(sd){}}};var td,ud,vd,wd,xd,yd,zd;zd=yd=xd=wd=vd=ud=td=!1;var Ad=O;Ad&&(-1!=Ad.indexOf("Firefox")?td=!0:-1!=Ad.indexOf("Camino")?ud=!0:-1!=Ad.indexOf("iPhone")||-1!=Ad.indexOf("iPod")?vd=!0:-1!=Ad.indexOf("iPad")?wd=!0:-1!=Ad.indexOf("Chrome")?yd=!0:-1!=Ad.indexOf("Android")?xd=!0:-1!=Ad.indexOf("Safari")&&(zd=!0));var Bd=td,Cd=ud,Dd=vd,Ed=wd,Fd=xd,Gd=yd,Hd=zd;function Id(a){return(a=a.exec(O))?a[1]:""}(function(){if(Bd)return Id(/Firefox\/([0-9.]+)/);if(P||dc)return kc;if(Gd)return Id(/Chrome\/([0-9.]+)/);if(Hd)return Id(/Version\/([0-9.]+)/);if(Dd||Ed){var a;if(a=/Version\/(\S+).*Mobile\/(\S+)/.exec(O))return a[1]+"."+a[2]}else{if(Fd)return(a=Id(/Android\s+([0-9.]+)/))?a:Id(/Version\/([0-9.]+)/);if(Cd)return Id(/Camino\/([0-9.]+)/)}return""})();function Jd(){this.i=this.g=this.b=0;this.j="";var a=p("window.navigator.plugins"),b=p("window.navigator.mimeTypes"),a=a&&a["Shockwave Flash"],b=b&&b["application/x-shockwave-flash"],b=a&&b&&b.enabledPlugin&&a.description||"";if(a=b){var c=a.indexOf("Shockwave Flash");0<=c&&(a=a.substr(c+15));for(var c=a.split(" "),d="",a="",e=0,f=c.length;e<f;e++)if(d)if(a)break;else a=c[e];else d=c[e];d=d.split(".");c=parseInt(d[0],10)||0;d=parseInt(d[1],10)||0;e=0;if("r"==a.charAt(0)||"d"==a.charAt(0))e=parseInt(a.substr(1),
10)||0;a=[c,d,e]}else a=[0,0,0];this.j=b;b=a;this.b=b[0];this.g=b[1];this.i=b[2];if(0>=this.b){var h,k,l,m;if(zb)try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(q){h=null}else l=document.body,m=document.createElement("object"),m.setAttribute("type","application/x-shockwave-flash"),h=l.appendChild(m);if(h&&"GetVariable"in h)try{k=h.GetVariable("$version")}catch(w){k=""}l&&m&&l.removeChild(m);(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.b=h[0];this.g=h[1];this.i=h[2]}}ca(Jd);Jd.prototype.getVersion=function(){return[this.b,this.g,this.i]};function Kd(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.b>b[0]||a.b==b[0]&&a.g>b[1]||a.b==b[0]&&a.g==b[1]&&a.i>=b[2]}function Ld(a){return-1<a.j.indexOf("Gnash")&&-1==a.j.indexOf("AVM2")||9==a.b&&1==a.g||9==a.b&&0==a.g&&1==a.i?!1:9<=a.b}
function Md(a){return bc?!Kd(a,11,2):ac?!Kd(a,11,3):!Ld(a)};function Nd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}Nd.prototype.clone=function(){return new Nd(this.top,this.right,this.bottom,this.left)};Nd.prototype.contains=function(a){return this&&a?a instanceof Nd?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};
Nd.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};Nd.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 Od(a,b){var c=rc(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function Pd(a,b){return Od(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}
function Qd(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}P&&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 Rd(a){if(P&&!mc(8))return a.offsetParent;var b=rc(a),c=Pd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=Pd(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 Sd(a){var b,c=rc(a),d=Pd(a,"position"),e=ec&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new N(0,0),h;b=c?rc(c):document;h=!P||mc(9)||Dc(pc(b))?b.documentElement:b.body;if(a==h)return f;if(a.getBoundingClientRect)b=Qd(a),a=Ec(pc(c)),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(fc&&"fixed"==Pd(b,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(dc||fc&&"absolute"==d)f.y-=c.body.offsetTop;for(b=a;(b=Rd(b))&&b!=c.body&&b!=h;)f.x-=b.scrollLeft,dc&&"TR"==b.tagName||(f.y-=b.scrollTop)}return f}function Td(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}
function Ud(a){var b=Vd;if("none"!=Pd(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 Vd(a){var b=a.offsetWidth,c=a.offsetHeight,d=fc&&!b&&!c;return r(b)&&!d||!a.getBoundingClientRect?new Yb(b,c):(a=Qd(a),new Yb(a.right-a.left,a.bottom-a.top))}
function Wd(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 Xd(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?Wd(a,c):0}var Yd={thin:2,medium:4,thick:6};
function Zd(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 Yd?Yd[c]:Wd(a,c)}var $d=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function ae(a,b){(a=R(a))&&a.style&&(a.style.display=b?"":"none",Xb(a,"hid",!b))}function be(a){D(arguments,function(a){ae(a,!0)})}function ce(a){D(arguments,function(a){ae(a,!1)})};var de="StopIteration"in n?n.StopIteration:Error("StopIteration");function ee(){}ee.prototype.next=function(){throw de;};ee.prototype.da=function(){return this};function fe(a){if(a instanceof ee)return a;if("function"==typeof a.da)return a.da(!1);if(ea(a)){var b=0,c=new ee;c.next=function(){for(;;){if(b>=a.length)throw de;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");}
function ge(a,b,c){if(ea(a))try{D(a,b,c)}catch(d){if(d!==de)throw d;}else{a=fe(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(e){if(e!==de)throw e;}}}function he(a){if(ea(a))return Pa(a);a=fe(a);var b=[];ge(a,function(a){b.push(a)});return b};function ie(a,b){this.g={};this.b=[];this.j=this.i=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 ie?(c=a.ga(),d=a.fa()):(c=Za(a),d=Ya(a));for(var e=0;e<c.length;e++)this.set(c[e],d[e])}}g=ie.prototype;g.va=function(){return this.i};g.fa=function(){je(this);for(var a=[],b=0;b<this.b.length;b++)a.push(this.g[this.b[b]]);return a};g.ga=function(){je(this);return this.b.concat()};
g.equals=function(a,b){if(this===a)return!0;if(this.i!=a.va())return!1;var c=b||ke;je(this);for(var d,e=0;d=this.b[e];e++)if(!c(this.get(d),a.get(d)))return!1;return!0};function ke(a,b){return a===b}g.clear=function(){this.g={};this.j=this.i=this.b.length=0};g.remove=function(a){return le(this.g,a)?(delete this.g[a],this.i--,this.j++,this.b.length>2*this.i&&je(this),!0):!1};
function je(a){if(a.i!=a.b.length){for(var b=0,c=0;b<a.b.length;){var d=a.b[b];le(a.g,d)&&(a.b[c++]=d);b++}a.b.length=c}if(a.i!=a.b.length){for(var e={},c=b=0;b<a.b.length;)d=a.b[b],le(e,d)||(a.b[c++]=d,e[d]=1),b++;a.b.length=c}}g.get=function(a,b){return le(this.g,a)?this.g[a]:b};g.set=function(a,b){le(this.g,a)||(this.i++,this.b.push(a),this.j++);this.g[a]=b};g.forEach=function(a,b){for(var c=this.ga(),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 ie(this)};
g.da=function(a){je(this);var b=0,c=this.b,d=this.g,e=this.j,f=this,h=new ee;h.next=function(){for(;;){if(e!=f.j)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw de;var h=c[b++];return a?h:d[h]}};return h};function le(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function me(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 ne(a){return eval("("+a+")")}function oe(a){return pe(new qe(void 0),a)}function qe(a){this.b=a}
function pe(a,b){var c=[];re(a,b,c);return c.join("")}
function re(a,b,c){switch(typeof b){case "string":se(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(s(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],re(a,a.b?a.b.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),se(f,c),c.push(":"),
re(a,a.b?a.b.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var te={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},ue=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
function se(a,b){b.push('"',a.replace(ue,function(a){if(a in te)return te[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return te[a]=e+b.toString(16)}),'"')};var ve=null;"undefined"!=typeof XMLHttpRequest?ve=function(){return new XMLHttpRequest}:"undefined"!=typeof ActiveXObject&&(ve=function(){return new ActiveXObject("Microsoft.XMLHTTP")});function we(a,b,c,d,e,f,h){function k(){4==(l&&"readyState"in l?l.readyState:0)&&b&&ub(b)(l)}var l=ve&&ve();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=xe(a,e))for(var m in e)l.setRequestHeader(m,e[m]),"content-type"==m.toLowerCase()&&(f=!1);f&&l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.send(d);return l}
function xe(a,b){b=b||{};var c;if(c=I("PAGE_CL"))if(c=I("PAGE_BUILD_TIMESTAMP")){var d;d||(d=window.location.href);c=Qc(a)[1]||null;var e=fd(a);c&&e?(c=d,d=Qc(a),c=Qc(c),d=d[3]==c[3]&&d[1]==c[1]&&d[4]==c[4]):d=e?fd(d)==e&&(Number(Qc(d)[4]||null)||null)==(Number(Qc(a)[4]||null)||null):!0;c=d||ye(a)}c&&(b["X-YouTube-Page-CL"]=I("PAGE_CL"),b["X-YouTube-Page-Timestamp"]=I("PAGE_BUILD_TIMESTAMP"));return b}
function ye(a){var b=["X-YouTube-Page-CL","X-YouTube-Page-Timestamp"],c=I("CORS_HEADER_WHITELIST")||{};a=fd(a);if(!a)return!0;var d=c[a];return d?Ea(b,function(a){return F(d,a)}):!1}
function ze(a,b){var c=b.format||"JSON";b.fe&&(a=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+a);var d=b.Cc;d&&(a=gd(a,d));var e=b.ge||"";(d=b.na)&&t(e)&&(e=cd(e),fb(e,d),e=dd(e));var f=!1,h,k=we(a,function(a){if(!f){f=!0;h&&wb(h);var d;t:switch(a&&"status"in a?a.status:-1){case 0: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=Ae(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||{},k=b.Na||n;d?b.onSuccess&&b.onSuccess.call(k,a,e):b.onError&&b.onError.call(k,a,e);b.Eb&&b.Eb.call(k,a,e)}},b.method,e,b.headers,b.responseType,b.withCredentials);b.Kd&&0<b.timeout&&(h=J(function(){f||(f=!0,k.abort(),wb(h),b.Kd.call(b.Na||n,k))},b.timeout))}
function Ae(a,b){var c=null;switch(a){case "JSON":var d=b.responseText,e=b.getResponseHeader("Content-Type")||"";d&&0<=e.indexOf("json")&&(c=ne(d));break;case "XML":if(d=(d=b.responseXML)?Be(d):null)c={},D(d.getElementsByTagName("*"),function(a){c[a.tagName]=Ce(a)})}return c}function Be(a){return a?(a=("responseXML"in a?a.responseXML:a).getElementsByTagName("root"))&&0<a.length?a[0]:null:null}function Ce(a){var b="";D(a.childNodes,function(a){b+=a.nodeValue});return b};function De(){var a;if(a=ad.get("PREF",void 0)){a=unescape(a).split("&");for(var b=0;b<a.length;b++){var c=a[b].split("="),d=c[0];(c=c[1])&&(Ee[d]=c.toString())}}}ca(De);var Ee=p("yt.prefs.UserPrefs.prefs_")||{};z("yt.prefs.UserPrefs.prefs_",Ee);function Fe(a){if(/^f([1-9][0-9]*)$/.test(a))throw"ExpectedRegexMatch: "+a;}function Ge(a){if(!/^\w+$/.test(a))throw"ExpectedRegexMismatch: "+a;}function He(a){return void 0!==Ee[a]?Ee[a].toString():null}
De.prototype.get=function(a,b){Ge(a);Fe(a);var c=He(a);return null!=c?c:b?b:""};De.prototype.set=function(a,b){Ge(a);Fe(a);if(null==b)throw"ExpectedNotNull";Ee[a]=b.toString()};De.prototype.remove=function(a){Ge(a);Fe(a);delete Ee[a]};De.prototype.clear=function(){Ee={}};var Ie={},Je=0,Ke=p("yt.net.ping.workerUrl_")||null;z("yt.net.ping.workerUrl_",Ke);function Le(a){var b=new Image,c=""+Je++;Ie[c]=b;b.onload=b.onerror=function(){delete Ie[c]};b.src=a;b=eval("null")};var Me={},Ne="ontouchstart"in document;function Oe(a,b,c){var d;switch(a){case "mouseover":case "mouseout":d=3;break;case "mouseenter":case "mouseleave":d=9}return Cc(c,function(a){return Ub(a,b)},!0,d)}
function T(a){var b="mouseover"==a.type&&"mouseenter"in Me||"mouseout"==a.type&&"mouseleave"in Me,c=a.type in Me||b;if("HTML"!=a.target.tagName&&c){if(b){var b="mouseover"==a.type?"mouseenter":"mouseleave",c=Me[b],d;for(d in c.R){var e=Oe(b,d,a.target);e&&!Cc(a.relatedTarget,function(a){return a==e},!0)&&c.u(d,e,b,a)}}if(b=Me[a.type])for(d in b.R)(e=Oe(a.type,d,a.target))&&b.u(d,e,a.type,a)}}S(document,"blur",T,!0);S(document,"change",T,!0);S(document,"click",T);S(document,"focus",T,!0);
S(document,"mouseover",T);S(document,"mouseout",T);S(document,"mousedown",T);S(document,"keydown",T);S(document,"keyup",T);S(document,"keypress",T);S(document,"cut",T);S(document,"paste",T);Ne&&(S(document,"touchstart",T),S(document,"touchend",T),S(document,"touchcancel",T));var Pe=window.yt&&window.yt.uix&&window.yt.uix.widgets_||{};z("yt.uix.widgets_",Pe);function Qe(){this.b={}}function Re(a,b,c){var d=U(a,void 0),e=v(c,a);b in Me||(Me[b]=new H);Me[b].I(d,e);a.b[c]=e}function Se(a,b){gb(a,"tooltip-text",b)}Qe.prototype.removeData=function(a,b){a.dataset?delete a.dataset[hb(b)]:a.removeAttribute("data-"+b)};function U(a,b){return"yt-uix"+(a.$b?"-"+a.$b:"")+(b?"-"+b:"")};function Te(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=!1;this.dc=!0}Te.prototype.dispose=function(){};Te.prototype.preventDefault=function(){this.defaultPrevented=!0;this.dc=!1};function Ue(a){Ue[" "](a);return a}Ue[" "]=ba;var Ve=!P||mc(9),We=P&&!Q("9");!fc||Q("528");ec&&Q("1.9b")||P&&Q("8")||dc&&Q("9.5")||fc&&Q("528");ec&&!Q("8")||P&&Q("9");function Xe(a,b){Te.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.clientY=this.clientX=0;this.shiftKey=this.altKey=this.ctrlKey=!1;this.b=this.state=null;a&&this.init(a,b)}A(Xe,Te);
Xe.prototype.init=function(a,b){var c=this.type=a.type;this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(ec){var e;t:{try{Ue(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;this.clientX=void 0!==a.clientX?a.clientX:a.pageX;this.clientY=void 0!==a.clientY?a.clientY:a.pageY;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;
this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.state=a.state;this.b=a;a.defaultPrevented&&this.preventDefault()};Xe.prototype.preventDefault=function(){Xe.A.preventDefault.call(this);var a=this.b;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,We)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};Xe.prototype.g=function(){return this.b};var Ye="closure_listenable_"+(1E6*Math.random()|0);function Ze(a){try{return!(!a||!a[Ye])}catch(b){return!1}}var $e=0;function af(a,b,c,d,e){this.Da=a;this.proxy=null;this.src=b;this.type=c;this.g=!!d;this.i=e;this.key=++$e;this.b=this.qb=!1}function bf(a){a.b=!0;a.Da=null;a.proxy=null;a.src=null;a.i=null};function cf(a){this.src=a;this.b={};this.g=0}cf.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.b[f];a||(a=this.b[f]=[],this.g++);var h=df(a,b,d,e);-1<h?(b=a[h],c||(b.qb=!1)):(b=new af(b,this.src,f,!!d,e),b.qb=c,a.push(b));return b};cf.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.b))return!1;var e=this.b[a];b=df(e,b,c,d);return-1<b?(bf(e[b]),C.splice.call(e,b,1),0==e.length&&(delete this.b[a],this.g--),!0):!1};
function ef(a,b){var c=b.type;if(!(c in a.b))return!1;var d=Ma(a.b[c],b);d&&(bf(b),0==a.b[c].length&&(delete a.b[c],a.g--));return d}cf.prototype.removeAll=function(a){a=a&&a.toString();var b=0,c;for(c in this.b)if(!a||c==a){for(var d=this.b[c],e=0;e<d.length;e++)++b,bf(d[e]);delete this.b[c];this.g--}return b};function ff(a,b,c,d,e){a=a.b[b.toString()];b=-1;a&&(b=df(a,c,d,e));return-1<b?a[b]:null}
function df(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.b&&f.Da==b&&f.g==!!c&&f.i==d)return e}return-1};var gf="closure_lm_"+(1E6*Math.random()|0),hf={},jf=0;function kf(a,b,c,d,e){if(s(b)){for(var f=0;f<b.length;f++)kf(a,b[f],c,d,e);return null}c=lf(c);if(Ze(a))a=a.listen(b,c,d,e);else{if(!b)throw Error("Invalid event type");var f=!!d,h=mf(a);h||(a[gf]=h=new cf(a));c=h.add(b,c,!1,d,e);c.proxy||(d=nf(),c.proxy=d,d.src=a,d.Da=c,a.addEventListener?a.addEventListener(b.toString(),d,f):a.attachEvent(of(b.toString()),d),jf++);a=c}return a}
function nf(){var a=pf,b=Ve?function(c){return a.call(b.src,b.Da,c)}:function(c){c=a.call(b.src,b.Da,c);if(!c)return c};return b}function qf(a,b,c,d,e){if(s(b))for(var f=0;f<b.length;f++)qf(a,b[f],c,d,e);else c=lf(c),Ze(a)?a.Qb(b,c,d,e):a&&(a=mf(a))&&(b=ff(a,b,c,!!d,e))&&rf(b)}
function rf(a){if(fa(a)||!a||a.b)return!1;var b=a.src;if(Ze(b))return ef(b.qa,a);var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.g):b.detachEvent&&b.detachEvent(of(c),d);jf--;(c=mf(b))?(ef(c,a),0==c.g&&(c.src=null,b[gf]=null)):bf(a);return!0}function of(a){return a in hf?hf[a]:hf[a]="on"+a}function sf(a,b,c,d){var e=1;if(a=mf(a))if(b=a.b[b.toString()])for(b=Pa(b),a=0;a<b.length;a++){var f=b[a];f&&f.g==c&&!f.b&&(e&=!1!==tf(f,d))}return Boolean(e)}
function tf(a,b){var c=a.Da,d=a.i||a.src;a.qb&&rf(a);return c.call(d,b)}
function pf(a,b){if(a.b)return!0;if(!Ve){var c=b||p("window.event"),d=new Xe(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],e&=sf(c[k],f,!0,d);for(k=0;k<c.length;k++)d.currentTarget=c[k],e&=sf(c[k],f,!1,d)}return e}return tf(a,new Xe(b,this))}
function mf(a){a=a[gf];return a instanceof cf?a:null}var uf="__closure_events_fn_"+(1E9*Math.random()>>>0);function lf(a){return u(a)?a:a[uf]||(a[uf]=function(b){return a.handleEvent(b)})};function vf(){this.qa=new cf(this);this.Ia=this}A(vf,jb);vf.prototype[Ye]=!0;g=vf.prototype;g.Vb=null;g.addEventListener=function(a,b,c,d){kf(this,a,b,c,d)};g.removeEventListener=function(a,b,c,d){qf(this,a,b,c,d)};
function wf(a,b){var c,d=a.Vb;if(d){c=[];for(var e=1;d;d=d.Vb)c.push(d),++e}var d=a.Ia,e=b,f=e.type||e;if(t(e))e=new Te(e,d);else if(e instanceof Te)e.target=e.target||d;else{var h=e,e=new Te(f,d);fb(e,h)}var h=!0,k;if(c)for(var l=c.length-1;0<=l;l--)k=e.currentTarget=c[l],h=xf(k,f,!0,e)&&h;k=e.currentTarget=d;h=xf(k,f,!0,e)&&h;h=xf(k,f,!1,e)&&h;if(c)for(l=0;l<c.length;l++)k=e.currentTarget=c[l],h=xf(k,f,!1,e)&&h}g.B=function(){vf.A.B.call(this);this.removeAllListeners();this.Vb=null};
g.listen=function(a,b,c,d){return this.qa.add(String(a),b,!1,c,d)};g.Qb=function(a,b,c,d){return this.qa.remove(String(a),b,c,d)};g.removeAllListeners=function(a){return this.qa?this.qa.removeAll(a):0};function xf(a,b,c,d){b=a.qa.b[String(b)];if(!b)return!0;b=Pa(b);for(var e=!0,f=0;f<b.length;++f){var h=b[f];if(h&&!h.b&&h.g==c){var k=h.Da,l=h.i||h.src;h.qb&&ef(a.qa,h);e=!1!==k.call(l,d)&&e}}return e&&!1!=d.dc};function yf(a,b){vf.call(this);this.b=a||1;this.g=b||n;this.i=v(this.ed,this);this.j=y()}A(yf,vf);g=yf.prototype;g.ia=!1;g.V=null;function zf(a,b){a.b=b;a.V&&a.ia?(a.stop(),a.start()):a.V&&a.stop()}g.ed=function(){if(this.ia){var a=y()-this.j;0<a&&a<0.8*this.b?this.V=this.g.setTimeout(this.i,this.b-a):(this.V&&(this.g.clearTimeout(this.V),this.V=null),wf(this,"tick"),this.ia&&(this.V=this.g.setTimeout(this.i,this.b),this.j=y()))}};
g.start=function(){this.ia=!0;this.V||(this.V=this.g.setTimeout(this.i,this.b),this.j=y())};g.stop=function(){this.ia=!1;this.V&&(this.g.clearTimeout(this.V),this.V=null)};g.B=function(){yf.A.B.call(this);this.stop();delete this.g};function Af(a,b,c){if(u(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:n.setTimeout(a,b||0)};function Bf(a,b,c){this.j=a;this.i=b;this.g=c;this.b=v(this.dd,this)}A(Bf,jb);g=Bf.prototype;g.Gb=!1;g.La=null;g.stop=function(){this.La&&(n.clearTimeout(this.La),this.La=null,this.Gb=!1)};g.B=function(){Bf.A.B.call(this);this.stop()};g.dd=function(){this.La=null;this.Gb&&(this.Gb=!1,Cf(this))};function Cf(a){a.La=Af(a.b,a.i);a.j.call(a.g)};var Df,Ef=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{},Ff=Ef.mark?function(a){Ef.mark(a)}:ba;
function Gf(){var a=Hf().tick,b=Hf().span,c=Hf().info,d=p("yt.timing.reportbuilder_");if(d){if(d=d.apply(null,[a,b,c,void 0]))If(d),Jf()}else{var d={v:2,s:"youtube",action:I("TIMING_ACTION")},e=I("TIMING_INFO")||{},f;for(f in e)c[f]=e[f];f=c.srt;delete c.srt;var h;f||0===f||(h=Ef.timing||{},f=Math.max(0,h.responseStart-h.navigationStart),isNaN(f)&&c.pt&&(f=c.pt));if(f||0===f)c.srt=f;a.aft||(a.aft=a.pbr&&a.pbs>a.pbr?a.pbr:a.pbs?a.pbs:a.vr&&a.cl&&a.cl>a.vr?a.cl:a.vr?a.vr:a.ol);a.vr&&a.gv&&(b.vl=Math.round(a.vr-
a.gv));f=a._start;if(!Df){h||(h=Ef.timing||{});t:if(e=h,e.msFirstPaint)e=Math.max(0,e.msFirstPaint);else{var k=window.chrome;if(k&&(k=k.loadTimes,u(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 t}e=0}0<e&&e>f&&(a.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);Df=!0}for(var m in c)"_"!=m.charAt(0)&&(d[m]=c[m]);c={};m=[];for(var q in a)"_"!=q.charAt(0)&&(e=Math.max(Math.round(a[q]-f),0),c[q]=e,m.push(q+"."+e));d.rt=m.join(",");a={};q=[];for(var w in b)"_"!=w.charAt(0)&&(a[w]=b[w],q.push(w+"."+b[w]));d.it=q.join(",");If(d);(b=p("ytdebug.logTiming"))&&b(d,c,a);Jf()}}
function If(a){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))&&Le(a)}function Hf(){return p("ytcsi.data_")||Jf()}function Jf(){var a={tick:{},span:{},info:{}};z("ytcsi.data_",a);return a};var Kf={};
function Lf(a,b){try{var c=I("FEEDBACK_LOCALE_EXTRAS",{});b?fb(Kf,b):fb(Kf,c);try{var d=I("PLAYER_REFERENCE");d&&d.pauseVideo&&d.pauseVideo();var e=Jd.getInstance();Kf.flashVersion=e.getVersion().join(".");d&&(Kf.playback_id=d.getVideoData().cpn)}catch(f){}var h=I("SESSION_INDEX"),k=I("FEEDBACK_BUCKET_ID"),l={abuseLink:"https://support.google.com/youtube/bin/answer.py?answer=140536",customZIndex:"2000000005",locale:I("FEEDBACK_LOCALE_LANGUAGE"),productId:(a||"59")+""};h&&(l.authuser=h+"");k&&(l.bucket=
k);var m=window.GOOGLE_FEEDBACK_DESTROY_FUNCTION;m&&m();kd(l,Kf);return!1}catch(q){return!0}};function Mf(a){a=a||{};this.url=a.url||"";this.urlV8=a.url_v8||"";this.urlV9As2=a.url_v9as2||"";this.args=a.args||cb(Nf);this.assets=a.assets||{};this.attrs=a.attrs||cb(Of);this.params=a.params||cb(Pf);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}var Nf={enablejsapi:1},Of={},Pf={allowscriptaccess:"always",allowfullscreen:"true",bgcolor:"#000000"};
function Qf(a){a instanceof Mf||(a=new Mf(a));return a}Mf.prototype.clone=function(){var a=new Mf,b;for(b in this){var c=this[b];"object"==da(c)?a[b]=cb(c):a[b]=c}return a};function Rf(a,b,c){if((a=R(a))&&b&&c){c=Qf(c);var d=cb(c.attrs);d.tabindex=0;var e=cb(c.params);e.flashvars=dd(c.args);if(zb){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 Sf(a,b,c){if(a&&a.attrs&&a.attrs.id){a=Qf(a);var d=!!b,e=R(a.attrs.id),f=e?e.parentNode:null;if(e&&f){if(window!=window.top){var h=null;if(document.referrer){var k=document.referrer.substring(0,128);hd(k)||(h=k)}else h="unknown";h&&(d=!0,a.args.framer=h)}h=Tf();if(Kd(h,a.minVersion)){var k=Uf(a,h),l="";-1<navigator.userAgent.indexOf("Sony/COM2")||(l=e.getAttribute("src")||e.movie);(l!=k||d)&&Rf(f,k,a);Md(h)&&Vf()}else Wf(f,a,h);c&&c()}else J(function(){Sf(a,b,c)},50)}}
function Wf(a,b,c){0==c.b&&b.fallback?b.fallback():0==c.b&&b.fallbackMessage?b.fallbackMessage():a.innerHTML='<div id="flash-upgrade">'+yb("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>')+"</div>"}function Uf(a,b){return Ld(b)&&a.url||(-1<navigator.userAgent.indexOf("Sony/COM2")&&!Kd(b,9,1,58)?!1:!0)&&a.urlV9As2||a.urlV8||a.url}
function Tf(){var a=Jd.getInstance();De.getInstance().set("fv",a.getVersion().join("."));var b;b=[];for(var c in Ee)b.push(c+"="+escape(Ee[c]));b=b.join("&");bd("PREF",b,63072E3);return a}function Vf(){var a=R("flash10-promo-div"),b;De.getInstance();b=He("f"+(Math.floor(107/31)+1));b=!!(((null!=b&&/^[A-Fa-f0-9]+$/.test(b)?parseInt(b,16):null)||0)&16384);a&&!b&&be(a)};function Xf(a){if(window.spf){var b;b=(b=a.match(Yf))?b[1]:"";spf.beta?spf.style.load(a,b):spf.styles.load(a,void 0,b)}else Zf(a)}function Zf(a){var b=$f(a),c=document.getElementById(b),d=c&&G(c,"loaded");d||c&&!d||(c=ag(a,b,function(){G(c,"loaded")||(gb(c,"loaded","true"),L(b),J(x(Ib,b),0))}))}
function ag(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 $f(a){var b=document.createElement("a");b.href=a;a=b.href.replace(/^[a-zA-Z]+:\/\//,"//");return"css-"+wa(a)}var Yf=/cssbin\/(?:debug-)?([a-zA-Z0-9_-]+?)(?:-2x|-web|-rtl|-vfl|.css)/;var bg;var cg=O,cg=cg.toLowerCase();if(B(cg,"android")){var dg=cg.match(/android\D*(\d\.\d)[^\;|\)]*[\;\)]/);if(dg)bg=Number(dg[1]);else{var eg={cupcake:1.5,donut:1.6,eclair:2,froyo:2.2,gingerbread:2.3,honeycomb:3,"ice cream sandwich":4,jellybean:4.1},fg=cg.match("("+Za(eg).join("|")+")");bg=fg?eg[fg[0]]:0}}else bg=void 0;function gg(){if(2.2==bg)return!0;var a;a=p("yt.player.utils.videoElement_");a||(a=document.createElement("video"),z("yt.player.utils.videoElement_",a));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 hg(a){if("function"==typeof a.fa)return a.fa();if(t(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 Ya(a)}
function ig(a,b){if("function"==typeof a.forEach)a.forEach(b,void 0);else if(ea(a)||t(a))D(a,b,void 0);else{var c;if("function"==typeof a.ga)c=a.ga();else if("function"!=typeof a.fa)if(ea(a)||t(a)){c=[];for(var d=a.length,e=0;e<d;e++)c.push(e)}else c=Za(a);else c=void 0;for(var d=hg(a),e=d.length,f=0;f<e;f++)b.call(void 0,d[f],c&&c[f],a)}};function jg(a,b){var c;if(a instanceof jg)this.Fa=r(b)?b:a.Fa,kg(this,a.Pa),this.yb=a.yb,lg(this,a.Oa),mg(this,a.bb),this.cb=a.cb,ng(this,a.b.clone()),this.xb=a.xb;else if(a&&(c=Qc(String(a)))){this.Fa=!!b;kg(this,c[1]||"",!0);var d=c[2]||"";this.yb=d?decodeURIComponent(d):"";lg(this,c[3]||"",!0);mg(this,c[4]);this.cb=(d=c[5]||"")?decodeURIComponent(d):"";ng(this,c[6]||"",!0);this.xb=(c=c[7]||"")?decodeURIComponent(c):""}else this.Fa=!!b,this.b=new og(null,0,this.Fa)}g=jg.prototype;g.Pa="";g.yb="";
g.Oa="";g.bb=null;g.cb="";g.xb="";g.Fa=!1;g.toString=function(){var a=[],b=this.Pa;b&&a.push(pg(b,qg),":");if(b=this.Oa){a.push("//");var c=this.yb;c&&a.push(pg(c,qg),"@");a.push(encodeURIComponent(String(b)));b=this.bb;null!=b&&a.push(":",String(b))}if(b=this.cb)this.Oa&&"/"!=b.charAt(0)&&a.push("/"),a.push(pg(b,"/"==b.charAt(0)?rg:sg));(b=this.b.toString())&&a.push("?",b);(b=this.xb)&&a.push("#",pg(b,tg));return a.join("")};g.clone=function(){return new jg(this)};
function kg(a,b,c){a.Pa=c?b?decodeURIComponent(b):"":b;a.Pa&&(a.Pa=a.Pa.replace(/:$/,""))}function lg(a,b,c){a.Oa=c?b?decodeURIComponent(b):"":b}function mg(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.bb=b}else a.bb=null}function ng(a,b,c){b instanceof og?(a.b=b,ug(a.b,a.Fa)):(c||(b=pg(b,vg)),a.b=new og(b,0,a.Fa))}function V(a,b,c){a.b.set(b,c)}function wg(a,b,c){s(c)||(c=[String(c)]);xg(a.b,b,c)}
function yg(a){V(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^y()).toString(36));return a}function zg(a){return a instanceof jg?a.clone():new jg(a,void 0)}function Ag(a,b,c,d){var e=new jg(null,void 0);a&&kg(e,a);b&&lg(e,b);c&&mg(e,c);d&&(e.cb=d);return e}function pg(a,b){return t(a)?encodeURI(a).replace(b,Bg):null}function Bg(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}
var qg=/[#\/\?@]/g,sg=/[\#\?:]/g,rg=/[\#\?]/g,vg=/[\#\?@]/g,tg=/#/g;function og(a,b,c){this.b=a||null;this.g=!!c}function Cg(a){if(!a.D&&(a.D=new ie,a.S=0,a.b))for(var b=a.b.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=pa(e);e=Dg(a,e);a.add(e,f?pa(f):"")}}g=og.prototype;g.D=null;g.S=null;g.va=function(){Cg(this);return this.S};
g.add=function(a,b){Cg(this);this.b=null;a=Dg(this,a);var c=this.D.get(a);c||this.D.set(a,c=[]);c.push(b);this.S++;return this};g.remove=function(a){Cg(this);a=Dg(this,a);return le(this.D.g,a)?(this.b=null,this.S-=this.D.get(a).length,this.D.remove(a)):!1};g.clear=function(){this.D=this.b=null;this.S=0};function Eg(a,b){Cg(a);b=Dg(a,b);return le(a.D.g,b)}g.ga=function(){Cg(this);for(var a=this.D.fa(),b=this.D.ga(),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){Cg(this);var b=[];if(t(a))Eg(this,a)&&(b=Oa(b,this.D.get(Dg(this,a))));else{a=this.D.fa();for(var c=0;c<a.length;c++)b=Oa(b,a[c])}return b};g.set=function(a,b){Cg(this);this.b=null;a=Dg(this,a);Eg(this,a)&&(this.S-=this.D.get(a).length);this.D.set(a,[b]);this.S++;return this};g.get=function(a,b){var c=a?this.fa(a):[];return 0<c.length?String(c[0]):b};function xg(a,b,c){a.remove(b);0<c.length&&(a.b=null,a.D.set(Dg(a,b),Pa(c)),a.S+=c.length)}
g.toString=function(){if(this.b)return this.b;if(!this.D)return"";for(var a=[],b=this.D.ga(),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.b=a.join("&")};g.clone=function(){var a=new og;a.b=this.b;this.D&&(a.D=this.D.clone(),a.S=this.S);return a};function Dg(a,b){var c=String(b);a.g&&(c=c.toLowerCase());return c}
function ug(a,b){b&&!a.g&&(Cg(a),a.b=null,a.D.forEach(function(a,b){var e=b.toLowerCase();b!=e&&(this.remove(b),xg(this,e,a))},a));a.g=b};var Fg="corp.google.com googleplex.com youtube.com youtube-nocookie.com prod.google.com sandbox.google.com docs.google.com drive.google.com mail.google.com plus.google.com play.google.com googlevideo.com".split(" "),Gg="";function Hg(a){return a&&a==Gg?!0:RegExp("^(https?:)?//([a-z0-9-]{1,63}\\.)*("+Fg.join("|").replace(/\./g,".")+")(:[0-9]+)?([/?#]|$)","i").test(a)?(Gg=a,!0):!1};function Ig(){};function Jg(){}A(Jg,Ig);Jg.prototype.va=function(){var a=0;ge(this.da(!0),function(){a++});return a};Jg.prototype.clear=function(){var a=he(this.da(!0)),b=this;D(a,function(a){b.remove(a)})};function Kg(a){this.b=a}A(Kg,Jg);g=Kg.prototype;g.isAvailable=function(){if(!this.b)return!1;try{return this.b.setItem("__sak","1"),this.b.removeItem("__sak"),!0}catch(a){return!1}};g.set=function(a,b){try{this.b.setItem(a,b)}catch(c){if(0==this.b.length)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded";}};g.get=function(a){a=this.b.getItem(a);if(!t(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a};g.remove=function(a){this.b.removeItem(a)};
g.va=function(){return this.b.length};g.da=function(a){var b=0,c=this.b,d=new ee;d.next=function(){if(b>=c.length)throw de;var d;d=c.key(b++);if(a)return d;d=c.getItem(d);if(!t(d))throw"Storage mechanism: Invalid value was encountered";return d};return d};g.clear=function(){this.b.clear()};g.key=function(a){return this.b.key(a)};function Lg(){var a=null;try{a=window.localStorage||null}catch(b){}this.b=a}A(Lg,Kg);function Mg(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.b=a}A(Mg,Kg);function Ng(a){this.b=a}Ng.prototype.set=function(a,b){r(b)?this.b.set(a,oe(b)):this.b.remove(a)};Ng.prototype.get=function(a){var b;try{b=this.b.get(a)}catch(c){return}if(null!==b)try{return me(b)}catch(d){throw"Storage: Invalid value was encountered";}};Ng.prototype.remove=function(a){this.b.remove(a)};function Og(a){this.b=a}A(Og,Ng);function Pg(a){this.data=a}function Qg(a){return!r(a)||a instanceof Pg?a:new Pg(a)}function Rg(a){a=a.data;if(!r(a))throw"Storage: Invalid value was encountered";return a}Og.prototype.set=function(a,b){Og.A.set.call(this,a,Qg(b))};Og.prototype.eb=function(a){a=Og.A.get.call(this,a);if(!r(a)||a instanceof Object)return a;throw"Storage: Invalid value was encountered";};Og.prototype.get=function(a){return(a=this.eb(a))?Rg(a):void 0};function Sg(a){this.b=a}A(Sg,Og);function Tg(a){var b=a.creation;a=a.expiration;return!!a&&a<y()||!!b&&b>y()}Sg.prototype.set=function(a,b,c){if(b=Qg(b)){if(c){if(c<y()){Sg.prototype.remove.call(this,a);return}b.expiration=c}b.creation=y()}Sg.A.set.call(this,a,b)};Sg.prototype.eb=function(a,b){var c=Sg.A.eb.call(this,a);if(c)if(!b&&Tg(c))Sg.prototype.remove.call(this,a);else return c};function Ug(a){this.b=a}A(Ug,Sg);function Vg(a,b,c){var d=[];ge(b,function(a){var b;try{b=Ug.prototype.eb.call(this,a,!0)}catch(h){if("Storage: Invalid value was encountered"==h){c&&d.push(a);return}throw h;}if(!r(b))d.push(a);else if(Tg(b))d.push(a);else if(c)try{Rg(b)}catch(k){if("Storage: Invalid value was encountered"==k)d.push(a);else throw k;}},a);return d}function Wg(a,b,c){b=Vg(a,b,c);D(b,function(a){Ug.prototype.remove.call(this,a)},a);return b}
Ug.prototype.g=function(a){Wg(this,this.b.da(!0),a)};function Xg(a,b,c){var d=c&&0<c?c:0;c=d?y()+1E3*d:0;if((d=d?Yg:Zg)&&window.JSON){t(b)||(b=JSON.stringify(b,void 0));try{d.set(a,b,c)}catch(e){d.remove(a)}}}function $g(a){if(!Zg&&!Yg||!window.JSON)return null;var b;try{b=Zg.get(a),b=t(b)?b:Yg.get(a)}catch(c){return null}if(!t(b))return null;try{b=JSON.parse(b,void 0)}catch(d){}return b}var Yg,ah=new Lg;Yg=ah.isAvailable()?new Ug(ah):null;var Zg,bh=new Mg;Zg=bh.isAvailable()?new Ug(bh):null;function ch(){var a={volume:100,muted:!1,nonNormalized:100},b=$g("yt-player-volume")||{};a.volume=isNaN(b.volume)?100:Math.min(Math.max(b.volume,0),100);a.nonNormalized=isNaN(b.nonNormalized)?a.volume:b.nonNormalized;a.muted=void 0==b.muted?!1:b.muted;return a};function dh(a,b){this.j=this.xa=a;this.G=b;this.p=!1;this.g={};this.X=this.t=null;this.J=new H;kb(this,x(lb,this.J));this.k={};this.o=this.ea=this.i=this.ib=this.b=null;this.Ia=!1;this.ya=this.O=null;this.Y={};this.Tc=["onReady"];this.ac=0;if(this.q=!!I("PLAYER_ENABLE_SHARED_UI"))this.xa=document.createElement("div"),this.j.appendChild(this.xa),this.j.style.position="relative";this.hb=!1;eh(this);this.jb("onVolumeChange",v(this.Wc,this));this.jb("onError",v(this.Vc,this));this.jb("onTabOrderChange",
v(this.Uc,this))}A(dh,jb);g=dh.prototype;g.Ub=function(a,b){this.C()||(fh(this,a),gh(this,b),this.p&&hh(this))};
function fh(a,b){a.ib=b;a.b=b.clone();a.i=a.b.attrs.id||a.i;"video-player"==a.i&&(a.i=a.G,a.b.attrs.id=a.G);a.j.id==a.i&&(a.i=a.i+"-player",a.b.attrs.id=a.i);var c;(c=a.b.args.eurl)||(c=document.location.toString(),c=-1!=c.indexOf("/embed/")?document.referrer&&document.referrer.substring(0,128)||"unknown":c);a.b.args.eurl=c;a.b.args.enablejsapi="1";a.b.args.playerapiid=a.G;a.ea||(a.ea=ih(a,a.b.args.jsapicallback||"onYouTubePlayerReady"));a.b.args.jsapicallback=null;a.q&&(a.b.args.controls="0");if(c=
a.b.attrs.width)a.j.style.width=Td(Number(c)||c,!0);if(c=a.b.attrs.height)a.j.style.height=Td(Number(c)||c,!0);a.j.style.overflow="hidden"}g.zd=function(){return this.ib};function hh(a){a.b.loaded||(a.b.loaded=!0,"0"!=a.b.args.autoplay?a.g.loadVideoByPlayerVars(a.b.args):a.g.cueVideoByPlayerVars(a.b.args))}function jh(a){if(!r(a.b.disable.flash)){var b=a.b.disable,c;c=Kd(Tf(),a.b.minVersion);b.flash=!c}return!a.b.disable.flash}
function kh(a){var b=R(a.i);b&&b.stopVideo&&b.stopVideo();b&&b.logFallback&&b.logFallback();if(jh(a)){var c=a.b;b&&b.getUpdatedConfigurationData&&(b=Qf(b.getUpdatedConfigurationData()),b.args.video_id==c.args.video_id&&(c=b));c.args.autoplay=1;c.args.html5_unavailable="1";fh(a,c);gh(a,"flash")}}
function gh(a,b){if(!a.C()){if(!b){var c;(c=!a.b.html5&&jh(a))||(r(a.b.disable.html5)||(c=gg()&&(lh()||a.b.assets.js),a.b.disable.html5=!c,c||(a.b.args.html5_unavailable="1")),c=!!a.b.disable.html5);b=c?jh(a)?"flash":"unsupported":"html5"}("flash"==b?a.md:"html5"==b?a.nd:a.od).call(a);a.q&&!a.hb&&mh(a)}}function lh(){return p("yt.player.Application")}
g.nd=function(){if(!this.Ia){var a=this.b.clone();"html5"==nh(this)?(this.o="html5",this.p||this.Ja(!0)):(oh(this),this.o="html5",this.ya?(this.xa.appendChild(this.ya),this.Ja()):(this.b.loaded=!0,this.O=v(function(){new (lh())(this.xa,a);this.Ja()},this),this.Ia=!0,lh()?this.O():(Jb(this.b.assets.js,this.O),Xf(this.b.assets.css))))}};
g.md=function(){var a=this.b.clone();a.attrs.width=a.attrs.width||"100%";a.attrs.height=a.attrs.height||"100%";if("flash"==nh(this))this.o="flash",this.p||Sf(a,!1,v(this.Ja,this));else{oh(this);this.o="flash";this.b.loaded=!0;var b=this.xa,b=R(b),a=Qf(a);if(window!=window.top){var c=null;document.referrer&&(c=document.referrer.substring(0,128));a.args.framer=c}c=Tf();Kd(c,a.minVersion)?(c=Uf(a,c),Rf(b,c,a)):Wf(b,a,c);this.Ja()}};
g.Ja=function(a){var b=R(this.i),c=!1;try{b&&b.getApiInterface&&b.getApiInterface()&&(c=!0)}catch(d){}if(c)if(this.Ia=!1,a&&b.isNotServable&&b.isNotServable())kh(this);else{eh(this);this.p=!0;a=R(this.i);a.addEventListener&&(this.t=ph(a,"addEventListener"));a.removeEventListener&&(this.X=ph(a,"removeEventListener"));b=a.getApiInterface();b=b.concat(a.getInternalApiInterface());for(c=0;c<b.length;c++){var e=b[c];this.g[e]||(this.g[e]=ph(a,e))}for(var f in this.k)this.t(f,this.k[f]);hh(this);this.ea&&
this.ea(this.g);this.J.u("onReady",this.g)}else this.ac=J(v(this.Ja,this),50)};function ph(a,b){var c=a[b];return function(){try{return c.apply(a,arguments)}catch(d){d.message+=" ("+b+")",xb(d,"WARNING")}}}
function eh(a){a.p=!1;if(a.X)for(var b in a.k)a.X(b,a.k[b]);a.t=null;a.X=null;for(var c in a.g)a.g[c]=null;a.g.addEventListener=v(a.jb,a);a.g.removeEventListener=v(a.Cd,a);a.g.destroy=v(a.dispose,a);a.g.getPlayerType=v(a.Bd,a);a.g.getCurrentVideoConfig=v(a.zd,a);a.g.loadNewVideoConfig=v(a.Ub,a);a.g.isReady=v(a.Dd,a)}g.Dd=function(){return this.p};
g.jb=function(a,b){if(!this.C()){var c=ih(this,b);if(c){if(!F(this.Tc,a)&&!this.k[a]){var d=qh(this,a);this.t&&this.t(a,d)}this.J.I(a,c);"onReady"==a&&this.p&&J(x(c,this.g),0)}}};g.Cd=function(a,b){if(!this.C()){var c=ih(this,b);c&&this.J.ma(a,c)}};function ih(a,b){var c=b;if("string"==typeof b){if(a.Y[b])return a.Y[b];c=function(){var a=p(b);a&&a.apply(n,arguments)};a.Y[b]=c}return c?c:null}
function qh(a,b){var c="ytPlayer"+b+a.G;a.k[b]=c;n[c]=function(c){J(function(){a.C()||a.J.u(b,c)},0)};return c}g.Uc=function(a){a=a?zc:yc;for(var b=a(document.activeElement);b&&(1!=b.nodeType||(b.focus(),b!=document.activeElement));)b=a(b)};g.Wc=function(a){var b={};b.volume=isNaN(a.volume)?ch().volume:Math.min(Math.max(a.volume,0),100);b.nonNormalized=a.nonNormalized;b.muted=void 0==a.muted?ch().muted:a.muted;Xg("yt-player-volume",b,2592E3)};g.Vc=function(a){5!=a&&202!=a||kh(this)};
g.od=function(){oh(this);this.o="unsupported";var a=yb("PLAYER_FALLBACK",'The 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=yb("QUICKTIME_FALLBACK",'The 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=R("player-unavailable");if(R("unavailable-submessage")&&b){R("unavailable-submessage").innerHTML=a;var a=b||document,c=null;a.querySelectorAll&&a.querySelector?c=a.querySelector(".icon"):c=uc("icon",b)[0];if(c=a=c||null)c=a.dataset?hb("icon")in a.dataset:a.hasAttribute?!!a.hasAttribute("data-icon"):!!a.getAttribute("data-icon");c&&(a.src=G(a,"icon"));Wb(b,"hid");Vb(R("player"),"off-screen-trigger")}};g.Bd=function(){return this.o||nh(this)};
function nh(a){return(a=R(a.i))?"div"==a.tagName.toLowerCase()?"html5":"flash":null}function oh(a){a.cancel();eh(a);a.o=null;a.b.loaded=!1;var b=R(a.i);"html5"==nh(a)?a.ya=b:b&&b.destroy&&b.destroy();a.q&&xc(R(a.i));for(a=a.xa;b=a.firstChild;)a.removeChild(b)}g.cancel=function(){var a=this.O;this.b.assets.js&&a&&(a=""+ha(a),(a=Pb[a])&&Gb(a));wb(this.ac)};
function mh(a){a.b.assets.js_sharedui&&(a.hb=!0,Xf(a.b.assets.css_sharedui),Jb(a.b.assets.js_sharedui,v(function(){this.g.addEventListener("onReady",v(this.hd,this))},a)))}g.hd=function(){var a=p("yt.player.ui.shared.init");a&&(this.g.hideUserInterface(),a(this.j,this.b.clone()))};g.B=function(){oh(this);if(this.q){var a=p("yt.player.ui.shared.dispose");a&&a();this.hb=!1}this.Y=null;for(var b in this.k)n[this.k[b]]=null;this.j=this.xa=this.g=null;this.b&&(this.ib=this.b=this.b.fallback=null);dh.A.B.call(this)};var rh={};function sh(a,b){a=R(a);if(!a)return null;b=Qf(b);var c="player"+ha(a),d=rh[c];if(d)return d.Ub(b),d.g;d||(d=new dh(a,c),rh[c]=d,L("player-added",d.g),kb(d,x(th,d)));J(function(){d.Ub(b)},0);return d.g}function uh(){for(var a in rh){var b=rh[a];b&&b.cancel()}}function vh(a){if(a=R(a))a="player"+ha(a),(a=rh[a])&&a.dispose()}function th(a){rh[a.G]=null}function wh(a){a=R(a);if(!a)return null;a="player"+ha(a);return(a=rh[a])?a.g:null};var xh=p("yt.player.exports.navigate")||jd;z("yt.player.exports.navigate",xh);var yh=p("yt.player.embed")||sh;z("yt.player.embed",yh);var zh=p("yt.player.destroy")||vh;z("yt.player.destroy",zh);var Ah=p("yt.player.cancelAll")||uh;z("yt.player.cancelAll",Ah);var Bh=p("yt.player.getPlayerByElement")||wh;z("yt.player.getPlayerByElement",Bh);var Ch=p("yt.player.exports.feedbackStart")||Lf;z("yt.player.exports.feedbackStart",Ch);function Dh(a,b,c){var d=document.location.protocol+"//"+document.domain+"/post_login";b&&(d=Xc(d,"mode",b));b=Xc("/signin?context=popup","next",d);c&&(b=Xc(b,"feature",c));if(c=window.open(b,"loginPopup","width=375,height=440,resizable=yes,scrollbars=yes",!0))b=K("LOGGED_IN",function(b){Gb(I("LOGGED_IN_PUBSUB_KEY"));qb("LOGGED_IN",!0);a(b)}),qb("LOGGED_IN_PUBSUB_KEY",b),c.moveTo((screen.width-375)/2,(screen.height-440)/2)}z("yt.pubsub.publish",L);function Eh(){var a=I("PLAYER_CONFIG");return a&&a.args&&void 0!==a.args.authuser?!0:!(!I("SESSION_INDEX")&&!I("LOGGED_IN"))};function Fh(){this.b={}}A(Fh,Qe);ca(Fh);g=Fh.prototype;g.$b="tooltip";g.Hb=0;g.register=function(){Re(this,"mouseover",this.Ec);Re(this,"mouseout",this.Yb);Re(this,"click",this.Yb);Re(this,"touchstart",this.Sd);Re(this,"touchend",this.Kc);Re(this,"touchcancel",this.Kc)};
g.Ec=function(a){if(!(this.Hb&&1E3>y()-this.Hb)){var b=parseInt(G(a,"tooltip-hide-timer"),10);b&&(this.removeData(a,"tooltip-hide-timer"),wb(b));var b=v(function(){Gh(this,a);this.removeData(a,"tooltip-show-timer")},this),c=parseInt(G(a,"tooltip-show-delay"),10)||0,b=J(b,c);gb(a,"tooltip-show-timer",b.toString());a.title&&(Se(a,Hh(a)),a.title="")}};
g.Yb=function(a){var b=parseInt(G(a,"tooltip-show-timer"),10);b&&(wb(b),this.removeData(a,"tooltip-show-timer"));b=v(function(){if(a){var b=sc(Ih(this,a));b&&(Jh(b),xc(b),this.removeData(a,"content-id"))}this.removeData(a,"tooltip-hide-timer")},this);b=J(b,50);gb(a,"tooltip-hide-timer",b.toString());if(b=G(a,"tooltip-text"))a.title=b};g.Sd=function(a,b){this.Hb=0;var c=Oe(b,U(this),null[0].target);this.Ec(c)};g.Kc=function(a,b){this.Hb=y();var c=Oe(b,U(this),null[0].target);this.Yb(c)};
function Kh(a,b){Se(a,b);var c=G(a,"content-id");if(c=R(c))c.innerHTML=b}function Hh(a){return G(a,"tooltip-text")||a.title}
function Gh(a,b){if(b){var c=Hh(b);if(c){var d=sc(Ih(a,b));if(!d){d=document.createElement("div");d.id=Ih(a,b);d.className=U(a,"tip");var e=document.createElement("div");e.className=U(a,"tip-body");var f=document.createElement("div");f.className=U(a,"tip-arrow");var h=document.createElement("div");h.className=U(a,"tip-content");var k=Lh(a,b),l=Ih(a,b,"content");h.id=l;gb(b,"content-id",l);e.appendChild(h);k&&d.appendChild(k);d.appendChild(e);d.appendChild(f);(Ic()||document.body).appendChild(d);Kh(b,
c);(c=parseInt(G(b,"tooltip-max-width"),10))&&e.offsetWidth>c&&(e.style.width=c+"px",Vb(h,U(a,"normal-wrap")));h=Ub(b,U(a,"reverse"));Mh(a,b,d,e,k,h)||Mh(a,b,d,e,k,!h);var m=U(a,"tip-visible");J(function(){Vb(d,m)},0)}}}}
function Mh(a,b,c,d,e,f){Xb(c,U(a,"tip-reverse"),f);var h=0;f&&(h=1);a=Ud(b);f=new N((a.width-10)/2,f?a.height:0);var k=Sd(b);var k=new N(k.x+f.x,k.y+f.y),k=k.clone(),l;l=(h&4&&"rtl"==Pd(c,"direction")?h^2:h)&-5;f=Ud(c);h=f.clone();0!=l&&(l&2&&(k.x-=h.width+0),l&1&&(k.y-=h.height+0));var m=k;l=ec&&(ac||ic)&&Q("1.9");m instanceof N?(k=m.x,m=m.y):(k=m,m=void 0);c.style.left=Td(k,l);c.style.top=Td(m,l);if(!(f==h||f&&h&&f.width==h.width&&f.height==h.height))if(k=Dc(pc(rc(c))),!P||k&&Q("8"))f=c.style,
ec?f.MozBoxSizing="border-box":fc?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(P){k=Xd(c,"paddingLeft");l=Xd(c,"paddingRight");var m=Xd(c,"paddingTop"),q=Xd(c,"paddingBottom"),k=new Nd(m,l,q,k)}else k=Od(c,"paddingLeft"),l=Od(c,"paddingRight"),m=Od(c,"paddingTop"),q=Od(c,"paddingBottom"),k=new Nd(parseFloat(m),parseFloat(l),parseFloat(q),parseFloat(k));if(P&&!mc(9)){l=Zd(c,"borderLeft");var m=Zd(c,
"borderRight"),q=Zd(c,"borderTop"),w=Zd(c,"borderBottom");l=new Nd(q,m,w,l)}else l=Od(c,"borderLeftWidth"),m=Od(c,"borderRightWidth"),q=Od(c,"borderTopWidth"),w=Od(c,"borderBottomWidth"),l=new Nd(parseFloat(q),parseFloat(m),parseFloat(w),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="CSS1Compat"==h.compatMode?h.documentElement:h.body;h=new Yb(h.clientWidth,
h.clientHeight);if(1==c.nodeType){c.getBoundingClientRect?(f=Qd(c),f=new N(f.left,f.top)):(f=Ec(pc(c)),k=Sd(c),f=new N(k.x-f.x,k.y-f.y));if(ec&&!Q(12)){n:{k=xa();if(void 0===c.style[k]&&(k=(fc?"Webkit":ec?"Moz":P?"ms":dc?"O":null)+ya(),void 0!==c.style[k])){k=(fc?"-webkit":ec?"-moz":P?"-ms":dc?"-o":null)+"-transform";break n}k="transform"}c=(c=Pd(c,k)||Pd(c,"transform"))?(c=c.match($d))?new N(parseFloat(c[1]),parseFloat(c[2])):new N(0,0):new N(0,0);c=new N(f.x+c.x,f.y+c.y)}else c=f;l=c}else f=u(c.g),
k=c,c.targetTouches?k=c.targetTouches[0]:f&&c.b.targetTouches&&(k=c.b.targetTouches[0]),l=new N(k.clientX,k.clientY);c=Ud(d);m=Math.floor(c.width/2);f=!!(h.height<l.y+a.height);a=!!(l.y<a.height);k=!!(l.x<m);h=!!(h.width<l.x+m);l=(c.width+3)/-2- -5;b=G(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 Ih(a,b,c){a=U(a);var d=b.__yt_uid_key;d||(d=Fc(),b.__yt_uid_key=d);b=a+d;c&&(b+="-"+c);return b}function Lh(a,b){var c=null;bc&&Ub(b,U(a,"masked"))&&((c=R("yt-uix-tooltip-shared-mask"))?(c.parentNode.removeChild(c),be(c)):(c=document.createElement("iframe"),c.src='javascript:""',c.id="yt-uix-tooltip-shared-mask",c.className=U(a,"tip-mask")));return c}
function Jh(a){var b=R("yt-uix-tooltip-shared-mask"),c=b&&Cc(b,function(b){return b==a},!1,2);b&&c&&(b.parentNode.removeChild(b),ce(b),document.body.appendChild(b))};function Nh(){this.b={};this.g=[]}A(Nh,Qe);ca(Nh);Nh.prototype.$b="subscription-button";
Nh.prototype.register=function(){Re(this,"click",this.xc);this.g.push(K("subscription-subscribe-loading",this.wc,this),K("subscription-subscribe-loaded",this.vc,this),K("subscription-unsubscirbe-loading",this.wc,this),K("subscription-unsubscribe-loaded",this.vc,this),K("subscription-subscribe-success",this.Gd,this),K("subscription-unsubscribe-success",this.Hd,this),K("subscription-enable-ypc",this.Fd,this),K("subscription-disable-ypc",this.Ed,this))};
var Bc={Dc:"hover-enabled",Ld:"yt-uix-button-subscribe",Md:"yt-uix-button-subscribed",je:"ypc-enabled",Zd:"yt-uix-button-subscription-container",$d:"yt-subscription-button-disabled-mask-container"},W={ke:"channel-external-id",Nd:"subscriber-count-show-when-subscribed",Od:"subscriber-count-tooltip",Pd:"subscriber-count-title",le:"href",Oc:"is-subscribed",ne:"parent-url",oe:"sessionlink",Qd:"style-type",Pc:"subscription-id",pe:"target",Td:"ypc-enabled",Ic:"ypc-item-type",Hc:"ypc-item-id",Jc:"ypc-offers-url"};
g=Nh.prototype;g.xc=function(a){var b=G(a,"href"),c=Eh();if(b)a=G(a,"target")||"_self",window.open(b,a);else if(c){var b=G(a,"channel-external-id"),c=G(a,"sessionlink"),d;if(G(a,"ypc-enabled")){d=G(a,W.Ic);var e=G(a,W.Hc),f=G(a,W.Jc);d={itemType:d,itemId:e,offersUrl:f,subscriptionElement:a}}else d=null;e=G(a,"parent-url");G(a,"is-subscribed")?(f=G(a,"subscription-id"),L("subscription-unsubscribe",b,f,d,a,c,e)):L("subscription-subscribe",b,d,a,c,e)}else Oh(this,a)};
g.wc=function(a){this.Sa(a,this.Mc,!0)};g.vc=function(a){this.Sa(a,this.Mc,!1)};g.Gd=function(a,b){this.Sa(a,this.Nc,!0,b)};g.Hd=function(a){this.Sa(a,this.Nc,!1)};g.Fd=function(a){this.Sa(a,this.Wd)};g.Ed=function(a){this.Sa(a,this.Vd)};g.Nc=function(a,b,c){b?(gb(a,W.Oc,"true"),c&&gb(a,W.Pc,c)):(this.removeData(a,W.Oc),this.removeData(a,W.Pc));Ph(a)};g.Mc=function(a,b){var c;c=Ac(a);Xb(c,Bc.$d,b);a.setAttribute("aria-busy",b?"true":"false");a.disabled=b};
function Ph(a){var b=G(a,W.Qd),c=!!G(a,"is-subscribed"),b="-"+b,d=Bc.Md+b;Xb(a,Bc.Ld+b,!c);Xb(a,d,c);G(a,W.Od)&&!G(a,W.Nd)&&(b=U(Fh.getInstance()),Xb(a,b,!c),a.title=c?"":G(a,W.Pd));c?J(function(){Vb(a,Bc.Dc)},1E3):Wb(a,Bc.Dc)}g.Wd=function(a){var b=!!G(a,W.Ic),c=!!G(a,W.Hc),d=!!G(a,W.Jc);!G(a,"ypc-enabled")&&b&&c&&d&&(Vb(a,"ypc-enabled"),gb(a,W.Td,"true"))};g.Vd=function(a){G(a,"ypc-enabled")&&(Wb(a,"ypc-enabled"),this.removeData(a,"ypc-enabled"))};
function Qh(a,b){var c=tc(U(a));return Ca(c,function(a){return b==G(a,"channel-external-id")},a)}g.ce=function(a,b,c){var d=Sa(arguments,2);D(a,function(a){b.apply(this,Oa(a,d))},this)};g.Sa=function(a,b,c){var d=Qh(this,a),d=Oa([d],Sa(arguments,1));this.ce.apply(this,d)};
function Oh(a,b){var c=v(function(a){a.subscription_ajax&&sb("subscription_ajax",a.subscription_ajax);a.discoverable_subscriptions&&qb("SUBSCRIBE_EMBED_DISCOVERABLE_SUBSCRIPTIONS",a.discoverable_subscriptions);this.xc(b)},a);Dh(c,"subscribe","sub_button")};var Rh={auto:0,tiny:144,light:144,small:240,medium:360,large:480,hd720:720,hd1080:1080,hd1440:1440,highres:8192};function Sh(a,b,c){this.g=a||0;this.i=b||0;this.b=c}Sh.prototype.equals=function(a){return this.g==a.g&&this.i==a.i&&this.b==a.b};function Th(a){new Sh(Rh.auto||0,Rh[a]||0,!1)}Th("large");Th("auto");function Uh(){this.j=new H;kb(this,x(lb,this.j))}A(Uh,jb);Uh.prototype.I=function(a,b,c){return this.C()?0:this.j.I(a,b,c)};Uh.prototype.ma=function(a,b,c){return this.C()?!1:this.j.ma(a,b,c)};Uh.prototype.ka=function(a){return this.C()?!1:this.j.ka(a)};Uh.prototype.u=function(a,b){return this.C()?!1:this.j.u.apply(this.j,arguments)};var Vh;var Wh=O,Xh=Wh.match(/\((iPad|iPhone|iPod)( Simulator)?;/);if(!Xh||2>Xh.length)Vh=void 0;else{var Yh=Wh.match(/\((iPad|iPhone|iPod)( Simulator)?; (U; )?CPU (iPhone )?OS (\d_\d)[_ ]/);Vh=Yh&&6==Yh.length?Number(Yh[5].replace("_",".")):0}0<=Vh&&0<=O.search("Safari")&&O.search("Version");var Zh={};function $h(a){return a?24==a.length&&"UC"==a.slice(0,2)?a.substr(2):22==a.length?a:null:null}
function ai(a,b){var c=I("CONVERSION_CONFIG_DICT");if(t(b)){var d=$h(b);if(!c||c.uid!=d)if(c=Zh[d],!c||c.uid!=d)return}var e;if(a&&c&&c.baseUrl&&c.uid){var f=c.rmktEnabled,d=c.focEnabled&&(!c.isAd||"view"!=a);if(f||d){var h={};if(f){f={utuid:c.uid,type:a};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);var k=[];for(e in f)k.push(encodeURIComponent(e)+"="+encodeURIComponent(f[e]));e=k.join(";");h.data=
e}d&&"view"==a&&c.vid&&c.uid&&(c.oeid||c.ieid)&&(c.oeid&&(h.oeid=c.oeid),c.ieid&&(h.ieid=c.ieid),h.evid=c.vid);d&&(h.label="followon_"+a,h.foc_id=c.uid);e=ed(c.baseUrl,h)}else e=null}else e=null;e&&e&&Le(e)};function bi(a){return(0==a.search("cue")||0==a.search("load"))&&"loadModule"!=a}function ci(a,b,c){t(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 di(a)}
function di(a,b,c){if(ga(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 ei(a,b,c,d){if(ga(a)&&!s(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};t(a)&&16==a.length?c.list="PL"+a:c.playlist=a;return c}
function fi(a){var b=a.video_id||a.videoId;if(t(b)){var c=$g("yt-player-two-stage-token")||{},d=$g("yt-player-two-stage-token")||{};r(void 0)?d[b]=void 0:delete d[b];Xg("yt-player-two-stage-token",d,300);(b=c[b])&&(a.two_stage_token=b)}};function gi(a){a&&(this.id=a.id||"",this.name=a.name||"",this.activityId=a.activityId||"",this.status=a.status||"UNKNOWN")}g=gi.prototype;g.id="";g.name="";g.activityId="";g.status="UNKNOWN";g.Rc=function(){return{key:this.id,name:this.name}};function hi(a){return{id:a.id,name:a.name,activityId:a.activityId,status:a.status}}g.toString=function(){return"{id:"+this.id+",name:"+this.name+",activityId:"+this.activityId+",status:"+this.status+"}"};
function ii(a){a=a||[];return"["+E(a,function(a){return a?a.toString():"null"}).join(",")+"]"};function ji(a){a&&(this.name=a.name,this.L=a.screenId,this.U=a.loungeToken,this.T=a.dialId||"")}g=ji.prototype;g.name="";g.L="";g.U="";g.T="";g.Rc=function(){return{key:this.L,name:this.name}};g.toString=function(){return"{name:"+this.name+",screenId:"+this.L+",loungeToken:..."+(this.U?this.U.slice(-6):"null")+",dialId:"+this.T+"}"};function ki(a){return a?a.toString():"null"}function li(a){a=a||[];return"["+E(a,function(a){return ki(a)}).join(",")+"]"};function mi(){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 ni(a,b){return Fa(a,function(a){return a.key==b})}function oi(a){return E(a,function(a){return a.Rc()})}function pi(a){return E(a,function(a){return hi(a)})}function qi(a){return E(a,function(a){return new gi(a)})}function ri(a,b){return a||b?a&&b?a.id==b.id&&a.name==b.name:!1:!0}function si(a,b){return Fa(a,function(a){return a.id==b})}
function ti(a){return E(a,function(a){return{name:a.name,screenId:a.L,loungeToken:a.U,dialId:a.T}})}function ui(a){return E(a,function(a){return new ji(a)})}function vi(a,b){return a||b?a&&b?a.L==b.L&&a.U==b.U&&a.name==b.name&&a.T==b.T:!1:!0}function wi(a,b){return Fa(a,function(a){return a||b?a&&b?a.L==b.L:!1:!0})}function xi(a,b){return Fa(a,function(a){return b==a.L||b==a.T})};var yi=y(),zi=null,Ai=Array(50),Bi=-1,Ci=!1;function Di(){var a=Ei;Fi();zi.push(a);Gi(zi)}function Hi(a,b){Fi();var c=zi,d=Ii(a,String(b));Ha(c)?Ji(d):(Gi(c),D(c,function(a){a(d)}))}function Fi(){zi||(zi=p("yt.mdx.remote.debug.handlers_")||[],z("yt.mdx.remote.debug.handlers_",zi))}function Ji(a){var b=(Bi+1)%50;Bi=b;Ai[b]=a;Ci||(Ci=49==b)}function Gi(a){var b=Ai;if(b[0]){var c=Bi,d=Ci?c:-1;do{var d=(d+1)%50,e=b[d];D(a,function(a){a(e)})}while(d!=c);Ai=Array(50);Bi=-1;Ci=!1}}
function Ii(a,b){var c=(y()-yi)/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 Ki(){var a=Li(),b=Mi();F(a,b);if(Ni()){var c=a,d;d=Ua;for(var e=0,f=c.length,h;e<f;){var k=e+f>>1,l;l=d(b,c[k]);0<l?e=k+1:(f=k,h=!l)}d=h?e:~e;0>d&&Ra(c,-(d+1),0,b)}a=Oi(a);Ha(a)?ad.remove("remote_sid","/","youtube.com"):bd("remote_sid",a.join(","))}function Li(){var a=$g("yt-remote-connected-devices")||[];Ta(a);return a}function Oi(a){if(Ha(a))return[];var b=a[0].indexOf("#"),c=-1==b?a[0]:a[0].substring(0,b);return E(a,function(a,b){return 0==b?a:a.substring(c.length)})}
function Pi(a){Xg("yt-remote-connected-devices",a,86400)}function Mi(){if(Qi)return Qi;var a=$g("yt-remote-device-id");a||(a=mi(),Xg("yt-remote-device-id",a,31536E3));for(var b=Li(),c=1,d=a;F(b,d);)c++,d=a+"#"+c;return Qi=d}function Ri(){return $g("yt-remote-session-browser-channel")}function Ni(){return $g("yt-remote-session-screen-id")}
function Si(a){5<a.length&&(a=a.slice(a.length-5));var b=E(Ti(),function(a){return a.loungeToken}),c=E(a,function(a){return a.loungeToken});Ea(c,function(a){return!F(b,a)})&&Xg("yt-remote-lounge-token-expiration",!0,86400);Xg("yt-remote-local-screens",a,31536E3)}function Ti(){return $g("yt-remote-local-screens")||[]}function Ui(){return $g("yt-remote-online-screens")||[]}function Vi(a){Xg("yt-remote-online-dial-devices",a,30)}function Wi(){return $g("yt-remote-online-dial-devices")||[]}
function Xi(a){a||(Zg&&Zg.remove("yt-remote-session-screen-id"),Yg&&Yg.remove("yt-remote-session-screen-id"));Ki();a=Li();Ma(a,Mi());Pi(a)}var Qi="";function Yi(){if(!("cast"in window))return!1;var a=window.cast||{};return"ActivityStatus"in a&&"Api"in a&&"LaunchRequest"in a&&"Receiver"in a}function Zi(a){Hi("CAST",a)}function Ei(a){var b=$i();b&&b.logMessage&&b.logMessage(a)}function aj(a){if(a.source==window&&a.data&&"CastApi"==a.data.source&&"Hello"==a.data.event)for(;bj.length;)bj.shift()()}
function cj(){if(!dj&&(Ha(Ka)&&Qa(Ka,Wi()),Yi())){var a=$i();a?(a.removeReceiverListener("YouTube",ej),a.addReceiverListener("YouTube",ej),Zi("API initialized in the other binary")):(a=new cast.Api,fj(a),a.addReceiverListener("YouTube",ej),a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(function(){J(function(){window.location.reload(!0)},1E3)}),Di(),Zi("API initialized"));dj=!0}}
function gj(){var a=$i();if(a){Zi("API disposed");var b=Ei,c=p("yt.mdx.remote.debug.handlers_");Ma(c||[],b);a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(ba);a.removeReceiverListener("YouTube",ej);fj(null)}dj=!1;bj=null;(a=Mc(window,"message",aj,!1))&&Nc(a)}function hj(a){var b=Ga(Ka,function(b){return b.id==a.id});0<=b&&(Ka[b]=hi(a))}
function ej(a){Zi("Updating receivers: "+oe(a));ij(a);L("yt-remote-cast-device-list-update");D(jj(),function(a){kj(a.id)});D(a,function(a){if(a.isTabProjected){var c=lj(a.id);Zi("Detected device: "+c.id+" is tab projected. Firing DEVICE_TAB_PROJECTED event.");J(function(){L("yt-remote-cast-device-tab-projected",c.id)},1E3)}})}
function mj(a,b){Zi("Updating "+a+" activity status: "+oe(b));var c=lj(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=""),hj(c),L("yt-remote-cast-device-status-update",c)):Zi("Device not found")}function jj(){cj();return qi(Ka)}
function ij(a){a=E(a,function(a){var c=a.id,d;d=a.name;d=B(d,"&")?"document"in n?qa(d):sa(d):d;c={id:c,name:d};if(a=lj(a.id))c.activityId=a.activityId,c.status=a.status;return c});Ia();Qa(Ka,a)}function lj(a){var b=jj();return Fa(b,function(b){return b.id==a})||null}function kj(a){var b=lj(a),c=$i();c&&b&&b.activityId&&c.getActivityStatus(b.activityId,function(b){"error"==b.status&&(b.status="stopped");mj(a,b)})}
function nj(a){cj();var b=lj(a),c=$i();c&&b&&b.activityId?(Zi("Stopping cast activity"),c.stopActivity(b.activityId,x(mj,a))):Zi("Dropping cast activity stop")}function $i(){return p("yt.mdx.remote.castapi.api_")}function fj(a){z("yt.mdx.remote.castapi.api_",a)}var dj=!1,bj=null,Ka=p("yt.mdx.remote.castapi.devices_")||[];z("yt.mdx.remote.castapi.devices_",Ka);function oj(a){a&&(this.id=a.id||a.name,this.name=a.name,this.app=a.app,this.type=a.type||"REMOTE_CONTROL")}g=oj.prototype;g.id="";g.name="";g.app="";g.type="REMOTE_CONTROL";g.equals=function(a){return a?this.id==a.id:!1};function pj(a,b){this.action=a;this.params=b||null};function qj(a){u(n.setImmediate)?n.setImmediate(a):(rj||(rj=sj()),rj(a))}var rj;
function sj(){var a=n.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=b.location.protocol+"//"+b.location.host,a=v(function(a){if(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){var b=new a,c={},d=c;b.port1.onmessage=function(){c=c.next;var a=c.Qc;c.Qc=null;a()};return function(a){d.next={Qc: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){n.setTimeout(a,0)}};function tj(a){qj(function(){throw a;})}function uj(a,b){vj||(qj(wj),vj=!0);xj.push(new yj(a,b))}var vj=!1,xj=[];function wj(){for(;xj.length;){var a=xj;xj=[];for(var b=0;b<a.length;b++){var c=a[b];try{c.b.call(c.scope)}catch(d){tj(d)}}}vj=!1}function yj(a,b){this.b=a;this.scope=b};function zj(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0}function Aj(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};function Bj(a,b){this.g=0;this.o=void 0;this.b=this.i=null;this.j=this.k=!1;try{var c=this;a.call(b,function(a){Cj(c,2,a)},function(a){Cj(c,3,a)})}catch(d){Cj(this,3,d)}}Bj.prototype.then=function(a,b,c){return Dj(this,u(a)?a:null,u(b)?b:null,c)};zj(Bj);Bj.prototype.cancel=function(a){0==this.g&&uj(function(){var b=new Ej(a);Fj(this,b)},this)};
function Fj(a,b){if(0==a.g)if(a.i){var c=a.i;if(c.b){for(var d=0,e=-1,f=0,h;h=c.b[f];f++)if(h=h.rb)if(d++,h==a&&(e=f),0<=e&&1<d)break;0<=e&&(0==c.g&&1==d?Fj(c,b):(d=c.b.splice(e,1)[0],Gj(c,d,3,b)))}}else Cj(a,3,b)}function Hj(a,b){a.b&&a.b.length||2!=a.g&&3!=a.g||Ij(a);a.b||(a.b=[]);a.b.push(b)}
function Dj(a,b,c,d){var e={rb:null,yc:null,zc:null};e.rb=new Bj(function(a,h){e.yc=b?function(c){try{var e=b.call(d,c);a(e)}catch(m){h(m)}}:a;e.zc=c?function(b){try{var e=c.call(d,b);!r(e)&&b instanceof Ej?h(b):a(e)}catch(m){h(m)}}:h});e.rb.i=a;Hj(a,e);return e.rb}Bj.prototype.p=function(a){this.g=0;Cj(this,2,a)};Bj.prototype.q=function(a){this.g=0;Cj(this,3,a)};
function Cj(a,b,c){if(0==a.g){if(a==c)b=3,c=new TypeError("Promise cannot resolve to itself");else{if(Aj(c)){a.g=1;c.then(a.p,a.q,a);return}if(ga(c))try{var d=c.then;if(u(d)){Jj(a,c,d);return}}catch(e){b=3,c=e}}a.o=c;a.g=b;Ij(a);3!=b||c instanceof Ej||Kj(a,c)}}function Jj(a,b,c){function d(b){f||(f=!0,a.q(b))}function e(b){f||(f=!0,a.p(b))}a.g=1;var f=!1;try{c.call(b,e,d)}catch(h){d(h)}}function Ij(a){a.k||(a.k=!0,uj(a.t,a))}
Bj.prototype.t=function(){for(;this.b&&this.b.length;){var a=this.b;this.b=[];for(var b=0;b<a.length;b++)Gj(this,a[b],this.g,this.o)}this.k=!1};function Gj(a,b,c,d){if(2==c)b.yc(d);else{for(;a&&a.j;a=a.i)a.j=!1;b.zc(d)}}function Kj(a,b){a.j=!0;uj(function(){a.j&&Lj.call(null,b)})}var Lj=tj;function Ej(a){ma.call(this,a)}A(Ej,ma);Ej.prototype.name="cancel";/*
 Portions of this code are from MochiKit, received by
 The Closure Authors under the MIT license. All other code is Copyright
 2005-2009 The Closure Authors. All Rights Reserved.
*/
function Mj(a,b){this.k=[];this.J=a;this.G=b||null;this.j=this.b=!1;this.i=void 0;this.t=this.O=this.p=!1;this.o=0;this.g=null;this.q=0}Mj.prototype.cancel=function(a){if(this.b)this.i instanceof Mj&&this.i.cancel();else{if(this.g){var b=this.g;delete this.g;a?b.cancel(a):(b.q--,0>=b.q&&b.cancel())}this.J?this.J.call(this.G,this):this.t=!0;this.b||(a=new Nj,Oj(this),Pj(this,!1,a))}};Mj.prototype.P=function(a,b){this.p=!1;Pj(this,a,b)};function Pj(a,b,c){a.b=!0;a.i=c;a.j=!b;Qj(a)}
function Oj(a){if(a.b){if(!a.t)throw new Rj;a.t=!1}}function Sj(a,b,c){a.k.push([b,c,void 0]);a.b&&Qj(a)}Mj.prototype.then=function(a,b,c){var d,e,f=new Bj(function(a,b){d=a;e=b});Sj(this,d,function(a){a instanceof Nj?f.cancel():e(a)});return f.then(a,b,c)};zj(Mj);function Tj(a){return Da(a.k,function(a){return u(a[1])})}
function Qj(a){if(a.o&&a.b&&Tj(a)){var b=a.o,c=Uj[b];c&&(n.clearTimeout(c.lb),delete Uj[b]);a.o=0}a.g&&(a.g.q--,delete a.g);for(var b=a.i,d=c=!1;a.k.length&&!a.p;){var e=a.k.shift(),f=e[0],h=e[1],e=e[2];if(f=a.j?h:f)try{var k=f.call(e||a.G,b);r(k)&&(a.j=a.j&&(k==b||k instanceof Error),a.i=b=k);Aj(b)&&(d=!0,a.p=!0)}catch(l){b=l,a.j=!0,Tj(a)||(c=!0)}}a.i=b;d&&(k=v(a.P,a,!0),d=v(a.P,a,!1),b instanceof Mj?(Sj(b,k,d),b.O=!0):b.then(k,d));c&&(b=new Vj(b),Uj[b.lb]=b,a.o=b.lb)}
function Rj(){ma.call(this)}A(Rj,ma);Rj.prototype.message="Deferred has already fired";Rj.prototype.name="AlreadyCalledError";function Nj(){ma.call(this)}A(Nj,ma);Nj.prototype.message="Deferred was canceled";Nj.prototype.name="CanceledError";function Vj(a){this.lb=n.setTimeout(v(this.g,this),0);this.b=a}Vj.prototype.g=function(){delete Uj[this.lb];throw this.b;};var Uj={};function Wj(){var a={},b=a.document||document,c=document.createElement("SCRIPT"),d={Gc:c,ha:void 0},e=new Mj(Xj,d),f=null,h=null!=a.timeout?a.timeout:5E3;0<h&&(f=window.setTimeout(function(){Yj(c,!0);var a=new Zj(1,"Timeout reached for loading script https://ssl.gstatic.com/cv/js/sender/v1/cast_sender.js");Oj(e);Pj(e,!1,a)},h),d.ha=f);c.onload=c.onreadystatechange=function(){c.readyState&&"loaded"!=c.readyState&&"complete"!=c.readyState||(Yj(c,a.ie||!1,f),Oj(e),Pj(e,!0,null))};c.onerror=function(){Yj(c,
!0,f);var a=new Zj(0,"Error while loading script https://ssl.gstatic.com/cv/js/sender/v1/cast_sender.js");Oj(e);Pj(e,!1,a)};vc(c);ak(b).appendChild(c);return e}function ak(a){var b=a.getElementsByTagName("HEAD");return!b||Ha(b)?a.documentElement:b[0]}function Xj(){if(this&&this.Gc){var a=this.Gc;a&&"SCRIPT"==a.tagName&&Yj(a,!0,this.ha)}}function Yj(a,b,c){null!=c&&n.clearTimeout(c);a.onload=ba;a.onerror=ba;a.onreadystatechange=ba;b&&window.setTimeout(function(){xc(a)},0)}
function Zj(a,b){var c="Jsloader error (code #"+a+")";b&&(c+=": "+b);ma.call(this,c)}A(Zj,ma);function bk(){Hi("CAST2","Loading API script https://ssl.gstatic.com/cv/js/sender/v1/cast_sender.js");ck=Wj();Sj(ck,function(){Hi("CAST2","API script loaded")},function(a){Hi("CAST2","Failed to load cast API: "+a)})}var ck=null;function dk(){this.b=y()}new dk;dk.prototype.set=function(a){this.b=a};dk.prototype.get=function(){return this.b};function ek(a,b){this.g=new qe(a);this.b=b?ne:me}ek.prototype.stringify=function(a){return pe(this.g,a)};ek.prototype.parse=function(a){return this.b(a)};function fk(a){this.g=a;this.b={}}A(fk,jb);var gk=[];g=fk.prototype;g.listen=function(a,b,c,d){s(b)||(b&&(gk[0]=b.toString()),b=gk);for(var e=0;e<b.length;e++){var f=kf(a,b[e],c||this.handleEvent,d||!1,this.g||this);if(!f)break;this.b[f.key]=f}return this};g.Qb=function(a,b,c,d,e){if(s(b))for(var f=0;f<b.length;f++)this.Qb(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.g||this,c=lf(c),d=!!d,b=Ze(a)?ff(a.qa,String(b),c,d,e):a?(a=mf(a))?ff(a,b,c,d,e):null:null,b&&(rf(b),delete this.b[b.key]);return this};
g.removeAll=function(){Xa(this.b,rf);this.b={}};g.B=function(){fk.A.B.call(this);this.removeAll()};g.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function hk(){}hk.prototype.b=null;function ik(a){var b;(b=a.b)||(b={},jk(a)&&(b[0]=!0,b[1]=!0),b=a.b=b);return b};var kk;function lk(){}A(lk,hk);function mk(a){return(a=jk(a))?new ActiveXObject(a):new XMLHttpRequest}function jk(a){if(!a.g&&"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.g=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.g}kk=new lk;function nk(a,b,c,d,e){this.b=a;this.i=c;this.p=d;this.o=e||1;this.ha=45E3;this.j=new fk(this);this.g=new yf;zf(this.g,250)}g=nk.prototype;g.wa=null;g.aa=!1;g.Qa=null;g.Tb=null;g.Wa=null;g.Ka=null;g.oa=null;g.ta=null;g.Ua=null;g.H=null;g.ab=0;g.ba=null;g.vb=null;g.Ba=null;g.Ta=-1;g.fc=!0;g.Ca=!1;g.Lb=0;g.nb=null;var ok={},pk={};g=nk.prototype;g.setTimeout=function(a){this.ha=a};function qk(a,b,c){a.Ka=1;a.oa=yg(b.clone());a.Ua=c;a.k=!0;rk(a,null)}
function sk(a,b,c,d,e){a.Ka=1;a.oa=yg(b.clone());a.Ua=null;a.k=c;e&&(a.fc=!1);rk(a,d)}function rk(a,b){a.Wa=y();tk(a);a.ta=a.oa.clone();wg(a.ta,"t",a.o);a.ab=0;a.H=a.b.Pb(a.b.Va()?b:null);0<a.Lb&&(a.nb=new Bf(v(a.jc,a,a.H),a.Lb));a.j.listen(a.H,"readystatechange",a.gd);var c=a.wa?cb(a.wa):{};a.Ua?(a.vb="POST",c["Content-Type"]="application/x-www-form-urlencoded",a.H.send(a.ta,a.vb,a.Ua,c)):(a.vb="GET",a.fc&&!fc&&(c.Connection="close"),a.H.send(a.ta,a.vb,null,c));a.b.$(1)}
g.gd=function(a){a=a.target;var b=this.nb;b&&3==uk(a)?b.La?b.Gb=!0:Cf(b):this.jc(a)};
g.jc=function(a){try{if(a==this.H)t:{var b=uk(this.H),c=this.H.j,d=vk(this.H);if(P&&!mc(10)||fc&&!Q("420+")){if(4>b)break t}else if(3>b||3==b&&!dc&&!wk(this.H))break t;this.Ca||4!=b||7==c||(8==c||0>=d?this.b.$(3):this.b.$(2));xk(this);var e=vk(this.H);this.Ta=e;var f=wk(this.H);(this.aa=200==e)?(4==b&&yk(this),this.k?(zk(this,b,f),dc&&this.aa&&3==b&&(this.j.listen(this.g,"tick",this.cd),this.g.start())):Dk(this,f),this.aa&&!this.Ca&&(4==b?this.b.ob(this):(this.aa=!1,tk(this)))):(this.Ba=400==e&&0<
f.indexOf("Unknown SID")?3:0,X(),yk(this),Ek(this))}}catch(h){this.H&&wk(this.H)}finally{}};function zk(a,b,c){for(var d=!0;!a.Ca&&a.ab<c.length;){var e=Fk(a,c);if(e==pk){4==b&&(a.Ba=4,X(),d=!1);break}else if(e==ok){a.Ba=4;X();d=!1;break}else Dk(a,e)}4==b&&0==c.length&&(a.Ba=1,X(),d=!1);a.aa=a.aa&&d;d||(yk(a),Ek(a))}g.cd=function(){var a=uk(this.H),b=wk(this.H);this.ab<b.length&&(xk(this),zk(this,a,b),this.aa&&4!=a&&tk(this))};
function Fk(a,b){var c=a.ab,d=b.indexOf("\n",c);if(-1==d)return pk;c=Number(b.substring(c,d));if(isNaN(c))return ok;d+=1;if(d+c>b.length)return pk;var e=b.substr(d,c);a.ab=d+c;return e}
function Gk(a,b){a.Wa=y();tk(a);var c=b?window.location.hostname:"";a.ta=a.oa.clone();V(a.ta,"DOMAIN",c);V(a.ta,"t",a.o);try{a.ba=new ActiveXObject("htmlfile")}catch(d){yk(a);a.Ba=7;X();Ek(a);return}var e="<html><body>";b&&(e+='<script>document.domain="'+c+'"\x3c/script>');e+="</body></html>";a.ba.open();a.ba.write(e);a.ba.close();a.ba.parentWindow.m=v(a.ld,a);a.ba.parentWindow.d=v(a.lc,a,!0);a.ba.parentWindow.rpcClose=v(a.lc,a,!1);c=a.ba.createElement("div");a.ba.parentWindow.document.body.appendChild(c);
c.innerHTML='<iframe src="'+a.ta+'"></iframe>';a.b.$(1)}g.ld=function(a){Hk(v(this.ee,this,a),0)};g.ee=function(a){this.Ca||(xk(this),Dk(this,a),tk(this))};g.lc=function(a){Hk(v(this.de,this,a),0)};g.de=function(a){this.Ca||(yk(this),this.aa=a,this.b.ob(this),this.b.$(4))};g.cancel=function(){this.Ca=!0;yk(this)};function tk(a){a.Tb=y()+a.ha;Ik(a,a.ha)}function Ik(a,b){if(null!=a.Qa)throw Error("WatchDog timer not null");a.Qa=Hk(v(a.Xd,a),b)}function xk(a){a.Qa&&(n.clearTimeout(a.Qa),a.Qa=null)}
g.Xd=function(){this.Qa=null;var a=y();0<=a-this.Tb?(2!=this.Ka&&this.b.$(3),yk(this),this.Ba=2,X(),Ek(this)):Ik(this,this.Tb-a)};function Ek(a){a.b.oc()||a.Ca||a.b.ob(a)}function yk(a){xk(a);lb(a.nb);a.nb=null;a.g.stop();a.j.removeAll();if(a.H){var b=a.H;a.H=null;Jk(b);b.dispose()}a.ba&&(a.ba=null)}function Dk(a,b){try{a.b.sc(a,b),a.b.$(4)}catch(c){}};function Kk(a,b,c,d,e){if(0==d)c(!1);else{var f=e||0;d--;Lk(a,b,function(e){e?c(!0):n.setTimeout(function(){Kk(a,b,c,d,f)},f)})}}function Lk(a,b,c){var d=new Image;d.onload=function(){try{Mk(d),c(!0)}catch(a){}};d.onerror=function(){try{Mk(d),c(!1)}catch(a){}};d.onabort=function(){try{Mk(d),c(!1)}catch(a){}};d.ontimeout=function(){try{Mk(d),c(!1)}catch(a){}};n.setTimeout(function(){if(d.ontimeout)d.ontimeout()},b);d.src=a}
function Mk(a){a.onload=null;a.onerror=null;a.onabort=null;a.ontimeout=null};function Nk(a){this.b=a;this.g=new ek(null,!0)}g=Nk.prototype;g.Kb=null;g.Q=null;g.ub=!1;g.ec=null;g.tb=null;g.Nb=null;g.Sb=null;g.W=null;g.la=-1;g.Za=null;g.$a=null;g.connect=function(a){this.Sb=a;a=Ok(this.b,null,this.Sb);X();this.ec=y();var b=this.b.q;null!=b?(this.Za=b[0],(this.$a=b[1])?(this.W=1,Pk(this)):(this.W=2,Qk(this))):(wg(a,"MODE","init"),this.Q=new nk(this,0,void 0,void 0,void 0),this.Q.wa=this.Kb,sk(this.Q,a,!1,null,!0),this.W=0)};
function Pk(a){var b=Ok(a.b,a.$a,"/mail/images/cleardot.gif");yg(b);Kk(b.toString(),5E3,v(a.qd,a),3,2E3);a.$(1)}g.qd=function(a){if(a)this.W=2,Qk(this);else{X();var b=this.b;b.Z=b.pa.la;Rk(b,9)}a&&this.$(2)};
function Qk(a){var b=a.b.t;if(null!=b)X(),b?(X(),Sk(a.b,a,!1)):(X(),Sk(a.b,a,!0));else if(a.Q=new nk(a,0,void 0,void 0,void 0),a.Q.wa=a.Kb,b=a.b,b=Ok(b,b.Va()?a.Za:null,a.Sb),X(),!P||mc(10))wg(b,"TYPE","xmlhttp"),sk(a.Q,b,!1,a.Za,!1);else{wg(b,"TYPE","html");var c=a.Q;a=Boolean(a.Za);c.Ka=3;c.oa=yg(b.clone());Gk(c,a)}}g.Pb=function(a){return this.b.Pb(a)};g.oc=function(){return!1};
g.sc=function(a,b){this.la=a.Ta;if(0==this.W)if(b){try{var c=this.g.parse(b)}catch(d){c=this.b;c.Z=this.la;Rk(c,2);return}this.Za=c[0];this.$a=c[1]}else c=this.b,c.Z=this.la,Rk(c,2);else if(2==this.W)if(this.ub)X(),this.Nb=y();else if("11111"==b){if(X(),this.ub=!0,this.tb=y(),c=this.tb-this.ec,!P||mc(10)||500>c)this.la=200,this.Q.cancel(),X(),Sk(this.b,this,!0)}else X(),this.tb=this.Nb=y(),this.ub=!1};
g.ob=function(){this.la=this.Q.Ta;if(this.Q.aa)0==this.W?this.$a?(this.W=1,Pk(this)):(this.W=2,Qk(this)):2==this.W&&(a=!1,(a=!P||mc(10)?this.ub:200>this.Nb-this.tb?!1:!0)?(X(),Sk(this.b,this,!0)):(X(),Sk(this.b,this,!1)));else{0==this.W?X():2==this.W&&X();var a=this.b;a.Z=this.la;Rk(a,2)}};g.Va=function(){return this.b.Va()};g.$=function(a){this.b.$(a)};function Tk(a){vf.call(this);this.headers=new ie;this.G=a||null;this.g=!1;this.t=this.b=null;this.X="";this.j=0;this.k="";this.i=this.O=this.o=this.J=!1;this.q=0;this.p=null;this.ea="";this.Y=this.ya=!1}A(Tk,vf);var Uk=/^https?$/i,Vk=["POST","PUT"];g=Tk.prototype;
g.send=function(a,b,c,d){if(this.b)throw Error("[goog.net.XhrIo] Object is active with another request="+this.X+"; newUri="+a);b=b?b.toUpperCase():"GET";this.X=a;this.k="";this.j=0;this.J=!1;this.g=!0;this.b=this.G?mk(this.G):mk(kk);this.t=this.G?ik(this.G):ik(kk);this.b.onreadystatechange=v(this.bc,this);try{this.O=!0,this.b.open(b,String(a),!0),this.O=!1}catch(e){Wk(this,e);return}a=c||"";var f=this.headers.clone();d&&ig(d,function(a,b){f.set(b,a)});d=Fa(f.ga(),Xk);c=n.FormData&&a instanceof n.FormData;
!F(Vk,b)||d||c||f.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");f.forEach(function(a,b){this.b.setRequestHeader(b,a)},this);this.ea&&(this.b.responseType=this.ea);"withCredentials"in this.b&&(this.b.withCredentials=this.ya);try{Yk(this),0<this.q&&((this.Y=Zk(this.b))?(this.b.timeout=this.q,this.b.ontimeout=v(this.ha,this)):this.p=Af(this.ha,this.q,this)),this.o=!0,this.b.send(a),this.o=!1}catch(h){Wk(this,h)}};function Zk(a){return P&&Q(9)&&fa(a.timeout)&&r(a.ontimeout)}
function Xk(a){return"content-type"==a.toLowerCase()}g.ha=function(){"undefined"!=typeof aa&&this.b&&(this.k="Timed out after "+this.q+"ms, aborting",this.j=8,wf(this,"timeout"),Jk(this,8))};function Wk(a,b){a.g=!1;a.b&&(a.i=!0,a.b.abort(),a.i=!1);a.k=b;a.j=5;$k(a);al(a)}function $k(a){a.J||(a.J=!0,wf(a,"complete"),wf(a,"error"))}function Jk(a,b){a.b&&a.g&&(a.g=!1,a.i=!0,a.b.abort(),a.i=!1,a.j=b||7,wf(a,"complete"),wf(a,"abort"),al(a))}
g.B=function(){this.b&&(this.g&&(this.g=!1,this.i=!0,this.b.abort(),this.i=!1),al(this,!0));Tk.A.B.call(this)};g.bc=function(){this.C()||(this.O||this.o||this.i?bl(this):this.Id())};g.Id=function(){bl(this)};
function bl(a){if(a.g&&"undefined"!=typeof aa&&(!a.t[1]||4!=uk(a)||2!=vk(a)))if(a.o&&4==uk(a))Af(a.bc,0,a);else if(wf(a,"readystatechange"),4==uk(a)){a.g=!1;try{var b=vk(a),c,d;t:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:d=!0;break t;default:d=!1}if(!(c=d)){var e;if(e=0===b){var f=Qc(String(a.X))[1]||null;if(!f&&self.location)var h=self.location.protocol,f=h.substr(0,h.length-1);e=!Uk.test(f?f.toLowerCase():"")}c=e}if(c)wf(a,"complete"),wf(a,"success");else{a.j=6;var k;
try{k=2<uk(a)?a.b.statusText:""}catch(l){k=""}a.k=k+" ["+vk(a)+"]";$k(a)}}finally{al(a)}}}function al(a,b){if(a.b){Yk(a);var c=a.b,d=a.t[0]?ba:null;a.b=null;a.t=null;b||wf(a,"ready");try{c.onreadystatechange=d}catch(e){}}}function Yk(a){a.b&&a.Y&&(a.b.ontimeout=null);fa(a.p)&&(n.clearTimeout(a.p),a.p=null)}function uk(a){return a.b?a.b.readyState:0}function vk(a){try{return 2<uk(a)?a.b.status:-1}catch(b){return-1}}function wk(a){try{return a.b?a.b.responseText:""}catch(b){return""}};function cl(a,b,c){this.p=a||null;this.b=1;this.g=[];this.j=[];this.k=new ek(null,!0);this.q=b||null;this.t=null!=c?c:null}function dl(a,b){this.b=a;this.map=b;this.Na=null}g=cl.prototype;g.fb=null;g.N=null;g.F=null;g.Jb=null;g.mb=null;g.cc=null;g.pb=null;g.Ya=0;g.kd=0;g.K=null;g.ua=null;g.ja=null;g.Ea=null;g.pa=null;g.kb=null;g.Ha=-1;g.ic=-1;g.Z=-1;g.Xa=0;g.Ma=0;g.za=8;var el=new vf;function fl(a){Te.call(this,"statevent",a)}A(fl,Te);function gl(a){Te.call(this,"timingevent",a)}A(gl,Te);
function hl(a){Te.call(this,"serverreachability",a)}A(hl,Te);g=cl.prototype;g.connect=function(a,b,c,d,e){X();this.Jb=b;this.fb=c||{};d&&r(e)&&(this.fb.OSID=d,this.fb.OAID=e);this.pa=new Nk(this);this.pa.Kb=null;this.pa.g=this.k;this.pa.connect(a)};g.disconnect=function(){il(this);if(3==this.b){var a=this.Ya++,b=this.mb.clone();V(b,"SID",this.i);V(b,"RID",a);V(b,"TYPE","terminate");jl(this,b);a=new nk(this,0,this.i,a,void 0);a.Ka=2;a.oa=yg(b.clone());(new Image).src=a.oa;a.Wa=y();tk(a)}kl(this)};
function il(a){if(a.pa){var b=a.pa;b.Q&&(b.Q.cancel(),b.Q=null);b.la=-1;a.pa=null}a.F&&(a.F.cancel(),a.F=null);a.ja&&(n.clearTimeout(a.ja),a.ja=null);ll(a);a.N&&(a.N.cancel(),a.N=null);a.ua&&(n.clearTimeout(a.ua),a.ua=null)}function ml(a,b){if(0==a.b)throw Error("Invalid operation: sending map when state is closed");a.g.push(new dl(a.kd++,b));2!=a.b&&3!=a.b||nl(a)}g.oc=function(){return 0==this.b};function nl(a){a.N||a.ua||(a.ua=Hk(v(a.kc,a),0),a.Xa=0)}g.kc=function(a){this.ua=null;ol(this,a)};
function ol(a,b){if(1==a.b){if(!b){a.Ya=Math.floor(1E5*Math.random());var c=a.Ya++,d=new nk(a,0,"",c,void 0);d.wa=null;var e=pl(a),f=a.mb.clone();V(f,"RID",c);a.p&&V(f,"CVER",a.p);jl(a,f);qk(d,f,e);a.N=d;a.b=2}}else 3==a.b&&(b?ql(a,b):0!=a.g.length&&(a.N||ql(a)))}
function ql(a,b){var c,d;b?6<a.za?(a.g=a.j.concat(a.g),a.j.length=0,c=a.Ya-1,d=pl(a)):(c=b.p,d=b.Ua):(c=a.Ya++,d=pl(a));var e=a.mb.clone();V(e,"SID",a.i);V(e,"RID",c);V(e,"AID",a.Ha);jl(a,e);c=new nk(a,0,a.i,c,a.Xa+1);c.wa=null;c.setTimeout(Math.round(1E4)+Math.round(1E4*Math.random()));a.N=c;qk(c,e,d)}function jl(a,b){if(a.K){var c=a.K.Fc(a);c&&Xa(c,function(a,c){V(b,c,a)})}}
function pl(a){var b=Math.min(a.g.length,1E3),c=["count="+b],d;6<a.za&&0<b?(d=a.g[0].b,c.push("ofs="+d)):d=0;for(var e=0;e<b;e++){var f=a.g[e].b,h=a.g[e].map,f=6>=a.za?e:f-d;try{ig(h,function(a,b){c.push("req"+f+"_"+b+"="+encodeURIComponent(a))})}catch(k){c.push("req"+f+"_type="+encodeURIComponent("_badmap"))}}a.j=a.j.concat(a.g.splice(0,b));return c.join("&")}function rl(a){a.F||a.ja||(a.o=1,a.ja=Hk(v(a.Bc,a),0),a.Ma=0)}
function sl(a){if(a.F||a.ja||3<=a.Ma)return!1;a.o++;a.ja=Hk(v(a.Bc,a),tl(a,a.Ma));a.Ma++;return!0}g.Bc=function(){this.ja=null;this.F=new nk(this,0,this.i,"rpc",this.o);this.F.wa=null;this.F.Lb=0;var a=this.cc.clone();V(a,"RID","rpc");V(a,"SID",this.i);V(a,"CI",this.kb?"0":"1");V(a,"AID",this.Ha);jl(this,a);if(!P||mc(10))V(a,"TYPE","xmlhttp"),sk(this.F,a,!0,this.pb,!1);else{V(a,"TYPE","html");var b=this.F,c=Boolean(this.pb);b.Ka=3;b.oa=yg(a.clone());Gk(b,c)}};
function Sk(a,b,c){a.kb=c;a.Z=b.la;a.Jd(1,0);a.mb=Ok(a,null,a.Jb);nl(a)}
g.sc=function(a,b){if(0!=this.b&&(this.F==a||this.N==a))if(this.Z=a.Ta,this.N==a&&3==this.b)if(7<this.za){var c;try{c=this.k.parse(b)}catch(d){c=null}if(s(c)&&3==c.length)if(0==c[0])t:{if(!this.ja){if(this.F)if(this.F.Wa+3E3<this.N.Wa)ll(this),this.F.cancel(),this.F=null;else break t;sl(this);X()}}else this.ic=c[1],0<this.ic-this.Ha&&37500>c[2]&&this.kb&&0==this.Ma&&!this.Ea&&(this.Ea=Hk(v(this.fd,this),6E3));else Rk(this,11)}else"y2f%"!=b&&Rk(this,11);else if(this.F==a&&ll(this),!/^[\s\xa0]*$/.test(b)){c=
this.k.parse(b);s(c);for(var e=0;e<c.length;e++){var f=c[e];this.Ha=f[0];f=f[1];2==this.b?"c"==f[0]?(this.i=f[1],this.pb=f[2],f=f[3],null!=f?this.za=f:this.za=6,this.b=3,this.K&&this.K.hc(this),this.cc=Ok(this,this.Va()?this.pb:null,this.Jb),rl(this)):"stop"==f[0]&&Rk(this,7):3==this.b&&("stop"==f[0]?Rk(this,7):"noop"!=f[0]&&this.K&&this.K.gc(this,f),this.Ma=0)}}};g.fd=function(){null!=this.Ea&&(this.Ea=null,this.F.cancel(),this.F=null,sl(this),X())};
function ll(a){null!=a.Ea&&(n.clearTimeout(a.Ea),a.Ea=null)}
g.ob=function(a){var b;if(this.F==a)ll(this),this.F=null,b=2;else if(this.N==a)this.N=null,b=1;else return;this.Z=a.Ta;if(0!=this.b)if(a.aa)1==b?(y(),wf(el,new gl(el)),nl(this),this.j.length=0):rl(this);else{var c=a.Ba,d;if(!(d=3==c||7==c||0==c&&0<this.Z)){if(d=1==b)this.N||this.ua||1==this.b||2<=this.Xa?d=!1:(this.ua=Hk(v(this.kc,this,a),tl(this,this.Xa)),this.Xa++,d=!0);d=!(d||2==b&&sl(this))}if(d)switch(c){case 1:Rk(this,5);break;case 4:Rk(this,10);break;case 3:Rk(this,6);break;case 7:Rk(this,
12);break;default:Rk(this,2)}}};function tl(a,b){var c=5E3+Math.floor(1E4*Math.random());a.K||(c*=2);return c*b}g.Jd=function(a){if(!F(arguments,this.b))throw Error("Unexpected channel state: "+this.b);};function Rk(a,b){if(2==b||9==b){var c=null;a.K&&(c=null);var d=v(a.Rd,a);c||(c=new jg("//www.google.com/images/cleardot.gif"),yg(c));Lk(c.toString(),1E4,d)}else X();ul(a,b)}g.Rd=function(a){a?X():(X(),ul(this,8))};function ul(a,b){a.b=0;a.K&&a.K.nc(a,b);kl(a);il(a)}
function kl(a){a.b=0;a.Z=-1;if(a.K)if(0==a.j.length&&0==a.g.length)a.K.Mb(a);else{var b=Pa(a.j),c=Pa(a.g);a.j.length=0;a.g.length=0;a.K.Mb(a,b,c)}}function Ok(a,b,c){var d=zg(c);if(""!=d.Oa)b&&lg(d,b+"."+d.Oa),mg(d,d.bb);else var e=window.location,d=Ag(e.protocol,b?b+"."+e.hostname:e.hostname,e.port,c);a.fb&&Xa(a.fb,function(a,b){V(d,b,a)});V(d,"VER",a.za);jl(a,d);return d}g.Pb=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new Tk;a.ya=!1;return a};
function Hk(a,b){if(!u(a))throw Error("Fn must not be null and must be a function");return n.setTimeout(function(){a()},b)}g.$=function(){wf(el,new hl(el))};function X(){wf(el,new fl(el))}g.Va=function(){return!(!P||mc(10))};function vl(){}g=vl.prototype;g.hc=function(){};g.gc=function(){};g.nc=function(){};g.Mb=function(){};g.Fc=function(){return{}};function wl(a,b){yf.call(this);if(u(a))b&&(a=v(a,b));else if(a&&u(a.handleEvent))a=v(a.handleEvent,a);else throw Error("Invalid listener argument");this.p=a;kf(this,"tick",v(this.o,this));this.stop();zf(this,5E3+2E4*Math.random())}A(wl,yf);wl.prototype.k=0;wl.prototype.o=function(){if(500<this.b){var a=this.b;24E4>2*a&&(a*=2);zf(this,a)}this.p()};wl.prototype.start=function(){wl.A.start.call(this);this.k=y()+this.b};wl.prototype.stop=function(){this.k=0;wl.A.stop.call(this)};function xl(a,b){this.G=a;this.j=b;this.i=new H;this.g=new wl(this.Xc,this);this.b=null;this.P=!1;this.o=null;this.t="";this.q=this.k=0;this.p=[]}A(xl,vl);g=xl.prototype;g.I=function(a,b,c){return this.i.I(a,b,c)};g.ma=function(a,b,c){return this.i.ma(a,b,c)};g.ka=function(a){return this.i.ka(a)};g.u=function(a,b){return this.i.u.apply(this.i,arguments)};g.dispose=function(){this.P||(this.P=!0,this.i.clear(),this.disconnect(),lb(this.i))};g.C=function(){return this.P};
g.connect=function(a,b,c){if(!this.b||2!=this.b.b){this.t="";this.g.stop();this.o=a||null;this.k=b||0;a=this.G+"/test";b=this.G+"/bind";var d=new cl("1",c?c.firstTestResults:null,c?c.secondTestResults:null),e=this.b;e&&(e.K=null);d.K=this;this.b=d;e?this.b.connect(a,b,this.j,e.i,e.Ha):c?this.b.connect(a,b,this.j,c.sessionId,c.arrayId):this.b.connect(a,b,this.j)}};g.disconnect=function(a){this.q=a||0;this.g.stop();this.b&&(3==this.b.b&&ol(this.b),this.b.disconnect());this.q=0};
g.sendMessage=function(a,b){var c={_sc:a};b&&fb(c,b);this.g.ia||2==(this.b?this.b.b:0)?this.p.push(c):yl(this)&&ml(this.b,c)};g.hc=function(){var a=this.g;a.stop();zf(a,5E3+2E4*Math.random());this.o=null;this.k=0;if(this.p.length){a=this.p;this.p=[];for(var b=0,c=a.length;b<c;++b)ml(this.b,a[b])}this.u("handlerOpened")};g.nc=function(a,b){var c=2==b&&401==this.b.Z;if(4!=b&&!c){if(6==b||410==this.b.Z)c=this.g,c.stop(),zf(c,500);this.g.start()}this.u("handlerError",b)};
g.Mb=function(a,b,c){if(!this.g.ia)this.u("handlerClosed");else if(c)for(a=0,b=c.length;a<b;++a)this.p.push(c[a].map)};g.Fc=function(){var a={v:2};this.t&&(a.gsessionid=this.t);0!=this.k&&(a.ui=""+this.k);0!=this.q&&(a.ui=""+this.q);this.o&&fb(a,this.o);return a};g.gc=function(a,b){if("S"==b[0])this.t=b[1];else if("gracefulReconnect"==b[0]){var c=this.g;c.stop();zf(c,500);this.g.start();this.b.disconnect()}else this.u("handlerMessage",new pj(b[0],b[1]))};function yl(a){return!!a.b&&3==a.b.b}
g.getDeviceId=function(){return this.j.id};g.Xc=function(){this.g.stop();var a=this.b,b=0;a.F&&b++;a.N&&b++;0!=b?this.g.start():this.connect(this.o,this.k)};function zl(a){Al(this,a)}function Bl(a){a.p=-1;a.o=!1;a.k=null;a.g=-1;a.i=null;a.j=0;a.q=y()}function Al(a,b){a.b=[];a.index=-1;Bl(a);b&&(a.b=b.videoIds,a.index=b.index,a.g=b.playerState,a.i=b.errorReason,a.p=b.volume,a.o=b.muted,a.k=b.trackData,a.j=b.playerTime,a.q=b.playerTimeAt)}function Cl(a){return a.b[a.index]}function Dl(a){switch(a.g){case 1:return(y()-a.q)/1E3+a.j;case -1E3:return 0}return a.j}function El(a,b){var c=a.index;a.index=Ba(a.b,b);c!=a.index&&Bl(a)}
function Fl(a,b,c){c=c||Cl(a);Va(a.b,b)&&c==Cl(a)||(a.b=Pa(b),El(a,c))}zl.prototype.add=function(a){return a&&!F(this.b,a)?(this.b.push(a),!0):!1};zl.prototype.remove=function(a){var b=Cl(this);return Ma(this.b,a)?(this.index=Ba(this.b,b),!0):!1};function Gl(a){var b={};b.videoIds=Pa(a.b);b.index=a.index;b.playerState=a.g;b.errorReason=a.i;b.volume=a.p;b.muted=a.o;b.trackData=db(a.k);b.playerTime=a.j;b.playerTimeAt=a.q;return b}zl.prototype.clone=function(){return new zl(Gl(this))};function Y(a,b){Uh.call(this);this.q=[];this.q.push(S(window,"beforeunload",v(this.Yc,this)));this.i=[];this.b=new zl;this.G=a.L;this.g=new xl("/api/lounge/bc",b);this.g.I("handlerOpened",this.bd,this);this.g.I("handlerClosed",this.Zc,this);this.g.I("handlerError",this.$c,this);this.g.I("handlerMessage",this.ad,this);var c=this.g,d=a.U;(c.j.loungeIdToken=d)||c.g.stop()}A(Y,Uh);g=Y.prototype;g.Aa=NaN;g.Wb=NaN;
g.connect=function(a,b){if(b){var c=b.videoIds[b.index],d=b.currentTime||0;5>=d&&(d=0);var e={videoIds:c,videoId:c,currentTime:d};this.b.b=[c];this.b.index=0;this.b.state=3;c=this.b;c.j=d;c.q=y();this.log_("Connecting with setPlaylist and params: "+oe(e));this.g.connect({method:"setPlaylist",params:oe(e)},a,Ri())}else this.log_("Connecting without params"),this.g.connect({},a,Ri());Hl(this)};g.dispose=function(){this.C()||Il(this,3);Y.A.dispose.call(this)};
g.B=function(){Jl(this);Kl(this);Nc(this.q);this.q.length=0;this.g.dispose();Y.A.B.call(this);this.i=this.b=this.g=null};g.log_=function(a){Hi("conn",a)};g.Yc=function(){this.o(2)};function Il(a,b){a.u("proxyStateChange",b)}function Hl(a){a.Aa=J(v(function(){this.log_("Connecting timeout");this.o(1)},a),1E4)}function Jl(a){wb(a.Aa);a.Aa=NaN}function Ll(a){Kl(a);a.Wb=J(v(function(){this.p("getNowPlaying")},a),2E4)}function Kl(a){wb(a.Wb);a.Wb=NaN}
g.bd=function(){this.log_("Channel opened");var a=this.g,b=this.G;Xg("yt-remote-session-browser-channel",{firstTestResults:[""],secondTestResults:!a.b.kb,sessionId:a.b.i,arrayId:a.b.Ha});Xg("yt-remote-session-screen-id",b);a=Li();b=Mi();F(a,b)||a.push(b);Pi(a);Ki()};g.Zc=function(){this.log_("Channel closed");isNaN(this.Aa)?Xi(!0):Xi();this.dispose()};
g.$c=function(a){Xi();isNaN(this.k())?(this.log_("Channel error: "+a+" without reconnection"),this.dispose()):(this.log_("Channel error: "+a+" with reconnection in "+this.k()+" ms"),Il(this,2))};
g.ad=function(a){a.params?this.log_("Received: action="+a.action+", params="+oe(a.params)):this.log_("Received: action="+a.action);Ml(this,a);Nl(this,a);if(yl(this.g)&&isNaN(this.Aa)){var b=this.b.clone(),c=!1,d,e,f,h,k,l,m;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,r(a.params.currentError)&&(m=me(a.params.currentError)));if("onSubtitlesTrackChanged"==a.action)d==
Cl(this.b)&&(delete a.params.videoId,bb(a.params)?this.b.k=null:this.b.k=a.params,this.u("remotePlayerChange"));else if(Cl(this.b)||"onStateChange"!=a.action)"playlistModified"!=a.action&&"nowPlayingPlaylist"!=a.action||e?(d||"nowPlaying"!=a.action&&"nowPlayingPlaylist"!=a.action?d||(d=Cl(this.b)):El(this.b,""),e&&(e=e.split(","),Fl(this.b,e,d))):Fl(this.b,[]),this.b.add(d)&&this.p("getPlaylist"),d&&El(this.b,d),b.index==this.b.index&&Va(b.b,this.b.b)||this.u("remoteQueueChange"),r(f)&&(b=parseInt(f,
10),b=isNaN(b)?-1:b,-1==b&&-1E3==this.b.g&&(b=-1E3),0==b&&"0"==h&&(b=-1),c=c||b!=this.b.g,this.b.g=b,d=null,-1E3==b&&(d=this.b.i||"unknown",m&&(d=m.reason||d)),c=c||this.b.i!=d,this.b.i=d,1==this.b.g?Ll(this):Kl(this)),"onError"!=a.action||-1!=this.b.g&&-1E3!=this.b.g||(a=me(a.params.errors)||[],1==a.length&&"PLAYER_ERROR"==a[0].error&&a[0].videoId==Cl(this.b)&&(this.b.g=-1E3,this.b.i=a[0].reason||"unknown",c=!0)),h&&(b=parseInt(h,10),c=this.b,c.j=isNaN(b)?0:b,c.q=y(),c=!0),r(k)&&(b=parseInt(k,10),
isNaN(b)||(c=c||this.b.p!=b,this.b.p=b),r(l)&&(l="true"==l,c=c||this.b.o!=l,this.b.o=l)),c&&this.u("remotePlayerChange")}};
function Ml(a,b){switch(b.action){case "loungeStatus":var c=me(b.params.devices);a.i=E(c,function(a){return new oj(a)});break;case "loungeScreenDisconnected":Na(a.i,function(a){return"LOUNGE_SCREEN"==a.type});break;case "remoteConnected":var d=new oj(me(b.params.device));Fa(a.i,function(a){return a.equals(d)})||La(a.i,d);break;case "remoteDisconnected":d=new oj(me(b.params.device)),Na(a.i,function(a){return a.equals(d)})}}
function Nl(a,b){var c=!1;if("loungeStatus"==b.action)c=!!Fa(a.i,function(a){return"LOUNGE_SCREEN"==a.type});else if("loungeScreenConnected"==b.action)c=!0;else if("loungeScreenDisconnected"==b.action)c=!1;else return;c==(yl(a.g)&&isNaN(a.Aa))?c&&Il(a,1):c?(Jl(a),a.t()&&Al(a.b),Il(a,1),a.p("getNowPlaying")):a.o(1)}Y.prototype.subscribe=Y.prototype.I;Y.prototype.unsubscribeByKey=Y.prototype.ka;Y.prototype.X=function(){var a=3;this.C()||(a=0,isNaN(this.k())?yl(this.g)&&isNaN(this.Aa)&&(a=1):a=2);return a};
Y.prototype.getProxyState=Y.prototype.X;Y.prototype.o=function(a){this.log_("Disconnecting with "+a);1==a&&Xi();this.g.disconnect(a);this.dispose()};Y.prototype.disconnect=Y.prototype.o;Y.prototype.O=function(){return Gl(this.b)};Y.prototype.getPlayerContextData=Y.prototype.O;
Y.prototype.Y=function(a){var b=new zl(a),c=[];this.b.index==b.index&&Va(this.b.b,b.b)||c.push("remoteQueueChange");this.b.g==b.g&&this.b.p==b.p&&this.b.o==b.o&&Dl(this.b)==Dl(b)&&oe(this.b.k)==oe(b.k)||c.push("remotePlayerChange");Al(this.b,a);D(c,function(a){this.u(a)},this)};Y.prototype.setPlayerContextData=Y.prototype.Y;Y.prototype.J=function(){return this.g.j.loungeIdToken};Y.prototype.getLoungeToken=Y.prototype.J;
Y.prototype.t=function(){var a=this.g.getDeviceId(),b=Fa(this.i,function(b){return"REMOTE_CONTROL"==b.type&&b.id!=a});return b?b.id:""};Y.prototype.getOtherConnectedRemoteId=Y.prototype.t;Y.prototype.k=function(){var a=this.g;return a.g.ia?a.g.k-y():NaN};Y.prototype.getReconnectTimeout=Y.prototype.k;Y.prototype.ea=function(){if(!isNaN(this.k())){var a=this.g.g;a.ia&&(a.stop(),a.start(),a.o())}};Y.prototype.reconnect=Y.prototype.ea;
Y.prototype.p=function(a,b){b?this.log_("Sending: action="+a+", params="+oe(b)):this.log_("Sending: action="+a);this.g.sendMessage(a,b)};Y.prototype.sendMessage=Y.prototype.p;function Ol(){Uh.call(this);this.ca=ui(Ti());this.log_("Initializing local screens: "+li(this.ca));this.ra=Pl();this.log_("Initializing account screens: "+li(this.ra));this.Ob=null;this.b=[];this.g=[];Ql(this,jj());this.log_("Initializing DIAL devices: "+ii(this.g));var a=ui(Ui());Rl(this,a);this.log_("Initializing online screens: "+li(this.b));Sl(this)}A(Ol,Uh);ca(Ol);var Tl=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g=Ol.prototype;g.gb=NaN;g.Cb="";g.log_=function(a){Hi("RM",a)};
function Ul(a){var b=navigator.userAgent;if(0<=b.search("MSIE")&&(b=b.match(/MSIE ([\d.]+)/)[1],0>ua(b,"10.0")))return a;b=Qc(document.location.href);return Oc("https",b[3],a)}function Pl(){var a=ui(Ti()),b=ui(Ui());return Ca(b,function(b){return!wi(a,b)})}function Sl(a){K("yt-remote-cast-device-list-update",function(){var a=jj();Ql(this,a)},a);K("yt-remote-cast-device-status-update",a.Yd,a);a.Db();vb(v(a.Db,a))}
g.u=function(a,b){if(this.C())return!1;this.log_("Firing "+a);return this.j.u.apply(this.j,arguments)};g.Db=function(){var a=jj();Ha(a)||Ql(this,a);a=Vl(this);Ha(a)||(Da(a,function(a){return!wi(this.ra,a)},this)&&!$g("yt-remote-lounge-token-expiration")?Wl(this):Xl(this,a))};function Yl(a){Rl(a,a.b,!0);Ql(a,jj());a.u("managedScreenChange",Vl(a))}function Zl(a,b){var c=Vl(a);return Ca(b,function(a){return a.T?(a=si(this.g,a.T),!!a&&"RUNNING"==a.status):!!wi(c,a)},a)}
function Ql(a,b){var c=!1;D(b,function(a){var b=xi(this.ca,a.id);b&&b.name!=a.name&&(this.log_("Renaming screen id "+b.id+" from "+b.name+" to "+a.name),b.name=a.name,c=!0)},a);c&&(a.log_("Renaming due to DIAL."),$l(a));Vi(pi(b));var d=!Va(a.g,b,ri);d&&a.log_("Updating DIAL devices: "+ii(a.g)+" to "+ii(b));a.g=b;Rl(a,a.b);d&&a.u("onlineReceiverChange")}
g.Yd=function(a){var b=si(this.g,a.id);b&&(this.log_("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,Vi(pi(this.g)));Rl(this,this.b)};function Rl(a,b,c){var d=Zl(a,b),e=!Va(a.b,d,vi);!e&&!c||Ha(b)||(b=ti(d),Xg("yt-remote-online-screens",b,60));e&&(a.log_("Updating online screens: "+li(a.b)+" -> "+li(d)),a.b=d,a.u("onlineReceiverChange"))}
function Xl(a,b){var c=[],d={};D(b,function(a){a.U&&(d[a.U]=a,c.push(a.U))});var e={method:"POST",na:{lounge_token:c.join(",")},Na:a,onSuccess:function(a,b){var c=[];D(b.screens||[],function(a){"online"==a.status&&c.push(d[a.loungeToken])});var e=this.Ob?am(this,this.Ob):null;e&&!wi(c,e)&&c.push(e);Rl(this,c,!0)}};ze(Ul("/api/lounge/pairing/get_screen_availability"),e)}
function Wl(a){var b=Vl(a),c=E(b,function(a){return a.L});Ha(c)||(a.log_("Updating lounge tokens for: "+oe(c)),ze(Ul("/api/lounge/pairing/get_lounge_token_batch"),{na:{screen_ids:c.join(",")},method:"POST",Na:a,onSuccess:function(a,c){bm(this,c.screens||[]);this.ca=Ca(this.ca,function(a){return!!a.U});$l(this);Xl(this,b)}}))}function bm(a,b){D(Oa(a.ca,a.ra),function(a){var d=Fa(b,function(b){return a.L==b.screenId});d&&(a.U=d.loungeToken)})}
function $l(a){var b=ui(Ti());Va(a.ca,b,vi)||(a.log_("Saving local screens: "+li(b)+" to "+li(a.ca)),Si(ti(a.ca)),Yl(a))}function cm(a,b,c){var d=Ga(b,function(a){return c||a?c&&a?c.L==a.L:!1:!0}),e=0>d?!0:!1;0>d?b.push(c):b[d]=c;wi(a.b,c)||a.b.push(c);return e}
g.uc=function(a,b,c){var d=!1;b>=Tl.length&&(this.log_("Pairing DIAL device "+a+" with "+c+" timed out."),d=!0);var e=si(this.g,a);if(!e)this.log_("Pairing DIAL device "+a+" with "+c+" failed: no device for "+a),d=!0;else if("ERROR"==e.status||"STOPPED"==e.status)this.log_("Pairing DIAL device "+a+" with "+c+" failed: launch error on "+a),d=!0;d?(dm(this),this.u("screenPair",null)):ze(Ul("/api/lounge/pairing/get_screen"),{method:"POST",na:{pairing_code:c},Na:this,onSuccess:function(a,b){if(c==this.Cb){dm(this);
var d=new ji(b.screen);d.name=e.name;d.T=e.id;this.log_("Pairing "+c+" succeeded.");var l=cm(this,this.ca,d);this.log_("Paired with "+(l?"a new":"an old")+" local screen:"+ki(d));$l(this);this.u("screenPair",d)}},onError:function(){c==this.Cb&&(this.log_("Polling pairing code: "+c),wb(this.gb),this.gb=J(v(this.uc,this,a,b+1,c),Tl[b]))}})};
function em(a,b,c){var d=Z,e="";dm(d);if(si(d.g,a)){if(!e){var f=e=mi();cj();var h=lj(a),k=$i();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",hj(h),L("yt-remote-cast-device-status-update",h));
Zi("Sending a cast launch request with params: "+l.parameters);k.launch(l,x(mj,a))}else Zi("No cast API or no cast device. Dropping cast launch.")}d.Cb=e;d.gb=J(v(d.uc,d,a,0,e),Tl[0])}else d.log_("No DIAL device with id: "+a)}function dm(a){wb(a.gb);a.gb=NaN;a.Cb=""}function am(a,b){var c=xi(Vl(a),b);a.log_("Found screen: "+ki(c)+" with key: "+b);return c}function fm(a){var b=Z,c=xi(b.b,a);b.log_("Found online screen: "+ki(c)+" with key: "+a);return c}
function gm(a){var b=Z,c=si(b.g,a);if(!c){var d=xi(b.ca,a);d&&(c=si(b.g,d.T))}b.log_("Found DIAL: "+(c?c.toString():"null")+" with key: "+a);return c}function Vl(a){return Oa(a.ra,Ca(a.ca,function(a){return!wi(this.ra,a)},a))}
function hm(a){var b=Ul("/api/lounge/screens");ze(b,{method:"GET",Na:a,withCredentials:!0,onSuccess:function(a,b){this.ra=E(Ya(b),function(a){return new ji(a)});this.log_("Load account screens successfully.");this.Db();Yl(this);this.u("accountScreenLoad")},onError:function(){Hi("RM","Load account screens failed.")}})};function im(){jm&&(D(jm,function(a){a(null)}),jm.length=0,jm=null,z("yt.mdx.remote.deferredProxies_",null));Z&&(Z.ma("screenPair",km),Z.ma("managedScreenChange",lm),Z=null);mm={};gj()}function nm(){var a=ui(Ui()),b=qi(Wi()),b=Ca(b,function(b){return!xi(a,b.id)});return oi(Oa(a,b))}function om(){var a=pm();return a?am(Z,a):null}function qm(a,b){rm("Connecting to: "+oe(a));sm();tm(b||null);var c=fm(a.key);c?um(c,1):(c=gm(a.key))?vm(c):J(function(){wm(null)},0)}
function sm(){dm(Z);t:{var a=xm();if(a&&(a=a.getOtherConnectedRemoteId())){rm("Do not stop DIAL due to "+a);ym("");break t}(a=zm())?(rm("Stopping DIAL: "+a),nj(a),ym("")):(a=om())&&a.T&&(rm("Stopping DIAL: "+a.T),nj(a.T))}(a=xm())&&a.disconnect(1);wm(null)}function rm(a){Hi("remote",a)}function pm(){return p("yt.mdx.remote.currentScreenId_")}function Am(a){z("yt.mdx.remote.currentScreenId_",a);var b=Z;if((b.Ob=a)&&(a=am(b,a))&&!wi(b.b,a)){var c=Pa(b.b);c.push(a);Rl(b,c,!0)}}
function zm(){return p("yt.mdx.remote.currentDialId_")}function ym(a){z("yt.mdx.remote.currentDialId_",a)}function Bm(){return p("yt.mdx.remote.connectData_")}function tm(a){z("yt.mdx.remote.connectData_",a)}function xm(){return p("yt.mdx.remote.connection_")}function wm(a){var b=xm();tm(null);a?Aa(!xm()):(Am(""),ym(""));z("yt.mdx.remote.connection_",a);D(jm,function(b){b(a)});jm.length=0;b&&!a?L("remote-connection-change",!1):!b&&a&&L("remote-connection-change",!0)}
function Cm(){var a=Ni();return a?am(Z,a):null}function um(a,b){Aa(!pm());Am(a.L);var c=new Y(a,mm);c.connect(b,Bm());kb(c,function(){xm()&&(xm(),wm(null))});wm(c)}function vm(a){zm();rm("Connecting to: "+(a?a.toString():"null"));ym(a.id);var b=Bm();b?em(a.id,b.videoIds[b.index],b.currentTime):em(a.id)}function km(a){rm("Paired with: "+ki(a));a?um(a,1):wm(null)}function lm(){var a=pm();a&&!om()&&(rm("Dropping current screen with id: "+a),sm());Cm()||Xi()}var jm=null,Z=null,mm={};var Dm=null,Em=NaN;function Fm(){Ha(Ui())&&Ha(Wi())||Gm();var a;if(pm()||zm())a=!0;else{a=Ni();var b=ui(Ui());a=!!xi(b,a)}a&&(a=Dm,"html5"!=a.getPlayerType()&&a.loadNewVideoConfig(a.getCurrentVideoConfig(),"html5"))}function Hm(a){if(a=ni(nm(),a)){var b=Dm;if("html5"!=b.getPlayerType()){var c=b.getVideoData().video_id,d=b.getCurrentTime();qm(a,{videoIds:[c],index:0,currentTime:d});b.loadNewVideoConfig(b.getCurrentVideoConfig(),"html5")}}}
function Gm(){var a=Dm;a.updateRemoteReceivers&&a.updateRemoteReceivers(nm())};var Im=null,Jm=[];function Km(a){return{Zb:a.externalChannelId,Lc:a.offersUrl,source:a.source,Ud:a.subscriptionId}}function Lm(a){a=Km(a);Eh()?(L("subscription-subscribe",a.Zb,a.Lc?{itemType:"U",itemId:a.Zb,offersUrl:a.Lc}:null),(a="/gen_204?"+dd({event:"subscribe",source:a.source}))&&Le(a)):Mm(a)}function Mm(a){Dh(function(b){b.subscription_ajax&&(sb("subscription_ajax",b.subscription_ajax),Lm(a))},null,"sub_button")}
function Nm(a){a=Km(a);L("subscription-unsubscribe",a.Zb,a.Ud,null);(a="/gen_204?"+dd({event:"unsubscribe",source:a.source}))&&Le(a)}function Om(a,b){Im&&Im.channelSubscribed(a,b)}function Pm(a){Im&&Im.channelUnsubscribed(a)};function Qm(a){this.i=a;this.i.I("command",this.o,this);this.g={};this.j=!1}A(Qm,jb);Qm.prototype.start=function(){if(!this.j&&!this.C()){this.j=!0;var a=this.i;a.C()||Rm(a.b,a.g,a.i,"RECEIVING",void 0)}};
Qm.prototype.o=function(a,b){if(this.j&&!this.C()){var c=b||{};switch(a){case "addEventListener":if(t(c.event)&&(c=c.event,!(c in this.g))){var d=v(this.p,this,c);this.g[c]=d;this.addEventListener(c,d)}break;case "removeEventListener":t(c.event)&&Sm(this,c.event);break;default:if(this.b.isReady())switch(c=b||{},a){case "loadVideoById":c=di(c);fi(c);this.b.loadVideoById(c);break;case "cueVideoById":c=di(c);fi(c);this.b.cueVideoById(c);break;case "loadVideoByPlayerVars":this.b.loadVideoByPlayerVars&&
(fi(c),this.b.loadVideoByPlayerVars(c));break;case "cueVideoByPlayerVars":this.b.cueVideoByPlayerVars&&(fi(c),this.b.cueVideoByPlayerVars(c));break;case "loadPlaylist":c=ei(c);fi(c);this.b.loadPlaylist(c);break;case "cuePlaylist":c=ei(c);fi(c);this.b.cuePlaylist(c);break;case "playVideo":this.b.playVideo();break;case "pauseVideo":this.b.pauseVideo();break;case "stopVideo":this.b.stopVideo();break;case "seekTo":fa(c.seconds)&&this.b.seekTo(c.seconds,c.allowSeekAhead)}}}};
Qm.prototype.p=function(a,b){if(this.j&&!this.C()){var c=this.i;c.C()||Rm(c.b,c.g,c.i,a,b)}};function Sm(a,b){b in a.g&&(a.removeEventListener(b,a.g[b]),delete a.g[b])}Qm.prototype.B=function(){this.i.ma("command",this.o,this);this.i=null;for(var a in this.g)Sm(this,a);Qm.A.B.call(this)};function Tm(a,b){Qm.call(this,b);this.b=a;this.k=["onReady","onStateChange","onError"];this.start()}A(Tm,Qm);Tm.prototype.addEventListener=function(a,b){F(this.k,a)&&this.b.addEventListener(a,b)};Tm.prototype.removeEventListener=function(a,b){F(this.k,a)&&this.b.removeEventListener(a,b)};Tm.prototype.B=function(){Tm.A.B.call(this);this.b=null};function Um(a,b){this.source=null;this.j=a||null;this.origin="*";this.q=window.document.location.protocol+"//"+window.document.location.hostname;this.o=b;this.i=this.b=this.g=this.k=null;S(window,"message",v(this.p,this))}
Um.prototype.p=function(a){var b=this.o||I("POST_MESSAGE_ORIGIN")||this.q;if("*"==b||a.origin==b)if(!this.j||a.source==this.j)if(this.source=a.source,this.origin="null"==a.origin?this.origin:a.origin,a=a.data,t(a)){try{a=me(a)}catch(c){return}this.k=a.id;switch(a.event){case "listening":this.b&&(this.b(),this.b=null);break;case "command":this.g&&(this.i&&!F(this.i,a.func)||this.g(a.func,a.args))}}};Um.prototype.sendMessage=function(a){this.source&&(a.id=this.k,a=oe(a),this.source.postMessage(a,this.origin))};function Vm(){var a=this.g=new Um,b=v(this.pd,this);a.g=b;a.i=null;this.i=[];this.o=!1;this.j=(a=I("POST_MESSAGE_ORIGIN"))&&Hg(a)?a:null;this.k={}}g=Vm.prototype;g.pd=function(a,b){if(this.j&&this.j!=this.g.origin)this.dispose();else if("addEventListener"==a&&b){var c=b[0];this.k[c]||"onReady"==c||(this.addEventListener(c,Wm(this,c)),this.k[c]=!0)}else this.tc(a,b)};g.tc=function(){};function Wm(a,b){return v(function(a){this.sendMessage(b,a)},a)}g.addEventListener=function(){};
g.jd=function(){this.o=!0;this.sendMessage("initialDelivery",this.Rb());this.sendMessage("onReady");D(this.i,this.Ac,this);this.i=[]};g.Rb=function(){return null};function Xm(a,b){a.sendMessage("infoDelivery",b)}g.Ac=function(a){this.o?this.g.sendMessage(a):this.i.push(a)};g.sendMessage=function(a,b){this.Ac({event:a,info:void 0==b?null:b})};g.dispose=function(){this.g=null};function Ym(a){Vm.call(this);this.b=a;this.b.addEventListener("onReady",v(this.rd,this));this.b.addEventListener("onVideoProgress",v(this.wd,this));this.b.addEventListener("onVolumeChange",v(this.xd,this));this.b.addEventListener("onApiChange",v(this.sd,this));this.b.addEventListener("onPlaybackQualityChange",v(this.td,this));this.b.addEventListener("onPlaybackRateChange",v(this.ud,this));this.b.addEventListener("onStateChange",v(this.vd,this))}A(Ym,Vm);g=Ym.prototype;
g.tc=function(a,b){if(this.b[a]){b=b||[];if(0<b.length&&bi(a)){var c;c=b;if(ga(c[0])&&!s(c[0]))c=c[0];else{var d={};switch(a){case "loadVideoById":case "cueVideoById":d=di.apply(window,c);break;case "loadVideoByUrl":case "cueVideoByUrl":d=ci.apply(window,c);break;case "loadPlaylist":case "cuePlaylist":d=ei.apply(window,c)}c=d}fi(c);b.length=1;b[0]=c}this.b[a].apply(this.b,b);bi(a)&&Xm(this,this.Rb())}};g.rd=function(){var a=v(this.jd,this);this.g.b=a};
g.addEventListener=function(a,b){this.b.addEventListener(a,b)};g.Rb=function(){var a=this.b.getApiInterface();Ma(a,"getVideoData");for(var b={apiInterface:a},c=0,d=a.length;c<d;c++){var e=a[c],f=e;if(0==f.search("get")||0==f.search("is")){var f=e,h=0;0==f.search("get")?h=3:0==f.search("is")&&(h=2);f=f.charAt(h).toLowerCase()+f.substr(h+1);try{var k=this.b[e]();b[f]=k}catch(l){}}}b.videoData=this.b.getVideoData();return b};
g.vd=function(a){a={playerState:a,currentTime:this.b.getCurrentTime(),duration:this.b.getDuration(),videoData:this.b.getVideoData(),videoStartBytes:0,videoBytesTotal:this.b.getVideoBytesTotal(),videoLoadedFraction:this.b.getVideoLoadedFraction(),playbackQuality:this.b.getPlaybackQuality(),availableQualityLevels:this.b.getAvailableQualityLevels(),videoUrl:this.b.getVideoUrl(),playlist:this.b.getPlaylist(),playlistIndex:this.b.getPlaylistIndex()};this.b.getProgressState&&(a.progressState=this.b.getProgressState());
Xm(this,a)};g.td=function(a){Xm(this,{playbackQuality:a})};g.ud=function(a){Xm(this,{playbackRate:a})};g.sd=function(){for(var a=this.b.getOptions(),b={namespaces:a},c=0,d=a.length;c<d;c++){var e=a[c],f=this.b.getOptions(e);b[e]={options:f};for(var h=0,k=f.length;h<k;h++){var l=f[h],m=this.b.getOption(e,l);b[e][l]=m}}this.sendMessage("apiInfoDelivery",b)};g.xd=function(){Xm(this,{muted:this.b.isMuted(),volume:this.b.getVolume()})};
g.wd=function(a){a={currentTime:a,videoBytesLoaded:this.b.getVideoBytesLoaded(),videoLoadedFraction:this.b.getVideoLoadedFraction()};this.b.getProgressState&&(a.progressState=this.b.getProgressState());Xm(this,a)};function Zm(a,b,c){Uh.call(this);this.b=a;this.g=b;this.i=c}A(Zm,Uh);Zm.prototype.B=function(){this.g=this.b=null;Zm.A.B.call(this)};function $m(a,b,c){this.b=a;this.i=c;this.j=S(window,"message",v(this.k,this));this.g=new Zm(this,a,b);kb(this,x(lb,this.g))}A($m,jb);function Rm(a,b,c,d,e){a.C()||b!=a.b||(b={id:c,command:d},e&&(b.data=e),a.b.postMessage(oe(b),a.i))}$m.prototype.k=function(a){if(!this.C()&&a.origin==this.i&&a.source==this.b&&(a=a.data,t(a))){try{a=me(a)}catch(b){return}if(a.command){var c=this.g;c.C()||c.u("command",a.command,a.data)}}};$m.prototype.B=function(){Nc(this.j);this.b=null;$m.A.B.call(this)};var an;
an={k:["BC","AD"],j:["Before Christ","Anno Domini"],p:"JFMAMJJASOND".split(""),X:"JFMAMJJASOND".split(""),o:"January February March April May June July August September October November December".split(" "),O:"January February March April May June July August September October November December".split(" "),P:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),ea:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),hb:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),Ia:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
J:"Sun Mon Tue Wed Thu Fri Sat".split(" "),ya:"Sun Mon Tue Wed Thu Fri Sat".split(" "),q:"SMTWTFS".split(""),Y:"SMTWTFS".split(""),G:["Q1","Q2","Q3","Q4"],t:["1st quarter","2nd quarter","3rd quarter","4th quarter"],b:["AM","PM"],g:["EEEE, MMMM d, y","MMMM d, y","MMM d, y","M/d/yy"],Fb:["h:mm:ss a zzzz","h:mm:ss a z","h:mm:ss a","h:mm a"],i:["{1} 'at' {0}","{1} 'at' {0}","{1}, {0}","{1}, {0}"],ae:6,ib:[5,6],be:5};var bn=/^(\d{4})(?:(?:-?(\d{2})(?:-?(\d{2}))?)|(?:-?(\d{3}))|(?:-?W(\d{2})(?:-?([1-7]))?))?$/,cn=/^(\d{2})(?::?(\d{2})(?::?(\d{2})(\.\d+)?)?)?$/,dn=/Z|(?:([-+])(\d{2})(?::?(\d{2}))?)$/;function en(a,b,c,d,e,f){t(a)?(this.o="y"==a?b:0,this.j="m"==a?b:0,this.b="d"==a?b:0,this.g="h"==a?b:0,this.i="n"==a?b:0,this.k="s"==a?b:0):(this.o=a||0,this.j=b||0,this.b=c||0,this.g=d||0,this.i=e||0,this.k=f||0)}
en.prototype.equals=function(a){return a.o==this.o&&a.j==this.j&&a.b==this.b&&a.g==this.g&&a.i==this.i&&a.k==this.k};en.prototype.clone=function(){return new en(this.o,this.j,this.b,this.g,this.i,this.k)};en.prototype.add=function(a){this.o+=a.o;this.j+=a.j;this.b+=a.b;this.g+=a.g;this.i+=a.i;this.k+=a.k};
function fn(a,b,c){fa(a)?(this.b=gn(a,b||0,c||1),hn(this,c||1)):ga(a)?(this.b=gn(a.getFullYear(),a.getMonth(),a.getDate()),hn(this,a.getDate())):(this.b=new Date(y()),this.b.setHours(0),this.b.setMinutes(0),this.b.setSeconds(0),this.b.setMilliseconds(0))}function gn(a,b,c){b=new Date(a,b,c);0<=a&&100>a&&b.setFullYear(b.getFullYear()-1900);return b}g=fn.prototype;g.zb=an.ae;g.Ab=an.be;g.clone=function(){var a=new fn(this.b);a.zb=this.zb;a.Ab=this.Ab;return a};g.getFullYear=function(){return this.b.getFullYear()};
g.getMonth=function(){return this.b.getMonth()};g.getDate=function(){return this.b.getDate()};g.getTime=function(){return this.b.getTime()};function jn(a){a=a.b.getTimezoneOffset();if(0==a)a="Z";else{var b=Math.abs(a)/60,c=Math.floor(b),b=60*(b-c);a=(0<a?"-":"+")+ta(c)+":"+ta(b)}return a}g.set=function(a){this.b=new Date(a.getFullYear(),a.getMonth(),a.getDate())};
g.add=function(a){if(a.o||a.j){var b=this.getMonth()+a.j+12*a.o,c=this.getFullYear()+Math.floor(b/12),b=b%12;0>b&&(b+=12);var d;t:{switch(b){case 1:d=0!=c%4||0==c%100&&0!=c%400?28:29;break t;case 5:case 8:case 10:case 3:d=30;break t}d=31}d=Math.min(d,this.getDate());this.b.setDate(1);this.b.setFullYear(c);this.b.setMonth(b);this.b.setDate(d)}a.b&&(a=new Date((new Date(this.getFullYear(),this.getMonth(),this.getDate(),12)).getTime()+864E5*a.b),this.b.setDate(1),this.b.setFullYear(a.getFullYear()),
this.b.setMonth(a.getMonth()),this.b.setDate(a.getDate()),hn(this,a.getDate()))};g.Bb=function(a,b){return[this.getFullYear(),ta(this.getMonth()+1),ta(this.getDate())].join(a?"-":"")+(b?jn(this):"")};g.equals=function(a){return!(!a||this.getFullYear()!=a.getFullYear()||this.getMonth()!=a.getMonth()||this.getDate()!=a.getDate())};g.toString=function(){return this.Bb()};function hn(a,b){a.getDate()!=b&&a.b.setUTCHours(a.b.getUTCHours()+(a.getDate()<b?1:-1))}g.valueOf=function(){return this.b.valueOf()};
function kn(a,b,c,d,e,f,h){this.b=fa(a)?new Date(a,b||0,c||1,d||0,e||0,f||0,h||0):new Date(a?a.getTime():y())}A(kn,fn);g=kn.prototype;g.add=function(a){fn.prototype.add.call(this,a);a.g&&this.b.setHours(this.b.getHours()+a.g);a.i&&this.b.setMinutes(this.b.getMinutes()+a.i);a.k&&this.b.setSeconds(this.b.getSeconds()+a.k)};
g.Bb=function(a,b){var c=fn.prototype.Bb.call(this,a);return a?c+" "+ta(this.b.getHours())+":"+ta(this.b.getMinutes())+":"+ta(this.b.getSeconds())+(b?jn(this):""):c+"T"+ta(this.b.getHours())+ta(this.b.getMinutes())+ta(this.b.getSeconds())+(b?jn(this):"")};g.equals=function(a){return this.getTime()==a.getTime()};g.toString=function(){return this.Bb()};g.clone=function(){var a=new kn(this.b);a.zb=this.zb;a.Ab=this.Ab;return a};function ln(a,b){this.b=a;this.i=b}A(ln,Ug);function mn(a){var b=[];ge(a.b.da(!0),function(a){if("bounded-collectable-storage"!=a){var d;try{d=this.eb(a,!0)}catch(e){if("Storage: Invalid value was encountered"==e)return;throw e;}b.push({key:a,mc:d.creation})}},a);Ta(b,function(a,b){return a.mc-b.mc});return E(b,function(a){return a.key})}function nn(a,b){var c=ln.A.get.call(a,"bounded-collectable-storage")||null;c&&s(c)||(b?c=mn(a):c=[]);return c}
function on(a,b){ln.A.set.call(a,"bounded-collectable-storage",b)}function pn(a,b){if(0==b.length)return Pa(a);for(var c=[],d=0,e=0;e<b.length&&d<a.length;){for(var f=b[e];d<a.length&&a[d]!=f;)c.push(a[d]),++d;++e}return Oa(c,Sa(a,d+1))}function qn(a,b,c){if(b.length<=c)return Pa(b);c=Sa(b,0,b.length-c);D(c,function(a){ln.A.remove.call(this,a)},a);return pn(b,c)}ln.prototype.g=function(a){var b=nn(this,!0);a=Wg(this,b,a);b=pn(b,a);on(this,b)};
ln.prototype.set=function(a,b,c){ln.A.set.call(this,a,b,c);c=nn(this,!0);Ma(c,a);r(b)&&(c.push(a),c.length>=this.i&&(a=Wg(this,c),c=pn(c,a),c=qn(this,c,this.i)));on(this,c)};ln.prototype.remove=function(a){ln.A.remove.call(this,a);var b=nn(this,!1);r(b)&&(Ma(b,a),on(this,b))};function rn(a,b){if(P&&!mc(9)){sn||(sn=new ie);this.M=sn.get(a);this.M||(b?this.M=document.getElementById(b):(this.M=document.createElement("userdata"),this.M.addBehavior("#default#userData"),document.body.appendChild(this.M)),sn.set(a,this.M));this.Xb=a;try{this.M.load(this.Xb)}catch(c){this.M=null}}}A(rn,Jg);var tn={".":".2E","!":".21","~":".7E","*":".2A","'":".27","(":".28",")":".29","%":"."},sn=null;g=rn.prototype;g.M=null;g.Xb=null;
function un(a){return"_"+encodeURIComponent(a).replace(/[.!~*'()%]/g,function(a){return tn[a]})}g.isAvailable=function(){return!!this.M};g.set=function(a,b){this.M.setAttribute(un(a),b);vn(this)};g.get=function(a){a=this.M.getAttribute(un(a));if(!t(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a};g.remove=function(a){this.M.removeAttribute(un(a));vn(this)};g.va=function(){return wn(this).attributes.length};
g.da=function(a){var b=0,c=wn(this).attributes,d=new ee;d.next=function(){if(b>=c.length)throw de;var d;d=c[b++];if(a)return decodeURIComponent(d.nodeName.replace(/\./g,"%")).substr(1);d=d.nodeValue;if(!t(d))throw"Storage mechanism: Invalid value was encountered";return d};return d};g.clear=function(){for(var a=wn(this),b=a.attributes.length;0<b;b--)a.removeAttribute(a.attributes[b-1].nodeName);vn(this)};function vn(a){try{a.M.save(a.Xb)}catch(b){throw"Storage mechanism: Quota exceeded";}}
function wn(a){return a.M.XMLDocument.documentElement};function xn(a,b){this.Ra=a;this.Ga=b+"::"}A(xn,Jg);g=xn.prototype;g.Ra=null;g.Ga="";g.set=function(a,b){this.Ra.set(this.Ga+a,b)};g.get=function(a){return this.Ra.get(this.Ga+a)};g.remove=function(a){this.Ra.remove(this.Ga+a)};g.da=function(a){var b=this.Ra.da(!0),c=this,d=new ee;d.next=function(){for(var d=b.next();d.substr(0,c.Ga.length)!=c.Ga;)d=b.next();return a?d.substr(c.Ga.length):c.Ra.get(d)};return d};function yn(a){var b=new Lg;(b=b.isAvailable()?a?new xn(b,a):b:null)||(a=new rn(a||"UserDataSharedStore"),b=a.isAvailable()?a:null);return b};var zn={like:"l",dislike:"d",subscribe:"b",unsubscribe:"u",add_to_playlist:"d",comment:"c",share:"h"},An=null;function Bn(){if(!An){var a=yn("history_channel_");if(!a)return null;An=new ln(a,50)}return An}function Cn(a){return a?new fn(a.getFullYear(),a.getMonth(),a.getDate()):new fn};var Dn;var En=["3djj8jS0370cu_ghKs_Ong","LsooMJoIpl_7ux2jvdPB-Q","JkWoS4RsldA1coEIot5yDA","jVkjd2VWCWO-9DHRQER3Yg","L8ZULXASCc1I_oaOT0NaOQ"],Fn=[];
function Gn(a,b){var c=$h(b);if(c){var d;var e;i:{if(null==Dn){e=yn("aid");if(!e){e=null;break i}Dn=new ln(e,50)}e=Dn}e?(e=e.get(c),d=ga(e)?e:null):d=null;if(d){e={foc_id:c,aid:d.aid||"!aid",label:"followon_"+a};if(d.ytfocHistoryEnabled){var f=new fn;d=zn[a]||"x";var h=Bn();if(h){var k=h.get(c);if(null==k)k=f.toString()+":"+d;else{if(k=Bn()){var l=k.get(c);if(l){var f=Cn(f),m=l.substr(0,8),q=new kn(2E3),m=oa(m),m=m.split(-1==m.indexOf("T")?" ":"T"),w;var M=m[0].match(bn);if(M){var Ak=Number(M[2]),
Bk=Number(M[3]),Ck=Number(M[4]);w=Number(M[5]);var Ja=Number(M[6])||1;q.b.setFullYear(Number(M[1]));Ck?(q.b.setDate(1),q.b.setMonth(0),q.add(new en("d",Ck-1))):w?(q.b.setMonth(0),q.b.setDate(1),M=q.b.getDay()||7,q.add(new en("d",(4>=M?1-M:8-M)+(Number(Ja)+7*(Number(w)-1))-1))):(Ak&&(q.b.setDate(1),q.b.setMonth(Ak-1)),Bk&&q.b.setDate(Bk));w=!0}else w=!1;w&&!(w=2>m.length)&&(m=m[1],w=m.match(dn),Ja=0,w&&("Z"!=w[0]&&(Ja=60*w[2]+Number(w[3]),Ja*="-"==w[1]?1:-1),Ja-=q.b.getTimezoneOffset(),m=m.substr(0,
m.length-w[0].length)),(w=m.match(cn))?(q.b.setHours(Number(w[1])),q.b.setMinutes(Number(w[2])||0),q.b.setSeconds(Number(w[3])||0),q.b.setMilliseconds(w[4]?1E3*w[4]:0),0!=Ja&&q.b.setTime(q.getTime()+6E4*Ja),w=!0):w=!1);q=Cn(w?q:null);l=l.substr(9);for(m=new en("d",1);0>q.getTime()-f.getTime();)l+="-",q.add(m);q=l?l.split("-").length-1:0;for(m=-1;7<=q;)m=l.indexOf("-",m+1),--q;l=l.substr(m+1,l.length);l=f.toString()+":"+l;k.set(c,l,y()+6048E5)}}k=h.get(c)+d}h.set(c,k,y()+6048E5)}if(d=Bn())if(c=d.get(c),
null==c)c=null;else{c=c.substr(9);l=f=k=h=d=0;q="x";for(m=0;m<c.length-1;m++)switch(c.charAt(m)){case "y":case "o":case "g":0<k?f+=1:d+=1;break;case "t":case "f":case "p":h+=1;break;case "a":k+=1;break;case "l":case "b":case "u":case "d":case "d":case "c":case "h":0==k&&(l=1)}if(0<c.length)switch(c.charAt(c.length-1)){case "y":case "o":case "g":q=0<k?"f":"y";break;case "t":case "f":case "p":q="s";break;case "a":q="a";break;case "l":case "b":case "u":case "d":case "d":case "c":case "h":q=c.charAt(c.length-
1)}c=[q,"y"+d,"s"+h,"a"+k,"f"+f,"e"+l].join("")}else c=null;e.h=c||""}(e=ed("//www.gstatic.com/youtube/followonevent/l",e))&&e&&Le(e)}}if(c=(e=I("CONVERSION_CONFIG_DICT"))&&(!t(b)||e.uid==$h(b)))i:{for(var za in En)if(En[za]==e.uid){c=!0;break i}c=!1}c&&e.baseUrl&&e.uid&&e.focEnabled&&!e.isAd&&(za={plus_label:"followon_"+a},"view"==a&&e.vid&&e.uid&&(e.oeid||e.ieid)&&(e.oeid&&(za.plus_oeid=e.oeid),e.ieid&&(za.plus_ieid=e.ieid),za.plus_evid=e.vid),za.plus_foc_id=e.uid,(za=ed(e.baseUrl,za))&&za&&Le(za))}
;var Hn=!1,$=[];function In(a,b,c,d,e,f){b?Hn?L("subscription-external-subscribe",a,b,null,d,e):L("ypc-delayedloader-load",function(){L("ypc-init-subscription",b)}):Jn(a,c,d,e,f)}function Kn(a,b,c,d,e,f,h){c?Hn?L("subscription-external-unsubscribe",a,b,c,null,e,f):L("ypc-delayedloader-load",function(){L("ypc-subscription-cancel",c)}):Ln(a,b,d,e,f,h)}
function Mn(a){if(a.length){var b=Ra(a,0,40);L("subscription-batch-subscribe-loading",b);Nn("subscription-subscribe-loading",b);var c={};c.session_token=tb();c.a=b.join(",");var d=function(){L("subscription-batch-subscribe-loaded",b);Nn("subscription-subscribe-loaded",b)};ze("/subscription_ajax?action_create_subscription_to_all=1",{method:"POST",na:c,onSuccess:function(c,f){d();var h=f.response,k=h.id;if(s(k)&&k.length==b.length){var l={};D(k,function(a,c){l[b[c]]=a});L("subscription-batch-subscribe-success",
l);Xa(l,function(a,b){L("subscription-subscribe-success",b,a)});(h=h.guide_notification_html_content)&&L("guide-add-subscription",h);a.length&&Mn(a)}},onError:function(){d();L("subscription-batch-subscribe-failure",b);Nn("subscription-subscribe-failure",b)}})}}
function On(a){if(!bb(a)){var b=Za(a),c=Ra(b,0,40),d=[];D(c,function(b){d.push(a[b])});var e={};D(b,function(b){e[b]=a[b]});L("subscription-batch-unsubscribe-loading",c);Nn("subscription-unsubscirbe-loading",c);b={};b.session_token=tb();b.s=d.join(",");var f=function(){L("subscription-batch-unsubscribe-loaded",c);Nn("subscription-unsubscribe-loaded",c)};ze("/subscription_ajax?action_remove_subscriptions=1",{method:"POST",na:b,onSuccess:function(){f();L("subscription-batch-unsubscribe-success",c);
Nn("subscription-unsubscribe-success",c);bb(e)||On(e)},onError:function(){f();L("subscription-batch-unsubscribe-failure",c);Nn("subscription-unsubscribe-failure",c)}})}}function Pn(a,b,c){Qn(a,null,b,null,c)}function Rn(a,b,c){Qn(a,null,null,b,c)}function Sn(a,b,c){Tn(a,b,null,c)}function Un(a,b,c){Tn(a,null,b,c)}function Vn(a,b,c,d,e){Qn(a,b,c,d,e)}function Wn(a,b,c,d){a=a.subscriptionElement||null;(b=b.subscriptionId)&&L("subscription-subscribe-success",d,b,a)}
function Xn(a,b){Xa(a,function(a,b){L("subscription-subscribe-success",b,a)});L("guide-add-subscription",b)}function Yn(a,b){L("subscription-unsubscribe-success",a.itemId,a.subscriptionElement||null);b&&(L("subscription-batch-unsubscribe-success",b),Nn("subscription-unsubscribe-success",b),Nn("subscription-enable-ypc",b))}
function Jn(a,b,c,d,e){L("subscription-subscribe-loading",a);var f={};f.c=a;d&&(f.eurl=d);e&&(f.source=e);d={};d.session_token=tb();(e=I("PLAYBACK_ID"))&&(d.plid=e);c&&Zn("/subscription_ajax?action_create_subscription_to_channel=1",f,c);ze("/subscription_ajax?action_create_subscription_to_channel=1",{method:"POST",Cc:f,na:d,onSuccess:function(c,d){var e=d.response;L("subscription-subscribe-success",a,e.id,b);e.show_feed_privacy_dialog&&L("SHOW-FEED-PRIVACY-SUBSCRIBE-DIALOG",a);(e=e.guide_notification_html_content)&&
L("guide-add-subscription",e)},onError:function(){L("subscription-subscribe-failure",a)},Eb:function(){L("subscription-subscribe-loaded",a)}});ai("subscribe",a)}
function Ln(a,b,c,d,e,f){L("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=I("PLAYBACK_ID"))&&(e.plid=b);d&&Zn("/subscription_ajax?action_remove_subscriptions=1",{},d);ze("/subscription_ajax?action_remove_subscriptions=1",{method:"POST",Cc:h,na:e,onSuccess:function(){L("subscription-unsubscribe-success",a,c)},onError:function(){L("subscription-unsubscribe-failure",a)},Eb:function(){L("subscription-unsubscribe-loaded",a)}});ai("unsubscribe",
a)}function Qn(a,b,c,d,e){if(null!==c||null!==d){L("subscription-prefs-loading",a);var f={};f.session_token=tb();f.subscription_id=a;b&&(f.channel_id=b);null===c||(f.email_on_upload=c);null===d||(f.uploads_only=d);ze("/subscription_ajax?action_update_subscription_preferences=1",{method:"POST",na:f,onSuccess:function(){L("subscription-prefs-success",a)},onError:function(){e&&e();L("subscription-prefs-failure",a)},Eb:function(){L("subscription-prefs-loaded",a)}})}}
function Tn(a,b,c,d){if(a.length&&(null!==b||null!==c)){var e=Ra(a,0,40);L("subscription-batch-prefs-loading",e);var f={};f.session_token=tb();f.s=e.join(",");null===b||(f.email_on_upload=b);null===c||(f.uploads_only=c);var h=function(){L("subscription-batch-prefs-loaded",e)};ze("/subscription_ajax?action_update_subscription_preferences_batch=1",{method:"POST",na:f,onSuccess:function(){h();L("subscription-batch-prefs-success",e);a.length&&Tn(a,b,c,d)},onError:function(){h();d&&d();L("subscription-batch-prefs-failure",
e)}})}}function Nn(a,b){D(b,function(b){L(a,b)})}function Zn(a,b,c){a=gd(a,b);c=cd(c);id(a,c)};var $n=null,ao=null,bo=null,co=!1;z("yt.abuse.invokeBotguard",function(){return Rb?Rb.invoke():null});z("yt.abuse.botguardInitialized",function(){return null!=Rb});z("yt.setAjaxToken",sb);z("yt.setConfig",qb);z("yt.setMsg",function(a){rb(pb,arguments)});z("yt.embed.openLoginDialog",function(){Dh(function(a){if($n.onLoginDialogSuccess)$n.onLoginDialogSuccess(a)})});
z("writeEmbed",function(){var a=new Mf(I("PLAYER_CONFIG")),b=document.referrer,c=I("POST_MESSAGE_ORIGIN"),d=!1;t(b)&&t(c)&&-1<b.indexOf(c)&&Hg(c)&&Hg(b)&&(d=!0);window!=window.top&&b&&b!=document.URL&&(a.args.loaderUrl=b);I("LIGHTWEIGHT_AUTOPLAY")&&(a.args.autoplay="1");a.args.autoplay&&fi(a.args);$n=sh("player",a);b=I("POST_MESSAGE_ID","player");I("ENABLE_JS_API")?bo=new Ym($n):I("ENABLE_POST_API")&&t(b)&&t(c)&&(ao=new $m(window.parent,b,c),bo=new Tm($n,ao.g));co=d&&!I("ENABLE_CAST_API");co||(a=
a.args.has_mdx_screens,c=$n,(d={device:"Desktop",app:"youtube-desktop",castv2:!!I("MDX_ENABLE_CASTV2")})&&d.castv2?bk():cj(),Yg&&Yg.g(),Ki(),Z||(Z=Ol.getInstance(),Z.I("screenPair",km),Z.I("managedScreenChange",lm)),jm||(jm=p("yt.mdx.remote.deferredProxies_")||[],z("yt.mdx.remote.deferredProxies_",jm)),bb(mm)&&(mm=p("yt.mdx.remote.channelParams_")||{}),d&&bb(mm)&&(b=Mi(),mm={device:"REMOTE_CONTROL",id:b,name:d.device,app:d.app},z("yt.mdx.remote.channelParams_",mm),rm("Init with id = "+b+", name = "+
d.device+", app = "+d.app),(d=Cm())?(rm("Resume connection to: "+ki(d)),um(d,0)):(Xi(),rm("Skipping connecting because no session screen found."))),Dm=c,Dm.addEventListener("onReady",Fm),Dm.addEventListener("onRemoteReceiverSelected",Hm),c=Z,c.I("onlineReceiverChange",Gm),a?hm(c):Ha(c.ra)&&Ha(Pl())||(c.log_("Clear cached account screens."),c.ra=[],c.Db(),Yl(c)));I("BG_P")&&(I("BG_I")||I("BG_IU"))&&Sb();Im=$n;Im.addEventListener("SUBSCRIBE",Lm);Im.addEventListener("UNSUBSCRIBE",Nm);Jm.push(K("subscription-subscribe-success",
Om));Jm.push(K("subscription-unsubscribe-success",Pm))});z("yt.www.watch.ads.restrictioncookie.spr",function(a){(a=a+"mac_204?action_fcts=1")&&Le(a);bd("CLAD","tlip="+y());return!0});
S(window,"load",function(){Hf().tick.ol=y();Ff("ol");var a=I("TIMING_ACTION"),b=!!I("TIMING_WFF"),c=Hf().tick;a&&c._start&&(b&&c.vr?Gf():b||!c.ol&&!c.aft||Gf());Hn=!0;$.push(K("subscription-subscribe",In));$.push(K("subscription-unsubscribe",Kn));Hn||($.push(K("subscription-external-subscribe",In)),$.push(K("subscription-external-unsubscribe",Kn)),$.push(K("subscription-batch-subscribe",Mn)),$.push(K("subscription-batch-unsubscribe",On)),$.push(K("subscription-pref-email",Pn)),$.push(K("subscription-pref-uploads",
Rn)),$.push(K("subscription-prefs",Vn)),$.push(K("subscription-batch-pref-email",Sn)),$.push(K("subscription-batch-pref-uploads",Un)),$.push(K("ypc-purchase-success",Wn)),$.push(K("ypc-subscription-cancel-success",Yn)),$.push(K("ypc-guide-sync-success",Xn)),Fn.push(K("subscription-subscribe-success",x(Gn,"subscribe")),K("subscription-unsubscribe-success",x(Gn,"unsubscribe")),K("player-subscribe",x(Gn,"subscribe")),K("player-unsubscribe",x(Gn,"unsubscribe"))))});
S(window,"unload",function(){var a=$n;a&&a.sendAbandonmentPing&&a.sendAbandonmentPing();I("PL_ATT")&&(Rb=null);$&&(Gb($),$.length=0,Hn=!1);Gb(Fn);Fn.length=0;Im&&(Im.removeEventListener("SUBSCRIBE",Lm),Im.removeEventListener("UNSUBSCRIBE",Nm));Im=null;Gb(Jm);co||(Gb(Em),Em=NaN,(a=Z)&&a.ma("onlineReceiverChange",Gm),Dm&&(Dm.removeEventListener("onRemoteReceiverSelected",Hm),Dm.removeEventListener("onReady",Fm),Dm=null),im());mb(bo,ao);$n.destroy()});var eo=Nh.getInstance(),fo=U(eo);
fo in Pe||(eo.register(),Pe[fo]=eo);})();
