text: (self.AMP=self.AMP||[]).push({n:"amp-youtube",v:"2004252135000",f:(function(AMP,_){
      var h,aa="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},m;if("function"==typeof Object.setPrototypeOf)m=Object.setPrototypeOf;else{var n;a:{var ba={a:!0},ca={};try{ca.__proto__=ba;n=ca.a;break a}catch(a){}n=!1}m=n?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var da=m;function ea(){var a,b;this.promise=new Promise(function(c,d){a=c;b=d});this.resolve=a;this.reject=b};function fa(a,b){b=void 0===b?"":b;try{return decodeURIComponent(a)}catch(c){return b}};var ha=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function p(a){var b=Object.create(null);if(!a)return b;for(var c;c=ha.exec(a);){var d=fa(c[1],c[1]),e=c[2]?fa(c[2].replace(/\+/g," "),c[2]):"";b[d]=e}return b};var q="";var ia=Object.prototype.toString;function r(a){return"[object Object]"===ia.call(a)}function t(a){return"number"===typeof a&&isFinite(a)};function u(a){var b=!1,c=null,d=a;return function(a){for(var e=[],g=0;g<arguments.length;++g)e[g-0]=arguments[g];b||(c=d.apply(self,e),b=!0,d=null);return c}};var v=self.AMP_CONFIG||{},ja=("string"==typeof v.cdnProxyRegex?new RegExp(v.cdnProxyRegex):v.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function ka(a){if(self.document&&self.document.head&&(!self.location||!ja.test(self.location.origin))){var b=self.document.head.querySelector('meta[name="'+a+'"]');b&&b.getAttribute("content")}}v.cdnUrl||ka("runtime-host");v.geoApiUrl||ka("amp-geo-api");self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var w=self.__AMP_LOG;function x(){if(!w.user)throw Error("failed to call initLogConstructor");return w.user}function y(a,b,c){return x().assert(a,b,c,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)};var la=Object.prototype.hasOwnProperty;function A(a){var b=Object.create(null);a&&Object.assign(b,a);return b}function C(a){return a||{}};function D(a,b){return b.length>a.length?!1:0==a.lastIndexOf(b,0)};C({c:!0,v:!0,a:!0,ad:!0,action:!0});function ma(a,b){if(a.__AMP__EXPERIMENT_TOGGLES)var c=a.__AMP__EXPERIMENT_TOGGLES;else{a.__AMP__EXPERIMENT_TOGGLES=Object.create(null);c=a.__AMP__EXPERIMENT_TOGGLES;if(a.AMP_CONFIG)for(var d in a.AMP_CONFIG){var e=a.AMP_CONFIG[d];"number"===typeof e&&0<=e&&1>=e&&(c[d]=Math.random()<e)}if(a.AMP_CONFIG&&Array.isArray(a.AMP_CONFIG["allow-doc-opt-in"])&&0<a.AMP_CONFIG["allow-doc-opt-in"].length&&(d=a.AMP_CONFIG["allow-doc-opt-in"],e=a.document.head.querySelector('meta[name="amp-experiments-opt-in"]'))){e=
      e.getAttribute("content").split(",");for(var f=0;f<e.length;f++)-1!=d.indexOf(e[f])&&(c[e[f]]=!0)}Object.assign(c,na(a));if(a.AMP_CONFIG&&Array.isArray(a.AMP_CONFIG["allow-url-opt-in"])&&0<a.AMP_CONFIG["allow-url-opt-in"].length)for(d=a.AMP_CONFIG["allow-url-opt-in"],a=p(a.location.originalHash||a.location.hash),e=0;e<d.length;e++)f=a["e-"+d[e]],"1"==f&&(c[d[e]]=!0),"0"==f&&(c[d[e]]=!1)}var g=c;return!!g[b]}
      function na(a){var b="";try{"localStorage"in a&&(b=a.localStorage.getItem("amp-experiment-toggles"))}catch(e){if(w.dev)a=w.dev;else throw Error("failed to call initLogConstructor");a.warn("EXPERIMENTS","Failed to retrieve experiments from localStorage.")}var c=b?b.split(/\s*,\s*/g):[];a=Object.create(null);for(var d=0;d<c.length;d++)0!=c[d].length&&("-"==c[d][0]?a[c[d].substr(1)]=!1:a[c[d]]=!0);return a};var oa={},E=(oa["ampdoc-fie"]={isTrafficEligible:function(){return!0},branches:[["21065001"],["21065002"]]},oa);function F(a,b){var c=a.ownerDocument.defaultView,d=c.__AMP_TOP||(c.__AMP_TOP=c),e=c!=d;var f=d;if(ma(f,"ampdoc-fie")){f.__AMP_EXPERIMENT_BRANCHES=f.__AMP_EXPERIMENT_BRANCHES||{};for(var g in E)if(la.call(E,g)&&!la.call(f.__AMP_EXPERIMENT_BRANCHES,g))if(E[g].isTrafficEligible&&E[g].isTrafficEligible(f)){if(!f.__AMP_EXPERIMENT_BRANCHES[g]&&ma(f,g)){var l=E[g].branches;f.__AMP_EXPERIMENT_BRANCHES[g]=l[Math.floor(Math.random()*l.length)]||null}}else f.__AMP_EXPERIMENT_BRANCHES[g]=null;f="21065002"===
      (f.__AMP_EXPERIMENT_BRANCHES?f.__AMP_EXPERIMENT_BRANCHES["ampdoc-fie"]:null)}else f=!1;var k=f;e&&!k?b=G(c,b)?H(c,b):null:(a=I(a),a=pa(a),b=G(a,b)?H(a,b):null);return b}function J(a,b){a=a.__AMP_TOP||(a.__AMP_TOP=a);return H(a,b)}function K(a,b){var c=I(a);c=pa(c);return H(c,b)}function I(a){return a.nodeType?J((a.ownerDocument||a).defaultView,"ampdoc").getAmpDoc(a):a}function pa(a){a=I(a);return a.isSingleDoc()?a.win:a}
      function H(a,b){G(a,b);var c=qa(a);a=c[b];a.obj||(a.obj=new a.ctor(a.context),a.ctor=null,a.context=null,a.resolve&&a.resolve(a.obj));return a.obj}function qa(a){var b=a.__AMP_SERVICES;b||(b=a.__AMP_SERVICES={});return b}function G(a,b){a=a.__AMP_SERVICES&&a.__AMP_SERVICES[b];return!(!a||!a.ctor&&!a.obj)};var ra;function sa(){return ra?ra:ra=Promise.resolve(void 0)};/*
       https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
      function L(a){a.parentElement&&a.parentElement.removeChild(a)}function ta(a){var b,c,d=b||function(a){return a},e=a.dataset;a={};var f=c?c:/^param(.+)/,g;for(g in e){var l=g.match(f);if(l){var k=l[1][0].toLowerCase()+l[1].substr(1);a[d(k)]=e[g]}}return a};function ua(a){a.signals().signal("user-interacted")};var M;function N(a){a=a.ownerDocument||a;M&&M.ownerDocument===a||(M=a.createElement("div"));return va}function va(a){var b=M;b.innerHTML=a[0];a=b.firstElementChild;b.removeChild(a);return a};function wa(a){var b;try{return JSON.parse(a)}catch(c){return b&&b(c),null}};var xa=["<iframe frameborder=0 allowfullscreen></iframe>"];function ya(a,b,c){if(null!=c[b]){var d=c[b];(Array.isArray(d)?d:[d]).forEach(function(b){a.dispatchCustomEvent(b)})}}function za(a,b){var c,d=a.element,e=N(d)(xa);c&&e.setAttribute("sandbox",c.join(" "));a.propagateAttributes(["referrerpolicy"],e);e.src=F(d,"url").assertHttpsUrl(b,d);a.applyFillContent(e);d.appendChild(e);return e}function Aa(a){var b=a.getAttribute("allow")||"";a.setAttribute("allow",b+"autoplay;")};var O;function Ba(a,b,c,d){var e=a,f=c;var g=function(a){try{return f(a)}catch(B){throw self.__AMP_REPORT_ERROR(B),B;}};var l=Ca(),k=!1;d&&(k=d.capture);e.addEventListener(b,g,l?d:k);return function(){e&&e.removeEventListener(b,g,l?d:k);g=e=f=null}}function Ca(){if(void 0!==O)return O;O=!1;try{var a={get capture(){O=!0}};self.addEventListener("test-options",null,a);self.removeEventListener("test-options",null,a)}catch(b){}return O};function Da(a,b,c){var d={detail:c};Object.assign(d,void 0);if("function"==typeof a.CustomEvent)return new a.CustomEvent(b,d);a=a.document.createEvent("CustomEvent");a.initCustomEvent(b,!!d.bubbles,!!d.cancelable,c);return a}function P(a,b,c){return Ba(a,b,c,void 0)}function Ea(a,b,c,d){var e=c,f=Ba(a,b,function(a){try{e(a)}finally{e=null,f()}},d);return f}function Fa(a){var b,c,d=new Promise(function(b){c=Ea(a,"load",b,void 0)});d.then(c,c);b&&b(c);return d};var Ga={title:"",artist:"",album:"",artwork:[{src:""}]};function Ha(a){var b=a.querySelector('script[type="application/ld+json"]');if(b){var c=wa(b.textContent);if(c&&c.image){if("string"===typeof c.image)return c.image;if(c.image["@list"]&&"string"===typeof c.image["@list"][0])return c.image["@list"][0];if("string"===typeof c.image.url)return c.image.url;if("string"===typeof c.image[0])return c.image[0]}}}
      function Ia(a,b){var c=F(a,"url");if(b&&b.artwork){var d=b.artwork;Array.isArray(d);d.forEach(function(a){a&&(a=r(a)?a.src:a,y(c.isProtocolValid(a)))})}};function Ja(){this.o=null}h=Ja.prototype;h.add=function(a){var b=this;this.o||(this.o=[]);this.o.push(a);return function(){b.remove(a)}};h.remove=function(a){this.o&&(a=this.o.indexOf(a),-1<a&&this.o.splice(a,1))};h.removeAll=function(){this.o&&(this.o.length=0)};h.fire=function(a){if(this.o)for(var b=this.o,c=0;c<b.length;c++)(0,b[c])(a)};h.getHandlerCount=function(){return this.o?this.o.length:0};function Q(){this.M=!1;this.ga=new Ja}Q.prototype.onSessionEnd=function(a){this.ga.add(a)};Q.prototype.beginSession=function(){this.M=!0};Q.prototype.endSession=function(){this.M&&this.ga.fire();this.M=!1};Q.prototype.isSessionActive=function(){return this.M};var R,Ka="Webkit webkit Moz moz ms O o".split(" ");function La(a,b){for(var c in b){var d=a,e=b[c];var f=d.style;var g=c;if(D(g,"--"))f=g;else{R||(R=A());var l=R[g];if(!l){l=g;if(void 0===f[g]){var k=g;k=k.charAt(0).toUpperCase()+k.slice(1);b:{for(var z=0;z<Ka.length;z++){var B=Ka[z]+k;if(void 0!==f[B]){k=B;break b}}k=""}void 0!==f[k]&&(l=k)}R[g]=l}f=l}f&&(D(f,"--")?d.style.setProperty(f,e):d.style[f]=e)}};function Ma(a,b){if(b)return Promise.resolve(!1);var c=a.document.createElement("video");c.setAttribute("muted","");c.setAttribute("playsinline","");c.setAttribute("webkit-playsinline","");c.setAttribute("height","0");c.setAttribute("width","0");c.muted=!0;c.playsinline=!0;c.webkitPlaysinline=!0;La(c,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"});(new Promise(function(a){return a(c.play())})).catch(function(){});return Promise.resolve(!c.paused)}var Na=null;function Oa(a){var b=250,c=4E3;return Math.min(Math.max(a,b),c)};function Pa(a,b,c){return b[c]?b[c]:(a=a.querySelector("style["+c+"]"))?b[c]=a:null};var Qa="i-amphtml-video-mask{display:block;z-index:1}.amp-video-eq{display:none}.i-amphtml-video-interface:not(amp-video) .amp-video-eq,amp-story .amp-video-eq,amp-video[controls] .amp-video-eq{display:-ms-flexbox;display:flex}[noaudio] .amp-video-eq{display:none!important}.amp-video-eq{pointer-events:none!important;-ms-flex-align:end;align-items:flex-end;bottom:7px;height:12px;opacity:0.8;overflow:hidden;position:absolute;right:7px;width:20px;z-index:1}.amp-video-eq .amp-video-eq-col{-ms-flex:1;flex:1;height:100%;margin-right:1px;position:relative}.amp-video-eq .amp-video-eq-col div{animation-name:amp-video-eq-animation;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;background-color:#fafafa;height:100%;position:absolute;width:100%;will-change:transform;animation-play-state:paused}.amp-video-eq[unpausable] .amp-video-eq-col div{animation-name:none}.amp-video-eq[unpausable].amp-video-eq-play .amp-video-eq-col div{animation-name:amp-video-eq-animation}.amp-video-eq.amp-video-eq-play .amp-video-eq-col div{animation-play-state:running}.amp-video-eq-1-1{animation-duration:0.3s;transform:translateY(60%)}.amp-video-eq-1-2{animation-duration:0.45s;transform:translateY(60%)}.amp-video-eq-2-1{animation-duration:0.5s;transform:translateY(30%)}.amp-video-eq-2-2{animation-duration:0.4s;transform:translateY(30%)}.amp-video-eq-3-1{animation-duration:0.3s;transform:translateY(70%)}.amp-video-eq-3-2{animation-duration:0.35s;transform:translateY(70%)}.amp-video-eq-4-1{animation-duration:0.4s;transform:translateY(50%)}.amp-video-eq-4-2{animation-duration:0.25s;transform:translateY(50%)}@keyframes amp-video-eq-animation{0%{transform:translateY(100%)}to{transform:translateY(0)}}\n/*# sourceURL=/css/video-autoplay.css*/";var Ra=["<i-amphtml-video-mask class=i-amphtml-fill-content role=button></i-amphtml-video-mask>"],Sa=["<i-amphtml-video-icon class=amp-video-eq><div class=amp-video-eq-col><div class=amp-video-eq-filler></div><div class=amp-video-eq-filler></div></div></i-amphtml-video-icon>"];function Ta(a){var b=N(a);return b(Ra)}
      function Ua(a,b){var c=N(b)(Sa),d=c.firstElementChild;for(b=0;4>b;b++){for(var e=d.cloneNode(!0),f=e.children,g=0;g<f.length;g++){var l=f[g];l.classList.add("amp-video-eq-"+(b+1)+"-"+(g+1))}c.appendChild(e)}L(d);J(a,"platform").isIos()&&c.setAttribute("unpausable","");return c};function Va(a){var b=this;this.ampdoc=a;this.installAutoplayStyles=u(function(){var a=Qa,d=b.ampdoc.getHeadNode();var e=(e=d.__AMP_CSS_TR)?e(a):a;(a=d.__AMP_CSS_SM)||(a=d.__AMP_CSS_SM=A());var f=Pa(d,a,"amp-extension=amp-video-autoplay");f?f.textContent!==e&&(f.textContent=e):(f=(d.ownerDocument||d).createElement("style"),f.textContent=e,f.setAttribute("amp-extension","amp-video-autoplay"),e=Pa(d,a,"amp-runtime"),(e=void 0===e?null:e)?d.insertBefore(f,e.nextSibling):d.insertBefore(f,d.firstChild),
      a["amp-extension=amp-video-autoplay"]=f)});this.na=K(this.ampdoc,"viewport");this.X=this.l=null;this.ma=!1;this.P=J(a.win,"timer");this.oa=F(a.getHeadNode(),"action");this.fa=function(){for(var a=0;a<b.l.length;a++){var d=b.l[a];if("paused"!==d.getPlayingState()){S(d,"video-seconds-played");var e=d.video.getCurrentTime(),f=d.video.getDuration();t(e)&&t(f)&&0<f&&(e=Da(b.ampdoc.win,"video-manager.timeUpdate",C({time:e,percent:e/f})),b.oa.trigger(d.video.element,"timeUpdate",e,1))}}b.P.delay(b.fa,1E3)};
      this.T=u(function(){return new T(b.ampdoc,b)});this.P.delay(this.fa,1E3)}h=Va.prototype;h.dispose=function(){this.T().dispose();if(this.l)for(var a=0;a<this.l.length;a++){var b=this.l[a];b.dispose()}};h.register=function(a){Wa(a);if(a.supportsPlatform()){this.l=this.l||[];var b=new Xa(this,a);Ya(this,b);this.l.push(b);b=b.video.element;b.dispatchCustomEvent("registered");b.classList.add("i-amphtml-media-component");var c=a.signals();c.signal("registered");b.classList.add("i-amphtml-video-interface")}};
      function Wa(a){function b(){return a.fullscreenEnter()}function c(b,c){a.registerAction(b,function(){ua(a);c()},d)}var d=1;c("play",function(){return a.play(!1)});c("pause",function(){return a.pause()});c("mute",function(){return a.mute()});c("unmute",function(){return a.unmute()});c("fullscreenenter",b);c("fullscreen",b)}
      function Ya(a,b){var c=b.video.element;P(c,"amp:video:visibility",function(a){(a=a.data)&&1==a.visible?b.updateVisibility(!0):b.updateVisibility()});P(c,"reloaded",function(){b.videoLoaded()});if(!a.ma){var d=function(){for(var b=0;b<a.l.length;b++)a.l[b].updateVisibility()};a.na.onScroll(d);a.na.onChanged(d);a.ma=!0}}function U(a,b){if(Za(a.X,b))return a.X;for(var c=0;c<a.l.length;c++){var d=a.l[c];if(Za(d,b))return a.X=d}return null}h.registerForAutoFullscreen=function(a){this.T().register(a)};
      h.va=function(){return this.T()};h.getVideoStateProperty=function(a,b){var c=this.ampdoc.getRootNode(),d=x().assertElement(c.getElementById(a),'Could not find an element with id="'+a+'" for VIDEO_STATE');a=U(this,d);return(a?a.getAnalyticsDetails():sa()).then(function(a){return a?a[b]:""})};h.getPlayingState=function(a){return U(this,a).getPlayingState()};h.isMuted=function(a){return U(this,a).isMuted()};h.userInteracted=function(a){return U(this,a).userInteracted()};
      h.isRollingAd=function(a){return U(this,a).isRollingAd()};function Za(a,b){return!!a&&(a.video===b||a.video.element===b)}
      function Xa(a,b){var c=this;this.O=a;this.j=a.ampdoc;this.video=b;this.ea=!0;this.A=this.L=this.C=this.ka=!1;this.S=new Q;this.S.onSessionEnd(function(){return S(c,"video-session")});this.H=new Q;this.H.onSessionEnd(function(){return S(c,"video-session-visible")});this.aa=function(){var a=c.j.win,b=a||self;if(b.__AMP_MODE)b=b.__AMP_MODE;else{var f=self.AMP_CONFIG||{};var g=!!f.test||!1;var l=p(b.location.originalHash||b.location.hash);f=f.spt;var k=p(b.location.search);q||(q=b.AMP_CONFIG&&b.AMP_CONFIG.v?
      b.AMP_CONFIG.v:"012004252135000");g={localDev:!1,development:!!(0<=["1","actions","amp","amp4ads","amp4email"].indexOf(l.development)||b.AMP_DEV_MODE),examiner:"2"==l.development,esm:!1,geoOverride:l["amp-geo"],minified:!0,lite:void 0!=k.amp_lite,test:g,log:l.log,version:"2004252135000",rtvVersion:q,singlePassType:f};b=b.__AMP_MODE=g}b=b.lite;Na||(Na=u(Ma));return Na(a,b)};this.ia=u(function(){return new V(c.j.win,c)});this.Y=this.la=!1;this.U=null;this.B=!1;(this.hasAutoplay=b.element.hasAttribute("autoplay"))&&
      this.O.installAutoplayStyles();this.D=Ga;this.sa=function(){c.video.play(!1)};this.ra=function(){c.video.pause()};Fa(b.element).then(function(){return c.videoLoaded()});P(b.element,"pause",function(){S(c,"video-pause");c.C=!1;c.Y?c.Y=!1:c.S.endSession()});P(b.element,"playing",function(){c.C=!0;"playing_manual"==c.getPlayingState()&&c.ha();var a=c.video,b=a.element;if(!a.preimplementsMediaSessionAPI()&&!b.classList.contains("i-amphtml-disable-mediasession")){a=c.j.win;var f=c.D,g=c.sa,l=c.ra,k=a.navigator;
      "mediaSession"in k&&a.MediaMetadata&&(k.mediaSession.metadata=new a.MediaMetadata(Ga),Ia(b,f),k.mediaSession.metadata=new a.MediaMetadata(f),k.mediaSession.setActionHandler("play",g),k.mediaSession.setActionHandler("pause",l))}c.S.beginSession();c.A&&c.H.beginSession();S(c,"video-play")});P(b.element,"muted",function(){return c.B=!0});P(b.element,"unmuted",function(){return c.B=!1});P(b.element,"amp:video:tick",function(a){a=a.data;var b=a.eventType;b&&$a(c,b,a.vars)});P(b.element,"ended",function(){c.L=
      !1;S(c,"video-ended")});P(b.element,"ad_start",function(){c.L=!0;S(c,"video-ad-start")});P(b.element,"ad_end",function(){c.L=!1;S(c,"video-ad-end")});b.signals().whenSignal("registered").then(function(){var a=c.video.element;(c.video.preimplementsAutoFullscreen()||!a.hasAttribute("rotate-to-fullscreen")?0:y(c.video.isInteractive(),"Only interactive videos are allowed to enter fullscreen on rotate. Set the `controls` attribute on %s to enable.",a))&&c.O.registerForAutoFullscreen(c);c.updateVisibility();
      c.hasAutoplay&&ab(c)});this.ha=u(function(){var a="firstPlay",b=Da(c.j.win,a,C({})),f=c.video.element,g=F(f,"action");g.trigger(f,a,b,1)});bb(this)}h=Xa.prototype;h.dispose=function(){this.ia().stop()};function $a(a,b,c){var d={},e=(d["__amp:eventType"]=b,d);Object.keys(c).forEach(function(a){e["custom_"+a]=c[a]});S(a,"video-hosted-custom",e)}function bb(a){a.video.signals().whenSignal("autoplay-delegated").then(function(){a.ea=!1;a.C&&a.video.pause()})}h.isMuted=function(){return this.B};
      h.videoLoaded=function(){this.ka=!0;this.U=this.video.element.querySelector("video, iframe");if(!this.video.preimplementsMediaSessionAPI()){this.video.getMetadata()&&(this.D=A(this.video.getMetadata()));var a=this.j.win.document;if(!this.D.artwork||0==this.D.artwork.length){var b;(b=Ha(a))||(b=(b=a.querySelector('meta[property="og:image"]'))?b.getAttribute("content"):void 0);b||(b=(b=a.querySelector('link[rel="shortcut icon"]')||a.querySelector('link[rel="icon"]'))?b.getAttribute("href"):void 0);
      b&&(this.D.artwork=[{src:b}])}!this.D.title&&(a=this.video.element.getAttribute("title")||this.video.element.getAttribute("aria-label")||this.U.getAttribute("title")||this.U.getAttribute("aria-label")||a.title)&&(this.D.title=a)}this.ia().start();this.updateVisibility();this.A&&cb(this)};
      function cb(a){a.j.isVisible()&&a.aa().then(function(b){var c=a.hasAutoplay&&!a.userInteracted();c&&b?a.ea&&(a.A?(a.H.beginSession(),a.video.play(!0),a.la=!0):(a.C&&a.H.endSession(),a.video.pause(),a.Y=!0)):a.A?a.H.beginSession():a.C&&a.H.endSession()})}function ab(a){a.video.isInteractive()&&a.video.hideControls();a.aa().then(function(b){!b&&a.video.isInteractive()?a.video.showControls():(a.video.mute(),db(a))})}
      function db(a){var b=a.video,c=a.video,d=c.element;c=c.win;if(!d.hasAttribute("noaudio")&&!d.signals().get("user-interacted")){var e=Ua(c,d),f=function(a){b.mutateElementSkipRemeasure(function(){return e.classList.toggle("amp-video-eq-play",a)})};b.mutateElementSkipRemeasure(function(){return d.appendChild(e)});var g=[P(d,"pause",function(){return f(!1)}),P(d,"playing",function(){return f(!0)})];b.signals().whenSignal("user-interacted").then(function(){var b=a.video,c=b.element;a.ha();b.isInteractive()&&
      b.showControls();b.unmute();g.forEach(function(a){a()});b=c.querySelector(".amp-video-eq");c=c.querySelector("i-amphtml-video-mask");b&&L(b);c&&L(c)});if(b.isInteractive()){var l=Ta(d),k=function(a){b.mutateElementSkipRemeasure(function(){var b=a;void 0===b&&(b=l.hasAttribute("hidden"));b?l.removeAttribute("hidden"):l.setAttribute("hidden","")})};b.hideControls();b.mutateElementSkipRemeasure(function(){return d.appendChild(l)});[P(l,"click",function(){return ua(b)}),P(d,"ad_start",function(){k(!1);
      b.showControls()}),P(d,"ad_end",function(){k(!0);b.hideControls()}),P(d,"unmuted",function(){return ua(b)})].forEach(function(a){return g.push(a)})}}}h.updateVisibility=function(a){var b=this.A;if(a)this.A=!0;else{var c=this.video.element.getIntersectionChangeEntry().intersectionRatio;this.A=.5<=(t(c)?c:0)}this.A!=b&&this.ka&&cb(this)};h.getPlayingState=function(){return this.C?this.C&&this.la&&!this.userInteracted()?"playing_auto":"playing_manual":"paused"};h.isRollingAd=function(){return this.L};
      h.userInteracted=function(){return null!=this.video.signals().get("user-interacted")};
      h.getAnalyticsDetails=function(){var a=this,b=this.video;return this.aa().then(function(c){var d=b.element.getLayoutBox(),e=d.width;d=d.height;var f=a.hasAutoplay&&c,g=b.getPlayedRanges(),l=g.reduce(function(a,b){return a+b[1]-b[0]},0);return{autoplay:f,currentTime:b.getCurrentTime(),duration:b.getDuration(),height:d,id:b.element.id,muted:a.B,playedTotal:l,playedRangesJson:JSON.stringify(g),state:a.getPlayingState(),width:e}})};
      function T(a,b){var c=this;this.O=b;this.j=a;this.F=this.I=null;this.l=[];this.m=[];this.J=function(){return eb(c)};this.qa=function(a){return"playing_manual"==c.O.getPlayingState(a)};this.pa=function(a,b){a=a.element.getIntersectionChangeEntry();var d=a.intersectionRatio;a=a.boundingClientRect;var e=b.element.getIntersectionChangeEntry();b=e.boundingClientRect;d-=e.intersectionRatio;.1<Math.abs(d)?a=d:(e=K(c.j,"viewport"),d=fb(e,a),e=fb(e,b),a=d<e||d>e?d-e:a.top-b.top);return a};gb(this);hb(this)}
      T.prototype.dispose=function(){this.m.forEach(function(a){return a()});this.m.length=0};T.prototype.register=function(a){a=a.video;var b=a.element;if("video"==b.querySelector("video, iframe").tagName.toLowerCase())var c=!0;else c=J(this.j.win,"platform"),c=c.isIos()||c.isSafari()?!!{"amp-dailymotion":!0,"amp-ima-video":!0}[b.tagName.toLowerCase()]:!0;c&&(this.l.push(a),P(b,"pause",this.J),P(b,"playing",this.J),P(b,"ended",this.J),a.signals().whenSignal("user-interacted").then(this.J),eb(this))};
      function hb(a){function b(){a.I=null}var c=a.j.getRootNode();a.m.push(P(c,"webkitfullscreenchange",b),P(c,"mozfullscreenchange",b),P(c,"fullscreenchange",b),P(c,"MSFullscreenChange",b))}T.prototype.isInLandscape=function(){var a=this.j.win;return a.screen&&"orientation"in a.screen?D(a.screen.orientation.type,"landscape"):90==Math.abs(a.orientation)};
      function gb(a){var b=a.j.win,c=b.screen;if(c&&"orientation"in c){var d=c.orientation;a.m.push(P(d,"change",function(){return ib(a)}))}a.m.push(P(b,"orientationchange",function(){return ib(a)}))}function ib(a){a.isInLandscape()?null!=a.F&&jb(a,a.F):a.I&&kb(a,a.I)}function jb(a,b){var c=J(a.j.win,"platform");a.I=b;c.isAndroid()&&c.isChrome()?b.fullscreenEnter():lb(a,b).then(function(){return b.fullscreenEnter()})}
      function kb(a,b){a.I=null;lb(a,b,"center").then(function(){return b.fullscreenExit()})}function lb(a,b,c){c=void 0===c?null:c;var d=b.element,e=K(a.j,"viewport");return mb(a).then(function(){var a=d.getIntersectionChangeEntry().boundingClientRect,b=a,l=b.top;b=b.bottom;var k=e.getSize().height,z=0<=l&&b<=k;return z?sa():e.animateScrollIntoView(d,c?c:b>k?"bottom":"top")})}function mb(a){var b=330;return J(a.j.win,"timer").promise(b)}
      function eb(a){if(a.isInLandscape())return a.F;a.F=null;var b=a.l.filter(a.qa).sort(a.pa)[0];if(b){var c=b.element.getIntersectionChangeEntry().intersectionRatio;.5<=c&&(a.F=b)}return a.F}function fb(a,b){var c=b.top+b.height/2,d=a.getSize().height/2;return Math.abs(c-d)}function V(a,b){this.P=J(a,"timer");this.K=b;this.m=null;this.R=this.ja=0}
      V.prototype.start=function(){var a=this,b=this.K.video.element;this.stop();this.m=this.m||[];nb(this)?ob(this,this.R):this.m.push(Ea(b,"loadedmetadata",function(){nb(a)&&ob(a,a.R)}));this.m.push(P(b,"ended",function(){nb(a)&&pb(a,100)}))};V.prototype.stop=function(){if(this.m){for(;0<this.m.length;)this.m.pop().call();this.R++}};
      function nb(a){var b=a.K.video,c=b.getDuration();if(!(c&&!isNaN(c)&&1<c))return!1;if(250>50*c){var d=5;a.ua("This video is too short for `video-percentage-played`. Reports may be innacurate. For best results, use videos over",d,"seconds long.",b.element)}return!0}V.prototype.ua=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];x().warn.apply(x(),["video-manager"].concat(b))};
      function ob(a,b){if(b==a.R){var c=a.K,d=a.P,e=c.video,f=function(){return ob(a,b)};if("paused"==c.getPlayingState())d.delay(f,500);else if((c=e.getDuration())&&!isNaN(c)&&1<c){var g=Oa(50*c),l=e.getCurrentTime()/c*100,k=5*Math.floor(l/5);t(k);pb(a,k);d.delay(f,g)}else d.delay(f,500)}}function pb(a,b){0>=b||a.ja==b||(a.ja=b,S(a.K,"video-percentage-played",{normalizedPercentage:b.toString()}))}
      function S(a,b,c){var d=a.video;a.getAnalyticsDetails().then(function(a){c&&Object.assign(a,c);d.element.dispatchCustomEvent(b,a)})};var qb=["<img placeholder referrerpolicy=origin>"];function W(a){a=AMP.BaseElement.call(this,a)||this;a.w=null;a.N=null;a.B=!1;a.V=!1;a.W=!1;a.h=null;a.G=null;a.da=null;a.Z=null;a.$=null;a.ca=null;a.ba=null;return a}var X=AMP.BaseElement;W.prototype=aa(X.prototype);W.prototype.constructor=W;if(da)da(W,X);else for(var Y in X)if("prototype"!=Y)if(Object.defineProperties){var rb=Object.getOwnPropertyDescriptor(X,Y);rb&&Object.defineProperty(W,Y,rb)}else W[Y]=X[Y];W.wa=X.prototype;h=W.prototype;
      h.preconnectCallback=function(a){var b=J(this.win,"preconnect"),c=this.getAmpDoc();b.url(c,sb(this));b.url(c,"https://s.ytimg.com",a);b.url(c,"https://i.ytimg.com",a)};h.isLayoutSupported=function(a){return"fixed"==a||"fixed-height"==a||"responsive"==a||"fill"==a||"flex-item"==a||"fluid"==a||"intrinsic"==a};h.renderOutsideViewport=function(){return.75};h.viewportCallback=function(a){this.element.dispatchCustomEvent("amp:video:visibility",{visible:a})};
      h.buildCallback=function(){this.w=this.element.getAttribute("data-videoid");this.N=this.element.getAttribute("data-live-channelid");tb(this);var a=new ea;this.Z=a.promise;this.$=a.resolve;!this.getPlaceholder()&&this.w&&ub(this);a=I(this.element);var b=pa(a),c=qa(b),d=c["video-manager"];d||(d=c["video-manager"]={obj:null,promise:null,resolve:null,reject:null,context:null,ctor:null});d.ctor||d.obj||(d.ctor=Va,d.context=a,d.resolve&&H(b,"video-manager"))};
      function sb(a){if(a.da)return a.da;tb(a);var b="";"omit"===(a.element.getAttribute("credentials")||"include")&&(b="-nocookie");b="https://www.youtube"+b+".com/embed/";var c=a.w?encodeURIComponent(a.w||"")+"?":"live_stream?channel="+(encodeURIComponent(a.N||"")+"&");c=""+b+c+"enablejsapi=1&amp=1";var d=a.element;b=ta(d);"autoplay"in b&&(delete b.autoplay,a.user().error("AMP-YOUTUBE","Use autoplay attribute instead of data-param-autoplay"));"playsinline"in b||(b.playsinline="1");var e=d.hasAttribute("autoplay");
      e&&("iv_load_policy"in b||(b.iv_load_policy="3"),b.playsinline="1");"loop"in b&&a.user().warn("AMP-YOUTUBE","Use loop attribute instead of the deprecated data-param-loop");a.V=d.hasAttribute("loop")||"loop"in b&&"1"==b.loop;a.W="playlist"in b;a.V&&(a.W?b.loop="1":"loop"in b&&delete b.loop);d=[];for(k in b){var f=b[k];if(null!=f)if(Array.isArray(f))for(var g=0;g<f.length;g++){var l=f[g];d.push(encodeURIComponent(k)+"="+encodeURIComponent(l))}else d.push(encodeURIComponent(k)+"="+encodeURIComponent(f))}var k=
      d.join("&");k&&(b=c.split("#",2),c=b[0].split("?",2),k=c[0]+(c[1]?"?"+c[1]+"&"+k:"?"+k),c=k+=b[1]?"#"+b[1]:"");return a.da=c}
      h.layoutCallback=function(){var a=this,b=za(this,sb(this));Aa(b);this.h=b;K(this.element,"video-manager").register(this);this.ca=P(this.win,"message",this.ta.bind(this));this.V&&!this.W&&(this.ba=P(this.element,"ended",function(){return a.play(!1)}));var c=this.loadPromise(this.h).then(function(){return J(a.win,"timer").promise(300)}).then(function(){a.h&&a.h.contentWindow.postMessage(JSON.stringify(C({event:"listening"})),"*");a.element.dispatchCustomEvent("load")});this.$(c);return c};
      h.unlayoutCallback=function(){this.h&&(L(this.h),this.h=null);this.ca&&this.ca();this.ba&&this.ba();var a=new ea;this.Z=a.promise;this.$=a.resolve;return!0};h.pauseCallback=function(){this.h&&this.h.contentWindow&&this.pause()};h.mutatedAttributesCallback=function(a){null!=a["data-videoid"]&&(this.w=this.element.getAttribute("data-videoid"),this.h&&Z(this,"loadVideoById",[this.w]))};
      function tb(a){var b=!(a.w&&a.N)&&(a.w||a.N);y(b,"Exactly one of data-videoid or data-live-channelid should be present for <amp-youtube> %s",a.element)}function Z(a,b,c){a.Z.then(function(){if(a.h&&a.h.contentWindow){var d=JSON.stringify(C({event:"command",func:b,args:c||""}));a.h.contentWindow.postMessage(d,"*")}})}
      h.ta=function(a){var b=this.h;if(b&&a.source==b.contentWindow&&"https://www.youtube.com"==a.origin){var c=a.data;if((a=c)&&(r(a)||D(a,"{"))&&(a=c,b=r(a)?a:wa(a),null!=b)){a=b.event;var d=b.info||{};b=this.element;var e=d.playerState;if("infoDelivery"==a&&null!=e)a={},ya(b,e.toString(),(a[1]="playing",a[2]="pause",a[0]=["ended","pause"],a));else{var f=d.muted;"infoDelivery"==a&&d&&null!=f?this.B!=f&&(this.B=f,b.dispatchCustomEvent(this.B?"muted":"unmuted")):"initialDelivery"==a?(this.G=d,b.dispatchCustomEvent("loadedmetadata")):
      "infoDelivery"==a&&void 0!==d.currentTime&&(this.G.currentTime=d.currentTime)}}}};
      function ub(a){var b=a.element,c=N(b)(qb),d=a.w;La(c,{"object-fit":"cover",visibility:"hidden"});a.propagateAttributes(["aria-label"],c);c.src="https://i.ytimg.com/vi/"+encodeURIComponent(d)+"/sddefault.jpg#404_is_fine";c.hasAttribute("aria-label")?c.setAttribute("alt","Loading video - "+c.getAttribute("aria-label")):c.setAttribute("alt","Loading video");a.applyFillContent(c);b.appendChild(c);a.loadPromise(c).then(function(){if(120==c.naturalWidth&&90==c.naturalHeight)throw Error("sddefault.jpg is not found");
      }).catch(function(){c.src="https://i.ytimg.com/vi/"+encodeURIComponent(d)+"/hqdefault.jpg";return a.loadPromise(c)}).then(function(){a.getVsync().mutate(function(){La(c,{visibility:""})})})}h.supportsPlatform=function(){return!0};h.isInteractive=function(){return!0};h.play=function(){Z(this,"playVideo")};h.pause=function(){Z(this,"pauseVideo")};h.mute=function(){Z(this,"mute")};h.unmute=function(){Z(this,"unMute")};h.showControls=function(){};h.hideControls=function(){};
      h.fullscreenEnter=function(){if(this.h){var a=this.h,b=a.requestFullscreen||a.requestFullScreen||a.webkitRequestFullscreen||a.webkitEnterFullscreen||a.msRequestFullscreen||a.mozRequestFullScreen;b&&b.call(a)}};
      h.fullscreenExit=function(){if(this.h){var a=this.h,b=a.cancelFullScreen||a.exitFullscreen||a.webkitExitFullscreen||a.webkitCancelFullScreen||a.mozCancelFullScreen||a.msExitFullscreen;b?b.call(a):(a=a.ownerDocument)&&(b=a.cancelFullScreen||a.exitFullscreen||a.webkitExitFullscreen||a.webkitCancelFullScreen||a.mozCancelFullScreen||a.msExitFullscreen)&&b.call(a)}};
      h.isFullscreen=function(){if(this.h){var a=this.h;var b=a.webkitDisplayingFullscreen;a=void 0!==b?b:(b=a.ownerDocument)?(b.fullscreenElement||b.webkitFullscreenElement||b.mozFullScreenElement||b.webkitCurrentFullScreenElement)==a:!1}else a=!1;return a};h.getMetadata=function(){};h.preimplementsMediaSessionAPI=function(){return!0};h.preimplementsAutoFullscreen=function(){return!1};h.getCurrentTime=function(){return this.G?this.G.currentTime:NaN};
      h.getDuration=function(){return this.G?this.G.duration:NaN};h.getPlayedRanges=function(){return[]};h.seekTo=function(){this.user().error("amp-youtube","`seekTo` not supported.")};(function(a){a.registerElement("amp-youtube",W)})(self.AMP);
      })});
      
      //# sourceMappingURL=amp-youtube-0.1.js.map