]> Raphaƫl G. Git Repositories - youtubedl/blob - test/testdata/html5player-vfldJ8xgI.js
bd6c222039cd0ba56f2030b7a4736f3a33271c6e
[youtubedl] / test / testdata / html5player-vfldJ8xgI.js
1 (function(){var f,aa=aa||{},l=this;function n(a,b){for(var c=a.split("."),d=b||l,e;e=c.shift();)if(null!=d[e])d=d[e];else return null;return d}function ba(){}function ca(a){a.getInstance=function(){return a.lq?a.lq:a.lq=new a}}
2 function da(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
3 else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function q(a){return void 0!==a}function ea(a){return null!=a}function t(a){return"array"==da(a)}function fa(a){var b=da(a);return"array"==b||"object"==b&&"number"==typeof a.length}function u(a){return"string"==typeof a}function ga(a){return"number"==typeof a}function ha(a){return"function"==da(a)}function ia(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ja(a){return a[ka]||(a[ka]=++la)}
4 var ka="closure_uid_"+(1E9*Math.random()>>>0),la=0;function ma(a,b,c){return a.call.apply(a.bind,arguments)}function na(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)}}
5 function v(a,b,c){v=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ma:na;return v.apply(null,arguments)}function oa(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)}}function w(a,b){for(var c in b)a[c]=b[c]}var x=Date.now||function(){return+new Date};
6 function pa(a,b){var c=a.split("."),d=l;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;a.prototype.constructor=a}Function.prototype.bind=Function.prototype.bind||function(a,b){if(1<arguments.length){var c=Array.prototype.slice.call(arguments,1);c.unshift(this,a);return v.apply(null,c)}return v(this,a)};function qa(a){Error.captureStackTrace?Error.captureStackTrace(this,qa):this.stack=Error().stack||"";a&&(this.message=String(a))}y(qa,Error);qa.prototype.name="CustomError";var ra;function ta(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")}function ua(a){return decodeURIComponent(a.replace(/\+/g," "))}function va(a){if(!wa.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(xa,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(ya,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(za,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(Aa,"&quot;"));return a}var xa=/&/g,ya=/</g,za=/>/g,Aa=/\"/g,wa=/[&<>\"]/;
7 function Ba(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("."),g=Math.max(d.length,e.length),h=0;0==c&&h<g;h++){var k=d[h]||"",m=e[h]||"",p=RegExp("(\\d*)(\\D*)","g"),s=RegExp("(\\d*)(\\D*)","g");do{var r=p.exec(k)||["","",""],D=s.exec(m)||["","",""];if(0==r[0].length&&0==D[0].length)break;c=((0==r[1].length?0:parseInt(r[1],10))<(0==D[1].length?0:parseInt(D[1],10))?-1:(0==r[1].length?0:parseInt(r[1],10))>(0==D[1].length?
8 0:parseInt(D[1],10))?1:0)||((0==r[2].length)<(0==D[2].length)?-1:(0==r[2].length)>(0==D[2].length)?1:0)||(r[2]<D[2]?-1:r[2]>D[2]?1:0)}while(0==c)}return c}function Ca(a){var b=Number(a);return 0==b&&/^[\s\xa0]*$/.test(a)?NaN:b}function Da(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})}
9 function Ea(a){var b=u(void 0)?"undefined".replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08"):"\\s";return a.replace(RegExp("(^"+(b?"|["+b+"]+":"")+")([a-z])","g"),function(a,b,e){return b+e.toUpperCase()})};function Fa(){};function Ga(a){return a[a.length-1]}
10 var Ha=Array.prototype,Ia=Ha.indexOf?function(a,b,c){return Ha.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(u(a))return u(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},z=Ha.forEach?function(a,b,c){Ha.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,g=0;g<d;g++)g in e&&b.call(c,e[g],g,a)},Ja=Ha.filter?function(a,b,c){return Ha.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],g=
11 0,h=u(a)?a.split(""):a,k=0;k<d;k++)if(k in h){var m=h[k];b.call(c,m,k,a)&&(e[g++]=m)}return e},Ka=Ha.map?function(a,b,c){return Ha.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),g=u(a)?a.split(""):a,h=0;h<d;h++)h in g&&(e[h]=b.call(c,g[h],h,a));return e},La=Ha.some?function(a,b,c){return Ha.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,g=0;g<d;g++)if(g in e&&b.call(c,e[g],g,a))return!0;return!1},Ma=Ha.every?function(a,b,c){return Ha.every.call(a,b,c)}:function(a,
12 b,c){for(var d=a.length,e=u(a)?a.split(""):a,g=0;g<d;g++)if(g in e&&!b.call(c,e[g],g,a))return!1;return!0};function Na(a,b){var c=0;z(a,function(a,e,g){b.call(void 0,a,e,g)&&++c},void 0);return c}function Oa(a,b,c){b=Pa(a,b,c);return 0>b?null:u(a)?a.charAt(b):a[b]}function Pa(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,g=0;g<d;g++)if(g in e&&b.call(c,e[g],g,a))return g;return-1}function Qa(a,b){var c=Ra(a,b,void 0);return 0>c?null:u(a)?a.charAt(c):a[c]}
13 function Ra(a,b,c){for(var d=u(a)?a.split(""):a,e=a.length-1;0<=e;e--)if(e in d&&b.call(c,d[e],e,a))return e;return-1}function Sa(a,b){return 0<=Ia(a,b)}function Ta(a){return 0==a.length}function Ua(a){if(!t(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function Va(a,b){Sa(a,b)||a.push(b)}function Wa(a,b){var c=Ia(a,b),d;(d=0<=c)&&Xa(a,c);return d}function Xa(a,b){Ha.splice.call(a,b,1)}function Ya(a,b){var c=Pa(a,b,void 0);0<=c&&Xa(a,c)}
14 function Za(a){return Ha.concat.apply(Ha,arguments)}function $a(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 ab(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c],e;if(t(d)||(e=fa(d))&&Object.prototype.hasOwnProperty.call(d,"callee"))a.push.apply(a,d);else if(e)for(var g=a.length,h=d.length,k=0;k<h;k++)a[g+k]=d[k];else a.push(d)}}function bb(a,b,c,d){Ha.splice.apply(a,cb(arguments,1))}
15 function cb(a,b,c){return 2>=arguments.length?Ha.slice.call(a,b):Ha.slice.call(a,b,c)}function db(a){for(var b={},c=0,d=0;d<a.length;){var e=a[d++],g=ia(e)?"o"+ja(e):(typeof e).charAt(0)+e;Object.prototype.hasOwnProperty.call(b,g)||(b[g]=!0,a[c++]=e)}a.length=c}function eb(a,b,c){for(var d=0,e=a.length,g;d<e;){var h=d+e>>1,k;k=b(c,a[h]);0<k?d=h+1:(e=h,g=!k)}return g?d:~d}function fb(a,b){Ha.sort.call(a,b||gb)}function hb(a,b){var c=gb;fb(a,function(a,e){return c(a[b],e[b])})}
16 function ib(a,b,c){if(!fa(a)||!fa(b)||a.length!=b.length)return!1;var d=a.length;c=c||jb;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0}function gb(a,b){return a>b?1:a<b?-1:0}function jb(a,b){return a===b}function kb(a,b,c){c=eb(a,c||gb,b);0>c&&bb(a,-(c+1),0,b)}function lb(a){for(var b=[],c=0;c<arguments.length;c++){var d=arguments[c];t(d)?b.push.apply(b,lb.apply(null,d)):b.push(d)}return b};function mb(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 nb(a){return eval("("+a+")")}function ob(a){return pb(new qb(void 0),a)}function qb(a){this.a=a}
17 function pb(a,b){var c=[];rb(a,b,c);return c.join("")}
18 function rb(a,b,c){switch(typeof b){case "string":sb(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(t(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],rb(a,a.a?a.a.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d),sb(g,c),c.push(":"),
19 rb(a,a.a?a.a.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var tb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},ub=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
20 function sb(a,b){b.push('"',a.replace(ub,function(a){if(a in tb)return tb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return tb[a]=e+b.toString(16)}),'"')};function vb(a,b,c){return Math.min(Math.max(a,b),c)};function A(a,b){this.x=q(a)?a:0;this.y=q(b)?b:0}f=A.prototype;f.clone=function(){return new A(this.x,this.y)};function wb(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function xb(a,b){return new A(a.x-b.x,a.y-b.y)}f.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};f.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};f.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};
21 f.scale=function(a,b){var c=ga(b)?b:a;this.x*=a;this.y*=c;return this};function yb(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}f=yb.prototype;f.clone=function(){return new yb(this.top,this.right,this.bottom,this.left)};f.contains=function(a){return this&&a?a instanceof yb?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};
22 f.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};f.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};f.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};
23 f.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 B(a,b){this.width=a;this.height=b}function zb(a,b){return a==b?!0:a&&b?a.width==b.width&&a.height==b.height:!1}f=B.prototype;f.clone=function(){return new B(this.width,this.height)};function Ab(a){return a.width/a.height}f.isEmpty=function(){return!(this.width*this.height)};f.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};f.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
24 f.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};f.scale=function(a,b){var c=ga(b)?b:a;this.width*=a;this.height*=c;return this};function Bb(a,b){return a.scale(Ab(a)>Ab(b)?b.width/a.width:b.height/a.height)};function Cb(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}f=Cb.prototype;f.clone=function(){return new Cb(this.left,this.top,this.width,this.height)};function Db(a){return new Cb(a.left,a.top,a.right-a.left,a.bottom-a.top)}f.contains=function(a){return a instanceof Cb?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};
25 f.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};f.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};f.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};
26 f.scale=function(a,b){var c=ga(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function Eb(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function Fb(a,b){for(var c in a)if(!b.call(void 0,a[c],c,a))return!1;return!0}function Gb(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function Hb(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function Ib(a,b){for(var c in a)if(a[c]==b)return!0;return!1}function Jb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c}function Kb(a){for(var b in a)return!1;return!0}function Lb(a){var b={},c;for(c in a)b[c]=a[c];return b}
27 function Mb(a){var b=da(a);if("object"==b||"array"==b){if(a.clone)return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=Mb(a[c]);return b}return a}var Nb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Ob(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 g=0;g<Nb.length;g++)c=Nb[g],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}}
28 function Pb(a){var b=arguments.length;if(1==b&&t(arguments[0]))return Pb.apply(null,arguments[0]);if(b%2)throw Error("Uneven number of arguments");for(var c={},d=0;d<b;d+=2)c[arguments[d]]=arguments[d+1];return c};function Qb(a){return function(){throw a;}};var Rb,Sb,Tb,Ub,Vb,Wb,Xb;function Yb(){return l.navigator?l.navigator.userAgent:null}function Zb(){return l.navigator}Vb=Ub=Tb=Sb=Rb=!1;var $b;if($b=Yb()){var ac=Zb();Rb=0==$b.lastIndexOf("Opera",0);Sb=!Rb&&(-1!=$b.indexOf("MSIE")||-1!=$b.indexOf("Trident"));Ub=(Tb=!Rb&&-1!=$b.indexOf("WebKit"))&&-1!=$b.indexOf("Mobile");Vb=!Rb&&!Tb&&!Sb&&"Gecko"==ac.product}var bc=Rb,C=Sb,cc=Vb,dc=Tb,ec=Ub,fc=Zb(),gc=fc&&fc.platform||"";Wb=-1!=gc.indexOf("Mac");Xb=-1!=gc.indexOf("Win");
29 var hc=!!Zb()&&-1!=(Zb().appVersion||"").indexOf("X11");function ic(){var a=l.document;return a?a.documentMode:void 0}var jc;t:{var kc="",lc;if(bc&&l.opera)var mc=l.opera.version,kc="function"==typeof mc?mc():mc;else if(cc?lc=/rv\:([^\);]+)(\)|;)/:C?lc=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:dc&&(lc=/WebKit\/(\S+)/),lc)var nc=lc.exec(Yb()),kc=nc?nc[1]:"";if(C){var oc=ic();if(oc>parseFloat(kc)){jc=String(oc);break t}}jc=kc}var pc=jc,qc={};function rc(a){return qc[a]||(qc[a]=0<=Ba(pc,a))}
30 function sc(a){return C&&tc>=a}var uc=l.document,tc=uc&&C?ic()||("CSS1Compat"==uc.compatMode?parseInt(pc,10):5):void 0;var vc=!C||sc(9),wc=!cc&&!C||C&&sc(9)||cc&&rc("1.9.1"),xc=C&&!rc("9"),yc=C||bc||dc;function zc(a){a=a.className;return u(a)&&a.match(/\S+/g)||[]}function Ac(a,b){for(var c=zc(a),d=cb(arguments,1),e=c.length+d.length,g=c,h=0;h<d.length;h++)Sa(g,d[h])||g.push(d[h]);g=c.join(" ");a.className=g;return c.length==e}function Bc(a,b){var c=zc(a),d=cb(arguments,1),c=Cc(c,d).join(" ");a.className=c}function Cc(a,b){return Ja(a,function(a){return!Sa(b,a)})}function Dc(a,b){return Sa(zc(a),b)}function Ec(a,b,c){c?Ac(a,b):Bc(a,b)}function Fc(a,b){var c=!Dc(a,b);Ec(a,b,c)};function Gc(a){return a?new Hc(Ic(a)):ra||(ra=new Hc)}function Jc(a){return u(a)?document.getElementById(a):a}function Kc(a,b){var c=b||document;return c.querySelectorAll&&c.querySelector?c.querySelectorAll("."+a):c.getElementsByClassName?c.getElementsByClassName(a):Lc("*",a,b)}function E(a,b){var c=b||document,d=null;return(d=c.querySelectorAll&&c.querySelector?c.querySelector("."+a):Kc(a,b)[0])||null}
31 function Lc(a,b,c){var d=document;c=c||d;a=a&&"*"!=a?a.toUpperCase():"";if(c.querySelectorAll&&c.querySelector&&(a||b))return c.querySelectorAll(a+(b?"."+b:""));if(b&&c.getElementsByClassName){c=c.getElementsByClassName(b);if(a){for(var d={},e=0,g=0,h;h=c[g];g++)a==h.nodeName&&(d[e++]=h);d.length=e;return d}return c}c=c.getElementsByTagName(a||"*");if(b){d={};for(g=e=0;h=c[g];g++)a=h.className,"function"==typeof a.split&&Sa(a.split(/\s+/),b)&&(d[e++]=h);d.length=e;return d}return c}
32 function Mc(a,b){Eb(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:d in Nc?a.setAttribute(Nc[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})}var Nc={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};
33 function Oc(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new B(a.clientWidth,a.clientHeight)}function Pc(a){var b=Qc(a);a=a.parentWindow||a.defaultView;return C&&rc("10")&&a.pageYOffset!=b.scrollTop?new A(b.scrollLeft,b.scrollTop):new A(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function Qc(a){return dc||"CSS1Compat"!=a.compatMode?a.body||a.documentElement:a.documentElement}
34 function Rc(a,b,c){var d=arguments,e=document,g=d[0],h=d[1];if(!vc&&h&&(h.name||h.type)){g=["<",g];h.name&&g.push(' name="',va(h.name),'"');if(h.type){g.push(' type="',va(h.type),'"');var k={};Ob(k,h);delete k.type;h=k}g.push(">");g=g.join("")}g=e.createElement(g);h&&(u(h)?g.className=h:t(h)?Ac.apply(null,[g].concat(h)):Mc(g,h));2<d.length&&Sc(e,g,d,2);return g}
35 function Sc(a,b,c,d){function e(c){c&&b.appendChild(u(c)?a.createTextNode(c):c)}for(;d<c.length;d++){var g=c[d];!fa(g)||ia(g)&&0<g.nodeType?e(g):z(Tc(g)?$a(g):g,e)}}function Uc(a){return document.createElement(a)}function Vc(a){return document.createTextNode(String(a))}function Wc(a,b){Sc(Ic(a),a,arguments,1)}function Xc(a){for(var b;b=a.firstChild;)a.removeChild(b)}function F(a){a&&a.parentNode&&a.parentNode.removeChild(a)}
36 function Yc(a){if(void 0!=a.firstElementChild)a=a.firstElementChild;else for(a=a.firstChild;a&&1!=a.nodeType;)a=a.nextSibling;return a}function Zc(a){if(yc&&!(C&&rc("9")&&!rc("10")&&l.SVGElement&&a instanceof l.SVGElement))return a.parentElement;a=a.parentNode;return ia(a)&&1==a.nodeType?a:null}
37 function $c(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 Ic(a){return 9==a.nodeType?a:a.ownerDocument||a.document}
38 function ad(a,b){if("textContent"in a)a.textContent=b;else if(a.firstChild&&3==a.firstChild.nodeType){for(;a.lastChild!=a.firstChild;)a.removeChild(a.lastChild);a.firstChild.data=b}else Xc(a),a.appendChild(Ic(a).createTextNode(String(b)))}function bd(a,b){var c=[];return cd(a,b,c,!0)?c[0]:void 0}function cd(a,b,c,d){if(null!=a)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||cd(a,b,c,d))return!0;a=a.nextSibling}return!1}var dd={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},ed={IMG:" ",BR:"\n"};
39 function fd(a,b,c){if(!(a.nodeName in dd))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in ed)b.push(ed[a.nodeName]);else for(a=a.firstChild;a;)fd(a,b,c),a=a.nextSibling}function Tc(a){if(a&&"number"==typeof a.length){if(ia(a))return"function"==typeof a.item||"string"==typeof a.item;if(ha(a))return"function"==typeof a.item}return!1}function gd(a,b){return b?hd(a,function(a){return!b||Dc(a,b)},!0):null}
40 function hd(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 Hc(a){this.a=a||l.document||document}f=Hc.prototype;f.N=function(a){return u(a)?this.a.getElementById(a):a};f.createElement=function(a){return this.a.createElement(a)};function id(a){return"CSS1Compat"==a.a.compatMode}function jd(a){return Pc(a.a)}f.appendChild=function(a,b){a.appendChild(b)};f.append=Wc;
41 f.getChildren=function(a){return wc&&void 0!=a.children?a.children:Ja(a.childNodes,function(a){return 1==a.nodeType})};f.contains=$c;function kd(a,b,c){u(b)?ld(a,c,b):Eb(b,oa(ld,a))}function ld(a,b,c){var d;t:if(d=Da(c),void 0===a.style[d]&&(c=(dc?"Webkit":cc?"Moz":C?"ms":bc?"O":null)+Ea(c),void 0!==a.style[c])){d=c;break t}d&&(a.style[d]=b)}function md(a,b){var c=Ic(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function nd(a,b){return md(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}
42 function od(a,b,c){var d,e=cc&&(Wb||hc)&&rc("1.9");b instanceof A?(d=b.x,b=b.y):(d=b,b=c);a.style.left=pd(d,e);a.style.top=pd(b,e)}function qd(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}C&&a.ownerDocument.body&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}
43 function rd(a){if(C&&!sc(8))return a.offsetParent;var b=Ic(a),c=nd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=nd(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}
44 function sd(a){for(var b=new yb(0,Infinity,Infinity,0),c=Gc(a),d=c.a.body,e=c.a.documentElement,g=Qc(c.a);a=rd(a);)if(!(C&&0==a.clientWidth||dc&&0==a.clientHeight&&a==d||a==d||a==e||"visible"==nd(a,"overflow"))){var h=td(a),k;k=a;if(cc&&!rc("1.9")){var m=parseFloat(md(k,"borderLeftWidth"));if(ud(k))var p=k.offsetWidth-k.clientWidth-m-parseFloat(md(k,"borderRightWidth")),m=m+p;k=new A(m,parseFloat(md(k,"borderTopWidth")))}else k=new A(k.clientLeft,k.clientTop);h.x+=k.x;h.y+=k.y;b.top=Math.max(b.top,
45 h.y);b.right=Math.min(b.right,h.x+a.clientWidth);b.bottom=Math.min(b.bottom,h.y+a.clientHeight);b.left=Math.max(b.left,h.x)}d=g.scrollLeft;g=g.scrollTop;b.left=Math.max(b.left,d);b.top=Math.max(b.top,g);c=Oc(c.a.parentWindow||c.a.defaultView||window);b.right=Math.min(b.right,d+c.width);b.bottom=Math.min(b.bottom,g+c.height);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null}
46 function td(a){var b,c=Ic(a),d=nd(a,"position"),e=cc&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),g=new A(0,0),h;b=c?Ic(c):document;h=!C||sc(9)||id(Gc(b))?b.documentElement:b.body;if(a==h)return g;if(a.getBoundingClientRect)b=qd(a),a=jd(Gc(c)),g.x=b.left+a.x,g.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(h),g.x=b.screenX-a.screenX,g.y=b.screenY-a.screenY;else{b=a;do{g.x+=b.offsetLeft;g.y+=
47 b.offsetTop;b!=a&&(g.x+=b.clientLeft||0,g.y+=b.clientTop||0);if(dc&&"fixed"==nd(b,"position")){g.x+=c.body.scrollLeft;g.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(bc||dc&&"absolute"==d)g.y-=c.body.offsetTop;for(b=a;(b=rd(b))&&b!=c.body&&b!=h;)g.x-=b.scrollLeft,bc&&"TR"==b.tagName||(g.y-=b.scrollTop)}return g}function vd(a,b){var c=wd(a),d=wd(b);return new A(c.x-d.x,c.y-d.y)}
48 function xd(a){var b;if(a.getBoundingClientRect)b=qd(a),b=new A(b.left,b.top);else{b=jd(Gc(a));var c=td(a);b=new A(c.x-b.x,c.y-b.y)}if(cc&&!rc(12)){var d;C?d="-ms-transform":dc?d="-webkit-transform":bc?d="-o-transform":cc&&(d="-moz-transform");var e;d&&(e=nd(a,d));e||(e=nd(a,"transform"));a=e?(a=e.match(yd))?new A(parseFloat(a[1]),parseFloat(a[2])):new A(0,0):new A(0,0);a=new A(b.x+a.x,b.y+a.y)}else a=b;return a}
49 function wd(a){if(1==a.nodeType)return xd(a);var b=ha(a.Ux),c=a;a.targetTouches?c=a.targetTouches[0]:b&&a.re.targetTouches&&(c=a.re.targetTouches[0]);return new A(c.clientX,c.clientY)}function zd(a,b,c){if(b instanceof B)c=b.height,b=b.width;else if(void 0==c)throw Error("missing height argument");Ad(a,b);a.style.height=pd(c,!0)}function pd(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}function Ad(a,b){a.style.width=pd(b,!0)}
50 function Bd(a){var b=Cd;if("none"!=nd(a,"display"))return b(a);var c=a.style,d=c.display,e=c.visibility,g=c.position;c.visibility="hidden";c.position="absolute";c.display="inline";a=b(a);c.display=d;c.position=g;c.visibility=e;return a}function Cd(a){var b=a.offsetWidth,c=a.offsetHeight,d=dc&&!b&&!c;return q(b)&&!d||!a.getBoundingClientRect?new B(b,c):(a=qd(a),new B(a.right-a.left,a.bottom-a.top))}function Dd(a){var b=td(a);a=Bd(a);return new Cb(b.x,b.y,a.width,a.height)}
51 function Ed(a,b){var c=a.style;"opacity"in c?c.opacity=b:"MozOpacity"in c?c.MozOpacity=b:"filter"in c&&(c.filter=""===b?"":"alpha(opacity="+100*b+")")}function ud(a){return"rtl"==nd(a,"direction")}
52 function Fd(a){var b=Ic(a),c=C&&a.currentStyle;if(c&&id(Gc(b))&&"auto"!=c.width&&"auto"!=c.height&&!c.boxSizing)return b=Gd(a,c.width,"width","pixelWidth"),a=Gd(a,c.height,"height","pixelHeight"),new B(b,a);c=new B(a.offsetWidth,a.offsetHeight);b=Hd(a);a=Id(a);return new B(c.width-a.left-b.left-b.right-a.right,c.height-a.top-b.top-b.bottom-a.bottom)}
53 function Gd(a,b,c,d){if(/^\d+px?$/.test(b))return parseInt(b,10);var e=a.style[c],g=a.runtimeStyle[c];a.runtimeStyle[c]=a.currentStyle[c];a.style[c]=b;b=a.style[d];a.style[c]=e;a.runtimeStyle[c]=g;return b}function Jd(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?Gd(a,c,"left","pixelLeft"):0}
54 function Hd(a){if(C){var b=Jd(a,"paddingLeft"),c=Jd(a,"paddingRight"),d=Jd(a,"paddingTop");a=Jd(a,"paddingBottom");return new yb(d,c,a,b)}b=md(a,"paddingLeft");c=md(a,"paddingRight");d=md(a,"paddingTop");a=md(a,"paddingBottom");return new yb(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))}var Kd={thin:2,medium:4,thick:6};
55 function Ld(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 Kd?Kd[c]:Gd(a,c,"left","pixelLeft")}
56 function Id(a){if(C&&!sc(9)){var b=Ld(a,"borderLeft"),c=Ld(a,"borderRight"),d=Ld(a,"borderTop");a=Ld(a,"borderBottom");return new yb(d,c,a,b)}b=md(a,"borderLeftWidth");c=md(a,"borderRightWidth");d=md(a,"borderTopWidth");a=md(a,"borderBottomWidth");return new yb(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))}var Md=/[^\d]+$/,Nd={cm:1,"in":1,mm:1,pc:1,pt:1},Od={em:1,ex:1};
57 function Pd(a){var b=nd(a,"fontSize"),c;c=(c=b.match(Md))&&c[0]||null;if(b&&"px"==c)return parseInt(b,10);if(C){if(c in Nd)return Gd(a,b,"left","pixelLeft");if(a.parentNode&&1==a.parentNode.nodeType&&c in Od)return a=a.parentNode,c=nd(a,"fontSize"),Gd(a,b==c?"1em":b,"left","pixelLeft")}c=Rc("span",{style:"visibility:hidden;position:absolute;line-height:0;padding:0;margin:0;border:0;height:1em;"});a.appendChild(c);b=c.offsetHeight;F(c);return b}var yd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;var Qd="StopIteration"in l?l.StopIteration:Error("StopIteration");function Rd(){}Rd.prototype.next=function(){throw Qd;};Rd.prototype.Nd=function(){return this};function Sd(a){if(a instanceof Rd)return a;if("function"==typeof a.Nd)return a.Nd(!1);if(fa(a)){var b=0,c=new Rd;c.next=function(){for(;;){if(b>=a.length)throw Qd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");}
58 function Td(a,b,c){if(fa(a))try{z(a,b,c)}catch(d){if(d!==Qd)throw d;}else{a=Sd(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(e){if(e!==Qd)throw e;}}}function Ud(a){if(fa(a))return $a(a);a=Sd(a);var b=[];Td(a,function(a){b.push(a)});return b};function Vd(a,b){this.b={};this.a=[];this.g=this.R=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 Vd?(c=a.uc(),d=a.jc()):(c=Hb(a),d=Gb(a));for(var e=0;e<c.length;e++)this.set(c[e],d[e])}}f=Vd.prototype;f.hb=function(){return this.R};f.jc=function(){Wd(this);for(var a=[],b=0;b<this.a.length;b++)a.push(this.b[this.a[b]]);return a};f.uc=function(){Wd(this);return this.a.concat()};
59 f.equals=function(a,b){if(this===a)return!0;if(this.R!=a.hb())return!1;var c=b||Xd;Wd(this);for(var d,e=0;d=this.a[e];e++)if(!c(this.get(d),a.get(d)))return!1;return!0};function Xd(a,b){return a===b}f.isEmpty=function(){return 0==this.R};f.clear=function(){this.b={};this.g=this.R=this.a.length=0};f.remove=function(a){return Yd(this.b,a)?(delete this.b[a],this.R--,this.g++,this.a.length>2*this.R&&Wd(this),!0):!1};
60 function Wd(a){if(a.R!=a.a.length){for(var b=0,c=0;b<a.a.length;){var d=a.a[b];Yd(a.b,d)&&(a.a[c++]=d);b++}a.a.length=c}if(a.R!=a.a.length){for(var e={},c=b=0;b<a.a.length;)d=a.a[b],Yd(e,d)||(a.a[c++]=d,e[d]=1),b++;a.a.length=c}}f.get=function(a,b){return Yd(this.b,a)?this.b[a]:b};f.set=function(a,b){Yd(this.b,a)||(this.R++,this.a.push(a),this.g++);this.b[a]=b};f.clone=function(){return new Vd(this)};
61 f.Nd=function(a){Wd(this);var b=0,c=this.a,d=this.b,e=this.g,g=this,h=new Rd;h.next=function(){for(;;){if(e!=g.g)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw Qd;var h=c[b++];return a?h:d[h]}};return h};function Yd(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Zd(a){if("function"==typeof a.jc)return a.jc();if(u(a))return a.split("");if(fa(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return Gb(a)}function $d(a,b,c){if("function"==typeof a.forEach)a.forEach(b,c);else if(fa(a)||u(a))z(a,b,c);else{var d;if("function"==typeof a.uc)d=a.uc();else if("function"!=typeof a.jc)if(fa(a)||u(a)){d=[];for(var e=a.length,g=0;g<e;g++)d.push(g)}else d=Hb(a);else d=void 0;for(var e=Zd(a),g=e.length,h=0;h<g;h++)b.call(c,e[h],d&&d[h],a)}};function ae(a,b,c,d,e){var g="";a&&(g+=a+":");c&&(g+="//",b&&(g+=b+"@"),g+=c,d&&(g+=":"+d));e&&(g+=e);return g}var be=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function ce(a){if(de){de=!1;var b=l.location;if(b){var c=b.href;if(c&&(c=ee(c))&&c!=b.hostname)throw de=!0,Error();}}return a.match(be)}var de=dc;function ee(a){return(a=ce(a)[3]||null)&&decodeURIComponent(a)}
62 function fe(a){return(a=ce(a)[5]||null)&&decodeURIComponent(a)}function ge(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 he(a,b,c){if(t(b))for(var d=0;d<b.length;d++)he(a,String(b[d]),c);else null!=b&&c.push("&",a,""===b?"":"=",encodeURIComponent(String(b)))}function ie(a,b,c){Math.max(b.length-(c||0),0);for(c=c||0;c<b.length;c+=2)he(b[c],b[c+1],a);return a}
63 function je(a,b){for(var c in b)he(c,b[c],a);return a}function ke(a,b){return ge(2==arguments.length?ie([a],arguments[1],0):ie([a],arguments,1))}function le(a,b,c){a=[a,"&",b];null!=c&&a.push("=",encodeURIComponent(String(c)));return ge(a)}function me(a,b,c,d){for(var e=c.length;0<=(b=a.indexOf(c,b))&&b<d;){var g=a.charCodeAt(b-1);if(38==g||63==g)if(g=a.charCodeAt(b+e),!g||61==g||38==g||35==g)return b;b+=e+1}return-1}var ne=/#|$/,oe=/[?&]($|#)/;
64 function pe(a,b){for(var c=a.search(ne),d=0,e,g=[];0<=(e=me(a,d,b,c));)g.push(a.substring(d,e)),d=Math.min(a.indexOf("&",e)+1||c,c);g.push(a.substr(d));return g.join("").replace(oe,"$1")};function qe(a,b){var c;if(a instanceof qe)this.ef=q(b)?b:a.ef,re(this,a.Uf),this.Si=a.Si,se(this,a.Se),te(this,a.rh),this.sh=a.sh,ue(this,a.a.clone()),ve(this,a.Cl);else if(a&&(c=ce(String(a)))){this.ef=!!b;re(this,c[1]||"",!0);var d=c[2]||"";this.Si=d?decodeURIComponent(d):"";se(this,c[3]||"",!0);te(this,c[4]);this.sh=(d=c[5]||"")?decodeURIComponent(d):"";ue(this,c[6]||"",!0);ve(this,c[7]||"",!0)}else this.ef=!!b,this.a=new we(null,0,this.ef)}f=qe.prototype;f.Uf="";f.Si="";f.Se="";f.rh=null;
65 f.sh="";f.Cl="";f.ef=!1;f.toString=function(){var a=[],b=this.Uf;b&&a.push(xe(b,ye),":");if(b=this.Se){a.push("//");var c=this.Si;c&&a.push(xe(c,ye),"@");a.push(encodeURIComponent(String(b)));b=this.rh;null!=b&&a.push(":",String(b))}if(b=this.sh)this.Se&&"/"!=b.charAt(0)&&a.push("/"),a.push(xe(b,"/"==b.charAt(0)?ze:Ae));(b=this.a.toString())&&a.push("?",b);(b=this.Cl)&&a.push("#",xe(b,Be));return a.join("")};f.clone=function(){return new qe(this)};
66 function re(a,b,c){a.Uf=c?b?decodeURIComponent(b):"":b;a.Uf&&(a.Uf=a.Uf.replace(/:$/,""))}function se(a,b,c){a.Se=c?b?decodeURIComponent(b):"":b}function te(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.rh=b}else a.rh=null}function ue(a,b,c){b instanceof we?(a.a=b,Ce(a.a,a.ef)):(c||(b=xe(b,De)),a.a=new we(b,0,a.ef))}function Ee(a,b,c){a.a.set(b,c)}function Fe(a,b,c){t(c)||(c=[String(c)]);Ge(a.a,b,c)}function ve(a,b,c){a.Cl=c?b?decodeURIComponent(b):"":b;return a}
67 function He(a){Ee(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^x()).toString(36));return a}function Ie(a){return a instanceof qe?a.clone():new qe(a,void 0)}function Je(a,b,c,d){var e=new qe(null,void 0);a&&re(e,a);b&&se(e,b);c&&te(e,c);d&&(e.sh=d);return e}function xe(a,b){return u(a)?encodeURI(a).replace(b,Ke):null}function Ke(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}
68 var ye=/[#\/\?@]/g,Ae=/[\#\?:]/g,ze=/[\#\?]/g,De=/[\#\?@]/g,Be=/#/g;function we(a,b,c){this.a=a||null;this.b=!!c}function Le(a){if(!a.Ja&&(a.Ja=new Vd,a.R=0,a.a))for(var b=a.a.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null,g=null;0<=d?(e=b[c].substring(0,d),g=b[c].substring(d+1)):e=b[c];e=ua(e);e=Me(a,e);a.add(e,g?ua(g):"")}}f=we.prototype;f.Ja=null;f.R=null;f.hb=function(){Le(this);return this.R};
69 f.add=function(a,b){Le(this);this.a=null;a=Me(this,a);var c=this.Ja.get(a);c||this.Ja.set(a,c=[]);c.push(b);this.R++;return this};f.remove=function(a){Le(this);a=Me(this,a);return Yd(this.Ja.b,a)?(this.a=null,this.R-=this.Ja.get(a).length,this.Ja.remove(a)):!1};f.clear=function(){this.Ja=this.a=null;this.R=0};f.isEmpty=function(){Le(this);return 0==this.R};function Ne(a,b){Le(a);b=Me(a,b);return Yd(a.Ja.b,b)}
70 f.uc=function(){Le(this);for(var a=this.Ja.jc(),b=this.Ja.uc(),c=[],d=0;d<b.length;d++)for(var e=a[d],g=0;g<e.length;g++)c.push(b[d]);return c};f.jc=function(a){Le(this);var b=[];if(u(a))Ne(this,a)&&(b=Za(b,this.Ja.get(Me(this,a))));else{a=this.Ja.jc();for(var c=0;c<a.length;c++)b=Za(b,a[c])}return b};f.set=function(a,b){Le(this);this.a=null;a=Me(this,a);Ne(this,a)&&(this.R-=this.Ja.get(a).length);this.Ja.set(a,[b]);this.R++;return this};
71 f.get=function(a,b){var c=a?this.jc(a):[];return 0<c.length?String(c[0]):b};function Ge(a,b,c){a.remove(b);0<c.length&&(a.a=null,a.Ja.set(Me(a,b),$a(c)),a.R+=c.length)}f.toString=function(){if(this.a)return this.a;if(!this.Ja)return"";for(var a=[],b=this.Ja.uc(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.jc(d),g=0;g<d.length;g++){var h=e;""!==d[g]&&(h+="="+encodeURIComponent(String(d[g])));a.push(h)}return this.a=a.join("&")};
72 f.clone=function(){var a=new we;a.a=this.a;this.Ja&&(a.Ja=this.Ja.clone(),a.R=this.R);return a};function Me(a,b){var c=String(b);a.b&&(c=c.toLowerCase());return c}function Ce(a,b){b&&!a.b&&(Le(a),a.a=null,$d(a.Ja,function(a,b){var e=b.toLowerCase();b!=e&&(this.remove(b),Ge(this,e,a))},a));a.b=b};function Oe(a,b,c){a.dataset?a.dataset[Pe(b)]=c:a.setAttribute("data-"+b,c)}function G(a,b){return a.dataset?a.dataset[Pe(b)]:a.getAttribute("data-"+b)}var Qe={};function Pe(a){return Qe[a]||(Qe[a]=String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()}))};var Re=n("yt.dom.getNextId_");if(!Re){Re=function(){return++Se};pa("yt.dom.getNextId_",Re);var Se=0}function Te(a,b){a=Jc(a);b=Jc(b);return!!hd(a,function(a){return a===b},!0,void 0)}function Ue(a,b){var c=Lc(a,null,b);return c.length?c[0]:null}function Ve(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]}
73 function We(a,b){var c;La(a,function(a){c=Ve(a,b);return!!c});return c}function Xe(a,b){return"on"+a in b?a:"onmoz"+a in b?"moz"+a:"onms"+a in b?"ms"+a:"ono"+a in b?"o"+a:"onwebkit"+a in b?"webkit"+a:null};var Ye=window.yt&&window.yt.config_||{};pa("yt.config_",Ye);var Ze=window.yt&&window.yt.tokens_||{};pa("yt.tokens_",Ze);var $e=window.yt&&window.yt.msgs_||{};pa("yt.msgs_",$e);function af(a){bf(Ye,arguments)}function cf(a,b){return a in Ye?Ye[a]:b}function df(a){bf(Ze,arguments)}function ef(a){return a in Ze?Ze[a]:void 0}function H(a,b){ha(a)&&(a=ff(a));return window.setTimeout(a,b)}function gf(a,b){ha(a)&&(a=ff(a));return window.setInterval(a,b)}function I(a){window.clearTimeout(a)}
74 function hf(a){window.clearInterval(a)}function ff(a){return a&&window.yterr?function(){try{return a.apply(this,arguments)}catch(b){throw jf(b),b;}}:a}function jf(a){if(window&&window.yterr){var b=n("yt.www.errors.log");b?b(a):(b=cf("ERRORS")||[],b.push(a),af("ERRORS",b))}}function kf(a){bf($e,arguments)}function lf(a,b,c){var d=b||{};if(a=a in $e?$e[a]:c)for(var e in d)a=a.replace(RegExp("\\$"+e,"gi"),function(){return d[e]});return a}function mf(a,b){return nf(a in $e?$e[a]:{},b)}
75 function nf(a,b){var c=cf("I18N_PLURAL_RULES")||function(a){return 1==a?"one":"other"};return(c=a["case"+b]||a[c(b)])?c.replace("#",b.toString()):b+""}function bf(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]}};function of(a){if(a=a||window.event){for(var b in a)b in pf||(this[b]=a[b]);this.scale=a.scale;this.rotation=a.rotation;this.ld=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=
76 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==
77 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)}}f=of.prototype;
78 f.ld=null;f.type="";f.target=null;f.relatedTarget=null;f.currentTarget=null;f.data=null;f.source=null;f.state=null;f.keyCode=0;f.charCode=0;f.altKey=!1;f.ctrlKey=!1;f.shiftKey=!1;f.clientX=0;f.clientY=0;f.pageX=0;f.pageY=0;f.wheelDeltaX=0;f.wheelDeltaY=0;f.rotation=0;f.scale=1;f.preventDefault=function(){this.ld.returnValue=!1;this.ld.preventDefault&&this.ld.preventDefault()};f.stopPropagation=function(){this.ld.cancelBubble=!0;this.ld.stopPropagation&&this.ld.stopPropagation()};
79 f.stopImmediatePropagation=function(){this.ld.cancelBubble=!0;this.ld.stopImmediatePropagation&&this.ld.stopImmediatePropagation()};var pf={stopImmediatePropagation:1,stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,scale:1,rotation:1};var qf=n("yt.events.listeners_")||{};pa("yt.events.listeners_",qf);var rf=n("yt.events.counter_")||{count:0};pa("yt.events.counter_",rf);function sf(a,b,c,d){return Jb(qf,function(e){return e[0]==a&&e[1]==b&&e[2]==c&&e[4]==!!d})}
80 function J(a,b,c,d){if(!a||!a.addEventListener&&!a.attachEvent)return"";d=!!d;var e=sf(a,b,c,d);if(e)return e;var e=++rf.count+"",g=!("mouseenter"!=b&&"mouseleave"!=b||!a.addEventListener||"onmouseenter"in document),h;h=g?function(d){d=new of(d);if(!hd(d.relatedTarget,function(b){return b==a},!0))return d.currentTarget=a,d.type=b,c.call(a,d)}:function(b){b=new of(b);b.currentTarget=a;return c.call(a,b)};h=ff(h);qf[e]=[a,b,c,h,d];a.addEventListener?"mouseenter"==b&&g?a.addEventListener("mouseover",
81 h,d):"mouseleave"==b&&g?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 tf(a,b){var c;return c=J(a,"timeupdate",function(){uf(c);b.apply(a,arguments)},void 0)}
82 function vf(a,b,c){b=b.toLowerCase();var d=c,e="mouse"+b;if(Ve("pointerEnabled",window.navigator))e="MSPointer"+b.charAt(0).toUpperCase()+b.substr(1);else if(Xe("touchstart",document)){d=b;switch(b){case "down":d="start";break;case "up":d="end";break;case "over":d="enter";break;case "out":d="leave"}e="touch"+d;d=function(a){z(null,function(b){var d=new of(a);w(d,b);c(d)})}}return J(a,e,d)}function wf(a,b,c){xf(a,"change",b,function(a){return a.nodeName.toLowerCase()===c.toLowerCase()&&!0})}
83 function yf(a,b,c){return xf(a,"click",b,function(a){return Dc(a,c)})}function xf(a,b,c,d){var e=a||document;return J(e,b,function(a){var b=hd(a.target,function(a){return a===e||d(a)},!0);b&&b!==e&&!b.disabled&&(a.currentTarget=b,c.call(b,a))})}function uf(a){a&&("string"==typeof a&&(a=[a]),z(a,function(a){if(a in qf){var c=qf[a],d=c[0],e=c[1],g=c[3],c=c[4];d.removeEventListener?d.removeEventListener(e,g,c):d.detachEvent&&d.detachEvent("on"+e,g);delete qf[a]}}))}
84 function zf(a){for(var b in qf)qf[b][0]==a&&uf(b)}function Af(a,b){if(document.createEvent){var c=document.createEvent("HTMLEvents");c.initEvent(b,!0,!0);a.dispatchEvent(c)}else c=document.createEventObject(),a.fireEvent("on"+b,c)};function Bf(){return!!We(["fullscreenEnabled","fullScreenEnabled"],document)}function Cf(){return We(["fullscreenElement","fullScreenElement"],document)};function Df(a){a=a||{};this.url=a.url||"";this.urlV8=a.url_v8||"";this.urlV9As2=a.url_v9as2||"";this.args=a.args||Lb(Ef);this.assets=a.assets||{};this.attrs=a.attrs||Lb(Ff);this.params=a.params||Lb(Gf);this.minVersion=a.min_version||"8.0.0";this.fallback=a.fallback||null;this.fallbackMessage=a.fallbackMessage||null;this.html5=!!a.html5;this.disable=a.disable||{};this.loaded=!!a.loaded}var Ef={enablejsapi:1},Ff={},Gf={allowscriptaccess:"always",allowfullscreen:"true",bgcolor:"#000000"};
85 Df.prototype.clone=function(){var a=new Df,b;for(b in this){var c=this[b];"object"==da(c)?a[b]=Lb(c):a[b]=c}return a};function Hf(a){a&&(this.name=va(a.name),this.mb=a.screenId,this.lc=a.loungeToken,this.Cb=a.dialId||"")}f=Hf.prototype;f.name="";f.mb="";f.lc="";f.Cb="";f.kq=function(){return{key:this.mb,name:this.name}};f.toString=function(){var a=this.lc?this.lc.slice(-6):"null";return"{name:"+this.name+",screenId:"+this.mb+",loungeToken:..."+a+",dialId:"+this.Cb+"}"};function If(a){return a?a.toString():"null"}function Jf(a){a=a||[];return"["+Ka(a,function(a){return If(a)}).join(",")+"]"};function Kf(a){this.a=a}var Lf=/\s*;\s*/;f=Kf.prototype;f.set=function(a,b,c,d,e,g){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:"";g=g?";secure":"";c=0>c?"":0==c?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(x()+1E3*c)).toUTCString();this.a.cookie=a+"="+b+e+d+c+g};
86 f.get=function(a,b){for(var c=a+"=",d=(this.a.cookie||"").split(Lf),e=0,g;g=d[e];e++){if(0==g.lastIndexOf(c,0))return g.substr(c.length);if(g==a)return""}return b};f.remove=function(a,b,c){var d=q(this.get(a));this.set(a,"",0,b,c);return d};f.uc=function(){return Mf(this).keys};f.jc=function(){return Mf(this).Mv};f.isEmpty=function(){return!this.a.cookie};f.hb=function(){return this.a.cookie?(this.a.cookie||"").split(Lf).length:0};f.clear=function(){for(var a=Mf(this).keys,b=a.length-1;0<=b;b--)this.remove(a[b])};
87 function Mf(a){a=(a.a.cookie||"").split(Lf);for(var b=[],c=[],d,e,g=0;e=a[g];g++)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,Mv:c}}var Nf=new Kf(document);Nf.b=3950;function Of(){};function Pf(){}y(Pf,Of);Pf.prototype.hb=function(){var a=0;Td(this.Nd(!0),function(){a++});return a};Pf.prototype.clear=function(){var a=Ud(this.Nd(!0)),b=this;z(a,function(a){b.remove(a)})};function Qf(a){this.a=a}y(Qf,Pf);f=Qf.prototype;f.isAvailable=function(){if(!this.a)return!1;try{return this.a.setItem("__sak","1"),this.a.removeItem("__sak"),!0}catch(a){return!1}};f.set=function(a,b){try{this.a.setItem(a,b)}catch(c){if(0==this.a.length)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded";}};f.get=function(a){a=this.a.getItem(a);if(!u(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a};f.remove=function(a){this.a.removeItem(a)};
88 f.hb=function(){return this.a.length};f.Nd=function(a){var b=0,c=this.a,d=new Rd;d.next=function(){if(b>=c.length)throw Qd;var d;d=c.key(b++);if(a)return d;d=c.getItem(d);if(!u(d))throw"Storage mechanism: Invalid value was encountered";return d};return d};f.clear=function(){this.a.clear()};f.key=function(a){return this.a.key(a)};function Rf(){var a=null;try{a=window.localStorage||null}catch(b){}this.a=a}y(Rf,Qf);function Sf(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.a=a}y(Sf,Qf);function Tf(a){this.Of=a;this.fq=new qb}f=Tf.prototype;f.Of=null;f.fq=null;f.set=function(a,b){q(b)?this.Of.set(a,pb(this.fq,b)):this.Of.remove(a)};f.get=function(a){var b;try{b=this.Of.get(a)}catch(c){return}if(null!==b)try{return mb(b)}catch(d){throw"Storage: Invalid value was encountered";}};f.remove=function(a){this.Of.remove(a)};function Uf(a){Tf.call(this,a)}y(Uf,Tf);function Vf(a){this.data=a}function Wf(a){return!q(a)||a instanceof Vf?a:new Vf(a)}Uf.prototype.set=function(a,b){Uf.C.set.call(this,a,Wf(b))};Uf.prototype.a=function(a){a=Uf.C.get.call(this,a);if(!q(a)||a instanceof Object)return a;throw"Storage: Invalid value was encountered";};Uf.prototype.get=function(a){if(a=this.a(a)){if(a=a.data,!q(a))throw"Storage: Invalid value was encountered";}else a=void 0;return a};function Xf(a){Tf.call(this,a)}y(Xf,Uf);function Yf(a){var b=a.creation;a=a.expiration;return!!a&&a<x()||!!b&&b>x()}Xf.prototype.set=function(a,b,c){if(b=Wf(b)){if(c){if(c<x()){Xf.prototype.remove.call(this,a);return}b.expiration=c}b.creation=x()}Xf.C.set.call(this,a,b)};Xf.prototype.a=function(a,b){var c=Xf.C.a.call(this,a);if(c)if(!b&&Yf(c))Xf.prototype.remove.call(this,a);else return c};function Zf(a){Tf.call(this,a)}y(Zf,Xf);function $f(a,b){var c=[];Td(b,function(a){var b;try{b=Zf.prototype.a.call(this,a,!0)}catch(g){if("Storage: Invalid value was encountered"==g)return;throw g;}q(b)?Yf(b)&&c.push(a):c.push(a)},a);return c}function ag(a,b){var c=$f(a,b);z(c,function(a){Zf.prototype.remove.call(this,a)},a)};function bg(a,b,c){var d=c&&0<c?c:0;c=d?x()+1E3*d:0;if((d=d?cg:dg)&&window.JSON){u(b)||(b=JSON.stringify(b,void 0));try{d.set(a,b,c)}catch(e){d.remove(a)}}}function eg(a){if(!dg&&!cg||!window.JSON)return null;var b;try{b=dg.get(a),b=u(b)?b:cg.get(a)}catch(c){return null}if(!u(b))return null;try{b=JSON.parse(b,void 0)}catch(d){}return b}function fg(a){dg&&dg.remove(a);cg&&cg.remove(a)}var cg,gg=new Rf;cg=gg.isAvailable()?new Zf(gg):null;var dg,hg=new Sf;dg=hg.isAvailable()?new Zf(hg):null;function ig(a){a&&(this.id=a.id||"",this.name=va(a.name||""),this.activityId=a.activityId||"",this.status=a.status||"UNKNOWN")}f=ig.prototype;f.id="";f.name="";f.activityId="";f.status="UNKNOWN";f.kq=function(){return{key:this.id,name:this.name}};function jg(a){return{id:a.id,name:a.name,activityId:a.activityId,status:a.status}}f.toString=function(){return"{id:"+this.id+",name:"+this.name+",activityId:"+this.activityId+",status:"+this.status+"}"};
89 function kg(a){a=a||[];return"["+Ka(a,function(a){return a?a.toString():"null"}).join(",")+"]"};function lg(){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 mg(a,b){return Oa(a,function(a){return a.key==b})}function ng(a){return Ka(a,function(a){return a.kq()})}function og(a){return Ka(a,function(a){return jg(a)})}function pg(a){return Ka(a,function(a){return new ig(a)})}function qg(a,b){return a||b?a&&b?a.id==b.id&&a.name==b.name:!1:!0}
90 function rg(a,b){return Oa(a,function(a){return a.id==b})}function sg(a){return Ka(a,function(a){return{name:a.name,screenId:a.mb,loungeToken:a.lc,dialId:a.Cb}})}function tg(a){return Ka(a,function(a){return new Hf(a)})}function ug(a,b){return a||b?a&&b?a.mb==b.mb:!1:!0}function vg(a,b){return a||b?a&&b?a.mb==b.mb&&a.lc==b.lc&&a.name==b.name&&a.Cb==b.Cb:!1:!0}function wg(a,b){return Oa(a,function(a){return ug(a,b)})}function xg(a,b){return Oa(a,function(a){return b==a.mb||b==a.Cb})};function yg(){var a=zg(),b=Ag();Sa(a,b);Bg()&&kb(a,b);a=Cg(a);Ta(a)?Nf.remove("remote_sid","/","youtube.com"):(a=a.join(","),Nf.set("remote_sid",a,void 0,"/","youtube.com"))}function zg(){var a=eg("yt-remote-connected-devices")||[];fb(a);return a}function Cg(a){if(Ta(a))return[];var b=a[0].indexOf("#"),c=-1==b?a[0]:a[0].substring(0,b);return Ka(a,function(a,b){return 0==b?a:a.substring(c.length)})}function Dg(a){bg("yt-remote-connected-devices",a,86400)}
91 function Ag(){if(Eg)return Eg;var a=eg("yt-remote-device-id");a||(a=lg(),bg("yt-remote-device-id",a,31536E3));for(var b=zg(),c=1,d=a;Sa(b,d);)c++,d=a+"#"+c;return Eg=d}function Fg(){return eg("yt-remote-session-browser-channel")}function Bg(){return eg("yt-remote-session-screen-id")}
92 function Gg(a){5<a.length&&(a=a.slice(a.length-5));var b=Ka(Hg(),function(a){return a.loungeToken}),c=Ka(a,function(a){return a.loungeToken});Ma(c,function(a){return!Sa(b,a)})&&bg("yt-remote-lounge-token-expiration",!0,86400);bg("yt-remote-local-screens",a,31536E3)}function Hg(){return eg("yt-remote-local-screens")||[]}function Ig(){return eg("yt-remote-online-screens")||[]}function Jg(a){bg("yt-remote-online-dial-devices",a,30)}function Kg(){return eg("yt-remote-online-dial-devices")||[]}
93 function Lg(a,b){a?bg("yt-remote-session-video-id",a):fg("yt-remote-session-video-id");b?bg("yt-remote-session-list-id",b):fg("yt-remote-session-list-id")}function Mg(a){a||(fg("yt-remote-session-screen-id"),fg("yt-remote-session-video-id"),fg("yt-remote-session-list-id"));yg();a=zg();Wa(a,Ag());Dg(a)}var Eg="";function Ng(){var a=tg(Ig()),b=pg(Kg()),b=Ja(b,function(b){return!xg(a,b.id)});return ng(Za(a,b))};var Og={},Pg=0;function Qg(a,b){if(a){var c=new Image,d=""+Pg++;Og[d]=c;c.onload=c.onerror=function(){b&&Og[d]&&b();delete Og[d]};c.src=a;c=eval("null")}};function K(){}K.prototype.Pc=!1;K.prototype.ha=function(){return this.Pc};K.prototype.dispose=function(){this.Pc||(this.Pc=!0,this.F())};function L(a,b){Rg(a,oa(Sg,b))}function Rg(a,b){a.tb||(a.tb=[]);a.tb.push(v(b,void 0))}K.prototype.F=function(){if(this.tb)for(;this.tb.length;)this.tb.shift()()};function Sg(a){a&&"function"==typeof a.dispose&&a.dispose()}function Tg(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];fa(d)?Tg.apply(null,d):Sg(d)}};function Ug(a,b){this.app=a;this.b=null;this.i={};this.g={};this.o={};this.k={};this.j=null;this.a=b;N(this,"cueVideoById",this.Br);N(this,"loadVideoById",this.Xj);N(this,"cueVideoByUrl",this.Cr);N(this,"loadVideoByUrl",this.Yr);N(this,"playVideo",this.rg);N(this,"pauseVideo",this.fn);N(this,"stopVideo",this.Dj);N(this,"clearVideo",this.zr);N(this,"getVideoBytesLoaded",this.Nr);N(this,"getVideoBytesTotal",this.Or);N(this,"getVideoLoadedFraction",this.Qr);N(this,"getVideoStartBytes",this.Rr);N(this,
94 "cuePlaylist",this.Ar);N(this,"loadPlaylist",this.Xr);N(this,"nextVideo",this.$r);N(this,"previousVideo",this.as);N(this,"playVideoAt",this.um);N(this,"setShuffle",this.gs);N(this,"setLoop",this.cs);N(this,"getPlaylist",this.vb);N(this,"getPlaylistIndex",this.ak);N(this,"getPlaylistId",this.Lr);N(this,"loadModule",this.Wr);N(this,"unloadModule",this.en);N(this,"setOption",this.dn);N(this,"getOption",this.Cj);N(this,"getOptions",this.Hr);N(this,"mute",this.Pm);N(this,"unMute",this.Rm);N(this,"isMuted",
95 this.Ur);N(this,"setVolume",this.Qm);N(this,"getVolume",this.Om);N(this,"seekTo",this.Wh);N(this,"getPlayerState",this.Kr);N(this,"getPlaybackRate",this.Jr);N(this,"setPlaybackRate",this.es);N(this,"getAvailablePlaybackRates",this.Er);N(this,"getPlaybackQuality",this.Ir);N(this,"setPlaybackQuality",this.ds);N(this,"getAvailableQualityLevels",this.Fr);N(this,"getCurrentTime",this.getCurrentTime);N(this,"getDuration",this.wg);N(this,"addEventListener",this.addEventListener);N(this,"removeEventListener",
96 this.removeEventListener);N(this,"getVideoUrl",this.Sr);N(this,"getDebugText",this.Gr);N(this,"getVideoEmbedCode",this.Pr);N(this,"getVideoData",this.getVideoData);N(this,"addCueRange",this.yr);N(this,"removeCueRange",this.bs);N(this,"setSize",this.hs);N(this,"getApiInterface",this.Dr);N(this,"destroy",this.destroy);N(this,"showVideoInfo",this.is);N(this,"hideVideoInfo",this.Tr);this.g.logFallback=v(this.Zr,this);this.g.isNotServable=v(this.Vr,this);this.g.getUpdatedConfigurationData=v(this.Mr,this);
97 this.g.updateRemoteReceivers=v(this.js,this)}y(Ug,K);function N(a,b,c){a.i[b]=v(c,a)}f=Ug.prototype;f.Dr=function(){return Hb(this.i)};f.N=function(){return this.b};f.addEventListener=function(a,b){var c=b;u(b)&&(c=function(){n(b).apply(window,arguments)},this.o[b]=c);this.app.D(a,c)};f.fu=function(a,b){var c=u(b)?a+b:a+ja(b);if(!this.k[c]){u(b)&&(b=function(){n(b).apply(window,arguments)});var d=v(function(a){b({target:this.j,data:a})},this);this.k[c]=d;this.addEventListener(a,d)}};
98 f.removeEventListener=function(a,b){var c=b;if(u(b)&&b in this.o){var c=this.o[b],d=this.o;b in d&&delete d[b]}this.app.$(a,c)};f.gu=function(a,b){var c=u(b)?a+b:a+ja(b);this.k[c]&&this.removeEventListener(a,this.k[c])};f.Kr=function(){return this.app.aa};f.Wh=function(a,b){Vg(this.app,!0,this.a);Wg(this.app,a,b,void 0,this.a)};f.getCurrentTime=function(){var a=this.app.Xd;return a&&O(this.app).b!=a?a.getCurrentTime():this.app.getCurrentTime(this.a)};
99 f.wg=function(){var a=this.app.Xd;return a?a.Vd:0};f.Om=function(){return this.app.wa.volume};f.Qm=function(a){var b=this.app;b.wa.volume=a;b.u("internalvolumechange",b.wa)};f.Ur=function(){return this.app.wa.muted};f.Pm=function(){Xg(this.app)};f.Rm=function(){Yg(this.app)};f.rg=function(){Vg(this.app,!0,this.a);Zg(this.app,this.a)};f.fn=function(){$g(this.app,this.a)};f.Dj=function(){var a=this.app;ah(a,"play_pause")||bh(a,this.a)};f.zr=function(){};f.Jr=function(){return this.app.Ig};
100 f.es=function(a){ch(this.app,a)};f.Er=function(){return this.app.a.lg?dh:[1]};f.Ir=function(){return eh(this.app,this.a)};f.ds=function(a){var b=O(this.app,this.a);b&&fh(b,"m",a)};f.Fr=function(){return gh(this.app,this.a)};f.Nr=function(){var a=hh(this.app.Xd);return Math.floor(1E3*a)};f.Or=function(){return 1E3};f.Qr=function(){return hh(this.app.Xd)};f.Rr=function(){return 0};f.hs=function(){this.app.S.Ji()};f.Wr=function(a){(a=ih(this.app.k,a))&&a.load()};
101 f.en=function(a){(a=ih(this.app.k,a))&&a.unload()};f.Xj=function(a,b,c){var d=this.app,e=this.a;a=jh(d,kh(a,d.list,b,c),e);Vg(d,a,e)};f.Br=function(a,b,c){var d=this.app,e=this.a;lh(d,new mh(kh(a,d.list,b,c)),e)};f.Yr=function(a,b,c){var d=this.app,e=this.a;a=nh(a,d.list,b,c);b=jh(d,a,e);Vg(d,b,e);oh(d,a.mediaContentUrl)};f.Cr=function(a,b,c){var d=this.app,e=this.a;a=nh(a,d.list,b,c);lh(d,new mh(a),e);oh(d,a.mediaContentUrl)};f.Sr=function(){return ph(this.app)};f.Gr=function(){return qh(this.app)};
102 f.Pr=function(){return""};f.yr=function(){return!1};f.bs=function(){};f.Xr=function(a,b,c,d){var e=this.app;e.bf=!1;rh(e,a,b,c,d)};f.Ar=function(a,b,c,d){var e=this.app;e.bf=!0;rh(e,a,b,c,d)};f.$r=function(){sh(this.app)};f.as=function(){th(this.app)};f.um=function(a){var b=this.app;b.g&&(b.g.Zd?uh(b,vh(b.g,a)):b.bf=!1,wh(b.g,a))};f.gs=function(a){var b=this.app;b.g&&xh(b.g,a)};f.cs=function(a){var b=this.app;b.g&&(b.g.loop=a)};
103 f.vb=function(){var a=this.app.g;if(!a)return null;for(var b=[],c=0;c<a.Mb;c++)b[c]=vh(a,c).L;return b};f.ak=function(){var a=this.app.g?this.app.g.ua:null;return null==a?-1:a};f.Lr=function(){return this.app.g&&this.app.g.g?this.app.g.g.toString():null};f.dn=function(a,b,c){return yh(this.app.k,a,b,c)};f.Cj=function(a,b,c){return yh(this.app.k,a,b,c)};f.Hr=function(a){return zh(this.app.k,a)};f.getVideoData=function(){var a=this.app.getVideoData(this.a)||{};return{video_id:a.L,author:a.author,title:a.title}};
104 f.is=function(){Ah(this.app.S)};f.Tr=function(){this.app.S.uk()};f.Zr=function(){Bh(this.app.b,204)};f.Vr=function(){var a=Ch(this.app);return!(!a||!P(a,128)||5!=a.a.errorCode)};f.Mr=function(){var a=this.app,b=a.K.clone();if(a=a.b.getVideoData()){var c=b.args,d=Lb(a.b);d.start=a.xa;w(c,d)}return b};f.js=function(a){var b=this.app;Dh(b.a)&&6!=b.o&&(b.a.sg=!Ta(a),b.a.sg?1!=b.o&&3!=b.o&&Eh(b):Fh(b.G))};f.destroy=function(){this.app.dispose()};
105 f.F=function(){if(this.b){for(var a in this.i)this.b[a]=null;for(a in this.g)this.b[a]=null}this.o=this.k=this.b=null;Ug.C.F.call(this)};function Gh(a,b){Ug.call(this,a,b);N(this,"cueVideoByPlayerVars",this.yx);N(this,"loadVideoByPlayerVars",this.Io);N(this,"preloadVideoByPlayerVars",this.Bx);N(this,"seekBy",this.Sp);N(this,"enableLicenseIntercept",this.zx);N(this,"updatePlaylist",this.Fx);N(this,"resumeLicenseSession",this.Cx);N(this,"updateLastActiveTime",this.Ex);N(this,"updateVideoData",this.Gx);N(this,"getStoryboardFormat",this.Ax)}y(Gh,Ug);f=Gh.prototype;f.yx=function(a){var b=this.a;lh(this.app,new mh(a),b)};
106 f.Io=function(a){jh(this.app,a,this.a)};f.Bx=function(){};f.Sp=function(a,b,c){Vg(this.app,!0,this.a);var d=this.app,e=this.a;Wg(d,d.getCurrentTime()+a,b,c,e)};f.zx=function(){var a=this.app;a.Xk||(a.Xk=!0,a.Di={})};f.Fx=function(){var a=this.app;Hh(a);a.fb("onPlaylistUpdate")};f.Cx=function(a,b){var c=this.app,d=c.Di[a];d&&(Ih(d,b),d.start(),delete c.Di[a])};f.Ex=function(){this.app.a.Ta=x()};f.Gx=function(a){var b=O(this.app,this.a||1);b&&(b=b.a,Jh(b,a),b.u("dataupdated"))};f.Ax=function(){return this.app.getVideoData().b.storyboard_spec};
107 f.getVideoData=function(){var a=Gh.C.getVideoData.call(this),b=this.app.getVideoData(this.a)||{};a.cpn=b.Da;return a};f.getCurrentTime=function(a){return a?this.app.getCurrentTime(a):Gh.C.getCurrentTime.call(this)};f.wg=function(a){return a?Kh(this.app,a):Gh.C.wg.call(this)};function Lh(a,b){Gh.call(this,a,b)}y(Lh,Gh);f=Lh.prototype;f.Xj=function(a,b,c){jh(this.app,kh(a,this.app.list,b,c),this.a)};f.rg=function(){Zg(this.app,this.a)};f.Wh=function(a,b){Wg(this.app,a,b,void 0,this.a)};function Q(a){return a.app.S.a}f.J=function(){return this.app.J()};f.vb=function(){return this.app.g};f.getVideoData=function(){return this.app.getVideoData(this.a)};function Mh(a){this.j=Math.exp(Math.log(0.5)/a);this.a=this.g=0}Mh.prototype.b=function(a,b){var c=Math.pow(this.j,a);this.a=b*(1-c)+c*this.a;this.g+=a};Mh.prototype.i=function(){return this.a/(1-Math.pow(this.j,this.g))};function Nh(a,b){this.o=0;this.j=a;this.H=b||0.5;this.k="index";this.a=0;this.g=[]}Nh.prototype.b=function(a,b){Oh(this,"index");this.g.push({index:this.o++,jh:a,value:b});this.a+=a;for(Oh(this,"index");this.a>this.j;){var c=this.a-this.j,d=this.g[0];d.jh<=c?(this.a-=d.jh,this.g.shift()):(this.a-=c,d.jh-=c)}};function Ph(a,b){Oh(a,"value");var c=b*a.a,d=0,e=NaN;a.g.some(function(a){d+=a.jh;e=a.value;if(d>=c)return!0});return e}Nh.prototype.i=function(){return Ph(this,this.H)};
108 function Oh(a,b){a.k!=b&&(a.k=b,hb(a.g,b))};function Qh(a){var b=eg(a);if(!b){var c=new Rf;c.isAvailable()&&(b=(new Tf(c)).get(a))}return b}function Rh(){var a={volume:100,muted:!1,nonNormalized:100},b=Qh("yt-player-volume")||{};a.volume=isNaN(b.volume)?100:vb(b.volume,0,100);a.nonNormalized=isNaN(b.nonNormalized)?a.volume:b.nonNormalized;a.muted=void 0==b.muted?!1:b.muted;return a};function Sh(a){this.i=this.j=0;a.Nc?this.b=new Mh(16):this.b=new Nh(16,0.6);a.ve||"play"==a.Ca?this.g=new Mh(4):this.g=new Nh(16,0.6);a.Xl?this.a=new Nh(8,0.6):a.Vl?this.a=new Nh(16,0.6):a.Wl?this.a=new Nh(24,0.6):"play"==a.Ca?this.a=new Mh(15):this.a=new Nh(15,0.6);var b=Qh("yt-player-bandwidth");a=a.oc?0.1:0.5;b&&!isNaN(b.byterate)?this.a.b(a,b.byterate):this.a.b(a,13E4)}function Th(a){a=a.b.i();return a=isNaN(a)?0.5:a}function Uh(a){return a.g.i()||0}function Vh(a){a=a.a.i();return 0<a?a:1};function Wh(){this.a=[];this.Tb={}}y(Wh,K);f=Wh.prototype;f.ip=1;f.Pi=0;f.D=function(a,b,c){var d=this.Tb[a];d||(d=this.Tb[a]=[]);var e=this.ip;this.a[e]=a;this.a[e+1]=b;this.a[e+2]=c;this.ip=e+3;d.push(e);return e};f.$=function(a,b,c){if(a=this.Tb[a]){var d=this.a;if(a=Oa(a,function(a){return d[a+1]==b&&d[a+2]==c}))return this.Wc(a)}return!1};
109 f.Wc=function(a){if(0!=this.Pi)return this.b||(this.b=[]),this.b.push(a),!1;var b=this.a[a];if(b){var c=this.Tb[b];c&&Wa(c,a);delete this.a[a];delete this.a[a+1];delete this.a[a+2]}return!!b};f.u=function(a,b){var c=this.Tb[a];if(c){this.Pi++;for(var d=cb(arguments,1),e=0,g=c.length;e<g;e++){var h=c[e];this.a[h+1].apply(this.a[h+2],d)}this.Pi--;if(this.b&&0==this.Pi)for(;c=this.b.pop();)this.Wc(c);return 0!=e}return!1};
110 f.clear=function(a){if(a){var b=this.Tb[a];b&&(z(b,this.Wc,this),delete this.Tb[a])}else this.a.length=0,this.Tb={}};f.hb=function(a){if(a){var b=this.Tb[a];return b?b.length:0}a=0;for(b in this.Tb)a+=this.hb(b);return a};f.F=function(){Wh.C.F.call(this);delete this.a;delete this.Tb;delete this.b};function Xh(a,b){this.start=a;this.end=b;this.a=ja(this)}function Yh(a,b){return a.start!=b.start?a.start-b.start:a.end!=b.end?a.end-b.end:a.a!=b.a?a.a-b.a:0}Xh.prototype.contains=function(a,b){return a>=this.start&&(a<this.end||a==this.end&&this.start==this.end)&&(null==b||a<b&&b<=this.end)};Xh.prototype.toString=function(){return"Interval["+this.start+", "+this.end+"]"};function Zh(a,b,c){Xh.call(this,a,b);a=c||{};this.Ba=a.id||"";void 0!=a.priority&&(this.th=a.priority);this.namespace=a.namespace||"";this.Uc=a.visible||!1;this.zb=new Wh}y(Zh,Xh);f=Zh.prototype;f.Ba="";f.th=7;f.active=!0;f.Uc=!1;f.zb=null;f.namespace="";f.getId=function(){return this.Ba};function $h(a,b){return a.start==b.start?a.th==b.th?0:a.th<b.th?-1:1:a.start<b.start?-1:1};function ai(a,b){this.type=a;this.currentTarget=this.target=b}f=ai.prototype;f.dispose=function(){};f.se=!1;f.defaultPrevented=!1;f.gp=!0;f.stopPropagation=function(){this.se=!0};f.preventDefault=function(){this.defaultPrevented=!0;this.gp=!1};function bi(a){bi[" "](a);return a}bi[" "]=ba;var ci=!C||sc(9),di=C&&!rc("9");!dc||rc("528");cc&&rc("1.9b")||C&&rc("8")||bc&&rc("9.5")||dc&&rc("528");cc&&!rc("8")||C&&rc("9");function ei(a,b){a&&this.init(a,b)}y(ei,ai);f=ei.prototype;f.target=null;f.relatedTarget=null;f.clientX=0;f.clientY=0;f.keyCode=0;f.charCode=0;f.ctrlKey=!1;f.altKey=!1;f.shiftKey=!1;f.re=null;
111 f.init=function(a,b){var c=this.type=a.type;ai.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(cc){var e;t:{try{bi(d.nodeName);e=!0;break t}catch(g){}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;
112 this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.state=a.state;this.re=a;a.defaultPrevented&&this.preventDefault();delete this.se};f.stopPropagation=function(){ei.C.stopPropagation.call(this);this.re.stopPropagation?this.re.stopPropagation():this.re.cancelBubble=!0};f.preventDefault=function(){ei.C.preventDefault.call(this);var a=this.re;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,di)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};f.Ux=function(){return this.re};var fi="closure_listenable_"+(1E6*Math.random()|0);function gi(a){try{return!(!a||!a[fi])}catch(b){return!1}}var hi=0;function ii(a,b,c,d,e){this.df=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.gb=e;this.key=++hi;this.removed=this.Oi=!1}function ji(a){a.removed=!0;a.df=null;a.proxy=null;a.src=null;a.gb=null};function ki(a){this.src=a;this.a={};this.b=0}ki.prototype.add=function(a,b,c,d,e){var g=this.a[a];g||(g=this.a[a]=[],this.b++);var h=li(g,b,d,e);-1<h?(a=g[h],c||(a.Oi=!1)):(a=new ii(b,this.src,a,!!d,e),a.Oi=c,g.push(a));return a};ki.prototype.remove=function(a,b,c,d){if(!(a in this.a))return!1;var e=this.a[a];b=li(e,b,c,d);return-1<b?(ji(e[b]),Xa(e,b),0==e.length&&(delete this.a[a],this.b--),!0):!1};
113 function mi(a,b){var c=b.type;if(!(c in a.a))return!1;var d=Wa(a.a[c],b);d&&(ji(b),0==a.a[c].length&&(delete a.a[c],a.b--));return d}ki.prototype.removeAll=function(a){var b=0,c;for(c in this.a)if(!a||c==a){for(var d=this.a[c],e=0;e<d.length;e++)++b,ji(d[e]);delete this.a[c];this.b--}return b};function ni(a,b,c,d,e){a=a.a[b];b=-1;a&&(b=li(a,c,d,e));return-1<b?a[b]:null}function li(a,b,c,d){for(var e=0;e<a.length;++e){var g=a[e];if(!g.removed&&g.df==b&&g.capture==!!c&&g.gb==d)return e}return-1};var oi="closure_lm_"+(1E6*Math.random()|0),pi={},qi=0;function ri(a,b,c,d,e){if(t(b)){for(var g=0;g<b.length;g++)ri(a,b[g],c,d,e);return null}c=si(c);if(gi(a))a=a.listen(b,c,d,e);else{if(!b)throw Error("Invalid event type");var g=!!d,h=ti(a);h||(a[oi]=h=new ki(a));c=h.add(b,c,!1,d,e);c.proxy||(d=ui(),c.proxy=d,d.src=a,d.df=c,a.addEventListener?a.addEventListener(b,d,g):a.attachEvent(b in pi?pi[b]:pi[b]="on"+b,d),qi++);a=c}return a}
114 function ui(){var a=vi,b=ci?function(c){return a.call(b.src,b.df,c)}:function(c){c=a.call(b.src,b.df,c);if(!c)return c};return b}function wi(a,b,c,d,e){if(t(b))for(var g=0;g<b.length;g++)wi(a,b[g],c,d,e);else c=si(c),gi(a)?a.dc(b,c,d,e):a&&(a=ti(a))&&(b=ni(a,b,c,!!d,e))&&xi(b)}
115 function xi(a){if(ga(a)||!a||a.removed)return!1;var b=a.src;if(gi(b))return mi(b.gd,a);var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent&&b.detachEvent(c in pi?pi[c]:pi[c]="on"+c,d);qi--;(c=ti(b))?(mi(c,a),0==c.b&&(c.src=null,b[oi]=null)):ji(a);return!0}function yi(a,b,c,d){var e=1;if(a=ti(a))if(b=a.a[b])for(b=$a(b),a=0;a<b.length;a++){var g=b[a];g&&g.capture==c&&!g.removed&&(e&=!1!==zi(g,d))}return Boolean(e)}
116 function zi(a,b){var c=a.df,d=a.gb||a.src;a.Oi&&xi(a);return c.call(d,b)}
117 function vi(a,b){if(a.removed)return!0;if(!ci){var c=b||n("window.event"),d=new ei(c,this),e=!0;if(!(0>c.keyCode||void 0!=c.returnValue)){t:{var g=!1;if(0==c.keyCode)try{c.keyCode=-1;break t}catch(h){g=!0}if(g||void 0==c.returnValue)c.returnValue=!0}c=[];for(g=d.currentTarget;g;g=g.parentNode)c.push(g);for(var g=a.type,k=c.length-1;!d.se&&0<=k;k--)d.currentTarget=c[k],e&=yi(c[k],g,!0,d);for(k=0;!d.se&&k<c.length;k++)d.currentTarget=c[k],e&=yi(c[k],g,!1,d)}return e}return zi(a,new ei(b,this))}
118 function ti(a){a=a[oi];return a instanceof ki?a:null}var Ai="__closure_events_fn_"+(1E9*Math.random()>>>0);function si(a){return ha(a)?a:a[Ai]||(a[Ai]=function(b){return a.handleEvent(b)})};function Bi(){this.gd=new ki(this);this.U=this}y(Bi,K);Bi.prototype[fi]=!0;f=Bi.prototype;f.Kl=null;f.addEventListener=function(a,b,c,d){ri(this,a,b,c,d)};f.removeEventListener=function(a,b,c,d){wi(this,a,b,c,d)};
119 function Ci(a,b){var c,d=a.Kl;if(d){c=[];for(var e=1;d;d=d.Kl)c.push(d),++e}var d=a.U,e=b,g=e.type||e;if(u(e))e=new ai(e,d);else if(e instanceof ai)e.target=e.target||d;else{var h=e,e=new ai(g,d);Ob(e,h)}var h=!0,k;if(c)for(var m=c.length-1;!e.se&&0<=m;m--)k=e.currentTarget=c[m],h=Di(k,g,!0,e)&&h;e.se||(k=e.currentTarget=d,h=Di(k,g,!0,e)&&h,e.se||(h=Di(k,g,!1,e)&&h));if(c)for(m=0;!e.se&&m<c.length;m++)k=e.currentTarget=c[m],h=Di(k,g,!1,e)&&h}
120 f.F=function(){Bi.C.F.call(this);this.gd&&this.gd.removeAll(void 0);this.Kl=null};f.listen=function(a,b,c,d){return this.gd.add(a,b,!1,c,d)};f.dc=function(a,b,c,d){return this.gd.remove(a,b,c,d)};function Di(a,b,c,d){b=a.gd.a[b];if(!b)return!0;b=$a(b);for(var e=!0,g=0;g<b.length;++g){var h=b[g];if(h&&!h.removed&&h.capture==c){var k=h.df,m=h.gb||h.src;h.Oi&&mi(a.gd,h);e=!1!==k.call(m,d)&&e}}return e&&!1!=d.gp};function Ei(a,b){Bi.call(this);this.a=a||1;this.b=b||l;this.g=v(this.cu,this);this.i=x()}y(Ei,Bi);f=Ei.prototype;f.Xc=!1;f.ic=null;function Fi(a,b){a.a=b;a.ic&&a.Xc?(a.stop(),a.start()):a.ic&&a.stop()}f.cu=function(){if(this.Xc){var a=x()-this.i;0<a&&a<0.8*this.a?this.ic=this.b.setTimeout(this.g,this.a-a):(this.ic&&(this.b.clearTimeout(this.ic),this.ic=null),Ci(this,"tick"),this.Xc&&(this.ic=this.b.setTimeout(this.g,this.a),this.i=x()))}};
121 f.start=function(){this.Xc=!0;this.ic||(this.ic=this.b.setTimeout(this.g,this.a),this.i=x())};f.stop=function(){this.Xc=!1;this.ic&&(this.b.clearTimeout(this.ic),this.ic=null)};f.F=function(){Ei.C.F.call(this);this.stop();delete this.b};function Gi(a,b,c){if(ha(a))c&&(a=v(a,c));else if(a&&"function"==typeof a.handleEvent)a=v(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:l.setTimeout(a,b||0)};function Hi(){this.a=[]}function Ii(a,b){for(var c=[],d=0;d<a.a.length;++d){var e=a.a[d];e.contains(b)&&c.push(e);if(e.start>b)break}return c}function Ji(a,b,c){for(var d=[],e=0;e<a.a.length;++e){var g=a.a[e];if(null!=c&&g.start>c)break;g.start>b&&d.push(g)}return d}function Ki(a,b){for(var c=[],d=0;d<a.a.length;++d){var e=a.a[d];e.contains(b)&&c.push(e.end);if(e.start>b){c.push(e.start);break}}c.sort(gb);return c[0]};var Li,Mi,Ni,Oi,Pi;Pi=Oi=Ni=Mi=Li=!1;var Qi=Yb();Qi&&(-1!=Qi.indexOf("Firefox")||-1!=Qi.indexOf("Camino")||(-1!=Qi.indexOf("iPhone")||-1!=Qi.indexOf("iPod")?Li=!0:-1!=Qi.indexOf("iPad")?Mi=!0:-1!=Qi.indexOf("Chrome")?Oi=!0:-1!=Qi.indexOf("Android")?Ni=!0:-1!=Qi.indexOf("Safari")&&(Pi=!0)));var Ri=Li,Si=Mi,Ti=Ni,Ui=Oi,Vi=Pi;var Wi,Xi;var Yi=Yb(),Zi=Yi.match(/\((iPad|iPhone|iPod)( Simulator)?;/);if(!Zi||2>Zi.length)Wi=void 0;else{var $i=Yi.match(/\((iPad|iPhone|iPod)( Simulator)?; (U; )?CPU (iPhone )?OS (\d_\d)[_ ]/);Wi=$i&&6==$i.length?Number($i[5].replace("_",".")):0}(Xi=0<=Wi)&&0<=Yb().search("Safari")&&Yb().search("Version");var aj=Ri||Si;function bj(){return cj("(ps3; leanback shell)")}function cj(a){var b=Yb();return b?0<=b.toLowerCase().indexOf(a.toLowerCase()):!1};function dj(){}var ej=Xi&&4>Wi?0.1:0,fj=new dj;f=dj.prototype;f.Bd=null;f.Ok=!1;f.Vd=0;f.Sl=0;function gj(a,b){var c="";b&&(a.Bd=b,c=hj(b));a.src&&""==c||(c&&a.src!=c&&(a.src=c),b&&b.a||a.load())}function ij(a,b){0<a.readyState&&(a.currentTime=Math.max(ej,b))}f.getType=function(){return this.type};f.Va=function(a){this.Vd=a};f.getCurrentTime=function(){return this.Sl||this.currentTime};f.kp=function(){this.Sl=this.currentTime};
122 function hh(a){var b=a.Vd;if(Infinity==b)return 1;if(b&&a.buffered&&0<a.buffered.length){var c=jj(a);return a.buffered.end(c)/b}return 0}function kj(a){a.ended&&ij(a,0);!a.hasAttribute("src")&&a.Bd&&(a.src=hj(a.Bd),a.Bd.a||a.load());a.play()}function lj(a){a.currentSrc&&(aj&&ij(a,0),Xc(a),a.removeAttribute("src"),a.load(),a.Bd&&a.Bd.a&&(a.Bd=null))}function mj(a){lj(a);a.Vd=0;a.Sl=0;a.Bd=null}function nj(a,b){a.defaultPlaybackRate=b;a.playbackRate=b}
123 function jj(a){var b=a.buffered;a=a.getCurrentTime();for(var c=0;c<b.length&&!(b.start(c)>a);c++)if(a<=b.end(c))return c;return 0}f.inUnbufferedArea=function(){var a=this.buffered;if(!a||!a.length)return!0;var b=jj(this);if(0<b)return!1;var c=this.getCurrentTime();return a.start(b)>c||a.end(b)<c};function oj(a,b){b?a.setAttribute("crossorigin","true"):a.removeAttribute("crossorigin")}f.Xv=function(){this.hasAttribute("controls")&&this.setAttribute("controls","true")};
124 f.Yv=function(){this.Ok&&!this.muted&&(this.muted=!0)};function pj(a){var b="";if(a)for(var c=0;c<a.length;c++)b+=a.start(c).toFixed(3)+"-"+a.end(c).toFixed(3)+",";return b};var qj=[2,5,100,101,150],rj=[202,203];function sj(a,b){a=a||64;a&128&&!b||a&2&&a&16||(this.b=a,this.a=b||null)}sj.prototype.b=64;sj.prototype.a=null;function tj(a,b,c){return b==a.b&&c==a.a||b&128&&!c||b&2&&b&16?a:new sj(b,c)}function uj(a,b){return tj(a,a.b|b)}function P(a,b){return!!(a.b&b)}function vj(a){return P(a,128)?-1:P(a,2)?0:P(a,1)&&!P(a,32)?3:P(a,64)?-1:P(a,8)?1:P(a,4)?2:-1}function wj(){var a;return a=14};function R(){this.H=new Wh;L(this,this.H)}y(R,K);R.prototype.D=function(a,b,c){return this.ha()?0:this.H.D(a,b,c)};R.prototype.$=function(a,b,c){return this.ha()?!1:this.H.$(a,b,c)};R.prototype.Wc=function(a){return this.ha()?!1:this.H.Wc(a)};R.prototype.u=function(a,b){return this.ha()?!1:this.H.u.apply(this.H,arguments)};function xj(a,b,c){R.call(this);this.A=a;this.o=b;this.B=c;this.j=new Ei(250);this.j.addEventListener("tick",this.Xb,!1,this);L(this,this.j);this.i=[];this.a=[];this.b=new Hi}y(xj,R);f=xj.prototype;f.Sh=!1;f.vg=!1;f.Gk=!1;f.Fk=!1;f.Ng=null;f.nx=function(a){this.Xb();z(arguments,function(a){this.i.push(a);var c=this.b.a;!c.length||0<Yh(a,c[c.length-1])?c.push(a):kb(c,a,Yh);this.u("onAdd",a)},this);this.Xb()};f.ox=function(a){z(arguments,function(a){a=this.i.indexOf(a);0<=a&&yj(this,a)},this);this.Xb()};
125 function yj(a,b){var c=a.i.splice(b,1)[0],d=a.b.a,e=eb(d,Yh||gb,c);0<=e&&Xa(d,e);b=a.a.indexOf(c);0<=b&&a.a.splice(b,1);a.u("onRemove",c)}f.reset=function(){this.vg=this.Sh=!1;zj(this);for(var a=this.i.length-1;0<=a;a--)yj(this,a);this.Xb();this.k=null};
126 function Aj(a,b){if(a.vg&&!a.Sh)if(zj(a),P(b.state,2)){a.k=null;for(var c=[],d=0;d<a.a.length;d++){var e=a.a[d];e.active&&2147483647>e.end&&(c.push(e),a.a.splice(d--,1))}d=Ii(a.b,2147483646);d=d.concat(Ji(a.b,2147483646));e=[];if(c.length)for(var g=0;g<c.length;g++)e.push(["onExit",c[g]]);c=e.concat(Bj(a,d));for(d=0;d<c.length;d++)g=c[d],e=g[1],e.zb.u.apply(e.zb,g)}else P(b.state,16)?(a.g=Cj(a),a.j.stop(),a.j.start(),a.Xb()):(a.j.stop(),P(b.a,16)?(a.g=Cj(a),null!=Ki(a.b,Math.max(a.g-2E3,0))&&(a.Ng=
127 Gi(v(a.Xb,a)))):a.Xb())}function Bj(a,b){var c=[];if(!b.length)return c;b.sort($h);for(var d=0;d<b.length;d++){var e=b[d];e.active&&-1==a.a.indexOf(e)&&(a.a.push(e),c.push(["onEnter",e]))}return c}
128 f.Xb=function(){this.Fk=!0;if(!this.Gk)for(var a=3;this.Fk&&a;){this.Fk=!1;this.Gk=!0;if(this.vg&&!this.Sh){zj(this);for(var b=Cj(this),c=[],d=0;d<this.a.length;d++){var e=this.a[d];e.active&&!e.contains(b)&&(c.push(["onExit",e]),this.a.splice(d--,1))}d=Ii(this.b,b);e=this.o();!P(e,48)&&b>this.g&&(d=d.concat(Ji(this.b,this.g,b)));c=c.concat(Bj(this,d));this.g=b;!this.Sh&&this.k&&(c.unshift(["onLockBlockExit",this.k]),this.k=null,P(e,2)&&(this.g=2147483647));this.B()&&(b=Ki(this.b,this.g),null!=b&&
129 (this.Ng=Gi(v(this.Xb,this),b-this.g)));for(d=0;d<c.length;d++)b=c[d],e=b[1],"onLockBlockExit"==b[0]||"onLockBlockEnter"==b[0]?this.u.apply(this,b):e.zb.u.apply(e.zb,b)}this.Gk=!1;a--}};function zj(a){null!=a.Ng&&(l.clearTimeout(a.Ng),a.Ng=null)}function Cj(a){return P(a.o(),2)?2147483647:1E3*a.A()}f.F=function(){this.j.removeEventListener("tick",this.Xb,!1,this);zj(this);this.k=this.b=this.a=this.i=null;xj.C.F.call(this)};function Dj(a,b){for(var c=a.split(b),d={},e=0,g=c.length;e<g;e++){var h=c[e].split("=");if(1==h.length&&h[0]||2==h.length){var k=ua(h[0]||""),h=ua(h[1]||"");k in d?t(d[k])?ab(d[k],h):d[k]=[d[k],h]:d[k]=h}}return d}function Ej(a,b){var c=[];Eb(a,function(a,b){var g=encodeURIComponent(String(b)),h;h=t(a)?a:[a];z(h,function(a){""==a?c.push(g):c.push(g+"="+encodeURIComponent(String(a)))})});return c.join(b)}function Fj(a){"?"==a.charAt(0)&&(a=a.substr(1));return Dj(a,"&")}
130 function Gj(a){return-1!=a.indexOf("?")?(a=(a||"").split("#")[0],a=a.split("?",2),Fj(1<a.length?a[1]:a[0])):{}}function Hj(a){a=je([],a);a[0]="";return a.join("")}function S(a,b){return ge(je([a],b))}var Ij=ee;function Jj(){var a=ce(document.location.href);return ae(a[1],a[2],a[3],a[4])}function Kj(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=Fj(d[1]||""),e;for(e in b)d[e]=b[e];return S(a,d)+c};var Lj=null;"undefined"!=typeof XMLHttpRequest?Lj=function(){return new XMLHttpRequest}:"undefined"!=typeof ActiveXObject&&(Lj=function(){return new ActiveXObject("Microsoft.XMLHTTP")});function Mj(a){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:return!0;default:return!1}};function Nj(a,b,c,d,e,g,h){var k=Lj&&Lj();if("open"in k){k.onreadystatechange=function(){4==(k&&"readyState"in k?k.readyState:0)&&b&&ff(b)(k)};c=(c||"GET").toUpperCase();d=d||"";k.open(c,a,!0);g&&(k.responseType=g);h&&(k.withCredentials=!0);g="POST"==c;if(e=Oj(a,e))for(var m in e)k.setRequestHeader(m,e[m]),"content-type"==m.toLowerCase()&&(g=!1);g&&k.setRequestHeader("Content-Type","application/x-www-form-urlencoded");k.send(d);return k}}
131 function Oj(a,b){b=b||{};var c;if(c=cf("PAGE_CL"))if(c=cf("PAGE_BUILD_TIMESTAMP")){var d;d||(d=window.location.href);c=ce(a)[1]||null;var e=Ij(a);c&&e?(c=d,d=ce(a),c=ce(c),d=d[3]==c[3]&&d[1]==c[1]&&d[4]==c[4]):d=e?Ij(d)==e&&(Number(ce(d)[4]||null)||null)==(Number(ce(a)[4]||null)||null):!0;c=d||Pj(a)}c&&(b["X-YouTube-Page-CL"]=cf("PAGE_CL"),b["X-YouTube-Page-Timestamp"]=cf("PAGE_BUILD_TIMESTAMP"));return b}
132 function Pj(a){var b=["X-YouTube-Page-CL","X-YouTube-Page-Timestamp"],c=cf("CORS_HEADER_WHITELIST")||{};a=Ij(a);if(!a)return!0;var d=c[a];return d?Ma(b,function(a){return Sa(d,a)}):!1}
133 function Qj(a,b){var c=b.format||"JSON";b.rv&&(a=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+a);var d=b.yf;d&&(a=Kj(a,d));var e=b.Lw||"";(d=b.Mf)&&u(e)&&(e=Fj(e),Ob(e,d),e=Hj(e));var g=!1,h,k=Nj(a,function(a){if(!g){g=!0;h&&I(h);var d=Mj(a),e=null;if(d||400<=a.status&&500>a.status)e=Rj(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.Z||l;d?b.Qa&&b.Qa.call(k,
134 a,e):b.onError&&b.onError.call(k,a,e);b.rd&&b.rd.call(k,a,e)}},b.method,e,b.headers,b.responseType,b.withCredentials);b.bl&&0<b.timeout&&(h=H(function(){g||(g=!0,k.abort(),I(h),b.bl.call(b.Z||l,k))},b.timeout));return k}function Rj(a,b){var c=null;switch(a){case "JSON":var d=b.responseText,e=b.getResponseHeader("Content-Type")||"";d&&0<=e.indexOf("json")&&(c=nb(d));break;case "XML":if(d=(d=b.responseXML)?Sj(d):null)c={},z(d.getElementsByTagName("*"),function(a){c[a.tagName]=Tj(a)})}return c}
135 function Sj(a){return a?(a=("responseXML"in a?a.responseXML:a).getElementsByTagName("root"))&&0<a.length?a[0]:null:null}function Tj(a){var b="";z(a.childNodes,function(a){b+=a.nodeValue});return b}var Uj={html5_ajax:"action_get_html5_token",watch_actions_ajax:"action_get_watch_actions_token",addto_ajax:"action_get_wl_token"},Vj={html5_ajax:"html5_ajax_token",watch_actions_ajax:"watch_actions_ajax_token",addto_ajax:"addto_ajax_token"};
136 function Wj(a,b,c,d,e){if(ef(a))d&&window.setTimeout(d,0);else{var g=Jj()+"/token_ajax",h={};b&&(h.By=b);c&&(h.Cy=c);h[Uj[a]]=1;Qj(g,{format:"RAW",method:"GET",yf:h,rd:function(b){var c=Fj(b.responseText),g=c[Vj[a]];g?(df(a,g),d&&d()):e&&e(b,c)}})}};function Xj(a){a=a.split("");a=Yj(a,11);a=a.reverse();a=Yj(a,29);a=a.slice(1);a=a.reverse();a=a.slice(3);return a.join("")}function Yj(a,b){var c=a[0];a[0]=a[b%a.length];a[b]=c;return a};function Zj(){this.lang=""};function ak(a,b,c,d,e,g){this.Pa=a;this.j=0<=b.indexOf("/mp4")?1:0<=b.indexOf("/webm")?2:0<=b.indexOf("/x-flv")?3:0;this.lb=b;this.a=g||0;this.i=c||null;this.b=d||null;this.g=e||null}function bk(a){return 2==a.j}function ck(a){return 0<=a.indexOf("opus")||0<=a.indexOf("vorbis")||0<=a.indexOf("mp4a")}function dk(a){return 0<=a.indexOf("vp9")||0<=a.indexOf("vp8")||0<=a.indexOf("avc1")};var ek={gy:"auto",WC:"tiny",ZB:"light",SMALL:"small",iC:"medium",LARGE:"large",EB:"hd720",DB:"hd1080",LB:"highres",aD:"unknown"};function fk(a,b,c){this.width=a;this.height=b;t:if(a||b){for(var d=1;d<gk.length;d++){var e=gk[d],g=hk[e];if(a>=g[0]||b>=g[1]){a=e;break t}}a="tiny"}else a="auto";this.i=a;this.a=c||0}var gk="auto highres hd1080 hd720 large medium small tiny".split(" "),hk={auto:[0,0],tiny:[256,144],light:[320,240],small:[320,240],medium:[640,360],large:[854,480],hd720:[1280,720],hd1080:[1920,1080],highres:[2048,1536]};function ik(a,b){this.start=a;this.end=b;this.length=b-a+1}function jk(a){a=a.split("-");return 2==a.length&&(a=new ik(parseInt(a[0],10),parseInt(a[1],10)),!isNaN(a.start)&&!isNaN(a.end)&&!isNaN(a.length)&&0<a.length)?a:null}function kk(a,b){return new ik(a,a+b-1)}ik.prototype.toString=function(){return this.start+"-"+(null==this.end?"":this.end)};var lk="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 googlevideo.com".split(" "),mk=["2mdn.net"],nk="www.google.com/aclk www.google.com/pagead/conversion googleadservices.com/aclk googleadservices.com/pagead/conversion googleads.g.doubleclick.net/aclk googleads.g.doubleclick.net/pagead/conversion".split(" ");function ok(){return-1!=document.location.toString().indexOf("/embed/")}
137 function pk(a,b){return RegExp("^https?://([a-z0-9-]{1,63}\\.)*("+b.join("|").replace(/\./g,".")+")(:[0-9]+)?([/?#]|$)","i").test(a)}function qk(a){a=new qe(a);re(a,document.location.protocol);se(a,document.location.hostname);document.location.port&&te(a,document.location.port);return a.toString()};function rk(a,b,c,d,e,g,h,k,m){this.a=b;this.T=c;this.type=a;this.j=0<=d?d:-1;this.startTime=e||0;this.duration=g||0;this.nb=h||0;this.Ha=0<=k?k:NaN;this.b=!!m;this.T?(this.T=this.T,this.Ha=0<=this.Ha?this.Ha:this.T.length,this.g=this.nb+this.Ha==this.T.length,this.i=this.startTime+this.duration*this.nb/this.T.length,this.o=this.duration*this.Ha/this.T.length,this.k=this.i+this.o):this.g=!0}function sk(a){return 1==a.type||2==a.type}
138 function tk(a,b){return a.a==b.a&&a.T.start+a.nb+a.Ha==b.T.start+b.nb}function uk(a){Fa(1==a.length||Ma(a,function(a){return!!a.T}));for(var b=1;b<a.length;b++);b=a[a.length-1];return new ik(a[0].T.start+a[0].nb,b.T.start+b.nb+b.Ha-1)}rk.prototype.yg=function(a){return this.a.yg(this,a)};function vk(a){return"i="+a.a.info.Pa+",r="+(a.T.start+a.nb)+"-"+(a.T.start+a.nb+a.Ha-1)+",t="+a.i.toFixed(1)+"-"+(a.i+a.o).toFixed(1)};function wk(a,b,c,d){this.info=a;this.buffer=b;this.T=c;this.a=d}function xk(a){return new DataView(a.buffer,a.T.start,a.T.length)}function yk(a){if(a.info.Ha!=a.T.length)return!1;if(1==a.info.a.info.j){if(8>a.info.Ha||4==a.info.type)return!0;var b=xk(a),c=b.getUint32(0,!1),b=b.getUint32(4,!1);if(2==a.info.type)return c==a.info.Ha&&1936286840==b;if(3==a.info.type&&0==a.info.nb)return 1836019558==b}return!0};function zk(a){this.a=a;this.b=0;this.g=-1}var Ak=0;function Bk(a,b){a.a=Kj(a.a,b)};function Ck(a,b){this.index=null;this.info=b;this.b=null;this.i=!1;this.j=new zk(a)}f=Ck.prototype;f.Po=function(){return!1};f.Yb=function(){return!1};f.Oj=function(){return!1};f.po=function(){return[]};f.yg=function(){return null};f.Vj=function(){return null};f.Oo=function(){};function Dk(a){this.b=a[0].a.j;this.a=a};function Ek(){this.R=0;this.a=new Float64Array(128);this.b=new Float32Array(128);this.g=!1}Ek.prototype.hb=function(){return this.R};function Fk(a,b){var c=eb(a.b.subarray(0,a.R),gb,b);return 0<=c?c:Math.max(0,-c-2)}function Gk(a){if(a.a.length<a.R+1){var b=2*a.a.length,b=b+2,c=a.a;a.a=new Float64Array(b+1);var d=a.b;a.b=new Float32Array(b+1);for(b=0;b<a.R+1;b++)a.a[b]=c[b],a.b[b]=d[b]}}function Hk(a,b){this.b=a;this.a=0;this.g=b||0}
139 function Ik(a){for(var b=Jk(a,!1);236==b;)Kk(a),b=Jk(a,!1);return b}function Lk(a){var b=Jk(a,!0),c=a.b.byteOffset+a.a,d=Math.min(b,a.b.buffer.byteLength-c),c=new DataView(a.b.buffer,c,d),c=new Hk(c,a.g+a.a);a.a+=b;return c}function Mk(a){for(var b=Jk(a,!0),c=Nk(a),d=1;d<b;d++)c=(c<<8)+Nk(a);return c}function Kk(a){var b=Jk(a,!0);a.a+=b}function Jk(a,b){var c=Nk(a);if(1==c){for(var d=c=0;7>d;d++)c=256*c+Nk(a);return c}for(var e=128,d=0;6>d&&e>c;d++)c=256*c+Nk(a),e*=128;return b?c-e:c}
140 function Nk(a){return a.b.getUint8(a.a++)};function Ok(a,b,c,d){Ck.call(this,a,b);this.o=c;this.k=d;this.g=null;this.index=new Ek;b=parseInt;c=a.search(ne);d=me(a,0,"clen",c);if(0>d)a=null;else{var e=a.indexOf("&",d);if(0>e||e>c)e=c;d+=5;a=ua(a.substr(d,e-d))}this.a=b(a,10)}y(Ok,Ck);f=Ok.prototype;f.Yb=function(){return!(!this.b||!this.index.hb())};
141 f.po=function(a){var b=new rk(1,this,this.o),c=new rk(2,this,this.k),d=[],e=[b];tk(b,c)?e.push(c):d.push(new Dk([c]));isNaN(this.a)?a=0:a>this.a&&(a=this.a);b=e[e.length-1];c=b.T.end-e[0].T.start+1;a>c&&(a=kk(b.T.end+1,a-c),e.push(new rk(4,this,a)));d.push(new Dk(e));return d};
142 f.Oo=function(a){if(1==a.info.type){if(this.b)return;this.b=new Uint8Array(a.buffer,a.T.start,a.T.length)}else if(2==a.info.type){if(this.g||this.index.hb())return;if(1==this.info.j){var b=this.index,c=xk(a),d=a.info.T.start;a=0;var e=c.getUint32(0,!1),g=c.getUint8(a+8);a+=12;var h=c.getUint32(a+4,!1);a+=8;var k;0==g?(g=c.getUint32(a,!1),k=c.getUint32(a+4,!1),a+=8):(g=(c.getUint32(a,!1)<<32)+c.getUint32(a+4,!1),k=(c.getUint32(a+8,!1)<<32)+c.getUint32(a+12,!1),a+=16);b.a[0]=k+(e+d);b.b[0]=g;b.g=!0;
143 d=c.getUint16(a+2,!1);a+=4;for(e=0;e<d;e++){var m=c.getUint32(a,!1);k=c.getUint32(a+4,!1);a+=12;g=b;k=k/h;g.R++;Gk(g);g.a[g.R]=g.a[g.R-1]+m;g.b[g.R]=g.b[g.R-1]+k}}else this.g=xk(a)}if(bk(this.info)&&this.b&&this.g){c=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength);b=this.index;e=this.g;a=new Hk(c);if(440786851==Ik(a)&&(Kk(a),408125543==Ik(a))){h=a;d=h.a;c=Jk(h,!0);h.a=d;a=Lk(a);h=a.g+a.a;for(m=Ik(a);357149030!=m;)Kk(a),m=Ik(a);a=Lk(a);g=1E6;k=1E9;for(d=0;!(a.a>=a.b.byteLength);)if(m=
144 Ik(a),2807729==m)g=Mk(a);else if(2807730==m)k=Mk(a);else if(17545==m){var d=a,m=Jk(d,!0),p=0;4==m?p=d.b.getFloat32(d.a):8==m&&(p=d.b.getFloat64(d.a));d.a+=m;d=p}else Kk(a);g/=k;d*=g;a=new Hk(e);if(475249515==Ik(a)){for(a=Lk(a);!(a.a>=a.b.byteLength);)if(m=Ik(a),187==m){e=Lk(a);m=g;k=h;if(179!=Ik(e))m=null;else if(m*=Mk(e),183!=Ik(e))m=null;else{e=Lk(e);for(p=k;!(e.a>=e.b.byteLength);)241==Ik(e)?p=Mk(e)+k:Kk(e);m=[p,m]}e=b;k=m[0];m=m[1];Gk(e);e.a[e.R]=k;e.b[e.R]=m;e.R++}else Kk(a);a=d;c=c+h;Gk(b);
145 b.g=!0;b.b[b.R]=a;b.a[b.R]=c}}this.g=null}};function Pk(a,b,c,d){for(var e=[];b<a.index.hb();b++){var g=kk(a.index.a[b],b+1<a.index.R||a.index.g?a.index.a[b+1]-a.index.a[b]:-1),h=a.index.b[b],k;k=a.index;var m=b;k=m+1<k.R||k.g?k.b[m+1]-k.b[m]:-1;var m=Math.max(0,c-g.start),p=Math.min(g.end+1,c+d)-(g.start+m),s=b==a.index.hb()-1&&m+p==g.length;e.push(new rk(3,a,g,b,h,k,m,p,s));if(g.start+m+p>=c+d)break}return new Dk(e)}
146 function Qk(a,b){for(var c=0;c+1<a.index.hb()&&b.T.start>=a.index.a[c+1];)c++;return Pk(a,c,b.T.start,b.T.length).a}f.Oj=function(a){return this.Yb()?!0:isNaN(this.a)?!1:a.T.end+1<this.a};f.yg=function(a,b){this.Oj(a);if(!this.Yb()){var c=kk(a.T.end+1,b);c.end+1>this.a&&(c=new ik(c.start,this.a-1));c=[new rk(4,a.a,c)];return new Dk(c)}4==a.type&&(c=Qk(this,a),a=c[c.length-1]);var c=0,d=a.T.start+a.nb+a.Ha;3==a.type&&(c=a.j,d==a.T.end+1&&(c+=1));return Pk(this,c,d,b)};
147 f.Vj=function(a,b){var c=Fk(this.index,a);return Pk(this,c,this.index.a[c],b)};f.Po=function(){return this.Yb()&&!isNaN(this.a)&&(this.index.g?this.index.a[this.index.R]:-1)!=this.a};function Rk(){this.duration=0;this.a={}}var Sk=/PT(([0-9]*)H)?(([0-9]*)M)?(([0-9.]*)S)?/;function Tk(a){var b=new Rk;z(a,function(a){var d=a.type,e=a.itag,g=null;dk(d)&&(g=a.size.split("x"),g=new fk(parseInt(g[0],10),parseInt(g[1],10)));var h=null;ck(d)&&(h=new Zj);d=new ak(e,d,h,g,null,parseInt(a.bitrate,10)/8);g=jk(a.init);h=jk(a.index);(a=Uk(a.url,d,a.s))&&(b.a[e]=new Ok(a,d,g,h))});return b}
148 function Vk(a,b){for(var c=a;c;c=c.parentNode)if(c.attributes){var d=c.attributes[b];if(d)return d.value}return""}function Wk(a,b){for(var c=a;c;c=c.parentNode){var d=c.getElementsByTagName(b);if(0<d.length)return d[0]}return null}function Uk(a,b,c){if(!pk(a,lk))return"";b={alr:"yes",mime:b.lb.split(";")[0]};c&&(b.signature=Xj(c));return Kj(a,b)};function Xk(a,b,c,d,e,g,h,k,m){this.i={};this.o=a;this.H=b;this.b=c;this.a=d;this.g=e;this.A=g;this.j=h;this.k=k;this.B=m}function Yk(a,b){var c=a.A,c=c.replace("$N",a.j),c=c.replace("$L",a.B.toString()),c=c.replace("$M",b.toString());a.k&&(c=S(c,{sigh:a.k}));return c}function Zk(a,b){var c=Math.floor(b/(a.a*a.g)),d=a.a*a.g,e=b%d,g=e%a.a,e=Math.floor(e/a.a),h=a.g,k=a.b-d*c;k<d&&(h=Math.ceil(k/a.a));return{url:Yk(a,c),qu:g,yi:a.a,row:e,rows:h,bo:a.o*a.a,ao:a.H*h}};function $k(a){var b=[];a=a.split("|");for(var c=a[0],d,e,g,h,k,m,p,s,r=1;r<a.length;r++)d=a[r].split("#"),e=r-1,g=parseInt(d[0],10),h=parseInt(d[1],10),k=parseInt(d[2],10),m=parseInt(d[3],10),p=parseInt(d[4],10),s=d[6],d=d[7],b.push(new Xk(g,h,k,m,p,c,s,d,e));this.a=b;this.b={};1<this.a.length&&-1!=this.a[0].j.indexOf("default")&&this.a.splice(0,1)}function al(a,b){var c=a.a[0].b-1;return vb(Math.round(c*b),0,c)}
149 function bl(a,b){var c=a.b[b];if(c)return c;for(var c=a.a.length,d=0;d<c;d++)if(a.a[d].o>=b)return a.b[b]=d;a.b[b]=c-1;return c-1};var cl={0:"MONO",1:"LEFT_RIGHT",2:"RIGHT_LEFT",3:"TOP_BOTTOM",4:"BOTTOM_TOP"};var dl={cC:1,dC:2,eC:3};var el;var fl=Yb(),fl=fl.toLowerCase();if(-1!=fl.indexOf("android")){var gl=fl.match(/android\D*(\d\.\d)[^\;|\)]*[\;\)]/);if(gl)el=Number(gl[1]);else{var hl={cupcake:1.5,donut:1.6,eclair:2,froyo:2.2,gingerbread:2.3,honeycomb:3,"ice cream sandwich":4,jellybean:4.1},il=fl.match("("+Hb(hl).join("|")+")");el=il?hl[il[0]]:0}}else el=void 0;var jl,kl;function ll(){var a=n("yt.player.utils.videoElement_");a||(a=document.createElement("video"),pa("yt.player.utils.videoElement_",a));return a}function ml(){if(2.2==el)return!0;var a=ll();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}}
150 function nl(){var a=Rc("div",{"class":"html5-player-css-loaded"});document.body.appendChild(a);var b="none"==md(a,"display");F(a);return b};function ol(){var a;if(void 0==jl&&(jl=!1,window.crypto&&window.crypto.qy))try{a=new Uint8Array(1),window.crypto.qy(a),jl=!0}catch(b){}if(jl){a=Array(16);var c=new Uint8Array(16);window.crypto.getRandomValues(c);for(var d=0;d<a.length;d++)a[d]=c[d]}else for(a=Array(16),c=0;16>c;c++){for(var d=x(),e=0;e<d%23;e++)a[c]=Math.random();a[c]=Math.floor(256*Math.random())}return a}
151 function pl(){for(var a=ol(),b=[],c=0;c<a.length;c++)b.push("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_".charAt(a[c]&63));return b.join("")}function ql(){return Ka(ol(),function(a){return(a&15).toString(16)}).join("")};function rl(a,b,c){b={cpn:b};c&&(b.ibw="1369843");return{url:S(a,b),type:"application/x-mpegURL",quality:"auto",itag:"93"}};function T(a,b){return void 0==b?a:"1"==b?!0:!1}function sl(a,b,c){for(var d in c)if(c[d]==b)return c[d];return a}function U(a,b){return void 0==b?a:b}function tl(a,b){var c=U(a,b);c&&(c=qk(c));return c}function ul(a){if(!a)return 0;a=a.split(":");var b=parseFloat(a[0]),c=1;2==a.length&&(c=parseFloat(a[1]));return isNaN(b)||isNaN(c)||0==c?0:b/c};function vl(a,b){this.a=a;this.b=b}vl.prototype.clone=function(){return new vl(this.a,this.b)};function wl(a){this.a=[];if(a)t:{var b,c;if(a instanceof wl){if(b=a.uc(),c=a.jc(),0>=a.hb()){a=this.a;for(var d=0;d<b.length;d++)a.push(new vl(b[d],c[d]));break t}}else b=Hb(a),c=Gb(a);for(d=0;d<b.length;d++)xl(this,b[d],c[d])}}function xl(a,b,c){var d=a.a;d.push(new vl(b,c));b=d.length-1;a=a.a;for(c=a[b];0<b;)if(d=b-1>>1,a[d].a>c.a)a[b]=a[d],b=d;else break;a[b]=c}f=wl.prototype;
152 f.remove=function(){var a=this.a,b=a.length,c=a[0];if(!(0>=b)){if(1==b)Ua(a);else{a[0]=a.pop();for(var a=0,b=this.a,d=b.length,e=b[a];a<d>>1;){var g=2*a+1,h=2*a+2,g=h<d&&b[h].a<b[g].a?h:g;if(b[g].a>e.a)break;b[a]=b[g];a=g}b[a]=e}return c.b}};f.jc=function(){for(var a=this.a,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].b);return b};f.uc=function(){for(var a=this.a,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].a);return b};f.clone=function(){return new wl(this)};f.hb=function(){return this.a.length};
153 f.isEmpty=function(){return Ta(this.a)};f.clear=function(){Ua(this.a)};function yl(){wl.call(this)}y(yl,wl);function zl(a){R.call(this);this.a=a;this.g=new yl;this.i={}}y(zl,R);zl.prototype.b=!1;function Al(a,b,c){var d;for(c=bl(a.a,c);0<=c;){d=a.a.a[c];if(d=d.i[Math.floor(b/(d.a*d.g))]?Zk(d,b):null)return d;c--}return Zk(a.a.a[0],b)}function Bl(a){if(!a.b)if(a.g.isEmpty())a.b=!1;else{a.b=!0;var b=a.g.remove(),c=new Image;c.src=Yk(a.a.a[b.xn],b.yn);c.onload=v(a.j,a,b.xn,b.yn)}}
154 zl.prototype.j=function(a,b){this.b=!1;var c=this.a.a[a];c.i[b]=!0;Bl(this);var d,e=c.a*c.g;d=b*e;c=Math.min(d+e-1,c.b-1);d=[d,c];this.u("l",d[0],d[1])};function Cl(a,b,c){this.b=a;this.a=b;this.g=c}var Dl={playready:["com.youtube.playready"],widevine:["com.widevine.alpha"],clearkey:["org.w3.clearkey","webkit-org.w3.clearkey"]},El=["widevine","playready"];function Fl(a,b,c){if(!a.addKey&&!a.webkitAddKey)return null;for(var d=0;d<El.length;d++){var e=El[d];if(c[e])for(var g=Dl[e],h=0;h<g.length;h++){var k=g[h];if(a.canPlayType(b,k))return new Cl(e,k,c[e])}}return null};function Gl(a,b){this.a=a;this.b=b;this.i=0;Object.defineProperty(this,"timestampOffset",{get:this.Nu,set:this.Ou});Object.defineProperty(this,"buffered",{get:this.Mu})}f=Gl.prototype;f.append=function(a){this.a.webkitSourceAppend(this.b,a)};f.abort=function(){this.a.webkitSourceAbort(this.b)};f.Mu=function(){return this.a.webkitSourceState==this.a.SOURCE_CLOSED?new Hl:this.a.webkitSourceBuffered(this.b)};f.Nu=function(){return this.i};
155 f.Ou=function(a){this.i=a;this.a.webkitSourceTimestampOffset(this.b,a)};function Hl(){this.length=0};function Il(a){this.activeSourceBuffers=this.sourceBuffers=[];this.a=a;this.b=NaN;this.g=0;Object.defineProperty(this,"duration",{get:this.Hu,set:this.Ku});Object.defineProperty(this,"readyState",{get:this.Iu});this.a.addEventListener("webkitsourceclose",v(this.Ju,this),!0)}function Jl(a){return window.MediaSource?new window.MediaSource:window.WebKitMediaSource?new window.WebKitMediaSource:HTMLMediaElement.prototype.webkitSourceAddId?new Il(a):null}f=Il.prototype;
156 f.addEventListener=function(a,b,c){this.a.addEventListener(a,b,c)};f.mn=function(){return this.a.webkitMediaSourceURL};f.addSourceBuffer=function(a){var b=(this.g++).toString();this.a.webkitSourceAddId(b,a);a=new Gl(this.a,b);this.sourceBuffers.push(a);return a};
157 f.removeSourceBuffer=function(a){for(var b in this.sourceBuffers)if(a===this.sourceBuffers[b]){this.a.webkitSourceRemoveId(a.b);for(a=b+1;a<this.sourceBuffers.length;a++)this.sourceBuffers[a-1]=this.sourceBuffers[a];this.sourceBuffers.pop();break}};f.Iu=function(){switch(this.a.webkitSourceState){case this.a.SOURCE_CLOSED:return"closed";case this.a.SOURCE_OPEN:return"open";case this.a.SOURCE_ENDED:return"ended"}return""};
158 f.endOfStream=function(a){var b=this.a.EOS_NO_ERROR;"network"==a?b=this.a.EOS_NETWORK_ERR:"decode"==a&&(b=this.a.EOS_DECODE_ERR);this.a.webkitSourceEndOfStream(b)};f.Ju=function(){Ua(this.sourceBuffers)};f.Hu=function(){return this.b};f.Ku=function(a){this.b=a;this.a.webkitSourceSetDuration&&this.a.webkitSourceSetDuration(a)};function Kl(){this.a=[]}Kl.prototype.listen=function(a,b,c){if(t(b))for(var d=0;d<b.length;d++)this.listen(a,b[d],c);else c=v(c,this),a.addEventListener(b,c,!1),this.a.push(a,b,c)};Kl.prototype.removeAll=function(){if(this.a)for(;this.a.length;){var a=this.a.shift(),b=this.a.shift(),c=this.a.shift();a.removeEventListener&&a.removeEventListener(b,c)}};Kl.prototype.ha=function(){return null===this.a};Kl.prototype.dispose=function(){this.removeAll();this.a=null};function Ll(a,b,c,d){this.a=[];this.ud=this.Zb=null;this.i=b;this.g=Jl(a);this.b="";this.j=null;this.listen(this.g,["sourceopen","webkitsourceopen"],oa(this.Pt,d,c));this.listen(this.g,["sourceclose","webkitsourceclose"],this.Ot)}y(Ll,Kl);var Ml={};f=Ll.prototype;f.Va=function(a){this.isOpen()?this.g.duration=a:this.i=a};f.isOpen=function(){return"open"==this.g.readyState};f.Ib=function(){return"closed"==this.g.readyState};
159 f.Pt=function(a,b){isNaN(this.i)||(this.g.duration=this.i,this.i=NaN,this.Zb=this.g.addSourceBuffer(a),this.ud=this.g.addSourceBuffer(b),this.j&&(this.j(this),this.j=null))};f.Ot=function(){this.dispose()};f.dispose=function(){Nl(this.b);this.b="";Ll.C.dispose.call(this)};function Nl(a){if(a)try{window.URL.revokeObjectURL(a)}catch(b){}}
160 function Ol(a){if(window.MediaSource&&window.MediaSource.isTypeSupported)return window.MediaSource.isTypeSupported(a);'audio/mp4; codecs="mp4a.40.2"'==a&&(a='video/mp4; codecs="avc1.4d404f"');return!!ll().canPlayType(a)}
161 function Pl(a,b){var c={};if(window.MediaSource&&window.MediaSource.isTypeSupported)Ka(a,function(a){c[a]=window.MediaSource.isTypeSupported(a)}),H(oa(b,c),0);else{for(var d=!1,e=0;e<a.length;e++){var g=Ml[a[e]];if(void 0!=g)c[a[e]]=g;else{d=!0;break}}if(d){var d=ll(),e=Jl(d),g=e.mn?e.a.webkitMediaSourceURL:window.URL.createObjectURL(e),h=oa(Ql,a,b,d,e,g);e.addEventListener("sourceopen",h,!1);e.addEventListener("webkitsourceopen",h,!1);d.src=g}else H(oa(b,c),0)}}
162 function Ql(a,b,c,d,e){for(var g={},h=0;h<a.length;h++){var k=Ml[a[h]];if(void 0==k){try{var m=d.addSourceBuffer(a[h]);d.removeSourceBuffer(m);k=!0}catch(p){p.code==DOMException.NOT_SUPPORTED_ERR&&(k=!1)}Ml[a[h]]=k}g[a[h]]=k}c.src="";Nl(e);b(g)};function Rl(a,b,c,d){this.a=c;this.b=a;this.j=d||"";this.i=b;this.g={}}function hj(a){if(a.a)a=a.b;else if(a.i){var b;b=(new qe(a.b)).a.get("id");b="http://www.youtube.com/api/manifest/t2b/source/youtube/id/"+encodeURIComponent(b);b+="/itag/"+a.j;b+="/mfmt/amf";a=ve(new qe(S(a.b,a.g)),b).toString()}else a=S(a.b,a.g);return a};function Sl(a,b){var c=b.Pa in Tl&&bj();this.i=(this.a=!!(a instanceof Array))?null:new Rl(a,c,this.a,b.Pa);this.b=this.a?a[0]:null;this.g=this.a?a[1]:null;this.ye=b}Sl.prototype.getInfo=function(){return this.ye};Sl.prototype.We=function(){return this.ye.b.i};var Ul={'video/mp4; codecs="avc1.42001E, mp4a.40.2"':"maybe"},Vl={"application/x-mpegURL":"maybe"},Wl={"application/x-mpegURL":"maybe"};
163 function Xl(a,b,c){if(!ml())return[];var d=Yl(a,b);a=!d.length&&b?Yl(a,!1):d;var e={};b=ll();c=c||(Ti||Ui&&cj("crkey")?!0:!1);for(d=0;d<a.length;d++){var g=a[d];if((b.canPlayType(g.getInfo().lb)||Zl(g))&&!(g.ye.Pa in $l||bj()&&"5"==g.ye.Pa)){var h=g.We();if(!e[h]||bk(g.getInfo())&&!c||!bk(g.getInfo())&&c)e[h]=g}}var k=[];z(gk,function(a){(g=e[a])&&k.push(g)});return k}function Zl(a){var b;a=a.getInfo().lb;Si?b=Wl[a]:2.2==el?b=Ul[a]:cj("android")&&cj("chrome")&&(b=Vl[a]);return b||""}
164 var Tl={5:!0,34:!0,35:!0},$l={52:!0,53:!0,54:!0,55:!0,60:!0,79:!0,87:!0},am={zB:160,vB:133,xB:134,pB:135,lB:136,hB:137,qB:138,fB:140,wB:142,yB:143,sB:144,uB:222,tB:223,mB:145,oB:224,nB:225,iB:146,kB:226,jB:227,rB:147,gB:149,eB:261,AB:161,rD:171,qD:172,yD:194,vD:195,xD:220,wD:221,uD:196,tD:197,sD:198,CD:242,DD:243,BD:244,AD:247,zD:248};function bm(a){var b=[];z(a,function(a){a.url&&b.push(cm(a.url,a.type,"auto","0"))});return b}
165 function cm(a,b,c,d,e){var g=new Zj;(c=hk[c])||(c=hk.small);e=new fk(c[0],c[1],e?-1:0);b=unescape(b.replace(/&quot;/g,'"'));return new Sl(a,new ak(d,b,g,e))}function Yl(a,b){for(var c=[],d=0;d<a.length;d++){var e=a[d],g;if(g=cc)if(g=0!=e.ye.b.a)g=1==e.getInfo().j;g||0!=e.ye.b.a==b&&c.push(e)}return c}
166 function dm(a,b,c){for(var d=[],e=0;e<a.length;e++){var g=a[e];if(g.sig||g.s){var h=g.sig||Xj(g.s);g.url=Kj(g.url,{signature:h})}g.url&&d.push(cm(g.url,g.type,g.quality,g.itag,g.stereo3d))}return Xl(d,!!b,!!c)}function em(a,b){var c=bm(a);return Xl(c,!1,!!b)}function fm(a,b,c,d,e,g){if(a){var h=[];if(g){g={};for(var k in a.a)h=a.a[k].info.lb,g[h]=Ol(h);gm(a,b,c,d,e,g)}else{for(k in a.a)h.push(a.a[k].info.lb);Pl(h,v(gm,null,a,b,c,d,e))}}else c([])}
167 function gm(a,b,c,d,e,g){var h=null,k={},m={},p;for(p in am){var s=am[p],r=a.a[s];if(r&&g[r.info.lb]&&!(0<=r.info.lb.indexOf("vp9")&&cj("cros armv7"))){if(r.info.g){h||(h=ll());if(!Fl(h,r.info.lb,r.info.g))continue;if(!e&&r.info.b&&(1280<=r.info.b.width||720<=r.info.b.height))continue;if(261==s)continue}if(s=0<r.info.lb.indexOf("/webm")?r.info.g?3:1:0<r.info.lb.indexOf("/mp4")?r.info.g?4:2:null){Bk(r.j,b);var D=r.info.i?k:m;D[s]=D[s]||[];D[s].push(r)}}}a=[3,4,1,2];d&&(a=[4,3,2,1]);d=null;for(p=0;p<
168 a.length;p++)if(k[a[p]]&&m[a[p]]){d=a[p];break}a=[];if(null!=d)for(hb(k[d],"itag"),k=k[d].pop(),p=0;p<m[d].length;p++)a.push(new Sl([k,m[d][p]],m[d][p].info));fb(a,function(a,b){var c=a.getInfo(),d=b.getInfo();return d.b.height-c.b.height||d.a-c.a});c(a)};function mh(a){R.call(this);this.k=[];this.ga=new B(0,0);this.O=[];this.I=[];this.b={};this.ya={};this.i={};hm(this,a)}y(mh,R);var im=/\/img\/watermark\/youtube_(hd_)?watermark(-vfl\S{6})?.png$/,jm="author cc_asr cc_load_policy iv_new_window iv_load_policy keywords subscribed rvs title ttsurl ypc_buy_url ypc_full_video_length ypc_item_thumbnail ypc_item_title ypc_item_url ypc_offer_button_text ypc_offer_description ypc_offer_headline ypc_offer_id ypc_price_string ypc_preview ypc_video_rental_bar_text".split(" ");
169 f=mh.prototype;f.ca=!1;f.Ao=!0;f.cb=!1;f.Sk="";f.Rk="";f.Qk="";f.Fj=!1;f.Ch=1;f.Cn=!1;f.rm=0;f.we=0;f.uo=!1;f.zk=!1;f.Lm=3;f.ni="";f.Da="";f.Tk=!1;f.kg=!1;f.jm=!1;f.rf=0;f.Ze=!1;f.Tm=!1;f.cg=0;f.kf=!1;f.km=!0;f.rj=!1;f.Gn=!1;f.Fb=!1;f.Bk=!1;f.Qd=!1;f.In=!1;f.Ck=!1;f.bk=0;f.ta=0;f.xh=0;f.jk=!1;f.Bl="";f.im=!1;f.ij=!1;f.tm=0;f.lm=!1;f.Sm=!1;f.xa=0;f.gj=null;f.mf=null;f.Ej=!1;f.If=!1;f.nf=null;f.gk=1;f.Ce=0;f.El=null;f.nm=!1;f.Jj=0;f.Im=NaN;
170 function Jh(a,b){var c=b||{};c.iv_read_url&&(a.Sk=qk(c.iv_read_url));c.iv_invideo_url&&(a.Rk=qk(c.iv_invideo_url));c.iv_cta_url&&(a.Qk=qk(c.iv_cta_url));a.author=U(a.author,c.author);a.zk=T(a.zk,c.cc_asr);a.ni=tl(a.ni,c.ttsurl);a.Da=U(a.Da,c.cpn);a.g=U(a.g,c.subscribed);a.title=U(a.title,c.title);a.ia=U(a.ia,c.ypc_preview);a.jk=T(a.jk,c.paygated);c.keywords&&(a.ya=km(c.keywords));c.rvs&&(a.Qc=lm(c.rvs));c.poster&&(a.Bl=c.poster);z(jm,function(a){a in c&&(this.b[a]=c[a])},a)}
171 function hm(a,b){var c=b||{};a.cb="1"!=c.hlsdvr||Vi||Si&&5>Wi?!1:!0;a.Fj="1"==c.infringe||"1"==c.muted;a.Fn=c.authkey;a.Ea=c.authuser;a.Da||(a.Da=c.cpn||pl());a.Nc=c.csi_page_type;a.Na=c.sw;a.Ta=T(a.Ta,c.dto);a.nd=c.t;a.Tk=T(a.Tk,c.cenchd);a.kg="1"==c.enable_cardio;a.jm="1"==c.enable_cardio_before_playback;a.rf=void 0==(c.end||c.endSeconds)?a.rf:Number(c.end||c.endSeconds);a.km="1"!=c.no_get_video_log;a.rj="1"==c.tmi;a.Gn="1"==c.livemonitor;a.Fb="1"==c.live_playback;a.Bk=T(a.Bk,c.mdx);a.Ck=T(a.Ck,
172 c.utpsa);a.Co=c.iurlmaxres;a.G=U(a.G,c.oauth_token);a.U=U(a.U,c.vvt);a.md=c.osig;a.ib=c.ptchn;a.oc=c.oid;a.A=c.ptk;a.mc=c.pltype;a.eb=c.plid;a.j=c.eventid;a.Oa=U(a.Oa,c.list);a.nc=c.pyv_beacon_url;a.ue=c.purchase_id;a.ja=c.sdetail;a.te=c.sourceid;a.aa=U(a.aa,c.feature);a.bb=1==(void 0==c.is_fling?a.bb?1:0:Number(c.is_fling));a.ma=U(a.ma,c.ytr);a.Do=c.iurlsd;a.nm="1"==c.skip_kansas_logging;a.mf=sl(a.mf,c.vq||c.suggestedQuality,ek);a.ve=c.approx_threed_layout||0;a.Ej="1"==c.threed_converted;a.Li=c.iurl;
173 a.ij="1"==c.sendtmp;a.lm=!!a.Na||a.ij;a.xa=void 0==(c.start||c.startSeconds)?a.xa:Number(c.start||c.startSeconds);a.L=c.docid||c.video_id||c.videoId;mm(a,c.watermark);a.Mc=U(a.Mc,c.ypc_gid);a.Jc=U(a.Jc,c.ypc_license_session_token);if(c.ad3_module||c.ad_module)"1"==c.allow_html5_ads?(a.ca=!0,"1"==c.ad_preroll&&a.I.push("ad")):"1"==c.supported_without_ads||c.cta&&c.fexp&&(-1!=c.fexp.indexOf("924604")||-1!=c.fexp.indexOf("924610"))||(a.Tm=!0);c.adaptive_fmts&&(a.Sa=nm(a,c.adaptive_fmts));c.allow_embed&&
174 (a.Ao="1"==c.allow_embed);c.autoplay&&(a.kf="1"==c.autoplay);c.iv_load_policy&&(a.fa=om(c.iv_load_policy,a.fa));c.cc_load_policy&&(a.Lm=om(c.cc_load_policy,2));c.dash&&void 0===a.X&&(a.X="1"==c.dash);if(c.dashmpd){a.M=S(c.dashmpd,{cpn:a.Da});var d=/\/s\/([0-9A-F.]+)/,e=d.exec(a.M);e&&(e=Xj(e[1]),a.M=a.M.replace(d,"/signature/"+e))}c.delay&&(a.K=Ca(c.delay));c.idpj&&(a.cg=Ca(c.idpj));c.url_encoded_fmt_stream_map&&(a.O=nm(a,c.url_encoded_fmt_stream_map));c.hlsvp&&(d=rl(c.hlsvp,a.Da,c.fexp&&-1!=c.fexp.indexOf("934005")&&
175 !c.on3g),a.O.push(d));c.length_seconds&&(a.ta=Ca(c.length_seconds));c.ldpj&&(a.xh=Ca(c.ldpj));c.loudness&&(a.za=c.loudness,a.Ch=-15<a.za&&0>a.za?Math.pow(10,(-18-a.za)/20):1);c.partnerid&&(a.pd=Ca(c.partnerid));c.pyv_billable_url&&pk(c.pyv_billable_url,nk)&&(a.P=c.pyv_billable_url);c.pyv_conv_url&&pk(c.pyv_conv_url,nk)&&(a.Ka=c.pyv_conv_url);c.url_encoded_third_party_media&&(a.nf=lm(c.url_encoded_third_party_media));c.threed_module&&!c.threed_converted&&(a.Q=c.threed_module,a.Lc=6);if("1"==c.track_embed||
176 c.tk)a.im=!0;c.watch_ajax_token&&df("watch_actions_ajax",c.watch_ajax_token);c.fresca_preroll&&a.I.push("fresca");c.ypc_clickwrap_module&&a.I.push("ypc_clickwrap");void 0!=c.start&&(a.Jj=c.start);void 0!=c.end&&(a.Im=c.end);a.Kc=U(a.Kc,c.ucid);z(["baseUrl","uid","oeid","ieid","ppe"],function(a){this.i[a]=c[a]},a);a.i.focEnabled="1"==c.focEnabled;a.i.rmktEnabled="1"==c.rmktEnabled;a.rm=pm(c.rmktPingThreshold,c.length_seconds);a.b=c;Jh(a,c);a.X&&qm(a)}
177 function qm(a){if(cj("android")&&cj("chrome")&&!rc(29)?0:window.MediaSource||window.WebKitMediaSource||HTMLMediaElement.prototype.webkitSourceAddId)if(a.Sa)a.B=Tk(a.Sa);else if(a.M){var b={format:"RAW",method:"GET",Z:a,Qa:a.ax,onError:a.wl};a.Ze=!0;a=qk(a.M);Qj(a,b)}}
178 f.ax=function(a){if(!this.ha()){if(200<=a.status&&400>a.status){var b=new Rk;t:{a=a.responseText;a=(new DOMParser).parseFromString(a,"text/xml").getElementsByTagName("MPD")[0];var c;if(c=Vk(a,"mediaPresentationDuration")){var d=Sk.exec(c);c=d?3600*parseFloat(d[2]||0)+60*parseFloat(d[4]||0)+parseFloat(d[6]||0):parseFloat(c)}else c=0;b.duration=c;a=a.getElementsByTagName("Representation");for(c=0;c<a.length;c++){var d=a[c],e=Vk(d,"id"),g=Vk(d,"mimeType"),h=Vk(d,"codecs"),g=h?g+'; codecs="'+h+'"':g,
179 h=parseInt(Vk(d,"bandwidth"),10)/8,k=null;dk(g)&&(k=new fk(parseInt(Vk(d,"width"),10),parseInt(Vk(d,"height"),10)));var m=null;ck(g)&&(m=new Zj);var p=null,s=Wk(d,"ContentProtection");if(s)if((p=s.attributes.schemeIdUri)&&"http://youtube.com/drm/2012/10/10"==p.textContent)for(p={},s=s.firstChild;null!=s;s=s.nextSibling)"yt:SystemURL"==s.nodeName&&(p[s.attributes.type.textContent]=s.textContent.trim());else p=null;e=new ak(e,g,m,k,p,h);g=Uk(Wk(d,"BaseURL").textContent,e);h=Wk(d,"SegmentBase");d=jk(h.attributes.indexRange.value);
180 h=jk(h.getElementsByTagName("Initialization")[0].attributes.range.value);d=new Ok(g,e,h,d);if(!d){a=!1;break t}b.a[d.info.Pa]=d}a=!0}if(this.B=a?b:null)this.ta=this.B.duration||this.ta}this.wl()}};f.wl=function(){this.ha()||(this.Ze=!1,this.u("dataloaded",this.b))};function rm(a,b,c,d){fm(a.B,sm(a),v(function(a){this.ha()||(a.length?(this.k=a,this.u("dataupdated"),b()):(this.X=!1,tm(this,b,c)))},a),c,a.Tk,d)}
181 function tm(a,b,c){a.k=a.nf&&a.In?em(a.nf,c):dm(a.O,!!a.Q||a.If,c);H(v(function(){this.ha()||(this.u("dataupdated"),b&&b())},a),0)}function um(a){a=Ka(a.k,function(a){return a.We()});db(a);return a.concat(["auto"])}function vm(a,b){var c=null;a.k.some(function(a){if(a.We()==b)return c=a,!0});return c}function wm(a){var b=a.o&&a.o.i;if(!b)return null;w(b.g,sm(a));return b}function sm(a){var b={};a.A&&(b.ptk=a.A,b.oid=a.oc,b.ptchn=a.ib,b.pltype=a.mc);return b}
182 function xm(a,b){return u(a.ya[b])?a.ya[b]:null}function ym(a){!a.El&&a.b.storyboard_spec&&(a.El=new $k(a.b.storyboard_spec));return a.El}function zm(a){var b=ym(a);!a.gj&&b&&(a.gj=new zl(b),L(a,a.gj));return a.gj}function Am(a,b){var c={format:"RAW",method:"GET",Z:a,Qa:a.rx};a.Ze=!0;Qj(b,c)}f.rx=function(a){this.ha()||(this.Ze=!1,a=Fj(a.responseText),"fail"==a.status?this.u("onStatusFail",a):(hm(this,a),this.Ze||this.wl()))};function om(a,b){var c=parseInt(a,10);return Ib(dl,c)?c:b}
183 function lm(a){a=a.split(",");return a=a.map(function(a){return Fj(a)})}function nm(a,b){var c=lm(b);z(c,function(a){a.url&&(a.url=S(a.url,{cpn:this.Da}))},a);return c}function km(a){var b={};z(a.split(","),function(a){var d=a.split("=");2==d.length?b[d[0]]=d[1]:b[a]=!0});return b}function mm(a,b){if(b){var c=b.split(",");2<=c.length&&(a.Ma=c[1],a.Oc=c[0])}}function Bm(a,b){return!!a.b[b]}function pm(a,b){var c=Ca(b),d=Ca(a);return isNaN(d)||isNaN(c)?0:Math.min(d,c)};function Cm(a,b){this.type=a||"";this.id=b||""}Cm.prototype.toString=function(){return this.type+this.id};function Dm(a){R.call(this);this.a=[];this.b=[];this.ua=Math.max(0,a.index||0);this.loop=!!a.loop;this.xa=a.startSeconds||0;this.Mn="1"==a.mob;this.title=a.playlist_title||"";a.video_id&&(this.a[this.ua]=new mh(a));a.api&&("string"==typeof a.api&&16==a.api.length?a.list="PL"+a.api:a.playlist=a.api);if(a.list)switch(a.listType){case "user_uploads":Em(this,a.list);break;case "user_favorites":Fm(this,a.list);break;case "search":Gm(this,a.list);break;default:a.playlist_length&&(this.Mb=a.playlist_length),
184 this.g=new Cm(a.list.substr(0,2),a.list.substr(2)),this.Yg||Hm(this,"/list_ajax?style=json&action_get_list=1",{list:this.g})}else if(a.playlist){var b=a.playlist.toString().split(",");0<this.ua&&(this.a=[]);z(b,function(a){a&&this.a.push(new mh({video_id:a}))},this);this.Mb=this.a.length;this.Zd=!0}else a.videoList&&(0<this.ua&&(this.a=[]),z(a.videoList,function(a){this.a.push(new mh(a))},this),this.Mb=this.a.length,this.Zd=!0);xh(this,!!a.shuffle);a.suggestedQuality&&(this.i=a.suggestedQuality)}
185 y(Dm,R);f=Dm.prototype;f.loop=!1;f.xa=0;f.Jo=!1;f.ua=0;f.title="";f.Mb=0;f.Mn=!1;f.Zd=!1;f.Yg=!1;f.Ae=null;function Im(a){if(++a.ua>=a.Mb)if(a.loop)a.ua=0;else return null;wh(a,a.ua);return vh(a,a.ua)}function Jm(a){if(0>--a.ua)if(a.loop)a.ua=a.Mb-1;else return null;wh(a,a.ua);return vh(a,a.ua)}function vh(a,b){var c=void 0!=b?b:a.ua;if(c=a.a&&c in a.a?a.a[a.b[c]]:null)c.xa=a.xa||c.Jj||0;return c}
186 function xh(a,b){a.Jo=b;var c=a.b&&null!=a.b[a.ua]?a.b[a.ua]:a.ua;a.b=[];for(var d=0;d<a.a.length;d++)a.b.push(d);a.ua=c;if(a.Jo){c=a.b[a.ua];for(d=1;d<a.b.length;d++){var e=Math.floor(Math.random()*(d+1)),g=a.b[d];a.b[d]=a.b[e];a.b[e]=g}for(d=0;d<a.b.length;d++)a.b[d]==c&&(a.ua=d)}a.u("shuffle")}function wh(a,b){a.ua=vb(b,0,a.Mb-1);a.xa=0}function Km(a){return a.Mb}function Em(a,b){a.Yg||(a.g=new Cm("UU","PLAYER_"+b),Hm(a,"/list_ajax?style=json&action_get_user_uploads_by_user=1",{username:b}))}
187 function Fm(a,b){a.Yg||(a.g=new Cm("FL","PLAYER_"+b),Hm(a,"/list_ajax?style=json&action_get_favorited_by_user=1",{username:b}))}function Gm(a,b){if(!a.Yg){a.g=new Cm("SR",b);var c={search_query:b};a.Mn&&(c.mob="1");Hm(a,"/search_ajax?style=json&embeddable=1",c)}}function Hm(a,b,c){Qj(S(b,c),{format:"JSON",Qa:function(a,b){Lm(this,b)},Z:a})}
188 function Lm(a,b){if(b.video&&b.video.length){a.title=b.title;a.description=b.description;a.views=b.views;a.author=b.author;var c=vh(a);a.ua=0;a.a=[];z(b.video,function(a){a&&(a.video_id=a.encrypted_id,c&&a.video_id==c.L&&(this.ua=this.a.length),this.a.push(new mh(a)))},a);a.Mb=a.a.length;xh(a,!1);a.Yg=!1;a.Zd=!0;a.Ae&&a.Ae()}}f.F=function(){this.Ae=null;Tg(this.a);Dm.C.F.call(this)};var Mm=!!l.DOMTokenList,Nm=Mm?function(a){return a.classList}:function(a){a=a.className;return u(a)&&a.match(/\S+/g)||[]},Om=Mm?function(a,b){return a.classList.contains(b)}:function(a,b){return Sa(Nm(a),b)},V=Mm?function(a,b){a.classList.add(b)}:function(a,b){Om(a,b)||(a.className+=0<a.className.length?" "+b:b)},Pm=Mm?function(a,b){z(b,function(b){V(a,b)})}:function(a,b){var c={};z(Nm(a),function(a){c[a]=!0});z(b,function(a){c[a]=!0});a.className="";for(var d in c)a.className+=0<a.className.length?
189 " "+d:d},W=Mm?function(a,b){a.classList.remove(b)}:function(a,b){Om(a,b)&&(a.className=Ja(Nm(a),function(a){return a!=b}).join(" "))},Qm=Mm?function(a,b){z(b,function(b){W(a,b)})}:function(a,b){a.className=Ja(Nm(a),function(a){return!Sa(b,a)}).join(" ")};function X(a,b,c){c?V(a,b):W(a,b)}function Rm(a,b){var c=!Om(a,b);X(a,b,c);return c};function Sm(a,b){this.Zf=a;this.jf=b+"::"}y(Sm,Pf);f=Sm.prototype;f.Zf=null;f.jf="";f.set=function(a,b){this.Zf.set(this.jf+a,b)};f.get=function(a){return this.Zf.get(this.jf+a)};f.remove=function(a){this.Zf.remove(this.jf+a)};f.Nd=function(a){var b=this.Zf.Nd(!0),c=this,d=new Rd;d.next=function(){for(var d=b.next();d.substr(0,c.jf.length)!=c.jf;)d=b.next();return a?d.substr(c.jf.length):c.Zf.get(d)};return d};function Tm(a){R.call(this);this.a=a;if(this.zl){a="yt-html5-player-modules::"+this.zl;var b=new Rf;if(a=b.isAvailable()?a?new Sm(b,a):b:null)this.o=new Tf(a)}}y(Tm,R);f=Tm.prototype;f.qa="";f.hd="";f.je=!1;f.ba=!1;f.Bc=null;f.zf=function(a){var b=$a(arguments),c=v(this.xc,this),d=v(this.$c,this);z(b,function(a){a.namespace=this.qa;a.zb.D("onEnter",c);a.zb.D("onExit",d)},this);this.u("command_add_cuerange",b,this.a.a)};f.qv=function(a){var b=$a(arguments);this.u("command_remove_cuerange",b,this.a.a)};
190 function Um(a){a.u("command_remove_cuerange_all",a.qa,a.a.a)}function Vm(a){a.u("command_preroll_ready",a.qa,a.a.a)}function Wm(a,b){V(b,a.qa);a.a.app.S.U.appendChild(b)}function Xm(a){a.u("command_show_dialog_area")}function Ym(a){a.u("command_hide_all_dialogs")}f.create=function(){var a=this.qa+"-created";this.Xa(this.a);Om(Q(this.a),a);V(Q(this.a),a);this.je=!0};f.destroy=function(){this.unload();W(Q(this.a),this.qa+"-created");this.je=!1};
191 f.load=function(){V(Q(this.a),this.qa+"-loaded");this.u("loaded",this.qa)};f.unload=function(){W(Q(this.a),this.qa+"-loaded");this.u("unloaded",this.qa)};f.xc=function(){};f.$c=function(){};f.oe=function(){};f.log=function(a){this.u("command_log",this.hd,a)};function Zm(a,b,c){var d={},e;for(e in b)d[a.qa+"_"+e]=b[e];b={};for(var g in c)b[a.qa+"_"+g]=c[g];a.u("command_log_timing",d,b)}f.Ri=function(){return null};
192 function $m(a,b){if(!a.o)return null;var c;try{c=a.o.get(b)}catch(d){a.o&&a.o.remove(b)}return c}function an(a,b,c){if(a.o)try{a.o.set(b,c)}catch(d){}}function bn(a,b){a.u("command_disable_controls",b,a.qa)}function cn(a,b){a.u("command_enable_controls",b,a.qa)}function dn(a){a.u("command_stop_redirect_controls")}function en(a){a.u("command_play",!1,a.a.a)}function fn(a){a.u("command_pause",!1,a.a.a)}f.kb=function(a){this.u("command_redirected_show_is_playing",a)};f.nq=function(){};f.hp=function(){return[]};
193 f.Xa=function(){return!1};f.Ho=function(a,b){this.Bc&&this.Bc.oe&&this.Bc.oe.apply(this.Bc,arguments)};f.Zh=function(){};function gn(a,b){this.a=a;this.zb=b;this.Kf=E("html5-endscreen",Q(this.a));V(this.Kf,this.Dl);this.Tf=E("html5-endscreen-content",Q(this.a))}f=gn.prototype;f.Dl="base-endscreen";f.Kf=null;f.Tf=null;f.zb=null;f.je=!1;f.create=function(){this.je=!0};f.destroy=function(){this.je=!1};f.load=function(){};function hn(a){this.a={};this.g={};this.i={};this.b=jn(this,a)}y(hn,K);function jn(a,b,c){var d=0,e=Uc(b[d++]);if(u(b[d])||t(b[d])||null===b[d]){var g=b[d++];t(g)&&(g=g.join(" "));if(g=kn(a,e,"className",g))ln(a,e,"className",g),mn(a,g,e)}for(;d<b.length;d++){var h=b[d];if(t(h))jn(a,h,e);else if(ia(h)){var g=a,k=e,m=void 0;for(m in h)h[m]&&ln(g,k,m,kn(g,k,m,h[m]))}else u(h)&&ln(a,e,"child",kn(a,e,"child",h))}c&&c.appendChild(e);return e}f=hn.prototype;f.N=function(){return this.b};
194 function mn(a,b,c){var d=b.split(" ");if(1<d.length)for(b=0;b<d.length;b++)mn(a,d[b],c);else a.a[b]=c}f.V=function(a,b){q(b)?a.insertBefore(this.b,a.childNodes[b]||null):a.appendChild(this.b)};f.Jk=function(){F(this.b)};function kn(a,b,c,d){return u(d)&&"{{"==d.substr(0,2)?(a.g[d]=[b,c],null):d}f.update=function(a){for(var b in a)nn(this,b,a[b])};function nn(a,b,c){if(c!=a.i[b]){var d=a.g["{{"+b+"}}"];d&&(a.i[b]=c,ln(a,d[0],d[1],c))}}
195 function ln(a,b,c,d){if("child"==c){Xc(b);if(!t(d)||t(d)&&u(d[0]))d=[d];c=[];for(var e=0;e<d.length;e++){var g=d[e];null===g||(!g.nodeType||1!=g.nodeType&&3!=g.nodeType?t(g)&&u(g[0])?c.push(jn(a,g)):g.N?c.push(g.N()):c.push(Vc(g.toString())):c.push(g))}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())}f.F=function(){this.a={};this.g={};this.i={};this.Jk();this.b=null;hn.C.F.call(this)};function on(a){a&&(a.style.display="block")}function pn(a){a&&(a.style.display="none")}function qn(a,b){var c=Ve("requestAnimationFrame",window);return H(function(){c?c.call(window,a):a()},b||0)};function Z(a){this.template=new hn(a);L(this,this.template);this.element=this.template.N();this.H="block";this.K=[];this.A={}}y(Z,K);f=Z.prototype;f.N=function(){return this.element};f.V=function(a,b){this.template.V(a,b)};f.Jk=function(){this.template.Jk()};f.Aa=function(a){nn(this.template,"content",a)};f.show=function(){var a=this.element;a&&(a.style.display=this.H);this.element.removeAttribute("aria-hidden")};f.hide=function(){pn(this.element);this.element.setAttribute("aria-hidden","true")};
196 f.listen=function(a,b,c,d,e){a=J(a,b,v(c,d||this));this.K.push(a);u(e)&&this.A[e].push(a);return a};f.dc=function(a){uf(a)};f.stopPropagation=function(a){this.listen(this,a,function(a){a.stopPropagation()})};f.addEventListener=function(a,b,c){this.element.addEventListener?this.element.addEventListener(a,b,c):this.element.attachEvent&&this.element.attachEvent("on"+a,b)};
197 f.removeEventListener=function(a,b,c){this.element.removeEventListener?this.element.removeEventListener(a,b,c):this.element.detachEvent&&this.element.detachEvent("on"+a,b)};f.dispatchEvent=function(a){return this.element.dispatchEvent(a)};f.fireEvent=function(a,b){return this.element.fireEvent(a,b)};f.F=function(){this.dc(this.K);this.element=null;Z.C.F.call(this)};function rn(){Z.call(this,["div","",["div","ytp-channel-banner-container",["img","ytp-channel-banner",{src:"{{banner}}"}],["div","ytp-subscribe-curtain"]],["div","ytp-subscribe-card",["img","ytp-author-image",{src:"{{image}}"}],["div","ytp-subscribe-card-right",["div","ytp-author-name","{{author}}"],["div","html5-subscribe-button-container"]]]])}y(rn,Z);function sn(a,b,c,d,e,g,h){a&&(a={video_id:a,html5:1,page_subscribe:b?1:0},g&&(a.authuser=g),h&&(a.pageid=h),Qj("/get_video_metadata",{method:"GET",onError:d,Qa:c,yf:a,Z:e}))};function tn(a,b){gn.call(this,a,b);this.b=new rn;this.b.V(this.Kf);sn(this.a.getVideoData().L,!0,this.g,ba,this,this.a.J().Ea,this.a.J().Ua)}y(tn,gn);tn.prototype.Dl="subscribecard-endscreen";
198 tn.prototype.g=function(a,b){var c=b.user_info,d=this.a.getVideoData();d&&(d.va=c.external_id);nn(this.b.template,"banner",c.channel_banner_url);nn(this.b.template,"image",c.channel_logo_url||c.image_url);nn(this.b.template,"author",c.channel_title||c.username);d=b.video_info;d.subscription_ajax_token&&df("subscription_ajax",d.subscription_ajax_token);c=c.subscription_button_html;this.b.template.a["html5-subscribe-button-container"].innerHTML=c?c:""};function un(a,b,c){c=c||{};var d=c.Kb;d||(d=document.createElement("style"),document.getElementsByTagName("head")[0].appendChild(d),d=d.sheet||d.styleSheet);c.reset&&vn(d);b=b instanceof Array?b.join(";"):b;d.insertRule?d.insertRule(a+"{"+b+"}",d.cssRules.length):d.addRule(a,b,-1);return d}function vn(a){for(var b=(a.cssRules||a.rules).length;0<b;b--){var c=a;c.deleteRule?c.deleteRule(0):c.removeRule(0)}};function wn(a){this.W=a}y(wn,K);wn.prototype.b=null;wn.prototype.g=null;wn.prototype.a=null;function xn(a){a.b||(a.b=E("ad-container",Q(a.W)),a.W.J().ub&&V(a.b,"ad-container-single-media-element"));return a.b}function yn(a){a.a&&(a.W.J().ub?(W(a.a,"ad-video"),zn(a.W.app,a.a),a.a=null):(F(a.a),mj(a.a)))}
199 function An(a){if(!a.g){if(a.W.J().Gb){var b=Uc("button");V(b,"video-click-tracking");Wc(b,lf("VISIT_ADVERTISERS_SITE"));var c=Uc("div");V(c,"video-click-tracking-container");c.appendChild(b);xn(a).appendChild(c)}else b=Uc("div"),Pm(b,["video-click-tracking","ad-video"]),xn(a).appendChild(b);a.g=b}return a.g}wn.prototype.F=function(){wn.C.F.call(this);this.a&&(zn(this.W.app,this.a),this.a=null);yn(this);Xc(xn(this));Xc(An(this));this.g=this.b=null;delete this.W};
200 function Bn(a){if(!a.a){var b;b=a.W.app;if(b.a.ub){var c=new A(b.i.offsetLeft,b.i.offsetTop),d=Bd(b.i);b.M=new Cb(c.x,c.y,d.width,d.height);Cn(b.j);nj(b.i,1);mj(b.i);b=b.i}else b=Dn.getTag();a.a=b;Pm(a.a,["video-stream","ad-video"])}return a.a};function En(a,b,c,d){Z.call(this,["div",{className:"ytp-button",role:"button","aria-label":"{{label}}","aria-disabled":"{{disabled}}",tabindex:"{{tabindex}}"},"{{content}}"]);this.H="inline-block";this.g=a;this.M=this.a=this.o=null;this.j=!1;this.listen(this.element,"click",this.$u);this.listen(this.element,"keypress",this.av);a=this.g;var e=v(this.Zu,this);a.a&&Fn(a.a,this.element,e);b&&Gn(this,b);c&&this.Jb(c);d&&(this.a=d)}y(En,Z);
201 function Gn(a,b){b&&""!=b&&(a.o&&W(a.element,a.o),a.o=b,V(a.element,b))}f=En.prototype;f.Jb=function(a){nn(this.template,"label",a)};function Hn(a,b){a.M=b;nn(a.template,"tabindex",b)}f.Zu=function(){return this.j?null:this.a?Vc(this.a):null};f.enable=function(){this.j=!1;this.template.update({disabled:null,tabindex:this.M});W(this.element,"ytp-disabled")};f.disable=function(){this.j=!0;this.template.update({disabled:"true",tabindex:null});V(this.element,"ytp-disabled")};
202 f.$u=function(a){this.j&&(a.stopImmediatePropagation(),a.preventDefault())};f.av=function(a){if(13==a.keyCode||32==a.keyCode)a.stopPropagation(),a.preventDefault(),Af(this.element,"click")};f.F=function(){var a=this.g;if(a.a){var a=a.a,b=ja(this.element);Sg(a.a[b]);a.a[b]=null}this.g=null;En.C.F.call(this)};function In(a,b){Z.call(this,["canvas"]);this.element.width=a;this.element.height=b;this.width=a;this.height=b;this.Z=this.element.getContext("2d");this.a=0;this.j=null}y(In,Z);In.prototype.g=function(a,b){I(this.a);this.a=qn(v(this.g,this,a,b),b);a.call(this,new Date-this.j)};In.prototype.F=function(){I(this.a);this.Z=null;In.C.F.call(this)};function Jn(){In.call(this,84,84);this.b=this.width/2;this.o=this.height/2;this.i=Kn}y(Jn,In);var Kn=3*Math.PI/2,Ln=2*Math.PI;function Mn(a,b){var c=b*Ln+Kn;a.Z.beginPath();a.Z.arc(a.b,a.o,40,a.i,c,!1);a.Z.lineWidth=4;a.Z.strokeStyle="#b8b8b8";a.Z.stroke();a.i=c}
203 Jn.prototype.show=function(){Jn.C.show.call(this);this.Z.globalAlpha=0.8;this.Z.beginPath();this.Z.arc(this.b,this.o,42,0,Ln);this.Z.fillStyle="#333";this.Z.fill();var a=35*(Math.sqrt(3)/2);this.Z.save();this.Z.fillStyle="#fff";this.Z.globalAlpha=0.9;this.Z.translate(a,this.b);this.Z.beginPath();this.Z.lineTo(0,a/2);this.Z.lineTo(28,0);this.Z.lineTo(0,-a/2);this.Z.closePath();this.Z.fill();this.Z.restore();Mn(this,0)};function Nn(a){var b=Math.floor(a/86400),c=Math.floor(a%86400/3600),d=Math.floor(a%3600/60);a=Math.floor(a%60);var e="";0<b&&(e+=b+":",10>c&&(e+="0"));0<c&&(e+=c+":",10>d&&(e+="0"));e+=d+":";10>a&&(e+="0");return e+a};var On={PC:"html5-stop-propagation",pA:"html5-chromeless",$B:"html5-live-dvr-disabled",aC:"html5-live-dvr-engaged",bC:"html5-live-playback",jC:"html5-mobile",lC:"modest-branding",nC:"html5-native-controls",UC:"html5-tablet",TC:"html5-tablet-body",gC:"html5-main-video",eD:"html5-video-container",fD:"html5-video-content",gD:"html5-video-controls",hD:"ytp-fallback",iD:"ytp-fallback-content",kD:"html5-video-loader",pD:"html5-watermark",Zz:"html5-branded-watermark",oD:"html5-viewport-sheet",vA:"html5-context-menu",
204 ks:"html5-context-menu-copy-debug-info",ls:"html5-context-menu-copy-embed-html",ms:"html5-context-menu-copy-video-url",os:"html5-context-menu-copy-video-url-at-current-time",rs:"html5-context-menu-link",ts:"html5-context-menu-report-playback-issue",us:"html5-context-menu-show-video-info",wA:"html5-show-video-info-template",kC:"html5-modal-panel",RB:"html5-info-bar",Tz:"autohide-off",Uz:"autohide-on",Sz:"autohide-fade",Qz:"autohide-auto",Rz:"autohide-embeds",Vz:"autohide-seekbar",Pz:"autohide-aspect",
205 FB:"hide-controls",GB:"hide-info-bar",HB:"html5-hide-share",IB:"html5-hide-volume",nD:"video-thumbnail",yC:"html5-popup-dialog",Jz:"html5-async-progress",Kz:"html5-async-success",Iz:"html5-async-error",kA:"html5-center-overlay",IC:"ytp-scalable-icon-shrink",HC:"ytp-scalable-icon-grow",MB:"house-brand"};function Pn(a,b){(a=Jc(a))&&a.style&&(a.style.display=b?"":"none",Ec(a,"hid",!b))}function Qn(a){return(a=Jc(a))?!("none"==a.style.display||Dc(a,"hid")):!1}function Rn(a){z(arguments,function(a){Pn(a,!0)})}function Sn(a){z(arguments,function(a){Pn(a,!1)})}function Tn(a){var b=document.body;if(void 0!=b.style[a])return a;a=a.charAt(0).toUpperCase()+a.substr(1);for(var c=["Moz","Webkit","ms","O"],d=0;d<c.length;d++)if(void 0!=b.style[c[d]+a])return c[d]+a}
206 function Un(a,b,c){(a=Jc(a))&&a.style&&(b=Tn(b))&&(a.style[b]=c)};var Vn=window.location.protocol+"//i.ytimg.com/",Wn=4/3;function Xn(a,b,c){var d;switch(b.pd){case 30:d=Yn;break;default:d=Zn}return d(a,b,c)}function Zn(a,b,c){if(!c){c=a.clientHeight;a=a.clientWidth;if((900<a||600<c)&&b.Co)return b.Co;if((430<a||320<c)&&b.Do)return b.Do}return b.Li?b.Li:b.L?$n(b.L):""}function Yn(a,b){return b.Li?b.Li:b.L?S("//docs.google.com/vt",{id:b.L,authuser:b.Ea,authkey:b.Fn}):"//docs.google.com/images/doclist/cleardot.gif"}
207 function $n(a,b){return(Vn+"vi/"+escape(a)+"/"+escape(b||"hqdefault.jpg")).replace("i.","i"+(a.charCodeAt(0)%cf("THUMBNAIL_NUM_SHARDS",1)+1)+".")};function ao(a,b,c){this.b=a;(a=b||null)||(a=bo(this.b));a="("+a.join("|")+")";a=ta("__%s__",a);this.g=RegExp(a,"g");this.a=c||{}}var co=/__([a-z]+(?:_[a-z]+)*)__/g;function eo(a,b){var c=Jc(a).innerHTML,c=c.replace(/^\s*(\x3c!--\s*)?/,""),c=c.replace(/(\s*--\x3e)?\s*$/,"");return new ao(c,b,void 0)}function bo(a){var b=[],c={};a.replace(co,function(a,e){e in c||(c[e]=!0,b.push(e))});return b}
208 function fo(a,b,c,d){var e=v(function(a,e){c&&(e=c(e));return d?b[e]||this.a[e]||"":va(b[e]||this.a[e]||"")},a);return a.b.replace(a.g,e)};function go(a,b){this.W=a;this.H=b;var c=E("videowall-still-content-template",Q(this.W));this.B=eo(c);c=Uc("a");c.tabIndex=0;V(c,"videowall-still");J(c,"click",v(this.ov,this));J(c,"keypress",v(this.pv,this));this.a=c;this.o=this.W.app.S.B}f=go.prototype;
209 f.update=function(a,b){this.g=a.feature_type||"endscreen";this.j=a.id||a.video_id;this.i=a.list;var c=!1,d=!1;a.endscreen_autoplay||("episodic"==this.g?d=!0:this.i&&(c=!0));var e=Lb(a);c||d?(e.index=parseInt(e.index,10)+1,e.title||(e.title=a.playlist_title,e.author=a.playlist_author),e.playlist_length||(e.playlist_length=0)):e.duration=Nn(a.length_seconds);var g=$n(c&&a.thumbnail_ids?a.thumbnail_ids.split(",")[0]:this.j,b?"hqdefault.jpg":"mqdefault.jpg");this.a.style.backgroundImage="url("+g+")";
210 this.a.innerHTML=fo(this.B,e,void 0,!0);X(this.a,"videowall-still-featured",!!a.featured);X(this.a,"videowall-still-list",c);X(this.a,"videowall-still-episodic",d)};f.N=function(){return this.a};f.select=function(a){this.i?ho(this.W.app,this.j,a||this.g,this.i):ho(this.W.app,this.j,a||this.g)};f.Cu=function(){var a=new Date-this.A;1E4>a?(Mn(this.b,a/1E4),a=1E4-a,E("videowall-still-listlabel-autoplay-message",this.a).innerHTML=mf("AUTOPLAY_MESSAGE",Math.ceil(a/1E3))):(hf(this.k),this.select("autoplay"))};
211 f.Du=function(a){var b=gd(a.target,"videowall-still-listlabel-autoplay"),c=E("autoplay-play-canvas",this.a);V(b,"videowall-still-listlabel-autoplay-hide");V(c,"autoplay-play-canvas-hide");X(this.a,"videowall-still-autoplay",!1);a.stopPropagation();this.H.log({cancelButtonClick:"1"});hf(this.k)};f.ov=function(){this.select()};f.pv=function(a){switch(a.keyCode){case 13:case 32:this.select(),a.preventDefault()}};function io(a,b,c){gn.call(this,a,b);this.ll=[];this.zb.D("onResize",this.Tv,this);this.zb.D("videodatachange",this.Uv,this);this.b=c}y(io,gn);f=io.prototype;f.Dl="videowall-endscreen";f.ph=null;f.rb=null;f.ll=null;f.dp=!1;f.qh=0;f.create=function(){io.C.create.call(this);this.rb=this.a.getVideoData().Qc;jo(this)};f.destroy=function(){this.Tf.innerHTML="";delete this.rb;io.C.destroy.call(this)};
212 f.load=function(){if(this.rb&&this.rb.length&&this.rb[0].endscreen_autoplay){var a=ko(this,0);a.b=new Jn;V(a.b.element,"autoplay-play-canvas");a.b.V(a.a);a.b.show();X(a.a,"videowall-still-autoplay",!0);var b=E("videowall-still-listlabel-autoplay",a.a),c=new En(a.o);c.V(b);Gn(c,"videowall-still-listlabel-autoplay-cancel");c.Aa(a.o.getMsg("YTP_BUTTON_CANCEL"));c.show();J(c,"click",v(a.Du,a));a.H.log({cancelButtonShow:"1"});a.A=new Date;a.k=gf(v(a.Cu,a),50)}};
213 function jo(a){if(a.rb&&a.rb.length){X(a.Kf,"endscreen-enable-layout",!0);a.Tf.innerHTML="";var b=Bd(a.Kf);Om(Q(a.a),"ad-showing")&&(b.height-=200);b.height-=30;var c=Math.floor(b.width/158),d=Math.floor(b.height/(158/1.45));if(1>d||1>c)a.qh=0;else{var e=a.rb.length,g=!1,h="episodic"==a.rb[0].feature_type,k=a.rb[0].endscreen_autoplay;(a.rb[0].featured||h||k)&&2<d&&2<c&&(g=!0,e+=3);X(a.Tf,"feature-video",g);for(var k=h=0,m=Ab(b),p=!0;0<=e&&(h<c||k<d);){var s=e>=k,r=e>=h;if(p&&r||!s&&r)e-=h,k++;else if(s)e-=
214 k,h++;else break;p=1.45*(h/k)>m}a.dp=p;c=new B(h,k);a.dp?(d=1/c.width,b=b.width*d,d=b/1.45):(d=1/c.height,d*=b.height,b=1.45*d);b=new B(Math.floor(b),Math.floor(d));a.qh=c.width*c.height;g&&(a.qh-=3);a.ph&&vn(a.ph);g=lo(b);d={Kb:a.ph};a.ph=un(".videowall-still",g,d);g=lo(b.clone().scale(2));d.Kb=a.ph;un(".feature-video .videowall-still:first-child",g,d);zd(a.Tf,b.width*c.width,b.height*c.height)}g=0;for(b=a.qh;g<b;g++)c=ko(a,g),a.Tf.appendChild(c.N());X(a.Kf,"endscreen-enable-layout",!1)}}
215 function ko(a,b){var c=a.ll[b];c||(c=new go(a.a,a.b),a.ll[b]=c);c.update(a.rb[b],0==b&&a.rb[0].featured);return c}function lo(a){return["width:"+a.width+"px","height:"+a.height+"px"]}f.Tv=function(){jo(this)};f.Uv=function(){var a=this.a.getVideoData().Qc;this.rb!=a&&(this.rb=a,jo(this))};function mo(a){Tm.call(this,a);a.J().yl?this.Sf=new tn(this.a,this.H):a.J().wc?this.Sf=new io(this.a,this.H,this):this.Sf=new gn(this.a,this.H)}y(mo,Tm);f=mo.prototype;f.qa="endscreen";f.hd="end";f.Sf=null;function no(a){var b=a.J(),c=a.getVideoData();a=1==O(a.app).B;return oo(b)&&!Bm(c,"ypc_module")&&a}f.Xa=function(a){return no(a)};
216 f.create=function(){mo.C.create.call(this);var a=Math.max(1E3*(this.a.getVideoData().ta-10),0),a=new Zh(a,2147483647,{id:"preload"}),b=new Zh(2147483647,2147483647,{id:"load",priority:6});this.zf(a,b)};f.destroy=function(){Um(this);this.Sf.destroy();mo.C.destroy.call(this)};f.load=function(){mo.C.load.call(this);this.Sf.load();this.ba=!0};f.unload=function(){mo.C.unload.call(this);this.ba=!1};f.xc=function(a){mo.C.xc.call(this,a);"preload"==a.getId()?this.Sf.create():po(this.a.app)||this.load()};
217 f.$c=function(a){"load"==a.getId()&&this.unload();mo.C.$c.call(this,a)};function qo(a){return no(a)?new mo(a):null};var ro={created:1,ready:2,testing:4,"testing-starting":3,live:6,"live-starting":5,complete:8,"complete-starting":7};/*
218 Portions of this code are from MochiKit, received by
219 The Closure Authors under the MIT license. All other code is Copyright
220 2005-2009 The Closure Authors. All Rights Reserved.
221 */
222 function so(a,b){this.o=[];this.M=a;this.K=b||null;this.k=this.g=!1;this.j=void 0;this.G=this.kv=this.A=!1;this.H=0;this.i=null;this.B=0}so.prototype.cancel=function(a){if(this.g)this.j instanceof so&&this.j.cancel();else{if(this.i){var b=this.i;delete this.i;a?b.cancel(a):(b.B--,0>=b.B&&b.cancel())}this.M?this.M.call(this.K,this):this.G=!0;this.g||this.a(new to)}};so.prototype.I=function(a,b){this.A=!1;uo(this,a,b)};function uo(a,b,c){a.g=!0;a.j=c;a.k=!b;vo(a)}
223 function wo(a){if(a.g){if(!a.G)throw new xo;a.G=!1}}so.prototype.b=function(a){wo(this);uo(this,!0,a)};so.prototype.a=function(a){wo(this);uo(this,!1,a)};function yo(a,b,c,d){a.o.push([b,c,d]);a.g&&vo(a);return a}function zo(a){var b=new so;yo(a,b.b,b.a,b);return b}function Ao(a){return La(a.o,function(a){return ha(a[1])})}
224 function vo(a){a.H&&a.g&&Ao(a)&&(l.clearTimeout(a.H),delete a.H);a.i&&(a.i.B--,delete a.i);for(var b=a.j,c=!1,d=!1;a.o.length&&!a.A;){var e=a.o.shift(),g=e[0],h=e[1],e=e[2];if(g=a.k?h:g)try{var k=g.call(e||a.K,b);q(k)&&(a.k=a.k&&(k==b||k instanceof Error),a.j=b=k);b instanceof so&&(d=!0,a.A=!0)}catch(m){b=m,a.k=!0,Ao(a)||(c=!0)}}a.j=b;d&&(yo(b,v(a.I,a,!0),v(a.I,a,!1)),b.kv=!0);c&&(a.H=l.setTimeout(Qb(b),0))}function xo(){qa.call(this)}y(xo,qa);xo.prototype.message="Deferred has already fired";
225 xo.prototype.name="AlreadyCalledError";function to(){qa.call(this)}y(to,qa);to.prototype.message="Deferred was canceled";to.prototype.name="CanceledError";function Bo(a,b){var c=b||{},d=c.document||document,e=Uc("SCRIPT"),g={Uo:e,vc:void 0},h=new so(Co,g),k=null,m=null!=c.timeout?c.timeout:5E3;0<m&&(k=window.setTimeout(function(){Do(e,!0);h.a(new Eo(1,"Timeout reached for loading script "+a))},m),g.vc=k);e.onload=e.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(Do(e,c.iv||!1,k),h.b(null))};e.onerror=function(){Do(e,!0,k);h.a(new Eo(0,"Error while loading script "+a))};Mc(e,{type:"text/javascript",charset:"UTF-8",
226 src:a});Fo(d).appendChild(e);return h}function Fo(a){var b=a.getElementsByTagName("HEAD");return!b||Ta(b)?a.documentElement:b[0]}function Co(){if(this&&this.Uo){var a=this.Uo;a&&"SCRIPT"==a.tagName&&Do(a,!0,this.vc)}}function Do(a,b,c){null!=c&&l.clearTimeout(c);a.onload=ba;a.onerror=ba;a.onreadystatechange=ba;b&&window.setTimeout(function(){F(a)},0)}function Eo(a,b){var c="Jsloader error (code #"+a+")";b&&(c+=": "+b);qa.call(this,c);this.code=a}y(Eo,qa);function Go(a,b){this.b=new qe(a);this.a=b?b:"callback";this.vc=5E3}var Ho=0;Go.prototype.send=function(a,b,c,d){a=a||null;d=d||"_"+(Ho++).toString(36)+x().toString(36);l._callbacks_||(l._callbacks_={});var e=this.b.clone();if(a)for(var g in a)a.hasOwnProperty&&!a.hasOwnProperty(g)||Fe(e,g,a[g]);b&&(l._callbacks_[d]=Io(d,b),Fe(e,this.a,"_callbacks_."+d));b=Bo(e.toString(),{timeout:this.vc,iv:!0});yo(b,null,Jo(d,a,c),void 0);return{Ba:d,kc:b}};
227 Go.prototype.cancel=function(a){a&&(a.kc&&a.kc.cancel(),a.Ba&&Ko(a.Ba,!1))};function Jo(a,b,c){return function(){Ko(a,!1);c&&c(b)}}function Io(a,b){return function(c){Ko(a,!0);b.apply(void 0,arguments)}}function Ko(a,b){l._callbacks_[a]&&(b?delete l._callbacks_[a]:l._callbacks_[a]=ba)};function Lo(a){R.call(this);this.g=fo(new ao("http://gdata.youtube.com/feeds/api/users/live/broadcasts/__video_id__/states?v=2&alt=json-in-script"),{video_id:a});this.a=new Ei(15E3+Math.floor(3E4*Math.random()));this.a.addEventListener("tick",v(this.b,this));this.b();this.a.start()}y(Lo,R);Lo.prototype.F=function(){this.a.dispose();Lo.C.F.call(this)};Lo.prototype.b=function(){(new Go(this.g)).send(null,v(this.j,this),v(this.i,this))};
228 Lo.prototype.j=function(a){this.u("payload",a);Fi(this.a,15E3+Math.floor(3E4*Math.random()))};Lo.prototype.i=function(){this.u("error");var a=this.a.a;192E4>a&&Fi(this.a,2*a)};function Mo(){this.g=new hn(["div","html5-fresca-module",["div","html5-fresca-band-slate",["hgroup","html5-fresca-message",["h2","html5-fresca-heading","{{heading}}"],["h3","html5-fresca-subheading","{{subheading}}"],["h4","html5-fresca-long-test","{{long_text}}"]],["span","html5-fresca-countdown","{{countdown}}"]]]);L(this,this.g);this.b=this.g.a["html5-fresca-module"];V(this.b,"html5-stop-propagation");this.i=0;this.a=null}y(Mo,K);Mo.prototype.N=function(){return this.b};
229 Mo.prototype.update=function(a){if(!this.k||this.a.state!=a.state||this.a.startTime!=a.startTime||this.a.b!=a.b||this.a.a.join()!=a.a.join()){this.a=a;this.b.style.backgroundImage=this.a.b||"none";a=this.a.a;if(!a.length){t:switch(this.a.state){case 6:a="";break t;case 8:case 7:a=lf("FRESCA_COMPLETE_MESSAGE");break t;default:a=lf("FRESCA_STAND_BY_MESSAGE")}a=[a]}this.g.update({heading:a[0]||"",subheading:a[1]||"",long_text:a[2]||""});this.j()}};
230 function No(a){var b=Math.floor((new Date).valueOf()/1E3);return b>a?lf("FRESCA_STARTING_SOON_MESSAGE"):Nn(a-b)}Mo.prototype.j=function(){var a;a=this.a;a.startTime?(a=a.state,a=6==a||8==a||7==a?!1:!0):a=!1;X(this.b,"html5-fresca-show-countdown",a);a&&(this.g.update({countdown:No(this.a.startTime)}),I(this.i),this.i=H(v(this.j,this),1E3))};Mo.prototype.F=function(){I(this.i);this.b=null;Mo.C.F.call(this)};function Oo(a){this.a=[];a&&Po(this,a)}Oo.prototype.state=-1;function Po(a,b){var c=b.feed;if(c){var d=c.yt$lifeCycleState;d&&(a.state=ro[d.$t]||-1);(d=c.yt$when)&&d.start&&(d=new Date(d.start),a.startTime=Math.floor(d.valueOf()/1E3));if(c=c.yt$slate)c.imgUrl&&(a.b="url("+c.imgUrl+")"),(c=c.content)&&c.length&&(c=c.splice(0,3),a.a=Ka(c,function(a){return a.$t}))}};function Qo(a){Tm.call(this,a)}y(Qo,Tm);f=Qo.prototype;f.qa="fresca";f.hd="fresca";f.hi=!1;f.Pg=!1;f.Xa=function(){return Bm(this.a.getVideoData(),"fresca_module")};f.create=function(a){Qo.C.create.call(this);this.hi=this.Pg=!1;cn(this,["play_pause","seek"]);this.i=new Mo;this.a.app.S.g.appendChild(this.i.N());this.g=a||new Lo(this.a.getVideoData().L);this.g.D("payload",this.Su,this);this.g.D("error",this.Ru,this);this.D("onStateChange",this.xo,this)};
231 f.destroy=function(){this.ba&&this.unload();this.$("onStateChange",this.xo,this);Tg(this.g,this.i);Qo.C.destroy.call(this)};f.load=function(){Qo.C.load.call(this);this.ba=!0};f.unload=function(){this.ba=!1;Qo.C.unload.call(this)};f.xo=function(a){this.b&&(this.hi=P(a.state,2),(Ro(a,16)||this.hi)&&So(this,this.b))};f.Ru=function(){this.Pg||(this.b=new Oo,So(this,this.b))};f.Su=function(a){this.b=new Oo(a);6!=this.b.state||this.a.getVideoData().O.length?So(this,this.b):this.a.Xj(this.a.getVideoData().L)};
232 function So(a,b){var c=6>b.state;!c&&a.a.app.b.ga&&(b.b||b.a.length)&&(c=!0);a.hi&&!a.a.J().wc&&(c=!0);if(!a.Pg)switch(b.state){case 6:a.Pg=!0;cn(a,["play_pause","seek"]);Vm(a);break;case 8:case 7:c=a.Pg=!0}c&&a.i.update(b);c&&!a.ba?a.load():!c&&a.ba&&a.unload()}function To(a){return Bm(a.getVideoData(),"fresca_module")?new Qo(a):null};function Uo(a){this.Og=a||window;this.ee=[]}f=Uo.prototype;f.Og=null;f.ee=null;f.listen=function(a,b,c,d){c=v(c,d||this.Og);a=J(a,b,c);this.ee.push(a);return a};function Vo(a,b,c,d){d=v(d,a.Og);b=vf(b,c,d);a.ee.push(b);return b}function Wo(a,b,c){c=v(c,a.Og);b=yf(b,c,"yt-uix-button-menu-item");a.ee.push(b)}f.dc=function(a){uf(a);Wa(this.ee,a)};f.removeAll=function(){uf(this.ee);this.ee=[]};function Xo(a,b,c){this.a=a;this.i=b||0;this.b=c;this.g=v(this.du,this)}y(Xo,K);f=Xo.prototype;f.Ba=0;f.F=function(){Xo.C.F.call(this);this.stop();delete this.a;delete this.b};f.start=function(a){this.stop();this.Ba=Gi(this.g,q(a)?a:this.i)};f.stop=function(){0!=this.Ba&&l.clearTimeout(this.Ba);this.Ba=0};f.du=function(){this.Ba=0;this.a&&this.a.call(this.b)};var Yo={},Zo=null;function $o(a){a=ja(a);delete Yo[a];Kb(Yo)&&Zo&&Zo.stop()}function ap(){Zo||(Zo=new Xo(function(){bp()},20));var a=Zo;0!=a.Ba||a.start()}function bp(){var a=x();Eb(Yo,function(b){cp(b,a)});Kb(Yo)||ap()};function dp(){Bi.call(this);this.a=0;this.k=this.startTime=null}y(dp,Bi);f=dp.prototype;f.yk=function(){this.Kd("begin")};f.Qi=function(){this.Kd("end")};f.rd=function(){this.Kd("finish")};f.onStop=function(){this.Kd("stop")};f.Kd=function(a){Ci(this,a)};function ep(a,b,c,d){dp.call(this);if(!t(a)||!t(b))throw Error("Start and end parameters must be arrays");if(a.length!=b.length)throw Error("Start and end points must be the same length");this.g=a;this.o=b;this.duration=c;this.j=d;this.b=[]}y(ep,dp);f=ep.prototype;f.ed=0;
233 function fp(a){if(0==a.a)a.ed=0,a.b=a.g;else if(1==a.a)return;$o(a);var b=x();a.startTime=b;-1==a.a&&(a.startTime-=a.duration*a.ed);a.k=a.startTime+a.duration;a.ed||a.yk();a.Kd("play");-1==a.a&&a.Kd("resume");a.a=1;var c=ja(a);c in Yo||(Yo[c]=a);ap();cp(a,b)}f.stop=function(a){$o(this);this.a=0;a&&(this.ed=1);gp(this,this.ed);this.onStop();this.Qi()};f.F=function(){0==this.a||this.stop(!1);this.Kd("destroy");ep.C.F.call(this)};f.destroy=function(){this.dispose()};
234 function cp(a,b){a.ed=(b-a.startTime)/(a.k-a.startTime);1<=a.ed&&(a.ed=1);gp(a,a.ed);1==a.ed?(a.a=0,$o(a),a.rd(),a.Qi()):1==a.a&&a.ql()}function gp(a,b){ha(a.j)&&(b=a.j(b));a.b=Array(a.g.length);for(var c=0;c<a.g.length;c++)a.b[c]=(a.o[c]-a.g[c])*b+a.g[c]}f.ql=function(){this.Kd("animate")};f.Kd=function(a){Ci(this,new hp(a,this))};function hp(a,b){ai.call(this,a);this.x=b.b[0];this.y=b.b[1];this.duration=b.duration;this.state=b.a}y(hp,ai);var ip=/#(.)(.)(.)/;function jp(a){if(!kp.test(a))throw Error("'"+a+"' is not a valid hex color");4==a.length&&(a=a.replace(ip,"#$1$1$2$2$3$3"));a=a.toLowerCase();return[parseInt(a.substr(1,2),16),parseInt(a.substr(3,2),16),parseInt(a.substr(5,2),16)]}var kp=/^#(?:[0-9a-f]{3}){1,2}$/i;function lp(a,b,c,d,e){ep.call(this,b,c,d,e);this.element=a}y(lp,ep);lp.prototype.i=ba;lp.prototype.ql=function(){this.i();lp.C.ql.call(this)};lp.prototype.Qi=function(){this.i();lp.C.Qi.call(this)};lp.prototype.yk=function(){this.i();lp.C.yk.call(this)};function mp(a,b,c,d,e){if(2!=b.length||2!=c.length)throw Error("Start and end points must be 2D");lp.apply(this,arguments)}y(mp,lp);
235 mp.prototype.i=function(){this.element.style.left=Math.round(this.b[0])+"px";this.element.style.top=Math.round(this.b[1])+"px"};function np(a){return a*a*a}function op(a){return 1-Math.pow(1-a,3)};function pp(a,b,c,d,e){this.qb=a;this.element=b;this.i=c;this.g=d;this.Me=e;this.Ib=this.a=!1;this.jl=!0}function qp(a,b){b.D("onHideControls",function(){this.jl=!1;this.kh()},a);b.D("onShowControls",function(){this.jl=!0;this.kh()},a);b.D("onResize",a.kh,a)}
236 function rp(a,b){var c=Rc("div","annotation-x-button-container"),d=Rc("div","annotation-x-button");c.appendChild(d);a.i.listen(c,"click",v(function(a){var c=this.Me,d=this.qb;d&&d.i&&c.log_(sp(c,d,4));b(a);a.stopPropagation();this.Ib=!0},a));return c}f=pp.prototype;f.N=function(){return this.element};f.show=function(){};f.hide=function(){};f.destroy=function(){F(this.element)};f.kh=function(){};function tp(a,b,c,d,e){pp.call(this,a,b,c,d,e);this.b=Rc("div","invideo-video-text-container");this.j=!1}y(tp,pp);function up(a){var b=new mp(a.element,[a.element.offsetLeft,a.element.offsetTop],[a.element.offsetLeft,a.element.offsetTop-a.element.offsetHeight],300,op);ri(b,"begin",v(function(){this.a=!0},a));fp(b)}
237 function vp(a){var b=new mp(a.element,[a.element.offsetLeft,a.element.offsetTop],[a.element.offsetLeft,a.element.offsetTop+a.element.offsetHeight+4],300,np);ri(b,"end",v(function(){this.a=!1;Sn(this.element)},a));fp(b)}
238 function wp(a){zd(a.element,444,56);var b=a.qb.data,c={src:b.image_url,"class":"invideo-video-img"},d=Rc("div","invideo-video-img-container"),c=Rc("img",c);zd(c,100,56);d.appendChild(c);a.element.appendChild(d);zd(a.b,244,56);d=Rc("span","iv-subtitle-text");ad(d,b.text_line_1);a.b.appendChild(d);d=Rc("span","iv-title-text");ad(d,b.text_line_2);a.b.appendChild(d);a.element.appendChild(a.b);b=rp(a,v(function(){vp(this)},a));a.element.appendChild(b);a.i.listen(a.element,"click",v(function(){var a=xp(this.qb);
239 yp(this.Me,this.qb);window.open(a.value)},a))}tp.prototype.show=function(){if(!this.a){this.j||(wp(this),this.j=!0);this.kh();Rn(this.element);var a=this.Me,b=this.qb;b&&b.i&&a.log_(sp(a,b,2));up(this)}};tp.prototype.hide=function(){this.a&&vp(this)};tp.prototype.kh=function(){var a=this.g.Dg,b=this.g.Tc;if(a&&b){var c=Bd(this.element),d=b.height-a.top,b=c.width<b.width&&c.height<b.height,e=this.g.ob?35:5,e=this.jl?e:0;od(this.element,-a.left,this.a&&b?d-c.height-e:d)}};function zp(a,b){return null!=b&&!!b.match(a)}function Ap(a,b){for(var c in a)if(a[c]==b)return!0;return!1}function Bp(a,b,c,d){var e=new Cp;e.type=c;e.defaultValue=d;e.b=oa(zp,/.+/);return Dp(a[b],e)}function Ep(a,b,c){var d=new Cp;d.type="OPTIONAL";d.a=function(a){if(isNaN(parseInt(a,0)))return null;a=parseInt(a,0).toString(16);return"#"+"000000".substring(0,6-a.length)+a};d.b=function(a){return!!a};d.defaultValue=c;return Dp(a[b],d)}
240 function Fp(a,b,c,d){var e=new Cp;e.type=c;e.defaultValue=d;return Dp(a[b],e)}function Gp(a,b,c,d,e){var g=new Cp;g.type=d;g.defaultValue=e;g.b=oa(Ap,c);return Dp(a[b],g)}function Hp(a,b,c){var d=new Cp;d.type="OPTIONAL";d.defaultValue=c;d.b=function(a){return!0==a||!1==a};d.a=function(a){return"true"==a||"false"==a?"true"==a:a};return Dp(a[b],d)}function Ip(a,b,c){var d=new Cp;d.type="OPTIONAL";d.defaultValue=c;d.a=function(a){return parseFloat(a)};return Dp(a[b],d)}
241 function Jp(a){var b=new Cp;b.type="OPTIONAL";b.defaultValue=0;b.a=function(a){return parseInt(a,10)};return Dp(a.d,b)}function Kp(a,b,c,d,e,g,h){var k=new Cp;k.type="OPTIONAL";k.a=function(a){a=10==c?parseFloat(a):parseInt(a,c);return g&&null!=a&&!isNaN(a)?vb(a,d,e):a};k.defaultValue=h;k.b=function(a){return null!=a&&!isNaN(a)&&a>=d&&a<=e};return Dp(a[b],k)}
242 function Lp(a,b){var c=new Cp;c.type="OPTIONAL";c.defaultValue=0;c.a=function(a){if("never"==a)return-1;a=a.split(":");if(3<a.length)return null;var b=0,c=1;z(a,function(a){a=parseFloat(a);0>a&&(c=-c);b=60*b+Math.abs(a)});return c*b};return Dp(a[b],c)}function Mp(a,b){return null==b?null:a(b)}function Np(a,b,c,d,e){if(null==a||null==a[b])return null;var g=new Cp;g.type=d;g.defaultValue=e;g.b=function(a){return!!a};g.a=oa(Mp,c);return Dp(a[b],g)}
243 function Dp(a,b){var c;if("OPTIONAL"==b.type||"REQUIRED"==b.type){if(c=null==a?null:b.a(t(a)&&a.length?a[0]:a),!b.b(c)){if("REQUIRED"==b.type)throw"Required field missing.";c=null==b.defaultValue?null:b.defaultValue}}else c="REPEATED"==b.type?null!=a?Op(t(a)?a:[a],b):null!=b.defaultValue?t(b.defaultValue)?b.defaultValue:[b.defaultValue]:[]:"IDLIST"==b.type?Pp(a,b):null;return c}
244 function Pp(a,b){function c(a){return Ja(a.split(/ +/),function(a){return""!=a})}return null!=a?Op(c(a),b):null!=b.defaultValue?t(b.defaultValue)?b.defaultValue:[b.defaultValue]:[]}function Op(a,b){for(var c=[],d=0;d<a.length;++d){var e=b.a(a[d]);b.b(e)&&c.push(e)}return c.length?c:null!=b.defaultValue?t(b.defaultValue)?b.defaultValue:[b.defaultValue]:[]}function Cp(){this.a=Qp;this.b=Rp}Cp.prototype.type="OPTIONAL";Cp.prototype.defaultValue=null;function Qp(a){return null==a?null:a.toString()}
245 function Rp(a){return null!=a};function Sp(a){this.value=a}function Tp(a){a=Lp(a,"value");return new Sp(a)};function Up(){}function Vp(a){var b=Fp(a,"external_user_id","OPTIONAL");a=Fp(a,"subscription_token","OPTIONAL");return b&&a?new Up:null};function Wp(a,b,c,d){this.value=a;this.target=b;this.a=c;this.b=d}var Xp={yA:"current",oC:"new"};function Yp(a){var b=Fp(a,"value","OPTIONAL");if(null==b||null==Gj(b))return null;var c=Gp(a,"target",Xp,"OPTIONAL","current");if(null==c)return null;Hp(a,"trusted",!1);var d=Fp(a,"link_class","OPTIONAL","");a=Hp(a,"show_link_icon",!0);return new Wp(b,c,d,a)}function Zp(a){return a.value?a.value:null};function $p(a,b,c,d){this.type=a;this.trigger=b;this.url=c;this.duration=d}var aq={hy:"close",fC:"log",sC:"openUrl",PAUSE:"pause",ly:"subscribe"},bq={CLICK:"click",hy:"close",iy:"hidden",GC:"rollOut",jy:"rollOver",ky:"shown"};function cq(a){var b=Gp(a,"type",aq,"OPTIONAL"),c=Gp(a,"trigger",bq,"OPTIONAL"),d=Np(a,"url",Yp,"OPTIONAL");Np(a,"subscribeData",Vp,"OPTIONAL");a=Np(a,"duration",Tp,"OPTIONAL");return b?new $p(b,c,d,a):null};function dq(a,b,c,d,e,g,h,k,m,p,s,r,D,M){this.k=a;this.j=b;this.o=c;this.H=d;this.a=e;this.G=g;this.i=h;this.textAlign=k;this.I=m;this.A=p;this.padding=s;this.b=r;this.g=D;this.B=M}
246 function eq(a){var b=Ep(a,"fgColor","#1A1A1A"),c=Ep(a,"bgColor","#FFF"),d=Ep(a,"borderColor","#000"),e=Kp(a,"borderWidth",10,0,5,!1,0),g=Kp(a,"bgAlpha",10,0,1,!1,0.8);Kp(a,"borderAlpha",10,0,1,!1,0.2);Kp(a,"gloss",16,0,255,!1,0);var h=Ep(a,"highlightFontColor","#F2F2F2"),k=Kp(a,"highlightWidth",10,0,5,!1,3),m=Fp(a,"textAlign","OPTIONAL",""),p=Kp(a,"textSize",10,3.3,30.1,!0,3.6107),s=Fp(a,"fontWeight","OPTIONAL",""),r;r=(r=a?a.padding&&a.padding.length?a.padding[0]:a.padding:null)?new yb(parseFloat(r.top),
247 parseFloat(r.right),parseFloat(r.bottom),parseFloat(r.left)):null;r=!r||null==r.top||isNaN(r.top)||null==r.right||isNaN(r.right)||null==r.bottom||isNaN(r.bottom)||null==r.left||isNaN(r.left)?null:r;var D=Fp(a,"effects","IDLIST"),M=Kp(a,"cornerRadius",10,0,10,!0,0);a=Np(a,"gradient",fq,"OPTIONAL");return new dq(b,c,d,e,g,h,k,m,p,s,r,D,M,a)}function gq(a,b,c,d,e,g,h,k){this.j=a;this.o=b;this.k=c;this.H=d;this.a=e;this.b=g;this.g=h;this.i=k}
248 function fq(a){var b=Kp(a,"x1",10,0,100,!0,0),c=Kp(a,"y1",10,0,100,!0,0),d=Kp(a,"x2",10,0,100,!0,100),e=Kp(a,"y2",10,0,100,!0,100),g=Ep(a,"color1","#FFF"),h=Ep(a,"color2","#000"),k=Kp(a,"opacity1",10,0,100,!0,100);a=Kp(a,"opacity2",10,0,100,!0,0);return new gq(b,c,d,e,g,h,k,a)};function hq(a,b){this.a=a;this.L=b}function iq(a){var b=Fp(a,"standard_url","OPTIONAL","");Fp(a,"rollover_url","OPTIONAL","");Fp(a,"click_url","OPTIONAL","");a=Fp(a,"video_id","OPTIONAL","");return new hq(b,a)};function jq(a,b,c){var d=a.H,e=a.A,g=a.a?a.a:"xy",h=kq(c,a.j,g);a=lq(c,a.g,g);var g=640*b.width*h/100,k=360*b.height*a/100;return new Cb(0==d?640*b.left*h/100:0<d?d:c.width+d-g,0==e?360*b.top*a/100:0<e?e:c.height+e-k,g,k)}function kq(a,b,c){var d=(c="xx"==c||"xy"==c)?640:360;return(d+((c?a.width:a.height)-d)*b)/d}function lq(a,b,c){var d=(c="xy"==c||"yy"==c)?360:640;return(d+((c?a.height:a.width)-d)*b)/d};function mq(a,b,c,d,e,g,h,k,m,p,s){this.x=a;this.y=b;this.k=c;this.i=d;this.b=e;this.o=g;this.H=h;this.A=k;this.j=m;this.g=p;this.a=s}function nq(a,b){var c=Ip(a,"x",0),d=Ip(a,"y",0),e=Ip(a,"w",0),g=Ip(a,"h",0),h=Lp(a,"t"),k=Jp(a),m=Ip(a,"px",0),p=Ip(a,"py",0),s=Ip(a,"scaleSlope",1),r=Ip(a,"scaleSlopeX",s),s=Ip(a,"scaleSlopeY",s),D=Fp(a,"scaleDimension","OPTIONAL","xy");return b(c,d,e,g,h,k,m,p,r,s,D)}
249 function oq(a,b,c){c=c?oq(c,b):null;a=jq(a,new Cb(a.x,a.y,a.k,a.i),b);c?(a.top+=c.top,a.left+=c.left):(a.top+=b.top,a.left+=b.left);c=a.clone();b&&!b.contains(a)&&(a.width<b.width?c.left=vb(a.left,b.left,b.left+b.width-a.width):(c.left=b.left,c.width=b.width),a.height<b.height?c.top=vb(a.top,b.top,b.top+b.height-a.height):(c.top=b.top,c.height=b.height));return c}function pq(a){return nq(a,function(a,c,d,e,g,h,k,m,p,s,r){return new mq(a,c,d,e,g,h,k,m,p,s,r)})};function qq(a,b,c,d,e,g,h,k,m,p,s,r,D){mq.call(this,a,b,c,d,e,k,m,p,s,r,D);this.B=g;this.G=h}y(qq,mq);function rq(a){var b=Ip(a,"sx",0),c=Ip(a,"sy",0);return nq(a,function(a,e,g,h,k,m,p,s,r,D,M){return new qq(a,e,g,h,k,b,c,m,p,s,r,D,M)})};function sq(a,b,c){this.type=a;this.b=b;this.a=c}var tq={fy:"anchored",CC:"rect"};function uq(a){var b=Gp(a,"type",tq,"OPTIONAL","rect"),c=Np(a,"rectRegion",pq,"REPEATED");a=Np(a,"anchoredRegion",rq,"REPEATED");return new sq(b,c,a)}function vq(a){return a.b&&a.b.length?a.b[0]:a.a&&a.a.length?a.a[0]:null};function wq(a,b){this.b=a;this.a=b}function xq(a){Bp(a,"timeRelative","OPTIONAL");var b=Bp(a,"spaceRelative","OPTIONAL");return(a=Np(a,"movingRegion",uq,"REPEATED"))?new wq(b,a):null};function yq(a,b){this.state=a;this.a=b}var zq={vC:"playerControlShow",jy:"rollOver",ky:"shown"};function Aq(a){var b=Gp(a,"state",zq,"OPTIONAL");a=Bp(a,"ref","OPTIONAL","");return b?new yq(b,a):null};function Bq(a,b,c,d){this.a=a||[];this.g=b||[];this.i=c;this.b=d}function Cq(a){var b=Np(a,"condition",Aq,"REPEATED"),c=Np(a,"notCondition",Aq,"REPEATED"),d=Hp(a,"show_delay",!1);a=Hp(a,"hide_delay",!1);return b||c?new Bq(b,c,d,a):null}function Dq(a,b,c){z(a.a,oa(b,!1),c);z(a.g,oa(b,!0),c)};function Eq(a,b,c,d,e,g,h,k,m,p,s,r,D,M,sa,Y){this.id=a;this.author=b;this.type=c;this.style=d;this.o=e;this.a=g;this.g=h||[];this.B=k||[];this.b=m;this.G=p;this.j=s;this.H=r;this.i=D;this.k=M;this.data=sa;this.A=Y}var Fq={fy:"anchored",nA:"channel",KB:"highlightText",XB:"label",xC:"popup",MC:"speech",ly:"subscribe",XC:"title",VIDEO:"video"},Gq={zA:"custom",JB:"highlight",IMAGE:"image",PAUSE:"pause",TEXT:"text",FD:"widget"},Hq={mD:"video_relative",wC:"player_relative"};
250 function Iq(a){var b=Bp(a,"id","REQUIRED"),c=Bp(a,"author","OPTIONAL"),d=Gp(a,"type",Gq,"REQUIRED"),e=Gp(a,"style",Fq,"OPTIONAL"),g=Fp(a,"TEXT","OPTIONAL"),h=Np(a,"data",function(a){return 0!=a.length?mb(a):{}},"OPTIONAL",{}),k=Np(a,"segment",xq,"OPTIONAL"),m=Np(a,"action",cq,"REPEATED"),p=Np(a,"trigger",Cq,"REPEATED"),s=Np(a,"appearance",eq,"OPTIONAL");s||(s=eq({}));var r=Gp(a,"coordinate_system",Hq,"OPTIONAL","video_relative"),D=Np(a,"image_source",iq,"OPTIONAL"),M=Hp(a,"closeable",!0),sa=Hp(a,
251 "logable",!0),Y=Fp(a,"html_blob","OPTIONAL","");a=Fp(a,"log_data","OPTIONAL","");return b&&d?new Eq(b,c,d,e,g,k,m,p,s,r,D,M,sa,Y,h,a):null}function xp(a){return(a=Oa(a.g,function(a){return null!=a.url},void 0))?a.url:null}function Jq(a){return La(a.g,function(a){return null!=a.url&&a.url.b},void 0)}function Kq(a){return La(a.g,function(a){return"click"==a.trigger},void 0)}function Lq(a,b,c){z(a.g,b,c)}function Mq(a,b,c){z(a.B,b,c)}function Nq(a,b){Ka(a.B,b,void 0)}
252 function Oq(a){return(a=a.a?a.a.a.length?a.a.a[0]:null:null)?vq(a):null}function Pq(a,b){var c=Oq(a);return c&&b?kq(b,c.j,c.a?c.a:"xy"):1}function Qq(a,b){var c=Oq(a);return c&&b?lq(b,c.g,c.a?c.a:"xy"):1};function Rq(a,b,c){this.a={};this.b=!1;this.j="ivTrigger:"+a;this.g=c;Dq(b,function(a,b){var c=Sq(b.state,b.a);this.g.D(c,v(this.i,this,c,a));this.a[c]=!1},this)}Rq.prototype.i=function(a,b,c,d){this.a[a]=b?!c:c;a=Fb(this.a,function(a){return a});this.b!=a&&(this.b=a,this.g.u(this.j,a,d))};function Sq(a,b){var c="ivTriggerCondition:"+a;return b?c+":"+b:c};function Tq(a,b,c){this.i=a;this.qb=b;this.b=c;this.a=null;this.Ib=this.isVisible=!1;Uq(b,a)}function Uq(a,b){Nq(a,function(c){return new Rq(a.id,c,b)})}Tq.prototype.hide=function(){this.isVisible=!1;this.i.$("onResize",this.g,this);this.b.hide()};Tq.prototype.show=function(){this.isVisible=!0;this.b.show();this.i.D("onResize",this.g,this)};Tq.prototype.destroy=function(){this.i.$("onResize",this.g,this);var a=this.b;a.i.removeAll();a.na&&F(a.na);a.Fa&&a.Fa.N()&&F(a.Fa.N());Vq(this)};
253 function Vq(a){a.a&&(a.a.stop(),a.a=null)}Tq.prototype.g=function(){Wq(this.b)};function Xq(){};function Yq(a,b,c,d,e,g,h,k){this.j=a;this.o=b;this.k=c;this.H=d;this.a=e;this.b=g;this.g=q(h)?h:null;this.i=q(k)?k:null}y(Yq,Xq);function Zq(){this.ab=[];this.R=[];this.Pd=[]}Zq.prototype.Yf=null;Zq.prototype.kd=null;Zq.prototype.bj=!0;var $q=[2,2,6,6,0];f=Zq.prototype;f.clear=function(){this.ab.length=0;this.R.length=0;this.Pd.length=0;delete this.Yf;delete this.kd;delete this.bj;return this};function ar(a,b,c){0==Ga(a.ab)?a.Pd.length-=2:(a.ab.push(0),a.R.push(1));a.Pd.push(b,c);a.kd=a.Yf=[b,c]}
254 f.Ga=function(a){var b=Ga(this.ab);if(null==b)throw Error("Path cannot start with lineTo");1!=b&&(this.ab.push(1),this.R.push(0));for(b=0;b<arguments.length;b+=2){var c=arguments[b],d=arguments[b+1];this.Pd.push(c,d)}this.R[this.R.length-1]+=b/2;this.kd=[c,d]};f.close=function(){var a=Ga(this.ab);if(null==a)throw Error("Path cannot start with close");4!=a&&(this.ab.push(4),this.R.push(1),this.kd=this.Yf);return this};
255 function br(a,b,c,d,e){var g=a.kd[0]-b*Math.cos(d*Math.PI/180),h=a.kd[1]-c*Math.sin(d*Math.PI/180),g=g+b*Math.cos((d+e)*Math.PI/180),h=h+c*Math.sin((d+e)*Math.PI/180);a.ab.push(3);a.R.push(1);a.Pd.push(b,c,d,e,g,h);a.bj=!1;a.kd=[g,h]}function cr(a,b){for(var c=a.Pd,d=0,e=0,g=a.ab.length;e<g;e++){var h=a.ab[e],k=$q[h]*a.R[e];b(h,c.slice(d,d+k));d+=k}}
256 f.clone=function(){var a=new this.constructor;a.ab=this.ab.concat();a.R=this.R.concat();a.Pd=this.Pd.concat();a.Yf=this.Yf&&this.Yf.concat();a.kd=this.kd&&this.kd.concat();a.bj=this.bj;return a};f.isEmpty=function(){return 0==this.ab.length};function dr(a,b){this.A=a;this.B=null==b?1:b}y(dr,Xq);function er(a,b){this.a=a;this.b=b};function fr(a){this.b=a;this.a={}}y(fr,K);var gr=[];f=fr.prototype;f.listen=function(a,b,c,d,e){t(b)||(gr[0]=b,b=gr);for(var g=0;g<b.length;g++){var h=ri(a,b[g],c||this,d||!1,e||this.b||this);if(!h)break;this.a[h.key]=h}return this};f.dc=function(a,b,c,d,e){if(t(b))for(var g=0;g<b.length;g++)this.dc(a,b[g],c,d,e);else e=e||this.b||this,c=si(c||this),d=!!d,b=gi(a)?ni(a.gd,b,c,d,e):a?(a=ti(a))?ni(a,b,c,d,e):null:null,b&&(xi(b),delete this.a[b.key]);return this};
257 f.removeAll=function(){Eb(this.a,xi);this.a={}};f.F=function(){fr.C.F.call(this);this.removeAll()};f.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function hr(){}ca(hr);hr.prototype.a=0;hr.getInstance();function ir(a){Bi.call(this);this.o=a||Gc()}y(ir,Bi);f=ir.prototype;f.Dv=hr.getInstance();f.Ba=null;f.cf=!1;f.Nf=null;f.Il=null;f.getId=function(){return this.Ba||(this.Ba=":"+(this.Dv.a++).toString(36))};f.N=function(){return this.Nf};f.Fp=function(){this.Nf=this.o.createElement("div")};f.Vi=function(){jr(this,function(a){a.cf&&a.Vi()});this.j&&this.j.removeAll();this.cf=!1};
258 f.F=function(){this.cf&&this.Vi();this.j&&(this.j.dispose(),delete this.j);jr(this,function(a){a.dispose()});this.Nf&&F(this.Nf);this.Nf=this.Il=null;ir.C.F.call(this)};function jr(a,b){a.Il&&z(a.Il,b,void 0)};function kr(a,b,c,d,e){ir.call(this,e);this.width=a;this.height=b;this.g=c||null;this.k=d||null}y(kr,ir);kr.prototype.b=null;kr.prototype.mh=function(){return this.cf?Bd(this.N()):ga(this.width)&&ga(this.height)?new B(this.width,this.height):null};function lr(a){var b=a.mh();return b?b.width/(a.g?new B(a.g,a.k):a.mh()).width:0};function mr(a,b){Bi.call(this);this.nh=a;this.Nj=b;this[fi]=!1}y(mr,Bi);f=mr.prototype;f.Nj=null;f.nh=null;f.N=function(){return this.nh};f.addEventListener=function(a,b,c,d){ri(this.nh,a,b,c,d)};f.removeEventListener=function(a,b,c,d){wi(this.nh,a,b,c,d)};f.F=function(){mr.C.F.call(this);var a=this.nh;if(a)if(gi(a))a.gd&&a.gd.removeAll(void 0);else if(a=ti(a)){var b=0,c;for(c in a.a)for(var d=$a(a.a[c]),e=0;e<d.length;++e)xi(d[e])&&++b}};function nr(a,b,c,d){mr.call(this,a,b);a=this.Nj;b=this.N();c?(b.setAttribute("stroke",c.b),c=c.a,u(c)&&-1!=c.indexOf("px")?b.setAttribute("stroke-width",parseFloat(c)/lr(a)):b.setAttribute("stroke-width",c)):b.setAttribute("stroke","none");c=this.Nj;a=this.N();if(d instanceof dr)a.setAttribute("fill",d.A),a.setAttribute("fill-opacity",d.B);else if(d instanceof Yq){b="lg-"+d.j+"-"+d.o+"-"+d.k+"-"+d.H+"-"+d.a+"-"+d.b;var e=b in c.a?c.a[b]:null;if(!e){var e=or(c,"linearGradient",{x1:d.j,y1:d.o,x2:d.k,
259 y2:d.H,gradientUnits:"userSpaceOnUse"}),g="stop-color:"+d.a;ga(d.g)&&(g+=";stop-opacity:"+d.g);g=or(c,"stop",{offset:"0%",style:g});e.appendChild(g);g="stop-color:"+d.b;ga(d.i)&&(g+=";stop-opacity:"+d.i);d=or(c,"stop",{offset:"100%",style:g});e.appendChild(d);e=pr(c,b,e)}a.setAttribute("fill","url(#"+e+")")}else a.setAttribute("fill","none")}y(nr,mr);function qr(a,b){mr.call(this,a,b)}y(qr,mr);function rr(a,b){mr.call(this,a,b)}y(rr,mr);function sr(a,b,c,d){nr.call(this,a,b,c,d)}y(sr,nr);function tr(a,b){mr.call(this,a,b)}y(tr,qr);tr.prototype.clear=function(){Xc(this.N())};function ur(a,b,c,d){nr.call(this,a,b,c,d)}y(ur,sr);function vr(a,b){mr.call(this,a,b)}y(vr,rr);function wr(a,b,c,d,e){kr.call(this,a,b,c,d,e);this.a={};this.H=dc&&!rc(526);this.A=new fr(this)}var xr;y(wr,kr);var yr=0;function or(a,b,c){a=a.o.a.createElementNS("http://www.w3.org/2000/svg",b);if(c)for(var d in c)a.setAttribute(d,c[d]);return a}f=wr.prototype;
260 f.Fp=function(){var a=or(this,"svg",{width:this.width,height:this.height,overflow:"hidden"}),b=or(this,"g");this.i=or(this,"defs");this.b=new tr(b,this);a.appendChild(this.i);a.appendChild(b);this.Nf=a;this.g&&(this.N().setAttribute("preserveAspectRatio","none"),this.H?this.Ro():this.N().setAttribute("viewBox","0 0 "+(this.g?this.g+" "+this.k:"")))};
261 f.Ro=function(){if(this.cf){var a=this.mh();0==a.width?this.N().style.visibility="hidden":(this.N().style.visibility="",this.b.N().setAttribute("transform","scale("+a.width/this.g+" "+a.height/this.k+") translate(0 0)"))}};
262 f.mh=function(){if(!cc)return this.cf?Bd(this.N()):wr.C.mh.call(this);var a=this.width,b=this.height,c=u(a)&&-1!=a.indexOf("%"),d=u(b)&&-1!=b.indexOf("%");if(!this.cf&&(c||d))return null;var e,g;c&&(e=this.N().parentNode,g=Bd(e),a=parseFloat(a)*g.width/100);d&&(e=e||this.N().parentNode,g=g||Bd(e),b=parseFloat(b)*g.height/100);return new B(a,b)};f.clear=function(){this.b.clear();Xc(this.i);this.a={}};function zr(a,b,c,d){b=or(a,"path",{d:Ar(b)});c=new ur(b,a,c,d);a.b.N().appendChild(c.N())}
263 function Ar(a){var b=[];cr(a,function(a,d){switch(a){case 0:b.push("M");Array.prototype.push.apply(b,d);break;case 1:b.push("L");Array.prototype.push.apply(b,d);break;case 2:b.push("C");Array.prototype.push.apply(b,d);break;case 3:var e=d[3];b.push("A",d[0],d[1],0,180<Math.abs(e)?1:0,0<e?1:0,d[4],d[5]);break;case 4:b.push("Z")}});return b.join(" ")}function pr(a,b,c){if(b in a.a)return a.a[b];var d="_svgdef_"+yr++;c.setAttribute("id",d);a.a[b]=d;a.i.appendChild(c);return d}
264 f.Vi=function(){wr.C.Vi.call(this);this.H&&this.A.dc(Br(),"tick",this.Ro)};f.F=function(){delete this.a;delete this.i;delete this.b;wr.C.F.call(this)};function Br(){xr||(xr=new Ei(400),xr.start());return xr};function Cr(a,b,c){this.a=a;this.b=0;this.i=b;c&&(this.tn=c)}f=Cr.prototype;f.tn=70;f.mk=!1;f.start=function(a){this.k=x();this.b=a;this.j=this.k+this.b;this.mk=!0;Rn(this.a);hf(this.g);this.g=gf(v(this.Vt,this),this.tn)};f.stop=function(){this.mk=!1;Sn(this.a);this.g&&hf(this.g)};
265 f.Vt=function(){if(this.mk){var a=x(),b;b=0==this.b||a>=this.j?0:1-(a-this.k)/this.b;var c=E("countdowntimer-diminishing-pieslice",this.a),d=Ue("svg",this.a);!d&&this.a.querySelectorAll&&(d=this.a.querySelectorAll("svg"),d=d.length?d[0]:null);var d=parseInt(d.getAttribute("width"),10),e=new Zq,g=d/2-5;ar(e,d/2,d/2);e.Ga(d/2,5);br(e,g,g,-90,360*-b);e.Ga(d/2,d/2);e.close();c.setAttribute("d",Ar(e));a>=this.j&&(this.stop(),this.i&&this.i())}};var Dr=n("yt.prefs.UserPrefs.prefs_")||{};pa("yt.prefs.UserPrefs.prefs_",Dr);function Er(a){var b=null;"transition"in a.style?b="transition-duration":"webkitTransition"in a.style?b="-webkit-transition-duration":"MozTransition"in a.style?b="-moz-transition-duration":"OTransition"in a.style?b="-o-transition-duration":"msTransition"in a.style&&(b="-ms-transition-duration");a=b?(document.defaultView?document.defaultView.getComputedStyle(a,null):document.parentWindow.getComputedStyle(a,null)).getPropertyValue(b):"0";return 1E3*parseFloat(a)};var Fr=n("yt.pubsub.instance_")||new Wh;Wh.prototype.subscribe=Wh.prototype.D;Wh.prototype.unsubscribeByKey=Wh.prototype.Wc;Wh.prototype.publish=Wh.prototype.u;Wh.prototype.clear=Wh.prototype.clear;pa("yt.pubsub.instance_",Fr);function Gr(a,b,c){var d=Hr();return d?d.subscribe(a,function(){var d=arguments;try{Ir&&Jr[a]?b.apply(c||l,d):H(function(){b.apply(c||l,d)},0)}catch(g){jf(g)}},c):0}
266 function Kr(){var a=cf("LOGGED_IN_PUBSUB_KEY"),b=Hr();b&&("number"==typeof a?a=[a]:"string"==typeof a&&(a=[parseInt(a,10)]),z(a,function(a){b.unsubscribeByKey(a)}))}function Lr(a,b){var c=Hr();return c?c.publish.apply(c,arguments):!1}function Hr(){return n("yt.pubsub.instance_")}var Ir=!!cf("SYNCHRONOUS_PUBSUB"),Jr={};function Mr(a,b,c,d,e,g){var h,k;if(h=c.offsetParent){var m="HTML"==h.tagName||"BODY"==h.tagName;m&&"static"==nd(h,"position")||(k=td(h),m||(m=(m=ud(h))&&cc?-h.scrollLeft:!m||C&&rc("8")||"visible"==nd(h,"overflowX")?h.scrollLeft:h.scrollWidth-h.clientWidth-h.scrollLeft,k=xb(k,new A(m,h.scrollTop))))}h=k||new A;k=Dd(a);if(m=sd(a)){var p=Db(m),m=Math.max(k.left,p.left),s=Math.min(k.left+k.width,p.left+p.width);if(m<=s){var r=Math.max(k.top,p.top),p=Math.min(k.top+k.height,p.top+p.height);r<=p&&(k.left=
267 m,k.top=r,k.width=s-m,k.height=p-r)}}m=Gc(a);r=Gc(c);if(m.a!=r.a){var s=m.a.body,r=r.a.parentWindow||r.a.defaultView,p=new A(0,0),D=Ic(s)?Ic(s).parentWindow||Ic(s).defaultView:window,M=s;do{var sa=D==r?td(M):xd(M);p.x+=sa.x;p.y+=sa.y}while(D&&D!=r&&(M=D.frameElement)&&(D=D.parent));s=xb(p,td(s));C&&!id(m)&&(s=xb(s,jd(m)));k.left+=s.x;k.top+=s.y}a=(b&4&&ud(a)?b^2:b)&-5;b=new A(a&2?k.left+k.width:k.left,a&1?k.top+k.height:k.top);b=xb(b,h);e&&(b.x+=(a&2?-1:1)*e.x,b.y+=(a&1?-1:1)*e.y);if(e=sd(c))e.top-=
268 h.y,e.right-=h.x,e.bottom-=h.y,e.left-=h.x;Nr(b,c,d,g,e,65,void 0)}
269 function Nr(a,b,c,d,e,g,h){a=a.clone();var k=(c&4&&ud(b)?c^2:c)&-5;c=Bd(b);h=h?h.clone():c.clone();if(d||0!=k)k&2?a.x-=h.width+(d?d.right:0):d&&(a.x+=d.left),k&1?a.y-=h.height+(d?d.bottom:0):d&&(a.y+=d.top);if(g&&(e?(d=a,k=0,65==(g&65)&&(d.x<e.left||d.x>=e.right)&&(g&=-2),132==(g&132)&&(d.y<e.top||d.y>=e.bottom)&&(g&=-5),d.x<e.left&&g&1&&(d.x=e.left,k|=1),d.x<e.left&&d.x+h.width>e.right&&g&16&&(h.width=Math.max(h.width-(d.x+h.width-e.right),0),k|=4),d.x+h.width>e.right&&g&1&&(d.x=Math.max(e.right-
270 h.width,e.left),k|=1),g&2&&(k=k|(d.x<e.left?16:0)|(d.x+h.width>e.right?32:0)),d.y<e.top&&g&4&&(d.y=e.top,k|=2),d.y<=e.top&&d.y+h.height<e.bottom&&g&32&&(h.height=Math.max(h.height-(e.top-d.y),0),d.y=e.top,k|=8),d.y>=e.top&&d.y+h.height>e.bottom&&g&32&&(h.height=Math.max(h.height-(d.y+h.height-e.bottom),0),k|=8),d.y+h.height>e.bottom&&g&4&&(d.y=Math.max(e.bottom-h.height,e.top),k|=2),g&8&&(k=k|(d.y<e.top?64:0)|(d.y+h.height>e.bottom?128:0)),e=k):e=256,e&496))return;od(b,a);zb(c,h)||(e=id(Gc(Ic(b))),
271 !C||e&&rc("8")?(b=b.style,cc?b.MozBoxSizing="border-box":dc?b.WebkitBoxSizing="border-box":b.boxSizing="border-box",b.width=Math.max(h.width,0)+"px",b.height=Math.max(h.height,0)+"px"):(a=b.style,e?(e=Hd(b),b=Id(b),a.pixelWidth=h.width-b.left-e.left-e.right-b.right,a.pixelHeight=h.height-b.top-e.top-e.bottom-b.bottom):(a.pixelWidth=h.width,a.pixelHeight=h.height)))};var Or={},Pr="ontouchstart"in document;function Qr(a,b,c){var d;switch(a){case "mouseover":case "mouseout":d=3;break;case "mouseenter":case "mouseleave":d=9}return hd(c,function(a){return Dc(a,b)},!0,d)}
272 function Rr(a){var b="mouseover"==a.type&&"mouseenter"in Or||"mouseout"==a.type&&"mouseleave"in Or,c=a.type in Or||b;if("HTML"!=a.target.tagName&&c){if(b){var b="mouseover"==a.type?"mouseenter":"mouseleave",c=Or[b],d;for(d in c.Tb){var e=Qr(b,d,a.target);e&&!hd(a.relatedTarget,function(a){return a==e},!0)&&c.u(d,e,b,a)}}if(b=Or[a.type])for(d in b.Tb)(e=Qr(a.type,d,a.target))&&b.u(d,e,a.type,a)}}J(document,"blur",Rr,!0);J(document,"change",Rr,!0);J(document,"click",Rr);J(document,"focus",Rr,!0);
273 J(document,"mouseover",Rr);J(document,"mouseout",Rr);J(document,"mousedown",Rr);J(document,"keydown",Rr);J(document,"keyup",Rr);J(document,"keypress",Rr);J(document,"cut",Rr);J(document,"paste",Rr);Pr&&(J(document,"touchstart",Rr),J(document,"touchend",Rr),J(document,"touchcancel",Rr));var Sr=window.yt&&window.yt.uix&&window.yt.uix.widgets_||{};pa("yt.uix.widgets_",Sr);function Tr(a){a=a.getInstance();var b=$(a);b in Sr||!a.mq()||(a.register(),Sr[b]=a)};function Ur(){this.a={}}Ur.prototype.g=!!eval("/*@cc_on!@*/false");Ur.prototype.mq=function(){return!0};function Vr(a,b,c){var d=$(a,void 0),e=v(c,a);b in Or||(Or[b]=new Wh);Or[b].D(d,e);a.a[c]=e}Ur.prototype.b=function(a,b,c){var d=G(a,b);if(d&&(d=n(d))){var e=cb(arguments,2);bb(e,0,0,a);d.apply(null,e)}};function Wr(a,b){Oe(a,"tooltip-text",b)}Ur.prototype.removeData=function(a,b){a.dataset?delete a.dataset[Pe(b)]:a.removeAttribute("data-"+b)};
274 function $(a,b){return"yt-uix"+(a.fj?"-"+a.fj:"")+(b?"-"+b:"")};function Xr(){this.a={}}y(Xr,Ur);ca(Xr);f=Xr.prototype;f.fj="button";f.Df=null;f.register=function(){Vr(this,"click",this.$x);Vr(this,"keydown",this.Yx);Vr(this,"keypress",this.Zx)};f.$x=function(a){a&&!a.disabled&&(Yr(this,a),this.click(a))};
275 f.Yx=function(a,b,c){if(!(c.altKey||c.ctrlKey||c.shiftKey)&&(b=Zr(this,a))){var d=function(a){var b="";a.tagName&&(b=a.tagName.toLowerCase());return"ul"==b||"table"==b};if(d=d(b)?b:bd(b,d)){var d=d.tagName.toLowerCase(),e;"ul"==d?e=this.ey:"table"==d&&(e=this.cy);e&&$r(this,a,b,c,v(e,this))}}};
276 function $r(a,b,c,d,e){var g=Qn(c),h=9==d.keyCode;h||32==d.keyCode||13==d.keyCode?(d=as(a,c))?(b=Yc(d),"a"==b.tagName.toLowerCase()?window.location=b.href:Af(b,"click")):h&&bs(a,b):g?27==d.keyCode?(as(a,c),bs(a,b)):e(b,c,d):(a=Dc(b,$(a,"reverse"))?38:40,d.keyCode==a&&(Af(b,"click"),d.preventDefault()))}f.Zx=function(a,b,c){c.altKey||c.ctrlKey||c.shiftKey||(a=Zr(this,a),Qn(a)&&c.preventDefault())};function as(a,b){var c=$(a,"menu-item-highlight"),d=E(c,b);d&&Bc(d,c);return d}
277 function cs(a,b,c){Ac(c,$(a,"menu-item-highlight"));b.setAttribute("aria-activedescendant",c.getAttribute("id"))}f.cy=function(a,b,c){var d=as(this,b);b=Ue("table",b);var e=Ue("tr",b),e=Lc("td",null,e).length;b=Lc("td",null,b);d=ds(d,b,e,c);-1!=d&&(cs(this,a,b[d]),c.preventDefault())};f.ey=function(a,b,c){if(40==c.keyCode||38==c.keyCode){var d=as(this,b);b=Lc("li",null,b);d=ds(d,b,1,c);cs(this,a,b[d]);c.preventDefault()}};
278 function ds(a,b,c,d){var e=b.length;a=Ia(b,a);if(-1==a)if(38==d.keyCode)a=e-c;else{if(37==d.keyCode||38==d.keyCode||40==d.keyCode)a=0}else 39==d.keyCode?(a%c==c-1&&(a-=c),a+=1):37==d.keyCode?(0==a%c&&(a+=c),a-=1):38==d.keyCode?(a<c&&(a+=e),a-=c):40==d.keyCode&&(a>=e-c&&(a-=e),a+=c);return a}function es(a,b){var c=b.iframeMask;c||(c=document.createElement("iframe"),c.src='javascript:""',c.className=$(a,"menu-mask"),b.iframeMask=c);return c}
279 function fs(a,b,c,d){var e=gd(b,$(a,"group")),g=!!G(b,"button-menu-ignore-group"),e=e&&!g?e:b,g=5,h=4,k=Dd(b);if(Dc(b,$(a,"reverse"))){g=4;h=5;k=k.top+"px";try{c.style.maxHeight=k}catch(m){}}Dc(b,"flip")&&(Dc(b,$(a,"reverse"))?(g=6,h=7):(g=7,h=6));var p;G(b,"button-has-sibling-menu")?p=rd(e):G(b,"button-menu-root-container")&&(p=gs(b));C&&!rc("8")&&(p=null);var s;p&&(s=Dd(p),s=new yb(-s.top,s.left,s.top,-s.left));p=new A(0,1);Dc(b,$(a,"center-menu"))&&(p.x-=Math.round((Bd(c).width-Bd(b).width)/2));
280 d&&(p.y+=Pc(document).y);if(a=es(a,b))b=Bd(c),a.style.width=b.width+"px",a.style.height=b.height+"px",Mr(e,g,a,h,p,s),d&&Un(a,"position","fixed");Mr(e,g,c,h,p,s)}function gs(a){if(G(a,"button-menu-root-container")){var b=G(a,"button-menu-root-container");return gd(a,b)}return document.body}
281 f.pp=function(a){if(a){var b=Zr(this,a);if(b){a.setAttribute("aria-pressed","true");a.setAttribute("aria-expanded","true");b.originalParentNode=b.parentNode;b.activeButtonNode=a;b.parentNode.removeChild(b);var c;c=G(a,"button-has-sibling-menu")?a.parentNode:gs(a);c.appendChild(b);b.style.minWidth=a.offsetWidth-2+"px";var d=es(this,a);d&&c.appendChild(d);c=!!G(a,"button-menu-fixed");fs(this,a,b,c);Rn(b);this.b(a,"button-menu-action",!0);Ac(a,$(this,"active"));b=v(this.np,this,a,!1);c=v(this.np,this,
282 a,!0);c=J(document,"click",c);b=J(document,"contextmenu",b);Oe(a,"button-listener",c);Oe(a,"button-context-menu-listener",b);this.Df=a}}};
283 function bs(a,b){if(b){var c=Zr(a,b);if(c){a.Df=null;b.setAttribute("aria-pressed","false");b.setAttribute("aria-expanded","false");b.removeAttribute("aria-activedescendant");Sn(c);a.b(b,"button-menu-action",!1);var d=es(a,b);H(function(){d&&d.parentNode&&d.parentNode.removeChild(d);c.originalParentNode&&(c.parentNode.removeChild(c),c.originalParentNode.appendChild(c),c.originalParentNode=null,c.activeButtonNode=null)},1)}var e=gd(b,$(a,"group"));Bc(b,$(a,"active"));e&&Bc(e,$(a,"group-active"));if(e=
284 G(b,"button-listener"))uf(e),a.removeData(b,"button-listener");if(e=G(b,"button-context-menu-listener"))uf(e),a.removeData(b,"button-context-menu-listener")}}function hs(a,b){var c=Zr(a,b);c&&fs(a,b,c)}function is(a,b){return Zr(a,b)}
285 f.np=function(a,b,c){c=c||window.event;c=c.target||c.srcElement;3==c.nodeType&&(c=c.parentNode);var d=gd(c,$(this));if(d){var d=Zr(this,d),e=Zr(this,a);if(d==e)return}if(!gd(c,$(this,"menu"))||Dc(c,$(this,"menu-item"))||Dc(c,$(this,"menu-close")))if(bs(this,a),(d=gd(c,$(this,"menu")))&&b&&G(a,"button-menu-indicate-selected")){if(a=E($(this,"content"),a))xc&&"innerText"in c?b=c.innerText.replace(/(\r\n|\r|\n)/g,"\n"):(b=[],fd(c,b,!0),b=b.join("")),b=b.replace(/ \xAD /g," ").replace(/\xAD/g,""),b=b.replace(/\u200B/g,
286 ""),xc||(b=b.replace(/ +/g," "))," "!=b&&(b=b.replace(/^\s*/,"")),ad(a,b);a=$(this,"menu-item-selected");(b=E(a,d))&&Bc(b,a);Ac(c.parentNode,a)}};function Zr(a,b){if(!b.widgetMenu){var c=G(b,"button-menu-id"),c=c&&Jc(c),d=$(a,"menu");c?(Ac(c,d),Ac(c,$(a,"menu-external"))):c=E(d,b);b.widgetMenu=c}return b.widgetMenu}
287 function Yr(a,b){if(G(b,"button-toggle")){var c=gd(b,$(a,"group"));if(c&&G(c,"button-toggle-group")){var d=G(c,"button-toggle-group"),c=Kc($(a),c),e=$(a,"toggled"),g=Dc(b,e);z(c,function(a){a!=b||"optional"==d&&g?Bc(a,e):Ac(b,e)})}else Fc(b,$(a,"toggled"))}}f.click=function(a){if(Zr(this,a)){var b=Zr(this,a),c=gd(b.activeButtonNode||b.parentNode,$(this));c&&c!=a?(bs(this,c),H(v(this.pp,this,a),1)):Qn(b)?bs(this,a):this.pp(a);a.focus()}this.b(a,"button-action")};function js(a,b,c){this.i=a;this.g=b;this.b=c;this.a=v(this.eu,this)}y(js,K);f=js.prototype;f.dj=!1;f.Hf=null;function ks(a){a.Hf?a.dj=!0:ls(a)}f.stop=function(){this.Hf&&(l.clearTimeout(this.Hf),this.Hf=null,this.dj=!1)};f.F=function(){js.C.F.call(this);this.stop()};f.eu=function(){this.Hf=null;this.dj&&(this.dj=!1,ls(this))};function ls(a){a.Hf=Gi(a.a,a.g);a.i.call(a.b)};function ms(a,b,c){b||(b={});var d=c||window;c="undefined"!=typeof a.href?a.href:String(a);a=b.target||a.target;var e=[],g;for(g in b)switch(g){case "width":case "height":case "top":case "left":e.push(g+"="+b[g]);break;case "target":case "noreferrer":break;default:e.push(g+"="+(b[g]?1:0))}g=e.join(",");if(b.noreferrer){if(b=d.open("",a,g))C&&-1!=c.indexOf(";")&&(c="'"+c.replace(/'/g,"%27")+"'"),b.opener=null,c=va(c),b.document.write('<META HTTP-EQUIV="refresh" content="0; url='+c+'">'),b.document.close()}else b=
288 d.open(c,a,g);return b}function ns(a,b){var c;c=b||{};c.target=c.target||a.target||"YouTube";c.width=c.width||600;c.height=c.height||600;(c=ms(a,c))?(c.opener||(c.opener=window),c.focus()):c=null;return!c};function os(a,b){ps().tick[a]=b||x()}function qs(a){var b=ps().tick;return a in b}function rs(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];Qg(b+"?"+c.substring(1))}function ss(){return ps().info}function ps(){return n("ytcsi.data_")||ts()}function ts(){var a={tick:{},span:{},info:{}};pa("ytcsi.data_",a);return a};function us(a){if(!a)return!1;a=a.replace(/https?:\/\//g,"");var b=a.split("/",1);if(!b||1>b.length||!b[0])return!1;b=b[0].toLowerCase().split(".").reverse();return 2>b.length?!1:("com"==b[0]&&"youtube"==b[1]||"be"==b[0]&&"youtu"==b[1])&&-1==a.indexOf("/redirect?")}
289 function vs(a,b){if("new"==a.target)return-1;var c=Zp(a);if(!c)return-1;var c=c.replace(/https?:\/\//g,""),d;(d=!us(c))||(d=fe(c)||"",d=d.split("/"),d="/"+(1<d.length?d[1]:""),d="/watch"!=d);if(d)return-1;d=Gj(c);if(!d||d.v!=b.L||d.list||d.p)return-1;c=c.split("#",2);if(!c||2>c.length)return-1;(c=Fj(c[1]))&&c.t?(d=c.t,c=0,-1!=d.indexOf("h")&&(d=d.split("h"),c=3600*d[0],d=d[1]),-1!=d.indexOf("m")&&(d=d.split("m"),c=60*d[0]+c,d=d[1]),-1!=d.indexOf("s")?(d=d.split("s"),c=1*d[0]+c):c=1*d+c):c=-1;return c}
290 ;function ws(a,b){this.b=a;this.a=b}function yp(a,b,c){b&&b.i&&xp(b)&&a.log_(sp(a,b,3),c)}function sp(a,b,c){var d={};d["iv-event"]=c;d["a-id"]=b.id;d["a-type"]=xs(b);if(c=xp(b))d.link=escape(Zp(c)),c.a&&(d["l-class"]=c.a);d.ps=a.a.Ca;if(b.A){var e=new we(b.A);z(e.uc(),function(a){d[a]=e.get(a)})}return d}
291 function xs(a){switch(a.type){case "text":switch(a.style){case "popup":return 1;case "speech":return 2;case "anchored":return 8;case "label":return 9;case "title":return 4;default:return 0}case "highlight":return 3;case "image":switch(a.style){case "video":return 11;case "channel":return 10;default:return 0}default:return 0}}ws.prototype.log_=function(a,b){this.b.u("command_log","iv",a,b)};function ys(){this.element=this.label=null;this.priority=0}y(ys,K);ys.prototype.listen=function(a,b,c){return this.element.listen(this.element,a,b,c||this)};ys.prototype.dc=function(a){this.element.dc(a)};function zs(a,b,c){Z.call(this,["div","ytp-segmented-control"]);this.g=a;this.b=-1;this.a=[];q(b)&&As(this,b,c)}y(zs,Z);function As(a,b,c){Tg(a.a);a.a=[];for(var d=0;d<b.length;d++){var e=new En(a.g);a.a[d]=e;c?e.Aa(["div",b[d]]):e.Aa(b[d]);0!=d&&V(e.N(),"ytp-segmented-control-other");Bs(e,d==a.b);J(e,"click",v(a.Eu,a));e.V(a.element)}}f=zs.prototype;
292 f.V=function(a,b){zs.C.V.call(this,a,b);for(var c=0,d=0;d<this.a.length;d++)c=Math.max(c,Bd(this.a[d].N()).width);if(c)for(d=0;d<this.a.length;d++)Ad(this.a[d].N(),c)};f.Ya=function(a){this.b=a;for(var b=0;b<this.a.length;b++)Bs(this.a[b],b==a)};f.getSelected=function(){return this.b};function Bs(a,b){if(b){var c=a.N();W(c,"ytp-segmented-control-deselected");V(c,"ytp-segmented-control-selected")}else c=a.N(),W(c,"ytp-segmented-control-selected"),V(c,"ytp-segmented-control-deselected")}
293 f.Eu=function(a){for(var b=0;b<this.a.length;b++)if(this.a[b]==a.currentTarget){b==this.b&&2==this.a.length?this.Ya(0==b?1:0):this.Ya(b);Af(this.element,"change");break}};f.F=function(){As(this,[]);this.g=null;zs.C.F.call(this)};function Cs(a){ys.call(this);this.label=a.getMsg("YTP_ANNOTATIONS_TITLE");this.element=new zs(a,[a.getMsg("YTP_ON"),a.getMsg("YTP_OFF")]);L(this,this.element);this.priority=2}y(Cs,ys);Cs.prototype.getSelected=function(){return this.element.getSelected()};Cs.prototype.Ya=function(a){this.element.Ya(a)};function Ds(a,b){this.start=a<b?a:b;this.end=a<b?b:a}Ds.prototype.clone=function(){return new Ds(this.start,this.end)};function Es(){}f=Es.prototype;f.Vc=!1;f.hf=null;f.Nl=null;function Fs(a,b,c){a.hf?(zd(a.hf.N(),b,c),a.hf.clear()):(b=new wr(b,c,void 0,void 0,void 0),a.hf=b,a.hf.Fp(),a.Nl=Rc("div"),a.Nl.appendChild(a.hf.N()));return a.hf}f.N=function(){return this.Nl};f.de=function(){};function Gs(a,b,c){var d=document.createElementNS("http://www.w3.org/2000/svg",a);b&&Eb(b,function(a,b){d.setAttribute(b,a)});for(var e=2;e<arguments.length;e++)d.appendChild(arguments[e]);return d}function Hs(a,b){var c;c=":"+(hr.getInstance().a++).toString(36);b.setAttribute("result",c);a.appendChild(b);return c};function Is(a,b){var c=Hs(a,Gs("feGaussianBlur",{"in":b,stdDeviation:"1.8"})),c=Hs(a,Gs("feDiffuseLighting",{"in":c,surfaceScale:"4",diffuseConstant:"1"},Gs("feDistantLight",{azimuth:"270",elevation:"15","lighting-color":"white"}))),c=Hs(a,Gs("feComposite",{"in":c,in2:b,operator:"in"}));return Hs(a,Gs("feComposite",{in2:c,"in":b,operator:"arithmetic",k2:1,k3:0.5,k4:0}))}
294 function Js(a,b){var c=Hs(a,Gs("feOffset",{"in":b,dx:"-7",dy:"-7"})),c=Hs(a,Gs("feGaussianBlur",{"in":c,stdDeviation:"3"})),c=Hs(a,Gs("feColorMatrix",{"in":c,type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"})),d=Hs(a,Gs("feColorMatrix",{"in":b,type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 0"})),d=Hs(a,Gs("feGaussianBlur",{"in":d,stdDeviation:"1"})),c=Hs(a,Gs("feComposite",{operator:"out","in":c,in2:d}));return Hs(a,Gs("feComposite",{operator:"over","in":b,in2:c}))}
295 function Ks(a,b){return b}function Ls(a){var b=Gs("filter",{filterUnits:"userSpaceOnUse"}),c="SourceGraphic";z(a,function(a){t:{switch(a){case "bevel":a=Is;break t;case "dropshadow":a=Js;break t}a=Ks}c=a(b,c)});return b}function Ms(a){a=Ja(a,function(a){return a in Ns});fb(a,function(a,c){return Ns[a]-Ns[c]});return a}function Os(a,b){if(!b)return null;var c="effects:"+(b?b.join("|"):""),d=c in a.a?a.a[c]:null;if(d)return d;d=Ls(b);return 0<d.childNodes.length?pr(a,c,d):null}
296 function Ps(a){return Oa(a,function(a){return"dropshadow"==a})?new yb(0,7,7,0):new yb(0,0,0,0)}var Ns={bevel:1,dropshadow:2};function Qs(a,b,c,d,e){b=Rs(b,c,d?d.a/2+1:0);zr(a,b,d,e)}function Rs(a,b,c){var d=new Zq;ar(d,a.left+b+c,a.top+c);d.Ga(a.left+a.width-b-c,a.top+c);br(d,b,b,-90,90);d.Ga(a.left+a.width-c,a.top+a.height-b-c);br(d,b,b,0,90);d.Ga(a.left+b+c,a.top+a.height-c);br(d,b,b,90,90);d.Ga(a.left+c,a.top+b+c);br(d,b,b,180,90);d.close();return d}function Ss(a,b,c){b&&c&&a.setAttribute(b,"url(#"+c+")")}
297 function Ts(a,b,c,d){var e=a.B;e?a=new Yq(e.j*b/100,e.o*c/100,e.k*b/100,e.H*c/100,e.a,e.b,e.g,e.i):(b=d?Math.max(a.a,0.9):a.a,a=new dr(a.j,b));return a}function Us(a,b){var c=new yb(a.top,a.left+a.width,a.top+a.height,a.left),d=Ps(b);ia(d)?(c.top-=d.top,c.right+=d.right,c.bottom+=d.bottom,c.left-=d.left):(c.top-=d,c.right+=void 0,c.bottom+=void 0,c.left-=NaN);return Db(c)}function Vs(a,b,c){c.length&&(b=Oa(b.childNodes,function(a){return"g"==a.tagName}))&&(a=Os(a,Ms(c)),Ss(b,"filter",a))};function Ws(){}y(Ws,Es);Ws.prototype.a=0;
298 Ws.prototype.de=function(a,b,c){var d=a.b,e=d.H,g=this.Vc&&Kq(a),e=(e+=g?1:0)?new er(e,g?d.k:d.o):null;if(g=Oq(a)){var h=oq(g,b,c);if(!(0>=h.width||0>=h.height)){var k;if(k=(a=(a=a.a?a.a.a.length?a.a.a[0]:null:null)&&a.a?a.a:null)&&a.length?a[0]:null){var m;c=c?oq(c,b):null;a=jq(k,new Cb(k.B,k.G,k.k,k.i),b);c?(a.top+=c.top,a.left+=c.left):(a.top+=b.top,a.left+=b.left);m=new A(a.left,a.top);c=h.clone();a=new Cb(m.x,m.y,1,1);var g=Math.max(c.left+c.width,a.left+a.width),p=Math.max(c.top+c.height,a.top+
299 a.height);c.left=Math.min(c.left,a.left);c.top=Math.min(c.top,a.top);c.width=g-c.left;c.height=p-c.top;c=Us(c,d.b);a=Fs(this,c.width,c.height);var g=Ts(d,c.width,c.height,this.Vc),h=new Cb(h.left-c.left,h.top-c.top,h.width,h.height),s=new A(m.x-c.left,m.y-c.top);this.a=17*lq(b,k.g,k.a?k.a:"xy");b=d.g;k=e?e.a/2:0;m=Xs(h,s);var p=this.b(h,b,s,m),r=s.x,s=s.y,D=h.width,M=h.height,sa=h.left,h=h.top,Y=new Zq;ar(Y,sa+b+k,h+k);"t"==m&&(Y.Ga(p.start,h+k),Y.Ga(r,s),Y.Ga(p.end,h+k));Y.Ga(sa+D-b-k,h+k);br(Y,
300 b,b,-90,90);"r"==m&&(Y.Ga(sa+D-k,p.start),Y.Ga(r,s),Y.Ga(sa+D-k,p.end));Y.Ga(sa+D-k,h+M-b-k);br(Y,b,b,0,90);"b"==m&&(Y.Ga(p.end,h+M-k),Y.Ga(r,s),Y.Ga(p.start,h+M-k));Y.Ga(sa+b+k,h+M-k);br(Y,b,b,90,90);"l"==m&&(Y.Ga(sa+k,p.end),Y.Ga(r,s),Y.Ga(sa+k,p.start));Y.Ga(sa+k,h+b+k);br(Y,b,b,180,90);Y.close();zr(a,Y,e,g);if(e=this.N())V(e,"annotation-shape"),V(e,"annotation-speech-shape"),od(e,c.left,c.top),zd(e,c.width,c.height),Vs(a,e,d.b)}}}};
301 function Xs(a,b){var c=a.top-b.y,d=b.x-a.left-a.width,e=b.y-a.top-a.height,g=a.left-b.x,h=Math.max(c,d,e,g);if(0>h)return"i";switch(h){case c:return"t";case d:return"r";case e:return"b";case g:return"l"}return"i"}Ws.prototype.b=function(a,b,c,d){function e(a,c,d){h=Math.min(Math.max(d-2*b,0),g);k=vb(a-h/2,c+b,c+d-h-b)}var g=this.a,h=0,k=0;"t"==d||"b"==d?e(c.x,a.left,a.width):"l"!=d&&"r"!=d||e(c.y,a.top,a.height);return new Ds(k,k+h)};function Ys(){}y(Ys,Es);Ys.prototype.de=function(a,b,c){var d=Oq(a);d&&(b=oq(d,b,c),0>=b.width||0>=b.height||(a=a.b,c=Us(b,a.b),d=Fs(this,c.width,c.height),Qs(d,new Cb(0,0,b.width,b.height),a.g,new er(!a.i&&this.Vc?1:a.i,a.j),new dr("#000",0)),b=this.N(),V(b,"annotation-shape"),Ed(b,this.Vc?Math.max(a.a,0.9):a.a),od(b,c.left,c.top),zd(b,c.width,c.height)))};function Zs(a,b,c){this.a=a||0;this.g=b||0;this.b=c||!1}y(Zs,Es);function $s(a,b){var c=a.width,d=a.height,e=0,g=0;0<b&&(a.width/a.height>b?(d=a.width/b,g=(a.height-d)/2):(c=a.height*b,e=(a.width-c)/2));return new Cb(e,g,c,d)}
302 Zs.prototype.de=function(a,b,c){var d=oq(Oq(a),b,c);if(!(0>=d.width||0>=d.height)){var e=$s(d,this.g);e.left+=d.left;e.top+=d.top;b=a.b;c=Us(e,b.b);var g=Fs(this,c.width,c.height),h=new dr("#000",0),e=$s(e,this.a);a=a.j?a.j.a?a.j.a:a.j.L?$n(a.j.L,"hqdefault.jpg"):"":"";e=or(g,"image",{x:e.left,y:e.top,width:e.width,height:e.height,"image-rendering":"optimizeQuality",preserveAspectRatio:"none"});e.setAttributeNS("http://www.w3.org/1999/xlink","href",a);a=new vr(e,g);g.b.N().appendChild(a.N());if(e=
303 this.N()){var k=this.Vc?Math.max(b.a,0.9):b.a;Ed(e,k);if(this.b&&0<b.i){var k=new er(b.i,b.j),d=new Cb(0,0,d.width,d.height),m;m=Rs(d,b.g,k.a/2+1);var p="mask"in g.a?g.a.mask:null;if(p)m=p;else{var p=document.createElementNS("http://www.w3.org/2000/svg","mask"),s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d",Ar(m));s.setAttribute("fill","#FFF");p.appendChild(s);m=pr(g,"mask",p)}Ss(a.N(),"mask",m);Qs(g,d,b.g,k,h)}V(e,"annotation-shape");V(e,"annotation-image-shape");
304 od(e,c.left,c.top);zd(e,c.width,c.height);Vs(g,e,b.b)}}};function at(){}y(at,Es);at.prototype.de=function(a,b,c){var d=Oq(a);if(d){var e=oq(d,b,c);if(!(0>=e.width||0>=e.height)){b=a.b;c=Us(e,b.b);var d=Fs(this,c.width,c.height),g=b.H;a=this.Vc&&Kq(a);a=(g+=a?1:0)?new er(g,a?b.k:b.o):null;g=new Cb(0,0,e.width,e.height);e=Ts(b,e.width,e.height,this.Vc);Qs(d,g,b.g,a,e);if(a=this.N())V(a,"annotation-shape"),V(a,"annotation-popup-shape"),od(a,c.left,c.top),zd(a,c.width,c.height),Vs(d,a,b.b)}}};function bt(){}y(bt,Ws);bt.prototype.b=function(a,b,c,d){function e(a,c,d){h=Math.min(Math.max(d-2*b,0),g);k=a<=c+d/2?Math.max(c+d/4-h/2,c+b):Math.min(c+3*d/4-h/2,c+d-h-b)}var g=this.a,h=0,k=0;"t"==d||"b"==d?e(c.x,a.left,a.width):"l"!=d&&"r"!=d||e(c.y,a.top,a.height);return new Ds(k,k+h)};function ct(a,b){this.b=Jc(a);this.a=eo(this.b,b)}
305 function dt(a,b){var c=fo(a.a,b,void 0),c=c.replace(/^[\s\xa0]+/,""),d;d=String(c.substr(0,3)).toLowerCase();(d=0==("<tr"<d?-1:"<tr"==d?0:1))&&(c="<table><tbody>"+c+"</tbody></table>");var e=c,g=document,c=g.createElement("div");C?(c.innerHTML="<br>"+e,c.removeChild(c.firstChild)):c.innerHTML=e;if(1==c.childNodes.length)c=c.removeChild(c.firstChild);else{for(e=g.createDocumentFragment();c.firstChild;)e.appendChild(c.firstChild);c=e}d&&(c=Yc(Yc(c)));return c};function et(a,b,c,d,e){this.a=a;this.j=b;this.g=c;this.o=d;this.k=e;this.i=new Uo(this)}f=et.prototype;f.na=null;f.Yc=null;f.fc=null;f.Fa=null;f.al=null;function ft(a,b){var c=v(function(a,c,g){c=g?gt(this,c,v(g,this)):gt(this,c);this.i.listen(b,a,c)},a);c("mouseover","e",a.Uw);c("mouseout","d",a.Tw);c("click","b");c("mousedown","a");c("touchend","b")}
306 function ht(a){if(a.a.H){var b;if(La(a.a.g,function(a){return"close"==a.type},void 0))b=a.na;else{b=dt(new ct("annotation-close-button-template",[]),{});if(!(b instanceof Element))return;a.fc=b;Oe(a.fc,"annotation_id",a.a.id);a.na.appendChild(a.fc);b=a.fc}var c=function(a){a.stopPropagation()};a.i.listen(b,"click",gt(a,"c",c));a.i.listen(b,"touchend",gt(a,"c",c))}}
307 function gt(a,b,c){return v(function(a){if(this.k)c&&c(a);else if(a.target instanceof Element){Sn(a.target);var e=document.elementFromPoint(a.clientX,a.clientY);Rn(a.target);Om(e,"annotation")&&Af(e,a.type)}this.o.u(b,this.a)},a)}f.Uw=function(){this.fc&&Rn(this.fc);this.Yc&&Ed(this.Yc,1);var a=it(this);this.Fa&&(this.Fa.Vc=!0,Ed(this.na,jt(this)?1:0),a&&this.Fa.de(this.a,a,kt(this)))};
308 f.Tw=function(){this.fc&&Sn(this.fc);this.Yc&&Ed(this.Yc,0);var a=it(this);this.Fa&&(this.Fa.Vc=!1,Ed(this.na,jt(this)?1:0),a&&this.Fa.de(this.a,a,kt(this)))};function kt(a){return a.al?Oq(a.al):null}
309 function Wq(a){if(a.na||a.Fa){var b=Oq(a.a);if(b){var c=it(a),d=kt(a);if(a.na&&c){b=oq(b,c,d);zd(a.na,b.width,b.height);od(a.na,b.left,b.top);var e=a.g.Dg;e&&(e=new yb(360*lt(a).top*Qq(a.a,e)/100,640*lt(a).right*Pq(a.a,e)/100,360*lt(a).bottom*Qq(a.a,e)/100,640*lt(a).left*Pq(a.a,e)/100),a.Yc&&(e.right+=1.5*c.height/100),a.na.style.padding=e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px");"label"==a.a.style&&a.b&&(a.b.style.padding=a.na.style.padding);if(a.Yc){e=4.2*c.height/100;e=new B(e,e);zd(a.Yc,
310 e);if("highlight"==a.a.type||"label"==a.a.style)var g=1.5*c.height/100,e=new A(b.width-e.width-g,b.height-e.height-g);else e=new A(b.width-e.width-3*c.height/100,(b.height-e.height)/2);od(a.Yc,e)}if(a.fc){zd(a.fc,new B(18,18));var e=a.fc,g=Bd(a.fc),h=9<=c.left+c.width-(b.left+b.width),k=9<=b.top-c.top;od(e,h&&k?new A(b.width-9,-9):h?new A(b.width-9,b.height>27+g.height?9:b.height-9):k?new A(b.width>27+g.width?b.width-9-g.width:-9,-9):b.width/c.width>b.height/c.height?new A(b.width>27+g.width?b.width-
311 9-g.width:-9,b.height-9):new A(-9,b.height>27+g.height?9:b.height-9))}}a.Fa&&c&&a.Fa.de(a.a,c,d);if(a.na){c=a.na;d=a.a.b;c.style.color="highlightText"==a.a.style?d.G:d.k;c.style.fontSize=360*d.I*Qq(a.a,a.g.Dg)/100+"px";c.style.textAlign=d.textAlign?d.textAlign:"title"==a.a.style||"highlightText"==a.a.style?"center":"left";d.A&&(c.style.fontWeight=d.A);a=a.na;c=a.style.overflow;(d=E("annotation-link-icon",a))&&Sn(d);a.style.overflow="scroll";for(b=100;0<b&&!(a.scrollHeight<=a.offsetHeight&&a.scrollWidth<=
312 a.offsetWidth);b--){e=Pd(a);if(5>e)break;e--;a.style.fontSize=e+"px"}a.style.overflow=c;d&&Rn(d)}}}}function lt(a){var b=a.a.b;return b.padding?b.padding:new yb("speech"==a.a.style?1.6:0.8,"speech"==a.a.style?1.6:0.8,"speech"==a.a.style?1.6:0.8,"speech"==a.a.style?1.6:0.8)}
313 f.show=function(){var a=this.a.b,a=(a&&0==a.a||"title"==this.a.style||"highlightText"==this.a.style||"pause"==this.a.type?!1:!0)&&!this.Fa,b=!this.na,c="widget"==this.a.type;if(a){var d=it(this);if(d){var e=null;"highlight"==this.a.type||"label"==this.a.style?e=new Ys:"popup"==this.a.style?e=new at:"anchored"==this.a.style?e=new Ws:"speech"==this.a.style?e=new bt:"image"==this.a.type&&("video"==this.a.style?e=new Zs(4/3,16/9,!0):"channel"==this.a.style&&(e=new Zs));e&&(e.de(this.a,d,kt(this)),this.Fa=
314 e,d=e.N())&&(Sn(d),V(d,"annotation-type-"+this.a.type.toLowerCase()),this.j(d))}}if(b){d=["annotation","hid"];"highlightText"!=this.a.style||d.push("annotation-no-mouse");d.push("annotation-type-"+this.a.type.toLowerCase());this.na=Rc("div",d);this.a.o&&("label"==this.a.style?(this.b=Rc("div",["label-text"]),this.b.style.backgroundColor=this.a.b.j,ad(this.b,this.a.o),this.na.appendChild(this.b)):ad(this.na,this.a.o));Oe(this.na,"annotation_id",this.a.id);this.j(this.na);ft(this,this.na);if(Kq(this.a)&&
315 "image"!=this.a.type&&Jq(this.a)){if(d=xp(this.a))this.na.title=Zp(d);this.Yc=Rc("span","annotation-link-icon");this.na.appendChild(this.Yc)}ht(this);Kq(this.a)||(this.na.style.cursor="default")}c&&("subscribe"==this.a.style?E("yt-uix-subscription-button",this.na)||(this.na.innerHTML=this.a.k):this.a.k&&(this.na.innerHTML=this.a.k));if(a||b){t:{a=this.a.a.a;if(a.length&&(a=vq(a[0]))){a=a.o;break t}a=0}this.na&&(this.na.style.zIndex=a);this.Fa&&this.Fa.N()&&(this.Fa.N().style.zIndex=a)}Rn(this.na);
316 Ed(this.na,jt(this)?1:0);Wq(this);this.Fa&&Rn(this.Fa.N())};f.hide=function(){Sn(this.na);this.Fa&&Sn(this.Fa.N())};function jt(a){return"label"!=a.a.style||a.Fa.Vc}function it(a){var b=a.g.Dg;return b?"player_relative"==a.a.G?(a=a.g.Tc)?new Cb(-b.left,-b.top,a.width,a.height):null:new Cb(0,0,b.width,b.height):null};function mt(a){Tm.call(this,a);this.b={};this.i={};this.j=new ws(this.H,this.a.J());var b=Q(a),c=E("html5-annotations-button",b);this.g=null;a.J().Ma?(F(c),this.g=new Cs(this.a.app.S.B),this.g.listen("change",this.Hq,this)):J(c,"click",v(this.Mq,this));this.D("onHideControls",this.Lq,this);this.D("onShowControls",this.Oq,this);this.D("onStateChange",this.Nq,this);this.D("e",this.Qq,this);this.D("d",this.Pq,this);this.D("a",this.Jq,this);this.D("b",this.Iq,this);this.D("c",this.Kq,this);a=E("video-annotations",
317 b);a=E("countdowntimer",a);this.k=Rc("DIV",["video-annotations","html5-stop-propagation"]);Wm(this,this.k);Wm(this,a);this.A=new Cr(a,v(this.xj,this))}y(mt,Tm);f=mt.prototype;f.qa="iv-module";f.Fl=!1;f.qp=!0;f.ba=!1;f.Dd=0;function nt(a){return E("video-annotations",Q(a))&&ot(a)?new mt(a):null}function ot(a){return"leanback"==a.J().Y?!1:Bm(a.getVideoData(),"iv3_module")}f.Xa=function(){return ot(this.a)};
318 f.create=function(){mt.C.create.call(this);this.g&&this.u("module_menu_add",this.g);1==(this.a.J().fa||this.a.getVideoData().fa)?this.load():pt(this,"tooltip-default")};f.destroy=function(){this.unload();this.g&&this.u("module_menu_remove",this.g);mt.C.destroy.call(this)};f.Mq=function(){this.ba||this.Dd?this.unload():this.load()};f.Hq=function(){var a=this.ba||this.Dd,b=0==this.g.getSelected();a&&!b?this.unload():!a&&b&&this.load()};f.Nq=function(a){this.qp=P(a.state,8);0>Ro(a,4)&&this.A.stop()};
319 f.load=function(){mt.C.load.call(this);pt(this,"tooltip-alt");var a={format:"XML",method:"GET",rd:v(this.Vo,this,null)},b=this.a.getVideoData();b.Sk&&(this.Dd++,Qj(b.Sk,a));b.Rk&&(this.Dd++,Qj(b.Rk,a));b.Qk&&(this.a.J().Qc||this.a.J().Kc)&&(a={format:"XML",method:"GET",rd:v(this.Vo,this,v(this.jv,this,b.Ka))},this.Dd++,Qj(b.Qk,a));this.g&&this.g.Ya(0)};
320 f.unload=function(){this.g&&this.g.Ya(1);this.j.log_({"iv-event":1});this.xj();Um(this);Eb(this.b,function(a){a.destroy()});Eb(this.i,function(a){a.destroy()});this.Dd=0;this.ba=!1;this.b={};this.i={};pt(this,"tooltip-default");mt.C.unload.call(this)};function pt(a,b){var c=E("html5-annotations-button",Q(a.a));if(c){var d=G(c,b)||"";Oe(c,"tooltip",d);c.setAttribute("aria-label",d)}}
321 function qt(a,b){for(var c={},d=0;d<b.attributes.length;d++){var e=b.attributes[d];c[e.name]=e.nodeValue}for(d=0;d<b.childNodes.length;d++)if(e=b.childNodes[d],e.tagName){var g;if(c[e.tagName])g=c[e.tagName];else if("html_blob"==e.tagName||"data"==e.tagName){c[e.tagName]=e.childNodes[0].nodeValue.trim();continue}else g=[],c[e.tagName]=g;e&&"TEXT"==e.tagName?1==e.childNodes.length&&3==e.childNodes[0].nodeType?g.push(e.childNodes[0].nodeValue):g.push(""):e&&g.push(qt(a,e))}return c}
322 f.Vo=function(a,b){if(this.Dd&&!this.ba){this.Dd--;var c=b.responseXML?b.responseXML.getElementsByTagName("annotations"):null;if(Mj(b)&&c){c=c[0];a&&a(c);rt(this,c);V(Q(this.a),this.qa+"-loaded");0==this.Dd&&(this.ba=!0);var c=[],d;for(d in this.b){var e=this.b[d].qb;if(e.a)if(e=e.a,e.a.length)if(e=e.a[0].b||e.a[0].a,!e||2>e.length)e=null;else var g=e.length-1,e=0>=e[0].b&&0>=e[g].b?null:{start:e[0].b,end:e[g].b};else e=null;else e=null;if(g=e)e=1E3*g.start,g=1E3*g.end,0==e&&(e++,g++),e==g&&g++,g<
323 e||(e=new Zh(e,g,{id:d}),c.push(e))}for(d in this.i)e=this.i[d].qb,e=new Zh(e.data.start_ms,e.data.end_ms,{id:d}),c.push(e);this.zf.apply(this,c)}}};function st(a,b){var c=tt(a,b);if(!c)return null;Mq(b,function(a){a=v(this.lx,this,b.id,a);this.D("ivTrigger:"+b.id,a)},a);return new Tq(a.H,b,c)}function ut(a,b){var c=Rc("div",["annotation","annotation-type-custom","hid"]);a.k.appendChild(c);var d=null;switch(b.style){case "video":d=new tp(b,c,new Uo(a),a.a.J(),a.j)}d&&qp(d,a.H);return d}
324 function rt(a,b){for(var c=b.getElementsByTagName("annotation"),d=0;d<c.length;d++){var e=qt(a,c[d]),g=null;try{g=Iq(e)}catch(h){}g&&("custom"==g.type?(e=ut(a,g))&&(a.i[g.id]=e):(e=st(a,g))&&(a.b[g.id]=e))}Eb(a.b,function(a){var b=a.qb;b.a&&b.a.b&&(b=this.b[b.a.b])&&(a.b.al=b.qb)},a)}f.xc=function(a){mt.C.xc.call(this,a);a=a.getId();var b=this.b[a],c=this.i[a];c&&!c.Ib?c.show():b&&!b.Ib&&(b=b.qb,"pause"==b.type?vt(this,b):(wt(this,a),a=this.j,b&&b.i&&a.log_(sp(a,b,2))))};
325 f.$c=function(a){mt.C.$c.call(this,a);xt(this,a.getId())};function vt(a,b){if(a.qp){var c=Oa(b.g,function(a){return"pause"==a.type&&!!a.duration&&!!a.duration.value},void 0);c&&(a.Fl=!0,a.u("command_pause"),a.A.start(1E3*c.duration.value))}}function xt(a,b,c,d){var e=a.i[b];if(e&&!e.Ib)e.hide();else if(b=a.b[b])Vq(b),d=d&&a.b[d]&&a.b[d].isVisible,c&&c.b&&d?(a=v(a.yo,a,b),b.a=new Xo(a,2E3),b.a.start()):a.yo(b)}f.yo=function(a){if(a){a.hide();var b=a.qb.id;this.u(Sq("shown",b),!1,b);zt(this,a.qb,"hidden")}};
326 function wt(a,b,c,d){if(b=a.b[b])Vq(b),d=d&&a.b[d]&&a.b[d].isVisible,c&&c.i&&d?(a=v(a.zo,a,b),b.a=new Xo(a,2E3),b.a.start()):a.zo(b)}f.zo=function(a){if(a){a.show();var b=a.qb.id;this.u(Sq("shown",b),!0,b);zt(this,a.qb,"shown")}};f.lx=function(a,b,c,d){c?wt(this,a,b,d):xt(this,a,b,d)};f.Jq=function(a){if(a&&a.id){var b=this.j;a&&a.i&&xp(a)&&b.log_(sp(b,a,8))}};
327 f.Iq=function(a){if(a&&a.id){var b=xp(a),c=v(function(){b&&zt(this,a,"click")},this);us(Zp(b))&&"new"!=b.target||(c(),c=null);yp(this.j,a,c)}};
328 function zt(a,b,c){Lq(b,function(a){if(a.trigger==c)switch(a.type){case "log":a.url&&Qg(a.url.value);break;case "openUrl":var e=this.a.getVideoData(),g=vs(a.url,e);if(-1!=g){this.u("command_seek",g);this.xj();break}if(e=(g=Zp(a.url))?us(g)?Kj(g,{src_vid:e.L,feature:"iv",annotation_id:b.id}):g:null)fn(this),window.open(e,a.url.target?"new"==a.url.target?"_blank":"_top":us(Zp(a.url))?"_top":"_blank")}},a)}f.Lq=function(){this.u(Sq("playerControlShow",void 0),!1,void 0)};
329 f.Oq=function(){this.u(Sq("playerControlShow",void 0),!0,void 0)};f.Qq=function(a){a=a.id;this.u(Sq("rollOver",a),!0,a)};f.Pq=function(a){a=a.id;this.u(Sq("rollOver",a),!1,a)};f.Kq=function(a){if(a||a.id)if(this.b[a.id].Ib=!0,xt(this,a.id),a){var b=this.j;a&&a.i&&b.log_(sp(b,a,4));zt(this,a,"close")}};f.xj=function(){this.A.stop();this.Fl&&(this.Fl=!1,this.u("command_play"))};
330 function tt(a,b){if(At(b)){var c=b.H||La(b.g,function(a){return"click"==a||"rollOut"==a||"rollOut"==a},void 0);return new et(b,v(a.k.appendChild,a.k),a.a.J(),a.H,c)}return null}function At(a){if("highlight"==a.type||"image"==a.type||"widget"==a.type)return!0;if("text"==a.type)for(var b in Fq)if(a.style==Fq[b])return!0;return!1}
331 function Bt(a,b,c,d,e){var g=a.ownerDocument.createElement("action");g.setAttribute("type","log");g.setAttribute("trigger",d);a=a.ownerDocument.createElement("url");d={};d.value="a_id="+c;d.label="cta_annotation_"+e;b=Kj(b,d);a.setAttribute("value",b);g.appendChild(a);return g}
332 f.jv=function(a,b){if(a)for(var c=b.getElementsByTagName("annotation"),d=0;d<c.length;d++){var e=c[d],g=qt(this,e);if(Hp(g,"logable",!0)){var g=Bp(g,"id","REQUIRED"),h=e.getElementsByTagName("action"),h=h.length?h[0]:null;e.insertBefore(Bt(e,a,g,"shown","shown"),h);e.insertBefore(Bt(e,a,g,"click","clicked"),h);e.insertBefore(Bt(e,a,g,"close","closed"),h)}}};var Ct;function Dt(a,b){fa(b)&&(b=b.join(" "));if(""===b||void 0==b){var c;Ct||(Ct={atomic:!1,autocomplete:"none",dropeffect:"none",haspopup:!1,live:"off",multiline:!1,multiselectable:!1,orientation:"vertical",readonly:!1,relevant:"additions text",required:!1,sort:"none",busy:!1,disabled:!1,hidden:!1,invalid:"false"});c=Ct;"pressed"in c?a.setAttribute("aria-pressed",c.pressed):a.removeAttribute("aria-pressed")}else a.setAttribute("aria-pressed",b)};function Et(a,b,c,d,e){En.call(this,a,b,c,c);this.O=b;this.Q=this.P=c;this.B=d||null;this.G=e||null;this.I=e||null;this.b=!1}y(Et,En);function Ft(a){Gn(a,a.b&&a.B?a.B:a.O);a.Jb(a.b&&a.G?a.G:a.P);a.a=a.b&&a.I?a.I:a.Q;X(a.element,"ytp-button-pressed",a.b)}function Gt(a){a.b=!0;Dt(a.element,!0);Ft(a)}function Ht(a){a.b=!1;Dt(a.element,!1);Ft(a)}Et.prototype.F=function(){this.I=this.G=this.B=null;uf(this.U);this.U=null;Et.C.F.call(this)};function It(a){Z.call(this,["div","ytp-action-buttons"]);this.g=new Et(a,"ytp-button-info",a.getMsg("YTP_BUTTON_INFO"));L(this,this.g);this.g.V(this.element);this.i=new Et(a,"ytp-button-share",a.getMsg("YTP_BUTTON_SHARE"));L(this,this.i);this.i.V(this.element);this.a=new Et(a,"ytp-button-dislike",a.getMsg("YTP_BUTTON_DISLIKE"));L(this,this.a);this.listen(this.a,"click",this.j);this.a.V(this.element);this.b=new Et(a,"ytp-button-like",a.getMsg("YTP_BUTTON_LIKE"));L(this,this.b);this.listen(this.b,"click",
333 this.o);this.b.V(this.element);this.b.hide();this.a.hide()}y(It,Z);It.prototype.o=function(){Gt(this.b);Ht(this.a)};It.prototype.j=function(){Gt(this.a);Ht(this.b)};function Jt(a){var b=ke("/signin?context=popup","next",document.location.protocol+"//"+document.domain+"/post_login"),b=ke(b,"feature","sub_button");if(b=window.open(b,"loginPopup","width=375,height=440,resizable=yes,scrollbars=yes",!0)){var c=Gr("LOGGED_IN",function(b){Kr();a(b)});af("LOGGED_IN_PUBSUB_KEY",c);b.moveTo((screen.width-375)/2,(screen.height-440)/2)}}pa("yt.pubsub.publish",Lr);function Kt(){this.a={}}y(Kt,Ur);ca(Kt);f=Kt.prototype;f.fj="tooltip";f.ej=0;f.register=function(){Vr(this,"mouseover",this.Xp);Vr(this,"mouseout",this.Tl);Vr(this,"click",this.Tl);Vr(this,"touchstart",this.Sx);Vr(this,"touchend",this.cq);Vr(this,"touchcancel",this.cq)};f.mq=function(){return!(this.g&&0==pc.indexOf("6"))};
334 f.Xp=function(a){if(!(this.ej&&1E3>x()-this.ej)){var b=parseInt(G(a,"tooltip-hide-timer"),10);b&&(this.removeData(a,"tooltip-hide-timer"),I(b));var b=v(function(){Lt(this,a);this.removeData(a,"tooltip-show-timer")},this),c=parseInt(G(a,"tooltip-show-delay"),10)||0,b=H(b,c);Oe(a,"tooltip-show-timer",b.toString());a.title&&(Wr(a,Mt(a)),a.title="")}};
335 f.Tl=function(a){var b=parseInt(G(a,"tooltip-show-timer"),10);b&&(I(b),this.removeData(a,"tooltip-show-timer"));b=v(function(){Nt(this,a);this.removeData(a,"tooltip-hide-timer")},this);b=H(b,50);Oe(a,"tooltip-hide-timer",b.toString());if(b=G(a,"tooltip-text"))a.title=b};f.Sx=function(a,b){this.ej=0;var c=Qr(b,$(this),null[0].target);this.Xp(c)};f.cq=function(a,b){this.ej=x();var c=Qr(b,$(this),null[0].target);this.Tl(c)};function Ot(a,b){Wr(a,b);var c=G(a,"content-id");if(c=Jc(c))c.innerHTML=b}
336 function Mt(a){return G(a,"tooltip-text")||a.title}
337 function Lt(a,b){if(b){var c=Mt(b);if(c){var d=Jc(Pt(a,b));if(!d){d=document.createElement("div");d.id=Pt(a,b);d.className=$(a,"tip");var e=document.createElement("div");e.className=$(a,"tip-body");var g=document.createElement("div");g.className=$(a,"tip-arrow");var h=document.createElement("div");h.className=$(a,"tip-content");var k=Qt(a,b),m=Pt(a,b,"content");h.id=m;Oe(b,"content-id",m);e.appendChild(h);k&&d.appendChild(k);d.appendChild(e);d.appendChild(g);(Cf()||document.body).appendChild(d);Ot(b,
338 c);(c=parseInt(G(b,"tooltip-max-width"),10))&&e.offsetWidth>c&&(e.style.width=c+"px",Ac(h,$(a,"normal-wrap")));h=Dc(b,$(a,"reverse"));Rt(a,b,d,e,k,h)||Rt(a,b,d,e,k,!h);var p=$(a,"tip-visible");H(function(){Ac(d,p)},0)}}}}
339 function Rt(a,b,c,d,e,g){Ec(c,$(a,"tip-reverse"),g);var h=0;g&&(h=1);a=Bd(b);g=new A((a.width-10)/2,g?a.height:0);var k=td(b);Nr(new A(k.x+g.x,k.y+g.y),c,h);h=Oc(window);k=wd(c);c=Bd(d);var m=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<k.y+a.height);a=!!(k.y<a.height);g=!!(k.x<m);h=!!(h.width<k.x+m);k=(c.width+3)/-2- -5;b=G(b,"force-tooltip-direction");if("left"==b||g)k=-5;else if("right"==b||h)k=20-c.width-3;d.style.left=Math.floor(k)+
340 "px";return!(e||a)}function Nt(a,b){if(b){var c=Jc(Pt(a,b));c&&(St(c),F(c),a.removeData(b,"content-id"))}}function Pt(a,b,c){a=$(a);var d=b.__yt_uid_key;d||(d=Re(),b.__yt_uid_key=d);b=a+d;c&&(b+="-"+c);return b}function Qt(a,b){var c=null;Xb&&Dc(b,$(a,"masked"))&&((c=Jc("yt-uix-tooltip-shared-mask"))?(c.parentNode.removeChild(c),Rn(c)):(c=document.createElement("iframe"),c.src='javascript:""',c.id="yt-uix-tooltip-shared-mask",c.className=$(a,"tip-mask")));return c}
341 function St(a){var b=Jc("yt-uix-tooltip-shared-mask"),c=b&&hd(b,function(b){return b==a},!1,2);b&&c&&(b.parentNode.removeChild(b),Sn(b),document.body.appendChild(b))};function Tt(){this.a={};this.i=[]}y(Tt,Ur);ca(Tt);Tt.prototype.fj="subscription-button";
342 Tt.prototype.register=function(){Vr(this,"click",this.Cp);this.i.push(Gr("subscription-subscribe-loading",this.Bp,this),Gr("subscription-subscribe-loaded",this.Ap,this),Gr("subscription-unsubscirbe-loading",this.Bp,this),Gr("subscription-unsubscribe-loaded",this.Ap,this),Gr("subscription-subscribe-success",this.Rw,this),Gr("subscription-unsubscribe-success",this.Sw,this),Gr("subscription-enable-ypc",this.Qw,this),Gr("subscription-disable-ypc",this.Pw,this))};
343 var Ut={Wp:"hover-enabled",Mx:"yt-uix-button-subscribe",Nx:"yt-uix-button-subscribed",aA:"ypc-enabled",ay:"yt-uix-button-subscription-container",by:"yt-subscription-button-disabled-mask-container"},Vt={oA:"channel-external-id",Ox:"subscriber-count-show-when-subscribed",Px:"subscriber-count-tooltip",Qx:"subscriber-count-title",NB:"href",iq:"is-subscribed",uC:"parent-url",LC:"sessionlink",Rx:"style-type",jq:"subscription-id",VC:"target",Tx:"ypc-enabled",aq:"ypc-item-type",$p:"ypc-item-id",bq:"ypc-offers-url"};
344 f=Tt.prototype;f.Cp=function(a){var b=G(a,"href"),c=!!ef("subscription_ajax");if(b)a=G(a,"target")||"_self",window.open(b,a);else if(c){var b=G(a,"channel-external-id"),c=G(a,"sessionlink"),d;if(G(a,"ypc-enabled")){d=G(a,Vt.aq);var e=G(a,Vt.$p),g=G(a,Vt.bq);d={itemType:d,itemId:e,offersUrl:g,subscriptionElement:a}}else d=null;e=G(a,"parent-url");G(a,"is-subscribed")?(g=G(a,"subscription-id"),Lr("subscription-unsubscribe",b,g,d,a,c,e)):Lr("subscription-subscribe",b,d,a,c,e)}else Wt(this,a)};
345 f.Bp=function(a){this.$f(a,this.gq,!0)};f.Ap=function(a){this.$f(a,this.gq,!1)};f.Rw=function(a,b){this.$f(a,this.hq,!0,b)};f.Sw=function(a){this.$f(a,this.hq,!1)};f.Qw=function(a){this.$f(a,this.Wx)};f.Pw=function(a){this.$f(a,this.Vx)};f.hq=function(a,b,c){b?(Oe(a,Vt.iq,"true"),c&&Oe(a,Vt.jq,c)):(this.removeData(a,Vt.iq),this.removeData(a,Vt.jq));Xt(a)};f.gq=function(a,b){var c=gd(a,Ut.ay);Ec(c,Ut.by,b);a.setAttribute("aria-busy",b?"true":"false");a.disabled=b};
346 function Xt(a){var b=G(a,Vt.Rx),c=!!G(a,"is-subscribed"),b="-"+b,d=Ut.Nx+b;Ec(a,Ut.Mx+b,!c);Ec(a,d,c);G(a,Vt.Px)&&!G(a,Vt.Ox)&&(b=$(Kt.getInstance()),Ec(a,b,!c),a.title=c?"":G(a,Vt.Qx));c?H(function(){Ac(a,Ut.Wp)},1E3):Bc(a,Ut.Wp)}f.Wx=function(a){var b=!!G(a,Vt.aq),c=!!G(a,Vt.$p),d=!!G(a,Vt.bq);!G(a,"ypc-enabled")&&b&&c&&d&&(Ac(a,"ypc-enabled"),Oe(a,Vt.Tx,"true"))};f.Vx=function(a){G(a,"ypc-enabled")&&(Bc(a,"ypc-enabled"),this.removeData(a,"ypc-enabled"))};
347 function Yt(a,b){var c=Kc($(a));return Ja(c,function(a){return b==G(a,"channel-external-id")},a)}f.my=function(a,b,c){var d=cb(arguments,2);z(a,function(a){b.apply(this,Za(a,d))},this)};f.$f=function(a,b,c){var d=Yt(this,a),d=Za([d],cb(arguments,1));this.my.apply(this,d)};function Wt(a,b){var c=v(function(a){a.subscription_ajax&&df("subscription_ajax",a.subscription_ajax);this.Cp(b)},a);Jt(c)};function Zt(a){this.b=a||1;In.call(this,30*this.b,30*this.b);this.o=this.width/2;this.i=this.height/2;this.B=0;this.Z.translate(this.o,this.i)}y(Zt,In);Zt.prototype.show=function(){Zt.C.show.call(this);var a=this.G;this.j=new Date;this.g(a,125)};
348 Zt.prototype.G=function(){this.Z.clearRect(-this.o,-this.i,this.width,this.height);for(var a=this.B++%8,b=0;8>b;b++){var c=2*Math.PI/8*(a+b),d=11*this.b*Math.cos(c),c=11*this.b*Math.sin(c),e=(b+1)/9;this.Z.beginPath();this.Z.arc(d,c,4*this.b,0,2*Math.PI,!1);this.Z.fillStyle="rgba(189, 189, 189, "+e+")";this.Z.fill()}};Zt.prototype.hide=function(){I(this.a);Zt.C.hide.call(this)};function $t(){Z.call(this,["div","ytp-sentiment-display",["div","ytp-sentiment-bar",["div","ytp-sentiment-bar-likes"],["div","ytp-sentiment-bar-dislikes"]],["div","ytp-sentiment-text","{{sentiment}}"]]);this.b=this.template.a["ytp-sentiment-bar-likes"];this.a=this.template.a["ytp-sentiment-bar-dislikes"]}y($t,Z);$t.prototype.F=function(){this.a=this.b=null;$t.C.F.call(this)};function au(a){a=["button","ytp-button-share-more",["div","ytp-button-share-more-icon yt-uix-button-icon-new-window"],["span","ytp-button-share-more-content",a.getMsg("YTP_BUTTON_MORE_SHARE")]];Z.call(this,a)}y(au,Z);function bu(a,b,c,d){En.call(this,a,"share-service-icon-"+d+"-sharebar",b,c);V(this.element,"share-service-icon-sharebar")}y(bu,En);function cu(){Z.call(this,["div","ytp-share-url-container",["input","ytp-share-url"]]);this.a=this.template.a["ytp-share-url"]}y(cu,Z);cu.prototype.F=function(){this.a=null;cu.C.F.call(this)};function du(a,b,c){R.call(this);this.a=a;this.g=b;this.i=c;this.gb=new Uo(this);this.j=this.b=this.k=this.ka=null;this.A=this.o=!1}y(du,R);f=du.prototype;f.Wj=function(){var a=E("html5-title",this.a);this.k=E("html5-title-text",a);this.gb.listen(this.k,"click",this.En);this.b=new It(this.i);this.b.V(a,1);this.gb.listen(this.b.g,"click",this.kk);this.g.of&&this.b.g.hide();this.gb.listen(this.b.i,"click",this.di)};f.reset=function(){};
349 f.update=function(a){this.ka=a;this.reset();ad(this.k,a.title||"");Rn(this.a)};f.En=function(){this.Mi(this.ka.Oc||eu(this.g,this.ka))};f.kk=function(){if(!this.o){this.o=!0;sn(this.ka?this.ka.L:void 0,!1,this.Fs,ba,this,this.g.Ea,this.g.Ua);if(!this.j){var a=E("html5-info-panel-loading-icon",this.a);this.j=new Zt;V(this.j.element,"html5-info-panel-loader");this.j.V(a);L(this,this.j)}this.j.show()}Ht(this.b.i);W(this.a,"show-share");a=this.b.g;a.b?Ht(a):Gt(a);return Rm(this.a,"show-more-info")};
350 f.di=function(a){Ht(this.b.g);W(this.a,"show-more-info");if("detailpage"!=this.g.Y){if(!this.A){this.A=!0;var b={action_get_share_info:1,feature:"player_embedded",video_id:this.ka?this.ka.L:void 0};this.g.Ea&&(b.authuser=this.g.Ea);this.g.Ua&&(b.pageid=this.g.Ua);Qj("/share_ajax",{Z:this,method:"GET",onError:this.Rt,Qa:this.St,yf:b})}a&&a.stopPropagation();a=this.b.i;a.b?Ht(a):Gt(a);Rm(this.a,"show-share")}};
351 f.Fs=function(a,b){if(!this.ha()){var c=E("html5-info-panel",this.a),d=b.user_info;this.ka&&(this.ka.va=d.external_id);var e=E("html5-author-img",c).getElementsByTagName("img")[0];e.src=d.image_url;this.gb.listen(e,"click",this.Wn);e=E("html5-author-name",c);ad(e,d.username);this.gb.listen(e,"click",this.Wn);e=b.video_info;e.subscription_ajax_token&&df("subscription_ajax",e.subscription_ajax_token);var g=E("html5-subscribe-button-container",c);g.innerHTML=d.subscription_button_html?d.subscription_button_html:
352 "";d=Tt.getInstance();(d=E($(d),g))&&fu(this.i,d);E("html5-view-count",c).innerHTML=e.view_count_string;var h=parseInt(e.likes_count_unformatted,10),g=parseInt(e.dislikes_count_unformatted,10),d=new $t,k=0,m=0;0<h+g&&(k=100*h/(h+g),m=100*g/(h+g));d.b.style.width=k+"%";d.a.style.width=m+"%";h=mf("YTP_SENTIMENT_LIKE",h);g=mf("YTP_SENTIMENT_DISLIKE",g);nn(d.template,"sentiment",h+", "+g);d.V(E("html5-video-info",c),2);d=E("html5-description-text",c);ad(d,e.description);this.j.hide();c=E("html5-info-panel-content",
353 c);Rn(c)}};
354 f.St=function(a,b){if(!this.ha()){var c=E("share-bar"),d=new cu;Mc(d.a,{value:b.url_short});d.V(c);Om(this.a,"show-share")&&(d.a.focus(),d.a.select());for(var d=b.links,e=0;e<Math.min(3,d.length);e++){var g=new bu(this.i,d[e].name,d[e].sname,d[e].img);g.V(c);this.gb.listen(g,"click",oa(ns,d[e].url,{}))}d=new au(this.i);this.gb.listen(d,"click",v(this.Mi,this,b.more));d.V(c);d=new En(this.i,"yt-uix-button-icon-share-bar-close",this.i.getMsg("YTP_BUTTON_CLOSE"),this.i.getMsg("YTP_BUTTON_CLOSE"));d.V(c);
355 this.gb.listen(d,"click",this.di)}};f.Rt=function(){};f.Wn=function(){var a=this.g,b=this.ka,c="",c=b.va?a.jb+"channel/UC"+b.va:a.jb+"user/"+b.author;this.Mi(c)};f.Mi=function(a){ms(a)};f.F=function(){this.gb.removeAll();this.ka=this.k=this.g=this.a=null;du.C.F.call(this)};function gu(){Z.call(this,["div","ytp-playlist-tray-index-length",["span","ytp-playlist-tray-index","{{index}}"],["span",""," / "],["span","ytp-playlist-tray-length","{{length}}"]])}y(gu,Z);gu.prototype.Mg=function(a){nn(this.template,"index",a+1)};function hu(a){Et.call(this,a,"ytp-button-expand",a.getMsg("YTP_BUTTON_EXPAND"),"ytp-button-collapse",a.getMsg("YTP_BUTTON_COLLAPSE"));this.Aa([["div","ytp-button-playlist-icon"],["div","ytp-button-playlist-text",a.getMsg("YTP_BUTTON_PLAYLIST")]])}y(hu,Et);function iu(a){Z.call(this,["div","ytp-playlist-tray-controller"]);this.b=new hu(a);this.b.V(this.template.N());L(this,this.b);this.a=new gu;this.a.V(this.template.N());L(this,this.a)}y(iu,Z);function ju(a,b,c,d){a=["div","ytp-playlist-tray-action-info",["div","ytp-playlist-tray-playlist-title",b],["div","ytp-playlist-tray-author-name",a.getMsg("YTP_AUTHOR_ATTRIBUTION",{author:c})],["div","ytp-playlist-tray-description-text",d]];Z.call(this,a)}y(ju,Z);function ku(a){var b=["div","ytp-playlist-tray-action-share",["div","ytp-playlist-tray-action-share-heading",a.getMsg("YTP_SHARE_PLAYLIST")],["div","share-bar-services"]];Z.call(this,b);this.i=a;this.g=new Uo(this);this.b=this.a=null}y(ku,Z);ku.prototype.F=function(){this.g.removeAll();this.g=null;ku.C.F.call(this)};function lu(a,b){Z.call(this,["div","ytp-playlist-tray-item",["span","ytp-playlist-tray-item-index","{{index}}"],["span","ytp-playlist-tray-item-now-playing","\u25b6"],["img","ytp-playlist-tray-item-thumbnail",{src:"{{image}}"}],["span","ytp-playlist-tray-item-title","{{title}}"],["span","ytp-playlist-tray-item-author","{{author}}"]]);this.a=b;this.template.update({index:b+1,title:a.title,author:a.author,image:$n(a.L)})}y(lu,Z);
356 lu.prototype.Mg=function(a){X(this.element,"ytp-playlist-tray-item-current",this.a==a)};function mu(){Z.call(this,["div","ytp-playlist-tray-tray"]);this.a=null;this.i=new Uo(this);this.b=[]}y(mu,Z);function nu(a,b){b!=a.a&&(a.a&&a.a.$("shuffle",a.g,a),a.a=b,a.a.D("shuffle",a.g,a),a.g())}mu.prototype.g=function(){this.i.removeAll();this.b=[];Xc(this.element);for(var a=0;a<=this.a.Mb-1;++a){var b=new lu(vh(this.a,a),a);b.Mg(this.a.ua);this.b.push(b);this.i.listen(b,"click",oa(this.j,a));b.V(this.element)}};
357 mu.prototype.j=function(a){a={index:a};var b=document.createEvent("CustomEvent");b.initCustomEvent("playvideoat",!0,!0,a||null);this.dispatchEvent(b)};mu.prototype.F=function(){this.i.removeAll();mu.C.F.call(this)};function ou(a){Tm.call(this,a);var b=Q(a);this.j=new Uo(this);this.k=a.app.S.B;this.i=new hn(["div",["ytp-playlist-tray-container","html5-stop-propagation"],["div",["ytp-playlist-tray-info","show-more-info"]]]);L(this,this.i);this.a.app.S.g.appendChild(this.i.N());this.g=new mu;this.j.listen(this.g,"playvideoat",v(function(b){a.um(b.detail.index)},a));L(this,this.g);this.g.V(this.i.N(),0);this.G=E("html5-playlist-button",b);J(this.G,"click",v(this.Km,this));this.B=this.A=null;this.I=!1;this.b=new iu(this.k);
358 this.b.V(E("html5-title",void 0),0);this.j.listen(this.b.b,"click",this.Km);this.D("fullscreentoggled",this.Bq,this);this.D("videodatachange",this.Cq,this);this.D("onResize",this.vm,this);this.D("clearvideooverlays",this.unload,this)}y(ou,Tm);f=ou.prototype;f.qa="playlist";f.create=function(){var a=this.a.vb();nu(this.g,a);for(var b=this.g,c=0;c<b.b.length;c++)b.b[c].Mg(b.a.ua);a.D("shuffle",this.su,this);ou.C.create.call(this)};
359 f.su=function(){this.b.a.Mg(this.a.ak());var a=Km(this.a.vb());nn(this.b.a.template,"length",a)};f.destroy=function(){this.a.vb()||(nu(this.g,null),ou.C.destroy.call(this))};f.load=function(){this.ba=!0;ou.C.load.call(this);Gt(this.b.b)};f.unload=function(){this.ba=!1;ou.C.unload.call(this);Ht(this.b.b)};
360 f.Km=function(){if(this.ba)this.unload();else if(this.u("command_clear_video_overlays"),this.load(),this.vm(),!this.A){var a=E("ytp-playlist-tray-info"),b=new It(this.k);b.V(a,0);this.j.listen(b.g,"click",this.hu);this.j.listen(b.i,"click",this.iu);b=this.a.vb();this.A=new ju(this.k,b.title,b.author,b.description);this.A.V(a)}};f.hu=function(){var a=E("ytp-playlist-tray-info");Ac(a,"show-more-info");Bc(a,"show-share")};
361 f.iu=function(){var a=E("ytp-playlist-tray-info");Bc(a,"show-more-info");Ac(a,"show-share");this.I||(this.B=new ku(this.k),this.B.V(a),this.I=!0,Qj("/share_ajax",{Z:this,method:"GET",onError:this.ev,Qa:this.fv,yf:{action_get_share_info:1,feature:"player_embedded",video_id:this.a.getVideoData().L,list:this.a.vb().g}}))};f.hide=function(){var a=E("ytp-playlist-tray-info");Bc(a,"show-more-info");Bc(a,"show-share")};
362 f.fv=function(a,b){var c=this.B;c.g.removeAll();var d=b.links,e=c.template.a["share-bar-services"];Xc(e);for(var g=0;g<Math.min(3,d.length);g++){var h=new bu(c.i,d[g].name,d[g].sname,d[g].img);h.V(e);c.g.listen(h,"click",oa(ns,d[g].url))}c.a&&F(c.a.element);c.a=new au(c.i);c.g.listen(c.a,"click",oa(ms,b.more));c.a.V(c.element);c.b&&F(c.b.element);c.b=new cu;Mc(c.b.a,{value:b.url_short});c.b.V(c.element)};f.ev=function(){};f.Bq=function(a){var b=this.a.J().Y;this.ba&&!a&&"detailpage"==b&&this.unload()};
363 f.Cq=function(){this.b.a.Mg(this.a.ak());var a=Km(this.a.vb());nn(this.b.a.template,"length",a)};f.vm=function(){var a=Bd(this.i.N());X(this.i.N(),"show-tray-panel",560<a.width)};f.Xa=function(a){return!!a.vb()};function pu(a){return a.vb()?new ou(a):null}f.F=function(){zf(this.G);this.G=null;ou.C.F.call(this)};var qu=RegExp("^(ar|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)","i");function ru(a,b){Qm(a,["html5-async-progress","html5-async-success","html5-async-error"]);b&&V(a,b);Nt(Kt.getInstance(),a)};function su(a,b,c,d){if(this.g=!!c)this.il=Math.max(800,this.il);this.element=a;this.G=b;this.k=d;tu?a.ontouchstart=v(this.cw,this):a.onmousedown=v(this.bw,this);a.onclick=v(this.Rn,this)}var tu="ontouchstart"in document,uu=[],vu=!1;function wu(){tu&&!vu&&(vu=!0,document.addEventListener("click",function(a){for(var b=new A(a.clientX,a.clientY),c=0,d;d=uu[c];c++)if(25>wb(d,b)){a.stopPropagation();a.preventDefault();uu.splice(c,1);break}},!0))}
364 function xu(a){uu.push(a);window.setTimeout(function(){var b=uu.indexOf(a);-1!=b&&uu.splice(b,1)},2500)}f=su.prototype;f.il=1E3;
365 f.cw=function(a){if(!(1<a.touches.length||a._stop)){this.a=a._stop=!0;this.g||(this.element.ontouchend=v(this.Rn,this),document.body.addEventListener("touchend",yu(this),!1));document.body.addEventListener("touchmove",zu(this),!1);document.body.addEventListener("touchcancel",yu(this),!1);Au(this,a);this.H=window.setTimeout(v(this.ri,this,!0),100);var b=a.touches[0];this.b=new A(b.clientX,b.clientY);this.g||this.k&&!this.k(a)||xu(this.b)}};
366 f.bw=function(a){a.stopPropagation();this.a=!0;Au(this,a);this.ri(!0)};f.Rn=function(a){"touchend"==a.type&&!this.a||a._stop||(a._stop=!0,this.ri(!0),window.setTimeout(v(function(){this.Ii();this.G(a)},this),0))};f.Vw=function(a){1<a.touches.length?this.Ii():(a=a.touches[0],a=new A(a.clientX,a.clientY),this.b&&12<wb(this.b,a)&&this.Ii())};function zu(a){a.i||(a.i=v(a.Vw,a));return a.i}
367 f.Ii=function(){window.clearTimeout(this.H);window.clearTimeout(this.A);this.ri(!1);this.a=!1;document.body.removeEventListener("touchmove",zu(this),!1);document.body.removeEventListener("touchend",yu(this),!1);document.body.removeEventListener("touchcancel",yu(this),!1)};function yu(a){a.j||(a.j=v(a.Ii,a));return a.j}f.ri=function(a){this.B&&Ec(this.element,this.B,a)};function Au(a,b){a.o&&(a.A=window.setTimeout(v(function(){this.a=!1;this.o(b)},a),a.il))};function Bu(a){En.call(this,a);Hn(this,15);Cu(this)}y(Bu,En);function Cu(a){Gn(a,"ytp-button-fullscreen-enter");var b=a.g.getMsg("YTP_BUTTON_FULLSCREEN_ENTER");a.Jb(b);a.a=b};function Du(){Z.call(this,["div",["ytp-menu","html5-stop-propagation"],"{{content}}"]);this.a=[];this.stopPropagation("click")}y(Du,Z);Du.prototype.add=function(a){for(var b=this.a.length,c=0;c<this.a.length;c++){if(this.a[c]==a)return;if(c<b&&this.a[c].priority<a.priority){b=c;break}}bb(this.a,b,0,a);Eu(this)};Du.prototype.remove=function(a){Wa(this.a,a);Eu(this)};
368 function Eu(a){var b;if(1==a.a.length)b=new Z(["div","ytp-menu-content",["div","ytp-menu-row",["div","ytp-menu-cell",a.a[0].label]],["div","ytp-menu-row",["div","ytp-menu-cell","{{content}}"]]]),b.Aa(a.a[0].element);else{b=new Z(["div","ytp-menu-content"]);for(var c=0;c<a.a.length;c++){var d=new Z(["div","ytp-menu-row",["div",["ytp-menu-cell","ytp-menu-title"],a.a[c].label],["div","ytp-menu-cell","{{content}}"]]);d.Aa(a.a[c].element);d.V(b.N())}}a.Aa(b)}Du.prototype.F=function(){this.a=null;Du.C.F.call(this)};function Fu(a){En.call(this,a);Hn(this,3);Gu(this)}y(Fu,En);function Gu(a){Gn(a,"ytp-button-play");var b=a.g.getMsg("YTP_BUTTON_PLAY");a.Jb(b);a.a=b};function Hu(a){Z.call(this,["div","ytp-playlist-controls","{{content}}"]);this.b=new En(a,"ytp-button-prev",a.getMsg("YTP_BUTTON_PREV"),a.getMsg("YTP_BUTTON_PREV"));L(this,this.b);this.a=new En(a,"ytp-button-next",a.getMsg("YTP_BUTTON_NEXT"),a.getMsg("YTP_BUTTON_NEXT"));L(this,this.a);this.Aa([this.b,this.a])}y(Hu,Z);function Iu(a,b,c,d){var e=Math.min(c/(b.bo/b.yi),d/(b.ao/b.rows)),g=b.bo*e,e=b.ao*e,g=Math.floor(g/b.yi)*b.yi,e=Math.floor(e/b.rows)*b.rows,h=g/b.yi,k=e/b.rows,m=Math.floor((c-h)/2);c=Math.ceil((c-h)/2);d=Math.floor((d-k)/2);kd(a,{width:h+"px",height:k+"px","margin-top":d+"px","margin-bottom":d+"px","margin-left":m+"px","margin-right":c+"px","background-image":"url("+b.url+")","background-position":-1*b.qu*h+"px "+-1*b.row*k+"px","background-size":g+"px "+e+"px"})};function Ju(){this.a=new js(this.Lv,250,this);L(this,this.a)}y(Ju,K);f=Ju.prototype;f.Fo=!1;f.yd=null;f.ac=null;f.Yh=null;f.dk=null;f.ek=null;f.Ag=null;f.Je=0;f.Ik=0;f.gl=0;f.Qo=10;f.Ob=0;f.Ki=0;f.nl=0;f.Zc=null;f.Qe=null;f.Te=0;f.disable=function(){this.Fo=!0};f.Va=function(a){this.Te=a};f.Bo=function(a,b){this.ac.style.display="none";for(var c,d,e=a;e<=b;e++)if(d=this.ac.children[e])c=Al(this.Qe,e,this.Ob),Iu(d,c,this.Ob,this.Ki);this.ac.style.display=""};
369 function Ku(a,b){if(b!=a.nl){var c=Al(a.Qe,b,2*a.Ob),d=Math.round(2*a.Ob),e=Math.round(2*a.Ki);Iu(a.dk,c,d,e);a.nl=b}}f.Lv=function(){for(var a=this.Ik,b=Math.max(Math.floor(a/this.Ob),0),a=Math.min(Math.ceil((a+this.Je)/this.Ob),this.Zc.a[0].b-1);b<=a;b++){for(var c=this.Qe,d=b,e=bl(c.a,2*this.Ob),g=void 0,h=void 0;0<=e;e--)if(g=c.a.a[e],h=Math.floor(d/(g.a*g.g)),!g.i[h]){var g=c,k=e,m=k+"-"+h;g.i[m]||(g.i[m]=!0,xl(g.g,k,{xn:k,yn:h}))}Bl(c)}};
370 function Lu(a,b){a.Qo=Math.min(10,Math.ceil(a.Je/72));a.Ob=Math.floor(a.Je/a.Qo);a.Ki=0.555*a.Ob;a.gl=a.Ob*a.Zc.a[0].b;Ad(a.ac,a.gl);var c=Math.round(2*a.Ob),d=0.555*c+12;zd(a.Yh,c,d);od(a.Yh,(a.Je-c)/2);a.yd.style.height=pd(d+20,!0);b&&(a.Bo(0,a.Zc.a[0].b-1),Ku(a,a.nl))}f.F=function(){this.Ag=this.ek=this.dk=this.Yh=this.ac=this.yd=this.Qe=this.Zc=null;Ju.C.F.call(this)};function Mu(a,b,c,d){this.width=b;this.a=c;this.i=d;this.b=b-c-d;this.g=vb(a-c,0,this.b);this.position=this.g+c;this.xd=this.g/this.b};function Nu(){Z.call(this,["div",["ytp-progress-magnifier","html5-draggable"],["div","ytp-progress-magnifier-play-progress"],["div","ytp-progress-magnifier-load-progress"],["div","ytp-progress-magnifier-scrubber-button"]]);this.i=this.template.a["ytp-progress-magnifier-load-progress"];this.o=0;this.j=this.template.a["ytp-progress-magnifier-play-progress"];this.B=0;this.b=[];this.g=this.template.a["ytp-progress-magnifier-scrubber-button"]}y(Nu,Z);
371 function Ou(a,b){var c=a.a,d=c.width-4,e=d-2*a.Te;if(ga(b))var d=Pu(a).position,g=a.N().offsetWidth/2,d=vb(b,d-g,d+g);else d=2+c.xd*d;return new Mu(d,c.width,2+c.xd*e,2+(1-c.xd)*e)}function Pu(a){var b=a.a;a=a.N().offsetWidth/2+2;return new Mu(b.position,b.width,a,a)}Nu.prototype.disable=function(){this.a=null};
372 function Qu(a,b){if(a.a){var c=a.N(),d=Pu(a),e=Ou(a),g=c.offsetWidth/2,h=d.position-g,d=d.position+g;c.style.left=h+"px";var k=a.o*e.b+e.a,m=a.B*e.b+e.a,p=a.g.offsetWidth,s=m-h-p/2;s>-p&&s<2*g+p?(a.g.style.left=s+"px",on(a.g)):pn(a.g);m-=h;0<=m?(Ad(a.j,Math.min(m,2*g)),on(a.j)):pn(a.j);k-=h;0<=k?(Ad(a.i,Math.min(k,2*g)),on(a.i)):pn(a.i);if(b){g=(h-e.a)/2/60;e=(d-e.a)/2/60;h=0;for(d=Math.ceil(g);d<=e;d++)h<a.b.length?k=a.b[h]:(k=document.createElement("div"),a.b[h]=k,c.appendChild(k)),k.className=
373 0==d%60?"ytp-progress-magnifier-60m":0==d%30?"ytp-progress-magnifier-30m":0==d%15?"ytp-progress-magnifier-15m":"ytp-progress-magnifier-1m",k.style.left=120*(d-g)+"px",h++;for(;h<a.b.length;)F(a.b.pop())}}}Nu.prototype.Va=function(a){this.Te=a;Qu(this,!0)};Nu.prototype.F=function(){this.g=this.b=this.j=this.i=null;Nu.C.F.call(this)};function Ru(){}y(Ru,K);f=Ru.prototype;f.ki=!1;f.Te=0;f.Hb=null;f.Lh=null;f.fk=null;f.wj=null;f.Jg=null;f.ih=null;f.disable=function(){this.ki=!0};f.show=function(){this.ki||Rn(this.Hb)};f.hide=function(){Sn(this.Hb)};f.Va=function(a){this.Te=a};f.reset=function(){W(this.Hb,"with-thumbnail");this.ih=this.Jg=null};f.Uu=function(a,b){(a<=this.a||this.a<=b)&&Su(this)};function Su(a){var b=Al(a.ih,a.a,108);Iu(a.fk,b,108,60)}f.F=function(){this.wj=this.fk=this.Lh=this.Hb=this.ih=this.Jg=null;Ru.C.F.call(this)};function Tu(a){R.call(this);this.bb=a;this.va=null;this.K={};this.aa=Infinity;this.X=this.U=this.M=null;this.ia=0;this.o=this.g=this.G=null;this.k=new Uo(this);this.Sa="";this.Na=null;this.ja=0;this.ib=null;this.ya=0;this.a=this.b=this.Ta=this.i=this.Q=this.ga=null;this.za=new Uo(this);this.pa=null;this.Ka=new Uo(this);this.A=this.I=!1;this.O=this.P=this.fa=null;this.j=this.Ma=this.ma=this.B=0}y(Tu,R);
374 function Uu(a,b){a.g=b;a.i=E("html5-progress-bar",a.g);a.k.listen(a.i,"click",a.Th);Vo(a.k,a.i,"down",a.Bv);a.Sa=Vo(a.k,a.i,"over",a.qn);a.Q=E("html5-progress-list",a.i);a.ib=E("html5-play-progress",a.Q);a.Na=E("html5-load-progress",a.Q);a.ga=E("html5-highlight",a.Q);a.va=E("html5-ad-progress-list",a.i);a.pa=E("html5-scrubber-button",a.i);a.U=E("html5-clip-exclusion",a.i);a.X=a.U.cloneNode(!1);a.U.parentNode.appendChild(a.X);a.G=E("html5-clip-start",a.i);Vo(a.k,a.G,"over",a.fp);Vo(a.k,a.G,"out",a.ep);
375 a.k.listen(a.G,"click",a.tl);a.M=E("html5-clip-end",a.i);Vo(a.k,a.M,"over",a.fp);Vo(a.k,a.M,"out",a.ep);a.k.listen(a.M,"click",a.tl);a.Ta=E("html5-progress-screenreader",a.i)}f=Tu.prototype;
376 f.qn=function(a){if(!this.I){this.k.dc(this.Sa);this.A=!1;this.P=this.fa=a=new A(a.pageX,a.pageY);if(this.a&&5400<=this.B){I(this.ma);this.a.show();Rn(this.ga);a=this.a;var b=Vu(this);a.a=b;Qu(a,!0);a=oa(V,this.g,"html5-progress-magnifier-hover");this.ma=H(a,0)}this.b&&this.b.show();Vo(this.za,this.g,"move",this.wn);Vo(this.za,this.g,"out",this.Ut)}};function Wu(a){a.A=!1;I(a.ma);W(a.g,"html5-progress-magnifier-hover");var b=Er(a.a.N());a.ma=H(v(function(){this.a.hide();Sn(this.ga)},a),b)}
377 f.Ut=function(a){this.I||a.relatedTarget&&!(this.b&&$c(this.b.Hb,a.relatedTarget)||!$c(this.g,a.relatedTarget))||Xu(this)};
378 f.wn=function(a){var b=new A(a.pageX,a.pageY);if(this.a&&this.a.a)if(this.I)this.A?this.O=b:this.P=b;else{var c=Dd(this.a.N());if(c.contains(b))this.O=b,this.A=!0;else{var d=Dd(this.Q),e=this.fa.y-a.pageY;if(a.pageX>=c.left&&a.pageY>=c.top&&a.pageX<c.left+c.width||d.contains(b)){c=6*e-6;if(a.pageX>=this.fa.x-c&&a.pageX<=this.fa.x+c)return;this.A=!1;this.fa=this.P=b}else{Xu(this);return}}}else this.P=b;Yu(this)};
379 function Yu(a){if(a.a&&a.a.a){var b=Dd(a.a.N());if(a.I&&a.A){var c=b.left,b=c+b.width;a.j=c>a.O.x?a.O.x-c:b<a.O.x?a.O.x-b:0}c=a.a;b=Vu(a);c.a=b;Qu(c,!0);var d=a.a,c=Ou(d),b=Pu(d),d=d.N().offsetWidth,e=b.position-d/2,c=new Mu(c.position,d,c.a-e,c.i-(b.width-e-d)),b=Math.max(c.width/c.b,0.015);a.ga.style.left=Math.round(1E3*((c.width/2-c.a)/c.b-b/2))/10+"%";a.ga.style.width=Math.round(1E3*b)/10+"%"}a.b&&(c=a.b,a=Zu(a),c.ki||(b=c.Hb.offsetWidth/2,d=new Mu(a.position,a.width,b,b),c.Hb.style.left=d.position-
380 b+"px",b=c.Lh.offsetWidth/2,d=new Mu(a.position,a.width,b,b),c.Lh.style.left=d.position-c.Hb.offsetLeft-b+"px",ad(c.wj,Nn(a.xd*c.Te)),c.Jg&&(a=al(c.Jg,a.xd),a!=c.a&&(c.a=a,Su(c)))))}f.Ww=function(){var a;if(0>this.j)a=0.15*this.j-0.1,this.j-=a,0<this.j&&(this.j=0);else if(0<this.j)a=0.15*this.j+0.1,this.j-=a,0>this.j&&(this.j=0);else return;var b=td(this.g).x;this.P.x=vb(this.P.x+a,b,b+Vu(this).width);Yu(this);a=Zu(this);$u(this,a.xd,this.ja);this.u("seekto",a.xd*this.B,!1)};
381 function Xu(a){a.za.removeAll();a.b&&a.b.hide();a.a&&a.a.a&&(a.a.disable(),Wu(a));a.Sa=Vo(a.k,a.i,"over",a.qn)}f.Bv=function(a){a.stopPropagation();a.preventDefault();this.b&&this.b.hide();this.a&&this.a.a&&Wu(this);av(this);this.Th(a)};f.Gs=function(a){a.stopPropagation();a.preventDefault();this.A=!0;av(this);this.Th(a)};function av(a){a.I=!0;a.u("beginseeking");Vo(a.Ka,document,"move",a.Th);Vo(a.Ka,document,"up",a.Xw);a.A&&(a.Ma=gf(v(a.Ww,a),20))}
382 f.Xw=function(a){a.stopPropagation();this.I=!1;this.Ka.removeAll();hf(this.Ma);Xu(this);this.u("endseeking")};f.Th=function(a){a.stopPropagation();a.preventDefault();this.wn(a);a=this.A?Zu(this):Vu(this);var b=a.xd*this.B;$u(this,a.xd,this.ja);(b<this.ia||b>this.aa)&&this.tl();this.u("seekto",b,!this.I)};function Zu(a){return a.a&&a.a.a?a.A?Ou(a.a,a.O.x-td(a.g).x):Ou(a.a):Vu(a)}function Vu(a){return new Mu(a.P.x-td(a.g).x,a.Q.clientWidth,a.pa.clientWidth/2,a.pa.clientWidth/2)}
383 function bv(a,b,c){$u(a,q(b)&&!a.I?b:a.ya,q(c)?c:a.ja)}function $u(a,b,c){a.ya=b;var d=Math.round(1E3*b)/10;kd(a.ib,"transform","scalex("+b+")");a.pa.style.left=d+"%";a.ja=Math.max(a.ya,c);kd(a.Na,"transform","scalex("+a.ja+")");a.a&&(a=a.a,a.B=b,a.o=c,Qu(a,!1))}f.Va=function(a){this.B=a;cv(this);this.a&&this.a.Va(a)};
384 function cv(a){var b=0<a.ia,c=0<a.B&&a.aa<a.B;X(a.G,"html5-clip-enabled",b);X(a.U,"html5-clip-enabled",b);X(a.M,"html5-clip-enabled",c);X(a.X,"html5-clip-enabled",c);b&&(a.G.style.left=100*a.ia/a.B+"%",a.U.style.width=a.G.style.left);c&&(b=Math.min(100,100*a.aa/a.B),a.M.style.left=b+"%",a.X.style.left=b+"%",a.X.style.width=100-b+"%")}f.fp=function(){V(this.g,"html5-clip-marker-hover")};f.ep=function(){W(this.g,"html5-clip-marker-hover")};
385 f.tl=function(a){a&&a.stopPropagation();this.ia=0;cv(this);this.aa=Infinity;cv(this)};function dv(a,b){b=vb(Math.round(100*b),0,100);if(!a.K[b]){var c=document.createElement("div");c.style.left=b+"%";Pm(c,["html5-ad-progress","html5-progress-section"]);a.va.appendChild(c);a.K[b]=c}}function ev(a,b){b=vb(Math.round(100*b),0,100);a.K[b]&&(F(a.K[b]),a.K[b]=null)}
386 f.F=function(){I(this.ma);hf(this.Ma);this.k.removeAll();this.za.removeAll();this.Ka.removeAll();this.va=null;this.K={};this.pa=this.Ta=this.Q=this.i=this.ib=this.Na=this.g=this.G=this.X=this.U=this.M=null;Tu.C.F.call(this)};function fv(a,b,c){Z.call(this,["div","ytp-drop-down","{{content}}"]);this.o=a;this.g=!1;this.j=0;this.a=new Z(["div","ytp-drop-down-menu","{{content}}"]);L(this,this.a);this.b=new En(this.o,"ytp-drop-down-label");L(this,this.b);this.listen(this.b,"click",this.B);this.i=new Z(["div","ytp-drop-down-label-content","{{content}}"]);L(this,this.i);this.b.Aa([this.i,["div","ytp-drop-down-arrow"]]);this.Aa([this.a,this.b]);this.stopPropagation("click");q(b)&&this.Jb(b);q(c)&&(this.a.Aa(c),gv(this));gv(this)}
387 y(fv,Z);fv.prototype.Jb=function(a){this.i.Aa(a);gv(this)};fv.prototype.k=function(){this.g=!1;gv(this)};fv.prototype.B=function(){this.g=!this.g;gv(this)};function hv(a,b){b>a.j&&(a.j=b,a.element.style.minWidth=a.j+"px")}function gv(a){a.g?(a.a.show(),a.listen(window,"blur",a.k,a,"menu"),a.listen(document,"click",a.k,a,"menu")):(a.a.hide(),a.dc(a.A.menu),a.A.menu=[]);var b=Bd(a.b.N());a.a.N().style.bottom=b.height-1+"px";hv(a,b.width)}fv.prototype.F=function(){this.o=null;fv.C.F.call(this)};function iv(a){En.call(this,a,"ytp-drop-down-menu-button");this.i=new Z(["div","ytp-drop-down-menu-button-check"]);L(this,this.i)}y(iv,En);iv.prototype.Aa=function(a){iv.C.Aa.call(this,[this.i,a])};iv.prototype.Ya=function(a){X(this.element,"ytp-drop-down-menu-button-selected",a)};function jv(a){Z.call(this,["span"]);this.element.innerHTML=a}y(jv,Z);function kv(a){ys.call(this);this.g=a;this.b={};this.j=new Z(["div","ytp-menu-drop-down-content"]);L(this,this.j);this.a="auto";this.i=!0;this.label=this.g.getMsg("YTP_QUALITY_TITLE");this.element=new fv(a,void 0,this.j);L(this,this.element);hv(this.element,100);lv(this,this.a,this.a);this.priority=-1}y(kv,ys);function mv(a,b){nv(a);z(b,function(a){var b=new iv(this.g);b.Aa(new jv(ov(this,a)));b.V(this.j.N());this.b[a]=b;J(b,"click",v(this.k,this,a))},a);a.b[a.a]&&a.b[a.a].Ya(!0)}
388 kv.prototype.We=function(){return this.a};function lv(a,b,c){a.a&&a.b[a.a]&&a.b[a.a].Ya(!1);a.a=b;a.b[a.a]&&a.b[a.a].Ya(!0);a.i="auto"==c;a.i&&c!=b?a.element.Jb(pv(a,b)):a.element.Jb(new jv(ov(a,c)))}function ov(a,b){return a.g.getMsg("YTP_QUALITY_"+b.toUpperCase())}function pv(a,b){var c=a.g.getMsg("YTP_QUALITY_AUTO_WITH_QUALITY",{video_quality:ov(a,b)});return new jv(c)}function nv(a){Eb(a.b,function(a){Sg(a)});a.b={}}
389 kv.prototype.k=function(a){this.element.k();this.i&&"auto"==a||(lv(this,a,a),Af(this.element,"change"))};kv.prototype.F=function(){nv(this);this.g=null;kv.C.F.call(this)};function qv(a){Et.call(this,a,"ytp-settings-button",a.getMsg("YTP_TOOLTIP_SETTINGS"),"ytp-settings-button-active");Hn(this,10);this.i=new Z(["div","ytp-settings-hd-quality-badge"]);L(this,this.i);this.Aa(this.i);this.i.hide()}y(qv,Et);function rv(a){ys.call(this);this.label=a.getMsg("YTP_PLAYER_SIZE_TITLE");this.element=new zs(a,["ytp-size-control-small","ytp-size-control-large"],!0);L(this,this.element);this.priority=0}y(rv,ys);rv.prototype.getSelected=function(){return this.element.getSelected()};rv.prototype.Ya=function(a){this.element.Ya(a)};function sv(a){ys.call(this);this.g=a;this.a={};this.b=1;this.i=new Z(["div","ytp-menu-drop-down-content"]);L(this,this.i);this.label=this.g.getMsg("YTP_PLAYER_SPEED_TITLE");this.element=new fv(a,void 0,this.i);L(this,this.element);hv(this.element,100);this.priority=1}y(sv,ys);function tv(a,b){uv(a);z(b,function(a){var b=new iv(this.g);b.Aa(vv(this,a));b.V(this.i.N());this.a[a]=b;J(b,"click",v(this.j,this,a))},a);a.a[a.b]&&a.a[a.b].Ya(!0)}
390 function wv(a,b){a.b&&a.a[a.b]&&a.a[a.b].Ya(!1);a.b=b;a.a[a.b]&&a.a[a.b].Ya(!0);a.element.Jb(vv(a,b))}function vv(a,b){return 1==b?a.g.getMsg("YTP_PLAYER_SPEED_NORMAL"):b.toString()}function uv(a){Eb(a.a,function(a){Sg(a)});a.a={}}sv.prototype.j=function(a){this.element.k();wv(this,a);Af(this.element,"change")};sv.prototype.F=function(){uv(this);this.g=null;sv.C.F.call(this)};function xv(){Z.call(this,["div",["ytp-time-display","html5-control"],["span","ytp-time-current","{{current}}"],["span","ytp-time-separator"," / "],["span","ytp-time-duration","{{duration}}"],["span","ytp-time-live-badge","Live"]]);this.a=this.template.a["ytp-time-live-badge"]}y(xv,Z);xv.prototype.Va=function(a){nn(this.template,"duration",Nn(a))};xv.prototype.F=function(){this.a=null;xv.C.F.call(this)};function yv(a){R.call(this);this.b=a;this.a=new Uo(this);this.A=new Uo(this);this.k=this.j=null;this.o=new Uo(this)}y(yv,R);f=yv.prototype;f.qf=null;f.Ec=null;f.Ne=null;f.ok=null;f.ae=null;f.yc=null;f.vf=null;f.cc=null;f.Cg=null;f.Yd=null;f.Ee=null;f.Xh=null;f.wd=null;f.Sc=null;f.wb=null;f.wf=null;f.Ie=null;f.Pl=!1;f.zc=null;f.Fd=null;f.Gd=null;f.Xn=!1;f.xg=null;f.xb=null;
391 function zv(a,b){a.qf=b;var c=E("html5-player-chrome",b);a.Ec=new Fu(a.b);a.Ec.V(c,0);L(a,a.Ec);new su(a.Ec.N(),v(a.Mt,a),!1,function(){return!0});a.Ne=new Hu(a.b);a.Ne.V(c,1);L(a,a.Ne);a.a.listen(a.Ne.a,"click",oa(a.u,"nextvideo"));a.a.listen(a.Ne.b,"click",oa(a.u,"previousvideo"));var d=E("html5-progress-bar-container",b);a.ok=new Tu(a.b);Uu(a.ok,d);a.g=new xv;a.g.V(c,4);L(a,a.g);a.a.listen(a.g.a,"click",oa(a.u,"seekto",Infinity));a.ae=E("html5-volume-control",b);a.a.listen(a.ae,"keydown",a.Nt);
392 a.yc=E("html5-volume-button",a.ae);a.a.listen(a.yc,"click",a.Bn);a.vf=E("html5-volume-panel",a.ae);a.cc=E("html5-volume-slider",a.ae);Vo(a.a,a.cc,"down",a.Jt);a.Cg=E("html5-volume-slider-foreground",a.ae);a.Xh=E("html5-threed-popup-menu",b);a.Ee=E("html5-small-player-button",b);a.a.listen(a.Ee,"click",a.An);a.Yd=E("html5-large-player-button",b);a.a.listen(a.Yd,"click",a.An);a.i=new Bu(a.b);a.i.V(c,7);L(a,a.i);a.a.listen(a.i,"click",a.It);a.wd=E("html5-quality-button",b);a.Ie=E("html5-quality-popup-menu",
393 a.wd);Wo(a.a,a.Ie,a.Gt);a.wf=E("html5-speed-popup-menu",a.wd);Wo(a.a,a.wf,a.Ht);a.xb=E("html5-watch-later-button",b);a.a.listen(a.xb,"click",a.Kt);a.xb&&fu(a.b,a.xb,a.b.getMsg("YTP_TOOLTIP_WATCH_LATER"),!0);a.xg=E("html5-watch-on-youtube-button",b);a.a.listen(a.xg,"click",a.Lt)}f.disable=function(a){Av(this,a,!0)};f.enable=function(a){Av(this,a,!1)};
394 function Av(a,b,c){for(var d=0;d<b.length;d++)switch(b[d]){case "audio":X(a.qf,"disabled-control-audio",c);break;case "play_pause":var e=a.Ec;c?e.disable():e.enable();break;case "seek":X(a.qf,"disabled-control-seek",c)}}
395 function Bv(a,b){if(a.zc)mv(a.zc,b),b.length?a.wb.add(a.zc):a.wb.remove(a.zc);else{var c=Kc("yt-uix-button-menu-item",a.Ie);z(c,function(a){a.style.display="none";for(var c=0,g=b.length;c<g;c++)G(a,"value")==b[c]&&(a.style.display="list-item")},a);a.Pl=!!b.length;Pn(a.Ie,a.Pl);Pn(a.wd,a.Pl)}}f.Nt=function(a){var b=a.keyCode;if(32==b||13==b)this.Bn(),a.preventDefault()};f.Va=function(a){this.g.Va(a)};
396 function Cv(a,b,c){a.zc?(lv(a.zc,b,c),c=a.Sc,0==b.indexOf("hd")||"highres"==b?c.i.show():c.i.hide()):a.Ie&&(a=a.Ie,Dv(a,"active",b),Dv(a,"selected",c||b))}function Dv(a,b,c){var d=E("yt-uix-button-menu-item."+b,a);d&&W(d,b);a=a.querySelector(".yt-uix-button-menu-item"+('[data-value="'+c+'"]'));V(a,b)}f.Bn=function(){this.u("mutetoggled")};
397 function Ev(a,b){if(b){if(a.Xn){var c=a.Ec;Gn(c,"ytp-button-stop");var d=c.g.getMsg("YTP_BUTTON_STOP")}else c=a.Ec,Gn(c,"ytp-button-pause"),d=c.g.getMsg("YTP_BUTTON_PAUSE");c.Jb(d);c.a=d}else Gu(a.Ec)}f.Mt=function(){this.u("playpausetoggled")};f.Jt=function(a){this.u("beginvolume");V(this.yc,"changing");var b=this.cc.clientWidth;a=100*(vd(a,this.cc).x/b);Fv(this,a);Vo(this.A,document,"move",this.Zw);Vo(this.A,document,"up",this.$w)};
398 f.Zw=function(a){var b=this.cc.clientWidth,b=100*(vd(a,this.cc).x/b);Fv(this,b);a.preventDefault()};function Fv(a,b){var c={volume:vb(b,0,100),muted:!1};a.u("volumechanged",c)}f.$w=function(){W(this.yc,"changing");this.A.removeAll();this.u("endvolume")};f.An=function(a){this.u("sizechangerequested",a.currentTarget==this.Yd)};f.Gt=function(a){a=G(a.currentTarget,"value");this.u("qualitychanged",a)};f.It=function(){this.u("fullscreentoggled")};
399 function Gv(a,b){if(a.Gd)wv(a.Gd,parseFloat(b));else if(a.wf){var c=a.wf;Dv(c,"active",b);Dv(c,"selected",b)}}f.Ht=function(a){a=G(a.currentTarget,"value");this.u("speedchanged",parseFloat(a));Gv(this,a)};f.Kt=function(){Om(this.xb,"html5-async-progress")||(ru(this.xb,"html5-async-progress"),this.u("watchlater"))};f.Lt=function(){this.u("watchonyoutube")};f.Ug=function(){this.o.removeAll();this.j&&(this.j.hide(),this.j=null);this.k&&(Ht(this.k),this.k=null)};
400 f.zt=function(a){a.stopPropagation();if(this.Sc.b)this.Ug();else{a=this.wb;var b=this.Sc;this.Ug();this.j=a;this.j.show();b&&(this.k=b,Gt(this.k));this.o.listen(window,"blur",this.Ug);this.o.listen(document,"click",this.Ug)}};f.xt=function(){this.u("qualitychanged",this.zc.We())};f.At=function(){this.u("sizechangerequested",1==this.Fd.getSelected())};f.Bt=function(){this.u("speedchanged",this.Gd.b)};
401 f.wt=function(a){var b=a.target,c="unknown",c=b==this.Ec.N()?"playpause":b==this.yc||b==this.vf||b==this.cc||b==this.ae||b==this.Cg?"volume":b==this.g?"time":b==this.wd?"settings":b==this.Sc?"settings-redesign":b==this.xb?"watchlater":b==this.xg?"youtube":b==this.i.N()?"fullscreen":b==this.Ee||b==this.Yd?"size":a.target;this.u("controlclick",c)};
402 f.F=function(){this.a.removeAll();this.A.removeAll();this.o.removeAll();this.Ug();this.wb=this.Sc=this.zc=this.xb=this.xg=this.Ie=this.wf=this.wd=this.Xh=this.Ee=this.Yd=this.Cg=this.cc=this.vf=this.yc=this.ae=this.qf=null;yv.C.F.call(this)};var Hv=["left","right","center"],Iv={id:0,priority:0,li:7,mi:50,vy:80,he:95,Ed:15,xk:100,isVisible:!0,textAlign:Hv[2],Oe:0,backgroundColor:"#080808",ii:"#fff",ny:1,Ll:1},Jv={id:99,priority:1,li:0,mi:5,he:7,Ed:2,xk:32,textAlign:Hv[0]},Kv=["CA","MX","US"];function Lv(a){a=a||Iv;w(this,a)}f=Lv.prototype;f.li=7;f.mi=50;f.he=95;f.vy=80;f.Oe=0;f.textAlign="center";f.backgroundColor="#080808";f.ii="#fff";f.ny=1;f.Ll=1;f.Ed=15;f.xk=32;f.isVisible=!0;f.fontFamily='"Arial Unicode Ms", Arial';f.qx="100%";function Mv(a,b){this.id=a;this.ra=new Lv(b);var c="caption-window";0==this.id&&(c="standard-caption-window");this.oa=Rc("div",{id:"caption-window-"+this.id,"class":c});this.Eb=Rc("span",{"class":"captions-text",style:"visibility: hidden"});this.Eb.innerHTML="C";this.la=Rc("span",{"class":"captions-text",tabindex:"4","aria-live":"assertive"});this.aj=Rc("div",{"class":"caption-window-transform"});this.aj.appendChild(this.la);this.oa.appendChild(this.aj)}f=Mv.prototype;f.id=0;f.ra=null;f.gh="";
403 f.Ic=null;f.oa=null;f.aj=null;f.la=null;f.Eb=null;f.type=1;f.getType=function(){return this.type};f.Wi=function(){var a;this.Eb.style.fontFamily=this.la.style.fontFamily;this.oa.appendChild(this.Eb);a=this.Eb.offsetHeight;this.oa.removeChild(this.Eb);return a};f.Wf=function(){this.la&&(0!=this.id&&(Ad(this.oa,"100%"),Ad(this.oa,this.la.offsetWidth)),Nv(this),Pn(this.oa,this.ra.isVisible))};
404 function Nv(a){od(a.oa,a.ra.mi+"%",a.ra.he+"%");for(var b=0;8>=b;b++)W(a.oa,"anchor-point-"+b);V(a.oa,"anchor-point-"+a.ra.li)}f.Wo=function(a){var b=[];z(a,function(a){a.$i?b[b.length-1]+=a.ge:b.push(a.ge)});this.Xe(b.join("\n"));this.Ic=a};f.Xe=function(a){this.gh=a=Ov(a);this.la.innerHTML=this.gh;this.Ml();this.Wf()};
405 f.Ml=function(){this.oa.style.textAlign=this.ra.textAlign;this.la.style.backgroundColor=this.ra.backgroundColor;this.la.style.color=this.ra.ii;this.la.style.opacity=this.ra.Ll;this.la.style.fontFamily=this.ra.fontFamily;this.la.style.fontSize=this.ra.qx;1==this.ra.Oe?this.la.setAttribute("dir","rtl"):this.la.removeAttribute("dir")};f.toString=function(){var a="Caption window ("+this.id+"): "+this.gh,b;for(b in this.ra)a+=b+" "+this.ra[b]+" | ";return a};
406 function Ov(a){a=a.split("\n");for(var b=0,c=a.length;b<c;b++)a[b]=a[b]?"&nbsp;"+a[b]+"&nbsp;":"";return a.join("<br>")}f.cj=function(){this.Ic=[];this.Xe("")};function Pv(a,b){Mv.call(this,a,b);this.la.style.display="block";this.la.style.padding="0";this.Rb=[];var c=this.la;W(c,"captions-text");V(c,"caption-painton-text-rows")}y(Pv,Mv);f=Pv.prototype;f.type=0;f.ho="";f.fh=!1;f.Bb=null;f.Rb=null;f.Wi=function(){return this.Rb[0]?this.Rb[0].offsetHeight:0};function Qv(a){return a.Rb.reduce(function(a,c){return Math.max(a,c.offsetWidth)},0)}
407 f.Wf=function(){0!=this.id&&(Ad(this.oa,"100%"),Ad(this.oa,this.fh?Qv(this):this.Bb.width));var a=Math.round(this.ra.Ed*this.Wi());kd(this.oa,"max-height",a+"px");Nv(this);Pn(this.oa,this.ra.isVisible)};
408 f.Xe=function(a){this.cj();a=Ov(a);this.fh||(this.gh=a);a=a.split("<br>");for(var b=0,c=a.length;b<c;b++)if(a[b]){var d=Rc("div",{"class":"caption-row-holder"}),e=Rc("span",{"class":"caption-row captions-text"});d.appendChild(e);e.innerHTML=a[b];this.fh||(this.la.style.height=this.Bb.height+"px",this.la.style.width=this.Bb.width+"px",d.style.position="absolute",d.style.top=this.Bb.fo[b]+"px",d.style.left=this.Bb.eo[b]+"px");this.la.appendChild(d);this.Rb.push(e)}this.Ml();this.Wf()};
409 f.cj=function(){for(var a=0,b=this.Rb.length;a<b;a++){var c=gd(this.Rb[a],"caption-row-holder");F(c)}this.Rb=[]};f.Ml=function(){this.oa.style.textAlign=this.ra.textAlign;for(var a=0,b=this.Rb.length;a<b;a++)this.Rb[a].style.backgroundColor=this.ra.backgroundColor;this.la.style.color=this.ra.ii;this.la.style.opacity=this.ra.Ll;this.la.style.fontFamily=this.ra.fontFamily;1==this.ra.Oe?this.la.setAttribute("dir","rtl"):this.la.removeAttribute("dir")};function Rv(a,b){Mv.call(this,a,b);this.Ic=[];this.pe=[];this.Db=[];this.Xf=new Ei(433);this.Xf.stop();J(this.Xf,"tick",v(this.vx,this))}y(Rv,Mv);f=Rv.prototype;f.type=2;f.sx=32;f.Db=null;f.qe=0;f.pe=null;f.Xf=null;f.Wf=function(){Ad(this.oa,"100%");var a=this.oa.offsetWidth,a=Math.min(Sv(this),a);Ad(this.oa,a+"px");Ad(this.aj,"100%");this.la.style.whiteSpace="nowrap";Nv(this);Pn(this.oa,this.ra.isVisible)};
410 f.Wo=function(a){var b=a.length;if(0>=b)this.cj();else{for(var c=0;c<b&&0<=this.Ic.indexOf(a[c]);)c++;this.Ic=this.Ic.concat(a.slice(c));Tv(this)}};f.cj=function(){this.Ic=[];this.Db=[];this.qe=0;this.Db=[];this.pe=[];Uv(this)};
411 function Tv(a){if(!Vv(a))if(a.qe>=a.Ic.length)Uv(a);else{var b=a.Db.length-1;0>b&&(a.pe.push(0),a.qe=0,a.Db.push(""),b=0);for(var c=a.Ic.length,d=a.qe;d<c;d++){var e=a.Ic[d];if("\n"==e.ge){a.qe++;a.pe[b]++;break}if(e.$i||0==a.Db[b].length)a.Db[b]+=e.ge,a.qe++,a.pe[b]++;else break}Uv(a);d<c&&!Vv(a)&&(b=a.Wi(),V(a.la,"caption-rollup"),a.oa.style.overflow="hidden",a.la.style.top=-b+"px",a.Xf.start())}}function Vv(a){return a.Xf.Xc||Om(a.la,"caption-rollup")}
412 f.vx=function(){this.oa.style.overflow="visible";this.la.style.top=0;this.Xf.stop();W(this.la,"caption-rollup");this.Db.push("");this.pe.push(0);Tv(this)};function Uv(a){if(!Vv(a)){for(;a.Db.length<a.ra.Ed;)a.Db.unshift(""),a.pe.unshift(0);for(;a.Db.length>a.ra.Ed;){a.Db.shift();var b=a.pe.shift();0<b&&(a.qe-=b,a.Ic.splice(0,b))}a.Xe(a.Db.join("\n"))}}
413 function Sv(a){a.Eb.style.fontFamily=a.la.style.fontFamily;a.Eb.style.fontSize=a.la.style.fontSize;a.la.appendChild(a.Eb);a.Eb.innerHTML="\u2014";var b=a.Eb.offsetWidth;a.Eb.innerHTML="&nbsp;";b=2*a.Eb.offsetWidth+b*a.sx;a.la.removeChild(a.Eb);return b};function Wv(a){this.a=a.wk;this.i=a.priority;this.Fc=a.Fc||this.Fc}Wv.prototype.a=0;Wv.prototype.i=0;Wv.prototype.Fc=0;Wv.prototype.toString=function(){return this.a+", "+this.Fc};function Xv(a){Wv.call(this,a);this.ge=a.text||this.ge;this.bi=a.windowId||this.bi;this.$i=a.params.append||this.$i;this.Rp=a.params.row||this.Rp;this.Qp=a.params.ux||this.Qp}y(Xv,Wv);f=Xv.prototype;f.ge="";f.$i=!1;f.Rp=0;f.Qp=0;f.bi=0;f.toString=function(){return this.a+", "+this.Fc+": "+this.ge};
414 function Yv(a){var b=a.firstChild&&a.firstChild.nodeValue||"",c=1E3*parseFloat(a.getAttribute("start")||0);a.getAttribute("t")&&(c=parseInt(a.getAttribute("t"),10));var d=1E3*parseFloat(a.getAttribute("dur")||0);a.getAttribute("d")&&(d=parseFloat(a.getAttribute("d")));var e=parseInt(a.getAttribute("w"),10)||0,b={wk:c,Fc:d,text:b,windowId:e,priority:5,params:{}};a.getAttribute("r")&&(b.params.row=parseInt(a.getAttribute("r"),10));a.getAttribute("c")&&(b.params.ux=parseInt(a.getAttribute("c"),10));
415 a.getAttribute("append")&&(b.priority=6,b.params.append=!0);return new Xv(b)}function Zv(a){Wv.call(this,a);this.id=a.windowId||this.id;this.params=a.params}y(Zv,Wv);Zv.prototype.id=0;Zv.prototype.params=null;Zv.prototype.g="";Zv.prototype.b=!1;function $v(){return new Zv({wk:-2147483648,Fc:4294967295,params:Iv})};function aw(a){if("undefined"!=typeof DOMParser)return(new DOMParser).parseFromString(a,"application/xml");if("undefined"!=typeof ActiveXObject){var b=new ActiveXObject("MSXML2.DOMDocument");if(b){b.resolveExternals=!1;b.validateOnParse=!1;try{b.setProperty("ProhibitDTD",!0),b.setProperty("MaxXMLSize",2048),b.setProperty("MaxElementDepth",256)}catch(c){}}b.loadXML(a);return b}throw Error("Your browser does not support loading xml documents");};function bw(a){this.b=[];this.g=[];this.a={};if(a&&(a=aw(a))&&a.firstChild)switch(this.i=a,this.i.firstChild.tagName){case "timedtext":a=this.i.firstChild.childNodes;for(var b=0,c=a.length;b<c;b++)switch(a[b].tagName){case "window":var d=a[b],e=parseInt(d.getAttribute("id"),10),g=void 0;t:{var h=this.a[e];if(d.getAttribute("t")||d.getAttribute("start")){g=parseInt(d.getAttribute("t"),10);d.getAttribute("start")&&(g=1E3*parseFloat(d.getAttribute("start")));h&&(h.a+h.Fc>=g?h.Fc=g:h=null);switch(d.getAttribute("op")){case "kill":g=
416 null;break t;case "define":h=null}h?h.j=!0:h=$v();var k={};w(k,h?h.params:Iv);d.getAttribute("id")&&(k.id=d.getAttribute("id"));d.getAttribute("op")&&(k.xy=d.getAttribute("op"));d.getAttribute("rc")&&(k.Ed=parseInt(d.getAttribute("rc"),10));d.getAttribute("cc")&&(k.xk=parseInt(d.getAttribute("cc"),10));d.getAttribute("ap")&&(h=parseInt(d.getAttribute("ap"),10),k.li=0>h||8<h?7:h);d.getAttribute("ah")&&(k.mi=parseInt(d.getAttribute("ah"),10));d.getAttribute("av")&&(k.he=parseInt(d.getAttribute("av"),
417 10));d.getAttribute("id")&&(k.id=parseInt(d.getAttribute("id"),10)||0);d.getAttribute("vs")&&(k.isVisible=Boolean(d.getAttribute("vs")));d.getAttribute("ju")&&(k.textAlign=Hv[parseInt(d.getAttribute("ju"),10)]);d.getAttribute("pd")&&(k.Oe=1,0==parseInt(d.getAttribute("pd"),10)&&(k.Oe=0));d.getAttribute("bc")&&(k.backgroundColor=parseInt(d.getAttribute("bc"),16));d.getAttribute("bo")&&(k.opacity=parseInt(d.getAttribute("bo"),10)/100);d.getAttribute("fc")&&(k.ii=parseInt(d.getAttribute("fc"),16));d.getAttribute("sd")&&
418 (k.nk=parseInt(d.getAttribute("sd"),10));h=parseInt(d.getAttribute("d"),10)||1E3*parseFloat(d.getAttribute("dur"))||2147483647;d={wk:g,Fc:h,params:k,windowId:parseInt(d.getAttribute("id"),10)};g=new Zv(d)}else g=null}this.a[e]=g;this.g.push(g);break;case "text":e=Yv(a[b]),this.b.push(e),d=e.bi,this.a[d]&&(d=this.a[d],e=e.ge,""!=d.g&&(d.b=!0),d.g+=e)}break;default:for(this.g.push($v()),a=this.i.firstChild.childNodes,b=0,c=a.length;b<c;b++)e=Yv(a[b]),this.b.push(e)}}bw.prototype.b=null;
419 bw.prototype.g=null;bw.prototype.a=null;function cw(a){this.a=a.languageCode;this.b=a.languageName||null;this.g=a.languageOriginal||null;this.id=a.id||null;this.i=a.is_default||!1};function dw(a){a=a||{};this.Nk=a.format;this.b=a.languageCode||"";this.bh=a.languageName;this.Nb=a.kind||"";this.hc=a.name;this.Ba=a.id;this.Ek=a.is_servable;this.pi=a.is_default;this.qi=a.is_translateable;a.translationLanguage&&(this.a=new cw(a.translationLanguage))}
420 function ew(a){var b={format:a.Nk,languageCode:a.b,languageName:a.bh,displayName:fw(a),kind:a.Nb,name:a.hc,id:a.Ba,is_servable:a.Ek,is_default:a.pi,is_translateable:a.qi};a.a&&(b.translationLanguage={languageCode:a.a.a,languageName:a.a.b,languageOriginal:a.a.g,id:a.a.id,is_default:a.a.i});return b}f=dw.prototype;f.bh=null;f.Nb=null;f.hc=null;f.Ba=null;f.Ek=!1;f.pi=!1;f.qi=!1;f.Nk=1;
421 function fw(a){var b=[a.bh];if("asr"==a.Nb){var c=lf("HTML5_SUBS_ASR");b.push(" (",c,")")}a.hc&&b.push(" - ",a.hc);a.a&&b.push(" >> ",a.a.b);return b.join("")}f.toString=function(){var a=[this.b,": ",this.hc," (",this.Nb,")"];this.a&&a.push(" >> ",this.a.a);return a.join("")};f.equals=function(a){if(!a)return!1;var b=this.a,c=a.a;if(b&&c){if(b.a!=c.a)return!1}else if(b||c)return!1;return this.b==a.b&&this.hc==a.hc&&this.Nb==a.Nb};function gw(){this.g=[];this.a=[]}gw.prototype.g=null;gw.prototype.a=null;gw.prototype.b=-1;function hw(a,b){return b?a.a.concat(a.g):a.a}function iw(a,b){switch(b.Nb){case "asr":return jw(b,a.g);default:if(b.pi||0>a.b)a.b=a.a.length;return jw(b,a.a)}}function jw(a,b){return Oa(b,v(a.equals,a))?!1:(b.push(a),!0)};function kw(a,b,c,d){this.Od=a;c?this.Od=Kj(this.Od,{hl:c}):(a=Gj(this.Od).hl||"",a=a.split("_").join("-"),this.Od=Kj(this.Od,{hl:a}));this.Ni=b;this.Np=!!d;this.Md=new gw;this.Ci=[];this.Op={}}f=kw.prototype;f.Od="";f.Ni=null;f.Np=!1;f.Md=null;f.Ci=null;f.Op=null;function lw(a,b){return Oa(hw(a.Md,!0),function(a){return a.toString()==b})}function mw(a,b){var c=a.Od,d={v:a.Ni,type:"track",lang:b.b,name:b.hc,kind:b.Nb,fmt:b.Nk};b.a&&(d.tlang=b.a.a);return c=Kj(c,d)}
422 function nw(a,b,c){var d=mw(a,b);a=v(function(a){a=new bw(a.responseText);c(a,b)},a);Nj(d,a)}function ow(a){var b=a.Md.b;a=hw(a.Md,!0);return 0>b?null:a[b]}
423 function pw(a,b){var c=a.Od,d={type:"list",tlangs:1,v:a.Ni,fmts:Number(!0)};a.Np&&(d.asrs=1);c=Kj(c,d);d=v(function(a){if((a=a.responseXML)&&a.firstChild){for(var c=this.Md,d=a.getElementsByTagName("track"),k=d.length,m=0;m<k;m++){var p=parseInt(d[m].getAttribute("formats"),10)||1,s=d[m].getAttribute("lang_code"),r=d[m].getAttribute("lang_translated"),D=d[m].getAttribute("name"),M=d[m].getAttribute("kind")||"",sa=d[m].getAttribute("id"),Y="true"==d[m].getAttribute("lang_default"),SC="true"==d[m].getAttribute("cantran");
424 iw(c,new dw({format:p,languageCode:s,languageName:r,name:D,kind:M,id:sa,is_servable:!0,is_default:Y,is_translateable:SC}))}a=a.getElementsByTagName("target");c=a.length;for(d=0;d<c;d++)k=a[d].getAttribute("lang_code"),m=a[d].getAttribute("lang_translated"),p=a[d].getAttribute("lang_original"),s=a[d].getAttribute("id"),r="true"==a[d].getAttribute("lang_default"),k={languageCode:k,languageName:m,languageOriginal:p,id:s,is_default:r},this.Op[k.languageCode]=k.languageName,this.Ci.push(new cw(k))}b()},
425 a);Nj(c,d)};function qw(a){Tm.call(this,a);var b=Q(a);this.Id=a.J();this.Zn=a.app.S;this.ne=[];this.Ia={};this.fe={};this.Re=[];this.i=E("captions-translation-select",b);this.Hl=E("captions-translation-dialog",b);this.Gl=E("captions-settings-dialog",b);this.dd=E("html5-captions-button",b);J(this.dd,"click",v(this.gw,this));J(E("captions-translation-confirm",b),"click",v(this.qw,this));J(E("captions-translation-cancel",b),"click",v(this.$n,this));wf(E("captions-settings-background-opacity",b),v(this.ew,this),
426 "INPUT");wf(E("captions-settings-text-opacity",b),v(this.ow,this),"INPUT");wf(E("captions-settings-window-opacity",b),v(this.rw,this),"INPUT");wf(E("captions-settings-char-edge-style",b),v(this.hw,this),"SELECT");J(E("captions-settings-font-family",b),"change",v(this.lw,this));J(E("captions-settings-font-inc",b),"click",v(this.xp,this));J(E("captions-settings-font-dec",b),"click",v(this.wp,this));J(E("captions-settings-confirm",b),"click",v(this.dw,this));J(E("captions-settings-cancel",b),"click",
427 v(this.mw,this));a=E("captions-settings-dialog",b);yf(a,v(this.iw,this),"html5-color-picker-button");this.dd&&(this.jd=E("html5-captions-tracks",this.dd),this.Ef=is(Xr.getInstance(),this.dd),a=E("html5-captions-track-template",this.Ef),this.vp=new ct(a,["track_id","track_display_name"]),yf(this.Ef,v(this.fw,this),"yt-uix-button-menu-item"));this.Rf=new Ei;this.Rf.stop();J(this.Rf,"tick",v(this.kl,this));this.D("onResize",v(this.Pn,this));this.D("onBackgroundChange",v(this.uw,this));this.D("onTextOpacityChange",
428 v(this.ww,this));this.D("onWindowOpacityChange",v(this.xw,this));this.D("onFontSizeIncrease",v(this.xp,this));this.D("onFontSizeDecrease",v(this.wp,this));this.D("onShowControls",v(this.kw,this));this.D("onHideControls",v(this.jw,this));"detailpage"==this.Id.Y&&(b=E("captions-account-settings-link",b))&&Rn(b);this.wi=new Mv(99,Jv);this.dh=new Ei(2E3);this.dh.stop();J(this.dh,"tick",v(this.tw,this))}y(qw,Tm);f=qw.prototype;f.qa="captions";f.hd="cc";f.zl="subtitlesModuleData";f.Ei=!1;f.Uk=!1;f.fd=null;
429 f.Id=null;f.Zn=null;f.dd=null;f.Ef=null;f.vp=null;f.Hl=null;f.Gl=null;f.jd=null;f.Re=null;f.ne=null;f.Ia=null;f.fe=null;f.Rf=null;f.wi=null;f.dh=null;f.Pb=null;f.Ai=!1;f.Xo=1;var rw={background:"#080808",backgroundOpacity:1,charEdgeStyle:"uniform",color:"#fff",fontFamily:'"Arial Unicode Ms", Arial',fontFamilyOption:"propSans",fontSizeIncrement:0,textOpacity:1,windowColor:"#080808",windowOpacity:0};f=qw.prototype;f.gc=null;f.Sn=!1;
430 f.create=function(){qw.C.create.call(this);this.fd=this.a.getVideoData();var a=this.a.J().U;-1==Kv.indexOf(a)&&V(Q(this.a),"cc-international");this.b=Lb(rw);w(this.b,$m(this,"display-settings"));1==this.Id.a.cc_load_policy||1==this.fd.Lm||"alwayson"==xm(this.fd,"yt:cc")?a=!0:(a=$m(this,"module-enabled"),a=null!=a?!!a:"on"==xm(this.fd,"yt:cc")||this.Id.a.cc_prefer_on);a&&this.load()};f.destroy=function(){this.unload();qw.C.destroy.call(this)};
431 f.load=function(){if(this.Ei)this.ba&&(qw.C.load.call(this),this.Ai="alwayson"==xm(this.fd,"yt:cc"),this.Ef&&X(this.Ef,"captions-always-on",this.Ai),an(this,"module-enabled",!0),this.Ei=!1,sw(this),this.Pn());else{this.Ei=!0;this.ba=!1;var a=this.fd.b.cc_lang_pref||this.Id.a.cc_lang_pref||xm(this.fd,"yt:cc_default_lang")||this.Id.i,a=a&&a.split("_").join("-");this.Pb=new kw(this.fd.ni,this.fd.L,a,this.fd.zk);a=v(this.mo,this);pw(this.Pb,a)}};
432 f.unload=function(){this.Bc&&(tw(this,!1),this.Ho("control_subtitles_set_track"));uw(this);Ym(this);an(this,"module-enabled",!1);this.Ei=!1;this.ba&&(this.ba=!1,qw.C.unload.call(this))};f.log_=function(){};function vw(a,b){a.i&&(Xc(a.i),z(b,function(a){var b=Uc("option");b.setAttribute("value",a.a);b.appendChild(Vc(a.b+" -- "+a.g));this.i.appendChild(b)},a))}
433 f.mo=function(){this.jd&&Xc(this.jd);vw(this,this.Pb.Ci);var a=hw(this.Pb.Md,!0);if(0<a.length){this.log_("Caption track list loaded, found "+a.length+" tracks.");z(a,function(a){if(a.Ek){var b=a.toString();a=fw(a);ww(this,b,a)}},this);var b=this.Pb.Md.b;(a=a[b]&&a[b].toString())&&xw(this,a);this.dd&&hs(Xr.getInstance(),this.dd);(a=ow(this.Pb))?(this.Uk=!0,yw(this,a)):(this.ba||(this.ba=!0,this.load()),this.u("publish_external_event","onCaptionsTrackListChanged"))}else this.log_("No captions found."),
434 this.unload(),Sn(this.Ef),Sn(this.dd)};f.hv=function(a,b){var c=a.g.concat(a.b);this.log_("Caption track loaded with "+c.length+" events.");uw(this);this.Re=$a(c);this.gc=b;this.Sn=qu.test(b.b);this.ba||(this.ba=!0,this.load());this.Uk&&(this.Uk=!1,this.u("publish_external_event","onCaptionsTrackListChanged"));c=Ka(c,function(a,b){return new Zh(a.a,a.a+a.Fc,{id:"caption"+b})});this.zf.apply(this,c);this.co(b)};
435 f.co=function(a){var b={trackName:a.hc,trackKind:a.Nb};a.a?(b.trackLangCode=a.a.a,b.fromLangCode=a.b):b.trackLangCode=a.b;this.log(b);var b=this.wi,c=fw(a);c&&(c=c.replace(/<[^>]*>?/g,""),b.Xe(c));Wm(this,this.wi.oa);this.dh.start();this.u("publish_external_event","captionschanged",ew(a))};f.xc=function(a){0==a.getId().indexOf("caption")&&(a=parseInt(a.getId().split("caption")[1],10),!isNaN(a)&&this.Re[a]&&(this.ne.push(this.Re[a]),this.Rf.start()))};
436 f.$c=function(a){0==a.getId().indexOf("caption")&&(a=parseInt(a.getId().split("caption")[1],10),!isNaN(a)&&this.Re[a]&&(a=this.ne.indexOf(this.Re[a]),0<=a&&this.ne.splice(a,1),this.Rf.start()))};
437 function zw(a,b){if(b instanceof Zv){var c=a.Ia[b.id];w(b.params,a.b);c&&c.getType()!=(b.params.nk?2:b.b?0:1)&&(F(c.oa),delete a.Ia[b.id]);if(!a.Ia[b.id]){var c=a.Ia,d=b.id,e;t:{e=b.id;var g=b.params;switch(b.params.nk?2:b.b?0:1){case 0:e=new Pv(e,g);break t;case 2:e=new Rv(e,g);break t;default:e=new Mv(e,g)}}c[d]=e;c=a.Ia[b.id].oa;X(c,"captions-asr","asr"==a.gc.Nb);null!=b.params.Oe&&(b.params.Oe=a.Sn?1:0);0==a.Ia[b.id].id?(V(c,a.qa),Aw(a.a.app.S,c)):Wm(a,c)}w(a.Ia[b.id].ra,b.params);if(0==(b.params.nk?
438 2:b.b?0:1)){c=a.Ia[b.id];c.ho=b.g;c.Bb={};c.fh=!0;c.Xe(c.ho);c.Bb.Ed=c.Rb.length;c.Bb.width=c.oa.offsetWidth;c.Bb.height=c.oa.offsetHeight;c.Bb.eo=[];c.Bb.fo=[];for(d=0;d<c.Bb.Ed;d++)c.Bb.fo.push(c.Rb[d].offsetTop),c.Bb.eo.push(c.Rb[d].offsetLeft);c.fh=!1;c.Xe(c.gh)}}else c=b.bi,a.fe[c]||(a.fe[c]=[]),a.fe[c].push(b)}f.Pn=function(){if(this.ba){Ym(this);this.Xo=Bw(this.Id).height/360;sw(this);for(var a in this.Ia)this.Ia[a].Wf()}};
439 function Cw(a){var b=[],c;for(c in a.Ia){var d=a.Ia[c];d instanceof Pv&&b.push(a.Ia[c])}if(0!=b.length){b.sort(function(a,b){return b.ra.he-a.ra.he});c=Bw(a.Id).height;var e=a.Ia[b[0].id].ra.he,g;for(g in b){d=a.Ia[b[g].id];d.ra.he=e;var h=Math.round(d.ra.Ed*d.Wi()),e=e-Math.round(100*(h/c));d.Wf()}}}f.tw=function(){this.dh.stop();F(this.wi.oa)};
440 f.kl=function(){this.Rf.stop();var a=this.ne.length,b;for(b in this.fe)delete this.fe[b];this.ne.sort(function(a,b){return a.a==b.a?a.i-b.i:a.a-b.a});for(var c=0;c<a;c++)zw(this,this.ne[c]);for(b in this.Ia)this.fe[b]?this.Ia[b].Wo(this.fe[b]):(F(this.Ia[b].oa),delete this.Ia[b]);Cw(this);this.log_("Refreshing caption display...")};function Dw(a,b){var c=E(a).querySelectorAll("."+b+" input[type=radio]"),d=Ra(c,function(a){return a.checked}),d=(-1==d?1:d+1)%c.length;c[d].click()}
441 f.uw=function(){Dw("captions-settings-background-opacity","captions-settings-background-opacity-radio")};f.ww=function(){Dw("captions-settings-text-opacity","captions-settings-text-opacity-radio")};f.xw=function(){Dw("captions-settings-window-opacity","captions-settings-window-opacity-radio")};f.ew=function(a){a=parseFloat(a.target.getAttribute("value"));isNaN(a)||(this.b.backgroundOpacity=a,sw(this))};f.ow=function(a){a=parseFloat(a.target.getAttribute("value"));isNaN(a)||(this.b.textOpacity=a,sw(this))};
442 f.rw=function(a){a=parseFloat(a.target.getAttribute("value"));isNaN(a)||(this.b.windowOpacity=a,sw(this))};f.hw=function(a){a.target&&(this.b.charEdgeStyle=a.target.value,sw(this))};f.lw=function(a){a.target&&(this.b.fontFamilyOption=a.target.value,sw(this))};f.kw=function(){var a=this.Ia[0];a&&a.oa&&(a=a.oa,W(a,"controls-hidden"),V(a,"controls-visible"))};f.jw=function(){var a=this.Ia[0];a&&a.oa&&(a=a.oa,Om(a,"controls-visible")&&(W(a,"controls-visible"),V(a,"controls-hidden")))};
443 f.wp=function(){Ew(this,-1)};f.xp=function(){Ew(this,1)};function Ew(a,b){a.b.fontSizeIncrement+=b;sw(a)}function Fw(a,b){var c=E(b);c&&(c.querySelector('input[value="'+a.toFixed(1)+'"]').checked=!0)}function Gw(a,b,c){var d=E(b);d&&(b=d.querySelector("span.yt-uix-form-input-select-value"),d=d.querySelector("select"),d.value=a.b[c],ad(b,d.options[d.selectedIndex].text))}function uw(a){Um(a);a.ne=[];a.Re=[];a.gc=null;a.kl()}
444 function yw(a,b){if(b)if(a.Bc)a.gc=b,tw(a,!0),a.Ho("control_subtitles_set_track",ew(b));else if(a.Id.jg){var c=a.Pb,d=a.Zn.b,e=v(a.co,a),g=c.Od,c={v:c.Ni,type:"track",lang:b.b,name:b.hc,kind:b.Nb,fmt:"vtt"};b.a&&(c.tlang=b.a.a);var h=document.createElement("track");h.src=Kj(g,c);h.mode="showing";h.setAttribute("kind","captions");h.setAttribute("default","");d.appendChild(h);e(b)}else nw(a.Pb,b,v(a.hv,a))}f.gw=function(){this.ba?H(v(this.Lp,this),1):this.load()};
445 f.fw=function(a){a=a.currentTarget;var b=G(a,"action");if(b)switch(b){case "translate":this.Ai||(Ym(this),Xm(this),Rn(this.Hl));break;case "settings":Ym(this);Xm(this);Hw(this);Rn(this.Gl);break;case "captions-off":this.unload()}else(a=G(a,"trackid"))?(xw(this,a),b=lw(this.Pb,a),yw(this,b),this.log_("Caption change failed for "+a)):this.log_("onCaptionTrackClicked_ empty, ignoring")};
446 function xw(a,b){if(a.jd){var c=E("yt-uix-button-menu-item.active",a.jd);c&&W(c,"active");if(c=a.jd.querySelector(".yt-uix-button-menu-item"+('[data-trackid="'+b+'"]')))V(c,"active"),a.Lp()}}f.Lp=function(){var a=E("yt-uix-button-menu-item.active",this.jd);if(a){var b=this.jd,c=C&&!rc(8)?0:b.offsetTop,d=a.offsetTop+a.offsetHeight-c-(b.clientHeight+b.scrollTop)+1;b.scrollTop+=Math.max(d,0);d=b.scrollTop-(a.offsetTop-c)+1;b.scrollTop-=Math.max(d,0)}};f.$n=function(){Sn(this.Hl)};
447 f.qw=function(){if(!this.Ai){this.$n();var a;t:{var b=this.Pb.Ci;for(a=0;a<b.length;a++){var c=b[a];if(c.a==this.i.value){a=c;break t}}a=null}a&&(c=this.gc,b=new dw,b.b=c.b,b.bh=c.bh,b.hc=c.hc,b.Nb=c.Nb,b.pi=!1,b.qi=c.qi,b.a=a,iw(this.Pb.Md,b)&&(a=b.toString(),ww(this,a,fw(b)),xw(this,a),this.dd&&hs(Xr.getInstance(),this.dd)),yw(this,b))}};f.dw=function(){Sn(this.Gl)};f.mw=function(){delete this.b;this.b=Lb(rw);an(this,"display-settings",this.b);sw(this)};
448 function sw(a){Iw(a);var b=jp(a.b.background),c=a.b.backgroundOpacity;an(a,"display-settings",a.b);a.k=un(".captions-text, .caption-row","background-color: rgba("+b[0]+","+b[1]+","+b[2]+","+c+") !important;",{Kb:a.k,reset:!0});Fw(c,"captions-settings-background-opacity");b=jp(a.b.color);c=a.b.textOpacity;an(a,"display-settings",a.b);a.G=un(".captions-text","color: rgba("+b[0]+","+b[1]+","+b[2]+","+c+") !important;",{Kb:a.G,reset:!0});Fw(c,"captions-settings-text-opacity");b=jp(a.b.windowColor);c=
449 a.b.windowOpacity;an(a,"display-settings",a.b);a.K=un(".caption-window-transform","background-color: rgba("+b[0]+","+b[1]+","+b[2]+","+c+") !important;",{Kb:a.K,reset:!0});Fw(c,"captions-settings-window-opacity");an(a,"display-settings",a.b);var b=a.b.charEdgeStyle,d=a.b.textOpacity;if("none"==b)vn(a.j);else{var c="",e="rgba(34, 34, 34, "+d+")",d="rgba(204, 204, 204, "+d+")";switch(b){case "dropShadow":c="text-shadow: 2px 2px 3px "+e+", 2px 2px 4px "+e+", 2px 2px 5px "+e+";";break;case "raised":c=
450 "text-shadow: 1px 1px "+e+", 2px 2px "+e+", 3px 3px "+e+";";break;case "depressed":c="text-shadow: 1px 1px "+d+", 0 1px "+d+", -1px -1px "+e+", 0 -1px "+e+";";break;case "uniform":c="text-shadow: 0 0 4px "+e+", 0 0 4px "+e+", 0 0 4px "+e+", 0 0 4px "+e+";"}a.j=un(".captions-text",c,{Kb:a.j,reset:!0})}Gw(a,"captions-settings-char-edge-style","charEdgeStyle");c=b="";switch(a.b.fontFamilyOption){case "monoSerif":b='"Courier New", Courier, "Nimbus Mono L", monospace';break;case "propSerif":b='"Times New Roman", Times, Georgia, Cambria, serif';
451 break;case "monoSans":b='"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, monospace';break;case "propSans":b='"Arial Unicode Ms", Arial, Helvetica, Verdana, sans-serif';break;case "casual":b='"Comic Sans MS", Impact, fantasy';break;case "cursive":b='"Monotype Corsiva", "URW Chancery L", "Apple Chancery", cursive';break;case "smallCaps":b='"Arial Unicode Ms", Arial, Helvetica, Verdana, sans-serif',c="font-variant: small-caps;"}a.A=un(".captions-text",c+"font-family: "+b+" !important;",{Kb:a.A,
452 reset:!0});a.b.fontFamily=b;an(a,"display-settings",a.b);Gw(a,"captions-settings-font-family","fontFamilyOption");an(a,"display-settings",a.b);b="font-size: "+Math.round(((a.b.fontSizeIncrement||0)+16)*a.Xo)+"px;";a.B=un(".caption-window-transform",b,{Kb:a.B,reset:!0});a.kl()}f.iw=function(a){var b=v(function(b){var d=G(a.currentTarget,b.toLowerCase());d&&(this.b[b]=d)},this);b("color");b("background");b("windowColor");sw(this);an(this,"display-settings",this.b)};
453 function Hw(a){var b={Kb:a.g},c=a.b.color,d=a.b.background,e=a.b.windowColor;c&&(a.g=un('.html5-popup-dialog button[data-color="'+c+'"]',"border: 3px solid #992121;",b));d&&(a.g=un('.html5-popup-dialog button[data-background="'+d+'"]',"border: 3px solid #992121;",b));e&&(a.g=un('.html5-popup-dialog button[data-windowcolor="'+e+'"]',"border: 3px solid #992121;",b))}
454 function Iw(a){var b=[],c=v(function(a){var c=this.b[a];c&&b.push(a+": "+c+" !important")},a);c("color");c("background");c={Kb:a.g,reset:!0};a.g=un(".captions-text",b,c);var d=jp(a.b.windowColor),c={Kb:a.I,reset:!0};a.I=un(".caption-window-transform","background-color: rgba("+d[0]+","+d[1]+","+d[2]+", 1)",c);Hw(a)}function ww(a,b,c){a.jd&&(b=dt(a.vp,{track_id:b,track_display_name:c}),a.jd.appendChild(b))}function Jw(a){return qw.prototype.Xa(a)?new qw(a):null}
455 f.nq=function(a,b){switch(a){case "fontSize":return isNaN(b)||(this.b.fontSizeIncrement=b,sw(this)),this.b.fontSizeIncrement;case "reload":b&&pw(this.Pb,v(this.mo,this));break;case "track":if(b){if(!ia(b))break;var c=new dw(b);c.equals(this.gc)||(yw(this,c),xw(this,c.toString()))}else return this.gc?ew(this.gc):{};return"";case "tracklist":return this.ba?Ka(hw(this.Pb.Md,b&&b.includeAsr),function(a){return ew(a)}):[]}};f.hp=function(){return["reload","fontSize","track","tracklist"]};f.Xa=function(a){return!!a.getVideoData().ni};
456 f.Zh=function(a){a?(a=this.gc,uw(this),this.gc=a):(tw(this,this.ba),this.gc&&yw(this,this.gc))};function tw(a,b){X(Q(a.a),a.qa+"-loaded",b)};function Kw(){var a=Yb(),b;if(b=ml()){t:{if(navigator.plugins&&0<navigator.plugins.length)for(b=0;b<navigator.plugins.length;b++)if(0<=navigator.plugins[b].name.indexOf("NVIDIA 3D Vision")){b=!0;break t}b=!1}if(b)t:{var c=navigator.userAgent.match(/Firefox[\/\s](\d+\.\d+)/);if(c&&1<c.length&&4<=c[1]){c=document.createElement("embed");c.setAttribute("id","NvImageDetectionFFID");c.setAttribute("style","visibility: hidden");c.setAttribute("width",25);c.setAttribute("height",25);c.setAttribute("type",
457 "image/jps");Wc(document.documentElement,c);c=Jc("NvImageDetectionFFID");try{if(null!=c){b=27527<=c.NvGetDriverVersion();break t}}catch(d){}}b=!1}}return b||!(!a||-1==a.indexOf("Sony"))};function Lw(a){Tm.call(this,a);var b=a.getVideoData();b.Q&&Mw(this);Nw(this,"html5-threed-conversion-on",v(this.zv,this));Nw(this,"html5-threed-conversion-off",v(this.yv,this));var c=Q(this.a);a=E("html5-threed-popup-menu-change-mode-link",c);c=E("html5-threed-dialog-change-mode-button",c);b="/select_3d_mode?video_id="+b.L;a.setAttribute("href",b);c.setAttribute("href",b)}y(Lw,Tm);f=Lw.prototype;f.zl="threeDModuleData";f.ff=null;function Nw(a,b,c){a=E(b,Q(a.a));J(a,"click",c)}f.qa="threed";f.hd="threed";
458 f.create=function(){Ow(this.a.app,void 0);Lw.C.create.call(this)};f.destroy=function(){Ow(this.a.app,!0);this.unload();Lw.C.destroy.call(this)};function Pw(a){return Lw.prototype.Xa(a)?new Lw(a):null}f.Xa=function(a){a=a.getVideoData();return!!a.Q||!!a.Ej};f.zv=function(){Qw(this,!0)};f.yv=function(){Qw(this,!1)};function Qw(a,b){var c=a.a.getVideoData();if(c.Ej&&c.If!=b){var c=a.a.app,d=O(c),e=d.a;e.If=!e.If;e.k=[];e.u("dataupdated");fh(d,"m");Ow(c);b?Mw(a):Ym(a)}}
459 function Mw(a){$m(a,"warning-shown")||Kw()||(a.ff=E("threed-html5-warning-dialog",Q(a.a)),Rn(a.ff),H(v(function(){Rw(this)},a),0),J(a.ff,"mouseover",v(function(){W(this.ff,"hide-dialog")},a)),J(a.ff,"mouseout",v(function(){Rw(this)},a)),Nw(a,"threed-html5-warning-close",v(a.Hv,a)))}function Rw(a){V(a.ff,"hide-dialog");H(v(function(){Om(this.ff,"hide-dialog")&&Ym(this)},a),9E3)}f.Hv=function(){an(this,"warning-shown",!0);Ym(this)};function Sw(a){Tm.call(this,a);this.b=new hn(["div","ytp-ypc-clickwrap-overlay",["h2","header",lf("YPC_CLICKWRAP_HEADER")],["div","description",lf("YPC_CLICKWRAP_DESCRIPTION")],["button","confirm-button",lf("YPC_CLICKWRAP_BUTTON")]]);pn(this.b.N());this.a.app.S.g.appendChild(this.b.N());L(this,this.b);this.g=this.b.a["confirm-button"]}y(Sw,Tm);f=Sw.prototype;f.qa="ypc_clickwrap";f.hd="ypc-clickwrap";f.Xa=function(){return Bm(this.a.getVideoData(),"ypc_clickwrap_module")};
460 function Tw(a){return Bm(a.getVideoData(),"ypc_clickwrap_module")?new Sw(a):null}f.create=function(){Sw.C.create.call(this);this.load()};f.destroy=function(){this.ba&&this.unload()};f.load=function(){Sw.C.load.call(this);E("html5-video-container",Q(this.a));on(this.b.N());J(this.g,"click",v(this.tu,this));this.ba=!0};f.unload=function(){pn(this.b.N());zf(this.g);this.ba=!1;Sw.C.unload.call(this)};f.tu=function(){Vm(this);this.destroy()};function Uw(a){a=a.b;this.j=a.ypc_offer_button_text;this.description=a.ypc_offer_description;this.heading=a.ypc_offer_headline;this.k=a.ypc_full_video_message;this.b=a.ypc_offer_id;this.a=a.ypc_buy_url;this.g=a.ypc_item_thumbnail;this.title=a.ypc_item_title;this.i=a.ypc_item_url;this.L=a.ypc_vid};function Vw(){Z.call(this,["div",["ytp-drawer","html5-stop-propagation"],["div","ytp-drawer-content","{{content}}"],["a","ytp-drawer-close-button"],["a","ytp-drawer-open-button"]]);this.b=this.template.a["ytp-drawer-close-button"];J(this.b,"click",v(this.hide,this));this.a=this.template.a["ytp-drawer-open-button"];J(this.a,"click",v(this.show,this));this.Aa(null);this.hide()}y(Vw,Z);Vw.prototype.hide=function(){V(this.element,"ytp-drawer-closed")};
461 Vw.prototype.Aa=function(a){a?(Vw.C.Aa.call(this,a),on(this.element)):pn(this.element)};Vw.prototype.show=function(){H(oa(W,this.element,"ytp-drawer-closed"),0)};Vw.prototype.F=function(){zf(this.b);zf(this.a);this.a=this.b=null;Vw.C.F.call(this)};function Ww(a,b){R.call(this);this.a=new Vw;L(this,this.a);this.b=document.createElement("div");Pm(this.b,["html5-stop-propagation","html5-ypc-endscreen"]);this.i=document.createElement("div");V(this.i,"html5-ypc-overlay");this.g=new hn(["div","html5-ypc-module",["div","html5-ypc-action-heading","{{heading}}"],["div","html5-ypc-thumbnail","{{thumbnail_element}}"],["div","html5-ypc-title","{{title}}"],["div","html5-ypc-description","{{description}}"],["button","html5-ypc-purchase","{{button_label}}"]]);
462 L(this,this.g);this.j=this.g.a["html5-ypc-purchase"];J(this.j,"click",v(this.k,this));ad(this.i,b.k);var c=b.title;b.i&&(c=["a",{href:b.i,target:"blank_"},b.title]);var d="";b.g&&(d=["img",{src:b.g}]);this.g.update({heading:b.heading,title:c,thumbnail_element:d,description:b.description,button_label:b.j});this.a.V(a);this.a.Aa(this.g.N());a.appendChild(this.b)}y(Ww,R);Ww.prototype.F=function(){Ww.C.F.call(this);this.j&&zf(this.j);F(this.b);F(this.i);this.i=this.b=this.a=null};Ww.prototype.k=function(){this.u("ypcContentRequest")};function Xw(a){Tm.call(this,a);this.g=this.b=null;this.i=NaN}y(Xw,Tm);f=Xw.prototype;f.qa="ypc";f.hd="ypc";function Yw(a){var b=a.getVideoData();return a.J().nd&&Bm(b,"ypc_module")}f.Xa=function(){return Yw(this.a)};function Zw(a){return Yw(a)?new Xw(a):null}f.create=function(){Xw.C.create.call(this);var a=this.a.getVideoData();this.b=new Uw(a);a.ia?this.load():this.a.Io({video_id:this.b.L,ypc_preview:1})};f.destroy=function(){this.ba&&this.unload();this.b=null};
463 f.load=function(){Xw.C.load.call(this);var a=E("html5-video-container",Q(this.a));this.g=new Ww(a,this.b);this.g.D("ypcContentRequest",this.Qt,this);Aw(this.a.app.S,this.g.i);oo(this.a.J())&&(a=new Zh(2147483647,2147483647,{priority:2}),this.zf(a));this.g.a.show();I(this.i);this.i=H(v(function(){this.g.a.hide()},this),1E4);this.ba=!0};f.unload=function(){Um(this);Tg(this.g);this.g=null;this.ba=!1;Xw.C.unload.call(this)};
464 f.xc=function(a){Xw.C.xc.call(this,a);a=this.g;a.b.appendChild(a.g.N());a.a.Aa(null);on(a.b)};f.$c=function(a){Xw.C.$c.call(this,a);a=this.g;pn(a.b);a.a.Aa(a.g.N())};f.Qt=function(){if(this.b.a)"embedded"==this.a.J().Y?ms(this.b.a):window.location=S(this.b.a,{})+"";else if(this.b.b){var a=n("yt.www.watch.player.handleEndPreview");a&&a(this.b.b)}};var $w={Hz:"ERROR_ALREADY_PINNED_ON_A_DEVICE",Mz:"ERROR_AUTHENTICATION_EXPIRED",Nz:"ERROR_AUTHENTICATION_MALFORMED",Oz:"ERROR_AUTHENTICATION_MISSING",Yz:"ERROR_BAD_REQUEST",dA:"ERROR_CANNOT_ACTIVATE_RENTAL",lA:"ERROR_CGI_PARAMS_MALFORMED",mA:"ERROR_CGI_PARAMS_MISSING",YA:"DEVICE_FALLBACK",aB:"ERROR_LICENSE",dB:"FLASH_FALLBACK",CB:"ERROR_GEO_FAILURE",OB:"HTML5_DEFAULT_FALLBACK",PB:"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",UB:"ERROR_INVALID_DRM_MESSAGE",YB:"LEARN_MORE",pC:"ERROR_NOT_SIGNED_IN",AC:"ERROR_PURCHASE_NOT_FOUND",
465 BC:"ERROR_PURCHASE_REFUNDED",EC:"ERROR_RENTAL_EXPIRED",eA:"ERROR_CAST_SESSION_DEVICE_MISMATCHED",fA:"ERROR_CAST_SESSION_VIDEO_MISMATCHED",hA:"ERROR_CAST_TOKEN_FAILED",gA:"ERROR_CAST_TOKEN_EXPIRED",iA:"ERROR_CAST_TOKEN_MALFORMED",KC:"ERROR_SERVER_ERROR",OC:"ERROR_STOPPED_BY_ANOTHER_PLAYBACK",QC:"ERROR_STREAMING_DEVICES_QUOTA_PER_24H_EXCEEDED",RC:"ERROR_STREAMING_NOT_ALLOWED",SC:"ERROR_STREAMING_UNAVAILABLE",FC:"ERROR_RETRYABLE_ERROR",ZC:"ERROR_TOO_MANY_STREAMS_PER_USER",YC:"ERROR_TOO_MANY_STREAMS_PER_ENTITLEMENT",
466 bD:"ERROR_UNSUPPORTED_DEVICE",cD:"ERROR_UNUSUAL_ACTIVITY",jD:"ERROR_VIDEO_FORBIDDEN",lD:"ERROR_VIDEO_NOT_FOUND"},ax={300:"ERROR_STREAMING_DEVICES_QUOTA_PER_24H_EXCEEDED",301:"ERROR_ALREADY_PINNED_ON_A_DEVICE",303:"ERROR_STOPPED_BY_ANOTHER_PLAYBACK",304:"ERROR_TOO_MANY_STREAMS_PER_USER",305:"ERROR_TOO_MANY_STREAMS_PER_ENTITLEMENT",400:"ERROR_VIDEO_NOT_FOUND",401:"ERROR_GEO_FAILURE",402:"ERROR_STREAMING_NOT_ALLOWED",403:"ERROR_UNSUPPORTED_DEVICE",405:"ERROR_VIDEO_FORBIDDEN",500:"ERROR_PURCHASE_NOT_FOUND",
467 501:"ERROR_RENTAL_EXPIRED",502:"ERROR_PURCHASE_REFUNDED",5E3:"ERROR_BAD_REQUEST",5001:"ERROR_CGI_PARAMS_MISSING",5002:"ERROR_CGI_PARAMS_MALFORMED",5100:"ERROR_AUTHENTICATION_MISSING",5101:"ERROR_AUTHENTICATION_MALFORMED",5102:"ERROR_AUTHENTICATION_EXPIRED",5200:"ERROR_CAST_TOKEN_MALFORMED",5201:"ERROR_CAST_TOKEN_EXPIRED",5202:"ERROR_CAST_TOKEN_FAILED",5203:"ERROR_CAST_SESSION_VIDEO_MISMATCHED",5204:"ERROR_CAST_SESSION_DEVICE_MISMATCHED",6E3:"ERROR_INVALID_DRM_MESSAGE",7E3:"ERROR_SERVER_ERROR",8E3:"ERROR_RETRYABLE_ERROR"};function bx(a){Tm.call(this,a);this.qa="ypc_license_checker";this.hd="ypc_license";this.j=!1;this.i=0;this.g=!1;this.b=null;this.B=ql();this.A=a.J().jb+"ypc_license_server"}y(bx,Tm);
468 var cx={LICENSE_DENIED_CANNOT_ACTIVATE_RENTAL:"ERROR_CANNOT_ACTIVATE_RENTAL",LICENSE_DENIED_NOT_SIGNED_IN:"ERROR_NOT_SIGNED_IN",LICENSE_DENIED_NO_ACTIVE_PURCHASE_AGREEMENT:"ERROR_RENTAL_EXPIRED",LICENSE_DENIED_CONCURRENT_PLAYBACK:"ERROR_STOPPED_BY_ANOTHER_PLAYBACK",LICENSE_DENIED_UNUSUAL_ACTIVITY:"ERROR_UNUSUAL_ACTIVITY",LICENSE_DENIED_STREAMING_UNAVAILABLE:"ERROR_STREAMING_UNAVAILABLE",LICENSE_DENIED_PLAYBACK_CAP:"ERROR_LICENSE"};
469 function dx(a){return Bm(a.getVideoData(),"ypc_license_checker_module")}f=bx.prototype;f.Xa=function(){return dx(this.a)};f.create=function(){bx.C.create.call(this);var a=new Zh(1E3,2147483646,{priority:0});this.zf(a);this.D("onStateChange",this.jx,this)};function ex(a){return dx(a)?new bx(a):null}f.xc=function(){this.j=!0;fx(this,6E4)};f.jx=function(a){P(a.state,2)?(this.i=0,this.b=null,this.g=!1):(P(a.state,1)||P(a.state,8))&&fx(this,6E4)};
470 function fx(a,b){if(!a.b&&a.j){var c=b;void 0==c&&(c=a.g?6E4:1E3);var d=a.a.getVideoData();d.a&&d.a.g||(a.b={video_id:d.L,player_id:a.B,request_id:ql(),purchase_id:d.ue,version:"4",player_time_seconds:a.a.getCurrentTime().toString(),gid:d.Mc,session_token:d.Jc},a.k=d.Da,0==c?a.Dn():H(v(a.Dn,a),c))}}f.Dn=function(){if(this.b){var a=S(this.A,{cpn:this.k});Qj(a,{format:"RAW",method:"POST",Mf:this.b,timeout:3E4,Qa:v(this.Rv,this),onError:v(this.Qv,this),bl:v(this.Sv,this)})}};
471 f.Rv=function(a){if(this.b){a=a.responseText;var b=a in cx?1:64<=a.length&&a.match(/[0-9a-fA-f]+/)?0:-1;-1==b?gx(this,"decode"):(this.i=0,this.b=null,1==b?(this.g=!1,a=a in cx?lf(cx[a]):lf("ERROR_LICENSE"),hx(this.a.app.b,150,a,void 0)):(this.g=!0,fx(this)))}};f.Qv=function(a){gx(this,"net-"+a.status)};f.Sv=function(){gx(this,"timeout")};function gx(a,b){if(a.b)if(a.log({errorType:b}),a.b=null,5<++a.i){var c=lf("ERROR_LICENSE");hx(a.a.app.b,150,c,void 0)}else fx(a)};function ix(){this.a=[];this.i={};this.o={};this.H={};this.b=this.j=null;this.g=[];this.k=null}y(ix,K);ix.prototype.B=function(a){if(this.b){var b;var c=ja(a);b=this.i[c];if(!b)if(this.b){if(b=a(this.b)){a=this.i[c]=b;for(var d in this.j)a.D(d,this.j[d]);a.D("command_log_timing",this.A,this);L(this,b)}}else b=null;b&&b.Xa(this.b)&&!Sa(this.a,b)&&(b.create(),this.a.push(b),Sa(this.g,b.qa)&&(b.Bc=this.k,b.Zh(!!b.Bc)))}};function jx(a){z(a.a,function(a){a.destroy()});a.a=[]}
472 function kx(a,b,c){lx(a);a.k=b;a.g=$a(c);z(a.a,function(a){0<=Ia(c,a.qa)&&(a.Bc=b,a.Zh(!!a.Bc))})}function lx(a){z(a.g,function(a){if(a=ih(this,a))a.Bc=null,a.Zh(!1)},a);a.k=null;a.g=[]}function yh(a,b,c,d){return b&&c?(a=ih(a,b))?a.nq(c,d):null:null}function zh(a,b){if(!b)return Ka(a.a,function(a){return a.qa});var c=ih(a,b);return c?c.hp():[]}function ih(a,b){return Oa(a.a,function(a){return a.qa==b})}ix.prototype.G=function(a,b){z(this.a,function(c){c.u(a,b)})};
473 function mx(a){var b=[];z(a.a,function(a){(a=a.Ri())&&b.push(a)});return b}ix.prototype.A=function(a,b){w(this.H,a||null);w(this.o,b||null)};function nx(a){this.a={};for(var b=0;b<a.length;b++){var c=a[b];this.a[c.a]=c}}function ox(a){a=Gb(a.a);fb(a,function(a,c){return a.a-c.a});return a};function px(a,b,c){this.b=a;this.a=b;this.i=!!c.Gf;this.g=c.ea};function qx(){this.ke={};this.a=this.$a().a;this.ad=null}f=qx.prototype;f.$a=function(){var a=this.constructor,b;if(!(b=a.Up)){var c;b=a.Kx;var d=[];for(c in b)b.hasOwnProperty(c)&&(0==c||d.push(new px(a,c,b[c])));c=new nx(d);b=a.Up=c}return b};f.has=function(a){a.b.$a();this.$a();return null!=this.ke[a.a]};f.get=function(a,b){a.b.$a();this.$a();var c;c=this.a[a.a];var d=rx(this,c);c.i?(t(d),c=d[b||0]):(t(d),c=d);return c};
474 f.set=function(a,b){a.b.$a();this.$a();var c=a.a;this.ke[c]=b;this.ad&&(this.ad[c]=b)};f.add=function(a,b){a.b.$a();this.$a();var c=a.a;this.ke[c]||(this.ke[c]=[]);this.ke[c].push(b);this.ad&&delete this.ad[c]};f.clear=function(a){a.b.$a();this.$a();a=a.a;delete this.ke[a];this.ad&&delete this.ad[a]};
475 f.equals=function(a){if(!a||this.constructor!=a.constructor)return!1;for(var b=ox(this.$a()),c=0;c<b.length;c++){var d=b[c];if(this.has(d)!=a.has(d))return!1;if(this.has(d)){var e=11==d.g||10==d.g,g=rx(this,d),h=rx(a,d);if(d.i){if(g.length!=h.length)return!1;for(d=0;d<g.length;d++)if(e?!g[d].equals(h[d]):g[d]!=h[d])return!1}else if(e?!g.equals(h):g!=h)return!1}}return!0};
476 function sx(a,b){for(var c=ox(a.$a()),d=0;d<c.length;d++){var e=c[d];if(b.has(e)){a.ad&&delete a.ad[e.a];var g=11==e.g||10==e.g;if(e.i){var h,k=b;h=e;h.b.$a();k.$a();h=rx(k,k.a[h.a]);null==h||t(h);h=h||[];for(k=0;k<h.length;k++)a.add(e,g?h[k].clone():h[k])}else h=rx(b,e),g?(g=rx(a,e))?sx(g,h):a.set(e,h.clone()):a.set(e,h)}}}f.clone=function(){var a=new this.constructor;a!=this&&(a.ke={},a.ad&&(a.ad={}),sx(a,this));return a};function rx(a,b){var c=a.ke[b.a];return null==c?null:c}
477 function tx(a,b){a.Kx=b;a.$a=function(){return a.Up||(new a).$a()}};var ux={Sy:0,CA:1,NA:2,Ry:3,$y:4,AA:5,LA:6,IA:7,JA:8,KA:9,GA:10,HA:11,bz:12,az:13,Qy:14,Ky:15,BA:20,PA:21,Jy:22,DA:23,OA:24,MA:25,Xy:30,QA:31,Wy:32,Yy:33,FA:40,EA:41,cz:42,dz:43,Ly:50,Oy:51,Ty:52,Uy:53,Vy:54,Gy:55,Hy:56,Zy:57,Py:58,Ny:60,My:61,Iy:70,Fy:80,ez:90};function vx(){qx.apply(this)}y(vx,qx);function wx(){qx.apply(this)}y(wx,qx);function xx(){qx.apply(this)}y(xx,qx);function yx(){qx.apply(this)}y(yx,qx);function zx(){qx.apply(this)}y(zx,qx);function Ax(){qx.apply(this)}y(Ax,qx);
478 tx(vx,{0:{name:"YtAdType",wh:"video.YtAdType"},1:{name:"ad_namespace",required:!0,ea:14,defaultValue:0,type:{Fz:0,ZA:1,Gz:2,jA:3,BB:4,XA:5,WA:6,$z:7,UA:8,bA:9,TA:10,VA:11,Lz:12,GD:13}},2:{name:"ad_format",required:!0,ea:14,defaultValue:0,type:{Cz:0,VB:1,TB:2,mC:3,dD:4,WB:5,QB:6,SB:7,HD:8,$A:9}},3:{name:"ad_invideo",ea:14,defaultValue:0,type:{Ez:0,rA:1,sA:2,tA:3,uA:4,qA:5,cA:6}},4:{name:"invideo_autoplay",ea:14,defaultValue:0,type:{Wz:0,zC:1}},5:{name:"ad_instream",ea:14,defaultValue:0,type:{Dz:0,
479 $C:1}},6:{name:"ad_instream_long",ea:8,type:Boolean}});tx(wx,{0:{name:"AdId",wh:"video.AdId"},1:{name:"ad_network",ea:14,defaultValue:1,type:{tC:1,Ey:2}},2:{name:"ad_network_name",ea:9,type:String},3:{name:"ad_id",required:!0,ea:9,type:String}});
480 tx(xx,{0:{name:"YtAdEvent",wh:"video.YtAdEvent"},1:{name:"ad_event_type",required:!0,ea:14,defaultValue:0,type:{nz:0,vz:1,oz:2,yz:3,pz:4,qz:5,kz:6,iz:7,RA:8,fz:9,wz:10,xz:11,gz:12,SA:13,zz:14,lz:15,hz:16,mz:17,jz:18,Az:100,Bz:101,tz:130,rz:131,uz:132}},2:{name:"wall_time",required:!0,ea:2,type:Number},3:{name:"media_time",required:!0,ea:2,type:Number},4:{name:"logentry_time_usec",required:!0,ea:3,type:String},5:{name:"ad_error_type",ea:14,defaultValue:0,type:ux}});
481 tx(yx,{0:{name:"YtAdSlot",wh:"video.YtAdSlot"},1:{name:"slot_time",required:!0,ea:2,type:Number},2:{name:"ad_type",required:!0,ea:11,type:vx},3:{name:"ad_events",Gf:!0,ea:11,type:xx},4:{name:"ad_video_duration",ea:2,type:Number},5:{name:"ad_id",ea:9,type:String},6:{name:"slot_index",ea:5,type:Number}});
482 tx(zx,{0:{name:"YtVideoMetadata",wh:"video.YtVideoMetadata"},1:{name:"content_owner_ids",Gf:!0,ea:9,type:String},2:{name:"video_duration_seconds",ea:2,type:Number},3:{name:"all_content_owner_ids",ea:9,type:String}});
483 tx(Ax,{0:{name:"YtWatchAdInfo",wh:"video.YtWatchAdInfo"},1:{name:"video_id",required:!0,ea:9,type:String},2:{name:"allowed_ads",Gf:!0,ea:11,type:vx},3:{name:"ad_slots",Gf:!0,ea:11,type:yx},4:{name:"ps",ea:9,type:String},5:{name:"el",ea:9,type:String},6:{name:"country",ea:9,type:String},7:{name:"feature",ea:9,type:String},8:{name:"blocked",ea:8,type:Boolean},9:{name:"plid",ea:9,type:String},10:{name:"video_metadata",ea:11,type:zx},11:{name:"experiment_id",Gf:!0,ea:3,type:String},12:{name:"ad_flags",
484 ea:4,type:String},13:{name:"all_experiment_ids",ea:9,type:String},14:{name:"no_ads_returned",ea:8,type:Boolean},15:{name:"ad_errors",Gf:!0,ea:14,defaultValue:0,type:ux},16:{name:"ad_slot_with_event",ea:11,type:yx}});function Bx(a,b){Gh.call(this,a,b)}y(Bx,Gh);f=Bx.prototype;f.rg=function(){Vg(this.app,!0,this.a);this.app.Ud(!1,this.a)};f.fn=function(){this.app.Td(!1,this.a)};f.Sp=function(a,b,c){Vg(this.app,!0,this.a);var d=this.app,e=this.a;d.sf(d.getCurrentTime()+a,b,c,e)};f.Wh=function(a,b){Vg(this.app,!0,this.a);this.app.sf(a,b,void 0,this.a)};f.Dj=function(){bh(this.app,this.a)};function Cx(a){this.app=a;Tm.call(this,a.I)}y(Cx,Tm);var Dx={qC:"0",rC:"1",bB:"2",gy:"3",Xz:"4",JC:"5"};var Ex={DC:"red",ED:"white"};var Fx={iy:"0",NC:"1",xA:"2"};var Gx={"ad-trueview-indisplay-pv":6,"ad-trueview-insearch":7},Hx={"ad-trueview-indisplay-pv":2,"ad-trueview-insearch":2},Ix={adunit:{Wb:!1,Ac:!1},detailpage:{tc:!0}};Ix.embedded={Fh:Bf(),Gh:"4",Ac:!0};Ix.profilepage={yl:!0};
485 var Jx="blogger books docs google-live play picasaweb".split(" "),Kx={blazer:{mj:"youtube_mobile",Ub:!1,oy:!1,Kg:!1,Lg:!1,qc:!0,Vb:!1,ub:!1,Gb:!0},blogger:{Be:!1,ag:!1,Rc:!1,Wb:!1,wc:!1,tc:!1,Ac:!1,sc:"bl"},books:{Be:!1,ag:!1,Rc:!1,Wb:!1,wc:!1,tc:!0,Ac:!1,sc:"gb"},docs:{Be:!1,ag:!1,Rc:!1,Wb:!1,wc:!1,tc:!1,Ac:!1,sc:"gd"},"google-live":{Be:!1,ag:!1,Rc:!1,Wb:!1,wc:!1,tc:!1,Ac:!1,sc:"gl"},play:{Wb:!1,wc:!1,tc:!1,Ac:!1,sc:"gp"},"native":{Kg:!1,Lg:!1,Vb:!0},olympics:{Kg:!1,Lg:!1,Rh:!0,Gb:!0},picasaweb:{Be:!1,
486 ag:!1,Rc:!1,Wb:!1,wc:!1,tc:!1,Ac:!1,sc:"pw"},touch:{Kg:!1,Lg:!1,Gb:!0}};
487 function Lx(a){this.o=[];this.a={};Mx(this,a.fexp);this.Q=U(this.Q,a.origin);this.Y=a.el||this.Y;var b=Ix[this.Y];b&&w(this,b);b=a.ps||this.Ca;0<navigator.msMaxTouchPoints&&(b="touch");this.Ca=b;(b=Kx[this.Ca])&&w(this,b);this.of=Nx(this)&&Sa(Jx,this.Ca);this.lg=!(!ll().defaultPlaybackRate||bc||Si||Ri||Ti);if(a.use_media_volume)b=!1;else{var b=ll(),c=b.muted;b.muted=!c;b=b.muted!=c}this.pm=b;this.sm=Ti;if(Si||Ri)this.qm=this.Oc||"blazer"!=this.Ca;this.ym="0"!=a.add_player_event_listeners;b=T(this.Fh,
488 a.fs);this.Fh="detailpage"==this.Y||"olympics"==this.Ca?b:b&&Bf();this.Ea=U(this.Ea,a.authuser);this.Gh=sl(this.Gh,a.autohide,Dx);this.Ub=T(this.Ub,a.autoplay);this.Rj=T(this.Rj,a.autoplayoverride);this.color=sl(this.color,a.color,Ex);this.k=U(this.k,a.content_v);this.Sj=sl(this.Sj,a.controls,Fx);this.H=U(this.H,a.cbrand);this.A=U(this.A,a.cbr);this.B=U(this.B,a.cbrver);this.eg=U(this.eg,a.c);this.lf=U(this.lf,a.cver);this.G=U(this.G,a.cmodel);this.I=U(this.I,a.cnetwork);this.K=U(this.K,a.cos);this.M=
489 U(this.M,a.cosver);this.O=U(this.O,a.cplatform);this.Oh=T(this.Oh,a.edu_mode);this.b=U(this.b,a.eurl);this.P=U(this.P,a.framer);this.fa=sl(this.fa,a.iv_load_policy,dl);this.i=U(this.i,a.hl);this.Mm=T(this.Mm,a.bwlogging);this.qc=T(this.qc,a.is_html5_mobile_device);this.Rd=T(this.Rd,a.player_wide);this.Nm=T(this.Nm,a.is_playground);this.loop=T(this.loop,a.loop);this.pf=T(this.pf,a.modestbranding);"red"!=this.color&&(this.pf=!1);this.yh=T(this.yh,a.noadapt);this.fg=T(this.fg,a.on3g);this.Ua=U(this.Ua,
490 a.pageid);this.Kh=sl(this.Kh,a.vq,ek);this.pj=U(this.pj,a.playerapiid);this.Dh=T(this.Dh,a.playsinline);this.qj=T(this.qj,a.playonclick);this.U=U(this.U,a.cr);this.ja=U(this.ja,a.q);this.Rc=T(this.Rc,a.logwatch);this.Hj=T(this.Hj,a.canplaylive);this.Ij=T(this.Ij,a.canplaypaid);this.Wb=T(this.Wb,a.showinfo);this.wc=T(this.wc,a.rel);this.tc=T(this.tc,a.enablesizebutton);this.tj=T(this.tj,a.ss);this.X=U(this.X,a.theme);this.Vb=T(this.Vb,a.use_native_controls);this.ub=!Ri&&T(this.ub,a.svt);Nx(this)&&
491 (this.Nh=T(this.Nh,a.altf),this.qg=T(this.qg,a.retryneterr),this.Rh=T(this.Rh,a.nologo));this.qg=this.qg||this.te;this.Vb&&(this.pf=!0,this.fa=3);this.Tj=T(this.Tj,a.ssl);if(this.Gb=T(this.Gb,a.use_tablet_controls))this.X="dark";b=this.Jh;if(c=a.video_container_override){var d=c.split("x");2==d.length&&(c=parseInt(d[0],10),d=parseInt(d[1],10),b=isNaN(c)||isNaN(d)||0>=c*d?b:new B(c,d))}this.Jh=b;this.bb=U(this.bb,a.attrib);this.aa=U(this.aa,a.sk);this.protocol=this.Tj?"https":"http";this.xe="0"!=this.Sj;
492 this.oj=T(this.xe,a.store_user_volume);this.Sd=T(this.Sd,a.use_media_volume);(b=a.BASE_YT_URL)&&pk(b,lk)&&(this.jb=b);Ox(this,a);Px(this,a);"detailpage"==this.Y&&delete this.b;this.hj=Qx(this)+"s";this.Ac=this.pf&&!this.Vb?!this.Wb:this.Wb||this.xe?!1:this.Ac;b=this.Ub||"detailpage"==this.Y;c=!0;this.qc&&(c=!1);cj("nintendo wiiu")&&(c=!1);this.Rj&&(c=!0);this.hm=b&&c;this.a=a}y(Lx,K);f=Lx.prototype;f.ym=!0;f.Fh=!0;f.Ea="";f.Gh="2";f.Ub=!1;f.Rj=!1;f.jb="/";f.oy=!0;f.color="red";f.Sj="1";f.eg="web";
493 f.lf="html5";f.Oh=!1;f.Kg=!0;f.Lg=!0;f.lg=!1;f.pm=!1;f.Y="detailpage";f.Mm=!1;f.pk=!1;f.of=!1;f.qc=!1;f.ob=!1;f.Rd=!1;f.Be=!0;f.Nm=!1;f.ag=!0;f.sg=!1;f.loop=!1;f.pf=!1;f.yh=!1;f.Kh=null;f.pj="";f.fg=!1;f.Ua="";f.Ca=null;f.Dh=!1;f.Nh=!1;f.sm=!1;f.qg=!1;f.hm=!1;f.Rc=!1;f.Hj=!0;f.Ij=!0;f.xe=!0;f.oj=!0;f.Sd=!1;f.Wb=!0;f.wc=!0;f.yl=!1;f.tc=!1;f.Ac=!1;f.tj=!1;f.Rh=!1;f.qm=!1;f.Vb=!1;f.ub=!0;f.Tj=!1;f.Gb=!1;f.Tc=null;f.Jh=null;f.nv=null;f.Dg=null;f.Wa=null;f.Mj=null;f.sc="yt";f.qj=!1;
494 function Ox(a,b){a.Rc=T(a.Rc,b.logwatch);a.ma=void 0==b.user_age?a.ma:Number(b.user_age);a.Gp=U(a.Gp,b.user_display_image);a.Ol=U(a.Ol,b.user_display_name);a.pa=U(a.pa,b.user_gender)}
495 function Px(a,b){var c;t:{if(b&&((c=b.adformat)||(c=(c=b.attrib)&&c in Gx&&c in Hx?Hx[c]+"_"+Gx[c]:void 0),c)){var d=c.match(/^(\d*)_((\d*)_?(\d*))$/);if(d&&5==d.length&&(d=d[3],d=6==d||7==d||8==d||9==d||10==d||11==d,pk(a.Q,mk)||d))break t}c=void 0}c&&(a.g=c,a.a.adformat=b.adformat);c=b.agcid;a.ib=c;a.a.agcid=c;c=b.feature;a.j=c;a.a.feature=c;if(c=b.referrer)a.referrer=c,a.a.referrer=c;"1"==b.enablecsi&&(a.pk=!1)}
496 function Rx(a){var b={};b.c=a.eg;a.lf&&(b.cver=a.lf);a.O&&(b.cplatform=a.O);a.H&&(b.cbrand=a.H);a.G&&(b.cmodel=a.G);a.I&&(b.cnetwork=a.I);a.A&&(b.cbr=a.A);a.B&&(b.cbrver=a.B);a.K&&(b.cos=a.K);a.M&&(b.cosver=a.M);return b}
497 function Mx(a,b){if(b){a.o=b.split(",");var c={};z(a.o,function(a){c[a]=!0});a.Oc=!!c["918108"];a.nd=!!c["912711"];a.jg=!!c["925900"];a.lj=!!c["913559"];a.nj=!c["904831"];a.Sa=!!c["913424"];a.ya=!!c["932206"];a.md=!!c["932217"];a.ve=!!c["932225"];a.Nc=!!c["932246"];a.Jc=!!c["932245"];a.ue=!!c["932240"];a.dg=!!c["932236"];a.Lc=!!c["932237"];a.mc=!!c["932242"];a.nc=!!c["932243"];a.oc=!!c["932247"];a.bg=!!c["932248"];a.za=!!c["932239"];a.Na=!!c["932249"];a.Ka=!!c["932250"];a.od=!!c["932251"];a.Mc=!!c["932252"];
498 a.Qc=!!c["924604"];a.Kc=!!c["924610"];a.te=!!c["918117"];a.Ma=!!c["907231"]&&"leanback"!=a.Y;a.ia=!!c["938600"]}}
499 function Sx(a,b){switch(b.pd){case 38:var c=b.L.indexOf(":"),d=b.L.slice(0,c),c=b.L.slice(c+1);return S("//play.google.com/books/volumes/"+d+"/content/media",{aid:c,sig:b.md});case 30:return d="//docs.google.com/",a.jb!=Lx.prototype.jb&&(d=a.jb),S(d+"get_video_info",{docid:b.L,authuser:b.Ea,authkey:b.Fn,eurl:a.b});case 33:return S("//google-liveplayer.appspot.com/get_video_info",{key:b.L});default:return d={html5:"1",video_id:b.L,cpn:b.Da,eurl:a.b,ps:a.Ca,el:a.Y,hl:a.i,list:b.Oa,agcid:a.ib,sts:15964},
500 b.U?d.vvt=b.U:b.G&&(d.access_token=b.G),a.g&&(d.adformat=a.g),b.fa&&(d.iv_load_policy=b.fa),b.kf&&(d.autoplay="1"),b.Bk&&(d.mdx="1"),b.Ck&&(d.utpsa="1"),b.bb&&(d.is_fling="1"),c=Tx(a),c.width&&(d.width=c.width),c.height&&(d.height=c.height),b.ia&&(d.ypc_preview="1"),b.Qd&&(d.splay="1"),a.k&&(d.content_v=a.k),b.Gn&&(d.livemonitor=1),a.Ea&&(d.authuser=a.Ea),a.Ua&&(d.pageid=a.Ua),w(d,Rx(a)),S(a.jb+"get_video_info",d)}}
501 function Qx(a){return a.Oh?"//s.youtubeeducation.com/":a.ag?"//s.youtube.com/":"//video.google.com/"}function Ux(a){return a.referrer?a.referrer.slice(0,128):""}
502 function eu(a,b,c,d){b={v:b.L,list:b.Oa};a.Y&&(b.feature="player_"+a.Y);c&&w(b,c);a=S(a.protocol+"://"+("www.youtube-nocookie.com"==window.location.host||a.Oh?"www.youtube.com":window.location.host)+"/watch",b);if(d){c="";c="!"=="#".charAt(1)?"#".substr(0,2):"#";b="#";"#"==b.charAt(0)&&(b="!"==b.charAt(1)?b.substr(2):b.substr(1));b=Fj(b);for(var e in d)b[e]=d[e];d=c+Hj(b);a=a+d}return a}
503 function Vx(a){var b={contact_type:"playbackissue",html5:1,plid:a.eb,ei:a.j,v:a.L};a.a&&(b.fmt=a.a.Pa);return S("//www.google.com/support/youtube/bin/request.py",b)}function Tx(a){return(a=a.Mj)?new B(a.clientWidth,a.clientHeight):new B(Number.NaN,Number.NaN)}function Bw(a){return a.Wa?new B(a.Wa.clientWidth,a.Wa.clientHeight):new B(Number.NaN,Number.NaN)}
504 function Wx(a){var b={};if(!a.Wa)return b;a.Wa.webkitDecodedFrameCount&&(b.hmewdfc=a.Wa.webkitDecodedFrameCount,b.hmewdrop=a.Wa.webkitDroppedFrameCount,b.hmewvdbc=a.Wa.webkitVideoDecodedByteCount,b.hmewadbc=a.Wa.webkitAudioDecodedByteCount);a.Wa.mozParsedFrames&&(b.hmempf=a.Wa.mozParsedFrames,b.hmemdf=a.Wa.mozDecodedFrames,b.hmempresented=a.Wa.mozPresentedFrames,b.hmempainted=a.Wa.mozPaintedFrames,b.hmempaintdelay=a.Wa.mozPaintDelay);return b}
505 function Xx(a){var b=n("yt.www.watch.activity.getTimeSinceActive",window);if("detailpage"==a.Y&&b)return b();var c;a.Ta&&(c=x()-a.Ta);return c}function oo(a){return"leanback"==a.Y||a.of||!a.wc&&!a.yl?!1:!0}function Dh(a){return"detailpage"!=a.Y?!1:!0}function Nx(a){a=ok()&&(pk(a.Q,lk)||pk(a.Q,mk));var b=pk(document.location.toString(),lk)&&!ok();return a||b}f.F=function(){this.Mj=this.Wa=null;Lx.C.F.call(this)};function Yx(){this.b=0;this.a=this.j=this.g=this.i=NaN}function Zx(a,b){for(var c=0;c<a.length;c++)if(a.start(c)<=b&&a.end(c)>=b)return a.end(c)-b;return 0};function $x(a){this.b=a;this.pendingRequests_=[];this.a=[];this.g=this.i=null;this.j=0}function ay(a,b){a.pendingRequests_.push(b);a.i=b.g[b.g.length-1];a.j+=b.T.length}function by(a){for(;a.pendingRequests_.length&&5==a.pendingRequests_[0].state;){var b=a.pendingRequests_.shift();z(b.o,a.H,a)}}
506 $x.prototype.H=function(a){if(4==a.info.type){for(var b=Qk(a.info.a,a.info),c=[],d=a.a,e=0;e<b.length;e++){var g=kk(b[e].T.start+b[e].nb-a.info.T.start+a.T.start,b[e].Ha);c.push(new wk(b[e],a.buffer,g,d));d=!1}ab(this.a,c)}else 3==a.info.type&&this.a.push(a)};
507 function cy(a,b,c){if(a.k)return a.a[0].T;var d=a.b.info.i;d&&0<b.H&&(c=Math.min(c,a.a[0].info.i+b.H));if(a.a[0].info.i>=c)return null;for(b=1;b<a.a.length;b++){var e=a.a[b].buffer!=a.a[b-1].buffer;if(a.a[b].info.i>c||e)break}b--;var e=a.a[b].T.end,g=a.a[b].info.k-c;if(d&&1<g){c=Math.floor(a.a[b].info.Ha*((c-a.a[b].info.i)/a.a[b].info.o));if(0==c)return null;e=a.a[b].T.start+c-1}return new ik(a.a[0].a?0:a.a[0].T.start,e)}
508 function dy(a){a.pendingRequests_.length?a.i=Ga(a.pendingRequests_[a.pendingRequests_.length-1].g):a.a.length?a.i=Ga(a.a).info:a.i=a.g}function ey(a){return a.b.Yb()?a.b.index.g?a.b.index.b[a.b.index.R]:-1:NaN}function fy(a,b){a.b.Yb();a.i=a.b.Vj(b,0).a[0];a.g&&a.g.b&&(a.g=null);return a.i.startTime}
509 function gy(a){hy(a);if(a.b.info.b&&a.g&&!a.g.g){var b=Pa(a.a,function(a){return a.info.g});a.a=cb(a.a,0,b+1);a.k=!0}else a.a=[];if(a.a.length)for(a.j=a.a[0].buffer.byteLength,b=1;b<a.a.length;b++)a.a[b].buffer!=a.a[b-1].buffer&&(a.j+=a.a[b].buffer.byteLength);else a.j=0}function iy(a){var b=!1,c;for(c=0;c<a.pendingRequests_.length;c++)if(7==a.pendingRequests_[c].state){b=!0;break}if(b){for(;c<a.pendingRequests_.length;)a.o(a.pendingRequests_.pop());dy(a)}}
510 function jy(a){var b=a.g;a.a.length&&(b=Ga(a.a).info);b=a.i||b;return b.yg(b.T.length-(b.Ha+b.nb))}function ky(a){return La(a.a,function(a){return a.info.g})}function ly(a){return Na(a.pendingRequests_,function(a){return!(!a.b||1!=a.b.priority)&&!(4<=a.state)})}$x.prototype.o=function(a){sk(a.g[0])||a.dispose();this.j-=a.T.length};function hy(a){z(a.pendingRequests_,a.o,a);a.pendingRequests_=[];a.i=null};function my(a,b){this.state=1;this.g=b.a;this.k=a;this.o=null;this.T=uk(b.a);this.H=b.b;this.G=NaN;this.A=this.j=0;this.i=NaN;this.b=this.B=null;this.I=""}f=my.prototype;
511 f.start=function(){var a=1==this.state,b=6==this.state;1==this.state||3==this.state||b&&ny(this);oy(this,2);if(b){if(this.j<this.k.o){this.j++;a=0.5+Math.random();H(v(this.qk,this),1E4*a);return}b=this.H;if(!(this.G<=b.g)){b.b++;b.g=Ak-1;var c;c=Ie(b.a).Se;var d=qk(b.a);b.a=Kj(d,{cmo:"pf="+b.b,shost:c})}this.j=0}a?this.qk():H(v(this.qk,this),0)};
512 f.qk=function(){if(!this.ha()){this.G=Ak++;var a={};this.T&&(a.range=this.T.toString());a.keepalive="yes";4==this.g[this.g.length-1].type&&(a.fr="yes");a=S(this.H.a,a);this.j&&(a=le(pe(a,"playerretry"),"playerretry",this.j.toString()));this.I=a;var b={format:"RAW",method:"GET",responseType:"arraybuffer",withCredentials:!0,rd:v(this.zq,this)};this.a=Qj(a,b);this.A=0;this.b&&(a=this.b,a.a=x(),a.j=a.a,a.b=0,a.o=0,a.i=!1,a.k={wm:Th(a.g),yq:Uh(a.g),xq:Vh(a.g)},py(a),this.a.addEventListener("progress",
513 v(this.Aq,this),!1),0<this.k.a&&!sk(this.g[0])&&(this.i=H(v(this.Jm,this),this.k.a)))}};f.Aq=function(a){if(!this.ha()){var b=this.b,c=a.timeStamp,d=a.loaded;c<b.a&&(c=x());if(!(20>c-b.j)){if(32768<d){qy(b,c);var e=(c-b.j)/1E3,g=d-b.b;if(0<g)if(0.2<e||1024>g)b.o+=e;else{var h=b.g,e=Math.max(e,0.05);h.a.b(e,g/e)}}b.j=c;b.b=d}this.b.b>this.b.A&&4>this.state&&oy(this,4);4==a.target.readyState&&ry(this.b,a.timeStamp)}};
514 f.zq=function(a){if(!this.ha()&&a==this.a){this.i&&(I(this.i),this.i=NaN);var b=null==a.response||400<=a.status;if(!b){a=a.response;var c;t:{if(2048>a.byteLength&&(c=String.fromCharCode.apply(String,new Uint8Array(a)),pk(c,lk)))break t;c=""}if(c)a=this.H,c=pe(c,"keepalive"),c=pe(c,"playerretry"),c=pe(c,"range"),c=pe(c,"shost"),a.a=c,oy(this,3);else if(a.byteLength!=this.T.length)b=!0;else{c=this.g;if(1==c.length&&!c[0].T){var d;d=c[0];var e=kk(0,a.byteLength);d=new rk(d.type,d.a,e,d.j,d.startTime,
515 d.duration,d.nb,e.length,d.b);c[0]=d}d=[];for(var e=0,g=!1,h=!1,k=0;k<c.length;k++){var m=c[k],p=a,s=kk(e,m.Ha),r=!1;if(1==m.type)a.slice?p=a.slice(e,e+m.Ha):(g=new Uint8Array(a,e,e+m.Ha),p=(new Uint8Array(g)).buffer),s=kk(0,m.Ha),g=!0;else if(3==m.type||4==m.type)r=g&&!h,h=!0;d.push(new wk(m,p,s,r));e+=m.Ha}this.o=d;oy(this,5)}}b&&(ny(this),oy(this,6))}};function ny(a){return a.j<a.k.o?!0:!(a.G>a.H.g&&1<=a.H.b)}function oy(a,b){a.state=b;3<=a.state&&a.B&&a.B(a)}
516 f.Jm=function(){this.i=NaN;if(!this.ha()&&this.b){var a=!1;if(this.b.i){var b=this.b.H;py(this.b);this.b.H-b>=0.8*(this.k.a/1E3)?(this.A++,a=5<=this.A):this.A=0}else a=5<x()/1E3-(this.b.a/1E3+this.b.k.wm);a?(oy(this,7),sy(this),ry(this.b,Date.now())):this.i=H(v(this.Jm,this),this.k.a)}};f.ha=function(){return-1==this.state};f.dispose=function(){oy(this,-1);this.B=this.o=null;sy(this);I(this.i);this.i=NaN};function sy(a){if(a.a){var b=a.a;a.a=null;b.abort()}};function ty(a,b,c,d){this.priority=b;this.g=a;this.A=d;this.b=this.j=this.a=NaN;this.o=0;this.B=c;this.H=NaN;this.i=!1}function ry(a,b){b<a.a&&(b=x());qy(a,b);var c=a.g,d=a.b,e=a.o,d=Math.max(d,32768);c.g.b(1,e/d);c=a.g;d=b-a.a;e=a.b;isNaN(e)||(c.i+=e);isNaN(d)||(c.j+=d/1E3)}function py(a){var b=a.B-a.b,b=b*a.k.yq+b/a.k.xq,c=x()/1E3,b=a.i?b+c:b+Math.max(c,a.a/1E3+a.k.wm);a.H=b}function qy(a,b){a.i||(a.g.b.b(1,(b-a.a)/1E3),a.i=!0)};function uy(a,b,c,d){R.call(this);this.j=a;this.b=b;this.i=new $x(c);this.a=new $x(d);this.k=this.G=this.I=NaN;this.o=this.M=this.B=!1;this.A=NaN;this.O=!1}y(uy,R);var vy=2/24;f=uy.prototype;f.Es=function(a){this.g=a;a.Zb.appendBuffer&&(a.Zb.addEventListener("updateend",v(this.Vf,this),!1),a.ud.addEventListener("updateend",v(this.Vf,this),!1));wy(this)};
517 function xy(a){a.g&&a.g.Zb&&a.g.Zb.removeEventListener&&(a.g.Zb.removeEventListener("updateend",v(a.Vf,a)),a.g.ud.removeEventListener("updateend",v(a.Vf,a)));a.g=null}function yy(a){if(0<a.b.j){var b=(a.i.b.info.a+a.a.b.info.a+12500)*a.b.j;if(0<a.b.i){if(b>a.b.i)return;b=a.b.i}b={cwndbw:(8*b/1024).toFixed(0)};Bk(a.i.b.j,b);Bk(a.a.b.j,b)}}function zy(a,b,c){c-=2;c-=c*b*Uh(a.j);c=Math.max(a.b.M,Math.min(a.b.P,c));a=Math.max(a.b.O,Math.ceil(a.b.M*b));return Math.min(a,Math.ceil(c*b))}
518 function Ay(a,b){var c=Math.min(2.5,Th(a.j));return Math.ceil(b*c+32768)}function By(a){var b=Vh(a.j);a=Th(a.j)+1048576*Uh(a.j);return b*Math.min(1,1048576/(b*a))}
519 function Cy(a,b){if(!b.i){if(!b.b.Yb())return;fy(b,a.k)}if(!(b.j>a.b.B)){var c=b.i;4==c.type&&c.a.Yb()&&(b.i=Ga(Qk(c.a,c)),c=b.i);if(!(c.b||!c.a.Oj(c)||c.a.info.i&&(4==c.type||a.a.i&&!a.a.i.b&&a.a.i.k<c.i))){var d=a.b.G;a.o&&0<a.b.b&&(d=Math.max(d,a.b.b/c.a.info.a));d=a.k+d;if(!(3==c.type&&c.k>d||2<=ly(b)+1)){var d=c.k-a.k,e=c.a.info.a,g=c.a.Yb()?zy(a,e,d):a.b.K,h=Ay(a,c.a.info.a),k=!1,e=!1;if(c&&3==c.type&&b.b.Yb()&&c.a!=b.b){var d=zy(a,b.b.info.a,d+(c.startTime+c.duration-c.k)),m=Ay(a,b.b.info.a),
520 e=c.a.info.a<b.b.info.a;if(!e||d>=m)k=!0,g=d,h=m}d=h;0<g&&(d=Math.max(a.b.K,g,Math.min(2*g,h)));if(k){c=b.i?b.i.startTime+b.i.duration+vy:0;if(a.b.g&&e)t:{e=Th(a.j)+d*Uh(a.j)+d/Vh(a.j)+a.k+2,e=Math.min(e,c),e=Fk(b.b.index,e),e+1<b.b.index.hb()&&(c=b.b.index.b[e+1]),e=c;if(b.pendingRequests_.length){if(b.pendingRequests_[0].g[0].startTime<=e)break t;hy(b)}for(g=b.a.length-1;0<=g;g--)h=b.a[g],h.info.startTime>e&&(b.a.pop(),b.a.length&&b.a[g-1].buffer==h.buffer||(b.j-=h.buffer.byteLength));dy(b)}b.i&&
521 !b.i.g&&(e=new my(a.b,jy(b)),Dy(a,e,!0),ay(b,e));b.i&&(c=b.i?b.i.startTime+b.i.duration+vy:0);d=new my(a.b,b.b.Vj(c,d))}else d=new my(a.b,c.yg(d));Dy(a,d,!1);ay(b,d)}}}}function Dy(a,b,c){c=c?2:1;a.b.Q&&(c=0);var d=Math.min(2.5,Th(a.j)),e=Vh(a.j);b.b=new ty(a.j,c,b.T.length,0.95*b.T.length-d*e);a=v(a.Pv,a);b.B=a;b.start()}
522 f.Pv=function(a){if(!this.ha()){var b=6==a.state&&ny(a);3==a.state||b?(b&&this.u("softerror",209),a.start()):5==a.state?(this.K||(this.K=a.I),Ey(this),z(a.o,function(a){sk(a.info)&&a.info.a.Oo(a)}),Ma(a.o,function(a){return yk(a)})&&!a.g[0].a.Po()?wy(this):Fy(this,126)):7==a.state||4==a.state?(7==a.state&&this.u("softerror",210),wy(this)):Fy(this,121)}};
523 function Ey(a){if(!a.O&&a.K&&window.performance&&window.performance.getEntriesByName){var b=window.performance.getEntriesByName(a.K);b.length&&(b=b[0],Gy("vrst",b.fetchStart),Gy("vdns",b.domainLookupEnd),Gy("vreq",b.requestStart),Gy("fvb",b.responseStart),a.O=!0)}}function wy(a){isNaN(a.I)&&(a.I=H(v(a.Vf,a),0))}function Hy(a){isNaN(a.G)&&(a.G=H(v(function(){this.Vf();this.G=NaN},a),1E3))}
524 f.Vf=function(){this.I=NaN;if(!this.M&&this.g){var a=Math.floor(Math.max(ey(this.i),ey(this.a)));isNaN(a)||(this.g.Va(a),this.M=!0)}if(!this.ha())if("prerender"==window.document.webkitVisibilityState)Hy(this);else{this.g&&this.g.Ib()&&xy(this);by(this.a);by(this.i);iy(this.a);iy(this.i);a=!1;if(this.g){var a=Iy(this,this.a,this.g.ud),b=Jy(this.g.ud,this.k);if(!isNaN(b)||this.a.g&&this.a.g.b)this.a.g&&this.a.g.b&&(b=NaN),a|=Iy(this,this.i,this.g.Zb,b);if(this.a.g&&this.a.g.b&&this.i.g&&this.i.g.b&&
525 !this.g.Zb.updating&&!this.g.ud.updating&&this.g.isOpen()){a=this.g;a.isOpen()&&a.g.endOfStream();return}}this.om();Cy(this,this.a);Cy(this,this.i);a&&(this.g.Zb.appendBuffer||wy(this))}};f.om=function(){if(!this.ha()&&!isNaN(this.b.A)){var a=By(this);!isNaN(this.A)&&Math.abs(this.A-a)/a<this.b.A||(Math.round(a/1024),Math.round(this.A/1024),this.u("bandwidthchange",a),bg("yt-player-bandwidth",{byterate:a},2592E3),this.A=a)}};
526 function Iy(a,b,c,d){if(c.updating)return!0;var e=b.a.length?b.a[0]:null;if(!e)return!1;!b.g||b.g.g||tk(b.g,e.info)||(b.g=null,a.g.isOpen()&&c.abort(),c.g=null);var g;e.info.a.Yb();e.a?g=!1:(g=e.info.a.b,c.g==g?g=!1:(Ky(a,c,g),c.g=g,g=!0));if(g&&c.updating)return!0;g=a.b.I;a.o&&0<a.b.b&&(g=Math.max(g,a.b.b/b.b.info.a));g=a.k+g;0<=d&&(g=Math.min(g,d));d=cy(b,a.b,g);if(!d)return!1;g=new Uint8Array(e.buffer,d.start,d.length);if(!Ky(a,c,g))return!1;for(var h;b.a.length;){if(b.a[0].T.end>d.end){h=b.a[0];
527 var k=d.end-b.a[0].T.start+1,k=Math.min(k,h.info.Ha);g=new rk(h.info.type,h.info.a,h.info.T,h.info.j,h.info.startTime,h.info.duration,h.info.nb,k,!1);a=kk(h.T.start,k);g=new wk(g,h.buffer,a,h.a);k=new rk(h.info.type,h.info.a,h.info.T,h.info.j,h.info.startTime,h.info.duration,h.info.nb+k,h.info.Ha-k,h.info.b);a=new ik(a.end+1,h.T.end);a=[g,new wk(k,h.buffer,a,!1)];h=a[0];b.a[0]=a[1]}else h=b.a.shift();a=b;a.g=h.info;a.k&&a.g.g&&(a.k=!1);if(h.T.end==d.end)break}b.a.length&&h.buffer==b.a[0].buffer||
528 (b.j-=h.buffer.byteLength);e.a&&(c.g=e.info.a.b);return!c.appendBuffer||c.updating}function Ky(a,b,c){if(b.appendBuffer)try{b.appendBuffer(c)}catch(d){return!1}else b.append(c);return!a.g.Ib()}function Jy(a,b){for(var c=0;c<a.buffered.length;c++)if(a.buffered.start(c)<=b&&a.buffered.end(c)>=b)return a.buffered.end(c);return NaN}function Ly(a,b){if(!a.ha()){var c=My(a,a.a,b,a.g&&a.g.ud),d=My(a,a.i,c,a.g&&a.g.Zb);a.k=Math.max(b,c,d);a.B=!0;wy(a)}}
529 function My(a,b,c,d){if(b.b.Yb())if(d){if(a.o&&a.b.g)return gy(b),fy(b,c);var e=Jy(d,c),g=NaN,h=b.g;h&&(g=Jy(d,h.a.index.b[h.j]));if(e==g)return c;gy(b);b.b.info.b&&b.g&&!b.g.g&&!ky(b)&&(d=new my(a.b,jy(b)),Dy(a,d,!0),ay(b,d));if(isNaN(e))return fy(b,c);fy(b,e+vy)}else fy(b,c);else b.b.i?0!=c&&hy(b):Ny(a,b,!1);return c}
530 function Ny(a,b,c){var d=c?65536:0;c&&!isNaN(a.b.k)&&(d=Math.floor(Math.max(d,a.b.k*b.b.info.a)));c=b.b.po(d);z(c,function(a){var c=new my(this.b,a);Dy(this,c,!0);!sk(a.a[a.a.length-1])&&ay(b,c)},a);b.b.i=!0}f.F=function(){xy(this);hy(this.i);hy(this.a);this.a=this.i=null;uy.C.F.call(this)};function Fy(a,b){a.u("fatalerror",b);if(a.g&&a.g.isOpen()){var c=a.g;c.isOpen()&&c.g.endOfStream("network")}a.dispose()}function Gy(a,b){var c;b&&(c=window.performance.timing.navigationStart+b);os(a,c)};function Oy(){this.H=2;this.I=30;this.G=40;this.b=NaN;this.B=20971520;this.M=this.k=2;this.K=131072;this.P=15;this.O=2097152;this.A=0.1;this.o=2;this.g=!0;this.a=1800;this.i=this.j=NaN};function Py(a,b,c){this.a=a;this.headers=b;this.message=c};function Qy(a,b,c,d,e,g,h){this.a=[];this.g=a;this.k=b.g;this.j=b;this.i=c;this.G=d;this.I=e;this.b=[];this.K=h||null;this.B=this.M=!1;this.A=null;this.o=!0;this.H={};this.listen(this.g,["keymessage","webkitkeymessage"],this.zj);this.listen(this.g,["keyadded","webkitkeyadded"],this.sq);this.listen(this.g,["keyerror","webkitkeyerror"],this.tq);g&&this.b.push(g)}y(Qy,Kl);function Ih(a,b){if(pk(b,lk)){for(var c in a.H)b=le(pe(b,c),c,a.H[c]);a.k=b}else Ry(a,"u")}f=Qy.prototype;
531 f.start=function(){this.ha()||(this.M=!0,this.b.length&&this.zj(this.b.shift()))};f.dispose=function(){Qy.C.dispose.call(this);this.I=this.g=null};f.zj=function(a){this.ha()||a.sessionId!=this.i||(this.B&&a.defaultURL&&Ih(this,a.defaultURL),this.M?(this.A=a,Sy(this,a)):this.b.push(a))};f.sq=function(a){this.ha()||a.sessionId!=this.i||(this.B=!0,this.b.length&&this.zj(this.b.shift()))};
532 function Sy(a,b){var c={format:"RAW",method:"POST",Lw:b.message,responseType:"arraybuffer",withCredentials:!0,Qa:a.Mw,onError:a.Qn,Z:a};a.K&&(c.headers={Authorization:"Bearer "+a.K});var d=a.k;a.o||(d=le(pe(d,"exclude_customdata"),"exclude_customdata","1"));Qj(d,c)}
533 f.Mw=function(a){if(!this.ha())if(0!=a.status&&a.response){t:{a=new Uint8Array(a.response);var b=0,c=String.fromCharCode.apply(String,a.subarray(0,16384)).split("\r\n"),d=c[0];Xa(c,0);c.pop();var b=b+(d.length+2),e=d.match(/^GLS\/1.\d ([0-9]{1,3}) (\w+)$/);if(null!=e){d=e[1];isFinite(d)&&(d=String(d));for(var d=u(d)?/^\s*-?0x/i.test(d)?parseInt(d,16):parseInt(d,10):NaN,g={},h=0;h<c.length;h++){e=c[h];b+=e.length+2;if(0==e.length){a=new Py(d,g,a.subarray(b));break t}e=e.match(/([^:]+):\s+([^]+)/);
534 if(null==e)break;g[e[1]]=e[2]}}a=null}0!=a.a?(b=ax[a.a.toString()],Ry(this,"f"+a.a,b?b:"ERROR_LICENSE")):(a=a.message,this.g.addKey?this.g.addKey(this.j.a,a,this.G,this.i):this.g.webkitAddKey(this.j.a,a,this.G,this.i))}else this.Qn(a)};f.tq=function(a){this.ha()||a.sessionId!=this.i||("playready"==this.j.b&&a.errorCode==a.MEDIA_KEYERR_UNKNOWN&&2==a.systemCode&&this.o?(this.o=!1,Sy(this,this.A)):Ry(this,"s"+a.errorCode.code+"."+a.systemCode))};f.Qn=function(a){Ry(this,"r"+a.status)};
535 function Ry(a,b,c){a.ha()||a.I(b,c);a.dispose()};function Ty(a,b,c,d){this.a=[];this.b=a;this.g=b;this.B=c;this.o=d;this.A=null;this.j={};this.H={};this.i=null;this.k=[];this.listen(this.b,["needkey","webkitneedkey"],this.G);this.listen(this.b,["keymessage","webkitkeymessage"],this.K);this.listen(this.b,["keyerror","webkitkeyerror"],this.I)}y(Ty,Kl);Ty.prototype.dispose=function(){Ty.C.dispose.call(this);this.b=null;Eb(this.j,function(a){a.dispose()})};
536 Ty.prototype.G=function(a){a=a.initData;if(!this.i&&Kb(this.j)||"widevine"!=this.g.b){var b=String.fromCharCode.apply(String,a);if(!this.H[b]){this.H[b]=!0;b="clearkey"==this.g.b;if(112==a[4]&&115==a[5]&&115==a[6]&&104==a[7]&&b){t:{for(var c=new DataView(a.buffer),b=0;b<c.byteLength;){var d=c.getUint32(b,!1);if(1886614376!=c.getUint32(b+4,!1))break;if(1477738184==c.getUint32(b+12,!1)&&69420633==c.getUint32(b+16,!1)&&2464609580==c.getUint32(b+20,!1)&&1558758348==c.getUint32(b+24,!1)){c=c.getUint32(b+
537 28,!1);if(16!=c)break;a=a.subarray(b+32,b+32+c);break t}b+=d}a=null}if(!a)return}this.i?this.k.push(a):Uy(this,a)}}};function Uy(a,b){if(!a.ha()){try{a.b.generateKeyRequest?a.b.generateKeyRequest(a.g.a,b):a.b.webkitGenerateKeyRequest(a.g.a,b)}catch(c){var d="g";c instanceof DOMException&&(d+=c.code);a.o(d,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",!0);return}a.i=b}}
538 Ty.prototype.K=function(a){if(!this.ha()&&this.b&&!this.j[a.sessionId]){var b=new Qy(this.b,this.g,a.sessionId,this.i,this.o,a,this.A);this.j[a.sessionId]=b;this.i=null;this.B(b);this.k.length&&Uy(this,this.k.shift())}};Ty.prototype.I=function(a){!this.ha()&&this.b&&(this.j[a.sessionId]||this.o("s"+a.errorCode.code+"."+a.systemCode))};function Vy(a,b,c,d){this.ka=a;this.a=b;this.g=c;this.b=d};function Wy(a){this.a=a}function Xy(a,b){var c=b.mf;return c&&c&&"unknown"!=c?c:(c=a.a.Kh)&&c&&"unknown"!=c?c:"auto"}
539 function Yy(a,b,c){var d,e=Xy(a,b);if(e&&"auto"!=e&&(d=null,e=gk.indexOf(e),0<=e))for(;e<gk.length&&!(d=vm(b,gk[e]));e++);if(!d){d=b.k;var g;a.a.Tc?(e=a.a.Tc.clone(),Ri&&!a.a.Dh&&(e=(window.screen&&window.screen.width?new B(window.screen.width,window.screen.height):null)||e),e.scale(Ri||Wb?window.devicePixelRatio||1:1),g=a.a.Jh||e):g=a.a.Jh;t:{e=a=0;null!==g&&(a=g.width,e=g.height);g=16/9;a>Math.round(g*e)&&(a=Math.round(g*e));a*=e;g=null;for(e=0;e<d.length;e++){g=d[e];var h=g.getInfo(),h=h.b.width*
540 h.b.height*("medium"==g.We()?0.26:0.85)>a,k=!0;g.a&&c&&(k=g.b.info.a+g.g.info.a<c);if(!h&&k){c=g;break t}}c=g}c||(c=b.k[0]);d=c}return d};function Zy(){this.b=this.a=NaN}function $y(a,b,c){if(a.a==b)return 500<c-a.b;a.a=b;a.b=c;return!1};var az=[102,107,108];var dh=[0.25,0.5,1,1.5,2];function bz(a,b){this.state=a;this.a=b}function Ro(a,b){return P(a.state,b)&&!P(a.a,b)?1:!P(a.state,b)&&P(a.a,b)?-1:0};function cz(a,b){R.call(this);this.ja=new Zy;this.A=new xj(v(this.getCurrentTime,this),v(this.rq,this),v(this.ig,this));L(this,this.A);this.O=NaN;this.P=this.I=null;this.o=a;this.va=new Wy(a);this.ia=NaN;this.ga=!1;this.g=this.k=null;this.Q=[];this.U=!1;this.fa=NaN;this.i=new sj;this.B=b;this.K=this.X=null;this.G=NaN;this.M=new Uo(this);this.b=this.a=null;this.aa=NaN;this.j=null}y(cz,R);f=cz.prototype;
541 f.F=function(){I(this.aa);I(this.ya);hf(this.fa);dz(this);Cn(this);Tg(this.k,this.K,this.M,this.a);this.a=this.M=this.i=this.k=this.P=this.ja=null};
542 function ez(a,b){a.U=!1;a.O=NaN;a.b&&mj(a.b);fz(a);dz(a);Tg(a.k,a.a);a.k=null;a.A.reset();if(2==a.B||pk(a.o.Q,mk))b.X=!1,b.In=!0;a.a=b;a.a.D("dataupdated",a.bu,a);a.a.D("dataloaded",a.au,a);a.a.D("onStatusFail",a.Zt,a);if(b.rf&&b.rf>b.xa){var c=b.rf;a.P&&(a.$h(a.pa),a.pa=null);a.P=new Zh(1E3*c,2147483646);a.P.zb.D("onEnter",a.ng,a);a.Kk(a.P)}gz(a,"newdata")}function dz(a){hf(a.ia);a.j&&(Sg(a.j),a.j=null)}f.getVideoData=function(){return this.a};f.J=function(){return this.o};
543 function hz(a){return!(!a.a||!a.a.k.length)}function iz(a){if(a.a&&(a.a.L||a.a.nf))return!0;hx(a,2);return!1}function jz(a){a.U||(kz(a,uj(new sj,8)),a.j&&lz(a.j),a.U=!0,!iz(a)||a.a&&a.a.Ze||mz(a,v(function(){if(hz(this))nz(this);else if(!this.a.Ze)if(oz(this))nz(this);else{var a=Sx(this.o,this.a);Am(this.a,a)}},a)))}function pz(a){if(!a.Q.length){if(!a.A.vg){var b=a.A;b.g=Cj(b);b.vg=!0;b.Xb()}a.Q.length||0<Ii(a.A.b,-2147483648).length||a.u("playbackready",a)}}
544 f.Tq=function(){var a=this.j,b=this.a.bk;a.U!=b&&(qz(a,{metric:"heartbeat",tpmt:this.a.Ce}),a.U=b)};function nz(a){a.Q=$a(a.a.I);a.a.cb&&(rz(a,a.a.ta),sz(a,!0));fh(a,"i");a.u("playbackdataloaded")}f.ng=function(a){tz(this);kz(this,!1==a?new sj:new sj(wj()))};function Bh(a,b,c){b={event:"streamingerror",ec:b,v:a.a.L};c&&(b.em=c);w(b,Rx(a.o));a.j&&uz(a.j,b,void 0)}function hx(a,b,c,d){if(Ib($w,c))var e=c;else var g=c;kz(a,tj(a.i,128,{errorCode:b,errorDetail:d,message:g,messageKey:e}))}
545 function vz(a,b){a.Q=a.Q.filter(function(a){return b!=a});pz(a)}f.ig=function(){return P(this.i,8)&&!P(this.i,64)&&!P(this.i,2)};function oz(a){return!(!a.a||!a.a.L&&!a.a.nf||a.a.L)}f.rq=function(){return this.i};function wz(a,b){a.b&&Cn(a);a.b=b;xz(a)}function Cn(a){a.g=null;a.b&&(fz(a),a.M.removeAll(),mj(a.b),a.b=null)}
546 function yz(a){if(a.b){var b=wm(a.a);if(a.a.o&&a.a.o.a){var c=a.a.o,b=c.g,c=c.b;a.g||(a.g=new Ll(a.b,a.a.ta,b.info.lb,c.info.lb),b=a.g,b.b||(b.b=b.g.mn?b.g.a.webkitMediaSourceURL:window.URL.createObjectURL(b.g)),a.za=new Rl(b.b,!1,!0),b=v(a.k.Es,a.k),a.g.j=b);b=a.za}a.b.Bd!=b?zz(a,b):(P(a.i,64)&&kz(a,uj(a.i,8)),kj(a.b),a.a.Fb&&!a.a.cb&&Az(a,Infinity))}}
547 function fh(a,b,c){if(!a.ha()&&hz(a)&&!P(a.i,128)){var d="m"==b,e="m"==a.a.od;if(d||!e){d&&"auto"==c&&(b="a",d=!1);c&&(a.a.mf=c);var g=NaN;!a.X||a.o.ya||a.o.yh||(g=a.k?By(a.k):Vh(a.X),"i"==b&&(g=a.o.Jc?0.4*g:0.6*g));var h=Yy(a.va,a.a,g),g=h.getInfo(),k=h.a?h.b.info:g;if(a.a.a!=g||a.a.pa!=k||d!=e){a.a.o=h;a.a.a=g;a.a.pa=k;a.a.od=b;c&&(a.a.mf=c);if(h.a)if(a.k){var m=a.k,h=h.g;c=d;m.ha()||(m.o=c,m.a.b!=h&&(m.a.b=h,yy(m),c&&gy(m.a),h.i||Ny(m,m.a,!1),wy(m)))}else{c=a.o;e=new Oy;if(c.ya||c.yh)e.A=NaN;c.md&&
548 (e.o=0);c.ue&&(e.k=3);c.Ul&&(e.M=1,e.K=49152);c.Lc&&(e.P=30);c.dg&&(e.a=700);c.mc&&(e.j=3);c.nc&&(e.j=1.5,e.i=1048576);c.od&&(e.b=62914560);c.Mc&&(e.H=NaN);"play"==c.Ca&&(e=Lb(e),e.I=10,e.G=20,e.b=NaN,e.B=10485760,e.O=1048576,e.g=!1,c.bg&&(e.g=!0));Ui&&cj("crkey")&&(c=Lb(e),c.k=3.5,c.I=20,c.G=40,c.B=20971520,c.g=!0,c.a=700,c.o=2,e=c);c=e;a.a.Ta&&(c.a=NaN);a.k=new uy(a.X,c,h.b,h.g);a.k.D("bandwidthchange",a.oq,a);a.k.D("fatalerror",a.pq,a);a.k.D("softerror",a.qq,a);h=a.k;c=(c=a.a.xa)||0;yy(h);0==c&&
549 (h.a.b.i||Ny(h,h.a,!0),h.i.b.i||Ny(h,h.i,!0));Ly(h,c);Gy("gv");H(v(h.om,h),0);t:{for(m in Ml)if(!!Ol(m)!=Ml[m]){m=!1;break t}m=!0}m||Bh(a,211)}else a.ig()&&yz(a);m=b;a.j&&(h=Yy(a.va,a.a),b=a.j.i,g=new Vy(a.a,g,m,h.ye.Pa),Bz(b,"vfs",[g.a.Pa,g.b,b.A,g.g]),b.A=g.a.Pa,g=Bw(b.a),0<g.width&&0<g.height&&Bz(b,"view",[Math.round(g.width),Math.round(g.height)]),Bz(b,"vps",[b.g]),b.mg());a.u("internalvideoformatchange",a.a,d)}}}}f.oq=function(){fh(this,"a")};f.pq=function(a){hx(this,a)};
550 f.qq=function(a){Bh(this,a);if(this.j)this.j.onError(a)};function tz(a){P(a.i,64)&&kz(a,tj(a.i,a.i.b&-9));a.b&&a.b.pause()}
551 function Az(a,b,c,d){if(a.b){if(a.b){b=b||0;var e=1>a.b.seekable.length?NaN:a.b.seekable.end(a.b.seekable.length-1);a.k&&!isNaN(Math.floor(Math.min(ey(a.k.i),ey(a.k.a))))&&(e=Math.floor(Math.min(ey(a.k.i),ey(a.k.a))));b>e&&(b=e,sz(a,!0));0>b&&(b=0)}else b=0;a.a.xa=b;a.G=b;c?a.ti():(Cz(a),d&&(a.K||(a.K=new Xo(a.ti,d,a)),a.K.start()),Dz(a,!0));a.P&&b>a.a.rf&&(a.$h(a.pa),a.pa=null);a.u("seekto",a,b)}else a.a.xa=b||0}function Cz(a){P(a.i,32)||(kz(a,uj(a.i,32)),P(a.i,8)&&tz(a),a.u("beginseeking",a))}
552 f.ti=function(){if(!isNaN(this.G)&&this.b){var a=this.qd();!this.a.Fb&&this.G>=Math.floor(a)?(this.G=a,this.u("endseeking",this),tz(this),this.ng()):(this.k&&Ly(this.k,this.G),ij(this.b,this.G))}this.K&&(this.K.dispose(),this.K=null);P(this.i,32)&&(kz(this,tj(this.i,this.i.b&-33)),this.u("endseeking",this))};f.getCurrentTime=function(){if(!isNaN(this.G))return this.G;var a=0;this.b?a=this.b.getCurrentTime():this.a&&(a=this.a.we);return a};
553 f.qd=function(){var a=0;this.b&&(a=this.b.Vd);0==a&&this.a&&(a=this.a.ta);return a};f.Dq=function(){var a=new Yx;if(this.X){var b=this.X;a.g=b.i;a.j=b.j;a.a=Vh(b)}this.k?(b=this.k,b.g&&(a.b=Zx(b.g.ud.buffered,b.k),a.i=Zx(b.g.Zb.buffered,b.k)),a.a=By(b),Vh(b.j),Th(b.j),Uh(b.j)):this.b&&(a.b=Zx(this.b.buffered,this.getCurrentTime()));return a};function Ez(a,b){var c=isNaN(b)?a.getCurrentTime():b,d=a.qd();return Infinity==d?1:d?c/d:0}
554 f.Fq=function(){var a;if(this.a){a=this.a;var b={};a.a&&(b.fmt=a.a.Pa,a.pa&&(b.afmt=a.pa.Pa));a.Q&&(b.threed=a.Lc);b.plid=a.eb;b.ei=a.j;b.list=a.Oa;b.cpn=a.Da;a.L&&(b.v=a.L);a.Fj&&(b.infringe=1);a.Qd&&(b.splay=1);a.Fb&&(b.live=a.cb?"dvr":"live");a.kf&&(b.autoplay=1);a.ja&&(b.sdetail=a.ja);a.pd&&(b.partnerid=a.pd);a=b}else a={};return a};
555 function Fz(a,b){var c={};if(b){if(a.j){var d=Gz(a.j);d&&w(c,d.Uh())}a.b&&w(c,{vct:a.b.currentTime.toFixed(3),vd:a.b.duration.toFixed(3),vpl:pj(a.b.played),vbu:pj(a.b.buffered),vpa:a.b.paused,vsk:a.b.seeking,vpr:a.b.playbackRate,vrs:a.b.readyState,vns:a.b.networkState,vec:a.b.error?a.b.error.errorCode:null});if(a.k){var d=a.k,e={lct:d.k.toFixed(3),lsk:d.B,lmf:d.o,lbw:Vh(d.j).toFixed(3),lhd:Th(d.j).toFixed(3),ltd:Uh(d.j).toFixed(3),laa:d.i.g?vk(d.i.g):"",lva:d.a.g?vk(d.a.g):"",lar:d.i.i?vk(d.i.i):
556 "",lvr:d.a.i?vk(d.a.i):""};d.g&&!d.g.Ib()&&(e.lab=pj(d.g.Zb.buffered),e.lvb=pj(d.g.ud.buffered));w(c,e)}P(a.i,384)&&(c.debug_error=a.i.a)}c.debug_videoId=a.a.L;return c}f.Kk=function(a){this.A.nx(a)};f.$h=function(a){this.A.ox(a)};f.au=function(a){this.u("commoninfoloaded",a);gz(this,"dataloaded");mz(this,v(function(){this.U&&nz(this)},this))};f.bu=function(){gz(this)};f.Zt=function(a){hx(this,parseInt(a.errorcode,10),unescape(a.reason),a.errordetail)};
557 function gz(a,b){a.u("internalvideodatachange",b||"dataupdated",a,a.a)}function mz(a,b){if(hz(a))a.o.Na?b():H(b,0);else{var c=a.a,d=a.o.Nh;c.B?rm(c,b,!!d,!("play"==a.o.Ca&&!a.o.Na)):tm(c,b,!!d)}}function xz(a){z("loadstart loadeddata loadedmetadata play playing pause ended suspend progress seeking seeked timeupdate durationchange error waiting abort".split(" "),function(a){this.M.listen(this.b,a,this.Vv)},a)}
558 f.Vv=function(a){var b=a.target;if(b.currentSrc){switch(a.type){case "durationchange":this.a.cb||(b.Va(b.duration||0),b=b.Vd,(!this.g||isFinite(b)&&0<b)&&rz(this,b));break;case "ended":kz(this,tj(this.i,4));break;case "loadedmetadata":this.a.xa&&(this.b.currentTime=this.a.xa),this.o.qm&&this.a.xa&&(this.O=this.a.xa,this.b.pause());case "loadeddata":this.aa&&I(this.aa);break;case "loadstart":hf(this.fa);this.fa=gf(v(this.rn,this),100);var b=this.M,c=this.b,d=v(this.rn,b.Og),c=tf(c,d);b.ee.push(c);
559 break;case "progress":this.O&&this.b.seekable.length&&this.b.seekable.end(0)>this.O&&(this.b.currentTime=this.O,this.O=NaN,this.ma=this.M.listen(this.b,"canplay",this.Is));case "suspend":Dz(this);this.u("onLoadProgress",this,this.b?hh(this.b):0);break;case "seeking":Hz(this);break;case "timeupdate":Hz(this),Dz(this),this.u("onVideoProgress",this,b.getCurrentTime())}this.u("videoelementevent",a);t:if(b=this.i,d=this.ja,P(b,128))a=b;else{var c=b.b,e=b.a,g=a.target;switch(a.type){case "ended":if(0>=
560 g.networkState)break;c=wj();e=null;break;case "pause":P(b,32)||P(b,2)||(c=4,P(b,1)&&P(b,8)&&(c|=1),e=null);break;case "playing":c=8;e=null;break;case "abort":if(64==c)break;case "error":c|=256;a=g.error;d=107;if(a&&a.code)switch(a.code){case a.MEDIA_ERR_ABORTED:d=200;break;case a.MEDIA_ERR_NETWORK:d=201;break;case a.MEDIA_ERR_DECODE:d=202;break;case a.MEDIA_ERR_SRC_NOT_SUPPORTED:d=203}e={errorCode:d};Sa(rj,e.errorCode)&&(c|=128);break;case "canplay":c&=-2;break;case "progress":P(b,8)&&(g=a.target.getCurrentTime(),
561 d&&$y(d,g,a.timeStamp)&&(c|=1));break;case "seeked":c&=-18;break;case "seeking":c|=16;g.inUnbufferedArea()&&(c|=1);c&=-3;break;case "waiting":P(b,2)||(c|=1);break;case "timeupdate":P(b,16)||(c&=-2);c&=-65;break;default:a=b;break t}a=tj(b,c,e)}kz(this,a)}};
562 f.rn=function(){if(this.b&&0<this.b.getCurrentTime()&&0<this.b.Vd&&!this.a.Sm){hf(this.fa);this.a.Sm=!0;if(this.j){var a=this.j;if(!a.g){var b=Gz(a,"playback");a.a.lm&&(a.M=[10+a.a.cg,10,10,40+a.a.xh-a.a.cg,40],hf(a.I),a.I=NaN,a.I=gf(v(a.ja,a),100),b.gg=Iz(a,!0));b.hg=!0;b.A=a.j();b.send();if(a.b.Rc&&!a.g){var b=a.b,c=a.a,b={noflv:"1",html5:"1",video_id:c.L,cpn:c.Da,plid:c.eb,ei:c.j,referrer:Ux(b),eurl:b.b,framer:b.P,feature:b.j,fmt:c.a?c.a.Pa:0,ptk:c.A,skl:c.nm,access_token:c.G,ucid:c.Kc};w(b,Jz(a));
563 b=S(a.b.jb+"user_watch",b);Qg(b)}a.a.A&&Qg(S(a.b.jb+"ptracking",{html5:"1",video_id:a.a.L,cpn:a.a.Da,plid:a.a.eb,ei:a.a.j,ptk:a.a.A,oid:a.a.oc,ptchn:a.a.ib,pltype:a.a.mc,content_v:a.b.k}));if(a.a.km&&a.b.Be&&!a.g){var b=a.b,c=a.a,d={noflv:1,video_id:c.L,cpn:c.Da,el:b.Y,ps:b.Ca,referrer:Ux(b),eurl:b.b,framer:b.P,fmt:c.a?c.a.Pa:0,ptk:c.A,subscribed:c.g,t:c.nd};b.Ub&&(d.autoplay="1");c.Qd&&(d.splay="1");0<c.xa&&(d.start=1E3*c.xa);c.rj&&(d.tmi="1");b=S(a.Q,d);Qg(b)}a.a.kg&&qz(a,{metric:"playback"});a.g=
564 !0}}hf(this.ia);this.a.kg&&(this.j.g||this.a.jm)&&(this.ia=gf(v(this.Tq,this),3E4));this.u("playbackstarted")}};f.Is=function(){this.ma&&(this.M.dc(this.ma),this.ma=void 0,kj(this.b))};
565 function Dz(a,b){if(a.b){var c=a.getCurrentTime();if(a.k){var d=a.k;if(!d.B||d.k<=c&&c<d.k+10)d.k=c,d.B=!1;Hy(d)}a.a.cb&&c>a.qd()&&(d=a.qd(),0==d&&(d=c),rz(a,1.2*d));var d=Ez(a),e=0;a.b.buffered&&0<a.b.buffered.length&&(a.a.cb?a.ga||(e=(1>a.b.seekable.length?NaN:a.b.seekable.end(a.b.seekable.length-1))/a.qd()):e=a.b?hh(a.b):0);5<c&&(a.a.xa=c);a.ya&&I(a.ya);a.b.paused||a.b.ended||(a.ya=a.b.played&&0==a.b.played.length?H(v(a.ln,a),100):H(v(a.ln,a),1E3));a.a.we=c;if(!b&&a.ig()){var g=a.a.bk,h=a.a.we;
566 0<g&&h>g&&(a.a.Ce+=h-g);a.a.ta&&a.a.K&&a.a.Ce>=a.a.K&&(g=a.j,g.g&&g.a.K&&(h=Gz(g,"delayplay"),h.jj=!0,h.A=g.j(),h.send()),a.a.K=NaN)}if(a.a.im&&(g=a.a.gk,h=a.a.we,1==g&&0<h||2==g&&20<=h||3==g&&30<=h)){g=a.j;if(g.g){var h=g.b,k=g.a,g={ns:"yt",html5:"1",docid:k.L,plid:k.eb,ei:k.j,cpn:k.Da,fmt:k.a?k.a.Pa:0,el:h.Y,ps:h.Ca,subscribed:k.g,yttk:"1",st:g.j(),et:g.j(),ctp:k.gk,vid:h.aa},g=S("//s2.youtube.com/s",g);Qg(g)}a.a.gk++}a.u("progresssync",a,c,d,e,b);a.a.bk=c}}
567 f.ln=function(){this.b&&(this.b.kp(),P(this.i,8)&&$y(this.ja,this.getCurrentTime(),Date.now())&&kz(this,uj(this.i,1)),Dz(this))};
568 function kz(a,b){if(b.b!=a.i.b||b.a!=a.i.a){var c=new bz(b,a.i);a.i=b;a.o.qg&&P(b,8)&&0<Ro(c,256)&&201==b.a.errorCode&&setTimeout(v(function(){this.b&&(this.a.o&&!this.a.o.a&&this.b.load(),yz(this))},a),500);0>Ro(c,8)&&sz(a,!1);0<Ro(c,32)&&sz(a,!1);a.a&&a.a.Fb&&a.a.cb&&P(c.state,2)&&(rz(a,a.getCurrentTime()),Dz(a,!0));P(b,256)&&Kz(a,b);a.j&&Lz(a.j,c);Aj(a.A,c);a.u("statechange",c)}}
569 function Kz(a,b){var c=b.a;hf(a.ia);if(a.a&&a.a.kg&&Sa(az,c.errorCode)){var d=a.j,c=c.errorCode;d.X||(d.X=new ao("error-__ec__"));c={metric:fo(d.X,{ec:c})};qz(d,c)}}function Hz(a){P(a.i,2)||P(a.i,32)||(a.G=NaN)}function sz(a,b){a.a&&a.a.cb&&a.ga!=b&&(a.ga=b,a.u("liveviewshift",b))}function zz(a,b){a.o.za&&oj(a.b,b.a||pk(b.b,lk));gj(a.b,b);a.g&&!b.a&&(a.g=null);a.a.a&&a.a.a.g&&Mz(a);I(a.aa);a.aa=H(v(a.ru,a),15E3);a.o.sm?H(v(function(){kj(this.b)},a),0):kj(a.b)}
570 function Mz(a){var b=a.a.a&&a.a.a.g||null;b&&!a.I&&a.b&&((b=Fl(a.b,a.a.a.lb,b))?(a.I=new Ty(a.b,b,v(a.pu,a),v(a.ou,a)),a.I.A=a.a.G,L(a,a.I)):hx(a,203,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK"))}function fz(a){a.I&&(a.I.dispose(),a.I=null)}f.pu=function(a){var b=Rx(this.o);b.cpn=this.a.Da;this.a.U&&(b.vvt=this.a.U);Ob(a.H,b);Ih(a,a.k);this.u("newlicensesession",a)};f.ou=function(a,b,c){hx(this,c?5:206,q(b)?b:"ERROR_LICENSE",a)};f.ru=function(){Bh(this,102);if(this.j)this.j.onError(102);this.u("loadsofttimeout")};
571 function rz(a,b){a.b&&a.b.Va(b);a.a.ta!=b&&(a.a.ta=b,gz(a))};function Nz(){}ca(Nz);f=Nz.prototype;f.kc=null;f.Ti=null;f.load=function(a){if(this.kc)return zo(this.kc);this.kc=new so;this.Ti=a?a:"3";yo(Bo("3.1"==this.Ti?"//s0.2mdn.net/instream/html5/ima3.js":"//s0.2mdn.net/instream/html5/ima.js",{timeout:1E4}),this.Lx,this.Vp,this);return this.kc};f.getVersion=function(){return this.Ti};f.Lx=function(){"3.1"==this.Ti&&this.kc?this.kc.b():(google.ima.SdkLoader.setCallbacks(v(this.kc.b,this.kc),v(this.Wv,this)),google.ima.SdkLoader.load("3",void 0))};
572 f.Wv=function(a){this.Vp(Error("Google Ads SDK Failed to load: "+a))};f.Vp=function(a){this.kc.a(a)};function Oz(a){return a?-1!=a.toString().search(/(?:true|1)/i):!1}function Pz(a,b){if(a){var c="getErrorCode"in a?a.getErrorCode():null;c?b.error_code=c:(c=a.message,50<c.length&&(c=c.substring(0,47)+"..."),b.error_message=c)}}function Qz(a,b){if(a&&"3.1"==Nz.getInstance().getVersion()){var c=a.getAdId();if(c){var d=a.getWrapperAdIds()||[];b.ad_id=Za(d,c).join(",");if(c=a.getAdSystem())d=a.getWrapperAdSystems()||[],b.ad_sys=Za(d,c).join(",");a.isSkippable()&&(b.skip=1)}}}
573 function Rz(a,b){if(a[b])return Oz(a[b]);var c=b.toLowerCase(),d;for(d in a)if(d&&d.toLowerCase()==c)return Oz(a[d]);return!1}function Sz(a){var b="";a&2&&a&1?b="video":a&2?b="skippablevideo":a&1&&(b="standardvideo");a&4&&(b&&(b+="_"),b+="text_image_flash");return b};function Tz(){var a=n("yt.www.watch.ads.handleSetAfvCompanionVars");a&&a()}function Uz(a){var b=n("yt.www.watch.ads.handleMoveGutCompanion");b&&b(1==a?!0:!1)}function Vz(a){var b=n("yt.www.watch.ads.handleShowAfvCompanionAdDiv");b&&b(0<(a&3))}function Wz(){var a=n("yt.www.watch.ads.handleHideCompanion");a&&a()};function Xz(a,b){return Sa(a.o,b)};function Yz(a,b){this.a=a;this.g=b}Yz.prototype.j=null;Yz.prototype.b=NaN;function Zz(a,b,c){a.a.u("AD_LOGGING_EVENT",b,c)}function $z(a){aA(a);var b=bA(a);if(a.i){var c=cA(a.g),d=a.i.y-c.top,d=Math.round(a.i.x-c.left)+"x"+Math.round(d);b.ck_xy=d;b.ck_wh=c.width+"x"+c.height}Zz(a,15,b)}function dA(a){aA(a);var b=bA(a);if(isNaN(a.b))aA(a);else{var c=x()-a.b;b.ad_stl=c}Zz(a,4,b)}function eA(a){aA(a);var b=bA(a),c=a.a.jp();c?b.ad_fmt=c:aA(a);Zz(a,5,b)}
574 function bA(a){var b={},c=a.a.ka,d=a.a.Bf(),e=a.a.So();Qz(a.a.Sg(),b);d&&0<d&&(b.ad_len=d);c&&c.L?b.ad_v=c.L:e&&(c=Ij(e),b.ad_dom=c,a.g.da.k||Xz(a.g.J(),"921806")||Xz(a.g.J(),"921805"))&&(b.ad_v_url=e);b.at=a.a.getType();return b}function aA(a){a.j||(a.j="InstreamAdDisplay ("+a.a.getType()+")")};function fA(a,b,c,d){R.call(this);this.a=b;this.a.D("onVolumeChange",this.Hs,this);this.a.D("control_toggle_play_pause",this.gn,this);this.a.D("control_play",this.Qh,this);this.a.D("control_pause",this.ck,this);this.b=c;this.j=d;this.i=new Yz(this,this.a);this.o=a+"_2";this.g=new Uo(this)}y(fA,R);f=fA.prototype;f.Za=null;f.ka=null;f.Qf=!1;f.Xg=null;f.Wg=null;f.$g=null;
575 f.show=function(){this.i.b=x();var a="";if("3.1"==gA())a=this.j;else{var b=null;try{b=this.b.getSelectedCreative(),a=b.getMediaUrl("video/x-flv")||b.getMediaUrl("video/mp4")||b.getMediaUrl("video/webm")}catch(c){hA(this,c);return}}if(a){b=Gj(a);b=b.v||b.video_id;if(!b){var d=fe(a).match(/^\/watch\/([^\/]*)$/i);d&&(b=d[1])}b||(a=a.match(/yt_vid\/([a-zA-Z0-9_-]{11})/),null!=a&&1<a.length&&(b=a[1]));a=b?new mh({video_id:b,dash:"0"}):null}else a=null;this.ka=a;var e;this.ka?(this.ka.Qd=!0,e={video_id:this.ka.L},
576 this.ka.D("onStatusFail",this.Ln,this),this.ka.D("dataloaded",this.Kn,this),a=this.a.J(),a=new Lx(a.a),a.Y="adunit",a.Ub=!0,a=Sx(a,this.ka),Am(this.ka,a)):iA(this);jA(this.a,-1,e);this.on()};function kA(a){a.ka&&(a.ka.$("onStatusFail",a.Ln,a),a.ka.$("dataloaded",a.Kn,a))}f.Kn=function(){kA(this);var a=this.a.J(),b=this.ka,c=v(this.xv,this),a=a.Nh;b.B?rm(b,c,!!a,!1):tm(b,c,!!a)};
577 f.xv=function(){var a=Yy(new Wy(this.a.J()),this.ka);a?(a=a.i)?(a=new qe(hj(a)),a.a.set("autoplay","1"),a=a.toString(),"3.1"==gA()?this.b.setMediaUrl(a):this.b.getSelectedCreative().setMediaUrl(a),iA(this)):hA(this,Error("Failed to determine ad media resource.")):hA(this,Error("Failed to determine ad media format."))};
578 function iA(a){Uz(1);Vz(1);a.a.J();var b=a.a.b,c=Bn(b);b.W.J().ub||Zc(c)||xn(b).appendChild(c);a.Za=c;a.$g=Q(a.a.a);a.a.da.M?F(E("video-ad-status-bar")):(b=Q(a.a.a),a.Xg=E("video-ad-time-left",b),b=E("html5-ad-progress-list",b),c=Uc("div"),Pm(c,["html5-ad-progress","html5-progress-section"]),b.appendChild(c),a.Wg=c,a.g.listen(a.Za,"timeupdate",a.ju));Pm(a.$g,["ad-showing","ad-interrupting"]);a.g.listen(An(a.a.b),"mouseup",a.nu);a.g.listen(a.Za,"waiting",a.on);a.a.D("onResize",a.Lk,a);try{a.g.listen(a.b,
579 google.ima.AdErrorEvent.Type.AD_ERROR,a.lu);a.g.listen(a.b,google.ima.AdEvent.Type.CLICK,a.ku);a.g.listen(a.b,google.ima.AdEvent.Type.COMPLETE,a.mu);a.g.listen(a.b,google.ima.AdEvent.Type.PAUSED,a.Un);a.g.listen(a.b,google.ima.AdEvent.Type.STARTED,a.Vn);a.Lk();var d=a.a,e=d.b,g=lA(d);e.W.J().ub&&(zd(e.a,g),od(e.a,0,0));a.b.start()}catch(h){hA(a,h)}}
580 f.Vn=function(){this.Qf=!0;this.k||(this.k=!0,dA(this.i),mA(this.a,1));if(0==this.Bf()){var a=this.Za;a.Va(a.duration||0)}this.a.kb(!0);jA(this.a,1);this.u("adPlay",this)};f.Un=function(){this.Qf=!1;this.a.kb(!1);jA(this.a,2)};f.mu=function(){eA(this.i);this.Qf=!1;jA(this.a,0);mA(this.a,2);this.u("adEnd",this)};f.lu=function(a){hA(this,a.getError())};function hA(a,b){a.Qf=!1;jA(a.a,0);a.u("adError",b)}f.Ln=function(){kA(this);hA(this,Error("Request to get video data failed."))};
581 f.ku=function(){$z(this.i);"3.1"==gA()||this.a.da.Q||H(v(this.Qh,this),0);this.u("select")};f.nu=function(a){this.i.i=new A(a.pageX,a.pageY)};f.ju=function(){var a=Nn(this.b.getRemainingTime());this.Xg.innerHTML=a;0==this.Bf()&&(a=this.Za,a.Va(a.duration||0));a=this.Bf()?this.Za.getCurrentTime()/this.Bf():0;a=Math.round(1E3*a)/10;this.Wg.style.width=a+"%"};f.on=function(){!this.Qf&&this.k||jA(this.a,3)};
582 f.F=function(){this.a.$("control_toggle_play_pause",this.gn,this);this.a.$("control_play",this.Qh,this);this.a.$("control_pause",this.ck,this);this.a.$("onResize",this.Lk,this);this.g.removeAll();kA(this);this.b.destroy();this.Za&&(yn(this.a.b),this.Za=null);this.Xg&&(this.Xg.innerHTML="",this.Xg=null);this.Wg&&(F(this.Wg),this.Wg=null);this.$g&&(Qm(this.$g,["ad-showing","ad-interrupting"]),this.$g=null);fA.C.F.call(this)};f.getType=function(){return this.o};f.Sg=function(){return this.b.getCurrentAd()};
583 f.Bf=function(){return this.Za?this.Za.Vd:null};f.jp=function(){return this.Za?this.Za.getType():null};f.So=function(){return this.Za&&this.Za.currentSrc?this.Za.currentSrc:null};f.Hs=function(a){a=a.muted?0:a.volume;isNaN(a)||(a=vb(a/100,0,1),this.b.setVolume(a))};f.gn=function(){this.Qf?this.ck():this.Qh()};f.Qh=function(){this.Za&&(this.b.resume(),this.Vn())};f.ck=function(){this.Za&&(this.b.pause(),this.Un())};f.Lk=function(){var a=lA(this.a);this.b.resize(a.width,a.height,google.ima.ViewMode.NORMAL)};function nA(a,b,c){R.call(this);this.a=b;this.a.D("control_toggle_play_pause",this.$m,this);this.a.D("control_play",this.Ph,this);this.a.D("control_pause",this.$j,this);this.b=c;this.j=new Yz(this,this.a);this.o=a+"_2";this.i=new Uo(this);this.g=oA(b);this.g.D("statechange",this.Ym,this);this.g.D("internalvideodatachange",this.Zm,this);this.ka=null}y(nA,R);f=nA.prototype;f.rl=!1;f.Gg=null;f.Fg=null;f.Hg=null;
584 f.show=function(){var a=this.a;pA(a.app,oA(a));this.j.b=x();Uz(1);Vz(1);this.Hg=Q(this.a.a);if(this.a.da.M)F(E("video-ad-status-bar"));else{a=Q(this.a.a);this.Gg=E("video-ad-time-left",a);var a=E("html5-ad-progress-list",a),b=Uc("div");Pm(b,["html5-ad-progress","html5-progress-section"]);a.appendChild(b);this.Fg=b;this.g.D("progresssync",this.pn,this)}Pm(this.Hg,["ad-showing","ad-interrupting"]);this.i.listen(An(this.a.b),"mouseup",this.Rs);this.a.D("onResize",this.ik,this);try{this.i.listen(this.b,
585 google.ima.AdErrorEvent.Type.AD_ERROR,this.Ps),this.i.listen(this.b,google.ima.AdEvent.Type.CLICK,this.Os),this.i.listen(this.b,google.ima.AdEvent.Type.COMPLETE,this.Qs),this.i.listen(this.b,google.ima.AdEvent.Type.PAUSED,this.un),this.i.listen(this.b,google.ima.AdEvent.Type.STARTED,this.vn),this.ik(),this.b.start()}catch(c){qA(this,c)}};f.Zm=function(a,b,c){"newdata"==a&&this.ka!=c&&jA(this.a,-1,{video_id:c.L});this.ka=c};f.Ym=function(a){a=a.state;P(a,128)&&qA(this,Error(a.a.message||"Video player error."))};
586 f.vn=function(){this.rl=!0;this.k||(this.k=!0,dA(this.j),mA(this.a,1));jA(this.a,1);this.u("adPlay",this)};f.un=function(){this.rl=!1;jA(this.a,2)};f.Qs=function(){eA(this.j);jA(this.a,0);mA(this.a,2);this.u("adEnd",this)};f.Ps=function(a){qA(this,a.getError())};function qA(a,b){a.g.ng();jA(a.a,0);a.u("adError",b)}f.Os=function(){$z(this.j);"3.1"==gA()||this.a.da.Q||H(v(this.Ph,this),0);this.u("select")};f.Rs=function(a){this.j.i=new A(a.pageX,a.pageY)};
587 f.pn=function(a,b,c){this.Gg.innerHTML=Nn(a.qd()-b);a=Math.round(1E3*c)/10;this.Fg.style.width=a+"%"};
588 f.F=function(){this.a.$("control_toggle_play_pause",this.$m,this);this.a.$("control_play",this.Ph,this);this.a.$("control_pause",this.$j,this);this.a.$("onResize",this.ik,this);this.i.removeAll();this.g.D("statechange",this.Ym,this);this.g.$("internalvideodatachange",this.Zm,this);this.g.$("progresssync",this.pn,this);var a=this.a;a.g&&rA(a.app,a.g);this.b.destroy();this.Gg&&(this.Gg.innerHTML="",this.Gg=null);this.Fg&&(F(this.Fg),this.Fg=null);this.Hg&&(Qm(this.Hg,["ad-showing","ad-interrupting"]),
589 this.Hg=null);nA.C.F.call(this)};f.getType=function(){return this.o};f.Sg=function(){return this.b.getCurrentAd()};f.Bf=function(){return this.g.qd()};f.jp=function(){return this.ka&&this.ka.a?this.ka.a.lb:null};f.So=function(){if(!this.ka)return null;var a=wm(this.ka);return a?hj(a):null};f.$m=function(){this.rl?this.$j():this.Ph()};f.Ph=function(){this.b.resume();this.vn()};f.$j=function(){this.b.pause();this.un()};f.ik=function(){var a=lA(this.a);this.b.resize(a.width,a.height,google.ima.ViewMode.NORMAL)};function sA(a,b){this.b=a;this.a=b;this.b.getType()}function tA(a,b,c){a.b.u("AD_LOGGING_EVENT",b,c)}function uA(a){var b={};Qz(a.b.Sg(),b);a.j&&a.g&&(b.ot=a.g-a.j);var c;c=a.a.a.app.J().ob||a.a.da.k?2:a.a.J().Rd?1:0;b.ad_ps=c;b.at=a.b.getType();return b};function vA(a,b,c){R.call(this);this.b=b;this.a=c;this.i=new sA(this,b);this.k=a+"_1";this.g=new Uo(this)}y(vA,R);f=vA.prototype;f.be=null;f.sn=!1;
590 f.show=function(){V(Q(this.b.a),"ad-showing");this.be=xn(this.b.b);V(this.be,"ad-overlay");this.g.listen(this.be,"mouseup",this.Ns);try{Fd(this.be);this.g.listen(this.a,google.ima.AdEvent.Type.USER_CLOSE,this.Js);this.g.listen(this.a,google.ima.AdEvent.Type.CLICK,this.Ms);this.g.listen(this.a,google.ima.AdErrorEvent.Type.AD_ERROR,this.Ls);wA(this,google.ima.ViewMode.NORMAL);this.Eg();this.a.start();var a=this.i;a.j=x();var b=uA(a);tA(a,3,b);this.sn=!0;this.b.D("onResize",this.Eg,this);this.b.D("onStateChange",
591 this.nn,this);this.u("adEnd",this)}catch(c){this.u("adError",c)}};f.Sg=function(){return this.a.getCurrentAd()};f.getType=function(){return this.k};f.F=function(){this.g.removeAll();this.b.$("onResize",this.Eg,this);this.b.$("onStateChange",this.nn,this);W(Q(this.b.a),"ad-showing");this.a&&(this.a.destroy(),this.a=null);this.be&&W(this.be,"ad-overlay");this.be=null;vA.C.F.call(this)};f.Js=function(){var a=this.i;a.g=x();var b=uA(a);tA(a,6,b)};
592 f.Ms=function(){fn(this.b);var a=this.i;a.g=x();var b=uA(a);if(a.i){var c=cA(a.a),d=a.i.y-c.top,d=Math.round(a.i.x-c.left)+"x"+Math.round(d);b.ck_xy=d;b.ck_wh=c.width+"x"+c.height}tA(a,100,b)};f.Ns=function(a){this.i.i=a.target==a.currentTarget?null:new A(a.pageX,a.pageY)};f.Ls=function(a){a=a.getError();this.u("adError",a)};f.nn=function(a){P(a.state,16)&&wA(this,google.ima.ViewMode.NORMAL)};function wA(a,b){a.j!=b&&(a.j=b,a.sn&&a.Eg())}
593 f.Eg=function(){var a=Fd(this.be);this.a.resize(a.width,a.height,this.j)};function xA(a,b){R.call(this);this.ca=a;this.a=b}y(xA,R);xA.prototype.show=function(){var a=n("afcAdCall");a&&a();a={};a.ad_id=this.a;a.at=this.getType();this.u("AD_LOGGING_EVENT",3,a);this.u("adEnd",this)};function yA(a,b){vA.call(this,1,a,b)}y(yA,vA);yA.prototype.Eg=function(){};yA.prototype.getType=function(){return"1_3"};function zA(a,b,c,d){R.call(this);this.Ba=b;this.b=a;this.start=c;this.g=d;this.a=null}y(zA,R);f=zA.prototype;f.rk=!0;f.td=!1;f.isVisible=!0;f.Ve="unloaded";f.Yk=!1;function AA(a){return 0==a.start?BA(a)&&CA(a)?-2147483648:0:-1==a.start||-2==a.start?2147483647:1E3*a.start}function BA(a){return"loaded"==a.Ve||"error"==a.Ve}function CA(a){if(!BA(a))throw Error("Preroll status is undefined before ad load.");return 0==a.start&&a.td}
594 function DA(a){a.Ve="loading";var b=a.g.shift();b?(0==a.start&&EA(a.b,"nl"),b=b.create(a.start,a.Ba,a.b),L(a,b),yo(b.load(),a.Ov,a.Nv,a)):(FA(a.b,2,GA(a,{})),a.Ve="error",HA(a))}f.getId=function(){return this.Ba};function IA(a){a.a.$("adEnd",a.Ko,a);a.a.$("adError",a.No,a);a.a.$("AD_LOGGING_EVENT",a.Lo,a);a.a.$("select",a.Mo,a)}f.Nv=function(a){a instanceof to||DA(this)};
595 f.Ov=function(a){this.start=a.startTime;this.a=a.Yt;L(this,this.a);0==this.Ba&&(a=this.a.getType(),this.b.i.at=a);this.a instanceof fA||this.a instanceof nA?this.td=!0:this.a instanceof xA?this.isVisible=!1:this.a instanceof yA&&(this.isVisible=!1);this.Ve="loaded";HA(this)};function HA(a){a.u("adBreakComplete",a)}
596 f.show=function(){this.Yk?this.a instanceof vA&&wA(this.a,google.ima.ViewMode.NORMAL):(this.Yk=!0,this.a instanceof fA&&EA(this.b,"bs"),this.a.D("adEnd",this.Ko,this),this.a.D("adError",this.No,this),this.a.D("AD_LOGGING_EVENT",this.Lo,this),this.a.D("select",this.Mo,this),this.a.show())};f.Ko=function(){if(this.td){IA(this);var a=this.b;a.da.md&&!a.Bj&&(Qg(a.J().jb+"mac_204?action_fcts=1"),a.Bj=!0)}HA(this)};f.No=function(a){if(a){var b={};Pz(a,b);GA(this,b);JA(this.b,32,b)}IA(this);HA(this)};
597 f.Lo=function(a,b){GA(this,b);FA(this.b,a,b)};f.Mo=function(){this.rk=!1};function GA(a,b){b.sst=a.start;b.sidx=0};function KA(a){this.uq=a}function LA(a){try{var b=aw(a).getElementsByTagName("AdBreak"),c=Ka(b,function(a){a=a.getAttribute("time");return Ca(a)});return new KA(c)}catch(d){return new KA([0])}};function MA(a,b,c,d){this.i=a;this.j=b;this.b=c;this.k=d}MA.prototype.g="";MA.prototype.a="";function NA(a){var b={};b.l_ns=a.j;b.l_state=a.k;b.sst=a.i;b.sidx=0;a.g&&(b.at=a.g);a.a&&(b.ad_id=a.a);return b};function OA(a,b,c,d,e){this.j=a;this.g=b;this.B=c;this.ca=d;this.b=e;this.a=new MA(b,this.j,d,e);this.H=new Uo(this);this.i=new Uo(this)}y(OA,K);f=OA.prototype;f.vo=null;f.Cd=null;
598 f.load=function(){if(this.Cd)return this.Cd;this.Cd=new so;var a=this.ca.da.k?this.ca.J().Tc||PA:Bd(Q(this.ca.a)),b;this.ca.da.a?b=!1:(b=0<(this.b&3)?190:200,b=200>a.width||a.height<b);if(b){b=this.a;var c=NA(b);c.ck_wh=a.width+"x"+a.height;JA(b.b,14,c);this.Ye(Error("The player size is too small."))}else yo(this.ca.tg,this.Tu,this.Jd,this);return this.Cd};
599 f.Wk=function(){var a=new google.ima.AdsRenderingSettings;a.baseYouTubeUrl=this.ca.J().jb;a.contentId=this.ca.getVideoData().L;a.useStyledNonLinearAds=!0;a.disableVideoAdUi=!this.ca.da.M;a.useVideoAdUi=this.ca.da.M;a.youTubeAdNamespace=this.j;return a};function QA(a,b){a.vo=b;var c=b.getType();a.a.g=c}function RA(a){a=a.g;return 0==a||-1==a?a:1E3*a}
600 f.Tu=function(a){var b=this.a;FA(b.b,9,NA(b));b=new google.ima.AdsRequest;b.adTagUrl=this.k();var c=this.ca.J().Tc||PA;b.linearAdSlotWidth=c.width;b.linearAdSlotHeight=c.height;b.nonLinearAdSlotWidth=c.width;b.nonLinearAdSlotHeight=100;"3.1"==gA()&&(b.isYouTube=!0);var c=this.b,d=n("yt.www.watch.ads.setGutSlotSizes");d&&d(0<(c&3),0<(c&12));this.H.listen(a,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Qu);this.H.listen(a,google.ima.AdErrorEvent.Type.AD_ERROR,this.Pu);this.zi(a,b)};
601 f.Qu=function(a){if(a.getUserRequestContext()===this){try{var b;if("3.1"==gA()){var c=this.Wk();b=a.getAdsManager({},c)}else b=a.getAdsManager({})}catch(d){this.Jd(d);return}this.i.listen(b,google.ima.AdEvent.Type.LOADED,v(this.Ow,this,b));this.i.listen(b,google.ima.AdErrorEvent.Type.AD_ERROR,v(this.Nw,this,b));z([google.ima.AdEvent.Type.ALL_ADS_COMPLETED,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED],function(a){this.i.listen(b,a,ba)},this);a=lA(this.ca);
602 try{b.init(a.width,a.height,google.ima.ViewMode.NORMAL)}catch(e){b.destroy(),this.Jd(e)}}};f.Ow=function(a,b){this.i.removeAll();var c=b.getAd(),d=c.isLinear(),e=this.a,g=NA(e);g.ad_man=d?"instream":"overlay";FA(e.b,12,g);e="";"3.1"==gA()&&(e=b.getAdData().mediaUrl);switch(d?this.ah(a,c,e):this.Ue(a,c)){case 0:SA(this);break;case 1:a.destroy();this.Ye(Error("Unable to create a display state."));break;case 2:c=this.a;JA(c.b,21,NA(c));a.destroy();this.Ye(Error("Fallback to next ad."));break;default:a.destroy()}};
603 f.Nw=function(a,b){this.i.removeAll();a.destroy();this.Jd(b.getError())};f.Pu=function(a){var b=a.getError();b.getType()==google.ima.AdError.Type.AD_LOAD&&a.getUserRequestContext()===this&&this.Jd(b)};f.ah=function(a,b,c){b=b.getAdId();this.a.a=b;a=this.ca.da.P?new nA(this.j,this.ca,a):new fA(this.j,this.ca,a,c);QA(this,a);return 0};f.Ue=function(a,b){var c=b.getAdId();this.a.a=c;QA(this,new vA(this.j,this.ca,a));return 0};
604 f.Jd=function(a){if(a instanceof to)this.Cd.cancel();else{var b=this.a,c=NA(b);a&&Pz(a,c);JA(b.b,32,c);this.Ye(a)}};function SA(a){a.Cd.b({Yt:a.vo,startTime:a.g})}f.Ye=function(a){this.Cd.a(a)};f.F=function(){this.H.removeAll();this.i.removeAll();this.Cd&&this.Cd.cancel();OA.C.F.call(this)};f.zi=function(a,b){try{a.requestAds(b,this)}catch(c){this.Jd(c)}};function TA(a,b){this.a=a;this.b=b};function UA(a){xA.call(this,a,"")}y(UA,xA);UA.prototype.getType=function(){return"2_3"};UA.prototype.Sg=function(){return null};function VA(a,b,c,d){OA.call(this,2,a,b,c,d);this.o=new TA(this.ca.da,this.ca.J());Tz()}y(VA,OA);VA.prototype.Wk=function(){var a=VA.C.Wk.call(this);a.a=0==this.B;a.b=!0;return a};
605 VA.prototype.k=function(){var a=this.o,b=this.b,c=RA(this),d={};d.eid=a.a.ja;d.videoad_start_delay=c;d.scs=a.a.ue;d.client=a.a.jg;d.description_url=a.a.pa;d.loeid=a.a.te;d.cust_gender=a.a.Kc;d.host=a.a.host;d.hl=a.b.i;d.max_ad_duration=a.a.ve;d.url="embedded"==a.b.Y&&a.b.b?a.b.b:a.a.pa;a.a.Mc&&(d.adtest="on");isNaN(a.a.fa)||(d.cust_age=a.a.fa);isNaN(a.a.za)||(d.hostTierId=a.a.za);a.a.ib&&(d.yt_pt=a.a.ib);a.a.mc&&(d.video_cpm=a.a.mc);a.a.G&&(d.as_dbp=a.a.G);d.ytdevice=a.a.dg;d.ad_type=Sz(b);0<(b&3)?
606 a.a.Ka&&(d.channel=a.a.Ka.join("+")):b&4&&a.a.bb&&(d.channel=a.a.bb.join("+"));a.a.Sa&&(d.lsv=1);var a=d,b={},e;for(e in a)ea.call(void 0,a[e])&&(b[e]=a[e]);return"//googleads.g.doubleclick.net/pagead/ads?"+Ej(b,"&")};VA.prototype.Ue=function(a,b){if(this.ca.da.a)return 1;0==this.g&&(this.g=10,this.a.i=10,FA(this.ca,1));Vz(this.b);return VA.C.Ue.call(this,a,b)};
607 VA.prototype.Ye=function(a){var b=this.ca.da;b.a?VA.C.Ye.call(this,a):b.Ma||this.b&4?(QA(this,new UA(this.ca)),SA(this)):VA.C.Ye.call(this,a)};function WA(a,b){if(a){this.Tp=a;this.Ip=b;var c,d=this.Tp,e=d.indexOf(";sz=");c=Dj(d.substring(e),";");d=d.substring(0,e).split("pfadx");if(c=2!=d.length?null:{Hx:d[0],Ix:d[1],Jx:c})this.Hp=c.Hx,this.Jp=c.Ix,this.Kp=c.Jx}}f=WA.prototype;f.Tp="";f.Hp="";f.Ip=!1;f.Rl="";f.Jp="";f.Kp=null;
608 function XA(a,b){var c=[];b&1&&c.push("480x360");b&2&&c.push("480x361");b&12&&c.push("480x70");var d=[],e,g;b&12&&(d.push("300x250"),e="watch-channel-brand-div",g=1);0<(b&3)&&(d.push("300x60"),e="watch-longform-ad",g=1);c={Mp:e,uh:c,Pp:g,xx:!0,Ql:d};d=Mb(a.Kp);c.wx&&(d.pos=c.wx);c.Pp&&(d.tile=c.Pp.toString());c.Mp&&(d.kmyd=c.Mp);c.xx&&(t(d["!c"])?d["!c"].push("html5"):d["!c"]=d["!c"]?[d["!c"],"html5"]:"html5");c.Ql&&0<c.Ql.length&&a.Ip&&(d.ciu_szs=c.Ql.join(","));d.dcmt="text/xml";bj()&&(d.kmob="ps3");
609 a.Rl||(a.Rl=Math.floor(999999999*Math.random()).toString());d.ord=a.Rl;c.uh&&c.uh.length&&"sz"in d&&delete d.sz;d=Ej(d,";");c.uh&&c.uh.length&&(d="sz="+c.uh.join(",")+";"+d);return[a.Hp,"pfadx",a.Jp,";",d,"?"].join("")};function YA(a,b,c,d){OA.call(this,1,a,b,c,d)}y(YA,OA);YA.prototype.k=function(){return XA(new WA(this.ca.da.Oc,this.ca.da.ya),this.b)};YA.prototype.Ue=function(a,b){var c=b.getAdId();this.a.a=c;c=b.getTraffickingParameters();return Rz(c,"rm")?(1!=this.b&&Wz(),ZA(a),2):Rz(c,"blockAllAds")?(ZA(a),QA(this,new yA(this.ca,a)),0):Rz(c,"hideMaster")?(QA(this,new yA(this.ca,a)),0):this.ca.da.a?1:"3.1"==gA()?(QA(this,new vA(this.j,this.ca,a)),0):1};
610 function ZA(a){a.sendImpressionUrls&&a.sendImpressionUrls()};function $A(a,b,c,d,e){OA.call(this,1,a,b,c,d|e);this.A=d;this.o=e;Tz()}y($A,YA);var aB={GDFP:1,DART:1,DART_DFP:1,DART_DFA:1,ADSENSE:2,"ADSENSE/ADX":2};$A.prototype.k=function(){return XA(new WA(this.ca.da.I,this.ca.da.ya),this.A)};$A.prototype.zi=function(a,b){if(this.o){b.youTubeAdType=Sz(this.o);var c=this.ca.da.ja;c&&(b.youTubeExperimentIds=c);b.youTubeVideoAdStartDelay=RA(this)}$A.C.zi.call(this,a,b)};$A.prototype.ah=function(a,b,c){var d=bB(a);return 1!=d&&2!=d?1:$A.C.ah.call(this,a,b,c)};
611 $A.prototype.Ue=function(a,b){switch(bB(a)){case 1:return $A.C.Ue.call(this,a,b);case 2:var c;1!=this.A&&Wz();this.ca.da.a?c=1:(0==this.g&&(this.g=10,this.a.i=10,FA(this.ca,1)),Vz(this.b),c=b.getAdId(),this.a.a=c,QA(this,new vA(2,this.ca,a)),c=0);return c;default:return 1}};function bB(a){var b=a.getCurrentAd().getWrapperAdSystems();a=Ta(b)?a.getCurrentAd().getAdSystem():b[0];return(a=aB[a.toUpperCase()])?a:0};function cB(a,b,c){var d=c.da;this.o=d.Lc;var e=0,d=d.Nc.toUpperCase();"INVIDEO"==d?e=4:"INSTREAM"==d?e=1:"MPU"==d&&(e=8);OA.call(this,2,a,b,c,e)}y(cB,OA);function dB(a){var b=new so;Qj(a,{format:"RAW",method:"GET",timeout:5E3,bl:function(){b.a(Error(a+" timed out"))},onError:function(c){b.a(Error("Problem loading "+a+" with status code "+c.status))},Qa:function(a){b.b(a)}});return b}cB.prototype.k=function(){return""};
612 cB.prototype.zi=function(a,b){var c=this.b;c&1||c&4?this.o?("goo.gl"==Ij(this.o)?(c=dB("https://www.googleapis.com/urlshortener/v1/url?key=AIzaSyBbSB-E7SYd1iggX6r2b5C7ljvO6fVqaj0&shortUrl="+this.o),yo(c,function(a){a=mb(a.responseText);if(!a||!a.longUrl)throw Error("Invalid expanded forced ad URL");a=Kj(a.longUrl,{video_format:"43"});return dB(a)},null,this)):c=dB(this.o),yo(c,function(c){b.adsResponse=c.responseText;a.requestAds(b,this)},null,this),yo(c,null,this.Jd,this)):this.Jd(Error("Invalid empty URL")):
613 this.Jd(Error("Invalid request type: "+c))};function eB(a,b,c){this.a=a;this.g=b;this.b=Ri||Si?"html5_ios":Ti?"html5_android":bj()?"html5_ps3":"leanback"==c?"html5_tv_leanback":"html5"};function fB(a,b,c,d){OA.call(this,4,a,b,c,d);this.o=new eB(this.ca.da,this.ca.getVideoData().ta,this.ca.J().Y)}y(fB,OA);
614 fB.prototype.k=function(){var a;a=this.o;if(a.a.aa&&a.a.oc){var b="10613:10613_youtube_"+a.b,c="youtube_watch_"+a.b,d="10613:10613_youtube_"+a.b.split("_")[0],e={nw:"10613"};e.asnw=a.a.aa;e.ssnw=a.a.aa;e.caid=a.a.oc;e.prof=b;e.vdur=a.g;e.csid=c;e.resp="vast2";e.crtp="vast2s";e.flag="+emcr";b={};isNaN(a.a.ma)||(b._fw_d_001=a.a.ma);a.a.nc&&(b._fw_d_002=a.a.nc);a.a.Ta&&(b["_fwu:10613:lang"]=a.a.Ta);a.a.G&&(b._fw_dbp=a.a.G);b._fw_yt_type=a.a.B?"short":"long";var c={ptgt:"a",slid:"preroll"},g="";a.a.g&&
615 !a.a.b?g=";linear-skippable":!a.a.g&&a.a.b&&(g=";video");c.slau="preroll"+g;c.w="480";c.h="360";c.tpos="0";c.tpcl="preroll";c.envp=d;c.cd="1440,900";a="//2975c.v.fwmrm.net/ad/g/1?"+Ej(e,"&")+";"+Ej(b,"&")+";"+Ej(c,"&")}else a="";return a};fB.prototype.ah=function(a,b){return 0!=this.g?1:fB.C.ah.call(this,a,b,null)};fB.prototype.Ue=function(){return 1};function gB(a,b,c){this.g=a;this.a=b;this.b=c||0}gB.prototype.create=function(a,b,c){switch(this.g){case 1:return new VA(a,b,c,this.a);case 2:return new YA(a,b,c,this.a);case 3:return new $A(a,b,c,this.a,this.b);case 5:return new fB(a,b,c,this.a);case 4:return new cB(a,b,c);default:return null}};function hB(a){this.a=a};function iB(a,b){this.O=a;this.Q=this.O.qc;this.k="leanback"==this.O.Y;this.a=this.Q||this.k;var c="3.1"==Nz.getInstance().getVersion();this.M=!this.a&&c;this.P=a.ub&&c&&!this.a;this.apply(b)}var jB={hC:"m",cB:"f"};
616 iB.prototype.apply=function(a){var b=Xz(this.O,"908301"),c="3.1"==Nz.getInstance().getVersion(),d=Oz(a.instream),e=(!this.a||b)&&c&&Oz(a.trueview),g=Oz(a.aftv)&&(!this.a||b);this.ia=a.ad_slots;this.ga=a.ad_breaks;this.Qc=a.ad_flags||0;this.fa=parseInt(a.cust_age,10);this.ja=a.cafe_experiment_id;var h=parseInt(a.cust_gender,10);isNaN(h)||(this.Kc=h);this.Oc=a.ad_tag;this.Mc=!!a.adtest;this.ma=parseInt(a.ad_age,10);this.Jc=a.cid;this.pa=a.ad_eurl;this.I=a.dynamic_allocation_ad_tag;this.va=a.excluded_ads;
617 this.Nc=a.force_ad_type;this.Lc=a.force_ad_url;this.nc=Jb(jB,function(b){return b==a.ad_gender});this.G=a.dbp;this.ya=!!a.mpu;this.host=a.ad_host;this.za=parseInt(a.ad_host_tier,10);this.od=1==a.ad_logging_flag;this.H=Oz(a.afv)&&!this.a;this.i=g&&e;this.j=g&&d&&!Oz(a.no_afv_instream);this.A=Oz(a.dclk);this.Sa=1==a.livestream;this.Na=Oz(a.forced_ad)&&b&&c;this.K=1==parseInt(a.tpas_ad_type_id,10);this.bg=!!a.fqsf;this.b=d;this.U=Oz(a.invideo)&&!this.a;this.X=Oz(a.mpu)&&!this.a;this.md=Oz(a.shortform);
618 this.B=Oz(a.sffb);this.ue="1"==a.as_launched_in_country;this.tb=!this.a&&!this.K;this.g=e;b=a.ad_channel_code_instream;this.Ka=u(b)?b.split(","):[];this.Ta=a.ad_language_iso639_2;this.te=a.loeid;b=parseInt(a.afv_instream_max,10);isNaN(b)&&(b=15E3);this.ve=b;this.o=parseInt(a.midroll_freqcap,10);isNaN(this.o)&&(this.o=-1);b=a.ad_channel_code_overlay;this.bb=u(b)?b.split(","):[];this.ib=a.yt_pt;this.jg=a.ad_video_pub_id;this.mc=parseInt(a.afv_video_min_cpm,10);this.Ma=g&&this.B&&!this.H;this.nd=this.H||
619 this.Ma;this.dg=parseInt(a.ad_device,10);this.oc=a.tpas_video_id;this.aa=a.tpas_partner_id;this.Pc=kB(this)};function kB(a){if(/^[\s\xa0]*$/.test(null==a.I?"":String(a.I))||!Xz(a.O,"932604")||!a.P)return!1;var b=(a.b||a.g)&&a.A;a.B&&a.A&&(b=b||a.U||a.X);if(!b)return!1;b=a.i||a.j;if(!(b||a.B&&a.H))return!1;a=a.I.length+330+102;var c=window.document.referrer;a+=encodeURIComponent(String("ref"+(c?"="+c:""))).length;b||(a+=41);return 2048>=a}iB.prototype.tb=!0;function lB(a,b,c){this.a=a;this.k=b;this.g=c;this.j=this.b=-1;this.g&&0<this.a.da.o&&this.a.D("endseeking",this.i,this)}y(lB,K);function mB(a,b){nB(a);0<b&&(a.j=H(v(a.i,a),1E3*b))}function nB(a){-1!=a.j&&(I(a.j),a.j=-1)}
620 lB.prototype.i=function(){var a=this.a.da.o;if(this.g&&!(0>=a)){var b=this.a.a.getCurrentTime(),c=[],d=null,e=Number.MAX_VALUE;Eb(this.k.i,function(a){if(a.td&&a.isVisible&&!(0>=oB(this,a))){var g;g=a.getId();g=this.k.j[g];if(oB(this,a)>b){var m=!pB(this,a);m!=g.Uc&&(g.Uc=m,c.push(g));m||(g=oB(this,a)-b,g<e&&(e=g,d=a))}else g.Uc||(g.Uc=!0,c.push(g))}},this);0<c.length&&qB(this.a,c);if(d){var g=0;0<this.b&&(g=x()/1E3-this.b);mB(this,a-g-e+2)}else nB(this)}};
621 function pB(a,b){if(!a.g||!b.td||!(0<b.start)&&-1!=b.start)return!1;var c=a.a.da.o;if(0>=c||0>=a.b)return!1;var d=x()/1E3,e=oB(a,b)-a.a.a.getCurrentTime();0<e&&(d+=e);return d-a.b<=c}function oB(a,b){return-1==b.start?a.a.a.wg():b.start}lB.prototype.F=function(){nB(this)};function rB(a,b){this.b=b;this.g=[];this.i={};this.j={};this.a=a;var c=!a.da.Sa&&La(this.b,function(a){return 0<a.start||-1==a.start});this.k=new lB(this.a,this,c)}y(rB,K);f=rB.prototype;f.Hd=null;function sB(a){a.g.length||(fb(a.b,function(a,c){return a.getId()-c.getId()}),a.g=Ja(a.b,function(a){return"unloaded"==a.Ve}),0==a.g.length?Vm(a.a):(null===Oa(a.g,function(a){return 0==a.start})&&Vm(a.a),tB(a)))}function tB(a){if(a.g.length){var b=a.g.shift();b.D("adBreakComplete",a.ul,a);DA(b)}}
622 f.ul=function(a){a.$("adBreakComplete",this.ul,this);H(v(this.tx,this,a),0)};f.tx=function(a){var b=Ia(this.b,a),c=this.b[b+1],b=this.b[b-1],d=2147483646;-2==a.start||-1==a.start?d=2147483647:c&&2147483647!=c.start&&(d=AA(c)-1);0==a.Ba&&(EA(this.a,"bl"),CA(a)||EA(this.a,"fb"));if(c="loaded"!=a.Ve){if(b&&BA(b)){var e=AA(b);e>d&&(d=e);uB(this,b);vB(this,b,d)}}else this.i[a.getId()]=a,vB(this,a,d);Vm(this.a);c&&this.ug(a);a=this.i;var b=0,g;for(g in a)b++;b==this.b.length&&this.k.i();tB(this)};
623 function vB(a,b,c){var d=AA(b);if(!isNaN(d)){var e={};e.priority=-2!=b.start?2:3;e.id=String(b.getId());e.visible=b.isVisible;c=new Zh(d,c,e);a.j[b.getId()]=c;a.a.zf(c)}}function uB(a,b){a.j[b.getId()]&&(a.a.qv(a.j[b.getId()]),delete a.j[b.getId()])}f.ug=function(a){a.$("adBreakComplete",this.ul,this);this.Hd&&a==this.Hd&&(this.Hd=null);uB(this,a);Wa(this.b,a);delete this.i[a.getId()];Sg(a)};
624 f.Lu=function(a){if(a.td){if(-1!=a.start&&a.rk){var b=this.a;wB(b);en(b)}else CA(a)&&!a.rk?(b=this.a,wB(b),en(b)):(wB(this.a),this.a.kb(!1));this.ug(a);a=this.k;a.g&&0<a.a.da.o&&(a.b=x()/1E3,a.i())}else a.isVisible||this.ug(a)};f.F=function(){Sg(this.k);z(this.b,this.ug,this);rB.C.F.call(this)};function xB(){return[]};function yB(a,b){this.g=a;b&&(this.b=b)}function zB(a){var b={};b.allowed=a.g;a.b&&(b.ex_ads=a.b);a.a&&(b.at=a.a);return b};function AB(a,b){this.g=a;this.W=b;this.o=x();this.a=a.da;this.b={};var c=[];this.a.K&&this.a.b&&c.push("4_2");this.a.A&&(this.a.b&&c.push("1_2"),this.a.g&&c.push("1_2_1"),this.a.U&&c.push("1_1"),this.a.X&&c.push("1_3"));this.a.i&&c.push("2_2_1");this.a.j&&c.push("2_2");this.a.H&&c.push("2_1");this.a.nd&&c.push("2_3");this.i=c.join(",");this.k=new yB(this.i,this.a.va);this.b.allowed=this.i;(c=this.a.va)&&(this.b.ex_ads=c)}var BB=[9,10,11,12],CB=[21,30],DB=[1009];AB.prototype.j=0;
625 function EB(a,b){if(!a.a.od)return!1;var c=a.g.J();if(Xz(c,"906335"))return!0;c=b.ad_event;return Sa(BB,c)||7==c&&(c=b.ad_error,Sa(CB,c)||32==c&&Sa(DB,b.error_code))?!1:!0};function FB(a){Cx.call(this,a);this.j={};this.i={at:"0"};this.b=new wn(this.a);this.g=null;a=this.getVideoData().b.html5_sdk_version;this.k=Nz.getInstance().load(a)}y(FB,Cx);var PA=new B(0,0);f=FB.prototype;f.qa="ad";f.hd="ad";f.ze=null;f.Wd=null;f.da=null;f.Bj=!1;f.Uj=!1;f.tg=null;f.vi=null;f.Xa=function(){return!!this.app.I.getVideoData().ca};
626 f.create=function(){FB.C.create.call(this);this.ba=!0;EA(this,"i");this.da=new iB(this.J(),this.a.getVideoData().b||{});this.ze=new AB(this,this.a);Uz();this.Bj=!1;var a=zo(this.k);this.tg=yo(a,this.wq,null,this);t:{var a=new hB(this),b=[];try{var c=a.a.da,d;if(c.tb){var e;if(c.ga)e=LA(c.ga);else{var g;if(c.ia){var h=Ka(c.ia.split(","),Ca);g=new KA(h)}else g=new KA([0]);e=g}d=e}else d=new KA([0]);for(var k=d.uq,c=0;c<k.length;c++){var m=a.a;d=c;var p=k[c],s;if(a.a.da.B){e=[];var r=a.a.da;if(r.Na)e.push(new gB(4,
627 0));else{r.K&&(r.b||r.g)&&e.push(new gB(5,1));g=0;r.A&&(r.b&&(g|=1),r.g&&(g|=2),r.U&&(g|=4),r.X&&(g|=8));h=0;if(r.j||r.i)r.j&&(h|=1),r.i&&(h|=2);var D=0;r.H&&(D=4);h||(h=D,D=0);r.Pc&&g&&(h||D)?e.push(new gB(3,g,h)):(g&&e.push(new gB(2,g)),h&&e.push(new gB(1,h)));D&&e.push(new gB(1,D))}}else{e=[];var M=a.a.da;if(M.Na)e.push(new gB(4,0));else{M.K&&M.b&&e.push(new gB(5,1));g=0;M.A&&(M.b&&(g|=1),M.g&&(g|=2));h=0;if(M.j||M.i)M.j&&(h|=1),M.i&&(h|=2);M.Pc&&g&&h?e.push(new gB(3,g,h)):(g&&e.push(new gB(2,
628 g)),h&&e.push(new gB(1,h)))}}s=e;var sa=new zA(m,d,p,s);b.push(sa)}}catch(Y){}finally{break t}}k=b;EA(this,"bd");this.Wd=new rB(this,k);sB(this.Wd);k={};k.allowed=this.ze.i;Zm(this,{},k)};f.destroy=function(){this.Uj&&wB(this);this.ba=!1;this.g&&rA(this.app,this.g);Tg(this.Wd,this.g);this.g=this.Wd=null;this.tg&&(this.tg.cancel(),this.tg=null);this.ze=null;yn(this.b);FB.C.destroy.call(this)};f.getVideoData=function(){return this.app.getVideoData(1)};f.J=function(){return this.app.J()};
629 function FA(a,b,c){a=a.ze;c=c||{};var d=(x()-a.o)/1E3;c.art=d;d=a.g.J();d.j&&(c.feature=d.ga);c.ad_flags=a.a.Qc;var e=a.a.Jc;e&&(c.cid=e);c.mt=a.W.getCurrentTime();(d=Xx(d))&&(c.lact=d);(d=a.W.wg())&&(c.len=d);a.a.bg&&(c.fqsf=1);(d=Nz.getInstance().getVersion())&&(c.sdkv=d);c.ad_event=b;if(3==b||4==b)a.k.a=c.at;b=c;if(EB(a,b)){var g;t:{c=a.b;d=Lb(b);for(g in c){if(g in d){g=null;break t}d[g]=c[g]}g=d}null===g?a.g.log(a.b):b=g;a.g.log(b);a.b={}}}function JA(a,b,c){c=c||{};c.ad_error=b;FA(a,7,c)}
630 f.Ri=function(){return this.ze?this.ze.k:FB.C.Ri.call(this)};function gA(){return Nz.getInstance().getVersion()}function oA(a){if(!a.g){var b=new Lx(a.J().a);b.Y="adunit";b.Ub=!0;a.g=new cz(b,2)}return a.g}function lA(a){var b=a.da.k?a.J().Tc||PA:Fd(Q(a.a));a.da.a||(b.height-=27);return b}function cA(a){return a.da.k?(a=a.J().Tc||PA,new Cb(0,0,a.width,a.height)):Dd(Q(a.a))}function wB(a){yn(a.b);a.Uj=!1;dn(a);cn(a,["seek"]);a.J().Sd&&cn(a,["audio"])}
631 function mA(a,b){switch(b){case 1:a.u("publish_external_event","onAdStart");break;case 2:a.u("publish_external_event","onAdEnd")}}function jA(a,b,c){a.u("publish_external_event","onAdStateChange",b,a.b.W.J().ub?a.b.W.app.S.b:Bn(a.b),c)}
632 f.xc=function(a){FB.C.xc.call(this,a);var b=parseInt(a.getId(),10);this.Wd&&!isNaN(b)&&(a=this.Wd,q(b)&&(b=a.i[b]))&&(a.Hd==b&&!b.td&&b.isVisible?b.show():(a.Hd&&a.ug(a.Hd),pB(a.k,b)?(a.Hd=null,b=a.j[b.getId()],b.Uc||(b.Uc=!0,qB(a.a,[b]))):(a.Hd=b,b.D("adBreakComplete",a.Lu,a),b.td&&(a=a.a,a.Uj=!0,a.u("command_redirect_controls",a,["play_pause"],void 0),bn(a,["seek"]),a.J().Sd&&bn(a,["audio"]),fn(a)),b.show())))};
633 f.$c=function(a){FB.C.$c.call(this,a);var b=parseInt(a.getId(),10),c=1E3*this.a.getCurrentTime();this.Wd&&!isNaN(b)&&c>a.start&&(2147483647==a.end||2147483646==a.end)&&(a=this.Wd,(b=a.i[b])&&a.Hd==b&&!b.td&&b.isVisible&&b.Yk&&b.a instanceof vA&&wA(b.a,google.ima.ViewMode.FULLSCREEN))};
634 f.wq=function(){EA(this,"sdk");if(this.vi)return this.vi;var a;if(this.da.P){a=new Bx(this.app,2);var b=google.ima.AdDisplayContainer,c=xn(this.b),d=An(this.b);a.j||(a.j=Lb(a.i),a.j.addEventListener=v(a.fu,a),a.j.removeEventListener=v(a.gu,a));a=new b(c,void 0,d,a.j)}else{a=this.b.W.J().ub?this.b.W.app.S.b:Bn(this.b);if(!a)return a=Error("AdModule.getVideoElement returned an invalid element."),b=new so,b.a(a),b;a=new google.ima.AdDisplayContainer(xn(this.b),a,An(this.b))}return this.vi=new google.ima.AdsLoader(a)};
635 function EA(a,b){var c=b;"nl"==b&&(c=a.ze,c.j++,c=c.j.toString());a.j[c]=x();"bs"!=c&&"fb"!=c||Zm(a,a.j,a.i)}function qB(a,b){a.u("command_update_cuerange_markers",b,a.a.a)}f.oe=function(a){this.u(a)};function GB(a){return HB(a||arguments.callee.caller,[])}
636 function HB(a,b){var c=[];if(Sa(b,a))c.push("[...circular reference...]");else if(a&&50>b.length){c.push(IB(a)+"(");for(var d=a.arguments,e=0;e<d.length;e++){0<e&&c.push(", ");var g;g=d[e];switch(typeof g){case "object":g=g?"object":"null";break;case "string":break;case "number":g=String(g);break;case "boolean":g=g?"true":"false";break;case "function":g=(g=IB(g))?g:"[fn]";break;default:g=typeof g}40<g.length&&(g=g.substr(0,40)+"...");c.push(g)}b.push(a);c.push(")\n");try{c.push(HB(a.caller,b))}catch(h){c.push("[exception trying to get caller]\n")}}else a?
637 c.push("[...long stack...]"):c.push("[end]");return c.join("")}function IB(a){if(JB[a])return JB[a];a=String(a);if(!JB[a]){var b=/function ([^\(]+)/.exec(a);JB[a]=b?b[1]:"[Anonymous]"}return JB[a]}var JB={};function KB(a,b,c,d,e){this.reset(a,b,c,d,e)}KB.prototype.b=null;KB.prototype.a=null;var LB=0;KB.prototype.reset=function(a,b,c,d,e){"number"==typeof e||LB++;this.i=d||x();this.j=a;this.k=b;this.g=c;delete this.b;delete this.a};KB.prototype.getMessage=function(){return this.k};function MB(a){this.b=a}MB.prototype.a=null;function NB(a,b){this.name=a;this.value=b}NB.prototype.toString=function(){return this.name};var OB=new NB("SHOUT",1200),PB=new NB("SEVERE",1E3),QB=new NB("WARNING",900),RB=new NB("INFO",800);f=MB.prototype;f.Iv=function(){};f.Kv=function(){return!1};f.getChildren=function(){this.a||(this.a={});return this.a};f.log=function(){};
638 f.Jv=function(a,b,c){var d=new KB(a,String(b),this.b);if(c){d.b=c;var e;var g=arguments.callee.caller;try{var h;var k=n("window.location.href");if(u(c))h={message:c,name:"Unknown error",lineNumber:"Not available",fileName:k,stack:"Not available"};else{var m,p,s=!1;try{m=c.lineNumber||c.zy||"Not available"}catch(r){m="Not available",s=!0}try{p=c.fileName||c.filename||c.sourceURL||l.$googDebugFname||k}catch(D){p="Not available",s=!0}h=!s&&c.lineNumber&&c.fileName&&c.stack&&c.message&&c.name?c:{message:c.message||
639 "Not available",name:c.name||"UnknownError",lineNumber:m,fileName:p,stack:c.stack||"Not available"}}e="Message: "+va(h.message)+'\nUrl: <a href="view-source:'+h.fileName+'" target="_new">'+h.fileName+"</a>\nLine: "+h.lineNumber+"\n\nBrowser stack:\n"+va(h.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+va(GB(g)+"-> ")}catch(M){e="Exception trying to expose exception! You win, we lose. "+M}d.a=e}return d};f.info=function(){};var SB={},TB=null;function UB(){TB||(TB=new MB(""),SB[""]=TB)}
640 function VB(a){UB();var b;if(!(b=SB[a])){b=new MB(a);var c=a.lastIndexOf("."),d=a.substr(c+1);VB(a.substr(0,c)).getChildren()[d]=b;SB[a]=b}return b};function WB(){this.a=x()}var XB=new WB;WB.prototype.set=function(a){this.a=a};WB.prototype.reset=function(){this.set(x())};WB.prototype.get=function(){return this.a};function YB(a){this.g=a||"";this.i=XB}YB.prototype.b=!0;YB.prototype.a=!1;function ZB(a){return 10>a?"0"+a:String(a)}function $B(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 aC(a){YB.call(this,a)}y(aC,YB);
641 function bC(a,b){var c=[];c.push(a.g," ");if(a.b){var d=new Date(b.i);c.push("[",ZB(d.getFullYear()-2E3)+ZB(d.getMonth()+1)+ZB(d.getDate())+" "+ZB(d.getHours())+":"+ZB(d.getMinutes())+":"+ZB(d.getSeconds())+"."+ZB(Math.floor(d.getMilliseconds()/10)),"] ")}c.push("[",$B(b,a.i.get()),"s] ");c.push("[",b.g,"] ");c.push(b.getMessage());a.a&&b.b&&c.push("\n",b.a);c.push("\n");return c.join("")};function cC(a,b){this.b=new qb(a);this.a=b?nb:mb}cC.prototype.stringify=function(a){return pb(this.b,a)};cC.prototype.parse=function(a){return this.a(a)};function dC(){};function eC(){}eC.prototype.a=null;var fC;function gC(){}y(gC,eC);function hC(a){return(a=iC(a))?new ActiveXObject(a):new XMLHttpRequest}function jC(a){var b={};iC(a)&&(b[0]=!0,b[1]=!0);return b}
642 function iC(a){if(!a.b&&"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.b=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.b}fC=new gC;function kC(a,b,c,d,e){this.b=a;this.a=b;this.j=c;this.g=d;this.i=e||1;this.vc=45E3;this.o=new fr(this);this.k=new Ei;Fi(this.k,250)}f=kC.prototype;f.Fe=null;f.Dc=!1;f.Pf=null;f.pl=null;f.Bg=null;f.Lf=null;f.$d=null;f.Lb=null;f.ce=null;f.Ra=null;f.Tg=0;f.Gc=null;f.Af=null;f.Le=null;f.zg=-1;f.zn=!0;f.Pe=!1;f.lk=0;f.fi=null;
643 function lC(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 mC={},nC={};f=kC.prototype;f.setTimeout=function(a){this.vc=a};function oC(a,b,c){a.Lf=1;a.$d=He(b.clone());a.ce=c;a.H=!0;pC(a,null)}function qC(a,b,c,d,e){a.Lf=1;a.$d=He(b.clone());a.ce=null;a.H=c;e&&(a.zn=!1);pC(a,d)}
644 function pC(a,b){a.Bg=x();rC(a);a.Lb=a.$d.clone();Fe(a.Lb,"t",a.i);a.Tg=0;a.Ra=a.b.Dk(a.b.oi()?b:null);0<a.lk&&(a.fi=new js(v(a.Hn,a,a.Ra),a.lk));a.o.listen(a.Ra,"readystatechange",a.Tt);var c=a.Fe?Lb(a.Fe):{};a.ce?(a.Af="POST",c["Content-Type"]="application/x-www-form-urlencoded",a.Ra.send(a.Lb,a.Af,a.ce,c)):(a.Af="GET",a.zn&&!dc&&(c.Connection="close"),a.Ra.send(a.Lb,a.Af,null,c));a.b.Cc(1);var d=a.ce;if(d)for(var c="",d=d.split("&"),e=0;e<d.length;e++){var g=d[e].split("=");if(1<g.length)var h=
645 g[0],g=g[1],k=h.split("_"),c=2<=k.length&&"type"==k[1]?c+(h+"="+g+"&"):c+(h+"=redacted&")}else c=null;a.a.info("XMLHTTP REQ ("+a.g+") [attempt "+a.i+"]: "+a.Af+"\n"+a.Lb+"\n"+c)}f.Tt=function(a){a=a.target;var b=this.fi;b&&3==sC(a)?(this.a.debug("Throttling readystatechange."),ks(b)):this.Hn(a)};
646 f.Hn=function(a){try{if(a==this.Ra)t:{var b=sC(this.Ra),c=this.Ra.i,d=tC(this.Ra);if(C&&!sc(10)||dc&&!rc("420+")){if(4>b)break t}else if(3>b||3==b&&!bc&&!uC(this.Ra))break t;this.Pe||4!=b||7==c||(8==c||0>=d?this.b.Cc(3):this.b.Cc(2));vC(this);var e=tC(this.Ra);this.zg=e;var g=uC(this.Ra);g||this.a.debug("No response text for uri "+this.Lb+" status "+e);this.Dc=200==e;this.a.info("XMLHTTP RESP ("+this.g+") [ attempt "+this.i+"]: "+this.Af+"\n"+this.Lb+"\n"+b+" "+e);this.Dc?(4==b&&wC(this),this.H?(xC(this,
647 b,g),bc&&this.Dc&&3==b&&(this.o.listen(this.k,"tick",this.Ks),this.k.start())):(yC(this.a,this.g,g,null),zC(this,g)),this.Dc&&!this.Pe&&(4==b?this.b.ci(this):(this.Dc=!1,rC(this)))):(this.Le=400==e&&0<g.indexOf("Unknown SID")?3:0,AC(),wC(this),BC(this))}}catch(h){this.a.debug("Failed call to OnXmlHttpReadyStateChanged_"),this.Ra&&uC(this.Ra)&&uC(this.Ra)}finally{}};
648 function xC(a,b,c){for(var d=!0;!a.Pe&&a.Tg<c.length;){var e=CC(a,c);if(e==nC){4==b&&(a.Le=4,AC(),d=!1);yC(a.a,a.g,null,"[Incomplete Response]");break}else if(e==mC){a.Le=4;AC();yC(a.a,a.g,c,"[Invalid Chunk]");d=!1;break}else yC(a.a,a.g,e,null),zC(a,e)}4==b&&0==c.length&&(a.Le=1,AC(),d=!1);a.Dc=a.Dc&&d;d||(yC(a.a,a.g,c,"[Invalid Chunked Response]"),wC(a),BC(a))}f.Ks=function(){var a=sC(this.Ra),b=uC(this.Ra);this.Tg<b.length&&(vC(this),xC(this,a,b),this.Dc&&4!=a&&rC(this))};
649 function CC(a,b){var c=a.Tg,d=b.indexOf("\n",c);if(-1==d)return nC;c=Number(b.substring(c,d));if(isNaN(c))return mC;d+=1;if(d+c>b.length)return nC;var e=b.substr(d,c);a.Tg=d+c;return e}
650 function DC(a,b){a.Bg=x();rC(a);var c=b?window.location.hostname:"";a.Lb=a.$d.clone();Ee(a.Lb,"DOMAIN",c);Ee(a.Lb,"t",a.i);try{a.Gc=new ActiveXObject("htmlfile")}catch(d){wC(a);a.Le=7;AC();BC(a);return}var e="<html><body>";b&&(e+='<script>document.domain="'+c+'"\x3c/script>');e+="</body></html>";a.Gc.open();a.Gc.write(e);a.Gc.close();a.Gc.parentWindow.m=v(a.Xt,a);a.Gc.parentWindow.d=v(a.Nn,a,!0);a.Gc.parentWindow.rpcClose=v(a.Nn,a,!1);c=a.Gc.createElement("div");a.Gc.parentWindow.document.body.appendChild(c);
651 c.innerHTML='<iframe src="'+a.Lb+'"></iframe>';a.a.info("TRIDENT REQ ("+a.g+") [ attempt "+a.i+"]: GET\n"+a.Lb);a.b.Cc(1)}f.Xt=function(a){EC(v(this.ty,this,a),0)};f.ty=function(a){if(!this.Pe){var b=this.a;b.info("TRIDENT TEXT ("+this.g+"): "+FC(b,a));vC(this);zC(this,a);rC(this)}};f.Nn=function(a){EC(v(this.sy,this,a),0)};f.sy=function(a){this.Pe||(this.a.info("TRIDENT TEXT ("+this.g+"): "+a?"success":"failure"),wC(this),this.Dc=a,this.b.ci(this),this.b.Cc(4))};f.cancel=function(){this.Pe=!0;wC(this)};
652 function rC(a){a.pl=x()+a.vc;GC(a,a.vc)}function GC(a,b){if(null!=a.Pf)throw Error("WatchDog timer not null");a.Pf=EC(v(a.Xx,a),b)}function vC(a){a.Pf&&(l.clearTimeout(a.Pf),a.Pf=null)}f.Xx=function(){this.Pf=null;var a=x();0<=a-this.pl?(this.a.info("TIMEOUT: "+this.Lb),2!=this.Lf&&this.b.Cc(3),wC(this),this.Le=2,AC(),BC(this)):GC(this,this.pl-a)};function BC(a){a.b.Ib()||a.Pe||a.b.ci(a)}
653 function wC(a){vC(a);Sg(a.fi);a.fi=null;a.k.stop();a.o.removeAll();if(a.Ra){var b=a.Ra;a.Ra=null;b.abort();b.dispose()}a.Gc&&(a.Gc=null)}function zC(a,b){try{a.b.mp(a,b),a.b.Cc(4)}catch(c){}};function HC(){}function yC(a,b,c,d){a.info("XMLHTTP TEXT ("+b+"): "+FC(a,c)+(d?" "+d:""))}HC.prototype.debug=function(a){this.info(a)};HC.prototype.info=function(){};
654 function FC(a,b){if(!b||"y2f%"==b)return b;try{var c=nb(b);if(c)for(var d=0;d<c.length;d++)if(t(c[d])){var e=c[d];if(!(2>e.length)){var g=e[1];if(t(g)&&!(1>g.length)){var h=g[0];if("noop"!=h&&"stop"!=h)for(var k=1;k<g.length;k++)g[k]=""}}}return ob(c)}catch(m){return a.debug("Exception parsing expected JS array - probably was not JS"),b}};function IC(a,b,c,d,e){(new HC).debug("TestLoadImageWithRetries: "+e);if(0==d)c(!1);else{var g=e||0;d--;JC(a,b,function(e){e?c(!0):l.setTimeout(function(){IC(a,b,c,d,g)},g)})}}
655 function JC(a,b,c){var d=new HC;d.debug("TestLoadImage: loading "+a);var e=new Image;e.onload=function(){try{d.debug("TestLoadImage: loaded"),KC(e),c(!0)}catch(a){}};e.onerror=function(){try{d.debug("TestLoadImage: error"),KC(e),c(!1)}catch(a){}};e.onabort=function(){try{d.debug("TestLoadImage: abort"),KC(e),c(!1)}catch(a){}};e.ontimeout=function(){try{d.debug("TestLoadImage: timeout"),KC(e),c(!1)}catch(a){}};l.setTimeout(function(){if(e.ontimeout)e.ontimeout()},b);e.src=a}
656 function KC(a){a.onload=null;a.onerror=null;a.onabort=null;a.ontimeout=null};function LC(a,b){this.a=a;this.b=b;this.g=new cC(null,!0)}f=LC.prototype;f.Mk=null;f.Qb=null;f.Gi=!1;f.jo=null;f.Fi=null;f.Zk=null;f.fl=null;f.Sb=null;f.$e=-1;f.eh=null;f.hh=null;f.connect=function(a){this.fl=a;a=MC(this.a,this.fl);AC();this.jo=x();var b=this.a.A;null!=b?(this.eh=b[0],(this.hh=b[1])?(this.Sb=1,NC(this)):(this.Sb=2,OC(this))):(Fe(a,"MODE","init"),this.Qb=new kC(this,this.b,void 0,void 0,void 0),this.Qb.Fe=this.Mk,qC(this.Qb,a,!1,null,!0),this.Sb=0)};
657 function NC(a){var b=PC(a.a,a.hh,"/mail/images/cleardot.gif");He(b);IC(b.toString(),5E3,v(a.Ev,a),3,2E3);a.Cc(1)}f.Ev=function(a){if(a)this.Sb=2,OC(this);else{AC();var b=this.a;b.a.debug("Test Connection Blocked");b.zd=b.le.$e;QC(b,9)}a&&this.Cc(2)};
658 function OC(a){a.b.debug("TestConnection: starting stage 2");var b=a.a.B;if(null!=b)a.b.debug("TestConnection: skipping stage 2, precomputed result is "+b?"Buffered":"Unbuffered"),AC(),b?(AC(),RC(a.a,a,!1)):(AC(),RC(a.a,a,!0));else if(a.Qb=new kC(a,a.b,void 0,void 0,void 0),a.Qb.Fe=a.Mk,b=TC(a.a,a.eh,a.fl),AC(),!C||sc(10))Fe(b,"TYPE","xmlhttp"),qC(a.Qb,b,!1,a.eh,!1);else{Fe(b,"TYPE","html");var c=a.Qb;a=Boolean(a.eh);c.Lf=3;c.$d=He(b.clone());DC(c,a)}}f.Dk=function(a){return this.a.Dk(a)};
659 f.abort=function(){this.Qb&&(this.Qb.cancel(),this.Qb=null);this.$e=-1};f.Ib=function(){return!1};
660 f.mp=function(a,b){this.$e=a.zg;if(0==this.Sb)if(this.b.debug("TestConnection: Got data for stage 1"),b){try{var c=this.g.parse(b)}catch(d){UC(this.a,this);return}this.eh=c[0];this.hh=c[1]}else this.b.debug("TestConnection: Null responseText"),UC(this.a,this);else if(2==this.Sb)if(this.Gi)AC(),this.Zk=x();else if("11111"==b){if(AC(),this.Gi=!0,this.Fi=x(),c=this.Fi-this.jo,!C||sc(10)||500>c)this.$e=200,this.Qb.cancel(),this.b.debug("Test connection succeeded; using streaming connection"),AC(),RC(this.a,
661 this,!0)}else AC(),this.Fi=this.Zk=x(),this.Gi=!1};
662 f.ci=function(){this.$e=this.Qb.zg;if(!this.Qb.Dc)this.b.debug("TestConnection: request failed, in state "+this.Sb),0==this.Sb?AC():2==this.Sb&&AC(),UC(this.a,this);else if(0==this.Sb)this.b.debug("TestConnection: request complete for initial check"),this.hh?(this.Sb=1,NC(this)):(this.Sb=2,OC(this));else if(2==this.Sb){this.b.debug("TestConnection: request complete for stage 2");var a=!1;(a=!C||sc(10)?this.Gi:200>this.Zk-this.Fi?!1:!0)?(this.b.debug("Test connection succeeded; using streaming connection"),AC(),
663 RC(this.a,this,!0)):(this.b.debug("Test connection failed; not using streaming"),AC(),RC(this.a,this,!1))}};f.oi=function(){return this.a.oi()};f.Cc=function(a){this.a.Cc(a)};function VC(a){Bi.call(this);this.headers=new Vd;this.j=a||null;this.b=!1;this.I=this.a=null;this.O=this.A="";this.i=0;this.k="";this.g=this.M=this.H=this.K=!1;this.o=0;this.B=null;this.P="";this.G=this.Q=!1}y(VC,Bi);var WC=/^https?$/i,XC=["POST","PUT"];f=VC.prototype;
664 f.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.A+"; newUri="+a);b=b?b.toUpperCase():"GET";this.A=a;this.k="";this.i=0;this.O=b;this.K=!1;this.b=!0;this.a=this.j?hC(this.j):hC(fC);this.I=this.j?this.j.a||(this.j.a=jC(this.j)):fC.a||(fC.a=jC(fC));this.a.onreadystatechange=v(this.Xm,this);try{dC(YC(this,"Opening Xhr")),this.M=!0,this.a.open(b,a,!0),this.M=!1}catch(e){dC(YC(this,"Error opening Xhr: "+e.message));ZC(this,e);return}a=c||"";
665 var g=this.headers.clone();d&&$d(d,function(a,b){g.set(b,a)});d=Oa(g.uc(),$C);c=l.FormData&&a instanceof l.FormData;!Sa(XC,b)||d||c||g.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");$d(g,function(a,b){this.a.setRequestHeader(b,a)},this);this.P&&(this.a.responseType=this.P);"withCredentials"in this.a&&(this.a.withCredentials=this.Q);try{aD(this),0<this.o&&(this.G=C&&rc(9)&&ga(this.a.timeout)&&q(this.a.ontimeout),dC(YC(this,"Will abort after "+this.o+"ms if incomplete, xhr2 "+
666 this.G)),this.G?(this.a.timeout=this.o,this.a.ontimeout=v(this.vc,this)):this.B=Gi(this.vc,this.o,this)),dC(YC(this,"Sending request")),this.H=!0,this.a.send(a),this.H=!1}catch(h){dC(YC(this,"Send error: "+h.message)),ZC(this,h)}};function $C(a){return"content-type"==a.toLowerCase()}f.vc=function(){"undefined"!=typeof aa&&this.a&&(this.k="Timed out after "+this.o+"ms, aborting",this.i=8,YC(this,this.k),Ci(this,"timeout"),this.abort(8))};
667 function ZC(a,b){a.b=!1;a.a&&(a.g=!0,a.a.abort(),a.g=!1);a.k=b;a.i=5;bD(a);cD(a)}function bD(a){a.K||(a.K=!0,Ci(a,"complete"),Ci(a,"error"))}f.abort=function(a){this.a&&this.b&&(YC(this,"Aborting"),this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.i=a||7,Ci(this,"complete"),Ci(this,"abort"),cD(this))};f.F=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),cD(this,!0));VC.C.F.call(this)};f.Xm=function(){this.ha()||(this.M||this.H||this.g?dD(this):this.yw())};f.yw=function(){dD(this)};
668 function dD(a){if(a.b&&"undefined"!=typeof aa)if(a.I[1]&&4==sC(a)&&2==tC(a))YC(a,"Local request error detected and ignored");else if(a.H&&4==sC(a))Gi(a.Xm,0,a);else if(Ci(a,"readystatechange"),4==sC(a)){YC(a,"Request complete");a.b=!1;try{var b=tC(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 g=ce(String(a.A))[1]||null;if(!g&&self.location)var h=self.location.protocol,g=h.substr(0,h.length-1);e=!WC.test(g?
669 g.toLowerCase():"")}c=e}if(c)Ci(a,"complete"),Ci(a,"success");else{a.i=6;var k;try{k=2<sC(a)?a.a.statusText:""}catch(m){k=""}a.k=k+" ["+tC(a)+"]";bD(a)}}finally{cD(a)}}}function cD(a,b){if(a.a){aD(a);var c=a.a,d=a.I[0]?ba:null;a.a=null;a.I=null;b||Ci(a,"ready");try{c.onreadystatechange=d}catch(e){}}}function aD(a){a.a&&a.G&&(a.a.ontimeout=null);ga(a.B)&&(l.clearTimeout(a.B),a.B=null)}function sC(a){return a.a?a.a.readyState:0}function tC(a){try{return 2<sC(a)?a.a.status:-1}catch(b){return-1}}
670 function uC(a){try{return a.a?a.a.responseText:""}catch(b){return""}}function YC(a,b){return b+" ["+a.O+" "+a.A+" "+tC(a)+"]"};function eD(a,b,c){this.H=a||null;this.b=1;this.g=[];this.i=[];this.a=new HC;this.k=new cC(null,!0);this.A=b||null;this.B=null!=c?c:null}function fD(a,b){this.a=a;this.map=b;this.Z=null}f=eD.prototype;f.lh=null;f.Ab=null;f.La=null;f.Hk=null;f.gi=null;f.Yn=null;f.xi=null;f.Qg=0;f.Gu=0;f.pb=null;f.ie=null;f.Ld=null;f.af=null;f.le=null;f.ji=null;f.xf=-1;f.to=-1;f.zd=-1;f.Rg=0;f.Jf=0;f.Ke=8;var gD=new Bi;function hD(a){ai.call(this,"statevent",a)}y(hD,ai);
671 function iD(a,b){ai.call(this,"timingevent",a);this.size=b}y(iD,ai);function jD(a){ai.call(this,"serverreachability",a)}y(jD,ai);f=eD.prototype;f.connect=function(a,b,c,d,e){this.a.debug("connect()");AC();this.Hk=b;this.lh=c||{};d&&q(e)&&(this.lh.OSID=d,this.lh.OAID=e);this.a.debug("connectTest_()");this.le=new LC(this,this.a);this.le.Mk=null;this.le.g=this.k;this.le.connect(a)};
672 f.disconnect=function(){this.a.debug("disconnect()");kD(this);if(3==this.b){var a=this.Qg++,b=this.gi.clone();Ee(b,"SID",this.j);Ee(b,"RID",a);Ee(b,"TYPE","terminate");lD(this,b);a=new kC(this,this.a,this.j,a,void 0);a.Lf=2;a.$d=He(b.clone());(new Image).src=a.$d;a.Bg=x();rC(a)}mD(this)};function kD(a){a.le&&(a.le.abort(),a.le=null);a.La&&(a.La.cancel(),a.La=null);a.Ld&&(l.clearTimeout(a.Ld),a.Ld=null);nD(a);a.Ab&&(a.Ab.cancel(),a.Ab=null);a.ie&&(l.clearTimeout(a.ie),a.ie=null)}
673 f.Ib=function(){return 0==this.b};function oD(a){var b=0;a.La&&b++;a.Ab&&b++;return b}function pD(a){a.Ab||a.ie||(a.ie=EC(v(a.wo,a),0),a.Rg=0)}
674 f.wo=function(a){this.ie=null;this.a.debug("startForwardChannel_");if(1==this.b){if(!a){this.a.debug("open_()");this.Qg=Math.floor(1E5*Math.random());a=this.Qg++;var b=new kC(this,this.a,"",a,void 0);b.Fe=null;var c=qD(this),d=this.gi.clone();Ee(d,"RID",a);this.H&&Ee(d,"CVER",this.H);lD(this,d);oC(b,d,c);this.Ab=b;this.b=2}}else 3==this.b&&(a?rD(this,a):0==this.g.length?this.a.debug("startForwardChannel_ returned: nothing to send"):this.Ab||(rD(this),this.a.debug("startForwardChannel_ finished, sent request")))};
675 function rD(a,b){var c,d;b?6<a.Ke?(a.g=a.i.concat(a.g),a.i.length=0,c=a.Qg-1,d=qD(a)):(c=b.g,d=b.ce):(c=a.Qg++,d=qD(a));var e=a.gi.clone();Ee(e,"SID",a.j);Ee(e,"RID",c);Ee(e,"AID",a.xf);lD(a,e);c=new kC(a,a.a,a.j,c,a.Rg+1);c.Fe=null;c.setTimeout(Math.round(1E4)+Math.round(1E4*Math.random()));a.Ab=c;oC(c,e,d)}function lD(a,b){if(a.pb){var c=a.pb.Yp(a);c&&$d(c,function(a,c){Ee(b,c,a)})}}
676 function qD(a){var b=Math.min(a.g.length,1E3),c=["count="+b],d;6<a.Ke&&0<b?(d=a.g[0].a,c.push("ofs="+d)):d=0;for(var e=0;e<b;e++){var g=a.g[e].a,h=a.g[e].map,g=6>=a.Ke?e:g-d;try{$d(h,function(a,b){c.push("req"+g+"_"+b+"="+encodeURIComponent(a))})}catch(k){c.push("req"+g+"_type="+encodeURIComponent("_badmap"))}}a.i=a.i.concat(a.g.splice(0,b));return c.join("&")}function sD(a){a.La||a.Ld||(a.o=1,a.Ld=EC(v(a.Zo,a),0),a.Jf=0)}
677 function tD(a){if(a.La||a.Ld||3<=a.Jf)return!1;a.a.debug("Going to retry GET");a.o++;a.Ld=EC(v(a.Zo,a),uD(a,a.Jf));a.Jf++;return!0}
678 f.Zo=function(){this.Ld=null;this.a.debug("Creating new HttpRequest");this.La=new kC(this,this.a,this.j,"rpc",this.o);this.La.Fe=null;this.La.lk=0;var a=this.Yn.clone();Ee(a,"RID","rpc");Ee(a,"SID",this.j);Ee(a,"CI",this.ji?"0":"1");Ee(a,"AID",this.xf);lD(this,a);if(!C||sc(10))Ee(a,"TYPE","xmlhttp"),qC(this.La,a,!0,this.xi,!1);else{Ee(a,"TYPE","html");var b=this.La,c=Boolean(this.xi);b.Lf=3;b.$d=He(a.clone());DC(b,c)}this.a.debug("New Request created")};
679 function RC(a,b,c){a.a.debug("Test Connection Finished");a.ji=c;a.zd=b.$e;a.a.debug("connectChannel_()");a.Cv(1,0);a.gi=MC(a,a.Hk);pD(a)}function UC(a,b){a.a.debug("Test Connection Failed");a.zd=b.$e;QC(a,2)}
680 f.mp=function(a,b){if(0!=this.b&&(this.La==a||this.Ab==a))if(this.zd=a.zg,this.Ab==a&&3==this.b)if(7<this.Ke){var c;try{c=this.k.parse(b)}catch(d){c=null}if(t(c)&&3==c.length){var e=c;if(0==e[0])t:if(this.a.debug("Server claims our backchannel is missing."),this.Ld)this.a.debug("But we are currently starting the request.");else{if(this.La)if(this.La.Bg+3E3<this.Ab.Bg)nD(this),this.La.cancel(),this.La=null;else break t;tD(this);AC()}else this.to=e[1],c=this.to-this.xf,0<c&&(e=e[2],this.a.debug(e+" bytes (in "+
681 c+" arrays) are outstanding on the BackChannel"),37500>e&&this.ji&&0==this.Jf&&!this.af&&(this.af=EC(v(this.Fu,this),6E3)))}else this.a.debug("Bad POST response data returned"),QC(this,11)}else"y2f%"!=b&&(this.a.debug("Bad data returned - missing/invald magic cookie"),QC(this,11));else if(this.La==a&&nD(this),!/^[\s\xa0]*$/.test(b))for(c=this.k.parse(b),t(c),e=0;e<c.length;e++){var g=c[e];this.xf=g[0];g=g[1];2==this.b?"c"==g[0]?(this.j=g[1],this.xi=g[2],g=g[3],null!=g?this.Ke=g:this.Ke=6,this.b=3,
682 this.pb&&this.pb.ro(this),this.Yn=TC(this,this.xi,this.Hk),sD(this)):"stop"==g[0]&&QC(this,7):3==this.b&&("stop"==g[0]?QC(this,7):"noop"!=g[0]&&this.pb&&this.pb.qo(this,g),this.Jf=0)}};f.Fu=function(){null!=this.af&&(this.af=null,this.La.cancel(),this.La=null,tD(this),AC())};function nD(a){null!=a.af&&(l.clearTimeout(a.af),a.af=null)}
683 f.ci=function(a){this.a.debug("Request complete");var b;if(this.La==a)nD(this),this.La=null,b=2;else if(this.Ab==a)this.Ab=null,b=1;else return;this.zd=a.zg;if(0!=this.b)if(a.Dc)1==b?(x(),Ci(gD,new iD(gD,a.ce?a.ce.length:0)),pD(this),this.i.length=0):sD(this);else{var c=a.Le;if(3==c||7==c||0==c&&0<this.zd)this.a.debug("Not retrying due to error type");else{this.a.debug("Maybe retrying, last error: "+lC(c,this.zd));var d;if(d=1==b)this.Ab||this.ie?d=!1:1==this.b||2<=this.Rg?d=!1:(this.a.debug("Going to retry POST"),
684 this.ie=EC(v(this.wo,this,a),uD(this,this.Rg)),this.Rg++,d=!0);if(d||2==b&&tD(this))return;this.a.debug("Exceeded max number of retries")}this.a.debug("Error: HTTP request failed");switch(c){case 1:QC(this,5);break;case 4:QC(this,10);break;case 3:QC(this,6);break;case 7:QC(this,12);break;default:QC(this,2)}}};function uD(a,b){var c=5E3+Math.floor(1E4*Math.random());a.pb||(a.a.debug("Inactive channel"),c*=2);return c*b}
685 f.Cv=function(a){if(!Sa(arguments,this.b))throw Error("Unexpected channel state: "+this.b);};function QC(a,b){a.a.info("Error code "+b);if(2==b||9==b){var c=null;a.pb&&(c=null);var d=v(a.Fv,a);c||(c=new qe("//www.google.com/images/cleardot.gif"),He(c));JC(c.toString(),1E4,d)}else AC();vD(a,b)}f.Fv=function(a){a?(this.a.info("Successfully pinged google.com"),AC()):(this.a.info("Failed to ping google.com"),AC(),vD(this,8))};
686 function vD(a,b){a.a.debug("HttpChannel: error - "+b);a.b=0;a.pb&&a.pb.To(a,b);mD(a);kD(a)}function mD(a){a.b=0;a.zd=-1;if(a.pb)if(0==a.i.length&&0==a.g.length)a.pb.Pk(a);else{a.a.debug("Number of undelivered maps, pending: "+a.i.length+", outgoing: "+a.g.length);var b=$a(a.i),c=$a(a.g);a.i.length=0;a.g.length=0;a.pb.Pk(a,b,c)}}function MC(a,b){var c=PC(a,null,b);a.a.debug("GetForwardChannelUri: "+c);return c}function TC(a,b,c){b=PC(a,a.oi()?b:null,c);a.a.debug("GetBackChannelUri: "+b);return b}
687 function PC(a,b,c){var d=Ie(c);if(""!=d.Se)b&&se(d,b+"."+d.Se),te(d,d.rh);else var e=window.location,d=Je(e.protocol,b?b+"."+e.hostname:e.hostname,e.port,c);a.lh&&$d(a.lh,function(a,b){Ee(d,b,a)});Ee(d,"VER",a.Ke);lD(a,d);return d}f.Dk=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new VC;a.Q=!1;return a};function EC(a,b){if(!ha(a))throw Error("Fn must not be null and must be a function");return l.setTimeout(function(){a()},b)}f.Cc=function(){Ci(gD,new jD(gD))};
688 function AC(){Ci(gD,new hD(gD))}f.oi=function(){return!(!C||sc(10))};function wD(){}f=wD.prototype;f.ro=function(){};f.qo=function(){};f.To=function(){};f.Pk=function(){};f.Yp=function(){return{}};function xD(a){a&&(this.id=a.id||a.name,this.name=a.name,this.app=a.app,this.type=a.type||"REMOTE_CONTROL",this.rp=a.user||"")}f=xD.prototype;f.id="";f.name="";f.app="";f.type="REMOTE_CONTROL";f.rp="";f.equals=function(a){return a?this.id==a.id:!1};function yD(a,b){this.action=a;this.params=b||null};function zD(){v(this.i,this);this.a=new aC;this.a.b=!1;this.b=this.a.a=!1;this.g="";this.j={}}function AD(){var a=BD;!0!=a.b&&(UB(),a.b=!0)}zD.prototype.i=function(a){if(!this.j[a.g]){var b=bC(this.a,a),c=CD;if(c)switch(a.j){case OB:DD(c,"info",b);break;case PB:DD(c,"error",b);break;case QB:DD(c,"warn",b);break;default:DD(c,"debug",b)}else window.opera?window.opera.postError(b):this.g+=b}};var BD=null,CD=window.console;function DD(a,b,c){if(a[b])a[b](c);else a.log(c)};var ED=null,FD=null,GD=Array(50),HD=-1,ID=!1;function JD(a){var b=(HD+1)%50;HD=b;GD[b]=a;ID||(ID=49==b)}function KD(a){var b=GD;if(b[0]){var c=HD,d=ID?c:-1;do{var d=(d+1)%50,e=b[d];z(a,function(a){a(e)})}while(d!=c);GD=Array(50);HD=-1;ID=!1}}
689 function LD(){var a=MD,b=n("yt.mdx.remote.debug.logger_"),c=n("yt.mdx.remote.debug.handlers_");b&&c||(BD||(BD=new zD),-1!=window.location.href.indexOf("Debug=true")&&AD(),AD(),BD.a.a=!0,(b=n("yt.mdx.remote.debug.logger_"))||(b=VB("yt.mdx.remote")),ED=b,MB.prototype.log=MB.prototype.log,MB.prototype.getLogRecord=MB.prototype.Jv,MB.prototype.addHandler=MB.prototype.Iv,MB.prototype.removeHandler=MB.prototype.Kv,pa("yt.mdx.remote.debug.logger_",ED),FD=n("yt.mdx.remote.debug.handlers_")||[],pa("yt.mdx.remote.debug.handlers_",
690 FD),n("yt.mdx.remote.debug.logger_"),c=n("yt.mdx.remote.debug.handlers_"));c&&(c.push(a),KD(c))}function ND(a,b){var c=n("yt.mdx.remote.debug.logger_"),d=n("yt.mdx.remote.debug.handlers_");if(c){if(c.log(RB,a+": "+b,void 0),d&&!Ta(d)){KD(d);var e=c.getLogRecord(RB,a+": "+b,void 0);z(d,function(a){a(e)})}}else d&&!Ta(d)||JD(new KB(RB,String(b),"yt.mdx.remote"))};function OD(){if(!("cast"in window))return!1;var a=window.cast||{};return"ActivityStatus"in a&&"Api"in a&&"LaunchRequest"in a&&"Receiver"in a}function PD(a){ND("CAST",a)}function MD(a){var b=QD();b&&b.logMessage&&(a=bC(RD,a),b.logMessage(a))}
691 function SD(){if(!TD&&(Ta(UD)&&ab(UD,Kg()),OD())){var a=QD();a?(a.removeReceiverListener("YouTube",VD),a.addReceiverListener("YouTube",VD),PD("API initialized in the other binary")):(a=new cast.Api,pa("yt.mdx.remote.castapi.api_",a),a.addReceiverListener("YouTube",VD),a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(function(){window.location.reload()}),RD=new aC,RD.b=!1,RD.a=!1,LD(),PD("API initialized"));TD=!0}}
692 function WD(a){var b=Pa(UD,function(b){return b.id==a.id});0<=b&&(UD[b]=jg(a))}function VD(a){PD("Updating receivers: "+ob(a));XD(a);Lr("yt-remote-cast-device-list-update",YD());z(YD(),function(a){ZD(a.id)});z(a,function(a){a.isTabProjected&&(a=$D(a.id),PD("Detected device: "+a.id+" is tab projected. Firing DEVICE_TAB_PROJECTED event."),Lr("yt-remote-cast-device-tab-projected",a))})}
693 function aE(a,b){PD("Updating "+a+" activity status: "+ob(b));var c=$D(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=""),WD(c),Lr("yt-remote-cast-device-status-update",c)):PD("Device not found")}function YD(){SD();return pg(UD)}
694 function XD(a){a=Ka(a,function(a){var c={id:a.id,name:a.name};if(a=$D(a.id))c.activityId=a.activityId,c.status=a.status;return c});Ua(UD);ab(UD,a)}function $D(a){var b=YD();return Oa(b,function(b){return b.id==a})||null}function ZD(a){var b=$D(a),c=QD();c&&b&&b.activityId&&c.getActivityStatus(b.activityId,function(b){"error"==b.status&&(b.status="stopped");aE(a,b)})}
695 function bE(a){SD();var b=$D(a),c=QD();c&&b&&b.activityId?(PD("Stopping cast activity"),c.stopActivity(b.activityId,oa(aE,a))):PD("Dropping cast activity stop")}function QD(){return n("yt.mdx.remote.castapi.api_")}var RD=null,TD=!1,UD=n("yt.mdx.remote.castapi.devices_")||[];pa("yt.mdx.remote.castapi.devices_",UD);function cE(a,b){Ei.call(this);if(ha(a))b&&(a=v(a,b));else if(a&&ha(a.handleEvent))a=v(a.handleEvent,a);else throw Error("Invalid listener argument");this.o=a;ri(this,"tick",v(this.k,this));this.stop();Fi(this,5E3+2E4*Math.random())}y(cE,Ei);cE.prototype.j=0;cE.prototype.k=function(){if(500<this.a){var a=this.a;24E4>2*a&&(a*=2);Fi(this,a)}this.o()};cE.prototype.start=function(){cE.C.start.call(this);this.j=x()+this.a};cE.prototype.stop=function(){this.j=0;cE.C.stop.call(this)};function dE(a,b){this.k=a;this.j=b;this.g=new Wh;this.b=new cE(this.Wt,this);this.a=null}y(dE,wD);f=dE.prototype;f.ai="";f.Vg=0;f.Hi=0;f.Me=function(){};f.D=function(a,b,c){return this.g.D(a,b,c)};f.$=function(a,b,c){return this.g.$(a,b,c)};f.Wc=function(a){return this.g.Wc(a)};f.u=function(a,b){return this.g.u.apply(this.g,arguments)};
696 f.connect=function(a,b,c){if(!this.a||2!=this.a.b){this.ai="";this.b.stop();this.i=a||null;this.Vg=b||0;a=this.k+"/test";b=this.k+"/bind";var d=new eD("1",c?c.firstTestResults:null,c?c.secondTestResults:null),e=this.a;e&&(e.pb=null);d.pb=this;this.a=d;e?(3!=e.b&&0==oD(e)||this.Me("Unexpected state on old channel when reconnecting: "+e.b),this.a.connect(a,b,this.j,e.j,e.xf)):c?this.a.connect(a,b,this.j,c.sessionId,c.arrayId):this.a.connect(a,b,this.j)}};
697 f.disconnect=function(a){this.Hi=a||0;this.b.stop();this.a&&0!=this.a.b&&this.a.disconnect();this.Hi=0};f.sendMessage=function(a,b){if(!this.a||0==this.a.b||2!=this.a.b&&3!=this.a.b&&!this.b.Xc)this.Me("Ignoring message: "+a);else{var c={_sc:a};b&&Ob(c,b);var d=this.a;if(0==d.b)throw Error("Invalid operation: sending map when state is closed");1E3==d.g.length&&ob(c);d.g.push(new fD(d.Gu++,c));2!=d.b&&3!=d.b||pD(d)}};
698 f.ro=function(){var a=this.b;a.stop();Fi(a,5E3+2E4*Math.random());this.i=null;this.Vg=0;this.u("handlerOpened")};f.To=function(a,b){var c=2==b&&401==this.a.zd;4==b||c||(6==b&&(c=this.b,c.stop(),Fi(c,500)),this.b.start());this.u("handlerError",b)};f.Pk=function(){this.b.Xc||this.u("handlerClosed")};f.Yp=function(){var a={v:2};this.ai&&(a.gsessionid=this.ai);0!=this.Vg&&(a.ui=""+this.Vg);0!=this.Hi&&(a.ui=""+this.Hi);this.i&&Ob(a,this.i);return a};
699 f.qo=function(a,b){"S"==b[0]?this.ai=b[1]:this.g.u("handlerMessage",new yD(b[0],b[1]))};function eE(a,b){(a.j.loungeIdToken=b)||a.b.stop()}function fE(a){return a.b.Xc?a.b.j-x():NaN}f.Wt=function(){this.b.stop();0!=oD(this.a)?this.b.start():this.connect(this.i,this.Vg)};function gE(a,b){dE.call(this,a,b)}y(gE,dE);gE.prototype.Me=function(){};function hE(){this.yb=[];this.index=-1;iE(this)}function iE(a){a.volume=-1;a.muted=!1;a.b=null;a.a=-1;a.g=null;a.i=0;a.j=x()}function jE(a){return a.yb[a.index]}function kE(a,b){a.i=b;a.j=x()}function lE(a){switch(a.a){case 1:return(x()-a.j)/1E3+a.i;case -1E3:return 0}return a.i}function mE(a,b){var c=a.index;a.index=Ia(a.yb,b);c!=a.index&&iE(a)}function nE(a,b,c){c=c||jE(a);if(ib(a.yb,b)&&c==jE(a))return!1;a.yb=$a(b);mE(a,c);return!0}
700 hE.prototype.add=function(a,b){return a&&!Sa(this.yb,a)?(!b||-1<this.index&&this.index>=this.yb.length-1?this.yb.push(a):this.yb.splice(this.index+1,0,a),!0):!1};hE.prototype.remove=function(a){var b=jE(this);return Wa(this.yb,a)?(this.index=Ia(this.yb,b),!0):!1};function oE(){R.call(this);this.Hc=tg(Hg());this.log_("Initializing local screens: "+Jf(this.Hc));this.g=[];this.Ak=null;this.b=[];this.a=[];this.Bi(YD());this.log_("Initializing DIAL devices: "+kg(this.a));var a=tg(Ig());pE(this,a);this.log_("Initializing online screens: "+Jf(this.b));qE(this)}y(oE,R);var rE=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];f=oE.prototype;f.oh=NaN;f.log_=function(a){ND("RM",a)};
701 function sE(a){var b=navigator.userAgent;if(0<=b.search("MSIE")&&(b=b.match(/MSIE ([\d.]+)/)[1],0>Ba(b,"10.0")))return a;b=ce(document.location.href);return ae("https",null,b[3],null,a)}function qE(a){Gr("yt-remote-cast-device-list-update",a.Bi,a);Gr("yt-remote-cast-device-status-update",a.mx,a);Gr("yt-remote-cast-device-tab-projected",function(a){this.u("connectToReceiver",a.id)},a);a.Ep();gf(v(a.Ep,a),1E4)}
702 f.u=function(a,b){if(this.ha())return!1;this.log_("Firing "+a);return this.H.u.apply(this.H,arguments)};f.Ep=function(){var a=YD();Ta(a)||this.Bi(a);a=tE(this);Ta(a)||(eg("yt-remote-lounge-token-expiration")?uE(this,a):vE(this))};f.dl=function(){var a=tE(this),b=Ja(a,function(a){return!!wg(this.b,a)},this);pE(this,b);this.Bi(YD());this.u("managedScreenChange",a)};function wE(a,b){return Ja(b,function(a){return a.Cb?(a=rg(this.a,a.Cb),!!a&&"RUNNING"==a.status):!0},a)}
703 f.Bi=function(a){var b=!1;z(a,function(a){var c=xg(this.Hc,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."),xE(this));Jg(og(a));var c=!ib(this.a,a,qg);c&&this.log_("Updating DIAL devices: "+kg(this.a)+" to "+kg(a));this.a=a;pE(this,this.b);c&&this.u("onlineReceiverChange")};
704 f.mx=function(a){var b=rg(this.a,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,Jg(og(this.a)));pE(this,this.b)};function pE(a,b,c){b=wE(a,b);var d=!ib(a.b,b,vg);!d&&!c||Ta(b)||(c=sg(b),bg("yt-remote-online-screens",c,60));d&&(a.log_("Updating online screens: "+Jf(a.b)+" -> "+Jf(b)),a.b=b,a.u("onlineReceiverChange"))}
705 function uE(a,b){var c=[],d={};z(b,function(a){a.lc&&(d[a.lc]=a,c.push(a.lc))});var e={method:"POST",Mf:{lounge_token:c.join(",")},Z:a,Qa:function(a,b){var c=[];z(b.screens||[],function(a){"online"==a.status&&c.push(d[a.loungeToken])});var e=this.Ak?yE(this,this.Ak):null;e&&!wg(c,e)&&c.push(e);pE(this,c,!0)}};Qj(sE("/api/lounge/pairing/get_screen_availability"),e)}
706 function vE(a){var b=tE(a),c=Ka(b,function(a){return a.mb});Ta(c)||(a.log_("Updating lounge tokens for: "+ob(c)),Qj(sE("/api/lounge/pairing/get_lounge_token_batch"),{Mf:{screen_ids:c.join(",")},method:"POST",Z:a,Qa:function(a,c){zE(this,c.screens||[]);this.Hc=Ja(this.Hc,function(a){return!!a.lc});xE(this);uE(this,b)}}))}function zE(a,b){z(Za(a.Hc,a.g),function(a){var d=Oa(b,function(b){return a.mb==b.screenId});d&&(a.lc=d.loungeToken)})}
707 function xE(a){var b=tg(Hg());ib(a.Hc,b,vg)||(a.log_("Saving local screens: "+Jf(b)+" to "+Jf(a.Hc)),Gg(sg(a.Hc)),a.dl())}function AE(a,b,c){var d=Pa(b,function(a){return ug(c,a)}),e=0>d?!0:!1;0>d?b.push(c):b[d]=c;wg(a.b,c)||a.b.push(c);return e}
708 f.$o=function(a,b,c){var d=!1;b>=rE.length&&(this.log_("Pairing DIAL device "+a+" with "+c+" timed out."),d=!0);var e=rg(this.a,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?(BE(this),this.u("screenPair",null)):Qj(sE("/api/lounge/pairing/get_screen"),{method:"POST",Mf:{pairing_code:c},Z:this,Qa:function(a,b){BE(this);var d=new Hf(b.screen);
709 d.name=e.name;d.Cb=e.id;var m=AE(this,this.Hc,d);this.log_("Paired with "+(m?"a new":"an old")+" local screen:"+If(d));xE(this);this.u("screenPair",d);this.log_("Pairing "+c+" succeeded.");this.u("screenPair",d)},onError:function(){this.log_("Polling pairing code: "+c);I(this.oh);this.oh=H(v(this.$o,this,a,b+1,c),rE[b])}})};
710 function CE(a,b,c,d,e){BE(a);if(rg(a.a,b)){if(!c){var g=c=lg();SD();var h=$D(b),k=QD();if(k&&h){var m=new cast.Receiver(h.id,h.name),m=new cast.LaunchRequest("YouTube",m);m.parameters="pairingCode="+g;m.description=new cast.LaunchDescription;m.description.text=document.title;d&&(m.parameters+="&v="+d,e&&(m.parameters+="&t="+Math.round(e)),m.description.url="http://i.ytimg.com/vi/"+d+"/default.jpg");"UNKNOWN"!=h.status&&(h.status="UNKNOWN",WD(h),Lr("yt-remote-cast-device-status-update",h));PD("Sending a cast launch request with params: "+
711 m.parameters);k.launch(m,oa(aE,b))}else PD("No cast API or no cast device. Dropping cast launch.")}a.oh=H(v(a.$o,a,b,0,c),rE[0])}else a.log_("No DIAL device with id: "+b)}function BE(a){I(a.oh);a.oh=NaN}function yE(a,b){var c=xg(tE(a),b);a.log_("Found screen: "+If(c)+" with key: "+b);return c}function DE(a,b){var c=xg(a.b,b);a.log_("Found online screen: "+If(c)+" with key: "+b);return c}
712 function EE(a,b){var c=rg(a.a,b);if(!c){var d=xg(a.Hc,b);d&&(c=rg(a.a,d.Cb))}a.log_("Found DIAL: "+(c?c.toString():"null")+" with key: "+b);return c}function tE(a){return Za(a.g,Ja(a.Hc,function(a){return!wg(this.g,a)},a))};function FE(a,b){R.call(this);if(cg){var c=cg;ag(c,c.Of.Nd(!0))}yg();VB("goog.net.BrowserChannel");this.i=new oE;c=Ag();this.g=new gE("/api/lounge/bc",{device:"REMOTE_CONTROL",id:c,name:a,app:b});this.a=null;this.A=[];this.g.D("handlerOpened",this.Yu,this);this.g.D("handlerClosed",this.Vu,this);this.g.D("handlerError",this.Wu,this);this.g.D("handlerMessage",this.Xu,this);this.i.D("managedScreenChange",this.dl,this);this.log_("Initializing with device id = "+c+", name = "+a+", app = "+b)}y(FE,R);
713 f=FE.prototype;f.Zg=NaN;f.$k=NaN;f.Yi=NaN;f.Zi=NaN;f.log_=function(a){ND("RC",a)};function GE(a){var b=Bg();return b?yE(a.i,b):null}function HE(a,b,c){a.$("connectionOpened",b,c);a.$("connectionClosed",b,c);a.$("connectionError",b,c)}function IE(a,b){"connectionError"==b&&fg("yt-remote-session-screen-id");a.log_("Firing "+b);a.u(b,"connectionOpened"==b);a.o=null}
714 function JE(a,b){"playerChange"==b?(I(a.Yi),a.Yi=H(v(function(){this.u("playerChange");this.Yi=NaN},a),2E3)):"playlistChange"==b&&(I(a.Zi),a.Zi=H(v(function(){this.u("playlistChange");this.Zi=NaN},a),2E3))}function KE(a,b){"playerChange"==b&&isNaN(a.Yi)&&a.u("playerChange");"playlistChange"==b&&isNaN(a.Zi)&&a.u("playlistChange")}function LE(a,b){b?(a.log_("Changing current screen id from: "+a.j+" to "+b.mb),a.j=b.mb,eE(a.g,b.lc)):(a.log_("Removing current screen id: "+a.j),a.j="",eE(a.g,""))}
715 function ME(a){return a.j?yE(a.i,a.j):null}f.connect=function(a){this.log_("Connecting to the receiver: "+ob(a));var b=DE(this.i,a.key);b?NE(this,b):(a=EE(this.i,a.key))?OE(this,a):H(v(function(){IE(this,"connectionError")},this),0)};function PE(a){a=a||0;5>=a&&(a=0);return a}
716 function NE(a,b){a.log_("Connecting to screen: "+If(b));var c=GE(a);c&&!ug(b,c)?a.disconnect():QE(a);a.a=null;LE(a,b);c={};if(a.b){c.videoIds=RE(a.b).join(",");c.videoId=a.b.a.getVideoData().L;c.videoSources=SE(a.b).join(",");var d=a.o?a.o.currentTime:a.b.a.getCurrentTime();c.currentTime=PE(d)}Kb(c)?a.log_("Connecting with empty params"):a.log_("Connecting with setPlaylist and params: "+ob(c));a.b?Lg(a.b.a.getVideoData().L,TE(a.b)):Lg("","");a.g.connect(Kb(c)?{}:{method:"setPlaylist",params:ob(c)},
717 1,Fg());a.a=new hE;Kb(c)||(a.a.yb=c.videoIds.split(","),mE(a.a,c.videoId));UE(a)}function OE(a,b){a.log_("Connecting to DIAL device: "+(b?b.toString():"null"));VE(a);WE(a);var c=a.o?a.o.pairingCode:"";c?CE(a.i,b.id,c):a.b?CE(a.i,b.id,"",a.b.a.getVideoData().L,a.b.a.getCurrentTime()):CE(a.i,b.id,"");a.k=b.id;a.i.D("screenPair",a.On,a)}f.On=function(a){this.log_("Paired with a DIAL screen: "+If(a));VE(this);a?NE(this,a):(this.k="",IE(this,"connectionError"))};
718 f.disconnect=function(){this.log_("Disconnecting with user intent.");WE(this);Mg();this.g.disconnect(1)};function WE(a){BE(a.i);var b=Oa(a.A,function(a){return"REMOTE_CONTROL"==a.type});b?(a.log_("Did not stop DIAL device, because another remote is connected: "+ob(b?{id:b.id,name:b.name,app:b.app,type:b.type,user:b.rp}:null)),a.k=""):(b=ME(a),a.k?(a.log_("Stopping DIAL device: "+a.k),bE(a.k),a.k=""):b&&b.Cb&&(a.log_("Stopping DIAL device: "+b.Cb),bE(b.Cb)))}
719 function QE(a){a.log_("Disconnecting from screen.");a.g.disconnect(2)}function XE(a,b){var c=ME(a),d=Oa(b,function(a){return c&&(a.key==c.mb||a.key==c.Cb)||this.k&&(a=EE(this.i,a.key))&&a.id==this.k?!0:!1},a);a.log_("Found current receiver: "+ob(d)+" in "+ob(b));return d}function YE(a){return ZE(a)?a.a:null}function $E(a,b,c){c?a.log_("Sending: action="+b+", params="+ob(c)):a.log_("Sending: action="+b);aF(a)?a.log_("Action = "+b+" was ignored due to reconnecting."):a.g.sendMessage(b,c)}
720 function bF(a,b,c,d){d=PE(d);a.a.add(b,!0)&&$E(a,"insertVideo",{videoId:b,videoSource:c});kE(a.a,d);mE(a.a,b);JE(a,"playlistChange");$E(a,"setVideo",{currentTime:d,videoId:b})}function cF(a,b,c,d,e){e=PE(e);$E(a,"setPlaylist",{videoIds:c.join(","),videoId:b,videoSources:Ka(c,function(){return d}),currentTime:e});kE(a.a,e);nE(a.a,c,b);JE(a,"playlistChange")}
721 function dF(a){var b=eg("yt-remote-session-video-id"),c=eg("yt-remote-session-list-id"),d=a.b.a.getVideoData().L,e=TE(a.b);Lg(d,e);a.log_("Watch context changed: videoId from "+b+" to "+d+" listId from "+c+" to "+e);var g=!1,h=!1;d&&d!=b&&(g=!0);e&&e!=c&&(h=!0);g?(b=SE(a.b),c=a.b.a.vb(),b=b[c?c.ua:0],c=a.b.a.getCurrentTime(),h?cF(a,d,RE(a.b),b,c):bF(a,d,b,c)):h&&(d=RE(a.b),h=SE(a.b),$E(a,"updatePlaylist",{videoIds:d.join(","),videoSources:h.join(",")}),nE(a.a,d),JE(a,"playlistChange"))}
722 function eF(a){$E(a,"play");kE(a.a,lE(a.a));-1E3!=a.a.a&&(a.a.a=1);JE(a,"playerChange")}f.oo=function(){$E(this,"getNowPlaying")};function ZE(a){var b=a.g.a;return!!b&&3==b.b&&!!a.j&&isNaN(a.Zg)}function UE(a){fF(a);a.Zg=H(v(function(){fF(this);LE(this,null);this.k="";this.a=null;this.log_("Connecting timeout");IE(this,"connectionError");Mg();this.g.disconnect(1)},a),1E4)}function fF(a){I(a.Zg);a.Zg=NaN}function gF(a){I(a.$k);a.$k=NaN}function VE(a){a.i.$("screenPair",a.On,a)}
723 f.Yu=function(){this.log_("Channel opened");var a=this.j;bg("yt-remote-session-browser-channel",{firstTestResults:[""],secondTestResults:!this.g.a.ji,sessionId:this.g.a.j,arrayId:this.g.a.xf});bg("yt-remote-session-screen-id",a);var a=zg(),b=Ag();Sa(a,b)||a.push(b);Dg(a);yg();this.b&&(this.b.a.getVideoData().Oa&&!TE(this.b)?this.log_("Wait for playlist data to be loaded."):dF(this))};function hF(a){Mg(!0);gF(a);a.i.Ak=null;LE(a,null);a.k=""}
724 f.Vu=function(){this.log_("Channel closed");var a=!!this.j&&isNaN(this.Zg);hF(this);a&&IE(this,"connectionClosed")};f.Wu=function(a){aF(this)?this.log_("Channel error: "+a+" with reconnection in "+fE(this.g)+" ms"):this.log_("Channel error: "+a+" without reconnection");aF(this)||hF(this);fF(this);IE(this,"connectionError")};
725 function iF(a,b){switch(b.action){case "loungeStatus":var c=mb(b.params.devices);a.A=Ka(c,function(a){return new xD(a)});break;case "loungeScreenDisconnected":Ya(a.A,function(a){return"LOUNGE_SCREEN"==a.type});break;case "remoteConnected":var d=new xD(mb(b.params.device));Oa(a.A,function(a){return a.equals(d)})||Va(a.A,d);break;case "remoteDisconnected":d=new xD(mb(b.params.device)),Ya(a.A,function(a){return a.equals(d)})}}
726 function jF(a,b){var c=!1;if("loungeStatus"==b.action)c=!!Oa(a.A,function(a){return"LOUNGE_SCREEN"==a.type});else if("loungeScreenConnected"==b.action)c=!0;else if("loungeScreenDisconnected"==b.action)c=!1;else return;c!=ZE(a)&&(c?(fF(a),IE(a,"connectionOpened"),a.oo()):a.disconnect())}function aF(a){return!isNaN(fE(a.g))}
727 f.Xu=function(a){a.params?this.log_("Received: action="+a.action+", params="+ob(a.params)):this.log_("Received: action="+a.action);iF(this,a);jF(this,a);if(ZE(this)){var b=!1,c=!1,d,e,g,h,k,m,p;a.params&&(d=a.params.videoId||a.params.video_id,e=a.params.videoIds||a.params.video_ids,g=a.params.state,h=a.params.currentTime||a.params.current_time,k=a.params.volume,m=a.params.muted,q(a.params.currentError)&&(p=mb(a.params.currentError)));if("onSubtitlesTrackChanged"==a.action)d==jE(this.a)&&(delete a.params.videoId,
728 Kb(a.params)?this.a.b=null:this.a.b=a.params,KE(this,"playerChange"));else if(jE(this.a)||'"onStateChange"'!=a.action)"playlistModified"!=a.action&&"nowPlayingPlaylist"!=a.action||e?(d||"nowPlaying"!=a.action&&"nowPlayingPlaylist"!=a.action?d?d!=jE(this.a)&&(b=!0):d=jE(this.a):(mE(this.a,""),b=!0),e&&(e=e.split(","),nE(this.a,e,d)&&(b=!0))):(nE(this.a,[]),b=!0),this.a.add(d)&&$E(this,"getPlaylist"),d&&mE(this.a,d),b&&KE(this,"playlistChange"),q(g)&&(b=parseInt(g,10),b=isNaN(b)?-1:b,-1==b&&-1E3==this.a.a&&
729 (b=-1E3),0==b&&"0"==h&&(b=-1),c=c||b!=this.a.a,this.a.a=b,d=null,-1E3==b&&(d=this.a.g||"unknown",p&&(d=p.reason||d)),c=c||this.a.g!=d,this.a.g=d,1==this.a.a?(gF(this),this.$k=H(v(this.oo,this),2E4)):gF(this)),"onError"!=a.action||-1!=this.a.a&&-1E3!=this.a.a||(a=mb(a.params.errors)||[],1==a.length&&"PLAYER_ERROR"==a[0].error&&a[0].videoId==jE(this.a)&&(this.a.a=-1E3,this.a.g=a[0].reason||"unknown",c=!0)),h&&(b=parseInt(h,10),kE(this.a,isNaN(b)?0:b),c=!0),q(k)&&(b=parseInt(k,10),isNaN(b)||(c=c||this.a.volume!=
730 b,this.a.volume=b),q(m)&&(m="true"==m,c=c||this.a.muted!=m,this.a.muted=m)),c&&KE(this,"playerChange")}};f.dl=function(){this.j&&!ME(this)?(this.log_("Dropping current screen with id: "+this.j),this.disconnect(),this.a=null):GE(this)||Mg()};function kF(){FE.call(this,"Desktop","youtube-desktop");J(window,"unload",v(this.B,this));J(window,"beforeunload",v(this.B,this))}y(kF,FE);ca(kF);kF.prototype.B=function(){QE(this)};function lF(a,b){this.a=a;this.a.D("onVolumeChange",this.Vh,this);this.a.D("onPlaylistUpdate",this.an,this);this.i=NaN;this.b=b;this.b.D("playerChange",this.bn,this);this.b.D("playlistChange",this.cn,this);this.k=0;this.g={};this.j=new js(this.Ds,1E3,this);L(this,this.j);this.o=0}y(lF,K);f=lF.prototype;
731 f.F=function(){mF(this);this.a.$("onVolumeChange",this.Vh,this);this.a.$("onPlaylistUpdate",this.an,this);this.a=null;this.b.$("playerChange",this.bn,this);this.b.$("playlistChange",this.cn,this);this.b=null};f.Yw=function(a,b){YE(this.b)&&(nF(this)?this.$v.apply(this,arguments):this.aw.apply(this,arguments))};
732 f.aw=function(a,b){var c=Array.prototype.slice.call(arguments,1);switch(a){case "control_toggle_play_pause":case "control_play":case "control_pause":oF(this,this.a.a.getCurrentTime());break;case "control_seek":oF(this,c[0])}};
733 f.$v=function(a,b){var c=YE(this.b),d=Array.prototype.slice.call(arguments,1);switch(a){case "control_toggle_play_pause":1==c.a?pF(this):(eF(this.b),this.a.kb(!0));break;case "control_play":eF(this.b);this.a.kb(!0);break;case "control_pause":pF(this);break;case "control_seek":this.o=d[0];ks(this.j);break;case "control_subtitles_set_track":qF(this,d[0])}};function pF(a){var b=a.b;$E(b,"pause");kE(b.a,lE(b.a));-1E3!=b.a.a&&(b.a.a=2);JE(b,"playerChange");rF(a,lE(YE(a.b)));mF(a);a.a.kb(!1)}
734 f.Ds=function(){var a=this.o,b=YE(this.b);mF(this);rF(this,a);-1==b.a?oF(this,a):(b=this.b,a=Math.floor(a),$E(b,"seekTo",{newTime:a}),kE(b.a,a),-1E3!=b.a.a&&(b.a.a=3),JE(b,"playerChange"))};
735 function qF(a,b){if(nF(a)){var c=a.b,d=a.a.a.getVideoData().L;b?(c.a.b={trackName:b.name,languageCode:b.languageCode,sourceLanguageCode:b.translationLanguage?b.translationLanguage.languageCode:"",languageName:b.languageName,format:b.format,kind:b.kind},d={videoId:d},Ob(d,c.a.b),$E(c,"setSubtitlesTrack",d)):$E(c,"setSubtitlesTrack");JE(c,"playerChange");a.g=YE(a.b).b}}function oF(a,b){bF(a.b,a.a.a.getVideoData().L,"VI",b);var c=a.a;sF(c);tF(c.g)}
736 f.Vh=function(a){if(nF(this)){var b=Math.round(a.volume),c=this.b;a=!!a.muted;var d={volume:b,muted:a};-1!=c.a.volume&&(d.delta=b-c.a.volume);c.a.muted=a;c.a.volume=b;$E(c,"setVolume",d);JE(c,"playerChange")}};f.an=function(){dF(this.b)};
737 f.bn=function(){if(nF(this)){var a=YE(this.b);mF(this);switch(a.a){case 1:uF(this);this.a.kb(!0);break;case 3:var b=this.a;sF(b);tF(b.g);break;case 0:this.a.kb(!1);this.j.stop();b=this.a.a;(b=O(b.app,b.a||1))&&b.ng(!0);rF(this,this.a.a.getVideoData().ta);break;case 2:this.a.kb(!1);rF(this,lE(a));break;case -1:this.a.kb(!1);break;case -1E3:var b=this.a,c=lf("REMOTE_PLAYER_ERROR");sF(b);vF(b.g,c)}0==this.k&&(b=this.a.a,(b=O(b.app,b.a||1))&&b.ng(!1));this.k=a.a;wF(this);b=Math.round(this.a.a.Om());-1!=
738 a.volume&&b!=a.volume&&(this.a.$("onVolumeChange",this.Vh,this),this.a.a.Qm(a.volume),a.muted?this.a.a.Pm():this.a.a.Rm(),this.a.D("onVolumeChange",this.Vh,this))}else this.a.kb(!1)};
739 function wF(a){var b=YE(a.b).b;if(!(b||a.g?b&&a.g&&b.trackName==a.g.trackName&&b.languageCode==a.g.languageCode&&b.languageName==a.g.languageName&&b.format==a.g.format&&b.kind==a.g.kind:1))if(a.g=b){var c=a.a.a.Cj("captions","tracklist",{yy:1}),c=Oa(c,function(a){return a.languageCode==b.languageCode&&a.name==b.trackName});a.a.a.dn("captions","track",c)}else a.a.a.en("captions")}f.cn=function(){nF(this)||(rF(this,0),mF(this),this.a.kb(!1))};
740 function nF(a){var b=YE(a.b);return!!b&&jE(b)==a.a.a.getVideoData().L}function uF(a){mF(a);aF(a.b)||(rF(a,lE(YE(a.b))),a.i=H(v(function(){uF(this)},a),500))}function mF(a){I(a.i);a.i=NaN}function rF(a,b){var c=a.a.a.getVideoData().ta;a.a.u("command_progress",b,b/c,void 0)};function xF(){Z.call(this,["div",["html5-bezel","html5-center-overlay"],["div","{{icon}}"]]);this.a=NaN;this.hide()}y(xF,Z);xF.prototype.hide=function(){xF.C.hide.call(this);yF(this)};xF.prototype.setIcon=function(a){nn(this.template,"icon",a)};xF.prototype.show=function(a){yF(this);a&&this.setIcon(a);xF.C.show.call(this)};function yF(a){I(a.a);W(a.element,"html5-bezel-fade")};function zF(a){Z.call(this,["div","ytp-thumbnail"]);this.a=a}y(zF,Z);
741 zF.prototype.show=function(a){if(a||this.element.childNodes.length){if(a){Xc(this.element);var b=this.element,c=this.a;if(void 0!=Tn("backgroundSize"))d=document.createElement("div"),d.style.backgroundImage="url("+Xn(b,a,c)+")";else{var d=document.createElement("img");d.src=Xn(b,a,c);a=d;b.clientWidth/b.clientHeight<Wn?(a.style.height="100%",a.style.width="auto"):(a.style.height="auto",a.style.width="100%")}V(d,"video-thumbnail");this.element.appendChild(d)}zF.C.show.call(this)}};function AF(a,b,c,d){R.call(this);this.P=d;this.b=this.a=null;this.I=c;this.O=new ao(lf("REMOTE_PLAYER_RECONNECT_TIME"),["formatted_time"]);this.B=new ao(lf("REMOTE_CONNECTED_STATUS"),["receiver_name"]);this.G=new ao(lf("REMOTE_CONNECTING_STATUS"),["receiver_name"]);this.M=new ao(lf("REMOTE_ERROR_STATUS"),["receiver_name"]);this.j=this.G;this.g=this.A=this.k=this.i=null;this.K="";this.o=null;this.k=E("ytp-remote-display-container",b);this.i=E("html5-remote-display-status-bar",b);BF(this);b=E("html5-remote-display-error",
742 b);c=Uc("div");b.appendChild(c);V(c,"html5-remote-display-error-icon");this.A=Uc("div");b.appendChild(this.A);this.g=new En(this.P,"ytp-button-remote-reconnect");this.g.Aa(lf("REMOTE_PLAYER_RECONNECT_BUTTON"));this.g.V(b);this.K=J(this.g,"click",v(this.u,this,"reconnectclicked"));this.o=new zF(a.a.J().qc);this.o.V(this.k);this.o.show(a.a.getVideoData());L(this,this.o);this.a=new xF;this.a.V(this.k);this.a.hide();L(this,this.a);this.b=new Zt;V(this.b.element,"html5-center-overlay");V(this.b.element,
743 "html5-center-transform");this.b.V(this.k);this.b.show();L(this,this.b)}y(AF,R);AF.prototype.F=function(){uf(this.K);this.i.innerHTML="";AF.C.F.call(this);this.o=this.i=this.a=null};function CF(a){a.j=a.G;BF(a);DF(a,!1);a.a.hide();a.b.show()}function tF(a){a.j=a.B;BF(a);DF(a,!1);a.a.hide();a.b.show()}function vF(a,b){a.j=a.M;BF(a);a.a.hide();a.b.hide();a.g.hide();a.A.innerHTML=b;DF(a,!0)}function DF(a,b){X(a.k,"ytp-remote-error",b)}
744 function EF(a,b){vF(a,fo(a.O,{formatted_time:Nn(b/1E3)}));a.g.show()}function BF(a){a.i&&(a.i.innerHTML=fo(a.j,{receiver_name:'<span class="mdx-receiver">'+a.I+"</span>"},void 0,!0))};function FF(a){R.call(this);this.k=this.g="";this.j=null;this.i=a;this.a=this.b=null;GF(this,a)}y(FF,R);FF.prototype.F=function(){uf(this.g);uf(this.k)};function HF(a,b){var c="";z(b,function(a){c+=fo(this.j,{receiver_key:a.key,receiver_name:a.name})},a);a.a.innerHTML=c;hs(Xr.getInstance(),a.i)}function IF(a,b){var c=E("active",a.a);if(c){if(G(c,"value")==b)return;Qm(c,["active","selected"])}(c=a.a.querySelector('[data-value="'+b+'"]'))&&Pm(c,["active","selected"])}
745 function GF(a,b){a.b=is(Xr.getInstance(),b);var c=E("html5-remote-receiver-template",a.b);a.j=eo(c,["receiver_key","receiver_name"]);a.a=E("html5-remote-receivers",a.b);a.a.innerHTML="";a.g=yf(a.b,v(a.o,a),"yt-uix-button-menu-item");a.k=J(b,"click",v(function(){this.u("menushown")},a))}FF.prototype.o=function(a){(a=a.currentTarget)&&"remote-select-receiver"==G(a,"action")&&(a=G(a,"value"),IF(this,a),this.u("selectreceiver",a))};function JF(a){Cx.call(this,a);var b=Q(this.a);this.G=a.S.B;this.k={key:lg(),name:lf("REMOTE_LOCAL_SCREEN")};this.g=this.j=null;this.b=KF(this);this.B=NaN;a=this.b;a.o=eg("yt-remote-delayed-connect-key");if(a.o)a.log_("Connecting with the delayed connect data: "+ob(a.o)),a.connect({key:a.o.key}),fg("yt-remote-delayed-connect-key");else{var c=GE(a);c?c.mb==a.j?a.log_("Skipping connecting because current connection exists."):(a.log_("Resuming MDx session: "+If(c)),LE(a,c),a.g.connect({},0,Fg()),a.a=
746 new hE,UE(a)):(Mg(),a.log_("Skipping connecting because no session screen found."))}this.A=new FF(E("html5-remote-button",b));this.A.D("selectreceiver",this.Aj,this);L(this,this.A);this.i=this.k;this.pg()}y(JF,Cx);var LF=["play_pause","seek"],MF=["captions"];f=JF.prototype;f.qa="remote";f.hd="remote";f.Xa=function(){return this.app.I.J().sg};
747 f.create=function(){JF.C.create.call(this);var a=this.b=KF(this),b=this.Jn;HE(a,b,this);a.D("connectionOpened",b,this);a.D("connectionClosed",b,this);a.D("connectionError",b,this);this.b.i.D("onlineReceiverChange",this.pg,this);this.b.i.D("connectToReceiver",this.Aj,this);this.pg();this.i!=this.k&&3<this.a.app.o&&this.load()};function NF(a){a.b&&(HE(a.b,a.Jn,a),a.b.i.$("onlineReceiverChange",a.pg,a),a.b.i.$("connectToReceiver",a.Aj,a),a.b.b=null,a.b=null)}
748 f.destroy=function(){var a=this.A;bs(Xr.getInstance(),a.i);NF(this);JF.C.destroy.call(this)};
749 f.load=function(){if(!this.ba){JF.C.load.call(this);this.pg();var a=E("html5-remote-module",Q(this.a));this.g=new AF(this,a,this.i.name,this.G);this.g.D("reconnectclicked",this.xm,this);this.j=new lF(this,this.b);qF(this.j,this.a.Cj("captions","track"));this.a.Dj();this.u("command_redirect_controls",this,LF,MF);var b=this.b.o?this.b.o.currentTime:0;0!=b&&H(v(function(){rF(this.j,b)},this),0);YE(this.b)&&!Ta(YE(this.b).yb)&&this.a.rg();this.ba=!0}};
750 f.unload=function(){this.ba&&(this.ba=!1,OF(this,this.k),this.kb(!1),dn(this),this.g.$("reconnectclicked",this.xm,this),sF(this),Tg(this.j,this.g),this.g=this.j=null,JF.C.unload.call(this))};f.F=function(){NF(this);sF(this);Tg(this.j,this.g);this.g=this.j=null;JF.C.F.call(this)};function TE(a){return a.a.vb()?a.a.getVideoData().Oa:""}function RE(a){var b=a.a.vb();if(b){a=[];for(var c=0;c<b.Mb;c++)a[c]=vh(b,c).L;return a}return[a.a.getVideoData().L]}
751 function SE(a){var b=TE(a);if(b){b=b.substr(0,2);a=Km(a.a.vb());for(var c=[],d=0;d<a;d++)c[d]=b;b=c}else b=["VI"];return b}function KF(a){var b=kF.getInstance();b.b=a;return b}f.Jn=function(){sF(this);this.ba&&aF(this.b)?PF(this):YE(this.b)?this.load():this.unload()};f.xm=function(){var a=this.b;aF(a)&&(a=a.g.b,a.Xc&&(a.stop(),a.start(),a.k()));CF(this.g)};f.oe=function(a,b){this.j.Yw.apply(this.j,arguments)};
752 f.Aj=function(a){if(this.i.key!=a)if(this.k.key==a){var b=YE(this.b);a=!!b&&1==b.a&&jE(b)==this.a.getVideoData().L;b=b?lE(b):0;this.i=this.k;this.b.disconnect();this.unload();a&&(this.a.Wh(b),this.a.rg())}else if(a=mg(Ng(),a))OF(this,a),this.b.connect(a),this.load()};function OF(a,b){(a.i||b?a.i&&b&&a.i.key==b.key:1)||(a.i=b,IF(a.A,b.key))}f.pg=function(){var a=Ng();this.b&&(this.i=XE(this.b,a)||this.k);a.unshift(this.k);HF(this.A,a);IF(this.A,this.i.key);this.g&&(a=this.g,a.I=this.i.name,BF(a))};
753 function PF(a){sF(a);aF(a.b)?(EF(a.g,fE(a.b.g)),a.B=H(v(function(){PF(this)},a),1E3)):CF(a.g)}function sF(a){I(a.B);a.B=NaN}f.kb=function(a){sF(this);var b=this.g;b.j=b.B;BF(b);DF(b,!1);b.b.hide();b.a.show();b.a.setIcon(a?"html5-bezel-pause":"html5-bezel-play");JF.C.kb.call(this,a)};function QF(){Z.call(this,["div","html5-video-info-panel",["span","html5-video-info-panel-close",{role:"button",title:"close"},"[x]"],["div","html5-video-info-panel-content",["table","html5-video-info-table",["tr","",["th","","Video ID:"],["td","","{{video_id}}"]],["tr","",["th","","Dimensions:"],["td","","{{dimensions}}"]],["tr","",["th","","Resolution:"],["td","","{{resolution}}"]],["tr","",["th","","Volume:"],["td","","{{volume}}"]],["tr","",["th","","Stream Type:"],["td","","{{stream_type}}"]],
754 ["tr","",["th","","Mime Type:"],["td","","{{mime}}"]],["tr","",["th","","DASH:"],["td","","{{dash}}"]],["tr","",["th","","DRM:"],["td","","{{drm}}"]]],["table",["html5-video-info-table","html5-video-element-info-table"],["tr","",["th","","Decoded Frames"],["th","","Dropped Frames"],["th","","Parsed Frames"],["th","","Presented Frames"]],["tr","",["td","","{{decoded_frames}}"],["td","","{{dropped_frames}}"],["td","","{{parsed_frames}}"],["td","","{{presented_frames}}"]],["tr","",["th","","Video Bytes Decoded"],
755 ["th","","Audio Bytes Decoded"],["th","","Painted Frames"],["th","","Paint Delay"]],["tr","",["td","","{{video_bytes_decoded}}"],["td","","{{audio_bytes_decoded}}"],["td","","{{painted_frames}}"],["td","","{{paint_delay}}"]]]]]);this.a=this.template.a["html5-video-info-panel-close"]}y(QF,Z);QF.prototype.update=function(a){a.dimensions=a.video_element_width+" x "+a.video_element_height;a.resolution=a.video_width+" x "+a.video_height;a.volume+="%";a.drm=a.drm_flavor+" / "+a.drm_key_system;this.template.update(a)};
756 QF.prototype.F=function(){this.a=null;QF.C.F.call(this)};function RF(a){R.call(this);this.app=a;this.aa=this.U=this.b=this.P=this.g=this.a=this.ja=null;this.Na=this.Ta=0;this.pa=this.Q=null;a=a.J();this.Sa=ok()||"blazer"==a.Ca;this.za=0;this.j=null;this.vk()}y(RF,R);var SF=null;f=RF.prototype;f.vk=function(){this.app.D("videodatachange",this.Jl,this)};f.Qj=function(){var a=Jc(this.ja);(a=Om(a,"html5-video-player")?a:E("html5-video-player",a))||(a=SF||E("html5-video-player"));if(!a)return!1;TF(this,a);this.u("templateready");return!0};
757 function TF(a,b){SF=b.cloneNode(!0);a.a=b;a.a.setAttribute("id",a.app.K.attrs.id);var c=Jc(a.ja);c!=a.a&&c.appendChild(a.a);(c=Jc("html5-player-messages"))&&z(c.children,function(a){try{var b=JSON.parse(a.innerHTML);kf(a.id,b)}catch(c){kf(a.id,a.innerHTML)}})}f.addClass=function(a){Pm(this.a,arguments)};f.removeClass=function(a){Qm(this.a,arguments)};
758 f.sj=function(){var a=this.app.J(),b=this.a;this.addClass("el-"+a.Y);this.addClass("ps-"+a.Ca);X(b,"html5-native-controls",a.Vb);X(b,"html5-mobile",a.qc);a.xe||this.addClass("html5-chromeless");a.ub||this.addClass("tag-pool-enabled");b.style.display="";this.g=E("html5-video-container",b);this.U=E("html5-video-content",b);this.aa=E("html5-video-controls",b);this.j=new QF;this.j.V(b);J(this.j.a,"click",v(this.uk,this));L(this,this.j);this.Sa?this.Q=J(window,"resize",v(this.Ji,this)):this.Q=gf(v(this.Ji,
759 this),250)};f.Ji=function(){this.P&&zb(UF(this),this.P)||this.uf()};f.uf=function(){if(this.b){var a=UF(this);if(!a.isEmpty()){var b=VF(this),c=UF(this),d=1,e=WF(this);if(e){var g=XF(this,c,b,e,!1),d=g.width/g.height/Ab(b);zd(this.b,g.width/d,g.height);od(this.b,g.left+g.width/2*(1-1/d),g.top)}else zd(this.b,c),od(this.b,0,0);b=XF(this,c,b,e,!0);zd(this.U,b.width,b.height);od(this.U,b.left,b.top);Un(this.b,"transform",1==d?"none":"scaleX("+d+")");this.P&&zb(a,this.P)||(this.P=a,this.Al(a));this.u("resize")}}};
760 f.Al=function(){};f.Pj=function(){};f.Jl=function(a,b){this.b.setAttribute("data-youtube-id",b.L);aj&&(b.title?this.b.setAttribute("title",b.title):this.b.removeAttribute("title"));b.Bl&&(this.b.poster=b.Bl);var c=xm(b,"yt:bgcolor");this.g.style.backgroundColor=c?c:"";this.Ta=ul(xm(b,"yt:stretch"));this.Na=ul(xm(b,"yt:crop"))};f.Kj=function(){};f.zp=function(){};f.Go=function(){};function UF(a){return a.g?new B(a.g.clientWidth,a.g.clientHeight):new B(0,0)}
761 function VF(a){return a.b?new B(a.b.videoWidth,a.b.videoHeight):new B(0,0)}function XF(a,b,c,d,e){c.isEmpty()?e=b:d?(c=new B(a.Ta||Ab(c),1),a=new B(a.Na||Ab(c),1),Bb(a,c),d=Ab(a)>Ab(b)?b.width/a.width:b.height/a.height,e=e?a.scale(d):c.scale(d)):e=Bb(c.clone(),b);return new Cb((b.width-e.width)/2,(b.height-e.height)/2,e.width,e.height)}function WF(a){return!a.app.J().Vb&&!VF(a).isEmpty()}function Aw(a,b){var c=a.aa;c.insertBefore(b,c.childNodes[0]||null)}f.Lj=function(){};
762 function Ah(a){a.j&&(a.j.show(),a.Dp(),hf(a.za),a.za=gf(v(a.Dp,a),500))}
763 f.Dp=function(){var a=O(this.app),b=this.app.getVideoData(),c=this.app.uj(),d=this.b,c={video_id:b.L,video_width:d.videoWidth,video_height:d.videoHeight,video_element_width:d.clientWidth,video_element_height:d.clientHeight,dash:"no",mime:"",drm_flavor:"",drm_key_system:"",volume:Math.round(this.app.wa.volume),stream_type:this.app.J().protocol,decoded_frames:c.hmewdfc||c.hmemdf||"-",dropped_frames:c.hmewdrop||"-",parsed_frames:c.hmempf||"-",presented_frames:c.hmempresented||"-",video_bytes_decoded:c.hmewvdbc||
764 "-",audio_bytes_decoded:c.hmewadbc||"-",painted_frames:c.hmempainted||"-",paint_delay:c.hmempaintdelay||"-"};b.a&&(c.dash=b.a.i&&b.a.b?"no":"yes",c.mime=b.a.lb);if(a=a.I?a.I.g:null)c.drm_flavor=a.b,c.drm_key_system=a.a;this.j.update(c)};f.uk=function(a){a&&a.stopPropagation();this.j&&(hf(this.za),this.j.hide())};f.F=function(){this.Q&&(this.Sa?uf(this.Q):hf(this.Q));this.pa&&uf(this.pa);this.uk();this.j&&zf(this.j.a);F(this.a);this.aa=this.U=this.b=this.g=this.a=this.ja=null;RF.C.F.call(this)};function YF(){this.a=[];this.b=[]}ca(YF);var Dn=n("yt.player.utils.VideoTagPool.instance_")||YF.getInstance();pa("yt.player.utils.VideoTagPool.instance_",Dn);f=YF.prototype;f.py=function(a){if(!(this.a.length>=a)){a-=this.a.length;for(var b=0;b<a;b++){var c=ZF(this);this.a.push(c)}}};
765 function ZF(a){var b=document.createElement("video");w(b,fj);J(b,"loadeddata",v(b.Xv,b));J(b,"volumechange",v(b.Yv,b));J(b,"timeupdate",v(b.kp,b));Ri&&6<=Wi&&J(b,"webkitbeginfullscreen",v(b.play,b));gj(b);if(a.b.length){var c=a.b[0],d=c.muted;b.volume=100*c.volume/100;b.muted=d}a.b.push(b);J(b,"volumechange",v(a.Zv,a));return b}f.Zv=function(a){a=a.target;var b=a.volume,c=a.muted;z(this.a,function(a){a.volume=b;a.muted=c})};f.wy=function(){return this.a.length?this.a.pop():ZF(this)};
766 f.uy=function(a){a&&Sa(this.b,a)&&(mj(a),zf(a),Wa(this.b,a))};f.ry=function(a){return this.a.length>=(a||1)};YF.prototype.fillPool=YF.prototype.py;YF.prototype.getTag=YF.prototype.wy;YF.prototype.releaseTag=YF.prototype.uy;YF.prototype.hasTags=YF.prototype.ry;function $F(a,b){var c,d;d||(d=0);c||(c=sd(document.body));Nr(new A(b.pageX,b.pageY),a,d,null,c,5)};function aG(){this.a=new Uo(this)}y(aG,K);f=aG.prototype;f.Yj=null;f.Ge=null;f.Zj=null;f.Ui=null;f.He=null;f.vs=function(){this.hide()};f.ws=function(a){a.stopPropagation()};f.hide=function(){Sn(this.He);Lr("panelhidden")};f.xs=function(a){27==a.keyCode&&this.hide()};f.hn=function(){this.Ge.select()};f.show=function(){Rn(this.He)};f.F=function(){this.a.removeAll();this.Ge=this.Yj=this.Zj=this.He=null;aG.C.F.call(this)};function bG(a){this.W=a;this.W.D("internalvideodatachange",this.Tn,this);this.g=new Uo(this);this.a=new Uo(this);this.b=new aG;L(this,this.b)}y(bG,K);f=bG.prototype;f.$b=null;function cG(a,b,c){for(var d=Kc(On[b],a.$b),e=0;e<d.length;e++)Vo(a.g,d[e],"down",function(a){c.call(this,a);this.hide(a);a=b.replace("CONTEXT_MENU_","").toLowerCase();dG(this.W,"contextmenu."+a)})}f.Tn=function(a,b){var c=E("html5-context-menu-copy-embed-html",this.$b);Pn(c,b.Ao)};f.jn=function(a){a=ph(this.W,a);eG(this,a,"URL")};
767 f.zs=function(){var a=cf("EMBED_HTML_TEMPLATE"),b=cf("EMBED_HTML_URL"),c=Tx(this.W.J()),d=this.W.getVideoData().L,b=b.replace(/__videoid__/g,d),a=a.replace(/__url__/g,va(b)),a=a.replace(/__width__/g,c.width),a=a.replace(/__height__/g,c.height);eG(this,a,"Text")};function eG(a,b,c){window.clipboardData&&window.clipboardData.setData(c,b)||(a=a.b,Qn(a.He)&&a.hide(),a.Ui&&W(a.He,a.Ui),a.Ui="html5-modal-panel-clipboard-substitute",V(a.He,a.Ui),a.show(),a.Ge.value=b,a.Ge.focus(),H(v(a.hn,a),100))}
768 f.As=function(a){fG(this.W,a.target.getAttribute("href"))};
769 f.Bs=function(){var a=this.W.getVideoData(),b=this.W.J(),c=Tx(b),d=Bw(b),e=wm(a),e=e?hj(e):"",c={cr:b.U,csipt:a.Nc,ec:108,feature:b.j,h:d.height,hl:b.i,playerh:c.height,playerw:c.width,ptk:a.A,referrer:b.referrer,screenh:window.screen.height,screenw:window.screen.width,sdetail:a.ja,shost:Ij(e),sourceid:a.te,vid:b.aa,vq:b.Kh,w:d.width};w(c,this.W.uj());(d=O(this.W))&&w(c,Fz(d,!0));c.videoId&&(c.v=c.videoId,delete c.videoId);b.qc&&(c.mobile="1");this.W.tf("streamingerror",c);window.open(Vx(a))};
770 f.ys=function(){eG(this,qh(this.W,!0),"Text")};f.Cs=function(){Ah(this.W.S)};f.uu=function(a){a.preventDefault();Qn(this.$b)?a.stopPropagation():($F(this.$b,a),Rn(this.$b),this.a.listen(this.$b,"contextmenu",function(a){a.preventDefault()}),a=v(function(){this.a.listen(window,"blur",this.hide);Vo(this.a,document,"down",this.hide)},this),H(a,0),this.a.listen(document,"keydown",this.Gv))};f.Gv=function(a){27==a.keyCode&&this.hide(a)};f.hide=function(a){Sn(this.$b);this.a.removeAll();a&&a.stopPropagation()};
771 f.F=function(){this.g.removeAll();this.a.removeAll();this.W.$("internalvideodatachange",this.Tn,this);this.W=null;F(this.$b);this.$b=null;bG.C.F.call(this)};function gG(a,b){In.call(this,a,b);this.o=null;this.B=this.G=this.i=this.b=0;V(this.element,"ytp-tv-static");hG(this,a,b)}y(gG,In);function iG(a){for(var b=Math.floor(0.6*a),c=b;c<a;++c){for(var d=!1,e=2;e<Math.sqrt(c);e++){if(!(c%e)){d=!1;break}d=!0}if(d)return c}return b}
772 function hG(a,b,c){if(b&&c){a.width=a.element.width=b;a.height=a.element.height=c;var d=document.createElement("canvas");d.width=b;d.height=c;for(var e=d.getContext("2d"),g=e.getImageData(0,0,b,c),h=b*c,k=0;k<h;k++){var m=4*k;g.data[m]=g.data[m+1]=g.data[m+2]=Math.floor(35*Math.random());g.data[m+3]=255}e.putImageData(g,0,0);a.o=d;a.G=iG(b);a.B=iG(c/10);a.Z.scale(1.5,1.5)}}gG.prototype.show=function(){gG.C.show.call(this);var a=this.I;this.j=new Date;this.g(a,75)};
773 gG.prototype.I=function(){var a=1-1/1.5;this.b=(this.b+this.G)%(this.width*a);this.i=(this.i+this.B)%(this.height*a);this.Z.drawImage(this.o,-1*this.b,-1*this.i)};gG.prototype.hide=function(){I(this.a);gG.C.hide.call(this)};function jG(){Z.call(this,["div",["ytp-error","html5-stop-propagation"],["div","ytp-error-content",["div","ytp-error-content-wrap","{{content}}"]]]);this.H="table";this.b=[];if(void 0==kl){var a=document.createElement("canvas");kl=!(!a.getContext||!a.getContext("2d"))}kl&&(this.a=new gG(1,1),this.a.V(this.element,0),L(this,this.a))}y(jG,Z);jG.prototype.show=function(){jG.C.show.call(this);kG(this);this.a&&this.a.show()};jG.prototype.hide=function(){jG.C.hide.call(this);this.a&&this.a.hide()};
774 function kG(a){a.a&&hG(a.a,a.element.clientWidth,a.element.clientHeight)}jG.prototype.F=function(){uf(this.b);this.b=[];jG.C.F.call(this)};function lG(){this.b=this.a=null}lG.prototype.getMsg=function(a,b,c){return lf(a,b,c)};function fu(a,b,c,d){a.a&&mG(a.a,b,c,d)};function nG(a,b){var c;var d="followon_"+a;if(b.baseUrl&&b.uid){var e=b.rmktEnabled;c=b.focEnabled&&!b.isAd;if(e||c){d={label:c?d:"default"};if(e){e={utuid:b.uid,type:a};b.vid&&(e.utvid=b.vid);b.eventLabel&&(e.el=b.eventLabel);b.playerStyle&&(e.ps=b.playerStyle);b.feature&&(e.feature=b.feature);b.ppe&&(e.ppe=b.ppe);var g,h=[];for(g in e)h.push(encodeURIComponent(g)+"="+encodeURIComponent(e[g]));g=h.join(";");d.data=g}c&&"view"==a&&b.vid&&b.uid&&(b.oeid||b.ieid)&&(b.oeid&&(d.oeid=b.oeid),b.ieid&&(d.ieid=
775 b.ieid),d.evid=b.vid);c&&(d.foc_id=b.uid);c=S(b.baseUrl,d)}else c=null}else c=null;c&&Qg(c)}function oG(a){var b=cf("CONVERSION_CONFIG_DICT");if(b){if(u(void 0)){var c=24==(void 0).length&&"UC"==(void 0).slice(0,2)?(void 0).substr(2):22==(void 0).length?void 0:null;if(b.uid!=c)return}nG(a,b)}};function pG(a,b,c){c=c||{};Wj("watch_actions_ajax",c.Ea,c.Ua,v(qG,l,a,b,c),c.onError)}
776 function qG(a,b,c){var d={};0===b?d.action_like_video=1:1===b?d.action_dislike_video=1:d.action_indifferent_video=1;d.video_id=a;d.plid=c.eb;c.Oa&&(d.list=c.Oa);c.Ea&&(d.authuser=c.Ea);c.Ua&&(d.pageid=c.Ua);a={screen:Hj({h:screen.height,w:screen.width,d:screen.colorDepth}),session_token:ef("watch_actions_ajax")};c.px&&(a.station_id=c.px);Qj("/watch_actions_ajax",{format:"XML",method:"POST",yf:d,Mf:a,Qa:c.Qa,onError:c.onError,rd:c.rd});0===b?oG("like"):1===b&&oG("dislike")};function rG(a,b,c,d,e){if(Om(c,"html5-async-progress"))return null;X(c,"sentiment-like",b);X(c,"sentiment-dislike",!b);if(!a)return null;ru(c,"html5-async-progress");c={eb:a.eb,Qa:function(a){return function(){ru(a,"html5-async-success")}}(c),onError:function(a){return function(){ru(a)}}(c)};d&&(c.authUser=d);e&&(c.pageId=e);pG(a.L,b?0:1,c);cf("CONVERSION_CONFIG_DICT")||nG(b?"like":"dislike",a.i);return b?0:1};function sG(a,b,c){du.call(this,a,c.J(),b);this.W=c}y(sG,du);f=sG.prototype;f.Wj=function(){sG.C.Wj.call(this);this.gb.listen(this.b.b,"click",this.dv);this.gb.listen(this.b.a,"click",this.cv);this.W.D("presentingplayerstatechange",this.Eo,this)};f.update=function(a){sG.C.update.call(this,a);"watch_actions_ajax"in Ze&&!this.W.g?(a=this.b,a.b.show(),a.a.show()):(a=this.b,a.b.hide(),a.a.hide())};f.di=function(a){var b=Dc(this.a,"show-share");this.u("share-click");b||sG.C.di.call(this,a)};
777 f.En=function(a){this.u("title-click",a)};f.kk=function(){var a=Dc(this.a,"show-more-info");this.u("info-click");if(a)this.B&&this.W.Ud();else{sG.C.kk.call(this);var b=Ch(this.W);this.B=P(b,8)&&!P(b,2);this.W.Td()}return!a};f.dv=function(){tG(this,!0)};f.cv=function(){tG(this,!1)};f.Eo=function(a){P(a.state,8)&&W(this.a,"show-more-info")};function tG(a,b){var c=rG(a.ka,b,a.a,a.g.Ea,a.g.Ua);null!=c&&(0==c?a.b.o():a.b.j(),a.W.u("RATE_SENTIMENT",c))}f.Mi=function(a){fG(this.W,a)};
778 f.F=function(){this.W.$("presentingplayerstatechange",this.Eo,this);this.W=null;sG.C.F.call(this)};function uG(a,b,c,d,e,g,h,k){this.j=[];z(lb(b),function(b){this.j.push(J(a,b,v(this.Sq,this)))},this);z(lb(d),function(b){this.j.push(J(a,b,v(this.Rq,this)))},this);this.k=g||null;this.B=c;this.A=h||0;this.g=0;this.i=!1;this.H=e;this.o=k||0;this.a=0;this.b=!1}f=uG.prototype;f.Sq=function(a){I(this.a);this.a=0;this.g=H(v(this.mv,this,a),this.A)};f.Rq=function(a){I(this.g);this.g=0;this.a=H(v(this.lv,this,a),this.o)};f.mv=function(a){this.b||this.i||(this.i=!0,this.B.call(this.k||l,a))};
779 f.lv=function(a){!this.b&&this.i&&(this.i=!1,this.H.call(this.k||l,a))};f.dispose=function(){this.b=!0;I(this.g);I(this.a);uf(this.j)};f.ha=function(){return this.b};var vG=null,wG=null;function xG(){Z.call(this,["div","ytp-tooltip",["div","ytp-tooltip-body",["div","ytp-tooltip-content","{{content}}"]],["div","ytp-tooltip-arrow"]]);this.a=this.template.a["ytp-tooltip-body"];this.b=this.template.a["ytp-tooltip-content"]}y(xG,Z);xG.prototype.hide=function(){xG.C.hide.call(this);od(this.a,0)};function yG(a,b){X(a.b,"ytp-tooltip-content-text",!b.tagName);nn(a.template,"content",b)}xG.prototype.F=function(){Xc(this.b);this.b=this.a=null;xG.C.F.call(this)};function zG(a,b){this.a={};this.xl=a;this.ap=b}y(zG,K);
780 function Fn(a,b,c){var d,e=new uG(b,"mouseover",function(){if(this.xl){var a=new xG;a.V(this.xl);d=a}else d=null;if(d&&(a=c&&c(b),!c||a)){a?yG(d,a):(a=G(b,"tooltip")||"",yG(d,Vc(a)));var e=!!G(b,"tooltip-below"),a=d,k=Bd(b),k=new A(k.width/2,e?k.height:0),m=td(b),k=new A(m.x+k.x,m.y+k.y),e=!!e;X(a.element,"ytp-tooltip-below",e);if(m=rd(a.element))var p=td(m),s=Id(m),k=xb(k,new A(p.x+s.left,p.y+s.top));Nr(k,a.element,e?1:0);a.show();var s=Bd(a.a),e=-1*(s.width/2),r=Oc(window),D=Pc(document),k=D.x,
781 r=r.width+D.x,D=k,M=r;m&&(m=Bd(m),D=p.x,M=m.width+p.x);m=td(a.a);p=m.x+e;m=m.x+s.width+e;p<Math.max(k,D)?e-=p-Math.max(k,D):m>Math.min(r,M)&&(e-=m-Math.min(r,M));od(a.a,e)}},["mouseout","mousedown"],function(){d&&(d.hide(),Sg(d),d=null)},a,10,50);a.a[ja(b)]=e}
782 function mG(a,b,c,d){Fn(a,b,function(){var a=this.ap,b;if(a&&a.Ol){b=a.Ol;var h=a.Gp;vG||(vG=new ao(lf("YTP_TOOLTIP_IDENTITY")),wG=new ao(lf("YTP_TOOLTIP_IDENTITY_WATCH_LATER")));a=Uc("div");V(a,"ytp-identity-tooltip");var k=Uc("img");k.src=h;var h=Uc("span"),m=null;d?(V(h,"ytp-idt-watch-later"),m=[Vc(fo(wG,{user_name:""})),Uc("br"),Vc(b)]):m=Vc(fo(vG,{user_name:b}));Wc(h,m);Wc(a,k,h);b=a}else b=c;return b})}
783 zG.prototype.F=function(){this.ap=this.xl=null;for(var a in this.a)Sg(this.a[a]);this.a={};zG.C.F.call(this)};function AG(a,b){this.k=a;this.i=[];this.o=b;this.j=[]}y(AG,K);function BG(a,b,c){a.i.push(a.k.D(b,c,a))}function CG(a,b,c){a.j.push(a.o.D(b,c,a))}function DG(a){for(var b=0;b<a.i.length;b++)a.k.Wc(a.i[b]);for(b=0;b<a.j.length;b++)a.o.Wc(a.j[b])}AG.prototype.F=function(){DG(this)};function EG(a,b){AG.call(this,a,b);this.g=!1;this.b=a;this.a=b;var c=a.J();c.color&&V(this.a.i,c.color);if(c.Kg){var d=this.a,e=E("html5-progress-tooltip",d.g);d.b=new Ru;var g=d.b;g.Hb=e;g.Lh=E("html5-progress-tooltip-arrow",g.Hb);g.fk=E("html5-progress-tooltip-thumbnail",g.Hb);g.wj=E("html5-progress-tooltip-timestamp",g.Hb);L(d,d.b);d=this.a;d.a=new Nu;d.a.V(d.g);Vo(d.k,d.a.N(),"down",d.Gs);d.a.hide();L(d,d.a)}c.Lg&&(c=this.a,d=E("html5-storyboard",c.g),c.o=new Ju,e=c.o,g=c.bb.b.a?new B(c.bb.b.a.clientWidth,
784 c.bb.b.a.clientHeight):new B(0,0),e.yd=d,e.Je=g.width,e.ac=E("html5-storyboard-filmstrip",e.yd),e.Yh=E("html5-storyboard-lens",e.yd),e.dk=E("html5-storyboard-lens-thumbnail",e.yd),e.ek=E("html5-storyboard-lens-timestamp",e.yd),e.Ag=E("html5-storyboard-thumbnail",e.ac),F(e.Ag),L(c,c.o));FG(this)}y(EG,AG);
785 function FG(a){DG(a);a.g=!0;BG(a,"cuerangesadded",a.Cw);BG(a,"cuerangesremoved",a.Dw);BG(a,"cuerangemarkersupdated",a.Bw);BG(a,"presentingplayerstatechange",a.Iw);BG(a,"progresssync",a.Jw);BG(a,"resize",a.Fw);BG(a,"seekto",a.Gw);BG(a,"videodatachange",a.Kw);BG(a,"videoplayerchange",a.yp);BG(a,"videoready",a.Hw);CG(a,"beginseeking",a.Aw);CG(a,"endseeking",a.Ew);CG(a,"seekto",a.zw)}f=EG.prototype;f.Cw=function(a){var b=O(this.b).getVideoData();!b||0>=b.ta||GG(this,a,b)};
786 function GG(a,b,c){var d=c.ta;z(b,function(a){a.Uc&&dv(this.a,a.start/(1E3*d))},a)}f.Dw=function(a){var b=O(this.b).getVideoData();if(b&&!(0>=b.ta)){var c=b.ta;z(a,function(a){a.Uc&&ev(this.a,a.start/(1E3*c))},this)}};f.Bw=function(a){var b=O(this.b).getVideoData();!b||0>=b.ta||z(a,function(a){var d=a.start/(1E3*b.ta);a.Uc?dv(this.a,d):ev(this.a,d)},this)};f.Fw=function(a){if(this.a.o){var b=this.a.o;b.Zc&&(b.Je=a.width,Lu(b,!0))}};
787 f.Gw=function(a){bv(this.a,a);if(this.a.o){var b=this.a.o;if(b.Zc){b.Ik=b.gl*a-b.Je/2;od(b.ac,-1*b.Ik);var c=al(b.Zc,a);Ku(b,c);ad(b.ek,Nn(b.Te*a));ks(b.a)}}};f.Iw=function(a){if(0>Ro(a,16)){a=this.a;var b=this.b.getCurrentTime();a.Ta.innerHTML=Math.floor(100*a.ya)+"% at "+Math.floor(b)+" of "+Math.floor(a.B)+" seconds"}};f.yp=function(a){1!=a.B?this.g&&(DG(this),this.g=!1,BG(this,"videoplayerchange",this.yp)):this.g||FG(this)};
788 f.Kw=function(a,b,c){"newdata"==a&&(bv(this.a,(b.xa||0)/b.ta,0),a=this.a,Xc(a.va),a.K={},(c=O(this.b,c))&&GG(this,c.A.i||[],b),this.a.b&&this.a.b.reset());this.a.Va(b.ta);this.a.b&&this.a.b.Va(b.ta);this.a.o&&this.a.o.Va(b.ta);c=this.a;c.ia=b.Jj;cv(c);c=this.a;c.aa=b.Im;cv(c)};
789 f.Hw=function(a){if(this.a.b){var b=this.a.b;if(!b.ki)if(ym(a)){V(b.Hb,"with-thumbnail");b.Jg=ym(a);b.ih=zm(a);var c=v(b.Uu,b);b.ih.D("l",c)}else b.reset()}if(this.a.o&&(b=this.a.o,b.Ag&&Xc(b.ac),W(b.yd,"enabled"),b.Zc=ym(a),b.Qe=zm(a),b.Zc&&!b.Fo)){V(b.yd,"enabled");a=v(b.Bo,b);b.Qe.D("l",a);Lu(b);a=b.ac.cloneNode(!0);for(var c=b.Zc.a[0].b,d,e,g=0;g<c;g++)e=b.Ag.cloneNode(!1),d=Al(b.Qe,g,b.Ob),Iu(e,d,b.Ob,b.Ki),a.appendChild(e);c=b.ac;(d=c.parentNode)&&d.replaceChild(a,c);b.ac=a}};
790 f.Jw=function(a,b,c){bv(this.a,b,c)};f.Aw=function(){Cz(this.b.b)};f.Ew=function(){this.b.b.ti()};f.zw=function(a,b){Wg(this.b,a,b)};function HG(a,b){AG.call(this,a,b);BG(this,"applicationplayerstatechange",this.Ts);BG(this,"controlsdisabled",this.Vs);BG(this,"controlsenabled",this.Ws);BG(this,"liveviewshift",this.Zs);BG(this,"fullscreentoggled",this.Ys);BG(this,"presentingplayerstatechange",this.Dt);BG(this,"progresssync",this.Et);BG(this,"threedenabled",this.qt);BG(this,"videodatachange",this.Ft);BG(this,"onPlaybackQualityChange",this.jt);BG(this,"onVolumeChange",this.tt);BG(this,"menu_add",this.$s);BG(this,"menu_remove",this.ct);
791 CG(this,"fullscreentoggled",this.Xs);CG(this,"mutetoggled",this.dt);CG(this,"nextvideo",this.ft);CG(this,"playpausetoggled",this.gt);CG(this,"previousvideo",this.ht);CG(this,"qualitychanged",this.kt);CG(this,"sizechangerequested",this.lt);CG(this,"speedchanged",this.nt);CG(this,"volumechanged",this.ut);CG(this,"watchlater",this.Ct);CG(this,"watchonyoutube",this.vt);CG(this,"controlclick",this.Us);this.a=a;this.b=b;this.g=new EG(a,b.ok);L(this,this.g);var c=a.J();if(c.Ma){var d=this.b;d.Sc=new qv(d.b);
792 L(d,d.Sc);var e=d.wd;e.parentNode&&e.parentNode.insertBefore(d.Sc.N(),e.nextSibling);F(d.Ee);F(d.Yd);F(d.wd);Zc(d.xb).appendChild(d.xb);d.wb=new Du;L(d,d.wb);d.wb.hide();d.wb.V(d.qf);d.a.listen(d.Sc,"click",d.zt);d.zc=new kv(d.b);L(d,d.zc);d.zc.listen("change",d.xt,d);d.Fd=new rv(d.b);L(d,d.Fd);d.Fd.listen("change",d.At,d);d.Gd=new sv(d.b);L(d,d.Gd);d.Gd.listen("change",d.Bt,d)}c.tc&&(d=this.b,e=this.a.J().Rd,d.Fd?(d.Fd.Ya(e?1:0),d.wb.add(d.Fd)):(Rn(d.Ee),Rn(d.Yd)));c.Fh&&this.b.i.show();c.lg&&(d=
793 this.b,e=this.a.a.lg?dh:[1],d.Gd?(tv(d.Gd,e),d.wb.add(d.Gd)):Rn(d.wf));if(c.Sa)for(c=this.b,d=[c.Ec,c.yc,c.vf,c.g,c.wd,c.xb,c.xg,c.i,c.Ee,c.Yd,c.Sc],e=0;e<d.length;e++)c.a.listen(d[e],"click",c.wt)}y(HG,AG);f=HG.prototype;f.Vs=function(a){this.b.disable(a)};f.Ws=function(a){this.b.enable(a)};f.Zs=function(a){X(this.b.g.element,"ytp-time-live-dvr",!a)};
794 f.Ys=function(a){var b=this.b,c=this.a.J().Rd;if(a){var d=b.i;Gn(d,"ytp-button-fullscreen-exit");var e=d.g.getMsg("YTP_BUTTON_FULLSCREEN_EXIT");d.Jb(e);d.a=e}else Cu(b.i);b.Fd&&b.Fd.Ya(a?-1:c?1:0)};f.Dt=function(a){P(a.state,2)||(0<Ro(a,8)?Ev(this.b,!0):0>Ro(a,8)?Ev(this.b,!1):0>Ro(a,2)&&Ev(this.b,P(a.state,8)));0>Ro(a,16)&&IG(this,this.a.getCurrentTime())};f.Ts=function(a){if(P(a.state,2)){a=this.b.Ec;Gn(a,"ytp-button-replay");var b=a.g.getMsg("YTP_BUTTON_REPLAY");a.Jb(b);a.a=b}};
795 f.qt=function(){var a=this.b,b=this.a.getVideoData().If,c=E("html5-threed-conversion-on",a.Xh),a=E("html5-threed-conversion-off",a.Xh);Pn(c,!b);Pn(a,b)};f.Ft=function(a,b){if(1==O(this.a).B){"newdata"==a&&(IG(this,b.xa||0),ru(this.b.xb),Gv(this.b,"1.0"));this.b.Va(b.ta);Bv(this.b,um(b));var c=this.b,d=b.Fb,e=b.cb;c.Xn=d&&!e;c=c.g;X(c.element,"ytp-time-liveonly",d&&!e);X(c.element,"ytp-time-live",d&&e);this.a.g&&"detailpage"!=this.a.J().Y?this.b.Ne.show():this.b.Ne.hide()}};
796 f.jt=function(a){1==O(this.a).B&&Cv(this.b,a,JG(this.a))};
797 f.tt=function(a){var b=this.b,c=a.volume;a=a.muted;Oe(b.yc,"value",a||0==c?"off":20>c?"min":40>c?"quiet":60>c?"normal":80>c?"loud":"max");Oe(b.yc,"volume",c);var d=b.cc.clientWidth-6,e=b.cc.style.backgroundPosition.split(" "),e=1<e.length?e[1]:"0px";if(a)b.cc.style.backgroundPosition="-"+d+"px "+e,b.Cg.style.left="0px";else{var g;0>=c?g=0:100<=c?g=d:(g=(d-0)*c/100,g=0>=g?0:g>=d?d:0+Math.round(g));b.Cg.style.left=g+"px";b.cc.style.backgroundPosition="-"+(d-g)+"px "+e}c=Math.round(c);d=c+"% "+lf("HTML5_VOLUME_SETTING")+
798 (a?" "+lf("HTML5_VOLUME_MUTED"):"");b.vf.setAttribute("aria-valuenow",c);b.vf.setAttribute("aria-valuetext",d);c=b.yc;d=G(c,a?"tooltip-alt":"tooltip-default")||"";Oe(c,"tooltip",d);c.setAttribute("aria-label",d);b.yc.setAttribute("aria-label",(a?lf("HTML5_VOLUME_UNMUTE"):lf("HTML5_VOLUME_MUTE"))+" "+lf("HTML5_CONTROL_TOGGLE"))};f.$s=function(a){var b=this.b;b.wb&&b.wb.add(a)};f.ct=function(a){var b=this.b;b.wb&&b.wb.remove(a)};f.Et=function(a){IG(this,a)};f.Xs=function(){KG(this.a,!this.a.J().ob)};
799 f.dt=function(){this.a.wa.muted?Yg(this.a):Xg(this.a)};f.ft=function(){sh(this.a)};f.gt=function(){LG(this.a)};f.ht=function(){th(this.a)};f.kt=function(a){"auto"==a&&Cv(this.b,eh(this.a),a);"auto"==JG(this.a)&&Cv(this.b,a,a);var b=O(this.a,1);b&&fh(b,"m",a)};f.lt=function(a){var b=this.a;KG(b,!1);a!=b.a.Rd&&(b.a.Rd=a,b.u("SIZE_CLICKED",a),b.S.Ji())};f.nt=function(a){ch(this.a,a)};f.ut=function(a){MG(this.a,a)};f.vt=function(){fG(this.a,ph(this.a,!0))};f.Us=function(a){dG(this.a,a)};
800 f.Ct=function(){Wj("addto_ajax",this.a.J().Ea,this.a.J().Ua,v(this.Av,this),v(this.Yo,this))};
801 f.Av=function(){var a={uv:"WL",yb:this.a.getVideoData(1).L,Ea:this.a.J().Ea,Ua:this.a.J().Ua,Qa:this.vv,onError:this.Yo,Z:this},b={video_ids:a.yb,playlist_id:a.Oa||"",full_list_id:a.Ay||"",new_playlist_name:a.wv||"",session_token:ef("addto_ajax")},c=cf("PLAYBACK_ID");c&&(b.plid=c);c={};a.privacy&&(c.privacy=a.privacy);a.sv&&(c.feature=a.sv);a.Ea&&(c.authuser=a.Ea);a.Ua&&(c.pageid=a.Ua);var d="";switch(a.uv){case "PL":d=a.wv?"action_add_to_new_playlist":"action_add_to_playlist";break;case "FL":d="action_add_to_favorites";
802 break;case "WL":d="action_add_to_watch_later_list"}c[d]=1;Qj("/addto_ajax",{rv:!0,format:"XML",method:"POST",yf:c,Mf:b,Z:a.Z,onError:a.onError,Qa:a.Qa})};f.vv=function(){ru(this.b.xb,"html5-async-success");this.a.u("WATCH_LATER")};f.Yo=function(a,b){var c=this.b.xb,d=b&&b.error_message;ru(c,"html5-async-error");if(d){var e=Kt.getInstance(),g=Mt(c);Ot(c,d);Lt(e,c);Wr(c,g)}};function IG(a,b){1==O(a.a).B&&nn(a.b.g.template,"current",Nn(b))};var NG={0:"autohide-off",1:"autohide-on",2:"autohide-fade",3:"autohide-auto",4:"autohide-embeds",5:"autohide-seekbar"};function OG(a){RF.call(this,a);this.O=this.o=this.M=this.Ma=this.A=this.ga=this.fa=this.X=this.I=this.G=this.k=this.i=null;this.va=!1;this.ma=this.B=null;this.Ka=!0;this.ya=this.K=!1;a=this.app.J().Gb?4E3:3E3;this.ia=new Xo(this.hk,a,this);L(this,this.ia);this.ia.start()}y(OG,RF);f=OG.prototype;
803 f.vk=function(){OG.C.vk.call(this);this.app.D("appstatechange",this.bx,this);this.app.D("applicationplayerstatechange",this.cx,this);this.app.D("clearvideooverlays",this.ix,this);this.app.D("initializingmode",this.gx,this);this.app.D("presentingplayerstatechange",this.fx,this);this.app.D("onDetailedError",this.hx,this)};
804 f.Qj=function(){var a=this.app.K.assets;if(a.css&&!nl()){var b={rel:"stylesheet",type:"text/css",href:a.css},c=document.getElementById("www-player-css");b.id="www-player-css";var d=c||document.createElement("link");Mc(d,b);c||document.getElementsByTagName("head")[0].appendChild(d);this.bp(200)}else this.va=!0;OG.C.Qj.call(this)||Qj(a.html,{format:"RAW",method:"GET",Qa:v(this.kx,this)});return!0};
805 f.kx=function(a){if(a.responseText){var b=Uc("div");b.innerHTML=a.responseText;TF(this,E("html5-video-player",b));this.u("templateready")}else this.u("templateerror")};f.bp=function(a){0>=a||nl()?(this.va=!0,this.a&&on(this.a)):H(v(this.bp,this,a-1),50)};
806 f.sj=function(){OG.C.sj.call(this);this.va||pn(this.a);PG(this);var a=this.app.J();a.X&&this.addClass(a.X+"-theme");a.of&&this.addClass("house-brand");!a.pf&&a.xe||this.addClass("modest-branding");a.tj&&this.addClass("html5-hide-share");a.pm||this.addClass("html5-hide-volume");a.Gb&&(this.addClass("html5-tablet"),V(document.body,"html5-tablet-body"));a.Wb||this.addClass("hide-info-bar");a.Gb||a.Vb||this.addClass(NG[a.Gh]);var b=Ab(new B(this.a.clientWidth,this.a.clientHeight)).toFixed(1);"1.3"!=b&&
807 "1.8"!=b||this.addClass("autohide-aspect");a.tc&&this.uf();this.G=E("html5-watermark",this.a);QG(this.app)&&Rn(this.G);a.xe&&!a.Vb&&(this.A=new yv(this.B),zv(this.A,this.aa),L(this,this.A),this.Ma=new HG(this.app,this.A),L(this,this.Ma));var b=E("html5-context-menu",this.a),c=E("html5-modal-panel",this.a),d=this.M=new bG(this.app);d.$b=b;F(d.$b);document.body.appendChild(d.$b);var e=d.b;e.He=c;e.Zj=E("html5-modal-panel-close-button",c);e.Yj=E("html5-modal-panel-clipboard-substitute-content",c);e.Ge=
808 Ue("input",e.Yj);ec&&e.Ge.removeAttribute("readonly");e.a.listen(document,"keydown",e.xs);e.a.listen(c,"contextmenu",e.ws);Vo(e.a,e.Zj,"down",e.vs);Vo(e.a,e.Ge,"down",e.hn);var c={ks:d.ys,ls:d.zs,ms:v(d.jn,d,!1),os:v(d.jn,d,!0),ts:d.Bs,us:d.Cs,rs:d.As},g;for(g in c)cG(d,g,c[g]);L(this,this.M);a.of&&V(b,"house-brand");this.k=new Zt(2);V(this.k.element,"html5-video-loader");V(this.k.element,"html5-center-overlay");V(this.k.element,"ytp-scalable-icon-grow");this.k.V(this.g);L(this,this.k);g=E("html5-info-bar",
809 this.a);this.o=new sG(g,this.B,this.app);this.o.Wj();L(this,this.o);this.I=new zF(a.qc);this.I.V(this.g);L(this,this.I);this.X=new xF;this.X.V(this.g);L(this,this.X);RG(this)};f.Al=function(a){OG.C.Al.call(this,a);SG(this,a);this.i&&kG(this.i)};f.Pj=function(){OG.C.Pj.call(this);SG(this,UF(this))};f.Jl=function(a,b){OG.C.Jl.call(this,a,b);"newdata"==a&&this.o.reset();this.o&&this.o.update(b);if(QG(this.app)){var c=b.Ma;c&&(this.G.src=c);Rn(this.G)}};
810 f.bx=function(a){2==a?TG(this):(this.I.hide(),this.removeClass("cued-mode"));3==a?this.k.show():P(Ch(this.app),1)||this.k.hide()};
811 f.fx=function(a){var b;b=a.state;if(P(b,2))b=["ended-mode"];else{var c=[];P(b,8)?c.push("playing-mode"):P(b,4)&&c.push("paused-mode");P(b,1)&&!P(b,32)&&c.push("buffering-mode");P(b,32)&&c.push("seeking-mode");P(b,64)&&c.push("unstarted-mode");b=c}this.ma&&Qm(this.a,this.ma);Pm(this.a,b);this.ma=b;P(a.state,1)?this.k.show():0>Ro(a,1)&&this.k.hide();this.Ka=P(a.state,8)&&!P(a.state,4);0>Ro(a,64)&&UG(this.app)};f.cx=function(a){P(a.state,2)?TG(this):0>Ro(a,2)&&(this.I.hide(),this.removeClass("cued-mode"))};
812 function RG(a){var b=a.app.J();if(b.ym){if(b.Gb){var c=v(function(a){return VG(a)||Om(a.target,"html5-draggable")},a);a.O=new su(a.a,v(function(a){Om(this.a,"cued-mode")?Dn.hasTags(void 0)&&this.ko(a):VG(a)&&(this.K?this.Vk():this.hk(),this.A&&(a=Xr.getInstance(),a.Df&&bs(a,a.Df)))},a),!1,c);J(a.a,"gesturechange",v(a.xu,a));J(a.a,"gestureend",v(a.yu,a))}else J(a.a,"click",v(a.ko,a)),J(a.a,"dblclick",v(a.wu,a)),J(a.a,"click",v(a.Vk,a)),J(a.a,"mousemove",v(a.Vk,a)),J(a.a,"mouseout",v(a.hk,a));var d=
813 v(function(){var a=this.b;a&&(gj(a),Dn.fillPool(4),b.Gb&&wu(),(a=sf(this.a,"click",d,!0))&&uf(a))},a);J(a.a,"click",d,!0);J(a.a,"keypress",v(a.Au,a));J(a.a,"keydown",v(a.vu,a));c=v(a.M.uu,a.M);aj&&a.O?a.O.o=c:J(a.a,"contextmenu",c);J(a.G,"click",v(a.lo,a));a.o.D("title-click",v(a.lo,a));a.o.D("share-click",v(a.Bu,a));a.o.D("info-click",v(a.zu,a))}}f.ko=function(a){var b=this.app.J();VG(a)&&(this.a.focus(),!Om(this.a,"cued-mode")&&b.Vb||LG(this.app,!0));dG(this.app,"screenclick")};
814 f.wu=function(a){6!=this.app.o&&(VG(a)&&(a=this.app,KG(a,!a.a.ob)),dG(this.app,"screendoubleclick"))};f.xu=function(a){var b=a.scale,c=this.app.J().ob;b*(c?-1:1)>(c?-0.7:1.3)&&(b=this.app,KG(b,!b.a.ob));a.preventDefault()};f.yu=function(a){a=a.scale;var b=this.app.J().ob;a*(b?-1:1)>(b?-0.9:1.1)&&(a=this.app,KG(a,!a.a.ob))};function VG(a){return!gd(a.target,"html5-stop-propagation")}
815 f.Au=function(a){var b=a.keyCode;if(179==b||178==b)179==b&&(this.u("playpausetoggled",!0),a.preventDefault()),178==b&&($g(this.app),a.preventDefault());98==b&&this.app.gf("onBackgroundChange");111==b&&this.app.gf("onTextOpacityChange");119==b&&this.app.gf("onWindowOpacityChange");61!=b&&43!=b||this.app.gf("onFontSizeIncrease");45!=b&&95!=b||this.app.gf("onFontSizeDecrease");32==b&&VG(a)&&(LG(this.app,!0),a.preventDefault());48<=b&&57>=b&&(Wg(this.app,(b-48)/10*Kh(this.app)),a.preventDefault())};
816 f.vu=function(a){var b=a.keyCode;if(38==b||40==b||37==b||39==b){var c=5;a.ctrlKey&&(c*=2);if(38==b)c=this.app,MG(c,{volume:c.wa.volume+5,muted:!1});else if(40==b)c=this.app,MG(c,{volume:c.wa.volume-5,muted:!1});else if(37==b){var d=this.app,c=-1*c;Wg(d,d.getCurrentTime()+c,!1,250,void 0)}else 39==b&&(d=this.app,Wg(d,d.getCurrentTime()+c,!1,250,void 0));a.preventDefault()}36==b&&(Wg(this.app,0),a.preventDefault());35==b&&(Wg(this.app,Infinity),a.preventDefault());27==b&&(KG(this.app,!1),a.preventDefault())};
817 f.lo=function(a){a.preventDefault();a=this.app;var b;b=a.getVideoData();b=b.Oc||eu(a.a,b);fG(a,b)};f.Bu=function(){this.app.Mh();KG(this.app,!1);var a=this.app,b=a.getVideoData();a.u("SHARE_CLICKED",{videoId:b.L,listId:b.Oa,feature:"player_"+a.a.Y})};f.zu=function(){this.app.Mh()};f.ix=function(){var a=this.o;W(a.a,"show-share");W(a.a,"show-more-info")};f.Vk=function(){this.ya=!0;this.ia.start();this.K&&(this.K=!1,this.removeClass("hide-controls"),this.app.fb("onShowControls"))};
818 f.hk=function(){this.ya=!0;this.ia.stop();if(!this.K){var a;if(a=this.A){a=this.A;var b=Xr.getInstance();a=!!b.Df&&Te(b.Df,a.qf)||null!=a.j}b=(b=ih(this.app.k,"playlist"))&&b.ba;this.Ka&&this.ya&&!a&&!b&&(this.K=!0,this.addClass("hide-controls"),this.app.fb("onHideControls"))}};function TG(a){a.I.show(a.app.getVideoData());a.addClass("cued-mode")}f.Kj=function(){var a=Kc("html5-popup-dialog",this.a);z(a,function(a){Sn(a)},this)};
819 f.hx=function(a){this.i||(this.i=new jG,this.i.V(this.a),L(this,this.i));var b=this.app.J(),c=a.message;a=a.messageKey;if(!b.of&&"HTML5_DEFAULT_FALLBACK"==a){c+=lf("LEARN_MORE");a=this.i;for(var d=v(this.app.tf,this.app,"",{errorHelpClick:1}),e=a.element.getElementsByTagName("a"),g=0;g<e.length;g++)a.b.push(J(e[g],"click",d));this.app.tf("",{errorHelpShown:1})}a=this.i;b="embedded"==b.Y;uf(a.b);a.b=[];nn(a.template,"content",new jv(c));if(b)for(b=a.element.getElementsByTagName("a"),c=0;c<b.length;c++)b[c].setAttribute("target",
820 "_blank");this.i.show()};f.gx=function(){this.i&&this.i.hide()};f.zp=function(a){var b=this.X;b.show(a);H(oa(V,b.element,"html5-bezel-fade"),0);b.a=H(v(b.hide,b),300)};f.Go=function(a){E("html5-viewport-sheet").disabled=!a};f.uf=function(){var a=this.app.J();Oe(document.body,"player-size",a.ob?"fullscreen":a.Rd?"large":"small");OG.C.uf.call(this)};
821 function WG(a,b){var c="scale("+a+") !important;";b&&(c="translate(-50%, -50%) "+c);return["transform: "+c,"-webkit-transform: "+c,"-moz-transform: "+c,"-o-transform: "+c,"-ms-transform: "+c]}function SG(a,b){if(!b.isEmpty()){var c=b.width,d=b.height,e=0,g=0;c/d>480/360?(e=d,g=360):(e=c,g=480);c=vb(e/g,0.5,1);d={Kb:a.fa,reset:!0};a.fa=un(".ytp-scalable-icon-shrink",WG(c,!1),d);c=vb(0.33*(e/g),0.5,1);d={Kb:a.ga,reset:!0};a.ga=un(".ytp-scalable-icon-grow",WG(c,!0),d)}}
822 f.Lj=function(a){this.A&&Ev(this.A,a)};function PG(a){a.B=new lG;a.B.b=a;var b=new zG(a.a,a.app.J());L(a,b);a.B.a=b;a=Kc("ytp-tooltip-anchor",a.a);z(a,function(a){Fn(b,a)})}f.F=function(){this.k.hide();vn(this.fa);vn(this.ga);zf(this.a);zf(this.G);Sg(this.O);OG.C.F.call(this);this.G=this.I=this.ga=this.fa=this.O=this.X=null};function nh(a,b,c,d){"string"==typeof a&&(a={mediaContentUrl:a});var e=a,g=/\/([ve]|embed)\/([^#?]+)/.exec(a.mediaContentUrl);e.video_id=g&&g[2]?g[2]:null;return kh(a,b,c,d)}function kh(a,b,c,d){b={endSeconds:void 0,list:b,mediaContentUrl:void 0,startSeconds:c,suggestedQuality:d,video_id:a};if(ia(a)){for(var e in b)b[e]=b[e]||a[e];b.video_id=a.video_id||a.videoId}return b};function XG(a,b,c){this.b=a;this.a=b;this.I=c||null;this.i={};this.H=NaN;this.j=new Xo(this.Gq,3E4,this);L(this,this.j);this.k=new Xo(this.yj,1E3,this);L(this,this.k);this.G=0;this.g="N";this.o=NaN;this.A=""}y(XG,K);var YG={5:"N","-1":"N",3:"B",0:"EN",2:"PA",1:"PL"};function Bz(a,b,c){var d=a.i[b];d||(d=[],a.i[b]=d);d.push(((x()-a.G)/1E3).toFixed(3)+":"+c.join(":"))}f=XG.prototype;
823 f.yj=function(){if(this.I){var a=this.I();if(!isNaN(this.B)&&!isNaN(a.g)){var b=a.g-this.B;0<b&&Bz(this,"bwm",[b,(a.j-this.M).toFixed(3)])}this.B=a.g;this.M=a.j;isNaN(a.a)||Bz(this,"bwe",[a.a.toFixed(3)]);isNaN(a.b)||(b=a.b,a.i<b&&(b=a.i),this.K!=b&&(Bz(this,"bh",[b.toFixed(3)]),this.K=b),this.a.Ka&&3>b&&("PL"==this.g||"B"==this.g)&&this.k.start())}};
824 f.mg=function(){if(!this.ha()&&!Kb(this.i)){0!=this.k.Ba||this.yj();var a=Wx(this.a).hmewdrop;0<=a&&a!=this.o&&Bz(this,"df",[a-(this.o||0)]);this.o=a;a={event:"streamingstats"};this.b.a&&(a.fmt=this.b.a.Pa);a.cpn=this.b.Da;a.ei=this.b.j;a.el=this.a.Y;a.docid=this.b.L;a.ns=this.a.sc;this.a.g&&(a.adformat=this.a.g);this.b.Fb&&(a.live=this.b.cb?"dvr":"live");Ob(a,Rx(this.a));a.html5="1";var a=S(Qx(this.a)+"stream_204",a),b;for(b in this.i)a+="&"+b+"="+this.i[b].join(",");Qg(a);this.i={};this.j.start()}};
825 f.onError=function(a){Bz(this,"error",[a,this.b.we.toFixed(3)])};f.Gq=function(){"PL"==this.g&&(Bz(this,"vps",[this.g]),this.mg())};f.F=function(){XG.C.F.call(this);hf(this.H)};function ZG(a,b,c,d){c=c||"";this.i=[];this.j=[];this.B=[];this.H="watchtime"==c;this.nd=Qx(b)+"api/stats/"+c;d&&(this.dm=d.fs,this.O=d.nbe,this.P=d.bc,this.Q=d.bd,this.nc=d.bt,d.rtn&&(this.gg=d.rtn),this.H?(this.ja=d.state,0<d.rti&&(this.Ah=d.rti)):(this.ga=d.mos,this.ma=d.volume,d.at&&(this.I=d.at),d.allowed&&(this.M=d.allowed),d.ex_ads&&(this.aa=d.ex_ads)));this.G=b.g;this.Bh=b.Ub;this.U=b.k;this.Ka=b.H;this.Ma=b.A;this.Pc=b.B;this.Na=b.eg;this.Sa=b.lf;this.Ta=b.G;this.bb=b.I;this.ib=b.K;this.oc=
826 b.M;this.mc=b.O;this.b=b.b;this.Kc=b.Y;this.B=b.o;this.ia=b.ia;this.Mc=b.i;this.gm=b.sc;this.Nc=b.Ca;this.referrer=b.referrer;this.Lc=b.U;this.o=b.j;this.od=b.ja;this.pa=b.ma;this.va=b.pa;this.md=Xx(b);!a.a||a.ga.isEmpty();this.Bh=a.kf||this.Bh;this.ya=a.Da;this.A=a.we;this.X=a.K;this.za=a.Na;this.a=a.a;this.fm=a.Qd;this.Oc=a.cg;a.Fb&&(this.fa=a.cb?"dvr":"live");this.Jc=a.xh;this.pd=a.pd;this.eb=a.eb;this.Qc=a.j;this.Oa=a.Oa;this.o=a.aa||this.o;this.tb=a.ma;this.g=a.g;this.L=a.L}f=ZG.prototype;
827 f.Bh=!1;f.jj=!1;f.dm=!1;f.hg=!1;f.fm=!1;f.gm="yt";f.Ah=null;f.gg=null;f.Zp=!1;f.send=function(){if(!this.Zp){var a=this.Uh(),a=S(this.nd,a);Qg(a);this.Zp=!0}};
828 f.Uh=function(){var a={ns:this.gm,el:this.Kc,hl:this.Mc,cr:this.Lc,cpn:this.ya,docid:this.L,ver:2,referrer:this.referrer,cmt:this.De(this.A),plid:this.eb,ei:this.Qc,fmt:this.a?this.a.Pa:0,fs:this.dm?"1":"0",rt:this.De(this.K),c:this.Na,cver:this.Sa,subscribed:this.g,lact:this.md,cplatform:this.mc,cbrand:this.Ka,cmodel:this.Ta,cnetwork:this.bb,cbr:this.Ma,cbrver:this.Pc,cos:this.ib,cosver:this.oc,q:this.od};this.Bh&&(a.autoplay="1");this.fm&&(a.splay="1");this.kj&&(a.ssrt="1");this.X&&(a.delay=this.X);
829 this.G&&(a.adformat=this.G);this.U&&(a.content_v=this.U);void 0!=this.pa&&this.va&&(a.uga=this.va+this.pa);void 0!=this.k&&(a.len=this.De(this.k));!this.H&&0<this.B.length&&(a.fexp=this.B.toString());void 0!=this.ga&&(a.mos=this.ga);void 0!=this.ma&&(a.volume=this.ma);void 0!=this.ja&&(a.state=this.ja);null===this.gg||(a.rtn=this.De(this.gg));this.o&&(a.feature=this.o);this.Oa&&(a.list=this.Oa);this.tb&&(a.ytr=this.tb);this.H?(a.idpj=this.Oc,a.ldpj=this.Jc,null===this.Ah||(a.rti=this.De(this.Ah))):
830 (void 0!=this.I&&(a.at=this.I),void 0!=this.M&&(a.allowed=this.M),void 0!=this.aa&&(a.ex_ads=this.aa));void 0!=this.fa&&(a.live=this.fa);this.ia||(a.ps=this.Nc,a.sw=this.za,this.P&&(a.bc=this.P),this.Q&&(a.bd=this.Q,a.bt=this.nc),0<this.O&&(a.nbe=this.O));!this.hg&&0<this.i.length&&(a.st=Ka(this.i,this.De).join(","),a.et=Ka(this.j,this.De).join(","));return a};f.De=function(a){return(1*a.toFixed(3)).toString()};function $G(a,b,c,d){this.i=[];this.j=[];this.o=[];this.nj=b.hj;c&&(this.O=c.nbe,this.P=c.bc,this.Q=c.bd,this.Kc=c.bt,this.Yl=c.fs,this.Zl=c.mos,this.kj=c.ssrt,this.source=c.sourceid,this.ya=c.sd,this.Wl=c.hmewadbc,this.va=c.hmewdfc,this.Xl=c.hmewdrop,this.Ul=c.hmewvdbc,this.Lc=c.hmemdf,this.od=c.hmempaintdelay,this.nd=c.hmempainted,this.fa=c.hmempf,this.md=c.hmempresented,this.te=c.volume);this.mj=b.mj;this.zh=b.Ub;this.U=b.k;this.Pc=b.H;this.Na=b.A;this.Sa=b.B;this.Ta=b.eg;this.bb=b.lf;this.ib=
831 b.G;this.oc=b.I;this.mc=b.K;this.nc=b.M;this.Qc=b.O;this.b=b.b;this.Mc=b.Y;this.o=b.o;this.Jc=b.P;this.Nc=b.i;this.am=b.sc;this.fg=b.fg?"1":void 0;this.G=Tx(b);this.ue=b.Ca;this.referrer=Ux(b);this.dg=b.U;this.H=b.j;this.I=new B(window.screen.width,window.screen.height);this.jg=b.ja;this.ja=b.ma;this.ma=b.pa;this.hj=Xx(b);this.M=Bw(b);this.pa=b.bb;this.Vl=b.aa;!a.a||a.ga.isEmpty();this.zh=a.kf||this.zh;this.za=a.Da;this.Ka=a.Nc;this.X=a.K;this.Ma=a.Na;this.a=a.a;this.$l=a.Qd;this.aa=a.cg;a.Fb&&(this.ia=
832 a.cb?"dvr":"live");this.ga=a.xh;this.pd=a.pd;this.eb=a.eb;this.Oc=a.j;this.Oa=a.Oa;this.ve=a.ja;this.H=a.aa||this.H;this.bg=a.ma;this.bm=a.ij;this.g=a.g;this.lj=a.Lc;this.L=a.L;this.tb=a.ga;this.B=d||[]}f=$G.prototype;f.zh=!1;f.jj=!1;f.Yl=!1;f.hg=!1;f.Zl=!1;f.$l=!1;f.kj=!1;f.am="yt";f.bm=!1;f.dq=!1;f.send=function(){if(!this.dq){var a=this.Uh(),a=S(this.nj,a);Qg(a);this.dq=!0}};
833 f.Uh=function(){var a={html5:"1",ns:this.am,ps:this.ue,el:this.Mc,hl:this.Nc,cr:this.dg,c:this.Ta,cpn:this.za,docid:this.L,sd:this.ya,sourceid:this.source,referrer:this.referrer,q:this.jg,plid:this.eb,ei:this.Oc,fmt:this.a?this.a.Pa:0,fs:this.Yl?"1":"0",screenw:this.I.width,screenh:this.I.height,w:this.M.width,h:this.M.height,vw:this.tb.width,vh:this.tb.height,playerw:this.G.width,playerh:this.G.height,vid:this.Vl,rt:this.Eh(this.K),mos:this.Zl,volume:this.te,app:this.mj,csipt:this.Ka,on3g:this.fg,
834 partnerid:this.pd,sdetail:this.ve,subscribed:this.g,sw:this.Ma,list:this.Oa,eurl:this.b,framer:this.Jc,feature:this.H,ytr:this.bg,threed:this.lj,lact:this.hj,cver:this.bb,cplatform:this.Qc,cbrand:this.Pc,cmodel:this.ib,cnetwork:this.oc,cbr:this.Na,cbrver:this.Sa,cos:this.mc,cosver:this.nc};this.hg&&(a.playback="1");this.zh&&(a.autoplay="1");this.$l&&(a.splay="1");this.kj&&(a.ssrt="1");this.X&&(a.delay=this.X);this.bm&&!this.hg&&(a.vtmp="1");this.jj&&(a.tv="1");this.U&&(a.content_v=this.U);void 0!=
835 this.ja&&this.ma&&(a.uga=this.ma+this.ja);void 0!=this.k&&(a.len=this.Eh(this.k));0<this.o.length&&(a.fexp=this.o.toString());0<this.aa&&(a.idpj=this.aa);0<this.ga&&(a.ldpj=this.ga);void 0!=this.pa&&(a.attrib=this.pa);void 0!=this.ia&&(a.live=this.ia);this.P&&(a.bc=this.P);this.Q&&(a.bd=this.Q,a.bt=this.Kc);0<this.O&&(a.nbe=this.O);void 0!=this.va&&(a.hmewdfc=this.va,a.hmewdrop=this.Xl,a.hmewvdbc=this.Ul,a.hmewadbc=this.Wl);void 0!=this.fa&&(a.hmempf=this.fa,a.hmemdf=this.Lc,a.hmempresented=this.md,
836 a.hmempainted=this.nd,a.hmempaintdelay=this.od);0<this.i.length&&(a.st=this.i.map(this.Eh).join(","),a.et=this.j.map(this.Eh).join(","));for(var b=0;b<this.B.length;b++)Eb(zB(this.B[b]),function(b,d){d in a||(a[d]=b)});return a};f.Eh=function(a){return(1*a.toFixed(3)).toString()};function aH(){this.ab=[];this.M=[10,10,10,40];this.i=null;this.B="paused";this.fa=!1;this.k=NaN;this.P=this.K=0;this.aa=this.O=null;this.ia=xB;this.j=null;this.Q="";this.U=this.H=0;this.G=NaN;this.o=this.A=0}y(aH,K);function bH(a){var b=a.aa();a.O&&w(b,a.O());return b}function Iz(a,b,c){var d=(x()-a.A)/1E3;c=isNaN(c)?d:c;c=Math.ceil(c);var e=a.M[a.K];a.K+1<a.M.length&&a.K++;c=c+e;d=1E3*(c-d);a.k=H(v(a.ma,a,c,b),d);return c}
837 aH.prototype.ma=function(a,b){if(!this.ha()){this.k=NaN;var c=cH(this),d=dH(this,c);b&&(d.Ah=a);var e=400<this.P;c.length&&!e&&(d.gg=Iz(this,!0,a));d.send();this.P++}};aH.prototype.ja=function(){var a=this.j(),b=(x()-this.A)/1E3,c=a-this.H;0!=c&&(0.5<(isNaN(this.G)?c:Math.abs(c-(b-this.G)))?(eH(this),this.o=a,this.G=NaN):(this.G=b,this.g&&isNaN(this.k)&&Iz(this,!1)));this.H=a};function eH(a){0.5<a.H-a.o&&(a.ab.push([a.o,a.H]),a.o=a.H)}function cH(a){eH(a);var b=a.ab;a.ab=[];return b}
838 function Gz(a,b){var c=bH(a),d=a.ia();a.b.nj?(w(c,{state:a.B}),z(d,function(a){w(c,zB(a))}),d=new ZG(a.a,a.b,b,c)):d=new $G(a.a,a.b,c,d);d.K=(x()-a.A)/1E3;d.k=a.ga();return d}function dH(a,b){b.length||(b=[[a.o,a.o]]);for(var c=Gz(a,"watchtime"),d=0;d<b.length;d++)c.i.push(b[d][0]),c.j.push(b[d][1]);return c}
839 function Jz(a){var b=a.b;a=a.a;var c=a.aa||b.j,c={ns:b.sc,html5:"1",el:b.Y,ps:b.Ca,fexp:b.o.join(",")||void 0,feature:c||void 0,ytr:a.ma||void 0,list:a.Oa,d:b.va,f:b.ga};b.Ub&&(c.autoplay="1");a.g&&(c.subscribed=a.g);return c}function lz(a){a.A=x();a=a.i;a.i.vps=["0.000:N"];a.G=x();a.H=gf(v(a.mg,a),1E4);a.j.start()}aH.prototype.onError=function(a){this.i.onError(a)};
840 function Lz(a,b){if(!a.ha()){P(b.state,2)?(a.B="paused",dH(a,cH(a)).send()):P(b.state,8)?(a.B="playing",a.g&&isNaN(a.k)&&Iz(a,!1)):a.B="paused";var c=a.i,d=b.state,e;e=b.state;if(P(e,128))e="ER";else if(P(e,16)||P(e,32))e="S";else{var g=YG[vj(e)];"B"==g&&P(e,4)&&(g="PB");e=g}e!=c.g&&"N"!=e&&(!c.a.Ka||"B"!=e&&"PB"!=e||c.yj(),Bz(c,"vps",[e]),c.g=e);if(0<Ro(b,256)||P(d,128))c.onError(d.a.errorCode);(P(d,2)||P(d,128))&&c.mg()}}
841 function uz(a,b,c){b.rt=(x()-a.A)/1E3;w(b,bH(a));a=S("streamingerror"==b.event?"//s.youtube.com/stream_204":a.b.jb+"player_204",Jz(a));a=S(a,b);Qg(a,c)}function qz(a,b){var c=a.b,d=a.a,e={ns:c.sc,el:c.Y,eurl:c.b,fmt:d.a?d.a.Pa:0,html5:1,list:d.Oa,plid:d.eb,ei:d.j,ps:c.Ca,noflv:1,st:a.j(),video_id:d.L};c.Ub&&(b.autoplay="1");d.rj&&(b.tmi="1");w(e,b);w(e,Rx(c));Qg(S("//www.youtube.com/live_204",e))}aH.prototype.F=function(){aH.C.F.call(this);I(this.k);this.k=NaN;hf(this.I);this.I=NaN};function fH(a,b,c){R.call(this);this.o=1;this.X={};this.D("openingpage",v(this.jr,this));this.D("initializingmode",v(this.gr,this));this.D("internalenvironmentdatachange",v(this.er,this));this.D("internalvolumechange",v(this.Vm,this));this.K=null;b instanceof Df||(b=new Df(b));this.K=b;b=this.K.args;Sg(this.a);this.a=new Lx(b||{});this.u("internalenvironmentdatachange","newdata");this.ia=Nx(this.a)?new Gh(this,1):new Ug(this,1);L(this,this.ia);this.U=new Lh(this);L(this,this.U);this.I=new Lh(this,
842 1);L(this,this.I);this.P={};this.ga=Pb(["internalvideodatachange",this.Xq,"liveviewshift",this.hr,"commoninfoloaded",this.dr,"playbackready",this.Yq,"playbackstarted",this.Zq,"statechange",this.ar,"videoelementevent",this.xr]);this.ja=new Sh(this.a);this.k=new ix;L(this,this.k);this.b=null;b=new cz(this.a,1);if(this.b!=b){if(this.b){var d=this.b,e=this.ga,g;for(g in e)d.$(g,e[g],this)}b.X=this.ja;g=this.ga;for(var h in g)b.D(h,g[h],this);this.b=b}this.fa=Pb(["beginseeking",this.br,"endseeking",this.tr,
843 "internalvideodatachange",this.Wm,"internalvideoformatchange",this.rr,"progresssync",this.nr,"seekto",this.or,"onLoadProgress",this.ir,"onVideoProgress",this.sr,"newlicensesession",this.ur,"playbackdataloaded",this.lr,"playbackready",this.kr,"statechange",this.mr]);this.j=null;pA(this,this.b);this.aa=-1;this.G=this.A=null;this.B={};this.M=null;this.O={};this.Q=null;c?this.S=c(this):this.S=new OG(this);L(this,this.S);this.S.D("templateerror",this.pr,this);this.S.D("templateready",this.qr,this);this.S.D("resize",
844 this.wr,this);os("fs");c=this.S;c.ja=a;c.Qj()||c.u("templateerror")}y(fH,R);f=fH.prototype;f.Xd=null;f.list=null;f.bf=!0;f.wa=null;f.Ff=null;f.Ig=1;f.S=null;f.Gj=null;f.Cf=null;f.Xk=!1;f.Di=null;f.no=0;var gH={};
845 function hH(a){var b=Dn.getTag();a.i=b;a.Xd=a.i;a.j&&wz(a.j,b);nj(a.i,a.Ig);if(a.a.Sd)a.Cf&&uf(a.Cf),a.Cf=J(a.i,"volumechange",v(a.Ss,a),!1);else{var b=a.i,c=a.wa.muted;b.volume=a.wa.volume/100;b.muted=c}b=a.S;b.b=a.i;b.b.parentNode||b.g.appendChild(b.b);V(b.b,"video-stream");V(b.b,"html5-main-video");c=b.app.J();c.Vb&&c.xe&&b.b.setAttribute("controls",!0);c.Dh&&b.b.setAttribute("webkit-playsinline",!0);b.b.setAttribute("x-webkit-airplay","allow");c.qj&&(b.pa=J(b.b,"click",v(b.b.play,b.b)));a.a.Wa=
846 a.i}function iH(a){if(a.i){a.Cf&&(uf(a.Cf),a.Cf=null);a.j&&Cn(a.j);var b=a.S;b.b&&(F(b.b),b.b=null);a.a.Wa=null;Dn.releaseTag(a.i);a.i=null}}function zn(a,b){a.a.ub?(a.M&&(od(a.i,a.M.left,a.M.top),zd(a.i,new B(a.M.width,a.M.height)),a.M=null),mj(a.i),Cn(a.j),wz(a.j,a.i),nj(a.i,a.Ig)):Dn.releaseTag(b)}function pA(a,b){if(a.j!=b){a.j&&(jx(a.k),rA(a,a.j));a.P[b.B]=b;a.j=b;a.i&&wz(b,a.i);var c=a.fa,d;for(d in c)b.D(d,c[d],a);a.u("videoplayerchange",b);hz(b)&&jH(a)}}
847 function rA(a,b){Cn(b);var c=a.fa,d;for(d in c)b.$(d,c[d],a);b!=a.b&&(c=b.B,a.P[c]==b&&delete a.P[c]);b==a.j&&(a.j=null,b!=a.b&&pA(a,a.b))}function O(a,b){return b?a.P[b]||null:a.j}function jH(a){var b=a.j.getVideoData();a.Wm("newdata",a.j,b);var c=a.k;z([To,Jw,qo,ex,pu,Pw,Tw,Zw,nt],c.B,c);a.u("videoready",b);6!=a.o&&pz(a.j)}f=fH.prototype;f.Yq=function(){kH(this,5)};f.kr=function(a){a=a.i;P(a,8)&&!P(a,2)&&this.Ud()};
848 function Eh(a){!a.G&&a.I.J().sg&&(a.G=new JF(a),a.G&&lH(a,a.G));var b=a.G;b&&!b.je&&b.Xa(a.I)&&b.create()}
849 function lH(a,b){L(a,b);b.D("loaded",a.Am,a);b.D("unloaded",a.Bm,a);b.D("command_pause",mH(a.Td,a));b.D("command_play",mH(a.Ud,a));b.D("command_seek",mH(a.sf,a));b.D("command_disable_controls",a.og,a);b.D("command_enable_controls",a.Ih,a);b.D("command_redirect_controls",a.Fm,a);b.D("command_stop_redirect_controls",a.Hh,a);b.D("command_redirected_show_is_playing",a.S.Lj,a.S);b.D("command_progress",a.vj,a);b.D("command_add_cuerange",a.zm,a);b.D("command_remove_cuerange",a.Dm,a);b.D("command_remove_cuerange_all",
850 a.Em,a);b.D("command_update_cuerange_markers",a.Hm,a);b.D("command_preroll_ready",a.Gm,a);b.D("command_hide_all_dialogs",a.S.Kj,a.S);b.D("command_clear_video_overlays",a.Mh,a);b.D("command_log",a.tf,a);b.D("publish_external_event",a.Cm,a);b.D("command_log_timing",a.k.A,a.k)}function Fh(a){a&&a.je&&a.destroy()}f.fb=function(a,b){this.u.apply(this,arguments);this.gf.apply(this,arguments)};f.Xi=function(a,b){var c=$a(arguments);Nx(this.a)&&c.push(this.j.B);this.u.apply(this,c)};f.J=function(){return this.a};
851 f.getVideoData=function(a){return(a=O(this,a))?a.getVideoData():null};f.log_=function(){};f.gr=function(){hf(0);this.a.Sd||this.Vm(this.wa)};f.uj=function(){var a=Wx(this.a);a.fs=this.a.ob;a.volume=Math.round(this.wa.volume);a.mos=this.wa.muted?1:0;this.a.lj&&this.g&&this.g.g&&"WL"==this.g.g.type&&(a.ssrt=1);return a};f.Eq=function(){var a=mx(this.k);if(this.A){var b=this.A.Ri();b&&a.push(b)}return a};f.pr=function(){hx(this.b,5,void 0,void 0)};
852 f.qr=function(){this.a.Mj=this.S.a;var a=this.k,b={};b.loaded=v(this.Am,this);b.unloaded=v(this.Bm,this);b.command_pause=mH(this.Td,this);b.command_play=mH(this.Ud,this);b.command_seek=mH(this.sf,this);b.command_disable_controls=v(this.og,this);b.command_enable_controls=v(this.Ih,this);b.command_redirect_controls=v(this.Fm,this);b.command_stop_redirect_controls=v(this.Hh,this);b.command_redirected_show_is_playing=v(this.S.Lj,this.S);b.command_progress=v(this.vj,this);b.command_add_cuerange=v(this.zm,
853 this);b.command_remove_cuerange=v(this.Dm,this);b.command_remove_cuerange_all=v(this.Em,this);b.command_preroll_ready=v(this.Gm,this);b.command_update_cuerange_markers=v(this.Hm,this);b.command_hide_all_dialogs=v(this.S.Kj,this.S);b.command_clear_video_overlays=v(this.Mh,this);b.command_log=v(this.tf,this);b.publish_external_event=v(this.Cm,this);b.module_menu_add=v(this.Uq,this);b.module_menu_remove=v(this.Vq,this);a.j=b;b=this.U;a.b!=b&&(jx(a),a.i={},a.b=b);this.S.sj();a=this.ia;a.b=this.S.a;for(var c in a.i)a.b[c]=
854 a.i[c];for(c in a.g)a.b[c]=a.g[c];c=v(this.Wq,this);a=document;b=Xe("fullscreenchange",a);"msfullscreenchange"==b&&(b="MSFullscreenChange");this.Gj=b?J(a,b,c):null;c=this.K.args;this.a.oj?this.wa=Rh():this.wa||(this.wa={volume:100,muted:!1,nonNormalized:100});hH(this);a=new mh(c);ez(this.b,a);b=this.getVideoData();if("detailpage"==this.a.Y){var d;d=b.L;var e=Qh("yt-player-restore-playhead");d=e?e[d]:void 0;d&&(b.xa=d)}fg("yt-player-restore-playhead");this.a.Tc=UF(this.S);"detailpage"!=this.a.Y&&c&&
855 (c.playlist||c.list||c.api)&&(nH(this,c),a.L||a.nf||(c=this.g,a=v(this.Um,this),c.Ae=a,c.Zd&&H(c.Ae,0)));if(c=this.K.args.jsapicallback)ha(c)||(c=n(c)),c&&mH(v(c,l,this.a.pj),l);this.a.sg=Dh(this.a)&&(!Ta(Ig())||!Ta(Kg()));ml()?this.a.hm?oH(this):"leanback"!=this.a.Y&&pH(this):hx(this.b,5,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",void 0);this.S.Pj()};function pH(a){a.u("initializingmode");kH(a,2)}
856 function oH(a){a.u("initializingmode");pA(a,a.b);kH(a,3);a.a.ub||(iH(a),hH(a),wz(a.b,a.i));jz(a.b);qH(a,3)}function mH(a,b){return function(){var c=Array.prototype.slice.call(arguments);H(function(){a.apply(b||this,c)},0)}}f.tf=function(a,b,c){var d=O(this);b.event=a;d.j&&uz(d.j,b,c)};function ch(a,b){if(!isNaN(b)&&a.i){var c=1,c=a.a.lg?dh:[1],c=1>b?Oa(c,function(a){return a>=b}):Qa(c,function(a){return a<=b});a.Ig!=c&&(a.Ig=c,a.b==a.j&&nj(a.i,c),a.u("onPlaybackRateChange",c))}}
857 function eh(a,b){var c=a.getVideoData(b);return c&&c.a?c.a.b.i:"unknown"}function JG(a){return(a=O(a,void 0))?Xy(a.va,a.a):"unknown"}f.getCurrentTime=function(a){return(a=O(this,a))?a.getCurrentTime():0};function Kh(a,b){var c=O(a,b);return c?c.qd():0}function gh(a,b){var c=a.getVideoData(b);if(!c)return[];c=Ka(c.k,function(a){return a.We()});db(c);return c}function qh(a,b){var c=Fz(a.b,b);c.debug_playbackQuality=eh(a);c.debug_date=(new Date).toString();return ob(c)}
858 function Ow(a,b){var c=a.getVideoData(),d=!!c.Q||!!c.If||!b;a.u("threedenabled",d);d&&a.i.setAttribute("mozStereoMode","1");Kw()&&(a.i.setAttribute("mozStereoMode",d?"1":"0"),c=cl[d?c.ve:0],d=document.createElement("NvStereoExtDataElement"),d.setAttribute("stereoMode",c),Wc(document.documentElement,d),Af(d,"3DModeEvent"))}function Ch(a){return(a=O(a,1))&&a.i}
859 f.xr=function(a){var b=a.target;switch(a.type){case "loadedmetadata":qs("fvb")||os("fvb");this.S.uf();break;case "loadstart":qs("gv")||os("gv");break;case "progress":case "timeupdate":qs("l2s")||(a=jj(b),a<b.buffered.length&&2<b.buffered.end(a)&&os("l2s"))}};f.ur=function(a){if(this.Xk){var b=this.no.toString();this.no++;this.Di[b]=a;a={request:$a(a.b[0]?a.b[0].message:null),sessionId:b,system:a.j.a,url:a.k};this.u("onNewLicenseSession",a)}else a.start()};
860 f.ir=function(a,b){this.Xi("onLoadProgress",b)};f.sr=function(a,b){this.Xi("onVideoProgress",b)};
861 f.nr=function(a,b,c,d,e){if(!e&&a.ig()&&!oz(a)){e=a.getVideoData();if(this.a.Be&&e.ta&&!e.Cn&&e.Ce>=e.tm){var g;g=a.J();var h=vb(e.we/e.ta,0,1),h={html5:"1",video_id:e.L,eurl:g.b,framer:g.P,feature:g.j,ps:g.Ca,el:g.Y,list:e.Oa,w:h,l:e.ta,plid:e.eb,ei:e.j,access_token:e.G,tpmt:e.Ce,cpn:e.Da};g.g&&(h.adformat=g.g);g.referrer&&(h.referrer=Ux(g));g.Ub&&(h.autoplay="1");g.Ea&&(h.authuser=g.Ea);g.Ua&&(h.pageid=g.Ua);e.Qd&&(h.splay="1");e.g&&(h.subscribed=e.g);w(h,Rx(g));g=S(g.jb+"set_awesome",h);Qg(g);
862 e.Cn=!0}e.ta&&e.Ce>=e.rm&&rH(this)}this.vj(b,c,d,a)};f.vj=function(a,b,c,d){this.u("progresssync",a,b,c||0,(d||O(this)).B)};
863 f.ar=function(a){if(!P(a.state,2)||!sH(this)){P(a.state,2)&&(this.Td(),P(a.a,32)&&this.b.ti(),this.a.qc&&KG(this,!1));if(0<Ro(a,256)){var b=a.state.a;Bh(this.b,b.errorCode,b.errorDetail)}if(P(a.state,128)&&(b=a.state,hf(0),bh(this),b=b.a,206==b.errorCode&&Bh(this.b,b.errorCode,b.errorDetail),!sH(this))){b.message||(b.messageKey||(b.messageKey="HTML5_DEFAULT_FALLBACK"),b.message=lf(b.messageKey));5==b.errorCode&&Bh(this.b,208,b.errorDetail);var c=5;206==b.errorCode&&(c=150);Sa(qj,b.errorCode)&&(c=
864 b.errorCode);this.u("onError",c);this.u("onDetailedError",b)}this.u("applicationplayerstatechange",a);P(a.state,2)&&(a=this.getVideoData(),a.Fb&&!a.cb&&this.og(["play_pause"]))}};f.mr=function(a){!P(a.state,32)&&0>Ro(a,16)&&(!P(a.state,8)||this.i.ended&&!P(a.state,2)||this.Ud());this.u("presentingplayerstatechange",a);this.gf("onStateChange",a);qH(this,vj(a.state))};
865 f.Xq=function(a,b,c){if("newdata"==a){Fh(this.A);Fh(this.G);a=[];for(var d in this.B)ah(this,d)&&a.push(d);this.B={};0<a.length&&this.u("controlsenabled",a);this.Hh();this.X={}}this.getVideoData().Fj?(this.Ff=Lb(this.wa),this.og(["audio"]),d=this.i,d.Ok=!0,d.muted=!0):(ah(this,"audio")&&this.Ih(["audio"]),this.i.Ok=!1,this.Ff&&(MG(this,this.Ff),this.Ff=null));d=this.getVideoData();d.Fb&&!this.a.Hj?hx(this.b,205,"DEVICE_FALLBACK",void 0):d.Fb&&!d.cb?this.og(["seek"]):this.Ih(["seek"]);this.getVideoData().jk&&
866 !this.a.Ij&&hx(this.b,207,"DEVICE_FALLBACK",void 0);if(c.P||c.i.focEnabled||c.i.rmktEnabled)c=1E3*this.getVideoData().ta,tH(this,"part2viewed",0,c),tH(this,"videoplaytime25",0.25*c,c),tH(this,"videoplaytime50",0.5*c,c),tH(this,"videoplaytime75",0.75*c,c),tH(this,"videoplaytime100",c,2147483647),tH(this,"conversionview",c,2147483647)};
867 f.Wm=function(a,b,c){if("newdata"==a&&(jx(this.k),ch(this,1),!b.j&&!oz(b))){var d=new aH,e=v(this.uj,this);d.O=e;e=v(this.Eq,this);d.ia=e;dz(b);b.a&&!oz(b)&&(b.j=d,e=v(b.qd,b),d.ga=e,e=v(b.getCurrentTime,b),d.j=e,e=v(b.Dq,b),d.pa=e,e=v(b.Fq,b),d.aa=e,e=b.o,d.a=b.a,d.b=e,d.Q=d.b.jb+"get_video",d.g=!1,d.i=new XG(d.a,d.b,d.pa),L(d,d.i),d.fa=!0,b.a.kg&&qz(b.j,{metric:"connected"}))}this.wa.volume=(this.wa.nonNormalized||this.wa.volume)*this.getVideoData().Ch;c.tm=Math.min(0.8*c.ta,180);this.fb("videodatachange",
868 a,c,b.B)};f.rr=function(a,b){var c=this.j.getVideoData();a==c&&this.u("onPlaybackQualityChange",a.a.b.i,b)};f.er=function(){"detailpage"==this.a.Y&&Hh(this)};function Hh(a){var b=uH();if(b&&0<=b.index){var c=[];z(b.videoIds,function(a){if(a=b.videoData?b.videoData[a]:void 0)a.video_id=a.id,c.push(a)});nH(a,{videoList:c,loop:b.autoPlay,index:b.index})}}function nH(a,b){Sg(a.g);a.g=new Dm(b)}
869 function tH(a,b,c,d){b in a.X||(c=new Zh(c,d,{id:b,priority:1}),c.zb.D("onEnter",a.lp,a),c.zb.D("onExit",a.lp,a),a.b.Kk(c),a.X[b]=c)}f.lp=function(a){var b=a.getId(),c=this.b.getVideoData();"part2viewed"==b?(c.P&&Qg(c.P),c.nc&&Qg(c.nc)):"conversionview"==b&&rH(this);c.Ka&&(b=a.getId(),c=Kj(c.Ka,{label:b}),Qg(c));this.b.$h(a)};
870 function rH(a){var b=a.b.getVideoData();b.uo||(b.i.eventLabel=a.a.Y,b.i.playerStyle=a.a.Ca,b.P&&(b.i.feature="pyv"),b.i.vid=b.L,b.i.isAd=!("adunit"!=a.a.Y&&!b.P),nG("view",b.i),b.uo=!0)}function kH(a,b){b!=a.o&&(2==b&&qH(a,5),a.o=b,a.u("appstatechange",b))}function qH(a,b){a.aa!=b&&(a.aa=b,a.Xi("onStateChange",b))}function dG(a,b){if(a.a.Sa){var c={controlClicked:b};a.a.ob&&(c.fs=1);a.tf("",c)}}f.sf=function(a,b,c,d){(d=O(this,d))&&Az(d,a,!1!=b,c)};
871 f.or=function(a,b){var c=a.getVideoData();if(1==this.o||2==this.o)c.xa=b;2==this.o?oH(this):(c=Ez(a,b),this.fb("seekto",c))};f.br=function(){this.fb("beginseeking")};f.tr=function(){this.fb("endseeking")};function MG(a,b){a.wa=b;a.u("internalvolumechange",a.wa)}function Xg(a){a.wa.muted=!0;a.u("internalvolumechange",a.wa)}function Yg(a){a.wa.muted=!1;a.u("internalvolumechange",a.wa)}function oh(a,b){var c;if(c=(new qe(b)).a){var d=a.a;d.va=c.get("d",d.va);d.ga=c.get("f",d.ga)}}
872 function jh(a,b,c){b=new mh(b);return vH(a,b,void 0,c)}function vH(a,b,c,d){var e=O(a,d);if(!e)return!1;void 0!=c&&(b.mf=c);bh(a,d);ez(e,b);if(!iz(e))return!1;Px(e.J(),b.b);e==a.b?(kH(a,1),oH(a)):jz(e);return!0}function uh(a,b){var c=vH(a,b);Vg(a,c,void 0)}function Vg(a,b,c){c=O(a,c);b&&c==a.b&&(c.getVideoData().Qd=!0)}function lh(a,b,c){var d=O(a,c);d&&(bh(a,c),ez(d,b),iz(d)&&(Px(d.J(),b.b),d==a.b&&(kH(a,1),pH(a))))}
873 function ho(a,b,c,d){if(!b&&!d)throw Error("Playback source is invalid");b=kh(b||null,d||null);a.a.ob||"detailpage"!=a.a.Y?d?(a.bf=!1,rh(a,b,void 0,void 0,void 0)):jh(a,b,1):(d={},c&&(d.feature=c),b=new mh(b),d=eu(a.a,b,d),c&&a.u("onNavigate",{url:d,feature:c}),window.location.href=d)}function rh(a,b,c,d,e){"string"==typeof b||b instanceof Array?nH(a,{api:b,index:c,startSeconds:d,suggestedQuality:e}):nH(a,b);b=a.g;a=v(a.Um,a);b.Ae=a;b.Zd&&H(b.Ae,0)}
874 f.Um=function(){var a=vh(this.g);this.getVideoData().kf||!this.bf?uh(this,a):lh(this,a)};function po(a){var b=uH();return!(!a.g||!(a.g.loop||a.g.ua+1<a.g.Mb)||b&&!b.autoPlay)}function sH(a){return a.g&&("embedded"==a.a.Y||a.a.ob)&&po(a)?(sh(a),!0):!1}function sh(a){a.g&&(a.g.Zd?(a.g.loop||a.g.ua+1<a.g.Mb)&&uh(a,Im(a.g)):(Im(a.g),a.bf=!1))}function th(a){a.g&&(a.g.Zd?(a.g.loop||0<=a.g.ua-1)&&uh(a,Jm(a.g)):(Jm(a.g),a.bf=!1))}function uH(){var a=n("yt.www.watch.lists.getState");return a?a():null}
875 function ph(a,b){var c=null;b&&(c={t:Math.floor(a.getCurrentTime(1))});return eu(a.a,a.getVideoData(1),null,c)}f.zm=function(a,b){var c=O(this,b);c&&(z(a,c.Kk,c),this.u("cuerangesadded",a))};f.Dm=function(a,b){var c=O(this,b);c&&(z(a,c.$h,c),this.u("cuerangesremoved",a))};f.Em=function(a,b){var c=O(this,b);if(c){for(var c=c.A,d=c.i.length-1;0<=d;d--)c.i[d].namespace==a&&yj(c,d);c.Xb()}};f.Hm=function(a){this.u("cuerangemarkersupdated",a)};f.Gm=function(a,b){var c=O(this,b);c&&vz(c,a)};f.Zq=function(){wH(this)};
876 function wH(a){if(!a.a.pk){var b=a.b.getVideoData();if(b.L){var c=b.L;ss().docid=c}b.j&&(c=b.j,ss().ei=c);b.Da&&(c=b.Da,ss().cpn=c);0<b.xa&&(c=b.xa.toString(),ss().start=c);b=b.a.Pa.toString();ss().fmt=b;b=Math.round((a.b.b?hh(a.b.b):0)*Kh(a)).toString();ss().tds=b;os("aft");if("detailpage"==a.a.Y){var b=a.k.H,d;for(d in b)os(d,b[d]);d=a.k.o;for(var e in d)b=e,c=d[e],ss()[b]=c;b=ps().tick;e=ps().span;c=ss();if(d=n("yt.timing.reportbuilder_")){if(d=d.apply(null,[b,e,c,void 0]))rs(d),ts()}else{d={v:2,
877 s:"youtube",action:cf("TIMING_ACTION")};var g=cf("TIMING_INFO")||{},h;for(h in g)c[h]=g[h];h=c.srt;delete c.srt;if(!h&&0!==h)try{var k=(window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance).timing;h=k.responseStart-k.navigationStart}catch(m){c.pt&&(h=c.pt)}if(h||0===h)c.srt=h;b.aft||(b.aft=b.vr&&b.cl&&b.cl>b.vr?b.cl:b.vr?b.vr:b.ol);b.aft&&b.plev&&(b.aft=Math.min(b.aft,b.plev));b.vr&&b.gv&&(e.vl=Math.round(b.vr-b.gv));for(var p in c)"_"!=p.charAt(0)&&(d[p]=c[p]);
878 k={};p=[];h=b._start;for(var s in b)"_"!=s.charAt(0)&&(c=Math.max(Math.round(b[s]-h),0),k[s]=c,p.push(s+"."+c));d.rt=p.join(",");s={};p=[];for(var r in e)"_"!=r.charAt(0)&&(s[r]=e[r],p.push(r+"."+e[r]));d.it=p.join(",");rs(d);(r=n("ytdebug.logTiming"))&&r(d,k,s);ts()}}a.a.pk=!0}}f.Am=function(a){"remote"==a?(kH(this,6),Fh(this.A)):this.Xi("onApiChange")};f.Bm=function(a){"remote"==a&&pH(this)};
879 f.Ss=function(){if(!ah(this,"audio")){var a=100*this.i.volume,a={volume:a,nonNormalized:a/this.getVideoData().Ch,muted:this.i.muted};this.wa=Lb(a);this.fb("onVolumeChange",a)}};
880 f.Vm=function(a){a.volume=vb(a.volume,0,100);a.nonNormalized=a.volume/this.getVideoData().Ch;if(this.a.oj&&!this.a.Sd){var b={};b.volume=isNaN(a.volume)?Rh().volume:vb(a.volume,0,100);b.nonNormalized=a.nonNormalized;b.muted=void 0==a.muted?Rh().muted:a.muted;bg("yt-player-volume",b,2592E3)}if(ah(this,"audio"))this.Ff&&(this.Ff=Lb(a),this.fb("onVolumeChange",a));else{var b=this.i,c=a.muted;b.volume=a.volume/100;b.muted=c;this.a.Sd||this.fb("onVolumeChange",a)}};f.Wq=function(){xH(this,!!Cf())};
881 function xH(a,b){a.S.Go(b);if("detailpage"==a.a.Y&&!b){var c=a.b.getVideoData(),d=n("checkCurrentVideo");if(d&&cf("VIDEO_ID")!=c.L){var e=a.getCurrentTime(),g={};g[c.L]=e;bg("yt-player-restore-playhead",g,172800);d(c.L);a.u("openingpage")}}a.a.ob=b;a.S.uf();a.fb("fullscreentoggled",b)}f.wr=function(){UG(this)};f.Mh=function(){this.fb("clearvideooverlays")};f.Uq=function(a){this.fb("menu_add",a)};f.Vq=function(a){this.fb("menu_remove",a)};f.hr=function(a){this.fb("liveviewshift",a)};
882 f.Cm=function(a,b){if("onAdStateChange"==a){var c=arguments[1],d=arguments[2],e=arguments[3]||{};1==c&&wH(this);"leanback"==this.a.Y&&Nx(this.a)&&(0==c?this.Xd=this.i:this.Xd=d,this.u("onAdStateChange",c,e.video_id))}else this.u.apply(this,arguments)};f.gf=function(a,b){this.k.G.apply(this.k,arguments);this.A&&this.A.u.apply(this.A,arguments);this.G&&this.G.u.apply(this.G,arguments)};f.Ud=function(a,b){var c=O(this,b);c&&(2==this.o?oH(this):c.U?(a&&yH(this,c),P(c.i,2)?this.sf(0):yz(c)):jz(c))};
883 f.Td=function(a,b){var c=O(this,b);c&&(a&&yH(this,c),tz(c))};function bh(a,b){var c=O(a,b);if(c&&1!=a.o&&2!=a.o){tz(c);if(c.j){var d=c.j;dH(d,cH(d)).send();d.i.mg()}c.U=!1;c.b&&(fz(c),c.g&&(Tg(c.k,c.g),c.k=null,c.g=null),c.a&&(c.a.xa=c.getCurrentTime()),c.G=NaN,lj(c.b),c.o.za&&oj(c.b,!1),P(c.i,128)||kz(c,tj(c.i)))}}function Zg(a,b){if(!ah(a,"play_pause")){var c=a.O.play_pause?a.Q:null;c?c.oe("control_play"):a.Ud(!1,b)}}
884 function $g(a,b){if(!ah(a,"play_pause")){var c=a.O.play_pause?a.Q:null;c?c.oe("control_pause"):a.Td(!1,b)}}function LG(a,b){if(!ah(a,"play_pause")&&(!a.a.Gb||2!=a.o||Dn.hasTags(void 0))){var c=a.O.play_pause?a.Q:null;c?c.oe("control_toggle_play_pause"):(c=O(a,void 0))&&(c.ig()?a.Td(b,void 0):a.Ud(b,void 0))}}function Wg(a,b,c,d,e){if(!ah(a,"seek")){var g=a.O.seek?a.Q:null;g?g.oe("control_seek",b):a.sf(b,c,d,e)}}
885 function KG(a,b){if(a.a.ob!=b)if(Bf())if(b){var c=a.S.a,d=We(["requestFullscreen","requestFullScreen"],c);d&&d.apply(c)}else(c=We(["exitFullscreen","cancelFullscreen","cancelFullScreen"],document))&&c.call(document);else a.u("onFullScreenToggleRequest"),xH(a,b)}function fG(a,b){KG(a,!1);a.u("openingpage");ms(b)}f.dr=function(a){Ox(this.a,a)};
886 f.lr=function(){if(this.j==this.b){var a;if(a=Dh(this.a))if(eg("yt-remote-delayed-connect-key"))a=!0;else{a=Bg();var b=tg(Ig());a=!!xg(b,a)}if(a||!this.getVideoData(1).Tm||this.a.qc)if((b=hz(this.b))||(b=((b=this.getVideoData())&&b.I.length&&!b.O.length?0<=Ia(b.I,"fresca"):!1)||a),b){if(this.b.Q.length||0<Ii(this.b.A.b,-2147483648).length)kH(this,4),Fh(this.A);a&&kH(this,6);!this.A&&this.I.getVideoData().ca&&(this.A=new FB(this))&&lH(this,this.A);(a=this.A)&&!a.je&&a.Xa(this.I)&&a.create();Eh(this);
887 jH(this)}else a=!1,this.getVideoData().ia||this.U&&(a=Yw(this.U)),a?(a=this.getVideoData(),jh(this,{video_id:a.b.ypc_vid||a.L,ypc_preview:1},1)):(this.log_("No available formats"),hx(this.b,5,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",void 0));else a="DEVICE_FALLBACK",ec||cj("iemobile")||cj("xbox")&&cj("trident")||cj("nintendo wiiu")||(a="FLASH_FALLBACK"),hx(this.b,5,a,void 0)}else jH(this)};f.jr=function(){this.Td()};
888 function yH(a,b){var c=b.getVideoData(),d="html5-bezel-pause";P(b.i,8)?c.Fb&&!c.cb&&(d="html5-bezel-stop"):d="html5-bezel-play";a.S.zp(d)}function UG(a){a.a.Tc=UF(a.S);if(a.i){var b=a.getVideoData();0!=a.i.readyState&&(b.ga=new B(a.i.videoWidth,a.i.videoHeight));a.a.nv=XF(a.S,UF(a.S),VF(a.S),WF(a.S),void 0);a.a.Dg=XF(a.S,UF(a.S),VF(a.S),WF(a.S),!0);fh(O(a),"r");a.u("resize",Tx(a.a));a.fb("onResize")}}function ah(a,b){return!(!a.B[b]||!a.B[b].length)}
889 f.og=function(a,b){b=b||"defaultcontext";var c=[];z(a,function(a){this.B[a]?0>this.B[a].indexOf(b)&&this.B[a].push(b):(this.B[a]=[b],c.push(a))},this);0<c.length&&this.u("controlsdisabled",c)};f.Ih=function(a,b){b=b||"defaultcontext";var c=[];z(a,function(a){if(ah(this,a)){var e=this.B[a].indexOf(b);0<=e&&this.B[a].splice(e,1);0==this.B[a].length&&c.push(a)}},this);0<c.length&&this.u("controlsenabled",c)};
890 f.Fm=function(a,b,c){this.Hh();this.Q=a;b&&z(b,function(a){this.O[a]=!0},this);c&&kx(this.k,a,c)};f.Hh=function(){this.Q=null;this.O={};lx(this.k)};function QG(a){var b=a.getVideoData();return b&&b.Ma&&!im.test(b.Ma)?!a.a.Rh:a.a.Ac}f.F=function(){iH(this);this.Gj&&uf(this.Gj);hf(0);Tg(Gb(this.P));this.P={};this.j=this.b=null;Tg(this.a,this.g);this.K=this.I=this.ia=this.U=this.Xd=null;fH.C.F.call(this)};pa("yt.player.Application",fH);function zH(a,b,c,d){a={name:a,locale:c,feature:d};for(var e in b)a[e]=b[e];b=S("/sharing_services",a);Qg(b)}function AH(a,b,c,d,e,g){var h={};b&&(h.v=b);c&&(h.list=c);d&&(h.url=d);zH(a,h,e,g)}function BH(a,b,c,d){zH(a,{v:b},c,d)}function CH(a,b,c,d,e){zH(a,{list:b,v:c},d,e)};Tr(Xr);Tr(Kt);n("yt.tracking.shareVideo")||(pa("yt.tracking.share",AH),pa("yt.tracking.shareVideo",BH),pa("yt.tracking.shareList",CH));n("yt.window.popup")||(pa("yt.window.popup",ns),pa("yt.window.open",ms));pa("yt.player.Application.create",function(a,b){gH[a]&&(gH[a].dispose(),gH[a]=null);var c=new fH(a,b);Rg(c,function(){gH[a]=null});gH[a]=c});})();