PageSourceSearch

https://spotworkshops.be/build/assets/plyr-R_OjfJsT.js

js spotworkshops.be collected 2026-10-04 06:01:16 UTC 111,682 bytes, 2 lines download raw bytes

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

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.