"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 r=function(e){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var t=typeof e;if("undefined"===t);else if("string"===t)""!==e&&this._fromString(e);else if(e instanceof r){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;it[0]?1:0}),e._entries&&(e._entries={});for(var n=0;n1?r(i[1]):"")}})}(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:e),function(e){if(function(){try{var e=new URL("b","http://a");return e.pathname="c%20d","http://a/c%20d"===e.href&&e.searchParams}catch(e){return!1}}()||function(){var t=e.URL,n=function(t,n){"string"!=typeof t&&(t=String(t));var i,r=document;if(n&&(void 0===e.location||n!==e.location.href)){(i=(r=document.implementation.createHTMLDocument("")).createElement("base")).href=n,r.head.appendChild(i);try{if(0!==i.href.indexOf(n))throw new Error(i.href)}catch(e){throw new Error("URL unable to set base "+n+" due to "+e)}}var a=r.createElement("a");if(a.href=t,i&&(r.body.appendChild(a),a.href=a.href),":"===a.protocol||!/:/.test(a.href))throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:a});var o=new URLSearchParams(this.search),s=!0,l=!0,c=this;["append","delete","set"].forEach(function(e){var t=o[e];o[e]=function(){t.apply(o,arguments),s&&(l=!1,c.search=o.toString(),l=!0)}}),Object.defineProperty(this,"searchParams",{value:o,enumerable:!0});var u=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==u&&(u=this.search,l&&(s=!1,this.searchParams._fromString(this.search),s=!0))}})},i=n.prototype;["hash","host","hostname","port","protocol"].forEach(function(e){!function(e){Object.defineProperty(i,e,{get:function(){return this._anchorElement[e]},set:function(t){this._anchorElement[e]=t},enumerable:!0})}(e)}),Object.defineProperty(i,"search",{get:function(){return this._anchorElement.search},set:function(e){this._anchorElement.search=e,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(i,{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],t=this._anchorElement.port!=e&&""!==this._anchorElement.port;return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(t?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(e){},enumerable:!0},username:{get:function(){return""},set:function(e){},enumerable:!0}}),n.createObjectURL=function(e){return t.createObjectURL.apply(t,arguments)},n.revokeObjectURL=function(e){return t.revokeObjectURL.apply(t,arguments)},e.URL=n}(),void 0!==e.location&&!("origin"in e.location)){var t=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:t,enumerable:!0})}catch(n){setInterval(function(){e.location.origin=t()},100)}}}(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:e);var n=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},i=function(e,t,i){if(n(e),void 0===t)return e;switch(i){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}},r=t(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),a=t(function(e){var t=e.exports={version:"2.6.4"};"number"==typeof __e&&(__e=t)}),o=(a.version,function(e){return"object"==typeof e?null!==e:"function"==typeof e}),s=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e},l=function(e){try{return!!e()}catch(e){return!0}},c=!l(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),u=r.document,h=o(u)&&o(u.createElement),d=function(e){return h?u.createElement(e):{}},f=!c&&!l(function(){return 7!=Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a}),p=function(e,t){if(!o(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!o(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")},m=Object.defineProperty,g={f:c?Object.defineProperty:function(e,t,n){if(s(e),t=p(t,!0),s(n),f)try{return m(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},v=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},y=c?function(e,t,n){return g.f(e,t,v(1,n))}:function(e,t,n){return e[t]=n,e},b={}.hasOwnProperty,w=function(e,t){return b.call(e,t)},k=0,T=Math.random(),E=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++k+T).toString(36))},S=t(function(e){var t=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(e.exports=function(e,n){return t[e]||(t[e]=void 0!==n?n:{})})("versions",[]).push({version:a.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),A=S("native-function-to-string",Function.toString),C=t(function(e){var t=E("src"),n=(""+A).split("toString");a.inspectSource=function(e){return A.call(e)},(e.exports=function(e,i,a,o){var s="function"==typeof a;s&&(w(a,"name")||y(a,"name",i)),e[i]!==a&&(s&&(w(a,t)||y(a,t,e[i]?""+e[i]:n.join(String(i)))),e===r?e[i]=a:o?e[i]?e[i]=a:y(e,i,a):(delete e[i],y(e,i,a)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[t]||A.call(this)})}),_=function(e,t,n){var o,s,l,c,u=e&_.F,h=e&_.G,d=e&_.S,f=e&_.P,p=e&_.B,m=h?r:d?r[t]||(r[t]={}):(r[t]||{}).prototype,g=h?a:a[t]||(a[t]={}),v=g.prototype||(g.prototype={});for(o in h&&(n=t),n)l=((s=!u&&m&&void 0!==m[o])?m:n)[o],c=p&&s?i(l,r):f&&"function"==typeof l?i(Function.call,l):l,m&&C(m,o,l,e&_.U),g[o]!=l&&y(g,o,c),f&&v[o]!=l&&(v[o]=l)};r.core=a,_.F=1,_.G=2,_.S=4,_.P=8,_.B=16,_.W=32,_.U=64,_.R=128;var P=_,x=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},N=function(e){return Object(x(e))},M=function(e,t,n,i){try{return i?t(s(n)[0],n[1]):t(n)}catch(t){var r=e.return;throw void 0!==r&&s(r.call(e)),t}},I={},L=t(function(e){var t=S("wks"),n=r.Symbol,i="function"==typeof n;(e.exports=function(e){return t[e]||(t[e]=i&&n[e]||(i?n:E)("Symbol."+e))}).store=t}),O=L("iterator"),j=Array.prototype,R=function(e){return void 0!==e&&(I.Array===e||j[O]===e)},F=Math.ceil,D=Math.floor,q=function(e){return isNaN(e=+e)?0:(e>0?D:F)(e)},H=Math.min,V=function(e){return e>0?H(q(e),9007199254740991):0},B=function(e,t,n){t in e?g.f(e,t,v(0,n)):e[t]=n},U={}.toString,W=function(e){return U.call(e).slice(8,-1)},z=L("toStringTag"),K="Arguments"==W(function(){return arguments}()),Y=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),z))?n:K?W(t):"Object"==(i=W(t))&&"function"==typeof t.callee?"Arguments":i},G=L("iterator"),$=a.getIteratorMethod=function(e){if(null!=e)return e[G]||e["@@iterator"]||I[Y(e)]},X=L("iterator"),Q=!1;try{[7][X]().return=function(){Q=!0}}catch(e){}var J=function(e,t){if(!t&&!Q)return!1;var n=!1;try{var i=[7],r=i[X]();r.next=function(){return{done:n=!0}},i[X]=function(){return r},e(i)}catch(e){}return n};P(P.S+P.F*!J(function(e){}),"Array",{from:function(e){var t,n,r,a,o=N(e),s="function"==typeof this?this:Array,l=arguments.length,c=l>1?arguments[1]:void 0,u=void 0!==c,h=0,d=$(o);if(u&&(c=i(c,l>2?arguments[2]:void 0,2)),null==d||s==Array&&R(d))for(n=new s(t=V(o.length));t>h;h++)B(n,h,u?c(o[h],h):o[h]);else for(a=d.call(o),n=new s;!(r=a.next()).done;h++)B(n,h,u?M(a,c,[r.value,h],!0):r.value);return n.length=h,n}});var Z=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==W(e)?e.split(""):Object(e)},ee=Array.isArray||function(e){return"Array"==W(e)},te=L("species"),ne=function(e,t){return new(function(e){var t;return ee(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!ee(t.prototype)||(t=void 0),o(t)&&null===(t=t[te])&&(t=void 0)),void 0===t?Array:t}(e))(t)},ie=function(e,t){var n=1==e,r=2==e,a=3==e,o=4==e,s=6==e,l=5==e||s,c=t||ne;return function(t,u,h){for(var d,f,p=N(t),m=Z(p),g=i(u,h,3),v=V(m.length),y=0,b=n?c(t,v):r?c(t,0):void 0;v>y;y++)if((l||y in m)&&(f=g(d=m[y],y,p),e))if(n)b[y]=f;else if(f)switch(e){case 3:return!0;case 5:return d;case 6:return y;case 2:b.push(d)}else if(o)return!1;return s?-1:a||o?o:b}},re=L("unscopables"),ae=Array.prototype;null==ae[re]&&y(ae,re,{});var oe=function(e){ae[re][e]=!0},se=ie(5),le=!0;"find"in[]&&Array(1).find(function(){le=!1}),P(P.P+P.F*le,"Array",{find:function(e){return se(this,e,arguments.length>1?arguments[1]:void 0)}}),oe("find");var ce={f:{}.propertyIsEnumerable},ue=function(e){return Z(x(e))},he=Object.getOwnPropertyDescriptor,de={f:c?he:function(e,t){if(e=ue(e),t=p(t,!0),f)try{return he(e,t)}catch(e){}if(w(e,t))return v(!ce.f.call(e,t),e[t])}},fe=function(e,t){if(s(e),!o(t)&&null!==t)throw TypeError(t+": can't set as prototype!")},pe={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 fe(e,i),t?e.__proto__=i:n(e,i),e}}({},!1):void 0),check:fe}.set,me=function(e,t,n){var i,r=t.constructor;return r!==n&&"function"==typeof r&&(i=r.prototype)!==n.prototype&&o(i)&&pe&&pe(e,i),e},ge=Math.max,ve=Math.min,ye=function(e){return function(t,n,i){var r,a=ue(t),o=V(a.length),s=function(e,t){return(e=q(e))<0?ge(e+t,0):ve(e,t)}(i,o);if(e&&n!=n){for(;o>s;)if((r=a[s++])!=r)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},be=S("keys"),we=function(e){return be[e]||(be[e]=E(e))},ke=ye(!1),Te=we("IE_PROTO"),Ee=function(e,t){var n,i=ue(e),r=0,a=[];for(n in i)n!=Te&&w(i,n)&&a.push(n);for(;t.length>r;)w(i,n=t[r++])&&(~ke(a,n)||a.push(n));return a},Se="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Ae=Se.concat("length","prototype"),Ce={f:Object.getOwnPropertyNames||function(e){return Ee(e,Ae)}},_e="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",Pe="["+_e+"]",xe=RegExp("^"+Pe+Pe+"*"),Ne=RegExp(Pe+Pe+"*$"),Me=function(e,t,n){var i={},r=l(function(){return!!_e[e]()||"​…"!="​…"[e]()}),a=i[e]=r?t(Ie):_e[e];n&&(i[n]=a),P(P.P+P.F*r,"String",i)},Ie=Me.trim=function(e,t){return e=String(x(e)),1&t&&(e=e.replace(xe,"")),2&t&&(e=e.replace(Ne,"")),e},Le=Me,Oe=Object.keys||function(e){return Ee(e,Se)},je=c?Object.defineProperties:function(e,t){s(e);for(var n,i=Oe(t),r=i.length,a=0;r>a;)g.f(e,n=i[a++],t[n]);return e},Re=r.document,Fe=Re&&Re.documentElement,De=we("IE_PROTO"),qe=function(){},He=function(){var e,t=d("iframe"),n=Se.length;for(t.style.display="none",Fe.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("