twist-aplayer 1.4.8 → 1.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +21 -13
- package/dist/index.min.css +1 -1
- package/dist/index.mjs +1483 -1064
- package/dist/twist-aplayer.umd.js +21 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -106,6 +106,11 @@ export interface TwistAPlayerProps {
|
|
|
106
106
|
* @default false
|
|
107
107
|
*/
|
|
108
108
|
mini?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* @description enable super mini mode for mobile devices, only shows miniswitcher initially
|
|
111
|
+
* @default false
|
|
112
|
+
*/
|
|
113
|
+
superMini?: boolean;
|
|
109
114
|
/**
|
|
110
115
|
* @default prevent to play multiple player at the same time, pause other players when this player start play
|
|
111
116
|
* @default true
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JSX } from 'react/jsx-runtime';
|
|
1
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
3
|
export declare interface ArtistInfo {
|
|
4
4
|
name?: string;
|
|
@@ -40,7 +40,7 @@ declare type PlaylistLoop = 'all' | 'one' | 'none';
|
|
|
40
40
|
*/
|
|
41
41
|
declare type PlaylistOrder = 'list' | 'random';
|
|
42
42
|
|
|
43
|
-
export declare function TwistAPlayer(props: TwistAPlayerProps):
|
|
43
|
+
export declare function TwistAPlayer(props: TwistAPlayerProps): JSX_2.Element;
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* @see https://aplayer.js.org/#/home?id=options
|
|
@@ -90,6 +90,11 @@ export declare interface TwistAPlayerProps {
|
|
|
90
90
|
* @default prevent to play multiple player at the same time, pause other players when this player start play
|
|
91
91
|
* @default true
|
|
92
92
|
*/
|
|
93
|
+
/**
|
|
94
|
+
* @description enable super mini mode for mobile devices, only shows miniswitcher initially
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
superMini?: boolean;
|
|
93
98
|
mutex?: boolean;
|
|
94
99
|
/**
|
|
95
100
|
* @description indicate whether list should folded at first render
|
package/dist/index.js
CHANGED
|
@@ -1,29 +1,37 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react");function Br(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const fe=Br(f);var Te={exports:{}},ye={};/**
|
|
2
2
|
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
5
|
-
* Copyright (c)
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var tr;function zr(){if(tr)return ye;tr=1;var e=f,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function y(b,s,g){var m,c={},E=null,x=null;g!==void 0&&(E=""+g),s.key!==void 0&&(E=""+s.key),s.ref!==void 0&&(x=s.ref);for(m in s)a.call(s,m)&&!p.hasOwnProperty(m)&&(c[m]=s[m]);if(b&&b.defaultProps)for(m in s=b.defaultProps,s)c[m]===void 0&&(c[m]=s[m]);return{$$typeof:r,type:b,key:E,ref:x,props:c,_owner:i.current}}return ye.Fragment=n,ye.jsx=y,ye.jsxs=y,ye}var be={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
13
|
-
* Copyright (c)
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var nr;function Hr(){return nr||(nr=1,process.env.NODE_ENV!=="production"&&function(){var e=f,r=Symbol.for("react.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),b=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),_=Symbol.iterator,u="@@iterator";function l(t){if(t===null||typeof t!="object")return null;var o=_&&t[_]||t[u];return typeof o=="function"?o:null}var d=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(t){{for(var o=arguments.length,h=new Array(o>1?o-1:0),S=1;S<o;S++)h[S-1]=arguments[S];$("error",t,h)}}function $(t,o,h){{var S=d.ReactDebugCurrentFrame,O=S.getStackAddendum();O!==""&&(o+="%s",h=h.concat([O]));var R=h.map(function(T){return String(T)});R.unshift("Warning: "+o),Function.prototype.apply.call(console[t],console,R)}}var P=!1,G=!1,K=!1,F=!1,J=!1,re;re=Symbol.for("react.module.reference");function de(t){return!!(typeof t=="string"||typeof t=="function"||t===a||t===p||J||t===i||t===g||t===m||F||t===x||P||G||K||typeof t=="object"&&t!==null&&(t.$$typeof===E||t.$$typeof===c||t.$$typeof===y||t.$$typeof===b||t.$$typeof===s||t.$$typeof===re||t.getModuleId!==void 0))}function te(t,o,h){var S=t.displayName;if(S)return S;var O=o.displayName||o.name||"";return O!==""?h+"("+O+")":h}function ne(t){return t.displayName||"Context"}function D(t){if(t==null)return null;if(typeof t.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case a:return"Fragment";case n:return"Portal";case p:return"Profiler";case i:return"StrictMode";case g:return"Suspense";case m:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case b:var o=t;return ne(o)+".Consumer";case y:var h=t;return ne(h._context)+".Provider";case s:return te(t,t.render,"ForwardRef");case c:var S=t.displayName||null;return S!==null?S:D(t.type)||"Memo";case E:{var O=t,R=O._payload,T=O._init;try{return D(T(R))}catch{return null}}}return null}var I=Object.assign,z=0,M,X,ae,H,ve,xe,me;function Se(){}Se.__reactDisabledLog=!0;function Pe(){{if(z===0){M=console.log,X=console.info,ae=console.warn,H=console.error,ve=console.group,xe=console.groupCollapsed,me=console.groupEnd;var t={configurable:!0,enumerable:!0,value:Se,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}z++}}function Me(){{if(z--,z===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},t,{value:M}),info:I({},t,{value:X}),warn:I({},t,{value:ae}),error:I({},t,{value:H}),group:I({},t,{value:ve}),groupCollapsed:I({},t,{value:xe}),groupEnd:I({},t,{value:me})})}z<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var pe=d.ReactCurrentDispatcher,he;function Y(t,o,h){{if(he===void 0)try{throw Error()}catch(O){var S=O.stack.trim().match(/\n( *(at )?)/);he=S&&S[1]||""}return`
|
|
18
|
+
`+he+t}}var ie=!1,Q;{var B=typeof WeakMap=="function"?WeakMap:Map;Q=new B}function oe(t,o){if(!t||ie)return"";{var h=Q.get(t);if(h!==void 0)return h}var S;ie=!0;var O=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var R;R=pe.current,pe.current=null,Pe();try{if(o){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(q){S=q}Reflect.construct(t,[],T)}else{try{T.call()}catch(q){S=q}t.call(T.prototype)}}else{try{throw Error()}catch(q){S=q}t()}}catch(q){if(q&&S&&typeof q.stack=="string"){for(var w=q.stack.split(`
|
|
19
|
+
`),N=S.stack.split(`
|
|
20
|
+
`),L=w.length-1,k=N.length-1;L>=1&&k>=0&&w[L]!==N[k];)k--;for(;L>=1&&k>=0;L--,k--)if(w[L]!==N[k]){if(L!==1||k!==1)do if(L--,k--,k<0||w[L]!==N[k]){var V=`
|
|
21
|
+
`+w[L].replace(" at new "," at ");return t.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",t.displayName)),typeof t=="function"&&Q.set(t,V),V}while(L>=1&&k>=0);break}}}finally{ie=!1,pe.current=R,Me(),Error.prepareStackTrace=O}var le=t?t.displayName||t.name:"",Z=le?Y(le):"";return typeof t=="function"&&Q.set(t,Z),Z}function _e(t,o,h){return oe(t,!1)}function we(t){var o=t.prototype;return!!(o&&o.isReactComponent)}function ue(t,o,h){if(t==null)return"";if(typeof t=="function")return oe(t,we(t));if(typeof t=="string")return Y(t);switch(t){case g:return Y("Suspense");case m:return Y("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case s:return _e(t.render);case c:return ue(t.type,o,h);case E:{var S=t,O=S._payload,R=S._init;try{return ue(R(O),o,h)}catch{}}}return""}var W=Object.prototype.hasOwnProperty,Be={},ze=d.ReactDebugCurrentFrame;function je(t){if(t){var o=t._owner,h=ue(t.type,t._source,o?o.type:null);ze.setExtraStackFrame(h)}else ze.setExtraStackFrame(null)}function Er(t,o,h,S,O){{var R=Function.call.bind(W);for(var T in t)if(R(t,T)){var w=void 0;try{if(typeof t[T]!="function"){var N=Error((S||"React class")+": "+h+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw N.name="Invariant Violation",N}w=t[T](o,T,S,h,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(L){w=L}w&&!(w instanceof Error)&&(je(O),j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",S||"React class",h,T,typeof w),je(null)),w instanceof Error&&!(w.message in Be)&&(Be[w.message]=!0,je(O),j("Failed %s type: %s",h,w.message),je(null))}}}var xr=Array.isArray;function Le(t){return xr(t)}function Sr(t){{var o=typeof Symbol=="function"&&Symbol.toStringTag,h=o&&t[Symbol.toStringTag]||t.constructor.name||"Object";return h}}function _r(t){try{return He(t),!1}catch{return!0}}function He(t){return""+t}function We(t){if(_r(t))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Sr(t)),He(t)}var Ue=d.ReactCurrentOwner,wr={key:!0,ref:!0,__self:!0,__source:!0},Ye,Ge;function jr(t){if(W.call(t,"ref")){var o=Object.getOwnPropertyDescriptor(t,"ref").get;if(o&&o.isReactWarning)return!1}return t.ref!==void 0}function Tr(t){if(W.call(t,"key")){var o=Object.getOwnPropertyDescriptor(t,"key").get;if(o&&o.isReactWarning)return!1}return t.key!==void 0}function Or(t,o){typeof t.ref=="string"&&Ue.current}function Rr(t,o){{var h=function(){Ye||(Ye=!0,j("%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://reactjs.org/link/special-props)",o))};h.isReactWarning=!0,Object.defineProperty(t,"key",{get:h,configurable:!0})}}function Cr(t,o){{var h=function(){Ge||(Ge=!0,j("%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://reactjs.org/link/special-props)",o))};h.isReactWarning=!0,Object.defineProperty(t,"ref",{get:h,configurable:!0})}}var Pr=function(t,o,h,S,O,R,T){var w={$$typeof:r,type:t,key:o,ref:h,props:T,_owner:R};return w._store={},Object.defineProperty(w._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(w,"_self",{configurable:!1,enumerable:!1,writable:!1,value:S}),Object.defineProperty(w,"_source",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.freeze&&(Object.freeze(w.props),Object.freeze(w)),w};function Mr(t,o,h,S,O){{var R,T={},w=null,N=null;h!==void 0&&(We(h),w=""+h),Tr(o)&&(We(o.key),w=""+o.key),jr(o)&&(N=o.ref,Or(o,O));for(R in o)W.call(o,R)&&!wr.hasOwnProperty(R)&&(T[R]=o[R]);if(t&&t.defaultProps){var L=t.defaultProps;for(R in L)T[R]===void 0&&(T[R]=L[R])}if(w||N){var k=typeof t=="function"?t.displayName||t.name||"Unknown":t;w&&Rr(T,k),N&&Cr(T,k)}return Pr(t,w,N,O,S,Ue.current,T)}}var $e=d.ReactCurrentOwner,Ke=d.ReactDebugCurrentFrame;function se(t){if(t){var o=t._owner,h=ue(t.type,t._source,o?o.type:null);Ke.setExtraStackFrame(h)}else Ke.setExtraStackFrame(null)}var ke;ke=!1;function Ae(t){return typeof t=="object"&&t!==null&&t.$$typeof===r}function Je(){{if($e.current){var t=D($e.current.type);if(t)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+t+"`."}return""}}function Lr(t){return""}var Xe={};function $r(t){{var o=Je();if(!o){var h=typeof t=="string"?t:t.displayName||t.name;h&&(o=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+h+">.")}return o}}function Qe(t,o){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var h=$r(o);if(Xe[h])return;Xe[h]=!0;var S="";t&&t._owner&&t._owner!==$e.current&&(S=" It was passed a child from "+D(t._owner.type)+"."),se(t),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',h,S),se(null)}}function Ze(t,o){{if(typeof t!="object")return;if(Le(t))for(var h=0;h<t.length;h++){var S=t[h];Ae(S)&&Qe(S,o)}else if(Ae(t))t._store&&(t._store.validated=!0);else if(t){var O=l(t);if(typeof O=="function"&&O!==t.entries)for(var R=O.call(t),T;!(T=R.next()).done;)Ae(T.value)&&Qe(T.value,o)}}}function kr(t){{var o=t.type;if(o==null||typeof o=="string")return;var h;if(typeof o=="function")h=o.propTypes;else if(typeof o=="object"&&(o.$$typeof===s||o.$$typeof===c))h=o.propTypes;else return;if(h){var S=D(o);Er(h,t.props,"prop",S,t)}else if(o.PropTypes!==void 0&&!ke){ke=!0;var O=D(o);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",O||"Unknown")}typeof o.getDefaultProps=="function"&&!o.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ar(t){{for(var o=Object.keys(t.props),h=0;h<o.length;h++){var S=o[h];if(S!=="children"&&S!=="key"){se(t),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",S),se(null);break}}t.ref!==null&&(se(t),j("Invalid attribute `ref` supplied to `React.Fragment`."),se(null))}}var er={};function rr(t,o,h,S,O,R){{var T=de(t);if(!T){var w="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(w+=" 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 N=Lr();N?w+=N:w+=Je();var L;t===null?L="null":Le(t)?L="array":t!==void 0&&t.$$typeof===r?(L="<"+(D(t.type)||"Unknown")+" />",w=" Did you accidentally export a JSX literal instead of a component?"):L=typeof t,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",L,w)}var k=Mr(t,o,h,O,R);if(k==null)return k;if(T){var V=o.children;if(V!==void 0)if(S)if(Le(V)){for(var le=0;le<V.length;le++)Ze(V[le],t);Object.freeze&&Object.freeze(V)}else j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ze(V,t)}if(W.call(o,"key")){var Z=D(t),q=Object.keys(o).filter(function(Fr){return Fr!=="key"}),Ne=q.length>0?"{key: someKey, "+q.join(": ..., ")+": ...}":"{key: someKey}";if(!er[Z+Ne]){var Vr=q.length>0?"{"+q.join(": ..., ")+": ...}":"{}";j(`A props object containing a "key" prop is being spread into JSX:
|
|
18
26
|
let props = %s;
|
|
19
27
|
<%s {...props} />
|
|
20
28
|
React keys must be passed directly to JSX without using spread:
|
|
21
29
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,
|
|
23
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
24
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,f=!0,p=!1;return{s:function(){r=r.call(e)},n:function(){var y=r.next();return f=y.done,y},e:function(y){p=!0,s=y},f:function(){try{f||r.return==null||r.return()}finally{if(p)throw s}}}}function Oe(e,t){if(e){if(typeof e=="string")return ge(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ge(e,t):void 0}}function ge(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ae.apply(null,arguments)}function Ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function X(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ee(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function He(e,t,r){return(t=Fe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fe(e){var t=Ye(e,"string");return K(t)=="symbol"?t:t+""}function Ye(e,t){if(K(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(K(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ue(e,t){if(e==null)return{};var r,n,a=We(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function We(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}function Ge(e){var t=e.attrs,r=e.size,n=e.title,a=e.spin,s=e.rotate,f=e.color,p=Ue(e,qe),i=function(c){var v=r||c.size||"1em",E,g="",h="";return c.className&&(E=c.className),e.className&&(E=E?"".concat(E," ").concat(e.className):e.className),a&&(E?E+=" twist-icon-loading":E="twist-icon-loading"),s&&(g="rotate(".concat(s,"deg)"),h="rotate(".concat(s,"deg)")),H.createElement("svg",ae({xmlns:"http://www.w3.org/2000/svg"},c.attrs,t,p,{className:E,style:X(X({color:f||c.color,msTransform:g,transform:h},c.style),e.style),width:v,height:v}),n&&H.createElement("title",null,n),e.children)};return me!==void 0?H.createElement(me.Consumer,null,function(y){return i(y)}):i(_e)}function Je(e){var t={},r=e.split(";"),n=Be(r),a;try{for(n.s();!(a=n.n()).done;){var s=a.value,f=s.split(":"),p=Ie(f,2),i=p[0],y=p[1];if(i&&y){var c=i.trim().replace(/-./g,function(v){return v.charAt(1).toUpperCase()});t[c]=y.trim()}}}catch(v){n.e(v)}finally{n.f()}return t}function Re(e){return e&&e.map(function(t,r){return H.createElement(t.tag,X(X({},t.attrs),{},{key:r,style:t.attrs.style?Je(t.attrs.style):null}),Re(t.children))})}function L(e){return function(t){return H.createElement(Ge,ae({attrs:X({},e.attrs)},t),Re(e.children))}}function Ke(e){return L({attrs:{viewBox:"0 0 1024 1024"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M485.6 249.9L198.2 498c-8.3 7.1-8.3 20.8 0 27.9l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9m320 0L518.2 498a18.6 18.6 0 0 0-6.2 14c0 5.2 2.1 10.4 6.2 14l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9"}}]})(e)}function Xe(e){return L({attrs:{viewBox:"0 0 1024 1024"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M825.8 498L538.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L825.8 526c8.3-7.2 8.3-20.8 0-28m-320 0L218.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L505.8 526c4.1-3.6 6.2-8.8 6.2-14s-2.1-10.4-6.2-14"}}]})(e)}function Qe(e){return L({attrs:{viewBox:"0 0 1024 1024"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M512 1024c-69.1 0-136.2-13.5-199.3-40.2C251.7 958 197 921 150 874S66 772.3 40.2 711.3C13.5 648.2 0 581.1 0 512c0-19.9 16.1-36 36-36s36 16.1 36 36c0 59.4 11.6 117 34.6 171.3c22.2 52.4 53.9 99.5 94.3 139.9s87.5 72.2 139.9 94.3C395 940.4 452.6 952 512 952s117-11.6 171.3-34.6c52.4-22.2 99.5-53.9 139.9-94.3s72.2-87.5 94.3-139.9C940.4 629 952 571.4 952 512s-11.6-117-34.6-171.3a440.5 440.5 0 0 0-94.3-139.9a437.7 437.7 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.2C772.3 66 827 103 874 150s83.9 101.8 109.7 162.7c26.7 63.1 40.2 130.2 40.2 199.3s-13.5 136.2-40.2 199.3C958 772.3 921 827 874 874s-101.8 83.9-162.7 109.7c-63.1 26.8-130.2 40.3-199.3 40.3"}}]})(e)}function Ze(e){return L({attrs:{viewBox:"0 0 512 512"},children:[{tag:"path",attrs:{d:"M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z",fill:"currentColor"}}]})(e)}function et(e){return L({attrs:{viewBox:"0 0 512 512"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M208 432h-48a16 16 0 0 1-16-16V96a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v320a16 16 0 0 1-16 16m144 0h-48a16 16 0 0 1-16-16V96a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v320a16 16 0 0 1-16 16"}}]})(e)}function tt(e){return L({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"}}]})(e)}function rt(e){return L({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2 5.27L3.28 4L20 20.72L18.73 22l-3-3H7v3l-4-4l4-4v3h6.73L7 10.27V11H5V8.27zM17 13h2v4.18l-2-2zm0-8V2l4 4l-4 4V7H8.82l-2-2z"}}]})(e)}function nt(e){return L({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"m17 3l5.25 4.5L17 12l5.25 4.5L17 21v-3h-2.74l-2.82-2.82l2.12-2.12L15.5 15H17V9h-1.5l-9 9H2v-3h3.26l9-9H17zM2 6h4.5l2.82 2.82l-2.12 2.12L5.26 9H2z"}}]})(e)}function at(e){return L({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M16.15 13H5q-.425 0-.712-.288T4 12t.288-.712T5 11h11.15L13.3 8.15q-.3-.3-.288-.7t.288-.7q.3-.3.713-.312t.712.287L19.3 11.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-4.575 4.575q-.3.3-.712.288t-.713-.313q-.275-.3-.288-.7t.288-.7z"}}]})(e)}function ot(e){return L({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M10.5 17q1.05 0 1.775-.725T13 14.5V9h3V7h-4v5.5q-.325-.225-.7-.363T10.5 12q-1.05 0-1.775.725T8 14.5t.725 1.775T10.5 17M4 20q-.825 0-1.412-.587T2 18V6q0-.825.588-1.412T4 4h16q.825 0 1.413.588T22 6v12q0 .825-.587 1.413T20 20z"}}]})(e)}function ut(e){return L({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M14 19V5h4v14zm-8 0V5h4v14z"}}]})(e)}function st(e){return L({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"}}]})(e)}function it(e){return L({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M11.5 10.5h-.75q-.325 0-.537-.213T10 9.75t.213-.537T10.75 9H12q.425 0 .713.288T13 10v4.25q0 .325-.213.538T12.25 15t-.537-.213t-.213-.537zM6.85 19l.85.85q.3.3.288.7t-.288.7q-.3.3-.712.313t-.713-.288L3.7 18.7q-.15-.15-.213-.325T3.426 18t.063-.375t.212-.325l2.575-2.575q.3-.3.713-.287t.712.312q.275.3.288.7t-.288.7l-.85.85H17v-3q0-.425.288-.712T18 13t.713.288T19 14v3q0 .825-.587 1.413T17 19zm10.3-12H7v3q0 .425-.288.713T6 11t-.712-.288T5 10V7q0-.825.588-1.412T7 5h10.15l-.85-.85q-.3-.3-.288-.7t.288-.7q.3-.3.712-.312t.713.287L20.3 5.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-2.575 2.575q-.3.3-.712.288T16.3 9.25q-.275-.3-.288-.7t.288-.7z"}}]})(e)}function ct(e){return L({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"m6.85 19l.85.85q.3.3.288.7t-.288.7q-.3.3-.712.313t-.713-.288L3.7 18.7q-.15-.15-.213-.325T3.426 18t.063-.375t.212-.325l2.575-2.575q.3-.3.713-.287t.712.312q.275.3.288.7t-.288.7l-.85.85H17v-3q0-.425.288-.712T18 13t.713.288T19 14v3q0 .825-.587 1.413T17 19zm10.3-12H7v3q0 .425-.288.713T6 11t-.712-.288T5 10V7q0-.825.588-1.412T7 5h10.15l-.85-.85q-.3-.3-.288-.7t.288-.7q.3-.3.712-.312t.713.287L20.3 5.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-2.575 2.575q-.3.3-.712.288T16.3 9.25q-.275-.3-.288-.7t.288-.7z"}}]})(e)}function lt(e){return L({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M9 15H6q-.425 0-.712-.288T5 14v-4q0-.425.288-.712T6 9h3l3.3-3.3q.475-.475 1.088-.213t.612.938v11.15q0 .675-.612.938T12.3 18.3zm9.5-3q0 1.05-.475 1.988t-1.25 1.537q-.25.15-.512.013T16 15.1V8.85q0-.3.263-.437t.512.012q.775.625 1.25 1.575t.475 2"}}]})(e)}function ft(e){return L({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M7 15V9h4l5-5v16l-5-5z"}}]})(e)}function dt(e){return L({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M19 11.975q0-2.075-1.1-3.787t-2.95-2.563q-.375-.175-.55-.537t-.05-.738q.15-.4.538-.575t.787 0Q18.1 4.85 19.55 7.063T21 11.974t-1.45 4.913t-3.875 3.287q-.4.175-.788 0t-.537-.575q-.125-.375.05-.737t.55-.538q1.85-.85 2.95-2.562t1.1-3.788M7 15H4q-.425 0-.712-.288T3 14v-4q0-.425.288-.712T4 9h3l3.3-3.3q.475-.475 1.088-.213t.612.938v11.15q0 .675-.612.938T10.3 18.3zm9.5-3q0 1.05-.475 1.988t-1.25 1.537q-.25.15-.513.013T14 15.1V8.85q0-.3.263-.437t.512.012q.775.625 1.25 1.575t.475 2"}}]})(e)}function mt(e){return L({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M18.25 12L8.5 17.629V6.37z"}}]})(e)}function ce(e,t){if(!t.current)return 0;let r=(e.clientX-t.current.getBoundingClientRect().left)/t.current.clientWidth;return r=Math.max(r,0),r=Math.min(r,1),r=Math.floor(r*100)/100,r}function le(e,t){if(!t.current)return 0;let r=1-(e.clientY-t.current.getBoundingClientRect().top)/t.current.clientHeight;return r=Math.max(r,0),r=Math.min(r,1),r=Math.floor(r*100)/100,r}function Le(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Le(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function w(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Le(e))&&(n&&(n+=" "),n+=t);return n}function vt({bufferedPercentage:e,playedPercentage:t,onSeek:r}){const n=q("aplayer-bar"),a=q("aplayer-icon"),s=l.useRef(null),[f,p]=l.useState(t),i=l.useRef(!1);l.useEffect(()=>{i.current||p(t)},[t]);const y=l.useCallback(c=>{i.current=!0;const v=ce(c,s);p(v);const E=h=>{const u=ce(h,s);p(u)},g=h=>{document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",g);const u=ce(h,s);p(u),r==null||r(u),i.current=!1};document.addEventListener("mousemove",E),document.addEventListener("mouseup",g)},[r]);return d.jsx("div",{ref:s,className:w(n.b(),n.bs("vars")),onMouseDown:y,role:"slider","aria-label":"Audio progress","aria-valuenow":f?f*100:0,"aria-valuemin":0,"aria-valuemax":100,"aria-live":"polite",children:d.jsxs("div",{className:n.be("inner"),children:[typeof e<"u"?d.jsx("div",{className:n.be("loaded"),style:{width:`${e*100}%`}}):null,typeof f<"u"?d.jsx("div",{className:n.be("played"),style:{width:`${f*100}%`},children:d.jsx("span",{className:n.be("thumb"),children:d.jsx("span",{className:w(a.bs("loading")),children:d.jsx(Qe,{})})})}):null]})})}function bt({volume:e,muted:t,onToggleMuted:r,onChangeVolume:n}){const a=q("aplayer-volumn"),s=q("aplayer-icon"),f=l.useRef(null),[p,i]=l.useState(!1),y=l.useCallback(c=>{n(le(c,f)),i(!0);const v=g=>{n(le(g,f))},E=g=>{document.removeEventListener("mouseup",E),document.removeEventListener("mousemove",v),i(!1),n(le(g,f))};document.addEventListener("mousemove",v),document.addEventListener("mouseup",E)},[n]);return d.jsxs("div",{className:w(a.b(),a.bs("vars")),children:[d.jsx("button",{type:"button",className:w(s.b(),s.bs("volume-down")),onClick:()=>r(),"aria-label":t||!e?"Muted":"unMuted",children:t||!e?d.jsx(ft,{}):e>=1?d.jsx(dt,{}):d.jsx(lt,{})}),d.jsx("div",{className:w(a.be("bar-wrap"),{[a.bem("bar-wrap","active")]:p}),ref:f,onMouseDown:y,children:d.jsx("div",{className:a.be("bar"),children:d.jsx("div",{className:a.be("thumb"),style:{height:t?0:`${e*100}%`}})})})]})}function xe(e){if(typeof e>"u")return"--:--";if(Number.isNaN(e))return"00:00";const t=f=>f<10?`0${f}`:`${f}`,r=Math.trunc(e/60),n=Math.trunc(e-r*60),a=Math.trunc(r/60),s=Math.trunc(e/60-60*Math.trunc(e/60/60));return e>=3600?`${t(a)}:${t(s)}:${t(n)}`:`${t(r)}:${t(n)}`}function ht({volume:e,onChangeVolume:t,muted:r,currentTime:n,audioDurationSeconds:a,bufferedSeconds:s,onToggleMenu:f,onToggleMuted:p,order:i,onOrderChange:y,loop:c,onLoopChange:v,onSeek:E,isPlaying:g,onTogglePlay:h,onSkipForward:u,onSkipBack:m,showLyrics:b=!0,onToggleLyrics:_}){const S=q("aplayer-controller"),j=q("aplayer-icon"),$=l.useCallback(()=>{const A={list:"random",random:"list"}[i];y(A)},[i,y]),k=l.useCallback(()=>{const A={all:"one",one:"none",none:"all"}[c];v(A)},[c,v]);return d.jsxs("div",{className:w(S.b(),S.bs("vars")),role:"group","aria-label":"Audio Controls",children:[d.jsx(vt,{playedPercentage:typeof n>"u"||typeof a>"u"?void 0:n/a,bufferedPercentage:typeof s>"u"||typeof a>"u"?void 0:s/a,onSeek:A=>E==null?void 0:E(A*a)}),d.jsxs("div",{className:S.be("time"),children:[d.jsxs("span",{className:S.be("time-inner"),"aria-live":"polite",children:[d.jsx("span",{className:S.be("ptime"),children:xe(n)})," / ",d.jsx("span",{className:S.be("dtime"),children:xe(a)})]}),d.jsx("button",{className:w(j.b(),j.bs("back")),onClick:m,type:"button","aria-label":"Previous track",children:d.jsx(Ke,{})}),d.jsx("button",{className:w(j.b(),j.bs("play")),onClick:h,type:"button","aria-label":g?"Pause audio":"Play audio",children:g?d.jsx(ut,{}):d.jsx(st,{})}),d.jsx("button",{className:w(j.b(),j.bs("forward")),onClick:u,type:"button","aria-label":"Next track",children:d.jsx(Xe,{})}),d.jsx(bt,{volume:e,muted:r,onToggleMuted:p,onChangeVolume:t}),d.jsx("button",{className:w(j.b(),j.bs("order")),onClick:$,type:"button","aria-label":`Playback order: ${i}`,children:{list:d.jsx(at,{}),random:d.jsx(nt,{})}[i]}),d.jsx("button",{className:w(j.b(),j.bs("order")),onClick:k,type:"button","aria-label":`Loop mode: ${c}`,children:{all:d.jsx(ct,{}),one:d.jsx(it,{}),none:d.jsx(rt,{})}[c]}),d.jsx("button",{type:"button",className:w(j.b(),j.bs("menu")),onClick:()=>f==null?void 0:f(),"aria-label":"Toggle playlist menu",children:d.jsx(tt,{})}),d.jsx("button",{type:"button",className:w(j.b(),j.bs("lrc"),{[j.ns("lrc-inactivity")]:!b}),onClick:_,"aria-label":b?"Hide lyrics":"Show lyrics","aria-pressed":b,children:d.jsx(ot,{})})]})]})}function yt({open:e,audio:t,playingAudioUrl:r,onPlayAudio:n,listMaxHeight:a,mini:s}){const f=q("aplayer-list"),p=a?{maxHeight:a}:void 0,i=l.useCallback(c=>c?typeof c=="string"?c:c.name??"Audio artist":"Audio artist",[]),y=l.useRef(null);return l.useEffect(()=>{if(y.current){const c=y.current;return c.style.maxHeight=`${Math.min(c.scrollHeight,a??1/0)}px`,()=>{c.removeAttribute("style")}}},[a,s]),d.jsx("div",{ref:y,className:w(f.b(),{[f.bm("hide")]:!e,[f.bs("vars")]:!0}),"aria-label":"Audio playlist","aria-live":"polite",children:d.jsx("ol",{style:p,children:t.map((c,v)=>d.jsxs("li",{className:w({[f.bm("active")]:c.url===r}),onClick:()=>{c.url!==r&&(n==null||n(c))},role:"button","aria-label":`${c.name??"Audio name"} by ${i(c.artist)}}`,children:[d.jsx("span",{className:f.be("cur")}),d.jsx("span",{className:f.be("index"),children:v+1}),d.jsx("span",{className:f.be("title"),children:c.name??"Audio name"}),d.jsx("span",{className:f.be("author"),children:i(c.artist)})]},c.name||v))})})}function Se({show:e,lrcText:t,currentTime:r}){const n=q("aplayer-lrc"),a=l.useMemo(()=>pt(t),[t]),s=l.useMemo(()=>{for(let p=0;p<a.length;p++){const i=a[p],y=a[p+1];if(r>=i[0]&&(!y||r<y[0]))return p}return 0},[r,a]),f=l.useMemo(()=>({transform:`translateY(${-s*16}px)`,WebkitTransform:`translateY(${-s*16}px)`}),[s]);return d.jsx("div",{className:w(n.b(),{[n.bm("hide")]:!e}),children:t?d.jsx("div",{className:n.be("contents"),style:f,children:a.map(([,p],i)=>d.jsx("p",{className:w({[n.be("current")]:i===s}),children:p},i))}):null})}function pt(e){if(e){e=e.replace(/([^\]^\n])\[/g,(a,s)=>`${s}
|
|
25
|
-
[`);const
|
|
26
|
-
`),
|
|
30
|
+
<%s key={someKey} {...props} />`,Ne,Z,Vr,Z),er[Z+Ne]=!0}}return t===a?Ar(k):kr(k),k}}function Nr(t,o,h){return rr(t,o,h,!0)}function qr(t,o,h){return rr(t,o,h,!1)}var Dr=qr,Ir=Nr;be.Fragment=a,be.jsx=Dr,be.jsxs=Ir}()),be}var ar;function Wr(){return ar||(ar=1,process.env.NODE_ENV==="production"?Te.exports=zr():Te.exports=Hr()),Te.exports}var v=Wr(),Oe=e=>`--${e}`,ir=e=>`var(--${e})`,or=(e,r)=>`--${e}: ${r};`;function Ur(e,r){const n=a=>r;return{b:()=>`${n()}-${e}`,be:a=>`${n()}-${e}__${a}`,bm:a=>`${n()}-${e}--${a}`,bem:(a,i)=>`${n()}-${e}__${a}--${i}`,bs:a=>`${n()}-${e}-${a}`,ns:a=>`${n()}-${a}`,cb:()=>`.${n()}-${e}`,cbe:a=>`.${n()}-${e}__${a}`,cbm:a=>`.${n()}-${e}--${a}`,cbem:(a,i)=>`.${n()}-${e}__${a}--${i}`,cbs:a=>`.${n()}-${e}-${a}`,cns:a=>`.${n()}-${a}`,cv:a=>Oe(`${n()}-${e}-${a}`),cvm:(a,i={})=>{const p=n();for(const y of Object.keys(a))i[Oe(`${p}-${e}-${y}`)]=a[y];return i},gcv:a=>ir(`${n()}-${e}-${a}`),scv:(a,i)=>or(`${n()}-${e}-${a}`,i),nv:a=>Oe(`${n()}-${a}`),nvm:(a,i={})=>{const p=n();for(const y of Object.keys(a))i[Oe(`${p}-${y}`)]=a[y];return i},gnv:a=>ir(`${n()}-${a}`),snv:(a,i)=>or(`${n()}-${a}`,i)}}function U(e){return f.useMemo(()=>Ur(e,"twist"),[e])}var pr={color:void 0,size:void 0,className:void 0,style:void 0,attrs:void 0},Fe=fe.createContext(pr);Fe.Provider;function ge(e){"@babel/helpers - typeof";return ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ge(e)}var Yr=["attrs","size","title","spin","rotate","color"];function Gr(e,r){return Xr(e)||Jr(e,r)||hr(e,r)||Kr()}function Kr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
31
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jr(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,p,y,b=[],s=!0,g=!1;try{if(p=(n=n.call(e)).next,r!==0)for(;!(s=(a=p.call(n)).done)&&(b.push(a.value),b.length!==r);s=!0);}catch(m){g=!0,i=m}finally{try{if(!s&&n.return!=null&&(y=n.return(),Object(y)!==y))return}finally{if(g)throw i}}return b}}function Xr(e){if(Array.isArray(e))return e}function Qr(e,r){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=hr(e))||r){n&&(e=n);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(g){throw g},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
32
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p,y=!0,b=!1;return{s:function(){n=n.call(e)},n:function(){var g=n.next();return y=g.done,g},e:function(g){b=!0,p=g},f:function(){try{y||n.return==null||n.return()}finally{if(b)throw p}}}}function hr(e,r){if(e){if(typeof e=="string")return ur(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ur(e,r):void 0}}function ur(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function Ce(){return Ce=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ce.apply(null,arguments)}function sr(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Ee(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?sr(Object(n),!0).forEach(function(a){Zr(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sr(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Zr(e,r,n){return(r=et(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function et(e){var r=rt(e,"string");return ge(r)=="symbol"?r:r+""}function rt(e,r){if(ge(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(ge(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function tt(e,r){if(e==null)return{};var n,a,i=nt(e,r);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(e);for(a=0;a<p.length;a++)n=p[a],r.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function nt(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.includes(a))continue;n[a]=e[a]}return n}function at(e){var r=e.attrs,n=e.size,a=e.title,i=e.spin,p=e.rotate,y=e.color,b=tt(e,Yr),s=function(m){var c=n||m.size||"1em",E,x="",_="";return m.className&&(E=m.className),e.className&&(E=E?"".concat(E," ").concat(e.className):e.className),i&&(E?E+=" twist-icon-loading":E="twist-icon-loading"),p&&(x="rotate(".concat(p,"deg)"),_="rotate(".concat(p,"deg)")),fe.createElement("svg",Ce({xmlns:"http://www.w3.org/2000/svg"},m.attrs,r,b,{className:E,style:Ee(Ee({color:y||m.color,msTransform:x,transform:_},m.style),e.style),width:c,height:c}),a&&fe.createElement("title",null,a),e.children)};return Fe!==void 0?fe.createElement(Fe.Consumer,null,function(g){return s(g)}):s(pr)}function it(e){var r={},n=e.split(";"),a=Qr(n),i;try{for(a.s();!(i=a.n()).done;){var p=i.value,y=p.split(":"),b=Gr(y,2),s=b[0],g=b[1];if(s&&g){var m=s.trim().replace(/-./g,function(c){return c.charAt(1).toUpperCase()});r[m]=g.trim()}}}catch(c){a.e(c)}finally{a.f()}return r}function yr(e){return e&&e.map(function(r,n){return fe.createElement(r.tag,Ee(Ee({},r.attrs),{},{key:n,style:r.attrs.style?it(r.attrs.style):null}),yr(r.children))})}function A(e){return function(r){return fe.createElement(at,Ce({attrs:Ee({},e.attrs)},r),yr(e.children))}}function ot(e){return A({attrs:{viewBox:"0 0 1024 1024"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M485.6 249.9L198.2 498c-8.3 7.1-8.3 20.8 0 27.9l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9m320 0L518.2 498a18.6 18.6 0 0 0-6.2 14c0 5.2 2.1 10.4 6.2 14l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9"}}]})(e)}function ut(e){return A({attrs:{viewBox:"0 0 1024 1024"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M825.8 498L538.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L825.8 526c8.3-7.2 8.3-20.8 0-28m-320 0L218.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L505.8 526c4.1-3.6 6.2-8.8 6.2-14s-2.1-10.4-6.2-14"}}]})(e)}function st(e){return A({attrs:{viewBox:"0 0 1024 1024"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M512 1024c-69.1 0-136.2-13.5-199.3-40.2C251.7 958 197 921 150 874S66 772.3 40.2 711.3C13.5 648.2 0 581.1 0 512c0-19.9 16.1-36 36-36s36 16.1 36 36c0 59.4 11.6 117 34.6 171.3c22.2 52.4 53.9 99.5 94.3 139.9s87.5 72.2 139.9 94.3C395 940.4 452.6 952 512 952s117-11.6 171.3-34.6c52.4-22.2 99.5-53.9 139.9-94.3s72.2-87.5 94.3-139.9C940.4 629 952 571.4 952 512s-11.6-117-34.6-171.3a440.5 440.5 0 0 0-94.3-139.9a437.7 437.7 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.2C772.3 66 827 103 874 150s83.9 101.8 109.7 162.7c26.7 63.1 40.2 130.2 40.2 199.3s-13.5 136.2-40.2 199.3C958 772.3 921 827 874 874s-101.8 83.9-162.7 109.7c-63.1 26.8-130.2 40.3-199.3 40.3"}}]})(e)}function lr(e){return A({attrs:{viewBox:"0 0 512 512"},children:[{tag:"path",attrs:{d:"M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z",fill:"currentColor"}}]})(e)}function lt(e){return A({attrs:{viewBox:"0 0 512 512"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M208 432h-48a16 16 0 0 1-16-16V96a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v320a16 16 0 0 1-16 16m144 0h-48a16 16 0 0 1-16-16V96a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v320a16 16 0 0 1-16 16"}}]})(e)}function ct(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"}}]})(e)}function ft(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2 5.27L3.28 4L20 20.72L18.73 22l-3-3H7v3l-4-4l4-4v3h6.73L7 10.27V11H5V8.27zM17 13h2v4.18l-2-2zm0-8V2l4 4l-4 4V7H8.82l-2-2z"}}]})(e)}function dt(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"m17 3l5.25 4.5L17 12l5.25 4.5L17 21v-3h-2.74l-2.82-2.82l2.12-2.12L15.5 15H17V9h-1.5l-9 9H2v-3h3.26l9-9H17zM2 6h4.5l2.82 2.82l-2.12 2.12L5.26 9H2z"}}]})(e)}function vt(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M16.15 13H5q-.425 0-.712-.288T4 12t.288-.712T5 11h11.15L13.3 8.15q-.3-.3-.288-.7t.288-.7q.3-.3.713-.312t.712.287L19.3 11.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-4.575 4.575q-.3.3-.712.288t-.713-.313q-.275-.3-.288-.7t.288-.7z"}}]})(e)}function mt(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M10.5 17q1.05 0 1.775-.725T13 14.5V9h3V7h-4v5.5q-.325-.225-.7-.363T10.5 12q-1.05 0-1.775.725T8 14.5t.725 1.775T10.5 17M4 20q-.825 0-1.412-.587T2 18V6q0-.825.588-1.412T4 4h16q.825 0 1.413.588T22 6v12q0 .825-.587 1.413T20 20z"}}]})(e)}function pt(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M14 19V5h4v14zm-8 0V5h4v14z"}}]})(e)}function ht(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"}}]})(e)}function yt(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M11.5 10.5h-.75q-.325 0-.537-.213T10 9.75t.213-.537T10.75 9H12q.425 0 .713.288T13 10v4.25q0 .325-.213.538T12.25 15t-.537-.213t-.213-.537zM6.85 19l.85.85q.3.3.288.7t-.288.7q-.3.3-.712.313t-.713-.288L3.7 18.7q-.15-.15-.213-.325T3.426 18t.063-.375t.212-.325l2.575-2.575q.3-.3.713-.287t.712.312q.275.3.288.7t-.288.7l-.85.85H17v-3q0-.425.288-.712T18 13t.713.288T19 14v3q0 .825-.587 1.413T17 19zm10.3-12H7v3q0 .425-.288.713T6 11t-.712-.288T5 10V7q0-.825.588-1.412T7 5h10.15l-.85-.85q-.3-.3-.288-.7t.288-.7q.3-.3.712-.312t.713.287L20.3 5.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-2.575 2.575q-.3.3-.712.288T16.3 9.25q-.275-.3-.288-.7t.288-.7z"}}]})(e)}function bt(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"m6.85 19l.85.85q.3.3.288.7t-.288.7q-.3.3-.712.313t-.713-.288L3.7 18.7q-.15-.15-.213-.325T3.426 18t.063-.375t.212-.325l2.575-2.575q.3-.3.713-.287t.712.312q.275.3.288.7t-.288.7l-.85.85H17v-3q0-.425.288-.712T18 13t.713.288T19 14v3q0 .825-.587 1.413T17 19zm10.3-12H7v3q0 .425-.288.713T6 11t-.712-.288T5 10V7q0-.825.588-1.412T7 5h10.15l-.85-.85q-.3-.3-.288-.7t.288-.7q.3-.3.712-.312t.713.287L20.3 5.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-2.575 2.575q-.3.3-.712.288T16.3 9.25q-.275-.3-.288-.7t.288-.7z"}}]})(e)}function gt(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M9 15H6q-.425 0-.712-.288T5 14v-4q0-.425.288-.712T6 9h3l3.3-3.3q.475-.475 1.088-.213t.612.938v11.15q0 .675-.612.938T12.3 18.3zm9.5-3q0 1.05-.475 1.988t-1.25 1.537q-.25.15-.512.013T16 15.1V8.85q0-.3.263-.437t.512.012q.775.625 1.25 1.575t.475 2"}}]})(e)}function Et(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M7 15V9h4l5-5v16l-5-5z"}}]})(e)}function xt(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M19 11.975q0-2.075-1.1-3.787t-2.95-2.563q-.375-.175-.55-.537t-.05-.738q.15-.4.538-.575t.787 0Q18.1 4.85 19.55 7.063T21 11.974t-1.45 4.913t-3.875 3.287q-.4.175-.788 0t-.537-.575q-.125-.375.05-.737t.55-.538q1.85-.85 2.95-2.562t1.1-3.788M7 15H4q-.425 0-.712-.288T3 14v-4q0-.425.288-.712T4 9h3l3.3-3.3q.475-.475 1.088-.213t.612.938v11.15q0 .675-.612.938T10.3 18.3zm9.5-3q0 1.05-.475 1.988t-1.25 1.537q-.25.15-.513.013T14 15.1V8.85q0-.3.263-.437t.512.012q.775.625 1.25 1.575t.475 2"}}]})(e)}function St(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M18.25 12L8.5 17.629V6.37z"}}]})(e)}function qe(e,r){if(!r.current)return 0;let n=(e.clientX-r.current.getBoundingClientRect().left)/r.current.clientWidth;return n=Math.max(n,0),n=Math.min(n,1),n=Math.floor(n*100)/100,n}function De(e,r){if(!r.current)return 0;let n=1-(e.clientY-r.current.getBoundingClientRect().top)/r.current.clientHeight;return n=Math.max(n,0),n=Math.min(n,1),n=Math.floor(n*100)/100,n}function br(e){var r,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(r=0;r<i;r++)e[r]&&(n=br(e[r]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function C(){for(var e,r,n=0,a="",i=arguments.length;n<i;n++)(e=arguments[n])&&(r=br(e))&&(a&&(a+=" "),a+=r);return a}function _t({bufferedPercentage:e,playedPercentage:r,onSeek:n}){const a=U("aplayer-bar"),i=U("aplayer-icon"),p=f.useRef(null),[y,b]=f.useState(r),s=f.useRef(!1);f.useEffect(()=>{s.current||b(r)},[r]);const g=f.useCallback(m=>{s.current=!0;const c=qe(m,p);b(c);const E=_=>{const u=qe(_,p);b(u)},x=_=>{document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",x);const u=qe(_,p);b(u),n==null||n(u),s.current=!1};document.addEventListener("mousemove",E),document.addEventListener("mouseup",x)},[n]);return v.jsx("div",{ref:p,className:C(a.b(),a.bs("vars")),onMouseDown:g,role:"slider","aria-label":"Audio progress","aria-valuenow":y?y*100:0,"aria-valuemin":0,"aria-valuemax":100,"aria-live":"polite",children:v.jsxs("div",{className:a.be("inner"),children:[typeof e<"u"?v.jsx("div",{className:a.be("loaded"),style:{width:`${e*100}%`}}):null,typeof y<"u"?v.jsx("div",{className:a.be("played"),style:{width:`${y*100}%`},children:v.jsx("span",{className:a.be("thumb"),children:v.jsx("span",{className:C(i.bs("loading")),children:v.jsx(st,{})})})}):null]})})}function wt({volume:e,muted:r,onToggleMuted:n,onChangeVolume:a}){const i=U("aplayer-volumn"),p=U("aplayer-icon"),y=f.useRef(null),[b,s]=f.useState(!1),g=f.useCallback(m=>{a(De(m,y)),s(!0);const c=x=>{a(De(x,y))},E=x=>{document.removeEventListener("mouseup",E),document.removeEventListener("mousemove",c),s(!1),a(De(x,y))};document.addEventListener("mousemove",c),document.addEventListener("mouseup",E)},[a]);return v.jsxs("div",{className:C(i.b(),i.bs("vars")),children:[v.jsx("button",{type:"button",className:C(p.b(),p.bs("volume-down")),onClick:()=>n(),"aria-label":r||!e?"Muted":"unMuted",children:r||!e?v.jsx(Et,{}):e>=1?v.jsx(xt,{}):v.jsx(gt,{})}),v.jsx("div",{className:C(i.be("bar-wrap"),{[i.bem("bar-wrap","active")]:b}),ref:y,onMouseDown:g,children:v.jsx("div",{className:i.be("bar"),children:v.jsx("div",{className:i.be("thumb"),style:{height:r?0:`${e*100}%`}})})})]})}function cr(e){if(typeof e>"u")return"--:--";if(Number.isNaN(e))return"00:00";const r=y=>y<10?`0${y}`:`${y}`,n=Math.trunc(e/60),a=Math.trunc(e-n*60),i=Math.trunc(n/60),p=Math.trunc(e/60-60*Math.trunc(e/60/60));return e>=3600?`${r(i)}:${r(p)}:${r(a)}`:`${r(n)}:${r(a)}`}function jt({volume:e,onChangeVolume:r,muted:n,currentTime:a,audioDurationSeconds:i,bufferedSeconds:p,onToggleMenu:y,onToggleMuted:b,order:s,onOrderChange:g,loop:m,onLoopChange:c,onSeek:E,isPlaying:x,onTogglePlay:_,onSkipForward:u,onSkipBack:l,showLyrics:d=!0,onToggleLyrics:j}){const $=U("aplayer-controller"),P=U("aplayer-icon"),G=f.useCallback(()=>{const F={list:"random",random:"list"}[s];g(F)},[s,g]),K=f.useCallback(()=>{const F={all:"one",one:"none",none:"all"}[m];c(F)},[m,c]);return v.jsxs("div",{className:C($.b(),$.bs("vars")),role:"group","aria-label":"Audio Controls",children:[v.jsx(_t,{playedPercentage:typeof a>"u"||typeof i>"u"?void 0:a/i,bufferedPercentage:typeof p>"u"||typeof i>"u"?void 0:p/i,onSeek:F=>E==null?void 0:E(F*i)}),v.jsxs("div",{className:$.be("time"),children:[v.jsxs("span",{className:$.be("time-inner"),"aria-live":"polite",children:[v.jsx("span",{className:$.be("ptime"),children:cr(a)})," / ",v.jsx("span",{className:$.be("dtime"),children:cr(i)})]}),v.jsx("button",{className:C(P.b(),P.bs("back")),onClick:l,type:"button","aria-label":"Previous track",children:v.jsx(ot,{})}),v.jsx("button",{className:C(P.b(),P.bs("play")),onClick:_,type:"button","aria-label":x?"Pause audio":"Play audio",children:x?v.jsx(pt,{}):v.jsx(ht,{})}),v.jsx("button",{className:C(P.b(),P.bs("forward")),onClick:u,type:"button","aria-label":"Next track",children:v.jsx(ut,{})}),v.jsx(wt,{volume:e,muted:n,onToggleMuted:b,onChangeVolume:r}),v.jsx("button",{className:C(P.b(),P.bs("order")),onClick:G,type:"button","aria-label":`Playback order: ${s}`,children:{list:v.jsx(vt,{}),random:v.jsx(dt,{})}[s]}),v.jsx("button",{className:C(P.b(),P.bs("order")),onClick:K,type:"button","aria-label":`Loop mode: ${m}`,children:{all:v.jsx(bt,{}),one:v.jsx(yt,{}),none:v.jsx(ft,{})}[m]}),v.jsx("button",{type:"button",className:C(P.b(),P.bs("menu")),onClick:()=>y==null?void 0:y(),"aria-label":"Toggle playlist menu",children:v.jsx(ct,{})}),v.jsx("button",{type:"button",className:C(P.b(),P.bs("lrc"),{[P.ns("lrc-inactivity")]:!d}),onClick:j,"aria-label":d?"Hide lyrics":"Show lyrics","aria-pressed":d,children:v.jsx(mt,{})})]})]})}function Tt({open:e,audio:r,playingAudioUrl:n,onPlayAudio:a,listMaxHeight:i,isMiniExpanded:p,isSuperMiniExpanded:y}){const b=U("aplayer-list"),s=i?{maxHeight:i}:void 0,g=f.useCallback(c=>c?typeof c=="string"?c:c.name??"Audio artist":"Audio artist",[]),m=f.useRef(null);return f.useEffect(()=>{if(m.current){const c=m.current;return c.style.maxHeight=`${Math.min(c.scrollHeight,i??1/0)}px`,()=>{c.removeAttribute("style")}}},[i,p,y]),v.jsx("div",{ref:m,className:C(b.b(),{[b.bm("hide")]:!e,[b.bs("vars")]:!0}),"aria-label":"Audio playlist","aria-live":"polite",children:v.jsx("ol",{style:s,children:r.map((c,E)=>v.jsxs("li",{className:C({[b.bm("active")]:c.url===n}),onClick:()=>{c.url!==n&&(a==null||a(c))},role:"button","aria-label":`${c.name??"Audio name"} by ${g(c.artist)}}`,children:[v.jsx("span",{className:b.be("cur")}),v.jsx("span",{className:b.be("index"),children:E+1}),v.jsx("span",{className:b.be("title"),children:c.name??"Audio name"}),v.jsx("span",{className:b.be("author"),children:g(c.artist)})]},c.name||E))})})}function fr({show:e,lrcText:r,currentTime:n}){const a=U("aplayer-lrc"),i=f.useMemo(()=>Ot(r),[r]),p=f.useMemo(()=>{for(let b=0;b<i.length;b++){const s=i[b],g=i[b+1];if(n>=s[0]&&(!g||n<g[0]))return b}return 0},[n,i]),y=f.useMemo(()=>({transform:`translateY(${-p*16}px)`,WebkitTransform:`translateY(${-p*16}px)`}),[p]);return v.jsx("div",{className:C(a.b(),{[a.bm("hide")]:!e}),children:r?v.jsx("div",{className:a.be("contents"),style:y,children:i.map(([,b],s)=>v.jsx("p",{className:C({[a.be("current")]:s===p}),children:b},s))}):null})}function Ot(e){if(e){e=e.replace(/([^\]^\n])\[/g,(i,p)=>`${p}
|
|
33
|
+
[`);const r=e.split(`
|
|
34
|
+
`),n=[],a=r.length;for(let i=0;i<a;i++){const p=r[i].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/g),y=r[i].replace(/.*\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/g,"").replace(/<(\d{2}):(\d{2})(\.(\d{2,3}))?>/g,"").replace(/^\s+|\s+$/g,"");if(p){const b=p.length;for(let s=0;s<b;s++){const g=/\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/.exec(p[s]),m=g[1]*60,c=Number.parseInt(g[2]),E=g[4]?Number.parseInt(g[4])/(`${g[4]}`.length===2?100:1e3):0,x=m+c+E;n.push([x,y])}}}return n.sort((i,p)=>i[0]-p[0]),n}else return[]}var Re={exports:{}},Ie={};/**
|
|
27
35
|
* @license React
|
|
28
36
|
* use-sync-external-store-shim.production.js
|
|
29
37
|
*
|
|
@@ -31,7 +39,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
31
39
|
*
|
|
32
40
|
* This source code is licensed under the MIT license found in the
|
|
33
41
|
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var
|
|
42
|
+
*/var dr;function Rt(){if(dr)return Ie;dr=1;var e=f;function r(c,E){return c===E&&(c!==0||1/c===1/E)||c!==c&&E!==E}var n=typeof Object.is=="function"?Object.is:r,a=e.useState,i=e.useEffect,p=e.useLayoutEffect,y=e.useDebugValue;function b(c,E){var x=E(),_=a({inst:{value:x,getSnapshot:E}}),u=_[0].inst,l=_[1];return p(function(){u.value=x,u.getSnapshot=E,s(u)&&l({inst:u})},[c,x,E]),i(function(){return s(u)&&l({inst:u}),c(function(){s(u)&&l({inst:u})})},[c]),y(x),x}function s(c){var E=c.getSnapshot;c=c.value;try{var x=E();return!n(c,x)}catch{return!0}}function g(c,E){return E()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:b;return Ie.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Ie}var Ve={};/**
|
|
35
43
|
* @license React
|
|
36
44
|
* use-sync-external-store-shim.development.js
|
|
37
45
|
*
|
|
@@ -39,4 +47,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
39
47
|
*
|
|
40
48
|
* This source code is licensed under the MIT license found in the
|
|
41
49
|
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var je;function Et(){return je||(je=1,process.env.NODE_ENV!=="production"&&function(){function e(g,h){return g===h&&(g!==0||1/g===1/h)||g!==g&&h!==h}function t(g,h){c||a.startTransition===void 0||(c=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var u=h();if(!v){var m=h();s(u,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),v=!0)}m=f({inst:{value:u,getSnapshot:h}});var b=m[0].inst,_=m[1];return i(function(){b.value=u,b.getSnapshot=h,r(b)&&_({inst:b})},[g,u,h]),p(function(){return r(b)&&_({inst:b}),g(function(){r(b)&&_({inst:b})})},[g]),y(u),u}function r(g){var h=g.getSnapshot;g=g.value;try{var u=h();return!s(g,u)}catch{return!0}}function n(g,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=l,s=typeof Object.is=="function"?Object.is:e,f=a.useState,p=a.useEffect,i=a.useLayoutEffect,y=a.useDebugValue,c=!1,v=!1,E=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;de.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:E,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),de}var we;function xt(){return we||(we=1,process.env.NODE_ENV==="production"?ne.exports=gt():ne.exports=Et()),ne.exports}var V=xt();const B=[];function St(e){const t=l.useRef();return l.useEffect(()=>{if(typeof window<"u"&&!t.current){const r=t.current=document.createElement("audio");typeof(e==null?void 0:e.src)<"u"&&(r.src=e.src),typeof(e==null?void 0:e.autoPlay)<"u"&&(r.autoplay=e.autoPlay),typeof(e==null?void 0:e.initialVolume)<"u"&&(r.volume=e.initialVolume),B.includes(r)||B.push(r)}},[e==null?void 0:e.autoPlay,e==null?void 0:e.initialVolume,e==null?void 0:e.src]),l.useEffect(()=>{if(typeof window>"u")return;const r=t.current;if(r&&(e!=null&&e.onError))return r.addEventListener("error",e.onError),()=>{r.removeEventListener("error",e.onError)}},[e==null?void 0:e.onError]),l.useEffect(()=>{if(typeof window>"u")return;const r=t.current;if(r&&(e!=null&&e.onEnded))return r.addEventListener("ended",e.onEnded),()=>{r.removeEventListener("ended",e.onEnded)}},[e==null?void 0:e.onEnded]),l.useEffect(()=>()=>{const r=t.current;if(r){r.pause(),r.currentTime=0;const n=B.indexOf(r);n!==-1&&B.splice(n,1)}t.current=void 0},[]),t}function Tt(e){const t=St(e),r=l.useCallback(u=>{for(let m=0;m<B.length;m++){const b=B[m];b!==u&&!b.paused&&b.pause()}},[]),n=l.useCallback(async u=>{var b;const m=t.current;if(m){e.mutex&&r(m),m.src!==u&&(m.pause(),m.currentTime=0,m.src=u);try{await((b=t.current)==null?void 0:b.play())}catch{}}},[t,e.mutex,r]),a=l.useCallback(u=>{const m=t.current;m&&(m.paused?n(u):m.pause())},[t,n]),s=l.useCallback(u=>{Number.isFinite(u)&&(t.current.currentTime=u)},[t]),f=l.useCallback(()=>{t.current&&(t.current.muted=!t.current.muted)},[t]),p=l.useCallback(u=>{t.current&&(t.current.volume=u)},[t]),i=V.useSyncExternalStore(l.useCallback(u=>{var m;return(m=t.current)==null||m.addEventListener("volumechange",u),()=>{var b;(b=t.current)==null||b.removeEventListener("volumechange",u)}},[t]),()=>{var u;return(u=t.current)==null?void 0:u.volume},()=>{}),y=V.useSyncExternalStore(l.useCallback(u=>{var m;return(m=t.current)==null||m.addEventListener("volumechange",u),()=>{var b;(b=t.current)==null||b.removeEventListener("volumechange",u)}},[t]),()=>{var u;return(u=t.current)==null?void 0:u.muted},()=>{}),c=V.useSyncExternalStore(l.useCallback(u=>{var m;return(m=t.current)==null||m.addEventListener("timeupdate",u),()=>{var b;(b=t.current)==null||b.removeEventListener("timeupdate",u)}},[t]),()=>{if(t.current)return Math.round(t.current.currentTime)},()=>{}),v=V.useSyncExternalStore(l.useCallback(u=>{var m;return(m=t.current)==null||m.addEventListener("durationchange",u),()=>{var b;(b=t.current)==null||b.removeEventListener("durationchange",u)}},[t]),()=>{var u;return(u=t.current)==null?void 0:u.duration},()=>{}),E=V.useSyncExternalStore(l.useCallback(u=>{var m;return(m=t.current)==null||m.addEventListener("progress",u),()=>{var b;(b=t.current)==null||b.removeEventListener("progress",u)}},[t]),()=>{const u=t.current;return u&&u.buffered.length>0?u.buffered.end(u.buffered.length-1):0},()=>{}),g=V.useSyncExternalStore(l.useCallback(u=>{var m,b;return(m=t.current)==null||m.addEventListener("play",u),(b=t.current)==null||b.addEventListener("pause",u),()=>{var _,S;(_=t.current)==null||_.removeEventListener("play",u),(S=t.current)==null||S.removeEventListener("pause",u)}},[t]),()=>{const u=t.current;return u?!u.paused:!1},()=>{}),h=V.useSyncExternalStore(l.useCallback(u=>{var m,b;return(m=t.current)==null||m.addEventListener("playing",u),(b=t.current)==null||b.addEventListener("waiting",u),()=>{var _,S;(_=t.current)==null||_.removeEventListener("playing",u),(S=t.current)==null||S.removeEventListener("waiting",u)}},[t]),()=>{const u=t.current;return u?u.networkState===u.NETWORK_LOADING:!1},()=>{});return{audio:t.current,playAudio:n,togglePlay:a,seek:s,toggleMuted:f,setVolume:p,volume:i,muted:y,currentTime:c,duration:v,bufferedSeconds:E,isPlaying:g,isLoading:h}}function jt(e,t){return l.useMemo(()=>{const r={...t};for(const n in e)e[n]!==void 0&&(r[n]=e[n]);return r},[e,t])}function wt(e){const[t,r]=l.useState(e);return l.useEffect(()=>{r(e)},[e]),{mini:t,setMini:r}}function Ae(){const e=l.useRef([]);return l.useEffect(()=>{const r=e.current;return()=>{for(const n of r)clearTimeout(n)}},[]),l.useCallback((r,n)=>{const a=setTimeout(r,n);return e.current.push(a),a},[])}function _t(){const e=l.useRef(null),[t,r]=l.useState({text:"",style:{opacity:0}}),n=Ae(),a=l.useCallback((s,f=2e3)=>{e.current&&clearTimeout(e.current),r({text:s,style:{opacity:1}}),e.current=n(()=>{r({text:s,style:{opacity:0}})},f)},[n]);return[t,a]}function Ot(e){const t=jt(e,{appearance:"normal",volume:.7,autoPlay:!1,listMaxHeight:250,mini:!1,mutex:!0,listFolded:!1,theme:"light",border:!1}),{audio:r,appearance:n,initialLoop:a,initialOrder:s,volume:f,autoPlay:p,listMaxHeight:i,listFolded:y,mutex:c,theme:v,border:E}=t,g=l.useMemo(()=>Array.isArray(r)?r:[r],[r]),h=At(g,{initialLoop:a,initialOrder:s}),[u,m]=_t(),{mini:b,setMini:_}=wt(t.mini),S=Ae(),j=l.useRef(null),$=l.useCallback(()=>{j.current&&(clearTimeout(j.current),j.current=null)},[]),k=l.useRef(!1),A=Tt({src:h.currentSong.url,initialVolume:f,autoPlay:p,mutex:c,onError(P){const{error:o}=P.target;o&&m("An audio error has occurred, player will skip forward in 2 seconds."),h.hasNextSong&&(j.current=S(()=>{h.next()},2e3))},onEnded(){const{list:P,currentSong:o,loop:x,prioritize:T,hasNextSong:R}=h,{audio:C}=A;if(x==="one"){T({...o});return}if(!R&&x==="none"){k.current=!0,C.currentTime=0,C.pause(),C.src=P[0].url,T(P[0]);return}h.next()}}),I=h.length>1,O=l.useCallback(()=>{$(),A.togglePlay(h.currentSong.url)},[A,$,h.currentSong.url]),{prioritize:Q}=h,F=l.useCallback(P=>{$(),Q(P)},[$,Q]),[Z,oe]=l.useState(()=>I&&!y),[Y,ee]=l.useState(n!=="fixed"),z=l.useRef(null);l.useEffect(()=>{p&&A.playAudio(h.currentSong.url)},[]);const U=l.useRef(!0),W=l.useRef(h.currentSong);return l.useEffect(()=>{if(U.current){U.current=!1;return}if(k.current){k.current=!1;return}h.currentSong&&(h.loop==="one"||h.currentSong!==W.current)&&(W.current=h.currentSong,A.playAudio(h.currentSong.url))},[h.currentSong]),l.useEffect(()=>{if(n==="fixed"&&z.current){const P=z.current;return P.style.width="400px",()=>{P.removeAttribute("style")}}},[n]),{bodyRef:z,appearance:n,volume:f,listMaxHeight:i,theme:v,border:E,notice:u,audioControl:A,audio:g,handlePlayButtonClick:O,handlePlayAudioFromList:F,isPlaylistOpen:Z,setPlaylistOpen:oe,mini:b,displayLyrics:Y,setDisplayLyrics:ee,setMini:_,playlist:h,hasPlaylist:I}}function Rt(e){return Lt(e.slice())}function Lt(e){let t=e.length,r;for(;t!==0;)r=Math.floor(Math.random()*t),t--,[e[t],e[r]]=[e[r],e[t]];return e}function At(e,t){const{initialLoop:r="all",initialOrder:n="list"}=t,[a,s]=l.useState(r),[f,p]=l.useState(n),i=l.useMemo(()=>f==="list"?e:Rt(e),[e,f]),[y,c]=l.useState(i[0]),v=l.useCallback(m=>m.url,[]),E=l.useMemo(()=>i.findIndex(b=>v(b)===v(y))<i.length-1||a!=="none",[i,y,a,v]),g=l.useCallback(()=>{c(m=>{const b=i.findIndex(_=>v(_)===v(m));return b<i.length-1?i[b+1]:{...i[0]}})},[a,i,v]),h=l.useCallback(()=>{c(m=>{const b=i.indexOf(m);return b>0?i[b-1]:m})},[i]),u=l.useCallback(m=>{c(m)},[]);return l.useEffect(()=>{const m=i.find(b=>v(b)===v(y));c(m||i[0])},[i,v,y]),{list:i,currentSong:y,hasNextSong:E,next:g,previous:h,prioritize:u,order:f,setOrder:p,loop:a,setLoop:s,length:i.length}}function Nt(e){var k,A,I;const t=q("aplayer"),{bodyRef:r,appearance:n,volume:a,listMaxHeight:s,theme:f,border:p,notice:i,audio:y,audioControl:c,handlePlayButtonClick:v,handlePlayAudioFromList:E,isPlaylistOpen:g,setPlaylistOpen:h,mini:u,displayLyrics:m,setDisplayLyrics:b,setMini:_,playlist:S,hasPlaylist:j}=Ot(e),$=l.useCallback(O=>O?typeof O=="string"?O:O.url?d.jsx("a",{href:O.url,target:"_blank",rel:"noreferrer",children:O.name??"Audio artist"}):O.name??"Audio artist":"Audio artist",[]);return d.jsxs("div",{className:w(t.b(),{[t.bs(f)]:!0,[t.bs("vars")]:!0,[t.bm(n)]:!0,[t.bm("loading")]:c.isLoading,[t.bm("withlist")]:j,[t.bm("list-folded")]:!g,[t.bm("withlrc")]:!!S.currentSong.lrc&&n!=="fixed",[t.bm("narrow")]:u,[t.bm("border")]:p}),role:"region","aria-label":"Audio Player",children:[d.jsxs("div",{ref:r,className:t.be("body"),children:[d.jsx("div",{className:t.be("pic"),onClick:v,style:{backgroundImage:`url("${(k=S.currentSong)==null?void 0:k.cover}")`},role:"button","aria-label":c.isPlaying?"Pause audio":"Play audio",children:d.jsx("div",{className:w(t.be("button"),c.isPlaying?t.bm("pause"):t.bm("play")),role:"presentation",children:c.isPlaying?d.jsx(et,{}):d.jsx(mt,{})})}),d.jsxs("div",{className:w(t.be("info")),children:[d.jsxs("div",{className:w(t.be("music")),children:[d.jsx("span",{className:w(t.be("title")),children:((A=S.currentSong)==null?void 0:A.name)??"Audio name"}),d.jsxs("span",{className:w(t.be("author")),children:[" ","-"," ",$((I=S.currentSong)==null?void 0:I.artist)]})]}),n==="fixed"?null:d.jsx(Se,{show:m,lrcText:S.currentSong.lrc,currentTime:c.currentTime??0}),d.jsx(ht,{volume:c.volume??a,onChangeVolume:c.setVolume,muted:c.muted??!1,onToggleMuted:()=>c.toggleMuted(),currentTime:c.currentTime,audioDurationSeconds:c.duration,bufferedSeconds:c.bufferedSeconds,onSeek:O=>c.seek(O),onToggleMenu:()=>h(O=>!O),order:S.order,onOrderChange:S.setOrder,loop:S.loop,onLoopChange:S.setLoop,isPlaying:c.isPlaying??!1,onTogglePlay:v,onSkipForward:()=>{S.hasNextSong&&S.next()},onSkipBack:()=>{S.previous()},showLyrics:m,onToggleLyrics:()=>{b(O=>!O)}})]}),d.jsx("div",{className:t.be("notice"),style:i.style,children:i.text}),d.jsx("div",{className:t.be("miniswitcher"),onClick:()=>_(O=>!O),children:d.jsx("button",{className:w(t.bs("icon"),t.bs("icon-right")),type:"button",children:d.jsx(Ze,{})})})]}),j?d.jsx(yt,{open:g,audio:y,playingAudioUrl:S.currentSong.url,onPlayAudio:E,listMaxHeight:s,mini:u}):null,n==="fixed"&&d.jsx(Se,{show:m,lrcText:S.currentSong.lrc,currentTime:c.currentTime??0})]})}exports.TwistAPlayer=Nt;
|
|
50
|
+
*/var vr;function Ct(){return vr||(vr=1,process.env.NODE_ENV!=="production"&&function(){function e(x,_){return x===_&&(x!==0||1/x===1/_)||x!==x&&_!==_}function r(x,_){m||i.startTransition===void 0||(m=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var u=_();if(!c){var l=_();p(u,l)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}l=y({inst:{value:u,getSnapshot:_}});var d=l[0].inst,j=l[1];return s(function(){d.value=u,d.getSnapshot=_,n(d)&&j({inst:d})},[x,u,_]),b(function(){return n(d)&&j({inst:d}),x(function(){n(d)&&j({inst:d})})},[x]),g(u),u}function n(x){var _=x.getSnapshot;x=x.value;try{var u=_();return!p(x,u)}catch{return!0}}function a(x,_){return _()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=f,p=typeof Object.is=="function"?Object.is:e,y=i.useState,b=i.useEffect,s=i.useLayoutEffect,g=i.useDebugValue,m=!1,c=!1,E=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?a:r;Ve.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:E,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ve}var mr;function Pt(){return mr||(mr=1,process.env.NODE_ENV==="production"?Re.exports=Rt():Re.exports=Ct()),Re.exports}var ee=Pt();const ce=[];function Mt(e){const r=f.useRef();return f.useEffect(()=>{if(typeof window<"u"&&!r.current){const n=r.current=document.createElement("audio");typeof(e==null?void 0:e.src)<"u"&&(n.src=e.src),typeof(e==null?void 0:e.autoPlay)<"u"&&(n.autoplay=e.autoPlay),typeof(e==null?void 0:e.initialVolume)<"u"&&(n.volume=e.initialVolume),ce.includes(n)||ce.push(n)}},[e==null?void 0:e.autoPlay,e==null?void 0:e.initialVolume,e==null?void 0:e.src]),f.useEffect(()=>{if(typeof window>"u")return;const n=r.current;if(n&&(e!=null&&e.onError))return n.addEventListener("error",e.onError),()=>{n.removeEventListener("error",e.onError)}},[e==null?void 0:e.onError]),f.useEffect(()=>{if(typeof window>"u")return;const n=r.current;if(n&&(e!=null&&e.onEnded))return n.addEventListener("ended",e.onEnded),()=>{n.removeEventListener("ended",e.onEnded)}},[e==null?void 0:e.onEnded]),f.useEffect(()=>()=>{const n=r.current;if(n){n.pause(),n.currentTime=0;const a=ce.indexOf(n);a!==-1&&ce.splice(a,1)}r.current=void 0},[]),r}function Lt(e){const r=Mt(e),n=f.useCallback(u=>{for(let l=0;l<ce.length;l++){const d=ce[l];d!==u&&!d.paused&&d.pause()}},[]),a=f.useCallback(async u=>{var d;const l=r.current;if(l){e.mutex&&n(l),l.src!==u&&(l.pause(),l.currentTime=0,l.src=u);try{await((d=r.current)==null?void 0:d.play())}catch{}}},[r,e.mutex,n]),i=f.useCallback(u=>{const l=r.current;l&&(l.paused?a(u):l.pause())},[r,a]),p=f.useCallback(u=>{Number.isFinite(u)&&(r.current.currentTime=u)},[r]),y=f.useCallback(()=>{r.current&&(r.current.muted=!r.current.muted)},[r]),b=f.useCallback(u=>{r.current&&(r.current.volume=u)},[r]),s=ee.useSyncExternalStore(f.useCallback(u=>{var l;return(l=r.current)==null||l.addEventListener("volumechange",u),()=>{var d;(d=r.current)==null||d.removeEventListener("volumechange",u)}},[r]),()=>{var u;return(u=r.current)==null?void 0:u.volume},()=>{}),g=ee.useSyncExternalStore(f.useCallback(u=>{var l;return(l=r.current)==null||l.addEventListener("volumechange",u),()=>{var d;(d=r.current)==null||d.removeEventListener("volumechange",u)}},[r]),()=>{var u;return(u=r.current)==null?void 0:u.muted},()=>{}),m=ee.useSyncExternalStore(f.useCallback(u=>{var l;return(l=r.current)==null||l.addEventListener("timeupdate",u),()=>{var d;(d=r.current)==null||d.removeEventListener("timeupdate",u)}},[r]),()=>{if(r.current)return Math.round(r.current.currentTime)},()=>{}),c=ee.useSyncExternalStore(f.useCallback(u=>{var l;return(l=r.current)==null||l.addEventListener("durationchange",u),()=>{var d;(d=r.current)==null||d.removeEventListener("durationchange",u)}},[r]),()=>{var u;return(u=r.current)==null?void 0:u.duration},()=>{}),E=ee.useSyncExternalStore(f.useCallback(u=>{var l;return(l=r.current)==null||l.addEventListener("progress",u),()=>{var d;(d=r.current)==null||d.removeEventListener("progress",u)}},[r]),()=>{const u=r.current;return u&&u.buffered.length>0?u.buffered.end(u.buffered.length-1):0},()=>{}),x=ee.useSyncExternalStore(f.useCallback(u=>{var l,d;return(l=r.current)==null||l.addEventListener("play",u),(d=r.current)==null||d.addEventListener("pause",u),()=>{var j,$;(j=r.current)==null||j.removeEventListener("play",u),($=r.current)==null||$.removeEventListener("pause",u)}},[r]),()=>{const u=r.current;return u?!u.paused:!1},()=>{}),_=ee.useSyncExternalStore(f.useCallback(u=>{var l,d;return(l=r.current)==null||l.addEventListener("playing",u),(d=r.current)==null||d.addEventListener("waiting",u),()=>{var j,$;(j=r.current)==null||j.removeEventListener("playing",u),($=r.current)==null||$.removeEventListener("waiting",u)}},[r]),()=>{const u=r.current;return u?u.networkState===u.NETWORK_LOADING:!1},()=>{});return{audio:r.current,playAudio:a,togglePlay:i,seek:p,toggleMuted:y,setVolume:b,volume:s,muted:g,currentTime:m,duration:c,bufferedSeconds:E,isPlaying:x,isLoading:_}}function $t(e,r){return f.useMemo(()=>{const n={...r};for(const a in e)e[a]!==void 0&&(n[a]=e[a]);return n},[e,r])}function kt(e){const[r,n]=f.useState(e),[a,i]=f.useState(!1);return f.useEffect(()=>{n(e)},[e]),{mini:r,setMini:n,expanded:a,setExpanded:i,toggleExpanded:()=>i(b=>!b),isMiniCollapsed:r&&!a,isMiniExpanded:r&&a}}function At(e){const[r,n]=f.useState(e),[a,i]=f.useState(!1);return f.useEffect(()=>{n(e)},[e]),{superMini:r,setSuperMini:n,expanded:a,setExpanded:i,toggleExpanded:()=>i(b=>!b),isSuperMiniCollapsed:r&&!a,isSuperMiniExpanded:r&&a}}function gr(){const e=f.useRef([]);return f.useEffect(()=>{const n=e.current;return()=>{for(const a of n)clearTimeout(a)}},[]),f.useCallback((n,a)=>{const i=setTimeout(n,a);return e.current.push(i),i},[])}function Nt(){const e=f.useRef(null),[r,n]=f.useState({text:"",style:{opacity:0}}),a=gr(),i=f.useCallback((p,y=2e3)=>{e.current&&clearTimeout(e.current),n({text:p,style:{opacity:1}}),e.current=a(()=>{n({text:p,style:{opacity:0}})},y)},[a]);return[r,i]}function qt(e){const r=$t(e,{appearance:"normal",volume:.7,autoPlay:!1,listMaxHeight:250,mini:!1,superMini:!1,mutex:!0,listFolded:!1,theme:"light",border:!1}),{audio:n,appearance:a,initialLoop:i,initialOrder:p,volume:y,autoPlay:b,listMaxHeight:s,listFolded:g,mutex:m,theme:c,border:E,mini:x,superMini:_}=r,u=f.useMemo(()=>Array.isArray(n)?n:[n],[n]),l=Vt(u,{initialLoop:i,initialOrder:p}),[d,j]=Nt(),{mini:$,expanded:P,toggleExpanded:G,isMiniCollapsed:K,isMiniExpanded:F}=kt(x),{superMini:J,expanded:re,toggleExpanded:de,isSuperMiniCollapsed:te,isSuperMiniExpanded:ne}=At(_),D=!J&&$,I=J&&!$,z=gr(),M=f.useRef(null),X=f.useCallback(()=>{M.current&&(clearTimeout(M.current),M.current=null)},[]),ae=f.useRef(!1),H=Lt({src:l.currentSong.url,initialVolume:y,autoPlay:b,mutex:m,onError(B){const{error:oe}=B.target;oe&&j("An audio error has occurred, player will skip forward in 2 seconds."),l.hasNextSong&&(M.current=z(()=>{l.next()},2e3))},onEnded(){const{list:B,currentSong:oe,loop:_e,prioritize:we,hasNextSong:ue}=l,{audio:W}=H;if(_e==="one"){we({...oe});return}if(!ue&&_e==="none"){ae.current=!0,W.currentTime=0,W.pause(),W.src=B[0].url,we(B[0]);return}l.next()}}),ve=l.length>1,xe=f.useCallback(()=>{X(),H.togglePlay(l.currentSong.url)},[H,X,l.currentSong.url]),{prioritize:me}=l,Se=f.useCallback(B=>{X(),me(B)},[X,me]),[Pe,Me]=f.useState(()=>ve&&!g),[pe,he]=f.useState(a!=="fixed"),Y=f.useRef(null);f.useEffect(()=>{b&&H.playAudio(l.currentSong.url)},[]);const ie=f.useRef(!0),Q=f.useRef(l.currentSong);return f.useEffect(()=>{if(ie.current){ie.current=!1;return}if(ae.current){ae.current=!1;return}l.currentSong&&(l.loop==="one"||l.currentSong!==Q.current)&&(Q.current=l.currentSong,H.playAudio(l.currentSong.url))},[l.currentSong]),f.useEffect(()=>{if(a==="fixed"&&Y.current){const B=Y.current;return B.style.width="400px",()=>{B.removeAttribute("style")}}},[a]),{bodyRef:Y,appearance:a,volume:y,listMaxHeight:s,theme:c,border:E,notice:d,audioControl:H,audio:u,handlePlayButtonClick:xe,handlePlayAudioFromList:Se,isPlaylistOpen:Pe,setPlaylistOpen:Me,mini:$,displayLyrics:pe,setDisplayLyrics:he,playlist:l,hasPlaylist:ve,superMini:J,showSuperMini:I,superMiniExpanded:re,toggleSuperMiniExpanded:de,isSuperMiniCollapsed:te,isSuperMiniExpanded:ne,showMini:D,miniExpanded:P,toggleMiniExpanded:G,isMiniCollapsed:K,isMiniExpanded:F}}function Dt(e){return It(e.slice())}function It(e){let r=e.length,n;for(;r!==0;)n=Math.floor(Math.random()*r),r--,[e[r],e[n]]=[e[n],e[r]];return e}function Vt(e,r){const{initialLoop:n="all",initialOrder:a="list"}=r,[i,p]=f.useState(n),[y,b]=f.useState(a),s=f.useMemo(()=>y==="list"?e:Dt(e),[e,y]),[g,m]=f.useState(s[0]),c=f.useCallback(l=>l.url,[]),E=f.useMemo(()=>s.findIndex(d=>c(d)===c(g))<s.length-1||i!=="none",[s,g,i,c]),x=f.useCallback(()=>{m(l=>{const d=s.findIndex(j=>c(j)===c(l));return d<s.length-1?s[d+1]:{...s[0]}})},[i,s,c]),_=f.useCallback(()=>{m(l=>{const d=s.indexOf(l);return d>0?s[d-1]:l})},[s]),u=f.useCallback(l=>{m(l)},[]);return f.useEffect(()=>{const l=s.find(d=>c(d)===c(g));m(l||s[0])},[s,c,g]),{list:s,currentSong:g,hasNextSong:E,next:x,previous:_,prioritize:u,order:y,setOrder:b,loop:i,setLoop:p,length:s.length}}function Ft(e){var D,I,z;const r=U("aplayer"),{bodyRef:n,appearance:a,volume:i,listMaxHeight:p,theme:y,border:b,notice:s,audio:g,audioControl:m,handlePlayButtonClick:c,handlePlayAudioFromList:E,isPlaylistOpen:x,setPlaylistOpen:_,displayLyrics:u,setDisplayLyrics:l,playlist:d,hasPlaylist:j,showSuperMini:$,superMiniExpanded:P,toggleSuperMiniExpanded:G,isSuperMiniCollapsed:K,isSuperMiniExpanded:F,showMini:J,toggleMiniExpanded:re,isMiniCollapsed:de,isMiniExpanded:te}=qt(e),ne=f.useCallback(M=>M?typeof M=="string"?M:M.url?v.jsx("a",{href:M.url,target:"_blank",rel:"noreferrer",children:M.name??"Audio artist"}):M.name??"Audio artist":"Audio artist",[]);return v.jsxs("div",{className:C(r.b(),{[r.bs(y)]:!0,[r.bs("vars")]:!0,[r.bm(a)]:!0,[r.bm("loading")]:m.isLoading,[r.bm("withlist")]:j,[r.bm("list-collapsed")]:!x,[r.bm("withlrc")]:!!d.currentSong.lrc&&a!=="fixed",[r.bm("border")]:b,[r.bm("mini")]:J,[r.bm("mini-collapsed")]:de,[r.bm("mini-expanded")]:te,[r.bm("super-mini")]:$,[r.bm("super-mini-collapsed")]:K,[r.bm("super-mini-expanded")]:F}),role:"region","aria-label":"Audio Player",children:[v.jsxs("div",{ref:n,className:r.be("body"),children:[v.jsx("div",{className:r.be("pic"),onClick:c,style:{backgroundImage:`url("${(D=d.currentSong)==null?void 0:D.cover}")`},role:"button","aria-label":m.isPlaying?"Pause audio":"Play audio",children:v.jsx("div",{className:C(r.be("button"),m.isPlaying?r.bm("pause"):r.bm("play")),role:"presentation",children:m.isPlaying?v.jsx(lt,{}):v.jsx(St,{})})}),v.jsxs("div",{className:C(r.be("info")),children:[v.jsxs("div",{className:C(r.be("music")),children:[v.jsx("span",{className:C(r.be("title")),children:((I=d.currentSong)==null?void 0:I.name)??"Audio name"}),v.jsxs("span",{className:C(r.be("author")),children:[" ","-"," ",ne((z=d.currentSong)==null?void 0:z.artist)]})]}),a==="fixed"?null:v.jsx(fr,{show:u,lrcText:d.currentSong.lrc,currentTime:m.currentTime??0}),v.jsx(jt,{volume:m.volume??i,onChangeVolume:m.setVolume,muted:m.muted??!1,onToggleMuted:()=>m.toggleMuted(),currentTime:m.currentTime,audioDurationSeconds:m.duration,bufferedSeconds:m.bufferedSeconds,onSeek:M=>m.seek(M),onToggleMenu:()=>_(M=>!M),order:d.order,onOrderChange:d.setOrder,loop:d.loop,onLoopChange:d.setLoop,isPlaying:m.isPlaying??!1,onTogglePlay:c,onSkipForward:()=>{d.hasNextSong&&d.next()},onSkipBack:()=>{d.previous()},showLyrics:u,onToggleLyrics:()=>{l(M=>!M)}})]}),v.jsx("div",{className:r.be("notice"),style:s.style,children:s.text}),v.jsx("div",{className:r.be("miniswitcher"),onClick:re,children:v.jsx("button",{className:C(r.bs("icon"),r.bs("icon-right")),type:"button",children:v.jsx(lr,{})})}),v.jsx("div",{className:r.be("super-miniswitcher"),onClick:G,children:v.jsx("button",{className:C(r.bs("icon"),r.bs("icon-right")),type:"button",children:v.jsx(lr,{})})})]}),j?v.jsx(Tt,{open:x,audio:g,playingAudioUrl:d.currentSong.url,onPlayAudio:E,listMaxHeight:p,isMiniExpanded:te,isSuperMiniExpanded:P}):null,v.jsx(fr,{show:u,lrcText:d.currentSong.lrc,currentTime:m.currentTime??0})]})}exports.TwistAPlayer=Ft;
|
package/dist/index.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.twist-aplayer-icon{width:var(--tp-icon-width);height:var(--tp-icon-width);border:none;background-color:transparent;outline:none;cursor:pointer;opacity:.8;vertical-align:middle;padding:0;font-size:var(--tp-icon-font-size);margin:0;display:inline-block}.twist-aplayer-icon path{transition:all var(--tp-icon-transition-timing) var(--tp-icon-transition-function)}.twist-aplayer .twist-aplayer-icon-lrc-inactivity svg{opacity:.4}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-right{display:flex;justify-content:center;align-items:center}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-back,.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-forward,.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-lrc,.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-play{display:inline-block}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-back,.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-forward,.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-menu,.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-play{position:absolute;bottom:27px;width:20px;height:20px;font-size:20px}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-back{right:75px}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-play{right:50px}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-forward{right:25px}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-menu{right:0%}.twist-aplayer--withlist .twist-aplayer-icon-order,.twist-aplayer--withlist .twist-aplayer-icon-menu{display:inline}.twist-aplayer--fixed.twist-aplayer--narrow .twist-aplayer-icon{transform:rotateY(0)}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.twist-aplayer-bar{margin:0 0 0 5px;padding:4px 0;cursor:pointer!important;flex:1;transition:all .2s ease-in-out}.twist-aplayer-bar-vars{--tp-bar-width: 100%;--tp-bar-height: 2px;--tp-bar-background: hsl(var(--tp-primary) / .2);--tp-bar-played-background: hsl(var(--tp-accent-foreground));--tp-bar-loaded-background: hsl(var(--tp-secondary));--tp-bar-loaded-transition-timing: .5s;--tp-bar-loaded-transition-function: ease;--tp-bar-thumb-width: 10px;--tp-bar-thumb-height: 10px;--tp-bar-thumb-margin-top: -4px;--tp-bar-thumb-margin-right: -10px;--tp-bar-thumb-transition-function: ease-in-out;--tp-bar-thumb-transition-timing: .3s;--tp-bar-thumb-hover-scale: 1;--tp-bar-thumb-border-radius: 50%;--tp-bar-thumb-background: hsl(var(--tp-foreground))}.twist-aplayer-bar__inner{position:relative;width:var(--tp-bar-width);height:var(--tp-bar-height);background:var(--tp-bar-background)}.twist-aplayer-bar__loaded{position:absolute;left:0;top:0;bottom:0;height:var(--tp-bar-height);background:var(--tp-bar-loaded-background);transition:all var(--tp-bar-loaded-transition-timing) var(--tp-bar-loaded-transition-function)}.twist-aplayer-bar__played{position:absolute;left:0;top:0;bottom:0;height:var(--tp-bar-height);background-color:var(--tp-bar-played-background)}.twist-aplayer-bar__thumb{position:absolute;top:0;right:5px;margin-top:var(--tp-bar-thumb-margin-top);margin-right:var(--tp-bar-thumb-margin-right);width:var(--tp-bar-thumb-width);height:var(--tp-bar-thumb-height);border-radius:var(--tp-bar-thumb-border-radius);cursor:pointer;background-color:var(--tp-bar-thumb-background);transition:all var(--tp-bar-thumb-transition-timing) var(--tp-bar-thumb-transition-function);transform:scale(0);-webkit-transform:scale(0)}.twist-aplayer-bar:hover .twist-aplayer-bar__thumb{transform:scale(var(--tp-bar-thumb-hover-scale));-webkit-transform:scale(var(--tp-bar-thumb-hover-scale))}.twist-aplayer-volumn{position:relative;display:inline-block;margin-left:3px;cursor:pointer!important}.twist-aplayer-volumn-vars{--tp-volume-bar-background: hsl(var(--tp-primary) / .3);--tp-volume-bar-width: 5px;--tp-volume-bar-height: 35px;--tp-volume-bar-border-radius: 2.5px;--tp-volume-thumb-width: 5px;--tp-volume-thumb-background: hsl(var(--tp-primary));--tp-volume-thumb-transition-function: ease;--tp-volume-bar-wrap-transition-function: ease-in-out;--tp-volume-bar-wrap-timing: .2s;--tp-volume-thumb-timing: .1s}.twist-aplayer-volumn__bar-wrap{position:absolute;bottom:15px;right:-3px;width:25px;height:0;z-index:99;overflow:hidden;transition:all var(--tp-volume-bar-wrap-timing) var(--tp-volume-bar-wrap-transition-function)}.twist-aplayer-volumn:hover .twist-aplayer-volumn__bar-wrap,.twist-aplayer-volumn__bar-wrap--active{height:40px}.twist-aplayer-volumn__bar{position:absolute;bottom:0;right:10px;width:var(--tp-volume-bar-width);height:var(--tp-volume-bar-height);background:var(--tp-volume-bar-background);border-radius:var(--tp-volume-bar-border-radius);overflow:hidden}.twist-aplayer-volumn__thumb{position:absolute;bottom:0;right:0;width:var(--tp-volume-thumb-width);background-color:var(--tp-volume-thumb-background);transition:all var(--tp-volume-thumb-timing) var(--tp-volume-thumb-transition-function)}.twist-aplayer-list{overflow:auto;transition:all .5s ease;will-change:height;display:none;background-color:hsl(var(--tp-background));overflow:hidden}.twist-aplayer-list-vars{--tp-list-scrollbar-thumb-color: #8884;--tp-list-scrollbar-thumb-hover-color: hsl(var(--tp-muted-foreground) / .6)}.twist-aplayer-list--hide{max-height:0!important}.twist-aplayer-list ol{list-style-type:none;margin:0;padding:0;overflow-y:auto}.twist-aplayer-list ol li{position:relative;height:32px;line-height:32px;padding:0 15px;font-size:12px;border-top:1px solid hsl(var(--tp-border));cursor:pointer;transition:all .2s ease;overflow:hidden;margin:0;background-color:hsl(var(--tp-background))}.twist-aplayer-list ol li.twist-aplayer-list--active{background-color:hsl(var(--tp-secondary))}.twist-aplayer-list ol li:first-child{border:none}.twist-aplayer-list ol li:hover{background-color:hsl(var(--tp-secondary)/.8)}.twist-aplayer-list ol::-webkit-scrollbar{width:5px}.twist-aplayer-list ol::-webkit-scrollbar-thumb{border-radius:3px;background-color:var(--tp-list-scrollbar-thumb-color)}.twist-aplayer-list ol::-webkit-scrollbar-thumb:hover{background-color:var(--tp-list-scrollbar-thumb-hover-color)}.twist-aplayer-list__cur{display:none;width:3px;height:22px;position:absolute;left:0;top:5px;cursor:pointer;background-color:hsl(var(--tp-accent-foreground))}.twist-aplayer-list--active .twist-aplayer-list__cur{display:inline-block}.twist-aplayer-list__index{color:hsl(var(--tp-muted-foreground));margin-right:12px;cursor:pointer}.twist-aplayer-list__title{color:hsl(var(--tp-secondary-foreground))}.twist-aplayer-list__author{color:hsl(var(--tp-muted-foreground));float:right;cursor:pointer}.twist-aplayer-lrc{display:none;position:relative;height:30px;text-align:center;overflow:hidden;margin:-10px 0 7px}.twist-aplayer-lrc:after,.twist-aplayer-lrc:before{content:" ";position:absolute;z-index:1;display:block;overflow:hidden;width:100%}.twist-aplayer-lrc:before{top:0;height:10%;background:linear-gradient(180deg,hsl(var(--tp-background)) 0,#fff0);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#00ffffff",GradientType=0)}.twist-aplayer-lrc:after{bottom:0;height:33%;background:linear-gradient(180deg,#fff0 0,hsl(var(--tp-background)));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ffffff",endColorstr="#ccffffff",GradientType=0)}.twist-aplayer-lrc p{font-size:12px;color:hsl(var(--tp-secondary-foreground));line-height:16px!important;height:16px!important;padding:0!important;margin:0!important;transition:all .5s ease-out;opacity:.4;overflow:hidden;text-shadow:none}.twist-aplayer-lrc__contents{width:100%;transition:all .5s ease-out;-webkit-user-select:text;-moz-user-select:text;user-select:text;cursor:default}.twist-aplayer-lrc p.twist-aplayer-lrc__current{opacity:1;overflow:visible;height:auto!important;min-height:16px}.twist-aplayer-lrc.twist-aplayer-lrc--hide{display:none}.twist-aplayer-light{--tp-background: 0 0% 100%;--tp-foreground: 240 10% 3.9%;--tp-card: 0 0% 100%;--tp-card-foreground: 240 10% 3.9%;--tp-primary: 240 5.9% 10%;--tp-primary-foreground: 0 0% 98%;--tp-secondary: 240 4.8% 95.9%;--tp-secondary-foreground: 240 5.9% 10%;--tp-muted: 240 4.8% 95.9%;--tp-muted-foreground: 240 3.8% 46.1%;--tp-accent: 240 4.8% 95.9%;--tp-accent-foreground: 240 5.9% 10%;--tp-border: 240 5.9% 90%}.twist-aplayer-dark{--tp-background: 240 10% 3.9%;--tp-foreground: 0 0% 98%;--tp-card: 240 10% 3.9%;--tp-card-foreground: 0 0% 98%;--tp-primary: 0 0% 98%;--tp-primary-foreground: 240 5.9% 10%;--tp-secondary: 240 3.7% 15.9%;--tp-secondary-foreground: 0 0% 98%;--tp-muted: 240 3.7% 15.9%;--tp-muted-foreground: 240 5% 64.9%;--tp-accent: 240 3.7% 15.9%;--tp-accent-foreground: 0 0% 98%;--tp-border: 240 3.7% 15.9%}.twist-aplayer-vars{--tp-icon-width: 15px;--tp-icon-height: 15px;--tp-icon-font-size: 15px;--tp-icon-transition-function: ease-in-out;--tp-icon-transition-timing: .2s;--tp-max-width: 400px;--tp-zIndex: 99;--tp-pic-width: 66px;--tp-pic-height: 66px;--tp-pic-transition-function: ease;--tp-pic-transition-timing: .3s;--tp-pic-zIndex: 99;--tp-button-background: rgba(0, 0, 0, .2);--tp-box-shadow: 0 0 #0000, 0 0 #0000, 0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tp-user-border: hsl(var(--tp-border) / .3)}.twist-aplayer{font-family:Arial,Helvetica,sans-serif;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:normal;border-radius:2px;margin:5px;box-shadow:var(--tp-box-shadow);overflow:hidden}.twist-aplayer *{box-sizing:content-box}.twist-aplayer__body{background-color:hsl(var(--tp-background))}.twist-aplayer__pic{position:relative;float:left;z-index:var(--tp-pic-zIndex);width:var(--tp-pic-width);height:var(--tp-pic-height);background-size:cover;background-position:50%;transition:all var(--tp-pic-transition-timing) var(--tp-pic-transition-function);cursor:pointer}.twist-aplayer__button{position:absolute;border-radius:50%;opacity:.8;text-shadow:0 1px 1px rgba(0,0,0,.2);box-shadow:0 1px 1px #0003;background:hsl(var(--tp-primary-foreground));transition:all .1s ease}.twist-aplayer--play{width:28px;height:28px;bottom:50%;right:50%;margin:0 -15px -15px 0}.twist-aplayer--play svg{position:absolute;top:4px;left:5px;height:20px;width:20px}.twist-aplayer--pause{font-size:12px;width:18px;height:18px;bottom:4px;right:4px}.twist-aplayer--pause svg{position:absolute;top:3px;left:3px;height:12px;width:12px}.twist-aplayer--play path,.twist-aplayer--pause path{fill:hsl(var(--tp-accent-foreground))}.twist-aplayer__info{margin-left:66px;padding:14px 7px 0 10px;height:66px;box-sizing:border-box}.twist-aplayer__music{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 0 13px 5px;-webkit-user-select:text;-moz-user-select:text;user-select:text;cursor:default;padding-bottom:2px;height:20px}.twist-aplayer__title{color:hsl(var(--tp-secondary-foreground));font-size:14px}.twist-aplayer__author{font-size:12px;color:hsl(var(--tp-muted-foreground))}.twist-aplayer__author>a{color:inherit;text-decoration:none}.twist-aplayer-controller{position:relative;display:flex}.twist-aplayer-controller__time{position:relative;right:0;bottom:4px;height:17px;font-size:11px;padding-left:7px}.twist-aplayer-controller__time-inner{color:hsl(var(--tp-muted-foreground));vertical-align:middle}.twist-aplayer-controller__time .twist-aplayer-icon{cursor:pointer;transition:all .2s ease}.twist-aplayer-controller__time .twist-aplayer-icon path{fill:hsl(var(--tp-muted-foreground))}.twist-aplayer-controller__time .twist-aplayer-icon:hover path{fill:hsl(var(--tp-primary))}.twist-aplayer__notice{opacity:0;position:absolute;top:50%;left:50%;z-index:100;transform:translate(-50%,-50%);font-size:12px;border-radius:4px;padding:5px 10px;transition:all .3s ease-in-out;overflow:hidden;pointer-events:none;background-color:hsl(var(--tp-accent));color:hsl(var(--tp-accent-foreground))}.twist-aplayer__miniswitcher{display:none;position:absolute;top:0;right:0;bottom:0;height:100%;background:hsl(var(--tp-accent));width:18px;border-radius:0 2px 2px 0}.twist-aplayer__miniswitcher .twist-aplayer-icon{height:100%;width:100%;transform:rotateY(180deg);transition:all .3s ease}.twist-aplayer__miniswitcher .twist-aplayer-icon path{fill:hsl(var(--tp-muted-foreground))}.twist-aplayer-icon-lrc-inactivity svg{opacity:.4}.twist-aplayer-icon-loading{display:none}.twist-aplayer-icon-loading svg{position:absolute;top:1px;left:1px;width:8px;height:8px;animation:rotate 1s linear infinite}.twist-aplayer-icon-loading svg path{fill:hsl(var(--tp-background))}.twist-aplayer-icon-back,.twist-aplayer-icon-forward,.twist-aplayer-icon-lrc,.twist-aplayer-icon-order,.twist-aplayer-icon-play{display:none}.twist-aplayer--border{border:1px solid var(--tp-user-border)}.twist-aplayer.twist-aplayer--fixed{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:var(--tp-zIndex);overflow:visible;max-width:var(--tp-max-width);box-shadow:none;max-width:400px}.twist-aplayer.twist-aplayer--fixed .twist-aplayer__body{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:99;padding-right:18px;transition:all .3s ease;max-width:400px}.twist-aplayer.twist-aplayer--fixed .twist-aplayer__info{transform:scaleX(1);transform-origin:0 0;transition:all .3s ease;border-bottom:none;border-top:1px solid hsl(var(--tp-border))}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-list{margin-bottom:65px;border:1px solid hsl(var(--tp-border));border-bottom:none}.twist-aplayer.twist-aplayer--fixed .twist-aplayer__music{width:calc(100% - 105px)}.twist-aplayer.twist-aplayer--fixed .twist-aplayer.twist-aplayer--border.twist-aplayer--list-folded .twist-aplayer__info,.twist-aplayer.twist-aplayer--fixed .twist-aplayer--list-folded .twist-aplayer__info{border-top:none}.twist-aplayer.twist-aplayer--fixed .twist-aplayer--border.twist-aplayer--list-folded .twist-aplayer__info,.twist-aplayer.twist-aplayer--fixed .twist-aplayer--list-folded .twist-aplayer__info{border-bottom:none}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-lrc{display:block;position:fixed;bottom:10px;left:0;right:0;margin:0;z-index:98;pointer-events:none;text-shadow:-1px -1px 0 #fff}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-lrc:after,.twist-aplayer.twist-aplayer--fixed .twist-aplayer-lrc:before{display:none}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-lrc.twist-aplayer-lrc--hide{display:none}.twist-aplayer.twist-aplayer--fixed .twist-aplayer__miniswitcher{display:block}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-list--hide.twist-aplayer-list{border-top:none}.twist-aplayer.twist-aplayer--fixed.twist-aplayer--narrow .twist-aplayer__info,.twist-aplayer.twist-aplayer--fixed.twist-aplayer--narrow .twist-aplayer-list{display:none}.twist-aplayer.twist-aplayer--fixed.twist-aplayer--narrow .twist-aplayer__body,.twist-aplayer.twist-aplayer--fixed.twist-aplayer--narrow .twist-aplayer__pic{width:66px!important;height:66px!important}.twist-aplayer.twist-aplayer--withlist .twist-aplayer-list{display:block}.twist-aplayer.twist-aplayer--withlist .twist-aplayer__info{border-bottom:1px solid hsl(var(--tp-border))}.twist-aplayer.twist-aplayer--withlrc .twist-aplayer__info{margin-left:90px;height:90px;padding:10px 7px 0}.twist-aplayer.twist-aplayer--withlrc .twist-aplayer__pic{width:90px;height:90px}.twist-aplayer.twist-aplayer--withlrc .twist-aplayer-lrc,.twist-aplayer--loading .twist-aplayer-icon-loading{display:block}.twist-aplayer--normal.twist-aplayer--border.twist-aplayer--list-folded .twist-aplayer__info,.twist-aplayer--withlist.twist-aplayer--list-folded .twist-aplayer__info{border-bottom:none}
|
|
1
|
+
.twist-aplayer-icon{width:var(--tp-icon-width);height:var(--tp-icon-width);border:none;background-color:transparent;outline:none;cursor:pointer;opacity:.8;vertical-align:middle;padding:0;font-size:var(--tp-icon-font-size);margin:0;display:inline-block}.twist-aplayer-icon path{transition:all var(--tp-icon-transition-timing) var(--tp-icon-transition-function)}.twist-aplayer .twist-aplayer-icon-lrc-inactivity svg{opacity:.4}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-right{display:flex;justify-content:center;align-items:center}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-back,.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-forward,.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-lrc,.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-play{display:inline-block}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-back,.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-forward,.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-menu,.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-play{position:absolute;bottom:27px;width:20px;height:20px;font-size:20px}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-back{right:75px}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-play{right:50px}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-forward{right:25px}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-icon-menu{right:0%}.twist-aplayer--withlist .twist-aplayer-icon-order,.twist-aplayer--withlist .twist-aplayer-icon-menu{display:inline}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.twist-aplayer-bar{margin:0 0 0 5px;padding:4px 0;cursor:pointer!important;flex:1;transition:all .2s ease-in-out}.twist-aplayer-bar-vars{--tp-bar-width: 100%;--tp-bar-height: 2px;--tp-bar-background: hsl(var(--tp-primary) / .2);--tp-bar-played-background: hsl(var(--tp-accent-foreground));--tp-bar-loaded-background: hsl(var(--tp-secondary));--tp-bar-loaded-transition-timing: .5s;--tp-bar-loaded-transition-function: ease;--tp-bar-thumb-width: 10px;--tp-bar-thumb-height: 10px;--tp-bar-thumb-margin-top: -4px;--tp-bar-thumb-margin-right: -10px;--tp-bar-thumb-transition-function: ease-in-out;--tp-bar-thumb-transition-timing: .3s;--tp-bar-thumb-hover-scale: 1;--tp-bar-thumb-border-radius: 50%;--tp-bar-thumb-background: hsl(var(--tp-foreground))}.twist-aplayer-bar__inner{position:relative;width:var(--tp-bar-width);height:var(--tp-bar-height);background:var(--tp-bar-background)}.twist-aplayer-bar__loaded{position:absolute;left:0;top:0;bottom:0;height:var(--tp-bar-height);background:var(--tp-bar-loaded-background);transition:all var(--tp-bar-loaded-transition-timing) var(--tp-bar-loaded-transition-function)}.twist-aplayer-bar__played{position:absolute;left:0;top:0;bottom:0;height:var(--tp-bar-height);background-color:var(--tp-bar-played-background)}.twist-aplayer-bar__thumb{position:absolute;top:0;right:5px;margin-top:var(--tp-bar-thumb-margin-top);margin-right:var(--tp-bar-thumb-margin-right);width:var(--tp-bar-thumb-width);height:var(--tp-bar-thumb-height);border-radius:var(--tp-bar-thumb-border-radius);cursor:pointer;background-color:var(--tp-bar-thumb-background);transition:all var(--tp-bar-thumb-transition-timing) var(--tp-bar-thumb-transition-function);transform:scale(0);-webkit-transform:scale(0)}.twist-aplayer-bar:hover .twist-aplayer-bar__thumb{transform:scale(var(--tp-bar-thumb-hover-scale));-webkit-transform:scale(var(--tp-bar-thumb-hover-scale))}.twist-aplayer-volumn{position:relative;display:inline-block;margin-left:3px;cursor:pointer!important}.twist-aplayer-volumn-vars{--tp-volume-bar-background: hsl(var(--tp-primary) / .3);--tp-volume-bar-width: 5px;--tp-volume-bar-height: 35px;--tp-volume-bar-border-radius: 2.5px;--tp-volume-thumb-width: 5px;--tp-volume-thumb-background: hsl(var(--tp-primary));--tp-volume-thumb-transition-function: ease;--tp-volume-bar-wrap-transition-function: ease-in-out;--tp-volume-bar-wrap-timing: .2s;--tp-volume-thumb-timing: .1s}.twist-aplayer-volumn__bar-wrap{position:absolute;bottom:15px;right:-3px;width:25px;height:0;z-index:99;overflow:hidden;transition:all var(--tp-volume-bar-wrap-timing) var(--tp-volume-bar-wrap-transition-function)}.twist-aplayer-volumn:hover .twist-aplayer-volumn__bar-wrap,.twist-aplayer-volumn__bar-wrap--active{height:40px}.twist-aplayer-volumn__bar{position:absolute;bottom:0;right:10px;width:var(--tp-volume-bar-width);height:var(--tp-volume-bar-height);background:var(--tp-volume-bar-background);border-radius:var(--tp-volume-bar-border-radius);overflow:hidden}.twist-aplayer-volumn__thumb{position:absolute;bottom:0;right:0;width:var(--tp-volume-thumb-width);background-color:var(--tp-volume-thumb-background);transition:all var(--tp-volume-thumb-timing) var(--tp-volume-thumb-transition-function)}.twist-aplayer-list{overflow:auto;transition:all .5s ease;will-change:height;display:none;background-color:hsl(var(--tp-background));overflow:hidden}.twist-aplayer-list-vars{--tp-list-scrollbar-thumb-color: #8884;--tp-list-scrollbar-thumb-hover-color: hsl(var(--tp-muted-foreground) / .6)}.twist-aplayer-list--hide{max-height:0!important}.twist-aplayer-list ol{list-style-type:none;margin:0;padding:0;overflow-y:auto}.twist-aplayer-list ol li{position:relative;height:32px;line-height:32px;padding:0 15px;font-size:12px;border-top:1px solid hsl(var(--tp-border));cursor:pointer;transition:all .2s ease;overflow:hidden;margin:0;background-color:hsl(var(--tp-background))}.twist-aplayer-list ol li.twist-aplayer-list--active{background-color:hsl(var(--tp-secondary))}.twist-aplayer-list ol li:first-child{border:none}.twist-aplayer-list ol li:hover{background-color:hsl(var(--tp-secondary)/.8)}.twist-aplayer-list ol::-webkit-scrollbar{width:5px}.twist-aplayer-list ol::-webkit-scrollbar-thumb{border-radius:3px;background-color:var(--tp-list-scrollbar-thumb-color)}.twist-aplayer-list ol::-webkit-scrollbar-thumb:hover{background-color:var(--tp-list-scrollbar-thumb-hover-color)}.twist-aplayer-list__cur{display:none;width:3px;height:22px;position:absolute;left:0;top:5px;cursor:pointer;background-color:hsl(var(--tp-accent-foreground))}.twist-aplayer-list--active .twist-aplayer-list__cur{display:inline-block}.twist-aplayer-list__index{color:hsl(var(--tp-muted-foreground));margin-right:12px;cursor:pointer}.twist-aplayer-list__title{color:hsl(var(--tp-secondary-foreground))}.twist-aplayer-list__author{color:hsl(var(--tp-muted-foreground));float:right;cursor:pointer}.twist-aplayer-lrc{display:none;position:relative;height:30px;text-align:center;overflow:hidden;margin:-10px 0 7px}.twist-aplayer-lrc:after,.twist-aplayer-lrc:before{content:" ";position:absolute;z-index:1;display:block;overflow:hidden;width:100%}.twist-aplayer-lrc:before{top:0;height:10%;background:linear-gradient(180deg,hsl(var(--tp-background)) 0,#fff0);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#00ffffff",GradientType=0)}.twist-aplayer-lrc:after{bottom:0;height:33%;background:linear-gradient(180deg,#fff0 0,hsl(var(--tp-background)));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ffffff",endColorstr="#ccffffff",GradientType=0)}.twist-aplayer-lrc p{font-size:12px;color:hsl(var(--tp-secondary-foreground));line-height:16px!important;height:16px!important;padding:0!important;margin:0!important;transition:all .5s ease-out;opacity:.4;overflow:hidden;text-shadow:none}.twist-aplayer-lrc__contents{width:100%;transition:all .5s ease-out;-webkit-user-select:text;-moz-user-select:text;user-select:text;cursor:default}.twist-aplayer-lrc p.twist-aplayer-lrc__current{opacity:1;overflow:visible;height:auto!important;min-height:16px}.twist-aplayer-lrc.twist-aplayer-lrc--hide{display:none}.twist-aplayer-light{--tp-background: 0 0% 100%;--tp-foreground: 240 10% 3.9%;--tp-card: 0 0% 100%;--tp-card-foreground: 240 10% 3.9%;--tp-primary: 240 5.9% 10%;--tp-primary-foreground: 0 0% 98%;--tp-secondary: 240 4.8% 95.9%;--tp-secondary-foreground: 240 5.9% 10%;--tp-muted: 240 4.8% 95.9%;--tp-muted-foreground: 240 3.8% 46.1%;--tp-accent: 240 4.8% 95.9%;--tp-accent-foreground: 240 5.9% 10%;--tp-border: 240 5.9% 90%}.twist-aplayer-dark{--tp-background: 240 10% 3.9%;--tp-foreground: 0 0% 98%;--tp-card: 240 10% 3.9%;--tp-card-foreground: 0 0% 98%;--tp-primary: 0 0% 98%;--tp-primary-foreground: 240 5.9% 10%;--tp-secondary: 240 3.7% 15.9%;--tp-secondary-foreground: 0 0% 98%;--tp-muted: 240 3.7% 15.9%;--tp-muted-foreground: 240 5% 64.9%;--tp-accent: 240 3.7% 15.9%;--tp-accent-foreground: 0 0% 98%;--tp-border: 240 3.7% 15.9%}.twist-aplayer-vars{--tp-icon-width: 15px;--tp-icon-height: 15px;--tp-icon-font-size: 15px;--tp-icon-transition-function: ease-in-out;--tp-icon-transition-timing: .2s;--tp-max-width: 400px;--tp-zIndex: 99;--tp-pic-width: 66px;--tp-height: 66px;--tp-mini-switcher-width: 18px;--tp-mini-switcher-height: var(--tp-height);--tp-pic-transition-function: ease;--tp-pic-transition-timing: .3s;--tp-pic-zIndex: 99;--tp-button-background: rgba(0, 0, 0, .2);--tp-box-shadow: 0 0 #0000, 0 0 #0000, 0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tp-user-border: hsl(var(--tp-border) / .3);--tp-mini-switcher-border: 0 2px 2px 0;--tp-lrc-zIndex: 98}.twist-aplayer{font-family:Arial,Helvetica,sans-serif;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:normal;border-radius:2px;margin:5px;box-shadow:var(--tp-box-shadow);overflow:hidden}.twist-aplayer *{box-sizing:content-box}.twist-aplayer__body{background-color:hsl(var(--tp-background));overflow:hidden}.twist-aplayer__pic{position:relative;float:left;z-index:var(--tp-pic-zIndex);width:var(--tp-pic-width);height:var(--tp-height);background-size:cover;background-position:50%;transition:all var(--tp-pic-transition-timing) var(--tp-pic-transition-function);cursor:pointer}.twist-aplayer__button{position:absolute;border-radius:50%;opacity:.8;text-shadow:0 1px 1px rgba(0,0,0,.2);box-shadow:0 1px 1px #0003;background:hsl(var(--tp-primary-foreground));transition:all .1s ease}.twist-aplayer--play{width:28px;height:28px;bottom:50%;right:50%;margin:0 -15px -15px 0}.twist-aplayer--play svg{position:absolute;top:4px;left:5px;height:20px;width:20px}.twist-aplayer--pause{font-size:12px;width:18px;height:18px;bottom:4px;right:4px}.twist-aplayer--pause svg{position:absolute;top:3px;left:3px;height:12px;width:12px}.twist-aplayer--play path,.twist-aplayer--pause path{fill:hsl(var(--tp-accent-foreground))}.twist-aplayer__info{margin-left:66px;padding:14px 7px 0 10px;height:var(--tp-height);box-sizing:border-box}.twist-aplayer__music{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 0 13px 5px;-webkit-user-select:text;-moz-user-select:text;user-select:text;cursor:default;padding-bottom:2px;height:20px}.twist-aplayer__title{color:hsl(var(--tp-secondary-foreground));font-size:14px}.twist-aplayer__author{font-size:12px;color:hsl(var(--tp-muted-foreground))}.twist-aplayer__author>a{color:inherit;text-decoration:none}.twist-aplayer-controller{position:relative;display:flex}.twist-aplayer-controller__time{position:relative;right:0;bottom:4px;height:17px;font-size:11px;padding-left:7px}.twist-aplayer-controller__time-inner{color:hsl(var(--tp-muted-foreground));vertical-align:middle}.twist-aplayer-controller__time .twist-aplayer-icon{cursor:pointer;transition:all .2s ease}.twist-aplayer-controller__time .twist-aplayer-icon path{fill:hsl(var(--tp-muted-foreground))}.twist-aplayer-controller__time .twist-aplayer-icon:hover path{fill:hsl(var(--tp-primary))}.twist-aplayer__notice{opacity:0;position:absolute;top:50%;left:50%;z-index:100;transform:translate(-50%,-50%);font-size:12px;border-radius:4px;padding:5px 10px;transition:all .3s ease-in-out;overflow:hidden;pointer-events:none;background-color:hsl(var(--tp-accent));color:hsl(var(--tp-accent-foreground))}.twist-aplayer__miniswitcher{display:none;position:absolute;top:0;right:0;bottom:0;height:100%;background:hsl(var(--tp-accent));width:18px;border-radius:var(--tp-mini-switcher-border)}.twist-aplayer__miniswitcher .twist-aplayer-icon{height:100%;width:100%;transition:all .3s ease}.twist-aplayer__miniswitcher .twist-aplayer-icon path{fill:hsl(var(--tp-muted-foreground))}.twist-aplayer__super-miniswitcher{display:none;position:fixed;left:0;bottom:0;width:var(--tp-mini-switcher-width);height:var(--tp-mini-switcher-height);background:hsl(var(--tp-accent));border-radius:var(--tp-mini-switcher-border)}.twist-aplayer__super-miniswitcher .twist-aplayer-icon{height:100%;width:100%;transition:all .3s ease}.twist-aplayer__super-miniswitcher .twist-aplayer-icon path{fill:hsl(var(--tp-muted-foreground))}.twist-aplayer-icon-lrc-inactivity svg{opacity:.4}.twist-aplayer-icon-loading{display:none}.twist-aplayer-icon-loading svg{position:absolute;top:1px;left:1px;width:8px;height:8px;animation:rotate 1s linear infinite}.twist-aplayer-icon-loading svg path{fill:hsl(var(--tp-background))}.twist-aplayer-icon-back,.twist-aplayer-icon-forward,.twist-aplayer-icon-lrc,.twist-aplayer-icon-order,.twist-aplayer-icon-play{display:none}.twist-aplayer--border{border:1px solid var(--tp-user-border)}.twist-aplayer.twist-aplayer--fixed{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:var(--tp-zIndex);overflow:visible;max-width:var(--tp-max-width);box-shadow:none;max-width:400px}.twist-aplayer.twist-aplayer--fixed .twist-aplayer__body{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:var(--tp-zIndex);padding-right:18px;transition:all .3s ease;max-width:400px}.twist-aplayer.twist-aplayer--fixed .twist-aplayer__info{transform:scaleX(1);transform-origin:0 0;transition:all .3s ease;border-bottom:none;border-top:1px solid hsl(var(--tp-border))}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-list{margin-bottom:65px;border:1px solid hsl(var(--tp-border));border-bottom:none}.twist-aplayer.twist-aplayer--fixed .twist-aplayer__music{width:calc(100% - 105px)}.twist-aplayer.twist-aplayer--fixed .twist-aplayer.twist-aplayer--border.twist-aplayer--list-collapsed .twist-aplayer__info,.twist-aplayer.twist-aplayer--fixed .twist-aplayer--list-collapsed .twist-aplayer__info{border-top:none}.twist-aplayer.twist-aplayer--fixed .twist-aplayer--border.twist-aplayer--list-collapsed .twist-aplayer__info,.twist-aplayer.twist-aplayer--fixed .twist-aplayer--list-collapsed .twist-aplayer__info{border-bottom:none}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-lrc{display:block;position:fixed;bottom:10px;left:0;right:0;margin:0;z-index:var(--tp-lrc-zIndex);pointer-events:none;text-shadow:-1px -1px 0 #fff}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-lrc:after,.twist-aplayer.twist-aplayer--fixed .twist-aplayer-lrc:before{display:none}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-lrc.twist-aplayer-lrc--hide{display:none}.twist-aplayer.twist-aplayer--fixed .twist-aplayer-list--hide.twist-aplayer-list{border-top:none}.twist-aplayer.twist-aplayer--fixed.twist-aplayer--mini .twist-aplayer__miniswitcher{display:block}.twist-aplayer.twist-aplayer--fixed.twist-aplayer--mini .twist-aplayer__super-miniswitcher,.twist-aplayer.twist-aplayer--fixed.twist-aplayer--mini-collapsed .twist-aplayer__info,.twist-aplayer.twist-aplayer--fixed.twist-aplayer--mini-collapsed .twist-aplayer-list{display:none}.twist-aplayer.twist-aplayer--fixed.twist-aplayer--mini-collapsed .twist-aplayer__body,.twist-aplayer.twist-aplayer--fixed.twist-aplayer--mini-collapsed .twist-aplayer__pic{width:66px!important;height:66px!important}.twist-aplayer.twist-aplayer--fixed.twist-aplayer--mini-expanded .twist-aplayer__miniswitcher .twist-aplayer-icon{transform:rotateY(180deg)}.twist-aplayer.twist-aplayer--fixed.twist-aplayer--super-mini .twist-aplayer__miniswitcher{display:none}.twist-aplayer.twist-aplayer--fixed.twist-aplayer--super-mini .twist-aplayer__super-miniswitcher{display:block}.twist-aplayer.twist-aplayer--fixed.twist-aplayer--super-mini-collapsed .twist-aplayer__info,.twist-aplayer.twist-aplayer--fixed.twist-aplayer--super-mini-collapsed .twist-aplayer-list,.twist-aplayer.twist-aplayer--fixed.twist-aplayer--super-mini-collapsed .twist-aplayer__pic{display:none}.twist-aplayer.twist-aplayer--fixed.twist-aplayer--super-mini-expanded .twist-aplayer__super-miniswitcher{position:absolute;top:auto;left:auto;right:0;bottom:0}.twist-aplayer.twist-aplayer--fixed.twist-aplayer--super-mini-expanded .twist-aplayer__super-miniswitcher .twist-aplayer-icon{height:100%;width:100%;transform:rotateY(180deg)}.twist-aplayer.twist-aplayer--withlist .twist-aplayer-list{display:block}.twist-aplayer.twist-aplayer--withlist .twist-aplayer__info{border-bottom:1px solid hsl(var(--tp-border))}.twist-aplayer.twist-aplayer--withlrc .twist-aplayer__info{margin-left:90px;height:90px;padding:10px 7px 0}.twist-aplayer.twist-aplayer--withlrc .twist-aplayer__pic{width:90px;height:90px}.twist-aplayer--loading .twist-aplayer-icon-loading{display:block}.twist-aplayer--normal.twist-aplayer--border.twist-aplayer--list-collapsed .twist-aplayer__info,.twist-aplayer--withlist.twist-aplayer--list-collapsed .twist-aplayer__info{border-bottom:none}@keyframes slideUp{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}
|