1"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(t,n){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(e){return n(t,e)}):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=n(t,require("jquery")):t.jQueryBridget=n(t,t.jQuery)}(window,function(e,t){function n(l,c,u){(u=u||t||e.jQuery)&&(c.prototype.option||(c.prototype.option=function(e){u.isPlainObject(e)&&(this.options=u.extend(!0,this.options,e))}),u.fn[l]=function(e){var t,i,o,r,a,s;return"string"==typeof e?(t=d.call(arguments,1),o=t,a="$()."+l+'("'+(i=e)+'")',(t=this).each(function(e,t){var n,t=u.data(t,l);t?(n=t[i])&&"_"!=i.charAt(0)?(n=n.apply(t,o),r=void 0===r?n:r):h(a+" is not a valid method"):h(l+" not initialized. Cannot call methods, i.e. "+a)}),void 0!==r?r:t):(s=e,this.each(function(e,t){var n=u.data(t,l);n?(n.option(s),n._init()):(n=new c(t,s),u.data(t,l,n))}),this)},i(u))}function i(e){e&&!e.bridget&&(e.bridget=n)}var d=Array.prototype.slice,o=e.console,h=void 0===o?function(){}:function(e){o.error(e)};return i(t||e.jQuery),n}),function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:void 0,function(){function e(){}var t=e.prototype;return t.on=function(e,t){var n;if(e&&t)return-1==(n=(n=this._events=this._events||{})[e]=n[e]||[]).indexOf(t)&&n.push(t),this},t.once=function(e,t){var n;if(e&&t)return this.on(e,t),((n=this._onceEvents=this._onceEvents||{})[e]=n[e]||{})[t]=!0,this},t.off=function(e,t){e=this._events&&this._events[e];if(e&&e.length)return-1!=(t=e.indexOf(t))&&e.splice(t,1),this},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var i=this._onceEvents&&this._onceEvents[e],o=0;o<n.length;o++){var r=n[o];i&&i[r]&&(this.off(e,r),delete i[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"function"==typeof define&&define.amd?define("get-size/get-size",t):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=t():e.getSize=t()}(window,function(){function g(e){var t=parseFloat(e);return-1==e.indexOf("%")&&!isNaN(t)&&t}function y(e){e=getComputedStyle(e);return e||t("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function b(e){if(k||(k=!0,(u=document.createElement("div")).style.width="200px",u.style.padding="1px 2px 3px 4px",u.style.borderStyle="solid",u.style.borderWidth="1px 2px 3px 4px",u.style.boxSizing="border-box",(c=document.body||document.documentElement).appendChild(u),r=y(u),v=200==Math.round(g(r.width)),b.isBoxSizeOuter=v,c.removeChild(u)),(e="string"==typeof e?document.querySelector(e):e)&&"object"==_typeof(e)&&e.nodeType){var t=y(e);if("none"==t.display){for(var n={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},i=0;i<T;i++)n[w[i]]=0;return n}var o={};o.width=e.offsetWidth,o.height=e.offsetHeight;for(var r=o.isBorderBox="border-box"==t.boxSizing,a=0;a<T;a++){var s=w[a],l=t[s],l=parseFloat(l);o[s]=isNaN(l)?0:l}var c=o.paddingLeft+o.paddingRight,u=o.paddingTop+o.paddingBottom,e=o.marginLeft+o.marginRight,d=o.marginTop+o.marginBottom,h=o.borderLeftWidth+o.borderRightWidth,p=o.borderTopWidth+o.borderBottomWidth,m=r&&v,f=g(t.width),f=(!1!==f&&(o.width=f+(m?0:c+h)),g(t.height));return!1!==f&&(o.height=f+(m?0:u+p)),o.innerWidth=o.width-(c+h),o.innerHeight=o.height-(u+p),o.outerWidth=o.width+e,o.outerHeight=o.height+d,o}var u,c,r}var v,t="undefined"==typeof console?function(){}:function(e){console.error(e)},w=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],T=w.length,k=!1;return b}),function(e,t){"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",t):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=t():e.matchesSelector=t()}(window,function(){var n=function(){var e=window.Element.prototype;if(e.matches)return"matches";if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],n=0;n<t.length;n++){var i=t[n]+"MatchesSelector";if(e[i])return i}}();return function(e,t){return e[n](t)}}),function(t,n){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["de
1sandro-matches-selector/matches-selector"],function(e){return n(t,e)}):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=n(t,require("desandro-matches-selector")):t.fizzyUIUtils=n(t,t.matchesSelector)}(window,function(n,r){var l={extend:function(e,t){for(var n in t)e[n]=t[n];return e},modulo:function(e,t){return(e%t+t)%t}},t=Array.prototype.slice,c=(l.makeArray=function(e){return Array.isArray(e)?e:null==e?[]:"object"==_typeof(e)&&"number"==typeof e.length?t.call(e):[e]},l.removeFrom=function(e,t){t=e.indexOf(t);-1!=t&&e.splice(t,1)},l.getParent=function(e,t){for(;e.parentNode&&e!=document.body;)if(e=e.parentNode,r(e,t))return e},l.getQueryElement=function(e){return"string"==typeof e?document.querySelector(e):e},l.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},l.filterFindElements=function(e,i){e=l.makeArray(e);var o=[];return e.forEach(function(e){if(e instanceof HTMLElement)if(i){r(e,i)&&o.push(e);for(var t=e.querySelectorAll(i),n=0;n<t.length;n++)o.push(t[n])}else o.push(e)}),o},l.debounceMethod=function(e,t,i){i=i||100;var o=e.prototype[t],r=t+"Timeout";e.prototype[t]=function(){var e=this[r],t=(clearTimeout(e),arguments),n=this;this[r]=setTimeout(function(){o.apply(n,t),delete n[r]},i)}},l.docReady=function(e){var t=document.readyState;"complete"==t||"interactive"==t?setTimeout(e):document.addEventListener("DOMContentLoaded",e)},l.toDashed=function(e){return e.replace(/(.)([A-Z])/g,function(e,t,n){return t+"-"+n}).toLowerCase()},n.console);return l.htmlInit=function(a,s){l.docReady(function(){var e=l.toDashed(s),i="data-"+e,t=document.querySelectorAll("["+i+"]"),e=document.querySelectorAll(".js-"+e),t=l.makeArray(t).concat(l.makeArray(e)),o=i+"-options",r=n.jQuery;t.forEach(function(t){var e,n=t.getAttribute(i)||t.getAttribute(o);try{e=n&&JSON.parse(n)}catch(e){return void(c&&c.error("Error parsing "+i+" on "+t.className+": "+e))}n=new a(t,e);r&&r.data(t,s,n)})})},l}),function(e,t){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],t):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=t(require("ev-emitter"),require("get-size")):(e.Outlayer={},e.Outlayer.Item=t(e.EvEmitter,e.getSize))}(window,function(e,t){function n(e,t){e&&(this.element=e,this.layout=t,this.position={x:0,y:0},this._create())}var i=document.documentElement.style,o="string"==typeof i.transition?"transition":"WebkitTransition",i="string"==typeof i.transform?"transform":"WebkitTransform",r={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[o],a={transform:i,transition:o,transitionDuration:o+"Duration",transitionProperty:o+"Property",transitionDelay:o+"Delay"},e=n.prototype=Object.create(e.prototype),s=(e.constructor=n,e._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},e.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},e.getSize=function(){this.size=t(this.element)},e.css=function(e){var t,n=this.element.style;for(t in e)n[a[t]||t]=e[t]},e.getPosition=function(){var e=getComputedStyle(this.element),t=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),i=e[t?"left":"right"],e=e[n?"top":"bottom"],o=parseFloat(i),r=parseFloat(e),a=this.layout.size;-1!=i.indexOf("%")&&(o=o/100*a.width),-1!=e.indexOf("%")&&(r=r/100*a.height),o=isNaN(o)?0:o,r=isNaN(r)?0:r,o-=t?a.paddingLeft:a.paddingRight,r-=n?a.paddingTop:a.paddingBottom,this.position.x=o,this.position.y=r},e.layoutPosition=function(){var e=this.layout.size,t={},n=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),o=n?"right":"left",r=this.position.x+e[n?"paddingLeft":"paddingRight"],n=(t[n?"left":"right"]=this.getXValue(r),t[o]="",i?"paddingTop":"paddingBottom"),r=i?"bottom":"top",o=this.position.y+e[n];t[i?"top":"bottom"]=this.getYValue(o),t[r]="",this.css(t),this.emitEvent("layout",[this])},e.getXValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!t?e/this.layout.size.width*100+"%":e+"px"},e.getYValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&t?e/this.layout.size.height*100+"%":e+"px"},e._transitionTo=function(e,t){this.getPosition();var n=this.position.x,i=this.position.y,o=e==this.position.x&&t==this.position.y;this.setPosition(e,t),o&&!this.isTransitioning?this.layoutPosition():((o={}).transform=this.getTranslate(e-n,t-i),this.transition({to:o,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0}))},e.getTranslate=function(e,t){return"translate3d("+(e=this.layout._getOption("originLeft")?e:-e)+"px, "+(t=this.layout._getOption("originTop")?t:-t)+"px, 0)"},e.goTo=function(e,t){this.setPosition(e,t),this.layoutPosition()},e.moveTo=e._transitionTo,e.setPosition=function(e,t){this.position.x=parseFloat(e),this.position.y=parseFloat(t)},e._nonTransition=function(e){for(var t in this.css(e.to),e.isCleaning&&this._removeStyles(e.to),e.onTransitionEnd)e.onTransitionEnd[t].call(this)},e.transition=function(e){if(parseFloat(this.layout.options.transitionDuration)){var t,n=this._transn;for(t in e.onTransitionEnd)n.onEnd[t]=e.onTransitionEnd[t];for(t in e.to)n.ingProperties[t]=!0,e.isCleaning&&(n.clean[t]=!0);e.from&&(this.css(e.from),this.element.offsetHeight,0),this.enableTransition(e.to),this.css(e.to),this.isTransitioning=!0}else this._nonTransition(e)},"opacity,"+i.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})),l=(e.enableTransition=function(){var e;this.isTransitioning||(e=this.layout.options.transitionDuration,this.css({transitionProperty:s,transitionDuration:e="number"==typeof e?e+"ms":e,transitionDelay:this.staggerDelay||0}
1),this.element.addEventListener(r,this,!1))},e.onwebkitTransitionEnd=function(e){this.ontransitionend(e)},e.onotransitionend=function(e){this.ontransitionend(e)},{"-webkit-transform":"transform"}),c=(e.ontransitionend=function(e){var t,n;e.target===this.element&&(t=this._transn,n=l[e.propertyName]||e.propertyName,delete t.ingProperties[n],function(e){for(var t in e)return;return 1}(t.ingProperties)&&this.disableTransition(),n in t.clean&&(this.element.style[e.propertyName]="",delete t.clean[n]),n in t.onEnd&&(t.onEnd[n].call(this),delete t.onEnd[n]),this.emitEvent("transitionEnd",[this]))},e.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(r,this,!1),this.isTransitioning=!1},e._removeStyles=function(e){var t,n={};for(t in e)n[t]="";this.css(n)},{transitionProperty:"",transitionDuration:"",transitionDelay:""});return e.removeTransitionStyles=function(){this.css(c)},e.stagger=function(e){e=isNaN(e)?0:e,this.staggerDelay=e+"ms"},e.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},e.remove=function(){return o&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},e.reveal=function(){delete this.isHidden,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:e.hiddenStyle,to:e.visibleStyle,isCleaning:!0,onTransitionEnd:t})},e.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},e.getHideRevealTransitionEndProperty=function(e){var t,e=this.layout.options[e];if(e.opacity)return"opacity";for(t in e)return t},e.hide=function(){this.isHidden=!0,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:e.visibleStyle,to:e.hiddenStyle,isCleaning:!0,onTransitionEnd:t})},e.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},e.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},n}),function(o,r){"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(e,t,n,i){return r(o,e,t,n,i)}):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=r(o,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):o.Outlayer=r(o,o.EvEmitter,o.getSize,o.fizzyUIUtils,o.Outlayer.Item)}(window,function(e,t,o,i,r){function a(e,t){var n=i.getQueryElement(e);n?(this.element=n,c&&(this.$element=c(this.element)),this.options=i.extend({},this.constructor.defaults),this.option(t),t=++u,this.element.outlayerGUID=t,(d[t]=this)._create(),this._getOption("initLayout")&&this.layout()):l&&l.error("Bad element for "+this.constructor.namespace+": "+(n||e))}function s(e){function t(){e.apply(this,arguments)}return(t.prototype=Object.create(e.prototype)).constructor=t}function n(){}var l=e.console,c=e.jQuery,u=0,d={},h=(a.namespace="outlayer",a.Item=r,a.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},a.prototype),p=(i.extend(h,t.prototype),h.option=function(e){i.extend(this.options,e)},h._getOption=function(e){var t=this.constructor.compatOptions[e];return t&&void 0!==this.options[t]?this.options[t]:this.options[e]},a.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},h._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),i.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},h.reloadItems=function(){this.items=this._itemize(this.element.children)},h._itemize=function(e){for(var t=this._filterFindItemElements(e),n=this.constructor.Item,i=[],o=0;o<t.length;o++){var r=new n(t[o],this);i.push(r)}return i},h._filterFindItemElements=function(e){return i.filterFindElements(e,this.options.itemSelector)},h.getItemElements=function(){return this.items.map(function(e){return e.element})},h.layout=function(){this._resetLayout(),this._manageStamps();var e=this._getOption("layoutInstant"),e=void 0!==e?e:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0}
1,h._init=h.layout,h._resetLayout=function(){this.getSize()},h.getSize=function(){this.size=o(this.element)},h._getMeasurement=function(e,t){var n,i=this.options[e];i?("string"==typeof i?n=this.element.querySelector(i):i instanceof HTMLElement&&(n=i),this[e]=n?o(n)[t]:i):this[e]=0},h.layoutItems=function(e,t){e=this._getItemsForLayout(e),this._layoutItems(e,t),this._postLayout()},h._getItemsForLayout=function(e){return e.filter(function(e){return!e.isIgnored})},h._layoutItems=function(e,n){var i;this._emitCompleteOnItems("layout",e),e&&e.length&&(i=[],e.forEach(function(e){var t=this._getItemLayoutPosition(e);t.item=e,t.isInstant=n||e.isLayoutInstant,i.push(t)},this),this._processLayoutQueue(i))},h._getItemLayoutPosition=function(){return{x:0,y:0}},h._processLayoutQueue=function(e){this.updateStagger(),e.forEach(function(e,t){this._positionItem(e.item,e.x,e.y,e.isInstant,t)},this)},h.updateStagger=function(){var e,t=this.options.stagger;return null==t?void(this.stagger=0):(this.stagger="number"==typeof(t=t)?t:(e=(t=t.match(/(^\d*\.?\d*)(\w*)/))&&t[1],t=t&&t[2],e.length?(e=parseFloat(e))*(p[t]||1):0),this.stagger)},h._positionItem=function(e,t,n,i,o){i?e.goTo(t,n):(e.stagger(o*this.stagger),e.moveTo(t,n))},h._postLayout=function(){this.resizeContainer()},h.resizeContainer=function(){var e;this._getOption("resizeContainer")&&(e=this._getContainerSize())&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))},h._getContainerSize=n,h._setContainerMeasure=function(e,t){var n;void 0!==e&&((n=this.size).isBorderBox&&(e+=t?n.paddingLeft+n.paddingRight+n.borderLeftWidth+n.borderRightWidth:n.paddingBottom+n.paddingTop+n.borderTopWidth+n.borderBottomWidth),e=Math.max(e,0),this.element.style[t?"width":"height"]=e+"px")},h._emitCompleteOnItems=function(t,e){function n(){r.dispatchEvent(t+"Complete",null,[e])}function i(){++o==a&&n()}var o,r=this,a=e.length;e&&a?(o=0,e.forEach(function(e){e.once(t,i)})):n()},h.dispatchEvent=function(e,t,n){var i=t?[t].concat(n):n;this.emitEvent(e,i),c&&(this.$element=this.$element||c(this.element),t?((i=c.Event(t)).type=e,this.$element.trigger(i,n)):this.$element.trigger(e,n))},h.ignore=function(e){e=this.getItem(e);e&&(e.isIgnored=!0)},h.unignore=function(e){e=this.getItem(e);e&&delete e.isIgnored},h.stamp=function(e){(e=this._find(e))&&(this.stamps=this.stamps.concat(e),e.forEach(this.ignore,this))},h.unstamp=function(e){(e=this._find(e))&&e.forEach(function(e){i.removeFrom(this.stamps,e),this.unignore(e)},this)},h._find=function(e){return e?("string"==typeof e&&(e=this.element.querySelectorAll(e)),i.makeArray(e)):void 0},h._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},h._getBoundingRect=function(){var e=this.element.getBoundingClientRect(),t=this.size;this._boundingRect={left:e.left+t.paddingLeft+t.borderLeftWidth,top:e.top+t.paddingTop+t.borderTopWidth,right:e.right-(t.paddingRight+t.borderRightWidth),bottom:e.bottom-(t.paddingBottom+t.borderBottomWidth)}},h._manageStamp=n,h._getElementOffset=function(e){var t=e.getBoundingClientRect(),n=this._boundingRect,e=o(e);return{left:t.left-n.left-e.marginLeft,top:t.top-n.top-e.marginTop,right:n.right-t.right-e.marginRight,bottom:n.bottom-t.bottom-e.marginBottom}},h.handleEvent=i.handleEvent,h.bindResize=function(){e.addEventListener("resize",this),this.isResizeBound=!0},h.unbindResize=function(){e.removeEventListener("resize",this),this.isResizeBound=!1},h.onresize=function(){this.resize()},i.debounceMethod(a,"onresize",100),h.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},h.needsResizeLayout=function(){var e=o(this.element);return this.size&&e&&e.innerWidth!==this.size.innerWidth},h.addItems=function(e){e=this._itemize(e);return e.length&&(this.items=this.items.concat(e)),e},h.appended=function(e){e=this.addItems(e);e.length&&(this.layoutItems(e,!0),this.reveal(e))},h.prepended=function(e){var t,e=this._itemize(e);e.length&&(t=this.items.slice(0),this.items=e.concat(t),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(t))},h.reveal=function(e){var n;this._emitCompleteOnItems("reveal",e),e&&e.length&&(n=this.updateStagger(),e.forEach(function(e,t){e.stagger(t*n),e.reveal()}))},h.hide=function(e){var n;this._emitCompleteOnItems("hide",e),e&&e.length&&(n=this.updateStagger(),e.forEach(function(e,t){e.stagger(t*n),e.hide()}))},h.revealItemElements=function(e){e=this.getItems(e);this.reveal(e)},h.hideItemElements=function(e){e=this.getItems(e);this.hide(e)},h.getItem=function(e){for(var t=0;t<this.items.length;t++){var n=this.items[t];if(n.element==e)return n}},h.getItems=function(e){e=i.makeArray(e);var t=[];return e.forEach(function(e){e=this.getItem(e);e&&t.push(e)},this),t},h.remove=function(e){e=this.getItems(e);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(e){e.remove(),i.removeFrom(this.items,e)},this)},h.destroy=function(){var e=this.element.style,e=(e.height="",e.position="",e.width="",this.items.forEac
1h(function(e){e.destroy()}),this.unbindResize(),this.element.outlayerGUID);delete d[e],delete this.element.outlayerGUID,c&&c.removeData(this.element,this.constructor.namespace)},a.data=function(e){e=(e=i.getQueryElement(e))&&e.outlayerGUID;return e&&d[e]},a.create=function(e,t){var n=s(a);return n.defaults=i.extend({},a.defaults),i.extend(n.defaults,t),n.compatOptions=i.extend({},a.compatOptions),n.namespace=e,n.data=a.data,n.Item=s(r),i.htmlInit(n,e),c&&c.bridget&&c.bridget(e,n),n},{ms:1,s:1e3});return a.Item=r,a}),function(e,t){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],t):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=t(require("outlayer"),require("get-size")):e.Masonry=t(e.Outlayer,e.getSize)}(window,function(e,s){var e=e.create("masonry"),t=(e.compatOptions.fitWidth="isFitWidth",e.prototype);return t._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var e=0;e<this.cols;e++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},t.measureColumns=function(){this.getContainerWidth(),this.columnWidth||(e=(e=this.items[0])&&e.element,this.columnWidth=e&&s(e).outerWidth||this.containerWidth);var e=this.columnWidth+=this.gutter,t=this.containerWidth+this.gutter,n=t/e,t=e-t%e,n=Math[t&&t<1?"round":"floor"](n);this.cols=Math.max(n,1)},t.getContainerWidth=function(){var e=this._getOption("fitWidth")?this.element.parentNode:this.element,e=s(e);this.containerWidth=e&&e.innerWidth},t._getItemLayoutPosition=function(e){e.getSize();for(var t=e.size.outerWidth%this.columnWidth,t=Math[t&&t<1?"round":"ceil"](e.size.outerWidth/this.columnWidth),t=Math.min(t,this.cols),n=this[this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition"](t,e),i={x:this.columnWidth*n.col,y:n.y},o=n.y+e.size.outerHeight,r=t+n.col,a=n.col;a<r;a++)this.colYs[a]=o;return i},t._getTopColPosition=function(e){var e=this._getTopColGroup(e),t=Math.min.apply(Math,e);return{col:e.indexOf(t),y:t}},t._getTopColGroup=function(e){if(e<2)return this.colYs;for(var t=[],n=this.cols+1-e,i=0;i<n;i++)t[i]=this._getColGroupY(i,e);return t},t._getColGroupY=function(e,t){return t<2?this.colYs[e]:(e=this.colYs.slice(e,e+t),Math.max.apply(Math,e))},t._getHorizontalColPosition=function(e,t){var n=this.horizontalColIndex%this.cols,n=1<e&&n+e>this.cols?0:n,t=t.size.outerWidth&&t.size.outerHeight;return this.horizontalColIndex=t?n+e:this.horizontalColIndex,{col:n,y:this._getColGroupY(n,e)}},t._manageStamp=function(e){var t=s(e),e=this._getElementOffset(e),n=this._getOption("originLeft")?e.left:e.right,i=n+t.outerWidth,n=Math.floor(n/this.columnWidth),n=Math.max(0,n),o=Math.floor(i/this.columnWidth);o-=i%this.columnWidth?0:1;for(var o=Math.min(this.cols-1,o),r=(this._getOption("originTop")?e.top:e.bottom)+t.outerHeight,a=n;a<=o;a++)this.colYs[a]=Math.max(r,this.colYs[a])},t._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var e={height:this.maxY};return this._getOption("fitWidth")&&(e.width=this._getContainerFitWidth()),e},t._getContainerFitWidth=function(){for(var e=0,t=this.cols;--t&&0===this.colYs[t];)e++;return(this.cols-e)*this.columnWidth-this.gutter},t.needsResizeLayout=function(){var e=this.containerWidth;return this.getContainerWidth(),e!=this.containerWidth},e});var _excluded=["premium","referrerPolicy"];function _objectWithoutProperties(e,t){if(null==e)return{};var n,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};for(var n,i={},o=Object.keys(e),r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||(i[n]=e[n]);return i}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_toPropertyKey(i.key),i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ownKeys(t,e){var n,i=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)),i}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
1e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r,a,s=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"object"==("undefined"==typeof navigator?"undefined":_typeof(navigator))&&function(e){"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Plyr",e):("undefined"!=typeof globalThis?globalThis:self).Plyr=e()}(function(){if("undefined"!=typeof window)try{var r=new window.CustomEvent("test",{cancelable:!0});if(r.preventDefault(),!0!==r.defaultPrevented)throw new Error("Could not prevent default")}catch(r){var z=function(e,t){var n,i;return(t=t||{}).bubbles=!!t.bubbles,t.cancelable=!!t.cancelable,(n=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i=n.preventDefault,n.preventDefault=function(){i.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(e){this.defaultPrevented=!0}},n};z.prototype=window.Event.prototype,window.CustomEvent=z}var D,H,q,W,e,z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function F(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function B(t,e){var n,i=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)),i}function V(i){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?B(Object(o),!0).forEach(function(e){var t,n;t=i,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):B(Object(o)).forEac
1h(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))})}return i}q=z,W=function(){try{return!!Symbol.iterator}catch(e){return!1}}(),function(){try{var e=q.URLSearchParams;return"a=1"===new e("?a=1").toString()&&"function"==typeof e.prototype.set&&"function"==typeof e.prototype.entries}catch(e){}}()||((e=G.prototype).append=function(e,t){e in this._entries?this._entries[e].push(String(t)):this._entries[e]=[String(t)]},e.delete=function(e){delete this._entries[e]},e.get=function(e){return e in this._entries?this._entries[e][0]:null},e.getAll=function(e){return e in this._entries?this._entries[e].slice(0):[]},e.has=function(e){return e in this._entries},e.set=function(e,t){this._entries[e]=[String(t)]},e.forEach=function(e,t){for(var n in this._entries)if(this._entries.hasOwnProperty(n))for(var i=this._entries[n],o=0;o<i.length;o++)e.call(t,i[o],n,this)},e.keys=function(){var n=[];return this.forEach(function(e,t){n.push(t)}),K(n)},e.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),K(t)},e.entries=function(){var n=[];return this.forEach(function(e,t){n.push([t,e])}),K(n)},W&&(e[Symbol.iterator]=e.entries),e.toString=function(){var n=[];return this.forEach(function(e,t){n.push(Q(t)+"="+Q(e))}),n.join("&")},q.URLSearchParams=G),"function"!=typeof(e=q.URLSearchParams.prototype).sort&&(e.sort=function(){var n=this,i=[];this.forEach(function(e,t){i.push([t,e]),n._entries||n.delete(t)}),i.sort(function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0}),n._entries&&(n._entries={});for(var e=0;e<i.length;e++)this.append(i[e][0],i[e][1])}),"function"!=typeof e._fromString&&Object.defineProperty(e,"_fromString",{enumerable:!1,configurable:!1,writable:!1,value:function(e){if(this._entries)this._entries={};else{var n=[];this.forEach(function(e,t){n.push(t)});for(var t=0;t<n.length;t++)this.delete(n[t])}for(var i,o=(e=e.replace(/^\?/,"")).split("&"),t=0;t<o.length;t++)i=o[t].split("="),this.append($(i[0]),1<i.length?$(i[1]):"")}});var u=z;if(function(){try{var e=new u.URL("b","http://a");return e.pathname="c d","http://a/c%20d"===e.href&&e.searchParams}catch(e){}}()||(D=u.URL,H=Y.prototype,["hash","host","hostname","port","protocol"].forEach(function(e){var t;t=e,Object.defineProperty(H,t,{get:function(){return this._anchorElement[t]},set:function(e){this._anchorElement[t]=e},enumerable:!0})}),Object.defineProperty(H,"search",{get:function(){return this._anchorElement.search},set:function(e){this._anchorElement.search=e,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(H,{toString:{get:function(){var e=this;return function(){return e.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(e){this._anchorElement.href=e,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(e){this._anchorElement.pathname=e},enumerable:!0},origin:{get:function(){var e={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],e=this._anchorElement.port!=e&&""!==this._anchorElement.port;return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(e?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(e){},enumerable:!0},username:{get:function(){return""},set:function(e){},enumerable:!0}}),Y.createObjectURL=function(e){return D.createObjectURL.apply(D,arguments)},Y.revokeObjectURL=function(e){return D.revokeObjectURL.apply(D,arguments)},u.URL=Y),void 0!==u.location&&!("origin"in u.location)){var U=function(){return u.location.protocol+"//"+u.location.hostname+(u.location.port?":"+u.location.port:"")};try{Object.defineProperty(u.location,"origin",{get:U,enumerable:!0})}catch(e){setInterval(function(){u.location.origin=U()},100)}}function Y(e,t){"string"!=typeof e&&(e=String(e)),t&&"string"!=typeof t&&(t=String(t));var n=document;if(t&&(void 0===u.location||t!==u.location.href)){t=t.toLowerCase(),(o=(n=document.implementation.createHTMLDocument("")).createElement("base")).href=t,n.head.appendChild(o);try{if(0!==o.href.indexOf(t))throw new Error(o.href)}catch(e){throw new Error("URL unable to set base "+t+" due to "+e)}}var i=n.createElement("a"),o=(i.href=e,o&&(n.body.appendChild(i),i.href=i.href),n.createElement("input"));if(o.type="url",o.value=e,":"===i.protocol||!/:/.test(i.href)||!o.checkValidity()&&!t)throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:i});var r=new u.URLSearchParams(this.search),a=!0,s=!0,l=this,c=(["append","delete","set"].forEach(function(e){var t=r[e];r[e]=function(){t.apply(r,arguments),a&&(s=!1,l.search=r.toString(),s=!0)}}),Object.defineProperty(this,"searchParams",{value:r,enumerable:!0}),void 0);Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,
1configurable:!1,writable:!1,value:function(){this.search!==c&&(c=this.search,s)&&(a=!1,this.searchParams._fromString(this.search),a=!0)}})}function K(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return W&&(e[Symbol.iterator]=function(){return e}),e}function Q(e){return encodeURIComponent(e).replace(/%20/g,"+")}function $(e){return decodeURIComponent(String(e).replace(/\+/g," "))}function G(e){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var t=_typeof(e);if("undefined"!==t)if("string"===t)""!==e&&this._fromString(e);else if(e instanceof G){var n=this;e.forEach(function(e,t){n.append(t,e)})}else{if(null===e||"object"!==t)throw new TypeError("Unsupported input's type for URLSearchParams");if("[object Array]"===Object.prototype.toString.call(e))for(var i=0;i<e.length;i++){var o=e[i];if("[object Array]"!==Object.prototype.toString.call(o)&&2===o.length)throw new TypeError("Expected [string, any] as entry at index "+i+" of URLSearchParams's input");this.append(o[0],o[1])}else for(var r in e)e.hasOwnProperty(r)&&this.append(r,e[r])}}var X={addCSS:!0,thumbWidth:15,watch:!0};function J(e){return null!=e?e.constructor:null}function Z(e){return ne(e,Element)}function ee(e){return ne(e,Event)}function te(e){return ie(e)||(re(e)||ae(e)||se(e))&&!e.length||oe(e)&&!Object.keys(e).length}var ne=function(e,t){return!!(e&&t&&e instanceof t)},ie=function(e){return null==e},oe=function(e){return J(e)===Object},re=function(e){return J(e)===String},ae=function(e){return Array.isArray(e)},se=function(e){return ne(e,NodeList)},le=re,ce=ae,ue=se;i=[{key:"setup",value:function(n){var i,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=null;return te(n)||le(n)?e=Array.from(document.querySelectorAll(le(n)?n:'input[type="range"]')):Z(n)?e=[n]:ue(n)?e=Array.from(n):ce(n)&&(e=n.filter(Z)),te(e)?null:(i=V({},X,{},t),le(n)&&i.watch&&new MutationObserver(function(e){Array.from(e).forEach(function(e){Array.from(e.addedNodes).forEach(function(e){var t;Z(e)&&(t=n,function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t))&&new a(e,i)})})}).observe(document.body,{childList:!0,subtree:!0}),e.map(function(e){return new a(e,t)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}],F((t=a).prototype,[{key:"init",value:function(){a.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(){a.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,n=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(e){t.element[n](e,function(e){return t.set(e)},!1)})}},{key:"get",value:function(e){var t,n,i,o,r;return a.enabled&&ee(e)?(o=e.target,e=e.changedTouches[0],t=parseFloat(o.getAttribute("min"))||0,n=parseFloat(o.getAttribute("max"))||100,i=parseFloat(o.getAttribute("step"))||1,r=100/(o=o.getBoundingClientRect()).width*(this.config.thumbWidth/2)/100,(e=100/o.width*(e.clientX-o.left))<0?e=0:100<e&&(e=100),e<50?e-=(100-2*e)*r:50<e&&(e+=2*(e-50)*r),t+(o=e/100*(n-t),(r=i)<1?(e=(e="".concat(r).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/))?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0,parseFloat(o.toFixed(e))):Math.round(o/r)*r)):null}},{key:"set",value:function(e){var t;a.enabled&&ee(e)&&!e.target.disabled&&(e.preventDefault(),e.target.value=this.get(e),t=e.target,e="touchend"===e.type?"change":"input",t)&&e&&(e=new Event(e,{bubbles:!0}),t.dispatchEvent(e))}}]),F(t,i);var de=a;function a(e,t){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");Z(e)?this.element=e:le(e)&&(this.element=document.querySelector(e)),Z(this.element)&&te(this.element.rangeTouch)&&(this.config=V({},X,{},t),this.init())}function he(e){return null==e}function pe(e){return Te(e)===Object}function me(e){return Te(e)===String}function fe(e){return Array.isArray(e)}function ge(e){return n(e,NodeList)}function ye(e){return he(e)||(me(e)||fe(e)||ge(e))&&!e.length||pe(e)&&!Object.keys(e).length}function f(e){return Te(e)===Boolean}function l(e){return n(e,Event)}function d(e){return n(e,KeyboardEvent)}function be(e){return n(e,TextTrack)||!he(e)&&me(e.kind)}function ve(e){if(n(e,window.URL))return!0;
1if(!me(e))return!1;var t=e;e.startsWith("http://")&&e.startsWith("https://")||(t="http://".concat(e));try{return!ye(new URL(t).hostname)}catch(e){return!1}}var we,Te=function(e){return null!=e?e.constructor:null},n=function(e,t){return Boolean(e&&t&&e instanceof t)},ke=function(e){return Te(e)===Function},_e=he,s=pe,g=function(e){return Te(e)===Number&&!Number.isNaN(e)},h=me,p=ke,y=fe,Ee=ge,b=function(e){return null!==e&&"object"==_typeof(e)&&1===e.nodeType&&"object"==_typeof(e.style)&&"object"==_typeof(e.ownerDocument)},v=ye,Se=(we=document.createElement("span"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},i=Object.keys(t).find(function(e){return void 0!==we.style[e]}),!!h(i)&&t[i]);function Ce(e,t){setTimeout(function(){try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch(e){}},t)}var w={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function Ae(e,t){return t.split(".").reduce(function(e,t){return e&&e[t]},e)}function T(){for(var t,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length,i=new Array(1<e?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];return i.length&&(t=i.shift(),s(t))?(Object.keys(t).forEach(function(e){s(t[e])?(Object.keys(n).includes(e)||Object.assign(n,_defineProperty({},e,{})),T(n[e],t[e])):Object.assign(n,_defineProperty({},e,t[e]))}),T.apply(void 0,[n].concat(i))):n}function Pe(e,o){e=e.length?e:[e];Array.from(e).reverse().forEach(function(e,t){var t=0<t?o.cloneNode(!0):o,n=e.parentNode,i=e.nextSibling;t.appendChild(e),i?n.insertBefore(t,i):n.appendChild(t)})}function xe(n,e){b(n)&&!v(e)&&Object.entries(e).filter(function(e){e=_slicedToArray(e,2)[1];return!_e(e)}).forEach(function(e){var e=_slicedToArray(e,2),t=e[0],e=e[1];return n.setAttribute(t,e)})}function k(e,t,n){e=document.createElement(e);return s(t)&&xe(e,t),h(n)&&(e.innerText=n),e}function Ie(e,t,n,i){b(t)&&t.appendChild(k(e,n,i))}function m(e){Ee(e)||y(e)?Array.from(e).forEach(m):b(e)&&b(e.parentNode)&&e.parentNode.removeChild(e)}function Le(e){if(b(e))for(var t=e.childNodes.length;0<t;)e.removeChild(e.lastChild),--t}function Me(e,t){return b(t)&&b(t.parentNode)&&b(e)?(t.parentNode.replaceChild(e,t),e):null}function _(e,t){var r,a;return!h(e)||v(e)?{}:(r={},a=T({},t),e.split(",").forEach(function(e){var t=e.trim(),n=t.replace(".",""),e=t.replace(/[[\]]/g,"").split("="),i=_slicedToArray(e,1)[0],o=1<e.length?e[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":h(a.class)?r.class="".concat(a.class," ").concat(n):r.class=n;break;case"#":r.id=t.replace("#","");break;case"[":r[i]=o}}),T(a,r))}function E(e,t){b(e)&&(f(t=t)||(t=!e.hidden),e.hidden=t)}function S(e,t,n){return Ee(e)?Array.from(e).map(function(e){return S(e,t,n)}):!!b(e)&&(e.classList[void 0!==n?n?"add":"remove":"toggle"](t),e.classList.contains(t))}function Oe(e,t){return b(e)&&e.classList.contains(t)}function C(e,t){var n=Element.prototype;return(n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function Ne(e){return this.elements.container.querySelectorAll(e)}function o(e){return this.elements.container.querySelector(e)}function je(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];b(e)&&(e.focus({preventScroll:!0}),t)&&S(e,this.config.classNames.tabFocus)}var t,Re={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},A={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(e,t,n){n=w.isIPhone&&n&&A.playsinline,t=A[e]||"html5"!==t;return{api:t,ui:t&&A.rangeInput&&("video"!==e||!w.isIPhone||n)}},pip:!(w.isIPhone||!p(k("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||k("video").disablePictureInPicture)),airplay:p(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInl
1ine"in document.createElement("video"),mime:function(e){if(v(e))return!1;var t=_slicedToArray(e.split("/"),1)[0],n=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(Re).includes(n)&&(n+='; codecs="'.concat(Re[e],'"'));try{return Boolean(n&&this.media.canPlayType(n).replace(/no/,""))}catch(e){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:((t=document.createElement("input")).type="range")===t.type,touch:"ontouchstart"in document.documentElement,transitions:!1!==Se,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},ze=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0,null}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}();function De(t,e,n){var i,o=this,r=3<arguments.length&&void 0!==arguments[3]&&arguments[3],a=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],s=5<arguments.length&&void 0!==arguments[5]&&arguments[5];t&&"addEventListener"in t&&!v(e)&&p(n)&&(e=e.split(" "),i=ze?{passive:a,capture:s}:s,e.forEach(function(e){o&&o.eventListeners&&r&&o.eventListeners.push({element:t,type:e,callback:n,options:i}),t[r?"addEventListener":"removeEventListener"](e,n,i)}))}function P(e){De.call(this,e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",2<arguments.length?arguments[2]:void 0,!0,!(3<arguments.length&&void 0!==arguments[3])||arguments[3],4<arguments.length&&void 0!==arguments[4]&&arguments[4])}function He(e){De.call(this,e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",2<arguments.length?arguments[2]:void 0,!1,!(3<arguments.length&&void 0!==arguments[3])||arguments[3],4<arguments.length&&void 0!==arguments[4]&&arguments[4])}function qe(o){var r=this,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",s=2<arguments.length?arguments[2]:void 0,l=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],c=4<arguments.length&&void 0!==arguments[4]&&arguments[4];De.call(this,o,a,function e(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];He(o,a,e,l,c),s.apply(r,n)},!0,l,c)}function x(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};b(e)&&!v(t)&&(t=new CustomEvent(t,{bubbles:n,detail:_objectSpread(_objectSpread({},i),{},{plyr:this})}),e.dispatchEvent(t))}function I(e){var t;n(t=e,Promise)&&ke(t.then)&&e.then(null,function(){})}function We(n){return y(n)?n.filter(function(e,t){return n.indexOf(e)===t}):n}function Fe(e,n){return y(e)&&e.length?e.reduce(function(e,t){return Math.abs(t-n)<Math.abs(e-n)?t:e}):null}function Be(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}var Ve=[[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(function(e,t){var t=_slicedToArray(t,2),n=t[0],t=t[1];return _objectSpread(_objectSpread({},e),{},_defineProperty({},n/t,[n,t]))},{});function Ue(e){return(y(e)||h(e)&&e.includes(":"))&&(y(e)?e:e.split(":")).map(Number).every(g)}function Ye(e){var t;return y(e)&&e.every(g)?[(t=(e=_slicedToArray(e,2))[0])/(e=function e(t,n){return 0===n?t:e(n,t%n)}(t,t=e[1])),t/e]:null}function Ke(e){function t(e){return Ue(e)?e.split(":").map(Number):null}var n,e=t(e);return Ye(e=null===(e=null===(e=null===e?t(this.config.ratio):e)&&!v(this.embed)&&y(this.embed.ratio)?this.embed.ratio:e)&&this.isHTML5?[(n=this.media).videoWidth,n.videoHeight]:e)}function Qe(e){var t,n,i,o;return this.isVideo&&(t=this.elements.wrapper,e=Ke.call(this,e),y(e))?(n=100/(i=(o=_slicedToArray(Ye(e),2))[0])*(o=o[1]),Be("aspect-ratio: ".concat(i,"/").concat(o))?t.style.aspectRatio="".concat(i,"/").concat(o):t.style.paddingBottom="".concat(n,"%"),this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui?(o=((i=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10))-n)/(i/50),this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform="translateY(-".concat(o,"%)")):this.isHTML5&&t.classList.add(this.config.classNames.videoFixedRatio),{padding:n,ratio:e}):{}}function $e(e,t,n){var n=2<arguments.length&&void 0!==n?n:.05,i=e/t,o=Fe(Object.keys(Ve),i);return Math.abs(o-i)<=n?Ve[o]:[e,t]}var L={getSources:function(){var t=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(function(e){e=e.getAttribute("type");return!!v(e)||A.mime.call(t,e)}):[]},getQualityOptions:function(){return this.config.quality.forced?this.config.quality.options:L.getSources.call(this).map(function(e){return Number(e.getAttribute("size"))}
1).filter(Boolean)},setup:function(){var l;this.isHTML5&&((l=this).options.speed=l.config.speed.options,v(this.config.ratio)||Qe.call(l),Object.defineProperty(l.media,"quality",{get:function(){var e=L.getSources.call(l).find(function(e){return e.getAttribute("src")===l.source});return e&&Number(e.getAttribute("size"))},set:function(t){if(l.quality!==t){if(l.config.quality.forced&&p(l.config.quality.onChange))l.config.quality.onChange(t);else{var e=L.getSources.call(l).find(function(e){return Number(e.getAttribute("size"))===t});if(!e)return;var n=l.media,i=n.currentTime,o=n.paused,r=n.preload,a=n.readyState,s=n.playbackRate;l.media.src=e.getAttribute("src"),"none"===r&&!a||(l.once("loadedmetadata",function(){l.speed=s,l.currentTime=i,o||I(l.play())}),l.media.load())}x.call(l,l.media,"qualitychange",!1,{quality:t})}}}))},cancelRequests:function(){this.isHTML5&&(m(L.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function Ge(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return v(e)?e:e.toString().replace(/{(\d+)}/g,function(e,t){return n[t].toString()})}function Xe(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"";return e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),n.toString())}function Je(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"").toString().replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()})}function Ze(e){var t=document.createElement("div");return t.appendChild(e),t.innerHTML}var et={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},M=function(){var n,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return v(e)||v(t)?"":(n=Ae(t.i18n,e),v(n)?Object.keys(et).includes(e)?et[e]:"":(e={"{seektime}":t.seekTime,"{title}":t.title},Object.entries(e).forEach(function(e){var e=_slicedToArray(e,2),t=e[0],e=e[1];n=Xe(n,t,e)}),n))},tt=function(){return _createClass(function n(e){var i=this;_classCallCheck(this,n),c(this,"get",function(e){var t;return n.supported&&i.enabled&&(t=window.localStorage.getItem(i.key),!v(t))?(t=JSON.parse(t),h(e)&&e.length?t[e]:t):null}),c(this,"set",function(e){if(n.supported&&i.enabled&&s(e)){var t=i.get();T(t=v(t)?{}:t,e);try{window.localStorage.setItem(i.key,JSON.stringify(t))}catch(e){}}}),this.enabled=e.config.storage.enabled,this.key=e.config.storage.key},null,[{key:"supported",get:function(){try{var e;return"localStorage"in window?(e="___test",window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0):!1}catch(e){return!1}}}])}();function nt(e,t){var o=1<arguments.length&&void 0!==t?t:"text";return new Promise(function(t,n){try{var i=new XMLHttpRequest;"withCredentials"in i&&(i.addEventListener("load",function(){if("text"===o)try{t(JSON.parse(i.responseText))}catch(e){t(i.responseText)}else t(i.response)}),i.addEventListener("error",function(){throw new Error(i.status)}),i.open("GET",e,!0),i.responseType=o,i.send())}catch(e){n(e)}})}function it(e,t){var n,i,o,r,a,s;h(e)&&(n=h(t),i=function(){return null!==document.getElementById(t)},o=function(e,t){e.innerHTML=t,n&&i()||document.body.insertAdjacentElement("afterbegin",e)},n&&i()||(r=tt.supported,(a=document.createElement("div")).setAttribute("hidden",""),n&&a.setAttribute("id",t),r&&null!==(s=window.localStorage.getItem("cache-".concat(t)))&&(s=JSON.parse(s),o(a,s.content)),nt(e).then(function(e){if(!v(e)){if(r)try{window.localStorage.setItem("cache-".concat(t),JSON.stringify({content:e}))}catch(e){}o(a,e)}}).catch(function(){})))}function ot(e){return Math.trunc(e/60/60%60,10)}function rt(e,t,n){var i,o,r,a,e=0<arguments.length&&void 0!==e?e:0,t=1<arguments.length&&void 0!==t&&t,n=2<arguments.length&&void 0!==n&&n;return g(e)?(i=function(e){return"0".concat(e).slice(-2)},a=ot(e),o=Math.trunc(e/60%60,10),r=Math.trunc(e%60,10),a=t||0<a?"".concat(a,":"):"","".concat(n&&0<e?"-":"").concat(a).concat(i(o),":").concat(i(r))):rt(void 0,t,n)}var O={getIconUrl:function(){var e=new URL(this.config.iconUrl,window.location),t=window.location.host||window.top.location.host,e=e.host!==t||w.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:e}},findElements:function(){try{return this.elements.controls=o.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:Ne.call(this,this.config.selectors.buttons.play),pause:o.call(this,this.config.selectors.buttons.pause),restart:o.call(this,this.config.selectors.buttons.restart),rewind:o.call(this,this.config.selectors.buttons.rewind),fastForward:o.call(this,this.config.selectors.buttons.fastForward),mute:o.call(this,this.config.selectors.buttons.mute),pip:o.call(this,this.config.selectors.buttons.pip),airplay:o.call(this,this.config.selectors.buttons.airplay),settings:o.call(this,this.config.selectors.buttons.settings),captions:o.call(this,this.config.selectors.buttons.captions),fullscreen:o.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=o.call(this,this.config.selectors.progress),this.elements.inputs={seek:o.call(this,this.config.selectors.inputs.seek),volume:o.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:o.call(this,this.config.selectors.display.buffer),currentTime:o.call(this,this.config.selectors.display.currentTime),duration:o.call(this,this.config.selectors.display.duration)},b(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(this.config.classNames.tooltip))),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon:function(e,t){var n="http://www.w3.org/2000/svg",i=O.getIconUrl.call(this),i="".concat(i.cors?"":i.url,"#").concat(this.config.iconPrefix),o=document.createElementNS(n,"svg"),t=(xe(o,T(t,{"aria-hidden":"true",focusable:"false"})),document.createElementNS(n,"use")),n="".concat(i,"-").concat(e);return"href"in t&&t.setAttributeNS("http://www.w3.org/1999/xlink","href",n),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n),o.appendChild(t),o},createLabel:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=M(e,this.config);return k("span",_objectSpread(_objectSpread({},t),{}
1,{class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")}),e)},createBadge:function(e){var t;return v(e)?null:((t=k("span",{class:this.config.classNames.menu.value})).appendChild(k("span",{class:this.config.classNames.menu.badge},e)),t)},createButton:function(e,t){var n=this,i=T({},t),o=function(e){return(e=function(e){e=(0<arguments.length&&void 0!==e?e:"").toString(),e=Xe(e,"-"," ");return e=Xe(e,"_"," "),e=Je(e),Xe(e," ","")}(e=(0<arguments.length&&void 0!==e?e:"").toString())).charAt(0).toLowerCase()+e.slice(1)}(e),r={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(function(e){Object.keys(i).includes(e)&&(r[e]=i[e],delete i[e])}),"button"!==r.element||Object.keys(i).includes("type")||(i.type="button"),Object.keys(i).includes("class")?i.class.split(" ").some(function(e){return e===n.config.classNames.control})||T(i,{class:"".concat(i.class," ").concat(this.config.classNames.control)}):i.class=this.config.classNames.control,e){case"play":r.toggle=!0,r.label="play",r.labelPressed="pause",r.icon="play",r.iconPressed="pause";break;case"mute":r.toggle=!0,r.label="mute",r.labelPressed="unmute",r.icon="volume",r.iconPressed="muted";break;case"captions":r.toggle=!0,r.label="enableCaptions",r.labelPressed="disableCaptions",r.icon="captions-off",r.iconPressed="captions-on";break;case"fullscreen":r.toggle=!0,r.label="enterFullscreen",r.labelPressed="exitFullscreen",r.icon="enter-fullscreen",r.iconPressed="exit-fullscreen";break;case"play-large":i.class+=" ".concat(this.config.classNames.control,"--overlaid"),r.label=o="play",r.icon="play";break;default:v(r.label)&&(r.label=o),v(r.icon)&&(r.icon=e)}t=k(r.element);return r.toggle?(t.appendChild(O.createIcon.call(this,r.iconPressed,{class:"icon--pressed"})),t.appendChild(O.createIcon.call(this,r.icon,{class:"icon--not-pressed"})),t.appendChild(O.createLabel.call(this,r.labelPressed,{class:"label--pressed"})),t.appendChild(O.createLabel.call(this,r.label,{class:"label--not-pressed"}))):(t.appendChild(O.createIcon.call(this,r.icon)),t.appendChild(O.createLabel.call(this,r.label))),T(i,_(this.config.selectors.buttons[o],i)),xe(t,i),"play"===o?(y(this.elements.buttons[o])||(this.elements.buttons[o]=[]),this.elements.buttons[o].push(t)):this.elements.buttons[o]=t,t},createRange:function(e,t){t=k("input",T(_(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":M(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=t,O.updateRangeFill.call(this,t),de.setup(t),t},createProgress:function(e,t){var n,t=k("progress",T(_(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));return"volume"!==e&&(t.appendChild(k("span",null,"0")),n=(n={played:"played",buffer:"buffered"}[e])?M(n,this.config):"",t.innerText="% ".concat(n.toLowerCase())),this.elements.display[e]=t},createTime:function(e,t){t=_(this.config.selectors.display[e],t),t=k("div",T(t,{class:"".concat(t.class||""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":M(e,this.config)}),"00:00");return this.elements.display[e]=t},bindMenuItemShortcuts:function(i,o){var r=this;P.call(this,i,"keydown keyup",function(e){var t,n;["Space","ArrowUp","ArrowDown","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),"keydown"!==e.type)&&(!(t=C(i,'[role="menuitemradio"]'))&&["Space","ArrowRight"].includes(e.key)?O.showMenuPanel.call(r,o,!0):"Space"!==e.key&&("ArrowDown"===e.key||t&&"ArrowRight"===e.key?(n=i.nextElementSibling,b(n)||(n=i.parentNode.firstElementChild)):(n=i.previousElementSibling,b(n)||(n=i.parentNode.lastElementChild)),je.call(r,n,!0)))},!1),P.call(this,i,"keyup",function(e){"Return"===e.key&&O.focusFirstMenuItem.call(r,null,!0)})},createMenuItem:function(e){var t=this,n=e.value,i=e.list,o=e.type,r=e.title,a=e.badge,a=void 0===a?null:a,e=e.checked,e=void 0!==e&&e,s=_(this.config.selectors.inputs[o]),l=k("button",T(s,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.c
1ontrol," ").concat(s.class||"").trim(),"aria-checked":e,value:n})),s=k("span");s.innerHTML=r,b(a)&&s.appendChild(a),l.appendChild(s),Object.defineProperty(l,"checked",{enumerable:!0,get:function(){return"true"===l.getAttribute("aria-checked")},set:function(e){e&&Array.from(l.parentNode.children).filter(function(e){return C(e,'[role="menuitemradio"]')}).forEach(function(e){return e.setAttribute("aria-checked","false")}),l.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(l,"click keyup",function(e){if(!d(e)||"Space"===e.key){switch(e.preventDefault(),e.stopPropagation(),l.checked=!0,o){case"language":t.currentTrack=Number(n);break;case"quality":t.quality=n;break;case"speed":t.speed=parseFloat(n)}O.showMenuPanel.call(t,"home",d(e))}},o,!1),O.bindMenuItemShortcuts.call(this,l,o),i.appendChild(l)},formatTime:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return g(e)?rt(e,0<ot(this.duration),t):e},updateTimeDisplay:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];b(e)&&g(t)&&(e.innerText=O.formatTime(t,n))},updateVolume:function(){this.supported.ui&&(b(this.elements.inputs.volume)&&O.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),b(this.elements.buttons.mute))&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume)},setRange:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;b(e)&&(e.value=t,O.updateRangeFill.call(this,e))},updateProgress:function(e){var t=this;if(this.supported.ui&&l(e)){var n,i;if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":n=this.currentTime,i=this.duration,n=0===n||0===i||Number.isNaN(n)||Number.isNaN(i)?0:(n/i*100).toFixed(2),"timeupdate"===e.type&&O.setRange.call(this,this.elements.inputs.seek,n);break;case"playing":case"progress":i=this.elements.display.buffer,n=100*this.buffered,n=g(n)?n:0,i=b(i)?i:t.elements.display.buffer,b(i)&&(i.value=n,i=i.getElementsByTagName("span")[0],b(i))&&(i.childNodes[0].nodeValue=n)}}},updateRangeFill:function(e){var t,n,i,e=l(e)?e.target:e;b(e)&&"range"===e.getAttribute("type")&&(C(e,this.config.selectors.inputs.seek)?(e.setAttribute("aria-valuenow",this.currentTime),t=O.formatTime(this.currentTime),n=O.formatTime(this.duration),i=M("seekLabel",this.config),e.setAttribute("aria-valuetext",i.replace("{currentTime}",t).replace("{duration}",n))):C(e,this.config.selectors.inputs.volume)?(i=100*e.value,e.setAttribute("aria-valuenow",i),e.setAttribute("aria-valuetext","".concat(i.toFixed(1),"%"))):e.setAttribute("aria-valuenow",e.value),w.isWebkit)&&e.style.setProperty("--value",e.value/e.max*100+"%")},updateSeekTooltip:function(e){if(this.config.tooltips.seek&&b(this.elements.inputs.seek)&&b(this.elements.display.seekTooltip)&&0!==this.duration){var t=this.elements.display.seekTooltip,n="".concat(this.config.classNames.tooltip,"--visible"),i=function(e){return S(t,n,e)};if(this.touch)i(!1);else{var o=0,r=this.elements.progress.getBoundingClientRect();if(l(e))o=100/r.width*(e.pageX-r.left);else{if(!Oe(t,n))return;o=parseFloat(t.style.left,10)}o<0?o=0:100<o&&(o=100);var a=this.duration/100*o,r=(t.innerText=O.formatTime(a),null==(r=this.config.markers)||null==(r=r.points)?void 0:r.find(function(e){return e.time===Math.round(a)}));r&&t.insertAdjacentHTML("afterbegin","".concat(r.label,"<br>")),t.style.left="".concat(o,"%"),l(e)&&["mouseenter","mouseleave"].includes(e.type)&&i("mouseenter"===e.type)}}},timeUpdate:function(e){var t=!b(this.elements.display.duration)&&this.config.invertTime;O.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||O.updateProgress.call(this,e)},durationUpdate:function(){var e;!this.supported.ui||!this.config.invertTime&&this.currentTime||(this.duration>=Math.pow(2,32)?(E(this.elements.display.currentTime,!0),E(this.elements.progress,!0)):(b(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration),!(e=b(this.elements.display.duration))&&this.config.displayDuration&&this.paused&&O.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&O.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&O.setMarkers.call(this),O.updateSeekTooltip.call(this)))},toggleMenuButton:function(e,t){E(this.elements.settings.buttons[e],
1!t)},updateSetting:function(e,t,n){var i=this.elements.settings.panels[e],o=null;if("captions"===e)o=this.currentTrack;else{if(o=v(n)?this[e]:n,v(o)&&(o=this.config[e].default),!v(this.options[e])&&!this.options[e].includes(o))return void this.debug.warn("Unsupported value of '".concat(o,"' for ").concat(e));if(!this.config[e].options.includes(o))return void this.debug.warn("Disabled value of '".concat(o,"' for ").concat(e))}b(t)||(t=i&&i.querySelector('[role="menu"]')),b(t)&&(this.elements.settings.buttons[e].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=O.getLabel.call(this,e,o),n=t&&t.querySelector('[value="'.concat(o,'"]')),b(n))&&(n.checked=!0)},getLabel:function(e,t){switch(e){case"speed":return 1===t?M("normal",this.config):"".concat(t,"×");case"quality":var n;return g(t)?(n=M("qualityLabel.".concat(t),this.config)).length?n:"".concat(t,"p"):Je(t);case"captions":return N.getLabel.call(this);default:return null}},setQualityMenu:function(e){var t,n,i=this;b(this.elements.settings.panels.quality)&&(t="quality",n=this.elements.settings.panels.quality.querySelector('[role="menu"]'),y(e)&&(this.options.quality=We(e).filter(function(e){return i.config.quality.options.includes(e)})),e=!v(this.options.quality)&&1<this.options.quality.length,O.toggleMenuButton.call(this,t,e),Le(n),O.checkMenu.call(this),e)&&(this.options.quality.sort(function(e,t){var n=i.config.quality.options;return n.indexOf(e)>n.indexOf(t)?1:-1}).forEach(function(e){O.createMenuItem.call(i,{value:e,list:n,type:t,title:O.getLabel.call(i,"quality",e),badge:function(e){e=M("qualityBadge.".concat(e),i.config);return e.length?O.createBadge.call(i,e):null}(e)})}),O.updateSetting.call(this,t,n))},setCaptionsMenu:function(){var e,n,t,i,o=this;b(this.elements.settings.panels.captions)&&(e="captions",n=this.elements.settings.panels.captions.querySelector('[role="menu"]'),t=N.getTracks.call(this),i=Boolean(t.length),O.toggleMenuButton.call(this,e,i),Le(n),O.checkMenu.call(this),i)&&((i=t.map(function(e,t){return{value:t,checked:o.captions.toggled&&o.currentTrack===t,title:N.getLabel.call(o,e),badge:e.language&&O.createBadge.call(o,e.language.toUpperCase()),list:n,type:"language"}})).unshift({value:-1,checked:!this.captions.toggled,title:M("disabled",this.config),list:n,type:"language"}),i.forEach(O.createMenuItem.bind(this)),O.updateSetting.call(this,e,n))},setSpeedMenu:function(){var t,n,e,i=this;b(this.elements.settings.panels.speed)&&(t="speed",n=this.elements.settings.panels.speed.querySelector('[role="menu"]'),this.options.speed=this.options.speed.filter(function(e){return e>=i.minimumSpeed&&e<=i.maximumSpeed}),e=!v(this.options.speed)&&1<this.options.speed.length,O.toggleMenuButton.call(this,t,e),Le(n),O.checkMenu.call(this),e)&&(this.options.speed.forEach(function(e){O.createMenuItem.call(i,{value:e,list:n,type:t,title:O.getLabel.call(i,"speed",e)})}),O.updateSetting.call(this,t,n))},checkMenu:function(){var e=this.elements.settings.buttons,e=!v(e)&&Object.values(e).some(function(e){return!e.hidden});E(this.elements.settings.menu,!e)},focusFirstMenuItem:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];this.elements.settings.popup.hidden||(e=(e=b(e=e)?e:Object.values(this.elements.settings.panels).find(function(e){return!e.hidden})).querySelector('[role^="menuitem"]'),je.call(this,e,t))},toggleMenu:function(e){var t=this.elements.settings.popup,n=this.elements.buttons.settings;if(b(t)&&b(n)){var i=t.hidden,o=i;if(f(e))o=e;else if(d(e)&&"Escape"===e.key)o=!1;else if(l(e)){var r=p(e.composedPath)?e.composedPath()[0]:e.target,r=t.contains(r);if(r||!r&&e.target!==n&&o)return}n.setAttribute("aria-expanded",o),E(t,!o),S(this.elements.container,this.config.classNames.menu.open,o),o&&d(e)?O.focusFirstMenuItem.call(this,null,!0):o||i||je.call(this,n,d(e))}},getMenuSize:function(e){var t=e.cloneNode(!0),e=(t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t),t.scrollWidth),n=t.scrollHeight;return m(t),{width:e,height:n}},showMenuPanel:function(){var n,e,t,i=this,o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",r=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(o));b(o)&&(n=o.parentNode,e=Array.from(n.children).find(function(e){return!e.hidden}),A.transitions&&!A.reducedMotion&&(n.style.width="".concat(e.scrollWidth,"px"),n.style.height="".concat(e.scrollHeight,"px"),t=O.getMenuSize.call(this,o),P.call(this,n,Se,function e(t){t.target===n&&["width","height"].includes(t.propertyName)&&(n.style.width="",n.style.height="",He.call(i,n,Se,e))}),n.style.width="".concat(t.width,"px"),n.style.height="".concat(t.height,"px")),E(e,!0),E(o,!1),O.focusFirstMenuItem.call(this,o,r))},setDownloadUrl:function(){var e=this.elements.buttons.download;b(e)&&e.setAttribute("href",this.download)},create:function(a){var s=this,l=O.bindMenuItemShortcuts,c=O.createButton,u=O.createProgress,d=O.createRange,h=O.createTime,e=O.setQualityMenu,t=O.setSpeedMenu,p=O.showMenuPanel,m=(this.elements.controls=null,y(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(c.call(this,"play-large")),k("div",_(this.config.selectors.controls.wrapper))),f=(this.elements.controls=m,{class:"plyr__controls__item"});return We(y(this.config.controls)?this.config.controls:[]).forEac
1h(function(e){var t,o,r,n,i;"restart"===e&&m.appendChild(c.call(s,"restart",f)),"rewind"===e&&m.appendChild(c.call(s,"rewind",f)),"play"===e&&m.appendChild(c.call(s,"play",f)),"fast-forward"===e&&m.appendChild(c.call(s,"fast-forward",f)),"progress"===e&&(t=k("div",{class:"".concat(f.class," plyr__progress__container")}),(n=k("div",_(s.config.selectors.progress))).appendChild(d.call(s,"seek",{id:"plyr-seek-".concat(a.id)})),n.appendChild(u.call(s,"buffer")),s.config.tooltips.seek&&(i=k("span",{class:s.config.classNames.tooltip},"00:00"),n.appendChild(i),s.elements.display.seekTooltip=i),s.elements.progress=n,t.appendChild(s.elements.progress),m.appendChild(t)),"current-time"===e&&m.appendChild(h.call(s,"currentTime",f)),"duration"===e&&m.appendChild(h.call(s,"duration",f)),"mute"!==e&&"volume"!==e||(i=s.elements.volume,b(i)&&m.contains(i)||(i=k("div",T({},f,{class:"".concat(f.class," plyr__volume").trim()})),s.elements.volume=i,m.appendChild(i)),"mute"===e&&i.appendChild(c.call(s,"mute")),"volume"!==e)||w.isIos||(n={max:1,step:.05,value:s.config.volume},i.appendChild(d.call(s,"volume",T(n,{id:"plyr-volume-".concat(a.id)})))),"captions"===e&&m.appendChild(c.call(s,"captions",f)),"settings"!==e||v(s.config.settings)||((t=k("div",T({},f,{class:"".concat(f.class," plyr__menu").trim(),hidden:""}))).appendChild(c.call(s,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(a.id),"aria-expanded":!1})),i=k("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(a.id),hidden:""}),o=k("div"),n=k("div",{id:"plyr-settings-".concat(a.id,"-home")}),r=k("div",{role:"menu"}),n.appendChild(r),o.appendChild(n),s.elements.settings.panels.home=n,s.config.settings.forEach(function(e){var t=k("button",T(_(s.config.selectors.buttons.settings),{type:"button",class:"".concat(s.config.classNames.control," ").concat(s.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""})),n=(l.call(s,t,e),P.call(s,t,"click",function(){p.call(s,e,!1)}),k("span",null,M(e,s.config))),i=k("span",{class:s.config.classNames.menu.value}),i=(i.innerHTML=a[e],n.appendChild(i),t.appendChild(n),r.appendChild(t),k("div",{id:"plyr-settings-".concat(a.id,"-").concat(e),hidden:""})),n=k("button",{type:"button",class:"".concat(s.config.classNames.control," ").concat(s.config.classNames.control,"--back")});n.appendChild(k("span",{"aria-hidden":!0},M(e,s.config))),n.appendChild(k("span",{class:s.config.classNames.hidden},M("menuBack",s.config))),P.call(s,i,"keydown",function(e){"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),p.call(s,"home",!0))},!1),P.call(s,n,"click",function(){p.call(s,"home",!1)}),i.appendChild(n),i.appendChild(k("div",{role:"menu"})),o.appendChild(i),s.elements.settings.buttons[e]=t,s.elements.settings.panels[e]=i}),i.appendChild(o),t.appendChild(i),m.appendChild(t),s.elements.settings.popup=i,s.elements.settings.menu=t),"pip"===e&&A.pip&&m.appendChild(c.call(s,"pip",f)),"airplay"===e&&A.airplay&&m.appendChild(c.call(s,"airplay",f)),"download"===e&&(n=T({},f,{element:"a",href:s.download,target:"_blank"}),s.isHTML5&&(n.download=""),i=s.config.urls.download,!ve(i)&&s.isEmbed&&T(n,{icon:"logo-".concat(s.provider),label:s.provider}),m.appendChild(c.call(s,"download",n))),"fullscreen"===e&&m.appendChild(c.call(s,"fullscreen",f))}),this.isHTML5&&e.call(this,L.getQualityOptions.call(this)),t.call(this),m},inject:function(){var n,t,e,i=this,o=(this.config.loadSprite&&(o=O.getIconUrl.call(this)).cors&&it(o.url,"sprite-plyr"),this.id=Math.floor(1e4*Math.random()),null),r=(this.elements.controls=null,{id:this.id,seektime:this.config.seekTime,title:this.config.title}),a=!0;p(this.config.controls)&&(this.config.controls=this.config.controls.call(this,r)),this.config.controls||(this.config.controls=[]),b(this.config.controls)||h(this.config.controls)?o=this.config.controls:(o=O.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:N.getLabel.call(this)}),a=!1),a&&h(this.config.controls)&&(n=o,Object.entries(r).forEach(function(e){var e=_slicedToArray(e,2),t=e[0],e=e[1];n=Xe(n,"{".concat(t,"}"),e)}),o=n),h(this.config.selectors.controls.container)&&(e=document.querySelector(this.config.selectors.controls.container)),(e=b(e)?e:this.elements.container)[b(o)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",o),b(this.elements.controls)||O.findElements.call(this),v(this.elements.buttons)||(t=function(e){var t=i.config.classNames.c
1ontrolPressed;Object.defineProperty(e,"pressed",{enumerable:!0,get:function(){return Oe(e,t)},set:function(){S(e,t,0<arguments.length&&void 0!==arguments[0]&&arguments[0])}})},Object.values(this.elements.buttons).filter(Boolean).forEach(function(e){y(e)||Ee(e)?Array.from(e).filter(Boolean).forEach(t):t(e)})),w.isEdge&&Ce(e),this.config.tooltips.controls&&(r=(a=this.config).classNames,e=a.selectors,a="".concat(e.controls.wrapper," ").concat(e.labels," .").concat(r.hidden),e=Ne.call(this,a),Array.from(e).forEach(function(e){S(e,i.config.classNames.hidden,!1),S(e,i.config.classNames.tooltip,!0)}))},setMediaMetadata:function(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch(e){}},setMarkers:function(){var e,t,i,o,n,r,a=this;this.duration&&!this.elements.markers&&null!=(e=null==(e=this.config.markers)||null==(e=e.points)?void 0:e.filter(function(e){e=e.time;return 0<e&&e<a.duration}))&&e.length&&(t=document.createDocumentFragment(),i=document.createDocumentFragment(),o=null,n="".concat(this.config.classNames.tooltip,"--visible"),r=function(e){return S(o,n,e)},e.forEach(function(e){var t=k("span",{class:a.config.classNames.marker},""),n=e.time/a.duration*100+"%";o&&(t.addEventListener("mouseenter",function(){e.label||(o.style.left=n,o.innerHTML=e.label,r(!0))}),t.addEventListener("mouseleave",function(){r(!1)})),t.addEventListener("click",function(){a.currentTime=e.time}),t.style.left=n,i.appendChild(t)}),t.appendChild(i),this.config.tooltips.seek||(o=k("span",{class:this.config.classNames.tooltip},""),t.appendChild(o)),this.elements.markers={points:i,tip:o},this.elements.progress.appendChild(t))}};function at(e,t){var n=e;1<arguments.length&&void 0!==t&&!t||((t=document.createElement("a")).href=n,n=t.href);try{return new URL(n)}catch(e){return null}}function st(e){var n=new URLSearchParams;return s(e)&&Object.entries(e).forEach(function(e){var e=_slicedToArray(e,2),t=e[0],e=e[1];n.set(t,e)}),n}function lt(){}var N={setup:function(){var e,t,n;this.supported.ui&&(!this.isVideo||this.isYouTube||this.isHTML5&&!A.textTracks?y(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&O.setCaptionsMenu.call(this):(b(this.elements.captions)||(this.elements.captions=k("div",_(this.config.selectors.captions)),t=this.elements.captions,e=this.elements.wrapper,b(t)&&b(e)&&e.parentNode.insertBefore(t,e.nextSibling)),w.isIE&&window.URL&&(t=this.media.querySelectorAll("track"),Array.from(t).forEach(function(t){var e=t.getAttribute("src"),n=at(e);null!==n&&n.hostname!==window.location.href.hostname&&["http:","https:"].includes(n.protocol)&&nt(e,"blob").then(function(e){t.setAttribute("src",window.URL.createObjectURL(e))}).catch(function(){m(t)})})),e=We((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(function(e){return e.split("-")[0]})),"auto"===(t=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase())&&(t=_slicedToArray(e,1)[0]),n=this.storage.get("captions"),f(n)||(n=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:n,language:t,languages:e}),this.isHTML5&&(n=this.config.captions.update?"addtrack removetrack":"removetrack",P.call(this,this.media.textTracks,n,N.update.bind(this))),setTimeout(N.update.bind(this),0)))},update:function(){var t=this,e=N.getTracks.call(this,!0),n=this.captions,i=n.active,o=n.language,r=n.meta,n=n.currentTrackNode,a=Boolean(e.find(function(e){return e.language===o}));this.isHTML5&&this.isVideo&&e.filter(function(e){return!r.get(e)}).forEach(function(e){t.debug.log("Track added",e),r.set(e,{default:"showing"===e.mode}),"showing"===e.mode&&(e.mode="hidden"),P.call(t,e,"cuechange",function(){return N.updateCues.call(t)})}),(a&&this.language!==o||!e.includes(n))&&(N.setLanguage.call(this,o),N.toggle.call(this,i&&a)),this.elements&&S(this.elements.container,this.config.classNames.captions.enabled,!v(e)),y(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&O.setCaptionsMenu.call(this)},toggle:function(e){var t=this,n=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(this.supported.ui){var i=this.captions.toggled,o=this.config.classNames.captions.active,r=_e(e)?!i:e;if(r!==i){if(n||(this.captions.active=r,this.storage.set({captions:r})),!this.language&&r&&!n)return e=N.getTracks.call(this),i=N.findTrack.call(this,[this.captions.language].concat(_toConsumableArray(this.captions.languages)
1),!0),this.captions.language=i.language,void N.set.call(this,e.indexOf(i));this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=r),S(this.elements.container,o,r),this.captions.toggled=r,O.updateSetting.call(this,"captions"),x.call(this,this.media,r?"captionsenabled":"captionsdisabled")}setTimeout(function(){r&&t.captions.toggled&&(t.captions.currentTrackNode.mode="hidden")})}},set:function(e){var t,n=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=N.getTracks.call(this);-1!==e?g(e)?e in i?(this.captions.currentTrack!==e&&(t=((i=i[this.captions.currentTrack=e])||{}).language,this.captions.currentTrackNode=i,O.updateSetting.call(this,"captions"),n||(this.captions.language=t,this.storage.set({language:t})),this.isVimeo&&this.embed.enableTextTrack(t),x.call(this,this.media,"languagechange")),N.toggle.call(this,!0,n),this.isHTML5&&this.isVideo&&N.updateCues.call(this)):this.debug.warn("Track not found",e):this.debug.warn("Invalid caption argument",e):N.toggle.call(this,!1,n)},setLanguage:function(e){var t,n,i=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];h(e)?(n=e.toLowerCase(),this.captions.language=n,t=N.getTracks.call(this),n=N.findTrack.call(this,[n]),N.set.call(this,t.indexOf(n),i)):this.debug.warn("Invalid language argument",e)},getTracks:function(){var t=this,n=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return Array.from((this.media||{}).textTracks||[]).filter(function(e){return!t.isHTML5||n||t.captions.meta.has(e)}).filter(function(e){return["captions","subtitles"].includes(e.kind)})},findTrack:function(e){function n(e){return Number((t.captions.meta.get(e)||{}).default)}var i,t=this,o=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=N.getTracks.call(this),a=Array.from(r).sort(function(e,t){return n(t)-n(e)});return e.every(function(t){return!(i=a.find(function(e){return e.language===t}))}),i||(o?a[0]:void 0)},getCurrentTrack:function(){return N.getTracks.call(this)[this.currentTrack]},getLabel:function(e){var t=e;return!be(t)&&A.textTracks&&this.captions.toggled&&(t=N.getCurrentTrack.call(this)),be(t)?v(t.label)?v(t.language)?M("enabled",this.config):e.language.toUpperCase():t.label:M("disabled",this.config)},updateCues:function(e){var t,n;this.supported.ui&&(b(this.elements.captions)?_e(e)||Array.isArray(e)?((n=e)||(t=N.getCurrentTrack.call(this),n=Array.from((t||{}).activeCues||[]).map(function(e){return e.getCueAsHTML()}).map(Ze)),(t=n.map(function(e){return e.trim()}).join("\n"))!==this.elements.captions.innerHTML&&(Le(this.elements.captions),(n=k("span",_(this.config.selectors.caption))).innerHTML=t,this.elements.captions.appendChild(n),x.call(this,this.media,"cuechange"))):this.debug.warn("updateCues: Invalid input",e):this.debug.warn("No captions element to render to"))}},ct={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.2/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"S
1D"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",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"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},ut="picture-in-picture",j={html5:"html5",youtube:"youtube",vimeo:"vimeo"},dt=function(){return _createClass(function e(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];_classCallCheck(this,e),this.enabled=window.console&&t,this.enabled&&this.log("Debugging enabled")},[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):lt}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):lt}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):lt}}])}(),ht=function(){function i(e){var t,n,o=this;_classCallCheck(this,i),c(this,"onChange",function(){var e;o.enabled&&(e=o.player.elements.buttons.fullscreen,b(e)&&(e.pressed=o.active),e=o.target===o.player.media?o.target:o.player.elements.container,x.call(o.player,e,o.active?"enterfullscreen":"exitfullscreen",!0))}),c(this,"toggleFallback",function(){var e,t,n,i=0<arguments.length&&void 0!==arguments[0]&&arguments[0];i?o.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(o.scrollPosition.x,o.scrollPosition.y),document.body.style.overflow=i?"hidden":"",S(o.target,o.player.config.classNames.fullscreen.fallback,i),w.isIos&&(e=document.head.querySelector('meta[name="viewport"]'),t="viewport-fit=cover",e||(e=document.createElement("meta")).setAttribute("name","viewport"),n=h(e.content)&&e.content.includes(t),i?(o.cleanupViewport=!n,n||(e.content+=",".concat(t))):o.cleanupViewport&&(e.content=e.content.split(",").filter(function(e){return e.trim()!==t}).join(","))),o.onChange()}),c(this,"trapFocus",function(e){var t,n,i;!w.isIos&&o.active&&"Tab"===e.key&&(t=document.activeElement,n=_slicedToArray(i=Ne.call(o.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),1)[0],t!==(i=i[i.length-1])||e.shiftKey?t===n&&e.shiftKey&&(i.focus(),e.preventDefault()):(n.focus(),e.preventDefault()))}),c(this,"update",function(){var e;o.enabled?(e=o.forceFallback?"Fallback (forced)":i.native?"Native":"Fallback",o.player.debug.log("".concat(e," fullscreen enabled"))):o.player.debug.log("Fullscreen not supported and fallback disabled"),S(o.player.elements.container,o.player.config.classNames.fullscreen.enabled,o.enabled)}),c(this,"enter",function(){o.enabled&&(w.isIos&&o.player.config.fullscreen.iosNative?o.player.isVimeo?o.player.embed.requestFullscreen():o.target.webkitEnterFullscreen():!i.native||o.forceFallback?o.toggleFallback(!0):o.prefix?v(o.prefix)||o.target["".concat(o.prefix,"Request").concat(o.property)]():o.target.requestFullscreen({navigationUI:"hide"}))}),c(this,"exit",function(){var e;o.enabled&&(w.isIos&&o.player.config.fullscreen.iosNative?(o.target.webkitExitFullscreen(),I(o.player.play())):!i.native||o.forceFallback?o.toggleFallback(!1):o.prefix?v(o.prefix)||(e="moz"===o.prefix?"Cancel":"Exit",document["".concat(o.prefix).concat(e).concat(o.property)]()):(document.cancelFullScreen||document.exitFullscreen).call(document))}),c(this,"toggle",function(){o.active?o.exit():o.enter()}),this.player=e,this.prefix=i.prefix,this.property=i.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===e.config.fullscreen.fallback,this.player.elements.fullscreen=e.config.fullscreen.container&&(t=this.player.elements.container,n=e.config.fullscreen.container,(Element.prototype.closest||function(){var e=this;do{if(C.matches(e,n))return e}while(null!==(e=e.parentElement||e.parentNode)&&1===e.nodeType);return null}).call(t,n)),P.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),function(){o.onChange()}),P.call(this.player,this.player.elements.container,"dblclick",function(e){b(o.player.elements.controls)&&o.player.elements.controls.contains(e.target)||o.player.listeners.proxy(e,o.toggle,"fullscreen")}),P.call(this,this.player.elements.container,"keydown",function(e){return o.trapFocus(e)}),this.update()}return _createClass(i,[{key:"usingNative",get:function(){return i.native&&!this.forceFallback}},{key:"enabled",get:function(){return(i.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){var e;return!!this.enabled&&(!i.native||this.forceFallback?Oe(this.target,this.player.config.classNames.fullscreen.fallback):(e=this.prefix?this.target.getRootNode()["".concat(this.prefix).concat(this.property,"Element")]:this.target.getRootNode().fullscreenElement)&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target)}},{key:"target",get:function(){return w.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}
1],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){var t;return p(document.exitFullscreen)?"":(t="",["webkit","moz","ms"].some(function(e){return!(!p(document["".concat(e,"ExitFullscreen")])&&!p(document["".concat(e,"CancelFullScreen")])||(t=e,0))}),t)}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}])}();function pt(o,e){var r=1<arguments.length&&void 0!==e?e:1;return new Promise(function(e,t){function n(){delete i.onload,delete i.onerror,(i.naturalWidth>=r?e:t)(i)}var i=new Image;Object.assign(i,{onload:n,onerror:n,src:o})})}var R={addStyleHook:function(){S(this.elements.container,this.config.selectors.container.replace(".",""),!0),S(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){0<arguments.length&&void 0!==arguments[0]&&arguments[0]&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var e=this;this.listeners.media(),this.supported.ui?(b(this.elements.controls)||(O.inject.call(this),this.listeners.controls()),R.toggleNativeControls.call(this),this.isHTML5&&N.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,O.updateVolume.call(this),O.timeUpdate.call(this),O.durationUpdate.call(this),R.checkPlaying.call(this),S(this.elements.container,this.config.classNames.pip.supported,A.pip&&this.isHTML5&&this.isVideo),S(this.elements.container,this.config.classNames.airplay.supported,A.airplay&&this.isHTML5),S(this.elements.container,this.config.classNames.isIos,w.isIos),S(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(function(){x.call(e,e.media,"ready")},0),R.setTitle.call(this),this.poster&&R.setPoster.call(this,this.poster,!1).catch(function(){}),this.config.duration&&O.durationUpdate.call(this),this.config.mediaMetadata&&O.setMediaMetadata.call(this)):(this.debug.warn("Basic support only for ".concat(this.provider," ").concat(this.type)),R.toggleNativeControls.call(this,!0))},setTitle:function(){var e,t,n,i=M("play",this.config);h(this.config.title)&&!v(this.config.title)&&(i+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach(function(e){e.setAttribute("aria-label",i)}),this.isEmbed&&(e=o.call(this,"iframe"),b(e))&&(t=v(this.config.title)?"video":this.config.title,n=M("frameTitle",this.config),e.setAttribute("title",n.replace("{title}",t)))},togglePoster:function(e){S(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster:function(t){var n=this;return(!(1<arguments.length&&void 0!==arguments[1])||arguments[1])&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",t),this.elements.poster.removeAttribute("hidden"),function(){var t=this;return new Promise(function(e){return t.ready?setTimeout(e,0):P.call(t,t.elements.container,"ready",e)}).then(function(){})}.call(this).then(function(){return pt(t)}).catch(function(e){throw t===n.poster&&R.togglePoster.call(n,!1),e}).then(function(){if(t!==n.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(function(){return Object.assign(n.elements.poster.style,{backgroundImage:"url('".concat(t,"')"),backgroundSize:""}),R.togglePoster.call(n,!0),t}))},checkPlaying:function(e){var t=this;S(this.elements.container,this.config.classNames.playing,this.playing),S(this.elements.container,this.config.classNames.paused,this.paused),S(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(function(e){Object.assign(e,{pressed:t.playing}),e.setAttribute("aria-label",M(t.playing?"pause":"play",t.config))}),l(e)&&"timeupdate"===e.type||R.toggleControls.call(this)},checkLoading:function(e){var t=this;this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(function(){S(t.elements.container,t.config.classNames.loading,t.loading),R.toggleControls.call(t)},this.loading?250:0)},toggleControls:function(e){var t,n=this.elements.controls;n&&this.config.hideControls&&(t=this.touch&&this.lastSeekTime+2e3>Date.now(),this.toggleControls(Boolean(e||this.loading||this.paused||n.pressed||n.hover||t)))},migrateStyles:function(){var t=this;Object.values(_objectSpread({},this.media.style)).filter(function(e){return!v(e)&&h(e)&&e.startsWith("--plyr")}
1).forEach(function(e){t.elements.container.style.setProperty(e,t.media.style.getPropertyValue(e)),t.media.style.removeProperty(e)}),v(this.media.style)&&this.media.removeAttribute("style")}},mt=function(){return _createClass(function e(t){var l=this;_classCallCheck(this,e),c(this,"firstTouch",function(){var e=l.player,t=e.elements;e.touch=!0,S(t.container,e.config.classNames.isTouch,!0)}),c(this,"setTabFocus",function(e){var t=l.player,n=t.elements,i=e.key,o=e.type,e=e.timeStamp;clearTimeout(l.focusTimer),"keydown"===o&&"Tab"!==i||("keydown"===o&&(l.lastKeyDown=e),i=e-l.lastKeyDown<=20,"focus"===o&&!i)||(e=t.config.classNames.tabFocus,S(Ne.call(t,".".concat(e)),e,!1),"focusout"===o)||(l.focusTimer=setTimeout(function(){var e=document.activeElement;n.container.contains(e)&&S(document.activeElement,t.config.classNames.tabFocus,!0)},10))}),c(this,"global",function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=l.player;t.config.keyboard.global&&De.call(t,window,"keydown keyup",l.handleKey,e,!1),De.call(t,document.body,"click",l.toggleMenu,e),qe.call(t,document.body,"touchstart",l.firstTouch),De.call(t,document.body,"keydown focus blur focusout",l.setTabFocus,e,!1,!0)}),c(this,"container",function(){function t(){clearTimeout(n.resized),n.resized=setTimeout(i,50)}var a=l.player,e=a.config,s=a.elements,n=a.timers,i=(!e.keyboard.global&&e.keyboard.focused&&P.call(a,s.container,"keydown keyup",l.handleKey,!1),P.call(a,s.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",function(e){(t=s.controls)&&"enterfullscreen"===e.type&&(t.pressed=!1,t.hover=!1);var t=0;["touchstart","touchmove","mousemove"].includes(e.type)&&(R.toggleControls.call(a,!0),t=a.touch?3e3:2e3),clearTimeout(n.controls),n.controls=setTimeout(function(){return R.toggleControls.call(a,!1)},t)}),function(){var e,t,n,i,o,r;a.isVimeo&&!a.config.vimeo.premium&&(e=s.wrapper,o=a.fullscreen.active,t=(n=_slicedToArray(Ke.call(a),2))[0],n=n[1],i=Be("aspect-ratio: ".concat(t," / ").concat(n)),o?(r=t/n<(o=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)])[0]/(o=o[1]),i?(e.style.width=r?"auto":"100%",e.style.height=r?"100%":"auto"):(e.style.maxWidth=r?o/n*t+"px":null,e.style.margin=r?"0 auto":null)):i?(e.style.width=null,e.style.height=null):(e.style.maxWidth=null,e.style.margin=null))});P.call(a,s.container,"enterfullscreen exitfullscreen",function(e){a.fullscreen.target!==s.container||!a.isEmbed&&v(a.config.ratio)||(i(),("enterfullscreen"===e.type?P:He).call(a,window,"resize",t))})}),c(this,"media",function(){var n=l.player,i=n.elements;if(P.call(n,n.media,"timeupdate seeking seeked",function(e){return O.timeUpdate.call(n,e)}),P.call(n,n.media,"durationchange loadeddata loadedmetadata",function(e){return O.durationUpdate.call(n,e)}),P.call(n,n.media,"ended",function(){n.isHTML5&&n.isVideo&&n.config.resetOnEnd&&(n.restart(),n.pause())}),P.call(n,n.media,"progress playing seeking seeked",function(e){return O.updateProgress.call(n,e)}),P.call(n,n.media,"volumechange",function(e){return O.updateVolume.call(n,e)}),P.call(n,n.media,"playing play pause ended emptied timeupdate",function(e){return R.checkPlaying.call(n,e)}),P.call(n,n.media,"waiting canplay seeked playing",function(e){return R.checkLoading.call(n,e)}),n.supported.ui&&n.config.clickToPlay&&!n.isAudio){var t=o.call(n,".".concat(n.config.classNames.video));if(!b(t))return;P.call(n,i.container,"click",function(e){![i.container,t].includes(e.target)&&!t.contains(e.target)||n.touch&&n.config.hideControls||(n.ended?(l.proxy(e,n.restart,"restart"),l.proxy(e,function(){I(n.play())},"play")):l.proxy(e,function(){I(n.togglePlay())},"play"))})}n.supported.ui&&n.config.disableContextMenu&&P.call(n,i.wrapper,"contextmenu",function(e){e.preventDefault()},!1),P.call(n,n.media,"volumechange",function(){n.storage.set({volume:n.volume,muted:n.muted})}),P.call(n,n.media,"ratechange",function(){O.updateSetting.call(n,"speed"),n.storage.set({speed:n.speed})}),P.call(n,n.media,"qualitychange",function(e){O.updateSetting.call(n,"quality",null,e.detail.quality)}),P.call(n,n.media,"ready qualitychange",function(){O.setDownloadUrl.call(n)});var e=n.config.events.concat(["keyup","keydown"]).join(" ");P.call(n,n.media,e,function(e){var t=void 0===(t=e.detail)?{}:t;"error"===e.type&&(t=n.media.error),x.call(n,i.container,e.type,!0,t)})}),c(this,"proxy",function(e,t,n){var i=l.player,n=i.config.listeners[n],o=!0;!1!==(o=p(n)?n.call(i,e):o)&&p(t)&&t.call(i,e)}),c(this,"bind",function(e,t,n,i){var o=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],r=l.player,a=r.config.listeners[i],a=p(a);P.call(r,e,t,function(e){return l.proxy(e,n,i)},o&&!a)}),c(this,"controls",function(){var e,o=l.player,i=o.elements,t=w.isIE?"change":"input";
1i.buttons.play&&Array.from(i.buttons.play).forEach(function(e){l.bind(e,"click",function(){I(o.togglePlay())},"play")}),l.bind(i.buttons.restart,"click",o.restart,"restart"),l.bind(i.buttons.rewind,"click",function(){o.lastSeekTime=Date.now(),o.rewind()},"rewind"),l.bind(i.buttons.fastForward,"click",function(){o.lastSeekTime=Date.now(),o.forward()},"fastForward"),l.bind(i.buttons.mute,"click",function(){o.muted=!o.muted},"mute"),l.bind(i.buttons.captions,"click",function(){return o.toggleCaptions()}),l.bind(i.buttons.download,"click",function(){x.call(o,o.media,"download")},"download"),l.bind(i.buttons.fullscreen,"click",function(){o.fullscreen.toggle()},"fullscreen"),l.bind(i.buttons.pip,"click",function(){o.pip="toggle"},"pip"),l.bind(i.buttons.airplay,"click",o.airplay,"airplay"),l.bind(i.buttons.settings,"click",function(e){e.stopPropagation(),e.preventDefault(),O.toggleMenu.call(o,e)},null,!1),l.bind(i.buttons.settings,"keyup",function(e){["Space","Enter"].includes(e.key)&&("Enter"!==e.key?(e.preventDefault(),e.stopPropagation(),O.toggleMenu.call(o,e)):O.focusFirstMenuItem.call(o,null,!0))},null,!1),l.bind(i.settings.menu,"keydown",function(e){"Escape"===e.key&&O.toggleMenu.call(o,e)}),l.bind(i.inputs.seek,"mousedown mousemove",function(e){var t=100/(t=i.progress.getBoundingClientRect()).width*(e.pageX-t.left);e.currentTarget.setAttribute("seek-value",t)}),l.bind(i.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",function(e){var t,n=e.currentTarget,i="play-on-seeked";d(e)&&!["ArrowLeft","ArrowRight"].includes(e.key)||(o.lastSeekTime=Date.now(),t=n.hasAttribute(i),e=["mouseup","touchend","keyup"].includes(e.type),t&&e?(n.removeAttribute(i),I(o.play())):!e&&o.playing&&(n.setAttribute(i,""),o.pause()))}),w.isIos&&(e=Ne.call(o,'input[type="range"]'),Array.from(e).forEach(function(e){return l.bind(e,t,function(e){return Ce(e.target)})})),l.bind(i.inputs.seek,t,function(e){var t=(e=e.currentTarget).getAttribute("seek-value");v(t)&&(t=e.value),e.removeAttribute("seek-value"),o.currentTime=t/e.max*o.duration},"seek"),l.bind(i.progress,"mouseenter mouseleave mousemove",function(e){return O.updateSeekTooltip.call(o,e)}),l.bind(i.progress,"mousemove touchmove",function(e){var t=o.previewThumbnails;t&&t.loaded&&t.startMove(e)}),l.bind(i.progress,"mouseleave touchend click",function(){var e=o.previewThumbnails;e&&e.loaded&&e.endMove(!1,!0)}),l.bind(i.progress,"mousedown touchstart",function(e){var t=o.previewThumbnails;t&&t.loaded&&t.startScrubbing(e)}),l.bind(i.progress,"mouseup touchend",function(e){var t=o.previewThumbnails;t&&t.loaded&&t.endScrubbing(e)}),w.isWebkit&&Array.from(Ne.call(o,'input[type="range"]')).forEach(function(e){l.bind(e,"input",function(e){return O.updateRangeFill.call(o,e.target)})}),o.config.toggleInvert&&!b(i.display.duration)&&l.bind(i.display.currentTime,"click",function(){0!==o.currentTime&&(o.config.invertTime=!o.config.invertTime,O.timeUpdate.call(o))}),l.bind(i.inputs.volume,t,function(e){o.volume=e.target.value},"volume"),l.bind(i.controls,"mouseenter mouseleave",function(e){i.controls.hover=!o.touch&&"mouseenter"===e.type}),i.fullscreen&&Array.from(i.fullscreen.children).filter(function(e){return!e.contains(i.container)}).forEach(function(e){l.bind(e,"mouseenter mouseleave",function(e){i.controls&&(i.controls.hover=!o.touch&&"mouseenter"===e.type)})}),l.bind(i.controls,"mousedown mouseup touchstart touchend touchcancel",function(e){i.controls.pressed=["mousedown","touchstart"].includes(e.type)}),l.bind(i.controls,"focusin",function(){var e=o.config,t=o.timers,n=(S(i.controls,e.classNames.noTransition,!0),R.toggleControls.call(o,!0),setTimeout(function(){S(i.controls,e.classNames.noTransition,!1)},0),l.touch?3e3:4e3);clearTimeout(t.controls),t.controls=setTimeout(function(){return R.toggleControls.call(o,!1)},n)}),l.bind(i.inputs.volume,"wheel",function(e){var t=e.webkitDirectionInvertedFromDevice,n=(i=_slicedToArray([e.deltaX,-e.deltaY].map(function(e){return t?-e:e}),2))[0],i=i[1],n=Math.sign(Math.abs(n)>Math.abs(i)?n:i),i=(o.increaseVolume(n/50),o.media.volume);(1===n&&i<1||-1===n&&0<i)&&e.preventDefault()},"volume",!1)}),this.player=t,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)},[{key:"handleKey",value:function(e){var t,n=this.player,i=n.elements,o=e.key,r=e.type,a=e.altKey,s=e.ctrlKey,l=e.metaKey,c=e.shiftKey,r="keydown"===r,u=r&&o===this.lastKey;if(!(a||s||l||c)&&o)if(r){a=document.activeElement;
1if(b(a)){s=n.config.selectors.editable;if(a!==i.inputs.seek&&C(a,s))return;if("Space"===e.key&&C(a,'button, [role^="menuitem"]'))return}switch(["Space","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(o)&&(e.preventDefault(),e.stopPropagation()),o){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":u||(t=parseInt(o,10),n.currentTime=n.duration/10*t);break;case"Space":case"k":u||I(n.togglePlay());break;case"ArrowUp":n.increaseVolume(.1);break;case"ArrowDown":n.decreaseVolume(.1);break;case"m":u||(n.muted=!n.muted);break;case"ArrowRight":n.forward();break;case"ArrowLeft":n.rewind();break;case"f":n.fullscreen.toggle();break;case"c":u||n.toggleCaptions();break;case"l":n.loop=!n.loop}"Escape"===o&&!n.fullscreen.usingNative&&n.fullscreen.active&&n.fullscreen.toggle(),this.lastKey=o}else this.lastKey=null}},{key:"toggleMenu",value:function(e){O.toggleMenu.call(this.player,e)}}])}(),ft=(0,function(){var p=function(){},a={},u={},d={};function s(e,t){if(e){var n=d[e];if(u[e]=t,n)for(;n.length;)n[0](e,t),n.splice(0,1)}}function h(e,t){e.call&&(e={success:e}),t.length?(e.error||p)(t):(e.success||p)(e)}function l(e,i,t){for(var o=(e=e.push?e:[e]).length,n=o,r=[],a=function(e,t,n){if("e"==t&&r.push(e),"b"==t){if(!n)return;r.push(e)}--o||i(r)},s=0;s<n;s++)!function n(i,o,r,a){var s,l,e=document,t=r.async,c=(r.numRetries||0)+1,u=r.before||p,d=i.replace(/[\?|#].*$/,""),h=i.replace(/^(css|img)!/,"");a=a||0,/(^css!|\.css$)/.test(d)?((l=e.createElement("link")).rel="stylesheet",l.href=h,(s="hideFocus"in l)&&l.relList&&(s=0,l.rel="preload",l.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(d)?(l=e.createElement("img")).src=h:((l=e.createElement("script")).src=i,l.async=void 0===t||t),l.onload=l.onerror=l.onbeforeload=function(e){var t=e.type[0];if(s)try{l.sheet.cssText.length||(t="e")}catch(e){18!=e.code&&(t="e")}if("e"==t){if((a+=1)<c)return n(i,o,r,a)}else if("preload"==l.rel&&"style"==l.as)return l.rel="stylesheet";o(i,t,e.defaultPrevented)},!1!==u(i,l)&&e.head.appendChild(l)}(e[s],a,t)}function m(e,t,n){var i,o;if(t&&t.trim&&(i=t),o=(i?n:t)||{},i){if(i in a)throw"LoadJS";a[i]=!0}function r(t,n){l(e,function(e){h(o,e),t&&h({success:t,error:n},e),s(i,e)},o)}if(o.returnPromise)return new Promise(r);r()}return m.ready=function(e,t){var n=e,i=function(e){h(t,e)};n=n.push?n:[n];for(var o,r,a=[],s=n.length,l=s,c=function(e,t){t.length&&a.push(e),--l||i(a)};s--;)o=n[s],(r=u[o])?c(o,r):(d[o]=d[o]||[]).push(c);return m},m.done=function(e){s(e,[])},m.reset=function(){a={},u={},d={}},m.isDefined=function(e){return e in a},m}());function gt(n){return new Promise(function(e,t){ft(n,{success:e,error:t})})}function yt(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,x.call(this,this.media,e?"play":"pause"))}var bt={setup:function(){var t=this;S(t.elements.wrapper,t.config.classNames.embed,!0),t.options.speed=t.config.speed.options,Qe.call(t),s(window.Vimeo)?bt.ready.call(t):gt(t.config.urls.vimeo.sdk).then(function(){bt.ready.call(t)}).catch(function(e){t.debug.warn("Vimeo SDK (player.js) failed to load",e)})},ready:function(){var n=this,a=this,e=a.config.vimeo,t=e.premium,i=e.referrerPolicy,o=_objectWithoutProperties(e,_excluded),r=a.media.getAttribute("src"),s="",l=(s=v(r)?(r=a.media.getAttribute(a.config.attributes.embed.id),a.media.getAttribute(a.config.attributes.embed.hash)):(l=r.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/))&&5===l.length?l[4]:null)?{h:s}:{},s=(t&&Object.assign(o,{controls:!1,sidedock:!1}),st(_objectSpread(_objectSpread({loop:a.config.loop.active,autoplay:a.autoplay,muted:a.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},l),o))),r=v(o=r)?null:!g(Number(o))&&o.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:o,o=k("iframe"),r=Ge(a.config.urls.vimeo.iframe,r,s),c=(o.setAttribute("src",r),o.setAttribute("allowfullscreen",""),o.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),v(i)||o.setAttribute("referrerPolicy",i),t||!e.customControls?(o.setAttribute("data-poster",a.poster),a.media=Me(o,a.media)):((s=k("div",{class:a.config.classNames.embedContainer,"data-poster":a.poster})).appendChild(o),a.media=Me(s,a.media)),e.customControls||nt(Ge(a.config.urls.vimeo.api,r)).then(function(e){!v(e)&&e.thumbnail_url&&R.setPoster.call(a,e.thumbnail_url).catch(function(){})}
1),a.embed=new window.Vimeo.Player(o,{autopause:a.config.autopause,muted:a.muted}),a.media.paused=!0,a.media.currentTime=0,a.supported.ui&&a.embed.disableTextTrack(),a.media.play=function(){return yt.call(a,!0),a.embed.play()},a.media.pause=function(){return yt.call(a,!1),a.embed.pause()},a.media.stop=function(){a.pause(),a.currentTime=0},a.media.currentTime),u=(Object.defineProperty(a.media,"currentTime",{get:function(){return c},set:function(e){var t=a.embed,n=a.media,i=a.paused,o=a.volume,r=i&&!t.hasPlayed;n.seeking=!0,x.call(a,n,"seeking"),Promise.resolve(r&&t.setVolume(0)).then(function(){return t.setCurrentTime(e)}).then(function(){return r&&t.pause()}).then(function(){return r&&t.setVolume(o)}).catch(function(){})}}),a.config.speed.selected),d=(Object.defineProperty(a.media,"playbackRate",{get:function(){return u},set:function(e){a.embed.setPlaybackRate(e).then(function(){u=e,x.call(a,a.media,"ratechange")}).catch(function(){a.options.speed=[1]})}}),a.config.volume),h=(Object.defineProperty(a.media,"volume",{get:function(){return d},set:function(e){a.embed.setVolume(e).then(function(){d=e,x.call(a,a.media,"volumechange")})}}),a.config.muted);Object.defineProperty(a.media,"muted",{get:function(){return h},set:function(e){var t=!!f(e)&&e;a.embed.setVolume(t?0:a.config.volume).then(function(){h=t,x.call(a,a.media,"volumechange")})}});var p,m=a.config.loop;Object.defineProperty(a.media,"loop",{get:function(){return m},set:function(e){var t=f(e)?e:a.config.loop.active;a.embed.setLoop(t).then(function(){m=t})}}),a.embed.getVideoUrl().then(function(e){p=e,O.setDownloadUrl.call(a)}).catch(function(e){n.debug.warn(e)}),Object.defineProperty(a.media,"currentSrc",{get:function(){return p}}),Object.defineProperty(a.media,"ended",{get:function(){return a.currentTime===a.duration}}),Promise.all([a.embed.getVideoWidth(),a.embed.getVideoHeight()]).then(function(e){var e=_slicedToArray(e,2),t=e[0],e=e[1];a.embed.ratio=$e(t,e),Qe.call(n)}),a.embed.setAutopause(a.config.autopause).then(function(e){a.config.autopause=e}),a.embed.getVideoTitle().then(function(e){a.config.title=e,R.setTitle.call(n)}),a.embed.getCurrentTime().then(function(e){c=e,x.call(a,a.media,"timeupdate")}),a.embed.getDuration().then(function(e){a.media.duration=e,x.call(a,a.media,"durationchange")}),a.embed.getTextTracks().then(function(e){a.media.textTracks=e,N.setup.call(a)}),a.embed.on("cuechange",function(e){e=e.cues,e=(void 0===e?[]:e).map(function(e){return e=e.text,t=document.createDocumentFragment(),n=document.createElement("div"),t.appendChild(n),n.innerHTML=e,t.firstChild.innerText;var t,n});N.updateCues.call(a,e)}),a.embed.on("loaded",function(){a.embed.getPaused().then(function(e){yt.call(a,!e),e||x.call(a,a.media,"playing")}),b(a.embed.element)&&a.supported.ui&&a.embed.element.setAttribute("tabindex",-1)}),a.embed.on("bufferstart",function(){x.call(a,a.media,"waiting")}),a.embed.on("bufferend",function(){x.call(a,a.media,"playing")}),a.embed.on("play",function(){yt.call(a,!0),x.call(a,a.media,"playing")}),a.embed.on("pause",function(){yt.call(a,!1)}),a.embed.on("timeupdate",function(e){a.media.seeking=!1,c=e.seconds,x.call(a,a.media,"timeupdate")}),a.embed.on("progress",function(e){a.media.buffered=e.percent,x.call(a,a.media,"progress"),1===parseInt(e.percent,10)&&x.call(a,a.media,"canplaythrough"),a.embed.getDuration().then(function(e){e!==a.media.duration&&(a.media.duration=e,x.call(a,a.media,"durationchange"))})}),a.embed.on("seeked",function(){a.media.seeking=!1,x.call(a,a.media,"seeked")}),a.embed.on("ended",function(){a.media.paused=!0,x.call(a,a.media,"ended")}),a.embed.on("error",function(e){a.media.error=e,x.call(a,a.media,"error")}),e.customControls&&setTimeout(function(){return R.build.call(a)},0)}};function vt(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,x.call(this,this.media,e?"play":"pause"))}var wt={setup:function(){var e,t=this;S(this.elements.wrapper,this.config.classNames.embed,!0),s(window.YT)&&p(window.YT.Player)?wt.ready.call(this):(e=window.onYouTubeIframeAPIReady,window.onYouTubeIframeAPIReady=function(){p(e)&&e(),wt.ready.call(t)},gt(this.config.urls.youtube.sdk).catch(function(e){t.debug.warn("YouTube API failed to load",e)}))},getTitle:function(e){var i=this;nt(Ge(this.config.urls.youtube.api,e)).then(function(e){var t,n;s(e)&&(t=e.title,n=e.height,e=e.width,i.config.title=t,R.setTitle.call(i),i.embed.ratio=$e(e,n)),Qe.call(i)}).catch(function(){Qe.call(i)})},ready:function(){var o,e,r=this,a=r.config.youtube,t=r.media&&r.media.getAttribute("id");!v(t)&&t.startsWith("youtube-")||(t=r.media.getAttribute("src"),v(t)&&(t=r.media.getAttribute(this.config.attributes.embed.id)),o=v(t=t)?null:t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:t,t=k("div",{id:"".concat(r.provider,"-").concat(Math.floor(1e4*Math.random())),"data-poster":a.customControls?r.poster:void 0}),r.media=Me(t,r.media),a.customControls&&pt((e=function(e){return"https://i.ytimg.com/vi/".concat(o,"/").concat(e,"default.jpg")})("maxres"),121).catch(function(){return pt(e("sd"),121)}).catch(function(){return pt(e("hq"))}).then(function(e){return R.setPoster.call(r,e.src)}).then(function(e){e.includes("maxres")||(r.elements.poster.style.backgroundSize="cover")}).catch(function(){}),r.embed=new window.YT.Player(r.media,{videoId:o,host:a.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0,playerVars:T({}
1,{autoplay:r.config.autoplay?1:0,hl:r.config.hl,controls:r.supported.ui&&a.customControls?0:1,disablekb:1,playsinline:r.config.fullscreen.iosNative?0:1,cc_load_policy:r.captions.active?1:0,cc_lang_pref:r.config.captions.language,widget_referrer:window?window.location.href:null},a),events:{onError:function(e){r.media.error||(e=e.data,r.media.error={code:e,message:{2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[e]||"An unknown error occured"},x.call(r,r.media,"error"))},onPlaybackRateChange:function(e){e=e.target;r.media.playbackRate=e.getPlaybackRate(),x.call(r,r.media,"ratechange")},onReady:function(e){var t,n,i;p(r.media.play)||(t=e.target,wt.getTitle.call(r,o),r.media.play=function(){vt.call(r,!0),t.playVideo()},r.media.pause=function(){vt.call(r,!1),t.pauseVideo()},r.media.stop=function(){t.stopVideo()},r.media.duration=t.getDuration(),r.media.paused=!0,r.media.currentTime=0,Object.defineProperty(r.media,"currentTime",{get:function(){return Number(t.getCurrentTime())},set:function(e){r.paused&&!r.embed.hasPlayed&&r.embed.mute(),r.media.seeking=!0,x.call(r,r.media,"seeking"),t.seekTo(e)}}),Object.defineProperty(r.media,"playbackRate",{get:function(){return t.getPlaybackRate()},set:function(e){t.setPlaybackRate(e)}}),n=r.config.volume,Object.defineProperty(r.media,"volume",{get:function(){return n},set:function(e){n=e,t.setVolume(100*n),x.call(r,r.media,"volumechange")}}),i=r.config.muted,Object.defineProperty(r.media,"muted",{get:function(){return i},set:function(e){e=f(e)?e:i;t[(i=e)?"mute":"unMute"](),t.setVolume(100*n),x.call(r,r.media,"volumechange")}}),Object.defineProperty(r.media,"currentSrc",{get:function(){return t.getVideoUrl()}}),Object.defineProperty(r.media,"ended",{get:function(){return r.currentTime===r.duration}}),e=t.getAvailablePlaybackRates(),r.options.speed=e.filter(function(e){return r.config.speed.options.includes(e)}),r.supported.ui&&a.customControls&&r.media.setAttribute("tabindex",-1),x.call(r,r.media,"timeupdate"),x.call(r,r.media,"durationchange"),clearInterval(r.timers.buffering),r.timers.buffering=setInterval(function(){r.media.buffered=t.getVideoLoadedFraction(),(null===r.media.lastBuffered||r.media.lastBuffered<r.media.buffered)&&x.call(r,r.media,"progress"),r.media.lastBuffered=r.media.buffered,1===r.media.buffered&&(clearInterval(r.timers.buffering),x.call(r,r.media,"canplaythrough"))},200),a.customControls&&setTimeout(function(){return R.build.call(r)},50))},onStateChange:function(e){var t=e.target;switch(clearInterval(r.timers.playing),r.media.seeking&&[1,2].includes(e.data)&&(r.media.seeking=!1,x.call(r,r.media,"seeked")),e.data){case-1:x.call(r,r.media,"timeupdate"),r.media.buffered=t.getVideoLoadedFraction(),x.call(r,r.media,"progress");break;case 0:vt.call(r,!1),r.media.loop?(t.stopVideo(),t.playVideo()):x.call(r,r.media,"ended");break;case 1:a.customControls&&!r.config.autoplay&&r.media.paused&&!r.embed.hasPlayed?r.media.pause():(vt.call(r,!0),x.call(r,r.media,"playing"),r.timers.playing=setInterval(function(){x.call(r,r.media,"timeupdate")},50),r.media.duration!==t.getDuration()&&(r.media.duration=t.getDuration(),x.call(r,r.media,"durationchange")));break;case 2:r.muted||r.embed.unMute(),vt.call(r,!1);break;case 3:x.call(r,r.media,"waiting")}x.call(r,r.elements.container,"statechange",!1,{code:e.data})}}}))}},Tt={setup:function(){this.media?(S(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),S(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&S(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=k("div",{class:this.config.classNames.video}),Pe(this.media,this.elements.wrapper),this.elements.poster=k("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?L.setup.call(this):this.isYouTube?wt.setup.call(this):this.isVimeo&&bt.setup.call(this)):this.debug.warn("No media element found!")}},kt=function(){return _createClass(function e(t){var r=this;_classCallCheck(this,e),c(this,"load",function(){r.enabled&&(s(window.google)&&s(window.google.ima)?r.ready():gt(r.player.config.urls.googleIMA.sdk).then(function(){r.ready()}).catch(function(){r.trigger("error",new Error("Google IMA SDK failed to load"))}))}),c(this,"ready",function(){var e;r.enabled||((e=r).manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()),r.startSafetyTimer(12e3,"ready()"),r.managerPromise.then(function(){r.clearSafetyTimer("onAdsManagerLoaded()")}),r.listeners(),r.setupIMA()}),c(this,"setupIMA",function(){r.elements.container=k("div",{class:r.player.config.classNames.ads}),r.player.elements.container.appendChild(r.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(r.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(r.player.config.playsinline),r.elements.displayContainer=new google.ima.AdDisplayContainer(r.elements.container,r.player.media),r.loader=new google.ima.AdsLoader(r.elements.displayContainer),r.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(e){return r.onAdsManagerLoaded(e)},!1),r.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,function(e){return r.onAdError(e)},!1),r.requestAds()}),c(this,"requestAds",function(){var e=r.player.elements.container;try{var t=new google.ima.AdsRequest;t.adTagUrl=r.tagUrl,t.linearAdSlotWidth=e.offsetWidth,t.linearAdSlotHeight=e.offsetHeight,t.nonLinearAdSlotWidth=e.offsetWidth,t.nonLinearAdSlotHeight=e.offsetHeight,t.forceNonLinearFullSlot=!1,t.setAdWillPlayMuted(!r.player.muted),r.loader.requestAds(t)}catch(e){r.onAdError(e)}}),c(this,"pollCountdown",function(){0<arguments.length&&void 0!==arguments[0]&&arguments[0]?r.countdownTimer=setInterval(function(){var e=rt(Math.max(r.manager.getRemainingTime(),0)),e="".concat(M("advertisement",r.player.config)," - ").concat(e);r.elements.container.setAttribute("data-badge-text",e)},100):(clearInterval(r.countdownTimer),r.elements.container.removeAttribute("data-badge-text"))}),c(this,"onAdsManagerLoaded",function(e){var t;r.enabled&&((t=new google.ima.AdsRenderingSettings).restoreCustomPlaybackStateOnAdBreakComplete=!0,t.enablePreloading=!0,r.manager=e.getAdsManager(r.player,t),r.cuePoints=r.manager.getCuePoints(),r.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,function(e){return r.onAdError(e)}),Object.keys(google.ima.AdEvent.Type).forEach(function(e){r.manager.addEventListener(google.ima.AdEvent.Type[e],function(e){return r.onAdEvent(e)})}),r.trigger("loaded"))}),c(this,"addCuePoints",function(){v(r.cuePoints)||r.cuePoints.forEac
1h(function(e){var t,n;0!==e&&-1!==e&&e<r.player.duration&&(t=r.player.elements.progress,b(t))&&(e=100/r.player.duration*e,(n=k("span",{class:r.player.config.classNames.cues})).style.left="".concat(e.toString(),"%"),t.appendChild(n))})}),c(this,"onAdEvent",function(e){var t,n=r.player.elements.container,i=e.getAd(),o=e.getAdData();switch(t=e.type,x.call(r.player,r.player.media,"ads".concat(t.replace(/_/g,"").toLowerCase())),e.type){case google.ima.AdEvent.Type.LOADED:r.trigger("loaded"),r.pollCountdown(!0),i.isLinear()||(i.width=n.offsetWidth,i.height=n.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:r.manager.setVolume(r.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:r.player.ended?r.loadAds():r.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:r.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:r.pollCountdown(),r.resumeContent();break;case google.ima.AdEvent.Type.LOG:o.adError&&r.player.debug.warn("Non-fatal ad error: ".concat(o.adError.getMessage()))}}),c(this,"onAdError",function(e){r.cancel(),r.player.debug.warn("Ads error",e)}),c(this,"listeners",function(){var i,e=r.player.elements.container;r.player.on("canplay",function(){r.addCuePoints()}),r.player.on("ended",function(){r.loader.contentComplete()}),r.player.on("timeupdate",function(){i=r.player.currentTime}),r.player.on("seeked",function(){var n=r.player.currentTime;v(r.cuePoints)||r.cuePoints.forEach(function(e,t){i<e&&e<n&&(r.manager.discardAdBreak(),r.cuePoints.splice(t,1))})}),window.addEventListener("resize",function(){r.manager&&r.manager.resize(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL)})}),c(this,"play",function(){var e=r.player.elements.container;r.managerPromise||r.resumeContent(),r.managerPromise.then(function(){r.manager.setVolume(r.player.volume),r.elements.displayContainer.initialize();try{r.initialized||(r.manager.init(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL),r.manager.start()),r.initialized=!0}catch(e){r.onAdError(e)}}).catch(function(){})}),c(this,"resumeContent",function(){r.elements.container.style.zIndex="",r.playing=!1,I(r.player.media.play())}),c(this,"pauseContent",function(){r.elements.container.style.zIndex=3,r.playing=!0,r.player.media.pause()}),c(this,"cancel",function(){r.initialized&&r.resumeContent(),r.trigger("error"),r.loadAds()}),c(this,"loadAds",function(){r.managerPromise.then(function(){r.manager&&r.manager.destroy(),r.managerPromise=new Promise(function(e){r.on("loaded",e),r.player.debug.log(r.manager)}),r.initialized=!1,r.requestAds()}).catch(function(){})}),c(this,"trigger",function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];e=r.events[e],y(e)&&e.forEach(function(e){p(e)&&e.apply(r,n)})}),c(this,"on",function(e,t){return y(r.events[e])||(r.events[e]=[]),r.events[e].push(t),r}),c(this,"startSafetyTimer",function(e,t){r.player.debug.log("Safety timer invoked from: ".concat(t)),r.safetyTimer=setTimeout(function(){r.cancel(),r.clearSafetyTimer("startSafetyTimer()")},e)}),c(this,"clearSafetyTimer",function(e){_e(r.safetyTimer)||(r.player.debug.log("Safety timer cleared from: ".concat(e)),clearTimeout(r.safetyTimer),r.safetyTimer=null)}),this.player=t,this.config=t.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise(function(e,t){r.on("loaded",e),r.on("error",t)}),this.load()},[{key:"enabled",get:function(){var e=this.config;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!v(e.publisherId)||ve(e.tagUrl))}},{key:"tagUrl",get:function(){var e=this.config;return ve(e.tagUrl)?e.tagUrl:"https://go.aniview.com/api/adserver6/vast/?".concat(st({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId}))}}])}();function _t(e,t,n){e=0<arguments.length&&void 0!==e?e:0,t=1<arguments.length&&void 0!==t?t:0,n=2<arguments.length&&void 0!==n?n:255;return Math.min(Math.max(e,t),n)}function Et(e,t){var n={};return e>t.width/t.height?(n.width=t.width,n.height=1/e*t.width):(n.height=t.height,n.width=e*t.height),n}var St=function(){return _createClass(function e(t){var s=this;_classCallCheck(this,e),c(this,"load",function(){s.player.elements.display.seekTooltip&&(s.player.elements.display.seekTooltip.hidden=s.enabled),s.enabled&&s.getThumbnails().then(function(){s.enabled&&(s.render(),s.determineContainerAutoSizing(),s.loaded=!0)})}),c(this,"getThumbnails",function(){return new Promise(function(e){var t=s.player.config.previewThumbnails.src;if(v(t))throw new Error("Missing previewThumbnails.src config attribute");function n(){s.thumbnails.sort(function(e,t){return e.height-t.height}),s.player.debug.log("Preview thumbnails",s.thumbnails),e()}p(t)?t(function(e){s.thumbnails=e,n()}):(t=(h(t)?[t]:t).map(function(e){return s.getThumbnail(e)}),Promise.all(t).then(n))})}),c(this,"getThumbnail",function(r){return new Promise(function(o){nt(r).then(function(e){var t,n={frames:(t=[],e.split(/\r\n\r\n|\n\n|\r\r/).forEac
1h(function(e){var i={};e.split(/\r\n|\n|\r/).forEach(function(e){var t,n;g(i.startTime)?!v(e.trim())&&v(i.text)&&(t=_slicedToArray(n=e.trim().split("#xywh="),1),i.text=t[0],n[1])&&(t=_slicedToArray(n[1].split(","),4),i.x=t[0],i.y=t[1],i.w=t[2],i.h=t[3]):(n=e.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/))&&(i.startTime=60*Number(n[1]||0)*60+60*Number(n[2])+Number(n[3])+Number("0.".concat(n[4])),i.endTime=60*Number(n[6]||0)*60+60*Number(n[7])+Number(n[8])+Number("0.".concat(n[9])))}),i.text&&t.push(i)}),t),height:null,urlPrefix:""},i=(n.frames[0].text.startsWith("/")||n.frames[0].text.startsWith("http://")||n.frames[0].text.startsWith("https://")||(n.urlPrefix=r.substring(0,r.lastIndexOf("/")+1)),new Image);i.onload=function(){n.height=i.naturalHeight,n.width=i.naturalWidth,s.thumbnails.push(n),o()},i.src=n.urlPrefix+n.frames[0].text})})}),c(this,"startMove",function(e){var t;s.loaded&&l(e)&&["touchmove","mousemove"].includes(e.type)&&s.player.media.duration&&("touchmove"===e.type?s.seekTime=s.player.media.duration*(s.player.elements.inputs.seek.value/100):(t=100/(t=s.player.elements.progress.getBoundingClientRect()).width*(e.pageX-t.left),s.seekTime=s.player.media.duration*(t/100),s.seekTime<0&&(s.seekTime=0),s.seekTime>s.player.media.duration-1&&(s.seekTime=s.player.media.duration-1),s.mousePosX=e.pageX,s.elements.thumb.time.innerText=rt(s.seekTime),(t=null==(t=s.player.config.markers)||null==(e=t.points)?void 0:e.find(function(e){return e.time===Math.round(s.seekTime)}))&&s.elements.thumb.time.insertAdjacentHTML("afterbegin","".concat(t.label,"<br>"))),s.showImageAtCurrentTime())}),c(this,"endMove",function(){s.toggleThumbContainer(!1,!0)}),c(this,"startScrubbing",function(e){(_e(e.button)||!1===e.button||0===e.button)&&(s.mouseDown=!0,s.player.media.duration)&&(s.toggleScrubbingContainer(!0),s.toggleThumbContainer(!1,!0),s.showImageAtCurrentTime())}),c(this,"endScrubbing",function(){s.mouseDown=!1,Math.ceil(s.lastTime)===Math.ceil(s.player.media.currentTime)?s.toggleScrubbingContainer(!1):qe.call(s.player,s.player.media,"timeupdate",function(){s.mouseDown||s.toggleScrubbingContainer(!1)})}),c(this,"listeners",function(){s.player.on("play",function(){s.toggleThumbContainer(!1,!0)}),s.player.on("seeked",function(){s.toggleThumbContainer(!1)}),s.player.on("timeupdate",function(){s.lastTime=s.player.media.currentTime})}),c(this,"render",function(){s.elements.thumb.container=k("div",{class:s.player.config.classNames.previewThumbnails.thumbContainer}),s.elements.thumb.imageContainer=k("div",{class:s.player.config.classNames.previewThumbnails.imageContainer}),s.elements.thumb.container.appendChild(s.elements.thumb.imageContainer);var e=k("div",{class:s.player.config.classNames.previewThumbnails.timeContainer});s.elements.thumb.time=k("span",{},"00:00"),e.appendChild(s.elements.thumb.time),s.elements.thumb.imageContainer.appendChild(e),b(s.player.elements.progress)&&s.player.elements.progress.appendChild(s.elements.thumb.container),s.elements.scrubbing.container=k("div",{class:s.player.config.classNames.previewThumbnails.scrubbingContainer}),s.player.elements.wrapper.appendChild(s.elements.scrubbing.container)}),c(this,"destroy",function(){s.elements.thumb.container&&s.elements.thumb.container.remove(),s.elements.scrubbing.container&&s.elements.scrubbing.container.remove()}),c(this,"showImageAtCurrentTime",function(){s.mouseDown?s.setScrubbingContainerSize():s.setThumbContainerSizeAndPos();var n=s.thumbnails[0].frames.findIndex(function(e){return s.seekTime>=e.startTime&&s.seekTime<=e.endTime}),e=0<=n,i=0;s.mouseDown||s.toggleThumbContainer(e),e&&(s.thumbnails.forEach(function(e,t){s.loadedImages.includes(e.frames[n].text)&&(i=t)}),n!==s.showingThumb)&&(s.showingThumb=n,s.loadImage(i))}),c(this,"loadImage",function(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,n=s.showingThumb,i=(a=s.thumbnails[t]).urlPrefix,o=a.frames[n],r=a.frames[n].text,a=i+r;s.currentImageElement&&s.currentImageElement.dataset.filename===r?(s.showImage(s.currentImageElement,o,t,n,r,!1),s.currentImageElement.dataset.index=n,s.removeOldImages(s.currentImageElement)):(s.loadingImage&&s.usingSprites&&(s.loadingImage.onload=null),(e=new Image).src=a,e.dataset.index=n,e.dataset.f
1ilename=r,s.showingThumbFilename=r,s.player.debug.log("Loading image: ".concat(a)),e.onload=function(){return s.showImage(e,o,t,n,r,!0)},s.loadingImage=e,s.removeOldImages(e))}),c(this,"showImage",function(e,t,n,i,o){var r=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];s.player.debug.log("Showing thumb: ".concat(o,". num: ").concat(i,". qual: ").concat(n,". newimg: ").concat(r)),s.setImageSizeAndOffset(e,t),r&&(s.currentImageContainer.appendChild(e),s.currentImageElement=e,s.loadedImages.includes(o)||s.loadedImages.push(o)),s.preloadNearby(i,!0).then(s.preloadNearby(i,!1)).then(s.getHigherQuality(n,e,t,o))}),c(this,"removeOldImages",function(i){Array.from(s.currentImageContainer.children).forEach(function(e){var t,n;"img"!==e.tagName.toLowerCase()||(t=s.usingSprites?500:1e3,e.dataset.index===i.dataset.index)||e.dataset.deleting||(e.dataset.deleting=!0,n=s.currentImageContainer,setTimeout(function(){n.removeChild(e),s.player.debug.log("Removing thumb: ".concat(e.dataset.filename))},t))})}),c(this,"preloadNearby",function(t){var n=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];return new Promise(function(r){setTimeout(function(){var e,i,o=s.thumbnails[0].frames[t].text;s.showingThumbFilename===o&&(e=n?s.thumbnails[0].frames.slice(t):s.thumbnails[0].frames.slice(0,t).reverse(),i=!1,e.forEach(function(e){var t,n=e.text;n===o||s.loadedImages.includes(n)||(i=!0,s.player.debug.log("Preloading thumb filename: ".concat(n)),e=s.thumbnails[0].urlPrefix+n,(t=new Image).src=e,t.onload=function(){s.player.debug.log("Preloaded thumb filename: ".concat(n)),s.loadedImages.includes(n)||s.loadedImages.push(n),r()})}),i||r())},300)})}),c(this,"getHigherQuality",function(e,t,n,i){e<s.thumbnails.length-1&&(t=t.naturalHeight,(t=s.usingSprites?n.h:t)<s.thumbContainerHeight)&&setTimeout(function(){s.showingThumbFilename===i&&(s.player.debug.log("Showing higher quality thumb for: ".concat(i)),s.loadImage(e+1))},300)}),c(this,"toggleThumbContainer",function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=s.player.config.classNames.previewThumbnails.thumbContainerShown;s.elements.thumb.container.classList.toggle(n,e),!e&&t&&(s.showingThumb=null,s.showingThumbFilename=null)}),c(this,"toggleScrubbingContainer",function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=s.player.config.classNames.previewThumbnails.scrubbingContainerShown;s.elements.scrubbing.container.classList.toggle(t,e),e||(s.showingThumb=null,s.showingThumbFilename=null)}),c(this,"determineContainerAutoSizing",function(){(20<s.elements.thumb.imageContainer.clientHeight||20<s.elements.thumb.imageContainer.clientWidth)&&(s.sizeSpecifiedInCSS=!0)}),c(this,"setThumbContainerSizeAndPos",function(){var e,t=s.elements.thumb.imageContainer;s.sizeSpecifiedInCSS?20<t.clientHeight&&t.clientWidth<20?(e=Math.floor(t.clientHeight*s.thumbAspectRatio),t.style.width="".concat(e,"px")):t.clientHeight<20&&20<t.clientWidth&&(e=Math.floor(t.clientWidth/s.thumbAspectRatio),t.style.height="".concat(e,"px")):(e=Math.floor(s.thumbContainerHeight*s.thumbAspectRatio),t.style.height="".concat(s.thumbContainerHeight,"px"),t.style.width="".concat(e,"px")),s.setThumbContainerPos()}),c(this,"setThumbContainerPos",function(){var e=s.player.elements.progress.getBoundingClientRect(),t=s.player.elements.container.getBoundingClientRect(),n=s.elements.thumb.container,i=t.left-e.left+10,t=t.right-e.left-n.clientWidth-10,i=_t(e=s.mousePosX-e.left-n.clientWidth/2,i,t);n.style.left="".concat(i,"px"),n.style.setProperty("--preview-arrow-offset",e-i+"px")}),c(this,"setScrubbingContainerSize",function(){var e=(t=Et(s.thumbAspectRatio,{width:s.player.media.clientWidth,height:s.player.media.clientHeight})).width,t=t.height;s.elements.scrubbing.container.style.width="".concat(e,"px"),s.elements.scrubbing.container.style.height="".concat(t,"px")}),c(this,"setImageSizeAndOffset",function(e,t){var n;s.usingSprites&&(n=s.thumbContainerHeight/t.h,e.style.height=e.naturalHeight*n+"px",e.style.width=e.naturalWidth*n+"px",e.style.left="-".concat(t.x*n,"px"),e.style.top="-".concat(t.y*n,"px"))}),this.player=t,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()},[{key:"enabled",get:function(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}},{key:"currentImageContainer",get:function(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}}
1,{key:"usingSprites",get:function(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}},{key:"thumbAspectRatio",get:function(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}},{key:"thumbContainerHeight",get:function(){return this.mouseDown?Et(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight}).height:this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}},{key:"currentImageElement",get:function(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement},set:function(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}])}(),Ct={insertElements:function(t,e){var n=this;h(e)?Ie(t,this.media,{src:e}):y(e)&&e.forEach(function(e){Ie(t,n.media,e)})},change:function(r){var a=this;Ae(r,"sources.length")?(L.cancelRequests.call(this),this.destroy.call(this,function(){a.options.quality=[],m(a.media),a.media=null,b(a.elements.container)&&a.elements.container.removeAttribute("class");var e=r.sources,t=r.type,n=_slicedToArray(e,1)[0],i=n.provider,i=void 0===i?j.html5:i,n=n.src,o="html5"===i?t:"div",n="html5"===i?{}:{src:n};Object.assign(a,{provider:i,type:t,supported:A.check(t,i,a.config.playsinline),media:k(o,n)}),a.elements.container.appendChild(a.media),f(r.autoplay)&&(a.config.autoplay=r.autoplay),a.isHTML5&&(a.config.crossorigin&&a.media.setAttribute("crossorigin",""),a.config.autoplay&&a.media.setAttribute("autoplay",""),v(r.poster)||(a.poster=r.poster),a.config.loop.active&&a.media.setAttribute("loop",""),a.config.muted&&a.media.setAttribute("muted",""),a.config.playsinline)&&a.media.setAttribute("playsinline",""),R.addStyleHook.call(a),a.isHTML5&&Ct.insertElements.call(a,"source",e),a.config.title=r.title,Tt.setup.call(a),a.isHTML5&&Object.keys(r).includes("tracks")&&Ct.insertElements.call(a,"track",r.tracks),(a.isHTML5||a.isEmbed&&!a.supported.ui)&&R.build.call(a),a.isHTML5&&a.media.load(),v(r.previewThumbnails)||(Object.assign(a.config.previewThumbnails,r.previewThumbnails),a.previewThumbnails&&a.previewThumbnails.loaded&&(a.previewThumbnails.destroy(),a.previewThumbnails=null),a.config.previewThumbnails.enabled&&(a.previewThumbnails=new St(a))),a.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}},i=function(){function s(e,t){var i=this;if(_classCallCheck(this,s),c(this,"play",function(){return p(i.media.play)?(i.ads&&i.ads.enabled&&i.ads.managerPromise.then(function(){return i.ads.play()}).catch(function(){return I(i.media.play())}),i.media.play()):null}),c(this,"pause",function(){return i.playing&&p(i.media.pause)?i.media.pause():null}),c(this,"togglePlay",function(e){return(f(e)?e:!i.playing)?i.play():i.pause()}),c(this,"stop",function(){i.isHTML5?(i.pause(),i.restart()):p(i.media.stop)&&i.media.stop()}),c(this,"restart",function(){i.currentTime=0}),c(this,"rewind",function(e){i.currentTime-=g(e)?e:i.config.seekTime}),c(this,"forward",function(e){i.currentTime+=g(e)?e:i.config.seekTime}),c(this,"increaseVolume",function(e){var t=i.media.muted?0:i.volume;i.volume=t+(g(e)?e:0)}),c(this,"decreaseVolume",function(e){i.increaseVolume(-e)}),c(this,"airplay",function(){A.airplay&&i.media.webkitShowPlaybackTargetPicker()}),c(this,"toggleControls",function(e){var t;return!(!i.supported.ui||i.isAudio||(t=Oe(i.elements.container,i.config.classNames.hideControls),(e=S(i.elements.container,i.config.classNames.hideControls,void 0===e?void 0:!e))&&y(i.config.controls)&&i.config.controls.includes("settings")&&!v(i.config.settings)&&O.toggleMenu.call(i,!1),e!==t&&x.call(i,i.media,e?"controlshidden":"controlsshown"),e))}),c(this,"on",function(e,t){P.call(i,i.elements.container,e,t)}),c(this,"once",function(e,t){qe.call(i,i.elements.container,e,t)}),c(this,"off",function(e,t){He(i.elements.container,e,t)}),c(this,"destroy",function(e){var t,n=1<arguments.length&&void 0!==arguments[1]&&arguments[1];i.ready&&(t=function(){document.body.style.overflow="",i.embed=null,n?(Object.keys(i.elements).length&&(m(i.elements.buttons.play),m(i.elements.captions),m(i.elements.controls),m(i.elements.wrapper),i.elements.buttons.play=null,i.elements.captions=null,i.elements.controls=null,i.elements.wrapper=null),p(e)&&e()):(function(){this&&this.eventListeners&&(this.eventListeners.forEac
1h(function(e){var t=e.element,n=e.type,i=e.callback,e=e.options;t.removeEventListener(n,i,e)}),this.eventListeners=[])}.call(i),L.cancelRequests.call(i),Me(i.elements.original,i.elements.container),x.call(i,i.elements.original,"destroyed",!0),p(e)&&e.call(i.elements.original),i.ready=!1,setTimeout(function(){i.elements=null,i.media=null},200))},i.stop(),clearTimeout(i.timers.loading),clearTimeout(i.timers.controls),clearTimeout(i.timers.resized),i.isHTML5?(R.toggleNativeControls.call(i,!0),t()):i.isYouTube?(clearInterval(i.timers.buffering),clearInterval(i.timers.playing),null!==i.embed&&p(i.embed.destroy)&&i.embed.destroy(),t()):i.isVimeo&&(null!==i.embed&&i.embed.unload().then(t),setTimeout(t,200)))}),c(this,"supports",function(e){return A.mime.call(i,e)}),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=A.touch,this.media=e,h(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||Ee(this.media)||y(this.media))&&(this.media=this.media[0]),this.config=T({},ct,s.defaults,t||{},function(){try{return JSON.parse(i.media.getAttribute("data-plyr-config"))}catch(e){return{}}}()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new dt(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",A),_e(this.media)||!b(this.media))this.debug.error("Setup failed: no suitable element passed");else if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(A.check().api){var e=this.media.cloneNode(!0),n=(e.autoplay=!1,this.elements.original=e,this.media.tagName.toLowerCase()),o=null,r=null;switch(n){case"div":var a,o=this.media.querySelector("iframe");if(b(o)?(r=at(o.getAttribute("src")),this.provider=(a=r.toString(),/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(a)?j.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(a)?j.vimeo:null),this.elements.container=this.media,this.media=o,this.elements.container.className="",r.search.length&&((a=["1","true"]).includes(r.searchParams.get("autoplay"))&&(this.config.autoplay=!0),a.includes(r.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=a.includes(r.searchParams.get("playsinline")),this.config.youtube.hl=r.searchParams.get("hl")):this.config.playsinline=!0)):(this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider)),v(this.provider)||!Object.values(j).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type="video";break;case"video":case"audio":this.type=n,this.provider=j.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=A.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new mt(this),this.storage=new tt(this),this.media.plyr=this,b(this.elements.container)||(this.elements.container=k("div",{tabindex:0}),Pe(this.media,this.elements.container)),R.migrateStyles.call(this),R.addStyleHook.call(this),Tt.setup.call(this),this.config.debug&&P.call(this,this.elements.container,this.config.events.join(" "),function(e){i.debug.log("event: ".concat(e.type))}),this.fullscreen=new ht(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&R.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new kt(this)),this.isHTML5&&this.config.auto
1play&&this.once("canplay",function(){return I(i.play())}),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new St(this))):this.debug.error("Setup failed: no support")}else this.debug.error("Setup failed: no support");else this.debug.error("Setup failed: disabled by config")}return _createClass(s,[{key:"isHTML5",get:function(){return this.provider===j.html5}},{key:"isEmbed",get:function(){return this.isYouTube||this.isVimeo}},{key:"isYouTube",get:function(){return this.provider===j.youtube}},{key:"isVimeo",get:function(){return this.provider===j.vimeo}},{key:"isVideo",get:function(){return"video"===this.type}},{key:"isAudio",get:function(){return"audio"===this.type}},{key:"playing",get:function(){return Boolean(this.ready&&!this.paused&&!this.ended)}},{key:"paused",get:function(){return Boolean(this.media.paused)}},{key:"stopped",get:function(){return Boolean(this.paused&&0===this.currentTime)}},{key:"ended",get:function(){return Boolean(this.media.ended)}},{key:"currentTime",get:function(){return Number(this.media.currentTime)},set:function(e){var t;this.duration&&(t=g(e)&&0<e,this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log("Seeking to ".concat(this.currentTime," seconds")))}},{key:"buffered",get:function(){var e=this.media.buffered;return g(e)?e:e&&e.length&&0<this.duration?e.end(0)/this.duration:0}},{key:"seeking",get:function(){return Boolean(this.media.seeking)}},{key:"duration",get:function(){var e=parseFloat(this.config.duration),t=(this.media||{}).duration,t=g(t)&&t!==1/0?t:0;return e||t}},{key:"volume",get:function(){return Number(this.media.volume)},set:function(e){var t=e;h(t)&&(t=Number(t)),g(t)||(t=this.storage.get("volume")),g(t)||(t=this.config.volume),this.config.volume=t=(t=1<t?1:t)<0?0:t,this.media.volume=t,!v(e)&&this.muted&&0<t&&(this.muted=!1)}},{key:"muted",get:function(){return Boolean(this.media.muted)},set:function(e){f(e)||(e=this.storage.get("muted")),f(e)||(e=this.config.muted),this.config.muted=e,this.media.muted=e}},{key:"hasAudio",get:function(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}},{key:"speed",get:function(){return Number(this.media.playbackRate)},set:function(e){var t=this,n=null,e=(g(e)&&(n=e),g(n)||(n=this.storage.get("speed")),g(n)||(n=this.config.speed.selected),this.minimumSpeed),i=this.maximumSpeed,n=_t(n,e,i);this.config.speed.selected=n,setTimeout(function(){t.media&&(t.media.playbackRate=n)},0)}},{key:"minimumSpeed",get:function(){return this.isYouTube?Math.min.apply(Math,_toConsumableArray(this.options.speed)):this.isVimeo?.5:.0625}},{key:"maximumSpeed",get:function(){return this.isYouTube?Math.max.apply(Math,_toConsumableArray(this.options.speed)):this.isVimeo?2:16}},{key:"quality",get:function(){return this.media.quality},set:function(e){var t,n=this.config.quality,i=this.options.quality;i.length&&(e=[!v(e)&&Number(e),this.storage.get("quality"),n.selected,n.default].find(g),t=!0,i.includes(e)||(i=Fe(i,e),this.debug.warn("Unsupported quality option: ".concat(e,", using ").concat(i," instead")),e=i,t=!1),n.selected=e,this.media.quality=e,t)&&this.storage.set({quality:e})}},{key:"loop",get:function(){return Boolean(this.media.loop)},set:function(e){e=f(e)?e:this.config.loop.active;this.config.loop.active=e,this.media.loop=e}},{key:"source",get:function(){return this.media.currentSrc},set:function(e){Ct.change.call(this,e)}},{key:"download",get:function(){var e=this.config.urls.download;return ve(e)?e:this.source},set:function(e){ve(e)&&(this.config.urls.download=e,O.setDownloadUrl.call(this))}},{key:"poster",get:function(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null},set:function(e){this.isVideo?R.setPoster.call(this,e,!1).catch(function(){}):this.debug.warn("Poster can only be set for video")}},{key:"ratio",get:function(){var e;return this.isVideo?(e=Ye(Ke.call(this)),y(e)?e.join(":"):e):null},set:function(e){this.isVideo?h(e)&&Ue(e)?(this.config.ratio=Ye(e),Qe.call(this)):this.debug.error("Invalid aspect ratio specified (".concat(e,")")):this.debug.warn("Aspect ratio can only be set for video")}}
1,{key:"autoplay",get:function(){return Boolean(this.config.autoplay)},set:function(e){this.config.autoplay=f(e)?e:this.config.autoplay}},{key:"toggleCaptions",value:function(e){N.toggle.call(this,e,!1)}},{key:"currentTrack",get:function(){var e=this.captions,t=e.toggled,e=e.currentTrack;return t?e:-1},set:function(e){N.set.call(this,e,!1),N.setup.call(this)}},{key:"language",get:function(){return(N.getCurrentTrack.call(this)||{}).language},set:function(e){N.setLanguage.call(this,e,!1)}},{key:"pip",get:function(){return A.pip?v(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===ut:null},set:function(e){A.pip&&(e=f(e)?e:!this.pip,p(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(e?ut:"inline"),p(this.media.requestPictureInPicture))&&(!this.pip&&e?this.media.requestPictureInPicture():this.pip&&!e&&document.exitPictureInPicture())}},{key:"setPreviewThumbnails",value:function(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new St(this))}}],[{key:"supported",value:function(e,t,n){return A.check(e,t,n)}},{key:"loadSprite",value:it},{key:"setup",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=null;return h(e)?n=Array.from(document.querySelectorAll(e)):Ee(e)?n=Array.from(e):y(e)&&(n=e.filter(b)),v(n)?null:n.map(function(e){return new s(e,t)})}}])}();return i.defaults=JSON.parse(JSON.stringify(ct)),i});
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.