mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
9 lines
131 KiB
JavaScript
9 lines
131 KiB
JavaScript
/*!
|
|
* artplayer-react.js v3.4.2
|
|
* Github: https://github.com/zhw2590582/ArtPlayer#readme
|
|
* (c) 2017-2020 Harvey Zack
|
|
* Released under the MIT License.
|
|
*/
|
|
|
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerReact=e()}(this,(function(){"use strict";var t=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o};var e=function(e,n){if(null==e)return{};var r,o,i=t(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i};var n=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function r(t,e){return t(e={exports:{}},e.exports),e.exports}var o=r((function(t){function e(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=e=function(t){return typeof t}:t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(n)}t.exports=e}));var i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var c=function(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t};var s=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var l=function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?s(t):e},u=r((function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e})),p=r((function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e}));var f=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)},d=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;function b(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var v=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,r,o=b(t),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},m="function"==typeof Symbol&&Symbol.for,g=m?Symbol.for("react.element"):60103,w=m?Symbol.for("react.portal"):60106,x=m?Symbol.for("react.fragment"):60107,O=m?Symbol.for("react.strict_mode"):60108,k=m?Symbol.for("react.profiler"):60114,j=m?Symbol.for("react.provider"):60109,P=m?Symbol.for("react.context"):60110,S=m?Symbol.for("react.forward_ref"):60112,E=m?Symbol.for("react.suspense"):60113,C=m?Symbol.for("react.memo"):60115,R=m?Symbol.for("react.lazy"):60116,$="function"==typeof Symbol&&Symbol.iterator;function D(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A={};function _(t,e,n){this.props=t,this.context=e,this.refs=A,this.updater=n||T}function z(){}function L(t,e,n){this.props=t,this.context=e,this.refs=A,this.updater=n||T}_.prototype.isReactComponent={},_.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error(D(85));this.updater.enqueueSetState(this,t,e,"setState")},_.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},z.prototype=_.prototype;var q=L.prototype=new z;q.constructor=L,v(q,_.prototype),q.isPureReactComponent=!0;var M={current:null},F={current:null},I=Object.prototype.hasOwnProperty,N={key:!0,ref:!0,__self:!0,__source:!0};function V(t,e,n){var r,o={},i=null,a=null;if(null!=e)for(r in void 0!==e.ref&&(a=e.ref),void 0!==e.key&&(i=""+e.key),e)I.call(e,r)&&!N.hasOwnProperty(r)&&(o[r]=e[r]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var s=Array(c),l=0;l<c;l++)s[l]=arguments[l+2];o.children=s}if(t&&t.defaultProps)for(r in c=t.defaultProps)void 0===o[r]&&(o[r]=c[r]);return{$$typeof:g,type:t,key:i,ref:a,props:o,_owner:F.current}}function W(t){return"object"==typeof t&&null!==t&&t.$$typeof===g}var B=/\/+/g,U=[];function H(t,e,n,r){if(U.length){var o=U.pop();return o.result=t,o.keyPrefix=e,o.func=n,o.context=r,o.count=0,o}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function Y(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>U.length&&U.push(t)}function J(t,e,n){return null==t?0:function t(e,n,r,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case g:case w:a=!0}}if(a)return r(o,e,""===n?"."+X(e,0):n),1;if(a=0,n=""===n?".":n+":",Array.isArray(e))for(var c=0;c<e.length;c++){var s=n+X(i=e[c],c);a+=t(i,s,r,o)}else if(null===e||"object"!=typeof e?s=null:s="function"==typeof(s=$&&e[$]||e["@@iterator"])?s:null,"function"==typeof s)for(e=s.call(e),c=0;!(i=e.next()).done;)a+=t(i=i.value,s=n+X(i,c++),r,o);else if("object"===i)throw r=""+e,Error(D(31,"[object Object]"===r?"object with keys {"+Object.keys(e).join(", ")+"}":r,""));return a}(t,"",e,n)}function X(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,(function(t){return e[t]}))}(t.key):e.toString(36)}function Z(t,e){t.func.call(t.context,e,t.count++)}function Q(t,e,n){var r=t.result,o=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?G(t,r,n,(function(t){return t})):null!=t&&(W(t)&&(t=function(t,e){return{$$typeof:g,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,o+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(B,"$&/")+"/")+n)),r.push(t))}function G(t,e,n,r,o){var i="";null!=n&&(i=(""+n).replace(B,"$&/")+"/"),J(t,Q,e=H(e,i,r,o)),Y(e)}function K(){var t=M.current;if(null===t)throw Error(D(321));return t}var tt={Children:{map:function(t,e,n){if(null==t)return t;var r=[];return G(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;J(t,Z,e=H(null,null,e,n)),Y(e)},count:function(t){return J(t,(function(){return null}),null)},toArray:function(t){var e=[];return G(t,e,null,(function(t){return t})),e},only:function(t){if(!W(t))throw Error(D(143));return t}},createRef:function(){return{current:null}},Component:_,PureComponent:L,createContext:function(t,e){return void 0===e&&(e=null),(t={$$typeof:P,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:j,_context:t},t.Consumer=t},forwardRef:function(t){return{$$typeof:S,render:t}},lazy:function(t){return{$$typeof:R,_ctor:t,_status:-1,_result:null}},memo:function(t,e){return{$$typeof:C,type:t,compare:void 0===e?null:e}},useCallback:function(t,e){return K().useCallback(t,e)},useContext:function(t,e){return K().useContext(t,e)},useEffect:function(t,e){return K().useEffect(t,e)},useImperativeHandle:function(t,e,n){return K().useImperativeHandle(t,e,n)},useDebugValue:function(){},useLayoutEffect:function(t,e){return K().useLayoutEffect(t,e)},useMemo:function(t,e){return K().useMemo(t,e)},useReducer:function(t,e,n){return K().useReducer(t,e,n)},useRef:function(t){return K().useRef(t)},useState:function(t){return K().useState(t)},Fragment:x,Profiler:k,StrictMode:O,Suspense:E,createElement:V,cloneElement:function(t,e,n){if(null==t)throw Error(D(267,t));var r=v({},t.props),o=t.key,i=t.ref,a=t._owner;if(null!=e){if(void 0!==e.ref&&(i=e.ref,a=F.current),void 0!==e.key&&(o=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(s in e)I.call(e,s)&&!N.hasOwnProperty(s)&&(r[s]=void 0===e[s]&&void 0!==c?c[s]:e[s])}var s=arguments.length-2;if(1===s)r.children=n;else if(1<s){c=Array(s);for(var l=0;l<s;l++)c[l]=arguments[l+2];r.children=c}return{$$typeof:g,type:t.type,key:o,ref:i,props:r,_owner:a}},createFactory:function(t){var e=V.bind(null,t);return e.type=t,e},isValidElement:W,version:"16.12.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:M,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:F,IsSomeRendererActing:{current:!1},assign:v}},et={default:tt},nt=et&&tt||et,rt=nt.default||nt,ot=function(){};if("production"!==process.env.NODE_ENV){var it="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",at={},ct=Function.call.bind(Object.prototype.hasOwnProperty);ot=function(t){var e="Warning: "+t;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(t){}}}function st(t,e,n,r,o){if("production"!==process.env.NODE_ENV)for(var i in t)if(ct(t,i)){var a;try{if("function"!=typeof t[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 t[i]+"`.");throw c.name="Invariant Violation",c}a=t[i](e,i,r,n,null,it)}catch(t){a=t}if(!a||a instanceof Error||ot((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 at)){at[a.message]=!0;var s=o?o():"";ot("Failed "+n+" type: "+a.message+(null!=s?s:""))}}}st.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(at={})};var lt=st,ut=r((function(t){"production"!==process.env.NODE_ENV&&function(){var e=v,n=lt,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,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.concurrent_mode"):60111,f=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,b=r?Symbol.for("react.lazy"):60116,m=r?Symbol.for("react.fundamental"):60117,g=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119,x="function"==typeof Symbol&&Symbol.iterator;function O(t){if(null===t||"object"!=typeof t)return null;var e=x&&t[x]||t["@@iterator"];return"function"==typeof e?e:null}var k=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+t.replace(/%s/g,(function(){return n[o++]}));"undefined"!=typeof console&&console.warn(i);try{throw new Error(i)}catch(t){}},j=function(t,e){if(void 0===e)throw new Error("`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning message argument");if(!t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];k.apply(void 0,[e].concat(r))}},P=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];if(void 0===e)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(!t){if("undefined"!=typeof console){var i=r.map((function(t){return""+t}));i.unshift("Warning: "+e),Function.prototype.apply.call(console.error,console,i)}try{var a=0,c="Warning: "+e.replace(/%s/g,(function(){return r[a++]}));throw new Error(c)}catch(t){}}},S={};function E(t,e){var n=t.constructor,r=n&&(n.displayName||n.name)||"ReactClass",o=r+"."+e;S[o]||(P(!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.",e,r),S[o]=!0)}var C={isMounted:function(t){return!1},enqueueForceUpdate:function(t,e,n){E(t,"forceUpdate")},enqueueReplaceState:function(t,e,n,r){E(t,"replaceState")},enqueueSetState:function(t,e,n,r){E(t,"setState")}},R={};function $(t,e,n){this.props=t,this.context=e,this.refs=R,this.updater=n||C}Object.freeze(R),$.prototype.isReactComponent={},$.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")},$.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};var D={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)."]},T=function(t,e){Object.defineProperty($.prototype,t,{get:function(){j(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",e[0],e[1])}})};for(var A in D)D.hasOwnProperty(A)&&T(A,D[A]);function _(){}function z(t,e,n){this.props=t,this.context=e,this.refs=R,this.updater=n||C}_.prototype=$.prototype;var L=z.prototype=new _;L.constructor=z,e(L,$.prototype),L.isPureReactComponent=!0;var q={current:null},M={current:null},F=/^(.*)[\\\/]/;function I(t){if(null==t)return null;if("number"==typeof t.tag&&P(!1,"Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case a:return"Fragment";case i:return"Portal";case s:return"Profiler";case c:return"StrictMode";case d:return"Suspense";case h:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case u:return"Context.Consumer";case l:return"Context.Provider";case f:return r=t,o=t.render,p="ForwardRef",v=o.displayName||o.name||"",r.displayName||(""!==v?p+"("+v+")":p);case y:return I(t.type);case b:var e=1===(n=t)._status?n._result:null;if(e)return I(e)}var n,r,o,p,v;return null}var N={},V=null;function W(t){V=t}N.getCurrentStack=null,N.getStackAddendum=function(){var t="";if(V){var e=I(V.type),n=V._owner;t+=function(t,e,n){var r="";if(e){var o=e.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+":"+e.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(t||"Unknown")+r}(e,V._source,n&&I(n.type))}var r=N.getCurrentStack;return r&&(t+=r()||""),t};var B={ReactCurrentDispatcher:q,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:M,IsSomeRendererActing:{current:!1},assign:e};e(B,{ReactDebugCurrentFrame:N,ReactComponentTreeHook:{}});var U,H,Y=function(t,e){if(!t){for(var n=B.ReactDebugCurrentFrame,r=n.getStackAddendum(),o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];P.apply(void 0,[!1,e+"%s"].concat(i,[r]))}},J=Object.prototype.hasOwnProperty,X={key:!0,ref:!0,__self:!0,__source:!0};function Z(t){if(J.call(t,"ref")){var e=Object.getOwnPropertyDescriptor(t,"ref").get;if(e&&e.isReactWarning)return!1}return void 0!==t.ref}function Q(t){if(J.call(t,"key")){var e=Object.getOwnPropertyDescriptor(t,"key").get;if(e&&e.isReactWarning)return!1}return void 0!==t.key}function G(t,e){var n=function(){U||(U=!0,P(!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)",e))};n.isReactWarning=!0,Object.defineProperty(t,"key",{get:n,configurable:!0})}function K(t,e){var n=function(){H||(H=!0,P(!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)",e))};n.isReactWarning=!0,Object.defineProperty(t,"ref",{get:n,configurable:!0})}var tt=function(t,e,n,r,i,a,c){var s={$$typeof:o,type:t,key:e,ref:n,props:c,_owner:a,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:r}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function et(t,e,n){var r,o={},i=null,a=null,c=null,s=null;if(null!=e)for(r in Z(e)&&(a=e.ref),Q(e)&&(i=""+e.key),c=void 0===e.__self?null:e.__self,s=void 0===e.__source?null:e.__source,e)J.call(e,r)&&!X.hasOwnProperty(r)&&(o[r]=e[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(l>1){for(var u=Array(l),p=0;p<l;p++)u[p]=arguments[p+2];Object.freeze&&Object.freeze(u),o.children=u}if(t&&t.defaultProps){var f=t.defaultProps;for(r in f)void 0===o[r]&&(o[r]=f[r])}if(i||a){var d="function"==typeof t?t.displayName||t.name||"Unknown":t;i&&G(o,d),a&&K(o,d)}return tt(t,i,a,c,s,M.current,o)}function nt(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var o,i,a=e({},t.props),c=t.key,s=t.ref,l=t._self,u=t._source,p=t._owner;if(null!=n)for(o in Z(n)&&(s=n.ref,p=M.current),Q(n)&&(c=""+n.key),t.type&&t.type.defaultProps&&(i=t.type.defaultProps),n)J.call(n,o)&&!X.hasOwnProperty(o)&&(void 0===n[o]&&void 0!==i?a[o]=i[o]:a[o]=n[o]);var f=arguments.length-2;if(1===f)a.children=r;else if(f>1){for(var d=Array(f),h=0;h<f;h++)d[h]=arguments[h+2];a.children=d}return tt(t.type,c,s,l,u,p,a)}function rt(t){return"object"==typeof t&&null!==t&&t.$$typeof===o}var ot=!1,it=/\/+/g;function at(t){return(""+t).replace(it,"$&/")}var ct,st=[];function ut(t,e,n,r){if(st.length){var o=st.pop();return o.result=t,o.keyPrefix=e,o.func=n,o.context=r,o.count=0,o}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function pt(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,st.length<10&&st.push(t)}function ft(t,e,n){return null==t?0:function t(e,n,r,a){var c=typeof e;"undefined"!==c&&"boolean"!==c||(e=null);var s,l=!1;if(null===e)l=!0;else switch(c){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case o:case i:l=!0}}if(l)return r(a,e,""===n?"."+dt(e,0):n),1;var u=0,p=""===n?".":n+":";if(Array.isArray(e))for(var f=0;f<e.length;f++)u+=t(s=e[f],p+dt(s,f),r,a);else{var d=O(e);if("function"==typeof d){d===e.entries&&(ot||Y(!1,"Using Maps as children is unsupported and will likely yield unexpected results. Convert it to a sequence/iterable of keyed ReactElements instead."),ot=!0);for(var h,y=d.call(e),b=0;!(h=y.next()).done;)u+=t(s=h.value,p+dt(s,b++),r,a)}else if("object"===c){var v;v=" If you meant to render a collection of children, use an array instead."+N.getStackAddendum();var m=""+e;throw Error("Objects are not valid as a React child (found: "+("[object Object]"===m?"object with keys {"+Object.keys(e).join(", ")+"}":m)+")."+v)}}return u}(t,"",e,n)}function dt(t,e){return"object"==typeof t&&null!==t&&null!=t.key?(n=t.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(t){return r[t]}))):e.toString(36);var n,r}function ht(t,e,n){var r=t.func,o=t.context;r.call(o,e,t.count++)}function yt(t,e,n){var r,o,i=t.result,a=t.keyPrefix,c=t.func,s=t.context,l=c.call(s,e,t.count++);Array.isArray(l)?bt(l,i,n,(function(t){return t})):null!=l&&(rt(l)&&(r=l,o=a+(!l.key||e&&e.key===l.key?"":at(l.key)+"/")+n,l=tt(r.type,o,r.ref,r._self,r._source,r._owner,r.props)),i.push(l))}function bt(t,e,n,r,o){var i="";null!=n&&(i=at(n)+"/");var a=ut(e,i,r,o);ft(t,yt,a),pt(a)}function vt(t){return"string"==typeof t||"function"==typeof t||t===a||t===p||t===s||t===c||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===b||t.$$typeof===y||t.$$typeof===l||t.$$typeof===u||t.$$typeof===f||t.$$typeof===m||t.$$typeof===g||t.$$typeof===w)}function mt(){var t=q.current;if(null===t)throw 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.");return t}function gt(){if(M.current){var t=I(M.current.type);if(t)return"\n\nCheck the render method of `"+t+"`."}return""}function wt(t){return null!=t&&void 0!==(e=t.__source)?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":"";var e}ct=!1;var xt={};function Ot(t,e){if(t._store&&!t._store.validated&&null==t.key){t._store.validated=!0;var n=function(t){var e=gt();if(!e){var n="string"==typeof t?t:t.displayName||t.name;n&&(e="\n\nCheck the top-level render call using <"+n+">.")}return e}(e);if(!xt[n]){xt[n]=!0;var r="";t&&t._owner&&t._owner!==M.current&&(r=" It was passed a child from "+I(t._owner.type)+"."),W(t),Y(!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),W(null)}}}function kt(t,e){if("object"==typeof t)if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];rt(r)&&Ot(r,e)}else if(rt(t))t._store&&(t._store.validated=!0);else if(t){var o=O(t);if("function"==typeof o&&o!==t.entries)for(var i,a=o.call(t);!(i=a.next()).done;)rt(i.value)&&Ot(i.value,e)}}function jt(t){var e=t.type;if(null!=e&&"string"!=typeof e){var r,o=I(e);if("function"==typeof e)r=e.propTypes;else{if("object"!=typeof e||e.$$typeof!==f&&e.$$typeof!==y)return;r=e.propTypes}r?(W(t),n(r,t.props,"prop",o,N.getStackAddendum),W(null)):void 0===e.PropTypes||ct||(ct=!0,P(!1,"Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")),"function"==typeof e.getDefaultProps&&(e.getDefaultProps.isReactClassApproved||P(!1,"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."))}}function Pt(t){W(t);for(var e=Object.keys(t.props),n=0;n<e.length;n++){var r=e[n];if("children"!==r&&"key"!==r){Y(!1,"Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r);break}}null!==t.ref&&Y(!1,"Invalid attribute `ref` supplied to `React.Fragment`."),W(null)}function St(t,e,n){var r=vt(t);if(!r){var i="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(i+=" 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 c,s=wt(e);i+=s||gt(),null===t?c="null":Array.isArray(t)?c="array":void 0!==t&&t.$$typeof===o?(c="<"+(I(t.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):c=typeof t,Y(!1,"React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,i)}var l=et.apply(this,arguments);if(null==l)return l;if(r)for(var u=2;u<arguments.length;u++)kt(arguments[u],t);return t===a?Pt(l):jt(l),l}try{var Et=Object.freeze({}),Ct=new Map([[Et,null]]),Rt=new Set([Et]);Ct.set(0,0),Rt.add(0)}catch(t){}var $t={Children:{map:function(t,e,n){if(null==t)return t;var r=[];return bt(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;var r=ut(null,null,e,n);ft(t,ht,r),pt(r)},count:function(t){return ft(t,(function(){return null}),null)},toArray:function(t){var e=[];return bt(t,e,null,(function(t){return t})),e},only:function(t){if(!rt(t))throw Error("React.Children.only expected to receive a single React element child.");return t}},createRef:function(){var t={current:null};return Object.seal(t),t},Component:$,PureComponent:z,createContext:function(t,e){void 0===e?e=null:null!==e&&"function"!=typeof e&&P(!1,"createContext: Expected the optional second argument to be a function. Instead received: %s",e);var n={$$typeof:u,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null};n.Provider={$$typeof:l,_context:n};var r=!1,o=!1,i={$$typeof:u,_context:n,_calculateChangedBits:n._calculateChangedBits};return Object.defineProperties(i,{Provider:{get:function(){return o||(o=!0,Y(!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(t){n.Provider=t}},_currentValue:{get:function(){return n._currentValue},set:function(t){n._currentValue=t}},_currentValue2:{get:function(){return n._currentValue2},set:function(t){n._currentValue2=t}},_threadCount:{get:function(){return n._threadCount},set:function(t){n._threadCount=t}},Consumer:{get:function(){return r||(r=!0,Y(!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(t){return null!=t&&t.$$typeof===y?P(!1,"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof t?P(!1,"forwardRef requires a render function but was given %s.",null===t?"null":typeof t):0!==t.length&&2!==t.length&&P(!1,"forwardRef render functions accept exactly two parameters: props and ref. %s",1===t.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=t&&(null!=t.defaultProps||null!=t.propTypes)&&P(!1,"forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:f,render:t}},lazy:function(t){var e,n,r={$$typeof:b,_ctor:t,_status:-1,_result:null};return Object.defineProperties(r,{defaultProps:{configurable:!0,get:function(){return e},set:function(t){Y(!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."),e=t,Object.defineProperty(r,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return n},set:function(t){Y(!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."),n=t,Object.defineProperty(r,"propTypes",{enumerable:!0})}}}),r},memo:function(t,e){return vt(t)||P(!1,"memo: The first argument must be a component. Instead received: %s",null===t?"null":typeof t),{$$typeof:y,type:t,compare:void 0===e?null:e}},useCallback:function(t,e){return mt().useCallback(t,e)},useContext:function(t,e){var n=mt();if(void 0!==e&&Y(!1,"useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",e,"number"==typeof e&&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!==t._context){var r=t._context;r.Consumer===t?Y(!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===t&&Y(!1,"Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return n.useContext(t,e)},useEffect:function(t,e){return mt().useEffect(t,e)},useImperativeHandle:function(t,e,n){return mt().useImperativeHandle(t,e,n)},useDebugValue:function(t,e){return mt().useDebugValue(t,e)},useLayoutEffect:function(t,e){return mt().useLayoutEffect(t,e)},useMemo:function(t,e){return mt().useMemo(t,e)},useReducer:function(t,e,n){return mt().useReducer(t,e,n)},useRef:function(t){return mt().useRef(t)},useState:function(t){return mt().useState(t)},Fragment:a,Profiler:s,StrictMode:c,Suspense:d,createElement:St,cloneElement:function(t,e,n){for(var r=nt.apply(this,arguments),o=2;o<arguments.length;o++)kt(arguments[o],r.type);return jt(r),r},createFactory:function(t){var e=St.bind(null,t);return e.type=t,Object.defineProperty(e,"type",{enumerable:!1,get:function(){return j(!1,"Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:t}),t}}),e},isValidElement:rt,version:"16.12.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:B},Dt=Object.freeze({default:$t}),Tt=Dt&&$t||Dt,At=Tt.default||Tt;t.exports=At}()})),pt=r((function(t){"production"===process.env.NODE_ENV?t.exports=rt:t.exports=ut}));function ft(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}ft(".art-video-player{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;margin:0 auto;z-index:10;width:100%;height:100%;outline:0;zoom:1;font-family:Roboto,Arial,Helvetica,sans-serif;color:#eee;text-align:left;direction:ltr;font-size:14px;line-height:1.3;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-touch-action:manipulation;touch-action:manipulation;-ms-high-contrast-adjust:none}.art-video-player *{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.art-video-player ::-webkit-scrollbar{width:5px}.art-video-player ::-webkit-scrollbar-thumb{background-color:#666}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:#ccc}.art-video-player .art-icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1.5}.art-video-player .art-icon svg{fill:#fff}.art-video-player img{max-width:100%;vertical-align:top}.art-video-player>object{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}@supports ((-webkit-backdrop-filter:initial) or (backdrop-filter:initial)){.art-video-player .art-backdrop-filter{-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);background-color:rgba(0,0,0,.7)!important}}");ft(".art-video-player .art-video{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;width:100%;height:100%;background-color:#000;cursor:pointer}");ft(".art-video-player .art-subtitle{display:none;position:absolute;z-index:20;bottom:40px;width:100%;padding:0 20px;text-align:center;color:#fff;font-size:20px;pointer-events:none;text-shadow:.5px .5px .5px rgba(0,0,0,.5)}.art-video-player .art-subtitle p{margin:5px 0}.art-video-player.art-subtitle-show .art-subtitle{display:block}");ft(".art-video-player .art-danmuku{position:absolute;z-index:30;left:0;top:0;right:0;bottom:0;width:100%;height:100%;overflow:hidden;pointer-events:none}");ft(".art-video-player .art-layers{display:none;position:absolute;z-index:40;left:0;top:0;right:0;bottom:0;width:100%;height:100%;overflow:hidden;pointer-events:none}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:block}");ft(".art-video-player .art-mask{display:none;z-index:50;left:0;top:0;right:0;bottom:0;width:100%;height:100%;overflow:hidden;pointer-events:none}.art-video-player .art-mask,.art-video-player .art-mask .art-state{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:absolute}.art-video-player .art-mask .art-state{right:30px;bottom:55px;width:60px;height:60px;opacity:.6}.art-video-player.art-mask-show .art-mask,.art-video-player .art-mask .art-state{display:-webkit-box;display:-ms-flexbox;display:flex}");ft(".art-video-player .art-loading{display:none;position:absolute;z-index:70;left:0;top:0;right:0;bottom:0;width:100%;height:100%;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;pointer-events:none}.art-video-player.art-loading-show .art-loading{display:-webkit-box;display:-ms-flexbox;display:flex}");ft('.art-video-player .art-bottom{position:absolute;z-index:60;left:0;right:0;bottom:0;height:100px;padding:55px 10px 0;opacity:0;visibility:hidden;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;pointer-events:none;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) repeat-x bottom}.art-video-player .art-bottom .art-progress{position:relative;pointer-events:auto}.art-video-player .art-bottom .art-progress .art-control-progress{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:4px;cursor:pointer}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner{position:relative;height:50%;width:100%;background:hsla(0,0%,100%,.2)}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;height:100%;width:0;background:hsla(0,0%,100%,.4)}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{position:absolute;z-index:20;left:0;top:0;right:0;bottom:0;height:100%;width:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{position:absolute;z-index:30;left:0;top:0;right:0;bottom:0;height:100%;pointer-events:none}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{display:inline-block;position:absolute;left:0;top:0;width:7px;height:100%;background:#fff;pointer-events:auto}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{display:none;position:absolute;z-index:40;top:-5px;left:-6.5px;width:13px;height:13px;border-radius:50%}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator.art-show-indicator{display:block}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{display:none;position:absolute;z-index:50;top:-25px;left:0;height:20px;padding:0 5px;line-height:20px;color:#fff;font-size:12px;text-align:center;background:rgba(0,0,0,.7);border-radius:3px;font-weight:700;white-space:nowrap}.art-video-player .art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner{height:100%}.art-video-player .art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner .art-progress-indicator,.art-video-player .art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner .art-progress-tip{display:block}.art-video-player .art-bottom .art-progress .art-control-thumbnails{display:none;position:absolute;bottom:8px;left:0;pointer-events:none;background-color:rgba(0,0,0,.7)}.art-video-player .art-bottom .art-controls{position:relative;pointer-events:auto;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:40px;padding:5px 0}.art-video-player .art-bottom .art-controls,.art-video-player .art-bottom .art-controls .art-controls-left,.art-video-player .art-bottom .art-controls .art-controls-right{display:-webkit-box;display:-ms-flexbox;display:flex}.art-video-player .art-bottom .art-controls .art-control{opacity:.9;font-size:12px;height:36px;min-width:36px;line-height:36px;text-align:center;cursor:pointer}.art-video-player .art-bottom .art-controls .art-control .art-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;float:left;height:36px;width:36px}.art-video-player .art-bottom .art-controls .art-control:hover{opacity:1}.art-video-player .art-bottom .art-controls .art-control-onlyText{padding:0 10px}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel{position:relative;float:left;width:0;height:100%;-webkit-transition:margin .2s cubic-bezier(.4,0,1,1),width .2s cubic-bezier(.4,0,1,1);transition:margin .2s cubic-bezier(.4,0,1,1),width .2s cubic-bezier(.4,0,1,1);overflow:hidden}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle{position:absolute;top:50%;left:0;width:12px;height:12px;border-radius:12px;margin-top:-6px;background:#fff}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before{left:-54px;background:#fff}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after{left:6px;background:hsla(0,0%,100%,.2)}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after,.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before{content:"";position:absolute;display:block;top:50%;height:3px;margin-top:-2px;width:60px}.art-video-player .art-bottom .art-controls .art-control-volume:hover .art-volume-panel{width:60px}.art-video-player .art-bottom .art-controls .art-control-quality{position:relative;z-index:30}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys{display:none;position:absolute;bottom:35px;width:100px;padding:5px 0;text-align:center;color:#fff;background:rgba(0,0,0,.8);border-radius:3px}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys .art-quality-item{height:30px;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px rgba(0,0,0,.5)}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys .art-quality-item:hover{background-color:hsla(0,0%,100%,.1)}.art-video-player .art-bottom .art-controls .art-control-quality:hover .art-qualitys{display:block}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1;visibility:visible}.art-video-player.art-destroy .art-progress-indicator,.art-video-player.art-destroy .art-progress-tip,.art-video-player.art-error .art-progress-indicator,.art-video-player.art-error .art-progress-tip{display:none!important}');ft(".art-video-player .art-notice{display:none;font-size:14px;position:absolute;z-index:80;left:0;top:0;padding:10px;width:100%;pointer-events:none}.art-video-player .art-notice .art-notice-inner{display:inline-block;padding:5px 10px;color:#fff;background:rgba(0,0,0,.6);border-radius:3px}.art-video-player.art-notice-show .art-notice{display:-webkit-box;display:-ms-flexbox;display:flex}");ft(".art-video-player .art-contextmenus{display:none;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;position:absolute;z-index:120;left:0;top:0;min-width:200px;padding:5px 0;background:rgba(0,0,0,.9);border-radius:3px}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;font-size:13px;display:block;color:#fff;padding:7px 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px rgba(0,0,0,.5);border-bottom:1px solid hsla(0,0%,100%,.1)}.art-video-player .art-contextmenus .art-contextmenu a{color:#fff;text-decoration:none}.art-video-player .art-contextmenus .art-contextmenu span{display:inline-block;padding:0 7px}.art-video-player .art-contextmenus .art-contextmenu span.art-current,.art-video-player .art-contextmenus .art-contextmenu span:hover{color:#00c9ff}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:hsla(0,0%,100%,.1)}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:none}.art-video-player.art-contextmenu-show .art-contextmenus{display:-webkit-box;display:-ms-flexbox;display:flex}");ft(".art-video-player .art-settings{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:absolute;z-index:90;left:0;top:0;height:100%;width:100%;opacity:0;visibility:hidden;pointer-events:none;overflow:hidden}.art-video-player .art-settings .art-setting-inner{position:absolute;top:0;right:-300px;bottom:0;width:300px;height:100%;font-size:12px;background:rgba(0,0,0,.9);-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;overflow:auto}.art-video-player .art-settings .art-setting-inner .art-setting-body{overflow-y:auto;width:100%;height:100%}.art-video-player .art-settings .art-setting-inner .art-setting-body .art-setting{border-bottom:1px solid hsla(0,0%,100%,.1);padding:10px 15px}.art-video-player .art-settings .art-setting-inner .art-setting-body .art-setting .art-setting-header{margin-bottom:5px}.art-video-player .art-settings .art-setting-radio{display:-webkit-box;display:-ms-flexbox;display:flex}.art-video-player .art-settings .art-setting-radio .art-radio-item{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:0 2px}.art-video-player .art-settings .art-setting-radio .art-radio-item button{height:22px;width:100%;border:none;outline:none;color:#fff;background:hsla(0,0%,100%,.2);border-radius:2px}.art-video-player .art-settings .art-setting-radio .art-radio-item.current button{background-color:#00a1d6}.art-video-player .art-settings .art-setting-range input{width:100%;height:3px;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:hsla(0,0%,100%,.5)}.art-video-player .art-settings .art-setting-checkbox input{height:14px;width:14px;margin-right:5px}.art-video-player .art-settings .art-setting-upload{display:-webkit-box;display:-ms-flexbox;display:flex}.art-video-player .art-settings .art-setting-upload .art-upload-btn{width:80px;height:22px;line-height:22px;border:none;outline:none;color:#fff;background:hsla(0,0%,100%,.2);border-radius:2px;text-align:center}.art-video-player .art-settings .art-setting-upload .art-upload-value{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:22px;line-height:22px;padding-left:10px}.art-video-player.art-setting-show .art-settings{opacity:1;visibility:visible;pointer-events:auto}.art-video-player.art-setting-show .art-settings .art-setting-inner{right:0}");ft(".art-video-player .art-info{display:none;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;position:absolute;left:10px;top:10px;z-index:100;width:350px;min-height:150px;padding:10px;color:#fff;font-size:12px;font-family:Noto Sans CJK SC DemiLight,Roboto,Segoe UI,Tahoma,Arial,Helvetica,sans-serif;-webkit-font-smoothing:antialiased;background:rgba(0,0,0,.9)}.art-video-player .art-info .art-info-item{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:5px}.art-video-player .art-info .art-info-item .art-info-title{width:100px;text-align:right}.art-video-player .art-info .art-info-item .art-info-content{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:5px}.art-video-player .art-info .art-info-close{position:absolute;top:5px;right:5px;cursor:pointer}.art-video-player.art-info-show .art-info{display:-webkit-box;display:-ms-flexbox;display:flex}");ft(".art-video-player.art-hide-cursor *{cursor:none!important}");ft(".art-video-player[data-aspect-ratio] video{-webkit-box-sizing:content-box;box-sizing:content-box;-o-object-fit:fill;object-fit:fill}");ft(".art-video-player.art-web-fullscreen{position:fixed;z-index:9999;width:100%;height:100%;left:0;top:0;right:0;bottom:0}");ft(".art-video-player .art-pip-header{display:none;position:absolute;z-index:110;left:0;top:0;right:0;height:35px;line-height:35px;color:#fff;background:rgba(0,0,0,.5);-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;opacity:0;visibility:hidden;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.art-video-player .art-pip-header .art-pip-title{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:0 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:move}.art-video-player .art-pip-header .art-pip-close{width:35px;text-align:center;font-size:22px;cursor:pointer}.art-video-player.art-is-dragging{opacity:.7}.art-video-player.art-pip{position:fixed;z-index:9999;width:400px;height:225px;-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 3px 6px 0 rgba(0,0,0,.2);box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 3px 6px 0 rgba(0,0,0,.2)}.art-video-player.art-pip .art-pip-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.art-video-player.art-pip.art-hover .art-pip-header{opacity:1;visibility:visible}.art-video-player.art-pip .art-mask .art-state{position:static}.art-video-player.art-pip .art-bottom,.art-video-player.art-pip .art-contextmenu,.art-video-player.art-pip .art-danmu,.art-video-player.art-pip .art-info,.art-video-player.art-pip .art-layers,.art-video-player.art-pip .art-notice,.art-video-player.art-pip .art-setting,.art-video-player.art-pip .art-subtitle{display:none!important}");ft(".art-auto-size{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}");ft(".art-video-player[data-flip=horizontal] .art-video{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.art-video-player[data-flip=vertical] .art-video{-webkit-transform:scaleY(-1);transform:scaleY(-1)}");ft(':root{--balloon-color:rgba(16,16,16,0.95);--balloon-font-size:12px;--balloon-move:4px}button[aria-label][data-balloon-pos]{overflow:visible}[aria-label][data-balloon-pos]{position:relative;cursor:pointer}[aria-label][data-balloon-pos]:after{text-indent:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-weight:400;font-style:normal;text-shadow:none;font-size:var(--balloon-font-size);background:var(--balloon-color);border-radius:2px;color:#fff;content:attr(aria-label);padding:.5em 1em;white-space:nowrap;line-height:1.2}[aria-label][data-balloon-pos]:after,[aria-label][data-balloon-pos]:before{opacity:0;pointer-events:none;-webkit-transition:all .18s ease-out .18s;transition:all .18s ease-out .18s;position:absolute;z-index:10}[aria-label][data-balloon-pos]:before{width:0;height:0;border:5px solid transparent;border-top:5px solid var(--balloon-color);content:""}[aria-label][data-balloon-pos]:hover:after,[aria-label][data-balloon-pos]:hover:before{opacity:1;pointer-events:none}[aria-label][data-balloon-pos][data-balloon-pos=up]:after{margin-bottom:10px}[aria-label][data-balloon-pos][data-balloon-pos=up]:after,[aria-label][data-balloon-pos][data-balloon-pos=up]:before{bottom:100%;left:50%;-webkit-transform:translate(-50%,var(--balloon-move));transform:translate(-50%,var(--balloon-move));-webkit-transform-origin:top;transform-origin:top}[aria-label][data-balloon-pos][data-balloon-pos=up]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=up]:hover:before{-webkit-transform:translate(-50%);transform:translate(-50%)}');var dt=r((function(t,e){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,n=function(n){if(void 0===n)return"undefined";if(null===n)return"null";var o=t(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(t){return"GeneratorFunction"===r(t)}(n)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(n))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(n))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(n))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(n))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(n))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.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(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(n))return"generator";switch(o=e.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(t){return t.constructor?t.constructor.name:null}function o(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return i(t,e,r),a(t,e,r),function(t,e,r){var c=n(e),s=n(t);if("object"===c){if("object"!==s)throw new Error("[Type Error]: '".concat(r.join("."),"' require 'object' type, but got '").concat(s,"'"));Object.keys(e).forEach((function(n){var c=t[n],s=e[n],l=r.slice();l.push(n),i(c,s,l),a(c,s,l),o(c,s,l)}))}if("array"===c){if("array"!==s)throw new Error("[Type Error]: '".concat(r.join("."),"' require 'array' type, but got '").concat(s,"'"));t.forEach((function(n,c){var s=t[c],l=e[c]||e[0],u=r.slice();u.push(c),i(s,l,u),a(s,l,u),o(s,l,u)}))}}(t,e,r),t}function i(t,e,r){if("string"===n(e)){var o=n(t);if(!(-1<e.indexOf("|")?e.split("|").map((function(t){return t.toLowerCase().trim()})).filter(Boolean).some((function(t){return o===t})):e.toLowerCase().trim()===o))throw new Error("[Type Error]: '".concat(r.join("."),"' require '").concat(e,"' type, but got '").concat(o,"'"))}}function a(t,e,r){if("function"===n(e)){var o=e(t,n(t),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}()})),ht=function(){function t(){i(this,t)}return c(t,[{key:"on",value:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this}},{key:"once",value:function(t,e,n){var r=this;function o(){r.off(t,o);for(var i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];e.apply(n,a)}return o._=e,this.on(t,o,n)}},{key:"emit",value:function(t){for(var e=((this.e||(this.e={}))[t]||[]).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<e.length;i+=1)e[i].fn.apply(e[i].ctx,r);return this}},{key:"off",value:function(t,e){var n=this.e||(this.e={}),r=n[t],o=[];if(r&&e)for(var i=0,a=r.length;i<a;i+=1)r[i].fn!==e&&r[i].fn._!==e&&o.push(r[i]);return o.length?n[t]=o:delete n[t],this}}]),t}();function yt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector(t)}function bt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return Array.from(e.querySelectorAll(t))}function vt(t,e){return t.classList.add(e)}function mt(t,e){return t.classList.remove(e)}function gt(t,e){return t.classList.contains(e)}function wt(t,e){return e instanceof Element?t.appendChild(e):t.insertAdjacentHTML("beforeend",String(e)),t.lastElementChild||t.lastChild}function xt(t,e,n){return t.style[e]=n,t}function Ot(t,e){return Object.keys(e).forEach((function(n){xt(t,n,e[n])})),t}function kt(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=window.getComputedStyle(t,null).getPropertyValue(e);return n?parseFloat(r):r}function jt(t){return Array.from(t.parentElement.children).filter((function(e){return e!==t}))}function Pt(t,e){jt(t).forEach((function(t){return mt(t,e)})),vt(t,e)}function St(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"up";t.setAttribute("aria-label",e),t.setAttribute("data-balloon-pos",n)}var Et=function(t){return-1!==Function.toString.call(t).indexOf("[native code]")},Ct=r((function(t){function e(){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(t){return!1}}function n(r,o,i){return e()?t.exports=n=Reflect.construct:t.exports=n=function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&p(o,n.prototype),o},n.apply(null,arguments)}t.exports=n})),Rt=function(t){function e(t,n){var r;return i(this,e),r=l(this,u(e).call(this,t)),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(s(r),n||r.constructor),r.name="ArtPlayerError",r}return f(e,t),e}(r((function(t){function e(n){var r="function"==typeof Map?new Map:void 0;return t.exports=e=function(t){if(null===t||!Et(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,e)}function e(){return Ct(t,arguments,u(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),p(e,t)},e(n)}t.exports=e}))(Error));function $t(t,e){if(!t)throw new Rt(e);return t}function Dt(t){return"WEBVTT \r\n\r\n".concat(t.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 Tt(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}function At(t){var e=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(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.split(/[:.]/).map((function(t,e,n){if(e===n.length-1){if(1===t.length)return".".concat(t,"00");if(2===t.length)return".".concat(t,"0")}else if(1===t.length)return(0===e?"0":":0")+t;return 0===e?t:e===n.length-1?".".concat(t):":".concat(t)})).join("")}return"WEBVTT\n\n".concat(t.split(/\r?\n/).map((function(t){var r=t.match(e);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(t){return t.trim()})).join("\n")}:null})).filter((function(t){return t})).map((function(t,e){return t?"".concat(e+1,"\n").concat(t.start," --\x3e ").concat(t.end,"\n").concat(t.text):""})).filter((function(t){return t.trim()})).join("\n\n"))}function _t(t){return t.includes("?")?_t(t.split("?")[0]):t.includes("#")?_t(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}function zt(t,e){var n=document.createElement("a");n.style.display="none",n.href=t,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}var Lt=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}};var qt=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)};var Mt=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var Ft=function(t){return Lt(t)||qt(t)||Mt()},It=Object.defineProperty,Nt=Object.prototype.hasOwnProperty;function Vt(t,e){return Nt.call(t,e)}function Wt(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.reduce((function(t,e){return Object.getOwnPropertyNames(e).forEach((function(n){$t(!Vt(t,n),"Target attribute name is duplicated: ".concat(n)),It(t,n,Object.getOwnPropertyDescriptor(e,n))})),t}),t)}function Bt(){for(var t=function(t){return t&&"object"===o(t)&&!Array.isArray(t)},e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.reduce((function(e,n){return Object.keys(n).forEach((function(r){var o=e[r],i=n[r];Array.isArray(o)&&Array.isArray(i)?e[r]=o.concat.apply(o,Ft(i)):!t(o)||!t(i)||i instanceof Element?e[r]=i:e[r]=Bt(o,i)})),e}),{})}function Ut(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(e){return setTimeout(e,t)}))}function Ht(t,e,n){var r;function o(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var c=function(){r=null,t.apply(n,i)};clearTimeout(r),r=setTimeout(c,e)}return o.clearTimeout=function(){clearTimeout(r)},o}function Yt(t,e){var n,r,o=!1;return function i(){for(var a=arguments.length,c=new Array(a),s=0;s<a;s++)c[s]=arguments[s];if(o)return n=c,void(r=this);o=!0,t.apply(this,c),setTimeout((function(){o=!1,n&&(i.apply(r,n),n=null,r=null)}),e)}}function Jt(t,e,n){return Math.max(Math.min(t,Math.max(e,n)),Math.min(e,n))}function Xt(t){var e=Math.floor(t/3600),n=Math.floor((t-3600*e)/60),r=Math.floor(t-3600*e-60*n);return(e>0?[e,n,r]:[n,r]).map((function(t){return t<10?"0".concat(t):String(t)})).join(":")}var Zt=Object.freeze({__proto__:null,query:yt,queryAll:bt,addClass:vt,removeClass:mt,hasClass:gt,append:wt,remove:function(t){return t.parentNode.removeChild(t)},setStyle:xt,setStyles:Ot,getStyle:kt,sublings:jt,inverseClass:Pt,tooltip:St,ArtPlayerError:Rt,errorHandle:$t,srtToVtt:Dt,vttToBlob:Tt,assToVtt:At,getExt:_t,downloadFile:zt,def:It,has:Vt,proxyPropertys:Wt,mergeDeep:Bt,sleep:Ut,debounce:Ht,throttle:Yt,clamp:Jt,secondToTime:Xt});function Qt(t,e,n){return $t("string"===e||t instanceof Element,"".concat(n.join(".")," require 'string' or 'Element' type"))}var Gt={container:Qt,url:"string",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",backdrop:"boolean",fullscreen:"boolean",fullscreenWeb:"boolean",subtitleOffset:"boolean",miniProgressBar:"boolean",localVideo:"boolean",localSubtitle:"boolean",networkMonitor:"boolean",plugins:["function"],whitelist:["string|function|regexp"],layers:[{disable:"boolean|undefined",name:"string|undefined",index:"number|undefined",html:Qt,style:"object|undefined",click:"function|undefined",mounted:"function|undefined",tooltip:"string|undefined"}],contextmenu:[{disable:"boolean|undefined",name:"string|undefined",index:"number|undefined",html:Qt,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:Qt,style:"object|undefined",click:"function|undefined",mounted:"function|undefined",tooltip:"string|undefined",position:function(t,e,n){var r=["top","left","right"];return $t(r.includes(t),"".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"},Kt={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"]},te=function t(e){var n=this;i(this,t);var r=e.constructor.kindOf,o=e.option.whitelist;this.ua=navigator.userAgent,this.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(this.ua),this.state=!this.isMobile||o.some((function(t){switch(r(t)){case"string":return n.ua.indexOf(t)>-1;case"function":return t(n.ua);case"regexp":return t.test(n.ua);default:return!1}}))},ee=function(){function t(e){var n=this;i(this,t),this.art=e,e.option.container instanceof Element?this.$container=e.option.container:(this.$container=yt(e.option.container),$t(this.$container,"No container element found by ".concat(e.option.container))),$t(e.constructor.instances.every((function(t){return t.template.$container!==n.$container})),"Cannot mount multiple instances on the same dom element"),$t(this.$container.clientWidth&&this.$container.clientHeight,"The width and height of the container cannot be 0"),e.whitelist.state?this.desktop():this.mobile()}return c(t,[{key:"query",value:function(t){return yt(t,this.$container)}},{key:"desktop",value:function(){var t=this.art.option,e=t.theme,n=t.backdrop;this.$container.innerHTML='<div class="art-video-player art-subtitle-show art-layer-show" style="--theme: '.concat(e,'"><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"><div class="art-setting-body"></div></div></div><div class="art-info"><div class="art-info-panel"><div class="art-info-item"><div class="art-info-title">Player version:</div><div class="art-info-content">3.4.2</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">xD7</div></div><div class="art-contextmenus"></div></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"),n&&(vt(this.$settingInner,"art-backdrop-filter"),vt(this.$info,"art-backdrop-filter"),vt(this.$contextmenu,"art-backdrop-filter"))}},{key:"mobile",value:function(){this.$container.innerHTML='<div class="art-video-player"><video class="art-video"></video></div>',this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video")}},{key:"destroy",value:function(t){t?this.$container.innerHTML="":vt(this.$player,"art-destroy")}}]),t}(),ne={"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":"迷你播放器","Exit mini player":"退出迷你播放器","Local Subtitle":"本地字幕","Local Video":"本地视频","Subtitle offset time":"字幕偏移时间","No subtitles found":"未发现字幕"},re={"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":"迷你播放器","Exit mini player":"退出迷你播放器","Local Subtitle":"本地字幕","Local Video":"本地視頻","Subtitle offset time":"字幕偏移時間","No subtitles found":"未發現字幕"},oe=function(){function t(e){i(this,t),this.art=e,this.languages={"zh-cn":ne,"zh-tw":re},this.init()}return c(t,[{key:"init",value:function(){var t=this.art.option.lang.toLowerCase();this.language=this.languages[t]||{}}},{key:"get",value:function(t){return this.language[t]||t}},{key:"update",value:function(t){this.languages=Bt(this.languages,t),this.init()}}]),t}();var ie=r((function(t){!function(){var e="undefined"!=typeof window&&void 0!==window.document?window.document:{},n=t.exports,r=function(){for(var t,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((t=n[r])&&t[1]in e){for(r=0;r<t.length;r++)i[n[0][r]]=t[r];return i}return!1}(),o={change:r.fullscreenchange,error:r.fullscreenerror},i={request:function(t){return new Promise(function(n,o){var i=function(){this.off("change",i),n()}.bind(this);this.on("change",i),t=t||e.documentElement,Promise.resolve(t[r.requestFullscreen]()).catch(o)}.bind(this))},exit:function(){return new Promise(function(t,n){if(this.isFullscreen){var o=function(){this.off("change",o),t()}.bind(this);this.on("change",o),Promise.resolve(e[r.exitFullscreen]()).catch(n)}else t()}.bind(this))},toggle:function(t){return this.isFullscreen?this.exit():this.request(t)},onchange:function(t){this.on("change",t)},onerror:function(t){this.on("error",t)},on:function(t,n){var r=o[t];r&&e.addEventListener(r,n,!1)},off:function(t,n){var r=o[t];r&&e.removeEventListener(r,n,!1)},raw:r};r?(Object.defineProperties(i,{isFullscreen:{get:function(){return Boolean(e[r.fullscreenElement])}},element:{enumerable:!0,get:function(){return e[r.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(e[r.fullscreenEnabled])}}}),n?t.exports=i:window.screenfull=i):n?t.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()}));ie.isEnabled;function ae(t,e){var n=t.template.$video;document.pictureInPictureEnabled?function(t,e){var n=t.template.$video,r=t.events.proxy,o=t.notice;n.disablePictureInPicture=!1,It(e,"pip",{get:function(){return document.pictureInPictureElement},set:function(t){t?n.requestPictureInPicture().catch((function(t){throw o.show=t,t})):document.exitPictureInPicture().catch((function(t){throw o.show=t,t}))}}),r(n,"enterpictureinpicture",(function(){t.emit("pipChange",!0)})),r(n,"leavepictureinpicture",(function(){t.emit("pipChange",!1)}))}(t,e):n.webkitSupportsPresentationMode?function(t,e){var n=t.template.$video;n.webkitSetPresentationMode("inline"),It(e,"pip",{get:function(){return"picture-in-picture"===n.webkitPresentationMode},set:function(e){e?(n.webkitSetPresentationMode("picture-in-picture"),t.emit("pipChange",!0)):(n.webkitSetPresentationMode("inline"),t.emit("pipChange",!1))}})}(t,e):function(t,e){var n=t.option,r=t.i18n,o=t.template,i=o.$player,a=o.$pipClose,c=o.$pipTitle,s=o.$pipHeader,l=t.events.proxy,u="",p=!1,f=0,d=0,h=0,y=0;l(s,"mousedown",(function(t){p=!0,f=t.pageX,d=t.pageY,h=e.left,y=e.top})),l(s,"mousemove",(function(t){p&&(vt(i,"art-is-dragging"),xt(i,"left","".concat(h+t.pageX-f,"px")),xt(i,"top","".concat(y+t.pageY-d,"px")))})),l(document,"mouseup",(function(){p=!1,mt(i,"art-is-dragging")})),l(a,"click",(function(){e.pip=!1,p=!1,mt(i,"art-is-dragging")})),wt(c,n.title||r.get("Mini player")),It(e,"pip",{get:function(){return gt(i,"art-pip")},set:function(n){if(n){e.autoSize=!1,u=i.style.cssText,vt(i,"art-pip");var r=document.body;xt(i,"top","".concat(r.clientHeight-e.height-50,"px")),xt(i,"left","".concat(r.clientWidth-e.width-50,"px")),e.fullscreen=!1,e.fullscreenWeb=!1,e.aspectRatio=!1,e.playbackRate=!1,t.emit("pipChange",!0)}else e.pip&&(i.style.cssText=u,mt(i,"art-pip"),xt(i,"top",null),xt(i,"left",null),e.fullscreen=!1,e.fullscreenWeb=!1,e.aspectRatio=!1,e.playbackRate=!1,e.autoSize=!0,t.emit("pipChange",!1))}})}(t,e),It(e,"pipToggle",{set:function(t){t&&(e.pip=!e.pip)}})}var ce=function t(e){var n;i(this,t),function(t,e){var n=t.option,r=n.type,o=n.customType,i=t.template.$video;It(e,"url",{get:function(){return i.src},set:function(e){var n=r||_t(e),a=o[n];n&&a?Ut().then((function(){t.loading.show=!0,a.call(t,i,e,t),t.emit("customType",n)})):(i.src=e,t.option.url=e,t.emit("urlChange",e))}})}(e,this),function(t,e){var n=t.option,r=t.events.proxy,o=t.template,i=o.$player,a=o.$video,c=t.i18n,s=t.notice,l=0;r(a,"click",(function(){e.toggle=!0})),Kt.events.forEach((function(e){r(a,e,(function(e){t.emit("video:".concat(e.type),e)}))})),t.on("video:canplay",(function(){l=0,t.loading.show=!1})),t.once("video:canplay",(function(){t.controls.show=!0,t.mask.show=!0,t.emit("ready")})),t.on("video:ended",(function(){n.loop?(e.seek=0,e.play=!0,t.controls.show=!1,t.mask.show=!1):(t.controls.show=!0,t.mask.show=!0)})),t.on("video:error",(function(){l<5?Ut(1e3).then((function(){l+=1,e.url=n.url,s.show="".concat(c.get("Reconnect"),": ").concat(l)})):(t.loading.show=!1,t.controls.show=!1,vt(i,"art-error"),Ut(1e3).then((function(){s.show=c.get("Video load failed"),t.destroy(!1)})))})),t.on("video:loadedmetadata",(function(){n.autoSize&&(e.autoSize=!0)})),t.on("video:loadstart",(function(){t.loading.show=!0})),t.on("video:pause",(function(){t.controls.show=!0,t.mask.show=!0})),t.on("video:play",(function(){t.mask.show=!1})),t.on("video:playing",(function(){t.mask.show=!1})),t.on("video:seeked",(function(){t.loading.show=!1})),t.on("video:seeking",(function(){t.loading.show=!0})),t.on("video:timeupdate",(function(){t.mask.show=!1})),t.on("video:waiting",(function(){t.loading.show=!0}))}(e,this),function(t,e){var n=t.option,r=t.storage,o=t.template.$video;Object.keys(n.moreVideoAttr).forEach((function(t){o[t]=n.moreVideoAttr[t]})),n.muted&&(o.muted=n.muted),n.volume&&(o.volume=Jt(n.volume,0,1));var i=r.get("volume");i&&(o.volume=Jt(i,0,1)),n.poster&&(o.poster=n.poster),n.autoplay&&(o.autoplay=n.autoplay),o.controls=!1,e.url=n.url}(e,this),function(t,e){var n=t.i18n,r=t.notice,o=t.constructor.instances,i=t.option.mutex,a=t.template.$video;It(e,"play",{set:function(c){if(c){var s=a.play();s.then&&s.then().catch((function(t){throw r.show=t,t})),i&&o.filter((function(e){return e!==t})).forEach((function(t){t.player.pause=!0})),r.show=n.get("Play"),t.emit("play")}else e.pause=!0}})}(e,this),function(t,e){var n=t.template.$video,r=t.i18n,o=t.notice;It(e,"pause",{get:function(){return n.paused},set:function(i){i?(n.pause(),o.show=r.get("Pause"),t.emit("pause")):e.play=!0}})}(e,this),It(n=this,"toggle",{set:function(t){t&&(n.playing?n.pause=!0:n.play=!0)}}),function(t,e){var n=t.notice;It(e,"seek",{set:function(r){e.currentTime=r,n.show="".concat(Xt(r)," / ").concat(Xt(e.duration)),t.emit("seek",r)}})}(e,this),function(t,e){var n=t.template.$video,r=t.i18n,o=t.notice,i=t.storage;It(e,"volume",{get:function(){return n.volume||0},set:function(e){n.volume=Jt(e,0,1),o.show="".concat(r.get("Volume"),": ").concat(parseInt(100*n.volume,10)),0!==n.volume&&i.set("volume",n.volume),t.emit("volume",n.volume)}}),It(e,"muted",{get:function(){return n.muted},set:function(e){n.muted=e,t.emit("volume",n.volume)}})}(e,this),function(t,e){It(e,"currentTime",{get:function(){return t.template.$video.currentTime||0},set:function(n){t.template.$video.currentTime=Jt(n,0,e.duration)}})}(e,this),function(t,e){It(e,"duration",{get:function(){return t.template.$video.duration||0}})}(e,this),function(t,e){var n=t.i18n,r=t.notice;function o(o,i,a){if(o!==e.url){URL.revokeObjectURL(e.url);var c=e.playing;e.url=o,e.playbackRate=!1,e.aspectRatio=!1,t.once("video:canplay",(function(){e.currentTime=a})),c&&(e.play=!0),i&&(r.show="".concat(n.get("Switch video"),": ").concat(i)),t.emit("switch",o)}}It(e,"switchQuality",{value:function(t,n){return o(t,n,e.currentTime)}}),It(e,"switchUrl",{value:function(t,e){return o(t,e,0)}})}(e,this),function(t,e){var n=t.template,r=n.$video,o=n.$player,i=t.i18n,a=t.notice;It(e,"playbackRate",{get:function(){return o.dataset.playbackRate},set:function(n){if(n){if(n===o.dataset.playbackRate)return;var c=[.5,.75,1,1.25,1.5,1.75,2];$t(c.includes(n),"'playbackRate' only accept ".concat(c.toString()," as parameters")),r.playbackRate=n,o.dataset.playbackRate=n,a.show="".concat(i.get("Rate"),": ").concat(1===n?i.get("Normal"):"".concat(n,"x")),t.emit("playbackRateChange",n)}else e.playbackRate&&(e.playbackRate=1,delete o.dataset.playbackRate,t.emit("playbackRateRemove"))}}),It(e,"playbackRateReset",{set:function(n){if(n){var r=o.dataset.playbackRate;r&&(e.playbackRate=Number(r),t.emit("playbackRateReset"))}}})}(e,this),function(t,e){var n=t.template,r=n.$video,o=n.$player,i=t.i18n,a=t.notice;It(e,"aspectRatio",{get:function(){return o.dataset.aspectRatio||""},set:function(n){if(n){var c=["default","4:3","16:9"];if($t(c.includes(n),"'aspectRatio' only accept ".concat(c.toString()," as parameters")),"default"===n)e.aspectRatio=!1;else{var s=n.split(":"),l=r.videoWidth,u=r.videoHeight,p=o.clientWidth,f=o.clientHeight,d=l/u,h=s[0]/s[1];if(d>h){var y=h*u/l;xt(r,"width","".concat(100*y,"%")),xt(r,"height","100%"),xt(r,"padding","0 ".concat((p-p*y)/2,"px"))}else{var b=l/h/u;xt(r,"width","100%"),xt(r,"height","".concat(100*b,"%")),xt(r,"padding","".concat((f-f*b)/2,"px 0"))}}o.dataset.aspectRatio=n,a.show="".concat(i.get("Aspect ratio"),": ").concat("default"===n?i.get("Default"):n),t.emit("aspectRatioChange",n)}else e.aspectRatio&&(xt(r,"width",null),xt(r,"height",null),xt(r,"padding",null),delete o.dataset.aspectRatio,t.emit("aspectRatioRemove"))}}),It(e,"aspectRatioReset",{set:function(n){if(n&&e.aspectRatio){var r=e.aspectRatio;e.aspectRatio=r,t.emit("aspectRatioReset")}}})}(e,this),function(t,e){var n=t.option,r=t.notice,o=t.template.$video;It(e,"getScreenshotDataURL",{value:function(){try{var t=document.createElement("canvas");return t.width=o.videoWidth,t.height=o.videoHeight,t.getContext("2d").drawImage(o,0,0),t.toDataURL("image/png")}catch(t){throw r.show=t,t}}}),It(e,"getScreenshotBlobUrl",{value:function(){return new Promise((function(t,e){try{var n=document.createElement("canvas");n.width=o.videoWidth,n.height=o.videoHeight,n.getContext("2d").drawImage(o,0,0),n.toBlob((function(e){t(URL.createObjectURL(e))}))}catch(t){r.show=t,e(t)}}))}}),It(e,"screenshot",{value:function(){var r=e.getScreenshotDataURL();r&&(zt(r,"".concat(n.title||"artplayer","_").concat(Xt(o.currentTime),".png")),t.emit("screenshot",r))}})}(e,this),function(t,e){var n=t.template.$player;It(e,"fullscreen",{get:function(){return ie.isFullscreen},set:function(r){e.fullscreenWeb&&(e.fullscreenWeb=!1),r?ie.request(n).then((function(){vt(n,"art-fullscreen"),e.aspectRatioReset=!0,t.emit("fullscreenChange",!0)})):ie.exit().then((function(){mt(n,"art-fullscreen"),e.aspectRatioReset=!0,t.emit("fullscreenChange",!1)}))}}),It(e,"fullscreenToggle",{set:function(t){t&&(e.fullscreen=!e.fullscreen)}})}(e,this),function(t,e){var n=t.template.$player;It(e,"fullscreenWeb",{get:function(){return gt(n,"art-web-fullscreen")},set:function(r){e.fullscreen&&(e.fullscreen=!1),r?(vt(n,"art-web-fullscreen"),e.aspectRatioReset=!0,t.emit("fullscreenWebChange",!0)):(mt(n,"art-web-fullscreen"),e.aspectRatioReset=!0,t.emit("fullscreenWebChange",!1))}}),It(e,"fullscreenWebToggle",{set:function(t){t&&(e.fullscreenWeb=!e.fullscreenWeb)}})}(e,this),ae(e,this),function(t,e){var n=t.template.$video;It(e,"loaded",{get:function(){return e.loadedTime/n.duration}}),It(e,"loadedTime",{get:function(){return n.buffered.length?n.buffered.end(n.buffered.length-1):0}})}(e,this),function(t,e){It(e,"played",{get:function(){return e.currentTime/e.duration}})}(0,this),function(t,e){var n=t.template.$video;It(e,"playing",{get:function(){return!!(n.currentTime>0&&!n.paused&&!n.ended&&n.readyState>2)}})}(e,this),function(t,e){var n=t.template,r=n.$container,o=n.$player,i=n.$video;It(e,"autoSize",{get:function(){return gt(r,"art-auto-size")},set:function(n){if(n){var a=i.videoWidth,c=i.videoHeight,s=r.getBoundingClientRect(),l=s.width,u=s.height,p=a/c,f=l/u;if(vt(r,"art-auto-size"),f>p){xt(o,"width","".concat(u*p/l*100,"%")),xt(o,"height","100%")}else{var d=l/p/u*100;xt(o,"width","100%"),xt(o,"height","".concat(d,"%"))}t.emit("autoSizeChange",{width:e.width,height:e.height})}else mt(r,"art-auto-size"),xt(o,"width",null),xt(o,"height",null),t.emit("autoSizeRemove")}})}(e,this),function(t,e){It(e,"rect",{get:function(){return t.template.$player.getBoundingClientRect()}}),["bottom","height","left","right","top","width"].forEach((function(t){It(e,t,{get:function(){return e.rect[t]}})})),It(e,"x",{get:function(){return e.left+window.pageXOffset}}),It(e,"y",{get:function(){return e.top+window.pageYOffset}})}(e,this),function(t,e){var n=t.template.$player;It(e,"flip",{get:function(){return n.dataset.flip},set:function(e){if(e){var r=["normal","horizontal","vertical"];$t(r.includes(e),"'flip' only accept ".concat(r.toString()," as parameters")),n.dataset.flip=e,t.emit("flipChange",e)}else delete n.dataset.flip,t.emit("flipRemove")}})}(e,this),Wt(e,this)};var se=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t},le=r((function(t){function e(n,r,o){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=e=Reflect.get:t.exports=e=function(t,e,n){var r=se(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}},e(n,r,o||n)}t.exports=e})),ue=function(){function t(e){i(this,t),this.id=0,this.art=e,this.add=this.add.bind(this)}return c(t,[{key:"add",value:function(t,e){var n=this,r="function"==typeof t?t(this.art):t;if(this.$parent&&this.name&&!r.disable){this.id+=1;var o=r.name||"".concat(this.name).concat(this.id);$t(!Vt(this,o),"Cannot add an existing name [".concat(o,"] to the [").concat(this.name,"]"));var i=document.createElement("div");i.classList.value="art-".concat(this.name," art-").concat(this.name,"-").concat(o),r.html&&wt(i,r.html),r.style&&Ot(i,r.style),r.tooltip&&St(i,r.tooltip);var a=Array.from(this.$parent.children);i.dataset.index=r.index||this.id;var c=a.find((function(t){return Number(t.dataset.index)>=Number(i.dataset.index)}));c?c.insertAdjacentElement("beforebegin",i):wt(this.$parent,i),r.click&&this.art.events.proxy(i,"click",(function(t){t.preventDefault(),r.click.call(n.art,n,t)})),r.mounted&&r.mounted(i,this,this.art),e&&e(i,this,this.art),this.art.emit("".concat(this.name,":add"),r),It(this,o,{get:function(){return r}})}}},{key:"show",get:function(){return gt(this.art.template.$player,"art-".concat(this.name,"-show"))},set:function(t){var e=this.art.template.$player,n="art-".concat(this.name,"-show");t?vt(e,n):mt(e,n),this.art.emit("".concat(this.name,":toggle"),t)}},{key:"toggle",set:function(t){t&&(this.show=!this.show)}}]),t}();function pe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function fe(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pe(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pe(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{tooltip:e.i18n.get("Fullscreen"),mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.i18n,i=e.player;wt(t,r.fullscreen),n(t,"click",(function(){i.fullscreenToggle=!0})),e.on("fullscreenChange",(function(e){St(t,o.get(e?"Exit fullscreen":"Fullscreen"))}))}})}}function de(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function he(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?de(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):de(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{tooltip:e.i18n.get("Web fullscreen"),mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.i18n,i=e.player;wt(t,r.fullscreenWeb),n(t,"click",(function(){i.fullscreenWebToggle=!0})),e.on("fullscreenWebChange",(function(e){St(t,o.get(e?"Exit web fullscreen":"Web fullscreen"))}))}})}}function ye(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function be(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ye(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ye(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{tooltip:e.i18n.get("Mini player"),mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.i18n,i=e.player;wt(t,r.pip),n(t,"click",(function(){i.pipToggle=!0})),e.on("pipChange",(function(e){St(t,o.get(e?"Exit mini player":"Mini player"))}))}})}}function ve(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function me(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ve(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.i18n,i=e.player,a=wt(t,r.play),c=wt(t,r.pause);function s(){xt(a,"display","flex"),xt(c,"display","none")}function l(){xt(a,"display","none"),xt(c,"display","flex")}St(a,o.get("Play")),St(c,o.get("Pause")),n(a,"click",(function(){i.play=!0})),n(c,"click",(function(){i.pause=!0})),i.playing?l():s(),e.on("video:playing",(function(){l()})),e.on("video:pause",(function(){s()}))}})}}function ge(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function we(t,e){var n=t.template.$progress,r=t.player,o=n.getBoundingClientRect().left,i=Jt(e.pageX-o,0,n.clientWidth),a=i/n.clientWidth*r.duration;return{second:a,time:Xt(a),width:i,percentage:Jt(i/n.clientWidth,0,1)}}function xe(t){return function(e){var r=e.option,o=r.highlight,i=r.theme,a=e.events.proxy,c=e.player;return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ge(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ge(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{html:'<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></div>'),mounted:function(t){var n=!1,r=yt(".art-progress-loaded",t),i=yt(".art-progress-played",t),s=yt(".art-progress-highlight",t),l=yt(".art-progress-indicator",t),u=yt(".art-progress-tip",t);function p(t,e){"loaded"===t&&xt(r,"width","".concat(100*e,"%")),"played"===t&&(xt(i,"width","".concat(100*e,"%")),xt(l,"left","calc(".concat(100*e,"% - ").concat(kt(l,"width")/2,"px)")))}o.forEach((function(t){var e=Jt(t.time,0,c.duration)/c.duration*100;wt(s,'<span data-text="'.concat(t.text,'" data-time="').concat(t.time,'" style="left: ').concat(e,'%"></span>'))})),p("loaded",c.loaded),e.on("video:progress",(function(){p("loaded",c.loaded)})),e.on("video:timeupdate",(function(){p("played",c.played)})),e.on("video:ended",(function(){p("played",1)})),a(t,"mousemove",(function(n){xt(u,"display","block"),n.composedPath().indexOf(s)>-1?function(n){var r=we(e,n).width,o=n.target.dataset.text;u.innerHTML=o;var i=u.clientWidth;r<=i/2?xt(u,"left",0):r>t.clientWidth-i/2?xt(u,"left","".concat(t.clientWidth-i,"px")):xt(u,"left","".concat(r-i/2,"px"))}(n):function(n){var r=we(e,n),o=r.width,i=r.time;u.innerHTML=i;var a=u.clientWidth;o<=a/2?xt(u,"left",0):o>t.clientWidth-a/2?xt(u,"left","".concat(t.clientWidth-a,"px")):xt(u,"left","".concat(o-a/2,"px"))}(n)})),a(t,"mouseout",(function(){xt(u,"display","none")})),a(t,"click",(function(t){if(t.target!==l){var n=we(e,t),r=n.second;p("played",n.percentage),c.seek=r}})),a(l,"mousedown",(function(){n=!0})),a(document,"mousemove",(function(t){if(n){var r=we(e,t),o=r.second,i=r.percentage;vt(l,"art-show-indicator"),p("played",i),c.seek=o}})),a(document,"mouseup",(function(){n&&(n=!1,mt(l,"art-show-indicator"))}))}})}}function Oe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ke(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Oe(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{tooltip:e.i18n.get("Hide subtitle"),mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.i18n,i=e.subtitle;wt(t,r.subtitle),n(t,"click",(function(){i.toggle=!0})),e.on("subtitle:toggle",(function(e){St(t,o.get(e?"Hide subtitle":"Show subtitle"))}))}})}}function je(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Pe(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?je(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{mounted:function(t){function n(){var n="".concat(Xt(e.player.currentTime)," / ").concat(Xt(e.player.duration));n!==t.innerText&&(t.innerText=n)}n(),["video:loadedmetadata","video:timeupdate","video:progress"].forEach((function(t){e.on(t,n)}))}})}}function Se(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ee(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Se(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Se(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.player,i=e.i18n,a=!1,c=wt(t,r.volume),s=wt(t,r.volumeClose),l=wt(t,'<div class="art-volume-panel"></div>'),u=wt(l,'<div class="art-volume-slider-handle"></div>');function p(t){var e=l.getBoundingClientRect().left;return Jt(t.pageX-e-6,0,54)/48}function f(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.7;if(o.muted||0===t)xt(c,"display","none"),xt(s,"display","flex"),xt(u,"left","0");else{var e=48*t;xt(c,"display","flex"),xt(s,"display","none"),xt(u,"left","".concat(e,"px"))}}St(c,i.get("Mute")),xt(s,"display","none"),f(o.volume),e.on("video:volumechange",(function(){f(o.volume)})),n(c,"click",(function(){o.muted=!0})),n(s,"click",(function(){o.muted=!1})),n(l,"click",(function(t){o.muted=!1,o.volume=p(t)})),n(u,"mousedown",(function(){a=!0})),n(t,"mousemove",(function(t){a&&(o.muted=!1,o.volume=p(t))})),n(document,"mouseup",(function(){a&&(a=!1)}))}})}}function Ce(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Re(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ce(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ce(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{tooltip:e.i18n.get("Show setting"),mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.i18n,i=e.setting;wt(t,r.setting),n(t,"click",(function(){i.toggle=!0})),e.on("setting:toggle",(function(e){St(t,o.get(e?"Hide setting":"Show setting"))}))}})}}function $e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function De(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$e(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{mounted:function(t){var n=e.option.thumbnails,r=e.template.$progress,o=e.events,i=o.proxy,a=o.loadImg,c=!1,s=!1;i(r,"mousemove",(function(o){c||(c=!0,a(n.url).then((function(){s=!0}))),s&&(xt(t,"display","block"),function(o){var i=we(e,o).width,a=n.url,c=n.height,s=n.width,l=n.number,u=n.column,p=r.clientWidth/l,f=Math.floor(i/p),d=Math.ceil(f/u)-1,h=f%u||u-1;xt(t,"backgroundImage","url(".concat(a,")")),xt(t,"height","".concat(c,"px")),xt(t,"width","".concat(s,"px")),xt(t,"backgroundPosition","-".concat(h*s,"px -").concat(d*c,"px")),i<=s/2?xt(t,"left",0):i>r.clientWidth-s/2?xt(t,"left","".concat(r.clientWidth-s,"px")):xt(t,"left","".concat(i-s/2,"px"))}(o))})),i(r,"mouseout",(function(){xt(t,"display","none")}))}})}}function Te(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ae(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Te(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Te(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{tooltip:e.i18n.get("Screenshot"),mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.player;wt(t,r.screenshot),n(t,"click",(function(){o.screenshot()}))}})}}function _e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ze(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_e(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{mounted:function(t){var n=e.option.quality,r=e.events,o=r.proxy,i=r.hover,a=e.player,c=-1,s=n.find((function(t){return t.default}))||n[0];c=n.indexOf(s);var l=wt(t,'<div class="art-quality-name">'.concat(s.name,"</div>")),u=n.map((function(t,e){return'<div class="art-quality-item" data-index="'.concat(e,'">').concat(t.name,"</div>")})).join(""),p=wt(t,'<div class="art-qualitys">'.concat(u,"</div>"));i(t,(function(){p.style.left="-".concat(kt(p,"width")/2-t.clientWidth/2,"px")})),o(p,"click",(function(t){var e=Number(t.target.dataset.index),r=n[e],o=r.url,i=r.name;o&&i&&c!==e&&(a.switchQuality(o,i),l.innerText=i,c=e)}))}})}}var Le=function(t){function e(t){var n;i(this,e),(n=l(this,u(e).call(this,t))).name="control";var r=t.option;return t.on("ready",(function(){n.add(xe({name:"progress",disable:r.isLive,position:"top",index:10})),n.add(De({name:"thumbnails",disable:!r.thumbnails.url||r.isLive,position:"top",index:20})),n.add(me({name:"playAndPause",disable:!1,position:"left",index:10})),n.add(Ee({name:"volume",disable:!1,position:"left",index:20})),n.add(Pe({name:"time",disable:r.isLive,position:"left",index:30})),n.add(ze({name:"quality",disable:0===r.quality.length,position:"right",index:10})),n.add(Ae({name:"screenshot",disable:!r.screenshot,position:"right",index:20})),n.add(ke({name:"subtitle",disable:!r.subtitle.url,position:"right",index:30})),n.add(Re({name:"setting",disable:!r.setting,position:"right",index:40})),n.add(be({name:"pip",disable:!r.pip,position:"right",index:50})),n.add(he({name:"fullscreenWeb",disable:!r.fullscreenWeb,position:"right",index:60})),n.add(fe({name:"fullscreen",disable:!r.fullscreen,position:"right",index:70})),r.controls.forEach((function(t){n.add(t)}))})),n}return f(e,t),c(e,[{key:"add",value:function(t,n){var r=this,o="function"==typeof t?t(this.art):t;$t(["top","left","right"].includes(o.position),"Control option.position must one of 'top', 'left', 'right'");var i=this.art.template,a=i.$progress,c=i.$controlsLeft,s=i.$controlsRight;switch(o.position){case"top":this.$parent=a;break;case"left":this.$parent=c;break;case"right":this.$parent=s}le(u(e.prototype),"add",this).call(this,o,(function(t){o.disable||"top"===o.position||t.firstElementChild&&"I"===t.firstElementChild.tagName||vt(t,"art-control-onlyText"),n&&n(t,r,r.art)}))}}]),e}(ue);function qe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Me(t){return function(e){var r=e.i18n,o=e.player;return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?qe(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{html:"".concat(r.get("Play speed"),':<span data-rate="0.5">0.5</span><span data-rate="0.75">0.75</span><span data-rate="1.0" class="art-current">').concat(r.get("Normal"),'</span><span data-rate="1.25">1.25</span><span data-rate="1.5">1.5</span><span data-rate="2.0">2.0</span>'),click:function(t,e){var n=e.target.dataset.rate;n&&(o.playbackRate=Number(n),t.show=!1)},mounted:function(t){e.on("playbackRateChange",(function(e){var n=bt("span",t).find((function(t){return Number(t.dataset.rate)===e}));n&&Pt(n,"art-current")}))}})}}function Fe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ie(t){return function(e){var r=e.i18n,o=e.player;return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Fe(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{html:"".concat(r.get("Aspect ratio"),':<span data-ratio="default" class="art-current">').concat(r.get("Default"),'</span><span data-ratio="4:3">4:3</span><span data-ratio="16:9">16:9</span>'),click:function(t,e){var n=e.target.dataset.ratio;n&&(o.aspectRatio=n,t.show=!1)},mounted:function(t){e.on("aspectRatioChange",(function(e){var n=bt("span",t).find((function(t){return t.dataset.ratio===e}));n&&Pt(n,"art-current")}))}})}}function Ne(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ve(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ne(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ne(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{html:e.i18n.get("Video info"),click:function(t){e.info.show=!0,t.show=!1}})}}function We(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Be(t){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?We(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):We(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{html:'<a href="https://artplayer.org" target="_blank">ArtPlayer 3.4.2</a>'})}function Ue(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function He(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ue(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ue(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{html:e.i18n.get("Close"),click:function(t){t.show=!1}})}}var Ye=function(t){function e(t){var n;i(this,e),(n=l(this,u(e).call(this,t))).name="contextmenu";var r=t.option,o=t.template,a=o.$player,c=o.$contextmenu,s=t.events.proxy;return n.$parent=c,t.on("ready",(function(){n.add(Me({disable:!r.playbackRate,name:"playbackRate",index:10})),n.add(Ie({disable:!r.aspectRatio,name:"aspectRatio",index:20})),n.add(Ve({disable:!1,name:"info",index:30})),n.add(Be({disable:!1,name:"version",index:40})),n.add(He({disable:!1,name:"close",index:50})),r.contextmenu.forEach((function(t){n.add(t)})),s(a,"contextmenu",(function(t){t.preventDefault(),n.show=!0;var e=t.clientX,r=t.clientY,o=a.getBoundingClientRect(),i=o.height,s=o.width,l=o.left,u=o.top,p=c.getBoundingClientRect(),f=p.height,d=p.width,h=e-l,y=r-u;e+d>l+s&&(h=s-d),r+f>u+i&&(y=i-f),Ot(c,{top:"".concat(y,"px"),left:"".concat(h,"px")})})),s(a,"click",(function(t){t.composedPath().includes(c)||(n.show=!1)})),t.on("blur",(function(){n.show=!1}))})),n}return f(e,t),e}(ue),Je=function(t){function e(t){var n;i(this,e),(n=l(this,u(e).call(this,t))).name="info";var r=t.template,o=r.$infoPanel,a=r.$infoClose,c=r.$video;(0,t.events.proxy)(a,"click",(function(){n.show=!1}));var s=null,p=bt("[data-video]",o);return t.on("destroy",(function(){clearTimeout(s)})),t.on("info:toggle",(function(t){clearTimeout(s),t&&function t(){p.forEach((function(t){var e=c[t.dataset.video];t.innerText="number"==typeof e?e.toFixed(2):e})),s=setTimeout((function(){t()}),1e3)}()})),n}return f(e,t),e}(ue),Xe=function(t){function e(t){var n;i(this,e),(n=l(this,u(e).call(this,t))).name="subtitle";var r=t.events.proxy,o=t.option.subtitle;return Ot(t.template.$subtitle,o.style),r(n.textTrack,"cuechange",n.update.bind(s(n))),o.url&&n.init(o.url),n}return f(e,t),c(e,[{key:"update",value:function(){var t=this.art.template.$subtitle;t.innerHTML="",this.activeCue&&(t.innerHTML=this.activeCue.text.split(/\r?\n/).map((function(t){return"<p>".concat(t,"</p>")})).join(""),this.art.emit("subtitle:update",this.activeCue.text))}},{key:"switch",value:function(t,e,n){var r=this,o=this.art,i=o.i18n,a=o.notice;return this.init(t,n).then((function(t){return e&&(a.show="".concat(i.get("Switch subtitle"),": ").concat(e)),r.art.emit("subtitle:switch",t),t}))}},{key:"init",value:function(t,e){var n=this,r=this.art,o=r.notice,i=r.template,a=i.$subtitle,c=i.$track;return fetch(t).then((function(t){return t.text()})).then((function(r){switch(n.art.emit("subtitle:load",t),e||_t(t)){case"srt":return Tt(Dt(r));case"ass":return Tt(At(r));case"vtt":return Tt(r);default:return t}})).then((function(t){return a.innerHTML="",n.url===t||(URL.revokeObjectURL(n.url),c.src=t),t})).catch((function(t){throw o.show=t,n.art.emit("subtitle:err",t),t}))}},{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]}}]),e}(ue);var Ze=function(){function t(e){var n=this;i(this,t),this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),e.whitelist.state&&e.on("ready",(function(){!function(t,e){var n=t.template.$player;e.proxy(document,["click","contextmenu"],(function(e){e.composedPath().indexOf(n)>-1?(t.isFocus=!0,t.emit("focus")):(t.isFocus=!1,t.emit("blur"))}))}(e,n),function(t,e){var n=t.template.$player;e.hover(n,(function(){vt(n,"art-hover"),t.emit("hoverenter")}),(function(){mt(n,"art-hover"),t.emit("hoverleave")}))}(e,n),function(t,e){var n=t.template,r=n.$player,o=n.$video,i=t.player,a=t.controls,c=Ht((function(){vt(r,"art-hide-cursor"),mt(r,"art-hover"),a.show=!1}),3e3);t.on("hoverleave",(function(){i.playing&&c()})),e.proxy(r,"mousemove",(function(e){c.clearTimeout(),mt(r,"art-hide-cursor"),a.show=!0,!i.pip&&i.playing&&e.target===o&&c(),t.emit("mousemove")}))}(e,n),function(t,e){var n=t.option,r=t.player,o=t.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,s=Yt((function(){r.width===a&&r.height===c||(a=r.width,c=r.height,n.autoSize&&(r.fullscreen||r.fullscreenWeb||r.pip?r.autoSize=!1:r.autoSize=!0),r.aspectRatioReset=!0,t.emit("resize",{width:r.width,height:r.height}))}),500);e.proxy(i,"load",(function(){e.proxy(i.contentDocument.defaultView,"resize",s)})),o.appendChild(i)}(e,n)}))}return c(t,[{key:"proxy",value:function(t,e,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(Array.isArray(e))return e.map((function(e){return r.proxy(t,e,n,o)}));t.addEventListener(e,n,o);var i=function(){return t.removeEventListener(e,n,o)};return this.destroyEvents.push(i),i}},{key:"hover",value:function(t,e,n){e&&this.proxy(t,"mouseenter",e),n&&this.proxy(t,"mouseleave",n)}},{key:"loadImg",value:function(t){var e=this;return new Promise((function(n,r){var o;if(t instanceof HTMLImageElement)o=t;else{if("string"!=typeof t)return r(t);(o=new Image).src=t}return o.complete?n(o):(e.proxy(o,"load",(function(){return n(o)})),e.proxy(o,"error",(function(){return r(o)})),t)}))}},{key:"destroy",value:function(){this.destroyEvents.forEach((function(t){return t()}))}}]),t}(),Qe=function(){function t(e){var n=this;i(this,t),this.keys={};var r=e.option,o=e.player,a=e.events.proxy;r.hotkey&&e.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(t){if(e.isFocus){var r=document.activeElement.tagName.toUpperCase(),o=document.activeElement.getAttribute("contenteditable");if("INPUT"!==r&&"TEXTAREA"!==r&&""!==o&&"true"!==o){var i=n.keys[t.keyCode];i&&(t.preventDefault(),i.forEach((function(t){return t()})),e.emit("hotkey",t))}}}))}))}return c(t,[{key:"add",value:function(t,e){this.keys[t]?this.keys[t].push(e):this.keys[t]=[e]}}]),t}(),Ge=function(t){function e(t){var n;return i(this,e),(n=l(this,u(e).call(this,t))).name="layer",n.$parent=t.template.$layer,t.on("ready",(function(){t.option.layers.forEach((function(t){n.add(t)}))})),n}return f(e,t),e}(ue),Ke=function(t){function e(t){var n;return i(this,e),(n=l(this,u(e).call(this,t))).name="loading",wt(t.template.$loading,t.icons.loading),n}return f(e,t),e}(ue),tn=function(){function t(e){i(this,t),this.art=e,this.time=2e3,this.timer=null}return c(t,[{key:"show",set:function(t){var e=this.art.template,n=e.$player,r=e.$noticeInner;r.innerText=t instanceof Error?t.message.trim():t,vt(n,"art-notice-show"),clearTimeout(this.timer),this.timer=setTimeout((function(){r.innerText="",mt(n,"art-notice-show")}),this.time)}}]),t}(),en=function(t){function e(t){var n;return i(this,e),(n=l(this,u(e).call(this,t))).name="mask",wt(t.template.$state,t.icons.state),n}return f(e,t),e}(ue);function nn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var rn=function t(e){var r=this;i(this,t);var o=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?nn(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({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></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"/></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></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></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></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></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"/></svg>',screenshot:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 50 50">\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 "/></svg>',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></svg>',fullscreen:'<svg xmlns="http://www.w3.org/2000/svg" height="36" width="36" viewBox="0 0 36 36">\t<path d="m 10,16 2,0 0,-4 4,0 0,-2 L 10,10 l 0,6 0,0 z"></path>\t<path d="m 20,10 0,2 4,0 0,4 2,0 L 26,10 l -6,0 0,0 z"></path>\t<path d="m 24,24 -4,0 0,2 L 26,26 l 0,-6 -2,0 0,4 0,0 z"></path>\t<path d="M 12,20 10,20 10,26 l 6,0 0,-2 -4,0 0,-4 0,0 z"></path></svg>',fullscreenWeb:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" height="36" width="36">\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></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></svg>'},e.option.icons);Object.keys(o).forEach((function(t){var e=document.createElement("i");e.classList.add("art-icon"),e.classList.add("art-icon-".concat(t)),wt(e,o[t]),r[t]=e}))};function on(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function an(t){return function(e){var r=e.i18n,o=e.player;return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?on(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):on(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{html:'<div class="art-setting-header">'.concat(r.get("Flip"),'</div><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></div>"),click:function(t,e){var n=e.target.dataset.value;n&&(o.flip=n)},mounted:function(t){e.on("flipChange",(function(e){var n=bt("button",t).find((function(t){return t.dataset.value===e}));n&&Pt(n.parentElement,"current")}))}})}}function cn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function sn(t){return function(e){var r=e.i18n,o=e.player;return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?cn(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{html:'<div class="art-setting-header">'.concat(r.get("Aspect ratio"),'</div><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></div>'),click:function(t,e){var n=e.target.dataset.value;n&&(o.aspectRatio=n)},mounted:function(t){e.on("aspectRatioChange",(function(e){var n=bt("button",t).find((function(t){return t.dataset.value===e}));n&&Pt(n.parentElement,"current")}))}})}}function ln(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function un(t){return function(e){var r=e.i18n,o=e.player,i=e.events.proxy;return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ln(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ln(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{html:'<div class="art-setting-header">'.concat(r.get("Play speed"),': <span class="art-subtitle-value">1.0</span>x</div><div class="art-setting-range"><input class="art-subtitle-range" value="1" type="range" min="0.5" max="2" step="0.25"></div>'),mounted:function(t){var n=yt(".art-setting-range input",t),r=yt(".art-subtitle-value",t);i(n,"change",(function(){var t=n.value;r.innerText=t,o.playbackRate=Number(t)})),e.on("playbackRateChange",(function(t){n.value!==t&&(n.value=t,r.innerText=t)}))}})}}var pn=function(t){function e(t){var n;i(this,e),(n=l(this,u(e).call(this,t))).name="setting";var r=t.option,o=t.template,a=o.$setting,c=o.$settingBody,s=t.events.proxy;return n.$parent=c,r.setting&&(t.on("ready",(function(){s(a,"click",(function(t){t.target===a&&(n.show=!1)})),n.add(an({disable:!r.flip,name:"flip"})),n.add(sn({disable:!r.aspectRatio,name:"aspectRatio"})),n.add(un({disable:!r.playbackRate,name:"playbackRate"}))})),t.on("blur",(function(){n.show=!1}))),n}return f(e,t),e}(ue),fn=function(){function t(){i(this,t),this.name="artplayer_settings"}return c(t,[{key:"get",value:function(t){var e=JSON.parse(localStorage.getItem(this.name))||{};return t?e[t]:{}}},{key:"set",value:function(t,e){var r=Object.assign({},this.get(),n({},t,e));localStorage.setItem(this.name,JSON.stringify(r))}},{key:"del",value:function(t){var e=this.get();delete e[t],localStorage.setItem(this.name,JSON.stringify(e))}},{key:"clean",value:function(){localStorage.removeItem(this.name)}}]),t}();function dn(t){var e=t.i18n,n=t.subtitle,r=t.events.proxy;return{title:"Subtitle",name:"subtitleOffset",index:20,html:'<div class="art-setting-header">'.concat(e.get("Subtitle offset time"),': <span class="art-subtitle-value">0</span>s</div><div class="art-setting-range"><input class="art-subtitle-range" value="0" type="range" min="-5" max="5" step="0.5"></div>'),mounted:function(e){var o=yt(".art-setting-range input",e),i=yt(".art-subtitle-value",e);r(o,"change",(function(){var e=o.value;i.innerText=e,t.plugins.subtitleOffset.offset(Number(e))})),t.on("subtitle:switch",(function(){o.value=0,i.innerText=0})),t.on("subtitleOffset",(function(t){n.update(),o.value!==t&&(o.value=t,i.innerText=t)}))}}}function hn(t){var e=t.constructor.utils.clamp,n=t.setting,r=t.notice,o=t.template,i=t.i18n,a=t.player;n.add(dn);var c=[];return t.on("subtitle:switch",(function(){c=[]})),{name:"subtitleOffset",offset:function(n){if(o.$track&&o.$track.track){var s=Array.from(o.$track.track.cues),l=e(n,-5,5);s.forEach((function(t,n){c[n]||(c[n]={startTime:t.startTime,endTime:t.endTime}),t.startTime=e(c[n].startTime+l,0,a.duration),t.endTime=e(c[n].endTime+l,0,a.duration)})),r.show="".concat(i.get("Subtitle offset time"),": ").concat(n,"s"),t.emit("subtitleOffset",n)}else r.show="".concat(i.get("No subtitles found")),t.emit("subtitleOffset",0)}}}function yn(t){var e=t.events.proxy,n=t.template,r=t.player,o=t.option,i=t.setting,a=t.i18n;function c(e){if(e){var i=n.$video.canPlayType(e.type);if("maybe"===i||"probably"===i){var a=URL.createObjectURL(e);o.title=e.name,r.switchUrl(a,e.name),t.emit("localVideo",e)}else $t(!1,"Playback of this file format is not supported")}}function s(t){var n=wt(t,'<input type="file">');xt(t,"position","relative"),Ot(n,{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",opacity:"0"}),e(n,"change",(function(){c(n.files[0])}))}return e(n.$player,"dragover",(function(t){t.preventDefault()})),e(n.$player,"drop",(function(t){t.preventDefault(),c(t.dataTransfer.files[0])})),t.on("ready",(function(){i.add({title:"Local Video",name:"localVideo",index:30,html:'<div class="art-setting-header">'.concat(a.get("Local Video"),'</div><div class="art-setting-upload"><div class="art-upload-btn">').concat(a.get("Open"),'</div><div class="art-upload-value"></div></div>'),mounted:function(e){var n=yt(".art-upload-btn",e),r=yt(".art-upload-value",e);t.on("localVideo",(function(t){r.textContent=t.name,r.title=t.name})),s(n)}})})),{name:"localVideo",attach:s}}function bn(t){var e=t.events.proxy,n=t.subtitle,r=t.setting,o=t.i18n;function i(r){var o=wt(r,'<input type="file">');xt(r,"position","relative"),Ot(o,{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",opacity:"0"}),e(o,"change",(function(){!function(e){if(e){var r=_t(e.name);if(["ass","vtt","srt"].includes(r)){var o=URL.createObjectURL(e);n.switch(o,e.name,r),t.emit("localSubtitle",e)}else $t(!1,"Only supports subtitle files in .ass, .vtt and .srt format")}}(o.files[0])}))}return t.on("ready",(function(){r.add({title:"Local Subtitle",name:"localSubtitle",index:40,html:'<div class="art-setting-header">'.concat(o.get("Local Subtitle"),'</div><div class="art-setting-upload"><div class="art-upload-btn">').concat(o.get("Open"),'</div><div class="art-upload-value"></div></div>'),mounted:function(e){var n=yt(".art-upload-btn",e),r=yt(".art-upload-value",e);t.on("localSubtitle",(function(t){r.textContent=t.name,r.title=t.name})),i(n)}})})),{name:"localSubtitle",attach:i}}function vn(t){var e=t.layers,n=t.player,r=t.option.theme;return e.add({name:"miniProgressBar",style:{display:"none",position:"absolute",left:0,right:0,bottom:0,height:"2px",background:r},mounted:function(e){t.on("control:toggle",(function(t){e.style.display=t?"none":"block"})),t.on("destroy",(function(){e.style.display="none"})),t.on("video:timeupdate",(function(){e.style.width="".concat(100*n.played,"%")}))}}),{name:"miniProgressBar"}}function mn(t){var e=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(){t.isDestroy||(i=requestAnimationFrame((function(){var i=Date.now();if(o){var c=i-o;r+=c,t.player.playing||(n+=c)}o=i,t.emit("networkMonitor",n/r),r>=e&&(n=0,r=0),a()})))}()}return t.on("play",c),t.on("pause",a),{name:"networkMonitor",reset:a,start:c,sample:function(t){e=t}}}var gn=function(){function t(e){var n=this;i(this,t),this.art=e,this.id=0;var r=e.option;r.subtitle.url&&r.subtitleOffset&&this.add(hn),!r.isLive&&r.miniProgressBar&&this.add(vn),r.localVideo&&this.add(yn),r.localSubtitle&&this.add(bn),r.networkMonitor&&this.add(mn),e.option.plugins.forEach((function(t){n.add(t)}))}return c(t,[{key:"add",value:function(t){this.id+=1;var e=t.call(this,this.art),n="";return $t(!Vt(this,n=e&&e.name?e.name:t.name?t.name:"plugin".concat(this.id)),"Cannot add a plugin that already has the same name: ".concat(n)),Object.defineProperty(this,n,{value:e}),this.art.emit("plugin:add",t),this}}]),t}(),wn=function t(e){i(this,t);var n=e.option,r=e.events.proxy,o=e.template.$video;Kt.events.forEach((function(t){r(o,t,(function(t){e.emit("video:".concat(t.type),t)}))})),Object.keys(n.moreVideoAttr).forEach((function(t){o[t]=n.moreVideoAttr[t]})),n.muted&&(o.muted=n.muted),n.volume&&(o.volume=Jt(n.volume,0,1)),n.poster&&(o.poster=n.poster),n.autoplay&&(o.autoplay=n.autoplay),o.controls=!0;var a=n.type||_t(n.url),c=n.customType[a];a&&c?(c(o,n.url,e),e.emit("customType",a)):(o.src=n.url,e.emit("urlChange",o.src))},xn=0,On=function(t){function e(t){var n;return i(this,e),(n=l(this,u(e).call(this))).option=dt(Bt(e.option,t),Gt),n.isFocus=!1,n.isDestroy=!1,n.whitelist=new te(s(n)),n.template=new ee(s(n)),n.events=new Ze(s(n)),n.whitelist.state?(n.storage=new fn(s(n)),n.icons=new rn(s(n)),n.i18n=new oe(s(n)),n.notice=new tn(s(n)),n.player=new ce(s(n)),n.layers=new Ge(s(n)),n.controls=new Le(s(n)),n.contextmenu=new Ye(s(n)),n.subtitle=new Xe(s(n)),n.info=new Je(s(n)),n.loading=new Ke(s(n)),n.hotkey=new Qe(s(n)),n.mask=new en(s(n)),n.setting=new pn(s(n)),n.plugins=new gn(s(n))):n.mobile=new wn(s(n)),xn+=1,n.id=xn,e.instances.push(s(n)),n}return f(e,t),c(e,[{key:"destroy",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.events.destroy(),this.template.destroy(t),e.instances.splice(e.instances.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}],[{key:"version",get:function(){return"3.4.2"}},{key:"env",get:function(){return'"production"'}},{key:"config",get:function(){return Kt}},{key:"utils",get:function(){return Zt}},{key:"scheme",get:function(){return Gt}},{key:"Emitter",get:function(){return ht}},{key:"validator",get:function(){return dt}},{key:"kindOf",get:function(){return dt.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,backdrop:!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()}}}]),e}(ht);function kn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function jn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?kn(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}return Object.defineProperty(On,"instances",{value:[]}),console.log("%c ArtPlayer %c 3.4.2 %c https://artplayer.org","color: #fff; background: #5f5f5f","color: #fff; background: #4bc729",""),function(t){function n(t){var e;return i(this,n),e=l(this,u(n).call(this,t)),On.utils.errorHandle(t.option&&"object"===o(t.option),"The prop 'option' object cannot be missing"),e.instance=null,e.artRef=pt.createRef(),e}return f(n,t),c(n,[{key:"componentDidMount",value:function(){var t=this.props,e=t.option,n=t.getInstance;this.instance=new On(jn({},e,{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 t=this.props,n=(t.option,t.getInstance,e(t,["option","getInstance"]));return pt.createElement("div",jn({ref:this.artRef},n))}}]),n}(pt.Component)}));
|