(function(){var g,aa=aa||{},m=this;function n(a){a=a.split(".");for(var b=m,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.Vc?a.Vc:a.Vc=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 s(a){return void 0!==a}function t(a){return"array"==da(a)}function ea(a){var b=da(a);return"array"==b||"object"==b&&"number"==typeof a.length}function u(a){return"string"==typeof a}function fa(a){return"number"==typeof a}function ga(a){return"function"==da(a)}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 ma(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var w=Date.now||function(){return+new Date};function x(a,b){var c=a.split("."),d=m;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=d[e]?d[e]:d[e]={}:d[e]=b}function y(a,b){function c(){}c.prototype=b.prototype;a.Q=b.prototype;a.prototype=new c}
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 na(a){return decodeURIComponent(a.replace(/\+/g," "))}function oa(a){if(!pa.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(qa,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(ra,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(sa,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(ta,"&quot;"));return a}var qa=/&/g,ra=/</g,sa=/>/g,ta=/\"/g,pa=/[&<>\"]/;
function ua(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var k=d[h]||"",l=e[h]||"",p=RegExp("(\\d*)(\\D*)","g"),r=RegExp("(\\d*)(\\D*)","g");do{var G=p.exec(k)||["","",""],q=r.exec(l)||["","",""];if(0==G[0].length&&0==q[0].length)break;c=((0==G[1].length?0:parseInt(G[1],10))<(0==q[1].length?0:parseInt(q[1],10))?-1:(0==G[1].length?0:parseInt(G[1],10))>(0==q[1].length?
0:parseInt(q[1],10))?1:0)||((0==G[2].length)<(0==q[2].length)?-1:(0==G[2].length)>(0==q[2].length)?1:0)||(G[2]<q[2]?-1:G[2]>q[2]?1:0)}while(0==c)}return c}function va(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})}function wa(a){var b=u(void 0)?"undefined".replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08"):"\\s";return a.replace(RegExp("(^"+(b?"|["+b+"]+":"")+")([a-z])","g"),function(a,b,e){return b+e.toUpperCase()})};var z=Array.prototype,xa=z.indexOf?function(a,b,c){return z.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(u(a))return u(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},A=z.forEach?function(a,b,c){z.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},ya=z.filter?function(a,b,c){return z.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,h=u(a)?
a.split(""):a,k=0;k<d;k++)if(k in h){var l=h[k];b.call(c,l,k,a)&&(e[f++]=l)}return e},za=z.map?function(a,b,c){return z.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=u(a)?a.split(""):a,h=0;h<d;h++)h in f&&(e[h]=b.call(c,f[h],h,a));return e},Aa=z.some?function(a,b,c){return z.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return!0;return!1};function B(a,b,c){b=Ba(a,b,c);return 0>b?null:u(a)?a.charAt(b):a[b]}
function Ba(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return f;return-1}function C(a,b){return 0<=xa(a,b)}function Ca(){var a=Da;if(!t(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function Ea(a,b){C(a,b)||a.push(b)}function Fa(a,b){var c=xa(a,b),d;(d=0<=c)&&z.splice.call(a,c,1);return d}function Ga(a,b){var c=Ba(a,b,void 0);0<=c&&z.splice.call(a,c,1)}function Ha(a){return z.concat.apply(z,arguments)}
function Ia(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 Ja(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c],e;if(t(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 Ka(a,b,c,d){return z.splice.apply(a,La(arguments,1))}function La(a,b,c){return 2>=arguments.length?z.slice.call(a,b):z.slice.call(a,b,c)}
function Ma(a,b,c){if(!ea(a)||!ea(b)||a.length!=b.length)return!1;var d=a.length;c=c||Na;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0}function Na(a,b){return a===b};var Oa;function Pa(a){a=a.className;return u(a)&&a.match(/\S+/g)||[]}function Qa(a,b){for(var c=Pa(a),d=La(arguments,1),e=c,f=0;f<d.length;f++)C(e,d[f])||e.push(d[f]);a.className=c.join(" ")}function Ra(a,b){var c=Pa(a),d=La(arguments,1),c=Sa(c,d);a.className=c.join(" ")}function Sa(a,b){return ya(a,function(a){return!C(b,a)})}function Ta(a,b,c){c?Qa(a,b):Ra(a,b)};function D(a,b){this.x=s(a)?a:0;this.y=s(b)?b:0}D.prototype.A=function(){return new D(this.x,this.y)};D.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};D.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};D.prototype.scale=function(a,b){var c=fa(b)?b:a;this.x*=a;this.y*=c;return this};function Ua(a,b){this.width=a;this.height=b}Ua.prototype.A=function(){return new Ua(this.width,this.height)};Ua.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};Ua.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};Ua.prototype.scale=function(a,b){var c=fa(b)?b:a;this.width*=a;this.height*=c;return this};function Va(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function Wa(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function Xa(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function Ya(a){var b=Za,c;for(c in b)if(a.call(void 0,b[c],c,b))return c}function $a(a){for(var b in a)return!1;return!0}function ab(a){var b={},c;for(c in a)b[c]=a[c];return b}var bb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
function cb(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<bb.length;f++)c=bb[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var db,eb,fb,gb,hb,ib;function jb(){return m.navigator?m.navigator.userAgent:null}function kb(){return m.navigator}gb=fb=eb=db=!1;var lb;if(lb=jb()){var mb=kb();db=0==lb.indexOf("Opera");eb=!db&&-1!=lb.indexOf("MSIE");fb=!db&&-1!=lb.indexOf("WebKit");gb=!db&&!fb&&"Gecko"==mb.product}var nb=db,E=eb,F=gb,H=fb,ob=kb(),pb=ob&&ob.platform||"";hb=-1!=pb.indexOf("Mac");ib=-1!=pb.indexOf("Win");var qb=!!kb()&&-1!=(kb().appVersion||"").indexOf("X11");
function rb(){var a=m.document;return a?a.documentMode:void 0}var sb;t:{var tb="",ub;if(nb&&m.opera)var vb=m.opera.version,tb="function"==typeof vb?vb():vb;else if(F?ub=/rv\:([^\);]+)(\)|;)/:E?ub=/MSIE\s+([^\);]+)(\)|;)/:H&&(ub=/WebKit\/(\S+)/),ub)var wb=ub.exec(jb()),tb=wb?wb[1]:"";if(E){var xb=rb();if(xb>parseFloat(tb)){sb=String(xb);break t}}sb=tb}var yb=sb,zb={};function I(a){return zb[a]||(zb[a]=0<=ua(yb,a))}function Ab(a){return E&&Bb>=a}
var Cb=m.document,Bb=Cb&&E?rb()||("CSS1Compat"==Cb.compatMode?parseInt(yb,10):5):void 0;var Db=!F&&!E||E&&Ab(9)||F&&I("1.9.1");E&&I("9");function Eb(a){return a?new Fb(Gb(a)):Oa||(Oa=new Fb)}function J(a){return u(a)?document.getElementById(a):a}function Hb(a){var b=document;return b.querySelectorAll&&b.querySelector?b.querySelectorAll("."+a):b.getElementsByClassName?b.getElementsByClassName(a):Ib(a)}
function Ib(a){var b,c,d,e;b=document;if(b.querySelectorAll&&b.querySelector&&a)return b.querySelectorAll(""+(a?"."+a:""));if(a&&b.getElementsByClassName){var f=b.getElementsByClassName(a);return f}f=b.getElementsByTagName("*");if(a){e={};for(c=d=0;b=f[c];c++){var h=b.className;"function"==typeof h.split&&C(h.split(/\s+/),a)&&(e[d++]=b)}e.length=d;return e}return f}function Jb(a){return"CSS1Compat"==a.compatMode}
function Kb(a){if(!a)return null;if(a.firstChild)return a.firstChild;for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}function Lb(a){if(!a)return null;if(!a.previousSibling)return a.parentNode;for(a=a.previousSibling;a&&a.lastChild;)a=a.lastChild;return a}function Gb(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function Mb(a){var b=Nb.de;return b?Ob(a,function(a){return!b||C(Pa(a),b)},!0):null}
function Ob(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 Fb(a){this.b=a||m.document||document}Fb.prototype.createElement=function(a){return this.b.createElement(a)};function Pb(a){var b=a.b;a=!H&&Jb(b)?b.documentElement:b.body;b=b.parentWindow||b.defaultView;return E&&I("10")&&b.pageYOffset!=a.scrollTop?new D(a.scrollLeft,a.scrollTop):new D(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}
Fb.prototype.appendChild=function(a,b){a.appendChild(b)};Fb.prototype.getChildren=function(a){return Db&&void 0!=a.children?a.children:ya(a.childNodes,function(a){return 1==a.nodeType})};function Qb(a,b,c){a.dataset?a.dataset[Rb(b)]=c:a.setAttribute("data-"+b,c)}function K(a,b){return a.dataset?a.dataset[Rb(b)]:a.getAttribute("data-"+b)}function Sb(a,b){a.dataset?delete a.dataset[Rb(b)]:a.removeAttribute("data-"+b)}var Tb={};function Rb(a){return Tb[a]||(Tb[a]=String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()}))};var Ub=n("yt.dom.getNextId_");if(!Ub){Ub=function(){return++Vb};x("yt.dom.getNextId_",Ub);var Vb=0}function Wb(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 Xb(){var a=document,b;Aa(["fullscreenElement","fullScreenElement"],function(c){b=Wb(c,a);return!!b});return b};var Yb=window.yt&&window.yt.config_||{};x("yt.config_",Yb);var Zb=window.yt&&window.yt.tokens_||{};x("yt.tokens_",Zb);x("yt.globals_",window.yt&&window.yt.globals_||{});var $b=window.yt&&window.yt.msgs_||{};x("yt.msgs_",$b);var ac=window.yt&&window.yt.timeouts_||[];x("yt.timeouts_",ac);x("yt.intervals_",window.yt&&window.yt.intervals_||[]);function bc(a){cc(Yb,arguments)}function L(a){return a in Yb?Yb[a]:void 0}function dc(a){cc(Zb,arguments)}
function ec(){return"subscription_ajax"in Zb?Zb.subscription_ajax:void 0}function M(a,b){ga(a)&&(a=fc(a));var c=window.setTimeout(a,b);ac.push(c);return c}function gc(a){window.clearTimeout(a)}function fc(a){return a&&window.yterr?function(){try{return a.apply(this,arguments)}catch(b){var c=n("yt.www.onException");c&&c(b);throw b;}}:a}function hc(a,b,c){var d=b||{};if(a=a in $b?$b[a]:c)for(var e in d)a=a.replace(RegExp("\\$"+e,"gi"),function(){return d[e]});return a}
function cc(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 ic="Microsoft Internet Explorer"==navigator.appName;function jc(a){if(a=a||window.event){for(var b in a)b in kc||(this[b]=a[b]);this.scale=a.scale;this.rotation=a.rotation;this.Fb=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;if(document.body&&document.documentElement){b=
document.body.scrollLeft+document.documentElement.scrollLeft;var d=document.body.scrollTop+document.documentElement.scrollTop;this.pageX=void 0!=a.pageX?a.pageX:a.clientX+b;this.pageY=void 0!=a.pageY?a.pageY:a.clientY+d}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.Fb=null;g.type="";g.target=null;g.relatedTarget=null;g.currentTarget=null;g.data=null;g.source=null;g.keyCode=0;g.charCode=0;g.altKey=!1;g.ctrlKey=!1;g.shiftKey=!1;g.clientX=0;g.clientY=0;g.pageX=0;g.pageY=0;g.wheelDeltaX=0;g.wheelDeltaY=0;g.rotation=0;g.scale=1;g.preventDefault=function(){this.Fb.returnValue=!1;this.Fb.preventDefault&&this.Fb.preventDefault()};var kc={stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,scale:1,rotation:1};var Za=n("yt.events.listeners_")||{};x("yt.events.listeners_",Za);var lc=n("yt.events.counter_")||{count:0};x("yt.events.counter_",lc);function mc(a,b,c,d){return Ya(function(e){return e[0]==a&&e[1]==b&&e[2]==c&&e[4]==!!d})}
function N(a,b,c,d){if(a&&(a.addEventListener||a.attachEvent)){d=!!d;var e=mc(a,b,c,d);if(!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(!Ob(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=fc(h);Za[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)}}};function nc(){}nc.prototype.p=!1;nc.prototype.dispose=function(){this.p||(this.p=!0,this.I())};function oc(a,b){a.va||(a.va=[]);a.va.push(v(b,void 0))}nc.prototype.I=function(){if(this.va)for(;this.va.length;)this.va.shift()()};function pc(a){a&&"function"==typeof a.dispose&&a.dispose()};function O(){this.b=[];this.U={}}y(O,nc);g=O.prototype;g.xc=1;g.yb=0;g.G=function(a,b,c){var d=this.U[a];d||(d=this.U[a]=[]);var e=this.xc;this.b[e]=a;this.b[e+1]=b;this.b[e+2]=c;this.xc=e+3;d.push(e);return e};g.la=function(a,b,c){if(a=this.U[a]){var d=this.b;if(a=B(a,function(a){return d[a+1]==b&&d[a+2]==c}))return this.ma(a)}return!1};
g.ma=function(a){if(0!=this.yb)return this.g||(this.g=[]),this.g.push(a),!1;var b=this.b[a];if(b){var c=this.U[b];c&&Fa(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.U[a];if(c){this.yb++;for(var d=La(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.yb--;if(this.g&&0==this.yb)for(;c=this.g.pop();)this.ma(c);return 0!=e}return!1};
g.clear=function(a){if(a){var b=this.U[a];b&&(A(b,this.ma,this),delete this.U[a])}else this.b.length=0,this.U={}};g.I=function(){O.Q.I.call(this);delete this.b;delete this.U;delete this.g};var qc=n("yt.pubsub.instance_")||new O;O.prototype.subscribe=O.prototype.G;O.prototype.unsubscribeByKey=O.prototype.ma;O.prototype.publish=O.prototype.u;O.prototype.clear=O.prototype.clear;x("yt.pubsub.instance_",qc);function P(a,b,c){var d=n("yt.pubsub.instance_");return d?d.subscribe(a,function(){var a=arguments;M(function(){b.apply(c||m,a)},0)},c):0}
function rc(){var a=L("LOGGED_IN_PUBSUB_KEY"),b=n("yt.pubsub.instance_");b&&("number"==typeof a?a=[a]:"string"==typeof a&&(a=[parseInt(a,10)]),A(a,function(a){b.unsubscribeByKey(a)}))}function Q(a,b){var c=n("yt.pubsub.instance_");return c?c.publish.apply(c,arguments):!1};function sc(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 tc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function uc(a){if(vc){vc=!1;var b=m.location;if(b){var c=b.href;if(c&&(c=wc(c))&&c!=b.hostname)throw vc=!0,Error();}}return a.match(tc)}var vc=H;function wc(a){return(a=uc(a)[3]||null)&&decodeURIComponent(a)}
function xc(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 yc(a,b,c){if(t(b))for(var d=0;d<b.length;d++)yc(a,String(b[d]),c);else null!=b&&c.push("&",a,""===b?"":"=",encodeURIComponent(String(b)))}function zc(a,b,c){Math.max(b.length-(c||0),0);for(c=c||0;c<b.length;c+=2)yc(b[c],b[c+1],a);return a}function Ac(a,b){for(var c in b)yc(c,b[c],a);return a}
function Bc(a,b){return xc(2==arguments.length?zc([a],arguments[1],0):zc([a],arguments,1))};function Cc(a,b){var c=Bc("/signin?context=popup","next",document.location.protocol+"//"+document.domain+"/post_login");b&&(c=Bc(c,"feature",b));if(c=window.open(c,"loginPopup","width=375,height=440,resizable=yes,scrollbars=yes",!0)){var d=P("LOGGED_IN",function(b){rc();a(b)});bc("LOGGED_IN_PUBSUB_KEY",d);c.moveTo((screen.width-375)/2,(screen.height-440)/2)}}x("yt.pubsub.publish",Q);function Dc(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}Dc.prototype.A=function(){return new Dc(this.top,this.right,this.bottom,this.left)};Dc.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};Dc.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};
Dc.prototype.scale=function(a,b){var c=fa(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function Ec(a,b,c){var d;t:if(d=va(c),void 0===a.style[d]&&(c=(H?"Webkit":F?"Moz":E?"ms":nb?"O":null)+wa(c),void 0!==a.style[c])){d=c;break t}d&&(a.style[d]=b)}function Fc(a,b){var c=Gb(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function Gc(a,b){return Fc(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}
function Hc(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}E&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}
function Ic(a){if(E&&!Ab(8))return a.offsetParent;var b=Gb(a),c=Gc(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=Gc(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 Jc(a){var b,c=Gb(a),d=Gc(a,"position"),e=F&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new D(0,0),h;b=c?Gb(c):document;(h=!E)||(h=Ab(9))||(h=Eb(b),h=Jb(h.b));h=h?b.documentElement:b.body;if(a==h)return f;if(a.getBoundingClientRect)b=Hc(a),a=Pb(Eb(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{e=a;do{f.x+=
e.offsetLeft;f.y+=e.offsetTop;e!=a&&(f.x+=e.clientLeft||0,f.y+=e.clientTop||0);if(H&&"fixed"==Gc(e,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}e=e.offsetParent}while(e&&e!=a);if(nb||H&&"absolute"==d)f.y-=c.body.offsetTop;for(e=a;(e=Ic(e))&&e!=c.body&&e!=h;)f.x-=e.scrollLeft,nb&&"TR"==e.tagName||(f.y-=e.scrollTop)}return f}function Kc(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}
function Lc(a){if("none"!=Gc(a,"display"))return Mc(a);var b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Mc(a);b.display=c;b.position=e;b.visibility=d;return a}function Mc(a){var b=a.offsetWidth,c=a.offsetHeight,d=H&&!b&&!c;return s(b)&&!d||!a.getBoundingClientRect?new Ua(b,c):(a=Hc(a),new Ua(a.right-a.left,a.bottom-a.top))}
function Nc(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 Oc(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?Nc(a,c):0}var Pc={thin:2,medium:4,thick:6};
function Qc(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 Pc?Pc[c]:Nc(a,c)}var Rc=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Sc(a,b){(a=J(a))&&a.style&&(a.style.display=b?"":"none",Ta(a,"hid",!b))}function Tc(a){A(arguments,function(a){Sc(a,!0)})}function Uc(a){A(arguments,function(a){Sc(a,!1)})};var Vc={},Wc="ontouchstart"in document;function Xc(a,b,c){var d;switch(a){case "mouseover":case "mouseout":d=3;break;case "mouseenter":case "mouseleave":d=9}return Ob(c,function(a){return C(Pa(a),b)},!0,d)}
function R(a){var b="mouseover"==a.type&&"mouseenter"in Vc||"mouseout"==a.type&&"mouseleave"in Vc,c=a.type in Vc||b;if("HTML"!=a.target.tagName&&c){if(b){var b="mouseover"==a.type?"mouseenter":"mouseleave",c=Vc[b],d;for(d in c.U){var e=Xc(b,d,a.target);e&&!Ob(a.relatedTarget,function(a){return a==e},!0)&&c.u(d,e,b,a)}}if(b=Vc[a.type])for(d in b.U)(e=Xc(a.type,d,a.target))&&b.u(d,e,a.type,a)}}N(document,"blur",R,!0);N(document,"change",R,!0);N(document,"click",R);N(document,"focus",R,!0);
N(document,"mouseover",R);N(document,"mouseout",R);N(document,"mousedown",R);N(document,"keydown",R);N(document,"keyup",R);N(document,"keypress",R);N(document,"cut",R);N(document,"paste",R);Wc&&(N(document,"touchstart",R),N(document,"touchend",R),N(document,"touchcancel",R));var Yc=window.yt&&window.yt.uix&&window.yt.uix.widgets_||{};x("yt.uix.widgets_",Yc);function Zc(){this.b={}}Zc.prototype.g=!!eval("/*@cc_on!@*/false");Zc.prototype.Wc=function(){return!0};function $c(a,b,c){var d=S(a,void 0),e=v(c,a);b in Vc||(Vc[b]=new O);Vc[b].G(d,e);a.b[c]=e}function ad(a,b){Qb(a,"tooltip-text",b)}function S(a,b){return"yt-uix"+(a.Xb?"-"+a.Xb:"")+(b?"-"+b:"")};function bd(){this.b={}}y(bd,Zc);ca(bd);g=bd.prototype;g.Xb="tooltip";g.Eb=0;g.register=function(){$c(this,"mouseover",this.Ic);$c(this,"mouseout",this.Vb);$c(this,"click",this.Vb);$c(this,"touchstart",this.Zd);$c(this,"touchend",this.Nc);$c(this,"touchcancel",this.Nc)};g.Wc=function(){return!(this.g&&0==yb.indexOf("6"))};
g.Ic=function(a){if(!(this.Eb&&1E3>w()-this.Eb)){var b=parseInt(K(a,"tooltip-hide-timer"),10);b&&(Sb(a,"tooltip-hide-timer"),gc(b));var b=v(function(){cd(this,a);Sb(a,"tooltip-show-timer")},this),c=parseInt(K(a,"tooltip-show-delay"),10)||0,b=M(b,c);Qb(a,"tooltip-show-timer",b.toString());a.title&&(ad(a,K(a,"tooltip-text")||a.title),a.title="")}};
g.Vb=function(a){var b=parseInt(K(a,"tooltip-show-timer"),10);b&&(gc(b),Sb(a,"tooltip-show-timer"));b=v(function(){if(a){var b=J(dd(this,a));b&&(ed(b),b&&b.parentNode&&b.parentNode.removeChild(b),Sb(a,"content-id"))}Sb(a,"tooltip-hide-timer")},this);b=M(b,50);Qb(a,"tooltip-hide-timer",b.toString());if(b=K(a,"tooltip-text"))a.title=b};g.Zd=function(a,b){this.Eb=0;var c=Xc(b,S(this),null[0].target);this.Ic(c)};g.Nc=function(a,b){this.Eb=w();var c=Xc(b,S(this),null[0].target);this.Vb(c)};
function fd(a,b){ad(a,b);var c=K(a,"content-id");if(c=J(c))c.innerHTML=b}
function cd(a,b){if(b){var c=K(b,"tooltip-text")||b.title;if(c){var d=J(dd(a,b));if(!d){d=document.createElement("div");d.id=dd(a,b);d.className=S(a,"tip");var e=document.createElement("div");e.className=S(a,"tip-body");var f=document.createElement("div");f.className=S(a,"tip-arrow");var h=document.createElement("div");h.className=S(a,"tip-content");var k=gd(a,b),l=dd(a,b,"content");h.id=l;Qb(b,"content-id",l);e.appendChild(h);k&&d.appendChild(k);d.appendChild(e);d.appendChild(f);(Xb()||document.body).appendChild(d);
fd(b,c);(c=parseInt(K(b,"tooltip-max-width"),10))&&e.offsetWidth>c&&(e.style.width=c+"px",Qa(h,S(a,"normal-wrap")));h=C(Pa(b),S(a,"reverse"));hd(a,b,d,e,k,h)||hd(a,b,d,e,k,!h);var p=S(a,"tip-visible");M(function(){Qa(d,p)},0)}}}}
function hd(a,b,c,d,e,f){Ta(c,S(a,"tip-reverse"),f);var h=0;f&&(h=1);a=Lc(b);f=new D((a.width-10)/2,f?a.height:0);var k=Jc(b);var k=new D(k.x+f.x,k.y+f.y),k=k.A(),l=(h&4&&"rtl"==Gc(c,"direction")?h^2:h)&-5;f=Lc(c);h=f.A();0!=l&&(l&2&&(k.x-=h.width+0),l&1&&(k.y-=h.height+0));var p=k,l=F&&(hb||qb)&&I("1.9");p instanceof D?(k=p.x,p=p.y):(k=p,p=void 0);c.style.left=Kc(k,l);c.style.top=Kc(p,l);if(!(f==h||f&&h&&f.width==h.width&&f.height==h.height))if(f=Eb(Gb(c)),k=Jb(f.b),!E||k&&I("8"))f=c.style,F?f.MozBoxSizing=
"border-box":H?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(E)var k=Oc(c,"paddingLeft"),l=Oc(c,"paddingRight"),p=Oc(c,"paddingTop"),r=Oc(c,"paddingBottom"),k=new Dc(p,l,r,k);else k=Fc(c,"paddingLeft"),l=Fc(c,"paddingRight"),p=Fc(c,"paddingTop"),r=Fc(c,"paddingBottom"),k=new Dc(parseFloat(p),parseFloat(l),parseFloat(r),parseFloat(k));if(E)var l=Qc(c,"borderLeft"),p=Qc(c,"borderRight"),r=Qc(c,"borderTop"),
G=Qc(c,"borderBottom"),l=new Dc(r,p,G,l);else l=Fc(c,"borderLeftWidth"),p=Fc(c,"borderRightWidth"),r=Fc(c,"borderTopWidth"),G=Fc(c,"borderBottomWidth"),l=new Dc(parseFloat(r),parseFloat(p),parseFloat(G),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;var h=window.document,h=Jb(h)?h.documentElement:h.body,h=new Ua(h.clientWidth,h.clientHeight),q;if(1==c.nodeType){c.getBoundingClientRect?
(f=Hc(c),f=new D(f.left,f.top)):(f=Pb(Eb(c)),k=Jc(c),f=new D(k.x-f.x,k.y-f.y));if(F&&!I(12)){var Z;E?Z="-ms-transform":H?Z="-webkit-transform":nb?Z="-o-transform":F&&(Z="-moz-transform");Z&&(q=Gc(c,Z));q||(q=Gc(c,"transform"));c=q?(c=q.match(Rc))?new D(parseFloat(c[1]),parseFloat(c[2])):new D(0,0):new D(0,0);c=new D(f.x+c.x,f.y+c.y)}else c=f;q=c}else Z=ga(c.Dd),q=c,c.targetTouches?q=c.targetTouches[0]:Z&&c.gb.targetTouches&&(q=c.gb.targetTouches[0]),q=new D(q.clientX,q.clientY);c=Lc(d);f=Math.floor(c.width/
2);e&&(e.style.left="3px",e.style.height=c.height+"px",e.style.width=c.width+"px");e=!!(h.height<q.y+a.height);a=!!(q.y<a.height);Z=!!(q.x<f);q=!!(h.width<q.x+f);h=(c.width+3)/-2- -5;b=K(b,"force-tooltip-direction");if("left"==b||Z)h=-5;else if("right"==b||q)h=20-c.width-3;d.style.left=Math.floor(h)+"px";return!(e||a)}function dd(a,b,c){a=S(a);var d=b.__yt_uid_key;d||(d=Ub(),b.__yt_uid_key=d);b=a+d;c&&(b+="-"+c);return b}
function gd(a,b){var c=null;ib&&C(Pa(b),S(a,"masked"))&&((c=J("yt-uix-tooltip-shared-mask"))?(c.parentNode.removeChild(c),Tc(c)):(c=document.createElement("iframe"),c.src='javascript:""',c.id="yt-uix-tooltip-shared-mask",c.className=S(a,"tip-mask")));return c}function ed(a){var b=J("yt-uix-tooltip-shared-mask"),c=b&&Ob(b,function(b){return b==a},!1,2);b&&c&&(b.parentNode.removeChild(b),Uc(b),document.body.appendChild(b))};function id(){this.b={};this.h=[]}y(id,Zc);ca(id);id.prototype.Xb="subscription-button";
id.prototype.register=function(){$c(this,"click",this.Cc);this.h.push(P("subscription-subscribe-loading",this.Ec,this),P("subscription-subscribe-loaded",this.Dc,this),P("subscription-unsubscirbe-loading",this.Ec,this),P("subscription-unsubscribe-loaded",this.Dc,this),P("subscription-subscribe-success",this.Od,this),P("subscription-unsubscribe-success",this.Pd,this),P("subscription-enable-ypc",this.Nd,this),P("subscription-disable-ypc",this.Md,this))};
var Nb={Hc:"hover-enabled",Td:"yt-uix-button-subscribe",Ud:"yt-uix-button-subscribed",le:"ypc-enabled",de:"yt-uix-button-subscription-container",ee:"yt-subscription-button-disabled-mask-container"},T={ne:"channel-external-id",Vd:"subscriber-count-show-when-subscribed",Wd:"subscriber-count-tooltip",Xd:"subscriber-count-title",oe:"href",Rc:"is-subscribed",pe:"parent-url",qe:"sessionlink",Yd:"style-type",Sc:"subscription-id",re:"target",$d:"ypc-enabled",Lc:"ypc-item-type",Kc:"ypc-item-id",Mc:"ypc-offers-url"};
g=id.prototype;g.Cc=function(a){var b=K(a,"href");if(b)a=K(a,"target")||"_self",window.open(b,a);else if(ec()){var b=K(a,"channel-external-id"),c=K(a,"sessionlink"),d;if(K(a,"ypc-enabled")){d=K(a,T.Lc);var e=K(a,T.Kc),f=K(a,T.Mc);d={itemType:d,itemId:e,offersUrl:f,subscriptionElement:a}}else d=null;e=K(a,"parent-url");K(a,"is-subscribed")?(f=K(a,"subscription-id"),Q("subscription-unsubscribe",b,f,d,a,c,e)):Q("subscription-subscribe",b,d,a,c,e)}else jd(this,a)};g.Ec=function(a){this.Pa(a,this.Pc,!0)};
g.Dc=function(a){this.Pa(a,this.Pc,!1)};g.Od=function(a,b){this.Pa(a,this.Qc,!0,b)};g.Pd=function(a){this.Pa(a,this.Qc,!1)};g.Nd=function(a){this.Pa(a,this.be)};g.Md=function(a){this.Pa(a,this.ae)};g.Qc=function(a,b,c){b?(Qb(a,T.Rc,"true"),c&&Qb(a,T.Sc,c)):(Sb(a,T.Rc),Sb(a,T.Sc));kd(a)};g.Pc=function(a,b){var c;c=Mb(a);Ta(c,Nb.ee,b);a.setAttribute("aria-busy",b?"true":"false");a.disabled=b};
function kd(a){var b=K(a,T.Yd),c=!!K(a,"is-subscribed"),b="-"+b,d=Nb.Ud+b;Ta(a,Nb.Td+b,!c);Ta(a,d,c);K(a,T.Wd)&&!K(a,T.Vd)&&(b=S(bd.getInstance()),Ta(a,b,!c),a.title=c?"":K(a,T.Xd));c?M(function(){Qa(a,Nb.Hc)},1E3):Ra(a,Nb.Hc)}g.be=function(a){var b=!!K(a,T.Lc),c=!!K(a,T.Kc),d=!!K(a,T.Mc);!K(a,"ypc-enabled")&&(b&&c&&d)&&(Qa(a,"ypc-enabled"),Qb(a,T.$d,"true"))};g.ae=function(a){K(a,"ypc-enabled")&&(Ra(a,"ypc-enabled"),Sb(a,"ypc-enabled"))};
function ld(a,b){var c=Hb(S(a));return ya(c,function(a){return b==K(a,"channel-external-id")},a)}g.fe=function(a,b,c){var d=La(arguments,2);A(a,function(a){b.apply(this,Ha(a,d))},this)};g.Pa=function(a,b,c){var d=ld(this,a),d=Ha([d],La(arguments,1));this.fe.apply(this,d)};function jd(a,b){var c=v(function(a){a.subscription_ajax&&dc("subscription_ajax",a.subscription_ajax);this.Cc(b)},a);Cc(c,"sub_button")};function md(a){a=a||{};this.url=a.url||"";this.urlV8=a.url_v8||"";this.urlV9As2=a.url_v9as2||"";this.args=a.args||ab(nd);this.assets=a.assets||{};this.attrs=a.attrs||ab(od);this.params=a.params||ab(pd);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 nd={enablejsapi:1},od={},pd={allowscriptaccess:"always",allowfullscreen:"true",bgcolor:"#000000"};
function qd(a){a instanceof md||(a=new md(a));return a}md.prototype.A=function(){var a=new md,b;for(b in this){var c=this[b];"object"==da(c)?a[b]=ab(c):a[b]=c}return a};var rd="StopIteration"in m?m.StopIteration:Error("StopIteration");function sd(){}sd.prototype.b=function(){throw rd;};sd.prototype.Na=function(){return this};function td(a){if(a instanceof sd)return a;if("function"==typeof a.Na)return a.Na(!1);if(ea(a)){var b=0,c=new sd;c.b=function(){for(;;){if(b>=a.length)throw rd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");}
function ud(a,b){if(ea(a))try{A(a,b,void 0)}catch(c){if(c!==rd)throw c;}else{a=td(a);try{for(;;)b.call(void 0,a.b(),void 0,a)}catch(d){if(d!==rd)throw d;}}}function vd(a){if(ea(a))return Ia(a);a=td(a);var b=[];ud(a,function(a){b.push(a)});return b};function wd(){};function xd(){}y(xd,wd);xd.prototype.clear=function(){var a=vd(this.Na(!0)),b=this;A(a,function(a){b.remove(a)})};function yd(a){this.b=a}y(yd,xd);g=yd.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(!u(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a};g.remove=function(a){this.b.removeItem(a)};
g.Na=function(a){var b=0,c=this.b,d=new sd;d.b=function(){if(b>=c.length)throw rd;var d;d=c.key(b++);if(a)return d;d=c.getItem(d);if(!u(d))throw"Storage mechanism: Invalid value was encountered";return d};return d};g.clear=function(){this.b.clear()};g.key=function(a){return this.b.key(a)};function zd(){var a=null;try{a=window.localStorage||null}catch(b){}this.b=a}y(zd,yd);function Ad(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 Bd(a){return eval("("+a+")")}function U(a){return Cd(new Dd(void 0),a)}function Dd(a){this.b=a}
function Cd(a,b){var c=[];Ed(a,b,c);return c.join("")}
function Ed(a,b,c){switch(typeof b){case "string":Fd(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(t(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ed(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),Fd(f,c),c.push(":"),
Ed(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 Gd={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Hd=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
function Fd(a,b){b.push('"',a.replace(Hd,function(a){if(a in Gd)return Gd[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Gd[a]=e+b.toString(16)}),'"')};function Id(a){this.Ma=a;this.Oc=new Dd}g=Id.prototype;g.Ma=null;g.Oc=null;g.set=function(a,b){s(b)?this.Ma.set(a,Cd(this.Oc,b)):this.Ma.remove(a)};g.get=function(a){var b;try{b=this.Ma.get(a)}catch(c){return}if(null!==b)try{return Ad(b)}catch(d){throw"Storage: Invalid value was encountered";}};g.remove=function(a){this.Ma.remove(a)};function Jd(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.b=a}y(Jd,yd);function Kd(a){Id.call(this,a)}y(Kd,Id);function Ld(a){this.data=a}function Md(a){return!s(a)||a instanceof Ld?a:new Ld(a)}Kd.prototype.set=function(a,b){Kd.Q.set.call(this,a,Md(b))};Kd.prototype.b=function(a){a=Kd.Q.get.call(this,a);if(!s(a)||a instanceof Object)return a;throw"Storage: Invalid value was encountered";};Kd.prototype.get=function(a){if(a=this.b(a)){if(a=a.data,!s(a))throw"Storage: Invalid value was encountered";}else a=void 0;return a};function Nd(a){Id.call(this,a)}y(Nd,Kd);function Od(a){var b=a.creation;a=a.expiration;return!!a&&a<w()||!!b&&b>w()}Nd.prototype.set=function(a,b,c){if(b=Md(b)){if(c){if(c<w()){Nd.prototype.remove.call(this,a);return}b.expiration=c}b.creation=w()}Nd.Q.set.call(this,a,b)};Nd.prototype.b=function(a,b){var c=Nd.Q.b.call(this,a);if(c)if(!b&&Od(c))Nd.prototype.remove.call(this,a);else return c};function Pd(a){Id.call(this,a)}y(Pd,Nd);function Qd(){var a=Rd,b=[];ud(a.Ma.Na(!0),function(c){var d;try{d=Pd.prototype.b.call(a,c,!0)}catch(e){if("Storage: Invalid value was encountered"==e)return;throw e;}Od(d)&&b.push(c)});A(b,function(b){Pd.prototype.remove.call(a,b)})};function Sd(a,b,c){var d=c&&0<c?c:0;c=d?w()+1E3*d:0;if(d=d?Rd:Td){u(b)||(b=JSON.stringify(b,void 0));try{d.set(a,b,c)}catch(e){d.remove(a)}}}function Ud(a){if(!Td&&!Rd)return null;var b;try{b=Td.get(a),b=u(b)?b:Rd.get(a)}catch(c){return null}if(!u(b))return null;try{b=JSON.parse(b,void 0)}catch(d){}return b}var Rd,Vd=new zd;Rd=Vd.isAvailable()?new Pd(Vd):null;var Td,Wd=new Jd;Td=Wd.isAvailable()?new Pd(Wd):null;function Xd(){var a={volume:100,muted:!1,nonNormalized:100},b=Ud("yt-player-volume");if(!b){var c=new zd;c.isAvailable()&&(b=(new Id(c)).get("yt-player-volume"))}b=b||{};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 Yd(a){this.b=a}var Zd=/\s*;\s*/;g=Yd.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+'"');s(c)||(c=-1);e=e?";domain="+e:"";d=d?";path="+d:"";f=f?";secure":"";c=0>c?"":0==c?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(w()+1E3*c)).toUTCString();this.b.cookie=a+"="+b+e+d+c+f};
g.get=function(a,b){for(var c=a+"=",d=(this.b.cookie||"").split(Zd),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=s(this.get(a));this.set(a,"",0,b,c);return d};g.ja=function(){return $d(this).keys};g.Z=function(){return $d(this).Gd};g.clear=function(){for(var a=$d(this).keys,b=a.length-1;0<=b;b--)this.remove(a[b])};
function $d(a){a=(a.b.cookie||"").split(Zd);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,Gd:c}}var ae=new Yd(document);ae.g=3950;function be(a,b,c){ae.set(""+a,b,c,"/","youtube.com")}function ce(a){return ae.get(""+a,void 0)}function de(){ae.remove("remote_sid","/","youtube.com")};function ee(){var a=ce("PREF");if(a)for(var a=unescape(a).split("&"),b=0;b<a.length;b++){var c=a[b].split("="),d=c[0];(c=c[1])&&(fe[d]=c.toString())}}ca(ee);var fe=n("yt.prefs.UserPrefs.prefs_")||{};x("yt.prefs.UserPrefs.prefs_",fe);function ge(a){if(/^f([1-9][0-9]*)$/.test(a))throw"ExpectedRegexMatch: "+a;}function he(a){if(!/^\w+$/.test(a))throw"ExpectedRegexMismatch: "+a;}ee.prototype.get=function(a,b){he(a);ge(a);var c=void 0!==fe[a]?fe[a].toString():null;return null!=c?c:b?b:""};
ee.prototype.set=function(a,b){he(a);ge(a);if(null==b)throw"ExpectedNotNull";fe[a]=b.toString()};ee.prototype.remove=function(a){he(a);ge(a);delete fe[a]};ee.prototype.clear=function(){fe={}};function ie(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=na(e[0]||""),e=na(e[1]||"");f in b?t(b[f])?Ja(b[f],e):b[f]=[b[f],e]:b[f]=e}}return b}function je(a){a=Ac([],a);a[0]="";return a.join("")}var ke=wc;function le(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=ie(d[1]||""),e;for(e in b)d[e]=b[e];return xc(Ac([a],d))+c}
function me(a){a=ke(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 ne(){this.b=[];oe(this)}ca(ne);g=ne.prototype;g.O=0;g.Aa=0;g.hb=0;g.Ub="";g.oa=0;g.load=function(a){3<=this.oa?a(this):this.b.push(a)};g.getVersion=function(){return[this.O,this.Aa,this.hb]};function pe(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.O>b[0]||a.O==b[0]&&a.Aa>b[1]||a.O==b[0]&&a.Aa==b[1]&&a.hb>=b[2]}
function qe(a){return-1<a.Ub.indexOf("Gnash")&&-1==a.Ub.indexOf("AVM2")||9==a.O&&1==a.Aa||9==a.O&&0==a.Aa&&1==a.hb?!1:9<=a.O}function re(a){return-1<navigator.userAgent.indexOf("Sony/COM2")&&!pe(a,9,1,58)?!1:!0}
function oe(a){if(3>a.oa)if(1>a.oa){var b=n("window.navigator.plugins"),c=n("window.navigator.mimeTypes"),b=b&&b["Shockwave Flash"],c=c&&c["application/x-shockwave-flash"],c=b&&c&&c.enabledPlugin&&b.description||"";if(b=c){var d=b.indexOf("Shockwave Flash");0<=d&&(b=b.substr(d+15));for(var d=b.split(" "),e="",b="",f=0,h=d.length;f<h;f++)if(e)if(b)break;else b=d[f];else e=d[f];e=e.split(".");d=parseInt(e[0],10)||0;e=parseInt(e[1],10)||0;f=0;if("r"==b.charAt(0)||"d"==b.charAt(0))f=parseInt(b.substr(1),
10)||0;b=[d,e,f]}else b=[0,0,0];a.Ub=c;c=b;a.O=c[0];a.Aa=c[1];a.hb=c[2];a.oa=1;0<a.O?se(a):oe(a)}else 2>a.oa?te(a):se(a)}g.Uc=function(a){a?(a=a.split(" ")[1].split(","),a=[parseInt(a[0],10)||0,parseInt(a[1],10)||0,parseInt(a[2],10)||0]):a=[0,0,0];this.O=a[0];this.Aa=a[1];this.hb=a[2];this.oa=2;0<this.O?se(this):oe(this)};function se(a){if(3>a.oa){a.oa=3;for(var b=0,c=a.b.length;b<c;b++)a.b[b](a);a.b=[]}}
function te(a){function b(){if(c&&"GetVariable"in c)try{d=c.GetVariable("$version")}catch(a){d=""}d||10<=l?(e&&f&&e.removeChild(f),k(d||"")):(l++,M(b,10))}var c,d,e,f;if(ic){try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(h){c=null}c||a.Uc("")}else e=document.getElementsByTagName("body")[0],f=document.createElement("object"),f.setAttribute("type","application/x-shockwave-flash"),c=e.appendChild(f);var k=v(a.Uc,a),l=0;M(b,0)};function ue(a,b,c){if((a=J(a))&&b&&c){c=qd(c);var d=ab(c.attrs);d.tabindex=0;var e=ab(c.params);e.flashvars=je(c.args);if(ic){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");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 ve(a,b){a=J(a);b=qd(b);if(window!=window.top){var c=null;document.referrer&&(c=document.referrer.substring(0,128));b.args.framer=c}we(function(c){pe(c,b.minVersion)||L("IS_OPERA_MINI")?(c=qe(c)&&b.url||re(c)&&b.urlV9As2||b.urlV8||b.url,ue(a,c,b)):xe(a,b,c)})}
function ye(a,b,c){if(a&&a.attrs&&a.attrs.id){a=qd(a);var d=!!b,e=J(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);me(k)||(h=k)}else h="unknown";h&&(d=!0,a.args.framer=h)}we(function(b){if(pe(b,a.minVersion)||L("IS_OPERA_MINI")){var h=qe(b)&&a.url||re(b)&&a.urlV9As2||a.urlV8||a.url,k="";-1<navigator.userAgent.indexOf("Sony/COM2")||(k=e.getAttribute("src")||e.movie);(k!=h||d)&&ue(f,h,a);(ib?pe(b,11,2):hb?pe(b,
11,3):qe(b))||(b=J("flash10-promo-div"),ee.getInstance(),h=void 0!==fe["f"+(Math.floor(107/31)+1)]?fe["f"+(Math.floor(107/31)+1)].toString():null,h=!!(((null!=h&&/^[A-Fa-f0-9]+$/.test(h)?parseInt(h,16):null)||0)&16384),b&&!h&&Tc(b))}else xe(f,a,b);c&&c()})}else M(function(){ye(a,b,c)},50)}}
function xe(a,b,c){0==c.O&&b.fallback?b.fallback():0==c.O&&b.fallbackMessage?b.fallbackMessage():a.innerHTML='<div id="flash-upgrade">'+hc("FLASH_UPGRADE",void 0,'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 we(a){ne.getInstance().load(function(b){ee.getInstance().set("fv",b.getVersion().join("."));var c=[],d;for(d in fe)c.push(d+"="+escape(fe[d]));be("PREF",c.join("&"),31536E4);a(b)})};function ze(a){return a.dataset?a.dataset.loaded:a.getAttribute("data-"+Ae())};function Be(a){if(document.querySelectorAll)return document.querySelectorAll(a);if(Ce){var b=document.createElement("style"),c=document.getElementsByTagName("head")[0];c.appendChild(b);window.__qsa=[];b.styleSheet.cssText=a+"{x:expression(__qsa.push(this))}";document.body.style.cssText+="";document.body.style.zoom=1;c.removeChild(b);return window.__qsa.slice(0)}return[]}var Ce="Microsoft Internet Explorer"==navigator.appName;function De(a,b){a in Ee||(Ee[a]=[]);Ee[a].push([b,void 0])}function Fe(a,b){if(a in Ee)for(var c=Ee[a],d=Array.prototype.slice.call(arguments,1),e=0,f=c.length;e<f;e++)c[e]&&c[e][0].apply(c[e][1],d)}function Ge(a){a?a in Ee&&delete Ee[a]:Ee={}}var Ee={};function He(a){for(var b=0,c=0,d=a.length;c<d;++c)b=31*b+a.charCodeAt(c),b%=4294967296;return b}function Ae(){return"loaded".replace(/([A-Z])/g,"-$1").toLowerCase()};function Ie(a,b,c){var d="js-"+He(a);c=c||"";var e=document.getElementById(d),f=e&&ze(e),h=e&&!f;if(f)b&&b();else if(b&&De(d,b),!h)var k=c?Be("script."+c):[],e=Je(a,d,c,function(){if(!ze(e)){var a=e;a.dataset?a.dataset.loaded="true":a.setAttribute("data-"+Ae(),"true");for(var a=0,b=k.length;a<b;a++)Ge(k[a].id),k[a].parentNode.removeChild(k[a]);Fe(d);Ge(d)}})}
function Je(a,b,c,d){var e=document.createElement("script");e.id=b;e.className=c;e.onload=function(){d&&setTimeout(d,0)};e.onreadystatechange=function(){switch(e.readyState){case "loaded":case "complete":e.onload()}};e.src=a;a=document;a=a.getElementsByTagName("head")[0]||a.body;a.insertBefore(e,a.firstChild);return e};function Ke(a,b){var c=a.match(Le);Ie(a,b,c?c[1]:"")}var Le=/jsbin\/(?:debug-)?([a-zA-Z0-9_-]+?)(?:-vfl|.js)/;var Me;var Ne=jb(),Ne=Ne.toLowerCase();if(-1!=Ne.indexOf("android")){var Oe=Ne.match(/android\D*(\d\.\d)[^\;|\)]*[\;\)]/);if(Oe)Me=Number(Oe[1]);else{var Pe={cupcake:1.5,donut:1.6,eclair:2,froyo:2.2,gingerbread:2.3,honeycomb:3,"ice cream sandwich":4,jellybean:4.1},Qe=Ne.match("("+Xa(Pe).join("|")+")");Me=Qe?Pe[Qe[0]]:0}}else Me=void 0;function Re(){if(2.2==Me)return!0;var a;a=n("yt.player.utils.videoElement_");a||(a=document.createElement("video"),x("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 Se(a,b){this.g={};this.b=[];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 Se?(c=a.ja(),d=a.Z()):(c=Xa(a),d=Wa(a));for(var e=0;e<c.length;e++)this.set(c[e],d[e])}}g=Se.prototype;g.t=0;g.$a=0;g.Z=function(){Te(this);for(var a=[],b=0;b<this.b.length;b++)a.push(this.g[this.b[b]]);return a};g.ja=function(){Te(this);return this.b.concat()};
g.clear=function(){this.g={};this.$a=this.t=this.b.length=0};g.remove=function(a){return Ue(this.g,a)?(delete this.g[a],this.t--,this.$a++,this.b.length>2*this.t&&Te(this),!0):!1};function Te(a){if(a.t!=a.b.length){for(var b=0,c=0;b<a.b.length;){var d=a.b[b];Ue(a.g,d)&&(a.b[c++]=d);b++}a.b.length=c}if(a.t!=a.b.length){for(var e={},c=b=0;b<a.b.length;)d=a.b[b],Ue(e,d)||(a.b[c++]=d,e[d]=1),b++;a.b.length=c}}g.get=function(a,b){return Ue(this.g,a)?this.g[a]:b};
g.set=function(a,b){Ue(this.g,a)||(this.t++,this.b.push(a),this.$a++);this.g[a]=b};g.A=function(){return new Se(this)};g.Na=function(a){Te(this);var b=0,c=this.b,d=this.g,e=this.$a,f=this,h=new sd;h.b=function(){for(;;){if(e!=f.$a)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw rd;var h=c[b++];return a?h:d[h]}};return h};function Ue(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Ve(a){if("function"==typeof a.Z)return a.Z();if(u(a))return a.split("");if(ea(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return Wa(a)}function We(a,b,c){if("function"==typeof a.forEach)a.forEach(b,c);else if(ea(a)||u(a))A(a,b,c);else{var d;if("function"==typeof a.ja)d=a.ja();else if("function"!=typeof a.Z)if(ea(a)||u(a)){d=[];for(var e=a.length,f=0;f<e;f++)d.push(f)}else d=Xa(a);else d=void 0;for(var e=Ve(a),f=e.length,h=0;h<f;h++)b.call(c,e[h],d&&d[h],a)}};function Xe(a,b){var c;if(a instanceof Xe)this.za=s(b)?b:a.za,Ye(this,a.La),this.Ab=a.Ab,Ze(this,a.Ka),$e(this,a.eb),this.fb=a.fb,af(this,a.b.A()),this.zb=a.zb;else if(a&&(c=uc(String(a)))){this.za=!!b;Ye(this,c[1]||"",!0);var d=c[2]||"";this.Ab=d?decodeURIComponent(d):"";Ze(this,c[3]||"",!0);$e(this,c[4]);this.fb=(d=c[5]||"")?decodeURIComponent(d):"";af(this,c[6]||"",!0);this.zb=(c=c[7]||"")?decodeURIComponent(c):""}else this.za=!!b,this.b=new bf(null,0,this.za)}g=Xe.prototype;g.La="";g.Ab="";
g.Ka="";g.eb=null;g.fb="";g.zb="";g.za=!1;g.toString=function(){var a=[],b=this.La;b&&a.push(cf(b,df),":");if(b=this.Ka){a.push("//");var c=this.Ab;c&&a.push(cf(c,df),"@");a.push(encodeURIComponent(String(b)));b=this.eb;null!=b&&a.push(":",String(b))}if(b=this.fb)this.Ka&&"/"!=b.charAt(0)&&a.push("/"),a.push(cf(b,"/"==b.charAt(0)?ef:ff));(b=this.b.toString())&&a.push("?",b);(b=this.zb)&&a.push("#",cf(b,gf));return a.join("")};g.A=function(){return new Xe(this)};
function Ye(a,b,c){a.La=c?b?decodeURIComponent(b):"":b;a.La&&(a.La=a.La.replace(/:$/,""))}function Ze(a,b,c){a.Ka=c?b?decodeURIComponent(b):"":b}function $e(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.eb=b}else a.eb=null}function af(a,b,c){b instanceof bf?(a.b=b,hf(a.b,a.za)):(c||(b=cf(b,jf)),a.b=new bf(b,0,a.za))}function V(a,b,c){a.b.set(b,c)}function kf(a,b,c){t(c)||(c=[String(c)]);lf(a.b,b,c)}
function mf(a){V(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^w()).toString(36));return a}function nf(a,b,c,d){var e=new Xe(null,void 0);a&&Ye(e,a);b&&Ze(e,b);c&&$e(e,c);d&&(e.fb=d);return e}function cf(a,b){return u(a)?encodeURI(a).replace(b,of):null}function of(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var df=/[#\/\?@]/g,ff=/[\#\?:]/g,ef=/[\#\?]/g,jf=/[\#\?@]/g,gf=/#/g;
function bf(a,b,c){this.b=a||null;this.g=!!c}function pf(a){if(!a.C&&(a.C=new Se,a.t=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=na(e);e=qf(a,e);d=a;f=f?na(f):"";pf(d);d.b=null;var e=qf(d,e),h=d.C.get(e);h||d.C.set(e,h=[]);h.push(f);d.t++}}g=bf.prototype;g.C=null;g.t=null;
g.remove=function(a){pf(this);a=qf(this,a);return Ue(this.C.g,a)?(this.b=null,this.t-=this.C.get(a).length,this.C.remove(a)):!1};g.clear=function(){this.C=this.b=null;this.t=0};function rf(a,b){pf(a);b=qf(a,b);return Ue(a.C.g,b)}g.ja=function(){pf(this);for(var a=this.C.Z(),b=this.C.ja(),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.Z=function(a){pf(this);var b=[];if(a)rf(this,a)&&(b=Ha(b,this.C.get(qf(this,a))));else{a=this.C.Z();for(var c=0;c<a.length;c++)b=Ha(b,a[c])}return b};g.set=function(a,b){pf(this);this.b=null;a=qf(this,a);rf(this,a)&&(this.t-=this.C.get(a).length);this.C.set(a,[b]);this.t++;return this};g.get=function(a,b){var c=a?this.Z(a):[];return 0<c.length?String(c[0]):b};function lf(a,b,c){a.remove(b);0<c.length&&(a.b=null,a.C.set(qf(a,b),Ia(c)),a.t+=c.length)}
g.toString=function(){if(this.b)return this.b;if(!this.C)return"";for(var a=[],b=this.C.ja(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.Z(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.A=function(){var a=new bf;a.b=this.b;this.C&&(a.C=this.C.A(),a.t=this.t);return a};function qf(a,b){var c=String(b);a.g&&(c=c.toLowerCase());return c}
function hf(a,b){b&&!a.g&&(pf(a),a.b=null,We(a.C,function(a,b){var e=b.toLowerCase();b!=e&&(this.remove(b),lf(this,e,a))},a));a.g=b};var sf="corp.google.com youtube.com youtube-nocookie.com prod.google.com sandbox.google.com docs.google.com drive.google.com play.google.com".split(" ");function tf(a){a&&(this.name=a.name,this.aa=a.screenId,this.X=a.loungeToken,this.K=a.dialId||"")}g=tf.prototype;g.name="";g.aa="";g.X="";g.K="";g.Tc=function(){return{key:this.aa,name:this.name}};function uf(a){return{name:a.name,screenId:a.aa,loungeToken:a.X,dialId:a.K}}function vf(a){return U(a?uf(a):null)}function wf(a){a=a||[];a=za(a,function(a){return vf(a)});return U(a)};function xf(a){a&&(this.id=a.id||"",this.name=a.name||"",this.activityId=a.activityId||"",this.status=a.status||"UNKNOWN")}g=xf.prototype;g.id="";g.name="";g.activityId="";g.status="UNKNOWN";g.Tc=function(){return{key:this.id,name:this.name}};function yf(a){return{id:a.id,name:a.name,activityId:a.activityId,status:a.status}}function zf(a){a=a||[];a=za(a,function(a){return U(a?yf(a):null)});return U(a)};function Af(){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 Bf(a,b){return B(a,function(a){return a.key==b})}function Cf(a){return za(a,function(a){return a.Tc()})}function Df(a){return za(a,function(a){return yf(a)})}function Ef(a){return za(a,function(a){return new xf(a)})}function Ff(a,b){return a||b?a&&b?a.id==b.id&&a.name==b.name:!1:!0}function Gf(a,b){return B(a,function(a){return a.id==b})}
function Hf(a){return za(a,function(a){return uf(a)})}function If(a){return za(a,function(a){return new tf(a)})}function Jf(a,b){return a||b?a&&b?a.aa==b.aa:!1:!0}function Kf(a,b){return a||b?a&&b?a.aa==b.aa&&a.X==b.X&&a.name==b.name&&a.K==b.K:!1:!0}function Lf(a,b){return B(a,function(a){return Jf(a,b)})}function Mf(a,b){return B(a,function(a){return b==a.aa||b==a.K})};function Nf(){var a=ce("remote_sid")||Ud("yt-remote-session-id");a||(a=Af());Sd("yt-remote-session-id",a);return a}function Of(){var a="yt-remote-session-connected-devices-"+Nf();return Ud(a)||[]}function Pf(){if(Qf)return Qf;var a=Ud("yt-remote-device-id");a||(a=Af(),Sd("yt-remote-device-id",a,31536E3));for(var b=Of(),c=1,d=a;C(b,d);)c++,d=a+"#"+c;return Qf=d}function Rf(a){be("remote_sid",Nf());Sd("yt-remote-session-screen-"+Nf(),a,600)}
function Sf(){return Ud("yt-remote-session-screen-"+Nf())}function Tf(){var a="yt-remote-session-screen-"+Nf();Td&&Td.remove(a);Rd&&Rd.remove(a);de()}function Uf(){return Ud("yt-remote-online-screens")||[]}function Vf(a){Sd("yt-remote-online-dial-devices",a,30)}function Wf(){return Ud("yt-remote-online-dial-devices")||[]}function Xf(a){var b=Of(),c=Pf();a?C(b,c)||b.push(c):Fa(b,c);a="yt-remote-session-connected-devices-"+Nf();Sd(a,b,86400)}var Qf="";function Yf(){return If(Ud("yt-remote-app-screens")||[])}function Zf(){var a=If(Uf()),b=Ef(Wf()),b=ya(b,function(b){return!Mf(a,b.id)});return Cf(Ha(a,b))};function $f(a){return ag(a||arguments.callee.caller,[])}
function ag(a,b){var c=[];if(C(b,a))c.push("[...circular reference...]");else if(a&&50>b.length){c.push(bg(a)+"(");for(var d=a.arguments,e=0;e<d.length;e++){0<e&&c.push(", ");var f;f=d[e];switch(typeof f){case "object":f=f?"object":"null";break;case "string":break;case "number":f=String(f);break;case "boolean":f=f?"true":"false";break;case "function":f=(f=bg(f))?f:"[fn]";break;default:f=typeof f}40<f.length&&(f=f.substr(0,40)+"...");c.push(f)}b.push(a);c.push(")\n");try{c.push(ag(a.caller,b))}catch(h){c.push("[exception trying to get caller]\n")}}else a?
c.push("[...long stack...]"):c.push("[end]");return c.join("")}function bg(a){if(cg[a])return cg[a];a=String(a);if(!cg[a]){var b=/function ([^\(]+)/.exec(a);cg[a]=b?b[1]:"[Anonymous]"}return cg[a]}var cg={};function dg(a,b,c,d,e){"number"==typeof e||eg++;this.i=d||w();this.p=a;this.k=b;this.h=c;delete this.g;delete this.b}dg.prototype.g=null;dg.prototype.b=null;var eg=0;dg.prototype.getMessage=function(){return this.k};function W(a){this.g=a}W.prototype.b=null;function fg(a,b){this.name=a;this.value=b}fg.prototype.toString=function(){return this.name};var gg=new fg("SHOUT",1200),hg=new fg("SEVERE",1E3),ig=new fg("WARNING",900),jg=new fg("INFO",800);g=W.prototype;g.ld=function(){};g.nd=function(){return!1};g.getChildren=function(){this.b||(this.b={});return this.b};g.log=function(){};
g.md=function(a,b,c){var d=new dg(a,String(b),this.g);if(c){d.g=c;var e;var f=arguments.callee.caller;try{var h;var k=n("window.location.href");if(u(c))h={message:c,name:"Unknown error",lineNumber:"Not available",fileName:k,stack:"Not available"};else{var l,p,r=!1;try{l=c.lineNumber||c.ie||"Not available"}catch(G){l="Not available",r=!0}try{p=c.fileName||c.filename||c.sourceURL||m.$googDebugFname||k}catch(q){p="Not available",r=!0}h=!r&&c.lineNumber&&c.fileName&&c.stack?c:{message:c.message,name:c.name,
lineNumber:l,fileName:p,stack:c.stack||"Not available"}}e="Message: "+oa(h.message)+'\nUrl: <a href="view-source:'+h.fileName+'" target="_new">'+h.fileName+"</a>\nLine: "+h.lineNumber+"\n\nBrowser stack:\n"+oa(h.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+oa($f(f)+"-> ")}catch(Z){e="Exception trying to expose exception! You win, we lose. "+Z}d.b=e}return d};g.info=function(){};function kg(){}var lg={},mg=null;function ng(){mg||(mg=new W(""),lg[""]=mg)}
function og(a){ng();var b;if(!(b=lg[a])){b=new W(a);var c=a.lastIndexOf("."),d=a.substr(c+1);og(a.substr(0,c)).getChildren()[d]=b;lg[a]=b}return b};function pg(){this.b=w()}var qg=new pg;pg.prototype.set=function(a){this.b=a};pg.prototype.get=function(){return this.b};function rg(a){this.h=a||"";this.i=qg}rg.prototype.g=!0;rg.prototype.b=!1;function sg(a){return 10>a?"0"+a:String(a)}function tg(a,b){var c=(a.i-b)/1E3,d=c.toFixed(3),e=0;if(1>c)e=2;else for(;100>c;)e++,c*=10;for(;0<e--;)d=" "+d;return d}function ug(a){rg.call(this,a)}y(ug,rg);
function vg(a,b){var c=[];c.push(a.h," ");if(a.g){var d=new Date(b.i);c.push("[",sg(d.getFullYear()-2E3)+sg(d.getMonth()+1)+sg(d.getDate())+" "+sg(d.getHours())+":"+sg(d.getMinutes())+":"+sg(d.getSeconds())+"."+sg(Math.floor(d.getMilliseconds()/10)),"] ")}c.push("[",tg(b,a.i.get()),"s] ");c.push("[",b.h,"] ");c.push(b.getMessage(),"\n");a.b&&b.g&&c.push(b.b,"\n");return c.join("")};function wg(){v(this.i,this);this.b=new ug;this.b.g=!1;this.g=this.b.b=!1;this.h="";this.p={}}function xg(){var a=yg;!0!=a.g&&(ng(),a.g=!0)}wg.prototype.i=function(a){if(!this.p[a.h]){var b=vg(this.b,a),c=zg;if(c)switch(a.p){case gg:Ag(c,"info",b);break;case hg:Ag(c,"error",b);break;case ig:Ag(c,"warn",b);break;default:Ag(c,"debug",b)}else window.opera?window.opera.postError(b):this.h+=b}};var yg=null,zg=window.console;function Ag(a,b,c){if(a[b])a[b](c);else a.log(c)};function Bg(){this.B=new O;oc(this,ma(pc,this.B))}y(Bg,nc);Bg.prototype.G=function(a,b,c){return this.p?0:this.B.G(a,b,c)};Bg.prototype.la=function(a,b,c){return this.p?!1:this.B.la(a,b,c)};Bg.prototype.ma=function(a){return this.p?!1:this.B.ma(a)};Bg.prototype.u=function(a,b){return this.p?!1:this.B.u.apply(this.B,arguments)};var Cg=null,Dg=null;function Eg(a,b){var c=n("yt.remote.debug.logger_");if(c){c.log(jg,a+": "+b,void 0);var d=n("yt.remote.debug.handlers_");if(d&&0!=d.length){var e=c.getLogRecord(jg,a+": "+b,void 0);A(d,function(a){a(e)})}}};function Fg(a){a&&(this.id=a.id||a.name,this.name=a.name,this.app=a.app,this.type=a.type||"REMOTE_CONTROL",this.wc=a.user||"")}g=Fg.prototype;g.id="";g.name="";g.app="";g.type="REMOTE_CONTROL";g.wc="";function Gg(a){Eg("DIAL",a)}function Hg(a){var b=Ig();a=vg(Jg,a);b.logMessage(a)}
function Kg(){if(!Lg){0==Da.length&&Ja(Da,Wf());var a;"cast"in window?(a=window.cast||{},a="ActivityStatus"in a&&"Api"in a&&"IApi"in a&&"LaunchRequest"in a&&"Receiver"in a):a=!1;a&&((a=Ig())?(a.removeReceiverListener("YouTube",Mg),a.addReceiverListener("YouTube",Mg),Gg("API initialized in the other binary")):(a=new cast.Api,x("yt.remote.dialapi.api_",a),a.addReceiverListener("YouTube",Mg),Jg=new ug,Jg.g=!1,Jg.b=!1,a.logMessage&&(n("yt.remote.debug.logger_")||(yg||(yg=new wg),-1!=window.location.href.indexOf("Debug=true")&&
xg(),xg(),yg.b.b=!0,Cg=n("yt.remote.debug.logger_")||og("yt.remote"),W.prototype.log=W.prototype.log,W.prototype.getLogRecord=W.prototype.md,W.prototype.addHandler=W.prototype.ld,W.prototype.removeHandler=W.prototype.nd,x("yt.remote.debug.logger_",Cg),Dg=n("yt.remote.debug.handlers_")||[],x("yt.remote.debug.handlers_",Dg),n("yt.remote.debug.logger_")),n("yt.remote.debug.handlers_").push(Hg)),Gg("API initialized")),Lg=!0)}}
function Ng(a){var b=Ba(Da,function(b){return b.id==a.id});0<=b&&(Da[b]=yf(a))}function Mg(a){Gg("Updating receivers: "+U(a));Og(a);Q("yt-remote-dial-device-list-update",Pg());A(Pg(),function(a){Qg(a.id)});A(a,function(a){a.isTabProjected&&(a=Rg(a.id),Gg("Detected device: "+a.id+" is tab projected. Firing DEVICE_TAB_PROJECTED event."),Q("yt-remote-dial-device-tab-projected",a))})}
function Sg(a,b){Gg("Updating "+a+" activity status: "+U(b));var c=Rg(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=""),Ng(c),Q("yt-remote-dial-device-status-update",c)):Gg("Device not found")}function Pg(){Kg();return Ef(Da)}
function Og(a){a=za(a,function(a){var c={id:a.id,name:a.name};if(a=Rg(a.id))c.activityId=a.activityId,c.status=a.status;return c});Ca();Ja(Da,a)}function Rg(a){var b=Pg();return B(b,function(b){return b.id==a})||null}function Qg(a){var b=Rg(a),c=Ig();c&&(b&&b.activityId)&&c.getActivityStatus(b.activityId,function(b){"error"==b.status&&(b.status="stopped");Sg(a,b)})}
function Tg(a,b,c,d){Kg();var e=Rg(a),f=Ig();f&&e?(e=new cast.Receiver(e.id,e.name),e=new cast.LaunchRequest("YouTube",e),e.parameters="pairingCode="+b,e.description=new cast.LaunchDescription,e.description.text=document.title,c&&(e.parameters+="&v="+c,d&&(e.parameters+="&t="+Math.round(d)),e.description.url="http://i.ytimg.com/vi/"+c+"/default.jpg"),Gg("Sending a DIAL launch request with params: "+e.parameters),f.launch(e,ma(Sg,a))):Gg("No DIAL API or no DIAL device. Dropping DIAL launch.")}
function Ug(a){Kg();var b=Rg(a),c=Ig();c&&b&&b.activityId?(Gg("Stopping DIAL activity"),c.stopActivity(b.activityId,ma(Sg,a))):Gg("Dropping DIAL activity stop")}function Ig(){return n("yt.remote.dialapi.api_")}var Jg=null,Lg=!1,Da=n("yt.remote.dialapi.devices_")||[];x("yt.remote.dialapi.devices_",Da);function X(a,b){this.type=a;this.currentTarget=this.target=b}X.prototype.dispose=function(){};X.prototype.b=!1;X.prototype.g=!0;X.prototype.preventDefault=function(){this.g=!1};function Vg(a){Vg[" "](a);return a}Vg[" "]=ba;var Wg=!E||Ab(9),Xg=E&&!I("9");!H||I("528");F&&I("1.9b")||E&&I("8")||nb&&I("9.5")||H&&I("528");F&&!I("8")||E&&I("9");function Yg(a,b){a&&this.init(a,b)}y(Yg,X);g=Yg.prototype;g.target=null;g.relatedTarget=null;g.clientX=0;g.clientY=0;g.keyCode=0;g.charCode=0;g.ctrlKey=!1;g.altKey=!1;g.shiftKey=!1;g.gb=null;
g.init=function(a,b){var c=this.type=a.type;X.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(F){var e;t:{try{Vg(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.gb=a;a.defaultPrevented&&this.preventDefault();delete this.b};g.preventDefault=function(){Yg.Q.preventDefault.call(this);var a=this.gb;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Xg)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};g.Dd=function(){return this.gb};var Zg="closure_listenable_"+(1E6*Math.random()|0),$g=0;function ah(a,b,c,d,e,f){this.Y=a;this.proxy=b;this.src=c;this.type=d;this.capture=!!e;this.ya=f;this.key=++$g;this.removed=this.Oa=!1};var bh={},ch={},dh={},eh={};
function fh(a,b,c,d,e){if(t(b)){for(var f=0;f<b.length;f++)fh(a,b[f],c,d,e);return null}c=gh(c);if(a&&a[Zg])a=a.jb(b,c,d,e);else t:{if(!b)throw Error("Invalid event type");d=!!d;var h=ch;b in h||(h[b]={t:0,ha:0});h=h[b];d in h||(h[d]={t:0,ha:0},h.t++);var h=h[d],f=ha(a),k;h.ha++;if(h[f]){k=h[f];for(var l=0;l<k.length;l++)if(h=k[l],h.Y==c&&h.ya==e){if(h.removed)break;k[l].Oa=!1;a=k[l];break t}}else k=h[f]=[],h.t++;l=hh();h=new ah(c,l,a,b,d,e);h.Oa=!1;l.src=a;l.Y=h;k.push(h);dh[f]||(dh[f]=[]);dh[f].push(h);
a.addEventListener?a.addEventListener(b,l,d):a.attachEvent(b in eh?eh[b]:eh[b]="on"+b,l);a=bh[h.key]=h}return a}function hh(){var a=ih,b=Wg?function(c){return a.call(b.src,b.Y,c)}:function(c){c=a.call(b.src,b.Y,c);if(!c)return c};return b}function jh(a,b,c,d,e){if(t(b))for(var f=0;f<b.length;f++)jh(a,b[f],c,d,e);else if(c=gh(c),a&&a[Zg])a.Sb(b,c,d,e);else if(d=!!d,a=kh(a,b,d))for(f=0;f<a.length;f++)if(a[f].Y==c&&a[f].capture==d&&a[f].ya==e){lh(a[f]);break}}
function lh(a){if(fa(a)||!a||a.removed)return!1;var b=a.src;if(b&&b[Zg])return mh(b,a);var c=a.type,d=a.proxy,e=a.capture;b.removeEventListener?b.removeEventListener(c,d,e):b.detachEvent&&b.detachEvent(c in eh?eh[c]:eh[c]="on"+c,d);b=ha(b);dh[b]&&(d=dh[b],Fa(d,a),0==d.length&&delete dh[b]);a.removed=!0;a.Y=null;a.proxy=null;a.src=null;a.ya=null;if(d=ch[c][e][b])d.Fc=!0,nh(c,e,b,d);delete bh[a.key];return!0}
function nh(a,b,c,d){if(!d.Db&&d.Fc){for(var e=0,f=0;e<d.length;e++)d[e].removed||(e!=f&&(d[f]=d[e]),f++);d.length=f;d.Fc=!1;0==f&&(delete ch[a][b][c],ch[a][b].t--,0==ch[a][b].t&&(delete ch[a][b],ch[a].t--),0==ch[a].t&&delete ch[a])}}function kh(a,b,c){var d=ch;return b in d&&(d=d[b],c in d&&(d=d[c],a=ha(a),d[a]))?d[a]:null}
function oh(a,b,c,d,e){var f=1;b=ha(b);if(a[b]){var h=--a.ha,k=a[b];k.Db?k.Db++:k.Db=1;try{for(var l=k.length,p=0;p<l;p++){var r=k[p];r&&!r.removed&&(f&=!1!==ph(r,e))}}finally{a.ha=Math.max(h,a.ha),k.Db--,nh(c,d,b,k)}}return Boolean(f)}function ph(a,b){var c=a.Y,d=a.ya||a.src;a.Oa&&lh(a);return c.call(d,b)}
function ih(a,b){if(a.removed)return!0;var c=a.type,d=ch;if(!(c in d))return!0;var d=d[c],e,f;if(!Wg){e=b||n("window.event");var h=!0 in d,k=!1 in d;if(h){if(0>e.keyCode||void 0!=e.returnValue)return!0;t:{var l=!1;if(0==e.keyCode)try{e.keyCode=-1;break t}catch(p){l=!0}if(l||void 0==e.returnValue)e.returnValue=!0}}l=new Yg;l.init(e,this);e=!0;try{if(h){for(var r=[],G=l.currentTarget;G;G=G.parentNode)r.push(G);f=d[!0];f.ha=f.t;for(var q=r.length-1;!l.b&&0<=q&&f.ha;q--)l.currentTarget=r[q],e&=oh(f,r[q],
c,!0,l);if(k)for(f=d[!1],f.ha=f.t,q=0;!l.b&&q<r.length&&f.ha;q++)l.currentTarget=r[q],e&=oh(f,r[q],c,!1,l)}else e=ph(a,l)}finally{r&&(r.length=0)}return e}c=new Yg(b,this);return e=ph(a,c)}var qh="__closure_events_fn_"+(1E9*Math.random()>>>0);function gh(a){return ga(a)?a:a[qh]||(a[qh]=function(b){return a.handleEvent(b)})};function rh(){this.g={};this.od=this}y(rh,nc);rh.prototype[Zg]=!0;g=rh.prototype;g.Rb=null;g.addEventListener=function(a,b,c,d){fh(this,a,b,c,d)};g.removeEventListener=function(a,b,c,d){jh(this,a,b,c,d)};
function Y(a,b){var c,d=a.Rb;if(d){c=[];for(var e=1;d;d=d.Rb)c.push(d),++e}var d=a.od,e=b,f=e.type||e;if(u(e))e=new X(e,d);else if(e instanceof X)e.target=e.target||d;else{var h=e,e=new X(f,d);cb(e,h)}var h=!0,k;if(c)for(var l=c.length-1;!e.b&&0<=l;l--)k=e.currentTarget=c[l],h=sh(k,f,!0,e)&&h;e.b||(k=e.currentTarget=d,h=sh(k,f,!0,e)&&h,e.b||(h=sh(k,f,!1,e)&&h));if(c)for(l=0;!e.b&&l<c.length;l++)k=e.currentTarget=c[l],h=sh(k,f,!1,e)&&h}
g.I=function(){rh.Q.I.call(this);var a=0,b;for(b in this.g){for(var c=this.g[b],d=0;d<c.length;d++)++a,delete bh[c[d].key],c[d].removed=!0;c.length=0}this.Rb=null};g.jb=function(a,b,c,d){var e=this.g[a]||(this.g[a]=[]),f=th(e,b,c,d);-1<f?(a=e[f],a.Oa=!1):(a=new ah(b,null,this,a,!!c,d),a.Oa=!1,e.push(a));return a};g.Sb=function(a,b,c,d){if(!(a in this.g))return!1;a=this.g[a];b=th(a,b,c,d);return-1<b?(c=a[b],delete bh[c.key],c.removed=!0,1==z.splice.call(a,b,1).length):!1};
function mh(a,b){var c=b.type;if(!(c in a.g))return!1;if(c=Fa(a.g[c],b))delete bh[b.key],b.removed=!0;return c}function sh(a,b,c,d){if(!(b in a.g))return!0;var e=!0;b=Ia(a.g[b]);for(var f=0;f<b.length;++f){var h=b[f];if(h&&!h.removed&&h.capture==c){var k=h.Y,l=h.ya||h.src;h.Oa&&mh(a,h);e=!1!==k.call(l,d)&&e}}return e&&!1!=d.g}function th(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(f.Y==b&&f.capture==!!c&&f.ya==d)return e}return-1};function uh(a,b){this.g=new Dd(a);this.b=b?Bd:Ad}uh.prototype.stringify=function(a){return Cd(this.g,a)};uh.prototype.parse=function(a){return this.b(a)};function vh(a,b){rh.call(this);this.b=a||1;this.h=b||m;this.i=v(this.hd,this);this.k=w()}y(vh,rh);g=vh.prototype;g.Ha=!1;g.R=null;function wh(a,b){a.b=b;a.R&&a.Ha?(a.stop(),a.start()):a.R&&a.stop()}g.hd=function(){if(this.Ha){var a=w()-this.k;0<a&&a<0.8*this.b?this.R=this.h.setTimeout(this.i,this.b-a):(this.R&&(this.h.clearTimeout(this.R),this.R=null),Y(this,"tick"),this.Ha&&(this.R=this.h.setTimeout(this.i,this.b),this.k=w()))}};
g.start=function(){this.Ha=!0;this.R||(this.R=this.h.setTimeout(this.i,this.b),this.k=w())};g.stop=function(){this.Ha=!1;this.R&&(this.h.clearTimeout(this.R),this.R=null)};g.I=function(){vh.Q.I.call(this);this.stop();delete this.h};function xh(a,b,c){if(ga(a))c&&(a=v(a,c));else if(a&&"function"==typeof a.handleEvent)a=v(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:m.setTimeout(a,b||0)};function yh(a,b,c){this.i=a;this.h=b;this.g=c;this.b=v(this.bd,this)}y(yh,nc);g=yh.prototype;g.Bb=!1;g.Ia=null;g.stop=function(){this.Ia&&(m.clearTimeout(this.Ia),this.Ia=null,this.Bb=!1)};g.I=function(){yh.Q.I.call(this);this.stop()};g.bd=function(){this.Ia=null;this.Bb&&(this.Bb=!1,zh(this))};function zh(a){a.Ia=xh(a.b,a.h);a.i.call(a.g)};function Ah(a){this.g=a;this.b={}}y(Ah,nc);var Bh=[];g=Ah.prototype;g.jb=function(a,b,c,d,e){t(b)||(Bh[0]=b,b=Bh);for(var f=0;f<b.length;f++){var h=fh(a,b[f],c||this,d||!1,e||this.g||this);this.b[h.key]=h}return this};
g.Sb=function(a,b,c,d,e){if(t(b))for(var f=0;f<b.length;f++)this.Sb(a,b[f],c,d,e);else{t:if(e=e||this.g||this,d=!!d,c=gh(c||this),a&&a[Zg])a=a.g[b],b=-1,a&&(b=th(a,c,d,e)),e=-1<b?a[b]:null;else{if(a=kh(a,b,d))for(b=0;b<a.length;b++)if(!a[b].removed&&a[b].Y==c&&a[b].capture==d&&a[b].ya==e){e=a[b];break t}e=null}e&&(lh(e),delete this.b[e.key])}return this};g.removeAll=function(){Va(this.b,lh);this.b={}};g.I=function(){Ah.Q.I.call(this);this.removeAll()};
g.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function Ch(){}Ch.prototype.b=null;var Dh;function Eh(){}y(Eh,Ch);function Fh(a){return(a=Gh(a))?new ActiveXObject(a):new XMLHttpRequest}function Hh(a){var b={};Gh(a)&&(b[0]=!0,b[1]=!0);return b}
function Gh(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}Dh=new Eh;function Ih(a,b,c,d,e){this.g=a;this.b=b;this.p=c;this.h=d;this.i=e||1;this.q=45E3;this.o=new Ah(this);this.k=new vh;wh(this.k,250)}g=Ih.prototype;g.pa=null;g.V=!1;g.Ja=null;g.Qb=null;g.Ra=null;g.Fa=null;g.ia=null;g.L=null;g.Ca=null;g.F=null;g.Ua=0;g.T=null;g.Da=null;g.qa=null;g.Qa=-1;g.$b=!0;g.ua=!1;g.Gb=0;g.kb=null;function Jh(a,b){switch(a){case 0:return"Non-200 return code ("+b+")";case 1:return"XMLHTTP failure (no data)";case 2:return"HttpConnection timeout";default:return"Unknown error"}}
var Kh={},Lh={};g=Ih.prototype;g.setTimeout=function(a){this.q=a};function Mh(a,b,c){a.Fa=1;a.ia=mf(b.A());a.Ca=c;a.B=!0;Nh(a,null)}function Oh(a,b,c,d,e){a.Fa=1;a.ia=mf(b.A());a.Ca=null;a.B=c;e&&(a.$b=!1);Nh(a,d)}
function Nh(a,b){a.Ra=w();Ph(a);a.L=a.ia.A();kf(a.L,"t",a.i);a.Ua=0;a.F=a.g.Jb(a.g.ob()?b:null);0<a.Gb&&(a.kb=new yh(v(a.ac,a,a.F),a.Gb));a.o.jb(a.F,"readystatechange",a.Yc);var c=a.pa?ab(a.pa):{};a.Ca?(a.Da="POST",c["Content-Type"]="application/x-www-form-urlencoded",Qh(a.F,a.L,a.Da,a.Ca,c)):(a.Da="GET",a.$b&&!H&&(c.Connection="close"),Qh(a.F,a.L,a.Da,null,c));a.g.S(1);var d=a.Ca;if(d)for(var c="",d=d.split("&"),e=0;e<d.length;e++){var f=d[e].split("=");if(1<f.length)var h=f[0],f=f[1],k=h.split("_"),
c=2<=k.length&&"type"==k[1]?c+(h+"="+f+"&"):c+(h+"=redacted&")}else c=null;a.b.info("XMLHTTP REQ ("+a.h+") [attempt "+a.i+"]: "+a.Da+"\n"+a.L+"\n"+c)}g.Yc=function(a){a=a.target;var b=this.kb;b&&3==Rh(a)?(this.b.info("Throttling readystatechange."),b.Ia?b.Bb=!0:zh(b)):this.ac(a)};
g.ac=function(a){try{if(a==this.F)t:{var b=Rh(this.F),c=this.F.k,d=Sh(this.F);if(E&&!Ab(10)||H&&!I("420+")){if(4>b)break t}else if(3>b||3==b&&!nb&&!Th(this.F))break t;this.ua||(4!=b||7==c)||(8==c||0>=d?this.g.S(3):this.g.S(2));Uh(this);var e=Sh(this.F);this.Qa=e;var f=Th(this.F);f||this.b.info("No response text for uri "+this.L+" status "+e);this.V=200==e;this.b.info("XMLHTTP RESP ("+this.h+") [ attempt "+this.i+"]: "+this.Da+"\n"+this.L+"\n"+b+" "+e);this.V?(4==b&&Vh(this),this.B?(Wh(this,b,f),nb&&
3==b&&(this.o.jb(this.k,"tick",this.Xc),this.k.start())):(Xh(this.b,this.h,f,null),Yh(this,f)),this.V&&!this.ua&&(4==b?this.g.nb(this):(this.V=!1,Ph(this)))):(this.qa=400==e&&0<f.indexOf("Unknown SID")?3:0,$(),Vh(this),Zh(this))}}catch(h){this.b.info("Failed call to OnXmlHttpReadyStateChanged_"),this.F&&Th(this.F)&&Th(this.F)}finally{}};
function Wh(a,b,c){for(var d=!0;!a.ua&&a.Ua<c.length;){var e=$h(a,c);if(e==Lh){4==b&&(a.qa=4,$(),d=!1);Xh(a.b,a.h,null,"[Incomplete Response]");break}else if(e==Kh){a.qa=4;$();Xh(a.b,a.h,c,"[Invalid Chunk]");d=!1;break}else Xh(a.b,a.h,e,null),Yh(a,e)}4==b&&0==c.length&&(a.qa=1,$(),d=!1);a.V=a.V&&d;d||(Xh(a.b,a.h,c,"[Invalid Chunked Response]"),Vh(a),Zh(a))}g.Xc=function(){var a=Rh(this.F),b=Th(this.F);this.Ua<b.length&&(Uh(this),Wh(this,a,b),this.V&&4!=a&&Ph(this))};
function $h(a,b){var c=a.Ua,d=b.indexOf("\n",c);if(-1==d)return Lh;c=Number(b.substring(c,d));if(isNaN(c))return Kh;d+=1;if(d+c>b.length)return Lh;var e=b.substr(d,c);a.Ua=d+c;return e}
function ai(a,b){a.Ra=w();Ph(a);var c=b?window.location.hostname:"";a.L=a.ia.A();V(a.L,"DOMAIN",c);V(a.L,"t",a.i);try{a.T=new ActiveXObject("htmlfile")}catch(d){Vh(a);a.qa=7;$();Zh(a);return}var e="<html><body>";b&&(e+='<script>document.domain="'+c+'"\x3c/script>');e+="</body></html>";a.T.open();a.T.write(e);a.T.close();a.T.parentWindow.m=v(a.Zc,a);a.T.parentWindow.d=v(a.ec,a,!0);a.T.parentWindow.rpcClose=v(a.ec,a,!1);c=a.T.createElement("div");a.T.parentWindow.document.body.appendChild(c);c.innerHTML=
'<iframe src="'+a.L+'"></iframe>';a.b.info("TRIDENT REQ ("+a.h+") [ attempt "+a.i+"]: GET\n"+a.L);a.g.S(1)}g.Zc=function(a){bi(v(this.he,this,a),0)};g.he=function(a){if(!this.ua){var b=this.b;b.info("TRIDENT TEXT ("+this.h+"): "+ci(b,a));Uh(this);Yh(this,a);Ph(this)}};g.ec=function(a){bi(v(this.ge,this,a),0)};g.ge=function(a){this.ua||(this.b.info("TRIDENT TEXT ("+this.h+"): "+a?"success":"failure"),Vh(this),this.V=a,this.g.nb(this),this.g.S(4))};function di(a){a.ua=!0;Vh(a)}
function Ph(a){a.Qb=w()+a.q;ei(a,a.q)}function ei(a,b){if(null!=a.Ja)throw Error("WatchDog timer not null");a.Ja=bi(v(a.ce,a),b)}function Uh(a){a.Ja&&(m.clearTimeout(a.Ja),a.Ja=null)}g.ce=function(){this.Ja=null;var a=w();0<=a-this.Qb?(this.b.info("TIMEOUT: "+this.L),2!=this.Fa&&this.g.S(3),Vh(this),this.qa=2,$(),Zh(this)):ei(this,this.Qb-a)};function Zh(a){a.g.zc()||a.ua||a.g.nb(a)}
function Vh(a){Uh(a);pc(a.kb);a.kb=null;a.k.stop();a.o.removeAll();if(a.F){var b=a.F;a.F=null;fi(b);b.dispose()}a.T&&(a.T=null)}function Yh(a,b){try{a.g.Ac(a,b),a.g.S(4)}catch(c){}};function gi(){}function Xh(a,b,c,d){a.info("XMLHTTP TEXT ("+b+"): "+ci(a,c)+(d?" "+d:""))}function hi(a,b){a.info(b)}gi.prototype.info=function(){};function ci(a,b){if(!b||"y2f%"==b)return b;try{var c=Bd(b);if(c)for(var d=0;d<c.length;d++)if(t(c[d])){var e=c[d];if(!(2>e.length)){var f=e[1];if(t(f)&&!(1>f.length)){var h=f[0];if("noop"!=h&&"stop"!=h)for(var k=1;k<f.length;k++)f[k]=""}}}return U(c)}catch(l){return a.info("Exception parsing expected JS array - probably was not JS"),b}};function ii(a,b,c,d,e){hi(new gi,"TestLoadImageWithRetries: "+e);if(0==d)c(!1);else{var f=e||0;d--;ji(a,b,function(e){e?c(!0):m.setTimeout(function(){ii(a,b,c,d,f)},f)})}}
function ji(a,b,c){var d=new gi;d.info("TestLoadImage: loading "+a);var e=new Image;e.onload=function(){try{d.info("TestLoadImage: loaded"),ki(e),c(!0)}catch(a){}};e.onerror=function(){try{d.info("TestLoadImage: error"),ki(e),c(!1)}catch(a){}};e.onabort=function(){try{d.info("TestLoadImage: abort"),ki(e),c(!1)}catch(a){}};e.ontimeout=function(){try{d.info("TestLoadImage: timeout"),ki(e),c(!1)}catch(a){}};m.setTimeout(function(){if(e.ontimeout)e.ontimeout()},b);e.src=a}
function ki(a){a.onload=null;a.onerror=null;a.onabort=null;a.ontimeout=null};function li(a,b){this.b=a;this.g=b;this.h=new uh(null,!0)}g=li.prototype;g.Kb=null;g.M=null;g.tb=!1;g.lc=null;g.rb=null;g.Ob=null;g.Pb=null;g.N=null;g.wa=-1;g.Xa=null;g.Za=null;g.connect=function(a){this.Pb=a;a=mi(this.b,this.Pb);$();this.lc=w();var b=this.b.B;null!=b?(this.Xa=b[0],(this.Za=b[1])?(this.N=1,ni(this)):(this.N=2,oi(this))):(kf(a,"MODE","init"),this.M=new Ih(this,this.g,void 0,void 0,void 0),this.M.pa=this.Kb,Oh(this.M,a,!1,null,!0),this.N=0)};
function ni(a){var b=pi(a.b,a.Za,"/mail/images/cleardot.gif");mf(b);ii(b.toString(),5E3,v(a.Ed,a),3,2E3);a.S(1)}g.Ed=function(a){if(a)this.N=2,oi(this);else{$();var b=this.b;b.b.info("Test Connection Blocked");b.da=b.na.wa;qi(b,9)}a&&this.S(2)};
function oi(a){a.g.info("TestConnection: starting stage 2");var b=a.b.va;if(null!=b)a.g.info("TestConnection: skipping stage 2, precomputed result is "+b?"Buffered":"Unbuffered"),$(),b?($(),ri(a.b,a,!1)):($(),ri(a.b,a,!0));else if(a.M=new Ih(a,a.g,void 0,void 0,void 0),a.M.pa=a.Kb,b=si(a.b,a.Xa,a.Pb),$(),!E||Ab(10))kf(b,"TYPE","xmlhttp"),Oh(a.M,b,!1,a.Xa,!1);else{kf(b,"TYPE","html");var c=a.M;a=Boolean(a.Xa);c.Fa=3;c.ia=mf(b.A());ai(c,a)}}g.Jb=function(a){return this.b.Jb(a)};g.zc=function(){return!1};
g.Ac=function(a,b){this.wa=a.Qa;if(0==this.N)if(this.g.info("TestConnection: Got data for stage 1"),b){try{var c=this.h.parse(b)}catch(d){ti(this.b,this);return}this.Xa=c[0];this.Za=c[1]}else this.g.info("TestConnection: Null responseText"),ti(this.b,this);else if(2==this.N)if(this.tb)$(),this.Ob=w();else if("11111"==b){if($(),this.tb=!0,this.rb=w(),c=this.rb-this.lc,!E||Ab(10)||500>c)this.wa=200,di(this.M),this.g.info("Test connection succeeded; using streaming connection"),$(),ri(this.b,this,!0)}else $(),
this.rb=this.Ob=w(),this.tb=!1};
g.nb=function(){this.wa=this.M.Qa;if(!this.M.V)this.g.info("TestConnection: request failed, in state "+this.N),0==this.N?$():2==this.N&&$(),ti(this.b,this);else if(0==this.N)this.g.info("TestConnection: request complete for initial check"),this.Za?(this.N=1,ni(this)):(this.N=2,oi(this));else if(2==this.N){this.g.info("TestConnection: request complete for stage 2");var a=!1;(a=!E||Ab(10)?this.tb:200>this.Ob-this.rb?!1:!0)?(this.g.info("Test connection succeeded; using streaming connection"),$(),ri(this.b,
this,!0)):(this.g.info("Test connection failed; not using streaming"),$(),ri(this.b,this,!1))}};g.ob=function(){return this.b.ob()};g.S=function(a){this.b.S(a)};function ui(a){rh.call(this);this.headers=new Se;this.o=a||null;this.h=!1;this.ta=this.b=null;this.fc=this.ca="";this.k=0;this.q="";this.i=this.Lb=this.P=this.Sa=!1;this.B=0;this.ba=null;this.gc="";this.ea=this.hc=!1}y(ui,rh);var vi=/^https?$/i,wi=["POST","PUT"];
function Qh(a,b,c,d,e){if(a.b)throw Error("[goog.net.XhrIo] Object is active with another request="+a.ca+"; newUri="+b);c=c?c.toUpperCase():"GET";a.ca=b;a.q="";a.k=0;a.fc=c;a.Sa=!1;a.h=!0;a.b=a.o?Fh(a.o):Fh(Dh);a.ta=a.o?a.o.b||(a.o.b=Hh(a.o)):Dh.b||(Dh.b=Hh(Dh));a.b.onreadystatechange=v(a.mc,a);try{kg(xi(a,"Opening Xhr")),a.Lb=!0,a.b.open(c,b,!0),a.Lb=!1}catch(f){kg(xi(a,"Error opening Xhr: "+f.message));yi(a,f);return}b=d||"";var h=a.headers.A();e&&We(e,function(a,b){h.set(b,a)});e=B(h.ja(),zi);
d=m.FormData&&b instanceof m.FormData;!C(wi,c)||(e||d)||h.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");We(h,function(a,b){this.b.setRequestHeader(b,a)},a);a.gc&&(a.b.responseType=a.gc);"withCredentials"in a.b&&(a.b.withCredentials=a.hc);try{Ai(a),0<a.B&&(a.ea=E&&I(9)&&fa(a.b.timeout)&&s(a.b.ontimeout),kg(xi(a,"Will abort after "+a.B+"ms if incomplete, xhr2 "+a.ea)),a.ea?(a.b.timeout=a.B,a.b.ontimeout=v(a.nc,a)):a.ba=xh(a.nc,a.B,a)),kg(xi(a,"Sending request")),a.P=!0,a.b.send(b),
a.P=!1}catch(k){kg(xi(a,"Send error: "+k.message)),yi(a,k)}}function zi(a){return"content-type"==a.toLowerCase()}ui.prototype.nc=function(){"undefined"!=typeof aa&&this.b&&(this.q="Timed out after "+this.B+"ms, aborting",this.k=8,xi(this,this.q),Y(this,"timeout"),fi(this,8))};function yi(a,b){a.h=!1;a.b&&(a.i=!0,a.b.abort(),a.i=!1);a.q=b;a.k=5;Bi(a);Ci(a)}function Bi(a){a.Sa||(a.Sa=!0,Y(a,"complete"),Y(a,"error"))}
function fi(a,b){a.b&&a.h&&(xi(a,"Aborting"),a.h=!1,a.i=!0,a.b.abort(),a.i=!1,a.k=b||7,Y(a,"complete"),Y(a,"abort"),Ci(a))}ui.prototype.I=function(){this.b&&(this.h&&(this.h=!1,this.i=!0,this.b.abort(),this.i=!1),Ci(this,!0));ui.Q.I.call(this)};ui.prototype.mc=function(){this.p||(this.Lb||this.P||this.i?Di(this):this.Ld())};ui.prototype.Ld=function(){Di(this)};
function Di(a){if(a.h&&"undefined"!=typeof aa)if(a.ta[1]&&4==Rh(a)&&2==Sh(a))xi(a,"Local request error detected and ignored");else if(a.P&&4==Rh(a))xh(a.mc,0,a);else if(Y(a,"readystatechange"),4==Rh(a)){xi(a,"Request complete");a.h=!1;try{var b=Sh(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=uc(String(a.ca))[1]||null;if(!f&&self.location)var h=self.location.protocol,f=h.substr(0,h.length-1);e=!vi.test(f?
f.toLowerCase():"")}c=e}if(c)Y(a,"complete"),Y(a,"success");else{a.k=6;var k;try{k=2<Rh(a)?a.b.statusText:""}catch(l){k=""}a.q=k+" ["+Sh(a)+"]";Bi(a)}}finally{Ci(a)}}}function Ci(a,b){if(a.b){Ai(a);var c=a.b,d=a.ta[0]?ba:null;a.b=null;a.ta=null;b||Y(a,"ready");try{c.onreadystatechange=d}catch(e){}}}function Ai(a){a.b&&a.ea&&(a.b.ontimeout=null);fa(a.ba)&&(m.clearTimeout(a.ba),a.ba=null)}function Rh(a){return a.b?a.b.readyState:0}function Sh(a){try{return 2<Rh(a)?a.b.status:-1}catch(b){return-1}}
function Th(a){try{return a.b?a.b.responseText:""}catch(b){return""}}function xi(a,b){return b+" ["+a.fc+" "+a.ca+" "+Sh(a)+"]"};function Ei(a,b,c){this.q=a||null;this.g=1;this.h=[];this.i=[];this.b=new gi;this.k=new uh(null,!0);this.B=b||null;this.va=null!=c?c:null}function Fi(a,b){this.b=a;this.map=b;this.bb=null}g=Ei.prototype;g.ab=null;g.J=null;g.D=null;g.Ib=null;g.mb=null;g.cc=null;g.pb=null;g.Va=0;g.cd=0;g.H=null;g.ka=null;g.fa=null;g.xa=null;g.na=null;g.ib=null;g.Ba=-1;g.kc=-1;g.da=-1;g.Wa=0;g.Ga=0;g.ra=8;var Gi=new rh;function Hi(a){X.call(this,"statevent",a)}y(Hi,X);function Ii(a){X.call(this,"timingevent",a)}
y(Ii,X);function Ji(a){X.call(this,"serverreachability",a)}y(Ji,X);g=Ei.prototype;g.connect=function(a,b,c,d,e){this.b.info("connect()");$();this.Ib=b;this.ab=c||{};d&&s(e)&&(this.ab.OSID=d,this.ab.OAID=e);this.b.info("connectTest_()");this.na=new li(this,this.b);this.na.Kb=null;this.na.h=this.k;this.na.connect(a)};
function Ki(a){if(a.na){var b=a.na;b.M&&(di(b.M),b.M=null);b.wa=-1;a.na=null}a.D&&(di(a.D),a.D=null);a.fa&&(m.clearTimeout(a.fa),a.fa=null);Li(a);a.J&&(di(a.J),a.J=null);a.ka&&(m.clearTimeout(a.ka),a.ka=null)}g.zc=function(){return 0==this.g};function Mi(a){a.J||a.ka||(a.ka=bi(v(a.oc,a),0),a.Wa=0)}
g.oc=function(a){this.ka=null;this.b.info("startForwardChannel_");if(1==this.g){if(!a){this.b.info("open_()");this.Va=Math.floor(1E5*Math.random());a=this.Va++;var b=new Ih(this,this.b,"",a,void 0);b.pa=null;var c=Ni(this),d=this.mb.A();V(d,"RID",a);this.q&&V(d,"CVER",this.q);Oi(this,d);Mh(b,d,c);this.J=b;this.g=2}}else 3==this.g&&(a?Pi(this,a):0==this.h.length?this.b.info("startForwardChannel_ returned: nothing to send"):this.J||(Pi(this),this.b.info("startForwardChannel_ finished, sent request")))};
function Pi(a,b){var c,d;b?6<a.ra?(a.h=a.i.concat(a.h),a.i.length=0,c=a.Va-1,d=Ni(a)):(c=b.h,d=b.Ca):(c=a.Va++,d=Ni(a));var e=a.mb.A();V(e,"SID",a.p);V(e,"RID",c);V(e,"AID",a.Ba);Oi(a,e);c=new Ih(a,a.b,a.p,c,a.Wa+1);c.pa=null;c.setTimeout(Math.round(1E4)+Math.round(1E4*Math.random()));a.J=c;Mh(c,e,d)}function Oi(a,b){if(a.H){var c=a.H.Jc(a);c&&We(c,function(a,c){V(b,c,a)})}}
function Ni(a){var b=Math.min(a.h.length,1E3),c=["count="+b],d;6<a.ra&&0<b?(d=a.h[0].b,c.push("ofs="+d)):d=0;for(var e=0;e<b;e++){var f=a.h[e].b,h=a.h[e].map,f=6>=a.ra?e:f-d;try{We(h,function(a,b){c.push("req"+f+"_"+b+"="+encodeURIComponent(a))})}catch(k){c.push("req"+f+"_type="+encodeURIComponent("_badmap"))}}a.i=a.i.concat(a.h.splice(0,b));return c.join("&")}function Qi(a){a.D||a.fa||(a.o=1,a.fa=bi(v(a.vc,a),0),a.Ga=0)}
function Ri(a){if(a.D||a.fa||3<=a.Ga)return!1;a.b.info("Going to retry GET");a.o++;a.fa=bi(v(a.vc,a),Si(a,a.Ga));a.Ga++;return!0}
g.vc=function(){this.fa=null;this.b.info("Creating new HttpRequest");this.D=new Ih(this,this.b,this.p,"rpc",this.o);this.D.pa=null;this.D.Gb=0;var a=this.cc.A();V(a,"RID","rpc");V(a,"SID",this.p);V(a,"CI",this.ib?"0":"1");V(a,"AID",this.Ba);Oi(this,a);if(!E||Ab(10))V(a,"TYPE","xmlhttp"),Oh(this.D,a,!0,this.pb,!1);else{V(a,"TYPE","html");var b=this.D,c=Boolean(this.pb);b.Fa=3;b.ia=mf(a.A());ai(b,c)}this.b.info("New Request created")};
function ri(a,b,c){a.b.info("Test Connection Finished");a.ib=c;a.da=b.wa;a.b.info("connectChannel_()");a.Cd(1,0);a.mb=mi(a,a.Ib);Mi(a)}function ti(a,b){a.b.info("Test Connection Failed");a.da=b.wa;qi(a,2)}
g.Ac=function(a,b){if(0!=this.g&&(this.D==a||this.J==a))if(this.da=a.Qa,this.J==a&&3==this.g)if(7<this.ra){var c;try{c=this.k.parse(b)}catch(d){c=null}if(t(c)&&3==c.length){var e=c;if(0==e[0])t:if(this.b.info("Server claims our backchannel is missing."),this.fa)this.b.info("But we are currently starting the request.");else{if(this.D)if(this.D.Ra+3E3<this.J.Ra)Li(this),di(this.D),this.D=null;else break t;Ri(this);$()}else this.kc=e[1],c=this.kc-this.Ba,0<c&&(e=e[2],this.b.info(e+" bytes (in "+c+" arrays) are outstanding on the BackChannel"),
37500>e&&(this.ib&&0==this.Ga)&&!this.xa&&(this.xa=bi(v(this.$c,this),6E3)))}else this.b.info("Bad POST response data returned"),qi(this,11)}else"y2f%"!=b&&(this.b.info("Bad data returned - missing/invald magic cookie"),qi(this,11));else if(this.D==a&&Li(this),!/^[\s\xa0]*$/.test(b))for(c=this.k.parse(b),t(c),e=0;e<c.length;e++){var f=c[e];this.Ba=f[0];f=f[1];2==this.g?"c"==f[0]?(this.p=f[1],this.pb=f[2],f=f[3],null!=f?this.ra=f:this.ra=6,this.g=3,this.H&&this.H.jc(this),this.cc=si(this,this.pb,this.Ib),
Qi(this)):"stop"==f[0]&&qi(this,7):3==this.g&&("stop"==f[0]?qi(this,7):"noop"!=f[0]&&this.H&&this.H.ic(this,f),this.Ga=0)}};g.$c=function(){null!=this.xa&&(this.xa=null,di(this.D),this.D=null,Ri(this),$())};function Li(a){null!=a.xa&&(m.clearTimeout(a.xa),a.xa=null)}
g.nb=function(a){this.b.info("Request complete");var b;if(this.D==a)Li(this),this.D=null,b=2;else if(this.J==a)this.J=null,b=1;else return;this.da=a.Qa;if(0!=this.g)if(a.V)1==b?(w(),Y(Gi,new Ii(Gi)),Mi(this),this.i.length=0):Qi(this);else{var c=a.qa;if(3==c||7==c||0==c&&0<this.da)this.b.info("Not retrying due to error type");else{this.b.info("Maybe retrying, last error: "+Jh(c,this.da));var d;if(d=1==b)this.J||this.ka?d=!1:1==this.g||2<=this.Wa?d=!1:(this.b.info("Going to retry POST"),this.ka=bi(v(this.oc,
this,a),Si(this,this.Wa)),this.Wa++,d=!0);if(d||2==b&&Ri(this))return;this.b.info("Exceeded max number of retries")}this.b.info("Error: HTTP request failed");switch(c){case 1:qi(this,5);break;case 4:qi(this,10);break;case 3:qi(this,6);break;case 7:qi(this,12);break;default:qi(this,2)}}};function Si(a,b){var c=5E3+Math.floor(1E4*Math.random());a.H||(a.b.info("Inactive channel"),c*=2);return c*b}g.Cd=function(a){if(!C(arguments,this.g))throw Error("Unexpected channel state: "+this.g);};
function qi(a,b){a.b.info("Error code "+b);if(2==b||9==b){var c=null;a.H&&(c=null);var d=v(a.Fd,a);c||(c=new Xe("//www.google.com/images/cleardot.gif"),mf(c));ji(c.toString(),1E4,d)}else $();Ti(a,b)}g.Fd=function(a){a?(this.b.info("Successfully pinged google.com"),$()):(this.b.info("Failed to ping google.com"),$(),Ti(this,8))};function Ti(a,b){a.b.info("HttpChannel: error - "+b);a.g=0;a.H&&a.H.tc(a,b);Ui(a);Ki(a)}
function Ui(a){a.g=0;a.da=-1;if(a.H)if(0==a.i.length&&0==a.h.length)a.H.Nb(a);else{a.b.info("Number of undelivered maps, pending: "+a.i.length+", outgoing: "+a.h.length);var b=Ia(a.i),c=Ia(a.h);a.i.length=0;a.h.length=0;a.H.Nb(a,b,c)}}function mi(a,b){var c=pi(a,null,b);a.b.info("GetForwardChannelUri: "+c);return c}function si(a,b,c){b=pi(a,a.ob()?b:null,c);a.b.info("GetBackChannelUri: "+b);return b}
function pi(a,b,c){var d=c instanceof Xe?c.A():new Xe(c,void 0);if(""!=d.Ka)b&&Ze(d,b+"."+d.Ka),$e(d,d.eb);else var e=window.location,d=nf(e.protocol,b?b+"."+e.hostname:e.hostname,e.port,c);a.ab&&We(a.ab,function(a,b){V(d,b,a)});V(d,"VER",a.ra);Oi(a,d);return d}g.Jb=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new ui;a.hc=!1;return a};
function bi(a,b){if(!ga(a))throw Error("Fn must not be null and must be a function");return m.setTimeout(function(){a()},b)}g.S=function(){Y(Gi,new Ji(Gi))};function $(){Y(Gi,new Hi(Gi))}g.ob=function(){return!(!E||Ab(10))};function Vi(){}g=Vi.prototype;g.jc=function(){};g.ic=function(){};g.tc=function(){};g.Nb=function(){};g.Jc=function(){return{}};function Wi(a,b){vh.call(this);if(ga(a))b&&(a=v(a,b));else if(a&&ga(a.handleEvent))a=v(a.handleEvent,a);else throw Error("Invalid listener argument");this.q=a;fh(this,"tick",v(this.o,this));this.stop();wh(this,5E3+2E4*Math.random())}y(Wi,vh);Wi.prototype.o=function(){if(500<this.b){var a=this.b;24E4>2*a&&(a*=2);wh(this,a)}this.q()};function Xi(a,b){this.action=a;this.params=b||null};function Yi(a,b){this.k=a;this.p=b;this.h=new O;this.g=new Wi(this.ad,this);this.b=null}y(Yi,Vi);g=Yi.prototype;g.qb="";g.Ya=0;g.ub=0;g.G=function(a,b,c){return this.h.G(a,b,c)};g.la=function(a,b,c){return this.h.la(a,b,c)};g.ma=function(a){return this.h.ma(a)};g.u=function(a,b){return this.h.u.apply(this.h,arguments)};
g.connect=function(a,b,c){if(!this.b||2!=this.b.g){this.qb="";this.g.stop();this.i=a||null;this.Ya=b||0;a=this.k+"/test";b=this.k+"/bind";var d=new Ei("1",c?c.firstTestResults:null,c?c.secondTestResults:null),e=this.b;e&&(e.H=null);d.H=this;this.b=d;e?this.b.connect(a,b,this.p,e.p,e.Ba):c?this.b.connect(a,b,this.p,c.sessionId,c.arrayId):this.b.connect(a,b,this.p)}};
function Zi(a,b){a.ub=b||0;a.g.stop();if(a.b&&0!=a.b.g){var c=a.b;c.b.info("disconnect()");Ki(c);if(3==c.g){var d=c.Va++,e=c.mb.A();V(e,"SID",c.p);V(e,"RID",d);V(e,"TYPE","terminate");Oi(c,e);d=new Ih(c,c.b,c.p,d,void 0);d.Fa=2;d.ia=mf(e.A());(new Image).src=d.ia;d.Ra=w();Ph(d)}Ui(c)}a.ub=0}
g.sendMessage=function(a,b){if(this.b&&0!=this.b.g&&(2==this.b.g||3==this.b.g||this.g.Ha)){var c={_sc:a};b&&cb(c,b);U(c);var d=this.b;if(0==d.g)throw Error("Invalid operation: sending map when state is closed");1E3==d.h.length&&U(c);d.h.push(new Fi(d.cd++,c));2!=d.g&&3!=d.g||Mi(d)}};g.jc=function(){var a=this.g;a.stop();wh(a,5E3+2E4*Math.random());this.i=null;this.Ya=0;this.u("onStateOpened")};
g.tc=function(a,b){var c=2==b&&401==this.b.da;4==b||c||(6==b&&(c=this.g,c.stop(),wh(c,500)),this.g.start());this.u("onError",b)};g.Nb=function(){this.u("onStateClosed")};g.Jc=function(){var a={v:2};this.qb&&(a.gsessionid=this.qb);0!=this.Ya&&(a.ui=""+this.Ya);0!=this.ub&&(a.ui=""+this.ub);this.i&&cb(a,this.i);return a};g.ic=function(a,b){"S"==b[0]?this.qb=b[1]:this.h.u("onMessage",new Xi(b[0],b[1]))};
g.ad=function(){this.g.stop();var a=this.b,b=0;a.D&&b++;a.J&&b++;0!=b?this.g.start():this.connect(this.i,this.Ya)};function $i(){this.b=[];this.index=-1;aj(this)}function aj(a){a.volume=-1;a.muted=!1;a.g=-1;a.h=null;w()}function bj(a){return a.b[a.index]}function cj(a,b){var c=a.index;a.index=xa(a.b,b);c!=a.index&&aj(a)}function dj(a,b,c){c=c||bj(a);if(Ma(a.b,b)&&c==bj(a))return!1;a.b=Ia(b);cj(a,c);return!0}$i.prototype.remove=function(a){var b=bj(this);return Fa(this.b,a)?(this.index=xa(this.b,b),!0):!1};var ej=null;"undefined"!=typeof XMLHttpRequest?ej=function(){return new XMLHttpRequest}:"undefined"!=typeof ActiveXObject&&(ej=function(){return new ActiveXObject("Microsoft.XMLHTTP")});function fj(a,b,c,d,e,f,h){var k=ej&&ej();if("open"in k){k.onreadystatechange=function(){4==(k&&"readyState"in k?k.readyState:0)&&b&&fc(b)(k)};c=(c||"GET").toUpperCase();d=d||"";k.open(c,a,!0);f&&(k.responseType=f);h&&(k.withCredentials=!0);a="POST"==c;L("PAGE_CL")&&L("PAGE_BUILD_TIMESTAMP")&&(e=e||{},e["X-YouTube-Page-CL"]=L("PAGE_CL"),e["X-YouTube-Page-Timestamp"]=L("PAGE_BUILD_TIMESTAMP"));if(e)for(var l in e)k.setRequestHeader(l,e[l]),"content-type"==l.toLowerCase()&&(a=!1);a&&k.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");k.send(d);return k}}
function gj(a,b){var c=b.format||"JSON";b.je&&(a=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+a);var d=b.Gc;d&&(a=le(a,d));var e=b.ke||"";if(d=b.ga)e=ie(e),cb(e,d),e=je(e);var f=!1,h,k=fj(a,function(a){if(!f){f=!0;h&&gc(h);var d;t:switch(a&&"status"in a?a.status:-1){case 0:case 200:case 204:case 304:d=!0;break t;default:d=!1}var e=null;if(d||400<=a.status&&500>a.status)e=hj(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.bb||m;d?b.$&&b.$.call(k,a,e):b.onError&&b.onError.call(k,a,e);b.Cb&&b.Cb.call(k,a,e)}},b.method,e,b.headers,b.responseType,b.withCredentials);b.Sd&&0<b.timeout&&(h=M(function(){f||(f=!0,k.abort(),gc(h),b.Sd.call(b.bb||m,k))},b.timeout))}
function hj(a,b){var c=null;switch(a){case "JSON":var d=b.responseText,e=b.getResponseHeader("Content-Type")||"";d&&0<=e.indexOf("json")&&(c=Bd(d));break;case "XML":if(d=(d=b.responseXML)?ij(d):null)c={},A(d.getElementsByTagName("*"),function(a){c[a.tagName]=jj(a)})}return c}function ij(a){return a?(a=("responseXML"in a?a.responseXML:a).getElementsByTagName("root"))&&0<a.length?a[0]:null:null}function jj(a){var b="";A(a.childNodes,function(a){b+=a.nodeValue});return b};function kj(){Bg.call(this);this.w=Yf();this.j("Initializing app screens: "+wf(this.w));this.wb=null;this.g=[];this.b=[];lj(this,Pg());this.j("Initializing DIAL devices: "+zf(this.b));var a=If(Uf());mj(this,a);this.j("Initializing online screens: "+wf(this.g));nj(this);this.sc();this.vb()}y(kj,Bg);var oj=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,1E4,15E3,2E4];g=kj.prototype;g.Wb=NaN;g.cb=NaN;g.j=function(a){Eg("RM",a)};
function pj(a){var b=navigator.userAgent;if(0<=b.search("MSIE")&&(b=b.match(/MSIE ([\d.]+)/)[1],0>ua(b,"10.0")))return a;b=uc(document.location.href);return sc("https",b[3],a)}function nj(a){a.G("appScreenChange",a.Qd,a);P("yt-remote-dial-device-list-update",function(a){lj(this,a);0==a.length||this.vb()},a);P("yt-remote-dial-device-status-update",a.Rd,a);P("yt-remote-dial-device-tab-projected",function(a){this.u("connectToReceiver",a.id)},a)}g.sc=function(){qj(this);M(v(this.sc,this),864E5)};
g.vb=function(){gc(this.Wb);this.Wb=NaN;rj(this);var a=Pg();0==a.length||lj(this,a);this.Wb=M(v(this.vb,this),1E4)};g.Qd=function(){this.j("App screen changed.");var a=ya(this.w,function(a){return!!Lf(this.g,a)},this);mj(this,a);lj(this,Pg());0==this.w.length&&0==this.b.length||this.vb()};function sj(a,b){return ya(b,function(a){return a.K?(a=Gf(this.b,a.K),!!a&&"RUNNING"==a.status):!0},a)}
function lj(a,b){A(b,function(a){var b=Mf(this.w,a.id);b&&(b.name=a.name)},a);tj(a);Vf(Df(b));var c=!Ma(a.b,b,Ff);c&&a.j("Updating DIAL devices: "+zf(a.b)+" to "+zf(b));a.b=b;mj(a,a.g);c&&(a.j("DIAL devices updated. Firing ONLINE_RECEIVER_CHANGE"),a.u("onlineReceiverChange"))}
g.Rd=function(a){var b=Gf(this.b,a.id);b&&(this.j("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,Vf(Df(this.b)));mj(this,this.g)};
function mj(a,b,c){b=sj(a,b);var d=!Ma(a.g,b,Kf);if(d||c)c=Hf(b),Sd("yt-remote-online-screens",c,60);d&&(a.j("Updating online screens: "+wf(a.g)+" -> "+wf(b)),a.g=b,a.j("Online screens updated. Firing ONLINE_RECEIVER_CHANGE"),a.u("onlineReceiverChange"))}
function uj(a){var b=[],c={};A(a.w,function(a){c[a.X]=a;b.push(a.X)});a={method:"POST",ga:{lounge_token:b.join(",")},bb:a,$:function(a,b){var f=[];A(b.screens||[],function(a){"online"==a.status&&f.push(c[a.loungeToken])});this.wb&&!Lf(f,this.wb)&&f.push(this.wb);mj(this,f,!0)}};gj(pj("/api/lounge/pairing/get_screen_availability"),a)}
function qj(a){var b=za(a.w,function(a){return a.aa});0!=b.length&&(a.j("Updating screen lounge tokens for screen ids: "+U(b)),gj(pj("/api/lounge/pairing/get_lounge_token_batch"),{ga:{screen_ids:b.join(",")},method:"POST",bb:a,$:function(a,b){A(b.screens||[],function(a){var b=B(this.w,function(b){return b.aa==a.screenId});b&&(b.X=a.loungeToken)},this);this.w=ya(this.w,function(a){return!!a.X});tj(this);uj(this)}}))}
function rj(a){var b=a.w,c=Yf();a.w=0<c.length?c:a.w;Ma(a.w,b,Kf)||(a.j("Refreshing app screens: "+wf(b)+" to "+wf(a.w)),a.j("App screens updated. Firing APP_SCREEN_CHANGE"),a.u("appScreenChange"));B(a.w,function(a){var b=Gf(this.b,a.K);return!a.K||!!b},a)&&(B(a.w,function(a){return!a.X})?qj(a):uj(a))}
function tj(a){5<a.w.length&&(a.w=a.w.slice(a.w.length-5));var b=Yf();Ma(a.w,b,Kf)||(a.j("Saving app screens: "+wf(b)+" to "+wf(a.w)),a.j("App screens updated. Firing APP_SCREEN_CHANGE"),b=Hf(a.w),Sd("yt-remote-app-screens",b,31536E3),a.u("appScreenChange"))}function vj(a,b){var c=Ba(a.w,function(a){return Jf(b,a)});0>c?(a.j("Paired with a new screen: "+vf(b)),a.w.push(b)):(a.j("Paired with an old screen: "+vf(b)),a.w[c]=b);Lf(a.g,b)||a.g.push(b);tj(a)}
function wj(a,b){if((a.wb=b)&&!Lf(a.g,b)){var c=Ia(a.g);c.push(b);mj(a,c,!0)}}
g.uc=function(a,b,c){var d=!1;b>=oj.length&&(this.j("Pairing DIAL device "+a+" with pairing code "+c+" timed out. Firing SCREEN_PAIRING_COMPLETE."),d=!0);var e=Gf(this.b,a);if(!e)this.j("Pairing DIAL device "+a+" with pairing code "+c+" failed: no local device found with id "+a+". Firing SCREEN_PAIRING_COMPLETE."),d=!0;else if("ERROR"==e.status||"STOPPED"==e.status)this.j("Pairing DIAL device "+a+" with pairing code "+c+" failed: error launching YTTV app on device "+a+". Firing SCREEN_PAIRING_COMPLETE."),
d=!0;d?(xj(this),this.u("screenPairingComplete",null,c)):gj(pj("/api/lounge/pairing/get_screen"),{method:"POST",ga:{pairing_code:c},bb:this,$:function(a,b){xj(this);var d=new tf(b.screen);d.name=e.name;d.K=e.id;vj(this,d);this.j("Pairing a DIAL device with "+c+" succeeded. Firing SCREEN_PAIRING_COMPLETE.");this.u("screenPairingComplete",d,c)},onError:function(){this.j("Polling a DIAL device with pairing code: "+c);gc(this.cb);this.cb=M(v(this.uc,this,a,b+1,c),oj[b])}})};
function yj(a,b,c,d,e){xj(a);Gf(a.b,b)?(c||(c=Af(),Tg(b,c,d,e)),a.cb=M(v(a.uc,a,b,0,c),oj[0])):a.j("Cannot find DIAL device with id: "+b)}function xj(a){gc(a.cb);a.cb=NaN}function zj(a,b){var c=Mf(a.g,b);a.j("Found screen: "+vf(c)+" with key: "+b);return c}function Aj(a,b){var c=Gf(a.b,b);if(!c){var d=Mf(a.w,b);d&&(c=Gf(a.b,d.K))}a.j("Found DIAL device: "+U(c?yf(c):null)+" with key: "+b);return c};function Bj(a,b){Bg.call(this);Rd&&Qd();Sf()||de();og("goog.net.BrowserChannel");this.h=new kj;var c=Pf();this.i=new Yi("/api/lounge/bc",{device:"REMOTE_CONTROL",id:c,name:a,app:b});this.b=null;this.q=[];this.i.G("onStateOpened",this.gd,this);this.i.G("onStateClosed",this.qc,this);this.i.G("onError",this.ed,this);this.i.G("onMessage",this.fd,this);this.h.G("appScreenChange",this.dd,this);this.j("Initializing with device id = "+c+", name = "+a+", app = "+b)}y(Bj,Bg);g=Bj.prototype;g.Ea=NaN;g.Mb=NaN;
g.j=function(a){Eg("RC",a)};function Cj(){var a=Sf();return a?new tf(a):null}function Dj(a,b){"playerChange"==b&&isNaN(NaN)&&(a.j("Update received from MDx Server. Firing PLAYER_CHANGE"),a.u("playerChange"));"playlistChange"==b&&isNaN(NaN)&&(a.j("Update received from MDx Server. Firing PLAYLIST_CHANGE"),a.u("playlistChange"))}function Ej(a,b){a.j("Changing current screen from: "+vf(a.g)+" to "+vf(b));a.g=b;var c=a.i,d=b?b.X:"";(c.p.loungeIdToken=d)||c.g.stop()}
g.connect=function(a){this.j("Connecting to the receiver: "+U(a));var b=zj(this.h,a.key);b?Fj(this,b):(a=Aj(this.h,a.key))?Gj(this,a):M(v(function(){this.j("No receiver found. Firing CONNECTION_ERROR");this.u("connectionError")},this),0)};
function Fj(a,b){a.j("Connecting to screen: "+vf(b));var c=Cj();c&&!Jf(b,c)?Hj(a):Ij(a);a.b=null;Ej(a,b);c={};if(a.k){var d=a.k.g(),e=d[a.k.h()];c.videoIds=d.join(",");c.videoId=e;c.videoSources=a.k.i().join(",");d=Ud("yt-remote-delayed-connect-key");c.currentTime=d?d.currentTime:a.k.b()}$a(c)?a.j("Connecting with empty params"):a.j("Connecting with setPlaylist and params: "+U(c));a.i.connect($a(c)?{}:{method:"setPlaylist",params:U(c)},1,Ud("yt-remote-session-browser-channel-"+Nf()));a.b=new $i;$a(c)||
(a.b.b=c.videoIds.split(","),cj(a.b,c.videoId));Jj(a)}function Gj(a,b){a.j("Connecting to DIAL device: "+U(b?yf(b):null));Kj(a);Lj(a);var c=Ud("yt-remote-delayed-connect-key");(c=c?c.pairingCode:"")?yj(a.h,b.id,c):a.k?(c=a.k.g()[a.k.h()],yj(a.h,b.id,"",c,a.k.b())):yj(a.h,b.id,"");a.o=b;a.h.G("screenPairingComplete",a.dc,a)}g.dc=function(a){this.j("Paired with a DIAL screen: "+vf(a));Kj(this);a?Fj(this,a):(this.j("Dial pairing failed. Firing CONNECTION_ERROR"),this.o=null,this.u("connectionError"))};
function Hj(a){a.j("Disconnecting with user intent.");Lj(a);Tf();Zi(a.i,1)}function Lj(a){xj(a.h);var b=B(a.q,function(a){return"REMOTE_CONTROL"==a.type});b?(a.j("Did not stop DIAL device, because another remote is connected: "+U(b?{id:b.id,name:b.name,app:b.app,type:b.type,user:b.wc}:null)),a.o=null):a.o?(a.j("Stopping DIAL device: "+a.o.id),Ug(a.o.id),a.o=null):a.g&&a.g.K&&(a.j("Stopping DIAL device: "+a.g.K),Ug(a.g.K))}
function Ij(a){a.j("Disconnecting from screen.");a.g&&(a.j("Storing session screen: "+vf(a.g)),Rf(uf(a.g)));Zi(a.i,2)}function Mj(a,b){a.j("Sending: action="+b);a.i.sendMessage(b,void 0)}g.bc=function(){Mj(this,"getNowPlaying")};function Jj(a){Nj(a);a.Ea=M(v(function(){Nj(this);Ej(this,null);this.b=this.o=null;this.j("Connecting remote screen timeout. Firing CONNECTION_ERROR");this.u("connectionError")},a),1E4)}function Nj(a){gc(a.Ea);a.Ea=NaN}function Oj(a){gc(a.Mb);a.Mb=NaN}
function Kj(a){a.h.la("screenPairingComplete",a.dc,a)}g.gd=function(){this.j("Channel opened");Xf(!0);wj(this.h,this.g);Rf(uf(this.g))};
g.qc=function(){this.j("Channel closed");Xf(!1);Oj(this);var a={firstTestResults:[""],secondTestResults:!this.i.b.ib,sessionId:this.i.b.p,arrayId:this.i.b.Ba};Sd("yt-remote-session-browser-channel-"+Nf(),a,30);a=!!this.g&&isNaN(this.Ea);wj(this.h,null);Ej(this,null);this.o=null;a&&(this.j("Closing channel. Firing CONNECTION_CHANGE(false)"),this.u("connectionChange",!1))};g.ed=function(){this.j("Channel error");this.qc();Nj(this);this.j("Channel error. Firing CONNECTION_ERROR");this.u("connectionError")};
function Pj(a,b){switch(b.action){case "loungeStatus":var c=Ad(b.params.devices);a.q=za(c,function(a){return new Fg(a)});break;case "loungeScreenDisconnected":Ga(a.q,function(a){return"LOUNGE_SCREEN"==a.type});break;case "remoteConnected":var d=new Fg(Ad(b.params.device));B(a.q,function(a){return d?a.id==d.id:!1})||Ea(a.q,d);break;case "remoteDisconnected":d=new Fg(Ad(b.params.device)),Ga(a.q,function(a){return d?a.id==d.id:!1})}}
function Qj(a,b){var c=!1;if("loungeStatus"==b.action)c=!!B(a.q,function(a){return"LOUNGE_SCREEN"==a.type});else if("loungeScreenConnected"==b.action)c=!0;else if("loungeScreenDisconnected"==b.action)c=!1;else return;c!=(!!a.g&&isNaN(a.Ea))&&(c?(Nj(a),a.b.p=a.g,a.j("Screen connected. Firing CONNECTION_CHANGE(true)"),a.u("connectionChange",!0),a.bc()):Hj(a))}
g.fd=function(a){a.params?this.j("Received: action="+a.action+", params="+U(a.params)):this.j("Received: action="+a.action);Pj(this,a);Qj(this,a);if(this.g&&isNaN(this.Ea)){var b=!1,c=!1,d,e,f,h,k,l,p;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,s(a.params.currentError)&&(p=Ad(a.params.currentError)));if("onSubtitlesTrackChanged"==a.action)d==bj(this.b)&&(delete a.params.videoId,
$a(a.params)?this.b.i=null:this.b.i=a.params,Dj(this,"playerChange"));else if(bj(this.b)||'"onStateChange"'!=a.action){"playlistModified"!=a.action&&"nowPlayingPlaylist"!=a.action||e?(d||"nowPlaying"!=a.action&&"nowPlayingPlaylist"!=a.action?d?d!=bj(this.b)&&(b=!0):d=bj(this.b):(cj(this.b,""),b=!0),e&&(e=e.split(","),dj(this.b,e,d)&&(b=!0))):(dj(this.b,[]),b=!0);e=this.b;var r=d;r&&!C(e.b,r)?(e.b.push(r),e=!0):e=!1;e&&Mj(this,"getPlaylist");d&&cj(this.b,d);b&&Dj(this,"playlistChange");s(f)&&(b=parseInt(f,
10),b=isNaN(b)?-1:b,-1==b&&-1E3==this.b.g&&(b=-1E3),c=c||b!=this.b.g,this.b.g=b,d=null,-1E3==b&&(d=this.b.h||"unknown",p&&(d=p.reason||d)),c=c||this.b.h!=d,this.b.h=d,1==this.b.g?(Oj(this),this.Mb=M(v(this.bc,this),2E4)):Oj(this));"onError"!=a.action||-1!=this.b.g&&-1E3!=this.b.g||(a=Ad(a.params.errors)||[],1==a.length&&("PLAYER_ERROR"==a[0].error&&a[0].videoId==bj(this.b))&&(this.b.g=-1E3,this.b.h=a[0].reason||"unknown",c=!0));h&&(w(),c=!0);s(k)&&(b=parseInt(k,10),isNaN(b)||(c=c||this.b.volume!=
b,this.b.volume=b),s(l)&&(l="true"==l,c=c||this.b.muted!=l,this.b.muted=l));c&&Dj(this,"playerChange")}}};g.dd=function(){this.j("App screens changed");var a=Yf(),b=Cj();b&&((a=Lf(a,b))?Kf(a,b)||Rf(uf(a)):(Tf(),this.j("Dropping session screen: "+vf(b))));b=Yf();this.g&&((b=Lf(b,this.g),b)?Kf(b,this.g)||(Ej(this,b),this.b&&(this.b.p=b)):(this.j("Dropping current screen: "+vf(this.g)),Hj(this),this.b=null))};function Rj(){Bj.call(this,"Desktop","youtube-desktop");N(window,"unload",v(this.P,this));N(window,"beforeunload",v(this.P,this))}y(Rj,Bj);ca(Rj);Rj.prototype.P=function(){Ij(this)};function Sj(a,b){var c=wc(a),d;if(!(d=c==wc(window.location.href))){if(c=!c)c=0==a.lastIndexOf("/",0);d=c}if(d&&(c=uc(a),c=sc(null,null,c[5],c[6],c[7]),d=c.indexOf("#"),c=0>d?c:c.substr(0,d))){for(var e=d=0;e<c.length;++e)d=31*d+c.charCodeAt(e),d%=4294967296;c="s_tempdata-"+d;d=b?je(b):"";be(c,d,5)}};var Tj={};function Uj(a,b){a=J(a);if(!a)return null;b=qd(b);var c="player"+ha(a),d=Tj[c];d||(d=new Vj(a,c),Tj[c]=d,Q("player-added",d.g));M(function(){var a=d;a.p||(Wj(a,b),a.lb(),a.o&&Xj(a))},0);return d.g}function Yj(a){if(a=J(a)){a="player"+ha(a);var b=Tj[a];b&&b.dispose();Tj[a]=null}}function Zj(a){a=J(a);if(!a)return null;a="player"+ha(a);return(a=Tj[a])?a.g:null}
function Vj(a,b){this.W=a;this.ca=b;this.o=!1;this.g={};ak(this);this.P=this.q=null;this.B=new O;oc(this,ma(pc,this.B));this.k={};this.i=this.ba=this.ta=this.h=this.b=null;this.ea={};this.Sa=["onReady"]}y(Vj,nc);
function Wj(a,b){a.b=b.A();a.h=a.b.attrs.id||a.h;"video-player"==a.h&&(a.h=a.ca,a.b.attrs.id=a.ca);a.W.id==a.h&&(a.h=a.h+"-player",a.b.attrs.id=a.h);a.ta=a.b.args.el;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.ca;Re()&&(bk()||a.b.assets.js)||(a.b.args.html5_unavailable="1",a.b.disable.html5=!0);a.b.fallback=v(a.Yb,a);a.ba||(a.ba=
ck(a,a.b.args.jsapicallback||"onYouTubePlayerReady"));a.b.args.jsapicallback=null;if(c=a.b.attrs.width)a.W.style.width=Kc(Number(c)||c,!0);if(c=a.b.attrs.height)a.W.style.height=Kc(Number(c)||c,!0);c=a.W;u("overflow")?Ec(c,"hidden","overflow"):Va("overflow",ma(Ec,c))}function Xj(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))}g=Vj.prototype;
g.Hb=function(a){var b=Zf();if(Bf(b,a)&&"html5"!=this.i){var b=this.b.args.video_id,c=this.g.getCurrentTime();this.g.stopVideo();var d=Rj.getInstance(),e={key:a,videoId:b,currentTime:c};d.j("Setting the delayed connect data: "+U(e));!zj(d.h,a)&&(a=Aj(d.h,a))&&(d=Af(),e.pairingCode=d,Tg(a.id,d,b,c));Sd("yt-remote-delayed-connect-key",e);this.lb("html5")}};
g.Yb=function(a){a=qd(a||this.b);var b=!0;if("flash"==this.i)a.disable.flash=!0,"html5"==dk(this)&&(b=!1);else if("html5"==this.i){var c=J(this.h);c.stopVideo&&c.stopVideo();a.disable.flash?b=!1:(a.args.autoplay=1,a.args.html5_unavailable="1",a.disable.html5=!0)}b&&(Wj(this,a),this.lb())};g.lb=function(a){if(!this.p){if(!a){a=!!this.b.disable.html5;var b=!!this.b.disable.flash;a=!this.b.html5&&!b||a?b?"unsupported":"flash":"html5"}("flash"==a?this.yd:"html5"==a?this.zd:this.Bd).call(this)}};
function bk(){return n("yt.player.Application")}g.zd=function(){var a=this.b.A();if("html5"==dk(this))this.i="html5",this.o||this.Ta();else{ek(this);this.i="html5";this.b.loaded=!0;var b=function(){new (bk())(this.W,a);this.Ta()};bk()?b.call(this):Ke(this.b.assets.js,v(b,this))}};g.yd=function(){this.i="flash";var a=this.b.A();a.attrs.width=a.attrs.width||"100%";a.attrs.height=a.attrs.height||"100%";"flash"==dk(this)?this.o||ye(a,!1,v(this.Ta,this)):(this.b.loaded=!0,ve(this.W,a),this.Ta())};
g.Ta=function(){var a=J(this.h);if(a&&a.getApiInterface)if(a.hasFallbackHappened&&a.hasFallbackHappened())this.Yb();else{ak(this);this.o=!0;var a=J(this.h),b=a.getApiInterface();a.addEventListener&&(this.q=v(a.addEventListener,a));a.removeEventListener&&(this.P=v(a.removeEventListener,a));for(var c=0;c<b.length;c++){var d=b[c];this.g[d]||(this.g[d]=v(a[d],a))}for(var e in this.k)this.q(e,this.k[e]);this.xb("onTabOrderChange",v(this.jd,this));this.xb("onNavigate",v(this.kd,this));"flash"==this.i&&
this.xb("onRemoteReceiverSelected",v(this.Hb,this));e=Rj.getInstance();e.h.G("onlineReceiverChange",this.Zb,this);e.h.G("connectToReceiver",this.Hb,this);Xj(this);this.ba&&this.ba(this.g);this.B.u("onReady",this.g);Q("player-ready",this.g)}else M(v(this.Ta,this),50)};
function ak(a){a.o=!1;if(a.P)for(var b in a.k)a.P(b,a.k[b]);a.q=null;a.P=null;for(var c in a.g)a.g[c]=null;a.g.addEventListener=v(a.xb,a);a.g.removeEventListener=v(a.Jd,a);a.g.destroy=v(a.Hd,a);a.g.getPlayerType=v(a.Id,a);a.g.writePlayer=v(a.lb,a);a.g.isReady=v(a.Kd,a)}g.Kd=function(){return this.o};g.Zb=function(){this.g.updateRemoteReceivers&&this.g.updateRemoteReceivers(Zf())};
g.xb=function(a,b){var c=ck(this,b);if(c){if(!C(this.Sa,a)&&!this.k[a]){var d=fk(this,a);this.q&&this.q(a,d)}this.B.G(a,c);"onReady"==a&&this.o&&M(ma(c,this.g),0)}};g.Jd=function(a,b){var c=ck(this,b);c&&this.B.la(a,c)};function ck(a,b){var c=b;if("string"==typeof b){if(a.ea[b])return a.ea[b];c=function(){var a=n(b);a&&a.apply(m,arguments)};a.ea[b]=c}return c?c:null}function fk(a,b){var c="ytPlayer"+b+a.ca;a.k[b]=c;m[c]=function(c){M(function(){a.p||a.B.u(b,c)},0)};return c}
g.jd=function(a){a=a?Lb:Kb;for(var b=a(document.activeElement);b&&(1!=b.nodeType||(b.focus(),b!=document.activeElement));)b=a(b)};g.kd=function(a){var b=L("EVENT_ID");b&&Sj(a.url,{ei:b,feature:a.feature})};
g.Bd=function(){ek(this);this.i="unsupported";var a=hc("PLAYER_FALLBACK_OVERRIDE");if(!a){var a=hc("PLAYER_FALLBACK",void 0,'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=hc("QUICKTIME_FALLBACK",void 0,'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>'))}this.W.innerHTML=
'<div class="ytp-fallback"><div class="ytp-fallback-content">'+a+"</div></div>";if("embedded"==this.ta)for(a=this.W.getElementsByTagName("a"),b=0;b<a.length;b++)a[b].setAttribute("target","_blank")};g.Id=function(){return this.i||dk(this)};function dk(a){return(a=J(a.h))?"div"==a.tagName.toLowerCase()?"html5":"flash":null}function ek(a){ak(a);a.i=null;var b=J(a.h);b&&b.destroy&&b.destroy();for(a=a.W;b=a.firstChild;)a.removeChild(b)}g.Hd=function(){gk(this.W)};
g.I=function(){ek(this);this.ea=null;for(var a in this.k)delete m[this.k[a]];this.g=null;this.b&&(this.b=this.b.fallback=null);a=Rj.getInstance();a.h.la("onlineReceiverChange",this.Zb,this);a.h.la("connectToReceiver",this.Hb,this);Vj.Q.I.call(this)};var hk=n("yt.player.embed")||Uj;x("yt.player.embed",hk);var gk=n("yt.player.destroy")||Yj;x("yt.player.destroy",gk);var ik=n("yt.player.getPlayerByElement")||Zj;x("yt.player.getPlayerByElement",ik);var jk={},kk=0;function lk(a){if(a){var b=new Image,c=""+kk++;jk[c]=b;b.onload=b.onerror=function(){delete jk[c]};b.src=a;b=eval("null")}};function mk(){var a=nk().tick,b=nk().span,c=nk().info,d=n("yt.timing.reportbuilder_");if(d){if(d=d.apply(null,[a,b,c,void 0]))ok(d),pk()}else{var d={v:2,s:"youtube",action:L("TIMING_ACTION")},e=L("TIMING_INFO")||{},f;for(f in e)c[f]=e[f];f=c.srt;delete c.srt;if(!f&&0!==f)try{var h=(window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance).timing;f=h.responseStart-h.navigationStart}catch(k){c.pt&&(f=c.pt)}if(f||0===f)c.srt=f;a.aft||(a.aft=a.vr&&a.cl&&a.cl>a.vr?a.cl:
a.vr?a.vr:a.ol);a.aft&&a.plev&&(a.aft=Math.min(a.aft,a.plev));a.vr&&a.gv&&(b.vl=Math.round(a.vr-a.gv));for(var l in c)"_"!=l.charAt(0)&&(d[l]=c[l]);c={};h=[];l=a._start;for(var p in a)"_"!=p.charAt(0)&&(f=Math.max(Math.round(a[p]-l),0),c[p]=f,h.push(p+"."+f));d.rt=h.join(",");a={};p=[];for(var r in b)"_"!=r.charAt(0)&&(a[r]=b[r],p.push(r+"."+b[r]));d.it=p.join(",");ok(d);(b=n("ytdebug.logTiming"))&&b(d,c,a);pk()}}
function ok(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];lk(b+"?"+c.substring(1))}function nk(){return n("ytcsi.data_")||pk()}function pk(){var a={tick:{},span:{},info:{}};x("ytcsi.data_",a);return a};function qk(a,b){this.source=null;this.i=a||null;this.origin="*";this.q=window.document.location.protocol+"//"+window.document.location.hostname;this.k=b;this.h=this.b=this.g=this.p=null;N(window,"message",v(this.o,this))}
qk.prototype.o=function(a){var b=this.k||L("POST_MESSAGE_ORIGIN")||this.q;if("*"==b||a.origin==b)if(!this.i||a.source==this.i)switch(this.source=a.source,this.origin="null"==a.origin?this.origin:a.origin,a=Ad(a.data),this.p=a.id,a.event){case "listening":this.b&&(this.b(),this.b=null);break;case "command":this.g&&(this.h&&!C(this.h,a.func)||this.g(a.func,a.args))}};qk.prototype.sendMessage=function(a){this.source&&(a.id=this.p,a=U(a),this.source.postMessage(a,this.origin))};function rk(){var a=this.g=new qk,b=v(this.xd,this);a.g=b;a.h=null;this.h=[];this.q=!1;this.o=(a=L("POST_MESSAGE_ORIGIN"))&&RegExp("^https?://([a-z0-9-]{1,63}\\.)*("+sf.join("|").replace(/\./g,".")+")(:[0-9]+)?([/?#]|$)","i").test(a)?a:null;this.i={}}g=rk.prototype;g.xd=function(a,b){if(this.o&&this.o!=this.g.origin)this.dispose();else if("addEventListener"==a&&b){var c=b[0];this.i[c]||(this.addEventListener(c,sk(this,c)),this.i[c]=!0)}else this.yc(a,b)};g.yc=function(){};
function sk(a,b){return v(function(a){this.sendMessage(b,a)},a)}g.addEventListener=function(){};g.pd=function(){this.q=!0;this.sendMessage("initialDelivery",this.Tb());this.sendMessage("onReady");A(this.h,this.Bc,this);this.h=[]};g.Tb=function(){return null};function tk(a,b){a.sendMessage("infoDelivery",b)}g.Bc=function(a){this.q?this.g.sendMessage(a):this.h.push(a)};g.sendMessage=function(a,b){this.Bc({event:a,info:void 0==b?null:b})};g.dispose=function(){this.g=null};function uk(a){rk.call(this);this.b=a;this.p={};this.k={};this.b.addEventListener("onReady",v(this.qd,this));this.b.addEventListener("onVideoProgress",v(this.vd,this));this.b.addEventListener("onVolumeChange",v(this.wd,this));this.b.addEventListener("onApiChange",v(this.rd,this));this.b.addEventListener("onPlaybackQualityChange",v(this.sd,this));this.b.addEventListener("onPlaybackRateChange",v(this.td,this));this.b.addEventListener("onStateChange",v(this.ud,this))}y(uk,rk);
function vk(a,b){Va(a.p,function(a,d){if(b[d]){var e=this.k[a];e&&(b[a]=e)}},a);return b}g=uk.prototype;g.yc=function(a,b){if(this.b[a]){b=b||[];var c;if(c=0==a.search("cue")||0==a.search("load")){c=b[0];var d=typeof c;c="object"==d&&null!=c||"function"==d}c&&(b[0]=vk(this,b[0]));this.b[a].apply(this.b,b);0!=a.search("cue")&&0!=a.search("load")||tk(this,this.Tb())}};g.qd=function(){var a=v(this.pd,this);this.g.b=a};g.addEventListener=function(a,b){this.b.addEventListener(a,b)};
g.Tb=function(){var a=this.b.getApiInterface();Fa(a,"getVideoData");for(var b={apiInterface:a},c=0,d=a.length;c<d;c++){var e=a[c];if(0==e.search("get")||0==e.search("is")){var f;f=e;var 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={video_id:this.b.getVideoData().video_id};return b};
g.ud=function(a){tk(this,{playerState:a,currentTime:this.b.getCurrentTime(),duration:this.b.getDuration(),videoData:{video_id:this.b.getVideoData().video_id},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()})};
g.sd=function(a){tk(this,{playbackQuality:a})};g.td=function(a){tk(this,{playbackRate:a})};g.rd=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],p=this.b.getOption(e,l);b[e][l]=p}}this.sendMessage("apiInfoDelivery",b)};g.wd=function(){tk(this,{muted:this.b.isMuted(),volume:this.b.getVolume()})};
g.vd=function(a){tk(this,{currentTime:a,videoBytesLoaded:this.b.getVideoBytesLoaded(),videoLoadedFraction:this.b.getVideoLoadedFraction()})};function wk(a,b){var c=L("CONVERSION_CONFIG_DICT");if(c){if(u(b)){var d=24==b.length&&"UC"==b.slice(0,2)?b.substr(2):22==b.length?b:null;if(c.uid!=d)return}var e="followon_"+a;if(c.baseUrl&&c.uid){var f=c.rmktEnabled,d=c.focEnabled&&!c.isAd;if(f||d){e={label:d?e:"default"};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 h=[],k;for(k in f)h.push(encodeURIComponent(k)+
"="+encodeURIComponent(f[k]));e.data=h.join(";")}d&&("view"==a&&c.vid&&c.uid&&(c.oeid||c.ieid))&&(c.oeid&&(e.oeid=c.oeid),c.ieid&&(e.ieid=c.ieid),e.evid=c.vid);d&&(e.foc_id=c.uid);c=xc(Ac([c.baseUrl],e))}else c=null}else c=null;c&&lk(c)}};var xk=[];function yk(a,b,c,d,e){b?Q("ypc-delayedloader-load",function(){Q("ypc-init-subscription",b)}):zk(a,c,d,e)}function Ak(a,b,c,d,e,f){c?Q("ypc-delayedloader-load",function(){Q("ypc-subscription-cancel",c)}):Bk(a,b,d,e,f)}
function Ck(a){if(a.length){var b=Ka(a,0,40);Q("subscription-batch-subscribe-loading",b);Dk("subscription-subscribe-loading",b);var c={};c.session_token=ec();c.a=b.join(",");var d=function(){Q("subscription-batch-subscribe-loaded",b);Dk("subscription-subscribe-loaded",b)};gj("/subscription_ajax?action_create_subscription_to_all=1",{method:"POST",ga:c,$:function(c,f){d();var h=f.response,k=h.id;if(t(k)&&k.length==b.length){var l={};A(k,function(a,c){l[b[c]]=a});Q("subscription-batch-subscribe-success",
l);Va(l,function(a,b){Q("subscription-subscribe-success",b,a)});(h=h.guide_notification_html_content)&&Q("guide-add-subscription",h);a.length&&Ck(a)}},onError:function(){d();Q("subscription-batch-subscribe-failure",b);Dk("subscription-subscribe-failure",b)}})}}
function Ek(a){if(!$a(a)){var b=Xa(a),c=Ka(b,0,40),d=[];A(c,function(b){d.push(a[b])});var e={};A(b,function(b){e[b]=a[b]});Q("subscription-batch-unsubscribe-loading",c);Dk("subscription-unsubscirbe-loading",c);b={};b.session_token=ec();b.s=d.join(",");var f=function(){Q("subscription-batch-unsubscribe-loaded",c);Dk("subscription-unsubscribe-loaded",c)};gj("/subscription_ajax?action_remove_subscriptions=1",{method:"POST",ga:b,$:function(){f();Q("subscription-batch-unsubscribe-success",c);Dk("subscription-unsubscribe-success",
c);$a(e)||Ek(e)},onError:function(){f();Q("subscription-batch-unsubscribe-failure",c);Dk("subscription-unsubscribe-failure",c)}})}}function Fk(a,b,c){Gk(a,b,null,c)}function Hk(a,b,c){Gk(a,null,b,c)}function Ik(a,b,c){Jk(a,b,null,c)}function Kk(a,b,c){Jk(a,null,b,c)}function Lk(a,b,c,d){Gk(a,b,c,d)}function Mk(a,b,c,d){a=a.subscriptionElement||null;(b=b.subscriptionId)&&Q("subscription-subscribe-success",d,b,a)}
function Nk(a,b){Va(a,function(a,b){Q("subscription-subscribe-success",b,a)});Q("guide-add-subscription",b)}function Ok(a,b){Q("subscription-unsubscribe-success",a.itemId,a.subscriptionElement||null);b&&(Q("subscription-batch-unsubscribe-success",b),Dk("subscription-unsubscribe-success",b),Dk("subscription-enable-ypc",b))}
function zk(a,b,c,d){Q("subscription-subscribe-loading",a);var e={};e.c=a;d&&(e.eurl=d);d={};d.session_token=ec();var f=L("PLAYBACK_ID");f&&(d.plid=f);c&&Pk("/subscription_ajax?action_create_subscription_to_channel=1",e,c);gj("/subscription_ajax?action_create_subscription_to_channel=1",{method:"POST",Gc:e,ga:d,$:function(c,d){var e=d.response;Q("subscription-subscribe-success",a,e.id,b);e.show_feed_privacy_dialog&&Q("SHOW-FEED-PRIVACY-SUBSCRIBE-DIALOG",a);(e=e.guide_notification_html_content)&&Q("guide-add-subscription",
e)},onError:function(){Q("subscription-subscribe-failure",a)},Cb:function(){Q("subscription-subscribe-loaded",a)}});wk("subscribe",a)}
function Bk(a,b,c,d,e){Q("subscription-unsubscirbe-loading",a);var f={};e&&(f.eurl=e);e={};e.session_token=ec();e.s=b;(b=L("PLAYBACK_ID"))&&(e.plid=b);d&&Pk("/subscription_ajax?action_remove_subscriptions=1",{},d);gj("/subscription_ajax?action_remove_subscriptions=1",{method:"POST",Gc:f,ga:e,$:function(){Q("subscription-unsubscribe-success",a,c)},onError:function(){Q("subscription-unsubscribe-failure",a)},Cb:function(){Q("subscription-unsubscribe-loaded",a)}});wk("unsubscribe",a)}
function Gk(a,b,c,d){if(null!==b||null!==c){Q("subscription-prefs-loading",a);var e={};e.session_token=ec();e.subscription_id=a;null===b||(e.email_on_upload=b);null===c||(e.uploads_only=c);gj("/subscription_ajax?action_update_subscription_preferences=1",{method:"POST",ga:e,$:function(){Q("subscription-prefs-success",a)},onError:function(){d&&d();Q("subscription-prefs-failure",a)},Cb:function(){Q("subscription-prefs-loaded",a)}})}}
function Jk(a,b,c,d){if(a.length&&(null!==b||null!==c)){var e=Ka(a,0,40);Q("subscription-batch-prefs-loading",e);var f={};f.session_token=ec();f.s=e.join(",");null===b||(f.email_on_upload=b);null===c||(f.uploads_only=c);var h=function(){Q("subscription-batch-prefs-loaded",e)};gj("/subscription_ajax?action_update_subscription_preferences_batch=1",{method:"POST",ga:f,$:function(){h();Q("subscription-batch-prefs-success",e);a.length&&Jk(a,b,c,d)},onError:function(){h();d&&d();Q("subscription-batch-prefs-failure",
e)}})}}function Dk(a,b){A(b,function(b){Q(a,b)})}function Pk(a,b,c){a=le(a,b);c=ie(c);Sj(a,c)};var Qk=null,Rk=null,Sk={cc_load_policy:"cc3_module",threed_load_policy:"threed_module"};function Tk(a){var b={};Va(Sk,function(c){a.args[c]&&(b[c]=a.args[c],delete a.args[c])});return b}function Uk(a){var b={};b.volume=isNaN(a.volume)?Xd().volume:Math.min(Math.max(a.volume,0),100);b.nonNormalized=a.nonNormalized;b.muted=void 0==a.muted?Xd().muted:a.muted;Sd("yt-player-volume",b,2592E3)};x("yt.setAjaxToken",dc);x("yt.setConfig",bc);x("yt.setMsg",function(a){cc($b,arguments)});x("yt.embed.openLoginDialog",function(){Cc(function(a){Qk.b&&Qk.b(a)})});x("writeEmbed",function(){var a=new md(L("PLAYER_CONFIG")),b=Tk(a);a.args.el="embedded";L("CUED_AUTOPLAY")&&(a.args.autoplay=1);Qk=hk("player",a);Qk.addEventListener("onVolumeChange",Uk);a=Rk=new uk(Qk);a.p=Sk;a.k=b});
N(window,"load",function(){nk().tick.ol=w();var a=L("TIMING_ACTION"),b=!!L("TIMING_WFF"),c=nk().tick;a&&c._start&&(b&&c.vr?mk():b||!c.ol&&!c.aft||mk());xk.push(P("subscription-subscribe",yk));xk.push(P("subscription-unsubscribe",Ak));xk.push(P("subscription-batch-subscribe",Ck));xk.push(P("subscription-batch-unsubscribe",Ek));xk.push(P("subscription-pref-email",Fk));xk.push(P("subscription-pref-uploads",Hk));xk.push(P("subscription-prefs",Lk));xk.push(P("subscription-batch-pref-email",Ik));xk.push(P("subscription-batch-pref-uploads",
Kk));xk.push(P("ypc-purchase-success",Mk));xk.push(P("ypc-subscription-cancel-success",Ok));xk.push(P("ypc-guide-sync-success",Nk))});N(window,"unload",function(){Qk.destroy();Rk.dispose()});var Vk=id.getInstance(),Wk=S(Vk);Wk in Yc||!Vk.Wc()||(Vk.register(),Yc[Wk]=Vk);})();
