PageSourceSearch

https://clemsontigers.com/_nuxt/cSgGruz0.js

js clemsontigers.com collected 2026-10-01 11:26:29 UTC 112,358 bytes, 2 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:astra-oas-frontend":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`249be62f-8191-46f3-bf08-44001f44abdc`,e._sentryDebugIdIdentifier=`sentry-dbid-249be62f-8191-46f3-bf08-44001f44abdc`)}catch{}})();import{t as e}from"./CVGoBl_5.js";var t=e(((e,t)=>{typeof navigator==`object`&&function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(`Plyr`,r):(n=typeof globalThis<`u`?globalThis:n||self).Plyr=r()}(e,(function(){function e(e,t,n){return(t=function(e){var t=function(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return typeof t==`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var a={addCSS:!0,thumbWidth:15,watch:!0},o=function(e){return e==null?null:e.constructor},s=function(e,t){return!!(e&&t&&e instanceof t)},c=function(e){return e==null},l=function(e){return o(e)===Object},u=function(e){return o(e)===String},d=function(e){return Array.isArray(e)},f=function(e){return s(e,NodeList)},p={nullOrUndefined:c,object:l,number:function(e){return o(e)===Number&&!Number.isNaN(e)},string:u,boolean:function(e){return o(e)===Boolean},function:function(e){return o(e)===Function},array:d,nodeList:f,element:function(e){return s(e,Element)},event:function(e){return s(e,Event)},empty:function(e){return c(e)||(u(e)||d(e)||f(e))&&!e.length||l(e)&&!Object.keys(e).length}};function ee(e,t){if(1>t){var n=function(e){var t=`${e}`.match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}(t);return parseFloat(e.toFixed(n))}return Math.round(e/t)*t}var te=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),p.element(t)?this.element=t:p.string(t)&&(this.element=document.querySelector(t)),p.element(this.element)&&p.empty(this.element.rangeTouch)&&(this.config=i({},a,{},n),this.init())}return function(e,n,r){n&&t(e.prototype,n),r&&t(e,r)}(e,[{key:`init`,value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect=`none`,this.element.style.webKitUserSelect=`none`,this.element.style.touchAction=`manipulation`),this.listeners(!0),this.element.rangeTouch=this)}},{key:`destroy`,value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect=``,this.element.style.webKitUserSelect=``,this.element.style.touchAction=``),this.listeners(!1),this.element.rangeTouch=null)}},{key:`listeners`,value:function(e){var t=this,n=e?`addEventListener`:`removeEventListener`;[`touchstart`,`touchmove`,`touchend`].forEach((function(e){t.element[n](e,(function(e){return t.set(e)}),!1)}))}},{key:`get`,value:function(t){if(!e.enabled||!p.event(t))return null;var n,r=t.target,i=t.changedTouches[0],a=parseFloat(r.getAttribute(`min`))||0,o=parseFloat(r.getAttribute(`max`))||100,s=parseFloat(r.getAttribute(`step`))||1,c=r.getBoundingClientRect(),l=100/c.width*(this.config.thumbWidth/2)/100;return 0>(n=100/c.width*(i.clientX-c.left))?n=0:100<n&&(n=100),50>n?n-=(100-2*n)*l:50<n&&(n+=2*(n-50)*l),a+ee(n/100*(o-a),s)}},{key:`set`,value:function(t){e.enabled&&p.event(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),function(e,t){if(e&&t){var n=new Event(t,{bubbles:!0});e.dispatchEvent(n)}}(t.target,t.type===`touchend`?`change`:`input`))}}],[{key:`setup`,value:function(t){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},r=null;if(p.empty(t)||p.string(t)?r=Array.from(document.querySelectorAll(p.string(t)?t:`input[type="range"]`)):p.element
vendor: 5,151 bytes, line 1
1(t)?r=[t]:p.nodeList(t)?r=Array.from(t):p.array(t)&&(r=t.filter(p.element)),p.empty(r))return null;var o=i({},a,{},n);return p.string(t)&&o.watch&&new MutationObserver((function(n){Array.from(n).forEach((function(n){Array.from(n.addedNodes).forEach((function(n){p.element(n)&&function(e,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t)}(n,t)&&new e(n,o)}))}))})).observe(document.body,{childList:!0,subtree:!0}),r.map((function(t){return new e(t,n)}))}},{key:`enabled`,get:function(){return`ontouchstart`in document.documentElement}}]),e}();let m=e=>e==null?null:e.constructor,h=(e,t)=>!!(e&&t&&e instanceof t),g=e=>e==null,ne=e=>m(e)===Object,_=e=>m(e)===String,re=e=>typeof e==`function`,ie=e=>Array.isArray(e),ae=e=>h(e,NodeList),oe=e=>g(e)||(_(e)||ie(e)||ae(e))&&!e.length||ne(e)&&!Object.keys(e).length;var v={nullOrUndefined:g,object:ne,number:e=>m(e)===Number&&!Number.isNaN(e),string:_,boolean:e=>m(e)===Boolean,function:re,array:ie,weakMap:e=>h(e,WeakMap),nodeList:ae,element:e=>typeof e==`object`&&!!e&&e.nodeType===1&&typeof e.style==`object`&&typeof e.ownerDocument==`object`,textNode:e=>m(e)===Text,event:e=>h(e,Event),keyboardEvent:e=>h(e,KeyboardEvent),cue:e=>h(e,window.TextTrackCue)||h(e,window.VTTCue),track:e=>h(e,TextTrack)||!g(e)&&_(e.kind),promise:e=>h(e,Promise)&&re(e.then),url:e=>{if(h(e,window.URL))return!0;if(!_(e))return!1;let t=e;e.startsWith(`http://`)&&e.startsWith(`https://`)||(t=`http://${e}`);try{return!oe(new URL(t).hostname)}catch{return!1}},empty:oe};let se=(()=>{let e=document.createElement(`span`),t={WebkitTransition:`webkitTransitionEnd`,MozTransition:`transitionend`,OTransition:`oTransitionEnd otransitionend`,transition:`transitionend`},n=Object.keys(t).find((t=>e.style[t]!==void 0));return!!v.string(n)&&t[n]})();function ce(e,t){setTimeout((()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch{}}),t)}var y={isIE:!!window.document.documentMode,isEdge:/Edge/g.test(navigator.userAgent),isWebKit:`WebkitAppearance`in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),isIPhone:/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,isIPadOS:navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1,isIos:/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1};function le(e,t){return t.split(`.`).reduce(((e,t)=>e&&e[t]),e)}function b(e={},...t){if(!t.length)return e;let n=t.shift();return v.object(n)?(Object.keys(n).forEach((t=>{v.object(n[t])?(Object.keys(e).includes(t)||Object.assign(e,{[t]:{}}),b(e[t],n[t])):Object.assign(e,{[t]:n[t]})})),b(e,...t)):e}function ue(e,t){let n=e.length?e:[e];Array.from(n).reverse().forEach(((e,n)=>{let r=n>0?t.cloneNode(!0):t,i=e.parentNode,a=e.nextSibling;r.appendChild(e),a?i.insertBefore(r,a):i.appendChild(r)}))}function de(e,t){v.element(e)&&!v.empty(t)&&Object.entries(t).filter((([,e])=>!v.nullOrUndefined(e))).forEach((([t,n])=>e.setAttribute(t,n)))}function x(e,t,n){let r=document.createElement(e);return v.object(t)&&de(r,t),v.string(n)&&(r.innerText=n),r}function fe(e,t,n,r){v.element(t)&&t.appendChild(x(e,n,r))}function S(e){v.nodeList(e)||v.array(e)?Array.from(e).forEach(S):v.element(e)&&v.element(e.parentNode)&&e.parentNode.removeChild(e)}function C(e){if(!v.element(e))return;let{length:t}=e.childNodes;for(;t>0;)e.removeChild(e.lastChild),--t}function w(e,t){return v.element(t)&&v.element(t.parentNode)&&v.element(e)?(t.parentNode.replaceChild(e,t),e):null}function T(e,t){if(!v.string(e)||v.empty(e))return{};let n={},r=b({},t);return e.split(`,`).forEach((e=>{let t=e.trim(),i=t.replace(`.`,``),a=t.replace(/[[\]]/g,``).split(`=`),[o]=a,s=a.length>1?a[1].replace(/["']/g,``):``;switch(t.charAt(0)){case`.`:v.string(r.class)?n.class=`${r.class} ${i}`:n.class=i;break;case`#`:n.id=t.replace(`#`,``);break;case`[`:n[o]=s}})),b(r,n)}function E(e,t){if(!v.element(e))return;let n=t;v.boolean(n)||(n=!e.hidden),e.hidden=n}function D(e,t,n){if(v.nodeList(e))return Array.from(e).map((e=>D(e,t,n)));if(v.element(e)){let r=`toggle`;return n!==void 0&&(r=n?`add`:`remove`),e.classList[r](t),e.classList.contains(t)}return!1}function O(e,t){return v.element(e)&&e.classList.contains(t)}function k(e,t){let{prototype:n}=Element;return(n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function A(e){return this.elements.container.querySelectorAll(e)}function j(e){return this.elements.container.querySelector(e)}function pe(e=null,t=!1){v.element(e)&&e.focus({preventScroll:!0,focusVisible:t})}let me={"audio/ogg":`vorbis`,"audio/wav":`1`,"video/webm":`vp8, vorbis`,"video/mp4":`avc1.42E01E, mp4a.40.2`,"video/ogg":`theora`},M={audio:`canPlayType`in document.createElement(`audio`),video:`canPlayType`in document.createElement(`video`),check(e,t){let n=M[e]||t!==`html5`;return{api:n,ui:n&&M.rangeInput}},pip:!(y.isIPhone||!v.function(x(`video`).webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||x(`video`).disablePictureInPicture)),airplay:v.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:`playsInl
1ine`in document.createElement(`video`),mime(e){if(v.empty(e))return!1;let[t]=e.split(`/`),n=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(me).includes(n)&&(n+=`; codecs="${me[e]}"`);try{return!!(n&&this.media.canPlayType(n).replace(/no/,``))}catch{return!1}},textTracks:`textTracks`in document.createElement(`video`),rangeInput:(()=>{let e=document.createElement(`input`);return e.type=`range`,e.type===`range`})(),touch:`ontouchstart`in document.documentElement,transitions:!1!==se,reducedMotion:`matchMedia`in window&&window.matchMedia(`(prefers-reduced-motion)`).matches},he=(()=>{let e=!1;try{let t=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener(`test`,null,t),window.removeEventListener(`test`,null,t)}catch{}return e})();function N(e,t,n,r=!1,i=!0,a=!1){if(!e||!(`addEventListener`in e)||v.empty(t)||!v.function(n))return;let o=t.split(` `),s=a;he&&(s={passive:i,capture:a}),o.forEach((t=>{this&&this.eventListeners&&r&&this.eventListeners.push({element:e,type:t,callback:n,options:s}),e[r?`addEventListener`:`removeEventListener`](t,n,s)}))}function P(e,t=``,n,r=!0,i=!1){N.call(this,e,t,n,!0,r,i)}function F(e,t=``,n,r=!0,i=!1){N.call(this,e,t,n,!1,r,i)}function ge(e,t=``,n,r=!0,i=!1){let a=(...o)=>{F(e,t,a,r,i),n.apply(this,o)};N.call(this,e,t,a,!0,r,i)}function I(e,t=``,n=!1,r={}){if(!v.element(e)||v.empty(t))return;let i=new CustomEvent(t,{bubbles:n,detail:{...r,plyr:this}});e.dispatchEvent(i)}function _e(){this&&this.eventListeners&&(this.eventListeners.forEach((e=>{let{element:t,type:n,callback:r,options:i}=e;t.removeEventListener(n,r,i)})),this.eventListeners=[])}function ve(){return new Promise((e=>this.ready?setTimeout(e,0):P.call(this,this.elements.container,`ready`,e))).then((()=>{}))}function L(e){v.promise(e)&&e.then(null,(()=>{}))}function ye(e){return v.array(e)?e.filter(((t,n)=>e.indexOf(t)===n)):e}function be(e,t){return v.array(e)&&e.length?e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)):null}function xe(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}let Se=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce(((e,[t,n])=>({...e,[t/n]:[t,n]})),{});function Ce(e){return v.array(e)||v.string(e)&&e.includes(`:`)?(v.array(e)?e:e.split(`:`)).map(Number).every(v.number):!1}function R(e){if(!v.array(e)||!e.every(v.number))return null;let[t,n]=e,r=(e,t)=>t===0?e:r(t,e%t),i=r(t,n);return[t/i,n/i]}function we(e){let t=e=>Ce(e)?e.split(`:`).map(Number):null,n=t(e);if(n===null&&(n=t(this.config.ratio)),n===null&&!v.empty(this.embed)&&v.array(this.embed.ratio)&&({ratio:n}=this.embed),n===null&&this.isHTML5){let{videoWidth:e,videoHeight:t}=this.media;n=[e,t]}return R(n)}function z(e){if(!this.isVideo)return{};let{wrapper:t}=this.elements,n=we.call(this,e);if(!v.array(n))return{};let[r,i]=R(n),a=100/r*i;
vendor: 32,712 bytes, lines 1-2
1if(xe(`aspect-ratio: ${r}/${i}`)?t.style.aspectRatio=`${r}/${i}`:t.style.paddingBottom=`${a}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){let e=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),n=(e-a)/(e/50);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform=`translateY(-${n}%)`}else this.isHTML5&&t.classList.add(this.config.classNames.videoFixedRatio);return{padding:a,ratio:n}}function Te(e,t,n=.05){let r=e/t,i=be(Object.keys(Se),r);return Math.abs(i-r)<=n?Se[i]:[e,t]}let B={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll(`source`)).filter((e=>{let t=e.getAttribute(`type`);return!!v.empty(t)||M.mime.call(this,t)})):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:B.getSources.call(this).map((e=>Number(e.getAttribute(`size`)))).filter(Boolean)},setup(){if(!this.isHTML5)return;let e=this;e.options.speed=e.config.speed.options,v.empty(this.config.ratio)||z.call(e),Object.defineProperty(e.media,"quality",{get(){let t=B.getSources.call(e).find((t=>t.getAttribute(`src`)===e.source));return t&&Number(t.getAttribute(`size`))},set(t){if(e.quality!==t){if(e.config.quality.forced&&v.function(e.config.quality.onChange))e.config.quality.onChange(t);else{let n=B.getSources.call(e).find((e=>Number(e.getAttribute(`size`))===t));if(!n)return;let{currentTime:r,paused:i,preload:a,readyState:o,playbackRate:s}=e.media;e.media.src=n.getAttribute(`src`),(a!==`none`||o)&&(e.once(`loadedmetadata`,(()=>{e.speed=s,e.currentTime=r,i||L(e.play())})),e.media.load())}I.call(e,e.media,`qualitychange`,!1,{quality:t})}}})},cancelRequests(){this.isHTML5&&(S(B.getSources.call(this)),this.media.setAttribute(`src`,this.config.blankVideo),this.media.load(),this.debug.log(`Cancelled network requests`))}};function Ee(e,...t){return v.empty(e)?e:e.toString().replace(/{(\d+)}/g,((e,n)=>t[n].toString()))}let V=(e=``,t=``,n=``)=>e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,`\\$1`),`g`),n.toString()),De=(e=``)=>e.toString().replace(/\w\S*/g,(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()));function Oe(e=``){let t=e.toString();return t=function(e=``){let t=e.toString();return t=V(t,`-`,` `),t=V(t,`_`,` `),t=De(t),V(t,` `,``)}(t),t.charAt(0).toLowerCase()+t.slice(1)}function ke(e){let t=document.createElement(`div`);return t.appendChild(e),t.innerHTML}let Ae={pip:`PIP`,airplay:`AirPlay`,html5:`HTML5`,vimeo:`Vimeo`,youtube:`YouTube`},H={get(e=``,t={}){if(v.empty(e)||v.empty(t))return``;let n=le(t.i18n,e);if(v.empty(n))return Object.keys(Ae).includes(e)?Ae[e]:``;let r={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(r).forEach((([e,t])=>{n=V(n,e,t)})),n}};class U{constructor(t){e(this,`get`,(e=>{if(!U.supported||!this.enabled)return null;let t=window.localStorage.getItem(this.key);if(v.empty(t))return null;let n=JSON.parse(t);return v.string(e)&&e.length?n[e]:n})),e(this,`set`,(e=>{if(!U.supported||!this.enabled||!v.object(e))return;let t=this.get();v.empty(t)&&(t={}),b(t,e);try{window.localStorage.setItem(this.key,JSON.stringify(t))}catch{}})),this.enabled=t.config.storage.enabled,this.key=t.config.storage.key}static get supported(){try{if(!(`localStorage`in window))return!1;let e=`___test`;return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}}function W(e,t=`text`){return new Promise(((n,r)=>{try{let r=new XMLHttpRequest;if(!(`withCredentials`in r))return;r.addEventListener(`load`,(()=>{if(t===`text`)try{n(JSON.parse(r.responseText))}catch{n(r.responseText)}else n(r.response)})),r.addEventListener(`error`,(()=>{throw Error(r.status)})),r.open(`GET`,e,!0),r.responseType=t,r.send()}catch(e){r(e)}}))}function je(e,t){if(!v.string(e))return;let n=`cache`,r=v.string(t),i=!1,a=()=>document.getElementById(t)!==null,o=(e,t)=>{e.innerHTML=t,r&&a()||document.body.insertAdjacentElement(`afterbegin`,e)};if(!r||!a()){let a=U.supported,s=document.createElement(`div`);if(s.setAttribute(`hidden`,``),r&&s.setAttribute(`id`,t),a){let e=window.localStorage.getItem(`${n}-${t}`);i=e!==null,i&&o(s,JSON.parse(e).content)}W(e).then((e=>{if(!v.empty(e)){if(a)try{window.localStorage.setItem(`${n}-${t}`,JSON.stringify({content:e}))}catch{}o(s,e)}})).catch((()=>{}))}}let Me=e=>Math.trunc(e/60/60%60,10),Ne=e=>Math.trunc(e/60%60,10),Pe=e=>Math.trunc(e%60,10);function G(e=0,t=!1,n=!1){if(!v.number(e))return G(void 0,t,n);let r=e=>`0${e}`.slice(-2),i=Me(e),a=Ne(e),o=Pe(e);return i=t||i>0?`${i}:`:``,`${n&&e>0?`-`:``}${i}${r(a)}:${r(o)}`}let K={getIconUrl(){let e=new URL(this.config.iconUrl,window.location),t=window.location.host?window.location.host:window.top.location.host,n=e.host!==t||y.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:n}},findElements(){try{return this.elements.controls=j.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:A.call(this,this.config.selectors.buttons.play),pause:j.call(this,this.config.selectors.buttons.pause),restart:j.call(this,this.config.selectors.buttons.restart),rewind:j.call(this,this.config.selectors.buttons.rewind),fastForward:j.call(this,this.config.selectors.buttons.fastForward),mute:j.call(this,this.config.selectors.buttons.mute),pip:j.call(this,this.config.selectors.buttons.pip),airplay:j.call(this,this.config.selectors.buttons.airplay),settings:j.call(this,this.config.selectors.buttons.settings),captions:j.call(this,this.config.selectors.buttons.captions),fullscreen:j.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=j.call(this,this.config.selectors.progress),this.elements.inputs={seek:j.call(this,this.config.selectors.inputs.seek),volume:j.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:j.call(this,this.config.selectors.display.buffer),currentTime:j.call(this,this.config.selectors.display.currentTime),duration:j.call(this,this.config.selectors.display.duration)},v.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn(`It looks like there is a problem with your custom controls HTML`,e),this.toggleNativeControls(!0),!1}},createIcon(e,t){let n=`http://www.w3.org/2000/svg`,r=K.getIconUrl.call(this),i=`${r.cors?``:r.url}#${this.config.iconPrefix}`,a=document.createElementNS(n,`svg`);de(a,b(t,{"aria-hidden":`true`,focusable:`false`}));let o=document.createElementNS(n,`use`),s=`${i}-${e}`;return`href`in o&&o.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,s),o.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,s),a.appendChild(o),a},createLabel(e,t={}){let n=H.get(e,this.config);return x(`span`,{...t,class:[t.class,this.config.classNames.hidden].filter(Boolean).join(` `)},n)},createBadge(e){if(v.empty(e))return null;let t=x(`span`,{class:this.config.classNames.menu.value});return t.appendChild(x(`span`,{class:this.config.classNames.menu.badge},e)),t},createButton(e,t){let n=b({},t),r=Oe(e),i={element:`button`,toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch([`element`,`icon`,`label`].forEach((e=>{Object.keys(n).includes(e)&&(i[e]=n[e],delete n[e])})),i.element!==`button`||Object.keys(n).includes(`type`)||(n.type=`button`),Object.keys(n).includes(`class`)?n.class.split(` `).some((e=>e===this.config.classNames.control))||b(n,{class:`${n.class} ${this.config.classNames.control}`}):n.class=this.config.classNames.control,e){case`play`:i.toggle=!0,i.label=`play`,i.labelPressed=`pause`,i.icon=`play`,i.iconPressed=`pause`;break;case`mute`:i.toggle=!0,i.label=`mute`,i.labelPressed=`unmute`,i.icon=`volume`,i.iconPressed=`muted`;break;case`captions`:i.toggle=!0,i.label=`enableCaptions`,i.labelPressed=`disableCaptions`,i.icon=`captions-off`,i.iconPressed=`captions-on`;break;case`fullscreen`:i.toggle=!0,i.label=`enterFullscreen`,i.labelPressed=`exitFullscreen`,i.icon=`enter-fullscreen`,i.iconPressed=`exit-fullscreen`;break;case`play-large`:n.class+=` ${this.config.classNames.control}--overlaid`,r=`play`,i.label=`play`,i.icon=`play`;break;default:v.empty(i.label)&&(i.label=r),v.empty(i.icon)&&(i.icon=e)}let a=x(i.element);return i.toggle?(a.appendChild(K.createIcon.call(this,i.iconPressed,{class:`icon--pressed`})),a.appendChild(K.createIcon.call(this,i.icon,{class:`icon--not-pressed`})),a.appendChild(K.createLabel.call(this,i.labelPressed,{class:`label--pressed`})),a.appendChild(K.createLabel.call(this,i.label,{class:`label--not-pressed`}))):(a.appendChild(K.createIcon.call(this,i.icon)),a.appendChild(K.createLabel.call(this,i.label))),b(n,T(this.config.selectors.buttons[r],n)),de(a,n),r===`play`?(v.array(this.elements.buttons[r])||(this.elements.buttons[r]=[]),this.elements.buttons[r].push(a)):this.elements.buttons[r]=a,a},createRange(e,t){let n=x(`input`,b(T(this.config.selectors.inputs[e]),{type:`range`,min:0,max:100,step:.01,value:0,autocomplete:`off`,role:`slider`,"aria-label":H.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=n,K.updateRangeFill.call(this,n),te.setup(n),n},createProgress(e,t){let n=x(`progress`,b(T(this.config.selectors.display[e]),{min:0,max:100,value:0,role:`progressbar`,"aria-hidden":!0},t));if(e!==`volume`){n.appendChild(x(`span`,null,`0`));let t={played:`played`,buffer:`buffered`}[e];n.innerText=`% ${(t?H.get(t,this.config):``).toLowerCase()}`}return this.elements.display[e]=n,n},createTime(e,t){let n=T(this.config.selectors.display[e],t),r=x(`div`,b(n,{class:`${n.class?n.class:``} ${this.config.classNames.display.time} `.trim(),"aria-label":H.get(e,this.config),role:`timer`}),`00:00`);return this.elements.display[e]=r,r},bindMenuItemShortcuts(e,t){P.call(this,e,`keydown keyup`,(n=>{if(![` `,`ArrowUp`,`ArrowDown`,`ArrowRight`].includes(n.key)||(n.preventDefault(),n.stopPropagation(),n.type===`keydown`))return;let r=k(e,`[role="menuitemradio"]`);if(!r&&[` `,`ArrowRight`].includes(n.key))K.showMenuPanel.call(this,t,!0);else{let t;n.key!==` `&&(n.key===`ArrowDown`||r&&n.key===`ArrowRight`?(t=e.nextElementSibling,v.element(t)||(t=e.parentNode.firstElementChild)):(t=e.previousElementSibling,v.element(t)||(t=e.parentNode.lastElementChild)),pe.call(this,t,!0))}}),!1),P.call(this,e,`keyup`,(e=>{e.key===`Return`&&K.focusFirstMenuItem.call(this,null,!0)}))},createMenuItem({value:e,list:t,type:n,title:r,badge:i=null,checked:a=!1}){let o=T(this.config.selectors.inputs[n]),s=x(`button`,b(o,{type:`button`,role:`menuitemradio`,class:`${this.config.classNames.control} ${o.class?o.class:``}`.trim(),"aria-checked":a,value:e})),c=x(`span`);c.innerHTML=r,v.element(i)&&c.appendChild(i),s.appendChild(c),Object.defineProperty(s,"checked",{enumerable:!0,get:()=>s.getAttribute(`aria-checked`)===`true`,set(e){e&&Array.from(s.parentNode.children).filter((e=>k(e,`[role="menuitemradio"]`))).forEach((e=>e.setAttribute(`aria-checked`,`false`))),s.setAttribute(`aria-checked`,e?`true`:`false`)}}),this.listeners.bind(s,`click keyup`,(t=>{if(!v.keyboardEvent(t)||t.key===` `){switch(t.preventDefault(),t.stopPropagation(),s.checked=!0,n){case`language`:this.currentTrack=Number(e);break;case`quality`:this.quality=e;break;case`speed`:this.speed=parseFloat(e)}K.showMenuPanel.call(this,`home`,v.keyboardEvent(t))}}),n,!1),K.bindMenuItemShortcuts.call(this,s,n),t.appendChild(s)},formatTime(e=0,t=!1){return v.number(e)?G(e,Me(this.duration)>0,t):e},updateTimeDisplay(e=null,t=0,n=!1){v.element(e)&&v.number(t)&&(e.innerText=K.formatTime(t,n))},updateVolume(){this.supported.ui&&(v.element(this.elements.inputs.volume)&&K.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),v.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(e,t=0){v.element(e)&&(e.value=t,K.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!v.event(e))return;let t=0,n=(e,t)=>{let n=v.number(t)?t:0,r=v.element(e)?e:this.elements.display.buffer;if(v.element(r)){r.value=n;let e=r.getElementsByTagName(`span`)[0];v.element(e)&&(e.childNodes[0].nodeValue=n)}};if(e)switch(e.type){case`timeupdate`:case`seeking`:case`seeked`:r=this.currentTime,i=this.duration,t=r===0||i===0||Number.isNaN(r)||Number.isNaN(i)?0:(r/i*100).toFixed(2),e.type===`timeupdate`&&K.setRange.call(this,this.elements.inputs.seek,t);break;case`playing`:case`progress`:n(this.elements.display.buffer,100*this.buffered)}var r,i},updateRangeFill(e){let t=v.event(e)?e.target:e;if(v.element(t)&&t.getAttribute(`type`)===`range`){if(k(t,this.config.selectors.inputs.seek)){t.setAttribute(`aria-valuenow`,this.currentTime);let e=K.formatTime(this.currentTime),n=K.formatTime(this.duration),r=H.get(`seekLabel`,this.config);t.setAttribute(`aria-valuetext`,r.replace(`{currentTime}`,e).replace(`{duration}`,n))}else if(k(t,this.config.selectors.inputs.volume)){let e=100*t.value;t.setAttribute(`aria-valuenow`,e),t.setAttribute(`aria-valuetext`,`${e.toFixed(1)}%`)}else t.setAttribute(`aria-valuenow`,t.value);(y.isWebKit||y.isIPadOS)&&t.style.setProperty(`--value`,t.value/t.max*100+`%`)}},updateSeekTooltip(e){var t,n;if(!this.config.tooltips.seek||!v.element(this.elements.inputs.seek)||!v.element(this.elements.display.seekTooltip)||this.duration===0)return;let r=this.elements.display.seekTooltip,i=`${this.config.classNames.tooltip}--visible`,a=e=>D(r,i,e);if(this.touch)return void a(!1);let o=0,s=this.elements.progress.getBoundingClientRect();if(v.event(e))o=100/s.width*(e.pageX-s.left);else{if(!O(r,i))return;o=parseFloat(r.style.left,10)}o<0?o=0:o>100&&(o=100);let c=this.duration/100*o;r.innerText=K.formatTime(c);let l=(t=this.config.markers)==null||(n=t.points)==null?void 0:n.find((({time:e})=>e===Math.round(c)));l&&r.insertAdjacentHTML(`afterbegin`,`${l.label}<br>`),r.style.left=`${o}%`,v.event(e)&&[`mouseenter`,`mouseleave`].includes(e.type)&&a(e.type===`mouseenter`)},timeUpdate(e){let t=!v.element(this.elements.display.duration)&&this.config.invertTime;K.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&e.type===`timeupdate`&&this.media.seeking||K.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return E(this.elements.display.currentTime,!0),void E(this.elements.progress,!0);v.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute(`aria-valuemax`,this.duration);let e=v.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&K.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&K.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&K.setMarkers.call(this),K.updateSeekTooltip.call(this)},toggleMenuButton(e,t){E(this.elements.settings.buttons[e],!t)},updateSetting(e,t,n){let r=this.elements.settings.panels[e],i=null,a=t;if(e===`captions`)i=this.currentTrack;else{if(i=v.empty(n)?this[e]:n,v.empty(i)&&(i=this.config[e].default),!v.empty(this.options[e])&&!this.options[e].includes(i))return void this.debug.warn(`Unsupported value of '${i}' for ${e}`);if(!this.config[e].options.includes(i))return void this.debug.warn(`Disabled value of '${i}' for ${e}`)}if(v.element(a)||(a=r&&r.querySelector(`[role="menu"]`)),!v.element(a))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=K.getLabel.call(this,e,i);let o=a&&a.querySelector(`[value="${i}"]`);v.element(o)&&(o.checked=!0)},getLabel(e,t){switch(e){case`speed`:return t===1?H.get(`normal`,this.config):`${t}&times;`;case`quality`:if(v.number(t)){let e=H.get(`qualityLabel.${t}`,this.config);return e.length?e:`${t}p`}return De(t);case`captions`:return q.getLabel.call(this);default:return null}},setQualityMenu(e){if(!v.element(this.elements.settings.panels.quality))return;let t=`quality`,n=this.elements.settings.panels.quality.querySelector(`[role="menu"]`);v.array(e)&&(this.options.quality=ye(e).filter((e=>this.config.quality.options.includes(e))));let r=!v.empty(this.options.quality)&&this.options.quality.length>1;if(K.toggleMenuButton.call(this,t,r),C(n),K.checkMenu.call(this),!r)return;let i=e=>{let t=H.get(`qualityBadge.${e}`,this.config);return t.length?K.createBadge.call(this,t):null};this.options.quality.sort(((e,t)=>{let n=this.config.quality.options;return n.indexOf(e)>n.indexOf(t)?1:-1})).forEach((e=>{K.createMenuItem.call(this,{value:e,list:n,type:t,title:K.getLabel.call(this,`quality`,e),badge:i(e)})})),K.updateSetting.call(this,t,n)},setCaptionsMenu(){if(!v.element(this.elements.settings.panels.captions))return;let e=`captions`,t=this.elements.settings.panels.captions.querySelector(`[role="menu"]`),n=q.getTracks.call(this),r=!!n.length;if(K.toggleMenuButton.call(this,e,r),C(t),K.checkMenu.call(this),!r)return;let i=n.map(((e,n)=>({value:n,checked:this.captions.toggled&&this.currentTrack===n,title:q.getLabel.call(this,e),badge:e.language&&K.createBadge.call(this,e.language.toUpperCase()),list:t,type:`language`})));i.unshift({value:-1,checked:!this.captions.toggled,title:H.get(`disabled`,this.config),list:t,type:`language`}),i.forEach(K.createMenuItem.bind(this)),K.updateSetting.call(this,e,t)},setSpeedMenu(){if(!v.element(this.elements.settings.panels.speed))return;let e=`speed`,t=this.elements.settings.panels.speed.querySelector(`[role="menu"]`);this.options.speed=this.options.speed.filter((e=>e>=this.minimumSpeed&&e<=this.maximumSpeed));let n=!v.empty(this.options.speed)&&this.options.speed.length>1;K.toggleMenuButton.call(this,e,n),C(t),K.checkMenu.call(this),n&&(this.options.speed.forEach((n=>{K.createMenuItem.call(this,{value:n,list:t,type:e,title:K.getLabel.call(this,`speed`,n)})})),K.updateSetting.call(this,e,t))},checkMenu(){let{buttons:e}=this.elements.settings,t=!v.empty(e)&&Object.values(e).some((e=>!e.hidden));E(this.elements.settings.menu,!t)},focusFirstMenuItem(e,t=!1){if(this.elements.settings.popup.hidden)return;let n=e;v.element(n)||(n=Object.values(this.elements.settings.panels).find((e=>!e.hidden)));let r=n.querySelector(`[role^="menuitem"]`);pe.call(this,r,t)},toggleMenu(e){let{popup:t}=this.elements.settings,n=this.elements.buttons.settings;if(!v.element(t)||!v.element(n))return;let{hidden:r}=t,i=r;if(v.boolean(e))i=e;else if(v.keyboardEvent(e)&&e.key===`Escape`)i=!1;else if(v.event(e)){let r=v.function(e.composedPath)?e.composedPath()[0]:e.target,a=t.contains(r);if(a||!a&&e.target!==n&&i)return}n.setAttribute(`aria-expanded`,i),E(t,!i),D(this.elements.container,this.config.classNames.menu.open,i),i&&v.keyboardEvent(e)?K.focusFirstMenuItem.call(this,null,!0):i||r||pe.call(this,n,v.keyboardEvent(e))},getMenuSize(e){let t=e.cloneNode(!0);t.style.position=`absolute`,t.style.opacity=0,t.removeAttribute(`hidden`),e.parentNode.appendChild(t);let n=t.scrollWidth,r=t.scrollHeight;return S(t),{width:n,height:r}},showMenuPanel(e=``,t=!1){let n=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!v.element(n))return;let r=n.parentNode,i=Array.from(r.children).find((e=>!e.hidden));if(M.transitions&&!M.reducedMotion){r.style.width=`${i.scrollWidth}px`,r.style.height=`${i.scrollHeight}px`;let e=K.getMenuSize.call(this,n),t=e=>{e.target===r&&[`width`,`height`].includes(e.propertyName)&&(r.style.width=``,r.style.height=``,F.call(this,r,se,t))};P.call(this,r,se,t),r.style.width=`${e.width}px`,r.style.height=`${e.height}px`}E(i,!0),E(n,!1),K.focusFirstMenuItem.call(this,n,t)},setDownloadUrl(){let e=this.elements.buttons.download;v.element(e)&&e.setAttribute(`href`,this.download)},create(e){let{bindMenuItemShortcuts:t,createButton:n,createProgress:r,createRange:i,createTime:a,setQualityMenu:o,setSpeedMenu:s,showMenuPanel:c}=K;this.elements.controls=null,v.array(this.config.controls)&&this.config.controls.includes(`play-large`)&&this.elements.container.appendChild(n.call(this,`play-large`));let l=x(`div`,T(this.config.selectors.controls.wrapper));this.elements.controls=l;let u={class:`plyr__controls__item`};return ye(v.array(this.config.controls)?this.config.controls:[]).forEach((o=>{if(o===`restart`&&l.appendChild(n.call(this,`restart`,u)),o===`rewind`&&l.appendChild(n.call(this,`rewind`,u)),o===`play`&&l.appendChild(n.call(this,`play`,u)),o===`fast-forward`&&l.appendChild(n.call(this,`fast-forward`,u)),o===`progress`){let t=x(`div`,{class:`${u.class} plyr__progress__container`}),n=x(`div`,T(this.config.selectors.progress));if(n.appendChild(i.call(this,`seek`,{id:`plyr-seek-${e.id}`})),n.appendChild(r.call(this,`buffer`)),this.config.tooltips.seek){let e=x(`span`,{class:this.config.classNames.tooltip},`00:00`);n.appendChild(e),this.elements.display.seekTooltip=e}this.elements.progress=n,t.appendChild(this.elements.progress),l.appendChild(t)}if(o===`current-time`&&l.appendChild(a.call(this,`currentTime`,u)),o===`duration`&&l.appendChild(a.call(this,`duration`,u)),o===`mute`||o===`volume`){let{volume:t}=this.elements;if(v.element(t)&&l.contains(t)||(t=x(`div`,b({},u,{class:`${u.class} plyr__volume`.trim()})),this.elements.volume=t,l.appendChild(t)),o===`mute`&&t.appendChild(n.call(this,`mute`)),o===`volume`&&!y.isIos&&!y.isIPadOS){let n={max:1,step:.05,value:this.config.volume};t.appendChild(i.call(this,`volume`,b(n,{id:`plyr-volume-${e.id}`})))}}if(o===`captions`&&l.appendChild(n.call(this,`captions`,u)),o===`settings`&&!v.empty(this.config.settings)){let r=x(`div`,b({},u,{class:`${u.class} plyr__menu`.trim(),hidden:``}));r.appendChild(n.call(this,`settings`,{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));let i=x(`div`,{class:`plyr__menu__container`,id:`plyr-settings-${e.id}`,hidden:``}),a=x(`div`),o=x(`div`,{id:`plyr-settings-${e.id}-home`}),s=x(`div`,{role:`menu`});o.appendChild(s),a.appendChild(o),this.elements.settings.panels.home=o,this.config.settings.forEach((n=>{let r=x(`button`,b(T(this.config.selectors.buttons.settings),{type:`button`,class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:`menuitem`,"aria-haspopup":!0,hidden:``}));t.call(this,r,n),P.call(this,r,`click`,(()=>{c.call(this,n,!1)}));let i=x(`span`,null,H.get(n,this.config)),o=x(`span`,{class:this.config.classNames.menu.value});o.innerHTML=e[n],i.appendChild(o),r.appendChild(i),s.appendChild(r);let l=x(`div`,{id:`plyr-settings-${e.id}-${n}`,hidden:``}),u=x(`button`,{type:`button`,class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});u.appendChild(x(`span`,{"aria-hidden":!0},H.get(n,this.config))),u.appendChild(x(`span`,{class:this.config.classNames.hidden},H.get(`menuBack`,this.config))),P.call(this,l,`keydown`,(e=>{e.key===`ArrowLeft`&&(e.preventDefault(),e.stopPropagation(),c.call(this,`home`,!0))}),!1),P.call(this,u,`click`,(()=>{c.call(this,`home`,!1)})),l.appendChild(u),l.appendChild(x(`div`,{role:`menu`})),a.appendChild(l),this.elements.settings.buttons[n]=r,this.elements.settings.panels[n]=l})),i.appendChild(a),r.appendChild(i),l.appendChild(r),this.elements.settings.popup=i,this.elements.settings.menu=r}if(o===`pip`&&M.pip&&l.appendChild(n.call(this,`pip`,u)),o===`airplay`&&M.airplay&&l.appendChild(n.call(this,`airplay`,u)),o===`download`){let e=b({},u,{element:`a`,href:this.download,target:`_blank`});this.isHTML5&&(e.download=``);let{download:t}=this.config.urls;!v.url(t)&&this.isEmbed&&b(e,{icon:`logo-${this.provider}`,label:this.provider}),l.appendChild(n.call(this,`download`,e))}o===`fullscreen`&&l.appendChild(n.call(this,`fullscreen`,u))})),this.isHTML5&&o.call(this,B.getQualityOptions.call(this)),s.call(this),l},inject(){if(this.config.loadSprite){let e=K.getIconUrl.call(this);e.cors&&je(e.url,`sprite-plyr`)}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;let t={id:this.id,seektime:this.config.seekTime,title:this.config.title},n=!0;v.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,t)),this.config.controls||(this.config.controls=[]),v.element(this.config.controls)||v.string(this.config.controls)?e=this.config.controls:(e=K.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:q.getLabel.call(this)}),n=!1);let r;if(n&&v.string(this.config.controls)&&(e=(e=>{let n=e;return Object.entries(t).forEach((([e,t])=>{n=V(n,`{${e}}`,t)})),n})(e)),v.string(this.config.selectors.controls.container)&&(r=document.querySelector(this.config.selectors.controls.container)),v.element(r)||(r=this.elements.container),r[v.element(e)?`insertAdjacentElement`:`insertAdjacentHTML`](`afterbegin`,e),v.element(this.elements.controls)||K.findElements.call(this),!v.empty(this.elements.buttons)){let e=e=>{let t=this.config.classNames.controlPressed;e.setAttribute(`aria-pressed`,`false`),Object.defineProperty(e,"pressed",{configurable:!0,enumerable:!0,get:()=>O(e,t),set(n=!1){D(e,t,n),e.setAttribute(`aria-pressed`,n?`true`:`false`)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((t=>{v.array(t)||v.nodeList(t)?Array.from(t).filter(Boolean).forEach(e):e(t)}))}if(y.isEdge&&ce(r),this.config.tooltips.controls){let{classNames:e,selectors:t}=this.config,n=`${t.controls.wrapper} ${t.labels} .${e.hidden}`,r=A.call(this,n);Array.from(r).forEach((e=>{D(e,this.config.classNames.hidden,!1),D(e,this.config.classNames.tooltip,!0)}))}},setMediaMetadata(){try{`mediaSession`in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch{}},setMarkers(){var e,t;if(!this.duration||this.elements.markers)return;let n=(e=this.config.markers)==null||(t=e.points)==null?void 0:t.filter((({time:e})=>e>0&&e<this.duration));if(n==null||!n.length)return;let r=document.createDocumentFragment(),i=document.createDocumentFragment(),a=null,o=`${this.config.classNames.tooltip}--visible`,s=e=>D(a,o,e);n.forEach((e=>{let t=x(`span`,{class:this.config.classNames.marker},``),n=e.time/this.duration*100+`%`;a&&(t.addEventListener(`mouseenter`,(()=>{e.label||(a.style.left=n,a.innerHTML=e.label,s(!0))})),t.addEventListener(`mouseleave`,(()=>{s(!1)}))),t.addEventListener(`click`,(()=>{this.currentTime=e.time})),t.style.left=n,i.appendChild(t)})),r.appendChild(i),this.config.tooltips.seek||(a=x(`span`,{class:this.config.classNames.tooltip},``),r.appendChild(a)),this.elements.markers={points:i,tip:a},this.elements.progress.appendChild(r)}};function Fe(e,t=!0){let n=e;if(t){let e=document.createElement(`a`);e.href=n,n=e.href}try{return new URL(n)}catch{return null}}function Ie(e){let t=new URLSearchParams;return v.object(e)&&Object.entries(e).forEach((([e,n])=>{t.set(e,n)})),t}let q={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!M.textTracks)return void(v.array(this.config.controls)&&this.config.controls.includes(`settings`)&&this.config.settings.includes(`captions`)&&K.setCaptionsMenu.call(this));var e,t;if(v.element(this.elements.captions)||(this.elements.captions=x(`div`,T(this.config.selectors.captions)),this.elements.captions.setAttribute(`dir`,`auto`),e=this.elements.captions,t=this.elements.wrapper,v.element(e)&&v.element(t)&&t.parentNode.insertBefore(e,t.nextSibling)),y.isIE&&window.URL){let e=this.media.querySelectorAll(`track`);Array.from(e).forEach((e=>{let t=e.getAttribute(`src`),n=Fe(t);n!==null&&n.hostname!==window.location.href.hostname&&[`http:`,`https:`].includes(n.protocol)&&W(t,`blob`).then((t=>{e.setAttribute(`src`,window.URL.createObjectURL(t))})).catch((()=>{S(e)}))}))}let n=ye((navigator.languages||[navigator.language||navigator.userLanguage||`en`]).map((e=>e.split(`-`)[0]))),r=(this.storage.get(`language`)||this.config.captions.language||`auto`).toLowerCase();r===`auto`&&([r]=n);let i=this.storage.get(`captions`);if(v.boolean(i)||({active:i}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:i,language:r,languages:n}),this.isHTML5){let e=this.config.captions.update?`addtrack removetrack`:`removetrack`;P.call(this,this.media.textTracks,e,q.update.bind(this))}setTimeout(q.update.bind(this),0)},update(){let e=q.getTracks.call(this,!0),{active:t,language:n,meta:r,currentTrackNode:i}=this.captions,a=!!e.find((e=>e.language===n));this.isHTML5&&this.isVideo&&e.filter((e=>!r.get(e))).forEach((e=>{this.debug.log(`Track added`,e),r.set(e,{default:e.mode===`showing`}),e.mode===`showing`&&(e.mode=`hidden`),P.call(this,e,`cuechange`,(()=>q.updateCues.call(this)))})),(a&&this.language!==n||!e.includes(i))&&(q.setLanguage.call(this,n),q.toggle.call(this,t&&a)),this.elements&&D(this.elements.container,this.config.classNames.captions.enabled,!v.empty(e)),v.array(this.config.controls)&&this.config.controls.includes(`settings`)&&this.config.settings.includes(`captions`)&&K.setCaptionsMenu.call(this)},toggle(e,t=!0){if(!this.supported.ui)return;let{toggled:n}=this.captions,r=this.config.classNames.captions.active,i=v.nullOrUndefined(e)?!n:e;if(i!==n){if(t||(this.captions.active=i,this.storage.set({captions:i})),!this.language&&i&&!t){let e=q.getTracks.call(this),t=q.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);this.captions.language=t.language,q.set.call(this,e.indexOf(t));return}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=i),D(this.elements.container,r,i),this.captions.toggled=i,K.updateSetting.call(this,`captions`),I.call(this,this.media,i?`captionsenabled`:`captionsdisabled`)}setTimeout((()=>{i&&this.captions.toggled&&(this.captions.currentTrackNode.mode=`hidden`)}))},set(e,t=!0){let n=q.getTracks.call(this);if(e!==-1){if(v.number(e)){if(e in n){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;let r=n[e],{language:i}=r||{};this.captions.currentTrackNode=r,K.updateSetting.call(this,`captions`),t||(this.captions.language=i,this.storage.set({language:i})),this.isVimeo&&this.embed.enableTextTrack(i),I.call(this,this.media,`languagechange`)}q.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&q.updateCues.call(this)}else this.debug.warn(`Track not found`,e)}else this.debug.warn(`Invalid caption argument`,e)}else q.toggle.call(this,!1,t)},setLanguage(e,t=!0){if(!v.string(e))return void this.debug.warn(`Invalid language argument`,e);let n=e.toLowerCase();this.captions.language=n;let r=q.getTracks.call(this),i=q.findTrack.call(this,[n]);q.set.call(this,r.indexOf(i),t)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter((t=>!this.isHTML5||e||this.captions.meta.has(t))).filter((e=>[`captions`,`subtitles`].includes(e.kind)))},findTrack(e,t=!1){let n=q.getTracks.call(this),r=e=>Number((this.captions.meta.get(e)||{}).default),i=Array.from(n).sort(((e,t)=>r(t)-r(e))),a;return e.every((e=>(a=i.find((t=>t.language===e)),!a))),a||(t?i[0]:void 0)},getCurrentTrack(){return q.getTracks.call(this)[this.currentTrack]},getLabel(e){let t=e;return!v.track(t)&&M.textTracks&&this.captions.toggled&&(t=q.getCurrentTrack.call(this)),v.track(t)?v.empty(t.label)?v.empty(t.language)?H.get(`enabled`,this.config):e.language.toUpperCase():t.label:H.get(`disabled`,this.config)},updateCues(e){if(!this.supported.ui)return;if(!v.element(this.elements.captions))return void this.debug.warn(`No captions element to render to`);if(!v.nullOrUndefined(e)&&!Array.isArray(e))return void this.debug.warn(`updateCues: Invalid input`,e);let t=e;if(!t){let e=q.getCurrentTrack.call(this);t=Array.from((e||{}).activeCues||[]).map((e=>e.getCueAsHTML())).map(ke)}let n=t.map((e=>e.trim())).join(`
2`);if(n!==this.elements.captions.innerHTML){C(this.elements.captions);let e=x(`span`,T(this.config.selectors.caption));e.innerHTML=n,this.elements.captions.appendChild(e),I.call(this,this.media,`cuechange`)}}},Le={enabled:!0,title:``,debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:`plyr`,iconUrl:`https://cdn.plyr.io/3.7.8/plyr.svg`,blankVideo:`https://cdn.plyr.io/static/blank.mp4`,quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:`auto`,update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:`plyr`},controls:[`play-large`,`play`,`progress`,`current-time`,`mute`,`volume`,`captions`,`settings`,`pip`,`airplay`,`fullscreen`],settings:[`captions`,`qual
2ity`,`speed`],i18n:{restart:`Restart`,rewind:`Rewind {seektime}s`,play:`Play`,pause:`Pause`,fastForward:`Forward {seektime}s`,seek:`Seek`,seekLabel:`{currentTime} of {duration}`,played:`Played`,buffered:`Buffered`,currentTime:`Current time`,duration:`Duration`,volume:`Volume`,mute:`Mute`,unmute:`Unmute`,enableCaptions:`Enable captions`,disableCaptions:`Disable captions`,download:`Download`,enterFullscreen:`Enter fullscreen`,exitFullscreen:`Exit fullscreen`,frameTitle:`Player for {title}`,captions:`Captions`,settings:`Settings`,pip:`PIP`,menuBack:`Go back to previous menu`,speed:`Speed`,normal:`Normal`,quality:`Quality`,loop:`Loop`,start:`Start`,end:`End`,all:`All`,reset:`Reset`,disabled:`Disabled`,enabled:`Enabled`,advertisement:`Ad`,qualityBadge:{2160:`4K`,1440:`HD`,1080:`HD`,720:`HD`,576:`SD`,480:`SD`}},urls:{download:null,vimeo:{sdk:`https://player.vimeo.com/api/player.js`,iframe:`https://player.vimeo.com/video/{0}?{1}`,api:`https://vimeo.com/api/oembed.json?url={0}`},youtube:{sdk:`https://www.youtube.com/iframe_api`,api:`https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}`},googleIMA:{sdk:`https://imasdk.googleapis.com/js/sdkloader/ima3.js`}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:`ended.progress.stalled.playing.waiting.canplay.canplaythrough.loadstart.loadeddata.loadedmetadata.timeupdate.volumechange.play.pause.error.seeking.seeked.emptied.ratechange.cuechange.download.enterfullscreen.exitfullscreen.captionsenabled.captionsdisabled.languagechange.controlshidden.controlsshown.ready.statechange.qualitychange.adsloaded.adscontentpause.adscontentresume.adstarted.adsmidpoint.adscomplete.adsallcomplete.adsimpression.adsclick`.split(`.`),selectors:{editable:`input, textarea, select, [contenteditable]`,container:`.plyr`,controls:{container:null,wrapper:`.plyr__controls`},labels:`[data-plyr]`,buttons:{play:`[data-plyr="play"]`,pause:`[data-plyr="pause"]`,restart:`[data-plyr="restart"]`,rewind:`[data-plyr="rewind"]`,fastForward:`[data-plyr="fast-forward"]`,mute:`[data-plyr="mute"]`,captions:`[data-plyr="captions"]`,download:`[data-plyr="download"]`,fullscreen:`[data-plyr="fullscreen"]`,pip:`[data-plyr="pip"]`,airplay:`[data-plyr="airplay"]`,settings:`[data-plyr="settings"]`,loop:`[data-plyr="loop"]`},inputs:{seek:`[data-plyr="seek"]`,volume:`[data-plyr="volume"]`,speed:`[data-plyr="speed"]`,language:`[data-plyr="language"]`,quality:`[data-plyr="quality"]`},display:{currentTime:`.plyr__time--current`,duration:`.plyr__time--duration`,buffer:`.plyr__progress__buffer`,loop:`.plyr__progress__loop`,volume:`.plyr__volume--display`},progress:`.plyr__progress`,captions:`.plyr__captions`,caption:`.plyr__caption`},classNames:{type:`plyr--{0}`,provider:`plyr--{0}`,video:`plyr__video-wrapper`,embed:`plyr__video-embed`,videoFixedRatio:`plyr__video-wrapper--fixed-ratio`,embedContainer:`plyr__video-embed__container`,poster:`plyr__poster`,posterEnabled:`plyr__poster-enabled`,ads:`plyr__ads`,control:`plyr__control`,controlPressed:`plyr__control--pressed`,playing:`plyr--playing`,paused:`plyr--paused`,stopped:`plyr--stopped`,loading:`plyr--loading`,hover:`plyr--hover`,tooltip:`plyr__tooltip`,cues:`plyr__cues`,marker:`plyr__progress__marker`,hidden:`plyr__sr-only`,hideControls:`plyr--hide-controls`,isTouch:`plyr--is-touch`,uiSupported:`plyr--full-ui`,noTransition:`plyr--no-transition`,display:{time:`plyr__time`},menu:{value:`plyr__menu__value`,badge:`plyr__badge`,open:`plyr--menu-open`},captions:{enabled:`plyr--captions-enabled`,active:`plyr--captions-active`},fullscreen:{enabled:`plyr--fullscreen-enabled`,fallback:`plyr--fullscreen-fallback`},pip:{supported:`plyr--pip-supported`,active:`plyr--pip-active`},airplay:{supported:`plyr--airplay-supported`,active:`plyr--airplay-active`},previewThumbnails:{thumbContainer:`plyr__preview-thumb`,thumbContainerShown:`plyr__preview-thumb--is-shown`,imageContainer:`plyr__preview-thumb__image-container`,timeContainer:`plyr__preview-thumb__time-container`,scrubbingContainer:`plyr__preview-scrubbing`,scrubbingContainerShown:`plyr__preview-scrubbing--is-shown`}},attributes:{embed:{provider:`data-plyr-provider`,id:`data-plyr-embed-id`,hash:`data-plyr-embed-hash`}},ads:{enabled:!1,publisherId:``,tagUrl:``},previewThumbnails:{enabled:!1,src:``},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:``,artist:``,album:``,artwork:[]},markers:{enabled:!1,points:[]}},Re=`picture-in-picture`,J={html5:`html5`,youtube:`youtube`,vimeo:`vimeo`},ze=`video`,Be=()=>{};class Ve{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log(`Debugging enabled`)}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Be}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Be}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Be}}class Y{constructor(t){e(this,`onChange`,(()=>{if(!this.supported)return;let e=this.player.elements.buttons.fullscreen;v.element(e)&&(e.pressed=this.active);let t=this.target===this.player.media?this.target:this.player.elements.container;I.call(this.player,t,this.active?`enterfullscreen`:`exitfullscreen`,!0)})),e(this,`toggleFallback`,((e=!1)=>
vendor: 61,027 bytes, line 2
2{if(e?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=e?`hidden`:``,D(this.target,this.player.config.classNames.fullscreen.fallback,e),y.isIos){let t=document.head.querySelector(`meta[name="viewport"]`),n=`viewport-fit=cover`;t||(t=document.createElement(`meta`),t.setAttribute(`name`,`viewport`));let r=v.string(t.content)&&t.content.includes(n);e?(this.cleanupViewport=!r,r||(t.content+=`,${n}`)):this.cleanupViewport&&(t.content=t.content.split(`,`).filter((e=>e.trim()!==n)).join(`,`))}this.onChange()})),e(this,`trapFocus`,(e=>{if(y.isIos||y.isIPadOS||!this.active||e.key!==`Tab`)return;let t=document.activeElement,n=A.call(this.player,`a[href], button:not(:disabled), input:not(:disabled), [tabindex]`),[r]=n,i=n[n.length-1];t!==i||e.shiftKey?t===r&&e.shiftKey&&(i.focus(),e.preventDefault()):(r.focus(),e.preventDefault())})),e(this,`update`,(()=>{if(this.supported){let e;e=this.forceFallback?`Fallback (forced)`:Y.nativeSupported?`Native`:`Fallback`,this.player.debug.log(`${e} fullscreen enabled`)}else this.player.debug.log(`Fullscreen not supported and fallback disabled`);D(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)})),e(this,`enter`,(()=>{this.supported&&(y.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Y.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?v.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:`hide`}))})),e(this,`exit`,(()=>{if(this.supported){if(y.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),L(this.player.play());else if(!Y.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!v.empty(this.prefix)){let e=this.prefix===`moz`?`Cancel`:`Exit`;document[`${this.prefix}${e}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}})),e(this,`toggle`,(()=>{this.active?this.exit():this.enter()})),this.player=t,this.prefix=Y.prefix,this.property=Y.property,this.scrollPosition={x:0,y:0},this.forceFallback=t.config.fullscreen.fallback===`force`,this.player.elements.fullscreen=t.config.fullscreen.container&&function(e,t){let{prototype:n}=Element;return(n.closest||function(){let e=this;do{if(k.matches(e,t))return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1);return null}).call(e,t)}(this.player.elements.container,t.config.fullscreen.container),P.call(this.player,document,this.prefix===`ms`?`MSFullscreenChange`:`${this.prefix}fullscreenchange`,(()=>{this.onChange()})),P.call(this.player,this.player.elements.container,`dblclick`,(e=>{v.element(this.player.elements.controls)&&this.player.elements.controls.contains(e.target)||this.player.listeners.proxy(e,this.toggle,`fullscreen`)})),P.call(this,this.player.elements.container,`keydown`,(e=>this.trapFocus(e))),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Y.nativeSupported&&!this.forceFallback}static get prefix(){if(v.function(document.exitFullscreen))return``;let e=``;return[`webkit`,`moz`,`ms`].some((t=>!(!v.function(document[`${t}ExitFullscreen`])&&!v.function(document[`${t}CancelFullScreen`]))&&(e=t,!0))),e}static get property(){return this.prefix===`moz`?`FullScreen`:`Fullscreen`}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Y.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Y.nativeSupported||!y.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Y.nativeSupported||this.forceFallback)return O(this.target,this.player.config.classNames.fullscreen.fallback);let e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){return y.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function X(e,t=1){return new Promise(((n,r)=>{let i=new Image,a=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=t?n:r)(i)};Object.assign(i,{onload:a,onerror:a,src:e})}))}let Z={addStyleHook(){D(this.elements.container,this.config.selectors.container.replace(`.`,``),!0),D(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute(`controls`,``):this.media.removeAttribute(`controls`)},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Z.toggleNativeControls.call(this,!0);v.element(this.elements.controls)||(K.inject.call(this),this.listeners.controls()),Z.toggleNativeControls.call(this),this.isHTML5&&q.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,K.updateVolume.call(this),K.timeUpdate.call(this),K.durationUpdate.call(this),Z.checkPlaying.call(this),D(this.elements.container,this.config.classNames.pip.supported,M.pip&&this.isHTML5&&this.isVideo),D(this.elements.container,this.config.classNames.airplay.supported,M.airplay&&this.isHTML5),D(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((()=>{I.call(this,this.media,`ready`)}),0),Z.setTitle.call(this),this.poster&&Z.setPoster.call(this,this.poster,!1).catch((()=>{})),this.config.duration&&K.durationUpdate.call(this),this.config.mediaMetadata&&K.setMediaMetadata.call(this)},setTitle(){let e=H.get(`play`,this.config);if(v.string(this.config.title)&&!v.empty(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach((t=>{t.setAttribute(`aria-label`,e)})),this.isEmbed){let e=j.call(this,`iframe`);if(!v.element(e))return;let t=v.empty(this.config.title)?`video`:this.config.title,n=H.get(`frameTitle`,this.config);e.setAttribute(`title`,n.replace(`{title}`,t))}},togglePoster(e){D(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,t=!0){return t&&this.poster?Promise.reject(Error(`Poster already set`)):(this.media.setAttribute(`data-poster`,e),this.elements.poster.removeAttribute(`hidden`),ve.call(this).then((()=>X(e))).catch((t=>{throw e===this.poster&&Z.togglePoster.call(this,!1),t})).then((()=>{if(e!==this.poster)throw Error(`setPoster cancelled by later call to setPoster`)})).then((()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:``}),Z.togglePoster.call(this,!0),e))))},checkPlaying(e){D(this.elements.container,this.config.classNames.playing,this.playing),D(this.elements.container,this.config.classNames.paused,this.paused),D(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute(`aria-label`,H.get(this.playing?`pause`:`play`,this.config))})),v.event(e)&&e.type===`timeupdate`||Z.toggleControls.call(this)},checkLoading(e){this.loading=[`stalled`,`waiting`].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((()=>{D(this.elements.container,this.config.classNames.loading,this.loading),Z.toggleControls.call(this)}),this.loading?250:0)},toggleControls(e){let{controls:t}=this.elements;if(t&&this.config.hideControls){let n=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(e||this.loading||this.paused||t.pressed||t.hover||n))}},migrateStyles(){Object.values({...this.media.style}).filter((e=>!v.empty(e)&&v.string(e)&&e.startsWith(`--plyr`))).forEach((e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)})),v.empty(this.media.style)&&this.media.removeAttribute(`style`)}};class He{constructor(t){e(this,`firstTouch`,(()=>{let{player:e}=this,{elements:t}=e;e.touch=!0,D(t.container,e.config.classNames.isTouch,!0)})),e(this,`global`,((e=!0)=>{let{player:t}=this;t.config.keyboard.global&&N.call(t,window,`keydown keyup`,this.handleKey,e,!1),N.call(t,document.body,`click`,this.toggleMenu,e),ge.call(t,document.body,`touchstart`,this.firstTouch)})),e(this,`container`,(()=>{let{player:e}=this,{config:t,elements:n,timers:r}=e;!t.keyboard.global&&t.keyboard.focused&&P.call(e,n.container,`keydown keyup`,this.handleKey,!1),P.call(e,n.container,`mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen`,(t=>{let{controls:i}=n;i&&t.type===`enterfullscreen`&&(i.pressed=!1,i.hover=!1);let a=0;[`touchstart`,`touchmove`,`mousemove`].includes(t.type)&&(Z.toggleControls.call(e,!0),a=e.touch?3e3:2e3),clearTimeout(r.controls),r.controls=setTimeout((()=>Z.toggleControls.call(e,!1)),a)}));let i=()=>{if(!e.isVimeo||e.config.vimeo.premium)return;let t=n.wrapper,{active:r}=e.fullscreen,[i,a]=we.call(e),o=xe(`aspect-ratio: ${i} / ${a}`);if(!r)return void(o?(t.style.width=null,t.style.height=null):(t.style.maxWidth=null,t.style.margin=null));let[s,c]=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],l=s/c>i/a;o?(t.style.width=l?`auto`:`100%`,t.style.height=l?`100%`:`auto`):(t.style.maxWidth=l?c/a*i+`px`:null,t.style.margin=l?`0 auto`:null)},a=()=>{clearTimeout(r.resized),r.resized=setTimeout(i,50)};P.call(e,n.container,`enterfullscreen exitfullscreen`,(t=>{let{target:r}=e.fullscreen;r===n.container&&(!e.isEmbed&&v.empty(e.config.ratio)||(i(),(t.type===`enterfullscreen`?P:F).call(e,window,`resize`,a)))}))})),e(this,`media`,(()=>{let{player:e}=this,{elements:t}=e;if(P.call(e,e.media,`timeupdate seeking seeked`,(t=>K.timeUpdate.call(e,t))),P.call(e,e.media,`durationchange loadeddata loadedmetadata`,(t=>K.durationUpdate.call(e,t))),P.call(e,e.media,`ended`,(()=>{e.isHTML5&&e.isVideo&&e.config.resetOnEnd&&(e.restart(),e.pause())})),P.call(e,e.media,`progress playing seeking seeked`,(t=>K.updateProgress.call(e,t))),P.call(e,e.media,`volumechange`,(t=>K.updateVolume.call(e,t))),P.call(e,e.media,`playing play pause ended emptied timeupdate`,(t=>Z.checkPlaying.call(e,t))),P.call(e,e.media,`waiting canplay seeked playing`,(t=>Z.checkLoading.call(e,t))),e.supported.ui&&e.config.clickToPlay&&!e.isAudio){let n=j.call(e,`.${e.config.classNames.video}`);if(!v.element(n))return;P.call(e,t.container,`click`,(r=>{([t.container,n].includes(r.target)||n.contains(r.target))&&(e.touch&&e.config.hideControls||(e.ended?(this.proxy(r,e.restart,`restart`),this.proxy(r,(()=>{L(e.play())}),`play`)):this.proxy(r,(()=>{L(e.togglePlay())}),`play`)))}))}e.supported.ui&&e.config.disableContextMenu&&P.call(e,t.wrapper,`contextmenu`,(e=>{e.preventDefault()}),!1),P.call(e,e.media,`volumechange`,(()=>{e.storage.set({volume:e.volume,muted:e.muted})})),P.call(e,e.media,`ratechange`,(()=>{K.updateSetting.call(e,`speed`),e.storage.set({speed:e.speed})})),P.call(e,e.media,`qualitychange`,(t=>{K.updateSetting.call(e,`quality`,null,t.detail.quality)})),P.call(e,e.media,`ready qualitychange`,(()=>{K.setDownloadUrl.call(e)}));let n=e.config.events.concat([`keyup`,`keydown`]).join(` `);P.call(e,e.media,n,(n=>{let{detail:r={}}=n;n.type===`error`&&(r=e.media.error),I.call(e,t.container,n.type,!0,r)}))})),e(this,`proxy`,((e,t,n)=>{let{player:r}=this,i=r.config.listeners[n],a=!0;v.function(i)&&(a=i.call(r,e)),!1!==a&&v.function(t)&&t.call(r,e)})),e(this,`bind`,((e,t,n,r,i=!0)=>{let{player:a}=this,o=a.config.listeners[r],s=v.function(o);P.call(a,e,t,(e=>this.proxy(e,n,r)),i&&!s)})),e(this,`controls`,(()=>{let{player:e}=this,{elements:t}=e,n=y.isIE?`change`:`input`;if(t.buttons.play&&Array.from(t.buttons.play).forEach((t=>{this.bind(t,`click`,(()=>{L(e.togglePlay())}),`play`)})),this.bind(t.buttons.restart,`click`,e.restart,`restart`),this.bind(t.buttons.rewind,`click`,(()=>{e.lastSeekTime=Date.now(),e.rewind()}),`rewind`),this.bind(t.buttons.fastForward,`click`,(()=>{e.lastSeekTime=Date.now(),e.forward()}),`fastForward`),this.bind(t.buttons.mute,`click`,(()=>{e.muted=!e.muted}),`mute`),this.bind(t.buttons.captions,`click`,(()=>e.toggleCaptions())),this.bind(t.buttons.download,`click`,(()=>{I.call(e,e.media,`download`)}),`download`),this.bind(t.buttons.fullscreen,`click`,(()=>{e.fullscreen.toggle()}),`fullscreen`),this.bind(t.buttons.pip,`click`,(()=>{e.pip=`toggle`}),`pip`),this.bind(t.buttons.airplay,`click`,e.airplay,`airplay`),this.bind(t.buttons.settings,`click`,(t=>{t.stopPropagation(),t.preventDefault(),K.toggleMenu.call(e,t)}),null,!1),this.bind(t.buttons.settings,`keyup`,(t=>{[` `,`Enter`].includes(t.key)&&(t.key===`Enter`?K.focusFirstMenuItem.call(e,null,!0):(t.preventDefault(),t.stopPropagation(),K.toggleMenu.call(e,t)))}),null,!1),this.bind(t.settings.menu,`keydown`,(t=>{t.key===`Escape`&&K.toggleMenu.call(e,t)})),this.bind(t.inputs.seek,`mousedown mousemove`,(e=>{let n=t.progress.getBoundingClientRect(),r=100/n.width*(e.pageX-n.left);e.currentTarget.setAttribute(`seek-value`,r)})),this.bind(t.inputs.seek,`mousedown mouseup keydown keyup touchstart touchend`,(t=>{let n=t.currentTarget,r=`play-on-seeked`;if(v.keyboardEvent(t)&&![`ArrowLeft`,`ArrowRight`].includes(t.key))return;e.lastSeekTime=Date.now();let i=n.hasAttribute(r),a=[`mouseup`,`touchend`,`keyup`].includes(t.type);i&&a?(n.removeAttribute(r),L(e.play())):!a&&e.playing&&(n.setAttribute(r,``),e.pause())})),y.isIos){let t=A.call(e,`input[type="range"]`);Array.from(t).forEach((e=>this.bind(e,n,(e=>ce(e.target)))))}this.bind(t.inputs.seek,n,(t=>{let n=t.currentTarget,r=n.getAttribute(`seek-value`);v.empty(r)&&(r=n.value),n.removeAttribute(`seek-value`),e.currentTime=r/n.max*e.duration}),`seek`),this.bind(t.progress,`mouseenter mouseleave mousemove`,(t=>K.updateSeekTooltip.call(e,t))),this.bind(t.progress,`mousemove touchmove`,(t=>{let{previewThumbnails:n}=e;n&&n.loaded&&n.startMove(t)})),this.bind(t.progress,`mouseleave touchend click`,(()=>{let{previewThumbnails:t}=e;t&&t.loaded&&t.endMove(!1,!0)})),this.bind(t.progress,`mousedown touchstart`,(t=>{let{previewThumbnails:n}=e;n&&n.loaded&&n.startScrubbing(t)})),this.bind(t.progress,`mouseup touchend`,(t=>{let{previewThumbnails:n}=e;n&&n.loaded&&n.endScrubbing(t)})),y.isWebKit&&Array.from(A.call(e,`input[type="range"]`)).forEach((t=>{this.bind(t,`input`,(t=>K.updateRangeFill.call(e,t.target)))})),e.config.toggleInvert&&!v.element(t.display.duration)&&this.bind(t.display.currentTime,`click`,(()=>{e.currentTime!==0&&(e.config.invertTime=!e.config.invertTime,K.timeUpdate.call(e))})),this.bind(t.inputs.volume,n,(t=>{e.volume=t.target.value}),`volume`),this.bind(t.controls,`mouseenter mouseleave`,(n=>{t.controls.hover=!e.touch&&n.type===`mouseenter`})),t.fullscreen&&Array.from(t.fullscreen.children).filter((e=>!e.contains(t.container))).forEach((n=>{this.bind(n,`mouseenter mouseleave`,(n=>{t.controls&&(t.controls.hover=!e.touch&&n.type===`mouseenter`)}))})),this.bind(t.controls,`mousedown mouseup touchstart touchend touchcancel`,(e=>{t.controls.pressed=[`mousedown`,`touchstart`].includes(e.type)})),this.bind(t.controls,`focusin`,(()=>{let{config:n,timers:r}=e;D(t.controls,n.classNames.noTransition,!0),Z.toggleControls.call(e,!0),setTimeout((()=>{D(t.controls,n.classNames.noTransition,!1)}),0);let i=this.touch?3e3:4e3;clearTimeout(r.controls),r.controls=setTimeout((()=>Z.toggleControls.call(e,!1)),i)})),this.bind(t.inputs.volume,`wheel`,(t=>{let n=t.webkitDirectionInvertedFromDevice,[r,i]=[t.deltaX,-t.deltaY].map((e=>n?-e:e)),a=Math.sign(Math.abs(r)>Math.abs(i)?r:i);e.increaseVolume(a/50);let{volume:o}=e.media;(a===1&&o<1||a===-1&&o>0)&&t.preventDefault()}),`volume`,!1)})),this.player=t,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){let{player:t}=this,{elements:n}=t,{key:r,type:i,altKey:a,ctrlKey:o,metaKey:s,shiftKey:c}=e,l=i===`keydown`,u=l&&r===this.lastKey;if(!(a||o||s||c)&&r){if(l){let i=document.activeElement;if(v.element(i)){let{editable:r}=t.config.selectors,{seek:a}=n.inputs;if(i!==a&&k(i,r)||e.key===` `&&k(i,`button, [role^="menuitem"]`))return}switch([` `,`ArrowLeft`,`ArrowUp`,`ArrowRight`,`ArrowDown`,`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`c`,`f`,`k`,`l`,`m`].includes(r)&&(e.preventDefault(),e.stopPropagation()),r){case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:u||(d=parseInt(r,10),t.currentTime=t.duration/10*d);break;case` `:case`k`:u||L(t.togglePlay());break;case`ArrowUp`:t.increaseVolume(.1);break;case`ArrowDown`:t.decreaseVolume(.1);break;case`m`:u||(t.muted=!t.muted);break;case`ArrowRight`:t.forward();break;case`ArrowLeft`:t.rewind();break;case`f`:t.fullscreen.toggle();break;case`c`:u||t.toggleCaptions();break;case`l`:t.loop=!t.loop}r===`Escape`&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=r}else this.lastKey=null;var d}}toggleMenu(e){K.toggleMenu.call(this.player,e)}}var Ue=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){e.exports=function(){var e=function(){},t={},n={},r={};function i(e,t){e=e.push?e:[e];var i,a,o,s=[],c=e.length,l=c;for(i=function(e,n){n.length&&s.push(e),--l||t(s)};c--;)a=e[c],(o=n[a])?i(a,o):(r[a]=r[a]||[]).push(i)}function a(e,t){if(e){var i=r[e];if(n[e]=t,i)for(;i.length;)i[0](e,t),i.splice(0,1)}}function o(t,n){t.call&&(t={success:t}),n.length?(t.error||e)(n):(t.success||e)(t)}function s(t,n,r,i){var a,o,c=document,l=r.async,u=(r.numRetries||0)+1,d=r.before||e,f=t.replace(/[\?|#].*$/,``),p=t.replace(/^(css|img)!/,``);i||=0,/(^css!|\.css$)/.test(f)?((o=c.createElement(`link`)).rel=`stylesheet`,o.href=p,(a=`hideFocus`in o)&&o.relList&&(a=0,o.rel=`preload`,o.as=`style`)):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(f)?(o=c.createElement(`img`)).src=p:((o=c.createElement(`script`)).src=t,o.async=l===void 0||l),o.onload=o.onerror=o.onbeforeload=function(e){var c=e.type[0];if(a)try{o.sheet.cssText.length||(c=`e`)}catch(e){e.code!=18&&(c=`e`)}if(c==`e`){if((i+=1)<u)return s(t,n,r,i)}else if(o.rel==`preload`&&o.as==`style`)return o.rel=`stylesheet`;n(t,c,e.defaultPrevented)},!1!==d(t,o)&&c.head.appendChild(o)}function c(e,t,n){var r,i,a=(e=e.push?e:[e]).length,o=a,c=[];for(r=function(e,n,r){if(n==`e`&&c.push(e),n==`b`){if(!r)return;c.push(e)}--a||t(c)},i=0;i<o;i++)s(e[i],r,n)}function l(e,n,r){var i,s;if(n&&n.trim&&(i=n),s=(i?r:n)||{},i){if(i in t)throw`LoadJS`;t[i]=!0}function l(t,n){c(e,(function(e){o(s,e),t&&o({success:t,error:n},e),a(i,e)}),s)}if(s.returnPromise)return new Promise(l);l()}return l.ready=function(e,t){return i(e,(function(e){o(t,e)})),l},l.done=function(e){a(e,[])},l.reset=function(){t={},n={},r={}},l.isDefined=function(e){return e in t},l}()}));function We(e){return new Promise(((t,n)=>{Ue(e,{success:t,error:n})}))}function Q(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,I.call(this,this.media,e?`play`:`pause`))}let Ge={setup(){let e=this;D(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,z.call(e),v.object(window.Vimeo)?Ge.ready.call(e):We(e.config.urls.vimeo.sdk).then((()=>{Ge.ready.call(e)})).catch((t=>{e.debug.warn(`Vimeo SDK (player.js) failed to load`,t)}))},ready(){let e=this,t=e.config.vimeo,{premium:n,referrerPolicy:r,...i}=t,a=e.media.getAttribute(`src`),o=``;v.empty(a)?(a=e.media.getAttribute(e.config.attributes.embed.id),o=e.media.getAttribute(e.config.attributes.embed.hash)):o=function(e){let t=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return t&&t.length===5?t[4]:null}(a);let s=o?{h:o}:{};n&&Object.assign(i,{controls:!1,sidedock:!1});let c=Ie({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:`media`,playsinline:e.config.playsinline,...s,...i}),l=(u=a,v.empty(u)?null:v.number(Number(u))?u:u.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:u);var u;let d=x(`iframe`),f=Ee(e.config.urls.vimeo.iframe,l,c);if(d.setAttribute(`src`,f),d.setAttribute(`allowfullscreen`,``),d.setAttribute(`allow`,[`autoplay`,`fullscreen`,`picture-in-picture`,`encrypted-media`,`accelerometer`,`gyroscope`].join(`; `)),v.empty(r)||d.setAttribute(`referrerPolicy`,r),n||!t.customControls)d.setAttribute(`data-poster`,e.poster),e.media=w(d,e.media);else{let t=x(`div`,{class:e.config.classNames.embedContainer,"data-poster":e.poster});t.appendChild(d),e.media=w(t,e.media)}t.customControls||W(Ee(e.config.urls.vimeo.api,f)).then((t=>{!v.empty(t)&&t.thumbnail_url&&Z.setPoster.call(e,t.thumbnail_url).catch((()=>{}))})),e.embed=new window.Vimeo.Player(d,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(Q.call(e,!0),e.embed.play()),e.media.pause=()=>(Q.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:p}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>p,set(t){let{embed:n,media:r,paused:i,volume:a}=e,o=i&&!n.hasPlayed;r.seeking=!0,I.call(e,r,`seeking`),Promise.resolve(o&&n.setVolume(0)).then((()=>n.setCurrentTime(t))).then((()=>o&&n.pause())).then((()=>o&&n.setVolume(a))).catch((()=>{}))}});let ee=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>ee,set(t){e.embed.setPlaybackRate(t).then((()=>{ee=t,I.call(e,e.media,`ratechange`)})).catch((()=>{e.options.speed=[1]}))}});let{volume:te}=e.config;Object.defineProperty(e.media,"volume",{get:()=>te,set(t){e.embed.setVolume(t).then((()=>{te=t,I.call(e,e.media,`volumechange`)}))}});let{muted:m}=e.config;Object.defineProperty(e.media,"muted",{get:()=>m,set(t){let n=!!v.boolean(t)&&t;e.embed.setMuted(!!n||e.config.muted).then((()=>{m=n,I.call(e,e.media,`volumechange`)}))}});let h,{loop:g}=e.config;Object.defineProperty(e.media,"loop",{get:()=>g,set(t){let n=v.boolean(t)?t:e.config.loop.active;e.embed.setLoop(n).then((()=>{g=n}))}}),e.embed.getVideoUrl().then((t=>{h=t,K.setDownloadUrl.call(e)})).catch((e=>{this.debug.warn(e)})),Object.defineProperty(e.media,"currentSrc",{get:()=>h}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then((t=>{let[n,r]=t;e.embed.ratio=Te(n,r),z.call(this)})),e.embed.setAutopause(e.config.autopause).then((t=>{e.config.autopause=t})),e.embed.getVideoTitle().then((t=>{e.config.title=t,Z.setTitle.call(this)})),e.embed.getCurrentTime().then((t=>{p=t,I.call(e,e.media,`timeupdate`)})),e.embed.getDuration().then((t=>{e.media.duration=t,I.call(e,e.media,`durationchange`)})),e.embed.getTextTracks().then((t=>{e.media.textTracks=t,q.setup.call(e)})),e.embed.on(`cuechange`,(({cues:t=[]})=>{let n=t.map((e=>function(e){let t=document.createDocumentFragment(),n=document.createElement(`div`);return t.appendChild(n),n.innerHTML=e,t.firstChild.innerText}(e.text)));q.updateCues.call(e,n)})),e.embed.on(`loaded`,(()=>{e.embed.getPaused().then((t=>{Q.call(e,!t),t||I.call(e,e.media,`playing`)})),v.element(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute(`tabindex`,-1)})),e.embed.on(`bufferstart`,(()=>{I.call(e,e.media,`waiting`)})),e.embed.on(`bufferend`,(()=>{I.call(e,e.media,`playing`)})),e.embed.on(`play`,(()=>{Q.call(e,!0),I.call(e,e.media,`playing`)})),e.embed.on(`pause`,(()=>{Q.call(e,!1)})),e.embed.on(`timeupdate`,(t=>{e.media.seeking=!1,p=t.seconds,I.call(e,e.media,`timeupdate`)})),e.embed.on(`progress`,(t=>{e.media.buffered=t.percent,I.call(e,e.media,`progress`),parseInt(t.percent,10)===1&&I.call(e,e.media,`canplaythrough`),e.embed.getDuration().then((t=>{t!==e.media.duration&&(e.media.duration=t,I.call(e,e.media,`durationchange`))}))})),e.embed.on(`seeked`,(()=>{e.media.seeking=!1,I.call(e,e.media,`seeked`)})),e.embed.on(`ended`,(()=>{e.media.paused=!0,I.call(e,e.media,`ended`)})),e.embed.on(`error`,(t=>{e.media.error=t,I.call(e,e.media,`error`)})),t.customControls&&setTimeout((()=>Z.build.call(e)),0)}};function $(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,I.call(this,this.media,e?`play`:`pause`))}function Ke(e){return e.noCookie?`https://www.youtube-nocookie.com`:window.location.protocol===`http:`?`http://www.youtube.com`:void 0}let qe={setup(){if(D(this.elements.wrapper,this.config.classNames.embed,!0),v.object(window.YT)&&v.function(window.YT.Player))qe.ready.call(this);else{let e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{v.function(e)&&e(),qe.ready.call(this)},We(this.config.urls.youtube.sdk).catch((e=>{this.debug.warn(`YouTube API failed to load`,e)}))}},getTitle(e){W(Ee(this.config.urls.youtube.api,e)).then((e=>{if(v.object(e)){let{title:t,height:n,width:r}=e;this.config.title=t,Z.setTitle.call(this),this.embed.ratio=Te(r,n)}z.call(this)})).catch((()=>{z.call(this)}))},ready(){let e=this,t=e.config.youtube,n=e.media&&e.media.getAttribute(`id`);if(!v.empty(n)&&n.startsWith(`youtube-`))return;let r=e.media.getAttribute(`src`);v.empty(r)&&(r=e.media.getAttribute(this.config.attributes.embed.id));let i=(a=r,v.empty(a)?null:a.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:a);var a;if(e.media=w(x(`div`,{id:`${e.provider}-${Math.floor(1e4*Math.random())}`,"data-poster":t.customControls?e.poster:void 0}),e.media),t.customControls){let t=e=>`https://i.ytimg.com/vi/${i}/${e}default.jpg`;X(t(`maxres`),121).catch((()=>X(t(`sd`),121))).catch((()=>X(t(`hq`)))).then((t=>Z.setPoster.call(e,t.src))).then((t=>{t.includes(`maxres`)||(e.elements.poster.style.backgroundSize=`cover`)})).catch((()=>{}))}e.embed=new window.YT.Player(e.media,{videoId:i,host:Ke(t),playerVars:b({},{autoplay:+!!e.config.autoplay,hl:e.config.hl,controls:e.supported.ui&&t.customControls?0:1,disablekb:1,playsinline:e.config.playsinline&&!e.config.fullscreen.iosNative?1:0,cc_load_policy:+!!e.captions.active,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},t),events:{onError(t){if(!e.media.error){let n=t.data,r={2:`The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.`,5:`The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.`,100:`The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.`,101:`The owner of the requested video does not allow it to be played in embedded players.`,150:`The owner of the requested video does not allow it to be played in embedded players.`}[n]||`An unknown error occurred`;e.media.error={code:n,message:r},I.call(e,e.media,`error`)}},onPlaybackRateChange(t){let n=t.target;e.media.playbackRate=n.getPlaybackRate(),I.call(e,e.media,`ratechange`)},onReady(n){if(v.function(e.media.play))return;let r=n.target;qe.getTitle.call(e,i),e.media.play=()=>{$.call(e,!0),r.playVideo()},e.media.pause=()=>{$.call(e,!1),r.pauseVideo()},e.media.stop=()=>{r.stopVideo()},e.media.duration=r.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(r.getCurrentTime()),set(t){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,I.call(e,e.media,`seeking`),r.seekTo(t)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>r.getPlaybackRate(),set(e){r.setPlaybackRate(e)}});let{volume:a}=e.config;Object.defineProperty(e.media,"volume",{get:()=>a,set(t){a=t,r.setVolume(100*a),I.call(e,e.media,`volumechange`)}});let{muted:o}=e.config;Object.defineProperty(e.media,"muted",{get:()=>o,set(t){let n=v.boolean(t)?t:o;o=n,r[n?`mute`:`unMute`](),r.setVolume(100*a),I.call(e,e.media,`volumechange`)}}),Object.defineProperty(e.media,"currentSrc",{get:()=>r.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});let s=r.getAvailablePlaybackRates();e.options.speed=s.filter((t=>e.config.speed.options.includes(t))),e.supported.ui&&t.customControls&&e.media.setAttribute(`tabindex`,-1),I.call(e,e.media,`timeupdate`),I.call(e,e.media,`durationchange`),clearInterval(e.timers.buffering),e.timers.buffering=setInterval((()=>{e.media.buffered=r.getVideoLoadedFraction(),(e.media.lastBuffered===null||e.media.lastBuffered<e.media.buffered)&&I.call(e,e.media,`progress`),e.media.lastBuffered=e.media.buffered,e.media.buffered===1&&(clearInterval(e.timers.buffering),I.call(e,e.media,`canplaythrough`))}),200),t.customControls&&setTimeout((()=>Z.build.call(e)),50)},onStateChange(n){let r=n.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(n.data)&&(e.media.seeking=!1,I.call(e,e.media,`seeked`)),n.data){case-1:I.call(e,e.media,`timeupdate`),e.media.buffered=r.getVideoLoadedFraction(),I.call(e,e.media,`progress`);break;case 0:$.call(e,!1),e.media.loop?(r.stopVideo(),r.playVideo()):I.call(e,e.media,`ended`);break;case 1:t.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():($.call(e,!0),I.call(e,e.media,`playing`),e.timers.playing=setInterval((()=>{I.call(e,e.media,`timeupdate`)}),50),e.media.duration!==r.getDuration()&&(e.media.duration=r.getDuration(),I.call(e,e.media,`durationchange`)));break;case 2:e.muted||e.embed.unMute(),$.call(e,!1);break;case 3:I.call(e,e.media,`waiting`)}I.call(e,e.elements.container,`statechange`,!1,{code:n.data})}}})}},Je={setup(){this.media?(D(this.elements.container,this.config.classNames.type.replace(`{0}`,this.type),!0),D(this.elements.container,this.config.classNames.provider.replace(`{0}`,this.provider),!0),this.isEmbed&&D(this.elements.container,this.config.classNames.type.replace(`{0}`,`video`),!0),this.isVideo&&(this.elements.wrapper=x(`div`,{class:this.config.classNames.video}),ue(this.media,this.elements.wrapper),this.elements.poster=x(`div`,{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?B.setup.call(this):this.isYouTube?qe.setup.call(this):this.isVimeo&&Ge.setup.call(this)):this.debug.warn(`No media element found!`)}};class Ye{constructor(t){e(this,`load`,(()=>{this.enabled&&(v.object(window.google)&&v.object(window.google.ima)?this.ready():We(this.player.config.urls.googleIMA.sdk).then((()=>{this.ready()})).catch((()=>{this.trigger(`error`,Error(`Google IMA SDK failed to load`))})))})),e(this,`ready`,(()=>{var e;this.enabled||((e=this).manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()),this.startSafetyTimer(12e3,`ready()`),this.managerPromise.then((()=>{this.clearSafetyTimer(`onAdsManagerLoaded()`)})),this.listeners(),this.setupIMA()})),e(this,`setupIMA`,(()=>{this.elements.container=x(`div`,{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(e=>this.onAdsManagerLoaded(e)),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e)),!1),this.requestAds()})),e(this,`requestAds`,(()=>{let{container:e}=this.player.elements;try{let t=new google.ima.AdsRequest;t.adTagUrl=this.tagUrl,t.linearAdSlotWidth=e.offsetWidth,t.linearAdSlotHeight=e.offsetHeight,t.nonLinearAdSlotWidth=e.offsetWidth,t.nonLinearAdSlotHeight=e.offsetHeight,t.forceNonLinearFullSlot=!1,t.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(t)}catch(e){this.onAdError(e)}})),e(this,`pollCountdown`,((e=!1)=>{if(!e)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute(`data-badge-text`);this.countdownTimer=setInterval((()=>{let e=G(Math.max(this.manager.getRemainingTime(),0)),t=`${H.get(`advertisement`,this.player.config)} - ${e}`;this.elements.container.setAttribute(`data-badge-text`,t)}),100)})),e(this,`onAdsManagerLoaded`,(e=>{if(!this.enabled)return;let t=new google.ima.AdsRenderingSettings;t.restoreCustomPlaybackStateOnAdBreakComplete=!0,t.enablePreloading=!0,this.manager=e.getAdsManager(this.player,t),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e))),Object.keys(google.ima.AdEvent.Type).forEach((e=>{this.manager.addEventListener(google.ima.AdEvent.Type[e],(e=>this.onAdEvent(e)))})),this.trigger(`loaded`)})),e(this,`addCuePoints`,(()=>{v.empty(this.cuePoints)||this.cuePoints.forEach((e=>{if(e!==0&&e!==-1&&e<this.player.duration){let t=this.player.elements.progress;if(v.element(t)){let n=100/this.player.duration*e,r=x(`span`,{class:this.player.config.classNames.cues});r.style.left=`${n.toString()}%`,t.appendChild(r)}}}))})),e(this,`onAdEvent`,(e=>{let{container:t}=this.player.elements,n=e.getAd(),r=e.getAdData();switch((e=>{I.call(this.player,this.player.media,`ads${e.replace(/_/g,``).toLowerCase()}`)})(e.type),e.type){case google.ima.AdEvent.Type.LOADED:this.trigger(`loaded`),this.pollCountdown(!0),n.isLinear()||(n.width=t.offsetWidth,n.height=t.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:r.adError&&this.player.debug.warn(`Non-fatal ad error: ${r.adError.getMessage()}`)}})),e(this,`onAdError`,(e=>{this.cancel(),this.player.debug.warn(`Ads error`,e)})),e(this,`listeners`,(()=>{let{container:e}=this.player.elements,t;this.player.on(`canplay`,(()=>{this.addCuePoints()})),this.player.on(`ended`,(()=>{this.loader.contentComplete()})),this.player.on(`timeupdate`,(()=>{t=this.player.currentTime})),this.player.on(`seeked`,(()=>{let e=this.player.currentTime;v.empty(this.cuePoints)||this.cuePoints.forEach(((n,r)=>{t<n&&n<e&&(this.manager.discardAdBreak(),this.cuePoints.splice(r,1))}))})),window.addEventListener(`resize`,(()=>{this.manager&&this.manager.resize(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL)}))})),e(this,`play`,(()=>{let{container:e}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then((()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(e){this.onAdError(e)}})).catch((()=>{}))})),e(this,`resumeContent`,(()=>{this.elements.container.style.zIndex=``,this.playing=!1,L(this.player.media.play())})),e(this,`pauseContent`,(()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()})),e(this,`cancel`,(()=>{this.initialized&&this.resumeContent(),this.trigger(`error`),this.loadAds()})),e(this,`loadAds`,(()=>{this.managerPromise.then((()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise((e=>{this.on(`loaded`,e),this.player.debug.log(this.manager)})),this.initialized=!1,this.requestAds()})).catch((()=>{}))})),e(this,`trigger`,((e,...t)=>{let n=this.events[e];v.array(n)&&n.forEach((e=>{v.function(e)&&e.apply(this,t)}))})),e(this,`on`,((e,t)=>(v.array(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this))),e(this,`startSafetyTimer`,((e,t)=>{this.player.debug.log(`Safety timer invoked from: ${t}`),this.safetyTimer=setTimeout((()=>{this.cancel(),this.clearSafetyTimer(`startSafetyTimer()`)}),e)})),e(this,`clearSafetyTimer`,(e=>{v.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${e}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)})),this.player=t,this.config=t.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise(((e,t)=>{this.on(`loaded`,e),this.on(`error`,t)})),this.load()}get enabled(){let{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!v.empty(e.publisherId)||v.url(e.tagUrl))}get tagUrl(){let{config:e}=this;return v.url(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Ie({AV_PUBLISHERID:`58c25bb0073ef448b1087ad6`,AV_CHANNELID:`5a0458dc28a06145e4519d21`,AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}function Xe(e=0,t=0,n=255){return Math.min(Math.max(e,t),n)}let Ze=e=>{let t=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach((e=>{let n={};e.split(/\r\n|\n|\r/).forEach((e=>{if(v.number(n.startTime)){if(!v.empty(e.trim())&&v.empty(n.text)){let t=e.trim().split(`#xywh=`);[n.text]=t,t[1]&&([n.x,n.y,n.w,n.h]=t[1].split(`,`))}}else{let t=e.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);t&&(n.startTime=60*Number(t[1]||0)*60+60*Number(t[2])+Number(t[3])+Number(`0.${t[4]}`),n.endTime=60*Number(t[6]||0)*60+60*Number(t[7])+Number(t[8])+Number(`0.${t[9]}`))}})),n.text&&t.push(n)})),t},Qe=(e,t)=>{let n={};return e>t.width/t.height?(n.width=t.width,n.height=1/e*t.width):(n.height=t.height,n.width=e*t.height),n};class $e{constructor(t){e(this,`load`,(()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then((()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)}))})),e(this,`getThumbnails`,(()=>new Promise((e=>{let{src:t}=this.player.config.previewThumbnails;if(v.empty(t))throw Error(`Missing previewThumbnails.src config attribute`);let n=()=>{this.thumbnails.sort(((e,t)=>e.height-t.height)),this.player.debug.log(`Preview thumbnails`,this.thumbnails),e()};if(v.function(t))t((e=>{this.thumbnails=e,n()}));else{let e=(v.string(t)?[t]:t).map((e=>this.getThumbnail(e)));Promise.all(e).then(n)}})))),e(this,`getThumbnail`,(e=>new Promise((t=>{W(e).then((n=>{let r={frames:Ze(n),height:null,urlPrefix:``};r.frames[0].text.startsWith(`/`)||r.frames[0].text.startsWith(`http://`)||r.frames[0].text.startsWith(`https://`)||(r.urlPrefix=e.substring(0,e.lastIndexOf(`/`)+1));let i=new Image;i.onload=()=>{r.height=i.naturalHeight,r.width=i.naturalWidth,this.thumbnails.push(r),t()},i.src=r.urlPrefix+r.frames[0].text}))})))),e(this,`startMove`,(e=>{if(this.loaded&&v.event(e)&&[`touchmove`,`mousemove`].includes(e.type)&&this.player.media.duration){if(e.type===`touchmove`)this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var t,n;let r=this.player.elements.progress.getBoundingClientRect(),i=100/r.width*(e.pageX-r.left);this.seekTime=this.player.media.duration*(i/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=e.pageX,this.elements.thumb.time.innerText=G(this.seekTime);let a=(t=this.player.config.markers)==null||(n=t.points)==null?void 0:n.find((({time:e})=>e===Math.round(this.seekTime)));a&&this.elements.thumb.time.insertAdjacentHTML(`afterbegin`,`${a.label}<br>`)}this.showImageAtCurrentTime()}})),e(this,`endMove`,(()=>{this.toggleThumbContainer(!1,!0)})),e(this,`startScrubbing`,(e=>{(v.nullOrUndefined(e.button)||!1===e.button||e.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))})),e(this,`endScrubbing`,(()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):ge.call(this.player,this.player.media,`timeupdate`,(()=>{this.mouseDown||this.toggleScrubbingContainer(!1)}))})),e(this,`listeners`,(()=>{this.player.on(`play`,(()=>{this.toggleThumbContainer(!1,!0)})),this.player.on(`seeked`,(()=>{this.toggleThumbContainer(!1)})),this.player.on(`timeupdate`,(()=>{this.lastTime=this.player.media.currentTime}))})),e(this,`render`,(()=>{this.elements.thumb.container=x(`div`,{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=x(`div`,{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);let e=x(`div`,{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=x(`span`,{},`00:00`),e.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(e),v.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=x(`div`,{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)})),e(this,`destroy`,(()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()})),e(this,`showImageAtCurrentTime`,(()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();let e=this.thumbnails[0].frames.findIndex((e=>this.seekTime>=e.startTime&&this.seekTime<=e.endTime)),t=e>=0,n=0;this.mouseDown||this.toggleThumbContainer(t),t&&(this.thumbnails.forEach(((t,r)=>{this.loadedImages.includes(t.frames[e].text)&&(n=r)})),e!==this.showingThumb&&(this.showingThumb=e,this.loadImage(n)))})),e(this,`loadImage`,((e=0)=>{let t=this.showingThumb,n=this.thumbnails[e],{urlPrefix:r}=n,i=n.frames[t],a=n.frames[t].text,o=r+a;if(this.currentImageElement&&this.currentImageElement.dataset.filename===a)this.showImage(this.currentImageElement,i,e,t,a,!1),this.currentImageElement.dataset.index=t,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);let n=new Image;n.src=o,n.dataset.index=t,n.dataset.filename=a,this.showingThumbFilename=a,this.player.debug.log(`Loading image: ${o}`),n.onload=()=>this.showImage(n,i,e,t,a,!0),this.loadingImage=n,this.removeOldImages(n)}})),e(this,`showImage`,((e,t,n,r,i,a=!0)=>{this.player.debug.log(`Showing thumb: ${i}. num: ${r}. qual: ${n}. newimg: ${a}`),this.setImageSizeAndOffset(e,t),a&&(this.currentImageContainer.appendChild(e),this.currentImageElement=e,this.loadedImages.includes(i)||this.loadedImages.push(i)),this.preloadNearby(r,!0).then(this.preloadNearby(r,!1)).then(this.getHigherQuality(n,e,t,i))})),e(this,`removeOldImages`,(e=>{Array.from(this.currentImageContainer.children).forEach((t=>{if(t.tagName.toLowerCase()!==`img`)return;let n=this.usingSprites?500:1e3;if(t.dataset.index!==e.dataset.index&&!t.dataset.deleting){t.dataset.deleting=!0;let{currentImageContainer:e}=this;setTimeout((()=>{e.removeChild(t),this.player.debug.log(`Removing thumb: ${t.dataset.filename}`)}),n)}}))})),e(this,`preloadNearby`,((e,t=!0)=>new Promise((n=>{setTimeout((()=>{let r=this.thumbnails[0].frames[e].text;if(this.showingThumbFilename===r){let i;i=t?this.thumbnails[0].frames.slice(e):this.thumbnails[0].frames.slice(0,e).reverse();let a=!1;i.forEach((e=>{let t=e.text;if(t!==r&&!this.loadedImages.includes(t)){a=!0,this.player.debug.log(`Preloading thumb filename: ${t}`);let{urlPrefix:e}=this.thumbnails[0],r=e+t,i=new Image;i.src=r,i.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${t}`),this.loadedImages.includes(t)||this.loadedImages.push(t),n()}}})),a||n()}}),300)})))),e(this,`getHigherQuality`,((e,t,n,r)=>{if(e<this.thumbnails.length-1){let i=t.naturalHeight;this.usingSprites&&(i=n.h),i<this.thumbContainerHeight&&setTimeout((()=>{this.showingThumbFilename===r&&(this.player.debug.log(`Showing higher quality thumb for: ${r}`),this.loadImage(e+1))}),300)}})),e(this,`toggleThumbContainer`,((e=!1,t=!1)=>{let n=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(n,e),!e&&t&&(this.showingThumb=null,this.showingThumbFilename=null)})),e(this,`toggleScrubbingContainer`,((e=!1)=>{let t=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(t,e),e||(this.showingThumb=null,this.showingThumbFilename=null)})),e(this,`determineContainerAutoSizing`,(()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)})),e(this,`setThumbContainerSizeAndPos`,(()=>{let{imageContainer:e}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(e.clientHeight>20&&e.clientWidth<20){let t=Math.floor(e.clientHeight*this.thumbAspectRatio);e.style.width=`${t}px`}else if(e.clientHeight<20&&e.clientWidth>20){let t=Math.floor(e.clientWidth/this.thumbAspectRatio);e.style.height=`${t}px`}}else{let t=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);e.style.height=`${this.thumbContainerHeight}px`,e.style.width=`${t}px`}this.setThumbContainerPos()})),e(this,`setThumbContainerPos`,(()=>{let e=this.player.elements.progress.getBoundingClientRect(),t=this.player.elements.container.getBoundingClientRect(),{container:n}=this.elements.thumb,r=t.left-e.left+10,i=t.right-e.left-n.clientWidth-10,a=this.mousePosX-e.left-n.clientWidth/2,o=Xe(a,r,i);n.style.left=`${o}px`,n.style.setProperty(`--preview-arrow-offset`,a-o+`px`)})),e(this,`setScrubbingContainerSize`,(()=>{let{width:e,height:t}=Qe(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${e}px`,this.elements.scrubbing.container.style.height=`${t}px`})),e(this,`setImageSizeAndOffset`,((e,t)=>{if(!this.usingSprites)return;let n=this.thumbContainerHeight/t.h;e.style.height=e.naturalHeight*n+`px`,e.style.width=e.naturalWidth*n+`px`,e.style.left=`-${t.x*n}px`,e.style.top=`-${t.y*n}px`})),this.player=t,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes(`w`)}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){let{height:e}=Qe(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}let et={insertElements(e,t){v.string(t)?fe(e,this.media,{src:t}):v.array(t)&&t.forEach((t=>{fe(e,this.media,t)}))},change(e){le(e,`sources.length`)?(B.cancelRequests.call(this),this.destroy.call(this,(()=>{this.options.quality=[],S(this.media),this.media=null,v.element(this.elements.container)&&this.elements.container.removeAttribute(`class`);let{sources:t,type:n}=e,[{provider:r=J.html5,src:i}]=t,a=r===`html5`?n:`div`,o=r===`html5`?{}:{src:i};Object.assign(this,{provider:r,type:n,supported:M.check(n,r,this.config.playsinline),media:x(a,o)}),this.elements.container.appendChild(this.media),v.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute(`crossorigin`,``),this.config.autoplay&&this.media.setAttribute(`autoplay`,``),v.empty(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute(`loop`,``),this.config.muted&&this.media.setAttribute(`muted`,``),this.config.playsinline&&this.media.setAttribute(`playsinline`,``)),Z.addStyleHook.call(this),this.isHTML5&&et.insertElements.call(this,`source`,t),this.config.title=e.title,Je.setup.call(this),this.isHTML5&&Object.keys(e).includes(`tracks`)&&et.insertElements.call(this,`track`,e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Z.build.call(this),this.isHTML5&&this.media.load(),v.empty(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new $e(this))),this.fullscreen.update()}),!0)):this.debug.warn(`Invalid source format`)}};class tt{constructor(t,n){if(e(this,`play`,(()=>v.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then((()=>this.ads.play())).catch((()=>L(this.media.play()))),this.media.play()):null)),e(this,`pause`,(()=>this.playing&&v.function(this.media.pause)?this.media.pause():null)),e(this,`togglePlay`,(e=>(v.boolean(e)?e:!this.playing)?this.play():this.pause())),e(this,`stop`,(()=>{this.isHTML5?(this.pause(),this.restart()):v.function(this.media.stop)&&this.media.stop()})),e(this,`restart`,(()=>{this.currentTime=0})),e(this,`rewind`,(e=>{this.currentTime-=v.number(e)?e:this.config.seekTime})),e(this,`forward`,(e=>{this.currentTime+=v.number(e)?e:this.config.seekTime})),e(this,`increaseVolume`,(e=>{let t=this.media.muted?0:this.volume;this.volume=t+(v.number(e)?e:0)})),e(this,`decreaseVolume`,(e=>{this.increaseVolume(-e)})),e(this,`airplay`,(()=>{M.airplay&&this.media.webkitShowPlaybackTargetPicker()})),e(this,`toggleControls`,(e=>{if(this.supported.ui&&!this.isAudio){let t=O(this.elements.container,this.config.classNames.hideControls),n=e===void 0?void 0:!e,r=D(this.elements.container,this.config.classNames.hideControls,n);if(r&&v.array(this.config.controls)&&this.config.controls.includes(`settings`)&&!v.empty(this.config.settings)&&K.toggleMenu.call(this,!1),r!==t){let e=r?`controlshidden`:`controlsshown`;I.call(this,this.media,e)}return!r}return!1})),e(this,`on`,((e,t)=>{P.call(this,this.elements.container,e,t)})),e(this,`once`,((e,t)=>{ge.call(this,this.elements.container,e,t)})),e(this,`off`,((e,t)=>{F(this.elements.container,e,t)})),e(this,`destroy`,((e,t=!1)=>{if(!this.ready)return;let n=()=>{document.body.style.overflow=``,this.embed=null,t?(Object.keys(this.elements).length&&(S(this.elements.buttons.play),S(this.elements.captions),S(this.elements.controls),S(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),v.function(e)&&e()):(_e.call(this),B.cancelRequests.call(this),w(this.elements.original,this.elements.container),I.call(this,this.elements.original,`destroyed`,!0),v.function(e)&&e.call(this.elements.original),this.ready=!1,setTimeout((()=>{this.elements=null,this.media=null}),200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Z.toggleNativeControls.call(this,!0),n()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&v.function(this.embed.destroy)&&this.embed.destroy(),n()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(n),setTimeout(n,200))})),e(this,`supports`,(e=>M.mime.call(this,e))),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=M.touch,this.media=t,v.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||v.nodeList(this.media)||v.array(this.media))&&(this.media=this.media[0]),this.config=b({},Le,tt.defaults,n||{},(()=>{try{return JSON.parse(this.media.getAttribute(`data-plyr-config`))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new Ve(this.config.debug),this.debug.log(`Config`,this.config),this.debug.log(`Support`,M),v.nullOrUndefined(this.media)||!v.element(this.media))return void this.debug.error(`Setup failed: no suitable element passed`);if(this.media.plyr)return void this.debug.warn(`Target already setup`);if(!this.config.enabled)return void this.debug.error(`Setup failed: disabled by config`);if(!M.check().api)return void this.debug.error(`Setup failed: no support`);let r=this.media.cloneNode(!0);r.autoplay=!1,this.elements.original=r;let i=this.media.tagName.toLowerCase(),a=null,o=null;switch(i){case`div`:if(a=this.media.querySelector(`iframe`),v.element(a)){if(o=Fe(a.getAttribute(`src`)),this.provider=function(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?J.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?J.vimeo:null}(o.toString()),this.elements.container=this.media,this.media=a,this.elements.container.className=``,o.search.length){let e=[`1`,`true`];e.includes(o.searchParams.get(`autoplay`))&&(this.config.autoplay=!0),e.includes(o.searchParams.get(`loop`))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=e.includes(o.searchParams.get(`playsinline`)),this.config.youtube.hl=o.searchParams.get(`hl`)):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(v.empty(this.provider)||!Object.values(J).includes(this.provider))return void this.debug.error(`Setup failed: Invalid provider`);this.type=ze;break;case`video`:case`audio`:this.type=i,this.provider=J.html5,this.media.hasAttribute(`crossorigin`)&&(this.config.crossorigin=!0),this.media.hasAttribute(`autoplay`)&&(this.config.autoplay=!0),(this.media.hasAttribute(`playsinline`)||this.media.hasAttribute(`webkit-playsinline`))&&(this.config.playsinline=!0),this.media.hasAttribute(`muted`)&&(this.config.muted=!0),this.media.hasAttribute(`loop`)&&(this.config.loop.active=!0);break;default:this.debug.error(`Setup failed: unsupported type`);return}this.supported=M.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new He(this),this.storage=new U(this),this.media.plyr=this,v.element(this.elements.container)||(this.elements.container=x(`div`),ue(this.media,this.elements.container)),Z.migrateStyles.call(this),Z.addStyleHook.call(this),Je.setup.call(this),this.config.debug&&P.call(this,this.elements.container,this.config.events.join(` `),(e=>{this.debug.log(`event: ${e.type}`)})),this.fullscreen=new Y(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Z.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Ye(this)),this.isHTML5&&this.config.autoplay&&this.once(`canplay`,(()=>L(this.play()))),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new $e(this))):this.debug.error(`Setup failed: no support`)}get isHTML5(){return this.provider===J.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===J.youtube}get isVimeo(){return this.provider===J.vimeo}get isVideo(){return this.type===ze}get isAudio(){return this.type===`audio`}get playing(){return!!(this.ready&&!this.paused&&!this.ended)}get paused(){return!!this.media.paused}get stopped(){return!!(this.paused&&this.currentTime===0)}get ended(){return!!this.media.ended}set currentTime(e){if(!this.duration)return;let t=v.number(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){let{buffered:e}=this.media;return v.number(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){let e=parseFloat(this.config.duration),t=(this.media||{}).duration,n=v.number(t)&&t!==1/0?t:0;return e||n}set volume(e){let t=e;v.string(t)&&(t=Number(t)),v.number(t)||(t=this.storage.get(`volume`)),v.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!v.empty(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;v.boolean(t)||(t=this.storage.get(`muted`)),v.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return!!this.media.muted}get hasAudio(){return!this.isHTML5||!!this.isAudio||!!this.media.mozHasAudio||!!this.media.webkitAudioDecodedByteCount||!!(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;v.number(e)&&(t=e),v.number(t)||(t=this.storage.get(`speed`)),v.number(t)||(t=this.config.speed.selected);let{minimumSpeed:n,maximumSpeed:r}=this;t=Xe(t,n,r),this.config.speed.selected=t,setTimeout((()=>{this.media&&(this.media.playbackRate=t)}),0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){let t=this.config.quality,n=this.options.quality;if(!n.length)return;let r=[!v.empty(e)&&Number(e),this.storage.get(`quality`),t.selected,t.default].find(v.number),i=!0;if(!n.includes(r)){let e=be(n,r);this.debug.warn(`Unsupported quality option: ${r}, using ${e} instead`),r=e,i=!1}t.selected=r,this.media.quality=r,i&&this.storage.set({quality:r})}get quality(){return this.media.quality}set loop(e){let t=v.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return!!this.media.loop}set source(e){et.change.call(this,e)}get source(){return this.media.currentSrc}get download(){let{download:e}=this.config.urls;return v.url(e)?e:this.source}set download(e){v.url(e)&&(this.config.urls.download=e,K.setDownloadUrl.call(this))}set poster(e){this.isVideo?Z.setPoster.call(this,e,!1).catch((()=>{})):this.debug.warn(`Poster can only be set for video`)}get poster(){return this.isVideo?this.media.getAttribute(`poster`)||this.media.getAttribute(`data-poster`):null}get ratio(){if(!this.isVideo)return null;let e=R(we.call(this));return v.array(e)?e.join(`:`):e}set ratio(e){this.isVideo?v.string(e)&&Ce(e)?(this.config.ratio=R(e),z.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn(`Aspect ratio can only be set for video`)}set autoplay(e){this.config.autoplay=v.boolean(e)?e:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(e){q.toggle.call(this,e,!1)}set currentTrack(e){q.set.call(this,e,!1),q.setup.call(this)}get currentTrack(){let{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){q.setLanguage.call(this,e,!1)}get language(){return(q.getCurrentTrack.call(this)||{}).language}set pip(e){if(!M.pip)return;let t=v.boolean(e)?e:!this.pip;v.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Re:`inline`),v.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return M.pip?v.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Re:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new $e(this))}static supported(e,t){return M.check(e,t)}static loadSprite(e,t){return je(e,t)}static setup(e,t={}){let n=null;return v.string(e)?n=Array.from(document.querySelectorAll(e)):v.nodeList(e)?n=Array.from(e):v.array(e)&&(n=e.filter(v.element)),v.empty(n)?null:n.map((e=>new tt(e,t)))}}var nt;return tt.defaults=(nt=Le,JSON.parse(JSON.stringify(nt))),tt}))}));export{t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.