mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
9 lines
114 KiB
JavaScript
9 lines
114 KiB
JavaScript
/*!
|
||
* artplayer-react.js v3.1.20
|
||
* Github: https://github.com/zhw2590582/ArtPlayer#readme
|
||
* (c) 2017-2019 Harvey Zack
|
||
* Released under the MIT License.
|
||
*/
|
||
|
||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).ArtplayerReact=t()}(this,(function(){"use strict";var e=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o};var t=function(t,n){if(null==t)return{};var r,o,i=e(t,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(o=0;o<a.length;o++)r=a[o],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i};var n=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function r(e,t){return e(t={exports:{}},t.exports),t.exports}var o=r((function(e){function t(e){return(t="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 n(r){return"function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?e.exports=n=function(e){return t(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},n(r)}e.exports=n}));var i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var c=function(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e};var u=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var s=function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?u(e):t},l=r((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t})),f=r((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t}));var p=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)},d=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;function v(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var m=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,o=v(e),i=1;i<arguments.length;i++){for(var a in n=Object(arguments[i]))h.call(n,a)&&(o[a]=n[a]);if(d){r=d(n);for(var c=0;c<r.length;c++)y.call(n,r[c])&&(o[r[c]]=n[r[c]])}}return o},g="function"==typeof Symbol&&Symbol.for,b=g?Symbol.for("react.element"):60103,w=g?Symbol.for("react.portal"):60106,O=g?Symbol.for("react.fragment"):60107,k=g?Symbol.for("react.strict_mode"):60108,x=g?Symbol.for("react.profiler"):60114,j=g?Symbol.for("react.provider"):60109,P=g?Symbol.for("react.context"):60110,S=g?Symbol.for("react.forward_ref"):60112,E=g?Symbol.for("react.suspense"):60113,R=g?Symbol.for("react.suspense_list"):60120,C=g?Symbol.for("react.memo"):60115,$=g?Symbol.for("react.lazy"):60116,D="function"==typeof Symbol&&Symbol.iterator;function T(e){for(var t=e.message,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return e.message="Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A={};function L(e,t,n){this.props=e,this.context=t,this.refs=A,this.updater=n||_}function M(){}function q(e,t,n){this.props=e,this.context=t,this.refs=A,this.updater=n||_}L.prototype.isReactComponent={},L.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw T(Error(85));this.updater.enqueueSetState(this,e,t,"setState")},L.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},M.prototype=L.prototype;var z=q.prototype=new M;z.constructor=q,m(z,L.prototype),z.isPureReactComponent=!0;var I={current:null},V={suspense:null},F={current:null},W=Object.prototype.hasOwnProperty,N={key:!0,ref:!0,__self:!0,__source:!0};function H(e,t,n){var r=void 0,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)W.call(t,r)&&!N.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var u=Array(c),s=0;s<c;s++)u[s]=arguments[s+2];o.children=u}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===o[r]&&(o[r]=c[r]);return{$$typeof:b,type:e,key:i,ref:a,props:o,_owner:F.current}}function U(e){return"object"==typeof e&&null!==e&&e.$$typeof===b}var B=/\/+/g,Y=[];function X(e,t,n,r){if(Y.length){var o=Y.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function Z(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>Y.length&&Y.push(e)}function J(e,t,n){return null==e?0:function e(t,n,r,o){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var a=!1;if(null===t)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case b:case w:a=!0}}if(a)return r(o,t,""===n?"."+G(t,0):n),1;if(a=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;c++){var u=n+G(i=t[c],c);a+=e(i,u,r,o)}else if(null===t||"object"!=typeof t?u=null:u="function"==typeof(u=D&&t[D]||t["@@iterator"])?u:null,"function"==typeof u)for(t=u.call(t),c=0;!(i=t.next()).done;)a+=e(i=i.value,u=n+G(i,c++),r,o);else if("object"===i)throw r=""+t,T(Error(31),"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return a}(e,"",t,n)}function G(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function Q(e,t){e.func.call(e.context,t,e.count++)}function K(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?ee(e,r,n,(function(e){return e})):null!=e&&(U(e)&&(e=function(e,t){return{$$typeof:b,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(B,"$&/")+"/")+n)),r.push(e))}function ee(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(B,"$&/")+"/"),J(e,K,t=X(t,i,r,o)),Z(t)}function te(){var e=I.current;if(null===e)throw T(Error(321));return e}var ne={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return ee(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;J(e,Q,t=X(null,null,t,n)),Z(t)},count:function(e){return J(e,(function(){return null}),null)},toArray:function(e){var t=[];return ee(e,t,null,(function(e){return e})),t},only:function(e){if(!U(e))throw T(Error(143));return e}},createRef:function(){return{current:null}},Component:L,PureComponent:q,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:P,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:j,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:S,render:e}},lazy:function(e){return{$$typeof:$,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:C,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return te().useCallback(e,t)},useContext:function(e,t){return te().useContext(e,t)},useEffect:function(e,t){return te().useEffect(e,t)},useImperativeHandle:function(e,t,n){return te().useImperativeHandle(e,t,n)},useDebugValue:function(){},useLayoutEffect:function(e,t){return te().useLayoutEffect(e,t)},useMemo:function(e,t){return te().useMemo(e,t)},useReducer:function(e,t,n){return te().useReducer(e,t,n)},useRef:function(e){return te().useRef(e)},useState:function(e){return te().useState(e)},Fragment:O,Profiler:x,StrictMode:k,Suspense:E,unstable_SuspenseList:R,createElement:H,cloneElement:function(e,t,n){if(null==e)throw T(Error(267),e);var r=void 0,o=m({},e.props),i=e.key,a=e.ref,c=e._owner;if(null!=t){void 0!==t.ref&&(a=t.ref,c=F.current),void 0!==t.key&&(i=""+t.key);var u=void 0;for(r in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)W.call(t,r)&&!N.hasOwnProperty(r)&&(o[r]=void 0===t[r]&&void 0!==u?u[r]:t[r])}if(1===(r=arguments.length-2))o.children=n;else if(1<r){u=Array(r);for(var s=0;s<r;s++)u[s]=arguments[s+2];o.children=u}return{$$typeof:b,type:e.type,key:i,ref:a,props:o,_owner:c}},createFactory:function(e){var t=H.bind(null,e);return t.type=e,t},isValidElement:U,version:"16.9.0",unstable_withSuspenseConfig:function(e,t){var n=V.suspense;V.suspense=void 0===t?null:t;try{e()}finally{V.suspense=n}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:I,ReactCurrentBatchConfig:V,ReactCurrentOwner:F,IsSomeRendererActing:{current:!1},assign:m}},re={default:ne},oe=re&&ne||re,ie=oe.default||oe,ae=function(){};if("production"!==process.env.NODE_ENV){var ce="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ue={},se=Function.call.bind(Object.prototype.hasOwnProperty);ae=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function le(e,t,n,r,o){if("production"!==process.env.NODE_ENV)for(var i in e)if(se(e,i)){var a;try{if("function"!=typeof e[i]){var c=Error((r||"React class")+": "+n+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.");throw c.name="Invariant Violation",c}a=e[i](t,i,r,n,null,ce)}catch(e){a=e}if(!a||a instanceof Error||ae((r||"React class")+": type specification of "+n+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in ue)){ue[a.message]=!0;var u=o?o():"";ae("Failed "+n+" type: "+a.message+(null!=u?u:""))}}}le.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(ue={})};var fe=le,pe=r((function(e){"production"!==process.env.NODE_ENV&&function(){var t=m,n=fe,r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,c=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,w="function"==typeof Symbol&&Symbol.iterator,O="@@iterator";function k(e){if(null===e||"object"!=typeof e)return null;var t=w&&e[w]||e[O];return"function"==typeof t?t:null}function x(e){return e.name="Invariant Violation",e}var j=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,(function(){return n[o++]}));"undefined"!=typeof console&&console.warn(i);try{throw new Error(i)}catch(e){}},P=function(e,t){if(void 0===t)throw new Error("`lowPriorityWarning(condition, format, ...args)` requires a warning message argument");if(!e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];j.apply(void 0,[t].concat(r))}},S=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];if(void 0===t)throw new Error("`warningWithoutStack(condition, format, ...args)` requires a warning message argument");if(r.length>8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!e){if("undefined"!=typeof console){var i=r.map((function(e){return""+e}));i.unshift("Warning: "+t),Function.prototype.apply.call(console.error,console,i)}try{var a=0,c="Warning: "+t.replace(/%s/g,(function(){return r[a++]}));throw new Error(c)}catch(e){}}},E={};function R(e,t){var n=e.constructor,r=n&&(n.displayName||n.name)||"ReactClass",o=r+"."+t;E[o]||(S(!1,"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,r),E[o]=!0)}var C={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){R(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,r){R(e,"replaceState")},enqueueSetState:function(e,t,n,r){R(e,"setState")}},$={};function D(e,t,n){this.props=e,this.context=t,this.refs=$,this.updater=n||C}Object.freeze($),D.prototype.isReactComponent={},D.prototype.setState=function(e,t){!function(){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw x(Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."))}(),this.updater.enqueueSetState(this,e,t,"setState")},D.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var T={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},_=function(e,t){Object.defineProperty(D.prototype,e,{get:function(){P(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var A in T)T.hasOwnProperty(A)&&_(A,T[A]);function L(){}function M(e,t,n){this.props=e,this.context=t,this.refs=$,this.updater=n||C}L.prototype=D.prototype;var q=M.prototype=new L;q.constructor=M,t(q,D.prototype),q.isPureReactComponent=!0;var z={current:null},I={suspense:null},V={current:null},F=/^(.*)[\\\/]/,W=1;function N(e){if(null==e)return null;if("number"==typeof e.tag&&S(!1,"Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case a:return"Fragment";case i:return"Portal";case u:return"Profiler";case c:return"StrictMode";case d:return"Suspense";case h:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case l:return"Context.Consumer";case s:return"Context.Provider";case p:return r=e,o=e.render,f="ForwardRef",m=o.displayName||o.name||"",r.displayName||(""!==m?f+"("+m+")":f);case y:return N(e.type);case v:var t=(n=e)._status===W?n._result:null;if(t)return N(t)}var n,r,o,f,m;return null}var H={},U=null;function B(e){U=e}H.getCurrentStack=null,H.getStackAddendum=function(){var e="";if(U){var t=N(U.type),n=U._owner;e+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(F,"");if(/^index\./.test(i)){var a=o.match(F);if(a){var c=a[1];if(c)i=c.replace(F,"")+"/"+i}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(t,U._source,n&&N(n.type))}var r=H.getCurrentStack;return r&&(e+=r()||""),e};var Y={ReactCurrentDispatcher:z,ReactCurrentBatchConfig:I,ReactCurrentOwner:V,IsSomeRendererActing:{current:!1},assign:t};t(Y,{ReactDebugCurrentFrame:H,ReactComponentTreeHook:{}});var X=function(e,t){if(!e){for(var n=Y.ReactDebugCurrentFrame,r=n.getStackAddendum(),o=arguments.length,i=Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];S.apply(void 0,[!1,t+"%s"].concat(i,[r]))}},Z=Object.prototype.hasOwnProperty,J={key:!0,ref:!0,__self:!0,__source:!0},G=void 0,Q=void 0;function K(e){if(Z.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function ee(e){if(Z.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}var te=function(e,t,n,r,i,a,c){var u={$$typeof:o,type:e,key:t,ref:n,props:c,_owner:a,_store:{}};return Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:r}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u};function ne(e,t,n){var r=void 0,o={},i=null,a=null,c=null,u=null;if(null!=t)for(r in K(t)&&(a=t.ref),ee(t)&&(i=""+t.key),c=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)Z.call(t,r)&&!J.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(s>1){for(var l=Array(s),f=0;f<s;f++)l[f]=arguments[f+2];Object.freeze&&Object.freeze(l),o.children=l}if(e&&e.defaultProps){var p=e.defaultProps;for(r in p)void 0===o[r]&&(o[r]=p[r])}if(i||a){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;i&&function(e,t){var n=function(){G||(G=!0,S(!1,"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(o,d),a&&function(e,t){var n=function(){Q||(Q=!0,S(!1,"%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(o,d)}return te(e,i,a,c,u,V.current,o)}function re(e,n,r){!function(){if(null==e)throw x(Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+"."))}();var o=void 0,i=t({},e.props),a=e.key,c=e.ref,u=e._self,s=e._source,l=e._owner;if(null!=n){K(n)&&(c=n.ref,l=V.current),ee(n)&&(a=""+n.key);var f=void 0;for(o in e.type&&e.type.defaultProps&&(f=e.type.defaultProps),n)Z.call(n,o)&&!J.hasOwnProperty(o)&&(void 0===n[o]&&void 0!==f?i[o]=f[o]:i[o]=n[o])}var p=arguments.length-2;if(1===p)i.children=r;else if(p>1){for(var d=Array(p),h=0;h<p;h++)d[h]=arguments[h+2];i.children=d}return te(e.type,a,c,u,s,l,i)}function oe(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var ie=".",ae=":";var ce=!1,ue=/\/+/g;function se(e){return(""+e).replace(ue,"$&/")}var le=10,pe=[];function de(e,t,n,r){if(pe.length){var o=pe.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function he(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,pe.length<le&&pe.push(e)}function ye(e,t,n){return null==e?0:function e(t,n,r,a){var c=typeof t;"undefined"!==c&&"boolean"!==c||(t=null);var u=!1;if(null===t)u=!0;else switch(c){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case o:case i:u=!0}}if(u)return r(a,t,""===n?ie+ve(t,0):n),1;var s=void 0,l=0,f=""===n?ie:n+ae;if(Array.isArray(t))for(var p=0;p<t.length;p++)l+=e(s=t[p],f+ve(s,p),r,a);else{var d=k(t);if("function"==typeof d){d===t.entries&&(ce||X(!1,"Using Maps as children is unsupported and will likely yield unexpected results. Convert it to a sequence/iterable of keyed ReactElements instead."),ce=!0);for(var h=d.call(t),y=void 0,v=0;!(y=h.next()).done;)l+=e(s=y.value,f+ve(s,v++),r,a)}else if("object"===c){var m;m=" If you meant to render a collection of children, use an array instead."+H.getStackAddendum();var g=""+t;!function(){throw x(Error("Objects are not valid as a React child (found: "+("[object Object]"===g?"object with keys {"+Object.keys(t).join(", ")+"}":g)+")."+m))}()}}return l}(e,"",t,n)}function ve(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function me(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function ge(e,t,n){var r,o,i=e.result,a=e.keyPrefix,c=e.func,u=e.context,s=c.call(u,t,e.count++);Array.isArray(s)?be(s,i,n,(function(e){return e})):null!=s&&(oe(s)&&(r=s,o=a+(!s.key||t&&t.key===s.key?"":se(s.key)+"/")+n,s=te(r.type,o,r.ref,r._self,r._source,r._owner,r.props)),i.push(s))}function be(e,t,n,r,o){var i="";null!=n&&(i=se(n)+"/");var a=de(t,i,r,o);ye(e,ge,a),he(a)}function we(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===u||e===c||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===y||e.$$typeof===s||e.$$typeof===l||e.$$typeof===p||e.$$typeof===g||e.$$typeof===b)}function Oe(){var e=z.current;return function(){if(null===e)throw x(Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem."))}(),e}var ke=void 0;function xe(){if(V.current){var e=N(V.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ke=!1;var je={};function Pe(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=xe();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!je[n]){je[n]=!0;var r="";e&&e._owner&&e._owner!==V.current&&(r=" It was passed a child from "+N(e._owner.type)+"."),B(e),X(!1,'Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',n,r),B(null)}}}function Se(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];oe(r)&&Pe(r,t)}else if(oe(e))e._store&&(e._store.validated=!0);else if(e){var o=k(e);if("function"==typeof o&&o!==e.entries)for(var i=o.call(e),a=void 0;!(a=i.next()).done;)oe(a.value)&&Pe(a.value,t)}}function Ee(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r=N(t),o=void 0;if("function"==typeof t)o=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==p&&t.$$typeof!==y)return;o=t.propTypes}o?(B(e),n(o,e.props,"prop",r,H.getStackAddendum),B(null)):void 0===t.PropTypes||ke||(ke=!0,S(!1,"Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",r||"Unknown")),"function"==typeof t.getDefaultProps&&(t.getDefaultProps.isReactClassApproved||S(!1,"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."))}}function Re(e,t,n){var r,i,c=we(e);if(!c){var u="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var s=null!=(r=t)&&void 0!==(i=r.__source)?"\n\nCheck your code at "+i.fileName.replace(/^.*[\\\/]/,"")+":"+i.lineNumber+".":"";u+=s||xe();var l=void 0;null===e?l="null":Array.isArray(e)?l="array":void 0!==e&&e.$$typeof===o?(l="<"+(N(e.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):l=typeof e,X(!1,"React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",l,u)}var f=ne.apply(this,arguments);if(null==f)return f;if(c)for(var p=2;p<arguments.length;p++)Se(arguments[p],e);return e===a?function(e){B(e);for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){X(!1,"Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r);break}}null!==e.ref&&X(!1,"Invalid attribute `ref` supplied to `React.Fragment`."),B(null)}(f):Ee(f),f}try{var Ce=Object.freeze({}),$e=new Map([[Ce,null]]),De=new Set([Ce]);$e.set(0,0),De.add(0)}catch(e){}var Te={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return be(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;var r=de(null,null,t,n);ye(e,me,r),he(r)},count:function(e){return ye(e,(function(){return null}),null)},toArray:function(e){var t=[];return be(e,t,null,(function(e){return e})),t},only:function(e){return function(){if(!oe(e))throw x(Error("React.Children.only expected to receive a single React element child."))}(),e}},createRef:function(){var e={current:null};return Object.seal(e),e},Component:D,PureComponent:M,createContext:function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&S(!1,"createContext: Expected the optional second argument to be a function. Instead received: %s",t);var n={$$typeof:l,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null};n.Provider={$$typeof:s,_context:n};var r=!1,o=!1,i={$$typeof:l,_context:n,_calculateChangedBits:n._calculateChangedBits};return Object.defineProperties(i,{Provider:{get:function(){return o||(o=!0,X(!1,"Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),n.Provider},set:function(e){n.Provider=e}},_currentValue:{get:function(){return n._currentValue},set:function(e){n._currentValue=e}},_currentValue2:{get:function(){return n._currentValue2},set:function(e){n._currentValue2=e}},_threadCount:{get:function(){return n._threadCount},set:function(e){n._threadCount=e}},Consumer:{get:function(){return r||(r=!0,X(!1,"Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),n.Consumer}}}),n.Consumer=i,n._currentRenderer=null,n._currentRenderer2=null,n},forwardRef:function(e){return null!=e&&e.$$typeof===y?S(!1,"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?S(!1,"forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&S(!1,"forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null!=e.defaultProps||null!=e.propTypes)&&S(!1,"forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:p,render:e}},lazy:function(e){var t={$$typeof:v,_ctor:e,_status:-1,_result:null},n=void 0,r=void 0;return Object.defineProperties(t,{defaultProps:{configurable:!0,get:function(){return n},set:function(e){X(!1,"React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),n=e,Object.defineProperty(t,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return r},set:function(e){X(!1,"React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),r=e,Object.defineProperty(t,"propTypes",{enumerable:!0})}}}),t},memo:function(e,t){return we(e)||S(!1,"memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:y,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return Oe().useCallback(e,t)},useContext:function(e,t){var n=Oe();if(void 0!==t&&X(!1,"useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",t,"number"==typeof t&&Array.isArray(arguments[2])?"\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks":""),void 0!==e._context){var r=e._context;r.Consumer===e?X(!1,"Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&X(!1,"Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return n.useContext(e,t)},useEffect:function(e,t){return Oe().useEffect(e,t)},useImperativeHandle:function(e,t,n){return Oe().useImperativeHandle(e,t,n)},useDebugValue:function(e,t){return Oe().useDebugValue(e,t)},useLayoutEffect:function(e,t){return Oe().useLayoutEffect(e,t)},useMemo:function(e,t){return Oe().useMemo(e,t)},useReducer:function(e,t,n){return Oe().useReducer(e,t,n)},useRef:function(e){return Oe().useRef(e)},useState:function(e){return Oe().useState(e)},Fragment:a,Profiler:u,StrictMode:c,Suspense:d,unstable_SuspenseList:h,createElement:Re,cloneElement:function(e,t,n){for(var r=re.apply(this,arguments),o=2;o<arguments.length;o++)Se(arguments[o],r.type);return Ee(r),r},createFactory:function(e){var t=Re.bind(null,e);return t.type=e,Object.defineProperty(t,"type",{enumerable:!1,get:function(){return P(!1,"Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},isValidElement:oe,version:"16.9.0",unstable_withSuspenseConfig:function(e,t){var n=I.suspense;I.suspense=void 0===t?null:t;try{e()}finally{I.suspense=n}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Y},_e=Object.freeze({default:Te}),Ae=_e&&Te||_e,Le=Ae.default||Ae;e.exports=Le}()})),de=r((function(e){"production"===process.env.NODE_ENV?e.exports=ie:e.exports=pe})),he=r((function(e,t){e.exports=function(){function e(t){return(e="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})(t)}var t=Object.prototype.toString,n=function(n){if(void 0===n)return"undefined";if(null===n)return"null";var o=e(n);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return function(e){return"GeneratorFunction"===r(e)}(n)?"generatorfunction":"function";if(function(e){return Array.isArray?Array.isArray(e):e instanceof Array}(n))return"array";if(function(e){return!(!e.constructor||"function"!=typeof e.constructor.isBuffer)&&e.constructor.isBuffer(e)}(n))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(n))return"arguments";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(n))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(n))return"error";if(function(e){return e instanceof RegExp||"string"==typeof e.flags&&"boolean"==typeof e.ignoreCase&&"boolean"==typeof e.multiline&&"boolean"==typeof e.global}(n))return"regexp";switch(r(n)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(e){return"function"==typeof e.throw&&"function"==typeof e.return&&"function"==typeof e.next}(n))return"generator";switch(o=t.call(n)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function r(e){return e.constructor?e.constructor.name:null}function o(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return i(e,t,r),a(e,t,r),function(e,t,r){var c=n(t),u=n(e);if("object"===c){if("object"!==u)throw new Error("[Type Error]: '".concat(r.join("."),"' require 'object' type, but got '").concat(u,"'"));Object.keys(t).forEach((function(n){var c=e[n],u=t[n],s=r.slice();s.push(n),i(c,u,s),a(c,u,s),o(c,u,s)}))}if("array"===c){if("array"!==u)throw new Error("[Type Error]: '".concat(r.join("."),"' require 'array' type, but got '").concat(u,"'"));e.forEach((function(n,c){var u=e[c],s=t[c]||t[0],l=r.slice();l.push(c),i(u,s,l),a(u,s,l),o(u,s,l)}))}}(e,t,r),e}function i(e,t,r){if("string"===n(t)){var o=n(e);if(!(-1<t.indexOf("|")?t.split("|").map((function(e){return e.toLowerCase().trim()})).filter(Boolean).some((function(e){return o===e})):t.toLowerCase().trim()===o))throw new Error("[Type Error]: '".concat(r.join("."),"' require '").concat(t,"' type, but got '").concat(o,"'"))}}function a(e,t,r){if("function"===n(t)){var o=t(e,n(e),r);if(!0!==o){var i=n(o);throw"string"===i?new Error(o):"error"===i?o:new Error("[Validator Error]: The scheme for '".concat(r.join("."),"' validator require return true, but got '").concat(o,"'"))}}}return o.kindOf=n,o}()})),ye=function(){function e(){i(this,e)}return c(e,[{key:"on",value:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this}},{key:"once",value:function(e,t,n){var r=this;function o(){r.off(e,o);for(var i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];t.apply(n,a)}return o._=t,this.on(e,o,n)}},{key:"emit",value:function(e){for(var t=((this.e||(this.e={}))[e]||[]).slice(),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];for(var i=0;i<t.length;i+=1)t[i].fn.apply(t[i].ctx,r);return this}},{key:"off",value:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,a=r.length;i<a;i+=1)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}}]),e}();function ve(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector(e)}function me(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return Array.from(t.querySelectorAll(e))}function ge(e,t){return e.classList.add(t)}function be(e,t){return e.classList.remove(t)}function we(e,t){return e.classList.contains(t)}function Oe(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild||e.lastChild}function ke(e,t,n){return e.style[t]=n,e}function xe(e,t){return Object.keys(t).forEach((function(n){ke(e,n,t[n])})),e}function je(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=window.getComputedStyle(e,null).getPropertyValue(t);return n?parseFloat(r):r}function Pe(e){return Array.from(e.parentElement.children).filter((function(t){return t!==e}))}function Se(e,t){Pe(e).forEach((function(e){return be(e,t)})),ge(e,t)}function Ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"up";e.setAttribute("aria-label",t),e.setAttribute("data-balloon-pos",n)}var Re=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},Ce=r((function(e){function t(n,r,o){return!function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?e.exports=t=function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&f(o,n.prototype),o}:e.exports=t=Reflect.construct,t.apply(null,arguments)}e.exports=t})),$e=function(e){function t(e,n){var r;return i(this,t),r=s(this,l(t).call(this,e)),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u(r),n||r.constructor),r.name="ArtPlayerError",r}return p(t,e),t}(r((function(e){function t(n){var r="function"==typeof Map?new Map:void 0;return e.exports=t=function(e){if(null===e||!Re(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return Ce(e,arguments,l(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),f(t,e)},t(n)}e.exports=t}))(Error));function De(e,t){if(!e)throw new $e(t);return e}function Te(e){return"WEBVTT \r\n\r\n".concat(e.replace(/{[\s\S]*?}/g,"").replace(/\{\\([ibu])\}/g,"</$1>").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"</$1>").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").concat("\r\n\r\n"))}function _e(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function Ae(e){var t=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function n(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(/[:.]/).map((function(e,t,n){if(t===n.length-1){if(1===e.length)return".".concat(e,"00");if(2===e.length)return".".concat(e,"0")}else if(1===e.length)return(0===t?"0":":0")+e;return 0===t?e:t===n.length-1?".".concat(e):":".concat(e)})).join("")}return"WEBVTT\n\n".concat(e.split(/\r?\n/).map((function(e){var r=e.match(t);return r?{start:n(r[1].trim()),end:n(r[2].trim()),text:r[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map((function(e){return e.trim()})).join("\n")}:null})).filter((function(e){return e})).map((function(e,t){return e?"".concat(t+1,"\n").concat(e.start," --\x3e ").concat(e.end,"\n").concat(e.text):""})).filter((function(e){return e.trim()})).join("\n\n"))}function Le(e){return e.includes("?")?Le(e.split("?")[0]):e.includes("#")?Le(e.split("#")[0]):e.trim().toLowerCase().split(".").pop()}function Me(e,t){var n=document.createElement("a");n.style.display="none",n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}var qe=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}};var ze=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var Ie=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var Ve=function(e){return qe(e)||ze(e)||Ie()},Fe=Object.defineProperty,We=Object.prototype.hasOwnProperty;function Ne(e,t){return We.call(e,t)}function He(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((function(e,t){return Object.getOwnPropertyNames(t).forEach((function(n){De(!Ne(e,n),"Target attribute name is duplicated: ".concat(n)),Fe(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}),e)}function Ue(){for(var e=function(e){return e&&"object"===o(e)&&!Array.isArray(e)},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce((function(t,n){return Object.keys(n).forEach((function(r){var o=t[r],i=n[r];Array.isArray(o)&&Array.isArray(i)?t[r]=o.concat.apply(o,Ve(i)):!e(o)||!e(i)||i instanceof Element?t[r]=i:t[r]=Ue(o,i)})),t}),{})}function Be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(t){return setTimeout(t,e)}))}function Ye(e,t,n){var r;function o(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];clearTimeout(r),r=setTimeout((function(){r=null,e.apply(n,i)}),t)}return o.clearTimeout=function(){clearTimeout(r)},o}function Xe(e,t){var n,r,o=!1;return function i(){for(var a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];if(o)return n=c,void(r=this);o=!0,e.apply(this,c),setTimeout((function(){o=!1,n&&(i.apply(r,n),n=null,r=null)}),t)}}function Ze(e,t,n){return Math.max(Math.min(e,Math.max(t,n)),Math.min(t,n))}function Je(e){var t=Math.floor(e/3600),n=Math.floor((e-3600*t)/60),r=Math.floor(e-3600*t-60*n);return(t>0?[t,n,r]:[n,r]).map((function(e){return e<10?"0".concat(e):String(e)})).join(":")}var Ge=Object.freeze({__proto__:null,query:ve,queryAll:me,addClass:ge,removeClass:be,hasClass:we,append:Oe,remove:function(e){return e.parentNode.removeChild(e)},setStyle:ke,setStyles:xe,getStyle:je,sublings:Pe,inverseClass:Se,tooltip:Ee,ArtPlayerError:$e,errorHandle:De,srtToVtt:Te,vttToBlob:_e,assToVtt:Ae,getExt:Le,downloadFile:Me,def:Fe,has:Ne,proxyPropertys:He,mergeDeep:Ue,sleep:Be,debounce:Ye,throttle:Xe,clamp:Ze,secondToTime:Je});function Qe(e,t,n){return De("string"===t||e instanceof Element,"".concat(n.join(".")," require 'string' or 'Element' type"))}var Ke={container:Qe,url:"string|function",poster:"string",title:"string",theme:"string",lang:"string",volume:"number",isLive:"boolean",muted:"boolean",autoplay:"boolean",autoSize:"boolean",loop:"boolean",flip:"boolean",playbackRate:"boolean",aspectRatio:"boolean",screenshot:"boolean",setting:"boolean",hotkey:"boolean",pip:"boolean",mutex:"boolean",fullscreen:"boolean",fullscreenWeb:"boolean",subtitleOffset:"boolean",miniProgressBar:"boolean",localVideo:"boolean",localSubtitle:"boolean",autoPip:"boolean",networkMonitor:"boolean",plugins:["function"],whitelist:["string|function|regexp"],layers:[{disable:"boolean|undefined",name:"string|undefined",index:"number|undefined",html:Qe,style:"object|undefined",click:"function|undefined",mounted:"function|undefined",tooltip:"string|undefined"}],contextmenu:[{disable:"boolean|undefined",name:"string|undefined",index:"number|undefined",html:Qe,style:"object|undefined",click:"function|undefined",mounted:"function|undefined",tooltip:"string|undefined"}],quality:[{default:"boolean|undefined",name:"string",url:"string"}],controls:[{disable:"boolean|undefined",name:"string|undefined",index:"number|undefined",html:Qe,style:"object|undefined",click:"function|undefined",mounted:"function|undefined",tooltip:"string|undefined",position:function(e,t,n){var r=["top","left","right"];return De(r.includes(e),"".concat(n.join(".")," only accept ").concat(r.toString()," as parameters"))}}],highlight:[{time:"number",text:"string"}],thumbnails:{url:"string",number:"number",width:"number",height:"number",column:"number"},subtitle:{url:"string",style:"object"},moreVideoAttr:"object",icons:"object",customType:"object"},et={video:{propertys:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"]}},tt=function e(t){var n=this;i(this,e);var r=t.constructor.kindOf,o=t.option.whitelist;this.userAgent=window.navigator.userAgent,this.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(this.userAgent),this.state=!this.isMobile||o.some((function(e){switch(r(e)){case"string":return n.userAgent.indexOf(e)>-1;case"function":return e(n.userAgent);case"regexp":return e.test(n.userAgent);default:return!1}}))},nt=function(){function e(t){var n=this;i(this,e),this.art=t,t.option.container instanceof Element?this.$container=t.option.container:(this.$container=ve(t.option.container),De(this.$container,"No container element found by ".concat(t.option.container))),De(t.constructor.instances.every((function(e){return e.template.$container!==n.$container})),"Cannot mount multiple instances on the same dom element"),De(this.$container.clientWidth&&this.$container.clientHeight,"The width and height of the container cannot be 0"),t.whitelist.state?this.initDesktop():this.initMobile()}return c(e,[{key:"query",value:function(e){return ve(e,this.$container)}},{key:"initDesktop",value:function(){this.$container.innerHTML='\n<div class="art-video-player art-subtitle-show art-layer-show" style="--theme: '.concat(this.art.option.theme,'"><video class="art-video"><track default kind="metadata"></track></video><div class="art-subtitle"></div><div class="art-danmuku"></div><div class="art-layers"></div><div class="art-mask"><div class="art-state"></div></div><div class="art-bottom"><div class="art-progress"></div><div class="art-controls"><div class="art-controls-left"></div><div class="art-controls-right"></div></div></div><div class="art-loading"></div><div class="art-notice"><div class="art-notice-inner"></div></div><div class="art-settings"><div class="art-setting-inner art-backdrop-filter"><div class="art-setting-body"></div></div></div><div class="art-info art-backdrop-filter"><div class="art-info-panel"><div class="art-info-item"><div class="art-info-title">Player version:</div><div class="art-info-content">3.1.20</div></div><div class="art-info-item"><div class="art-info-title">Video url:</div><div class="art-info-content" data-video="src"></div></div><div class="art-info-item"><div class="art-info-title">Video volume:</div><div class="art-info-content" data-video="volume"></div></div><div class="art-info-item"><div class="art-info-title">Video time:</div><div class="art-info-content" data-video="currentTime"></div></div><div class="art-info-item"><div class="art-info-title">Video duration:</div><div class="art-info-content" data-video="duration"></div></div><div class="art-info-item"><div class="art-info-title">Video resolution:</div><div class="art-info-content"><span data-video="videoWidth"></span> x <span data-video="videoHeight"></span></div></div></div><div class="art-info-close">[x]</div></div><div class="art-pip-header"><div class="art-pip-title"></div><div class="art-pip-close">×</div></div><div class="art-contextmenus art-backdrop-filter"></div>\n</div>'),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query(".art-video track"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$settingInner=this.query(".art-setting-inner"),this.$settingBody=this.query(".art-setting-body"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$pipHeader=this.query(".art-pip-header"),this.$pipTitle=this.query(".art-pip-title"),this.$pipClose=this.query(".art-pip-close"),this.$contextmenu=this.query(".art-contextmenus")}},{key:"initMobile",value:function(){this.$container.innerHTML='\n<div class="art-video-player"><video class="art-video"></video>\n</div>',this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video")}},{key:"destroy",value:function(e){e?this.$container.innerHTML="":ge(this.$player,"art-destroy")}}]),e}(),rt={"About author":"关于作者","Video info":"视频统计信息",Close:"关闭","Video load failed":"视频加载失败",Volume:"音量",Play:"播放",Pause:"暂停",Rate:"速度",Mute:"静音",Flip:"视频翻转",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新连接","Hide subtitle":"隐藏字幕","Show subtitle":"显示字幕","Hide danmu":"隐藏弹幕","Show danmu":"显示弹幕","Show setting":"显示设置","Hide setting":"隐藏设置",Screenshot:"截图","Play speed":"播放速度","Aspect ratio":"画面比例",Default:"默认",Normal:"正常",Open:"打开","Switch video":"切换","Switch subtitle":"切换字幕",Fullscreen:"全屏","Exit fullscreen":"退出全屏","Web fullscreen":"网页全屏","Exit web fullscreen":"退出网页全屏","Mini player":"迷你播放器","Does not support fullscreen":"不支持全屏","Local Subtitle":"本地字幕","Local Video":"本地视频","Subtitle offset time":"字幕偏移时间","No subtitles found":"未发现字幕"},ot={"About author":"關於作者","Video info":"影片統計訊息",Close:"關閉","Video load failed":"影片載入失敗",Volume:"音量",Play:"播放",Pause:"暫停",Rate:"速度",Mute:"靜音",Flip:"影片翻轉",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新連接","Hide subtitle":"隱藏字幕","Show subtitle":"顯示字幕","Hide danmu":"隱藏彈幕","Show danmu":"顯示彈幕","Show setting":"顯示设置","Hide setting":"隱藏设置",Screenshot:"截圖","Play speed":"播放速度","Aspect ratio":"畫面比例",Default:"默認",Normal:"正常",Open:"打開","Switch video":"切換","Switch subtitle":"切換字幕",Fullscreen:"全屏","Exit fullscreen":"退出全屏","Web fullscreen":"網頁全屏","Exit web fullscreen":"退出網頁全屏","Mini player":"迷你播放器","Does not support fullscreen":"不支持全屏","Local Subtitle":"本地字幕","Local Video":"本地視頻","Subtitle offset time":"字幕偏移時間","No subtitles found":"未發現字幕"},it=function(){function e(t){i(this,e),this.art=t,this.languages={"zh-cn":rt,"zh-tw":ot},this.init()}return c(e,[{key:"init",value:function(){var e=this.art.option.lang.toLowerCase();this.language=this.languages[e]||{}}},{key:"get",value:function(e){return this.language[e]||e}},{key:"update",value:function(e){this.languages=Ue(this.languages,e),this.init()}}]),e}();var at=r((function(e){!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},n=e.exports,r=function(){for(var e,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],r=0,o=n.length,i={};r<o;r++)if((e=n[r])&&e[1]in t){for(r=0;r<e.length;r++)i[n[0][r]]=e[r];return i}return!1}(),o={change:r.fullscreenchange,error:r.fullscreenerror},i={request:function(e){return new Promise(function(n,o){var i=function(){this.off("change",i),n()}.bind(this);this.on("change",i),e=e||t.documentElement,Promise.resolve(e[r.requestFullscreen]()).catch(o)}.bind(this))},exit:function(){return new Promise(function(e,n){if(this.isFullscreen){var o=function(){this.off("change",o),e()}.bind(this);this.on("change",o),Promise.resolve(t[r.exitFullscreen]()).catch(n)}else e()}.bind(this))},toggle:function(e){return this.isFullscreen?this.exit():this.request(e)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(e,n){var r=o[e];r&&t.addEventListener(r,n,!1)},off:function(e,n){var r=o[e];r&&t.removeEventListener(r,n,!1)},raw:r};r?(Object.defineProperties(i,{isFullscreen:{get:function(){return Boolean(t[r.fullscreenElement])}},element:{enumerable:!0,get:function(){return t[r.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(t[r.fullscreenEnabled])}}}),n?e.exports=i:window.screenfull=i):n?e.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()}));at.isEnabled;function ct(e,t){var n=e.template.$video;document.pictureInPictureEnabled?function(e,t){var n=e.template.$video,r=e.events.proxy,o=e.notice;n.disablePictureInPicture=!1,Fe(t,"pip",{get:function(){return document.pictureInPictureElement},set:function(e){e?n.requestPictureInPicture().catch((function(e){throw o.show(e),e})):document.exitPictureInPicture().catch((function(e){throw o.show(e),e}))}}),r(n,"enterpictureinpicture",(function(){e.emit("pipEnabled")})),r(n,"leavepictureinpicture",(function(){e.emit("pipExit")})),e.on("destroy",(function(){t.pip&&(t.pip=!1)}))}(e,t):n.webkitSupportsPresentationMode?function(e,t){var n=e.template.$video;n.webkitSetPresentationMode("inline"),Fe(t,"pip",{get:function(){return"picture-in-picture"===n.webkitPresentationMode},set:function(t){t?(n.webkitSetPresentationMode("picture-in-picture"),e.emit("pipEnabled")):(n.webkitSetPresentationMode("inline"),e.emit("pipExit"))}})}(e,t):function(e,t){var n=e.option,r=e.i18n,o=e.template,i=o.$player,a=o.$pipClose,c=o.$pipTitle,u=o.$pipHeader,s=e.events.proxy,l="",f=!1,p=0,d=0,h=0,y=0;s(u,"mousedown",(function(e){f=!0,p=e.pageX,d=e.pageY,h=t.left,y=t.top})),s(u,"mousemove",(function(e){f&&(ge(i,"art-is-dragging"),ke(i,"left","".concat(h+e.pageX-p,"px")),ke(i,"top","".concat(y+e.pageY-d,"px")))})),s(document,"mouseup",(function(){f=!1,be(i,"art-is-dragging")})),s(a,"click",(function(){t.pip=!1,f=!1,be(i,"art-is-dragging")})),Oe(c,n.title||r.get("Mini player"));var v={get:function(){return we(i,"art-pip")},set:function(n){if(n){t.autoSize=!1,l=i.style.cssText,ge(i,"art-pip");var r=document.body;ke(i,"top","".concat(r.clientHeight-t.height-50,"px")),ke(i,"left","".concat(r.clientWidth-t.width-50,"px")),t.fullscreen=!1,t.fullscreenWeb=!1,t.aspectRatio=!1,t.playbackRate=!1,e.emit("pipEnabled")}else t.pip&&(i.style.cssText=l,be(i,"art-pip"),ke(i,"top",null),ke(i,"left",null),t.fullscreen=!1,t.fullscreenWeb=!1,t.aspectRatio=!1,t.playbackRate=!1,t.autoSize=!0,e.emit("pipExit"))}};Fe(t,"pip",v)}(e,t),Fe(t,"pipToggle",{set:function(e){e&&(t.pip=!t.pip)}})}var ut=function e(t){var n;i(this,e),function(e,t){var n=e.option,r=n.type,o=n.customType,i=e.template.$video;Fe(t,"url",{get:function(){return i.src},set:function(){De(!1,"You should use this method: art.attachUrl()")}}),Fe(t,"attachUrl",{value:function(t){return Be().then((function(){function n(t){var n=r||Le(t),a=o[n];return n&&a?(e.loading.show=!0,e.emit("beforeCustomType",n),a.call(e,i,t,e),e.emit("afterCustomType",n)):(e.emit("beforeAttachUrl",t),i.src=t,e.emit("afterAttachUrl",t)),Promise.resolve(t)}if("function"==typeof t){var a=t.call(e);return De("function"==typeof a.then,"If url is a function, it needs to return a promise."),a.then((function(t){return e.loading.show=!0,n(t)}))}return n(t)}))}})}(t,this),function(e,t){var n=e.option,r=e.events.proxy,o=e.template,i=o.$player,a=o.$video,c=e.i18n,u=e.notice,s=0;r(a,"click",(function(){t.toggle=!0})),et.video.events.forEach((function(t){r(a,t,(function(t){e.emit("video:".concat(t.type),t)}))})),e.on("video:canplay",(function(){s=0,e.controls.show=!0,e.mask.show=!0,e.loading.show=!1})),e.once("video:canplay",(function(){e.emit("ready")})),e.on("video:ended",(function(){e.controls.show=!0,e.mask.show=!0,n.loop&&(t.seek=0,t.play=!0)})),e.on("video:error",(function(){s<5?Be(1e3).then((function(){s+=1,t.attachUrl(n.url),u.show("".concat(c.get("Reconnect"),": ").concat(s))})):(e.loading.show=!1,e.controls.show=!1,ge(i,"art-error"),Be(1e3).then((function(){u.show(c.get("Video load failed"),!1),e.destroy()})))})),e.on("video:loadedmetadata",(function(){n.autoSize&&(t.autoSize=!0)})),e.on("video:loadstart",(function(){e.loading.show=!0})),e.on("video:pause",(function(){e.controls.show=!0,e.mask.show=!0})),e.on("video:play",(function(){e.mask.show=!1})),e.on("video:playing",(function(){e.mask.show=!1})),e.on("video:seeked",(function(){e.loading.show=!1})),e.on("video:seeking",(function(){e.loading.show=!0})),e.on("video:timeupdate",(function(){e.mask.show=!1})),e.on("video:waiting",(function(){e.loading.show=!0}))}(t,this),function(e,t){var n=e.option,r=e.template.$video;Object.keys(n.moreVideoAttr).forEach((function(e){r[e]=n.moreVideoAttr[e]})),n.muted&&(r.muted=n.muted),n.volume&&(r.volume=Ze(n.volume,0,1)),n.poster&&(r.poster=n.poster),n.autoplay&&(r.autoplay=n.autoplay),r.controls=!1,t.attachUrl(n.url)}(t,this),function(e,t){var n=e.template.$video,r=e.i18n,o=e.notice,i=e.option.mutex;Fe(t,"play",{set:function(a){if(a){var c=n.play();void 0!==c&&c.then().catch((function(e){throw o.show(e,!0,3e3),e})),i&&e.constructor.instances.filter((function(t){return t!==e})).forEach((function(e){e.player.pause=!0})),o.show(r.get("Play")),e.emit("play")}else t.pause=!0}})}(t,this),function(e,t){var n=e.template.$video,r=e.i18n,o=e.notice;Fe(t,"pause",{get:function(){return n.paused},set:function(i){i?(n.pause(),o.show(r.get("Pause")),e.emit("pause")):t.play=!0}})}(t,this),Fe(n=this,"toggle",{set:function(e){e&&(n.playing?n.pause=!0:n.play=!0)}}),function(e,t){var n=e.notice;Fe(t,"seek",{set:function(r){t.currentTime=r,n.show("".concat(Je(r)," / ").concat(Je(t.duration))),e.emit("seek",r)}})}(t,this),function(e,t){var n=e.template.$video,r=e.i18n,o=e.notice,i=e.storage;Fe(t,"volume",{get:function(){return n.volume||0},set:function(t){n.volume=Ze(t,0,1),o.show("".concat(r.get("Volume"),": ").concat(parseInt(100*n.volume,10))),0!==n.volume&&i.set("volume",n.volume),e.emit("volume",n.volume)}}),Fe(t,"muted",{get:function(){return n.muted},set:function(t){n.muted=t,e.emit("volume",n.volume)}})}(t,this),function(e,t){Fe(t,"currentTime",{get:function(){return e.template.$video.currentTime||0},set:function(n){e.template.$video.currentTime=Ze(n,0,t.duration)}})}(t,this),function(e,t){Fe(t,"duration",{get:function(){return e.template.$video.duration||0}})}(t,this),function(e,t){var n=e.i18n,r=e.notice,o=e.option;Fe(t,"switchQuality",{value:function(i,a){if(i!==t.url){URL.revokeObjectURL(t.url);var c=t.currentTime,u=t.playing;return t.attachUrl(i).then((function(){o.url=i,t.playbackRate=!1,t.aspectRatio=!1,e.on("ready",(function(){t.currentTime=c})),u&&(t.play=!0),a&&r.show("".concat(n.get("Switch video"),": ").concat(a)),e.emit("switch",i)}))}return null}}),Fe(t,"switchUrl",{value:function(i,a){if(i!==t.url){URL.revokeObjectURL(t.url);var c=t.playing;return t.attachUrl(i).then((function(){o.url=i,t.playbackRate=!1,t.aspectRatio=!1,e.on("ready",(function(){t.currentTime=0})),c&&(t.play=!0),a&&r.show("".concat(n.get("Switch video"),": ").concat(a)),e.emit("switch",i)}))}return null}})}(t,this),function(e,t){var n=e.template,r=n.$video,o=n.$player,i=e.i18n,a=e.notice;Fe(t,"playbackRate",{get:function(){return o.dataset.playbackRate},set:function(n){if(n){var c=[.5,.75,1,1.25,1.5,1.75,2];if(De(c.includes(n),"'playbackRate' only accept ".concat(c.toString()," as parameters")),n===o.dataset.playbackRate)return;r.playbackRate=n,o.dataset.playbackRate=n,a.show("".concat(i.get("Rate"),": ").concat(1===n?i.get("Normal"):"".concat(n,"x"))),e.emit("playbackRateChange",n)}else t.playbackRate&&(t.playbackRate=1,delete o.dataset.playbackRate,e.emit("playbackRateRemove"))}}),Fe(t,"playbackRateReset",{set:function(n){if(n){var r=o.dataset.playbackRate;r&&(t.playbackRate=Number(r),e.emit("playbackRateReset"))}}})}(t,this),function(e,t){var n=e.template,r=n.$video,o=n.$player,i=e.i18n,a=e.notice;Fe(t,"aspectRatio",{get:function(){return o.dataset.aspectRatio||""},set:function(n){if(n){var c=["default","4:3","16:9"];if(De(c.includes(n),"'aspectRatio' only accept ".concat(c.toString()," as parameters")),"default"===n)t.aspectRatio=!1;else{var u=n.split(":"),s=r.videoWidth,l=r.videoHeight,f=o.clientWidth,p=o.clientHeight,d=s/l,h=u[0]/u[1];if(d>h){var y=h*l/s;ke(r,"width","".concat(100*y,"%")),ke(r,"height","100%"),ke(r,"padding","0 ".concat((f-f*y)/2,"px"))}else{var v=s/h/l;ke(r,"width","100%"),ke(r,"height","".concat(100*v,"%")),ke(r,"padding","".concat((p-p*v)/2,"px 0"))}}o.dataset.aspectRatio=n,a.show("".concat(i.get("Aspect ratio"),": ").concat("default"===n?i.get("Default"):n)),e.emit("aspectRatioChange",n)}else t.aspectRatio&&(ke(r,"width",null),ke(r,"height",null),ke(r,"padding",null),delete o.dataset.aspectRatio,e.emit("aspectRatioRemove"))}}),Fe(t,"aspectRatioReset",{set:function(n){if(n&&t.aspectRatio){var r=t.aspectRatio;t.aspectRatio=r,e.emit("aspectRatioReset")}}})}(t,this),function(e,t){var n=e.option,r=e.notice,o=e.template.$video;Fe(t,"getScreenshotDataURL",{value:function(){try{var e=document.createElement("canvas");return e.width=o.videoWidth,e.height=o.videoHeight,e.getContext("2d").drawImage(o,0,0),e.toDataURL("image/png")}catch(e){throw r.show(e),e}}}),Fe(t,"getScreenshotBlobUrl",{value:function(){return new Promise((function(e,t){try{var n=document.createElement("canvas");n.width=o.videoWidth,n.height=o.videoHeight,n.getContext("2d").drawImage(o,0,0),n.toBlob((function(t){e(URL.createObjectURL(t))}))}catch(e){r.show(e),t(e)}}))}}),Fe(t,"screenshot",{value:function(){var r=t.getScreenshotDataURL();r&&(Me(r,"".concat(n.title||"artplayer","_").concat(Je(o.currentTime),".png")),e.emit("screenshot",r))}})}(t,this),function(e,t){var n=e.i18n,r=e.notice,o=e.events.destroyEvents,i=e.template.$player,a=function(){e.emit("fullscreenChange",at.isFullscreen)},c=function(){r.show(n.get("Does not support fullscreen"))};t.fullscreenIsEnabled&&(at.on("change",a),at.on("error",c),o.push((function(){at.off("change",a),at.off("error",c)}))),Fe(t,"fullscreen",{get:function(){return at.isFullscreen},set:function(n){t.fullscreenIsEnabled?n?(t.fullscreenWeb&&(t.fullscreenWeb=!1),at.request(i).then((function(){ge(i,"art-fullscreen"),t.aspectRatioReset=!0,e.emit("fullscreenEnabled")}))):(t.fullscreenWeb&&(t.fullscreenWeb=!1),at.exit().then((function(){be(i,"art-fullscreen"),t.aspectRatioReset=!0,e.emit("fullscreenExit")}))):c()}}),Fe(t,"fullscreenToggle",{set:function(e){e&&(t.fullscreen=!t.fullscreen)}}),Fe(t,"fullscreenIsEnabled",{get:function(){return at.isEnabled}})}(t,this),function(e,t){var n=e.template.$player;Fe(t,"fullscreenWeb",{get:function(){return we(n,"art-web-fullscreen")},set:function(r){r?(t.fullscreen&&(t.fullscreen=!1),ge(n,"art-web-fullscreen"),t.aspectRatioReset=!0,e.emit("fullscreenWebEnabled")):(t.fullscreen&&(t.fullscreen=!1),be(n,"art-web-fullscreen"),t.aspectRatioReset=!0,e.emit("fullscreenWebExit"))}}),Fe(t,"fullscreenWebToggle",{set:function(e){e&&(t.fullscreenWeb=!t.fullscreenWeb)}})}(t,this),ct(t,this),function(e,t){var n=e.template.$video;Fe(t,"loaded",{get:function(){return n.buffered.length?n.buffered.end(n.buffered.length-1)/n.duration:0}}),Fe(t,"loadedTime",{get:function(){return n.buffered.length?n.buffered.end(n.buffered.length-1):0}})}(t,this),function(e,t){Fe(t,"played",{get:function(){return e.template.$video.currentTime/e.template.$video.duration}})}(t,this),function(e,t){var n=e.template.$video;Fe(t,"playing",{get:function(){return!!(n.currentTime>0&&!n.paused&&!n.ended&&n.readyState>2)}})}(t,this),function(e,t){var n=e.template,r=n.$container,o=n.$player,i=n.$video;Fe(t,"autoSize",{get:function(){return we(r,"art-auto-size")},set:function(n){if(n){var a=i.videoWidth,c=i.videoHeight,u=r.getBoundingClientRect(),s=u.width,l=u.height,f=a/c,p=s/l;if(ge(r,"art-auto-size"),p>f){ke(o,"width","".concat(l*f/s*100,"%")),ke(o,"height","100%")}else{var d=s/f/l*100;ke(o,"width","100%"),ke(o,"height","".concat(d,"%"))}e.emit("autoSizeChange",{width:t.width,height:t.height})}else be(r,"art-auto-size"),ke(o,"width",null),ke(o,"height",null),e.emit("autoSizeRemove")}})}(t,this),function(e,t){Fe(t,"rect",{get:function(){return e.template.$player.getBoundingClientRect()}}),["bottom","height","left","right","top","width"].forEach((function(e){Fe(t,e,{get:function(){return t.rect[e]}})})),Fe(t,"x",{get:function(){return t.left+window.pageXOffset}}),Fe(t,"y",{get:function(){return t.top+window.pageYOffset}})}(t,this),function(e,t){Fe(t,"flip",{get:function(){return e.template.$player.dataset.flip},set:function(t){if(t){var n=["normal","horizontal","vertical"];De(n.includes(t),"'flip' only accept ".concat(n.toString()," as parameters")),e.template.$player.dataset.flip=t,e.emit("flipChange",t)}else delete e.template.$player.dataset.flip,e.emit("flipRemove")}})}(t,this),He(t,this)};var st=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e},lt=r((function(e){function t(n,r,o){return"undefined"!=typeof Reflect&&Reflect.get?e.exports=t=Reflect.get:e.exports=t=function(e,t,n){var r=st(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}},t(n,r,o||n)}e.exports=t})),ft=function(){function e(t){i(this,e),this.id=0,this.art=t,this.add=this.add.bind(this),this.name=this.constructor.name.toLowerCase()}return c(e,[{key:"toggle",value:function(){this.show=!this.show}},{key:"add",value:function(e,t){var n=this,r="function"==typeof e?e(this.art):e;if(!this.$parent||r.disable)return{};this.id+=1;var o=r.name||"".concat(this.name).concat(this.id);De(!Ne(this,o),"Cannot add a component that already has the same name: ".concat(o));var i=document.createElement("div");i.classList.value="art-".concat(this.name," art-").concat(this.name,"-").concat(o),r.html&&Oe(i,r.html),r.style&&xe(i,r.style),r.tooltip&&Ee(i,r.tooltip);var a=Array.from(this.$parent.children);i.dataset.index=r.index||this.id;var c=a.find((function(e){return Number(e.dataset.index)>=Number(i.dataset.index)}));return c?c.insertAdjacentElement("beforebegin",i):Oe(this.$parent,i),r.click&&this.art.events.proxy(i,"click",(function(e){e.preventDefault(),r.click.call(n.art,n,e)})),r.mounted&&r.mounted(i,this,this.art),t&&t(i,this,this.art),Fe(this,o,{value:{get $ref(){return i},set show(e){ke(i,"display",e?"block":"none")}}}),this.art.emit("".concat(this.name,":add"),r),this[o]}},{key:"show",get:function(){return we(this.art.template.$player,"art-".concat(this.name,"-show"))},set:function(e){De(!1===e||!0===e,"The show attribute expects a boolean value");var t=this.art.template.$player,n="art-".concat(this.name,"-show");e?ge(t,n):be(t,n),this.art.emit("".concat(this.name,":toggle"),e)}}]),e}();function pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dt(e){return function(t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pt(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pt(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{mounted:function(e){var n=t.events.proxy,r=t.icons,o=t.i18n,i=t.player,a=Oe(e,r.fullscreen);Ee(a,o.get("Fullscreen")),n(e,"click",(function(){i.fullscreenToggle=!0})),t.on("fullscreenEnabled",(function(){ke(a,"opacity","0.8"),Ee(a,o.get("Exit fullscreen"))})),t.on("fullscreenExit",(function(){ke(a,"opacity","1"),Ee(a,o.get("Fullscreen"))}))}})}}function ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yt(e){return function(t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ht(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ht(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{mounted:function(e){var n=t.events.proxy,r=t.icons,o=t.i18n,i=t.player,a=Oe(e,r.fullscreenWeb);Ee(a,o.get("Web fullscreen")),n(e,"click",(function(){i.fullscreenWebToggle=!0})),t.on("fullscreenWebEnabled",(function(){ke(a,"opacity","0.8"),Ee(a,o.get("Exit web fullscreen"))})),t.on("fullscreenWebExit",(function(){ke(a,"opacity","1"),Ee(a,o.get("Web fullscreen"))}))}})}}function vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mt(e){return function(t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vt(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vt(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{mounted:function(e){var n=t.events.proxy,r=t.icons,o=t.i18n,i=t.player;Ee(Oe(e,r.pip),o.get("Mini player")),n(e,"click",(function(){i.pip=!0}))}})}}function gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bt(e){return function(t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gt(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gt(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{mounted:function(e){var n=t.events.proxy,r=t.icons,o=t.i18n,i=t.player,a=Oe(e,r.play),c=Oe(e,r.pause);function u(){ke(a,"display","flex"),ke(c,"display","none")}function s(){ke(a,"display","none"),ke(c,"display","flex")}Ee(a,o.get("Play")),Ee(c,o.get("Pause")),n(a,"click",(function(){i.play=!0})),n(c,"click",(function(){i.pause=!0})),i.playing?s():u(),t.on("video:playing",(function(){s()})),t.on("video:pause",(function(){u()}))}})}}function wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ot(e,t){var n=e.template.$progress,r=e.player,o=n.getBoundingClientRect().left,i=Ze(t.pageX-o,0,n.clientWidth),a=i/n.clientWidth*r.duration;return{second:a,time:Je(a),width:i,percentage:Ze(i/n.clientWidth,0,1)}}function kt(e){return function(t){var r=t.option,o=r.highlight,i=r.theme,a=t.events.proxy,c=t.player;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wt(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wt(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{html:'\n<div class="art-control-progress-inner"><div class="art-progress-loaded"></div><div class="art-progress-played" style="background: '.concat(i,'"></div><div class="art-progress-highlight"></div><div class="art-progress-indicator" style="background: ').concat(i,'"></div><div class="art-progress-tip art-tip"></div>\n</div>'),mounted:function(e){var n=!1,r=ve(".art-progress-loaded",e),i=ve(".art-progress-played",e),u=ve(".art-progress-highlight",e),s=ve(".art-progress-indicator",e),l=ve(".art-progress-tip",e);function f(e,t){"loaded"===e&&ke(r,"width","".concat(100*t,"%")),"played"===e&&(ke(i,"width","".concat(100*t,"%")),ke(s,"left","calc(".concat(100*t,"% - ").concat(je(s,"width")/2,"px)")))}o.forEach((function(e){var t=Ze(e.time,0,c.duration)/c.duration*100;Oe(u,'<span data-text="'.concat(e.text,'" data-time="').concat(e.time,'" style="left: ').concat(t,'%"></span>'))})),f("loaded",c.loaded),t.on("video:progress",(function(){f("loaded",c.loaded)})),t.on("video:timeupdate",(function(){f("played",c.played)})),t.on("video:ended",(function(){f("played",1)})),a(e,"mousemove",(function(n){ke(l,"display","block"),n.composedPath().indexOf(u)>-1?function(n){var r=Ot(t,n).width,o=n.target.dataset.text;l.innerHTML=o;var i=l.clientWidth;r<=i/2?ke(l,"left",0):r>e.clientWidth-i/2?ke(l,"left","".concat(e.clientWidth-i,"px")):ke(l,"left","".concat(r-i/2,"px"))}(n):function(n){var r=Ot(t,n),o=r.width,i=r.time;l.innerHTML=i;var a=l.clientWidth;o<=a/2?ke(l,"left",0):o>e.clientWidth-a/2?ke(l,"left","".concat(e.clientWidth-a,"px")):ke(l,"left","".concat(o-a/2,"px"))}(n)})),a(e,"mouseout",(function(){ke(l,"display","none")})),a(e,"click",(function(e){if(e.target!==s){var n=Ot(t,e),r=n.second;f("played",n.percentage),c.seek=r}})),a(s,"mousedown",(function(){n=!0})),a(document,"mousemove",(function(e){if(n){var r=Ot(t,e),o=r.second,i=r.percentage;ge(s,"art-show-indicator"),f("played",i),c.seek=o}})),a(document,"mouseup",(function(){n&&(n=!1,be(s,"art-show-indicator"))}))}})}}function xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jt(e){return function(t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xt(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xt(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{mounted:function(e){var n=t.events.proxy,r=t.icons,o=t.i18n,i=t.subtitle,a=Oe(e,r.subtitle);Ee(a,o.get("Hide subtitle")),n(e,"click",(function(){i.toggle()})),t.on("subtitle:toggle",(function(e){e?(ke(a,"opacity","1"),Ee(a,o.get("Hide subtitle"))):(ke(a,"opacity","0.8"),Ee(a,o.get("Show subtitle")))}))}})}}function Pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function St(e){return function(t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pt(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pt(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{mounted:function(e){function n(){var n="".concat(Je(t.player.currentTime)," / ").concat(Je(t.player.duration));n!==e.innerHTML&&(e.innerHTML=n)}n(),["video:loadedmetadata","video:timeupdate","video:progress"].forEach((function(e){t.on(e,n)}))}})}}function Et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rt(e){return function(t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Et(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Et(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{mounted:function(e){var n=t.events.proxy,r=t.icons,o=t.player,i=t.i18n,a=!1,c=Oe(e,r.volume),u=Oe(e,r.volumeClose),s=Oe(e,'<div class="art-volume-panel"></div>'),l=Oe(s,'<div class="art-volume-slider-handle"></div>');function f(e){var t=s.getBoundingClientRect(),n=t.left,r=t.width,o=l.getBoundingClientRect().width;return Ze(e.pageX-n-o/2,0,r-o/2)/(r-o)}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.7;if(o.muted||0===e)ke(c,"display","none"),ke(u,"display","flex"),ke(l,"left","0");else{var t=((je(s,"width")||60)-je(l,"width"))*e;ke(c,"display","flex"),ke(u,"display","none"),ke(l,"left","".concat(t,"px"))}}Ee(c,i.get("Mute")),ke(u,"display","none"),p(o.volume),t.on("video:volumechange",(function(){p(o.volume)})),n(c,"click",(function(){o.muted=!0})),n(u,"click",(function(){o.muted=!1})),n(s,"click",(function(e){o.muted=!1,o.volume=f(e)})),n(l,"mousedown",(function(){a=!0})),n(document,"mousemove",(function(e){a&&(o.muted=!1,o.volume=f(e))})),n(document,"mouseup",(function(){a&&(a=!1)}))}})}}function Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $t(e){return function(t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ct(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ct(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{mounted:function(e){var n=t.events.proxy,r=t.icons,o=t.i18n,i=t.setting,a=Oe(e,r.setting);Ee(a,o.get("Show setting")),n(e,"click",(function(){i.toggle()})),t.on("setting:toggle",(function(e){e?(ke(a,"opacity","0.8"),Ee(a,o.get("Hide setting"))):(ke(a,"opacity","1"),Ee(a,o.get("Show setting")))}))}})}}function Dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tt(e){return function(t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Dt(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dt(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{mounted:function(e){var n=t.option.thumbnails,r=t.template.$progress,o=t.events,i=o.proxy,a=o.loadImg,c=!1,u=!1;i(r,"mousemove",(function(o){c||(c=!0,a(n.url).then((function(){u=!0}))),u&&(ke(e,"display","block"),function(o){var i=Ot(t,o).width,a=n.url,c=n.height,u=n.width,s=n.number,l=n.column,f=r.clientWidth/s,p=Math.floor(i/f),d=Math.ceil(p/l)-1,h=p%l||l-1;ke(e,"backgroundImage","url(".concat(a,")")),ke(e,"height","".concat(c,"px")),ke(e,"width","".concat(u,"px")),ke(e,"backgroundPosition","-".concat(h*u,"px -").concat(d*c,"px")),i<=u/2?ke(e,"left",0):i>r.clientWidth-u/2?ke(e,"left","".concat(r.clientWidth-u,"px")):ke(e,"left","".concat(i-u/2,"px"))}(o))})),i(r,"mouseout",(function(){ke(e,"display","none")}))}})}}function _t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function At(e){return function(t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_t(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_t(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{mounted:function(e){var n=t.events.proxy,r=t.icons,o=t.i18n,i=t.player,a=Oe(e,r.screenshot);Ee(a,o.get("Screenshot")),n(a,"click",(function(){i.screenshot()}))}})}}function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mt(e){return function(t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lt(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lt(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{mounted:function(e){var n=t.option.quality,r=t.events,o=r.proxy,i=r.hover,a=t.player,c=-1,u=n.find((function(e){return e.default}))||n[0];c=n.indexOf(u);var s=Oe(e,'<div class="art-quality-name">'.concat(u.name,"</div>")),l=n.map((function(e,t){return'<div class="art-quality-item" data-index="'.concat(t,'">').concat(e.name,"</div>")})).join(""),f=Oe(e,'<div class="art-qualitys">'.concat(l,"</div>"));i(e,(function(){f.style.left="-".concat(je(f,"width")/2-e.clientWidth/2,"px")})),o(f,"click",(function(e){var t=Number(e.target.dataset.index),r=n[t],o=r.url,i=r.name;o&&i&&c!==t&&(a.switchQuality(o,i),s.innerHTML=i,c=t)}))}})}}var qt=function(e){function t(e){var n;i(this,t),n=s(this,l(t).call(this,e));var r=e.option;return e.on("ready",(function(){n.add(kt({name:"progress",disable:r.isLive,position:"top",index:10})),n.add(Tt({name:"thumbnails",disable:!r.thumbnails.url||r.isLive,position:"top",index:20})),n.add(bt({name:"playAndPause",disable:!1,position:"left",index:10})),n.add(Rt({name:"volume",disable:!1,position:"left",index:20})),n.add(St({name:"time",disable:r.isLive,position:"left",index:30})),n.add(Mt({name:"quality",disable:0===r.quality.length,position:"right",index:10})),n.add(At({name:"screenshot",disable:!r.screenshot,position:"right",index:20})),n.add(jt({name:"subtitle",disable:!r.subtitle.url,position:"right",index:30})),n.add($t({name:"setting",disable:!r.setting,position:"right",index:40})),n.add(mt({name:"pip",disable:!r.pip,position:"right",index:50})),n.add(yt({name:"fullscreenWeb",disable:!r.fullscreenWeb,position:"right",index:60})),n.add(dt({name:"fullscreen",disable:!r.fullscreen,position:"right",index:70})),r.controls.forEach((function(e){n.add(e)}))})),n}return p(t,e),c(t,[{key:"add",value:function(e,n){var r="function"==typeof e?e(this.art):e;De(r.position,"Controls option.position can not be empty");var o=this.art.template,i=o.$progress,a=o.$controlsLeft,c=o.$controlsRight;switch(r.position){case"top":this.$parent=i;break;case"left":this.$parent=a;break;case"right":this.$parent=c}var u=lt(l(t.prototype),"add",this).call(this,r,n);return r.disable||"top"===r.position||u.$ref.firstElementChild&&"I"===u.$ref.firstElementChild.tagName||ge(u.$ref,"art-control-onlyText"),u}}]),t}(ft);function zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function It(e){return function(t){var r=t.i18n,o=t.player;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zt(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zt(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{html:"\n".concat(r.get("Play speed"),':\n<span data-rate="0.5">0.5</span>\n<span data-rate="0.75">0.75</span>\n<span data-rate="1.0" class="art-current">').concat(r.get("Normal"),'</span>\n<span data-rate="1.25">1.25</span>\n<span data-rate="1.5">1.5</span>\n<span data-rate="2.0">2.0</span>'),click:function(e,t){var n=t.target.dataset.rate;n&&(o.playbackRate=Number(n),e.show=!1)},mounted:function(e){t.on("playbackRateChange",(function(t){var n=me("span",e).find((function(e){return Number(e.dataset.rate)===t}));n&&Se(n,"art-current")}))}})}}function Vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ft(e){return function(t){var r=t.i18n,o=t.player;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vt(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vt(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{html:"\n".concat(r.get("Aspect ratio"),':\n<span data-ratio="default" class="art-current">').concat(r.get("Default"),'</span>\n<span data-ratio="4:3">4:3</span>\n<span data-ratio="16:9">16:9</span>'),click:function(e,t){var n=t.target.dataset.ratio;n&&(o.aspectRatio=n,e.show=!1)},mounted:function(e){t.on("aspectRatioChange",(function(t){var n=me("span",e).find((function(e){return e.dataset.ratio===t}));n&&Se(n,"art-current")}))}})}}function Wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nt(e){return function(t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wt(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wt(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{html:t.i18n.get("Video info"),click:function(e){t.info.show=!0,e.show=!1}})}}function Ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ut(e){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ht(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ht(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{html:'<a href="https://artplayer.org" target="_blank">ArtPlayer 3.1.20</a>'})}function Bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yt(e){return function(t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bt(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bt(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{html:t.i18n.get("Close"),click:function(e){e.show=!1}})}}var Xt=function(e){function t(e){var n;i(this,t),n=s(this,l(t).call(this,e));var r=e.option,o=e.template,a=o.$player,c=o.$contextmenu,u=e.events.proxy;return n.$parent=c,e.on("ready",(function(){n.add(It({disable:!r.playbackRate,name:"playbackRate",index:10})),n.add(Ft({disable:!r.aspectRatio,name:"aspectRatio",index:20})),n.add(Nt({disable:!1,name:"info",index:30})),n.add(Ut({disable:!1,name:"version",index:40})),n.add(Yt({disable:!1,name:"close",index:50})),r.contextmenu.forEach((function(e){n.add(e)})),u(a,"contextmenu",(function(e){e.preventDefault(),n.show=!0;var t=e.clientX,r=e.clientY,o=a.getBoundingClientRect(),i=o.height,u=o.width,s=o.left,l=o.top,f=c.getBoundingClientRect(),p=f.height,d=f.width,h=t-s,y=r-l;t+d>s+u&&(h=u-d),r+p>l+i&&(y=i-p),ke(c,"left","".concat(h,"px")),ke(c,"top","".concat(y,"px"))})),u(a,"click",(function(e){e.composedPath().includes(c)||(n.show=!1)})),e.on("blur",(function(){n.show=!1}))})),n}return p(t,e),t}(ft),Zt=function(e){function t(e){var n;i(this,t),n=s(this,l(t).call(this,e));var r=e.template,o=r.$infoPanel,a=r.$infoClose,c=r.$video;(0,e.events.proxy)(a,"click",(function(){n.show=!1}));var u=null,f=me("[data-video]",o);return e.on("destroy",(function(){clearTimeout(u)})),e.on("info:toggle",(function(e){clearTimeout(u),e&&function e(){f.forEach((function(e){var t=c[e.dataset.video];e.innerHTML="number"==typeof t?t.toFixed(2):t})),u=setTimeout((function(){e()}),1e3)}()})),n}return p(t,e),t}(ft),Jt=function(e){function t(e){var n;i(this,t),n=s(this,l(t).call(this,e));var r=e.events.proxy,o=e.option.subtitle;return xe(e.template.$subtitle,o.style),r(n.textTrack,"cuechange",n.update.bind(u(n))),o.url&&n.init(o.url),n}return p(t,e),c(t,[{key:"update",value:function(){var e=this.art.template.$subtitle;e.innerHTML="",this.activeCue&&(e.innerHTML=this.activeCue.text.split(/\r?\n/).map((function(e){return"<p>".concat(e,"</p>")})).join(""),this.art.emit("subtitle:update",this.activeCue.text))}},{key:"switch",value:function(e,t){var n=this,r=this.art,o=r.i18n,i=r.notice;return this.init(e).then((function(e){return t&&i.show("".concat(o.get("Switch subtitle"),": ").concat(t)),n.art.emit("subtitle:switch",e),e}))}},{key:"init",value:function(e){var t=this,n=this.art,r=n.notice,o=n.template,i=o.$subtitle,a=o.$track;return fetch(e).then((function(e){return e.text()})).then((function(n){switch(t.art.emit("subtitle:load",e),Le(e)){case"srt":return _e(Te(n));case"ass":return _e(Ae(n));case"vtt":return _e(n);default:return e}})).then((function(e){return i.innerHTML="",t.url===e?e:(URL.revokeObjectURL(t.url),a.src=e,e)})).catch((function(e){throw r.show(e),t.art.emit("subtitle:err",e),e}))}},{key:"url",get:function(){return this.art.template.$track.src}},{key:"textTrack",get:function(){return this.art.template.$video.textTracks[0]}},{key:"activeCue",get:function(){return this.textTrack.activeCues[0]}}]),t}(ft);var Gt=function(){function e(t){var n=this;i(this,e),this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),t.whitelist.state&&t.once("video:canplay",(function(){!function(e,t){var n=e.template.$player;t.proxy(document,["click","contextmenu"],(function(t){t.composedPath().indexOf(n)>-1?(e.isFocus=!0,e.emit("focus")):(e.isFocus=!1,e.emit("blur"))}))}(t,n),function(e,t){var n=e.template.$player;t.hover(n,(function(){ge(n,"art-hover"),e.emit("hoverenter")}),(function(){be(n,"art-hover"),e.emit("hoverleave")}))}(t,n),function(e,t){var n=e.template,r=n.$player,o=n.$video,i=e.player,a=Ye((function(){ge(r,"art-hide-cursor"),be(r,"art-hover"),e.controls.show=!1}),3e3);e.on("hoverleave",(function(){i.playing&&a()})),t.proxy(r,"mousemove",(function(t){a.clearTimeout(),be(r,"art-hide-cursor"),e.controls.show=!0,!e.player.pip&&i.playing&&t.target===o&&a(),e.emit("mousemove")}))}(t,n),function(e,t){var n=e.option,r=e.player,o=e.template.$player,i=document.createElement("object");i.setAttribute("aria-hidden","true"),i.setAttribute("tabindex",-1),i.type="text/html",i.data="about:blank";var a=r.width,c=r.height,u=Xe((function(){r.width===a&&r.height===c||(a=r.width,c=r.height,n.autoSize&&(e.player.fullscreen||e.player.fullscreenWeb||e.player.pip?e.player.autoSize=!1:e.player.autoSize=!0),e.player.aspectRatioReset=!0,e.emit("resize",{width:r.width,height:r.height}))}),500);t.proxy(i,"load",(function(){t.proxy(i.contentDocument.defaultView,"resize",u)})),o.appendChild(i)}(t,n)}))}return c(e,[{key:"proxy",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Array.isArray(t)?t.forEach((function(t){return r.proxy(e,t,n,o)})):(e.addEventListener(t,n,o),this.destroyEvents.push((function(){e.removeEventListener(t,n,o)})))}},{key:"hover",value:function(e,t,n){t&&this.proxy(e,"mouseenter",t),n&&this.proxy(e,"mouseleave",n)}},{key:"loadImg",value:function(e){var t=this;return new Promise((function(n,r){var o;if(e instanceof HTMLImageElement)o=e;else{if("string"!=typeof e)return r(e);(o=new Image).src=e}return o.complete?n(o):(t.proxy(o,"load",(function(){return n(o)})),t.proxy(o,"error",(function(){return r(o)})),e)}))}},{key:"destroy",value:function(){this.destroyEvents.forEach((function(e){return e()}))}}]),e}(),Qt=function(){function e(t){var n=this;i(this,e),this.keys={};var r=t.option,o=t.player,a=t.events.proxy;r.hotkey&&t.on("ready",(function(){n.add(27,(function(){o.fullscreenWeb&&(o.fullscreenWeb=!1)})),n.add(32,(function(){o.toggle=!0})),n.add(37,(function(){o.seek=o.currentTime-5})),n.add(38,(function(){o.volume+=.1})),n.add(39,(function(){o.seek=o.currentTime+5})),n.add(40,(function(){o.volume-=.1})),a(window,"keydown",(function(e){if(t.isFocus){var r=document.activeElement.tagName.toUpperCase(),o=document.activeElement.getAttribute("contenteditable");if("INPUT"!==r&&"TEXTAREA"!==r&&""!==o&&"true"!==o){var i=n.keys[e.keyCode];i&&(e.preventDefault(),i.forEach((function(e){return e()})),t.emit("hotkey",e))}}}))}))}return c(e,[{key:"add",value:function(e,t){this.keys[e]?this.keys[e].push(t):this.keys[e]=[t]}}]),e}(),Kt=function(e){function t(e){var n;return i(this,t),(n=s(this,l(t).call(this,e))).$parent=e.template.$layer,e.on("ready",(function(){e.option.layers.forEach((function(e){n.add(e)}))})),n}return p(t,e),t}(ft),en=function(e){function t(e){var n;return i(this,t),n=s(this,l(t).call(this,e)),Oe(e.template.$loading,e.icons.loading),n}return p(t,e),t}(ft),tn=function(){function e(t){i(this,e),this.art=t,this.timer=null}return c(e,[{key:"show",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,o=this.art.template,i=o.$player,a=o.$noticeInner;a.innerHTML=e instanceof Error?e.message.trim():e,clearTimeout(this.timer),n&&(this.timer=setTimeout((function(){t.hide()}),r)),ge(i,"art-notice-show"),this.art.emit("notice:toggle",!0)}},{key:"hide",value:function(){var e=this.art.template,t=e.$player;e.$noticeInner.innerHTML="",be(t,"art-notice-show"),this.art.emit("notice:toggle",!0)}}]),e}(),nn=function(e){function t(e){var n;return i(this,t),n=s(this,l(t).call(this,e)),Oe(e.template.$state,e.icons.state),n}return p(t,e),t}(ft),rn=function e(t){var n=this;i(this,e);var r=Object.assign({loading:'<svg xmlns="http://www.w3.org/2000/svg" width="50px" height="50px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="uil-default"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"/><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(0 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-1s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(30 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.9166666666666666s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(60 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.8333333333333334s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(90 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.75s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(120 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.6666666666666666s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(150 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.5833333333333334s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(180 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.5s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(210 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.4166666666666667s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(240 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.3333333333333333s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(270 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.25s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(300 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.16666666666666666s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(330 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.08333333333333333s" repeatCount="indefinite"/></rect>\n</svg>',state:'<svg xmlns="http://www.w3.org/2000/svg" height="60" width="60" style="filter: drop-shadow(0px 1px 1px black);" viewBox="0 0 24 24"><path d="M20,2H4C1.8,2,0,3.8,0,6v12c0,2.2,1.8,4,4,4h16c2.2,0,4-1.8,4-4V6C24,3.8,22.2,2,20,2z M15.6,12.8L10.5,16 C9.9,16.5,9,16,9,15.2V8.8C9,8,9.9,7.5,10.5,8l5.1,3.2C16.3,11.5,16.3,12.5,15.6,12.8z"/>\n</svg>',play:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22"><path d="M17.982 9.275L8.06 3.27A2.013 2.013 0 0 0 5 4.994v12.011a2.017 2.017 0 0 0 3.06 1.725l9.922-6.005a2.017 2.017 0 0 0 0-3.45z"></path>\n</svg>',pause:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22"><path d="M7 3a2 2 0 0 0-2 2v12a2 2 0 1 0 4 0V5a2 2 0 0 0-2-2zM15 3a2 2 0 0 0-2 2v12a2 2 0 1 0 4 0V5a2 2 0 0 0-2-2z"></path>\n</svg>',volume:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22"><path d="M10.188 4.65L6 8H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1l4.188 3.35a.5.5 0 0 0 .812-.39V5.04a.498.498 0 0 0-.812-.39zM14.446 3.778a1 1 0 0 0-.862 1.804 6.002 6.002 0 0 1-.007 10.838 1 1 0 0 0 .86 1.806A8.001 8.001 0 0 0 19 11a8.001 8.001 0 0 0-4.554-7.222z"></path><path d="M15 11a3.998 3.998 0 0 0-2-3.465v6.93A3.998 3.998 0 0 0 15 11z"></path>\n</svg>',volumeClose:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22"><path d="M15 11a3.998 3.998 0 0 0-2-3.465v2.636l1.865 1.865A4.02 4.02 0 0 0 15 11z"></path><path d="M13.583 5.583A5.998 5.998 0 0 1 17 11a6 6 0 0 1-.585 2.587l1.477 1.477a8.001 8.001 0 0 0-3.446-11.286 1 1 0 0 0-.863 1.805zM18.778 18.778l-2.121-2.121-1.414-1.414-1.415-1.415L13 13l-2-2-3.889-3.889-3.889-3.889a.999.999 0 1 0-1.414 1.414L5.172 8H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1l4.188 3.35a.5.5 0 0 0 .812-.39v-3.131l2.587 2.587-.01.005a1 1 0 0 0 .86 1.806c.215-.102.424-.214.627-.333l2.3 2.3a1.001 1.001 0 0 0 1.414-1.416zM11 5.04a.5.5 0 0 0-.813-.39L8.682 5.854 11 8.172V5.04z"></path>\n</svg>',subtitle:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 48 48"><path d="M0 0h48v48H0z" fill="none"/><path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"/>\n</svg>',screenshot:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 50 50">\n\t<path d="M 19.402344 6 C 17.019531 6 14.96875 7.679688 14.5 10.011719 L 14.097656 12 L 9 12 C 6.238281 12 4 14.238281 4 17 L 4 38 C 4 40.761719 6.238281 43 9 43 L 41 43 C 43.761719 43 46 40.761719 46 38 L 46 17 C 46 14.238281 43.761719 12 41 12 L 35.902344 12 L 35.5 10.011719 C 35.03125 7.679688 32.980469 6 30.597656 6 Z M 25 17 C 30.519531 17 35 21.480469 35 27 C 35 32.519531 30.519531 37 25 37 C 19.480469 37 15 32.519531 15 27 C 15 21.480469 19.480469 17 25 17 Z M 25 19 C 20.589844 19 17 22.589844 17 27 C 17 31.410156 20.589844 35 25 35 C 29.410156 35 33 31.410156 33 27 C 33 22.589844 29.410156 19 25 19 Z "/>\n</svg>\n',setting:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22"><circle cx="11" cy="11" r="2"></circle><path d="M19.164 8.861L17.6 8.6a6.978 6.978 0 0 0-1.186-2.099l.574-1.533a1 1 0 0 0-.436-1.217l-1.997-1.153a1.001 1.001 0 0 0-1.272.23l-1.008 1.225a7.04 7.04 0 0 0-2.55.001L8.716 2.829a1 1 0 0 0-1.272-.23L5.447 3.751a1 1 0 0 0-.436 1.217l.574 1.533A6.997 6.997 0 0 0 4.4 8.6l-1.564.261A.999.999 0 0 0 2 9.847v2.306c0 .489.353.906.836.986l1.613.269a7 7 0 0 0 1.228 2.075l-.558 1.487a1 1 0 0 0 .436 1.217l1.997 1.153c.423.244.961.147 1.272-.23l1.04-1.263a7.089 7.089 0 0 0 2.272 0l1.04 1.263a1 1 0 0 0 1.272.23l1.997-1.153a1 1 0 0 0 .436-1.217l-.557-1.487c.521-.61.94-1.31 1.228-2.075l1.613-.269a.999.999 0 0 0 .835-.986V9.847a.999.999 0 0 0-.836-.986zM11 15a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"></path>\n</svg>',fullscreen:'<svg xmlns="http://www.w3.org/2000/svg" height="36" width="36" viewBox="0 0 36 36">\n\t<path d="m 10,16 2,0 0,-4 4,0 0,-2 L 10,10 l 0,6 0,0 z"></path>\n\t<path d="m 20,10 0,2 4,0 0,4 2,0 L 26,10 l -6,0 0,0 z"></path>\n\t<path d="m 24,24 -4,0 0,2 L 26,26 l 0,-6 -2,0 0,4 0,0 z"></path>\n\t<path d="M 12,20 10,20 10,26 l 6,0 0,-2 -4,0 0,-4 0,0 z"></path>\n</svg>',fullscreenWeb:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" height="36" width="36">\n\t<path d="m 28,11 0,14 -20,0 0,-14 z m -18,2 16,0 0,10 -16,0 0,-10 z" fill-rule="evenodd"></path>\n</svg>',pip:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" height="32" width="32"><path d="M25,17 L17,17 L17,23 L25,23 L25,17 L25,17 Z M29,25 L29,10.98 C29,9.88 28.1,9 27,9 L9,9 C7.9,9 7,9.88 7,10.98 L7,25 C7,26.1 7.9,27 9,27 L27,27 C28.1,27 29,26.1 29,25 L29,25 Z M27,25.02 L9,25.02 L9,10.97 L27,10.97 L27,25.02 L27,25.02 Z"></path>\n</svg>',prev:'<svg xmlns="http://www.w3.org/2000/svg" height="36" width="36" viewBox="0 0 36 36"><path d="m 12,12 h 2 v 12 h -2 z m 3.5,6 8.5,6 V 12 z"></path>\n</svg>',next:'<svg xmlns="http://www.w3.org/2000/svg" height="36" width="36" viewBox="0 0 36 36"><path d="M 12,24 20.5,18 12,12 V 24 z M 22,12 v 12 h 2 V 12 h -2 z"></path>\n</svg>'},t.option.icons);Object.keys(r).forEach((function(e){var t=document.createElement("i");t.classList.add("art-icon"),t.classList.add("art-icon-".concat(e)),Oe(t,r[e]),n[e]=t}))};function on(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function an(e){return function(t){var r=t.i18n,o=t.player;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?on(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):on(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{html:'\n<div class="art-setting-header">'.concat(r.get("Flip"),'</div>\n<div class="art-setting-radio"><div class="art-radio-item current"><button type="button" data-value="normal">').concat(r.get("Normal"),'</button></div><div class="art-radio-item"><button type="button" data-value="horizontal">').concat(r.get("Horizontal"),'</button></div><div class="art-radio-item"><button type="button" data-value="vertical">').concat(r.get("Vertical"),"</button></div>\n</div>"),click:function(e,t){var n=t.target.dataset.value;n&&(o.flip=n)},mounted:function(e){t.on("flipChange",(function(t){var n=me("button",e).find((function(e){return e.dataset.value===t}));n&&Se(n.parentElement,"current")}))}})}}function cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function un(e){return function(t){var r=t.i18n,o=t.player;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cn(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cn(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{html:'\n<div class="art-setting-header">'.concat(r.get("Aspect ratio"),'</div>\n<div class="art-setting-radio"><div class="art-radio-item current"><button type="button" data-value="default">').concat(r.get("Default"),'</button></div><div class="art-radio-item"><button type="button" data-value="4:3">4:3</button></div><div class="art-radio-item"><button type="button" data-value="16:9">16:9</button></div>\n</div>'),click:function(e,t){var n=t.target.dataset.value;n&&(o.aspectRatio=n)},mounted:function(e){t.on("aspectRatioChange",(function(t){var n=me("button",e).find((function(e){return e.dataset.value===t}));n&&Se(n.parentElement,"current")}))}})}}function sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ln(e){return function(t){var r=t.i18n,o=t.player,i=t.events.proxy;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sn(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sn(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{html:'\n<div class="art-setting-header">'.concat(r.get("Play speed"),': <span class="art-subtitle-value">1.0</span>x\n</div>\n<div class="art-setting-range"><input class="art-subtitle-range" value="1" type="range" min="0.5" max="2" step="0.25">\n</div>'),mounted:function(e){var n=ve(".art-setting-range input",e),r=ve(".art-subtitle-value",e);i(n,"change",(function(){var e=n.value;r.innerText=e,o.playbackRate=Number(e)})),t.on("playbackRateChange",(function(e){n.value!==e&&(n.value=e,r.innerText=e)}))}})}}var fn=function(e){function t(e){var n;i(this,t),n=s(this,l(t).call(this,e));var r=e.option,o=e.template,a=o.$setting,c=o.$settingBody,u=e.events.proxy;return n.$parent=c,r.setting&&(e.on("ready",(function(){u(a,"click",(function(e){e.target===a&&(n.show=!1)})),n.add(an({disable:!r.flip,name:"flip"})),n.add(un({disable:!r.aspectRatio,name:"aspectRatio"})),n.add(ln({disable:!r.playbackRate,name:"playbackRate"}))})),e.on("blur",(function(){n.show=!1}))),n}return p(t,e),t}(ft),pn=function(){function e(t){i(this,e),this.art=t,this.name="artplayer_settings";var n=t.option,r=this.get("volume");r&&(n.volume=r)}return c(e,[{key:"get",value:function(e){var t=JSON.parse(window.localStorage.getItem(this.name))||{};return e?t[e]:{}}},{key:"set",value:function(e,t){var r=Object.assign({},this.get(),n({},e,t));window.localStorage.setItem(this.name,JSON.stringify(r))}},{key:"del",value:function(e){var t=this.get();delete t[e],window.localStorage.setItem(this.name,JSON.stringify(t))}},{key:"clean",value:function(){window.localStorage.removeItem(this.name)}}]),e}();function dn(e){var t=e.i18n,n=e.subtitle,r=e.events.proxy;return{title:"Subtitle",name:"subtitleOffset",index:20,html:'\n<div class="art-setting-header">'.concat(t.get("Subtitle offset time"),': <span class="art-subtitle-value">0</span>s\n</div>\n<div class="art-setting-range"><input class="art-subtitle-range" value="0" type="range" min="-5" max="5" step="0.5">\n</div>'),mounted:function(t){var o=ve(".art-setting-range input",t),i=ve(".art-subtitle-value",t);r(o,"change",(function(){var t=o.value;i.innerText=t,e.plugins.subtitleOffset.offset(Number(t))})),e.on("subtitle:switch",(function(){o.value=0,i.innerText=0})),e.on("subtitleOffset",(function(e){n.update(),o.value!==e&&(o.value=e,i.innerText=e)}))}}}function hn(e){var t=e.constructor.utils.clamp,n=e.setting,r=e.notice,o=e.template,i=e.i18n,a=e.player;n.add(dn);var c=[];return e.on("subtitle:switch",(function(){c=[]})),{name:"subtitleOffset",offset:function(n){if(o.$track&&o.$track.track){var u=Array.from(o.$track.track.cues),s=t(n,-5,5);u.forEach((function(e,n){c[n]||(c[n]={startTime:e.startTime,endTime:e.endTime}),e.startTime=t(c[n].startTime+s,0,a.duration),e.endTime=t(c[n].endTime+s,0,a.duration)})),r.show("".concat(i.get("Subtitle offset time"),": ").concat(n,"s")),e.emit("subtitleOffset",n)}else r.show("".concat(i.get("No subtitles found"))),e.emit("subtitleOffset",0)}}}function yn(e){var t=e.events.proxy,n=e.template,r=e.player,o=e.option,i=e.setting,a=e.i18n;function c(t){if(t){var i=n.$video.canPlayType(t.type);if("maybe"===i||"probably"===i){var a=URL.createObjectURL(t);o.title=t.name,r.switchUrl(a,t.name),e.emit("localVideo",t)}else De(!1,"Playback of this file format is not supported")}}function u(e){var n=Oe(e,'<input type="file">');ke(e,"position","relative"),xe(n,{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",opacity:"0"}),t(n,"change",(function(){c(n.files[0])}))}return t(n.$player,"dragover",(function(e){e.preventDefault()})),t(n.$player,"drop",(function(e){e.preventDefault(),c(e.dataTransfer.files[0])})),e.on("ready",(function(){i.add({title:"Local Video",name:"localVideo",index:30,html:'\n<div class="art-setting-header">'.concat(a.get("Local Video"),'\n</div>\n<div class="art-setting-upload"><div class="art-upload-btn">').concat(a.get("Open"),'</div><div class="art-upload-value"></div>\n</div>'),mounted:function(t){var n=ve(".art-upload-btn",t),r=ve(".art-upload-value",t);e.on("localVideo",(function(e){r.textContent=e.name,r.title=e.name})),u(n)}})})),{name:"localVideo",attach:u}}function vn(e){var t=e.events.proxy,n=e.subtitle,r=e.setting,o=e.i18n;function i(r){var o=Oe(r,'<input type="file">');ke(r,"position","relative"),xe(o,{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",opacity:"0"}),t(o,"change",(function(){!function(r){if(r){var o=Le(r.name);if(["ass","vtt","srt"].includes(o)){var i=new FileReader;t(i,"load",(function(t){var i=t.target.result;switch(o){case"srt":var a=_e(Te(i));n.switch(a,r.name);break;case"ass":var c=_e(Ae(i));n.switch(c,r.name);break;case"vtt":var u=_e(i);n.switch(u,r.name)}e.emit("localSubtitle",r)})),i.readAsText(r)}else De(!1,"Only supports subtitle files in .ass, .vtt and .srt format")}}(o.files[0])}))}return e.on("ready",(function(){r.add({title:"Local Subtitle",name:"localSubtitle",index:40,html:'\n<div class="art-setting-header">'.concat(o.get("Local Subtitle"),'\n</div>\n<div class="art-setting-upload"><div class="art-upload-btn">').concat(o.get("Open"),'</div><div class="art-upload-value"></div>\n</div>'),mounted:function(t){var n=ve(".art-upload-btn",t),r=ve(".art-upload-value",t);e.on("localSubtitle",(function(e){r.textContent=e.name,r.title=e.name})),i(n)}})})),{name:"localSubtitle",attach:i}}function mn(e){var t=e.layers,n=e.player,r=e.option.theme;return t.add({name:"miniProgressBar",style:{display:"none",position:"absolute",left:0,right:0,bottom:0,height:"2px",background:r},mounted:function(t){e.on("control:toggle",(function(e){t.style.display=e?"none":"block"})),e.on("destroy",(function(){t.style.display="none"})),e.on("video:timeupdate",(function(){t.style.width="".concat(100*n.played,"%")}))}}),{name:"miniProgressBar"}}function gn(e){var t=1e4,n=0,r=0,o=0,i=null;function a(){n=0,r=0,o=0,cancelAnimationFrame(i),i=null}function c(){i||function a(){e.isDestroy||(i=requestAnimationFrame((function(){var i=Date.now();if(o){var c=i-o;r+=c,e.player.playing||(n+=c)}o=i,e.emit("networkMonitor",n/r),r>=t&&(n=0,r=0),a()})))}()}return e.on("play",c),e.on("pause",a),{name:"networkMonitor",reset:a,start:c,sample:function(e){t=e}}}function bn(e){var t=e.events,n=e.player,r=e.template,o=Ye((function(){var t=r.$player.getBoundingClientRect();t.top+t.height<=0&&!n.pip?(n.pip=!0,e.emit("autoPip",!0)):n.pip&&(n.pip=!1,e.emit("autoPip",!1))}),300);return t.proxy(window,"scroll",o),{name:"autoPip"}}var wn=function(){function e(t){var n=this;i(this,e),this.art=t,this.id=0;var r=t.option;r.subtitle.url&&r.subtitleOffset&&this.add(hn),!r.isLive&&r.miniProgressBar&&this.add(mn),r.localVideo&&this.add(yn),r.localSubtitle&&this.add(vn),r.networkMonitor&&this.add(gn),r.autoPip&&this.add(bn),t.option.plugins.forEach((function(e){n.add(e)}))}return c(e,[{key:"add",value:function(e){this.id+=1;var t=e.call(this,this.art),n="";return De(!Ne(this,n=t&&t.name?t.name:e.name?e.name:"plugin".concat(this.id)),"Cannot add a plugin that already has the same name: ".concat(n)),Object.defineProperty(this,n,{value:t}),this.art.emit("plugin:add",e),this}}]),e}(),On=function e(t){i(this,e);var n=t.option,r=t.events.proxy,o=t.template.$video;et.video.events.forEach((function(e){r(o,e,(function(e){t.emit("video:".concat(e.type),e)}))})),Object.keys(n.moreVideoAttr).forEach((function(e){o[e]=n.moreVideoAttr[e]})),n.muted&&(o.muted=n.muted),n.volume&&(o.volume=Ze(n.volume,0,1)),n.poster&&(o.poster=n.poster),n.autoplay&&(o.autoplay=n.autoplay),o.controls=!0;var a=n.type||Le(n.url),c=n.customType[a];a&&c?(t.emit("beforeCustomType",a),c(o,n.url,t),t.emit("afterCustomType",a)):(t.emit("beforeAttachUrl",n.url),o.src=n.url,t.emit("afterAttachUrl",o.src))},kn=0,xn=function(e){function t(e){var n;return i(this,t),(n=s(this,l(t).call(this))).option=he(Ue(t.option,e),Ke),n.isFocus=!1,n.isDestroy=!1,n.whitelist=new tt(u(n)),n.template=new nt(u(n)),n.events=new Gt(u(n)),n.whitelist.state?(n.storage=new pn(u(n)),n.icons=new rn(u(n)),n.i18n=new it(u(n)),n.notice=new tn(u(n)),n.player=new ut(u(n)),n.layers=new Kt(u(n)),n.controls=new qt(u(n)),n.contextmenu=new Xt(u(n)),n.subtitle=new Jt(u(n)),n.info=new Zt(u(n)),n.loading=new en(u(n)),n.hotkey=new Qt(u(n)),n.mask=new nn(u(n)),n.setting=new fn(u(n)),n.plugins=new wn(u(n))):n.mobile=new On(u(n)),kn+=1,n.id=kn,t.instances.push(u(n)),n}return p(t,e),c(t,[{key:"destroy",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.events.destroy(),this.template.destroy(e),t.instances.splice(t.instances.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}],[{key:"version",get:function(){return"3.1.20"}},{key:"env",get:function(){return'"production"'}},{key:"config",get:function(){return et}},{key:"utils",get:function(){return Ge}},{key:"scheme",get:function(){return Ke}},{key:"Emitter",get:function(){return ye}},{key:"validator",get:function(){return he}},{key:"kindOf",get:function(){return he.kindOf}},{key:"option",get:function(){return{container:"#artplayer",url:"",poster:"",title:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,localVideo:!1,localSubtitle:!1,autoPip:!1,networkMonitor:!1,layers:[],contextmenu:[],quality:[],controls:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,width:160,height:90,column:10},subtitle:{url:"",style:{}},moreVideoAttr:{controls:!1,preload:"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}}]),t}(ye);function jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jn(r,!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jn(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}return Object.defineProperty(xn,"instances",{value:[]}),console.log("%c ArtPlayer %c 3.1.20 %c https://artplayer.org","color: #fff; background: #5f5f5f","color: #fff; background: #4bc729",""),function(e){function n(e){var t;return i(this,n),t=s(this,l(n).call(this,e)),xn.utils.errorHandle(e.option&&"object"===o(e.option),"The prop 'option' object cannot be missing"),t.instance=null,t.artRef=de.createRef(),t}return p(n,e),c(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.option,n=e.getInstance;this.instance=new xn(Pn({},t,{container:this.artRef.current})),n&&"function"==typeof n&&n(this.instance)}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.destroy&&this.instance.destroy()}},{key:"render",value:function(){var e=this.props,n=(e.option,e.getInstance,t(e,["option","getInstance"]));return de.createElement("div",Pn({ref:this.artRef},n))}}]),n}(de.Component)}));
|