]> Raphaƫl G. Git Repositories - youtubedl/blob - test/testdata/html5player-vflHOr_nV.js
Update changelog.
[youtubedl] / test / testdata / html5player-vflHOr_nV.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.pq?a.pq:a.pq=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 pa(a,b){for(var c in b)a[c]=b[c]}var w=Date.now||function(){return+new Date};
6 function qa(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 ra(a){Error.captureStackTrace?Error.captureStackTrace(this,ra):this.stack=Error().stack||"";a&&(this.message=String(a))}y(ra,Error);ra.prototype.name="CustomError";function sa(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)||["","",""],x=s.exec(m)||["","",""];if(0==r[0].length&&0==x[0].length)break;c=((0==r[1].length?0:parseInt(r[1],10))<(0==x[1].length?0:parseInt(x[1],10))?-1:(0==r[1].length?0:parseInt(r[1],10))>(0==x[1].length?
8 0:parseInt(x[1],10))?1:0)||((0==r[2].length)<(0==x[2].length)?-1:(0==r[2].length)>(0==x[2].length)?1:0)||(r[2]<x[2]?-1:r[2]>x[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(a){return a[a.length-1]}
10 var Ga=Array.prototype,Ha=Ga.indexOf?function(a,b,c){return Ga.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=Ga.forEach?function(a,b,c){Ga.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)},Ia=Ga.filter?function(a,b,c){return Ga.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},Ja=Ga.map?function(a,b,c){return Ga.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},Ka=Ga.some?function(a,b,c){return Ga.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},La=Ga.every?function(a,b,c){return Ga.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 Ma(a,b){var c=0;z(a,function(a,e,g){b.call(void 0,a,e,g)&&++c},void 0);return c}function Na(a,b,c){b=Oa(a,b,c);return 0>b?null:u(a)?a.charAt(b):a[b]}function Oa(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 Pa(a,b){var c=Qa(a,b,void 0);return 0>c?null:u(a)?a.charAt(c):a[c]}
13 function Qa(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 A(a,b){return 0<=Ha(a,b)}function Ra(a){return 0==a.length}function Sa(a){if(!t(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function Ta(a,b){A(a,b)||a.push(b)}function Ua(a,b){var c=Ha(a,b),d;(d=0<=c)&&Va(a,c);return d}function Va(a,b){Ga.splice.call(a,b,1)}function Wa(a,b){var c=Oa(a,b,void 0);0<=c&&Va(a,c)}
14 function Xa(a){return Ga.concat.apply(Ga,arguments)}function Ya(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 Za(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 $a(a,b,c,d){Ga.splice.apply(a,ab(arguments,1))}
15 function ab(a,b,c){return 2>=arguments.length?Ga.slice.call(a,b):Ga.slice.call(a,b,c)}function bb(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 cb(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 db(a,b){Ga.sort.call(a,b||eb)}function fb(a,b){var c=eb;db(a,function(a,e){return c(a[b],e[b])})}
16 function gb(a,b,c){if(!fa(a)||!fa(b)||a.length!=b.length)return!1;var d=a.length;c=c||hb;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0}function eb(a,b){return a>b?1:a<b?-1:0}function hb(a,b){return a===b}function ib(a,b,c){c=cb(a,c||eb,b);0>c&&$a(a,-(c+1),0,b)}function jb(a){for(var b=[],c=0;c<arguments.length;c++){var d=arguments[c];t(d)?b.push.apply(b,jb.apply(null,d)):b.push(d)}return b};function kb(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 lb(a){return eval("("+a+")")}function mb(a){return nb(new ob(void 0),a)}function ob(a){this.a=a}
17 function nb(a,b){var c=[];pb(a,b,c);return c.join("")}
18 function pb(a,b,c){switch(typeof b){case "string":qb(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],pb(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),qb(g,c),c.push(":"),
19 pb(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 rb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},sb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
20 function qb(a,b){b.push('"',a.replace(sb,function(a){if(a in rb)return rb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return rb[a]=e+b.toString(16)}),'"')};function tb(a,b,c){return Math.min(Math.max(a,b),c)};function B(a,b){this.x=q(a)?a:0;this.y=q(b)?b:0}f=B.prototype;f.clone=function(){return new B(this.x,this.y)};function ub(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function vb(a,b){return new B(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 wb(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}f=wb.prototype;f.clone=function(){return new wb(this.top,this.right,this.bottom,this.left)};f.contains=function(a){return this&&a?a instanceof wb?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 C(a,b){this.width=a;this.height=b}function xb(a,b){return a==b?!0:a&&b?a.width==b.width&&a.height==b.height:!1}f=C.prototype;f.clone=function(){return new C(this.width,this.height)};function yb(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 zb(a,b){return a.scale(yb(a)>yb(b)?b.width/a.width:b.height/a.height)};function Ab(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}f=Ab.prototype;f.clone=function(){return new Ab(this.left,this.top,this.width,this.height)};function Bb(a){return new Ab(a.left,a.top,a.right-a.left,a.bottom-a.top)}f.contains=function(a){return a instanceof Ab?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 Cb(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function Db(a,b){for(var c in a)if(!b.call(void 0,a[c],c,a))return!1;return!0}function Eb(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function Fb(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function Gb(a,b){for(var c in a)if(a[c]==b)return!0;return!1}function Hb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c}function Ib(a){for(var b in a)return!1;return!0}function Jb(a){var b={},c;for(c in a)b[c]=a[c];return b}
27 function Kb(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]=Kb(a[c]);return b}return a}var Lb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Mb(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<Lb.length;g++)c=Lb[g],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}}
28 function Nb(a){var b=arguments.length;if(1==b&&t(arguments[0]))return Nb.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 Ob(a){return function(){throw a;}};var Pb,Qb,Rb,Sb,Tb,Ub,Vb;function Wb(){return l.navigator?l.navigator.userAgent:null}function Xb(){return l.navigator}Tb=Sb=Rb=Qb=Pb=!1;var Yb;if(Yb=Wb()){var Zb=Xb();Pb=0==Yb.lastIndexOf("Opera",0);Qb=!Pb&&(-1!=Yb.indexOf("MSIE")||-1!=Yb.indexOf("Trident"));Sb=(Rb=!Pb&&-1!=Yb.indexOf("WebKit"))&&-1!=Yb.indexOf("Mobile");Tb=!Pb&&!Rb&&!Qb&&"Gecko"==Zb.product}var $b=Pb,D=Qb,ac=Tb,bc=Rb,cc=Sb,dc=Xb(),ec=dc&&dc.platform||"";Ub=-1!=ec.indexOf("Mac");Vb=-1!=ec.indexOf("Win");
29 var fc=!!Xb()&&-1!=(Xb().appVersion||"").indexOf("X11");function gc(){var a=l.document;return a?a.documentMode:void 0}var hc;t:{var ic="",jc;if($b&&l.opera)var kc=l.opera.version,ic="function"==typeof kc?kc():kc;else if(ac?jc=/rv\:([^\);]+)(\)|;)/:D?jc=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:bc&&(jc=/WebKit\/(\S+)/),jc)var lc=jc.exec(Wb()),ic=lc?lc[1]:"";if(D){var mc=gc();if(mc>parseFloat(ic)){hc=String(mc);break t}}hc=ic}var nc=hc,oc={};function pc(a){return oc[a]||(oc[a]=0<=Ba(nc,a))}
30 function qc(a){return D&&rc>=a}var sc=l.document,rc=sc&&D?gc()||("CSS1Compat"==sc.compatMode?parseInt(nc,10):5):void 0;var tc,uc=!D||qc(9),vc=!ac&&!D||D&&qc(9)||ac&&pc("1.9.1"),wc=D&&!pc("9"),xc=D||$b||bc;function yc(a){a=a.className;return u(a)&&a.match(/\S+/g)||[]}function zc(a,b){for(var c=yc(a),d=ab(arguments,1),e=c.length+d.length,g=c,h=0;h<d.length;h++)A(g,d[h])||g.push(d[h]);g=c.join(" ");a.className=g;return c.length==e}function Ac(a,b){var c=yc(a),d=ab(arguments,1),c=Bc(c,d).join(" ");a.className=c}function Bc(a,b){return Ia(a,function(a){return!A(b,a)})}function Cc(a,b){return A(yc(a),b)}function Dc(a,b,c){c?zc(a,b):Ac(a,b)}function Ec(a,b){var c=!Cc(a,b);Dc(a,b,c)};function Fc(a){return a?new Gc(Hc(a)):tc||(tc=new Gc)}function Ic(a){return u(a)?document.getElementById(a):a}function Jc(a,b){var c=b||document;return c.querySelectorAll&&c.querySelector?c.querySelectorAll("."+a):c.getElementsByClassName?c.getElementsByClassName(a):Kc("*",a,b)}function E(a,b){var c=b||document,d=null;return(d=c.querySelectorAll&&c.querySelector?c.querySelector("."+a):Jc(a,b)[0])||null}
31 function Kc(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&&A(a.split(/\s+/),b)&&(d[e++]=h);d.length=e;return d}return c}
32 function Lc(a,b){Cb(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:d in Mc?a.setAttribute(Mc[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})}var Mc={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 Nc(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new C(a.clientWidth,a.clientHeight)}function Oc(a){var b=bc||"CSS1Compat"!=a.compatMode?a.body:a.documentElement;a=a.parentWindow||a.defaultView;return D&&pc("10")&&a.pageYOffset!=b.scrollTop?new B(b.scrollLeft,b.scrollTop):new B(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}
34 function Pc(a,b,c){var d=arguments,e=document,g=d[0],h=d[1];if(!uc&&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={};Mb(k,h);delete k.type;h=k}g.push(">");g=g.join("")}g=e.createElement(g);h&&(u(h)?g.className=h:t(h)?zc.apply(null,[g].concat(h)):Lc(g,h));2<d.length&&Qc(e,g,d,2);return g}
35 function Qc(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(Rc(g)?Ya(g):g,e)}}function Sc(a){return document.createElement(a)}function Tc(a){return document.createTextNode(String(a))}function Uc(a,b){Qc(Hc(a),a,arguments,1)}function Vc(a){for(var b;b=a.firstChild;)a.removeChild(b)}function F(a){a&&a.parentNode&&a.parentNode.removeChild(a)}
36 function Wc(a){if(void 0!=a.firstElementChild)a=a.firstElementChild;else for(a=a.firstChild;a&&1!=a.nodeType;)a=a.nextSibling;return a}function Xc(a){if(xc&&!(D&&pc("9")&&!pc("10")&&l.SVGElement&&a instanceof l.SVGElement))return a.parentElement;a=a.parentNode;return ia(a)&&1==a.nodeType?a:null}
37 function Yc(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 Hc(a){return 9==a.nodeType?a:a.ownerDocument||a.document}
38 function Zc(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 Vc(a),a.appendChild(Hc(a).createTextNode(String(b)))}function $c(a,b){var c=[];return ad(a,b,c,!0)?c[0]:void 0}function ad(a,b,c,d){if(null!=a)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||ad(a,b,c,d))return!0;a=a.nextSibling}return!1}var bd={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},cd={IMG:" ",BR:"\n"};
39 function dd(a,b,c){if(!(a.nodeName in bd))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 cd)b.push(cd[a.nodeName]);else for(a=a.firstChild;a;)dd(a,b,c),a=a.nextSibling}function Rc(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 ed(a,b){return b?fd(a,function(a){return!b||Cc(a,b)},!0):null}
40 function fd(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 Gc(a){this.a=a||l.document||document}f=Gc.prototype;f.M=function(a){return u(a)?this.a.getElementById(a):a};f.createElement=function(a){return this.a.createElement(a)};function gd(a){return"CSS1Compat"==a.a.compatMode}function hd(a){return Oc(a.a)}f.appendChild=function(a,b){a.appendChild(b)};f.append=Uc;
41 f.getChildren=function(a){return vc&&void 0!=a.children?a.children:Ia(a.childNodes,function(a){return 1==a.nodeType})};f.contains=Yc;function id(a,b,c){u(b)?jd(a,c,b):Cb(b,oa(jd,a))}function jd(a,b,c){var d;t:if(d=Da(c),void 0===a.style[d]&&(c=(bc?"Webkit":ac?"Moz":D?"ms":$b?"O":null)+Ea(c),void 0!==a.style[c])){d=c;break t}d&&(a.style[d]=b)}function kd(a,b){var c=Hc(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function ld(a,b){return kd(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}
42 function md(a,b,c){var d,e=ac&&(Ub||fc)&&pc("1.9");b instanceof B?(d=b.x,b=b.y):(d=b,b=c);a.style.left=nd(d,e);a.style.top=nd(b,e)}function od(a){return new B(a.offsetLeft,a.offsetTop)}function pd(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}D&&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 qd(a){if(D&&!qc(8))return a.offsetParent;var b=Hc(a),c=ld(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=ld(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 rd(a){for(var b=new wb(0,Infinity,Infinity,0),c=Fc(a),d=c.a.body,e=c.a.documentElement,g=bc||"CSS1Compat"!=c.a.compatMode?c.a.body:c.a.documentElement;a=qd(a);)if(!(D&&0==a.clientWidth||bc&&0==a.clientHeight&&a==d||a==d||a==e||"visible"==ld(a,"overflow"))){var h=sd(a),k;k=a;if(ac&&!pc("1.9")){var m=parseFloat(kd(k,"borderLeftWidth"));if(td(k))var p=k.offsetWidth-k.clientWidth-m-parseFloat(kd(k,"borderRightWidth")),m=m+p;k=new B(m,parseFloat(kd(k,"borderTopWidth")))}else k=new B(k.clientLeft,
45 k.clientTop);h.x+=k.x;h.y+=k.y;b.top=Math.max(b.top,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=Nc(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 sd(a){var b,c=Hc(a),d=ld(a,"position"),e=ac&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),g=new B(0,0),h;b=c?Hc(c):document;h=!D||qc(9)||gd(Fc(b))?b.documentElement:b.body;if(a==h)return g;if(a.getBoundingClientRect)b=pd(a),a=hd(Fc(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(bc&&"fixed"==ld(b,"position")){g.x+=c.body.scrollLeft;g.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if($b||bc&&"absolute"==d)g.y-=c.body.offsetTop;for(b=a;(b=qd(b))&&b!=c.body&&b!=h;)g.x-=b.scrollLeft,$b&&"TR"==b.tagName||(g.y-=b.scrollTop)}return g}function ud(a,b){var c=vd(a),d=vd(b);return new B(c.x-d.x,c.y-d.y)}
48 function wd(a){var b;if(a.getBoundingClientRect)b=pd(a),b=new B(b.left,b.top);else{b=hd(Fc(a));var c=sd(a);b=new B(c.x-b.x,c.y-b.y)}if(ac&&!pc(12)){var d;D?d="-ms-transform":bc?d="-webkit-transform":$b?d="-o-transform":ac&&(d="-moz-transform");var e;d&&(e=ld(a,d));e||(e=ld(a,"transform"));a=e?(a=e.match(xd))?new B(parseFloat(a[1]),parseFloat(a[2])):new B(0,0):new B(0,0);a=new B(b.x+a.x,b.y+a.y)}else a=b;return a}
49 function vd(a){if(1==a.nodeType)return wd(a);var b=ha(a.$x),c=a;a.targetTouches?c=a.targetTouches[0]:b&&a.re.targetTouches&&(c=a.re.targetTouches[0]);return new B(c.clientX,c.clientY)}function yd(a,b,c){if(b instanceof C)c=b.height,b=b.width;else if(void 0==c)throw Error("missing height argument");zd(a,b);a.style.height=nd(c,!0)}function nd(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}function zd(a,b){a.style.width=nd(b,!0)}
50 function Ad(a){var b=Bd;if("none"!=ld(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 Bd(a){var b=a.offsetWidth,c=a.offsetHeight,d=bc&&!b&&!c;return q(b)&&!d||!a.getBoundingClientRect?new C(b,c):(a=pd(a),new C(a.right-a.left,a.bottom-a.top))}function Cd(a){var b=sd(a);a=Ad(a);return new Ab(b.x,b.y,a.width,a.height)}
51 function Dd(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 td(a){return"rtl"==ld(a,"direction")}
52 function Ed(a){var b=Hc(a),c=D&&a.currentStyle;if(c&&gd(Fc(b))&&"auto"!=c.width&&"auto"!=c.height&&!c.boxSizing)return b=Fd(a,c.width,"width","pixelWidth"),a=Fd(a,c.height,"height","pixelHeight"),new C(b,a);c=new C(a.offsetWidth,a.offsetHeight);b=Gd(a);a=Hd(a);return new C(c.width-a.left-b.left-b.right-a.right,c.height-a.top-b.top-b.bottom-a.bottom)}
53 function Fd(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 Id(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?Fd(a,c,"left","pixelLeft"):0}
54 function Gd(a){if(D){var b=Id(a,"paddingLeft"),c=Id(a,"paddingRight"),d=Id(a,"paddingTop");a=Id(a,"paddingBottom");return new wb(d,c,a,b)}b=kd(a,"paddingLeft");c=kd(a,"paddingRight");d=kd(a,"paddingTop");a=kd(a,"paddingBottom");return new wb(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))}var Jd={thin:2,medium:4,thick:6};
55 function Kd(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 Jd?Jd[c]:Fd(a,c,"left","pixelLeft")}function Hd(a){if(D){var b=Kd(a,"borderLeft"),c=Kd(a,"borderRight"),d=Kd(a,"borderTop");a=Kd(a,"borderBottom");return new wb(d,c,a,b)}b=kd(a,"borderLeftWidth");c=kd(a,"borderRightWidth");d=kd(a,"borderTopWidth");a=kd(a,"borderBottomWidth");return new wb(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))}
56 var Ld=/[^\d]+$/,Md={cm:1,"in":1,mm:1,pc:1,pt:1},Nd={em:1,ex:1};
57 function Od(a){var b=ld(a,"fontSize"),c;c=(c=b.match(Ld))&&c[0]||null;if(b&&"px"==c)return parseInt(b,10);if(D){if(c in Md)return Fd(a,b,"left","pixelLeft");if(a.parentNode&&1==a.parentNode.nodeType&&c in Nd)return a=a.parentNode,c=ld(a,"fontSize"),Fd(a,b==c?"1em":b,"left","pixelLeft")}c=Pc("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 xd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;var Pd="StopIteration"in l?l.StopIteration:Error("StopIteration");function Qd(){}Qd.prototype.next=function(){throw Pd;};Qd.prototype.Kd=function(){return this};function Rd(a){if(a instanceof Qd)return a;if("function"==typeof a.Kd)return a.Kd(!1);if(fa(a)){var b=0,c=new Qd;c.next=function(){for(;;){if(b>=a.length)throw Pd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");}
58 function Sd(a,b,c){if(fa(a))try{z(a,b,c)}catch(d){if(d!==Pd)throw d;}else{a=Rd(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(e){if(e!==Pd)throw e;}}}function Td(a){if(fa(a))return Ya(a);a=Rd(a);var b=[];Sd(a,function(a){b.push(a)});return b};function Ud(a,b){this.b={};this.a=[];this.g=this.Q=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 Ud?(c=a.nc(),d=a.hc()):(c=Fb(a),d=Eb(a));for(var e=0;e<c.length;e++)this.set(c[e],d[e])}}f=Ud.prototype;f.fb=function(){return this.Q};f.hc=function(){Vd(this);for(var a=[],b=0;b<this.a.length;b++)a.push(this.b[this.a[b]]);return a};f.nc=function(){Vd(this);return this.a.concat()};
59 f.equals=function(a,b){if(this===a)return!0;if(this.Q!=a.fb())return!1;var c=b||Wd;Vd(this);for(var d,e=0;d=this.a[e];e++)if(!c(this.get(d),a.get(d)))return!1;return!0};function Wd(a,b){return a===b}f.isEmpty=function(){return 0==this.Q};f.clear=function(){this.b={};this.g=this.Q=this.a.length=0};f.remove=function(a){return Xd(this.b,a)?(delete this.b[a],this.Q--,this.g++,this.a.length>2*this.Q&&Vd(this),!0):!1};
60 function Vd(a){if(a.Q!=a.a.length){for(var b=0,c=0;b<a.a.length;){var d=a.a[b];Xd(a.b,d)&&(a.a[c++]=d);b++}a.a.length=c}if(a.Q!=a.a.length){for(var e={},c=b=0;b<a.a.length;)d=a.a[b],Xd(e,d)||(a.a[c++]=d,e[d]=1),b++;a.a.length=c}}f.get=function(a,b){return Xd(this.b,a)?this.b[a]:b};f.set=function(a,b){Xd(this.b,a)||(this.Q++,this.a.push(a),this.g++);this.b[a]=b};f.clone=function(){return new Ud(this)};
61 f.Kd=function(a){Vd(this);var b=0,c=this.a,d=this.b,e=this.g,g=this,h=new Qd;h.next=function(){for(;;){if(e!=g.g)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw Pd;var h=c[b++];return a?h:d[h]}};return h};function Xd(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Yd(a){if("function"==typeof a.hc)return a.hc();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 Eb(a)}function Zd(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.nc)d=a.nc();else if("function"!=typeof a.hc)if(fa(a)||u(a)){d=[];for(var e=a.length,g=0;g<e;g++)d.push(g)}else d=Fb(a);else d=void 0;for(var e=Yd(a),g=e.length,h=0;h<g;h++)b.call(c,e[h],d&&d[h],a)}};function $d(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 ae=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function be(a){if(ce){ce=!1;var b=l.location;if(b){var c=b.href;if(c&&(c=de(c))&&c!=b.hostname)throw ce=!0,Error();}}return a.match(ae)}var ce=bc;function de(a){return(a=be(a)[3]||null)&&decodeURIComponent(a)}
62 function ee(a){return(a=be(a)[5]||null)&&decodeURIComponent(a)}function fe(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 ge(a,b,c){if(t(b))for(var d=0;d<b.length;d++)ge(a,String(b[d]),c);else null!=b&&c.push("&",a,""===b?"":"=",encodeURIComponent(String(b)))}function he(a,b,c){Math.max(b.length-(c||0),0);for(c=c||0;c<b.length;c+=2)ge(b[c],b[c+1],a);return a}
63 function ie(a,b){for(var c in b)ge(c,b[c],a);return a}function je(a,b){return fe(2==arguments.length?he([a],arguments[1],0):he([a],arguments,1))}function ke(a,b,c){a=[a,"&",b];null!=c&&a.push("=",encodeURIComponent(String(c)));return fe(a)}function le(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 me=/#|$/,ne=/[?&]($|#)/;
64 function oe(a,b){for(var c=a.search(me),d=0,e,g=[];0<=(e=le(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(ne,"$1")};function pe(a,b){var c;if(a instanceof pe)this.Ze=q(b)?b:a.Ze,qe(this,a.Vf),this.Qi=a.Qi,re(this,a.Oe),se(this,a.oh),this.ph=a.ph,te(this,a.a.clone()),ue(this,a.Al);else if(a&&(c=be(String(a)))){this.Ze=!!b;qe(this,c[1]||"",!0);var d=c[2]||"";this.Qi=d?decodeURIComponent(d):"";re(this,c[3]||"",!0);se(this,c[4]);this.ph=(d=c[5]||"")?decodeURIComponent(d):"";te(this,c[6]||"",!0);ue(this,c[7]||"",!0)}else this.Ze=!!b,this.a=new ve(null,0,this.Ze)}f=pe.prototype;f.Vf="";f.Qi="";f.Oe="";f.oh=null;
65 f.ph="";f.Al="";f.Ze=!1;f.toString=function(){var a=[],b=this.Vf;b&&a.push(we(b,xe),":");if(b=this.Oe){a.push("//");var c=this.Qi;c&&a.push(we(c,xe),"@");a.push(encodeURIComponent(String(b)));b=this.oh;null!=b&&a.push(":",String(b))}if(b=this.ph)this.Oe&&"/"!=b.charAt(0)&&a.push("/"),a.push(we(b,"/"==b.charAt(0)?ye:ze));(b=this.a.toString())&&a.push("?",b);(b=this.Al)&&a.push("#",we(b,Ae));return a.join("")};f.clone=function(){return new pe(this)};
66 function qe(a,b,c){a.Vf=c?b?decodeURIComponent(b):"":b;a.Vf&&(a.Vf=a.Vf.replace(/:$/,""))}function re(a,b,c){a.Oe=c?b?decodeURIComponent(b):"":b}function se(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.oh=b}else a.oh=null}function te(a,b,c){b instanceof ve?(a.a=b,Be(a.a,a.Ze)):(c||(b=we(b,Ce)),a.a=new ve(b,0,a.Ze))}function De(a,b,c){a.a.set(b,c)}function Ee(a,b,c){t(c)||(c=[String(c)]);Fe(a.a,b,c)}function ue(a,b,c){a.Al=c?b?decodeURIComponent(b):"":b;return a}
67 function Ge(a){De(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^w()).toString(36));return a}function He(a){return a instanceof pe?a.clone():new pe(a,void 0)}function Ie(a,b,c,d){var e=new pe(null,void 0);a&&qe(e,a);b&&re(e,b);c&&se(e,c);d&&(e.ph=d);return e}function we(a,b){return u(a)?encodeURI(a).replace(b,Je):null}function Je(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}
68 var xe=/[#\/\?@]/g,ze=/[\#\?:]/g,ye=/[\#\?]/g,Ce=/[\#\?@]/g,Ae=/#/g;function ve(a,b,c){this.a=a||null;this.b=!!c}function Ke(a){if(!a.Ha&&(a.Ha=new Ud,a.Q=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=Le(a,e);a.add(e,g?ua(g):"")}}f=ve.prototype;f.Ha=null;f.Q=null;f.fb=function(){Ke(this);return this.Q};
69 f.add=function(a,b){Ke(this);this.a=null;a=Le(this,a);var c=this.Ha.get(a);c||this.Ha.set(a,c=[]);c.push(b);this.Q++;return this};f.remove=function(a){Ke(this);a=Le(this,a);return Xd(this.Ha.b,a)?(this.a=null,this.Q-=this.Ha.get(a).length,this.Ha.remove(a)):!1};f.clear=function(){this.Ha=this.a=null;this.Q=0};f.isEmpty=function(){Ke(this);return 0==this.Q};function Me(a,b){Ke(a);b=Le(a,b);return Xd(a.Ha.b,b)}
70 f.nc=function(){Ke(this);for(var a=this.Ha.hc(),b=this.Ha.nc(),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.hc=function(a){Ke(this);var b=[];if(u(a))Me(this,a)&&(b=Xa(b,this.Ha.get(Le(this,a))));else{a=this.Ha.hc();for(var c=0;c<a.length;c++)b=Xa(b,a[c])}return b};f.set=function(a,b){Ke(this);this.a=null;a=Le(this,a);Me(this,a)&&(this.Q-=this.Ha.get(a).length);this.Ha.set(a,[b]);this.Q++;return this};
71 f.get=function(a,b){var c=a?this.hc(a):[];return 0<c.length?String(c[0]):b};function Fe(a,b,c){a.remove(b);0<c.length&&(a.a=null,a.Ha.set(Le(a,b),Ya(c)),a.Q+=c.length)}f.toString=function(){if(this.a)return this.a;if(!this.Ha)return"";for(var a=[],b=this.Ha.nc(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.hc(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 ve;a.a=this.a;this.Ha&&(a.Ha=this.Ha.clone(),a.Q=this.Q);return a};function Le(a,b){var c=String(b);a.b&&(c=c.toLowerCase());return c}function Be(a,b){b&&!a.b&&(Ke(a),a.a=null,Zd(a.Ha,function(a,b){var e=b.toLowerCase();b!=e&&(this.remove(b),Fe(this,e,a))},a));a.b=b};var Ne={};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};qa("yt.dom.getNextId_",Re);var Se=0}function Te(a,b){a=Ic(a);b=Ic(b);return!!fd(a,function(a){return a===b},!0,void 0)}function Ue(a,b){var c=Kc(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;Ka(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_||{};qa("yt.config_",Ye);var Ze=window.yt&&window.yt.tokens_||{};qa("yt.tokens_",Ze);var $e=window.yt&&window.yt.msgs_||{};qa("yt.msgs_",$e);var af=window.yt&&window.yt.timeouts_||[];qa("yt.timeouts_",af);var bf=window.yt&&window.yt.intervals_||[];qa("yt.intervals_",bf);function cf(a){df(Ye,arguments)}function ef(a,b){return a in Ye?Ye[a]:b}function ff(a){df(Ze,arguments)}function gf(a){return a in Ze?Ze[a]:void 0}
74 function H(a,b){ha(a)&&(a=hf(a));var c=window.setTimeout(a,b);af.push(c);return c}function jf(a,b){ha(a)&&(a=hf(a));var c=window.setInterval(a,b);bf.push(c);return c}function I(a){window.clearTimeout(a)}function kf(a){window.clearInterval(a)}function hf(a){return a&&window.yterr?function(){try{return a.apply(this,arguments)}catch(b){throw lf(b),b;}}:a}function lf(a){if(window&&window.yterr){var b=n("yt.www.errors.log");b?b(a):(b=ef("ERRORS")||[],b.push(a),cf("ERRORS",b))}}
75 function mf(a){df($e,arguments)}function J(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 nf(a,b){return of(a in $e?$e[a]:{},b)}function of(a,b){var c=ef("I18N_PLURAL_RULES")||function(a){return 1==a?"one":"other"};return(c=a["case"+b]||a[c(b)])?c.replace("#",b.toString()):b+""}function df(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 pf(a){if(a=a||window.event){for(var b in a)b in qf||(this[b]=a[b]);this.scale=a.scale;this.rotation=a.rotation;this.gf=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=pf.prototype;
78 f.gf=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.gf.returnValue=!1;this.gf.preventDefault&&this.gf.preventDefault()};f.stopPropagation=function(){this.gf.cancelBubble=!0;this.gf.stopPropagation&&this.gf.stopPropagation()};
79 var qf={stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,scale:1,rotation:1};var rf=n("yt.events.listeners_")||{};qa("yt.events.listeners_",rf);var sf=n("yt.events.counter_")||{count:0};qa("yt.events.counter_",sf);function tf(a,b,c,d){return Hb(rf,function(e){return e[0]==a&&e[1]==b&&e[2]==c&&e[4]==!!d})}
80 function K(a,b,c,d){if(!a||!a.addEventListener&&!a.attachEvent)return"";d=!!d;var e=tf(a,b,c,d);if(e)return e;var e=++sf.count+"",g=!("mouseenter"!=b&&"mouseleave"!=b||!a.addEventListener||"onmouseenter"in document),h;h=g?function(d){d=new pf(d);if(!fd(d.relatedTarget,function(b){return b==a},!0))return d.currentTarget=a,d.type=b,c.call(a,d)}:function(b){b=new pf(b);b.currentTarget=a;return c.call(a,b)};h=hf(h);rf[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 uf(a,b){var c;return c=K(a,"timeupdate",function(){vf(c);b.apply(a,arguments)},void 0)}
82 function wf(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 pf(a);pa(d,b);c(d)})}}return K(a,e,d)}function xf(a,b,c){yf(a,"change",b,function(a){return a.nodeName.toLowerCase()===c.toLowerCase()&&!0})}
83 function zf(a,b,c){return yf(a,"click",b,function(a){return Cc(a,c)})}function yf(a,b,c,d){var e=a||document;return K(e,b,function(a){var b=fd(a.target,function(a){return a===e||d(a)},!0);b&&b!==e&&!b.disabled&&(a.currentTarget=b,c.call(b,a))})}function vf(a){a&&("string"==typeof a&&(a=[a]),z(a,function(a){if(a in rf){var c=rf[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 rf[a]}}))}
84 function Af(a){for(var b in rf)rf[b][0]==a&&vf(b)}function Bf(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 Cf(){return!!We(["fullscreenEnabled","fullScreenEnabled"],document)}function Df(){return We(["fullscreenElement","fullScreenElement"],document)};function Ef(a){a=a||{};this.url=a.url||"";this.urlV8=a.url_v8||"";this.urlV9As2=a.url_v9as2||"";this.args=a.args||Jb(Ff);this.assets=a.assets||{};this.attrs=a.attrs||Jb(Gf);this.params=a.params||Jb(Hf);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 Ff={enablejsapi:1},Gf={},Hf={allowscriptaccess:"always",allowfullscreen:"true",bgcolor:"#000000"};
85 Ef.prototype.clone=function(){var a=new Ef,b;for(b in this){var c=this[b];"object"==da(c)?a[b]=Jb(c):a[b]=c}return a};var If={},Jf=0;function Kf(a,b){if(a){var c=new Image,d=""+Jf++;If[d]=c;c.onload=c.onerror=function(){b&&If[d]&&b();delete If[d]};c.src=a;c=eval("null")}};function Lf(){}Lf.prototype.Pc=!1;Lf.prototype.ha=function(){return this.Pc};Lf.prototype.dispose=function(){this.Pc||(this.Pc=!0,this.F())};function L(a,b){Mf(a,oa(Nf,b))}function Mf(a,b){a.rb||(a.rb=[]);a.rb.push(v(b,void 0))}Lf.prototype.F=function(){if(this.rb)for(;this.rb.length;)this.rb.shift()()};function Nf(a){a&&"function"==typeof a.dispose&&a.dispose()}function Of(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];fa(d)?Of.apply(null,d):Nf(d)}};function Pf(a,b){this.app=a;this.b=null;this.g={};this.j={};this.o={};this.k={};this.i=null;this.a=b;N(this,"cueVideoById",this.Xr);N(this,"loadVideoById",this.Uj);N(this,"cueVideoByUrl",this.Yr);N(this,"loadVideoByUrl",this.ys);N(this,"playVideo",this.qg);N(this,"pauseVideo",this.mn);N(this,"stopVideo",this.Jj);N(this,"clearVideo",this.Vr);N(this,"getVideoBytesLoaded",this.js);N(this,"getVideoBytesTotal",this.ks);N(this,"getVideoLoadedFraction",this.ms);N(this,"getVideoStartBytes",this.os);N(this,
86 "cuePlaylist",this.Wr);N(this,"loadPlaylist",this.xs);N(this,"nextVideo",this.As);N(this,"previousVideo",this.Bs);N(this,"playVideoAt",this.sj);N(this,"setShuffle",this.Gs);N(this,"setLoop",this.Ds);N(this,"getPlaylist",this.ub);N(this,"getPlaylistIndex",this.Wj);N(this,"getPlaylistId",this.hs);N(this,"loadModule",this.ws);N(this,"unloadModule",this.ln);N(this,"setOption",this.jn);N(this,"getOption",this.Ij);N(this,"getOptions",this.cs);N(this,"mute",this.Vm);N(this,"unMute",this.Xm);N(this,"isMuted",
87 this.us);N(this,"setVolume",this.Wm);N(this,"getVolume",this.Um);N(this,"seekTo",this.Th);N(this,"getPlayerState",this.gs);N(this,"getPlaybackRate",this.es);N(this,"setPlaybackRate",this.Fs);N(this,"getAvailablePlaybackRates",this.$r);N(this,"getPlaybackQuality",this.ds);N(this,"setPlaybackQuality",this.Es);N(this,"getAvailableQualityLevels",this.as);N(this,"getCurrentTime",this.getCurrentTime);N(this,"getDuration",this.Ph);N(this,"addEventListener",this.addEventListener);N(this,"removeEventListener",
88 this.removeEventListener);N(this,"getVideoUrl",this.rs);N(this,"getDebugText",this.bs);N(this,"getVideoEmbedCode",this.ls);N(this,"getVideoData",this.getVideoData);N(this,"addCueRange",this.Ur);N(this,"removeCueRange",this.Cs);N(this,"setSize",this.Hs);N(this,"getApiInterface",this.Zr);N(this,"destroy",this.destroy);N(this,"showVideoInfo",this.Is);N(this,"hideVideoInfo",this.ts);this.j.logFallback=v(this.zs,this);this.j.isNotServable=v(this.vs,this);this.j.getUpdatedConfigurationData=v(this.is,this)}
89 y(Pf,Lf);function N(a,b,c){a.g[b]=v(c,a)}f=Pf.prototype;f.Zr=function(){return Fb(this.g)};f.M=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.bu=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.i,data:a})},this);this.k[c]=d;this.addEventListener(a,d)}};
90 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.W(a,c)};f.cu=function(a,b){var c=u(b)?a+b:a+ja(b);this.k[c]&&this.removeEventListener(a,this.k[c])};f.gs=function(){return this.app.ea};f.Th=function(a,b){Qf(this.app,!0,this.a);Rf(this.app,a,b,void 0,this.a)};f.getCurrentTime=function(){var a=this.app.Wd;return a&&O(this.app).b!=a?a.getCurrentTime():this.app.getCurrentTime(this.a)};
91 f.Ph=function(){var a=this.app.Wd;return a?a.Qd:0};f.Um=function(){return this.app.xa.volume};f.Wm=function(a){var b=this.app;b.xa.volume=a;b.u("internalvolumechange",b.xa)};f.us=function(){return this.app.xa.muted};f.Vm=function(){Sf(this.app)};f.Xm=function(){Tf(this.app)};f.qg=function(){Qf(this.app,!0,this.a);Uf(this.app,this.a)};f.mn=function(){Vf(this.app,this.a)};f.Jj=function(){var a=this.app;Wf(a,"play_pause")||Xf(a,this.a)};f.Vr=function(){};f.es=function(){return this.app.Dg};
92 f.Fs=function(a){Yf(this.app,a)};f.$r=function(){return this.app.a.jg?Zf:[1]};f.ds=function(){return $f(this.app,this.a)};f.Es=function(a){var b=O(this.app,this.a);b&&ag(b,"m",a)};f.as=function(){return bg(this.app,this.a)};f.js=function(){var a=cg(this.app.Wd);return Math.floor(1E3*a)};f.ks=function(){return 1E3};f.ms=function(){return cg(this.app.Wd)};f.os=function(){return 0};f.Hs=function(){this.app.P.Gi()};f.ws=function(a){(a=dg(this.app.k,a))&&a.load()};
93 f.ln=function(a){(a=dg(this.app.k,a))&&a.unload()};f.Uj=function(a,b,c){var d=this.app,e=this.a;a=eg(d,fg(a,d.list,b,c),e);Qf(d,a,e)};f.Xr=function(a,b,c){var d=this.app,e=this.a;gg(d,new hg(fg(a,d.list,b,c)),e)};f.ys=function(a,b,c){var d=this.app,e=this.a;a=ig(a,d.list,b,c);b=eg(d,a,e);Qf(d,b,e);jg(d,a.mediaContentUrl)};f.Yr=function(a,b,c){var d=this.app,e=this.a;a=ig(a,d.list,b,c);gg(d,new hg(a),e);jg(d,a.mediaContentUrl)};f.rs=function(){return kg(this.app)};f.bs=function(){return lg(this.app)};
94 f.ls=function(){return""};f.Ur=function(){return!1};f.Cs=function(){};f.xs=function(a,b,c,d){var e=this.app;e.Xe=!1;mg(e,a,b,c,d)};f.Wr=function(a,b,c,d){var e=this.app;e.Xe=!0;mg(e,a,b,c,d)};f.As=function(){ng(this.app)};f.Bs=function(){og(this.app)};f.sj=function(a){var b=this.app;b.g&&(b.g.be?pg(b,qg(b.g,a)):b.Xe=!1,rg(b.g,a))};f.Gs=function(a){var b=this.app;b.g&&sg(b.g,a)};f.Ds=function(a){var b=this.app;b.g&&(b.g.loop=a)};
95 f.ub=function(){var a=this.app.g;if(!a)return null;for(var b=[],c=0;c<a.Pa;c++)b[c]=qg(a,c).L;return b};f.Wj=function(){var a=this.app.g?this.app.g.pa:null;return null==a?-1:a};f.hs=function(){return this.app.g&&this.app.g.g?this.app.g.g.toString():null};f.jn=function(a,b,c){return tg(this.app.k,a,b,c)};f.Ij=function(a,b,c){return tg(this.app.k,a,b,c)};f.cs=function(a){return ug(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}};
96 f.Is=function(){vg(this.app.P)};f.ts=function(){this.app.P.mk()};f.zs=function(){wg(this.app.b,204)};f.vs=function(){var a=xg(this.app);return!(!a||!P(a,128)||5!=a.a.errorCode)};f.is=function(){var a=this.app,b=a.K.clone();if(a=a.b.getVideoData()){var c=b.args,d=Jb(a.b);d.start=a.ya;pa(c,d)}return b};f.destroy=function(){this.app.dispose()};f.F=function(){if(this.b){for(var a in this.g)this.b[a]=null;for(a in this.j)this.b[a]=null}this.o=this.k=this.b=null;Pf.C.F.call(this)};function yg(a,b){Pf.call(this,a,b);N(this,"cueVideoByPlayerVars",this.Ex);N(this,"loadVideoByPlayerVars",this.No);N(this,"preloadVideoByPlayerVars",this.Hx);N(this,"seekBy",this.Up);N(this,"enableLicenseIntercept",this.Fx);N(this,"updatePlaylist",this.Kx);N(this,"resumeLicenseSession",this.Ix);N(this,"updateLastActiveTime",this.Jx);N(this,"updateRemoteReceivers",this.Lx);N(this,"updateVideoData",this.Mx);N(this,"getStoryboardFormat",this.Gx)}y(yg,Pf);f=yg.prototype;
97 f.Ex=function(a){var b=this.a;gg(this.app,new hg(a),b)};f.No=function(a){eg(this.app,a,this.a)};f.Hx=function(){};f.Up=function(a,b,c){Qf(this.app,!0,this.a);var d=this.app,e=this.a;Rf(d,d.getCurrentTime()+a,b,c,e)};f.Fx=function(){var a=this.app;a.Uk||(a.Uk=!0,a.Bi={})};f.Kx=function(){var a=this.app;zg(a);a.cb("onPlaylistUpdate")};f.Ix=function(a,b){var c=this.app,d=c.Bi[a];d&&(Ag(d,b),d.start(),delete c.Bi[a])};f.Jx=function(){this.app.a.gb=w()};
98 f.Lx=function(a){var b=this.app;Bg(b.a)&&6!=b.o&&(b.a.Ig=!Ra(a),b.a.Ig?1!=b.o&&3!=b.o&&Cg(b):Dg(b.H))};f.Mx=function(a){var b=O(this.app,this.a||1);b&&(b=b.a,Eg(b,a),b.u("dataupdated"))};f.Gx=function(){return this.app.getVideoData().b.storyboard_spec};f.getVideoData=function(){var a=yg.C.getVideoData.call(this),b=this.app.getVideoData(this.a)||{};a.cpn=b.Ca;return a};f.getCurrentTime=function(a){return a?this.app.getCurrentTime(a):yg.C.getCurrentTime.call(this)};
99 f.Ph=function(a){return a?Fg(this.app,a):yg.C.Ph.call(this)};function Gg(a,b){yg.call(this,a,b)}y(Gg,yg);f=Gg.prototype;f.Uj=function(a,b,c){eg(this.app,fg(a,this.app.list,b,c),this.a)};f.qg=function(){Uf(this.app,this.a)};f.Th=function(a,b){Rf(this.app,a,b,void 0,this.a)};function Q(a){return a.app.P.a}f.J=function(){return this.app.J()};f.ub=function(){return this.app.g};f.getVideoData=function(){return this.app.getVideoData(this.a)};function Hg(a){this.j=Math.exp(Math.log(0.5)/a);this.a=this.i=0}Hg.prototype.g=function(a,b){var c=Math.pow(this.j,a);this.a=b*(1-c)+c*this.a;this.i+=a};Hg.prototype.b=function(){return this.a/(1-Math.pow(this.j,this.i))};function Ig(a,b){this.o=0;this.j=a;this.G=b||0.5;this.k="index";this.a=0;this.i=[]}Ig.prototype.g=function(a,b){Jg(this,"index");this.i.push({index:this.o++,ih:a,value:b});this.a+=a;for(Jg(this,"index");this.a>this.j;){var c=this.a-this.j,d=this.i[0];d.ih<=c?(this.a-=d.ih,this.i.shift()):(this.a-=c,d.ih-=c)}};function Kg(a,b){Jg(a,"value");var c=b*a.a,d=0,e=NaN;a.i.some(function(a){d+=a.ih;e=a.value;if(d>=c)return!0});return e}Ig.prototype.b=function(){return Kg(this,this.G)};
100 function Jg(a,b){a.k!=b&&(a.k=b,fb(a.i,b))};function Lg(){};function Mg(){}y(Mg,Lg);Mg.prototype.fb=function(){var a=0;Sd(this.Kd(!0),function(){a++});return a};Mg.prototype.clear=function(){var a=Td(this.Kd(!0)),b=this;z(a,function(a){b.remove(a)})};function Ng(a){this.a=a}y(Ng,Mg);f=Ng.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)};
101 f.fb=function(){return this.a.length};f.Kd=function(a){var b=0,c=this.a,d=new Qd;d.next=function(){if(b>=c.length)throw Pd;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 Og(){var a=null;try{a=window.localStorage||null}catch(b){}this.a=a}y(Og,Ng);function Pg(a){this.Pf=a;this.jq=new ob}f=Pg.prototype;f.Pf=null;f.jq=null;f.set=function(a,b){q(b)?this.Pf.set(a,nb(this.jq,b)):this.Pf.remove(a)};f.get=function(a){var b;try{b=this.Pf.get(a)}catch(c){return}if(null!==b)try{return kb(b)}catch(d){throw"Storage: Invalid value was encountered";}};f.remove=function(a){this.Pf.remove(a)};function Qg(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.a=a}y(Qg,Ng);function Rg(a){Pg.call(this,a)}y(Rg,Pg);function Sg(a){this.data=a}function Tg(a){return!q(a)||a instanceof Sg?a:new Sg(a)}Rg.prototype.set=function(a,b){Rg.C.set.call(this,a,Tg(b))};Rg.prototype.a=function(a){a=Rg.C.get.call(this,a);if(!q(a)||a instanceof Object)return a;throw"Storage: Invalid value was encountered";};Rg.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 Ug(a){Pg.call(this,a)}y(Ug,Rg);function Vg(a){var b=a.creation;a=a.expiration;return!!a&&a<w()||!!b&&b>w()}Ug.prototype.set=function(a,b,c){if(b=Tg(b)){if(c){if(c<w()){Ug.prototype.remove.call(this,a);return}b.expiration=c}b.creation=w()}Ug.C.set.call(this,a,b)};Ug.prototype.a=function(a,b){var c=Ug.C.a.call(this,a);if(c)if(!b&&Vg(c))Ug.prototype.remove.call(this,a);else return c};function Wg(a){Pg.call(this,a)}y(Wg,Ug);function Xg(a,b){var c=[];Sd(b,function(a){var b;try{b=Wg.prototype.a.call(this,a,!0)}catch(g){if("Storage: Invalid value was encountered"==g)return;throw g;}q(b)?Vg(b)&&c.push(a):c.push(a)},a);return c}function Yg(a,b){var c=Xg(a,b);z(c,function(a){Wg.prototype.remove.call(this,a)},a)};function Zg(a,b,c){var d=c&&0<c?c:0;c=d?w()+1E3*d:0;if((d=d?$g:ah)&&window.JSON){u(b)||(b=JSON.stringify(b,void 0));try{d.set(a,b,c)}catch(e){d.remove(a)}}}function bh(a){if(!ah&&!$g||!window.JSON)return null;var b;try{b=ah.get(a),b=u(b)?b:$g.get(a)}catch(c){return null}if(!u(b))return null;try{b=JSON.parse(b,void 0)}catch(d){}return b}function ch(a){ah&&ah.remove(a);$g&&$g.remove(a)}var $g,dh=new Og;$g=dh.isAvailable()?new Wg(dh):null;var ah,eh=new Qg;ah=eh.isAvailable()?new Wg(eh):null;function fh(a){var b=bh(a);if(!b){var c=new Og;c.isAvailable()&&(b=(new Pg(c)).get(a))}return b}function gh(){var a={volume:100,muted:!1,nonNormalized:100},b=fh("yt-player-volume")||{};a.volume=isNaN(b.volume)?100:tb(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 hh(a){this.g=this.i=0;a.Oc?this.j=new Hg(16):this.j=new Ig(16,0.6);a.od||"play"==a.Ja?this.b=new Hg(4):this.b=new Ig(16,0.6);a.Yl?this.a=new Ig(8,0.6):a.Zl?this.a=new Ig(16,0.6):a.jm?this.a=new Ig(24,0.6):"play"==a.Ja?this.a=new Hg(15):this.a=new Ig(15,0.6);var b=fh("yt-player-bandwidth");a=a.Nc?0.1:0.5;b&&!isNaN(b.byterate)?this.a.g(a,b.byterate):this.a.g(a,75E3)}function ih(a){a=a.j.b();return a=isNaN(a)?0.5:a}function jh(a){a=a.a.b();return 0<a?a:1};function kh(){this.a=[];this.Qb={}}y(kh,Lf);f=kh.prototype;f.mp=1;f.Mi=0;f.D=function(a,b,c){var d=this.Qb[a];d||(d=this.Qb[a]=[]);var e=this.mp;this.a[e]=a;this.a[e+1]=b;this.a[e+2]=c;this.mp=e+3;d.push(e);return e};f.W=function(a,b,c){if(a=this.Qb[a]){var d=this.a;if(a=Na(a,function(a){return d[a+1]==b&&d[a+2]==c}))return this.Wc(a)}return!1};
102 f.Wc=function(a){if(0!=this.Mi)return this.b||(this.b=[]),this.b.push(a),!1;var b=this.a[a];if(b){var c=this.Qb[b];c&&Ua(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.Qb[a];if(c){this.Mi++;for(var d=ab(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.Mi--;if(this.b&&0==this.Mi)for(;c=this.b.pop();)this.Wc(c);return 0!=e}return!1};
103 f.clear=function(a){if(a){var b=this.Qb[a];b&&(z(b,this.Wc,this),delete this.Qb[a])}else this.a.length=0,this.Qb={}};f.fb=function(a){if(a){var b=this.Qb[a];return b?b.length:0}a=0;for(b in this.Qb)a+=this.fb(b);return a};f.F=function(){kh.C.F.call(this);delete this.a;delete this.Qb;delete this.b};function lh(a,b){this.start=a;this.end=b;this.a=ja(this)}function mh(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}lh.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)};lh.prototype.toString=function(){return"Interval["+this.start+", "+this.end+"]"};function nh(a,b,c){lh.call(this,a,b);a=c||{};this.Ba=a.id||"";void 0!=a.priority&&(this.sh=a.priority);this.namespace=a.namespace||"";this.jl=a.visible||!1;this.yb=new kh}y(nh,lh);f=nh.prototype;f.Ba="";f.sh=7;f.active=!0;f.jl=!1;f.yb=null;f.namespace="";f.getId=function(){return this.Ba};function oh(a,b){return a.start==b.start?a.sh==b.sh?0:a.sh<b.sh?-1:1:a.start<b.start?-1:1};function ph(a,b){this.type=a;this.currentTarget=this.target=b}f=ph.prototype;f.dispose=function(){};f.se=!1;f.defaultPrevented=!1;f.Qp=!0;f.stopPropagation=function(){this.se=!0};f.preventDefault=function(){this.defaultPrevented=!0;this.Qp=!1};function qh(a){qh[" "](a);return a}qh[" "]=ba;var rh=!D||qc(9),sh=D&&!pc("9");!bc||pc("528");ac&&pc("1.9b")||D&&pc("8")||$b&&pc("9.5")||bc&&pc("528");ac&&!pc("8")||D&&pc("9");function th(a,b){a&&this.init(a,b)}y(th,ph);f=th.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;
104 f.init=function(a,b){var c=this.type=a.type;ph.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(ac){var e;t:{try{qh(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;
105 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(){th.C.stopPropagation.call(this);this.re.stopPropagation?this.re.stopPropagation():this.re.cancelBubble=!0};f.preventDefault=function(){th.C.preventDefault.call(this);var a=this.re;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,sh)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};f.$x=function(){return this.re};var uh="closure_listenable_"+(1E6*Math.random()|0);function vh(a){try{return!(!a||!a[uh])}catch(b){return!1}}var wh=0;function xh(a,b,c,d,e){this.cf=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.eb=e;this.key=++wh;this.removed=this.Pi=!1}function yh(a){a.removed=!0;a.cf=null;a.proxy=null;a.src=null;a.eb=null};function zh(a){this.src=a;this.$a={};this.a=0}zh.prototype.add=function(a,b,c,d,e){var g=this.$a[a];g||(g=this.$a[a]=[],this.a++);var h=Ah(g,b,d,e);-1<h?(a=g[h],c||(a.Pi=!1)):(a=new xh(b,this.src,a,!!d,e),a.Pi=c,g.push(a));return a};zh.prototype.remove=function(a,b,c,d){if(!(a in this.$a))return!1;var e=this.$a[a];b=Ah(e,b,c,d);return-1<b?(yh(e[b]),Va(e,b),0==e.length&&(delete this.$a[a],this.a--),!0):!1};
106 function Bh(a,b){var c=b.type;if(!(c in a.$a))return!1;var d=Ua(a.$a[c],b);d&&(yh(b),0==a.$a[c].length&&(delete a.$a[c],a.a--));return d}zh.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,yh(d[e]);delete this.$a[c];this.a--}return b};function Ch(a,b,c,d,e){a=a.$a[b];b=-1;a&&(b=Ah(a,c,d,e));return-1<b?a[b]:null}
107 function Ah(a,b,c,d){for(var e=0;e<a.length;++e){var g=a[e];if(!g.removed&&g.cf==b&&g.capture==!!c&&g.eb==d)return e}return-1};var Dh={},Eh={},Fh={};function Gh(a,b,c,d,e){if(t(b)){for(var g=0;g<b.length;g++)Gh(a,b[g],c,d,e);return null}c=Hh(c);if(vh(a))a=a.listen(b,c,d,e);else{g=c;if(!b)throw Error("Invalid event type");c=!!d;var h=ja(a),k=Eh[h];k||(Eh[h]=k=new zh(a));d=k.add(b,g,!1,d,e);d.proxy||(e=Ih(),d.proxy=e,e.src=a,e.cf=d,a.addEventListener?a.addEventListener(b,e,c):a.attachEvent(b in Fh?Fh[b]:Fh[b]="on"+b,e),Dh[d.key]=d);a=d}return a}
108 function Ih(){var a=Jh,b=rh?function(c){return a.call(b.src,b.cf,c)}:function(c){c=a.call(b.src,b.cf,c);if(!c)return c};return b}function Kh(a,b,c,d,e){if(t(b))for(var g=0;g<b.length;g++)Kh(a,b[g],c,d,e);else c=Hh(c),vh(a)?a.Vc(b,c,d,e):a&&(d=!!d,(a=Lh(a))&&(b=Ch(a,b,c,d,e))&&Mh(b))}
109 function Mh(a){if(ga(a)||!a||a.removed)return!1;var b=a.src;if(vh(b))return Bh(b.jd,a);var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent&&b.detachEvent(c in Fh?Fh[c]:Fh[c]="on"+c,d);(c=Lh(b))?(Bh(c,a),0==c.a&&(c.src=null,delete Eh[ja(b)])):yh(a);delete Dh[a.key];return!0}function Nh(a,b){var c=Eh[a];if(!c)return 0;var d=0,e;for(e in c.$a)if(!b||e==b)for(var g=Ya(c.$a[e]),h=0;h<g.length;++h)Mh(g[h])&&++d;return d}
110 function Oh(a,b,c,d){var e=1;if(a=Lh(a))if(b=a.$a[b])for(b=Ya(b),a=0;a<b.length;a++){var g=b[a];g&&g.capture==c&&!g.removed&&(e&=!1!==Ph(g,d))}return Boolean(e)}function Ph(a,b){var c=a.cf,d=a.eb||a.src;a.Pi&&Mh(a);return c.call(d,b)}
111 function Jh(a,b){if(a.removed)return!0;if(!rh){var c=b||n("window.event"),d=new th(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&=Oh(c[k],g,!0,d);for(k=0;!d.se&&k<c.length;k++)d.currentTarget=c[k],e&=Oh(c[k],g,!1,d)}return e}return Ph(a,new th(b,this))}
112 function Lh(a){return a[ka]?Eh[ja(a)]||null:null}var Qh="__closure_events_fn_"+(1E9*Math.random()>>>0);function Hh(a){return ha(a)?a:a[Qh]||(a[Qh]=function(b){return a.handleEvent(b)})};function Rh(){this.jd=new zh(this);this.U=this}y(Rh,Lf);Rh.prototype[uh]=!0;f=Rh.prototype;f.Ml=null;f.addEventListener=function(a,b,c,d){Gh(this,a,b,c,d)};f.removeEventListener=function(a,b,c,d){Kh(this,a,b,c,d)};
113 function Sh(a,b){var c,d=a.Ml;if(d){c=[];for(var e=1;d;d=d.Ml)c.push(d),++e}var d=a.U,e=b,g=e.type||e;if(u(e))e=new ph(e,d);else if(e instanceof ph)e.target=e.target||d;else{var h=e,e=new ph(g,d);Mb(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=Th(k,g,!0,e)&&h;e.se||(k=e.currentTarget=d,h=Th(k,g,!0,e)&&h,e.se||(h=Th(k,g,!1,e)&&h));if(c)for(m=0;!e.se&&m<c.length;m++)k=e.currentTarget=c[m],h=Th(k,g,!1,e)&&h}
114 f.F=function(){Rh.C.F.call(this);this.jd&&this.jd.removeAll(void 0);this.Ml=null};f.listen=function(a,b,c,d){return this.jd.add(a,b,!1,c,d)};f.Vc=function(a,b,c,d){return this.jd.remove(a,b,c,d)};function Th(a,b,c,d){b=a.jd.$a[b];if(!b)return!0;b=Ya(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.cf,m=h.eb||h.src;h.Pi&&Bh(a.jd,h);e=!1!==k.call(m,d)&&e}}return e&&!1!=d.Qp};function Uh(a,b){Rh.call(this);this.a=a||1;this.b=b||l;this.g=v(this.ku,this);this.i=w()}y(Uh,Rh);f=Uh.prototype;f.Xc=!1;f.gc=null;function Vh(a,b){a.a=b;a.gc&&a.Xc?(a.stop(),a.start()):a.gc&&a.stop()}f.ku=function(){if(this.Xc){var a=w()-this.i;0<a&&a<0.8*this.a?this.gc=this.b.setTimeout(this.g,this.a-a):(this.gc&&(this.b.clearTimeout(this.gc),this.gc=null),Sh(this,"tick"),this.Xc&&(this.gc=this.b.setTimeout(this.g,this.a),this.i=w()))}};
115 f.start=function(){this.Xc=!0;this.gc||(this.gc=this.b.setTimeout(this.g,this.a),this.i=w())};f.stop=function(){this.Xc=!1;this.gc&&(this.b.clearTimeout(this.gc),this.gc=null)};f.F=function(){Uh.C.F.call(this);this.stop();delete this.b};function Wh(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 Xh(){this.a=[]}function Yh(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 Zh(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 $h(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(eb);return c[0]};var ai,bi,ci,di,ei;ei=di=ci=bi=ai=!1;var fi=Wb();fi&&(-1!=fi.indexOf("Firefox")||-1!=fi.indexOf("Camino")||(-1!=fi.indexOf("iPhone")||-1!=fi.indexOf("iPod")?ai=!0:-1!=fi.indexOf("iPad")?bi=!0:-1!=fi.indexOf("Chrome")?di=!0:-1!=fi.indexOf("Android")?ci=!0:-1!=fi.indexOf("Safari")&&(ei=!0)));var gi=ai,hi=bi,ii=ci,ji=di,ki=ei;var li,mi;var ni=Wb(),oi=ni.match(/\((iPad|iPhone|iPod)( Simulator)?;/);if(!oi||2>oi.length)li=void 0;else{var pi=ni.match(/\((iPad|iPhone|iPod)( Simulator)?; (U; )?CPU (iPhone )?OS (\d_\d)[_ ]/);li=pi&&6==pi.length?Number(pi[5].replace("_",".")):0}(mi=0<=li)&&0<=Wb().search("Safari")&&Wb().search("Version");var qi=gi||hi;function ri(){return si("(ps3; leanback shell)")}function si(a){var b=Wb();return b?0<=b.toLowerCase().indexOf(a.toLowerCase()):!1};function ti(){}var ui=mi&&4>li?0.1:0,vi=new ti;f=ti.prototype;f.yd=null;f.Jk=!1;f.Qd=0;f.Sl=0;function wi(a,b){var c="";b&&(a.yd=b,c=xi(b));a.src&&""==c||(c&&a.src!=c&&(a.src=c),b&&b.a||a.load())}function yi(a,b){0<a.readyState&&(a.currentTime=Math.max(ui,b))}f.getType=function(){return this.type};f.Va=function(a){this.Qd=a};f.getCurrentTime=function(){return this.Sl||this.currentTime};f.pp=function(){this.Sl=this.currentTime};
116 function cg(a){var b=a.Qd;if(Infinity==b)return 1;if(b&&a.buffered&&0<a.buffered.length){var c=zi(a);return a.buffered.end(c)/b}return 0}function Ai(a){a.ended&&yi(a,0);!a.hasAttribute("src")&&a.yd&&(a.src=xi(a.yd),a.yd.a||a.load());a.play()}function Bi(a){a.currentSrc&&(qi&&yi(a,0),Vc(a),a.removeAttribute("src"),a.load(),a.yd&&a.yd.a&&(a.yd=null))}function Ci(a){Bi(a);a.Qd=0;a.Sl=0;a.yd=null}function Di(a,b){a.defaultPlaybackRate=b;a.playbackRate=b}
117 function zi(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=zi(this);if(0<b)return!1;var c=this.getCurrentTime();return a.start(b)>c||a.end(b)<c};function Ei(a,b){b?a.setAttribute("crossorigin","true"):a.removeAttribute("crossorigin")}f.dw=function(){this.hasAttribute("controls")&&this.setAttribute("controls","true")};
118 f.ew=function(){this.Jk&&!this.muted&&(this.muted=!0)};var Fi=[2,5,100,101,150],Gi=[202,203];function Hi(a,b){a=a||64;a&128&&!b||a&2&&a&16||(this.b=a,this.a=b||null)}Hi.prototype.b=64;Hi.prototype.a=null;function Ii(a,b,c){return b==a.b&&c==a.a||b&128&&!c||b&2&&b&16?a:new Hi(b,c)}function Ji(a,b){return Ii(a,a.b|b)}function P(a,b){return!!(a.b&b)}function Ki(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 Li(){var a;return a=14};function R(){this.G=new kh;L(this,this.G)}y(R,Lf);R.prototype.D=function(a,b,c){return this.ha()?0:this.G.D(a,b,c)};R.prototype.W=function(a,b,c){return this.ha()?!1:this.G.W(a,b,c)};R.prototype.Wc=function(a){return this.ha()?!1:this.G.Wc(a)};R.prototype.u=function(a,b){return this.ha()?!1:this.G.u.apply(this.G,arguments)};function Mi(a,b,c){R.call(this);this.A=a;this.o=b;this.B=c;this.j=new Uh(250);this.j.addEventListener("tick",this.Xb,!1,this);L(this,this.j);this.i=[];this.a=[];this.b=new Xh}y(Mi,R);f=Mi.prototype;f.Qh=!1;f.sg=!1;f.Bk=!1;f.Ak=!1;f.Jg=null;f.ux=function(a){this.Xb();z(arguments,function(a){this.i.push(a);var c=this.b.a;!c.length||0<mh(a,c[c.length-1])?c.push(a):ib(c,a,mh);this.u("onAdd",a)},this);this.Xb()};f.vx=function(a){z(arguments,function(a){a=this.i.indexOf(a);0<=a&&Ni(this,a)},this);this.Xb()};
119 function Ni(a,b){var c=a.i.splice(b,1)[0],d=a.b.a,e=cb(d,mh||eb,c);0<=e&&Va(d,e);b=a.a.indexOf(c);0<=b&&a.a.splice(b,1);a.u("onRemove",c)}f.reset=function(){this.sg=this.Qh=!1;Oi(this);for(var a=this.i.length-1;0<=a;a--)Ni(this,a);this.Xb();this.k=null};
120 function Pi(a,b){if(a.sg&&!a.Qh)if(Oi(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=Yh(a.b,2147483646);d=d.concat(Zh(a.b,2147483646));e=[];if(c.length)for(var g=0;g<c.length;g++)e.push(["onExit",c[g]]);c=e.concat(Qi(a,d));for(d=0;d<c.length;d++)g=c[d],e=g[1],e.yb.u.apply(e.yb,g)}else P(b.state,16)?(a.g=Ri(a),a.j.stop(),a.j.start(),a.Xb()):(a.j.stop(),P(b.a,16)?(a.g=Ri(a),null!=$h(a.b,Math.max(a.g-2E3,0))&&(a.Jg=
121 Wh(v(a.Xb,a)))):a.Xb())}function Qi(a,b){var c=[];if(!b.length)return c;b.sort(oh);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}
122 f.Xb=function(){this.Ak=!0;if(!this.Bk)for(var a=3;this.Ak&&a;){this.Ak=!1;this.Bk=!0;if(this.sg&&!this.Qh){Oi(this);for(var b=Ri(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=Yh(this.b,b);e=this.o();!P(e,48)&&b>this.g&&(d=d.concat(Zh(this.b,this.g,b)));c=c.concat(Qi(this,d));this.g=b;!this.Qh&&this.k&&(c.unshift(["onLockBlockExit",this.k]),this.k=null,P(e,2)&&(this.g=2147483647));this.B()&&(b=$h(this.b,this.g),null!=b&&
123 (this.Jg=Wh(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.yb.u.apply(e.yb,b)}this.Bk=!1;a--}};function Oi(a){null!=a.Jg&&(l.clearTimeout(a.Jg),a.Jg=null)}function Ri(a){return P(a.o(),2)?2147483647:1E3*a.A()}f.F=function(){this.j.removeEventListener("tick",this.Xb,!1,this);Oi(this);this.k=this.b=this.a=this.i=null;Mi.C.F.call(this)};function Si(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])?Za(d[k],h):d[k]=[d[k],h]:d[k]=h}}return d}function Ti(a,b){var c=[];Cb(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 Ui(a){"?"==a.charAt(0)&&(a=a.substr(1));return Si(a,"&")}
124 function Vi(a){return-1!=a.indexOf("?")?(a=(a||"").split("#")[0],a=a.split("?",2),Ui(1<a.length?a[1]:a[0])):{}}function Wi(a){a=ie([],a);a[0]="";return a.join("")}function S(a,b){return fe(ie([a],b))}var Xi=de;function Yi(){var a=be(document.location.href);return $d(a[1],a[2],a[3],a[4])}function Zi(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=Ui(d[1]||""),e;for(e in b)d[e]=b[e];return S(a,d)+c};var $i=null;"undefined"!=typeof XMLHttpRequest?$i=function(){return new XMLHttpRequest}:"undefined"!=typeof ActiveXObject&&($i=function(){return new ActiveXObject("Microsoft.XMLHTTP")});function aj(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 bj(a,b,c,d,e,g,h){var k=$i&&$i();if("open"in k){k.onreadystatechange=function(){4==(k&&"readyState"in k?k.readyState:0)&&b&&hf(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=cj(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}}
125 function cj(a,b){b=b||{};var c;if(c=ef("PAGE_CL"))if(c=ef("PAGE_BUILD_TIMESTAMP")){var d;d||(d=window.location.href);c=be(a)[1]||null;var e=Xi(a);c&&e?(c=d,d=be(a),c=be(c),d=d[3]==c[3]&&d[1]==c[1]&&d[4]==c[4]):d=e?Xi(d)==e&&(Number(be(d)[4]||null)||null)==(Number(be(a)[4]||null)||null):!0;c=d||dj(a)}c&&(b["X-YouTube-Page-CL"]=ef("PAGE_CL"),b["X-YouTube-Page-Timestamp"]=ef("PAGE_BUILD_TIMESTAMP"));return b}
126 function dj(a){var b=["X-YouTube-Page-CL","X-YouTube-Page-Timestamp"],c=ef("CORS_HEADER_WHITELIST")||{};a=Xi(a);if(!a)return!0;var d=c[a];return d?La(b,function(a){return A(d,a)}):!1}
127 function ej(a,b){var c=b.format||"JSON";b.Bv&&(a=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+a);var d=b.zf;d&&(a=Zi(a,d));var e=b.Sw||"";(d=b.Nf)&&u(e)&&(e=Ui(e),Mb(e,d),e=Wi(e));var g=!1,h,k=bj(a,function(a){if(!g){g=!0;h&&I(h);var d=aj(a),e=null;if(d||400<=a.status&&500>a.status)e=fj(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.X||l;d?b.Oa&&b.Oa.call(k,
128 a,e):b.onError&&b.onError.call(k,a,e);b.td&&b.td.call(k,a,e)}},b.method,e,b.headers,b.responseType,b.withCredentials);b.al&&0<b.timeout&&(h=H(function(){g||(g=!0,k.abort(),I(h),b.al.call(b.X||l,k))},b.timeout));return k}function fj(a,b){var c=null;switch(a){case "JSON":var d=b.responseText,e=b.getResponseHeader("Content-Type")||"";d&&0<=e.indexOf("json")&&(c=lb(d));break;case "XML":if(d=(d=b.responseXML)?gj(d):null)c={},z(d.getElementsByTagName("*"),function(a){c[a.tagName]=hj(a)})}return c}
129 function gj(a){return a?(a=("responseXML"in a?a.responseXML:a).getElementsByTagName("root"))&&0<a.length?a[0]:null:null}function hj(a){var b="";z(a.childNodes,function(a){b+=a.nodeValue});return b}var ij={html5_ajax:"action_get_html5_token",watch_actions_ajax:"action_get_watch_actions_token",addto_ajax:"action_get_wl_token"},jj={html5_ajax:"html5_ajax_token",watch_actions_ajax:"watch_actions_ajax_token",addto_ajax:"addto_ajax_token"};
130 function kj(a,b,c,d,e){if(gf(a))d&&window.setTimeout(d,0);else{var g=Yi()+"/token_ajax",h={};b&&(h.Hy=b);c&&(h.Iy=c);h[ij[a]]=1;ej(g,{format:"RAW",method:"GET",zf:h,td:function(b){var c=Ui(b.responseText),g=c[jj[a]];g?(ff(a,g),d&&d()):e&&e(b,c)}})}};function lj(a){a=a.split("");a=mj(a,58);a=a.reverse();a=mj(a,50);a=a.slice(1);a=a.reverse();a=a.slice(1);a=a.reverse();a=mj(a,11);a=a.slice(3);return a.join("")}function mj(a,b){var c=a[0];a[0]=a[b%a.length];a[b]=c;return a};function nj(){this.lang=""};function oj(a,b,c,d,e,g){this.Sa=a;this.i=0<=b.indexOf("/mp4")?1:0<=b.indexOf("/webm")?2:0<=b.indexOf("/x-flv")?3:0;this.mb=b;this.b=g||0;this.j=c||null;this.a=d||null;this.g=e||null}function pj(a){return 2==a.i}function qj(a){return 0<=a.indexOf("opus")||0<=a.indexOf("vorbis")||0<=a.indexOf("mp4a")}function rj(a){return 0<=a.indexOf("vp9")||0<=a.indexOf("vp8")||0<=a.indexOf("avc1")};var sj={my:"auto",aD:"tiny",dC:"light",SMALL:"small",nC:"medium",LARGE:"large",JB:"hd720",IB:"hd1080",QB:"highres",fD:"unknown"};function tj(a,b,c){this.width=a;this.height=b;t:if(a||b){for(var d=1;d<uj.length;d++){var e=uj[d],g=vj[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 uj="auto highres hd1080 hd720 large medium small tiny".split(" "),vj={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 wj(a,b){this.start=a;this.end=b;this.length=b-a+1}function xj(a){a=a.split("-");return 2==a.length&&(a=new wj(parseInt(a[0],10),parseInt(a[1],10)),!isNaN(a.start)&&!isNaN(a.end)&&!isNaN(a.length)&&0<a.length)?a:null}wj.prototype.toString=function(){return this.start+"-"+(null==this.end?"":this.end)};var yj="corp.google.com youtube.com youtube-nocookie.com prod.google.com sandbox.google.com docs.google.com drive.google.com mail.google.com play.google.com".split(" "),zj=["2mdn.net"],Aj="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 Bj(){return-1!=document.location.toString().indexOf("/embed/")}
131 function Cj(a,b){return RegExp("^https?://([a-z0-9-]{1,63}\\.)*("+b.join("|").replace(/\./g,".")+")(:[0-9]+)?([/?#]|$)","i").test(a)}function Dj(a){a=new pe(a);qe(a,document.location.protocol);re(a,document.location.hostname);document.location.port&&se(a,document.location.port);return a.toString()};function Ej(a,b,c,d,e,g,h,k,m){this.a=a;this.ka=b;this.type=c;this.i=0<=d?d:-1;this.startTime=e||0;this.duration=g||0;this.Yb=h||0;this.kb=0<=k?k:this.ka.length;this.g=!!m;this.b=this.Yb+this.kb==this.ka.length;this.o=this.startTime+this.duration*this.Yb/this.ka.length;this.j=this.duration*this.kb/this.ka.length;this.k=this.o+this.j}function Fj(a){return 1==a.type||2==a.type}function Gj(a,b){return a.a==b.a&&a.ka.start+a.Yb+a.kb==b.ka.start+b.Yb}Ej.prototype.Uh=function(a){return this.a.Uh(this,a)};function Hj(a,b){this.info=a;this.data=b}function Ij(a){if(a.info.kb!=a.data.length)return!1;if(1==a.info.a.info.i){if(8>a.info.kb||4==a.info.type)return!0;var b=new DataView(a.data.buffer,a.data.byteOffset,a.data.byteLength),c=b.getUint32(0,!1),b=b.getUint32(4,!1);if(2==a.info.type)return c==a.info.kb&&1936286840==b;if(3==a.info.type&&0==a.info.Yb)return 1836019558==b}return!0};function Jj(a){this.a=a;this.b=0;this.g=-1}var Kj=0;function Lj(a,b){a.a=Zi(a.a,b)};function Mj(){this.Q=0;this.a=new Float64Array(128);this.b=new Float32Array(128);this.g=!1}Mj.prototype.fb=function(){return this.Q};function Nj(a,b){var c=cb(a.b.subarray(0,a.Q),eb,b);return 0<=c?c:Math.max(0,-c-2)}function Oj(a){if(a.a.length<a.Q+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.Q+1;b++)a.a[b]=c[b],a.b[b]=d[b]}}function Pj(a,b){this.b=a;this.a=0;this.g=b||0}
132 function Qj(a){for(var b=Rj(a,!1);236==b;)Sj(a),b=Rj(a,!1);return b}function Tj(a){var b=Rj(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 Pj(c,a.g+a.a);a.a+=b;return c}function Uj(a){for(var b=Rj(a,!0),c=Vj(a),d=1;d<b;d++)c=(c<<8)+Vj(a);return c}function Sj(a){var b=Rj(a,!0);a.a+=b}function Rj(a,b){var c=Vj(a);if(1==c){for(var d=c=0;7>d;d++)c=256*c+Vj(a);return c}for(var e=128,d=0;6>d&&e>c;d++)c=256*c+Vj(a),e*=128;return b?c-e:c}
133 function Vj(a){return a.b.getUint8(a.a++)};function Wj(a,b,c,d){this.info=b;this.j=new Jj(a);this.o=c;this.k=d;this.g=this.b=null;this.i=!1;this.index=new Mj;b=parseInt;c=a.search(me);d=le(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)}function Xj(a){return!(!a.b||!a.index.fb())}
134 function Yj(a,b){var c=new Ej(a,a.o,1),d=new Ej(a,a.k,2),e=[],g=[c];Gj(c,d)?g.push(d):e.push([d]);isNaN(a.a)?b=0:b>a.a&&(b=a.a);c=g[g.length-1];d=c.ka.end-g[0].ka.start+1;b>d&&(c=new wj(c.ka.end+1,c.ka.end+1+(b-d)-1),g.push(new Ej(a,c,4)));e.push(g);return e}
135 function Zj(a,b,c,d){for(var e=[];b<a.index.fb();b++){var g;g=a.index.a[b];g=new wj(g,g+(b+1<a.index.Q||a.index.g?a.index.a[b+1]-a.index.a[b]:-1)-1);var h=a.index.b[b],k;k=a.index;var m=b;k=m+1<k.Q||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.fb()-1&&m+p==g.length;e.push(new Ej(a,g,3,b,h,k,m,p,s));if(g.start+m+p>=c+d)break}return e}
136 function ak(a,b){for(var c=0;c+1<a.index.fb()&&b.ka.start>=a.index.a[c+1];)c++;return Zj(a,c,b.ka.start,b.ka.length)}Wj.prototype.Uh=function(a,b){Xj(this);if(!Xj(this)){var c=new wj(a.ka.end+1,a.ka.end+1+b-1);c.end+1>this.a&&(c=new wj(c.start,this.a-1));return[new Ej(a.a,c,4)]}4==a.type&&(c=ak(this,a),a=c[c.length-1]);var c=0,d=a.ka.start+a.Yb+a.kb;3==a.type&&(c=a.i,d==a.ka.end+1&&(c+=1));return Zj(this,c,d,b)};function bk(a,b,c){b=Nj(a.index,b);return Zj(a,b,a.index.a[b],c)};function ck(){this.duration=0;this.a={}}var dk=/PT(([0-9]*)H)?(([0-9]*)M)?(([0-9.]*)S)?/;function ek(a){var b=new ck;z(a,function(a){var d=a.type,e=a.itag,g=null;rj(d)&&(g=a.size.split("x"),g=new tj(parseInt(g[0],10),parseInt(g[1],10)));var h=null;qj(d)&&(h=new nj);d=new oj(e,d,h,g,null,parseInt(a.bitrate,10)/8);g=xj(a.init);h=xj(a.index);(a=fk(a.url,d,a.s))&&(b.a[e]=new Wj(a,d,g,h))});return b}
137 function gk(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 hk(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 fk(a,b,c){if(!Cj(a,yj))return"";b={alr:"yes",mime:b.mb.split(";")[0]};c&&(b.signature=lj(c));return Zi(a,b)};function ik(a,b,c,d,e,g,h,k,m){this.i={};this.o=a;this.G=b;this.b=c;this.a=d;this.g=e;this.A=g;this.j=h;this.k=k;this.B=m}function jk(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 kk(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:jk(a,c),su:g,wi:a.a,row:e,rows:h,eo:a.o*a.a,co:a.G*h}};function lk(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 ik(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 mk(a,b){var c=a.a[0].b-1;return tb(Math.round(c*b),0,c)}
138 function nk(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 ok={0:"MONO",1:"LEFT_RIGHT",2:"RIGHT_LEFT",3:"TOP_BOTTOM",4:"BOTTOM_TOP"};var pk={hC:1,iC:2,jC:3};var qk;var rk=Wb(),rk=rk.toLowerCase();if(-1!=rk.indexOf("android")){var sk=rk.match(/android\D*(\d\.\d)[^\;|\)]*[\;\)]/);if(sk)qk=Number(sk[1]);else{var tk={cupcake:1.5,donut:1.6,eclair:2,froyo:2.2,gingerbread:2.3,honeycomb:3,"ice cream sandwich":4,jellybean:4.1},uk=rk.match("("+Fb(tk).join("|")+")");qk=uk?tk[uk[0]]:0}}else qk=void 0;var vk,wk;function xk(){var a=n("yt.player.utils.videoElement_");a||(a=document.createElement("video"),qa("yt.player.utils.videoElement_",a));return a}function yk(){if(2.2==qk)return!0;var a=xk();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}}
139 function zk(){var a=Pc("div",{"class":"html5-player-css-loaded"});document.body.appendChild(a);var b="none"==kd(a,"display");F(a);return b};function Ak(){var a;if(void 0==vk&&(vk=!1,window.crypto&&window.crypto.wy))try{a=new Uint8Array(1),window.crypto.wy(a),vk=!0}catch(b){}if(vk){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=w(),e=0;e<d%23;e++)a[c]=Math.random();a[c]=Math.floor(256*Math.random())}return a}
140 function Bk(){for(var a=Ak(),b=[],c=0;c<a.length;c++)b.push("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"[a[c]&63]);return b.join("")}function Ck(){return Ja(Ak(),function(a){return(a&15).toString(16)}).join("")};function Dk(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 Ek(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 Fk(a,b){var c=U(a,b);c&&(c=Dj(c));return c}function Gk(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 Hk(a,b){this.a=a;this.b=b}Hk.prototype.clone=function(){return new Hk(this.a,this.b)};function Ik(a){this.a=[];if(a)t:{var b,c;if(a instanceof Ik){if(b=a.nc(),c=a.hc(),0>=a.fb()){a=this.a;for(var d=0;d<b.length;d++)a.push(new Hk(b[d],c[d]));break t}}else b=Fb(a),c=Eb(a);for(d=0;d<b.length;d++)Jk(this,b[d],c[d])}}function Jk(a,b,c){var d=a.a;d.push(new Hk(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=Ik.prototype;
141 f.remove=function(){var a=this.a,b=a.length,c=a[0];if(!(0>=b)){if(1==b)Sa(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.hc=function(){for(var a=this.a,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].b);return b};f.nc=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 Ik(this)};f.fb=function(){return this.a.length};
142 f.isEmpty=function(){return Ra(this.a)};f.clear=function(){Sa(this.a)};function Kk(){Ik.call(this)}y(Kk,Ik);function Lk(a){R.call(this);this.a=a;this.g=new Kk;this.i={}}y(Lk,R);Lk.prototype.b=!1;function Mk(a,b,c){var d;for(c=nk(a.a,c);0<=c;){d=a.a.a[c];if(d=d.i[Math.floor(b/(d.a*d.g))]?kk(d,b):null)return d;c--}return kk(a.a.a[0],b)}function Nk(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=jk(a.a.a[b.zn],b.An);c.onload=v(a.j,a,b.zn,b.An)}}
143 Lk.prototype.j=function(a,b){this.b=!1;var c=this.a.a[a];c.i[b]=!0;Nk(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 Ok(a,b,c){this.b=a;this.a=b;this.g=c}var Pk={playready:["com.youtube.playready"],widevine:["com.widevine.alpha"],clearkey:["org.w3.clearkey","webkit-org.w3.clearkey"]},Qk=["widevine","playready"];function Rk(a,b,c){if(!a.addKey&&!a.webkitAddKey)return null;for(var d=0;d<Qk.length;d++){var e=Qk[d];if(c[e])for(var g=Pk[e],h=0;h<g.length;h++){var k=g[h];if(a.canPlayType(b,k))return new Ok(e,k,c[e])}}return null};function Sk(a,b){this.a=a;this.b=b;this.i=0;Object.defineProperty(this,"timestampOffset",{get:this.Su,set:this.Tu});Object.defineProperty(this,"buffered",{get:this.Ru})}f=Sk.prototype;f.append=function(a){this.a.webkitSourceAppend(this.b,a)};f.abort=function(){this.a.webkitSourceAbort(this.b)};f.Ru=function(){return this.a.webkitSourceState==this.a.SOURCE_CLOSED?new Tk:this.a.webkitSourceBuffered(this.b)};f.Su=function(){return this.i};
144 f.Tu=function(a){this.i=a;this.a.webkitSourceTimestampOffset(this.b,a)};function Tk(){this.length=0};function Uk(a){this.activeSourceBuffers=this.sourceBuffers=[];this.a=a;this.b=NaN;this.g=0;Object.defineProperty(this,"duration",{get:this.Nu,set:this.Qu});Object.defineProperty(this,"readyState",{get:this.Ou});this.a.addEventListener("webkitsourceclose",v(this.Pu,this),!0)}function Vk(a){return window.MediaSource?new window.MediaSource:window.WebKitMediaSource?new window.WebKitMediaSource:HTMLMediaElement.prototype.webkitSourceAddId?new Uk(a):null}f=Uk.prototype;
145 f.addEventListener=function(a,b,c){this.a.addEventListener(a,b,c)};f.on=function(){return this.a.webkitMediaSourceURL};f.addSourceBuffer=function(a){var b=(this.g++).toString();this.a.webkitSourceAddId(b,a);a=new Sk(this.a,b);this.sourceBuffers.push(a);return a};
146 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.Ou=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""};
147 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.Pu=function(){Sa(this.sourceBuffers)};f.Nu=function(){return this.b};f.Qu=function(a){this.b=a;this.a.webkitSourceSetDuration&&this.a.webkitSourceSetDuration(a)};function Wk(){this.a=[]}Wk.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)};Wk.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)}};Wk.prototype.ha=function(){return null===this.a};Wk.prototype.dispose=function(){this.removeAll();this.a=null};function Xk(a,b,c,d){this.a=[];this.Af=this.zd=null;this.i=b;this.g=Vk(a);this.b="";this.j=null;this.listen(this.g,["sourceopen","webkitsourceopen"],oa(this.Vt,d,c));this.listen(this.g,["sourceclose","webkitsourceclose"],this.Ut)}y(Xk,Wk);var Yk={};f=Xk.prototype;f.Va=function(a){this.isOpen()?this.g.duration=a:this.i=a};f.isOpen=function(){return"open"==this.g.readyState};f.xc=function(){return"closed"==this.g.readyState};
148 f.Vt=function(a,b){isNaN(this.i)||(this.g.duration=this.i,this.i=NaN,this.zd=this.g.addSourceBuffer(a),this.Af=this.g.addSourceBuffer(b),this.j&&(this.j(this),this.j=null))};f.Ut=function(){this.dispose()};f.dispose=function(){Zk(this.b);this.b="";Xk.C.dispose.call(this)};function Zk(a){if(a)try{window.URL.revokeObjectURL(a)}catch(b){}}
149 function $k(a,b){var c={};if(window.MediaSource&&window.MediaSource.isTypeSupported)Ja(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=Yk[a[e]];if(void 0!=g)c[a[e]]=g;else{d=!0;break}}if(d){var d=xk(),e=Vk(d),g=e.on?e.a.webkitMediaSourceURL:window.URL.createObjectURL(e),h=oa(al,a,b,d,e,g);e.addEventListener("sourceopen",h,!1);e.addEventListener("webkitsourceopen",h,!1);d.src=g}else H(oa(b,c),0)}}
150 function al(a,b,c,d,e){for(var g={},h=0;h<a.length;h++){var k=Yk[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)}Yk[a[h]]=k}g[a[h]]=k}c.src="";Zk(e);b(g)};function bl(a,b,c,d){this.a=c;this.b=a;this.j=d||"";this.i=b;this.g={}}function xi(a){if(a.a)a=a.b;else if(a.i){var b;b=(new pe(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=ue(new pe(S(a.b,a.g)),b).toString()}else a=S(a.b,a.g);return a};function cl(a,b){var c=b.Sa in dl&&ri();this.i=(this.a=!!(a instanceof Array))?null:new bl(a,c,this.a,b.Sa);this.b=this.a?a[0]:null;this.g=this.a?a[1]:null;this.mc=b}cl.prototype.getInfo=function(){return this.mc};var el={'video/mp4; codecs="avc1.42001E, mp4a.40.2"':"maybe"},fl={"application/x-mpegURL":"maybe"},gl={"application/x-mpegURL":"maybe"};
151 function hl(a,b,c){if(!yk())return[];var d=il(a,b);a=!d.length&&b?il(a,!1):d;var e={};b=xk();c=c||(ii||ji&&si("crkey")?!0:!1);for(d=0;d<a.length;d++){var g=a[d];if((b.canPlayType(g.getInfo().mb)||jl(g))&&!(g.mc.Sa in kl||ri()&&"5"==g.mc.Sa)){var h=g.mc.a.i;if(!e[h]||pj(g.getInfo())&&!c||!pj(g.getInfo())&&c)e[h]=g}}var k=[];z(uj,function(a){(g=e[a])&&k.push(g)});return k}function jl(a){var b;a=a.getInfo().mb;hi?b=gl[a]:2.2==qk?b=el[a]:ii&&si("chrome")&&(b=fl[a]);return b||""}
152 var dl={5:!0,34:!0,35:!0},kl={52:!0,53:!0,54:!0,55:!0,60:!0,79:!0,87:!0},ll={EB:160,AB:133,CB:134,uB:135,qB:136,mB:137,vB:138,kB:140,BB:142,DB:143,xB:144,zB:222,yB:223,rB:145,tB:224,sB:225,nB:146,pB:226,oB:227,wB:147,lB:149,jB:261,FB:161,wD:171,vD:172,DD:194,AD:195,CD:220,BD:221,zD:196,yD:197,xD:198,JD:242,KD:243,GD:244,ID:245,HD:246,FD:247,ED:248};function ml(a){var b=[];z(a,function(a){a.url&&b.push(nl(a.url,a.type,"auto","0"))});return b}
153 function nl(a,b,c,d,e){var g=new nj;(c=vj[c])||(c=vj.small);e=new tj(c[0],c[1],e?-1:0);b=unescape(b.replace(/&quot;/g,'"'));return new cl(a,new oj(d,b,g,e))}function il(a,b){for(var c=[],d=0;d<a.length;d++){var e=a[d],g;if(g=ac)if(g=0!=e.mc.a.a)g=1==e.getInfo().i;g||0!=e.mc.a.a==b&&c.push(e)}return c}
154 function ol(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||lj(g.s);g.url=Zi(g.url,{signature:h})}g.url&&d.push(nl(g.url,g.type,g.quality,g.itag,g.stereo3d))}return hl(d,!!b,!!c)}function pl(a,b){var c=ml(a);return hl(c,!1,!!b)}
155 function ql(a,b,c,d,e,g){if(a){var h=[];if(g){g={};for(var k in a.a)h=a.a[k].info.mb,g[h]=window.MediaSource&&window.MediaSource.isTypeSupported?window.MediaSource.isTypeSupported(h):!!xk().canPlayType(h);rl(a,b,c,d,e,g)}else{for(k in a.a)h.push(a.a[k].info.mb);$k(h,v(rl,null,a,b,c,d,e))}}else c([])}
156 function rl(a,b,c,d,e,g){var h=null,k={},m={},p;for(p in ll){var s=ll[p],r=a.a[s];if(r&&g[r.info.mb]&&!(0<=r.info.mb.indexOf("vp9")&&si("cros armv7"))){if(r.info.g){h||(h=xk());if(!Rk(h,r.info.mb,r.info.g))continue;if(!e&&r.info.a&&(1280<=r.info.a.width||720<=r.info.a.height))continue;if(261==s&&!h.canPlayType('audio/mp4; codecs="aac51"',"com.widevine.alpha"))continue}if(s=0<r.info.mb.indexOf("/webm")?r.info.g?3:1:0<r.info.mb.indexOf("/mp4")?r.info.g?4:2:null){Lj(r.j,b);var x=r.info.j?k:m;x[s]=x[s]||
157 [];x[s].push(r)}}}a=[3,4,1,2];d&&(a=[4,3,2,1]);d=null;for(p=0;p<a.length;p++)if(k[a[p]]&&m[a[p]]){d=a[p];break}a=[];if(null!=d)for(fb(k[d],"itag"),k=k[d].pop(),p=0;p<m[d].length;p++)a.push(new cl([k,m[d][p]],m[d][p].info));db(a,function(a,b){var c=a.getInfo(),d=b.getInfo();return d.a.height-c.a.height||d.b-c.b});c(a)};function hg(a){R.call(this);this.k=[];this.da=new C(0,0);this.O=[];this.I=[];this.b={};this.va={};this.i={};sl(this,a)}y(hg,R);var tl=/\/img\/watermark\/youtube_(hd_)?watermark(-vfl\S{6})?.png$/,ul="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(" ");
158 f=hg.prototype;f.ga=!1;f.Ho=!0;f.bb=!1;f.Pk="";f.Ok="";f.Nk="";f.Lj=!1;f.zh=1;f.Ym=!1;f.pm=0;f.ue=0;f.xo=!1;f.vk=!1;f.Tm=3;f.li="";f.Ca="";f.Qk=!1;f.gg=!1;f.Vl=!1;f.rf=0;f.Ue=!1;f.Zm=!1;f.cg=0;f.hf=!1;f.Wl=!0;f.kj=!1;f.wo=!1;f.Fb=!1;f.Wk=!1;f.Nd=!1;f.Sn=!1;f.Xk=!1;f.Nj=0;f.wa=0;f.uh=0;f.dk=!1;f.nm=!1;f.gj=!1;f.vm=0;f.ig=!1;f.sm=!1;f.ya=0;f.ej=null;f.kf=null;f.Kj=!1;f.Jf=!1;f.mf=null;f.Oj=1;f.ye=0;f.Gl=null;f.Xl=!1;f.Mj=NaN;f.Qm=NaN;
159 function Eg(a,b){var c=b||{};c.iv_read_url&&(a.Pk=Dj(c.iv_read_url));c.iv_invideo_url&&(a.Ok=Dj(c.iv_invideo_url));c.iv_cta_url&&(a.Nk=Dj(c.iv_cta_url));a.author=U(a.author,c.author);a.vk=T(a.vk,c.cc_asr);a.li=Fk(a.li,c.ttsurl);a.Ca=U(a.Ca,c.cpn);a.g=U(a.g,c.subscribed);a.title=U(a.title,c.title);a.ba=U(a.ba,c.ypc_preview);a.dk=T(a.dk,c.paygated);c.keywords&&(a.va=vl(c.keywords));c.rvs&&(a.Kc=wl(c.rvs));z(ul,function(a){a in c&&(this.b[a]=c[a])},a)}
160 function sl(a,b){var c=b||{};a.bb="1"!=c.hlsdvr||ki||hi&&5>li?!1:!0;a.Lj="1"==c.infringe||"1"==c.muted;a.vo=c.authkey;a.Da=c.authuser;a.Ca||(a.Ca=c.cpn||Bk());a.Fc=c.csi_page_type;a.La=c.sw;a.gb=T(a.gb,c.dto);a.qb=c.t;a.Qk=T(a.Qk,c.cenchd);a.gg="1"==c.enable_cardio;a.Vl="1"==c.enable_cardio_before_playback;a.rf=void 0==(c.end||c.endSeconds)?a.rf:Number(c.end||c.endSeconds);a.Wl="1"!=c.no_get_video_log;a.kj="1"==c.tmi;a.wo="1"==c.livemonitor;a.Fb="1"==c.live_playback;a.Wk=T(a.Wk,c.mdx);a.Xk=T(a.Xk,
161 c.utpsa);a.Io=c.iurlmaxres;a.H=U(a.H,c.oauth_token);a.U=U(a.U,c.vvt);a.nd=c.osig;a.Hc=c.ptchn;a.Dc=c.oid;a.A=c.ptk;a.Gc=c.pltype;a.ab=c.plid;a.j=c.eventid;a.Na=U(a.Na,c.list);a.Lc=c.pyv_beacon_url;a.pd=c.purchase_id;a.fa=c.sdetail;a.od=c.sourceid;a.ea=U(a.ea,c.feature);a.Nc=1==(void 0==c.is_fling?a.Nc?1:0:Number(c.is_fling));a.oa=U(a.oa,c.ytr);a.Jo=c.iurlsd;a.Xl="1"==c.skip_kansas_logging;a.kf=Ek(a.kf,c.vq||c.suggestedQuality,sj);a.te=c.approx_threed_layout||0;a.Kj="1"==c.threed_converted;a.Ji=c.iurl;
162 a.gj="1"==c.sendtmp;a.ig=!!a.La||a.gj;a.ya=void 0==(c.start||c.startSeconds)?a.ya:Number(c.start||c.startSeconds);a.L=c.docid||c.video_id||c.videoId;xl(a,c.watermark);a.Ic=U(a.Ic,c.ypc_gid);a.Mc=U(a.Mc,c.ypc_license_session_token);if(c.ad3_module||c.ad_module)"1"==c.allow_html5_ads?(a.ga=!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.Zm=!0);c.adaptive_fmts&&(a.Ra=yl(a,c.adaptive_fmts));c.allow_embed&&
163 (a.Ho="1"==c.allow_embed);c.autoplay&&(a.hf="1"==c.autoplay);c.iv_load_policy&&(a.ca=zl(c.iv_load_policy,a.ca));c.cc_load_policy&&(a.Tm=zl(c.cc_load_policy,2));c.dash&&void 0===a.$&&(a.$="1"==c.dash);if(c.dashmpd){a.N=S(c.dashmpd,{cpn:a.Ca});var d=/\/s\/([0-9A-F.]+)/,e=d.exec(a.N);e&&(e=lj(e[1]),a.N=a.N.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=yl(a,c.url_encoded_fmt_stream_map));c.hlsvp&&(d=Dk(c.hlsvp,a.Ca,c.fexp&&-1!=c.fexp.indexOf("934005")&&
164 !c.on3g),a.O.push(d));c.length_seconds&&(a.wa=Ca(c.length_seconds));c.ldpj&&(a.uh=Ca(c.ldpj));c.loudness&&(a.za=c.loudness,a.zh=-15<a.za&&0>a.za?Math.pow(10,(-18-a.za)/20):1);c.partnerid&&(a.qd=Ca(c.partnerid));c.pyv_billable_url&&Cj(c.pyv_billable_url,Aj)&&(a.R=c.pyv_billable_url);c.pyv_conv_url&&Cj(c.pyv_conv_url,Aj)&&(a.Ia=c.pyv_conv_url);c.url_encoded_third_party_media&&(a.mf=wl(c.url_encoded_third_party_media));c.threed_module&&!c.threed_converted&&(a.S=c.threed_module,a.Jc=6);if("1"==c.track_embed||
165 c.tk)a.nm=!0;c.watch_ajax_token&&ff("watch_actions_ajax",c.watch_ajax_token);c.fresca_preroll&&a.I.push("fresca");c.ypc_clickwrap_preroll&&a.I.push("ypc_clickwrap");void 0!=c.start&&(a.Mj=c.start);void 0!=c.end&&(a.Qm=c.end);a.Ec=U(a.Ec,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.pm=Al(c.rmktPingThreshold,c.length_seconds);a.b=c;Eg(a,c);a.$&&Bl(a)}
166 function Bl(a){if(ii&&si("chrome")&&!pc(29)?0:window.MediaSource||window.WebKitMediaSource||HTMLMediaElement.prototype.webkitSourceAddId)if(a.Ra)a.B=ek(a.Ra);else if(a.N){var b={format:"RAW",method:"GET",X:a,Oa:a.jx,onError:a.ul};a.Ue=!0;a=Dj(a.N);ej(a,b)}}
167 f.jx=function(a){if(!this.ha()){if(200<=a.status&&400>a.status){var b=new ck;t:{a=a.responseText;a=(new DOMParser).parseFromString(a,"text/xml").getElementsByTagName("MPD")[0];var c;if(c=gk(a,"mediaPresentationDuration")){var d=dk.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=gk(d,"id"),g=gk(d,"mimeType"),h=gk(d,"codecs"),g=h?g+'; codecs="'+h+'"':g,
168 h=parseInt(gk(d,"bandwidth"),10)/8,k=null;rj(g)&&(k=new tj(parseInt(gk(d,"width"),10),parseInt(gk(d,"height"),10)));var m=null;qj(g)&&(m=new nj);var p=null,s=hk(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 oj(e,g,m,k,p,h);g=fk(hk(d,"BaseURL").textContent,e);h=hk(d,"SegmentBase");d=xj(h.attributes.indexRange.value);
169 h=xj(h.getElementsByTagName("Initialization")[0].attributes.range.value);d=new Wj(g,e,h,d);if(!d){a=!1;break t}b.a[d.info.Sa]=d}a=!0}if(this.B=a?b:null)this.wa=this.B.duration||this.wa}this.ul()}};f.ul=function(){this.ha()||(this.Ue=!1,this.u("dataloaded",this.b))};function Cl(a,b,c,d){ql(a.B,Dl(a),v(function(a){this.ha()||(a.length?(this.k=a,this.u("dataupdated"),b()):(this.$=!1,El(this,b,c)))},a),c,a.Qk,d)}
170 function El(a,b,c){a.k=a.mf&&a.Sn?pl(a.mf,c):ol(a.O,!!a.S||a.Jf,c);H(v(function(){this.ha()||(this.u("dataupdated"),b&&b())},a),0)}function Fl(a){return Ja(a.k,function(a){return a.mc.a.i}).concat(["auto"])}function Gl(a,b){var c=null;a.k.some(function(a){if(a.mc.a.i==b)return c=a,!0});return c}function Hl(a){var b=a.o&&a.o.i;if(!b)return null;pa(b.g,Dl(a));return b}function Dl(a){var b={};a.A&&(b.ptk=a.A,b.oid=a.Dc,b.ptchn=a.Hc,b.pltype=a.Gc);return b}
171 function Il(a,b){return u(a.va[b])?a.va[b]:null}function Jl(a){!a.Gl&&a.b.storyboard_spec&&(a.Gl=new lk(a.b.storyboard_spec));return a.Gl}function Kl(a){var b=Jl(a);!a.ej&&b&&(a.ej=new Lk(b),L(a,a.ej));return a.ej}function Ll(a,b){var c={format:"RAW",method:"GET",X:a,Oa:a.yx};a.Ue=!0;ej(b,c)}f.yx=function(a){this.ha()||(this.Ue=!1,a=Ui(a.responseText),"fail"==a.status?this.u("onStatusFail",a):(sl(this,a),this.Ue||this.ul()))};function zl(a,b){var c=parseInt(a,10);return Gb(pk,c)?c:b}
172 function wl(a){a=a.split(",");return a=a.map(function(a){return Ui(a)})}function yl(a,b){var c=wl(b);z(c,function(a){a.url&&(a.url=S(a.url,{cpn:this.Ca}))},a);return c}function vl(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 xl(a,b){if(b){var c=b.split(",");2<=c.length&&(a.Ma=c[1],a.Oc=c[0])}}function Ml(a,b){return!!a.b[b]}function Al(a,b){var c=Ca(b),d=Ca(a);return isNaN(d)||isNaN(c)?0:Math.min(d,c)};function Nl(a,b){this.type=a||"";this.id=b||""}Nl.prototype.toString=function(){return this.type+this.id};function Ol(a){R.call(this);this.a=[];this.b=[];this.pa=Math.max(0,a.index||0);this.loop=!!a.loop;this.ya=a.startSeconds||0;this.Nn="1"==a.mob;this.title=a.playlist_title||"";a.video_id&&(this.a[this.pa]=new hg(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":Pl(this,a.list);break;case "user_favorites":Ql(this,a.list);break;case "search":Rl(this,a.list);break;default:a.playlist_length&&(this.Pa=a.playlist_length),
173 this.g=new Nl(a.list.substr(0,2),a.list.substr(2)),this.Vg||Sl(this,"/list_ajax?style=json&action_get_list=1",{list:this.g})}else if(a.playlist){var b=a.playlist.toString().split(",");0<this.pa&&(this.a=[]);z(b,function(a){a&&this.a.push(new hg({video_id:a}))},this);this.Pa=this.a.length;this.be=!0}else a.videoList&&(0<this.pa&&(this.a=[]),z(a.videoList,function(a){this.a.push(new hg(a))},this),this.Pa=this.a.length,this.be=!0);sg(this,!!a.shuffle);a.suggestedQuality&&(this.i=a.suggestedQuality)}
174 y(Ol,R);f=Ol.prototype;f.loop=!1;f.ya=0;f.Po=!1;f.pa=0;f.title="";f.Pa=0;f.Nn=!1;f.be=!1;f.Vg=!1;f.Ne=null;function Tl(a){if(++a.pa>=a.Pa)if(a.loop)a.pa=0;else return null;rg(a,a.pa);return qg(a,a.pa)}function Ul(a){if(0>--a.pa)if(a.loop)a.pa=a.Pa-1;else return null;rg(a,a.pa);return qg(a,a.pa)}function qg(a,b){var c=void 0!=b?b:a.pa;if(c=a.a&&c in a.a?a.a[a.b[c]]:null)c.ya=a.ya||c.Mj;return c}
175 function sg(a,b){a.Po=b;var c=a.b&&null!=a.b[a.pa]?a.b[a.pa]:a.pa;a.b=[];for(var d=0;d<a.a.length;d++)a.b.push(d);a.pa=c;if(a.Po){c=a.b[a.pa];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.pa=d)}a.u("shuffle")}function rg(a,b){a.pa=tb(b,0,a.Pa-1);a.ya=0}function Vl(a){return a.Pa}function Pl(a,b){a.Vg||(a.g=new Nl("UU","PLAYER_"+b),Sl(a,"/list_ajax?style=json&action_get_user_uploads_by_user=1",{username:b}))}
176 function Ql(a,b){a.Vg||(a.g=new Nl("FL","PLAYER_"+b),Sl(a,"/list_ajax?style=json&action_get_favorited_by_user=1",{username:b}))}function Rl(a,b){if(!a.Vg){a.g=new Nl("SR",b);var c={search_query:b};a.Nn&&(c.mob="1");Sl(a,"/search_ajax?style=json&embeddable=1",c)}}function Sl(a,b,c){ej(S(b,c),{format:"JSON",Oa:function(a,b){Wl(this,b)},X:a})}
177 function Wl(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=qg(a);a.pa=0;a.a=[];z(b.video,function(a){a&&(a.video_id=a.encrypted_id,c&&a.video_id==c.L&&(this.pa=this.a.length),this.a.push(new hg(a)))},a);a.Pa=a.a.length;sg(a,!1);a.Vg=!1;a.be=!0;a.Ne&&a.Ne()}}f.F=function(){this.Ne=null;Of(this.a);Ol.C.F.call(this)};var Xl=!!l.DOMTokenList,Yl=Xl?function(a){return a.classList}:function(a){a=a.className;return u(a)&&a.match(/\S+/g)||[]},Zl=Xl?function(a,b){return a.classList.contains(b)}:function(a,b){return A(Yl(a),b)},V=Xl?function(a,b){a.classList.add(b)}:function(a,b){Zl(a,b)||(a.className+=0<a.className.length?" "+b:b)},$l=Xl?function(a,b){z(b,function(b){V(a,b)})}:function(a,b){var c={};z(Yl(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?
178 " "+d:d},W=Xl?function(a,b){a.classList.remove(b)}:function(a,b){Zl(a,b)&&(a.className=Ia(Yl(a),function(a){return a!=b}).join(" "))},am=Xl?function(a,b){z(b,function(b){W(a,b)})}:function(a,b){a.className=Ia(Yl(a),function(a){return!A(b,a)}).join(" ")};function X(a,b,c){c?V(a,b):W(a,b)}function bm(a,b){var c=!Zl(a,b);X(a,b,c);return c};function cm(a,b){this.$f=a;this.ef=b+"::"}y(cm,Mg);f=cm.prototype;f.$f=null;f.ef="";f.set=function(a,b){this.$f.set(this.ef+a,b)};f.get=function(a){return this.$f.get(this.ef+a)};f.remove=function(a){this.$f.remove(this.ef+a)};f.Kd=function(a){var b=this.$f.Kd(!0),c=this,d=new Qd;d.next=function(){for(var d=b.next();d.substr(0,c.ef.length)!=c.ef;)d=b.next();return a?d.substr(c.ef.length):c.$f.get(d)};return d};function dm(a){R.call(this);this.a=a;if(this.yl){a="yt-html5-player-modules::"+this.yl;var b=new Og;if(a=b.isAvailable()?a?new cm(b,a):b:null)this.o=new Pg(a)}}y(dm,R);f=dm.prototype;f.na="";f.kd="";f.Hd=!1;f.Z=!1;f.uc=null;f.yf=function(a){var b=Ya(arguments),c=v(this.vc,this),d=v(this.dd,this);z(b,function(a){a.namespace=this.na;a.yb.D("onEnter",c);a.yb.D("onExit",d)},this);this.u("command_add_cuerange",b,this.a.a)};f.Av=function(a){var b=Ya(arguments);this.u("command_remove_cuerange",b,this.a.a)};
179 function em(a){a.u("command_remove_cuerange_all",a.na,a.a.a)}function fm(a){a.u("command_preroll_ready",a.na,a.a.a)}function gm(a,b){V(b,a.na);a.a.app.P.U.appendChild(b)}function hm(a){a.u("command_show_dialog_area")}function im(a){a.u("command_hide_all_dialogs")}f.create=function(){var a=this.na+"-created";this.Xa(this.a);Zl(Q(this.a),a);V(Q(this.a),a);this.Hd=!0};f.destroy=function(){this.unload();W(Q(this.a),this.na+"-created");this.Hd=!1};
180 f.load=function(){V(Q(this.a),this.na+"-loaded");this.u("loaded",this.na)};f.unload=function(){W(Q(this.a),this.na+"-loaded");this.u("unloaded",this.na)};f.vc=function(){};f.dd=function(){};f.oe=function(){};f.log=function(a){this.u("command_log",this.kd,a)};function jm(a,b,c){var d={},e;for(e in b)d[a.na+"_"+e]=b[e];b={};for(var g in c)b[a.na+"_"+g]=c[g];a.u("command_log_timing",d,b)}f.Oi=function(){return null};
181 function km(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 lm(a,b,c){if(a.o)try{a.o.set(b,c)}catch(d){}}function mm(a,b){a.u("command_disable_controls",b,a.na)}function nm(a,b){a.u("command_enable_controls",b,a.na)}function om(a){a.u("command_stop_redirect_controls")}function pm(a){a.u("command_play",!1,a.a.a)}function qm(a){a.u("command_pause",!1,a.a.a)}f.jb=function(a){this.u("command_redirected_show_is_playing",a)};f.rq=function(){};f.jp=function(){return[]};
182 f.Xa=function(){return!1};f.Mo=function(a,b){this.uc&&this.uc.oe&&this.uc.oe.apply(this.uc,arguments)};f.Xh=function(){};function rm(a,b){this.a=a;this.yb=b;this.Lf=E("html5-endscreen",Q(this.a));V(this.Lf,this.Cl);this.Uf=E("html5-endscreen-content",Q(this.a))}f=rm.prototype;f.Cl="base-endscreen";f.Lf=null;f.Uf=null;f.yb=null;f.Hd=!1;f.create=function(){this.Hd=!0};f.destroy=function(){this.Hd=!1};f.load=function(){};function sm(a){this.a={};this.g={};this.i={};this.b=tm(this,a)}y(sm,Lf);function tm(a,b,c){var d=0,e=Sc(b[d++]);if(u(b[d])||t(b[d])||null===b[d]){var g=b[d++];t(g)&&(g=g.join(" "));if(g=um(a,e,"className",g))vm(a,e,"className",g),wm(a,g,e)}for(;d<b.length;d++){var h=b[d];if(t(h))tm(a,h,e);else if(ia(h)){var g=a,k=e,m=void 0;for(m in h)h[m]&&vm(g,k,m,um(g,k,m,h[m]))}else u(h)&&vm(a,e,"child",um(a,e,"child",h))}c&&c.appendChild(e);return e}f=sm.prototype;f.M=function(){return this.b};
183 function wm(a,b,c){var d=b.split(" ");if(1<d.length)for(b=0;b<d.length;b++)wm(a,d[b],c);else a.a[b]=c}f.T=function(a,b){q(b)?a.insertBefore(this.b,a.childNodes[b]||null):a.appendChild(this.b)};f.Ek=function(){F(this.b)};function um(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)xm(this,b,a[b])};function xm(a,b,c){if(c!=a.i[b]){var d=a.g["{{"+b+"}}"];d&&(a.i[b]=c,vm(a,d[0],d[1],c))}}
184 function vm(a,b,c,d){if("child"==c){Vc(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(tm(a,g)):g.M?c.push(g.M()):c.push(Tc(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.Ek();this.b=null;sm.C.F.call(this)};function ym(a){a&&(a.style.display="block")}function zm(a){a&&(a.style.display="none")}function Am(a,b){var c=Ve("requestAnimationFrame",window);return H(function(){c?c.call(window,a):a()},b||0)};function Z(a){this.template=new sm(a);L(this,this.template);this.element=this.template.M();this.A=[];this.k={}}y(Z,Lf);f=Z.prototype;f.M=function(){return this.element};f.T=function(a,b){this.template.T(a,b)};f.Ek=function(){this.template.Ek()};f.Aa=function(a){xm(this.template,"content",a)};f.show=function(){ym(this.element)};f.hide=function(){zm(this.element)};f.listen=function(a,b,c,d){a=K(a,b,v(c,this));this.A.push(a);u(d)&&this.k[d].push(a);return a};f.Vc=function(a){vf(a)};
185 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)};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)};
186 f.F=function(){this.Vc(this.A);this.element=null;Z.C.F.call(this)};function Bm(){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(Bm,Z);function Cm(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),ej("/get_video_metadata",{method:"GET",onError:d,Oa:c,zf:a,X:e}))};function Dm(a,b){rm.call(this,a,b);this.b=new Bm;this.b.T(this.Lf);Cm(this.a.getVideoData().L,!0,this.g,ba,this,this.a.J().Da,this.a.J().Ta)}y(Dm,rm);Dm.prototype.Cl="subscribecard-endscreen";
187 Dm.prototype.g=function(a,b){var c=b.user_info,d=this.a.getVideoData();d&&(d.ua=c.external_id);xm(this.b.template,"banner",c.channel_banner_url);xm(this.b.template,"image",c.channel_logo_url||c.image_url);xm(this.b.template,"author",c.channel_title||c.username);d=b.video_info;d.subscription_ajax_token&&ff("subscription_ajax",d.subscription_ajax_token);c=c.subscription_button_html;this.b.template.a["html5-subscribe-button-container"].innerHTML=c?c:""};function Em(a,b,c){c=c||{};var d=c.Ib;d||(d=document.createElement("style"),document.getElementsByTagName("head")[0].appendChild(d),d=d.sheet||d.styleSheet);c.reset&&Fm(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 Fm(a){for(var b=(a.cssRules||a.rules).length;0<b;b--){var c=a;c.deleteRule?c.deleteRule(0):c.removeRule(0)}};function Gm(a){this.V=a}y(Gm,Lf);Gm.prototype.g=null;Gm.prototype.b=null;Gm.prototype.a=null;function Hm(a){a.g||(a.g=E("ad-container",Q(a.V)),a.V.J().tb&&V(a.g,"ad-container-single-media-element"));return a.g}function Im(a){a.a&&(a.V.J().tb?(W(a.a,"ad-video"),Jm(a.V.app,a.a),a.a=null):(F(a.a),Ci(a.a)))}
188 function Km(a){if(!a.b){if(a.V.J().Gb){var b=Sc("button");V(b,"video-click-tracking");Uc(b,J("VISIT_ADVERTISERS_SITE"));var c=Sc("div");V(c,"video-click-tracking-container");c.appendChild(b);Hm(a).appendChild(c)}else b=Sc("div"),$l(b,["video-click-tracking","ad-video"]),Hm(a).appendChild(b);a.b=b}return a.b}Gm.prototype.F=function(){Gm.C.F.call(this);this.a&&(Jm(this.V.app,this.a),this.a=null);Im(this);Vc(Hm(this));this.g=this.b=null;delete this.V};
189 function Lm(a){if(!a.a){var b;b=a.V.app;if(b.a.tb){var c=od(b.i),d=Ad(b.i);b.N=new Ab(c.x,c.y,d.width,d.height);Mm(b.j);Di(b.i,1);Ci(b.i);b=b.i}else b=Nm.getTag();a.a=b;$l(a.a,["video-stream","ad-video"])}return a.a};function Om(a,b,c,d){Z.call(this,["div",{className:"ytp-button",role:"button","aria-label":"{{label}}"},"{{content}}"]);this.g=a;this.a=this.i=null;K(this.element,"keypress",v(this.O,this));a=this.g;var e=v(this.N,this);a.a&&Pm(a.a,this.element,e);b&&Qm(this,b);c&&Rm(this,c);d&&(this.a=d)}y(Om,Z);function Qm(a,b){b&&""!=b&&(a.i&&W(a.element,a.i),a.i=b,V(a.element,b))}function Rm(a,b){xm(a.template,"label",b)}Om.prototype.N=function(){return this.a?Tc(this.a):null};
190 Om.prototype.show=function(){var a=this.element;a&&(a.style.display="inline-block")};Om.prototype.O=function(a){if(13==a.keyCode||32==a.keyCode)Bf(this.element,"click"),a.preventDefault()};Om.prototype.F=function(){var a=this.g;if(a.a){var a=a.a,b=ja(this.element);Nf(a.a[b]);a.a[b]=null}this.g=null;Af(this.element);Om.C.F.call(this)};function Sm(a,b){Z.call(this,["canvas"]);this.element.width=a;this.element.height=b;this.width=a;this.height=b;this.X=this.element.getContext("2d");this.a=0;this.j=null}y(Sm,Z);Sm.prototype.g=function(a,b){I(this.a);this.a=Am(v(this.g,this,a,b),b);a.call(this,new Date-this.j)};Sm.prototype.F=function(){I(this.a);this.X=null;Sm.C.F.call(this)};function Tm(){Sm.call(this,84,84);this.b=this.width/2;this.o=this.height/2;this.i=Um}y(Tm,Sm);var Um=3*Math.PI/2,Vm=2*Math.PI;function Wm(a,b){var c=b*Vm+Um;a.X.beginPath();a.X.arc(a.b,a.o,40,a.i,c,!1);a.X.lineWidth=4;a.X.strokeStyle="#b8b8b8";a.X.stroke();a.i=c}
191 Tm.prototype.show=function(){this.X.globalAlpha=0.8;this.X.beginPath();this.X.arc(this.b,this.o,42,0,Vm);this.X.fillStyle="#333";this.X.fill();var a=35*(Math.sqrt(3)/2);this.X.save();this.X.fillStyle="#fff";this.X.globalAlpha=0.9;this.X.translate(a,this.b);this.X.beginPath();this.X.lineTo(0,a/2);this.X.lineTo(28,0);this.X.lineTo(0,-a/2);this.X.closePath();this.X.fill();this.X.restore();Wm(this,0)};function Xm(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 Ym={UC:"html5-stop-propagation",uA:"html5-chromeless",eC:"html5-live-dvr-disabled",fC:"html5-live-dvr-engaged",gC:"html5-live-playback",oC:"html5-mobile",qC:"modest-branding",sC:"html5-native-controls",ZC:"html5-tablet",YC:"html5-tablet-body",lC:"html5-main-video",jD:"html5-video-container",kD:"html5-video-content",lD:"html5-video-controls",mD:"ytp-fallback",nD:"ytp-fallback-content",pD:"html5-video-loader",uD:"html5-watermark",dA:"html5-branded-watermark",tD:"html5-viewport-sheet",AA:"html5-context-menu",
192 Fr:"html5-context-menu-copy-debug-info",Gr:"html5-context-menu-copy-embed-html",Hr:"html5-context-menu-copy-video-url",Ir:"html5-context-menu-copy-video-url-at-current-time",Jr:"html5-context-menu-link",Kr:"html5-context-menu-report-playback-issue",Lr:"html5-context-menu-show-video-info",BA:"html5-show-video-info-template",pC:"html5-modal-panel",WB:"html5-info-bar",Yz:"autohide-off",Zz:"autohide-on",Xz:"autohide-fade",Vz:"autohide-auto",Wz:"autohide-embeds",$z:"autohide-seekbar",Uz:"autohide-aspect",
193 KB:"hide-controls",LB:"hide-info-bar",MB:"html5-hide-share",NB:"html5-hide-volume",sD:"video-thumbnail",DC:"html5-popup-dialog",Oz:"html5-async-progress",Pz:"html5-async-success",Nz:"html5-async-error",pA:"html5-center-overlay",NC:"ytp-scalable-icon-shrink",MC:"ytp-scalable-icon-grow",RB:"house-brand"};function Zm(a,b){(a=Ic(a))&&a.style&&(a.style.display=b?"":"none",Dc(a,"hid",!b))}function $m(a){return(a=Ic(a))?!("none"==a.style.display||Cc(a,"hid")):!1}function an(a){z(arguments,function(a){Zm(a,!0)})}function bn(a){z(arguments,function(a){Zm(a,!1)})}function cn(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}
194 function dn(a,b,c){(a=Ic(a))&&a.style&&(b=cn(b))&&(a.style[b]=c)};var en=window.location.protocol+"//i.ytimg.com/",fn=4/3;function gn(a,b,c){var d;switch(b.qd){case 30:d=hn;break;default:d=jn}return d(a,b,c)}function jn(a,b,c){if(!c){c=a.clientHeight;a=a.clientWidth;if((900<a||600<c)&&b.Io)return b.Io;if((430<a||320<c)&&b.Jo)return b.Jo}return b.Ji?b.Ji:b.L?kn(b.L):""}function hn(a,b){return b.Ji?b.Ji:b.L?S("//docs.google.com/vt",{id:b.L,authuser:b.Da,authkey:b.vo}):"//docs.google.com/images/doclist/cleardot.gif"}
195 function kn(a,b){return(en+"vi/"+escape(a)+"/"+escape(b||"hqdefault.jpg")).replace("i.","i"+(a.charCodeAt(0)%ef("THUMBNAIL_NUM_SHARDS",1)+1)+".")};function ln(a,b,c){this.b=a;(a=b||null)||(a=mn(this.b));a="("+a.join("|")+")";a=sa("__%s__",a);this.g=RegExp(a,"g");this.a=c||{}}var nn=/__([a-z]+(?:_[a-z]+)*)__/g;function on(a,b){var c=Ic(a).innerHTML,c=c.replace(/^\s*(\x3c!--\s*)?/,""),c=c.replace(/(\s*--\x3e)?\s*$/,"");return new ln(c,b,void 0)}function mn(a){var b=[],c={};a.replace(nn,function(a,e){e in c||(c[e]=!0,b.push(e))});return b}
196 function pn(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 qn(a,b){this.V=a;this.G=b;var c=E("videowall-still-content-template",Q(this.V));this.B=on(c);c=Sc("a");c.tabIndex=0;V(c,"videowall-still");K(c,"click",v(this.yv,this));K(c,"keypress",v(this.zv,this));this.a=c;this.o=this.V.app.P.A}f=qn.prototype;
197 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=Jb(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=Xm(a.length_seconds);var g=kn(c&&a.thumbnail_ids?a.thumbnail_ids.split(",")[0]:this.j,b?"hqdefault.jpg":"mqdefault.jpg");this.a.style.backgroundImage="url("+g+")";
198 this.a.innerHTML=pn(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.M=function(){return this.a};f.select=function(a){this.i?rn(this.V.app,this.j,a||this.g,this.i):rn(this.V.app,this.j,a||this.g)};f.Hu=function(){var a=new Date-this.A;1E4>a?(Wm(this.b,a/1E4),a=1E4-a,E("videowall-still-listlabel-autoplay-message",this.a).innerHTML=nf("AUTOPLAY_MESSAGE",Math.ceil(a/1E3))):(kf(this.k),this.select("autoplay"))};
199 f.Iu=function(a){var b=ed(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.G.log({cancelButtonClick:"1"});kf(this.k)};f.yv=function(){this.select()};f.zv=function(a){switch(a.keyCode){case 13:case 32:this.select(),a.preventDefault()}};function sn(a,b,c){rm.call(this,a,b);this.kl=[];this.yb.D("onResize",this.$v,this);this.yb.D("videodatachange",this.aw,this);this.b=c}y(sn,rm);f=sn.prototype;f.Cl="videowall-endscreen";f.mh=null;f.pb=null;f.kl=null;f.ip=!1;f.nh=0;f.create=function(){sn.C.create.call(this);this.pb=this.a.getVideoData().Kc;tn(this)};f.destroy=function(){this.Uf.innerHTML="";delete this.pb;sn.C.destroy.call(this)};
200 f.load=function(){if(this.pb&&this.pb.length&&this.pb[0].endscreen_autoplay){var a=un(this,0);a.b=new Tm;V(a.b.element,"autoplay-play-canvas");a.b.T(a.a);a.b.show();X(a.a,"videowall-still-autoplay",!0);var b=E("videowall-still-listlabel-autoplay",a.a),c=new Om(a.o);c.T(b);Qm(c,"videowall-still-listlabel-autoplay-cancel");c.Aa(a.o.getMsg("YTP_BUTTON_CANCEL"));c.show();K(c,"click",v(a.Iu,a));a.G.log({cancelButtonShow:"1"});a.A=new Date;a.k=jf(v(a.Hu,a),50)}};
201 function tn(a){if(a.pb&&a.pb.length){X(a.Lf,"endscreen-enable-layout",!0);a.Uf.innerHTML="";var b=Ad(a.Lf);Zl(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.nh=0;else{var e=a.pb.length,g=!1,h="episodic"==a.pb[0].feature_type,k=a.pb[0].endscreen_autoplay;(a.pb[0].featured||h||k)&&2<d&&2<c&&(g=!0,e+=3);X(a.Uf,"feature-video",g);for(var k=h=0,m=yb(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-=
202 k,h++;else break;p=1.45*(h/k)>m}a.ip=p;c=new C(h,k);a.ip?(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 C(Math.floor(b),Math.floor(d));a.nh=c.width*c.height;g&&(a.nh-=3);a.mh&&Fm(a.mh);g=vn(b);d={Ib:a.mh};a.mh=Em(".videowall-still",g,d);g=vn(b.clone().scale(2));d.Ib=a.mh;Em(".feature-video .videowall-still:first-child",g,d);yd(a.Uf,b.width*c.width,b.height*c.height)}g=0;for(b=a.nh;g<b;g++)c=un(a,g),a.Uf.appendChild(c.M());X(a.Lf,"endscreen-enable-layout",!1)}}
203 function un(a,b){var c=a.kl[b];c||(c=new qn(a.a,a.b),a.kl[b]=c);c.update(a.pb[b],0==b&&a.pb[0].featured);return c}function vn(a){return["width:"+a.width+"px","height:"+a.height+"px"]}f.$v=function(){tn(this)};f.aw=function(){var a=this.a.getVideoData().Kc;this.pb!=a&&(this.pb=a,tn(this))};function wn(a){dm.call(this,a);a.J().xl?this.Tf=new Dm(this.a,this.G):a.J().qc?this.Tf=new sn(this.a,this.G,this):this.Tf=new rm(this.a,this.G)}y(wn,dm);f=wn.prototype;f.na="endscreen";f.kd="end";f.Tf=null;function xn(a){var b=a.J(),c=a.getVideoData();a=1==O(a.app).B;return yn(b)&&!Ml(c,"ypc_module")&&a}f.Xa=function(a){return xn(a)};
204 f.create=function(){wn.C.create.call(this);var a=Math.max(1E3*(this.a.getVideoData().wa-10),0),a=new nh(a,2147483647,{id:"preload"}),b=new nh(2147483647,2147483647,{id:"load",priority:6});this.yf(a,b)};f.destroy=function(){em(this);this.Tf.destroy();wn.C.destroy.call(this)};f.load=function(){wn.C.load.call(this);this.Tf.load();this.Z=!0};f.unload=function(){wn.C.unload.call(this);this.Z=!1};f.vc=function(a){wn.C.vc.call(this,a);"preload"==a.getId()?this.Tf.create():zn(this.a.app)||this.load()};
205 f.dd=function(a){"load"==a.getId()&&this.unload();wn.C.dd.call(this,a)};function An(a){return xn(a)?new wn(a):null};var Bn={created:1,ready:2,testing:4,"testing-starting":3,live:6,"live-starting":5,complete:8,"complete-starting":7};/*
206 Portions of this code are from MochiKit, received by
207 The Closure Authors under the MIT license. All other code is Copyright
208 2005-2009 The Closure Authors. All Rights Reserved.
209 */
210 function Cn(a,b){this.o=[];this.N=a;this.K=b||null;this.k=this.g=!1;this.j=void 0;this.H=this.uv=this.A=!1;this.G=0;this.i=null;this.B=0}Cn.prototype.cancel=function(a){if(this.g)this.j instanceof Cn&&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.N?this.N.call(this.K,this):this.H=!0;this.g||this.a(new Dn)}};Cn.prototype.I=function(a,b){this.A=!1;En(this,a,b)};function En(a,b,c){a.g=!0;a.j=c;a.k=!b;Fn(a)}
211 function Gn(a){if(a.g){if(!a.H)throw new Hn;a.H=!1}}Cn.prototype.b=function(a){Gn(this);En(this,!0,a)};Cn.prototype.a=function(a){Gn(this);En(this,!1,a)};function In(a,b,c,d){a.o.push([b,c,d]);a.g&&Fn(a);return a}function Jn(a){var b=new Cn;In(a,b.b,b.a,b);return b}function Kn(a){return Ka(a.o,function(a){return ha(a[1])})}
212 function Fn(a){a.G&&a.g&&Kn(a)&&(l.clearTimeout(a.G),delete a.G);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 Cn&&(d=!0,a.A=!0)}catch(m){b=m,a.k=!0,Kn(a)||(c=!0)}}a.j=b;d&&(In(b,v(a.I,a,!0),v(a.I,a,!1)),b.uv=!0);c&&(a.G=l.setTimeout(Ob(b),0))}function Hn(){ra.call(this)}y(Hn,ra);Hn.prototype.message="Deferred has already fired";
213 Hn.prototype.name="AlreadyCalledError";function Dn(){ra.call(this)}y(Dn,ra);Dn.prototype.message="Deferred was canceled";Dn.prototype.name="CanceledError";function Ln(a,b){var c=b||{},d=c.document||document,e=Sc("SCRIPT"),g={Xo:e,oc:void 0},h=new Cn(Mn,g),k=null,m=null!=c.timeout?c.timeout:5E3;0<m&&(k=window.setTimeout(function(){Nn(e,!0);h.a(new On(1,"Timeout reached for loading script "+a))},m),g.oc=k);e.onload=e.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(Nn(e,c.lv||!1,k),h.b(null))};e.onerror=function(){Nn(e,!0,k);h.a(new On(0,"Error while loading script "+a))};Lc(e,{type:"text/javascript",charset:"UTF-8",
214 src:a});Pn(d).appendChild(e);return h}function Pn(a){var b=a.getElementsByTagName("HEAD");return!b||Ra(b)?a.documentElement:b[0]}function Mn(){if(this&&this.Xo){var a=this.Xo;a&&"SCRIPT"==a.tagName&&Nn(a,!0,this.oc)}}function Nn(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 On(a,b){var c="Jsloader error (code #"+a+")";b&&(c+=": "+b);ra.call(this,c);this.code=a}y(On,ra);function Qn(a,b){this.b=new pe(a);this.a=b?b:"callback";this.oc=5E3}var Rn=0;Qn.prototype.send=function(a,b,c,d){a=a||null;d=d||"_"+(Rn++).toString(36)+w().toString(36);l._callbacks_||(l._callbacks_={});var e=this.b.clone();if(a)for(var g in a)a.hasOwnProperty&&!a.hasOwnProperty(g)||Ee(e,g,a[g]);b&&(l._callbacks_[d]=Sn(d,b),Ee(e,this.a,"_callbacks_."+d));b=Ln(e.toString(),{timeout:this.oc,lv:!0});In(b,null,Tn(d,a,c),void 0);return{Ba:d,ic:b}};
215 Qn.prototype.cancel=function(a){a&&(a.ic&&a.ic.cancel(),a.Ba&&Un(a.Ba,!1))};function Tn(a,b,c){return function(){Un(a,!1);c&&c(b)}}function Sn(a,b){return function(c){Un(a,!0);b.apply(void 0,arguments)}}function Un(a,b){l._callbacks_[a]&&(b?delete l._callbacks_[a]:l._callbacks_[a]=ba)};function Vn(a){R.call(this);this.g=pn(new ln("http://gdata.youtube.com/feeds/api/users/live/broadcasts/__video_id__/states?v=2&alt=json-in-script"),{video_id:a});this.a=new Uh(15E3+Math.floor(3E4*Math.random()));this.a.addEventListener("tick",v(this.b,this));this.b();this.a.start()}y(Vn,R);Vn.prototype.F=function(){this.a.dispose();Vn.C.F.call(this)};Vn.prototype.b=function(){(new Qn(this.g)).send(null,v(this.j,this),v(this.i,this))};
216 Vn.prototype.j=function(a){this.u("payload",a);Vh(this.a,15E3+Math.floor(3E4*Math.random()))};Vn.prototype.i=function(){this.u("error");var a=this.a.a;192E4>a&&Vh(this.a,2*a)};function Wn(){this.g=new sm(["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(Wn,Lf);Wn.prototype.M=function(){return this.b};
217 Wn.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=J("FRESCA_COMPLETE_MESSAGE");break t;default:a=J("FRESCA_STAND_BY_MESSAGE")}a=[a]}this.g.update({heading:a[0]||"",subheading:a[1]||"",long_text:a[2]||""});this.j()}};
218 function Xn(a){var b=Math.floor((new Date).valueOf()/1E3);return b>a?J("FRESCA_STARTING_SOON_MESSAGE"):Xm(a-b)}Wn.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:Xn(this.a.startTime)}),I(this.i),this.i=H(v(this.j,this),1E3))};Wn.prototype.F=function(){I(this.i);this.b=null;Wn.C.F.call(this)};function Yn(a){this.a=[];a&&Zn(this,a)}Yn.prototype.state=-1;function Zn(a,b){var c=b.feed;if(c){var d=c.yt$lifeCycleState;d&&(a.state=Bn[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=Ja(c,function(a){return a.$t}))}};function $n(a){dm.call(this,a)}y($n,dm);f=$n.prototype;f.na="fresca";f.kd="fresca";f.fi=!1;f.Lg=!1;f.Xa=function(){return Ml(this.a.getVideoData(),"fresca_module")};f.create=function(a){$n.C.create.call(this);this.fi=this.Lg=!1;nm(this,["play_pause","seek"]);this.i=new Wn;this.a.app.P.g.appendChild(this.i.M());this.g=a||new Vn(this.a.getVideoData().L);this.g.D("payload",this.Vu,this);this.g.D("error",this.Uu,this);this.D("onStateChange",this.Ao,this)};
219 f.destroy=function(){this.Z&&this.unload();this.W("onStateChange",this.Ao,this);Of(this.g,this.i);$n.C.destroy.call(this)};f.load=function(){$n.C.load.call(this);this.Z=!0};f.unload=function(){this.Z=!1;$n.C.unload.call(this)};f.Ao=function(a){this.b&&(this.fi=P(a.state,2),(ao(a,16)||this.fi)&&bo(this,this.b))};f.Uu=function(){this.Lg||(this.b=new Yn,bo(this,this.b))};f.Vu=function(a){this.b=new Yn(a);6!=this.b.state||this.a.getVideoData().O.length?bo(this,this.b):this.a.Uj(this.a.getVideoData().L)};
220 function bo(a,b){var c=6>b.state;!c&&a.a.app.b.ca&&(b.b||b.a.length)&&(c=!0);a.fi&&!a.a.J().qc&&(c=!0);if(!a.Lg)switch(b.state){case 6:a.Lg=!0;nm(a,["play_pause","seek"]);fm(a);break;case 8:case 7:c=a.Lg=!0}c&&a.i.update(b);c&&!a.Z?a.load():!c&&a.Z&&a.unload()}function co(a){return Ml(a.getVideoData(),"fresca_module")?new $n(a):null};function eo(a){this.Kg=a||window;this.ee=[]}f=eo.prototype;f.Kg=null;f.ee=null;f.listen=function(a,b,c,d){c=v(c,d||this.Kg);a=K(a,b,c);this.ee.push(a);return a};function fo(a,b,c,d){d=v(d,a.Kg);b=wf(b,c,d);a.ee.push(b);return b}function go(a,b,c){c=v(c,a.Kg);b=zf(b,c,"yt-uix-button-menu-item");a.ee.push(b)}f.Vc=function(a){vf(a);Ua(this.ee,a)};f.removeAll=function(){vf(this.ee);this.ee=[]};function ho(a,b,c){this.a=a;this.i=b||0;this.b=c;this.g=v(this.iu,this)}y(ho,Lf);f=ho.prototype;f.Ba=0;f.F=function(){ho.C.F.call(this);this.stop();delete this.a;delete this.b};f.start=function(a){this.stop();this.Ba=Wh(this.g,q(a)?a:this.i)};f.stop=function(){0!=this.Ba&&l.clearTimeout(this.Ba);this.Ba=0};f.iu=function(){this.Ba=0;this.a&&this.a.call(this.b)};var io={},jo=null;function ko(a){a=ja(a);delete io[a];Ib(io)&&jo&&jo.stop()}function lo(){jo||(jo=new ho(function(){mo()},20));var a=jo;0!=a.Ba||a.start()}function mo(){var a=w();Cb(io,function(b){no(b,a)});Ib(io)||lo()};function oo(){Rh.call(this);this.a=0;this.k=this.startTime=null}y(oo,Rh);f=oo.prototype;f.rk=function(){this.Gd("begin")};f.Ni=function(){this.Gd("end")};f.td=function(){this.Gd("finish")};f.onStop=function(){this.Gd("stop")};f.Gd=function(a){Sh(this,a)};function po(a,b,c,d){oo.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(po,oo);f=po.prototype;f.gd=0;
221 function qo(a){if(0==a.a)a.gd=0,a.b=a.g;else if(1==a.a)return;ko(a);var b=w();a.startTime=b;-1==a.a&&(a.startTime-=a.duration*a.gd);a.k=a.startTime+a.duration;a.gd||a.rk();a.Gd("play");-1==a.a&&a.Gd("resume");a.a=1;var c=ja(a);c in io||(io[c]=a);lo();no(a,b)}f.stop=function(a){ko(this);this.a=0;a&&(this.gd=1);ro(this,this.gd);this.onStop();this.Ni()};f.F=function(){0==this.a||this.stop(!1);this.Gd("destroy");po.C.F.call(this)};f.destroy=function(){this.dispose()};
222 function no(a,b){a.gd=(b-a.startTime)/(a.k-a.startTime);1<=a.gd&&(a.gd=1);ro(a,a.gd);1==a.gd?(a.a=0,ko(a),a.td(),a.Ni()):1==a.a&&a.pl()}function ro(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.pl=function(){this.Gd("animate")};f.Gd=function(a){Sh(this,new so(a,this))};function so(a,b){ph.call(this,a);this.x=b.b[0];this.y=b.b[1];this.duration=b.duration;this.state=b.a}y(so,ph);var to=/#(.)(.)(.)/;function uo(a){if(!vo.test(a))throw Error("'"+a+"' is not a valid hex color");4==a.length&&(a=a.replace(to,"#$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 vo=/^#(?:[0-9a-f]{3}){1,2}$/i;function wo(a,b,c,d,e){po.call(this,b,c,d,e);this.element=a}y(wo,po);wo.prototype.i=ba;wo.prototype.pl=function(){this.i();wo.C.pl.call(this)};wo.prototype.Ni=function(){this.i();wo.C.Ni.call(this)};wo.prototype.rk=function(){this.i();wo.C.rk.call(this)};function xo(a,b,c,d,e){if(2!=b.length||2!=c.length)throw Error("Start and end points must be 2D");wo.apply(this,arguments)}y(xo,wo);
223 xo.prototype.i=function(){this.element.style.left=Math.round(this.b[0])+"px";this.element.style.top=Math.round(this.b[1])+"px"};function yo(a){return a*a*a}function zo(a){return 1-Math.pow(1-a,3)};function Ao(a,b,c,d,e){this.ob=a;this.element=b;this.g=c;this.j=d;this.uk=e;this.xc=this.a=!1}function Bo(a,b){var c=Pc("div","annotation-x-button-container"),d=Pc("div","annotation-x-button");c.appendChild(d);a.g.listen(c,"click",v(function(a){var c=this.uk,d=this.ob;d&&d.i&&c.log_(Co(c,d,4));b(a);a.stopPropagation();this.xc=!0},a));return c}f=Ao.prototype;f.M=function(){return this.element};f.show=function(){};f.hide=function(){};f.destroy=function(){F(this.element)};
224 f.Oo=function(){var a=this.j.ug,b=this.j.Sc,c=Ad(this.element),d=b.height-a.top,e=c.width<b.width&&c.height<b.height;md(this.element,a.width-b.width+a.left,this.a&&e?d-c.height:d)};function Do(a,b,c,d,e){Ao.call(this,a,b,c,d,e);this.b=Pc("div","invideo-video-text-container");this.i=!1}y(Do,Ao);function Eo(a){var b=new xo(a.element,[a.element.offsetLeft,a.element.offsetTop],[a.element.offsetLeft,a.element.offsetTop-a.element.offsetHeight],300,zo);Gh(b,"begin",v(function(){this.a=!0},a));qo(b)}
225 function Fo(a){var b=new xo(a.element,[a.element.offsetLeft,a.element.offsetTop],[a.element.offsetLeft,a.element.offsetTop+a.element.offsetHeight+4],300,yo);Gh(b,"end",v(function(){this.a=!1;bn(this.element)},a));qo(b)}
226 function Go(a){yd(a.element,444,56);var b=a.ob.data,c={src:b.image_url,"class":"invideo-video-img"},d=Pc("div","invideo-video-img-container"),c=Pc("img",c);yd(c,100,56);d.appendChild(c);a.element.appendChild(d);yd(a.b,244,56);d=Pc("span","iv-subtitle-text");Zc(d,b.text_line_1);a.b.appendChild(d);d=Pc("span","iv-title-text");Zc(d,b.text_line_2);a.b.appendChild(d);a.element.appendChild(a.b);b=Bo(a,v(function(){Fo(this)},a));a.element.appendChild(b);a.g.listen(a.element,"click",v(function(){var a=Ho(this.ob);
227 Io(this.uk,this.ob);window.open(a.value)},a))}Do.prototype.show=function(){if(!this.a){this.i||(Go(this),this.i=!0);this.Oo();an(this.element);var a=this.uk,b=this.ob;b&&b.i&&a.log_(Co(a,b,2));Eo(this)}};Do.prototype.hide=function(){this.a&&Fo(this)};function Jo(a,b,c){Z.call(this,["div","ytp-segmented-control"]);this.g=a;this.b=-1;this.a=[];q(b)&&Ko(this,b,c)}y(Jo,Z);function Ko(a,b,c){Of(a.a);a.a=[];for(var d=0;d<b.length;d++){var e=new Om(a.g);a.a[d]=e;c?e.Aa(["div",b[d]]):e.Aa(b[d]);0!=d&&V(e.M(),"ytp-segmented-control-other");Lo(e,d==a.b);K(e,"click",v(a.i,a));e.T(a.element)}}
228 Jo.prototype.T=function(a,b){Jo.C.T.call(this,a,b);for(var c=0,d=0;d<this.a.length;d++)c=Math.max(c,Ad(this.a[d].M()).width);if(c)for(d=0;d<this.a.length;d++)zd(this.a[d].M(),c)};function Mo(a,b){a.b=b;for(var c=0;c<a.a.length;c++)Lo(a.a[c],c==b)}Jo.prototype.getSelected=function(){return this.b};
229 function Lo(a,b){if(b){var c=a.M();W(c,"ytp-segmented-control-deselected");V(c,"ytp-segmented-control-selected")}else c=a.M(),W(c,"ytp-segmented-control-selected"),V(c,"ytp-segmented-control-deselected")}Jo.prototype.i=function(a){for(var b=0;b<this.a.length;b++)if(this.a[b]==a.currentTarget){var c=!1;this.b!=b?(c=!0,Mo(this,b)):2==this.a.length&&(c=!0,Mo(this,0==b?1:0));if(c){Bf(this.element,"change");break}}};Jo.prototype.F=function(){Ko(this,[]);this.g=null;Jo.C.F.call(this)};function No(a,b){return null!=b&&!!b.match(a)}function Oo(a,b){for(var c in a)if(a[c]==b)return!0;return!1}function Po(a,b,c,d){var e=new Qo;e.type=c;e.defaultValue=d;e.b=oa(No,/.+/);return Ro(a[b],e)}function So(a,b,c){var d=new Qo;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 Ro(a[b],d)}
230 function To(a,b,c,d){var e=new Qo;e.type=c;e.defaultValue=d;return Ro(a[b],e)}function Uo(a,b,c,d,e){var g=new Qo;g.type=d;g.defaultValue=e;g.b=oa(Oo,c);return Ro(a[b],g)}function Vo(a,b,c){var d=new Qo;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 Ro(a[b],d)}function Wo(a,b,c){var d=new Qo;d.type="OPTIONAL";d.defaultValue=c;d.a=function(a){return parseFloat(a)};return Ro(a[b],d)}
231 function Xo(a){var b=new Qo;b.type="OPTIONAL";b.defaultValue=0;b.a=function(a){return parseInt(a,10)};return Ro(a.d,b)}function Yo(a,b,c,d,e,g,h){var k=new Qo;k.type="OPTIONAL";k.a=function(a){a=10==c?parseFloat(a):parseInt(a,c);return g&&null!=a&&!isNaN(a)?tb(a,d,e):a};k.defaultValue=h;k.b=function(a){return null!=a&&!isNaN(a)&&a>=d&&a<=e};return Ro(a[b],k)}
232 function Zo(a,b){var c=new Qo;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 Ro(a[b],c)}function $o(a,b){return null==b?null:a(b)}function ap(a,b,c,d,e){if(null==a||null==a[b])return null;var g=new Qo;g.type=d;g.defaultValue=e;g.b=function(a){return!!a};g.a=oa($o,c);return Ro(a[b],g)}
233 function Ro(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?bp(t(a)?a:[a],b):null!=b.defaultValue?t(b.defaultValue)?b.defaultValue:[b.defaultValue]:[]:"IDLIST"==b.type?cp(a,b):null;return c}
234 function cp(a,b){function c(a){return Ia(a.split(/ +/),function(a){return""!=a})}return null!=a?bp(c(a),b):null!=b.defaultValue?t(b.defaultValue)?b.defaultValue:[b.defaultValue]:[]}function bp(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 Qo(){this.a=dp;this.b=ep}Qo.prototype.type="OPTIONAL";Qo.prototype.defaultValue=null;function dp(a){return null==a?null:a.toString()}
235 function ep(a){return null!=a};function fp(a){this.value=a}function gp(a){a=Zo(a,"value");return new fp(a)};function hp(){}function ip(a){var b=To(a,"external_user_id","OPTIONAL");a=To(a,"subscription_token","OPTIONAL");return b&&a?new hp:null};function jp(a,b,c,d){this.value=a;this.target=b;this.a=c;this.b=d}var kp={DA:"current",tC:"new"};function lp(a){var b=To(a,"value","OPTIONAL");if(null==b||null==Vi(b))return null;var c=Uo(a,"target",kp,"OPTIONAL","current");if(null==c)return null;Vo(a,"trusted",!1);var d=To(a,"link_class","OPTIONAL","");a=Vo(a,"show_link_icon",!0);return new jp(b,c,d,a)}function mp(a){return a.value?a.value:null};function np(a,b,c,d){this.type=a;this.trigger=b;this.url=c;this.duration=d}var op={ny:"close",kC:"log",xC:"openUrl",PAUSE:"pause",ry:"subscribe"},pp={CLICK:"click",ny:"close",oy:"hidden",LC:"rollOut",py:"rollOver",qy:"shown"};function qp(a){var b=Uo(a,"type",op,"OPTIONAL"),c=Uo(a,"trigger",pp,"OPTIONAL"),d=ap(a,"url",lp,"OPTIONAL");ap(a,"subscribeData",ip,"OPTIONAL");a=ap(a,"duration",gp,"OPTIONAL");return b?new np(b,c,d,a):null};function rp(a,b,c,d,e,g,h,k,m,p,s,r,x,M){this.k=a;this.j=b;this.o=c;this.G=d;this.a=e;this.H=g;this.i=h;this.textAlign=k;this.I=m;this.A=p;this.padding=s;this.b=r;this.g=x;this.B=M}
236 function sp(a){var b=So(a,"fgColor","#1A1A1A"),c=So(a,"bgColor","#FFF"),d=So(a,"borderColor","#000"),e=Yo(a,"borderWidth",10,0,5,!1,0),g=Yo(a,"bgAlpha",10,0,1,!1,0.8);Yo(a,"borderAlpha",10,0,1,!1,0.2);Yo(a,"gloss",16,0,255,!1,0);var h=So(a,"highlightFontColor","#F2F2F2"),k=Yo(a,"highlightWidth",10,0,5,!1,3),m=To(a,"textAlign","OPTIONAL",""),p=Yo(a,"textSize",10,3.3,30.1,!0,3.6107),s=To(a,"fontWeight","OPTIONAL",""),r;r=(r=a?a.padding&&a.padding.length?a.padding[0]:a.padding:null)?new wb(parseFloat(r.top),
237 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 x=To(a,"effects","IDLIST"),M=Yo(a,"cornerRadius",10,0,10,!0,0);a=ap(a,"gradient",tp,"OPTIONAL");return new rp(b,c,d,e,g,h,k,m,p,s,r,x,M,a)}function up(a,b,c,d,e,g,h,k){this.j=a;this.o=b;this.k=c;this.G=d;this.a=e;this.b=g;this.g=h;this.i=k}
238 function tp(a){var b=Yo(a,"x1",10,0,100,!0,0),c=Yo(a,"y1",10,0,100,!0,0),d=Yo(a,"x2",10,0,100,!0,100),e=Yo(a,"y2",10,0,100,!0,100),g=So(a,"color1","#FFF"),h=So(a,"color2","#000"),k=Yo(a,"opacity1",10,0,100,!0,100);a=Yo(a,"opacity2",10,0,100,!0,0);return new up(b,c,d,e,g,h,k,a)};function vp(a,b){this.a=a;this.L=b}function wp(a){var b=To(a,"standard_url","OPTIONAL","");To(a,"rollover_url","OPTIONAL","");To(a,"click_url","OPTIONAL","");a=To(a,"video_id","OPTIONAL","");return new vp(b,a)};function xp(a,b,c){var d=a.G,e=a.A,g=a.a?a.a:"xy",h=yp(c,a.j,g);a=zp(c,a.g,g);var g=640*b.width*h/100,k=360*b.height*a/100;return new Ab(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 yp(a,b,c){var d=(c="xx"==c||"xy"==c)?640:360;return(d+((c?a.width:a.height)-d)*b)/d}function zp(a,b,c){var d=(c="xy"==c||"yy"==c)?360:640;return(d+((c?a.height:a.width)-d)*b)/d};function Ap(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.G=h;this.A=k;this.j=m;this.g=p;this.a=s}function Bp(a,b){var c=Wo(a,"x",0),d=Wo(a,"y",0),e=Wo(a,"w",0),g=Wo(a,"h",0),h=Zo(a,"t"),k=Xo(a),m=Wo(a,"px",0),p=Wo(a,"py",0),s=Wo(a,"scaleSlope",1),r=Wo(a,"scaleSlopeX",s),s=Wo(a,"scaleSlopeY",s),x=To(a,"scaleDimension","OPTIONAL","xy");return b(c,d,e,g,h,k,m,p,r,s,x)}
239 function Cp(a,b,c){c=c?Cp(c,b):null;a=xp(a,new Ab(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=tb(a.left,b.left,b.left+b.width-a.width):(c.left=b.left,c.width=b.width),a.height<b.height?c.top=tb(a.top,b.top,b.top+b.height-a.height):(c.top=b.top,c.height=b.height));return c}function Dp(a){return Bp(a,function(a,c,d,e,g,h,k,m,p,s,r){return new Ap(a,c,d,e,g,h,k,m,p,s,r)})};function Ep(a,b,c,d,e,g,h,k,m,p,s,r,x){Ap.call(this,a,b,c,d,e,k,m,p,s,r,x);this.B=g;this.H=h}y(Ep,Ap);function Fp(a){var b=Wo(a,"sx",0),c=Wo(a,"sy",0);return Bp(a,function(a,e,g,h,k,m,p,s,r,x,M){return new Ep(a,e,g,h,k,b,c,m,p,s,r,x,M)})};function Gp(a,b,c){this.type=a;this.b=b;this.a=c}var Hp={ly:"anchored",HC:"rect"};function Ip(a){var b=Uo(a,"type",Hp,"OPTIONAL","rect"),c=ap(a,"rectRegion",Dp,"REPEATED");a=ap(a,"anchoredRegion",Fp,"REPEATED");return new Gp(b,c,a)}function Jp(a){return a.b&&a.b.length?a.b[0]:a.a&&a.a.length?a.a[0]:null};function Kp(a,b){this.b=a;this.a=b}function Lp(a){Po(a,"timeRelative","OPTIONAL");var b=Po(a,"spaceRelative","OPTIONAL");return(a=ap(a,"movingRegion",Ip,"REPEATED"))?new Kp(b,a):null};function Mp(a,b){this.state=a;this.a=b}var Np={AC:"playerControlShow",py:"rollOver",qy:"shown"};function Op(a){var b=Uo(a,"state",Np,"OPTIONAL");a=Po(a,"ref","OPTIONAL","");return b?new Mp(b,a):null};function Pp(a,b,c,d){this.a=a||[];this.g=b||[];this.i=c;this.b=d}function Qp(a){var b=ap(a,"condition",Op,"REPEATED"),c=ap(a,"notCondition",Op,"REPEATED"),d=Vo(a,"show_delay",!1);a=Vo(a,"hide_delay",!1);return b||c?new Pp(b,c,d,a):null}function Rp(a,b,c){z(a.a,oa(b,!1),c);z(a.g,oa(b,!0),c)};function Sp(a,b,c,d,e,g,h,k,m,p,s,r,x,M,ta,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.H=p;this.j=s;this.G=r;this.i=x;this.k=M;this.data=ta;this.A=Y}var Tp={ly:"anchored",sA:"channel",PB:"highlightText",bC:"label",CC:"popup",RC:"speech",ry:"subscribe",bD:"title",VIDEO:"video"},Up={EA:"custom",OB:"highlight",IMAGE:"image",PAUSE:"pause",TEXT:"text",MD:"widget"},Vp={rD:"video_relative",BC:"player_relative"};
240 function Wp(a){var b=Po(a,"id","REQUIRED"),c=Po(a,"author","OPTIONAL"),d=Uo(a,"type",Up,"REQUIRED"),e=Uo(a,"style",Tp,"OPTIONAL"),g=To(a,"TEXT","OPTIONAL"),h=ap(a,"data",function(a){return 0!=a.length?kb(a):{}},"OPTIONAL",{}),k=ap(a,"segment",Lp,"OPTIONAL"),m=ap(a,"action",qp,"REPEATED"),p=ap(a,"trigger",Qp,"REPEATED"),s=ap(a,"appearance",sp,"OPTIONAL");s||(s=sp({}));var r=Uo(a,"coordinate_system",Vp,"OPTIONAL","video_relative"),x=ap(a,"image_source",wp,"OPTIONAL"),M=Vo(a,"closeable",!0),ta=Vo(a,
241 "logable",!0),Y=To(a,"html_blob","OPTIONAL","");a=To(a,"log_data","OPTIONAL","");return b&&d?new Sp(b,c,d,e,g,k,m,p,s,r,x,M,ta,Y,h,a):null}function Ho(a){return(a=Na(a.g,function(a){return null!=a.url},void 0))?a.url:null}function Xp(a){return Ka(a.g,function(a){return null!=a.url&&a.url.b},void 0)}function Yp(a){return Ka(a.g,function(a){return"click"==a.trigger},void 0)}function Zp(a,b,c){z(a.g,b,c)}function $p(a,b,c){z(a.B,b,c)}function aq(a,b){Ja(a.B,b,void 0)}
242 function bq(a){return(a=a.a?a.a.a.length?a.a.a[0]:null:null)?Jp(a):null}function cq(a,b){var c=bq(a);return c&&b?yp(b,c.j,c.a?c.a:"xy"):1}function dq(a,b){var c=bq(a);return c&&b?zp(b,c.g,c.a?c.a:"xy"):1};function eq(a,b,c){this.a={};this.b=!1;this.j="ivTrigger:"+a;this.g=c;Rp(b,function(a,b){var c=fq(b.state,b.a);this.g.D(c,v(this.i,this,c,a));this.a[c]=!1},this)}eq.prototype.i=function(a,b,c,d){this.a[a]=b?!c:c;a=Db(this.a,function(a){return a});this.b!=a&&(this.b=a,this.g.u(this.j,a,d))};function fq(a,b){var c="ivTriggerCondition:"+a;return b?c+":"+b:c};function gq(a,b,c){this.i=a;this.ob=b;this.b=c;this.a=null;this.xc=this.isVisible=!1;hq(b,a)}function hq(a,b){aq(a,function(c){return new eq(a.id,c,b)})}gq.prototype.hide=function(){this.isVisible=!1;this.i.W("onResize",this.g,this);this.b.hide()};gq.prototype.show=function(){this.isVisible=!0;this.b.show();this.i.D("onResize",this.g,this)};gq.prototype.destroy=function(){this.i.W("onResize",this.g,this);var a=this.b;a.i.removeAll();a.la&&F(a.la);a.Ea&&a.Ea.M()&&F(a.Ea.M());iq(this)};
243 function iq(a){a.a&&(a.a.stop(),a.a=null)}gq.prototype.g=function(){jq(this.b)};function kq(){};function lq(a,b,c,d,e,g,h,k){this.j=a;this.o=b;this.k=c;this.G=d;this.a=e;this.b=g;this.g=q(h)?h:null;this.i=q(k)?k:null}y(lq,kq);function mq(){this.Rb=[];this.Q=[];this.Md=[]}mq.prototype.Zf=null;mq.prototype.md=null;mq.prototype.aj=!0;var nq=[2,2,6,6,0];f=mq.prototype;f.clear=function(){this.Rb.length=0;this.Q.length=0;this.Md.length=0;delete this.Zf;delete this.md;delete this.aj;return this};function oq(a,b,c){0==Fa(a.Rb)?a.Md.length-=2:(a.Rb.push(0),a.Q.push(1));a.Md.push(b,c);a.md=a.Zf=[b,c]}
244 f.Fa=function(a){var b=Fa(this.Rb);if(null==b)throw Error("Path cannot start with lineTo");1!=b&&(this.Rb.push(1),this.Q.push(0));for(b=0;b<arguments.length;b+=2){var c=arguments[b],d=arguments[b+1];this.Md.push(c,d)}this.Q[this.Q.length-1]+=b/2;this.md=[c,d]};f.close=function(){var a=Fa(this.Rb);if(null==a)throw Error("Path cannot start with close");4!=a&&(this.Rb.push(4),this.Q.push(1),this.md=this.Zf);return this};
245 function pq(a,b,c,d,e){var g=a.md[0]-b*Math.cos(d*Math.PI/180),h=a.md[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.Rb.push(3);a.Q.push(1);a.Md.push(b,c,d,e,g,h);a.aj=!1;a.md=[g,h]}function qq(a,b){for(var c=a.Md,d=0,e=0,g=a.Rb.length;e<g;e++){var h=a.Rb[e],k=nq[h]*a.Q[e];b(h,c.slice(d,d+k));d+=k}}
246 f.clone=function(){var a=new this.constructor;a.Rb=this.Rb.concat();a.Q=this.Q.concat();a.Md=this.Md.concat();a.Zf=this.Zf&&this.Zf.concat();a.md=this.md&&this.md.concat();a.aj=this.aj;return a};f.isEmpty=function(){return 0==this.Rb.length};function rq(a,b){this.A=a;this.B=null==b?1:b}y(rq,kq);function sq(a,b){this.a=a;this.b=b};function tq(a){this.b=a;this.a={}}y(tq,Lf);var uq=[];f=tq.prototype;f.listen=function(a,b,c,d,e){t(b)||(uq[0]=b,b=uq);for(var g=0;g<b.length;g++){var h=Gh(a,b[g],c||this,d||!1,e||this.b||this);if(!h)break;this.a[h.key]=h}return this};f.Vc=function(a,b,c,d,e){if(t(b))for(var g=0;g<b.length;g++)this.Vc(a,b[g],c,d,e);else e=e||this.b||this,c=Hh(c||this),d=!!d,b=vh(a)?Ch(a.jd,b,c,d,e):a?(a=Lh(a))?Ch(a,b,c,d,e):null:null,b&&(Mh(b),delete this.a[b.key]);return this};
247 f.removeAll=function(){Cb(this.a,Mh);this.a={}};f.F=function(){tq.C.F.call(this);this.removeAll()};f.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function vq(){}ca(vq);vq.prototype.a=0;vq.getInstance();function wq(a){Rh.call(this);this.o=a||Fc()}y(wq,Rh);f=wq.prototype;f.Mv=vq.getInstance();f.Ba=null;f.Ye=!1;f.Of=null;f.Kl=null;f.getId=function(){return this.Ba||(this.Ba=":"+(this.Mv.a++).toString(36))};f.M=function(){return this.Of};f.Op=function(){this.Of=this.o.createElement("div")};f.Ti=function(){xq(this,function(a){a.Ye&&a.Ti()});this.j&&this.j.removeAll();this.Ye=!1};
248 f.F=function(){this.Ye&&this.Ti();this.j&&(this.j.dispose(),delete this.j);xq(this,function(a){a.dispose()});this.Of&&F(this.Of);this.Of=this.Kl=null;wq.C.F.call(this)};function xq(a,b){a.Kl&&z(a.Kl,b,void 0)};function yq(a,b,c,d,e){wq.call(this,e);this.width=a;this.height=b;this.g=c||null;this.k=d||null}y(yq,wq);yq.prototype.b=null;yq.prototype.kh=function(){return this.Ye?Ad(this.M()):ga(this.width)&&ga(this.height)?new C(this.width,this.height):null};function zq(a){var b=a.kh();return b?b.width/(a.g?new C(a.g,a.k):a.kh()).width:0};function Aq(a,b){Rh.call(this);this.rh=a;this.Qj=b;this[uh]=!1}y(Aq,Rh);f=Aq.prototype;f.Qj=null;f.rh=null;f.M=function(){return this.rh};f.addEventListener=function(a,b,c,d){Gh(this.rh,a,b,c,d)};f.removeEventListener=function(a,b,c,d){Kh(this.rh,a,b,c,d)};f.F=function(){Aq.C.F.call(this);var a=this.rh;if(a)vh(a)?a.jd&&a.jd.removeAll(void 0):Nh(ja(a),void 0);else{var a=0,b;for(b in Eh)a+=Nh(b)}};function Bq(a,b,c,d){Aq.call(this,a,b);a=this.Qj;b=this.M();c?(b.setAttribute("stroke",c.b),c=c.a,u(c)&&-1!=c.indexOf("px")?b.setAttribute("stroke-width",parseFloat(c)/zq(a)):b.setAttribute("stroke-width",c)):b.setAttribute("stroke","none");c=this.Qj;a=this.M();if(d instanceof rq)a.setAttribute("fill",d.A),a.setAttribute("fill-opacity",d.B);else if(d instanceof lq){b="lg-"+d.j+"-"+d.o+"-"+d.k+"-"+d.G+"-"+d.a+"-"+d.b;var e=b in c.a?c.a[b]:null;if(!e){var e=Cq(c,"linearGradient",{x1:d.j,y1:d.o,x2:d.k,
249 y2:d.G,gradientUnits:"userSpaceOnUse"}),g="stop-color:"+d.a;ga(d.g)&&(g+=";stop-opacity:"+d.g);g=Cq(c,"stop",{offset:"0%",style:g});e.appendChild(g);g="stop-color:"+d.b;ga(d.i)&&(g+=";stop-opacity:"+d.i);d=Cq(c,"stop",{offset:"100%",style:g});e.appendChild(d);e=Dq(c,b,e)}a.setAttribute("fill","url(#"+e+")")}else a.setAttribute("fill","none")}y(Bq,Aq);function Eq(a,b){Aq.call(this,a,b)}y(Eq,Aq);function Fq(a,b){Aq.call(this,a,b)}y(Fq,Aq);function Gq(a,b,c,d){Bq.call(this,a,b,c,d)}y(Gq,Bq);function Hq(a,b){Aq.call(this,a,b)}y(Hq,Eq);Hq.prototype.clear=function(){Vc(this.M())};function Iq(a,b,c,d){Bq.call(this,a,b,c,d)}y(Iq,Gq);function Jq(a,b){Aq.call(this,a,b)}y(Jq,Fq);function Kq(a,b,c,d,e){yq.call(this,a,b,c,d,e);this.a={};this.G=bc&&!pc(526);this.A=new tq(this)}var Lq;y(Kq,yq);var Mq=0;function Cq(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=Kq.prototype;
250 f.Op=function(){var a=Cq(this,"svg",{width:this.width,height:this.height,overflow:"hidden"}),b=Cq(this,"g");this.i=Cq(this,"defs");this.b=new Hq(b,this);a.appendChild(this.i);a.appendChild(b);this.Of=a;this.g&&(this.M().setAttribute("preserveAspectRatio","none"),this.G?this.Vo():this.M().setAttribute("viewBox","0 0 "+(this.g?this.g+" "+this.k:"")))};
251 f.Vo=function(){if(this.Ye){var a=this.kh();0==a.width?this.M().style.visibility="hidden":(this.M().style.visibility="",this.b.M().setAttribute("transform","scale("+a.width/this.g+" "+a.height/this.k+") translate(0 0)"))}};
252 f.kh=function(){if(!ac)return this.Ye?Ad(this.M()):Kq.C.kh.call(this);var a=this.width,b=this.height,c=u(a)&&-1!=a.indexOf("%"),d=u(b)&&-1!=b.indexOf("%");if(!this.Ye&&(c||d))return null;var e,g;c&&(e=this.M().parentNode,g=Ad(e),a=parseFloat(a)*g.width/100);d&&(e=e||this.M().parentNode,g=g||Ad(e),b=parseFloat(b)*g.height/100);return new C(a,b)};f.clear=function(){this.b.clear();Vc(this.i);this.a={}};function Nq(a,b,c,d){b=Cq(a,"path",{d:Oq(b)});c=new Iq(b,a,c,d);a.b.M().appendChild(c.M())}
253 function Oq(a){var b=[];qq(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 Dq(a,b,c){if(b in a.a)return a.a[b];var d="_svgdef_"+Mq++;c.setAttribute("id",d);a.a[b]=d;a.i.appendChild(c);return d}
254 f.Ti=function(){Kq.C.Ti.call(this);this.G&&this.A.Vc(Pq(),"tick",this.Vo)};f.F=function(){delete this.a;delete this.i;delete this.b;Kq.C.F.call(this)};function Pq(){Lq||(Lq=new Uh(400),Lq.start());return Lq};function Qq(a,b,c){this.a=a;this.b=0;this.i=b;c&&(this.vn=c)}f=Qq.prototype;f.vn=70;f.ik=!1;f.start=function(a){this.k=w();this.b=a;this.j=this.k+this.b;this.ik=!0;an(this.a);kf(this.g);this.g=jf(v(this.eu,this),this.vn)};f.stop=function(){this.ik=!1;bn(this.a);this.g&&kf(this.g)};
255 f.eu=function(){if(this.ik){var a=w(),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 mq,g=d/2-5;oq(e,d/2,d/2);e.Fa(d/2,5);pq(e,g,g,-90,360*-b);e.Fa(d/2,d/2);e.close();c.setAttribute("d",Oq(e));a>=this.j&&(this.stop(),this.i&&this.i())}};function Rq(a){this.a=a}var Sq=/\s*;\s*/;f=Rq.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(w()+1E3*c)).toUTCString();this.a.cookie=a+"="+b+e+d+c+g};
256 f.get=function(a,b){for(var c=a+"=",d=(this.a.cookie||"").split(Sq),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.nc=function(){return Tq(this).keys};f.hc=function(){return Tq(this).Sv};f.isEmpty=function(){return!this.a.cookie};f.fb=function(){return this.a.cookie?(this.a.cookie||"").split(Sq).length:0};f.clear=function(){for(var a=Tq(this).keys,b=a.length-1;0<=b;b--)this.remove(a[b])};
257 function Tq(a){a=(a.a.cookie||"").split(Sq);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,Sv:c}}var Uq=new Rq(document);Uq.b=3950;var Vq=n("yt.prefs.UserPrefs.prefs_")||{};qa("yt.prefs.UserPrefs.prefs_",Vq);function Wq(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 Xq=n("yt.pubsub.instance_")||new kh;kh.prototype.subscribe=kh.prototype.D;kh.prototype.unsubscribeByKey=kh.prototype.Wc;kh.prototype.publish=kh.prototype.u;kh.prototype.clear=kh.prototype.clear;qa("yt.pubsub.instance_",Xq);function Yq(a,b,c){var d=Zq();return d?d.subscribe(a,function(){var a=arguments;try{H(function(){b.apply(c||l,a)},0)}catch(d){lf(d)}},c):0}
258 function $q(){var a=ef("LOGGED_IN_PUBSUB_KEY"),b=Zq();b&&("number"==typeof a?a=[a]:"string"==typeof a&&(a=[parseInt(a,10)]),z(a,function(a){b.unsubscribeByKey(a)}))}function ar(a,b){var c=Zq();return c?c.publish.apply(c,arguments):!1}function Zq(){return n("yt.pubsub.instance_")};function br(a,b,c,d,e,g){var h,k;if(h=c.offsetParent){var m="HTML"==h.tagName||"BODY"==h.tagName;m&&"static"==ld(h,"position")||(k=sd(h),m||(m=(m=td(h))&&ac?-h.scrollLeft:!m||D&&pc("8")||"visible"==ld(h,"overflowX")?h.scrollLeft:h.scrollWidth-h.clientWidth-h.scrollLeft,k=vb(k,new B(m,h.scrollTop))))}h=k||new B;k=Cd(a);if(m=rd(a)){var p=Bb(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=
259 m,k.top=r,k.width=s-m,k.height=p-r)}}m=Fc(a);r=Fc(c);if(m.a!=r.a){var s=m.a.body,r=r.a.parentWindow||r.a.defaultView,p=new B(0,0),x=Hc(s)?Hc(s).parentWindow||Hc(s).defaultView:window,M=s;do{var ta=x==r?sd(M):wd(M);p.x+=ta.x;p.y+=ta.y}while(x&&x!=r&&(M=x.frameElement)&&(x=x.parent));s=vb(p,sd(s));D&&!gd(m)&&(s=vb(s,hd(m)));k.left+=s.x;k.top+=s.y}a=(b&4&&td(a)?b^2:b)&-5;b=new B(a&2?k.left+k.width:k.left,a&1?k.top+k.height:k.top);b=vb(b,h);e&&(b.x+=(a&2?-1:1)*e.x,b.y+=(a&1?-1:1)*e.y);if(e=rd(c))e.top-=
260 h.y,e.right-=h.x,e.bottom-=h.y,e.left-=h.x;cr(b,c,d,g,e,65,void 0)}
261 function cr(a,b,c,d,e,g,h){a=a.clone();var k=(c&4&&td(b)?c^2:c)&-5;c=Ad(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-
262 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;md(b,a);xb(c,h)||(e=gd(Fc(Hc(b))),
263 !D||e&&pc("8")?(b=b.style,ac?b.MozBoxSizing="border-box":bc?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=Gd(b),b=Hd(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 dr={},er="ontouchstart"in document;function fr(a,b,c){var d;switch(a){case "mouseover":case "mouseout":d=3;break;case "mouseenter":case "mouseleave":d=9}return fd(c,function(a){return Cc(a,b)},!0,d)}
264 function gr(a){var b="mouseover"==a.type&&"mouseenter"in dr||"mouseout"==a.type&&"mouseleave"in dr,c=a.type in dr||b;if("HTML"!=a.target.tagName&&c){if(b){var b="mouseover"==a.type?"mouseenter":"mouseleave",c=dr[b],d;for(d in c.Qb){var e=fr(b,d,a.target);e&&!fd(a.relatedTarget,function(a){return a==e},!0)&&c.u(d,e,b,a)}}if(b=dr[a.type])for(d in b.Qb)(e=fr(a.type,d,a.target))&&b.u(d,e,a.type,a)}}K(document,"blur",gr,!0);K(document,"change",gr,!0);K(document,"click",gr);K(document,"focus",gr,!0);
265 K(document,"mouseover",gr);K(document,"mouseout",gr);K(document,"mousedown",gr);K(document,"keydown",gr);K(document,"keyup",gr);K(document,"keypress",gr);K(document,"cut",gr);K(document,"paste",gr);er&&(K(document,"touchstart",gr),K(document,"touchend",gr),K(document,"touchcancel",gr));var hr=window.yt&&window.yt.uix&&window.yt.uix.widgets_||{};qa("yt.uix.widgets_",hr);function ir(a){a=a.getInstance();var b=$(a);b in hr||!a.qq()||(a.register(),hr[b]=a)};function jr(){this.a={}}jr.prototype.g=!!eval("/*@cc_on!@*/false");jr.prototype.qq=function(){return!0};function kr(a,b,c){var d=$(a,void 0),e=v(c,a);b in dr||(dr[b]=new kh);dr[b].D(d,e);a.a[c]=e}jr.prototype.b=function(a,b,c){var d=G(a,b);if(d&&(d=n(d))){var e=ab(arguments,2);$a(e,0,0,a);d.apply(null,e)}};function lr(a,b){Oe(a,"tooltip-text",b)}jr.prototype.removeData=function(a,b){a.dataset?delete a.dataset[Pe(b)]:a.removeAttribute("data-"+b)};
266 function $(a,b){return"yt-uix"+(a.dj?"-"+a.dj:"")+(b?"-"+b:"")};function mr(){this.a={}}y(mr,jr);ca(mr);f=mr.prototype;f.dj="button";f.Ef=null;f.register=function(){kr(this,"click",this.gy);kr(this,"keydown",this.ey);kr(this,"keypress",this.fy)};f.gy=function(a){a&&!a.disabled&&(nr(this,a),this.click(a))};
267 f.ey=function(a,b,c){if(!(c.altKey||c.ctrlKey||c.shiftKey)&&(b=or(this,a))){var d=function(a){var b="";a.tagName&&(b=a.tagName.toLowerCase());return"ul"==b||"table"==b};if(d=d(b)?b:$c(b,d)){var d=d.tagName.toLowerCase(),e;"ul"==d?e=this.ky:"table"==d&&(e=this.jy);e&&pr(this,a,b,c,v(e,this))}}};
268 function pr(a,b,c,d,e){var g=$m(c),h=9==d.keyCode;h||32==d.keyCode||13==d.keyCode?(d=qr(a,c))?(b=Wc(d),"a"==b.tagName.toLowerCase()?window.location=b.href:Bf(b,"click")):h&&rr(a,b):g?27==d.keyCode?(qr(a,c),rr(a,b)):e(b,c,d):(a=Cc(b,$(a,"reverse"))?38:40,d.keyCode==a&&(Bf(b,"click"),d.preventDefault()))}f.fy=function(a,b,c){c.altKey||c.ctrlKey||c.shiftKey||(a=or(this,a),$m(a)&&c.preventDefault())};function qr(a,b){var c=$(a,"menu-item-highlight"),d=E(c,b);d&&Ac(d,c);return d}
269 function sr(a,b,c){zc(c,$(a,"menu-item-highlight"));b.setAttribute("aria-activedescendant",c.getAttribute("id"))}f.jy=function(a,b,c){var d=qr(this,b);b=Ue("table",b);var e=Ue("tr",b),e=Kc("td",null,e).length;b=Kc("td",null,b);d=tr(d,b,e,c);-1!=d&&(sr(this,a,b[d]),c.preventDefault())};f.ky=function(a,b,c){if(40==c.keyCode||38==c.keyCode){var d=qr(this,b);b=Kc("li",null,b);d=tr(d,b,1,c);sr(this,a,b[d]);c.preventDefault()}};
270 function tr(a,b,c,d){var e=b.length;a=Ha(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 ur(a,b){var c=b.iframeMask;c||(c=document.createElement("iframe"),c.src='javascript:""',c.className=$(a,"menu-mask"),b.iframeMask=c);return c}
271 function vr(a,b,c,d){var e=ed(b,$(a,"group")),g=!!G(b,"button-menu-ignore-group"),e=e&&!g?e:b,g=5,h=4,k=Cd(b);if(Cc(b,$(a,"reverse"))){g=4;h=5;k=k.top+"px";try{c.style.maxHeight=k}catch(m){}}Cc(b,"flip")&&(Cc(b,$(a,"reverse"))?(g=6,h=7):(g=7,h=6));var p;G(b,"button-has-sibling-menu")?p=qd(e):G(b,"button-menu-root-container")&&(p=wr(b));D&&!pc("8")&&(p=null);var s;p&&(s=Cd(p),s=new wb(-s.top,s.left,s.top,-s.left));p=new B(0,1);Cc(b,$(a,"center-menu"))&&(p.x-=Math.round((Ad(c).width-Ad(b).width)/2));
272 d&&(p.y+=Oc(document).y);if(a=ur(a,b))b=Ad(c),a.style.width=b.width+"px",a.style.height=b.height+"px",br(e,g,a,h,p,s),d&&dn(a,"position","fixed");br(e,g,c,h,p,s)}function wr(a){if(G(a,"button-menu-root-container")){var b=G(a,"button-menu-root-container");return ed(a,b)}return document.body}
273 f.Bp=function(a){if(a){var b=or(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:wr(a);c.appendChild(b);b.style.minWidth=a.offsetWidth-2+"px";var d=ur(this,a);d&&c.appendChild(d);c=!!G(a,"button-menu-fixed");vr(this,a,b,c);an(b);this.b(a,"button-menu-action",!0);zc(a,$(this,"active"));c=v(this.gw,this,a);b=K(document,"click",
274 c);c=K(document,"contextmenu",c);Oe(a,"button-listener",b);Oe(a,"button-context-menu-listener",c);this.Ef=a}}};
275 function rr(a,b){if(b){var c=or(a,b);if(c){a.Ef=null;b.setAttribute("aria-pressed","false");b.setAttribute("aria-expanded","false");b.removeAttribute("aria-activedescendant");bn(c);a.b(b,"button-menu-action",!1);var d=ur(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=ed(b,$(a,"group"));Ac(b,$(a,"active"));e&&Ac(e,$(a,"group-active"));if(e=
276 G(b,"button-listener"))vf(e),a.removeData(b,"button-listener");if(e=G(b,"button-context-menu-listener"))vf(e),a.removeData(b,"button-context-menu-listener")}}function xr(a,b){var c=or(a,b);c&&vr(a,b,c)}function yr(a,b){return or(a,b)}
277 f.gw=function(a,b){var c;c=b||window.event;c=c.target||c.srcElement;3==c.nodeType&&(c=c.parentNode);var d=ed(c,$(this));if(d){var d=or(this,d),e=or(this,a);if(d==e)return}if(!ed(c,$(this,"menu"))||Cc(c,$(this,"menu-item"))||Cc(c,$(this,"menu-close")))if(rr(this,a),(d=ed(c,$(this,"menu")))&&G(a,"button-menu-indicate-selected")){if(e=E($(this,"content"),a)){var g;wc&&"innerText"in c?g=c.innerText.replace(/(\r\n|\r|\n)/g,"\n"):(g=[],dd(c,g,!0),g=g.join(""));g=g.replace(/ \xAD /g," ").replace(/\xAD/g,
278 "");g=g.replace(/\u200B/g,"");wc||(g=g.replace(/ +/g," "));" "!=g&&(g=g.replace(/^\s*/,""));Zc(e,g)}e=$(this,"menu-item-selected");(d=E(e,d))&&Ac(d,e);zc(c.parentNode,e)}};function or(a,b){if(!b.widgetMenu){var c=G(b,"button-menu-id"),c=c&&Ic(c),d=$(a,"menu");c?(zc(c,d),zc(c,$(a,"menu-external"))):c=E(d,b);b.widgetMenu=c}return b.widgetMenu}
279 function nr(a,b){if(G(b,"button-toggle")){var c=ed(b,$(a,"group"));if(c&&G(c,"button-toggle-group")){var d=G(c,"button-toggle-group"),c=Jc($(a),c),e=$(a,"toggled"),g=Cc(b,e);z(c,function(a){a!=b||"optional"==d&&g?Ac(a,e):zc(b,e)})}else Ec(b,$(a,"toggled"))}}f.click=function(a){if(or(this,a)){var b=or(this,a),c=ed(b.activeButtonNode||b.parentNode,$(this));c&&c!=a?(rr(this,c),H(v(this.Bp,this,a),1)):$m(b)?rr(this,a):this.Bp(a);a.focus()}this.b(a,"button-action")};function zr(a,b,c){this.i=a;this.g=b;this.b=c;this.a=v(this.ju,this)}y(zr,Lf);f=zr.prototype;f.bj=!1;f.If=null;function Ar(a){a.If?a.bj=!0:Br(a)}f.stop=function(){this.If&&(l.clearTimeout(this.If),this.If=null,this.bj=!1)};f.F=function(){zr.C.F.call(this);this.stop()};f.ju=function(){this.If=null;this.bj&&(this.bj=!1,Br(this))};function Br(a){a.If=Wh(a.a,a.g);a.i.call(a.b)};function Cr(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))D&&-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=
280 d.open(c,a,g);return b}function Dr(a,b){var c;c=b||{};c.target=c.target||a.target||"YouTube";c.width=c.width||600;c.height=c.height||600;(c=Cr(a,c))?(c.opener||(c.opener=window),c.focus()):c=null;return!c};function Er(a,b){Fr().tick[a]=b||w()}function Gr(a){var b=Fr().tick;return a in b}function Hr(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];Kf(b+"?"+c.substring(1))}function Ir(){return Fr().info}function Fr(){return n("ytcsi.data_")||Jr()}function Jr(){var a={tick:{},span:{},info:{}};qa("ytcsi.data_",a);return a};function Kr(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?")}
281 function Lr(a,b){if("new"==a.target)return-1;var c=mp(a);if(!c)return-1;var c=c.replace(/https?:\/\//g,""),d;(d=!Kr(c))||(d=ee(c)||"",d=d.split("/"),d="/"+(1<d.length?d[1]:""),d="/watch"!=d);if(d)return-1;d=Vi(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=Ui(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}
282 ;function Mr(a,b){this.b=a;this.a=b}function Io(a,b,c){b&&b.i&&Ho(b)&&a.log_(Co(a,b,3),c)}function Co(a,b,c){var d={};d["iv-event"]=c;d["a-id"]=b.id;d["a-type"]=Nr(b);if(c=Ho(b))d.link=escape(mp(c)),c.a&&(d["l-class"]=c.a);d.ps=a.a.Ja;if(b.A){var e=new ve(b.A);z(e.nc(),function(a){d[a]=e.get(a)})}return d}
283 function Nr(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}}Mr.prototype.log_=function(a,b){this.b.u("command_log","iv",a,b)};function Or(a,b){this.start=a<b?a:b;this.end=a<b?b:a}Or.prototype.clone=function(){return new Or(this.start,this.end)};function Pr(){}f=Pr.prototype;f.Tc=!1;f.bf=null;f.Pl=null;function Qr(a,b,c){a.bf?(yd(a.bf.M(),b,c),a.bf.clear()):(b=new Kq(b,c,void 0,void 0,void 0),a.bf=b,a.bf.Op(),a.Pl=Pc("div"),a.Pl.appendChild(a.bf.M()));return a.bf}f.M=function(){return this.Pl};f.ae=function(){};function Rr(a,b,c){var d=document.createElementNS("http://www.w3.org/2000/svg",a);b&&Cb(b,function(a,b){d.setAttribute(b,a)});for(var e=2;e<arguments.length;e++)d.appendChild(arguments[e]);return d}function Sr(a,b){var c;c=":"+(vq.getInstance().a++).toString(36);b.setAttribute("result",c);a.appendChild(b);return c};function Tr(a,b){var c=Sr(a,Rr("feGaussianBlur",{"in":b,stdDeviation:"1.8"})),c=Sr(a,Rr("feDiffuseLighting",{"in":c,surfaceScale:"4",diffuseConstant:"1"},Rr("feDistantLight",{azimuth:"270",elevation:"15","lighting-color":"white"}))),c=Sr(a,Rr("feComposite",{"in":c,in2:b,operator:"in"}));return Sr(a,Rr("feComposite",{in2:c,"in":b,operator:"arithmetic",k2:1,k3:0.5,k4:0}))}
284 function Ur(a,b){var c=Sr(a,Rr("feOffset",{"in":b,dx:"-7",dy:"-7"})),c=Sr(a,Rr("feGaussianBlur",{"in":c,stdDeviation:"3"})),c=Sr(a,Rr("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=Sr(a,Rr("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=Sr(a,Rr("feGaussianBlur",{"in":d,stdDeviation:"1"})),c=Sr(a,Rr("feComposite",{operator:"out","in":c,in2:d}));return Sr(a,Rr("feComposite",{operator:"over","in":b,in2:c}))}
285 function Vr(a,b){return b}function Wr(a){var b=Rr("filter",{filterUnits:"userSpaceOnUse"}),c="SourceGraphic";z(a,function(a){t:{switch(a){case "bevel":a=Tr;break t;case "dropshadow":a=Ur;break t}a=Vr}c=a(b,c)});return b}function Xr(a){a=Ia(a,function(a){return a in Yr});db(a,function(a,c){return Yr[a]-Yr[c]});return a}function Zr(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=Wr(b);return 0<d.childNodes.length?Dq(a,c,d):null}
286 function $r(a){return Na(a,function(a){return"dropshadow"==a})?new wb(0,7,7,0):new wb(0,0,0,0)}var Yr={bevel:1,dropshadow:2};function as(a,b,c,d,e){b=bs(b,c,d?d.a/2+1:0);Nq(a,b,d,e)}function bs(a,b,c){var d=new mq;oq(d,a.left+b+c,a.top+c);d.Fa(a.left+a.width-b-c,a.top+c);pq(d,b,b,-90,90);d.Fa(a.left+a.width-c,a.top+a.height-b-c);pq(d,b,b,0,90);d.Fa(a.left+b+c,a.top+a.height-c);pq(d,b,b,90,90);d.Fa(a.left+c,a.top+b+c);pq(d,b,b,180,90);d.close();return d}function cs(a,b,c){b&&c&&a.setAttribute(b,"url(#"+c+")")}
287 function ds(a,b,c,d){var e=a.B;e?a=new lq(e.j*b/100,e.o*c/100,e.k*b/100,e.G*c/100,e.a,e.b,e.g,e.i):(b=d?Math.max(a.a,0.9):a.a,a=new rq(a.j,b));return a}function es(a,b){var c=new wb(a.top,a.left+a.width,a.top+a.height,a.left),d=$r(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 Bb(c)}function fs(a,b,c){c.length&&(b=Na(b.childNodes,function(a){return"g"==a.tagName}))&&(a=Zr(a,Xr(c)),cs(b,"filter",a))};function gs(){}y(gs,Pr);gs.prototype.a=0;
288 gs.prototype.ae=function(a,b,c){var d=a.b,e=d.G,g=this.Tc&&Yp(a),e=(e+=g?1:0)?new sq(e,g?d.k:d.o):null;if(g=bq(a)){var h=Cp(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?Cp(c,b):null;a=xp(k,new Ab(k.B,k.H,k.k,k.i),b);c?(a.top+=c.top,a.left+=c.left):(a.top+=b.top,a.left+=b.left);m=new B(a.left,a.top);c=h.clone();a=new Ab(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+
289 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=es(c,d.b);a=Qr(this,c.width,c.height);var g=ds(d,c.width,c.height,this.Tc),h=new Ab(h.left-c.left,h.top-c.top,h.width,h.height),s=new B(m.x-c.left,m.y-c.top);this.a=17*zp(b,k.g,k.a?k.a:"xy");b=d.g;k=e?e.a/2:0;m=hs(h,s);var p=this.b(h,b,s,m),r=s.x,s=s.y,x=h.width,M=h.height,ta=h.left,h=h.top,Y=new mq;oq(Y,ta+b+k,h+k);"t"==m&&(Y.Fa(p.start,h+k),Y.Fa(r,s),Y.Fa(p.end,h+k));Y.Fa(ta+x-b-k,h+k);pq(Y,
290 b,b,-90,90);"r"==m&&(Y.Fa(ta+x-k,p.start),Y.Fa(r,s),Y.Fa(ta+x-k,p.end));Y.Fa(ta+x-k,h+M-b-k);pq(Y,b,b,0,90);"b"==m&&(Y.Fa(p.end,h+M-k),Y.Fa(r,s),Y.Fa(p.start,h+M-k));Y.Fa(ta+b+k,h+M-k);pq(Y,b,b,90,90);"l"==m&&(Y.Fa(ta+k,p.end),Y.Fa(r,s),Y.Fa(ta+k,p.start));Y.Fa(ta+k,h+b+k);pq(Y,b,b,180,90);Y.close();Nq(a,Y,e,g);if(e=this.M())V(e,"annotation-shape"),V(e,"annotation-speech-shape"),md(e,c.left,c.top),yd(e,c.width,c.height),fs(a,e,d.b)}}}};
291 function hs(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"}gs.prototype.b=function(a,b,c,d){function e(a,c,d){h=Math.min(Math.max(d-2*b,0),g);k=tb(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 Or(k,k+h)};function is(){}y(is,Pr);is.prototype.ae=function(a,b,c){var d=bq(a);d&&(b=Cp(d,b,c),0>=b.width||0>=b.height||(a=a.b,c=es(b,a.b),d=Qr(this,c.width,c.height),as(d,new Ab(0,0,b.width,b.height),a.g,new sq(!a.i&&this.Tc?1:a.i,a.j),new rq("#000",0)),b=this.M(),V(b,"annotation-shape"),Dd(b,this.Tc?Math.max(a.a,0.9):a.a),md(b,c.left,c.top),yd(b,c.width,c.height)))};function js(a,b,c){this.a=a||0;this.g=b||0;this.b=c||!1}y(js,Pr);function ks(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 Ab(e,g,c,d)}
292 js.prototype.ae=function(a,b,c){var d=Cp(bq(a),b,c);if(!(0>=d.width||0>=d.height)){var e=ks(d,this.g);e.left+=d.left;e.top+=d.top;b=a.b;c=es(e,b.b);var g=Qr(this,c.width,c.height),h=new rq("#000",0),e=ks(e,this.a);a=a.j?a.j.a?a.j.a:a.j.L?kn(a.j.L,"hqdefault.jpg"):"":"";e=Cq(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 Jq(e,g);g.b.M().appendChild(a.M());if(e=
293 this.M()){var k=this.Tc?Math.max(b.a,0.9):b.a;Dd(e,k);if(this.b&&0<b.i){var k=new sq(b.i,b.j),d=new Ab(0,0,d.width,d.height),m;m=bs(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",Oq(m));s.setAttribute("fill","#FFF");p.appendChild(s);m=Dq(g,"mask",p)}cs(a.M(),"mask",m);as(g,d,b.g,k,h)}V(e,"annotation-shape");V(e,"annotation-image-shape");
294 md(e,c.left,c.top);yd(e,c.width,c.height);fs(g,e,b.b)}}};function ls(){}y(ls,Pr);ls.prototype.ae=function(a,b,c){var d=bq(a);if(d){var e=Cp(d,b,c);if(!(0>=e.width||0>=e.height)){b=a.b;c=es(e,b.b);var d=Qr(this,c.width,c.height),g=b.G;a=this.Tc&&Yp(a);a=(g+=a?1:0)?new sq(g,a?b.k:b.o):null;g=new Ab(0,0,e.width,e.height);e=ds(b,e.width,e.height,this.Tc);as(d,g,b.g,a,e);if(a=this.M())V(a,"annotation-shape"),V(a,"annotation-popup-shape"),md(a,c.left,c.top),yd(a,c.width,c.height),fs(d,a,b.b)}}};function ms(){}y(ms,gs);ms.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 Or(k,k+h)};function ns(a,b){this.b=Ic(a);this.a=on(this.b,b)}
295 function os(a,b){var c=pn(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");D?(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=Wc(Wc(c)));return c};function ps(a,b,c,d,e){this.a=a;this.j=b;this.g=c;this.o=d;this.k=e;this.i=new eo(this)}f=ps.prototype;f.la=null;f.Yc=null;f.cc=null;f.Ea=null;f.$k=null;function qs(a,b){var c=v(function(a,c,g){c=g?rs(this,c,v(g,this)):rs(this,c);this.i.listen(b,a,c)},a);c("mouseover","e",a.ax);c("mouseout","d",a.$w);c("click","b");c("mousedown","a");c("touchend","b")}
296 function ss(a){if(a.a.G){var b;if(Ka(a.a.g,function(a){return"close"==a.type},void 0))b=a.la;else{b=os(new ns("annotation-close-button-template",[]),{});if(!(b instanceof Element))return;a.cc=b;Oe(a.cc,"annotation_id",a.a.id);a.la.appendChild(a.cc);b=a.cc}var c=function(a){a.stopPropagation()};a.i.listen(b,"click",rs(a,"c",c));a.i.listen(b,"touchend",rs(a,"c",c))}}
297 function rs(a,b,c){return v(function(a){if(this.k)c&&c(a);else if(a.target instanceof Element){bn(a.target);var e=document.elementFromPoint(a.x,a.y);an(a.target);Zl(e,"annotation")&&Bf(e,a.type)}this.o.u(b,this.a)},a)}f.ax=function(){this.cc&&an(this.cc);this.Yc&&Dd(this.Yc,1);var a=ts(this);this.Ea&&(this.Ea.Tc=!0,Dd(this.la,us(this)?1:0),a&&this.Ea.ae(this.a,a,vs(this)))};
298 f.$w=function(){this.cc&&bn(this.cc);this.Yc&&Dd(this.Yc,0);var a=ts(this);this.Ea&&(this.Ea.Tc=!1,Dd(this.la,us(this)?1:0),a&&this.Ea.ae(this.a,a,vs(this)))};function vs(a){return a.$k?bq(a.$k):null}
299 function jq(a){if(a.la||a.Ea){var b=bq(a.a);if(b){var c=ts(a),d=vs(a);if(a.la&&c){b=Cp(b,c,d);yd(a.la,b.width,b.height);md(a.la,b.left,b.top);var e=a.g.ug;e&&(e=new wb(360*ws(a).top*dq(a.a,e)/100,640*ws(a).right*cq(a.a,e)/100,360*ws(a).bottom*dq(a.a,e)/100,640*ws(a).left*cq(a.a,e)/100),a.Yc&&(e.right+=1.5*c.height/100),a.la.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.la.style.padding);if(a.Yc){e=4.2*c.height/100;e=new C(e,e);yd(a.Yc,
300 e);if("highlight"==a.a.type||"label"==a.a.style)var g=1.5*c.height/100,e=new B(b.width-e.width-g,b.height-e.height-g);else e=new B(b.width-e.width-3*c.height/100,(b.height-e.height)/2);md(a.Yc,e)}if(a.cc){yd(a.cc,new C(18,18));var e=a.cc,g=Ad(a.cc),h=9<=c.left+c.width-(b.left+b.width),k=9<=b.top-c.top;md(e,h&&k?new B(b.width-9,-9):h?new B(b.width-9,b.height>27+g.height?9:b.height-9):k?new B(b.width>27+g.width?b.width-9-g.width:-9,-9):b.width/c.width>b.height/c.height?new B(b.width>27+g.width?b.width-
301 9-g.width:-9,b.height-9):new B(-9,b.height>27+g.height?9:b.height-9))}}a.Ea&&c&&a.Ea.ae(a.a,c,d);if(a.la){c=a.la;d=a.a.b;c.style.color="highlightText"==a.a.style?d.H:d.k;c.style.fontSize=360*d.I*dq(a.a,a.g.ug)/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.la;c=a.style.overflow;(d=E("annotation-link-icon",a))&&bn(d);a.style.overflow="scroll";for(b=100;0<b&&!(a.scrollHeight<=a.offsetHeight&&a.scrollWidth<=
302 a.offsetWidth);b--){e=Od(a);if(5>e)break;e--;a.style.fontSize=e+"px"}a.style.overflow=c;d&&an(d)}}}}function ws(a){var b=a.a.b;return b.padding?b.padding:new wb("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)}
303 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.Ea,b=!this.la,c="widget"==this.a.type;if(a){var d=ts(this);if(d){var e=null;"highlight"==this.a.type||"label"==this.a.style?e=new is:"popup"==this.a.style?e=new ls:"anchored"==this.a.style?e=new gs:"speech"==this.a.style?e=new ms:"image"==this.a.type&&("video"==this.a.style?e=new js(4/3,16/9,!0):"channel"==this.a.style&&(e=new js));e&&(e.ae(this.a,d,vs(this)),this.Ea=
304 e,d=e.M())&&(bn(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.la=Pc("div",d);this.a.o&&("label"==this.a.style?(this.b=Pc("div",["label-text"]),this.b.style.backgroundColor=this.a.b.j,Zc(this.b,this.a.o),this.la.appendChild(this.b)):Zc(this.la,this.a.o));Oe(this.la,"annotation_id",this.a.id);this.j(this.la);qs(this,this.la);if(Yp(this.a)&&
305 "image"!=this.a.type&&Xp(this.a)){if(d=Ho(this.a))this.la.title=mp(d);this.Yc=Pc("span","annotation-link-icon");this.la.appendChild(this.Yc)}ss(this);Yp(this.a)||(this.la.style.cursor="default")}c&&("subscribe"==this.a.style?E("yt-uix-subscription-button",this.la)||(this.la.innerHTML=this.a.k):this.a.k&&(this.la.innerHTML=this.a.k));if(a||b){t:{a=this.a.a.a;if(a.length&&(a=Jp(a[0]))){a=a.o;break t}a=0}this.la&&(this.la.style.zIndex=a);this.Ea&&this.Ea.M()&&(this.Ea.M().style.zIndex=a)}an(this.la);
306 Dd(this.la,us(this)?1:0);jq(this);this.Ea&&an(this.Ea.M())};f.hide=function(){bn(this.la);this.Ea&&bn(this.Ea.M())};function us(a){return"label"!=a.a.style||a.Ea.Tc}function ts(a){var b=a.g.ug;return b?"player_relative"==a.a.H?(a=a.g.Sc)?new Ab(-b.left,-b.top,a.width,a.height):null:new Ab(0,0,b.width,b.height):null};function xs(a){dm.call(this,a);this.b={};this.i={};this.j=new Mr(this.G,this.a.J());var b=Q(a),c=E("html5-annotations-button",b);this.g=this.k=null;a.J().La?(F(c),a=this.a.app.P.A,this.g=new Jo(a,[a.getMsg("YTP_ON"),a.getMsg("YTP_OFF")]),K(this.g,"change",v(this.wr,this)),this.k={label:this.a.app.P.A.getMsg("YTP_ANNOTATIONS_TITLE"),element:this.g,priority:2}):K(c,"click",v(this.ur,this));this.D("onHideControls",this.tr,this);this.D("onShowControls",this.yr,this);this.D("onStateChange",this.xr,this);
307 this.D("e",this.Ar,this);this.D("d",this.zr,this);this.D("a",this.rr,this);this.D("b",this.qr,this);this.D("c",this.sr,this);b=E("video-annotations",b);b=E("countdowntimer",b);this.A=Pc("DIV",["video-annotations","html5-stop-propagation"]);gm(this,this.A);gm(this,b);this.B=new Qq(b,v(this.Aj,this))}y(xs,dm);f=xs.prototype;f.na="iv-module";f.Jl=!1;f.Dp=!0;f.Z=!1;f.Cd=0;function ys(a){return E("video-annotations",Q(a))&&zs(a)?new xs(a):null}
308 function zs(a){return"leanback"==a.J().Y?!1:Ml(a.getVideoData(),"iv3_module")}f.Xa=function(){return zs(this.a)};f.create=function(){xs.C.create.call(this);this.k&&this.u("module_menu_add",this.k);1==(this.a.J().ca||this.a.getVideoData().ca)?this.load():As(this,"tooltip-default")};f.destroy=function(){this.unload();this.k&&this.u("module_menu_remove",this.k);xs.C.destroy.call(this)};f.ur=function(){this.Z||this.Cd?this.unload():this.load()};
309 f.wr=function(){var a=this.Z||this.Cd,b=0==this.g.getSelected();a&&!b?this.unload():!a&&b&&this.load()};f.xr=function(a){this.Dp=P(a.state,8);0>ao(a,4)&&this.B.stop()};
310 f.load=function(){xs.C.load.call(this);As(this,"tooltip-alt");var a={format:"XML",method:"GET",td:v(this.Yo,this,null)},b=this.a.getVideoData();b.Pk&&(this.Cd++,ej(b.Pk,a));b.Ok&&(this.Cd++,ej(b.Ok,a));b.Nk&&(this.a.J().Gc||this.a.J().Lc)&&(a={format:"XML",method:"GET",td:v(this.Yo,this,v(this.sv,this,b.Ia))},this.Cd++,ej(b.Nk,a));this.g&&Mo(this.g,0)};
311 f.unload=function(){this.g&&Mo(this.g,1);this.j.log_({"iv-event":1});this.Aj();em(this);Cb(this.b,function(a){a.destroy()});Cb(this.i,function(a){a.destroy()});this.Cd=0;this.Z=!1;this.b={};this.i={};As(this,"tooltip-default");xs.C.unload.call(this)};function As(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)}}
312 function Bs(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(Bs(a,e))}return c}
313 f.Yo=function(a,b){if(this.Cd&&!this.Z){this.Cd--;var c=b.responseXML?b.responseXML.getElementsByTagName("annotations"):null;if(aj(b)&&c){c=c[0];a&&a(c);Cs(this,c);V(Q(this.a),this.na+"-loaded");0==this.Cd&&(this.Z=!0);var c=[],d;for(d in this.b){var e=this.b[d].ob;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<e||
314 (e=new nh(e,g,{id:d}),c.push(e))}for(d in this.i)e=this.i[d].ob,e=new nh(e.data.start_ms,e.data.end_ms,{id:d}),c.push(e);this.yf.apply(this,c)}}};function Ds(a,b){var c=Es(a,b);if(!c)return null;$p(b,function(a){a=v(this.sx,this,b.id,a);this.D("ivTrigger:"+b.id,a)},a);return new gq(a.G,b,c)}
315 function Fs(a,b){var c=Pc("div",["annotation","annotation-type-custom","hid"]);a.A.appendChild(c);var d=null;switch(b.style){case "video":d=new Do(b,c,new eo(a),a.a.J(),a.j)}d&&a.G.D("onResize",d.Oo,d);return d}function Cs(a,b){for(var c=b.getElementsByTagName("annotation"),d=0;d<c.length;d++){var e=Bs(a,c[d]),g=null;try{g=Wp(e)}catch(h){}g&&("custom"==g.type?(e=Fs(a,g))&&(a.i[g.id]=e):(e=Ds(a,g))&&(a.b[g.id]=e))}Cb(a.b,function(a){var b=a.ob;b.a&&b.a.b&&(b=this.b[b.a.b])&&(a.b.$k=b.ob)},a)}
316 f.vc=function(a){xs.C.vc.call(this,a);a=a.getId();var b=this.b[a],c=this.i[a];c&&!c.xc?c.show():b&&!b.xc&&(b=b.ob,"pause"==b.type?Gs(this,b):(Hs(this,a),a=this.j,b&&b.i&&a.log_(Co(a,b,2))))};f.dd=function(a){xs.C.dd.call(this,a);Is(this,a.getId())};function Gs(a,b){if(a.Dp){var c=Na(b.g,function(a){return"pause"==a.type&&!!a.duration&&!!a.duration.value},void 0);c&&(a.Jl=!0,a.u("command_pause"),a.B.start(1E3*c.duration.value))}}
317 function Is(a,b,c,d){var e=a.i[b];if(e&&!e.xc)e.hide();else if(b=a.b[b])iq(b),d=d&&a.b[d]&&a.b[d].isVisible,c&&c.b&&d?(a=v(a.Bo,a,b),b.a=new ho(a,2E3),b.a.start()):a.Bo(b)}f.Bo=function(a){if(a){a.hide();var b=a.ob.id;this.u(fq("shown",b),!1,b);Js(this,a.ob,"hidden")}};function Hs(a,b,c,d){if(b=a.b[b])iq(b),d=d&&a.b[d]&&a.b[d].isVisible,c&&c.i&&d?(a=v(a.Co,a,b),b.a=new ho(a,2E3),b.a.start()):a.Co(b)}f.Co=function(a){if(a){a.show();var b=a.ob.id;this.u(fq("shown",b),!0,b);Js(this,a.ob,"shown")}};
318 f.sx=function(a,b,c,d){c?Hs(this,a,b,d):Is(this,a,b,d)};f.rr=function(a){if(a&&a.id){var b=this.j;a&&a.i&&Ho(a)&&b.log_(Co(b,a,8))}};f.qr=function(a){if(a&&a.id){var b=Ho(a),c=v(function(){b&&Js(this,a,"click")},this);Kr(mp(b))&&"new"!=b.target||(c(),c=null);Io(this.j,a,c)}};
319 function Js(a,b,c){Zp(b,function(a){if(a.trigger==c)switch(a.type){case "log":a.url&&Kf(a.url.value);break;case "openUrl":var e=this.a.getVideoData(),g=Lr(a.url,e);if(-1!=g){this.u("command_seek",g);this.Aj();break}if(e=(g=mp(a.url))?Kr(g)?Zi(g,{src_vid:e.L,feature:"iv",annotation_id:b.id}):g:null)qm(this),window.open(e,a.url.target?"new"==a.url.target?"_blank":"_top":Kr(mp(a.url))?"_top":"_blank")}},a)}f.tr=function(){this.u(fq("playerControlShow",void 0),!1,void 0)};
320 f.yr=function(){this.u(fq("playerControlShow",void 0),!0,void 0)};f.Ar=function(a){a=a.id;this.u(fq("rollOver",a),!0,a)};f.zr=function(a){a=a.id;this.u(fq("rollOver",a),!1,a)};f.sr=function(a){if(a||a.id)if(this.b[a.id].xc=!0,Is(this,a.id),a){var b=this.j;a&&a.i&&b.log_(Co(b,a,4));Js(this,a,"close")}};f.Aj=function(){this.B.stop();this.Jl&&(this.Jl=!1,this.u("command_play"))};
321 function Es(a,b){if(Ks(b)){var c=b.G||Ka(b.g,function(a){return"click"==a||"rollOut"==a||"rollOut"==a},void 0);return new ps(b,v(a.A.appendChild,a.A),a.a.J(),a.G,c)}return null}function Ks(a){if("highlight"==a.type||"image"==a.type||"widget"==a.type)return!0;if("text"==a.type)for(var b in Tp)if(a.style==Tp[b])return!0;return!1}
322 function Ls(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=Zi(b,d);a.setAttribute("value",b);g.appendChild(a);return g}
323 f.sv=function(a,b){if(a)for(var c=b.getElementsByTagName("annotation"),d=0;d<c.length;d++){var e=c[d],g=Bs(this,e);if(Vo(g,"logable",!0)){var g=Po(g,"id","REQUIRED"),h=e.getElementsByTagName("action"),h=h.length?h[0]:null;e.insertBefore(Ls(e,a,g,"shown","shown"),h);e.insertBefore(Ls(e,a,g,"click","clicked"),h);e.insertBefore(Ls(e,a,g,"close","closed"),h)}}};var Ms;function Ns(a,b){fa(b)&&(b=b.join(" "));if(""===b||void 0==b){var c;Ms||(Ms={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=Ms;"pressed"in c?a.setAttribute("aria-pressed",c.pressed):a.removeAttribute("aria-pressed")}else a.setAttribute("aria-pressed",b)};function Os(a,b,c,d,e){Om.call(this,a,b,c,c);this.B=b;this.I=this.H=c;this.j=d||null;this.o=e||null;this.G=e||null;this.b=!1}y(Os,Om);function Ps(a){Qm(a,a.b&&a.j?a.j:a.B);Rm(a,a.b&&a.o?a.o:a.H);a.a=a.b&&a.G?a.G:a.I;X(a.element,"ytp-button-pressed",a.b)}function Qs(a){a.b=!0;Ns(a.element,!0);Ps(a)}function Rs(a){a.b=!1;Ns(a.element,!1);Ps(a)}Os.prototype.F=function(){this.G=this.o=this.j=null;vf(this.K);this.K=null;Os.C.F.call(this)};function Ss(a){Z.call(this,["div","ytp-action-buttons"]);this.g=new Os(a,"ytp-button-info",a.getMsg("YTP_BUTTON_INFO"));L(this,this.g);this.g.T(this.element);this.i=new Os(a,"ytp-button-share",a.getMsg("YTP_BUTTON_SHARE"));L(this,this.i);this.i.T(this.element);this.a=new Os(a,"ytp-button-dislike",a.getMsg("YTP_BUTTON_DISLIKE"));L(this,this.a);this.listen(this.a,"click",this.j);this.a.T(this.element);this.b=new Os(a,"ytp-button-like",a.getMsg("YTP_BUTTON_LIKE"));L(this,this.b);this.listen(this.b,"click",
324 this.o);this.b.T(this.element);this.b.hide();this.a.hide()}y(Ss,Z);Ss.prototype.o=function(){Qs(this.b);Rs(this.a)};Ss.prototype.j=function(){Qs(this.a);Rs(this.b)};function Ts(a){var b=je("/signin?context=popup","next",document.location.protocol+"//"+document.domain+"/post_login"),b=je(b,"feature","sub_button");if(b=window.open(b,"loginPopup","width=375,height=440,resizable=yes,scrollbars=yes",!0)){var c=Yq("LOGGED_IN",function(b){$q();a(b)});cf("LOGGED_IN_PUBSUB_KEY",c);b.moveTo((screen.width-375)/2,(screen.height-440)/2)}}qa("yt.pubsub.publish",ar);function Us(){this.a={}}y(Us,jr);ca(Us);f=Us.prototype;f.dj="tooltip";f.cj=0;f.register=function(){kr(this,"mouseover",this.aq);kr(this,"mouseout",this.Tl);kr(this,"click",this.Tl);kr(this,"touchstart",this.Yx);kr(this,"touchend",this.hq);kr(this,"touchcancel",this.hq)};f.qq=function(){return!(this.g&&0==nc.indexOf("6"))};
325 f.aq=function(a){if(!(this.cj&&1E3>w()-this.cj)){var b=parseInt(G(a,"tooltip-hide-timer"),10);b&&(this.removeData(a,"tooltip-hide-timer"),I(b));var b=v(function(){Vs(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&&(lr(a,Ws(a)),a.title="")}};
326 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(){Xs(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.Yx=function(a,b){this.cj=0;var c=fr(b,$(this),null[0].target);this.aq(c)};f.hq=function(a,b){this.cj=w();var c=fr(b,$(this),null[0].target);this.Tl(c)};function Ys(a,b){lr(a,b);var c=G(a,"content-id");if(c=Ic(c))c.innerHTML=b}
327 function Ws(a){return G(a,"tooltip-text")||a.title}
328 function Vs(a,b){if(b){var c=Ws(b);if(c){var d=Ic(Zs(a,b));if(!d){d=document.createElement("div");d.id=Zs(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=$s(a,b),m=Zs(a,b,"content");h.id=m;Oe(b,"content-id",m);e.appendChild(h);k&&d.appendChild(k);d.appendChild(e);d.appendChild(g);(Df()||document.body).appendChild(d);Ys(b,
329 c);(c=parseInt(G(b,"tooltip-max-width"),10))&&e.offsetWidth>c&&(e.style.width=c+"px",zc(h,$(a,"normal-wrap")));h=Cc(b,$(a,"reverse"));at(a,b,d,e,k,h)||at(a,b,d,e,k,!h);var p=$(a,"tip-visible");H(function(){zc(d,p)},0)}}}}
330 function at(a,b,c,d,e,g){Dc(c,$(a,"tip-reverse"),g);var h=0;g&&(h=1);a=Ad(b);g=new B((a.width-10)/2,g?a.height:0);var k=sd(b);cr(new B(k.x+g.x,k.y+g.y),c,h);h=Nc(window);k=vd(c);c=Ad(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)+
331 "px";return!(e||a)}function Xs(a,b){if(b){var c=Ic(Zs(a,b));c&&(bt(c),F(c),a.removeData(b,"content-id"))}}function Zs(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 $s(a,b){var c=null;Vb&&Cc(b,$(a,"masked"))&&((c=Ic("yt-uix-tooltip-shared-mask"))?(c.parentNode.removeChild(c),an(c)):(c=document.createElement("iframe"),c.src='javascript:""',c.id="yt-uix-tooltip-shared-mask",c.className=$(a,"tip-mask")));return c}
332 function bt(a){var b=Ic("yt-uix-tooltip-shared-mask"),c=b&&fd(b,function(b){return b==a},!1,2);b&&c&&(b.parentNode.removeChild(b),bn(b),document.body.appendChild(b))};function ct(){this.a={};this.i=[]}y(ct,jr);ca(ct);ct.prototype.dj="subscription-button";
333 ct.prototype.register=function(){kr(this,"click",this.Lp);this.i.push(Yq("subscription-subscribe-loading",this.Kp,this),Yq("subscription-subscribe-loaded",this.Jp,this),Yq("subscription-unsubscirbe-loading",this.Kp,this),Yq("subscription-unsubscribe-loaded",this.Jp,this),Yq("subscription-subscribe-success",this.Yw,this),Yq("subscription-unsubscribe-success",this.Zw,this),Yq("subscription-enable-ypc",this.Xw,this),Yq("subscription-disable-ypc",this.Ww,this))};
334 var dt={$p:"hover-enabled",Sx:"yt-uix-button-subscribe",Tx:"yt-uix-button-subscribed",fA:"ypc-enabled",hy:"yt-uix-button-subscription-container",iy:"yt-subscription-button-disabled-mask-container"},et={tA:"channel-external-id",Ux:"subscriber-count-show-when-subscribed",Vx:"subscriber-count-tooltip",Wx:"subscriber-count-title",SB:"href",mq:"is-subscribed",zC:"parent-url",QC:"sessionlink",Xx:"style-type",nq:"subscription-id",$C:"target",Zx:"ypc-enabled",fq:"ypc-item-type",dq:"ypc-item-id",gq:"ypc-offers-url"};
335 f=ct.prototype;f.Lp=function(a){var b=G(a,"href"),c=!!gf("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,et.fq);var e=G(a,et.dq),g=G(a,et.gq);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"),ar("subscription-unsubscribe",b,g,d,a,c,e)):ar("subscription-subscribe",b,d,a,c,e)}else ft(this,a)};
336 f.Kp=function(a){this.ag(a,this.kq,!0)};f.Jp=function(a){this.ag(a,this.kq,!1)};f.Yw=function(a,b){this.ag(a,this.lq,!0,b)};f.Zw=function(a){this.ag(a,this.lq,!1)};f.Xw=function(a){this.ag(a,this.by)};f.Ww=function(a){this.ag(a,this.ay)};f.lq=function(a,b,c){b?(Oe(a,et.mq,"true"),c&&Oe(a,et.nq,c)):(this.removeData(a,et.mq),this.removeData(a,et.nq));gt(a)};f.kq=function(a,b){var c=ed(a,dt.hy);Dc(c,dt.iy,b);a.setAttribute("aria-busy",b?"true":"false");a.disabled=b};
337 function gt(a){var b=G(a,et.Xx),c=!!G(a,"is-subscribed"),b="-"+b,d=dt.Tx+b;Dc(a,dt.Sx+b,!c);Dc(a,d,c);G(a,et.Vx)&&!G(a,et.Ux)&&(b=$(Us.getInstance()),Dc(a,b,!c),a.title=c?"":G(a,et.Wx));c?H(function(){zc(a,dt.$p)},1E3):Ac(a,dt.$p)}f.by=function(a){var b=!!G(a,et.fq),c=!!G(a,et.dq),d=!!G(a,et.gq);!G(a,"ypc-enabled")&&b&&c&&d&&(zc(a,"ypc-enabled"),Oe(a,et.Zx,"true"))};f.ay=function(a){G(a,"ypc-enabled")&&(Ac(a,"ypc-enabled"),this.removeData(a,"ypc-enabled"))};
338 function ht(a,b){var c=Jc($(a));return Ia(c,function(a){return b==G(a,"channel-external-id")},a)}f.sy=function(a,b,c){var d=ab(arguments,2);z(a,function(a){b.apply(this,Xa(a,d))},this)};f.ag=function(a,b,c){var d=ht(this,a),d=Xa([d],ab(arguments,1));this.sy.apply(this,d)};function ft(a,b){var c=v(function(a){a.subscription_ajax&&ff("subscription_ajax",a.subscription_ajax);this.Lp(b)},a);Ts(c)};function it(a){this.b=a||1;Sm.call(this,30*this.b,30*this.b);this.o=this.width/2;this.i=this.height/2;this.G=0;this.X.translate(this.o,this.i)}y(it,Sm);it.prototype.show=function(){it.C.show.call(this);var a=this.B;this.j=new Date;this.g(a,125)};
339 it.prototype.B=function(){this.X.clearRect(-this.o,-this.i,this.width,this.height);for(var a=this.G++%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.X.beginPath();this.X.arc(d,c,4*this.b,0,2*Math.PI,!1);this.X.fillStyle="rgba(189, 189, 189, "+e+")";this.X.fill()}};it.prototype.hide=function(){I(this.a);it.C.hide.call(this)};function jt(){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(jt,Z);jt.prototype.F=function(){this.a=this.b=null;jt.C.F.call(this)};function kt(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(kt,Z);function lt(a,b,c,d){Om.call(this,a,"share-service-icon-"+d+"-sharebar",b,c);V(this.element,"share-service-icon-sharebar")}y(lt,Om);function mt(){Z.call(this,["div","ytp-share-url-container",["input","ytp-share-url"]]);this.a=this.template.a["ytp-share-url"]}y(mt,Z);mt.prototype.F=function(){this.a=null;mt.C.F.call(this)};function nt(a,b,c){R.call(this);this.a=a;this.g=b;this.i=c;this.eb=new eo(this);this.j=this.b=this.k=this.ia=null;this.A=this.o=!1}y(nt,R);f=nt.prototype;f.Rj=function(){var a=E("html5-title",this.a);this.k=E("html5-title-text",a);this.eb.listen(this.k,"click",this.Fn);this.b=new Ss(this.i);this.b.T(a,1);this.eb.listen(this.b.g,"click",this.ek);this.g.nf&&this.b.g.hide();this.eb.listen(this.b.i,"click",this.ai)};f.reset=function(){};
340 f.update=function(a){this.ia=a;this.reset();Zc(this.k,a.title||"");an(this.a)};f.Fn=function(){this.Ki(this.ia.Oc||ot(this.g,this.ia))};f.ek=function(){if(!this.o){this.o=!0;Cm(this.ia?this.ia.L:void 0,!1,this.Ns,ba,this,this.g.Da,this.g.Ta);if(!this.j){var a=E("html5-info-panel-loading-icon",this.a);this.j=new it;V(this.j.element,"html5-info-panel-loader");this.j.T(a);L(this,this.j)}this.j.show()}Rs(this.b.i);W(this.a,"show-share");a=this.b.g;a.b?Rs(a):Qs(a);return bm(this.a,"show-more-info")};
341 f.ai=function(a){Rs(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.ia?this.ia.L:void 0};this.g.Da&&(b.authuser=this.g.Da);this.g.Ta&&(b.pageid=this.g.Ta);ej("/share_ajax",{X:this,method:"GET",onError:this.Xt,Oa:this.Yt,zf:b})}a&&a.stopPropagation();a=this.b.i;a.b?Rs(a):Qs(a);bm(this.a,"show-share")}};
342 f.Ns=function(a,b){if(!this.ha()){var c=E("html5-info-panel",this.a),d=b.user_info;this.ia&&(this.ia.ua=d.external_id);var e=E("html5-author-img",c).getElementsByTagName("img")[0];e.src=d.image_url;this.eb.listen(e,"click",this.Wn);e=E("html5-author-name",c);Zc(e,d.username);this.eb.listen(e,"click",this.Wn);e=b.video_info;e.subscription_ajax_token&&ff("subscription_ajax",e.subscription_ajax_token);var g=E("html5-subscribe-button-container",c);g.innerHTML=d.subscription_button_html?d.subscription_button_html:
343 "";d=ct.getInstance();(d=E($(d),g))&&pt(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 jt,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=nf("YTP_SENTIMENT_LIKE",h);g=nf("YTP_SENTIMENT_DISLIKE",g);xm(d.template,"sentiment",h+", "+g);d.T(E("html5-video-info",c),2);d=E("html5-description-text",c);Zc(d,e.description);this.j.hide();c=E("html5-info-panel-content",
344 c);an(c)}};
345 f.Yt=function(a,b){if(!this.ha()){var c=E("share-bar"),d=new mt;Lc(d.a,{value:b.url_short});d.T(c);Zl(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 lt(this.i,d[e].name,d[e].sname,d[e].img);g.T(c);this.eb.listen(g,"click",oa(Dr,d[e].url,{}))}d=new kt(this.i);this.eb.listen(d,"click",v(this.Ki,this,b.more));d.T(c);d=new Om(this.i,"yt-uix-button-icon-share-bar-close",this.i.getMsg("YTP_BUTTON_CLOSE"),this.i.getMsg("YTP_BUTTON_CLOSE"));d.T(c);
346 this.eb.listen(d,"click",this.ai)}};f.Xt=function(){};f.Wn=function(){var a=this.g,b=this.ia,c="",c=b.ua?a.ib+"channel/UC"+b.ua:a.ib+"user/"+b.author;this.Ki(c)};f.Ki=function(a){Cr(a)};f.F=function(){this.eb.removeAll();this.ia=this.k=this.g=this.a=null;nt.C.F.call(this)};function qt(){Z.call(this,["div","ytp-playlist-tray-index-length",["span","ytp-playlist-tray-index","{{index}}"],["span",""," / "],["span","ytp-playlist-tray-length","{{length}}"]])}y(qt,Z);qt.prototype.Hg=function(a){xm(this.template,"index",a+1)};function rt(a){Os.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(rt,Os);function st(a){Z.call(this,["div","ytp-playlist-tray-controller"]);this.b=new rt(a);this.b.T(this.template.M());L(this,this.b);this.a=new qt;this.a.T(this.template.M());L(this,this.a)}y(st,Z);function tt(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(tt,Z);function ut(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 eo(this);this.b=this.a=null}y(ut,Z);ut.prototype.F=function(){this.g.removeAll();this.g=null;ut.C.F.call(this)};function vt(a){R.call(this);this.g=new eo;this.A=E("html5-playlist",a);this.b=E("html5-playlist-message",a);this.i=E("html5-playlist-title",a);this.j=E("html5-playlist-pager",a);this.k=E("html5-playlist-pager-button-left",this.j);this.o=E("html5-playlist-pager-button-right",this.j);K(this.k,"click",v(this.Dr,this));K(this.o,"click",v(this.Er,this));this.a=E("html5-playlist-strip",a);this.wf=Ad(this.A).width;this.B=E("html5-playlist-thumbnail",this.a);F(this.B)}y(vt,R);f=vt.prototype;f.wf=0;f.Ua=null;
347 function wt(a,b){b!=a.Ua&&(a.Ua&&a.Ua.W("shuffle",a.gh,a),a.Ua=b,a.Ua.D("shuffle",a.gh,a),Zc(a.b,"Playlist"),""==a.Ua.title?Zc(a.i,"unknown"):Zc(a.i,a.Ua.title+" ("+a.Ua.Pa+(1==a.Ua.Pa?" video)":" videos)")),a.gh())}f.hv=function(a){this.u("playvideoat",a.currentTarget["playlist-index"])};f.iv=function(a){a=a.currentTarget["playlist-index"];var b=qg(this.Ua,a);a==this.Ua.pa?Zc(this.b,"Currently playing"):Zc(this.b,"Switch to");Zc(this.i,b.title)};
348 f.jv=function(){Zc(this.b,"Playlist");Zc(this.i,this.Ua.title+" ("+this.Ua.Pa+(1==this.Ua.Pa?" video)":" videos)"))};function xt(a){var b=Jc("html5-playlist-thumbnail"),c=a.Ua.pa;z(b,function(a){X(a,"html5-playlist-thumbnail-current",a["playlist-index"]==c)})}f.Dr=function(){this.a.style.left=Math.min(od(this.a).x+this.wf,0)+"px";this.gh()};f.Er=function(){this.a.style.left=Math.max(od(this.a).x-this.wf,this.wf-(92*this.Ua.Pa+2))+"px";this.gh()};
349 f.gh=function(){this.g.removeAll();for(var a=this.a.cloneNode(!1),b=Math.max(0,Math.floor((-1*od(this.a).x-2)/92)),c=Math.min(this.Ua.Pa-1,Math.ceil(b+this.wf/92));b<=c;b++){var d=this.B.cloneNode(!1),e=qg(this.Ua,b);d.src=kn(e.L);d["playlist-index"]=b;d.style.left=92*b+2+"px";this.g.listen(d,"click",v(this.hv,this));this.g.listen(d,"mouseenter",v(this.iv,this));this.g.listen(d,"mouseleave",v(this.jv,this));a.appendChild(d)}xt(this);this.j.style.display=92*this.Ua.Pa+2>this.wf?"block":"none";c=this.a;
350 (b=c.parentNode)&&b.replaceChild(a,c);this.a=a;xt(this)};f.F=function(){Af(this.k);Af(this.o);this.g.removeAll();this.o=this.k=this.j=this.i=this.b=this.A=null;vt.C.F.call(this)};function zt(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:kn(a.L)})}y(zt,Z);
351 zt.prototype.Hg=function(a){X(this.element,"ytp-playlist-tray-item-current",this.a==a)};function At(){Z.call(this,["div","ytp-playlist-tray-tray"]);this.a=null;this.i=new eo(this);this.b=[]}y(At,Z);function Bt(a,b){b!=a.a&&(a.a&&a.a.W("shuffle",a.g,a),a.a=b,a.a.D("shuffle",a.g,a),a.g())}At.prototype.g=function(){this.i.removeAll();this.b=[];Vc(this.element);for(var a=0;a<=this.a.Pa-1;++a){var b=new zt(qg(this.a,a),a);b.Hg(this.a.pa);this.b.push(b);this.i.listen(b,"click",oa(this.j,a));b.T(this.element)}};
352 At.prototype.j=function(a){a={index:a};var b=document.createEvent("CustomEvent");b.initCustomEvent("playvideoat",!0,!0,a||null);this.dispatchEvent(b)};At.prototype.F=function(){this.i.removeAll();At.C.F.call(this)};function Ct(a){dm.call(this,a);var b=Q(a);this.A=new eo(this);this.B=a.app.P.A;this.i=new vt(b);this.i.D("playvideoat",a.sj,a);L(this,this.i);this.j=new sm(["div",["ytp-playlist-tray-container","html5-stop-propagation"],["div",["ytp-playlist-tray-info","show-more-info"]]]);L(this,this.j);this.g=new At;this.A.listen(this.g,"playvideoat",v(function(b){a.sj(b.detail.index)},a));L(this,this.g);this.k=E("html5-playlist-button",b);K(this.k,"click",v(this.Lm,this));this.I=this.H=null;this.K=!1;this.b=null;
353 this.D("fullscreentoggled",this.gr,this);this.a.ub()&&a.J().Ma&&(F(E("html5-playlist",Q(this.a))),F(this.k),this.a.app.P.g.appendChild(this.j.M()),this.g.T(this.j.M(),0),this.b=new st(this.B),this.xm(),this.b.T(E("html5-title",void 0),0),this.A.listen(this.b.b,"click",this.Lm),this.D("videodatachange",this.jr,this),this.D("onResize",this.wm,this),this.D("clearvideooverlays",this.unload,this))}y(Ct,dm);f=Ct.prototype;f.na="playlist";
354 f.create=function(){var a=this.a.ub();wt(this.i,a);xt(this.i);Bt(this.g,a);for(var b=this.g,c=0;c<b.b.length;c++)b.b[c].Hg(b.a.pa);a.D("shuffle",this.xm,this);Ct.C.create.call(this)};f.xm=function(){this.b.a.Hg(this.a.Wj());var a=Vl(this.a.ub());xm(this.b.a.template,"length",a)};f.destroy=function(){this.a.ub()||(wt(this.i,null),Bt(this.g,null),Ct.C.destroy.call(this))};f.load=function(){this.Z=!0;Ct.C.load.call(this);Qs(this.b.b)};f.unload=function(){this.Z=!1;Ct.C.unload.call(this);Rs(this.b.b)};
355 f.Lm=function(){if(this.Z)this.unload();else if(this.u("command_clear_video_overlays"),this.load(),this.wm(),!this.H){var a=E("ytp-playlist-tray-info"),b=new Ss(this.B);b.T(a,0);this.A.listen(b.g,"click",this.Ku);this.A.listen(b.i,"click",this.Lu);b=this.a.ub();this.H=new tt(this.B,b.title,b.author,b.description);this.H.T(a)}};f.Ku=function(){var a=E("ytp-playlist-tray-info");zc(a,"show-more-info");Ac(a,"show-share")};
356 f.Lu=function(){var a=E("ytp-playlist-tray-info");Ac(a,"show-more-info");zc(a,"show-share");this.K||(this.I=new ut(this.B),this.I.T(a),this.K=!0,ej("/share_ajax",{X:this,method:"GET",onError:this.mv,Oa:this.nv,zf:{action_get_share_info:1,feature:"player_embedded",video_id:this.a.getVideoData().L,list:this.a.ub().g}}))};f.hide=function(){var a=E("ytp-playlist-tray-info");Ac(a,"show-more-info");Ac(a,"show-share")};
357 f.nv=function(a,b){var c=this.I;c.g.removeAll();var d=b.links,e=c.template.a["share-bar-services"];Vc(e);for(var g=0;g<Math.min(3,d.length);g++){var h=new lt(c.i,d[g].name,d[g].sname,d[g].img);h.T(e);c.g.listen(h,"click",oa(Dr,d[g].url))}c.a&&F(c.a.element);c.a=new kt(c.i);c.g.listen(c.a,"click",oa(Cr,b.more));c.a.T(c.element);c.b&&F(c.b.element);c.b=new mt;Lc(c.b.a,{value:b.url_short});c.b.T(c.element)};f.mv=function(){};f.gr=function(a){var b=this.a.J().Y;this.Z&&!a&&"detailpage"==b&&this.unload()};
358 f.jr=function(){this.b.a.Hg(this.a.Wj());var a=Vl(this.a.ub());xm(this.b.a.template,"length",a)};f.wm=function(){var a=Ad(this.j.M());X(this.j.M(),"show-tray-panel",560<a.width)};f.Xa=function(){return!this.Hd&&!!this.a.ub()};f.F=function(){Af(this.k);this.k=null;Ct.C.F.call(this)};function Dt(a){return new Ct(a)};var Et=RegExp("^(ar|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)","i");function Ft(a,b){am(a,["html5-async-progress","html5-async-success","html5-async-error"]);b&&V(a,b);Xs(Us.getInstance(),a)};function Gt(a,b,c,d){if(this.g=!!c)this.gl=Math.max(800,this.gl);this.element=a;this.H=b;this.k=d;Ht?a.ontouchstart=v(this.kw,this):a.onmousedown=v(this.jw,this);a.onclick=v(this.Tn,this)}var Ht="ontouchstart"in document,It=[],Jt=!1;function Kt(){Ht&&!Jt&&(Jt=!0,document.addEventListener("click",function(a){for(var b=new B(a.clientX,a.clientY),c=0,d;d=It[c];c++)if(25>ub(d,b)){a.stopPropagation();a.preventDefault();It.splice(c,1);break}},!0))}
359 function Lt(a){It.push(a);window.setTimeout(function(){var b=It.indexOf(a);-1!=b&&It.splice(b,1)},2500)}f=Gt.prototype;f.gl=1E3;
360 f.kw=function(a){if(!(1<a.touches.length||a._stop)){this.a=a._stop=!0;this.g||(this.element.ontouchend=v(this.Tn,this),document.body.addEventListener("touchend",Mt(this),!1));document.body.addEventListener("touchmove",Nt(this),!1);document.body.addEventListener("touchcancel",Mt(this),!1);Ot(this,a);this.G=window.setTimeout(v(this.qi,this,!0),100);var b=a.touches[0];this.b=new B(b.clientX,b.clientY);this.g||this.k&&!this.k(a)||Lt(this.b)}};
361 f.jw=function(a){a.stopPropagation();this.a=!0;Ot(this,a);this.qi(!0)};f.Tn=function(a){"touchend"==a.type&&!this.a||a._stop||(a._stop=!0,this.qi(!0),window.setTimeout(v(function(){this.Hi();this.H(a)},this),0))};f.bx=function(a){1<a.touches.length?this.Hi():(a=a.touches[0],a=new B(a.clientX,a.clientY),this.b&&12<ub(this.b,a)&&this.Hi())};function Nt(a){a.i||(a.i=v(a.bx,a));return a.i}
362 f.Hi=function(){window.clearTimeout(this.G);window.clearTimeout(this.A);this.qi(!1);this.a=!1;document.body.removeEventListener("touchmove",Nt(this),!1);document.body.removeEventListener("touchend",Mt(this),!1);document.body.removeEventListener("touchcancel",Mt(this),!1)};function Mt(a){a.j||(a.j=v(a.Hi,a));return a.j}f.qi=function(a){this.B&&Dc(this.element,this.B,a)};function Ot(a,b){a.o&&(a.A=window.setTimeout(v(function(){this.a=!1;this.o(b)},a),a.gl))};function Pt(a){Om.call(this,a);this.element.setAttribute("tabindex",15);Qt(this)}y(Pt,Om);function Qt(a){Qm(a,"ytp-button-fullscreen-enter");var b=a.g.getMsg("YTP_BUTTON_FULLSCREEN_ENTER");Rm(a,b);a.a=b};function Rt(){Z.call(this,["div",["ytp-menu","html5-stop-propagation"],"{{content}}"]);this.a=[];this.stopPropagation("click")}y(Rt,Z);Rt.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}}$a(this.a,b,0,a);St(this)};Rt.prototype.remove=function(a){Ua(this.a,a);St(this)};
363 function St(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.T(b.M())}}a.Aa(b)}Rt.prototype.F=function(){this.a=null;Rt.C.F.call(this)};function Tt(a){Om.call(this,a);this.element.setAttribute("tabindex",3);Ut(this)}y(Tt,Om);function Ut(a){Qm(a,"ytp-button-play");var b=a.g.getMsg("YTP_BUTTON_PLAY");Rm(a,b);a.a=b};function Vt(a){Z.call(this,["div","ytp-playlist-controls","{{content}}"]);this.b=new Om(a,"ytp-button-prev",a.getMsg("YTP_BUTTON_PREV"),a.getMsg("YTP_BUTTON_PREV"));L(this,this.b);this.a=new Om(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(Vt,Z);function Wt(a,b,c,d){var e=Math.min(c/(b.eo/b.wi),d/(b.co/b.rows)),g=b.eo*e,e=b.co*e,g=Math.floor(g/b.wi)*b.wi,e=Math.floor(e/b.rows)*b.rows,h=g/b.wi,k=e/b.rows,m=Math.floor((c-h)/2);c=Math.ceil((c-h)/2);d=Math.floor((d-k)/2);id(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.su*h+"px "+-1*b.row*k+"px","background-size":g+"px "+e+"px"})};function Xt(){this.a=new zr(this.Rv,250,this);L(this,this.a)}y(Xt,Lf);f=Xt.prototype;f.Go=!1;f.wd=null;f.$b=null;f.Wh=null;f.Yj=null;f.Zj=null;f.wg=null;f.Fe=0;f.Dk=0;f.fl=0;f.Uo=10;f.Lb=0;f.Ii=0;f.ll=0;f.$c=null;f.Le=null;f.Pe=0;f.disable=function(){this.Go=!0};f.Va=function(a){this.Pe=a};f.Eo=function(a,b){this.$b.style.display="none";for(var c,d,e=a;e<=b;e++)if(d=this.$b.children[e])c=Mk(this.Le,e,this.Lb),Wt(d,c,this.Lb,this.Ii);this.$b.style.display=""};
364 function Yt(a,b){if(b!=a.ll){var c=Mk(a.Le,b,2*a.Lb),d=Math.round(2*a.Lb),e=Math.round(2*a.Ii);Wt(a.Yj,c,d,e);a.ll=b}}f.Rv=function(){for(var a=this.Dk,b=Math.max(Math.floor(a/this.Lb),0),a=Math.min(Math.ceil((a+this.Fe)/this.Lb),this.$c.a[0].b-1);b<=a;b++){for(var c=this.Le,d=b,e=nk(c.a,2*this.Lb),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,Jk(g.g,k,{zn:k,An:h}))}Nk(c)}};
365 function Zt(a,b){a.Uo=Math.min(10,Math.ceil(a.Fe/72));a.Lb=Math.floor(a.Fe/a.Uo);a.Ii=0.555*a.Lb;a.fl=a.Lb*a.$c.a[0].b;zd(a.$b,a.fl);var c=Math.round(2*a.Lb),d=0.555*c+12;yd(a.Wh,c,d);md(a.Wh,(a.Fe-c)/2);a.wd.style.height=nd(d+20,!0);b&&(a.Eo(0,a.$c.a[0].b-1),Yt(a,a.ll))}f.F=function(){this.wg=this.Zj=this.Yj=this.Wh=this.$b=this.wd=this.Le=this.$c=null;Xt.C.F.call(this)};function $t(a,b,c,d){this.width=b;this.a=c;this.i=d;this.b=b-c-d;this.g=tb(a-c,0,this.b);this.position=this.g+c;this.vd=this.g/this.b};function au(){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.G=0;this.b=[];this.g=this.template.a["ytp-progress-magnifier-scrubber-button"]}y(au,Z);
366 function bu(a,b){var c=a.a,d=c.width-4,e=d-2*a.Pe;if(ga(b))var d=cu(a).position,g=a.M().offsetWidth/2,d=tb(b,d-g,d+g);else d=2+c.vd*d;return new $t(d,c.width,2+c.vd*e,2+(1-c.vd)*e)}function cu(a){var b=a.a;a=a.M().offsetWidth/2+2;return new $t(b.position,b.width,a,a)}au.prototype.disable=function(){this.a=null};
367 function du(a,b){if(a.a){var c=a.M(),d=cu(a),e=bu(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.G*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",ym(a.g)):zm(a.g);m-=h;0<=m?(zd(a.j,Math.min(m,2*g)),ym(a.j)):zm(a.j);k-=h;0<=k?(zd(a.i,Math.min(k,2*g)),ym(a.i)):zm(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=
368 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())}}}au.prototype.Va=function(a){this.Pe=a;du(this,!0)};au.prototype.F=function(){this.g=this.b=this.j=this.i=null;au.C.F.call(this)};function eu(){}y(eu,Lf);f=eu.prototype;f.ii=!1;f.Pe=0;f.Hb=null;f.Jh=null;f.$j=null;f.zj=null;f.Eg=null;f.hh=null;f.disable=function(){this.ii=!0};f.show=function(){this.ii||an(this.Hb)};f.hide=function(){bn(this.Hb)};f.Va=function(a){this.Pe=a};f.reset=function(){W(this.Hb,"with-thumbnail");this.hh=this.Eg=null};f.Zu=function(a,b){(a<=this.a||this.a<=b)&&fu(this)};function fu(a){var b=Mk(a.hh,a.a,108);Wt(a.$j,b,108,60)}f.F=function(){this.zj=this.$j=this.Jh=this.Hb=this.hh=this.Eg=null;eu.C.F.call(this)};function gu(a){R.call(this);this.hb=a;this.ua=null;this.K={};this.ea=NaN;this.$=this.U=this.N=null;this.ba=NaN;this.o=this.g=this.H=null;this.k=new eo(this);this.Ra="";this.La=null;this.fa=0;this.qb=null;this.va=0;this.a=this.b=this.gb=this.i=this.S=this.da=null;this.za=new eo(this);this.ra=null;this.Ia=new eo(this);this.A=this.I=!1;this.O=this.R=this.ca=null;this.j=this.Ma=this.oa=this.B=0}y(gu,R);
369 function hu(a,b){a.g=b;a.i=E("html5-progress-bar",a.g);a.k.listen(a.i,"click",a.Rh);fo(a.k,a.i,"down",a.Lv);a.Ra=fo(a.k,a.i,"over",a.sn);a.S=E("html5-progress-list",a.i);a.qb=E("html5-play-progress",a.S);a.La=E("html5-load-progress",a.S);a.da=E("html5-highlight",a.S);a.ua=E("html5-ad-progress-list",a.i);a.ra=E("html5-scrubber-button",a.i);a.U=E("html5-clip-exclusion",a.i);a.$=a.U.cloneNode(!1);a.U.parentNode.appendChild(a.$);a.H=E("html5-clip-start",a.i);fo(a.k,a.H,"over",a.lp);fo(a.k,a.H,"out",a.kp);
370 a.k.listen(a.H,"click",a.rl);a.N=E("html5-clip-end",a.i);fo(a.k,a.N,"over",a.lp);fo(a.k,a.N,"out",a.kp);a.k.listen(a.N,"click",a.rl);a.gb=E("html5-progress-screenreader",a.i)}f=gu.prototype;
371 f.sn=function(a){if(!this.I){this.k.Vc(this.Ra);this.A=!1;this.R=this.ca=a=new B(a.pageX,a.pageY);if(this.a&&5400<=this.B){I(this.oa);this.a.show();an(this.da);a=this.a;var b=iu(this);a.a=b;du(a,!0);a=oa(V,this.g,"html5-progress-magnifier-hover");this.oa=H(a,0)}this.b&&this.b.show();fo(this.za,this.g,"move",this.yn);fo(this.za,this.g,"out",this.au)}};function ju(a){a.A=!1;I(a.oa);W(a.g,"html5-progress-magnifier-hover");var b=Wq(a.a.M());a.oa=H(v(function(){this.a.hide();bn(this.da)},a),b)}
372 f.au=function(a){this.I||a.relatedTarget&&!(this.b&&Yc(this.b.Hb,a.relatedTarget)||!Yc(this.g,a.relatedTarget))||ku(this)};
373 f.yn=function(a){var b=new B(a.pageX,a.pageY);if(this.a&&this.a.a)if(this.I)this.A?this.O=b:this.R=b;else{var c=Cd(this.a.M());if(c.contains(b))this.O=b,this.A=!0;else{var d=Cd(this.S),e=this.ca.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.ca.x-c&&a.pageX<=this.ca.x+c)return;this.A=!1;this.ca=this.R=b}else{ku(this);return}}}else this.R=b;lu(this)};
374 function lu(a){if(a.a&&a.a.a){var b=Cd(a.a.M());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=iu(a);c.a=b;du(c,!0);var d=a.a,c=bu(d),b=cu(d),d=d.M().offsetWidth,e=b.position-d/2,c=new $t(c.position,d,c.a-e,c.i-(b.width-e-d)),b=Math.max(c.width/c.b,0.015);a.da.style.left=Math.round(1E3*((c.width/2-c.a)/c.b-b/2))/10+"%";a.da.style.width=Math.round(1E3*b)/10+"%"}a.b&&(c=a.b,a=mu(a),c.ii||(b=c.Hb.offsetWidth/2,d=new $t(a.position,a.width,b,b),c.Hb.style.left=d.position-
375 b+"px",b=c.Jh.offsetWidth/2,d=new $t(a.position,a.width,b,b),c.Jh.style.left=d.position-c.Hb.offsetLeft-b+"px",Zc(c.zj,Xm(a.vd*c.Pe)),c.Eg&&(a=mk(c.Eg,a.vd),a!=c.a&&(c.a=a,fu(c)))))}f.cx=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=sd(this.g).x;this.R.x=tb(this.R.x+a,b,b+iu(this).width);lu(this);a=mu(this);nu(this,a.vd,this.fa);this.u("seekto",a.vd*this.B,!1)};
376 function ku(a){a.za.removeAll();a.b&&a.b.hide();a.a&&a.a.a&&(a.a.disable(),ju(a));a.Ra=fo(a.k,a.i,"over",a.sn)}f.Lv=function(a){a.stopPropagation();a.preventDefault();this.b&&this.b.hide();this.a&&this.a.a&&ju(this);ou(this);this.Rh(a)};f.Os=function(a){a.stopPropagation();a.preventDefault();this.A=!0;ou(this);this.Rh(a)};function ou(a){a.I=!0;a.u("beginseeking");fo(a.Ia,document,"move",a.Rh);fo(a.Ia,document,"up",a.fx);a.A&&(a.Ma=jf(v(a.cx,a),20))}
377 f.fx=function(a){a.stopPropagation();this.I=!1;this.Ia.removeAll();kf(this.Ma);ku(this);this.u("endseeking")};f.Rh=function(a){a.stopPropagation();a.preventDefault();this.yn(a);a=this.A?mu(this):iu(this);var b=a.vd*this.B;nu(this,a.vd,this.fa);(b<this.ba||b>this.ea)&&this.rl();this.u("seekto",b,!this.I)};function mu(a){return a.a&&a.a.a?a.A?bu(a.a,a.O.x-sd(a.g).x):bu(a.a):iu(a)}function iu(a){return new $t(a.R.x-sd(a.g).x,a.S.clientWidth,a.ra.clientWidth/2,a.ra.clientWidth/2)}
378 function pu(a,b,c){nu(a,q(b)&&!a.I?b:a.va,q(c)?c:a.fa)}function nu(a,b,c){a.va=b;var d=Math.round(1E3*b)/10;id(a.qb,"transform","scalex("+b+")");a.ra.style.left=d+"%";a.fa=Math.max(a.va,c);id(a.La,"transform","scalex("+a.fa+")");a.a&&(a=a.a,a.G=b,a.o=c,du(a,!1))}f.Va=function(a){this.B=a;qu(this);this.a&&this.a.Va(a)};
379 function qu(a){var b=!(!a.B||isNaN(a.ba)),c=!(!a.B||isNaN(a.ea));X(a.H,"html5-clip-enabled",b);X(a.U,"html5-clip-enabled",b);X(a.N,"html5-clip-enabled",c);X(a.$,"html5-clip-enabled",c);b&&(a.H.style.left=100*a.ba/a.B+"%",a.U.style.width=a.H.style.left);c&&(b=Math.min(100,100*a.ea/a.B),a.N.style.left=b+"%",a.$.style.left=b+"%",a.$.style.width=100-b+"%")}f.lp=function(){V(this.g,"html5-clip-marker-hover")};f.kp=function(){W(this.g,"html5-clip-marker-hover")};
380 f.rl=function(a){a&&a.stopPropagation();this.ba=NaN;qu(this);this.ea=NaN;qu(this)};f.F=function(){I(this.oa);kf(this.Ma);this.k.removeAll();this.za.removeAll();this.Ia.removeAll();this.ua=null;this.K={};this.ra=this.gb=this.S=this.i=this.qb=this.La=this.g=this.H=this.$=this.U=this.N=null;gu.C.F.call(this)};function ru(a,b,c){Z.call(this,["div","ytp-drop-down","{{content}}"]);this.G=a;this.g=!1;this.o=0;this.a=new Z(["div","ytp-drop-down-menu","{{content}}"]);L(this,this.a);this.b=new Om(this.G,"ytp-drop-down-label");L(this,this.b);this.listen(this.b,"click",this.B);this.j=new Z(["div","ytp-drop-down-label-content","{{content}}"]);L(this,this.j);this.b.Aa([this.j,["div","ytp-drop-down-arrow"]]);this.Aa([this.a,this.b]);this.stopPropagation("click");q(b)&&su(this,b);q(c)&&(this.a.Aa(c),tu(this));tu(this)}
381 y(ru,Z);function su(a,b){a.j.Aa(b);tu(a)}ru.prototype.i=function(){this.g=!1;tu(this)};ru.prototype.B=function(){this.g=!this.g;tu(this)};function uu(a,b){b>a.o&&(a.o=b,a.element.style.minWidth=a.o+"px")}function tu(a){a.g?(a.a.show(),a.listen(window,"blur",a.i,"menu"),a.listen(document,"click",a.i,"menu")):(a.a.hide(),a.Vc(a.k.menu),a.k.menu=[]);var b=Ad(a.b.M());a.a.M().style.bottom=b.height-1+"px";uu(a,b.width)}ru.prototype.F=function(){this.G=null;ru.C.F.call(this)};function vu(a){Om.call(this,a,"ytp-drop-down-menu-button");this.j=new Z(["div","ytp-drop-down-menu-button-check"]);L(this,this.j)}y(vu,Om);vu.prototype.Aa=function(a){vu.C.Aa.call(this,[this.j,a])};function wu(a,b){X(a.element,"ytp-drop-down-menu-button-selected",b)};function xu(a){Z.call(this,["span"]);this.element.innerHTML=a}y(xu,Z);function yu(a){R.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 ru(a,void 0,this.j);L(this,this.element);uu(this.element,100);zu(this,this.a,this.a);this.priority=-1}y(yu,R);function Au(a,b){Bu(a);z(b,function(a){var b=new vu(this.g);b.Aa(new xu(Cu(this,a)));b.T(this.j.M());this.b[a]=b;K(b,"click",v(this.k,this,a))},a);a.b[a.a]&&wu(a.b[a.a],!0)}
382 function zu(a,b,c){a.a&&a.b[a.a]&&wu(a.b[a.a],!1);a.a=b;a.b[a.a]&&wu(a.b[a.a],!0);a.i="auto"==c;a.i&&c!=b?(c=a.element,a=a.g.getMsg("YTP_QUALITY_AUTO_WITH_QUALITY",{video_quality:Cu(a,b)}),a=new xu(a),su(c,a)):su(a.element,new xu(Cu(a,c)))}function Cu(a,b){return a.g.getMsg("YTP_QUALITY_"+b.toUpperCase())}function Bu(a){Cb(a.b,function(a){Nf(a)});a.b={}}yu.prototype.k=function(a){this.element.i();this.i&&"auto"==a||this.u("qualitychanged",a)};yu.prototype.F=function(){Bu(this);this.g=null;yu.C.F.call(this)};function Du(a){R.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 ru(a,void 0,this.i);L(this,this.element);uu(this.element,100);this.priority=1}y(Du,R);function Eu(a,b){Fu(a);z(b,function(a){var b=new vu(this.g);b.Aa(Gu(this,a));b.T(this.i.M());this.a[a]=b;K(b,"click",v(this.j,this,a))},a);a.a[a.b]&&wu(a.a[a.b],!0)}
383 function Hu(a,b){a.b&&a.a[a.b]&&wu(a.a[a.b],!1);a.b=b;a.a[a.b]&&wu(a.a[a.b],!0);su(a.element,Gu(a,b))}function Gu(a,b){return 1==b?a.g.getMsg("YTP_PLAYER_SPEED_NORMAL"):b.toString()}function Fu(a){Cb(a.a,function(a){Nf(a)});a.a={}}Du.prototype.j=function(a){this.element.i();Hu(this,a);this.u("speedchanged",a)};Du.prototype.F=function(){Fu(this);this.g=null;Du.C.F.call(this)};function Iu(){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(Iu,Z);Iu.prototype.Va=function(a){xm(this.template,"duration",Xm(a))};Iu.prototype.F=function(){this.a=null;Iu.C.F.call(this)};function Ju(a){R.call(this);this.b=a;this.a=new eo(this);this.A=new eo(this);this.k=this.j=null;this.o=new eo(this)}y(Ju,R);f=Ju.prototype;f.kg=null;f.Zc=null;f.Ie=null;f.fk=null;f.Yd=null;f.tc=null;f.uf=null;f.ac=null;f.yg=null;f.Vd=null;f.ze=null;f.Vh=null;f.ud=null;f.Qc=null;f.vb=null;f.vf=null;f.Ee=null;f.Rl=!1;f.Uc=null;f.ce=null;f.hk=null;f.de=null;f.bo=!1;f.tg=null;f.wb=null;
384 function Ku(a,b){a.kg=b;var c=E("html5-player-chrome",b);a.Zc=new Tt(a.b);a.Zc.T(c,0);L(a,a.Zc);new Gt(a.Zc.M(),v(a.St,a),!1,function(){return!0});a.Ie=new Vt(a.b);a.Ie.T(c,1);L(a,a.Ie);a.a.listen(a.Ie.a,"click",oa(a.u,"nextvideo"));a.a.listen(a.Ie.b,"click",oa(a.u,"previousvideo"));var d=E("html5-progress-bar-container",b);a.fk=new gu(a.b);hu(a.fk,d);a.g=new Iu;a.g.T(c,4);L(a,a.g);a.a.listen(a.g.a,"click",oa(a.u,"seekto",Infinity));a.Yd=E("html5-volume-control",b);a.a.listen(a.Yd,"keydown",a.Tt);
385 a.tc=E("html5-volume-button",a.Yd);a.a.listen(a.tc,"click",a.Dn);a.uf=E("html5-volume-panel",a.Yd);a.ac=E("html5-volume-slider",a.Yd);fo(a.a,a.ac,"down",a.Pt);a.yg=E("html5-volume-slider-foreground",a.Yd);a.Vh=E("html5-threed-popup-menu",b);a.ze=E("html5-small-player-button",b);a.a.listen(a.ze,"click",a.Cn);a.Vd=E("html5-large-player-button",b);a.a.listen(a.Vd,"click",a.Cn);a.i=new Pt(a.b);a.i.T(c,7);L(a,a.i);a.a.listen(a.i,"click",a.Ot);a.ud=E("html5-quality-button",b);a.Ee=E("html5-quality-popup-menu",
386 a.ud);go(a.a,a.Ee,a.Mt);a.vf=E("html5-speed-popup-menu",a.ud);go(a.a,a.vf,a.Nt);a.wb=E("html5-watch-later-button",b);a.a.listen(a.wb,"click",a.Qt);a.wb&&pt(a.b,a.wb,a.b.getMsg("YTP_TOOLTIP_WATCH_LATER"),!0);a.tg=E("html5-watch-on-youtube-button",b);a.a.listen(a.tg,"click",a.Rt)}f.disable=function(a){Lu(this,a,!0)};f.enable=function(a){Lu(this,a,!1)};function Lu(a,b,c){z(b,function(a){X(this.kg,"disabled-control-"+a,c)},a)}
387 function Mu(a,b){if(a.Uc)Au(a.Uc,b),b.length?a.vb.add(a.Uc):a.vb.remove(a.Uc);else{var c=Jc("yt-uix-button-menu-item",a.Ee);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.Rl=!!b.length;Zm(a.Ee,a.Rl);Zm(a.ud,a.Rl)}}f.Tt=function(a){var b=a.keyCode;if(32==b||13==b)this.Dn(),a.preventDefault()};f.Va=function(a){this.g.Va(a)};function Nu(a,b,c){a.Uc?zu(a.Uc,b,c):a.Ee&&(a=a.Ee,Ou(a,"active",b),Ou(a,"selected",c||b))}
388 function Ou(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.Dn=function(){this.u("mutetoggled")};function Pu(a,b){if(b){if(a.bo){var c=a.Zc;Qm(c,"ytp-button-stop");var d=c.g.getMsg("YTP_BUTTON_STOP")}else c=a.Zc,Qm(c,"ytp-button-pause"),d=c.g.getMsg("YTP_BUTTON_PAUSE");Rm(c,d);c.a=d}else Ut(a.Zc)}f.St=function(){this.u("playpausetoggled")};
389 f.Pt=function(a){this.u("beginvolume");V(this.tc,"changing");var b=this.ac.clientWidth;a=100*(ud(a,this.ac).x/b);Qu(this,a);fo(this.A,document,"move",this.hx);fo(this.A,document,"up",this.ix)};f.hx=function(a){var b=this.ac.clientWidth,b=100*(ud(a,this.ac).x/b);Qu(this,b);a.preventDefault()};function Qu(a,b){var c={volume:tb(b,0,100),muted:!1};a.u("volumechanged",c)}f.ix=function(){W(this.tc,"changing");this.A.removeAll();this.u("endvolume")};
390 f.Cn=function(a){this.u("sizechangerequested",a.currentTarget==this.Vd)};f.vt=function(){this.u("sizechangerequested",1==this.ce.getSelected())};f.Mt=function(a){a=G(a.currentTarget,"value");this.u("qualitychanged",a)};f.Ot=function(){this.u("fullscreentoggled")};function Ru(a,b){if(a.de)Hu(a.de,parseFloat(b));else if(a.vf){var c=a.vf;Ou(c,"active",b);Ou(c,"selected",b)}}f.Nt=function(a){a=G(a.currentTarget,"value");this.u("speedchanged",parseFloat(a));Ru(this,a)};
391 f.Qt=function(){Zl(this.wb,"html5-async-progress")||(Ft(this.wb,"html5-async-progress"),this.u("watchlater"))};f.Rt=function(){this.u("watchonyoutube")};f.Qg=function(){this.o.removeAll();this.j&&(this.j.hide(),this.j=null);this.k&&(Rs(this.k),this.k=null)};f.ut=function(a){a.stopPropagation();if(this.Qc.b)this.Qg();else{a=this.vb;var b=this.Qc;this.Qg();this.j=a;this.j.show();b&&(this.k=b,Qs(this.k));this.o.listen(window,"blur",this.Qg);this.o.listen(document,"click",this.Qg)}};
392 f.tt=function(a){var b=a.target,c="unknown",c=b==this.Zc.M()?"playpause":b==this.tc||b==this.uf||b==this.ac||b==this.Yd||b==this.yg?"volume":b==this.g?"time":b==this.ud?"settings":b==this.Qc?"settings-redesign":b==this.wb?"watchlater":b==this.tg?"youtube":b==this.i.M()?"fullscreen":b==this.ze||b==this.Vd?"size":a.target;this.u("controlclick",c)};
393 f.F=function(){this.a.removeAll();this.A.removeAll();this.o.removeAll();this.Qg();this.vb=this.Qc=this.Uc=this.wb=this.tg=this.Ee=this.vf=this.ud=this.Vh=this.ze=this.Vd=this.yg=this.ac=this.uf=this.tc=this.Yd=this.kg=null;Ju.C.F.call(this)};var Su=["left","right","center"],Tu={id:0,priority:0,ji:7,ki:50,By:80,he:95,Bd:15,qk:100,isVisible:!0,textAlign:Su[2],Je:0,backgroundColor:"#080808",gi:"#fff",ty:1,Nl:1},Uu={id:99,priority:1,ji:0,ki:5,he:7,Bd:2,qk:32,textAlign:Su[0]},Vu=["CA","MX","US"];function Wu(a){a=a||Tu;pa(this,a)}f=Wu.prototype;f.ji=7;f.ki=50;f.he=95;f.By=80;f.Je=0;f.textAlign="center";f.backgroundColor="#080808";f.gi="#fff";f.ty=1;f.Nl=1;f.Bd=15;f.qk=32;f.isVisible=!0;f.fontFamily='"Arial Unicode Ms", Arial';f.xx="100%";function Xu(a,b){this.id=a;this.qa=new Wu(b);var c="caption-window";0==this.id&&(c="standard-caption-window");this.ma=Pc("div",{id:"caption-window-"+this.id,"class":c});this.Eb=Pc("span",{"class":"captions-text",style:"visibility: hidden"});this.Eb.innerHTML="C";this.ja=Pc("span",{"class":"captions-text",tabindex:"4","aria-live":"assertive"});this.Zi=Pc("div",{"class":"caption-window-transform"});this.Zi.appendChild(this.ja);this.ma.appendChild(this.Zi)}f=Xu.prototype;f.id=0;f.qa=null;f.eh="";
394 f.Cc=null;f.ma=null;f.Zi=null;f.ja=null;f.Eb=null;f.type=1;f.getType=function(){return this.type};f.Ui=function(){var a;this.Eb.style.fontFamily=this.ja.style.fontFamily;this.ma.appendChild(this.Eb);a=this.Eb.offsetHeight;this.ma.removeChild(this.Eb);return a};f.Xf=function(){this.ja&&(0!=this.id&&(zd(this.ma,"100%"),zd(this.ma,this.ja.offsetWidth)),Yu(this),Zm(this.ma,this.qa.isVisible))};
395 function Yu(a){md(a.ma,a.qa.ki+"%",a.qa.he+"%");for(var b=0;8>=b;b++)W(a.ma,"anchor-point-"+b);V(a.ma,"anchor-point-"+a.qa.ji)}f.$o=function(a){var b=[];z(a,function(a){a.Yi?b[b.length-1]+=a.ge:b.push(a.ge)});this.Te(b.join("\n"));this.Cc=a};f.Te=function(a){this.eh=a=Zu(a);this.ja.innerHTML=this.eh;this.Ol();this.Xf()};
396 f.Ol=function(){this.ma.style.textAlign=this.qa.textAlign;this.ja.style.backgroundColor=this.qa.backgroundColor;this.ja.style.color=this.qa.gi;this.ja.style.opacity=this.qa.Nl;this.ja.style.fontFamily=this.qa.fontFamily;this.ja.style.fontSize=this.qa.xx;1==this.qa.Je?this.ja.setAttribute("dir","rtl"):this.ja.removeAttribute("dir")};f.toString=function(){var a="Caption window ("+this.id+"): "+this.eh,b;for(b in this.qa)a+=b+" "+this.qa[b]+" | ";return a};
397 function Zu(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.$i=function(){this.Cc=[];this.Te("")};function $u(a,b){Xu.call(this,a,b);this.ja.style.display="block";this.ja.style.padding="0";this.Ob=[];var c=this.ja;W(c,"captions-text");V(c,"caption-painton-text-rows")}y($u,Xu);f=$u.prototype;f.type=0;f.ko="";f.dh=!1;f.Bb=null;f.Ob=null;f.Ui=function(){return this.Ob[0]?this.Ob[0].offsetHeight:0};function av(a){return a.Ob.reduce(function(a,c){return Math.max(a,c.offsetWidth)},0)}
398 f.Xf=function(){0!=this.id&&(zd(this.ma,"100%"),zd(this.ma,this.dh?av(this):this.Bb.width));var a=Math.round(this.qa.Bd*this.Ui());id(this.ma,"max-height",a+"px");Yu(this);Zm(this.ma,this.qa.isVisible)};
399 f.Te=function(a){this.$i();a=Zu(a);this.dh||(this.eh=a);a=a.split("<br>");for(var b=0,c=a.length;b<c;b++)if(a[b]){var d=Pc("div",{"class":"caption-row-holder"}),e=Pc("span",{"class":"caption-row captions-text"});d.appendChild(e);e.innerHTML=a[b];this.dh||(this.ja.style.height=this.Bb.height+"px",this.ja.style.width=this.Bb.width+"px",d.style.position="absolute",d.style.top=this.Bb.jo[b]+"px",d.style.left=this.Bb.ho[b]+"px");this.ja.appendChild(d);this.Ob.push(e)}this.Ol();this.Xf()};
400 f.$i=function(){for(var a=0,b=this.Ob.length;a<b;a++){var c=ed(this.Ob[a],"caption-row-holder");F(c)}this.Ob=[]};f.Ol=function(){this.ma.style.textAlign=this.qa.textAlign;for(var a=0,b=this.Ob.length;a<b;a++)this.Ob[a].style.backgroundColor=this.qa.backgroundColor;this.ja.style.color=this.qa.gi;this.ja.style.opacity=this.qa.Nl;this.ja.style.fontFamily=this.qa.fontFamily;1==this.qa.Je?this.ja.setAttribute("dir","rtl"):this.ja.removeAttribute("dir")};function bv(a,b){Xu.call(this,a,b);this.Cc=[];this.pe=[];this.Db=[];this.Yf=new Uh(433);this.Yf.stop();K(this.Yf,"tick",v(this.Cx,this))}y(bv,Xu);f=bv.prototype;f.type=2;f.Ax=32;f.Db=null;f.qe=0;f.pe=null;f.Yf=null;f.Xf=function(){zd(this.ma,"100%");var a=this.ma.offsetWidth,a=Math.min(cv(this),a);zd(this.ma,a+"px");zd(this.Zi,"100%");this.ja.style.whiteSpace="nowrap";Yu(this);Zm(this.ma,this.qa.isVisible)};
401 f.$o=function(a){var b=a.length;if(0>=b)this.$i();else{for(var c=0;c<b&&0<=this.Cc.indexOf(a[c]);)c++;this.Cc=this.Cc.concat(a.slice(c));dv(this)}};f.$i=function(){this.Cc=[];this.Db=[];this.qe=0;this.Db=[];this.pe=[];ev(this)};
402 function dv(a){if(!fv(a))if(a.qe>=a.Cc.length)ev(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.Cc.length,d=a.qe;d<c;d++){var e=a.Cc[d];if("\n"==e.ge){a.qe++;a.pe[b]++;break}if(e.Yi||0==a.Db[b].length)a.Db[b]+=e.ge,a.qe++,a.pe[b]++;else break}ev(a);d<c&&!fv(a)&&(b=a.Ui(),V(a.ja,"caption-rollup"),a.ma.style.overflow="hidden",a.ja.style.top=-b+"px",a.Yf.start())}}function fv(a){return a.Yf.Xc||Zl(a.ja,"caption-rollup")}
403 f.Cx=function(){this.ma.style.overflow="visible";this.ja.style.top=0;this.Yf.stop();W(this.ja,"caption-rollup");this.Db.push("");this.pe.push(0);dv(this)};function ev(a){if(!fv(a)){for(;a.Db.length<a.qa.Bd;)a.Db.unshift(""),a.pe.unshift(0);for(;a.Db.length>a.qa.Bd;){a.Db.shift();var b=a.pe.shift();0<b&&(a.qe-=b,a.Cc.splice(0,b))}a.Te(a.Db.join("\n"))}}
404 function cv(a){a.Eb.style.fontFamily=a.ja.style.fontFamily;a.Eb.style.fontSize=a.ja.style.fontSize;a.ja.appendChild(a.Eb);a.Eb.innerHTML="\u2014";var b=a.Eb.offsetWidth;a.Eb.innerHTML="&nbsp;";b=2*a.Eb.offsetWidth+b*a.Ax;a.ja.removeChild(a.Eb);return b};function gv(a){this.a=a.pk;this.i=a.priority;this.zc=a.zc||this.zc}gv.prototype.a=0;gv.prototype.i=0;gv.prototype.zc=0;gv.prototype.toString=function(){return this.a+", "+this.zc};function hv(a){gv.call(this,a);this.ge=a.text||this.ge;this.Zh=a.windowId||this.Zh;this.Yi=a.params.append||this.Yi;this.Wp=a.params.row||this.Wp;this.Vp=a.params.Bx||this.Vp}y(hv,gv);f=hv.prototype;f.ge="";f.Yi=!1;f.Wp=0;f.Vp=0;f.Zh=0;f.toString=function(){return this.a+", "+this.zc+": "+this.ge};
405 function iv(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={pk:c,zc:d,text:b,windowId:e,priority:5,params:{}};a.getAttribute("r")&&(b.params.row=parseInt(a.getAttribute("r"),10));a.getAttribute("c")&&(b.params.Bx=parseInt(a.getAttribute("c"),10));
406 a.getAttribute("append")&&(b.priority=6,b.params.append=!0);return new hv(b)}function jv(a){gv.call(this,a);this.id=a.windowId||this.id;this.params=a.params}y(jv,gv);jv.prototype.id=0;jv.prototype.params=null;jv.prototype.g="";jv.prototype.b=!1;function kv(){return new jv({pk:-2147483648,zc:4294967295,params:Tu})};function lv(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 mv(a){this.b=[];this.g=[];this.a={};if(a&&(a=lv(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.zc>=g?h.zc=g:h=null);switch(d.getAttribute("op")){case "kill":g=
407 null;break t;case "define":h=null}h?h.j=!0:h=kv();var k={};pa(k,h?h.params:Tu);d.getAttribute("id")&&(k.id=d.getAttribute("id"));d.getAttribute("op")&&(k.Ey=d.getAttribute("op"));d.getAttribute("rc")&&(k.Bd=parseInt(d.getAttribute("rc"),10));d.getAttribute("cc")&&(k.qk=parseInt(d.getAttribute("cc"),10));d.getAttribute("ap")&&(h=parseInt(d.getAttribute("ap"),10),k.ji=0>h||8<h?7:h);d.getAttribute("ah")&&(k.ki=parseInt(d.getAttribute("ah"),10));d.getAttribute("av")&&(k.he=parseInt(d.getAttribute("av"),
408 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=Su[parseInt(d.getAttribute("ju"),10)]);d.getAttribute("pd")&&(k.Je=1,0==parseInt(d.getAttribute("pd"),10)&&(k.Je=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.gi=parseInt(d.getAttribute("fc"),16));d.getAttribute("sd")&&
409 (k.jk=parseInt(d.getAttribute("sd"),10));h=parseInt(d.getAttribute("d"),10)||1E3*parseFloat(d.getAttribute("dur"))||2147483647;d={pk:g,zc:h,params:k,windowId:parseInt(d.getAttribute("id"),10)};g=new jv(d)}else g=null}this.a[e]=g;this.g.push(g);break;case "text":e=iv(a[b]),this.b.push(e),d=e.Zh,this.a[d]&&(d=this.a[d],e=e.ge,""!=d.g&&(d.b=!0),d.g+=e)}break;default:for(this.g.push(kv()),a=this.i.firstChild.childNodes,b=0,c=a.length;b<c;b++)e=iv(a[b]),this.b.push(e)}}mv.prototype.b=null;
410 mv.prototype.g=null;mv.prototype.a=null;function nv(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 ov(a){a=a||{};this.Ik=a.format;this.b=a.languageCode||"";this.Yg=a.languageName;this.Kb=a.kind||"";this.fc=a.name;this.Ba=a.id;this.zk=a.is_servable;this.oi=a.is_default;this.pi=a.is_translateable;a.translationLanguage&&(this.a=new nv(a.translationLanguage))}
411 function pv(a){var b={format:a.Ik,languageCode:a.b,languageName:a.Yg,displayName:qv(a),kind:a.Kb,name:a.fc,id:a.Ba,is_servable:a.zk,is_default:a.oi,is_translateable:a.pi};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=ov.prototype;f.Yg=null;f.Kb=null;f.fc=null;f.Ba=null;f.zk=!1;f.oi=!1;f.pi=!1;f.Ik=1;
412 function qv(a){var b=[a.Yg];if("asr"==a.Kb){var c=J("HTML5_SUBS_ASR");b.push(" (",c,")")}a.fc&&b.push(" - ",a.fc);a.a&&b.push(" >> ",a.a.b);return b.join("")}f.toString=function(){var a=[this.b,": ",this.fc," (",this.Kb,")"];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.fc==a.fc&&this.Kb==a.Kb};function rv(){this.g=[];this.a=[]}rv.prototype.g=null;rv.prototype.a=null;rv.prototype.b=-1;function sv(a,b){return b?a.a.concat(a.g):a.a}function tv(a,b){switch(b.Kb){case "asr":return uv(b,a.g);default:if(b.oi||0>a.b)a.b=a.a.length;return uv(b,a.a)}}function uv(a,b){return Na(b,v(a.equals,a))?!1:(b.push(a),!0)};function vv(a,b,c,d){this.Ld=a;c?this.Ld=Zi(this.Ld,{hl:c}):(a=Vi(this.Ld).hl||"",a=a.split("_").join("-"),this.Ld=Zi(this.Ld,{hl:a}));this.Li=b;this.Sp=!!d;this.Jd=new rv;this.zi=[];this.Tp={}}f=vv.prototype;f.Ld="";f.Li=null;f.Sp=!1;f.Jd=null;f.zi=null;f.Tp=null;function wv(a,b){return Na(sv(a.Jd,!0),function(a){return a.toString()==b})}function xv(a,b){var c=a.Ld,d={v:a.Li,type:"track",lang:b.b,name:b.fc,kind:b.Kb,fmt:b.Ik};b.a&&(d.tlang=b.a.a);return c=Zi(c,d)}
413 function yv(a,b,c){var d=xv(a,b);a=v(function(a){a=new mv(a.responseText);c(a,b)},a);bj(d,a)}function zv(a){var b=a.Jd.b;a=sv(a.Jd,!0);return 0>b?null:a[b]}
414 function Av(a,b){var c=a.Ld,d={type:"list",tlangs:1,v:a.Li,fmts:Number(!0)};a.Sp&&(d.asrs=1);c=Zi(c,d);d=v(function(a){if((a=a.responseXML)&&a.firstChild){for(var c=this.Jd,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"),x=d[m].getAttribute("name"),M=d[m].getAttribute("kind")||"",ta=d[m].getAttribute("id"),Y="true"==d[m].getAttribute("lang_default"),xC="true"==d[m].getAttribute("cantran");
415 tv(c,new ov({format:p,languageCode:s,languageName:r,name:x,kind:M,id:ta,is_servable:!0,is_default:Y,is_translateable:xC}))}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.Tp[k.languageCode]=k.languageName,this.zi.push(new nv(k))}b()},
416 a);bj(c,d)};function Bv(a){dm.call(this,a);var b=Q(a);this.Fd=a.J();this.$n=a.app.P;this.ne=[];this.Ga={};this.fe={};this.Me=[];this.i=E("captions-translation-select",b);this.Il=E("captions-translation-dialog",b);this.Hl=E("captions-settings-dialog",b);this.ed=E("html5-captions-button",b);K(this.ed,"click",v(this.qw,this));K(E("captions-translation-confirm",b),"click",v(this.Aw,this));K(E("captions-translation-cancel",b),"click",v(this.ao,this));xf(E("captions-settings-background-opacity",b),v(this.mw,this),
417 "INPUT");xf(E("captions-settings-text-opacity",b),v(this.zw,this),"INPUT");xf(E("captions-settings-window-opacity",b),v(this.Bw,this),"INPUT");xf(E("captions-settings-char-edge-style",b),v(this.rw,this),"SELECT");K(E("captions-settings-font-family",b),"change",v(this.xw,this));K(E("captions-settings-font-inc",b),"click",v(this.Gp,this));K(E("captions-settings-font-dec",b),"click",v(this.Fp,this));K(E("captions-settings-confirm",b),"click",v(this.lw,this));K(E("captions-settings-cancel",b),"click",
418 v(this.yw,this));a=E("captions-settings-dialog",b);zf(a,v(this.tw,this),"html5-color-picker-button");this.ed&&(this.ld=E("html5-captions-tracks",this.ed),this.Ff=yr(mr.getInstance(),this.ed),a=E("html5-captions-track-template",this.Ff),this.Ep=new ns(a,["track_id","track_display_name"]),zf(this.Ff,v(this.ow,this),"yt-uix-button-menu-item"));this.Sf=new Uh;this.Sf.stop();K(this.Sf,"tick",v(this.il,this));this.D("onResize",v(this.Qn,this));this.D("onBackgroundChange",v(this.Dw,this));this.D("onTextOpacityChange",
419 v(this.Ew,this));this.D("onWindowOpacityChange",v(this.Fw,this));this.D("onFontSizeIncrease",v(this.Gp,this));this.D("onFontSizeDecrease",v(this.Fp,this));this.D("onShowControls",v(this.ww,this));this.D("onHideControls",v(this.uw,this));"detailpage"==this.Fd.Y&&(b=E("captions-account-settings-link",b))&&an(b);this.ti=new Xu(99,Uu);this.ah=new Uh(2E3);this.ah.stop();K(this.ah,"tick",v(this.Cw,this))}y(Bv,dm);f=Bv.prototype;f.na="captions";f.kd="cc";f.yl="subtitlesModuleData";f.Ci=!1;f.Rk=!1;f.hd=null;
420 f.Fd=null;f.$n=null;f.ed=null;f.Ff=null;f.Ep=null;f.Il=null;f.Hl=null;f.ld=null;f.Me=null;f.ne=null;f.Ga=null;f.fe=null;f.Sf=null;f.ti=null;f.ah=null;f.Mb=null;f.yi=!1;f.ap=1;var Cv={background:"#080808",backgroundOpacity:1,charEdgeStyle:"uniform",color:"#fff",fontFamily:'"Arial Unicode Ms", Arial',fontFamilyOption:"propSans",fontSizeIncrement:0,textOpacity:1,windowColor:"#080808",windowOpacity:0};f=Bv.prototype;f.dc=null;f.Un=!1;
421 f.create=function(){Bv.C.create.call(this);this.hd=this.a.getVideoData();var a=this.a.J().S;-1==Vu.indexOf(a)&&V(Q(this.a),"cc-international");this.b=Jb(Cv);pa(this.b,km(this,"display-settings"));1==this.Fd.a.cc_load_policy||1==this.hd.Tm||"alwayson"==Il(this.hd,"yt:cc")?a=!0:(a=km(this,"module-enabled"),a=null!=a?!!a:"on"==Il(this.hd,"yt:cc")||this.Fd.a.cc_prefer_on);a&&this.load()};f.destroy=function(){this.unload();Bv.C.destroy.call(this)};
422 f.load=function(){if(this.Ci)this.Z&&(Bv.C.load.call(this),this.yi="alwayson"==Il(this.hd,"yt:cc"),this.Ff&&X(this.Ff,"captions-always-on",this.yi),lm(this,"module-enabled",!0),this.Ci=!1,Dv(this),this.Qn());else{this.Ci=!0;this.Z=!1;var a=this.hd.b.cc_lang_pref||this.Fd.a.cc_lang_pref||Il(this.hd,"yt:cc_default_lang")||this.Fd.i,a=a&&a.split("_").join("-");this.Mb=new vv(this.hd.li,this.hd.L,a,this.hd.vk);a=v(this.po,this);Av(this.Mb,a)}};
423 f.unload=function(){this.uc&&(Ev(this,!1),this.Mo("control_subtitles_set_track"));Fv(this);im(this);lm(this,"module-enabled",!1);this.Ci=!1;this.Z&&(this.Z=!1,Bv.C.unload.call(this))};f.log_=function(){};function Gv(a,b){a.i&&(Vc(a.i),z(b,function(a){var b=Sc("option");b.setAttribute("value",a.a);b.appendChild(Tc(a.b+" -- "+a.g));this.i.appendChild(b)},a))}
424 f.po=function(){this.ld&&Vc(this.ld);Gv(this,this.Mb.zi);var a=sv(this.Mb.Jd,!0);if(0<a.length){this.log_("Caption track list loaded, found "+a.length+" tracks.");z(a,function(a){if(a.zk){var b=a.toString();a=qv(a);Hv(this,b,a)}},this);var b=this.Mb.Jd.b;(a=a[b]&&a[b].toString())&&Iv(this,a);this.ed&&xr(mr.getInstance(),this.ed);(a=zv(this.Mb))?(this.Rk=!0,Jv(this,a)):(this.Z||(this.Z=!0,this.load()),this.u("publish_external_event","onCaptionsTrackListChanged"))}else this.log_("No captions found."),
425 this.unload(),bn(this.Ff),bn(this.ed)};f.kv=function(a,b){var c=a.g.concat(a.b);this.log_("Caption track loaded with "+c.length+" events.");Fv(this);this.Me=Ya(c);this.dc=b;this.Un=Et.test(b.b);this.Z||(this.Z=!0,this.load());this.Rk&&(this.Rk=!1,this.u("publish_external_event","onCaptionsTrackListChanged"));c=Ja(c,function(a,b){return new nh(a.a,a.a+a.zc,{id:"caption"+b})});this.yf.apply(this,c);this.fo(b)};
426 f.fo=function(a){var b={trackName:a.fc,trackKind:a.Kb};a.a?(b.trackLangCode=a.a.a,b.fromLangCode=a.b):b.trackLangCode=a.b;this.log(b);var b=this.ti,c=qv(a);c&&(c=c.replace(/<[^>]*>?/g,""),b.Te(c));gm(this,this.ti.ma);this.ah.start();this.u("publish_external_event","captionschanged",pv(a))};f.vc=function(a){0==a.getId().indexOf("caption")&&(a=parseInt(a.getId().split("caption")[1],10),!isNaN(a)&&this.Me[a]&&(this.ne.push(this.Me[a]),this.Sf.start()))};
427 f.dd=function(a){0==a.getId().indexOf("caption")&&(a=parseInt(a.getId().split("caption")[1],10),!isNaN(a)&&this.Me[a]&&(a=this.ne.indexOf(this.Me[a]),0<=a&&this.ne.splice(a,1),this.Sf.start()))};
428 function Kv(a,b){if(b instanceof jv){var c=a.Ga[b.id];pa(b.params,a.b);c&&c.getType()!=(b.params.jk?2:b.b?0:1)&&(F(c.ma),delete a.Ga[b.id]);if(!a.Ga[b.id]){var c=a.Ga,d=b.id,e;t:{e=b.id;var g=b.params;switch(b.params.jk?2:b.b?0:1){case 0:e=new $u(e,g);break t;case 2:e=new bv(e,g);break t;default:e=new Xu(e,g)}}c[d]=e;c=a.Ga[b.id].ma;X(c,"captions-asr","asr"==a.dc.Kb);null!=b.params.Je&&(b.params.Je=a.Un?1:0);0==a.Ga[b.id].id?(V(c,a.na),Lv(a.a.app.P,c)):gm(a,c)}pa(a.Ga[b.id].qa,b.params);if(0==(b.params.jk?
429 2:b.b?0:1)){c=a.Ga[b.id];c.ko=b.g;c.Bb={};c.dh=!0;c.Te(c.ko);c.Bb.Bd=c.Ob.length;c.Bb.width=c.ma.offsetWidth;c.Bb.height=c.ma.offsetHeight;c.Bb.ho=[];c.Bb.jo=[];for(d=0;d<c.Bb.Bd;d++)c.Bb.jo.push(c.Ob[d].offsetTop),c.Bb.ho.push(c.Ob[d].offsetLeft);c.dh=!1;c.Te(c.eh)}}else c=b.Zh,a.fe[c]||(a.fe[c]=[]),a.fe[c].push(b)}f.Qn=function(){if(this.Z){im(this);this.ap=Mv(this.Fd).height/360;Dv(this);for(var a in this.Ga)this.Ga[a].Xf()}};
430 function Nv(a){var b=[],c;for(c in a.Ga){var d=a.Ga[c];d instanceof $u&&b.push(a.Ga[c])}if(0!=b.length){b.sort(function(a,b){return b.qa.he-a.qa.he});c=Mv(a.Fd).height;var e=a.Ga[b[0].id].qa.he,g;for(g in b){d=a.Ga[b[g].id];d.qa.he=e;var h=Math.round(d.qa.Bd*d.Ui()),e=e-Math.round(100*(h/c));d.Xf()}}}f.Cw=function(){this.ah.stop();F(this.ti.ma)};
431 f.il=function(){this.Sf.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++)Kv(this,this.ne[c]);for(b in this.Ga)this.fe[b]?this.Ga[b].$o(this.fe[b]):(F(this.Ga[b].ma),delete this.Ga[b]);Nv(this);this.log_("Refreshing caption display...")};function Ov(a,b){var c=E(a).querySelectorAll("."+b+" input[type=radio]"),d=Qa(c,function(a){return a.checked}),d=(-1==d?1:d+1)%c.length;c[d].click()}
432 f.Dw=function(){Ov("captions-settings-background-opacity","captions-settings-background-opacity-radio")};f.Ew=function(){Ov("captions-settings-text-opacity","captions-settings-text-opacity-radio")};f.Fw=function(){Ov("captions-settings-window-opacity","captions-settings-window-opacity-radio")};f.mw=function(a){a=parseFloat(a.target.getAttribute("value"));isNaN(a)||(this.b.backgroundOpacity=a,Dv(this))};f.zw=function(a){a=parseFloat(a.target.getAttribute("value"));isNaN(a)||(this.b.textOpacity=a,Dv(this))};
433 f.Bw=function(a){a=parseFloat(a.target.getAttribute("value"));isNaN(a)||(this.b.windowOpacity=a,Dv(this))};f.rw=function(a){a.target&&(this.b.charEdgeStyle=a.target.value,Dv(this))};f.xw=function(a){a.target&&(this.b.fontFamilyOption=a.target.value,Dv(this))};f.ww=function(){var a=this.Ga[0];a&&a.ma&&(a=a.ma,W(a,"controls-hidden"),V(a,"controls-visible"))};f.uw=function(){var a=this.Ga[0];a&&a.ma&&(a=a.ma,Zl(a,"controls-visible")&&(W(a,"controls-visible"),V(a,"controls-hidden")))};
434 f.Fp=function(){Pv(this,-1)};f.Gp=function(){Pv(this,1)};function Pv(a,b){a.b.fontSizeIncrement+=b;Dv(a)}function Qv(a,b){var c=E(b);c&&(c.querySelector('input[value="'+a.toFixed(1)+'"]').checked=!0)}function Rv(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],Zc(b,d.options[d.selectedIndex].text))}function Fv(a){em(a);a.ne=[];a.Me=[];a.dc=null;a.il()}
435 function Jv(a,b){if(b)if(a.uc)a.dc=b,Ev(a,!0),a.Mo("control_subtitles_set_track",pv(b));else if(a.Fd.hj){var c=a.Mb,d=a.$n.b,e=v(a.fo,a),g=c.Ld,c={v:c.Li,type:"track",lang:b.b,name:b.fc,kind:b.Kb,fmt:"vtt"};b.a&&(c.tlang=b.a.a);var h=document.createElement("track");h.src=Zi(g,c);h.mode="showing";h.setAttribute("kind","captions");h.setAttribute("default","");d.appendChild(h);e(b)}else yv(a.Mb,b,v(a.kv,a))}f.qw=function(){this.Z?H(v(this.Rp,this),1):this.load()};
436 f.ow=function(a){a=a.currentTarget;var b=G(a,"action");if(b)switch(b){case "translate":this.yi||(im(this),hm(this),an(this.Il));break;case "settings":im(this);hm(this);Sv(this);an(this.Hl);break;case "captions-off":this.unload()}else(a=G(a,"trackid"))?(Iv(this,a),b=wv(this.Mb,a),Jv(this,b),this.log_("Caption change failed for "+a)):this.log_("onCaptionTrackClicked_ empty, ignoring")};
437 function Iv(a,b){if(a.ld){var c=E("yt-uix-button-menu-item.active",a.ld);c&&W(c,"active");if(c=a.ld.querySelector(".yt-uix-button-menu-item"+('[data-trackid="'+b+'"]')))V(c,"active"),a.Rp()}}f.Rp=function(){var a=E("yt-uix-button-menu-item.active",this.ld);if(a){var b=this.ld,c=D&&!pc(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.ao=function(){bn(this.Il)};
438 f.Aw=function(){if(!this.yi){this.ao();var a;t:{var b=this.Mb.zi;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.dc,b=new ov,b.b=c.b,b.Yg=c.Yg,b.fc=c.fc,b.Kb=c.Kb,b.oi=!1,b.pi=c.pi,b.a=a,tv(this.Mb.Jd,b)&&(a=b.toString(),Hv(this,a,qv(b)),Iv(this,a),this.ed&&xr(mr.getInstance(),this.ed)),Jv(this,b))}};f.lw=function(){bn(this.Hl)};f.yw=function(){delete this.b;this.b=Jb(Cv);lm(this,"display-settings",this.b);Dv(this)};
439 function Dv(a){Tv(a);var b=uo(a.b.background),c=a.b.backgroundOpacity;lm(a,"display-settings",a.b);a.k=Em(".captions-text, .caption-row","background-color: rgba("+b[0]+","+b[1]+","+b[2]+","+c+") !important;",{Ib:a.k,reset:!0});Qv(c,"captions-settings-background-opacity");b=uo(a.b.color);c=a.b.textOpacity;lm(a,"display-settings",a.b);a.H=Em(".captions-text","color: rgba("+b[0]+","+b[1]+","+b[2]+","+c+") !important;",{Ib:a.H,reset:!0});Qv(c,"captions-settings-text-opacity");b=uo(a.b.windowColor);c=
440 a.b.windowOpacity;lm(a,"display-settings",a.b);a.K=Em(".caption-window-transform","background-color: rgba("+b[0]+","+b[1]+","+b[2]+","+c+") !important;",{Ib:a.K,reset:!0});Qv(c,"captions-settings-window-opacity");lm(a,"display-settings",a.b);var b=a.b.charEdgeStyle,d=a.b.textOpacity;if("none"==b)Fm(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=
441 "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=Em(".captions-text",c,{Ib:a.j,reset:!0})}Rv(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';
442 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=Em(".captions-text",c+"font-family: "+b+" !important;",{Ib:a.A,
443 reset:!0});a.b.fontFamily=b;lm(a,"display-settings",a.b);Rv(a,"captions-settings-font-family","fontFamilyOption");lm(a,"display-settings",a.b);b="font-size: "+Math.round(((a.b.fontSizeIncrement||0)+16)*a.ap)+"px;";a.B=Em(".caption-window-transform",b,{Ib:a.B,reset:!0});a.il()}f.tw=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");Dv(this);lm(this,"display-settings",this.b)};
444 function Sv(a){var b={Ib:a.g},c=a.b.color,d=a.b.background,e=a.b.windowColor;c&&(a.g=Em('.html5-popup-dialog button[data-color="'+c+'"]',"border: 3px solid #992121;",b));d&&(a.g=Em('.html5-popup-dialog button[data-background="'+d+'"]',"border: 3px solid #992121;",b));e&&(a.g=Em('.html5-popup-dialog button[data-windowcolor="'+e+'"]',"border: 3px solid #992121;",b))}
445 function Tv(a){var b=[],c=v(function(a){var c=this.b[a];c&&b.push(a+": "+c+" !important")},a);c("color");c("background");c={Ib:a.g,reset:!0};a.g=Em(".captions-text",b,c);var d=uo(a.b.windowColor),c={Ib:a.I,reset:!0};a.I=Em(".caption-window-transform","background-color: rgba("+d[0]+","+d[1]+","+d[2]+", 1)",c);Sv(a)}function Hv(a,b,c){a.ld&&(b=os(a.Ep,{track_id:b,track_display_name:c}),a.ld.appendChild(b))}function Uv(a){return Bv.prototype.Xa(a)?new Bv(a):null}
446 f.rq=function(a,b){switch(a){case "fontSize":return isNaN(b)||(this.b.fontSizeIncrement=b,Dv(this)),this.b.fontSizeIncrement;case "reload":b&&Av(this.Mb,v(this.po,this));break;case "track":if(b){if(!ia(b))break;var c=new ov(b);c.equals(this.dc)||(Jv(this,c),Iv(this,c.toString()))}else return this.dc?pv(this.dc):{};return"";case "tracklist":return this.Z?Ja(sv(this.Mb.Jd,b&&b.includeAsr),function(a){return pv(a)}):[]}};f.jp=function(){return["reload","fontSize","track","tracklist"]};f.Xa=function(a){return!!a.getVideoData().li};
447 f.Xh=function(a){a?(a=this.dc,Fv(this),this.dc=a):(Ev(this,this.Z),this.dc&&Jv(this,this.dc))};function Ev(a,b){X(Q(a.a),a.na+"-loaded",b)};function Vv(){var a=Wb(),b;if(b=yk()){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",
448 "image/jps");Uc(document.documentElement,c);c=Ic("NvImageDetectionFFID");try{if(null!=c){b=27527<=c.NvGetDriverVersion();break t}}catch(d){}}b=!1}}return b||!(!a||-1==a.indexOf("Sony"))};function Wv(a){dm.call(this,a);var b=a.getVideoData();b.S&&Xv(this);Yv(this,"html5-threed-conversion-on",v(this.Iv,this));Yv(this,"html5-threed-conversion-off",v(this.Hv,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(Wv,dm);f=Wv.prototype;f.yl="threeDModuleData";f.$e=null;function Yv(a,b,c){a=E(b,Q(a.a));K(a,"click",c)}f.na="threed";f.kd="threed";
449 f.create=function(){Zv(this.a.app,void 0);Wv.C.create.call(this)};f.destroy=function(){Zv(this.a.app,!0);this.unload();Wv.C.destroy.call(this)};function $v(a){return Wv.prototype.Xa(a)?new Wv(a):null}f.Xa=function(a){a=a.getVideoData();return!!a.S||!!a.Kj};f.Iv=function(){aw(this,!0)};f.Hv=function(){aw(this,!1)};function aw(a,b){var c=a.a.getVideoData();if(c.Kj&&c.Jf!=b){var c=a.a.app,d=O(c),e=d.a;e.Jf=!e.Jf;e.k=[];e.u("dataupdated");ag(d,"m");Zv(c);b?Xv(a):im(a)}}
450 function Xv(a){km(a,"warning-shown")||Vv()||(a.$e=E("threed-html5-warning-dialog",Q(a.a)),an(a.$e),H(v(function(){bw(this)},a),0),K(a.$e,"mouseover",v(function(){W(this.$e,"hide-dialog")},a)),K(a.$e,"mouseout",v(function(){bw(this)},a)),Yv(a,"threed-html5-warning-close",v(a.Qv,a)))}function bw(a){V(a.$e,"hide-dialog");H(v(function(){Zl(this.$e,"hide-dialog")&&im(this)},a),9E3)}f.Qv=function(){lm(this,"warning-shown",!0);im(this)};function cw(a){dm.call(this,a);this.b=new sm(["div","ytp-ypc-clickwrap-overlay",["h2","header",J("YPC_CLICKWRAP_HEADER")],["div","description",J("YPC_CLICKWRAP_DESCRIPTION")],["button","confirm-button",J("YPC_CLICKWRAP_BUTTON")]]);zm(this.b.M());this.a.app.P.g.appendChild(this.b.M());L(this,this.b);this.g=this.b.a["confirm-button"]}y(cw,dm);f=cw.prototype;f.na="ypc_clickwrap";f.kd="ypc-clickwrap";f.Xa=function(){return Ml(this.a.getVideoData(),"ypc_clickwrap_module")};
451 function dw(a){return Ml(a.getVideoData(),"ypc_clickwrap_module")?new cw(a):null}f.create=function(){cw.C.create.call(this);this.load()};f.destroy=function(){this.Z&&this.unload()};f.load=function(){cw.C.load.call(this);E("html5-video-container",Q(this.a));ym(this.b.M());K(this.g,"click",v(this.xu,this));this.Z=!0};f.unload=function(){zm(this.b.M());Af(this.g);this.Z=!1;cw.C.unload.call(this)};f.xu=function(){fm(this);this.destroy()};function ew(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 fw(){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"];K(this.b,"click",v(this.hide,this));this.a=this.template.a["ytp-drawer-open-button"];K(this.a,"click",v(this.show,this));this.Aa(null);this.hide()}y(fw,Z);fw.prototype.hide=function(){V(this.element,"ytp-drawer-closed")};
452 fw.prototype.Aa=function(a){a?(fw.C.Aa.call(this,a),ym(this.element)):zm(this.element)};fw.prototype.show=function(){H(oa(W,this.element,"ytp-drawer-closed"),0)};fw.prototype.F=function(){Af(this.b);Af(this.a);this.a=this.b=null;fw.C.F.call(this)};function gw(a,b){R.call(this);this.a=new fw;L(this,this.a);this.b=document.createElement("div");$l(this.b,["html5-stop-propagation","html5-ypc-endscreen"]);this.i=document.createElement("div");V(this.i,"html5-ypc-overlay");this.g=new sm(["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}}"]]);
453 L(this,this.g);this.j=this.g.a["html5-ypc-purchase"];K(this.j,"click",v(this.k,this));Zc(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.T(a);this.a.Aa(this.g.M());a.appendChild(this.b)}y(gw,R);gw.prototype.F=function(){gw.C.F.call(this);this.j&&Af(this.j);F(this.b);F(this.i);this.i=this.b=this.a=null};gw.prototype.k=function(){this.u("ypcContentRequest")};function hw(a){dm.call(this,a);this.g=this.b=null;this.i=NaN}y(hw,dm);f=hw.prototype;f.na="ypc";f.kd="ypc";function iw(a){var b=a.getVideoData();return a.J().Mc&&Ml(b,"ypc_module")}f.Xa=function(){return iw(this.a)};function jw(a){return iw(a)?new hw(a):null}f.create=function(){hw.C.create.call(this);var a=this.a.getVideoData();this.b=new ew(a);a.ba?this.load():this.a.No({video_id:this.b.L,ypc_preview:1})};f.destroy=function(){this.Z&&this.unload();this.b=null};
454 f.load=function(){hw.C.load.call(this);var a=E("html5-video-container",Q(this.a));this.g=new gw(a,this.b);this.g.D("ypcContentRequest",this.Wt,this);Lv(this.a.app.P,this.g.i);yn(this.a.J())&&(a=new nh(2147483647,2147483647,{priority:2}),this.yf(a));this.g.a.show();I(this.i);this.i=H(v(function(){this.g.a.hide()},this),1E4);this.Z=!0};f.unload=function(){em(this);Of(this.g);this.g=null;this.Z=!1;hw.C.unload.call(this)};
455 f.vc=function(a){hw.C.vc.call(this,a);a=this.g;a.b.appendChild(a.g.M());a.a.Aa(null);ym(a.b)};f.dd=function(a){hw.C.dd.call(this,a);a=this.g;zm(a.b);a.a.Aa(a.g.M())};f.Wt=function(){if(this.b.a)"embedded"==this.a.J().Y?Cr(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 kw={Mz:"ERROR_ALREADY_PINNED_ON_A_DEVICE",Rz:"ERROR_AUTHENTICATION_EXPIRED",Sz:"ERROR_AUTHENTICATION_MALFORMED",Tz:"ERROR_AUTHENTICATION_MISSING",cA:"ERROR_BAD_REQUEST",iA:"ERROR_CANNOT_ACTIVATE_RENTAL",qA:"ERROR_CGI_PARAMS_MALFORMED",rA:"ERROR_CGI_PARAMS_MISSING",cB:"DEVICE_FALLBACK",fB:"ERROR_LICENSE",iB:"FLASH_FALLBACK",HB:"ERROR_GEO_FAILURE",TB:"HTML5_DEFAULT_FALLBACK",UB:"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",ZB:"ERROR_INVALID_DRM_MESSAGE",cC:"LEARN_MORE",uC:"ERROR_NOT_SIGNED_IN",FC:"ERROR_PURCHASE_NOT_FOUND",
456 GC:"ERROR_PURCHASE_REFUNDED",JC:"ERROR_RENTAL_EXPIRED",jA:"ERROR_CAST_SESSION_DEVICE_MISMATCHED",kA:"ERROR_CAST_SESSION_VIDEO_MISMATCHED",mA:"ERROR_CAST_TOKEN_FAILED",lA:"ERROR_CAST_TOKEN_EXPIRED",nA:"ERROR_CAST_TOKEN_MALFORMED",PC:"ERROR_SERVER_ERROR",TC:"ERROR_STOPPED_BY_ANOTHER_PLAYBACK",VC:"ERROR_STREAMING_DEVICES_QUOTA_PER_24H_EXCEEDED",WC:"ERROR_STREAMING_NOT_ALLOWED",XC:"ERROR_STREAMING_UNAVAILABLE",KC:"ERROR_RETRYABLE_ERROR",dD:"ERROR_TOO_MANY_STREAMS_PER_USER",cD:"ERROR_TOO_MANY_STREAMS_PER_ENTITLEMENT",
457 gD:"ERROR_UNSUPPORTED_DEVICE",hD:"ERROR_UNUSUAL_ACTIVITY",oD:"ERROR_VIDEO_FORBIDDEN",qD:"ERROR_VIDEO_NOT_FOUND"},lw={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",
458 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 mw(a){dm.call(this,a);this.na="ypc_license_checker";this.kd="ypc_license";this.j=!1;this.i=0;this.g=!1;this.b=null;this.B=Ck();this.A=a.J().ib+"ypc_license_server"}y(mw,dm);
459 var nw={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"};
460 function ow(a){return Ml(a.getVideoData(),"ypc_license_checker_module")}f=mw.prototype;f.Xa=function(){return ow(this.a)};f.create=function(){mw.C.create.call(this);var a=new nh(1E3,2147483646,{priority:0});this.yf(a);this.D("onStateChange",this.qx,this)};function pw(a){return ow(a)?new mw(a):null}f.vc=function(){this.j=!0;qw(this,6E4)};f.qx=function(a){P(a.state,2)?(this.i=0,this.b=null,this.g=!1):(P(a.state,1)||P(a.state,8))&&qw(this,6E4)};
461 function qw(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:Ck(),purchase_id:d.pd,version:"4",player_time_seconds:a.a.getCurrentTime().toString(),gid:d.Ic,session_token:d.Mc},a.k=d.Ca,0==c?a.En():H(v(a.En,a),c))}}f.En=function(){if(this.b){var a=S(this.A,{cpn:this.k});ej(a,{format:"RAW",method:"POST",Nf:this.b,timeout:3E4,Oa:v(this.Wv,this),onError:v(this.Vv,this),al:v(this.Xv,this)})}};
462 f.Wv=function(a){if(this.b){a=a.responseText;var b=a in nw?1:64<=a.length&&a.match(/[0-9a-fA-f]+/)?0:-1;-1==b?rw(this,"decode"):(this.i=0,this.b=null,1==b?(this.g=!1,a=a in nw?J(nw[a]):J("ERROR_LICENSE"),sw(this.a.app.b,150,a,void 0)):(this.g=!0,qw(this)))}};f.Vv=function(a){rw(this,"net-"+a.status)};f.Xv=function(){rw(this,"timeout")};function rw(a,b){if(a.b)if(a.log({errorType:b}),a.b=null,5<++a.i){var c=J("ERROR_LICENSE");sw(a.a.app.b,150,c,void 0)}else qw(a)};function tw(){this.a=[];this.i={};this.o={};this.G={};this.b=this.j=null;this.g=[];this.k=null}y(tw,Lf);tw.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)&&!A(this.a,b)&&(b.create(),this.a.push(b),A(this.g,b.na)&&(b.uc=this.k,b.Xh(!!b.uc)))}};function uw(a){z(a.a,function(a){a.destroy()});a.a=[]}
463 function vw(a,b,c){ww(a);a.k=b;a.g=Ya(c);z(a.a,function(a){0<=Ha(c,a.na)&&(a.uc=b,a.Xh(!!a.uc))})}function ww(a){z(a.g,function(a){if(a=dg(this,a))a.uc=null,a.Xh(!1)},a);a.k=null;a.g=[]}function tg(a,b,c,d){return b&&c?(a=dg(a,b))?a.rq(c,d):null:null}function ug(a,b){if(!b)return Ja(a.a,function(a){return a.na});var c=dg(a,b);return c?c.jp():[]}function dg(a,b){return Na(a.a,function(a){return a.na==b})}tw.prototype.H=function(a,b){z(this.a,function(c){c.u(a,b)})};
464 function xw(a){var b=[];z(a.a,function(a){(a=a.Oi())&&b.push(a)});return b}tw.prototype.A=function(a,b){pa(this.G,a||null);pa(this.o,b||null)};function yw(a){this.a={};for(var b=0;b<a.length;b++){var c=a[b];this.a[c.a]=c}}function zw(a){a=Eb(a.a);db(a,function(a,c){return a.a-c.a});return a};function Aw(a,b,c){this.b=a;this.a=b;this.i=!!c.Hf;this.g=c.aa};function Bw(){this.ke={};this.a=this.Za().a;this.fd=null}f=Bw.prototype;f.Za=function(){var a=this.constructor,b;if(!(b=a.Yp)){var c;b=a.Qx;var d=[];for(c in b)b.hasOwnProperty(c)&&(0==c||d.push(new Aw(a,c,b[c])));c=new yw(d);b=a.Yp=c}return b};f.has=function(a){a.b.Za();this.Za();return null!=this.ke[a.a]};f.get=function(a,b){a.b.Za();this.Za();var c;c=this.a[a.a];var d=Cw(this,c);c.i?(t(d),c=d[b||0]):(t(d),c=d);return c};
465 f.set=function(a,b){a.b.Za();this.Za();var c=a.a;this.ke[c]=b;this.fd&&(this.fd[c]=b)};f.add=function(a,b){a.b.Za();this.Za();var c=a.a;this.ke[c]||(this.ke[c]=[]);this.ke[c].push(b);this.fd&&delete this.fd[c]};f.clear=function(a){a.b.Za();this.Za();a=a.a;delete this.ke[a];this.fd&&delete this.fd[a]};
466 f.equals=function(a){if(!a||this.constructor!=a.constructor)return!1;for(var b=zw(this.Za()),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=Cw(this,d),h=Cw(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};
467 function Dw(a,b){for(var c=zw(a.Za()),d=0;d<c.length;d++){var e=c[d];if(b.has(e)){a.fd&&delete a.fd[e.a];var g=11==e.g||10==e.g;if(e.i){var h,k=b;h=e;h.b.Za();k.Za();h=Cw(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=Cw(b,e),g?(g=Cw(a,e))?Dw(g,h):a.set(e,h.clone()):a.set(e,h)}}}f.clone=function(){var a=new this.constructor;a!=this&&(a.ke={},a.fd&&(a.fd={}),Dw(a,this));return a};function Cw(a,b){var c=a.ke[b.a];return null==c?null:c}
468 function Ew(a,b){a.Qx=b;a.Za=function(){return a.Yp||(new a).Za()}};var Fw={Xy:0,HA:1,SA:2,Wy:3,ez:4,FA:5,QA:6,NA:7,OA:8,PA:9,LA:10,MA:11,gz:12,fz:13,Vy:14,Py:15,GA:20,UA:21,Oy:22,IA:23,TA:24,RA:25,bz:30,VA:31,az:32,cz:33,KA:40,JA:41,hz:42,iz:43,Qy:50,Ty:51,Yy:52,Zy:53,$y:54,Ly:55,My:56,dz:57,Uy:58,Sy:60,Ry:61,Ny:70,Ky:80,jz:90};function Gw(){Bw.apply(this)}y(Gw,Bw);function Hw(){Bw.apply(this)}y(Hw,Bw);function Iw(){Bw.apply(this)}y(Iw,Bw);function Jw(){Bw.apply(this)}y(Jw,Bw);function Kw(){Bw.apply(this)}y(Kw,Bw);function Lw(){Bw.apply(this)}y(Lw,Bw);
469 Ew(Gw,{0:{name:"YtAdType",th:"video.YtAdType"},1:{name:"ad_namespace",required:!0,aa:14,defaultValue:0,type:{Kz:0,dB:1,Lz:2,oA:3,GB:4,bB:5,aB:6,eA:7,ZA:8,gA:9,YA:10,$A:11,Qz:12,ND:13}},2:{name:"ad_format",required:!0,aa:14,defaultValue:0,type:{Hz:0,$B:1,YB:2,rC:3,iD:4,aC:5,VB:6,XB:7,OD:8,eB:9}},3:{name:"ad_invideo",aa:14,defaultValue:0,type:{Jz:0,wA:1,xA:2,yA:3,zA:4,vA:5,hA:6}},4:{name:"invideo_autoplay",aa:14,defaultValue:0,type:{aA:0,EC:1}},5:{name:"ad_instream",aa:14,defaultValue:0,type:{Iz:0,
470 eD:1}},6:{name:"ad_instream_long",aa:8,type:Boolean}});Ew(Hw,{0:{name:"AdId",th:"video.AdId"},1:{name:"ad_network",aa:14,defaultValue:1,type:{yC:1,Jy:2}},2:{name:"ad_network_name",aa:9,type:String},3:{name:"ad_id",required:!0,aa:9,type:String}});
471 Ew(Iw,{0:{name:"YtAdEvent",th:"video.YtAdEvent"},1:{name:"ad_event_type",required:!0,aa:14,defaultValue:0,type:{tz:0,Az:1,uz:2,Dz:3,vz:4,wz:5,pz:6,nz:7,WA:8,kz:9,Bz:10,Cz:11,lz:12,XA:13,Ez:14,qz:15,mz:16,rz:17,oz:18,Fz:100,Gz:101,yz:130,xz:131,zz:132}},2:{name:"wall_time",required:!0,aa:2,type:Number},3:{name:"media_time",required:!0,aa:2,type:Number},4:{name:"logentry_time_usec",required:!0,aa:3,type:String},5:{name:"ad_error_type",aa:14,defaultValue:0,type:Fw}});
472 Ew(Jw,{0:{name:"YtAdSlot",th:"video.YtAdSlot"},1:{name:"slot_time",required:!0,aa:2,type:Number},2:{name:"ad_type",required:!0,aa:11,type:Gw},3:{name:"ad_events",Hf:!0,aa:11,type:Iw},4:{name:"ad_video_duration",aa:2,type:Number},5:{name:"ad_id",aa:9,type:String},6:{name:"slot_index",aa:5,type:Number}});
473 Ew(Kw,{0:{name:"YtVideoMetadata",th:"video.YtVideoMetadata"},1:{name:"content_owner_ids",Hf:!0,aa:9,type:String},2:{name:"video_duration_seconds",aa:2,type:Number},3:{name:"all_content_owner_ids",aa:9,type:String}});
474 Ew(Lw,{0:{name:"YtWatchAdInfo",th:"video.YtWatchAdInfo"},1:{name:"video_id",required:!0,aa:9,type:String},2:{name:"allowed_ads",Hf:!0,aa:11,type:Gw},3:{name:"ad_slots",Hf:!0,aa:11,type:Jw},4:{name:"ps",aa:9,type:String},5:{name:"el",aa:9,type:String},6:{name:"country",aa:9,type:String},7:{name:"feature",aa:9,type:String},8:{name:"blocked",aa:8,type:Boolean},9:{name:"plid",aa:9,type:String},10:{name:"video_metadata",aa:11,type:Kw},11:{name:"experiment_id",Hf:!0,aa:3,type:String},12:{name:"ad_flags",
475 aa:4,type:String},13:{name:"all_experiment_ids",aa:9,type:String},14:{name:"no_ads_returned",aa:8,type:Boolean},15:{name:"ad_errors",Hf:!0,aa:14,defaultValue:0,type:Fw},16:{name:"ad_slot_with_event",aa:11,type:Jw}});function Mw(a,b){yg.call(this,a,b)}y(Mw,yg);f=Mw.prototype;f.qg=function(){Qf(this.app,!0,this.a);this.app.Ud(!1,this.a)};f.mn=function(){this.app.Sd(!1,this.a)};f.Up=function(a,b,c){Qf(this.app,!0,this.a);var d=this.app,e=this.a;d.sf(d.getCurrentTime()+a,b,c,e)};f.Th=function(a,b){Qf(this.app,!0,this.a);this.app.sf(a,b,void 0,this.a)};f.Jj=function(){Xf(this.app,this.a)};function Nw(a){this.app=a;dm.call(this,a.I)}y(Nw,dm);var Ow={vC:"0",wC:"1",gB:"2",my:"3",bA:"4",OC:"5"};var Pw={IC:"red",LD:"white"};var Qw={oy:"0",SC:"1",CA:"2"};var Rw={"ad-trueview-indisplay-pv":6,"ad-trueview-insearch":7},Sw={"ad-trueview-indisplay-pv":2,"ad-trueview-insearch":2},Tw={detailpage:{Tb:!0}};Tw.embedded={Ch:Cf(),Bh:"4",sc:!0};Tw.profilepage={xl:!0};
476 var Uw="ad blogger books docs google-live play picasaweb".split(" "),Vw={ad:{Rd:!1,ff:!1,lc:!1,Wb:!1,Tb:!1,sc:!1,Vb:"adt"},blazer:{lj:"youtube_mobile",Sb:!1,uy:!1,Fg:!1,Gg:!1,kc:!0,Ub:!1,tb:!1,Gb:!0},blogger:{Rd:!1,ff:!1,lc:!1,Wb:!1,qc:!1,Tb:!1,sc:!1,Vb:"bl"},books:{Rd:!1,ff:!1,lc:!1,Wb:!1,qc:!1,Tb:!0,sc:!1,Vb:"gb"},docs:{Rd:!1,ff:!1,lc:!1,Wb:!1,qc:!1,Tb:!1,sc:!1,Vb:"gd"},"google-live":{Rd:!1,ff:!1,lc:!1,Wb:!1,qc:!1,Tb:!1,sc:!1,Vb:"gl"},play:{Wb:!1,qc:!1,Tb:!1,sc:!1,Vb:"gp"},"native":{Fg:!1,Gg:!1,
477 Ub:!0},olympics:{Fg:!1,Gg:!1,Mh:!0,Gb:!0},picasaweb:{Rd:!1,ff:!1,lc:!1,Wb:!1,qc:!1,Tb:!1,sc:!1,Vb:"pw"},touch:{Fg:!1,Gg:!1,Gb:!0}};
478 function Ww(a){this.g=[];this.a={};Xw(this,a.fexp);this.fa=U(this.fa,a.origin);this.Y=a.el||this.Y;var b=Tw[this.Y];b&&pa(this,b);b=a.ps||this.Ja;0<navigator.msMaxTouchPoints&&(b="touch");this.Ja=b;(b=Vw[this.Ja])&&pa(this,b);this.nf=Yw(this)&&A(Uw,this.Ja);this.jg=!(!xk().defaultPlaybackRate||$b||hi||gi||ii);if(a.use_media_volume)b=!1;else{var b=xk(),c=b.muted;b.muted=!c;b=b.muted!=c}this.om=b;this.Im=ii;if(hi||gi)this.tm=this.Kc||"blazer"!=this.Ja;this.um="0"!=a.add_player_event_listeners;b=T(this.Ch,
479 a.fs);this.Ch="detailpage"==this.Y||"olympics"==this.Ja?b:b&&Cf();this.Da=U(this.Da,a.authuser);this.Bh=Ek(this.Bh,a.autohide,Ow);this.Sb=T(this.Sb,a.autoplay);this.Fj=T(this.Fj,a.autoplayoverride);this.color=Ek(this.color,a.color,Pw);this.o=U(this.o,a.content_v);this.Gj=Ek(this.Gj,a.controls,Qw);this.G=U(this.G,a.cbrand);this.A=U(this.A,a.cbr);this.B=U(this.B,a.cbrver);this.eg=U(this.eg,a.c);this.jf=U(this.jf,a.cver);this.H=U(this.H,a.cmodel);this.I=U(this.I,a.cnetwork);this.K=U(this.K,a.cos);this.N=
480 U(this.N,a.cosver);this.O=U(this.O,a.cplatform);this.Lh=T(this.Lh,a.edu_mode);this.b=U(this.b,a.eurl);this.R=U(this.R,a.framer);this.ca=Ek(this.ca,a.iv_load_policy,pk);this.i=U(this.i,a.hl);this.Jm=T(this.Jm,a.bwlogging);this.kc=T(this.kc,a.is_html5_mobile_device);this.Od=T(this.Od,a.player_wide);this.Km=T(this.Km,a.is_playground);this.loop=T(this.loop,a.loop);this.of=T(this.of,a.modestbranding);"red"!=this.color&&(this.of=!1);this.wh=T(this.wh,a.noadapt);this.dg=T(this.dg,a.on3g);this.Ta=U(this.Ta,
481 a.pageid);this.Dh=Ek(this.Dh,a.vq,sj);this.qj=U(this.qj,a.playerapiid);this.Ah=T(this.Ah,a.playsinline);this.S=U(this.S,a.cr);this.oa=U(this.oa,a.q);this.lc=T(this.lc,a.logwatch);this.vj=T(this.vj,a.canplaylive);this.wj=T(this.wj,a.canplaypaid);this.Wb=T(this.Wb,a.showinfo);this.qc=T(this.qc,a.rel);this.Tb=T(this.Tb,a.enablesizebutton);this.oj=T(this.oj,a.ss);this.U=U(this.U,a.theme);this.Ub=T(this.Ub,a.use_native_controls);this.tb=!gi&&T(this.tb,a.svt);Yw(this)&&(this.Kh=T(this.Kh,a.altf),this.lg=
482 T(this.lg,a.retryneterr),this.Mh=T(this.Mh,a.nologo));this.lg=this.lg||this.nd;this.Ub&&(this.of=!0,this.ca=3);this.Hj=T(this.Hj,a.ssl);if(this.Gb=T(this.Gb,a.use_tablet_controls))this.U="dark";b=this.Fh;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 C(c,d))}this.Fh=b;this.hb=U(this.hb,a.attrib);this.$=U(this.$,a.sk);this.protocol=this.Hj?"https":"http";this.ve="0"!=this.Gj;this.pj=T(this.ve,a.store_user_volume);
483 this.Pd=T(this.Pd,a.use_media_volume);(b=a.BASE_YT_URL)&&Cj(b,yj)&&(this.ib=b);Zw(this,a);$w(this,a);"detailpage"==this.Y&&delete this.b;this.fj=ax(this)+"s";this.sc=this.of&&!this.Ub?!this.Wb:this.Wb||this.ve?!1:this.sc;b=this.Sb||"detailpage"==this.Y;c=!0;this.kc&&(c=!1);si("nintendo wiiu")&&(c=!1);this.Fj&&(c=!0);this.qm=b&&c;this.a=a}y(Ww,Lf);f=Ww.prototype;f.um=!0;f.Ch=!0;f.Da="";f.Bh="2";f.Sb=!1;f.Fj=!1;f.ib="/";f.uy=!0;f.color="red";f.Gj="1";f.eg="web";f.jf="html5";f.Lh=!1;f.Fg=!0;f.Gg=!0;
484 f.jg=!1;f.om=!1;f.Y="detailpage";f.Jm=!1;f.Lk=!1;f.nf=!1;f.kc=!1;f.Ab=!1;f.Od=!1;f.Rd=!0;f.Km=!1;f.ff=!0;f.Ig=!1;f.loop=!1;f.of=!1;f.wh=!1;f.Dh=null;f.qj="";f.dg=!1;f.Ta="";f.Ja=null;f.Ah=!1;f.Kh=!1;f.Im=!1;f.lg=!1;f.qm=!1;f.lc=!1;f.vj=!0;f.wj=!0;f.ve=!0;f.pj=!0;f.Pd=!1;f.Wb=!0;f.qc=!0;f.xl=!1;f.Tb=!1;f.sc=!1;f.oj=!1;f.Mh=!1;f.tm=!1;f.Ub=!1;f.tb=!0;f.Hj=!1;f.Gb=!1;f.Sc=null;f.Fh=null;f.xv=null;f.ug=null;f.Wa=null;f.nk=null;f.Vb="yt";
485 function Zw(a,b){a.lc=T(a.lc,b.logwatch);a.ra=void 0==b.user_age?a.ra:Number(b.user_age);a.Pp=U(a.Pp,b.user_display_image);a.Ql=U(a.Ql,b.user_display_name);a.ua=U(a.ua,b.user_gender)}
486 function $w(a,b){var c;t:{if(b&&((c=b.adformat)||(c=(c=b.attrib)&&c in Rw&&c in Sw?Sw[c]+"_"+Rw[c]:void 0),c)){var d=c.match(/^(\d*)_((\d*)_?(\d*))$/);if(d&&5==d.length&&(d=d[3],d=6==d||7==d||9==d||11==d,Cj(a.fa,zj)||d))break t}c=void 0}c&&(a.j=c,a.a.adformat=b.adformat);c=b.agcid;a.qb=c;a.a.agcid=c;c=b.feature;a.k=c;a.a.feature=c;if(c=b.referrer)a.referrer=c,a.a.referrer=c;"1"==b.enablecsi&&(a.Lk=!1)}
487 function bx(a){var b={};b.c=a.eg;a.jf&&(b.cver=a.jf);a.O&&(b.cplatform=a.O);a.G&&(b.cbrand=a.G);a.H&&(b.cmodel=a.H);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.N&&(b.cosver=a.N);return b}
488 function Xw(a,b){if(b){a.g=b.split(",");var c={};z(a.g,function(a){c[a]=!0});a.Kc=!!c["918108"];a.Mc=!!c["912711"];a.hj=!!c["925900"];a.jj=!!c["913559"];a.Ma=!!c["913428"];a.ba=!!c["904828"]||!!c["904830"];a.Ra=!!c["913424"];a.za=!!c["932206"];a.Fc=!!c["932217"];a.od=!!c["932225"];a.Oc=!!c["932246"];a.Ec=!!c["932245"];a.Jc=!!c["932240"];a.te=!!c["932236"];a.Ic=!!c["932237"];a.Hc=!!c["932242"];a.Dc=!!c["932243"];a.Nc=!!c["932247"];a.bg=!!c["932248"];a.Ia=!!c["932239"];a.pd=!!c["932249"];a.Gc=!!c["924604"];
489 a.Lc=!!c["924610"];a.nd=!!c["918117"];a.La=!!c["907226"]&&"leanback"!=a.Y;a.ea=!!c["938600"]}}
490 function cx(a,b){switch(b.qd){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.nd});case 30:return d="//docs.google.com/",a.ib!=Ww.prototype.ib&&(d=a.ib),S(d+"get_video_info",{docid:b.L,authuser:b.Da,authkey:b.vo,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.Ca,eurl:a.b,ps:a.Ja,el:a.Y,hl:a.i,list:b.Na,agcid:a.qb,sts:15947},
491 b.U?d.vvt=b.U:b.H&&(d.access_token=b.H),a.j&&(d.adformat=a.j),b.ca&&(d.iv_load_policy=b.ca),b.hf&&(d.autoplay="1"),b.Wk&&(d.mdx="1"),b.Xk&&(d.utpsa="1"),b.Nc&&(d.is_fling="1"),c=dx(a),c.width&&(d.width=c.width),c.height&&(d.height=c.height),b.ba&&(d.ypc_preview="1"),b.Nd&&(d.splay="1"),a.o&&(d.content_v=a.o),b.wo&&(d.livemonitor=1),a.Da&&(d.authuser=a.Da),a.Ta&&(d.pageid=a.Ta),pa(d,bx(a)),S(a.ib+"get_video_info",d)}}
492 function ax(a){return a.Lh?"//s.youtubeeducation.com/":a.ff?"//s.youtube.com/":"//video.google.com/"}function ex(a){return a.referrer?a.referrer.slice(0,128):""}
493 function ot(a,b,c,d){b={v:b.L,list:b.Na};a.Y&&(b.feature="player_"+a.Y);c&&pa(b,c);a=S(a.protocol+"://"+("www.youtube-nocookie.com"==window.location.host||a.Lh?"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=Ui(b);for(var e in d)b[e]=d[e];d=c+Wi(b);a=a+d}return a}
494 function fx(a){var b={contact_type:"playbackissue",html5:1,plid:a.ab,ei:a.j,v:a.L};a.a&&(b.fmt=a.a.Sa);return S("//www.google.com/support/youtube/bin/request.py",b)}function dx(a){return(a=a.nk)?new C(a.clientWidth,a.clientHeight):new C(Number.NaN,Number.NaN)}function Mv(a){return a.Wa?new C(a.Wa.clientWidth,a.Wa.clientHeight):new C(Number.NaN,Number.NaN)}
495 function gx(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}
496 function hx(a){var b=n("yt.www.watch.activity.getTimeSinceActive",window);if("detailpage"==a.Y&&b)return b();var c;a.gb&&(c=w()-a.gb);return c}function yn(a){return"leanback"==a.Y||a.nf||!a.qc&&!a.xl?!1:!0}function Bg(a){return"detailpage"!=a.Y?!1:!0}function Yw(a){a=Cj(a.fa,yj)&&Bj();var b=Cj(document.location.toString(),yj)&&!Bj();return a||b}f.F=function(){this.nk=this.Wa=null;Ww.C.F.call(this)};function ix(a){this.a=a;this.pendingRequests_=[];this.g=[];this.b=this.i=null;this.j=0}function jx(a,b){a.pendingRequests_.push(b);a.i=b.g[b.g.length-1];a.j+=b.ka.length}function kx(a){for(;a.pendingRequests_.length&&5==a.pendingRequests_[0].state;){var b=a.pendingRequests_.shift();z(b.o,a.G,a)}}
497 ix.prototype.G=function(a){if(4==a.info.type){for(var b=ak(a.info.a,a.info),c=[],d=0;d<b.length;d++){var e=b[d].ka.start+b[d].Yb-a.info.ka.start;c.push(new Hj(b[d],a.data.subarray(e,e+b[d].kb)))}Za(this.g,c)}else 3==a.info.type&&this.g.push(a)};function lx(a){a.pendingRequests_.length?a.i=Fa(a.pendingRequests_[a.pendingRequests_.length-1].g):a.g.length?a.i=Fa(a.g).info:a.i=a.b}function mx(a){return Xj(a.a)?a.a.index.g?a.a.index.b[a.a.index.Q]:-1:NaN}
498 function nx(a,b){Xj(a.a);a.i=bk(a.a,b,0)[0];a.b&&a.b.g&&(a.b=null);return a.i.startTime}function ox(a){px(a);if(a.a.info.a&&a.b&&!a.b.b){var b=Oa(a.g,function(a){return a.info.b});a.g=ab(a.g,0,b+1);a.k=!0}else a.g=[];if(a.g.length)for(a.j=a.g[0].data.buffer.byteLength,b=1;b<a.g.length;b++)a.g[b].data.buffer!=a.g[b-1].data.buffer&&(a.j+=a.g[b].data.buffer.byteLength);else a.j=0}
499 function qx(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());lx(a)}}function rx(a){var b=a.b;a.g.length&&(b=Fa(a.g).info);b=a.i||b;return b.Uh(b.ka.length-(b.kb+b.Yb))}function sx(a){return Ka(a.g,function(a){return a.info.b})}function tx(a){return Ma(a.pendingRequests_,function(a){return!(!a.b||1!=a.b.priority)&&!(4<=a.state)})}
500 ix.prototype.o=function(a){Fj(a.g[0])||a.dispose();this.j-=a.ka.length};function px(a){z(a.pendingRequests_,a.o,a);a.pendingRequests_=[];a.i=null};function ux(a,b){this.state=1;this.g=b;this.k=a;this.o=null;for(var c=1;c<b.length;c++);c=b[b.length-1];this.ka=new wj(b[0].ka.start+b[0].Yb,c.ka.start+c.Yb+c.kb-1);this.G=this.g[0].a.j;this.H=NaN;this.A=this.j=0;this.i=NaN;this.b=this.B=null;this.I=""}f=ux.prototype;
501 f.start=function(){var a=6==this.state;1==this.state||3==this.state||a&&vx(this);wx(this,2);if(a){if(this.j<this.k.k){this.j++;a=0.5+Math.random();H(v(this.Gn,this),1E4*a);return}a=this.G;if(!(this.H<=a.g)){a.b++;a.g=Kj-1;var b;b=He(a.a).Oe;var c=Dj(a.a);a.a=Zi(c,{cmo:"pf="+a.b,shost:b})}this.j=0}H(v(this.Gn,this),0)};
502 f.Gn=function(){if(!this.ha()){this.H=Kj++;var a={range:this.ka.toString(),keepalive:"yes"};4==this.g[this.g.length-1].type&&(a.fr="yes");a=S(this.G.a,a);this.j&&(a=ke(oe(a,"playerretry"),"playerretry",this.j.toString()));this.I=a;var b={format:"RAW",method:"GET",responseType:"arraybuffer",withCredentials:!0,td:v(this.mr,this)};this.a=ej(a,b);this.A=0;this.b&&(a=this.b,a.a=w(),a.j=a.a,a.b=0,a.o=0,a.i=!1,a.k={Mm:ih(a.g),lr:a.g.b.b()||0,kr:jh(a.g)},xx(a),this.a.addEventListener("progress",v(this.nr,
503 this),!1),0<this.k.a&&!Fj(this.g[0])&&(this.i=H(v(this.Pm,this),this.k.a)))}};f.nr=function(a){if(!this.ha()){var b=this.b,c=a.timeStamp,d=a.loaded;c<b.a&&(c=w());if(!(20>c-b.j)){if(32768<d){yx(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.g(e,g/e)}}b.j=c;b.b=d}this.b.b>this.b.A&&4>this.state&&wx(this,4);4==a.target.readyState&&zx(this.b,a.timeStamp)}};
504 f.mr=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)),Cj(c,yj)))break t;c=""}if(c)a=this.G,c=oe(c,"keepalive"),c=oe(c,"playerretry"),c=oe(c,"range"),c=oe(c,"shost"),a.a=c,wx(this,3);else if(a.byteLength!=this.ka.length)b=!0;else{c=this.g;for(var d=new Uint8Array(a),e=[],g=0,h=0;h<c.length;h++){var k=c[h],m;m=Fj(k)?a.slice?new Uint8Array(a.slice(g,
505 g+k.kb)):new Uint8Array(d.subarray(g,g+k.kb)):d.subarray(g,g+k.kb);e.push(new Hj(k,m));g+=k.kb}this.o=e;wx(this,5)}}b&&(vx(this),wx(this,6))}};function vx(a){return a.j<a.k.k?!0:!(a.H>a.G.g&&1<=a.G.b)}function wx(a,b){a.state=b;3<=a.state&&a.B&&a.B(a)}
506 f.Pm=function(){this.i=NaN;if(!this.ha()&&this.b){var a=!1;if(this.b.i){var b=this.b.G;xx(this.b);this.b.G-b>=0.8*(this.k.a/1E3)?(this.A++,a=5<=this.A):this.A=0}else a=5<w()/1E3-(this.b.a/1E3+this.b.k.Mm);a?(wx(this,7),Ax(this),zx(this.b,Date.now())):this.i=H(v(this.Pm,this),this.k.a)}};f.ha=function(){return-1==this.state};f.dispose=function(){wx(this,-1);this.B=this.o=null;Ax(this);I(this.i);this.i=NaN};function Ax(a){if(a.a){var b=a.a;a.a=null;b.abort()}};function Bx(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.G=NaN;this.i=!1}function zx(a,b){b<a.a&&(b=w());yx(a,b);var c=a.g,d=a.b,e=a.o,d=Math.max(d,32768);c.b.g(1,e/d);c=a.g;d=b-a.a;e=a.b;isNaN(e)||(c.g+=e);isNaN(d)||(c.i+=d/1E3)}function xx(a){var b=a.B-a.b,b=b*a.k.lr+b/a.k.kr,c=w()/1E3,b=a.i?b+c:b+Math.max(c,a.a/1E3+a.k.Mm);a.G=b}function yx(a,b){a.i||(a.g.j.g(1,(b-a.a)/1E3),a.i=!0)};function Cx(a,b,c,d){R.call(this);this.k=a;this.a=b;this.i=new ix(c);this.b=new ix(d);this.j=this.A=this.B=NaN;this.N=this.K=this.I=!1;this.o=NaN;this.O=!1}y(Cx,R);var Dx=2/24;f=Cx.prototype;f.Ks=function(a){this.g=a;a.zd.appendBuffer&&(a.zd.addEventListener("updateend",v(this.Wf,this),!1),a.Af.addEventListener("updateend",v(this.Wf,this),!1));Ex(this)};
507 function Fx(a){a.g&&a.g.zd&&a.g.zd.removeEventListener&&(a.g.zd.removeEventListener("updateend",v(a.Wf,a)),a.g.Af.removeEventListener("updateend",v(a.Wf,a)));a.g=null}function Gx(a){if(0<a.a.i){var b=(a.i.a.info.b+a.b.a.info.b+12500)*a.a.i;if(0<a.a.g){if(b>a.a.g)return;b=a.a.g}b={cwndbw:(8*b/1024).toFixed(0)};Lj(a.i.a.j,b);Lj(a.b.a.j,b)}}function Hx(a,b,c){c-=2;c-=c*b*(a.k.b.b()||0);c=Math.max(a.a.I,Math.min(a.a.N,c));a=Math.max(a.a.K,Math.ceil(a.a.I*b));return Math.min(a,Math.ceil(c*b))}
508 function Ix(a,b){var c=Math.min(2.5,ih(a.k));return Math.ceil(b*c+32768)}
509 function Jx(a,b){if(!b.i){if(!Xj(b.a))return;nx(b,a.j)}if(!(b.j>a.a.G)){var c=b.i;4==c.type&&Xj(c.a)&&(b.i=Fa(ak(c.a,c)),c=b.i);if(!c.g&&(Xj(c.a)||(isNaN(c.a.a)?0:c.ka.end+1<c.a.a))&&(3==c.type||!c.a.info.j)){var d=a.j+a.a.A;if(!(3==c.type&&c.k>d||2<=tx(b)+1)){var d=c.k-a.j,e=c.a.info.b,g=Xj(c.a)?Hx(a,e,d):a.a.H,h=Ix(a,c.a.info.b),k=!1,e=!1;if(c&&3==c.type&&Xj(b.a)&&c.a!=b.a){var d=Hx(a,b.a.info.b,d+(c.startTime+c.duration-c.k)),m=Ix(a,b.a.info.b),e=c.a.info.b<b.a.info.b;if(!e||d>=m)k=!0,g=d,h=m}d=
510 h;0<g&&(d=Math.max(a.a.H,g,Math.min(2*g,h)));if(k){c=b.i?b.i.startTime+b.i.duration+Dx:0;if(a.a.b&&e)t:{e=ih(a.k)+d*(a.k.b.b()||0)+d/jh(a.k)+a.j+2,e=Math.min(e,c),e=Nj(b.a.index,e),e+1<b.a.index.fb()&&(c=b.a.index.b[e+1]),e=c;if(b.pendingRequests_.length){if(b.pendingRequests_[0].g[0].startTime<=e)break t;px(b)}for(g=b.g.length-1;0<=g;g--)h=b.g[g],h.info.startTime>e&&(b.g.pop(),b.g.length&&b.g[g-1].data.buffer==h.data.buffer||(b.j-=h.data.buffer.byteLength));lx(b)}b.i&&!b.i.b&&(e=new ux(a.a,rx(b)),
511 Kx(a,e,!0),jx(b,e));b.i&&(c=b.i?b.i.startTime+b.i.duration+Dx:0);d=new ux(a.a,bk(b.a,c,d))}else d=new ux(a.a,c.Uh(d));Kx(a,d,!1);jx(b,d)}}}}function Kx(a,b,c){c=c?2:1;a.a.O&&(c=0);var d=Math.min(2.5,ih(a.k)),e=jh(a.k);b.b=new Bx(a.k,c,b.ka.length,0.95*b.ka.length-d*e);a=v(a.Wu,a);b.B=a;b.start()}
512 f.Wu=function(a){if(!this.ha()){var b=6==a.state&&vx(a);3==a.state||b?(b&&this.u("softerror",209),a.start()):5==a.state?(this.H||(this.H=a.I),Lx(this),z(a.o,function(a){if(Fj(a.info))t:{var b=a.info.a;if(1==a.info.type){if(b.b)break t;b.b=a.data}else if(2==a.info.type){if(b.g||b.index.fb())break t;if(1==b.info.i){var e=b.index,g=a.info.ka.start;a=new DataView(a.data.buffer);var h=0,k=a.getUint32(0,!1),m=a.getUint8(h+8),h=h+12,p=a.getUint32(h+4,!1),h=h+8,s;0==m?(m=a.getUint32(h,!1),s=a.getUint32(h+
513 4,!1),h+=8):(m=(a.getUint32(h,!1)<<32)+a.getUint32(h+4,!1),s=(a.getUint32(h+8,!1)<<32)+a.getUint32(h+12,!1),h+=16);e.a[0]=s+(k+g);e.b[0]=m;e.g=!0;g=a.getUint16(h+2,!1);h+=4;for(k=0;k<g;k++){var r=a.getUint32(h,!1);s=a.getUint32(h+4,!1);h+=12;m=e;s=s/p;m.Q++;Oj(m);m.a[m.Q]=m.a[m.Q-1]+r;m.b[m.Q]=m.b[m.Q-1]+s}}else b.g=a.data}if(pj(b.info)&&b.b&&b.g){e=b.index;k=b.g.buffer;h=new Pj(new DataView(b.b.buffer));if(440786851==Qj(h)&&(Sj(h),408125543==Qj(h))){p=h;g=p.a;a=Rj(p,!0);p.a=g;h=Tj(h);p=h.g+h.a;for(r=
514 Qj(h);357149030!=r;)Sj(h),r=Qj(h);h=Tj(h);m=1E6;s=1E9;for(g=0;!(h.a>=h.b.byteLength);)if(r=Qj(h),2807729==r)m=Uj(h);else if(2807730==r)s=Uj(h);else if(17545==r){var g=h,r=Rj(g,!0),x=0;4==r?x=g.b.getFloat32(g.a):8==r&&(x=g.b.getFloat64(g.a));g.a+=r;g=x}else Sj(h);m/=s;g*=m;h=new Pj(new DataView(k));if(475249515==Qj(h)){for(h=Tj(h);!(h.a>=h.b.byteLength);)if(r=Qj(h),187==r){k=Tj(h);r=m;s=p;if(179!=Qj(k))r=null;else if(r*=Uj(k),183!=Qj(k))r=null;else{k=Tj(k);for(x=s;!(k.a>=k.b.byteLength);)241==Qj(k)?
515 x=Uj(k)+s:Sj(k);r=[x,r]}k=e;s=r[0];r=r[1];Oj(k);k.a[k.Q]=s;k.b[k.Q]=r;k.Q++}else Sj(h);h=g;a=a+p;Oj(e);e.g=!0;e.b[e.Q]=h;e.a[e.Q]=a}}b.g=null}}}),!La(a.o,function(a){return Ij(a)})||Xj(a.g[0].a)&&!isNaN(a.g[0].a.a)&&(a.g[0].a.index.g?a.g[0].a.index.a[a.g[0].a.index.Q]:-1)!=a.g[0].a.a?Mx(this,126):Ex(this)):7==a.state||4==a.state?(7==a.state&&this.u("softerror",210),Ex(this)):Mx(this,121)}};
516 function Lx(a){if(!a.O&&a.H&&window.performance&&window.performance.getEntriesByName){var b=window.performance.getEntriesByName(a.H);if(b.length){var b=b[0],c=window.performance.timing.navigationStart;Er("vrst",c+b.fetchStart);Er("vdns",c+b.domainLookupEnd);Er("vreq",c+b.requestStart);Er("fvb",c+b.responseStart);a.O=!0}}}function Ex(a){isNaN(a.B)&&(a.B=H(v(a.Wf,a),0))}function Nx(a){isNaN(a.A)&&(a.A=H(v(function(){this.Wf();this.A=NaN},a),1E3))}
517 f.Wf=function(){this.B=NaN;if(!this.K&&this.g){var a=Math.floor(Math.max(mx(this.i),mx(this.b)));isNaN(a)||(this.g.Va(a),this.K=!0)}if(!this.ha())if("prerender"==window.document.webkitVisibilityState)Nx(this);else{this.g&&this.g.xc()&&Fx(this);kx(this.b);kx(this.i);qx(this.b);qx(this.i);if(this.g){a=Ox(this,this.b,this.g.Af);if(!a){var b=Px(this.g.Af,this.j);if(!isNaN(b)||this.b.b&&this.b.b.g)this.b.b&&this.b.b.g&&(b=NaN),a=Ox(this,this.i,this.g.zd,b)}if(a){this.g.zd.appendBuffer||Ex(this);return}if(this.b.b&&
518 this.b.b.g&&this.i.b&&this.i.b.g&&this.g.isOpen()){a=this.g;a.isOpen()&&a.g.endOfStream();return}}this.rm();Jx(this,this.b);Jx(this,this.i)}};f.rm=function(){if(!this.ha()&&!isNaN(this.a.o)){var a;a=jh(this.k);var b=ih(this.k)+1048576*(this.k.b.b()||0);a=a*Math.min(1,1048576/(a*b));!isNaN(this.o)&&Math.abs(this.o-a)/a<this.a.o||(Math.round(a/1024),Math.round(this.o/1024),this.u("bandwidthchange",a),Zg("yt-player-bandwidth",{byterate:a},2592E3),this.o=a)}};
519 function Ox(a,b,c,d){if(c.updating)return!0;var e=b.g.length?b.g[0].info:null;if(!e)return!1;!b.b||b.b.b||Gj(b.b,e)||(b.b=null,a.g.isOpen()&&c.abort(),c.g=null);var g;g=e.a;Xj(g);c.g!=g.b?(c.g=g.b,c.appendBuffer?(c.appendBuffer(g.b),g=c.updating):(c.append(g.b),g=!0)):g=!1;if(g)return!0;g=!1;if(d){if(e.o>=d)return!1;g=1.5<e.j}if(!b.k&&(g?e.o+1:e.k)-a.j>a.a.B)return!1;a=e.o-a.j;if(b.a.info.a&&!(sx(b)||b.b&&!b.b.b||b.k||2>=a))return!1;g?(a=b.g[0],d=Math.min(1,a.info.j),d=Math.floor(a.data.length*(d/
520 a.info.j)),e=new Ej(a.info.a,a.info.ka,a.info.type,a.info.i,a.info.startTime,a.info.duration,a.info.Yb,d,!1),g=a.data.subarray(0,d),a.info=new Ej(a.info.a,a.info.ka,a.info.type,a.info.i,a.info.startTime,a.info.duration,a.info.Yb+d,a.info.kb-d,a.info.g),a.data=a.data.subarray(d),a=new Hj(e,g),b.b=a.info):(a=b.g.shift(),b.g.length&&b.g[0].data.buffer==a.data.buffer||(b.j-=a.data.buffer.byteLength),b.b=a.info);b.k&&b.b.b&&(b.k=!1);b=a;c.appendBuffer?(c.appendBuffer(b.data),c=c.updating):(c.append(b.data),
521 c=!0);return c}function Px(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 Qx(a,b){if(!a.ha()){var c=Rx(a,a.b,b,a.g&&a.g.Af),d=Rx(a,a.i,c,a.g&&a.g.zd);a.j=Math.max(b,c,d);a.I=!0;Ex(a)}}
522 function Rx(a,b,c,d){if(Xj(b.a))if(d){if(a.N&&a.a.b)return ox(b),nx(b,c);var e=Px(d,c),g=NaN,h=b.b;h&&(g=Px(d,h.a.index.b[h.i]));if(e==g)return c;ox(b);b.a.info.a&&b.b&&!b.b.b&&!sx(b)&&(d=new ux(a.a,rx(b)),Kx(a,d,!0),jx(b,d));if(isNaN(e))return nx(b,c);nx(b,e+Dx)}else nx(b,c);else b.a.i?0!=c&&px(b):Sx(a,b,!1);return c}
523 function Sx(a,b,c){var d=c?65536:0;c&&!isNaN(a.a.j)&&(d=Math.floor(Math.max(d,a.a.j*b.a.info.b)));c=Yj(b.a,d);z(c,function(a){var c=new ux(this.a,a);Kx(this,c,!0);Fj(a[a.length-1])||jx(b,c)},a);b.a.i=!0}f.F=function(){Fx(this);px(this.i);px(this.b);this.b=this.i=null;Cx.C.F.call(this)};function Mx(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 Tx(){this.B=30;this.A=40;this.G=20971520;this.I=this.j=2;this.H=131072;this.N=15;this.K=2097152;this.o=0.1;this.k=2;this.b=!0;this.g=this.i=this.a=NaN};function Ux(a,b,c){this.a=a;this.headers=b;this.message=c};function Vx(a,b,c,d,e,g,h){this.a=[];this.g=a;this.k=b.g;this.j=b;this.i=c;this.H=d;this.I=e;this.b=[];this.K=h||null;this.B=this.N=!1;this.A=null;this.o=!0;this.G={};this.listen(this.g,["keymessage","webkitkeymessage"],this.Ej);this.listen(this.g,["keyadded","webkitkeyadded"],this.hr);this.listen(this.g,["keyerror","webkitkeyerror"],this.ir);g&&this.b.push(g)}y(Vx,Wk);function Ag(a,b){if(Cj(b,yj)){for(var c in a.G)b=ke(oe(b,c),c,a.G[c]);a.k=b}else Wx(a,"u")}f=Vx.prototype;
524 f.start=function(){this.ha()||(this.N=!0,this.b.length&&this.Ej(this.b.shift()))};f.dispose=function(){Vx.C.dispose.call(this);this.I=this.g=null};f.Ej=function(a){this.ha()||a.sessionId!=this.i||(this.B&&a.defaultURL&&Ag(this,a.defaultURL),this.N?(this.A=a,Xx(this,a)):this.b.push(a))};f.hr=function(a){this.ha()||a.sessionId!=this.i||(this.B=!0,this.b.length&&this.Ej(this.b.shift()))};
525 function Xx(a,b){var c={format:"RAW",method:"POST",Sw:b.message.buffer,responseType:"arraybuffer",withCredentials:!0,Oa:a.Tw,onError:a.Rn,X:a};a.K&&(c.headers={Authorization:"Bearer "+a.K});var d=a.k;a.o||(d=ke(oe(d,"exclude_customdata"),"exclude_customdata","1"));ej(d,c)}
526 f.Tw=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];Va(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 Ux(d,g,a.subarray(b));break t}e=e.match(/([^:]+):\s+([^]+)/);
527 if(null==e)break;g[e[1]]=e[2]}}a=null}0!=a.a?(b=lw[a.a.toString()],Wx(this,"f"+a.a,b?b:"ERROR_LICENSE")):(a=a.message,this.g.addKey?this.g.addKey(this.j.a,a,this.H,this.i):this.g.webkitAddKey(this.j.a,a,this.H,this.i))}else this.Rn(a)};f.ir=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,Xx(this,this.A)):Wx(this,"s"+a.errorCode.code+"."+a.systemCode))};f.Rn=function(a){Wx(this,"r"+a.status)};
528 function Wx(a,b,c){a.ha()||a.I(b,c);a.dispose()};function Yx(a,b,c,d){this.a=[];this.b=a;this.g=b;this.B=c;this.o=d;this.A=null;this.j={};this.G={};this.i=null;this.k=[];this.listen(this.b,["needkey","webkitneedkey"],this.H);this.listen(this.b,["keymessage","webkitkeymessage"],this.K);this.listen(this.b,["keyerror","webkitkeyerror"],this.I)}y(Yx,Wk);Yx.prototype.dispose=function(){Yx.C.dispose.call(this);this.b=null;Cb(this.j,function(a){a.dispose()})};
529 Yx.prototype.H=function(a){a=a.initData;if(!this.i&&Ib(this.j)||"widevine"!=this.g.b){var b=String.fromCharCode.apply(String,a);if(!this.G[b]){this.G[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+
530 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):Zx(this,a)}}};function Zx(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}}
531 Yx.prototype.K=function(a){if(!this.ha()&&this.b&&!this.j[a.sessionId]){var b=new Vx(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&&Zx(this,this.k.shift())}};Yx.prototype.I=function(a){!this.ha()&&this.b&&(this.j[a.sessionId]||this.o("s"+a.errorCode.code+"."+a.systemCode))};function $x(a){this.a=a;this.b=NaN}function ay(a,b){var c=b.kf;return c&&c&&"unknown"!=c?c:(c=a.a.Dh)&&c&&"unknown"!=c?c:"auto"}
532 function by(a,b){var c,d=ay(a,b);if(d&&"auto"!=d&&(c=null,d=uj.indexOf(d),0<=d))for(;d<uj.length&&!(c=Gl(b,uj[d]));d++);if(!c){c=b.k;var e;a.a.Sc?(d=a.a.Sc.clone(),gi&&!a.a.Ah&&(d=(window.screen&&window.screen.width?new C(window.screen.width,window.screen.height):null)||d),d.scale(gi||Ub?window.devicePixelRatio||1:1),e=a.a.Fh||d):e=a.a.Fh;t:{var d=a.b,g=0,h=0;null!==e&&(g=e.width,h=e.height);e=16/9;g>Math.round(e*h)&&(g=Math.round(e*h));g*=h;e=null;for(h=0;h<c.length;h++){e=c[h];var k=e.getInfo(),
533 k=k.a.width*k.a.height*("medium"==e.mc.a.i?0.26:0.85)>g,m=!0;e.a&&d&&(m=e.b.info.b+e.g.info.b<d);if(!k&&m){c=e;break t}}c=e}c||(c=b.k[0])}return c};function cy(){this.b=this.a=NaN}function dy(a,b,c){if(a.a==b)return 500<c-a.b;a.a=b;a.b=c;return!1};var ey=[102,107,108];var Zf=[0.25,0.5,1,1.5,2];function fy(a,b){this.state=a;this.a=b}function ao(a,b){return P(a.state,b)&&!P(a.a,b)?1:!P(a.state,b)&&P(a.a,b)?-1:0};function gy(a,b){R.call(this);this.oa=new cy;this.A=new Mi(v(this.getCurrentTime,this),v(this.Dq,this),v(this.hg,this));L(this,this.A);this.O=NaN;this.R=this.I=null;this.o=a;this.ba=new $x(a);this.da=NaN;this.ca=!1;this.g=this.k=null;this.S=[];this.U=!1;this.fa=NaN;this.i=new Hi;this.B=b;this.K=this.ea=null;this.H=NaN;this.N=new eo(this);this.b=this.a=null;this.$=NaN;this.j=null}y(gy,R);f=gy.prototype;
534 f.F=function(){I(this.$);I(this.va);kf(this.fa);hy(this);Mm(this);Of(this.k,this.K,this.N,this.a);this.a=this.N=this.i=this.k=this.R=this.oa=null};function iy(a,b){a.U=!1;a.O=NaN;a.b&&Ci(a.b);jy(a);hy(a);Of(a.k,a.a);a.k=null;a.A.reset();2==a.B&&(b.$=!1,b.Sn=!0);a.a=b;a.a.D("dataupdated",a.wu,a);a.a.D("dataloaded",a.vu,a);a.a.D("onStatusFail",a.uu,a);if(b.rf&&b.rf>b.ya){var c=b.rf;a.R&&(a.bi(a.ua),a.ua=null);a.R=new nh(1E3*c,2147483646);a.R.yb.D("onEnter",a.pg,a);a.Mk(a.R)}ky(a,"newdata")}
535 function hy(a){kf(a.da);a.j&&(Nf(a.j),a.j=null)}f.getVideoData=function(){return this.a};f.J=function(){return this.o};function ly(a){return!(!a.a||!a.a.k.length)}function my(a){if(a.a&&(a.a.L||a.a.mf))return!0;sw(a,2);return!1}function ny(a){a.U||(oy(a,Ji(new Hi,8)),a.j&&py(a.j),a.U=!0,!my(a)||a.a&&a.a.Ue||qy(a,v(function(){if(ly(this))ry(this);else if(!this.a.Ue)if(sy(this))ry(this);else{var a=cx(this.o,this.a);Ll(this.a,a)}},a)))}
536 function ty(a){if(!a.S.length){if(!a.A.sg){var b=a.A;b.g=Ri(b);b.sg=!0;b.Xb()}a.S.length||0<Yh(a.A.b,-2147483648).length||a.u("playbackready",a)}}f.Cq=function(){var a=this.j,b=this.a.Nj;a.bp!=b&&(uy(a,{metric:"heartbeat",tpmt:this.a.ye}),a.bp=b)};function ry(a){a.S=Ya(a.a.I);a.a.bb&&(vy(a,a.a.wa),wy(a,!0));ag(a,"i");a.u("playbackdataloaded")}f.pg=function(a){xy(this);oy(this,!1==a?new Hi:new Hi(Li()))};
537 function wg(a,b,c){b={event:"streamingerror",ec:b,v:a.a.L};c&&(b.em=c);pa(b,bx(a.o));a.j&&yy(a.j,b,void 0)}function sw(a,b,c,d){if(Gb(kw,c))var e=c;else var g=c;oy(a,Ii(a.i,128,{errorCode:b,errorDetail:d,message:g,messageKey:e}))}function zy(a,b){a.S=a.S.filter(function(a){return b!=a});ty(a)}f.hg=function(){return P(this.i,8)&&!P(this.i,64)&&!P(this.i,2)};function sy(a){return!(!a.a||!a.a.L&&!a.a.mf||a.a.L)}f.Dq=function(){return this.i};function Ay(a,b){a.b&&Mm(a);a.b=b;By(a)}
538 function Mm(a){a.g=null;a.b&&(jy(a),a.N.removeAll(),Ci(a.b),a.b=null)}function Cy(a){if(a.b){var b=Hl(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 Xk(a.b,a.a.wa,b.info.mb,c.info.mb),b=a.g,b.b||(b.b=b.g.on?b.g.a.webkitMediaSourceURL:window.URL.createObjectURL(b.g)),a.za=new bl(b.b,!1,!0),b=v(a.k.Ks,a.k),a.g.j=b);b=a.za}a.b.yd!=b?Dy(a,b):(P(a.i,64)&&oy(a,Ji(a.i,8)),Ai(a.b),a.a.Fb&&!a.a.bb&&Ey(a,Infinity))}}
539 function ag(a,b,c){if(!a.ha()&&ly(a)&&!P(a.i,128)){var d=NaN;!a.ea||a.o.za||a.o.wh||(d=jh(a.ea),"i"==b&&(d=a.o.Ec?0.4*d:0.6*d));a.ba.b=d;var e=by(a.ba,a.a),d=e.getInfo(),g=e.a?e.b.info:d;if(a.a.a!=d||a.a.ra!=g||a.a.hb!=b||c&&a.a.kf!=c){a.a.o=e;a.a.a=d;a.a.ra=g;a.a.hb=b;c&&(a.a.kf=c);c="m"==a.a.hb;if(e.a)if(a.k){var h=a.k,e=e.g;h.ha()||(h.N=c,h.b.a!=e&&(h.b.a=e,Gx(h),c&&ox(h.b),e.i||Sx(h,h.b,!1)))}else{var g=a.o,k=new Tx;if(g.za||g.wh)k.o=NaN;g.Fc&&(k.k=0);g.Jc&&(k.j=3);g.Ul&&(k.I=1,k.H=49152);g.Ic&&
540 (k.N=30);g.te&&(k.a=700);g.Hc&&(k.i=3);g.Dc&&(k.i=1.5,k.g=1048576);"play"==g.Ja&&(k=Jb(k),k.B=10,k.A=20,k.G=10485760,k.K=1048576,k.b=!1,g.bg&&(k.b=!0));ji&&si("crkey")&&(g=Jb(k),g.j=3.5,g.B=20,g.A=40,g.G=20971520,g.b=!0,g.a=700,g.k=2,k=g);g=k;a.a.gb&&(g.a=NaN);a.k=new Cx(a.ea,g,e.b,e.g);a.k.D("bandwidthchange",a.wq,a);a.k.D("fatalerror",a.xq,a);a.k.D("softerror",a.yq,a);e=a.k;g=a.a.ya;Gx(e);0==g&&(e.b.a.i||Sx(e,e.b,!0),e.i.a.i||Sx(e,e.i,!0));Qx(e,g);Er("gv");H(v(e.rm,e),0);t:{e=xk();for(h in Yk)if(!!e.canPlayType(h)!=
541 Yk[h]){h=!1;break t}h=!0}h||wg(a,211)}else a.hg()&&Cy(a);a.j&&(h=a.j.j,g=a.a,e=Fy(h),isNaN(e)||(e=e.toFixed(3),g=by(h.K,g).mc.Sa,h.A&&(b="i",h.A=!1),b=[e,d.Sa,g,h.I,b].join(":"),h.a.vfs.push(b),b=Mv(h.g),0<b.width&&0<b.height&&h.a.view.push(e+":"+Math.round(b.width)+":"+Math.round(b.height)),h.I=d.Sa),d=Fy(h),isNaN(d)||Gy(h,d,h.G),h.k());a.u("internalvideoformatchange",a.a,c)}}}f.wq=function(a){this.ba.b=a;ag(this,"a");if(this.j){var b=this.j.j,c=Fy(b);isNaN(c)||b.a.bwe.push(c.toFixed(3)+":"+a.toFixed(3))}};
542 f.xq=function(a){sw(this,a)};f.yq=function(a){wg(this,a);if(this.j)this.j.onError(a)};function xy(a){P(a.i,64)&&oy(a,Ii(a.i,a.i.b&-9));a.b&&a.b.pause()}
543 function Ey(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(mx(a.k.i),mx(a.k.b))))&&(e=Math.floor(Math.min(mx(a.k.i),mx(a.k.b))));b>e&&(b=e,wy(a,!0));0>b&&(b=0)}else b=0;a.a.ya=b;a.H=b;c?a.ri():(Hy(a),d&&(a.K||(a.K=new ho(a.ri,d,a)),a.K.start()),Iy(a,!0));a.R&&b>a.a.rf&&(a.bi(a.ua),a.ua=null);a.u("seekto",a,b)}else a.a.ya=b||0}function Hy(a){P(a.i,32)||(oy(a,Ji(a.i,32)),P(a.i,8)&&xy(a),a.u("beginseeking",a))}
544 f.ri=function(){if(!isNaN(this.H)&&this.b){var a=this.rd();!this.a.Fb&&this.H>=Math.floor(a)?(this.H=a,this.u("endseeking",this),xy(this),this.pg()):(this.k&&Qx(this.k,this.H),yi(this.b,this.H))}this.K&&(this.K.dispose(),this.K=null);P(this.i,32)&&(oy(this,Ii(this.i,this.i.b&-33)),this.u("endseeking",this))};f.getCurrentTime=function(){if(!isNaN(this.H))return this.H;var a=0;this.b?a=this.b.getCurrentTime():this.a&&(a=this.a.ue);return a};
545 f.rd=function(){var a=0;this.b&&(a=this.b.Qd);0==a&&this.a&&(a=this.a.wa);return a};function Jy(a,b){var c=isNaN(b)?a.getCurrentTime():b,d=a.rd();return Infinity==d?1:d?c/d:0}
546 f.pr=function(){var a;if(this.a){a=this.a;var b={};a.a&&(b.fmt=a.a.Sa,a.ra&&(b.afmt=a.ra.Sa));a.S&&(b.threed=a.Jc);b.plid=a.ab;b.ei=a.j;b.list=a.Na;b.cpn=a.Ca;a.L&&(b.v=a.L);a.Lj&&(b.infringe=1);a.Nd&&(b.splay=1);a.Fb&&(b.live=a.bb?"dvr":"live");a.hf&&(b.autoplay=1);a.fa&&(b.sdetail=a.fa);a.qd&&(b.partnerid=a.qd);a=b}else a={};return a};f.Mk=function(a){this.A.ux(a)};f.bi=function(a){this.A.vx(a)};
547 f.vu=function(a){this.u("commoninfoloaded",a);ky(this,"dataloaded");qy(this,v(function(){this.U&&ry(this)},this))};f.wu=function(){ky(this)};f.uu=function(a){sw(this,parseInt(a.errorcode,10),unescape(a.reason),a.errordetail)};function ky(a,b){a.u("internalvideodatachange",b||"dataupdated",a,a.a)}function qy(a,b){if(ly(a))H(b,0);else{var c=a.a,d=a.o.Kh;c.B?Cl(c,b,!!d,!!a.o.pd):El(c,b,!!d)}}
548 function By(a){z("loadstart loadeddata loadedmetadata play playing pause ended suspend progress seeking seeked timeupdate durationchange error waiting abort".split(" "),function(a){this.N.listen(this.b,a,this.bw)},a)}
549 f.bw=function(a){var b=a.target;if(b.currentSrc){switch(a.type){case "durationchange":this.a.bb||(b.Va(b.duration||0),b=b.Qd,(!this.g||isFinite(b)&&0<b)&&vy(this,b));break;case "ended":oy(this,Ii(this.i,4));break;case "loadedmetadata":this.a.ya&&(this.b.currentTime=this.a.ya),this.o.tm&&this.a.ya&&(this.O=this.a.ya,this.b.pause());case "loadeddata":this.$&&I(this.$);break;case "loadstart":kf(this.fa);this.fa=jf(v(this.un,this),100);var b=this.N,c=this.b,d=v(this.un,b.Kg),c=uf(c,d);b.ee.push(c);break;
550 case "progress":this.O&&this.b.seekable.length&&this.b.seekable.end(0)>this.O&&(this.b.currentTime=this.O,this.O=NaN,this.ra=this.N.listen(this.b,"canplay",this.Gt));case "suspend":Iy(this);this.u("onLoadProgress",this,this.b?cg(this.b):0);break;case "seeking":Ky(this);break;case "timeupdate":Ky(this),Iy(this),this.u("onVideoProgress",this,b.getCurrentTime())}this.u("videoelementevent",a);t:if(b=this.i,d=this.oa,P(b,128))a=b;else{var c=b.b,e=b.a,g=a.target;switch(a.type){case "ended":if(0>=g.networkState)break;
551 c=Li();e=null;break;case "pause":P(b,32)||P(b,2)||(c=4,e=null);break;case "playing":c=8;e=null;break;case "abort":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};A(Gi,e.errorCode)&&(c|=128);break;case "canplay":c&=-2;break;case "progress":P(b,8)&&(g=a.target.getCurrentTime(),d&&dy(d,g,a.timeStamp)&&(c|=1));break;case "seeked":c&=
552 -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=Ii(b,c,e)}oy(this,a)}};
553 f.un=function(){if(this.b&&0<this.b.getCurrentTime()&&0<this.b.Qd&&!this.a.sm){kf(this.fa);this.a.sm=!0;if(this.j){var a=this.j;if(a.i)a.log_("Attempted to start sending initial pings twice.");else{a.a.ig&&(a.G=[10+a.a.cg,10,10,40+a.a.uh-a.a.cg,40],a.g=a.G[0]);var b=Ly(a,"playback");b.k=a.g;b.fg=!0;a.Rc=a.lf();a.mg=a.Rc;a.b.ba?(a.o=[a.Rc],a.k=[a.Rc]):(b.i=[a.Rc],b.j=b.i);a.tj=(w()-a.pf)/1E3;b.send();a.a.ig&&(void 0!=a.A&&kf(a.A),a.A=jf(v(a.Bq,a),100),a.we?a.log_("Do not call startSendingDetailedPings_ twice"):
554 (b=a.g,My(a),a.we=jf(v(a.rj,a),1E3*b)));if(a.b.lc)if(a.i)a.log_("Tried to logUserWatch inappropriately.",Ne.debug.zq.Aq);else{var b=a.b,c=a.a,b={noflv:"1",html5:"1",video_id:c.L,cpn:c.Ca,plid:c.ab,ei:c.j,referrer:ex(b),eurl:b.b,framer:b.R,feature:b.k,fmt:c.a?c.a.Sa:0,ptk:c.A,skl:c.Xl,access_token:c.H,ucid:c.Ec};pa(b,Ny(a));b=S(a.b.ib+"user_watch",b);Kf(b)}a.a.A&&Kf(S(a.b.ib+"ptracking",{html5:"1",video_id:a.a.L,cpn:a.a.Ca,plid:a.a.ab,ei:a.a.j,ptk:a.a.A,oid:a.a.Dc,ptchn:a.a.Hc,pltype:a.a.Gc,content_v:a.b.o}));
555 if(a.a.Wl&&a.b.Rd)if(a.i)a.log_("Tried to logGetVideo inappropriately.",Ne.debug.zq.Aq);else{var b=a.b,c=a.a,d={noflv:1,video_id:c.L,cpn:c.Ca,el:b.Y,ps:b.Ja,referrer:ex(b),eurl:b.b,framer:b.R,fmt:c.a?c.a.Sa:0,ptk:c.A,subscribed:c.g,t:c.qb};b.Sb&&(d.autoplay="1");c.Nd&&(d.splay="1");0<c.ya&&(d.start=1E3*c.ya);c.kj&&(d.tmi="1");b=S(a.lm,d);Kf(b)}a.a.gg&&uy(a,{metric:"playback"});a.i=!0}}kf(this.da);this.a.gg&&(this.j.i||this.a.Vl)&&(this.da=jf(v(this.Cq,this),3E4));this.u("playbackstarted")}};
556 f.Gt=function(){this.ra&&(this.N.Vc(this.ra),this.ra=void 0,Ai(this.b))};
557 function Iy(a,b){if(a.b){var c=a.getCurrentTime();if(a.k){var d=a.k;if(!d.I||d.j<=c&&c<d.j+10)d.j=c,d.I=!1;Nx(d)}a.a.bb&&c>a.rd()&&(d=a.rd(),0==d&&(d=c),vy(a,1.2*d));var d=Jy(a),e=0;a.b.buffered&&0<a.b.buffered.length&&(a.a.bb?a.ca||(e=(1>a.b.seekable.length?NaN:a.b.seekable.end(a.b.seekable.length-1))/a.rd()):e=a.b?cg(a.b):0);5<c&&(a.a.ya=c);a.va&&I(a.va);a.b.paused||a.b.ended||(a.va=a.b.played&&0==a.b.played.length?H(v(a.Rm,a),100):H(v(a.Rm,a),1E3));a.a.ue=c;if(!b&&a.hg()){var g=a.a.Nj,h=a.a.ue;
558 0<g&&h>g&&(a.a.ye+=h-g);a.a.wa&&a.a.K&&a.a.ye>=a.a.K&&(g=a.j,g.i&&g.a.K&&(h=Ly(g,"delayplay"),h.nj=!0,Oy(g,h)),a.a.K=NaN)}if(a.a.nm&&(g=a.a.Oj,h=a.a.ue,1==g&&0<h||2==g&&20<=h||3==g&&30<=h)){g=a.j;if(g.i){var h=g.b,k=g.a,g={ns:"yt",html5:"1",docid:k.L,plid:k.ab,ei:k.j,cpn:k.Ca,fmt:k.a?k.a.Sa:0,el:h.Y,ps:h.Ja,subscribed:k.g,yttk:"1",st:g.lf(),et:g.lf(),ctp:k.Oj,vid:h.$},g=S("//s2.youtube.com/s",g);Kf(g)}a.a.Oj++}a.u("progresssync",a,c,d,e,b);a.a.Nj=c}}
559 f.Rm=function(){this.b&&(this.b.pp(),P(this.i,8)&&dy(this.oa,this.getCurrentTime(),Date.now())&&oy(this,Ji(this.i,1)),Iy(this))};
560 function oy(a,b){if(b.b!=a.i.b||b.a!=a.i.a){var c=new fy(b,a.i);a.i=b;a.o.lg&&P(b,8)&&0<ao(c,256)&&201==b.a.errorCode&&setTimeout(v(function(){this.b&&(this.a.o&&!this.a.o.a&&this.b.load(),Cy(this))},a),500);0>ao(c,8)&&wy(a,!1);0<ao(c,32)&&wy(a,!1);a.a&&a.a.Fb&&a.a.bb&&P(c.state,2)&&(vy(a,a.getCurrentTime()),Iy(a,!0));P(b,256)&&Py(a,b);a.j&&Qy(a.j,c);Pi(a.A,c);a.u("statechange",c)}}
561 function Py(a,b){var c=b.a;kf(a.da);if(a.a.gg&&A(ey,c.errorCode)){var d=a.j,c=c.errorCode;d.H||(d.H=new ln("error-__ec__"));c={metric:pn(d.H,{ec:c})};uy(d,c)}}function Ky(a){P(a.i,2)||P(a.i,32)||(a.H=NaN)}function wy(a,b){a.a&&a.a.bb&&a.ca!=b&&(a.ca=b,a.u("liveviewshift",b))}function Dy(a,b){a.o.Ia&&Ei(a.b,b.a||Cj(b.b,yj));wi(a.b,b);a.g&&!b.a&&(a.g=null);a.a.a&&a.a.a.g&&Ry(a);I(a.$);a.$=H(v(a.tu,a),15E3);a.o.Im?H(v(function(){Ai(this.b)},a),0):Ai(a.b)}
562 function Ry(a){var b=a.a.a&&a.a.a.g||null;b&&!a.I&&a.b&&((b=Rk(a.b,a.a.a.mb,b))?(a.I=new Yx(a.b,b,v(a.ru,a),v(a.qu,a)),a.I.A=a.a.H,L(a,a.I)):sw(a,203,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK"))}function jy(a){a.I&&(a.I.dispose(),a.I=null)}f.ru=function(a){var b=bx(this.o);b.cpn=this.a.Ca;this.a.U&&(b.vvt=this.a.U);Mb(a.G,b);Ag(a,a.k);this.u("newlicensesession",a)};f.qu=function(a,b,c){sw(this,c?5:206,q(b)?b:"ERROR_LICENSE",a)};f.tu=function(){wg(this,102);if(this.j)this.j.onError(102);this.u("loadsofttimeout")};
563 function vy(a,b){a.b&&a.b.Va(b);a.a.wa!=b&&(a.a.wa=b,ky(a))};function Sy(){}ca(Sy);f=Sy.prototype;f.ic=null;f.Ri=null;f.load=function(a){if(this.ic)return Jn(this.ic);this.ic=new Cn;this.Ri=a?a:"3";In(Ln("3.1"==this.Ri?"//s0.2mdn.net/instream/html5/ima3.js":"//s0.2mdn.net/instream/html5/ima.js"),this.Rx,this.Zp,this);return this.ic};f.getVersion=function(){return this.Ri};f.Rx=function(){"3.1"==this.Ri&&this.ic?this.ic.b():(google.ima.SdkLoader.setCallbacks(v(this.ic.b,this.ic),v(this.cw,this)),google.ima.SdkLoader.load("3",void 0))};
564 f.cw=function(a){this.Zp(Error("Google Ads SDK Failed to load: "+a))};f.Zp=function(a){this.ic.a(a)};function Ty(a){return a?-1!=a.toString().search(/(?:true|1)/i):!1}function Uy(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 Vy(a,b){if(a&&"3.1"==Sy.getInstance().getVersion()){var c=a.getAdId();if(c){var d=a.getWrapperAdIds()||[];b.ad_id=Xa(d,c).join(",");if(c=a.getAdSystem())d=a.getWrapperAdSystems()||[],b.ad_sys=Xa(d,c).join(",");a.isSkippable()&&(b.skip=1)}}}
565 function Wy(a,b){if(a[b])return Ty(a[b]);var c=b.toLowerCase(),d;for(d in a)if(d&&d.toLowerCase()==c)return Ty(a[d]);return!1};function Xy(a){var b=n("yt.www.watch.ads.handleMoveGutCompanion");b&&b(1==a?!0:!1)}function Yy(a){var b=n("yt.www.watch.ads.handleShowAfvCompanionAdDiv");b&&b(0<(a&3))};function Zy(a,b){this.a=a;this.g=b}Zy.prototype.j=null;Zy.prototype.b=NaN;function $y(a,b,c){a.a.u("AD_LOGGING_EVENT",b,c)}function az(a){bz(a);var b=cz(a);if(a.i){var c=dz(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}$y(a,15,b)}function ez(a){bz(a);var b=cz(a);if(isNaN(a.b))bz(a);else{var c=w()-a.b;b.ad_stl=c}$y(a,4,b)}function fz(a){bz(a);var b=cz(a),c=a.a.np();c?b.ad_fmt=c:bz(a);$y(a,5,b)}
566 function cz(a){var b={},c=a.a.ia,d=a.a.Cf(),e=a.a.Zo();Vy(a.a.Zg(),b);d&&0<d&&(b.ad_len=d);c&&c.L?b.ad_v=c.L:e&&(c=Xi(e),b.ad_dom=c,(c=a.g.ta.g)||(c=a.g.J(),(c=A(c.g,"921806"))||(c=a.g.J(),c=A(c.g,"921805"))),c&&(b.ad_v_url=e));b.at=a.a.getType();return b}function bz(a){a.j||(a.j="InstreamAdDisplay ("+a.a.getType()+")")};function gz(a,b,c,d){R.call(this);this.a=b;this.a.D("onVolumeChange",this.Ps,this);this.a.D("control_toggle_play_pause",this.nn,this);this.a.D("control_play",this.Oh,this);this.a.D("control_pause",this.Xj,this);this.b=c;this.j=d;this.i=new Zy(this,this.a);this.o=a+"_2";this.g=new eo(this)}y(gz,R);f=gz.prototype;f.Ya=null;f.ia=null;f.Rf=!1;f.Ug=null;f.Tg=null;f.Xg=null;
567 f.show=function(){this.i.b=w();var a="";if("3.1"==hz())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){iz(this,c);return}}if(a){b=Vi(a);b=b.v||b.video_id;if(!b){var d=ee(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 hg({video_id:b,dash:"0"}):null}else a=null;this.ia=a;var e;this.ia?(this.ia.Nd=!0,e={video_id:this.ia.L},
568 this.ia.D("onStatusFail",this.Mn,this),this.ia.D("dataloaded",this.Ln,this),a=this.a.J(),a=new Ww(a.a),a.Y="adunit",a.Sb=!0,a=cx(a,this.ia),Ll(this.ia,a)):jz(this);kz(this.a,-1,e);this.qn()};function lz(a){a.ia&&(a.ia.W("onStatusFail",a.Mn,a),a.ia.W("dataloaded",a.Ln,a))}f.Ln=function(){lz(this);var a=this.a.J(),b=this.ia,c=v(this.Gv,this),a=a.Kh;b.B?Cl(b,c,!!a,!1):El(b,c,!!a)};
569 f.Gv=function(){var a=by(new $x(this.a.J()),this.ia);a?(a=a.i)?(a=new pe(xi(a)),a.a.set("autoplay","1"),a=a.toString(),"3.1"==hz()?this.b.setMediaUrl(a):this.b.getSelectedCreative().setMediaUrl(a),jz(this)):iz(this,Error("Failed to determine ad media resource.")):iz(this,Error("Failed to determine ad media format."))};
570 function jz(a){Xy(1);Yy(1);a.a.J();var b=a.a.b,c=Lm(b);b.V.J().tb||Xc(c)||Hm(b).appendChild(c);a.Ya=c;a.Xg=Q(a.a.a);a.a.ta.N?F(E("video-ad-status-bar")):(b=Q(a.a.a),a.Ug=E("video-ad-time-left",b),b=E("html5-ad-progress-list",b),c=Sc("div"),$l(c,["html5-ad-progress","html5-progress-section"]),b.appendChild(c),a.Tg=c,a.g.listen(a.Ya,"timeupdate",a.lu));$l(a.Xg,["ad-showing","ad-interrupting"]);a.g.listen(Km(a.a.b),"mouseup",a.pu);a.g.listen(a.Ya,"waiting",a.qn);a.a.D("onResize",a.Gk,a);try{a.g.listen(a.b,
571 google.ima.AdErrorEvent.Type.AD_ERROR,a.nu);a.g.listen(a.b,google.ima.AdEvent.Type.CLICK,a.mu);a.g.listen(a.b,google.ima.AdEvent.Type.COMPLETE,a.ou);a.g.listen(a.b,google.ima.AdEvent.Type.PAUSED,a.Xn);a.g.listen(a.b,google.ima.AdEvent.Type.STARTED,a.Yn);a.Gk();var d=a.a,e=d.b,g=mz(d);e.V.J().tb&&(yd(e.a,g),md(e.a,0,0));a.b.start()}catch(h){iz(a,h)}}
572 f.Yn=function(){this.Rf=!0;this.k||(this.k=!0,ez(this.i),nz(this.a,1));if(0==this.Cf()){var a=this.Ya;a.Va(a.duration||0)}this.a.jb(!0);kz(this.a,1);this.u("adPlay",this)};f.Xn=function(){this.Rf=!1;this.a.jb(!1);kz(this.a,2)};f.ou=function(){fz(this.i);this.Rf=!1;kz(this.a,0);nz(this.a,2);this.u("adEnd",this)};f.nu=function(a){iz(this,a.getError())};function iz(a,b){a.Rf=!1;kz(a.a,0);a.u("adError",b)}f.Mn=function(){lz(this);iz(this,Error("Request to get video data failed."))};
573 f.mu=function(){az(this.i);"3.1"==hz()||this.a.ta.B||H(v(this.Oh,this),0);this.u("select")};f.pu=function(a){this.i.i=new B(a.pageX,a.pageY)};f.lu=function(){var a=Xm(this.b.getRemainingTime());this.Ug.innerHTML=a;0==this.Cf()&&(a=this.Ya,a.Va(a.duration||0));a=this.Cf()?this.Ya.getCurrentTime()/this.Cf():0;a=Math.round(1E3*a)/10;this.Tg.style.width=a+"%"};f.qn=function(){!this.Rf&&this.k||kz(this.a,3)};
574 f.F=function(){this.a.W("control_toggle_play_pause",this.nn,this);this.a.W("control_play",this.Oh,this);this.a.W("control_pause",this.Xj,this);this.a.W("onResize",this.Gk,this);this.g.removeAll();lz(this);this.b.destroy();this.Ya&&(Im(this.a.b),this.Ya=null);this.Ug&&(this.Ug.innerHTML="",this.Ug=null);this.Tg&&(F(this.Tg),this.Tg=null);this.Xg&&(am(this.Xg,["ad-showing","ad-interrupting"]),this.Xg=null);gz.C.F.call(this)};f.getType=function(){return this.o};f.Zg=function(){return this.b.getCurrentAd()};
575 f.Cf=function(){return this.Ya?this.Ya.Qd:null};f.np=function(){return this.Ya?this.Ya.getType():null};f.Zo=function(){return this.Ya&&this.Ya.currentSrc?this.Ya.currentSrc:null};f.Ps=function(a){a=a.muted?0:a.volume;isNaN(a)||(a=tb(a/100,0,1),this.b.setVolume(a))};f.nn=function(){this.Rf?this.Xj():this.Oh()};f.Oh=function(){this.Ya&&(this.b.resume(),this.Yn())};f.Xj=function(){this.Ya&&(this.b.pause(),this.Xn())};f.Gk=function(){var a=mz(this.a);this.b.resize(a.width,a.height,google.ima.ViewMode.NORMAL)};function oz(a,b,c){R.call(this);this.a=b;this.a.D("control_toggle_play_pause",this.cn,this);this.a.D("control_play",this.Nh,this);this.a.D("control_pause",this.Vj,this);this.b=c;this.j=new Zy(this,this.a);this.o=a+"_2";this.i=new eo(this);this.g=pz(b);this.g.D("statechange",this.an,this);this.g.D("internalvideodatachange",this.bn,this);this.ia=null}y(oz,R);f=oz.prototype;f.ql=!1;f.Bg=null;f.Ag=null;f.Cg=null;
576 f.show=function(){var a=this.a;qz(a.app,pz(a));this.j.b=w();Xy(1);Yy(1);this.Cg=Q(this.a.a);if(this.a.ta.N)F(E("video-ad-status-bar"));else{a=Q(this.a.a);this.Bg=E("video-ad-time-left",a);var a=E("html5-ad-progress-list",a),b=Sc("div");$l(b,["html5-ad-progress","html5-progress-section"]);a.appendChild(b);this.Ag=b;this.g.D("progresssync",this.rn,this)}$l(this.Cg,["ad-showing","ad-interrupting"]);this.i.listen(Km(this.a.b),"mouseup",this.Kt);this.a.D("onResize",this.ck,this);try{this.i.listen(this.b,
577 google.ima.AdErrorEvent.Type.AD_ERROR,this.It),this.i.listen(this.b,google.ima.AdEvent.Type.CLICK,this.Ht),this.i.listen(this.b,google.ima.AdEvent.Type.COMPLETE,this.Jt),this.i.listen(this.b,google.ima.AdEvent.Type.PAUSED,this.wn),this.i.listen(this.b,google.ima.AdEvent.Type.STARTED,this.xn),this.ck(),this.b.start()}catch(c){rz(this,c)}};f.bn=function(a,b,c){"newdata"==a&&this.ia!=c&&kz(this.a,-1,{video_id:c.L});this.ia=c};f.an=function(a){a=a.state;P(a,128)&&rz(this,Error(a.a.message||"Video player error."))};
578 f.xn=function(){this.ql=!0;this.k||(this.k=!0,ez(this.j),nz(this.a,1));kz(this.a,1);this.u("adPlay",this)};f.wn=function(){this.ql=!1;kz(this.a,2)};f.Jt=function(){fz(this.j);kz(this.a,0);nz(this.a,2);this.u("adEnd",this)};f.It=function(a){rz(this,a.getError())};function rz(a,b){a.g.pg();kz(a.a,0);a.u("adError",b)}f.Ht=function(){az(this.j);"3.1"==hz()||this.a.ta.B||H(v(this.Nh,this),0);this.u("select")};f.Kt=function(a){this.j.i=new B(a.pageX,a.pageY)};
579 f.rn=function(a,b,c){this.Bg.innerHTML=Xm(a.rd()-b);a=Math.round(1E3*c)/10;this.Ag.style.width=a+"%"};
580 f.F=function(){this.a.W("control_toggle_play_pause",this.cn,this);this.a.W("control_play",this.Nh,this);this.a.W("control_pause",this.Vj,this);this.a.W("onResize",this.ck,this);this.i.removeAll();this.g.D("statechange",this.an,this);this.g.W("internalvideodatachange",this.bn,this);this.g.W("progresssync",this.rn,this);var a=this.a;a.g&&sz(a.app,a.g);this.b.destroy();this.Bg&&(this.Bg.innerHTML="",this.Bg=null);this.Ag&&(F(this.Ag),this.Ag=null);this.Cg&&(am(this.Cg,["ad-showing","ad-interrupting"]),
581 this.Cg=null);oz.C.F.call(this)};f.getType=function(){return this.o};f.Zg=function(){return this.b.getCurrentAd()};f.Cf=function(){return this.g.rd()};f.np=function(){return this.ia&&this.ia.a?this.ia.a.mb:null};f.Zo=function(){if(!this.ia)return null;var a=Hl(this.ia);return a?xi(a):null};f.cn=function(){this.ql?this.Vj():this.Nh()};f.Nh=function(){this.b.resume();this.xn()};f.Vj=function(){this.b.pause();this.wn()};f.ck=function(){var a=mz(this.a);this.b.resize(a.width,a.height,google.ima.ViewMode.NORMAL)};function tz(a,b){this.b=a;this.a=b;this.b.getType()}function uz(a,b,c){a.b.u("AD_LOGGING_EVENT",b,c)}function vz(a){var b={};Vy(a.b.Zg(),b);a.j&&a.g&&(b.ot=a.g-a.j);var c;c=a.a.a.app.J().Ab||a.a.ta.g?2:a.a.J().Od?1:0;b.ad_ps=c;b.at=a.b.getType();return b};function wz(a,b,c){R.call(this);this.b=b;this.a=c;this.i=new tz(this,b);this.k=a+"_1";this.g=new eo(this)}y(wz,R);f=wz.prototype;f.Zd=null;f.tn=!1;
582 f.show=function(){V(Q(this.b.a),"ad-showing");this.Zd=Hm(this.b.b);V(this.Zd,"ad-overlay");this.g.listen(this.Zd,"mouseup",this.Et);try{Ed(this.Zd);this.g.listen(this.a,google.ima.AdEvent.Type.USER_CLOSE,this.Bt);this.g.listen(this.a,google.ima.AdEvent.Type.CLICK,this.Dt);this.g.listen(this.a,google.ima.AdErrorEvent.Type.AD_ERROR,this.Ct);xz(this,google.ima.ViewMode.NORMAL);this.zg();this.a.start();var a=this.i;a.j=w();var b=vz(a);uz(a,3,b);this.tn=!0;this.b.D("onResize",this.zg,this);this.b.D("onStateChange",
583 this.pn,this);this.u("adEnd",this)}catch(c){this.u("adError",c)}};f.Zg=function(){return this.a.getCurrentAd()};f.getType=function(){return this.k};f.F=function(){this.g.removeAll();this.b.W("onResize",this.zg,this);this.b.W("onStateChange",this.pn,this);W(Q(this.b.a),"ad-showing");this.a&&(this.a.destroy(),this.a=null);this.Zd&&W(this.Zd,"ad-overlay");this.Zd=null;wz.C.F.call(this)};f.Bt=function(){var a=this.i;a.g=w();var b=vz(a);uz(a,6,b)};
584 f.Dt=function(){qm(this.b);var a=this.i;a.g=w();var b=vz(a);if(a.i){var c=dz(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}uz(a,100,b)};f.Et=function(a){this.i.i=a.target==a.currentTarget?null:new B(a.pageX,a.pageY)};f.Ct=function(a){a=a.getError();this.u("adError",a)};f.pn=function(a){P(a.state,16)&&xz(this,google.ima.ViewMode.NORMAL)};function xz(a,b){a.j!=b&&(a.j=b,a.tn&&a.zg())}
585 f.zg=function(){var a=Ed(this.Zd);this.a.resize(a.width,a.height,this.j)};function yz(a,b){R.call(this);this.ga=a;this.a=b}y(yz,R);yz.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 zz(a,b){wz.call(this,1,a,b)}y(zz,wz);zz.prototype.zg=function(){};zz.prototype.getType=function(){return"1_3"};function Az(a,b,c,d){R.call(this);this.Ba=b;this.b=a;this.start=c;this.g=d;this.a=null}y(Az,R);f=Az.prototype;f.Bl=!0;f.Se=!1;f.isVisible=!0;f.Re="unloaded";f.Vk=!1;function Bz(a){return 0==a.start?Cz(a)&&Dz(a)?-2147483648:0:-1==a.start||-2==a.start?2147483647:1E3*a.start}function Cz(a){return"loaded"==a.Re||"error"==a.Re}function Dz(a){if(!Cz(a))throw Error("Preroll status is undefined before ad load.");return 0==a.start&&a.Se}
586 function Ez(a){a.Re="loading";var b=a.g.shift();b?(0==a.start&&Fz(a.b,"nl"),b=b.create(a.start,a.Ba,a.b),L(a,b),In(b.load(),a.Uv,a.Tv,a)):(Gz(a.b,2,Hz(a,{})),a.Re="error",Iz(a))}f.getId=function(){return this.Ba};function Jz(a){a.a.W("adEnd",a.Qo,a);a.a.W("adError",a.To,a);a.a.W("AD_LOGGING_EVENT",a.Ro,a);a.a.W("select",a.So,a)}f.Tv=function(a){a instanceof Dn||Ez(this)};
587 f.Uv=function(a){this.start=a.startTime;this.a=a.hu;L(this,this.a);0==this.Ba&&(a=this.a.getType(),this.b.i.at=a);this.a instanceof gz||this.a instanceof oz?this.Se=!0:this.a instanceof yz?this.isVisible=!1:this.a instanceof zz&&(this.isVisible=!1);this.Re="loaded";Iz(this)};function Iz(a){a.u("adBreakComplete",a)}
588 f.show=function(){this.Vk?this.a instanceof wz&&xz(this.a,google.ima.ViewMode.NORMAL):(this.Vk=!0,this.a instanceof gz&&Fz(this.b,"bs"),this.a.D("adEnd",this.Qo,this),this.a.D("adError",this.To,this),this.a.D("AD_LOGGING_EVENT",this.Ro,this),this.a.D("select",this.So,this),this.a.show())};f.Qo=function(){if(this.Se){Jz(this);var a=this.b;a.ta.Fc&&!a.bk&&(Kf(a.J().ib+"mac_204?action_fcts=1"),a.bk=!0)}Iz(this)};f.To=function(a){if(a){var b={};Uy(a,b);Hz(this,b);Kz(this.b,32,b)}Jz(this);Iz(this)};
589 f.Ro=function(a,b){Hz(this,b);Gz(this.b,a,b)};f.So=function(){this.Bl=!1};function Hz(a,b){b.sst=a.start;b.sidx=0};function Lz(a){this.Ls=a}function Mz(a){try{var b=lv(a).getElementsByTagName("AdBreak"),c=Ja(b,function(a){a=a.getAttribute("time");return Ca(a)});return new Lz(c)}catch(d){return new Lz([0])}};function Nz(a,b,c,d){this.i=a;this.j=b;this.b=c;this.k=d}Nz.prototype.g="";Nz.prototype.a="";function Oz(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 Pz(a,b,c,d,e){this.j=a;this.g=b;this.A=c;this.ga=d;this.b=e;this.a=new Nz(b,this.j,d,e);this.G=new eo(this);this.i=new eo(this)}y(Pz,Lf);f=Pz.prototype;f.yo=null;f.Dd=null;
590 f.load=function(){if(this.Dd)return this.Dd;this.Dd=new Cn;var a=this.ga.ta.g?this.ga.J().Sc||Qz:Ad(Q(this.ga.a)),b;this.ga.ta.a?b=!1:(b=0<(this.b&3)?190:200,b=200>a.width||a.height<b);if(b){b=this.a;var c=Oz(b);c.ck_wh=a.width+"x"+a.height;Kz(b.b,14,c);this.Qe(Error("The player size is too small."))}else In(this.ga.rg,this.Gu,this.Ed,this);return this.Dd};
591 f.Tk=function(){var a=new google.ima.AdsRenderingSettings;a.baseYouTubeUrl=this.ga.J().ib;a.contentId=this.ga.getVideoData().L;a.useStyledNonLinearAds=!0;a.useVideoAdUi=this.ga.ta.N;a.youTubeAdNamespace=this.j;return a};function Rz(a,b){a.yo=b;var c=b.getType();a.a.g=c}
592 f.Gu=function(a){var b=this.a;Gz(b.b,9,Oz(b));b=new google.ima.AdsRequest;b.adTagUrl=this.o();var c=this.ga.J().Sc||Qz;b.linearAdSlotWidth=c.width;b.linearAdSlotHeight=c.height;b.nonLinearAdSlotWidth=c.width;b.nonLinearAdSlotHeight=100;"3.1"==hz()&&(b.useLatestAdsLoader=this.ga.ta.bg);var c=this.b,d=n("yt.www.watch.ads.setGutSlotSizes");d&&d(0<(c&3),0<(c&12));this.G.listen(a,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Yu);this.G.listen(a,google.ima.AdErrorEvent.Type.AD_ERROR,this.Xu);
593 this.Do(a,b)};
594 f.Yu=function(a){if(a.getUserRequestContext()===this){try{var b;if("3.1"==hz()){var c=this.Tk();b=a.getAdsManager({},c)}else b=a.getAdsManager({})}catch(d){this.Ed(d);return}this.i.listen(b,google.ima.AdEvent.Type.LOADED,v(this.Vw,this,b));this.i.listen(b,google.ima.AdErrorEvent.Type.AD_ERROR,v(this.Uw,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=mz(this.ga);
595 try{b.init(a.width,a.height,google.ima.ViewMode.NORMAL)}catch(e){b.destroy(),this.Ed(e)}}};f.Vw=function(a,b){this.i.removeAll();var c=b.getAd(),d=c.isLinear(),e=this.a,g=Oz(e);g.ad_man=d?"instream":"overlay";Gz(e.b,12,g);e="";"3.1"==hz()&&(e=b.getAdData().mediaUrl);switch(d?this.Fk(a,c,e):this.Rg(a,c)){case 0:Sz(this);break;case 1:a.destroy();this.Qe(Error("Unable to create a display state."));break;case 2:c=this.a;Kz(c.b,21,Oz(c));a.destroy();this.Qe(Error("Fallback to next ad."));break;default:a.destroy()}};
596 f.Uw=function(a,b){this.i.removeAll();a.destroy();this.Ed(b.getError())};f.Xu=function(a){var b=a.getError();b.getType()==google.ima.AdError.Type.AD_LOAD&&a.getUserRequestContext()===this&&this.Ed(b)};f.Fk=function(a,b,c){b=b.getAdId();this.a.a=b;a=this.ga.ta.ca?new oz(this.j,this.ga,a):new gz(this.j,this.ga,a,c);Rz(this,a);return 0};f.Rg=function(a,b){var c=b.getAdId();this.a.a=c;Rz(this,new wz(this.j,this.ga,a));return 0};
597 f.Ed=function(a){if(a instanceof Dn)this.Dd.cancel();else{var b=this.a,c=Oz(b);a&&Uy(a,c);Kz(b.b,32,c);this.Qe(a)}};function Sz(a){a.Dd.b({hu:a.yo,startTime:a.g})}f.Qe=function(a){this.Dd.a(a)};f.F=function(){this.G.removeAll();this.i.removeAll();this.Dd&&this.Dd.cancel();Pz.C.F.call(this)};f.Do=function(a,b){try{a.requestAds(b,this)}catch(c){this.Ed(c)}};function Tz(a,b){this.a=a;this.b=b};function Uz(a){yz.call(this,a,"")}y(Uz,yz);Uz.prototype.getType=function(){return"2_3"};Uz.prototype.Zg=function(){return null};function Vz(a,b,c,d){Pz.call(this,2,a,b,c,d);this.k=new Tz(this.ga.ta,this.ga.J());(a=n("yt.www.watch.ads.handleSetAfvCompanionVars"))&&a(0<(d&3))}y(Vz,Pz);Vz.prototype.Tk=function(){var a=Vz.C.Tk.call(this);a.a=0==this.A;a.b=!0;return a};
598 Vz.prototype.o=function(){var a=this.k,b=this.b,c=0==this.g||-1==this.g?this.g:1E3*this.g,d={};d.eid=a.a.hb;d.videoad_start_delay=c;d.scs=a.a.Jc;d.client=a.a.te;d.description_url=a.a.ba;d.loeid=a.a.nd;d.cust_gender=a.a.qb;d.host=a.a.host;d.hl=a.b.i;d.max_ad_duration=a.a.pd;d.url="embedded"==a.b.Y&&a.b.b?a.b.b:a.a.ba;a.a.Hc&&(d.adtest="on");isNaN(a.a.U)||(d.cust_age=a.a.U);isNaN(a.a.fa)||(d.hostTierId=a.a.fa);a.a.Ma&&(d.yt_pt=a.a.Ma);a.a.La&&(d.video_cpm=a.a.La);a.a.o&&(d.as_dbp=a.a.o);d.ytdevice=
599 a.a.od;c="";b&2&&b&1?c="video":b&2?c="skippablevideo":b&1&&(c="standardvideo");b&4&&(c&&(c+="_"),c+="text_image_flash");d.ad_type=c;0<(b&3)?a.a.oa&&(d.channel=a.a.oa.join("+")):b&4&&a.a.Ia&&(d.channel=a.a.Ia.join("+"));a.a.Mc&&(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?"+Ti(b,"&")};Vz.prototype.Rg=function(a,b){if(this.ga.ta.a)return 1;0==this.g&&(this.g=10,this.a.i=10,Gz(this.ga,1));Yy(this.b);return Vz.C.Rg.call(this,a,b)};
600 Vz.prototype.Qe=function(a){var b=this.ga.ta;b.a?Vz.C.Qe.call(this,a):b.rb||this.b&4?(Rz(this,new Uz(this.ga)),Sz(this)):Vz.C.Qe.call(this,a)};function Wz(a,b){if(a){this.Xp=a;this.rp=b;var c,d=this.Xp,e=d.indexOf(";sz=");c=Si(d.substring(e),";");d=d.substring(0,e).split("pfadx");if(c=2!=d.length?null:{Nx:d[0],Ox:d[1],Px:c})this.qp=c.Nx,this.vp=c.Ox,this.wp=c.Px}}f=Wz.prototype;f.Xp="";f.qp="";f.rp=!1;f.El="";f.vp="";f.wp=null;function Xz(a,b,c,d){Pz.call(this,1,a,b,c,d);this.k=new Wz(this.ga.ta.Nc,this.ga.ta.Kc)}y(Xz,Pz);
601 Xz.prototype.o=function(){var a=this.k,b=this.b,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);b={xp:e,qh:c,yp:g,Zv:!0,Dl:d};c=Kb(a.wp);b.Yv&&(c.pos=b.Yv);b.yp&&(c.tile=b.yp.toString());b.xp&&(c.kmyd=b.xp);b.Zv&&(t(c["!c"])?c["!c"].push("html5"):c["!c"]=c["!c"]?[c["!c"],"html5"]:"html5");b.Dl&&0<b.Dl.length&&a.rp&&(c.ciu_szs=b.Dl.join(","));c.dcmt=
602 "text/xml";ri()&&(c.kmob="ps3");a.El||(a.El=Math.floor(999999999*Math.random()).toString());c.ord=a.El;b.qh&&b.qh.length&&"sz"in c&&delete c.sz;c=Ti(c,";");b.qh&&b.qh.length&&(c="sz="+b.qh.join(",")+";"+c);return[a.qp,"pfadx",a.vp,";",c,"?"].join("")};
603 Xz.prototype.Rg=function(a,b){var c=b.getAdId();this.a.a=c;c=b.getTraffickingParameters();return Wy(c,"rm")?(1!=this.b&&(c=n("yt.www.watch.ads.handleHideCompanion"))&&c(),Yz(a),2):Wy(c,"blockAllAds")?(Yz(a),Rz(this,new zz(this.ga,a)),0):Wy(c,"hideMaster")?(Rz(this,new zz(this.ga,a)),0):this.ga.ta.a?1:"3.1"==hz()?(Rz(this,new wz(this.j,this.ga,a)),0):1};function Yz(a){a.sendImpressionUrls&&a.sendImpressionUrls()};function Zz(a,b,c){var d=c.ta;this.k=d.Lc;var e=0,d=d.Gc.toUpperCase();"INVIDEO"==d?e=4:"INSTREAM"==d?e=1:"MPU"==d&&(e=8);Pz.call(this,2,a,b,c,e)}y(Zz,Pz);function $z(a){var b=new Cn;ej(a,{format:"RAW",method:"GET",timeout:5E3,al:function(){b.a(Error(a+" timed out"))},onError:function(c){b.a(Error("Problem loading "+a+" with status code "+c.status))},Oa:function(a){b.b(a)}});return b}Zz.prototype.o=function(){return""};
604 Zz.prototype.Do=function(a,b){var c=this.b;c&1||c&4?this.k&&"goo.gl"==Xi(this.k)?(c=$z("https://www.googleapis.com/urlshortener/v1/url?key=AIzaSyBbSB-E7SYd1iggX6r2b5C7ljvO6fVqaj0&shortUrl="+this.k),In(c,function(a){a=kb(a.responseText);if(!a||!a.longUrl)throw Error("Invalid expanded forced ad URL");a=Zi(a.longUrl,{video_format:"43"});return $z(a)},null,this),In(c,function(c){b.adsResponse=c.responseText;a.requestAds(b,this)},null,this),In(c,null,this.Ed,this)):this.Ed(Error("Invalid URL: "+this.k)):
605 this.Ed(Error("Invalid request type: "+c))};function aA(a,b,c){this.a=a;this.g=b;this.b=gi||hi?"html5_ios":ii?"html5_android":ri()?"html5_ps3":"leanback"==c?"html5_tv_leanback":"html5"};function bA(a,b,c,d){Pz.call(this,4,a,b,c,d);this.k=new aA(this.ga.ta,this.ga.getVideoData().wa,this.ga.J().Y)}y(bA,Pz);
606 bA.prototype.o=function(){var a;a=this.k;if(a.a.K&&a.a.Pc){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.K;e.ssnw=a.a.K;e.caid=a.a.Pc;e.prof=b;e.vdur=a.g;e.csid=c;e.resp="vast2";e.crtp="vast2s";e.flag="+emcr";b={};isNaN(a.a.$)||(b._fw_d_001=a.a.$);a.a.Ra&&(b._fw_d_002=a.a.Ra);a.a.za&&(b["_fwu:10613:lang"]=a.a.za);a.a.o&&(b._fw_dbp=a.a.o);b._fw_yt_type=a.a.I?"short":"long";var c={ptgt:"a",slid:"preroll"},g="";a.a.i&&!a.a.b?
607 g=";linear-skippable":!a.a.i&&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?"+Ti(e,"&")+";"+Ti(b,"&")+";"+Ti(c,"&")}else a="";return a};bA.prototype.Fk=function(a,b){return 0!=this.g?1:bA.C.Fk.call(this,a,b,null)};bA.prototype.Rg=function(){return 1};function cA(a,b){this.b=a;this.a=b}cA.prototype.create=function(a,b,c){switch(this.b){case 1:return new Vz(a,b,c,this.a);case 2:return new Xz(a,b,c,this.a);case 4:return new bA(a,b,c,this.a);case 3:return new Zz(a,b,c);default:return null}};function dA(a){this.a=a};function eA(a,b){this.O=a;this.B=this.O.kc;this.g="leanback"==this.O.Y;this.a=this.B||this.g;var c="3.1"==Sy.getInstance().getVersion();this.N=!this.a&&c;this.ca=a.tb&&c&&!this.a;this.apply(b)}var fA={mC:"m",hB:"f"};
608 eA.prototype.apply=function(a){var b=A(this.O.g,"908301"),c="3.1"==Sy.getInstance().getVersion(),d=Ty(a.instream),e=(!this.a||b)&&c&&Ty(a.trueview),g=Ty(a.aftv)&&(!this.a||b);this.R=a.ad_slots;this.S=a.ad_breaks;this.gb=a.ad_flags||0;this.U=parseInt(a.cust_age,10);this.hb=a.cafe_experiment_id;var h=parseInt(a.cust_gender,10);isNaN(h)||(this.qb=h);this.Nc=a.ad_tag;this.Hc=!!a.adtest;this.$=parseInt(a.ad_age,10);this.Dc=a.cid;this.ba=a.ad_eurl;this.da=a.excluded_ads;this.Gc=a.force_ad_type;this.Lc=
609 a.force_ad_url;this.Ra=Hb(fA,function(b){return b==a.ad_gender});this.o=a.dbp;this.Kc=!!a.mpu;this.host=a.ad_host;this.fa=parseInt(a.ad_host_tier,10);this.Ec=1==a.ad_logging_flag;this.G=Ty(a.afv)&&!this.a;this.j=g&&e;this.k=g&&d&&!Ty(a.no_afv_instream);this.H=Ty(a.dclk);this.Mc=1==a.livestream;this.ra=Ty(a.forced_ad)&&b&&c;this.A=1==parseInt(a.tpas_ad_type_id,10);this.Ic=!!a.fqsf;this.b=d;this.ua=Ty(a.invideo)&&!this.a;this.va=Ty(a.mpu)&&!this.a;this.Fc=Ty(a.shortform);this.I=Ty(a.sffb);this.Jc="1"==
610 a.as_launched_in_country;this.ea=!this.a&&!this.A;this.i=e;b=a.ad_channel_code_instream;this.oa=u(b)?b.split(","):[];this.za=a.ad_language_iso639_2;this.nd=a.loeid;b=parseInt(a.afv_instream_max,10);isNaN(b)&&(b=15E3);this.pd=b;b=a.ad_channel_code_overlay;this.Ia=u(b)?b.split(","):[];this.Ma=a.yt_pt;this.te=a.ad_video_pub_id;this.La=parseInt(a.afv_video_min_cpm,10);this.rb=g&&this.I&&!this.G;this.Oc=this.G||this.rb;this.od=parseInt(a.ad_device,10);this.Pc=a.tpas_video_id;this.K=a.tpas_partner_id;this.bg=
611 a.new_html5_ad_loader};eA.prototype.ea=!0;function gA(a,b){this.b=b;this.g=[];this.i={};this.j={};this.a=a}y(gA,Lf);f=gA.prototype;f.je=null;function hA(a){a.g.length||(db(a.b,function(a,c){return a.getId()-c.getId()}),a.g=Ia(a.b,function(a){return"unloaded"==a.Re}),0==a.g.length?fm(a.a):(null===Na(a.g,function(a){return 0==a.start})&&fm(a.a),iA(a)))}function iA(a){if(a.g.length){var b=a.g.shift();b.D("adBreakComplete",a.tl,a);Ez(b)}}f.tl=function(a){a.W("adBreakComplete",this.tl,this);H(v(this.zx,this,a),0)};
612 f.zx=function(a){var b=Ha(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=Bz(c)-1);0==a.Ba&&(Fz(this.a,"bl"),Dz(a)||Fz(this.a,"fb"));if(c="loaded"!=a.Re){if(b&&Cz(b)){var e=Bz(b);e>d&&(d=e);jA(this,b);kA(this,b,d)}}else this.i[a.getId()]=a,kA(this,a,d);fm(this.a);c&&this.$g(a);iA(this)};
613 function kA(a,b,c){var d=Bz(b);if(!isNaN(d)){var e={};e.priority=-2!=b.start?2:3;e.id=String(b.getId());e.visible=b.isVisible;c=new nh(d,c,e);a.j[b.getId()]=c;a.a.yf(c)}}function jA(a,b){a.j[b.getId()]&&(a.a.Av(a.j[b.getId()]),delete a.j[b.getId()])}f.$g=function(a){a.W("adBreakComplete",this.tl,this);this.je&&a==this.je&&(this.je=null);jA(this,a);Ua(this.b,a);delete this.i[a.getId()];Nf(a)};
614 f.rv=function(a){if(a.Se){if(-1!=a.start&&a.Bl){var b=this.a;lA(b);pm(b)}else Dz(a)&&!a.Bl?(b=this.a,lA(b),pm(b)):(lA(this.a),this.a.jb(!1));this.$g(a)}else a.isVisible||this.$g(a)};f.F=function(){z(this.b,this.$g,this);gA.C.F.call(this)};function mA(a,b){this.g=a;b&&(this.b=b)}function nA(a){var b={};b.allowed=a.g;a.b&&(b.ex_ads=a.b);a.a&&(b.at=a.a);return b};function oA(a,b){this.g=a;this.V=b;this.o=w();this.a=a.ta;this.b={};var c=[];this.a.A&&this.a.b&&c.push("4_2");this.a.H&&(this.a.b&&c.push("1_2"),this.a.i&&c.push("1_2_1"),this.a.ua&&c.push("1_1"),this.a.va&&c.push("1_3"));this.a.j&&c.push("2_2_1");this.a.k&&c.push("2_2");this.a.G&&c.push("2_1");this.a.Oc&&c.push("2_3");this.i=c.join(",");this.k=new mA(this.i,this.a.da);this.b.allowed=this.i;(c=this.a.da)&&(this.b.ex_ads=c)}var pA=[9,10,11,12],qA=[21,30],rA=[1009];oA.prototype.j=0;
615 function sA(a,b){if(!a.a.Ec)return!1;var c=a.g.J();if(A(c.g,"906335"))return!0;c=b.ad_event;return A(pA,c)||7==c&&(c=b.ad_error,A(qA,c)||32==c&&A(rA,b.error_code))?!1:!0};function tA(a){Nw.call(this,a);this.j={};this.i={at:"0"};this.b=new Gm(this.a);this.g=null;a=this.getVideoData().b.html5_sdk_version;this.k=Sy.getInstance().load(a)}y(tA,Nw);var Qz=new C(0,0);f=tA.prototype;f.na="ad";f.kd="ad";f.xe=null;f.Td=null;f.ta=null;f.bk=!1;f.lk=!1;f.rg=null;f.ni=null;f.Xa=function(){return!!this.app.I.getVideoData().ga};
616 f.create=function(){tA.C.create.call(this);this.Z=!0;Fz(this,"i");this.ta=new eA(this.J(),this.a.getVideoData().b||{});this.xe=new oA(this,this.a);Xy();this.bk=!1;var a=Jn(this.k);this.rg=In(a,this.Ms,null,this);t:{var a=new dA(this),b=[];try{var c=a.a.ta,d;if(c.ea){var e;if(c.S)e=Mz(c.S);else{var g;if(c.R){var h=Ja(c.R.split(","),Ca);g=new Lz(h)}else g=new Lz([0]);e=g}d=e}else d=new Lz([0]);for(var k=d.Ls,c=0;c<k.length;c++){var m=a.a;d=c;var p=k[c],s;if(a.a.ta.I){e=[];var r=a.a.ta;if(r.ra)e.push(new cA(3,
617 0));else{r.A&&(r.b||r.i)&&e.push(new cA(4,1));r.H&&(g=0,r.b&&(g|=1),r.i&&(g|=2),r.ua&&(g|=4),r.va&&(g|=8),0<g&&e.push(new cA(2,g)));if(r.k||r.j)g=0,r.k&&(g|=1),r.j&&(g|=2),e.push(new cA(1,g));r.G&&e.push(new cA(1,4))}}else{e=[];var x=a.a.ta;if(x.ra)e.push(new cA(3,0));else{x.A&&x.b&&e.push(new cA(4,1));if(x.H){var M=0;x.b&&(M|=1);x.i&&(M|=2);0<M&&e.push(new cA(2,M))}if(x.k||x.j)M=0,x.k&&(M|=1),x.j&&(M|=2),e.push(new cA(1,M))}}s=e;var ta=new Az(m,d,p,s);b.push(ta)}}catch(Y){}finally{break t}}k=b;Fz(this,
618 "bd");this.Td=new gA(this,k);hA(this.Td);k={};k.allowed=this.xe.i;jm(this,{},k)};f.destroy=function(){this.lk&&lA(this);this.Z=!1;this.g&&sz(this.app,this.g);Of(this.Td,this.g);this.g=this.Td=null;this.rg&&(this.rg.cancel(),this.rg=null);this.xe=null;var a=this.b;Im(a);Vc(Hm(a));a.b=null;tA.C.destroy.call(this)};f.getVideoData=function(){return this.app.getVideoData(1)};f.J=function(){return this.app.J()};
619 function Gz(a,b,c){a=a.xe;c=c||{};var d=(w()-a.o)/1E3;c.art=d;d=a.g.J();d.k&&(c.feature=d.da);c.ad_flags=a.a.gb;var e=a.a.Dc;e&&(c.cid=e);c.mt=a.V.getCurrentTime();(d=hx(d))&&(c.lact=d);(d=a.V.Ph())&&(c.len=d);a.a.Ic&&(c.fqsf=1);(d=Sy.getInstance().getVersion())&&(c.sdkv=d);c.ad_event=b;if(3==b||4==b)a.k.a=c.at;b=c;if(sA(a,b)){var g;t:{c=a.b;d=Jb(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 Kz(a,b,c){c=c||{};c.ad_error=b;Gz(a,7,c)}
620 f.Oi=function(){return this.xe?this.xe.k:tA.C.Oi.call(this)};function hz(){return Sy.getInstance().getVersion()}function pz(a){if(!a.g){var b=new Ww(a.J().a);b.Y="adunit";b.Sb=!0;a.g=new gy(b,2)}return a.g}function mz(a){var b=a.ta.g?a.J().Sc||Qz:Ed(Q(a.a));a.ta.a||(b.height-=27);return b}function dz(a){return a.ta.g?(a=a.J().Sc||Qz,new Ab(0,0,a.width,a.height)):Cd(Q(a.a))}function lA(a){Im(a.b);a.lk=!1;om(a);nm(a,["seek","settings"]);a.J().Pd&&nm(a,["audio"])}
621 function nz(a,b){switch(b){case 1:a.u("publish_external_event","onAdStart");break;case 2:a.u("publish_external_event","onAdEnd")}}function kz(a,b,c){a.u("publish_external_event","onAdStateChange",b,a.b.V.J().tb?a.b.V.app.P.b:Lm(a.b),c)}
622 f.vc=function(a){tA.C.vc.call(this,a);var b=parseInt(a.getId(),10);if(this.Td&&!isNaN(b)&&(a=this.Td,q(b)&&(b=a.i[b]))){if(a.je!=b||b.Se||!b.isVisible)a.je&&a.$g(a.je),a.je=b,b.D("adBreakComplete",a.rv,a),b.Se&&(a=a.a,a.lk=!0,a.u("command_redirect_controls",a,["play_pause"],void 0),mm(a,["seek","settings"]),a.J().Pd&&mm(a,["audio"]),qm(a));b.show()}};
623 f.dd=function(a){tA.C.dd.call(this,a);var b=parseInt(a.getId(),10),c=1E3*this.a.getCurrentTime();this.Td&&!isNaN(b)&&c>a.start&&(2147483647==a.end||2147483646==a.end)&&(a=this.Td,(b=a.i[b])&&a.je==b&&!b.Se&&b.isVisible&&b.Vk&&b.a instanceof wz&&xz(b.a,google.ima.ViewMode.FULLSCREEN))};
624 f.Ms=function(){Fz(this,"sdk");if(this.ni)return this.ni;var a;if(this.ta.ca){a=new Mw(this.app,2);var b=google.ima.AdDisplayContainer,c=Hm(this.b),d=Km(this.b);a.i||(a.i=Jb(a.g),a.i.addEventListener=v(a.bu,a),a.i.removeEventListener=v(a.cu,a));a=new b(c,void 0,d,a.i)}else{a=this.b.V.J().tb?this.b.V.app.P.b:Lm(this.b);if(!a)return a=Error("AdModule.getVideoElement returned an invalid element."),b=new Cn,b.a(a),b;a=new google.ima.AdDisplayContainer(Hm(this.b),a,Km(this.b))}return this.ni=new google.ima.AdsLoader(a)};
625 function Fz(a,b){var c=b;"nl"==b&&(c=a.xe,c.j++,c=c.j.toString());a.j[c]=w();"bs"!=c&&"fb"!=c||jm(a,a.j,a.i)}f.oe=function(a){this.u(a)};function uA(a){a&&(this.name=va(a.name),this.lb=a.screenId,this.jc=a.loungeToken,this.Cb=a.dialId||"")}f=uA.prototype;f.name="";f.lb="";f.jc="";f.Cb="";f.oq=function(){return{key:this.lb,name:this.name}};f.toString=function(){var a=this.jc?this.jc.slice(-6):"null";return"{name:"+this.name+",screenId:"+this.lb+",loungeToken:..."+a+",dialId:"+this.Cb+"}"};function vA(a){return a?a.toString():"null"}function wA(a){a=a||[];return"["+Ja(a,function(a){return vA(a)}).join(",")+"]"};function xA(a){a&&(this.id=a.id||"",this.name=va(a.name||""),this.activityId=a.activityId||"",this.status=a.status||"UNKNOWN")}f=xA.prototype;f.id="";f.name="";f.activityId="";f.status="UNKNOWN";f.oq=function(){return{key:this.id,name:this.name}};function yA(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+"}"};
626 function zA(a){a=a||[];return"["+Ja(a,function(a){return a?a.toString():"null"}).join(",")+"]"};function AA(){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 BA(a,b){return Na(a,function(a){return a.key==b})}function CA(a){return Ja(a,function(a){return a.oq()})}function DA(a){return Ja(a,function(a){return yA(a)})}function EA(a){return Ja(a,function(a){return new xA(a)})}function FA(a,b){return a||b?a&&b?a.id==b.id&&a.name==b.name:!1:!0}
627 function GA(a,b){return Na(a,function(a){return a.id==b})}function HA(a){return Ja(a,function(a){return{name:a.name,screenId:a.lb,loungeToken:a.jc,dialId:a.Cb}})}function IA(a){return Ja(a,function(a){return new uA(a)})}function JA(a,b){return a||b?a&&b?a.lb==b.lb:!1:!0}function KA(a,b){return a||b?a&&b?a.lb==b.lb&&a.jc==b.jc&&a.name==b.name&&a.Cb==b.Cb:!1:!0}function LA(a,b){return Na(a,function(a){return JA(a,b)})}function MA(a,b){return Na(a,function(a){return b==a.lb||b==a.Cb})};function NA(){var a=OA(),b=PA();A(a,b);QA()&&ib(a,b);a=RA(a);Ra(a)?Uq.remove("remote_sid","/","youtube.com"):(a=a.join(","),Uq.set("remote_sid",a,void 0,"/","youtube.com"))}function OA(){var a=bh("yt-remote-connected-devices")||[];db(a);return a}function RA(a){if(Ra(a))return[];var b=a[0].indexOf("#"),c=-1==b?a[0]:a[0].substring(0,b);return Ja(a,function(a,b){return 0==b?a:a.substring(c.length)})}function SA(a){Zg("yt-remote-connected-devices",a,86400)}
628 function PA(){if(TA)return TA;var a=bh("yt-remote-device-id");a||(a=AA(),Zg("yt-remote-device-id",a,31536E3));for(var b=OA(),c=1,d=a;A(b,d);)c++,d=a+"#"+c;return TA=d}function UA(){return bh("yt-remote-session-browser-channel")}function QA(){return bh("yt-remote-session-screen-id")}
629 function VA(a){5<a.length&&(a=a.slice(a.length-5));var b=Ja(WA(),function(a){return a.loungeToken}),c=Ja(a,function(a){return a.loungeToken});La(c,function(a){return!A(b,a)})&&Zg("yt-remote-lounge-token-expiration",!0,86400);Zg("yt-remote-local-screens",a,31536E3)}function WA(){return bh("yt-remote-local-screens")||[]}function XA(){return bh("yt-remote-online-screens")||[]}function YA(a){Zg("yt-remote-online-dial-devices",a,30)}function ZA(){return bh("yt-remote-online-dial-devices")||[]}
630 function $A(a,b){a?Zg("yt-remote-session-video-id",a):ch("yt-remote-session-video-id");b?Zg("yt-remote-session-list-id",b):ch("yt-remote-session-list-id")}function aB(a){a||(ch("yt-remote-session-screen-id"),ch("yt-remote-session-video-id"),ch("yt-remote-session-list-id"));NA();a=OA();Ua(a,PA());SA(a)}var TA="";function bB(){var a=IA(XA()),b=EA(ZA()),b=Ia(b,function(b){return!MA(a,b.id)});return CA(Xa(a,b))};function cB(a){return dB(a||arguments.callee.caller,[])}
631 function dB(a,b){var c=[];if(A(b,a))c.push("[...circular reference...]");else if(a&&50>b.length){c.push(eB(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=eB(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(dB(a.caller,b))}catch(h){c.push("[exception trying to get caller]\n")}}else a?
632 c.push("[...long stack...]"):c.push("[end]");return c.join("")}function eB(a){if(fB[a])return fB[a];a=String(a);if(!fB[a]){var b=/function ([^\(]+)/.exec(a);fB[a]=b?b[1]:"[Anonymous]"}return fB[a]}var fB={};function gB(a,b,c,d,e){this.reset(a,b,c,d,e)}gB.prototype.b=null;gB.prototype.a=null;var hB=0;gB.prototype.reset=function(a,b,c,d,e){"number"==typeof e||hB++;this.i=d||w();this.j=a;this.k=b;this.g=c;delete this.b;delete this.a};gB.prototype.getMessage=function(){return this.k};function iB(a){this.b=a}iB.prototype.a=null;function jB(a,b){this.name=a;this.value=b}jB.prototype.toString=function(){return this.name};var kB=new jB("SHOUT",1200),lB=new jB("SEVERE",1E3),mB=new jB("WARNING",900),nB=new jB("INFO",800);f=iB.prototype;f.ov=function(){};f.qv=function(){return!1};f.getChildren=function(){this.a||(this.a={});return this.a};f.log=function(){};
633 f.pv=function(a,b,c){var d=new gB(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.Gy||"Not available"}catch(r){m="Not available",s=!0}try{p=c.fileName||c.filename||c.sourceURL||l.$googDebugFname||k}catch(x){p="Not available",s=!0}h=!s&&c.lineNumber&&c.fileName&&c.stack&&c.message&&c.name?c:{message:c.message||
634 "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(cB(g)+"-> ")}catch(M){e="Exception trying to expose exception! You win, we lose. "+M}d.a=e}return d};f.info=function(){};var oB={},pB=null;function qB(){pB||(pB=new iB(""),oB[""]=pB)}
635 function rB(a){qB();var b;if(!(b=oB[a])){b=new iB(a);var c=a.lastIndexOf("."),d=a.substr(c+1);rB(a.substr(0,c)).getChildren()[d]=b;oB[a]=b}return b};function sB(){this.a=w()}var tB=new sB;sB.prototype.set=function(a){this.a=a};sB.prototype.reset=function(){this.set(w())};sB.prototype.get=function(){return this.a};function uB(a){this.g=a||"";this.i=tB}uB.prototype.b=!0;uB.prototype.a=!1;function vB(a){return 10>a?"0"+a:String(a)}function wB(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 xB(a){uB.call(this,a)}y(xB,uB);
636 function yB(a,b){var c=[];c.push(a.g," ");if(a.b){var d=new Date(b.i);c.push("[",vB(d.getFullYear()-2E3)+vB(d.getMonth()+1)+vB(d.getDate())+" "+vB(d.getHours())+":"+vB(d.getMinutes())+":"+vB(d.getSeconds())+"."+vB(Math.floor(d.getMilliseconds()/10)),"] ")}c.push("[",wB(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 zB(a,b){this.b=new ob(a);this.a=b?lb:kb}zB.prototype.stringify=function(a){return nb(this.b,a)};zB.prototype.parse=function(a){return this.a(a)};function AB(){};function BB(){}BB.prototype.a=null;var CB;function DB(){}y(DB,BB);function EB(a){return(a=FB(a))?new ActiveXObject(a):new XMLHttpRequest}function GB(a){var b={};FB(a)&&(b[0]=!0,b[1]=!0);return b}
637 function FB(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}CB=new DB;function HB(a,b,c,d,e){this.b=a;this.a=b;this.j=c;this.g=d;this.i=e||1;this.oc=45E3;this.o=new tq(this);this.k=new Uh;Vh(this.k,250)}f=HB.prototype;f.Be=null;f.yc=!1;f.Qf=null;f.nl=null;f.xg=null;f.Mf=null;f.Xd=null;f.Jb=null;f.$d=null;f.Qa=null;f.Og=0;f.Ac=null;f.Bf=null;f.He=null;f.vg=-1;f.Bn=!0;f.Ke=!1;f.gk=0;f.ci=null;
638 function IB(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 JB={},KB={};f=HB.prototype;f.setTimeout=function(a){this.oc=a};function LB(a,b,c){a.Mf=1;a.Xd=Ge(b.clone());a.$d=c;a.G=!0;MB(a,null)}function NB(a,b,c,d,e){a.Mf=1;a.Xd=Ge(b.clone());a.$d=null;a.G=c;e&&(a.Bn=!1);MB(a,d)}
639 function MB(a,b){a.xg=w();OB(a);a.Jb=a.Xd.clone();Ee(a.Jb,"t",a.i);a.Og=0;a.Qa=a.b.yk(a.b.mi()?b:null);0<a.gk&&(a.ci=new zr(v(a.Hn,a,a.Qa),a.gk));a.o.listen(a.Qa,"readystatechange",a.Zt);var c=a.Be?Jb(a.Be):{};a.$d?(a.Bf="POST",c["Content-Type"]="application/x-www-form-urlencoded",a.Qa.send(a.Jb,a.Bf,a.$d,c)):(a.Bf="GET",a.Bn&&!bc&&(c.Connection="close"),a.Qa.send(a.Jb,a.Bf,null,c));a.b.wc(1);var d=a.$d;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=
640 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.Bf+"\n"+a.Jb+"\n"+c)}f.Zt=function(a){a=a.target;var b=this.ci;b&&3==PB(a)?(this.a.debug("Throttling readystatechange."),Ar(b)):this.Hn(a)};
641 f.Hn=function(a){try{if(a==this.Qa)t:{var b=PB(this.Qa),c=this.Qa.i,d=QB(this.Qa);if(D&&!qc(10)||bc&&!pc("420+")){if(4>b)break t}else if(3>b||3==b&&!$b&&!RB(this.Qa))break t;this.Ke||4!=b||7==c||(8==c||0>=d?this.b.wc(3):this.b.wc(2));SB(this);var e=QB(this.Qa);this.vg=e;var g=RB(this.Qa);g||this.a.debug("No response text for uri "+this.Jb+" status "+e);this.yc=200==e;this.a.info("XMLHTTP RESP ("+this.g+") [ attempt "+this.i+"]: "+this.Bf+"\n"+this.Jb+"\n"+b+" "+e);this.yc?(4==b&&TB(this),this.G?(UB(this,
642 b,g),$b&&this.yc&&3==b&&(this.o.listen(this.k,"tick",this.Ft),this.k.start())):(VB(this.a,this.g,g,null),WB(this,g)),this.yc&&!this.Ke&&(4==b?this.b.$h(this):(this.yc=!1,OB(this)))):(this.He=400==e&&0<g.indexOf("Unknown SID")?3:0,XB(),TB(this),YB(this))}}catch(h){this.a.debug("Failed call to OnXmlHttpReadyStateChanged_"),this.Qa&&RB(this.Qa)&&RB(this.Qa)}finally{}};
643 function UB(a,b,c){for(var d=!0;!a.Ke&&a.Og<c.length;){var e=ZB(a,c);if(e==KB){4==b&&(a.He=4,XB(),d=!1);VB(a.a,a.g,null,"[Incomplete Response]");break}else if(e==JB){a.He=4;XB();VB(a.a,a.g,c,"[Invalid Chunk]");d=!1;break}else VB(a.a,a.g,e,null),WB(a,e)}4==b&&0==c.length&&(a.He=1,XB(),d=!1);a.yc=a.yc&&d;d||(VB(a.a,a.g,c,"[Invalid Chunked Response]"),TB(a),YB(a))}f.Ft=function(){var a=PB(this.Qa),b=RB(this.Qa);this.Og<b.length&&(SB(this),UB(this,a,b),this.yc&&4!=a&&OB(this))};
644 function ZB(a,b){var c=a.Og,d=b.indexOf("\n",c);if(-1==d)return KB;c=Number(b.substring(c,d));if(isNaN(c))return JB;d+=1;if(d+c>b.length)return KB;var e=b.substr(d,c);a.Og=d+c;return e}
645 function $B(a,b){a.xg=w();OB(a);var c=b?window.location.hostname:"";a.Jb=a.Xd.clone();De(a.Jb,"DOMAIN",c);De(a.Jb,"t",a.i);try{a.Ac=new ActiveXObject("htmlfile")}catch(d){TB(a);a.He=7;XB();YB(a);return}var e="<html><body>";b&&(e+='<script>document.domain="'+c+'"\x3c/script>');e+="</body></html>";a.Ac.open();a.Ac.write(e);a.Ac.close();a.Ac.parentWindow.m=v(a.gu,a);a.Ac.parentWindow.d=v(a.On,a,!0);a.Ac.parentWindow.rpcClose=v(a.On,a,!1);c=a.Ac.createElement("div");a.Ac.parentWindow.document.body.appendChild(c);
646 c.innerHTML='<iframe src="'+a.Jb+'"></iframe>';a.a.info("TRIDENT REQ ("+a.g+") [ attempt "+a.i+"]: GET\n"+a.Jb);a.b.wc(1)}f.gu=function(a){aC(v(this.zy,this,a),0)};f.zy=function(a){if(!this.Ke){var b=this.a;b.info("TRIDENT TEXT ("+this.g+"): "+bC(b,a));SB(this);WB(this,a);OB(this)}};f.On=function(a){aC(v(this.yy,this,a),0)};f.yy=function(a){this.Ke||(this.a.info("TRIDENT TEXT ("+this.g+"): "+a?"success":"failure"),TB(this),this.yc=a,this.b.$h(this),this.b.wc(4))};f.cancel=function(){this.Ke=!0;TB(this)};
647 function OB(a){a.nl=w()+a.oc;cC(a,a.oc)}function cC(a,b){if(null!=a.Qf)throw Error("WatchDog timer not null");a.Qf=aC(v(a.cy,a),b)}function SB(a){a.Qf&&(l.clearTimeout(a.Qf),a.Qf=null)}f.cy=function(){this.Qf=null;var a=w();0<=a-this.nl?(this.a.info("TIMEOUT: "+this.Jb),2!=this.Mf&&this.b.wc(3),TB(this),this.He=2,XB(),YB(this)):cC(this,this.nl-a)};function YB(a){a.b.xc()||a.Ke||a.b.$h(a)}
648 function TB(a){SB(a);Nf(a.ci);a.ci=null;a.k.stop();a.o.removeAll();if(a.Qa){var b=a.Qa;a.Qa=null;b.abort();b.dispose()}a.Ac&&(a.Ac=null)}function WB(a,b){try{a.b.Ap(a,b),a.b.wc(4)}catch(c){}};function dC(){}function VB(a,b,c,d){a.info("XMLHTTP TEXT ("+b+"): "+bC(a,c)+(d?" "+d:""))}dC.prototype.debug=function(a){this.info(a)};dC.prototype.info=function(){};
649 function bC(a,b){if(!b||"y2f%"==b)return b;try{var c=lb(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 mb(c)}catch(m){return a.debug("Exception parsing expected JS array - probably was not JS"),b}};function eC(a,b,c,d,e){(new dC).debug("TestLoadImageWithRetries: "+e);if(0==d)c(!1);else{var g=e||0;d--;fC(a,b,function(e){e?c(!0):l.setTimeout(function(){eC(a,b,c,d,g)},g)})}}
650 function fC(a,b,c){var d=new dC;d.debug("TestLoadImage: loading "+a);var e=new Image;e.onload=function(){try{d.debug("TestLoadImage: loaded"),gC(e),c(!0)}catch(a){}};e.onerror=function(){try{d.debug("TestLoadImage: error"),gC(e),c(!1)}catch(a){}};e.onabort=function(){try{d.debug("TestLoadImage: abort"),gC(e),c(!1)}catch(a){}};e.ontimeout=function(){try{d.debug("TestLoadImage: timeout"),gC(e),c(!1)}catch(a){}};l.setTimeout(function(){if(e.ontimeout)e.ontimeout()},b);e.src=a}
651 function gC(a){a.onload=null;a.onerror=null;a.onabort=null;a.ontimeout=null};function hC(a,b){this.a=a;this.b=b;this.g=new zB(null,!0)}f=hC.prototype;f.Hk=null;f.Nb=null;f.Ei=!1;f.lo=null;f.Di=null;f.Yk=null;f.dl=null;f.Pb=null;f.Ve=-1;f.bh=null;f.fh=null;f.connect=function(a){this.dl=a;a=iC(this.a,this.dl);XB();this.lo=w();var b=this.a.A;null!=b?(this.bh=b[0],(this.fh=b[1])?(this.Pb=1,jC(this)):(this.Pb=2,kC(this))):(Ee(a,"MODE","init"),this.Nb=new HB(this,this.b,void 0,void 0,void 0),this.Nb.Be=this.Hk,NB(this.Nb,a,!1,null,!0),this.Pb=0)};
652 function jC(a){var b=lC(a.a,a.fh,"/mail/images/cleardot.gif");Ge(b);eC(b.toString(),5E3,v(a.Nv,a),3,2E3);a.wc(1)}f.Nv=function(a){if(a)this.Pb=2,kC(this);else{XB();var b=this.a;b.a.debug("Test Connection Blocked");b.xd=b.le.Ve;mC(b,9)}a&&this.wc(2)};
653 function kC(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"),XB(),b?(XB(),nC(a.a,a,!1)):(XB(),nC(a.a,a,!0));else if(a.Nb=new HB(a,a.b,void 0,void 0,void 0),a.Nb.Be=a.Hk,b=oC(a.a,a.bh,a.dl),XB(),!D||qc(10))Ee(b,"TYPE","xmlhttp"),NB(a.Nb,b,!1,a.bh,!1);else{Ee(b,"TYPE","html");var c=a.Nb;a=Boolean(a.bh);c.Mf=3;c.Xd=Ge(b.clone());$B(c,a)}}f.yk=function(a){return this.a.yk(a)};
654 f.abort=function(){this.Nb&&(this.Nb.cancel(),this.Nb=null);this.Ve=-1};f.xc=function(){return!1};
655 f.Ap=function(a,b){this.Ve=a.vg;if(0==this.Pb)if(this.b.debug("TestConnection: Got data for stage 1"),b){try{var c=this.g.parse(b)}catch(d){pC(this.a,this);return}this.bh=c[0];this.fh=c[1]}else this.b.debug("TestConnection: Null responseText"),pC(this.a,this);else if(2==this.Pb)if(this.Ei)XB(),this.Yk=w();else if("11111"==b){if(XB(),this.Ei=!0,this.Di=w(),c=this.Di-this.lo,!D||qc(10)||500>c)this.Ve=200,this.Nb.cancel(),this.b.debug("Test connection succeeded; using streaming connection"),XB(),nC(this.a,
656 this,!0)}else XB(),this.Di=this.Yk=w(),this.Ei=!1};
657 f.$h=function(){this.Ve=this.Nb.vg;if(!this.Nb.yc)this.b.debug("TestConnection: request failed, in state "+this.Pb),0==this.Pb?XB():2==this.Pb&&XB(),pC(this.a,this);else if(0==this.Pb)this.b.debug("TestConnection: request complete for initial check"),this.fh?(this.Pb=1,jC(this)):(this.Pb=2,kC(this));else if(2==this.Pb){this.b.debug("TestConnection: request complete for stage 2");var a=!1;(a=!D||qc(10)?this.Ei:200>this.Yk-this.Di?!1:!0)?(this.b.debug("Test connection succeeded; using streaming connection"),XB(),
658 nC(this.a,this,!0)):(this.b.debug("Test connection failed; not using streaming"),XB(),nC(this.a,this,!1))}};f.mi=function(){return this.a.mi()};f.wc=function(a){this.a.wc(a)};function qC(a){Rh.call(this);this.headers=new Ud;this.j=a||null;this.b=!1;this.I=this.a=null;this.O=this.A="";this.i=0;this.k="";this.g=this.N=this.G=this.K=!1;this.o=0;this.B=null;this.R="";this.H=this.S=!1}y(qC,Rh);var rC=/^https?$/i,sC=["POST","PUT"];f=qC.prototype;
659 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?EB(this.j):EB(CB);this.I=this.j?this.j.a||(this.j.a=GB(this.j)):CB.a||(CB.a=GB(CB));this.a.onreadystatechange=v(this.$m,this);try{AB(tC(this,"Opening Xhr")),this.N=!0,this.a.open(b,a,!0),this.N=!1}catch(e){AB(tC(this,"Error opening Xhr: "+e.message));uC(this,e);return}a=c||"";
660 var g=this.headers.clone();d&&Zd(d,function(a,b){g.set(b,a)});d=Na(g.nc(),vC);c=l.FormData&&a instanceof l.FormData;!A(sC,b)||d||c||g.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");Zd(g,function(a,b){this.a.setRequestHeader(b,a)},this);this.R&&(this.a.responseType=this.R);"withCredentials"in this.a&&(this.a.withCredentials=this.S);try{wC(this),0<this.o&&(this.H=D&&pc(9)&&ga(this.a.timeout)&&q(this.a.ontimeout),AB(tC(this,"Will abort after "+this.o+"ms if incomplete, xhr2 "+
661 this.H)),this.H?(this.a.timeout=this.o,this.a.ontimeout=v(this.oc,this)):this.B=Wh(this.oc,this.o,this)),AB(tC(this,"Sending request")),this.G=!0,this.a.send(a),this.G=!1}catch(h){AB(tC(this,"Send error: "+h.message)),uC(this,h)}};function vC(a){return"content-type"==a.toLowerCase()}f.oc=function(){"undefined"!=typeof aa&&this.a&&(this.k="Timed out after "+this.o+"ms, aborting",this.i=8,tC(this,this.k),Sh(this,"timeout"),this.abort(8))};
662 function uC(a,b){a.b=!1;a.a&&(a.g=!0,a.a.abort(),a.g=!1);a.k=b;a.i=5;yC(a);zC(a)}function yC(a){a.K||(a.K=!0,Sh(a,"complete"),Sh(a,"error"))}f.abort=function(a){this.a&&this.b&&(tC(this,"Aborting"),this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.i=a||7,Sh(this,"complete"),Sh(this,"abort"),zC(this))};f.F=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),zC(this,!0));qC.C.F.call(this)};f.$m=function(){this.ha()||(this.N||this.G||this.g?AC(this):this.Gw())};f.Gw=function(){AC(this)};
663 function AC(a){if(a.b&&"undefined"!=typeof aa)if(a.I[1]&&4==PB(a)&&2==QB(a))tC(a,"Local request error detected and ignored");else if(a.G&&4==PB(a))Wh(a.$m,0,a);else if(Sh(a,"readystatechange"),4==PB(a)){tC(a,"Request complete");a.b=!1;try{var b=QB(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=be(String(a.A))[1]||null;if(!g&&self.location)var h=self.location.protocol,g=h.substr(0,h.length-1);e=!rC.test(g?
664 g.toLowerCase():"")}c=e}if(c)Sh(a,"complete"),Sh(a,"success");else{a.i=6;var k;try{k=2<PB(a)?a.a.statusText:""}catch(m){k=""}a.k=k+" ["+QB(a)+"]";yC(a)}}finally{zC(a)}}}function zC(a,b){if(a.a){wC(a);var c=a.a,d=a.I[0]?ba:null;a.a=null;a.I=null;b||Sh(a,"ready");try{c.onreadystatechange=d}catch(e){}}}function wC(a){a.a&&a.H&&(a.a.ontimeout=null);ga(a.B)&&(l.clearTimeout(a.B),a.B=null)}function PB(a){return a.a?a.a.readyState:0}function QB(a){try{return 2<PB(a)?a.a.status:-1}catch(b){return-1}}
665 function RB(a){try{return a.a?a.a.responseText:""}catch(b){return""}}function tC(a,b){return b+" ["+a.O+" "+a.A+" "+QB(a)+"]"};function BC(a,b,c){this.G=a||null;this.b=1;this.g=[];this.i=[];this.a=new dC;this.k=new zB(null,!0);this.A=b||null;this.B=null!=c?c:null}function CC(a,b){this.a=a;this.map=b;this.X=null}f=BC.prototype;f.jh=null;f.zb=null;f.Ka=null;f.Ck=null;f.di=null;f.Zn=null;f.vi=null;f.Mg=0;f.Mu=0;f.nb=null;f.ie=null;f.Id=null;f.We=null;f.le=null;f.hi=null;f.xf=-1;f.uo=-1;f.xd=-1;f.Ng=0;f.Kf=0;f.Ge=8;var DC=new Rh;function EC(a){ph.call(this,"statevent",a)}y(EC,ph);
666 function FC(a,b){ph.call(this,"timingevent",a);this.size=b}y(FC,ph);function GC(a){ph.call(this,"serverreachability",a)}y(GC,ph);f=BC.prototype;f.connect=function(a,b,c,d,e){this.a.debug("connect()");XB();this.Ck=b;this.jh=c||{};d&&q(e)&&(this.jh.OSID=d,this.jh.OAID=e);this.a.debug("connectTest_()");this.le=new hC(this,this.a);this.le.Hk=null;this.le.g=this.k;this.le.connect(a)};
667 f.disconnect=function(){this.a.debug("disconnect()");HC(this);if(3==this.b){var a=this.Mg++,b=this.di.clone();De(b,"SID",this.j);De(b,"RID",a);De(b,"TYPE","terminate");IC(this,b);a=new HB(this,this.a,this.j,a,void 0);a.Mf=2;a.Xd=Ge(b.clone());(new Image).src=a.Xd;a.xg=w();OB(a)}JC(this)};function HC(a){a.le&&(a.le.abort(),a.le=null);a.Ka&&(a.Ka.cancel(),a.Ka=null);a.Id&&(l.clearTimeout(a.Id),a.Id=null);KC(a);a.zb&&(a.zb.cancel(),a.zb=null);a.ie&&(l.clearTimeout(a.ie),a.ie=null)}
668 f.xc=function(){return 0==this.b};function LC(a){var b=0;a.Ka&&b++;a.zb&&b++;return b}function MC(a){a.zb||a.ie||(a.ie=aC(v(a.zo,a),0),a.Ng=0)}
669 f.zo=function(a){this.ie=null;this.a.debug("startForwardChannel_");if(1==this.b){if(!a){this.a.debug("open_()");this.Mg=Math.floor(1E5*Math.random());a=this.Mg++;var b=new HB(this,this.a,"",a,void 0);b.Be=null;var c=NC(this),d=this.di.clone();De(d,"RID",a);this.G&&De(d,"CVER",this.G);IC(this,d);LB(b,d,c);this.zb=b;this.b=2}}else 3==this.b&&(a?OC(this,a):0==this.g.length?this.a.debug("startForwardChannel_ returned: nothing to send"):this.zb||(OC(this),this.a.debug("startForwardChannel_ finished, sent request")))};
670 function OC(a,b){var c,d;b?6<a.Ge?(a.g=a.i.concat(a.g),a.i.length=0,c=a.Mg-1,d=NC(a)):(c=b.g,d=b.$d):(c=a.Mg++,d=NC(a));var e=a.di.clone();De(e,"SID",a.j);De(e,"RID",c);De(e,"AID",a.xf);IC(a,e);c=new HB(a,a.a,a.j,c,a.Ng+1);c.Be=null;c.setTimeout(Math.round(1E4)+Math.round(1E4*Math.random()));a.zb=c;LB(c,e,d)}function IC(a,b){if(a.nb){var c=a.nb.bq(a);c&&Zd(c,function(a,c){De(b,c,a)})}}
671 function NC(a){var b=Math.min(a.g.length,1E3),c=["count="+b],d;6<a.Ge&&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.Ge?e:g-d;try{Zd(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 PC(a){a.Ka||a.Id||(a.o=1,a.Id=aC(v(a.ep,a),0),a.Kf=0)}
672 function QC(a){if(a.Ka||a.Id||3<=a.Kf)return!1;a.a.debug("Going to retry GET");a.o++;a.Id=aC(v(a.ep,a),RC(a,a.Kf));a.Kf++;return!0}
673 f.ep=function(){this.Id=null;this.a.debug("Creating new HttpRequest");this.Ka=new HB(this,this.a,this.j,"rpc",this.o);this.Ka.Be=null;this.Ka.gk=0;var a=this.Zn.clone();De(a,"RID","rpc");De(a,"SID",this.j);De(a,"CI",this.hi?"0":"1");De(a,"AID",this.xf);IC(this,a);if(!D||qc(10))De(a,"TYPE","xmlhttp"),NB(this.Ka,a,!0,this.vi,!1);else{De(a,"TYPE","html");var b=this.Ka,c=Boolean(this.vi);b.Mf=3;b.Xd=Ge(a.clone());$B(b,c)}this.a.debug("New Request created")};
674 function nC(a,b,c){a.a.debug("Test Connection Finished");a.hi=c;a.xd=b.Ve;a.a.debug("connectChannel_()");a.Kv(1,0);a.di=iC(a,a.Ck);MC(a)}function pC(a,b){a.a.debug("Test Connection Failed");a.xd=b.Ve;mC(a,2)}
675 f.Ap=function(a,b){if(0!=this.b&&(this.Ka==a||this.zb==a))if(this.xd=a.vg,this.zb==a&&3==this.b)if(7<this.Ge){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.Id)this.a.debug("But we are currently starting the request.");else{if(this.Ka)if(this.Ka.xg+3E3<this.zb.xg)KC(this),this.Ka.cancel(),this.Ka=null;else break t;QC(this);XB()}else this.uo=e[1],c=this.uo-this.xf,0<c&&(e=e[2],this.a.debug(e+" bytes (in "+
676 c+" arrays) are outstanding on the BackChannel"),37500>e&&this.hi&&0==this.Kf&&!this.We&&(this.We=aC(v(this.Ju,this),6E3)))}else this.a.debug("Bad POST response data returned"),mC(this,11)}else"y2f%"!=b&&(this.a.debug("Bad data returned - missing/invald magic cookie"),mC(this,11));else if(this.Ka==a&&KC(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.vi=g[2],g=g[3],null!=g?this.Ge=g:this.Ge=6,this.b=3,
677 this.nb&&this.nb.to(this),this.Zn=oC(this,this.vi,this.Ck),PC(this)):"stop"==g[0]&&mC(this,7):3==this.b&&("stop"==g[0]?mC(this,7):"noop"!=g[0]&&this.nb&&this.nb.ro(this,g),this.Kf=0)}};f.Ju=function(){null!=this.We&&(this.We=null,this.Ka.cancel(),this.Ka=null,QC(this),XB())};function KC(a){null!=a.We&&(l.clearTimeout(a.We),a.We=null)}
678 f.$h=function(a){this.a.debug("Request complete");var b;if(this.Ka==a)KC(this),this.Ka=null,b=2;else if(this.zb==a)this.zb=null,b=1;else return;this.xd=a.vg;if(0!=this.b)if(a.yc)1==b?(w(),Sh(DC,new FC(DC,a.$d?a.$d.length:0)),MC(this),this.i.length=0):PC(this);else{var c=a.He;if(3==c||7==c||0==c&&0<this.xd)this.a.debug("Not retrying due to error type");else{this.a.debug("Maybe retrying, last error: "+IB(c,this.xd));var d;if(d=1==b)this.zb||this.ie?d=!1:1==this.b||2<=this.Ng?d=!1:(this.a.debug("Going to retry POST"),
679 this.ie=aC(v(this.zo,this,a),RC(this,this.Ng)),this.Ng++,d=!0);if(d||2==b&&QC(this))return;this.a.debug("Exceeded max number of retries")}this.a.debug("Error: HTTP request failed");switch(c){case 1:mC(this,5);break;case 4:mC(this,10);break;case 3:mC(this,6);break;case 7:mC(this,12);break;default:mC(this,2)}}};function RC(a,b){var c=5E3+Math.floor(1E4*Math.random());a.nb||(a.a.debug("Inactive channel"),c*=2);return c*b}
680 f.Kv=function(a){if(!A(arguments,this.b))throw Error("Unexpected channel state: "+this.b);};function mC(a,b){a.a.info("Error code "+b);if(2==b||9==b){var c=null;a.nb&&(c=null);var d=v(a.Ov,a);c||(c=new pe("//www.google.com/images/cleardot.gif"),Ge(c));fC(c.toString(),1E4,d)}else XB();SC(a,b)}f.Ov=function(a){a?(this.a.info("Successfully pinged google.com"),XB()):(this.a.info("Failed to ping google.com"),XB(),SC(this,8))};
681 function SC(a,b){a.a.debug("HttpChannel: error - "+b);a.b=0;a.nb&&a.nb.Wo(a,b);JC(a);HC(a)}function JC(a){a.b=0;a.xd=-1;if(a.nb)if(0==a.i.length&&0==a.g.length)a.nb.Kk(a);else{a.a.debug("Number of undelivered maps, pending: "+a.i.length+", outgoing: "+a.g.length);var b=Ya(a.i),c=Ya(a.g);a.i.length=0;a.g.length=0;a.nb.Kk(a,b,c)}}function iC(a,b){var c=lC(a,null,b);a.a.debug("GetForwardChannelUri: "+c);return c}function oC(a,b,c){b=lC(a,a.mi()?b:null,c);a.a.debug("GetBackChannelUri: "+b);return b}
682 function lC(a,b,c){var d=He(c);if(""!=d.Oe)b&&re(d,b+"."+d.Oe),se(d,d.oh);else var e=window.location,d=Ie(e.protocol,b?b+"."+e.hostname:e.hostname,e.port,c);a.jh&&Zd(a.jh,function(a,b){De(d,b,a)});De(d,"VER",a.Ge);IC(a,d);return d}f.yk=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new qC;a.S=!1;return a};function aC(a,b){if(!ha(a))throw Error("Fn must not be null and must be a function");return l.setTimeout(function(){a()},b)}f.wc=function(){Sh(DC,new GC(DC))};
683 function XB(){Sh(DC,new EC(DC))}f.mi=function(){return!(!D||qc(10))};function TC(){}f=TC.prototype;f.to=function(){};f.ro=function(){};f.Wo=function(){};f.Kk=function(){};f.bq=function(){return{}};function UC(){v(this.i,this);this.a=new xB;this.a.b=!1;this.b=this.a.a=!1;this.g="";this.j={}}function VC(){var a=WC;!0!=a.b&&(qB(),a.b=!0)}UC.prototype.i=function(a){if(!this.j[a.g]){var b=yB(this.a,a),c=XC;if(c)switch(a.j){case kB:YC(c,"info",b);break;case lB:YC(c,"error",b);break;case mB:YC(c,"warn",b);break;default:YC(c,"debug",b)}else window.opera?window.opera.postError(b):this.g+=b}};var WC=null,XC=window.console;function YC(a,b,c){if(a[b])a[b](c);else a.log(c)};var ZC=null,$C=null,aD=Array(50),bD=-1,cD=!1;function dD(a){var b=(bD+1)%50;bD=b;aD[b]=a;cD||(cD=49==b)}function eD(a){var b=aD;if(b[0]){var c=bD,d=cD?c:-1;do{var d=(d+1)%50,e=b[d];z(a,function(a){a(e)})}while(d!=c);aD=Array(50);bD=-1;cD=!1}}function fD(a,b){var c=n("yt.remote.debug.logger_"),d=n("yt.remote.debug.handlers_");if(c){if(c.log(nB,a+": "+b,void 0),d&&!Ra(d)){eD(d);var e=c.getLogRecord(nB,a+": "+b,void 0);z(d,function(a){a(e)})}}else d&&!Ra(d)||dD(new gB(nB,String(b),"yt.remote"))};function gD(a){fD("CAST",a)}function hD(a){var b=iD();b&&b.logMessage&&(a=yB(jD,a),b.logMessage(a))}
684 function kD(){if(!lD){Ra(mD)&&Za(mD,ZA());var a;"cast"in window?(a=window.cast||{},a="ActivityStatus"in a&&"Api"in a&&"LaunchRequest"in a&&"Receiver"in a):a=!1;if(a){if(a=iD())a.removeReceiverListener("YouTube",nD),a.addReceiverListener("YouTube",nD),gD("API initialized in the other binary");else{a=new cast.Api;qa("yt.remote.castapi.api_",a);a.addReceiverListener("YouTube",nD);jD=new xB;jD.b=!1;jD.a=!1;a=n("yt.remote.debug.logger_");var b=n("yt.remote.debug.handlers_");a&&b||(WC||(WC=new UC),-1!=
685 window.location.href.indexOf("Debug=true")&&VC(),VC(),WC.a.a=!0,ZC=n("yt.remote.debug.logger_")||rB("yt.remote"),iB.prototype.log=iB.prototype.log,iB.prototype.getLogRecord=iB.prototype.pv,iB.prototype.addHandler=iB.prototype.ov,iB.prototype.removeHandler=iB.prototype.qv,qa("yt.remote.debug.logger_",ZC),$C=n("yt.remote.debug.handlers_")||[],qa("yt.remote.debug.handlers_",$C),n("yt.remote.debug.logger_"),b=n("yt.remote.debug.handlers_"));b&&(b.push(hD),eD(b));gD("API initialized")}lD=!0}}}
686 function oD(a){var b=Oa(mD,function(b){return b.id==a.id});0<=b&&(mD[b]=yA(a))}function nD(a){gD("Updating receivers: "+mb(a));pD(a);ar("yt-remote-cast-device-list-update",qD());z(qD(),function(a){rD(a.id)});z(a,function(a){a.isTabProjected&&(a=sD(a.id),gD("Detected device: "+a.id+" is tab projected. Firing DEVICE_TAB_PROJECTED event."),ar("yt-remote-cast-device-tab-projected",a))})}
687 function tD(a,b){gD("Updating "+a+" activity status: "+mb(b));var c=sD(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=""),oD(c),ar("yt-remote-cast-device-status-update",c)):gD("Device not found")}function qD(){kD();return EA(mD)}
688 function pD(a){a=Ja(a,function(a){var c={id:a.id,name:a.name};if(a=sD(a.id))c.activityId=a.activityId,c.status=a.status;return c});Sa(mD);Za(mD,a)}function sD(a){var b=qD();return Na(b,function(b){return b.id==a})||null}function rD(a){var b=sD(a),c=iD();c&&b&&b.activityId&&c.getActivityStatus(b.activityId,function(b){"error"==b.status&&(b.status="stopped");tD(a,b)})}
689 function uD(a){kD();var b=sD(a),c=iD();c&&b&&b.activityId?(gD("Stopping cast activity"),c.stopActivity(b.activityId,oa(tD,a))):gD("Dropping cast activity stop")}function iD(){return n("yt.remote.castapi.api_")}var jD=null,lD=!1,mD=n("yt.remote.castapi.devices_")||[];qa("yt.remote.castapi.devices_",mD);function vD(a){a&&(this.id=a.id||a.name,this.name=a.name,this.app=a.app,this.type=a.type||"REMOTE_CONTROL",this.Cp=a.user||"")}f=vD.prototype;f.id="";f.name="";f.app="";f.type="REMOTE_CONTROL";f.Cp="";f.equals=function(a){return a?this.id==a.id:!1};function wD(a,b){this.action=a;this.params=b||null};function xD(a,b){Uh.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;Gh(this,"tick",v(this.k,this));this.stop();Vh(this,5E3+2E4*Math.random())}y(xD,Uh);xD.prototype.j=0;xD.prototype.k=function(){if(500<this.a){var a=this.a;24E4>2*a&&(a*=2);Vh(this,a)}this.o()};xD.prototype.start=function(){xD.C.start.call(this);this.j=w()+this.a};xD.prototype.stop=function(){this.j=0;xD.C.stop.call(this)};function yD(a,b){this.k=a;this.j=b;this.g=new kh;this.b=new xD(this.fu,this);this.a=null}y(yD,TC);f=yD.prototype;f.Yh="";f.Sg=0;f.Fi=0;f.debug=function(){};f.D=function(a,b,c){return this.g.D(a,b,c)};f.W=function(a,b,c){return this.g.W(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)};
690 f.connect=function(a,b,c){if(!this.a||2!=this.a.b){this.Yh="";this.b.stop();this.i=a||null;this.Sg=b||0;a=this.k+"/test";b=this.k+"/bind";var d=new BC("1",c?c.firstTestResults:null,c?c.secondTestResults:null),e=this.a;e&&(e.nb=null);d.nb=this;this.a=d;e?(3!=e.b&&0==LC(e)||this.debug("BrowserChannelServices.Channel: unexpected reconnect state: "+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)}};
691 f.disconnect=function(a){this.Fi=a||0;this.b.stop();this.a&&0!=this.a.b&&this.a.disconnect();this.Fi=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.debug("Ignoring message: "+a);else{var c={_sc:a};b&&Mb(c,b);this.debug("Sending message: "+mb(c));var d=this.a;if(0==d.b)throw Error("Invalid operation: sending map when state is closed");1E3==d.g.length&&mb(c);d.g.push(new CC(d.Mu++,c));2!=d.b&&3!=d.b||MC(d)}};
692 f.to=function(){var a=this.b;a.stop();Vh(a,5E3+2E4*Math.random());this.i=null;this.Sg=0;this.u("handlerOpened")};f.Wo=function(a,b){var c=2==b&&401==this.a.xd;4==b||c||(6==b&&(c=this.b,c.stop(),Vh(c,500)),this.b.start());this.u("handlerError",b)};f.Kk=function(){this.b.Xc||this.u("handlerClosed")};f.bq=function(){var a={v:2};this.Yh&&(a.gsessionid=this.Yh);0!=this.Sg&&(a.ui=""+this.Sg);0!=this.Fi&&(a.ui=""+this.Fi);this.i&&Mb(a,this.i);return a};
693 f.ro=function(a,b){this.debug("Channel received array: "+b);"S"==b[0]?this.Yh=b[1]:this.g.u("handlerMessage",new wD(b[0],b[1]))};function zD(a,b){(a.j.loungeIdToken=b)||a.b.stop()}function AD(a){return a.b.Xc?a.b.j-w():NaN}f.fu=function(){this.b.stop();0!=LC(this.a)?this.b.start():this.connect(this.i,this.Sg)};function BD(){this.xb=[];this.index=-1;CD(this)}function CD(a){a.volume=-1;a.muted=!1;a.b=null;a.a=-1;a.g=null;a.i=0;a.j=w()}function DD(a){return a.xb[a.index]}function ED(a,b){a.i=b;a.j=w()}function FD(a){switch(a.a){case 1:return(w()-a.j)/1E3+a.i;case -1E3:return 0}return a.i}function GD(a,b){var c=a.index;a.index=Ha(a.xb,b);c!=a.index&&CD(a)}function HD(a,b,c){c=c||DD(a);if(gb(a.xb,b)&&c==DD(a))return!1;a.xb=Ya(b);GD(a,c);return!0}
694 BD.prototype.add=function(a,b){return a&&!A(this.xb,a)?(!b||-1<this.index&&this.index>=this.xb.length-1?this.xb.push(a):this.xb.splice(this.index+1,0,a),!0):!1};BD.prototype.remove=function(a){var b=DD(this);return Ua(this.xb,a)?(this.index=Ha(this.xb,b),!0):!1};function ID(){R.call(this);this.Bc=IA(WA());this.log_("Initializing local screens: "+wA(this.Bc));this.g=[];this.wk=null;this.b=[];this.a=[];this.Ai(qD());this.log_("Initializing DIAL devices: "+zA(this.a));var a=IA(XA());JD(this,a);this.log_("Initializing online screens: "+wA(this.b));KD(this)}y(ID,R);var LD=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,1E4,15E3,2E4];f=ID.prototype;f.lh=NaN;f.log_=function(a){fD("RM",a)};
695 function MD(a){var b=navigator.userAgent;if(0<=b.search("MSIE")&&(b=b.match(/MSIE ([\d.]+)/)[1],0>Ba(b,"10.0")))return a;b=be(document.location.href);return $d("https",null,b[3],null,a)}function KD(a){Yq("yt-remote-cast-device-list-update",a.Ai,a);Yq("yt-remote-cast-device-status-update",a.tx,a);Yq("yt-remote-cast-device-tab-projected",function(a){this.u("connectToReceiver",a.id)},a);a.Np();jf(v(a.Np,a),1E4)}
696 f.u=function(a,b){if(this.ha())return!1;this.log_("Firing "+a);return this.G.u.apply(this.G,arguments)};f.Np=function(){var a=qD();Ra(a)||this.Ai(a);a=ND(this);Ra(a)||(bh("yt-remote-lounge-token-expiration")?OD(this,a):PD(this))};f.bl=function(){var a=ND(this),b=Ia(a,function(a){return!!LA(this.b,a)},this);JD(this,b);this.Ai(qD());this.u("managedScreenChange",a)};function QD(a,b){return Ia(b,function(a){return a.Cb?(a=GA(this.a,a.Cb),!!a&&"RUNNING"==a.status):!0},a)}
697 f.Ai=function(a){var b=!1;z(a,function(a){var c=MA(this.Bc,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."),RD(this));YA(DA(a));var c=!gb(this.a,a,FA);c&&this.log_("Updating DIAL devices: "+zA(this.a)+" to "+zA(a));this.a=a;JD(this,this.b);c&&this.u("onlineReceiverChange")};
698 f.tx=function(a){var b=GA(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,YA(DA(this.a)));JD(this,this.b)};function JD(a,b,c){b=QD(a,b);var d=!gb(a.b,b,KA);if(d||c)c=HA(b),Zg("yt-remote-online-screens",c,60);d&&(a.log_("Updating online screens: "+wA(a.b)+" -> "+wA(b)),a.b=b,a.u("onlineReceiverChange"))}
699 function OD(a,b){var c=[],d={};z(b,function(a){a.jc&&(d[a.jc]=a,c.push(a.jc))});var e={method:"POST",Nf:{lounge_token:c.join(",")},X:a,Oa:function(a,b){var c=[];z(b.screens||[],function(a){"online"==a.status&&c.push(d[a.loungeToken])});var e=this.wk?SD(this,this.wk):null;e&&!LA(c,e)&&c.push(e);JD(this,c,!0)}};ej(MD("/api/lounge/pairing/get_screen_availability"),e)}
700 function PD(a){var b=ND(a),c=Ja(b,function(a){return a.lb});Ra(c)||(a.log_("Updating lounge tokens for: "+mb(c)),ej(MD("/api/lounge/pairing/get_lounge_token_batch"),{Nf:{screen_ids:c.join(",")},method:"POST",X:a,Oa:function(a,c){TD(this,c.screens||[]);this.Bc=Ia(this.Bc,function(a){return!!a.jc});RD(this);OD(this,b)}}))}function TD(a,b){z(Xa(a.Bc,a.g),function(a){var d=Na(b,function(b){return a.lb==b.screenId});d&&(a.jc=d.loungeToken)})}
701 function RD(a){var b=IA(WA());gb(a.Bc,b,KA)||(a.log_("Saving local screens: "+wA(b)+" to "+wA(a.Bc)),VA(HA(a.Bc)),a.bl())}function UD(a,b,c){var d=Oa(b,function(a){return JA(c,a)}),e=0>d?!0:!1;0>d?b.push(c):b[d]=c;LA(a.b,c)||a.b.push(c);return e}
702 f.fp=function(a,b,c){var d=!1;b>=LD.length&&(this.log_("Pairing DIAL device "+a+" with "+c+" timed out."),d=!0);var e=GA(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?(VD(this),this.u("screenPair",null)):ej(MD("/api/lounge/pairing/get_screen"),{method:"POST",Nf:{pairing_code:c},X:this,Oa:function(a,b){VD(this);var d=new uA(b.screen);
703 d.name=e.name;d.Cb=e.id;var m=UD(this,this.Bc,d);this.log_("Paired with "+(m?"a new":"an old")+" local screen:"+vA(d));RD(this);this.u("screenPair",d);this.log_("Pairing "+c+" succeeded.");this.u("screenPair",d)},onError:function(){this.log_("Polling pairing code: "+c);I(this.lh);this.lh=H(v(this.fp,this,a,b+1,c),LD[b])}})};
704 function WD(a,b,c,d,e){VD(a);if(GA(a.a,b)){if(!c){var g=c=AA();kD();var h=sD(b),k=iD();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",oD(h),ar("yt-remote-cast-device-status-update",h));gD("Sending a cast launch request with params: "+
705 m.parameters);k.launch(m,oa(tD,b))}else gD("No cast API or no cast device. Dropping cast launch.")}a.lh=H(v(a.fp,a,b,0,c),LD[0])}else a.log_("No DIAL device with id: "+b)}function VD(a){I(a.lh);a.lh=NaN}function SD(a,b){var c=MA(ND(a),b);a.log_("Found screen: "+vA(c)+" with key: "+b);return c}function XD(a,b){var c=MA(a.b,b);a.log_("Found online screen: "+vA(c)+" with key: "+b);return c}
706 function YD(a,b){var c=GA(a.a,b);if(!c){var d=MA(a.Bc,b);d&&(c=GA(a.a,d.Cb))}a.log_("Found DIAL: "+(c?c.toString():"null")+" with key: "+b);return c}function ND(a){return Xa(a.g,Ia(a.Bc,function(a){return!LA(this.g,a)},a))};function ZD(a,b){R.call(this);if($g){var c=$g;Yg(c,c.Pf.Kd(!0))}NA();rB("goog.net.BrowserChannel");this.i=new ID;c=PA();this.g=new yD("/api/lounge/bc",{device:"REMOTE_CONTROL",id:c,name:a,app:b});this.a=null;this.A=[];this.g.D("handlerOpened",this.dv,this);this.g.D("handlerClosed",this.$u,this);this.g.D("handlerError",this.av,this);this.g.D("handlerMessage",this.cv,this);this.i.D("managedScreenChange",this.bl,this);this.log_("Initializing with device id = "+c+", name = "+a+", app = "+b)}y(ZD,R);
707 f=ZD.prototype;f.Wg=NaN;f.Zk=NaN;f.Wi=NaN;f.Xi=NaN;f.log_=function(a){fD("RC",a)};function $D(a){var b=QA();return b?SD(a.i,b):null}function aE(a,b,c){a.W("connectionOpened",b,c);a.W("connectionClosed",b,c);a.W("connectionError",b,c)}function bE(a,b){"connectionError"==b&&ch("yt-remote-session-screen-id");a.log_("Firing "+b);a.u(b,"connectionOpened"==b);a.o=null}
708 function cE(a,b){"playerChange"==b?(I(a.Wi),a.Wi=H(v(function(){this.u("playerChange");this.Wi=NaN},a),2E3)):"playlistChange"==b&&(I(a.Xi),a.Xi=H(v(function(){this.u("playlistChange");this.Xi=NaN},a),2E3))}function dE(a,b){"playerChange"==b&&isNaN(a.Wi)&&a.u("playerChange");"playlistChange"==b&&isNaN(a.Xi)&&a.u("playlistChange")}function eE(a,b){b?(a.log_("Changing current screen id from: "+a.j+" to "+b.lb),a.j=b.lb,zD(a.g,b.jc)):(a.log_("Removing current screen id: "+a.j),a.j="",zD(a.g,""))}
709 function fE(a){return a.j?SD(a.i,a.j):null}f.connect=function(a){this.log_("Connecting to the receiver: "+mb(a));var b=XD(this.i,a.key);b?gE(this,b):(a=YD(this.i,a.key))?hE(this,a):H(v(function(){bE(this,"connectionError")},this),0)};function iE(a){a=a||0;5>=a&&(a=0);return a}
710 function gE(a,b){a.log_("Connecting to screen: "+vA(b));var c=$D(a);c&&!JA(b,c)?a.disconnect():jE(a);a.a=null;eE(a,b);c={};if(a.b){c.videoIds=kE(a.b).join(",");c.videoId=a.b.a.getVideoData().L;c.videoSources=lE(a.b).join(",");var d=a.o?a.o.currentTime:a.b.a.getCurrentTime();c.currentTime=iE(d)}Ib(c)?a.log_("Connecting with empty params"):a.log_("Connecting with setPlaylist and params: "+mb(c));a.b?$A(a.b.a.getVideoData().L,mE(a.b)):$A("","");a.g.connect(Ib(c)?{}:{method:"setPlaylist",params:mb(c)},
711 1,UA());a.a=new BD;Ib(c)||(a.a.xb=c.videoIds.split(","),GD(a.a,c.videoId));nE(a)}function hE(a,b){a.log_("Connecting to DIAL device: "+(b?b.toString():"null"));oE(a);pE(a);var c=a.o?a.o.pairingCode:"";c?WD(a.i,b.id,c):a.b?WD(a.i,b.id,"",a.b.a.getVideoData().L,a.b.a.getCurrentTime()):WD(a.i,b.id,"");a.k=b.id;a.i.D("screenPair",a.Pn,a)}f.Pn=function(a){this.log_("Paired with a DIAL screen: "+vA(a));oE(this);a?gE(this,a):(this.k="",bE(this,"connectionError"))};
712 f.disconnect=function(){this.log_("Disconnecting with user intent.");pE(this);aB();this.g.disconnect(1)};function pE(a){VD(a.i);var b=Na(a.A,function(a){return"REMOTE_CONTROL"==a.type});b?(a.log_("Did not stop DIAL device, because another remote is connected: "+mb(b?{id:b.id,name:b.name,app:b.app,type:b.type,user:b.Cp}:null)),a.k=""):(b=fE(a),a.k?(a.log_("Stopping DIAL device: "+a.k),uD(a.k),a.k=""):b&&b.Cb&&(a.log_("Stopping DIAL device: "+b.Cb),uD(b.Cb)))}
713 function jE(a){a.log_("Disconnecting from screen.");a.g.disconnect(2)}function qE(a,b){var c=fE(a),d=Na(b,function(a){return c&&(a.key==c.lb||a.key==c.Cb)||this.k&&(a=YD(this.i,a.key))&&a.id==this.k?!0:!1},a);a.log_("Found current receiver: "+mb(d)+" in "+mb(b));return d}function rE(a){return sE(a)?a.a:null}function tE(a,b,c){c?a.log_("Sending: action="+b+", params="+mb(c)):a.log_("Sending: action="+b);uE(a)?a.log_("Action = "+b+" was ignored due to reconnecting."):a.g.sendMessage(b,c)}
714 function vE(a,b,c,d){d=iE(d);a.a.add(b,!0)&&tE(a,"insertVideo",{videoId:b,videoSource:c});ED(a.a,d);GD(a.a,b);cE(a,"playlistChange");tE(a,"setVideo",{currentTime:d,videoId:b})}function wE(a,b,c,d,e){e=iE(e);tE(a,"setPlaylist",{videoIds:c.join(","),videoId:b,videoSources:Ja(c,function(){return d}),currentTime:e});ED(a.a,e);HD(a.a,c,b);cE(a,"playlistChange")}
715 function xE(a){var b=bh("yt-remote-session-video-id"),c=bh("yt-remote-session-list-id"),d=a.b.a.getVideoData().L,e=mE(a.b);$A(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=lE(a.b),c=a.b.a.ub(),b=b[c?c.pa:0],c=a.b.a.getCurrentTime(),h?wE(a,d,kE(a.b),b,c):vE(a,d,b,c)):h&&(d=kE(a.b),h=lE(a.b),tE(a,"updatePlaylist",{videoIds:d.join(","),videoSources:h.join(",")}),HD(a.a,d),cE(a,"playlistChange"))}
716 function yE(a){tE(a,"play");ED(a.a,FD(a.a));-1E3!=a.a.a&&(a.a.a=1);cE(a,"playerChange")}f.qo=function(){tE(this,"getNowPlaying")};function sE(a){var b=a.g.a;return!!b&&3==b.b&&!!a.j&&isNaN(a.Wg)}function nE(a){zE(a);a.Wg=H(v(function(){zE(this);eE(this,null);this.k="";this.a=null;this.log_("Connecting timeout");bE(this,"connectionError");aB();this.g.disconnect(1)},a),1E4)}function zE(a){I(a.Wg);a.Wg=NaN}function AE(a){I(a.Zk);a.Zk=NaN}function oE(a){a.i.W("screenPair",a.Pn,a)}
717 f.dv=function(){this.log_("Channel opened");var a=this.j;Zg("yt-remote-session-browser-channel",{firstTestResults:[""],secondTestResults:!this.g.a.hi,sessionId:this.g.a.j,arrayId:this.g.a.xf});Zg("yt-remote-session-screen-id",a);var a=OA(),b=PA();A(a,b)||a.push(b);SA(a);NA();this.b&&(this.b.a.getVideoData().Na&&!mE(this.b)?this.log_("Wait for playlist data to be loaded."):xE(this))};function BE(a){aB(!0);AE(a);a.i.wk=null;eE(a,null);a.k=""}
718 f.$u=function(){this.log_("Channel closed");var a=!!this.j&&isNaN(this.Wg);BE(this);a&&bE(this,"connectionClosed")};f.av=function(a){uE(this)?this.log_("Channel error: "+a+" with reconnection in "+AD(this.g)+" ms"):this.log_("Channel error: "+a+" without reconnection");uE(this)||BE(this);zE(this);bE(this,"connectionError")};
719 function CE(a,b){switch(b.action){case "loungeStatus":var c=kb(b.params.devices);a.A=Ja(c,function(a){return new vD(a)});break;case "loungeScreenDisconnected":Wa(a.A,function(a){return"LOUNGE_SCREEN"==a.type});break;case "remoteConnected":var d=new vD(kb(b.params.device));Na(a.A,function(a){return a.equals(d)})||Ta(a.A,d);break;case "remoteDisconnected":d=new vD(kb(b.params.device)),Wa(a.A,function(a){return a.equals(d)})}}
720 function DE(a,b){var c=!1;if("loungeStatus"==b.action)c=!!Na(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!=sE(a)&&(c?(zE(a),bE(a,"connectionOpened"),a.qo()):a.disconnect())}function uE(a){return!isNaN(AD(a.g))}
721 f.cv=function(a){a.params?this.log_("Received: action="+a.action+", params="+mb(a.params)):this.log_("Received: action="+a.action);CE(this,a);DE(this,a);if(sE(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=kb(a.params.currentError)));if("onSubtitlesTrackChanged"==a.action)d==DD(this.a)&&(delete a.params.videoId,
722 Ib(a.params)?this.a.b=null:this.a.b=a.params,dE(this,"playerChange"));else if(DD(this.a)||'"onStateChange"'!=a.action)"playlistModified"!=a.action&&"nowPlayingPlaylist"!=a.action||e?(d||"nowPlaying"!=a.action&&"nowPlayingPlaylist"!=a.action?d?d!=DD(this.a)&&(b=!0):d=DD(this.a):(GD(this.a,""),b=!0),e&&(e=e.split(","),HD(this.a,e,d)&&(b=!0))):(HD(this.a,[]),b=!0),this.a.add(d)&&tE(this,"getPlaylist"),d&&GD(this.a,d),b&&dE(this,"playlistChange"),q(g)&&(b=parseInt(g,10),b=isNaN(b)?-1:b,-1==b&&-1E3==this.a.a&&
723 (b=-1E3),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?(AE(this),this.Zk=H(v(this.qo,this),2E4)):AE(this)),"onError"!=a.action||-1!=this.a.a&&-1E3!=this.a.a||(a=kb(a.params.errors)||[],1==a.length&&"PLAYER_ERROR"==a[0].error&&a[0].videoId==DD(this.a)&&(this.a.a=-1E3,this.a.g=a[0].reason||"unknown",c=!0)),h&&(b=parseInt(h,10),ED(this.a,isNaN(b)?0:b),c=!0),q(k)&&(b=parseInt(k,10),isNaN(b)||(c=c||this.a.volume!=b,this.a.volume=
724 b),q(m)&&(m="true"==m,c=c||this.a.muted!=m,this.a.muted=m)),c&&dE(this,"playerChange")}};f.bl=function(){this.j&&!fE(this)?(this.log_("Dropping current screen with id: "+this.j),this.disconnect(),this.a=null):$D(this)||aB()};function EE(){ZD.call(this,"Desktop","youtube-desktop");K(window,"unload",v(this.B,this));K(window,"beforeunload",v(this.B,this))}y(EE,ZD);ca(EE);EE.prototype.B=function(){jE(this)};function FE(a,b){this.a=a;this.a.D("onVolumeChange",this.Sh,this);this.a.D("onPlaylistUpdate",this.en,this);this.i=NaN;this.b=b;this.b.D("playerChange",this.fn,this);this.b.D("playlistChange",this.gn,this);this.k=0;this.g={};this.j=new zr(this.Js,1E3,this);L(this,this.j);this.o=0}y(FE,Lf);f=FE.prototype;
725 f.F=function(){GE(this);this.a.W("onVolumeChange",this.Sh,this);this.a.W("onPlaylistUpdate",this.en,this);this.a=null;this.b.W("playerChange",this.fn,this);this.b.W("playlistChange",this.gn,this);this.b=null};f.gx=function(a,b){rE(this.b)&&(HE(this)?this.hw.apply(this,arguments):this.iw.apply(this,arguments))};
726 f.iw=function(a,b){var c=Array.prototype.slice.call(arguments,1);switch(a){case "control_toggle_play_pause":case "control_play":case "control_pause":IE(this,this.a.a.getCurrentTime());break;case "control_seek":IE(this,c[0])}};
727 f.hw=function(a,b){var c=rE(this.b),d=Array.prototype.slice.call(arguments,1);switch(a){case "control_toggle_play_pause":1==c.a?JE(this):(yE(this.b),this.a.jb(!0));break;case "control_play":yE(this.b);this.a.jb(!0);break;case "control_pause":JE(this);break;case "control_seek":this.o=d[0];Ar(this.j);break;case "control_subtitles_set_track":KE(this,d[0])}};function JE(a){var b=a.b;tE(b,"pause");ED(b.a,FD(b.a));-1E3!=b.a.a&&(b.a.a=2);cE(b,"playerChange");LE(a,FD(rE(a.b)));GE(a);a.a.jb(!1)}
728 f.Js=function(){var a=this.o,b=rE(this.b);GE(this);LE(this,a);-1==b.a?IE(this,a):(b=this.b,tE(b,"seekTo",{newTime:a}),ED(b.a,a),-1E3!=b.a.a&&(b.a.a=3),cE(b,"playerChange"))};
729 function KE(a,b){if(HE(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},Mb(d,c.a.b),tE(c,"setSubtitlesTrack",d)):tE(c,"setSubtitlesTrack");cE(c,"playerChange");a.g=rE(a.b).b}}function IE(a,b){vE(a.b,a.a.a.getVideoData().L,"VI",b);var c=a.a;ME(c);NE(c.g)}
730 f.Sh=function(a){if(HE(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;tE(c,"setVolume",d);cE(c,"playerChange")}};f.en=function(){xE(this.b)};
731 f.fn=function(){if(HE(this)){var a=rE(this.b);GE(this);switch(a.a){case 1:OE(this);this.a.jb(!0);break;case 3:var b=this.a;ME(b);NE(b.g);break;case 0:this.a.jb(!1);this.j.stop();b=this.a.a;(b=O(b.app,b.a||1))&&b.pg(!0);LE(this,this.a.a.getVideoData().wa);break;case 2:this.a.jb(!1);LE(this,FD(a));break;case -1:this.a.jb(!1);break;case -1E3:var b=this.a,c=J("REMOTE_PLAYER_ERROR");ME(b);PE(b.g,c)}0==this.k&&(b=this.a.a,(b=O(b.app,b.a||1))&&b.pg(!1));this.k=a.a;QE(this);b=Math.round(this.a.a.Um());-1!=
732 a.volume&&b!=a.volume&&(this.a.W("onVolumeChange",this.Sh,this),this.a.a.Wm(a.volume),a.muted?this.a.a.Vm():this.a.a.Xm(),this.a.D("onVolumeChange",this.Sh,this))}else this.a.jb(!1)};
733 function QE(a){var b=rE(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.Ij("captions","tracklist",{Fy:1}),c=Na(c,function(a){return a.languageCode==b.languageCode&&a.name==b.trackName});a.a.a.jn("captions","track",c)}else a.a.a.ln("captions")}f.gn=function(){HE(this)||(LE(this,0),GE(this),this.a.jb(!1))};
734 function HE(a){var b=rE(a.b);return!!b&&DD(b)==a.a.a.getVideoData().L}function OE(a){GE(a);uE(a.b)||(LE(a,FD(rE(a.b))),a.i=H(v(function(){OE(this)},a),500))}function GE(a){I(a.i);a.i=NaN}function LE(a,b){var c=a.a.a.getVideoData().wa;a.a.u("command_progress",b,b/c,void 0)};function RE(){Z.call(this,["div",["html5-bezel","html5-center-overlay"],["div","{{icon}}"]]);this.a=NaN;this.hide()}y(RE,Z);RE.prototype.hide=function(){RE.C.hide.call(this);SE(this)};RE.prototype.setIcon=function(a){xm(this.template,"icon",a)};RE.prototype.show=function(a){SE(this);a&&this.setIcon(a);RE.C.show.call(this)};function SE(a){I(a.a);W(a.element,"html5-bezel-fade")};function TE(a){Z.call(this,["div","ytp-thumbnail"]);this.a=a}y(TE,Z);
735 TE.prototype.show=function(a){if(a||this.element.childNodes.length){if(a){Vc(this.element);var b=this.element,c=this.a;if(void 0!=cn("backgroundSize"))d=document.createElement("div"),d.style.backgroundImage="url("+gn(b,a,c)+")";else{var d=document.createElement("img");d.src=gn(b,a,c);a=d;b.clientWidth/b.clientHeight<fn?(a.style.height="100%",a.style.width="auto"):(a.style.height="auto",a.style.width="100%")}V(d,"video-thumbnail");this.element.appendChild(d)}TE.C.show.call(this)}};function UE(a,b,c,d){R.call(this);this.R=d;this.b=this.a=null;this.I=c;this.O=new ln(J("REMOTE_PLAYER_RECONNECT_TIME"),["formatted_time"]);this.B=new ln(J("REMOTE_CONNECTED_STATUS"),["receiver_name"]);this.H=new ln(J("REMOTE_CONNECTING_STATUS"),["receiver_name"]);this.N=new ln(J("REMOTE_ERROR_STATUS"),["receiver_name"]);this.j=this.H;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);VE(this);b=E("html5-remote-display-error",
736 b);c=Sc("div");b.appendChild(c);V(c,"html5-remote-display-error-icon");this.A=Sc("div");b.appendChild(this.A);this.g=new Om(this.R,"ytp-button-remote-reconnect");this.g.Aa(J("REMOTE_PLAYER_RECONNECT_BUTTON"));this.g.T(b);this.K=K(this.g,"click",v(this.u,this,"reconnectclicked"));this.o=new TE(a.a.J().kc);this.o.T(this.k);this.o.show(a.a.getVideoData());L(this,this.o);this.a=new RE;this.a.T(this.k);this.a.hide();L(this,this.a);this.b=new it;V(this.b.element,"html5-center-overlay");V(this.b.element,
737 "html5-center-transform");this.b.T(this.k);this.b.show();L(this,this.b)}y(UE,R);UE.prototype.F=function(){vf(this.K);this.i.innerHTML="";UE.C.F.call(this);this.o=this.i=this.a=null};function WE(a){a.j=a.H;VE(a);XE(a,!1);a.a.hide();a.b.show()}function NE(a){a.j=a.B;VE(a);XE(a,!1);a.a.hide();a.b.show()}function PE(a,b){a.j=a.N;VE(a);a.a.hide();a.b.hide();a.g.hide();a.A.innerHTML=b;XE(a,!0)}function XE(a,b){X(a.k,"ytp-remote-error",b)}
738 function YE(a,b){PE(a,pn(a.O,{formatted_time:Xm(b/1E3)}));a.g.show()}function VE(a){a.i&&(a.i.innerHTML=pn(a.j,{receiver_name:'<span class="mdx-receiver">'+a.I+"</span>"},void 0,!0))};function ZE(a){R.call(this);this.k=this.g="";this.j=null;this.i=a;this.a=this.b=null;$E(this,a)}y(ZE,R);ZE.prototype.F=function(){vf(this.g);vf(this.k)};function aF(a,b){var c="";z(b,function(a){c+=pn(this.j,{receiver_key:a.key,receiver_name:a.name})},a);a.a.innerHTML=c;xr(mr.getInstance(),a.i)}function bF(a,b){var c=E("active",a.a);if(c){if(G(c,"value")==b)return;am(c,["active","selected"])}(c=a.a.querySelector('[data-value="'+b+'"]'))&&$l(c,["active","selected"])}
739 function $E(a,b){a.b=yr(mr.getInstance(),b);var c=E("html5-remote-receiver-template",a.b);a.j=on(c,["receiver_key","receiver_name"]);a.a=E("html5-remote-receivers",a.b);a.a.innerHTML="";a.g=zf(a.b,v(a.o,a),"yt-uix-button-menu-item");a.k=K(b,"click",v(function(){this.u("menushown")},a))}ZE.prototype.o=function(a){(a=a.currentTarget)&&"remote-select-receiver"==G(a,"action")&&(a=G(a,"value"),bF(this,a),this.u("selectreceiver",a))};function cF(a){Nw.call(this,a);var b=Q(this.a);this.H=a.P.A;this.k={key:AA(),name:J("REMOTE_LOCAL_SCREEN")};this.g=this.j=null;this.b=dF(this);this.B=NaN;a=this.b;a.o=bh("yt-remote-delayed-connect-key");if(a.o)a.log_("Connecting with the delayed connect data: "+mb(a.o)),a.connect({key:a.o.key}),ch("yt-remote-delayed-connect-key");else{var c=$D(a);c?c.lb==a.j?a.log_("Skipping connecting because current connection exists."):(a.log_("Resuming MDx session: "+vA(c)),eE(a,c),a.g.connect({},0,UA()),a.a=
740 new BD,nE(a)):(aB(),a.log_("Skipping connecting because no session screen found."))}this.A=new ZE(E("html5-remote-button",b));this.A.D("selectreceiver",this.Dj,this);L(this,this.A);this.i=this.k;this.ng()}y(cF,Nw);var eF=["play_pause","seek"],fF=["captions"];f=cF.prototype;f.na="remote";f.kd="remote";f.Xa=function(){return this.app.I.J().Ig};
741 f.create=function(){cF.C.create.call(this);var a=this.b=dF(this),b=this.Kn;aE(a,b,this);a.D("connectionOpened",b,this);a.D("connectionClosed",b,this);a.D("connectionError",b,this);this.b.i.D("onlineReceiverChange",this.ng,this);this.b.i.D("connectToReceiver",this.Dj,this);this.ng();this.i!=this.k&&3<this.a.app.o&&this.load()};function gF(a){a.b&&(aE(a.b,a.Kn,a),a.b.i.W("onlineReceiverChange",a.ng,a),a.b.i.W("connectToReceiver",a.Dj,a),a.b.b=null,a.b=null)}
742 f.destroy=function(){var a=this.A;rr(mr.getInstance(),a.i);gF(this);cF.C.destroy.call(this)};
743 f.load=function(){if(!this.Z){cF.C.load.call(this);this.ng();var a=E("html5-remote-module",Q(this.a));this.g=new UE(this,a,this.i.name,this.H);this.g.D("reconnectclicked",this.Nm,this);this.j=new FE(this,this.b);KE(this.j,this.a.Ij("captions","track"));this.a.Jj();this.u("command_redirect_controls",this,eF,fF);var b=this.b.o?this.b.o.currentTime:0;0!=b&&H(v(function(){LE(this.j,b)},this),0);rE(this.b)&&!Ra(rE(this.b).xb)&&this.a.qg();this.Z=!0}};
744 f.unload=function(){this.Z&&(this.Z=!1,hF(this,this.k),this.jb(!1),om(this),this.g.W("reconnectclicked",this.Nm,this),ME(this),Of(this.j,this.g),this.g=this.j=null,cF.C.unload.call(this))};f.F=function(){gF(this);ME(this);Of(this.j,this.g);this.g=this.j=null;cF.C.F.call(this)};function mE(a){return a.a.ub()?a.a.getVideoData().Na:""}function kE(a){var b=a.a.ub();if(b){a=[];for(var c=0;c<b.Pa;c++)a[c]=qg(b,c).L;return a}return[a.a.getVideoData().L]}
745 function lE(a){var b=mE(a);if(b){b=b.substr(0,2);a=Vl(a.a.ub());for(var c=[],d=0;d<a;d++)c[d]=b;b=c}else b=["VI"];return b}function dF(a){var b=EE.getInstance();b.b=a;return b}f.Kn=function(){ME(this);this.Z&&uE(this.b)?iF(this):rE(this.b)?this.load():this.unload()};f.Nm=function(){var a=this.b;uE(a)&&(a=a.g.b,a.Xc&&(a.stop(),a.start(),a.k()));WE(this.g)};f.oe=function(a,b){this.j.gx.apply(this.j,arguments)};
746 f.Dj=function(a){if(this.i.key!=a)if(this.k.key==a){var b=rE(this.b);a=!!b&&1==b.a&&DD(b)==this.a.getVideoData().L;b=b?FD(b):0;this.i=this.k;this.b.disconnect();this.unload();a&&(this.a.Th(b),this.a.qg())}else if(a=BA(bB(),a))hF(this,a),this.b.connect(a),this.load()};function hF(a,b){(a.i||b?a.i&&b&&a.i.key==b.key:1)||(a.i=b,bF(a.A,b.key))}f.ng=function(){var a=bB();this.b&&(this.i=qE(this.b,a)||this.k);a.unshift(this.k);aF(this.A,a);bF(this.A,this.i.key);this.g&&(a=this.g,a.I=this.i.name,VE(a))};
747 function iF(a){ME(a);uE(a.b)?(YE(a.g,AD(a.b.g)),a.B=H(v(function(){iF(this)},a),1E3)):WE(a.g)}function ME(a){I(a.B);a.B=NaN}f.jb=function(a){ME(this);var b=this.g;b.j=b.B;VE(b);XE(b,!1);b.b.hide();b.a.show();b.a.setIcon(a?"html5-bezel-pause":"html5-bezel-play");cF.C.jb.call(this,a)};function jF(){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}}"]],
748 ["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"],
749 ["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(jF,Z);jF.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)};
750 jF.prototype.F=function(){this.a=null;jF.C.F.call(this)};function kF(a){R.call(this);this.app=a;this.ea=this.U=this.b=this.R=this.g=this.a=this.fa=null;this.Ma=this.Ra=0;this.S=null;a=a.J();this.La=Bj()||"blazer"==a.Ja;this.va=0;this.j=null;this.ok()}y(kF,R);var lF=null;f=kF.prototype;f.ok=function(){this.app.D("videodatachange",this.Ll,this)};f.xj=function(){var a=Ic(this.fa);(a=Zl(a,"html5-video-player")?a:E("html5-video-player",a))||(a=lF||E("html5-video-player"));if(!a)return!1;mF(this,a);this.u("templateready");return!0};
751 function mF(a,b){lF=b.cloneNode(!0);a.a=b;a.a.setAttribute("id",a.app.K.attrs.id);var c=Ic(a.fa);c!=a.a&&c.appendChild(a.a);(c=Ic("html5-player-messages"))&&z(c.children,function(a){try{var b=JSON.parse(a.innerHTML);mf(a.id,b)}catch(c){mf(a.id,a.innerHTML)}})}f.addClass=function(a){$l(this.a,arguments)};f.removeClass=function(a){am(this.a,arguments)};
752 f.yj=function(){var a=this.app.J(),b=this.a;this.addClass("el-"+a.Y);this.addClass("ps-"+a.Ja);X(b,"html5-native-controls",a.Ub);X(b,"html5-mobile",a.kc);a.ve||this.addClass("html5-chromeless");a.tb||this.addClass("tag-pool-enabled");b.style.display="";this.g=E("html5-video-container",b);this.U=E("html5-video-content",b);this.ea=E("html5-video-controls",b);this.j=new jF;this.j.T(b);K(this.j.a,"click",v(this.mk,this));L(this,this.j);this.La?this.S=K(window,"resize",v(this.Gi,this)):this.S=jf(v(this.Gi,
753 this),250)};f.Gi=function(){this.R&&xb(nF(this),this.R)||this.tf()};f.tf=function(){if(this.b){var a=nF(this);if(!a.isEmpty()){var b=oF(this),c=nF(this),d=1,e=pF(this);if(e){var g=qF(this,c,b,e,!1),d=g.width/g.height/yb(b);yd(this.b,g.width/d,g.height);md(this.b,g.left+g.width/2*(1-1/d),g.top)}else yd(this.b,c),md(this.b,0,0);b=qF(this,c,b,e,!0);yd(this.U,b.width,b.height);md(this.U,b.left,b.top);dn(this.b,"transform",1==d?"none":"scaleX("+d+")");this.R&&xb(a,this.R)||(this.R=a,this.zl(a));this.u("resize")}}};
754 f.zl=function(){};f.xk=function(){};f.Ll=function(a,b){this.b.setAttribute("data-youtube-id",b.L);qi&&(b.title?this.b.setAttribute("title",b.title):this.b.removeAttribute("title"));var c=Il(b,"yt:bgcolor");this.g.style.backgroundColor=c?c:"";this.Ra=Gk(Il(b,"yt:stretch"));this.Ma=Gk(Il(b,"yt:crop"))};f.Bj=function(){};f.Ip=function(){};f.Ko=function(){};function nF(a){return a.g?new C(a.g.clientWidth,a.g.clientHeight):new C(0,0)}
755 function oF(a){return a.b?new C(a.b.videoWidth,a.b.videoHeight):new C(0,0)}function qF(a,b,c,d,e){c.isEmpty()?e=b:d?(c=new C(a.Ra||yb(c),1),a=new C(a.Ma||yb(c),1),zb(a,c),d=yb(a)>yb(b)?b.width/a.width:b.height/a.height,e=e?a.scale(d):c.scale(d)):e=zb(c.clone(),b);return new Ab((b.width-e.width)/2,(b.height-e.height)/2,e.width,e.height)}function pF(a){return!a.app.J().Ub&&!oF(a).isEmpty()}function Lv(a,b){var c=a.ea;c.insertBefore(b,c.childNodes[0]||null)}f.Cj=function(){};
756 function vg(a){a.j&&(a.j.show(),a.Mp(),kf(a.va),a.va=jf(v(a.Mp,a),500))}
757 f.Mp=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.xa.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||
758 "-",audio_bytes_decoded:c.hmewadbc||"-",painted_frames:c.hmempainted||"-",paint_delay:c.hmempaintdelay||"-"};b.a&&(c.dash=b.a.j&&b.a.a?"no":"yes",c.mime=b.a.mb);if(a=a.I?a.I.g:null)c.drm_flavor=a.b,c.drm_key_system=a.a;this.j.update(c)};f.mk=function(a){a&&a.stopPropagation();this.j&&(kf(this.va),this.j.hide())};f.F=function(){this.S&&(this.La?vf(this.S):kf(this.S));this.mk();this.j&&Af(this.j.a);F(this.a);this.ea=this.U=this.b=this.g=this.a=this.fa=null;kF.C.F.call(this)};function rF(){this.a=[];this.b=[]}ca(rF);var Nm=n("yt.player.utils.VideoTagPool.instance_")||rF.getInstance();qa("yt.player.utils.VideoTagPool.instance_",Nm);f=rF.prototype;f.vy=function(a){if(!(this.a.length>=a)){a-=this.a.length;for(var b=0;b<a;b++){var c=sF(this);this.a.push(c)}}};
759 function sF(a){var b=document.createElement("video");pa(b,vi);K(b,"loadeddata",v(b.dw,b));K(b,"volumechange",v(b.ew,b));K(b,"timeupdate",v(b.pp,b));gi&&6<=li&&K(b,"webkitbeginfullscreen",v(b.play,b));wi(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);K(b,"volumechange",v(a.fw,a));return b}f.fw=function(a){a=a.target;var b=a.volume,c=a.muted;z(this.a,function(a){a.volume=b;a.muted=c})};f.Cy=function(){return this.a.length?this.a.pop():sF(this)};
760 f.Ay=function(a){a&&A(this.b,a)&&(Ci(a),Af(a),Ua(this.b,a))};f.xy=function(a){return this.a.length>=(a||1)};rF.prototype.fillPool=rF.prototype.vy;rF.prototype.getTag=rF.prototype.Cy;rF.prototype.releaseTag=rF.prototype.Ay;rF.prototype.hasTags=rF.prototype.xy;function tF(a,b){var c,d;d||(d=0);c||(c=rd(document.body));cr(new B(b.pageX,b.pageY),a,d,null,c,5)};function uF(){this.a=new eo(this)}y(uF,Lf);f=uF.prototype;f.Sj=null;f.Ce=null;f.Tj=null;f.Si=null;f.De=null;f.Mr=function(){this.hide()};f.Nr=function(a){a.stopPropagation()};f.hide=function(){bn(this.De);ar("panelhidden")};f.Or=function(a){27==a.keyCode&&this.hide()};f.dn=function(){this.Ce.select()};f.show=function(){an(this.De)};f.F=function(){this.a.removeAll();this.Ce=this.Sj=this.Tj=this.De=null;uF.C.F.call(this)};function vF(a){this.V=a;this.V.D("internalvideodatachange",this.Vn,this);this.g=new eo(this);this.a=new eo(this);this.b=new uF;L(this,this.b)}y(vF,Lf);f=vF.prototype;f.Zb=null;function wF(a,b,c){for(var d=Jc(Ym[b],a.Zb),e=0;e<d.length;e++)fo(a.g,d[e],"down",function(a){c.call(this,a);this.hide(a);a=b.replace("CONTEXT_MENU_","").toLowerCase();xF(this.V,"contextmenu."+a)})}f.Vn=function(a,b){var c=E("html5-context-menu-copy-embed-html",this.Zb);Zm(c,b.Ho)};
761 f.hn=function(a){a=kg(this.V,a);yF(this,a,"URL")};f.Qr=function(){var a=ef("EMBED_HTML_TEMPLATE"),b=ef("EMBED_HTML_URL"),c=dx(this.V.J()),d=this.V.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);yF(this,a,"Text")};
762 function yF(a,b,c){window.clipboardData&&window.clipboardData.setData(c,b)||(a=a.b,$m(a.De)&&a.hide(),a.Si&&W(a.De,a.Si),a.Si="html5-modal-panel-clipboard-substitute",V(a.De,a.Si),a.show(),a.Ce.value=b,a.Ce.focus(),H(v(a.dn,a),100))}f.Rr=function(a){zF(this.V,a.target.getAttribute("href"))};
763 f.Sr=function(){var a=this.V.getVideoData(),b=this.V.J(),c=dx(b),d=Mv(b),e=Hl(a),e=e?xi(e):"",c={cr:b.S,csipt:a.Fc,ec:108,feature:b.k,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.fa,shost:Xi(e),sourceid:a.od,vid:b.$,vq:b.Dh,w:d.width};pa(c,this.V.uj());c.videoId&&(c.v=c.videoId,delete c.videoId);b.kc&&(c.mobile="1");this.V.qf("streamingerror",c);window.open(fx(a))};
764 f.Pr=function(){yF(this,lg(this.V,!0),"Text")};f.Tr=function(){vg(this.V.P)};f.yu=function(a){a.preventDefault();$m(this.Zb)?a.stopPropagation():(tF(this.Zb,a),an(this.Zb),this.a.listen(this.Zb,"contextmenu",function(a){a.preventDefault()}),a=v(function(){this.a.listen(window,"blur",this.hide);fo(this.a,document,"down",this.hide)},this),H(a,0),this.a.listen(document,"keydown",this.Pv))};f.Pv=function(a){27==a.keyCode&&this.hide(a)};f.hide=function(a){bn(this.Zb);this.a.removeAll();a&&a.stopPropagation()};
765 f.F=function(){this.g.removeAll();this.a.removeAll();this.V.W("internalvideodatachange",this.Vn,this);this.V=null;F(this.Zb);this.Zb=null;vF.C.F.call(this)};function AF(a,b){Sm.call(this,a,b);this.o=null;this.G=this.B=this.i=this.b=0;V(this.element,"ytp-tv-static");BF(this,a,b)}y(AF,Sm);function CF(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}
766 function BF(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.B=CF(b);a.G=CF(c/10);a.X.scale(1.5,1.5)}}AF.prototype.show=function(){AF.C.show.call(this);var a=this.H;this.j=new Date;this.g(a,75)};
767 AF.prototype.H=function(){var a=1-1/1.5;this.b=(this.b+this.B)%(this.width*a);this.i=(this.i+this.G)%(this.height*a);this.X.drawImage(this.o,-1*this.b,-1*this.i)};AF.prototype.hide=function(){I(this.a);AF.C.hide.call(this)};function DF(){Z.call(this,["div",["ytp-error","html5-stop-propagation"],["div","ytp-error-content",["div","ytp-error-content-wrap","{{content}}"]]]);this.b=[];if(void 0==wk){var a=document.createElement("canvas");wk=!(!a.getContext||!a.getContext("2d"))}wk&&(this.a=new AF(1,1),this.a.T(this.element,0),L(this,this.a))}y(DF,Z);DF.prototype.show=function(){var a=this.element;a&&(a.style.display="table");EF(this);this.a&&this.a.show()};DF.prototype.hide=function(){DF.C.hide.call(this);this.a&&this.a.hide()};
768 function EF(a){a.a&&BF(a.a,a.element.clientWidth,a.element.clientHeight)}DF.prototype.F=function(){vf(this.b);this.b=[];DF.C.F.call(this)};function FF(){this.b=this.a=null}FF.prototype.getMsg=function(a,b,c){return J(a,b,c)};function pt(a,b,c,d){a.a&&GF(a.a,b,c,d)};function HF(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=
769 b.ieid),d.evid=b.vid);c&&(d.foc_id=b.uid);c=S(b.baseUrl,d)}else c=null}else c=null;c&&Kf(c)}function IF(a){var b=ef("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}HF(a,b)}};function JF(a,b,c){c=c||{};kj("watch_actions_ajax",c.Da,c.Ta,v(KF,l,a,b,c),c.onError)}
770 function KF(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.ab;c.Na&&(d.list=c.Na);c.Da&&(d.authuser=c.Da);c.Ta&&(d.pageid=c.Ta);a={screen:Wi({h:screen.height,w:screen.width,d:screen.colorDepth}),session_token:gf("watch_actions_ajax")};c.wx&&(a.station_id=c.wx);ej("/watch_actions_ajax",{format:"XML",method:"POST",zf:d,Nf:a,Oa:c.Oa,onError:c.onError,td:c.td});0===b?IF("like"):1===b&&IF("dislike")};function LF(a,b,c,d,e){if(Zl(c,"html5-async-progress"))return null;X(c,"sentiment-like",b);X(c,"sentiment-dislike",!b);if(!a)return null;Ft(c,"html5-async-progress");c={ab:a.ab,Oa:function(a){return function(){Ft(a,"html5-async-success")}}(c),onError:function(a){return function(){Ft(a)}}(c)};d&&(c.authUser=d);e&&(c.pageId=e);JF(a.L,b?0:1,c);ef("CONVERSION_CONFIG_DICT")||HF(b?"like":"dislike",a.i);return b?0:1};function MF(a,b,c){nt.call(this,a,c.J(),b);this.V=c}y(MF,nt);f=MF.prototype;f.Rj=function(){MF.C.Rj.call(this);this.eb.listen(this.b.b,"click",this.fv);this.eb.listen(this.b.a,"click",this.ev);this.V.D("presentingplayerstatechange",this.Fo,this)};f.update=function(a){MF.C.update.call(this,a);!("watch_actions_ajax"in Ze)||this.V.g&&this.g.Ma?(a=this.b,a.b.hide(),a.a.hide()):(a=this.b,a.b.show(),a.a.show())};f.ai=function(a){var b=Cc(this.a,"show-share");this.u("share-click");b||MF.C.ai.call(this,a)};
771 f.Fn=function(a){this.u("title-click",a)};f.ek=function(){var a=Cc(this.a,"show-more-info");this.u("info-click");if(a)this.B&&this.V.Ud();else{MF.C.ek.call(this);var b=xg(this.V);this.B=P(b,8)&&!P(b,2);this.V.Sd()}return!a};f.fv=function(){NF(this,!0)};f.ev=function(){NF(this,!1)};f.Fo=function(a){P(a.state,8)&&W(this.a,"show-more-info")};function NF(a,b){var c=LF(a.ia,b,a.a,a.g.Da,a.g.Ta);null!=c&&(0==c?a.b.o():a.b.j(),a.V.u("RATE_SENTIMENT",c))}f.Ki=function(a){zF(this.V,a)};
772 f.F=function(){this.V.W("presentingplayerstatechange",this.Fo,this);this.V=null;MF.C.F.call(this)};function OF(a,b,c,d,e,g,h,k){this.j=[];z(jb(b),function(b){this.j.push(K(a,b,v(this.Cr,this)))},this);z(jb(d),function(b){this.j.push(K(a,b,v(this.Br,this)))},this);this.k=g||null;this.B=c;this.A=h||0;this.g=0;this.i=!1;this.G=e;this.o=k||0;this.a=0;this.b=!1}f=OF.prototype;f.Cr=function(a){I(this.a);this.a=0;this.g=H(v(this.wv,this,a),this.A)};f.Br=function(a){I(this.g);this.g=0;this.a=H(v(this.vv,this,a),this.o)};f.wv=function(a){this.b||this.i||(this.i=!0,this.B.call(this.k||l,a))};
773 f.vv=function(a){!this.b&&this.i&&(this.i=!1,this.G.call(this.k||l,a))};f.dispose=function(){this.b=!0;I(this.g);I(this.a);vf(this.j)};f.ha=function(){return this.b};var PF=null,QF=null;function RF(){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(RF,Z);RF.prototype.hide=function(){RF.C.hide.call(this);md(this.a,0)};function SF(a,b){X(a.b,"ytp-tooltip-content-text",!b.tagName);xm(a.template,"content",b)}RF.prototype.F=function(){Vc(this.b);this.b=this.a=null;RF.C.F.call(this)};function TF(a,b){this.a={};this.wl=a;this.hp=b}y(TF,Lf);
774 function Pm(a,b,c){var d,e=new OF(b,"mouseover",function(){if(this.wl){var a=new RF;a.T(this.wl);d=a}else d=null;if(d&&(a=c&&c(b),!c||a)){a?SF(d,a):(a=G(b,"tooltip")||"",SF(d,Tc(a)));var e=!!G(b,"tooltip-below"),a=d,k=Ad(b),k=new B(k.width/2,e?k.height:0),m=sd(b),k=new B(m.x+k.x,m.y+k.y),e=!!e;X(a.element,"ytp-tooltip-below",e);if(m=qd(a.element))var p=sd(m),s=Hd(m),k=vb(k,new B(p.x+s.left,p.y+s.top));cr(k,a.element,e?1:0);a.show();var s=Ad(a.a),e=-1*(s.width/2),r=Nc(window),x=Oc(document),k=x.x,
775 r=r.width+x.x,x=k,M=r;m&&(m=Ad(m),x=p.x,M=m.width+p.x);m=sd(a.a);p=m.x+e;m=m.x+s.width+e;p<Math.max(k,x)?e-=p-Math.max(k,x):m>Math.min(r,M)&&(e-=m-Math.min(r,M));md(a.a,e)}},["mouseout","mousedown"],function(){d&&(d.hide(),Nf(d),d=null)},a,10,50);a.a[ja(b)]=e}
776 function GF(a,b,c,d){Pm(a,b,function(){var a=this.hp,b;if(a&&a.Ql){b=a.Ql;var h=a.Pp;PF||(PF=new ln(J("YTP_TOOLTIP_IDENTITY")),QF=new ln(J("YTP_TOOLTIP_IDENTITY_WATCH_LATER")));a=Sc("div");V(a,"ytp-identity-tooltip");var k=Sc("img");k.src=h;var h=Sc("span"),m=null;d?(V(h,"ytp-idt-watch-later"),m=[Tc(pn(QF,{user_name:""})),Sc("br"),Tc(b)]):m=Tc(pn(PF,{user_name:b}));Uc(h,m);Uc(a,k,h);b=a}else b=c;return b})}
777 TF.prototype.F=function(){this.hp=this.wl=null;for(var a in this.a)Nf(this.a[a]);this.a={};TF.C.F.call(this)};function UF(a,b){this.k=a;this.i=[];this.o=b;this.j=[]}y(UF,Lf);function VF(a,b,c){a.i.push(a.k.D(b,c,a))}function WF(a,b,c){a.j.push(a.o.D(b,c,a))}function XF(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])}UF.prototype.F=function(){XF(this)};function YF(a,b){UF.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.Fg){var d=this.a,e=E("html5-progress-tooltip",d.g);d.b=new eu;var g=d.b;g.Hb=e;g.Jh=E("html5-progress-tooltip-arrow",g.Hb);g.$j=E("html5-progress-tooltip-thumbnail",g.Hb);g.zj=E("html5-progress-tooltip-timestamp",g.Hb);L(d,d.b);d=this.a;d.a=new au;d.a.T(d.g);fo(d.k,d.a.M(),"down",d.Os);d.a.hide();L(d,d.a)}c.Gg&&(c=this.a,d=E("html5-storyboard",c.g),c.o=new Xt,e=c.o,g=c.hb.b.a?new C(c.hb.b.a.clientWidth,
778 c.hb.b.a.clientHeight):new C(0,0),e.wd=d,e.Fe=g.width,e.$b=E("html5-storyboard-filmstrip",e.wd),e.Wh=E("html5-storyboard-lens",e.wd),e.Yj=E("html5-storyboard-lens-thumbnail",e.wd),e.Zj=E("html5-storyboard-lens-timestamp",e.wd),e.wg=E("html5-storyboard-thumbnail",e.$b),F(e.wg),L(c,c.o));ZF(this)}y(YF,UF);
779 function ZF(a){XF(a);a.g=!0;VF(a,"cuerangesadded",a.Jw);VF(a,"cuerangesremoved",a.Kw);VF(a,"presentingplayerstatechange",a.Pw);VF(a,"progresssync",a.Qw);VF(a,"resize",a.Mw);VF(a,"seekto",a.Nw);VF(a,"videodatachange",a.Rw);VF(a,"videoplayerchange",a.Hp);VF(a,"videoready",a.Ow);WF(a,"beginseeking",a.Iw);WF(a,"endseeking",a.Lw);WF(a,"seekto",a.Hw)}f=YF.prototype;f.Jw=function(a){var b=O(this.b).getVideoData();!b||0>=b.wa||$F(this,a,b)};
780 function $F(a,b,c){var d=c.wa;z(b,function(a){if(a.jl){var b=this.a;a=a.start/(1E3*d);a=tb(Math.round(100*a),0,100);if(!b.K[a]){var c=document.createElement("div");c.style.left=a+"%";$l(c,["html5-ad-progress","html5-progress-section"]);b.ua.appendChild(c);b.K[a]=c}}},a)}f.Kw=function(a){var b=O(this.b).getVideoData();if(b&&!(0>=b.wa)){var c=b.wa;z(a,function(a){if(a.jl){var b=this.a;a=a.start/(1E3*c);a=tb(Math.round(100*a),0,100);b.K[a]&&(F(b.K[a]),b.K[a]=null)}},this)}};
781 f.Mw=function(a){if(this.a.o){var b=this.a.o;b.$c&&(b.Fe=a.width,Zt(b,!0))}};f.Nw=function(a){pu(this.a,a);if(this.a.o){var b=this.a.o;if(b.$c){b.Dk=b.fl*a-b.Fe/2;md(b.$b,-1*b.Dk);var c=mk(b.$c,a);Yt(b,c);Zc(b.Zj,Xm(b.Pe*a));Ar(b.a)}}};f.Pw=function(a){if(0>ao(a,16)){a=this.a;var b=this.b.getCurrentTime();a.gb.innerHTML=Math.floor(100*a.va)+"% at "+Math.floor(b)+" of "+Math.floor(a.B)+" seconds"}};f.Hp=function(a){1!=a.B?this.g&&(XF(this),this.g=!1,VF(this,"videoplayerchange",this.Hp)):this.g||ZF(this)};
782 f.Rw=function(a,b,c){"newdata"==a&&(pu(this.a,(b.ya||0)/b.wa,0),a=this.a,Vc(a.ua),a.K={},(c=O(this.b,c))&&$F(this,c.A.i||[],b),this.a.b&&this.a.b.reset());this.a.Va(b.wa);this.a.b&&this.a.b.Va(b.wa);this.a.o&&this.a.o.Va(b.wa);c=this.a;c.ba=b.Mj;qu(c);c=this.a;c.ea=b.Qm;qu(c)};
783 f.Ow=function(a){if(this.a.b){var b=this.a.b;if(!b.ii)if(Jl(a)){V(b.Hb,"with-thumbnail");b.Eg=Jl(a);b.hh=Kl(a);var c=v(b.Zu,b);b.hh.D("l",c)}else b.reset()}if(this.a.o&&(b=this.a.o,b.wg&&Vc(b.$b),W(b.wd,"enabled"),b.$c=Jl(a),b.Le=Kl(a),b.$c&&!b.Go)){V(b.wd,"enabled");a=v(b.Eo,b);b.Le.D("l",a);Zt(b);a=b.$b.cloneNode(!0);for(var c=b.$c.a[0].b,d,e,g=0;g<c;g++)e=b.wg.cloneNode(!1),d=Mk(b.Le,g,b.Lb),Wt(e,d,b.Lb,b.Ii),a.appendChild(e);c=b.$b;(d=c.parentNode)&&d.replaceChild(a,c);b.$b=a}};
784 f.Qw=function(a,b,c){pu(this.a,b,c)};f.Iw=function(){Hy(this.b.b)};f.Lw=function(){this.b.b.ri()};f.Hw=function(a,b){Rf(this.b,a,b)};function aG(a,b){UF.call(this,a,b);VF(this,"applicationplayerstatechange",this.Qs);VF(this,"controlsdisabled",this.Ss);VF(this,"controlsenabled",this.Ts);VF(this,"liveviewshift",this.Ws);VF(this,"fullscreentoggled",this.Vs);VF(this,"presentingplayerstatechange",this.xt);VF(this,"progresssync",this.zt);VF(this,"threedenabled",this.kt);VF(this,"videodatachange",this.At);VF(this,"onPlaybackQualityChange",this.ft);VF(this,"onVolumeChange",this.lt);VF(this,"menu_add",this.Xs);VF(this,"menu_remove",this.Ys);
785 WF(this,"fullscreentoggled",this.Us);WF(this,"mutetoggled",this.Zs);WF(this,"nextvideo",this.$s);WF(this,"playpausetoggled",this.ct);WF(this,"previousvideo",this.dt);WF(this,"qualitychanged",this.gt);WF(this,"sizechangerequested",this.ht);WF(this,"speedchanged",this.jt);WF(this,"volumechanged",this.nt);WF(this,"watchlater",this.wt);WF(this,"watchonyoutube",this.qt);WF(this,"controlclick",this.Rs);this.a=a;this.b=b;this.g=new YF(a,b.fk);L(this,this.g);var c=a.J();if(c.La){var d=this.b;d.Qc=new Os(d.b,
786 "ytp-settings-button",d.b.getMsg("YTP_TOOLTIP_SETTINGS"),"ytp-settings-button-active");L(d,d.Qc);d.Qc.element.setAttribute("tabindex",10);var e=d.ud;e.parentNode&&e.parentNode.insertBefore(d.Qc.M(),e.nextSibling);F(d.ze);F(d.Vd);F(d.ud);Xc(d.wb).appendChild(d.wb);d.vb=new Rt;L(d,d.vb);d.vb.hide();d.vb.T(d.kg);d.a.listen(d.Qc,"click",d.ut);d.Uc=new yu(d.b);L(d,d.Uc);d.Uc.D("qualitychanged",v(d.u,d,"qualitychanged"));d.ce=new Jo(d.b,["ytp-size-control-small","ytp-size-control-large"],!0);d.a.listen(d.ce,
787 "change",d.vt);L(d,d.ce);d.hk={label:d.b.getMsg("YTP_PLAYER_SIZE_TITLE"),element:d.ce,priority:0};d.de=new Du(d.b);L(d,d.de);d.de.D("speedchanged",v(d.u,d,"speedchanged"))}c.Tb&&(d=this.b,e=this.a.J().Od,d.hk?(Mo(d.ce,e?1:0),d.vb.add(d.hk)):(an(d.ze),an(d.Vd)));c.Ch&&this.b.i.show();c.jg&&(d=this.b,e=this.a.a.jg?Zf:[1],d.de?(Eu(d.de,e),d.vb.add(d.de)):an(d.vf));if(c.Ra)for(c=this.b,d=[c.Zc,c.tc,c.uf,c.g,c.ud,c.wb,c.tg,c.i,c.ze,c.Vd,c.Qc],e=0;e<d.length;e++)c.a.listen(d[e],"click",c.tt)}y(aG,UF);
788 f=aG.prototype;f.Ss=function(a){this.b.disable(a)};f.Ts=function(a){this.b.enable(a)};f.Ws=function(a){X(this.b.g.element,"ytp-time-live-dvr",!a)};f.Vs=function(a){var b=this.b,c=this.a.J().Od;if(a){var d=b.i;Qm(d,"ytp-button-fullscreen-exit");var e=d.g.getMsg("YTP_BUTTON_FULLSCREEN_EXIT");Rm(d,e);d.a=e}else Qt(b.i);b.ce&&Mo(b.ce,a?-1:c?1:0)};f.xt=function(a){P(a.state,2)||(0<ao(a,8)?Pu(this.b,!0):0>ao(a,8)?Pu(this.b,!1):0>ao(a,2)&&Pu(this.b,P(a.state,8)));0>ao(a,16)&&bG(this,this.a.getCurrentTime())};
789 f.Qs=function(a){if(P(a.state,2)){a=this.b.Zc;Qm(a,"ytp-button-replay");var b=a.g.getMsg("YTP_BUTTON_REPLAY");Rm(a,b);a.a=b}};f.kt=function(){var a=this.b,b=this.a.getVideoData().Jf,c=E("html5-threed-conversion-on",a.Vh),a=E("html5-threed-conversion-off",a.Vh);Zm(c,!b);Zm(a,b)};
790 f.At=function(a,b){if(1==O(this.a).B){"newdata"==a&&(bG(this,b.ya||0),Ft(this.b.wb),Ru(this.b,"1.0"));this.b.Va(b.wa);Mu(this.b,Fl(b));var c=this.b,d=b.Fb,e=b.bb;c.bo=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.Ie.show():this.b.Ie.hide()}};f.ft=function(a){1==O(this.a).B&&Nu(this.b,a,cG(this.a))};
791 f.lt=function(a){var b=this.b,c=a.volume;a=a.muted;Oe(b.tc,"value",a||0==c?"off":20>c?"min":40>c?"quiet":60>c?"normal":80>c?"loud":"max");Oe(b.tc,"volume",c);var d=b.ac.clientWidth-6,e=b.ac.style.backgroundPosition.split(" "),e=1<e.length?e[1]:"0px";if(a)b.ac.style.backgroundPosition="-"+d+"px "+e,b.yg.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.yg.style.left=g+"px";b.ac.style.backgroundPosition="-"+(d-g)+"px "+e}c=Math.round(c);d=c+"% "+J("HTML5_VOLUME_SETTING")+
792 (a?" "+J("HTML5_VOLUME_MUTED"):"");b.uf.setAttribute("aria-valuenow",c);b.uf.setAttribute("aria-valuetext",d);c=b.tc;d=G(c,a?"tooltip-alt":"tooltip-default")||"";Oe(c,"tooltip",d);c.setAttribute("aria-label",d);b.tc.setAttribute("aria-label",(a?J("HTML5_VOLUME_UNMUTE"):J("HTML5_VOLUME_MUTE"))+" "+J("HTML5_CONTROL_TOGGLE"))};f.Xs=function(a){var b=this.b;b.vb&&b.vb.add(a)};f.Ys=function(a){var b=this.b;b.vb&&b.vb.remove(a)};f.zt=function(a){bG(this,a)};f.Us=function(){dG(this.a,!this.a.J().Ab)};
793 f.Zs=function(){this.a.xa.muted?Tf(this.a):Sf(this.a)};f.$s=function(){ng(this.a)};f.ct=function(){eG(this.a)};f.dt=function(){og(this.a)};f.gt=function(a){"auto"==a&&Nu(this.b,$f(this.a),a);"auto"==cG(this.a)&&Nu(this.b,a,a);var b=O(this.a,1);b&&ag(b,"m",a)};f.ht=function(a){var b=this.a;dG(b,!1);a!=b.a.Od&&(b.a.Od=a,b.u("SIZE_CLICKED",a),b.P.Gi())};f.jt=function(a){Yf(this.a,a)};f.nt=function(a){fG(this.a,a)};f.qt=function(){zF(this.a,kg(this.a,!0))};f.Rs=function(a){xF(this.a,a)};
794 f.wt=function(){kj("addto_ajax",this.a.J().Da,this.a.J().Ta,v(this.Jv,this),v(this.dp,this))};
795 f.Jv=function(){var a={Dv:"WL",xb:this.a.getVideoData(1).L,Da:this.a.J().Da,Ta:this.a.J().Ta,Oa:this.Ev,onError:this.dp,X:this},b={video_ids:a.xb,playlist_id:a.Na||"",new_playlist_name:a.Fv||"",session_token:gf("addto_ajax")},c=ef("PLAYBACK_ID");c&&(b.plid=c);c={};a.privacy&&(c.privacy=a.privacy);a.Cv&&(c.feature=a.Cv);a.Da&&(c.authuser=a.Da);a.Ta&&(c.pageid=a.Ta);var d="";switch(a.Dv){case "PL":d=a.Fv?"action_add_to_new_playlist":"action_add_to_playlist";break;case "FL":d="action_add_to_favorites";
796 break;case "WL":d="action_add_to_watch_later_list"}c[d]=1;ej("/addto_ajax",{Bv:!0,format:"XML",method:"POST",zf:c,Nf:b,X:a.X,onError:a.onError,Oa:a.Oa})};f.Ev=function(){Ft(this.b.wb,"html5-async-success");this.a.u("WATCH_LATER")};f.dp=function(a,b){var c=this.b.wb,d=b&&b.error_message;Ft(c,"html5-async-error");if(d){var e=Us.getInstance(),g=Ws(c);Ys(c,d);Vs(e,c);lr(c,g)}};function bG(a,b){1==O(a.a).B&&xm(a.b.g.template,"current",Xm(b))};var gG={0:"autohide-off",1:"autohide-on",2:"autohide-fade",3:"autohide-auto",4:"autohide-embeds",5:"autohide-seekbar"};function hG(a){kF.call(this,a);this.O=this.o=this.N=this.Ia=this.B=this.da=this.ca=this.$=this.I=this.H=this.k=this.i=null;this.ra=!1;this.oa=this.A=null;this.za=!0;this.ua=this.K=!1;a=this.app.J().Gb?4E3:3E3;this.ba=new ho(this.ak,a,this);L(this,this.ba);this.ba.start()}y(hG,kF);f=hG.prototype;
797 f.ok=function(){hG.C.ok.call(this);this.app.D("appstatechange",this.kx,this);this.app.D("applicationplayerstatechange",this.lx,this);this.app.D("clearvideooverlays",this.px,this);this.app.D("initializingmode",this.nx,this);this.app.D("presentingplayerstatechange",this.mx,this);this.app.D("onDetailedError",this.ox,this)};
798 f.xj=function(){var a=this.app.K.assets;if(a.css&&!zk()){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");Lc(d,b);c||document.getElementsByTagName("head")[0].appendChild(d);this.gp(200)}else this.ra=!0;hG.C.xj.call(this)||ej(a.html,{format:"RAW",method:"GET",Oa:v(this.rx,this)});return!0};
799 f.rx=function(a){if(a.responseText){var b=Sc("div");b.innerHTML=a.responseText;mF(this,E("html5-video-player",b));this.u("templateready")}else this.u("templateerror")};f.gp=function(a){0>=a||zk()?(this.ra=!0,this.a&&ym(this.a)):H(v(this.gp,this,a-1),50)};
800 f.yj=function(){hG.C.yj.call(this);this.ra||zm(this.a);iG(this);var a=this.app.J();a.U&&this.addClass(a.U+"-theme");a.nf&&this.addClass("house-brand");!a.of&&a.ve||this.addClass("modest-branding");a.oj&&this.addClass("html5-hide-share");a.om||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.Ub||this.addClass(gG[a.Bh]);var b=yb(new C(this.a.clientWidth,this.a.clientHeight)).toFixed(1);"1.3"!=b&&
801 "1.8"!=b||this.addClass("autohide-aspect");a.Tb&&this.tf();this.H=E("html5-watermark",this.a);jG(this.app)&&an(this.H);a.ve&&!a.Ub&&(this.B=new Ju(this.A),Ku(this.B,this.ea),L(this,this.B),this.Ia=new aG(this.app,this.B),L(this,this.Ia));var b=E("html5-context-menu",this.a),c=E("html5-modal-panel",this.a),d=this.N=new vF(this.app);d.Zb=b;F(d.Zb);document.body.appendChild(d.Zb);var e=d.b;e.De=c;e.Tj=E("html5-modal-panel-close-button",c);e.Sj=E("html5-modal-panel-clipboard-substitute-content",c);e.Ce=
802 Ue("input",e.Sj);cc&&e.Ce.removeAttribute("readonly");e.a.listen(document,"keydown",e.Or);e.a.listen(c,"contextmenu",e.Nr);fo(e.a,e.Tj,"down",e.Mr);fo(e.a,e.Ce,"down",e.dn);var c={Fr:d.Pr,Gr:d.Qr,Hr:v(d.hn,d,!1),Ir:v(d.hn,d,!0),Kr:d.Sr,Lr:d.Tr,Jr:d.Rr},g;for(g in c)wF(d,g,c[g]);L(this,this.N);a.nf&&V(b,"house-brand");this.k=new it(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.T(this.g);L(this,this.k);g=E("html5-info-bar",
803 this.a);this.o=new MF(g,this.A,this.app);this.o.Rj();L(this,this.o);this.I=new TE(a.kc);this.I.T(this.g);L(this,this.I);this.$=new RE;this.$.T(this.g);L(this,this.$);kG(this)};f.zl=function(a){hG.C.zl.call(this,a);lG(this,a);this.i&&EF(this.i)};f.xk=function(){hG.C.xk.call(this);lG(this,nF(this))};f.Ll=function(a,b){hG.C.Ll.call(this,a,b);"newdata"==a&&this.o.reset();this.o&&this.o.update(b);if(jG(this.app)){var c=b.Ma;c&&(this.H.src=c);an(this.H)}};
804 f.kx=function(a){2==a?mG(this):(this.I.hide(),this.removeClass("cued-mode"));3==a?this.k.show():P(xg(this.app),1)||this.k.hide()};
805 f.mx=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.oa&&am(this.a,this.oa);$l(this.a,b);this.oa=b;P(a.state,1)?this.k.show():0>ao(a,1)&&this.k.hide();this.za=P(a.state,8)&&!P(a.state,4);0>ao(a,64)&&nG(this.app)};f.lx=function(a){P(a.state,2)?mG(this):0>ao(a,2)&&(this.I.hide(),this.removeClass("cued-mode"))};
806 function kG(a){var b=a.app.J();if(b.um){if(b.Gb){var c=v(function(a){return oG(a)||Zl(a.target,"html5-draggable")},a);a.O=new Gt(a.a,v(function(a){Zl(this.a,"cued-mode")?Nm.hasTags(void 0)&&this.mo(a):oG(a)&&(this.K?this.Sk():this.ak(),this.B&&(a=mr.getInstance(),a.Ef&&rr(a,a.Ef)))},a),!1,c);K(a.a,"gesturechange",v(a.Bu,a));K(a.a,"gestureend",v(a.Cu,a))}else K(a.a,"click",v(a.mo,a)),K(a.a,"dblclick",v(a.Au,a)),K(a.a,"click",v(a.Sk,a)),K(a.a,"mousemove",v(a.Sk,a)),K(a.a,"mouseout",v(a.ak,a));var d=
807 v(function(){var a=this.b;a&&(wi(a),Nm.fillPool(4),b.Gb&&Kt(),(a=tf(this.a,"click",d,!0))&&vf(a))},a);K(a.a,"click",d,!0);K(a.a,"keypress",v(a.Eu,a));K(a.a,"keydown",v(a.zu,a));c=v(a.N.yu,a.N);qi&&a.O?a.O.o=c:K(a.a,"contextmenu",c);K(a.H,"click",v(a.no,a));a.o.D("title-click",v(a.no,a));a.o.D("share-click",v(a.Fu,a));a.o.D("info-click",v(a.Du,a))}}f.mo=function(a){var b=this.app.J();oG(a)&&(this.a.focus(),!Zl(this.a,"cued-mode")&&b.Ub||eG(this.app,!0));xF(this.app,"screenclick")};
808 f.Au=function(a){6!=this.app.o&&(oG(a)&&(a=this.app,dG(a,!a.a.Ab)),xF(this.app,"screendoubleclick"))};f.Bu=function(a){var b=a.scale,c=this.app.J().Ab;b*(c?-1:1)>(c?-0.7:1.3)&&(b=this.app,dG(b,!b.a.Ab));a.preventDefault()};f.Cu=function(a){a=a.scale;var b=this.app.J().Ab;a*(b?-1:1)>(b?-0.9:1.1)&&(a=this.app,dG(a,!a.a.Ab))};function oG(a){return!ed(a.target,"html5-stop-propagation")}
809 f.Eu=function(a){var b=a.keyCode;if(179==b||178==b)179==b&&(this.u("playpausetoggled",!0),a.preventDefault()),178==b&&(Vf(this.app),a.preventDefault());98==b&&this.app.af("onBackgroundChange");111==b&&this.app.af("onTextOpacityChange");119==b&&this.app.af("onWindowOpacityChange");61!=b&&43!=b||this.app.af("onFontSizeIncrease");45!=b&&95!=b||this.app.af("onFontSizeDecrease");32==b&&oG(a)&&(eG(this.app,!0),a.preventDefault());48<=b&&57>=b&&(Rf(this.app,(b-48)/10*Fg(this.app)),a.preventDefault())};
810 f.zu=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,fG(c,{volume:c.xa.volume+5,muted:!1});else if(40==b)c=this.app,fG(c,{volume:c.xa.volume-5,muted:!1});else if(37==b){var d=this.app,c=-1*c;Rf(d,d.getCurrentTime()+c,!1,250,void 0)}else 39==b&&(d=this.app,Rf(d,d.getCurrentTime()+c,!1,250,void 0));a.preventDefault()}36==b&&(Rf(this.app,0),a.preventDefault());35==b&&(Rf(this.app,Infinity),a.preventDefault());27==b&&(dG(this.app,!1),a.preventDefault())};
811 f.no=function(a){a.preventDefault();a=this.app;var b;b=a.getVideoData();b=b.Oc||ot(a.a,b);zF(a,b)};f.Fu=function(){this.app.Gh();dG(this.app,!1);var a=this.app,b=a.getVideoData();a.u("SHARE_CLICKED",{videoId:b.L,listId:b.Na,feature:"player_"+a.a.Y})};f.Du=function(){this.app.Gh()};f.px=function(){var a=this.o;W(a.a,"show-share");W(a.a,"show-more-info")};f.Sk=function(){this.ua=!0;this.ba.start();this.K&&(this.K=!1,this.removeClass("hide-controls"),this.app.cb("onShowControls"))};
812 f.ak=function(){this.ua=!0;this.ba.stop();if(!this.K){var a;if(a=this.B){a=this.B;var b=mr.getInstance();a=!!b.Ef&&Te(b.Ef,a.kg)||null!=a.j}b=(b=dg(this.app.k,"playlist"))&&b.Z;this.za&&this.ua&&!a&&!b&&(this.K=!0,this.addClass("hide-controls"),this.app.cb("onHideControls"))}};function mG(a){a.I.show(a.app.getVideoData());a.addClass("cued-mode")}f.Bj=function(){var a=Jc("html5-popup-dialog",this.a);z(a,function(a){bn(a)},this)};
813 f.ox=function(a){this.i||(this.i=new DF,this.i.T(this.a),L(this,this.i));var b=this.app.J(),c=a.message;a=a.messageKey;if(!b.nf&&"HTML5_DEFAULT_FALLBACK"==a){c+=J("LEARN_MORE");a=this.i;for(var d=v(this.app.qf,this.app,"",{errorHelpClick:1}),e=a.element.getElementsByTagName("a"),g=0;g<e.length;g++)a.b.push(K(e[g],"click",d));this.app.qf("",{errorHelpShown:1})}a=this.i;b="embedded"==b.Y;vf(a.b);a.b=[];xm(a.template,"content",new xu(c));if(b)for(b=a.element.getElementsByTagName("a"),c=0;c<b.length;c++)b[c].setAttribute("target",
814 "_blank");this.i.show()};f.nx=function(){this.i&&this.i.hide()};f.Ip=function(a){var b=this.$;b.show(a);H(oa(V,b.element,"html5-bezel-fade"),0);b.a=H(v(b.hide,b),300)};f.Ko=function(a){E("html5-viewport-sheet").disabled=!a};f.tf=function(){var a=this.app.J();Oe(document.body,"player-size",a.Ab?"fullscreen":a.Od?"large":"small");hG.C.tf.call(this)};
815 function pG(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 lG(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=tb(e/g,0.5,1);d={Ib:a.ca,reset:!0};a.ca=Em(".ytp-scalable-icon-shrink",pG(c,!1),d);c=tb(0.33*(e/g),0.5,1);d={Ib:a.da,reset:!0};a.da=Em(".ytp-scalable-icon-grow",pG(c,!0),d)}}
816 f.Cj=function(a){this.B&&Pu(this.B,a)};function iG(a){a.A=new FF;a.A.b=a;var b=new TF(a.a,a.app.J());L(a,b);a.A.a=b;a=Jc("ytp-tooltip-anchor",a.a);z(a,function(a){Pm(b,a)})}f.F=function(){this.k.hide();Fm(this.ca);Fm(this.da);Af(this.a);Af(this.H);Nf(this.O);hG.C.F.call(this);this.H=this.I=this.da=this.ca=this.O=this.$=null};function ig(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 fg(a,b,c,d)}function fg(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 qG(){this.a={};this.i=this.j=NaN;this.B=0;this.A=!0}var rG={"-1":"N",3:"B",0:"EN",2:"PA",1:"PL"};function Fy(a){return(w()-a.B)/1E3}
817 qG.prototype.k=function(){var a={},b;for(b in this.a)0<this.a[b].length&&(a[b]=this.a[b].join(","),this.a[b]=[]);if(!Ib(a)){var c={},d=Fy(this);if(!isNaN(d)){d=d.toFixed(3);if(this.o){var e=this.o.g,g=this.o.i;0<e&&(a.bwm=d+":"+e+":"+g.toFixed(3));e=this.o;e.i=0;e.g=0}e=gx(this.g);"hmewdrop"in e&&(a.df=d+":"+e.hmewdrop)}c.event="streamingstats";this.b.a&&(c.fmt=this.b.a.Sa);c.cpn=this.b.Ca;c.ei=this.b.j;c.docid=this.b.L;c.ns=this.g.Vb;this.g.j&&(c.adformat=this.g.j);this.b.Fb&&(c.live=this.b.bb?"dvr":
818 "live");c.html5="1";c=S(ax(this.g)+"stream_204",c);for(b in a)c+="&"+b+"="+a[b];Kf(c);sG(this)}tG(this)};function uG(a){vG(a);wG(a);for(var b in a.a)a.a[b]=[]}qG.prototype.onError=function(a){var b=Fy(this);isNaN(b)||this.a.error.push(b.toFixed(3)+":"+a+":"+this.b.ue.toFixed(3))};function tG(a){vG(a);a.j=jf(v(a.k,a),1E4)}function vG(a){isNaN(a.j)||(kf(a.j),a.j=NaN)}function sG(a){wG(a);a.i=jf(v(a.H,a),3E4)}function wG(a){isNaN(a.i)||(kf(a.i),a.i=NaN)}
819 function Gy(a,b,c){void 0!=c&&(a.a.vps.push(b.toFixed(3)+":"+c),a.G=c)}qG.prototype.H=function(){if("PL"==this.G){var a=Fy(this);isNaN(a)||(Gy(this,a,this.G),this.k())}};function xG(a,b,c,d){c=c||"";this.i=[];this.j=[];this.H=[];this.B="watchtime"==c;this.pd=ax(b)+"api/stats/"+c;d&&(this.gm=d.fs,this.R=d.nbe,this.S=d.bc,this.U=d.bd,this.Lc=d.bt,d.rtn&&(this.k=d.rtn),this.B?(this.oa=d.state,0<d.rti&&(this.o=d.rti)):(this.ca=d.mos,this.rb=d.volume,d.at&&(this.K=d.at),d.allowed&&(this.O=d.allowed),d.ex_ads&&(this.da=d.ex_ads)));this.I=b.j;this.yh=b.Sb;this.$=b.o;this.Pc=b.G;this.La=b.A;this.Ra=b.B;this.gb=b.eg;this.hb=b.jf;this.qb=b.H;this.Nc=b.I;this.Hc=b.K;this.Dc=
820 b.N;this.Gc=b.O;this.b=b.b;this.Ec=b.Y;this.H=b.g;this.ea=b.ea;this.Ic=b.i;this.im=b.Vb;this.Fc=b.Ja;this.referrer=b.referrer;this.Jc=b.S;this.A=b.k;this.nd=b.oa;this.ua=b.ra;this.va=b.ua;this.od=hx(b);!a.a||a.da.isEmpty();this.yh=a.hf||this.yh;this.za=a.Ca;this.Ia=a.ue;this.ba=a.K;this.Ma=a.La;this.a=a.a;this.hm=a.Nd;this.Oc=a.cg;a.Fb&&(this.fa=a.bb?"dvr":"live");this.Mc=a.uh;this.qd=a.qd;this.ab=a.ab;this.Kc=a.j;this.Na=a.Na;this.A=a.ea||this.A;this.ra=a.oa;this.g=a.g;this.L=a.L}f=xG.prototype;
821 f.yh=!1;f.nj=!1;f.km=!1;f.gm=!1;f.fg=!1;f.hm=!1;f.im="yt";f.cq=!1;f.send=function(){if(!this.cq){var a=this.xi(),a=S(this.pd,a);Kf(a);this.cq=!0}};
822 f.xi=function(){var a={ns:this.im,el:this.Ec,hl:this.Ic,cr:this.Jc,cpn:this.za,docid:this.L,ver:2,referrer:this.referrer,cmt:this.Ae(this.Ia),plid:this.ab,ei:this.Kc,fmt:this.a?this.a.Sa:0,fs:this.gm?"1":"0",rt:this.Ae(this.N),c:this.gb,cver:this.hb,subscribed:this.g,lact:this.od,cplatform:this.Gc,cbrand:this.Pc,cmodel:this.qb,cnetwork:this.Nc,cbr:this.La,cbrver:this.Ra,cos:this.Hc,cosver:this.Dc,q:this.nd};this.yh&&(a.autoplay="1");this.km&&(a["final"]="1");this.hm&&(a.splay="1");this.ij&&(a.ssrt=
823 "1");this.ba&&(a.delay=this.ba);this.I&&(a.adformat=this.I);this.$&&(a.content_v=this.$);void 0!=this.ua&&this.va&&(a.uga=this.va+this.ua);void 0!=this.G&&(a.len=this.Ae(this.G));!this.B&&0<this.H.length&&(a.fexp=this.H.toString());void 0!=this.ca&&(a.mos=this.ca);void 0!=this.rb&&(a.volume=this.rb);void 0!=this.oa&&(a.state=this.oa);void 0!=this.k&&(a.rtn=this.Ae(this.k));this.A&&(a.feature=this.A);this.Na&&(a.list=this.Na);this.ra&&(a.ytr=this.ra);this.B?(a.idpj=this.Oc,a.ldpj=this.Mc,void 0!=this.o&&
824 (a.rti=this.Ae(this.o))):(void 0!=this.K&&(a.at=this.K),void 0!=this.O&&(a.allowed=this.O),void 0!=this.da&&(a.ex_ads=this.da));void 0!=this.fa&&(a.live=this.fa);this.ea||(a.ps=this.Fc,a.sw=this.Ma,this.S&&(a.bc=this.S),this.U&&(a.bd=this.U,a.bt=this.Lc),0<this.R&&(a.nbe=this.R));!this.fg&&0<this.i.length&&(a.st=this.i.map(this.Ae).join(","),a.et=this.j.map(this.Ae).join(","));return a};f.Ae=function(a){return(1*a.toFixed(3)).toString()};function yG(a,b,c,d){this.i=[];this.j=[];this.A=[];this.jm=b.fj;c&&(this.R=c.nbe,this.S=c.bc,this.U=c.bd,this.Kc=c.bt,this.$l=c.fs,this.am=c.mos,this.ij=c.ssrt,this.source=c.sourceid,this.za=c.sd,this.sq=c.hmewadbc,this.va=c.hmewdfc,this.tq=c.hmewdrop,this.uq=c.hmewvdbc,this.Fc=c.hmemdf,this.Jc=c.hmempaintdelay,this.nd=c.hmempainted,this.fa=c.hmempf,this.pd=c.hmempresented,this.te=c.volume);this.lj=b.lj;this.xh=b.Sb;this.$=b.o;this.La=b.G;this.Ra=b.A;this.gb=b.B;this.hb=b.eg;this.qb=b.jf;this.Nc=
825 b.H;this.Hc=b.I;this.Dc=b.K;this.Gc=b.N;this.Lc=b.O;this.b=b.b;this.Oc=b.Y;this.A=b.g;this.Ic=b.R;this.Mc=b.i;this.dm=b.Vb;this.dg=b.dg?"1":void 0;this.I=dx(b);this.od=b.Ja;this.referrer=ex(b);this.hj=b.S;this.B=b.k;this.K=new C(window.screen.width,window.screen.height);this.fj=b.oa;this.oa=b.ra;this.rb=b.ua;this.Yl=hx(b);this.O=Mv(b);this.ua=b.hb;this.Ul=b.$;!a.a||a.da.isEmpty();this.xh=a.hf||this.xh;this.Ia=a.Ca;this.Ma=a.Fc;this.ea=a.K;this.Pc=a.La;this.a=a.a;this.bm=a.Nd;this.ba=a.cg;a.Fb&&(this.da=
826 a.bb?"dvr":"live");this.ca=a.uh;this.qd=a.qd;this.ab=a.ab;this.Ec=a.j;this.Na=a.Na;this.bg=a.fa;this.B=a.ea||this.B;this.jj=a.oa;this.fm=a.gj;this.g=a.g;this.Zl=a.Jc;this.L=a.L;this.ra=a.da;this.H=d||[]}f=yG.prototype;f.xh=!1;f.nj=!1;f.$l=!1;f.fg=!1;f.am=!1;f.bm=!1;f.ij=!1;f.dm="yt";f.fm=!1;f.iq=!1;f.send=function(){if(!this.iq){var a=this.xi(),a=S(this.jm,a);Kf(a);this.iq=!0}};
827 f.xi=function(){var a={html5:"1",ns:this.dm,ps:this.od,el:this.Oc,hl:this.Mc,cr:this.hj,c:this.hb,cpn:this.Ia,docid:this.L,sd:this.za,sourceid:this.source,referrer:this.referrer,q:this.fj,plid:this.ab,ei:this.Ec,fmt:this.a?this.a.Sa:0,fs:this.$l?"1":"0",screenw:this.K.width,screenh:this.K.height,w:this.O.width,h:this.O.height,vw:this.ra.width,vh:this.ra.height,playerw:this.I.width,playerh:this.I.height,vid:this.Ul,rt:this.Eh(this.N),mos:this.am,volume:this.te,app:this.lj,csipt:this.Ma,on3g:this.dg,
828 partnerid:this.qd,sdetail:this.bg,subscribed:this.g,sw:this.Pc,list:this.Na,eurl:this.b,framer:this.Ic,feature:this.B,ytr:this.jj,threed:this.Zl,lact:this.Yl,cver:this.qb,cplatform:this.Lc,cbrand:this.La,cmodel:this.Nc,cnetwork:this.Hc,cbr:this.Ra,cbrver:this.gb,cos:this.Dc,cosver:this.Gc};this.fg&&(a.playback="1");this.xh&&(a.autoplay="1");this.bm&&(a.splay="1");this.ij&&(a.ssrt="1");this.ea&&(a.delay=this.ea);this.fm&&!this.fg&&(a.vtmp="1");this.nj&&(a.tv="1");this.$&&(a.content_v=this.$);void 0!=
829 this.oa&&this.rb&&(a.uga=this.rb+this.oa);void 0!=this.G&&(a.len=this.Eh(this.G));0<this.A.length&&(a.fexp=this.A.toString());0<this.ba&&(a.idpj=this.ba);0<this.ca&&(a.ldpj=this.ca);void 0!=this.ua&&(a.attrib=this.ua);void 0!=this.da&&(a.live=this.da);this.S&&(a.bc=this.S);this.U&&(a.bd=this.U,a.bt=this.Kc);0<this.R&&(a.nbe=this.R);void 0!=this.va&&(a.hmewdfc=this.va,a.hmewdrop=this.tq,a.hmewvdbc=this.uq,a.hmewadbc=this.sq);void 0!=this.fa&&(a.hmempf=this.fa,a.hmemdf=this.Fc,a.hmempresented=this.pd,
830 a.hmempainted=this.nd,a.hmempaintdelay=this.Jc);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.H.length;b++)Cb(nA(this.H[b]),function(b,d){d in a||(a[d]=b)});return a};f.Eh=function(a){return(1*a.toFixed(3)).toString()};function zG(){this.o=[];this.k=[];this.G=[10,10,10,40];this.j=new qG;this.B="paused";this.g=this.I=0;this.N=!1}y(zG,Lf);f=zG.prototype;f.we=NaN;f.Fl=0;f.In=0;f.Pj=null;f.Sm=null;f.Om=function(){return[]};f.lf=null;f.lm="";f.Rc=0;f.bp=0;f.Lo=!1;f.tj=0;f.pf=0;f.Pg=0;f.mg=0;function AG(a){var b=a.Sm();a.Pj&&pa(b,a.Pj());return b}
831 f.rj=function(a){this.Fl=Math.min(this.Fl+1,this.G.length-1);var b=this.G[this.Fl];this.I=this.g;a&&(this.g=(w()-this.pf)/1E3);this.g+=b;a=Ly(this,"watchtime");a.k=this.g;a.o=this.I;BG(this);Oy(this,a);My(this);this.we=jf(v(this.rj,this),1E3*b)};function My(a){isNaN(a.we)||(kf(a.we),a.we=NaN)}f.Bq=function(){var a=this.lf(),b=(w()-this.pf)/1E3,c=a-this.Rc;if(0!=c){var d=b-this.tj;if(0>c||c>d+0.2)BG(this),this.mg=a;this.tj=b}this.Rc=a};
832 function BG(a){if(400<a.In)My(a);else if(3<a.Rc-a.mg||a.b.ba)a.o[a.Pg]=a.mg,a.k[a.Pg]=a.Rc,a.Pg++,a.mg=a.Rc}function Ly(a,b){var c=AG(a),d=a.Om();a.b.ba?(pa(c,{state:a.B}),z(d,function(a){pa(c,nA(a))}),d=new xG(a.a,a.b,b,c)):d=new yG(a.a,a.b,c,d);d.N=(w()-a.pf)/1E3;d.G=a.K();return d}
833 function Ny(a){var b=a.b;a=a.a;var c=a.ea||b.k,c={ns:b.Vb,html5:"1",el:b.Y,ps:b.Ja,fexp:b.g.join(",")||void 0,feature:c||void 0,ytr:a.oa||void 0,list:a.Na,d:b.va,f:b.da};b.Sb&&(c.autoplay="1");a.g&&(c.subscribed=a.g);return c}function py(a){a.pf=w();a=a.j;uG(a);a.a.vps.push("0.000:N");a.B=w();tG(a);sG(a)}f.onError=function(a){this.j.onError(a)};
834 function Qy(a,b){P(b.state,8)?(a.B="playing",a.i&&!a.we&&a.a.ig&&a.rj(!0)):a.B="paused";if(P(b.state,2)){My(a);var c=Ly(a,"watchtime");c.o=null;c.k=null;BG(a);Oy(a,c)}var c=a.j,d=b.state;t:{var e=Fy(c);if(!isNaN(e)){var g=b.state,h;if(!P(g,32)&&0<ao(b,16)||0<ao(b,32)){if(P(b.a,32))break t;h="S"}P(g,128)&&(h="ER");h||(h=rG[Ki(g)],"B"==h&&P(g,4)&&(h="PB"));null!=h&&Gy(c,e,h)}}P(d,8)&&(isNaN(c.j)&&tG(c),isNaN(c.i)&&sG(c));if(0<ao(b,256)||P(d,128))c.onError(d.a.errorCode);(P(d,2)||P(d,128))&&c.k()}
835 function Oy(a,b){if(b||0<a.Pg&&a.a.ig){var c=b||Ly(a,"watchtime"),d=!0;a.o.length&&a.k.length&&(c.i=a.o,c.j=a.k,d=c.i[c.i.length-1]==c.j[c.j.length-1]);a.Lo&&d||(d&&(c.k=null),c.send(),a.In++);a.Lo=d;a.o=[];a.k=[]}a.Pg=0}function yy(a,b,c){b.rt=(w()-a.pf)/1E3;pa(b,AG(a));a=S("streamingerror"==b.event?"//s.youtube.com/stream_204":a.b.ib+"player_204",Ny(a));a=S(a,b);Kf(a,c)}
836 function uy(a,b){var c=a.b,d=a.a,e={ns:c.Vb,el:c.Y,eurl:c.b,fmt:d.a?d.a.Sa:0,html5:1,list:d.Na,plid:d.ab,ei:d.j,ps:c.Ja,noflv:1,st:a.lf(),video_id:d.L};c.Sb&&(b.autoplay="1");d.kj&&(b.tmi="1");pa(e,b);pa(e,bx(c));Kf(S("//www.youtube.com/live_204",e))}f.log_=function(){};f.F=function(){zG.C.F.call(this);My(this);void 0!=this.A&&kf(this.A)};function CG(a,b,c){R.call(this);this.o=1;this.$={};this.D("openingpage",v(this.Qq,this));this.D("initializingmode",v(this.Nq,this));this.D("internalenvironmentdatachange",v(this.Mq,this));this.D("internalvolumechange",v(this.ym,this));this.K=null;b instanceof Ef||(b=new Ef(b));this.K=b;b=this.K.args;Nf(this.a);this.a=new Ww(b||{});this.u("internalenvironmentdatachange","newdata");this.ba=Yw(this.a)?new yg(this,1):new Pf(this,1);L(this,this.ba);this.U=new Gg(this);L(this,this.U);this.I=new Gg(this,
837 1);L(this,this.I);this.R={};this.da=Nb(["internalvideodatachange",this.Gq,"liveviewshift",this.Oq,"commoninfoloaded",this.Lq,"playbackready",this.Hq,"playbackstarted",this.Iq,"statechange",this.Jq,"videoelementevent",this.er]);this.fa=new hh(this.a);this.k=new tw;L(this,this.k);this.b=null;b=new gy(this.a,1);if(this.b!=b){if(this.b){var d=this.b,e=this.da,g;for(g in e)d.W(g,e[g],this)}b.ea=this.fa;g=this.da;for(var h in g)b.D(h,g[h],this);this.b=b}this.ca=Nb(["beginseeking",this.Kq,"endseeking",this.ar,
838 "internalvideodatachange",this.Hm,"internalvideoformatchange",this.Yq,"progresssync",this.Uq,"seekto",this.Vq,"onLoadProgress",this.Pq,"onVideoProgress",this.Zq,"newlicensesession",this.br,"playbackdataloaded",this.Sq,"playbackready",this.Rq,"statechange",this.Tq]);this.j=null;qz(this,this.b);this.ea=-1;this.H=this.A=null;this.B={};this.N=null;this.O={};this.S=null;c?this.P=c(this):this.P=new hG(this);L(this,this.P);this.P.D("templateerror",this.Wq,this);this.P.D("templateready",this.Xq,this);this.P.D("resize",
839 this.dr,this);Er("fs");c=this.P;c.fa=a;c.xj()||c.u("templateerror");a=this.k;c={};c.loaded=v(this.Am,this);c.unloaded=v(this.Bm,this);c.command_pause=DG(this.Sd,this);c.command_play=DG(this.Ud,this);c.command_seek=DG(this.sf,this);c.command_disable_controls=v(this.og,this);c.command_enable_controls=v(this.Ih,this);c.command_redirect_controls=v(this.Fm,this);c.command_stop_redirect_controls=v(this.Hh,this);c.command_redirected_show_is_playing=v(this.P.Cj,this.P);c.command_progress=v(this.mj,this);
840 c.command_add_cuerange=v(this.zm,this);c.command_remove_cuerange=v(this.Dm,this);c.command_remove_cuerange_all=v(this.Em,this);c.command_preroll_ready=v(this.Gm,this);c.command_hide_all_dialogs=v(this.P.Bj,this.P);c.command_clear_video_overlays=v(this.Gh,this);c.command_log=v(this.qf,this);c.publish_external_event=v(this.Cm,this);c.module_menu_add=v(this.Eq,this);c.module_menu_remove=v(this.Fq,this);a.j=c;c=this.U;a.b!=c&&(uw(a),a.i={},a.b=c)}y(CG,R);f=CG.prototype;f.Wd=null;f.list=null;f.Xe=!0;
841 f.xa=null;f.Gf=null;f.Dg=1;f.P=null;f.kk=null;f.Df=null;f.Uk=!1;f.Bi=null;f.oo=0;var EG={};
842 function FG(a){var b=Nm.getTag();a.i=b;a.Wd=a.i;a.j&&Ay(a.j,b);Di(a.i,a.Dg);if(a.a.Pd)a.Df&&vf(a.Df),a.Df=K(a.i,"volumechange",v(a.Lt,a),!1);else{var b=a.i,c=a.xa.muted;b.volume=a.xa.volume/100;b.muted=c}b=a.P;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.Ub&&c.ve&&b.b.setAttribute("controls",!0);c.Ah&&b.b.setAttribute("webkit-playsinline",!0);b.b.setAttribute("x-webkit-airplay","allow");a.a.Wa=a.i}
843 function GG(a){if(a.i){a.Df&&(vf(a.Df),a.Df=null);a.j&&Mm(a.j);var b=a.P;b.b&&(F(b.b),b.b=null);a.a.Wa=null;Nm.releaseTag(a.i);a.i=null}}function Jm(a,b){a.a.tb?(a.N&&(md(a.i,a.N.left,a.N.top),yd(a.i,new C(a.N.width,a.N.height)),a.N=null),Ci(a.i),Mm(a.j),Ay(a.j,a.i),Di(a.i,a.Dg)):Nm.releaseTag(b)}function qz(a,b){if(a.j!=b){a.j&&(uw(a.k),sz(a,a.j));a.R[b.B]=b;a.j=b;a.i&&Ay(b,a.i);var c=a.ca,d;for(d in c)b.D(d,c[d],a);a.u("videoplayerchange",b);ly(b)&&HG(a)}}
844 function sz(a,b){Mm(b);var c=a.ca,d;for(d in c)b.W(d,c[d],a);b!=a.b&&(c=b.B,a.R[c]==b&&delete a.R[c]);b==a.j&&(a.j=null,b!=a.b&&qz(a,a.b))}function O(a,b){return b?a.R[b]||null:a.j}function HG(a){var b=a.j.getVideoData();a.Hm("newdata",a.j,b);var c=a.k;z([co,Uv,An,pw,Dt,$v,dw,jw,ys],c.B,c);a.u("videoready",b);6!=a.o&&ty(a.j)}f=CG.prototype;f.Hq=function(){IG(this,5)};f.Rq=function(a){a=a.i;P(a,8)&&!P(a,2)&&this.Ud()};
845 function Cg(a){!a.H&&a.I.J().Ig&&(a.H=new cF(a),a.H&&JG(a,a.H));var b=a.H;b&&!b.Hd&&b.Xa(a.I)&&b.create()}
846 function JG(a,b){L(a,b);b.D("loaded",a.Am,a);b.D("unloaded",a.Bm,a);b.D("command_pause",DG(a.Sd,a));b.D("command_play",DG(a.Ud,a));b.D("command_seek",DG(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.P.Cj,a.P);b.D("command_progress",a.mj,a);b.D("command_add_cuerange",a.zm,a);b.D("command_remove_cuerange",a.Dm,a);b.D("command_remove_cuerange_all",
847 a.Em,a);b.D("command_preroll_ready",a.Gm,a);b.D("command_hide_all_dialogs",a.P.Bj,a.P);b.D("command_clear_video_overlays",a.Gh,a);b.D("command_log",a.qf,a);b.D("publish_external_event",a.Cm,a);b.D("command_log_timing",a.k.A,a.k)}function Dg(a){a&&a.Hd&&a.destroy()}f.cb=function(a,b){this.u.apply(this,arguments);this.af.apply(this,arguments)};f.Vi=function(a,b){var c=Ya(arguments);Yw(this.a)&&c.push(this.j.B);this.u.apply(this,c)};f.J=function(){return this.a};
848 f.getVideoData=function(a){return(a=O(this,a))?a.getVideoData():null};f.log_=function(){};f.Nq=function(){kf(0);this.a.Pd||this.ym(this.xa)};f.uj=function(){var a=gx(this.a);a.fs=this.a.Ab;a.volume=Math.round(this.xa.volume);a.mos=this.xa.muted?1:0;this.a.jj&&this.g&&this.g.g&&"WL"==this.g.g.type&&(a.ssrt=1);return a};f.or=function(){var a=xw(this.k);if(this.A){var b=this.A.Oi();b&&a.push(b)}return a};f.Wq=function(){sw(this.b,5,void 0,void 0)};
849 f.Xq=function(){this.a.nk=this.P.a;this.P.yj();var a=this.ba;a.b=this.P.a;for(var b in a.g)a.b[b]=a.g[b];for(b in a.j)a.b[b]=a.j[b];a=v(this.du,this);b=document;var c=Xe("fullscreenchange",b);"msfullscreenchange"==c&&(c="MSFullscreenChange");this.kk=c?K(b,c,a):null;a=this.K.args;this.a.pj?this.xa=gh():this.xa||(this.xa={volume:100,muted:!1,nonNormalized:100});FG(this);b=new hg(a);iy(this.b,b);c=this.getVideoData();if("detailpage"==this.a.Y){var d;d=c.L;var e=fh("yt-player-restore-playhead");d=e?e[d]:
850 void 0;d&&(c.ya=d)}ch("yt-player-restore-playhead");this.a.Sc=nF(this.P);"detailpage"!=this.a.Y&&a&&(a.playlist||a.list||a.api)&&(KG(this,a),b.L||b.mf||(a=this.g,b=v(this.Jn,this),a.Ne=b,a.be&&H(a.Ne,0)));if(a=this.K.args.jsapicallback)ha(a)||(a=n(a)),a&&DG(v(a,l,this.a.qj),l);this.a.Ig=Bg(this.a)&&(!Ra(XA())||!Ra(ZA()));yk()?this.a.qm?LG(this):"leanback"!=this.a.Y&&MG(this):sw(this.b,5,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",void 0);this.P.xk()};function MG(a){a.u("initializingmode");IG(a,2)}
851 function LG(a){a.u("initializingmode");qz(a,a.b);IG(a,3);a.a.tb||(GG(a),FG(a),Ay(a.b,a.i));ny(a.b);NG(a,3)}function DG(a,b){return function(){var c=Array.prototype.slice.call(arguments);H(function(){a.apply(b||this,c)},0)}}f.qf=function(a,b,c){var d=O(this);b.event=a;d.j&&yy(d.j,b,c)};function Yf(a,b){if(!isNaN(b)&&a.i){var c=1,c=a.a.jg?Zf:[1],c=1>b?Na(c,function(a){return a>=b}):Pa(c,function(a){return a<=b});a.Dg!=c&&(a.Dg=c,a.b==a.j&&Di(a.i,c),a.u("onPlaybackRateChange",c))}}
852 function $f(a,b){var c=a.getVideoData(b);return c&&c.a?c.a.a.i:"unknown"}function cG(a){return(a=O(a,void 0))?ay(a.ba,a.a):"unknown"}f.getCurrentTime=function(a){return(a=O(this,a))?a.getCurrentTime():0};function Fg(a,b){var c=O(a,b);return c?c.rd():0}function bg(a,b){var c=a.getVideoData(b);if(!c)return[];c=Ja(c.k,function(a){return a.mc.a.i});bb(c);return c}
853 function lg(a,b){var c=a.b,d={};if(b&&c.j){var e=Ly(c.j);e&&pa(d,e.xi())}b&&P(c.i,384)&&(d.debug_error=c.i.a);d.debug_videoId=c.a.L;d.debug_playbackQuality=$f(a);d.debug_date=(new Date).toString();return mb(d)}
854 function Zv(a,b){var c=a.getVideoData(),d=!!c.S||!!c.Jf||!b;a.u("threedenabled",d);d&&a.i.setAttribute("mozStereoMode","1");Vv()&&(a.i.setAttribute("mozStereoMode",d?"1":"0"),c=ok[d?c.te:0],d=document.createElement("NvStereoExtDataElement"),d.setAttribute("stereoMode",c),Uc(document.documentElement,d),Bf(d,"3DModeEvent"))}function xg(a){return(a=O(a,1))&&a.i}
855 f.er=function(a){var b=a.target;switch(a.type){case "loadedmetadata":Gr("fvb")||Er("fvb");this.P.tf();break;case "loadstart":Gr("gv")||Er("gv");break;case "progress":case "timeupdate":Gr("l2s")||(a=zi(b),a<b.buffered.length&&2<b.buffered.end(a)&&Er("l2s"))}};f.br=function(a){if(this.Uk){var b=this.oo.toString();this.oo++;this.Bi[b]=a;a={request:Ya(a.b[0]?a.b[0].message:null),sessionId:b,system:a.j.a,url:a.k};this.u("onNewLicenseSession",a)}else a.start()};
856 f.Pq=function(a,b){this.Vi("onLoadProgress",b)};f.Zq=function(a,b){this.Vi("onVideoProgress",b)};
857 f.Uq=function(a,b,c,d,e){if(!e&&a.hg()&&!sy(a)){e=a.getVideoData();if(this.a.Rd&&e.wa&&!e.Ym&&e.ye>=e.vm){var g;g=a.J();var h=tb(e.ue/e.wa,0,1),h={html5:"1",video_id:e.L,eurl:g.b,framer:g.R,feature:g.k,ps:g.Ja,el:g.Y,hl:g.i,list:e.Na,w:h,l:e.wa,plid:e.ab,ei:e.j,t:e.qb,access_token:e.H,tpmt:e.ye,cpn:e.Ca};g.j&&(h.adformat=g.j);g.referrer&&(h.referrer=ex(g));g.Sb&&(h.autoplay="1");g.Da&&(h.authuser=g.Da);g.Ta&&(h.pageid=g.Ta);e.Nd&&(h.splay="1");e.g&&(h.subscribed=e.g);pa(h,bx(g));g=S(g.ib+"set_awesome",
858 h);Kf(g);e.Ym=!0}e.wa&&e.ye>=e.pm&&OG(this)}this.mj(b,c,d,a)};f.mj=function(a,b,c,d){this.u("progresssync",a,b,c||0,(d||O(this)).B)};
859 f.Jq=function(a){if(!P(a.state,2)||!PG(this)){P(a.state,2)&&(this.Sd(),P(a.a,32)&&this.b.ri(),this.a.kc&&dG(this,!1));if(0<ao(a,256)){var b=a.state.a;wg(this.b,b.errorCode,b.errorDetail)}if(P(a.state,128)&&(b=a.state,kf(0),Xf(this),b=b.a,206==b.errorCode&&wg(this.b,b.errorCode,b.errorDetail),!PG(this))){b.message||(b.messageKey||(b.messageKey="HTML5_DEFAULT_FALLBACK"),b.message=J(b.messageKey));5==b.errorCode&&wg(this.b,208,b.errorDetail);var c=5;206==b.errorCode&&(c=150);A(Fi,b.errorCode)&&(c=b.errorCode);
860 this.u("onError",c);this.u("onDetailedError",b)}this.u("applicationplayerstatechange",a);P(a.state,2)&&(a=this.getVideoData(),a.Fb&&!a.bb&&this.og(["play_pause"]))}};f.Tq=function(a){!P(a.state,32)&&0>ao(a,16)&&(!P(a.state,8)||this.i.ended&&!P(a.state,2)||this.Ud());this.u("presentingplayerstatechange",a);this.af("onStateChange",a);NG(this,Ki(a.state))};
861 f.Gq=function(a,b,c){if("newdata"==a){Dg(this.A);Dg(this.H);a=[];for(var d in this.B)Wf(this,d)&&a.push(d);this.B={};0<a.length&&this.u("controlsenabled",a);this.Hh();this.$={}}this.getVideoData().Lj?(this.Gf=Jb(this.xa),this.og(["audio"]),d=this.i,d.Jk=!0,d.muted=!0):(Wf(this,"audio")&&this.Ih(["audio"]),this.i.Jk=!1,this.Gf&&(fG(this,this.Gf),this.Gf=null));d=this.getVideoData();d.Fb&&!this.a.vj?sw(this.b,205,"DEVICE_FALLBACK",void 0):d.Fb&&!d.bb?this.og(["seek"]):this.Ih(["seek"]);this.getVideoData().dk&&
862 !this.a.wj&&sw(this.b,207,"DEVICE_FALLBACK",void 0);if(c.R||c.i.focEnabled||c.i.rmktEnabled)c=1E3*this.getVideoData().wa,QG(this,"part2viewed",0,c),QG(this,"videoplaytime25",0.25*c,c),QG(this,"videoplaytime50",0.5*c,c),QG(this,"videoplaytime75",0.75*c,c),QG(this,"videoplaytime100",c,2147483647),QG(this,"conversionview",c,2147483647)};
863 f.Hm=function(a,b,c){if("newdata"==a&&(uw(this.k),Yf(this,1),!b.j&&!sy(b))){var d=new zG,e=v(this.uj,this);d.Pj=e;e=v(this.or,this);d.Om=e;hy(b);if(b.a&&!sy(b)){b.j=d;d.O=b.ea;e=v(b.rd,b);d.K=e;e=v(b.getCurrentTime,b);d.lf=e;e=v(b.pr,b);d.Sm=e;e=b.o;d.a=b.a;d.b=e;d.lm=d.b.ib+"get_video";d.i=!1;var e=d.j,g=d.b,h=d.O;e.b=d.a;e.g=g;e.o=h;e.K=new $x(e.g);e.a.bwe=[];e.a.error=[];e.a.vfs=[];e.a.vps=[];e.a.view=[];d.N=!0;b.a.gg&&uy(b.j,{metric:"connected"})}}this.xa.volume=(this.xa.nonNormalized||this.xa.volume)*
864 this.getVideoData().zh;c.vm=Math.min(0.8*c.wa,180);this.cb("videodatachange",a,c,b.B)};f.Yq=function(a,b){var c=this.j.getVideoData();a==c&&this.u("onPlaybackQualityChange",a.a.a.i,b)};f.Mq=function(){"detailpage"==this.a.Y&&zg(this)};function zg(a){var b=RG();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)});KG(a,{videoList:c,loop:b.autoPlay,index:b.index})}}function KG(a,b){Nf(a.g);a.g=new Ol(b)}
865 function QG(a,b,c,d){b in a.$||(c=new nh(c,d,{id:b,priority:1}),c.yb.D("onEnter",a.zp,a),c.yb.D("onExit",a.zp,a),a.b.Mk(c),a.$[b]=c)}f.zp=function(a){var b=a.getId(),c=this.b.getVideoData();"part2viewed"==b?(c.R&&Kf(c.R),c.Lc&&Kf(c.Lc)):"conversionview"==b&&OG(this);c.Ia&&(b=a.getId(),c=Zi(c.Ia,{label:b}),Kf(c));this.b.bi(a)};
866 function OG(a){var b=a.b.getVideoData();b.xo||(b.i.eventLabel=a.a.Y,b.i.playerStyle=a.a.Ja,b.R&&(b.i.feature="pyv"),b.i.vid=b.L,b.i.isAd=!("adunit"!=a.a.Y&&!b.R),HF("view",b.i),b.xo=!0)}function IG(a,b){b!=a.o&&(2==b&&NG(a,5),a.o=b,a.u("appstatechange",b))}function NG(a,b){a.ea!=b&&(a.ea=b,a.Vi("onStateChange",b))}function xF(a,b){if(a.a.Ra){var c={controlClicked:b};a.a.Ab&&(c.fs=1);a.qf("",c)}}f.sf=function(a,b,c,d){(d=O(this,d))&&Ey(d,a,!1!=b,c)};
867 f.Vq=function(a,b){var c=a.getVideoData();if(1==this.o||2==this.o)c.ya=b;2==this.o?LG(this):(c=Jy(a,b),this.cb("seekto",c))};f.Kq=function(){this.cb("beginseeking")};f.ar=function(){this.cb("endseeking")};function fG(a,b){a.xa=b;a.u("internalvolumechange",a.xa)}function Sf(a){a.xa.muted=!0;a.u("internalvolumechange",a.xa)}function Tf(a){a.xa.muted=!1;a.u("internalvolumechange",a.xa)}function jg(a,b){var c;if(c=(new pe(b)).a){var d=a.a;d.va=c.get("d",d.va);d.da=c.get("f",d.da)}}
868 function eg(a,b,c){b=new hg(b);return SG(a,b,void 0,c)}function SG(a,b,c,d){var e=O(a,d);if(!e)return!1;void 0!=c&&(b.kf=c);Xf(a,d);iy(e,b);if(!my(e))return!1;$w(e.J(),b.b);e==a.b?(IG(a,1),LG(a)):ny(e);return!0}function pg(a,b){var c=SG(a,b);Qf(a,c,void 0)}function Qf(a,b,c){c=O(a,c);b&&c==a.b&&(c.getVideoData().Nd=!0)}function gg(a,b,c){var d=O(a,c);d&&(Xf(a,c),iy(d,b),my(d)&&($w(d.J(),b.b),d==a.b&&(IG(a,1),MG(a))))}
869 function rn(a,b,c,d){if(!b&&!d)throw Error("Playback source is invalid");b=fg(b||null,d||null);a.a.Ab||"detailpage"!=a.a.Y?d?(a.Xe=!1,mg(a,b,void 0,void 0,void 0)):eg(a,b,1):(d={},c&&(d.feature=c),b=new hg(b),d=ot(a.a,b,d),c&&a.u("onNavigate",{url:d,feature:c}),window.location.href=d)}function mg(a,b,c,d,e){"string"==typeof b||b instanceof Array?KG(a,{api:b,index:c,startSeconds:d,suggestedQuality:e}):KG(a,b);b=a.g;a=v(a.Jn,a);b.Ne=a;b.be&&H(b.Ne,0)}
870 f.Jn=function(){var a=qg(this.g);this.getVideoData().hf||!this.Xe?pg(this,a):gg(this,a)};function zn(a){var b=RG();return!(!a.g||!(a.g.loop||a.g.pa+1<a.g.Pa)||b&&!b.autoPlay)}function PG(a){return a.g&&("embedded"==a.a.Y||a.a.Ab)&&zn(a)?(ng(a),!0):!1}function ng(a){a.g&&(a.g.be?(a.g.loop||a.g.pa+1<a.g.Pa)&&pg(a,Tl(a.g)):(Tl(a.g),a.Xe=!1))}function og(a){a.g&&(a.g.be?(a.g.loop||0<=a.g.pa-1)&&pg(a,Ul(a.g)):(Ul(a.g),a.Xe=!1))}function RG(){var a=n("yt.www.watch.lists.getState");return a?a():null}
871 function kg(a,b){var c=null;b&&(c={t:Math.floor(a.getCurrentTime(1))});return ot(a.a,a.getVideoData(1),null,c)}f.zm=function(a,b){var c=O(this,b);c&&(z(a,c.Mk,c),this.u("cuerangesadded",a))};f.Dm=function(a,b){var c=O(this,b);c&&(z(a,c.bi,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&&Ni(c,d);c.Xb()}};f.Gm=function(a,b){var c=O(this,b);c&&zy(c,a)};f.Iq=function(){TG(this)};
872 function TG(a){if(!a.a.Lk){var b=a.b.getVideoData();if(b.L){var c=b.L;Ir().docid=c}b.j&&(c=b.j,Ir().ei=c);b.Ca&&(c=b.Ca,Ir().cpn=c);0<b.ya&&(c=b.ya.toString(),Ir().start=c);b=b.a.Sa.toString();Ir().fmt=b;b=Math.round((a.b.b?cg(a.b.b):0)*Fg(a)).toString();Ir().tds=b;Er("aft");if("detailpage"==a.a.Y){var b=a.k.G,d;for(d in b)Er(d,b[d]);d=a.k.o;for(var e in d)b=e,c=d[e],Ir()[b]=c;b=Fr().tick;e=Fr().span;c=Ir();if(d=n("yt.timing.reportbuilder_")){if(d=d.apply(null,[b,e,c,void 0]))Hr(d),Jr()}else{d={v:2,
873 s:"youtube",action:ef("TIMING_ACTION")};var g=ef("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]);
874 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(",");Hr(d);(r=n("ytdebug.logTiming"))&&r(d,k,s);Jr()}}a.a.Lk=!0}}f.Am=function(a){"remote"==a?(IG(this,6),Dg(this.A)):this.Vi("onApiChange")};f.Bm=function(a){"remote"==a&&MG(this)};
875 f.Lt=function(){if(!Wf(this,"audio")){var a=100*this.i.volume,a={volume:a,nonNormalized:a/this.getVideoData().zh,muted:this.i.muted};this.xa=Jb(a);this.cb("onVolumeChange",a)}};
876 f.ym=function(a){a.volume=tb(a.volume,0,100);a.nonNormalized=a.volume/this.getVideoData().zh;if(this.a.pj&&!this.a.Pd){var b={};b.volume=isNaN(a.volume)?gh().volume:tb(a.volume,0,100);b.nonNormalized=a.nonNormalized;b.muted=void 0==a.muted?gh().muted:a.muted;Zg("yt-player-volume",b,2592E3)}if(Wf(this,"audio"))this.Gf&&(this.Gf=Jb(a),this.cb("onVolumeChange",a));else{var b=this.i,c=a.muted;b.volume=a.volume/100;b.muted=c;this.a.Pd||this.cb("onVolumeChange",a)}};f.du=function(){UG(this,!!Df())};
877 function UG(a,b){a.P.Ko(b);if("detailpage"==a.a.Y&&!b){var c=a.b.getVideoData(),d=n("checkCurrentVideo");if(d&&ef("VIDEO_ID")!=c.L){var e=a.getCurrentTime(),g={};g[c.L]=e;Zg("yt-player-restore-playhead",g,172800);d(c.L);a.u("openingpage")}}a.a.Ab=b;a.P.tf();a.cb("fullscreentoggled",b)}f.dr=function(){nG(this)};f.Gh=function(){this.cb("clearvideooverlays")};f.Eq=function(a){this.cb("menu_add",a)};f.Fq=function(a){this.cb("menu_remove",a)};f.Oq=function(a){this.cb("liveviewshift",a)};
878 f.Cm=function(a,b){if("onAdStateChange"==a){var c=arguments[1],d=arguments[2],e=arguments[3]||{};1==c&&TG(this);"leanback"==this.a.Y&&Yw(this.a)&&(0==c?this.Wd=this.i:this.Wd=d,this.u("onAdStateChange",c,e.video_id))}else this.u.apply(this,arguments)};f.af=function(a,b){this.k.H.apply(this.k,arguments);this.A&&this.A.u.apply(this.A,arguments);this.H&&this.H.u.apply(this.H,arguments)};f.Ud=function(a,b){var c=O(this,b);c&&(2==this.o?LG(this):c.U?(a&&VG(this,c),P(c.i,2)?this.sf(0):Cy(c)):ny(c))};
879 f.Sd=function(a,b){var c=O(this,b);c&&(a&&VG(this,c),xy(c))};function Xf(a,b){var c=O(a,b);if(c&&1!=a.o&&2!=a.o){xy(c);if(c.j){var d=c.j,e=Ly(d,"watchtime");e.km=!0;e.o=null;e.k=null;BG(d);Oy(d,e);e=d.j;e.k();uG(e);d.F()}c.U=!1;c.b&&(jy(c),c.g&&(Of(c.k,c.g),c.k=null,c.g=null),c.a&&(c.a.ya=c.getCurrentTime()),c.H=NaN,Bi(c.b),c.o.Ia&&Ei(c.b,!1),P(c.i,128)||oy(c,Ii(c.i)))}}function Uf(a,b){if(!Wf(a,"play_pause")){var c=a.O.play_pause?a.S:null;c?c.oe("control_play"):a.Ud(!1,b)}}
880 function Vf(a,b){if(!Wf(a,"play_pause")){var c=a.O.play_pause?a.S:null;c?c.oe("control_pause"):a.Sd(!1,b)}}function eG(a,b){if(!Wf(a,"play_pause")&&(!a.a.Gb||2!=a.o||Nm.hasTags(void 0))){var c=a.O.play_pause?a.S:null;c?c.oe("control_toggle_play_pause"):(c=O(a,void 0))&&(c.hg()?a.Sd(b,void 0):a.Ud(b,void 0))}}function Rf(a,b,c,d,e){if(!Wf(a,"seek")){var g=a.O.seek?a.S:null;g?g.oe("control_seek",b):a.sf(b,c,d,e)}}
881 function dG(a,b){if(a.a.Ab!=b)if(Cf())if(b){var c=a.P.a,d=We(["requestFullscreen","requestFullScreen"],c);d&&d.apply(c)}else(c=We(["exitFullscreen","cancelFullscreen","cancelFullScreen"],document))&&c.call(document);else a.u("onFullScreenToggleRequest"),UG(a,b)}function zF(a,b){dG(a,!1);a.u("openingpage");Cr(b)}f.Lq=function(a){Zw(this.a,a)};
882 f.Sq=function(){if(this.j==this.b){var a;if(a=Bg(this.a))if(bh("yt-remote-delayed-connect-key"))a=!0;else{a=QA();var b=IA(XA());a=!!MA(b,a)}if(a||!this.getVideoData(1).Zm||this.a.kc)if((b=ly(this.b))||(b=((b=this.getVideoData())&&b.I.length&&!b.O.length?0<=Ha(b.I,"fresca"):!1)||a),b){if(this.b.S.length||0<Yh(this.b.A.b,-2147483648).length)IG(this,4),Dg(this.A);a&&IG(this,6);!this.A&&this.I.getVideoData().ga&&(this.A=new tA(this))&&JG(this,this.A);(a=this.A)&&!a.Hd&&a.Xa(this.I)&&a.create();Cg(this);
883 HG(this)}else a=!1,this.getVideoData().ba||this.U&&(a=iw(this.U)),a?(a=this.getVideoData(),eg(this,{video_id:a.b.ypc_vid||a.L,ypc_preview:1},1)):(this.log_("No available formats"),sw(this.b,5,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",void 0));else a="DEVICE_FALLBACK",cc||si("iemobile")||si("xbox")&&si("trident")||si("nintendo wiiu")||(a="FLASH_FALLBACK"),sw(this.b,5,a,void 0)}else HG(this)};f.Qq=function(){this.Sd()};
884 function VG(a,b){var c=b.getVideoData(),d="html5-bezel-pause";P(b.i,8)?c.Fb&&!c.bb&&(d="html5-bezel-stop"):d="html5-bezel-play";a.P.Ip(d)}function nG(a){a.a.Sc=nF(a.P);if(a.i){var b=a.getVideoData();0!=a.i.readyState&&(b.da=new C(a.i.videoWidth,a.i.videoHeight));a.a.xv=qF(a.P,nF(a.P),oF(a.P),pF(a.P),void 0);a.a.ug=qF(a.P,nF(a.P),oF(a.P),pF(a.P),!0);ag(O(a),"r");a.u("resize",dx(a.a));a.cb("onResize")}}function Wf(a,b){return!(!a.B[b]||!a.B[b].length)}
885 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(Wf(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)};
886 f.Fm=function(a,b,c){this.Hh();this.S=a;b&&z(b,function(a){this.O[a]=!0},this);c&&vw(this.k,a,c)};f.Hh=function(){this.S=null;this.O={};ww(this.k)};function jG(a){var b=a.getVideoData();return b&&b.Ma&&!tl.test(b.Ma)?!a.a.Mh:a.a.sc}f.F=function(){GG(this);this.kk&&vf(this.kk);kf(0);Of(Eb(this.R));this.R={};this.j=this.b=null;Of(this.a,this.g);this.K=this.I=this.ba=this.U=this.Wd=null;CG.C.F.call(this)};qa("yt.player.Application",CG);function WG(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);Kf(b)}function XG(a,b,c,d,e,g){var h={};b&&(h.v=b);c&&(h.list=c);d&&(h.url=d);WG(a,h,e,g)}function YG(a,b,c,d){WG(a,{v:b},c,d)}function ZG(a,b,c,d,e){WG(a,{list:b,v:c},d,e)};ir(mr);ir(Us);n("yt.tracking.shareVideo")||(qa("yt.tracking.share",XG),qa("yt.tracking.shareVideo",YG),qa("yt.tracking.shareList",ZG));n("yt.window.popup")||(qa("yt.window.popup",Dr),qa("yt.window.open",Cr));qa("yt.player.Application.create",function(a,b){EG[a]&&(EG[a].dispose(),EG[a]=null);var c=new CG(a,b);Mf(c,function(){EG[a]=null});EG[a]=c});})();