; (self.AMP=self.AMP||[]).push({m:0,v:"2601162341000",n:"amp-video",ev:"0.1",l:!0,f:function(t,n){!function(){function n(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=new Array(n);i=t.length?{done:!0}:{done:!1,value:t[e++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r;function e(){return r||(r=Promise.resolve(void 0))}var o=function(){var t=this;this.promise=new Promise((function(n,i){t.resolve=n,t.reject=i}))};function u(t){return new Promise((function(n){n(t())}))}function a(t,n){return(a=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,n){if(n&&("object"===c(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return t?Array.prototype.slice.call(t):[]}var l=Array.isArray;function v(t){return l(t)?t:[t]}var d=Object.prototype,p=d.hasOwnProperty,m=d.toString;function b(t){var n=Object.create(null);return t&&Object.assign(n,t),n}function y(t){return"number"==typeof t&&isFinite(t)}function g(t,n,i,r,e,o,u,a,s,c,f){return t}function w(t){return JSON.parse(t)}function j(t){return(t.ownerDocument||t).defaultView}var k,O=/(\0)|^(-)$|([\x01-\x1f\x7f]|^-?[0-9])|([\x80-\uffff0-9a-zA-Z_-]+)|[^]/g;function x(t,n,i,r,e){return e||(n?"�":r?t.slice(0,-1)+"\\"+t.slice(-1).charCodeAt(0).toString(16)+" ":"\\"+t)}function S(t){return void 0!==k?k:k=function(t){try{var n=t.ownerDocument,i=n.createElement("div"),r=n.createElement("div");return i.appendChild(r),i.querySelector(":scope div")===r}catch(t){return!1}}(t)}function q(t,n){return t.replace(/^|,/g,"$&".concat(n," "))}function E(t){g(/^[\w-]+$/.test(t))}function M(t,n){var i=t.classList,r="i-amphtml-scoped";i.add(r);var e=q(n,".".concat(r)),o=t.querySelectorAll(e);return i.remove(r),o}function _(t,n){var i=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector;return!!i&&i.call(t,n)}function P(t,n){for(var i=t.firstElementChild;i;i=i.nextElementSibling)if(n(i))return i;return null}function R(t,n){return E(n),i=t,r="> ".concat(n),S(i)?i.querySelectorAll(q(r,":scope")):M(i,r);var i,r}var A,T,I={bubbles:!0,cancelable:!0};function N(t){var n;null===(n=t.parentElement)||void 0===n||n.removeChild(t)}function Y(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(i){var r=i.nextSibling;t.insertBefore(n,r)}else z(t,n)}function z(t,n){t.insertBefore(n,t.firstChild)}function U(t,n){for(var i in n)t.setAttribute(i,n[i]);return t}function C(t){return t.parent&&t.parent!=t}function L(t,n,i,r){var e=i||{};g(t.ownerDocument);var o=r||I,u=o.bubbles,a=o.cancelable,s=new MessageEvent(n,{data:e,bubbles:u,cancelable:a});t.dispatchEvent(s)}function W(t,n){t.classList.add("i-amphtml-fill-content"),n&&t.classList.add("i-amphtml-replaced-content")}function D(t,n,r,e){for(var o,u=i(v(t),!0);!(o=u()).done;){var a=o.value,s=n.getAttribute(a);null!==s?r.setAttribute(a,s):e&&r.removeAttribute(a)}}function F(t){var n=t.ownerDocument||t;return A&&A.ownerDocument===n||(A=n.createElement("div")),V}function V(t){return function(t,n){if(g(1===n.length),g(Array.isArray(n)||(r=n,p.call(r,"raw"))),self.trustedTypes&&self.trustedTypes.createPolicy){var i=self.trustedTypes.createPolicy("static-template#createNode",{createHTML:function(t){return n[0]}});t.innerHTML=i.createHTML("ignored")}else t.innerHTML=n[0];var r,e=t.firstElementChild;return g(e),g(!e.nextElementSibling),t.removeChild(e),e}(A,t)}function $(t){var n=Object.getOwnPropertyDescriptor(t,"message");if(null!=n&&n.writable)return t;var i=t.message,r=t.stack,e=new Error(i);for(var o in t)e[o]=t[o];return e.stack=r,e}function J(t){for(var n,r=null,e="",o=i(arguments,!0);!(n=o()).done;){var u=n.value;u instanceof Error&&!r?r=$(u):(e&&(e+=" "),e+=u)}return r?e&&(r.message=e+": "+r.message):r=new Error(e),r}function B(t){var n,i;null===(n=(i=self).__AMP_REPORT_ERROR)||void 0===n||n.call(i,t)}function G(t){var n=J.apply(null,arguments);setTimeout((function(){throw B(n),n}))}function X(t){try{for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r1?n-1:0),r=1;r=0;i--){var r=t[i],e=r.target;if(!n.has(e)){n.add(e);var o=st.get(e);if(o){ct.set(e,r);for(var u=0;u0?u[0]:{inlineSize:0,blockSize:0};else{var a,s,c=i.target,f=j(c),h=ut.test(function(t,n){return t.getComputedStyle(n)||K}(f,c).writingMode),l=c,v=l.offsetHeight,d=l.offsetWidth;h?(s=d,a=v):(a=d,s=v),o={inlineSize:a,blockSize:s}}X(n,o)}}var vt=function(){function t(t){this.tp=t,this.ny=!1,this.ty=!1,this.ey=this.ey.bind(this)}var n=t.prototype;return n.updatePlaying=function(t){t!==this.ny&&(this.ny=t,t?(this.ty=!1,function(t,n,i){var r=t.ownerDocument.defaultView;if(r){var e=st.get(t);if(e||(e=[],st.set(t,e),ft(r).observe(t)),!e.some((function(t){return t.callback===i&&1===t.type}))){e.push({type:1,callback:i});var o=ct.get(t);o&&setTimeout((function(){return lt(1,i,o)}))}}}(this.tp,0,this.ey)):function(t,n){!function(t,n,i){var r=st.get(t);if(r&&(function(t,n){for(var r=[],e=0,o=0;o0&&n>0;if(i!==this.ty){this.ty=i;var r=this.tp;i||r.pause()}},t}();function dt(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function pt(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,r)}return i}function mt(t){for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(t)}catch(t){return n}}function gt(t){var n,i=b();if(!t)return i;for(;n=bt.exec(t);){var r=yt(n[1],n[1]),e=n[2]?yt(n[2].replace(/\+/g," "),n[2]):"";i[r]=e}return i}function wt(t){var n=(t||self).location;return gt(n.originalHash||n.hash)}function jt(t){var n=!1,i=null,r=t;return function(){if(!n){for(var t=arguments.length,e=new Array(t),o=0;o=0&&f<=1&&(a[c]=Math.random()2&&void 0!==arguments[2]?arguments[2]:{},r=i.needsRootBounds,e=i.rootMargin,o=i.threshold,u=C(n)&&(r||e)?n.document:void 0;return new n.IntersectionObserver(t,{threshold:o,root:u,rootMargin:e})}function Qt(t){var n,i=null===(n=Dt)||void 0===n?void 0:n.get(t);if(!i){var r=function(t){Dt||(Dt=new WeakMap,Ft=new WeakMap),g(Ft);var n=Ft.get(t);return n||(n=Kt((function(t){for(var i=new Set,r=t.length-1;r>=0;r--){var e,o=t[r].target;i.has(o)||(i.add(o),g(n),n.unobserve(o),g(Dt),null===(e=Dt.get(o))||void 0===e||e.resolve(t[r]),Dt.delete(o))}}),t,{needsRootBounds:!0}),Ft.set(t,n)),n}(j(t));g(Dt),r.observe(t),i=new o,Dt.set(t,i)}return i.promise}function tn(t,n,i,r){var e=t,o=i,u=function(t){try{return o(t)}catch(t){var n,i;throw null===(n=(i=self).__AMP_REPORT_ERROR)||void 0===n||n.call(i,t),t}},a=function(){if(void 0!==Vt)return Vt;Vt=!1;try{var t={get capture(){return Vt=!0,!1}};self.addEventListener("test-options",null,t),self.removeEventListener("test-options",null,t)}catch(t){}return Vt}(),s=!(null==r||!r.capture);return e.addEventListener(n,u,a?r:s),function(){null==e||e.removeEventListener(n,u,a?r:s),o=null,e=null,u=null}}function nn(t,n,i,r){var e={detail:i};if(Object.assign(e,r),"function"==typeof t.CustomEvent)return new t.CustomEvent(n,e);var o=t.document.createEvent("CustomEvent");return o.initCustomEvent(n,!!e.bubbles,!!e.cancelable,i),o}function rn(t,n,i,r){return tn(t,n,i,r)}function en(t,n,i,r){var e=i,o=tn(t,n,(function(t){try{e(t)}finally{e=null,o()}}),r);return o}var on=[''],un=["
"];function an(t,n,i){if(n[i])return n[i];var r=t.querySelector("style[".concat(i,"], link[").concat(i,"]"));return r?(n[i]=r,r):null}var sn=function(){function t(){this.wt=null}var n=t.prototype;return n.add=function(t){var n=this;return this.wt||(this.wt=[]),this.wt.push(t),function(){n.remove(t)}},n.remove=function(t){var n,i,r;this.wt&&(i=t,-1!=(r=(n=this.wt).indexOf(i))&&n.splice(r,1))},n.removeAll=function(){this.wt&&(this.wt.length=0)},n.fire=function(t){if(this.wt)for(var n,r=i(this.wt.slice(),!0);!(n=r()).done;)(0,n.value)(t)},n.getHandlerCount=function(){var t,n;return null!==(t=null===(n=this.wt)||void 0===n?void 0:n.length)&&void 0!==t?t:0},t}(),cn=function(){function t(){this.ky=!1,this.Sy=new sn}var n=t.prototype;return n.onSessionEnd=function(t){this.Sy.add(t)},n.beginSession=function(){this.ky=!0},n.endSession=function(){this.ky&&this.Sy.fire(),this.ky=!1},n.isSessionActive=function(){return this.ky},t}(),fn={"title":"","artist":"","album":"","artwork":[{"src":""}]},hn="registered",ln="load",vn="loadedmetadata",dn="play",pn="playing",mn="pause",bn="ended",yn="muted",gn="unmuted",wn="reloaded",jn="ad_start",kn="ad_end",On="playing_manual",xn="paused",Sn="video-play",qn="user-interacted";function En(t){t.signals().signal(qn)}var Mn="video-manager",_n=function(){function t(t){var n=this;this.ampdoc=t,this.installAutoplayStyles=jt((function(){return function(t){!function(t,n,i,r,e){var o=t.getHeadNode();!function(t,n,i,r){var e=t.__AMP_CSS_SM;e||(e=t.__AMP_CSS_SM=b());var o="amp-extension=".concat(r);if(o){var u=an(t,e,o);if(u)return"STYLE"==u.tagName&&u.textContent!==n&&(u.textContent=n),u}var a=(t.ownerDocument||t).createElement("style");a.textContent=n;a.setAttribute("amp-extension",r),Y(t,a,an(t,e,"amp-runtime")),o&&(e[o]=a)}(o,function(t,n){var i=t.__AMP_CSS_TR;return i?i(n):n}(o,".i-amphtml-video-mask{display:block;z-index:1;-webkit-appearance:none;appearance:none;background:transparent;border:none}.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-col{-ms-flex:1;flex:1;height:100%;margin-right:1px;position:relative}.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-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*/"),0,"amp-video-autoplay")}(t)}(n.ampdoc)})),this.qy=null,this.xy=null,this.Oy=null,this.Es=Xt(t.win),this.Py=$t(t.getHeadNode()),this.Ay=function(){return n.My()},this.Ry=jt((function(){return new An(n.ampdoc,n)})),this.Es.delay(this.Ay,1e3)}var n=t.prototype;return n.dispose=function(){if(this.Ry().dispose(),this.xy.disconnect(),this.xy=null,this.qy)for(var t=0;t0){var e=i/r,o=nn(this.ampdoc.win,"".concat(Mn,".").concat(n),{"time":i,"percent":e});this.Py.trigger(t.video.element,n,o,1)}},n.register=function(t){var n=this;Pt(t);var i=t;if(this.Ty(t),t.supportsPlatform()&&!this.Iy(t)){this.xy||(this.xy=Kt((function(t){return t.forEach((function(t){var i=t.isIntersecting,r=t.target;n.Cy(r).updateVisibility(i)}))}),this.ampdoc.win,{threshold:.5})),this.xy.observe(i.element),rn(i.element,wn,(function(){return r.videoLoaded()})),this.qy=this.qy||[];var r=new Rn(this,t);this.qy.push(r);var e=r.video.element;L(e,hn),function(t){t.classList.add("i-amphtml-media-component")}(e),t.signals().signal(hn),e.classList.add("i-amphtml-video-interface")}},n.Ty=function(t){i("play",(function(){return ot(t,!1)})),i("pause",(function(){return t.pause()})),i("mute",(function(){return t.mute()})),i("unmute",(function(){return t.unmute()}));var n=function(){return t.fullscreenEnter()};function i(n,i){t.registerAction(n,(function(){En(t),i()}),1)}i("fullscreenenter",n),i("fullscreen",n)},n.Iy=function(t){if(Pn(this.Oy,t))return this.Oy;for(var n=0;this.qy&&n1&&void 0!==arguments[1]?arguments[1]:null,i=t.element,r=this.Pb();return this.Ab().then((function(){return Qt(i)})).then((function(t){var o=t.boundingClientRect,u=o.bottom,a=o.top,s=r.getSize().height;if(a>=0&&u<=s)return e();var c=n||(u>s?"bottom":"top");return r.animateScrollIntoView(i,c)}))},n.Pb=function(){return Ht(this.Lr)},n.Ab=function(){return Xt(this.Lr.win).promise(330)},n.vb=function(){var t=this;if(this.isInLandscape())return Promise.resolve(this.cb);this.cb=null;var n=this.qy.filter(this.pb).map((function(t){return Qt(t.element)}));return Promise.all(n).then((function(n){var i=n.sort(t.yb)[0];return i&&i.intersectionRatio>.5?i.target.getImpl().then((function(n){return t.cb=n})):t.cb}))},n.bb=function(t,n){var i=t.boundingClientRect,r=t.intersectionRatio,e=n.boundingClientRect,o=r-n.intersectionRatio;if(Math.abs(o)>.1)return o;var u=Ht(this.Lr),a=Tn(u,i),s=Tn(u,e);return as?a-s:i.top-e.top},n.mb=function(t){return this.zy.getPlayingState(t)},t}();function Tn(t,n){var i=n.top+n.height/2,r=t.getSize().height/2;return Math.abs(i-r)}function In(t){return 10*t*5}var Nn=function(t){return!!t&&!isNaN(t)&&t>1},Yn=function(){function t(t,n){this.Es=Xt(t),this.Mb=n,this.hb=null,this.Rb=0,this.Eb=0}var n=t.prototype;return n.start=function(){var t=this,n=this.Mb.video.element;this.stop(),this.hb=this.hb||[],this.Tb()?this.Ib(this.Eb):this.hb.push(en(n,vn,(function(){t.Tb()&&t.Ib(t.Eb)}))),this.hb.push(rn(n,bn,(function(){t.Tb()&&t.Cb(100)})))},n.stop=function(){if(this.hb){for(;this.hb.length>0;)this.hb.pop()();this.Eb++}},n.Tb=function(){var t=this.Mb.video,n=t.getDuration();if(!Nn(n))return!1;if(In(n)<250){var i=Math.ceil(5);this.Yb("This video is too short for `video-percentage-played`. Reports may be inaccurate. For best results, use videos over",i,"seconds long.",t.element)}return!0},n.Yb=function(){for(var t=arguments.length,n=new Array(t),i=0;i.99)){var i=null,r=en(t,"playing",(function(){clearTimeout(i)}));i=setTimeout((function(){r(),n()}),100)}}))}(t,(function(){return n.ej(t)})),rn(t,"downgrade",(function(){return n.ej(t)})),t.changedSources=function(){n.oj(t)},this.rj.push(Cn.make(this.win,t))))},n.ej=function(t){var n=function(t){return Pt(Vn(t,(function(n){return n.src==t.currentSrc})))}(t),i=n.uj-1;i>=this.nj||(this.nj=i,this.aj(t,n.uj),this.sj())},n.cj=function(){var t=this.win.navigator.connection;return t&&t.effectiveType?t.effectiveType:"4g"},n.ij=function(){return this.tj!=this.cj()&&(this.tj=this.cj(),this.nj=Wn[this.tj]||Wn["4g"]),this.nj},n.oj=function(t){var n=this,i=h(R(t,"source"));i.forEach((function(t){if(!t.uj){var n=t.getAttribute("data-bitrate");t.uj=n?parseInt(n,10):Number.POSITIVE_INFINITY}}));var r=!1;return i.sort((function(t,i){var e=n.fj(i)-n.fj(t);return e<0&&(r=!0),e})),r&&i.forEach((function(n){t.appendChild(n)})),r},n.fj=function(t){var n=t.uj;return n>this.ij()&&(n*=-1),n},n.hj=function(t,n){return!!Vn(t,(function(t){return t.uj=0;t--){var n=this.rj[t].deref();n?n.paused&&!((i=n).hasAttribute(Dn)?"true"===i.getAttribute(Dn):$n(i)>.8)&&this.oj(n)&&n.load():this.rj.splice(t,1)}var i},t}();function Vn(t,n){return P(t,(function(t){return"SOURCE"==t.tagName&&n(t)}))}function $n(t){if(!t.duration)return 0;for(var n=0,i=0;i2?i-2:0),e=2;ea)return 1;if(uc?1:si)){var r=n.type;n.codec&&"h264"!==n.codec&&(r+="; codecs="+n.codec);var e,o,u=(e=t.ownerDocument,o={"src":n.url,type:r,"data-bitrate":n.bitrate_kbps,"i-amphtml-video-cached-source":""},U(e.createElement("source"),o));t.insertBefore(u,t.firstChild)}}))}function ri(t,n){!1===n&&t.setAttribute("noaudio","")}function ei(t,n){if(n&&n.src&&n.srclang&&!t.querySelector("track")){var i=Gn("track",{src:n.src,srclang:n.srclang,kind:"captions"}),r=Gn("amp-story-captions",{id:n.src,"style-preset":"default",layout:"container","auto-append":!0});t.setAttribute("captions-id",n.src),t.appendChild(i),t.appendChild(r)}}function oi(t,n){var i=n.win;if(function(t,n){return t===n.document.querySelector("amp-story-page:first-of-type amp-video")}(t,i)){var r=i.document.getElementById("amp-google-video-cache-response");try{var e=JSON.parse(r.textContent);if(e.sources)return Promise.resolve(e)}catch(t){}}var u=Tt(i.document,"documentInfo").get(),a=u.canonicalUrl,s=u.sourceUrl;!function(t,n){if(t.hasAttribute("src")){var i=n.document.createElement("source"),r=t.getAttribute("src");i.setAttribute("src",r);var e=t.getAttribute("type");e&&i.setAttribute("type",e),t.removeAttribute("src"),t.removeAttribute("type"),t.querySelectorAll("source").forEach(N),t.insertBefore(i,t.firstChild)}}(t,i);var c,f,l=(c=function(t){for(var n,i=h(t.querySelectorAll("source[src]")),r=0;r"],ai="amp-video",si=["aria-describedby","aria-label","aria-labelledby","controls","crossorigin","disableremoteplayback","controlsList","title"],ci={"high":2e3,"medium":720,"low":400},fi=["loop","poster","preload"],hi=si.concat(fi),li=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&a(t,n)}(o,t);var n,i,r=(n=o,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=s(n);if(i){var e=s(this).constructor;t=Reflect.construct(r,arguments,e)}else t=r.apply(this,arguments);return f(this,t)});function o(t){var n;return(n=r.call(this,t)).lj=null,n.G=!1,n.vy=fn,n.hb=[],n.vj=null,n.dj=null,n.sy=new vt(n.element),n.pj=!1,n}o.prerenderAllowed=function(t){if(t.getAttribute("poster")||t.hasAttribute("cache"))return!0;var n=h(R(t,"source"));n.push(t);for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY,o=n.win;if(Gt(o).isBot())return e();t.hasAttribute("crossorigin")||t.setAttribute("crossorigin","");var u=t.getAttribute("src"),a=null===(i=t.querySelector("source[src]"))||void 0===i?void 0:i.getAttribute("src");return u||a?(Bt(n.win).addEnabledExperiment("video-cache"),oi(t,n).then((function(n){ii(t,n.sources,r),Wt(o,"story-video-cache-apply-audio")&&ri(t,n.has_audio),ei(t,n.captions)})).catch((function(){}))):(Et().error("AMP-VIDEO","Video cache not properly configured"),e())}(this.element,this.getAmpDoc(),this.kj())},u.yj=function(){var t=this.element.getAttribute("alt"),n=this.element.hasAttribute("title"),i=this.element.hasAttribute("aria-label");!t||n||i||this.element.setAttribute("aria-label",t)},u.detachedCallback=function(){this.Oj(!1)},u.bj=function(){var t=this.element;(function(t){return!!function(t,n){return t.closest?t.closest(n):function(t,n,i){var r;for(r=t;r&&void 0!==r;r=r.parentElement)if(n(r))return r;return null}(t,(function(t){return _(t,n)}))}(t,"amp-story")})(t)&&["i-amphtml-disable-mediasession","i-amphtml-poolbound"].forEach((function(n){t.classList.add(n)}))},u.mutatedAttributesCallback=function(t){if(this.lj){var n=this.element;if(t.src&&(this.xj().assertHttpsUrl(n.getAttribute("src"),n),D(["src"],this.element,this.lj)),D(hi.filter((function(n){return void 0!==t[n]})),this.element,this.lj,!0),t.src&&L(n,wn),t.artwork||t.poster){var i=n.getAttribute("artwork"),r=n.getAttribute("poster");this.vy.artwork=[{"src":i||r||""}]}if(t.album){var e=n.getAttribute("album");this.vy.album=e||""}if(t.title){var o=n.getAttribute("title");this.vy.title=o||""}if(t.artist){var u=n.getAttribute("artist");this.vy.artist=u||""}}},u.layoutCallback=function(){var t,n=this;if(this.lj=this.lj,!this.Sj())return this.toggleFallback(!0),e();D(fi,this.element,this.lj,!0),this.qj(),this.Ej((function(){return n.Mj()})),this._j(),"prerender"==this.getAmpDoc().getVisibilityState()||"preview"==this.getAmpDoc().getVisibilityState()?(this.element.hasAttribute("preload")||this.lj.setAttribute("preload","auto"),t=this.getAmpDoc().whenFirstVisible().then((function(){return n.Pj(),Xt(n.win).promise(1).then((function(){if(!n.Rj())return n.loadPromise(n.lj)}))}))):this.Pj();var i=this.loadPromise(this.lj).then(null,(function(n){if(t)return t;throw n})).then((function(){return n.Aj()}));return"none"!==this.element.getAttribute("preload")?this.Rj()?t:i:void 0},u.Tj=function(t){var n=this;if(this.lj.error&&this.lj.error.code==MediaError.MEDIA_ERR_DECODE&&(Et().error(ai,"Decode error in ".concat(this.lj.currentSrc),this.element),!this.lj.src)){var i=0,r=P(this.lj,(function(t){return"SOURCE"==t.tagName&&(i++,t.src==n.lj.currentSrc)}));0!=i&&(N(r),t.stopImmediatePropagation(),this.lj.load(),this.play(!1))}},u.jj=function(){this.Ij().forEach((function(t){t.setAttribute("src",t.getAttribute("amp-orig-src")),t.removeAttribute("amp-orig-src")}))},u._j=function(){var t=this;Pt(this.lj);var n=h(R(this.element,"source"));if(this.element.hasAttribute("src")&&vi(this.element)){var i=this.element.getAttribute("src"),r=this.element.getAttribute("type"),e=this.Nj(i,r),o=this.element.getAttribute("amp-orig-src");e.setAttribute("amp-orig-src",o),this.element.removeAttribute("src"),this.element.removeAttribute("type"),n.unshift(e)}n.forEach((function(n){if(vi(n,t.element)){n.remove();var i=Object.keys(ci),r=n.getAttribute("type"),e=n.getAttribute("amp-orig-src"),o=t.kj();i.forEach((function(u,a){if(!(o2&&void 0!==arguments[2]?arguments[2]:{},r=this.element;this.xj().assertHttpsUrl(t,r);var e=r.ownerDocument.createElement("source");return e.setAttribute("src",t),n&&e.setAttribute("type",n),U(e,i),e},u.Ij=function(){var t=this.element,n=h(R(t,"source")),i=[];n.push(t);for(var r=0;r ".concat("video"))),this.zj(),this.gj(),this.dj&&(t=this.win,Un||(Wt(t,"flexible-bitrate")&&Bt(t).addEnabledExperiment("flexible-bitrate"),Un=new Fn(t))).manage(this.lj),this.lj.readyState>=1?this.Aj():((n=this.lj,r=new Promise((function(t){i=en(n,"loadedmetadata",t,void 0)})),r.then(i,i),r).then((function(){return o.Aj()})),this.Yj())},u.Yj=function(){var t=this,n=this.element.getAttribute("captions-id");if(n){var i=this.win.document.querySelector("amp-story-captions#".concat(String(n).replace(O,x)));if(i){var r=this.getAmpDoc();Jt(r.win).installExtensionForDoc(r,"amp-story-captions","0.1"),this.pj=!0,i.getImpl().then((function(n){n.setVideoElement&&n.setVideoElement(t.lj)}))}}},u.Aj=function(){L(this.element,ln),this.Uj()},u.pauseCallback=function(){this.lj&&this.lj.pause()},u.Oj=function(t){this.Rj()||this.sy.updatePlaying(t)},u.Sj=function(){return!!this.lj.play},u.supportsPlatform=function(){return this.Sj()},u.isInteractive=function(){return this.element.hasAttribute("controls")},u.play=function(t){ot(this.lj)},u.qj=function(){if(Gt(this.win).isAndroid()){var t=this.element;if(!t.querySelector("i-amphtml-poster")){var n=t.getAttribute("poster");if(n){var i,r=F(t)(ui);"block",i=r.style,g(!0),g(!i.display),i.display="block",it(r,{"background-image":"url(".concat(n,")"),"background-size":"cover","background-position":"center"}),r.classList.add("i-amphtml-android-poster-bug"),W(r),t.appendChild(r)}}}},u.pause=function(){this.lj.pause()},u.mute=function(){this.Rj()||(this.lj.muted=!0)},u.unmute=function(){this.Rj()||(this.lj.muted=!1)},u.Rj=function(){return this.element.classList.contains("i-amphtml-poolbound")},u.showControls=function(){this.lj.controls=!0},u.hideControls=function(){this.lj.controls=!1},u.fullscreenEnter=function(){var t,n;(n=(t=this.lj).requestFullscreen||t.requestFullScreen||t.webkitRequestFullscreen||t.webkitEnterFullscreen||t.msRequestFullscreen||t.mozRequestFullScreen)&&n.call(t)},u.fullscreenExit=function(){!function(t){var n=t.cancelFullScreen||t.exitFullscreen||t.webkitExitFullscreen||t.webkitCancelFullScreen||t.mozCancelFullScreen||t.msExitFullscreen;if(n)n.call(t);else{var i=t.ownerDocument;if(i){var r=i.cancelFullScreen||i.exitFullscreen||i.webkitExitFullscreen||i.webkitCancelFullScreen||i.mozCancelFullScreen||i.msExitFullscreen;r&&r.call(i)}}}(this.lj)},u.isFullscreen=function(){return function(t){var n=t.webkitDisplayingFullscreen;if(void 0!==n)return n;var i=t.ownerDocument;return!!i&&(i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.webkitCurrentFullScreenElement)==t}(this.lj)},u.getMetadata=function(){return this.vy},u.preimplementsMediaSessionAPI=function(){return!1},u.preimplementsAutoFullscreen=function(){return!1},u.getCurrentTime=function(){return this.lj.currentTime},u.getDuration=function(){return this.lj.duration},u.getPlayedRanges=function(){for(var t=this.lj.played,n=t.length,i=[],r=0;r