"object"==typeof navigator&&function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Plyr",t):e.Plyr=t()}(this,function(){"use strict";!function(){if("undefined"!=typeof window)try{var e=new window.CustomEvent("test",{cancelable:!0});if(e.preventDefault(),!0!==e.defaultPrevented)throw new Error("Could not prevent default")}catch(e){var t=function(e,t){var n,i;return t=t||{bubbles:!1,cancelable:!1,detail:void 0},(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};t.prototype=window.Event.prototype,window.CustomEvent=t}}();var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t){return e(t={exports:{}},t.exports),t.exports}!function(e){var t=function(){try{return!!Symbol.iterator}catch(e){return!1}}(),n=function(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t&&(n[Symbol.iterator]=function(){return n}),n},i=function(e){return encodeURIComponent(e).replace(/%20/g,"+")},r=function(e){return decodeURIComponent(e).replace(/\+/g," ")};"URLSearchParams"in e&&"a=1"===new URLSearchParams("?a=1").toString()||function(){var o=function(e){if(Object.defineProperty(this,"_entries",{writable:!0,value:{}}),"string"==typeof e)""!==e&&this._fromString(e);else if(e instanceof o){var t=this;e.forEach(function(e,n){t.append(n,e)})}},a=o.prototype;a.append=function(e,t){e in this._entries?this._entries[e].push(t.toString()):this._entries[e]=[t.toString()]},a.delete=function(e){delete this._entries[e]},a.get=function(e){return e in this._entries?this._entries[e][0]:null},a.getAll=function(e){return e in this._entries?this._entries[e].slice(0):[]},a.has=function(e){return e in this._entries},a.set=function(e,t){this._entries[e]=[t.toString()]},a.forEach=function(e,t){var n;for(var i in this._entries)if(this._entries.hasOwnProperty(i)){n=this._entries[i];for(var r=0;r1?r(t[1]):"")}}),e.URLSearchParams=o}(),"function"!=typeof URLSearchParams.prototype.sort&&(URLSearchParams.prototype.sort=function(){var e=this,t=[];this.forEach(function(n,i){t.push([i,n]),e._entries||e.delete(i)}),t.sort(function(e,t){return e[0]t[0]?1:0}),e._entries&&(e._entries={});for(var n=0;n0?F:R)(e)},q=Math.min,V=function(e){return e>0?q(D(e),9007199254740991):0},B=function(e,t,n){t in e?g.f(e,t,y(0,n)):e[t]=n},H={}.toString,U=function(e){return H.call(e).slice(8,-1)},W=x("toStringTag"),K="Arguments"==U(function(){return arguments}()),z=function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),W))?n:K?U(t):"Object"==(i=U(t))&&"function"==typeof t.callee?"Arguments":i},Y=x("iterator"),G=o.getIteratorMethod=function(e){if(null!=e)return e[Y]||e["@@iterator"]||M[z(e)]},$=x("iterator"),J=!1;try{[7][$]().return=function(){J=!0}}catch(e){}var Q=function(e,t){if(!t&&!J)return!1;var n=!1;try{var i=[7],r=i[$]();r.next=function(){return{done:n=!0}},i[$]=function(){return r},e(i)}catch(e){}return n};S(S.S+S.F*!Q(function(e){}),"Array",{from:function(e){var t,n,r,o,a=C(e),s="function"==typeof this?this:Array,l=arguments.length,c=l>1?arguments[1]:void 0,u=void 0!==c,d=0,h=G(a);if(u&&(c=i(c,l>2?arguments[2]:void 0,2)),null==h||s==Array&&I(h))for(n=new s(t=V(a.length));t>d;d++)B(n,d,u?c(a[d],d):a[d]);else for(o=h.call(a),n=new s;!(r=o.next()).done;d++)B(n,d,u?L(o,c,[r.value,d],!0):r.value);return n.length=d,n}});var X=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==U(e)?e.split(""):Object(e)},Z=Array.isArray||function(e){return"Array"==U(e)},ee=x("species"),te=function(e,t){return new(function(e){var t;return Z(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!Z(t.prototype)||(t=void 0),a(t)&&null===(t=t[ee])&&(t=void 0)),void 0===t?Array:t}(e))(t)},ne=function(e,t){var n=1==e,r=2==e,o=3==e,a=4==e,s=6==e,l=5==e||s,c=t||te;return function(t,u,d){for(var h,f,p=C(t),m=X(p),g=i(u,d,3),y=V(m.length),v=0,b=n?c(t,y):r?c(t,0):void 0;y>v;v++)if((l||v in m)&&(f=g(h=m[v],v,p),e))if(n)b[v]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return v;case 2:b.push(h)}else if(a)return!1;return s?-1:o||a?a:b}},ie=x("unscopables"),re=Array.prototype;null==re[ie]&&v(re,ie,{});var oe=function(e){re[ie][e]=!0},ae=ne(5),se=!0;"find"in[]&&Array(1).find(function(){se=!1}),S(S.P+S.F*se,"Array",{find:function(e){return ae(this,e,arguments.length>1?arguments[1]:void 0)}}),oe("find");var le={f:{}.propertyIsEnumerable},ce=function(e){return X(P(e))},ue=Object.getOwnPropertyDescriptor,de={f:c?ue:function(e,t){if(e=ce(e),t=p(t,!0),f)try{return ue(e,t)}catch(e){}if(k(e,t))return y(!le.f.call(e,t),e[t])}},he=function(e,t){if(s(e),!a(t)&&null!==t)throw TypeError(t+": can't set as prototype!")},fe={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=i(Function.call,de.f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,i){return he(e,i),t?e.__proto__=i:n(e,i),e}}({},!1):void 0),check:he}.set,pe=function(e,t,n){var i,r=t.constructor;return r!==n&&"function"==typeof r&&(i=r.prototype)!==n.prototype&&a(i)&&fe&&fe(e,i),e},me=Math.max,ge=Math.min,ye=function(e){return function(t,n,i){var r,o=ce(t),a=V(o.length),s=function(e,t){return(e=D(e))<0?me(e+t,0):ge(e,t)}(i,a);if(e&&n!=n){for(;a>s;)if((r=o[s++])!=r)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ve=N("keys"),be=function(e){return ve[e]||(ve[e]=E(e))},ke=ye(!1),we=be("IE_PROTO"),Te=function(e,t){var n,i=ce(e),r=0,o=[];for(n in i)n!=we&&k(i,n)&&o.push(n);for(;t.length>r;)k(i,n=t[r++])&&(~ke(o,n)||o.push(n));return o},Ee="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Ae=Ee.concat("length","prototype"),_e={f:Object.getOwnPropertyNames||function(e){return Te(e,Ae)}},Se="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",Pe="["+Se+"]",Ce=RegExp("^"+Pe+Pe+"*"),Le=RegExp(Pe+Pe+"*$"),Me=function(e,t,n){var i={},r=l(function(){return!!Se[e]()||"​…"!="​…"[e]()}),o=i[e]=r?t(Ne):Se[e];n&&(i[n]=o),S(S.P+S.F*r,"String",i)},Ne=Me.trim=function(e,t){return e=String(P(e)),1&t&&(e=e.replace(Ce,"")),2&t&&(e=e.replace(Le,"")),e},xe=Me,Oe=Object.keys||function(e){return Te(e,Ee)},je=c?Object.defineProperties:function(e,t){s(e);for(var n,i=Oe(t),r=i.length,o=0;r>o;)g.f(e,n=i[o++],t[n]);return e},Ie=r.document,Re=Ie&&Ie.documentElement,Fe=be("IE_PROTO"),De=function(){},qe=function(){var e,t=h("iframe"),n=Ee.length;for(t.style.display="none",Re.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("