3 lines
152 KiB
JavaScript
3 lines
152 KiB
JavaScript
"object"==typeof navigator&&function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Plyr",t):(e=e||self).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=function(e){return"object"==typeof e?null!==e:"function"==typeof e},t=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t},n=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},i={}.toString,r=function(e){return i.call(e).slice(8,-1)},a="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e,t){return e(t={exports:{}},t.exports),t.exports}var s=o(function(e){var t=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=t)}),l=(s.version,o(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)})),c=o(function(e){var t=l["__core-js_shared__"]||(l["__core-js_shared__"]={});(e.exports=function(e,n){return t[e]||(t[e]=void 0!==n?n:{})})("versions",[]).push({version:s.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),u=0,h=Math.random(),d=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++u+h).toString(36))},f=o(function(e){var t=c("wks"),n=l.Symbol,i="function"==typeof n;(e.exports=function(e){return t[e]||(t[e]=i&&n[e]||(i?n:d)("Symbol."+e))}).store=t}),p=f("toStringTag"),m="Arguments"==r(function(){return arguments}()),g=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),p))?n:m?r(t):"Object"==(i=r(t))&&"function"==typeof t.callee?"Arguments":i},v=RegExp.prototype.exec,y=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==g(e))throw new TypeError("RegExp#exec called on incompatible receiver");return v.call(e,t)},b=function(){var e=t(this),n="";return e.global&&(n+="g"),e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),e.sticky&&(n+="y"),n},w=RegExp.prototype.exec,k=String.prototype.replace,T=w,E=function(){var e=/a/,t=/b*/g;return w.call(e,"a"),w.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),S=void 0!==/()??/.exec("")[1];(E||S)&&(T=function(e){var t,n,i,r,a=this;return S&&(n=new RegExp("^"+a.source+"$(?!\\s)",b.call(a))),E&&(t=a.lastIndex),i=w.call(a,e),E&&i&&(a.lastIndex=a.global?i.index+i[0].length:t),S&&i&&i.length>1&&k.call(i[0],n,function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(i[r]=void 0)}),i});var A=T,P=function(e){try{return!!e()}catch(e){return!0}},C=!P(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),_=l.document,x=e(_)&&e(_.createElement),N=function(e){return x?_.createElement(e):{}},I=!C&&!P(function(){return 7!=Object.defineProperty(N("div"),"a",{get:function(){return 7}}).a}),M=function(t,n){if(!e(t))return t;var i,r;if(n&&"function"==typeof(i=t.toString)&&!e(r=i.call(t)))return r;if("function"==typeof(i=t.valueOf)&&!e(r=i.call(t)))return r;if(!n&&"function"==typeof(i=t.toString)&&!e(r=i.call(t)))return r;throw TypeError("Can't convert object to primitive value")},O=Object.defineProperty,L={f:C?Object.defineProperty:function(e,n,i){if(t(e),n=M(n,!0),t(i),I)try{return O(e,n,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(e[n]=i.value),e}},j=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},R=C?function(e,t,n){return L.f(e,t,j(1,n))}:function(e,t,n){return e[t]=n,e},F={}.hasOwnProperty,D=function(e,t){return F.call(e,t)},q=c("native-function-to-string",Function.toString),H=o(function(e){var t=d("src"),n=(""+q).split("toString");s.inspectSource=function(e){return q.call(e)},(e.exports=function(e,i,r,a){var o="function"==typeof r;o&&(D(r,"name")||R(r,"name",i)),e[i]!==r&&(o&&(D(r,t)||R(r,t,e[i]?""+e[i]:n.join(String(i)))),e===l?e[i]=r:a?e[i]?e[i]=r:R(e,i,r):(delete e[i],R(e,i,r)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[t]||q.call(this)})}),V=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},B=function(e,t,n){if(V(e),void 0===t)return e;switch(n){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)}},U=function(e,t,n){var i,r,a,o,c=e&U.F,u=e&U.G,h=e&U.S,d=e&U.P,f=e&U.B,p=u?l:h?l[t]||(l[t]={}):(l[t]||{}).prototype,m=u?s:s[t]||(s[t]={}),g=m.prototype||(m.prototype={});for(i in u&&(n=t),n)a=((r=!c&&p&&void 0!==p[i])?p:n)[i],o=f&&r?B(a,l):d&&"function"==typeof a?B(Function.call,a):a,p&&H(p,i,a,e&U.U),m[i]!=a&&R(m,i,o),d&&g[i]!=a&&(g[i]=a)};l.core=s,U.F=1,U.G=2,U.S=4,U.P=8,U.B=16,U.W=32,U.U=64,U.R=128;var W=U;W({target:"RegExp",proto:!0,forced:A!==/./.exec},{exec:A});var z=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},K=f("species"),Y=!P(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),G=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}(),$=function(e,t,n){var i=f(e),r=!P(function(){var t={};return t[i]=function(){return 7},7!=""[e](t)}),a=r?!P(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[K]=function(){return n}),n[i](""),!t}):void 0;if(!r||!a||"replace"===e&&!Y||"split"===e&&!G){var o=/./[i],s=n(z,i,""[e],function(e,t,n,i,a){return t.exec===A?r&&!a?{done:!0,value:o.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{done:!1}}),l=s[0],c=s[1];H(String.prototype,e,l),R(RegExp.prototype,i,2==t?function(e,t){return c.call(e,this,t)}:function(e){return c.call(e,this)})}};$("search",1,function(e,i,r,a){return[function(t){var n=e(this),r=null==t?void 0:t[i];return void 0!==r?r.call(t,n):new RegExp(t)[i](String(n))},function(e){var i=a(r,e,this);if(i.done)return i.value;var o=t(e),s=String(this),l=o.lastIndex;n(l,0)||(o.lastIndex=0);var c=y(o,s);return n(o.lastIndex,l)||(o.lastIndex=l),null===c?-1:c.index}]});var X=f("match"),J=function(t){var n;return e(t)&&(void 0!==(n=t[X])?!!n:"RegExp"==r(t))},Q=f("species"),Z=function(e,n){var i,r=t(e).constructor;return void 0===r||null==(i=t(r)[Q])?n:V(i)},ee=Math.ceil,te=Math.floor,ne=function(e){return isNaN(e=+e)?0:(e>0?te:ee)(e)},ie=function(e){return function(t,n){var i,r,a=String(z(t)),o=ne(n),s=a.length;return o<0||o>=s?e?"":void 0:(i=a.charCodeAt(o))<55296||i>56319||o+1===s||(r=a.charCodeAt(o+1))<56320||r>57343?e?a.charAt(o):i:e?a.slice(o,o+2):r-56320+(i-55296<<10)+65536}},re=ie(!0),ae=function(e,t,n){return t+(n?re(e,t).length:1)},oe=Math.min,se=function(e){return e>0?oe(ne(e),9007199254740991):0},le=Math.min,ce=[].push,ue=!P(function(){});$("split",2,function(e,n,i,r){var a;return a="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!J(e))return i.call(n,e,t);for(var r,a,o,s=[],l=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,u=void 0===t?4294967295:t>>>0,h=new RegExp(e.source,l+"g");(r=A.call(h,n))&&!((a=h.lastIndex)>c&&(s.push(n.slice(c,r.index)),r.length>1&&r.index<n.length&&ce.apply(s,r.slice(1)),o=r[0].length,c=a,s.length>=u));)h.lastIndex===r.index&&h.lastIndex++;return c===n.length?!o&&h.test("")||s.push(""):s.push(n.slice(c)),s.length>u?s.slice(0,u):s}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:i.call(this,e,t)}:i,[function(t,i){var r=e(this),o=null==t?void 0:t[n];return void 0!==o?o.call(t,r,i):a.call(String(r),t,i)},function(e,n){var o=r(a,e,this,n,a!==i);if(o.done)return o.value;var s=t(e),l=String(this),c=Z(s,RegExp),u=s.unicode,h=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(ue?"y":"g"),d=new c(ue?s:"^(?:"+s.source+")",h),f=void 0===n?4294967295:n>>>0;if(0===f)return[];if(0===l.length)return null===y(d,l)?[l]:[];for(var p=0,m=0,g=[];m<l.length;){d.lastIndex=ue?m:0;var v,b=y(d,ue?l:l.slice(m));if(null===b||(v=le(se(d.lastIndex+(ue?0:m)),l.length))===p)m=ae(l,m,u);else{if(g.push(l.slice(p,m)),g.length===f)return g;for(var w=1;w<=b.length-1;w++)if(g.push(b[w]),g.length===f)return g;m=p=v}}return g.push(l.slice(p)),g}]});var he=f("unscopables"),de=Array.prototype;null==de[he]&&R(de,he,{});var fe=function(e){de[he][e]=!0},pe=function(e,t){return{value:t,done:!!e}},me={},ge=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)},ve=function(e){return ge(z(e))},ye=Math.max,be=Math.min,we=function(e){return function(t,n,i){var r,a=ve(t),o=se(a.length),s=function(e,t){return(e=ne(e))<0?ye(e+t,0):be(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}},ke=c("keys"),Te=function(e){return ke[e]||(ke[e]=d(e))},Ee=we(!1),Se=Te("IE_PROTO"),Ae=function(e,t){var n,i=ve(e),r=0,a=[];for(n in i)n!=Se&&D(i,n)&&a.push(n);for(;t.length>r;)D(i,n=t[r++])&&(~Ee(a,n)||a.push(n));return a},Pe="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Ce=Object.keys||function(e){return Ae(e,Pe)},_e=C?Object.defineProperties:function(e,n){t(e);for(var i,r=Ce(n),a=r.length,o=0;a>o;)L.f(e,i=r[o++],n[i]);return e},xe=l.document,Ne=xe&&xe.documentElement,Ie=Te("IE_PROTO"),Me=function(){},Oe=function(){var e,t=N("iframe"),n=Pe.length;for(t.style.display="none",Ne.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),Oe=e.F;n--;)delete Oe.prototype[Pe[n]];return Oe()},Le=Object.create||function(e,n){var i;return null!==e?(Me.prototype=t(e),i=new Me,Me.prototype=null,i[Ie]=e):i=Oe(),void 0===n?i:_e(i,n)},je=L.f,Re=f("toStringTag"),Fe=function(e,t,n){e&&!D(e=n?e:e.prototype,Re)&&je(e,Re,{configurable:!0,value:t})},De={};R(De,f("iterator"),function(){return this});var qe=function(e,t,n){e.prototype=Le(De,{next:j(1,n)}),Fe(e,t+" Iterator")},He=function(e){return Object(z(e))},Ve=Te("IE_PROTO"),Be=Object.prototype,Ue=Object.getPrototypeOf||function(e){return e=He(e),D(e,Ve)?e[Ve]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Be:null},We=f("iterator"),ze=!([].keys&&"next"in[].keys()),Ke=function(){return this},Ye=function(e,t,n,i,r,a,o){qe(n,t,i);var s,l,c,u=function(e){if(!ze&&e in p)return p[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},h=t+" Iterator",d="values"==r,f=!1,p=e.prototype,m=p[We]||p["@@iterator"]||r&&p[r],g=m||u(r),v=r?d?u("entries"):g:void 0,y="Array"==t&&p.entries||m;if(y&&(c=Ue(y.call(new e)))!==Object.prototype&&c.next&&(Fe(c,h,!0),"function"!=typeof c[We]&&R(c,We,Ke)),d&&m&&"values"!==m.name&&(f=!0,g=function(){return m.call(this)}),(ze||f||!p[We])&&R(p,We,g),me[t]=g,me[h]=Ke,r)if(s={values:d?g:u("values"),keys:a?g:u("keys"),entries:v},o)for(l in s)l in p||H(p,l,s[l]);else W(W.P+W.F*(ze||f),t,s);return s},Ge=Ye(Array,"Array",function(e,t){this._t=ve(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,pe(1)):pe(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values");me.Arguments=me.Array,fe("keys"),fe("values"),fe("entries");var $e=L.f,Xe=Function.prototype,Je=/^\s*function ([^ (]*)/;"name"in Xe||C&&$e(Xe,"name",{configurable:!0,get:function(){try{return(""+this).match(Je)[1]}catch(e){return""}}}),C&&"g"!=/./g.flags&&L.f(RegExp.prototype,"flags",{configurable:!0,get:b});var Qe=/./.toString,Ze=function(e){H(RegExp.prototype,"toString",e,!0)};P(function(){return"/a/b"!=Qe.call({source:"a",flags:"b"})})?Ze(function(){var e=t(this);return"/".concat(e.source,"/","flags"in e?e.flags:!C&&e instanceof RegExp?b.call(e):void 0)}):"toString"!=Qe.name&&Ze(function(){return Qe.call(this)});for(var et=f("iterator"),tt=f("toStringTag"),nt=me.Array,it={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},rt=Ce(it),at=0;at<rt.length;at++){var ot,st=rt[at],lt=it[st],ct=l[st],ut=ct&&ct.prototype;if(ut&&(ut[et]||R(ut,et,nt),ut[tt]||R(ut,tt,st),me[st]=nt,lt))for(ot in Ge)ut[ot]||H(ut,ot,Ge[ot],!0)}function ht(e){return(ht="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 dt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ft(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 pt(e,t,n){return t&&ft(e.prototype,t),n&&ft(e,n),e}function mt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],i=!0,r=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(e){r=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function vt(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var yt=Math.max,bt=Math.min,wt=Math.floor,kt=/\$([$&`']|\d\d?|<[^>]*>)/g,Tt=/\$([$&`']|\d\d?)/g;$("replace",2,function(e,n,i,r){return[function(t,r){var a=e(this),o=null==t?void 0:t[n];return void 0!==o?o.call(t,a,r):i.call(String(a),t,r)},function(e,n){var o=r(i,e,this,n);if(o.done)return o.value;var s=t(e),l=String(this),c="function"==typeof n;c||(n=String(n));var u=s.global;if(u){var h=s.unicode;s.lastIndex=0}for(var d=[];;){var f=y(s,l);if(null===f)break;if(d.push(f),!u)break;""===String(f[0])&&(s.lastIndex=ae(l,se(s.lastIndex),h))}for(var p,m="",g=0,v=0;v<d.length;v++){f=d[v];for(var b=String(f[0]),w=yt(bt(ne(f.index),l.length),0),k=[],T=1;T<f.length;T++)k.push(void 0===(p=f[T])?p:String(p));var E=f.groups;if(c){var S=[b].concat(k,w,l);void 0!==E&&S.push(E);var A=String(n.apply(void 0,S))}else A=a(b,l,w,k,E,n);w>=g&&(m+=l.slice(g,w)+A,g=w+b.length)}return m+l.slice(g)}];function a(e,t,n,r,a,o){var s=n+e.length,l=r.length,c=Tt;return void 0!==a&&(a=He(a),c=kt),i.call(o,c,function(i,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(s);case"<":c=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return i;if(u>l){var h=wt(u/10);return 0===h?i:h<=l?void 0===r[h-1]?o.charAt(1):r[h-1]+o.charAt(1):i}c=r[u-1]}return void 0===c?"":c})}});var Et={f:f},St=L.f,At=function(e){var t=s.Symbol||(s.Symbol=l.Symbol||{});"_"==e.charAt(0)||e in t||St(t,e,{value:Et.f(e)})};At("asyncIterator");var Pt=o(function(t){var n=d("meta"),i=L.f,r=0,a=Object.isExtensible||function(){return!0},o=!P(function(){return a(Object.preventExtensions({}))}),s=function(e){i(e,n,{value:{i:"O"+ ++r,w:{}}})},l=t.exports={KEY:n,NEED:!1,fastKey:function(t,i){if(!e(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!D(t,n)){if(!a(t))return"F";if(!i)return"E";s(t)}return t[n].i},getWeak:function(e,t){if(!D(e,n)){if(!a(e))return!0;if(!t)return!1;s(e)}return e[n].w},onFreeze:function(e){return o&&l.NEED&&a(e)&&!D(e,n)&&s(e),e}}}),Ct=(Pt.KEY,Pt.NEED,Pt.fastKey,Pt.getWeak,Pt.onFreeze,{f:Object.getOwnPropertySymbols}),_t={f:{}.propertyIsEnumerable},xt=Array.isArray||function(e){return"Array"==r(e)},Nt=Pe.concat("length","prototype"),It={f:Object.getOwnPropertyNames||function(e){return Ae(e,Nt)}},Mt=It.f,Ot={}.toString,Lt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],jt={f:function(e){return Lt&&"[object Window]"==Ot.call(e)?function(e){try{return Mt(e)}catch(e){return Lt.slice()}}(e):Mt(ve(e))}},Rt=Object.getOwnPropertyDescriptor,Ft={f:C?Rt:function(e,t){if(e=ve(e),t=M(t,!0),I)try{return Rt(e,t)}catch(e){}if(D(e,t))return j(!_t.f.call(e,t),e[t])}},Dt=Pt.KEY,qt=Ft.f,Ht=L.f,Vt=jt.f,Bt=l.Symbol,Ut=l.JSON,Wt=Ut&&Ut.stringify,zt=f("_hidden"),Kt=f("toPrimitive"),Yt={}.propertyIsEnumerable,Gt=c("symbol-registry"),$t=c("symbols"),Xt=c("op-symbols"),Jt=Object.prototype,Qt="function"==typeof Bt,Zt=l.QObject,en=!Zt||!Zt.prototype||!Zt.prototype.findChild,tn=C&&P(function(){return 7!=Le(Ht({},"a",{get:function(){return Ht(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=qt(Jt,t);i&&delete Jt[t],Ht(e,t,n),i&&e!==Jt&&Ht(Jt,t,i)}:Ht,nn=function(e){var t=$t[e]=Le(Bt.prototype);return t._k=e,t},rn=Qt&&"symbol"==typeof Bt.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof Bt},an=function(e,n,i){return e===Jt&&an(Xt,n,i),t(e),n=M(n,!0),t(i),D($t,n)?(i.enumerable?(D(e,zt)&&e[zt][n]&&(e[zt][n]=!1),i=Le(i,{enumerable:j(0,!1)})):(D(e,zt)||Ht(e,zt,j(1,{})),e[zt][n]=!0),tn(e,n,i)):Ht(e,n,i)},on=function(e,n){t(e);for(var i,r=function(e){var t=Ce(e),n=Ct.f;if(n)for(var i,r=n(e),a=_t.f,o=0;r.length>o;)a.call(e,i=r[o++])&&t.push(i);return t}(n=ve(n)),a=0,o=r.length;o>a;)an(e,i=r[a++],n[i]);return e},sn=function(e){var t=Yt.call(this,e=M(e,!0));return!(this===Jt&&D($t,e)&&!D(Xt,e))&&(!(t||!D(this,e)||!D($t,e)||D(this,zt)&&this[zt][e])||t)},ln=function(e,t){if(e=ve(e),t=M(t,!0),e!==Jt||!D($t,t)||D(Xt,t)){var n=qt(e,t);return!n||!D($t,t)||D(e,zt)&&e[zt][t]||(n.enumerable=!0),n}},cn=function(e){for(var t,n=Vt(ve(e)),i=[],r=0;n.length>r;)D($t,t=n[r++])||t==zt||t==Dt||i.push(t);return i},un=function(e){for(var t,n=e===Jt,i=Vt(n?Xt:ve(e)),r=[],a=0;i.length>a;)!D($t,t=i[a++])||n&&!D(Jt,t)||r.push($t[t]);return r};Qt||(H((Bt=function(){if(this instanceof Bt)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===Jt&&t.call(Xt,n),D(this,zt)&&D(this[zt],e)&&(this[zt][e]=!1),tn(this,e,j(1,n))};return C&&en&&tn(Jt,e,{configurable:!0,set:t}),nn(e)}).prototype,"toString",function(){return this._k}),Ft.f=ln,L.f=an,It.f=jt.f=cn,_t.f=sn,Ct.f=un,C&&H(Jt,"propertyIsEnumerable",sn,!0),Et.f=function(e){return nn(f(e))}),W(W.G+W.W+W.F*!Qt,{Symbol:Bt});for(var hn="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),dn=0;hn.length>dn;)f(hn[dn++]);for(var fn=Ce(f.store),pn=0;fn.length>pn;)At(fn[pn++]);W(W.S+W.F*!Qt,"Symbol",{for:function(e){return D(Gt,e+="")?Gt[e]:Gt[e]=Bt(e)},keyFor:function(e){if(!rn(e))throw TypeError(e+" is not a symbol!");for(var t in Gt)if(Gt[t]===e)return t},useSetter:function(){en=!0},useSimple:function(){en=!1}}),W(W.S+W.F*!Qt,"Object",{create:function(e,t){return void 0===t?Le(e):on(Le(e),t)},defineProperty:an,defineProperties:on,getOwnPropertyDescriptor:ln,getOwnPropertyNames:cn,getOwnPropertySymbols:un}),Ut&&W(W.S+W.F*(!Qt||P(function(){var e=Bt();return"[null]"!=Wt([e])||"{}"!=Wt({a:e})||"{}"!=Wt(Object(e))})),"JSON",{stringify:function(t){for(var n,i,r=[t],a=1;arguments.length>a;)r.push(arguments[a++]);if(i=n=r[1],(e(n)||void 0!==t)&&!rn(t))return xt(n)||(n=function(e,t){if("function"==typeof i&&(t=i.call(this,e,t)),!rn(t))return t}),r[1]=n,Wt.apply(Ut,r)}}),Bt.prototype[Kt]||R(Bt.prototype,Kt,Bt.prototype.valueOf),Fe(Bt,"Symbol"),Fe(Math,"Math",!0),Fe(l.JSON,"JSON",!0),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(String(e).replace(/\+/g," "))};"URLSearchParams"in e&&"a=1"===new e.URLSearchParams("?a=1").toString()||function(){var r=function e(t){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var n=ht(t);if("undefined"===n);else if("string"===n)""!==t&&this._fromString(t);else if(t instanceof e){var i=this;t.forEach(function(e,t){i.append(t,e)})}else{if(null===t||"object"!==n)throw new TypeError("Unsupported input's type for URLSearchParams");if("[object Array]"===Object.prototype.toString.call(t))for(var r=0;r<t.length;r++){var a=t[r];if("[object Array]"!==Object.prototype.toString.call(a)&&2===a.length)throw new TypeError("Expected [string, any] as entry at index "+r+" of URLSearchParams's input");this.append(a[0],a[1])}else for(var o in t)t.hasOwnProperty(o)&&this.append(o,t[o])}},a=r.prototype;a.append=function(e,t){e in this._entries?this._entries[e].push(String(t)):this._entries[e]=[String(t)]},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]=[String(t)]},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;r<n.length;r++)e.call(t,n[r],i,this)}},a.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),n(e)},a.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),n(e)},a.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),n(e)},t&&(a[Symbol.iterator]=a.entries),a.toString=function(){var e=[];return this.forEach(function(t,n){e.push(i(n)+"="+i(t))}),e.join("&")},e.URLSearchParams=r}();var a=e.URLSearchParams.prototype;"function"!=typeof a.sort&&(a.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:e[0]>t[0]?1:0}),e._entries&&(e._entries={});for(var n=0;n<t.length;n++)this.append(t[n][0],t[n][1])}),"function"!=typeof a._fromString&&Object.defineProperty(a,"_fromString",{enumerable:!1,configurable:!1,writable:!1,value:function(e){if(this._entries)this._entries={};else{var t=[];this.forEach(function(e,n){t.push(n)});for(var n=0;n<t.length;n++)this.delete(t[n])}var i,a=(e=e.replace(/^\?/,"")).split("&");for(n=0;n<a.length;n++)i=a[n].split("="),this.append(r(i[0]),i.length>1?r(i[1]):"")}})}(void 0!==a?a:"undefined"!=typeof window?window:"undefined"!=typeof self?self:a),function(e){var t,n,i;if(function(){try{var t=new e.URL("b","http://a");return t.pathname="c%20d","http://a/c%20d"===t.href&&t.searchParams}catch(e){return!1}}()||(t=e.URL,i=(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 e.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))}})}).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 r=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:r,enumerable:!0})}catch(t){setInterval(function(){e.location.origin=r()},100)}}}(void 0!==a?a:"undefined"!=typeof window?window:"undefined"!=typeof self?self:a);var mn=function(e,n,i,r){try{return r?n(t(i)[0],i[1]):n(i)}catch(n){var a=e.return;throw void 0!==a&&t(a.call(e)),n}},gn=f("iterator"),vn=Array.prototype,yn=function(e){return void 0!==e&&(me.Array===e||vn[gn]===e)},bn=function(e,t,n){t in e?L.f(e,t,j(0,n)):e[t]=n},wn=f("iterator"),kn=s.getIteratorMethod=function(e){if(null!=e)return e[wn]||e["@@iterator"]||me[g(e)]},Tn=f("iterator"),En=!1;try{[7][Tn]().return=function(){En=!0}}catch(e){}var Sn=function(e,t){if(!t&&!En)return!1;var n=!1;try{var i=[7],r=i[Tn]();r.next=function(){return{done:n=!0}},i[Tn]=function(){return r},e(i)}catch(e){}return n};W(W.S+W.F*!Sn(function(e){}),"Array",{from:function(e){var t,n,i,r,a=He(e),o="function"==typeof this?this:Array,s=arguments.length,l=s>1?arguments[1]:void 0,c=void 0!==l,u=0,h=kn(a);if(c&&(l=B(l,s>2?arguments[2]:void 0,2)),null==h||o==Array&&yn(h))for(n=new o(t=se(a.length));t>u;u++)bn(n,u,c?l(a[u],u):a[u]);else for(r=h.call(a),n=new o;!(i=r.next()).done;u++)bn(n,u,c?mn(r,l,[i.value,u],!0):i.value);return n.length=u,n}});var An=f("species"),Pn=function(t,n){return new(function(t){var n;return xt(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!xt(n.prototype)||(n=void 0),e(n)&&null===(n=n[An])&&(n=void 0)),void 0===n?Array:n}(t))(n)},Cn=function(e,t){var n=1==e,i=2==e,r=3==e,a=4==e,o=6==e,s=5==e||o,l=t||Pn;return function(t,c,u){for(var h,d,f=He(t),p=ge(f),m=B(c,u,3),g=se(p.length),v=0,y=n?l(t,g):i?l(t,0):void 0;g>v;v++)if((s||v in p)&&(d=m(h=p[v],v,f),e))if(n)y[v]=d;else if(d)switch(e){case 3:return!0;case 5:return h;case 6:return v;case 2:y.push(h)}else if(a)return!1;return o?-1:r||a?a:y}},_n=Cn(5),xn=!0;"find"in[]&&Array(1).find(function(){xn=!1}),W(W.P+W.F*xn,"Array",{find:function(e){return _n(this,e,arguments.length>1?arguments[1]:void 0)}}),fe("find");var Nn=function(n,i){if(t(n),!e(i)&&null!==i)throw TypeError(i+": can't set as prototype!")},In={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=B(Function.call,Ft.f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,i){return Nn(e,i),t?e.__proto__=i:n(e,i),e}}({},!1):void 0),check:Nn}.set,Mn=function(t,n,i){var r,a=n.constructor;return a!==i&&"function"==typeof a&&(r=a.prototype)!==i.prototype&&e(r)&&In&&In(t,r),t},On="\t\n\v\f\r \u2028\u2029\ufeff",Ln="["+On+"]",jn=RegExp("^"+Ln+Ln+"*"),Rn=RegExp(Ln+Ln+"*$"),Fn=function(e,t,n){var i={},r=P(function(){return!!On[e]()||"
"!="
"[e]()}),a=i[e]=r?t(Dn):On[e];n&&(i[n]=a),W(W.P+W.F*r,"String",i)},Dn=Fn.trim=function(e,t){return e=String(z(e)),1&t&&(e=e.replace(jn,"")),2&t&&(e=e.replace(Rn,"")),e},qn=Fn,Hn=It.f,Vn=Ft.f,Bn=L.f,Un=qn.trim,Wn=l.Number,zn=Wn,Kn=Wn.prototype,Yn="Number"==r(Le(Kn)),Gn="trim"in String.prototype,$n=function(e){var t=M(e,!1);if("string"==typeof t&&t.length>2){var n,i,r,a=(t=Gn?t.trim():Un(t,3)).charCodeAt(0);if(43===a||45===a){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===a){switch(t.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+t}for(var o,s=t.slice(2),l=0,c=s.length;l<c;l++)if((o=s.charCodeAt(l))<48||o>r)return NaN;return parseInt(s,i)}}return+t};if(!Wn(" 0o1")||!Wn("0b1")||Wn("+0x1")){Wn=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof Wn&&(Yn?P(function(){Kn.valueOf.call(n)}):"Number"!=r(n))?Mn(new zn($n(t)),n,Wn):$n(t)};for(var Xn,Jn=C?Hn(zn):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),Qn=0;Jn.length>Qn;Qn++)D(zn,Xn=Jn[Qn])&&!D(Wn,Xn)&&Bn(Wn,Xn,Vn(zn,Xn));Wn.prototype=Kn,Kn.constructor=Wn,H(l,"Number",Wn)}!function(e,t){var n=(s.Object||{})[e]||Object[e],i={};i[e]=t(n),W(W.S+W.F*P(function(){n(1)}),"Object",i)}("keys",function(){return function(e){return Ce(He(e))}});var Zn=function(e,t,n){if(J(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(z(e))},ei=f("match"),ti=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[ei]=!1,!"/./"[e](t)}catch(e){}}return!0};W(W.P+W.F*ti("includes"),"String",{includes:function(e){return!!~Zn(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}});var ni=we(!0);W(W.P,"Array",{includes:function(e){return ni(this,e,arguments.length>1?arguments[1]:void 0)}}),fe("includes");var ii=ie(!0);Ye(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=ii(t,n),this._i+=e.length,{value:e,done:!1})});var ri=Object.assign,ai=!ri||P(function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=ri({},e)[n]||Object.keys(ri({},t)).join("")!=i})?function(e,t){for(var n=He(e),i=arguments.length,r=1,a=Ct.f,o=_t.f;i>r;)for(var s,l=ge(arguments[r++]),c=a?Ce(l).concat(a(l)):Ce(l),u=c.length,h=0;u>h;)o.call(l,s=c[h++])&&(n[s]=l[s]);return n}:ri,oi=function(e,t,n){for(var i in t)H(e,i,t[i],n);return e},si=function(e,t,n,i){if(!(e instanceof t)||void 0!==i&&i in e)throw TypeError(n+": incorrect invocation!");return e},li=o(function(e){var n={},i={},r=e.exports=function(e,r,a,o,s){var l,c,u,h,d=s?function(){return e}:kn(e),f=B(a,o,r?2:1),p=0;if("function"!=typeof d)throw TypeError(e+" is not iterable!");if(yn(d)){for(l=se(e.length);l>p;p++)if((h=r?f(t(c=e[p])[0],c[1]):f(e[p]))===n||h===i)return h}else for(u=d.call(e);!(c=u.next()).done;)if((h=mn(u,f,c.value,r))===n||h===i)return h};r.BREAK=n,r.RETURN=i}),ci=function(t,n){if(!e(t)||t._t!==n)throw TypeError("Incompatible receiver, "+n+" required!");return t},ui=Pt.getWeak,hi=Cn(5),di=Cn(6),fi=0,pi=function(e){return e._l||(e._l=new mi)},mi=function(){this.a=[]},gi=function(e,t){return hi(e.a,function(e){return e[0]===t})};mi.prototype={get:function(e){var t=gi(this,e);if(t)return t[1]},has:function(e){return!!gi(this,e)},set:function(e,t){var n=gi(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=di(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}};var vi={getConstructor:function(t,n,i,r){var a=t(function(e,t){si(e,a,n,"_i"),e._t=n,e._i=fi++,e._l=void 0,null!=t&&li(t,i,e[r],e)});return oi(a.prototype,{delete:function(t){if(!e(t))return!1;var i=ui(t);return!0===i?pi(ci(this,n)).delete(t):i&&D(i,this._i)&&delete i[this._i]},has:function(t){if(!e(t))return!1;var i=ui(t);return!0===i?pi(ci(this,n)).has(t):i&&D(i,this._i)}}),a},def:function(e,n,i){var r=ui(t(n),!0);return!0===r?pi(e).set(n,i):r[e._i]=i,e},ufstore:pi};o(function(t){var n,i=Cn(0),r=ci,a=!l.ActiveXObject&&"ActiveXObject"in l,o=Pt.getWeak,s=Object.isExtensible,c=vi.ufstore,u=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},h={get:function(t){if(e(t)){var n=o(t);return!0===n?c(ci(this,"WeakMap")).get(t):n?n[this._i]:void 0}},set:function(e,t){return vi.def(ci(this,"WeakMap"),e,t)}},d=t.exports=function(t,n,i,r,a,o){var s=l[t],c=s,u=a?"set":"add",h=c&&c.prototype,d={},f=function(t){var n=h[t];H(h,t,"delete"==t?function(t){return!(o&&!e(t))&&n.call(this,0===t?0:t)}:"has"==t?function(t){return!(o&&!e(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return o&&!e(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(e){return n.call(this,0===e?0:e),this}:function(e,t){return n.call(this,0===e?0:e,t),this})};if("function"==typeof c&&(o||h.forEach&&!P(function(){(new c).entries().next()}))){var p=new c,m=p[u](o?{}:-0,1)!=p,g=P(function(){p.has(1)}),v=Sn(function(e){new c(e)}),y=!o&&P(function(){for(var e=new c,t=5;t--;)e[u](t,t);return!e.has(-0)});v||((c=n(function(e,n){si(e,c,t);var i=Mn(new s,e,c);return null!=n&&li(n,a,i[u],i),i})).prototype=h,h.constructor=c),(g||y)&&(f("delete"),f("has"),a&&f("get")),(y||m)&&f(u),o&&h.clear&&delete h.clear}else c=r.getConstructor(n,t,a,u),oi(c.prototype,i),Pt.NEED=!0;return Fe(c,t),d[t]=c,W(W.G+W.W+W.F*(c!=s),d),o||r.setStrong(c,t,a),c}("WeakMap",u,h,vi,!0,!0);r&&a&&(n=vi.getConstructor(u,"WeakMap"),ai(n.prototype,h),Pt.NEED=!0,i(["delete","has","get","set"],function(t){var i=d.prototype,r=i[t];H(i,t,function(i,a){if(e(i)&&!s(i)){this._f||(this._f=new n);var o=this._f[t](i,a);return"set"==t?this:o}return r.call(this,i,a)})}))});W(W.S+W.F,"Object",{assign:ai});var yi=_t.f,bi=function(e){return function(t){for(var n,i=ve(t),r=Ce(i),a=r.length,o=0,s=[];a>o;)yi.call(i,n=r[o++])&&s.push(e?[n,i[n]]:i[n]);return s}},wi=bi(!0);W(W.S,"Object",{entries:function(e){return wi(e)}});var ki=bi(!1);W(W.S,"Object",{values:function(e){return ki(e)}});var Ti={addCSS:!0,thumbWidth:15,watch:!0};W(W.S,"Number",{isNaN:function(e){return e!=e}});var Ei=function(e){return null!=e?e.constructor:null},Si=function(e,t){return Boolean(e&&t&&e instanceof t)},Ai=function(e){return null==e},Pi=function(e){return Ei(e)===Object},Ci=function(e){return Ei(e)===String},_i=function(e){return Array.isArray(e)},xi=function(e){return Si(e,NodeList)},Ni={nullOrUndefined:Ai,object:Pi,number:function(e){return Ei(e)===Number&&!Number.isNaN(e)},string:Ci,boolean:function(e){return Ei(e)===Boolean},function:function(e){return Ei(e)===Function},array:_i,nodeList:xi,element:function(e){return Si(e,Element)},event:function(e){return Si(e,Event)},empty:function(e){return Ai(e)||(Ci(e)||_i(e)||xi(e))&&!e.length||Pi(e)&&!Object.keys(e).length}};function Ii(e,t){if(t<1){var n=(i="".concat(t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/))?Math.max(0,(i[1]?i[1].length:0)-(i[2]?+i[2]:0)):0;return parseFloat(e.toFixed(n))}var i;return Math.round(e/t)*t}$("match",1,function(e,n,i,r){return[function(t){var i=e(this),r=null==t?void 0:t[n];return void 0!==r?r.call(t,i):new RegExp(t)[n](String(i))},function(e){var n=r(i,e,this);if(n.done)return n.value;var a=t(e),o=String(this);if(!a.global)return y(a,o);var s=a.unicode;a.lastIndex=0;for(var l,c=[],u=0;null!==(l=y(a,o));){var h=String(l[0]);c[u]=h,""===h&&(a.lastIndex=ae(o,se(a.lastIndex),s)),u++}return 0===u?null:c}]});var Mi,Oi,Li,ji=function(){function e(t,n){dt(this,e),Ni.element(t)?this.element=t:Ni.string(t)&&(this.element=document.querySelector(t)),Ni.element(this.element)&&Ni.empty(this.element.rangeTouch)&&(this.config=Object.assign({},Ti,n),this.init())}return pt(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.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(t){if(!e.enabled||!Ni.event(t))return null;var n,i=t.target,r=t.changedTouches[0],a=parseFloat(i.getAttribute("min"))||0,o=parseFloat(i.getAttribute("max"))||100,s=parseFloat(i.getAttribute("step"))||1,l=o-a,c=i.getBoundingClientRect(),u=100/c.width*(this.config.thumbWidth/2)/100;return(n=100/c.width*(r.clientX-c.left))<0?n=0:n>100&&(n=100),n<50?n-=(100-2*n)*u:n>50&&(n+=2*(n-50)*u),a+Ii(l*(n/100),s)}},{key:"set",value:function(t){e.enabled&&Ni.event(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),function(e,t){if(e&&t){var n=new Event(t);e.dispatchEvent(n)}}(t.target,"touchend"===t.type?"change":"input"))}}],[{key:"setup",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null;if(Ni.empty(t)||Ni.string(t)?i=Array.from(document.querySelectorAll(Ni.string(t)?t:'input[type="range"]')):Ni.element(t)?i=[t]:Ni.nodeList(t)?i=Array.from(t):Ni.array(t)&&(i=t.filter(Ni.element)),Ni.empty(i))return null;var r=Object.assign({},Ti,n);Ni.string(t)&&r.watch&&new MutationObserver(function(n){Array.from(n).forEach(function(n){Array.from(n.addedNodes).forEach(function(n){if(Ni.element(n)&&function(){return Array.from(document.querySelectorAll(i)).includes(this)}.call(n,i=t)){var i;new e(n,r)}})})}).observe(document.body,{childList:!0,subtree:!0});return i.map(function(t){return new e(t,n)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}(),Ri=l.process,Fi=l.setImmediate,Di=l.clearImmediate,qi=l.MessageChannel,Hi=l.Dispatch,Vi=0,Bi={},Ui=function(){var e=+this;if(Bi.hasOwnProperty(e)){var t=Bi[e];delete Bi[e],t()}},Wi=function(e){Ui.call(e.data)};Fi&&Di||(Fi=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return Bi[++Vi]=function(){!function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}e.apply(n,t)}("function"==typeof e?e:Function(e),t)},Mi(Vi),Vi},Di=function(e){delete Bi[e]},"process"==r(Ri)?Mi=function(e){Ri.nextTick(B(Ui,e,1))}:Hi&&Hi.now?Mi=function(e){Hi.now(B(Ui,e,1))}:qi?(Li=(Oi=new qi).port2,Oi.port1.onmessage=Wi,Mi=B(Li.postMessage,Li,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(Mi=function(e){l.postMessage(e+"","*")},l.addEventListener("message",Wi,!1)):Mi="onreadystatechange"in N("script")?function(e){Ne.appendChild(N("script")).onreadystatechange=function(){Ne.removeChild(this),Ui.call(e)}}:function(e){setTimeout(B(Ui,e,1),0)});var zi={set:Fi,clear:Di},Ki=zi.set,Yi=l.MutationObserver||l.WebKitMutationObserver,Gi=l.process,$i=l.Promise,Xi="process"==r(Gi);function Ji(e){var t,n;this.promise=new e(function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i}),this.resolve=V(t),this.reject=V(n)}var Qi,Zi,er,tr,nr={f:function(e){return new Ji(e)}},ir=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}},rr=l.navigator,ar=rr&&rr.userAgent||"",or=f("species"),sr=function(e){var t=l[e];C&&t&&!t[or]&&L.f(t,or,{configurable:!0,get:function(){return this}})},lr=zi.set,cr=function(){var e,t,n,i=function(){var i,r;for(Xi&&(i=Gi.domain)&&i.exit();e;){r=e.fn,e=e.next;try{r()}catch(i){throw e?n():t=void 0,i}}t=void 0,i&&i.enter()};if(Xi)n=function(){Gi.nextTick(i)};else if(!Yi||l.navigator&&l.navigator.standalone)if($i&&$i.resolve){var r=$i.resolve(void 0);n=function(){r.then(i)}}else n=function(){Ki.call(l,i)};else{var a=!0,o=document.createTextNode("");new Yi(i).observe(o,{characterData:!0}),n=function(){o.data=a=!a}}return function(i){var r={fn:i,next:void 0};t&&(t.next=r),e||(e=r,n()),t=r}}(),ur=l.TypeError,hr=l.process,dr=hr&&hr.versions,fr=dr&&dr.v8||"",pr=l.Promise,mr="process"==g(hr),gr=function(){},vr=Zi=nr.f,yr=!!function(){try{var e=pr.resolve(1),t=(e.constructor={})[f("species")]=function(e){e(gr,gr)};return(mr||"function"==typeof PromiseRejectionEvent)&&e.then(gr)instanceof t&&0!==fr.indexOf("6.6")&&-1===ar.indexOf("Chrome/66")}catch(e){}}(),br=function(t){var n;return!(!e(t)||"function"!=typeof(n=t.then))&&n},wr=function(e,t){if(!e._n){e._n=!0;var n=e._c;cr(function(){for(var i=e._v,r=1==e._s,a=0,o=function(t){var n,a,o,s=r?t.ok:t.fail,l=t.resolve,c=t.reject,u=t.domain;try{s?(r||(2==e._h&&Er(e),e._h=1),!0===s?n=i:(u&&u.enter(),n=s(i),u&&(u.exit(),o=!0)),n===t.promise?c(ur("Promise-chain cycle")):(a=br(n))?a.call(n,l,c):l(n)):c(i)}catch(e){u&&!o&&u.exit(),c(e)}};n.length>a;)o(n[a++]);e._c=[],e._n=!1,t&&!e._h&&kr(e)})}},kr=function(e){lr.call(l,function(){var t,n,i,r=e._v,a=Tr(e);if(a&&(t=ir(function(){mr?hr.emit("unhandledRejection",r,e):(n=l.onunhandledrejection)?n({promise:e,reason:r}):(i=l.console)&&i.error&&i.error("Unhandled promise rejection",r)}),e._h=mr||Tr(e)?2:1),e._a=void 0,a&&t.e)throw t.v})},Tr=function(e){return 1!==e._h&&0===(e._a||e._c).length},Er=function(e){lr.call(l,function(){var t;mr?hr.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})})},Sr=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),wr(t,!0))},Ar=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw ur("Promise can't be resolved itself");(t=br(e))?cr(function(){var i={_w:n,_d:!1};try{t.call(e,B(Ar,i,1),B(Sr,i,1))}catch(e){Sr.call(i,e)}}):(n._v=e,n._s=1,wr(n,!1))}catch(e){Sr.call({_w:n,_d:!1},e)}}};yr||(pr=function(e){si(this,pr,"Promise","_h"),V(e),Qi.call(this);try{e(B(Ar,this,1),B(Sr,this,1))}catch(e){Sr.call(this,e)}},(Qi=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=oi(pr.prototype,{then:function(e,t){var n=vr(Z(this,pr));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=mr?hr.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&wr(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),er=function(){var e=new Qi;this.promise=e,this.resolve=B(Ar,e,1),this.reject=B(Sr,e,1)},nr.f=vr=function(e){return e===pr||e===tr?new er(e):Zi(e)}),W(W.G+W.W+W.F*!yr,{Promise:pr}),Fe(pr,"Promise"),sr("Promise"),tr=s.Promise,W(W.S+W.F*!yr,"Promise",{reject:function(e){var t=vr(this);return(0,t.reject)(e),t.promise}}),W(W.S+W.F*!yr,"Promise",{resolve:function(n){return function(n,i){if(t(n),e(i)&&i.constructor===n)return i;var r=nr.f(n);return(0,r.resolve)(i),r.promise}(this,n)}}),W(W.S+W.F*!(yr&&Sn(function(e){pr.all(e).catch(gr)})),"Promise",{all:function(e){var t=this,n=vr(t),i=n.resolve,r=n.reject,a=ir(function(){var n=[],a=0,o=1;li(e,!1,function(e){var s=a++,l=!1;n.push(void 0),o++,t.resolve(e).then(function(e){l||(l=!0,n[s]=e,--o||i(n))},r)}),--o||i(n)});return a.e&&r(a.v),n.promise},race:function(e){var t=this,n=vr(t),i=n.reject,r=ir(function(){li(e,!1,function(e){t.resolve(e).then(n.resolve,i)})});return r.e&&i(r.v),n.promise}});var Pr="".startsWith;W(W.P+W.F*ti("startsWith"),"String",{startsWith:function(e){var t=Zn(this,e,"startsWith"),n=se(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),i=String(e);return Pr?Pr.call(t,i,n):t.slice(n,n+i.length)===i}});var Cr=function(e){return null!=e?e.constructor:null},_r=function(e,t){return Boolean(e&&t&&e instanceof t)},xr=function(e){return null==e},Nr=function(e){return Cr(e)===Object},Ir=function(e){return Cr(e)===String},Mr=function(e){return Array.isArray(e)},Or=function(e){return _r(e,NodeList)},Lr=function(e){return xr(e)||(Ir(e)||Mr(e)||Or(e))&&!e.length||Nr(e)&&!Object.keys(e).length},jr={nullOrUndefined:xr,object:Nr,number:function(e){return Cr(e)===Number&&!Number.isNaN(e)},string:Ir,boolean:function(e){return Cr(e)===Boolean},function:function(e){return Cr(e)===Function},array:Mr,weakMap:function(e){return _r(e,WeakMap)},nodeList:Or,element:function(e){return _r(e,Element)},textNode:function(e){return Cr(e)===Text},event:function(e){return _r(e,Event)},keyboardEvent:function(e){return _r(e,KeyboardEvent)},cue:function(e){return _r(e,window.TextTrackCue)||_r(e,window.VTTCue)},track:function(e){return _r(e,TextTrack)||!xr(e)&&Ir(e.kind)},promise:function(e){return _r(e,Promise)},url:function(e){if(_r(e,window.URL))return!0;if(!Ir(e))return!1;var t=e;e.startsWith("http://")&&e.startsWith("https://")||(t="http://".concat(e));try{return!Lr(new URL(t).hostname)}catch(e){return!1}},empty:Lr},Rr=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 Fr(e,t,n){var i=this,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(e&&"addEventListener"in e&&!jr.empty(t)&&jr.function(n)){var s=t.split(" "),l=o;Rr&&(l={passive:a,capture:o}),s.forEach(function(t){i&&i.eventListeners&&r&&i.eventListeners.push({element:e,type:t,callback:n,options:l}),e[r?"addEventListener":"removeEventListener"](t,n,l)})}}function Dr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Fr.call(this,e,t,n,!0,i,r)}function qr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Fr.call(this,e,t,n,!1,i,r)}function Hr(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Fr.call(this,e,n,function o(){qr(e,n,o,r,a);for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];i.apply(t,l)},!0,r,a)}function Vr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(jr.element(e)&&!jr.empty(t)){var r=new CustomEvent(t,{bubbles:n,detail:Object.assign({},i,{plyr:this})});e.dispatchEvent(r)}}function Br(e,t){var n=e.length?e:[e];Array.from(n).reverse().forEach(function(e,n){var i=n>0?t.cloneNode(!0):t,r=e.parentNode,a=e.nextSibling;i.appendChild(e),a?r.insertBefore(i,a):r.appendChild(i)})}function Ur(e,t){jr.element(e)&&!jr.empty(t)&&Object.entries(t).filter(function(e){var t=gt(e,2)[1];return!jr.nullOrUndefined(t)}).forEach(function(t){var n=gt(t,2),i=n[0],r=n[1];return e.setAttribute(i,r)})}function Wr(e,t,n){var i=document.createElement(e);return jr.object(t)&&Ur(i,t),jr.string(n)&&(i.innerText=n),i}function zr(e,t,n,i){jr.element(t)&&t.appendChild(Wr(e,n,i))}function Kr(e){jr.nodeList(e)||jr.array(e)?Array.from(e).forEach(Kr):jr.element(e)&&jr.element(e.parentNode)&&e.parentNode.removeChild(e)}function Yr(e){if(jr.element(e))for(var t=e.childNodes.length;t>0;)e.removeChild(e.lastChild),t-=1}function Gr(e,t){return jr.element(t)&&jr.element(t.parentNode)&&jr.element(e)?(t.parentNode.replaceChild(e,t),e):null}function $r(e,t){if(!jr.string(e)||jr.empty(e))return{};var n={},i=t;return e.split(",").forEach(function(e){var t=e.trim(),r=t.replace(".",""),a=t.replace(/[[\]]/g,"").split("="),o=a[0],s=a.length>1?a[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":jr.object(i)&&jr.string(i.class)&&(i.class+=" ".concat(r)),n.class=r;break;case"#":n.id=t.replace("#","");break;case"[":n[o]=s}}),n}function Xr(e,t){if(jr.element(e)){var n=t;jr.boolean(n)||(n=!e.hidden),n?e.setAttribute("hidden",""):e.removeAttribute("hidden")}}function Jr(e,t,n){if(jr.nodeList(e))return Array.from(e).map(function(e){return Jr(e,t,n)});if(jr.element(e)){var i="toggle";return void 0!==n&&(i=n?"add":"remove"),e.classList[i](t),e.classList.contains(t)}return!1}function Qr(e,t){return jr.element(e)&&e.classList.contains(t)}function Zr(e,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t)}function ea(e){return this.elements.container.querySelectorAll(e)}function ta(e){return this.elements.container.querySelector(e)}function na(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];jr.element(e)&&(e.focus({preventScroll:!0}),t&&Jr(e,this.config.classNames.tabFocus))}var ia,ra,aa,oa=(ia=document.createElement("span"),ra={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},aa=Object.keys(ra).find(function(e){return void 0!==ia.style[e]}),!!jr.string(aa)&&ra[aa]);function sa(e){setTimeout(function(){try{Xr(e,!0),e.offsetHeight,Xr(e,!1)}catch(e){}},0)}var la,ca={isIE:!!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:/(iPad|iPhone|iPod)/gi.test(navigator.platform)},ua={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},ha={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(e,t,n){var i=ca.isIPhone&&n&&ha.playsinline,r=ha[e]||"html5"!==t;return{api:r,ui:r&&ha.rangeInput&&("video"!==e||!ca.isIPhone||i)}},pip:!(ca.isIPhone||!jr.function(Wr("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||Wr("video").disablePictureInPicture)),airplay:jr.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(e){if(jr.empty(e))return!1;var t=gt(e.split("/"),1)[0],n=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(ua).includes(n)&&(n+='; codecs="'.concat(ua[e],'"'));try{return Boolean(n&&this.media.canPlayType(n).replace(/no/,""))}catch(e){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(la=document.createElement("input"),la.type="range","range"===la.type),touch:"ontouchstart"in document.documentElement,transitions:!1!==oa,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},da={getSources:function(){var e=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(function(t){var n=t.getAttribute("type");return!!jr.empty(n)||ha.mime.call(e,n)}):[]},getQualityOptions:function(){return da.getSources.call(this).map(function(e){return Number(e.getAttribute("size"))}).filter(Boolean)},extend:function(){if(this.isHTML5){var e=this;Object.defineProperty(e.media,"quality",{get:function(){var t=da.getSources.call(e).find(function(t){return t.getAttribute("src")===e.source});return t&&Number(t.getAttribute("size"))},set:function(t){var n=da.getSources.call(e).find(function(e){return Number(e.getAttribute("size"))===t});if(n){var i=e.media,r=i.currentTime,a=i.paused,o=i.preload,s=i.readyState;e.media.src=n.getAttribute("src"),("none"!==o||s)&&(e.once("loadedmetadata",function(){e.currentTime=r,a||e.play()}),e.media.load()),Vr.call(e,e.media,"qualitychange",!1,{quality:t})}}})}},cancelRequests:function(){this.isHTML5&&(Kr(da.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function fa(e){return jr.array(e)?e.filter(function(t,n){return e.indexOf(t)===n}):e}function pa(e,t){return t.split(".").reduce(function(e,t){return e&&e[t]},e)}function ma(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(!n.length)return e;var r=n.shift();return jr.object(r)?(Object.keys(r).forEach(function(t){jr.object(r[t])?(Object.keys(e).includes(t)||Object.assign(e,mt({},t,{})),ma(e[t],r[t])):Object.assign(e,mt({},t,r[t]))}),ma.apply(void 0,[e].concat(n))):e}var ga=L.f,va=It.f,ya=l.RegExp,ba=ya,wa=ya.prototype,ka=/a/g,Ta=/a/g,Ea=new ya(ka)!==ka;if(C&&(!Ea||P(function(){return Ta[f("match")]=!1,ya(ka)!=ka||ya(Ta)==Ta||"/a/i"!=ya(ka,"i")}))){ya=function(e,t){var n=this instanceof ya,i=J(e),r=void 0===t;return!n&&i&&e.constructor===ya&&r?e:Mn(Ea?new ba(i&&!r?e.source:e,t):ba((i=e instanceof ya)?e.source:e,i&&r?b.call(e):t),n?this:wa,ya)};for(var Sa=function(e){e in ya||ga(ya,e,{configurable:!0,get:function(){return ba[e]},set:function(t){ba[e]=t}})},Aa=va(ba),Pa=0;Aa.length>Pa;)Sa(Aa[Pa++]);wa.constructor=ya,ya.prototype=wa,H(l,"RegExp",ya)}function Ca(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return jr.empty(e)?e:e.toString().replace(/{(\d+)}/g,function(e,t){return n[t].toString()})}function _a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1"),"g"),n.toString())}function xa(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString().replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})}function Na(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(e=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return e=_a(e,"-"," "),e=_a(e,"_"," "),_a(e=xa(e)," ","")}(e)).charAt(0).toLowerCase()+e.slice(1)}function Ia(e){var t=document.createElement("div");return t.appendChild(e),t.innerHTML}sr("RegExp");var Ma={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Oa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(jr.empty(e)||jr.empty(t))return"";var n=pa(t.i18n,e);if(jr.empty(n))return Object.keys(Ma).includes(e)?Ma[e]:"";var i={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(i).forEach(function(e){var t=gt(e,2),i=t[0],r=t[1];n=_a(n,i,r)}),n},La=function(){function e(t){dt(this,e),this.enabled=t.config.storage.enabled,this.key=t.config.storage.key}return pt(e,[{key:"get",value:function(t){if(!e.supported||!this.enabled)return null;var n=window.localStorage.getItem(this.key);if(jr.empty(n))return null;var i=JSON.parse(n);return jr.string(t)&&t.length?i[t]:i}},{key:"set",value:function(t){if(e.supported&&this.enabled&&jr.object(t)){var n=this.get();jr.empty(n)&&(n={}),ma(n,t),window.localStorage.setItem(this.key,JSON.stringify(n))}}}],[{key:"supported",get:function(){try{if(!("localStorage"in window))return!1;return window.localStorage.setItem("___test","___test"),window.localStorage.removeItem("___test"),!0}catch(e){return!1}}}]),e}();function ja(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise(function(n,i){try{var r=new XMLHttpRequest;if(!("withCredentials"in r))return;r.addEventListener("load",function(){if("text"===t)try{n(JSON.parse(r.responseText))}catch(e){n(r.responseText)}else n(r.response)}),r.addEventListener("error",function(){throw new Error(r.status)}),r.open("GET",e,!0),r.responseType=t,r.send()}catch(e){i(e)}})}function Ra(e,t){if(jr.string(e)){var n=jr.string(t),i=function(){return null!==document.getElementById(t)},r=function(e,t){e.innerHTML=t,n&&i()||document.body.insertAdjacentElement("afterbegin",e)};if(!n||!i()){var a=La.supported,o=document.createElement("div");if(o.setAttribute("hidden",""),n&&o.setAttribute("id",t),a){var s=window.localStorage.getItem("".concat("cache","-").concat(t));if(null!==s){var l=JSON.parse(s);r(o,l.content)}}ja(e).then(function(e){jr.empty(e)||(a&&window.localStorage.setItem("".concat("cache","-").concat(t),JSON.stringify({content:e})),r(o,e))}).catch(function(){})}}}W(W.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}});var Fa=function(e){return Math.trunc(e/60/60%60,10)},Da=function(e){return Math.trunc(e/60%60,10)},qa=function(e){return Math.trunc(e%60,10)};function Ha(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!jr.number(e))return Ha(null,t,n);var i=function(e){return"0".concat(e).slice(-2)},r=Fa(e),a=Da(e),o=qa(e);return r=t||r>0?"".concat(r,":"):"","".concat(n&&e>0?"-":"").concat(r).concat(i(a),":").concat(i(o))}var Va={getIconUrl:function(){var e=new URL(this.config.iconUrl,window.location).host!==window.location.host||ca.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:e}},findElements:function(){try{return this.elements.controls=ta.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:ea.call(this,this.config.selectors.buttons.play),pause:ta.call(this,this.config.selectors.buttons.pause),restart:ta.call(this,this.config.selectors.buttons.restart),rewind:ta.call(this,this.config.selectors.buttons.rewind),fastForward:ta.call(this,this.config.selectors.buttons.fastForward),mute:ta.call(this,this.config.selectors.buttons.mute),pip:ta.call(this,this.config.selectors.buttons.pip),airplay:ta.call(this,this.config.selectors.buttons.airplay),settings:ta.call(this,this.config.selectors.buttons.settings),captions:ta.call(this,this.config.selectors.buttons.captions),fullscreen:ta.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=ta.call(this,this.config.selectors.progress),this.elements.inputs={seek:ta.call(this,this.config.selectors.inputs.seek),volume:ta.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:ta.call(this,this.config.selectors.display.buffer),currentTime:ta.call(this,this.config.selectors.display.currentTime),duration:ta.call(this,this.config.selectors.display.duration)},jr.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(this.config.classNames.tooltip))),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon:function(e,t){var n=Va.getIconUrl.call(this),i="".concat(n.cors?"":n.url,"#").concat(this.config.iconPrefix),r=document.createElementNS("http://www.w3.org/2000/svg","svg");Ur(r,ma(t,{role:"presentation",focusable:"false"}));var a=document.createElementNS("http://www.w3.org/2000/svg","use"),o="".concat(i,"-").concat(e);return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",o),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o),r.appendChild(a),r},createLabel:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Oa(e,this.config);return Wr("span",Object.assign({},t,{class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")}),n)},createBadge:function(e){if(jr.empty(e))return null;var t=Wr("span",{class:this.config.classNames.menu.value});return t.appendChild(Wr("span",{class:this.config.classNames.menu.badge},e)),t},createButton:function(e,t){var n=Object.assign({},t),i=Na(e),r={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(function(e){Object.keys(n).includes(e)&&(r[e]=n[e],delete n[e])}),"button"!==r.element||Object.keys(n).includes("type")||(n.type="button"),Object.keys(n).includes("class")?n.class.includes(this.config.classNames.control)||(n.class+=" ".concat(this.config.classNames.control)):n.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":n.class+=" ".concat(this.config.classNames.control,"--overlaid"),i="play",r.label="play",r.icon="play";break;default:jr.empty(r.label)&&(r.label=i),jr.empty(r.icon)&&(r.icon=e)}var a=Wr(r.element);return r.toggle?(a.appendChild(Va.createIcon.call(this,r.iconPressed,{class:"icon--pressed"})),a.appendChild(Va.createIcon.call(this,r.icon,{class:"icon--not-pressed"})),a.appendChild(Va.createLabel.call(this,r.labelPressed,{class:"label--pressed"})),a.appendChild(Va.createLabel.call(this,r.label,{class:"label--not-pressed"}))):(a.appendChild(Va.createIcon.call(this,r.icon)),a.appendChild(Va.createLabel.call(this,r.label))),ma(n,$r(this.config.selectors.buttons[i],n)),Ur(a,n),"play"===i?(jr.array(this.elements.buttons[i])||(this.elements.buttons[i]=[]),this.elements.buttons[i].push(a)):this.elements.buttons[i]=a,a},createRange:function(e,t){var n=Wr("input",ma($r(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Oa(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=n,Va.updateRangeFill.call(this,n),ji.setup(n),n},createProgress:function(e,t){var n=Wr("progress",ma($r(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if("volume"!==e){n.appendChild(Wr("span",null,"0"));var i={played:"played",buffer:"buffered"}[e],r=i?Oa(i,this.config):"";n.innerText="% ".concat(r.toLowerCase())}return this.elements.display[e]=n,n},createTime:function(e){var t=$r(this.config.selectors.display[e]),n=Wr("div",ma(t,{class:"".concat(this.config.classNames.display.time," ").concat(t.class?t.class:"").trim(),"aria-label":Oa(e,this.config)}),"00:00");return this.elements.display[e]=n,n},bindMenuItemShortcuts:function(e,t){var n=this;Dr(e,"keydown keyup",function(i){if([32,38,39,40].includes(i.which)&&(i.preventDefault(),i.stopPropagation(),"keydown"!==i.type)){var r,a=Zr(e,'[role="menuitemradio"]');if(!a&&[32,39].includes(i.which))Va.showMenuPanel.call(n,t,!0);else 32!==i.which&&(40===i.which||a&&39===i.which?(r=e.nextElementSibling,jr.element(r)||(r=e.parentNode.firstElementChild)):(r=e.previousElementSibling,jr.element(r)||(r=e.parentNode.lastElementChild)),na.call(n,r,!0))}},!1),Dr(e,"keyup",function(e){13===e.which&&Va.focusFirstMenuItem.call(n,null,!0)})},createMenuItem:function(e){var t=this,n=e.value,i=e.list,r=e.type,a=e.title,o=e.badge,s=void 0===o?null:o,l=e.checked,c=void 0!==l&&l,u=$r(this.config.selectors.inputs[r]),h=Wr("button",ma(u,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(u.class?u.class:"").trim(),"aria-checked":c,value:n})),d=Wr("span");d.innerHTML=a,jr.element(s)&&d.appendChild(s),h.appendChild(d),Object.defineProperty(h,"checked",{enumerable:!0,get:function(){return"true"===h.getAttribute("aria-checked")},set:function(e){e&&Array.from(h.parentNode.children).filter(function(e){return Zr(e,'[role="menuitemradio"]')}).forEach(function(e){return e.setAttribute("aria-checked","false")}),h.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(h,"click keyup",function(e){if(!jr.keyboardEvent(e)||32===e.which){switch(e.preventDefault(),e.stopPropagation(),h.checked=!0,r){case"language":t.currentTrack=Number(n);break;case"quality":t.quality=n;break;case"speed":t.speed=parseFloat(n)}Va.showMenuPanel.call(t,"home",jr.keyboardEvent(e))}},r,!1),Va.bindMenuItemShortcuts.call(this,h,r),i.appendChild(h)},formatTime:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return jr.number(e)?Ha(e,Fa(this.duration)>0,t):e},updateTimeDisplay:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];jr.element(e)&&jr.number(t)&&(e.innerText=Va.formatTime(t,n))},updateVolume:function(){this.supported.ui&&(jr.element(this.elements.inputs.volume)&&Va.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),jr.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;jr.element(e)&&(e.value=t,Va.updateRangeFill.call(this,e))},updateProgress:function(e){var t=this;if(this.supported.ui&&jr.event(e)){var n,i,r=0;if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":n=this.currentTime,i=this.duration,r=0===n||0===i||Number.isNaN(n)||Number.isNaN(i)?0:(n/i*100).toFixed(2),"timeupdate"===e.type&&Va.setRange.call(this,this.elements.inputs.seek,r);break;case"playing":case"progress":!function(e,n){var i=jr.number(n)?n:0,r=jr.element(e)?e:t.elements.display.buffer;if(jr.element(r)){r.value=i;var a=r.getElementsByTagName("span")[0];jr.element(a)&&(a.childNodes[0].nodeValue=i)}}(this.elements.display.buffer,100*this.buffered)}}},updateRangeFill:function(e){var t=jr.event(e)?e.target:e;if(jr.element(t)&&"range"===t.getAttribute("type")){if(Zr(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);var n=Va.formatTime(this.currentTime),i=Va.formatTime(this.duration),r=Oa("seekLabel",this.config);t.setAttribute("aria-valuetext",r.replace("{currentTime}",n).replace("{duration}",i))}else if(Zr(t,this.config.selectors.inputs.volume)){var a=100*t.value;t.setAttribute("aria-valuenow",a),t.setAttribute("aria-valuetext","".concat(a.toFixed(1),"%"))}else t.setAttribute("aria-valuenow",t.value);ca.isWebkit&&t.style.setProperty("--value","".concat(t.value/t.max*100,"%"))}},updateSeekTooltip:function(e){var t=this;if(this.config.tooltips.seek&&jr.element(this.elements.inputs.seek)&&jr.element(this.elements.display.seekTooltip)&&0!==this.duration){var n=0,i=this.elements.progress.getBoundingClientRect(),r="".concat(this.config.classNames.tooltip,"--visible"),a=function(e){Jr(t.elements.display.seekTooltip,r,e)};if(this.touch)a(!1);else{if(jr.event(e))n=100/i.width*(e.pageX-i.left);else{if(!Qr(this.elements.display.seekTooltip,r))return;n=parseFloat(this.elements.display.seekTooltip.style.left,10)}n<0?n=0:n>100&&(n=100),Va.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*n),this.elements.display.seekTooltip.style.left="".concat(n,"%"),jr.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&a("mouseenter"===e.type)}}},timeUpdate:function(e){var t=!jr.element(this.elements.display.duration)&&this.config.invertTime;Va.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||Va.updateProgress.call(this,e)},durationUpdate:function(){if(this.supported.ui&&(this.config.invertTime||!this.currentTime)){if(this.duration>=Math.pow(2,32))return Xr(this.elements.display.currentTime,!0),void Xr(this.elements.progress,!0);jr.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);var e=jr.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&Va.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&Va.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),Va.updateSeekTooltip.call(this)}},toggleMenuButton:function(e,t){Xr(this.elements.settings.buttons[e],!t)},updateSetting:function(e,t,n){var i=this.elements.settings.panels[e],r=null,a=t;if("captions"===e)r=this.currentTrack;else{if(r=jr.empty(n)?this[e]:n,jr.empty(r)&&(r=this.config[e].default),!jr.empty(this.options[e])&&!this.options[e].includes(r))return void this.debug.warn("Unsupported value of '".concat(r,"' for ").concat(e));if(!this.config[e].options.includes(r))return void this.debug.warn("Disabled value of '".concat(r,"' for ").concat(e))}if(jr.element(a)||(a=i&&i.querySelector('[role="menu"]')),jr.element(a)){this.elements.settings.buttons[e].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=Va.getLabel.call(this,e,r);var o=a&&a.querySelector('[value="'.concat(r,'"]'));jr.element(o)&&(o.checked=!0)}},getLabel:function(e,t){switch(e){case"speed":return 1===t?Oa("normal",this.config):"".concat(t,"×");case"quality":if(jr.number(t)){var n=Oa("qualityLabel.".concat(t),this.config);return n.length?n:"".concat(t,"p")}return xa(t);case"captions":return Wa.getLabel.call(this);default:return null}},setQualityMenu:function(e){var t=this;if(jr.element(this.elements.settings.panels.quality)){var n=this.elements.settings.panels.quality.querySelector('[role="menu"]');jr.array(e)&&(this.options.quality=fa(e).filter(function(e){return t.config.quality.options.includes(e)}));var i=!jr.empty(this.options.quality)&&this.options.quality.length>1;if(Va.toggleMenuButton.call(this,"quality",i),Yr(n),Va.checkMenu.call(this),i){var r=function(e){var n=Oa("qualityBadge.".concat(e),t.config);return n.length?Va.createBadge.call(t,n):null};this.options.quality.sort(function(e,n){var i=t.config.quality.options;return i.indexOf(e)>i.indexOf(n)?1:-1}).forEach(function(e){Va.createMenuItem.call(t,{value:e,list:n,type:"quality",title:Va.getLabel.call(t,"quality",e),badge:r(e)})}),Va.updateSetting.call(this,"quality",n)}}},setCaptionsMenu:function(){var e=this;if(jr.element(this.elements.settings.panels.captions)){var t=this.elements.settings.panels.captions.querySelector('[role="menu"]'),n=Wa.getTracks.call(this),i=Boolean(n.length);if(Va.toggleMenuButton.call(this,"captions",i),Yr(t),Va.checkMenu.call(this),i){var r=n.map(function(n,i){return{value:i,checked:e.captions.toggled&&e.currentTrack===i,title:Wa.getLabel.call(e,n),badge:n.language&&Va.createBadge.call(e,n.language.toUpperCase()),list:t,type:"language"}});r.unshift({value:-1,checked:!this.captions.toggled,title:Oa("disabled",this.config),list:t,type:"language"}),r.forEach(Va.createMenuItem.bind(this)),Va.updateSetting.call(this,"captions",t)}}},setSpeedMenu:function(e){var t=this;if(jr.element(this.elements.settings.panels.speed)){var n=this.elements.settings.panels.speed.querySelector('[role="menu"]');jr.array(e)?this.options.speed=e:(this.isHTML5||this.isVimeo)&&(this.options.speed=[.5,.75,1,1.25,1.5,1.75,2]),this.options.speed=this.options.speed.filter(function(e){return t.config.speed.options.includes(e)});var i=!jr.empty(this.options.speed)&&this.options.speed.length>1;Va.toggleMenuButton.call(this,"speed",i),Yr(n),Va.checkMenu.call(this),i&&(this.options.speed.forEach(function(e){Va.createMenuItem.call(t,{value:e,list:n,type:"speed",title:Va.getLabel.call(t,"speed",e)})}),Va.updateSetting.call(this,"speed",n))}},checkMenu:function(){var e=this.elements.settings.buttons,t=!jr.empty(e)&&Object.values(e).some(function(e){return!e.hidden});Xr(this.elements.settings.menu,!t)},focusFirstMenuItem:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.elements.settings.popup.hidden){var n=e;jr.element(n)||(n=Object.values(this.elements.settings.panels).find(function(e){return!e.hidden}));var i=n.querySelector('[role^="menuitem"]');na.call(this,i,t)}},toggleMenu:function(e){var t=this.elements.settings.popup,n=this.elements.buttons.settings;if(jr.element(t)&&jr.element(n)){var i=t.hidden,r=i;if(jr.boolean(e))r=e;else if(jr.keyboardEvent(e)&&27===e.which)r=!1;else if(jr.event(e)){var a=t.contains(e.target);if(a||!a&&e.target!==n&&r)return}n.setAttribute("aria-expanded",r),Xr(t,!r),Jr(this.elements.container,this.config.classNames.menu.open,r),r&&jr.keyboardEvent(e)?Va.focusFirstMenuItem.call(this,null,!0):r||i||na.call(this,n,jr.keyboardEvent(e))}},getMenuSize:function(e){var t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);var n=t.scrollWidth,i=t.scrollHeight;return Kr(t),{width:n,height:i}},showMenuPanel:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=document.getElementById("plyr-settings-".concat(this.id,"-").concat(t));if(jr.element(i)){var r=i.parentNode,a=Array.from(r.children).find(function(e){return!e.hidden});if(ha.transitions&&!ha.reducedMotion){r.style.width="".concat(a.scrollWidth,"px"),r.style.height="".concat(a.scrollHeight,"px");var o=Va.getMenuSize.call(this,i);Dr.call(this,r,oa,function t(n){n.target===r&&["width","height"].includes(n.propertyName)&&(r.style.width="",r.style.height="",qr.call(e,r,oa,t))}),r.style.width="".concat(o.width,"px"),r.style.height="".concat(o.height,"px")}Xr(a,!0),Xr(i,!1),Va.focusFirstMenuItem.call(this,i,n)}},setDownloadLink:function(){var e=this.elements.buttons.download;jr.element(e)&&e.setAttribute("href",this.download)},create:function(e){var t=this,n=Wr("div",$r(this.config.selectors.controls.wrapper));if(this.config.controls.includes("restart")&&n.appendChild(Va.createButton.call(this,"restart")),this.config.controls.includes("rewind")&&n.appendChild(Va.createButton.call(this,"rewind")),this.config.controls.includes("play")&&n.appendChild(Va.createButton.call(this,"play")),this.config.controls.includes("fast-forward")&&n.appendChild(Va.createButton.call(this,"fast-forward")),this.config.controls.includes("progress")){var i=Wr("div",$r(this.config.selectors.progress));if(i.appendChild(Va.createRange.call(this,"seek",{id:"plyr-seek-".concat(e.id)})),i.appendChild(Va.createProgress.call(this,"buffer")),this.config.tooltips.seek){var r=Wr("span",{class:this.config.classNames.tooltip},"00:00");i.appendChild(r),this.elements.display.seekTooltip=r}this.elements.progress=i,n.appendChild(this.elements.progress)}if(this.config.controls.includes("current-time")&&n.appendChild(Va.createTime.call(this,"currentTime")),this.config.controls.includes("duration")&&n.appendChild(Va.createTime.call(this,"duration")),this.config.controls.includes("mute")||this.config.controls.includes("volume")){var a=Wr("div",{class:"plyr__volume"});if(this.config.controls.includes("mute")&&a.appendChild(Va.createButton.call(this,"mute")),this.config.controls.includes("volume")){var o={max:1,step:.05,value:this.config.volume};a.appendChild(Va.createRange.call(this,"volume",ma(o,{id:"plyr-volume-".concat(e.id)}))),this.elements.volume=a}n.appendChild(a)}if(this.config.controls.includes("captions")&&n.appendChild(Va.createButton.call(this,"captions")),this.config.controls.includes("settings")&&!jr.empty(this.config.settings)){var s=Wr("div",{class:"plyr__menu",hidden:""});s.appendChild(Va.createButton.call(this,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(e.id),"aria-expanded":!1}));var l=Wr("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(e.id),hidden:""}),c=Wr("div"),u=Wr("div",{id:"plyr-settings-".concat(e.id,"-home")}),h=Wr("div",{role:"menu"});u.appendChild(h),c.appendChild(u),this.elements.settings.panels.home=u,this.config.settings.forEach(function(n){var i=Wr("button",ma($r(t.config.selectors.buttons.settings),{type:"button",class:"".concat(t.config.classNames.control," ").concat(t.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));Va.bindMenuItemShortcuts.call(t,i,n),Dr(i,"click",function(){Va.showMenuPanel.call(t,n,!1)});var r=Wr("span",null,Oa(n,t.config)),a=Wr("span",{class:t.config.classNames.menu.value});a.innerHTML=e[n],r.appendChild(a),i.appendChild(r),h.appendChild(i);var o=Wr("div",{id:"plyr-settings-".concat(e.id,"-").concat(n),hidden:""}),s=Wr("button",{type:"button",class:"".concat(t.config.classNames.control," ").concat(t.config.classNames.control,"--back")});s.appendChild(Wr("span",{"aria-hidden":!0},Oa(n,t.config))),s.appendChild(Wr("span",{class:t.config.classNames.hidden},Oa("menuBack",t.config))),Dr(o,"keydown",function(e){37===e.which&&(e.preventDefault(),e.stopPropagation(),Va.showMenuPanel.call(t,"home",!0))},!1),Dr(s,"click",function(){Va.showMenuPanel.call(t,"home",!1)}),o.appendChild(s),o.appendChild(Wr("div",{role:"menu"})),c.appendChild(o),t.elements.settings.buttons[n]=i,t.elements.settings.panels[n]=o}),l.appendChild(c),s.appendChild(l),n.appendChild(s),this.elements.settings.popup=l,this.elements.settings.menu=s}if(this.config.controls.includes("pip")&&ha.pip&&n.appendChild(Va.createButton.call(this,"pip")),this.config.controls.includes("airplay")&&ha.airplay&&n.appendChild(Va.createButton.call(this,"airplay")),this.config.controls.includes("download")){var d={element:"a",href:this.download,target:"_blank"},f=this.config.urls.download;!jr.url(f)&&this.isEmbed&&ma(d,{icon:"logo-".concat(this.provider),label:this.provider}),n.appendChild(Va.createButton.call(this,"download",d))}return this.config.controls.includes("fullscreen")&&n.appendChild(Va.createButton.call(this,"fullscreen")),this.config.controls.includes("play-large")&&this.elements.container.appendChild(Va.createButton.call(this,"play-large")),this.elements.controls=n,this.isHTML5&&Va.setQualityMenu.call(this,da.getQualityOptions.call(this)),Va.setSpeedMenu.call(this),n},inject:function(){var e=this;if(this.config.loadSprite){var t=Va.getIconUrl.call(this);t.cors&&Ra(t.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var n=null;this.elements.controls=null;var i={id:this.id,seektime:this.config.seekTime,title:this.config.title},r=!0;jr.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,i)),this.config.controls||(this.config.controls=[]),jr.element(this.config.controls)||jr.string(this.config.controls)?n=this.config.controls:(n=Va.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Wa.getLabel.call(this)}),r=!1);var a,o=function(e){var t=e;return Object.entries(i).forEach(function(e){var n=gt(e,2),i=n[0],r=n[1];t=_a(t,"{".concat(i,"}"),r)}),t};if(r&&(jr.string(this.config.controls)?n=o(n):jr.element(n)&&(n.innerHTML=o(n.innerHTML))),jr.string(this.config.selectors.controls.container)&&(a=document.querySelector(this.config.selectors.controls.container)),jr.element(a)||(a=this.elements.container),a[jr.element(n)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",n),jr.element(this.elements.controls)||Va.findElements.call(this),!jr.empty(this.elements.buttons)){var s=function(t){var n=e.config.classNames.controlPressed;Object.defineProperty(t,"pressed",{enumerable:!0,get:function(){return Qr(t,n)},set:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Jr(t,n,e)}})};Object.values(this.elements.buttons).filter(Boolean).forEach(function(e){jr.array(e)||jr.nodeList(e)?Array.from(e).filter(Boolean).forEach(s):s(e)})}if(ca.isEdge&&sa(a),this.config.tooltips.controls){var l=this.config,c=l.classNames,u=l.selectors,h="".concat(u.controls.wrapper," ").concat(u.labels," .").concat(c.hidden),d=ea.call(this,h);Array.from(d).forEach(function(t){Jr(t,e.config.classNames.hidden,!1),Jr(t,e.config.classNames.tooltip,!0)})}}};function Ba(e){var t=e;if(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]){var n=document.createElement("a");n.href=t,t=n.href}try{return new URL(t)}catch(e){return null}}function Ua(e){var t=new URLSearchParams;return jr.object(e)&&Object.entries(e).forEach(function(e){var n=gt(e,2),i=n[0],r=n[1];t.set(i,r)}),t}var Wa={setup:function(){if(this.supported.ui)if(!this.isVideo||this.isYouTube||this.isHTML5&&!ha.textTracks)jr.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Va.setCaptionsMenu.call(this);else{var e,t;if(jr.element(this.elements.captions)||(this.elements.captions=Wr("div",$r(this.config.selectors.captions)),e=this.elements.captions,t=this.elements.wrapper,jr.element(e)&&jr.element(t)&&t.parentNode.insertBefore(e,t.nextSibling)),ca.isIE&&window.URL){var n=this.media.querySelectorAll("track");Array.from(n).forEach(function(e){var t=e.getAttribute("src"),n=Ba(t);null!==n&&n.hostname!==window.location.href.hostname&&["http:","https:"].includes(n.protocol)&&ja(t,"blob").then(function(t){e.setAttribute("src",window.URL.createObjectURL(t))}).catch(function(){Kr(e)})})}var i=fa((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(function(e){return e.split("-")[0]})),r=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();if("auto"===r)r=gt(i,1)[0];var a=this.storage.get("captions");if(jr.boolean(a)||(a=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:a,language:r,languages:i}),this.isHTML5){var o=this.config.captions.update?"addtrack removetrack":"removetrack";Dr.call(this,this.media.textTracks,o,Wa.update.bind(this))}setTimeout(Wa.update.bind(this),0)}},update:function(){var e=this,t=Wa.getTracks.call(this,!0),n=this.captions,i=n.active,r=n.language,a=n.meta,o=n.currentTrackNode,s=Boolean(t.find(function(e){return e.language===r}));this.isHTML5&&this.isVideo&&t.filter(function(e){return!a.get(e)}).forEach(function(t){e.debug.log("Track added",t),a.set(t,{default:"showing"===t.mode}),t.mode="hidden",Dr.call(e,t,"cuechange",function(){return Wa.updateCues.call(e)})}),(s&&this.language!==r||!t.includes(o))&&(Wa.setLanguage.call(this,r),Wa.toggle.call(this,i&&s)),Jr(this.elements.container,this.config.classNames.captions.enabled,!jr.empty(t)),(this.config.controls||[]).includes("settings")&&this.config.settings.includes("captions")&&Va.setCaptionsMenu.call(this)},toggle:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.supported.ui){var n=this.captions.toggled,i=this.config.classNames.captions.active,r=jr.nullOrUndefined(e)?!n:e;if(r!==n){if(t||(this.captions.active=r,this.storage.set({captions:r})),!this.language&&r&&!t){var a=Wa.getTracks.call(this),o=Wa.findTrack.call(this,[this.captions.language].concat(vt(this.captions.languages)),!0);return this.captions.language=o.language,void Wa.set.call(this,a.indexOf(o))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=r),Jr(this.elements.container,i,r),this.captions.toggled=r,Va.updateSetting.call(this,"captions"),Vr.call(this,this.media,r?"captionsenabled":"captionsdisabled")}}},set:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Wa.getTracks.call(this);if(-1!==e)if(jr.number(e))if(e in n){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;var i=n[e],r=(i||{}).language;this.captions.currentTrackNode=i,Va.updateSetting.call(this,"captions"),t||(this.captions.language=r,this.storage.set({language:r})),this.isVimeo&&this.embed.enableTextTrack(r),Vr.call(this,this.media,"languagechange")}Wa.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&Wa.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else Wa.toggle.call(this,!1,t)},setLanguage:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(jr.string(e)){var n=e.toLowerCase();this.captions.language=n;var i=Wa.getTracks.call(this),r=Wa.findTrack.call(this,[n]);Wa.set.call(this,i.indexOf(r),t)}else this.debug.warn("Invalid language argument",e)},getTracks:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Array.from((this.media||{}).textTracks||[]).filter(function(n){return!e.isHTML5||t||e.captions.meta.has(n)}).filter(function(e){return["captions","subtitles"].includes(e.kind)})},findTrack:function(e){var t,n=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=Wa.getTracks.call(this),a=function(e){return Number((n.captions.meta.get(e)||{}).default)},o=Array.from(r).sort(function(e,t){return a(t)-a(e)});return e.every(function(e){return!(t=o.find(function(t){return t.language===e}))}),t||(i?o[0]:void 0)},getCurrentTrack:function(){return Wa.getTracks.call(this)[this.currentTrack]},getLabel:function(e){var t=e;return!jr.track(t)&&ha.textTracks&&this.captions.toggled&&(t=Wa.getCurrentTrack.call(this)),jr.track(t)?jr.empty(t.label)?jr.empty(t.language)?Oa("enabled",this.config):e.language.toUpperCase():t.label:Oa("disabled",this.config)},updateCues:function(e){if(this.supported.ui)if(jr.element(this.elements.captions))if(jr.nullOrUndefined(e)||Array.isArray(e)){var t=e;if(!t){var n=Wa.getCurrentTrack.call(this);t=Array.from((n||{}).activeCues||[]).map(function(e){return e.getCueAsHTML()}).map(Ia)}var i=t.map(function(e){return e.trim()}).join("\n");if(i!==this.elements.captions.innerHTML){Yr(this.elements.captions);var r=Wr("span",$r(this.config.selectors.caption));r.innerHTML=i,this.elements.captions.appendChild(r),Vr.call(this,this.media,"cuechange")}}else this.debug.warn("updateCues: Invalid input",e);else this.debug.warn("No captions element to render to")}},za={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:"16:9",clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.5.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]},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2]},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",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:"SD"}},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/v2/video/{0}.json"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://www.googleapis.com/youtube/v3/videos?id={0}&key={1}&fields=items(snippet(title))&part=snippet"},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",menu:{quality:".js-plyr__menu__list--quality"}},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",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",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"}},keys:{google:null},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1},youtube:{noCookie:!1,rel:0,showinfo:0,iv_load_policy:3,modestbranding:1}},Ka="picture-in-picture",Ya="inline",Ga={html5:"html5",youtube:"youtube",vimeo:"vimeo"},$a={audio:"audio",video:"video"};var Xa=function(){},Ja=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];dt(this,e),this.enabled=window.console&&t,this.enabled&&this.log("Debugging enabled")}return pt(e,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):Xa}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):Xa}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):Xa}}]),e}();function Qa(){if(this.enabled){var e=this.player.elements.buttons.fullscreen;jr.element(e)&&(e.pressed=this.active),Vr.call(this.player,this.target,this.active?"enterfullscreen":"exitfullscreen",!0),ca.isIos||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(jr.element(e)){var n=ea.call(this,"button:not(:disabled), input:not(:disabled), [tabindex]"),i=n[0],r=n[n.length-1];Fr.call(this,this.elements.container,"keydown",function(e){if("Tab"===e.key&&9===e.keyCode){var t=document.activeElement;t!==r||e.shiftKey?t===i&&e.shiftKey&&(r.focus(),e.preventDefault()):(i.focus(),e.preventDefault())}},t,!1)}}.call(this.player,this.target,this.active)}}function Za(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",Jr(this.target,this.player.config.classNames.fullscreen.fallback,t),ca.isIos){var n=document.head.querySelector('meta[name="viewport"]'),i="viewport-fit=cover";n||(n=document.createElement("meta")).setAttribute("name","viewport");var r=jr.string(n.content)&&n.content.includes(i);t?(this.cleanupViewport=!r,r||(n.content+=",".concat(i))):this.cleanupViewport&&(n.content=n.content.split(",").filter(function(e){return e.trim()!==i}).join(",")),setTimeout(function(){return sa(e.target)},100)}Qa.call(this)}var eo=function(){function e(t){var n=this;dt(this,e),this.player=t,this.prefix=e.prefix,this.property=e.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===t.config.fullscreen.fallback,Dr.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),function(){Qa.call(n)}),Dr.call(this.player,this.player.elements.container,"dblclick",function(e){jr.element(n.player.elements.controls)&&n.player.elements.controls.contains(e.target)||n.toggle()}),this.update()}return pt(e,[{key:"update",value:function(){var t;this.enabled?(t=this.forceFallback?"Fallback (forced)":e.native?"Native":"Fallback",this.player.debug.log("".concat(t," fullscreen enabled"))):this.player.debug.log("Fullscreen not supported and fallback disabled");Jr(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)}},{key:"enter",value:function(){this.enabled&&(ca.isIos&&this.player.config.fullscreen.iosNative?this.target.webkitEnterFullscreen():!e.native||this.forceFallback?Za.call(this,!0):this.prefix?jr.empty(this.prefix)||this.target["".concat(this.prefix,"Request").concat(this.property)]():this.target.requestFullscreen())}},{key:"exit",value:function(){if(this.enabled)if(ca.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),this.player.play();else if(!e.native||this.forceFallback)Za.call(this,!1);else if(this.prefix){if(!jr.empty(this.prefix)){var t="moz"===this.prefix?"Cancel":"Exit";document["".concat(this.prefix).concat(t).concat(this.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}},{key:"toggle",value:function(){this.active?this.exit():this.enter()}},{key:"usingNative",get:function(){return e.native&&!this.forceFallback}},{key:"enabled",get:function(){return(e.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){return!!this.enabled&&(!e.native||this.forceFallback?Qr(this.target,this.player.config.classNames.fullscreen.fallback):(this.prefix?document["".concat(this.prefix).concat(this.property,"Element")]:document.fullscreenElement)===this.target)}},{key:"target",get:function(){return ca.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.container}}],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(jr.function(document.exitFullscreen))return"";var e="";return["webkit","moz","ms"].some(function(t){return!(!jr.function(document["".concat(t,"ExitFullscreen")])&&!jr.function(document["".concat(t,"CancelFullScreen")]))&&(e=t,!0)}),e}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),e}(),to=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1};function no(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise(function(n,i){var r=new Image,a=function(){delete r.onload,delete r.onerror,(r.naturalWidth>=t?n:i)(r)};Object.assign(r,{onload:a,onerror:a,src:e})})}W(W.S,"Math",{sign:to});var io={addStyleHook:function(){Jr(this.elements.container,this.config.selectors.container.replace(".",""),!0),Jr(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var e=this;if(this.listeners.media(),!this.supported.ui)return this.debug.warn("Basic support only for ".concat(this.provider," ").concat(this.type)),void io.toggleNativeControls.call(this,!0);jr.element(this.elements.controls)||(Va.inject.call(this),this.listeners.controls()),io.toggleNativeControls.call(this),this.isHTML5&&Wa.setup.call(this),this.volume=null,this.muted=null,this.speed=null,this.loop=null,this.quality=null,Va.updateVolume.call(this),Va.timeUpdate.call(this),io.checkPlaying.call(this),Jr(this.elements.container,this.config.classNames.pip.supported,ha.pip&&this.isHTML5&&this.isVideo),Jr(this.elements.container,this.config.classNames.airplay.supported,ha.airplay&&this.isHTML5),Jr(this.elements.container,this.config.classNames.isIos,ca.isIos),Jr(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(function(){Vr.call(e,e.media,"ready")},0),io.setTitle.call(this),this.poster&&io.setPoster.call(this,this.poster,!1).catch(function(){}),this.config.duration&&Va.durationUpdate.call(this)},setTitle:function(){var e=Oa("play",this.config);if(jr.string(this.config.title)&&!jr.empty(this.config.title)&&(e+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach(function(t){t.setAttribute("aria-label",e)}),this.isEmbed){var t=ta.call(this,"iframe");if(!jr.element(t))return;var n=jr.empty(this.config.title)?"video":this.config.title,i=Oa("frameTitle",this.config);t.setAttribute("title",i.replace("{title}",n))}},togglePoster:function(e){Jr(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster:function(e){var t=this;return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]||!this.poster?(this.media.setAttribute("poster",e),function(){var e=this;return new Promise(function(t){return e.ready?setTimeout(t,0):Dr.call(e,e.elements.container,"ready",t)}).then(function(){})}.call(this).then(function(){return no(e)}).catch(function(n){throw e===t.poster&&io.togglePoster.call(t,!1),n}).then(function(){if(e!==t.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(function(){return Object.assign(t.elements.poster.style,{backgroundImage:"url('".concat(e,"')"),backgroundSize:""}),io.togglePoster.call(t,!0),e})):Promise.reject(new Error("Poster already set"))},checkPlaying:function(e){var t=this;Jr(this.elements.container,this.config.classNames.playing,this.playing),Jr(this.elements.container,this.config.classNames.paused,this.paused),Jr(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(function(e){e.pressed=t.playing}),jr.event(e)&&"timeupdate"===e.type||io.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(){Jr(t.elements.container,t.config.classNames.loading,t.loading),io.toggleControls.call(t)},this.loading?250:0)},toggleControls:function(e){var t=this.elements.controls;if(t&&this.config.hideControls){var n=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(e||this.loading||this.paused||t.pressed||t.hover||n))}}};function ro(e){var t=e;jr.string(t)||jr.nullOrUndefined(this.embed)||(t=this.embed.ratio),jr.string(t)||(t=this.config.ratio);var n=gt(t.split(":").map(Number),2),i=100/n[0]*n[1];if(this.elements.wrapper.style.paddingBottom="".concat(i,"%"),this.isVimeo&&this.supported.ui){var r=(240-i)/4.8;this.media.style.transform="translateY(-".concat(r,"%)")}return{padding:i,ratio:t}}var ao=function(){function e(t){dt(this,e),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)}return pt(e,[{key:"handleKey",value:function(e){var t=this.player,n=t.elements,i=e.keyCode?e.keyCode:e.which,r="keydown"===e.type,a=r&&i===this.lastKey;if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)&&jr.number(i)){if(r){var o=document.activeElement;if(jr.element(o)){var s=t.config.selectors.editable;if(o!==n.inputs.seek&&Zr(o,s))return;if(32===e.which&&Zr(o,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(i)&&(e.preventDefault(),e.stopPropagation()),i){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:a||(t.currentTime=t.duration/10*(i-48));break;case 32:case 75:a||t.togglePlay();break;case 38:t.increaseVolume(.1);break;case 40:t.decreaseVolume(.1);break;case 77:a||(t.muted=!t.muted);break;case 39:t.forward();break;case 37:t.rewind();break;case 70:t.fullscreen.toggle();break;case 67:a||t.toggleCaptions();break;case 76:t.loop=!t.loop}27===i&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null}}},{key:"toggleMenu",value:function(e){Va.toggleMenu.call(this.player,e)}},{key:"firstTouch",value:function(){var e=this.player,t=e.elements;e.touch=!0,Jr(t.container,e.config.classNames.isTouch,!0)}},{key:"setTabFocus",value:function(e){var t=this.player,n=t.elements;if(clearTimeout(this.focusTimer),"keydown"!==e.type||9===e.which){"keydown"===e.type&&(this.lastKeyDown=e.timeStamp);var i,r=e.timeStamp-this.lastKeyDown<=20;if("focus"!==e.type||r)i=t.config.classNames.tabFocus,Jr(ea.call(t,".".concat(i)),i,!1),this.focusTimer=setTimeout(function(){var e=document.activeElement;n.container.contains(e)&&Jr(document.activeElement,t.config.classNames.tabFocus,!0)},10)}}},{key:"global",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.player;t.config.keyboard.global&&Fr.call(t,window,"keydown keyup",this.handleKey,e,!1),Fr.call(t,document.body,"click",this.toggleMenu,e),Hr.call(t,document.body,"touchstart",this.firstTouch),Fr.call(t,document.body,"keydown focus blur",this.setTabFocus,e,!1,!0)}},{key:"container",value:function(){var e=this.player,t=e.config,n=e.elements,i=e.timers;!t.keyboard.global&&t.keyboard.focused&&Dr.call(e,n.container,"keydown keyup",this.handleKey,!1),Dr.call(e,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",function(t){var r=n.controls;r&&"enterfullscreen"===t.type&&(r.pressed=!1,r.hover=!1);var a=0;["touchstart","touchmove","mousemove"].includes(t.type)&&(io.toggleControls.call(e,!0),a=e.touch?3e3:2e3),clearTimeout(i.controls),i.controls=setTimeout(function(){return io.toggleControls.call(e,!1)},a)});var r=function(t){if(!t)return ro.call(e);var i=n.container.getBoundingClientRect(),r=i.width,a=i.height;return ro.call(e,"".concat(r,":").concat(a))},a=function(){window.clearTimeout(i.resized),i.resized=window.setTimeout(r,50)};Dr.call(e,n.container,"enterfullscreen exitfullscreen",function(t){var i=e.fullscreen,o=i.target,s=i.usingNative;if(e.isEmbed&&o===n.container){var l="enterfullscreen"===t.type,c=r(l);c.padding;!function(t,n,i){if(e.isVimeo){var r=e.elements.wrapper.firstChild,a=gt(t.split(":").map(Number),2)[1],o=gt(e.embed.ratio.split(":").map(Number),2),s=o[0],l=o[1];r.style.maxWidth=i?"".concat(a/l*s,"px"):null,r.style.margin=i?"0 auto":null}}(c.ratio,0,l),s||(l?Dr.call(e,window,"resize",a):qr.call(e,window,"resize",a))}})}},{key:"media",value:function(){var e=this,t=this.player,n=t.elements;if(Dr.call(t,t.media,"timeupdate seeking seeked",function(e){return Va.timeUpdate.call(t,e)}),Dr.call(t,t.media,"durationchange loadeddata loadedmetadata",function(e){return Va.durationUpdate.call(t,e)}),Dr.call(t,t.media,"canplay loadeddata",function(){Xr(n.volume,!t.hasAudio),Xr(n.buttons.mute,!t.hasAudio)}),Dr.call(t,t.media,"ended",function(){t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&t.restart()}),Dr.call(t,t.media,"progress playing seeking seeked",function(e){return Va.updateProgress.call(t,e)}),Dr.call(t,t.media,"volumechange",function(e){return Va.updateVolume.call(t,e)}),Dr.call(t,t.media,"playing play pause ended emptied timeupdate",function(e){return io.checkPlaying.call(t,e)}),Dr.call(t,t.media,"waiting canplay seeked playing",function(e){return io.checkLoading.call(t,e)}),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){var i=ta.call(t,".".concat(t.config.classNames.video));if(!jr.element(i))return;Dr.call(t,n.container,"click",function(r){([n.container,i].includes(r.target)||i.contains(r.target))&&(t.touch&&t.config.hideControls||(t.ended?(e.proxy(r,t.restart,"restart"),e.proxy(r,t.play,"play")):e.proxy(r,t.togglePlay,"play")))})}t.supported.ui&&t.config.disableContextMenu&&Dr.call(t,n.wrapper,"contextmenu",function(e){e.preventDefault()},!1),Dr.call(t,t.media,"volumechange",function(){t.storage.set({volume:t.volume,muted:t.muted})}),Dr.call(t,t.media,"ratechange",function(){Va.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),Dr.call(t,t.media,"qualitychange",function(e){Va.updateSetting.call(t,"quality",null,e.detail.quality)}),Dr.call(t,t.media,"ready qualitychange",function(){Va.setDownloadLink.call(t)});var r=t.config.events.concat(["keyup","keydown"]).join(" ");Dr.call(t,t.media,r,function(e){var i=e.detail,r=void 0===i?{}:i;"error"===e.type&&(r=t.media.error),Vr.call(t,n.container,e.type,!0,r)})}},{key:"proxy",value:function(e,t,n){var i=this.player,r=i.config.listeners[n],a=!0;jr.function(r)&&(a=r.call(i,e)),a&&jr.function(t)&&t.call(i,e)}},{key:"bind",value:function(e,t,n,i){var r=this,a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=this.player,s=o.config.listeners[i],l=jr.function(s);Dr.call(o,e,t,function(e){return r.proxy(e,n,i)},a&&!l)}},{key:"controls",value:function(){var e=this,t=this.player,n=t.elements,i=ca.isIE?"change":"input";if(n.buttons.play&&Array.from(n.buttons.play).forEach(function(n){e.bind(n,"click",t.togglePlay,"play")}),this.bind(n.buttons.restart,"click",t.restart,"restart"),this.bind(n.buttons.rewind,"click",t.rewind,"rewind"),this.bind(n.buttons.fastForward,"click",t.forward,"fastForward"),this.bind(n.buttons.mute,"click",function(){t.muted=!t.muted},"mute"),this.bind(n.buttons.captions,"click",function(){return t.toggleCaptions()}),this.bind(n.buttons.download,"click",function(){Vr.call(t,t.media,"download")},"download"),this.bind(n.buttons.fullscreen,"click",function(){t.fullscreen.toggle()},"fullscreen"),this.bind(n.buttons.pip,"click",function(){t.pip="toggle"},"pip"),this.bind(n.buttons.airplay,"click",t.airplay,"airplay"),this.bind(n.buttons.settings,"click",function(e){e.stopPropagation(),Va.toggleMenu.call(t,e)}),this.bind(n.buttons.settings,"keyup",function(e){var n=e.which;[13,32].includes(n)&&(13!==n?(e.preventDefault(),e.stopPropagation(),Va.toggleMenu.call(t,e)):Va.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(n.settings.menu,"keydown",function(e){27===e.which&&Va.toggleMenu.call(t,e)}),this.bind(n.inputs.seek,"mousedown mousemove",function(e){var t=n.progress.getBoundingClientRect(),i=100/t.width*(e.pageX-t.left);e.currentTarget.setAttribute("seek-value",i)}),this.bind(n.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",function(e){var n=e.currentTarget,i=e.keyCode?e.keyCode:e.which;if(!jr.keyboardEvent(e)||39===i||37===i){t.lastSeekTime=Date.now();var r=n.hasAttribute("play-on-seeked"),a=["mouseup","touchend","keyup"].includes(e.type);r&&a?(n.removeAttribute("play-on-seeked"),t.play()):!a&&t.playing&&(n.setAttribute("play-on-seeked",""),t.pause())}}),ca.isIos){var r=ea.call(t,'input[type="range"]');Array.from(r).forEach(function(t){return e.bind(t,i,function(e){return sa(e.target)})})}this.bind(n.inputs.seek,i,function(e){var n=e.currentTarget,i=n.getAttribute("seek-value");jr.empty(i)&&(i=n.value),n.removeAttribute("seek-value"),t.currentTime=i/n.max*t.duration},"seek"),this.bind(n.progress,"mouseenter mouseleave mousemove",function(e){return Va.updateSeekTooltip.call(t,e)}),this.bind(n.progress,"mousemove touchmove",function(e){var n=t.previewThumbnails;n&&n.loaded&&n.startMove(e)}),this.bind(n.progress,"mouseleave click",function(){var e=t.previewThumbnails;e&&e.loaded&&e.endMove(!1,!0)}),this.bind(n.progress,"mousedown touchstart",function(e){var n=t.previewThumbnails;n&&n.loaded&&n.startScrubbing(e)}),this.bind(n.progress,"mouseup touchend",function(e){var n=t.previewThumbnails;n&&n.loaded&&n.endScrubbing(e)}),ca.isWebkit&&Array.from(ea.call(t,'input[type="range"]')).forEach(function(n){e.bind(n,"input",function(e){return Va.updateRangeFill.call(t,e.target)})}),t.config.toggleInvert&&!jr.element(n.display.duration)&&this.bind(n.display.currentTime,"click",function(){0!==t.currentTime&&(t.config.invertTime=!t.config.invertTime,Va.timeUpdate.call(t))}),this.bind(n.inputs.volume,i,function(e){t.volume=e.target.value},"volume"),this.bind(n.controls,"mouseenter mouseleave",function(e){n.controls.hover=!t.touch&&"mouseenter"===e.type}),this.bind(n.controls,"mousedown mouseup touchstart touchend touchcancel",function(e){n.controls.pressed=["mousedown","touchstart"].includes(e.type)}),this.bind(n.controls,"focusin",function(){var n=t.config,i=t.elements,r=t.timers;Jr(i.controls,n.classNames.noTransition,!0),io.toggleControls.call(t,!0),setTimeout(function(){Jr(i.controls,n.classNames.noTransition,!1)},0);var a=e.touch?3e3:4e3;clearTimeout(r.controls),r.controls=setTimeout(function(){return io.toggleControls.call(t,!1)},a)}),this.bind(n.inputs.volume,"wheel",function(e){var n=e.webkitDirectionInvertedFromDevice,i=gt([e.deltaX,-e.deltaY].map(function(e){return n?-e:e}),2),r=i[0],a=i[1],o=Math.sign(Math.abs(r)>Math.abs(a)?r:a);t.increaseVolume(o/50);var s=t.media.volume;(1===o&&s<1||-1===o&&s>0)&&e.preventDefault()},"volume",!1)}}]),e}(),oo=o(function(e,t){e.exports=function(){var e=function(){},t={},n={},i={};function r(e,t){if(e){var r=i[e];if(n[e]=t,r)for(;r.length;)r[0](e,t),r.splice(0,1)}}function a(t,n){t.call&&(t={success:t}),n.length?(t.error||e)(n):(t.success||e)(t)}function o(t,n,i,r){var a,s,l=document,c=i.async,u=(i.numRetries||0)+1,h=i.before||e,d=t.replace(/^(css|img)!/,"");r=r||0,/(^css!|\.css$)/.test(t)?((s=l.createElement("link")).rel="stylesheet",s.href=d,(a="hideFocus"in s)&&s.relList&&(a=0,s.rel="preload",s.as="style")):/(^img!|\.(png|gif|jpg|svg)$)/.test(t)?(s=l.createElement("img")).src=d:((s=l.createElement("script")).src=t,s.async=void 0===c||c),s.onload=s.onerror=s.onbeforeload=function(e){var l=e.type[0];if(a)try{s.sheet.cssText.length||(l="e")}catch(e){18!=e.code&&(l="e")}if("e"==l){if((r+=1)<u)return o(t,n,i,r)}else if("preload"==s.rel&&"style"==s.as)return s.rel="stylesheet";n(t,l,e.defaultPrevented)},!1!==h(t,s)&&l.head.appendChild(s)}function s(e,n,i){var s,l;if(n&&n.trim&&(s=n),l=(s?i:n)||{},s){if(s in t)throw"LoadJS";t[s]=!0}function c(t,n){!function(e,t,n){var i,r,a=(e=e.push?e:[e]).length,s=a,l=[];for(i=function(e,n,i){if("e"==n&&l.push(e),"b"==n){if(!i)return;l.push(e)}--a||t(l)},r=0;r<s;r++)o(e[r],i,n)}(e,function(e){a(l,e),t&&a({success:t,error:n},e),r(s,e)},l)}if(l.returnPromise)return new Promise(c);c()}return s.ready=function(e,t){return function(e,t){e=e.push?e:[e];var r,a,o,s=[],l=e.length,c=l;for(r=function(e,n){n.length&&s.push(e),--c||t(s)};l--;)a=e[l],(o=n[a])?r(a,o):(i[a]=i[a]||[]).push(r)}(e,function(e){a(t,e)}),s},s.done=function(e){r(e,[])},s.reset=function(){t={},n={},i={}},s.isDefined=function(e){return e in t},s}()});function so(e){return new Promise(function(t,n){oo(e,{success:t,error:n})})}function lo(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,Vr.call(this,this.media,e?"play":"pause"))}var co={setup:function(){var e=this;Jr(this.elements.wrapper,this.config.classNames.embed,!0),ro.call(this),jr.object(window.Vimeo)?co.ready.call(this):so(this.config.urls.vimeo.sdk).then(function(){co.ready.call(e)}).catch(function(t){e.debug.warn("Vimeo API failed to load",t)})},ready:function(){var e=this,t=this,n=t.config.vimeo,i=Ua(ma({},{loop:t.config.loop.active,autoplay:t.autoplay,muted:t.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},n)),r=t.media.getAttribute("src");jr.empty(r)&&(r=t.media.getAttribute(t.config.attributes.embed.id));var a,o=(a=r,jr.empty(a)?null:jr.number(Number(a))?a:a.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:a),s=Wr("iframe"),l=Ca(t.config.urls.vimeo.iframe,o,i);s.setAttribute("src",l),s.setAttribute("allowfullscreen",""),s.setAttribute("allowtransparency",""),s.setAttribute("allow","autoplay");var c=Wr("div",{poster:t.poster,class:t.config.classNames.embedContainer});c.appendChild(s),t.media=Gr(c,t.media),ja(Ca(t.config.urls.vimeo.api,o),"json").then(function(e){if(!jr.empty(e)){var n=new URL(e[0].thumbnail_large);n.pathname="".concat(n.pathname.split("_")[0],".jpg"),io.setPoster.call(t,n.href).catch(function(){})}}),t.embed=new window.Vimeo.Player(s,{autopause:t.config.autopause,muted:t.muted}),t.media.paused=!0,t.media.currentTime=0,t.supported.ui&&t.embed.disableTextTrack(),t.media.play=function(){return lo.call(t,!0),t.embed.play()},t.media.pause=function(){return lo.call(t,!1),t.embed.pause()},t.media.stop=function(){t.pause(),t.currentTime=0};var u=t.media.currentTime;Object.defineProperty(t.media,"currentTime",{get:function(){return u},set:function(e){var n=t.embed,i=t.media,r=t.paused,a=t.volume,o=r&&!n.hasPlayed;i.seeking=!0,Vr.call(t,i,"seeking"),Promise.resolve(o&&n.setVolume(0)).then(function(){return n.setCurrentTime(e)}).then(function(){return o&&n.pause()}).then(function(){return o&&n.setVolume(a)}).catch(function(){})}});var h=t.config.speed.selected;Object.defineProperty(t.media,"playbackRate",{get:function(){return h},set:function(e){t.embed.setPlaybackRate(e).then(function(){h=e,Vr.call(t,t.media,"ratechange")}).catch(function(e){"Error"===e.name&&Va.setSpeedMenu.call(t,[])})}});var d=t.config.volume;Object.defineProperty(t.media,"volume",{get:function(){return d},set:function(e){t.embed.setVolume(e).then(function(){d=e,Vr.call(t,t.media,"volumechange")})}});var f=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return f},set:function(e){var n=!!jr.boolean(e)&&e;t.embed.setVolume(n?0:t.config.volume).then(function(){f=n,Vr.call(t,t.media,"volumechange")})}});var p,m=t.config.loop;Object.defineProperty(t.media,"loop",{get:function(){return m},set:function(e){var n=jr.boolean(e)?e:t.config.loop.active;t.embed.setLoop(n).then(function(){m=n})}}),t.embed.getVideoUrl().then(function(e){p=e,Va.setDownloadLink.call(t)}).catch(function(t){e.debug.warn(t)}),Object.defineProperty(t.media,"currentSrc",{get:function(){return p}}),Object.defineProperty(t.media,"ended",{get:function(){return t.currentTime===t.duration}}),Promise.all([t.embed.getVideoWidth(),t.embed.getVideoHeight()]).then(function(n){var i=gt(n,2),r=i[0],a=i[1];t.embed.ratio="".concat(r,":").concat(a),ro.call(e,t.embed.ratio)}),t.embed.setAutopause(t.config.autopause).then(function(e){t.config.autopause=e}),t.embed.getVideoTitle().then(function(n){t.config.title=n,io.setTitle.call(e)}),t.embed.getCurrentTime().then(function(e){u=e,Vr.call(t,t.media,"timeupdate")}),t.embed.getDuration().then(function(e){t.media.duration=e,Vr.call(t,t.media,"durationchange")}),t.embed.getTextTracks().then(function(e){t.media.textTracks=e,Wa.setup.call(t)}),t.embed.on("cuechange",function(e){var n=e.cues,i=(void 0===n?[]:n).map(function(e){return t=e.text,n=document.createDocumentFragment(),i=document.createElement("div"),n.appendChild(i),i.innerHTML=t,n.firstChild.innerText;var t,n,i});Wa.updateCues.call(t,i)}),t.embed.on("loaded",function(){(t.embed.getPaused().then(function(e){lo.call(t,!e),e||Vr.call(t,t.media,"playing")}),jr.element(t.embed.element)&&t.supported.ui)&&t.embed.element.setAttribute("tabindex",-1)}),t.embed.on("play",function(){lo.call(t,!0),Vr.call(t,t.media,"playing")}),t.embed.on("pause",function(){lo.call(t,!1)}),t.embed.on("timeupdate",function(e){t.media.seeking=!1,u=e.seconds,Vr.call(t,t.media,"timeupdate")}),t.embed.on("progress",function(e){t.media.buffered=e.percent,Vr.call(t,t.media,"progress"),1===parseInt(e.percent,10)&&Vr.call(t,t.media,"canplaythrough"),t.embed.getDuration().then(function(e){e!==t.media.duration&&(t.media.duration=e,Vr.call(t,t.media,"durationchange"))})}),t.embed.on("seeked",function(){t.media.seeking=!1,Vr.call(t,t.media,"seeked")}),t.embed.on("ended",function(){t.media.paused=!0,Vr.call(t,t.media,"ended")}),t.embed.on("error",function(e){t.media.error=e,Vr.call(t,t.media,"error")}),setTimeout(function(){return io.build.call(t)},0)}};function uo(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,Vr.call(this,this.media,e?"play":"pause"))}var ho={setup:function(){var e=this;Jr(this.elements.wrapper,this.config.classNames.embed,!0),ro.call(this),jr.object(window.YT)&&jr.function(window.YT.Player)?ho.ready.call(this):(so(this.config.urls.youtube.sdk).catch(function(t){e.debug.warn("YouTube API failed to load",t)}),window.onYouTubeReadyCallbacks=window.onYouTubeReadyCallbacks||[],window.onYouTubeReadyCallbacks.push(function(){ho.ready.call(e)}),window.onYouTubeIframeAPIReady=function(){window.onYouTubeReadyCallbacks.forEach(function(e){e()})})},getTitle:function(e){var t=this;if(jr.function(this.embed.getVideoData)){var n=this.embed.getVideoData().title;if(jr.empty(n))return this.config.title=n,void io.setTitle.call(this)}var i=this.config.keys.google;jr.string(i)&&!jr.empty(i)&&ja(Ca(this.config.urls.youtube.api,e,i)).then(function(e){jr.object(e)&&(t.config.title=e.items[0].snippet.title,io.setTitle.call(t))}).catch(function(){})},ready:function(){var e=this,t=e.media.getAttribute("id");if(jr.empty(t)||!t.startsWith("youtube-")){var n=e.media.getAttribute("src");jr.empty(n)&&(n=e.media.getAttribute(this.config.attributes.embed.id));var i,r,a=(i=n,jr.empty(i)?null:i.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:i),o=(r=e.provider,"".concat(r,"-").concat(Math.floor(1e4*Math.random()))),s=Wr("div",{id:o,poster:e.poster});e.media=Gr(s,e.media);var l=function(e){return"https://img.youtube.com/vi/".concat(a,"/").concat(e,"default.jpg")};no(l("maxres"),121).catch(function(){return no(l("sd"),121)}).catch(function(){return no(l("hq"))}).then(function(t){return io.setPoster.call(e,t.src)}).then(function(t){t.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")}).catch(function(){});var c=e.config.youtube;e.embed=new window.YT.Player(o,{videoId:a,host:c.noCookie?"https://www.youtube-nocookie.com":void 0,playerVars:ma({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui?0:1,disablekb:1,playsinline:e.config.fullscreen.iosNative?0:1,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},c),events:{onError:function(t){if(!e.media.error){var n=t.data,i={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."}[n]||"An unknown error occured";e.media.error={code:n,message:i},Vr.call(e,e.media,"error")}},onPlaybackRateChange:function(t){var n=t.target;e.media.playbackRate=n.getPlaybackRate(),Vr.call(e,e.media,"ratechange")},onReady:function(t){if(!jr.function(e.media.play)){var n=t.target;ho.getTitle.call(e,a),e.media.play=function(){uo.call(e,!0),n.playVideo()},e.media.pause=function(){uo.call(e,!1),n.pauseVideo()},e.media.stop=function(){n.stopVideo()},e.media.duration=n.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:function(){return Number(n.getCurrentTime())},set:function(t){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,Vr.call(e,e.media,"seeking"),n.seekTo(t)}}),Object.defineProperty(e.media,"playbackRate",{get:function(){return n.getPlaybackRate()},set:function(e){n.setPlaybackRate(e)}});var i=e.config.volume;Object.defineProperty(e.media,"volume",{get:function(){return i},set:function(t){i=t,n.setVolume(100*i),Vr.call(e,e.media,"volumechange")}});var r=e.config.muted;Object.defineProperty(e.media,"muted",{get:function(){return r},set:function(t){var i=jr.boolean(t)?t:r;r=i,n[i?"mute":"unMute"](),Vr.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:function(){return n.getVideoUrl()}}),Object.defineProperty(e.media,"ended",{get:function(){return e.currentTime===e.duration}}),e.options.speed=n.getAvailablePlaybackRates(),e.supported.ui&&e.media.setAttribute("tabindex",-1),Vr.call(e,e.media,"timeupdate"),Vr.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(function(){e.media.buffered=n.getVideoLoadedFraction(),(null===e.media.lastBuffered||e.media.lastBuffered<e.media.buffered)&&Vr.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,1===e.media.buffered&&(clearInterval(e.timers.buffering),Vr.call(e,e.media,"canplaythrough"))},200),setTimeout(function(){return io.build.call(e)},50)}},onStateChange:function(t){var n=t.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(t.data)&&(e.media.seeking=!1,Vr.call(e,e.media,"seeked")),t.data){case-1:Vr.call(e,e.media,"timeupdate"),e.media.buffered=n.getVideoLoadedFraction(),Vr.call(e,e.media,"progress");break;case 0:uo.call(e,!1),e.media.loop?(n.stopVideo(),n.playVideo()):Vr.call(e,e.media,"ended");break;case 1:e.media.paused&&!e.embed.hasPlayed?e.media.pause():(uo.call(e,!0),Vr.call(e,e.media,"playing"),e.timers.playing=setInterval(function(){Vr.call(e,e.media,"timeupdate")},50),e.media.duration!==n.getDuration()&&(e.media.duration=n.getDuration(),Vr.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),uo.call(e,!1)}Vr.call(e,e.elements.container,"statechange",!1,{code:t.data})}}})}}},fo={setup:function(){this.media?(Jr(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Jr(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Jr(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=Wr("div",{class:this.config.classNames.video}),Br(this.media,this.elements.wrapper),this.elements.poster=Wr("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?da.extend.call(this):this.isYouTube?ho.setup.call(this):this.isVimeo&&co.setup.call(this)):this.debug.warn("No media element found!")}},po=function(){function e(t){var n=this;dt(this,e),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){n.on("loaded",e),n.on("error",t)}),this.load()}return pt(e,[{key:"load",value:function(){var e=this;this.enabled&&(jr.object(window.google)&&jr.object(window.google.ima)?this.ready():so(this.player.config.urls.googleIMA.sdk).then(function(){e.ready()}).catch(function(){e.trigger("error",new Error("Google IMA SDK failed to load"))}))}},{key:"ready",value:function(){var e=this;this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(function(){e.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}},{key:"setupIMA",value:function(){this.elements.container=Wr("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.requestAds()}},{key:"requestAds",value:function(){var e=this,t=this.player.elements.container;try{this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(t){return e.onAdsManagerLoaded(t)},!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,function(t){return e.onAdError(t)},!1);var n=new google.ima.AdsRequest;n.adTagUrl=this.tagUrl,n.linearAdSlotWidth=t.offsetWidth,n.linearAdSlotHeight=t.offsetHeight,n.nonLinearAdSlotWidth=t.offsetWidth,n.nonLinearAdSlotHeight=t.offsetHeight,n.forceNonLinearFullSlot=!1,n.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(n)}catch(e){this.onAdError(e)}}},{key:"pollCountdown",value:function(){var e=this;if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]))return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(function(){var t=Ha(Math.max(e.manager.getRemainingTime(),0)),n="".concat(Oa("advertisement",e.player.config)," - ").concat(t);e.elements.container.setAttribute("data-badge-text",n)},100)}},{key:"onAdsManagerLoaded",value:function(e){var t=this;if(this.enabled){var n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0,this.manager=e.getAdsManager(this.player,n),this.cuePoints=this.manager.getCuePoints(),this.manager.setVolume(this.player.volume),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,function(e){return t.onAdError(e)}),Object.keys(google.ima.AdEvent.Type).forEach(function(e){t.manager.addEventListener(google.ima.AdEvent.Type[e],function(e){return t.onAdEvent(e)})}),this.trigger("loaded")}}},{key:"addCuePoints",value:function(){var e=this;jr.empty(this.cuePoints)||this.cuePoints.forEach(function(t){if(0!==t&&-1!==t&&t<e.player.duration){var n=e.player.elements.progress;if(jr.element(n)){var i=100/e.player.duration*t,r=Wr("span",{class:e.player.config.classNames.cues});r.style.left="".concat(i.toString(),"%"),n.appendChild(r)}}})}},{key:"onAdEvent",value:function(e){var t=this,n=this.player.elements.container,i=e.getAd(),r=e.getAdData(),a=function(e){var n="ads".concat(e.replace(/_/g,"").toLowerCase());Vr.call(t.player,t.player.media,n)};switch(e.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),a(e.type),this.pollCountdown(!0),i.isLinear()||(i.width=n.offsetWidth,i.height=n.offsetHeight);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:a(e.type),this.loadAds();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:a(e.type),this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:a(e.type),this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.STARTED:case google.ima.AdEvent.Type.MIDPOINT:case google.ima.AdEvent.Type.COMPLETE:case google.ima.AdEvent.Type.IMPRESSION:case google.ima.AdEvent.Type.CLICK:a(e.type);break;case google.ima.AdEvent.Type.LOG:r.adError&&this.player.debug.warn("Non-fatal ad error: ".concat(r.adError.getMessage()))}}},{key:"onAdError",value:function(e){this.cancel(),this.player.debug.warn("Ads error",e)}},{key:"listeners",value:function(){var e,t=this,n=this.player.elements.container;this.player.on("canplay",function(){t.addCuePoints()}),this.player.on("ended",function(){t.loader.contentComplete()}),this.player.on("timeupdate",function(){e=t.player.currentTime}),this.player.on("seeked",function(){var n=t.player.currentTime;jr.empty(t.cuePoints)||t.cuePoints.forEach(function(i,r){e<i&&i<n&&(t.manager.discardAdBreak(),t.cuePoints.splice(r,1))})}),window.addEventListener("resize",function(){t.manager&&t.manager.resize(n.offsetWidth,n.offsetHeight,google.ima.ViewMode.NORMAL)})}},{key:"play",value:function(){var e=this,t=this.player.elements.container;this.managerPromise||this.resumeContent(),this.managerPromise.then(function(){e.elements.displayContainer.initialize();try{e.initialized||(e.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),e.manager.start()),e.initialized=!0}catch(t){e.onAdError(t)}}).catch(function(){})}},{key:"resumeContent",value:function(){this.elements.container.style.zIndex="",this.playing=!1,this.player.media.play()}},{key:"pauseContent",value:function(){this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}},{key:"cancel",value:function(){this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}},{key:"loadAds",value:function(){var e=this;this.managerPromise.then(function(){e.manager&&e.manager.destroy(),e.managerPromise=new Promise(function(t){e.on("loaded",t),e.player.debug.log(e.manager)}),e.requestAds()}).catch(function(){})}},{key:"trigger",value:function(e){for(var t=this,n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];var a=this.events[e];jr.array(a)&&a.forEach(function(e){jr.function(e)&&e.apply(t,i)})}},{key:"on",value:function(e,t){return jr.array(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this}},{key:"startSafetyTimer",value:function(e,t){var n=this;this.player.debug.log("Safety timer invoked from: ".concat(t)),this.safetyTimer=setTimeout(function(){n.cancel(),n.clearSafetyTimer("startSafetyTimer()")},e)}},{key:"clearSafetyTimer",value:function(e){jr.nullOrUndefined(this.safetyTimer)||(this.player.debug.log("Safety timer cleared from: ".concat(e)),clearTimeout(this.safetyTimer),this.safetyTimer=null)}},{key:"enabled",get:function(){var e=this.config;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!jr.empty(e.publisherId)||jr.url(e.tagUrl))}},{key:"tagUrl",get:function(){var e=this.config;if(jr.url(e.tagUrl))return e.tagUrl;var t={AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:this.publisherId};return"".concat("https://go.aniview.com/api/adserver6/vast/","?").concat(Ua(t))}}]),e}(),mo=Cn(6),go=!0;"findIndex"in[]&&Array(1).findIndex(function(){go=!1}),W(W.P+W.F*go,"Array",{findIndex:function(e){return mo(this,e,arguments.length>1?arguments[1]:void 0)}}),fe("findIndex");var vo,yo=function(){function e(t){dt(this,e),this.player=t,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}return pt(e,[{key:"load",value:function(){var e=this;this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(function(){e.render(),e.determineContainerAutoSizing(),e.loaded=!0})}},{key:"getThumbnails",value:function(){var e=this;return new Promise(function(t){var n=e.player.config.previewThumbnails.src;if(jr.empty(n))throw new Error("Missing previewThumbnails.src config attribute");var i=(jr.string(n)?[n]:n).map(function(t){return e.getThumbnail(t)});Promise.all(i).then(function(){e.thumbnails.sort(function(e,t){return e.height-t.height}),e.player.debug.log("Preview thumbnails",e.thumbnails),t()})})}},{key:"getThumbnail",value:function(e){var t=this;return new Promise(function(n){ja(e).then(function(i){var r,a,o={frames:(r=i,a=[],r.split(/\r\n\r\n|\n\n|\r\r/).forEach(function(e){var t={};e.split(/\r\n|\n|\r/).forEach(function(e){if(jr.number(t.startTime)){if(!jr.empty(e.trim())&&jr.empty(t.text)){var n=e.trim().split("#xywh="),i=gt(n,1);if(t.text=i[0],n[1]){var r=gt(n[1].split(","),4);t.x=r[0],t.y=r[1],t.w=r[2],t.h=r[3]}}}else{var a=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})/);a&&(t.startTime=60*Number(a[1])*60+60*Number(a[2])+Number(a[3])+Number("0.".concat(a[4])),t.endTime=60*Number(a[6])*60+60*Number(a[7])+Number(a[8])+Number("0.".concat(a[9])))}}),t.text&&a.push(t)}),a),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||(o.urlPrefix=e.substring(0,e.lastIndexOf("/")+1));var s=new Image;s.onload=function(){o.height=s.naturalHeight,o.width=s.naturalWidth,t.thumbnails.push(o),n()},s.src=o.urlPrefix+o.frames[0].text})})}},{key:"startMove",value:function(e){if(this.loaded&&jr.event(e)&&["touchmove","mousemove"].includes(e.type)&&this.player.media.duration){if("touchmove"===e.type)this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var t=this.player.elements.progress.getBoundingClientRect(),n=100/t.width*(e.pageX-t.left);this.seekTime=this.player.media.duration*(n/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=e.pageX,this.elements.thumb.time.innerText=Ha(this.seekTime)}this.showImageAtCurrentTime()}}},{key:"endMove",value:function(){this.toggleThumbContainer(!1,!0)}},{key:"startScrubbing",value:function(e){!1!==e.button&&0!==e.button||(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}},{key:"endScrubbing",value:function(){var e=this;this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):Hr.call(this.player,this.player.media,"timeupdate",function(){e.mouseDown||e.toggleScrubbingContainer(!1)})}},{key:"listeners",value:function(){var e=this;this.player.on("play",function(){e.toggleThumbContainer(!1,!0)}),this.player.on("seeked",function(){e.toggleThumbContainer(!1)}),this.player.on("timeupdate",function(){e.lastTime=e.player.media.currentTime})}},{key:"render",value:function(){this.elements.thumb.container=Wr("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=Wr("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);var e=Wr("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=Wr("span",{},"00:00"),e.appendChild(this.elements.thumb.time),this.elements.thumb.container.appendChild(e),this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=Wr("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}},{key:"showImageAtCurrentTime",value:function(){var e=this;this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();var t=this.thumbnails[0].frames.findIndex(function(t){return e.seekTime>=t.startTime&&e.seekTime<=t.endTime}),n=t>=0,i=0;this.mouseDown||this.toggleThumbContainer(n),n&&(this.thumbnails.forEach(function(n,r){e.loadedImages.includes(n.frames[t].text)&&(i=r)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(i)))}},{key:"loadImage",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=this.showingThumb,i=this.thumbnails[t],r=i.urlPrefix,a=i.frames[n],o=i.frames[n].text,s=r+o;if(this.currentImageElement&&this.currentImageElement.dataset.filename===o)this.showImage(this.currentImageElement,a,t,n,o,!1),this.currentImageElement.dataset.index=n,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);var l=new Image;l.src=s,l.dataset.index=n,l.dataset.filename=o,this.showingThumbFilename=o,this.player.debug.log("Loading image: ".concat(s)),l.onload=function(){return e.showImage(l,a,t,n,o,!0)},this.loadingImage=l,this.removeOldImages(l)}}},{key:"showImage",value:function(e,t,n,i,r){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];this.player.debug.log("Showing thumb: ".concat(r,". num: ").concat(i,". qual: ").concat(n,". newimg: ").concat(a)),this.setImageSizeAndOffset(e,t),a&&(this.currentImageContainer.appendChild(e),this.currentImageElement=e,this.loadedImages.includes(r)||this.loadedImages.push(r)),this.preloadNearby(i,!0).then(this.preloadNearby(i,!1)).then(this.getHigherQuality(n,e,t,r))}},{key:"removeOldImages",value:function(e){var t=this;Array.from(this.currentImageContainer.children).forEach(function(n){if("img"===n.tagName.toLowerCase()){var i=t.usingSprites?500:1e3;if(n.dataset.index!==e.dataset.index&&!n.dataset.deleting){n.dataset.deleting=!0;var r=t.currentImageContainer;setTimeout(function(){r.removeChild(n),t.player.debug.log("Removing thumb: ".concat(n.dataset.filename))},i)}}})}},{key:"preloadNearby",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise(function(i){setTimeout(function(){var r=t.thumbnails[0].frames[e].text;if(t.showingThumbFilename===r){var a;a=n?t.thumbnails[0].frames.slice(e):t.thumbnails[0].frames.slice(0,e).reverse();var o=!1;a.forEach(function(e){var n=e.text;if(n!==r&&!t.loadedImages.includes(n)){o=!0,t.player.debug.log("Preloading thumb filename: ".concat(n));var a=t.thumbnails[0].urlPrefix+n,s=new Image;s.src=a,s.onload=function(){t.player.debug.log("Preloaded thumb filename: ".concat(n)),t.loadedImages.includes(n)||t.loadedImages.push(n),i()}}}),o||i()}},300)})}},{key:"getHigherQuality",value:function(e,t,n,i){var r=this;if(e<this.thumbnails.length-1){var a=t.naturalHeight;this.usingSprites&&(a=n.h),a<this.thumbContainerHeight&&setTimeout(function(){r.showingThumbFilename===i&&(r.player.debug.log("Showing higher quality thumb for: ".concat(i)),r.loadImage(e+1))},300)}}},{key:"toggleThumbContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(n,e),!e&&t&&(this.showingThumb=null,this.showingThumbFilename=null)}},{key:"toggleScrubbingContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(t,e),e||(this.showingThumb=null,this.showingThumbFilename=null)}},{key:"determineContainerAutoSizing",value:function(){this.elements.thumb.imageContainer.clientHeight>20&&(this.sizeSpecifiedInCSS=!0)}},{key:"setThumbContainerSizeAndPos",value:function(){if(!this.sizeSpecifiedInCSS){var e=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height="".concat(this.thumbContainerHeight,"px"),this.elements.thumb.imageContainer.style.width="".concat(e,"px")}this.setThumbContainerPos()}},{key:"setThumbContainerPos",value:function(){var e=this.player.elements.progress.getBoundingClientRect(),t=this.player.elements.container.getBoundingClientRect(),n=this.elements.thumb.container,i=t.left-e.left+10,r=t.right-e.left-n.clientWidth-10,a=this.mousePosX-e.left-n.clientWidth/2;a<i&&(a=i),a>r&&(a=r),n.style.left="".concat(a,"px")}},{key:"setScrubbingContainerSize",value:function(){this.elements.scrubbing.container.style.width="".concat(this.player.media.clientWidth,"px"),this.elements.scrubbing.container.style.height="".concat(this.player.media.clientWidth/this.thumbAspectRatio,"px")}},{key:"setImageSizeAndOffset",value:function(e,t){if(this.usingSprites){var n=this.thumbContainerHeight/t.h;e.style.height="".concat(Math.floor(e.naturalHeight*n),"px"),e.style.width="".concat(Math.floor(e.naturalWidth*n),"px"),e.style.left="-".concat(t.x*n,"px"),e.style.top="-".concat(t.y*n,"px")}}},{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}},{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?Math.floor(this.player.media.clientWidth/this.thumbAspectRatio):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}}]),e}(),bo={insertElements:function(e,t){var n=this;jr.string(t)?zr(e,this.media,{src:t}):jr.array(t)&&t.forEach(function(t){zr(e,n.media,t)})},change:function(e){var t=this;pa(e,"sources.length")?(da.cancelRequests.call(this),this.destroy.call(this,function(){t.options.quality=[],Kr(t.media),t.media=null,jr.element(t.elements.container)&&t.elements.container.removeAttribute("class");var n=e.sources,i=e.type,r=gt(n,1)[0],a=r.provider,o=void 0===a?Ga.html5:a,s=r.src,l="html5"===o?i:"div",c="html5"===o?{}:{src:s};Object.assign(t,{provider:o,type:i,supported:ha.check(i,o,t.config.playsinline),media:Wr(l,c)}),t.elements.container.appendChild(t.media),jr.boolean(e.autoplay)&&(t.config.autoplay=e.autoplay),t.isHTML5&&(t.config.crossorigin&&t.media.setAttribute("crossorigin",""),t.config.autoplay&&t.media.setAttribute("autoplay",""),jr.empty(e.poster)||(t.poster=e.poster),t.config.loop.active&&t.media.setAttribute("loop",""),t.config.muted&&t.media.setAttribute("muted",""),t.config.playsinline&&t.media.setAttribute("playsinline","")),io.addStyleHook.call(t),t.isHTML5&&bo.insertElements.call(t,"source",n),t.config.title=e.title,fo.setup.call(t),t.isHTML5&&Object.keys(e).includes("tracks")&&bo.insertElements.call(t,"track",e.tracks),(t.isHTML5||t.isEmbed&&!t.supported.ui)&&io.build.call(t),t.isHTML5&&t.media.load(),t.previewThumbnails&&t.previewThumbnails.load(),t.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}},wo=function(){function e(t,n){var i=this;if(dt(this,e),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=ha.touch,this.media=t,jr.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||jr.nodeList(this.media)||jr.array(this.media))&&(this.media=this.media[0]),this.config=ma({},za,e.defaults,n||{},function(){try{return JSON.parse(i.media.getAttribute("data-plyr-config"))}catch(e){return{}}}()),this.elements={container: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 Ja(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",ha),!jr.nullOrUndefined(this.media)&&jr.element(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(ha.check().api){var r=this.media.cloneNode(!0);r.autoplay=!1,this.elements.original=r;var a=this.media.tagName.toLowerCase(),o=null,s=null;switch(a){case"div":if(o=this.media.querySelector("iframe"),jr.element(o)){if(s=Ba(o.getAttribute("src")),this.provider=function(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?Ga.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?Ga.vimeo:null}(s.toString()),this.elements.container=this.media,this.media=o,this.elements.container.className="",s.search.length){var l=["1","true"];l.includes(s.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(s.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(s.searchParams.get("playsinline")),this.config.youtube.hl=s.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(jr.empty(this.provider)||!Object.keys(Ga).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=$a.video;break;case"video":case"audio":this.type=a,this.provider=Ga.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=ha.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new ao(this),this.storage=new La(this),this.media.plyr=this,jr.element(this.elements.container)||(this.elements.container=Wr("div",{tabindex:0}),Br(this.media,this.elements.container)),io.addStyleHook.call(this),fo.setup.call(this),this.config.debug&&Dr.call(this,this.elements.container,this.config.events.join(" "),function(e){i.debug.log("event: ".concat(e.type))}),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&io.build.call(this),this.listeners.container(),this.listeners.global(),this.fullscreen=new eo(this),this.config.ads.enabled&&(this.ads=new po(this)),this.config.autoplay&&this.play(),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new yo(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");else this.debug.error("Setup failed: no suitable element passed")}return pt(e,[{key:"play",value:function(){var e=this;return jr.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(function(){return e.ads.play()}).catch(function(){return e.media.play()}),this.media.play()):null}},{key:"pause",value:function(){this.playing&&jr.function(this.media.pause)&&this.media.pause()}},{key:"togglePlay",value:function(e){(jr.boolean(e)?e:!this.playing)?this.play():this.pause()}},{key:"stop",value:function(){this.isHTML5?(this.pause(),this.restart()):jr.function(this.media.stop)&&this.media.stop()}},{key:"restart",value:function(){this.currentTime=0}},{key:"rewind",value:function(e){this.currentTime=this.currentTime-(jr.number(e)?e:this.config.seekTime)}},{key:"forward",value:function(e){this.currentTime=this.currentTime+(jr.number(e)?e:this.config.seekTime)}},{key:"increaseVolume",value:function(e){var t=this.media.muted?0:this.volume;this.volume=t+(jr.number(e)?e:0)}},{key:"decreaseVolume",value:function(e){this.increaseVolume(-e)}},{key:"toggleCaptions",value:function(e){Wa.toggle.call(this,e,!1)}},{key:"airplay",value:function(){ha.airplay&&this.media.webkitShowPlaybackTargetPicker()}},{key:"toggleControls",value:function(e){if(this.supported.ui&&!this.isAudio){var t=Qr(this.elements.container,this.config.classNames.hideControls),n=void 0===e?void 0:!e,i=Jr(this.elements.container,this.config.classNames.hideControls,n);if(i&&this.config.controls.includes("settings")&&!jr.empty(this.config.settings)&&Va.toggleMenu.call(this,!1),i!==t){var r=i?"controlshidden":"controlsshown";Vr.call(this,this.media,r)}return!i}return!1}},{key:"on",value:function(e,t){Dr.call(this,this.elements.container,e,t)}},{key:"once",value:function(e,t){Hr.call(this,this.elements.container,e,t)}},{key:"off",value:function(e,t){qr(this.elements.container,e,t)}},{key:"destroy",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.ready){var i=function(){document.body.style.overflow="",t.embed=null,n?(Object.keys(t.elements).length&&(Kr(t.elements.buttons.play),Kr(t.elements.captions),Kr(t.elements.controls),Kr(t.elements.wrapper),t.elements.buttons.play=null,t.elements.captions=null,t.elements.controls=null,t.elements.wrapper=null),jr.function(e)&&e()):(function(){this&&this.eventListeners&&(this.eventListeners.forEach(function(e){var t=e.element,n=e.type,i=e.callback,r=e.options;t.removeEventListener(n,i,r)}),this.eventListeners=[])}.call(t),Gr(t.elements.original,t.elements.container),Vr.call(t,t.elements.original,"destroyed",!0),jr.function(e)&&e.call(t.elements.original),t.ready=!1,setTimeout(function(){t.elements=null,t.media=null},200))};this.stop(),this.isHTML5?(clearTimeout(this.timers.loading),io.toggleNativeControls.call(this,!0),i()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&jr.function(this.embed.destroy)&&this.embed.destroy(),i()):this.isVimeo&&(null!==this.embed&&this.embed.unload().then(i),setTimeout(i,200))}}},{key:"supports",value:function(e){return ha.mime.call(this,e)}},{key:"isHTML5",get:function(){return Boolean(this.provider===Ga.html5)}},{key:"isEmbed",get:function(){return Boolean(this.isYouTube||this.isVimeo)}},{key:"isYouTube",get:function(){return Boolean(this.provider===Ga.youtube)}},{key:"isVimeo",get:function(){return Boolean(this.provider===Ga.vimeo)}},{key:"isVideo",get:function(){return Boolean(this.type===$a.video)}},{key:"isAudio",get:function(){return Boolean(this.type===$a.audio)}},{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",set:function(e){if(this.duration){var t=jr.number(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log("Seeking to ".concat(this.currentTime," seconds"))}},get:function(){return Number(this.media.currentTime)}},{key:"buffered",get:function(){var e=this.media.buffered;return jr.number(e)?e:e&&e.length&&this.duration>0?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,n=jr.number(t)&&t!==1/0?t:0;return e||n}},{key:"volume",set:function(e){var t=e;jr.string(t)&&(t=Number(t)),jr.number(t)||(t=this.storage.get("volume")),jr.number(t)||(t=this.config.volume),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!jr.empty(e)&&this.muted&&t>0&&(this.muted=!1)},get:function(){return Number(this.media.volume)}},{key:"muted",set:function(e){var t=e;jr.boolean(t)||(t=this.storage.get("muted")),jr.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t},get:function(){return Boolean(this.media.muted)}},{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",set:function(e){var t=null;jr.number(e)&&(t=e),jr.number(t)||(t=this.storage.get("speed")),jr.number(t)||(t=this.config.speed.selected),t<.1&&(t=.1),t>2&&(t=2),this.config.speed.options.includes(t)?(this.config.speed.selected=t,this.media.playbackRate=t):this.debug.warn("Unsupported speed (".concat(t,")"))},get:function(){return Number(this.media.playbackRate)}},{key:"quality",set:function(e){var t=this.config.quality,n=this.options.quality;if(n.length){var i=[!jr.empty(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(jr.number),r=!0;if(!n.includes(i)){var a=function(e,t){return jr.array(e)&&e.length?e.reduce(function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}):null}(n,i);this.debug.warn("Unsupported quality option: ".concat(i,", using ").concat(a," instead")),i=a,r=!1}t.selected=i,this.media.quality=i,r&&this.storage.set({quality:i})}},get:function(){return this.media.quality}},{key:"loop",set:function(e){var t=jr.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t},get:function(){return Boolean(this.media.loop)}},{key:"source",set:function(e){bo.change.call(this,e)},get:function(){return this.media.currentSrc}},{key:"download",get:function(){var e=this.config.urls.download;return jr.url(e)?e:this.source}},{key:"poster",set:function(e){this.isVideo?io.setPoster.call(this,e,!1).catch(function(){}):this.debug.warn("Poster can only be set for video")},get:function(){return this.isVideo?this.media.getAttribute("poster"):null}},{key:"autoplay",set:function(e){var t=jr.boolean(e)?e:this.config.autoplay;this.config.autoplay=t},get:function(){return Boolean(this.config.autoplay)}},{key:"currentTrack",set:function(e){Wa.set.call(this,e,!1)},get:function(){var e=this.captions,t=e.toggled,n=e.currentTrack;return t?n:-1}},{key:"language",set:function(e){Wa.setLanguage.call(this,e,!1)},get:function(){return(Wa.getCurrentTrack.call(this)||{}).language}},{key:"pip",set:function(e){if(ha.pip){var t=jr.boolean(e)?e:!this.pip;jr.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Ka:Ya),jr.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}},get:function(){return ha.pip?jr.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Ka:null}}],[{key:"supported",value:function(e,t,n){return ha.check(e,t,n)}},{key:"loadSprite",value:function(e,t){return Ra(e,t)}},{key:"setup",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null;return jr.string(t)?i=Array.from(document.querySelectorAll(t)):jr.nodeList(t)?i=Array.from(t):jr.array(t)&&(i=t.filter(jr.element)),jr.empty(i)?null:i.map(function(t){return new e(t,n)})}}]),e}();return wo.defaults=(vo=za,JSON.parse(JSON.stringify(vo))),wo});
|
||
//# sourceMappingURL=plyr.polyfilled.min.js.map
|