]> Raphaƫl G. Git Repositories - youtubedl/blob - test/testdata/html5player-vflUKrNpT.js
Update changelog.
[youtubedl] / test / testdata / html5player-vflUKrNpT.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.Zp?a.Zp:a.Zp=new a}}
2 function da(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
3 else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function q(a){return void 0!==a}function ea(a){return null!=a}function t(a){return"array"==da(a)}function fa(a){var b=da(a);return"array"==b||"object"==b&&"number"==typeof a.length}function u(a){return"string"==typeof a}function ga(a){return"number"==typeof a}function ha(a){return"function"==da(a)}function ia(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ja(a){return a[ka]||(a[ka]=++la)}
4 var ka="closure_uid_"+(1E9*Math.random()>>>0),la=0;function ma(a,b,c){return a.call.apply(a.bind,arguments)}function na(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}
5 function v(a,b,c){v=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ma:na;return v.apply(null,arguments)}function oa(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}}function w(a,b){for(var c in b)a[c]=b[c]}var x=Date.now||function(){return+new Date};
6 function pa(a,b){var c=a.split("."),d=l;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function y(a,b){function c(){}c.prototype=b.prototype;a.C=b.prototype;a.prototype=new c;a.prototype.constructor=a}Function.prototype.bind=Function.prototype.bind||function(a,b){if(1<arguments.length){var c=Array.prototype.slice.call(arguments,1);c.unshift(this,a);return v.apply(null,c)}return v(this,a)};var qa={},ra=0;function sa(a,b){if(a){var c=new Image,d=""+ra++;qa[d]=c;c.onload=c.onerror=function(){b&&qa[d]&&b();delete qa[d]};c.src=a;c=eval("null")}};function ua(a){Error.captureStackTrace?Error.captureStackTrace(this,ua):this.stack=Error().stack||"";a&&(this.message=String(a))}y(ua,Error);ua.prototype.name="CustomError";var va;function wa(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 xa(a){return decodeURIComponent(a.replace(/\+/g," "))}function ya(a){if(!za.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Aa,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(Ba,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(Ca,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(Da,"&quot;"));return a}var Aa=/&/g,Ba=/</g,Ca=/>/g,Da=/\"/g,za=/[&<>\"]/;
7 function Ea(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"),r=RegExp("(\\d*)(\\D*)","g");do{var s=p.exec(k)||["","",""],D=r.exec(m)||["","",""];if(0==s[0].length&&0==D[0].length)break;c=((0==s[1].length?0:parseInt(s[1],10))<(0==D[1].length?0:parseInt(D[1],10))?-1:(0==s[1].length?0:parseInt(s[1],10))>(0==D[1].length?
8 0:parseInt(D[1],10))?1:0)||((0==s[2].length)<(0==D[2].length)?-1:(0==s[2].length)>(0==D[2].length)?1:0)||(s[2]<D[2]?-1:s[2]>D[2]?1:0)}while(0==c)}return c}function Fa(a){var b=Number(a);return 0==b&&/^[\s\xa0]*$/.test(a)?NaN:b};function Ga(){};function Ha(a){return a[a.length-1]}
9 var Ia=Array.prototype,Ja=Ia.indexOf?function(a,b,c){return Ia.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=Ia.forEach?function(a,b,c){Ia.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)},Ka=Ia.filter?function(a,b,c){return Ia.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],g=
10 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},La=Ia.map?function(a,b,c){return Ia.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},Ma=Ia.some?function(a,b,c){return Ia.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},Na=Ia.every?function(a,b,c){return Ia.every.call(a,b,c)}:function(a,
11 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 Oa(a,b){var c=0;z(a,function(a,e,g){b.call(void 0,a,e,g)&&++c},void 0);return c}function Pa(a,b,c){b=Qa(a,b,c);return 0>b?null:u(a)?a.charAt(b):a[b]}function Qa(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 Ra(a,b){var c=Sa(a,b,void 0);return 0>c?null:u(a)?a.charAt(c):a[c]}
12 function Sa(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 Ta(a,b){return 0<=Ja(a,b)}function Ua(a){return 0==a.length}function Va(a){if(!t(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function Wa(a,b){Ta(a,b)||a.push(b)}function Xa(a,b){var c=Ja(a,b),d;(d=0<=c)&&Ya(a,c);return d}function Ya(a,b){Ia.splice.call(a,b,1)}function Za(a,b){var c=Qa(a,b,void 0);0<=c&&Ya(a,c)}
13 function $a(a){return Ia.concat.apply(Ia,arguments)}function ab(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 bb(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 cb(a,b,c,d){Ia.splice.apply(a,db(arguments,1))}
14 function db(a,b,c){return 2>=arguments.length?Ia.slice.call(a,b):Ia.slice.call(a,b,c)}function eb(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 fb(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 gb(a,b){Ia.sort.call(a,b||hb)}function ib(a,b){var c=hb;gb(a,function(a,e){return c(a[b],e[b])})}
15 function jb(a,b,c){if(!fa(a)||!fa(b)||a.length!=b.length)return!1;var d=a.length;c=c||kb;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0}function hb(a,b){return a>b?1:a<b?-1:0}function kb(a,b){return a===b}function lb(a,b,c){c=fb(a,c||hb,b);0>c&&cb(a,-(c+1),0,b)}function mb(a){for(var b=[],c=0;c<arguments.length;c++){var d=arguments[c];t(d)?b.push.apply(b,mb.apply(null,d)):b.push(d)}return b};function nb(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 ob(a){return eval("("+a+")")}function pb(a){return qb(new rb(void 0),a)}function rb(a){this.a=a}
16 function qb(a,b){var c=[];sb(a,b,c);return c.join("")}
17 function sb(a,b,c){switch(typeof b){case "string":tb(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],sb(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),tb(g,c),c.push(":"),
18 sb(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 ub={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},vb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
19 function tb(a,b){b.push('"',a.replace(vb,function(a){if(a in ub)return ub[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return ub[a]=e+b.toString(16)}),'"')};function wb(a,b,c){return Math.min(Math.max(a,b),c)};function A(a,b){this.x=q(a)?a:0;this.y=q(b)?b:0}f=A.prototype;f.clone=function(){return new A(this.x,this.y)};function xb(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function yb(a,b){return new A(a.x-b.x,a.y-b.y)}f.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};f.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};f.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};
20 f.scale=function(a,b){var c=ga(b)?b:a;this.x*=a;this.y*=c;return this};function zb(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}f=zb.prototype;f.clone=function(){return new zb(this.top,this.right,this.bottom,this.left)};f.contains=function(a){return this&&a?a instanceof zb?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};
21 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};
22 f.scale=function(a,b){var c=ga(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function B(a,b){this.width=a;this.height=b}function Ab(a,b){return a==b?!0:a&&b?a.width==b.width&&a.height==b.height:!1}f=B.prototype;f.clone=function(){return new B(this.width,this.height)};function Bb(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};
23 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 Cb(a,b){return a.scale(Bb(a)>Bb(b)?b.width/a.width:b.height/a.height)};function Db(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}f=Db.prototype;f.clone=function(){return new Db(this.left,this.top,this.width,this.height)};function Eb(a){return new Db(a.left,a.top,a.right-a.left,a.bottom-a.top)}function Fb(a,b){return a==b?!0:a&&b?a.left==b.left&&a.width==b.width&&a.top==b.top&&a.height==b.height:!1}
24 f.contains=function(a){return a instanceof Db?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};function Gb(a){return new B(a.width,a.height)}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};
25 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};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 Hb(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function Ib(a,b){for(var c in a)if(!b.call(void 0,a[c],c,a))return!1;return!0}function Jb(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function Kb(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function Lb(a,b){for(var c in a)if(a[c]==b)return!0;return!1}function Mb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c}function Nb(a){for(var b in a)return!1;return!0}function Ob(a){var b={},c;for(c in a)b[c]=a[c];return b}
26 function Pb(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]=Pb(a[c]);return b}return a}var Qb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Rb(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<Qb.length;g++)c=Qb[g],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}}
27 function Sb(a){var b=arguments.length;if(1==b&&t(arguments[0]))return Sb.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 Tb(a){return function(){throw a;}};var Ub,Vb,Wb,Xb,Yb,Zb,$b;function ac(){return l.navigator?l.navigator.userAgent:null}function bc(){return l.navigator}Yb=Xb=Wb=Vb=Ub=!1;var cc;if(cc=ac()){var dc=bc();Ub=0==cc.lastIndexOf("Opera",0);Vb=!Ub&&(-1!=cc.indexOf("MSIE")||-1!=cc.indexOf("Trident"));Xb=(Wb=!Ub&&-1!=cc.indexOf("WebKit"))&&-1!=cc.indexOf("Mobile");Yb=!Ub&&!Wb&&!Vb&&"Gecko"==dc.product}var ec=Ub,C=Vb,fc=Yb,gc=Wb,hc=Xb,ic=bc(),jc=ic&&ic.platform||"";Zb=-1!=jc.indexOf("Mac");$b=-1!=jc.indexOf("Win");
28 var kc=!!bc()&&-1!=(bc().appVersion||"").indexOf("X11");function lc(){var a=l.document;return a?a.documentMode:void 0}var mc;t:{var nc="",oc;if(ec&&l.opera)var pc=l.opera.version,nc="function"==typeof pc?pc():pc;else if(fc?oc=/rv\:([^\);]+)(\)|;)/:C?oc=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:gc&&(oc=/WebKit\/(\S+)/),oc)var qc=oc.exec(ac()),nc=qc?qc[1]:"";if(C){var rc=lc();if(rc>parseFloat(nc)){mc=String(rc);break t}}mc=nc}var sc=mc,tc={};function uc(a){return tc[a]||(tc[a]=0<=Ea(sc,a))}
29 function vc(a){return C&&wc>=a}var xc=l.document,wc=xc&&C?lc()||("CSS1Compat"==xc.compatMode?parseInt(sc,10):5):void 0;var yc=!C||vc(9),zc=!fc&&!C||C&&vc(9)||fc&&uc("1.9.1"),Ac=C&&!uc("9"),Bc=C||ec||gc;function Cc(a){a=a.className;return u(a)&&a.match(/\S+/g)||[]}function Dc(a,b){for(var c=Cc(a),d=db(arguments,1),e=c.length+d.length,g=c,h=0;h<d.length;h++)Ta(g,d[h])||g.push(d[h]);g=c.join(" ");a.className=g;return c.length==e}function Ec(a,b){var c=Cc(a),d=db(arguments,1),c=Fc(c,d).join(" ");a.className=c}function Fc(a,b){return Ka(a,function(a){return!Ta(b,a)})}function Gc(a,b){return Ta(Cc(a),b)}function Hc(a,b,c){c?Dc(a,b):Ec(a,b)}function Ic(a,b){var c=!Gc(a,b);Hc(a,b,c)};function Jc(a){return a?new Kc(Lc(a)):va||(va=new Kc)}function Mc(a){return u(a)?document.getElementById(a):a}function Nc(a,b){var c=b||document;return c.querySelectorAll&&c.querySelector?c.querySelectorAll("."+a):c.getElementsByClassName?c.getElementsByClassName(a):Oc("*",a,b)}function E(a,b){var c=b||document,d=null;return(d=c.querySelectorAll&&c.querySelector?c.querySelector("."+a):Nc(a,b)[0])||null}
30 function Oc(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&&Ta(a.split(/\s+/),b)&&(d[e++]=h);d.length=e;return d}return c}
31 function Pc(a,b){Hb(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:d in Qc?a.setAttribute(Qc[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})}var Qc={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};
32 function Rc(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new B(a.clientWidth,a.clientHeight)}function Sc(a){var b=Tc(a);a=a.parentWindow||a.defaultView;return C&&uc("10")&&a.pageYOffset!=b.scrollTop?new A(b.scrollLeft,b.scrollTop):new A(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function Tc(a){return gc||"CSS1Compat"!=a.compatMode?a.body||a.documentElement:a.documentElement}
33 function Uc(a,b,c){var d=arguments,e=document,g=d[0],h=d[1];if(!yc&&h&&(h.name||h.type)){g=["<",g];h.name&&g.push(' name="',ya(h.name),'"');if(h.type){g.push(' type="',ya(h.type),'"');var k={};Rb(k,h);delete k.type;h=k}g.push(">");g=g.join("")}g=e.createElement(g);h&&(u(h)?g.className=h:t(h)?Dc.apply(null,[g].concat(h)):Pc(g,h));2<d.length&&Vc(e,g,d,2);return g}
34 function Vc(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(Wc(g)?ab(g):g,e)}}function Xc(a){return document.createElement(a)}function Yc(a){return document.createTextNode(String(a))}function Zc(a,b){Vc(Lc(a),a,arguments,1)}function $c(a){for(var b;b=a.firstChild;)a.removeChild(b)}function F(a){a&&a.parentNode&&a.parentNode.removeChild(a)}
35 function ad(a){if(void 0!=a.firstElementChild)a=a.firstElementChild;else for(a=a.firstChild;a&&1!=a.nodeType;)a=a.nextSibling;return a}function bd(a){if(Bc&&!(C&&uc("9")&&!uc("10")&&l.SVGElement&&a instanceof l.SVGElement))return a.parentElement;a=a.parentNode;return ia(a)&&1==a.nodeType?a:null}
36 function cd(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 Lc(a){return 9==a.nodeType?a:a.ownerDocument||a.document}
37 function dd(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 $c(a),a.appendChild(Lc(a).createTextNode(String(b)))}function ed(a,b){var c=[];return fd(a,b,c,!0)?c[0]:void 0}function fd(a,b,c,d){if(null!=a)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||fd(a,b,c,d))return!0;a=a.nextSibling}return!1}var gd={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},hd={IMG:" ",BR:"\n"};
38 function id(a,b,c){if(!(a.nodeName in gd))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 hd)b.push(hd[a.nodeName]);else for(a=a.firstChild;a;)id(a,b,c),a=a.nextSibling}function Wc(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 jd(a,b){return b?kd(a,function(a){return!b||Gc(a,b)},!0):null}
39 function kd(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 Kc(a){this.a=a||l.document||document}f=Kc.prototype;f.N=function(a){return u(a)?this.a.getElementById(a):a};f.createElement=function(a){return this.a.createElement(a)};function ld(a){return"CSS1Compat"==a.a.compatMode}function md(a){return Sc(a.a)}f.appendChild=function(a,b){a.appendChild(b)};f.append=Zc;
40 f.getChildren=function(a){return zc&&void 0!=a.children?a.children:Ka(a.childNodes,function(a){return 1==a.nodeType})};f.contains=cd;function nd(a,b){var c=Lc(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function od(a,b){return nd(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}function pd(a,b,c){var d,e=fc&&(Zb||kc)&&uc("1.9");b instanceof A?(d=b.x,b=b.y):(d=b,b=c);a.style.left=qd(d,e);a.style.top=qd(b,e)}
41 function rd(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}C&&a.ownerDocument.body&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}
42 function sd(a){if(C&&!vc(8))return a.offsetParent;var b=Lc(a),c=od(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=od(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}
43 function td(a){for(var b=new zb(0,Infinity,Infinity,0),c=Jc(a),d=c.a.body,e=c.a.documentElement,g=Tc(c.a);a=sd(a);)if(!(C&&0==a.clientWidth||gc&&0==a.clientHeight&&a==d||a==d||a==e||"visible"==od(a,"overflow"))){var h=ud(a),k;k=a;if(fc&&!uc("1.9")){var m=parseFloat(nd(k,"borderLeftWidth"));if(vd(k))var p=k.offsetWidth-k.clientWidth-m-parseFloat(nd(k,"borderRightWidth")),m=m+p;k=new A(m,parseFloat(nd(k,"borderTopWidth")))}else k=new A(k.clientLeft,k.clientTop);h.x+=k.x;h.y+=k.y;b.top=Math.max(b.top,
44 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=Rc(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}
45 function ud(a){var b,c=Lc(a),d=od(a,"position"),e=fc&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),g=new A(0,0),h;b=c?Lc(c):document;h=!C||vc(9)||ld(Jc(b))?b.documentElement:b.body;if(a==h)return g;if(a.getBoundingClientRect)b=rd(a),a=md(Jc(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+=
46 b.offsetTop;b!=a&&(g.x+=b.clientLeft||0,g.y+=b.clientTop||0);if(gc&&"fixed"==od(b,"position")){g.x+=c.body.scrollLeft;g.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(ec||gc&&"absolute"==d)g.y-=c.body.offsetTop;for(b=a;(b=sd(b))&&b!=c.body&&b!=h;)g.x-=b.scrollLeft,ec&&"TR"==b.tagName||(g.y-=b.scrollTop)}return g}function wd(a,b){var c=xd(a),d=xd(b);return new A(c.x-d.x,c.y-d.y)}
47 function yd(a){var b;if(a.getBoundingClientRect)b=rd(a),b=new A(b.left,b.top);else{b=md(Jc(a));var c=ud(a);b=new A(c.x-b.x,c.y-b.y)}if(fc&&!uc(12)){var d;C?d="-ms-transform":gc?d="-webkit-transform":ec?d="-o-transform":fc&&(d="-moz-transform");var e;d&&(e=od(a,d));e||(e=od(a,"transform"));a=e?(a=e.match(zd))?new A(parseFloat(a[1]),parseFloat(a[2])):new A(0,0):new A(0,0);a=new A(b.x+a.x,b.y+a.y)}else a=b;return a}
48 function xd(a){if(1==a.nodeType)return yd(a);var b=ha(a.Mx),c=a;a.targetTouches?c=a.targetTouches[0]:b&&a.le.targetTouches&&(c=a.le.targetTouches[0]);return new A(c.clientX,c.clientY)}function Ad(a,b,c){if(b instanceof B)c=b.height,b=b.width;else if(void 0==c)throw Error("missing height argument");Bd(a,b);a.style.height=qd(c,!0)}function qd(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}function Bd(a,b){a.style.width=qd(b,!0)}
49 function Cd(a){var b=Dd;if("none"!=od(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 Dd(a){var b=a.offsetWidth,c=a.offsetHeight,d=gc&&!b&&!c;return q(b)&&!d||!a.getBoundingClientRect?new B(b,c):(a=rd(a),new B(a.right-a.left,a.bottom-a.top))}function Ed(a){var b=ud(a);a=Cd(a);return new Db(b.x,b.y,a.width,a.height)}
50 function Fd(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 vd(a){return"rtl"==od(a,"direction")}
51 function Gd(a){var b=Lc(a),c=C&&a.currentStyle;if(c&&ld(Jc(b))&&"auto"!=c.width&&"auto"!=c.height&&!c.boxSizing)return b=Hd(a,c.width,"width","pixelWidth"),a=Hd(a,c.height,"height","pixelHeight"),new B(b,a);c=new B(a.offsetWidth,a.offsetHeight);b=Id(a);a=Jd(a);return new B(c.width-a.left-b.left-b.right-a.right,c.height-a.top-b.top-b.bottom-a.bottom)}
52 function Hd(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 Kd(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?Hd(a,c,"left","pixelLeft"):0}
53 function Id(a){if(C){var b=Kd(a,"paddingLeft"),c=Kd(a,"paddingRight"),d=Kd(a,"paddingTop");a=Kd(a,"paddingBottom");return new zb(d,c,a,b)}b=nd(a,"paddingLeft");c=nd(a,"paddingRight");d=nd(a,"paddingTop");a=nd(a,"paddingBottom");return new zb(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))}var Ld={thin:2,medium:4,thick:6};
54 function Md(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 Ld?Ld[c]:Hd(a,c,"left","pixelLeft")}
55 function Jd(a){if(C&&!vc(9)){var b=Md(a,"borderLeft"),c=Md(a,"borderRight"),d=Md(a,"borderTop");a=Md(a,"borderBottom");return new zb(d,c,a,b)}b=nd(a,"borderLeftWidth");c=nd(a,"borderRightWidth");d=nd(a,"borderTopWidth");a=nd(a,"borderBottomWidth");return new zb(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))}var Nd=/[^\d]+$/,Od={cm:1,"in":1,mm:1,pc:1,pt:1},Pd={em:1,ex:1};
56 function Qd(a){var b=od(a,"fontSize"),c;c=(c=b.match(Nd))&&c[0]||null;if(b&&"px"==c)return parseInt(b,10);if(C){if(c in Od)return Hd(a,b,"left","pixelLeft");if(a.parentNode&&1==a.parentNode.nodeType&&c in Pd)return a=a.parentNode,c=od(a,"fontSize"),Hd(a,b==c?"1em":b,"left","pixelLeft")}c=Uc("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 zd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;var Rd="StopIteration"in l?l.StopIteration:Error("StopIteration");function Sd(){}Sd.prototype.next=function(){throw Rd;};Sd.prototype.Id=function(){return this};function Td(a){if(a instanceof Sd)return a;if("function"==typeof a.Id)return a.Id(!1);if(fa(a)){var b=0,c=new Sd;c.next=function(){for(;;){if(b>=a.length)throw Rd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");}
57 function Ud(a,b,c){if(fa(a))try{z(a,b,c)}catch(d){if(d!==Rd)throw d;}else{a=Td(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(e){if(e!==Rd)throw e;}}}function Vd(a){if(fa(a))return ab(a);a=Td(a);var b=[];Ud(a,function(a){b.push(a)});return b};function Wd(a,b){this.b={};this.a=[];this.g=this.T=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 Wd?(c=a.tc(),d=a.ic()):(c=Kb(a),d=Jb(a));for(var e=0;e<c.length;e++)this.set(c[e],d[e])}}f=Wd.prototype;f.hb=function(){return this.T};f.ic=function(){Xd(this);for(var a=[],b=0;b<this.a.length;b++)a.push(this.b[this.a[b]]);return a};f.tc=function(){Xd(this);return this.a.concat()};
58 f.equals=function(a,b){if(this===a)return!0;if(this.T!=a.hb())return!1;var c=b||Yd;Xd(this);for(var d,e=0;d=this.a[e];e++)if(!c(this.get(d),a.get(d)))return!1;return!0};function Yd(a,b){return a===b}f.isEmpty=function(){return 0==this.T};f.clear=function(){this.b={};this.g=this.T=this.a.length=0};f.remove=function(a){return Zd(this.b,a)?(delete this.b[a],this.T--,this.g++,this.a.length>2*this.T&&Xd(this),!0):!1};
59 function Xd(a){if(a.T!=a.a.length){for(var b=0,c=0;b<a.a.length;){var d=a.a[b];Zd(a.b,d)&&(a.a[c++]=d);b++}a.a.length=c}if(a.T!=a.a.length){for(var e={},c=b=0;b<a.a.length;)d=a.a[b],Zd(e,d)||(a.a[c++]=d,e[d]=1),b++;a.a.length=c}}f.get=function(a,b){return Zd(this.b,a)?this.b[a]:b};f.set=function(a,b){Zd(this.b,a)||(this.T++,this.a.push(a),this.g++);this.b[a]=b};f.clone=function(){return new Wd(this)};
60 f.Id=function(a){Xd(this);var b=0,c=this.a,d=this.b,e=this.g,g=this,h=new Sd;h.next=function(){for(;;){if(e!=g.g)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw Rd;var h=c[b++];return a?h:d[h]}};return h};function Zd(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function $d(a){if("function"==typeof a.ic)return a.ic();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 Jb(a)}function ae(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.tc)d=a.tc();else if("function"!=typeof a.ic)if(fa(a)||u(a)){d=[];for(var e=a.length,g=0;g<e;g++)d.push(g)}else d=Kb(a);else d=void 0;for(var e=$d(a),g=e.length,h=0;h<g;h++)b.call(c,e[h],d&&d[h],a)}};function be(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 ce=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function de(a){if(ee){ee=!1;var b=l.location;if(b){var c=b.href;if(c&&(c=fe(c))&&c!=b.hostname)throw ee=!0,Error();}}return a.match(ce)}var ee=gc;function fe(a){return(a=de(a)[3]||null)&&decodeURIComponent(a)}
61 function ge(a){return(a=de(a)[5]||null)&&decodeURIComponent(a)}function he(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 ie(a,b,c){if(t(b))for(var d=0;d<b.length;d++)ie(a,String(b[d]),c);else null!=b&&c.push("&",a,""===b?"":"=",encodeURIComponent(String(b)))}function je(a,b,c){Math.max(b.length-(c||0),0);for(c=c||0;c<b.length;c+=2)ie(b[c],b[c+1],a);return a}
62 function ke(a,b){for(var c in b)ie(c,b[c],a);return a}function le(a,b){return he(2==arguments.length?je([a],arguments[1],0):je([a],arguments,1))}function me(a,b,c){a=[a,"&",b];null!=c&&a.push("=",encodeURIComponent(String(c)));return he(a)}function ne(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 oe=/#|$/,pe=/[?&]($|#)/;
63 function qe(a,b){for(var c=a.search(oe),d=0,e,g=[];0<=(e=ne(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(pe,"$1")};function re(a,b){var c;if(a instanceof re)this.Ze=q(b)?b:a.Ze,se(this,a.Nf),this.Ii=a.Ii,te(this,a.Ne),ue(this,a.ih),this.jh=a.jh,ve(this,a.a.clone()),we(this,a.ql);else if(a&&(c=de(String(a)))){this.Ze=!!b;se(this,c[1]||"",!0);var d=c[2]||"";this.Ii=d?decodeURIComponent(d):"";te(this,c[3]||"",!0);ue(this,c[4]);this.jh=(d=c[5]||"")?decodeURIComponent(d):"";ve(this,c[6]||"",!0);we(this,c[7]||"",!0)}else this.Ze=!!b,this.a=new xe(null,0,this.Ze)}f=re.prototype;f.Nf="";f.Ii="";f.Ne="";f.ih=null;
64 f.jh="";f.ql="";f.Ze=!1;f.toString=function(){var a=[],b=this.Nf;b&&a.push(ye(b,ze),":");if(b=this.Ne){a.push("//");var c=this.Ii;c&&a.push(ye(c,ze),"@");a.push(encodeURIComponent(String(b)));b=this.ih;null!=b&&a.push(":",String(b))}if(b=this.jh)this.Ne&&"/"!=b.charAt(0)&&a.push("/"),a.push(ye(b,"/"==b.charAt(0)?Ae:Be));(b=this.a.toString())&&a.push("?",b);(b=this.ql)&&a.push("#",ye(b,Ce));return a.join("")};f.clone=function(){return new re(this)};
65 function se(a,b,c){a.Nf=c?b?decodeURIComponent(b):"":b;a.Nf&&(a.Nf=a.Nf.replace(/:$/,""))}function te(a,b,c){a.Ne=c?b?decodeURIComponent(b):"":b}function ue(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.ih=b}else a.ih=null}function ve(a,b,c){b instanceof xe?(a.a=b,De(a.a,a.Ze)):(c||(b=ye(b,Ee)),a.a=new xe(b,0,a.Ze))}function Fe(a,b,c){a.a.set(b,c)}function Ge(a,b,c){t(c)||(c=[String(c)]);He(a.a,b,c)}function we(a,b,c){a.ql=c?b?decodeURIComponent(b):"":b;return a}
66 function Ie(a){Fe(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^x()).toString(36));return a}function Je(a){return a instanceof re?a.clone():new re(a,void 0)}function Ke(a,b,c,d){var e=new re(null,void 0);a&&se(e,a);b&&te(e,b);c&&ue(e,c);d&&(e.jh=d);return e}function ye(a,b){return u(a)?encodeURI(a).replace(b,Le):null}function Le(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}
67 var ze=/[#\/\?@]/g,Be=/[\#\?:]/g,Ae=/[\#\?]/g,Ee=/[\#\?@]/g,Ce=/#/g;function xe(a,b,c){this.a=a||null;this.b=!!c}function Me(a){if(!a.Ja&&(a.Ja=new Wd,a.T=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=xa(e);e=Ne(a,e);a.add(e,g?xa(g):"")}}f=xe.prototype;f.Ja=null;f.T=null;f.hb=function(){Me(this);return this.T};
68 f.add=function(a,b){Me(this);this.a=null;a=Ne(this,a);var c=this.Ja.get(a);c||this.Ja.set(a,c=[]);c.push(b);this.T++;return this};f.remove=function(a){Me(this);a=Ne(this,a);return Zd(this.Ja.b,a)?(this.a=null,this.T-=this.Ja.get(a).length,this.Ja.remove(a)):!1};f.clear=function(){this.Ja=this.a=null;this.T=0};f.isEmpty=function(){Me(this);return 0==this.T};function Oe(a,b){Me(a);b=Ne(a,b);return Zd(a.Ja.b,b)}
69 f.tc=function(){Me(this);for(var a=this.Ja.ic(),b=this.Ja.tc(),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.ic=function(a){Me(this);var b=[];if(u(a))Oe(this,a)&&(b=$a(b,this.Ja.get(Ne(this,a))));else{a=this.Ja.ic();for(var c=0;c<a.length;c++)b=$a(b,a[c])}return b};f.set=function(a,b){Me(this);this.a=null;a=Ne(this,a);Oe(this,a)&&(this.T-=this.Ja.get(a).length);this.Ja.set(a,[b]);this.T++;return this};
70 f.get=function(a,b){var c=a?this.ic(a):[];return 0<c.length?String(c[0]):b};function He(a,b,c){a.remove(b);0<c.length&&(a.a=null,a.Ja.set(Ne(a,b),ab(c)),a.T+=c.length)}f.toString=function(){if(this.a)return this.a;if(!this.Ja)return"";for(var a=[],b=this.Ja.tc(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.ic(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("&")};
71 f.clone=function(){var a=new xe;a.a=this.a;this.Ja&&(a.Ja=this.Ja.clone(),a.T=this.T);return a};function Ne(a,b){var c=String(b);a.b&&(c=c.toLowerCase());return c}function De(a,b){b&&!a.b&&(Me(a),a.a=null,ae(a.Ja,function(a,b){var e=b.toLowerCase();b!=e&&(this.remove(b),He(this,e,a))},a));a.b=b};function Pe(a,b,c){a.dataset?a.dataset[Qe(b)]=c:a.setAttribute("data-"+b,c)}function G(a,b){return a.dataset?a.dataset[Qe(b)]:a.getAttribute("data-"+b)}var Re={};function Qe(a){return Re[a]||(Re[a]=String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()}))};var Se=n("yt.dom.getNextId_");if(!Se){Se=function(){return++Te};pa("yt.dom.getNextId_",Se);var Te=0}function Ue(a,b){a=Mc(a);b=Mc(b);return!!kd(a,function(a){return a===b},!0,void 0)}function Ve(a,b){var c=Oc(a,null,b);return c.length?c[0]:null}function We(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]}
72 function Xe(a,b){var c;Ma(a,function(a){c=We(a,b);return!!c});return c}function Ye(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 Ze=window.yt&&window.yt.config_||{};pa("yt.config_",Ze);var $e=window.yt&&window.yt.tokens_||{};pa("yt.tokens_",$e);var af=window.yt&&window.yt.msgs_||{};pa("yt.msgs_",af);function bf(a){cf(Ze,arguments)}function df(a,b){return a in Ze?Ze[a]:b}function ef(a){cf($e,arguments)}function ff(a){return a in $e?$e[a]:void 0}function H(a,b){ha(a)&&(a=gf(a));return window.setTimeout(a,b)}function hf(a,b){ha(a)&&(a=gf(a));return window.setInterval(a,b)}function I(a){window.clearTimeout(a)}
73 function jf(a){window.clearInterval(a)}function gf(a){return a&&window.yterr?function(){try{return a.apply(this,arguments)}catch(b){throw kf(b),b;}}:a}function kf(a){if(window&&window.yterr){var b=n("yt.www.errors.log");b?b(a):(b=df("ERRORS")||[],b.push(a),bf("ERRORS",b))}}function lf(a){cf(af,arguments)}function mf(a,b,c){var d=b||{};if(a=a in af?af[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 af?af[a]:{},b)}
74 function of(a,b){var c=df("I18N_PLURAL_RULES")||function(a){return 1==a?"one":"other"};return(c=a["case"+b]||a[c(b)])?c.replace("#",b.toString()):b+""}function cf(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.dd=a;(b=a.target||a.srcElement)&&3==b.nodeType&&(b=b.parentNode);this.target=b;if(b=a.relatedTarget)try{b=b.nodeName&&b}catch(c){b=null}else"mouseover"==this.type?b=a.fromElement:"mouseout"==this.type&&(b=a.toElement);this.relatedTarget=b;this.clientX=void 0!=a.clientX?a.clientX:a.pageX;this.clientY=void 0!=a.clientY?a.clientY:a.pageY;this.keyCode=a.keyCode?a.keyCode:a.which;
75 this.charCode=a.charCode||("keypress"==this.type?this.keyCode:0);this.altKey=a.altKey;this.ctrlKey=a.ctrlKey;this.shiftKey=a.shiftKey;"MozMousePixelScroll"==this.type?(this.wheelDeltaX=a.axis==a.HORIZONTAL_AXIS?a.detail:0,this.wheelDeltaY=a.axis==a.HORIZONTAL_AXIS?0:a.detail):window.opera?(this.wheelDeltaX=0,this.wheelDeltaY=a.detail):0==a.wheelDelta%120?"WebkitTransform"in document.documentElement.style?window.chrome&&0==navigator.platform.indexOf("Mac")?(this.wheelDeltaX=a.wheelDeltaX/-30,this.wheelDeltaY=
76 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);this.a=a.pageX;this.b=a.pageY}}function rf(a){if(document.body&&document.documentElement){var b=document.body.scrollTop+document.documentElement.scrollTop;a.a=a.clientX+(document.body.scrollLeft+document.documentElement.scrollLeft);a.b=a.clientY+b}}
77 function sf(a){q(a.a)||rf(a);return a.a}function tf(a){q(a.b)||rf(a);return a.b}f=pf.prototype;f.dd=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.wheelDeltaX=0;f.wheelDeltaY=0;f.rotation=0;f.scale=1;f.preventDefault=function(){this.dd.returnValue=!1;this.dd.preventDefault&&this.dd.preventDefault()};
78 f.stopPropagation=function(){this.dd.cancelBubble=!0;this.dd.stopPropagation&&this.dd.stopPropagation()};f.stopImmediatePropagation=function(){this.dd.cancelBubble=!0;this.dd.stopImmediatePropagation&&this.dd.stopImmediatePropagation()};var qf={stopImmediatePropagation:1,stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,scale:1,rotation:1};var uf=n("yt.events.listeners_")||{};pa("yt.events.listeners_",uf);var vf=n("yt.events.counter_")||{count:0};pa("yt.events.counter_",vf);function wf(a,b,c,d){return Mb(uf,function(e){return e[0]==a&&e[1]==b&&e[2]==c&&e[4]==!!d})}
79 function J(a,b,c,d){if(!a||!a.addEventListener&&!a.attachEvent)return"";d=!!d;var e=wf(a,b,c,d);if(e)return e;var e=++vf.count+"",g=!("mouseenter"!=b&&"mouseleave"!=b||!a.addEventListener||"onmouseenter"in document),h;h=g?function(d){d=new pf(d);if(!kd(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=gf(h);uf[e]=[a,b,c,h,d];a.addEventListener?"mouseenter"==b&&g?a.addEventListener("mouseover",
80 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 xf(a,b){var c;return c=J(a,"timeupdate",function(){yf(c);b.apply(a,arguments)},void 0)}
81 function zf(a,b,c){b=b.toLowerCase();var d=c,e="mouse"+b;if(We("pointerEnabled",window.navigator))e="MSPointer"+b.charAt(0).toUpperCase()+b.substr(1);else if(Ye("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);w(d,b);c(d)})}}return J(a,e,d)}function Af(a,b,c){Bf(a,"change",b,function(a){return a.nodeName.toLowerCase()===c.toLowerCase()&&!0})}
82 function Cf(a,b,c){return Bf(a,"click",b,function(a){return Gc(a,c)})}function Bf(a,b,c,d){var e=a||document;return J(e,b,function(a){var b=kd(a.target,function(a){return a===e||d(a)},!0);b&&b!==e&&!b.disabled&&(a.currentTarget=b,c.call(b,a))})}function yf(a){a&&("string"==typeof a&&(a=[a]),z(a,function(a){if(a in uf){var c=uf[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 uf[a]}}))}
83 function Df(a){for(var b in uf)uf[b][0]==a&&yf(b)}function Ef(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 Ff(){return!!Xe(["fullscreenEnabled","fullScreenEnabled"],document)}function Gf(){return Xe(["fullscreenElement","fullScreenElement"],document)};function Hf(a){a=a||{};this.url=a.url||"";this.urlV8=a.url_v8||"";this.urlV9As2=a.url_v9as2||"";this.args=a.args||Ob(If);this.assets=a.assets||{};this.attrs=a.attrs||Ob(Jf);this.params=a.params||Ob(Kf);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 If={enablejsapi:1},Jf={},Kf={allowscriptaccess:"always",allowfullscreen:"true",bgcolor:"#000000"};
84 Hf.prototype.clone=function(){var a=new Hf,b;for(b in this){var c=this[b];"object"==da(c)?a[b]=Ob(c):a[b]=c}return a};function Lf(a){a&&(this.name=ya(a.name),this.nb=a.screenId,this.kc=a.loungeToken,this.zb=a.dialId||"")}f=Lf.prototype;f.name="";f.nb="";f.kc="";f.zb="";f.Yp=function(){return{key:this.nb,name:this.name}};f.toString=function(){var a=this.kc?this.kc.slice(-6):"null";return"{name:"+this.name+",screenId:"+this.nb+",loungeToken:..."+a+",dialId:"+this.zb+"}"};function Mf(a){return a?a.toString():"null"}function Nf(a){a=a||[];return"["+La(a,function(a){return Mf(a)}).join(",")+"]"};function Of(a){this.a=a}var Pf=/\s*;\s*/;f=Of.prototype;f.set=function(a,b,c,d,e,g){if(/[;=\s]/.test(a))throw Error('Invalid cookie name "'+a+'"');if(/[;\r\n]/.test(b))throw Error('Invalid cookie value "'+b+'"');q(c)||(c=-1);e=e?";domain="+e:"";d=d?";path="+d:"";g=g?";secure":"";c=0>c?"":0==c?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(x()+1E3*c)).toUTCString();this.a.cookie=a+"="+b+e+d+c+g};
85 f.get=function(a,b){for(var c=a+"=",d=(this.a.cookie||"").split(Pf),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.tc=function(){return Qf(this).keys};f.ic=function(){return Qf(this).Fv};f.isEmpty=function(){return!this.a.cookie};f.hb=function(){return this.a.cookie?(this.a.cookie||"").split(Pf).length:0};f.clear=function(){for(var a=Qf(this).keys,b=a.length-1;0<=b;b--)this.remove(a[b])};
86 function Qf(a){a=(a.a.cookie||"").split(Pf);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,Fv:c}}var Rf=new Of(document);Rf.b=3950;function Sf(){};function Tf(){}y(Tf,Sf);Tf.prototype.hb=function(){var a=0;Ud(this.Id(!0),function(){a++});return a};Tf.prototype.clear=function(){var a=Vd(this.Id(!0)),b=this;z(a,function(a){b.remove(a)})};function Uf(a){this.a=a}y(Uf,Tf);f=Uf.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)};
87 f.hb=function(){return this.a.length};f.Id=function(a){var b=0,c=this.a,d=new Sd;d.next=function(){if(b>=c.length)throw Rd;var d;d=c.key(b++);if(a)return d;d=c.getItem(d);if(!u(d))throw"Storage mechanism: Invalid value was encountered";return d};return d};f.clear=function(){this.a.clear()};f.key=function(a){return this.a.key(a)};function Vf(){var a=null;try{a=window.localStorage||null}catch(b){}this.a=a}y(Vf,Uf);function Wf(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.a=a}y(Wf,Uf);function Xf(a){this.If=a;this.Tp=new rb}f=Xf.prototype;f.If=null;f.Tp=null;f.set=function(a,b){q(b)?this.If.set(a,qb(this.Tp,b)):this.If.remove(a)};f.get=function(a){var b;try{b=this.If.get(a)}catch(c){return}if(null!==b)try{return nb(b)}catch(d){throw"Storage: Invalid value was encountered";}};f.remove=function(a){this.If.remove(a)};function Yf(a){Xf.call(this,a)}y(Yf,Xf);function Zf(a){this.data=a}function $f(a){return!q(a)||a instanceof Zf?a:new Zf(a)}Yf.prototype.set=function(a,b){Yf.C.set.call(this,a,$f(b))};Yf.prototype.a=function(a){a=Yf.C.get.call(this,a);if(!q(a)||a instanceof Object)return a;throw"Storage: Invalid value was encountered";};Yf.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 ag(a){Xf.call(this,a)}y(ag,Yf);function bg(a){var b=a.creation;a=a.expiration;return!!a&&a<x()||!!b&&b>x()}ag.prototype.set=function(a,b,c){if(b=$f(b)){if(c){if(c<x()){ag.prototype.remove.call(this,a);return}b.expiration=c}b.creation=x()}ag.C.set.call(this,a,b)};ag.prototype.a=function(a,b){var c=ag.C.a.call(this,a);if(c)if(!b&&bg(c))ag.prototype.remove.call(this,a);else return c};function cg(a){Xf.call(this,a)}y(cg,ag);function dg(a,b){var c=[];Ud(b,function(a){var b;try{b=cg.prototype.a.call(this,a,!0)}catch(g){if("Storage: Invalid value was encountered"==g)return;throw g;}q(b)?bg(b)&&c.push(a):c.push(a)},a);return c}function eg(a,b){var c=dg(a,b);z(c,function(a){cg.prototype.remove.call(this,a)},a)};function fg(a,b,c){var d=c&&0<c?c:0;c=d?x()+1E3*d:0;if((d=d?gg:hg)&&window.JSON){u(b)||(b=JSON.stringify(b,void 0));try{d.set(a,b,c)}catch(e){d.remove(a)}}}function ig(a){if(!hg&&!gg||!window.JSON)return null;var b;try{b=hg.get(a),b=u(b)?b:gg.get(a)}catch(c){return null}if(!u(b))return null;try{b=JSON.parse(b,void 0)}catch(d){}return b}function jg(a){hg&&hg.remove(a);gg&&gg.remove(a)}var gg,kg=new Vf;gg=kg.isAvailable()?new cg(kg):null;var hg,lg=new Wf;hg=lg.isAvailable()?new cg(lg):null;function mg(a){a&&(this.id=a.id||"",this.name=ya(a.name||""),this.activityId=a.activityId||"",this.status=a.status||"UNKNOWN")}f=mg.prototype;f.id="";f.name="";f.activityId="";f.status="UNKNOWN";f.Yp=function(){return{key:this.id,name:this.name}};function ng(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+"}"};
88 function og(a){a=a||[];return"["+La(a,function(a){return a?a.toString():"null"}).join(",")+"]"};function pg(){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 qg(a,b){return Pa(a,function(a){return a.key==b})}function rg(a){return La(a,function(a){return a.Yp()})}function sg(a){return La(a,function(a){return ng(a)})}function tg(a){return La(a,function(a){return new mg(a)})}function ug(a,b){return a||b?a&&b?a.id==b.id&&a.name==b.name:!1:!0}
89 function vg(a,b){return Pa(a,function(a){return a.id==b})}function wg(a){return La(a,function(a){return{name:a.name,screenId:a.nb,loungeToken:a.kc,dialId:a.zb}})}function xg(a){return La(a,function(a){return new Lf(a)})}function yg(a,b){return a||b?a&&b?a.nb==b.nb:!1:!0}function zg(a,b){return a||b?a&&b?a.nb==b.nb&&a.kc==b.kc&&a.name==b.name&&a.zb==b.zb:!1:!0}function Ag(a,b){return Pa(a,function(a){return yg(a,b)})}function Bg(a,b){return Pa(a,function(a){return b==a.nb||b==a.zb})};function Cg(){var a=Dg(),b=Eg();Ta(a,b);Fg()&&lb(a,b);a=Gg(a);Ua(a)?Rf.remove("remote_sid","/","youtube.com"):(a=a.join(","),Rf.set("remote_sid",a,void 0,"/","youtube.com"))}function Dg(){var a=ig("yt-remote-connected-devices")||[];gb(a);return a}function Gg(a){if(Ua(a))return[];var b=a[0].indexOf("#"),c=-1==b?a[0]:a[0].substring(0,b);return La(a,function(a,b){return 0==b?a:a.substring(c.length)})}function Hg(a){fg("yt-remote-connected-devices",a,86400)}
90 function Eg(){if(Ig)return Ig;var a=ig("yt-remote-device-id");a||(a=pg(),fg("yt-remote-device-id",a,31536E3));for(var b=Dg(),c=1,d=a;Ta(b,d);)c++,d=a+"#"+c;return Ig=d}function Jg(){return ig("yt-remote-session-browser-channel")}function Fg(){return ig("yt-remote-session-screen-id")}
91 function Kg(a){5<a.length&&(a=a.slice(a.length-5));var b=La(Lg(),function(a){return a.loungeToken}),c=La(a,function(a){return a.loungeToken});Na(c,function(a){return!Ta(b,a)})&&fg("yt-remote-lounge-token-expiration",!0,86400);fg("yt-remote-local-screens",a,31536E3)}function Lg(){return ig("yt-remote-local-screens")||[]}function Mg(){return ig("yt-remote-online-screens")||[]}function Ng(a){fg("yt-remote-online-dial-devices",a,30)}function Og(){return ig("yt-remote-online-dial-devices")||[]}
92 function Pg(a,b){a?fg("yt-remote-session-video-id",a):jg("yt-remote-session-video-id");b?fg("yt-remote-session-list-id",b):jg("yt-remote-session-list-id")}function Qg(a){a||(jg("yt-remote-session-screen-id"),jg("yt-remote-session-video-id"),jg("yt-remote-session-list-id"));Cg();a=Dg();Xa(a,Eg());Hg(a)}var Ig="";function Rg(){var a=xg(Mg()),b=tg(Og()),b=Ka(b,function(b){return!Bg(a,b.id)});return rg($a(a,b))};function K(){}K.prototype.Mc=!1;K.prototype.ka=function(){return this.Mc};K.prototype.dispose=function(){this.Mc||(this.Mc=!0,this.H())};function L(a,b){Sg(a,oa(Tg,b))}function Sg(a,b){a.rb||(a.rb=[]);a.rb.push(v(b,void 0))}K.prototype.H=function(){if(this.rb)for(;this.rb.length;)this.rb.shift()()};function Tg(a){a&&"function"==typeof a.dispose&&a.dispose()}function Ug(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];fa(d)?Ug.apply(null,d):Tg(d)}};function Vg(a,b){this.app=a;this.b=null;this.i={};this.g={};this.o={};this.k={};this.j=null;this.a=b;M(this,"cueVideoById",this.ls);M(this,"loadVideoById",this.Lj);M(this,"cueVideoByUrl",this.ms);M(this,"loadVideoByUrl",this.Ms);M(this,"playVideo",this.rg);M(this,"pauseVideo",this.Qj);M(this,"stopVideo",this.uj);M(this,"clearVideo",this.js);M(this,"getVideoBytesLoaded",this.Bs);M(this,"getVideoBytesTotal",this.Cs);M(this,"getVideoLoadedFraction",this.Es);M(this,"getVideoStartBytes",this.Fs);M(this,
93 "cuePlaylist",this.ks);M(this,"loadPlaylist",this.Ls);M(this,"nextVideo",this.Os);M(this,"previousVideo",this.Ps);M(this,"playVideoAt",this.hm);M(this,"setShuffle",this.Us);M(this,"setLoop",this.Rs);M(this,"getPlaylist",this.vb);M(this,"getPlaylistIndex",this.Tj);M(this,"getPlaylistId",this.zs);M(this,"loadModule",this.Ks);M(this,"unloadModule",this.Tm);M(this,"setOption",this.Sm);M(this,"getOption",this.tj);M(this,"getOptions",this.vs);M(this,"mute",this.Fm);M(this,"unMute",this.Hm);M(this,"isMuted",
94 this.Is);M(this,"setVolume",this.Gm);M(this,"getVolume",this.Em);M(this,"seekTo",this.Oh);M(this,"getPlayerState",this.ys);M(this,"getPlaybackRate",this.xs);M(this,"setPlaybackRate",this.Ts);M(this,"getAvailablePlaybackRates",this.rs);M(this,"getPlaybackQuality",this.ws);M(this,"setPlaybackQuality",this.Ss);M(this,"getAvailableQualityLevels",this.ts);M(this,"getCurrentTime",this.getCurrentTime);M(this,"getDuration",this.Gh);M(this,"addEventListener",this.addEventListener);M(this,"removeEventListener",
95 this.removeEventListener);M(this,"getVideoUrl",this.Gs);M(this,"getDebugText",this.us);M(this,"getVideoEmbedCode",this.Ds);M(this,"getVideoData",this.getVideoData);M(this,"addCueRange",this.is);M(this,"removeCueRange",this.Qs);M(this,"setSize",this.Vs);M(this,"getApiInterface",this.os);M(this,"destroy",this.destroy);M(this,"showVideoInfo",this.Ws);M(this,"hideVideoInfo",this.Hs);this.g.logFallback=v(this.Ns,this);this.g.isNotServable=v(this.Js,this);this.g.getUpdatedConfigurationData=v(this.As,this);
96 this.g.updateRemoteReceivers=v(this.Xs,this)}y(Vg,K);function M(a,b,c){a.i[b]=v(c,a)}f=Vg.prototype;f.os=function(){return Kb(this.i)};f.N=function(){return this.b};f.addEventListener=function(a,b){var c=b;u(b)&&(c=function(){n(b).apply(window,arguments)},this.o[b]=c);this.app.D(a,c)};f.Xt=function(a,b){var c=u(b)?a+b:a+ja(b);if(!this.k[c]){u(b)&&(b=function(){n(b).apply(window,arguments)});var d=v(function(a){b({target:this.j,data:a})},this);this.k[c]=d;this.addEventListener(a,d)}};
97 f.removeEventListener=function(a,b){var c=b;if(u(b)&&b in this.o){var c=this.o[b],d=this.o;b in d&&delete d[b]}this.app.$(a,c)};f.Yt=function(a,b){var c=u(b)?a+b:a+ja(b);this.k[c]&&this.removeEventListener(a,this.k[c])};f.ys=function(){return this.app.aa};f.Oh=function(a,b){Wg(this.app,!0,this.a);Xg(this.app,a,b,void 0,this.a)};f.getCurrentTime=function(){var a=this.app.Ud;return a&&N(this.app).b!=a?a.getCurrentTime():this.app.getCurrentTime(this.a)};
98 f.Gh=function(){var a=this.app.Ud;return a?a.Rd:0};f.Em=function(){return this.app.wa.volume};f.Gm=function(a){var b=this.app;b.wa.volume=a;b.u("internalvolumechange",b.wa)};f.Is=function(){return this.app.wa.muted};f.Fm=function(){Yg(this.app)};f.Hm=function(){Zg(this.app)};f.rg=function(){Wg(this.app,!0,this.a);$g(this.app,this.a)};f.Qj=function(){ah(this.app,this.a)};f.uj=function(){var a=this.app;bh(a,"play_pause")||ch(a,this.a)};f.js=function(){};f.xs=function(){return this.app.Dg};
99 f.Ts=function(a){dh(this.app,a)};f.rs=function(){return this.app.a.gg?eh:[1]};f.ws=function(){return fh(this.app,this.a)};f.Ss=function(a){var b=N(this.app,this.a);b&&gh(b,"m",a)};f.ts=function(){return hh(this.app,this.a)};f.Bs=function(){var a=ih(this.app.Ud);return Math.floor(1E3*a)};f.Cs=function(){return 1E3};f.Es=function(){return ih(this.app.Ud)};f.Fs=function(){return 0};f.Vs=function(){this.app.R.zi()};f.Ks=function(a){(a=jh(this.app.k,a))&&a.load()};
100 f.Tm=function(a){(a=jh(this.app.k,a))&&a.unload()};f.Lj=function(a,b,c){var d=this.app,e=this.a;a=kh(d,lh(a,d.list,b,c),e);Wg(d,a,e)};f.ls=function(a,b,c){var d=this.app,e=this.a;mh(d,new nh(lh(a,d.list,b,c)),e)};f.Ms=function(a,b,c){var d=this.app,e=this.a;a=oh(a,d.list,b,c);b=kh(d,a,e);Wg(d,b,e);ph(d,a.mediaContentUrl)};f.ms=function(a,b,c){var d=this.app,e=this.a;a=oh(a,d.list,b,c);mh(d,new nh(a),e);ph(d,a.mediaContentUrl)};f.Gs=function(){return qh(this.app)};f.us=function(){return rh(this.app)};
101 f.Ds=function(){return""};f.is=function(){return!1};f.Qs=function(){};f.Ls=function(a,b,c,d){var e=this.app;e.Xe=!1;sh(e,a,b,c,d)};f.ks=function(a,b,c,d){var e=this.app;e.Xe=!0;sh(e,a,b,c,d)};f.Os=function(){th(this.app)};f.Ps=function(){uh(this.app)};f.hm=function(a){var b=this.app;b.g&&(b.g.Vd?vh(b,wh(b.g,a)):b.Xe=!1,xh(b.g,a))};f.Us=function(a){var b=this.app;b.g&&yh(b.g,a)};f.Rs=function(a){var b=this.app;b.g&&(b.g.loop=a)};
102 f.vb=function(){var a=this.app.g;if(!a)return null;for(var b=[],c=0;c<a.Mb;c++)b[c]=wh(a,c).M;return b};f.Tj=function(){var a=this.app.g?this.app.g.ua:null;return null==a?-1:a};f.zs=function(){return this.app.g&&this.app.g.g?this.app.g.g.toString():null};f.Sm=function(a,b,c){return zh(this.app.k,a,b,c)};f.tj=function(a,b,c){return zh(this.app.k,a,b,c)};f.vs=function(a){return Ah(this.app.k,a)};f.getVideoData=function(){var a=this.app.getVideoData(this.a)||{};return{video_id:a.M,author:a.author,title:a.title}};
103 f.Ws=function(){Bh(this.app.R)};f.Hs=function(){this.app.R.jk()};f.Ns=function(){Ch(this.app.b,204)};f.Js=function(){var a=Dh(this.app);return!(!a||!P(a,128)||5!=a.a.errorCode)};f.As=function(){var a=this.app,b=a.J.clone();if(a=a.b.getVideoData()){var c=b.args,d=Ob(a.b);d.start=a.ya;w(c,d)}return b};f.Xs=function(a){var b=this.app;Eh(b.a)&&6!=b.o&&(b.a.qg=!Ua(a),b.a.qg?1!=b.o&&3!=b.o&&Fh(b):Gh(b.G))};f.destroy=function(){this.app.dispose()};
104 f.H=function(){if(this.b){for(var a in this.i)this.b[a]=null;for(a in this.g)this.b[a]=null}this.o=this.k=this.b=null;Vg.C.H.call(this)};function Hh(a,b){Vg.call(this,a,b);M(this,"cueVideoByPlayerVars",this.qx);M(this,"loadVideoByPlayerVars",this.wo);M(this,"preloadVideoByPlayerVars",this.tx);M(this,"seekBy",this.Gp);M(this,"enableLicenseIntercept",this.rx);M(this,"updatePlaylist",this.wx);M(this,"resumeLicenseSession",this.ux);M(this,"updateLastActiveTime",this.vx);M(this,"updateVideoData",this.xx);M(this,"getStoryboardFormat",this.sx)}y(Hh,Vg);f=Hh.prototype;f.qx=function(a){var b=this.a;mh(this.app,new nh(a),b)};
105 f.wo=function(a){kh(this.app,a,this.a)};f.tx=function(){};f.Gp=function(a,b,c){Wg(this.app,!0,this.a);var d=this.app,e=this.a;Xg(d,d.getCurrentTime()+a,b,c,e)};f.rx=function(){var a=this.app;a.Mk||(a.Mk=!0,a.ri={})};f.wx=function(){var a=this.app;Ih(a);a.Wa("onPlaylistUpdate")};f.ux=function(a,b){var c=this.app,d=c.ri[a];d&&(Jh(d,b),d.start(),delete c.ri[a])};f.vx=function(){this.app.a.Sa=x()};f.xx=function(a){var b=N(this.app,this.a||1);b&&(b=b.a,Kh(b,a),b.u("dataupdated"))};f.sx=function(){return this.app.getVideoData().b.storyboard_spec};
106 f.getVideoData=function(){var a=Hh.C.getVideoData.call(this),b=this.app.getVideoData(this.a)||{};a.cpn=b.Da;return a};f.getCurrentTime=function(a){return a?this.app.getCurrentTime(a):Hh.C.getCurrentTime.call(this)};f.Gh=function(a){return a?Lh(this.app,a):Hh.C.Gh.call(this)};function Mh(a,b){Hh.call(this,a,b)}y(Mh,Hh);f=Mh.prototype;f.Lj=function(a,b,c){kh(this.app,lh(a,this.app.list,b,c),this.a)};f.rg=function(){$g(this.app,this.a)};f.Oh=function(a,b){Xg(this.app,a,b,void 0,this.a)};function Q(a){return a.app.R.a}f.K=function(){return this.app.K()};f.vb=function(){return this.app.g};f.getVideoData=function(){return this.app.getVideoData(this.a)};function Nh(a){this.j=Math.exp(Math.log(0.5)/a);this.a=this.g=0}Nh.prototype.b=function(a,b){var c=Math.pow(this.j,a);this.a=b*(1-c)+c*this.a;this.g+=a};Nh.prototype.i=function(){return this.a/(1-Math.pow(this.j,this.g))};function Oh(a,b){this.o=0;this.j=a;this.F=b||0.5;this.k="index";this.a=0;this.g=[]}Oh.prototype.b=function(a,b){Ph(this,"index");this.g.push({index:this.o++,weight:a,value:b});this.a+=a;for(Ph(this,"index");this.a>this.j;){var c=this.a-this.j,d=this.g[0];d.weight<=c?(this.a-=d.weight,this.g.shift()):(this.a-=c,d.weight-=c)}};function Qh(a,b){Ph(a,"value");var c=b*a.a,d=0,e=NaN;a.g.some(function(a){d+=a.weight;e=a.value;if(d>=c)return!0});return e}Oh.prototype.i=function(){return Qh(this,this.F)};
107 function Ph(a,b){a.k!=b&&(a.k=b,ib(a.g,b))};function Rh(a){var b=ig(a);if(!b){var c=new Vf;c.isAvailable()&&(b=(new Xf(c)).get(a))}return b}function Sh(){var a={volume:100,muted:!1,nonNormalized:100},b=Rh("yt-player-volume")||{};a.volume=isNaN(b.volume)?100:wb(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 Th(a){this.g=this.i=0;this.j=new Nh(4);a.Kc?this.b=new Nh(16):this.b=new Oh(16,0.6);a.Ll?this.a=new Oh(8,0.6):a.Jl?this.a=new Oh(16,0.6):a.Kl?this.a=new Oh(24,0.6):"play"==a.La?this.a=new Nh(17):this.a=new Oh(17,0.6);var b=Rh("yt-player-bandwidth");a=a.jb?0.1:0.5;b&&!isNaN(b.byterate)?this.a.b(a,b.byterate):this.a.b(a,13E4)}function Uh(a){a=a.b.i();return a=isNaN(a)?0.5:a}function Vh(a){return a.j.i()||0}function Wh(a){a=a.a.i();return 0<a?a:1};function Xh(){this.a=[];this.Sb={}}y(Xh,K);f=Xh.prototype;f.Wo=1;f.Fi=0;f.D=function(a,b,c){var d=this.Sb[a];d||(d=this.Sb[a]=[]);var e=this.Wo;this.a[e]=a;this.a[e+1]=b;this.a[e+2]=c;this.Wo=e+3;d.push(e);return e};f.$=function(a,b,c){if(a=this.Sb[a]){var d=this.a;if(a=Pa(a,function(a){return d[a+1]==b&&d[a+2]==c}))return this.Rc(a)}return!1};
108 f.Rc=function(a){if(0!=this.Fi)return this.b||(this.b=[]),this.b.push(a),!1;var b=this.a[a];if(b){var c=this.Sb[b];c&&Xa(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.Sb[a];if(c){this.Fi++;for(var d=db(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.Fi--;if(this.b&&0==this.Fi)for(;c=this.b.pop();)this.Rc(c);return 0!=e}return!1};
109 f.clear=function(a){if(a){var b=this.Sb[a];b&&(z(b,this.Rc,this),delete this.Sb[a])}else this.a.length=0,this.Sb={}};f.hb=function(a){if(a){var b=this.Sb[a];return b?b.length:0}a=0;for(b in this.Sb)a+=this.hb(b);return a};f.H=function(){Xh.C.H.call(this);delete this.a;delete this.Sb;delete this.b};function Yh(a,b){this.start=a;this.end=b;this.a=ja(this)}function Zh(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}Yh.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)};Yh.prototype.toString=function(){return"Interval["+this.start+", "+this.end+"]"};function $h(a,b,c){Yh.call(this,a,b);a=c||{};this.Ba=a.id||"";void 0!=a.priority&&(this.kh=a.priority);this.namespace=a.namespace||"";this.Pc=a.visible||!1;this.Eb=new Xh}y($h,Yh);f=$h.prototype;f.Ba="";f.kh=7;f.active=!0;f.Pc=!1;f.Eb=null;f.namespace="";f.getId=function(){return this.Ba};function ai(a,b){return a.start==b.start?a.kh==b.kh?0:a.kh<b.kh?-1:1:a.start<b.start?-1:1};function bi(a){bi[" "](a);return a}bi[" "]=ba;var ci=!C||vc(9),di=C&&!uc("9");!gc||uc("528");fc&&uc("1.9b")||C&&uc("8")||ec&&uc("9.5")||gc&&uc("528");fc&&!uc("8")||C&&uc("9");function ei(a,b){this.type=a;this.currentTarget=this.target=b}f=ei.prototype;f.dispose=function(){};f.ne=!1;f.defaultPrevented=!1;f.Uo=!0;f.stopPropagation=function(){this.ne=!0};f.preventDefault=function(){this.defaultPrevented=!0;this.Uo=!1};function fi(a,b){a&&this.init(a,b)}y(fi,ei);f=fi.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.le=null;
110 f.init=function(a,b){var c=this.type=a.type;ei.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(fc){var e;t:{try{bi(d.nodeName);e=!0;break t}catch(g){}e=!1}e||(d=null)}}else"mouseover"==c?d=a.fromElement:"mouseout"==c&&(d=a.toElement);this.relatedTarget=d;this.clientX=void 0!==a.clientX?a.clientX:a.pageX;this.clientY=void 0!==a.clientY?a.clientY:a.pageY;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;
111 this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.state=a.state;this.le=a;a.defaultPrevented&&this.preventDefault();delete this.ne};f.stopPropagation=function(){fi.C.stopPropagation.call(this);this.le.stopPropagation?this.le.stopPropagation():this.le.cancelBubble=!0};f.preventDefault=function(){fi.C.preventDefault.call(this);var a=this.le;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,di)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};f.Mx=function(){return this.le};var gi="closure_listenable_"+(1E6*Math.random()|0);function hi(a){try{return!(!a||!a[gi])}catch(b){return!1}}var ii=0;function ji(a,b,c,d,e){this.Ye=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.gb=e;this.key=++ii;this.removed=this.Ei=!1}function ki(a){a.removed=!0;a.Ye=null;a.proxy=null;a.src=null;a.gb=null};function li(a){this.src=a;this.a={};this.b=0}li.prototype.add=function(a,b,c,d,e){var g=this.a[a];g||(g=this.a[a]=[],this.b++);var h=mi(g,b,d,e);-1<h?(a=g[h],c||(a.Ei=!1)):(a=new ji(b,this.src,a,!!d,e),a.Ei=c,g.push(a));return a};li.prototype.remove=function(a,b,c,d){if(!(a in this.a))return!1;var e=this.a[a];b=mi(e,b,c,d);return-1<b?(ki(e[b]),Ya(e,b),0==e.length&&(delete this.a[a],this.b--),!0):!1};
112 function ni(a,b){var c=b.type;if(!(c in a.a))return!1;var d=Xa(a.a[c],b);d&&(ki(b),0==a.a[c].length&&(delete a.a[c],a.b--));return d}li.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,ki(d[e]);delete this.a[c];this.b--}return b};function oi(a,b,c,d,e){a=a.a[b];b=-1;a&&(b=mi(a,c,d,e));return-1<b?a[b]:null}function mi(a,b,c,d){for(var e=0;e<a.length;++e){var g=a[e];if(!g.removed&&g.Ye==b&&g.capture==!!c&&g.gb==d)return e}return-1};var pi="closure_lm_"+(1E6*Math.random()|0),qi={},ri=0;function si(a,b,c,d,e){if(t(b)){for(var g=0;g<b.length;g++)si(a,b[g],c,d,e);return null}c=ti(c);if(hi(a))a=a.listen(b,c,d,e);else{if(!b)throw Error("Invalid event type");var g=!!d,h=ui(a);h||(a[pi]=h=new li(a));c=h.add(b,c,!1,d,e);c.proxy||(d=vi(),c.proxy=d,d.src=a,d.Ye=c,a.addEventListener?a.addEventListener(b,d,g):a.attachEvent(b in qi?qi[b]:qi[b]="on"+b,d),ri++);a=c}return a}
113 function vi(){var a=wi,b=ci?function(c){return a.call(b.src,b.Ye,c)}:function(c){c=a.call(b.src,b.Ye,c);if(!c)return c};return b}function xi(a,b,c,d,e){if(t(b))for(var g=0;g<b.length;g++)xi(a,b[g],c,d,e);else c=ti(c),hi(a)?a.ac(b,c,d,e):a&&(a=ui(a))&&(b=oi(a,b,c,!!d,e))&&yi(b)}
114 function yi(a){if(ga(a)||!a||a.removed)return!1;var b=a.src;if(hi(b))return ni(b.$c,a);var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent&&b.detachEvent(c in qi?qi[c]:qi[c]="on"+c,d);ri--;(c=ui(b))?(ni(c,a),0==c.b&&(c.src=null,b[pi]=null)):ki(a);return!0}function zi(a,b,c,d){var e=1;if(a=ui(a))if(b=a.a[b])for(b=ab(b),a=0;a<b.length;a++){var g=b[a];g&&g.capture==c&&!g.removed&&(e&=!1!==Ai(g,d))}return Boolean(e)}
115 function Ai(a,b){var c=a.Ye,d=a.gb||a.src;a.Ei&&yi(a);return c.call(d,b)}
116 function wi(a,b){if(a.removed)return!0;if(!ci){var c=b||n("window.event"),d=new fi(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.ne&&0<=k;k--)d.currentTarget=c[k],e&=zi(c[k],g,!0,d);for(k=0;!d.ne&&k<c.length;k++)d.currentTarget=c[k],e&=zi(c[k],g,!1,d)}return e}return Ai(a,new fi(b,this))}
117 function ui(a){a=a[pi];return a instanceof li?a:null}var Bi="__closure_events_fn_"+(1E9*Math.random()>>>0);function ti(a){return ha(a)?a:a[Bi]||(a[Bi]=function(b){return a.handleEvent(b)})};function Ci(){this.$c=new li(this);this.V=this}y(Ci,K);Ci.prototype[gi]=!0;f=Ci.prototype;f.zl=null;f.addEventListener=function(a,b,c,d){si(this,a,b,c,d)};f.removeEventListener=function(a,b,c,d){xi(this,a,b,c,d)};
118 function Di(a,b){var c,d=a.zl;if(d){c=[];for(var e=1;d;d=d.zl)c.push(d),++e}var d=a.V,e=b,g=e.type||e;if(u(e))e=new ei(e,d);else if(e instanceof ei)e.target=e.target||d;else{var h=e,e=new ei(g,d);Rb(e,h)}var h=!0,k;if(c)for(var m=c.length-1;!e.ne&&0<=m;m--)k=e.currentTarget=c[m],h=Ei(k,g,!0,e)&&h;e.ne||(k=e.currentTarget=d,h=Ei(k,g,!0,e)&&h,e.ne||(h=Ei(k,g,!1,e)&&h));if(c)for(m=0;!e.ne&&m<c.length;m++)k=e.currentTarget=c[m],h=Ei(k,g,!1,e)&&h}
119 f.H=function(){Ci.C.H.call(this);this.$c&&this.$c.removeAll(void 0);this.zl=null};f.listen=function(a,b,c,d){return this.$c.add(String(a),b,!1,c,d)};f.ac=function(a,b,c,d){return this.$c.remove(String(a),b,c,d)};function Ei(a,b,c,d){b=a.$c.a[String(b)];if(!b)return!0;b=ab(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.Ye,m=h.gb||h.src;h.Ei&&ni(a.$c,h);e=!1!==k.call(m,d)&&e}}return e&&!1!=d.Uo};function Fi(a,b){Ci.call(this);this.a=a||1;this.b=b||l;this.g=v(this.Ut,this);this.i=x()}y(Fi,Ci);f=Fi.prototype;f.Tc=!1;f.hc=null;function Gi(a,b){a.a=b;a.hc&&a.Tc?(a.stop(),a.start()):a.hc&&a.stop()}f.Ut=function(){if(this.Tc){var a=x()-this.i;0<a&&a<0.8*this.a?this.hc=this.b.setTimeout(this.g,this.a-a):(this.hc&&(this.b.clearTimeout(this.hc),this.hc=null),Di(this,"tick"),this.Tc&&(this.hc=this.b.setTimeout(this.g,this.a),this.i=x()))}};
120 f.start=function(){this.Tc=!0;this.hc||(this.hc=this.b.setTimeout(this.g,this.a),this.i=x())};f.stop=function(){this.Tc=!1;this.hc&&(this.b.clearTimeout(this.hc),this.hc=null)};f.H=function(){Fi.C.H.call(this);this.stop();delete this.b};function Hi(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 Ii(){this.a=[]}function Ji(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 Ki(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 Li(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(hb);return c[0]};var Mi,Ni,Oi,Pi,Qi;Qi=Pi=Oi=Ni=Mi=!1;var Ri=ac();Ri&&(-1!=Ri.indexOf("Firefox")||-1!=Ri.indexOf("Camino")||(-1!=Ri.indexOf("iPhone")||-1!=Ri.indexOf("iPod")?Mi=!0:-1!=Ri.indexOf("iPad")?Ni=!0:-1!=Ri.indexOf("Chrome")?Pi=!0:-1!=Ri.indexOf("Android")?Oi=!0:-1!=Ri.indexOf("Safari")&&(Qi=!0)));var Si=Mi,Ti=Ni,Ui=Oi,Vi=Pi,Wi=Qi;var Xi,Yi;var Zi=ac(),$i=Zi.match(/\((iPad|iPhone|iPod)( Simulator)?;/);if(!$i||2>$i.length)Xi=void 0;else{var aj=Zi.match(/\((iPad|iPhone|iPod)( Simulator)?; (U; )?CPU (iPhone )?OS (\d_\d)[_ ]/);Xi=aj&&6==aj.length?Number(aj[5].replace("_",".")):0}(Yi=0<=Xi)&&0<=ac().search("Safari")&&ac().search("Version");var bj=Si||Ti;function cj(){return dj("(ps3; leanback shell)")}function dj(a){var b=ac();return b?0<=b.toLowerCase().indexOf(a.toLowerCase()):!1};function ej(){}var fj=Yi&&4>Xi?0.1:0,gj=new ej;f=ej.prototype;f.Bd=null;f.Bk=!1;f.Rd=0;f.Gl=0;function hj(a,b){var c="";b&&(a.Bd=b,c=ij(b));a.src&&""==c||(c&&a.src!=c&&(a.src=c),b&&b.a||a.load())}function jj(a,b){0<a.readyState&&(a.currentTime=Math.max(fj,b))}f.getType=function(){return this.type};f.Xa=function(a){this.Rd=a};f.getCurrentTime=function(){return this.Gl||this.currentTime};f.Yo=function(){this.Gl=this.currentTime};
121 function ih(a){var b=a.Rd;if(Infinity==b)return 1;if(b&&a.buffered&&0<a.buffered.length){var c=kj(a);return a.buffered.end(c)/b}return 0}function lj(a){a.ended&&jj(a,0);!a.hasAttribute("src")&&a.Bd&&(a.src=ij(a.Bd),a.Bd.a||a.load());a.play()}function mj(a){a.currentSrc&&(bj&&jj(a,0),$c(a),a.removeAttribute("src"),a.load(),a.Bd&&a.Bd.a&&(a.Bd=null))}function nj(a){mj(a);a.Rd=0;a.Gl=0;a.Bd=null}function oj(a,b){a.defaultPlaybackRate=b;a.playbackRate=b}
122 function kj(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=kj(this);if(0<b)return!1;var c=this.getCurrentTime();return a.start(b)>c||a.end(b)<c};function pj(a,b){b?a.setAttribute("crossorigin","true"):a.removeAttribute("crossorigin")}f.Nv=function(){this.hasAttribute("controls")&&this.setAttribute("controls","true")};
123 f.Ov=function(){this.Bk&&!this.muted&&(this.muted=!0)};function qj(a){var b="";if(a)for(var c=0;c<a.length;c++)b+=a.start(c).toFixed(3)+"-"+a.end(c).toFixed(3)+",";return b};var rj=[2,5,100,101,150],sj=[202,203];function tj(a,b){a=a||64;a&128&&!b||a&2&&a&16||(this.b=a,this.a=b||null)}tj.prototype.b=64;tj.prototype.a=null;function uj(a,b,c){return b==a.b&&c==a.a||b&128&&!c||b&2&&b&16?a:new tj(b,c)}function P(a,b){return!!(a.b&b)}function vj(a){return P(a,128)?-1:P(a,2)?0:P(a,1)&&!P(a,32)?3:P(a,64)?-1:P(a,8)?1:P(a,4)?2:-1}function wj(){var a;return a=14};function R(){this.F=new Xh;L(this,this.F)}y(R,K);R.prototype.D=function(a,b,c){return this.ka()?0:this.F.D(a,b,c)};R.prototype.$=function(a,b,c){return this.ka()?!1:this.F.$(a,b,c)};R.prototype.Rc=function(a){return this.ka()?!1:this.F.Rc(a)};R.prototype.u=function(a,b){return this.ka()?!1:this.F.u.apply(this.F,arguments)};function xj(a,b,c){R.call(this);this.A=a;this.o=b;this.B=c;this.j=new Fi(250);si(this.j,"tick",this.Xb,!1,this);L(this,this.j);this.i=[];this.a=[];this.b=new Ii}y(xj,R);f=xj.prototype;f.Kh=!1;f.ug=!1;f.qk=!1;f.pk=!1;f.Hg=null;f.cx=function(a){this.Xb();z(arguments,function(a){this.i.push(a);var c=this.b.a;!c.length||0<Zh(a,c[c.length-1])?c.push(a):lb(c,a,Zh);this.u("onAdd",a)},this);this.Xb()};f.fx=function(a){z(arguments,function(a){a=this.i.indexOf(a);0<=a&&yj(this,a)},this);this.Xb()};
124 function yj(a,b){var c=a.i.splice(b,1)[0],d=a.b.a,e=fb(d,Zh||hb,c);0<=e&&Ya(d,e);b=a.a.indexOf(c);0<=b&&a.a.splice(b,1);a.u("onRemove",c)}f.reset=function(){this.ug=this.Kh=!1;zj(this);for(var a=this.i.length-1;0<=a;a--)yj(this,a);this.Xb();this.k=null};
125 function Aj(a,b){if(a.ug&&!a.Kh)if(zj(a),P(b.state,2)){a.k=null;for(var c=[],d=0;d<a.a.length;d++){var e=a.a[d];e.active&&2147483647>e.end&&(c.push(e),a.a.splice(d--,1))}d=Ji(a.b,2147483646);d=d.concat(Ki(a.b,2147483646));e=[];if(c.length)for(var g=0;g<c.length;g++)e.push(["onExit",c[g]]);c=e.concat(Bj(a,d));for(d=0;d<c.length;d++)g=c[d],e=g[1],e.Eb.u.apply(e.Eb,g)}else P(b.state,16)?(a.g=Cj(a),a.j.stop(),a.j.start(),a.Xb()):(a.j.stop(),P(b.a,16)?(a.g=Cj(a),null!=Li(a.b,Math.max(a.g-2E3,0))&&(a.Hg=
126 Hi(v(a.Xb,a)))):a.Xb())}function Bj(a,b){var c=[];if(!b.length)return c;b.sort(ai);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}
127 f.Xb=function(){this.pk=!0;if(!this.qk)for(var a=3;this.pk&&a;){this.pk=!1;this.qk=!0;if(this.ug&&!this.Kh){zj(this);for(var b=Cj(this),c=[],d=0;d<this.a.length;d++){var e=this.a[d];e.active&&!e.contains(b)&&(c.push(["onExit",e]),this.a.splice(d--,1))}d=Ji(this.b,b);e=this.o();!P(e,48)&&b>this.g&&(d=d.concat(Ki(this.b,this.g,b)));c=c.concat(Bj(this,d));this.g=b;!this.Kh&&this.k&&(c.unshift(["onLockBlockExit",this.k]),this.k=null,P(e,2)&&(this.g=2147483647));this.B()&&(b=Li(this.b,this.g),null!=b&&
128 (this.Hg=Hi(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.Eb.u.apply(e.Eb,b)}this.qk=!1;a--}};function zj(a){null!=a.Hg&&(l.clearTimeout(a.Hg),a.Hg=null)}function Cj(a){return P(a.o(),2)?2147483647:1E3*a.A()}f.H=function(){xi(this.j,"tick",this.Xb,!1,this);zj(this);this.k=this.b=this.a=this.i=null;xj.C.H.call(this)};function Dj(a,b){for(var c=a.split(b),d={},e=0,g=c.length;e<g;e++){var h=c[e].split("=");if(1==h.length&&h[0]||2==h.length){var k=xa(h[0]||""),h=xa(h[1]||"");k in d?t(d[k])?bb(d[k],h):d[k]=[d[k],h]:d[k]=h}}return d}function Ej(a,b){var c=[];Hb(a,function(a,b){var g=encodeURIComponent(String(b)),h;h=t(a)?a:[a];z(h,function(a){""==a?c.push(g):c.push(g+"="+encodeURIComponent(String(a)))})});return c.join(b)}function Fj(a){"?"==a.charAt(0)&&(a=a.substr(1));return Dj(a,"&")}
129 function Gj(a){return-1!=a.indexOf("?")?(a=(a||"").split("#")[0],a=a.split("?",2),Fj(1<a.length?a[1]:a[0])):{}}function Hj(a){a=ke([],a);a[0]="";return a.join("")}function S(a,b){return he(ke([a],b))}var Ij=fe;function Jj(){var a=de(document.location.href);return be(a[1],a[2],a[3],a[4])}function Kj(a,b){var c=a.split("#",2);a=c[0];var c=1<c.length?"#"+c[1]:"",d=a.split("?",2);a=d[0];var d=Fj(d[1]||""),e;for(e in b)d[e]=b[e];return S(a,d)+c};var Lj=null;"undefined"!=typeof XMLHttpRequest?Lj=function(){return new XMLHttpRequest}:"undefined"!=typeof ActiveXObject&&(Lj=function(){return new ActiveXObject("Microsoft.XMLHTTP")});function Mj(a){switch(a&&"status"in a?a.status:-1){case 0:case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 304:return!0;default:return!1}};function Nj(a,b,c,d,e,g,h){var k=Lj&&Lj();if("open"in k){k.onreadystatechange=function(){4==(k&&"readyState"in k?k.readyState:0)&&b&&gf(b)(k)};c=(c||"GET").toUpperCase();d=d||"";k.open(c,a,!0);g&&(k.responseType=g);h&&(k.withCredentials=!0);g="POST"==c;if(e=Oj(a,e))for(var m in e)k.setRequestHeader(m,e[m]),"content-type"==m.toLowerCase()&&(g=!1);g&&k.setRequestHeader("Content-Type","application/x-www-form-urlencoded");k.send(d);return k}}
130 function Oj(a,b){b=b||{};var c;if(c=df("PAGE_CL"))if(c=df("PAGE_BUILD_TIMESTAMP")){var d;d||(d=window.location.href);c=de(a)[1]||null;var e=Ij(a);c&&e?(c=d,d=de(a),c=de(c),d=d[3]==c[3]&&d[1]==c[1]&&d[4]==c[4]):d=e?Ij(d)==e&&(Number(de(d)[4]||null)||null)==(Number(de(a)[4]||null)||null):!0;c=d||Pj(a)}c&&(b["X-YouTube-Page-CL"]=df("PAGE_CL"),b["X-YouTube-Page-Timestamp"]=df("PAGE_BUILD_TIMESTAMP"));return b}
131 function Pj(a){var b=["X-YouTube-Page-CL","X-YouTube-Page-Timestamp"],c=df("CORS_HEADER_WHITELIST")||{};a=Ij(a);if(!a)return!0;var d=c[a];return d?Na(b,function(a){return Ta(d,a)}):!1}
132 function Qj(a,b){var c=b.format||"JSON";b.mv&&(a=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+a);var d=b.rf;d&&(a=Kj(a,d));var e=b.Bw||"";(d=b.Gf)&&u(e)&&(e=Fj(e),Rb(e,d),e=Hj(e));var g=!1,h,k=Nj(a,function(a){if(!g){g=!0;h&&I(h);var d=Mj(a),e=null;if(d||400<=a.status&&500>a.status)e=Rj(c,a);if(d)t:{switch(c){case "XML":d=0==parseInt(e&&e.return_code,10);break t;case "RAW":d=!0;break t}d=!!e}var e=e||{},k=b.S||l;d?b.Pa&&b.Pa.call(k,
133 a,e):b.onError&&b.onError.call(k,a,e);b.pd&&b.pd.call(k,a,e)}},b.method,e,b.headers,b.responseType,b.withCredentials);b.Sk&&0<b.timeout&&(h=H(function(){g||(g=!0,k.abort(),I(h),b.Sk.call(b.S||l,k))},b.timeout));return k}function Rj(a,b){var c=null;switch(a){case "JSON":var d=b.responseText,e=b.getResponseHeader("Content-Type")||"";d&&0<=e.indexOf("json")&&(c=ob(d));break;case "XML":if(d=(d=b.responseXML)?Sj(d):null)c={},z(d.getElementsByTagName("*"),function(a){c[a.tagName]=Tj(a)})}return c}
134 function Sj(a){return a?(a=("responseXML"in a?a.responseXML:a).getElementsByTagName("root"))&&0<a.length?a[0]:null:null}function Tj(a){var b="";z(a.childNodes,function(a){b+=a.nodeValue});return b}var Uj={html5_ajax:"action_get_html5_token",watch_actions_ajax:"action_get_watch_actions_token",addto_ajax:"action_get_wl_token"},Vj={html5_ajax:"html5_ajax_token",watch_actions_ajax:"watch_actions_ajax_token",addto_ajax:"addto_ajax_token"};
135 function Wj(a,b,c,d,e){if(ff(a))d&&window.setTimeout(d,0);else{var g=Jj()+"/token_ajax",h={};b&&(h.sy=b);c&&(h.ty=c);h[Uj[a]]=1;Qj(g,{format:"RAW",method:"GET",rf:h,pd:function(b){var c=Fj(b.responseText),g=c[Vj[a]];g?(ef(a,g),d&&d()):e&&e(b,c)}})}};function Xj(a){a=a.split("");a=a.reverse();a=a.slice(2);a=a.reverse();var b=a[0];a[0]=a[63%a.length];a[63]=b;a=a.reverse();return a.join("")};function Yj(){this.lang=""};function Zj(a,b,c,d,e,g){this.Oa=a;this.j=0<=b.indexOf("/mp4")?1:0<=b.indexOf("/webm")?2:0<=b.indexOf("/x-flv")?3:0;this.Jb=b;this.b=g||0;this.i=c||null;this.a=d||null;this.g=e||null}function ak(a){return 2==a.j}function bk(a){return 0<=a.indexOf("opus")||0<=a.indexOf("vorbis")||0<=a.indexOf("mp4a")}function ck(a){return 0<=a.indexOf("vp9")||0<=a.indexOf("vp8")||0<=a.indexOf("avc1")};var dk={Yx:"auto",OC:"tiny",RB:"light",SMALL:"small",aC:"medium",LARGE:"large",wB:"hd720",uB:"hd1080",vB:"hd1440",DB:"highres",UNKNOWN:"unknown"};function ek(a,b,c){this.width=a;this.height=b;t:if(a||b){for(var d=1;d<fk.length;d++){var e=fk[d],g=gk[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 fk="auto highres hd1440 hd1080 hd720 large medium small tiny".split(" "),gk={auto:[0,0],tiny:[256,144],light:[320,240],small:[320,240],medium:[640,360],large:[854,480],hd720:[1280,720],hd1080:[1920,1080],hd1440:[2560,1440],highres:[2048,1536]};function hk(a,b){this.start=a;this.end=b;this.length=b-a+1}function ik(a){a=a.split("-");return 2==a.length&&(a=new hk(parseInt(a[0],10),parseInt(a[1],10)),!isNaN(a.start)&&!isNaN(a.end)&&!isNaN(a.length)&&0<a.length)?a:null}function jk(a,b){return new hk(a,a+b-1)}hk.prototype.toString=function(){return this.start+"-"+(null==this.end?"":this.end)};var kk="corp.google.com googleplex.com youtube.com youtube-nocookie.com prod.google.com sandbox.google.com docs.google.com drive.google.com mail.google.com play.google.com googlevideo.com".split(" "),lk=["2mdn.net"],mk="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(" ");
136 function nk(){return-1!=document.location.toString().indexOf("/embed/")}function ok(a,b){return RegExp("^https?://([a-z0-9-]{1,63}\\.)*("+b.join("|").replace(/\./g,".")+")(:[0-9]+)?([/?#]|$)","i").test(a)}function pk(a){a=new re(a);se(a,document.location.protocol);te(a,document.location.hostname);document.location.port&&ue(a,document.location.port);return a.toString()};function qk(a,b,c,d,e,g,h,k,m){this.a=b;this.U=c;this.type=a;this.j=0<=d?d:-1;this.startTime=e||0;this.duration=g||0;this.ob=h||0;this.Ha=0<=k?k:NaN;this.b=!!m;this.U?(this.U=this.U,this.Ha=0<=this.Ha?this.Ha:this.U.length,this.g=this.ob+this.Ha==this.U.length,this.i=this.startTime+this.duration*this.ob/this.U.length,this.o=this.duration*this.Ha/this.U.length,this.k=this.i+this.o):this.g=!0}function rk(a){return 1==a.type||2==a.type}
137 function sk(a,b){return a.a==b.a&&a.U.start+a.ob+a.Ha==b.U.start+b.ob}function tk(a){Ga(1==a.length||Na(a,function(a){return!!a.U}));for(var b=1;b<a.length;b++);b=a[a.length-1];return new hk(a[0].U.start+a[0].ob,b.U.start+b.ob+b.Ha-1)}qk.prototype.qf=function(a){return this.a.qf(this,a)};function uk(a){return"i="+a.a.info.Oa+",r="+(a.U.start+a.ob)+"-"+(a.U.start+a.ob+a.Ha-1)+",t="+a.i.toFixed(1)+"-"+(a.i+a.o).toFixed(1)};function vk(a,b,c,d){this.info=a;this.buffer=b;this.U=c;this.a=d}function wk(a){return new DataView(a.buffer,a.U.start,a.U.length)}function xk(a){if(a.info.Ha!=a.U.length)return!1;if(1==a.info.a.info.j){if(8>a.info.Ha||4==a.info.type)return!0;var b=wk(a),c=b.getUint32(0,!1),b=b.getUint32(4,!1);if(2==a.info.type)return c==a.info.Ha&&1936286840==b;if(3==a.info.type&&0==a.info.ob)return 1836019558==b}return!0};function yk(a){this.a=a;this.b=0;this.g=-1}var zk=0;function Ak(a,b){a.a=Kj(a.a,b)};function Bk(a,b){this.index=null;this.info=b;this.b=null;this.i=!1;this.j=new yk(a)}f=Bk.prototype;f.Do=function(){return!1};f.Yb=function(){return!1};f.Aj=function(){return!1};f.mn=function(){return[]};f.qf=function(){return null};f.Ej=function(){return null};f.Co=function(){};function Ck(a){this.b=a[0].a.j;this.a=a};function Dk(){this.T=0;this.a=new Float64Array(128);this.b=new Float32Array(128);this.g=!1}Dk.prototype.hb=function(){return this.T};function Ek(a,b){var c=fb(a.b.subarray(0,a.T),hb,b);return 0<=c?c:Math.max(0,-c-2)}function Fk(a){if(a.a.length<a.T+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.T+1;b++)a.a[b]=c[b],a.b[b]=d[b]}}function Gk(a,b){this.b=a;this.a=0;this.g=b||0}
138 function Hk(a){for(var b=Ik(a,!1);236==b;)Jk(a),b=Ik(a,!1);return b}function Kk(a){var b=Ik(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 Gk(c,a.g+a.a);a.a+=b;return c}function Lk(a){for(var b=Ik(a,!0),c=Mk(a),d=1;d<b;d++)c=(c<<8)+Mk(a);return c}function Jk(a){var b=Ik(a,!0);a.a+=b}function Ik(a,b){var c=Mk(a);if(1==c){for(var d=c=0;7>d;d++)c=256*c+Mk(a);return c}for(var e=128,d=0;6>d&&e>c;d++)c=256*c+Mk(a),e*=128;return b?c-e:c}
139 function Mk(a){return a.b.getUint8(a.a++)};function Nk(a,b,c,d){Bk.call(this,a,b);this.o=c;this.k=d;this.g=null;this.index=new Dk;b=parseInt;c=a.search(oe);d=ne(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=xa(a.substr(d,e-d))}this.a=b(a,10)}y(Nk,Bk);f=Nk.prototype;f.Yb=function(){return!(!this.b||!this.index.hb())};
140 f.mn=function(a){var b=new qk(1,this,this.o),c=new qk(2,this,this.k),d=[],e=[b];sk(b,c)?e.push(c):d.push(new Ck([c]));isNaN(this.a)?a=0:a>this.a&&(a=this.a);b=e[e.length-1];c=b.U.end-e[0].U.start+1;a>c&&(a=jk(b.U.end+1,a-c),e.push(new qk(4,this,a)));d.push(new Ck(e));return d};
141 f.Co=function(a){if(1==a.info.type){if(this.b)return;this.b=new Uint8Array(a.buffer,a.U.start,a.U.length)}else if(2==a.info.type){if(this.g||this.index.hb())return;if(1==this.info.j){var b=this.index,c=wk(a),d=a.info.U.start;a=0;var e=c.getUint32(0,!1),g=c.getUint8(a+8);a+=12;var h=c.getUint32(a+4,!1);a+=8;var k;0==g?(g=c.getUint32(a,!1),k=c.getUint32(a+4,!1),a+=8):(g=(c.getUint32(a,!1)<<32)+c.getUint32(a+4,!1),k=(c.getUint32(a+8,!1)<<32)+c.getUint32(a+12,!1),a+=16);b.a[0]=k+(e+d);b.b[0]=g;b.g=!0;
142 d=c.getUint16(a+2,!1);a+=4;for(e=0;e<d;e++){var m=c.getUint32(a,!1);k=c.getUint32(a+4,!1);a+=12;g=b;k=k/h;g.T++;Fk(g);g.a[g.T]=g.a[g.T-1]+m;g.b[g.T]=g.b[g.T-1]+k}}else this.g=wk(a)}if(ak(this.info)&&this.b&&this.g){c=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength);b=this.index;e=this.g;a=new Gk(c);if(440786851==Hk(a)&&(Jk(a),408125543==Hk(a))){h=a;d=h.a;c=Ik(h,!0);h.a=d;a=Kk(a);h=a.g+a.a;for(m=Hk(a);357149030!=m;)Jk(a),m=Hk(a);a=Kk(a);g=1E6;k=1E9;for(d=0;!(a.a>=a.b.byteLength);)if(m=
143 Hk(a),2807729==m)g=Lk(a);else if(2807730==m)k=Lk(a);else if(17545==m){var d=a,m=Ik(d,!0),p=0;4==m?p=d.b.getFloat32(d.a):8==m&&(p=d.b.getFloat64(d.a));d.a+=m;d=p}else Jk(a);g/=k;d*=g;a=new Gk(e);if(475249515==Hk(a)){for(a=Kk(a);!(a.a>=a.b.byteLength);)if(m=Hk(a),187==m){e=Kk(a);m=g;k=h;if(179!=Hk(e))m=null;else if(m*=Lk(e),183!=Hk(e))m=null;else{e=Kk(e);for(p=k;!(e.a>=e.b.byteLength);)241==Hk(e)?p=Lk(e)+k:Jk(e);m=[p,m]}e=b;k=m[0];m=m[1];Fk(e);e.a[e.T]=k;e.b[e.T]=m;e.T++}else Jk(a);a=d;c=c+h;Fk(b);
144 b.g=!0;b.b[b.T]=a;b.a[b.T]=c}}this.g=null}};function Ok(a,b,c,d){for(var e=[];b<a.index.hb();b++){var g=jk(a.index.a[b],b+1<a.index.T||a.index.g?a.index.a[b+1]-a.index.a[b]:-1),h=a.index.b[b],k;k=a.index;var m=b;k=m+1<k.T||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),r=b==a.index.hb()-1&&m+p==g.length;e.push(new qk(3,a,g,b,h,k,m,p,r));if(g.start+m+p>=c+d)break}return new Ck(e)}
145 function Pk(a,b){for(var c=0;c+1<a.index.hb()&&b.U.start>=a.index.a[c+1];)c++;return Ok(a,c,b.U.start,b.U.length).a}f.Aj=function(a){return this.Yb()?!0:isNaN(this.a)?!1:a.U.end+1<this.a};f.qf=function(a,b){this.Aj(a);if(!this.Yb()){var c=jk(a.U.end+1,b);c.end+1>this.a&&(c=new hk(c.start,this.a-1));c=[new qk(4,a.a,c)];return new Ck(c)}4==a.type&&(c=Pk(this,a),a=c[c.length-1]);var c=0,d=a.U.start+a.ob+a.Ha;3==a.type&&(c=a.j,d==a.U.end+1&&(c+=1));return Ok(this,c,d,b)};
146 f.Ej=function(a,b){var c=Ek(this.index,a);return Ok(this,c,this.index.a[c],b)};f.Do=function(){return this.Yb()&&!isNaN(this.a)&&(this.index.g?this.index.a[this.index.T]:-1)!=this.a};function Qk(){this.duration=0;this.a={}}var Rk=/PT(([0-9]*)H)?(([0-9]*)M)?(([0-9.]*)S)?/;function Sk(a){var b=new Qk;z(a,function(a){var d=a.type,e=a.itag,g=null;ck(d)&&(g=a.size.split("x"),g=new ek(parseInt(g[0],10),parseInt(g[1],10)));var h=null;bk(d)&&(h=new Yj);d=new Zj(e,d,h,g,null,parseInt(a.bitrate,10)/8);g=ik(a.init);h=ik(a.index);(a=Tk(a.url,d,a.s))&&(b.a[e]=new Nk(a,d,g,h))});return b}
147 function Uk(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 Vk(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 Tk(a,b,c){if(!ok(a,kk))return"";b={alr:"yes",mime:b.Jb.split(";")[0]};c&&(b.signature=Xj(c));return Kj(a,b)};function Wk(a,b,c,d,e,g,h,k,m){this.i={};this.o=a;this.F=b;this.b=c;this.a=d;this.g=e;this.A=g;this.j=h;this.k=k;this.B=m}function Xk(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 Yk(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:Xk(a,c),iu:g,mi:a.a,row:e,rows:h,Rn:a.o*a.a,Qn:a.F*h}};function Zk(a){var b=[];a=a.split("|");for(var c=a[0],d,e,g,h,k,m,p,r,s=1;s<a.length;s++)d=a[s].split("#"),e=s-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),r=d[6],d=d[7],b.push(new Wk(g,h,k,m,p,c,r,d,e));this.a=b;this.b={};1<this.a.length&&-1!=this.a[0].j.indexOf("default")&&this.a.splice(0,1)}function $k(a,b){var c=a.a[0].b-1;return wb(Math.round(c*b),0,c)}
148 function al(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 bl={0:"MONO",1:"LEFT_RIGHT",2:"RIGHT_LEFT",3:"TOP_BOTTOM",4:"BOTTOM_TOP"};var cl={VB:1,WB:2,XB:3};var dl;var el=ac(),el=el.toLowerCase();if(-1!=el.indexOf("android")){var fl=el.match(/android\D*(\d\.\d)[^\;|\)]*[\;\)]/);if(fl)dl=Number(fl[1]);else{var gl={cupcake:1.5,donut:1.6,eclair:2,froyo:2.2,gingerbread:2.3,honeycomb:3,"ice cream sandwich":4,jellybean:4.1},hl=el.match("("+Kb(gl).join("|")+")");dl=hl?gl[hl[0]]:0}}else dl=void 0;var il,jl;function kl(){var a=n("yt.player.utils.videoElement_");a||(a=document.createElement("video"),pa("yt.player.utils.videoElement_",a));return a}function ll(){if(2.2==dl)return!0;var a=kl();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}}
149 function ml(){var a=Uc("div",{"class":"html5-player-css-loaded"});document.body.appendChild(a);var b="none"==nd(a,"display");F(a);return b};function nl(){var a;if(void 0==il&&(il=!1,window.crypto&&window.crypto.iy))try{a=new Uint8Array(1),window.crypto.iy(a),il=!0}catch(b){}if(il){a=Array(16);var c=new Uint8Array(16);window.crypto.getRandomValues(c);for(var d=0;d<a.length;d++)a[d]=c[d]}else for(a=Array(16),c=0;16>c;c++){for(var d=x(),e=0;e<d%23;e++)a[c]=Math.random();a[c]=Math.floor(256*Math.random())}return a}
150 function ol(){for(var a=nl(),b=[],c=0;c<a.length;c++)b.push("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_".charAt(a[c]&63));return b.join("")}function pl(){return La(nl(),function(a){return(a&15).toString(16)}).join("")};function T(a,b){return void 0==b?a:"1"==b?!0:!1}function ql(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 rl(a,b){var c=U(a,b);c&&(c=pk(c));return c}function sl(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 tl(a,b){this.a=a;this.b=b}tl.prototype.clone=function(){return new tl(this.a,this.b)};function ul(a){this.a=[];if(a)t:{var b,c;if(a instanceof ul){if(b=a.tc(),c=a.ic(),0>=a.hb()){a=this.a;for(var d=0;d<b.length;d++)a.push(new tl(b[d],c[d]));break t}}else b=Kb(a),c=Jb(a);for(d=0;d<b.length;d++)vl(this,b[d],c[d])}}function vl(a,b,c){var d=a.a;d.push(new tl(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=ul.prototype;
151 f.remove=function(){var a=this.a,b=a.length,c=a[0];if(!(0>=b)){if(1==b)Va(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.ic=function(){for(var a=this.a,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].b);return b};f.tc=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 ul(this)};f.hb=function(){return this.a.length};
152 f.isEmpty=function(){return Ua(this.a)};f.clear=function(){Va(this.a)};function wl(){ul.call(this)}y(wl,ul);function xl(a){R.call(this);this.a=a;this.g=new wl;this.i={}}y(xl,R);xl.prototype.b=!1;function yl(a,b,c){var d;for(c=al(a.a,c);0<=c;){d=a.a.a[c];if(d=d.i[Math.floor(b/(d.a*d.g))]?Yk(d,b):null)return d;c--}return Yk(a.a.a[0],b)}function zl(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=Xk(a.a.a[b.nn],b.on);c.onload=v(a.j,a,b.nn,b.on)}}
153 xl.prototype.j=function(a,b){this.b=!1;var c=this.a.a[a];c.i[b]=!0;zl(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 Al(a,b,c){this.b=a;this.a=b;this.g=c}var Bl={playready:["com.youtube.playready"],widevine:["com.widevine.alpha"],clearkey:["org.w3.clearkey","webkit-org.w3.clearkey"]},Cl=["widevine","playready"];function Dl(a,b,c){if(!a.addKey&&!a.webkitAddKey)return null;for(var d=0;d<Cl.length;d++){var e=Cl[d];if(c[e])for(var g=Bl[e],h=0;h<g.length;h++){var k=g[h];if(a.canPlayType(b,k))return new Al(e,k,c[e])}}return null};function El(a,b){this.a=a;this.b=b;this.i=0;Object.defineProperty(this,"timestampOffset",{get:this.Iu,set:this.Ju});Object.defineProperty(this,"buffered",{get:this.Hu})}f=El.prototype;f.append=function(a){this.a.webkitSourceAppend(this.b,a)};f.abort=function(){this.a.webkitSourceAbort(this.b)};f.Hu=function(){return this.a.webkitSourceState==this.a.SOURCE_CLOSED?new Fl:this.a.webkitSourceBuffered(this.b)};f.Iu=function(){return this.i};
154 f.Ju=function(a){this.i=a;this.a.webkitSourceTimestampOffset(this.b,a)};function Fl(){this.length=0};function Gl(a){this.activeSourceBuffers=this.sourceBuffers=[];this.a=a;this.b=NaN;this.g=0;Object.defineProperty(this,"duration",{get:this.zu,set:this.Cu});Object.defineProperty(this,"readyState",{get:this.Au});this.a.addEventListener("webkitsourceclose",v(this.Bu,this),!0)}f=Gl.prototype;f.addEventListener=function(a,b,c){this.a.addEventListener(a,b,c)};f.ht=function(){return this.a.webkitMediaSourceURL};
155 f.addSourceBuffer=function(a){var b=(this.g++).toString();this.a.webkitSourceAddId(b,a);a=new El(this.a,b);this.sourceBuffers.push(a);return a};f.Au=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""};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.Bu=function(){Va(this.sourceBuffers)};
156 f.zu=function(){return this.b};f.Cu=function(a){this.b=a;this.a.webkitSourceSetDuration&&this.a.webkitSourceSetDuration(a)};function Hl(){this.a=[]}Hl.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)};Hl.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)}};Hl.prototype.ka=function(){return null===this.a};Hl.prototype.dispose=function(){this.removeAll();this.a=null};function Il(a,b,c,d){this.a=[];this.rd=this.Zb=null;this.i=b;this.g=window.MediaSource?new window.MediaSource:window.WebKitMediaSource?new window.WebKitMediaSource:HTMLMediaElement.prototype.webkitSourceAddId?new Gl(a):null;this.b="";this.j=null;this.listen(this.g,["sourceopen","webkitsourceopen"],oa(this.At,d,c));this.listen(this.g,["sourceclose","webkitsourceclose"],this.zt)}y(Il,Hl);f=Il.prototype;f.Xa=function(a){this.isOpen()?this.g.duration=a:this.i=a};f.isOpen=function(){return"open"==this.g.readyState};
157 f.Gb=function(){return"closed"==this.g.readyState};f.At=function(a,b){isNaN(this.i)||(this.g.duration=this.i,this.i=NaN,this.Zb=this.g.addSourceBuffer(a),this.rd=this.g.addSourceBuffer(b),this.j&&(this.j(this),this.j=null))};f.zt=function(){this.dispose()};f.dispose=function(){var a=this.b;if(a)try{window.URL.revokeObjectURL(a)}catch(b){}this.b="";Il.C.dispose.call(this)};
158 function Jl(a){if(window.MediaSource&&window.MediaSource.isTypeSupported)return window.MediaSource.isTypeSupported(a);'audio/mp4; codecs="mp4a.40.2"'==a&&(a='video/mp4; codecs="avc1.4d404f"');return!!kl().canPlayType(a)};function Kl(a,b,c,d){this.a=c;this.b=a;this.j=d||"";this.i=b;this.g={}}function ij(a){if(a.a)a=a.b;else if(a.i){var b;b=(new re(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=we(new re(S(a.b,a.g)),b).toString()}else a=S(a.b,a.g);return a};function Ll(a,b){var c=b.Oa in Ml&&cj();this.i=(this.a=!!(a instanceof Array))?null:new Kl(a,c,this.a,b.Oa);this.b=this.a?a[0]:null;this.g=this.a?a[1]:null;this.xe=b}Ll.prototype.getInfo=function(){return this.xe};Ll.prototype.Re=function(){return this.xe.a.i};var Nl={'video/mp4; codecs="avc1.42001E, mp4a.40.2"':"maybe"},Ol={"application/x-mpegURL":"maybe"},Pl={"application/x-mpegURL":"maybe"};
159 function Ql(a,b){if(!ll())return[];var c=Rl(a,b);a=!c.length&&b?Rl(a,!1):c;for(var d={},c=kl(),e=0;e<a.length;e++){var g=a[e];if((c.canPlayType(g.getInfo().Jb)||Sl(g))&&!(g.xe.Oa in Tl||cj()&&"5"==g.xe.Oa)){var h=g.Re();if(!d[h]||ak(d[h].getInfo()))d[h]=g}}var k=[];z(fk,function(a){(g=d[a])&&k.push(g)});return k}function Sl(a){var b;a=a.getInfo().Jb;Ti?b=Pl[a]:2.2==dl?b=Nl[a]:dj("android")&&dj("chrome")&&(b=Ol[a]);return b||""}
160 var Ml={5:!0,34:!0,35:!0},Tl={52:!0,53:!0,54:!0,55:!0,60:!0,79:!0,87:!0},Ul={qB:160,mB:133,oB:134,gB:135,cB:136,ZA:137,bB:264,hB:138,XA:140,nB:142,pB:143,jB:144,lB:222,kB:223,dB:145,fB:224,eB:225,$A:146,aB:226,iB:147,YA:149,WA:261,rB:161,iD:171,hD:172,pD:194,mD:195,oD:220,nD:221,lD:196,kD:197,jD:198,tD:242,uD:243,sD:244,rD:247,qD:248};function Vl(a){var b=[];z(a,function(a){a.url&&b.push(Wl(a.url,a.type,"auto","0"))});return b}
161 function Wl(a,b,c,d,e){var g=new Yj;(c=gk[c])||(c=gk.small);e=new ek(c[0],c[1],e?-1:0);b=unescape(b.replace(/&quot;/g,'"'));return new Ll(a,new Zj(d,b,g,e))}function Rl(a,b){for(var c=[],d=0;d<a.length;d++){var e=a[d],g;if(g=fc)if(g=0!=e.xe.a.a)g=1==e.getInfo().j;g||0!=e.xe.a.a==b&&c.push(e)}return c}
162 function Xl(a,b,c,d){var e=null,g={},h={},k;for(k in Ul){var m=Ul[k],p=a.a[m];if(p&&Jl(p.info.Jb)&&!(0<=p.info.Jb.indexOf("vp9")&&dj("cros armv7"))){if(p.info.g){e||(e=kl());if(!Dl(e,p.info.Jb,p.info.g))continue;if(!d&&p.info.a&&(1280<=p.info.a.width||720<=p.info.a.height))continue;if(261==m)continue}if(m=0<p.info.Jb.indexOf("/webm")?p.info.g?3:1:0<p.info.Jb.indexOf("/mp4")?p.info.g?4:2:null){Ak(p.j,b);var r=p.info.i?g:h;r[m]=r[m]||[];r[m].push(p)}}}a=[3,4,1,2];c&&(a=[4,3,2,1]);c=null;for(k=0;k<a.length;k++)if(g[a[k]]&&
163 h[a[k]]){c=a[k];break}a=[];if(null!=c)for(ib(g[c],"itag"),g=g[c].pop(),k=0;k<h[c].length;k++)a.push(new Ll([g,h[c][k]],h[c][k].info));gb(a,function(a,b){var c=a.getInfo(),d=b.getInfo();return d.a.height-c.a.height||d.b-c.b});return a};function nh(a){R.call(this);this.j=[];this.V=new B(0,0);this.I=[];this.b={};this.xa={};this.i={};Yl(this,a)}y(nh,R);var Zl=/\/img\/watermark\/youtube_(hd_)?watermark(-vfl\S{6})?.png$/,$l="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(" ");
164 f=nh.prototype;f.ca=!1;f.Rk="";f.no=!0;f.eb=!1;f.Jk="";f.Ik="";f.Hk="";f.Dj=!1;f.uh=1;f.en=!1;f.$l=0;f.pe=0;f.fo=!1;f.ok=!1;f.Bm=3;f.di="";f.Da="";f.Fk=!1;f.fg=!1;f.Vl=!1;f.nf=0;f.Fe=!1;f.jm=!1;f.Vf=0;f.df=!1;f.Wl=!0;f.gj=!1;f.Bn=!1;f.Cb=!1;f.Ck=!1;f.Gk=!1;f.Ld=!1;f.rn=!1;f.Dk=!1;f.Rj=0;f.ra=0;f.nh=0;f.ak=!1;f.pl="";f.Zl=!1;f.Zi=!1;f.gm=0;f.Xl=!1;f.Im=!1;f.ya=0;f.Xi=null;f.ff=null;f.rj=!1;f.zf=!1;f.gf=null;f.Jn="";f.Yj=1;f.Ae=0;f.rl=null;f.Yl=!1;f.Cj=0;f.Am=NaN;
165 function Kh(a,b){var c=b||{};c.iv_read_url&&(a.Jk=pk(c.iv_read_url));c.iv_invideo_url&&(a.Ik=pk(c.iv_invideo_url));c.iv_cta_url&&(a.Hk=pk(c.iv_cta_url));a.author=U(a.author,c.author);a.ok=T(a.ok,c.cc_asr);a.di=rl(a.di,c.ttsurl);a.Da=U(a.Da,c.cpn);a.g=U(a.g,c.subscribed);a.title=U(a.title,c.title);a.ja=U(a.ja,c.ypc_preview);a.ak=T(a.ak,c.paygated);c.keywords&&(a.xa=am(c.keywords));c.rvs&&(a.mc=bm(c.rvs));c.poster&&(a.pl=c.poster);z($l,function(a){a in c&&(this.b[a]=c[a])},a)}
166 function Yl(a,b){var c=b||{};a.eb="1"!=c.hlsdvr||Wi||Ti&&5>Xi?!1:!0;a.Dj="1"==c.infringe||"1"==c.muted;a.An=c.authkey;a.Ea=c.authuser;a.Da||(a.Da=c.cpn||ol());a.Kc=c.csi_page_type;a.Ka=c.sw;a.hd=c.t;a.Fk=T(a.Fk,c.cenchd);a.fg="1"==c.enable_cardio;a.Vl="1"==c.enable_cardio_before_playback;a.nf=void 0==(c.end||c.endSeconds)?a.nf:Number(c.end||c.endSeconds);a.Wl="1"!=c.no_get_video_log;a.gj="1"==c.tmi;a.Bn="1"==c.livemonitor;a.Cb="1"==c.live_playback;a.Ck=T(a.Ck,c.mdx);a.Gk=T(a.Gk,c.on3g);a.Dk=T(a.Dk,
167 c.utpsa);a.oo=c.iurlmaxres;a.G=U(a.G,c.oauth_token);a.Q=U(a.Q,c.vvt);a.ld=c.osig;a.Ra=c.ptchn;a.Va=c.oid;a.A=c.ptk;a.jb=c.pltype;a.fb=c.plid;a.k=c.eventid;a.Ta=U(a.Ta,c.list);a.kb=c.pyv_beacon_url;a.jd=c.purchase_id;a.ga=c.sdetail;a.gd=c.sourceid;a.aa=U(a.aa,c.feature);a.Sa=1==(void 0==c.is_fling?a.Sa?1:0:Number(c.is_fling));a.ha=U(a.ha,c.ytr);a.po=c.iurlsd;a.Yl="1"==c.skip_kansas_logging;a.ff=ql(a.ff,c.vq||c.suggestedQuality,dk);a.oe=c.approx_threed_layout||0;a.rj="1"==c.threed_converted;a.Bi=c.iurl;
168 a.Zi="1"==c.sendtmp;a.Xl=!!a.Ka||a.Zi;a.ya=void 0==(c.start||c.startSeconds)?a.ya:Number(c.start||c.startSeconds);a.M=c.docid||c.video_id||c.videoId;cm(a,c.watermark);a.Ic=U(a.Ic,c.ypc_gid);a.Jc=U(a.Jc,c.ypc_license_session_token);if(c.ad3_module||c.ad_module)"1"==c.allow_html5_ads?(a.ca=!0,"1"==c.ad_preroll&&a.I.push("ad")):"1"==c.supported_without_ads||c.cta&&c.fexp&&(-1!=c.fexp.indexOf("924604")||-1!=c.fexp.indexOf("924610"))||(a.jm=!0);c.adaptive_fmts&&(a.Rk=c.adaptive_fmts);c.allow_embed&&(a.no=
169 "1"==c.allow_embed);c.autoplay&&(a.df="1"==c.autoplay);c.iv_load_policy&&(a.da=dm(c.iv_load_policy,a.da));c.cc_load_policy&&(a.Bm=dm(c.cc_load_policy,2));q(c.dash)&&void 0===a.Y&&(a.Y="1"==c.dash);if(c.dashmpd){a.B=S(c.dashmpd,{cpn:a.Da});var d=/\/s\/([0-9A-F.]+)/,e=d.exec(a.B);e&&(e=Xj(e[1]),a.B=a.B.replace(d,"/signature/"+e))}c.delay&&(a.J=Fa(c.delay));c.idpj&&(a.Vf=Fa(c.idpj));c.url_encoded_fmt_stream_map&&(a.Jn=c.url_encoded_fmt_stream_map);c.hlsvp&&(a.va=c.hlsvp);c.length_seconds&&(a.ra=Fa(c.length_seconds));
170 c.ldpj&&(a.nh=Fa(c.ldpj));c.loudness&&(a.za=c.loudness,a.uh=-15<a.za&&0>a.za?Math.pow(10,(-18-a.za)/20):1);c.partnerid&&(a.md=Fa(c.partnerid));c.pyv_billable_url&&ok(c.pyv_billable_url,mk)&&(a.O=c.pyv_billable_url);c.pyv_conv_url&&ok(c.pyv_conv_url,mk)&&(a.Ca=c.pyv_conv_url);c.url_encoded_third_party_media&&(a.gf=bm(c.url_encoded_third_party_media));c.threed_module&&!c.threed_converted&&(a.P=c.threed_module,a.Hc=6);if("1"==c.track_embed||c.tk)a.Zl=!0;c.watch_ajax_token&&ef("watch_actions_ajax",c.watch_ajax_token);
171 c.fresca_preroll&&a.I.push("fresca");c.ypc_clickwrap_module&&a.I.push("ypc_clickwrap");void 0!=c.start&&(a.Cj=c.start);void 0!=c.end&&(a.Am=c.end);a.lc=U(a.lc,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.$l=em(c.rmktPingThreshold,c.length_seconds);a.b=c;Kh(a,c);a.Y&&fm(a)}
172 function fm(a){if(dj("android")&&dj("chrome")&&!uc(29)?0:window.MediaSource||window.WebKitMediaSource||HTMLMediaElement.prototype.webkitSourceAddId)if(a.Rk)a.L=Sk(gm(a,a.Rk));else if(a.B){var b={format:"RAW",method:"GET",S:a,Pa:a.Qw,onError:a.gl};a.Fe=!0;a=pk(a.B);Qj(a,b)}}
173 f.Qw=function(a){if(!this.ka()){if(200<=a.status&&400>a.status){var b=new Qk;t:{a=a.responseText;a=(new DOMParser).parseFromString(a,"text/xml").getElementsByTagName("MPD")[0];var c;if(c=Uk(a,"mediaPresentationDuration")){var d=Rk.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=Uk(d,"id"),g=Uk(d,"mimeType"),h=Uk(d,"codecs"),g=h?g+'; codecs="'+h+'"':g,
174 h=parseInt(Uk(d,"bandwidth"),10)/8,k=null;ck(g)&&(k=new ek(parseInt(Uk(d,"width"),10),parseInt(Uk(d,"height"),10)));var m=null;bk(g)&&(m=new Yj);var p=null,r=Vk(d,"ContentProtection");if(r)if((p=r.attributes.schemeIdUri)&&"http://youtube.com/drm/2012/10/10"==p.textContent)for(p={},r=r.firstChild;null!=r;r=r.nextSibling)"yt:SystemURL"==r.nodeName&&(p[r.attributes.type.textContent]=r.textContent.trim());else p=null;e=new Zj(e,g,m,k,p,h);g=Tk(Vk(d,"BaseURL").textContent,e);h=Vk(d,"SegmentBase");d=ik(h.attributes.indexRange.value);
175 h=ik(h.getElementsByTagName("Initialization")[0].attributes.range.value);d=new Nk(g,e,h,d);if(!d){a=!1;break t}b.a[d.info.Oa]=d}a=!0}if(this.L=a?b:null)this.ra=this.L.duration||this.ra}this.gl()}};f.gl=function(){this.ka()||(this.Fe=!1,this.u("dataloaded",this.b))};
176 function hm(a,b){if(!a.ka()){a.L&&(a.j=Xl(a.L,im(a),!!b,a.Fk));if(!a.j.length){if(a.gf&&a.rn){var c;c=Vl(a.gf);c=Ql(c,!1)}else{c=gm(a,a.Jn);if(a.va){var d;d=a.va;var e={cpn:a.Da};!a.Gk&&(e.ibw="1369843");d={url:S(d,e),type:"application/x-mpegURL",quality:"auto",itag:"93"};c.push(d)}d=!!a.P||a.zf;for(var e=[],g=0;g<c.length;g++){var h=c[g];if(h.sig||h.s){var k=h.sig||Xj(h.s);h.url=Kj(h.url,{signature:k})}h.url&&e.push(Wl(h.url,h.type,h.quality,h.itag,h.stereo3d))}c=Ql(e,!!d)}a.j=c;a.j.length&&(a.Y=
177 !1)}a.u("dataupdated")}}function jm(a){a=La(a.j,function(a){return a.Re()});eb(a);return a.concat(["auto"])}function km(a,b){var c=null;a.j.some(function(a){if(a.Re()==b)return c=a,!0});return c}function lm(a){var b=a.o&&a.o.i;if(!b)return null;w(b.g,im(a));return b}function im(a){var b={};a.A&&(b.ptk=a.A,b.oid=a.Va,b.ptchn=a.Ra,b.pltype=a.jb);return b}function mm(a,b){return u(a.xa[b])?a.xa[b]:null}function nm(a){!a.rl&&a.b.storyboard_spec&&(a.rl=new Zk(a.b.storyboard_spec));return a.rl}
178 function om(a){var b=nm(a);!a.Xi&&b&&(a.Xi=new xl(b),L(a,a.Xi));return a.Xi}function pm(a,b){var c={format:"RAW",method:"GET",S:a,Pa:a.jx};a.Fe=!0;Qj(b,c)}f.jx=function(a){this.ka()||(this.Fe=!1,a=Fj(a.responseText),"fail"==a.status?this.u("onStatusFail",a):(Yl(this,a),this.Fe||this.gl()))};function dm(a,b){var c=parseInt(a,10);return Lb(cl,c)?c:b}function bm(a){a=a.split(",");return a=a.map(function(a){return Fj(a)})}
179 function gm(a,b){var c=bm(b);z(c,function(a){a.url&&(a.url=S(a.url,{cpn:this.Da}))},a);return c}function am(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 cm(a,b){if(b){var c=b.split(",");2<=c.length&&(a.Ma=c[1],a.Lc=c[0])}}function qm(a,b){return!!a.b[b]}function em(a,b){var c=Fa(b),d=Fa(a);return isNaN(d)||isNaN(c)?0:Math.min(d,c)};function rm(a,b){this.type=a||"";this.id=b||""}rm.prototype.toString=function(){return this.type+this.id};function sm(a){R.call(this);this.a=[];this.b=[];this.ua=Math.max(0,a.index||0);this.loop=!!a.loop;this.ya=a.startSeconds||0;this.zn="1"==a.mob;this.title=a.playlist_title||"";a.video_id&&(this.a[this.ua]=new nh(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":tm(this,a.list);break;case "user_favorites":um(this,a.list);break;case "search":vm(this,a.list);break;default:a.playlist_length&&(this.Mb=a.playlist_length),
180 this.g=new rm(a.list.substr(0,2),a.list.substr(2)),this.Tg||wm(this,"/list_ajax?style=json&action_get_list=1",{list:this.g})}else if(a.playlist){var b=a.playlist.toString().split(",");0<this.ua&&(this.a=[]);z(b,function(a){a&&this.a.push(new nh({video_id:a}))},this);this.Mb=this.a.length;this.Vd=!0}else a.videoList&&(0<this.ua&&(this.a=[]),z(a.videoList,function(a){this.a.push(new nh(a))},this),this.Mb=this.a.length,this.Vd=!0);yh(this,!!a.shuffle);a.suggestedQuality&&(this.i=a.suggestedQuality)}
181 y(sm,R);f=sm.prototype;f.loop=!1;f.ya=0;f.xo=!1;f.ua=0;f.title="";f.Mb=0;f.zn=!1;f.Vd=!1;f.Tg=!1;f.ye=null;function xm(a){if(++a.ua>=a.Mb)if(a.loop)a.ua=0;else return null;xh(a,a.ua);return wh(a,a.ua)}function ym(a){if(0>--a.ua)if(a.loop)a.ua=a.Mb-1;else return null;xh(a,a.ua);return wh(a,a.ua)}function wh(a,b){var c=void 0!=b?b:a.ua;if(c=a.a&&c in a.a?a.a[a.b[c]]:null)c.ya=a.ya||c.Cj||0;return c}
182 function yh(a,b){a.xo=b;var c=a.b&&null!=a.b[a.ua]?a.b[a.ua]:a.ua;a.b=[];for(var d=0;d<a.a.length;d++)a.b.push(d);a.ua=c;if(a.xo){c=a.b[a.ua];for(d=1;d<a.b.length;d++){var e=Math.floor(Math.random()*(d+1)),g=a.b[d];a.b[d]=a.b[e];a.b[e]=g}for(d=0;d<a.b.length;d++)a.b[d]==c&&(a.ua=d)}a.u("shuffle")}function xh(a,b){a.ua=wb(b,0,a.Mb-1);a.ya=0}function zm(a){return a.Mb}function tm(a,b){a.Tg||(a.g=new rm("UU","PLAYER_"+b),wm(a,"/list_ajax?style=json&action_get_user_uploads_by_user=1",{username:b}))}
183 function um(a,b){a.Tg||(a.g=new rm("FL","PLAYER_"+b),wm(a,"/list_ajax?style=json&action_get_favorited_by_user=1",{username:b}))}function vm(a,b){if(!a.Tg){a.g=new rm("SR",b);var c={search_query:b};a.zn&&(c.mob="1");wm(a,"/search_ajax?style=json&embeddable=1",c)}}function wm(a,b,c){Qj(S(b,c),{format:"JSON",Pa:function(a,b){Am(this,b)},S:a})}
184 function Am(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=wh(a);a.ua=0;a.a=[];z(b.video,function(a){a&&(a.video_id=a.encrypted_id,c&&a.video_id==c.M&&(this.ua=this.a.length),this.a.push(new nh(a)))},a);a.Mb=a.a.length;yh(a,!1);a.Tg=!1;a.Vd=!0;a.ye&&a.ye()}}f.H=function(){this.ye=null;Ug(this.a);sm.C.H.call(this)};var Bm=!!l.DOMTokenList,Cm=Bm?function(a){return a.classList}:function(a){a=a.className;return u(a)&&a.match(/\S+/g)||[]},Dm=Bm?function(a,b){return a.classList.contains(b)}:function(a,b){return Ta(Cm(a),b)},V=Bm?function(a,b){a.classList.add(b)}:function(a,b){Dm(a,b)||(a.className+=0<a.className.length?" "+b:b)},Em=Bm?function(a,b){z(b,function(b){V(a,b)})}:function(a,b){var c={};z(Cm(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?
185 " "+d:d},W=Bm?function(a,b){a.classList.remove(b)}:function(a,b){Dm(a,b)&&(a.className=Ka(Cm(a),function(a){return a!=b}).join(" "))},Fm=Bm?function(a,b){z(b,function(b){W(a,b)})}:function(a,b){a.className=Ka(Cm(a),function(a){return!Ta(b,a)}).join(" ")};function X(a,b,c){c?V(a,b):W(a,b)}function Gm(a,b){var c=!Dm(a,b);X(a,b,c);return c};function Hm(a,b){this.Sf=a;this.cf=b+"::"}y(Hm,Tf);f=Hm.prototype;f.Sf=null;f.cf="";f.set=function(a,b){this.Sf.set(this.cf+a,b)};f.get=function(a){return this.Sf.get(this.cf+a)};f.remove=function(a){this.Sf.remove(this.cf+a)};f.Id=function(a){var b=this.Sf.Id(!0),c=this,d=new Sd;d.next=function(){for(var d=b.next();d.substr(0,c.cf.length)!=c.cf;)d=b.next();return a?d.substr(c.cf.length):c.Sf.get(d)};return d};function Im(a){R.call(this);this.a=a;if(this.nl){a="yt-html5-player-modules::"+this.nl;var b=new Vf;if(a=b.isAvailable()?a?new Hm(b,a):b:null)this.o=new Xf(a)}}y(Im,R);f=Im.prototype;f.qa="";f.ad="";f.vc=!1;f.ba=!1;f.Ac=null;f.uf=function(a){var b=ab(arguments),c=v(this.yc,this),d=v(this.Vc,this);z(b,function(a){a.namespace=this.qa;a.Eb.D("onEnter",c);a.Eb.D("onExit",d)},this);this.u("command_add_cuerange",b,this.a.a)};f.lv=function(a){var b=ab(arguments);this.u("command_remove_cuerange",b,this.a.a)};
186 function Jm(a){a.u("command_remove_cuerange_all",a.qa,a.a.a)}function Km(a){a.u("command_preroll_ready",a.qa,a.a.a)}function Lm(a,b){V(b,a.qa);a.a.app.R.V.appendChild(b)}function Mm(a){a.u("command_show_dialog_area")}function Nm(a){a.u("command_hide_all_dialogs")}f.create=function(){this.vc||(this.$a(this.a),V(Q(this.a),this.qa+"-created"),this.vc=!0)};f.destroy=function(){this.unload();W(Q(this.a),this.qa+"-created");this.vc=!1};f.load=function(){V(Q(this.a),this.qa+"-loaded");this.u("loaded",this.qa)};
187 f.unload=function(){W(Q(this.a),this.qa+"-loaded");this.u("unloaded",this.qa)};f.yc=function(){};f.Vc=function(){};f.ie=function(){};f.log=function(a){this.u("command_log",this.ad,a)};function Om(a,b,c){var d={},e;for(e in b)d[a.qa+"_"+e]=b[e];b={};for(var g in c)b[a.qa+"_"+g]=c[g];a.u("command_log_timing",d,b)}f.Hi=function(){return null};function Pm(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 Qm(a,b,c){if(a.o)try{a.o.set(b,c)}catch(d){}}
188 function Rm(a,b){a.u("command_disable_controls",b,a.qa)}function Sm(a,b){a.u("command_enable_controls",b,a.qa)}function Tm(a){a.u("command_stop_redirect_controls")}function Um(a){a.u("command_play",!1,a.a.a)}function Vm(a){a.u("command_pause",!1,a.a.a)}f.mb=function(a){this.u("command_redirected_show_is_playing",a)};f.aq=function(){};f.Vo=function(){return[]};f.$a=function(){return!1};f.vo=function(a,b){this.Ac&&this.Ac.ie&&this.Ac.ie.apply(this.Ac,arguments)};f.Qh=function(){};function Wm(a,b){this.b=a;this.Eb=b;this.vc=!1;this.o="base-endscreen";this.g=this.i=null}Wm.prototype.create=function(){this.i=E("html5-endscreen",Q(this.b));V(this.i,this.o);this.g=E("html5-endscreen-content",Q(this.b));this.vc=!0};Wm.prototype.destroy=function(){this.vc=!1};Wm.prototype.load=function(){};function Xm(a){this.a={};this.g={};this.i={};this.b=Ym(this,a)}y(Xm,K);function Ym(a,b,c){var d=0,e=Xc(b[d++]);if(u(b[d])||t(b[d])||null===b[d]){var g=b[d++];t(g)&&(g=g.join(" "));if(g=Zm(a,e,"className",g))$m(a,e,"className",g),an(a,g,e)}for(;d<b.length;d++){var h=b[d];if(t(h))Ym(a,h,e);else if(ia(h)){var g=a,k=e,m=void 0;for(m in h)h[m]&&$m(g,k,m,Zm(g,k,m,h[m]))}else u(h)&&$m(a,e,"child",Zm(a,e,"child",h))}c&&c.appendChild(e);return e}f=Xm.prototype;f.N=function(){return this.b};
189 function an(a,b,c){var d=b.split(" ");if(1<d.length)for(b=0;b<d.length;b++)an(a,d[b],c);else a.a[b]=c}f.W=function(a,b){q(b)?a.insertBefore(this.b,a.childNodes[b]||null):a.appendChild(this.b)};f.ve=function(){F(this.b)};function Zm(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)bn(this,b,a[b])};function bn(a,b,c){if(c!=a.i[b]){var d=a.g["{{"+b+"}}"];d&&(a.i[b]=c,$m(a,d[0],d[1],c))}}
190 function $m(a,b,c,d){if("child"==c){$c(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(Ym(a,g)):g.N?c.push(g.N()):c.push(Yc(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.H=function(){this.a={};this.g={};this.i={};this.ve();this.b=null;Xm.C.H.call(this)};function cn(a){a&&(a.style.display="block")}function dn(a){a&&(a.style.display="none")}function en(a,b){var c=We("requestAnimationFrame",window);return H(function(){c?c.call(window,a):a()},b||0)};function Y(a){this.template=new Xm(a);L(this,this.template);this.element=this.template.N();this.A="block";this.J=[];this.j={}}y(Y,K);f=Y.prototype;f.N=function(){return this.element};f.W=function(a,b){this.template.W(a,b)};f.ve=function(){this.template.ve()};f.Aa=function(a){bn(this.template,"content",a)};f.show=function(){var a=this.element;a&&(a.style.display=this.A);this.element.removeAttribute("aria-hidden")};f.hide=function(){dn(this.element);this.element.setAttribute("aria-hidden","true")};
191 f.listen=function(a,b,c,d,e){a=J(a,b,v(c,d||this));this.J.push(a);u(e)&&(this.j[e]?this.j[e].push(a):this.j[e]=[a]);return a};f.ac=function(a){yf(a)};function fn(a,b){a.ac(a.j[b]);a.j[b]=[]}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)};
192 f.removeEventListener=function(a,b,c){this.element.removeEventListener?this.element.removeEventListener(a,b,c):this.element.detachEvent&&this.element.detachEvent("on"+a,b)};f.dispatchEvent=function(a){return this.element.dispatchEvent(a)};f.fireEvent=function(a,b){return this.element.fireEvent(a,b)};f.H=function(){this.ac(this.J);this.element=null;Y.C.H.call(this)};function gn(){Y.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(gn,Y);function hn(a,b,c,d,e,g,h){a&&(a={video_id:a,html5:1,page_subscribe:b?1:0},g&&(a.authuser=g),h&&(a.pageid=h),Qj("/get_video_metadata",{method:"GET",onError:d,Pa:c,rf:a,S:e}))};function jn(a,b){Wm.call(this,a,b);this.o="subscribecard-endscreen";this.a=null}y(jn,Wm);jn.prototype.create=function(){jn.C.create.call(this);this.a=new gn;this.a.W(this.i);hn(this.b.getVideoData().M,!0,this.j,ba,this,this.b.K().Ea,this.b.K().Ua)};jn.prototype.destroy=function(){Tg(this.a);jn.C.destroy.call(this)};
193 jn.prototype.j=function(a,b){if(this.vc){var c=b.user_info,d=this.b.getVideoData();d&&(d.pa=c.external_id);bn(this.a.template,"banner",c.channel_banner_url);bn(this.a.template,"image",c.channel_logo_url||c.image_url);bn(this.a.template,"author",c.channel_title||c.username);d=b.video_info;d.subscription_ajax_token&&ef("subscription_ajax",d.subscription_ajax_token);c=c.subscription_button_html;this.a.template.a["html5-subscribe-button-container"].innerHTML=c?c:""}};function kn(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&&ln(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 ln(a){for(var b=(a.cssRules||a.rules).length;0<b;b--){var c=a;c.deleteRule?c.deleteRule(0):c.removeRule(0)}};function mn(a){this.X=a}y(mn,K);mn.prototype.b=null;mn.prototype.g=null;mn.prototype.a=null;function nn(a){a.b||(a.b=E("ad-container",Q(a.X)),a.X.K().tb&&V(a.b,"ad-container-single-media-element"));return a.b}function on(a){a.a&&(a.X.K().tb?(W(a.a,"ad-video"),pn(a.X.app,a.a),a.a=null):(F(a.a),nj(a.a)))}
194 function qn(a){if(!a.g){if(a.X.K().Db){var b=Xc("button");V(b,"video-click-tracking");Zc(b,mf("VISIT_ADVERTISERS_SITE"));var c=Xc("div");V(c,"video-click-tracking-container");c.appendChild(b);nn(a).appendChild(c)}else b=Xc("div"),Em(b,["video-click-tracking","ad-video"]),nn(a).appendChild(b);a.g=b}return a.g}mn.prototype.H=function(){mn.C.H.call(this);this.a&&(pn(this.X.app,this.a),this.a=null);on(this);$c(nn(this));$c(qn(this));this.g=this.b=null;delete this.X};
195 function rn(a){if(!a.a){var b;b=a.X.app;if(b.a.tb){var c=new A(b.i.offsetLeft,b.i.offsetTop),d=Cd(b.i);b.O=new Db(c.x,c.y,d.width,d.height);sn(b.j);oj(b.i,1);nj(b.i);b=b.i}else b=tn.getTag();a.a=b;Em(a.a,["video-stream","ad-video"])}return a.a};function un(a,b,c,d){Y.call(this,["div",{className:"ytp-button",role:"button","aria-label":"{{label}}","aria-disabled":"{{disabled}}",tabindex:"{{tabindex}}"},"{{content}}"]);this.A="inline-block";this.g=a;this.L=this.a=this.F=null;this.k=!1;this.listen(this.element,"click",this.Zu);this.listen(this.element,"keypress",this.$u);a=this.g;var e=v(this.Yu,this);a.a&&vn(a.a,this.element,e);b&&wn(this,b);c&&this.Hb(c);d&&(this.a=d)}y(un,Y);
196 function wn(a,b){b&&""!=b&&(a.F&&W(a.element,a.F),a.F=b,V(a.element,b))}f=un.prototype;f.Hb=function(a){bn(this.template,"label",a)};function xn(a,b){a.L=b;bn(a.template,"tabindex",b)}f.Yu=function(){return this.k?null:this.a?Yc(this.a):null};f.enable=function(){this.k=!1;this.template.update({disabled:null,tabindex:this.L});W(this.element,"ytp-disabled")};f.disable=function(){this.k=!0;this.template.update({disabled:"true",tabindex:null});V(this.element,"ytp-disabled")};
197 f.Zu=function(a){this.k&&(a.stopImmediatePropagation(),a.preventDefault())};f.$u=function(a){if(13==a.keyCode||32==a.keyCode)a.stopPropagation(),a.preventDefault(),Ef(this.element,"click")};f.H=function(){var a=this.g;if(a.a){var a=a.a,b=ja(this.element);Tg(a.a[b]);a.a[b]=null}this.g=null;un.C.H.call(this)};function yn(a,b){Y.call(this,["canvas"]);this.element.width=a;this.element.height=b;this.width=a;this.height=b;this.S=this.element.getContext("2d");this.a=0;this.k=null}y(yn,Y);yn.prototype.g=function(a,b){I(this.a);this.a=en(v(this.g,this,a,b),b);a.call(this,new Date-this.k)};yn.prototype.H=function(){I(this.a);this.S=null;yn.C.H.call(this)};function zn(){yn.call(this,84,84);this.b=this.width/2;this.F=this.height/2;this.i=An}y(zn,yn);var An=3*Math.PI/2,Bn=2*Math.PI;function Cn(a,b){var c=b*Bn+An;a.S.beginPath();a.S.arc(a.b,a.F,40,a.i,c,!1);a.S.lineWidth=4;a.S.strokeStyle="#b8b8b8";a.S.stroke();a.i=c}
198 zn.prototype.show=function(){zn.C.show.call(this);this.S.globalAlpha=0.8;this.S.beginPath();this.S.arc(this.b,this.F,42,0,Bn);this.S.fillStyle="#333";this.S.fill();var a=35*(Math.sqrt(3)/2);this.S.save();this.S.fillStyle="#fff";this.S.globalAlpha=0.9;this.S.translate(a,this.b);this.S.beginPath();this.S.lineTo(0,a/2);this.S.lineTo(28,0);this.S.lineTo(0,-a/2);this.S.closePath();this.S.fill();this.S.restore();Cn(this,0)};function Dn(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 En={HC:"html5-stop-propagation",gA:"html5-chromeless",SB:"html5-live-dvr-disabled",TB:"html5-live-dvr-engaged",UB:"html5-live-playback",bC:"html5-mobile",dC:"modest-branding",fC:"html5-native-controls",MC:"html5-tablet",LC:"html5-tablet-body",ZB:"html5-main-video",WC:"html5-video-container",XC:"html5-video-content",YC:"html5-video-controls",ZC:"ytp-fallback",$C:"ytp-fallback-content",bD:"html5-video-loader",gD:"html5-watermark",Qz:"html5-branded-watermark",fD:"html5-viewport-sheet",mA:"html5-context-menu",
199 Tr:"html5-context-menu-copy-debug-info",Ur:"html5-context-menu-copy-embed-html",Vr:"html5-context-menu-copy-video-url",Wr:"html5-context-menu-copy-video-url-at-current-time",Xr:"html5-context-menu-link",Yr:"html5-context-menu-report-playback-issue",Zr:"html5-context-menu-show-video-info",nA:"html5-show-video-info-template",cC:"html5-modal-panel",JB:"html5-info-bar",Kz:"autohide-off",Lz:"autohide-on",Jz:"autohide-fade",Hz:"autohide-auto",Iz:"autohide-embeds",Mz:"autohide-seekbar",Gz:"autohide-aspect",
200 xB:"hide-controls",yB:"hide-info-bar",zB:"html5-hide-share",AB:"html5-hide-volume",eD:"video-thumbnail",qC:"html5-popup-dialog",Az:"html5-async-progress",Bz:"html5-async-success",zz:"html5-async-error",bA:"html5-center-overlay",AC:"ytp-scalable-icon-shrink",zC:"ytp-scalable-icon-grow",EB:"house-brand"};function Fn(a,b){(a=Mc(a))&&a.style&&(a.style.display=b?"":"none",Hc(a,"hid",!b))}function Gn(a){return(a=Mc(a))?!("none"==a.style.display||Gc(a,"hid")):!1}function Hn(a){z(arguments,function(a){Fn(a,!0)})}function In(a){z(arguments,function(a){Fn(a,!1)})}function Jn(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}
201 function Kn(a,b,c){(a=Mc(a))&&a.style&&(b=Jn(b))&&(a.style[b]=c)};var Ln=window.location.protocol+"//i.ytimg.com/",Mn=4/3;function Nn(a,b,c){var d;switch(b.md){case 30:d=On;break;default:d=Pn}return d(a,b,c)}function Pn(a,b,c){if(!c){c=a.clientHeight;a=a.clientWidth;if((900<a||600<c)&&b.oo)return b.oo;if((430<a||320<c)&&b.po)return b.po}return b.Bi?b.Bi:b.M?Qn(b.M):""}function On(a,b){return b.Bi?b.Bi:b.M?S("//docs.google.com/vt",{id:b.M,authuser:b.Ea,authkey:b.An}):"//docs.google.com/images/doclist/cleardot.gif"}
202 function Qn(a,b){return(Ln+"vi/"+escape(a)+"/"+escape(b||"hqdefault.jpg")).replace("i.","i"+(a.charCodeAt(0)%df("THUMBNAIL_NUM_SHARDS",1)+1)+".")};function Rn(a,b,c){this.b=a;(a=b||null)||(a=Sn(this.b));a="("+a.join("|")+")";a=wa("__%s__",a);this.g=RegExp(a,"g");this.a=c||{}}var Tn=/__([a-z]+(?:_[a-z]+)*)__/g;function Un(a,b){var c=Mc(a).innerHTML,c=c.replace(/^\s*(\x3c!--\s*)?/,""),c=c.replace(/(\s*--\x3e)?\s*$/,"");return new Rn(c,b,void 0)}function Sn(a){var b=[],c={};a.replace(Tn,function(a,e){e in c||(c[e]=!0,b.push(e))});return b}
203 function Vn(a,b,c,d){var e=v(function(a,e){c&&(e=c(e));return d?b[e]||this.a[e]||"":ya(b[e]||this.a[e]||"")},a);return a.b.replace(a.g,e)};function Wn(a,b){this.X=a;this.F=b;var c=E("videowall-still-content-template",Q(this.X));this.B=Un(c);c=Xc("a");c.tabIndex=0;V(c,"videowall-still");J(c,"click",v(this.jv,this));J(c,"keypress",v(this.kv,this));this.a=c;this.o=this.X.app.R.B}f=Wn.prototype;
204 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=Ob(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=Dn(a.length_seconds);var g=Qn(c&&a.thumbnail_ids?a.thumbnail_ids.split(",")[0]:this.j,b?"hqdefault.jpg":"mqdefault.jpg");this.a.style.backgroundImage="url("+g+")";
205 this.a.innerHTML=Vn(this.B,e,void 0,!0);X(this.a,"videowall-still-featured",!!a.featured);X(this.a,"videowall-still-list",c);X(this.a,"videowall-still-episodic",d)};f.N=function(){return this.a};f.select=function(a,b){this.i?Xn(this.X.app,this.j,a||this.g,this.i,b):Xn(this.X.app,this.j,a||this.g,void 0,b)};f.ju=function(){var a=new Date-this.A;1E4>a?(Cn(this.b,a/1E4),a=1E4-a,E("videowall-still-listlabel-autoplay-message",this.a).innerHTML=nf("AUTOPLAY_MESSAGE",Math.ceil(a/1E3))):(jf(this.k),this.select("autoplay"))};
206 f.ku=function(a){var b=jd(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.F.log({cancelButtonClick:"1"});jf(this.k)};f.jv=function(a){this.select(void 0,a.ctrlKey)};f.kv=function(a){switch(a.keyCode){case 13:case 32:this.select(),a.preventDefault()}};function Yn(a,b,c){Wm.call(this,a,b);this.o="videowall-endscreen";this.B=c;this.F=[];this.a=this.j=null;this.A=!1;this.k=0;this.Eb.D("onResize",this.Uu,this);this.Eb.D("videodatachange",this.Vu,this)}y(Yn,Wm);f=Yn.prototype;f.create=function(){Yn.C.create.call(this);this.a=this.b.getVideoData().mc;Zn(this)};f.destroy=function(){this.g&&(this.g.innerHTML="");this.a=[];Yn.C.destroy.call(this)};
207 f.load=function(){Yn.C.load.call(this);if(this.a&&this.a.length&&this.a[0].endscreen_autoplay){var a=$n(this,0);a.b=new zn;V(a.b.element,"autoplay-play-canvas");a.b.W(a.a);a.b.show();X(a.a,"videowall-still-autoplay",!0);var b=E("videowall-still-listlabel-autoplay",a.a),c=new un(a.o);c.W(b);wn(c,"videowall-still-listlabel-autoplay-cancel");c.Aa(a.o.getMsg("YTP_BUTTON_CANCEL"));c.show();J(c,"click",v(a.ku,a));a.F.log({cancelButtonShow:"1"});a.A=new Date;a.k=hf(v(a.ju,a),50)}};
208 function Zn(a){if(a.vc&&a.a&&a.a.length){X(a.i,"endscreen-enable-layout",!0);a.g.innerHTML="";var b=Cd(a.i);Dm(Q(a.b),"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.k=0;else{var e=a.a.length,g=!1,h="episodic"==a.a[0].feature_type,k=a.a[0].endscreen_autoplay;(a.a[0].featured||h||k)&&2<d&&2<c&&(g=!0,e+=3);X(a.g,"feature-video",g);for(var k=h=0,m=Bb(b),p=!0;0<=e&&(h<c||k<d);){var r=e>=k,s=e>=h;if(p&&s||!r&&s)e-=h,k++;else if(r)e-=
209 k,h++;else break;p=1.45*(h/k)>m}a.A=p;c=new B(h,k);a.A?(d=1/c.width,b=b.width*d,d=b/1.45):(d=1/c.height,d*=b.height,b=1.45*d);b=new B(Math.floor(b),Math.floor(d));a.k=c.width*c.height;g&&(a.k-=3);a.j&&ln(a.j);g=ao(b);d={Ib:a.j};a.j=kn(".videowall-still",g,d);g=ao(b.clone().scale(2));d.Ib=a.j;kn(".feature-video .videowall-still:first-child",g,d);Ad(a.g,b.width*c.width,b.height*c.height)}g=0;for(b=a.k;g<b;g++)c=$n(a,g),a.g.appendChild(c.N());X(a.i,"endscreen-enable-layout",!1)}}
210 function $n(a,b){var c=a.F[b];c||(c=new Wn(a.b,a.B),a.F[b]=c);c.update(a.a[b],0==b&&a.a[0].featured);return c}function ao(a){return["width:"+a.width+"px","height:"+a.height+"px"]}f.Uu=function(){Zn(this)};f.Vu=function(){var a=this.b.getVideoData().mc;this.a!=a&&(this.a=a,Zn(this))};function bo(a){Im.call(this,a);a.K().kl?this.Mf=new jn(this.a,this.F):a.K().xc?this.Mf=new Yn(this.a,this.F,this):this.Mf=new Wm(this.a,this.F)}y(bo,Im);f=bo.prototype;f.qa="endscreen";f.ad="end";f.Mf=null;function co(a){var b=a.K(),c=a.getVideoData();a=1==N(a.app).B;return eo(b)&&!qm(c,"ypc_module")&&a}f.$a=function(a){return co(a)};
211 f.create=function(){bo.C.create.call(this);var a=Math.max(1E3*(this.a.getVideoData().ra-10),0),a=new $h(a,2147483647,{id:"preload"}),b=new $h(2147483647,2147483647,{id:"load",priority:6});this.uf(a,b)};f.destroy=function(){Jm(this);this.Mf.destroy();bo.C.destroy.call(this)};f.load=function(){bo.C.load.call(this);this.Mf.load();this.ba=!0};f.unload=function(){bo.C.unload.call(this);this.ba=!1};f.yc=function(a){bo.C.yc.call(this,a);"preload"==a.getId()?this.Mf.create():fo(this.a.app)||this.load()};
212 f.Vc=function(a){"load"==a.getId()&&this.unload();bo.C.Vc.call(this,a)};function go(a){return co(a)?new bo(a):null};var ho={created:1,ready:2,testing:4,"testing-starting":3,live:6,"live-starting":5,complete:8,"complete-starting":7};/*
213 Portions of this code are from MochiKit, received by
214 The Closure Authors under the MIT license. All other code is Copyright
215 2005-2009 The Closure Authors. All Rights Reserved.
216 */
217 function io(a,b){this.o=[];this.L=a;this.J=b||null;this.k=this.g=!1;this.j=void 0;this.G=this.ev=this.A=!1;this.F=0;this.i=null;this.B=0}io.prototype.cancel=function(a){if(this.g)this.j instanceof io&&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.L?this.L.call(this.J,this):this.G=!0;this.g||this.a(new jo)}};io.prototype.I=function(a,b){this.A=!1;ko(this,a,b)};function ko(a,b,c){a.g=!0;a.j=c;a.k=!b;lo(a)}
218 function mo(a){if(a.g){if(!a.G)throw new no;a.G=!1}}io.prototype.b=function(a){mo(this);ko(this,!0,a)};io.prototype.a=function(a){mo(this);ko(this,!1,a)};function oo(a,b,c,d){a.o.push([b,c,d]);a.g&&lo(a);return a}function po(a){var b=new io;oo(a,b.b,b.a,b);return b}function qo(a){return Ma(a.o,function(a){return ha(a[1])})}
219 function lo(a){a.F&&a.g&&qo(a)&&(l.clearTimeout(a.F),delete a.F);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.J,b);q(k)&&(a.k=a.k&&(k==b||k instanceof Error),a.j=b=k);b instanceof io&&(d=!0,a.A=!0)}catch(m){b=m,a.k=!0,qo(a)||(c=!0)}}a.j=b;d&&(oo(b,v(a.I,a,!0),v(a.I,a,!1)),b.ev=!0);c&&(a.F=l.setTimeout(Tb(b),0))}function no(){ua.call(this)}y(no,ua);no.prototype.message="Deferred has already fired";
220 no.prototype.name="AlreadyCalledError";function jo(){ua.call(this)}y(jo,ua);jo.prototype.message="Deferred was canceled";jo.prototype.name="CanceledError";function ro(a,b){var c=b||{},d=c.document||document,e=Xc("SCRIPT"),g={Io:e,uc:void 0},h=new io(so,g),k=null,m=null!=c.timeout?c.timeout:5E3;0<m&&(k=window.setTimeout(function(){to(e,!0);h.a(new uo(1,"Timeout reached for loading script "+a))},m),g.uc=k);e.onload=e.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(to(e,c.cv||!1,k),h.b(null))};e.onerror=function(){to(e,!0,k);h.a(new uo(0,"Error while loading script "+a))};Pc(e,{type:"text/javascript",charset:"UTF-8",
221 src:a});vo(d).appendChild(e);return h}function vo(a){var b=a.getElementsByTagName("HEAD");return!b||Ua(b)?a.documentElement:b[0]}function so(){if(this&&this.Io){var a=this.Io;a&&"SCRIPT"==a.tagName&&to(a,!0,this.uc)}}function to(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 uo(a,b){var c="Jsloader error (code #"+a+")";b&&(c+=": "+b);ua.call(this,c);this.code=a}y(uo,ua);function wo(a,b){this.b=new re(a);this.a=b?b:"callback";this.uc=5E3}var xo=0;wo.prototype.send=function(a,b,c,d){a=a||null;d=d||"_"+(xo++).toString(36)+x().toString(36);l._callbacks_||(l._callbacks_={});var e=this.b.clone();if(a)for(var g in a)a.hasOwnProperty&&!a.hasOwnProperty(g)||Ge(e,g,a[g]);b&&(l._callbacks_[d]=yo(d,b),Ge(e,this.a,"_callbacks_."+d));b=ro(e.toString(),{timeout:this.uc,cv:!0});oo(b,null,zo(d,a,c),void 0);return{Ba:d,jc:b}};
222 wo.prototype.cancel=function(a){a&&(a.jc&&a.jc.cancel(),a.Ba&&Ao(a.Ba,!1))};function zo(a,b,c){return function(){Ao(a,!1);c&&c(b)}}function yo(a,b){return function(c){Ao(a,!0);b.apply(void 0,arguments)}}function Ao(a,b){l._callbacks_[a]&&(b?delete l._callbacks_[a]:l._callbacks_[a]=ba)};function Bo(a){R.call(this);this.g=Vn(new Rn("//gdata.youtube.com/feeds/api/users/live/broadcasts/__video_id__/states?v=2&alt=json-in-script"),{video_id:a});this.a=new Fi(15E3+Math.floor(3E4*Math.random()));si(this.a,"tick",v(this.b,this));this.b();this.a.start()}y(Bo,R);Bo.prototype.H=function(){this.a.dispose();Bo.C.H.call(this)};Bo.prototype.b=function(){(new wo(this.g)).send(null,v(this.j,this),v(this.i,this))};Bo.prototype.j=function(a){this.u("payload",a);Gi(this.a,15E3+Math.floor(3E4*Math.random()))};
223 Bo.prototype.i=function(){this.u("error");var a=this.a.a;192E4>a&&Gi(this.a,2*a)};function Co(){this.g=new Xm(["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(Co,K);Co.prototype.N=function(){return this.b};
224 Co.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=mf("FRESCA_COMPLETE_MESSAGE");break t;default:a=mf("FRESCA_STAND_BY_MESSAGE")}a=[a]}this.g.update({heading:a[0]||"",subheading:a[1]||"",long_text:a[2]||""});this.j()}};
225 function Do(a){var b=Math.floor((new Date).valueOf()/1E3);return b>a?mf("FRESCA_STARTING_SOON_MESSAGE"):Dn(a-b)}Co.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:Do(this.a.startTime)}),I(this.i),this.i=H(v(this.j,this),1E3))};Co.prototype.H=function(){I(this.i);this.b=null;Co.C.H.call(this)};function Eo(a){this.a=[];a&&Fo(this,a)}Eo.prototype.state=-1;function Fo(a,b){var c=b.feed;if(c){var d=c.yt$lifeCycleState;d&&(a.state=ho[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=La(c,function(a){return a.$t}))}};function Go(a){Im.call(this,a)}y(Go,Im);f=Go.prototype;f.qa="fresca";f.ad="fresca";f.Zh=!1;f.Kg=!1;f.$a=function(){return qm(this.a.getVideoData(),"fresca_module")};f.create=function(a){Go.C.create.call(this);this.Zh=this.Kg=!1;Sm(this,["play_pause","seek"]);this.i=new Co;this.a.app.R.g.appendChild(this.i.N());this.g=a||new Bo(this.a.getVideoData().M);this.g.D("payload",this.Lu,this);this.g.D("error",this.Ku,this);this.D("onStateChange",this.ko,this)};
226 f.destroy=function(){this.ba&&this.unload();this.$("onStateChange",this.ko,this);Ug(this.g,this.i);Go.C.destroy.call(this)};f.load=function(){Go.C.load.call(this);this.ba=!0};f.unload=function(){this.ba=!1;Go.C.unload.call(this)};f.ko=function(a){this.b&&(this.Zh=P(a.state,2),(Ho(a,16)||this.Zh)&&Io(this,this.b))};f.Ku=function(){this.Kg||(this.b=new Eo,Io(this,this.b))};f.Lu=function(a){this.b=new Eo(a);a=this.a.getVideoData();6!=this.b.state||a.va||a.B?Io(this,this.b):this.a.Lj(a.M)};
227 function Io(a,b){var c=6>b.state;!c&&a.a.app.b.ga&&(b.b||b.a.length)&&(c=!0);a.Zh&&!a.a.K().xc&&(c=!0);if(!a.Kg)switch(b.state){case 6:a.Kg=!0;Sm(a,["play_pause","seek"]);Km(a);break;case 8:case 7:c=a.Kg=!0}c&&a.i.update(b);c&&!a.ba?a.load():!c&&a.ba&&a.unload()}function Jo(a){return qm(a.getVideoData(),"fresca_module")?new Go(a):null};function Ko(a){this.Ig=a||window;this.ae=[]}f=Ko.prototype;f.Ig=null;f.ae=null;f.listen=function(a,b,c,d){c=v(c,d||this.Ig);a=J(a,b,c);this.ae.push(a);return a};function Lo(a,b,c,d){d=v(d,a.Ig);b=zf(b,c,d);a.ae.push(b);return b}function Mo(a,b,c){c=v(c,a.Ig);b=Cf(b,c,"yt-uix-button-menu-item");a.ae.push(b)}f.ac=function(a){yf(a);Xa(this.ae,a)};f.removeAll=function(){yf(this.ae);this.ae=[]};function No(a,b,c,d,e){this.b=a;this.a=b;this.ia=c;this.He=d;this.g=e};function Oo(a,b,c){this.a=a;this.i=b||0;this.b=c;this.g=v(this.Vt,this)}y(Oo,K);f=Oo.prototype;f.Ba=0;f.H=function(){Oo.C.H.call(this);this.stop();delete this.a;delete this.b};f.start=function(a){this.stop();this.Ba=Hi(this.g,q(a)?a:this.i)};f.stop=function(){0!=this.Ba&&l.clearTimeout(this.Ba);this.Ba=0};f.Vt=function(){this.Ba=0;this.a&&this.a.call(this.b)};var Po={},Qo=null;function Ro(a){a=ja(a);delete Po[a];Nb(Po)&&Qo&&Qo.stop()}function So(){Qo||(Qo=new Oo(function(){To()},20));var a=Qo;0!=a.Ba||a.start()}function To(){var a=x();Hb(Po,function(b){Uo(b,a)});Nb(Po)||So()};function Vo(){Ci.call(this);this.a=0;this.k=this.startTime=null}y(Vo,Ci);f=Vo.prototype;f.kk=function(){this.Ed("begin")};f.Gi=function(){this.Ed("end")};f.pd=function(){this.Ed("finish")};f.onStop=function(){this.Ed("stop")};f.Ed=function(a){Di(this,a)};function Wo(a,b,c,d){Vo.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(Wo,Vo);f=Wo.prototype;f.Yc=0;
228 function Xo(a){if(0==a.a)a.Yc=0,a.b=a.g;else if(1==a.a)return;Ro(a);var b=x();a.startTime=b;-1==a.a&&(a.startTime-=a.duration*a.Yc);a.k=a.startTime+a.duration;a.Yc||a.kk();a.Ed("play");-1==a.a&&a.Ed("resume");a.a=1;var c=ja(a);c in Po||(Po[c]=a);So();Uo(a,b)}f.stop=function(a){Ro(this);this.a=0;a&&(this.Yc=1);Yo(this,this.Yc);this.onStop();this.Gi()};f.H=function(){0==this.a||this.stop(!1);this.Ed("destroy");Wo.C.H.call(this)};f.destroy=function(){this.dispose()};
229 function Uo(a,b){a.Yc=(b-a.startTime)/(a.k-a.startTime);1<=a.Yc&&(a.Yc=1);Yo(a,a.Yc);1==a.Yc?(a.a=0,Ro(a),a.pd(),a.Gi()):1==a.a&&a.al()}function Yo(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.al=function(){this.Ed("animate")};f.Ed=function(a){Di(this,new Zo(a,this))};function Zo(a,b){ei.call(this,a);this.x=b.b[0];this.y=b.b[1];this.duration=b.duration;this.state=b.a}y(Zo,ei);var $o=/#(.)(.)(.)/;function ap(a){if(!bp.test(a))throw Error("'"+a+"' is not a valid hex color");4==a.length&&(a=a.replace($o,"#$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 bp=/^#(?:[0-9a-f]{3}){1,2}$/i;function cp(a,b,c,d,e){Wo.call(this,b,c,d,e);this.element=a}y(cp,Wo);cp.prototype.i=ba;cp.prototype.al=function(){this.i();cp.C.al.call(this)};cp.prototype.Gi=function(){this.i();cp.C.Gi.call(this)};cp.prototype.kk=function(){this.i();cp.C.kk.call(this)};function dp(a,b,c,d,e){if(2!=b.length||2!=c.length)throw Error("Start and end points must be 2D");cp.apply(this,arguments)}y(dp,cp);
230 dp.prototype.i=function(){this.element.style.left=Math.round(this.b[0])+"px";this.element.style.top=Math.round(this.b[1])+"px"};function ep(a){return a*a*a}function fp(a){return 1-Math.pow(1-a,3)};var gp=n("yt.prefs.UserPrefs.prefs_")||{};pa("yt.prefs.UserPrefs.prefs_",gp);function hp(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 ip=n("yt.pubsub.instance_")||new Xh;Xh.prototype.subscribe=Xh.prototype.D;Xh.prototype.unsubscribeByKey=Xh.prototype.Rc;Xh.prototype.publish=Xh.prototype.u;Xh.prototype.clear=Xh.prototype.clear;pa("yt.pubsub.instance_",ip);function jp(a,b,c){var d=kp();return d?d.subscribe(a,function(){var d=arguments;try{lp&&mp[a]?b.apply(c||l,d):H(function(){b.apply(c||l,d)},0)}catch(g){kf(g)}},c):0}
231 function np(){var a=df("LOGGED_IN_PUBSUB_KEY"),b=kp();b&&("number"==typeof a?a=[a]:"string"==typeof a&&(a=[parseInt(a,10)]),z(a,function(a){b.unsubscribeByKey(a)}))}function op(a,b){var c=kp();return c?c.publish.apply(c,arguments):!1}function kp(){return n("yt.pubsub.instance_")}var lp=!!df("SYNCHRONOUS_PUBSUB"),mp={};function pp(a,b,c,d,e,g){var h,k;if(h=c.offsetParent){var m="HTML"==h.tagName||"BODY"==h.tagName;m&&"static"==od(h,"position")||(k=ud(h),m||(m=(m=vd(h))&&fc?-h.scrollLeft:!m||C&&uc("8")||"visible"==od(h,"overflowX")?h.scrollLeft:h.scrollWidth-h.clientWidth-h.scrollLeft,k=yb(k,new A(m,h.scrollTop))))}h=k||new A;k=Ed(a);if(m=td(a)){var p=Eb(m),m=Math.max(k.left,p.left),r=Math.min(k.left+k.width,p.left+p.width);if(m<=r){var s=Math.max(k.top,p.top),p=Math.min(k.top+k.height,p.top+p.height);s<=p&&(k.left=
232 m,k.top=s,k.width=r-m,k.height=p-s)}}m=Jc(a);s=Jc(c);if(m.a!=s.a){var r=m.a.body,s=s.a.parentWindow||s.a.defaultView,p=new A(0,0),D=Lc(r)?Lc(r).parentWindow||Lc(r).defaultView:window,O=r;do{var ta=D==s?ud(O):yd(O);p.x+=ta.x;p.y+=ta.y}while(D&&D!=s&&(O=D.frameElement)&&(D=D.parent));r=yb(p,ud(r));C&&!ld(m)&&(r=yb(r,md(m)));k.left+=r.x;k.top+=r.y}a=(b&4&&vd(a)?b^2:b)&-5;b=new A(a&2?k.left+k.width:k.left,a&1?k.top+k.height:k.top);b=yb(b,h);e&&(b.x+=(a&2?-1:1)*e.x,b.y+=(a&1?-1:1)*e.y);if(e=td(c))e.top-=
233 h.y,e.right-=h.x,e.bottom-=h.y,e.left-=h.x;qp(b,c,d,g,e,65,void 0)}
234 function qp(a,b,c,d,e,g,h){a=a.clone();var k=(c&4&&vd(b)?c^2:c)&-5;c=Cd(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-
235 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;pd(b,a);Ab(c,h)||(e=ld(Jc(Lc(b))),
236 !C||e&&uc("8")?(b=b.style,fc?b.MozBoxSizing="border-box":gc?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=Id(b),b=Jd(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 rp={},sp="ontouchstart"in document;function tp(a,b,c){var d;switch(a){case "mouseover":case "mouseout":d=3;break;case "mouseenter":case "mouseleave":d=9}return kd(c,function(a){return Gc(a,b)},!0,d)}
237 function up(a){var b="mouseover"==a.type&&"mouseenter"in rp||"mouseout"==a.type&&"mouseleave"in rp,c=a.type in rp||b;if("HTML"!=a.target.tagName&&c){if(b){var b="mouseover"==a.type?"mouseenter":"mouseleave",c=rp[b],d;for(d in c.Sb){var e=tp(b,d,a.target);e&&!kd(a.relatedTarget,function(a){return a==e},!0)&&c.u(d,e,b,a)}}if(b=rp[a.type])for(d in b.Sb)(e=tp(a.type,d,a.target))&&b.u(d,e,a.type,a)}}J(document,"blur",up,!0);J(document,"change",up,!0);J(document,"click",up);J(document,"focus",up,!0);
238 J(document,"mouseover",up);J(document,"mouseout",up);J(document,"mousedown",up);J(document,"keydown",up);J(document,"keyup",up);J(document,"keypress",up);J(document,"cut",up);J(document,"paste",up);sp&&(J(document,"touchstart",up),J(document,"touchend",up),J(document,"touchcancel",up));var vp=window.yt&&window.yt.uix&&window.yt.uix.widgets_||{};pa("yt.uix.widgets_",vp);function wp(a){a=a.getInstance();var b=Z(a);b in vp||!a.$p()||(a.register(),vp[b]=a)};function xp(){this.a={}}xp.prototype.g=!!eval("/*@cc_on!@*/false");xp.prototype.$p=function(){return!0};function yp(a,b,c){var d=Z(a,void 0),e=v(c,a);b in rp||(rp[b]=new Xh);rp[b].D(d,e);a.a[c]=e}xp.prototype.b=function(a,b,c){var d=G(a,b);if(d&&(d=n(d))){var e=db(arguments,2);cb(e,0,0,a);d.apply(null,e)}};function zp(a,b){Pe(a,"tooltip-text",b)}xp.prototype.removeData=function(a,b){a.dataset?delete a.dataset[Qe(b)]:a.removeAttribute("data-"+b)};
239 function Z(a,b){return"yt-uix"+(a.Wi?"-"+a.Wi:"")+(b?"-"+b:"")};function Ap(){this.a={}}y(Ap,xp);ca(Ap);f=Ap.prototype;f.Wi="button";f.Bf=null;f.register=function(){yp(this,"click",this.Sx);yp(this,"keydown",this.Qx);yp(this,"keypress",this.Rx)};f.Sx=function(a){a&&!a.disabled&&(Bp(this,a),this.click(a))};
240 f.Qx=function(a,b,c){if(!(c.altKey||c.ctrlKey||c.shiftKey)&&(b=Cp(this,a))){var d=function(a){var b="";a.tagName&&(b=a.tagName.toLowerCase());return"ul"==b||"table"==b};if(d=d(b)?b:ed(b,d)){var d=d.tagName.toLowerCase(),e;"ul"==d?e=this.Wx:"table"==d&&(e=this.Vx);e&&Dp(this,a,b,c,v(e,this))}}};
241 function Dp(a,b,c,d,e){var g=Gn(c),h=9==d.keyCode;h||32==d.keyCode||13==d.keyCode?(d=Ep(a,c))?(b=ad(d),"a"==b.tagName.toLowerCase()?window.location=b.href:Ef(b,"click")):h&&Fp(a,b):g?27==d.keyCode?(Ep(a,c),Fp(a,b)):e(b,c,d):(a=Gc(b,Z(a,"reverse"))?38:40,d.keyCode==a&&(Ef(b,"click"),d.preventDefault()))}f.Rx=function(a,b,c){c.altKey||c.ctrlKey||c.shiftKey||(a=Cp(this,a),Gn(a)&&c.preventDefault())};function Ep(a,b){var c=Z(a,"menu-item-highlight"),d=E(c,b);d&&Ec(d,c);return d}
242 function Gp(a,b,c){Dc(c,Z(a,"menu-item-highlight"));b.setAttribute("aria-activedescendant",c.getAttribute("id"))}f.Vx=function(a,b,c){var d=Ep(this,b);b=Ve("table",b);var e=Ve("tr",b),e=Oc("td",null,e).length;b=Oc("td",null,b);d=Hp(d,b,e,c);-1!=d&&(Gp(this,a,b[d]),c.preventDefault())};f.Wx=function(a,b,c){if(40==c.keyCode||38==c.keyCode){var d=Ep(this,b);b=Oc("li",null,b);d=Hp(d,b,1,c);Gp(this,a,b[d]);c.preventDefault()}};
243 function Hp(a,b,c,d){var e=b.length;a=Ja(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 Ip(a,b){var c=b.iframeMask;c||(c=document.createElement("iframe"),c.src='javascript:""',c.className=Z(a,"menu-mask"),b.iframeMask=c);return c}
244 function Jp(a,b,c,d){var e=jd(b,Z(a,"group")),g=!!G(b,"button-menu-ignore-group"),e=e&&!g?e:b,g=5,h=4,k=Ed(b);if(Gc(b,Z(a,"reverse"))){g=4;h=5;k=k.top+"px";try{c.style.maxHeight=k}catch(m){}}Gc(b,"flip")&&(Gc(b,Z(a,"reverse"))?(g=6,h=7):(g=7,h=6));var p;G(b,"button-has-sibling-menu")?p=sd(e):G(b,"button-menu-root-container")&&(p=Kp(b));C&&!uc("8")&&(p=null);var r;p&&(r=Ed(p),r=new zb(-r.top,r.left,r.top,-r.left));p=new A(0,1);Gc(b,Z(a,"center-menu"))&&(p.x-=Math.round((Cd(c).width-Cd(b).width)/2));
245 d&&(p.y+=Sc(document).y);if(a=Ip(a,b))b=Cd(c),a.style.width=b.width+"px",a.style.height=b.height+"px",pp(e,g,a,h,p,r),d&&Kn(a,"position","fixed");pp(e,g,c,h,p,r)}function Kp(a){if(G(a,"button-menu-root-container")){var b=G(a,"button-menu-root-container");return jd(a,b)}return document.body}
246 f.bp=function(a){if(a){var b=Cp(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:Kp(a);c.appendChild(b);b.style.minWidth=a.offsetWidth-2+"px";var d=Ip(this,a);d&&c.appendChild(d);c=!!G(a,"button-menu-fixed");Jp(this,a,b,c);Hn(b);this.b(a,"button-menu-action",!0);Dc(a,Z(this,"active"));b=v(this.ap,this,a,!1);c=v(this.ap,this,
247 a,!0);c=J(document,"click",c);b=J(document,"contextmenu",b);Pe(a,"button-listener",c);Pe(a,"button-context-menu-listener",b);this.Bf=a}}};
248 function Fp(a,b){if(b){var c=Cp(a,b);if(c){a.Bf=null;b.setAttribute("aria-pressed","false");b.setAttribute("aria-expanded","false");b.removeAttribute("aria-activedescendant");In(c);a.b(b,"button-menu-action",!1);var d=Ip(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=jd(b,Z(a,"group"));Ec(b,Z(a,"active"));e&&Ec(e,Z(a,"group-active"));if(e=
249 G(b,"button-listener"))yf(e),a.removeData(b,"button-listener");if(e=G(b,"button-context-menu-listener"))yf(e),a.removeData(b,"button-context-menu-listener")}}function Lp(a,b){var c=Cp(a,b);c&&Jp(a,b,c)}function Mp(a,b){return Cp(a,b)}
250 f.ap=function(a,b,c){c=c||window.event;c=c.target||c.srcElement;3==c.nodeType&&(c=c.parentNode);var d=jd(c,Z(this));if(d){var d=Cp(this,d),e=Cp(this,a);if(d==e)return}if(!jd(c,Z(this,"menu"))||Gc(c,Z(this,"menu-item"))||Gc(c,Z(this,"menu-close")))if(Fp(this,a),(d=jd(c,Z(this,"menu")))&&b&&G(a,"button-menu-indicate-selected")){if(a=E(Z(this,"content"),a))Ac&&"innerText"in c?b=c.innerText.replace(/(\r\n|\r|\n)/g,"\n"):(b=[],id(c,b,!0),b=b.join("")),b=b.replace(/ \xAD /g," ").replace(/\xAD/g,""),b=b.replace(/\u200B/g,
251 ""),Ac||(b=b.replace(/ +/g," "))," "!=b&&(b=b.replace(/^\s*/,"")),dd(a,b);a=Z(this,"menu-item-selected");(b=E(a,d))&&Ec(b,a);Dc(c.parentNode,a)}};function Cp(a,b){if(!b.widgetMenu){var c=G(b,"button-menu-id"),c=c&&Mc(c),d=Z(a,"menu");c?(Dc(c,d),Dc(c,Z(a,"menu-external"))):c=E(d,b);b.widgetMenu=c}return b.widgetMenu}
252 function Bp(a,b){if(G(b,"button-toggle")){var c=jd(b,Z(a,"group"));if(c&&G(c,"button-toggle-group")){var d=G(c,"button-toggle-group"),c=Nc(Z(a),c),e=Z(a,"toggled"),g=Gc(b,e);z(c,function(a){a!=b||"optional"==d&&g?Ec(a,e):Dc(b,e)})}else Ic(b,Z(a,"toggled"))}}f.click=function(a){if(Cp(this,a)){var b=Cp(this,a),c=jd(b.activeButtonNode||b.parentNode,Z(this));c&&c!=a?(Fp(this,c),H(v(this.bp,this,a),1)):Gn(b)?Fp(this,a):this.bp(a);a.focus()}this.b(a,"button-action")};function Np(a,b,c){this.i=a;this.g=b;this.b=c;this.a=v(this.Wt,this)}y(Np,K);f=Np.prototype;f.Ui=!1;f.Df=null;function Op(a){a.Df?a.Ui=!0:Pp(a)}f.stop=function(){this.Df&&(l.clearTimeout(this.Df),this.Df=null,this.Ui=!1)};f.H=function(){Np.C.H.call(this);this.stop()};f.Wt=function(){this.Df=null;this.Ui&&(this.Ui=!1,Pp(this))};function Pp(a){a.Df=Hi(a.a,a.g);a.i.call(a.b)};function Qp(a,b,c){b||(b={});var d=c||window;c="undefined"!=typeof a.href?a.href:String(a);a=b.target||a.target;var e=[],g;for(g in b)switch(g){case "width":case "height":case "top":case "left":e.push(g+"="+b[g]);break;case "target":case "noreferrer":break;default:e.push(g+"="+(b[g]?1:0))}g=e.join(",");if(b.noreferrer){if(b=d.open("",a,g))C&&-1!=c.indexOf(";")&&(c="'"+c.replace(/'/g,"%27")+"'"),b.opener=null,c=ya(c),b.document.write('<META HTTP-EQUIV="refresh" content="0; url='+c+'">'),b.document.close()}else b=
253 d.open(c,a,g);return b}function Rp(a,b){var c;c=b||{};c.target=c.target||a.target||"YouTube";c.width=c.width||600;c.height=c.height||600;(c=Qp(a,c))?(c.opener||(c.opener=window),c.focus()):c=null;return!c};function Sp(a,b){Tp().tick[a]=b||x()}function Up(a){var b=Tp().tick;return a in b}function Vp(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];sa(b+"?"+c.substring(1))}function Wp(){return Tp().info}function Tp(){return n("ytcsi.data_")||Xp()}function Xp(){var a={tick:{},span:{},info:{}};pa("ytcsi.data_",a);return a};function Yp(a,b){return null!=b&&!!b.match(a)}function Zp(a,b){for(var c in a)if(a[c]==b)return!0;return!1}function $p(a,b,c,d){var e=new aq;e.type=c;e.defaultValue=d;e.b=oa(Yp,/.+/);return bq(a[b],e)}function cq(a,b,c){var d=new aq;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 bq(a[b],d)}
254 function dq(a,b,c,d){var e=new aq;e.type=c;e.defaultValue=d;return bq(a[b],e)}function eq(a,b,c,d,e){var g=new aq;g.type=d;g.defaultValue=e;g.b=oa(Zp,c);return bq(a[b],g)}function fq(a,b,c){var d=new aq;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 bq(a[b],d)}function gq(a,b,c){var d=new aq;d.type="OPTIONAL";d.defaultValue=c;d.a=function(a){return parseFloat(a)};return bq(a[b],d)}
255 function hq(a){var b=new aq;b.type="OPTIONAL";b.defaultValue=0;b.a=function(a){return parseInt(a,10)};return bq(a.d,b)}function iq(a,b,c,d,e,g,h){var k=new aq;k.type="OPTIONAL";k.a=function(a){a=10==c?parseFloat(a):parseInt(a,c);return g&&null!=a&&!isNaN(a)?wb(a,d,e):a};k.defaultValue=h;k.b=function(a){return null!=a&&!isNaN(a)&&a>=d&&a<=e};return bq(a[b],k)}
256 function jq(a,b){var c=new aq;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 bq(a[b],c)}function kq(a,b){return null==b?null:a(b)}function lq(a,b,c,d,e){if(null==a||null==a[b])return null;var g=new aq;g.type=d;g.defaultValue=e;g.b=function(a){return!!a};g.a=oa(kq,c);return bq(a[b],g)}
257 function bq(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?mq(t(a)?a:[a],b):null!=b.defaultValue?t(b.defaultValue)?b.defaultValue:[b.defaultValue]:[]:"IDLIST"==b.type?nq(a,b):null;return c}
258 function nq(a,b){function c(a){return Ka(a.split(/ +/),function(a){return""!=a})}return null!=a?mq(c(a),b):null!=b.defaultValue?t(b.defaultValue)?b.defaultValue:[b.defaultValue]:[]}function mq(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 aq(){this.a=oq;this.b=pq}aq.prototype.type="OPTIONAL";aq.prototype.defaultValue=null;function oq(a){return null==a?null:a.toString()}
259 function pq(a){return null!=a};function qq(a,b,c,d){this.value=a;this.target=b;this.a=c;this.b=d}var rq={pA:"current",gC:"new"};function sq(a){var b=dq(a,"value","OPTIONAL");if(null==b||null==Gj(b))return null;var c=eq(a,"target",rq,"OPTIONAL","current");if(null==c)return null;fq(a,"trusted",!1);var d=dq(a,"link_class","OPTIONAL","");a=fq(a,"show_link_icon",!0);return new qq(b,c,d,a)}function tq(a){return a.value?a.value:null};function uq(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?")}
260 function vq(a,b){if("new"==a.target)return-1;var c=tq(a);if(!c)return-1;var c=c.replace(/https?:\/\//g,""),d;(d=!uq(c))||(d=ge(c)||"",d=d.split("/"),d="/"+(1<d.length?d[1]:""),d="/watch"!=d);if(d)return-1;d=Gj(c);if(!d||d.v!=b.M||d.list||d.p)return-1;c=c.split("#",2);if(!c||2>c.length)return-1;(c=Fj(c[1]))&&c.t?(d=c.t,c=0,-1!=d.indexOf("h")&&(d=d.split("h"),c=3600*d[0],d=d[1]),-1!=d.indexOf("m")&&(d=d.split("m"),c=60*d[0]+c,d=d[1]),-1!=d.indexOf("s")?(d=d.split("s"),c=1*d[0]+c):c=1*d+c):c=-1;return c}
261 function wq(a,b,c){return(a=tq(a))?uq(a)?Kj(a,{src_vid:c.M,feature:"iv",annotation_id:b.id}):a:null}function xq(a){return a.target?"new"==a.target?"_blank":"_top":uq(tq(a))?"_top":"_blank"};function yq(a,b,c){this.ib=a;this.element=b;this.S=c;this.Gb=this.a=!1;this.ll=!0}function zq(a,b){b.D("onHideControls",function(){this.ll=!1;this.dh()},a);b.D("onShowControls",function(){this.ll=!0;this.dh()},a);b.D("onResize",a.dh,a)}function Aq(a,b){var c=Uc("div","annotation-x-button-container"),d=Uc("div","annotation-x-button");c.appendChild(d);a.S.b.listen(c,"click",v(function(a){var c=this.S.He,d=this.ib;d&&d.i&&c.log_(Bq(c,d,4));b(a);a.stopPropagation();this.Gb=!0},a));return c}f=yq.prototype;
262 f.N=function(){return this.element};function Cq(a,b){a.S.b.listen(b,"click",v(function(){var a=Dq(this.ib),b=wq(a,this.ib,this.S.ia),e=v(function(){this.S.g.Qj();window.open(b,xq(a))},this);uq(tq(a))&&"new"!=a.target||(e(),e=null);Eq(this.S.He,this.ib,e)},a))}f.show=function(){};f.hide=function(){};f.destroy=function(){F(this.element)};f.dh=function(){};function Fq(a,b,c){yq.call(this,a,b,c);this.b=Uc("div","invideo-video-text-container");this.g=!1}y(Fq,yq);function Gq(a){var b=new dp(a.element,[a.element.offsetLeft,a.element.offsetTop],[a.element.offsetLeft,a.element.offsetTop-a.element.offsetHeight],300,fp);si(b,"begin",v(function(){this.a=!0},a));Xo(b)}
263 function Hq(a){var b=new dp(a.element,[a.element.offsetLeft,a.element.offsetTop],[a.element.offsetLeft,a.element.offsetTop+a.element.offsetHeight+4],300,ep);si(b,"end",v(function(){this.a=!1;In(this.element)},a));Xo(b)}
264 function Iq(a){Ad(a.element,444,56);var b=a.ib.data,c={src:b.image_url,"class":"invideo-video-img"},d=Uc("div","invideo-video-img-container"),c=Uc("img",c);Ad(c,100,56);d.appendChild(c);a.element.appendChild(d);Ad(a.b,244,56);d=Uc("span","iv-subtitle-text");dd(d,b.text_line_1);a.b.appendChild(d);d=Uc("span","iv-title-text");dd(d,b.text_line_2);a.b.appendChild(d);a.element.appendChild(a.b);b=Aq(a,v(function(){Hq(this)},a));a.element.appendChild(b);Cq(a,a.element)}
265 Fq.prototype.show=function(){if(!this.a){this.g||(Iq(this),this.g=!0);this.dh();Hn(this.element);var a=this.S.He,b=this.ib;b&&b.i&&a.log_(Bq(a,b,2));Gq(this)}};Fq.prototype.hide=function(){this.a&&Hq(this)};Fq.prototype.dh=function(){var a=this.S.a.tf,b=this.S.a.Oc;if(a&&b){var c=Cd(this.element),d=b.height-a.top,b=c.width<b.width&&c.height<b.height,e=this.S.a.pb?35:5,e=this.ll?e:0;pd(this.element,-a.left,this.a&&b?d-c.height-e:d)}};function Jq(a){this.value=a}function Kq(a){a=jq(a,"value");return new Jq(a)};function Lq(){}function Mq(a){var b=dq(a,"external_user_id","OPTIONAL");a=dq(a,"subscription_token","OPTIONAL");return b&&a?new Lq:null};function Nq(a,b,c,d){this.type=a;this.trigger=b;this.url=c;this.duration=d}var Oq={Zx:"close",YB:"log",kC:"openUrl",PAUSE:"pause",cy:"subscribe"},Pq={CLICK:"click",Zx:"close",$x:"hidden",yC:"rollOut",ay:"rollOver",by:"shown"};function Qq(a){var b=eq(a,"type",Oq,"OPTIONAL"),c=eq(a,"trigger",Pq,"OPTIONAL"),d=lq(a,"url",sq,"OPTIONAL");lq(a,"subscribeData",Mq,"OPTIONAL");a=lq(a,"duration",Kq,"OPTIONAL");return b?new Nq(b,c,d,a):null};function Rq(a,b,c,d,e,g,h,k,m,p,r,s,D,O){this.k=a;this.j=b;this.o=c;this.F=d;this.a=e;this.B=g;this.i=h;this.textAlign=k;this.G=m;this.A=p;this.padding=r;this.b=s;this.g=D;this.I=O}
266 function Sq(a){var b=cq(a,"fgColor","#1A1A1A"),c=cq(a,"bgColor","#FFF"),d=cq(a,"borderColor","#000"),e=iq(a,"borderWidth",10,0,5,!1,0),g=iq(a,"bgAlpha",10,0,1,!1,0.8);iq(a,"borderAlpha",10,0,1,!1,0.2);iq(a,"gloss",16,0,255,!1,0);var h=cq(a,"highlightFontColor","#F2F2F2"),k=iq(a,"highlightWidth",10,0,5,!1,3),m=dq(a,"textAlign","OPTIONAL",""),p=iq(a,"textSize",10,3.3,30.1,!0,3.6107),r=dq(a,"fontWeight","OPTIONAL",""),s;s=(s=a?a.padding&&a.padding.length?a.padding[0]:a.padding:null)?new zb(parseFloat(s.top),
267 parseFloat(s.right),parseFloat(s.bottom),parseFloat(s.left)):null;s=!s||null==s.top||isNaN(s.top)||null==s.right||isNaN(s.right)||null==s.bottom||isNaN(s.bottom)||null==s.left||isNaN(s.left)?null:s;var D=dq(a,"effects","IDLIST"),O=iq(a,"cornerRadius",10,0,10,!0,0);a=lq(a,"gradient",Tq,"OPTIONAL");return new Rq(b,c,d,e,g,h,k,m,p,r,s,D,O,a)}function Uq(a,b,c,d,e,g,h,k){this.j=a;this.o=b;this.k=c;this.F=d;this.a=e;this.b=g;this.g=h;this.i=k}
268 function Tq(a){var b=iq(a,"x1",10,0,100,!0,0),c=iq(a,"y1",10,0,100,!0,0),d=iq(a,"x2",10,0,100,!0,100),e=iq(a,"y2",10,0,100,!0,100),g=cq(a,"color1","#FFF"),h=cq(a,"color2","#000"),k=iq(a,"opacity1",10,0,100,!0,100);a=iq(a,"opacity2",10,0,100,!0,0);return new Uq(b,c,d,e,g,h,k,a)};function Vq(a,b){this.a=a;this.M=b}function Wq(a){var b=dq(a,"standard_url","OPTIONAL","");dq(a,"rollover_url","OPTIONAL","");dq(a,"click_url","OPTIONAL","");a=dq(a,"video_id","OPTIONAL","");return new Vq(b,a)};function Xq(a,b,c){var d=a.F,e=a.A,g=a.a?a.a:"xy",h=Yq(c,a.j,g);a=Zq(c,a.g,g);var g=640*b.width*h/100,k=360*b.height*a/100;return new Db(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 Yq(a,b,c){var d=(c="xx"==c||"xy"==c)?640:360;return(d+((c?a.width:a.height)-d)*b)/d}function Zq(a,b,c){var d=(c="xy"==c||"yy"==c)?360:640;return(d+((c?a.height:a.width)-d)*b)/d};function $q(a,b,c,d,e,g,h,k,m,p,r){this.x=a;this.y=b;this.k=c;this.i=d;this.b=e;this.o=g;this.F=h;this.A=k;this.j=m;this.g=p;this.a=r}function ar(a,b){var c=gq(a,"x",0),d=gq(a,"y",0),e=gq(a,"w",0),g=gq(a,"h",0),h=jq(a,"t"),k=hq(a),m=gq(a,"px",0),p=gq(a,"py",0),r=gq(a,"scaleSlope",1),s=gq(a,"scaleSlopeX",r),r=gq(a,"scaleSlopeY",r),D=dq(a,"scaleDimension","OPTIONAL","xy");return b(c,d,e,g,h,k,m,p,s,r,D)}
269 function br(a,b,c){c=c?br(c,b):null;a=Xq(a,new Db(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=wb(a.left,b.left,b.left+b.width-a.width):(c.left=b.left,c.width=b.width),a.height<b.height?c.top=wb(a.top,b.top,b.top+b.height-a.height):(c.top=b.top,c.height=b.height));return c}function cr(a){return ar(a,function(a,c,d,e,g,h,k,m,p,r,s){return new $q(a,c,d,e,g,h,k,m,p,r,s)})};function dr(a,b,c,d,e,g,h,k,m,p,r,s,D){$q.call(this,a,b,c,d,e,k,m,p,r,s,D);this.B=g;this.G=h}y(dr,$q);function er(a){var b=gq(a,"sx",0),c=gq(a,"sy",0);return ar(a,function(a,e,g,h,k,m,p,r,s,D,O){return new dr(a,e,g,h,k,b,c,m,p,r,s,D,O)})};function fr(a,b,c){this.type=a;this.b=b;this.a=c}var gr={Xx:"anchored",uC:"rect"};function hr(a){var b=eq(a,"type",gr,"OPTIONAL","rect"),c=lq(a,"rectRegion",cr,"REPEATED");a=lq(a,"anchoredRegion",er,"REPEATED");return new fr(b,c,a)}function ir(a){return a.b&&a.b.length?a.b[0]:a.a&&a.a.length?a.a[0]:null};function jr(a,b){this.b=a;this.a=b}function kr(a){$p(a,"timeRelative","OPTIONAL");var b=$p(a,"spaceRelative","OPTIONAL");return(a=lq(a,"movingRegion",hr,"REPEATED"))?new jr(b,a):null};function lr(a,b){this.state=a;this.a=b}var mr={nC:"playerControlShow",ay:"rollOver",by:"shown"};function nr(a){var b=eq(a,"state",mr,"OPTIONAL");a=$p(a,"ref","OPTIONAL","");return b?new lr(b,a):null};function or(a,b,c,d){this.a=a||[];this.g=b||[];this.i=c;this.b=d}function pr(a){var b=lq(a,"condition",nr,"REPEATED"),c=lq(a,"notCondition",nr,"REPEATED"),d=fq(a,"show_delay",!1);a=fq(a,"hide_delay",!1);return b||c?new or(b,c,d,a):null}function qr(a,b,c){z(a.a,oa(b,!1),c);z(a.g,oa(b,!0),c)};function rr(a,b,c,d,e,g,h,k,m,p,r,s,D,O,ta,$){this.id=a;this.author=b;this.type=c;this.style=d;this.o=e;this.a=g;this.g=h||[];this.B=k||[];this.b=m;this.G=p;this.j=r;this.F=s;this.i=D;this.k=O;this.data=ta;this.A=$}var sr={Xx:"anchored",eA:"channel",CB:"highlightText",PB:"label",pC:"popup",EC:"speech",cy:"subscribe",PC:"title",VIDEO:"video"},tr={qA:"custom",BB:"highlight",IMAGE:"image",PAUSE:"pause",TEXT:"text",vD:"widget"},ur={dD:"video_relative",oC:"player_relative"};
270 function vr(a){var b=$p(a,"id","REQUIRED"),c=$p(a,"author","OPTIONAL"),d=eq(a,"type",tr,"REQUIRED"),e=eq(a,"style",sr,"OPTIONAL"),g=dq(a,"TEXT","OPTIONAL"),h=lq(a,"data",function(a){return 0!=a.length?nb(a):{}},"OPTIONAL",{}),k=lq(a,"segment",kr,"OPTIONAL"),m=lq(a,"action",Qq,"REPEATED"),p=lq(a,"trigger",pr,"REPEATED"),r=lq(a,"appearance",Sq,"OPTIONAL");r||(r=Sq({}));var s=eq(a,"coordinate_system",ur,"OPTIONAL","video_relative"),D=lq(a,"image_source",Wq,"OPTIONAL"),O=fq(a,"closeable",!0),ta=fq(a,
271 "logable",!0),$=dq(a,"html_blob","OPTIONAL","");a=dq(a,"log_data","OPTIONAL","");return b&&d?new rr(b,c,d,e,g,k,m,p,r,s,D,O,ta,$,h,a):null}function Dq(a){return(a=Pa(a.g,function(a){return null!=a.url},void 0))?a.url:null}function wr(a){return Ma(a.g,function(a){return null!=a.url&&a.url.b},void 0)}function xr(a){return Ma(a.g,function(a){return"click"==a.trigger},void 0)}function yr(a,b,c){z(a.g,b,c)}function zr(a,b,c){z(a.B,b,c)}function Ar(a,b){La(a.B,b,void 0)}
272 function Br(a){return(a=a.a?a.a.a.length?a.a.a[0]:null:null)?ir(a):null}function Cr(a,b){var c=Br(a);return c&&b?Yq(b,c.j,c.a?c.a:"xy"):1}function Dr(a,b){var c=Br(a);return c&&b?Zq(b,c.g,c.a?c.a:"xy"):1};function Er(a,b,c){this.a={};this.b=!1;this.j="ivTrigger:"+a;this.g=c;qr(b,function(a,b){var c=Fr(b.state,b.a);this.g.D(c,v(this.i,this,c,a));this.a[c]=!1},this)}Er.prototype.i=function(a,b,c,d){this.a[a]=b?!c:c;a=Ib(this.a,function(a){return a});this.b!=a&&(this.b=a,this.g.u(this.j,a,d))};function Fr(a,b){var c="ivTriggerCondition:"+a;return b?c+":"+b:c};function Gr(a,b,c){this.i=a;this.ib=b;this.b=c;this.a=null;this.Gb=this.isVisible=!1;Hr(b,a)}function Hr(a,b){Ar(a,function(c){return new Er(a.id,c,b)})}Gr.prototype.hide=function(){this.isVisible=!1;this.i.$("onResize",this.g,this);this.b.hide()};Gr.prototype.show=function(){this.isVisible=!0;this.b.show();this.i.D("onResize",this.g,this)};Gr.prototype.destroy=function(){this.i.$("onResize",this.g,this);var a=this.b;a.i.removeAll();a.na&&F(a.na);a.Fa&&a.Fa.N()&&F(a.Fa.N());Ir(this)};
273 function Ir(a){a.a&&(a.a.stop(),a.a=null)}Gr.prototype.g=function(){Jr(this.b)};function Kr(){};function Lr(a,b,c,d,e,g,h,k){this.j=a;this.o=b;this.k=c;this.F=d;this.a=e;this.b=g;this.g=q(h)?h:null;this.i=q(k)?k:null}y(Lr,Kr);function Mr(){this.cb=[];this.T=[];this.Kd=[]}Mr.prototype.Rf=null;Mr.prototype.fd=null;Mr.prototype.Si=!0;var Nr=[2,2,6,6,0];f=Mr.prototype;f.clear=function(){this.cb.length=0;this.T.length=0;this.Kd.length=0;delete this.Rf;delete this.fd;delete this.Si;return this};function Or(a,b,c){0==Ha(a.cb)?a.Kd.length-=2:(a.cb.push(0),a.T.push(1));a.Kd.push(b,c);a.fd=a.Rf=[b,c]}
274 f.Ga=function(a){var b=Ha(this.cb);if(null==b)throw Error("Path cannot start with lineTo");1!=b&&(this.cb.push(1),this.T.push(0));for(b=0;b<arguments.length;b+=2){var c=arguments[b],d=arguments[b+1];this.Kd.push(c,d)}this.T[this.T.length-1]+=b/2;this.fd=[c,d]};f.close=function(){var a=Ha(this.cb);if(null==a)throw Error("Path cannot start with close");4!=a&&(this.cb.push(4),this.T.push(1),this.fd=this.Rf);return this};
275 function Pr(a,b,c,d,e){var g=a.fd[0]-b*Math.cos(d*Math.PI/180),h=a.fd[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.cb.push(3);a.T.push(1);a.Kd.push(b,c,d,e,g,h);a.Si=!1;a.fd=[g,h]}function Qr(a,b){for(var c=a.Kd,d=0,e=0,g=a.cb.length;e<g;e++){var h=a.cb[e],k=Nr[h]*a.T[e];b(h,c.slice(d,d+k));d+=k}}
276 f.clone=function(){var a=new this.constructor;a.cb=this.cb.concat();a.T=this.T.concat();a.Kd=this.Kd.concat();a.Rf=this.Rf&&this.Rf.concat();a.fd=this.fd&&this.fd.concat();a.Si=this.Si;return a};f.isEmpty=function(){return 0==this.cb.length};function Rr(a,b){this.A=a;this.B=null==b?1:b}y(Rr,Kr);function Sr(a,b){this.a=a;this.b=b};function Tr(a){this.b=a;this.a={}}y(Tr,K);var Ur=[];f=Tr.prototype;f.listen=function(a,b,c,d,e){t(b)||(Ur[0]=b,b=Ur);for(var g=0;g<b.length;g++){var h=si(a,b[g],c||this,d||!1,e||this.b||this);if(!h)break;this.a[h.key]=h}return this};f.ac=function(a,b,c,d,e){if(t(b))for(var g=0;g<b.length;g++)this.ac(a,b[g],c,d,e);else e=e||this.b||this,c=ti(c||this),d=!!d,b=hi(a)?oi(a.$c,String(b),c,d,e):a?(a=ui(a))?oi(a,b,c,d,e):null:null,b&&(yi(b),delete this.a[b.key]);return this};
277 f.removeAll=function(){Hb(this.a,yi);this.a={}};f.H=function(){Tr.C.H.call(this);this.removeAll()};f.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function Vr(){}ca(Vr);Vr.prototype.a=0;Vr.getInstance();function Wr(a){Ci.call(this);this.o=a||Jc()}y(Wr,Ci);f=Wr.prototype;f.xv=Vr.getInstance();f.Ba=null;f.We=!1;f.Hf=null;f.xl=null;f.getId=function(){return this.Ba||(this.Ba=":"+(this.xv.a++).toString(36))};f.N=function(){return this.Hf};f.qp=function(){this.Hf=this.o.createElement("div")};f.Li=function(){Xr(this,function(a){a.We&&a.Li()});this.j&&this.j.removeAll();this.We=!1};
278 f.H=function(){this.We&&this.Li();this.j&&(this.j.dispose(),delete this.j);Xr(this,function(a){a.dispose()});this.Hf&&F(this.Hf);this.Hf=this.xl=null;Wr.C.H.call(this)};function Xr(a,b){a.xl&&z(a.xl,b,void 0)};function Yr(a,b,c,d,e){Wr.call(this,e);this.width=a;this.height=b;this.g=c||null;this.k=d||null}y(Yr,Wr);Yr.prototype.b=null;Yr.prototype.fh=function(){return this.We?Cd(this.N()):ga(this.width)&&ga(this.height)?new B(this.width,this.height):null};function Zr(a){var b=a.fh();return b?b.width/(a.g?new B(a.g,a.k):a.fh()).width:0};function $r(a,b){Ci.call(this);this.hh=a;this.Fj=b;this[gi]=!1}y($r,Ci);f=$r.prototype;f.Fj=null;f.hh=null;f.N=function(){return this.hh};f.addEventListener=function(a,b,c,d){si(this.hh,a,b,c,d)};f.removeEventListener=function(a,b,c,d){xi(this.hh,a,b,c,d)};f.H=function(){$r.C.H.call(this);var a=this.hh;if(a)if(hi(a))a.$c&&a.$c.removeAll(void 0);else if(a=ui(a)){var b=0,c;for(c in a.a)for(var d=ab(a.a[c]),e=0;e<d.length;++e)yi(d[e])&&++b}};function as(a,b,c,d){$r.call(this,a,b);a=this.Fj;b=this.N();c?(b.setAttribute("stroke",c.b),c=c.a,u(c)&&-1!=c.indexOf("px")?b.setAttribute("stroke-width",parseFloat(c)/Zr(a)):b.setAttribute("stroke-width",c)):b.setAttribute("stroke","none");c=this.Fj;a=this.N();if(d instanceof Rr)a.setAttribute("fill",d.A),a.setAttribute("fill-opacity",d.B);else if(d instanceof Lr){b="lg-"+d.j+"-"+d.o+"-"+d.k+"-"+d.F+"-"+d.a+"-"+d.b;var e=b in c.a?c.a[b]:null;if(!e){var e=bs(c,"linearGradient",{x1:d.j,y1:d.o,x2:d.k,
279 y2:d.F,gradientUnits:"userSpaceOnUse"}),g="stop-color:"+d.a;ga(d.g)&&(g+=";stop-opacity:"+d.g);g=bs(c,"stop",{offset:"0%",style:g});e.appendChild(g);g="stop-color:"+d.b;ga(d.i)&&(g+=";stop-opacity:"+d.i);d=bs(c,"stop",{offset:"100%",style:g});e.appendChild(d);e=cs(c,b,e)}a.setAttribute("fill","url(#"+e+")")}else a.setAttribute("fill","none")}y(as,$r);function ds(a,b){$r.call(this,a,b)}y(ds,$r);function es(a,b){$r.call(this,a,b)}y(es,$r);function fs(a,b,c,d){as.call(this,a,b,c,d)}y(fs,as);function gs(a,b){$r.call(this,a,b)}y(gs,ds);gs.prototype.clear=function(){$c(this.N())};function hs(a,b,c,d){as.call(this,a,b,c,d)}y(hs,fs);function is(a,b){$r.call(this,a,b)}y(is,es);function js(a,b,c,d,e){Yr.call(this,a,b,c,d,e);this.a={};this.F=gc&&!uc(526);this.A=new Tr(this)}var ks;y(js,Yr);var ls=0;function bs(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=js.prototype;
280 f.qp=function(){var a=bs(this,"svg",{width:this.width,height:this.height,overflow:"hidden"}),b=bs(this,"g");this.i=bs(this,"defs");this.b=new gs(b,this);a.appendChild(this.i);a.appendChild(b);this.Hf=a;this.g&&(this.N().setAttribute("preserveAspectRatio","none"),this.F?this.Eo():this.N().setAttribute("viewBox","0 0 "+(this.g?this.g+" "+this.k:"")))};
281 f.Eo=function(){if(this.We){var a=this.fh();0==a.width?this.N().style.visibility="hidden":(this.N().style.visibility="",this.b.N().setAttribute("transform","scale("+a.width/this.g+" "+a.height/this.k+") translate(0 0)"))}};
282 f.fh=function(){if(!fc)return this.We?Cd(this.N()):js.C.fh.call(this);var a=this.width,b=this.height,c=u(a)&&-1!=a.indexOf("%"),d=u(b)&&-1!=b.indexOf("%");if(!this.We&&(c||d))return null;var e,g;c&&(e=this.N().parentNode,g=Cd(e),a=parseFloat(a)*g.width/100);d&&(e=e||this.N().parentNode,g=g||Cd(e),b=parseFloat(b)*g.height/100);return new B(a,b)};f.clear=function(){this.b.clear();$c(this.i);this.a={}};function ms(a,b,c,d){b=bs(a,"path",{d:ns(b)});c=new hs(b,a,c,d);a.b.N().appendChild(c.N())}
283 function ns(a){var b=[];Qr(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 cs(a,b,c){if(b in a.a)return a.a[b];var d="_svgdef_"+ls++;c.setAttribute("id",d);a.a[b]=d;a.i.appendChild(c);return d}
284 f.Li=function(){js.C.Li.call(this);this.F&&this.A.ac(os(),"tick",this.Eo)};f.H=function(){delete this.a;delete this.i;delete this.b;js.C.H.call(this)};function os(){ks||(ks=new Fi(400),ks.start());return ks};function ps(a,b,c){this.a=a;this.b=0;this.i=b;c&&(this.dn=c)}f=ps.prototype;f.dn=70;f.dk=!1;f.start=function(a){this.k=x();this.b=a;this.j=this.k+this.b;this.dk=!0;Hn(this.a);jf(this.g);this.g=hf(v(this.Ft,this),this.dn)};f.stop=function(){this.dk=!1;In(this.a);this.g&&jf(this.g)};
285 f.Ft=function(){if(this.dk){var a=x(),b;b=0==this.b||a>=this.j?0:1-(a-this.k)/this.b;var c=E("countdowntimer-diminishing-pieslice",this.a),d=Ve("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 Mr,g=d/2-5;Or(e,d/2,d/2);e.Ga(d/2,5);Pr(e,g,g,-90,360*-b);e.Ga(d/2,d/2);e.close();c.setAttribute("d",ns(e));a>=this.j&&(this.stop(),this.i&&this.i())}};function qs(a,b){this.b=a;this.a=b}function Eq(a,b,c){b&&b.i&&Dq(b)&&a.log_(Bq(a,b,3),c)}function Bq(a,b,c){var d={};d["iv-event"]=c;d["a-id"]=b.id;d["a-type"]=rs(b);if(c=Dq(b))d.link=escape(tq(c)),c.a&&(d["l-class"]=c.a);d.ps=a.a.La;if(b.A){var e=new xe(b.A);z(e.tc(),function(a){d[a]=e.get(a)})}return d}
286 function rs(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}}qs.prototype.log_=function(a,b){this.b.u("command_log","iv",a,b)};function ss(){this.element=this.label=null;this.priority=0}y(ss,K);ss.prototype.listen=function(a,b,c){return this.element.listen(this.element,a,b,c||this)};ss.prototype.ac=function(a){this.element.ac(a)};function ts(a,b,c){Y.call(this,["div","ytp-segmented-control"]);this.g=a;this.b=-1;this.a=[];q(b)&&us(this,b,c)}y(ts,Y);function us(a,b,c){Ug(a.a);a.a=[];for(var d=0;d<b.length;d++){var e=new un(a.g);a.a[d]=e;c?e.Aa(["div",b[d]]):e.Aa(b[d]);0!=d&&V(e.N(),"ytp-segmented-control-other");vs(e,d==a.b);J(e,"click",v(a.xu,a));e.W(a.element)}}f=ts.prototype;
287 f.W=function(a,b){ts.C.W.call(this,a,b);for(var c=0,d=0;d<this.a.length;d++)c=Math.max(c,Cd(this.a[d].N()).width);if(c)for(d=0;d<this.a.length;d++)Bd(this.a[d].N(),c)};f.Za=function(a){this.b=a;for(var b=0;b<this.a.length;b++)vs(this.a[b],b==a)};f.getSelected=function(){return this.b};function vs(a,b){if(b){var c=a.N();W(c,"ytp-segmented-control-deselected");V(c,"ytp-segmented-control-selected")}else c=a.N(),W(c,"ytp-segmented-control-selected"),V(c,"ytp-segmented-control-deselected")}
288 f.xu=function(a){for(var b=0;b<this.a.length;b++)if(this.a[b]==a.currentTarget){b==this.b&&2==this.a.length?this.Za(0==b?1:0):this.Za(b);Ef(this.element,"change");break}};f.H=function(){us(this,[]);this.g=null;ts.C.H.call(this)};function ws(a){ss.call(this);this.label=a.getMsg("YTP_ANNOTATIONS_TITLE");this.element=new ts(a,[a.getMsg("YTP_ON"),a.getMsg("YTP_OFF")]);L(this,this.element);this.priority=2}y(ws,ss);ws.prototype.getSelected=function(){return this.element.getSelected()};ws.prototype.Za=function(a){this.element.Za(a)};function xs(a,b){this.start=a<b?a:b;this.end=a<b?b:a}xs.prototype.clone=function(){return new xs(this.start,this.end)};function ys(){}f=ys.prototype;f.Qc=!1;f.bf=null;f.Cl=null;function zs(a,b,c){a.bf?(Ad(a.bf.N(),b,c),a.bf.clear()):(b=new js(b,c,void 0,void 0,void 0),a.bf=b,a.bf.qp(),a.Cl=Uc("div"),a.Cl.appendChild(a.bf.N()));return a.bf}f.N=function(){return this.Cl};f.Yd=function(){};function As(a,b,c){var d=document.createElementNS("http://www.w3.org/2000/svg",a);b&&Hb(b,function(a,b){d.setAttribute(b,a)});for(var e=2;e<arguments.length;e++)d.appendChild(arguments[e]);return d}function Bs(a,b){var c;c=":"+(Vr.getInstance().a++).toString(36);b.setAttribute("result",c);a.appendChild(b);return c};function Cs(a,b){var c=Bs(a,As("feGaussianBlur",{"in":b,stdDeviation:"1.8"})),c=Bs(a,As("feDiffuseLighting",{"in":c,surfaceScale:"4",diffuseConstant:"1"},As("feDistantLight",{azimuth:"270",elevation:"15","lighting-color":"white"}))),c=Bs(a,As("feComposite",{"in":c,in2:b,operator:"in"}));return Bs(a,As("feComposite",{in2:c,"in":b,operator:"arithmetic",k2:1,k3:0.5,k4:0}))}
289 function Ds(a,b){var c=Bs(a,As("feOffset",{"in":b,dx:"-7",dy:"-7"})),c=Bs(a,As("feGaussianBlur",{"in":c,stdDeviation:"3"})),c=Bs(a,As("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=Bs(a,As("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=Bs(a,As("feGaussianBlur",{"in":d,stdDeviation:"1"})),c=Bs(a,As("feComposite",{operator:"out","in":c,in2:d}));return Bs(a,As("feComposite",{operator:"over","in":b,in2:c}))}
290 function Es(a,b){return b}function Fs(a){var b=As("filter",{filterUnits:"userSpaceOnUse"}),c="SourceGraphic";z(a,function(a){t:{switch(a){case "bevel":a=Cs;break t;case "dropshadow":a=Ds;break t}a=Es}c=a(b,c)});return b}function Gs(a){a=Ka(a,function(a){return a in Hs});gb(a,function(a,c){return Hs[a]-Hs[c]});return a}function Is(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=Fs(b);return 0<d.childNodes.length?cs(a,c,d):null}
291 function Js(a){return Pa(a,function(a){return"dropshadow"==a})?new zb(0,7,7,0):new zb(0,0,0,0)}var Hs={bevel:1,dropshadow:2};function Ks(a,b,c,d,e){b=Ls(b,c,d?d.a/2+1:0);ms(a,b,d,e)}function Ls(a,b,c){var d=new Mr;Or(d,a.left+b+c,a.top+c);d.Ga(a.left+a.width-b-c,a.top+c);Pr(d,b,b,-90,90);d.Ga(a.left+a.width-c,a.top+a.height-b-c);Pr(d,b,b,0,90);d.Ga(a.left+b+c,a.top+a.height-c);Pr(d,b,b,90,90);d.Ga(a.left+c,a.top+b+c);Pr(d,b,b,180,90);d.close();return d}function Ms(a,b,c){b&&c&&a.setAttribute(b,"url(#"+c+")")}
292 function Ns(a,b,c,d){var e=a.I;e?a=new Lr(e.j*b/100,e.o*c/100,e.k*b/100,e.F*c/100,e.a,e.b,e.g,e.i):(b=d?Math.max(a.a,0.9):a.a,a=new Rr(a.j,b));return a}function Os(a,b){var c=new zb(a.top,a.left+a.width,a.top+a.height,a.left),d=Js(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 Eb(c)}function Ps(a,b,c){c.length&&(b=Pa(b.childNodes,function(a){return"g"==a.tagName}))&&(a=Is(a,Gs(c)),Ms(b,"filter",a))};function Qs(){}y(Qs,ys);Qs.prototype.a=0;
293 Qs.prototype.Yd=function(a,b,c){var d=a.b,e=d.F,g=this.Qc&&xr(a),e=(e+=g?1:0)?new Sr(e,g?d.k:d.o):null;if(g=Br(a)){var h=br(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?br(c,b):null;a=Xq(k,new Db(k.B,k.G,k.k,k.i),b);c?(a.top+=c.top,a.left+=c.left):(a.top+=b.top,a.left+=b.left);m=new A(a.left,a.top);c=h.clone();a=new Db(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+
294 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=Os(c,d.b);a=zs(this,c.width,c.height);var g=Ns(d,c.width,c.height,this.Qc),h=new Db(h.left-c.left,h.top-c.top,h.width,h.height),r=new A(m.x-c.left,m.y-c.top);this.a=17*Zq(b,k.g,k.a?k.a:"xy");b=d.g;k=e?e.a/2:0;m=Rs(h,r);var p=this.b(h,b,r,m),s=r.x,r=r.y,D=h.width,O=h.height,ta=h.left,h=h.top,$=new Mr;Or($,ta+b+k,h+k);"t"==m&&($.Ga(p.start,h+k),$.Ga(s,r),$.Ga(p.end,h+k));$.Ga(ta+D-b-k,h+k);Pr($,
295 b,b,-90,90);"r"==m&&($.Ga(ta+D-k,p.start),$.Ga(s,r),$.Ga(ta+D-k,p.end));$.Ga(ta+D-k,h+O-b-k);Pr($,b,b,0,90);"b"==m&&($.Ga(p.end,h+O-k),$.Ga(s,r),$.Ga(p.start,h+O-k));$.Ga(ta+b+k,h+O-k);Pr($,b,b,90,90);"l"==m&&($.Ga(ta+k,p.end),$.Ga(s,r),$.Ga(ta+k,p.start));$.Ga(ta+k,h+b+k);Pr($,b,b,180,90);$.close();ms(a,$,e,g);if(e=this.N())V(e,"annotation-shape"),V(e,"annotation-speech-shape"),pd(e,c.left,c.top),Ad(e,c.width,c.height),Ps(a,e,d.b)}}}};
296 function Rs(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"}Qs.prototype.b=function(a,b,c,d){function e(a,c,d){h=Math.min(Math.max(d-2*b,0),g);k=wb(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 xs(k,k+h)};function Ss(){}y(Ss,ys);Ss.prototype.Yd=function(a,b,c){var d=Br(a);d&&(b=br(d,b,c),0>=b.width||0>=b.height||(a=a.b,c=Os(b,a.b),d=zs(this,c.width,c.height),Ks(d,new Db(0,0,b.width,b.height),a.g,new Sr(!a.i&&this.Qc?1:a.i,a.j),new Rr("#000",0)),b=this.N(),V(b,"annotation-shape"),Fd(b,this.Qc?Math.max(a.a,0.9):a.a),pd(b,c.left,c.top),Ad(b,c.width,c.height)))};function Ts(a,b,c){this.a=a||0;this.g=b||0;this.b=c||!1}y(Ts,ys);function Us(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 Db(e,g,c,d)}
297 Ts.prototype.Yd=function(a,b,c){var d=br(Br(a),b,c);if(!(0>=d.width||0>=d.height)){var e=Us(d,this.g);e.left+=d.left;e.top+=d.top;b=a.b;c=Os(e,b.b);var g=zs(this,c.width,c.height),h=new Rr("#000",0),e=Us(e,this.a);a=a.j?a.j.a?a.j.a:a.j.M?Qn(a.j.M,"hqdefault.jpg"):"":"";e=bs(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 is(e,g);g.b.N().appendChild(a.N());if(e=
298 this.N()){var k=this.Qc?Math.max(b.a,0.9):b.a;Fd(e,k);if(this.b&&0<b.i){var k=new Sr(b.i,b.j),d=new Db(0,0,d.width,d.height),m;m=Ls(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"),r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("d",ns(m));r.setAttribute("fill","#FFF");p.appendChild(r);m=cs(g,"mask",p)}Ms(a.N(),"mask",m);Ks(g,d,b.g,k,h)}V(e,"annotation-shape");V(e,"annotation-image-shape");
299 pd(e,c.left,c.top);Ad(e,c.width,c.height);Ps(g,e,b.b)}}};function Vs(){}y(Vs,ys);Vs.prototype.Yd=function(a,b,c){var d=Br(a);if(d){var e=br(d,b,c);if(!(0>=e.width||0>=e.height)){b=a.b;c=Os(e,b.b);var d=zs(this,c.width,c.height),g=b.F;a=this.Qc&&xr(a);a=(g+=a?1:0)?new Sr(g,a?b.k:b.o):null;g=new Db(0,0,e.width,e.height);e=Ns(b,e.width,e.height,this.Qc);Ks(d,g,b.g,a,e);if(a=this.N())V(a,"annotation-shape"),V(a,"annotation-popup-shape"),pd(a,c.left,c.top),Ad(a,c.width,c.height),Ps(d,a,b.b)}}};function Ws(){}y(Ws,Qs);Ws.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 xs(k,k+h)};function Xs(a,b){this.b=Mc(a);this.a=Un(this.b,b)}
300 function Ys(a,b){var c=Vn(a.a,b,void 0),c=c.replace(/^[\s\xa0]+/,""),d;d=String(c.substr(0,3)).toLowerCase();(d=0==("<tr"<d?-1:"<tr"==d?0:1))&&(c="<table><tbody>"+c+"</tbody></table>");var e=c,g=document,c=g.createElement("div");C?(c.innerHTML="<br>"+e,c.removeChild(c.firstChild)):c.innerHTML=e;if(1==c.childNodes.length)c=c.removeChild(c.firstChild);else{for(e=g.createDocumentFragment();c.firstChild;)e.appendChild(c.firstChild);c=e}d&&(c=ad(ad(c)));return c};function Zs(a,b,c,d,e){this.a=a;this.j=b;this.g=c;this.o=d;this.k=e;this.i=new Ko(this)}f=Zs.prototype;f.na=null;f.Sc=null;f.dc=null;f.Fa=null;f.Tk=null;function $s(a,b){var c=v(function(a,c,g){c=g?at(this,c,v(g,this)):at(this,c);this.i.listen(b,a,c)},a);c("mouseover","e",a.Kw);c("mouseout","d",a.Jw);c("click","b");c("mousedown","a");c("touchend","b")}
301 function bt(a){if(a.a.F){var b;if(Ma(a.a.g,function(a){return"close"==a.type},void 0))b=a.na;else{b=Ys(new Xs("annotation-close-button-template",[]),{});if(!(b instanceof Element))return;a.dc=b;Pe(a.dc,"annotation_id",a.a.id);a.na.appendChild(a.dc);b=a.dc}var c=function(a){a.stopPropagation()};a.i.listen(b,"click",at(a,"c",c));a.i.listen(b,"touchend",at(a,"c",c))}}
302 function at(a,b,c){return v(function(a){if(this.k)c&&c(a);else if(a.target instanceof Element){In(a.target);var e=document.elementFromPoint(a.clientX,a.clientY);Hn(a.target);jd(e,"annotation")&&Ef(e,a.type)}this.o.u(b,this.a)},a)}f.Kw=function(){this.dc&&Hn(this.dc);this.Sc&&Fd(this.Sc,1);var a=ct(this);this.Fa&&(this.Fa.Qc=!0,Fd(this.na,dt(this)?1:0),a&&this.Fa.Yd(this.a,a,et(this)))};
303 f.Jw=function(){this.dc&&In(this.dc);this.Sc&&Fd(this.Sc,0);var a=ct(this);this.Fa&&(this.Fa.Qc=!1,Fd(this.na,dt(this)?1:0),a&&this.Fa.Yd(this.a,a,et(this)))};function et(a){return a.Tk?Br(a.Tk):null}
304 function Jr(a){if(a.na||a.Fa){var b=Br(a.a);if(b){var c=ct(a),d=et(a);if(a.na&&c){b=br(b,c,d);Ad(a.na,b.width,b.height);pd(a.na,b.left,b.top);var e=a.g.tf;e&&(e=new zb(360*ft(a).top*Dr(a.a,e)/100,640*ft(a).right*Cr(a.a,e)/100,360*ft(a).bottom*Dr(a.a,e)/100,640*ft(a).left*Cr(a.a,e)/100),a.Sc&&(e.right+=1.5*c.height/100),a.na.style.padding=e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px");"label"==a.a.style&&a.b&&(a.b.style.padding=a.na.style.padding);if(a.Sc){e=4.2*c.height/100;e=new B(e,e);Ad(a.Sc,
305 e);if("highlight"==a.a.type||"label"==a.a.style)var g=1.5*c.height/100,e=new A(b.width-e.width-g,b.height-e.height-g);else e=new A(b.width-e.width-3*c.height/100,(b.height-e.height)/2);pd(a.Sc,e)}if(a.dc){Ad(a.dc,new B(18,18));var e=a.dc,g=Cd(a.dc),h=9<=c.left+c.width-(b.left+b.width),k=9<=b.top-c.top;pd(e,h&&k?new A(b.width-9,-9):h?new A(b.width-9,b.height>27+g.height?9:b.height-9):k?new A(b.width>27+g.width?b.width-9-g.width:-9,-9):b.width/c.width>b.height/c.height?new A(b.width>27+g.width?b.width-
306 9-g.width:-9,b.height-9):new A(-9,b.height>27+g.height?9:b.height-9))}}a.Fa&&c&&a.Fa.Yd(a.a,c,d);if(a.na){c=a.na;d=a.a.b;c.style.color="highlightText"==a.a.style?d.B:d.k;c.style.fontSize=360*d.G*Dr(a.a,a.g.tf)/100+"px";c.style.textAlign=d.textAlign?d.textAlign:"title"==a.a.style||"highlightText"==a.a.style?"center":"left";d.A&&(c.style.fontWeight=d.A);a=a.na;c=a.style.overflow;(d=E("annotation-link-icon",a))&&In(d);a.style.overflow="scroll";for(b=100;0<b&&!(a.scrollHeight<=a.offsetHeight&&a.scrollWidth<=
307 a.offsetWidth);b--){e=Qd(a);if(5>e)break;e--;a.style.fontSize=e+"px"}a.style.overflow=c;d&&Hn(d)}}}}function ft(a){var b=a.a.b;return b.padding?b.padding:new zb("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)}
308 f.show=function(){var a=this.a.b,a=(a&&0==a.a||"title"==this.a.style||"highlightText"==this.a.style||"pause"==this.a.type?!1:!0)&&!this.Fa,b=!this.na,c="widget"==this.a.type;if(a){var d=ct(this);if(d){var e=null;"highlight"==this.a.type||"label"==this.a.style?e=new Ss:"popup"==this.a.style?e=new Vs:"anchored"==this.a.style?e=new Qs:"speech"==this.a.style?e=new Ws:"image"==this.a.type&&("video"==this.a.style?e=new Ts(4/3,16/9,!0):"channel"==this.a.style&&(e=new Ts));e&&(e.Yd(this.a,d,et(this)),this.Fa=
309 e,d=e.N())&&(In(d),V(d,"annotation-type-"+this.a.type.toLowerCase()),this.j(d))}}if(b){d=["annotation","hid"];"highlightText"!=this.a.style||d.push("annotation-no-mouse");d.push("annotation-type-"+this.a.type.toLowerCase());this.na=Uc("div",d);this.a.o&&("label"==this.a.style?(this.b=Uc("div",["label-text"]),this.b.style.backgroundColor=this.a.b.j,dd(this.b,this.a.o),this.na.appendChild(this.b)):dd(this.na,this.a.o));Pe(this.na,"annotation_id",this.a.id);this.j(this.na);$s(this,this.na);if(xr(this.a)&&
310 "image"!=this.a.type&&wr(this.a)){if(d=Dq(this.a))this.na.title=tq(d);this.Sc=Uc("span","annotation-link-icon");this.na.appendChild(this.Sc)}bt(this);xr(this.a)||(this.na.style.cursor="default")}c&&("subscribe"==this.a.style?E("yt-uix-subscription-button",this.na)||(this.na.innerHTML=this.a.k):this.a.k&&(this.na.innerHTML=this.a.k));if(a||b){t:{a=this.a.a.a;if(a.length&&(a=ir(a[0]))){a=a.o;break t}a=0}this.na&&(this.na.style.zIndex=a);this.Fa&&this.Fa.N()&&(this.Fa.N().style.zIndex=a)}Hn(this.na);
311 Fd(this.na,dt(this)?1:0);Jr(this);this.Fa&&Hn(this.Fa.N())};f.hide=function(){In(this.na);this.Fa&&In(this.Fa.N())};function dt(a){return"label"!=a.a.style||a.Fa.Qc}function ct(a){var b=a.g.tf;return b?"player_relative"==a.a.G?(a=a.g.Oc)?new Db(-b.left,-b.top,a.width,a.height):null:new Db(0,0,b.width,b.height):null};function gt(a){Im.call(this,a);this.b={};this.i={};this.j=new qs(this.F,this.a.K());var b=Q(a),c=E("html5-annotations-button",b);this.g=null;a.K().Ma?(F(c),this.g=new ws(this.a.app.R.B),this.g.listen("change",this.uq,this)):J(c,"click",v(this.Aq,this));this.D("onHideControls",this.zq,this);this.D("onShowControls",this.Cq,this);this.D("onStateChange",this.Bq,this);this.D("e",this.Eq,this);this.D("d",this.Dq,this);this.D("a",this.xq,this);this.D("b",this.wq,this);this.D("c",this.yq,this);a=E("video-annotations",
312 b);a=E("countdowntimer",a);this.k=Uc("DIV",["video-annotations","html5-stop-propagation"]);Lm(this,this.k);Lm(this,a);this.A=new ps(a,v(this.nj,this))}y(gt,Im);f=gt.prototype;f.qa="iv-module";f.tl=!1;f.ep=!0;f.ba=!1;f.yd=0;function ht(a){return E("video-annotations",Q(a))&&it(a)?new gt(a):null}function it(a){return"leanback"==a.K().Z?!1:qm(a.getVideoData(),"iv3_module")}f.$a=function(){return it(this.a)};
313 f.create=function(){gt.C.create.call(this);this.g&&this.u("module_menu_item_add",this.g);1==(this.a.K().ga||this.a.getVideoData().da)?this.load():jt(this,"tooltip-default")};f.destroy=function(){this.unload();this.g&&this.u("module_menu_item_remove",this.g);gt.C.destroy.call(this)};f.Aq=function(){this.ba||this.yd?this.unload():this.load()};f.uq=function(){var a=this.ba||this.yd,b=0==this.g.getSelected();a&&!b?this.unload():!a&&b&&this.load()};f.Bq=function(a){this.ep=P(a.state,8);0>Ho(a,4)&&this.A.stop()};
314 f.load=function(){gt.C.load.call(this);jt(this,"tooltip-alt");var a={format:"XML",method:"GET",pd:v(this.Jo,this,null)},b=this.a.getVideoData();b.Jk&&(this.yd++,Qj(b.Jk,a));b.Ik&&(this.yd++,Qj(b.Ik,a));b.Hk&&(this.a.K().lc||this.a.K().Lc)&&(a={format:"XML",method:"GET",pd:v(this.Jo,this,v(this.fv,this,b.Ca))},this.yd++,Qj(b.Hk,a));this.g&&this.g.Za(0)};
315 f.unload=function(){this.g&&this.g.Za(1);this.j.log_({"iv-event":1});this.nj();Jm(this);Hb(this.b,function(a){a.destroy()});Hb(this.i,function(a){a.destroy()});this.yd=0;this.ba=!1;this.b={};this.i={};jt(this,"tooltip-default");gt.C.unload.call(this)};function jt(a,b){var c=E("html5-annotations-button",Q(a.a));if(c){var d=G(c,b)||"";Pe(c,"tooltip",d);c.setAttribute("aria-label",d)}}
316 function kt(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(kt(a,e))}return c}
317 f.Jo=function(a,b){if(this.yd&&!this.ba){this.yd--;var c=b.responseXML?b.responseXML.getElementsByTagName("annotations"):null;if(Mj(b)&&c){c=c[0];a&&a(c);lt(this,c);V(Q(this.a),this.qa+"-loaded");0==this.yd&&(this.ba=!0);var c=[],d;for(d in this.b){var e=this.b[d].ib;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<
318 e||(e=new $h(e,g,{id:d}),c.push(e))}for(d in this.i)e=this.i[d].ib,e=new $h(e.data.start_ms,e.data.end_ms,{id:d}),c.push(e);this.uf.apply(this,c)}}};function mt(a,b){var c=nt(a,b);if(!c)return null;zr(b,function(a){a=v(this.ax,this,b.id,a);this.D("ivTrigger:"+b.id,a)},a);return new Gr(a.F,b,c)}
319 function ot(a,b){var c=Uc("div",["annotation","annotation-type-custom","hid"]);a.k.appendChild(c);var d=null,e=new No(new Ko(a),a.a.K(),a.a.getVideoData(),a.j,a.a);switch(b.style){case "video":d=new Fq(b,c,e)}d&&zq(d,a.F);return d}
320 function lt(a,b){for(var c=b.getElementsByTagName("annotation"),d=0;d<c.length;d++){var e=kt(a,c[d]),g=null;try{g=vr(e)}catch(h){}g&&("custom"==g.type?(e=ot(a,g))&&(a.i[g.id]=e):(e=mt(a,g))&&(a.b[g.id]=e))}Hb(a.b,function(a){var b=a.ib;b.a&&b.a.b&&(b=this.b[b.a.b])&&(a.b.Tk=b.ib)},a)}f.yc=function(a){gt.C.yc.call(this,a);a=a.getId();var b=this.b[a],c=this.i[a];c&&!c.Gb?c.show():b&&!b.Gb&&(b=b.ib,"pause"==b.type?pt(this,b):(qt(this,a),a=this.j,b&&b.i&&a.log_(Bq(a,b,2))))};
321 f.Vc=function(a){gt.C.Vc.call(this,a);rt(this,a.getId())};function pt(a,b){if(a.ep){var c=Pa(b.g,function(a){return"pause"==a.type&&!!a.duration&&!!a.duration.value},void 0);c&&(a.tl=!0,a.u("command_pause"),a.A.start(1E3*c.duration.value))}}function rt(a,b,c){var d=a.i[b];if(d&&!d.Gb)d.hide();else if(b=a.b[b])Ir(b),c&&c.b?(a=v(a.lo,a,b),b.a=new Oo(a,2E3),b.a.start()):a.lo(b)}f.lo=function(a){if(a){a.hide();var b=a.ib.id;this.u(Fr("shown",b),!1,b);st(this,a.ib,"hidden")}};
322 function qt(a,b,c){if(b=a.b[b])Ir(b),c&&c.i?(a=v(a.mo,a,b),b.a=new Oo(a,2E3),b.a.start()):a.mo(b)}f.mo=function(a){if(a){a.show();var b=a.ib.id;this.u(Fr("shown",b),!0,b);st(this,a.ib,"shown")}};f.ax=function(a,b,c){c?qt(this,a,b):rt(this,a,b)};f.xq=function(a){if(a&&a.id){var b=this.j;a&&a.i&&Dq(a)&&b.log_(Bq(b,a,8))}};f.wq=function(a){if(a&&a.id){var b=Dq(a),c=v(function(){b&&st(this,a,"click")},this);uq(tq(b))&&"new"!=b.target||(c(),c=null);Eq(this.j,a,c)}};
323 function st(a,b,c){yr(b,function(a){if(a.trigger==c)switch(a.type){case "log":a.url&&sa(a.url.value);break;case "openUrl":var e=this.a.getVideoData(),g=vq(a.url,e);if(-1!=g){this.u("command_seek",g);this.nj();break}if(e=wq(a.url,b,e))Vm(this),window.open(e,xq(a.url))}},a)}f.zq=function(){this.u(Fr("playerControlShow",void 0),!1,void 0)};f.Cq=function(){this.u(Fr("playerControlShow",void 0),!0,void 0)};f.Eq=function(a){a=a.id;this.u(Fr("rollOver",a),!0,a)};
324 f.Dq=function(a){a=a.id;this.u(Fr("rollOver",a),!1,a)};f.yq=function(a){if(a||a.id)if(this.b[a.id].Gb=!0,rt(this,a.id),a){var b=this.j;a&&a.i&&b.log_(Bq(b,a,4));st(this,a,"close")}};f.nj=function(){this.A.stop();this.tl&&(this.tl=!1,this.u("command_play"))};function nt(a,b){if(tt(b)){var c=b.F||Ma(b.g,function(a){return"click"==a||"rollOut"==a||"rollOut"==a},void 0);return new Zs(b,v(a.k.appendChild,a.k),a.a.K(),a.F,c)}return null}
325 function tt(a){if("highlight"==a.type||"image"==a.type||"widget"==a.type)return!0;if("text"==a.type)for(var b in sr)if(a.style==sr[b])return!0;return!1}function ut(a,b,c,d,e){var g=a.ownerDocument.createElement("action");g.setAttribute("type","log");g.setAttribute("trigger",d);a=a.ownerDocument.createElement("url");d={};d.value="a_id="+c;d.label="cta_annotation_"+e;b=Kj(b,d);a.setAttribute("value",b);g.appendChild(a);return g}
326 f.fv=function(a,b){if(a)for(var c=b.getElementsByTagName("annotation"),d=0;d<c.length;d++){var e=c[d],g=kt(this,e);if(fq(g,"logable",!0)){var g=$p(g,"id","REQUIRED"),h=e.getElementsByTagName("action"),h=h.length?h[0]:null;e.insertBefore(ut(e,a,g,"shown","shown"),h);e.insertBefore(ut(e,a,g,"click","clicked"),h);e.insertBefore(ut(e,a,g,"close","closed"),h)}}};var vt;function wt(a,b){fa(b)&&(b=b.join(" "));if(""===b||void 0==b){var c;vt||(vt={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=vt;"pressed"in c?a.setAttribute("aria-pressed",c.pressed):a.removeAttribute("aria-pressed")}else a.setAttribute("aria-pressed",b)};function xt(a,b,c,d,e){un.call(this,a,b,c,c);this.O=b;this.Q=this.P=c;this.B=d||null;this.G=e||null;this.I=e||null;this.b=!1}y(xt,un);function zt(a){wn(a,a.b&&a.B?a.B:a.O);a.Hb(a.b&&a.G?a.G:a.P);a.a=a.b&&a.I?a.I:a.Q;X(a.element,"ytp-button-pressed",a.b)}function At(a){a.b=!0;wt(a.element,!0);zt(a)}function Bt(a){a.b=!1;wt(a.element,!1);zt(a)}xt.prototype.H=function(){this.I=this.G=this.B=null;yf(this.V);this.V=null;xt.C.H.call(this)};function Ct(a){Y.call(this,["div","ytp-action-buttons"]);this.g=new xt(a,"ytp-button-info",a.getMsg("YTP_BUTTON_INFO"));L(this,this.g);this.g.W(this.element);this.i=new xt(a,"ytp-button-share",a.getMsg("YTP_BUTTON_SHARE"));L(this,this.i);this.i.W(this.element);this.a=new xt(a,"ytp-button-dislike",a.getMsg("YTP_BUTTON_DISLIKE"));L(this,this.a);this.listen(this.a,"click",this.k);this.a.W(this.element);this.b=new xt(a,"ytp-button-like",a.getMsg("YTP_BUTTON_LIKE"));L(this,this.b);this.listen(this.b,"click",
327 this.F);this.b.W(this.element);this.b.hide();this.a.hide()}y(Ct,Y);Ct.prototype.F=function(){At(this.b);Bt(this.a)};Ct.prototype.k=function(){At(this.a);Bt(this.b)};function Dt(a){var b=le("/signin?context=popup","next",document.location.protocol+"//"+document.domain+"/post_login"),b=le(b,"feature","sub_button");if(b=window.open(b,"loginPopup","width=375,height=440,resizable=yes,scrollbars=yes",!0)){var c=jp("LOGGED_IN",function(b){np();a(b)});bf("LOGGED_IN_PUBSUB_KEY",c);b.moveTo((screen.width-375)/2,(screen.height-440)/2)}}pa("yt.pubsub.publish",op);function Et(){this.a={}}y(Et,xp);ca(Et);f=Et.prototype;f.Wi="tooltip";f.Vi=0;f.register=function(){yp(this,"mouseover",this.Lp);yp(this,"mouseout",this.Hl);yp(this,"click",this.Hl);yp(this,"touchstart",this.Kx);yp(this,"touchend",this.Rp);yp(this,"touchcancel",this.Rp)};f.$p=function(){return!(this.g&&0==sc.indexOf("6"))};
328 f.Lp=function(a){if(!(this.Vi&&1E3>x()-this.Vi)){var b=parseInt(G(a,"tooltip-hide-timer"),10);b&&(this.removeData(a,"tooltip-hide-timer"),I(b));var b=v(function(){Ft(this,a);this.removeData(a,"tooltip-show-timer")},this),c=parseInt(G(a,"tooltip-show-delay"),10)||0,b=H(b,c);Pe(a,"tooltip-show-timer",b.toString());a.title&&(zp(a,Gt(a)),a.title="")}};
329 f.Hl=function(a){var b=parseInt(G(a,"tooltip-show-timer"),10);b&&(I(b),this.removeData(a,"tooltip-show-timer"));b=v(function(){Ht(this,a);this.removeData(a,"tooltip-hide-timer")},this);b=H(b,50);Pe(a,"tooltip-hide-timer",b.toString());if(b=G(a,"tooltip-text"))a.title=b};f.Kx=function(a,b){this.Vi=0;var c=tp(b,Z(this),null[0].target);this.Lp(c)};f.Rp=function(a,b){this.Vi=x();var c=tp(b,Z(this),null[0].target);this.Hl(c)};function It(a,b){zp(a,b);var c=G(a,"content-id");if(c=Mc(c))c.innerHTML=b}
330 function Gt(a){return G(a,"tooltip-text")||a.title}
331 function Ft(a,b){if(b){var c=Gt(b);if(c){var d=Mc(Jt(a,b));if(!d){d=document.createElement("div");d.id=Jt(a,b);d.className=Z(a,"tip");var e=document.createElement("div");e.className=Z(a,"tip-body");var g=document.createElement("div");g.className=Z(a,"tip-arrow");var h=document.createElement("div");h.className=Z(a,"tip-content");var k=Kt(a,b),m=Jt(a,b,"content");h.id=m;Pe(b,"content-id",m);e.appendChild(h);k&&d.appendChild(k);d.appendChild(e);d.appendChild(g);(Gf()||document.body).appendChild(d);It(b,
332 c);(c=parseInt(G(b,"tooltip-max-width"),10))&&e.offsetWidth>c&&(e.style.width=c+"px",Dc(h,Z(a,"normal-wrap")));h=Gc(b,Z(a,"reverse"));Lt(a,b,d,e,k,h)||Lt(a,b,d,e,k,!h);var p=Z(a,"tip-visible");H(function(){Dc(d,p)},0)}}}}
333 function Lt(a,b,c,d,e,g){Hc(c,Z(a,"tip-reverse"),g);var h=0;g&&(h=1);a=Cd(b);g=new A((a.width-10)/2,g?a.height:0);var k=ud(b);qp(new A(k.x+g.x,k.y+g.y),c,h);h=Rc(window);k=xd(c);c=Cd(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)+
334 "px";return!(e||a)}function Ht(a,b){if(b){var c=Mc(Jt(a,b));c&&(Mt(c),F(c),a.removeData(b,"content-id"))}}function Jt(a,b,c){a=Z(a);var d=b.__yt_uid_key;d||(d=Se(),b.__yt_uid_key=d);b=a+d;c&&(b+="-"+c);return b}function Kt(a,b){var c=null;$b&&Gc(b,Z(a,"masked"))&&((c=Mc("yt-uix-tooltip-shared-mask"))?(c.parentNode.removeChild(c),Hn(c)):(c=document.createElement("iframe"),c.src='javascript:""',c.id="yt-uix-tooltip-shared-mask",c.className=Z(a,"tip-mask")));return c}
335 function Mt(a){var b=Mc("yt-uix-tooltip-shared-mask"),c=b&&kd(b,function(b){return b==a},!1,2);b&&c&&(b.parentNode.removeChild(b),In(b),document.body.appendChild(b))};function Nt(){this.a={};this.i=[]}y(Nt,xp);ca(Nt);Nt.prototype.Wi="subscription-button";
336 Nt.prototype.register=function(){yp(this,"click",this.mp);this.i.push(jp("subscription-subscribe-loading",this.lp,this),jp("subscription-subscribe-loaded",this.kp,this),jp("subscription-unsubscirbe-loading",this.lp,this),jp("subscription-unsubscribe-loaded",this.kp,this),jp("subscription-subscribe-success",this.Hw,this),jp("subscription-unsubscribe-success",this.Iw,this),jp("subscription-enable-ypc",this.Gw,this),jp("subscription-disable-ypc",this.Fw,this))};
337 var Ot={Kp:"hover-enabled",Ex:"yt-uix-button-subscribe",Fx:"yt-uix-button-subscribed",Sz:"ypc-enabled",Tx:"yt-uix-button-subscription-container",Ux:"yt-subscription-button-disabled-mask-container"},Pt={fA:"channel-external-id",Gx:"subscriber-count-show-when-subscribed",Hx:"subscriber-count-tooltip",Ix:"subscriber-count-title",FB:"href",Wp:"is-subscribed",mC:"parent-url",DC:"sessionlink",Jx:"style-type",Xp:"subscription-id",NC:"target",Lx:"ypc-enabled",Pp:"ypc-item-type",Op:"ypc-item-id",Qp:"ypc-offers-url"};
338 f=Nt.prototype;f.mp=function(a){var b=G(a,"href"),c=!!ff("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,Pt.Pp);var e=G(a,Pt.Op),g=G(a,Pt.Qp);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"),op("subscription-unsubscribe",b,g,d,a,c,e)):op("subscription-subscribe",b,d,a,c,e)}else Qt(this,a)};
339 f.lp=function(a){this.Tf(a,this.Up,!0)};f.kp=function(a){this.Tf(a,this.Up,!1)};f.Hw=function(a,b){this.Tf(a,this.Vp,!0,b)};f.Iw=function(a){this.Tf(a,this.Vp,!1)};f.Gw=function(a){this.Tf(a,this.Ox)};f.Fw=function(a){this.Tf(a,this.Nx)};f.Vp=function(a,b,c){b?(Pe(a,Pt.Wp,"true"),c&&Pe(a,Pt.Xp,c)):(this.removeData(a,Pt.Wp),this.removeData(a,Pt.Xp));Rt(a)};f.Up=function(a,b){var c=jd(a,Ot.Tx);Hc(c,Ot.Ux,b);a.setAttribute("aria-busy",b?"true":"false");a.disabled=b};
340 function Rt(a){var b=G(a,Pt.Jx),c=!!G(a,"is-subscribed"),b="-"+b,d=Ot.Fx+b;Hc(a,Ot.Ex+b,!c);Hc(a,d,c);G(a,Pt.Hx)&&!G(a,Pt.Gx)&&(b=Z(Et.getInstance()),Hc(a,b,!c),a.title=c?"":G(a,Pt.Ix));c?H(function(){Dc(a,Ot.Kp)},1E3):Ec(a,Ot.Kp)}f.Ox=function(a){var b=!!G(a,Pt.Pp),c=!!G(a,Pt.Op),d=!!G(a,Pt.Qp);!G(a,"ypc-enabled")&&b&&c&&d&&(Dc(a,"ypc-enabled"),Pe(a,Pt.Lx,"true"))};f.Nx=function(a){G(a,"ypc-enabled")&&(Ec(a,"ypc-enabled"),this.removeData(a,"ypc-enabled"))};
341 function St(a,b){var c=Nc(Z(a));return Ka(c,function(a){return b==G(a,"channel-external-id")},a)}f.ey=function(a,b,c){var d=db(arguments,2);z(a,function(a){b.apply(this,$a(a,d))},this)};f.Tf=function(a,b,c){var d=St(this,a),d=$a([d],db(arguments,1));this.ey.apply(this,d)};function Qt(a,b){var c=v(function(a){a.subscription_ajax&&ef("subscription_ajax",a.subscription_ajax);this.mp(b)},a);Dt(c)};function Tt(a){this.b=a||1;yn.call(this,30*this.b,30*this.b);this.F=this.width/2;this.i=this.height/2;this.B=0;this.S.translate(this.F,this.i)}y(Tt,yn);Tt.prototype.show=function(){Tt.C.show.call(this);var a=this.G;this.k=new Date;this.g(a,125)};
342 Tt.prototype.G=function(){this.S.clearRect(-this.F,-this.i,this.width,this.height);for(var a=this.B++%8,b=0;8>b;b++){var c=2*Math.PI/8*(a+b),d=11*this.b*Math.cos(c),c=11*this.b*Math.sin(c),e=(b+1)/9;this.S.beginPath();this.S.arc(d,c,4*this.b,0,2*Math.PI,!1);this.S.fillStyle="rgba(189, 189, 189, "+e+")";this.S.fill()}};Tt.prototype.hide=function(){I(this.a);Tt.C.hide.call(this)};function Ut(){Y.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(Ut,Y);Ut.prototype.H=function(){this.a=this.b=null;Ut.C.H.call(this)};function Vt(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")]];Y.call(this,a)}y(Vt,Y);function Wt(a,b,c,d){un.call(this,a,"share-service-icon-"+d+"-sharebar",b,c);V(this.element,"share-service-icon-sharebar")}y(Wt,un);function Xt(){Y.call(this,["div","ytp-share-url-container",["input","ytp-share-url"]]);this.a=this.template.a["ytp-share-url"]}y(Xt,Y);Xt.prototype.H=function(){this.a=null;Xt.C.H.call(this)};function Yt(a,b,c){R.call(this);this.a=a;this.g=b;this.i=c;this.gb=new Ko(this);this.j=this.b=this.k=this.ia=null;this.A=this.o=!1}y(Yt,R);f=Yt.prototype;f.Nj=function(){var a=E("html5-title",this.a);this.k=E("html5-title-text",a);this.gb.listen(this.k,"click",this.qn);this.b=new Ct(this.i);this.b.W(a,1);this.gb.listen(this.b.g,"click",this.bk);this.g.hf&&this.b.g.hide();this.gb.listen(this.b.i,"click",this.Vh)};f.reset=function(){};
343 f.update=function(a){this.ia=a;this.reset();dd(this.k,a.title||"");Hn(this.a)};f.qn=function(){this.Ci(this.ia.Lc||Zt(this.g,this.ia))};f.bk=function(){if(!this.o){this.o=!0;hn(this.ia?this.ia.M:void 0,!1,this.$s,ba,this,this.g.Ea,this.g.Ua);if(!this.j){var a=E("html5-info-panel-loading-icon",this.a);this.j=new Tt;V(this.j.element,"html5-info-panel-loader");this.j.W(a);L(this,this.j)}this.j.show()}Bt(this.b.i);W(this.a,"show-share");a=this.b.g;a.b?Bt(a):At(a);return Gm(this.a,"show-more-info")};
344 f.Vh=function(a){Bt(this.b.g);W(this.a,"show-more-info");if("detailpage"!=this.g.Z){if(!this.A){this.A=!0;var b={action_get_share_info:1,feature:"player_embedded",video_id:this.ia?this.ia.M:void 0};this.g.Ea&&(b.authuser=this.g.Ea);this.g.Ua&&(b.pageid=this.g.Ua);Qj("/share_ajax",{S:this,method:"GET",onError:this.Bt,Pa:this.Ct,rf:b})}a&&a.stopPropagation();a=this.b.i;a.b?Bt(a):At(a);Gm(this.a,"show-share")}};
345 f.$s=function(a,b){if(!this.ka()){var c=E("html5-info-panel",this.a),d=b.user_info;this.ia&&(this.ia.pa=d.external_id);var e=E("html5-author-img",c).getElementsByTagName("img")[0];e.src=d.image_url;this.gb.listen(e,"click",this.Nn);e=E("html5-author-name",c);dd(e,d.username);this.gb.listen(e,"click",this.Nn);e=b.video_info;e.subscription_ajax_token&&ef("subscription_ajax",e.subscription_ajax_token);var g=E("html5-subscribe-button-container",c);g.innerHTML=d.subscription_button_html?d.subscription_button_html:
346 "";d=Nt.getInstance();(d=E(Z(d),g))&&$t(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 Ut,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);bn(d.template,"sentiment",h+", "+g);d.W(E("html5-video-info",c),2);d=E("html5-description-text",c);dd(d,e.description);this.j.hide();c=E("html5-info-panel-content",
347 c);Hn(c)}};
348 f.Ct=function(a,b){if(!this.ka()){var c=E("share-bar"),d=new Xt;Pc(d.a,{value:b.url_short});d.W(c);Dm(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 Wt(this.i,d[e].name,d[e].sname,d[e].img);g.W(c);this.gb.listen(g,"click",oa(Rp,d[e].url,{}))}d=new Vt(this.i);this.gb.listen(d,"click",v(this.Ci,this,b.more));d.W(c);d=new un(this.i,"yt-uix-button-icon-share-bar-close",this.i.getMsg("YTP_BUTTON_CLOSE"),this.i.getMsg("YTP_BUTTON_CLOSE"));d.W(c);
349 this.gb.listen(d,"click",this.Vh)}};f.Bt=function(){};f.Nn=function(){var a=this.g,b=this.ia,c="",c=b.pa?a.lb+"channel/UC"+b.pa:a.lb+"user/"+b.author;this.Ci(c)};f.Ci=function(a){Qp(a)};f.H=function(){this.gb.removeAll();this.ia=this.k=this.g=this.a=null;Yt.C.H.call(this)};function au(){Y.call(this,["div","ytp-playlist-tray-index-length",["span","ytp-playlist-tray-index","{{index}}"],["span",""," / "],["span","ytp-playlist-tray-length","{{length}}"]])}y(au,Y);au.prototype.Jg=function(a){bn(this.template,"index",a+1)};function bu(a){xt.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(bu,xt);function cu(a){Y.call(this,["div","ytp-playlist-tray-controller"]);this.b=new bu(a);this.b.W(this.template.N());L(this,this.b);this.a=new au;this.a.W(this.template.N());L(this,this.a)}y(cu,Y);function du(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]];Y.call(this,a)}y(du,Y);function eu(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"]];Y.call(this,b);this.i=a;this.g=new Ko(this);this.b=this.a=null}y(eu,Y);eu.prototype.H=function(){this.g.removeAll();this.g=null;eu.C.H.call(this)};function fu(a,b){Y.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:Qn(a.M)})}y(fu,Y);
350 fu.prototype.Jg=function(a){X(this.element,"ytp-playlist-tray-item-current",this.a==a)};function gu(){Y.call(this,["div","ytp-playlist-tray-tray"]);this.a=null;this.i=new Ko(this);this.b=[]}y(gu,Y);function hu(a,b){b!=a.a&&(a.a&&a.a.$("shuffle",a.g,a),a.a=b,a.a.D("shuffle",a.g,a),a.g())}gu.prototype.g=function(){this.i.removeAll();this.b=[];$c(this.element);for(var a=0;a<=this.a.Mb-1;++a){var b=new fu(wh(this.a,a),a);b.Jg(this.a.ua);this.b.push(b);this.i.listen(b,"click",oa(this.k,a));b.W(this.element)}};
351 gu.prototype.k=function(a){a={index:a};var b=document.createEvent("CustomEvent");b.initCustomEvent("playvideoat",!0,!0,a||null);this.dispatchEvent(b)};gu.prototype.H=function(){this.i.removeAll();gu.C.H.call(this)};function iu(a){Im.call(this,a);var b=Q(a);this.j=new Ko(this);this.k=a.app.R.B;this.i=new Xm(["div",["ytp-playlist-tray-container","html5-stop-propagation"],["div",["ytp-playlist-tray-info","show-more-info"]]]);L(this,this.i);this.a.app.R.g.appendChild(this.i.N());this.g=new gu;this.j.listen(this.g,"playvideoat",v(function(b){a.hm(b.detail.index)},a));L(this,this.g);this.g.W(this.i.N(),0);this.G=E("html5-playlist-button",b);J(this.G,"click",v(this.zm,this));this.B=this.A=null;this.I=!1;this.b=new cu(this.k);
352 this.b.W(E("html5-title",void 0),0);this.j.listen(this.b.b,"click",this.zm);this.D("fullscreentoggled",this.oq,this);this.D("videodatachange",this.pq,this);this.D("onResize",this.im,this);this.D("clearvideooverlays",this.unload,this)}y(iu,Im);f=iu.prototype;f.qa="playlist";f.create=function(){var a=this.a.vb();hu(this.g,a);for(var b=this.g,c=0;c<b.b.length;c++)b.b[c].Jg(b.a.ua);a.D("shuffle",this.lu,this);iu.C.create.call(this)};
353 f.lu=function(){this.b.a.Jg(this.a.Tj());var a=zm(this.a.vb());bn(this.b.a.template,"length",a)};f.destroy=function(){this.a.vb()||(hu(this.g,null),iu.C.destroy.call(this))};f.load=function(){this.ba=!0;iu.C.load.call(this);At(this.b.b)};f.unload=function(){this.ba=!1;iu.C.unload.call(this);Bt(this.b.b)};
354 f.zm=function(){if(this.ba)this.unload();else if(this.u("command_clear_video_overlays"),this.load(),this.im(),!this.A){var a=E("ytp-playlist-tray-info"),b=new Ct(this.k);b.W(a,0);this.j.listen(b.g,"click",this.Zt);this.j.listen(b.i,"click",this.au);b=this.a.vb();this.A=new du(this.k,b.title,b.author,b.description);this.A.W(a)}};f.Zt=function(){var a=E("ytp-playlist-tray-info");Dc(a,"show-more-info");Ec(a,"show-share")};
355 f.au=function(){var a=E("ytp-playlist-tray-info");Ec(a,"show-more-info");Dc(a,"show-share");this.I||(this.B=new eu(this.k),this.B.W(a),this.I=!0,Qj("/share_ajax",{S:this,method:"GET",onError:this.Wu,Pa:this.Xu,rf:{action_get_share_info:1,feature:"player_embedded",video_id:this.a.getVideoData().M,list:this.a.vb().g}}))};f.hide=function(){var a=E("ytp-playlist-tray-info");Ec(a,"show-more-info");Ec(a,"show-share")};
356 f.Xu=function(a,b){var c=this.B;c.g.removeAll();var d=b.links,e=c.template.a["share-bar-services"];$c(e);for(var g=0;g<Math.min(3,d.length);g++){var h=new Wt(c.i,d[g].name,d[g].sname,d[g].img);h.W(e);c.g.listen(h,"click",oa(Rp,d[g].url))}c.a&&F(c.a.element);c.a=new Vt(c.i);c.g.listen(c.a,"click",oa(Qp,b.more));c.a.W(c.element);c.b&&F(c.b.element);c.b=new Xt;Pc(c.b.a,{value:b.url_short});c.b.W(c.element)};f.Wu=function(){};f.oq=function(a){var b=this.a.K().Z;this.ba&&!a&&"detailpage"==b&&this.unload()};
357 f.pq=function(){this.b.a.Jg(this.a.Tj());var a=zm(this.a.vb());bn(this.b.a.template,"length",a)};f.im=function(){var a=Cd(this.i.N());X(this.i.N(),"show-tray-panel",560<a.width)};f.$a=function(a){return!!a.vb()};function ju(a){return a.vb()?new iu(a):null}f.H=function(){Df(this.G);this.G=null;iu.C.H.call(this)};var ku=RegExp("^(ar|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)","i");function lu(a,b){Fm(a,["html5-async-progress","html5-async-success","html5-async-error"]);b&&V(a,b);Ht(Et.getInstance(),a)};function mu(a,b,c,d){if(this.g=!!c)this.Wk=Math.max(800,this.Wk);this.element=a;this.G=b;this.k=d;nu?a.ontouchstart=v(this.Tv,this):a.onmousedown=v(this.Sv,this);a.onclick=v(this.Gn,this)}var nu="ontouchstart"in document,ou=[],pu=!1;function qu(){nu&&!pu&&(pu=!0,document.addEventListener("click",function(a){for(var b=new A(a.clientX,a.clientY),c=0,d;d=ou[c];c++)if(25>xb(d,b)){a.stopPropagation();a.preventDefault();ou.splice(c,1);break}},!0))}
358 function ru(a){ou.push(a);window.setTimeout(function(){var b=ou.indexOf(a);-1!=b&&ou.splice(b,1)},2500)}f=mu.prototype;f.Wk=1E3;
359 f.Tv=function(a){if(!(1<a.touches.length||a._stop)){this.a=a._stop=!0;this.g||(this.element.ontouchend=v(this.Gn,this),document.body.addEventListener("touchend",su(this),!1));document.body.addEventListener("touchmove",tu(this),!1);document.body.addEventListener("touchcancel",su(this),!1);uu(this,a);this.F=window.setTimeout(v(this.gi,this,!0),100);var b=a.touches[0];this.b=new A(b.clientX,b.clientY);this.g||this.k&&!this.k(a)||ru(this.b)}};
360 f.Sv=function(a){a.stopPropagation();this.a=!0;uu(this,a);this.gi(!0)};f.Gn=function(a){"touchend"==a.type&&!this.a||a._stop||(a._stop=!0,this.gi(!0),window.setTimeout(v(function(){this.yi();this.G(a)},this),0))};f.Lw=function(a){1<a.touches.length?this.yi():(a=a.touches[0],a=new A(a.clientX,a.clientY),this.b&&12<xb(this.b,a)&&this.yi())};function tu(a){a.i||(a.i=v(a.Lw,a));return a.i}
361 f.yi=function(){window.clearTimeout(this.F);window.clearTimeout(this.A);this.gi(!1);this.a=!1;document.body.removeEventListener("touchmove",tu(this),!1);document.body.removeEventListener("touchend",su(this),!1);document.body.removeEventListener("touchcancel",su(this),!1)};function su(a){a.j||(a.j=v(a.yi,a));return a.j}f.gi=function(a){this.B&&Hc(this.element,this.B,a)};function uu(a,b){a.o&&(a.A=window.setTimeout(v(function(){this.a=!1;this.o(b)},a),a.Wk))};function vu(a){un.call(this,a);xn(this,15);wu(this)}y(vu,un);function wu(a){wn(a,"ytp-button-fullscreen-enter");var b=a.g.getMsg("YTP_BUTTON_FULLSCREEN_ENTER");a.Hb(b);a.a=b};function xu(){Y.call(this,["div",["ytp-menu","html5-stop-propagation"],"{{content}}"]);this.a=[];this.stopPropagation("click")}y(xu,Y);xu.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}}cb(this.a,b,0,a);yu(this)};xu.prototype.remove=function(a){Xa(this.a,a);yu(this)};
362 function yu(a){var b;if(1==a.a.length)b=new Y(["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 Y(["div","ytp-menu-content"]);for(var c=0;c<a.a.length;c++){var d=new Y(["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.W(b.N())}}a.Aa(b)}xu.prototype.H=function(){this.a=null;xu.C.H.call(this)};function zu(a){un.call(this,a);xn(this,3);Au(this)}y(zu,un);function Au(a){wn(a,"ytp-button-play");var b=a.g.getMsg("YTP_BUTTON_PLAY");a.Hb(b);a.a=b};function Bu(a){Y.call(this,["div","ytp-playlist-controls","{{content}}"]);this.b=new un(a,"ytp-button-prev",a.getMsg("YTP_BUTTON_PREV"),a.getMsg("YTP_BUTTON_PREV"));L(this,this.b);this.a=new un(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(Bu,Y);function Cu(a,b,c,d){var e=Math.min(c/(b.Rn/b.mi),d/(b.Qn/b.rows)),g=b.Rn*e,e=b.Qn*e,g=Math.floor(g/b.mi)*b.mi,e=Math.floor(e/b.rows)*b.rows,h=g/b.mi,k=e/b.rows,m=Math.floor((c-h)/2);c=Math.ceil((c-h)/2);var p=Math.floor((d-k)/2);d=-1*b.iu*h;var r=-1*b.row*k;a=a.style;a.width=h+"px";a.height=k+"px";h=p+"px";a.marginTop=h;a.marginBottom=h;a.marginLeft=m+"px";a.marginRight=c+"px";a.backgroundImage="url("+b.url+")";a.backgroundPosition=d+"px "+r+"px";a.a=g+"px "+e+"px"};function Du(){this.b=!1;this.a=new Np(this.dv,250,this);L(this,this.a)}y(Du,K);f=Du.prototype;f.to=!1;f.ud=null;f.cc=null;f.Ph=null;f.Sj=null;f.Uj=null;f.wg=null;f.$d=0;f.wk=0;f.Xk=0;f.Fo=10;f.Nb=0;f.Ai=0;f.Zk=0;f.Uc=null;f.Le=null;f.Oe=0;f.disable=function(){this.to=!0};f.Xa=function(a){this.Oe=a};f.qo=function(a,b){this.cc.style.display="none";for(var c,d,e=a;e<=b;e++)if(d=this.cc.children[e])c=yl(this.Le,e,this.Nb),Cu(d,c,this.Nb,this.Ai);this.cc.style.display=""};
363 function Eu(a,b){if(b!=a.Zk){var c=yl(a.Le,b,2*a.Nb),d=Math.round(2*a.Nb),e=Math.round(2*a.Ai);Cu(a.Sj,c,d,e);a.Zk=b}}f.dv=function(){for(var a=this.wk,b=Math.max(Math.floor(a/this.Nb),0),a=Math.min(Math.ceil((a+this.$d)/this.Nb),this.Uc.a[0].b-1);b<=a;b++){for(var c=this.Le,d=b,e=al(c.a,2*this.Nb),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,vl(g.g,k,{nn:k,on:h}))}zl(c)}};
364 function Fu(a,b){a.Fo=Math.min(10,Math.ceil(a.$d/72));a.Nb=Math.floor(a.$d/a.Fo);a.Ai=0.555*a.Nb;a.Xk=a.Nb*a.Uc.a[0].b;Bd(a.cc,a.Xk);var c=Math.round(2*a.Nb),d=0.555*c+12;Ad(a.Ph,c,d);pd(a.Ph,(a.$d-c)/2);a.ud.style.height=qd(d+20,!0);b&&(a.qo(0,a.Uc.a[0].b-1),Eu(a,a.Zk),a.b=!0)}f.H=function(){this.wg=this.Uj=this.Sj=this.Ph=this.cc=this.ud=this.Le=this.Uc=null;Du.C.H.call(this)};function Gu(a,b,c,d){this.width=b;this.a=c;this.i=d;this.b=b-c-d;this.g=wb(a-c,0,this.b);this.position=this.g+c;this.td=this.g/this.b};function Hu(){Y.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.F=0;this.k=this.template.a["ytp-progress-magnifier-play-progress"];this.B=0;this.b=[];this.g=this.template.a["ytp-progress-magnifier-scrubber-button"]}y(Hu,Y);
365 function Iu(a,b){var c=a.a,d=c.width-4,e=d-2*a.Oe;if(ga(b))var d=Ju(a).position,g=a.N().offsetWidth/2,d=wb(b,d-g,d+g);else d=2+c.td*d;return new Gu(d,c.width,2+c.td*e,2+(1-c.td)*e)}function Ju(a){var b=a.a;a=a.N().offsetWidth/2+2;return new Gu(b.position,b.width,a,a)}Hu.prototype.disable=function(){this.a=null};
366 function Ku(a,b){if(a.a){var c=a.N(),d=Ju(a),e=Iu(a),g=c.offsetWidth/2,h=d.position-g,d=d.position+g;c.style.left=h+"px";var k=a.F*e.b+e.a,m=a.B*e.b+e.a,p=a.g.offsetWidth,r=m-h-p/2;r>-p&&r<2*g+p?(a.g.style.left=r+"px",cn(a.g)):dn(a.g);m-=h;0<=m?(Bd(a.k,Math.min(m,2*g)),cn(a.k)):dn(a.k);k-=h;0<=k?(Bd(a.i,Math.min(k,2*g)),cn(a.i)):dn(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=
367 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())}}}Hu.prototype.Xa=function(a){this.Oe=a;Ku(this,!0)};Hu.prototype.H=function(){this.g=this.b=this.k=this.i=null;Hu.C.H.call(this)};function Lu(){}y(Lu,K);f=Lu.prototype;f.bi=!1;f.Oe=0;f.Fb=null;f.Dh=null;f.Wj=null;f.lj=null;f.Gg=null;f.bh=null;f.disable=function(){this.bi=!0};f.show=function(){this.bi||Hn(this.Fb)};f.hide=function(){In(this.Fb)};f.Xa=function(a){this.Oe=a};f.reset=function(){W(this.Fb,"with-thumbnail");this.bh=this.Gg=null};f.Nu=function(a,b){(a<=this.a||this.a<=b)&&Mu(this)};function Mu(a){var b=yl(a.bh,a.a,108);Cu(a.Wj,b,108,60)}f.H=function(){this.lj=this.Wj=this.Dh=this.Fb=this.bh=this.Gg=null;Lu.C.H.call(this)};function Nu(a){R.call(this);this.kb=a;this.va=null;this.J={};this.aa=Infinity;this.Y=this.V=this.L=null;this.ja=0;this.o=this.g=this.G=null;this.k=new Ko(this);this.Va="";this.Ra=null;this.ha=0;this.Ka=null;this.xa=0;this.a=this.b=this.jb=this.i=this.Q=this.da=null;this.za=new Ko(this);this.pa=null;this.Ca=new Ko(this);this.A=this.I=!1;this.O=this.P=this.ga=null;this.j=this.Sa=this.la=this.B=0;this.Ma=""}y(Nu,R);
368 function Ou(a,b){a.g=b;a.i=E("html5-progress-bar",a.g);a.k.listen(a.i,"click",a.Lh);Lo(a.k,a.i,"down",a.vv);a.Va=Lo(a.k,a.i,"over",a.bn);a.Q=E("html5-progress-list",a.i);a.Ka=E("html5-play-progress",a.Q);a.Ra=E("html5-load-progress",a.Q);a.da=E("html5-highlight",a.Q);a.va=E("html5-ad-progress-list",a.i);a.pa=E("html5-scrubber-button",a.i);a.V=E("html5-clip-exclusion",a.i);a.Y=a.V.cloneNode(!1);a.V.parentNode.appendChild(a.Y);a.G=E("html5-clip-start",a.i);Lo(a.k,a.G,"over",a.To);Lo(a.k,a.G,"out",a.So);
369 a.k.listen(a.G,"click",a.dl);a.L=E("html5-clip-end",a.i);Lo(a.k,a.L,"over",a.To);Lo(a.k,a.L,"out",a.So);a.k.listen(a.L,"click",a.dl);a.jb=E("html5-progress-screenreader",a.i)}f=Nu.prototype;
370 f.bn=function(a){if(!this.I){this.k.ac(this.Va);this.A=!1;this.P=this.ga=a=new A(sf(a),tf(a));if(this.a&&5400<=this.B){I(this.la);this.a.show();Hn(this.da);a=this.a;var b=Pu(this);a.a=b;Ku(a,!0);a=oa(V,this.g,"html5-progress-magnifier-hover");this.la=H(a,0)}this.b&&this.b.show();Lo(this.za,this.g,"move",this.jn);Lo(this.za,this.g,"out",this.Dt)}};function Qu(a){a.A=!1;I(a.la);W(a.g,"html5-progress-magnifier-hover");var b=hp(a.a.N());a.la=H(v(function(){this.a.hide();In(this.da)},a),b)}
371 f.Dt=function(a){this.I||a.relatedTarget&&!(this.b&&cd(this.b.Fb,a.relatedTarget)||!cd(this.g,a.relatedTarget))||Ru(this)};
372 f.jn=function(a){var b=new A(sf(a),tf(a));if(this.a&&this.a.a)if(this.I)this.A?this.O=b:this.P=b;else{var c=Ed(this.a.N());if(c.contains(b))this.O=b,this.A=!0;else{var d=Ed(this.Q),e=this.ga.y-tf(a);if(sf(a)>=c.left&&tf(a)>=c.top&&sf(a)<c.left+c.width||d.contains(b)){c=6*e-6;if(sf(a)>=this.ga.x-c&&sf(a)<=this.ga.x+c)return;this.A=!1;this.ga=this.P=b}else{Ru(this);return}}}else this.P=b;Su(this)};
373 function Su(a){if(a.a&&a.a.a){var b=Ed(a.a.N());if(a.I&&a.A){var c=b.left,b=c+b.width;a.j=c>a.O.x?a.O.x-c:b<a.O.x?a.O.x-b:0}c=a.a;b=Pu(a);c.a=b;Ku(c,!0);var d=a.a,c=Iu(d),b=Ju(d),d=d.N().offsetWidth,e=b.position-d/2,c=new Gu(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=Tu(a),c.bi||(b=c.Fb.offsetWidth/2,d=new Gu(a.position,a.width,b,b),c.Fb.style.left=d.position-
374 b+"px",b=c.Dh.offsetWidth/2,d=new Gu(a.position,a.width,b,b),c.Dh.style.left=d.position-c.Fb.offsetLeft-b+"px",dd(c.lj,Dn(a.td*c.Oe)),c.Gg&&(a=$k(c.Gg,a.td),a!=c.a&&(c.a=a,Mu(c)))))}f.Nw=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=ud(this.g).x;this.P.x=wb(this.P.x+a,b,b+Pu(this).width);Su(this);a=Tu(this);Uu(this,a.td,this.ha);this.u("seekto",a.td*this.B,!1)};
375 function Ru(a){a.za.removeAll();a.b&&a.b.hide();a.a&&a.a.a&&(a.a.disable(),Qu(a));a.Va=Lo(a.k,a.i,"over",a.bn)}f.vv=function(a){a.stopPropagation();a.preventDefault();this.b&&this.b.hide();this.a&&this.a.a&&Qu(this);Vu(this);this.Lh(a)};f.Zs=function(a){a.stopPropagation();a.preventDefault();this.A=!0;Vu(this);this.Lh(a)};function Vu(a){a.I=!0;a.u("beginseeking");Lo(a.Ca,document,"move",a.Lh);Lo(a.Ca,document,"up",a.Ow);a.A&&(a.Sa=hf(v(a.Nw,a),20))}
376 f.Ow=function(a){a.stopPropagation();this.I=!1;this.Ca.removeAll();jf(this.Sa);Ru(this);this.u("endseeking")};f.Lh=function(a){a.stopPropagation();a.preventDefault();this.jn(a);a=this.A?Tu(this):Pu(this);var b=a.td*this.B;Uu(this,a.td,this.ha);(b<this.ja||b>this.aa)&&this.dl();this.u("seekto",b,!this.I)};function Tu(a){return a.a&&a.a.a?a.A?Iu(a.a,a.O.x-ud(a.g).x):Iu(a.a):Pu(a)}function Pu(a){return new Gu(a.P.x-ud(a.g).x,a.Q.clientWidth,a.pa.clientWidth/2,a.pa.clientWidth/2)}
377 function Wu(a,b,c){Uu(a,q(b)&&!a.I?b:a.xa,q(c)?c:a.ha)}function Uu(a,b,c){a.xa=b;var d=Math.round(1E3*b)/10,e;if(!a.Ma&&(e=a.Ka,a.Ma="transform",void 0===e.style.transform)){var g=(gc?"Webkit":fc?"Moz":C?"ms":ec?"O":null)+"Transform";void 0!==e.style[g]&&(a.Ma=g)}e=a.Ma;a.Ka.style[e]="scalex("+b+")";a.pa.style.left=d+"%";a.ha=Math.max(a.xa,c);a.Ra.style[e]="scalex("+a.ha+")";a.a&&(a=a.a,a.B=b,a.F=c,Ku(a,!1))}f.Xa=function(a){this.B=a;Xu(this);this.a&&this.a.Xa(a)};
378 function Xu(a){var b=0<a.ja,c=0<a.B&&a.aa<a.B;X(a.G,"html5-clip-enabled",b);X(a.V,"html5-clip-enabled",b);X(a.L,"html5-clip-enabled",c);X(a.Y,"html5-clip-enabled",c);b&&(a.G.style.left=100*a.ja/a.B+"%",a.V.style.width=a.G.style.left);c&&(b=Math.min(100,100*a.aa/a.B),a.L.style.left=b+"%",a.Y.style.left=b+"%",a.Y.style.width=100-b+"%")}f.To=function(){V(this.g,"html5-clip-marker-hover")};f.So=function(){W(this.g,"html5-clip-marker-hover")};
379 f.dl=function(a){a&&a.stopPropagation();this.ja=0;Xu(this);this.aa=Infinity;Xu(this)};function Yu(a,b){b=wb(Math.round(100*b),0,100);if(!a.J[b]){var c=document.createElement("div");100<=b?(c.style.left="auto",c.style.right="0%"):c.style.left=b+"%";Em(c,["html5-ad-progress","html5-progress-section"]);a.va.appendChild(c);a.J[b]=c}}function Zu(a,b){b=wb(Math.round(100*b),0,100);a.J[b]&&(F(a.J[b]),a.J[b]=null)}
380 f.H=function(){I(this.la);jf(this.Sa);this.k.removeAll();this.za.removeAll();this.Ca.removeAll();this.va=null;this.J={};this.pa=this.jb=this.Q=this.i=this.Ka=this.Ra=this.g=this.G=this.Y=this.V=this.L=null;Nu.C.H.call(this)};function $u(a,b,c){Y.call(this,["div","ytp-drop-down","{{content}}"]);this.F=a;this.g=!1;this.k=0;this.a=new Y(["div","ytp-drop-down-menu","{{content}}"]);L(this,this.a);this.b=new un(this.F,"ytp-drop-down-label");L(this,this.b);this.listen(this.b,"click",this.B);this.i=new Y(["div","ytp-drop-down-label-content","{{content}}"]);L(this,this.i);this.b.Aa([this.i,["div","ytp-drop-down-arrow"]]);this.Aa([this.a,this.b]);this.stopPropagation("click");q(b)&&this.Hb(b);q(c)&&(this.a.Aa(c),av(this));av(this)}
381 y($u,Y);$u.prototype.Hb=function(a){this.i.Aa(a);av(this)};$u.prototype.o=function(){this.g=!1;av(this)};$u.prototype.B=function(){this.g=!this.g;av(this)};function bv(a,b){b>a.k&&(a.k=b,a.element.style.minWidth=a.k+"px")}function av(a){a.g?(a.a.show(),a.listen(window,"blur",a.o,a,"menu"),a.listen(document,"click",a.o,a,"menu")):(a.a.hide(),fn(a,"menu"));var b=Cd(a.b.N());a.a.N().style.bottom=b.height-1+"px";bv(a,b.width)}$u.prototype.H=function(){this.F=null;$u.C.H.call(this)};function cv(a){un.call(this,a,"ytp-drop-down-menu-button");this.i=new Y(["div","ytp-drop-down-menu-button-check"]);L(this,this.i)}y(cv,un);cv.prototype.Aa=function(a){cv.C.Aa.call(this,[this.i,a])};cv.prototype.Za=function(a){X(this.element,"ytp-drop-down-menu-button-selected",a)};function dv(a){Y.call(this,["span"]);this.element.innerHTML=a}y(dv,Y);function ev(a){ss.call(this);this.g=a;this.j={};this.a=[];this.k=new Y(["div","ytp-menu-drop-down-content"]);L(this,this.k);this.b="auto";this.i=!0;this.label=this.g.getMsg("YTP_QUALITY_TITLE");this.element=new $u(a,void 0,this.k);L(this,this.element);bv(this.element,100);fv(this,this.b,this.b);this.priority=-1}y(ev,ss);function gv(a,b){if(!jb(a.a,b)){for(var c=0;c<a.a.length;c++)hv(a,a.a[c]).ve();a.a=[];z(b,function(a){this.a.push(a);var b=hv(this,a);b.Za(a==this.b);b.W(this.k.N())},a)}}
382 function hv(a,b){var c=a.j[b];if(c)return c;c=new cv(a.g);L(a,c);a.j[b]=c;c.Aa(new dv(iv(a,b)));c.listen(c.N(),"click",v(a.o,a,b));return c}ev.prototype.Re=function(){return this.b};function fv(a,b,c){hv(a,a.b).Za(!1);hv(a,b).Za(!0);a.b=b;a.i="auto"==c;a.i&&c!=b?a.element.Hb(jv(a,b)):a.element.Hb(new dv(iv(a,c)))}function iv(a,b){return a.g.getMsg("YTP_QUALITY_"+b.toUpperCase())}function jv(a,b){var c=a.g.getMsg("YTP_QUALITY_AUTO_WITH_QUALITY",{video_quality:iv(a,b)});return new dv(c)}
383 ev.prototype.o=function(a){this.element.o();this.i&&"auto"==a||(fv(this,a,a),Ef(this.element,"change"))};ev.prototype.H=function(){this.j={};this.a=[];this.g=null;ev.C.H.call(this)};function kv(a){xt.call(this,a,"ytp-settings-button",a.getMsg("YTP_TOOLTIP_SETTINGS"),"ytp-settings-button-active");xn(this,10);this.i=new Y(["div","ytp-settings-hd-quality-badge"]);L(this,this.i);this.Aa(this.i);this.i.hide()}y(kv,xt);function lv(a){ss.call(this);this.label=a.getMsg("YTP_PLAYER_SIZE_TITLE");this.element=new ts(a,["ytp-size-control-small","ytp-size-control-large"],!0);L(this,this.element);this.priority=0}y(lv,ss);lv.prototype.getSelected=function(){return this.element.getSelected()};lv.prototype.Za=function(a){this.element.Za(a)};function mv(a){ss.call(this);this.b=a;this.i={};this.a=[];this.g=1;this.j=new Y(["div","ytp-menu-drop-down-content"]);L(this,this.j);this.label=this.b.getMsg("YTP_PLAYER_SPEED_TITLE");this.element=new $u(a,void 0,this.j);L(this,this.element);bv(this.element,100);this.priority=1}y(mv,ss);function nv(a,b){if(!jb(a.a,b)){for(var c=0;c<a.a.length;c++)ov(a,a.a[c]).ve();a.a=[];z(b,function(a){this.a.push(a);var b=ov(this,a);b.Za(a==this.g);b.W(this.j.N())},a)}}
384 function ov(a,b){var c=a.i[b];if(c)return c;c=new cv(a.b);L(a,c);a.i[b]=c;c.Aa(pv(a,b));c.listen(c.N(),"click",v(a.k,a,b));return c}function qv(a,b){ov(a,a.g).Za(!1);ov(a,b).Za(!0);a.g=b;a.element.Hb(pv(a,b))}function pv(a,b){return 1==b?a.b.getMsg("YTP_PLAYER_SPEED_NORMAL"):b.toString()}mv.prototype.k=function(a){this.element.o();qv(this,a);Ef(this.element,"change")};mv.prototype.H=function(){this.i={};this.a=[];this.b=null;mv.C.H.call(this)};function rv(){Y.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(rv,Y);rv.prototype.Xa=function(a){bn(this.template,"duration",Dn(a))};rv.prototype.H=function(){this.a=null;rv.C.H.call(this)};function sv(a){R.call(this);this.j=a;this.a=new Ko(this);this.O=new Ko(this);this.B=null;this.A={};this.G={};this.J=this.I=this.i=this.g=this.b=null;this.L=new Ko(this)}y(sv,R);f=sv.prototype;f.mf=null;f.wc=null;f.Ee=null;f.oj=null;f.Sd=null;f.sc=null;f.kf=null;f.Wb=null;f.jg=null;f.Pd=null;f.se=null;f.Ah=null;f.nd=null;f.lf=null;f.te=null;f.tn=!1;f.ig=null;f.ub=null;
385 function tv(a,b){a.mf=b;var c=E("html5-player-chrome",b);a.wc=new zu(a.j);a.wc.W(c,0);L(a,a.wc);new mu(a.wc.N(),v(a.Nt,a),!1,function(){return!0});a.Ee=new Bu(a.j);a.Ee.W(c,1);L(a,a.Ee);a.a.listen(a.Ee.a,"click",oa(a.u,"nextvideo"));a.a.listen(a.Ee.b,"click",oa(a.u,"previousvideo"));var d=E("html5-progress-bar-container",b);a.oj=new Nu(a.j);Ou(a.oj,d);a.k=new rv;a.k.W(c,4);L(a,a.k);a.a.listen(a.k.a,"click",oa(a.u,"seekto",Infinity));a.Sd=E("html5-volume-control",b);a.a.listen(a.Sd,"keydown",a.Ot);
386 a.sc=E("html5-volume-button",a.Sd);a.a.listen(a.sc,"click",a.wn);a.kf=E("html5-volume-panel",a.Sd);a.Wb=E("html5-volume-slider",a.Sd);Lo(a.a,a.Wb,"down",a.Kt);a.jg=E("html5-volume-slider-foreground",a.Sd);a.Ah=E("html5-threed-popup-menu",b);a.se=E("html5-small-player-button",b);a.a.listen(a.se,"click",a.vn);a.Pd=E("html5-large-player-button",b);a.a.listen(a.Pd,"click",a.vn);a.o=new vu(a.j);a.o.W(c,7);L(a,a.o);a.a.listen(a.o,"click",a.Jt);a.nd=E("html5-quality-button",b);a.te=E("html5-quality-popup-menu",
387 a.nd);Mo(a.a,a.te,a.Ht);a.lf=E("html5-speed-popup-menu",a.nd);Mo(a.a,a.lf,a.It);a.ub=E("html5-watch-later-button",b);a.a.listen(a.ub,"click",a.Lt);a.ub&&$t(a.j,a.ub,a.j.getMsg("YTP_TOOLTIP_WATCH_LATER"),!0);a.ig=E("html5-watch-on-youtube-button",b);a.a.listen(a.ig,"click",a.Mt)}f.disable=function(a){uv(this,a,!0)};f.enable=function(a){uv(this,a,!1)};
388 function uv(a,b,c){for(var d=0;d<b.length;d++)switch(b[d]){case "audio":X(a.mf,"disabled-control-audio",c);break;case "play_pause":var e=a.wc;c?e.disable():e.enable();break;case "seek":X(a.mf,"disabled-control-seek",c)}}function vv(a,b){if(a.b)gv(a.b,b),b.length?wv(a,a.b):xv(a,a.b);else{var c=Nc("yt-uix-button-menu-item",a.te);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);c=!!b.length;Fn(a.te,c);Fn(a.nd,c)}}
389 f.Ot=function(a){var b=a.keyCode;if(32==b||13==b)this.wn(),a.preventDefault()};f.Xa=function(a){this.k.Xa(a)};function yv(a,b,c){a.b?(fv(a.b,b,c),c=a.B,0==b.indexOf("hd")||"highres"==b?c.i.show():c.i.hide()):a.te&&(a=a.te,zv(a,"active",b),zv(a,"selected",c||b))}function zv(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.wn=function(){this.u("mutetoggled")};
390 function Av(a,b){if(b){if(a.tn){var c=a.wc;wn(c,"ytp-button-stop");var d=c.g.getMsg("YTP_BUTTON_STOP")}else c=a.wc,wn(c,"ytp-button-pause"),d=c.g.getMsg("YTP_BUTTON_PAUSE");c.Hb(d);c.a=d}else Au(a.wc)}f.Nt=function(){this.u("playpausetoggled")};f.Kt=function(a){this.u("beginvolume");V(this.sc,"changing");var b=this.Wb.clientWidth;a=100*(wd(a,this.Wb).x/b);Bv(this,a);Lo(this.O,document,"move",this.Zw);Lo(this.O,document,"up",this.$w)};
391 f.Zw=function(a){var b=this.Wb.clientWidth,b=100*(wd(a,this.Wb).x/b);Bv(this,b);a.preventDefault()};function Bv(a,b){var c={volume:wb(b,0,100),muted:!1};a.u("volumechanged",c)}f.$w=function(){W(this.sc,"changing");this.O.removeAll();this.u("endvolume")};f.vn=function(a){this.u("sizechangerequested",a.currentTarget==this.Pd)};f.Ht=function(a){a=G(a.currentTarget,"value");this.u("qualitychanged",a)};f.Jt=function(){this.u("fullscreentoggled")};
392 function Cv(a,b){if(a.i)qv(a.i,parseFloat(b));else if(a.lf){var c=a.lf;zv(c,"active",b);zv(c,"selected",b)}}function wv(a,b){var c=a.G.__default__;c&&c.add(b)}function xv(a,b){var c=a.G.__default__;c&&c.remove(b)}function Dv(a,b,c,d){a.A[b]||(a.A[b]=c,d=d||a.B.N(),d.parentNode&&d.parentNode.insertBefore(c.N(),d.nextSibling),c.listen(c,"click",oa(a.Mw,b),a,"menuButtonClick"),c=new xu,L(a,c),c.hide(),c.W(a.mf),a.G[b]=c)}
393 f.It=function(a){a=G(a.currentTarget,"value");this.u("speedchanged",parseFloat(a));Cv(this,a)};f.Lt=function(){Dm(this.ub,"html5-async-progress")||(lu(this.ub,"html5-async-progress"),this.u("watchlater"))};f.Mt=function(){this.u("watchonyoutube")};f.yg=function(){this.L.removeAll();this.I&&(this.I.hide(),this.I=null);this.J&&(Bt(this.J),this.J=null)};
394 f.Mw=function(a,b){b.stopPropagation();var c=this.A[a];if(c)if(c.b)this.yg();else{var d=this.G[a];this.yg();this.I=d;this.I.show();c&&(this.J=c,At(this.J));this.L.listen(window,"blur",this.yg);this.L.listen(document,"click",this.yg)}};f.er=function(){this.u("qualitychanged",this.b.Re())};f.gr=function(){this.u("sizechangerequested",1==this.g.getSelected())};f.hr=function(){this.u("speedchanged",this.i.g)};
395 f.dr=function(a){var b=a.target,c="unknown",c=b==this.wc.N()?"playpause":b==this.sc||b==this.kf||b==this.Wb||b==this.Sd||b==this.jg?"volume":b==this.k?"time":b==this.nd?"settings":b==this.B?"settings-redesign":b==this.ub?"watchlater":b==this.ig?"youtube":b==this.o.N()?"fullscreen":b==this.se||b==this.Pd?"size":a.target;this.u("controlclick",c)};
396 f.H=function(){this.a.removeAll();this.O.removeAll();this.L.removeAll();this.yg();this.ub=this.ig=this.nd=this.Ah=this.te=this.lf=this.se=this.Pd=this.jg=this.Wb=this.kf=this.sc=this.Sd=this.mf=null;for(var a in this.A){var b=this.A[a];b.ve();fn(b,"menuButtonClick")}this.A={};this.G={};this.B=this.i=this.g=this.b=null;sv.C.H.call(this)};var Ev=["left","right","center"],Fv={id:0,priority:0,anchorPoint:7,ci:50,ny:80,de:95,zd:15,mk:100,isVisible:!0,textAlign:Ev[2],Ke:0,backgroundColor:"#080808",ai:"#fff",fy:1,Al:1},Gv={id:99,priority:1,anchorPoint:0,ci:5,de:7,zd:2,mk:32,textAlign:Ev[0]},Hv=["CA","MX","US"];function Iv(a){a=a||Fv;w(this,a)}f=Iv.prototype;f.anchorPoint=7;f.ci=50;f.de=95;f.ny=80;f.Ke=0;f.textAlign="center";f.backgroundColor="#080808";f.ai="#fff";f.fy=1;f.Al=1;f.zd=15;f.mk=32;f.isVisible=!0;f.fontFamily='"Arial Unicode Ms", Arial';f.ix="100%";function Jv(a,b){this.id=a;this.ta=new Iv(b);var c="caption-window";0==this.id&&(c="standard-caption-window");this.oa=Uc("div",{id:"caption-window-"+this.id,"class":c});this.Bb=Uc("span",{"class":"captions-text",style:"visibility: hidden"});this.Bb.innerHTML="C";this.ma=Uc("span",{"class":"captions-text",tabindex:"4","aria-live":"assertive"});this.Ri=Uc("div",{"class":"caption-window-transform"});this.Ri.appendChild(this.ma);this.oa.appendChild(this.Ri)}f=Jv.prototype;f.id=0;f.ta=null;f.$g="";
397 f.Gc=null;f.oa=null;f.Ri=null;f.ma=null;f.Bb=null;f.type=1;f.getType=function(){return this.type};f.Mi=function(){var a;this.Bb.style.fontFamily=this.ma.style.fontFamily;this.oa.appendChild(this.Bb);a=this.Bb.offsetHeight;this.oa.removeChild(this.Bb);return a};f.Pf=function(){this.ma&&(0!=this.id&&(Bd(this.oa,"100%"),Bd(this.oa,this.ma.offsetWidth)),Kv(this),Fn(this.oa,this.ta.isVisible))};
398 function Kv(a){pd(a.oa,a.ta.ci+"%",a.ta.de+"%");for(var b=0;8>=b;b++)W(a.oa,"anchor-point-"+b);V(a.oa,"anchor-point-"+a.ta.anchorPoint)}f.Lo=function(a){var b=[];z(a,function(a){a.Qi?b[b.length-1]+=a.ce:b.push(a.ce)});this.Te(b.join("\n"));this.Gc=a};f.Te=function(a){this.$g=a=Lv(a);this.ma.innerHTML=this.$g;this.Bl();this.Pf()};
399 f.Bl=function(){this.oa.style.textAlign=this.ta.textAlign;this.ma.style.backgroundColor=this.ta.backgroundColor;this.ma.style.color=this.ta.ai;this.ma.style.opacity=this.ta.Al;this.ma.style.fontFamily=this.ta.fontFamily;this.ma.style.fontSize=this.ta.ix;1==this.ta.Ke?this.ma.setAttribute("dir","rtl"):this.ma.removeAttribute("dir")};f.toString=function(){var a="Caption window ("+this.id+"): "+this.$g,b;for(b in this.ta)a+=b+" "+this.ta[b]+" | ";return a};
400 function Lv(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.Ti=function(){this.Gc=[];this.Te("")};function Mv(a,b){Jv.call(this,a,b);this.ma.style.display="block";this.ma.style.padding="0";this.Qb=[];var c=this.ma;W(c,"captions-text");V(c,"caption-painton-text-rows")}y(Mv,Jv);f=Mv.prototype;f.type=0;f.Vn="";f.Zg=!1;f.yb=null;f.Qb=null;f.Mi=function(){return this.Qb[0]?this.Qb[0].offsetHeight:0};function Nv(a){return a.Qb.reduce(function(a,c){return Math.max(a,c.offsetWidth)},0)}
401 f.Pf=function(){0!=this.id&&(Bd(this.oa,"100%"),Bd(this.oa,this.Zg?Nv(this):this.yb.width));var a=Math.round(this.ta.zd*this.Mi());this.oa.style.maxHeight=a+"px";Kv(this);Fn(this.oa,this.ta.isVisible)};
402 f.Te=function(a){this.Ti();a=Lv(a);this.Zg||(this.$g=a);a=a.split("<br>");for(var b=0,c=a.length;b<c;b++)if(a[b]){var d=Uc("div",{"class":"caption-row-holder"}),e=Uc("span",{"class":"caption-row captions-text"});d.appendChild(e);e.innerHTML=a[b];this.Zg||(this.ma.style.height=this.yb.height+"px",this.ma.style.width=this.yb.width+"px",d.style.position="absolute",d.style.top=this.yb.Un[b]+"px",d.style.left=this.yb.Tn[b]+"px");this.ma.appendChild(d);this.Qb.push(e)}this.Bl();this.Pf()};
403 f.Ti=function(){for(var a=0,b=this.Qb.length;a<b;a++){var c=jd(this.Qb[a],"caption-row-holder");F(c)}this.Qb=[]};f.Bl=function(){this.oa.style.textAlign=this.ta.textAlign;for(var a=0,b=this.Qb.length;a<b;a++)this.Qb[a].style.backgroundColor=this.ta.backgroundColor;this.ma.style.color=this.ta.ai;this.ma.style.opacity=this.ta.Al;this.ma.style.fontFamily=this.ta.fontFamily;1==this.ta.Ke?this.ma.setAttribute("dir","rtl"):this.ma.removeAttribute("dir")};function Ov(a,b){Jv.call(this,a,b);this.Gc=[];this.je=[];this.Ab=[];this.Qf=new Fi(433);this.Qf.stop();J(this.Qf,"tick",v(this.nx,this))}y(Ov,Jv);f=Ov.prototype;f.type=2;f.kx=32;f.Ab=null;f.ke=0;f.je=null;f.Qf=null;f.Pf=function(){Bd(this.oa,"100%");var a=this.oa.offsetWidth,a=Math.min(Pv(this),a);Bd(this.oa,a+"px");Bd(this.Ri,"100%");this.ma.style.whiteSpace="nowrap";Kv(this);Fn(this.oa,this.ta.isVisible)};
404 f.Lo=function(a){var b=a.length;if(0>=b)this.Ti();else{for(var c=0;c<b&&0<=this.Gc.indexOf(a[c]);)c++;this.Gc=this.Gc.concat(a.slice(c));Qv(this)}};f.Ti=function(){this.Gc=[];this.Ab=[];this.ke=0;this.Ab=[];this.je=[];Rv(this)};
405 function Qv(a){if(!Sv(a))if(a.ke>=a.Gc.length)Rv(a);else{var b=a.Ab.length-1;0>b&&(a.je.push(0),a.ke=0,a.Ab.push(""),b=0);for(var c=a.Gc.length,d=a.ke;d<c;d++){var e=a.Gc[d];if("\n"==e.ce){a.ke++;a.je[b]++;break}if(e.Qi||0==a.Ab[b].length)a.Ab[b]+=e.ce,a.ke++,a.je[b]++;else break}Rv(a);d<c&&!Sv(a)&&(b=a.Mi(),V(a.ma,"caption-rollup"),a.oa.style.overflow="hidden",a.ma.style.top=-b+"px",a.Qf.start())}}function Sv(a){return a.Qf.Tc||Dm(a.ma,"caption-rollup")}
406 f.nx=function(){this.oa.style.overflow="visible";this.ma.style.top=0;this.Qf.stop();W(this.ma,"caption-rollup");this.Ab.push("");this.je.push(0);Qv(this)};function Rv(a){if(!Sv(a)){for(;a.Ab.length<a.ta.zd;)a.Ab.unshift(""),a.je.unshift(0);for(;a.Ab.length>a.ta.zd;){a.Ab.shift();var b=a.je.shift();0<b&&(a.ke-=b,a.Gc.splice(0,b))}a.Te(a.Ab.join("\n"))}}
407 function Pv(a){a.Bb.style.fontFamily=a.ma.style.fontFamily;a.Bb.style.fontSize=a.ma.style.fontSize;a.ma.appendChild(a.Bb);a.Bb.innerHTML="\u2014";var b=a.Bb.offsetWidth;a.Bb.innerHTML="&nbsp;";b=2*a.Bb.offsetWidth+b*a.kx;a.ma.removeChild(a.Bb);return b};function Tv(a){this.a=a.lk;this.i=a.priority;this.Dc=a.Dc||this.Dc}Tv.prototype.a=0;Tv.prototype.i=0;Tv.prototype.Dc=0;Tv.prototype.toString=function(){return this.a+", "+this.Dc};function Uv(a){Tv.call(this,a);this.ce=a.text||this.ce;this.Wh=a.windowId||this.Wh;this.Qi=a.params.append||this.Qi;this.Fp=a.params.row||this.Fp;this.Ep=a.params.mx||this.Ep}y(Uv,Tv);f=Uv.prototype;f.ce="";f.Qi=!1;f.Fp=0;f.Ep=0;f.Wh=0;f.toString=function(){return this.a+", "+this.Dc+": "+this.ce};
408 function Vv(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={lk:c,Dc:d,text:b,windowId:e,priority:5,params:{}};a.getAttribute("r")&&(b.params.row=parseInt(a.getAttribute("r"),10));a.getAttribute("c")&&(b.params.mx=parseInt(a.getAttribute("c"),10));
409 a.getAttribute("append")&&(b.priority=6,b.params.append=!0);return new Uv(b)}function Wv(a){Tv.call(this,a);this.id=a.windowId||this.id;this.params=a.params}y(Wv,Tv);Wv.prototype.id=0;Wv.prototype.params=null;Wv.prototype.g="";Wv.prototype.b=!1;function Xv(){return new Wv({lk:-2147483648,Dc:4294967295,params:Fv})};function Yv(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 Zv(a){this.b=[];this.g=[];this.a={};if(a&&(a=Yv(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.Dc>=g?h.Dc=g:h=null);switch(d.getAttribute("op")){case "kill":g=
410 null;break t;case "define":h=null}h?h.j=!0:h=Xv();var k={};w(k,h?h.params:Fv);d.getAttribute("id")&&(k.id=d.getAttribute("id"));d.getAttribute("op")&&(k.py=d.getAttribute("op"));d.getAttribute("rc")&&(k.zd=parseInt(d.getAttribute("rc"),10));d.getAttribute("cc")&&(k.mk=parseInt(d.getAttribute("cc"),10));d.getAttribute("ap")&&(h=parseInt(d.getAttribute("ap"),10),k.anchorPoint=0>h||8<h?7:h);d.getAttribute("ah")&&(k.ci=parseInt(d.getAttribute("ah"),10));d.getAttribute("av")&&(k.de=parseInt(d.getAttribute("av"),
411 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=Ev[parseInt(d.getAttribute("ju"),10)]);d.getAttribute("pd")&&(k.Ke=1,0==parseInt(d.getAttribute("pd"),10)&&(k.Ke=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.ai=parseInt(d.getAttribute("fc"),16));d.getAttribute("sd")&&
412 (k.ek=parseInt(d.getAttribute("sd"),10));h=parseInt(d.getAttribute("d"),10)||1E3*parseFloat(d.getAttribute("dur"))||2147483647;d={lk:g,Dc:h,params:k,windowId:parseInt(d.getAttribute("id"),10)};g=new Wv(d)}else g=null}this.a[e]=g;this.g.push(g);break;case "text":e=Vv(a[b]),this.b.push(e),d=e.Wh,this.a[d]&&(d=this.a[d],e=e.ce,""!=d.g&&(d.b=!0),d.g+=e)}break;default:for(this.g.push(Xv()),a=this.i.firstChild.childNodes,b=0,c=a.length;b<c;b++)e=Vv(a[b]),this.b.push(e)}}Zv.prototype.b=null;
413 Zv.prototype.g=null;Zv.prototype.a=null;function $v(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 aw(a){a=a||{};this.Ak=a.format;this.b=a.languageCode||"";this.Wg=a.languageName;this.Lb=a.kind||"";this.gc=a.name;this.Ba=a.id;this.vk=a.is_servable;this.hi=a.is_default;this.ii=a.is_translateable;a.translationLanguage&&(this.a=new $v(a.translationLanguage))}
414 function bw(a){var b={format:a.Ak,languageCode:a.b,languageName:a.Wg,displayName:cw(a),kind:a.Lb,name:a.gc,id:a.Ba,is_servable:a.vk,is_default:a.hi,is_translateable:a.ii};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=aw.prototype;f.Wg=null;f.Lb=null;f.gc=null;f.Ba=null;f.vk=!1;f.hi=!1;f.ii=!1;f.Ak=1;
415 function cw(a){var b=[a.Wg];if("asr"==a.Lb){var c=mf("HTML5_SUBS_ASR");b.push(" (",c,")")}a.gc&&b.push(" - ",a.gc);a.a&&b.push(" >> ",a.a.b);return b.join("")}f.toString=function(){var a=[this.b,": ",this.gc," (",this.Lb,")"];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.gc==a.gc&&this.Lb==a.Lb};function dw(){this.g=[];this.a=[]}dw.prototype.g=null;dw.prototype.a=null;dw.prototype.b=-1;function ew(a,b){return b?a.a.concat(a.g):a.a}function fw(a,b){switch(b.Lb){case "asr":return gw(b,a.g);default:if(b.hi||0>a.b)a.b=a.a.length;return gw(b,a.a)}}function gw(a,b){return Pa(b,v(a.equals,a))?!1:(b.push(a),!0)};function hw(a,b,c,d){this.Jd=a;c?this.Jd=Kj(this.Jd,{hl:c}):(a=Gj(this.Jd).hl||"",a=a.split("_").join("-"),this.Jd=Kj(this.Jd,{hl:a}));this.Di=b;this.Bp=!!d;this.Hd=new dw;this.qi=[];this.Cp={}}f=hw.prototype;f.Jd="";f.Di=null;f.Bp=!1;f.Hd=null;f.qi=null;f.Cp=null;function iw(a,b){return Pa(ew(a.Hd,!0),function(a){return a.toString()==b})}function jw(a,b){var c=a.Jd,d={v:a.Di,type:"track",lang:b.b,name:b.gc,kind:b.Lb,fmt:b.Ak};b.a&&(d.tlang=b.a.a);return c=Kj(c,d)}
416 function kw(a,b,c){var d=jw(a,b);a=v(function(a){a=new Zv(a.responseText);c(a,b)},a);Nj(d,a)}function lw(a){var b=a.Hd.b;a=ew(a.Hd,!0);return 0>b?null:a[b]}
417 function mw(a,b){var c=a.Jd,d={type:"list",tlangs:1,v:a.Di,fmts:Number(!0)};a.Bp&&(d.asrs=1);c=Kj(c,d);d=v(function(a){if((a=a.responseXML)&&a.firstChild){for(var c=this.Hd,d=a.getElementsByTagName("track"),k=d.length,m=0;m<k;m++){var p=parseInt(d[m].getAttribute("formats"),10)||1,r=d[m].getAttribute("lang_code"),s=d[m].getAttribute("lang_translated"),D=d[m].getAttribute("name"),O=d[m].getAttribute("kind")||"",ta=d[m].getAttribute("id"),$="true"==d[m].getAttribute("lang_default"),xE="true"==d[m].getAttribute("cantran");
418 fw(c,new aw({format:p,languageCode:r,languageName:s,name:D,kind:O,id:ta,is_servable:!0,is_default:$,is_translateable:xE}))}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"),r=a[d].getAttribute("id"),s="true"==a[d].getAttribute("lang_default"),k={languageCode:k,languageName:m,languageOriginal:p,id:r,is_default:s},this.Cp[k.languageCode]=k.languageName,this.qi.push(new $v(k))}b()},
419 a);Nj(c,d)};function nw(a){Im.call(this,a);var b=Q(a);this.Dd=a.K();this.On=a.app.R;this.he=[];this.Ia={};this.be={};this.Me=[];this.i=E("captions-translation-select",b);this.wl=E("captions-translation-dialog",b);this.ul=E("captions-settings-dialog",b);this.Xc=E("html5-captions-button",b);J(this.Xc,"click",v(this.Xv,this));J(E("captions-translation-confirm",b),"click",v(this.ew,this));J(E("captions-translation-cancel",b),"click",v(this.Pn,this));Af(E("captions-settings-background-opacity",b),v(this.Vv,this),
420 "INPUT");Af(E("captions-settings-text-opacity",b),v(this.dw,this),"INPUT");Af(E("captions-settings-window-opacity",b),v(this.fw,this),"INPUT");Af(E("captions-settings-char-edge-style",b),v(this.Yv,this),"SELECT");J(E("captions-settings-font-family",b),"change",v(this.bw,this));J(E("captions-settings-font-inc",b),"click",v(this.hp,this));J(E("captions-settings-font-dec",b),"click",v(this.gp,this));J(E("captions-settings-confirm",b),"click",v(this.Uv,this));J(E("captions-settings-cancel",b),"click",
421 v(this.cw,this));a=E("captions-settings-dialog",b);Cf(a,v(this.Zv,this),"html5-color-picker-button");this.Xc&&(this.ed=E("html5-captions-tracks",this.Xc),this.yf=Mp(Ap.getInstance(),this.Xc),a=E("html5-captions-track-template",this.yf),this.fp=new Xs(a,["track_id","track_display_name"]),Cf(this.yf,v(this.Wv,this),"yt-uix-button-menu-item"));this.Lf=new Fi;this.Lf.stop();J(this.Lf,"tick",v(this.Yk,this));this.D("onResize",v(this.Fn,this));this.D("onBackgroundChange",v(this.hw,this));this.D("onTextOpacityChange",
422 v(this.iw,this));this.D("onWindowOpacityChange",v(this.jw,this));this.D("onFontSizeIncrease",v(this.hp,this));this.D("onFontSizeDecrease",v(this.gp,this));this.D("onShowControls",v(this.aw,this));this.D("onHideControls",v(this.$v,this));"detailpage"==this.Dd.Z&&(b=E("captions-account-settings-link",b))&&Hn(b);this.ji=new Jv(99,Gv);this.Xg=new Fi(2E3);this.Xg.stop();J(this.Xg,"tick",v(this.gw,this))}y(nw,Im);f=nw.prototype;f.qa="captions";f.ad="cc";f.nl="subtitlesModuleData";f.ti=!1;f.Kk=!1;f.Zc=null;
423 f.Dd=null;f.On=null;f.Xc=null;f.yf=null;f.fp=null;f.wl=null;f.ul=null;f.ed=null;f.Me=null;f.he=null;f.Ia=null;f.be=null;f.Lf=null;f.ji=null;f.Xg=null;f.Ob=null;f.oi=!1;f.Mo=1;var ow={background:"#080808",backgroundOpacity:1,charEdgeStyle:"uniform",color:"#fff",fontFamily:'"Arial Unicode Ms", Arial',fontFamilyOption:"propSans",fontSizeIncrement:0,textOpacity:1,windowColor:"#080808",windowOpacity:0};f=nw.prototype;f.fc=null;f.Hn=!1;
424 f.create=function(){nw.C.create.call(this);this.Zc=this.a.getVideoData();var a=this.a.K().Q;-1==Hv.indexOf(a)&&V(Q(this.a),"cc-international");this.b=Ob(ow);w(this.b,Pm(this,"display-settings"));1==this.Dd.a.cc_load_policy||1==this.Zc.Bm||"alwayson"==mm(this.Zc,"yt:cc")?a=!0:(a=Pm(this,"module-enabled"),a=null!=a?!!a:"on"==mm(this.Zc,"yt:cc")||this.Dd.a.cc_prefer_on);a&&this.load()};f.destroy=function(){this.unload();nw.C.destroy.call(this)};
425 f.load=function(){if(this.ti)this.ba&&(nw.C.load.call(this),this.oi="alwayson"==mm(this.Zc,"yt:cc"),this.yf&&X(this.yf,"captions-always-on",this.oi),Qm(this,"module-enabled",!0),this.ti=!1,pw(this),this.Fn());else{this.ti=!0;this.ba=!1;var a=this.Zc.b.cc_lang_pref||this.Dd.a.cc_lang_pref||mm(this.Zc,"yt:cc_default_lang")||this.Dd.i,a=a&&a.split("_").join("-");this.Ob=new hw(this.Zc.di,this.Zc.M,a,this.Zc.ok);a=v(this.$n,this);mw(this.Ob,a)}};
426 f.unload=function(){this.Ac&&(qw(this,!1),this.vo("control_subtitles_set_track"));rw(this);Nm(this);Qm(this,"module-enabled",!1);this.ti=!1;this.ba&&(this.ba=!1,nw.C.unload.call(this))};f.log_=function(){};function sw(a,b){a.i&&($c(a.i),z(b,function(a){var b=Xc("option");b.setAttribute("value",a.a);b.appendChild(Yc(a.b+" -- "+a.g));this.i.appendChild(b)},a))}
427 f.$n=function(){this.ed&&$c(this.ed);sw(this,this.Ob.qi);var a=ew(this.Ob.Hd,!0);if(0<a.length){this.log_("Caption track list loaded, found "+a.length+" tracks.");z(a,function(a){if(a.vk){var b=a.toString();a=cw(a);tw(this,b,a)}},this);var b=this.Ob.Hd.b;(a=a[b]&&a[b].toString())&&uw(this,a);this.Xc&&Lp(Ap.getInstance(),this.Xc);(a=lw(this.Ob))?(this.Kk=!0,vw(this,a)):(this.ba||(this.ba=!0,this.load()),this.u("publish_external_event","onCaptionsTrackListChanged"))}else this.log_("No captions found."),
428 this.unload(),In(this.yf),In(this.Xc)};f.av=function(a,b){var c=a.g.concat(a.b);this.log_("Caption track loaded with "+c.length+" events.");rw(this);this.Me=ab(c);this.fc=b;this.Hn=ku.test(b.b);this.ba||(this.ba=!0,this.load());this.Kk&&(this.Kk=!1,this.u("publish_external_event","onCaptionsTrackListChanged"));c=La(c,function(a,b){return new $h(a.a,a.a+a.Dc,{id:"caption"+b})});this.uf.apply(this,c);this.Sn(b)};
429 f.Sn=function(a){var b={trackName:a.gc,trackKind:a.Lb};a.a?(b.trackLangCode=a.a.a,b.fromLangCode=a.b):b.trackLangCode=a.b;this.log(b);var b=this.ji,c=cw(a);c&&(c=c.replace(/<[^>]*>?/g,""),b.Te(c));Lm(this,this.ji.oa);this.Xg.start();this.u("publish_external_event","captionschanged",bw(a))};f.yc=function(a){0==a.getId().indexOf("caption")&&(a=parseInt(a.getId().split("caption")[1],10),!isNaN(a)&&this.Me[a]&&(this.he.push(this.Me[a]),this.Lf.start()))};
430 f.Vc=function(a){0==a.getId().indexOf("caption")&&(a=parseInt(a.getId().split("caption")[1],10),!isNaN(a)&&this.Me[a]&&(a=this.he.indexOf(this.Me[a]),0<=a&&this.he.splice(a,1),this.Lf.start()))};
431 function ww(a,b){if(b instanceof Wv){var c=a.Ia[b.id];w(b.params,a.b);c&&c.getType()!=(b.params.ek?2:b.b?0:1)&&(F(c.oa),delete a.Ia[b.id]);if(!a.Ia[b.id]){var c=a.Ia,d=b.id,e;t:{e=b.id;var g=b.params;switch(b.params.ek?2:b.b?0:1){case 0:e=new Mv(e,g);break t;case 2:e=new Ov(e,g);break t;default:e=new Jv(e,g)}}c[d]=e;c=a.Ia[b.id].oa;X(c,"captions-asr","asr"==a.fc.Lb);null!=b.params.Ke&&(b.params.Ke=a.Hn?1:0);0==a.Ia[b.id].id?(V(c,a.qa),xw(a.a.app.R,c)):Lm(a,c)}w(a.Ia[b.id].ta,b.params);if(0==(b.params.ek?
432 2:b.b?0:1)){c=a.Ia[b.id];c.Vn=b.g;c.yb={};c.Zg=!0;c.Te(c.Vn);c.yb.zd=c.Qb.length;c.yb.width=c.oa.offsetWidth;c.yb.height=c.oa.offsetHeight;c.yb.Tn=[];c.yb.Un=[];for(d=0;d<c.yb.zd;d++)c.yb.Un.push(c.Qb[d].offsetTop),c.yb.Tn.push(c.Qb[d].offsetLeft);c.Zg=!1;c.Te(c.$g)}}else c=b.Wh,a.be[c]||(a.be[c]=[]),a.be[c].push(b)}f.Fn=function(){if(this.ba){Nm(this);this.Mo=yw(this.Dd).height/360;pw(this);for(var a in this.Ia)this.Ia[a].Pf()}};
433 function zw(a){var b=[],c;for(c in a.Ia){var d=a.Ia[c];d instanceof Mv&&b.push(a.Ia[c])}if(0!=b.length){b.sort(function(a,b){return b.ta.de-a.ta.de});c=yw(a.Dd).height;var e=a.Ia[b[0].id].ta.de,g;for(g in b){d=a.Ia[b[g].id];d.ta.de=e;var h=Math.round(d.ta.zd*d.Mi()),e=e-Math.round(100*(h/c));d.Pf()}}}f.gw=function(){this.Xg.stop();F(this.ji.oa)};
434 f.Yk=function(){this.Lf.stop();var a=this.he.length,b;for(b in this.be)delete this.be[b];this.he.sort(function(a,b){return a.a==b.a?a.i-b.i:a.a-b.a});for(var c=0;c<a;c++)ww(this,this.he[c]);for(b in this.Ia)this.be[b]?this.Ia[b].Lo(this.be[b]):(F(this.Ia[b].oa),delete this.Ia[b]);zw(this);this.log_("Refreshing caption display...")};function Aw(a,b){var c=E(a).querySelectorAll("."+b+" input[type=radio]"),d=Sa(c,function(a){return a.checked}),d=(-1==d?1:d+1)%c.length;c[d].click()}
435 f.hw=function(){Aw("captions-settings-background-opacity","captions-settings-background-opacity-radio")};f.iw=function(){Aw("captions-settings-text-opacity","captions-settings-text-opacity-radio")};f.jw=function(){Aw("captions-settings-window-opacity","captions-settings-window-opacity-radio")};f.Vv=function(a){a=parseFloat(a.target.getAttribute("value"));isNaN(a)||(this.b.backgroundOpacity=a,pw(this))};f.dw=function(a){a=parseFloat(a.target.getAttribute("value"));isNaN(a)||(this.b.textOpacity=a,pw(this))};
436 f.fw=function(a){a=parseFloat(a.target.getAttribute("value"));isNaN(a)||(this.b.windowOpacity=a,pw(this))};f.Yv=function(a){a.target&&(this.b.charEdgeStyle=a.target.value,pw(this))};f.bw=function(a){a.target&&(this.b.fontFamilyOption=a.target.value,pw(this))};f.aw=function(){var a=this.Ia[0];a&&a.oa&&(a=a.oa,W(a,"controls-hidden"),V(a,"controls-visible"))};f.$v=function(){var a=this.Ia[0];a&&a.oa&&(a=a.oa,Dm(a,"controls-visible")&&(W(a,"controls-visible"),V(a,"controls-hidden")))};
437 f.gp=function(){Bw(this,-1)};f.hp=function(){Bw(this,1)};function Bw(a,b){a.b.fontSizeIncrement+=b;pw(a)}function Cw(a,b){var c=E(b);c&&(c.querySelector('input[value="'+a.toFixed(1)+'"]').checked=!0)}function Dw(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],dd(b,d.options[d.selectedIndex].text))}function rw(a){Jm(a);a.he=[];a.Me=[];a.fc=null;a.Yk()}
438 function vw(a,b){if(b)if(a.Ac)a.fc=b,qw(a,!0),a.vo("control_subtitles_set_track",bw(b));else if(a.Dd.Yf){var c=a.Ob,d=a.On.b,e=v(a.Sn,a),g=c.Jd,c={v:c.Di,type:"track",lang:b.b,name:b.gc,kind:b.Lb,fmt:"vtt"};b.a&&(c.tlang=b.a.a);var h=document.createElement("track");h.src=Kj(g,c);h.mode="showing";h.setAttribute("kind","captions");h.setAttribute("default","");d.appendChild(h);e(b)}else kw(a.Ob,b,v(a.av,a))}f.Xv=function(){this.ba?H(v(this.zp,this),1):this.load()};
439 f.Wv=function(a){a=a.currentTarget;var b=G(a,"action");if(b)switch(b){case "translate":this.oi||(Nm(this),Mm(this),Hn(this.wl));break;case "settings":Nm(this);Mm(this);Ew(this);Hn(this.ul);break;case "captions-off":this.unload()}else(a=G(a,"trackid"))?(uw(this,a),b=iw(this.Ob,a),vw(this,b),this.log_("Caption change failed for "+a)):this.log_("onCaptionTrackClicked_ empty, ignoring")};
440 function uw(a,b){if(a.ed){var c=E("yt-uix-button-menu-item.active",a.ed);c&&W(c,"active");if(c=a.ed.querySelector(".yt-uix-button-menu-item"+('[data-trackid="'+b+'"]')))V(c,"active"),a.zp()}}f.zp=function(){var a=E("yt-uix-button-menu-item.active",this.ed);if(a){var b=this.ed,c=C&&!uc(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.Pn=function(){In(this.wl)};
441 f.ew=function(){if(!this.oi){this.Pn();var a;t:{var b=this.Ob.qi;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.fc,b=new aw,b.b=c.b,b.Wg=c.Wg,b.gc=c.gc,b.Lb=c.Lb,b.hi=!1,b.ii=c.ii,b.a=a,fw(this.Ob.Hd,b)&&(a=b.toString(),tw(this,a,cw(b)),uw(this,a),this.Xc&&Lp(Ap.getInstance(),this.Xc)),vw(this,b))}};f.Uv=function(){In(this.ul)};f.cw=function(){delete this.b;this.b=Ob(ow);Qm(this,"display-settings",this.b);pw(this)};
442 function pw(a){Fw(a);var b=ap(a.b.background),c=a.b.backgroundOpacity;Qm(a,"display-settings",a.b);a.k=kn(".captions-text, .caption-row","background-color: rgba("+b[0]+","+b[1]+","+b[2]+","+c+") !important;",{Ib:a.k,reset:!0});Cw(c,"captions-settings-background-opacity");b=ap(a.b.color);c=a.b.textOpacity;Qm(a,"display-settings",a.b);a.G=kn(".captions-text","color: rgba("+b[0]+","+b[1]+","+b[2]+","+c+") !important;",{Ib:a.G,reset:!0});Cw(c,"captions-settings-text-opacity");b=ap(a.b.windowColor);c=
443 a.b.windowOpacity;Qm(a,"display-settings",a.b);a.J=kn(".caption-window-transform","background-color: rgba("+b[0]+","+b[1]+","+b[2]+","+c+") !important;",{Ib:a.J,reset:!0});Cw(c,"captions-settings-window-opacity");Qm(a,"display-settings",a.b);var b=a.b.charEdgeStyle,d=a.b.textOpacity;if("none"==b)ln(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=
444 "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=kn(".captions-text",c,{Ib:a.j,reset:!0})}Dw(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';
445 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=kn(".captions-text",c+"font-family: "+b+" !important;",{Ib:a.A,
446 reset:!0});a.b.fontFamily=b;Qm(a,"display-settings",a.b);Dw(a,"captions-settings-font-family","fontFamilyOption");Qm(a,"display-settings",a.b);b="font-size: "+Math.round(((a.b.fontSizeIncrement||0)+16)*a.Mo)+"px;";a.B=kn(".caption-window-transform",b,{Ib:a.B,reset:!0});a.Yk()}f.Zv=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");pw(this);Qm(this,"display-settings",this.b)};
447 function Ew(a){var b={Ib:a.g},c=a.b.color,d=a.b.background,e=a.b.windowColor;c&&(a.g=kn('.html5-popup-dialog button[data-color="'+c+'"]',"border: 3px solid #992121;",b));d&&(a.g=kn('.html5-popup-dialog button[data-background="'+d+'"]',"border: 3px solid #992121;",b));e&&(a.g=kn('.html5-popup-dialog button[data-windowcolor="'+e+'"]',"border: 3px solid #992121;",b))}
448 function Fw(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=kn(".captions-text",b,c);var d=ap(a.b.windowColor),c={Ib:a.I,reset:!0};a.I=kn(".caption-window-transform","background-color: rgba("+d[0]+","+d[1]+","+d[2]+", 1)",c);Ew(a)}function tw(a,b,c){a.ed&&(b=Ys(a.fp,{track_id:b,track_display_name:c}),a.ed.appendChild(b))}function Gw(a){return nw.prototype.$a(a)?new nw(a):null}
449 f.aq=function(a,b){switch(a){case "fontSize":return isNaN(b)||(this.b.fontSizeIncrement=b,pw(this)),this.b.fontSizeIncrement;case "reload":b&&mw(this.Ob,v(this.$n,this));break;case "track":if(b){if(!ia(b))break;var c=new aw(b);c.equals(this.fc)||(vw(this,c),uw(this,c.toString()))}else return this.fc?bw(this.fc):{};return"";case "tracklist":return this.ba?La(ew(this.Ob.Hd,b&&b.includeAsr),function(a){return bw(a)}):[]}};f.Vo=function(){return["reload","fontSize","track","tracklist"]};f.$a=function(a){return!!a.getVideoData().di};
450 f.Qh=function(a){a?(a=this.fc,rw(this),this.fc=a):(qw(this,this.ba),this.fc&&vw(this,this.fc))};function qw(a,b){X(Q(a.a),a.qa+"-loaded",b)};function Hw(){var a=ac(),b;if(b=ll()){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",
451 "image/jps");Zc(document.documentElement,c);c=Mc("NvImageDetectionFFID");try{if(null!=c){b=27527<=c.NvGetDriverVersion();break t}}catch(d){}}b=!1}}return b||!(!a||-1==a.indexOf("Sony"))};function Iw(a){Im.call(this,a);var b=a.getVideoData();b.P&&Jw(this);Kw(this,"html5-threed-conversion-on",v(this.sv,this));Kw(this,"html5-threed-conversion-off",v(this.rv,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.M;a.setAttribute("href",b);c.setAttribute("href",b)}y(Iw,Im);f=Iw.prototype;f.nl="threeDModuleData";f.$e=null;function Kw(a,b,c){a=E(b,Q(a.a));J(a,"click",c)}f.qa="threed";f.ad="threed";
452 f.create=function(){Lw(this.a.app,void 0);Iw.C.create.call(this)};f.destroy=function(){Lw(this.a.app,!0);this.unload();Iw.C.destroy.call(this)};function Mw(a){return Iw.prototype.$a(a)?new Iw(a):null}f.$a=function(a){a=a.getVideoData();return!!a.P||!!a.rj};f.sv=function(){Nw(this,!0)};f.rv=function(){Nw(this,!1)};function Nw(a,b){var c=a.a.getVideoData();if(c.rj&&c.zf!=b){var c=a.a.app,d=N(c),e=d.a;e.zf=!e.zf;e.j=[];e.u("dataupdated");gh(d,"m");Lw(c);b?Jw(a):Nm(a)}}
453 function Jw(a){Pm(a,"warning-shown")||Hw()||(a.$e=E("threed-html5-warning-dialog",Q(a.a)),Hn(a.$e),H(v(function(){Ow(this)},a),0),J(a.$e,"mouseover",v(function(){W(this.$e,"hide-dialog")},a)),J(a.$e,"mouseout",v(function(){Ow(this)},a)),Kw(a,"threed-html5-warning-close",v(a.Bv,a)))}function Ow(a){V(a.$e,"hide-dialog");H(v(function(){Dm(this.$e,"hide-dialog")&&Nm(this)},a),9E3)}f.Bv=function(){Qm(this,"warning-shown",!0);Nm(this)};function Pw(a){Im.call(this,a);this.b=new Xm(["div","ytp-ypc-clickwrap-overlay",["h2","header",mf("YPC_CLICKWRAP_HEADER")],["div","description",mf("YPC_CLICKWRAP_DESCRIPTION")],["button","confirm-button",mf("YPC_CLICKWRAP_BUTTON")]]);dn(this.b.N());this.a.app.R.g.appendChild(this.b.N());L(this,this.b);this.g=this.b.a["confirm-button"]}y(Pw,Im);f=Pw.prototype;f.qa="ypc_clickwrap";f.ad="ypc-clickwrap";f.$a=function(){return qm(this.a.getVideoData(),"ypc_clickwrap_module")};
454 function Qw(a){return qm(a.getVideoData(),"ypc_clickwrap_module")?new Pw(a):null}f.create=function(){Pw.C.create.call(this);this.load()};f.destroy=function(){this.ba&&this.unload()};f.load=function(){Pw.C.load.call(this);E("html5-video-container",Q(this.a));cn(this.b.N());J(this.g,"click",v(this.nu,this));this.ba=!0};f.unload=function(){dn(this.b.N());Df(this.g);this.ba=!1;Pw.C.unload.call(this)};f.nu=function(){Km(this);this.destroy()};function Rw(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.M=a.ypc_vid};function Sw(){Y.call(this,["div",["ytp-drawer","html5-stop-propagation"],["div","ytp-drawer-content","{{content}}"],["a","ytp-drawer-close-button"],["a","ytp-drawer-open-button"]]);this.b=this.template.a["ytp-drawer-close-button"];J(this.b,"click",v(this.hide,this));this.a=this.template.a["ytp-drawer-open-button"];J(this.a,"click",v(this.show,this));this.Aa(null);this.hide()}y(Sw,Y);Sw.prototype.hide=function(){V(this.element,"ytp-drawer-closed")};
455 Sw.prototype.Aa=function(a){a?(Sw.C.Aa.call(this,a),cn(this.element)):dn(this.element)};Sw.prototype.show=function(){H(oa(W,this.element,"ytp-drawer-closed"),0)};Sw.prototype.H=function(){Df(this.b);Df(this.a);this.a=this.b=null;Sw.C.H.call(this)};function Tw(a,b){R.call(this);this.a=new Sw;L(this,this.a);this.b=document.createElement("div");Em(this.b,["html5-stop-propagation","html5-ypc-endscreen"]);this.i=document.createElement("div");V(this.i,"html5-ypc-overlay");this.g=new Xm(["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}}"]]);
456 L(this,this.g);this.j=this.g.a["html5-ypc-purchase"];J(this.j,"click",v(this.k,this));dd(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.W(a);this.a.Aa(this.g.N());a.appendChild(this.b)}y(Tw,R);Tw.prototype.H=function(){Tw.C.H.call(this);this.j&&Df(this.j);F(this.b);F(this.i);this.i=this.b=this.a=null};Tw.prototype.k=function(){this.u("ypcContentRequest")};function Uw(a){Im.call(this,a);this.g=this.b=null;this.i=NaN}y(Uw,Im);f=Uw.prototype;f.qa="ypc";f.ad="ypc";function Vw(a){var b=a.getVideoData();return a.K().ld&&qm(b,"ypc_module")}f.$a=function(){return Vw(this.a)};function Ww(a){return Vw(a)?new Uw(a):null}f.create=function(){Uw.C.create.call(this);var a=this.a.getVideoData();this.b=new Rw(a);a.ja?this.load():this.a.wo({video_id:this.b.M,ypc_preview:1})};f.destroy=function(){this.ba&&this.unload();this.b=null};
457 f.load=function(){Uw.C.load.call(this);var a=E("html5-video-container",Q(this.a));this.g=new Tw(a,this.b);this.g.D("ypcContentRequest",this.xt,this);xw(this.a.app.R,this.g.i);eo(this.a.K())&&(a=new $h(2147483647,2147483647,{priority:2}),this.uf(a));this.g.a.show();I(this.i);this.i=H(v(function(){this.g.a.hide()},this),1E4);this.ba=!0};f.unload=function(){Jm(this);Ug(this.g);this.g=null;this.ba=!1;Uw.C.unload.call(this)};
458 f.yc=function(a){Uw.C.yc.call(this,a);a=this.g;a.b.appendChild(a.g.N());a.a.Aa(null);cn(a.b)};f.Vc=function(a){Uw.C.Vc.call(this,a);a=this.g;dn(a.b);a.a.Aa(a.g.N())};f.xt=function(){if(this.b.a)"embedded"==this.a.K().Z?Qp(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 Xw={yz:"ERROR_ALREADY_PINNED_ON_A_DEVICE",Dz:"ERROR_AUTHENTICATION_EXPIRED",Ez:"ERROR_AUTHENTICATION_MALFORMED",Fz:"ERROR_AUTHENTICATION_MISSING",Pz:"ERROR_BAD_REQUEST",Vz:"ERROR_CANNOT_ACTIVATE_RENTAL",cA:"ERROR_CGI_PARAMS_MALFORMED",dA:"ERROR_CGI_PARAMS_MISSING",PA:"DEVICE_FALLBACK",SA:"ERROR_LICENSE",VA:"FLASH_FALLBACK",tB:"ERROR_GEO_FAILURE",GB:"HTML5_DEFAULT_FALLBACK",HB:"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",MB:"ERROR_INVALID_DRM_MESSAGE",QB:"LEARN_MORE",hC:"ERROR_NOT_SIGNED_IN",sC:"ERROR_PURCHASE_NOT_FOUND",
459 tC:"ERROR_PURCHASE_REFUNDED",wC:"ERROR_RENTAL_EXPIRED",Wz:"ERROR_CAST_SESSION_DEVICE_MISMATCHED",Xz:"ERROR_CAST_SESSION_VIDEO_MISMATCHED",Zz:"ERROR_CAST_TOKEN_FAILED",Yz:"ERROR_CAST_TOKEN_EXPIRED",$z:"ERROR_CAST_TOKEN_MALFORMED",CC:"ERROR_SERVER_ERROR",GC:"ERROR_STOPPED_BY_ANOTHER_PLAYBACK",IC:"ERROR_STREAMING_DEVICES_QUOTA_PER_24H_EXCEEDED",JC:"ERROR_STREAMING_NOT_ALLOWED",KC:"ERROR_STREAMING_UNAVAILABLE",xC:"ERROR_RETRYABLE_ERROR",RC:"ERROR_TOO_MANY_STREAMS_PER_USER",QC:"ERROR_TOO_MANY_STREAMS_PER_ENTITLEMENT",
460 TC:"ERROR_UNSUPPORTED_DEVICE",UC:"ERROR_UNUSUAL_ACTIVITY",aD:"ERROR_VIDEO_FORBIDDEN",cD:"ERROR_VIDEO_NOT_FOUND"},Yw={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",
461 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 Zw(a){Im.call(this,a);this.qa="ypc_license_checker";this.ad="ypc_license";this.j=!1;this.i=0;this.g=!1;this.b=null;this.B=pl();this.A=a.K().lb+"ypc_license_server"}y(Zw,Im);
462 var $w={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"};
463 function ax(a){return qm(a.getVideoData(),"ypc_license_checker_module")}f=Zw.prototype;f.$a=function(){return ax(this.a)};f.create=function(){Zw.C.create.call(this);var a=new $h(1E3,2147483646,{priority:0});this.uf(a);this.D("onStateChange",this.Yw,this)};function bx(a){return ax(a)?new Zw(a):null}f.yc=function(){this.j=!0;cx(this,6E4)};f.Yw=function(a){P(a.state,2)?(this.i=0,this.b=null,this.g=!1):(P(a.state,1)||P(a.state,8))&&cx(this,6E4)};
464 function cx(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.M,player_id:a.B,request_id:pl(),purchase_id:d.jd,version:"4",player_time_seconds:a.a.getCurrentTime().toString(),gid:d.Ic,session_token:d.Jc},a.k=d.Da,0==c?a.pn():H(v(a.pn,a),c))}}f.pn=function(){if(this.b){var a=S(this.A,{cpn:this.k});Qj(a,{format:"RAW",method:"POST",Gf:this.b,timeout:3E4,Pa:v(this.Jv,this),onError:v(this.Iv,this),Sk:v(this.Kv,this)})}};
465 f.Jv=function(a){if(this.b){a=a.responseText;var b=a in $w?1:64<=a.length&&a.match(/[0-9a-fA-f]+/)?0:-1;-1==b?dx(this,"decode"):(this.i=0,this.b=null,1==b?(this.g=!1,a=a in $w?mf($w[a]):mf("ERROR_LICENSE"),ex(this.a.app.b,150,a,void 0)):(this.g=!0,cx(this)))}};f.Iv=function(a){dx(this,"net-"+a.status)};f.Kv=function(){dx(this,"timeout")};function dx(a,b){if(a.b)if(a.log({errorType:b}),a.b=null,5<++a.i){var c=mf("ERROR_LICENSE");ex(a.a.app.b,150,c,void 0)}else cx(a)};function fx(){this.a=[];this.i={};this.o={};this.F={};this.b=this.j=null;this.g=[];this.k=null}y(fx,K);fx.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.$a(this.b)&&!Ta(this.a,b)&&(b.create(),this.a.push(b),Ta(this.g,b.qa)&&(b.Ac=this.k,b.Qh(!!b.Ac)))}};function gx(a){z(a.a,function(a){a.destroy()});a.a=[]}
466 function hx(a,b,c){ix(a);a.k=b;a.g=ab(c);z(a.a,function(a){0<=Ja(c,a.qa)&&(a.Ac=b,a.Qh(!!a.Ac))})}function ix(a){z(a.g,function(a){if(a=jh(this,a))a.Ac=null,a.Qh(!1)},a);a.k=null;a.g=[]}function zh(a,b,c,d){return b&&c?(a=jh(a,b))?a.aq(c,d):null:null}function Ah(a,b){if(!b)return La(a.a,function(a){return a.qa});var c=jh(a,b);return c?c.Vo():[]}function jh(a,b){return Pa(a.a,function(a){return a.qa==b})}fx.prototype.G=function(a,b){z(this.a,function(c){c.u(a,b)})};
467 function jx(a){var b=[];z(a.a,function(a){(a=a.Hi())&&b.push(a)});return b}fx.prototype.A=function(a,b){w(this.F,a||null);w(this.o,b||null)};function kx(a){this.a={};for(var b=0;b<a.length;b++){var c=a[b];this.a[c.a]=c}}function lx(a){a=Jb(a.a);gb(a,function(a,c){return a.a-c.a});return a};function mx(a,b,c){this.b=a;this.a=b;this.i=!!c.Cf;this.g=c.fa};function nx(){this.fe={};this.a=this.bb().a;this.Wc=null}f=nx.prototype;f.bb=function(){var a=this.constructor,b;if(!(b=a.Ip)){var c;b=a.Bx;var d=[];for(c in b)b.hasOwnProperty(c)&&(0==c||d.push(new mx(a,c,b[c])));c=new kx(d);b=a.Ip=c}return b};f.has=function(a){a.b.bb();this.bb();return null!=this.fe[a.a]};f.get=function(a,b){a.b.bb();this.bb();var c;c=this.a[a.a];var d=ox(this,c);c.i?(t(d),c=d[b||0]):(t(d),c=d);return c};
468 f.set=function(a,b){a.b.bb();this.bb();var c=a.a;this.fe[c]=b;this.Wc&&(this.Wc[c]=b)};f.add=function(a,b){a.b.bb();this.bb();var c=a.a;this.fe[c]||(this.fe[c]=[]);this.fe[c].push(b);this.Wc&&delete this.Wc[c]};f.clear=function(a){a.b.bb();this.bb();a=a.a;delete this.fe[a];this.Wc&&delete this.Wc[a]};
469 f.equals=function(a){if(!a||this.constructor!=a.constructor)return!1;for(var b=lx(this.bb()),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=ox(this,d),h=ox(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};
470 function px(a,b){for(var c=lx(a.bb()),d=0;d<c.length;d++){var e=c[d];if(b.has(e)){a.Wc&&delete a.Wc[e.a];var g=11==e.g||10==e.g;if(e.i){var h,k=b;h=e;h.b.bb();k.bb();h=ox(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=ox(b,e),g?(g=ox(a,e))?px(g,h):a.set(e,h.clone()):a.set(e,h)}}}f.clone=function(){var a=new this.constructor;a!=this&&(a.fe={},a.Wc&&(a.Wc={}),px(a,this));return a};function ox(a,b){var c=a.fe[b.a];return null==c?null:c}
471 function qx(a,b){a.Bx=b;a.bb=function(){return a.Ip||(new a).bb()}};var rx={Jy:0,tA:1,EA:2,Iy:3,Ry:4,rA:5,CA:6,zA:7,AA:8,BA:9,xA:10,yA:11,Ty:12,Sy:13,Hy:14,Ay:15,sA:20,GA:21,zy:22,uA:23,FA:24,DA:25,Oy:30,HA:31,Ny:32,Py:33,wA:40,vA:41,Uy:42,Vy:43,By:50,Fy:51,Ky:52,Ly:53,My:54,wy:55,xy:56,Qy:57,Gy:58,Ey:60,Cy:61,yy:70,vy:80,Wy:90};function sx(){nx.apply(this)}y(sx,nx);function tx(){nx.apply(this)}y(tx,nx);function ux(){nx.apply(this)}y(ux,nx);function vx(){nx.apply(this)}y(vx,nx);function wx(){nx.apply(this)}y(wx,nx);function xx(){nx.apply(this)}y(xx,nx);
472 qx(sx,{0:{name:"YtAdType",mh:"video.YtAdType"},1:{name:"ad_namespace",required:!0,fa:14,defaultValue:0,type:{wz:0,QA:1,xz:2,aA:3,sB:4,OA:5,NA:6,Rz:7,LA:8,Tz:9,KA:10,MA:11,Cz:12,wD:13}},2:{name:"ad_format",required:!0,fa:14,defaultValue:0,type:{tz:0,NB:1,LB:2,eC:3,VC:4,OB:5,IB:6,KB:7,xD:8,RA:9}},3:{name:"ad_invideo",fa:14,defaultValue:0,type:{vz:0,iA:1,jA:2,kA:3,lA:4,hA:5,Uz:6}},4:{name:"invideo_autoplay",fa:14,defaultValue:0,type:{Nz:0,rC:1}},5:{name:"ad_instream",fa:14,defaultValue:0,type:{uz:0,
473 SC:1}},6:{name:"ad_instream_long",fa:8,type:Boolean}});qx(tx,{0:{name:"AdId",mh:"video.AdId"},1:{name:"ad_network",fa:14,defaultValue:1,type:{lC:1,uy:2}},2:{name:"ad_network_name",fa:9,type:String},3:{name:"ad_id",required:!0,fa:9,type:String}});
474 qx(ux,{0:{name:"YtAdEvent",mh:"video.YtAdEvent"},1:{name:"ad_event_type",required:!0,fa:14,defaultValue:0,type:{ez:0,lz:1,fz:2,oz:3,gz:4,hz:5,bz:6,$y:7,IA:8,Xy:9,mz:10,nz:11,Yy:12,JA:13,pz:14,cz:15,Zy:16,dz:17,az:18,qz:100,rz:101,jz:130,iz:131,kz:132}},2:{name:"wall_time",required:!0,fa:2,type:Number},3:{name:"media_time",required:!0,fa:2,type:Number},4:{name:"logentry_time_usec",required:!0,fa:3,type:String},5:{name:"ad_error_type",fa:14,defaultValue:0,type:rx}});
475 qx(vx,{0:{name:"YtAdSlot",mh:"video.YtAdSlot"},1:{name:"slot_time",required:!0,fa:2,type:Number},2:{name:"ad_type",required:!0,fa:11,type:sx},3:{name:"ad_events",Cf:!0,fa:11,type:ux},4:{name:"ad_video_duration",fa:2,type:Number},5:{name:"ad_id",fa:9,type:String},6:{name:"slot_index",fa:5,type:Number}});
476 qx(wx,{0:{name:"YtVideoMetadata",mh:"video.YtVideoMetadata"},1:{name:"content_owner_ids",Cf:!0,fa:9,type:String},2:{name:"video_duration_seconds",fa:2,type:Number},3:{name:"all_content_owner_ids",fa:9,type:String}});
477 qx(xx,{0:{name:"YtWatchAdInfo",mh:"video.YtWatchAdInfo"},1:{name:"video_id",required:!0,fa:9,type:String},2:{name:"allowed_ads",Cf:!0,fa:11,type:sx},3:{name:"ad_slots",Cf:!0,fa:11,type:vx},4:{name:"ps",fa:9,type:String},5:{name:"el",fa:9,type:String},6:{name:"country",fa:9,type:String},7:{name:"feature",fa:9,type:String},8:{name:"blocked",fa:8,type:Boolean},9:{name:"plid",fa:9,type:String},10:{name:"video_metadata",fa:11,type:wx},11:{name:"experiment_id",Cf:!0,fa:3,type:String},12:{name:"ad_flags",
478 fa:4,type:String},13:{name:"all_experiment_ids",fa:9,type:String},14:{name:"no_ads_returned",fa:8,type:Boolean},15:{name:"ad_errors",Cf:!0,fa:14,defaultValue:0,type:rx},16:{name:"ad_slot_with_event",fa:11,type:vx}});function yx(a,b){Hh.call(this,a,b)}y(yx,Hh);f=yx.prototype;f.rg=function(){Wg(this.app,!0,this.a);this.app.Qd(!1,this.a)};f.Qj=function(){this.app.Od(!1,this.a)};f.Gp=function(a,b,c){Wg(this.app,!0,this.a);var d=this.app,e=this.a;d.pf(d.getCurrentTime()+a,b,c,e)};f.Oh=function(a,b){Wg(this.app,!0,this.a);this.app.pf(a,b,void 0,this.a)};f.uj=function(){ch(this.app,this.a)};function zx(a){this.app=a;Im.call(this,a.I)}y(zx,Im);var Ax={iC:"0",jC:"1",TA:"2",Yx:"3",Oz:"4",BC:"5"};var Bx={vC:"red",WHITE:"white"};var Cx={$x:"0",FC:"1",oA:"2"};var Dx={"ad-trueview-indisplay-pv":6,"ad-trueview-insearch":7},Ex={"ad-trueview-indisplay-pv":2,"ad-trueview-insearch":2},Fx={adunit:{Vb:!1,zc:!1},detailpage:{oc:!0}};Fx.embedded={sh:Ff(),yh:"4",zc:!0};Fx.profilepage={kl:!0};
479 var Gx="blogger books docs google-live play picasaweb".split(" "),Hx={blazer:{bj:"youtube_mobile",Tb:!1,gy:!1,Eg:!1,Fg:!1,nc:!0,Ub:!1,tb:!1,Db:!0},blogger:{ze:!1,Uf:!1,Nc:!1,Vb:!1,xc:!1,oc:!1,zc:!1,qc:"bl"},books:{ze:!1,Uf:!1,Nc:!1,Vb:!1,xc:!1,oc:!0,zc:!1,qc:"gb"},docs:{ze:!1,Uf:!1,Nc:!1,Vb:!1,xc:!1,oc:!1,zc:!1,qc:"gd"},"google-live":{ze:!1,Uf:!1,Nc:!1,Vb:!1,xc:!1,oc:!1,zc:!1,qc:"gl"},play:{Vb:!1,xc:!1,oc:!1,zc:!1,qc:"gp"},"native":{Eg:!1,Fg:!1,Ub:!0},olympics:{Eg:!1,Fg:!1,Hh:!0,Db:!0},picasaweb:{ze:!1,
480 Uf:!1,Nc:!1,Vb:!1,xc:!1,oc:!1,zc:!1,qc:"pw"},touch:{Eg:!1,Fg:!1,Db:!0}};
481 function Ix(a){this.o=[];this.a={};Jx(this,a.fexp);this.Y=U(this.Y,a.origin);this.Z=a.el||this.Z;var b=Fx[this.Z];b&&w(this,b);b=a.ps||this.La;0<navigator.msMaxTouchPoints&&(b="touch");this.La=b;(b=Hx[this.La])&&w(this,b);this.hf=Kx(this)&&Ta(Gx,this.La);this.gg=!(!kl().defaultPlaybackRate||ec||Ti||Si||Ui);if(a.use_media_volume)b=!1;else{var b=kl(),c=b.muted;b.muted=!c;b=b.muted!=c}this.am=b;this.fm=Ui;if(Ti||Si)this.bm=this.Ic||"blazer"!=this.La;this.lm="0"!=a.add_player_event_listeners;b=T(this.sh,
482 a.fs);this.sh="detailpage"==this.Z||"olympics"==this.La?b:b&&Ff();this.Ea=U(this.Ea,a.authuser);this.yh=ql(this.yh,a.autohide,Ax);this.Tb=T(this.Tb,a.autoplay);this.Hj=T(this.Hj,a.autoplayoverride);this.color=ql(this.color,a.color,Bx);this.k=U(this.k,a.content_v);this.Ij=ql(this.Ij,a.controls,Cx);this.F=U(this.F,a.cbrand);this.A=U(this.A,a.cbr);this.B=U(this.B,a.cbrver);this.Wf=U(this.Wf,a.c);this.ef=U(this.ef,a.cver);this.G=U(this.G,a.cmodel);this.I=U(this.I,a.cnetwork);this.J=U(this.J,a.cos);this.L=
483 U(this.L,a.cosver);this.O=U(this.O,a.cplatform);this.Fh=T(this.Fh,a.edu_mode);this.b=U(this.b,a.eurl);this.P=U(this.P,a.framer);this.ga=ql(this.ga,a.iv_load_policy,cl);this.i=U(this.i,a.hl);this.Cm=T(this.Cm,a.bwlogging);this.nc=T(this.nc,a.is_html5_mobile_device);this.Nd=T(this.Nd,a.player_wide);this.Dm=T(this.Dm,a.is_playground);this.loop=T(this.loop,a.loop);this.jf=T(this.jf,a.modestbranding);"red"!=this.color&&(this.jf=!1);this.oh=T(this.oh,a.noadapt);this.Xf=T(this.Xf,a.on3g);this.Ua=U(this.Ua,
484 a.pageid);this.Ch=ql(this.Ch,a.vq,dk);this.ej=U(this.ej,a.playerapiid);this.th=T(this.th,a.playsinline);this.fj=T(this.fj,a.playonclick);this.Q=U(this.Q,a.cr);this.ha=U(this.ha,a.q);this.Nc=T(this.Nc,a.logwatch);this.wj=T(this.wj,a.canplaylive);this.xj=T(this.xj,a.canplaypaid);this.Vb=T(this.Vb,a.showinfo);this.xc=T(this.xc,a.rel);this.oc=T(this.oc,a.enablesizebutton);this.hj=T(this.hj,a.ss);this.V=U(this.V,a.theme);this.Ub=T(this.Ub,a.use_native_controls);this.tb=!Si&&T(this.tb,a.svt);Kx(this)&&
485 (this.mg=T(this.mg,a.altf),this.tg=T(this.tg,a.retryneterr),this.Hh=T(this.Hh,a.nologo));this.tg=this.tg||this.oe;this.Ub&&(this.jf=!0,this.ga=3);this.Jj=T(this.Jj,a.ssl);if(this.Db=T(this.Db,a.use_tablet_controls))this.V="dark";b=this.xh;if(c=a.video_container_override){var d=c.split("x");2==d.length&&(c=parseInt(d[0],10),d=parseInt(d[1],10),b=isNaN(c)||isNaN(d)||0>=c*d?b:new B(c,d))}this.xh=b;this.Ra=U(this.Ra,a.attrib);this.aa=U(this.aa,a.sk);this.protocol=this.Jj?"https":"http";this.qe="0"!=this.Ij;
486 this.dj=T(this.qe,a.store_user_volume);this.Md=T(this.Md,a.use_media_volume);(b=a.BASE_YT_URL)&&ok(b,kk)&&(this.lb=b);Lx(this,a);Mx(this,a);"detailpage"==this.Z&&delete this.b;this.Yi=Nx(this)+"s";this.zc=this.jf&&!this.Ub?!this.Vb:this.Vb||this.qe?!1:this.zc;b=this.Tb||"detailpage"==this.Z;c=!0;this.nc&&(c=!1);dj("nintendo wiiu")&&(c=!1);this.Hj&&(c=!0);this.Ul=b&&c;this.a=a}y(Ix,K);f=Ix.prototype;f.lm=!0;f.sh=!0;f.Ea="";f.yh="2";f.Tb=!1;f.Hj=!1;f.lb="/";f.gy=!0;f.color="red";f.Ij="1";f.Wf="web";
487 f.ef="html5";f.Fh=!1;f.Eg=!0;f.Fg=!0;f.gg=!1;f.am=!1;f.Z="detailpage";f.Cm=!1;f.fk=!1;f.hf=!1;f.nc=!1;f.pb=!1;f.Nd=!1;f.ze=!0;f.Dm=!1;f.Uf=!0;f.qg=!1;f.loop=!1;f.jf=!1;f.oh=!1;f.Ch=null;f.ej="";f.Xf=!1;f.Ua="";f.La=null;f.th=!1;f.mg=!1;f.fm=!1;f.tg=!1;f.Ul=!1;f.Nc=!1;f.wj=!0;f.xj=!0;f.qe=!0;f.dj=!0;f.Md=!1;f.Vb=!0;f.xc=!0;f.kl=!1;f.oc=!1;f.zc=!1;f.hj=!1;f.Hh=!1;f.bm=!1;f.Ub=!1;f.tb=!0;f.Jj=!1;f.Db=!1;f.Oc=null;f.xh=null;f.Ko=null;f.tf=null;f.Ya=null;f.Bj=null;f.qc="yt";f.fj=!1;
488 function Lx(a,b){a.Nc=T(a.Nc,b.logwatch);a.la=void 0==b.user_age?a.la:Number(b.user_age);a.rp=U(a.rp,b.user_display_image);a.Dl=U(a.Dl,b.user_display_name);a.pa=U(a.pa,b.user_gender)}
489 function Mx(a,b){var c;t:{if(b&&((c=b.adformat)||(c=(c=b.attrib)&&c in Dx&&c in Ex?Ex[c]+"_"+Dx[c]:void 0),c)){var d=c.match(/^(\d*)_((\d*)_?(\d*))$/);if(d&&5==d.length&&(d=d[3],d=6==d||7==d||8==d||9==d||10==d||11==d,Kx(a)||d))break t}c=void 0}c&&(a.g=c,a.a.adformat=b.adformat);c=b.agcid;a.Va=c;a.a.agcid=c;c=b.feature;a.j=c;a.a.feature=c;if(c=b.referrer)a.referrer=c,a.a.referrer=c;"1"==b.enablecsi&&(a.fk=!1)}
490 function Ox(a){var b={};b.c=a.Wf;a.ef&&(b.cver=a.ef);a.O&&(b.cplatform=a.O);a.F&&(b.cbrand=a.F);a.G&&(b.cmodel=a.G);a.I&&(b.cnetwork=a.I);a.A&&(b.cbr=a.A);a.B&&(b.cbrver=a.B);a.J&&(b.cos=a.J);a.L&&(b.cosver=a.L);return b}
491 function Jx(a,b){if(b){a.o=b.split(",");var c={};z(a.o,function(a){c[a]=!0});a.Ic=!!c["918108"];a.ld=!!c["912711"];a.Yf=!!c["925900"];a.eg=!!c["913559"];a.cj=!c["904831"];a.Ka=!!c["913424"];a.xa=!!c["932206"];a.jd=!!c["932217"];a.Kc=!!c["932246"];a.Jc=!!c["932245"];a.gd=!!c["932240"];a.ag=!!c["932236"];a.kd=!!c["932237"];a.kb=!!c["932242"];a.mc=!!c["932243"];a.jb=!!c["932247"];a.bg=!!c["932248"];a.za=!!c["932239"];a.Ca=!!c["932250"];a.Zf=!!c["932252"];a.$f=!!c["932253"];a.lc=!!c["924604"];a.Lc=!!c["924610"];
492 a.oe=!!c["918117"];a.Ma=!!c["907231"]&&"leanback"!=a.Z;a.ja=!!c["938600"];a.Hc=!!c["936903"];a.hd=!!c["927845"]}}
493 function Px(a,b){switch(b.md){case 38:var c=b.M.indexOf(":"),d=b.M.slice(0,c),c=b.M.slice(c+1);return S("//play.google.com/books/volumes/"+d+"/content/media",{aid:c,sig:b.ld});case 30:return d="//docs.google.com/",a.lb!=Ix.prototype.lb&&(d=a.lb),S(d+"get_video_info",{docid:b.M,authuser:b.Ea,authkey:b.An,eurl:a.b});case 33:return S("//google-liveplayer.appspot.com/get_video_info",{key:b.M});default:return d={html5:"1",video_id:b.M,cpn:b.Da,eurl:a.b,ps:a.La,el:a.Z,hl:a.i,list:b.Ta,agcid:a.Va,sts:15973},
494 b.Q?d.vvt=b.Q:b.G&&(d.access_token=b.G),a.g&&(d.adformat=a.g),b.da&&(d.iv_load_policy=b.da),b.df&&(d.autoplay="1"),b.Ck&&(d.mdx="1"),b.Dk&&(d.utpsa="1"),b.Sa&&(d.is_fling="1"),c=Qx(a),c.width&&(d.width=c.width),c.height&&(d.height=c.height),b.ja&&(d.ypc_preview="1"),b.Ld&&(d.splay="1"),a.k&&(d.content_v=a.k),b.Bn&&(d.livemonitor=1),a.Ea&&(d.authuser=a.Ea),a.Ua&&(d.pageid=a.Ua),w(d,Ox(a)),S(a.lb+"get_video_info",d)}}
495 function Nx(a){return a.Fh?"//s.youtubeeducation.com/":a.Uf?"//s.youtube.com/":"//video.google.com/"}function Rx(a){return a.referrer?a.referrer.slice(0,128):""}
496 function Zt(a,b,c,d){b={v:b.M,list:b.Ta};a.Z&&(b.feature="player_"+a.Z);c&&w(b,c);a=S(a.protocol+"://"+("www.youtube-nocookie.com"==window.location.host||a.Fh?"www.youtube.com":window.location.host)+"/watch",b);if(d){c="";c="!"=="#".charAt(1)?"#".substr(0,2):"#";b="#";"#"==b.charAt(0)&&(b="!"==b.charAt(1)?b.substr(2):b.substr(1));b=Fj(b);for(var e in d)b[e]=d[e];d=c+Hj(b);a=a+d}return a}
497 function Sx(a){var b={contact_type:"playbackissue",html5:1,plid:a.fb,ei:a.k,v:a.M};a.a&&(b.fmt=a.a.Oa);return S("//www.google.com/support/youtube/bin/request.py",b)}function Qx(a){return(a=a.Bj)?new B(a.clientWidth,a.clientHeight):new B(Number.NaN,Number.NaN)}function yw(a){return a.Ya?new B(a.Ya.clientWidth,a.Ya.clientHeight):new B(Number.NaN,Number.NaN)}
498 function Tx(a){var b={};if(!a.Ya)return b;a.Ya.webkitDecodedFrameCount&&(b.hmewdfc=a.Ya.webkitDecodedFrameCount,b.hmewdrop=a.Ya.webkitDroppedFrameCount,b.hmewvdbc=a.Ya.webkitVideoDecodedByteCount,b.hmewadbc=a.Ya.webkitAudioDecodedByteCount);a.Ya.mozParsedFrames&&(b.hmempf=a.Ya.mozParsedFrames,b.hmemdf=a.Ya.mozDecodedFrames,b.hmempresented=a.Ya.mozPresentedFrames,b.hmempainted=a.Ya.mozPaintedFrames,b.hmempaintdelay=a.Ya.mozPaintDelay);return b}
499 function Ux(a){var b=n("yt.www.watch.activity.getTimeSinceActive",window);if("detailpage"==a.Z&&b)return b();var c;a.Sa&&(c=x()-a.Sa);return c}function eo(a){return"leanback"==a.Z||a.hf||!a.xc&&!a.kl?!1:!0}function Eh(a){return"detailpage"!=a.Z?!1:!0}function Kx(a){a=nk()&&(ok(a.Y,kk)||ok(a.Y,lk));var b=ok(document.location.toString(),kk)&&!nk();return a||b}f.H=function(){this.Bj=this.Ya=null;Ix.C.H.call(this)};function Vx(){this.b=0;this.a=this.j=this.g=this.i=NaN}function Wx(a,b){for(var c=0;c<a.length;c++)if(a.start(c)<=b&&a.end(c)>=b)return a.end(c)-b;return 0};function Xx(a){this.b=a;this.pendingRequests_=[];this.a=[];this.i=this.g=null;this.j=0}function Yx(a,b){a.pendingRequests_.push(b);a.g=b.g[b.g.length-1];a.j+=b.U.length}function Zx(a){for(;a.pendingRequests_.length&&5==a.pendingRequests_[0].state;){var b=a.pendingRequests_.shift();z(b.o,a.F,a)}}
500 Xx.prototype.F=function(a){if(4==a.info.type){for(var b=Pk(a.info.a,a.info),c=[],d=a.a,e=0;e<b.length;e++){var g=jk(b[e].U.start+b[e].ob-a.info.U.start+a.U.start,b[e].Ha);c.push(new vk(b[e],a.buffer,g,d));d=!1}bb(this.a,c)}else 3==a.info.type&&this.a.push(a)};
501 function $x(a,b){if(a.k)return a.a[0].U;var c=a.b.info.i;if(a.a[0].info.i>=b)return null;var d;for(d=1;d<a.a.length;d++){var e=a.a[d].buffer!=a.a[d-1].buffer;if(a.a[d].info.i>b||e)break}d--;var e=a.a[d].U.end,g=a.a[d].info.k-b;if(c&&1<g){c=Math.floor(a.a[d].info.Ha*((b-a.a[d].info.i)/a.a[d].info.o));if(0==c)return null;e=a.a[d].U.start+c-1}return new hk(a.a[0].a?0:a.a[0].U.start,e)}
502 function ay(a){a.pendingRequests_.length?a.g=Ha(a.pendingRequests_[a.pendingRequests_.length-1].g):a.a.length?a.g=Ha(a.a).info:a.g=a.i}function by(a){return a.b.Yb()?a.b.index.g?a.b.index.b[a.b.index.T]:-1:NaN}function cy(a,b){a.b.Yb();a.g=a.b.Ej(b,0).a[0];a.i&&a.i.b&&(a.i=null);return a.g.startTime}
503 function dy(a){ey(a);if(a.b.info.a&&a.i&&!a.i.g){var b=Qa(a.a,function(a){return a.info.g});a.a=db(a.a,0,b+1);a.k=!0}else a.a=[];if(a.a.length)for(a.j=a.a[0].buffer.byteLength,b=1;b<a.a.length;b++)a.a[b].buffer!=a.a[b-1].buffer&&(a.j+=a.a[b].buffer.byteLength);else a.j=0}function fy(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());ay(a)}}
504 function gy(a){var b=a.i;a.a.length&&(b=Ha(a.a).info);b=a.g||b;return b.qf(b.U.length-(b.Ha+b.ob))}function hy(a){return Ma(a.a,function(a){return a.info.g})}function iy(a){return Oa(a.pendingRequests_,function(a){return!(!a.b||1!=a.b.priority)&&!(4<=a.state)})}Xx.prototype.o=function(a){rk(a.g[0])||a.dispose();this.j-=a.U.length};function ey(a){z(a.pendingRequests_,a.o,a);a.pendingRequests_=[];a.g=null};function jy(a,b){this.state=1;this.g=b.a;this.k=a;this.o=null;this.U=tk(b.a);this.F=b.b;this.G=NaN;this.A=this.j=0;this.i=NaN;this.b=this.B=null;this.I=""}f=jy.prototype;
505 f.start=function(){var a=1==this.state,b=6==this.state;1==this.state||3==this.state||b&&ky(this);ly(this,2);if(b){if(this.j<this.k.o){this.j++;a=0.5+Math.random();H(v(this.gk,this),1E4*a);return}b=this.F;if(!(this.G<=b.g)){b.b++;b.g=zk-1;var c;c=Je(b.a).Ne;var d=pk(b.a);b.a=Kj(d,{cmo:"pf="+b.b,shost:c})}this.j=0}a?this.gk():H(v(this.gk,this),0)};
506 f.gk=function(){if(!this.ka()){this.G=zk++;var a={};this.U&&(a.range=this.U.toString());a.keepalive="yes";4==this.g[this.g.length-1].type&&(a.fr="yes");a=S(this.F.a,a);this.j&&(a=me(qe(a,"playerretry"),"playerretry",this.j.toString()));this.I=a;var b={format:"RAW",method:"GET",responseType:"arraybuffer",withCredentials:!0,pd:v(this.mq,this)};this.a=Qj(a,b);this.A=0;this.b&&(a=this.b,a.a=x(),a.j=a.a,a.b=0,a.o=0,a.i=!1,a.k={km:Uh(a.g),lq:Vh(a.g),kq:Wh(a.g)},my(a),this.a.addEventListener("progress",
507 v(this.nq,this),!1),0<this.k.a&&!rk(this.g[0])&&(this.i=H(v(this.ym,this),this.k.a)))}};f.nq=function(a){if(!this.ka()){var b=this.b,c=a.timeStamp,d=a.loaded;c<b.a&&(c=x());if(!(20>c-b.j)){if(32768<d){ny(b,c);var e=(c-b.j)/1E3,g=d-b.b;if(0<g)if(0.2<e||1024>g)b.o+=e;else{var h=b.g,e=Math.max(e,0.05);h.a.b(e,g/e)}}b.j=c;b.b=d}this.b.b>this.b.A&&4>this.state&&ly(this,4);4==a.target.readyState&&oy(this.b,a.timeStamp)}};
508 f.mq=function(a){if(!this.ka()&&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)),ok(c,kk)))break t;c=""}if(c)a=this.F,c=qe(c,"keepalive"),c=qe(c,"playerretry"),c=qe(c,"range"),c=qe(c,"shost"),a.a=c,ly(this,3);else if(a.byteLength!=this.U.length)b=!0;else{c=this.g;if(1==c.length&&!c[0].U){var d;d=c[0];var e=jk(0,a.byteLength);d=new qk(d.type,d.a,e,d.j,d.startTime,
509 d.duration,d.ob,e.length,d.b);c[0]=d}d=[];for(var e=0,g=!1,h=!1,k=0;k<c.length;k++){var m=c[k],p=a,r=jk(e,m.Ha),s=!1;if(1==m.type)a.slice?p=a.slice(e,e+m.Ha):(g=new Uint8Array(a,e,e+m.Ha),p=(new Uint8Array(g)).buffer),r=jk(0,m.Ha),g=!0;else if(3==m.type||4==m.type)s=g&&!h,h=!0;d.push(new vk(m,p,r,s));e+=m.Ha}this.o=d;ly(this,5)}}b&&(ky(this),ly(this,6))}};function ky(a){return a.j<a.k.o?!0:!(a.G>a.F.g&&1<=a.F.b)}function ly(a,b){a.state=b;3<=a.state&&a.B&&a.B(a)}
510 f.ym=function(){this.i=NaN;if(!this.ka()&&this.b){var a=!1;if(this.b.i){var b=this.b.F;my(this.b);this.b.F-b>=0.8*(this.k.a/1E3)?(this.A++,a=5<=this.A):this.A=0}else a=5<x()/1E3-(this.b.a/1E3+this.b.k.km);a?(ly(this,7),py(this),oy(this.b,Date.now())):this.i=H(v(this.ym,this),this.k.a)}};f.ka=function(){return-1==this.state};f.dispose=function(){ly(this,-1);this.B=this.o=null;py(this);I(this.i);this.i=NaN};function py(a){if(a.a){var b=a.a;a.a=null;b.abort()}};function qy(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.F=NaN;this.i=!1}function oy(a,b){b<a.a&&(b=x());ny(a,b);var c=a.g,d=a.b,e=a.o,d=Math.max(d,32768);c.j.b(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 my(a){var b=a.B-a.b,b=b*a.k.lq+b/a.k.kq,c=x()/1E3,b=a.i?b+c:b+Math.max(c,a.a/1E3+a.k.km);a.F=b}function ny(a,b){a.i||(a.g.b.b(1,(b-a.a)/1E3),a.i=!0)};function ry(a,b,c,d){R.call(this);this.j=a;this.a=b;this.i=new Xx(c);this.b=new Xx(d);this.k=this.G=this.I=NaN;this.o=this.L=this.B=!1;this.A=NaN;this.O=!1}y(ry,R);var sy=2/24;f=ry.prototype;f.gt=function(a){this.g=a;a.Zb.appendBuffer&&(a.Zb.addEventListener("updateend",v(this.Of,this),!1),a.rd.addEventListener("updateend",v(this.Of,this),!1));ty(this);uy("msa")};
511 function vy(a){a.g&&a.g.Zb&&a.g.Zb.removeEventListener&&(a.g.Zb.removeEventListener("updateend",v(a.Of,a)),a.g.rd.removeEventListener("updateend",v(a.Of,a)));a.g=null}function wy(a){if(0<a.a.i){var b=(a.i.b.info.b+a.b.b.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)};Ak(a.i.b.j,b);Ak(a.b.b.j,b)}}function xy(a,b,c){c-=a.a.L;c-=c*b*Vh(a.j);c=Math.max(a.a.J,Math.min(a.a.P,c));a=Math.max(a.a.O,Math.ceil(a.a.J*b));return Math.min(a,Math.ceil(c*b))}
512 function yy(a,b){var c=Math.min(2.5,Uh(a.j));return Math.ceil(b*c+32768)}function zy(a){var b=Wh(a.j);a=Uh(a.j)+1048576*Vh(a.j);return b*Math.min(1,1048576/(b*a))}
513 function Ay(a,b){if(!b.g){if(!b.b.Yb())return;cy(b,a.k)}if(!(b.j>a.a.A)){var c=b.g;4==c.type&&c.a.Yb()&&(b.g=Ha(Pk(c.a,c)),c=b.g);if(!(c.b||!c.a.Aj(c)||c.a.info.i&&(4==c.type||a.b.g&&!a.b.g.b&&a.b.g.k<c.i))){var d=a.a.B;a.o&&0<a.a.k&&(d=Math.max(d,a.a.k/c.a.info.b));d=a.k+d;if(!(3==c.type&&c.k>d||2<=iy(b)+1)){var d=c.k-a.k,e=c.a.info.b,g=c.a.Yb()?xy(a,e,d):a.a.I,h=yy(a,c.a.info.b),k=!1,e=!1;if(c&&3==c.type&&b.b.Yb()&&c.a!=b.b){var d=xy(a,b.b.info.b,d+(c.startTime+c.duration-c.k)),m=yy(a,b.b.info.b),
514 e=c.a.info.b<b.b.info.b;if(!e||d>=m)k=!0,g=d,h=m}d=h;0<g&&(d=Math.max(a.a.I,g,Math.min(2*g,h)));if(k){c=b.g?b.g.startTime+b.g.duration+sy:0;if(a.a.b&&e)t:{e=Uh(a.j)+d*Vh(a.j)+d/Wh(a.j)+a.k+a.a.L,e=Math.min(e,c),e=Ek(b.b.index,e),e+1<b.b.index.hb()&&(c=b.b.index.b[e+1]),e=c;if(b.pendingRequests_.length){if(b.pendingRequests_[0].g[0].startTime<=e)break t;ey(b)}for(g=b.a.length-1;0<=g;g--)h=b.a[g],h.info.startTime>e&&(b.a.pop(),b.a.length&&b.a[g-1].buffer==h.buffer||(b.j-=h.buffer.byteLength));ay(b)}b.g&&
515 !b.g.g&&(e=new jy(a.a,gy(b)),By(a,e,!0),Yx(b,e));b.g&&(c=b.g?b.g.startTime+b.g.duration+sy:0);d=new jy(a.a,b.b.Ej(c,d))}else d=new jy(a.a,c.qf(d));By(a,d,!1);Yx(b,d)}}}}function By(a,b,c){c=c?2:1;a.a.V&&(c=0);var d=Math.min(2.5,Uh(a.j)),e=Wh(a.j);b.b=new qy(a.j,c,b.U.length,0.95*b.U.length-d*e);a=v(a.Du,a);b.B=a;b.start()}
516 f.Du=function(a){if(!this.ka()){var b=6==a.state&&ky(a);3==a.state||b?(b&&this.u("softerror",209),a.start()):5==a.state?(!this.J&&a.g[0].a.info.a&&(this.J=a.I),Cy(this),z(a.o,function(a){rk(a.info)&&a.info.a.Co(a)}),Na(a.o,function(a){return xk(a)})&&!a.g[0].a.Do()?ty(this):Dy(this,126)):7==a.state||4==a.state?(7==a.state&&this.u("softerror",210),ty(this)):Dy(this,121)}};
517 function Cy(a){if(!a.O&&a.J&&window.performance&&window.performance.getEntriesByName){var b=window.performance.getEntriesByName(a.J);b.length&&(b=b[0],uy("vrst",b.fetchStart),uy("vdns",b.domainLookupEnd),uy("vreq",b.requestStart),uy("fvb",b.responseStart),uy("vrc",b.responseEnd),a.O=!0)}}function ty(a){isNaN(a.I)&&(a.I=H(v(a.Of,a),0))}function Ey(a){isNaN(a.G)&&(a.G=H(v(function(){this.Of();this.G=NaN},a),1E3))}
518 f.Of=function(){this.I=NaN;if(!this.L&&this.g){var a=Math.floor(Math.max(by(this.i),by(this.b)));isNaN(a)||(this.g.Xa(a),this.L=!0)}if(!this.ka())if("prerender"==window.document.webkitVisibilityState)Ey(this);else{this.g&&this.g.Gb()&&vy(this);Zx(this.b);Zx(this.i);fy(this.b);fy(this.i);a=!1;if(this.g){var a=Fy(this,this.b,this.g.rd),b=Gy(this.g.rd,this.k);if(!isNaN(b)||this.b.i&&this.b.i.b)this.b.i&&this.b.i.b&&(b=NaN),a|=Fy(this,this.i,this.g.Zb,b);if(this.b.i&&this.b.i.b&&this.i.i&&this.i.i.b&&
519 !this.g.Zb.updating&&!this.g.rd.updating&&this.g.isOpen()){a=this.g;a.isOpen()&&a.g.endOfStream();return}}this.dm();Ay(this,this.b);Ay(this,this.i);a&&(this.g.Zb.appendBuffer||ty(this))}};f.dm=function(){if(!this.ka()&&!isNaN(this.a.F)){var a=zy(this);!isNaN(this.A)&&Math.abs(this.A-a)/a<this.a.F||(Math.round(a/1024),Math.round(this.A/1024),this.u("bandwidthchange",a),fg("yt-player-bandwidth",{byterate:a},2592E3),this.A=a)}};
520 function Fy(a,b,c,d){if(c.updating)return!0;var e=b.a.length?b.a[0]:null;if(!e)return!1;!b.i||b.i.g||sk(b.i,e.info)||(b.i=null,a.g.isOpen()&&c.abort(),c.g=null);var g;e.info.a.Yb();e.a?g=!1:(g=e.info.a.b,c.g==g?g=!1:(Hy(a,c,g),c.g=g,g=!0));if(g&&c.updating)return!0;g=a.a.G;var h=b.b.info.i?10485760:a.a.k;a.o&&0<h&&(g=Math.max(g,h/b.b.info.b));g=a.k+g;0<=d&&(g=Math.min(g,d));d=$x(b,g);if(!d)return!1;g=new Uint8Array(e.buffer,d.start,d.length);if(!Hy(a,c,g))return!1;for(var k;b.a.length&&(b.a[0].U.end>
521 d.end?(k=b.a[0],h=d.end-b.a[0].U.start+1,h=Math.min(h,k.info.Ha),g=new qk(k.info.type,k.info.a,k.info.U,k.info.j,k.info.startTime,k.info.duration,k.info.ob,h,!1),a=jk(k.U.start,h),g=new vk(g,k.buffer,a,k.a),h=new qk(k.info.type,k.info.a,k.info.U,k.info.j,k.info.startTime,k.info.duration,k.info.ob+h,k.info.Ha-h,k.info.b),a=new hk(a.end+1,k.U.end),a=[g,new vk(h,k.buffer,a,!1)],k=a[0],b.a[0]=a[1]):k=b.a.shift(),a=b,a.i=k.info,a.k&&a.i.g&&(a.k=!1),k.U.end!=d.end););b.a.length&&k.buffer==b.a[0].buffer||
522 (b.j-=k.buffer.byteLength);e.a&&(c.g=e.info.a.b);return!c.appendBuffer||c.updating}function Hy(a,b,c){if(b.appendBuffer)try{b.appendBuffer(c)}catch(d){return!1}else b.append(c);return!a.g.Gb()}function Gy(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 Iy(a,b){if(!a.ka()){var c=Jy(a,a.b,b,a.g&&a.g.rd),d=Jy(a,a.i,c,a.g&&a.g.Zb);a.k=Math.max(b,c,d);a.B=!0;ty(a)}}
523 function Jy(a,b,c,d){if(b.b.Yb())if(d){if(a.o&&a.a.b)return dy(b),cy(b,c);var e=Gy(d,c),g=NaN,h=b.i;h&&(g=Gy(d,h.a.index.b[h.j]));if(e==g)return c;dy(b);b.b.info.a&&b.i&&!b.i.g&&!hy(b)&&(d=new jy(a.a,gy(b)),By(a,d,!0),Yx(b,d));if(isNaN(e))return cy(b,c);cy(b,e+sy)}else cy(b,c);else b.b.i?0!=c&&ey(b):Ky(a,b,!1);return c}
524 function Ky(a,b,c){var d=c?65536:0;c&&!isNaN(a.a.j)&&(d=Math.floor(Math.max(d,a.a.j*b.b.info.b)));d=b.b.mn(d);z(d,function(a){var c=new jy(this.a,a);By(this,c,!0);!rk(a.a[a.a.length-1])&&Yx(b,c)},a);b.b.i=!0;if(b.b.info.a&&c)for(c=0;c<a.a.Q&&!b.g.b;c++)d=new jy(a.a,b.g.qf(49152)),By(a,d,!0),Yx(b,d)}f.H=function(){vy(this);ey(this.i);ey(this.b);this.b=this.i=null;ry.C.H.call(this)};
525 function Dy(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 uy(a,b){var c;b&&(c=window.performance.timing.navigationStart+b);Sp(a,c)};function Ly(){this.G=30;this.B=40;this.k=62914560;this.A=20971520;this.j=2;this.Q=0;this.J=this.L=2;this.I=131072;this.P=15;this.O=2097152;this.F=0.1;this.o=2;this.b=!0;this.a=1800;this.g=this.i=NaN};function My(a,b,c){this.a=a;this.headers=b;this.message=c};function Ny(a,b,c,d,e,g,h){this.a=[];this.g=a;this.k=b.g;this.j=b;this.i=c;this.G=d;this.I=e;this.b=[];this.J=h||null;this.B=this.L=!1;this.A=null;this.o=!0;this.F={};this.listen(this.g,["keymessage","webkitkeymessage"],this.pj);this.listen(this.g,["keyadded","webkitkeyadded"],this.gq);this.listen(this.g,["keyerror","webkitkeyerror"],this.hq);g&&this.b.push(g)}y(Ny,Hl);function Jh(a,b){if(ok(b,kk)){for(var c in a.F)b=me(qe(b,c),c,a.F[c]);a.k=b}else Oy(a,"u")}f=Ny.prototype;
526 f.start=function(){this.ka()||(this.L=!0,this.b.length&&this.pj(this.b.shift()))};f.dispose=function(){Ny.C.dispose.call(this);this.I=this.g=null};f.pj=function(a){this.ka()||a.sessionId!=this.i||(this.B&&a.defaultURL&&Jh(this,a.defaultURL),this.L?(this.A=a,Py(this,a)):this.b.push(a))};f.gq=function(a){this.ka()||a.sessionId!=this.i||(this.B=!0,this.b.length&&this.pj(this.b.shift()))};
527 function Py(a,b){var c={format:"RAW",method:"POST",Bw:b.message,responseType:"arraybuffer",withCredentials:!0,Pa:a.Cw,onError:a.En,S:a};a.J&&(c.headers={Authorization:"Bearer "+a.J});var d=a.k;a.o||(d=me(qe(d,"exclude_customdata"),"exclude_customdata","1"));Qj(d,c)}
528 f.Cw=function(a){if(!this.ka())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];Ya(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 My(d,g,a.subarray(b));break t}e=e.match(/([^:]+):\s+([^]+)/);
529 if(null==e)break;g[e[1]]=e[2]}}a=null}0!=a.a?(b=Yw[a.a.toString()],Oy(this,"f"+a.a,b?b:"ERROR_LICENSE")):(a=a.message,this.g.addKey?this.g.addKey(this.j.a,a,this.G,this.i):this.g.webkitAddKey(this.j.a,a,this.G,this.i))}else this.En(a)};f.hq=function(a){this.ka()||a.sessionId!=this.i||("playready"==this.j.b&&a.errorCode==a.MEDIA_KEYERR_UNKNOWN&&2==a.systemCode&&this.o?(this.o=!1,Py(this,this.A)):Oy(this,"s"+a.errorCode.code+"."+a.systemCode))};f.En=function(a){Oy(this,"r"+a.status)};
530 function Oy(a,b,c){a.ka()||a.I(b,c);a.dispose()};function Qy(a,b,c,d){this.a=[];this.b=a;this.g=b;this.B=c;this.o=d;this.A=null;this.j={};this.F={};this.i=null;this.k=[];this.listen(this.b,["needkey","webkitneedkey"],this.G);this.listen(this.b,["keymessage","webkitkeymessage"],this.J);this.listen(this.b,["keyerror","webkitkeyerror"],this.I)}y(Qy,Hl);Qy.prototype.dispose=function(){Qy.C.dispose.call(this);this.b=null;Hb(this.j,function(a){a.dispose()})};
531 Qy.prototype.G=function(a){a=a.initData;if(!this.i&&Nb(this.j)||"widevine"!=this.g.b){var b=String.fromCharCode.apply(String,a);if(!this.F[b]){this.F[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+
532 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):Ry(this,a)}}};function Ry(a,b){if(!a.ka()){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}}
533 Qy.prototype.J=function(a){if(!this.ka()&&this.b&&!this.j[a.sessionId]){var b=new Ny(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&&Ry(this,this.k.shift())}};Qy.prototype.I=function(a){!this.ka()&&this.b&&(this.j[a.sessionId]||this.o("s"+a.errorCode.code+"."+a.systemCode))};function Sy(a,b,c,d){this.ia=a;this.a=b;this.g=c;this.b=d};function Ty(a){this.a=a}function Uy(a,b){var c=b.ff;return c&&c&&"unknown"!=c?c:(c=a.a.Ch)&&c&&"unknown"!=c?c:"auto"}function Vy(a,b,c){var d,e=Uy(a,b);e&&"auto"!=e&&(d=Wy(b,e));d||(d=Xy(a,b,c));return d}
534 function Xy(a,b,c){var d=b.j,e;if(a.a.Oc){var g=a.a.Oc.clone();Si&&!a.a.th&&(g=(window.screen&&window.screen.width?new B(window.screen.width,window.screen.height):null)||g);g.scale(Si||Zb?window.devicePixelRatio||1:1);e=a.a.xh||g}else e=a.a.xh;t:{g=a=0;null!==e&&(a=e.width,g=e.height);e=16/9;a>Math.round(e*g)&&(a=Math.round(e*g));a*=g;e=null;for(g=0;g<d.length;g++){e=d[g];var h=e.getInfo(),h=h.a.width*h.a.height*("medium"==e.Re()?0.26:0.85)>a,k=!0;e.a&&c&&(k=e.b.info.b+e.g.info.b<c);if(!h&&k){c=e;
535 break t}}c=e}c||(c=b.j[0]);return c}function Wy(a,b){var c=null,d=fk.indexOf(b);if(0<=d)for(;d<fk.length&&!(c=km(a,fk[d]));d++);return c};function Yy(){this.b=this.a=NaN}function Zy(a,b,c){if(a.a==b)return 500<c-a.b;a.a=b;a.b=c;return!1};var $y=[102,107,108];var eh=[0.25,0.5,1,1.5,2];function az(a,b){this.state=a;this.a=b}function Ho(a,b){return P(a.state,b)&&!P(a.a,b)?1:!P(a.state,b)&&P(a.a,b)?-1:0};function bz(a,b){R.call(this);this.la=new Yy;this.A=new xj(v(this.getCurrentTime,this),v(this.fq,this),v(this.hg,this));L(this,this.A);this.O=NaN;this.P=this.I=null;this.o=a;this.ja=new Ty(a);this.da=NaN;this.ga=!1;this.g=this.j=null;this.Q=[];this.V=!1;this.ha=NaN;this.i=new tj;this.B=b;this.J=this.Y=null;this.G=NaN;this.L=new Ko(this);this.b=this.a=null;this.aa=NaN;this.k=null}y(bz,R);f=bz.prototype;
536 f.H=function(){I(this.aa);I(this.xa);jf(this.ha);cz(this);sn(this);Ug(this.j,this.J,this.L,this.a);this.a=this.L=this.i=this.j=this.P=this.la=null};
537 function dz(a,b){a.V=!1;a.O=NaN;a.b&&nj(a.b);ez(a);cz(a);Ug(a.j,a.a);a.j=null;a.A.reset();if(2==a.B||ok(a.o.Y,lk))b.Y=!1,b.rn=!0;a.a=b;a.a.D("dataupdated",a.Rt,a);a.a.D("dataloaded",a.Qt,a);a.a.D("onStatusFail",a.Pt,a);if(b.nf&&b.nf>b.ya){var c=b.nf;a.P&&(a.Rh(a.va),a.va=null);a.P=new $h(1E3*c,2147483646);a.P.Eb.D("onEnter",a.lg,a);a.xk(a.P)}fz(a,"newdata")}function cz(a){jf(a.da);a.k&&(Tg(a.k),a.k=null)}f.getVideoData=function(){return this.a};f.K=function(){return this.o};
538 function gz(a){return!(!a.a||!a.a.j.length)}function hz(a){if(a.a&&(a.a.M||a.a.gf))return!0;ex(a,2);return!1}function iz(a){if(!a.V){var b=new tj;jz(a,uj(b,b.b|8));a.k&&(b=a.k,b.A=x(),b=b.i,b.i.vps=["0.000:N"],b.G=x(),b.F=hf(v(b.ng,b),1E4),b.j.start());a.V=!0;!hz(a)||a.a&&a.a.Fe||(gz(a)||hm(a.a,a.o.mg),gz(a)?kz(a):a.a.Fe||(lz(a)?kz(a):(b=Px(a.o,a.a),pm(a.a,b))))}}
539 function mz(a){if(!a.Q.length){if(!a.A.ug){var b=a.A;b.g=Cj(b);b.ug=!0;b.Xb()}a.Q.length||0<Ji(a.A.b,-2147483648).length||a.u("playbackready",a)}}f.or=function(){var a=this.k,b=this.a.Rj;a.V!=b&&(nz(a,{metric:"heartbeat",tpmt:this.a.Ae}),a.V=b)};function kz(a){a.Q=ab(a.a.I);a.a.eb&&(oz(a,a.a.ra),pz(a,!0));gh(a,"i");a.u("playbackdataloaded")}f.lg=function(a){qz(this);jz(this,!1==a?new tj:new tj(wj()))};
540 function Ch(a,b,c){b={event:"streamingerror",ec:b,v:a.a.M};c&&(b.em=c);w(b,Ox(a.o));a.k&&rz(a.k,b,void 0)}function ex(a,b,c,d){if(Lb(Xw,c))var e=c;else var g=c;jz(a,uj(a.i,128,{errorCode:b,errorDetail:d,message:g,messageKey:e}))}function sz(a,b){a.Q=a.Q.filter(function(a){return b!=a});mz(a)}f.hg=function(){return P(this.i,8)&&!P(this.i,64)&&!P(this.i,2)};function lz(a){return!(!a.a||!a.a.M&&!a.a.gf||a.a.M)}f.fq=function(){return this.i};function tz(a,b){a.b&&sn(a);a.b=b;uz(a)}
541 function sn(a){a.g=null;a.b&&(ez(a),a.L.removeAll(),nj(a.b),a.b=null)}function vz(a){if(a.b){var b=lm(a.a);if(a.a.o&&a.a.o.a){var b=a.a.o,c=b.g,d=b.b;a.g||(a.j||wz(a,b),a.g=new Il(a.b,a.a.ra,c.info.Jb,d.info.Jb),b=a.g,b.b||(b.b=b.g.ht?b.g.a.webkitMediaSourceURL:window.URL.createObjectURL(b.g)),a.za=new Kl(b.b,!1,!0),b=v(a.j.gt,a.j),a.g.j=b);b=a.za}a.b.Bd!=b?xz(a,b):(P(a.i,64)&&jz(a,uj(a.i,a.i.b|8)),lj(a.b),a.a.Cb&&!a.a.eb&&yz(a,Infinity))}}
542 function gh(a,b,c){if(!a.ka()&&gz(a)&&!P(a.i,128)){var d="m"==b,e="m"==a.a.kd;if(d||!e){d&&"auto"==c&&(b="a",d=!1);c&&(a.a.ff=c);var g=NaN;!a.Y||a.o.xa&&"play"!=a.o.La||a.o.oh||(g=a.j?zy(a.j):Wh(a.Y),"i"==b&&(g=a.o.Jc?0.4*g:0.6*g));var h;if(a.o.Hc&&"i"==b){h=a.ja;var k=a.a,m=Wy(k,"medium");m||(m=Xy(h,k,g));h=m}else h=Vy(a.ja,a.a,g);k=h;h=k.getInfo();g=k.a?k.b.info:h;if(a.a.a!=h||a.a.la!=g||d!=e)a.a.o=k,a.a.a=h,a.a.la=g,a.a.kd=b,c&&(a.a.ff=c),k.a?a.j?(c=a.j,e=k.g,k=d,c.ka()||(c.o=k,c.b.b!=e&&(c.b.b=
543 e,wy(c),k&&dy(c.b),e.i||Ky(c,c.b,!1),ty(c)))):wz(a,k):a.hg()&&vz(a),c=b,a.k&&(e=Vy(a.ja,a.a),b=a.k.i,c=new Sy(a.a,h,c,e.xe.Oa),zz(b,"vfs",[c.a.Oa,c.b,b.A,c.g]),b.A=c.a.Oa,c=yw(b.a),0<c.width&&0<c.height&&zz(b,"view",[Math.round(c.width),Math.round(c.height)]),zz(b,"vps",[b.b]),b.ng()),a.u("internalvideoformatchange",a.a,d)}}}
544 function wz(a,b){var c=a.o,d=new Ly;if(c.xa||c.oh)d.F=NaN;c.jd&&(d.o=0);c.gd&&(d.j=3);c.Il&&(d.J=1,d.I=49152);c.kd&&(d.P=30);c.ag&&(d.a=700);c.kb&&(d.i=3);c.mc&&(d.i=1.5,d.g=1048576);c.Zf&&(d.Q=2);c.$f&&(d.L=3);"play"==c.La&&(d=Ob(d),d.G=10,d.B=20,d.k=NaN,d.A=10485760,d.O=1048576,d.b=!1,c.bg&&(d.b=!0));Vi&&dj("crkey")&&(c=Ob(d),c.j=3.5,c.G=20,c.B=40,c.A=20971520,c.b=!0,c.a=700,c.o=2,d=c);a.j=new ry(a.Y,d,b.b,b.g);a.j.D("bandwidthchange",a.bq,a);a.j.D("fatalerror",a.cq,a);a.j.D("softerror",a.dq,a);
545 c=a.j;d=(d=a.a.ya)||0;wy(c);0==d&&(c.i.b.i||Ky(c,c.i,!0),c.b.b.i||Ky(c,c.b,!0));Iy(c,d);uy("gv");H(v(c.dm,c),0)}f.bq=function(){gh(this,"a")};f.cq=function(a){ex(this,a)};f.dq=function(a){Ch(this,a);if(this.k)this.k.onError(a)};function qz(a){P(a.i,64)&&jz(a,uj(a.i,a.i.b&-9));a.b&&a.b.pause()}
546 function yz(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.j&&!isNaN(Math.floor(Math.min(by(a.j.i),by(a.j.b))))&&(e=Math.floor(Math.min(by(a.j.i),by(a.j.b))));b>e&&(b=e,pz(a,!0));0>b&&(b=0)}else b=0;a.a.ya=b;a.G=b;c?a.Sh():(Az(a),d&&(a.J||(a.J=new Oo(a.Sh,d,a)),a.J.start()),Bz(a,!0));a.P&&b>a.a.nf&&(a.Rh(a.va),a.va=null);a.u("seekto",a,b)}else a.a.ya=b||0}
547 function Az(a){P(a.i,32)||(jz(a,uj(a.i,a.i.b|32)),P(a.i,8)&&qz(a),a.u("beginseeking",a))}f.Sh=function(){if(!isNaN(this.G)&&this.b){var a=this.od();!this.a.Cb&&this.G>=Math.floor(a)?(this.G=a,this.u("endseeking",this),qz(this),this.lg()):(this.j&&Iy(this.j,this.G),jj(this.b,this.G))}this.J&&(this.J.dispose(),this.J=null);P(this.i,32)&&(jz(this,uj(this.i,this.i.b&-33)),this.u("endseeking",this))};
548 f.getCurrentTime=function(){if(!isNaN(this.G))return this.G;var a=0;this.b?a=this.b.getCurrentTime():this.a&&(a=this.a.pe);return a};f.od=function(){var a=0;this.b&&(a=this.b.Rd);0==a&&this.a&&(a=this.a.ra);return a};f.qq=function(){var a=new Vx;if(this.Y){var b=this.Y;a.g=b.g;a.j=b.i;a.a=Wh(b)}this.j?(b=this.j,b.g&&(a.b=Wx(b.g.rd.buffered,b.k),a.i=Wx(b.g.Zb.buffered,b.k)),a.a=zy(b),Wh(b.j),Uh(b.j),Vh(b.j)):this.b&&(a.b=Wx(this.b.buffered,this.getCurrentTime()));return a};
549 function Cz(a,b){var c=isNaN(b)?a.getCurrentTime():b,d=a.od();return Infinity==d?1:d?c/d:0}f.sq=function(){var a;if(this.a){a=this.a;var b={};a.a&&(b.fmt=a.a.Oa,a.la&&(b.afmt=a.la.Oa));a.P&&(b.threed=a.Hc);b.plid=a.fb;b.ei=a.k;b.list=a.Ta;b.cpn=a.Da;a.M&&(b.v=a.M);a.Dj&&(b.infringe=1);a.Ld&&(b.splay=1);a.Cb&&(b.live=a.eb?"dvr":"live");a.df&&(b.autoplay=1);a.ga&&(b.sdetail=a.ga);a.md&&(b.partnerid=a.md);a=b}else a={};return a};
550 function Dz(a,b){var c={};if(b){if(a.k){var d=Ez(a.k);d&&w(c,d.Mh())}a.b&&w(c,{vct:a.b.currentTime.toFixed(3),vd:a.b.duration.toFixed(3),vpl:qj(a.b.played),vbu:qj(a.b.buffered),vpa:a.b.paused,vsk:a.b.seeking,vpr:a.b.playbackRate,vrs:a.b.readyState,vns:a.b.networkState,vec:a.b.error?a.b.error.errorCode:null});if(a.j){var d=a.j,e={lct:d.k.toFixed(3),lsk:d.B,lmf:d.o,lbw:Wh(d.j).toFixed(3),lhd:Uh(d.j).toFixed(3),ltd:Vh(d.j).toFixed(3),laa:d.i.i?uk(d.i.i):"",lva:d.b.i?uk(d.b.i):"",lar:d.i.g?uk(d.i.g):
551 "",lvr:d.b.g?uk(d.b.g):""};d.g&&!d.g.Gb()&&(e.lab=qj(d.g.Zb.buffered),e.lvb=qj(d.g.rd.buffered));w(c,e)}P(a.i,384)&&(c.debug_error=a.i.a)}c.debug_videoId=a.a.M;return c}f.xk=function(a){this.A.cx(a)};f.Rh=function(a){this.A.fx(a)};f.Qt=function(a){this.u("commoninfoloaded",a);fz(this,"dataloaded");hm(this.a,this.o.mg);this.V&&kz(this)};f.Rt=function(){fz(this)};f.Pt=function(a){ex(this,parseInt(a.errorcode,10),unescape(a.reason),a.errordetail)};
552 function fz(a,b){a.u("internalvideodatachange",b||"dataupdated",a,a.a)}function uz(a){z("loadstart loadeddata loadedmetadata play playing pause ended suspend progress seeking seeked timeupdate durationchange error waiting abort".split(" "),function(a){this.L.listen(this.b,a,this.Lv)},a)}
553 f.Lv=function(a){var b=a.target;if(b==this.b&&b.currentSrc){switch(a.type){case "durationchange":this.a.eb||(b.Xa(b.duration||0),b=b.Rd,(!this.g||isFinite(b)&&0<b)&&oz(this,b));break;case "ended":jz(this,uj(this.i,4));break;case "loadedmetadata":this.a.ya&&(this.b.currentTime=this.a.ya),this.o.bm&&this.a.ya&&(this.O=this.a.ya,this.b.pause());case "loadeddata":this.aa&&I(this.aa);break;case "loadstart":jf(this.ha);this.ha=hf(v(this.cn,this),100);var b=this.L,c=this.b,d=v(this.cn,b.Ig),c=xf(c,d);b.ae.push(c);
554 break;case "progress":this.O&&this.b.seekable.length&&this.b.seekable.end(0)>this.O&&(this.b.currentTime=this.O,this.O=NaN,this.pa=this.L.listen(this.b,"canplay",this.ft));case "suspend":Bz(this);this.u("onLoadProgress",this,this.b?ih(this.b):0);break;case "seeking":Fz(this);break;case "timeupdate":Fz(this),Bz(this),this.u("onVideoProgress",this,b.getCurrentTime())}this.u("videoelementevent",a);t:if(b=this.i,d=this.la,P(b,128))a=b;else{var c=b.b,e=b.a,g=a.target;switch(a.type){case "ended":if(0>=
555 g.networkState)break;c=wj();e=null;break;case "pause":P(b,32)||P(b,2)||(c=4,P(b,1)&&P(b,8)&&(c|=1),e=null);break;case "playing":c=8;e=null;break;case "abort":if(64==c)break;case "error":c|=256;a=g.error;d=107;if(a&&a.code)switch(a.code){case a.MEDIA_ERR_ABORTED:d=200;break;case a.MEDIA_ERR_NETWORK:d=201;break;case a.MEDIA_ERR_DECODE:d=202;break;case a.MEDIA_ERR_SRC_NOT_SUPPORTED:d=203}e={errorCode:d};Ta(sj,e.errorCode)&&(c|=128);break;case "canplay":c&=-2;break;case "progress":P(b,8)&&(g=a.target.getCurrentTime(),
556 d&&Zy(d,g,a.timeStamp)&&(c|=1));break;case "seeked":c&=-18;break;case "seeking":c|=16;g.inUnbufferedArea()&&(c|=1);c&=-3;break;case "waiting":P(b,2)||(c|=1);break;case "timeupdate":P(b,16)||(c&=-2);c&=-65;break;default:a=b;break t}a=uj(b,c,e)}jz(this,a)}};
557 f.cn=function(){if(this.b&&0<this.b.getCurrentTime()&&0<this.b.Rd&&!this.a.Im){jf(this.ha);this.a.Im=!0;if(this.k){var a=this.k;if(!a.g){var b=Ez(a,"playback");a.a.Xl&&(a.L=[10+a.a.Vf,10,10,40+a.a.nh-a.a.Vf,40],jf(a.I),a.I=NaN,a.I=hf(v(a.ha,a),100),b.cg=Gz(a,!0));b.dg=!0;b.A=a.j();b.send();if(a.b.Nc&&!a.g){var b=a.b,c=a.a,b={noflv:"1",html5:"1",video_id:c.M,cpn:c.Da,plid:c.fb,ei:c.k,referrer:Rx(b),eurl:b.b,framer:b.P,feature:b.j,fmt:c.a?c.a.Oa:0,ptk:c.A,skl:c.Yl,access_token:c.G,ucid:c.lc};w(b,Hz(a));
558 b=S(a.b.lb+"user_watch",b);sa(b)}a.a.A&&sa(S(a.b.lb+"ptracking",{html5:"1",video_id:a.a.M,cpn:a.a.Da,plid:a.a.fb,ei:a.a.k,ptk:a.a.A,oid:a.a.Va,ptchn:a.a.Ra,pltype:a.a.jb,content_v:a.b.k}));if(a.a.Wl&&a.b.ze&&!a.g){var b=a.b,c=a.a,d={noflv:1,video_id:c.M,cpn:c.Da,el:b.Z,ps:b.La,referrer:Rx(b),eurl:b.b,framer:b.P,fmt:c.a?c.a.Oa:0,ptk:c.A,subscribed:c.g,t:c.hd};b.Tb&&(d.autoplay="1");c.Ld&&(d.splay="1");0<c.ya&&(d.start=1E3*c.ya);c.gj&&(d.tmi="1");b=S(a.Q,d);sa(b)}a.a.fg&&nz(a,{metric:"playback"});a.g=
559 !0}}jf(this.da);this.a.fg&&(this.k.g||this.a.Vl)&&(this.da=hf(v(this.or,this),3E4));this.u("playbackstarted")}};f.ft=function(){this.pa&&(this.L.ac(this.pa),this.pa=void 0,lj(this.b))};
560 function Bz(a,b){if(a.b){var c=a.getCurrentTime();if(a.j){var d=a.j;if(!d.B||d.k<=c&&c<d.k+10)d.k=c,d.B=!1;Ey(d)}a.a.eb&&c>a.od()&&(d=a.od(),0==d&&(d=c),oz(a,1.2*d));var d=Cz(a),e=0;a.b.buffered&&0<a.b.buffered.length&&(a.a.eb?a.ga||(e=(1>a.b.seekable.length?NaN:a.b.seekable.end(a.b.seekable.length-1))/a.od()):e=a.b?ih(a.b):0);5<c&&(a.a.ya=c);a.xa&&I(a.xa);a.b.paused||a.b.ended||(a.xa=a.b.played&&0==a.b.played.length?H(v(a.Xm,a),100):H(v(a.Xm,a),1E3));a.a.pe=c;if(!b&&a.hg()){var g=a.a.Rj,h=a.a.pe;
561 0<g&&h>g&&(a.a.Ae+=h-g);a.a.ra&&a.a.J&&a.a.Ae>=a.a.J&&(g=a.k,g.g&&g.a.J&&(h=Ez(g,"delayplay"),h.$i=!0,h.A=g.j(),h.send()),a.a.J=NaN)}if(a.a.Zl&&(g=a.a.Yj,h=a.a.pe,1==g&&0<h||2==g&&20<=h||3==g&&30<=h)){g=a.k;if(g.g){var h=g.b,k=g.a,g={ns:"yt",html5:"1",docid:k.M,plid:k.fb,ei:k.k,cpn:k.Da,fmt:k.a?k.a.Oa:0,el:h.Z,ps:h.La,subscribed:k.g,yttk:"1",st:g.j(),et:g.j(),ctp:k.Yj,vid:h.aa},g=S("//s2.youtube.com/s",g);sa(g)}a.a.Yj++}a.u("progresssync",a,c,d,e,b);a.a.Rj=c}}
562 f.Xm=function(){this.b&&(this.b.Yo(),P(this.i,8)&&Zy(this.la,this.getCurrentTime(),Date.now())&&jz(this,uj(this.i,this.i.b|1)),Bz(this))};
563 function jz(a,b){if(b.b!=a.i.b||b.a!=a.i.a){var c=new az(b,a.i);a.i=b;a.o.tg&&P(b,8)&&0<Ho(c,256)&&201==b.a.errorCode&&setTimeout(v(function(){this.b&&(this.a.o&&!this.a.o.a&&this.b.load(),vz(this))},a),500);0>Ho(c,8)&&pz(a,!1);0<Ho(c,32)&&pz(a,!1);a.a&&a.a.Cb&&a.a.eb&&P(c.state,2)&&(oz(a,a.getCurrentTime()),Bz(a,!0));P(b,256)&&Iz(a,b);a.k&&Jz(a.k,c);Aj(a.A,c);a.u("statechange",c)}}
564 function Iz(a,b){var c=b.a;jf(a.da);if(a.a&&a.a.fg&&Ta($y,c.errorCode)){var d=a.k,c=c.errorCode;d.Y||(d.Y=new Rn("error-__ec__"));c={metric:Vn(d.Y,{ec:c})};nz(d,c)}}function Fz(a){P(a.i,2)||P(a.i,32)||(a.G=NaN)}function pz(a,b){a.a&&a.a.eb&&a.ga!=b&&(a.ga=b,a.u("liveviewshift",b))}function xz(a,b){a.o.za&&pj(a.b,b.a||ok(b.b,kk));hj(a.b,b);a.g&&!b.a&&(a.g=null);a.a.a&&a.a.a.g&&Kz(a);I(a.aa);a.aa=H(v(a.mu,a),15E3);a.o.fm?H(v(function(){lj(this.b)},a),0):lj(a.b)}
565 function Kz(a){var b=a.a.a&&a.a.a.g||null;b&&!a.I&&a.b&&((b=Dl(a.b,a.a.a.Jb,b))?(a.I=new Qy(a.b,b,v(a.hu,a),v(a.gu,a)),a.I.A=a.a.G,L(a,a.I)):ex(a,203,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK"))}function ez(a){a.I&&(a.I.dispose(),a.I=null)}f.hu=function(a){var b=Ox(this.o);b.cpn=this.a.Da;this.a.Q&&(b.vvt=this.a.Q);Rb(a.F,b);Jh(a,a.k);this.u("newlicensesession",a)};f.gu=function(a,b,c){ex(this,c?5:206,q(b)?b:"ERROR_LICENSE",a)};f.mu=function(){Ch(this,102);if(this.k)this.k.onError(102);this.u("loadsofttimeout")};
566 function oz(a,b){a.b&&a.b.Xa(b);a.a.ra!=b&&(a.a.ra=b,fz(a))};function Lz(){}ca(Lz);f=Lz.prototype;f.jc=null;f.Ji=null;f.load=function(a){if(this.jc)return po(this.jc);this.jc=new io;this.Ji=a?a:"3";oo(ro("3.1"==this.Ji?"//s0.2mdn.net/instream/html5/ima3.js":"//s0.2mdn.net/instream/html5/ima.js",{timeout:1E4}),this.Cx,this.Jp,this);return this.jc};f.getVersion=function(){return this.Ji};f.Cx=function(){"3.1"==this.Ji&&this.jc?this.jc.b():(google.ima.SdkLoader.setCallbacks(v(this.jc.b,this.jc),v(this.Mv,this)),google.ima.SdkLoader.load("3",void 0))};
567 f.Mv=function(a){this.Jp(Error("Google Ads SDK Failed to load: "+a))};f.Jp=function(a){this.jc.a(a)};function Mz(a){return a?-1!=a.toString().search(/(?:true|1)/i):!1}function Nz(a,b){if(a){var c="getErrorCode"in a?a.getErrorCode():null;c?b.error_code=c:(c="getMessage"in a&&ha(a.getMessage)&&"3.1"==Lz.getInstance().getVersion()?a.getMessage():a.message,50<c.length&&(c=c.substring(0,47)+"..."),b.error_message=c)}}
568 function Oz(a,b){if(a&&"3.1"==Lz.getInstance().getVersion()){var c=a.getAdId();if(c){var d=a.getWrapperAdIds()||[];b.ad_id=$a(d,c).join(",");if(c=a.getAdSystem())d=a.getWrapperAdSystems()||[],b.ad_sys=$a(d,c).join(",");a.isSkippable()&&(b.skip=1)}}}function Pz(a,b){if(a[b])return Mz(a[b]);var c=b.toLowerCase(),d;for(d in a)if(d&&d.toLowerCase()==c)return Mz(a[d]);return!1}
569 function Qz(a){var b="";a&2&&a&1?b="video":a&2?b="skippablevideo":a&1&&(b="standardvideo");a&4&&(b&&(b+="_"),b+="text_image_flash");return b};function Rz(){var a=n("yt.www.watch.ads.handleSetAfvCompanionVars");a&&a()}function Sz(a){var b=n("yt.www.watch.ads.handleMoveGutCompanion");b&&b(1==a?!0:!1)}function Tz(a){var b=n("yt.www.watch.ads.handleShowAfvCompanionAdDiv");b&&b(0<(a&3))}function Uz(){var a=n("yt.www.watch.ads.handleHideCompanion");a&&a()};function Vz(a,b){return Ta(a.o,b)};function Wz(a,b){this.a=a;this.g=b}Wz.prototype.j=null;Wz.prototype.b=NaN;function Xz(a,b,c){a.a.u("AD_LOGGING_EVENT",b,c)}function Yz(a){Zz(a);var b=$z(a);if(a.i){var c=aA(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}Xz(a,15,b)}function bA(a){Zz(a);var b=$z(a);if(isNaN(a.b))Zz(a);else{var c=x()-a.b;b.ad_stl=c}Xz(a,4,b)}function cA(a){Zz(a);var b=$z(a),c=a.a.Xo();c?b.ad_fmt=c:Zz(a);Xz(a,5,b)}
570 function $z(a){var b={},c=a.a.ia,d=a.a.wf(),e=a.a.Go();Oz(a.a.Ng(),b);d&&0<d&&(b.ad_len=d);c&&c.M?b.ad_v=c.M:e&&(c=Ij(e),b.ad_dom=c,a.g.ea.k||Vz(a.g.K(),"921806")||Vz(a.g.K(),"921805"))&&(b.ad_v_url=e);b.at=a.a.getType();return b}function Zz(a){a.j||(a.j="InstreamAdDisplay ("+a.a.getType()+")")};function dA(a,b,c,d){R.call(this);this.a=b;this.a.D("onVolumeChange",this.ct,this);this.a.D("control_toggle_play_pause",this.Ym,this);this.a.D("control_play",this.Jh,this);this.a.D("control_pause",this.Xj,this);this.b=c;this.j=d;this.i=new Wz(this,this.a);this.o=a+"_2";this.g=new Ko(this)}y(dA,R);f=dA.prototype;f.ab=null;f.ia=null;f.Kf=!1;f.Rg=null;f.Qg=null;f.Vg=null;
571 f.show=function(){this.i.b=x();var a="";if("3.1"==eA())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){fA(this,c);return}}if(a){b=Gj(a);b=b.v||b.video_id;if(!b){var d=ge(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 nh({video_id:b,dash:"0"}):null}else a=null;this.ia=a;var e;this.ia?(this.ia.Ld=!0,e={video_id:this.ia.M},
572 this.ia.D("onStatusFail",this.yn,this),this.ia.D("dataloaded",this.xn,this),a=this.a.K(),a=new Ix(a.a),a.Z="adunit",a.Tb=!0,a=Px(a,this.ia),pm(this.ia,a)):gA(this);hA(this.a,-1,e);this.$m()};function iA(a){a.ia&&(a.ia.$("onStatusFail",a.yn,a),a.ia.$("dataloaded",a.xn,a))}
573 f.xn=function(){iA(this);var a=this.a.K();hm(this.ia,a.mg);(a=Vy(new Ty(this.a.K()),this.ia))?(a=a.i)?(a=new re(ij(a)),a.a.set("autoplay","1"),a=a.toString(),"3.1"==eA()?this.b.setMediaUrl(a):this.b.getSelectedCreative().setMediaUrl(a),gA(this)):fA(this,Error("Failed to determine ad media resource.")):fA(this,Error("Failed to determine ad media format."))};
574 function gA(a){Sz(1);Tz(1);a.a.K();var b=a.a.b,c=rn(b);b.X.K().tb||bd(c)||nn(b).appendChild(c);a.ab=c;a.Vg=Q(a.a.a);a.a.ea.L?F(E("video-ad-status-bar")):(b=Q(a.a.a),a.Rg=E("video-ad-time-left",b),b=E("html5-ad-progress-list",b),c=Xc("div"),Em(c,["html5-ad-progress","html5-progress-section"]),b.appendChild(c),a.Qg=c,a.g.listen(a.ab,"timeupdate",a.bu));Em(a.Vg,["ad-showing","ad-interrupting"]);a.g.listen(qn(a.a.b),"mouseup",a.fu);a.g.listen(a.ab,"waiting",a.$m);a.a.D("onResize",a.zk,a);try{a.g.listen(a.b,
575 google.ima.AdErrorEvent.Type.AD_ERROR,a.du);a.g.listen(a.b,google.ima.AdEvent.Type.CLICK,a.cu);a.g.listen(a.b,google.ima.AdEvent.Type.COMPLETE,a.eu);a.g.listen(a.b,google.ima.AdEvent.Type.PAUSED,a.Kn);a.g.listen(a.b,google.ima.AdEvent.Type.STARTED,a.Ln);a.zk();var d=a.a,e=d.b,g=jA(d);e.X.K().tb&&(Ad(e.a,g),pd(e.a,0,0));a.b.start()}catch(h){fA(a,h)}}
576 f.Ln=function(){this.Kf=!0;this.k||(this.k=!0,bA(this.i),kA(this.a,1));if(0==this.wf()){var a=this.ab;a.Xa(a.duration||0)}this.a.mb(!0);hA(this.a,1);this.u("adPlay",this)};f.Kn=function(){this.Kf=!1;this.a.mb(!1);hA(this.a,2)};f.eu=function(){cA(this.i);this.Kf=!1;hA(this.a,0);kA(this.a,2);this.u("adEnd",this)};f.du=function(a){fA(this,a.getError())};function fA(a,b){a.Kf=!1;hA(a.a,0);a.u("adError",b)}f.yn=function(){iA(this);fA(this,Error("Request to get video data failed."))};
577 f.cu=function(){Yz(this.i);"3.1"==eA()||this.a.ea.Q||H(v(this.Jh,this),0);this.u("select")};f.fu=function(a){a=new A(sf(a),tf(a));this.i.i=a};f.bu=function(){var a=Dn(this.b.getRemainingTime());this.Rg.innerHTML=a;0==this.wf()&&(a=this.ab,a.Xa(a.duration||0));a=this.wf()?this.ab.getCurrentTime()/this.wf():0;a=Math.round(1E3*a)/10;this.Qg.style.width=a+"%"};f.$m=function(){!this.Kf&&this.k||hA(this.a,3)};
578 f.H=function(){this.a.$("control_toggle_play_pause",this.Ym,this);this.a.$("control_play",this.Jh,this);this.a.$("control_pause",this.Xj,this);this.a.$("onResize",this.zk,this);this.g.removeAll();iA(this);this.b.destroy();this.ab&&(on(this.a.b),this.ab=null);this.Rg&&(this.Rg.innerHTML="",this.Rg=null);this.Qg&&(F(this.Qg),this.Qg=null);this.Vg&&(Fm(this.Vg,["ad-showing","ad-interrupting"]),this.Vg=null);dA.C.H.call(this)};f.getType=function(){return this.o};f.Ng=function(){return this.b.getCurrentAd()};
579 f.wf=function(){return this.ab?this.ab.Rd:null};f.Xo=function(){return this.ab?this.ab.getType():null};f.Go=function(){return this.ab&&this.ab.currentSrc?this.ab.currentSrc:null};f.ct=function(a){a=a.muted?0:a.volume;isNaN(a)||(a=wb(a/100,0,1),this.b.setVolume(a))};f.Ym=function(){this.Kf?this.Xj():this.Jh()};f.Jh=function(){this.ab&&(this.b.resume(),this.Ln())};f.Xj=function(){this.ab&&(this.b.pause(),this.Kn())};f.zk=function(){var a=jA(this.a);this.b.resize(a.width,a.height,google.ima.ViewMode.NORMAL)};function lA(a,b,c){R.call(this);this.a=b;this.a.D("control_toggle_play_pause",this.Wm,this);this.a.D("control_play",this.Ih,this);this.a.D("control_pause",this.Vj,this);this.b=c;this.j=new Wz(this,this.a);this.o=a+"_2";this.i=new Ko(this);this.g=mA(b);this.g.D("statechange",this.Um,this);this.g.D("internalvideodatachange",this.Vm,this);this.ia=null}y(lA,R);f=lA.prototype;f.bl=!1;f.Bg=null;f.Ag=null;f.Cg=null;
580 f.show=function(){var a=this.a;nA(a.app,mA(a));this.j.b=x();Sz(1);Tz(1);this.Cg=Q(this.a.a);if(this.a.ea.L)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=Xc("div");Em(b,["html5-ad-progress","html5-progress-section"]);a.appendChild(b);this.Ag=b;this.g.D("progresssync",this.an,this)}Em(this.Cg,["ad-showing","ad-interrupting"]);this.i.listen(qn(this.a.b),"mouseup",this.wt);this.a.D("onResize",this.$j,this);try{this.i.listen(this.b,
581 google.ima.AdErrorEvent.Type.AD_ERROR,this.ut),this.i.listen(this.b,google.ima.AdEvent.Type.CLICK,this.tt),this.i.listen(this.b,google.ima.AdEvent.Type.COMPLETE,this.vt),this.i.listen(this.b,google.ima.AdEvent.Type.PAUSED,this.gn),this.i.listen(this.b,google.ima.AdEvent.Type.STARTED,this.hn),this.$j(),this.b.start()}catch(c){oA(this,c)}};f.Vm=function(a,b,c){"newdata"==a&&this.ia!=c&&hA(this.a,-1,{video_id:c.M});this.ia=c};f.Um=function(a){a=a.state;P(a,128)&&oA(this,Error(a.a.message||"Video player error."))};
582 f.hn=function(){this.bl=!0;this.k||(this.k=!0,bA(this.j),kA(this.a,1));hA(this.a,1);this.u("adPlay",this)};f.gn=function(){this.bl=!1;hA(this.a,2)};f.vt=function(){cA(this.j);hA(this.a,0);kA(this.a,2);this.u("adEnd",this)};f.ut=function(a){oA(this,a.getError())};function oA(a,b){a.g.lg();hA(a.a,0);a.u("adError",b)}f.tt=function(){Yz(this.j);"3.1"==eA()||this.a.ea.Q||H(v(this.Ih,this),0);this.u("select")};f.wt=function(a){this.j.i=new A(a.pageX,a.pageY)};
583 f.an=function(a,b,c){this.Bg.innerHTML=Dn(a.od()-b);a=Math.round(1E3*c)/10;this.Ag.style.width=a+"%"};
584 f.H=function(){this.a.$("control_toggle_play_pause",this.Wm,this);this.a.$("control_play",this.Ih,this);this.a.$("control_pause",this.Vj,this);this.a.$("onResize",this.$j,this);this.i.removeAll();this.g.D("statechange",this.Um,this);this.g.$("internalvideodatachange",this.Vm,this);this.g.$("progresssync",this.an,this);var a=this.a;a.g&&pA(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&&(Fm(this.Cg,["ad-showing","ad-interrupting"]),
585 this.Cg=null);lA.C.H.call(this)};f.getType=function(){return this.o};f.Ng=function(){return this.b.getCurrentAd()};f.wf=function(){return this.g.od()};f.Xo=function(){return this.ia&&this.ia.a?this.ia.a.Jb:null};f.Go=function(){if(!this.ia)return null;var a=lm(this.ia);return a?ij(a):null};f.Wm=function(){this.bl?this.Vj():this.Ih()};f.Ih=function(){this.b.resume();this.hn()};f.Vj=function(){this.b.pause();this.gn()};f.$j=function(){var a=jA(this.a);this.b.resize(a.width,a.height,google.ima.ViewMode.NORMAL)};function qA(a,b){this.b=a;this.a=b;this.b.getType()}function rA(a,b,c){a.b.u("AD_LOGGING_EVENT",b,c)}function sA(a){var b={};Oz(a.b.Ng(),b);a.j&&a.g&&(b.ot=a.g-a.j);var c;c=a.a.a.app.K().pb||a.a.ea.k?2:a.a.K().Nd?1:0;b.ad_ps=c;b.at=a.b.getType();return b};function tA(a,b,c){R.call(this);this.b=b;this.a=c;this.i=new qA(this,b);this.k=a+"_1";this.g=new Ko(this)}y(tA,R);f=tA.prototype;f.Xd=null;f.fn=!1;
586 f.show=function(){V(Q(this.b.a),"ad-showing");this.Xd=nn(this.b.b);V(this.Xd,"ad-overlay");this.g.listen(this.Xd,"mouseup",this.nt);try{Gd(this.Xd);this.g.listen(this.a,google.ima.AdEvent.Type.USER_CLOSE,this.jt);this.g.listen(this.a,google.ima.AdEvent.Type.CLICK,this.lt);this.g.listen(this.a,google.ima.AdErrorEvent.Type.AD_ERROR,this.kt);uA(this,google.ima.ViewMode.NORMAL);this.zg();this.a.start();var a=this.i;a.j=x();var b=sA(a);rA(a,3,b);this.fn=!0;this.b.D("onResize",this.zg,this);this.b.D("onStateChange",
587 this.Zm,this);this.u("adEnd",this)}catch(c){this.u("adError",c)}};f.Ng=function(){return this.a.getCurrentAd()};f.getType=function(){return this.k};f.H=function(){this.g.removeAll();this.b.$("onResize",this.zg,this);this.b.$("onStateChange",this.Zm,this);W(Q(this.b.a),"ad-showing");this.a&&(this.a.destroy(),this.a=null);this.Xd&&W(this.Xd,"ad-overlay");this.Xd=null;tA.C.H.call(this)};f.jt=function(){var a=this.i;a.g=x();var b=sA(a);rA(a,6,b)};
588 f.lt=function(){Vm(this.b);var a=this.i;a.g=x();var b=sA(a);if(a.i){var c=aA(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}rA(a,100,b)};f.nt=function(a){this.i.i=a.target==a.currentTarget?null:new A(a.pageX,a.pageY)};f.kt=function(a){a=a.getError();this.u("adError",a)};f.Zm=function(a){P(a.state,16)&&uA(this,google.ima.ViewMode.NORMAL)};function uA(a,b){a.j!=b&&(a.j=b,a.fn&&a.zg())}
589 f.zg=function(){var a=Gd(this.Xd);this.a.resize(a.width,a.height,this.j)};function vA(a,b){R.call(this);this.ca=a;this.a=b}y(vA,R);vA.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 wA(a,b){tA.call(this,1,a,b)}y(wA,tA);wA.prototype.zg=function(){};wA.prototype.getType=function(){return"1_3"};function xA(a,b,c,d){R.call(this);this.Ba=b;this.b=a;this.start=c;this.g=d;this.a=null}y(xA,R);f=xA.prototype;f.hk=!0;f.qd=!1;f.isVisible=!0;f.Qe="unloaded";f.Ok=!1;function yA(a){return 0==a.start?zA(a)&&AA(a)?-2147483648:0:-1==a.start||-2==a.start?2147483647:1E3*a.start}function zA(a){return"loaded"==a.Qe||"error"==a.Qe}function AA(a){if(!zA(a))throw Error("Preroll status is undefined before ad load.");return 0==a.start&&a.qd}
590 function BA(a){a.Qe="loading";var b=a.g.shift();b?(0==a.start&&CA(a.b,"nl"),b=b.create(a.start,a.Ba,a.b),L(a,b),oo(b.load(),a.Hv,a.Gv,a)):(DA(a.b,2,EA(a,{})),a.Qe="error",FA(a))}f.getId=function(){return this.Ba};function GA(a){a.a.$("adEnd",a.yo,a);a.a.$("adError",a.Bo,a);a.a.$("AD_LOGGING_EVENT",a.zo,a);a.a.$("select",a.Ao,a)}f.Gv=function(a){a instanceof jo||BA(this)};
591 f.Hv=function(a){this.start=a.startTime;this.a=a.Tt;L(this,this.a);0==this.Ba&&(a=this.a.getType(),this.b.i.at=a);this.a instanceof dA||this.a instanceof lA?this.qd=!0:this.a instanceof vA?this.isVisible=!1:this.a instanceof wA&&(this.isVisible=!1);this.Qe="loaded";FA(this)};function FA(a){a.u("adBreakComplete",a)}
592 f.show=function(){this.Ok?this.a instanceof tA&&uA(this.a,google.ima.ViewMode.NORMAL):(this.Ok=!0,this.a instanceof dA&&CA(this.b,"bs"),this.a.D("adEnd",this.yo,this),this.a.D("adError",this.Bo,this),this.a.D("AD_LOGGING_EVENT",this.zo,this),this.a.D("select",this.Ao,this),this.a.show())};f.yo=function(){if(this.qd){GA(this);var a=this.b;a.ea.gd&&!a.qj&&(sa(a.K().lb+"mac_204?action_fcts=1"),a.qj=!0)}FA(this)};f.Bo=function(a){if(a){var b={};Nz(a,b);EA(this,b);HA(this.b,32,b)}GA(this);FA(this)};
593 f.zo=function(a,b){EA(this,b);DA(this.b,a,b)};f.Ao=function(){this.hk=!1};function EA(a,b){b.sst=a.start;b.sidx=0};function IA(a){this.iq=a}function JA(a){try{var b=Yv(a).getElementsByTagName("AdBreak"),c=La(b,function(a){a=a.getAttribute("time");return Fa(a)});return new IA(c)}catch(d){return new IA([0])}};function KA(a,b,c,d){this.i=a;this.j=b;this.b=c;this.k=d}KA.prototype.g="";KA.prototype.a="";function LA(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 MA(a,b,c,d,e){this.j=a;this.g=b;this.B=c;this.ca=d;this.b=e;this.a=new KA(b,this.j,d,e);this.F=new Ko(this);this.i=new Ko(this)}y(MA,K);f=MA.prototype;f.ho=null;f.xd=null;
594 f.load=function(){if(this.xd)return this.xd;this.xd=new io;var a=this.ca.ea.k?this.ca.K().Oc||NA:Cd(Q(this.ca.a)),b;this.ca.ea.a?b=!1:(b=0<(this.b&3)?190:200,b=200>a.width||a.height<b);if(b){b=this.a;var c=LA(b);c.ck_wh=a.width+"x"+a.height;HA(b.b,14,c);this.Se(Error("The player size is too small."))}else oo(this.ca.pg,this.Mu,this.Fd,this);return this.xd};
595 f.Nk=function(){var a=new google.ima.AdsRenderingSettings;a.baseYouTubeUrl=this.ca.K().lb;a.contentId=this.ca.getVideoData().M;a.useStyledNonLinearAds=!0;a.disableVideoAdUi=!this.ca.ea.L;a.useVideoAdUi=this.ca.ea.L;a.youTubeAdNamespace=this.j;return a};function OA(a,b){a.ho=b;var c=b.getType();a.a.g=c}function PA(a){a=a.g;return 0==a||-1==a?a:1E3*a}
596 f.Mu=function(a){var b=this.a;DA(b.b,9,LA(b));b=new google.ima.AdsRequest;b.adTagUrl=this.k();var c=this.ca.K().Oc||NA;b.linearAdSlotWidth=c.width;b.linearAdSlotHeight=c.height;b.nonLinearAdSlotWidth=c.width;b.nonLinearAdSlotHeight=100;"3.1"==eA()&&(b.isYouTube=!0);var c=this.b,d=n("yt.www.watch.ads.setGutSlotSizes");d&&d(0<(c&3),0<(c&12));this.F.listen(a,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Gu);this.F.listen(a,google.ima.AdErrorEvent.Type.AD_ERROR,this.Fu);this.ni(a,b)};
597 f.Gu=function(a){if(a.getUserRequestContext()===this){try{var b;if("3.1"==eA()){var c=this.Nk();b=a.getAdsManager({},c)}else b=a.getAdsManager({})}catch(d){this.Fd(d);return}this.i.listen(b,google.ima.AdEvent.Type.LOADED,v(this.Ew,this,b));this.i.listen(b,google.ima.AdErrorEvent.Type.AD_ERROR,v(this.Dw,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=jA(this.ca);
598 try{b.init(a.width,a.height,google.ima.ViewMode.NORMAL)}catch(e){b.destroy(),this.Fd(e)}}};f.Ew=function(a,b){this.i.removeAll();var c=b.getAd(),d=c.isLinear(),e=this.a,g=LA(e);g.ad_man=d?"instream":"overlay";DA(e.b,12,g);e="";"3.1"==eA()&&(e=b.getAdData().mediaUrl);switch(d?this.Ug(a,c,e):this.Pe(a,c)){case 0:QA(this);break;case 1:a.destroy();this.Se(Error("Unable to create a display state."));break;case 2:c=this.a;HA(c.b,21,LA(c));a.destroy();this.Se(Error("Fallback to next ad."));break;default:a.destroy()}};
599 f.Dw=function(a,b){this.i.removeAll();a.destroy();this.Fd(b.getError())};f.Fu=function(a){var b=a.getError();b.getType()==google.ima.AdError.Type.AD_LOAD&&a.getUserRequestContext()===this&&this.Fd(b)};f.Ug=function(a,b,c){b=b.getAdId();this.a.a=b;a=this.ca.ea.P?new lA(this.j,this.ca,a):new dA(this.j,this.ca,a,c);OA(this,a);return 0};f.Pe=function(a,b){var c=b.getAdId();this.a.a=c;OA(this,new tA(this.j,this.ca,a));return 0};
600 f.Fd=function(a){if(a instanceof jo)this.xd.cancel();else{var b=this.a,c=LA(b);a&&Nz(a,c);HA(b.b,32,c);this.Se(a)}};function QA(a){a.xd.b({Tt:a.ho,startTime:a.g})}f.Se=function(a){this.xd.a(a)};f.H=function(){this.F.removeAll();this.i.removeAll();this.xd&&this.xd.cancel();MA.C.H.call(this)};f.ni=function(a,b){try{a.requestAds(b,this)}catch(c){this.Fd(c)}};function RA(a,b){this.a=a;this.b=b};function SA(a){vA.call(this,a,"")}y(SA,vA);SA.prototype.getType=function(){return"2_3"};SA.prototype.Ng=function(){return null};function TA(a,b,c,d){MA.call(this,2,a,b,c,d);this.o=new RA(this.ca.ea,this.ca.K());Rz()}y(TA,MA);TA.prototype.Nk=function(){var a=TA.C.Nk.call(this);a.a=0==this.B;a.b=!0;return a};
601 TA.prototype.k=function(){var a=this.o,b=this.b,c=PA(this),d={};d.eid=a.a.ha;d.videoad_start_delay=c;d.scs=a.a.oe;d.client=a.a.eg;d.description_url=a.a.pa;d.loeid=a.a.Zf;d.cust_gender=a.a.Ic;d.host=a.a.host;d.hl=a.b.i;d.max_ad_duration=a.a.$f;d.url="embedded"==a.b.Z&&a.b.b?a.b.b:a.a.pa;a.a.Kc&&(d.adtest="on");isNaN(a.a.ga)||(d.cust_age=a.a.ga);isNaN(a.a.za)||(d.hostTierId=a.a.za);a.a.jb&&(d.yt_pt=a.a.jb);a.a.mc&&(d.video_cpm=a.a.mc);a.a.G&&(d.as_dbp=a.a.G);d.ytdevice=a.a.ag;d.ad_type=Qz(b);0<(b&3)?
602 a.a.Ca&&(d.channel=a.a.Ca.join("+")):b&4&&a.a.Va&&(d.channel=a.a.Va.join("+"));a.a.Mc&&(d.lsv=1);a.a.bg&&(d.tfcd=1);var a=d,b={},e;for(e in a)ea.call(void 0,a[e])&&(b[e]=a[e]);return"//googleads.g.doubleclick.net/pagead/ads?"+Ej(b,"&")};TA.prototype.Pe=function(a,b){if(this.ca.ea.a)return 1;0==this.g&&(this.g=10,this.a.i=10,DA(this.ca,1));Tz(this.b);return TA.C.Pe.call(this,a,b)};
603 TA.prototype.Se=function(a){var b=this.ca.ea;b.a?TA.C.Se.call(this,a):b.Ma||this.b&4?(OA(this,new SA(this.ca)),QA(this)):TA.C.Se.call(this,a)};function UA(a,b){if(a){this.Hp=a;this.wp=b;var c,d=this.Hp,e=d.indexOf(";sz=");c=Dj(d.substring(e),";");d=d.substring(0,e).split("pfadx");if(c=2!=d.length?null:{yx:d[0],zx:d[1],Ax:c})this.vp=c.yx,this.xp=c.zx,this.yp=c.Ax}}f=UA.prototype;f.Hp="";f.vp="";f.wp=!1;f.Fl="";f.xp="";f.yp=null;
604 function VA(a,b){var c=[];b&1&&c.push("480x360");b&2&&c.push("480x361");b&12&&c.push("480x70");var d=[],e,g;b&12&&(d.push("300x250"),e="watch-channel-brand-div",g=1);0<(b&3)&&(d.push("300x60"),e="watch-longform-ad",g=1);c={Ap:e,lh:c,Dp:g,px:!0,El:d};d=Pb(a.yp);c.ox&&(d.pos=c.ox);c.Dp&&(d.tile=c.Dp.toString());c.Ap&&(d.kmyd=c.Ap);c.px&&(t(d["!c"])?d["!c"].push("html5"):d["!c"]=d["!c"]?[d["!c"],"html5"]:"html5");c.El&&0<c.El.length&&a.wp&&(d.ciu_szs=c.El.join(","));d.dcmt="text/xml";cj()&&(d.kmob="ps3");
605 a.Fl||(a.Fl=Math.floor(999999999*Math.random()).toString());d.ord=a.Fl;c.lh&&c.lh.length&&"sz"in d&&delete d.sz;d=Ej(d,";");c.lh&&c.lh.length&&(d="sz="+c.lh.join(",")+";"+d);return[a.vp,"pfadx",a.xp,";",d,"?"].join("")};function WA(a,b,c,d){MA.call(this,1,a,b,c,d)}y(WA,MA);WA.prototype.k=function(){return VA(new UA(this.ca.ea.Jc,this.ca.ea.xa),this.b)};WA.prototype.Pe=function(a,b){var c=b.getAdId();this.a.a=c;c=b.getTraffickingParameters();return Pz(c,"rm")?(1!=this.b&&Uz(),XA(a),2):Pz(c,"blockAllAds")?(XA(a),OA(this,new wA(this.ca,a)),0):Pz(c,"hideMaster")?(OA(this,new wA(this.ca,a)),0):this.ca.ea.a?1:"3.1"==eA()?(OA(this,new tA(this.j,this.ca,a)),0):1};
606 function XA(a){a.sendImpressionUrls&&a.sendImpressionUrls()};function YA(a,b,c,d,e){MA.call(this,1,a,b,c,d|e);this.A=d;this.o=e;Rz()}y(YA,WA);var ZA={GDFP:1,DART:1,DART_DFP:1,DART_DFA:1,ADSENSE:2,"ADSENSE/ADX":2};YA.prototype.k=function(){return VA(new UA(this.ca.ea.I,this.ca.ea.xa),this.A)};YA.prototype.ni=function(a,b){if(this.o){b.youTubeAdType=Qz(this.o);var c=this.ca.ea.ha;c&&(b.youTubeExperimentIds=c);b.youTubeVideoAdStartDelay=PA(this)}YA.C.ni.call(this,a,b)};YA.prototype.Ug=function(a,b,c){var d=$A(a);return 1!=d&&2!=d?1:YA.C.Ug.call(this,a,b,c)};
607 YA.prototype.Pe=function(a,b){switch($A(a)){case 1:return YA.C.Pe.call(this,a,b);case 2:var c;1!=this.A&&Uz();this.ca.ea.a?c=1:(0==this.g&&(this.g=10,this.a.i=10,DA(this.ca,1)),Tz(this.b),c=b.getAdId(),this.a.a=c,OA(this,new tA(2,this.ca,a)),c=0);return c;default:return 1}};function $A(a){var b=a.getCurrentAd().getWrapperAdSystems();a=Ua(b)?a.getCurrentAd().getAdSystem():b[0];return(a=ZA[a.toUpperCase()])?a:0};function aB(a,b,c){var d=c.ea;this.o=d.hd;var e=0,d=d.kd.toUpperCase();"INVIDEO"==d?e=4:"INSTREAM"==d?e=1:"MPU"==d&&(e=8);MA.call(this,2,a,b,c,e)}y(aB,MA);function bB(a){var b=new io;Qj(a,{format:"RAW",method:"GET",timeout:5E3,Sk:function(){b.a(Error(a+" timed out"))},onError:function(c){b.a(Error("Problem loading "+a+" with status code "+c.status))},Pa:function(a){b.b(a)}});return b}aB.prototype.k=function(){return""};
608 aB.prototype.ni=function(a,b){var c=this.b;c&1||c&4?this.o?("goo.gl"==Ij(this.o)?(c=bB("https://www.googleapis.com/urlshortener/v1/url?key=AIzaSyBbSB-E7SYd1iggX6r2b5C7ljvO6fVqaj0&shortUrl="+this.o),oo(c,function(a){a=nb(a.responseText);if(!a||!a.longUrl)throw Error("Invalid expanded forced ad URL");a=Kj(a.longUrl,{video_format:"43"});return bB(a)},null,this)):c=bB(this.o),oo(c,function(c){b.adsResponse=c.responseText;a.requestAds(b,this)},null,this),oo(c,null,this.Fd,this)):this.Fd(Error("Invalid empty URL")):
609 this.Fd(Error("Invalid request type: "+c))};function cB(a,b,c){this.a=a;this.g=b;this.b=Si||Ti?"html5_ios":Ui?"html5_android":cj()?"html5_ps3":"leanback"==c?"html5_tv_leanback":"html5"};function dB(a,b,c,d){MA.call(this,4,a,b,c,d);this.o=new cB(this.ca.ea,this.ca.getVideoData().ra,this.ca.K().Z)}y(dB,MA);
610 dB.prototype.k=function(){var a;a=this.o;if(a.a.aa&&a.a.kb){var b="10613:10613_youtube_"+a.b,c="youtube_watch_"+a.b,d="10613:10613_youtube_"+a.b.split("_")[0],e={nw:"10613"};e.asnw=a.a.aa;e.ssnw=a.a.aa;e.caid=a.a.kb;e.prof=b;e.vdur=a.g;e.csid=c;e.resp="vast2";e.crtp="vast2s";e.flag="+emcr";b={};isNaN(a.a.la)||(b._fw_d_001=a.a.la);a.a.lc&&(b._fw_d_002=a.a.lc);a.a.Ra&&(b["_fwu:10613:lang"]=a.a.Ra);a.a.G&&(b._fw_dbp=a.a.G);b._fw_yt_type=a.a.B?"short":"long";var c={ptgt:"a",slid:"preroll"},g="";a.a.g&&
611 !a.a.b?g=";linear-skippable":!a.a.g&&a.a.b&&(g=";video");c.slau="preroll"+g;c.w="480";c.h="360";c.tpos="0";c.tpcl="preroll";c.envp=d;c.cd="1440,900";a="//2975c.v.fwmrm.net/ad/g/1?"+Ej(e,"&")+";"+Ej(b,"&")+";"+Ej(c,"&")}else a="";return a};dB.prototype.Ug=function(a,b){return 0!=this.g?1:dB.C.Ug.call(this,a,b,null)};dB.prototype.Pe=function(){return 1};function eB(a,b,c){this.g=a;this.a=b;this.b=c||0}eB.prototype.create=function(a,b,c){switch(this.g){case 1:return new TA(a,b,c,this.a);case 2:return new WA(a,b,c,this.a);case 3:return new YA(a,b,c,this.a,this.b);case 5:return new dB(a,b,c,this.a);case 4:return new aB(a,b,c);default:return null}};function fB(a){this.a=a};function gB(a,b){this.O=a;this.Q=this.O.nc;this.k="leanback"==this.O.Z;this.a=this.Q||this.k;var c="3.1"==Lz.getInstance().getVersion();this.L=!this.a&&c;this.P=a.tb&&c&&!this.a;this.apply(b)}var hB={$B:"m",UA:"f"};
612 gB.prototype.apply=function(a){var b=Vz(this.O,"908301"),c="3.1"==Lz.getInstance().getVersion(),d=Mz(a.instream),e=(!this.a||b)&&c&&Mz(a.trueview),g=Mz(a.aftv)&&(!this.a||b);this.ja=a.ad_slots;this.da=a.ad_breaks;this.Lc=a.ad_flags||0;this.ga=parseInt(a.cust_age,10);this.ha=a.cafe_experiment_id;var h=parseInt(a.cust_gender,10);isNaN(h)||(this.Ic=h);this.Jc=a.ad_tag;this.Kc=!!a.adtest;this.la=parseInt(a.ad_age,10);this.Hc=a.cid;this.pa=a.ad_eurl;this.I=a.dynamic_allocation_ad_tag;this.va=a.excluded_ads;
613 this.kd=a.force_ad_type;this.hd=a.force_ad_url;this.lc=Mb(hB,function(b){return b==a.ad_gender});this.G=a.dbp;this.xa=!!a.mpu;this.host=a.ad_host;this.za=parseInt(a.ad_host_tier,10);this.ld=1==a.ad_logging_flag;this.F=Mz(a.afv)&&!this.a;this.i=g&&e;this.j=g&&d&&!Mz(a.no_afv_instream);this.A=Mz(a.dclk);this.Mc=1==a.livestream;this.Sa=Mz(a.forced_ad)&&b&&c;this.J=1==parseInt(a.tpas_ad_type_id,10);this.Yf=!!a.fqsf;this.b=d;this.V=Mz(a.invideo)&&!this.a;this.Y=Mz(a.mpu)&&!this.a;this.gd=Mz(a.shortform);
614 this.B=Mz(a.sffb);this.oe="1"==a.as_launched_in_country;this.rb=!this.a&&!this.J;this.g=e;b=a.ad_channel_code_instream;this.Ca=u(b)?b.split(","):[];this.Ra=a.ad_language_iso639_2;this.Zf=a.loeid;b=parseInt(a.afv_instream_max,10);isNaN(b)&&(b=15E3);this.$f=b;this.o=parseInt(a.midroll_freqcap,10);isNaN(this.o)&&(this.o=-1);b=a.ad_channel_code_overlay;this.Va=u(b)?b.split(","):[];this.jb=a.yt_pt;this.eg=a.ad_video_pub_id;this.bg=Mz(a.tag_for_child_directed);this.mc=parseInt(a.afv_video_min_cpm,10);this.Ma=
615 g&&this.B&&!this.F;this.jd=this.F||this.Ma;this.ag=parseInt(a.ad_device,10);this.kb=a.tpas_video_id;this.aa=a.tpas_partner_id;this.Ka=iB(this)};function iB(a){if(/^[\s\xa0]*$/.test(null==a.I?"":String(a.I))||!Vz(a.O,"932604")||!a.P)return!1;var b=(a.b||a.g)&&a.A;a.B&&a.A&&(b=b||a.V||a.Y);if(!b)return!1;b=a.i||a.j;if(!(b||a.B&&a.F))return!1;a=a.I.length+330+102;var c=window.document.referrer;a+=encodeURIComponent(String("ref"+(c?"="+c:""))).length;b||(a+=41);return 2048>=a}gB.prototype.rb=!0;function jB(a,b,c){this.a=a;this.k=b;this.g=c;this.j=this.b=-1;this.g&&0<this.a.ea.o&&this.a.D("endseeking",this.i,this)}y(jB,K);function kB(a,b){lB(a);0<b&&(a.j=H(v(a.i,a),1E3*b))}function lB(a){-1!=a.j&&(I(a.j),a.j=-1)}
616 jB.prototype.i=function(){var a=this.a.ea.o;if(this.g&&!(0>=a)){var b=this.a.a.getCurrentTime(),c=[],d=null,e=Number.MAX_VALUE;Hb(this.k.i,function(a){if(a.qd&&a.isVisible&&!(0>=mB(this,a))){var g;g=a.getId();g=this.k.j[g];if(mB(this,a)>b){var m=!nB(this,a);m!=g.Pc&&(g.Pc=m,c.push(g));m||(g=mB(this,a)-b,g<e&&(e=g,d=a))}else g.Pc||(g.Pc=!0,c.push(g))}},this);0<c.length&&oB(this.a,c);if(d){var g=0;0<this.b&&(g=x()/1E3-this.b);kB(this,a-g-e+2)}else lB(this)}};
617 function nB(a,b){if(!a.g||!b.qd||!(0<b.start)&&-1!=b.start)return!1;var c=a.a.ea.o;if(0>=c||0>=a.b)return!1;var d=x()/1E3,e=mB(a,b)-a.a.a.getCurrentTime();0<e&&(d+=e);return d-a.b<=c}function mB(a,b){return-1==b.start?a.a.a.getVideoData().ra:b.start}jB.prototype.H=function(){lB(this)};function pB(a,b){this.b=b;this.g=[];this.i={};this.j={};this.a=a;var c=!a.ea.Mc&&Ma(this.b,function(a){return 0<a.start||-1==a.start});this.k=new jB(this.a,this,c)}y(pB,K);f=pB.prototype;f.Cd=null;function qB(a){a.g.length||(gb(a.b,function(a,c){return a.getId()-c.getId()}),a.g=Ka(a.b,function(a){return"unloaded"==a.Qe}),0==a.g.length?Km(a.a):(null===Pa(a.g,function(a){return 0==a.start})&&Km(a.a),rB(a)))}function rB(a){if(a.g.length){var b=a.g.shift();b.D("adBreakComplete",a.fl,a);BA(b)}}
618 f.fl=function(a){a.$("adBreakComplete",this.fl,this);H(v(this.lx,this,a),0)};f.lx=function(a){var b=Ja(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=yA(c)-1);0==a.Ba&&(CA(this.a,"bl"),AA(a)||CA(this.a,"fb"));if(c="loaded"!=a.Qe){if(b&&zA(b)){var e=yA(b);e>d&&(d=e);sB(this,b);tB(this,b,d)}}else this.i[a.getId()]=a,tB(this,a,d);Km(this.a);c&&this.sg(a);a=this.i;var b=0,g;for(g in a)b++;b==this.b.length&&this.k.i();rB(this)};
619 function tB(a,b,c){var d=yA(b);if(!isNaN(d)){var e={};e.priority=-2!=b.start?2:3;e.id=String(b.getId());e.visible=b.isVisible;c=new $h(d,c,e);a.j[b.getId()]=c;a.a.uf(c)}}function sB(a,b){a.j[b.getId()]&&(a.a.lv(a.j[b.getId()]),delete a.j[b.getId()])}f.sg=function(a){a.$("adBreakComplete",this.fl,this);this.Cd&&a==this.Cd&&(this.Cd=null);sB(this,a);Xa(this.b,a);delete this.i[a.getId()];Tg(a)};
620 f.Eu=function(a){if(a.qd){if(-1!=a.start&&a.hk){var b=this.a;uB(b);Um(b)}else AA(a)&&!a.hk?(b=this.a,uB(b),Um(b)):(uB(this.a),this.a.mb(!1));this.sg(a);a=this.k;a.g&&0<a.a.ea.o&&(a.b=x()/1E3,a.i())}else a.isVisible||this.sg(a)};f.H=function(){Tg(this.k);z(this.b,this.sg,this);pB.C.H.call(this)};function vB(){return[]};function wB(a,b){this.g=a;b&&(this.b=b)}function xB(a){var b={};b.allowed=a.g;a.b&&(b.ex_ads=a.b);a.a&&(b.at=a.a);return b};function yB(a,b){this.g=a;this.X=b;this.o=x();this.a=a.ea;this.b={};var c=[];this.a.J&&this.a.b&&c.push("4_2");this.a.A&&(this.a.b&&c.push("1_2"),this.a.g&&c.push("1_2_1"),this.a.V&&c.push("1_1"),this.a.Y&&c.push("1_3"));this.a.i&&c.push("2_2_1");this.a.j&&c.push("2_2");this.a.F&&c.push("2_1");this.a.jd&&c.push("2_3");this.i=c.join(",");this.k=new wB(this.i,this.a.va);this.b.allowed=this.i;(c=this.a.va)&&(this.b.ex_ads=c)}var zB=[9,10,11,12],AB=[21,30],BB=[1009];yB.prototype.j=0;
621 function CB(a,b){if(!a.a.ld)return!1;var c=a.g.K();if(Vz(c,"906335"))return!0;c=b.ad_event;return Ta(zB,c)||7==c&&(c=b.ad_error,Ta(AB,c)||32==c&&Ta(BB,b.error_code))?!1:!0};function DB(a){zx.call(this,a);this.j={};this.i={at:"0"};this.b=new mn(this.a);this.g=null;a=this.getVideoData().b.html5_sdk_version;this.k=Lz.getInstance().load(a)}y(DB,zx);var NA=new B(0,0);f=DB.prototype;f.qa="ad";f.ad="ad";f.ue=null;f.Td=null;f.ea=null;f.qj=!1;f.Mj=!1;f.pg=null;f.ki=null;f.$a=function(){return!!this.app.I.getVideoData().ca};
622 f.create=function(){DB.C.create.call(this);this.ba=!0;CA(this,"i");this.ea=new gB(this.K(),this.a.getVideoData().b||{});this.ue=new yB(this,this.a);Sz();this.qj=!1;var a=po(this.k);this.pg=oo(a,this.jq,null,this);t:{var a=new fB(this),b=[];try{var c=a.a.ea,d;if(c.rb){var e;if(c.da)e=JA(c.da);else{var g;if(c.ja){var h=La(c.ja.split(","),Fa);g=new IA(h)}else g=new IA([0]);e=g}d=e}else d=new IA([0]);for(var k=d.iq,c=0;c<k.length;c++){var m=a.a;d=c;var p=k[c],r;if(a.a.ea.B){e=[];var s=a.a.ea;if(s.Sa)e.push(new eB(4,
623 0));else{s.J&&(s.b||s.g)&&e.push(new eB(5,1));g=0;s.A&&(s.b&&(g|=1),s.g&&(g|=2),s.V&&(g|=4),s.Y&&(g|=8));h=0;if(s.j||s.i)s.j&&(h|=1),s.i&&(h|=2);var D=0;s.F&&(D=4);h||(h=D,D=0);s.Ka&&g&&(h||D)?e.push(new eB(3,g,h)):(g&&e.push(new eB(2,g)),h&&e.push(new eB(1,h)));D&&e.push(new eB(1,D))}}else{e=[];var O=a.a.ea;if(O.Sa)e.push(new eB(4,0));else{O.J&&O.b&&e.push(new eB(5,1));g=0;O.A&&(O.b&&(g|=1),O.g&&(g|=2));h=0;if(O.j||O.i)O.j&&(h|=1),O.i&&(h|=2);O.Ka&&g&&h?e.push(new eB(3,g,h)):(g&&e.push(new eB(2,
624 g)),h&&e.push(new eB(1,h)))}}r=e;var ta=new xA(m,d,p,r);b.push(ta)}}catch($){}finally{break t}}k=b;CA(this,"bd");this.Td=new pB(this,k);qB(this.Td);k={};k.allowed=this.ue.i;Om(this,{},k)};f.destroy=function(){this.Mj&&uB(this);this.ba=!1;this.g&&pA(this.app,this.g);Ug(this.Td,this.g);this.g=this.Td=null;this.pg&&(this.pg.cancel(),this.pg=null);this.ue=null;on(this.b);DB.C.destroy.call(this)};f.getVideoData=function(){return this.app.getVideoData(1)};f.K=function(){return this.app.K()};
625 function DA(a,b,c){a=a.ue;c=c||{};var d=(x()-a.o)/1E3;c.art=d;d=a.g.K();d.j&&(c.feature=d.da);c.ad_flags=a.a.Lc;var e=a.a.Hc;e&&(c.cid=e);c.mt=a.X.getCurrentTime();(d=Ux(d))&&(c.lact=d);(d=a.X.Gh())&&(c.len=d);a.a.Yf&&(c.fqsf=1);(d=Lz.getInstance().getVersion())&&(c.sdkv=d);c.ad_event=b;if(3==b||4==b)a.k.a=c.at;b=c;if(CB(a,b)){var g;t:{c=a.b;d=Ob(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 HA(a,b,c){c=c||{};c.ad_error=b;DA(a,7,c)}
626 f.Hi=function(){return this.ue?this.ue.k:DB.C.Hi.call(this)};function eA(){return Lz.getInstance().getVersion()}function mA(a){if(!a.g){var b=new Ix(a.K().a);b.Z="adunit";b.Tb=!0;a.g=new bz(b,2)}return a.g}function jA(a){var b=a.ea.k?a.K().Oc||NA:Gd(Q(a.a));a.ea.a||(b.height-=27);return b}function aA(a){return a.ea.k?(a=a.K().Oc||NA,new Db(0,0,a.width,a.height)):Ed(Q(a.a))}function uB(a){on(a.b);a.Mj=!1;Tm(a);Sm(a,["seek"]);a.K().Md&&Sm(a,["audio"])}
627 function kA(a,b){switch(b){case 1:a.u("publish_external_event","onAdStart");break;case 2:a.u("publish_external_event","onAdEnd")}}function hA(a,b,c){a.u("publish_external_event","onAdStateChange",b,a.b.X.K().tb?a.b.X.app.R.b:rn(a.b),c)}
628 f.yc=function(a){DB.C.yc.call(this,a);var b=parseInt(a.getId(),10);this.Td&&!isNaN(b)&&(a=this.Td,q(b)&&(b=a.i[b]))&&(a.Cd==b&&!b.qd&&b.isVisible?b.show():(a.Cd&&a.sg(a.Cd),nB(a.k,b)?(a.Cd=null,b=a.j[b.getId()],b.Pc||(b.Pc=!0,oB(a.a,[b]))):(a.Cd=b,b.D("adBreakComplete",a.Eu,a),b.qd&&(a=a.a,a.Mj=!0,a.u("command_redirect_controls",a,["play_pause"],void 0),Rm(a,["seek"]),a.K().Md&&Rm(a,["audio"]),Vm(a)),b.show())))};
629 f.Vc=function(a){DB.C.Vc.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.Cd==b&&!b.qd&&b.isVisible&&b.Ok&&b.a instanceof tA&&uA(b.a,google.ima.ViewMode.FULLSCREEN))};
630 f.jq=function(){CA(this,"sdk");if(this.ki)return this.ki;var a;if(this.ea.P){a=new yx(this.app,2);var b=google.ima.AdDisplayContainer,c=nn(this.b),d=qn(this.b);a.j||(a.j=Ob(a.i),a.j.addEventListener=v(a.Xt,a),a.j.removeEventListener=v(a.Yt,a));a=new b(c,void 0,d,a.j)}else{a=this.b.X.K().tb?this.b.X.app.R.b:rn(this.b);if(!a)return a=Error("AdModule.getVideoElement returned an invalid element."),b=new io,b.a(a),b;a=new google.ima.AdDisplayContainer(nn(this.b),a,qn(this.b))}return this.ki=new google.ima.AdsLoader(a)};
631 function CA(a,b){var c=b;"nl"==b&&(c=a.ue,c.j++,c=c.j.toString());a.j[c]=x();"bs"!=c&&"fb"!=c||Om(a,a.j,a.i)}function oB(a,b){a.u("command_update_cuerange_markers",b,a.a.a)}f.ie=function(a){this.u(a)};function EB(a){return FB(a||arguments.callee.caller,[])}
632 function FB(a,b){var c=[];if(Ta(b,a))c.push("[...circular reference...]");else if(a&&50>b.length){c.push(GB(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=GB(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(FB(a.caller,b))}catch(h){c.push("[exception trying to get caller]\n")}}else a?
633 c.push("[...long stack...]"):c.push("[end]");return c.join("")}function GB(a){if(HB[a])return HB[a];a=String(a);if(!HB[a]){var b=/function ([^\(]+)/.exec(a);HB[a]=b?b[1]:"[Anonymous]"}return HB[a]}var HB={};function IB(a,b,c,d,e){this.reset(a,b,c,d,e)}IB.prototype.b=null;IB.prototype.a=null;var JB=0;IB.prototype.reset=function(a,b,c,d,e){"number"==typeof e||JB++;this.i=d||x();this.j=a;this.k=b;this.g=c;delete this.b;delete this.a};IB.prototype.getMessage=function(){return this.k};function KB(a){this.b=a}KB.prototype.a=null;function LB(a,b){this.name=a;this.value=b}LB.prototype.toString=function(){return this.name};var MB=new LB("SHOUT",1200),NB=new LB("SEVERE",1E3),OB=new LB("WARNING",900),PB=new LB("INFO",800);f=KB.prototype;f.Cv=function(){};f.Ev=function(){return!1};f.getChildren=function(){this.a||(this.a={});return this.a};f.log=function(){};
634 f.Dv=function(a,b,c){var d=new IB(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,r=!1;try{m=c.lineNumber||c.line||"Not available"}catch(s){m="Not available",r=!0}try{p=c.fileName||c.filename||c.sourceURL||l.$googDebugFname||k}catch(D){p="Not available",r=!0}h=!r&&c.lineNumber&&c.fileName&&c.stack&&c.message&&c.name?c:{message:c.message||
635 "Not available",name:c.name||"UnknownError",lineNumber:m,fileName:p,stack:c.stack||"Not available"}}e="Message: "+ya(h.message)+'\nUrl: <a href="view-source:'+h.fileName+'" target="_new">'+h.fileName+"</a>\nLine: "+h.lineNumber+"\n\nBrowser stack:\n"+ya(h.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+ya(EB(g)+"-> ")}catch(O){e="Exception trying to expose exception! You win, we lose. "+O}d.a=e}return d};f.info=function(){};var QB={},RB=null;function SB(){RB||(RB=new KB(""),QB[""]=RB)}
636 function TB(a){SB();var b;if(!(b=QB[a])){b=new KB(a);var c=a.lastIndexOf("."),d=a.substr(c+1);TB(a.substr(0,c)).getChildren()[d]=b;QB[a]=b}return b};function UB(){this.a=x()}var VB=new UB;UB.prototype.set=function(a){this.a=a};UB.prototype.reset=function(){this.set(x())};UB.prototype.get=function(){return this.a};function WB(a){this.g=a||"";this.i=VB}WB.prototype.b=!0;WB.prototype.a=!1;function XB(a){return 10>a?"0"+a:String(a)}function YB(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 ZB(a){WB.call(this,a)}y(ZB,WB);
637 function $B(a,b){var c=[];c.push(a.g," ");if(a.b){var d=new Date(b.i);c.push("[",XB(d.getFullYear()-2E3)+XB(d.getMonth()+1)+XB(d.getDate())+" "+XB(d.getHours())+":"+XB(d.getMinutes())+":"+XB(d.getSeconds())+"."+XB(Math.floor(d.getMilliseconds()/10)),"] ")}c.push("[",YB(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 aC(a,b){this.b=new rb(a);this.a=b?ob:nb}aC.prototype.stringify=function(a){return qb(this.b,a)};aC.prototype.parse=function(a){return this.a(a)};function bC(){};function cC(){}cC.prototype.a=null;var dC;function eC(){}y(eC,cC);function fC(a){return(a=gC(a))?new ActiveXObject(a):new XMLHttpRequest}function hC(a){var b={};gC(a)&&(b[0]=!0,b[1]=!0);return b}
638 function gC(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}dC=new eC;function iC(a,b,c,d,e){this.b=a;this.a=b;this.j=c;this.g=d;this.i=e||1;this.uc=45E3;this.o=new Tr(this);this.k=new Fi;Gi(this.k,250)}f=iC.prototype;f.Be=null;f.Cc=!1;f.Jf=null;f.$k=null;f.xg=null;f.Ff=null;f.Wd=null;f.Kb=null;f.Zd=null;f.Qa=null;f.Og=0;f.Ec=null;f.vf=null;f.Ie=null;f.vg=-1;f.ln=!0;f.Je=!1;f.ck=0;f.Xh=null;
639 function jC(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 kC={},lC={};f=iC.prototype;f.setTimeout=function(a){this.uc=a};function mC(a,b,c){a.Ff=1;a.Wd=Ie(b.clone());a.Zd=c;a.F=!0;nC(a,null)}function oC(a,b,c,d,e){a.Ff=1;a.Wd=Ie(b.clone());a.Zd=null;a.F=c;e&&(a.ln=!1);nC(a,d)}
640 function nC(a,b){a.xg=x();pC(a);a.Kb=a.Wd.clone();Ge(a.Kb,"t",a.i);a.Og=0;a.Qa=a.b.rk(a.b.fi()?b:null);0<a.ck&&(a.Xh=new Np(v(a.sn,a,a.Qa),a.ck));a.o.listen(a.Qa,"readystatechange",a.Et);var c=a.Be?Ob(a.Be):{};a.Zd?(a.vf="POST",c["Content-Type"]="application/x-www-form-urlencoded",a.Qa.send(a.Kb,a.vf,a.Zd,c)):(a.vf="GET",a.ln&&!gc&&(c.Connection="close"),a.Qa.send(a.Kb,a.vf,null,c));a.b.Bc(1);var d=a.Zd;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=
641 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.vf+"\n"+a.Kb+"\n"+c)}f.Et=function(a){a=a.target;var b=this.Xh;b&&3==qC(a)?(this.a.debug("Throttling readystatechange."),Op(b)):this.sn(a)};
642 f.sn=function(a){try{if(a==this.Qa)t:{var b=qC(this.Qa),c=this.Qa.i,d=rC(this.Qa);if(C&&!vc(10)||gc&&!uc("420+")){if(4>b)break t}else if(3>b||3==b&&!ec&&!sC(this.Qa))break t;this.Je||4!=b||7==c||(8==c||0>=d?this.b.Bc(3):this.b.Bc(2));tC(this);var e=rC(this.Qa);this.vg=e;var g=sC(this.Qa);g||this.a.debug("No response text for uri "+this.Kb+" status "+e);this.Cc=200==e;this.a.info("XMLHTTP RESP ("+this.g+") [ attempt "+this.i+"]: "+this.vf+"\n"+this.Kb+"\n"+b+" "+e);this.Cc?(4==b&&uC(this),this.F?(vC(this,
643 b,g),ec&&this.Cc&&3==b&&(this.o.listen(this.k,"tick",this.dt),this.k.start())):(wC(this.a,this.g,g,null),xC(this,g)),this.Cc&&!this.Je&&(4==b?this.b.Uh(this):(this.Cc=!1,pC(this)))):(this.Ie=400==e&&0<g.indexOf("Unknown SID")?3:0,yC(),uC(this),zC(this))}}catch(h){this.a.debug("Failed call to OnXmlHttpReadyStateChanged_"),this.Qa&&sC(this.Qa)&&sC(this.Qa)}finally{}};
644 function vC(a,b,c){for(var d=!0;!a.Je&&a.Og<c.length;){var e=AC(a,c);if(e==lC){4==b&&(a.Ie=4,yC(),d=!1);wC(a.a,a.g,null,"[Incomplete Response]");break}else if(e==kC){a.Ie=4;yC();wC(a.a,a.g,c,"[Invalid Chunk]");d=!1;break}else wC(a.a,a.g,e,null),xC(a,e)}4==b&&0==c.length&&(a.Ie=1,yC(),d=!1);a.Cc=a.Cc&&d;d||(wC(a.a,a.g,c,"[Invalid Chunked Response]"),uC(a),zC(a))}f.dt=function(){var a=qC(this.Qa),b=sC(this.Qa);this.Og<b.length&&(tC(this),vC(this,a,b),this.Cc&&4!=a&&pC(this))};
645 function AC(a,b){var c=a.Og,d=b.indexOf("\n",c);if(-1==d)return lC;c=Number(b.substring(c,d));if(isNaN(c))return kC;d+=1;if(d+c>b.length)return lC;var e=b.substr(d,c);a.Og=d+c;return e}
646 function BC(a,b){a.xg=x();pC(a);var c=b?window.location.hostname:"";a.Kb=a.Wd.clone();Fe(a.Kb,"DOMAIN",c);Fe(a.Kb,"t",a.i);try{a.Ec=new ActiveXObject("htmlfile")}catch(d){uC(a);a.Ie=7;yC();zC(a);return}var e="<html><body>";b&&(e+='<script>document.domain="'+c+'"\x3c/script>');e+="</body></html>";a.Ec.open();a.Ec.write(e);a.Ec.close();a.Ec.parentWindow.m=v(a.St,a);a.Ec.parentWindow.d=v(a.Dn,a,!0);a.Ec.parentWindow.rpcClose=v(a.Dn,a,!1);c=a.Ec.createElement("div");a.Ec.parentWindow.document.body.appendChild(c);
647 c.innerHTML='<iframe src="'+a.Kb+'"></iframe>';a.a.info("TRIDENT REQ ("+a.g+") [ attempt "+a.i+"]: GET\n"+a.Kb);a.b.Bc(1)}f.St=function(a){CC(v(this.ly,this,a),0)};f.ly=function(a){if(!this.Je){var b=this.a;b.info("TRIDENT TEXT ("+this.g+"): "+DC(b,a));tC(this);xC(this,a);pC(this)}};f.Dn=function(a){CC(v(this.ky,this,a),0)};f.ky=function(a){this.Je||(this.a.info("TRIDENT TEXT ("+this.g+"): "+a?"success":"failure"),uC(this),this.Cc=a,this.b.Uh(this),this.b.Bc(4))};f.cancel=function(){this.Je=!0;uC(this)};
648 function pC(a){a.$k=x()+a.uc;EC(a,a.uc)}function EC(a,b){if(null!=a.Jf)throw Error("WatchDog timer not null");a.Jf=CC(v(a.Px,a),b)}function tC(a){a.Jf&&(l.clearTimeout(a.Jf),a.Jf=null)}f.Px=function(){this.Jf=null;var a=x();0<=a-this.$k?(this.a.info("TIMEOUT: "+this.Kb),2!=this.Ff&&this.b.Bc(3),uC(this),this.Ie=2,yC(),zC(this)):EC(this,this.$k-a)};function zC(a){a.b.Gb()||a.Je||a.b.Uh(a)}
649 function uC(a){tC(a);Tg(a.Xh);a.Xh=null;a.k.stop();a.o.removeAll();if(a.Qa){var b=a.Qa;a.Qa=null;b.abort();b.dispose()}a.Ec&&(a.Ec=null)}function xC(a,b){try{a.b.$o(a,b),a.b.Bc(4)}catch(c){}};function FC(){}function wC(a,b,c,d){a.info("XMLHTTP TEXT ("+b+"): "+DC(a,c)+(d?" "+d:""))}FC.prototype.debug=function(a){this.info(a)};FC.prototype.info=function(){};
650 function DC(a,b){if(!b||"y2f%"==b)return b;try{var c=ob(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 pb(c)}catch(m){return a.debug("Exception parsing expected JS array - probably was not JS"),b}};function GC(a,b,c,d,e){(new FC).debug("TestLoadImageWithRetries: "+e);if(0==d)c(!1);else{var g=e||0;d--;HC(a,b,function(e){e?c(!0):l.setTimeout(function(){GC(a,b,c,d,g)},g)})}}
651 function HC(a,b,c){var d=new FC;d.debug("TestLoadImage: loading "+a);var e=new Image;e.onload=function(){try{d.debug("TestLoadImage: loaded"),IC(e),c(!0)}catch(a){}};e.onerror=function(){try{d.debug("TestLoadImage: error"),IC(e),c(!1)}catch(a){}};e.onabort=function(){try{d.debug("TestLoadImage: abort"),IC(e),c(!1)}catch(a){}};e.ontimeout=function(){try{d.debug("TestLoadImage: timeout"),IC(e),c(!1)}catch(a){}};l.setTimeout(function(){if(e.ontimeout)e.ontimeout()},b);e.src=a}
652 function IC(a){a.onload=null;a.onerror=null;a.onabort=null;a.ontimeout=null};function JC(a,b){this.a=a;this.b=b;this.g=new aC(null,!0)}f=JC.prototype;f.yk=null;f.Pb=null;f.wi=!1;f.Wn=null;f.vi=null;f.Pk=null;f.Vk=null;f.Rb=null;f.Ve=-1;f.Yg=null;f.ah=null;f.connect=function(a){this.Vk=a;a=KC(this.a,this.Vk);yC();this.Wn=x();var b=this.a.A;null!=b?(this.Yg=b[0],(this.ah=b[1])?(this.Rb=1,LC(this)):(this.Rb=2,MC(this))):(Ge(a,"MODE","init"),this.Pb=new iC(this,this.b,void 0,void 0,void 0),this.Pb.Be=this.yk,oC(this.Pb,a,!1,null,!0),this.Rb=0)};
653 function LC(a){var b=NC(a.a,a.ah,"/mail/images/cleardot.gif");Ie(b);GC(b.toString(),5E3,v(a.yv,a),3,2E3);a.Bc(1)}f.yv=function(a){if(a)this.Rb=2,MC(this);else{yC();var b=this.a;b.a.debug("Test Connection Blocked");b.wd=b.ge.Ve;OC(b,9)}a&&this.Bc(2)};
654 function MC(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"),yC(),b?(yC(),PC(a.a,a,!1)):(yC(),PC(a.a,a,!0));else if(a.Pb=new iC(a,a.b,void 0,void 0,void 0),a.Pb.Be=a.yk,b=QC(a.a,a.Yg,a.Vk),yC(),!C||vc(10))Ge(b,"TYPE","xmlhttp"),oC(a.Pb,b,!1,a.Yg,!1);else{Ge(b,"TYPE","html");var c=a.Pb;a=Boolean(a.Yg);c.Ff=3;c.Wd=Ie(b.clone());BC(c,a)}}f.rk=function(a){return this.a.rk(a)};
655 f.abort=function(){this.Pb&&(this.Pb.cancel(),this.Pb=null);this.Ve=-1};f.Gb=function(){return!1};
656 f.$o=function(a,b){this.Ve=a.vg;if(0==this.Rb)if(this.b.debug("TestConnection: Got data for stage 1"),b){try{var c=this.g.parse(b)}catch(d){RC(this.a,this);return}this.Yg=c[0];this.ah=c[1]}else this.b.debug("TestConnection: Null responseText"),RC(this.a,this);else if(2==this.Rb)if(this.wi)yC(),this.Pk=x();else if("11111"==b){if(yC(),this.wi=!0,this.vi=x(),c=this.vi-this.Wn,!C||vc(10)||500>c)this.Ve=200,this.Pb.cancel(),this.b.debug("Test connection succeeded; using streaming connection"),yC(),PC(this.a,
657 this,!0)}else yC(),this.vi=this.Pk=x(),this.wi=!1};
658 f.Uh=function(){this.Ve=this.Pb.vg;if(!this.Pb.Cc)this.b.debug("TestConnection: request failed, in state "+this.Rb),0==this.Rb?yC():2==this.Rb&&yC(),RC(this.a,this);else if(0==this.Rb)this.b.debug("TestConnection: request complete for initial check"),this.ah?(this.Rb=1,LC(this)):(this.Rb=2,MC(this));else if(2==this.Rb){this.b.debug("TestConnection: request complete for stage 2");var a=!1;(a=!C||vc(10)?this.wi:200>this.Pk-this.vi?!1:!0)?(this.b.debug("Test connection succeeded; using streaming connection"),yC(),
659 PC(this.a,this,!0)):(this.b.debug("Test connection failed; not using streaming"),yC(),PC(this.a,this,!1))}};f.fi=function(){return this.a.fi()};f.Bc=function(a){this.a.Bc(a)};function SC(a){Ci.call(this);this.headers=new Wd;this.j=a||null;this.b=!1;this.I=this.a=null;this.O=this.A="";this.i=0;this.k="";this.g=this.L=this.F=this.J=!1;this.o=0;this.B=null;this.P="";this.G=this.Q=!1}y(SC,Ci);var TC=/^https?$/i,UC=["POST","PUT"];f=SC.prototype;
660 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.J=!1;this.b=!0;this.a=this.j?fC(this.j):fC(dC);this.I=this.j?this.j.a||(this.j.a=hC(this.j)):dC.a||(dC.a=hC(dC));this.a.onreadystatechange=v(this.Mm,this);try{bC(VC(this,"Opening Xhr")),this.L=!0,this.a.open(b,a,!0),this.L=!1}catch(e){bC(VC(this,"Error opening Xhr: "+e.message));WC(this,e);return}a=c||"";
661 var g=this.headers.clone();d&&ae(d,function(a,b){g.set(b,a)});d=Pa(g.tc(),XC);c=l.FormData&&a instanceof l.FormData;!Ta(UC,b)||d||c||g.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");ae(g,function(a,b){this.a.setRequestHeader(b,a)},this);this.P&&(this.a.responseType=this.P);"withCredentials"in this.a&&(this.a.withCredentials=this.Q);try{YC(this),0<this.o&&(this.G=C&&uc(9)&&ga(this.a.timeout)&&q(this.a.ontimeout),bC(VC(this,"Will abort after "+this.o+"ms if incomplete, xhr2 "+
662 this.G)),this.G?(this.a.timeout=this.o,this.a.ontimeout=v(this.uc,this)):this.B=Hi(this.uc,this.o,this)),bC(VC(this,"Sending request")),this.F=!0,this.a.send(a),this.F=!1}catch(h){bC(VC(this,"Send error: "+h.message)),WC(this,h)}};function XC(a){return"content-type"==a.toLowerCase()}f.uc=function(){"undefined"!=typeof aa&&this.a&&(this.k="Timed out after "+this.o+"ms, aborting",this.i=8,VC(this,this.k),Di(this,"timeout"),this.abort(8))};
663 function WC(a,b){a.b=!1;a.a&&(a.g=!0,a.a.abort(),a.g=!1);a.k=b;a.i=5;ZC(a);$C(a)}function ZC(a){a.J||(a.J=!0,Di(a,"complete"),Di(a,"error"))}f.abort=function(a){this.a&&this.b&&(VC(this,"Aborting"),this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.i=a||7,Di(this,"complete"),Di(this,"abort"),$C(this))};f.H=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),$C(this,!0));SC.C.H.call(this)};f.Mm=function(){this.ka()||(this.L||this.F||this.g?aD(this):this.kw())};f.kw=function(){aD(this)};
664 function aD(a){if(a.b&&"undefined"!=typeof aa)if(a.I[1]&&4==qC(a)&&2==rC(a))VC(a,"Local request error detected and ignored");else if(a.F&&4==qC(a))Hi(a.Mm,0,a);else if(Di(a,"readystatechange"),4==qC(a)){VC(a,"Request complete");a.b=!1;try{var b=rC(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=de(String(a.A))[1]||null;if(!g&&self.location)var h=self.location.protocol,g=h.substr(0,h.length-1);e=!TC.test(g?
665 g.toLowerCase():"")}c=e}if(c)Di(a,"complete"),Di(a,"success");else{a.i=6;var k;try{k=2<qC(a)?a.a.statusText:""}catch(m){k=""}a.k=k+" ["+rC(a)+"]";ZC(a)}}finally{$C(a)}}}function $C(a,b){if(a.a){YC(a);var c=a.a,d=a.I[0]?ba:null;a.a=null;a.I=null;b||Di(a,"ready");try{c.onreadystatechange=d}catch(e){}}}function YC(a){a.a&&a.G&&(a.a.ontimeout=null);ga(a.B)&&(l.clearTimeout(a.B),a.B=null)}function qC(a){return a.a?a.a.readyState:0}function rC(a){try{return 2<qC(a)?a.a.status:-1}catch(b){return-1}}
666 function sC(a){try{return a.a?a.a.responseText:""}catch(b){return""}}function VC(a,b){return b+" ["+a.O+" "+a.A+" "+rC(a)+"]"};function bD(a,b,c){this.F=a||null;this.b=1;this.g=[];this.i=[];this.a=new FC;this.k=new aC(null,!0);this.A=b||null;this.B=null!=c?c:null}function cD(a,b){this.a=a;this.map=b;this.S=null}f=bD.prototype;f.eh=null;f.xb=null;f.Na=null;f.uk=null;f.Yh=null;f.Mn=null;f.li=null;f.Lg=0;f.yu=0;f.qb=null;f.ee=null;f.Gd=null;f.Ue=null;f.ge=null;f.$h=null;f.sf=-1;f.eo=-1;f.wd=-1;f.Mg=0;f.Ef=0;f.Ge=8;var dD=new Ci;function eD(a){ei.call(this,"statevent",a)}y(eD,ei);
667 function fD(a,b){ei.call(this,"timingevent",a);this.size=b}y(fD,ei);function gD(a){ei.call(this,"serverreachability",a)}y(gD,ei);f=bD.prototype;f.connect=function(a,b,c,d,e){this.a.debug("connect()");yC();this.uk=b;this.eh=c||{};d&&q(e)&&(this.eh.OSID=d,this.eh.OAID=e);this.a.debug("connectTest_()");this.ge=new JC(this,this.a);this.ge.yk=null;this.ge.g=this.k;this.ge.connect(a)};
668 f.disconnect=function(){this.a.debug("disconnect()");hD(this);if(3==this.b){var a=this.Lg++,b=this.Yh.clone();Fe(b,"SID",this.j);Fe(b,"RID",a);Fe(b,"TYPE","terminate");iD(this,b);a=new iC(this,this.a,this.j,a,void 0);a.Ff=2;a.Wd=Ie(b.clone());(new Image).src=a.Wd;a.xg=x();pC(a)}jD(this)};function hD(a){a.ge&&(a.ge.abort(),a.ge=null);a.Na&&(a.Na.cancel(),a.Na=null);a.Gd&&(l.clearTimeout(a.Gd),a.Gd=null);kD(a);a.xb&&(a.xb.cancel(),a.xb=null);a.ee&&(l.clearTimeout(a.ee),a.ee=null)}
669 f.Gb=function(){return 0==this.b};function lD(a){var b=0;a.Na&&b++;a.xb&&b++;return b}function mD(a){a.xb||a.ee||(a.ee=CC(v(a.jo,a),0),a.Mg=0)}
670 f.jo=function(a){this.ee=null;this.a.debug("startForwardChannel_");if(1==this.b){if(!a){this.a.debug("open_()");this.Lg=Math.floor(1E5*Math.random());a=this.Lg++;var b=new iC(this,this.a,"",a,void 0);b.Be=null;var c=nD(this),d=this.Yh.clone();Fe(d,"RID",a);this.F&&Fe(d,"CVER",this.F);iD(this,d);mC(b,d,c);this.xb=b;this.b=2}}else 3==this.b&&(a?oD(this,a):0==this.g.length?this.a.debug("startForwardChannel_ returned: nothing to send"):this.xb||(oD(this),this.a.debug("startForwardChannel_ finished, sent request")))};
671 function oD(a,b){var c,d;b?6<a.Ge?(a.g=a.i.concat(a.g),a.i.length=0,c=a.Lg-1,d=nD(a)):(c=b.g,d=b.Zd):(c=a.Lg++,d=nD(a));var e=a.Yh.clone();Fe(e,"SID",a.j);Fe(e,"RID",c);Fe(e,"AID",a.sf);iD(a,e);c=new iC(a,a.a,a.j,c,a.Mg+1);c.Be=null;c.setTimeout(Math.round(1E4)+Math.round(1E4*Math.random()));a.xb=c;mC(c,e,d)}function iD(a,b){if(a.qb){var c=a.qb.Mp(a);c&&ae(c,function(a,c){Fe(b,c,a)})}}
672 function nD(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{ae(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 pD(a){a.Na||a.Gd||(a.o=1,a.Gd=CC(v(a.Oo,a),0),a.Ef=0)}
673 function qD(a){if(a.Na||a.Gd||3<=a.Ef)return!1;a.a.debug("Going to retry GET");a.o++;a.Gd=CC(v(a.Oo,a),rD(a,a.Ef));a.Ef++;return!0}
674 f.Oo=function(){this.Gd=null;this.a.debug("Creating new HttpRequest");this.Na=new iC(this,this.a,this.j,"rpc",this.o);this.Na.Be=null;this.Na.ck=0;var a=this.Mn.clone();Fe(a,"RID","rpc");Fe(a,"SID",this.j);Fe(a,"CI",this.$h?"0":"1");Fe(a,"AID",this.sf);iD(this,a);if(!C||vc(10))Fe(a,"TYPE","xmlhttp"),oC(this.Na,a,!0,this.li,!1);else{Fe(a,"TYPE","html");var b=this.Na,c=Boolean(this.li);b.Ff=3;b.Wd=Ie(a.clone());BC(b,c)}this.a.debug("New Request created")};
675 function PC(a,b,c){a.a.debug("Test Connection Finished");a.$h=c;a.wd=b.Ve;a.a.debug("connectChannel_()");a.wv(1,0);a.Yh=KC(a,a.uk);mD(a)}function RC(a,b){a.a.debug("Test Connection Failed");a.wd=b.Ve;OC(a,2)}
676 f.$o=function(a,b){if(0!=this.b&&(this.Na==a||this.xb==a))if(this.wd=a.vg,this.xb==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.Gd)this.a.debug("But we are currently starting the request.");else{if(this.Na)if(this.Na.xg+3E3<this.xb.xg)kD(this),this.Na.cancel(),this.Na=null;else break t;qD(this);yC()}else this.eo=e[1],c=this.eo-this.sf,0<c&&(e=e[2],this.a.debug(e+" bytes (in "+
677 c+" arrays) are outstanding on the BackChannel"),37500>e&&this.$h&&0==this.Ef&&!this.Ue&&(this.Ue=CC(v(this.wu,this),6E3)))}else this.a.debug("Bad POST response data returned"),OC(this,11)}else"y2f%"!=b&&(this.a.debug("Bad data returned - missing/invald magic cookie"),OC(this,11));else if(this.Na==a&&kD(this),!/^[\s\xa0]*$/.test(b))for(c=this.k.parse(b),t(c),e=0;e<c.length;e++){var g=c[e];this.sf=g[0];g=g[1];2==this.b?"c"==g[0]?(this.j=g[1],this.li=g[2],g=g[3],null!=g?this.Ge=g:this.Ge=6,this.b=3,
678 this.qb&&this.qb.co(this),this.Mn=QC(this,this.li,this.uk),pD(this)):"stop"==g[0]&&OC(this,7):3==this.b&&("stop"==g[0]?OC(this,7):"noop"!=g[0]&&this.qb&&this.qb.bo(this,g),this.Ef=0)}};f.wu=function(){null!=this.Ue&&(this.Ue=null,this.Na.cancel(),this.Na=null,qD(this),yC())};function kD(a){null!=a.Ue&&(l.clearTimeout(a.Ue),a.Ue=null)}
679 f.Uh=function(a){this.a.debug("Request complete");var b;if(this.Na==a)kD(this),this.Na=null,b=2;else if(this.xb==a)this.xb=null,b=1;else return;this.wd=a.vg;if(0!=this.b)if(a.Cc)1==b?(x(),Di(dD,new fD(dD,a.Zd?a.Zd.length:0)),mD(this),this.i.length=0):pD(this);else{var c=a.Ie;if(3==c||7==c||0==c&&0<this.wd)this.a.debug("Not retrying due to error type");else{this.a.debug("Maybe retrying, last error: "+jC(c,this.wd));var d;if(d=1==b)this.xb||this.ee?d=!1:1==this.b||2<=this.Mg?d=!1:(this.a.debug("Going to retry POST"),
680 this.ee=CC(v(this.jo,this,a),rD(this,this.Mg)),this.Mg++,d=!0);if(d||2==b&&qD(this))return;this.a.debug("Exceeded max number of retries")}this.a.debug("Error: HTTP request failed");switch(c){case 1:OC(this,5);break;case 4:OC(this,10);break;case 3:OC(this,6);break;case 7:OC(this,12);break;default:OC(this,2)}}};function rD(a,b){var c=5E3+Math.floor(1E4*Math.random());a.qb||(a.a.debug("Inactive channel"),c*=2);return c*b}
681 f.wv=function(a){if(!Ta(arguments,this.b))throw Error("Unexpected channel state: "+this.b);};function OC(a,b){a.a.info("Error code "+b);if(2==b||9==b){var c=null;a.qb&&(c=null);var d=v(a.zv,a);c||(c=new re("//www.google.com/images/cleardot.gif"),Ie(c));HC(c.toString(),1E4,d)}else yC();sD(a,b)}f.zv=function(a){a?(this.a.info("Successfully pinged google.com"),yC()):(this.a.info("Failed to ping google.com"),yC(),sD(this,8))};
682 function sD(a,b){a.a.debug("HttpChannel: error - "+b);a.b=0;a.qb&&a.qb.Ho(a,b);jD(a);hD(a)}function jD(a){a.b=0;a.wd=-1;if(a.qb)if(0==a.i.length&&0==a.g.length)a.qb.Ek(a);else{a.a.debug("Number of undelivered maps, pending: "+a.i.length+", outgoing: "+a.g.length);var b=ab(a.i),c=ab(a.g);a.i.length=0;a.g.length=0;a.qb.Ek(a,b,c)}}function KC(a,b){var c=NC(a,null,b);a.a.debug("GetForwardChannelUri: "+c);return c}function QC(a,b,c){b=NC(a,a.fi()?b:null,c);a.a.debug("GetBackChannelUri: "+b);return b}
683 function NC(a,b,c){var d=Je(c);if(""!=d.Ne)b&&te(d,b+"."+d.Ne),ue(d,d.ih);else var e=window.location,d=Ke(e.protocol,b?b+"."+e.hostname:e.hostname,e.port,c);a.eh&&ae(a.eh,function(a,b){Fe(d,b,a)});Fe(d,"VER",a.Ge);iD(a,d);return d}f.rk=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new SC;a.Q=!1;return a};function CC(a,b){if(!ha(a))throw Error("Fn must not be null and must be a function");return l.setTimeout(function(){a()},b)}f.Bc=function(){Di(dD,new gD(dD))};
684 function yC(){Di(dD,new eD(dD))}f.fi=function(){return!(!C||vc(10))};function tD(){}f=tD.prototype;f.co=function(){};f.bo=function(){};f.Ho=function(){};f.Ek=function(){};f.Mp=function(){return{}};function uD(a){a&&(this.id=a.id||a.name,this.name=a.name,this.app=a.app,this.type=a.type||"REMOTE_CONTROL",this.dp=a.user||"")}f=uD.prototype;f.id="";f.name="";f.app="";f.type="REMOTE_CONTROL";f.dp="";f.equals=function(a){return a?this.id==a.id:!1};function vD(a,b){this.action=a;this.params=b||null};function wD(){v(this.i,this);this.a=new ZB;this.a.b=!1;this.b=this.a.a=!1;this.g="";this.j={}}function xD(){var a=yD;!0!=a.b&&(SB(),a.b=!0)}wD.prototype.i=function(a){if(!this.j[a.g]){var b=$B(this.a,a),c=zD;if(c)switch(a.j){case MB:AD(c,"info",b);break;case NB:AD(c,"error",b);break;case OB:AD(c,"warn",b);break;default:AD(c,"debug",b)}else window.opera?window.opera.postError(b):this.g+=b}};var yD=null,zD=window.console;function AD(a,b,c){if(a[b])a[b](c);else a.log(c)};var BD=null,CD=null,DD=Array(50),ED=-1,FD=!1;function GD(a){var b=(ED+1)%50;ED=b;DD[b]=a;FD||(FD=49==b)}function HD(a){var b=DD;if(b[0]){var c=ED,d=FD?c:-1;do{var d=(d+1)%50,e=b[d];z(a,function(a){a(e)})}while(d!=c);DD=Array(50);ED=-1;FD=!1}}
685 function ID(){var a=JD,b=n("yt.mdx.remote.debug.logger_"),c=n("yt.mdx.remote.debug.handlers_");b&&c||(yD||(yD=new wD),-1!=window.location.href.indexOf("Debug=true")&&xD(),xD(),yD.a.a=!0,(b=n("yt.mdx.remote.debug.logger_"))||(b=TB("yt.mdx.remote")),BD=b,KB.prototype.log=KB.prototype.log,KB.prototype.getLogRecord=KB.prototype.Dv,KB.prototype.addHandler=KB.prototype.Cv,KB.prototype.removeHandler=KB.prototype.Ev,pa("yt.mdx.remote.debug.logger_",BD),CD=n("yt.mdx.remote.debug.handlers_")||[],pa("yt.mdx.remote.debug.handlers_",
686 CD),n("yt.mdx.remote.debug.logger_"),c=n("yt.mdx.remote.debug.handlers_"));c&&(c.push(a),HD(c))}function KD(a,b){var c=n("yt.mdx.remote.debug.logger_"),d=n("yt.mdx.remote.debug.handlers_");if(c){if(c.log(PB,a+": "+b,void 0),d&&!Ua(d)){HD(d);var e=c.getLogRecord(PB,a+": "+b,void 0);z(d,function(a){a(e)})}}else d&&!Ua(d)||GD(new IB(PB,String(b),"yt.mdx.remote"))};function LD(){if(!("cast"in window))return!1;var a=window.cast||{};return"ActivityStatus"in a&&"Api"in a&&"LaunchRequest"in a&&"Receiver"in a}function MD(a){KD("CAST",a)}function JD(a){var b=ND();b&&b.logMessage&&(a=$B(OD,a),b.logMessage(a))}
687 function PD(){if(!QD&&(Ua(RD)&&bb(RD,Og()),LD())){var a=ND();a?(a.removeReceiverListener("YouTube",SD),a.addReceiverListener("YouTube",SD),MD("API initialized in the other binary")):(a=new cast.Api,pa("yt.mdx.remote.castapi.api_",a),a.addReceiverListener("YouTube",SD),a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(function(){window.location.reload()}),OD=new ZB,OD.b=!1,OD.a=!1,ID(),MD("API initialized"));QD=!0}}
688 function TD(a){var b=Qa(RD,function(b){return b.id==a.id});0<=b&&(RD[b]=ng(a))}function SD(a){MD("Updating receivers: "+pb(a));UD(a);op("yt-remote-cast-device-list-update",VD());z(VD(),function(a){WD(a.id)});z(a,function(a){a.isTabProjected&&(a=XD(a.id),MD("Detected device: "+a.id+" is tab projected. Firing DEVICE_TAB_PROJECTED event."),op("yt-remote-cast-device-tab-projected",a))})}
689 function YD(a,b){MD("Updating "+a+" activity status: "+pb(b));var c=XD(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=""),TD(c),op("yt-remote-cast-device-status-update",c)):MD("Device not found")}function VD(){PD();return tg(RD)}
690 function UD(a){a=La(a,function(a){var c={id:a.id,name:a.name};if(a=XD(a.id))c.activityId=a.activityId,c.status=a.status;return c});Va(RD);bb(RD,a)}function XD(a){var b=VD();return Pa(b,function(b){return b.id==a})||null}function WD(a){var b=XD(a),c=ND();c&&b&&b.activityId&&c.getActivityStatus(b.activityId,function(b){"error"==b.status&&(b.status="stopped");YD(a,b)})}
691 function ZD(a){PD();var b=XD(a),c=ND();c&&b&&b.activityId?(MD("Stopping cast activity"),c.stopActivity(b.activityId,oa(YD,a))):MD("Dropping cast activity stop")}function ND(){return n("yt.mdx.remote.castapi.api_")}var OD=null,QD=!1,RD=n("yt.mdx.remote.castapi.devices_")||[];pa("yt.mdx.remote.castapi.devices_",RD);function $D(a,b){Fi.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;si(this,"tick",v(this.k,this));this.stop();Gi(this,5E3+2E4*Math.random())}y($D,Fi);$D.prototype.j=0;$D.prototype.k=function(){if(500<this.a){var a=this.a;24E4>2*a&&(a*=2);Gi(this,a)}this.o()};$D.prototype.start=function(){$D.C.start.call(this);this.j=x()+this.a};$D.prototype.stop=function(){this.j=0;$D.C.stop.call(this)};function aE(a,b){this.k=a;this.j=b;this.g=new Xh;this.b=new $D(this.Gt,this);this.a=null}y(aE,tD);f=aE.prototype;f.Th="";f.Pg=0;f.xi=0;f.He=function(){};f.D=function(a,b,c){return this.g.D(a,b,c)};f.$=function(a,b,c){return this.g.$(a,b,c)};f.Rc=function(a){return this.g.Rc(a)};f.u=function(a,b){return this.g.u.apply(this.g,arguments)};
692 f.connect=function(a,b,c){if(!this.a||2!=this.a.b){this.Th="";this.b.stop();this.i=a||null;this.Pg=b||0;a=this.k+"/test";b=this.k+"/bind";var d=new bD("1",c?c.firstTestResults:null,c?c.secondTestResults:null),e=this.a;e&&(e.qb=null);d.qb=this;this.a=d;e?(3!=e.b&&0==lD(e)||this.He("Unexpected state on old channel when reconnecting: "+e.b),this.a.connect(a,b,this.j,e.j,e.sf)):c?this.a.connect(a,b,this.j,c.sessionId,c.arrayId):this.a.connect(a,b,this.j)}};
693 f.disconnect=function(a){this.xi=a||0;this.b.stop();this.a&&0!=this.a.b&&this.a.disconnect();this.xi=0};f.sendMessage=function(a,b){if(!this.a||0==this.a.b||2!=this.a.b&&3!=this.a.b&&!this.b.Tc)this.He("Ignoring message: "+a);else{var c={_sc:a};b&&Rb(c,b);var d=this.a;if(0==d.b)throw Error("Invalid operation: sending map when state is closed");1E3==d.g.length&&pb(c);d.g.push(new cD(d.yu++,c));2!=d.b&&3!=d.b||mD(d)}};
694 f.co=function(){var a=this.b;a.stop();Gi(a,5E3+2E4*Math.random());this.i=null;this.Pg=0;this.u("handlerOpened")};f.Ho=function(a,b){var c=2==b&&401==this.a.wd;4==b||c||(6==b&&(c=this.b,c.stop(),Gi(c,500)),this.b.start());this.u("handlerError",b)};f.Ek=function(){this.b.Tc||this.u("handlerClosed")};f.Mp=function(){var a={v:2};this.Th&&(a.gsessionid=this.Th);0!=this.Pg&&(a.ui=""+this.Pg);0!=this.xi&&(a.ui=""+this.xi);this.i&&Rb(a,this.i);return a};
695 f.bo=function(a,b){"S"==b[0]?this.Th=b[1]:this.g.u("handlerMessage",new vD(b[0],b[1]))};function bE(a,b){(a.j.loungeIdToken=b)||a.b.stop()}function cE(a){return a.b.Tc?a.b.j-x():NaN}f.Gt=function(){this.b.stop();0!=lD(this.a)?this.b.start():this.connect(this.i,this.Pg)};function dE(a,b){aE.call(this,a,b)}y(dE,aE);dE.prototype.He=function(){};function eE(){this.wb=[];this.index=-1;fE(this)}function fE(a){a.volume=-1;a.muted=!1;a.b=null;a.a=-1;a.g=null;a.i=0;a.j=x()}function gE(a){return a.wb[a.index]}function hE(a,b){a.i=b;a.j=x()}function iE(a){switch(a.a){case 1:return(x()-a.j)/1E3+a.i;case -1E3:return 0}return a.i}function jE(a,b){var c=a.index;a.index=Ja(a.wb,b);c!=a.index&&fE(a)}function kE(a,b,c){c=c||gE(a);if(jb(a.wb,b)&&c==gE(a))return!1;a.wb=ab(b);jE(a,c);return!0}
696 eE.prototype.add=function(a,b){return a&&!Ta(this.wb,a)?(!b||-1<this.index&&this.index>=this.wb.length-1?this.wb.push(a):this.wb.splice(this.index+1,0,a),!0):!1};eE.prototype.remove=function(a){var b=gE(this);return Xa(this.wb,a)?(this.index=Ja(this.wb,b),!0):!1};function lE(){R.call(this);this.Fc=xg(Lg());this.log_("Initializing local screens: "+Nf(this.Fc));this.g=[];this.nk=null;this.b=[];this.a=[];this.pi(VD());this.log_("Initializing DIAL devices: "+og(this.a));var a=xg(Mg());mE(this,a);this.log_("Initializing online screens: "+Nf(this.b));nE(this)}y(lE,R);var oE=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];f=lE.prototype;f.gh=NaN;f.log_=function(a){KD("RM",a)};
697 function pE(a){var b=navigator.userAgent;if(0<=b.search("MSIE")&&(b=b.match(/MSIE ([\d.]+)/)[1],0>Ea(b,"10.0")))return a;b=de(document.location.href);return be("https",null,b[3],null,a)}function nE(a){jp("yt-remote-cast-device-list-update",a.pi,a);jp("yt-remote-cast-device-status-update",a.bx,a);jp("yt-remote-cast-device-tab-projected",function(a){this.u("connectToReceiver",a.id)},a);a.pp();hf(v(a.pp,a),1E4)}
698 f.u=function(a,b){if(this.ka())return!1;this.log_("Firing "+a);return this.F.u.apply(this.F,arguments)};f.pp=function(){var a=VD();Ua(a)||this.pi(a);a=qE(this);Ua(a)||(ig("yt-remote-lounge-token-expiration")?rE(this,a):sE(this))};f.Uk=function(){var a=qE(this),b=Ka(a,function(a){return!!Ag(this.b,a)},this);mE(this,b);this.pi(VD());this.u("managedScreenChange",a)};function tE(a,b){return Ka(b,function(a){return a.zb?(a=vg(this.a,a.zb),!!a&&"RUNNING"==a.status):!0},a)}
699 f.pi=function(a){var b=!1;z(a,function(a){var c=Bg(this.Fc,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."),uE(this));Ng(sg(a));var c=!jb(this.a,a,ug);c&&this.log_("Updating DIAL devices: "+og(this.a)+" to "+og(a));this.a=a;mE(this,this.b);c&&this.u("onlineReceiverChange")};
700 f.bx=function(a){var b=vg(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,Ng(sg(this.a)));mE(this,this.b)};function mE(a,b,c){b=tE(a,b);var d=!jb(a.b,b,zg);!d&&!c||Ua(b)||(c=wg(b),fg("yt-remote-online-screens",c,60));d&&(a.log_("Updating online screens: "+Nf(a.b)+" -> "+Nf(b)),a.b=b,a.u("onlineReceiverChange"))}
701 function rE(a,b){var c=[],d={};z(b,function(a){a.kc&&(d[a.kc]=a,c.push(a.kc))});var e={method:"POST",Gf:{lounge_token:c.join(",")},S:a,Pa:function(a,b){var c=[];z(b.screens||[],function(a){"online"==a.status&&c.push(d[a.loungeToken])});var e=this.nk?vE(this,this.nk):null;e&&!Ag(c,e)&&c.push(e);mE(this,c,!0)}};Qj(pE("/api/lounge/pairing/get_screen_availability"),e)}
702 function sE(a){var b=qE(a),c=La(b,function(a){return a.nb});Ua(c)||(a.log_("Updating lounge tokens for: "+pb(c)),Qj(pE("/api/lounge/pairing/get_lounge_token_batch"),{Gf:{screen_ids:c.join(",")},method:"POST",S:a,Pa:function(a,c){wE(this,c.screens||[]);this.Fc=Ka(this.Fc,function(a){return!!a.kc});uE(this);rE(this,b)}}))}function wE(a,b){z($a(a.Fc,a.g),function(a){var d=Pa(b,function(b){return a.nb==b.screenId});d&&(a.kc=d.loungeToken)})}
703 function uE(a){var b=xg(Lg());jb(a.Fc,b,zg)||(a.log_("Saving local screens: "+Nf(b)+" to "+Nf(a.Fc)),Kg(wg(a.Fc)),a.Uk())}function yE(a,b,c){var d=Qa(b,function(a){return yg(c,a)}),e=0>d?!0:!1;0>d?b.push(c):b[d]=c;Ag(a.b,c)||a.b.push(c);return e}
704 f.Po=function(a,b,c){var d=!1;b>=oE.length&&(this.log_("Pairing DIAL device "+a+" with "+c+" timed out."),d=!0);var e=vg(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?(zE(this),this.u("screenPair",null)):Qj(pE("/api/lounge/pairing/get_screen"),{method:"POST",Gf:{pairing_code:c},S:this,Pa:function(a,b){zE(this);var d=new Lf(b.screen);
705 d.name=e.name;d.zb=e.id;var m=yE(this,this.Fc,d);this.log_("Paired with "+(m?"a new":"an old")+" local screen:"+Mf(d));uE(this);this.u("screenPair",d);this.log_("Pairing "+c+" succeeded.");this.u("screenPair",d)},onError:function(){this.log_("Polling pairing code: "+c);I(this.gh);this.gh=H(v(this.Po,this,a,b+1,c),oE[b])}})};
706 function AE(a,b,c,d,e){zE(a);if(vg(a.a,b)){if(!c){var g=c=pg();PD();var h=XD(b),k=ND();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",TD(h),op("yt-remote-cast-device-status-update",h));MD("Sending a cast launch request with params: "+
707 m.parameters);k.launch(m,oa(YD,b))}else MD("No cast API or no cast device. Dropping cast launch.")}a.gh=H(v(a.Po,a,b,0,c),oE[0])}else a.log_("No DIAL device with id: "+b)}function zE(a){I(a.gh);a.gh=NaN}function vE(a,b){var c=Bg(qE(a),b);a.log_("Found screen: "+Mf(c)+" with key: "+b);return c}function BE(a,b){var c=Bg(a.b,b);a.log_("Found online screen: "+Mf(c)+" with key: "+b);return c}
708 function CE(a,b){var c=vg(a.a,b);if(!c){var d=Bg(a.Fc,b);d&&(c=vg(a.a,d.zb))}a.log_("Found DIAL: "+(c?c.toString():"null")+" with key: "+b);return c}function qE(a){return $a(a.g,Ka(a.Fc,function(a){return!Ag(this.g,a)},a))};function DE(a,b){R.call(this);if(gg){var c=gg;eg(c,c.If.Id(!0))}Cg();TB("goog.net.BrowserChannel");this.i=new lE;c=Eg();this.g=new dE("/api/lounge/bc",{device:"REMOTE_CONTROL",id:c,name:a,app:b});this.a=null;this.A=[];this.g.D("handlerOpened",this.Ru,this);this.g.D("handlerClosed",this.Ou,this);this.g.D("handlerError",this.Pu,this);this.g.D("handlerMessage",this.Qu,this);this.i.D("managedScreenChange",this.Uk,this);this.log_("Initializing with device id = "+c+", name = "+a+", app = "+b)}y(DE,R);
709 f=DE.prototype;f.Sg=NaN;f.Qk=NaN;f.Oi=NaN;f.Pi=NaN;f.log_=function(a){KD("RC",a)};function EE(a){var b=Fg();return b?vE(a.i,b):null}function FE(a,b,c){a.$("connectionOpened",b,c);a.$("connectionClosed",b,c);a.$("connectionError",b,c)}function GE(a,b){"connectionError"==b&&jg("yt-remote-session-screen-id");a.log_("Firing "+b);a.u(b,"connectionOpened"==b);a.o=null}
710 function HE(a,b){"playerChange"==b?(I(a.Oi),a.Oi=H(v(function(){this.u("playerChange");this.Oi=NaN},a),2E3)):"playlistChange"==b&&(I(a.Pi),a.Pi=H(v(function(){this.u("playlistChange");this.Pi=NaN},a),2E3))}function IE(a,b){"playerChange"==b&&isNaN(a.Oi)&&a.u("playerChange");"playlistChange"==b&&isNaN(a.Pi)&&a.u("playlistChange")}function JE(a,b){b?(a.log_("Changing current screen id from: "+a.j+" to "+b.nb),a.j=b.nb,bE(a.g,b.kc)):(a.log_("Removing current screen id: "+a.j),a.j="",bE(a.g,""))}
711 function KE(a){return a.j?vE(a.i,a.j):null}f.connect=function(a){this.log_("Connecting to the receiver: "+pb(a));var b=BE(this.i,a.key);b?LE(this,b):(a=CE(this.i,a.key))?ME(this,a):H(v(function(){GE(this,"connectionError")},this),0)};function NE(a){a=a||0;5>=a&&(a=0);return a}
712 function LE(a,b){a.log_("Connecting to screen: "+Mf(b));var c=EE(a);c&&!yg(b,c)?a.disconnect():OE(a);a.a=null;JE(a,b);c={};if(a.b){c.videoIds=PE(a.b).join(",");c.videoId=a.b.a.getVideoData().M;c.videoSources=QE(a.b).join(",");var d=a.o?a.o.currentTime:a.b.a.getCurrentTime();c.currentTime=NE(d)}Nb(c)?a.log_("Connecting with empty params"):a.log_("Connecting with setPlaylist and params: "+pb(c));a.b?Pg(a.b.a.getVideoData().M,RE(a.b)):Pg("","");a.g.connect(Nb(c)?{}:{method:"setPlaylist",params:pb(c)},
713 1,Jg());a.a=new eE;Nb(c)||(a.a.wb=c.videoIds.split(","),jE(a.a,c.videoId));SE(a)}function ME(a,b){a.log_("Connecting to DIAL device: "+(b?b.toString():"null"));TE(a);UE(a);var c=a.o?a.o.pairingCode:"";c?AE(a.i,b.id,c):a.b?AE(a.i,b.id,"",a.b.a.getVideoData().M,a.b.a.getCurrentTime()):AE(a.i,b.id,"");a.k=b.id;a.i.D("screenPair",a.Cn,a)}f.Cn=function(a){this.log_("Paired with a DIAL screen: "+Mf(a));TE(this);a?LE(this,a):(this.k="",GE(this,"connectionError"))};
714 f.disconnect=function(){this.log_("Disconnecting with user intent.");UE(this);Qg();this.g.disconnect(1)};function UE(a){zE(a.i);var b=Pa(a.A,function(a){return"REMOTE_CONTROL"==a.type});b?(a.log_("Did not stop DIAL device, because another remote is connected: "+pb(b?{id:b.id,name:b.name,app:b.app,type:b.type,user:b.dp}:null)),a.k=""):(b=KE(a),a.k?(a.log_("Stopping DIAL device: "+a.k),ZD(a.k),a.k=""):b&&b.zb&&(a.log_("Stopping DIAL device: "+b.zb),ZD(b.zb)))}
715 function OE(a){a.log_("Disconnecting from screen.");a.g.disconnect(2)}function VE(a,b){var c=KE(a),d=Pa(b,function(a){return c&&(a.key==c.nb||a.key==c.zb)||this.k&&(a=CE(this.i,a.key))&&a.id==this.k?!0:!1},a);a.log_("Found current receiver: "+pb(d)+" in "+pb(b));return d}function WE(a){return XE(a)?a.a:null}function YE(a,b,c){c?a.log_("Sending: action="+b+", params="+pb(c)):a.log_("Sending: action="+b);ZE(a)?a.log_("Action = "+b+" was ignored due to reconnecting."):a.g.sendMessage(b,c)}
716 function $E(a,b,c,d){d=NE(d);a.a.add(b,!0)&&YE(a,"insertVideo",{videoId:b,videoSource:c});hE(a.a,d);jE(a.a,b);HE(a,"playlistChange");YE(a,"setVideo",{currentTime:d,videoId:b})}function aF(a,b,c,d,e){e=NE(e);YE(a,"setPlaylist",{videoIds:c.join(","),videoId:b,videoSources:La(c,function(){return d}),currentTime:e});hE(a.a,e);kE(a.a,c,b);HE(a,"playlistChange")}
717 function bF(a){var b=ig("yt-remote-session-video-id"),c=ig("yt-remote-session-list-id"),d=a.b.a.getVideoData().M,e=RE(a.b);Pg(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=QE(a.b),c=a.b.a.vb(),b=b[c?c.ua:0],c=a.b.a.getCurrentTime(),h?aF(a,d,PE(a.b),b,c):$E(a,d,b,c)):h&&(d=PE(a.b),h=QE(a.b),YE(a,"updatePlaylist",{videoIds:d.join(","),videoSources:h.join(",")}),kE(a.a,d),HE(a,"playlistChange"))}
718 function cF(a){YE(a,"play");hE(a.a,iE(a.a));-1E3!=a.a.a&&(a.a.a=1);HE(a,"playerChange")}f.ao=function(){YE(this,"getNowPlaying")};function XE(a){var b=a.g.a;return!!b&&3==b.b&&!!a.j&&isNaN(a.Sg)}function SE(a){dF(a);a.Sg=H(v(function(){dF(this);JE(this,null);this.k="";this.a=null;this.log_("Connecting timeout");GE(this,"connectionError");Qg();this.g.disconnect(1)},a),1E4)}function dF(a){I(a.Sg);a.Sg=NaN}function eF(a){I(a.Qk);a.Qk=NaN}function TE(a){a.i.$("screenPair",a.Cn,a)}
719 f.Ru=function(){this.log_("Channel opened");var a=this.j;fg("yt-remote-session-browser-channel",{firstTestResults:[""],secondTestResults:!this.g.a.$h,sessionId:this.g.a.j,arrayId:this.g.a.sf});fg("yt-remote-session-screen-id",a);var a=Dg(),b=Eg();Ta(a,b)||a.push(b);Hg(a);Cg();this.b&&(this.b.a.getVideoData().Ta&&!RE(this.b)?this.log_("Wait for playlist data to be loaded."):bF(this))};function fF(a){Qg(!0);eF(a);a.i.nk=null;JE(a,null);a.k=""}
720 f.Ou=function(){this.log_("Channel closed");var a=!!this.j&&isNaN(this.Sg);fF(this);a&&GE(this,"connectionClosed")};f.Pu=function(a){ZE(this)?this.log_("Channel error: "+a+" with reconnection in "+cE(this.g)+" ms"):this.log_("Channel error: "+a+" without reconnection");ZE(this)||fF(this);dF(this);GE(this,"connectionError")};
721 function gF(a,b){switch(b.action){case "loungeStatus":var c=nb(b.params.devices);a.A=La(c,function(a){return new uD(a)});break;case "loungeScreenDisconnected":Za(a.A,function(a){return"LOUNGE_SCREEN"==a.type});break;case "remoteConnected":var d=new uD(nb(b.params.device));Pa(a.A,function(a){return a.equals(d)})||Wa(a.A,d);break;case "remoteDisconnected":d=new uD(nb(b.params.device)),Za(a.A,function(a){return a.equals(d)})}}
722 function hF(a,b){var c=!1;if("loungeStatus"==b.action)c=!!Pa(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!=XE(a)&&(c?(dF(a),GE(a,"connectionOpened"),a.ao()):a.disconnect())}function ZE(a){return!isNaN(cE(a.g))}
723 f.Qu=function(a){a.params?this.log_("Received: action="+a.action+", params="+pb(a.params)):this.log_("Received: action="+a.action);gF(this,a);hF(this,a);if(XE(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=nb(a.params.currentError)));if("onSubtitlesTrackChanged"==a.action)d==gE(this.a)&&(delete a.params.videoId,
724 Nb(a.params)?this.a.b=null:this.a.b=a.params,IE(this,"playerChange"));else if(gE(this.a)||'"onStateChange"'!=a.action)"playlistModified"!=a.action&&"nowPlayingPlaylist"!=a.action||e?(d||"nowPlaying"!=a.action&&"nowPlayingPlaylist"!=a.action?d?d!=gE(this.a)&&(b=!0):d=gE(this.a):(jE(this.a,""),b=!0),e&&(e=e.split(","),kE(this.a,e,d)&&(b=!0))):(kE(this.a,[]),b=!0),this.a.add(d)&&YE(this,"getPlaylist"),d&&jE(this.a,d),b&&IE(this,"playlistChange"),q(g)&&(b=parseInt(g,10),b=isNaN(b)?-1:b,-1==b&&-1E3==this.a.a&&
725 (b=-1E3),0==b&&"0"==h&&(b=-1),c=c||b!=this.a.a,this.a.a=b,d=null,-1E3==b&&(d=this.a.g||"unknown",p&&(d=p.reason||d)),c=c||this.a.g!=d,this.a.g=d,1==this.a.a?(eF(this),this.Qk=H(v(this.ao,this),2E4)):eF(this)),"onError"!=a.action||-1!=this.a.a&&-1E3!=this.a.a||(a=nb(a.params.errors)||[],1==a.length&&"PLAYER_ERROR"==a[0].error&&a[0].videoId==gE(this.a)&&(this.a.a=-1E3,this.a.g=a[0].reason||"unknown",c=!0)),h&&(b=parseInt(h,10),hE(this.a,isNaN(b)?0:b),c=!0),q(k)&&(b=parseInt(k,10),isNaN(b)||(c=c||this.a.volume!=
726 b,this.a.volume=b),q(m)&&(m="true"==m,c=c||this.a.muted!=m,this.a.muted=m)),c&&IE(this,"playerChange")}};f.Uk=function(){this.j&&!KE(this)?(this.log_("Dropping current screen with id: "+this.j),this.disconnect(),this.a=null):EE(this)||Qg()};function iF(){DE.call(this,"Desktop","youtube-desktop");J(window,"unload",v(this.B,this));J(window,"beforeunload",v(this.B,this))}y(iF,DE);ca(iF);iF.prototype.B=function(){OE(this)};function jF(a,b){this.a=a;this.a.D("onVolumeChange",this.Nh,this);this.a.D("onPlaylistUpdate",this.Pm,this);this.i=NaN;this.b=b;this.b.D("playerChange",this.Qm,this);this.b.D("playlistChange",this.Rm,this);this.k=0;this.g={};this.j=new Np(this.Ys,1E3,this);L(this,this.j);this.o=0}y(jF,K);f=jF.prototype;
727 f.H=function(){kF(this);this.a.$("onVolumeChange",this.Nh,this);this.a.$("onPlaylistUpdate",this.Pm,this);this.a=null;this.b.$("playerChange",this.Qm,this);this.b.$("playlistChange",this.Rm,this);this.b=null};f.Pw=function(a,b){WE(this.b)&&(lF(this)?this.Qv.apply(this,arguments):this.Rv.apply(this,arguments))};
728 f.Rv=function(a,b){var c=Array.prototype.slice.call(arguments,1);switch(a){case "control_toggle_play_pause":case "control_play":case "control_pause":mF(this,this.a.a.getCurrentTime());break;case "control_seek":mF(this,c[0])}};
729 f.Qv=function(a,b){var c=WE(this.b),d=Array.prototype.slice.call(arguments,1);switch(a){case "control_toggle_play_pause":1==c.a?nF(this):(cF(this.b),this.a.mb(!0));break;case "control_play":cF(this.b);this.a.mb(!0);break;case "control_pause":nF(this);break;case "control_seek":this.o=d[0];Op(this.j);break;case "control_subtitles_set_track":oF(this,d[0])}};function nF(a){var b=a.b;YE(b,"pause");hE(b.a,iE(b.a));-1E3!=b.a.a&&(b.a.a=2);HE(b,"playerChange");pF(a,iE(WE(a.b)));kF(a);a.a.mb(!1)}
730 f.Ys=function(){var a=this.o,b=WE(this.b);kF(this);pF(this,a);-1==b.a?mF(this,a):(b=this.b,a=Math.floor(a),YE(b,"seekTo",{newTime:a}),hE(b.a,a),-1E3!=b.a.a&&(b.a.a=3),HE(b,"playerChange"))};
731 function oF(a,b){if(lF(a)){var c=a.b,d=a.a.a.getVideoData().M;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},Rb(d,c.a.b),YE(c,"setSubtitlesTrack",d)):YE(c,"setSubtitlesTrack");HE(c,"playerChange");a.g=WE(a.b).b}}function mF(a,b){$E(a.b,a.a.a.getVideoData().M,"VI",b);var c=a.a;qF(c);rF(c.g)}
732 f.Nh=function(a){if(lF(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;YE(c,"setVolume",d);HE(c,"playerChange")}};f.Pm=function(){bF(this.b)};
733 f.Qm=function(){if(lF(this)){var a=WE(this.b);kF(this);switch(a.a){case 1:sF(this);this.a.mb(!0);break;case 3:var b=this.a;qF(b);rF(b.g);break;case 0:this.a.mb(!1);this.j.stop();b=this.a.a;(b=N(b.app,b.a||1))&&b.lg(!0);pF(this,this.a.a.getVideoData().ra);break;case 2:this.a.mb(!1);pF(this,iE(a));break;case -1:this.a.mb(!1);break;case -1E3:var b=this.a,c=mf("REMOTE_PLAYER_ERROR");qF(b);tF(b.g,c)}0==this.k&&(b=this.a.a,(b=N(b.app,b.a||1))&&b.lg(!1));this.k=a.a;uF(this);b=Math.round(this.a.a.Em());-1!=
734 a.volume&&b!=a.volume&&(this.a.$("onVolumeChange",this.Nh,this),this.a.a.Gm(a.volume),a.muted?this.a.a.Fm():this.a.a.Hm(),this.a.D("onVolumeChange",this.Nh,this))}else this.a.mb(!1)};
735 function uF(a){var b=WE(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.tj("captions","tracklist",{qy:1}),c=Pa(c,function(a){return a.languageCode==b.languageCode&&a.name==b.trackName});a.a.a.Sm("captions","track",c)}else a.a.a.Tm("captions")}f.Rm=function(){lF(this)||(pF(this,0),kF(this),this.a.mb(!1))};
736 function lF(a){var b=WE(a.b);return!!b&&gE(b)==a.a.a.getVideoData().M}function sF(a){kF(a);ZE(a.b)||(pF(a,iE(WE(a.b))),a.i=H(v(function(){sF(this)},a),500))}function kF(a){I(a.i);a.i=NaN}function pF(a,b){var c=a.a.a.getVideoData().ra;a.a.u("command_progress",b,b/c,void 0)};function vF(){Y.call(this,["div",["html5-bezel","html5-center-overlay"],["div","{{icon}}"]]);this.a=NaN;this.hide()}y(vF,Y);vF.prototype.hide=function(){vF.C.hide.call(this);wF(this)};vF.prototype.setIcon=function(a){bn(this.template,"icon",a)};vF.prototype.show=function(a){wF(this);a&&this.setIcon(a);vF.C.show.call(this)};function wF(a){I(a.a);W(a.element,"html5-bezel-fade")};function xF(a){Y.call(this,["div","ytp-thumbnail"]);this.a=a}y(xF,Y);
737 xF.prototype.show=function(a){if(a||this.element.childNodes.length){if(a){$c(this.element);var b=this.element,c=this.a;if(void 0!=Jn("backgroundSize"))d=document.createElement("div"),d.style.backgroundImage="url("+Nn(b,a,c)+")";else{var d=document.createElement("img");d.src=Nn(b,a,c);a=d;b.clientWidth/b.clientHeight<Mn?(a.style.height="100%",a.style.width="auto"):(a.style.height="auto",a.style.width="100%")}V(d,"video-thumbnail");this.element.appendChild(d)}xF.C.show.call(this)}};function yF(a,b,c,d){R.call(this);this.P=d;this.b=this.a=null;this.I=c;this.O=new Rn(mf("REMOTE_PLAYER_RECONNECT_TIME"),["formatted_time"]);this.B=new Rn(mf("REMOTE_CONNECTED_STATUS"),["receiver_name"]);this.G=new Rn(mf("REMOTE_CONNECTING_STATUS"),["receiver_name"]);this.L=new Rn(mf("REMOTE_ERROR_STATUS"),["receiver_name"]);this.j=this.G;this.g=this.A=this.k=this.i=null;this.J="";this.o=null;this.k=E("ytp-remote-display-container",b);this.i=E("html5-remote-display-status-bar",b);zF(this);b=E("html5-remote-display-error",
738 b);c=Xc("div");b.appendChild(c);V(c,"html5-remote-display-error-icon");this.A=Xc("div");b.appendChild(this.A);this.g=new un(this.P,"ytp-button-remote-reconnect");this.g.Aa(mf("REMOTE_PLAYER_RECONNECT_BUTTON"));this.g.W(b);this.J=J(this.g,"click",v(this.u,this,"reconnectclicked"));this.o=new xF(a.a.K().nc);this.o.W(this.k);this.o.show(a.a.getVideoData());L(this,this.o);this.a=new vF;this.a.W(this.k);this.a.hide();L(this,this.a);this.b=new Tt;V(this.b.element,"html5-center-overlay");V(this.b.element,
739 "html5-center-transform");this.b.W(this.k);this.b.show();L(this,this.b)}y(yF,R);yF.prototype.H=function(){yf(this.J);this.i.innerHTML="";yF.C.H.call(this);this.o=this.i=this.a=null};function AF(a){a.j=a.G;zF(a);BF(a,!1);a.a.hide();a.b.show()}function rF(a){a.j=a.B;zF(a);BF(a,!1);a.a.hide();a.b.show()}function tF(a,b){a.j=a.L;zF(a);a.a.hide();a.b.hide();a.g.hide();a.A.innerHTML=b;BF(a,!0)}function BF(a,b){X(a.k,"ytp-remote-error",b)}
740 function CF(a,b){tF(a,Vn(a.O,{formatted_time:Dn(b/1E3)}));a.g.show()}function zF(a){a.i&&(a.i.innerHTML=Vn(a.j,{receiver_name:'<span class="mdx-receiver">'+a.I+"</span>"},void 0,!0))};function DF(a){R.call(this);this.k=this.g="";this.j=null;this.i=a;this.a=this.b=null;EF(this,a)}y(DF,R);DF.prototype.H=function(){yf(this.g);yf(this.k)};function FF(a,b){var c="";z(b,function(a){c+=Vn(this.j,{receiver_key:a.key,receiver_name:a.name})},a);a.a.innerHTML=c;Lp(Ap.getInstance(),a.i)}function GF(a,b){var c=E("active",a.a);if(c){if(G(c,"value")==b)return;Fm(c,["active","selected"])}(c=a.a.querySelector('[data-value="'+b+'"]'))&&Em(c,["active","selected"])}
741 function EF(a,b){a.b=Mp(Ap.getInstance(),b);var c=E("html5-remote-receiver-template",a.b);a.j=Un(c,["receiver_key","receiver_name"]);a.a=E("html5-remote-receivers",a.b);a.a.innerHTML="";a.g=Cf(a.b,v(a.o,a),"yt-uix-button-menu-item");a.k=J(b,"click",v(function(){this.u("menushown")},a))}DF.prototype.o=function(a){(a=a.currentTarget)&&"remote-select-receiver"==G(a,"action")&&(a=G(a,"value"),GF(this,a),this.u("selectreceiver",a))};function HF(a){zx.call(this,a);var b=Q(this.a);this.G=a.R.B;this.k={key:pg(),name:mf("REMOTE_LOCAL_SCREEN")};this.g=this.j=null;this.b=IF(this);this.B=NaN;a=this.b;a.o=ig("yt-remote-delayed-connect-key");if(a.o)a.log_("Connecting with the delayed connect data: "+pb(a.o)),a.connect({key:a.o.key}),jg("yt-remote-delayed-connect-key");else{var c=EE(a);c?c.nb==a.j?a.log_("Skipping connecting because current connection exists."):(a.log_("Resuming MDx session: "+Mf(c)),JE(a,c),a.g.connect({},0,Jg()),a.a=
742 new eE,SE(a)):(Qg(),a.log_("Skipping connecting because no session screen found."))}this.A=new DF(E("html5-remote-button",b));this.A.D("selectreceiver",this.sj,this);L(this,this.A);this.i=this.k;this.og()}y(HF,zx);var JF=["play_pause","seek"],KF=["captions"];f=HF.prototype;f.qa="remote";f.ad="remote";f.$a=function(){return this.app.I.K().qg};
743 f.create=function(){HF.C.create.call(this);var a=this.b=IF(this),b=this.un;FE(a,b,this);a.D("connectionOpened",b,this);a.D("connectionClosed",b,this);a.D("connectionError",b,this);this.b.i.D("onlineReceiverChange",this.og,this);this.b.i.D("connectToReceiver",this.sj,this);this.og();this.i!=this.k&&3<this.a.app.o&&this.load()};function LF(a){a.b&&(FE(a.b,a.un,a),a.b.i.$("onlineReceiverChange",a.og,a),a.b.i.$("connectToReceiver",a.sj,a),a.b.b=null,a.b=null)}
744 f.destroy=function(){var a=this.A;Fp(Ap.getInstance(),a.i);LF(this);HF.C.destroy.call(this)};
745 f.load=function(){if(!this.ba){HF.C.load.call(this);this.og();var a=E("html5-remote-module",Q(this.a));this.g=new yF(this,a,this.i.name,this.G);this.g.D("reconnectclicked",this.nm,this);this.j=new jF(this,this.b);oF(this.j,this.a.tj("captions","track"));this.a.uj();this.u("command_redirect_controls",this,JF,KF);var b=this.b.o?this.b.o.currentTime:0;0!=b&&H(v(function(){pF(this.j,b)},this),0);WE(this.b)&&!Ua(WE(this.b).wb)&&this.a.rg();this.ba=!0}};
746 f.unload=function(){this.ba&&(this.ba=!1,MF(this,this.k),this.mb(!1),Tm(this),this.g.$("reconnectclicked",this.nm,this),qF(this),Ug(this.j,this.g),this.g=this.j=null,HF.C.unload.call(this))};f.H=function(){LF(this);qF(this);Ug(this.j,this.g);this.g=this.j=null;HF.C.H.call(this)};function RE(a){return a.a.vb()?a.a.getVideoData().Ta:""}function PE(a){var b=a.a.vb();if(b){a=[];for(var c=0;c<b.Mb;c++)a[c]=wh(b,c).M;return a}return[a.a.getVideoData().M]}
747 function QE(a){var b=RE(a);if(b){b=b.substr(0,2);a=zm(a.a.vb());for(var c=[],d=0;d<a;d++)c[d]=b;b=c}else b=["VI"];return b}function IF(a){var b=iF.getInstance();b.b=a;return b}f.un=function(){qF(this);this.ba&&ZE(this.b)?NF(this):WE(this.b)?this.load():this.unload()};f.nm=function(){var a=this.b;ZE(a)&&(a=a.g.b,a.Tc&&(a.stop(),a.start(),a.k()));AF(this.g)};f.ie=function(a,b){this.j.Pw.apply(this.j,arguments)};
748 f.sj=function(a){if(this.i.key!=a)if(this.k.key==a){var b=WE(this.b);a=!!b&&1==b.a&&gE(b)==this.a.getVideoData().M;b=b?iE(b):0;this.i=this.k;this.b.disconnect();this.unload();a&&(this.a.Oh(b),this.a.rg())}else if(a=qg(Rg(),a))MF(this,a),this.b.connect(a),this.load()};function MF(a,b){(a.i||b?a.i&&b&&a.i.key==b.key:1)||(a.i=b,GF(a.A,b.key))}f.og=function(){var a=Rg();this.b&&(this.i=VE(this.b,a)||this.k);a.unshift(this.k);FF(this.A,a);GF(this.A,this.i.key);this.g&&(a=this.g,a.I=this.i.name,zF(a))};
749 function NF(a){qF(a);ZE(a.b)?(CF(a.g,cE(a.b.g)),a.B=H(v(function(){NF(this)},a),1E3)):AF(a.g)}function qF(a){I(a.B);a.B=NaN}f.mb=function(a){qF(this);var b=this.g;b.j=b.B;zF(b);BF(b,!1);b.b.hide();b.a.show();b.a.setIcon(a?"html5-bezel-pause":"html5-bezel-play");HF.C.mb.call(this,a)};function OF(){Y.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}}"]],
750 ["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"],
751 ["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(OF,Y);OF.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)};
752 OF.prototype.H=function(){this.a=null;OF.C.H.call(this)};function PF(a){R.call(this);this.app=a;this.g=this.a=this.la=null;this.G=new Db(0,0,0,0);this.b=null;this.da=new Db(0,0,0,0);this.aa=this.V=null;this.Sa=this.Va=0;this.va=this.Q=null;a=a.K();this.Ra=nk()||"blazer"==a.La;this.Ca=0;this.j=null;this.ik()}y(PF,R);var QF=null;f=PF.prototype;f.ik=function(){this.app.D("initializingmode",this.gx,this);this.app.D("videodatachange",this.yl,this)};f.gx=function(){this.da=new Db(0,0,0,0);this.G=new Db(0,0,0,0)};
753 f.Gj=function(){var a=Mc(this.la);(a=Dm(a,"html5-video-player")?a:E("html5-video-player",a))||(a=QF||E("html5-video-player"));if(!a)return!1;RF(this,a);this.u("templateready");return!0};function RF(a,b){QF=b.cloneNode(!0);a.a=b;a.a.setAttribute("id",a.app.J.attrs.id);var c=Mc(a.la);c!=a.a&&c.appendChild(a.a);(c=Mc("html5-player-messages"))&&z(c.children,function(a){try{var b=JSON.parse(a.innerHTML);lf(a.id,b)}catch(c){lf(a.id,a.innerHTML)}})}f.addClass=function(a){Em(this.a,arguments)};
754 f.removeClass=function(a){Fm(this.a,arguments)};
755 f.ij=function(){var a=this.app.K(),b=this.a;this.addClass("el-"+a.Z);this.addClass("ps-"+a.La);X(b,"html5-native-controls",a.Ub);X(b,"html5-mobile",a.nc);a.qe||this.addClass("html5-chromeless");a.tb||this.addClass("tag-pool-enabled");b.style.display="";this.g=E("html5-video-container",b);this.V=E("html5-video-content",b);this.aa=E("html5-video-controls",b);this.j=new OF;this.j.W(b);J(this.j.a,"click",v(this.jk,this));L(this,this.j);this.Ra?this.Q=J(window,"resize",v(this.zi,this)):this.Q=hf(v(this.zi,
756 this),250)};f.zi=function(){Ab(SF(this),Gb(this.G))||this.we()};
757 f.we=function(){if(this.b){var a=SF(this);if(!a.isEmpty()){var b,c=TF(this),d=SF(this);b=1;var e=UF(this),g,h=!1;e?(g=VF(this,d,c,e,!1),b=g.width/g.height/Bb(c),g=new Db(g.left+g.width/2*(1-1/b),g.top,g.width/b,g.height)):g=new Db(0,0,d.width,d.height);Fb(this.da,g)||(this.da=g,Ad(this.b,Gb(g)),pd(this.b,new A(g.left,g.top)),h=!0);c=VF(this,d,c,e,!0);Fb(this.G,c)||(this.G=c,Ad(this.V,c.width,c.height),pd(this.V,c.left,c.top),h=!0);Kn(this.b,"transform",1==b?"none":"scaleX("+b+")");b=h;if(h=!Ab(a,
758 Gb(this.G)))this.G.width=a.width,this.G.height=a.height,this.jl(a);(b||h)&&this.u("resize")}}};f.jl=function(){};f.Kj=function(){};f.yl=function(a,b){this.b.setAttribute("data-youtube-id",b.M);bj&&(b.title?this.b.setAttribute("title",b.title):this.b.removeAttribute("title"));b.pl&&(this.b.poster=b.pl);var c=mm(b,"yt:bgcolor");this.g.style.backgroundColor=c?c:"";this.Va=sl(mm(b,"yt:stretch"));this.Sa=sl(mm(b,"yt:crop"))};f.yj=function(){};f.jp=function(){};f.uo=function(){};
759 function SF(a){return a.g?new B(a.g.clientWidth,a.g.clientHeight):new B(0,0)}function TF(a){return a.b?new B(a.b.videoWidth,a.b.videoHeight):new B(0,0)}function VF(a,b,c,d,e){c.isEmpty()?e=b:d?(c=new B(a.Va||Bb(c),1),a=new B(a.Sa||Bb(c),1),Cb(a,c),d=Bb(a)>Bb(b)?b.width/a.width:b.height/a.height,e=e?a.scale(d):c.scale(d)):e=Cb(c.clone(),b);return new Db((b.width-e.width)/2,(b.height-e.height)/2,e.width,e.height)}function UF(a){return!a.app.K().Ub&&!TF(a).isEmpty()}
760 function xw(a,b){var c=a.aa;c.insertBefore(b,c.childNodes[0]||null)}f.zj=function(){};function Bh(a){a.j&&(a.j.show(),a.np(),jf(a.Ca),a.Ca=hf(v(a.np,a),500))}
761 f.np=function(){var a=N(this.app),b=this.app.getVideoData(),c=this.app.kj(),d=this.b,c={video_id:b.M,video_width:d.videoWidth,video_height:d.videoHeight,video_element_width:d.clientWidth,video_element_height:d.clientHeight,dash:"no",mime:"",drm_flavor:"",drm_key_system:"",volume:Math.round(this.app.wa.volume),stream_type:this.app.K().protocol,decoded_frames:c.hmewdfc||c.hmemdf||"-",dropped_frames:c.hmewdrop||"-",parsed_frames:c.hmempf||"-",presented_frames:c.hmempresented||"-",video_bytes_decoded:c.hmewvdbc||
762 "-",audio_bytes_decoded:c.hmewadbc||"-",painted_frames:c.hmempainted||"-",paint_delay:c.hmempaintdelay||"-"};b.a&&(c.dash=b.a.i&&b.a.a?"no":"yes",c.mime=b.a.Jb);if(a=a.I?a.I.g:null)c.drm_flavor=a.b,c.drm_key_system=a.a;this.j.update(c)};f.jk=function(a){a&&a.stopPropagation();this.j&&(jf(this.Ca),this.j.hide())};f.H=function(){this.Q&&(this.Ra?yf(this.Q):jf(this.Q));this.va&&yf(this.va);this.jk();this.j&&Df(this.j.a);F(this.a);this.aa=this.V=this.b=this.g=this.a=this.la=null;PF.C.H.call(this)};function WF(){this.a=[];this.b=[]}ca(WF);var tn=n("yt.player.utils.VideoTagPool.instance_")||WF.getInstance();pa("yt.player.utils.VideoTagPool.instance_",tn);f=WF.prototype;f.hy=function(a){if(!(this.a.length>=a)){a-=this.a.length;for(var b=0;b<a;b++){var c=XF(this);this.a.push(c)}}};
763 function XF(a){var b=document.createElement("video");w(b,gj);J(b,"loadeddata",v(b.Nv,b));J(b,"volumechange",v(b.Ov,b));J(b,"timeupdate",v(b.Yo,b));Si&&6<=Xi&&J(b,"webkitbeginfullscreen",v(b.play,b));hj(b);if(a.b.length){var c=a.b[0],d=c.muted;b.volume=100*c.volume/100;b.muted=d}a.b.push(b);J(b,"volumechange",v(a.Pv,a));return b}f.Pv=function(a){a=a.target;var b=a.volume,c=a.muted;z(this.a,function(a){a.volume=b;a.muted=c})};f.oy=function(){return this.a.length?this.a.pop():XF(this)};
764 f.my=function(a){a&&Ta(this.b,a)&&(nj(a),Df(a),Xa(this.b,a))};f.jy=function(a){return this.a.length>=(a||1)};WF.prototype.fillPool=WF.prototype.hy;WF.prototype.getTag=WF.prototype.oy;WF.prototype.releaseTag=WF.prototype.my;WF.prototype.hasTags=WF.prototype.jy;function YF(a,b){var c,d;d||(d=0);c||(c=td(document.body));var e=new A(sf(b),tf(b));qp(e,a,d,null,c,5)};function ZF(){this.a=new Ko(this)}y(ZF,K);f=ZF.prototype;f.Oj=null;f.Ce=null;f.Pj=null;f.Ki=null;f.De=null;f.$r=function(){this.hide()};f.as=function(a){a.stopPropagation()};f.hide=function(){In(this.De);op("panelhidden")};f.bs=function(a){27==a.keyCode&&this.hide()};f.Nm=function(){this.Ce.select()};f.show=function(){Hn(this.De)};f.H=function(){this.a.removeAll();this.Ce=this.Oj=this.Pj=this.De=null;ZF.C.H.call(this)};function $F(a){this.X=a;this.X.D("internalvideodatachange",this.In,this);this.g=new Ko(this);this.a=new Ko(this);this.b=new ZF;L(this,this.b)}y($F,K);f=$F.prototype;f.$b=null;function aG(a,b,c){for(var d=Nc(En[b],a.$b),e=0;e<d.length;e++)Lo(a.g,d[e],"down",function(a){c.call(this,a);this.hide(a);a=b.replace("CONTEXT_MENU_","").toLowerCase();bG(this.X,"contextmenu."+a)})}f.In=function(a,b){var c=E("html5-context-menu-copy-embed-html",this.$b);Fn(c,b.no)};f.Om=function(a){a=qh(this.X,a);cG(this,a,"URL")};
765 f.ds=function(){var a=df("EMBED_HTML_TEMPLATE"),b=df("EMBED_HTML_URL"),c=Qx(this.X.K()),d=this.X.getVideoData().M,b=b.replace(/__videoid__/g,d),a=a.replace(/__url__/g,ya(b)),a=a.replace(/__width__/g,c.width),a=a.replace(/__height__/g,c.height);cG(this,a,"Text")};function cG(a,b,c){window.clipboardData&&window.clipboardData.setData(c,b)||(a=a.b,Gn(a.De)&&a.hide(),a.Ki&&W(a.De,a.Ki),a.Ki="html5-modal-panel-clipboard-substitute",V(a.De,a.Ki),a.show(),a.Ce.value=b,a.Ce.focus(),H(v(a.Nm,a),100))}
766 f.es=function(a){dG(this.X,a.target.getAttribute("href"))};
767 f.gs=function(){var a=this.X.getVideoData(),b=this.X.K(),c=Qx(b),d=yw(b),e=lm(a),e=e?ij(e):"",c={cr:b.Q,csipt:a.Kc,ec:108,feature:b.j,h:d.height,hl:b.i,playerh:c.height,playerw:c.width,ptk:a.A,referrer:b.referrer,screenh:window.screen.height,screenw:window.screen.width,sdetail:a.ga,shost:Ij(e),sourceid:a.gd,vid:b.aa,vq:b.Ch,w:d.width};w(c,this.X.kj());(d=N(this.X))&&w(c,Dz(d,!0));c.videoId&&(c.v=c.videoId,delete c.videoId);b.nc&&(c.mobile="1");this.X.of("streamingerror",c);window.open(Sx(a))};
768 f.cs=function(){cG(this,rh(this.X,!0),"Text")};f.hs=function(){Bh(this.X.R)};f.ou=function(a){a.preventDefault();Gn(this.$b)?a.stopPropagation():(YF(this.$b,a),Hn(this.$b),this.a.listen(this.$b,"contextmenu",function(a){a.preventDefault()}),a=v(function(){this.a.listen(window,"blur",this.hide);Lo(this.a,document,"down",this.hide)},this),H(a,0),this.a.listen(document,"keydown",this.Av))};f.Av=function(a){27==a.keyCode&&this.hide(a)};f.hide=function(a){In(this.$b);this.a.removeAll();a&&a.stopPropagation()};
769 f.H=function(){this.g.removeAll();this.a.removeAll();this.X.$("internalvideodatachange",this.In,this);this.X=null;F(this.$b);this.$b=null;$F.C.H.call(this)};function eG(a,b){yn.call(this,a,b);this.F=null;this.B=this.G=this.i=this.b=0;V(this.element,"ytp-tv-static");fG(this,a,b)}y(eG,yn);function gG(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}
770 function fG(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.F=d;a.G=gG(b);a.B=gG(c/10);a.S.scale(1.5,1.5)}}eG.prototype.show=function(){eG.C.show.call(this);var a=this.I;this.k=new Date;this.g(a,75)};
771 eG.prototype.I=function(){var a=1-1/1.5;this.b=(this.b+this.G)%(this.width*a);this.i=(this.i+this.B)%(this.height*a);this.S.drawImage(this.F,-1*this.b,-1*this.i)};eG.prototype.hide=function(){I(this.a);eG.C.hide.call(this)};function hG(){Y.call(this,["div",["ytp-error","html5-stop-propagation"],["div","ytp-error-content",["div","ytp-error-content-wrap","{{content}}"]]]);this.A="table";this.b=[];if(void 0==jl){var a=document.createElement("canvas");jl=!(!a.getContext||!a.getContext("2d"))}jl&&(this.a=new eG(1,1),this.a.W(this.element,0),L(this,this.a))}y(hG,Y);hG.prototype.show=function(){hG.C.show.call(this);iG(this);this.a&&this.a.show()};hG.prototype.hide=function(){hG.C.hide.call(this);this.a&&this.a.hide()};
772 function iG(a){a.a&&fG(a.a,a.element.clientWidth,a.element.clientHeight)}hG.prototype.H=function(){yf(this.b);this.b=[];hG.C.H.call(this)};function jG(){this.b=this.a=null}jG.prototype.getMsg=function(a,b,c){return mf(a,b,c)};function $t(a,b,c,d){a.a&&kG(a.a,b,c,d)};function lG(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=
773 b.ieid),d.evid=b.vid);c&&(d.foc_id=b.uid);c=S(b.baseUrl,d)}else c=null}else c=null;c&&sa(c)}function mG(a){var b=df("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}lG(a,b)}};function nG(a,b,c){c=c||{};Wj("watch_actions_ajax",c.Ea,c.Ua,v(oG,l,a,b,c),c.onError)}
774 function oG(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.fb;c.Ta&&(d.list=c.Ta);c.Ea&&(d.authuser=c.Ea);c.Ua&&(d.pageid=c.Ua);a={screen:Hj({h:screen.height,w:screen.width,d:screen.colorDepth}),session_token:ff("watch_actions_ajax")};c.hx&&(a.station_id=c.hx);Qj("/watch_actions_ajax",{format:"XML",method:"POST",rf:d,Gf:a,Pa:c.Pa,onError:c.onError,pd:c.pd});0===b?mG("like"):1===b&&mG("dislike")};function pG(a,b,c,d,e){if(Dm(c,"html5-async-progress"))return null;X(c,"sentiment-like",b);X(c,"sentiment-dislike",!b);if(!a)return null;lu(c,"html5-async-progress");c={fb:a.fb,Pa:function(a){return function(){lu(a,"html5-async-success")}}(c),onError:function(a){return function(){lu(a)}}(c)};d&&(c.authUser=d);e&&(c.pageId=e);nG(a.M,b?0:1,c);df("CONVERSION_CONFIG_DICT")||lG(b?"like":"dislike",a.i);return b?0:1};function qG(a,b,c){Yt.call(this,a,c.K(),b);this.X=c}y(qG,Yt);f=qG.prototype;f.Nj=function(){qG.C.Nj.call(this);this.gb.listen(this.b.b,"click",this.Tu);this.gb.listen(this.b.a,"click",this.Su);this.X.D("presentingplayerstatechange",this.ro,this)};f.update=function(a){qG.C.update.call(this,a);"watch_actions_ajax"in $e&&!this.X.g?(a=this.b,a.b.show(),a.a.show()):(a=this.b,a.b.hide(),a.a.hide())};f.Vh=function(a){var b=Gc(this.a,"show-share");this.u("share-click");b||qG.C.Vh.call(this,a)};
775 f.qn=function(a){this.u("title-click",a)};f.bk=function(){var a=Gc(this.a,"show-more-info");this.u("info-click");if(a)this.B&&this.X.Qd();else{qG.C.bk.call(this);var b=Dh(this.X);this.B=P(b,8)&&!P(b,2);this.X.Od()}return!a};f.Tu=function(){rG(this,!0)};f.Su=function(){rG(this,!1)};f.ro=function(a){P(a.state,8)&&W(this.a,"show-more-info")};function rG(a,b){var c=pG(a.ia,b,a.a,a.g.Ea,a.g.Ua);null!=c&&(0==c?a.b.F():a.b.k(),a.X.u("RATE_SENTIMENT",c))}f.Ci=function(a){dG(this.X,a)};
776 f.H=function(){this.X.$("presentingplayerstatechange",this.ro,this);this.X=null;qG.C.H.call(this)};function sG(a,b,c,d,e,g,h,k){this.j=[];z(mb(b),function(b){this.j.push(J(a,b,v(this.nr,this)))},this);z(mb(d),function(b){this.j.push(J(a,b,v(this.mr,this)))},this);this.k=g||null;this.B=c;this.A=h||0;this.g=0;this.i=!1;this.F=e;this.o=k||0;this.a=0;this.b=!1}f=sG.prototype;f.nr=function(a){I(this.a);this.a=0;this.g=H(v(this.iv,this,a),this.A)};f.mr=function(a){I(this.g);this.g=0;this.a=H(v(this.hv,this,a),this.o)};f.iv=function(a){this.b||this.i||(this.i=!0,this.B.call(this.k||l,a))};
777 f.hv=function(a){!this.b&&this.i&&(this.i=!1,this.F.call(this.k||l,a))};f.dispose=function(){this.b=!0;I(this.g);I(this.a);yf(this.j)};f.ka=function(){return this.b};var tG=null,uG=null;function vG(){Y.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(vG,Y);vG.prototype.hide=function(){vG.C.hide.call(this);pd(this.a,0)};function wG(a,b){X(a.b,"ytp-tooltip-content-text",!b.tagName);bn(a.template,"content",b)}vG.prototype.H=function(){$c(this.b);this.b=this.a=null;vG.C.H.call(this)};function xG(a,b){this.a={};this.il=a;this.Ro=b}y(xG,K);
778 function vn(a,b,c){var d,e=new sG(b,"mouseover",function(){if(this.il){var a=new vG;a.W(this.il);d=a}else d=null;if(d&&(a=c&&c(b),!c||a)){a?wG(d,a):(a=G(b,"tooltip")||"",wG(d,Yc(a)));var e=!!G(b,"tooltip-below"),a=d,k=Cd(b),k=new A(k.width/2,e?k.height:0),m=ud(b),k=new A(m.x+k.x,m.y+k.y),e=!!e;X(a.element,"ytp-tooltip-below",e);if(m=sd(a.element))var p=ud(m),r=Jd(m),k=yb(k,new A(p.x+r.left,p.y+r.top));qp(k,a.element,e?1:0);a.show();var r=Cd(a.a),e=-1*(r.width/2),s=Rc(window),D=Sc(document),k=D.x,
779 s=s.width+D.x,D=k,O=s;m&&(m=Cd(m),D=p.x,O=m.width+p.x);m=ud(a.a);p=m.x+e;m=m.x+r.width+e;p<Math.max(k,D)?e-=p-Math.max(k,D):m>Math.min(s,O)&&(e-=m-Math.min(s,O));pd(a.a,e)}},["mouseout","mousedown"],function(){d&&(d.hide(),Tg(d),d=null)},a,10,50);a.a[ja(b)]=e}
780 function kG(a,b,c,d){vn(a,b,function(){var a=this.Ro,b;if(a&&a.Dl){b=a.Dl;var h=a.rp;tG||(tG=new Rn(mf("YTP_TOOLTIP_IDENTITY")),uG=new Rn(mf("YTP_TOOLTIP_IDENTITY_WATCH_LATER")));a=Xc("div");V(a,"ytp-identity-tooltip");var k=Xc("img");k.src=h;var h=Xc("span"),m=null;d?(V(h,"ytp-idt-watch-later"),m=[Yc(Vn(uG,{user_name:""})),Xc("br"),Yc(b)]):m=Yc(Vn(tG,{user_name:b}));Zc(h,m);Zc(a,k,h);b=a}else b=c;return b})}
781 xG.prototype.H=function(){this.Ro=this.il=null;for(var a in this.a)Tg(this.a[a]);this.a={};xG.C.H.call(this)};function yG(a,b){this.k=a;this.i=[];this.o=b;this.j=[]}y(yG,K);function zG(a,b,c){a.i.push(a.k.D(b,c,a))}function AG(a,b,c){a.j.push(a.o.D(b,c,a))}function BG(a){for(var b=0;b<a.i.length;b++)a.k.Rc(a.i[b]);for(b=0;b<a.j.length;b++)a.o.Rc(a.j[b])}yG.prototype.H=function(){BG(this);yG.C.H.call(this)};function CG(a,b){yG.call(this,a,b);this.g=!1;this.b=a;this.a=b;var c=a.K();c.color&&V(this.a.i,c.color);if(c.Eg){var d=this.a,e=E("html5-progress-tooltip",d.g);d.b=new Lu;var g=d.b;g.Fb=e;g.Dh=E("html5-progress-tooltip-arrow",g.Fb);g.Wj=E("html5-progress-tooltip-thumbnail",g.Fb);g.lj=E("html5-progress-tooltip-timestamp",g.Fb);L(d,d.b);d=this.a;d.a=new Hu;d.a.W(d.g);Lo(d.k,d.a.N(),"down",d.Zs);d.a.hide();L(d,d.a)}c.Fg&&(c=this.a,d=E("html5-storyboard",c.g),c.o=new Du,e=c.o,g=c.kb.b.a?new B(c.kb.b.a.clientWidth,
782 c.kb.b.a.clientHeight):new B(0,0),e.ud=d,e.$d=g.width,e.cc=E("html5-storyboard-filmstrip",e.ud),e.Ph=E("html5-storyboard-lens",e.ud),e.Sj=E("html5-storyboard-lens-thumbnail",e.ud),e.Uj=E("html5-storyboard-lens-timestamp",e.ud),e.wg=E("html5-storyboard-thumbnail",e.cc),F(e.wg),L(c,c.o));DG(this)}y(CG,yG);
783 function DG(a){BG(a);a.g=!0;zG(a,"cuerangesadded",a.qw);zG(a,"cuerangesremoved",a.rw);zG(a,"cuerangemarkersupdated",a.ow);zG(a,"presentingplayerstatechange",a.yw);zG(a,"progresssync",a.zw);zG(a,"resize",a.uw);zG(a,"seekto",a.ww);zG(a,"videodatachange",a.Aw);zG(a,"videoplayerchange",a.ip);zG(a,"videoready",a.xw);AG(a,"beginseeking",a.mw);AG(a,"endseeking",a.tw);AG(a,"seekto",a.lw)}f=CG.prototype;f.qw=function(a){var b=N(this.b).getVideoData();!b||0>=b.ra||EG(this,a,b)};
784 function EG(a,b,c){var d=c.ra;z(b,function(a){a.Pc&&Yu(this.a,a.start/(1E3*d))},a)}f.rw=function(a){var b=N(this.b).getVideoData();if(b&&!(0>=b.ra)){var c=b.ra;z(a,function(a){a.Pc&&Zu(this.a,a.start/(1E3*c))},this)}};f.ow=function(a){var b=N(this.b).getVideoData();!b||0>=b.ra||z(a,function(a){var d=a.start/(1E3*b.ra);a.Pc?Yu(this.a,d):Zu(this.a,d)},this)};f.uw=function(a){if(this.a.o){var b=this.a.o;!b.Uc||b.$d==a.width&&b.b||(b.$d=a.width,Fu(b,!0))}};
785 f.ww=function(a){Wu(this.a,a);if(this.a.o){var b=this.a.o;if(b.Uc){b.wk=b.Xk*a-b.$d/2;pd(b.cc,-1*b.wk);var c=$k(b.Uc,a);Eu(b,c);dd(b.Uj,Dn(b.Oe*a));Op(b.a)}}};f.yw=function(a){if(0>Ho(a,16)){a=this.a;var b=this.b.getCurrentTime();a.jb.innerHTML=Math.floor(100*a.xa)+"% at "+Math.floor(b)+" of "+Math.floor(a.B)+" seconds"}};f.ip=function(a){1!=a.B?this.g&&(BG(this),this.g=!1,zG(this,"videoplayerchange",this.ip)):this.g||DG(this)};
786 f.Aw=function(a,b,c){"newdata"==a&&(Wu(this.a,(b.ya||0)/b.ra,0),a=this.a,$c(a.va),a.J={},(c=N(this.b,c))&&EG(this,c.A.i||[],b),this.a.b&&this.a.b.reset());this.a.Xa(b.ra);this.a.b&&this.a.b.Xa(b.ra);this.a.o&&this.a.o.Xa(b.ra);c=this.a;c.ja=b.Cj;Xu(c);c=this.a;c.aa=b.Am;Xu(c)};
787 f.xw=function(a){if(this.a.b){var b=this.a.b;if(!b.bi)if(nm(a)){V(b.Fb,"with-thumbnail");b.Gg=nm(a);b.bh=om(a);var c=v(b.Nu,b);b.bh.D("l",c)}else b.reset()}if(this.a.o&&(b=this.a.o,b.wg&&$c(b.cc),W(b.ud,"enabled"),b.Uc=nm(a),b.Le=om(a),b.Uc&&!b.to)){V(b.ud,"enabled");a=v(b.qo,b);b.Le.D("l",a);Fu(b);a=b.cc.cloneNode(!0);for(var c=b.Uc.a[0].b,d,e,g=0;g<c;g++)e=b.wg.cloneNode(!1),d=yl(b.Le,g,b.Nb),Cu(e,d,b.Nb,b.Ai),a.appendChild(e);c=b.cc;(d=c.parentNode)&&d.replaceChild(a,c);b.cc=a}};
788 f.zw=function(a,b,c){Wu(this.a,b,c)};f.mw=function(){Az(this.b.b)};f.tw=function(){this.b.b.Sh()};f.lw=function(a,b){Xg(this.b,a,b)};function FG(a,b){yG.call(this,a,b);zG(this,"applicationplayerstatechange",this.Fq);zG(this,"controlsdisabled",this.Hq);zG(this,"controlsenabled",this.Iq);zG(this,"liveviewshift",this.Lq);zG(this,"fullscreentoggled",this.Kq);zG(this,"presentingplayerstatechange",this.jr);zG(this,"progresssync",this.kr);zG(this,"threedenabled",this.Yq);zG(this,"videodatachange",this.lr);zG(this,"onPlaybackQualityChange",this.Uq);zG(this,"onVolumeChange",this.Zq);zG(this,"menu_button_add",this.Mq);zG(this,"menu_button_remove",
789 this.Nq);zG(this,"menu_item_add",this.Oq);zG(this,"menu_item_remove",this.Pq);AG(this,"fullscreentoggled",this.Jq);AG(this,"mutetoggled",this.Qq);AG(this,"nextvideo",this.Rq);AG(this,"playpausetoggled",this.Sq);AG(this,"previousvideo",this.Tq);AG(this,"qualitychanged",this.Vq);AG(this,"sizechangerequested",this.Wq);AG(this,"speedchanged",this.Xq);AG(this,"volumechanged",this.ar);AG(this,"watchlater",this.ir);AG(this,"watchonyoutube",this.br);AG(this,"controlclick",this.Gq);this.a=a;this.b=b;this.g=
790 new CG(a,b.oj);L(this,this.g);var c=a.K();if(c.Ma){var d=this.b;d.B=new kv(d.j);L(d,d.B);Dv(d,"__default__",d.B,d.nd);F(d.se);F(d.Pd);F(d.nd);bd(d.ub).appendChild(d.ub);d.b=new ev(d.j);L(d,d.b);d.b.listen("change",d.er,d);d.g=new lv(d.j);L(d,d.g);d.g.listen("change",d.gr,d);d.i=new mv(d.j);L(d,d.i);d.i.listen("change",d.hr,d)}if(c.oc){var d=this.b,e=this.a.K().Nd;d.g?(d.g.Za(e?1:0),wv(d,d.g)):(Hn(d.se),Hn(d.Pd))}c.sh&&this.b.o.show();c.gg&&(d=this.b,e=this.a.a.gg?eh:[1],d.i?(nv(d.i,e),wv(d,d.i)):
791 Hn(d.lf));if(c.Ka)for(c=this.b,d=[c.wc,c.sc,c.kf,c.k,c.nd,c.ub,c.ig,c.o,c.se,c.Pd,c.B],e=0;e<d.length;e++)c.a.listen(d[e],"click",c.dr)}y(FG,yG);f=FG.prototype;f.Hq=function(a){this.b.disable(a)};f.Iq=function(a){this.b.enable(a)};f.Lq=function(a){X(this.b.k.element,"ytp-time-live-dvr",!a)};f.Kq=function(a){var b=this.b,c=this.a.K().Nd;if(a){var d=b.o;wn(d,"ytp-button-fullscreen-exit");var e=d.g.getMsg("YTP_BUTTON_FULLSCREEN_EXIT");d.Hb(e);d.a=e}else wu(b.o);b.g&&b.g.Za(a?-1:c?1:0)};
792 f.jr=function(a){P(a.state,2)||(0<Ho(a,8)?Av(this.b,!0):0>Ho(a,8)?Av(this.b,!1):0>Ho(a,2)&&Av(this.b,P(a.state,8)));0>Ho(a,16)&&GG(this,this.a.getCurrentTime())};f.Fq=function(a){if(P(a.state,2)){a=this.b.wc;wn(a,"ytp-button-replay");var b=a.g.getMsg("YTP_BUTTON_REPLAY");a.Hb(b);a.a=b}};f.Yq=function(){var a=this.b,b=this.a.getVideoData().zf,c=E("html5-threed-conversion-on",a.Ah),a=E("html5-threed-conversion-off",a.Ah);Fn(c,!b);Fn(a,b)};
793 f.lr=function(a,b){if(1==N(this.a).B){"newdata"==a&&(GG(this,b.ya||0),lu(this.b.ub),Cv(this.b,"1.0"));this.b.Xa(b.ra);vv(this.b,jm(b));var c=this.b,d=b.Cb,e=b.eb;c.tn=d&&!e;c=c.k;X(c.element,"ytp-time-liveonly",d&&!e);X(c.element,"ytp-time-live",d&&e);this.a.g&&"detailpage"!=this.a.K().Z?this.b.Ee.show():this.b.Ee.hide()}};f.Uq=function(a){1==N(this.a).B&&yv(this.b,a,HG(this.a))};
794 f.Zq=function(a){var b=this.b,c=a.volume;a=a.muted;Pe(b.sc,"value",a||0==c?"off":20>c?"min":40>c?"quiet":60>c?"normal":80>c?"loud":"max");Pe(b.sc,"volume",c);var d=b.Wb.clientWidth-6,e=b.Wb.style.backgroundPosition.split(" "),e=1<e.length?e[1]:"0px";if(a)b.Wb.style.backgroundPosition="-"+d+"px "+e,b.jg.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.jg.style.left=g+"px";b.Wb.style.backgroundPosition="-"+(d-g)+"px "+e}c=Math.round(c);d=c+"% "+mf("HTML5_VOLUME_SETTING")+
795 (a?" "+mf("HTML5_VOLUME_MUTED"):"");b.kf.setAttribute("aria-valuenow",c);b.kf.setAttribute("aria-valuetext",d);c=b.sc;d=G(c,a?"tooltip-alt":"tooltip-default")||"";Pe(c,"tooltip",d);c.setAttribute("aria-label",d);b.sc.setAttribute("aria-label",(a?mf("HTML5_VOLUME_UNMUTE"):mf("HTML5_VOLUME_MUTE"))+" "+mf("HTML5_CONTROL_TOGGLE"))};f.Oq=function(a){wv(this.b,a)};f.Pq=function(a){xv(this.b,a)};f.Mq=function(a,b){Dv(this.b,a,b)};
796 f.Nq=function(a){var b=this.b,c=b.A[a];c&&(c.ve(),fn(c,"menuButtonClick"),b.A[a]=null,b.G[a].dispose(),b.G[a]=null)};f.kr=function(a){GG(this,a)};f.Jq=function(){IG(this.a,!this.a.K().pb)};f.Qq=function(){this.a.wa.muted?Zg(this.a):Yg(this.a)};f.Rq=function(){th(this.a)};f.Sq=function(){JG(this.a)};f.Tq=function(){uh(this.a)};f.Vq=function(a){"auto"==a&&yv(this.b,fh(this.a),a);"auto"==HG(this.a)&&yv(this.b,a,a);var b=N(this.a,1);b&&gh(b,"m",a)};
797 f.Wq=function(a){var b=this.a;IG(b,!1);a!=b.a.Nd&&(b.a.Nd=a,b.u("SIZE_CLICKED",a),b.R.zi())};f.Xq=function(a){dh(this.a,a)};f.ar=function(a){KG(this.a,a)};f.br=function(){dG(this.a,qh(this.a,!0))};f.Gq=function(a){bG(this.a,a)};f.ir=function(){Wj("addto_ajax",this.a.K().Ea,this.a.K().Ua,v(this.uv,this),v(this.No,this))};
798 f.uv=function(){var a={ov:"WL",wb:this.a.getVideoData(1).M,Ea:this.a.K().Ea,Ua:this.a.K().Ua,Pa:this.pv,onError:this.No,S:this},b={video_ids:a.wb,full_list_id:a.ry||"",new_playlist_name:a.qv||"",session_token:ff("addto_ajax")},c=df("PLAYBACK_ID");c&&(b.plid=c);c={};a.privacy&&(c.privacy=a.privacy);a.nv&&(c.feature=a.nv);a.Ea&&(c.authuser=a.Ea);a.Ua&&(c.pageid=a.Ua);var d="";switch(a.ov){case "PL":d=a.qv?"action_add_to_new_playlist":"action_add_to_playlist";break;case "FL":d="action_add_to_favorites";
799 break;case "WL":d="action_add_to_watch_later_list"}c[d]=1;Qj("/addto_ajax",{mv:!0,format:"XML",method:"POST",rf:c,Gf:b,S:a.S,onError:a.onError,Pa:a.Pa})};f.pv=function(){lu(this.b.ub,"html5-async-success");this.a.u("WATCH_LATER")};f.No=function(a,b){var c=this.b.ub,d=b&&b.error_message;lu(c,"html5-async-error");if(d){var e=Et.getInstance(),g=Gt(c);It(c,d);Ft(e,c);zp(c,g)}};function GG(a,b){1==N(a.a).B&&bn(a.b.k.template,"current",Dn(b))};var LG={0:"autohide-off",1:"autohide-on",2:"autohide-fade",3:"autohide-auto",4:"autohide-embeds",5:"autohide-seekbar"};function MG(a){PF.call(this,a);this.P=this.o=this.O=this.Ka=this.A=this.ga=this.ha=this.Y=this.J=this.I=this.k=this.i=null;this.xa=!1;this.pa=this.B=null;this.Ma=!0;this.za=this.L=!1;a=this.app.K().Db?4E3:3E3;this.ja=new Oo(this.Zj,a,this);L(this,this.ja);this.ja.start()}y(MG,PF);f=MG.prototype;
800 f.ik=function(){MG.C.ik.call(this);this.app.D("appstatechange",this.Rw,this);this.app.D("applicationplayerstatechange",this.Sw,this);this.app.D("clearvideooverlays",this.Ww,this);this.app.D("initializingmode",this.Uw,this);this.app.D("presentingplayerstatechange",this.Tw,this);this.app.D("onDetailedError",this.Vw,this)};
801 f.Gj=function(){var a=this.app.J.assets;if(a.css&&!ml()){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");Pc(d,b);c||document.getElementsByTagName("head")[0].appendChild(d);this.Qo(200)}else this.xa=!0;MG.C.Gj.call(this)||Qj(a.html,{format:"RAW",method:"GET",Pa:v(this.Xw,this)});return!0};
802 f.Xw=function(a){if(a.responseText){var b=Xc("div");b.innerHTML=a.responseText;RF(this,E("html5-video-player",b));this.u("templateready")}else this.u("templateerror")};f.Qo=function(a){0>=a||ml()?(this.xa=!0,this.a&&cn(this.a)):H(v(this.Qo,this,a-1),50)};
803 f.ij=function(){MG.C.ij.call(this);this.xa||dn(this.a);NG(this);var a=this.app.K();a.V&&this.addClass(a.V+"-theme");a.hf&&this.addClass("house-brand");!a.jf&&a.qe||this.addClass("modest-branding");a.hj&&this.addClass("html5-hide-share");a.am||this.addClass("html5-hide-volume");a.Db&&(this.addClass("html5-tablet"),V(document.body,"html5-tablet-body"));a.Vb||this.addClass("hide-info-bar");a.Db||a.Ub||this.addClass(LG[a.yh]);var b=Bb(new B(this.a.clientWidth,this.a.clientHeight)).toFixed(1);"1.3"!=b&&
804 "1.8"!=b||this.addClass("autohide-aspect");a.oc&&this.we();this.I=E("html5-watermark",this.a);OG(this.app)&&Hn(this.I);a.qe&&!a.Ub&&(this.A=new sv(this.B),tv(this.A,this.aa),L(this,this.A),this.Ka=new FG(this.app,this.A),L(this,this.Ka));var b=E("html5-context-menu",this.a),c=E("html5-modal-panel",this.a),d=this.O=new $F(this.app);d.$b=b;F(d.$b);document.body.appendChild(d.$b);var e=d.b;e.De=c;e.Pj=E("html5-modal-panel-close-button",c);e.Oj=E("html5-modal-panel-clipboard-substitute-content",c);e.Ce=
805 Ve("input",e.Oj);hc&&e.Ce.removeAttribute("readonly");e.a.listen(document,"keydown",e.bs);e.a.listen(c,"contextmenu",e.as);Lo(e.a,e.Pj,"down",e.$r);Lo(e.a,e.Ce,"down",e.Nm);var c={Tr:d.cs,Ur:d.ds,Vr:v(d.Om,d,!1),Wr:v(d.Om,d,!0),Yr:d.gs,Zr:d.hs,Xr:d.es},g;for(g in c)aG(d,g,c[g]);L(this,this.O);a.hf&&V(b,"house-brand");this.k=new Tt(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.W(this.g);L(this,this.k);g=E("html5-info-bar",
806 this.a);this.o=new qG(g,this.B,this.app);this.o.Nj();L(this,this.o);this.J=new xF(a.nc);this.J.W(this.g);L(this,this.J);this.Y=new vF;this.Y.W(this.g);L(this,this.Y);PG(this)};f.jl=function(a){MG.C.jl.call(this,a);QG(this,a);this.i&&iG(this.i)};f.Kj=function(){MG.C.Kj.call(this);QG(this,SF(this))};f.yl=function(a,b){MG.C.yl.call(this,a,b);"newdata"==a&&this.o.reset();this.o&&this.o.update(b);if(OG(this.app)){var c=b.Ma;c&&(this.I.src=c);Hn(this.I)}};
807 f.Rw=function(a){2==a?RG(this):(this.J.hide(),this.removeClass("cued-mode"));3==a?this.k.show():P(Dh(this.app),1)||this.k.hide()};
808 f.Tw=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.pa&&Fm(this.a,this.pa);Em(this.a,b);this.pa=b;P(a.state,1)?this.k.show():0>Ho(a,1)&&this.k.hide();this.Ma=P(a.state,8)&&!P(a.state,4);0>Ho(a,64)&&SG(this.app)};f.Sw=function(a){P(a.state,2)?RG(this):0>Ho(a,2)&&(this.J.hide(),this.removeClass("cued-mode"))};
809 function PG(a){var b=a.app.K();if(b.lm){if(b.Db){var c=v(function(a){return TG(a)||Dm(a.target,"html5-draggable")},a);a.P=new mu(a.a,v(function(a){Dm(this.a,"cued-mode")?tn.hasTags(void 0)&&this.Xn(a):TG(a)&&(this.L?this.Lk():this.Zj(),this.A&&(a=Ap.getInstance(),a.Bf&&Fp(a,a.Bf)))},a),!1,c);J(a.a,"gesturechange",v(a.ru,a));J(a.a,"gestureend",v(a.su,a))}else J(a.a,"click",v(a.Xn,a)),J(a.a,"dblclick",v(a.qu,a)),J(a.a,"click",v(a.Lk,a)),J(a.a,"mousemove",v(a.Lk,a)),J(a.a,"mouseout",v(a.Zj,a));var d=
810 v(function(){var a=this.b;a&&(hj(a),tn.fillPool(4),b.Db&&qu(),(a=wf(this.a,"click",d,!0))&&yf(a))},a);J(a.a,"click",d,!0);J(a.a,"keypress",v(a.uu,a));J(a.a,"keydown",v(a.pu,a));c=v(a.O.ou,a.O);bj&&a.P?a.P.o=c:J(a.a,"contextmenu",c);J(a.I,"click",v(a.Yn,a));a.o.D("title-click",v(a.Yn,a));a.o.D("share-click",v(a.vu,a));a.o.D("info-click",v(a.tu,a))}}f.Xn=function(a){var b=this.app.K();TG(a)&&(this.a.focus(),!Dm(this.a,"cued-mode")&&b.Ub||JG(this.app,!0));bG(this.app,"screenclick")};
811 f.qu=function(a){6!=this.app.o&&(TG(a)&&(a=this.app,IG(a,!a.a.pb)),bG(this.app,"screendoubleclick"))};f.ru=function(a){var b=a.scale,c=this.app.K().pb;b*(c?-1:1)>(c?-0.7:1.3)&&(b=this.app,IG(b,!b.a.pb));a.preventDefault()};f.su=function(a){a=a.scale;var b=this.app.K().pb;a*(b?-1:1)>(b?-0.9:1.1)&&(a=this.app,IG(a,!a.a.pb))};function TG(a){return!jd(a.target,"html5-stop-propagation")}
812 f.uu=function(a){var b=a.keyCode;if(179==b||178==b)179==b&&(this.u("playpausetoggled",!0),a.preventDefault()),178==b&&(ah(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&&TG(a)&&(JG(this.app,!0),a.preventDefault());48<=b&&57>=b&&(Xg(this.app,(b-48)/10*Lh(this.app)),a.preventDefault())};
813 f.pu=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,KG(c,{volume:c.wa.volume+5,muted:!1});else if(40==b)c=this.app,KG(c,{volume:c.wa.volume-5,muted:!1});else if(37==b){var d=this.app,c=-1*c;Xg(d,d.getCurrentTime()+c,!1,250,void 0)}else 39==b&&(d=this.app,Xg(d,d.getCurrentTime()+c,!1,250,void 0));a.preventDefault()}36==b&&(Xg(this.app,0),a.preventDefault());35==b&&(Xg(this.app,Infinity),a.preventDefault());27==b&&(IG(this.app,!1),a.preventDefault())};
814 f.Yn=function(a){a.preventDefault();a=this.app;var b;b=a.getVideoData();b=b.Lc||Zt(a.a,b);dG(a,b)};f.vu=function(){this.app.Eh();IG(this.app,!1);var a=this.app,b=a.getVideoData();a.u("SHARE_CLICKED",{videoId:b.M,listId:b.Ta,feature:"player_"+a.a.Z})};f.tu=function(){this.app.Eh()};f.Ww=function(){var a=this.o;W(a.a,"show-share");W(a.a,"show-more-info")};f.Lk=function(){this.za=!0;this.ja.start();this.L&&(this.L=!1,this.removeClass("hide-controls"),this.app.Wa("onShowControls"))};
815 f.Zj=function(){this.za=!0;this.ja.stop();if(!this.L){var a;if(a=this.A){a=this.A;var b=Ap.getInstance();a=!!b.Bf&&Ue(b.Bf,a.mf)||null!=a.I}b=(b=jh(this.app.k,"playlist"))&&b.ba;this.Ma&&this.za&&!a&&!b&&(this.L=!0,this.addClass("hide-controls"),this.app.Wa("onHideControls"))}};function RG(a){a.J.show(a.app.getVideoData());a.addClass("cued-mode")}f.yj=function(){var a=Nc("html5-popup-dialog",this.a);z(a,function(a){In(a)},this)};
816 f.Vw=function(a){this.i||(this.i=new hG,this.i.W(this.a),L(this,this.i));var b=this.app.K(),c=a.message;a=a.messageKey;if(!b.hf&&"HTML5_DEFAULT_FALLBACK"==a){c+=mf("LEARN_MORE");a=this.i;for(var d=v(this.app.of,this.app,"",{errorHelpClick:1}),e=a.element.getElementsByTagName("a"),g=0;g<e.length;g++)a.b.push(J(e[g],"click",d));this.app.of("",{errorHelpShown:1})}a=this.i;b="embedded"==b.Z;yf(a.b);a.b=[];bn(a.template,"content",new dv(c));if(b)for(b=a.element.getElementsByTagName("a"),c=0;c<b.length;c++)b[c].setAttribute("target",
817 "_blank");this.i.show()};f.Uw=function(){this.i&&this.i.hide()};f.jp=function(a){var b=this.Y;b.show(a);H(oa(V,b.element,"html5-bezel-fade"),0);b.a=H(v(b.hide,b),300)};f.uo=function(a){E("html5-viewport-sheet").disabled=!a};f.we=function(){var a=this.app.K();Pe(document.body,"player-size",a.pb?"fullscreen":a.Nd?"large":"small");MG.C.we.call(this)};
818 function UG(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 QG(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=wb(e/g,0.5,1);d={Ib:a.ha,reset:!0};a.ha=kn(".ytp-scalable-icon-shrink",UG(c,!1),d);c=wb(0.33*(e/g),0.5,1);d={Ib:a.ga,reset:!0};a.ga=kn(".ytp-scalable-icon-grow",UG(c,!0),d)}}
819 f.zj=function(a){this.A&&Av(this.A,a)};function NG(a){a.B=new jG;a.B.b=a;var b=new xG(a.a,a.app.K());L(a,b);a.B.a=b;a=Nc("ytp-tooltip-anchor",a.a);z(a,function(a){vn(b,a)})}f.H=function(){this.k.hide();ln(this.ha);ln(this.ga);Df(this.a);Df(this.I);Tg(this.P);MG.C.H.call(this);this.I=this.J=this.ga=this.ha=this.P=this.Y=null};function oh(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 lh(a,b,c,d)}function lh(a,b,c,d){b={endSeconds:void 0,list:b,mediaContentUrl:void 0,startSeconds:c,suggestedQuality:d,videoId:a};if(ia(a)){for(var e in b)b[e]=b[e]||a[e];b.videoId=a.video_id||a.videoId}return b};function VG(a,b,c){this.g=a;this.a=b;this.I=c||null;this.i={};this.F=NaN;this.j=new Oo(this.tq,3E4,this);L(this,this.j);this.k=new Oo(this.mj,1E3,this);L(this,this.k);this.G=0;this.b="N";this.o=NaN;this.A=""}y(VG,K);var WG={5:"N","-1":"N",3:"B",0:"EN",2:"PA",1:"PL"};function zz(a,b,c){var d=a.i[b];d||(d=[],a.i[b]=d);d.push(((x()-a.G)/1E3).toFixed(3)+":"+c.join(":"))}f=VG.prototype;
820 f.mj=function(){if(this.I){var a=this.I();if(!isNaN(this.B)&&!isNaN(a.g)){var b=a.g-this.B;0<b&&zz(this,"bwm",[b,(a.j-this.L).toFixed(3)])}this.B=a.g;this.L=a.j;isNaN(a.a)||zz(this,"bwe",[a.a.toFixed(3)]);isNaN(a.b)||(b=a.b,a.i<b&&(b=a.i),this.J!=b&&(zz(this,"bh",[b.toFixed(3)]),this.J=b),this.a.Ca&&3>b&&("PL"==this.b||"B"==this.b)&&this.k.start())}};
821 f.ng=function(){if(!this.ka()&&!Nb(this.i)){0!=this.k.Ba||this.mj();var a=Tx(this.a).hmewdrop;0<=a&&a!=this.o&&zz(this,"df",[a-(this.o||0)]);this.o=a;a={event:"streamingstats"};this.g.a&&(a.fmt=this.g.a.Oa);a.cpn=this.g.Da;a.ei=this.g.k;a.el=this.a.Z;a.docid=this.g.M;a.ns=this.a.qc;this.a.g&&(a.adformat=this.a.g);this.g.Cb&&(a.live=this.g.eb?"dvr":"live");Rb(a,Ox(this.a));a.html5="1";var a=S(Nx(this.a)+"stream_204",a),b;for(b in this.i)a+="&"+b+"="+this.i[b].join(",");sa(a);this.i={};this.j.start()}};
822 f.onError=function(a){zz(this,"error",[a,this.g.pe.toFixed(3)])};f.tq=function(){"PL"==this.b&&(zz(this,"vps",[this.b]),this.ng())};f.H=function(){VG.C.H.call(this);jf(this.F)};function XG(a,b,c,d){c=c||"";this.i=[];this.j=[];this.B=[];this.F="watchtime"==c;this.jd=Nx(b)+"api/stats/"+c;d&&(this.Rl=d.fs,this.O=d.nbe,this.P=d.bc,this.Q=d.bd,this.lc=d.bt,d.rtn&&(this.cg=d.rtn),this.F?(this.ha=d.state,0<d.rti&&(this.qh=d.rti)):(this.da=d.mos,this.la=d.volume,d.at&&(this.I=d.at),d.allowed&&(this.L=d.allowed),d.ex_ads&&(this.aa=d.ex_ads)));this.G=b.g;this.rh=b.Tb;this.V=b.k;this.Ca=b.F;this.Ma=b.A;this.Ka=b.B;this.Sa=b.Wf;this.Mc=b.ef;this.Ra=b.G;this.Va=b.I;this.jb=b.J;this.kb=
823 b.L;this.mc=b.O;this.b=b.b;this.Ic=b.Z;this.B=b.o;this.ja=b.ja;this.Kc=b.i;this.Tl=b.qc;this.kd=b.La;this.referrer=b.referrer;this.hd=b.Q;this.o=b.j;this.ld=b.ha;this.pa=b.la;this.va=b.pa;this.gd=Ux(b);!a.a||a.V.isEmpty();this.rh=a.df||this.rh;this.xa=a.Da;this.A=a.pe;this.Y=a.J;this.za=a.Ka;this.a=a.a;this.Sl=a.Ld;this.Jc=a.Vf;a.Cb&&(this.ga=a.eb?"dvr":"live");this.Hc=a.nh;this.md=a.md;this.fb=a.fb;this.Lc=a.k;this.Ta=a.Ta;this.o=a.aa||this.o;this.rb=a.ha;this.g=a.g;this.M=a.M}f=XG.prototype;
824 f.rh=!1;f.$i=!1;f.Rl=!1;f.dg=!1;f.Sl=!1;f.Tl="yt";f.qh=null;f.cg=null;f.Np=!1;f.send=function(){if(!this.Np){var a=this.Mh(),a=S(this.jd,a);sa(a);this.Np=!0}};
825 f.Mh=function(){var a={ns:this.Tl,el:this.Ic,hl:this.Kc,cr:this.hd,cpn:this.xa,docid:this.M,ver:2,referrer:this.referrer,cmt:this.re(this.A),plid:this.fb,ei:this.Lc,fmt:this.a?this.a.Oa:0,fs:this.Rl?"1":"0",rt:this.re(this.J),c:this.Sa,cver:this.Mc,euri:this.b,subscribed:this.g,lact:this.gd,cplatform:this.mc,cbrand:this.Ca,cmodel:this.Ra,cnetwork:this.Va,cbr:this.Ma,cbrver:this.Ka,cos:this.jb,cosver:this.kb,q:this.ld};this.rh&&(a.autoplay="1");this.Sl&&(a.splay="1");this.aj&&(a.ssrt="1");this.Y&&
826 (a.delay=this.Y);this.G&&(a.adformat=this.G);this.V&&(a.content_v=this.V);void 0!=this.pa&&this.va&&(a.uga=this.va+this.pa);void 0!=this.k&&(a.len=this.re(this.k));!this.F&&0<this.B.length&&(a.fexp=this.B.toString());void 0!=this.da&&(a.mos=this.da);void 0!=this.la&&(a.volume=this.la);void 0!=this.ha&&(a.state=this.ha);null===this.cg||(a.rtn=this.re(this.cg));this.o&&(a.feature=this.o);this.Ta&&(a.list=this.Ta);this.rb&&(a.ytr=this.rb);this.F?(a.idpj=this.Jc,a.ldpj=this.Hc,null===this.qh||(a.rti=
827 this.re(this.qh))):(void 0!=this.I&&(a.at=this.I),void 0!=this.L&&(a.allowed=this.L),void 0!=this.aa&&(a.ex_ads=this.aa));void 0!=this.ga&&(a.live=this.ga);this.ja||(a.ps=this.kd,a.sw=this.za,this.P&&(a.bc=this.P),this.Q&&(a.bd=this.Q,a.bt=this.lc),0<this.O&&(a.nbe=this.O));!this.dg&&0<this.i.length&&(a.st=La(this.i,this.re).join(","),a.et=La(this.j,this.re).join(","));return a};f.re=function(a){return(1*a.toFixed(3)).toString()};function YG(a,b,c,d){this.i=[];this.j=[];this.o=[];this.cj=b.Yi;c&&(this.O=c.nbe,this.P=c.bc,this.Q=c.bd,this.Ic=c.bt,this.Ml=c.fs,this.Nl=c.mos,this.aj=c.ssrt,this.source=c.sourceid,this.xa=c.sd,this.Kl=c.hmewadbc,this.va=c.hmewdfc,this.Ll=c.hmewdrop,this.Il=c.hmewvdbc,this.hd=c.hmemdf,this.ld=c.hmempaintdelay,this.jd=c.hmempainted,this.ga=c.hmempf,this.gd=c.hmempresented,this.Zf=c.volume);this.bj=b.bj;this.ph=b.Tb;this.V=b.k;this.Ka=b.F;this.Sa=b.A;this.Mc=b.B;this.Ra=b.Wf;this.Va=b.ef;this.jb=
828 b.G;this.kb=b.I;this.mc=b.J;this.lc=b.L;this.Lc=b.O;this.b=b.b;this.Kc=b.Z;this.o=b.o;this.Hc=b.P;this.kd=b.i;this.Pl=b.qc;this.Xf=b.Xf?"1":void 0;this.G=Qx(b);this.oe=b.La;this.referrer=Rx(b);this.ag=b.Q;this.F=b.j;this.I=new B(window.screen.width,window.screen.height);this.Yf=b.ha;this.ha=b.la;this.la=b.pa;this.Yi=Ux(b);this.L=yw(b);this.pa=b.Ra;this.Jl=b.aa;!a.a||a.V.isEmpty();this.ph=a.df||this.ph;this.za=a.Da;this.Ca=a.Kc;this.Y=a.J;this.Ma=a.Ka;this.a=a.a;this.Ol=a.Ld;this.aa=a.Vf;a.Cb&&(this.ja=
829 a.eb?"dvr":"live");this.da=a.nh;this.md=a.md;this.fb=a.fb;this.Jc=a.k;this.Ta=a.Ta;this.$f=a.ga;this.F=a.aa||this.F;this.bg=a.ha;this.Ql=a.Zi;this.g=a.g;this.eg=a.Hc;this.M=a.M;this.rb=a.V;this.B=d||[]}f=YG.prototype;f.ph=!1;f.$i=!1;f.Ml=!1;f.dg=!1;f.Nl=!1;f.Ol=!1;f.aj=!1;f.Pl="yt";f.Ql=!1;f.Sp=!1;f.send=function(){if(!this.Sp){var a=this.Mh(),a=S(this.cj,a);sa(a);this.Sp=!0}};
830 f.Mh=function(){var a={html5:"1",ns:this.Pl,ps:this.oe,el:this.Kc,hl:this.kd,cr:this.ag,c:this.Ra,cpn:this.za,docid:this.M,sd:this.xa,sourceid:this.source,referrer:this.referrer,q:this.Yf,plid:this.fb,ei:this.Jc,fmt:this.a?this.a.Oa:0,fs:this.Ml?"1":"0",screenw:this.I.width,screenh:this.I.height,w:this.L.width,h:this.L.height,vw:this.rb.width,vh:this.rb.height,playerw:this.G.width,playerh:this.G.height,vid:this.Jl,rt:this.wh(this.J),mos:this.Nl,volume:this.Zf,app:this.bj,csipt:this.Ca,on3g:this.Xf,
831 partnerid:this.md,sdetail:this.$f,subscribed:this.g,sw:this.Ma,list:this.Ta,eurl:this.b,framer:this.Hc,feature:this.F,ytr:this.bg,threed:this.eg,lact:this.Yi,cver:this.Va,cplatform:this.Lc,cbrand:this.Ka,cmodel:this.jb,cnetwork:this.kb,cbr:this.Sa,cbrver:this.Mc,cos:this.mc,cosver:this.lc};this.dg&&(a.playback="1");this.ph&&(a.autoplay="1");this.Ol&&(a.splay="1");this.aj&&(a.ssrt="1");this.Y&&(a.delay=this.Y);this.Ql&&!this.dg&&(a.vtmp="1");this.$i&&(a.tv="1");this.V&&(a.content_v=this.V);void 0!=
832 this.ha&&this.la&&(a.uga=this.la+this.ha);void 0!=this.k&&(a.len=this.wh(this.k));0<this.o.length&&(a.fexp=this.o.toString());0<this.aa&&(a.idpj=this.aa);0<this.da&&(a.ldpj=this.da);void 0!=this.pa&&(a.attrib=this.pa);void 0!=this.ja&&(a.live=this.ja);this.P&&(a.bc=this.P);this.Q&&(a.bd=this.Q,a.bt=this.Ic);0<this.O&&(a.nbe=this.O);void 0!=this.va&&(a.hmewdfc=this.va,a.hmewdrop=this.Ll,a.hmewvdbc=this.Il,a.hmewadbc=this.Kl);void 0!=this.ga&&(a.hmempf=this.ga,a.hmemdf=this.hd,a.hmempresented=this.gd,
833 a.hmempainted=this.jd,a.hmempaintdelay=this.ld);0<this.i.length&&(a.st=this.i.map(this.wh).join(","),a.et=this.j.map(this.wh).join(","));for(var b=0;b<this.B.length;b++)Hb(xB(this.B[b]),function(b,d){d in a||(a[d]=b)});return a};f.wh=function(a){return(1*a.toFixed(3)).toString()};function ZG(){this.cb=[];this.L=[10,10,10,40];this.i=null;this.B="paused";this.ga=!1;this.k=NaN;this.P=this.J=0;this.aa=this.O=null;this.ja=vB;this.j=null;this.Q="";this.V=this.F=0;this.G=NaN;this.o=this.A=0}y(ZG,K);function $G(a){var b=a.aa();a.O&&w(b,a.O());return b}function Gz(a,b,c){var d=(x()-a.A)/1E3;c=isNaN(c)?d:c;c=Math.ceil(c);var e=a.L[a.J];a.J+1<a.L.length&&a.J++;c=c+e;d=1E3*(c-d);a.k=H(v(a.la,a,c,b),d);return c}
834 ZG.prototype.la=function(a,b){if(!this.ka()){this.k=NaN;var c=aH(this),d=bH(this,c);b&&(d.qh=a);var e=400<this.P;c.length&&!e&&(d.cg=Gz(this,!0,a));d.send();this.P++}};ZG.prototype.ha=function(){var a=this.j()||0,b=(x()-this.A)/1E3,c=a-this.F;0!=c&&(0.5<Math.abs(isNaN(this.G)?c:c-(b-this.G))?(cH(this),this.o=a,this.G=NaN):(this.G=b,this.g&&isNaN(this.k)&&Gz(this,!1)));this.F=a};function cH(a){0.5<a.F-a.o&&(a.cb.push([a.o,a.F]),a.o=a.F)}function aH(a){cH(a);var b=a.cb;a.cb=[];return b}
835 function Ez(a,b){var c=$G(a),d=a.ja();a.b.cj?(w(c,{state:a.B}),z(d,function(a){w(c,xB(a))}),d=new XG(a.a,a.b,b,c)):d=new YG(a.a,a.b,c,d);d.J=(x()-a.A)/1E3;d.k=a.da();return d}function bH(a,b){b.length||(b=[[a.o,a.o]]);for(var c=Ez(a,"watchtime"),d=0;d<b.length;d++)c.i.push(b[d][0]),c.j.push(b[d][1]);return c}
836 function Hz(a){var b=a.b;a=a.a;var c=a.aa||b.j,c={ns:b.qc,html5:"1",el:b.Z,ps:b.La,fexp:b.o.join(",")||void 0,feature:c||void 0,ytr:a.ha||void 0,list:a.Ta,d:b.va,f:b.da};b.Tb&&(c.autoplay="1");a.g&&(c.subscribed=a.g);return c}ZG.prototype.onError=function(a){this.i.onError(a)};
837 function Jz(a,b){if(!a.ka()){P(b.state,2)?(a.B="paused",bH(a,aH(a)).send()):P(b.state,8)?(a.B="playing",a.g&&isNaN(a.k)&&Gz(a,!1)):a.B="paused";var c=a.i,d=b.state,e;e=b.state;if(P(e,128))e="ER";else if(P(e,16)||P(e,32))e="S";else{var g=WG[vj(e)];"B"==g&&P(e,4)&&(g="PB");e=g}e!=c.b&&"N"!=e&&(!c.a.Ca||"B"!=e&&"PB"!=e||c.mj(),zz(c,"vps",[e]),c.b=e);if(0<Ho(b,256)||P(d,128))c.onError(d.a.errorCode);(P(d,2)||P(d,128))&&c.ng()}}
838 function rz(a,b,c){b.rt=(x()-a.A)/1E3;w(b,$G(a));w(b,Hz(a));a=Kj("streamingerror"==b.event?"//s.youtube.com/stream_204":a.b.lb+"player_204",b);sa(a,c)}function nz(a,b){var c=a.b,d=a.a,e={ns:c.qc,el:c.Z,eurl:c.b,fmt:d.a?d.a.Oa:0,html5:1,list:d.Ta,plid:d.fb,ei:d.k,ps:c.La,noflv:1,st:a.j(),video_id:d.M};c.Tb&&(b.autoplay="1");d.gj&&(b.tmi="1");w(e,b);w(e,Ox(c));sa(S("//www.youtube.com/live_204",e))}ZG.prototype.H=function(){ZG.C.H.call(this);I(this.k);this.k=NaN;jf(this.I);this.I=NaN};function dH(a,b,c){R.call(this);this.o=1;this.Y={};this.D("openingpage",v(this.Fr,this));this.D("initializingmode",v(this.Cr,this));this.D("internalenvironmentdatachange",v(this.Br,this));this.D("internalvolumechange",v(this.Km,this));this.J=null;b instanceof Hf||(b=new Hf(b));this.J=b;b=this.J.args;Tg(this.a);this.a=new Ix(b||{});this.u("internalenvironmentdatachange","newdata");this.ja=Kx(this.a)?new Hh(this,1):new Vg(this,1);L(this,this.ja);this.V=new Mh(this);L(this,this.V);this.I=new Mh(this,
839 1);L(this,this.I);this.P={};this.ga=Sb(["internalvideodatachange",this.ur,"liveviewshift",this.Dr,"commoninfoloaded",this.Ar,"playbackready",this.wr,"playbackstarted",this.xr,"statechange",this.yr,"videoelementevent",this.Sr]);this.la=new Th(this.a);this.k=new fx;L(this,this.k);this.b=null;b=new bz(this.a,1);if(this.b!=b){if(this.b){var d=this.b,e=this.ga,g;for(g in e)d.$(g,e[g],this)}b.Y=this.la;g=this.ga;for(var h in g)b.D(h,g[h],this);this.b=b}this.ha=Sb(["beginseeking",this.zr,"endseeking",this.Pr,
840 "internalvideodatachange",this.Lm,"internalvideoformatchange",this.Nr,"progresssync",this.Jr,"seekto",this.Kr,"onLoadProgress",this.Er,"onVideoProgress",this.Or,"newlicensesession",this.Qr,"playbackdataloaded",this.Hr,"playbackready",this.Gr,"statechange",this.Ir]);this.j=null;nA(this,this.b);this.aa=-1;this.G=this.A=null;this.B={};this.O=null;this.L={};this.Q=null;this.da=0;c?this.R=c(this):this.R=new MG(this);L(this,this.R);this.R.D("templateerror",this.Lr,this);this.R.D("templateready",this.Mr,
841 this);this.R.D("resize",this.Rr,this);Sp("fs");c=this.R;c.la=a;c.Gj()||c.u("templateerror");bG(this,"init")}y(dH,R);f=dH.prototype;f.Ud=null;f.list=null;f.Xe=!0;f.wa=null;f.Af=null;f.Dg=1;f.R=null;f.vj=null;f.xf=null;f.Mk=!1;f.ri=null;f.Zn=0;var eH={};
842 function fH(a){var b=tn.getTag();a.i=b;a.Ud=a.i;a.j&&tz(a.j,b);oj(a.i,a.Dg);if(a.a.Md)a.xf&&yf(a.xf),a.xf=J(a.i,"volumechange",v(a.qt,a),!1);else{var b=a.i,c=a.wa.muted;b.volume=a.wa.volume/100;b.muted=c}b=a.R;b.b=a.i;b.da=new Db(0,0,0,0);b.b.parentNode||b.g.appendChild(b.b);V(b.b,"video-stream");V(b.b,"html5-main-video");c=b.app.K();c.Ub&&c.qe&&b.b.setAttribute("controls",!0);c.th&&b.b.setAttribute("webkit-playsinline",!0);b.b.setAttribute("x-webkit-airplay","allow");c.fj&&(b.va=J(b.b,"click",v(b.b.play,
843 b.b)));a.a.Ya=a.i}function gH(a){if(a.i){a.xf&&(yf(a.xf),a.xf=null);a.j&&sn(a.j);var b=a.R;b.b&&(F(b.b),b.b=null);a.a.Ya=null;tn.releaseTag(a.i);a.i=null}}function pn(a,b){a.a.tb?(a.O&&(pd(a.i,a.O.left,a.O.top),Ad(a.i,Gb(a.O)),a.O=null),nj(a.i),sn(a.j),tz(a.j,a.i),oj(a.i,a.Dg)):tn.releaseTag(b)}function nA(a,b){if(a.j!=b){a.j&&(gx(a.k),pA(a,a.j));a.P[b.B]=b;a.j=b;a.i&&tz(b,a.i);var c=a.ha,d;for(d in c)b.D(d,c[d],a);a.u("videoplayerchange",b);gz(b)&&hH(a)}}
844 function pA(a,b){sn(b);var c=a.ha,d;for(d in c)b.$(d,c[d],a);b!=a.b&&(c=b.B,a.P[c]==b&&delete a.P[c]);b==a.j&&(a.j=null,b!=a.b&&nA(a,a.b))}function N(a,b){return b?a.P[b]||null:a.j}function hH(a){var b=a.j.getVideoData();a.Lm("newdata",a.j,b);var c=a.k;z([Jo,Gw,go,bx,ju,Mw,Qw,Ww,ht],c.B,c);a.u("videoready",b);6!=a.o&&mz(a.j)}f=dH.prototype;f.wr=function(){iH(this,5)};f.Gr=function(a){a=a.i;P(a,8)&&!P(a,2)&&this.Qd()};
845 function Fh(a){!a.G&&a.I.K().qg&&(a.G=new HF(a),a.G&&jH(a,a.G));var b=a.G;b&&!b.vc&&b.$a(a.I)&&b.create()}
846 function jH(a,b){L(a,b);b.D("loaded",a.pm,a);b.D("unloaded",a.rm,a);b.D("command_pause",kH(a.Od,a));b.D("command_play",kH(a.Qd,a));b.D("command_seek",kH(a.pf,a));b.D("command_disable_controls",a.kg,a);b.D("command_enable_controls",a.Bh,a);b.D("command_redirect_controls",a.vm,a);b.D("command_stop_redirect_controls",a.zh,a);b.D("command_redirected_show_is_playing",a.R.zj,a.R);b.D("command_progress",a.jj,a);b.D("command_add_cuerange",a.om,a);b.D("command_remove_cuerange",a.tm,a);b.D("command_remove_cuerange_all",
847 a.um,a);b.D("command_update_cuerange_markers",a.xm,a);b.D("command_preroll_ready",a.wm,a);b.D("command_hide_all_dialogs",a.R.yj,a.R);b.D("command_clear_video_overlays",a.Eh,a);b.D("command_log",a.of,a);b.D("publish_external_event",a.sm,a);b.D("command_log_timing",a.k.A,a.k)}function Gh(a){a&&a.vc&&a.destroy()}f.Wa=function(a,b){this.u.apply(this,arguments);this.af.apply(this,arguments)};f.Ni=function(a,b){var c=ab(arguments);Kx(this.a)&&c.push(this.j.B);this.u.apply(this,c)};f.K=function(){return this.a};
848 f.getVideoData=function(a){return(a=N(this,a))?a.getVideoData():null};f.log_=function(){};f.Cr=function(){jf(0);this.a.Md||this.Km(this.wa)};f.kj=function(){var a=Tx(this.a);a.fs=this.a.pb;a.volume=Math.round(this.wa.volume);a.mos=this.wa.muted?1:0;this.a.eg&&this.g&&this.g.g&&"WL"==this.g.g.type&&(a.ssrt=1);return a};f.rq=function(){var a=jx(this.k);if(this.A){var b=this.A.Hi();b&&a.push(b)}return a};f.Lr=function(){ex(this.b,5,void 0,void 0)};
849 f.Mr=function(){this.a.Bj=this.R.a;var a=this.k,b={};b.loaded=v(this.pm,this);b.unloaded=v(this.rm,this);b.command_pause=kH(this.Od,this);b.command_play=kH(this.Qd,this);b.command_seek=kH(this.pf,this);b.command_disable_controls=v(this.kg,this);b.command_enable_controls=v(this.Bh,this);b.command_redirect_controls=v(this.vm,this);b.command_stop_redirect_controls=v(this.zh,this);b.command_redirected_show_is_playing=v(this.R.zj,this.R);b.command_progress=v(this.jj,this);b.command_add_cuerange=v(this.om,
850 this);b.command_remove_cuerange=v(this.tm,this);b.command_remove_cuerange_all=v(this.um,this);b.command_preroll_ready=v(this.wm,this);b.command_update_cuerange_markers=v(this.xm,this);b.command_hide_all_dialogs=v(this.R.yj,this.R);b.command_clear_video_overlays=v(this.Eh,this);b.command_log=v(this.of,this);b.publish_external_event=v(this.sm,this);b.module_menu_button_add=v(this.pr,this);b.module_menu_button_remove=v(this.qr,this);b.module_menu_item_add=v(this.rr,this);b.module_menu_item_remove=v(this.sr,
851 this);a.j=b;b=this.V;a.b!=b&&(gx(a),a.i={},a.b=b);this.R.ij();a=this.ja;a.b=this.R.a;for(var c in a.i)a.b[c]=a.i[c];for(c in a.g)a.b[c]=a.g[c];c=v(this.tr,this);a=document;b=Ye("fullscreenchange",a);"msfullscreenchange"==b&&(b="MSFullscreenChange");this.vj=b?J(a,b,c):null;c=this.J.args;this.a.dj?this.wa=Sh():this.wa||(this.wa={volume:100,muted:!1,nonNormalized:100});fH(this);a=new nh(c);dz(this.b,a);b=this.getVideoData();if("detailpage"==this.a.Z){var d;d=b.M;var e=Rh("yt-player-restore-playhead");
852 d=e?e[d]:void 0;d&&(b.ya=d)}jg("yt-player-restore-playhead");this.a.Oc=SF(this.R);"detailpage"!=this.a.Z&&c&&(c.playlist||c.list||c.api)&&(lH(this,c),a.M||a.gf||(c=this.g,a=v(this.Jm,this),c.ye=a,c.Vd&&H(c.ye,0)));if(c=this.J.args.jsapicallback)ha(c)||(c=n(c)),c&&kH(v(c,l,this.a.ej),l);this.a.qg=Eh(this.a)&&(!Ua(Mg())||!Ua(Og()));ll()?this.a.Ul?mH(this):"leanback"!=this.a.Z&&nH(this):ex(this.b,5,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",void 0);this.R.Kj()};
853 function nH(a){a.u("initializingmode");iH(a,2)}function mH(a){a.u("initializingmode");nA(a,a.b);iH(a,3);a.a.tb||(gH(a),fH(a),tz(a.b,a.i));iz(a.b);oH(a,3)}function kH(a,b){return function(){var c=Array.prototype.slice.call(arguments);H(function(){a.apply(b||this,c)},0)}}f.of=function(a,b,c){var d=N(this);b.event=a;d.k&&rz(d.k,b,c)};
854 function dh(a,b){if(!isNaN(b)&&a.i){var c=1,c=a.a.gg?eh:[1],c=1>b?Pa(c,function(a){return a>=b}):Ra(c,function(a){return a<=b});a.Dg!=c&&(a.Dg=c,a.b==a.j&&oj(a.i,c),a.u("onPlaybackRateChange",c))}}function fh(a,b){var c=a.getVideoData(b);return c&&c.a?c.a.a.i:"unknown"}function HG(a){return(a=N(a,void 0))?Uy(a.ja,a.a):"unknown"}f.getCurrentTime=function(a){return(a=N(this,a))?a.getCurrentTime():0};function Lh(a,b){var c=N(a,b);return c?c.od():0}
855 function hh(a,b){var c=a.getVideoData(b);if(!c)return[];c=La(c.j,function(a){return a.Re()});eb(c);return c}function rh(a,b){var c=Dz(a.b,b);c.debug_playbackQuality=fh(a);c.debug_date=(new Date).toString();return pb(c)}
856 function Lw(a,b){var c=a.getVideoData(),d=!!c.P||!!c.zf||!b;a.u("threedenabled",d);d&&a.i.setAttribute("mozStereoMode","1");Hw()&&(a.i.setAttribute("mozStereoMode",d?"1":"0"),c=bl[d?c.oe:0],d=document.createElement("NvStereoExtDataElement"),d.setAttribute("stereoMode",c),Zc(document.documentElement,d),Ef(d,"3DModeEvent"))}function Dh(a){return(a=N(a,1))&&a.i}
857 f.Sr=function(a){var b=a.target;switch(a.type){case "loadedmetadata":Up("fvb")||Sp("fvb");this.a.hd?this.da=H(v(this.R.we,this.R),16):this.R.we();break;case "loadstart":Up("gv")||Sp("gv");break;case "progress":case "timeupdate":Up("l2s")||(a=kj(b),a<b.buffered.length&&2<b.buffered.end(a)&&Sp("l2s"))}};f.Qr=function(a){if(this.Mk){var b=this.Zn.toString();this.Zn++;this.ri[b]=a;a={request:ab(a.b[0]?a.b[0].message:null),sessionId:b,system:a.j.a,url:a.k};this.u("onNewLicenseSession",a)}else a.start()};
858 f.Er=function(a,b){this.Ni("onLoadProgress",b)};f.Or=function(a,b){this.Ni("onVideoProgress",b)};
859 f.Jr=function(a,b,c,d,e){if(!e&&a.hg()&&!lz(a)){e=a.getVideoData();if(this.a.ze&&e.ra&&!e.en&&e.Ae>=e.gm){var g;g=a.K();var h=wb(e.pe/e.ra,0,1),h={html5:"1",video_id:e.M,eurl:g.b,framer:g.P,feature:g.j,ps:g.La,el:g.Z,list:e.Ta,w:h,l:e.ra,plid:e.fb,ei:e.k,access_token:e.G,tpmt:e.Ae,cpn:e.Da};g.g&&(h.adformat=g.g);g.referrer&&(h.referrer=Rx(g));g.Tb&&(h.autoplay="1");g.Ea&&(h.authuser=g.Ea);g.Ua&&(h.pageid=g.Ua);e.Ld&&(h.splay="1");e.g&&(h.subscribed=e.g);w(h,Ox(g));g=S(g.lb+"set_awesome",h);sa(g);
860 e.en=!0}e.ra&&e.Ae>=e.$l&&pH(this)}this.jj(b,c,d,a)};f.jj=function(a,b,c,d){this.u("progresssync",a,b,c||0,(d||N(this)).B)};
861 f.yr=function(a){var b;(b=!P(a.state,2))||(this.g&&("embedded"==this.a.Z||this.a.pb)&&fo(this)?(th(this),b=!0):b=!1,b=!b);if(b){P(a.state,2)&&(this.Od(),P(a.a,32)&&this.b.Sh(),this.a.nc&&IG(this,!1));0<Ho(a,256)&&(b=a.state.a,Ch(this.b,b.errorCode,b.errorDetail));if(P(a.state,128)){b=a.state;jf(0);ch(this);b=b.a;206==b.errorCode&&Ch(this.b,b.errorCode,b.errorDetail);b.message||(b.messageKey||(b.messageKey="HTML5_DEFAULT_FALLBACK"),b.message=mf(b.messageKey));5==b.errorCode&&Ch(this.b,208,b.errorDetail);
862 var c=5;206==b.errorCode&&(c=150);Ta(rj,b.errorCode)&&(c=b.errorCode);this.u("onError",c);this.u("onDetailedError",b)}this.u("applicationplayerstatechange",a);P(a.state,2)&&(a=this.getVideoData(),a.Cb&&!a.eb&&this.kg(["play_pause"]))}};f.Ir=function(a){!P(a.state,32)&&0>Ho(a,16)&&(!P(a.state,8)||this.i.ended&&!P(a.state,2)||this.Qd());this.u("presentingplayerstatechange",a);this.af("onStateChange",a);oH(this,vj(a.state))};
863 f.ur=function(a,b,c){if("newdata"==a){Gh(this.A);Gh(this.G);a=[];for(var d in this.B)bh(this,d)&&a.push(d);this.B={};0<a.length&&this.u("controlsenabled",a);this.zh();this.Y={}}this.getVideoData().Dj?(this.Af=Ob(this.wa),this.kg(["audio"]),d=this.i,d.Bk=!0,d.muted=!0):(bh(this,"audio")&&this.Bh(["audio"]),this.i.Bk=!1,this.Af&&(KG(this,this.Af),this.Af=null));d=this.getVideoData();d.Cb&&!this.a.wj?ex(this.b,205,"DEVICE_FALLBACK",void 0):d.Cb&&!d.eb?this.kg(["seek"]):this.Bh(["seek"]);this.getVideoData().ak&&
864 !this.a.xj&&ex(this.b,207,"DEVICE_FALLBACK",void 0);if(c.O||c.i.focEnabled||c.i.rmktEnabled)c=1E3*this.getVideoData().ra,qH(this,"part2viewed",0,c),qH(this,"videoplaytime25",0.25*c,c),qH(this,"videoplaytime50",0.5*c,c),qH(this,"videoplaytime75",0.75*c,c),qH(this,"videoplaytime100",c,2147483647),qH(this,"conversionview",c,2147483647)};
865 f.Lm=function(a,b,c){if("newdata"==a&&(gx(this.k),dh(this,1),!b.k&&!lz(b))){var d=new ZG,e=v(this.kj,this);d.O=e;e=v(this.rq,this);d.ja=e;cz(b);b.a&&!lz(b)&&(b.k=d,e=v(b.od,b),d.da=e,e=v(b.getCurrentTime,b),d.j=e,e=v(b.qq,b),d.pa=e,e=v(b.sq,b),d.aa=e,e=b.o,d.a=b.a,d.b=e,d.Q=d.b.lb+"get_video",d.g=!1,d.i=new VG(d.a,d.b,d.pa),L(d,d.i),d.ga=!0,b.a.fg&&nz(b.k,{metric:"connected"}))}this.wa.volume=(this.wa.nonNormalized||this.wa.volume)*this.getVideoData().uh;c.gm=Math.min(0.8*c.ra,180);this.Wa("videodatachange",
866 a,c,b.B)};f.Nr=function(a,b){var c=this.j.getVideoData();a==c&&this.u("onPlaybackQualityChange",a.a.a.i,b)};f.Br=function(){"detailpage"==this.a.Z&&Ih(this)};function Ih(a){var b=rH();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)});lH(a,{videoList:c,loop:b.autoPlay,index:b.index})}}function lH(a,b){Tg(a.g);a.g=new sm(b)}
867 function qH(a,b,c,d){b in a.Y||(c=new $h(c,d,{id:b,priority:1}),c.Eb.D("onEnter",a.Zo,a),c.Eb.D("onExit",a.Zo,a),a.b.xk(c),a.Y[b]=c)}f.Zo=function(a){var b=a.getId(),c=this.b.getVideoData();"part2viewed"==b?(c.O&&sa(c.O),c.kb&&sa(c.kb)):"conversionview"==b&&pH(this);c.Ca&&(b=a.getId(),c=Kj(c.Ca,{label:b}),sa(c));this.b.Rh(a)};
868 function pH(a){var b=a.b.getVideoData();b.fo||(b.i.eventLabel=a.a.Z,b.i.playerStyle=a.a.La,b.O&&(b.i.feature="pyv"),b.i.vid=b.M,b.i.isAd=!("adunit"!=a.a.Z&&!b.O),lG("view",b.i),b.fo=!0)}function iH(a,b){b!=a.o&&(2==b&&oH(a,5),a.o=b,a.u("appstatechange",b))}function oH(a,b){a.aa!=b&&(a.aa=b,a.Ni("onStateChange",b))}function bG(a,b){if(a.a.Ka){var c={controlClicked:b};a.a.pb&&(c.fs=1);a.of("",c)}}f.pf=function(a,b,c,d){(d=N(this,d))&&yz(d,a,!1!=b,c)};
869 f.Kr=function(a,b){var c=a.getVideoData();if(1==this.o||2==this.o)c.ya=b;2==this.o?mH(this):(c=Cz(a,b),this.Wa("seekto",c))};f.zr=function(){this.Wa("beginseeking")};f.Pr=function(){this.Wa("endseeking")};function KG(a,b){a.wa=b;a.u("internalvolumechange",a.wa)}function Yg(a){a.wa.muted=!0;a.u("internalvolumechange",a.wa)}function Zg(a){a.wa.muted=!1;a.u("internalvolumechange",a.wa)}function ph(a,b){var c;if(c=(new re(b)).a){var d=a.a;d.va=c.get("d",d.va);d.da=c.get("f",d.da)}}
870 function kh(a,b,c){b=new nh(b);return sH(a,b,void 0,c)}function sH(a,b,c,d){var e=N(a,d);if(!e)return!1;I(a.da);void 0!=c&&(b.ff=c);ch(a,d);dz(e,b);if(!hz(e))return!1;Mx(e.K(),b.b);e==a.b?(iH(a,1),mH(a)):iz(e);return!0}function vh(a,b){var c=sH(a,b);Wg(a,c,void 0)}function Wg(a,b,c){c=N(a,c);b&&c==a.b&&(c.getVideoData().Ld=!0)}function mh(a,b,c){var d=N(a,c);d&&(ch(a,c),dz(d,b),hz(d)&&(Mx(d.K(),b.b),d==a.b&&(iH(a,1),nH(a))))}
871 function Xn(a,b,c,d,e){if(!b&&!d)throw Error("Playback source is invalid");b=lh(b||null,d||null);a.a.pb||"detailpage"!=a.a.Z?d?(a.Xe=!1,sh(a,b,void 0,void 0,void 0)):kh(a,b,1):(d={},c&&(d.feature=c),b=new nh(b),d=Zt(a.a,b,d),c&&a.u("onNavigate",{url:d,feature:c}),e?dG(a,d):(window.ytspf||{}).enabled?spf.navigate(d):window.location=S(d,{})+"")}function sh(a,b,c,d,e){b=ia(b)&&!t(b)?b:{api:b,index:c,startSeconds:d,suggestedQuality:e};lH(a,b);b=a.g;a=v(a.Jm,a);b.ye=a;b.Vd&&H(b.ye,0)}
872 f.Jm=function(){var a=wh(this.g);this.getVideoData().df||!this.Xe?vh(this,a):mh(this,a)};function fo(a){var b=rH();return!(!a.g||!(a.g.loop||a.g.ua+1<a.g.Mb)||b&&!b.autoPlay)}function th(a){a.g&&(a.g.Vd?(a.g.loop||a.g.ua+1<a.g.Mb)&&vh(a,xm(a.g)):(xm(a.g),a.Xe=!1))}function uh(a){a.g&&(a.g.Vd?(a.g.loop||0<=a.g.ua-1)&&vh(a,ym(a.g)):(ym(a.g),a.Xe=!1))}function rH(){var a=n("yt.www.watch.lists.getState");return a?a():null}
873 function qh(a,b){var c=null;b&&(c={t:Math.floor(a.getCurrentTime(1))});return Zt(a.a,a.getVideoData(1),null,c)}f.om=function(a,b){var c=N(this,b);c&&(z(a,c.xk,c),this.u("cuerangesadded",a))};f.tm=function(a,b){var c=N(this,b);c&&(z(a,c.Rh,c),this.u("cuerangesremoved",a))};f.um=function(a,b){var c=N(this,b);if(c){for(var c=c.A,d=c.i.length-1;0<=d;d--)c.i[d].namespace==a&&yj(c,d);c.Xb()}};f.xm=function(a){this.u("cuerangemarkersupdated",a)};f.wm=function(a,b){var c=N(this,b);c&&sz(c,a)};f.xr=function(){tH(this)};
874 function tH(a){if(!a.a.fk){var b=a.b.getVideoData();if(b.M){var c=b.M;Wp().docid=c}b.k&&(c=b.k,Wp().ei=c);b.Da&&(c=b.Da,Wp().cpn=c);0<b.ya&&(c=b.ya.toString(),Wp().start=c);b=b.a.Oa.toString();Wp().fmt=b;b=Math.round((a.b.b?ih(a.b.b):0)*Lh(a)).toString();Wp().tds=b;Sp("aft");if("detailpage"==a.a.Z){var b=a.k.F,d;for(d in b)Sp(d,b[d]);d=a.k.o;for(var e in d)b=e,c=d[e],Wp()[b]=c;b=Tp().tick;e=Tp().span;c=Wp();if(d=n("yt.timing.reportbuilder_")){if(d=d.apply(null,[b,e,c,void 0]))Vp(d),Xp()}else{d={v:2,
875 s:"youtube",action:df("TIMING_ACTION")};var g=df("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]);
876 k={};p=[];h=b._start;for(var r in b)"_"!=r.charAt(0)&&(c=Math.max(Math.round(b[r]-h),0),k[r]=c,p.push(r+"."+c));d.rt=p.join(",");r={};p=[];for(var s in e)"_"!=s.charAt(0)&&(r[s]=e[s],p.push(s+"."+e[s]));d.it=p.join(",");Vp(d);(s=n("ytdebug.logTiming"))&&s(d,k,r);Xp()}}a.a.fk=!0}}f.pm=function(a){"remote"==a?(iH(this,6),Gh(this.A)):this.Ni("onApiChange")};f.rm=function(a){"remote"==a&&nH(this)};
877 f.qt=function(){if(!bh(this,"audio")){var a=100*this.i.volume,a={volume:a,nonNormalized:a/this.getVideoData().uh,muted:this.i.muted};this.wa=Ob(a);this.Wa("onVolumeChange",a)}};
878 f.Km=function(a){a.volume=wb(a.volume,0,100);a.nonNormalized=a.volume/this.getVideoData().uh;if(this.a.dj&&!this.a.Md){var b={};b.volume=isNaN(a.volume)?Sh().volume:wb(a.volume,0,100);b.nonNormalized=a.nonNormalized;b.muted=void 0==a.muted?Sh().muted:a.muted;fg("yt-player-volume",b,2592E3)}if(bh(this,"audio"))this.Af&&(this.Af=Ob(a),this.Wa("onVolumeChange",a));else{var b=this.i,c=a.muted;b.volume=a.volume/100;b.muted=c;this.a.Md||this.Wa("onVolumeChange",a)}};f.tr=function(){uH(this,!!Gf())};
879 function uH(a,b){a.R.uo(b);if("detailpage"==a.a.Z&&!b){var c=a.b.getVideoData(),d=n("checkCurrentVideo");if(d&&df("VIDEO_ID")!=c.M){var e=a.getCurrentTime(),g={};g[c.M]=e;fg("yt-player-restore-playhead",g,172800);d(c.M);a.u("openingpage")}}a.a.pb=b;a.R.we();a.Wa("fullscreentoggled",b)}f.Rr=function(){SG(this)};f.Eh=function(){this.Wa("clearvideooverlays")};f.pr=function(a,b){this.Wa("menu_button_add",a,b)};f.qr=function(a){this.Wa("menu_button_remove",a)};
880 f.rr=function(a){this.Wa("menu_item_add",a)};f.sr=function(a){this.Wa("menu_item_remove",a)};f.Dr=function(a){this.Wa("liveviewshift",a)};f.sm=function(a,b){if("onAdStateChange"==a){var c=arguments[1],d=arguments[2],e=arguments[3]||{};1==c&&tH(this);"leanback"==this.a.Z&&Kx(this.a)&&(0==c?this.Ud=this.i:this.Ud=d,this.u("onAdStateChange",c,e.video_id))}else this.u.apply(this,arguments)};
881 f.af=function(a,b){this.k.G.apply(this.k,arguments);this.A&&this.A.u.apply(this.A,arguments);this.G&&this.G.u.apply(this.G,arguments)};f.Qd=function(a,b){var c=N(this,b);c&&(2==this.o?mH(this):c.V?(a&&vH(this,c),P(c.i,2)?this.pf(0):vz(c)):iz(c))};f.Od=function(a,b){var c=N(this,b);c&&(a&&vH(this,c),qz(c))};
882 function ch(a,b){var c=N(a,b);if(c&&1!=a.o&&2!=a.o){qz(c);if(c.k){var d=c.k;bH(d,aH(d)).send();d=d.i;"PL"==d.b&&(zz(d,"vps",["PA"]),d.b="PA");d.ng()}c.V=!1;c.b&&(ez(c),c.g&&(Ug(c.j,c.g),c.j=null,c.g=null),c.a&&(c.a.ya=c.getCurrentTime()),c.G=NaN,mj(c.b),c.o.za&&pj(c.b,!1),P(c.i,128)||jz(c,uj(c.i)))}}function $g(a,b){if(!bh(a,"play_pause")){var c=a.L.play_pause?a.Q:null;c?c.ie("control_play"):a.Qd(!1,b)}}
883 function ah(a,b){if(!bh(a,"play_pause")){var c=a.L.play_pause?a.Q:null;c?c.ie("control_pause"):a.Od(!1,b)}}function JG(a,b){if(!bh(a,"play_pause")&&(!a.a.Db||2!=a.o||tn.hasTags(void 0))){var c=a.L.play_pause?a.Q:null;c?c.ie("control_toggle_play_pause"):(c=N(a,void 0))&&(c.hg()?a.Od(b,void 0):a.Qd(b,void 0))}}function Xg(a,b,c,d,e){if(!bh(a,"seek")){var g=a.L.seek?a.Q:null;g?g.ie("control_seek",b):a.pf(b,c,d,e)}}
884 function IG(a,b){if(a.a.pb!=b)if(Ff())if(b){var c=a.R.a,d=Xe(["requestFullscreen","requestFullScreen"],c);d&&d.apply(c)}else(c=Xe(["exitFullscreen","cancelFullscreen","cancelFullScreen"],document))&&c.call(document);else a.u("onFullScreenToggleRequest"),uH(a,b)}function dG(a,b){IG(a,!1);a.u("openingpage");Qp(b)}f.Ar=function(a){Lx(this.a,a)};
885 f.Hr=function(){if(this.j==this.b){var a;if(a=Eh(this.a))if(ig("yt-remote-delayed-connect-key"))a=!0;else{a=Fg();var b=xg(Mg());a=!!Bg(b,a)}if(a||!this.getVideoData(1).jm||this.a.nc)if((b=gz(this.b))||(b=((b=this.getVideoData())&&b.I.length&&!gz(N(this))?0<=Ja(b.I,"fresca"):!1)||a),b){if(this.b.Q.length||0<Ji(this.b.A.b,-2147483648).length)iH(this,4),Gh(this.A);a&&iH(this,6);!this.A&&this.I.getVideoData().ca&&(this.A=new DB(this))&&jH(this,this.A);(a=this.A)&&!a.vc&&a.$a(this.I)&&a.create();Fh(this);
886 hH(this)}else a=!1,this.getVideoData().ja||this.V&&(a=Vw(this.V)),a?(a=this.getVideoData(),kh(this,{video_id:a.b.ypc_vid||a.M,ypc_preview:1},1)):(this.log_("No available formats"),ex(this.b,5,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",void 0));else a="DEVICE_FALLBACK",hc||dj("iemobile")||dj("xbox")&&dj("trident")||dj("nintendo wiiu")||(a="FLASH_FALLBACK"),ex(this.b,5,a,void 0)}else hH(this)};f.Fr=function(){this.Od()};
887 function vH(a,b){var c=b.getVideoData(),d="html5-bezel-pause";P(b.i,8)?c.Cb&&!c.eb&&(d="html5-bezel-stop"):d="html5-bezel-play";a.R.jp(d)}function SG(a){a.a.Oc=SF(a.R);if(a.i){var b=!1,c=a.getVideoData();if(0!=a.i.readyState){var d=new B(a.i.videoWidth,a.i.videoHeight);Ab(c.V,d)||(c.V=d,b=!0)}c=VF(a.R,SF(a.R),TF(a.R),UF(a.R),void 0);Fb(a.a.Ko,c)||(a.a.Ko=c,b=!0);c=VF(a.R,SF(a.R),TF(a.R),UF(a.R),!0);Fb(a.a.tf,c)||(a.a.tf=c,b=!0);b&&(gh(N(a),"r"),a.u("resize",Qx(a.a)),a.Wa("onResize"))}}
888 function bh(a,b){return!(!a.B[b]||!a.B[b].length)}f.kg=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.Bh=function(a,b){b=b||"defaultcontext";var c=[];z(a,function(a){if(bh(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)};
889 f.vm=function(a,b,c){this.zh();this.Q=a;b&&z(b,function(a){this.L[a]=!0},this);c&&hx(this.k,a,c)};f.zh=function(){this.Q=null;this.L={};ix(this.k)};function OG(a){var b=a.getVideoData();return b&&b.Ma&&!Zl.test(b.Ma)?!a.a.Hh:a.a.zc}f.H=function(){gH(this);this.vj&&yf(this.vj);jf(0);Ug(Jb(this.P));this.P={};this.j=this.b=null;Ug(this.a,this.g);this.J=this.I=this.ja=this.V=this.Ud=null;I(this.da);dH.C.H.call(this)};pa("yt.player.Application",dH);function wH(a,b,c,d,e,g){var h={};b&&(h.v=b);c&&(h.list=c);d&&(h.url=d);a={name:a,locale:e,feature:g};for(var k in h)a[k]=h[k];h=S("/sharing_services",a);sa(h)};wp(Ap);wp(Et);n("yt.tracking.share")||pa("yt.tracking.share",wH);n("yt.net.ping")||pa("yt.net.ping.send",sa);n("yt.window.popup")||(pa("yt.window.popup",Rp),pa("yt.window.open",Qp));pa("yt.player.Application.create",function(a,b){eH[a]&&(eH[a].dispose(),eH[a]=null);var c=new dH(a,b);Sg(c,function(){eH[a]=null});eH[a]=c});})();