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