PageSourceSearch

https://cdn.sizemarker.com/sizemarker-next/_next/static/chunks/2f8a7bde.12d8366e1c3e67ab.js

js sizemarker.com collected 2026-09-28 06:11:22 UTC 116,543 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7104],{46242:(e,t,i)=>{function s(e,t,i){var s;return(t="symbol"==typeof(s=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t);if("object"!=typeof s)return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?s:s+"")in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function n(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function l(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,s)}return i}function a(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?l(Object(i),!0).forEach(function(t){var s;s=i[t],t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):l(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}i.r(t),i.d(t,{default:()=>e0});var r,o={addCSS:!0,thumbWidth:15,watch:!0},c=function(e){return null!=e?e.constructor:null},u=function(e,t){return!!(e&&t&&e instanceof t)},h=function(e){return c(e)===String},d=function(e){return Array.isArray(e)},m=function(e){return u(e,NodeList)},p={string:h,array:d,nodeList:m,element:function(e){return u(e,Element)},event:function(e){return u(e,Event)},empty:function(e){return null==e||(h(e)||d(e)||m(e))&&!e.length||c(e)===Object&&!Object.keys(e).length}},g=function(){var e,t;function i(e,t){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,i),p.element(e)?this.element=e:p.string(e)&&(this.element=document.querySelector(e)),p.element(this.element)&&p.empty(this.element.rangeTouch)&&(this.config=a({},o,{},t),this.init())}return e=[{key:"init",value:function(){i.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(){i.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,i=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(e){t.element[i](e,function(e){return t.set(e)},!1)})}},{key:"get",value:function(e){if(!i.enabled||!p.event(e))return null;var t,s=e.target,n=e.changedTouches[0],l=parseFloat(s.getAttribute("min"))||0,a=parseFloat(s.getAttribute("max"))||100,r=parseFloat(s.getAttribute("step"))||1,o=s.getBoundingClientRect(),c=100/o.width*(this.config.thumbWidth/2)/100;return 0>(t=100/o.width*(n.clientX-o.left))?t=0:100<t&&(t=100),50>t?t-=(100-2*t)*c:50<t&&(t+=2*(t-50)*c),l+function(e,t){if(1>t){var i,s=(i="".concat(t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/))?Math.max(0,(i[1]?i[1].length:0)-(i[2]?+i[2]:0)):0;return parseFloat(e.toFixed(s))}return Math.round(e/t)*t}(t/100*(a-l),r)}},{key:"set",value:function(e){i.enabled&&p.event(e)&&!e.target.disabled&&(e.preventDefault(),e.target.value=this.get(e),function(e,t){if(e&&t){var i=new Event(t,{bubbles:!0});e.dispatchEvent(i)}}(e.target,"touchend"===e.type?"change":"input"))}}],t=[{key:"setup",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},s=null;if(p.empty(e)||p.string(e)?s=Array.from(document.querySelectorAll(p.string(e)?e:'input[type="range"]')):p.element(e)?s=[e]:p.nodeList(e)?s=Array.from(e):p.array(e)&&(s=e.filter(p.element)),p.empty(s))return null;var n=a({},o,{},t);return p.string(e)&&n.watch&&new MutationObserver(function(t){Array.from(t).forEach(function(t){Array.from(t.addedNodes).forEac
1h(function(t){var s;p.element(t)&&(function(){return Array.from(document.querySelectorAll(s)).includes(this)}).call(t,s=e)&&new i(t,n)})})}).observe(document.body,{childList:!0,subtree:!0}),s.map(function(e){return new i(e,t)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}],e&&n(i.prototype,e),t&&n(i,t),i}();let f=e=>null!=e?e.constructor:null,y=(e,t)=>!!(e&&t&&e instanceof t),b=e=>null==e,v=e=>f(e)===Object,w=e=>f(e)===String,k=e=>"function"==typeof e,T=e=>Array.isArray(e),C=e=>y(e,NodeList);function A(e){return b(e)||(w(e)||T(e)||C(e))&&!e.length||v(e)&&!Object.keys(e).length}var S={nullOrUndefined:b,object:v,number:e=>f(e)===Number&&!Number.isNaN(e),string:w,boolean:e=>f(e)===Boolean,function:k,array:T,nodeList:C,element:function(e){return null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument},event:e=>y(e,Event),keyboardEvent:e=>y(e,KeyboardEvent),track:e=>y(e,TextTrack)||!b(e)&&w(e.kind),promise:e=>y(e,Promise)&&k(e.then),url:function(e){if(y(e,window.URL))return!0;if(!w(e))return!1;let t=e;e.startsWith("http://")&&e.startsWith("https://")||(t="http://".concat(e));try{return!A(new URL(t).hostname)}catch(e){return!1}},empty:A};let E=(()=>{let e=document.createElement("span"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},i=Object.keys(t).find(t=>void 0!==e.style[t]);return!!S.string(i)&&t[i]})();function P(e,t){setTimeout(()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch(e){}},t)}function M(e,t){return t.split(".").reduce((e,t)=>e&&e[t],e)}function N(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];if(!i.length)return e;let n=i.shift();return S.object(n)?(Object.keys(n).forEach(t=>{S.object(n[t])?(Object.keys(e).includes(t)||Object.assign(e,{[t]:{}}),N(e[t],n[t])):Object.assign(e,{[t]:n[t]})}),N(e,...i)):e}function x(e,t){Array.from(e.length?e:[e]).reverse().forEach((e,i)=>{let s=i>0?t.cloneNode(!0):t,n=e.parentNode,l=e.nextSibling;s.appendChild(e),l?n.insertBefore(s,l):n.appendChild(s)})}function L(e,t){!S.element(e)||S.empty(t)||Object.entries(t).filter(e=>{let[,t]=e;return!S.nullOrUndefined(t)}).forEach(t=>{let[i,s]=t;return e.setAttribute(i,s)})}function I(e,t,i){let s=document.createElement(e);return S.object(t)&&L(s,t),S.string(i)&&(s.textContent=i),s}
1function _(e,t,i,s){S.element(t)&&t.appendChild(I(e,i,s))}function O(e){if(S.nodeList(e)||S.array(e))return void Array.from(e).forEach(O);S.element(e)&&S.element(e.parentNode)&&e.parentNode.removeChild(e)}function j(e){if(!S.element(e))return;let{length:t}=e.childNodes;for(;t>0;)e.removeChild(e.lastChild),t-=1}function q(e,t){return S.element(t)&&S.element(t.parentNode)&&S.element(e)?(t.parentNode.replaceChild(e,t),e):null}function D(e,t){if(!S.string(e)||S.empty(e))return{};let i={},s=N({},t);return e.split(",").forEach(e=>{let t=e.trim(),n=t.replace(".",""),l=t.replace(/[[\]]/g,"").split("="),[a]=l,r=l.length>1?l[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":S.string(s.class)?i.class="".concat(s.class," ").concat(n):i.class=n;break;case"#":i.id=t.replace("#","");break;case"[":i[a]=r}}),N(s,i)}function H(e,t){if(!S.element(e))return;let i=t;S.boolean(i)||(i=!e.hidden),e.hidden=i}function R(e,t,i){if(S.nodeList(e))return Array.from(e).map(e=>R(e,t,i));if(S.element(e)){let s="toggle";return void 0!==i&&(s=i?"add":"remove"),e.classList[s](t),e.classList.contains(t)}return!1}function F(e,t){return S.element(e)&&e.classList.contains(t)}function V(e,t){let{prototype:i}=Element;return(i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function U(e){return this.elements.container.querySelectorAll(e)}function W(e){return this.elements.container.querySelector(e)}function B(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];S.element(e)&&e.focus({preventScroll:!0,focusVisible:t})}let z={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},K={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,t){let i=K[e]||"html5"!==t,s=i&&K.rangeInput;return{api:i,ui:s}},pip:document.pictureInPictureEnabled&&!I("video").disablePictureInPicture,airplay:S.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(S.empty(e))return!1;let[t]=e.split("/"),i=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(z).includes(i)&&(i+='; codecs="'.concat(z[e],'"'));try{return!!(i&&this.media.canPlayType(i).replace(/no/,""))}catch(e){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{let e=document.createElement("input");return e.type="range","range"===e.type})(),touch:"ontouchstart"in document.documentElement,transitions:!1!==E,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},Y=(()=>{let e=!1;try{let t=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e})();function X(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=!(arguments.length>4)||void 0===arguments[4]||arguments[4],l=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(!e||!("addEventListener"in e)||S.empty(t)||!S.function(i))return;let a=t.split(" "),r=l;Y&&(r={passive:n,capture:l}),a.forEach(t=>{this&&this.eventListeners&&s&&this.eventListeners.push({element:e,type:t,callback:i,options:r}),e[s?"addEventListener":"removeEventListener"](t,i,r)})}function Q(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,s=!(arguments.length>3)||void 0===arguments[3]||arguments[3],n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];X.call(this,e,t,i,!0,s,n)}function J(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,s=!(arguments.length>3)||void 0===arguments[3]||arguments[3],n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];X.call(this,e,t,i,!1,s,n)}function $(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,s=!(arguments.length>3)||void 0===arguments[3]||arguments[3],n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];var l=this;let a=function(){for(var r=arguments.length,o=Array(r),c=0;c<r;c++)o[c]=arguments[c];J(e,t,a,s,n),i.apply(l,o)};X.call(this,e,t,a,!0,s,n)}function G(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};
1if(!S.element(e)||S.empty(t))return;let n=new CustomEvent(t,{bubbles:i,detail:{...s,plyr:this}});e.dispatchEvent(n)}function Z(){this&&this.eventListeners&&(this.eventListeners.forEach(e=>{let{element:t,type:i,callback:s,options:n}=e;t.removeEventListener(i,s,n)}),this.eventListeners=[])}function ee(){return new Promise(e=>this.ready?setTimeout(e,0):Q.call(this,this.elements.container,"ready",e)).then(()=>{})}function et(e){S.promise(e)&&e.then(null,()=>{})}function ei(e){return S.array(e)?e.filter((t,i)=>e.indexOf(t)===i):e}function es(e,t){return S.array(e)&&e.length?e.reduce((e,i)=>Math.abs(i-t)<Math.abs(e-t)?i:e):null}function en(e){return!!window&&!!window.CSS&&window.CSS.supports(e)}let el=[[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)=>{let[i,s]=t;return{...e,[i/s]:[i,s]}},{});function ea(e){return(!!S.array(e)||!!S.string(e)&&!!e.includes(":"))&&(S.array(e)?e:e.split(":")).map(Number).every(S.number)}function er(e){if(!S.array(e)||!e.every(S.number))return null;let[t,i]=e,s=(e,t)=>0===t?e:s(t,e%t),n=s(t,i);return[t/n,i/n]}function eo(e){let t=e=>ea(e)?e.split(":").map(Number):null,i=t(e);if(null===i&&(i=t(this.config.ratio)),null===i&&!S.empty(this.embed)&&S.array(this.embed.ratio)&&({ratio:i}=this.embed),null===i&&this.isHTML5){let{videoWidth:e,videoHeight:t}=this.media;i=[e,t]}return er(i)}function ec(e){if(!this.isVideo)return{};let{wrapper:t}=this.elements,i=eo.call(this,e);if(!S.array(i))return{};let[s,n]=er(i),l=en("aspect-ratio: ".concat(s,"/").concat(n)),a=100/s*n;if(l?t.style.aspectRatio="".concat(s,"/").concat(n):t.style.paddingBottom="".concat(a,"%"),this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){let e=100/this.media.offsetWidth*Number.parseInt(window.getComputedStyle(this.media).paddingBottom,10);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform="translateY(-".concat((e-a)/(e/50),"%)")}else this.isHTML5&&t.classList.add(this.config.classNames.videoFixedRatio);return{padding:a,ratio:i}}function eu(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.05,s=e/t,n=es(Object.keys(el),s);return Math.abs(n-s)<=i?el[n]:[e,t]}let eh={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(e=>{let t=e.getAttribute("type");return!!S.empty(t)||K.mime.call(this,t)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:eh.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,S.empty(this.config.ratio)||ec.call(e),Object.defineProperty(e.media,"quality",{get(){let t=eh.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&&S.function(e.config.quality.onChange))e.config.quality.onChange(t);else{let i=eh.getSources.call(e).find(e=>Number(e.getAttribute("size"))===t);if(!i)return;let{currentTime:s,paused:n,preload:l,readyState:a,playbackRate:r}=e.media;e.media.src=i.getAttribute("src"),("none"!==l||a)&&(e.once("loadedmetadata",()=>{e.speed=r,e.currentTime=s,n||et(e.play())}),e.media.load())}G.call(e,e.media,"qualitychange",!1,{quality:t})}}})},cancelRequests(){this.isHTML5&&(O(eh.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}},ed=!!window.document.documentMode,em=/Edge/.test(navigator.userAgent),ep="WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent);var eg={isIE:ed,isEdge:em,isWebKit:ep,isIPadOS:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,isIos:/iPad|iPhone|iPod/i.test(navigator.userAgent)&&navigator.maxTouchPoints>1};function ef(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];return S.empty(e)?e:e.toString().replace(/\{(\d+)\}/g,(e,t)=>i[t].toString())}function ey(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.replace(RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),i.toString())}function eb(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.toString().replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase())}function ev(e){let t=document.createElement("div");return t.appendChild(e),t.innerHTML}let ew={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},ek={get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(S.empty(e)||S.empty(t))return"";let i=M(t.i18n,e);return S.empty(i)?Object.keys(ew).includes(e)?ew[e]:"":(Object.entries({"{seektime}":t.seekTime,"{title}":t.title}
1).forEach(e=>{let[t,s]=e;i=ey(i,t,s)}),i)}};class eT{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(e){return!1}}constructor(e){s(this,"get",e=>{if(!eT.supported||!this.enabled)return null;let t=window.localStorage.getItem(this.key);if(S.empty(t))return null;let i=JSON.parse(t);return S.string(e)&&e.length?i[e]:i}),s(this,"set",e=>{if(!eT.supported||!this.enabled||!S.object(e))return;let t=this.get();S.empty(t)&&(t={}),N(t,e);try{window.localStorage.setItem(this.key,JSON.stringify(t))}catch(e){}}),this.enabled=e.config.storage.enabled,this.key=e.config.storage.key}}function eC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise((s,n)=>{try{let n=new XMLHttpRequest;if(!("withCredentials"in n))return;i&&(n.withCredentials=!0),n.addEventListener("load",()=>{if("text"===t)try{s(JSON.parse(n.responseText))}catch(e){s(n.responseText)}else s(n.response)}),n.addEventListener("error",()=>{throw Error(n.status)}),n.open("GET",e,!0),n.responseType=t,n.send()}catch(e){n(e)}})}function eA(e,t){if(!S.string(e))return;let i="cache",s=S.string(t),n=()=>null!==document.getElementById(t),l=(e,t)=>{e.innerHTML=t,s&&n()||document.body.insertAdjacentElement("afterbegin",e)};if(!s||!n()){let n=eT.supported,a=document.createElement("div");if(a.setAttribute("hidden",""),s&&a.setAttribute("id",t),n){let e=window.localStorage.getItem("".concat(i,"-").concat(t));null!==e&&l(a,JSON.parse(e).content)}eC(e).then(e=>{if(!S.empty(e)){if(n)try{window.localStorage.setItem("".concat(i,"-").concat(t),JSON.stringify({content:e}))}catch(e){}l(a,e)}}).catch(()=>{})}}let eS=e=>Math.trunc(e/60/60%60,10);function eE(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!S.number(e))return eE(void 0,t,i);let s=e=>"0".concat(e).slice(-2),n=eS(e),l=Math.trunc(e/60%60,10),a=Math.trunc(e%60,10);return n=t||n>0?"".concat(n,":"):"","".concat(i&&e>0?"-":"").concat(n).concat(s(l),":").concat(s(a))}let eP={getIconUrl(){let e=new URL(this.config.iconUrl,window.location),t=window.location.host?window.location.host:window.top.location.host,i=e.host!==t||eg.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:i}},findElements(){try{return this.elements.controls=W.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:U.call(this,this.config.selectors.buttons.play),pause:W.call(this,this.config.selectors.buttons.pause),restart:W.call(this,this.config.selectors.buttons.restart),rewind:W.call(this,this.config.selectors.buttons.rewind),fastForward:W.call(this,this.config.selectors.buttons.fastForward),mute:W.call(this,this.config.selectors.buttons.mute),pip:W.call(this,this.config.selectors.buttons.pip),airplay:W.call(this,this.config.selectors.buttons.airplay),settings:W.call(this,this.config.selectors.buttons.settings),captions:W.call(this,this.config.selectors.buttons.captions),fullscreen:W.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=W.call(this,this.config.selectors.progress),this.elements.inputs={seek:W.call(this,this.config.selectors.inputs.seek),volume:W.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:W.call(this,this.config.selectors.display.buffer),currentTime:W.call(this,this.config.selectors.display.currentTime),duration:W.call(this,this.config.selectors.display.duration)},S.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(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 i="http://www.w3.org/2000/svg",s=eP.getIconUrl.call(this),n="".concat(!s.cors?s.url:"","#").concat(this.config.iconPrefix),l=document.createElementNS(i,"svg");L(l,N(t,{"aria-hidden":"true",focusable:"false"}));let a=document.createElementNS(i,"use"),r="".concat(n,"-").concat(e);return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",r),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r),l.appendChild(a),l},createLabel(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=ek.get(e,this.config);return I("span",{...t,class:[t.class,this.config.classNames.hidden].filter(
1Boolean).join(" ")},i)},createBadge(e){if(S.empty(e))return null;let t=I("span",{class:this.config.classNames.menu.value});return t.appendChild(I("span",{class:this.config.classNames.menu.badge},e)),t},createButton(e,t){let i=N({},t),s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.toString();return(t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.toString();return t=ey(t,"-"," "),t=eb(t=ey(t,"_"," ")),ey(t," ","")}(t)).charAt(0).toLowerCase()+t.slice(1)}(e),n={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(e=>{Object.keys(i).includes(e)&&(n[e]=i[e],delete i[e])}),"button"===n.element&&!Object.keys(i).includes("type")&&(i.type="button"),Object.keys(i).includes("class")?!i.class.split(" ").includes(this.config.classNames.control)&&N(i,{class:"".concat(i.class," ").concat(this.config.classNames.control)}):i.class=this.config.classNames.control,e){case"play":n.toggle=!0,n.label="play",n.labelPressed="pause",n.icon="play",n.iconPressed="pause";break;case"mute":n.toggle=!0,n.label="mute",n.labelPressed="unmute",n.icon="volume",n.iconPressed="muted";break;case"captions":n.toggle=!0,n.label="enableCaptions",n.labelPressed="disableCaptions",n.icon="captions-off",n.iconPressed="captions-on";break;case"fullscreen":n.toggle=!0,n.label="enterFullscreen",n.labelPressed="exitFullscreen",n.icon="enter-fullscreen",n.iconPressed="exit-fullscreen";break;case"play-large":i.class+=" ".concat(this.config.classNames.control,"--overlaid"),s="play",n.label="play",n.icon="play";break;default:S.empty(n.label)&&(n.label=s),S.empty(n.icon)&&(n.icon=e)}let l=I(n.element);return n.toggle?(l.appendChild(eP.createIcon.call(this,n.iconPressed,{class:"icon--pressed"})),l.appendChild(eP.createIcon.call(this,n.icon,{class:"icon--not-pressed"})),l.appendChild(eP.createLabel.call(this,n.labelPressed,{class:"label--pressed"})),l.appendChild(eP.createLabel.call(this,n.label,{class:"label--not-pressed"}))):(l.appendChild(eP.createIcon.call(this,n.icon)),l.appendChild(eP.createLabel.call(this,n.label))),N(i,D(this.config.selectors.buttons[s],i)),L(l,i),"play"===s?(S.array(this.elements.buttons[s])||(this.elements.buttons[s]=[]),this.elements.buttons[s].push(l)):this.elements.buttons[s]=l,l},createRange(e,t){let i=I("input",N(D(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":ek.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=i,eP.updateRangeFill.call(this,i),g.setup(i),i},createProgress(e,t){let i=I("progress",N(D(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if("volume"!==e){i.appendChild(I("span",null,"0"));let t={played:"played",buffer:"buffered"}[e],s=t?ek.get(t,this.config):"";i.textContent="% ".concat(s.toLowerCase())}return this.elements.display[e]=i,i},createTime(e,t){let i=D(this.config.selectors.display[e],t),s=I("div",N(i,{class:"".concat(i.class?i.class:""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":ek.get(e,this.config),role:"timer"}),"00:00");return this.elements.display[e]=s,s},bindMenuItemShortcuts(e,t){Q.call(this,e,"keydown keyup",i=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(i.key)||(i.preventDefault(),i.stopPropagation(),"keydown"===i.type))return;let s=V(e,'[role="menuitemradio"]');if(!s&&[" ","ArrowRight"].includes(i.key))eP.showMenuPanel.call(this,t,!0);else{let t;" "!==i.key&&("ArrowDown"===i.key||s&&"ArrowRight"===i.key?(t=e.nextElementSibling,S.element
1(t)||(t=e.parentNode.firstElementChild)):(t=e.previousElementSibling,S.element(t)||(t=e.parentNode.lastElementChild)),B.call(this,t,!0))}},!1),Q.call(this,e,"keyup",e=>{"Return"===e.key&&eP.focusFirstMenuItem.call(this,null,!0)})},createMenuItem(e){let{value:t,list:i,type:s,title:n,badge:l=null,checked:a=!1}=e,r=D(this.config.selectors.inputs[s]),o=I("button",N(r,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(r.class?r.class:"").trim(),"aria-checked":a,value:t})),c=I("span");c.innerHTML=n,S.element(l)&&c.appendChild(l),o.appendChild(c),Object.defineProperty(o,"checked",{enumerable:!0,get:()=>"true"===o.getAttribute("aria-checked"),set(e){e&&Array.from(o.parentNode.children).filter(e=>V(e,'[role="menuitemradio"]')).forEach(e=>e.setAttribute("aria-checked","false")),o.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(o,"click keyup",e=>{if(!S.keyboardEvent(e)||" "===e.key){switch(e.preventDefault(),e.stopPropagation(),o.checked=!0,s){case"language":this.currentTrack=Number(t);break;case"quality":this.quality=t;break;case"speed":this.speed=Number.parseFloat(t)}eP.showMenuPanel.call(this,"home",S.keyboardEvent(e))}},s,!1),eP.bindMenuItemShortcuts.call(this,o,s),i.appendChild(o)},formatTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return S.number(e)?eE(e,eS(this.duration)>0,t):e},updateTimeDisplay(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];S.element(e)&&S.number(t)&&(e.textContent=eP.formatTime(t,i))},updateVolume(){this.supported.ui&&(S.element(this.elements.inputs.volume)&&eP.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),S.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;S.element(e)&&(e.value=t,eP.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!S.event(e))return;let t=0,i=(e,t)=>{let i=S.number(t)?t:0,s=S.element(e)?e:this.elements.display.buffer;if(S.element(s)){s.value=i;let e=s.getElementsByTagName("span")[0];S.element(e)&&(e.childNodes[0].nodeValue=i)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":var s,n;s=this.currentTime,n=this.duration,t=0===s||0===n||Number.isNaN(s)||Number.isNaN(n)?0:(s/n*100).toFixed(2),"timeupdate"===e.type&&eP.setRange.call(this,this.elements.inputs.seek,t);break;case"playing":case"progress":i(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(e){let t=S.event(e)?e.target:e;if(S.element(t)&&"range"===t.getAttribute("type")){if(V(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);let e=eP.formatTime(this.currentTime),i=eP.formatTime(this.duration),s=ek.get("seekLabel",this.config);t.setAttribute("aria-valuetext",s.replace("{currentTime}",e).replace("{duration}",i))}else if(V(t,this.config.selectors.inputs.volume)){let e=100*t.value;t.setAttribute("aria-valuenow",e),t.setAttribute("aria-valuetext","".concat(e.toFixed(1),"%"))}else t.setAttribute("aria-valuenow",t.value);(eg.isWebKit||eg.isIPadOS)&&t.style.setProperty("--value","".concat(t.value/t.max*100,"%"))}},updateSeekTooltip(e){var t,i;if(!this.config.tooltips.seek||!S.element(this.elements.inputs.seek)||!S.element(this.elements.display.seekTooltip)||0===this.duration)return;let s=this.elements.display.seekTooltip,n="".concat(this.config.classNames.tooltip,"--visible"),l=e=>R(s,n,e);if(this.touch)return void l(!1);let a=0,r=this.elements.progress.getBoundingClientRect();if(S.event(e)){let t=e.pageX-e.clientX;a=100/r.width*(e.pageX-r.left-t)}else{if(!F(s,n))return;a=Number.parseFloat(s.style.left,10)}a<0?a=0:a>100&&(a=100);let o=this.duration/100*a;s.textContent=eP.formatTime(o);let c=null==(t=this.config.markers)||null==(i=t.points)?void 0:i.find(e=>{let{time:t}=e;return t===Math.round(o)});c&&s.insertAdjacentHTML("afterbegin","".concat(c.label,"<br>")),s.style.left="".concat(a,"%"),S.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&l("mouseenter"
1===e.type)},timeUpdate(e){let t=!S.element(this.elements.display.duration)&&this.config.invertTime;eP.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||eP.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=0x100000000){H(this.elements.display.currentTime,!0),H(this.elements.progress,!0);return}S.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);let e=S.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&eP.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&eP.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&eP.setMarkers.call(this),eP.updateSeekTooltip.call(this)},toggleMenuButton(e,t){H(this.elements.settings.buttons[e],!t)},updateSetting(e,t,i){let s=this.elements.settings.panels[e],n=null,l=t;if("captions"===e)n=this.currentTrack;else{if(n=S.empty(i)?this[e]:i,S.empty(n)&&(n=this.config[e].default),!S.empty(this.options[e])&&!this.options[e].includes(n))return void this.debug.warn("Unsupported value of '".concat(n,"' for ").concat(e));if(!this.config[e].options.includes(n))return void this.debug.warn("Disabled value of '".concat(n,"' for ").concat(e))}if(S.element(l)||(l=s&&s.querySelector('[role="menu"]')),!S.element(l))return;this.elements.settings.buttons[e].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=eP.getLabel.call(this,e,n);let a=l&&l.querySelector('[value="'.concat(n,'"]'));S.element(a)&&(a.checked=!0)},getLabel(e,t){switch(e){case"speed":return 1===t?ek.get("normal",this.config):"".concat(t,"&times;");case"quality":if(S.number(t)){let e=ek.get("qualityLabel.".concat(t),this.config);if(!e.length)return"".concat(t,"p");return e}return eb(t);case"captions":return ex.getLabel.call(this);default:return null}},setQualityMenu(e){if(!S.element(this.elements.settings.panels.quality))return;let t="quality",i=this.elements.settings.panels.quality.querySelector('[role="menu"]');S.array(e)&&(this.options.quality=ei(e).filter(e=>this.config.quality.options.includes(e)));let s=!S.empty(this.options.quality)&&this.options.quality.length>1;if(eP.toggleMenuButton.call(this,t,s),j(i),eP.checkMenu.call(this),!s)return;let n=e=>{let t=ek.get("qualityBadge.".concat(e),this.config);return t.length?eP.createBadge.call(this,t):null};this.options.quality.sort((e,t)=>{let i=this.config.quality.options;return i.indexOf(e)>i.indexOf(t)?1:-1}).forEach(e=>{eP.createMenuItem.call(this,{value:e,list:i,type:t,title:eP.getLabel.call(this,"quality",e),badge:n(e)})}),eP.updateSetting.call(this,t,i)},setCaptionsMenu(){if(!S.element(this.elements.settings.panels.captions))return;let e="captions",t=this.elements.settings.panels.captions.querySelector('[role="menu"]'),i=ex.getTracks.call(this),s=!!i.length;if(eP.toggleMenuButton.call(this,e,s),j(t),eP.checkMenu.call(this),!s)return;let n=i.map((e,i)=>({value:i,checked:this.captions.toggled&&this.currentTrack===i,title:ex.getLabel.call(this,e),badge:e.language&&eP.createBadge.call(this,e.language.toUpperCase()),list:t,type:"language"}));n.unshift({value:-1,checked:!this.captions.toggled,title:ek.get("disabled",this.config),list:t,type:"language"}),n.forEach(eP.createMenuItem.bind(this)),eP.updateSetting.call(this,e,t)},setSpeedMenu(){if(!S.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 i=!S.empty(this.options.speed)&&this.options.speed.length>1;eP.toggleMenuButton.call(this,e,i),j(t),eP.checkMenu.call(this),i&&(this.options.speed.forEach(i=>{eP.createMenuItem.call(this,{value:i,list:t,type:e,title:eP.getLabel.call(this,"speed",i)})}),eP.updateSetting.call(this,e,t))},checkMenu(){let{buttons:e}=this.elements.settings,t=!S.empty(e)&&Object.values(e).some(e=>!e.hidden);H(this.elements.settings.menu,!t)},focusFirstMenuItem(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.elements.settings.popup.hidden)return;let i=e;
1S.element(i)||(i=Object.values(this.elements.settings.panels).find(e=>!e.hidden));let s=i.querySelector('[role^="menuitem"]');B.call(this,s,t)},toggleMenu(e){let{popup:t}=this.elements.settings,i=this.elements.buttons.settings;if(!S.element(t)||!S.element(i))return;let{hidden:s}=t,n=s;if(S.boolean(e))n=e;else if(S.keyboardEvent(e)&&"Escape"===e.key)n=!1;else if(S.event(e)){let s=S.function(e.composedPath)?e.composedPath()[0]:e.target,l=t.contains(s);if(l||!l&&e.target!==i&&n)return}i.setAttribute("aria-expanded",n),H(t,!n),R(this.elements.container,this.config.classNames.menu.open,n),n&&S.keyboardEvent(e)?eP.focusFirstMenuItem.call(this,null,!0):n||s||B.call(this,i,S.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 i=t.scrollWidth,s=t.scrollHeight;return O(t),{width:i,height:s}},showMenuPanel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(e));if(!S.element(i))return;let s=i.parentNode,n=Array.from(s.children).find(e=>!e.hidden);if(K.transitions&&!K.reducedMotion){s.style.width="".concat(n.scrollWidth,"px"),s.style.height="".concat(n.scrollHeight,"px");let e=eP.getMenuSize.call(this,i),t=e=>{e.target===s&&["width","height"].includes(e.propertyName)&&(s.style.width="",s.style.height="",J.call(this,s,E,t))};Q.call(this,s,E,t),s.style.width="".concat(e.width,"px"),s.style.height="".concat(e.height,"px")}H(n,!0),H(i,!1),eP.focusFirstMenuItem.call(this,i,t)}
1,setDownloadUrl(){let e=this.elements.buttons.download;S.element(e)&&e.setAttribute("href",this.download)},create(e){let{bindMenuItemShortcuts:t,createButton:i,createProgress:s,createRange:n,createTime:l,setQualityMenu:a,setSpeedMenu:r,showMenuPanel:o}=eP;this.elements.controls=null,S.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(i.call(this,"play-large"));let c=I("div",D(this.config.selectors.controls.wrapper));this.elements.controls=c;let u={class:"plyr__controls__item"};return ei(S.array(this.config.controls)?this.config.controls:[]).forEach(a=>{if("restart"===a&&c.appendChild(i.call(this,"restart",u)),"rewind"===a&&c.appendChild(i.call(this,"rewind",u)),"play"===a&&c.appendChild(i.call(this,"play",u)),"fast-forward"===a&&c.appendChild(i.call(this,"fast-forward",u)),"progress"===a){let t=I("div",{class:"".concat(u.class," plyr__progress__container")}),i=I("div",D(this.config.selectors.progress));if(i.appendChild(n.call(this,"seek",{id:"plyr-seek-".concat(e.id)})),i.appendChild(s.call(this,"buffer")),this.config.tooltips.seek){let e=I("span",{class:this.config.classNames.tooltip},"00:00");i.appendChild(e),this.elements.display.seekTooltip=e}this.elements.progress=i,t.appendChild(this.elements.progress),c.appendChild(t)}if("current-time"===a&&c.appendChild(l.call(this,"currentTime",u)),"duration"===a&&c.appendChild(l.call(this,"duration",u)),"mute"===a||"volume"===a){let{volume:t}=this.elements;if(S.element(t)&&c.contains(t)||(t=I("div",N({},u,{class:"".concat(u.class," plyr__volume").trim()})),this.elements.volume=t,c.appendChild(t)),"mute"===a&&t.appendChild(i.call(this,"mute")),"volume"===a&&!eg.isIos&&!eg.isIPadOS){let i={max:1,step:.05,value:this.config.volume};t.appendChild(n.call(this,"volume",N(i,{id:"plyr-volume-".concat(e.id)})))}}if("captions"===a&&c.appendChild(i.call(this,"captions",u)),"settings"===a&&!S.empty(this.config.settings)){let s=I("div",N({},u,{class:"".concat(u.class," plyr__menu").trim(),hidden:""}));s.appendChild(i.call(this,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(e.id),"aria-expanded":!1}));let n=I("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(e.id),hidden:""}),l=I("div"),a=I("div",{id:"plyr-settings-".concat(e.id,"-home")}),r=I("div",{role:"menu"});a.appendChild(r),l.appendChild(a),this.elements.settings.panels.home=a,this.config.settings.forEach(i=>{let s=I("button",N(D(this.config.selectors.buttons.settings),{type:"button",class:"".concat(this.config.classNames.control," ").concat(this.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));t.call(this,s,i),Q.call(this,s,"click",()=>{o.call(this,i,!1)});let n=I("span",null,ek.get(i,this.config)),a=I("span",{class:this.config.classNames.menu.value});a.innerHTML=e[i],n.appendChild(a),s.appendChild(n),r.appendChild(s);let c=I("div",{id:"plyr-settings-".concat(e.id,"-").concat(i),hidden:""}),u=I("button",{type:"button",class:"".concat(this.config.classNames.control," ").concat(this.config.classNames.control,"--back")});u.appendChild(I("span",{"aria-hidden":!0},ek.get(i,this.config))),u.appendChild(I("span",{class:this.config.classNames.hidden},ek.get("menuBack",this.config))),Q.call(this,c,"keydown",e=>{"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),o.call(this,"home",!0))},!1),Q.call(this,u,"click",()=>{o.call(this,"home",!1)}),c.appendChild(u),c.appendChild(I("div",{role:"menu"})),l.appendChild(c),this.elements.settings.buttons[i]=s,this.elements.settings.panels[i]=c}),n.appendChild(l),s.appendChild(n),c.appendChild(s),this.elements.settings.popup=n,this.elements.settings.menu=s}if("pip"===a&&K.pip&&c.appendChild(i.call(this,"pip",u)),"airplay"===a&&K.airplay&&c.appendChild(i.call(this,"airplay",u)),"download"===a){let e=N({},u,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(e.download="");let{download:t}=this.config.urls;!S.url(t)&&this.isEmbed&&N(e,{icon:"logo-".concat(this.provider),label:this.provider}),c.appendChild(i.call(this,"download",e))}"fullscreen"===a&&c.appendChild(i.call(this,"fullscreen",u))}),this.isHTML5&&a.call(this,eh.getQualityOptions.call(this)),r.call(this),c},inject(){let e,t;if(this.config.loadSprite){let e=eP.getIconUrl.call(this);e.cors&&eA(e.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let i=null;this.elements.controls=null;let s={id:this.id,seektime:this.config.seekTime,title:this.config.title},n=!0;
1if(S.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,s)),this.config.controls||(this.config.controls=[]),S.element(this.config.controls)||S.string(this.config.controls)?i=this.config.controls:(i=eP.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:ex.getLabel.call(this)}),n=!1),n&&S.string(this.config.controls)&&(t=i,Object.entries(s).forEach(e=>{let[i,s]=e;t=ey(t,"{".concat(i,"}"),s)}),i=t),S.string(this.config.selectors.controls.container)&&(e=document.querySelector(this.config.selectors.controls.container)),S.element(e)||(e=this.elements.container),e[S.element(i)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",i),S.element(this.elements.controls)||eP.findElements.call(this),!S.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:()=>F(e,t),set(){let i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];R(e,t,i),e.setAttribute("aria-pressed",i?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(t=>{S.array(t)||S.nodeList(t)?Array.from(t).filter(Boolean).forEach(e):e(t)})}if(eg.isEdge&&P(e),this.config.tooltips.controls){let{classNames:e,selectors:t}=this.config,i="".concat(t.controls.wrapper," ").concat(t.labels," .").concat(e.hidden);Array.from(U.call(this,i)).forEach(e=>{R(e,this.config.classNames.hidden,!1),R(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(e){}},setMarkers(){var e,t;if(!this.duration||this.elements.markers)return;let i=null==(e=this.config.markers)||null==(t=e.points)?void 0:t.filter(e=>{let{time:t}=e;return t>0&&t<this.duration});if(!(null!=i&&i.length))return;let s=document.createDocumentFragment(),n=document.createDocumentFragment(),l=null,a="".concat(this.config.classNames.tooltip,"--visible"),r=e=>R(l,a,e);i.forEach(e=>{let t=I("span",{class:this.config.classNames.marker},""),i="".concat(e.time/this.duration*100,"%");l&&(t.addEventListener("mouseenter",()=>{e.label||(l.style.left=i,l.innerHTML=e.label,r(!0))}),t.addEventListener("mouseleave",()=>{r(!1)})),t.addEventListener("click",()=>{this.currentTime=e.time}),t.style.left=i,n.appendChild(t)}),s.appendChild(n),this.config.tooltips.seek||(l=I("span",{class:this.config.classNames.tooltip},""),s.appendChild(l)),this.elements.markers={points:n,tip:l},this.elements.progress.appendChild(s)}};function eM(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=e;if(t){let e=document.createElement("a");e.href=i,i=e.href}try{return new URL(i)}catch(e){return null}}function eN(e){let t=new URLSearchParams;return S.object(e)&&Object.entries(e).forEach(e=>{let[i,s]=e;t.set(i,s)}),t}let ex={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!K.textTracks){S.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&eP.setCaptionsMenu.call(this);return}if(!S.element(this.elements.captions)){var e,t;this.elements.captions=I("div",D(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),e=this.elements.captions,t=this.elements.wrapper,S.element(e)&&S.element(t)&&t.parentNode.insertBefore(e,t.nextSibling)}eg.isIE&&window.URL&&Array.from(this.media.querySelectorAll("track")).forEach(e=>{let t=e.getAttribute("src"),i=eM(t);null!==i&&i.hostname!==window.location.href.hostname&&["http:","https:"].includes(i.protocol)&&eC(t,"blob").then(t=>{e.setAttribute("src",window.URL.createObjectURL(t))}).catch(()=>{O(e)})});let i=ei((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(e=>e.split("-")[0])),s=(this.storage.get("language")||this.captions.language||this.config.captions.language||"auto").toLowerCase();"auto"===s&&([s]=i);let n=this.storage.get("captions")||this.captions.active;if(S.boolean(n)||({active:n}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:n,language:s,languages:i}),this.isHTML5){let e=this.config.captions.update?"addtrack removetrack":"removetrack";Q.call(this,this.media.textTracks,e,ex.update.bind(this))}setTimeout(ex.update.bind(this),0)},update(){let e=ex.getTracks.call(this,!0),{active:t,language:i,meta:s,currentTrackNode:n}=this.captions,l=!!e.find(e=>e.language===i);this.isHTML5&&this.isVideo&&e.filter(e=>
1!s.get(e)).forEach(e=>{this.debug.log("Track added",e),s.set(e,{default:"showing"===e.mode}),"showing"===e.mode&&(e.mode="hidden"),Q.call(this,e,"cuechange",()=>ex.updateCues.call(this))}),(l&&this.language!==i||!e.includes(n))&&(ex.setLanguage.call(this,i),ex.toggle.call(this,t&&l)),this.elements&&R(this.elements.container,this.config.classNames.captions.enabled,!S.empty(e)),S.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&eP.setCaptionsMenu.call(this)},toggle(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!this.supported.ui)return;let{toggled:i}=this.captions,s=this.config.classNames.captions.active,n=S.nullOrUndefined(e)?!i:e;if(n!==i){if(t||(this.captions.active=n,this.storage.set({captions:n})),!this.language&&n&&!t){let e=ex.getTracks.call(this),t=ex.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);this.captions.language=t.language,ex.set.call(this,e.indexOf(t));return}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=n),R(this.elements.container,s,n),this.captions.toggled=n,eP.updateSetting.call(this,"captions"),G.call(this,this.media,n?"captionsenabled":"captionsdisabled")}setTimeout(()=>{n&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=ex.getTracks.call(this);if(-1===e)return void ex.toggle.call(this,!1,t);if(!S.number(e))return void this.debug.warn("Invalid caption argument",e);if(!(e in i))return void this.debug.warn("Track not found",e);if(this.captions.currentTrack!==e){this.captions.currentTrack=e;let s=i[e],{language:n}=s||{};this.captions.currentTrackNode=s,eP.updateSetting.call(this,"captions"),t||(this.captions.language=n,this.storage.set({language:n})),this.isVimeo&&this.embed.enableTextTrack(n,null,!1),G.call(this,this.media,"languagechange")}ex.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&ex.updateCues.call(this)},setLanguage(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!S.string(e))return void this.debug.warn("Invalid language argument",e);let i=e.toLowerCase();this.captions.language=i;let s=ex.getTracks.call(this),n=ex.findTrack.call(this,[i]);ex.set.call(this,s.indexOf(n),t)},getTracks(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];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){let t,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=ex.getTracks.call(this),n=e=>Number((this.captions.meta.get(e)||{}).default),l=Array.from(s).sort((e,t)=>n(t)-n(e));return e.every(e=>!(t=l.find(t=>t.language===e))),t||(i?l[0]:void 0)},getCurrentTrack(){return ex.getTracks.call(this)[this.currentTrack]},getLabel(e){let t=e;return(!S.track(t)&&K.textTracks&&this.captions.toggled&&(t=ex.getCurrentTrack.call(this)),S.track(t))?S.empty(t.label)?S.empty(t.language)?ek.get("enabled",this.config):e.language.toUpperCase():t.label:ek.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!S.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!S.nullOrUndefined(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let t=e;t||(t=Array.from((ex.getCurrentTrack.call(this)||{}).activeCues||[]).map(e=>e.getCueAsHTML()).map(ev));let i=t.map(e=>e.trim()).join("\n");if(i!==this.elements.captions.innerHTML){j(this.elements.captions);let e=I("span",D(this.config.selectors.caption));e.innerHTML=i,this.elements.captions.appendChild(e),G.call(this,this.media,"cuechange")}}},eL={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.8.4/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","quality","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:"S
1D"}},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"],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:"",withCredentials:!1},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:[]}},eI={active:"picture-in-picture",inactive:"inline"},e_={html5:"html5",youtube:"youtube",vimeo:"vimeo"},eO={audio:"audio",video:"video"};function ej(){}
1class eq{get log(){return this.enabled?Function.prototype.bind.call(console.log,console):ej}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):ej}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):ej}constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}}class eD{static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return eD.nativeSupported&&!this.forceFallback}static get prefix(){if(S.function(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some(t=>!!(S.function(document["".concat(t,"ExitFullscreen")])||S.function(document["".concat(t,"CancelFullScreen")]))&&(e=t,!0)),e}static get property(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,eD.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||eD.nativeSupported||!eg.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!eD.nativeSupported||this.forceFallback)return F(this.target,this.player.config.classNames.fullscreen.fallback);let e=this.prefix?this.target.getRootNode()["".concat(this.prefix).concat(this.property,"Element")]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){var e;return eg.isIos&&this.player.config.fullscreen.iosNative?this.player.media:null!=(e=this.player.elements.fullscreen)?e:this.player.elements.container}constructor(e){var t=this;s(this,"onChange",()=>{if(!this.supported)return;let e=this.player.elements.buttons.fullscreen;S.element(e)&&(e.pressed=this.active);let t=this.target===this.player.media?this.target:this.player.elements.container;G.call(this.player,t,this.active?"enterfullscreen":"exitfullscreen",!0)}),s(this,"toggleFallback",function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){var i,s;t.scrollPosition={x:null!=(i=window.scrollX)?i:0,y:null!=(s=window.scrollY)?s:0}}else window.scrollTo(t.scrollPosition.x,t.scrollPosition.y);if(document.body.style.overflow=e?"hidden":"",R(t.target,t.player.config.classNames.fullscreen.fallback,e),eg.isIos){let i=document.head.querySelector('meta[name="viewport"]'),s="viewport-fit=cover";i||(i=document.createElement("meta")).setAttribute("name","viewport");let n=S.string(i.content)&&i.content.includes(s);e?(t.cleanupViewport=!n,n||(i.content+=",".concat(s))):t.cleanupViewport&&(i.content=i.content.split(",").filter(e=>e.trim()!==s).join(","))}t.onChange()}),s(this,"trapFocus",e=>{if(eg.isIos||eg.isIPadOS||!this.active||"Tab"!==e.key)return;let t=document.activeElement,i=U.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[s]=i,n=i[i.length-1];t!==n||e.shiftKey?t===s&&e.shiftKey&&(n.focus(),e.preventDefault()):(s.focus(),e.preventDefault())}),s(this,"update",()=>{if(this.supported){let e;e=this.forceFallback?"Fallback (forced)":eD.nativeSupported?"Native":"Fallback",this.player.debug.log("".concat(e," fullscreen enabled"))}else this.player.debug.log("Fullscreen not supported and fallback disabled");R(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),s(this,"enter",()=>{this.supported&&(eg.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!eD.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?S.empty(this.prefix)||this.target["".concat(this.prefix,"Request").concat(this.property)]():this.target.requestFullscreen({navigationUI:"hide"}))}),s(this,"exit",()=>{if(this.supported)if(eg.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),et(this.player.play());else if(!eD.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!S.empty(this.prefix)){let e="moz"===this.prefix?"Cancel":"Exit";document["".concat(this.prefix).concat(e).concat(this.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),s(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=e,this.prefix=eD.prefix,this.property=eD.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===e.config.fullscreen.fallback,this.player.elements.fullscreen=e.config.fullscreen.container&&function(e,t){let{prototype:i}=Element;return(i.closest||function(){let e=this;do{if(V.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}).call(e,t)}(this.player.elements.container,e.config.fullscreen.container),Q.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),()=>{this.onChange()}),Q.call(this.player,this.player.elements.container,"dblclick",e=>
1{S.element(this.player.elements.controls)&&this.player.elements.controls.contains(e.target)||this.player.listeners.proxy(e,this.toggle,"fullscreen")}),Q.call(this,this.player.elements.container,"keydown",e=>this.trapFocus(e)),this.update()}}function eH(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise((i,s)=>{let n=new Image,l=()=>{delete n.onload,delete n.onerror,(n.naturalWidth>=t?i:s)(n)};Object.assign(n,{onload:l,onerror:l,src:e})})}let eR={addStyleHook(){R(this.elements.container,this.config.selectors.container.replace(".",""),!0),R(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui){this.debug.warn("Basic support only for ".concat(this.provider," ").concat(this.type)),eR.toggleNativeControls.call(this,!0);return}S.element(this.elements.controls)||(eP.inject.call(this),this.listeners.controls()),eR.toggleNativeControls.call(this),this.isHTML5&&ex.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,eP.updateVolume.call(this),eP.timeUpdate.call(this),eP.durationUpdate.call(this),eR.checkPlaying.call(this),R(this.elements.container,this.config.classNames.pip.supported,K.pip&&this.isHTML5&&this.isVideo),R(this.elements.container,this.config.classNames.airplay.supported,K.airplay&&this.isHTML5),R(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{G.call(this,this.media,"ready")},0),eR.setTitle.call(this),this.poster&&eR.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&eP.durationUpdate.call(this),this.config.mediaMetadata&&eP.setMediaMetadata.call(this)},setTitle(){let e=ek.get("play",this.config);if(S.string(this.config.title)&&!S.empty(this.config.title)&&(e+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach(t=>{t.setAttribute("aria-label",e)}),this.isEmbed){let e=W.call(this,"iframe");if(!S.element(e))return;let t=S.empty(this.config.title)?"video":this.config.title,i=ek.get("frameTitle",this.config);e.setAttribute("title",i.replace("{title}",t))}},togglePoster(e){R(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return t&&this.poster?Promise.reject(Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),ee.call(this).then(()=>eH(e)).catch(t=>{throw e===this.poster&&eR.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('".concat(e,"')"),backgroundSize:""}),eR.togglePoster.call(this,!0),e)))},checkPlaying(e){R(this.elements.container,this.config.classNames.playing,this.playing),R(this.elements.container,this.config.classNames.paused,this.paused),R(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",ek.get(this.playing?"pause":"play",this.config))}),S.event(e)&&"timeupdate"===e.type||eR.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{R(this.elements.container,this.config.classNames.loading,this.loading),eR.toggleControls.call(this)},250*!!this.loading)},toggleControls(e){let{controls:t}=this.elements;if(t&&this.config.hideControls){let i=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(e||this.loading||this.paused||t.pressed||t.hover||i))}},migrateStyles(){Object.values({...this.media.style}).filter(e=>!S.empty(e)&&S.string(e)&&e.startsWith("--plyr")).forEach(e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)}),S.empty(this.media.style)&&this.media.removeAttribute("style")}};class eF{handleKey(e){let{player:t}=this,{elements:i}=t,{key:s,type:n,altKey:l,ctrlKey:a,metaKey:r,shiftKey:o}=e,c="keydown"===n,u=c&&s===this.lastKey;if(!l&&!a&&!r&&!o&&s)if(c){let n=document.activeElement;
1if(S.element(n)){let{editable:s}=t.config.selectors,{seek:l}=i.inputs;if(n!==l&&V(n,s)||" "===e.key&&V(n,'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(s)&&(e.preventDefault(),e.stopPropagation()),s){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":var h;u||(h=Number.parseInt(s,10),t.currentTime=t.duration/10*h);break;case" ":case"k":u||et(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}"Escape"===s&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=s}else this.lastKey=null}toggleMenu(e){eP.toggleMenu.call(this.player,e)}constructor(e){var t=this;s(this,"firstTouch",()=>{let{player:e}=this,{elements:t}=e;e.touch=!0,R(t.container,e.config.classNames.isTouch,!0)}),s(this,"global",function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],{player:i}=t;i.config.keyboard.global&&X.call(i,window,"keydown keyup",t.handleKey,e,!1),X.call(i,document.body,"click",t.toggleMenu,e),$.call(i,document.body,"touchstart",t.firstTouch)}),s(this,"container",()=>{let{player:e}=this,{config:t,elements:i,timers:s}=e;!t.keyboard.global&&t.keyboard.focused&&Q.call(e,i.container,"keydown keyup",this.handleKey,!1),Q.call(e,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",t=>{let{controls:n}=i;n&&"enterfullscreen"===t.type&&(n.pressed=!1,n.hover=!1);let l=["touchstart","touchmove","mousemove"].includes(t.type),a=0;l&&(eR.toggleControls.call(e,!0),a=e.touch?3e3:2e3),clearTimeout(s.controls),s.controls=setTimeout(()=>eR.toggleControls.call(e,!1),a)});let n=()=>{if(!e.isVimeo||e.config.vimeo.premium)return;let t=i.wrapper,{active:s}=e.fullscreen,[n,l]=eo.call(e),a=en("aspect-ratio: ".concat(n," / ").concat(l));if(!s)return void(a?(t.style.width=null,t.style.height=null):(t.style.maxWidth=null,t.style.margin=null));let[r,o]=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],c=r/o>n/l;a?(t.style.width=c?"auto":"100%",t.style.height=c?"100%":"auto"):(t.style.maxWidth=c?"".concat(o/l*n,"px"):null,t.style.margin=c?"0 auto":null)},l=()=>{clearTimeout(s.resized),s.resized=setTimeout(n,50)};Q.call(e,i.container,"enterfullscreen exitfullscreen",t=>{let{target:s}=e.fullscreen;s!==i.container||!e.isEmbed&&S.empty(e.config.ratio)||(n(),("enterfullscreen"===t.type?Q:J).call(e,window,"resize",l))})}),s(this,"media",()=>{let{player:e}=this,{elements:t}=e;if(Q.call(e,e.media,"timeupdate seeking seeked",t=>eP.timeUpdate.call(e,t)),Q.call(e,e.media,"durationchange loadeddata loadedmetadata",t=>eP.durationUpdate.call(e,t)),Q.call(e,e.media,"ended",()=>{e.isHTML5&&e.isVideo&&e.config.resetOnEnd&&(e.restart(),e.pause())}),Q.call(e,e.media,"progress playing seeking seeked",t=>eP.updateProgress.call(e,t)),Q.call(e,e.media,"volumechange",t=>eP.updateVolume.call(e,t)),Q.call(e,e.media,"playing play pause ended emptied timeupdate",t=>eR.checkPlaying.call(e,t)),Q.call(e,e.media,"waiting canplay seeked playing",t=>eR.checkLoading.call(e,t)),e.supported.ui&&e.config.clickToPlay&&!e.isAudio){let i=W.call(e,".".concat(e.config.classNames.video));if(!S.element(i))return;Q.call(e,t.container,"click",s=>{([t.container,i].includes(s.target)||i.contains(s.target))&&(e.touch&&e.config.hideControls||(e.ended?(this.proxy(s,e.restart,"restart"),this.proxy(s,()=>{et(e.play())},"play")):this.proxy(s,()=>{et(e.togglePlay())},"play")))})}e.supported.ui&&e.config.disableContextMenu&&Q.call(e,t.wrapper,"contextmenu",e=>{e.preventDefault()},!1),Q.call(e,e.media,"volumechange",()=>{e.storage.set({volume:e.volume,muted:e.muted})}),Q.call(e,e.media,"ratechange",()=>{eP.updateSetting.call(e,"speed"),e.storage.set({speed:e.speed})}),Q.call(e,e.media,"qualitychange",t=>{eP.updateSetting.call(e,"quality",null,t.detail.quality)}),Q.call(e,e.media,"ready qualitychange",()=>{eP.setDownloadUrl.call(e)});let i=e.config.events.concat(["keyup","keydown"]).join(" ");Q.call(e,e.media,i,i=>{let{detail:s={}}=i;"error"===i.type&&(s=e.media.error),G.call(e,t.container,i.type,!0,s)})}),s(this,"proxy",(e,t,i)=>{let{player:s}=this,n=s.config.listeners[i],l=S.function(n),a=!0;l&&(a=n.call(s,e)),!1!==a&&S.function(t)&&t.call(s,e)}),s(this,"bind",function(e,i,s,n){let l=!(arguments.length>
14)||void 0===arguments[4]||arguments[4],{player:a}=t,r=a.config.listeners[n],o=S.function(r);Q.call(a,e,i,e=>t.proxy(e,s,n),l&&!o)}),s(this,"controls",()=>{let{player:e}=this,{elements:t}=e,i=eg.isIE?"change":"input";t.buttons.play&&Array.from(t.buttons.play).forEach(t=>{this.bind(t,"click",()=>{et(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",()=>{G.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(),eP.toggleMenu.call(e,t)}
1,null,!1),this.bind(t.buttons.settings,"keyup",t=>{if([" ","Enter"].includes(t.key)){if("Enter"===t.key)return void eP.focusFirstMenuItem.call(e,null,!0);t.preventDefault(),t.stopPropagation(),eP.toggleMenu.call(e,t)}},null,!1),this.bind(t.settings.menu,"keydown",t=>{"Escape"===t.key&&eP.toggleMenu.call(e,t)}),this.bind(t.inputs.seek,"mousedown mousemove",e=>{let i=t.progress.getBoundingClientRect(),s=e.pageX-e.clientX,n=100/i.width*(e.pageX-i.left-s);e.currentTarget.setAttribute("seek-value",n)}),this.bind(t.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",t=>{let i=t.currentTarget,s="play-on-seeked";if(S.keyboardEvent(t)&&!["ArrowLeft","ArrowRight"].includes(t.key))return;e.lastSeekTime=Date.now();let n=i.hasAttribute(s),l=["mouseup","touchend","keyup"].includes(t.type);n&&l?(i.removeAttribute(s),et(e.play())):!l&&e.playing&&(i.setAttribute(s,""),e.pause())}),eg.isIos&&Array.from(U.call(e,'input[type="range"]')).forEach(e=>this.bind(e,i,e=>P(e.target))),this.bind(t.inputs.seek,i,t=>{let i=t.currentTarget,s=i.getAttribute("seek-value");S.empty(s)&&(s=i.value),i.removeAttribute("seek-value"),e.currentTime=s/i.max*e.duration},"seek"),this.bind(t.progress,"mouseenter mouseleave mousemove",t=>eP.updateSeekTooltip.call(e,t)),this.bind(t.progress,"mousemove touchmove",t=>{let{previewThumbnails:i}=e;i&&i.loaded&&i.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:i}=e;i&&i.loaded&&i.startScrubbing(t)}),this.bind(t.progress,"mouseup touchend",t=>{let{previewThumbnails:i}=e;i&&i.loaded&&i.endScrubbing(t)}),eg.isWebKit&&Array.from(U.call(e,'input[type="range"]')).forEach(t=>{this.bind(t,"input",t=>eP.updateRangeFill.call(e,t.target))}),e.config.toggleInvert&&!S.element(t.display.duration)&&this.bind(t.display.currentTime,"click",()=>{0!==e.currentTime&&(e.config.invertTime=!e.config.invertTime,eP.timeUpdate.call(e))}),this.bind(t.inputs.volume,i,t=>{e.volume=t.target.value},"volume"),this.bind(t.controls,"mouseenter mouseleave",i=>{t.controls.hover=!e.touch&&"mouseenter"===i.type}),t.fullscreen&&Array.from(t.fullscreen.children).filter(e=>
1!e.contains(t.container)).forEach(i=>{this.bind(i,"mouseenter mouseleave",i=>{t.controls&&(t.controls.hover=!e.touch&&"mouseenter"===i.type)})}),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:i,timers:s}=e;R(t.controls,i.classNames.noTransition,!0),eR.toggleControls.call(e,!0),setTimeout(()=>{R(t.controls,i.classNames.noTransition,!1)},0);let n=this.touch?3e3:4e3;clearTimeout(s.controls),s.controls=setTimeout(()=>eR.toggleControls.call(e,!1),n)}),this.bind(t.inputs.volume,"wheel",t=>{let i=t.webkitDirectionInvertedFromDevice,[s,n]=[t.deltaX,-t.deltaY].map(e=>i?-e:e),l=Math.sign(Math.abs(s)>Math.abs(n)?s:n);e.increaseVolume(l/50);let{volume:a}=e.media;(1===l&&a<1||-1===l&&a>0)&&t.preventDefault()},"volume",!1)}),this.player=e,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)}}var eV={exports:{}},eU=(eV.exports,function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(function(){return r?eV.exports:(r=1,eV.exports=function(){var e=function(){},t={},i={},s={};function n(e,t){if(e){var n=s[e];if(i[e]=t,n)for(;n.length;)n[0](e,t),n.splice(0,1)}}function l(t,i){t.call&&(t={success:t}),i.length?(t.error||e)(i):(t.success||e)(t)}function a(i,s,a){var r,o;if(s&&s.trim&&(r=s),o=(r?a:s)||{},r)if(r in t)throw"LoadJS";else t[r]=!0;function c(t,s){!function(t,i,s){var n,l,a=(t=t.push?t:[t]).length,r=a,o=[];for(l=0,n=function(e,t,s){if("e"==t&&o.push(e),"b"==t)if(!s)return;else o.push(e);--a||i(o)};l<r;l++)!function t(i,s,n,l){var a,r,o,c=document,u=n.async,h=(n.numRetries||0)+1,d=n.before||e,m=i.replace(/[\?|#].*$/,""),p=i.replace(/^(css|img|module|nomodule)!/,"");if(l=l||0,/(^css!|\.css$)/.test(m))(o=c.createElement("link")).rel="stylesheet",o.href=p,(a="hideFocus"in o)&&o.relList&&(
1a=0,o.rel="preload",o.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(m))(o=c.createElement("img")).src=p;else if((o=c.createElement("script")).src=p,o.async=void 0===u||u,r="noModule"in o,/^module!/.test(m)){if(!r)return s(i,"l");o.type="module"}else if(/^nomodule!/.test(m)&&r)return s(i,"l");o.onload=o.onerror=o.onbeforeload=function(e){var r=e.type[0];if(a)try{o.sheet.cssText.length||(r="e")}catch(e){18!=e.code&&(r="e")}if("e"==r){if((l+=1)<h)return t(i,s,n,l)}else if("preload"==o.rel&&"style"==o.as)return o.rel="stylesheet";s(i,r,e.defaultPrevented)},!1!==d(i,o)&&c.head.appendChild(o)}(t[l],n,s)}(i,function(e){l(o,e),t&&l({success:t,error:s},e),n(r,e)},o)}if(o.returnPromise)return new Promise(c);c()}return a.ready=function(e,t){return!function(e,t){e=e.push?e:[e];var n,l,a,r=[],o=e.length,c=o;for(n=function(e,i){i.length&&r.push(e),--c||t(r)};o--;){if(a=i[l=e[o]]){n(l,a);continue}(s[l]=s[l]||[]).push(n)}}(e,function(e){l(t,e)}),a},a.done=function(e){n(e,[])},a.reset=function(){t={},i={},s={}},a.isDefined=function(e){return e in t},a}(),eV.exports)}()));function eW(e){return new Promise((t,i)=>{eU(e,{success:t,error:i})})}function eB(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,G.call(this,this.media,e?"play":"pause"))}let ez={setup(){let e=this;R(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,ec.call(e),S.object(window.Vimeo)?ez.ready.call(e):eW(e.config.urls.vimeo.sdk).then(()=>{ez.ready.call(e)}).catch(t=>{e.debug.warn("Vimeo SDK (player.js) failed to load",t)})},ready(){let e,t=this,i=t.config.vimeo,{premium:s,referrerPolicy:n,...l}=i,a=t.media.getAttribute("src"),r="";S.empty(a)?(a=t.media.getAttribute(t.config.attributes.embed.id),r=t.media.getAttribute(t.config.attributes.embed.hash)):r=function(e){let t=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*h=|\/)+([\d,a-f]+)/);return t&&5===t.length?t[4]:null}(a);let o=r?{h:r}:{};s&&Object.assign(l,{controls:!1,sidedock:!1});let c=eN({loop:t.config.loop.active,autoplay:t.autoplay,muted:t.muted,gesture:"media",playsinline:t.config.playsinline,...o,...l}),u=function(e){if(S.empty(e))return null;if(S.number(Number(e)))return e;let t=e.match(/^.*(vimeo.com\/|video\/)(\d+).*/);return t?t[2]:e}(a),h=I("iframe"),d=ef(t.config.urls.vimeo.iframe,u,c);if(h.setAttribute("src",d),h.setAttribute("allowfullscreen",""),h.setAttribute("allow","autoplay; fullscreen; picture-in-picture; encrypted-media; accelerometer; gyroscope"),S.empty(n)||h.setAttribute("referrerPolicy",n),s||!i.customControls)h.setAttribute("data-poster",t.poster),t.media=q(h,t.media);else{let e=I("div",{class:t.config.classNames.embedContainer,"data-poster":t.poster});e.appendChild(h),t.media=q(e,t.media)}i.customControls||eC(ef(t.config.urls.vimeo.api,d)).then(e=>{!S.empty(e)&&e.thumbnail_url&&eR.setPoster.call(t,e.thumbnail_url).catch(()=>{})}),t.embed=new window.Vimeo.Player(h,{autopause:t.config.autopause,muted:t.muted}),t.media.paused=!0,t.media.currentTime=0,t.supported.ui&&t.embed.disableTextTrack(),t.media.play=()=>(eB.call(t,!0),t.embed.play()),t.media.pause=()=>(eB.call(t,!1),t.embed.pause()),t.media.stop=()=>{t.pause(),t.currentTime=0};let{currentTime:m}=t.media;Object.defineProperty(t.media,"currentTime",{get:()=>m,set(e){let{embed:i,media:s,paused:n,volume:l}=t,a=n&&!i.hasPlayed;s.seeking=!0,G.call(t,s,"seeking"),Promise.resolve(a&&i.setVolume(0)).then(()=>i.setCurrentTime(e)).then(()=>a&&i.pause()).then(()=>a&&i.setVolume(l)).catch(()=>{})}});let p=t.config.speed.selected;Object.defineProperty(t.media,"playbackRate",{get:()=>p,set(e){t.embed.setPlaybackRate(e).then(()=>{p=e,G.call(t,t.media,"ratechange")}).catch(()=>{t.options.speed=[1]})}});let{volume:g}=t.config;Object.defineProperty(t.media,"volume",{get:()=>g,set(e){t.embed.setVolume(e).then(()=>{g=e,G.call(t,t.media,"volumechange")})}});let{muted:f}=t.config;Object.defineProperty(t.media,"muted",{get:()=>f,set(e){let i=!!S.boolean(e)&&e;t.embed.setMuted(!!i||t.config.muted).then(()=>{f=i,G.call(t,t.media,"volumechange")})}});let{loop:y}=t.config;Object.defineProperty(t.media,"loop",{get:()=>y,set(e){let i=S.boolean(e)?e:t.config.loop.active;t.embed.setLoop(i).then(()=>{y=i})}}),t.embed.getVideoUrl().then(i=>{e=i,eP.setDownloadUrl.call(t)}).catch(e=>{this.debug.warn(e)}),Object.defineProperty(t.media,"currentSrc",{get:()=>e}),Object.defineProperty(t.media,"ended",{get:()=>t.currentTime===t.duration}),Promise.all([t.embed.getVideoWidth(),t.embed.getVideoHeight()]).then(e=>{let[i,s]=e;t.embed.ratio=eu(i,s),ec.call(this)}
1),t.embed.setAutopause(t.config.autopause).then(e=>{t.config.autopause=e}),t.embed.getVideoTitle().then(e=>{t.config.title=e,eR.setTitle.call(this)}),t.embed.getCurrentTime().then(e=>{m=e,G.call(t,t.media,"timeupdate")}),t.embed.getDuration().then(e=>{t.media.duration=e,G.call(t,t.media,"durationchange")}),t.embed.getTextTracks().then(e=>{t.media.textTracks=e,ex.setup.call(t)}),t.embed.on("cuechange",e=>{let{cues:i=[]}=e,s=i.map(e=>(function(e){let t=document.createDocumentFragment(),i=document.createElement("div");return t.appendChild(i),i.innerHTML=e,t.firstChild.textContent})(e.text));ex.updateCues.call(t,s)}),t.embed.on("loaded",()=>{t.embed.getPaused().then(e=>{eB.call(t,!e),e||G.call(t,t.media,"playing")}),S.element(t.embed.element)&&t.supported.ui&&t.embed.element.setAttribute("tabindex",-1)}),t.embed.on("bufferstart",()=>{G.call(t,t.media,"waiting")}),t.embed.on("bufferend",()=>{G.call(t,t.media,"playing")}),t.embed.on("play",()=>{eB.call(t,!0),G.call(t,t.media,"playing")}),t.embed.on("pause",()=>{eB.call(t,!1)}),t.embed.on("timeupdate",e=>{t.media.seeking=!1,m=e.seconds,G.call(t,t.media,"timeupdate")}),t.embed.on("progress",e=>{t.media.buffered=e.percent,G.call(t,t.media,"progress"),1===Number.parseInt(e.percent,10)&&G.call(t,t.media,"canplaythrough"),t.embed.getDuration().then(e=>{e!==t.media.duration&&(t.media.duration=e,G.call(t,t.media,"durationchange"))})}),t.embed.on("seeked",()=>{t.media.seeking=!1,G.call(t,t.media,"seeked")}),t.embed.on("ended",()=>{t.media.paused=!0,G.call(t,t.media,"ended")}),t.embed.on("error",e=>{t.media.error=e,G.call(t,t.media,"error")}),i.customControls&&setTimeout(()=>eR.build.call(t),0)}};function eK(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,G.call(this,this.media,e?"play":"pause"))}let eY={setup(){if(R(this.elements.wrapper,this.config.classNames.embed,!0),S.object(window.YT)&&S.function(window.YT.Player))eY.ready.call(this);else{let e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{S.function(e)&&e(),eY.ready.call(this)},eW(this.config.urls.youtube.sdk).catch(e=>{this.debug.warn("YouTube API failed to load",e)})}},getTitle(e){eC(ef(this.config.urls.youtube.api,e)).then(e=>{if(S.object(e)){let{title:t,height:i,width:s}=e;this.config.title=t,eR.setTitle.call(this),this.embed.ratio=eu(s,i)}ec.call(this)}).catch(()=>{ec.call(this)})},ready(){var e;let t=this,i=t.config.youtube,s=t.media&&t.media.getAttribute("id");if(!S.empty(s)&&s.startsWith("youtube-"))return;let n=t.media.getAttribute("src");S.empty(n)&&(n=t.media.getAttribute(this.config.attributes.embed.id));let l=function(e){if(S.empty(e))return null;let t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&t[2]?t[2]:e}(n),a=I("div",{id:(e=t.provider,"".concat(e,"-").concat(Math.floor(1e4*Math.random()))),"data-poster":i.customControls?t.poster:void 0});if(t.media=q(a,t.media),i.customControls){let e=e=>"https://i.ytimg.com/vi/".concat(l,"/").concat(e,"default.jpg");eH(e("maxres"),121).catch(()=>eH(e("sd"),121)).catch(()=>eH(e("hq"))).then(e=>eR.setPoster.call(t,e.src)).then(e=>{e.includes("maxres")||(t.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}t.embed=new window.YT.Player(t.media,{videoId:l,host:i.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0,playerVars:N({},{autoplay:+!!t.config.autoplay,hl:t.config.hl,controls:t.supported.ui&&i.customControls?0:1,disablekb:1,playsinline:t.config.playsinline&&!t.config.fullscreen.iosNative?1:0,cc_load_policy:+!!t.captions.active,cc_lang_pref:t.config.captions.language,widget_referrer:window?window.location.href:null},i),events:{onError(e){if(!t.media.error){let i=e.data;t.media.error={code:i,message:({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."})[i]||"An unknown error occurred"},G.call(t,t.media,"error")}},onPlaybackRateChange(e){let i=e.target;t.media.playbackRate=i.getPlaybackRate(),G.call(t,t.media,"ratechange")},onReady(e){if(S.function(t.media.play))return;let s=e.target;eY.getTitle.call(t,l),t.media.play=()=>{eK.call(t,!0),s.playVideo()},t.media.pause=()=>{eK.call(t,!1),s.pauseVideo()},t.media.stop=()=>{s.stopVideo()},t.media.duration=s.getDuration(),t.media.paused=!0,t.media.currentTime=0,Object.defineProperty(t.media,"currentTime",{get:()=>Number(s.getCurrentTime()),set(e){t.paused&&!t.embed.hasPlayed&&t.embed.mute(),t.media.seeking=!0,G.call(t,t.media,"seeking"),s.seekTo(e)}}),Object.defineProperty(t.media,"playbackRate",{get:()=>s.getPlaybackRate(),set(e){s.setPlaybackRate(e)}});let{volume:n}=t.config;Object.defineProperty(t.media,"volume",{get:()=>n,set(e){n=e,s.setVolume(100*n),G.call(t,t.media,"volumechange")}});let{muted:a}=t.config;Object.defineProperty(t.media,"muted",{get:()=>a,set(e){let i=S.boolean(e)?e:a;a=i,s[i?"mute":"unMute"](),s.setVolume(100*n),G.call(t,t.media,"volumechange")}}),Object.defineProperty(t.media,"currentSrc",{get:()=>s.getVideoUrl()}),Object.defineProperty(t.media,"ended",{get:()=>t.currentTime===t.duration});let r=s.getAvailablePlaybackRates();t.options.speed=r.filter(e=>t.config.speed.options.includes(e)),t.supported.ui&&i.customControls&&t.media.setAttribute("tabindex",-1),G.call(t,t.media,"timeupdate"),G.call(t,t.media,"durationchange"),clearInterval(t.timers.buffering),t.timers.buffering=setInterval(()=>{t.media.buffered=s.getVideoLoadedFraction(),(null===t.media.lastBuffered||t.media.lastBuffered<t.media.buffered)&&G.call(t,t.media,"progress"),t.media.lastBuffered=t.media.buffered,1===t.media.buffered&&(clearInterval(t.timers.buffering),G.call(t,t.media,"canplaythrough"))},200),i.customControls&&setTimeout(()=>eR.build.call(t),50)},onStateChange(e){let s=e.target;switch(clearInterval(t.timers.playing),t.media.seeking&&[1,2].includes(e.data)&&(t.media.seeking=!1,G.call(t,t.media,"seeked")),e.data){case -1:G.call(t,t.media,"timeupdate"),t.media.buffered=s.getVideoLoadedFraction(),G.call(t,t.media,"progress");break;case 0:eK.call(t,!1),t.media.loop?(s.stopVideo(),s.playVideo()):G.call(t,t.media,"ended");break;
1case 1:i.customControls&&!t.config.autoplay&&t.media.paused&&!t.embed.hasPlayed?t.media.pause():(eK.call(t,!0),G.call(t,t.media,"playing"),t.timers.playing=setInterval(()=>{G.call(t,t.media,"timeupdate")},50),t.media.duration!==s.getDuration()&&(t.media.duration=s.getDuration(),G.call(t,t.media,"durationchange")));break;case 2:t.muted||t.embed.unMute(),eK.call(t,!1);break;case 3:G.call(t,t.media,"waiting")}G.call(t,t.elements.container,"statechange",!1,{code:e.data})}}})}},eX={setup(){if(!this.media)return void this.debug.warn("No media element found!");R(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),R(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&R(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=I("div",{class:this.config.classNames.video}),x(this.media,this.elements.wrapper),this.elements.poster=I("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?eh.setup.call(this):this.isYouTube?eY.setup.call(this):this.isVimeo&&ez.setup.call(this)}};class eQ{get enabled(){let{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!S.empty(e.publisherId)||S.url(e.tagUrl))}get tagUrl(){let{config:e}=this;if(S.url(e.tagUrl))return e.tagUrl;let t={AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId};return"".concat("https://go.aniview.com/api/adserver6/vast/","?").concat(eN(t))}constructor(e){var t=this;s(this,"load",()=>{this.enabled&&(S.object(window.google)&&S.object(window.google.ima)?this.ready():eW(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",Error("Google IMA SDK failed to load"))}))}),s(this,"ready",()=>{this.enabled||function(e){e.manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()}(this),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),s(this,"setupIMA",()=>{this.elements.container=I("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()}),s(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)}}),s(this,"pollCountdown",function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e){clearInterval(t.countdownTimer),t.elements.container.removeAttribute("data-badge-text");return}t.countdownTimer=setInterval(()=>{let e=eE(Math.max(t.manager.getRemainingTime(),0)),i="".concat(ek.get("advertisement",t.player.config)," - ").concat(e);t.elements.container.setAttribute("data-badge-text",i)},100)}),s(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
1=>{this.manager.addEventListener(google.ima.AdEvent.Type[e],e=>this.onAdEvent(e))}),this.trigger("loaded")}),s(this,"addCuePoints",()=>{S.empty(this.cuePoints)||this.cuePoints.forEach(e=>{if(0!==e&&-1!==e&&e<this.player.duration){let t=this.player.elements.progress;if(S.element(t)){let i=100/this.player.duration*e,s=I("span",{class:this.player.config.classNames.cues});s.style.left="".concat(i.toString(),"%"),t.appendChild(s)}}})}),s(this,"onAdEvent",e=>{var t;let{container:i}=this.player.elements,s=e.getAd(),n=e.getAdData();switch(t=e.type,G.call(this.player,this.player.media,"ads".concat(t.replace(/_/g,"").toLowerCase())),e.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),s.isLinear()||(s.width=i.offsetWidth,s.height=i.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:n.adError&&this.player.debug.warn("Non-fatal ad error: ".concat(n.adError.getMessage()))}}),s(this,"onAdError",e=>{this.cancel(),this.player.debug.warn("Ads error",e)}),s(this,"listeners",()=>{let e,{container:t}=this.player.elements;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{e=this.player.currentTime}),this.player.on("seeked",()=>{let t=this.player.currentTime;S.empty(this.cuePoints)||this.cuePoints.forEach((i,s)=>{e<i&&i<t&&(this.manager.discardAdBreak(),this.cuePoints.splice(s,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),s(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(()=>{})}),s(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,et(this.player.media.play())}),s(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),s(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),s(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(()=>{})}),s(this,"trigger",function(e){for(var i=arguments.length,s=Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];let l=t.events[e];S.array(l)&&l.forEach(e=>{S.function(e)&&e.apply(t,s)})}),s(this,"on",(e,t)=>(S.array(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this)),s(this,"startSafetyTimer",(e,t)=>{this.player.debug.log("Safety timer invoked from: ".concat(t)),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},e)}),s(this,"clearSafetyTimer",e=>{S.nullOrUndefined(this.safetyTimer)||(this.player.debug.log("Safety timer cleared from: ".concat(e)),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=e,this.config=e.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()}}function eJ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:255;return Math.min(Math.max(e,t),i)}function e$(e,t){let i=t.width/t.height,s={};return e>i?(s.width=t.width,s.height=1/e*t.width):(s.height=t.height,s.width=e*t.height),s}class eG{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}
1get 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}=e$(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}constructor(e){var t=this;s(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)})}),s(this,"getThumbnails",()=>new Promise(e=>{let{src:t}=this.player.config.previewThumbnails;if(S.empty(t))throw Error("Missing previewThumbnails.src config attribute");let i=()=>{this.thumbnails.sort((e,t)=>e.height-t.height),this.player.debug.log("Preview thumbnails",this.thumbnails),e()};S.function(t)?t(e=>{this.thumbnails=e,i()}):Promise.all((S.string(t)?[t]:t).map(e=>this.getThumbnail(e))).then(i)})),s(this,"getThumbnail",e=>new Promise(t=>{eC(e,void 0,this.player.config.previewThumbnails.withCredentials).then(i=>{let s={frames:function(e){let t=[];
1return e.split(/\r\n\r\n|\n\n|\r\r/).forEach(e=>{let i={};e.split(/\r\n|\n|\r/).forEach(e=>{if(S.number(i.startTime)){if(!S.empty(e.trim())&&S.empty(i.text)){let t=e.trim().split("#xywh=");[i.text]=t,t[1]&&([i.x,i.y,i.w,i.h]=t[1].split(","))}}else{let t=e.match(/(\d{2})?:?(\d{2}):(\d{2}).(\d{2,3})( ?--> ?)(\d{2})?:?(\d{2}):(\d{2}).(\d{2,3})/);t&&(i.startTime=60*Number(t[1]||0)*60+60*Number(t[2])+Number(t[3])+Number("0.".concat(t[4])),i.endTime=60*Number(t[6]||0)*60+60*Number(t[7])+Number(t[8])+Number("0.".concat(t[9])))}}),i.text&&t.push(i)}),t}(i),height:null,urlPrefix:""};s.frames[0].text.startsWith("/")||s.frames[0].text.startsWith("http://")||s.frames[0].text.startsWith("https://")||(s.urlPrefix=e.substring(0,e.lastIndexOf("/")+1));let n=new Image;n.onload=()=>{s.height=n.naturalHeight,s.width=n.naturalWidth,this.thumbnails.push(s),t()},n.src=s.urlPrefix+s.frames[0].text})})),s(this,"startMove",e=>{if(this.loaded&&S.event(e)&&["touchmove","mousemove"].includes(e.type)&&this.player.media.duration){if("touchmove"===e.type)this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var t,i;let s=this.player.elements.progress.getBoundingClientRect(),n=100/s.width*(e.pageX-s.left);this.seekTime=this.player.media.duration*(n/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.textContent=eE(this.seekTime);let l=null==(t=this.player.config.markers)||null==(i=t.points)?void 0:i.find(e=>{let{time:t}=e;return t===Math.round(this.seekTime)});l&&this.elements.thumb.time.insertAdjacentHTML("afterbegin","".concat(l.label,"<br>"))}this.showImageAtCurrentTime()}}),s(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),s(this,"startScrubbing",e=>{(S.nullOrUndefined(e.button)||!1===e.button||0===e.button)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),s(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):$.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),s(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})}),s(this,"render",()=>{this.elements.thumb.container=I("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=I("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);let e=I("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=I("span",{},"00:00"),e.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(e),S.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=I("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),s(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),s(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,i=0;this.mouseDown||this.toggleThumbContainer(t),t&&(this.thumbnails.forEach((t,s)=>{this.loadedImages.includes(t.frames[e].text)&&(i=s)}),e!==this.showingThumb&&(this.showingThumb=e,this.loadImage(i)))}),s(this,"loadImage",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=t.showingThumb,s=t.thumbnails[e],{urlPrefix:n}=s,l=s.frames[i],a=s.frames[i].text,r=n+a;
1if(t.currentImageElement&&t.currentImageElement.dataset.filename===a)t.showImage(t.currentImageElement,l,e,i,a,!1),t.currentImageElement.dataset.index=i,t.removeOldImages(t.currentImageElement);else{t.loadingImage&&t.usingSprites&&(t.loadingImage.onload=null);let s=new Image;s.src=r,s.dataset.index=i,s.dataset.filename=a,t.showingThumbFilename=a,t.player.debug.log("Loading image: ".concat(r)),s.onload=()=>t.showImage(s,l,e,i,a,!0),t.loadingImage=s,t.removeOldImages(s)}}),s(this,"showImage",function(e,i,s,n,l){let a=!(arguments.length>5)||void 0===arguments[5]||arguments[5];t.player.debug.log("Showing thumb: ".concat(l,". num: ").concat(n,". qual: ").concat(s,". newimg: ").concat(a)),t.setImageSizeAndOffset(e,i),a&&(t.currentImageContainer.appendChild(e),t.currentImageElement=e,t.loadedImages.includes(l)||t.loadedImages.push(l)),t.preloadNearby(n,!0).then(t.preloadNearby(n,!1)).then(t.getHigherQuality(s,e,i,l))}),s(this,"removeOldImages",e=>{Array.from(this.currentImageContainer.children).forEach(t=>{if("img"!==t.tagName.toLowerCase())return;let i=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: ".concat(t.dataset.filename))},i)}})}),s(this,"preloadNearby",function(e){let i=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return new Promise(s=>{setTimeout(()=>{let n=t.thumbnails[0].frames[e].text;if(t.showingThumbFilename===n){let l;l=i?t.thumbnails[0].frames.slice(e):t.thumbnails[0].frames.slice(0,e).reverse();let a=!1;l.forEach(e=>{let i=e.text;if(i!==n&&!t.loadedImages.includes(i)){a=!0,t.player.debug.log("Preloading thumb filename: ".concat(i));let{urlPrefix:e}=t.thumbnails[0],n=e+i,l=new Image;l.src=n,l.onload=()=>{t.player.debug.log("Preloaded thumb filename: ".concat(i)),t.loadedImages.includes(i)||t.loadedImages.push(i),s()}}}),a||s()}},300)})}),s(this,"getHigherQuality",(e,t,i,s)=>{if(e<this.thumbnails.length-1){let n=t.naturalHeight;this.usingSprites&&(n=i.h),n<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===s&&(this.player.debug.log("Showing higher quality thumb for: ".concat(s)),this.loadImage(e+1))},300)}}),s(this,"toggleThumbContainer",function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=t.player.config.classNames.previewThumbnails.thumbContainerShown;t.elements.thumb.container.classList.toggle(s,e),!e&&i&&(t.showingThumb=null,t.showingThumbFilename=null)}),s(this,"toggleScrubbingContainer",function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=t.player.config.classNames.previewThumbnails.scrubbingContainerShown;t.elements.scrubbing.container.classList.toggle(i,e),e||(t.showingThumb=null,t.showingThumbFilename=null)}),s(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),s(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="".concat(t,"px")}else if(e.clientHeight<20&&e.clientWidth>20){let t=Math.floor(e.clientWidth/this.thumbAspectRatio);e.style.height="".concat(t,"px")}}else{let t=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);e.style.height="".concat(this.thumbContainerHeight,"px"),e.style.width="".concat(t,"px")}this.setThumbContainerPos()}),s(this,"setThumbContainerPos",()=>{let e=this.player.elements.progress.getBoundingClientRect(),t=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,s=t.left-e.left+10,n=t.right-e.left-i.clientWidth-10,l=this.mousePosX-e.left-i.clientWidth/2,a=eJ(l,s,n);i.style.left="".concat(a,"px"),i.style.setProperty("--preview-arrow-offset","".concat(l-a,"px"))}),s(this,"setScrubbingContainerSize",()=>{let{width:e,height:t}=e$(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width="".concat(e,"px"),this.elements.scrubbing.container.style.height="".concat(t,"px")}),s(this,"setImageSizeAndOffset",(e,t)=>{if(!this.usingSprites)return;let i=this.thumbContainerHeight/t.h;e.style.height="".concat(e.naturalHeight*i,"px"),e.style.width="".concat(e.naturalWi
1dth*i,"px"),e.style.left="-".concat(t.x*i,"px"),e.style.top="-".concat(t.y*i,"px")}),this.player=e,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}}let eZ={insertElements(e,t){S.string(t)?_(e,this.media,{src:t}):S.array(t)&&t.forEach(t=>{_(e,this.media,t)})},change(e){if(!M(e,"sources.length"))return void this.debug.warn("Invalid source format");eh.cancelRequests.call(this),this.destroy(()=>{this.options.quality=[],O(this.media),this.media=null,S.element(this.elements.container)&&this.elements.container.removeAttribute("class");let{sources:t,type:i}=e,[{provider:s=e_.html5,src:n}]=t,l="html5"===s?i:"div",a="html5"===s?{}:{src:n};Object.assign(this,{provider:s,type:i,supported:K.check(i,s,this.config.playsinline),media:I(l,a)}),this.elements.container.appendChild(this.media),S.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),S.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","")),eR.addStyleHook.call(this),this.isHTML5&&eZ.insertElements.call(this,"source",t),this.config.title=e.title,eX.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&eZ.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&eR.build.call(this),this.isHTML5&&this.media.load(),!S.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 eG(this))),this.fullscreen.update()},!0)}};class e0{get isHTML5(){return this.provider===e_.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===e_.youtube}get isVimeo(){return this.provider===e_.vimeo}get isVideo(){return this.type===eO.video}get isAudio(){return this.type===eO.audio}get playing(){return!!(this.ready&&!this.paused&&!this.ended)}get paused(){return!!this.media.paused}get stopped(){return!!(this.paused&&0===this.currentTime)}get ended(){return!!this.media.ended}set currentTime(e){if(!this.duration)return;let t=S.number(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log("Seeking to ".concat(this.currentTime," seconds"))}get currentTime(){return Number(this.media.currentTime)}get buffered(){let{buffered:e}=this.media;return S.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=Number.parseFloat(this.config.duration),t=(this.media||{}).duration,i=S.number(t)&&t!==1/0?t:0;return e||i}set volume(e){let t=e;S.string(t)&&(t=Number(t)),S.number(t)||(t=this.storage.get("volume")),S.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!S.empty(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;S.boolean(t)||(t=this.storage.get("muted")),S.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;S.number(e)&&(t=e),S.number(t)||(t=this.storage.get("speed")),S.number(t)||(t=this.config.speed.selected);let{minimumSpeed:i,maximumSpeed:s}=this;t=eJ(t,i,s),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,i=this.options.quality;if(!i.length)return;let s=[!S.empty(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(S.number),n=!0;if(!i.includes(s)){let e=es(i,s);this.debug.warn("Unsupported quality option: ".concat(s,", using ").concat(e," instead")),s=e,n=!1}t.selected=s,this.media.quality=s,n&&this.storage.set({quality:s})}get quality(){return this.media.quality}set loop(e){let t=S.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){eZ.change.call(this,e)}get source(){return this.media.currentSrc}get download(){let{download:e}=this.config.urls;return S.url(e)?e:this.source}set download(e){S.url(e)&&(this.config.urls.download=e,eP.setDownloadUrl.call(this))}set poster(e){if(!this.isVideo)return void this.debug.warn("Poster can only be set for video");eR.setPoster.call(this,e,!1).catch(()=>{})}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;let e=er(eo.call(this));return S.array(e)?e.join(":"):e}set ratio(e){return this.isVideo?S.string(e)&&ea(e)?void(this.config.ratio=er(e),ec.call(this)):void this.debug.error("Invalid aspect ratio specified (".concat(e,")")):void this.debug.warn("Aspect ratio can only be set for video")}
1set autoplay(e){this.config.autoplay=S.boolean(e)?e:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(e){ex.toggle.call(this,e,!1)}set currentTrack(e){ex.set.call(this,e,!1),ex.setup.call(this)}get currentTrack(){let{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){ex.setLanguage.call(this,e,!1)}get language(){return(ex.getCurrentTrack.call(this)||{}).language}set pip(e){if(!K.pip)return;let t=S.boolean(e)?e:!this.pip;S.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?eI.active:eI.inactive),S.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return K.pip?S.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===eI.active: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 eG(this))}static supported(e,t){return K.check(e,t)}static loadSprite(e,t){return eA(e,t)}static setup(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null;return(S.string(e)?i=Array.from(document.querySelectorAll(e)):S.nodeList(e)?i=Array.from(e):S.array(e)&&(i=e.filter(S.element)),S.empty(i))?null:i.map(e=>new e0(e,t))}constructor(e,t){var i=this;if(s(this,"play",()=>S.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>et(this.media.play())),this.media.play()):null),s(this,"pause",()=>this.playing&&S.function(this.media.pause)?this.media.pause():null),s(this,"togglePlay",e=>(S.boolean(e)?e:!this.playing)?this.play():this.pause()),s(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):S.function(this.media.stop)&&this.media.stop()}),s(this,"restart",()=>{this.currentTime=0}),s(this,"rewind",e=>{this.currentTime-=S.number(e)?e:this.config.seekTime}),s(this,"forward",e=>{this.currentTime+=S.number(e)?e:this.config.seekTime}),s(this,"increaseVolume",e=>{let t=this.media.muted?0:this.volume;this.volume=t+(S.number(e)?e:0)}),s(this,"decreaseVolume",e=>{this.increaseVolume(-e)}),s(this,"airplay",()=>{K.airplay&&this.media.webkitShowPlaybackTargetPicker()}),s(this,"toggleControls",e=>{if(this.supported.ui&&!this.isAudio){let t=F(this.elements.container,this.config.classNames.hideControls),i=R(this.elements.container,this.config.classNames.hideControls,void 0===e?void 0:!e);return i&&S.array(this.config.controls)&&this.config.controls.includes("settings")&&!S.empty(this.config.settings)&&eP.toggleMenu.call(this,!1),i!==t&&G.call(this,this.media,i?"controlshidden":"controlsshown"),!i}return!1}),s(this,"on",(e,t)=>{Q.call(this,this.elements.container,e,t)}),s(this,"once",(e,t)=>{$.call(this,this.elements.container,e,t)}),s(this,"off",(e,t)=>{J(this.elements.container,e,t)}),s(this,"destroy",function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!i.ready)return;let s=()=>{document.body.style.overflow="",i.embed=null,t?(Object.keys(i.elements).length&&(O(i.elements.buttons.play),O(i.elements.captions),O(i.elements.controls),O(i.elements.wrapper),i.elements.buttons.play=null,i.elements.captions=null,i.elements.controls=null,i.elements.wrapper=null),S.function(e)&&e()):(Z.call(i),eh.cancelRequests.call(i),q(i.elements.original,i.elements.container),G.call(i,i.elements.original,"destroyed",!0),S.function(e)&&e.call(i.elements.original),i.ready=!1,setTimeout(()=>{i.elements=null,i.media=null},200))};i.stop(),clearTimeout(i.timers.loading),clearTimeout(i.timers.controls),clearTimeout(i.timers.resized),i.isHTML5?(eR.toggleNativeControls.call(i,!0),s()):i.isYouTube?(clearInterval(i.timers.buffering),clearInterval(i.timers.playing),null!==i.embed&&S.function(i.embed.destroy)&&i.embed.destroy(),s()):i.isVimeo&&(null!==i.embed&&i.embed.unload().then(s),setTimeout(s,200))}),s(this,"supports",e=>K.mime.call(this,e)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=K.touch,this.media=e,S.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||S.nodeList(this.media)||S.array(this.media))&&(this.media=this.media[0]),this.config=N({},eL,e0.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch(e){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 eq(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",K),S.nullOrUndefined(this.media)||!S.element
1(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(!K.check().api)return void this.debug.error("Setup failed: no support");let n=this.media.cloneNode(!0);n.autoplay=!1,this.elements.original=n;let l=this.media.tagName.toLowerCase(),a=null,r=null;switch(l){case"div":if(a=this.media.querySelector("iframe"),S.element(a)){if(r=eM(a.getAttribute("src")),this.provider=function(e){return/^(?:https?:\/\/)?(?:www\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?e_.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?e_.vimeo:null}(r.toString()),this.elements.container=this.media,this.media=a,this.elements.container.className="",r.search.length){let e=["1","true"];e.includes(r.searchParams.get("autoplay"))&&(this.config.autoplay=!0),e.includes(r.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=e.includes(r.searchParams.get("playsinline")),this.config.youtube.hl=r.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(S.empty(this.provider)||!Object.values(e_).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=eO.video;break;case"video":case"audio":this.type=l,this.provider=e_.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}if(this.supported=K.check(this.type,this.provider),!this.supported.api)return void this.debug.error("Setup failed: no support");this.eventListeners=[],this.listeners=new eF(this),this.storage=new eT(this),this.media.plyr=this,S.element(this.elements.container)||(this.elements.container=I("div"),x(this.media,this.elements.container)),eR.migrateStyles.call(this),eR.addStyleHook.call(this),eX.setup.call(this),this.config.debug&&Q.call(this,this.elements.container,this.config.events.join(" "),e=>{this.debug.log("event: ".concat(e.type))}),this.fullscreen=new eD(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&eR.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new eQ(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>et(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new eG(this))}}e0.defaults=JSON.parse(JSON.stringify(eL))}}]);

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.