(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const f of o.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();var Uu={exports:{}},gs={},Hu={exports:{}},Q={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Xr=Symbol.for("react.element"),Yp=Symbol.for("react.portal"),Xp=Symbol.for("react.fragment"),Zp=Symbol.for("react.strict_mode"),Jp=Symbol.for("react.profiler"),em=Symbol.for("react.provider"),tm=Symbol.for("react.context"),nm=Symbol.for("react.forward_ref"),rm=Symbol.for("react.suspense"),im=Symbol.for("react.memo"),sm=Symbol.for("react.lazy"),Lc=Symbol.iterator;function am(e){return e===null||typeof e!="object"?null:(e=Lc&&e[Lc]||e["@@iterator"],typeof e=="function"?e:null)}var Bu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qu=Object.assign,$u={};function Jn(e,t,n){this.props=e,this.context=t,this.refs=$u,this.updater=n||Bu}Jn.prototype.isReactComponent={};Jn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Jn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Vu(){}Vu.prototype=Jn.prototype;function Ml(e,t,n){this.props=e,this.context=t,this.refs=$u,this.updater=n||Bu}var zl=Ml.prototype=new Vu;zl.constructor=Ml;qu(zl,Jn.prototype);zl.isPureReactComponent=!0;var Tc=Array.isArray,Qu=Object.prototype.hasOwnProperty,Al={current:null},Wu={key:!0,ref:!0,__self:!0,__source:!0};function Gu(e,t,n){var r,a={},o=null,f=null;if(t!=null)for(r in t.ref!==void 0&&(f=t.ref),t.key!==void 0&&(o=""+t.key),t)Qu.call(t,r)&&!Wu.hasOwnProperty(r)&&(a[r]=t[r]);var p=arguments.length-2;if(p===1)a.children=n;else if(1>>1,G=A[Z];if(0>>1;Za(j,q))ata(je,j)?(A[Z]=je,A[at]=q,Z=at):(A[Z]=j,A[Ze]=q,Z=Ze);else if(ata(je,q))A[Z]=je,A[at]=q,Z=at;else break e}}return H}function a(A,H){var q=A.sortIndex-H.sortIndex;return q!==0?q:A.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var f=Date,p=f.now();e.unstable_now=function(){return f.now()-p}}var h=[],g=[],E=1,N=null,b=3,P=!1,I=!1,M=!1,Y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(A){for(var H=n(g);H!==null;){if(H.callback===null)r(g);else if(H.startTime<=A)r(g),H.sortIndex=H.expirationTime,t(h,H);else break;H=n(g)}}function _(A){if(M=!1,w(A),!I)if(n(h)!==null)I=!0,tn(z);else{var H=n(g);H!==null&&Tt(_,H.startTime-A)}}function z(A,H){I=!1,M&&(M=!1,x(F),F=-1),P=!0;var q=b;try{for(w(H),N=n(h);N!==null&&(!(N.expirationTime>H)||A&&!fe());){var Z=N.callback;if(typeof Z=="function"){N.callback=null,b=N.priorityLevel;var G=Z(N.expirationTime<=H);H=e.unstable_now(),typeof G=="function"?N.callback=G:N===n(h)&&r(h),w(H)}else r(h);N=n(h)}if(N!==null)var we=!0;else{var Ze=n(g);Ze!==null&&Tt(_,Ze.startTime-H),we=!1}return we}finally{N=null,b=q,P=!1}}var D=!1,O=null,F=-1,te=5,$=-1;function fe(){return!(e.unstable_now()-$A||125Z?(A.sortIndex=q,t(g,A),n(h)===null&&A===n(g)&&(M?(x(F),F=-1):M=!0,Tt(_,q-Z))):(A.sortIndex=G,t(h,A),I||P||(I=!0,tn(z))),A},e.unstable_shouldYield=fe,e.unstable_wrapCallback=function(A){var H=b;return function(){var q=b;b=H;try{return A.apply(this,arguments)}finally{b=q}}}})(Ju);Zu.exports=Ju;var gm=Zu.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ym=Mr,He=gm;function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Da=Object.prototype.hasOwnProperty,xm=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ic={},Mc={};function wm(e){return Da.call(Mc,e)?!0:Da.call(Ic,e)?!1:xm.test(e)?Mc[e]=!0:(Ic[e]=!0,!1)}function jm(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function km(e,t,n,r){if(t===null||typeof t>"u"||jm(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Le(e,t,n,r,a,o,f){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=f}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new Le(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new Le(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new Le(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new Le(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xe[e]=new Le(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new Le(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xe[e]=new Le(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xe[e]=new Le(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xe[e]=new Le(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ol=/[\-:]([a-z])/g;function Dl(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ol,Dl);xe[t]=new Le(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ol,Dl);xe[t]=new Le(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ol,Dl);xe[t]=new Le(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new Le(e,1,!1,e.toLowerCase(),null,!1,!1)});xe.xlinkHref=new Le("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xe[e]=new Le(e,1,!1,e.toLowerCase(),null,!0,!0)});function Fl(e,t,n,r){var a=xe.hasOwnProperty(t)?xe[t]:null;(a!==null?a.type!==0:r||!(2p||a[f]!==o[p]){var h=` `+a[f].replace(" at new "," at ");return e.displayName&&h.includes("")&&(h=h.replace("",e.displayName)),h}while(1<=f&&0<=p);break}}}finally{da=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?wr(e):""}function bm(e){switch(e.tag){case 5:return wr(e.type);case 16:return wr("Lazy");case 13:return wr("Suspense");case 19:return wr("SuspenseList");case 0:case 2:case 15:return e=fa(e.type,!1),e;case 11:return e=fa(e.type.render,!1),e;case 1:return e=fa(e.type,!0),e;default:return""}}function Ba(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _n:return"Fragment";case Cn:return"Portal";case Fa:return"Profiler";case Ul:return"StrictMode";case Ua:return"Suspense";case Ha:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case nd:return(e.displayName||"Context")+".Consumer";case td:return(e._context.displayName||"Context")+".Provider";case Hl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bl:return t=e.displayName||null,t!==null?t:Ba(e.type)||"Memo";case zt:t=e._payload,e=e._init;try{return Ba(e(t))}catch{}}return null}function Nm(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ba(t);case 8:return t===Ul?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Yt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function id(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Sm(e){var t=id(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(f){r=""+f,o.call(this,f)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(f){r=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xi(e){e._valueTracker||(e._valueTracker=Sm(e))}function sd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=id(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Wi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function qa(e,t){var n=t.checked;return se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ac(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Yt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ad(e,t){t=t.checked,t!=null&&Fl(e,"checked",t,!1)}function $a(e,t){ad(e,t);var n=Yt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Va(e,t.type,n):t.hasOwnProperty("defaultValue")&&Va(e,t.type,Yt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Rc(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Va(e,t,n){(t!=="number"||Wi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var jr=Array.isArray;function Fn(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=wi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ar(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Nr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Em=["Webkit","ms","Moz","O"];Object.keys(Nr).forEach(function(e){Em.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Nr[t]=Nr[e]})});function ud(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Nr.hasOwnProperty(e)&&Nr[e]?(""+t).trim():t+"px"}function dd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,a=ud(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}var Cm=se({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ga(e,t){if(t){if(Cm[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function Ka(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ya=null;function ql(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xa=null,Un=null,Hn=null;function Fc(e){if(e=ei(e)){if(typeof Xa!="function")throw Error(L(280));var t=e.stateNode;t&&(t=ks(t),Xa(e.stateNode,e.type,t))}}function fd(e){Un?Hn?Hn.push(e):Hn=[e]:Un=e}function pd(){if(Un){var e=Un,t=Hn;if(Hn=Un=null,Fc(e),t)for(e=0;e>>=0,e===0?32:31-(Dm(e)/Fm|0)|0}var ji=64,ki=4194304;function kr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Xi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,a=e.suspendedLanes,o=e.pingedLanes,f=n&268435455;if(f!==0){var p=f&~a;p!==0?r=kr(p):(o&=f,o!==0&&(r=kr(o)))}else f=n&~a,f!==0?r=kr(f):o!==0&&(r=kr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&a)&&(a=r&-r,o=t&-t,a>=o||a===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Zr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-rt(t),e[t]=n}function qm(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Er),Gc=" ",Kc=!1;function Md(e,t){switch(e){case"keyup":return gh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ln=!1;function xh(e,t){switch(e){case"compositionend":return zd(t);case"keypress":return t.which!==32?null:(Kc=!0,Gc);case"textInput":return e=t.data,e===Gc&&Kc?null:e;default:return null}}function wh(e,t){if(Ln)return e==="compositionend"||!Xl&&Md(e,t)?(e=Pd(),Oi=Gl=Ft=null,Ln=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Jc(n)}}function Dd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fd(){for(var e=window,t=Wi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wi(e.document)}return t}function Zl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Lh(e){var t=Fd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Dd(n.ownerDocument.documentElement,n)){if(r!==null&&Zl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=n.textContent.length,o=Math.min(r.start,a);r=r.end===void 0?o:Math.min(r.end,a),!e.extend&&o>r&&(a=r,r=o,o=a),a=eu(n,o);var f=eu(n,r);a&&f&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==f.node||e.focusOffset!==f.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(f.node,f.offset)):(t.setEnd(f.node,f.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Tn=null,rl=null,_r=null,il=!1;function tu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;il||Tn==null||Tn!==Wi(r)||(r=Tn,"selectionStart"in r&&Zl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),_r&&Hr(_r,r)||(_r=r,r=es(rl,"onSelect"),0Mn||(e.current=ul[Mn],ul[Mn]=null,Mn--)}function X(e,t){Mn++,ul[Mn]=e.current,e.current=t}var Xt={},Se=Jt(Xt),Ae=Jt(!1),mn=Xt;function Wn(e,t){var n=e.type.contextTypes;if(!n)return Xt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a={},o;for(o in n)a[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Re(e){return e=e.childContextTypes,e!=null}function ns(){ee(Ae),ee(Se)}function ou(e,t,n){if(Se.current!==Xt)throw Error(L(168));X(Se,t),X(Ae,n)}function Gd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var a in r)if(!(a in t))throw Error(L(108,Nm(e)||"Unknown",a));return se({},n,r)}function rs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Xt,mn=Se.current,X(Se,e),X(Ae,Ae.current),!0}function cu(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=Gd(e,t,mn),r.__reactInternalMemoizedMergedChildContext=e,ee(Ae),ee(Se),X(Se,e)):ee(Ae),X(Ae,n)}var xt=null,bs=!1,Ea=!1;function Kd(e){xt===null?xt=[e]:xt.push(e)}function Hh(e){bs=!0,Kd(e)}function en(){if(!Ea&&xt!==null){Ea=!0;var e=0,t=K;try{var n=xt;for(K=1;e>=f,a-=f,wt=1<<32-rt(t)+a|n<F?(te=O,O=null):te=O.sibling;var $=b(x,O,w[F],_);if($===null){O===null&&(O=te);break}e&&O&&$.alternate===null&&t(x,O),v=o($,v,F),D===null?z=$:D.sibling=$,D=$,O=te}if(F===w.length)return n(x,O),ne&&ln(x,F),z;if(O===null){for(;FF?(te=O,O=null):te=O.sibling;var fe=b(x,O,$.value,_);if(fe===null){O===null&&(O=te);break}e&&O&&fe.alternate===null&&t(x,O),v=o(fe,v,F),D===null?z=fe:D.sibling=fe,D=fe,O=te}if($.done)return n(x,O),ne&&ln(x,F),z;if(O===null){for(;!$.done;F++,$=w.next())$=N(x,$.value,_),$!==null&&(v=o($,v,F),D===null?z=$:D.sibling=$,D=$);return ne&&ln(x,F),z}for(O=r(x,O);!$.done;F++,$=w.next())$=P(O,x,F,$.value,_),$!==null&&(e&&$.alternate!==null&&O.delete($.key===null?F:$.key),v=o($,v,F),D===null?z=$:D.sibling=$,D=$);return e&&O.forEach(function(_t){return t(x,_t)}),ne&&ln(x,F),z}function Y(x,v,w,_){if(typeof w=="object"&&w!==null&&w.type===_n&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case yi:e:{for(var z=w.key,D=v;D!==null;){if(D.key===z){if(z=w.type,z===_n){if(D.tag===7){n(x,D.sibling),v=a(D,w.props.children),v.return=x,x=v;break e}}else if(D.elementType===z||typeof z=="object"&&z!==null&&z.$$typeof===zt&&fu(z)===D.type){n(x,D.sibling),v=a(D,w.props),v.ref=vr(x,D,w),v.return=x,x=v;break e}n(x,D);break}else t(x,D);D=D.sibling}w.type===_n?(v=pn(w.props.children,x.mode,_,w.key),v.return=x,x=v):(_=Vi(w.type,w.key,w.props,null,x.mode,_),_.ref=vr(x,v,w),_.return=x,x=_)}return f(x);case Cn:e:{for(D=w.key;v!==null;){if(v.key===D)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(x,v.sibling),v=a(v,w.children||[]),v.return=x,x=v;break e}else{n(x,v);break}else t(x,v);v=v.sibling}v=za(w,x.mode,_),v.return=x,x=v}return f(x);case zt:return D=w._init,Y(x,v,D(w._payload),_)}if(jr(w))return I(x,v,w,_);if(dr(w))return M(x,v,w,_);Li(x,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(x,v.sibling),v=a(v,w),v.return=x,x=v):(n(x,v),v=Ma(w,x.mode,_),v.return=x,x=v),f(x)):n(x,v)}return Y}var Kn=Jd(!0),ef=Jd(!1),as=Jt(null),ls=null,Rn=null,no=null;function ro(){no=Rn=ls=null}function io(e){var t=as.current;ee(as),e._currentValue=t}function pl(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function qn(e,t){ls=e,no=Rn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ze=!0),e.firstContext=null)}function Ye(e){var t=e._currentValue;if(no!==e)if(e={context:e,memoizedValue:t,next:null},Rn===null){if(ls===null)throw Error(L(308));Rn=e,ls.dependencies={lanes:0,firstContext:e}}else Rn=Rn.next=e;return t}var un=null;function so(e){un===null?un=[e]:un.push(e)}function tf(e,t,n,r){var a=t.interleaved;return a===null?(n.next=n,so(t)):(n.next=a.next,a.next=n),t.interleaved=n,St(e,r)}function St(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var At=!1;function ao(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function kt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Vt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,W&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,St(e,n)}return a=r.interleaved,a===null?(t.next=t,so(r)):(t.next=a.next,a.next=t),r.interleaved=t,St(e,n)}function Fi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vl(e,n)}}function pu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var f={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?a=o=f:o=o.next=f,n=n.next}while(n!==null);o===null?a=o=t:o=o.next=t}else a=o=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function os(e,t,n,r){var a=e.updateQueue;At=!1;var o=a.firstBaseUpdate,f=a.lastBaseUpdate,p=a.shared.pending;if(p!==null){a.shared.pending=null;var h=p,g=h.next;h.next=null,f===null?o=g:f.next=g,f=h;var E=e.alternate;E!==null&&(E=E.updateQueue,p=E.lastBaseUpdate,p!==f&&(p===null?E.firstBaseUpdate=g:p.next=g,E.lastBaseUpdate=h))}if(o!==null){var N=a.baseState;f=0,E=g=h=null,p=o;do{var b=p.lane,P=p.eventTime;if((r&b)===b){E!==null&&(E=E.next={eventTime:P,lane:0,tag:p.tag,payload:p.payload,callback:p.callback,next:null});e:{var I=e,M=p;switch(b=t,P=n,M.tag){case 1:if(I=M.payload,typeof I=="function"){N=I.call(P,N,b);break e}N=I;break e;case 3:I.flags=I.flags&-65537|128;case 0:if(I=M.payload,b=typeof I=="function"?I.call(P,N,b):I,b==null)break e;N=se({},N,b);break e;case 2:At=!0}}p.callback!==null&&p.lane!==0&&(e.flags|=64,b=a.effects,b===null?a.effects=[p]:b.push(p))}else P={eventTime:P,lane:b,tag:p.tag,payload:p.payload,callback:p.callback,next:null},E===null?(g=E=P,h=N):E=E.next=P,f|=b;if(p=p.next,p===null){if(p=a.shared.pending,p===null)break;b=p,p=b.next,b.next=null,a.lastBaseUpdate=b,a.shared.pending=null}}while(!0);if(E===null&&(h=N),a.baseState=h,a.firstBaseUpdate=g,a.lastBaseUpdate=E,t=a.shared.interleaved,t!==null){a=t;do f|=a.lane,a=a.next;while(a!==t)}else o===null&&(a.shared.lanes=0);gn|=f,e.lanes=f,e.memoizedState=N}}function mu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=_a.transition;_a.transition={};try{e(!1),t()}finally{K=n,_a.transition=r}}function wf(){return Xe().memoizedState}function Vh(e,t,n){var r=Wt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},jf(e))kf(t,n);else if(n=tf(e,t,n,r),n!==null){var a=Ce();it(n,e,r,a),bf(n,t,r)}}function Qh(e,t,n){var r=Wt(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(jf(e))kf(t,a);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var f=t.lastRenderedState,p=o(f,n);if(a.hasEagerState=!0,a.eagerState=p,st(p,f)){var h=t.interleaved;h===null?(a.next=a,so(t)):(a.next=h.next,h.next=a),t.interleaved=a;return}}catch{}finally{}n=tf(e,t,a,r),n!==null&&(a=Ce(),it(n,e,r,a),bf(n,t,r))}}function jf(e){var t=e.alternate;return e===ie||t!==null&&t===ie}function kf(e,t){Lr=us=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vl(e,n)}}var ds={readContext:Ye,useCallback:ke,useContext:ke,useEffect:ke,useImperativeHandle:ke,useInsertionEffect:ke,useLayoutEffect:ke,useMemo:ke,useReducer:ke,useRef:ke,useState:ke,useDebugValue:ke,useDeferredValue:ke,useTransition:ke,useMutableSource:ke,useSyncExternalStore:ke,useId:ke,unstable_isNewReconciler:!1},Wh={readContext:Ye,useCallback:function(e,t){return ct().memoizedState=[e,t===void 0?null:t],e},useContext:Ye,useEffect:vu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Hi(4194308,4,hf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hi(4,2,e,t)},useMemo:function(e,t){var n=ct();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ct();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Vh.bind(null,ie,e),[r.memoizedState,e]},useRef:function(e){var t=ct();return e={current:e},t.memoizedState=e},useState:hu,useDebugValue:ho,useDeferredValue:function(e){return ct().memoizedState=e},useTransition:function(){var e=hu(!1),t=e[0];return e=$h.bind(null,e[1]),ct().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ie,a=ct();if(ne){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),ve===null)throw Error(L(349));vn&30||lf(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,vu(cf.bind(null,r,o,e),[e]),r.flags|=2048,Kr(9,of.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ct(),t=ve.identifierPrefix;if(ne){var n=jt,r=wt;n=(r&~(1<<32-rt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Wr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=f.createElement(n,{is:r.is}):(e=f.createElement(n),n==="select"&&(f=e,r.multiple?f.multiple=!0:r.size&&(f.size=r.size))):e=f.createElementNS(e,n),e[ut]=t,e[$r]=r,Mf(e,t,!1,!1),t.stateNode=e;e:{switch(f=Ka(n,r),n){case"dialog":J("cancel",e),J("close",e),a=r;break;case"iframe":case"object":case"embed":J("load",e),a=r;break;case"video":case"audio":for(a=0;aZn&&(t.flags|=128,r=!0,gr(o,!1),t.lanes=4194304)}else{if(!r)if(e=cs(f),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),gr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!f.alternate&&!ne)return be(t),null}else 2*le()-o.renderingStartTime>Zn&&n!==1073741824&&(t.flags|=128,r=!0,gr(o,!1),t.lanes=4194304);o.isBackwards?(f.sibling=t.child,t.child=f):(n=o.last,n!==null?n.sibling=f:t.child=f,o.last=f)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=le(),t.sibling=null,n=re.current,X(re,r?n&1|2:n&1),t):(be(t),null);case 22:case 23:return jo(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?De&1073741824&&(be(t),t.subtreeFlags&6&&(t.flags|=8192)):be(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function tv(e,t){switch(eo(t),t.tag){case 1:return Re(t.type)&&ns(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yn(),ee(Ae),ee(Se),co(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return oo(t),null;case 13:if(ee(re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));Gn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ee(re),null;case 4:return Yn(),null;case 10:return io(t.type._context),null;case 22:case 23:return jo(),null;case 24:return null;default:return null}}var Pi=!1,Ne=!1,nv=typeof WeakSet=="function"?WeakSet:Set,R=null;function On(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ae(e,t,r)}else n.current=null}function kl(e,t,n){try{n()}catch(r){ae(e,t,r)}}var Cu=!1;function rv(e,t){if(sl=Zi,e=Fd(),Zl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var f=0,p=-1,h=-1,g=0,E=0,N=e,b=null;t:for(;;){for(var P;N!==n||a!==0&&N.nodeType!==3||(p=f+a),N!==o||r!==0&&N.nodeType!==3||(h=f+r),N.nodeType===3&&(f+=N.nodeValue.length),(P=N.firstChild)!==null;)b=N,N=P;for(;;){if(N===e)break t;if(b===n&&++g===a&&(p=f),b===o&&++E===r&&(h=f),(P=N.nextSibling)!==null)break;N=b,b=N.parentNode}N=P}n=p===-1||h===-1?null:{start:p,end:h}}else n=null}n=n||{start:0,end:0}}else n=null;for(al={focusedElem:e,selectionRange:n},Zi=!1,R=t;R!==null;)if(t=R,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,R=e;else for(;R!==null;){t=R;try{var I=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(I!==null){var M=I.memoizedProps,Y=I.memoizedState,x=t.stateNode,v=x.getSnapshotBeforeUpdate(t.elementType===t.type?M:et(t.type,M),Y);x.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(_){ae(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,R=e;break}R=t.return}return I=Cu,Cu=!1,I}function Tr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,o!==void 0&&kl(t,n,o)}a=a.next}while(a!==r)}}function Es(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function bl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Rf(e){var t=e.alternate;t!==null&&(e.alternate=null,Rf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ut],delete t[$r],delete t[cl],delete t[Fh],delete t[Uh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Of(e){return e.tag===5||e.tag===3||e.tag===4}function _u(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Of(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Nl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ts));else if(r!==4&&(e=e.child,e!==null))for(Nl(e,t,n),e=e.sibling;e!==null;)Nl(e,t,n),e=e.sibling}function Sl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Sl(e,t,n),e=e.sibling;e!==null;)Sl(e,t,n),e=e.sibling}var ge=null,tt=!1;function Mt(e,t,n){for(n=n.child;n!==null;)Df(e,t,n),n=n.sibling}function Df(e,t,n){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(ys,n)}catch{}switch(n.tag){case 5:Ne||On(n,t);case 6:var r=ge,a=tt;ge=null,Mt(e,t,n),ge=r,tt=a,ge!==null&&(tt?(e=ge,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ge.removeChild(n.stateNode));break;case 18:ge!==null&&(tt?(e=ge,n=n.stateNode,e.nodeType===8?Sa(e.parentNode,n):e.nodeType===1&&Sa(e,n),Fr(e)):Sa(ge,n.stateNode));break;case 4:r=ge,a=tt,ge=n.stateNode.containerInfo,tt=!0,Mt(e,t,n),ge=r,tt=a;break;case 0:case 11:case 14:case 15:if(!Ne&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){a=r=r.next;do{var o=a,f=o.destroy;o=o.tag,f!==void 0&&(o&2||o&4)&&kl(n,t,f),a=a.next}while(a!==r)}Mt(e,t,n);break;case 1:if(!Ne&&(On(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(p){ae(n,t,p)}Mt(e,t,n);break;case 21:Mt(e,t,n);break;case 22:n.mode&1?(Ne=(r=Ne)||n.memoizedState!==null,Mt(e,t,n),Ne=r):Mt(e,t,n);break;default:Mt(e,t,n)}}function Lu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new nv),t.forEach(function(r){var a=fv.bind(null,e,r);n.has(r)||(n.add(r),r.then(a,a))})}}function Je(e,t){var n=t.deletions;if(n!==null)for(var r=0;ra&&(a=f),r&=~o}if(r=a,r=le()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sv(r/1960))-r,10e?16:e,Ut===null)var r=!1;else{if(e=Ut,Ut=null,ms=0,W&6)throw Error(L(331));var a=W;for(W|=4,R=e.current;R!==null;){var o=R,f=o.child;if(R.flags&16){var p=o.deletions;if(p!==null){for(var h=0;hle()-xo?fn(e,0):yo|=n),Oe(e,t)}function Qf(e,t){t===0&&(e.mode&1?(t=ki,ki<<=1,!(ki&130023424)&&(ki=4194304)):t=1);var n=Ce();e=St(e,t),e!==null&&(Zr(e,t,n),Oe(e,n))}function dv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qf(e,n)}function fv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),Qf(e,n)}var Wf;Wf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ae.current)ze=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ze=!1,Jh(e,t,n);ze=!!(e.flags&131072)}else ze=!1,ne&&t.flags&1048576&&Yd(t,ss,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bi(e,t),e=t.pendingProps;var a=Wn(t,Se.current);qn(t,n),a=fo(null,t,r,e,a,n);var o=po();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Re(r)?(o=!0,rs(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,ao(t),a.updater=Ss,t.stateNode=a,a._reactInternals=t,hl(t,r,e,n),t=yl(null,t,r,!0,o,n)):(t.tag=0,ne&&o&&Jl(t),Ee(null,t,a,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bi(e,t),e=t.pendingProps,a=r._init,r=a(r._payload),t.type=r,a=t.tag=mv(r),e=et(r,e),a){case 0:t=gl(null,t,r,e,n);break e;case 1:t=Nu(null,t,r,e,n);break e;case 11:t=ku(null,t,r,e,n);break e;case 14:t=bu(null,t,r,et(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:et(r,a),gl(e,t,r,a,n);case 1:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:et(r,a),Nu(e,t,r,a,n);case 3:e:{if(Tf(t),e===null)throw Error(L(387));r=t.pendingProps,o=t.memoizedState,a=o.element,nf(e,t),os(t,r,null,n);var f=t.memoizedState;if(r=f.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:f.cache,pendingSuspenseBoundaries:f.pendingSuspenseBoundaries,transitions:f.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Xn(Error(L(423)),t),t=Su(e,t,r,n,a);break e}else if(r!==a){a=Xn(Error(L(424)),t),t=Su(e,t,r,n,a);break e}else for(Fe=$t(t.stateNode.containerInfo.firstChild),Ue=t,ne=!0,nt=null,n=ef(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gn(),r===a){t=Et(e,t,n);break e}Ee(e,t,r,n)}t=t.child}return t;case 5:return rf(t),e===null&&fl(t),r=t.type,a=t.pendingProps,o=e!==null?e.memoizedProps:null,f=a.children,ll(r,a)?f=null:o!==null&&ll(r,o)&&(t.flags|=32),Lf(e,t),Ee(e,t,f,n),t.child;case 6:return e===null&&fl(t),null;case 13:return Pf(e,t,n);case 4:return lo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Kn(t,null,r,n):Ee(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:et(r,a),ku(e,t,r,a,n);case 7:return Ee(e,t,t.pendingProps,n),t.child;case 8:return Ee(e,t,t.pendingProps.children,n),t.child;case 12:return Ee(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,o=t.memoizedProps,f=a.value,X(as,r._currentValue),r._currentValue=f,o!==null)if(st(o.value,f)){if(o.children===a.children&&!Ae.current){t=Et(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var p=o.dependencies;if(p!==null){f=o.child;for(var h=p.firstContext;h!==null;){if(h.context===r){if(o.tag===1){h=kt(-1,n&-n),h.tag=2;var g=o.updateQueue;if(g!==null){g=g.shared;var E=g.pending;E===null?h.next=h:(h.next=E.next,E.next=h),g.pending=h}}o.lanes|=n,h=o.alternate,h!==null&&(h.lanes|=n),pl(o.return,n,t),p.lanes|=n;break}h=h.next}}else if(o.tag===10)f=o.type===t.type?null:o.child;else if(o.tag===18){if(f=o.return,f===null)throw Error(L(341));f.lanes|=n,p=f.alternate,p!==null&&(p.lanes|=n),pl(f,n,t),f=o.sibling}else f=o.child;if(f!==null)f.return=o;else for(f=o;f!==null;){if(f===t){f=null;break}if(o=f.sibling,o!==null){o.return=f.return,f=o;break}f=f.return}o=f}Ee(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,qn(t,n),a=Ye(a),r=r(a),t.flags|=1,Ee(e,t,r,n),t.child;case 14:return r=t.type,a=et(r,t.pendingProps),a=et(r.type,a),bu(e,t,r,a,n);case 15:return Cf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:et(r,a),Bi(e,t),t.tag=1,Re(r)?(e=!0,rs(t)):e=!1,qn(t,n),Nf(t,r,a),hl(t,r,a,n),yl(null,t,r,!0,e,n);case 19:return If(e,t,n);case 22:return _f(e,t,n)}throw Error(L(156,t.tag))};function Gf(e,t){return wd(e,t)}function pv(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ge(e,t,n,r){return new pv(e,t,n,r)}function bo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mv(e){if(typeof e=="function")return bo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Hl)return 11;if(e===Bl)return 14}return 2}function Gt(e,t){var n=e.alternate;return n===null?(n=Ge(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Vi(e,t,n,r,a,o){var f=2;if(r=e,typeof e=="function")bo(e)&&(f=1);else if(typeof e=="string")f=5;else e:switch(e){case _n:return pn(n.children,a,o,t);case Ul:f=8,a|=8;break;case Fa:return e=Ge(12,n,t,a|2),e.elementType=Fa,e.lanes=o,e;case Ua:return e=Ge(13,n,t,a),e.elementType=Ua,e.lanes=o,e;case Ha:return e=Ge(19,n,t,a),e.elementType=Ha,e.lanes=o,e;case rd:return _s(n,a,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case td:f=10;break e;case nd:f=9;break e;case Hl:f=11;break e;case Bl:f=14;break e;case zt:f=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=Ge(f,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function pn(e,t,n,r){return e=Ge(7,e,r,t),e.lanes=n,e}function _s(e,t,n,r){return e=Ge(22,e,r,t),e.elementType=rd,e.lanes=n,e.stateNode={isHidden:!1},e}function Ma(e,t,n){return e=Ge(6,e,null,t),e.lanes=n,e}function za(e,t,n){return t=Ge(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hv(e,t,n,r,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ma(0),this.expirationTimes=ma(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ma(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function No(e,t,n,r,a,o,f,p,h){return e=new hv(e,t,n,p,h),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ge(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ao(o),e}function vv(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Zf)}catch(e){console.error(e)}}Zf(),Xu.exports=Be;var jv=Xu.exports,Ou=jv;Oa.createRoot=Ou.createRoot,Oa.hydrateRoot=Ou.hydrateRoot;const kv="modulepreload",bv=function(e){return"/"+e},Du={},Tl=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),p=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));a=Promise.allSettled(n.map(h=>{if(h=bv(h),h in Du)return;Du[h]=!0;const g=h.endsWith(".css"),E=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${E}`))return;const N=document.createElement("link");if(N.rel=g?"stylesheet":kv,g||(N.as="script"),N.crossOrigin="",N.href=h,p&&N.setAttribute("nonce",p),document.head.appendChild(N),g)return new Promise((b,P)=>{N.addEventListener("load",b),N.addEventListener("error",()=>P(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(f){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=f,window.dispatchEvent(p),!p.defaultPrevented)throw f}return a.then(f=>{for(const p of f||[])p.status==="rejected"&&o(p.reason);return t().catch(o)})},Aa={primaryColor:"#1677ff",themeMode:"system",ktv:!1,lyric2line:!0,progressMemory:!0,showComments:!0,smtc:!0,filenameFormat:"artist_song",writeMeta:!0,metaFields:{name:!0,artist:!0,album:!0,cover:!0,lyrics:!1,date:!1},zipEnabled:!1,batchWriteMeta:!0,batchZip:!0,lyricFormat:"lrc",lyricFont:1,cookiePrefs:{functional:!0,accepted:!1}},c={currentSong:null,lyrics:[],lyricsTrans:[],rawLyric:null,rawTlyric:null,rawYrc:null,currentTab:"search",commentOffset:0,commentTotal:0,commentHasMore:!1,commentPage:1,commentReply:null,settings:{...Aa,metaFields:{...Aa.metaFields},cookiePrefs:{...Aa.cookiePrefs}},adminAuthed:!1,adminPassword:"",adminQrTimer:null,adminUnikey:"",personal:{authed:!1,qrTimer:null,unikey:"",user:null,playlists:[],current:null,cookie:""},global:{user:null,playlists:[],current:null,playQueue:[],playQueueIndex:0},parseAccount:"admin",levelsOk:[],lyricOffset:0,currentCollection:null,podcast:{hotLoaded:!1,hotCate:null,hotOffset:0,radio:null,radioId:null,program:null,offset:0,count:0,asc:!0},auth:{user:null,checked:!1,annSeen:""},toplistLoaded:!1,collGen:{},dark:!1};let Jf=0;const Pl=new Set;function xn(){Jf++,Pl.forEach(e=>e())}function Nv(e){return Pl.add(e),()=>{Pl.delete(e)}}function Sv(){return Jf}function ep(){return Mr.useSyncExternalStore(Nv,Sv)}let Ev=0;const Qi=[];function k(e,t){const n=t||"info",r=++Ev;Qi.push({id:r,msg:e,type:n}),xn(),setTimeout(()=>{const a=Qi.findIndex(o=>o.id===r);a>=0&&(Qi.splice(a,1),xn())},2900)}const Kt=[];let _o=!1;function yt(e){return Kt.indexOf(e)!==-1}function xr(e){Kt.indexOf(e)===-1&&Kt.push(e),xn()}function Rt(e){const t=Kt.indexOf(e);t!==-1&&Kt.splice(t,1),xn()}function Cv(){return Kt.length?Kt[Kt.length-1]:null}function _v(){const e=Cv();return e?e==="stats-modal"||e==="cookie-modal"?(Tl(()=>Promise.resolve().then(()=>tp),void 0).then(t=>{const n=t.__legacyApi;e==="stats-modal"?n.closeStatsModal():n.closeCookieModal()}),Rt(e),!0):(Rt(e),!0):!1}function Il(){return _o}function Fu(){_o=!0,xn()}function Ra(){_o=!1,xn()}function Lv(e,t){window.handleAuthExpired?window.handleAuthExpired(e,t):k(e,"warning")}function Tv(){var e=function(s){return document.querySelector(s)},t=function(s){return Array.prototype.slice.call(document.querySelectorAll(s))},n={0:[["standard","标准音质"],["exhigh","极高音质"]],1:[["standard","标准音质"],["exhigh","极高音质"],["lossless","无损音质"],["hires","Hi-Res音质"]],11:[["standard","标准音质"],["exhigh","极高音质"],["lossless","无损音质"],["hires","Hi-Res音质"]],100:[["standard","标准音质"],["exhigh","极高音质"],["lossless","无损音质"],["hires","Hi-Res音质"]],10:[["standard","标准音质"],["exhigh","极高音质"],["lossless","无损音质"],["hires","Hi-Res音质"],["sky","沉浸环绕声"],["jyeffect","高清环绕声"],["jymaster","超清母带"],["dolby","杜比全景声"]],110:[["standard","标准音质"],["exhigh","极高音质"],["lossless","无损音质"],["hires","Hi-Res音质"],["sky","沉浸环绕声"],["jyeffect","高清环绕声"],["jymaster","超清母带"],["dolby","杜比全景声"]]},r=["jymaster","jyeffect","sky","hires","lossless","exhigh","standard"],a=[{name:"默认蓝",color:"#1677ff"},{name:"红色",color:"#f5222d"},{name:"橙色",color:"#fa8c16"},{name:"火山",color:"#d4380d"},{name:"青色",color:"#13c2c2"},{name:"绿色",color:"#52c41a"},{name:"粉红",color:"#eb2f96"},{name:"紫罗兰",color:"#722ed1"}];function o(){var s={};try{s=JSON.parse(localStorage.getItem("netease_settings")||"{}")||{}}catch{s={}}typeof s!="object"&&(s={});try{localStorage.getItem("netease_batchzip_migrated")||(s.batchZip!==!0&&delete s.batchZip,localStorage.setItem("netease_settings",JSON.stringify(s)),localStorage.setItem("netease_batchzip_migrated","1"))}catch{}typeof s.primaryColor=="string"&&/^#[0-9a-fA-F]{6}$/.test(s.primaryColor)&&(c.settings.primaryColor=s.primaryColor),s.themeMode&&(c.settings.themeMode=s.themeMode),["ktv","lyric2line","progressMemory","showComments","smtc","writeMeta","batchWriteMeta","batchZip","zipEnabled"].forEach(function(l){typeof s[l]=="boolean"&&(c.settings[l]=s[l])}),s.filenameFormat&&(c.settings.filenameFormat=s.filenameFormat),s.lyricFormat&&(c.settings.lyricFormat=s.lyricFormat),typeof s.lyricFont=="number"&&isFinite(s.lyricFont)&&(c.settings.lyricFont=Math.max(.7,Math.min(1.6,Math.round(s.lyricFont*20)/20))),s.metaFields&&typeof s.metaFields=="object"&&Object.keys(c.settings.metaFields).forEach(function(l){typeof s.metaFields[l]=="boolean"&&(c.settings.metaFields[l]=s.metaFields[l])}),s.cookiePrefs&&typeof s.cookiePrefs=="object"&&(typeof s.cookiePrefs.functional=="boolean"&&(c.settings.cookiePrefs.functional=s.cookiePrefs.functional),typeof s.cookiePrefs.accepted=="boolean"&&(c.settings.cookiePrefs.accepted=s.cookiePrefs.accepted))}function f(){try{return localStorage.setItem("netease_settings",JSON.stringify(c.settings)),!0}catch{return!1}}function p(){var s=document.documentElement;s.classList.add("theme-fading"),setTimeout(function(){s.classList.remove("theme-fading")},320);var l=c.settings.themeMode,u=l==="dark"||l==="system"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;s.classList.toggle("dark",u),s.style.setProperty("--color-primary",c.settings.primaryColor),s.style.setProperty("--color-primary-bg",h(c.settings.primaryColor,.12)),s.style.setProperty("--color-primary-hover",h(c.settings.primaryColor,.9)),s.style.setProperty("--color-primary-active",h(c.settings.primaryColor,.7)),e("#theme-toggle").innerHTML=u?"☀️ 浅色":"🌙 深色"}function h(s,l){var u=parseInt(s.slice(1,3),16),d=parseInt(s.slice(3,5),16),m=parseInt(s.slice(5,7),16);if(l>.5){var y=1-l;return"rgb("+Math.round(u+(255-u)*y)+","+Math.round(d+(255-d)*y)+","+Math.round(m+(255-m)*y)+")"}return"rgba("+u+","+d+","+m+","+l+")"}function g(){var s=e("#color-palette");s.innerHTML=a.map(function(l){return'
'}).join(""),t("#mode-seg .seg-item").forEach(function(l){l.classList.toggle("active",l.getAttribute("data-mode")===c.settings.themeMode)}),e("#switch-ktv").classList.toggle("on",c.settings.ktv),e("#switch-lyric2line").classList.toggle("on",c.settings.lyric2line),e("#switch-progress").classList.toggle("on",c.settings.progressMemory),e("#switch-comments").classList.toggle("on",c.settings.showComments),e("#switch-smtc").classList.toggle("on",c.settings.smtc),e("#cfg-filename-format").value=c.settings.filenameFormat,e("#cfg-write-meta").classList.toggle("on",c.settings.writeMeta),e("#cfg-zip").classList.toggle("on",c.settings.zipEnabled),e("#cfg-batch-meta").classList.toggle("on",c.settings.batchWriteMeta),e("#cfg-batch-zip").classList.toggle("on",c.settings.batchZip),e("#cfg-lyric-format").value=c.settings.lyricFormat,t("#cfg-meta-fields-wrap input[type=checkbox]").forEach(function(l){l.checked=!!c.settings.metaFields[l.getAttribute("data-field")],l.disabled=!c.settings.writeMeta}),e("#switch-cookie-func").classList.toggle("on",c.settings.cookiePrefs.functional),e("#switch-cookie-func").setAttribute("aria-checked",c.settings.cookiePrefs.functional?"true":"false"),e("#cookie-func-tag").textContent=c.settings.cookiePrefs.functional?"已启用":"已禁用",t("#color-palette .color-dot").forEach(function(l){l.setAttribute("tabindex","0"),l.setAttribute("role","button")})}e("#color-palette").addEventListener("click",function(s){var l=s.target.closest(".color-dot");l&&(c.settings.primaryColor=l.getAttribute("data-color"),g(),p())}),e("#color-palette").addEventListener("keydown",function(s){if(!(s.key!=="Enter"&&s.key!==" ")){var l=s.target.closest?s.target.closest(".color-dot"):null;l&&(s.preventDefault(),l.click())}}),e("#mode-seg").addEventListener("click",function(s){var l=s.target.closest(".seg-item");l&&(c.settings.themeMode=l.getAttribute("data-mode"),g(),p())}),e("#mode-seg").addEventListener("keydown",function(s){if(!(s.key!=="Enter"&&s.key!==" ")){var l=s.target.closest?s.target.closest(".seg-item"):null;l&&(s.preventDefault(),l.click())}});function E(s,l){var u=e(s);if(u){u.setAttribute("tabindex","0"),u.setAttribute("role","switch");var d=function(){c.settings[l]=!c.settings[l],g(),I()};u.addEventListener("click",d),u.addEventListener("keydown",function(m){(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),d())})}}E("#switch-ktv","ktv"),E("#switch-lyric2line","lyric2line"),E("#switch-progress","progressMemory"),E("#switch-comments","showComments"),E("#switch-smtc","smtc");function N(s,l){var u=e(s);u&&(u.setAttribute("tabindex","0"),u.setAttribute("role","switch"),u.addEventListener("click",l),u.addEventListener("keydown",function(d){(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),l())}))}e("#cfg-filename-format").addEventListener("change",function(){c.settings.filenameFormat=this.value}),N("#cfg-write-meta",function(){c.settings.writeMeta=!c.settings.writeMeta,g()}),N("#cfg-zip",function(){c.settings.zipEnabled=!c.settings.zipEnabled,g()}),N("#cfg-batch-meta",function(){c.settings.batchWriteMeta=!c.settings.batchWriteMeta,g()}),N("#cfg-batch-zip",function(){c.settings.batchZip=!c.settings.batchZip,g()}),e("#cfg-lyric-format").addEventListener("change",function(){c.settings.lyricFormat=this.value}),e("#cfg-meta-fields-wrap").addEventListener("change",function(s){var l=s.target;l.getAttribute("type")==="checkbox"&&(c.settings.metaFields[l.getAttribute("data-field")]=l.checked)});function b(s){k(f()?s:"设置未能保存(浏览器存储不可用),仅本次生效","warning")}e("#cfg-save-download").addEventListener("click",function(){b("下载配置已保存")}),e("#cfg-save-batch").addEventListener("click",function(){b("批量下载配置已保存")}),e("#cfg-save-lyric").addEventListener("click",function(){b("歌词配置已保存")});function P(){var s=Object.keys(c.settings.metaFields).filter(function(l){return c.settings.metaFields[l]});return{filename_format:c.settings.filenameFormat,write_meta:c.settings.writeMeta?"true":"false",meta_fields:c.settings.writeMeta&&s.length?s.join(","):"__none__",lyric_format:c.settings.lyricFormat,zip:c.settings.zipEnabled?"true":"false"}}function I(){e("#comment-panel").hidden=!(c.settings.showComments&&c.currentSong),nn(),c.settings.showComments&&c.currentSong&&!c.commentTotal&&!c._commentsLoading&&ir(c.currentSong.id,1,!0),!c.settings.ktv&&c.ktvRunning&&(c.ktvRunning=!1),c.rawLyric!=null&&(c.lyrics=Io(),Fs())}e("#settings-save").addEventListener("click",function(){b("设置已保存"),tn()}),e("#settings-reset").addEventListener("click",function(){c.settings={primaryColor:"#1677ff",themeMode:"system",ktv:!1,lyric2line:!0,progressMemory:!0,showComments:!0,smtc:!0,filenameFormat:"artist_song",writeMeta:!0,metaFields:{name:!0,artist:!0,album:!0,cover:!0,lyrics:!1,date:!1},zipEnabled:!1,batchWriteMeta:!0,batchZip:!0,lyricFormat:"lrc",lyricFont:1,cookiePrefs:{functional:!0,accepted:!1}},g(),p(),I(),nr(),f(),k("已恢复默认设置","info")});var M=null;function Y(){U("/api/topen",{}).then(function(s){if(s.status!==200)throw new Error(s.message||"获取统计失败");var l=s.data;e("#stat-total").textContent=je(l.total),e("#stat-endpoints").textContent=l.endpoint_count,e("#stat-max").textContent=je(l.max_count);var u=new Date;e("#stats-refresh-time").textContent=String(u.getHours()).padStart(2,"0")+":"+String(u.getMinutes()).padStart(2,"0")+":"+String(u.getSeconds()).padStart(2,"0");var d=l.endpoints||[];e("#stats-list").innerHTML=d.map(function(m,y){return'
#'+(y+1)+'
'+j(m.name)+'
'+j(m.path)+'
'+j(String(je(m.count)))+"次 ("+j(String(m.percent))+"%)
"}).join("")||'
暂无请求记录
'}).catch(function(s){k(s.message||"获取统计失败","error")})}function x(){xr("stats-modal"),Y(),M&&clearInterval(M),M=setInterval(Y,1e4)}function v(){Rt("stats-modal"),M&&(clearInterval(M),M=null)}e("#cfg-stats-view").addEventListener("click",x),e("#cfg-stats-refresh").addEventListener("click",x),e("#stats-refresh-btn").addEventListener("click",Y),e("#stats-close").addEventListener("click",v),e("#stats-modal").addEventListener("click",function(s){s.target===this&&v()});var w=!1,_=null,z=0,D=null;function O(){_&&(clearInterval(_),_=null)}function F(){var s=e("#cookie-agree-continue");if(s){if(z>0){s.disabled=!0,s.textContent="请阅读协议("+z+"s)";return}s.textContent="同意并继续注册",s.disabled=!e("#cookie-agree").checked}}function te(s){w=s,e("#cookie-withdraw").hidden=s,e("#cookie-save").hidden=s;var l=e("#cookie-agree-continue");l&&(l.hidden=!s);var u=e("#cookie-modal .modal-title");u&&(D===null&&(D=u.textContent),u.textContent=s?"注册前请阅读并同意协议":D)}function $(s){document.getElementById("announce-modal"),yt("announce-modal")&&Rt("announce-modal");var l=s==="register"&&!c.settings.cookiePrefs.accepted;e("#cookie-agree").checked=c.settings.cookiePrefs.accepted,g(),te(l),e("#cookie-modal"),xr("cookie-modal"),O(),l&&(z=16,F(),_=setInterval(function(){if(!yt("cookie-modal")){O();return}z=Math.max(0,z-1),F(),z<=0&&O()},1e3))}function fe(){O(),z=0,Rt("cookie-modal"),te(!1)}e("#cfg-cookie-prefs").addEventListener("click",function(){$()}),e("#cookie-close").addEventListener("click",fe),e("#cookie-modal").addEventListener("click",function(s){s.target===this&&fe()}),e("#cookie-agree").addEventListener("change",function(){w&&F()});var _t=function(){c.settings.cookiePrefs.functional=!c.settings.cookiePrefs.functional,g(),k(c.settings.cookiePrefs.functional?"功能性 Cookie 已启用":"功能性 Cookie 已禁用(解析与下载将不可用)","warning")};e("#switch-cookie-func").addEventListener("click",_t),e("#switch-cookie-func").addEventListener("keydown",function(s){(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),_t())}),e("#cookie-save").addEventListener("click",function(){var s=e("#cookie-agree").checked;if(!s){k("请先勾选已阅读并同意《用户协议》和《隐私政策》","warning");return}c.settings.cookiePrefs.accepted=!0,f(),fe(),k("Cookie 偏好已保存","success")}),e("#cookie-agree-continue").addEventListener("click",function(){if(!this.disabled){if(!e("#cookie-agree").checked){k("请先勾选已阅读并同意《用户协议》和《隐私政策》","warning");return}c.settings.cookiePrefs.accepted=!0,f(),g(),fe(),k("已同意《用户协议》与《隐私政策》,请继续注册","success");var s=e("#register-modal");if(s){xr("register-modal");var l=e("#reg-username");if(l)try{l.focus()}catch{}}}}),e("#cookie-withdraw").addEventListener("click",function(){c.settings.cookiePrefs={functional:!0,accepted:!1},f(),g(),fe(),k("已撤回同意","info")});function Te(s){if(!c.settings.cookiePrefs.accepted){var l=s==="register";return k(l?"注册前请先阅读并同意《用户协议》与《隐私政策》":"请先阅读并同意《用户协议》和《隐私政策》","warning"),$(l?"register":void 0),!1}return s!=="register"&&!c.settings.cookiePrefs.functional?(k("功能性 Cookie 已关闭,无法解析与下载音乐,请在「设置 → 隐私与协议」中开启","warning"),$(),!1):!0}window.SITE_COOKIE_GATE=Te;var Lt=null;function Ms(){Lt=document.activeElement,Fu(),Fu();var s=e("#settings-drawer").querySelector('button, [href], input, select, [tabindex]:not([tabindex="-1"])');if(s)try{s.focus()}catch{}}function tn(){if(Ra(),Ra(),Lt&&typeof Lt.focus=="function")try{Lt.focus()}catch{}Lt=null}document.addEventListener("keydown",function(s){if(s.key==="Escape"){var l=_v();l||Il()&&Ra()}}),e("#btn-settings").addEventListener("click",Ms),e("#drawer-close").addEventListener("click",tn),e("#drawer-mask").addEventListener("click",tn);var Tt=[{v:"2.4.0",date:"2026-09-21",items:["修复:解析结果在快速连续解析两首歌时可能互相覆盖(串台)的问题","修复:超长曲目(100 分钟以上)歌词第 100 分钟起丢失的问题","修复:连播切歌后歌词/评论区仍显示上一首的问题","修复:歌名含特殊字符时下载领取失败的问题","修复:老内核浏览器(Chrome 57-62)操作按钮卡加载的问题","安全:登录失败次数过多临时锁定;公网错误信息不再暴露内部细节","优化:下载结果保留期与「领取」入口统一为 35 分钟"]},{v:"2.1.0",date:"2026-08-28",items:["调整:计费改为按次计费,一首歌消耗 1 次,歌单打包下载按歌曲数量扣减(如 100 首歌单打包 = 100 次)","调整:免费试用改为 3 次(3 首歌),注册页领取,每台设备限领一次","调整:卡密升级为次数卡,后台可生成 3/10/50/100/500/2000 次卡"]},{v:"1.6.0",date:"2026-08-28",items:["新增:账号系统(强制登录):邮箱验证码注册、免费体验5分钟(设备识别防重复)、使用时长管理","新增:管理后台:用户管理(删除/时长修改/网易云Cookie查看)、全局Cookie管理、SMTP邮箱配置、成功/失败日志、次数卡密生成、公告设置、数据库备份/下载/上传恢复/定时备份","新增:个人中心:剩余时长、卡密充值、公告查看、版本日志、联系方式、退出登录","新增:导航栏登录/注册按钮,登录后显示头像,管理员/普通用户角色识别与定向跳转","调整:全局账号歌单仅管理员可见;解析功能需登录后使用"]},{v:"1.5.0",date:"2026-08-28",items:["新增:播客解析模块,支持电台/单集链接与ID解析、在线试听、音频直链获取","新增:播客下载方式:单集服务器下载(ZIP 可选)、整台播客打包下载,接入任务进度悬浮窗","新增:播客搜索与热门播客分类卡片墙","新增:「关于网站」菜单:项目介绍、功能说明、更新日志与作者信息"]},{v:"1.4.8",date:"2026-08-05",items:["新增:单曲解析结果下方新增「下载歌词」按钮","新增:播放器新增「播放进度记忆」功能","优化:歌词下载自动过滤 YRC/LRC 头部的 JSON 元数据行"]},{v:"1.4.7",date:"2026-07-22",items:["新增:设置「下载配置」分类中加入「写入字段」勾选区","优化:未勾选字段不会覆盖原音频文件中的值"]},{v:"1.4.6",date:"2026-07-21",items:["新增:单曲解析结果新增「自定义元数据」开关","优化:每次解析新歌曲时自动重置自定义元数据"]},{v:"1.4.5",date:"2026-07-20",items:["新增:逐字歌词(KTV 模式),支持逐字渐变高亮","优化:歌词头部元数据(作词/作曲/编曲等)自动识别展示"]},{v:"1.4.4",date:"2026-07-19",items:["新增:沉浸环绕声(sky)支持子类型 c51 / ste / aac","优化:兼容网易云逐字歌词(YRC)"]},{v:"1.4.3",date:"2026-07-13",items:["新增:歌手解析 Tab,支持热门 / 全部歌曲","优化:更新日志改为独立页面"]},{v:"1.4.2",date:"2026-07-13",items:["新增:8 种主题颜色,应用到全站强调色","新增:独立「歌词」分类设置","优化:榜单改为响应式卡片网格"]},{v:"1.4.1",date:"2026-07-05",items:["新增:GitHub Issues 同步页","新增:API 请求失败通知"]},{v:"1.4.0",date:"2026-07-02",items:["重构:设置 / 统计由右侧 Drawer 改为独立页面"]},{v:"1.3.9",date:"2026-06-21",items:["重构:移除 APlayer,自研全新 AudioPlayer","优化:LRC 歌词毫秒精度高亮、点击歌词行跳转"]},{v:"1.3.8",date:"2026-06-20",items:["新增:单曲信息下方评论区,支持分页加载","优化:评论显示 VIP / SVIP / 音乐包标识、IP 归属地"]},{v:"1.3.6",date:"2026-05-24",items:["新增:所有官方榜单全量支持","新增:歌单 / 专辑批量下载本页"]},{v:"1.2.0",date:"2026-03-29",items:["修复部分歌曲解析失败的问题","优化界面交互体验"]}];function A(){e("#changelog-body").innerHTML=Tt.map(function(s){return'
v'+s.v+''+s.date+'
    '+s.items.map(function(l){return"
  • "+j(l)+"
  • "}).join("")+"
"}).join("")}function H(){A(),xr("changelog-modal")}e("#btn-changelog").addEventListener("click",H),e("#changelog-close").addEventListener("click",function(){Rt("changelog-modal")}),e("#changelog-modal").addEventListener("click",function(s){s.target===this&&Rt("changelog-modal")});function q(){setTimeout(function(){var s=e("#page-loading");s&&s.remove()},300)}document.readyState==="complete"?q():window.addEventListener("load",q),e("#theme-toggle").addEventListener("click",function(){c.settings.themeMode=document.documentElement.classList.contains("dark")?"light":"dark",g(),p(),f()});var Z=0;function G(){var s=++Z;U("/account/vip",{account:c.parseAccount,user_cookie:c.parseAccount==="user"?c.personal.cookie:""}).then(function(l){if(s===Z){if(l.status!==200)throw new Error(l.message||"获取账号信息失败");var u=l.data||{},d=e("#account-vip-badge"),m=u.account==="user",y=(m?"个人账号":"全局账号")+" · "+(u.vip_name||"未知");d.textContent=y,m?(d.style.borderColor="var(--color-warning)",d.style.color="var(--color-warning)",d.style.background="rgba(250,173,20,0.12)"):(d.style.borderColor="var(--color-primary)",d.style.color="var(--color-primary)",d.style.background="var(--color-primary-bg)");var C=[];u.levels_ok&&u.levels_ok.length?(c.levelsOk=u.levels_ok,C=u.levels_ok.map(function(T){return[T,ni(T)]})):(c.levelsOk=[],C=n[u.vip_type]||n[0]),e("#account-qualities").textContent="可解析:"+C.map(function(T){return T[1]}).join("、");var S=e("#account-note");m&&!u.logged_in?S.innerHTML="⚠️ 个人账号未登录,当前仍使用全局账号解析。可在「个人歌单」扫码登录你自己的账号。":m?S.innerHTML="💡 当前使用个人账号解析与下载("+j(u.nickname||"")+" · "+j(u.vip_name||"")+")。可在「个人歌单」随时切换回全局账号。":u.logged_in?S.innerHTML="💡 小提示:可在「个人歌单」登录你自己的 SVIP 网易云音乐账号,并切换为个人账号解析,即可下载/试听更高音质。":S.innerHTML="💡 小提示:可在「个人歌单」登录你自己的 SVIP 网易云音乐账号,并切换为个人账号解析,即可下载/试听更高音质。"+(u.note?"
⚠️ "+j(u.note)+";当前检测为「"+j(u.vip_name||"普通用户")+"」。可在「管理员设置」重新扫码登录全局账号。":"
⚠️ 全局 Cookie 未关联有效账号信息,可在「管理员设置」重新扫码登录。")}}).catch(function(l){s===Z&&(e("#account-vip-badge").textContent="获取失败",c.levelsOk=[],k(l.message||"获取账号信息失败","error"))})}e("#account-refresh").addEventListener("click",G);function we(s){c.currentTab=s,xn(),typeof rr=="function"&&rr(!1),setTimeout(function(){var l={search:"#search-input",song:"#song-input",playlist:"#playlist-input",album:"#album-input",artist:"#artist-input",admin:"#admin-password"}[s];if(l){var u=e(l);u&&!u.value&&u.focus()}},60),s==="toplist"&&!c.toplistLoaded&&Ko(),s==="admin"&&!c.adminAuthed&&(e("#admin-gate").hidden=!1,e("#admin-content").hidden=!0),s==="personal"&&Ws(),s==="global"&&sc(),s==="podcast"&&!c.podcast.hotLoaded&&Vs(),s==="about"&&!e("#about-changelog").innerHTML&&Cp(),s==="usercenter"&&window.renderSITEUserCenter&&window.renderSITEUserCenter(),s==="useradmin"&&window.renderSITEUserCenter&&window.renderSITEUserCenter()}e("#brand-home").addEventListener("click",function(){window.scrollTo({top:0,behavior:"smooth"}),we("search")});function Ze(s){if(s=(s||"").trim(),!s)return"";if(s.indexOf("163cn.tv")!==-1)return s;var l=s.match(/[?&]id=(\d+)/);if(l)return l[1];var u=s.match(/\b\d{4,}\b/);return u?u[0]:s}function j(s){return String(s??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function at(s){(isNaN(s)||s<0)&&(s=0);var l=Math.floor(s/60),u=Math.floor(s%60);return(l<10?"0":"")+l+":"+(u<10?"0":"")+u}function je(s){return s=s||0,s>=1e8?(s/1e8).toFixed(1)+"亿":s>=1e4?(s/1e4).toFixed(1)+"万":String(s)}function np(s){if(!s)return"";var l=Math.floor(Date.now()/1e3-s/1e3);if(l<60)return"刚刚";if(l<3600)return Math.floor(l/60)+" 分钟前";if(l<86400)return Math.floor(l/3600)+" 小时前";if(l<86400*30)return Math.floor(l/86400)+" 天前";var u=new Date(s);return u.getFullYear()+"-"+String(u.getMonth()+1).padStart(2,"0")+"-"+String(u.getDate()).padStart(2,"0")}function ni(s){if(s==="auto")return"最高音质(自动)";var l={standard:"标准音质",exhigh:"极高音质",lossless:"无损音质",hires:"Hi-Res音质",sky:"沉浸环绕声",jyeffect:"高清环绕声",jymaster:"超清母带",dolby:"杜比全景声"};return l[s]||s}function U(s,l){var u=Object.keys(l).map(function(y){return encodeURIComponent(y)+"="+encodeURIComponent(l[y]==null?"":l[y])}).join("&"),d=function(){var y=/\/(playlist|album|artist_songs|podcast\/parse)$/.test(s),C=typeof AbortController<"u"?new AbortController:null,S=null;return C&&(S=setTimeout(function(){try{C.abort()}catch{}},y?45e3:15e3)),fetch(s,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:u,signal:C?C.signal:void 0}).then(function(T){return T.json().catch(function(){throw new Error("服务响应异常")}).then(function(B){return S&&clearTimeout(S),B},function(B){throw S&&clearTimeout(S),B})},function(T){throw S&&clearTimeout(S),T}).then(function(T){return T&&T.status===401&&(T.error_code==="unauthorized"||T.error_code==="expired")&&s.indexOf("/auth/")!==0&&Lv(T.message||"请先登录",T.error_code==="expired"),T})},m=s.indexOf("download")===-1&&s.indexOf("/auth/")!==0&&s.indexOf("/api/task")===-1&&s.indexOf("/user/")===-1&&s.indexOf("/comments")===-1;return d().catch(function(y){var C=y&&(y.name==="TypeError"||y.name==="AbortError"||y.message==="服务响应异常");if(m&&C)return new Promise(function(S){setTimeout(S,700)}).then(d);throw y})}function pt(){return window.SITE_LOGGED_IN?!0:(window.handleAuthExpired?window.handleAuthExpired("解析功能需要登录后才能使用",!1):k("解析功能需要登录后才能使用","warning"),!1)}function V(s,l,u){if(s)if(l)s.dataset.originText||(s.dataset.originText=s.textContent),s.dataset.loadingCount=String((parseInt(s.dataset.loadingCount,10)||0)+1),s.disabled=!0,s.innerHTML=' '+j(u||"处理中...");else{var d=(parseInt(s.dataset.loadingCount,10)||1)-1;if(d>0){s.dataset.loadingCount=String(d);return}s.disabled=!1,delete s.dataset.loadingCount,s.dataset.originText&&(s.textContent=s.dataset.originText,delete s.dataset.originText)}}var zs="netease_parse_history";function As(){var s=null;try{s=JSON.parse(localStorage.getItem(zs)||"[]")}catch{return[]}return Array.isArray(s)?s.filter(function(l){return l&&typeof l=="object"&&l.id!=null&&typeof l.name<"u"}).map(function(l){return{id:String(l.id),name:String(l.name==null?l.id:l.name),t:Number(l.t)||0}}):[]}function rp(s,l){var u=As();u=u.filter(function(d){return String(d.id)!==String(s)}),u.unshift({id:String(s),name:l||String(s),t:Date.now()}),u.length>8&&(u.length=8);try{localStorage.setItem(zs,JSON.stringify(u))}catch{}ri()}function ri(){var s=As(),l=e("#history-row"),u=e("#history-list");if(!s.length){l.hidden=!0;return}l.hidden=!1,u.innerHTML=s.map(function(d){return''+j(d.name)+'×'}).join(" ")}e("#history-list").addEventListener("click",function(s){var l=s.target.closest(".tag-close");if(l){var u=l.getAttribute("data-close"),d=As().filter(function(y){return String(y.id)!==u});try{localStorage.setItem(zs,JSON.stringify(d))}catch{}ri();return}var m=s.target.closest(".tag");m&&(e("#song-input").value=m.getAttribute("data-id"),we("song"),ii())}),ri();var Rs=0;function Lo(){if(pt()){var s=e("#search-input").value.trim();if(!s){k("请输入搜索关键词","warning"),e("#search-input").focus();return}var l=e("#search-btn"),u=++Rs;V(l,!0,"搜索中..."),U("/search",{keyword:s,limit:e("#search-limit").value,type:e("#search-type").value}).then(function(d){if(u===Rs){if(d.status!==200)throw new Error(d.message||"搜索失败");ip(d.data||[])}}).catch(function(d){u===Rs&&k(d.message||"搜索失败,请重试","error")}).finally(function(){V(l,!1)})}}function ip(s){var l=e("#search-list"),u=e("#search-result");if(!s||!s.length){u.hidden=!1,e("#search-count").textContent="共 0 条",l.innerHTML='
🎵
未找到相关内容
';return}e("#search-count").textContent="共 "+s.length+" 条",l.innerHTML=s.map(function(d){var m="";return d.type==="song"?m='
'+j(d.name)+''+j(d.album||"")+'
'+j(d.artists||"")+'
':d.type==="playlist"?m='
'+j(d.name)+'歌单
by '+j(d.creator||"未知")+" · "+je(d.trackCount)+' 首
':d.type==="album"?m='
'+j(d.name)+'专辑
'+j(d.artists||"")+'
':d.type==="artist"&&(m='
'+j(d.name)+'歌手
'+j(d.alias||"")+'
'),m}).join(""),u.hidden=!1}e("#search-btn").addEventListener("click",Lo),e("#search-input").addEventListener("keydown",function(s){s.key==="Enter"&&Lo()});function To(s){return s.account=c.parseAccount,c.parseAccount==="user"&&(s.user_cookie=c.personal.cookie),U("/song",s).then(function(l){if(l.status===401&&c.parseAccount==="user"){c.parseAccount="admin";try{localStorage.setItem("netease_parse_account","admin")}catch{}return G(),rn(),k("个人账号未登录或已失效,已自动切换为全局账号解析","warning"),s.account="admin",U("/song",s)}return l})}function Os(s){var l=e("#global-level").value;if(l!=="auto")return Promise.resolve(l);var u=c.levelsOk&&c.levelsOk.length?c.levelsOk:r,d=0;return new Promise(function(m){(function y(){if(d>=u.length){m("standard");return}To({url:s,level:u[d],type:"url"}).then(function(C){C.status===200&&C.data&&C.data.url&&C.data.level===u[d]?m(u[d]):(d++,y())}).catch(function(){d++,y()})})()})}var Ds=0;function ii(){if(pt()){var s=e("#song-input").value.trim();if(!s){k("请输入歌曲ID或网易云音乐链接","warning"),e("#song-input").focus();return}if(Te()){var l=e("#parse-btn"),u=++Ds;V(l,!0,"解析中..."),e("#song-result .song-detail").hidden=!0,e("#lyric-panel").hidden=!0,e("#comment-panel").hidden=!0,c.lyrics=[],Os(s).then(function(d){return To({url:s,level:d,type:"json"})}).then(function(d){if(u===Ds){if(d.status!==200)throw new Error(d.data&&d.data.msg||d.message||"解析失败");ap(d.data)}}).catch(function(d){u===Ds&&k(d.message||"解析失败,请检查歌曲ID或链接","error")}).then(function(){V(l,!1)},function(){V(l,!1)})}}}function sp(s,l){e("#song-input").value=s,we("song"),e("#song-input").focus(),l&&k("正在解析:"+l,"info"),ii()}function ap(s){c.currentSong=s,c.global.playQueue=[],c.global.playQueueIndex=0,c.lyrics=[],c.rawLyric=null,c.rawTlyric=null,c.commentPage=1,c.commentTotal=0,c.commentReply=null,e("#detail-cover").src=s.pic||"",e("#detail-name").textContent=s.name||"未知歌曲",e("#detail-artist").textContent=s.ar_name||"未知歌手",e("#detail-album").textContent=s.al_name||"未知专辑",e("#detail-level").textContent="音质:"+ni(s.level),e("#detail-size").textContent=s.size||"大小未知";var l=e("#detail-tip");s.url?l.hidden=!0:(l.hidden=!1,l.textContent="⚠️ 当前音质无法获取下载链接,可能是版权限制或音质不支持,请尝试其他音质。"),e("#song-result").hidden=!1,e("#song-result .song-detail").hidden=!1,window.scrollTo({top:e("#song-result").offsetTop-80,behavior:"smooth"}),c.lyricOffset=0,e("#lyric-offset-label").textContent="偏移 0.00s",rp(s.id,s.name),cp(s.lyric||"",s.tlyric||"",s.yrc||""),s.url?Hs(s.url,s.name||"",s.ar_name||"",s.pic||""):mp(),c.settings.showComments?(e("#comment-panel").hidden=!1,nn(),ir(s.id,1,!0)):e("#comment-panel").hidden=!0}e("#parse-btn").addEventListener("click",ii),e("#song-input").addEventListener("keydown",function(s){s.key==="Enter"&&ii()});function Po(s){var l=String(s||"").split(` `),u=[];return l.forEach(function(d,m){var y=d.match(/\[(\d{1,3}):(\d{1,2}[.:]?\d*)]/);if(y){var C=parseInt(y[1],10),S=parseFloat(y[2].replace(":","."))||0,T=C*60+S,B=d.replace(/\[\d{1,3}:\d{1,2}[.:]?\d*]/g,"").trim();B=B.replace(/\s\s+/g," "),B&&u.push({time:T,text:B,index:m})}}),u.sort(function(d,m){return d.time-m.time}),u}function lp(s,l){var u=Po(l);if(!u.length)return s;var d={};return s.map(function(m){for(var y=null,C=1/0,S=-1,T=0;T.5){if(u[T].time>m.time+.5)break;continue}if(B=Math.max(1,Math.ceil(s.length*.5))){var u=l.slice();s.forEach(function(d){var m=l.some(function(y){return Math.abs(y.time-d.time)<=1});m||u.push(d)}),u.sort(function(d,m){return d.time-m.time}),u.forEach(function(d,m){d.index=m}),s=u}return c.rawTlyric&&(s=lp(s,c.rawTlyric)),s}function cp(s,l,u){c.rawLyric=s||"",c.rawTlyric=l||"",c.rawYrc=u||"",c.lyrics=Io(),Fs();var d=e("#lyric-panel");d.hidden=!1,c.lyrics.length||(e("#lyric-box").innerHTML='
暂无歌词
')}function Fs(){var s=e("#lyric-box");if(!c.lyrics.length){s.innerHTML='
暂无歌词
';return}var l=c.settings.lyric2line;s.innerHTML=c.lyrics.map(function(u,d){var m=u.text||"♪",y=c.settings.ktv?"lyric-line ktv":"lyric-line",C;if(c.settings.ktv&&u.words&&u.words.length)y+=" kw-line",C=u.words.map(function(B){return''+j(B.c)+""}).join(""),l&&u.trans?C+='
'+j(u.trans)+"":u.trans&&(C+=' (翻译:'+j(u.trans)+")");else if(u.trans){var S=u.orig||m,T=l?S.split(` `)[0]:S.replace(/ \(翻译:.*\)$/,"");C=j(T),l?C+='
'+j(u.trans)+"":C+=' (翻译:'+j(u.trans)+")"}else C=l?j(m).replace(/\n/g,"
"):j(m);return'
'+C+"
"}).join(""),s.scrollTop=0,c.lastActiveLine=-1,c.ktvFillIdx=-1,c.ktvWordEls=null,c.ktvLineEls=Array.prototype.slice.call(s.children)}e("#lyric-box").addEventListener("click",function(s){var l=s.target.closest(".lyric-line");if(l){var u=parseInt(l.getAttribute("data-i"),10),d=e("#player audio");d&&d.src&&c.lyrics[u]&&(d.currentTime=Math.max(0,c.lyrics[u].time-c.lyricOffset),d.paused&&d.play().catch(function(){}))}});function Mo(s){c.lyricOffset=Math.max(-30,Math.min(30,Math.round((c.lyricOffset+s)*100)/100)),e("#lyric-offset-label").textContent="偏移 "+(c.lyricOffset>0?"+":"")+c.lyricOffset.toFixed(2)+"s",k("歌词偏移:"+(c.lyricOffset>0?"+":"")+c.lyricOffset.toFixed(2)+" 秒","info");var l=e("#player audio");l&&!l.paused&&Uo(l.currentTime)}e("#lyric-delay").addEventListener("click",function(){Mo(.25)}),e("#lyric-advance").addEventListener("click",function(){Mo(-.25)});var zo=.7,Ao=1.6,up=.05;function Ro(s){return typeof s!="number"||!isFinite(s)?1:Math.max(zo,Math.min(Ao,Math.round(s*20)/20))}function nr(){c.settings.lyricFont=Ro(c.settings.lyricFont),e("#lyric-box").style.setProperty("--lyric-fs",String(c.settings.lyricFont)),e("#lyric-fs-val").textContent=Math.round(c.settings.lyricFont*100)+"%",e("#lyric-fs-dec").disabled=c.settings.lyricFont<=zo,e("#lyric-fs-inc").disabled=c.settings.lyricFont>=Ao}function Us(){return!e("#lyric-fs-pop").hidden}function rr(s){e("#lyric-fs-pop").hidden=!s,e("#lyric-fontsize").setAttribute("aria-expanded",s?"true":"false"),document.documentElement.classList.toggle("fs-pop-open",s),s&&nr()}function Oo(s){c.settings.lyricFont=Ro(c.settings.lyricFont+s*up),nr(),f()}e("#lyric-fontsize").addEventListener("click",function(){rr(!Us())}),e("#lyric-fs-inc").addEventListener("click",function(){Oo(1)}),e("#lyric-fs-dec").addEventListener("click",function(){Oo(-1)}),e("#lyric-fs-reset").addEventListener("click",function(){c.settings.lyricFont=1,nr(),f(),k("歌词字号已恢复默认","info")}),document.addEventListener("click",function(s){Us()&&(s.target.closest("#lyric-fs-pop")||s.target.closest("#lyric-fontsize")||rr(!1))},!0),document.addEventListener("keydown",function(s){if(s.key==="Escape"&&Us()){if(document.querySelector(".drawer.show, .modal-mask.show"))return;rr(!1),e("#lyric-fontsize").focus()}},!0);function Do(s){for(var l=-1,u=0;u=C.s+C.d?S.classList.contains("on")||(S.classList.add("on"),S.classList.remove("cur")):u>=C.s?(S.classList.contains("cur")||(S.classList.add("cur"),S.classList.remove("on")),S.style.setProperty("--pw",Math.min(100,(u-C.s)/C.d*100)+"%")):(S.classList.contains("on")||S.classList.contains("cur"))&&(S.classList.remove("on"),S.classList.remove("cur"))}}}function Fo(s,l){for(var u=c.ktvLineEls&&c.ktvLineEls.length?c.ktvLineEls:Array.prototype.slice.call(e("#lyric-box").children),d=0;d=0&&c.settings.ktv&&dp(u[s],s,l),s>=0&&s!==c.lastActiveLine){c.lastActiveLine=s;var m=e("#lyric-box"),y=u[s];if(y){var C=y.offsetTop-m.clientHeight/2+y.clientHeight/2;m.scrollTo({top:Math.max(0,C),behavior:"smooth"})}}}function Uo(s){var l=s+c.lyricOffset;Fo(Do(l),l)}function Ho(){if(c.ktvRunning){var s=e("#player audio");if(!s||s.paused){c.ktvRunning=!1;return}var l=s.currentTime+c.lyricOffset;Fo(Do(l),l),requestAnimationFrame(Ho)}}function Bo(){!c.ktvRunning&&c.settings.ktv&&(c.ktvRunning=!0,requestAnimationFrame(Ho))}function ir(s,l,u){u&&(l=1,c.commentPage=1,c.commentTotal=0);var d=(l-1)*10;c._commentsLoading=!0,c._commentGen=(c._commentGen||0)+1;var m=c._commentGen;U("/comments",{id:s,limit:10,offset:d}).then(function(y){if(m===c._commentGen){if(y.status!==200)throw new Error(y.message||"获取评论失败");if(!(c.currentSong&&String(c.currentSong.id)!==String(s))){var C=y.data;if(c.commentTotal=C.total||0,e("#comment-count").textContent=c.commentTotal?"("+je(c.commentTotal)+")":"",l===1){var S=C.hotComments||[];e("#comment-hot-title").hidden=!S.length,e("#comment-hot-list").innerHTML=S.length?S.map(qo).join(""):'
暂无热门评论
'}var T=C.comments||[];e("#comment-all-list").innerHTML=T.length?T.map(qo).join(""):'
暂无评论
',c.commentPage=l,fp()}}}).catch(function(y){m===c._commentGen&&k(y.message||"获取评论失败","error")}).then(function(){m===c._commentGen&&(c._commentsLoading=!1)},function(){m===c._commentGen&&(c._commentsLoading=!1)})}function fp(){var s=Math.max(1,Math.ceil(c.commentTotal/10)),l=c.commentPage;e("#comment-page-info").textContent="第 "+l+" / "+s+" 页",e("#comment-prev").disabled=l<=1,e("#comment-next").disabled=l>=s,e("#comment-pager").hidden=c.commentTotal<=10}e("#comment-prev").addEventListener("click",function(){c.currentSong&&c.commentPage>1&&ir(c.currentSong.id,c.commentPage-1,!1)}),e("#comment-next").addEventListener("click",function(){c.currentSong&&ir(c.currentSong.id,c.commentPage+1,!1)}),c.commentReply=null;function nn(){var s=e("#comment-composer");if(s){if(s.hidden=!c.personal.authed,!c.personal.authed){c.commentReply=null,e("#comment-reply-to").hidden=!0;return}e("#comment-input").placeholder=c.commentReply?"回复 @"+c.commentReply.nickname+"...":"说点什么吧...(140字以内)"}}function pp(s,l){c.commentReply={id:s,nickname:l},e("#comment-reply-name").textContent=l,e("#comment-reply-to").hidden=!1,nn(),e("#comment-input").focus()}e("#comment-reply-cancel").addEventListener("click",function(){c.commentReply=null,e("#comment-reply-to").hidden=!0,nn()}),document.addEventListener("click",function(s){var l=s.target.closest(".comment-reply-btn");l&&pp(l.getAttribute("data-id"),l.getAttribute("data-nickname"));var u=s.target.closest(".cr-detail");if(u){var d=u.closest(".comment-reply").querySelector(".cr-content");if(!d)return;u.classList.contains("expanded")?(u.classList.remove("expanded"),u.textContent="详情",d.textContent=d.getAttribute("data-short"),d.style.whiteSpace="nowrap",d.style.overflow="hidden"):(u.classList.add("expanded"),u.textContent="收起",d.textContent=d.getAttribute("data-full"),d.style.whiteSpace="normal",d.style.overflow="visible",d.style.wordBreak="break-word")}}),e("#comment-submit").addEventListener("click",function(){if(!c.personal.authed||!c.personal.cookie){k("请先在「个人歌单」扫码登录你的账号后再评论","warning"),we("personal");return}if(!c.currentSong){k("请先解析一首歌曲","warning");return}var s=e("#comment-input").value.trim();if(!s){k("评论内容不能为空","warning"),e("#comment-input").focus();return}if(s.length>140){k("评论内容不能超过 140 字","warning");return}var l=e("#comment-submit"),u=!!c.commentReply,d=l.textContent;l.disabled=!0,l.textContent="发布中...",U("/user/comment",{song_id:c.currentSong.id,content:s,action:u?2:1,comment_id:u?c.commentReply.id:"",user_cookie:c.personal.cookie}).then(function(m){if(m.status!==200)throw new Error(m.message||"评论失败");k(u?"✅ 回复成功":"✅ 评论成功","success"),e("#comment-input").value="",c.commentReply=null,e("#comment-reply-to").hidden=!0,nn(),ir(c.currentSong.id,1,!0)}).catch(function(m){k(m.message||"评论失败","error")}).finally(function(){l.disabled=!1,l.textContent=d})});function qo(s){var l=s.user||{},u="";l.vipType===11||l.vipType===100?u='黑胶VIP':l.vipType===10||l.vipType===110?u='黑胶SVIP':l.vipType===1&&(u='音乐包');var d=l.location?" · "+j(l.location):"",m="";if(s.beReplied&&s.beReplied.length){var y=s.beReplied[0]||{},C=y.nickname||"",S=y.content||"";if(C||S){var T=C||"已删除用户",B=S.length>10?S.slice(0,10)+"…":S;m='
回复@'+j(T)+''+j(B)+""+(S.length>10?'':"")+"
"}}var Pe=c.personal.authed?'':"";return'
`+j(l.nickname||"匿名")+""+u+''+np(s.time)+d+'
'+j(s.content||"")+"
"+m+'
👍 '+je(s.likedCount)+""+Pe+"
"}var pe={};function Hs(s,l,u,d){var m=e("#player");m.hidden=!1;try{var y=e("#podcast-audio");y&&!y.paused&&y.pause()}catch{}var C=m.querySelector("audio");if(C&&(C.pause(),C.removeAttribute("src"),C.load()),e("#player-cover").src=d,e("#player-name").textContent=l,e("#player-artist").textContent=u,e("#player-toggle").textContent="▶",e("#player-duration").textContent="00:00",e("#player-current").textContent="00:00",e("#player-progress-fill").style.width="0%",pe.url=s,typeof pe.volume!="number"&&(pe.volume=.9,pe.muted=!1),$o(),Bs(),c.settings.smtc&&"mediaSession"in navigator&&"MediaMetadata"in window)try{navigator.mediaSession.metadata=new MediaMetadata({title:l,artist:u,album:c.currentSong&&c.currentSong.al_name||"",artwork:d?[{src:d,sizes:"512x512"}]:[]}),navigator.mediaSession.setActionHandler("play",function(){var S=kn();S&&S.paused&&bn()}),navigator.mediaSession.setActionHandler("pause",function(){var S=kn();S&&!S.paused&&bn()}),navigator.mediaSession.setActionHandler("seekto",function(S){var T=kn();T&&S.seekTime!=null&&(T.currentTime=S.seekTime)})}catch{}else if("mediaSession"in navigator)try{navigator.mediaSession.setActionHandler("play",null),navigator.mediaSession.setActionHandler("pause",null),navigator.mediaSession.setActionHandler("seekto",null)}catch{}e("#player").onclick=function(S){S.target.closest(".player-ctrl")||S.target.closest(".progress")||S.target.closest(".volume-btn")||S.target.closest(".volume-slider")||bn()}}function mp(){var s=e("#player");s.hidden=!0;var l=s.querySelector("audio");l&&(l.pause(),l.removeAttribute("src"),l.load())}function kn(){var s=e("#player"),l=s.querySelector("audio");return l||(l=document.createElement("audio"),l.preload="metadata",s.appendChild(l),l.addEventListener("timeupdate",function(){if(e("#player-current").textContent=at(l.currentTime),l.duration&&(e("#player-progress-fill").style.width=l.currentTime/l.duration*100+"%"),Uo(l.currentTime),Bo(),c.settings.progressMemory&&c.currentSong)try{var u="netease_progress_"+c.currentSong.id,d=parseFloat(localStorage.getItem(u)||"0");if(Math.abs(l.currentTime-d)>5){localStorage.setItem(u,l.currentTime);for(var m=[],y=0;y=100&&m.forEach(function(S){localStorage.removeItem(S)})}}catch{}}),l.addEventListener("play",function(){Bo()}),l.addEventListener("loadedmetadata",function(){e("#player-duration").textContent=at(l.duration);try{"mediaSession"in navigator&&navigator.mediaSession.setPositionState({duration:l.duration||0,playbackRate:1,position:l.currentTime||0})}catch{}}),l.addEventListener("ended",function(){e("#player-toggle").textContent="▶",e("#player-progress-fill").style.width="0%",e("#player-current").textContent="00:00";try{"mediaSession"in navigator&&(navigator.mediaSession.playbackState="none")}catch{}if(c.currentSong)try{localStorage.removeItem("netease_progress_"+c.currentSong.id)}catch{}var u=c.global&&c.global.playQueue;if(u&&u.length)if(c.global.playQueueIndex=(c.global.playQueueIndex||0)+1,c.global.playQueueIndex暂无热门评论',e("#comment-all-list").innerHTML='
暂无评论
',c.lyricOffset=0,e("#lyric-offset-label").textContent="偏移 0.00s",c._queueNoResume=!0,k("▶ 正在播放:"+(d.name||""),"info"),bn(),c._queueNoResume=!1}else c.global.playQueue=[],c.global.playQueueIndex=0}),l.addEventListener("play",function(){e("#player-toggle").textContent="⏸";try{"mediaSession"in navigator&&(navigator.mediaSession.playbackState="playing")}catch{}}),l.addEventListener("pause",function(){e("#player-toggle").textContent="▶";try{"mediaSession"in navigator&&(navigator.mediaSession.playbackState="paused")}catch{}}),l.addEventListener("error",function(){k("音频播放失败:可能是链接失效或该格式不支持在线播放","error"),e("#player-toggle").textContent="▶"})),l}function bn(){var s=kn(),l="netease_progress_"+(c.currentSong?c.currentSong.id:"");if(s.paused&&!s.src){if(s.src=pe.url,c.settings.progressMemory&&!c._queueNoResume)try{var u=parseFloat(localStorage.getItem(l));u>0&&(s.currentTime=u)}catch{}s.volume=pe.volume,s.muted=pe.muted}if(s.paused)s.play().catch(function(){k("播放失败,请稍后重试","error")});else if(s.pause(),c.settings.progressMemory)try{localStorage.setItem(l,s.currentTime)}catch{}}e("#player-toggle").addEventListener("click",function(s){s.stopPropagation(),bn()}),e("#player-restart").addEventListener("click",function(s){s.stopPropagation();var l=kn();l.src?(l.currentTime=0,l.paused&&l.play().catch(function(){})):bn()}),e("#player-progress").addEventListener("click",function(s){var l=this.getBoundingClientRect(),u=(s.clientX-l.left)/l.width,d=kn();d.src&&d.duration&&(d.currentTime=u*d.duration)});function $o(){e("#player-volume-fill").style.width=pe.volume*100+"%"}function Bs(){e("#player-mute").textContent=pe.muted?"🔇":"🔊";var s=e("#player audio");s&&(s.muted=pe.muted,s.volume=pe.volume)}e("#player-volume").addEventListener("click",function(s){var l=this.getBoundingClientRect();pe.volume=Math.max(0,Math.min(1,(s.clientX-l.left)/l.width)),pe.muted=!1,$o(),Bs()}),e("#player-mute").addEventListener("click",function(s){s.stopPropagation(),pe.muted=!pe.muted,Bs()});function Vo(s,l){if(!s){k("无法获取音乐ID","error");return}Te()&&Os(s).then(function(u){k("正在准备下载:"+(l||s)+"("+ni(u)+")...","info"),Qo(s,l,u)})}function Qo(s,l,u){var d=me.some(function(C){return C.label==="单曲 · "+(l||s)&&(C.status==="queued"||C.status==="running"||C.status==="paused")});if(d){k("这首歌已在下载队列中,请勿重复提交","warning");return}var m=P(),y=or();U("/download",{id:s,quality:u,task_id:y,device_id:ht(),account:c.parseAccount,user_cookie:c.parseAccount==="user"?c.personal.cookie:"",filename_format:m.filename_format,write_meta:m.write_meta,meta_fields:m.meta_fields,lyric_format:m.lyric_format,zip:m.zip}).then(function(C){if(C.status===401&&c.parseAccount==="user"){c.parseAccount="admin";try{localStorage.setItem("netease_parse_account","admin")}catch{}G(),rn(),k("个人账号未登录或已失效,已自动切换为全局账号下载","warning"),Qo(s,l,u);return}if(C.status!==200){k(C.message||"下载提交失败","error");return}cr({id:y,type:"single",label:"单曲 · "+(l||s),total:1,done:0,status:"queued"})}).catch(function(){k("下载提交失败,请检查网络","error")})}function hp(s,l){if(l==="srt"){let u=function(d){var m=Math.floor(d/3600),y=Math.floor(d%3600/60),C=Math.floor(d%60),S=Math.round((d-Math.floor(d))*1e3);return S>=1e3&&(S=999),String(m).padStart(2,"0")+":"+String(y).padStart(2,"0")+":"+String(C).padStart(2,"0")+","+String(S).padStart(3,"0")};return s.map(function(d,m){var y=s[m+1]?s[m+1].time:d.time+5;return y<=d.time&&(y=d.time+1),m+1+` `+u(d.time)+" --> "+u(y)+` `+d.text+` `}).join(` `)}return s.map(function(u){var d=Math.floor(u.time/60),m=u.time-d*60,y=Math.round((m-Math.floor(m))*1e3);return"["+String(d).padStart(2,"0")+":"+String(Math.floor(m)).padStart(2,"0")+"."+String(Math.min(y,999)).padStart(3,"0")+"]"+u.text.replace(/\n/g," / ")}).join(` `)}e("#detail-lyric-download").addEventListener("click",function(){if(!c.currentSong||!c.lyrics.length){k("暂无歌词可下载","warning");return}var s=c.settings.lyricFormat==="srt"?"srt":"lrc",l=hp(c.lyrics,s),u=new Blob([l],{type:"text/plain;charset=utf-8"}),d=URL.createObjectURL(u),m=document.createElement("a");m.href=d,m.download=(c.currentSong.name||"lyric")+"."+s,document.body.appendChild(m),m.click(),document.body.removeChild(m),setTimeout(function(){URL.revokeObjectURL(d)},3e3),k("歌词已下载("+s.toUpperCase()+")","success")});function Wo(s){var l=document.createElement("textarea");l.value=s,document.body.appendChild(l),l.select();try{var u=document.execCommand("copy");u?k("已复制到剪贴板","success"):k("复制失败,请手动复制","error")}catch{k("复制失败,请手动复制","error")}document.body.removeChild(l)}function sr(s){return c.collGen=c.collGen||{},c.collGen[s]=(c.collGen[s]||0)+1,c.collGen[s]}function lt(s,l){return c.collGen[s]!==l}function si(){if(pt()){var s=e("#playlist-input").value.trim(),l=Ze(s);if(!l){k("请输入歌单ID或链接","warning"),e("#playlist-input").focus();return}var u=e("#playlist-btn"),d=sr("playlist");V(u,!0,"解析中..."),U("/playlist",{id:l}).then(function(m){if(!lt("playlist",d)){if(m.status!==200)throw new Error(m.data&&m.data.msg||m.message||"歌单解析失败");Go("playlist",m.data.playlist)}}).catch(function(m){lt("playlist",d)||k(m.message||"歌单解析失败","error")}).then(function(){V(u,!1)},function(){V(u,!1)})}}function vp(s,l){e("#playlist-input").value=s,we("playlist"),e("#playlist-input").focus(),l&&k("正在解析歌单:"+l,"info"),si()}function qs(){if(pt()){var s=e("#album-input").value.trim(),l=Ze(s);if(!l){k("请输入专辑ID或链接","warning"),e("#album-input").focus();return}var u=e("#album-btn"),d=sr("album");V(u,!0,"解析中..."),U("/album",{id:l}).then(function(m){if(!lt("album",d)){if(m.status!==200)throw new Error(m.data&&m.data.msg||m.message||"专辑解析失败");Go("album",m.data.album)}}).catch(function(m){lt("album",d)||k(m.message||"专辑解析失败","error")}).then(function(){V(u,!1)},function(){V(u,!1)})}}function gp(s,l){e("#album-input").value=s,we("album"),e("#album-input").focus(),l&&k("正在解析专辑:"+l,"info"),qs()}function yp(s,l){return'
'+l+'
'+j(s.name)+''+j(s.album||"")+'
'+j(s.artists||"")+'
'}var ai=10;function Nn(s,l,u){l=l||[];var d=l.length,m=Math.max(1,Math.ceil(d/ai));u=Math.max(1,Math.min(u||1,m));var y=(u-1)*ai,C=l.slice(y,y+ai),S=e("#"+s+"-tracks");C.length?S.innerHTML=C.map(function(Pe,$e){return yp(Pe,y+$e+1)}).join(""):S.innerHTML='
📄
暂无歌曲(可能为受版权保护的歌曲)
';var T=e("#"+s+"-pager");T&&(T.hidden=d<=ai,e("#"+s+"-page-info").textContent="第 "+u+" / "+m+" 页",e("#"+s+"-prev").disabled=u<=1,e("#"+s+"-next").disabled=u>=m);var B=e("#"+s+"-download-all");return B&&d&&(B.textContent="⬇ 批量下载全部(共 "+d+" 首)"),c["page_"+s]=u,c["tracks_"+s]=l,u}["playlist","album","artist","personal","global"].forEach(function(s){e("#"+s+"-prev").addEventListener("click",function(){Nn(s,c["tracks_"+s],c["page_"+s]-1)}),e("#"+s+"-next").addEventListener("click",function(){Nn(s,c["tracks_"+s],c["page_"+s]+1)})});function Go(s,l){if(!l){k("解析结果为空","error");return}var u=s;["playlist","album","artist"].forEach(function(C){e("#"+C+"-result").hidden=!0});var d=e("#"+u+"-result");d.hidden=!1;var m=l.tracks||l.songs||[],y=u==="playlist";l.incomplete&&l.missing&&k("注意:该歌单不完整,缺少 "+l.missing+" 首(可能版权受限或接口失败)","warning"),c.currentCollection={type:u,id:l.id,name:l.name},e("#"+u+"-cover").src=l.coverImgUrl||"",e("#"+u+"-name").textContent=l.name||"未知",y?(e("#playlist-creator").textContent="by "+(l.creator||"未知"),e("#playlist-count").textContent=l.trackCount!=null?l.trackCount:m.length,e("#playlist-desc").hidden=!(l.description&&l.description.trim()),e("#playlist-desc").hidden||(e("#playlist-desc").textContent=l.description)):(e("#album-artist").textContent=l.artist?"歌手:"+l.artist:"",e("#album-count").textContent=m.length,e("#album-desc").hidden=!(l.description&&l.description.trim()),e("#album-desc").hidden||(e("#album-desc").textContent=l.description)),Nn(u,m,1),hi(),window.scrollTo({top:d.offsetTop-80,behavior:"smooth"})}e("#playlist-btn").addEventListener("click",si),e("#playlist-input").addEventListener("keydown",function(s){s.key==="Enter"&&si()}),e("#album-btn").addEventListener("click",qs),e("#album-input").addEventListener("keydown",function(s){s.key==="Enter"&&qs()});function $s(){if(pt()){var s=e("#artist-input").value.trim(),l=Ze(s);if(!l){k("请输入歌手ID或链接","warning"),e("#artist-input").focus();return}var u=e("#artist-btn"),d=sr("artist");V(u,!0,"解析中..."),U("/artist_songs",{id:l}).then(function(m){if(!lt("artist",d)){if(m.status!==200)throw new Error(m.data&&m.data.msg||m.message||"歌手解析失败");wp(m.data)}}).catch(function(m){lt("artist",d)||k(m.message||"歌手解析失败","error")}).then(function(){V(u,!1)},function(){V(u,!1)})}}function xp(s,l){e("#artist-input").value=s,we("artist"),e("#artist-input").focus(),l&&k("正在解析歌手:"+l,"info"),$s()}function wp(s){["playlist","album","artist"].forEach(function(m){e("#"+m+"-result").hidden=!0});var l=e("#artist-result");l.hidden=!1;var u=s.artist||{},d=s.songs||[];e("#artist-cover").src=u.picUrl||"",e("#artist-name").textContent=u.name||"未知歌手",e("#artist-alias").textContent=u.alias||"",e("#artist-count").textContent=u.musicSize!=null?u.musicSize:d.length,e("#artist-desc").hidden=!(u.briefDesc&&u.briefDesc.trim()),e("#artist-desc").hidden||(e("#artist-desc").textContent=u.briefDesc),d.length?Nn("artist",d,1):e("#artist-tracks").innerHTML='
🎤
该歌手暂无热门歌曲
',window.scrollTo({top:l.offsetTop-80,behavior:"smooth"})}e("#artist-btn").addEventListener("click",$s),e("#artist-input").addEventListener("keydown",function(s){s.key==="Enter"&&$s()}),c.toplistLoaded=!1;function Ko(){if(!pt()){var s=document.getElementById("toplist-loading");s&&(s.innerHTML='
🔒
请先登录后查看榜单
');return}c.toplistLoaded||(e("#toplist-loading").hidden=!1,e("#toplist-grid").hidden=!0,U("/toplist",{}).then(function(l){if(l.status!==200)throw new Error(l.message||"获取榜单失败");var u=l.data||[];c.toplistLoaded=!0,jp(u)}).catch(function(l){e("#toplist-loading").hidden=!1,e("#toplist-loading").innerHTML='
📊
'+j(l.message||"获取榜单失败")+'
'}))}function jp(s){var l=e("#toplist-grid");if(!s||!s.length){l.hidden=!0,e("#toplist-loading").hidden=!1,e("#toplist-loading").innerHTML='
📊
暂无榜单数据
';return}e("#toplist-loading").hidden=!0,l.hidden=!1,l.innerHTML=s.map(function(u){return'
'+j(u.name)+'
'+j(u.updateFrequency||"")+(u.playCount?" · 播放 "+je(u.playCount):"")+"
"}).join("")}e("#toplist-grid").addEventListener("click",function(s){var l=s.target.closest(".toplist-card");if(l){var u=l.getAttribute("data-id"),d=l.getAttribute("data-name");k("正在加载榜单:"+d,"info"),e("#playlist-input").value=u,we("playlist"),si()}}),document.addEventListener("click",function(s){s.target.closest("#toplist-retry")&&(c.toplistLoaded=!1,e("#toplist-loading").innerHTML="",Ko())});var Yo={categories:[]};function kp(s){return'
'+j(s.name)+'
'+j(s.category||"播客")+(s.program_count?" · "+j(s.program_count)+" 集":"")+(s.sub_count_text&&s.sub_count_text!=="0"?" · 订阅 "+j(s.sub_count_text):"")+"
"}function bp(){var s=e("#podcast-cate-bar"),l=[{id:null,name:"热门推荐"}].concat(Yo.categories);s.innerHTML=l.map(function(u){var d=u.id==null&&!c.podcast.hotCate||String(u.id)===String(c.podcast.hotCate||"");return''+j(u.name)+""}).join("")}var li=!1;function Vs(s,l){var u=e("#podcast-hot-grid");if(!(l&&li)){var d='
🎙️
加载中...
';l||(u.innerHTML=d),li=!0,U("/podcast/hot",{limit:30,offset:l?c.podcast.hotOffset:0,cate_id:s||""}).then(function(m){if(m.status!==200)throw new Error(m.message||"获取热门播客失败");var y=m.data||{};y.categories&&y.categories.length&&(Yo.categories=y.categories),c.podcast.hotLoaded=!0,c.podcast.hotCate=s||null,c.podcast.hotOffset=(l?c.podcast.hotOffset:0)+(y.radios||[]).length,bp();var C=(y.radios||[]).map(kp).join("");l?u.insertAdjacentHTML("beforeend",C):u.innerHTML=C||'
🎙️
该分类暂无热门播客
',e("#podcast-hot-more-wrap").hidden=!(y.radios||[]).length||!y.has_more}).catch(function(m){l||(u.innerHTML='
😕
'+j(m.message||"加载失败")+"
"),k(m.message||"获取热门播客失败","error")}).then(function(){li=!1},function(){li=!1})}}e("#podcast-cate-bar").addEventListener("click",function(s){var l=s.target.closest(".podcast-cate-item");if(l){var u=l.getAttribute("data-cate-id");Vs(u||null,!1)}}),e("#podcast-hot-more").addEventListener("click",function(){Vs(c.podcast.hotCate,!0)}),e("#podcast-hot-grid").addEventListener("click",function(s){var l=s.target.closest(".toplist-card");l&&(e("#podcast-input").value=l.getAttribute("data-radio-id"),ci())});var oi=0;function ci(){if(pt()&&Te()){var s=e("#podcast-input").value.trim();if(!s){k("请输入播客电台/单集链接或ID","warning");return}var l=e("#podcast-btn"),u=++oi;V(l,!0,"解析中..."),ui(!0),e("#podcast-radio-result").hidden=!0,e("#podcast-program-result").hidden=!0,U("/podcast/parse",{id:s,quality:e("#podcast-quality").value}).then(function(d){if(u===oi){if(d.status!==200)throw new Error(d.message||"解析失败");var m=d.data||{};m.kind==="radio"?Np(m):Xo(m.program)}}).catch(function(d){u===oi&&k(d.message||"解析失败","error")}).finally(function(){V(l,!1),u===oi&&ui(!1)})}}function ui(s){e("#podcast-loading").hidden=!s}e("#podcast-btn").addEventListener("click",ci),e("#podcast-input").addEventListener("keydown",function(s){s.key==="Enter"&&ci()});function Np(s){var l=s.radio||{};c.podcast.radio=l,c.podcast.radioId=l.id,c.podcast.offset=(s.programs||[]).length,c.podcast.count=s.count||0,c.podcast.asc=!0,e("#podcast-radio-cover").src=l.pic_url||"",e("#podcast-radio-name").textContent=l.name||"",e("#podcast-radio-meta").textContent="主播:"+(l.dj_name||"未知")+(l.category?" · 分类:"+l.category:"")+(l.program_count?" · 共 "+l.program_count+" 集":"")+(l.sub_count_text&&l.sub_count_text!=="0"?" · 订阅 "+l.sub_count_text:""),e("#podcast-radio-desc").textContent=l.desc||"",e("#podcast-radio-desc").hidden=!l.desc,e("#podcast-radio-order").textContent="⇅ 最新在前",Qs(s.programs||[],!1),e("#podcast-radio-result").hidden=!1,e("#podcast-program-result").hidden=!0,e("#podcast-search-result").hidden=!0}function Sp(s,l){var u=s.serial_num||l+1,d=[];return s.duration_text&&d.push(s.duration_text),s.create_date&&d.push(s.create_date),s.listener_count_text&&s.listener_count_text!=="0"&&d.push("收听 "+s.listener_count_text),'
'+j(u)+'
'+j(s.name)+'
'+j(d.join(" · "))+'
'}function Qs(s,l){var u=e("#podcast-episodes"),d=s.map(Sp).join("");l?u.insertAdjacentHTML("beforeend",d):u.innerHTML=d||'
该电台暂无单集
',e("#podcast-episode-count").textContent=c.podcast.count?c.podcast.count+" 集":"",e("#podcast-more-wrap").hidden=!c.podcast.count||c.podcast.offset>=c.podcast.count}var di=!1;e("#podcast-more").addEventListener("click",function(){di||(di=!0,U("/podcast/programs",{radio_id:c.podcast.radioId,limit:30,offset:c.podcast.offset,asc:c.podcast.asc}).then(function(s){if(s.status!==200)throw new Error(s.message||"加载失败");var l=s.data||{};c.podcast.offset+=(l.programs||[]).length,Qs(l.programs||[],!0)}).catch(function(s){k(s.message||"加载更多失败","error")}).then(function(){di=!1},function(){di=!1}))}),e("#podcast-radio-order").addEventListener("click",function(){var s=c.podcast.asc,l=c.podcast.offset;c.podcast.asc=!c.podcast.asc,this.textContent=c.podcast.asc?"⇅ 最新在前":"⇅ 第1集在前",c.podcast.offset=0,U("/podcast/programs",{radio_id:c.podcast.radioId,limit:30,offset:0,asc:c.podcast.asc}).then(function(u){if(u.status!==200)throw new Error(u.message||"加载失败");var d=u.data||{};c.podcast.offset=(d.programs||[]).length,Qs(d.programs||[],!1)}).catch(function(u){c.podcast.asc=s,c.podcast.offset=l,e("#podcast-radio-order").textContent=c.podcast.asc?"⇅ 最新在前":"⇅ 第1集在前",k(u.message||"切换排序失败","error")})}),e("#podcast-radio-zip").addEventListener("click",function(){if(Te()&&c.podcast.radioId){var s=c.podcast.radio&&c.podcast.radio.name||c.podcast.radioId,l=window.getSITECredits&&window.getSITECredits()||0,u=Math.min(500,c.podcast.count||200);if(l<0){window.handleAuthExpired&&window.handleAuthExpired("请先登录后再使用打包下载",!1);return}if(l>=0){if(l<=0){window.handleAuthExpired&&window.handleAuthExpired("",!0);return}if(l'+j(d.level_name||d.level||"标准")+''+j((d.type||"mp3").toUpperCase())+" · "+j(d.size_formatted||"")+""+(d.br?''+Math.round(d.br/1e3)+" kbps":""):'未获取到音频直链';var S=e("#podcast-audio");if(C){try{var T=e("#player audio");T&&!T.paused&&T.pause()}catch{}S.src=d.url,S.hidden=!1;try{typeof pe.volume=="number"&&(S.volume=pe.volume,S.muted=!!pe.muted)}catch{}y.href=d.url,y.hidden=!1,S.onerror=function(){k("试听链接已过期或失效,请重新点击「试听」刷新","warning")},S.play().catch(function(){})}else S.removeAttribute("src"),S.hidden=!0,y.hidden=!0;e("#podcast-program-tip").hidden=!!C,e("#podcast-program-tip").textContent="该单集暂无可用音频(可能已下架或受版权限制)",e("#podcast-program-result").hidden=!1,e("#podcast-radio-result").hidden=!0}function Zo(s,l,u,d){var m=function(){d&&V(d,!1)};d&&V(d,!0,"..."),ui(!0),U("/podcast/parse",{id:s,quality:e("#podcast-quality").value}).then(function(y){if(y.status!==200)throw new Error(y.message||"解析失败");Xo((y.data||{}).program)}).catch(function(y){k(y.message||"解析失败","error")}).finally(function(){ui(!1),m()})}function Ep(s,l,u){var d=function(){u&&V(u,!1)};u&&V(u,!0,"..."),U("/podcast/parse",{id:s,quality:e("#podcast-quality").value}).then(function(m){if(m.status!==200)throw new Error(m.message||"解析失败");var y=((m.data||{}).program||{}).audio;if(!y||!y.url)throw new Error("未获取到音频直链");try{navigator.clipboard.writeText(y.url).then(function(){k("直链已复制:"+l,"success")}).catch(function(){Wo(y.url)})}catch{Wo(y.url)}}).catch(function(m){k(m.message||"获取直链失败","error")}).finally(d)}function Jo(s,l){if(pt()&&Te()){var u=or();U("/podcast/download",{id:s,quality:e("#podcast-quality").value,task_id:u,device_id:ht()}).then(function(d){if(d.status!==200)throw new Error(d.message||"提交失败");cr({id:u,type:"single",label:"播客 · "+(l||s),total:1,done:0,status:"queued"}),k("下载任务已提交:"+l,"success")}).catch(function(d){k(d.message||"下载提交失败","error")})}}e("#podcast-program-download").addEventListener("click",function(){var s=c.podcast.program;s&&Jo(s.id,s.name)});function ec(){if(pt()){var s=e("#podcast-search-input").value.trim();if(!s){k("请输入搜索关键词","warning");return}var l=e("#podcast-search-btn");V(l,!0,"搜索中..."),U("/podcast/search",{keyword:s,limit:20,type:"all"}).then(function(u){if(u.status!==200)throw new Error(u.message||"搜索失败");var d=u.data||{},m=d.radios||[],y=d.voices||[],C=m.map(function(T){var B=[];return T.dj_name&&B.push("主播 "+T.dj_name),T.program_count&&B.push(T.program_count+" 集"),T.sub_count_text&&T.sub_count_text!=="0"&&B.push("订阅 "+T.sub_count_text),'
'+j(T.name)+'
'+j(B.join(" · "))+'
'}).join("");C+=y.map(function(T){var B=[];return T.radio_name&&B.push("来自「"+T.radio_name+"」"),T.duration_text&&B.push(T.duration_text),T.create_date&&B.push(T.create_date),'
'+j(T.name)+'
'+j(B.join(" · "))+'
'}).join(""),e("#podcast-search-list").innerHTML=C||'
未找到相关播客
',e("#podcast-search-count").textContent=m.length+y.length+" 条";var S=e("#podcast-search-tip");!y.length&&m.length?(S.textContent="💡 受网易接口限制,单集(声音)搜索可能无结果;可先解析电台后浏览全部单集。",S.hidden=!1):S.hidden=!0,e("#podcast-search-result").hidden=!1}).catch(function(u){k(u.message||"搜索失败","error")}).finally(function(){V(l,!1)})}}e("#podcast-search-btn").addEventListener("click",ec),e("#podcast-search-input").addEventListener("keydown",function(s){s.key==="Enter"&&ec()}),e("#podcast-search-list").addEventListener("click",function(s){var l=s.target.closest("button[data-search-radio]");if(l){e("#podcast-input").value=l.getAttribute("data-search-radio"),ci(),window.scrollTo({top:0,behavior:"smooth"});return}var u=s.target.closest("button[data-search-voice]");u&&Zo(u.getAttribute("data-search-voice"),u.getAttribute("data-voice-name"),!0,u)});function Cp(){var s=e("#about-version");s&&Tt[0]&&(s.textContent="v"+Tt[0].v),e("#about-changelog").innerHTML=Tt.map(function(l){return'
v'+l.v+''+l.date+'
    '+l.items.map(function(u){return"
  • "+j(u)+"
  • "}).join("")+"
"}).join("")}function tc(){U("/admin/cookie/status",{}).then(function(s){if(s.status!==200)throw new Error(s.message||"需要管理员权限");c.adminAuthed=!0,e("#admin-gate").hidden=!0,e("#admin-content").hidden=!1,k("验证成功,欢迎进入管理员设置","success"),fi(),mi()}).catch(function(s){k("请先用管理员账号登录站点,管理功能已并入「管理后台」页签","error")})}function fi(){U("/admin/cookie/status",{}).then(function(s){if(s.status!==200)throw new Error(s.message||"获取状态失败");var l=s.data||{},u=e("#admin-status-badge"),d=e("#admin-status-desc");l.is_valid?(u.textContent="有效",u.style.borderColor="var(--color-success)",u.style.color="var(--color-success)",u.style.background="rgba(82,196,26,0.1)",d.textContent="已登录,Cookie 自动保存,无需重复扫码。"):(u.textContent="未登录",u.style.borderColor="var(--color-error)",u.style.color="var(--color-error)",u.style.background="rgba(255,77,79,0.1)",d.textContent=l.file_exists?"Cookie 文件存在但缺少关键字段,建议重新扫码登录。":"尚未配置 Cookie,请扫码登录。"),e("#admin-cookie-file").textContent=l.file_path||"-";var m=[];l.cookie_count!=null&&m.push("Cookie "+l.cookie_count+" 个"),l.last_modified&&m.push("最后更新 "+l.last_modified),l.important_cookies_present&&l.important_cookies_present.length&&m.push("包含 "+l.important_cookies_present.join(", ")),e("#admin-cookie-time").textContent=m.join(" · ")||"-"}).catch(function(s){k(s.message||"获取 Cookie 状态失败","error")})}function Pt(){c.adminQrTimer&&(clearInterval(c.adminQrTimer),c.adminQrTimer=null)}function _p(){c.adminAuthed&&(V(e("#admin-qr-btn"),!0,"生成中..."),U("/admin/qr/create",{}).then(function(s){if(s.status!==200)throw new Error(s.message||"生成二维码失败");var l=s.data;c.adminUnikey=l.unikey;var u=l.qr_svg||"",d="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)));e("#admin-qr-img").src=d,e("#admin-qr-area").hidden=!1,e("#admin-qr-status").textContent="请使用网易云音乐手机 APP 扫描二维码登录",e("#admin-qr-status").style.color="",k("二维码已生成,请用手机扫码","info"),Pt(),c.adminQrGen=(c.adminQrGen||0)+1,c.adminQrTimer=setInterval(Lp,3e3)}).catch(function(s){k(s.message||"生成二维码失败","error")}).finally(function(){V(e("#admin-qr-btn"),!1)}))}function Lp(){if(!c.adminUnikey){Pt();return}c.adminQrGen=(c.adminQrGen||0)+1;var s=c.adminQrGen;U("/admin/qr/check",{unikey:c.adminUnikey}).then(function(l){if(s===c.adminQrGen){if(l.status!==200){Pt(),e("#admin-qr-status").textContent=l.message||"检查登录状态失败",e("#admin-qr-status").style.color="var(--color-error)";return}var u=l.data.status;u==="waiting"?(e("#admin-qr-status").textContent="等待扫码...",e("#admin-qr-status").style.color=""):u==="scanned"?(e("#admin-qr-status").textContent="✅ 已扫码,请在手机上确认登录",e("#admin-qr-status").style.color="var(--color-warning)"):u==="success"?(Pt(),e("#admin-qr-status").textContent="🎉 登录成功,Cookie 已自动保存",e("#admin-qr-status").style.color="var(--color-success)",k("登录成功,Cookie 已自动保存","success"),fi(),G()):u==="expired"?(Pt(),e("#admin-qr-status").textContent="二维码已过期,请点击「生成登录二维码」重新获取",e("#admin-qr-status").style.color="var(--color-error)"):(Pt(),e("#admin-qr-status").textContent=l.message||"登录状态异常",e("#admin-qr-status").style.color="var(--color-error)")}}).catch(function(l){s===c.adminQrGen&&(Pt(),e("#admin-qr-status").textContent=l.message||"检查登录状态失败",e("#admin-qr-status").style.color="var(--color-error)")})}function Tp(){c.adminAuthed&&window.confirm(`确定要删除当前 Cookie 吗? 删除后将需要重新扫码登录。`)&&(V(e("#admin-cookie-delete"),!0,"删除中..."),U("/admin/cookie/delete",{}).then(function(s){if(s.status!==200)throw new Error(s.message||"删除失败");Pt(),c.adminQrGen=(c.adminQrGen||0)+1,e("#admin-qr-area").hidden=!0,c.adminUnikey="",k("Cookie 已删除,可重新扫码登录","success"),fi(),G()}).catch(function(s){k(s.message||"删除 Cookie 失败","error")}).finally(function(){V(e("#admin-cookie-delete"),!1)}))}e("#admin-enter").addEventListener("click",tc),e("#admin-password").addEventListener("keydown",function(s){s.key==="Enter"&&tc()}),e("#admin-qr-btn").addEventListener("click",_p),e("#admin-cookie-delete").addEventListener("click",Tp),e("#admin-status-refresh").addEventListener("click",fi);var pi=1;function mi(){c.adminAuthed&&U("/admin/logs",{page:pi,page_size:10}).then(function(s){if(s.status!==200)throw new Error(s.message||"获取记录失败");var l=s.data,u=e("#admin-logs-list");!l.items||!l.items.length?u.innerHTML='
暂无解析/下载记录
':u.innerHTML=l.items.map(function(m){var y=m.action==="下载"?' style="border-color:var(--color-success);color:var(--color-success);background:rgba(82,196,26,0.1);"':' style="border-color:var(--color-primary);color:var(--color-primary);background:var(--color-primary-bg);"';return'
"+j(m.action||"-")+''+j(m.ip||"-")+''+j(m.song||"")+''+j(m.time||"")+"
"}).join("");var d=Math.max(1,l.pages||1);e("#admin-logs-info").textContent="第 "+l.page+" / "+d+" 页",e("#admin-logs-prev").disabled=l.page<=1,e("#admin-logs-next").disabled=l.page>=d,e("#admin-logs-pager").hidden=l.total<=10}).catch(function(s){k(s.message||"获取记录失败","error")})}e("#admin-logs-refresh").addEventListener("click",mi),e("#admin-logs-prev").addEventListener("click",function(){pi>1&&(pi--,mi())}),e("#admin-logs-next").addEventListener("click",function(){pi++,mi()});function Ws(){U("/user/status",{user_cookie:c.personal.cookie}).then(function(s){if(s.status!==200)throw new Error(s.message||"获取登录状态失败");var l=s.data||{},u=l.cookie||{};u.is_valid&&l.user?(c.personal.authed=!0,c.personal.user=l.user,e("#personal-gate").hidden=!0,e("#personal-content").hidden=!1,rc(),Gs(),G(),hi(),nn()):ar(u.is_valid)}).catch(function(s){k(s.message||"获取登录状态失败","error"),ar(!1)})}function ar(s){c.personal.authed=!1,e("#personal-content").hidden=!0,e("#personal-gate").hidden=!1,e("#personal-qr-area").hidden=!0,e("#personal-refresh").hidden=!s,hi(),nn(),s?(e("#personal-gate-hint").textContent="检测到登录信息已失效(或未关联有效账号),请重新扫码登录。",e("#personal-refresh").hidden=!1):(e("#personal-gate-hint").innerHTML="扫码登录你自己的网易云账号,即可查看收藏的歌单(包括「我喜欢的音乐」)。个人登录仅用于获取你的歌单,解析与下载音乐仍使用管理员全局账号。",e("#personal-refresh").hidden=!0)}function nc(s){return s===11||s===100?'黑胶VIP':s===10||s===110?'黑胶SVIP':s===1?'音乐包':'普通用户'}function rc(){var s=c.personal.user||{};e("#personal-avatar").src=s.avatarUrl||"",e("#personal-nickname").innerHTML=j(s.nickname||"未命名用户")+" "+nc(s.vipType),e("#personal-signature").textContent=s.signature||"",rn()}function rn(){var s=e("#personal-toggle-account");c.parseAccount==="user"?(s.textContent="切换为全局账号解析",s.className="btn btn-sm btn-primary"):(s.textContent="切换为个人账号解析",s.className="btn btn-sm")}e("#personal-toggle-account").addEventListener("click",function(){if(c.parseAccount==="admin"){if(!c.personal.authed){k("请先在「个人歌单」扫码登录你自己的账号","warning");return}c.parseAccount="user",k("已切换为个人账号解析与下载(全局菜单均生效)","success")}else c.parseAccount="admin",k("已切换为全局账号解析与下载","success");try{localStorage.setItem("netease_parse_account",c.parseAccount)}catch{}rn(),G()});function Gs(){U("/user/playlists",{user_cookie:c.personal.cookie}).then(function(s){if(s.status!==200)throw new Error(s.message||"获取歌单失败");c.personal.user=s.data.user,rc(),Pp(s.data.playlists||[])}).catch(function(s){s.message&&s.message.indexOf("请先扫码")!==-1?(k(s.message,"warning"),ar(!1)):k(s.message||"获取歌单失败","error")})}function Pp(s){c.personal.playlists=s;var l=e("#personal-playlists");if(e("#personal-playlist-count").textContent="共 "+s.length+" 个",!s.length){l.innerHTML='
📂
暂无歌单
';return}l.innerHTML=s.map(function(u){var d="";return u.specialType===5?d='❤️ 我喜欢的音乐':u.is_own?d='我创建的':d='收藏的','
'+j(u.name)+" "+d+'
'+je(u.trackCount)+" 首 · 播放 "+je(u.playCount)+(u.creator?" · by "+j(u.creator):"")+'
'}).join("")}function ic(s,l){if(s){c.personal.current={id:s,name:l};var u=sr("personal");e("#personal-tracks-wrap").hidden=!1,e("#personal-tracks-title").textContent="歌单歌曲:"+(l||s),e("#personal-tracks").innerHTML='
⏳
加载中...
',window.scrollTo({top:e("#personal-tracks-wrap").offsetTop-80,behavior:"smooth"}),U("/user/playlist",{id:s,user_cookie:c.personal.cookie}).then(function(d){if(!lt("personal",u)){if(d.status!==200)throw new Error(d.data&&d.data.msg||d.message||"获取歌单失败");Ip(d.data.playlist||{})}}).catch(function(d){lt("personal",u)||(e("#personal-tracks").innerHTML='
❌
'+j(d.message||"获取歌单失败")+"
")})}}function Ip(s){var l=s.tracks||[];Nn("personal",l,1)}function mt(){c.personal.qrTimer&&(clearInterval(c.personal.qrTimer),c.personal.qrTimer=null)}function Mp(){V(e("#personal-qr-btn"),!0,"生成中..."),U("/user/qr/create",{}).then(function(s){if(s.status!==200)throw new Error(s.message||"生成二维码失败");var l=s.data;c.personal.unikey=l.unikey;var u="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(l.qr_svg||"")));e("#personal-qr-img").src=u,e("#personal-qr-area").hidden=!1,e("#personal-qr-status").textContent="请使用网易云音乐手机 APP 扫描二维码登录",e("#personal-qr-status").style.color="",k("二维码已生成,请用手机扫码","info"),mt(),c.personal.qrGen=(c.personal.qrGen||0)+1,c.personal.qrTimer=setInterval(zp,3e3)}).catch(function(s){k(s.message||"生成二维码失败","error")}).finally(function(){V(e("#personal-qr-btn"),!1)})}function zp(){if(!c.personal.unikey){mt();return}var s=c.personal.qrGen;U("/user/qr/check",{unikey:c.personal.unikey}).then(function(l){if(s===c.personal.qrGen){if(l.status!==200){mt(),e("#personal-qr-status").textContent=l.message||"检查登录状态失败",e("#personal-qr-status").style.color="var(--color-error)";return}var u=l.data.status;if(u==="waiting")e("#personal-qr-status").textContent="等待扫码...",e("#personal-qr-status").style.color="";else if(u==="scanned")e("#personal-qr-status").textContent="✅ 已扫码,请在手机上确认登录",e("#personal-qr-status").style.color="var(--color-warning)";else if(u==="success"){if(mt(),l.data&&l.data.cookie){c.personal.cookie=l.data.cookie;try{localStorage.setItem("netease_user_cookie",c.personal.cookie)}catch{}}e("#personal-qr-status").textContent="🎉 登录成功,正在加载你的歌单...",e("#personal-qr-status").style.color="var(--color-success)",k("登录成功,正在加载你的歌单","success"),Ws()}else u==="expired"?(mt(),e("#personal-qr-status").textContent="二维码已过期,请点击「扫码登录我的账号」重新获取",e("#personal-qr-status").style.color="var(--color-error)"):(mt(),e("#personal-qr-status").textContent=l.message||"登录状态异常",e("#personal-qr-status").style.color="var(--color-error)")}}).catch(function(l){mt(),e("#personal-qr-status").textContent=l.message||"检查登录状态失败",e("#personal-qr-status").style.color="var(--color-error)"})}function Ap(){window.confirm(`确定要退出登录当前网易云账号吗? 退出后需要重新扫码才能查看个人歌单。`)&&U("/user/logout",{}).then(function(s){if(s.status!==200)throw new Error(s.message||"退出失败");mt(),c.personal.qrGen=(c.personal.qrGen||0)+1,c.personal.authed=!1,c.personal.user=null,c.personal.playlists=[],c.personal.current=null,c.personal.cookie="";try{localStorage.removeItem("netease_user_cookie")}catch{}if(e("#personal-tracks-wrap").hidden=!0,c.parseAccount==="user"){c.parseAccount="admin";try{localStorage.setItem("netease_parse_account","admin")}catch{}k("已退出个人账号,解析账号已切换为全局账号","warning")}else k("已退出登录","success");rn(),G(),ar(!1)}).catch(function(s){k(s.message||"退出登录失败","error")})}e("#personal-qr-btn").addEventListener("click",Mp),e("#personal-refresh").addEventListener("click",Ws),e("#personal-logout").addEventListener("click",Ap),e("#personal-playlists-refresh").addEventListener("click",Gs),e("#personal-playlists").addEventListener("click",function(s){if(!s.target.closest(".act-uncollect")){var l=s.target.closest(".act-personal-open"),u=s.target.closest(".personal-pl");l?ic(l.getAttribute("data-id"),l.getAttribute("data-name")):u&&ic(u.getAttribute("data-id"),u.getAttribute("data-name"))}}),e("#personal-download-all").addEventListener("click",function(){lr(this,"personal")});function sc(){U("/global/playlists",{}).then(function(s){if(s.status===401){ac();return}if(s.status!==200)throw new Error(s.message||"获取全局账号歌单失败");var l=s.data||{};c.global.user=l.user||null,c.global.playlists=l.playlists||[],e("#global-gate").hidden=!0,e("#global-content").hidden=!1,lc(),cc()}).catch(function(s){k(s.message||"获取全局账号歌单失败","error"),ac()})}function ac(s){e("#global-content").hidden=!0,e("#global-gate").hidden=!1,e("#global-refresh").hidden=!0}function lc(){var s=c.global.user||{};e("#global-avatar").src=s.avatarUrl||"",e("#global-nickname").innerHTML=j(s.nickname||"未命名用户")+" "+nc(s.vipType),e("#global-signature").textContent=s.signature||""}function Rp(){U("/global/playlists",{}).then(function(s){if(s.status!==200)throw new Error(s.message||"获取全局账号歌单失败");c.global.user=s.data.user||null,c.global.playlists=s.data.playlists||[],lc(),cc()}).catch(function(s){k(s.message||"获取全局账号歌单失败","error")})}function oc(s){var l="";return s.specialType===5?l='❤️ 我喜欢的音乐':s.is_own?l='我创建的':l='收藏的','
'+j(s.name)+" "+l+'
'+je(s.trackCount)+" 首 · 播放 "+je(s.playCount)+(s.creator?" · by "+j(s.creator):"")+'
'}function cc(){var s=c.global.playlists,l=s.filter(function(d){return d.specialType===5}),u=s.filter(function(d){return d.specialType!==5});e("#global-fav-count").textContent="共 "+l.length+" 个",e("#global-collect-count").textContent="共 "+u.length+" 个",e("#global-fav-playlists").innerHTML=l.length?l.map(oc).join(""):'
📂
暂无「我喜欢的音乐」
',e("#global-collect-playlists").innerHTML=u.length?u.map(oc).join(""):'
📂
暂无收藏的歌单
'}function Op(s,l){if(s){c.global.current={id:s,name:l};var u=sr("global");e("#global-tracks-wrap").hidden=!1,e("#global-tracks-title").textContent="歌单歌曲:"+(l||s),e("#global-tracks").innerHTML='
⏳
加载中...
',e("#global-play-playlist").hidden=!1,e("#global-play-playlist").setAttribute("data-id",s),e("#global-play-playlist").setAttribute("data-name",l||s),window.scrollTo({top:e("#global-tracks-wrap").offsetTop-80,behavior:"smooth"}),U("/global/playlist",{id:s}).then(function(d){if(!lt("global",u)){if(d.status!==200)throw new Error(d.data&&d.data.msg||d.message||"获取歌单失败");Dp(d.data.playlist||{})}}).catch(function(d){lt("global",u)||(e("#global-tracks").innerHTML='
❌
'+j(d.message||"获取歌单失败")+"
")})}}function Dp(s){var l=s.tracks||[];Nn("global",l,1)}function uc(s,l,u){if(!s){k("缺少歌单 ID","warning");return}var d=e("#global-level").value;d==="auto"&&(d=c.levelsOk&&c.levelsOk.length?c.levelsOk[0]:"lossless"),c._globalPlayGen=(c._globalPlayGen||0)+1;var m=c._globalPlayGen;u&&V(u,!0,"解析中..."),U("/admin/site/play_key/get",{}).then(function(y){if(m!==c._globalPlayGen)throw new Error("__stale__");if(y.status!==200)throw new Error(y.message||"获取播放密钥失败");var C=(y.data||{}).key||"";return U("/api/playlist/play",{id:s,level:d,limit:100,key:C})}).then(function(y){if(m===c._globalPlayGen){if(y.status!==200)throw new Error(y.message||"获取播放列表失败");var C=y.data||{},S=C.tracks||[];if(!S.length){k("该歌单暂无可以播放的歌曲(可能均为版权受限)","warning");return}c.global.playQueue=S,c.global.playQueueIndex=0;var T=S[0];Hs(T.url||"",T.name||"",T.artists||"",T.picUrl||""),k("✅ 已获取 "+S.length+" 首可播放歌曲("+(C.level_name||d)+"),请点击播放器 ▶ 开始播放:"+T.name,"success"),c.global.current&&String(c.global.current.id)===String(s)&&(e("#global-tracks-title").textContent="歌单歌曲:"+(l||s)+"(播放 API 返回 "+S.length+" 首可播放)")}}).catch(function(y){m!==c._globalPlayGen||y.message==="__stale__"||k(y.message||"获取播放列表失败","error")}).finally(function(){u&&V(u,!1)})}function Ks(s){var l=(location.origin+location.pathname).replace(/\/+$/,""),u=l+"/api/playlist/play",d=u+"?id="+encodeURIComponent(s||"");c._apiModalGen=(c._apiModalGen||0)+1;var m=c._apiModalGen;U("/admin/site/play_key/get",{}).then(function(y){if(m===c._apiModalGen){var C=y&&y.data&&y.data.key||"",S=C?d+"&key="+encodeURIComponent(C):d;e("#api-url").textContent=S,e("#api-example").textContent='curl "'+S+`&level=lossless&limit=100" // POST 表单:id=`+(s||"")+"&level=lossless&limit=100&key="+C}}).catch(function(){m===c._apiModalGen&&(e("#api-url").textContent=d)}),xr("api-modal")}function dc(){Rt("api-modal")}function fc(s,l){if(!s)return;function u(){var d=document.createElement("textarea");d.value=s,d.style.position="fixed",d.style.opacity="0",document.body.appendChild(d),d.select();try{var m=document.execCommand("copy");m?k(l||"已复制","success"):k("复制失败,请手动选择文本复制","error")}catch{k("复制失败,请手动选择文本复制","error")}document.body.removeChild(d)}navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(s).then(function(){k(l||"已复制","success")}).catch(u):u()}e("#global-goto-admin").addEventListener("click",function(){we("admin")}),e("#global-refresh").addEventListener("click",sc),e("#global-playlists-refresh").addEventListener("click",Rp),e("#global-api-open").addEventListener("click",function(){Ks("")}),e("#global-play-playlist").addEventListener("click",function(){uc(this.getAttribute("data-id"),this.getAttribute("data-name"),this)}),e("#global-download-all").addEventListener("click",function(){lr(this,"global")});function pc(s){var l=s.target.closest(".act-global-play, .act-global-open, .act-global-api"),u=s.target.closest(".global-pl"),d=l?l.getAttribute("data-id"):u?u.getAttribute("data-id"):"",m=l?l.getAttribute("data-name"):u?u.getAttribute("data-name"):"";d&&(l&&l.classList.contains("act-global-play")?uc(d,m,l):l&&l.classList.contains("act-global-api")?Ks(d):Op(d,m))}e("#global-fav-playlists").addEventListener("click",pc),e("#global-collect-playlists").addEventListener("click",pc),e("#playlist-api-btn").addEventListener("click",function(){var s=c.currentCollection;Ks(s&&s.type==="playlist"?s.id:"")}),e("#api-close").addEventListener("click",dc),e("#api-modal").addEventListener("click",function(s){s.target===this&&dc()}),e("#api-copy-url").addEventListener("click",function(){fc(e("#api-url").textContent,"接口地址已复制")}),e("#api-copy-example").addEventListener("click",function(){fc(e("#api-example").textContent,"请求示例已复制")});function hi(){var s=c.personal.authed,l=e("#collect-playlist-btn"),u=e("#collect-album-btn");if(l&&(l.hidden=!s),u&&(u.hidden=!s),s&&c.currentCollection){var d=c.currentCollection,m=d.type==="playlist"&&(c.personal.playlists||[]).some(function(y){return String(y.id)===String(d.id)});d.type==="album"?d.albumCollected?(e("#collect-album-btn").textContent="✓ 已收藏专辑",e("#collect-album-btn").classList.add("btn-success")):(e("#collect-album-btn").textContent="♡ 收藏专辑",e("#collect-album-btn").classList.remove("btn-success")):m?(e("#collect-playlist-btn").textContent="✓ 已收藏",e("#collect-playlist-btn").classList.add("btn-success")):(e("#collect-playlist-btn").textContent="♡ 收藏歌单",e("#collect-playlist-btn").classList.remove("btn-success"))}}function Ys(s,l,u){if(!c.personal.authed||!c.personal.cookie){k("请先在「个人歌单」扫码登录你的账号","warning"),we("personal");return}var d=u===1?"收藏":"取消收藏";U("/user/collect",{id:l,type:s,action:u,user_cookie:c.personal.cookie}).then(function(m){if(m.status!==200)throw new Error(m.message||d+"失败");k(u===1?"✅ 已收藏到你的个人歌单":"已取消收藏","success"),c.currentCollection&&String(c.currentCollection.id)===String(l)&&(c.currentCollection.albumCollected=s==="album"&&u===1);var y=e(s==="album"?"#collect-album-btn":"#collect-playlist-btn");y&&(u===1?(y.textContent=s==="album"?"✓ 已收藏专辑":"✓ 已收藏",y.classList.add("btn-success")):(y.textContent=s==="album"?"♡ 收藏专辑":"♡ 收藏歌单",y.classList.remove("btn-success"))),c.personal.authed&&Gs(),hi()}).catch(function(m){k(m.message||d+"失败","error")})}e("#collect-playlist-btn").addEventListener("click",function(){if(c.currentCollection){var s=(c.personal.playlists||[]).some(function(l){return String(l.id)===String(c.currentCollection.id)});Ys("playlist",c.currentCollection.id,s?2:1)}}),e("#collect-album-btn").addEventListener("click",function(){c.currentCollection&&Ys("album",c.currentCollection.id,1)}),document.addEventListener("click",function(s){var l=s.target.closest(".act-parse");if(l){sp(l.getAttribute("data-id"),l.getAttribute("data-name"));return}var u=s.target.closest(".act-download");if(u){Vo(u.getAttribute("data-id"),u.getAttribute("data-name"));return}var d=s.target.closest(".act-goto-playlist");if(d){vp(d.getAttribute("data-id"),d.getAttribute("data-name"));return}var m=s.target.closest(".act-goto-album");if(m){gp(m.getAttribute("data-id"),m.getAttribute("data-name"));return}var y=s.target.closest(".act-goto-artist");if(y){xp(y.getAttribute("data-id"),y.getAttribute("data-name"));return}var C=s.target.closest(".act-uncollect");if(C){Ys("playlist",C.getAttribute("data-id"),2);return}});function Fp(s,l,u){var d=document.querySelector('.modal-mask[data-dynamic="1"].show');d&&d.remove();var m=document.createElement("div");m.className="modal-mask show",m.setAttribute("data-dynamic","1"),m.innerHTML='',document.body.appendChild(m),m.addEventListener("click",function(y){y.target===m&&(m.remove(),u(!1))}),e("#cpd-ok").addEventListener("click",function(){m.remove(),u(!0)}),e("#cpd-cancel").addEventListener("click",function(){m.remove(),u(!1)})}function Up(s,l,u){var d=window.getSITECredits&&window.getSITECredits()||0;if(d<0){window.handleAuthExpired&&window.handleAuthExpired(),u(null);return}if(s.length<=d){u(s);return}if(d<=0){window.handleAuthExpired&&window.handleAuthExpired("",!0),u(null);return}V(l,!1),Fp(s.length,d,function(m){u(m?s.slice(0,d):null)})}function mc(s,l,u){var d={},m=(l||[]).filter(function(ce){return!ce||!ce.id||d[ce.id]?!1:(d[ce.id]=!0,!0)});if(!m.length){k("暂无可以下载的歌曲","warning");return}if(!Te()){V(s,!1);return}if(!u){Up(m,s,function(ce){ce&&mc(s,ce,!0)});return}if(c.settings.batchZip){V(s,!0,"打包中...");var y=P(),C=Object.keys(c.settings.metaFields).filter(function(ce){return c.settings.metaFields[ce]}),S=c.settings.batchWriteMeta&&C.length?C.join(","):"__none__",T=e("#global-level").value;T==="auto"&&(T=c.levelsOk&&c.levelsOk[0]||"lossless");var B=m.map(function(ce){return ce.id}).join(","),Pe=or();U("/download/batch_zip",{ids:B,quality:T,task_id:Pe,device_id:ht(),account:c.parseAccount,user_cookie:c.parseAccount==="user"?c.personal.cookie:"",filename_format:y.filename_format,write_meta:c.settings.batchWriteMeta?"true":"false",meta_fields:S,lyric_format:y.lyric_format}).then(function(ce){if(V(s,!1),ce.status!==200){k(ce.message||"批量打包提交失败","error");return}cr({id:Pe,type:"batch",label:"批量打包 · "+m.length+" 首",total:m.length,done:0,status:"queued"}),window.refreshSITECredits&&window.refreshSITECredits()}).catch(function(){V(s,!1),k("批量打包提交失败,请检查网络","error")});return}V(s,!0,"批量下载中...");var $e=0,Ve=0,It=0,vt=0;function Cc(){if($e>=m.length){V(s,!1);var ce=[];Ve&&ce.push("成功 "+Ve+" 首"),It&&ce.push("失败 "+It+" 首"),vt&&ce.push(vt+" 首结果未知(任务过期,请到任务面板重试)"),It&&!Ve&&!vt?k("批量下载全部失败("+It+" 首)","error"):It||vt?k("批量下载结束:"+ce.join(","),"warning"):k("批量下载完成,共 "+m.length+" 首","success");return}var oa=m[$e];k("正在下载:"+(oa.name||oa.id)+"("+($e+1)+"/"+m.length+")","info"),hc(oa,function(_c){$e++,_c===!1?It++:_c==="unknown"?vt++:Ve++,Cc()})}Cc()}function hc(s,l){if(!Te()){l();return}Os(s.id).then(function(u){var d=P(),m=Object.keys(c.settings.metaFields).filter(function(S){return c.settings.metaFields[S]}),y=c.settings.batchWriteMeta&&m.length?m.join(","):"__none__",C=or();U("/download",{id:s.id,quality:u,task_id:C,device_id:ht(),account:c.parseAccount,user_cookie:c.parseAccount==="user"?c.personal.cookie:"",filename_format:d.filename_format,write_meta:c.settings.batchWriteMeta?"true":"false",meta_fields:y,lyric_format:d.lyric_format,zip:d.zip}).then(function(S){if(S.status===401&&c.parseAccount==="user"){c.parseAccount="admin";try{localStorage.setItem("netease_parse_account","admin")}catch{}G(),rn(),k("个人账号未登录,已自动切换为全局账号下载","warning"),hc(s,l);return}if(S.status!==200){k(S.message||"下载失败:"+(s.name||s.id),"error"),l(!1);return}cr({id:C,type:"single",label:"单曲 · "+(s.name||s.id),total:1,done:0,status:"queued",doneCb:function(T){l(T)}}),window.refreshSITECredits&&window.refreshSITECredits()}).catch(function(){k("下载提交失败:"+(s.name||s.id),"error"),l(!1)})}).catch(function(){k("下载失败:"+(s.name||s.id),"error"),l(!1)})}function lr(s,l){var u=(c["tracks_"+l]||[]).map(function(d){return{id:d.id,name:d.name}});mc(s,u)}e("#playlist-download-all").addEventListener("click",function(){lr(this,"playlist")}),e("#album-download-all").addEventListener("click",function(){lr(this,"album")}),e("#artist-download-all").addEventListener("click",function(){lr(this,"artist")}),e("#detail-download").addEventListener("click",function(){c.currentSong&&Vo(c.currentSong.id,c.currentSong.name)});try{var Xs=document.querySelector(".app-header");if(Xs){var vc=function(){window.scrollY>8?Xs.classList.add("scrolled"):Xs.classList.remove("scrolled")};window.addEventListener("scroll",vc,{passive:!0}),vc()}}catch{}try{document.addEventListener("play",function(s){if(s.target&&s.target.tagName==="AUDIO"){var l=e("#player");l&&l.classList.add("playing")}},!0),document.addEventListener("pause",function(s){if(s.target&&s.target.tagName==="AUDIO"){var l=e("#player");l&&l.classList.remove("playing")}},!0)}catch{}try{var Hp=new MutationObserver(function(){var s=document.querySelector(".modal-mask.show, .drawer.show");document.body.style.overflow=s?"hidden":"",s?document.documentElement.classList.add("overlay-open"):document.documentElement.classList.remove("overlay-open")});Hp.observe(document.body,{attributes:!0,attributeFilter:["class"],subtree:!0})}catch{}try{var Zs=function(s){var l=document.getElementById("player-progress");if(l){if(!s||!s.duration||!s.buffered||!s.buffered.length){l.style.setProperty("--buffered","0%");return}var u=s.buffered.end(s.buffered.length-1);l.style.setProperty("--buffered",Math.min(100,u/s.duration*100)+"%")}};document.addEventListener("progress",function(s){s.target&&s.target.tagName==="AUDIO"&&Zs(s.target)},!0),["timeupdate","loadstart","emptied"].forEach(function(s){document.addEventListener(s,function(l){l.target&&l.target.tagName==="AUDIO"&&s!=="timeupdate"?Zs(null):l.target&&l.target.tagName==="AUDIO"&&Zs(l.target)},!0)})}catch{}try{document.addEventListener("keydown",function(s){var l=s.target;if(!(l&&(l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.tagName==="SELECT"||l.tagName==="BUTTON"||l.tagName==="A"||l.isContentEditable||l.getAttribute&&l.getAttribute("role")==="button"))&&!(s.key!==" "&&s.key!=="ArrowLeft"&&s.key!=="ArrowRight")){var u=document.querySelector("#player audio");if(!(!u||!u.src))if(s.key===" "){s.preventDefault();var d=document.getElementById("player-toggle");d&&d.click()}else s.key==="ArrowLeft"?(s.preventDefault(),u.currentTime=Math.max(0,u.currentTime-5)):(s.preventDefault(),u.currentTime=Math.min(u.duration||1/0,u.currentTime+5))}})}catch{}try{var Js=document.title,Bp=function(s){var l="";if(s&&s.id==="podcast-audio"){var u=document.getElementById("podcast-program-name");l=u?u.textContent:""}else{var d=document.getElementById("player-name");l=d?d.textContent:""}return l};document.addEventListener("play",function(s){if(!(!s.target||s.target.tagName!=="AUDIO")){var l=Bp(s.target);document.title=l?"▶ "+l+" - "+Js:Js}},!0),document.addEventListener("pause",function(s){!s.target||s.target.tagName!=="AUDIO"||(document.title=Js)},!0)}catch{}try{(function(){var s=navigator.userAgent||"",l=/MSIE|Trident\//.test(s),u=!window.fetch||!window.Promise||!document.addEventListener;if(l||u){var d=document.getElementById("legacy-browser-blocker");d&&(d.className="show");var m=document.getElementById("page-loading");m&&(m.style.display="none");try{document.documentElement.style.background="#1f2329"}catch{}return}document.addEventListener("keydown",function(y){(y.key==="Tab"||y.keyCode===9)&&!document.documentElement.className.match(/\bkbd-nav\b/)&&(document.documentElement.className+=" kbd-nav")},!0),document.addEventListener("mousedown",function(){document.documentElement.className=document.documentElement.className.replace(/\s*kbd-nav\b/,"")},!0)})()}catch{}try{var vi=navigator.userAgent||"",ea=vi.indexOf("MicroMessenger")!==-1,ta=vi.indexOf(" QQ/")!==-1&&vi.indexOf("MQQBrowser")===-1,gc=/AlipayClient|DingTalk|Weibo|HeyTapBrowser|HiSpace|HMSCore/.test(vi);if(ea||ta||gc){var yc=!1;try{yc=sessionStorage.getItem("netease_wv_guide_closed")==="1"}catch{}var na=document.getElementById("webview-guide");if(na&&!yc){if(gc&&!ea&&!ta){var xc=na.querySelector(".wg-text");xc&&(xc.innerHTML="💬 当前在 App 内置浏览器中,音乐下载可能受限。建议复制链接到系统浏览器打开,获得完整体验。")}na.hidden=!1}var wc=document.getElementById("webview-guide-close");wc&&wc.addEventListener("click",function(){var s=document.getElementById("webview-guide");s&&(s.hidden=!0);try{sessionStorage.setItem("netease_wv_guide_closed","1")}catch{}}),document.addEventListener("click",function(s){var l=s.target&&s.target.closest?s.target.closest("button, a"):null;if(l){var u=((l.id||"")+" "+(l.className||"")).toLowerCase(),d=l.textContent||"";(/download|zip/.test(u)||d.indexOf("⬇")!==-1||d.indexOf("下载")!==-1||d.indexOf("打包")!==-1)&&k(ea||ta?"微信/QQ 内置浏览器可能无法下载文件,建议点右上角「···」→「在浏览器中打开」":"当前 App 内置浏览器可能无法下载文件,建议复制链接到系统浏览器打开","warning")}},!0)}}catch{}try{var jc={},kc=0,ra=function(s,l,u){try{if(kc>=8)return;var d=s+"|"+l;if(jc[d])return;jc[d]=1,kc++;var m=new URLSearchParams({type:s,msg:l,stack:u||"",page:location.href.slice(0,120),env:(navigator.userAgent||"").slice(0,180)+" | "+window.innerWidth+"x"+window.innerHeight+" | dpr"+(window.devicePixelRatio||1)});navigator.sendBeacon?navigator.sendBeacon("/api/fe_error",m):fetch("/api/fe_error",{method:"POST",body:m,keepalive:!0}).catch(function(){})}catch{}};window.addEventListener("error",function(s){if(s.target&&s.target!==window&&(s.target.tagName==="IMG"||s.target.tagName==="SCRIPT"||s.target.tagName==="LINK")){if(s.target.tagName==="IMG"&&!(s.target.getAttribute("src")||"").trim())return;ra("resource",(s.target.tagName||"")+" 加载失败: "+(s.target.src||s.target.href||"").slice(-80));return}ra("error",s.message||"未知错误",(s.filename||"")+":"+(s.lineno||0))},!0),window.addEventListener("unhandledrejection",function(s){var l=s.reason;ra("promise",l&&(l.message||String(l))||"未处理的 Promise 拒绝",l&&l.stack?String(l.stack).slice(0,300):"")})}catch{}try{t("#tabs .tab").forEach(function(s){s.setAttribute("tabindex","0"),s.setAttribute("role","button"),s.addEventListener("keydown",function(l){l.key==="Enter"&&(l.preventDefault(),s.click())})})}catch{}var qp=["auto","jymaster","jyeffect","sky","hires","lossless","exhigh","standard","dolby"];try{var ia=localStorage.getItem("netease_global_level");ia&&qp.indexOf(ia)!==-1&&(e("#global-level").value=ia)}catch{}e("#global-level").addEventListener("change",function(){try{localStorage.setItem("netease_global_level",e("#global-level").value)}catch{}}),e("#quality-save").addEventListener("click",function(){try{localStorage.setItem("netease_global_level",e("#global-level").value)}catch{}k("全局音质已保存:"+ni(e("#global-level").value),"success")});try{var sa=localStorage.getItem("netease_parse_account");(sa==="user"||sa==="admin")&&(c.parseAccount=sa)}catch{}try{var bc=localStorage.getItem("netease_user_cookie");bc&&(c.personal.cookie=bc)}catch{}G(),o(),nr(),g(),p(),ri(),window.SITE_TASKS_BOOTSTRAP=Ec,window.SITE_ON_LOGOUT=function(){try{localStorage.removeItem("netease_user_cookie")}catch{}mt(),c.personal.qrGen=(c.personal.qrGen||0)+1,c.personal.authed=!1,c.personal.user=null,c.personal.playlists=[],c.personal.current=null,c.personal.cookie="";var s=e("#personal-tracks-wrap");if(s&&(s.hidden=!0),c.parseAccount==="user"){c.parseAccount="admin";try{localStorage.setItem("netease_parse_account","admin")}catch{}}else try{localStorage.removeItem("netease_parse_account")}catch{}rn(),ar(!1),G()},window.SITE_LOGGED_IN&&Ec(),c.settings.cookiePrefs.accepted||setTimeout(function(){$(),k("首次使用请阅读并同意《用户协议》与《隐私政策》","info")},600);function $p(s){return s==null||!isFinite(s)||s<=0?"--":s<60?"约 "+Math.max(1,Math.round(s))+" 秒":s<3600?"约 "+Math.ceil(s/60)+" 分钟":"约 "+(s/3600).toFixed(1)+" 小时"}function Nc(){U("/api/queue",{}).then(function(s){if(s.status!==200)throw new Error(s.message||"获取排队状态失败");var l=s.data||{},u=(l.batch_waiting||0)+(l.download_waiting||0);e("#queue-num").textContent=u,e("#queue-download").textContent=(l.download_active||0)+"/"+(l.download_capacity||"-"),e("#queue-batch").textContent=(l.batch_active||0)+"/"+(l.batch_capacity||"-");var d=l.avg_batch_seconds,m=d?(l.batch_waiting||0)*d:null;e("#queue-est").textContent="预计等待:"+$p(m),e("#queue-float").classList.toggle("busy",u>0)}).catch(function(){})}Nc(),setInterval(Nc,3e3);function ht(){var s="netease_device_id";if(window.__deviceIdCache)return window.__deviceIdCache;var l=null;try{l=localStorage.getItem(s)}catch{}if(!l){l="d"+Date.now().toString(36)+Math.random().toString(36).slice(2,12);try{localStorage.setItem(s,l)}catch{}}return window.__deviceIdCache=l,l}function or(){return"u"+Date.now().toString(36)+Math.random().toString(36).slice(2,8)}function Vp(s){if(s==null||!isFinite(s)||s<=0)return"--";s=Math.max(0,Math.round(s));var l=Math.floor(s/3600),u=Math.floor(s%3600/60),d=s%60;return l>0?l+":"+String(u).padStart(2,"0")+":"+String(d).padStart(2,"0"):String(u).padStart(2,"0")+":"+String(d).padStart(2,"0")}var me=[],sn=null;function cr(s){me.push(s),an(),e("#task-panel").classList.add("show"),sn||(sn=setInterval(ur,1500)),ur()}function an(){var s=e("#task-list");e("#task-count").textContent=me.length,s.innerHTML=me.map(function(l){var u;l.status==="done"?u=100:l.status==="running"&&typeof l.livePct=="number"?u=Math.max(1,Math.min(99,Math.round(l.livePct))):u=l.total?Math.round((l.done||0)/l.total*100):0;var d=l.statusText||(l.status==="done"?"完成":l.status==="error"?"失败":l.status==="canceled"?"已取消":l.status==="paused"?"已暂停":u+"%"),m=l.status==="done"||l.status==="error"||l.status==="canceled"?"":'
',y=l.status==="queued"||l.status==="running"||l.status==="paused"?'':"",C=l.claimable?'':"",S=l.claimable?'':"";return'
'+j(l.label)+''+j(d)+""+y+C+S+"
"+m+"
"}).join("")||'
暂无任务
',t("#task-list .task-item-cancel").forEach(function(l){l.addEventListener("click",function(){Gp(l.getAttribute("data-id"))})}),t("#task-list .task-item-claim").forEach(function(l){l.addEventListener("click",function(){Qp(l.getAttribute("data-id"))})}),t("#task-list .task-item-dismiss").forEach(function(l){l.addEventListener("click",function(){var u=l.getAttribute("data-id");me=me.filter(function(d){return d.id!==u}),an(),me.length||e("#task-panel").classList.remove("show")})})}var aa=!1;function ur(){if(aa)return;var s=me.filter(function(d){return d.status==="queued"||d.status==="running"||d.status==="paused"});if(!s.length){sn&&(clearInterval(sn),sn=null);return}aa=!0;var l=0;function u(){l++,l>=s.length&&(aa=!1)}s.forEach(function(d){U("/api/batch_progress",{task_id:d.id}).then(function(m){if(m.status===404){if(d._gone)return;d._gone=!0,k("任务已过期:"+d.label,"info"),Sn(d.id,500),an(),typeof d.doneCb=="function"&&d.doneCb("unknown");return}if(m.status===200){var y=m.data||{};if(!(d._done||d._ended)){if(d.done=y.done||0,typeof y.total=="number"&&y.total>0&&(d.total=y.total),y.status==="running"){d.status="running";var C=Math.round(y.percent||0);d.livePct=typeof y.percent=="number"?y.percent:d.livePct,d.statusText=C+"%"+(y.eta?" · 剩"+Vp(y.eta):""),d.statusText+=y.failed?" · 失败"+y.failed:""}else d.status=y.status||d.status,d.statusText=y.msg||y.status;y.status==="done"?(y.refunded>0&&(d.statusText=(d.statusText||"完成")+" · 已退回 "+y.refunded+" 次",k("任务完成:"+d.label+",失败部分已退回 "+y.refunded+" 次下载次数","info")),window.refreshSITECredits&&window.refreshSITECredits(),la(d)):y.status==="error"?(d._ended=!0,k("下载失败:"+d.label+(y.msg?"("+y.msg+")":""),"error"),window.refreshSITECredits&&window.refreshSITECredits(),y.has_result?la(d):(typeof d.doneCb=="function"&&d.doneCb(!1),Sn(d.id,8e3))):y.status==="canceled"&&(d._ended=!0,window.refreshSITECredits&&window.refreshSITECredits(),k("已取消:"+d.label,"info"),y.has_result?la(d):(typeof d.doneCb=="function"&&d.doneCb(!1),Sn(d.id,2500))),an()}}}).catch(function(){}).then(function(){u()})})}function Sc(s){var l=(s.type==="batch"?"/download/batch_zip/result":"/download/result")+"?task_id="+encodeURIComponent(s.id)+"&device_id="+encodeURIComponent(ht()),u=document.createElement("a");u.href=l,u.download="",document.body.appendChild(u),u.click(),document.body.removeChild(u)}function Qp(s){var l=null;me.forEach(function(u){u.id===s&&(l=u)}),l&&(Sc(l),k("正在重新领取:"+l.label,"info"))}function Wp(s){for(var l=me.filter(function(m){return m.claimable||m._ended}),u=l.length-s,d=0;d0&&(k("任务已恢复,继续下载","info"),ur())}).catch(function(){})}setInterval(Kp,15e3);function Ec(){U("/api/task/list",{device_id:ht()}).then(function(s){if(s.status===200){var l=s.data.tasks||[];if(l.length){var u=!1;l.forEach(function(d){me.some(function(m){return m.id===d.task_id})||(me.push({id:d.task_id,type:d.type,label:d.kind==="podcast"?"播客打包 · "+d.total+" 集":"批量打包 · "+d.total+" 首",total:d.total,done:d.done||0,status:d.status,statusText:d.status==="paused"?"已暂停(恢复中...)":d.msg||""}),u=!0)}),u&&(an(),e("#task-panel").classList.add("show"),sn||(sn=setInterval(ur,1500)),ur())}}}).catch(function(){})}e("#task-panel-close").addEventListener("click",function(){e("#task-panel").classList.remove("show")}),Vn.switchTab=we,Vn.closeStatsModal=v,Vn.closeCookieModal=fe}const Vn={switchTab:null,closeStatsModal:null,closeCookieModal:null};function Ie(){return Vn.switchTab&&Vn.switchTab.apply(this,arguments)}const tp=Object.freeze(Object.defineProperty({__proto__:null,__legacyApi:Vn,__legacyBoot:Tv,switchTab:Ie},Symbol.toStringTag,{value:"Module"}));function Pv(){return ep(),i.jsx("div",{className:"toast-wrap",id:"toast-wrap",children:Qi.map(e=>i.jsx("div",{className:"toast toast-"+e.type+" show",children:e.msg},e.id))})}function Iv(){return ep(),i.jsxs(i.Fragment,{children:["// 自动转换片段(供手工组装)",i.jsxs("div",{id:"legacy-browser-blocker",role:"alert",children:[i.jsx("div",{className:"lb-icon",children:"⚠️"}),i.jsx("h2",{children:"当前浏览器内核过旧,无法运行云村小助手"}),i.jsx("p",{children:"您可能正在使用 IE 内核浏览器,或浏览器的「兼容模式」。"}),i.jsx("p",{children:"本站基于现代浏览器技术构建,请切换或更换浏览器后访问:"}),i.jsxs("div",{className:"lb-list",children:["① 360 / QQ / 搜狗浏览器:点击地址栏旁的「闪电/极速模式」图标切换",i.jsx("br",{}),"② Windows:使用自带 Microsoft Edge,或安装 Chrome / 360 极速版",i.jsx("br",{}),"③ 安卓手机:使用系统自带浏览器、微信内置浏览器或 Chrome",i.jsx("br",{}),"④ 苹果设备:Safari、微信内置浏览器均可正常使用"]})]}),"// 自动转换片段(供手工组装)",i.jsxs("div",{className:"page-loading",id:"page-loading",children:[i.jsx("div",{className:"ring"}),i.jsx("span",{children:"正在加载云村小助手..."})]}),"// 自动转换片段(供手工组装)",i.jsx("header",{className:"app-header",children:i.jsxs("div",{className:"app-header-inner",children:[i.jsxs("div",{className:"brand",id:"brand-home",title:"返回主页面",children:[i.jsx("div",{className:"brand-logo",children:"♪"}),i.jsxs("div",{children:[i.jsx("div",{className:"brand-title",children:"云村小助手"}),i.jsx("div",{className:"brand-sub",children:"实时解析网易云音乐单曲、获取真实下载地址及封面信息"})]})]}),i.jsxs("div",{className:"header-actions",children:[i.jsxs("div",{className:"auth-area",id:"auth-guest-area",children:[i.jsx("button",{className:"btn btn-primary btn-sm",id:"btn-open-login",type:"button",children:"登录"}),i.jsx("button",{className:"btn btn-sm",id:"btn-open-register",type:"button",children:"注册"})]}),i.jsxs("div",{className:"auth-area",id:"auth-user-area",hidden:!0,children:[i.jsx("span",{className:"tag-pill ok",id:"auth-duration-pill",title:"剩余次数"}),i.jsx("div",{className:"user-avatar",id:"user-avatar",title:"个人中心",children:"U"})]}),i.jsxs("button",{className:"icon-btn",id:"btn-settings",type:"button",children:["⚙️ ",i.jsx("span",{children:"设置"})]}),i.jsxs("button",{className:"icon-btn",id:"btn-changelog",type:"button",children:["📋 ",i.jsx("span",{children:"更新日志"})]}),i.jsxs("button",{className:"icon-btn",id:"theme-toggle",type:"button",children:["🌙 ",i.jsx("span",{children:"深色"})]})]})]})}),i.jsxs("main",{className:"main-container",children:[i.jsxs("div",{className:"webview-guide",id:"webview-guide",hidden:!0,children:[i.jsx("span",{className:"wg-icon",children:"💬"}),i.jsxs("span",{className:"wg-text",children:["当前在微信 / QQ 内置浏览器中,",i.jsx("b",{children:"音乐下载可能受限"}),"。建议点击右上角「···」→「在浏览器中打开」,获得完整体验。"]}),i.jsx("button",{className:"wg-close",id:"webview-guide-close",type:"button",children:"知道了"})]}),i.jsxs("div",{className:"card",children:[i.jsxs("div",{className:"account-bar",style:{display:"flex",alignItems:"center",gap:"12px",flexWrap:"wrap",paddingBottom:"12px"},children:[i.jsx("span",{className:"gq-label",children:"👤 解析账号"}),i.jsx("span",{className:"badge",id:"account-vip-badge",style:{borderColor:"var(--color-text-tertiary)",color:"var(--color-text-secondary)"},children:"获取中..."}),i.jsx("span",{className:"account-quality-list",id:"account-qualities",style:{fontSize:"12px",color:"var(--color-text-secondary)"}}),i.jsx("button",{className:"btn btn-sm btn-link",id:"account-refresh",type:"button",style:{height:"26px"},children:"刷新"})]}),i.jsx("div",{className:"hint",id:"account-note",style:{margin:"0 0 14px"},children:"💡 小提示:可在「个人歌单」登录你自己的 SVIP 网易云音乐账号,并切换为个人账号解析,即可下载/试听更高音质。"}),i.jsxs("div",{className:"global-quality-bar",children:[i.jsx("span",{className:"gq-label",children:"🎧 全局音质"}),i.jsxs("select",{className:"select",id:"global-level",title:"全局音质选择",defaultValue:"auto",children:[i.jsx("option",{value:"auto",children:"最高音质(自动)"}),i.jsx("option",{value:"jymaster",children:"超清母带"}),i.jsx("option",{value:"jyeffect",children:"高清环绕声"}),i.jsx("option",{value:"sky",children:"沉浸环绕声"}),i.jsx("option",{value:"hires",children:"Hi-Res音质"}),i.jsx("option",{value:"lossless",children:"无损音质"}),i.jsx("option",{value:"exhigh",children:"极高音质"}),i.jsx("option",{value:"standard",children:"标准音质"}),i.jsx("option",{value:"dolby",children:"杜比全景声"})]}),i.jsx("button",{className:"btn btn-sm",id:"quality-save",type:"button",style:{height:"30px"},children:"保存"}),i.jsx("span",{className:"gq-hint",children:"全局生效:单曲解析、音乐下载、批量下载均使用该音质;「最高音质(自动)」会按账号会员类型自动尝试最高可解析音质。"})]}),i.jsxs("div",{className:"tabs",id:"tabs",children:[i.jsx("div",{className:"tab"+(c.currentTab==="search"?" active":""),"data-tab":"search",onClick:()=>Ie("search"),children:"搜索"},"search"),i.jsx("div",{className:"tab"+(c.currentTab==="song"?" active":""),"data-tab":"song",onClick:()=>Ie("song"),children:"单曲"},"song"),i.jsx("div",{className:"tab"+(c.currentTab==="playlist"?" active":""),"data-tab":"playlist",onClick:()=>Ie("playlist"),children:"歌单"},"playlist"),i.jsx("div",{className:"tab"+(c.currentTab==="album"?" active":""),"data-tab":"album",onClick:()=>Ie("album"),children:"专辑"},"album"),i.jsx("div",{className:"tab"+(c.currentTab==="podcast"?" active":""),"data-tab":"podcast",onClick:()=>Ie("podcast"),children:"播客"},"podcast"),i.jsx("div",{className:"tab"+(c.currentTab==="admin"?" active":""),"data-tab":"admin",id:"tab-admin",hidden:!0,onClick:()=>Ie("admin"),children:"管理员设置"},"admin"),i.jsx("div",{className:"tab"+(c.currentTab==="global"?" active":""),"data-tab":"global",id:"tab-global",hidden:!0,onClick:()=>Ie("global"),children:"全局账号歌单"},"global"),i.jsx("div",{className:"tab"+(c.currentTab==="artist"?" active":""),"data-tab":"artist",onClick:()=>Ie("artist"),children:"歌手"},"artist"),i.jsx("div",{className:"tab"+(c.currentTab==="toplist"?" active":""),"data-tab":"toplist",onClick:()=>Ie("toplist"),children:"榜单"},"toplist"),i.jsx("div",{className:"tab"+(c.currentTab==="personal"?" active":""),"data-tab":"personal",onClick:()=>Ie("personal"),children:"个人歌单"},"personal"),i.jsx("div",{className:"tab"+(c.currentTab==="usercenter"?" active":""),"data-tab":"usercenter",id:"tab-usercenter",hidden:!0,onClick:()=>Ie("usercenter"),children:"个人中心"},"usercenter"),i.jsx("div",{className:"tab"+(c.currentTab==="useradmin"?" active":""),"data-tab":"useradmin",id:"tab-useradmin",hidden:!0,onClick:()=>Ie("useradmin"),children:"管理后台"},"useradmin"),i.jsx("div",{className:"tab"+(c.currentTab==="about"?" active":""),"data-tab":"about",onClick:()=>Ie("about"),children:"关于网站"},"about")]}),i.jsxs("div",{className:"panel"+(c.currentTab==="search"?" active":""),"data-panel":"search",children:[i.jsxs("div",{className:"search-header",style:{display:"flex",alignItems:"center",gap:"12px",flexWrap:"wrap"},children:[i.jsx("div",{style:{flex:"none",width:"36px",height:"36px",borderRadius:"10px",background:"var(--color-fill)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"17px"},children:"🔍"}),i.jsxs("div",{style:{flex:"1",minWidth:"220px",display:"flex",gap:"12px",flexWrap:"wrap"},children:[i.jsx("input",{className:"input",id:"search-input",placeholder:"在此输入搜索关键词",autoComplete:"off",style:{flex:"1",minWidth:"200px"}}),i.jsxs("select",{className:"select search-header-select",id:"search-type",title:"搜索类型",style:{width:"110px"},children:[i.jsx("option",{value:"1",children:"歌曲"}),i.jsx("option",{value:"1000",children:"歌单"}),i.jsx("option",{value:"10",children:"专辑"}),i.jsx("option",{value:"100",children:"歌手"})]}),i.jsxs("select",{className:"select",id:"search-limit",title:"返回数量",style:{width:"90px"},defaultValue:"30",children:[i.jsx("option",{value:"10",children:"10 条"}),i.jsx("option",{value:"20",children:"20 条"}),i.jsx("option",{value:"30",children:"30 条"}),i.jsx("option",{value:"50",children:"50 条"})]})]}),i.jsx("button",{className:"btn btn-primary",id:"search-btn",type:"button",children:"搜索"})]}),i.jsx("div",{className:"hint",children:"支持搜索歌曲、歌单、专辑、歌手;结果点击即可跳转对应功能解析。"})]}),i.jsxs("div",{className:"panel"+(c.currentTab==="song"?" active":""),"data-panel":"song",children:[i.jsxs("div",{className:"input-row",children:[i.jsx("input",{className:"input",id:"song-input",placeholder:"将网易云音乐的分享链接或歌曲ID粘贴到这里,点击右侧按钮即可解析",autoComplete:"off"}),i.jsx("button",{className:"btn btn-primary",id:"parse-btn",type:"button",children:"开始解析"})]}),i.jsxs("div",{className:"history-row",id:"history-row",hidden:!0,children:[i.jsx("span",{className:"history-label",children:"解析历史:"}),i.jsx("span",{id:"history-list"})]})]}),i.jsx("div",{className:"panel"+(c.currentTab==="playlist"?" active":""),"data-panel":"playlist",children:i.jsxs("div",{className:"input-row",children:[i.jsx("input",{className:"input",id:"playlist-input",placeholder:"网易云音乐的分享链接或歌单ID,例如 https://music.163.com/playlist?id=123456",autoComplete:"off"}),i.jsx("button",{className:"btn btn-primary",id:"playlist-btn",type:"button",children:"解析歌单"})]})}),i.jsx("div",{className:"panel"+(c.currentTab==="album"?" active":""),"data-panel":"album",children:i.jsxs("div",{className:"input-row",children:[i.jsx("input",{className:"input",id:"album-input",placeholder:"网易云音乐的分享链接或专辑ID,例如 https://music.163.com/album?id=123456",autoComplete:"off"}),i.jsx("button",{className:"btn btn-primary",id:"album-btn",type:"button",children:"解析专辑"})]})}),i.jsxs("div",{className:"panel"+(c.currentTab==="podcast"?" active":""),"data-panel":"podcast",children:[i.jsxs("div",{className:"input-row",children:[i.jsx("input",{className:"input",id:"podcast-input",placeholder:"播客电台/单集分享链接或ID,例如 https://music.163.com/djradio?id=1212051560",autoComplete:"off"}),i.jsxs("select",{className:"select",id:"podcast-quality",title:"单集音质",style:{width:"130px"},defaultValue:"auto",children:[i.jsx("option",{value:"auto",children:"最高音质(自动)"}),i.jsx("option",{value:"exhigh",children:"极高 320K"}),i.jsx("option",{value:"standard",children:"标准 128K"})]}),i.jsx("button",{className:"btn btn-primary",id:"podcast-btn",type:"button",children:"解析"})]}),i.jsxs("div",{className:"input-row",style:{marginTop:"10px"},children:[i.jsx("input",{className:"input",id:"podcast-search-input",placeholder:"搜索播客电台关键词,例如:故事 / 脱口秀 / 有声书",autoComplete:"off"}),i.jsx("button",{className:"btn",id:"podcast-search-btn",type:"button",children:"🔍 搜索播客"})]}),i.jsx("div",{className:"hint",children:"支持 电台链接(djradio?id=)、单集链接(program?id= / sound?id=)、163cn.tv 短链或纯数字ID;解析后可在线试听、获取直链、下载单集、整台打包 ZIP。"}),i.jsxs("div",{id:"podcast-loading",className:"empty-state",hidden:!0,children:[i.jsx("div",{className:"empty-icon",children:"🎙️"}),i.jsx("div",{children:"解析中..."})]}),i.jsxs("div",{id:"podcast-radio-result",hidden:!0,children:[i.jsxs("div",{className:"collection-header",children:[i.jsx("img",{className:"collection-cover",id:"podcast-radio-cover",src:"",alt:"cover"}),i.jsxs("div",{className:"collection-info",children:[i.jsx("div",{className:"collection-name",id:"podcast-radio-name"}),i.jsx("div",{className:"collection-meta",id:"podcast-radio-meta"}),i.jsx("div",{className:"collection-meta podcast-desc",id:"podcast-radio-desc"}),i.jsxs("div",{className:"collection-actions",style:{display:"flex",gap:"10px",flexWrap:"wrap"},children:[i.jsx("button",{className:"btn btn-success btn-sm",id:"podcast-radio-zip",type:"button",children:"📦 打包整个播客"}),i.jsx("button",{className:"btn btn-sm",id:"podcast-radio-order",type:"button",children:"⇅ 最新在前"})]})]})]}),i.jsx("div",{className:"divider"}),i.jsxs("div",{className:"card-title",children:["单集列表 ",i.jsx("span",{className:"count",id:"podcast-episode-count"})]}),i.jsx("div",{className:"song-list",id:"podcast-episodes"}),i.jsx("div",{className:"comment-more",id:"podcast-more-wrap",hidden:!0,children:i.jsx("button",{className:"btn btn-sm",id:"podcast-more",type:"button",children:"加载更多单集"})})]}),i.jsx("div",{id:"podcast-program-result",hidden:!0,children:i.jsxs("div",{className:"song-detail",children:[i.jsx("img",{className:"song-detail-cover",id:"podcast-program-cover",src:"",alt:"cover"}),i.jsxs("div",{className:"song-detail-info",children:[i.jsx("div",{className:"detail-name",id:"podcast-program-name"}),i.jsxs("div",{className:"detail-meta",children:[i.jsx("b",{children:"播客"}),i.jsx("span",{id:"podcast-program-radio"})]}),i.jsxs("div",{className:"detail-meta",children:[i.jsx("b",{children:"主播"}),i.jsx("span",{id:"podcast-program-dj"})]}),i.jsxs("div",{className:"detail-meta",children:[i.jsx("b",{children:"信息"}),i.jsx("span",{id:"podcast-program-meta"})]}),i.jsx("div",{className:"detail-badges",id:"podcast-program-badges"}),i.jsxs("div",{className:"detail-actions",style:{display:"flex",gap:"10px",flexWrap:"wrap"},children:[i.jsx("button",{className:"btn btn-success btn-sm",id:"podcast-program-download",type:"button",children:"⬇ 下载单集"}),i.jsx("a",{className:"btn btn-sm",id:"podcast-program-open",href:"#",target:"_blank",rel:"noopener",style:{textDecoration:"none"},children:"打开直链"})]}),i.jsx("div",{className:"hint",id:"podcast-program-tip",hidden:!0,style:{marginTop:"10px"}}),i.jsx("audio",{controls:!0,id:"podcast-audio",style:{width:"100%",marginTop:"14px"},preload:"none"})]})]})}),i.jsxs("div",{id:"podcast-search-result",hidden:!0,children:[i.jsx("div",{className:"divider"}),i.jsxs("div",{className:"card-title",children:["播客搜索结果 ",i.jsx("span",{className:"count",id:"podcast-search-count"})]}),i.jsx("div",{className:"song-list",id:"podcast-search-list"}),i.jsx("div",{className:"hint",id:"podcast-search-tip",hidden:!0,style:{marginTop:"8px"}})]}),i.jsxs("div",{id:"podcast-hot-wrap",style:{marginTop:"10px"},children:[i.jsx("div",{className:"divider"}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",flexWrap:"wrap",marginBottom:"12px"},children:[i.jsx("div",{className:"card-title",style:{margin:"0"},children:"热门播客"}),i.jsx("div",{className:"podcast-cate-bar",id:"podcast-cate-bar"})]}),i.jsx("div",{className:"toplist-grid",id:"podcast-hot-grid"}),i.jsx("div",{className:"comment-more",id:"podcast-hot-more-wrap",hidden:!0,style:{marginTop:"14px"},children:i.jsx("button",{className:"btn btn-sm",id:"podcast-hot-more",type:"button",children:"加载更多热门播客"})})]})]}),i.jsxs("div",{className:"panel"+(c.currentTab==="admin"?" active":""),"data-panel":"admin",children:[i.jsxs("div",{id:"admin-gate",children:[i.jsxs("div",{className:"input-row",children:[i.jsx("input",{className:"input",id:"admin-password",type:"password",placeholder:"请输入管理员密码",autoComplete:"off"}),i.jsx("button",{className:"btn btn-primary",id:"admin-enter",type:"button",children:"验证并进入"})]}),i.jsx("div",{className:"hint",children:"管理员设置:全局二维码登录与 Cookie 管理。登录后 Cookie 自动保存,无需重复扫码。"})]}),i.jsxs("div",{id:"admin-content",hidden:!0,children:[i.jsxs("div",{className:"card",style:{boxShadow:"none",background:"var(--color-fill)",marginBottom:"16px",padding:"16px 20px"},children:[i.jsxs("div",{className:"setting-item",style:{padding:"6px 0"},children:[i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"登录状态"}),i.jsx("div",{className:"setting-desc",id:"admin-status-desc",children:"获取中..."})]}),i.jsx("span",{className:"badge",id:"admin-status-badge",children:"-"})]}),i.jsx("div",{className:"setting-item",style:{padding:"6px 0"},children:i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"Cookie 文件"}),i.jsx("div",{className:"setting-desc",id:"admin-cookie-file",children:"-"})]})}),i.jsx("div",{className:"setting-item",style:{padding:"6px 0"},children:i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"Cookie 数量 / 最后更新"}),i.jsx("div",{className:"setting-desc",id:"admin-cookie-time",children:"-"})]})})]}),i.jsxs("div",{className:"detail-actions",children:[i.jsx("button",{className:"btn btn-primary btn-sm",id:"admin-qr-btn",type:"button",children:"📱 生成登录二维码"}),i.jsx("button",{className:"btn btn-danger btn-sm",id:"admin-cookie-delete",type:"button",children:"🗑 删除 Cookie(重新扫码)"}),i.jsx("button",{className:"btn btn-sm",id:"admin-status-refresh",type:"button",children:"刷新状态"})]}),i.jsx("div",{id:"admin-qr-area",hidden:!0,children:i.jsxs("div",{style:{textAlign:"center",padding:"16px 0"},children:[i.jsx("img",{id:"admin-qr-img",alt:"登录二维码",style:{width:"200px",height:"200px",borderRadius:"12px",boxShadow:"var(--color-shadow-heavy)",background:"#fff"}}),i.jsx("div",{className:"hint",id:"admin-qr-status",style:{textAlign:"center",marginTop:"12px"},children:"请使用网易云音乐手机 APP 扫描二维码登录"}),i.jsx("div",{className:"hint",style:{textAlign:"center"},children:"二维码有效期 3 分钟,登录成功后 Cookie 自动保存,下次无需重复扫码。"})]})}),i.jsxs("div",{className:"settings-section",style:{marginTop:"20px"},children:[i.jsxs("div",{className:"settings-section-head",children:[i.jsx("div",{className:"settings-section-title",children:"用户 IP 解析/下载记录"}),i.jsx("button",{className:"btn btn-mini",id:"admin-logs-refresh",type:"button",children:"刷新"})]}),i.jsx("div",{id:"admin-logs-list",style:{maxHeight:"320px",overflowY:"auto"}}),i.jsxs("div",{className:"comment-more",id:"admin-logs-pager",hidden:!0,children:[i.jsx("button",{className:"btn btn-sm",id:"admin-logs-prev",type:"button",children:"‹ 上一页"}),i.jsx("span",{id:"admin-logs-info",style:{margin:"0 12px",color:"var(--color-text-secondary)",fontSize:"13px"},children:"第 1 / 1 页"}),i.jsx("button",{className:"btn btn-sm",id:"admin-logs-next",type:"button",children:"下一页 ›"})]})]})]})]}),i.jsxs("div",{className:"panel"+(c.currentTab==="global"?" active":""),"data-panel":"global",children:[i.jsx("div",{id:"global-gate",children:i.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px",alignItems:"stretch"},children:[i.jsxs("div",{className:"hint",id:"global-gate-hint",style:{margin:"0"},children:["全局账号歌单展示系统中全局账号(管理员 ",i.jsx("code",{children:"cookie.txt"}),")收藏的歌单与「我喜欢的音乐」。 当前全局账号未登录或 Cookie 已失效,请先在「管理员设置」扫码登录全局账号。"]}),i.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center",flexWrap:"wrap"},children:[i.jsx("button",{className:"btn btn-primary",id:"global-goto-admin",type:"button",children:"🔑 前往管理员设置登录"}),i.jsx("button",{className:"btn",id:"global-refresh",type:"button",children:"刷新状态"})]})]})}),i.jsxs("div",{id:"global-content",hidden:!0,children:[i.jsxs("div",{className:"collection-header",children:[i.jsx("img",{className:"collection-cover collection-cover-round",id:"global-avatar",src:"",alt:"avatar"}),i.jsxs("div",{className:"collection-info",children:[i.jsx("div",{className:"collection-name",id:"global-nickname",style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"}}),i.jsx("div",{className:"collection-meta",id:"global-signature"}),i.jsxs("div",{className:"collection-actions",style:{display:"flex",gap:"10px",flexWrap:"wrap"},children:[i.jsx("button",{className:"btn btn-sm",id:"global-playlists-refresh",type:"button",children:"刷新歌单"}),i.jsx("button",{className:"btn btn-sm",id:"global-api-open",type:"button",children:"🔗 公开播放 API 说明"})]})]})]}),i.jsx("div",{className:"divider"}),i.jsxs("div",{className:"card-title",children:["❤️ 我喜欢的音乐 ",i.jsx("span",{className:"count",id:"global-fav-count"})]}),i.jsx("div",{className:"song-list",id:"global-fav-playlists"}),i.jsxs("div",{className:"card-title",children:["收藏的歌单 ",i.jsx("span",{className:"count",id:"global-collect-count"})]}),i.jsx("div",{className:"song-list",id:"global-collect-playlists"}),i.jsxs("div",{id:"global-tracks-wrap",hidden:!0,children:[i.jsx("div",{className:"divider"}),i.jsx("div",{className:"card-title",id:"global-tracks-title",children:"歌单歌曲"}),i.jsx("div",{className:"song-list",id:"global-tracks"}),i.jsxs("div",{className:"comment-more",id:"global-pager",hidden:!0,children:[i.jsx("button",{className:"btn btn-sm",id:"global-prev",type:"button",children:"‹ 上一页"}),i.jsx("span",{style:{margin:"0 12px",color:"var(--color-text-secondary)",fontSize:"13px"},id:"global-page-info",children:"第 1 / 1 页"}),i.jsx("button",{className:"btn btn-sm",id:"global-next",type:"button",children:"下一页 ›"})]}),i.jsxs("div",{style:{marginTop:"12px"},children:[i.jsx("button",{className:"btn btn-success btn-sm",id:"global-download-all",type:"button",children:"⬇ 批量下载全部"}),i.jsx("button",{className:"btn btn-sm btn-primary",id:"global-play-playlist",type:"button",hidden:!0,children:"▶ 播放歌单(公开 API)"})]})]})]})]}),i.jsx("div",{className:"panel"+(c.currentTab==="artist"?" active":""),"data-panel":"artist",children:i.jsxs("div",{className:"input-row",children:[i.jsx("input",{className:"input",id:"artist-input",placeholder:"网易云音乐的分享链接或歌手ID,例如 https://music.163.com/artist?id=6452",autoComplete:"off"}),i.jsx("button",{className:"btn btn-primary",id:"artist-btn",type:"button",children:"解析歌手"})]})}),i.jsxs("div",{className:"panel"+(c.currentTab==="toplist"?" active":""),"data-panel":"toplist",children:[i.jsx("div",{className:"input-row",style:{marginBottom:"16px"},children:i.jsx("span",{style:{color:"var(--color-text-secondary)"},children:"网易云官方实时排行榜,点击卡片即可查看榜单歌曲"})}),i.jsxs("div",{id:"toplist-loading",className:"empty-state",children:[i.jsx("div",{className:"empty-icon",children:"📊"}),i.jsx("div",{children:"加载中..."})]}),i.jsx("div",{className:"toplist-grid",id:"toplist-grid",hidden:!0})]}),i.jsxs("div",{className:"panel"+(c.currentTab==="personal"?" active":""),"data-panel":"personal",children:[i.jsxs("div",{id:"personal-gate",children:[i.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px",alignItems:"stretch"},children:[i.jsxs("div",{className:"hint",id:"personal-gate-hint",style:{margin:"0"},children:["扫码登录你自己的网易云账号,即可查看收藏的歌单(包括「我喜欢的音乐」)。 个人登录仅用于获取你的歌单,",i.jsx("b",{children:"解析与下载音乐仍使用管理员全局账号"}),"。"]}),i.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center",flexWrap:"wrap"},children:[i.jsx("button",{className:"btn btn-primary",id:"personal-qr-btn",type:"button",children:"📱 扫码登录我的账号"}),i.jsx("button",{className:"btn",id:"personal-refresh",type:"button",children:"刷新状态"})]})]}),i.jsx("div",{id:"personal-qr-area",hidden:!0,children:i.jsxs("div",{style:{textAlign:"center",padding:"16px 0"},children:[i.jsx("img",{id:"personal-qr-img",alt:"登录二维码",style:{width:"200px",height:"200px",borderRadius:"12px",boxShadow:"var(--color-shadow-heavy)",background:"#fff"}}),i.jsx("div",{className:"hint",id:"personal-qr-status",style:{textAlign:"center",marginTop:"12px"},children:"请使用网易云音乐手机 APP 扫描二维码登录"}),i.jsx("div",{className:"hint",style:{textAlign:"center"},children:"二维码有效期 3 分钟,登录后自动保存,下次无需重复扫码。"})]})})]}),i.jsxs("div",{id:"personal-content",hidden:!0,children:[i.jsxs("div",{className:"collection-header",children:[i.jsx("img",{className:"collection-cover collection-cover-round",id:"personal-avatar",src:"",alt:"avatar"}),i.jsxs("div",{className:"collection-info",children:[i.jsx("div",{className:"collection-name",id:"personal-nickname",style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"}}),i.jsx("div",{className:"collection-meta",id:"personal-signature"}),i.jsxs("div",{className:"collection-actions",style:{display:"flex",gap:"10px",flexWrap:"wrap"},children:[i.jsx("button",{className:"btn btn-sm",id:"personal-toggle-account",type:"button",children:"切换为个人账号解析"}),i.jsx("button",{className:"btn btn-danger btn-sm",id:"personal-logout",type:"button",children:"退出登录"}),i.jsx("button",{className:"btn btn-sm",id:"personal-playlists-refresh",type:"button",children:"刷新歌单"})]})]})]}),i.jsx("div",{className:"divider"}),i.jsxs("div",{className:"card-title",children:["我的歌单 ",i.jsx("span",{className:"count",id:"personal-playlist-count"})]}),i.jsx("div",{className:"song-list",id:"personal-playlists"}),i.jsxs("div",{id:"personal-tracks-wrap",hidden:!0,children:[i.jsx("div",{className:"divider"}),i.jsx("div",{className:"card-title",id:"personal-tracks-title",children:"歌单歌曲"}),i.jsx("div",{className:"song-list",id:"personal-tracks"}),i.jsxs("div",{className:"comment-more",id:"personal-pager",hidden:!0,children:[i.jsx("button",{className:"btn btn-sm",id:"personal-prev",type:"button",children:"‹ 上一页"}),i.jsx("span",{style:{margin:"0 12px",color:"var(--color-text-secondary)",fontSize:"13px"},id:"personal-page-info",children:"第 1 / 1 页"}),i.jsx("button",{className:"btn btn-sm",id:"personal-next",type:"button",children:"下一页 ›"})]}),i.jsx("div",{style:{marginTop:"12px"},children:i.jsx("button",{className:"btn btn-success btn-sm",id:"personal-download-all",type:"button",children:"⬇ 批量下载全部"})})]})]})]}),i.jsxs("div",{className:"panel"+(c.currentTab==="about"?" active":""),"data-panel":"about",children:[i.jsxs("div",{className:"about-hero",children:[i.jsx("div",{className:"about-logo",children:"♪"}),i.jsxs("div",{children:[i.jsx("div",{className:"about-title",children:"云村小助手"}),i.jsxs("div",{className:"about-sub",children:["基于 Flask + 原生前端的云村小助手 · 当前版本 ",i.jsx("b",{id:"about-version",children:"v2.1.0"})]})]})]}),i.jsx("div",{className:"divider",style:{marginTop:"16px"}}),i.jsx("div",{className:"card-title",children:"项目介绍"}),i.jsxs("p",{className:"about-text",children:["本项目是一个开箱即用的云村小助手,支持",i.jsx("b",{children:"歌曲搜索、单曲 / 歌单 / 专辑 / 歌手解析、官方榜单、个人歌单、播客解析"}),"等完整功能, 提供多音质试听与下载(标准 / 极高 / 无损 / Hi-Res / 沉浸环绕声等)、批量下载与 ZIP 打包、元数据写入、歌词下载(LRC / SRT)、 自定义播放器与逐字歌词、评论区、多账号体系(全局账号 + 个人账号)与下载任务进度管理。 服务端基于 Flask 与网易云官方接口实现,前端零框架原生实现,支持深色模式与响应式布局,可通过 Docker 一键部署。"]}),i.jsx("div",{className:"divider"}),i.jsx("div",{className:"card-title",children:"功能说明"}),i.jsxs("div",{className:"about-grid",children:[i.jsxs("div",{className:"about-card",children:[i.jsx("div",{className:"about-card-title",children:"🔍 多类型搜索"}),i.jsx("div",{className:"about-card-desc",children:"支持按歌曲、歌单、专辑、歌手搜索,结果一键跳转对应功能解析。"})]}),i.jsxs("div",{className:"about-card",children:[i.jsx("div",{className:"about-card-title",children:"🎵 单曲 / 歌单 / 专辑 / 歌手解析"}),i.jsx("div",{className:"about-card-desc",children:"输入链接或ID即可解析,自动按账号实测最高可解析音质输出,含封面、歌词与直链。"})]}),i.jsxs("div",{className:"about-card",children:[i.jsx("div",{className:"about-card-title",children:"🎙️ 播客解析"}),i.jsx("div",{className:"about-card-desc",children:"支持播客电台与单集解析:在线试听、音频直链、单集下载、整台打包 ZIP,热门播客分类浏览。"})]}),i.jsxs("div",{className:"about-card",children:[i.jsx("div",{className:"about-card-title",children:"📊 官方榜单"}),i.jsx("div",{className:"about-card-desc",children:"63 个网易云官方实时排行榜卡片墙,点击即看榜单歌曲。"})]}),i.jsxs("div",{className:"about-card",children:[i.jsx("div",{className:"about-card-title",children:"⬇ 下载能力"}),i.jsx("div",{className:"about-card-desc",children:"单曲 / 批量下载、ZIP 打包、文件命名格式、ffmpeg 元数据写入、LRC / SRT 歌词。"})]}),i.jsxs("div",{className:"about-card",children:[i.jsx("div",{className:"about-card-title",children:"🎧 播放器与歌词"}),i.jsx("div",{className:"about-card-desc",children:"自定义深色播放器、SMTC 系统媒体控制、逐字 KTV 歌词高亮、翻译双行、偏移校准。"})]}),i.jsxs("div",{className:"about-card",children:[i.jsx("div",{className:"about-card-title",children:"👥 多账号体系"}),i.jsx("div",{className:"about-card-desc",children:"全局账号负责解析下载;个人账号扫码登录查看自己的歌单,Cookie 保存在本机浏览器(站点账号登录时管理后台可按需查看)。"})]}),i.jsxs("div",{className:"about-card",children:[i.jsx("div",{className:"about-card-title",children:"🔒 隐私与任务管理"}),i.jsx("div",{className:"about-card-desc",children:"隐私协议 Cookie 偏好、下载任务进度悬浮窗、断线续传与离线暂停恢复、接口统计。"})]})]}),i.jsx("div",{className:"divider"}),i.jsx("div",{className:"card-title",children:"更新日志"}),i.jsx("div",{id:"about-changelog"}),i.jsx("div",{className:"hint",style:{marginTop:"14px"},children:"本工具仅供个人学习交流使用,音频内容版权归网易云音乐及内容创作者所有,请勿用于商业用途。"})]}),i.jsxs("div",{className:"panel"+(c.currentTab==="usercenter"?" active":""),"data-panel":"usercenter",children:[i.jsxs("div",{id:"uc-gate",className:"empty-state",children:[i.jsx("div",{className:"empty-icon",children:"🔒"}),i.jsx("div",{children:"请先登录后查看个人中心"})]}),i.jsxs("div",{id:"uc-content",hidden:!0,children:[i.jsxs("div",{className:"collection-header",children:[i.jsx("div",{className:"user-avatar",id:"uc-avatar",style:{width:"56px",height:"56px",fontSize:"24px"},children:"U"}),i.jsxs("div",{className:"collection-info",children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexWrap:"wrap"},children:[i.jsx("div",{className:"collection-name",id:"uc-username",style:{minWidth:"0"},children:"-"}),i.jsx("button",{className:"btn",id:"uc-logout",type:"button",style:{marginLeft:"auto",flexShrink:"0",borderColor:"var(--color-error)",color:"var(--color-error)"},children:"🚪 退出登录"})]}),i.jsx("div",{className:"collection-meta",id:"uc-role",children:"-"})]})]}),i.jsxs("div",{className:"uc-grid",style:{marginTop:"14px"},children:[i.jsxs("div",{className:"uc-card",children:[i.jsx("div",{className:"uc-card-title",children:"⏳ 剩余次数"}),i.jsx("div",{className:"uc-card-value",id:"uc-duration",children:"-"}),i.jsx("div",{className:"hint",style:{margin:"6px 0 0",fontSize:"12px"},children:"按次计费:一首歌消耗 1 次,歌单打包按歌曲数扣减"})]}),i.jsxs("div",{className:"uc-card",children:[i.jsx("div",{className:"uc-card-title",children:"📮 注册邮箱"}),i.jsx("div",{className:"uc-card-value",id:"uc-email",style:{fontSize:"14px"},children:"-"})]}),i.jsxs("div",{className:"uc-card",children:[i.jsx("div",{className:"uc-card-title",children:"📅 注册时间"}),i.jsx("div",{className:"uc-card-value",id:"uc-created",style:{fontSize:"14px"},children:"-"})]})]}),i.jsxs("div",{className:"uc-section",children:[i.jsx("div",{className:"card-title",children:"🎟️ 卡密充值"}),i.jsxs("div",{className:"input-row",children:[i.jsx("input",{className:"input",id:"uc-card-input",placeholder:"输入次数卡密,例如 VIP-XXXXXXXXXX",autoComplete:"off"}),i.jsx("button",{className:"btn btn-primary",id:"uc-card-redeem",type:"button",children:"充值"})]})]}),i.jsxs("div",{className:"uc-section",children:[i.jsx("div",{className:"card-title",children:"📢 系统公告"}),i.jsx("button",{className:"btn btn-sm",id:"uc-ann-view",type:"button",children:"查看最新公告"})]}),i.jsxs("div",{className:"uc-section",children:[i.jsx("div",{className:"card-title",children:"📋 版本信息"}),i.jsx("div",{id:"uc-changelog"})]})]})]}),i.jsxs("div",{className:"panel"+(c.currentTab==="useradmin"?" active":""),"data-panel":"useradmin",children:[i.jsxs("div",{id:"ua-gate",className:"empty-state",children:[i.jsx("div",{className:"empty-icon",children:"🔒"}),i.jsx("div",{children:"仅管理员可访问管理后台"})]}),i.jsx("div",{id:"ua-content",hidden:!0,children:i.jsxs("div",{className:"admin-layout",children:[i.jsxs("div",{className:"admin-side",id:"admin-side",children:[i.jsx("div",{className:"admin-side-item active","data-view":"users",children:"👥 用户管理"}),i.jsx("div",{className:"admin-side-item","data-view":"cookie",children:"🎵 全局Cookie"}),i.jsx("div",{className:"admin-side-item","data-view":"smtp",children:"📧 邮箱与SMTP"}),i.jsx("div",{className:"admin-side-item","data-view":"logs",children:"📝 日志管理"}),i.jsx("div",{className:"admin-side-item","data-view":"cards",children:"🎟️ 次数卡密"}),i.jsx("div",{className:"admin-side-item","data-view":"announce",children:"📢 公告设置"}),i.jsx("div",{className:"admin-side-item","data-view":"database",children:"🗄️ 数据库管理"}),i.jsx("div",{className:"admin-side-item","data-view":"playkey",children:"🔑 播放API密钥"}),i.jsx("div",{className:"admin-side-sep"}),i.jsx("div",{className:"admin-side-item",id:"ua-back",children:"🎧 返回解析"}),i.jsx("div",{className:"admin-side-item",id:"ua-logout",style:{color:"var(--color-error)"},children:"🚪 退出登录"})]}),i.jsxs("div",{className:"admin-main",children:[i.jsxs("div",{className:"admin-view active","data-aview":"users",children:[i.jsxs("div",{className:"admin-toolbar",children:[i.jsx("button",{className:"btn btn-sm",id:"ua-users-refresh",type:"button",children:"刷新用户列表"}),i.jsxs("span",{className:"hint",style:{margin:"0"},children:["共 ",i.jsx("b",{id:"ua-users-count",children:"0"})," 个用户"]})]}),i.jsx("div",{style:{overflowX:"auto"},children:i.jsxs("table",{className:"site-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"ID"}),i.jsx("th",{children:"用户名"}),i.jsx("th",{children:"邮箱"}),i.jsx("th",{children:"角色"}),i.jsx("th",{children:"剩余次数"}),i.jsx("th",{children:"注册IP / 设备"}),i.jsx("th",{children:"网易云Cookie"}),i.jsx("th",{children:"操作"})]})}),i.jsx("tbody",{id:"ua-users-body",children:i.jsx("tr",{children:i.jsx("td",{colSpan:8,children:"加载中..."})})})]})})]}),i.jsxs("div",{className:"admin-view","data-aview":"cookie",children:[i.jsx("div",{className:"hint",style:{marginTop:"0"},children:"全局网易云账号(管理员账号)Cookie 管理:用于全站解析与下载。原「管理员设置」页仍可用。"}),i.jsxs("div",{className:"uc-grid",style:{marginTop:"12px"},children:[i.jsxs("div",{className:"uc-card",children:[i.jsx("div",{className:"uc-card-title",children:"当前状态"}),i.jsx("div",{className:"uc-card-value",id:"ua-cookie-status",style:{fontSize:"14px"},children:"获取中..."}),i.jsx("button",{className:"btn btn-sm",id:"ua-cookie-refresh",type:"button",style:{marginTop:"10px"},children:"刷新状态"})]}),i.jsxs("div",{className:"uc-card",children:[i.jsx("div",{className:"uc-card-title",children:"扫码登录全局账号"}),i.jsx("div",{id:"ua-qr-box",style:{textAlign:"center",minHeight:"60px"}}),i.jsx("div",{className:"hint",id:"ua-qr-tip",style:{margin:"8px 0 0",textAlign:"center"},children:"点击下方按钮生成二维码"}),i.jsx("button",{className:"btn btn-primary btn-sm",id:"ua-qr-create",type:"button",style:{marginTop:"10px",width:"100%"},children:"📱 生成登录二维码"})]}),i.jsxs("div",{className:"uc-card",children:[i.jsx("div",{className:"uc-card-title",children:"危险操作"}),i.jsx("div",{className:"hint",style:{margin:"0 0 10px"},children:"删除后需重新扫码登录才能解析。"}),i.jsx("button",{className:"btn btn-sm",id:"ua-cookie-delete",type:"button",style:{borderColor:"var(--color-error)",color:"var(--color-error)"},children:"🗑 删除全局 Cookie"})]})]})]}),i.jsxs("div",{className:"admin-view","data-aview":"smtp",children:[i.jsx("div",{className:"hint",style:{marginTop:"0"},children:"配置 SMTP 后用户注册需邮箱验证码。常用端口:587(STARTTLS)/ 465(SSL)。邮箱密码一般为「授权码」。"}),i.jsxs("div",{className:"auth-form",style:{maxWidth:"460px"},children:[i.jsx("input",{className:"input",id:"ua-smtp-host",placeholder:"SMTP 服务器,例如 smtp.qq.com"}),i.jsxs("div",{className:"auth-form-row",children:[i.jsx("input",{className:"input",id:"ua-smtp-port",placeholder:"端口(默认587)",type:"number"}),i.jsx("input",{className:"input",id:"ua-smtp-sender",placeholder:"发件邮箱"})]}),i.jsx("input",{className:"input",id:"ua-smtp-pass",placeholder:"邮箱密码 / 授权码",type:"password"}),i.jsxs("div",{className:"auth-form-row",children:[i.jsx("input",{className:"input",id:"ua-smtp-test-to",placeholder:"测试收件邮箱"}),i.jsx("button",{className:"btn",id:"ua-smtp-test",type:"button",style:{flex:"none"},children:"发送测试邮件"})]}),i.jsx("button",{className:"btn btn-primary",id:"ua-smtp-save",type:"button",children:"保存配置"})]})]}),i.jsxs("div",{className:"admin-view","data-aview":"logs",children:[i.jsxs("div",{className:"admin-toolbar",children:[i.jsx("button",{className:"btn btn-sm",id:"ua-log-tab-ok",type:"button",children:"✔ 成功日志"}),i.jsx("button",{className:"btn btn-sm",id:"ua-log-tab-fail",type:"button",children:"✖ 失败日志"}),i.jsx("button",{className:"btn btn-sm",id:"ua-log-refresh",type:"button",children:"刷新"}),i.jsxs("span",{className:"hint",style:{margin:"0"},children:["第 ",i.jsx("b",{id:"ua-log-page",children:"1"})," / ",i.jsx("b",{id:"ua-log-pages",children:"1"})," 页 · 共 ",i.jsx("b",{id:"ua-log-total",children:"0"})," 条"]}),i.jsx("button",{className:"btn btn-sm",id:"ua-log-prev",type:"button",children:"‹ 上一页"}),i.jsx("button",{className:"btn btn-sm",id:"ua-log-next",type:"button",children:"下一页 ›"}),i.jsx("button",{className:"btn btn-sm",id:"ua-log-clear",type:"button",style:{color:"var(--color-error)"},children:"🗑 清除当前日志"})]}),i.jsx("div",{className:"code-box log-list",id:"ua-log-list",children:"加载中..."})]}),i.jsxs("div",{className:"admin-view","data-aview":"cards",children:[i.jsxs("div",{className:"admin-toolbar",children:[i.jsx("input",{className:"input",id:"ua-card-count",type:"number",defaultValue:"10",min:"1",max:"500",placeholder:"张数",title:"生成数量(张)",style:{width:"90px"}}),i.jsx("input",{className:"input",id:"ua-card-prefix",placeholder:"卡密前缀",defaultValue:"VIP",title:"卡密前缀",style:{width:"90px"}}),i.jsxs("select",{className:"select",id:"ua-card-minutes",title:"每张卡密的下载次数",defaultValue:"10",children:[i.jsx("option",{value:"3",children:"体验卡 · 3次"}),i.jsx("option",{value:"10",children:"次卡 · 10次"}),i.jsx("option",{value:"50",children:"次卡 · 50次"}),i.jsx("option",{value:"100",children:"次卡 · 100次"}),i.jsx("option",{value:"500",children:"次卡 · 500次"}),i.jsx("option",{value:"2000",children:"次卡 · 2000次"}),i.jsx("option",{value:"custom",children:"⚙ 自定义次数"})]}),i.jsx("input",{className:"input",id:"ua-card-custom",type:"number",min:"1",placeholder:"自定义次数",hidden:!0,style:{width:"100px"}}),i.jsx("input",{className:"input",id:"ua-card-days",type:"number",defaultValue:"0",min:"0",placeholder:"有效天数",title:"有效天数(0=永久有效)",style:{width:"100px"}}),i.jsx("input",{className:"input",id:"ua-card-note",placeholder:"备注(如:渠道 / 活动名)",style:{flex:"1",minWidth:"140px"}}),i.jsx("button",{className:"btn btn-primary btn-sm",id:"ua-card-gen",type:"button",children:"生成卡密"})]}),i.jsx("div",{className:"code-box",id:"ua-card-codes",hidden:!0}),i.jsx("div",{style:{overflowX:"auto",marginTop:"12px"},children:i.jsxs("table",{className:"site-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"卡密"}),i.jsx("th",{children:"次数"}),i.jsx("th",{children:"状态"}),i.jsx("th",{children:"使用者"}),i.jsx("th",{children:"备注"}),i.jsx("th",{children:"有效期至"}),i.jsx("th",{children:"生成日期"}),i.jsx("th",{children:"操作"})]})}),i.jsx("tbody",{id:"ua-cards-body",children:i.jsx("tr",{children:i.jsx("td",{colSpan:8,children:"加载中..."})})})]})}),i.jsx("div",{id:"ua-cards-pager",hidden:!0,style:{display:"flex",gap:"12px",alignItems:"center",marginTop:"10px"}})]}),i.jsx("div",{className:"admin-view","data-aview":"announce",children:i.jsxs("div",{className:"auth-form",style:{maxWidth:"560px"},children:[i.jsx("input",{className:"input",id:"ua-ann-title",placeholder:"公告标题"}),i.jsx("textarea",{className:"input",id:"ua-ann-content",rows:6,placeholder:"公告内容(支持换行)",style:{height:"auto",resize:"vertical",lineHeight:"1.6"}}),i.jsxs("select",{className:"select",id:"ua-ann-mode",defaultValue:"every",children:[i.jsx("option",{value:"off",children:"不弹窗(仅个人中心可看)"}),i.jsx("option",{value:"every",children:"每次登录弹出"}),i.jsx("option",{value:"once",children:"仅弹出一次(更新后再次弹出)"})]}),i.jsx("button",{className:"btn btn-primary",id:"ua-ann-save",type:"button",children:"保存公告"})]})}),i.jsxs("div",{className:"admin-view","data-aview":"database",children:[i.jsxs("div",{className:"admin-toolbar",children:[i.jsx("button",{className:"btn btn-primary btn-sm",id:"ua-db-backup",type:"button",children:"立即备份"}),i.jsx("input",{className:"input",id:"ua-db-hours",type:"number",min:"0",step:"0.5",style:{width:"110px"},title:"自动备份间隔(小时)"}),i.jsx("button",{className:"btn btn-sm",id:"ua-db-auto",type:"button",children:"保存自动备份间隔"}),i.jsxs("label",{className:"btn btn-sm",style:{cursor:"pointer"},children:["上传备份",i.jsx("input",{type:"file",id:"ua-db-upload",accept:".db",hidden:!0})]}),i.jsxs("span",{className:"hint",style:{margin:"0"},children:["数据库大小:",i.jsx("b",{id:"ua-db-size",children:"-"})]})]}),i.jsx("div",{style:{overflowX:"auto"},children:i.jsxs("table",{className:"site-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"备份文件"}),i.jsx("th",{children:"大小"}),i.jsx("th",{children:"时间"}),i.jsx("th",{children:"操作"})]})}),i.jsx("tbody",{id:"ua-db-body",children:i.jsx("tr",{children:i.jsx("td",{colSpan:4,children:"加载中..."})})})]})})]}),i.jsxs("div",{className:"admin-view","data-aview":"playkey",children:[i.jsxs("div",{className:"hint",style:{marginTop:"0"},children:["「公开播放 API」(",i.jsx("code",{children:"/api/playlist/play"}),")的访问密钥。无密钥的请求一律拒绝;",i.jsx("b",{children:"刷新后旧密钥立即全部失效"}),"(已签发的音频地址按 36 分钟自然过期)。"]}),i.jsxs("div",{className:"admin-toolbar",style:{alignItems:"center"},children:[i.jsx("input",{className:"input",id:"ua-playkey-value",readOnly:!0,style:{flex:"1",minWidth:"220px",fontFamily:"monospace",letterSpacing:"1px"},placeholder:"点击「显示密钥」查看"}),i.jsx("button",{className:"btn btn-sm",id:"ua-playkey-show",type:"button",children:"显示密钥"}),i.jsx("button",{className:"btn btn-sm",id:"ua-playkey-copy",type:"button",children:"复制"}),i.jsx("button",{className:"btn btn-primary btn-sm",id:"ua-playkey-rotate",type:"button",children:"刷新密钥"})]}),i.jsxs("div",{className:"hint",style:{margin:"4px 0 0"},children:["外部调用示例:",i.jsx("code",{id:"ua-playkey-example",children:"/api/playlist/play?id=歌单ID&key=你的密钥"}),"。刷新密钥前请确认外部使用方能及时更新(旧地址会立即打不开)。"]})]})]})]})})]})]}),i.jsxs("div",{className:"card",id:"search-result",hidden:!0,children:[i.jsxs("div",{className:"card-title",children:["搜索结果 ",i.jsx("span",{className:"count",id:"search-count"})]}),i.jsx("div",{className:"song-list",id:"search-list"})]}),i.jsxs("div",{className:"card",id:"song-result",hidden:!0,children:[i.jsx("div",{className:"card-title",children:"单曲解析结果"}),i.jsxs("div",{className:"song-detail",children:[i.jsx("img",{className:"song-detail-cover",id:"detail-cover",src:"",alt:"cover"}),i.jsxs("div",{className:"song-detail-info",children:[i.jsx("div",{className:"detail-name",id:"detail-name"}),i.jsxs("div",{className:"detail-meta",children:[i.jsx("b",{children:"歌手"}),i.jsx("span",{id:"detail-artist"})]}),i.jsxs("div",{className:"detail-meta",children:[i.jsx("b",{children:"专辑"}),i.jsx("span",{id:"detail-album"})]}),i.jsxs("div",{className:"detail-badges",children:[i.jsx("span",{className:"badge",id:"detail-level"}),i.jsx("span",{className:"badge badge-green",id:"detail-size"})]}),i.jsxs("div",{className:"detail-actions",children:[i.jsx("button",{className:"btn btn-success btn-sm",id:"detail-download",type:"button",children:"⬇ 下载音乐文件"}),i.jsx("button",{className:"btn btn-sm",id:"detail-lyric-download",type:"button",children:"下载歌词"})]}),i.jsx("div",{className:"hint",id:"detail-tip",hidden:!0})]})]}),i.jsxs("div",{className:"player",id:"player",hidden:!0,children:[i.jsxs("div",{className:"player-top",children:[i.jsx("img",{className:"player-cover",id:"player-cover",src:"",alt:""}),i.jsxs("div",{className:"player-track",children:[i.jsx("div",{className:"player-name",id:"player-name"}),i.jsx("div",{className:"player-artist",id:"player-artist"})]}),i.jsxs("div",{className:"player-controls",children:[i.jsx("button",{className:"player-ctrl player-ctrl-sm",id:"player-restart",type:"button",title:"重新播放",children:"↺"}),i.jsx("button",{className:"player-ctrl",id:"player-toggle",type:"button",title:"播放/暂停",children:"▶"})]})]}),i.jsxs("div",{className:"player-bottom",children:[i.jsx("span",{className:"player-time",id:"player-current",children:"00:00"}),i.jsx("div",{className:"progress",id:"player-progress",children:i.jsx("div",{className:"progress-fill",id:"player-progress-fill"})}),i.jsx("span",{className:"player-time",id:"player-duration",children:"00:00"}),i.jsxs("div",{className:"volume-wrap",children:[i.jsx("button",{className:"volume-btn",id:"player-mute",type:"button",title:"静音",children:"🔊"}),i.jsx("div",{className:"volume-slider",id:"player-volume",children:i.jsx("div",{className:"volume-fill",id:"player-volume-fill"})})]})]})]}),i.jsxs("div",{className:"lyric-panel",id:"lyric-panel",hidden:!0,children:[i.jsxs("div",{className:"lyric-panel-title",style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px",flexWrap:"wrap",rowGap:"6px"},children:[i.jsx("span",{children:"歌词"}),i.jsxs("span",{className:"lyric-calib",children:[i.jsx("button",{className:"btn btn-mini",id:"lyric-fontsize",type:"button",title:"歌词字号","aria-haspopup":"true","aria-expanded":"false",children:"A±"}),i.jsxs("span",{className:"lyric-fs-pop",id:"lyric-fs-pop",hidden:!0,children:[i.jsx("button",{className:"btn lyric-fs-btn",id:"lyric-fs-dec",type:"button",title:"缩小歌词字号",children:"A−"}),i.jsx("span",{className:"lyric-fs-val",id:"lyric-fs-val",children:"100%"}),i.jsx("button",{className:"btn lyric-fs-btn",id:"lyric-fs-inc",type:"button",title:"放大歌词字号",children:"A+"}),i.jsx("button",{className:"btn lyric-fs-btn",id:"lyric-fs-reset",type:"button",title:"恢复默认字号",children:"↺"})]}),i.jsx("button",{className:"btn btn-mini",id:"lyric-advance",type:"button",title:"歌词提前 0.25 秒",children:"⏱ 提前"}),i.jsx("button",{className:"btn btn-mini",id:"lyric-delay",type:"button",title:"歌词延后 0.25 秒",children:"⏱ 延后"}),i.jsx("span",{className:"lyric-offset-label",id:"lyric-offset-label",children:"偏移 0.00s"})]})]}),i.jsx("div",{className:"lyric-box",id:"lyric-box"})]}),i.jsxs("div",{className:"comment-panel",id:"comment-panel",hidden:!0,children:[i.jsxs("div",{className:"comment-panel-title",children:["评论 ",i.jsx("span",{className:"count",id:"comment-count"})]}),i.jsxs("div",{id:"comment-composer",hidden:!0,children:[i.jsx("textarea",{className:"input",id:"comment-input",rows:2,placeholder:"登录个人账号后,说点什么吧...(140字以内)",style:{width:"100%",height:"auto",resize:"vertical",lineHeight:"1.5"}}),i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"8px",gap:"8px",flexWrap:"wrap"},children:[i.jsxs("span",{className:"hint",id:"comment-reply-to",hidden:!0,style:{margin:"0"},children:["回复 @",i.jsx("span",{id:"comment-reply-name",style:{color:"var(--color-primary)"}}),i.jsx("button",{className:"btn-link",id:"comment-reply-cancel",type:"button",style:{border:"none",background:"none",color:"var(--color-error)",cursor:"pointer",fontSize:"12px",padding:"0",marginLeft:"6px"},children:"取消"})]}),i.jsx("button",{className:"btn btn-primary btn-sm",id:"comment-submit",type:"button",children:"发布评论"})]})]}),i.jsx("div",{id:"comment-hot-title",className:"hint",style:{margin:"0 0 4px 8px",fontWeight:"500",color:"var(--color-text-secondary)"},children:"热门评论"}),i.jsx("div",{className:"comment-list",id:"comment-hot-list"}),i.jsx("div",{id:"comment-all-title",className:"hint",style:{margin:"12px 0 4px 8px",fontWeight:"500",color:"var(--color-text-secondary)"},children:"全部评论"}),i.jsx("div",{className:"comment-list",id:"comment-all-list"}),i.jsxs("div",{className:"comment-more",id:"comment-pager",hidden:!0,children:[i.jsx("button",{className:"btn btn-sm",id:"comment-prev",type:"button",children:"‹ 上一页"}),i.jsx("span",{className:"comment-page-info",id:"comment-page-info",style:{margin:"0 12px",color:"var(--color-text-secondary)",fontSize:"13px"},children:"第 1 / 1 页"}),i.jsx("button",{className:"btn btn-sm",id:"comment-next",type:"button",children:"下一页 ›"})]})]})]}),i.jsxs("div",{className:"card",id:"playlist-result",hidden:!0,children:[i.jsx("div",{className:"card-title",children:"歌单解析结果"}),i.jsxs("div",{className:"collection-header",children:[i.jsx("img",{className:"collection-cover",id:"playlist-cover",src:"",alt:"cover"}),i.jsxs("div",{className:"collection-info",children:[i.jsx("div",{className:"collection-name",id:"playlist-name"}),i.jsx("div",{className:"collection-meta",id:"playlist-creator"}),i.jsxs("div",{className:"collection-meta",children:["共 ",i.jsx("b",{id:"playlist-count"})," 首歌"]}),i.jsx("div",{className:"collection-desc",id:"playlist-desc",hidden:!0}),i.jsxs("div",{className:"collection-actions",children:[i.jsx("button",{className:"btn btn-sm",id:"collect-playlist-btn",type:"button",hidden:!0,children:"♡ 收藏歌单"}),i.jsx("button",{className:"btn btn-primary btn-sm",id:"playlist-api-btn",type:"button",children:"🔗 公开播放 API"}),i.jsx("button",{className:"btn btn-success btn-sm",id:"playlist-download-all",type:"button",children:"⬇ 批量下载全部"})]})]})]}),i.jsx("div",{className:"divider"}),i.jsx("div",{className:"song-list",id:"playlist-tracks"}),i.jsxs("div",{className:"comment-more",id:"playlist-pager",hidden:!0,children:[i.jsx("button",{className:"btn btn-sm",id:"playlist-prev",type:"button",children:"‹ 上一页"}),i.jsx("span",{style:{margin:"0 12px",color:"var(--color-text-secondary)",fontSize:"13px"},id:"playlist-page-info",children:"第 1 / 1 页"}),i.jsx("button",{className:"btn btn-sm",id:"playlist-next",type:"button",children:"下一页 ›"})]})]}),i.jsxs("div",{className:"card",id:"album-result",hidden:!0,children:[i.jsx("div",{className:"card-title",children:"专辑解析结果"}),i.jsxs("div",{className:"collection-header",children:[i.jsx("img",{className:"collection-cover",id:"album-cover",src:"",alt:"cover"}),i.jsxs("div",{className:"collection-info",children:[i.jsx("div",{className:"collection-name",id:"album-name"}),i.jsx("div",{className:"collection-meta",id:"album-artist"}),i.jsxs("div",{className:"collection-meta",children:["共 ",i.jsx("b",{id:"album-count"})," 首歌"]}),i.jsx("div",{className:"collection-desc",id:"album-desc",hidden:!0}),i.jsxs("div",{className:"collection-actions",children:[i.jsx("button",{className:"btn btn-sm",id:"collect-album-btn",type:"button",hidden:!0,children:"♡ 收藏专辑"}),i.jsx("button",{className:"btn btn-success btn-sm",id:"album-download-all",type:"button",children:"⬇ 批量下载全部"})]})]})]}),i.jsx("div",{className:"divider"}),i.jsx("div",{className:"song-list",id:"album-tracks"}),i.jsxs("div",{className:"comment-more",id:"album-pager",hidden:!0,children:[i.jsx("button",{className:"btn btn-sm",id:"album-prev",type:"button",children:"‹ 上一页"}),i.jsx("span",{style:{margin:"0 12px",color:"var(--color-text-secondary)",fontSize:"13px"},id:"album-page-info",children:"第 1 / 1 页"}),i.jsx("button",{className:"btn btn-sm",id:"album-next",type:"button",children:"下一页 ›"})]})]}),i.jsxs("div",{className:"card",id:"artist-result",hidden:!0,children:[i.jsx("div",{className:"card-title",children:"歌手解析结果"}),i.jsxs("div",{className:"collection-header",children:[i.jsx("img",{className:"collection-cover collection-cover-round",id:"artist-cover",src:"",alt:"avatar"}),i.jsxs("div",{className:"collection-info",children:[i.jsx("div",{className:"collection-name",id:"artist-name"}),i.jsx("div",{className:"collection-meta",id:"artist-alias"}),i.jsxs("div",{className:"collection-meta",children:["共 ",i.jsx("b",{id:"artist-count"})," 首热门歌曲"]}),i.jsx("div",{className:"collection-desc",id:"artist-desc",hidden:!0}),i.jsx("div",{className:"collection-actions",children:i.jsx("button",{className:"btn btn-success btn-sm",id:"artist-download-all",type:"button",children:"⬇ 批量下载全部"})})]})]}),i.jsx("div",{className:"divider"}),i.jsx("div",{className:"song-list",id:"artist-tracks"}),i.jsxs("div",{className:"comment-more",id:"artist-pager",hidden:!0,children:[i.jsx("button",{className:"btn btn-sm",id:"artist-prev",type:"button",children:"‹ 上一页"}),i.jsx("span",{style:{margin:"0 12px",color:"var(--color-text-secondary)",fontSize:"13px"},id:"artist-page-info",children:"第 1 / 1 页"}),i.jsx("button",{className:"btn btn-sm",id:"artist-next",type:"button",children:"下一页 ›"})]})]})]}),"// 自动转换片段(供手工组装)",i.jsx("div",{className:"drawer-mask"+(Il()?" show":""),id:"drawer-mask"}),"// 自动转换片段(供手工组装)",i.jsxs("aside",{className:"drawer"+(Il()?" show":""),id:"settings-drawer",children:[i.jsxs("div",{className:"drawer-header",children:[i.jsx("div",{className:"drawer-title",children:"个性化设置"}),i.jsx("button",{className:"drawer-close",id:"drawer-close",type:"button",children:"×"})]}),i.jsxs("div",{className:"drawer-body",children:[i.jsxs("div",{className:"settings-section",children:[i.jsx("div",{className:"settings-section-title",children:"外观模式"}),i.jsxs("div",{className:"mode-seg",id:"mode-seg",children:[i.jsx("div",{className:"seg-item",tabIndex:0,role:"button","data-mode":"light",children:"浅色"}),i.jsx("div",{className:"seg-item",tabIndex:0,role:"button","data-mode":"dark",children:"深色"}),i.jsx("div",{className:"seg-item",tabIndex:0,role:"button","data-mode":"system",children:"跟随系统"})]})]}),i.jsxs("div",{className:"settings-section",children:[i.jsx("div",{className:"settings-section-title",children:"主题颜色"}),i.jsx("div",{className:"color-palette",id:"color-palette"})]}),i.jsxs("div",{className:"settings-section",children:[i.jsxs("div",{className:"settings-section-head",children:[i.jsx("div",{className:"settings-section-title",children:"下载配置"}),i.jsx("button",{className:"btn btn-mini",id:"cfg-save-download",type:"button",children:"保存"})]}),i.jsxs("div",{className:"setting-item",children:[i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"文件命名格式"}),i.jsx("div",{className:"setting-desc",children:"单曲下载的文件名格式"})]}),i.jsxs("select",{className:"select",id:"cfg-filename-format",style:{width:"150px",height:"30px"},children:[i.jsx("option",{value:"artist_song",children:"歌手 - 歌曲名"}),i.jsx("option",{value:"song_artist",children:"歌曲名 - 歌手"}),i.jsx("option",{value:"song",children:"仅歌曲名"})]})]}),i.jsxs("div",{className:"setting-item",children:[i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"写入元数据"}),i.jsx("div",{className:"setting-desc",children:"写入歌曲名、歌手、专辑、封面等信息"})]}),i.jsx("div",{className:"switch",id:"cfg-write-meta"})]}),i.jsxs("div",{className:"check-grid",id:"cfg-meta-fields-wrap",style:{margin:"6px 0 10px"},children:[i.jsxs("label",{className:"check-item",children:[i.jsx("input",{type:"checkbox","data-field":"name"})," 歌曲名"]}),i.jsxs("label",{className:"check-item",children:[i.jsx("input",{type:"checkbox","data-field":"artist"})," 歌手"]}),i.jsxs("label",{className:"check-item",children:[i.jsx("input",{type:"checkbox","data-field":"album"})," 专辑"]}),i.jsxs("label",{className:"check-item",children:[i.jsx("input",{type:"checkbox","data-field":"cover"})," 封面"]}),i.jsxs("label",{className:"check-item",children:[i.jsx("input",{type:"checkbox","data-field":"lyrics"})," 歌词"]}),i.jsxs("label",{className:"check-item",children:[i.jsx("input",{type:"checkbox","data-field":"date"})," 发布日期"]})]}),i.jsx("div",{className:"setting-desc",style:{fontSize:"12px",color:"var(--color-text-tertiary)",marginBottom:"6px"},children:"仅在「写入元数据」开启时生效。未勾选字段将保持原音频文件中的值不变。批量下载同样遵循此设置。"}),i.jsxs("div",{className:"setting-item",children:[i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"启用ZIP打包"}),i.jsx("div",{className:"setting-desc",children:"打包音频、歌词、封面、信息文件为一个压缩包"})]}),i.jsx("div",{className:"switch",id:"cfg-zip"})]})]}),i.jsxs("div",{className:"settings-section",children:[i.jsxs("div",{className:"settings-section-head",children:[i.jsx("div",{className:"settings-section-title",children:"批量下载配置"}),i.jsx("button",{className:"btn btn-mini",id:"cfg-save-batch",type:"button",children:"保存"})]}),i.jsxs("div",{className:"setting-item",children:[i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"写入元数据"}),i.jsx("div",{className:"setting-desc",children:"为批量下载的歌曲写入歌曲名、歌手、封面等信息"})]}),i.jsx("div",{className:"switch",id:"cfg-batch-meta"})]}),i.jsxs("div",{className:"setting-item",children:[i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"启用ZIP打包"}),i.jsx("div",{className:"setting-desc",children:"批量下载时将所有文件打包为一个压缩包,否则将逐个下载"})]}),i.jsx("div",{className:"switch",id:"cfg-batch-zip"})]})]}),i.jsxs("div",{className:"settings-section",children:[i.jsxs("div",{className:"settings-section-head",children:[i.jsx("div",{className:"settings-section-title",children:"歌词"}),i.jsx("button",{className:"btn btn-mini",id:"cfg-save-lyric",type:"button",children:"保存"})]}),i.jsxs("div",{className:"setting-item",children:[i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"歌词格式"}),i.jsx("div",{className:"setting-desc",children:"下载歌词 / 打包中歌词的格式"})]}),i.jsxs("select",{className:"select",id:"cfg-lyric-format",style:{width:"110px",height:"30px"},children:[i.jsx("option",{value:"lrc",children:"LRC"}),i.jsx("option",{value:"srt",children:"SRT"})]})]}),i.jsxs("div",{className:"setting-item",children:[i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"翻译歌词分两行显示"}),i.jsx("div",{className:"setting-desc",children:"开启后播放器歌词原文在上、翻译在下分行展示"})]}),i.jsx("div",{className:"switch",id:"switch-lyric2line"})]}),i.jsxs("div",{className:"setting-item",children:[i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"逐字歌词(KTV 模式)"}),i.jsx("div",{className:"setting-desc",children:"当前行歌词逐字渐变高亮,无逐字歌词时自动回退普通 LRC"})]}),i.jsx("div",{className:"switch",id:"switch-ktv"})]})]}),i.jsxs("div",{className:"settings-section",children:[i.jsx("div",{className:"settings-section-title",children:"播放"}),i.jsxs("div",{className:"setting-item",children:[i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"播放进度记忆"}),i.jsx("div",{className:"setting-desc",children:"记住上次播放位置,再次打开时续播"})]}),i.jsx("div",{className:"switch",id:"switch-progress"})]})]}),i.jsxs("div",{className:"settings-section",children:[i.jsx("div",{className:"settings-section-title",children:"其他配置"}),i.jsxs("div",{className:"setting-item",children:[i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"启用SMTC"}),i.jsx("div",{className:"setting-desc",children:"在系统媒体控制面板(如 Windows 锁屏/音量面板)显示播放信息"})]}),i.jsx("div",{className:"switch",id:"switch-smtc"})]}),i.jsxs("div",{className:"setting-item",children:[i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"显示评论区"}),i.jsx("div",{className:"setting-desc",children:"关闭后单曲信息下方将不再显示评论区"})]}),i.jsx("div",{className:"switch",id:"switch-comments"})]}),i.jsxs("div",{className:"setting-item",children:[i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"接口请求统计"}),i.jsx("div",{className:"setting-desc",children:"联动后端 /api/topen 实时获取各接口请求统计,每 10 秒自动刷新"})]}),i.jsxs("div",{style:{display:"flex",gap:"8px",flex:"none"},children:[i.jsx("button",{className:"btn btn-mini",id:"cfg-stats-view",type:"button",children:"查看统计"}),i.jsx("button",{className:"btn btn-mini",id:"cfg-stats-refresh",type:"button",children:"刷新"})]})]}),i.jsxs("div",{className:"setting-item",children:[i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"隐私与协议"}),i.jsx("div",{className:"setting-desc",children:"查看或修改《用户协议》《隐私政策》以及 Cookie 启用情况"})]}),i.jsx("button",{className:"btn btn-mini",id:"cfg-cookie-prefs",type:"button",children:"管理Cookie偏好"})]})]})]}),i.jsxs("div",{className:"drawer-footer",children:[i.jsx("button",{className:"btn btn-primary",id:"settings-save",type:"button",children:"保存设置"}),i.jsx("button",{className:"btn",id:"settings-reset",type:"button",children:"恢复默认"})]})]}),"// 自动转换片段(供手工组装)",i.jsx("div",{className:"modal-mask"+(yt("changelog-modal")?" show":""),id:"changelog-modal",children:i.jsxs("div",{className:"modal",children:[i.jsxs("div",{className:"modal-header",children:[i.jsx("div",{className:"modal-title",children:"更新日志"}),i.jsx("button",{className:"drawer-close",id:"changelog-close",type:"button",children:"×"})]}),i.jsx("div",{className:"modal-body",id:"changelog-body"})]})}),"// 自动转换片段(供手工组装)",i.jsx("div",{className:"modal-mask"+(yt("stats-modal")?" show":""),id:"stats-modal",children:i.jsxs("div",{className:"modal",children:[i.jsxs("div",{className:"modal-header",children:[i.jsx("div",{className:"modal-title",children:"接口请求统计"}),i.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[i.jsx("button",{className:"btn btn-mini",id:"stats-refresh-btn",type:"button",children:"刷新"}),i.jsx("button",{className:"drawer-close",id:"stats-close",type:"button",children:"×"})]})]}),i.jsxs("div",{className:"modal-body",children:[i.jsxs("div",{className:"stat-grid",children:[i.jsxs("div",{className:"stat-card",children:[i.jsx("div",{className:"stat-num",id:"stat-total",children:"-"}),i.jsx("div",{className:"stat-label",children:"总请求数"})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx("div",{className:"stat-num",id:"stat-endpoints",children:"-"}),i.jsx("div",{className:"stat-label",children:"不同端点数"})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx("div",{className:"stat-num",id:"stat-max",children:"-"}),i.jsx("div",{className:"stat-label",children:"最高端点请求数"})]})]}),i.jsx("div",{className:"settings-section-title",style:{marginTop:"16px"},children:"按接口端点明细(按请求数倒序)"}),i.jsx("div",{id:"stats-list"}),i.jsxs("div",{className:"stat-refresh-info",children:["数据来源:GET /api/topen · 每 10 秒自动刷新 · 最近刷新:",i.jsx("span",{id:"stats-refresh-time",children:"-"})]})]})]})}),"// 自动转换片段(供手工组装)",i.jsx("div",{className:"modal-mask"+(yt("api-modal")?" show":""),id:"api-modal",children:i.jsxs("div",{className:"modal",children:[i.jsxs("div",{className:"modal-header",children:[i.jsx("div",{className:"modal-title",children:"🔗 公开歌单播放 API"}),i.jsx("button",{className:"drawer-close",id:"api-close",type:"button",children:"×"})]}),i.jsxs("div",{className:"modal-body",children:[i.jsx("div",{className:"hint",style:{margin:"0 0 12px"},children:"公开接口,无需登录即可调用:返回歌单信息 + 每首歌的可播放直链(使用全局账号解析音质)。"}),i.jsxs("div",{className:"setting-item",style:{padding:"6px 0"},children:[i.jsxs("div",{style:{flex:"1"},children:[i.jsx("div",{className:"setting-label",children:"接口地址"}),i.jsx("div",{className:"setting-desc",style:{wordBreak:"break-all"},id:"api-url",children:"-"})]}),i.jsx("button",{className:"btn btn-mini",id:"api-copy-url",type:"button",children:"复制"})]}),i.jsx("div",{className:"setting-item",style:{padding:"6px 0"},children:i.jsxs("div",{children:[i.jsx("div",{className:"setting-label",children:"请求方式"}),i.jsx("div",{className:"setting-desc",children:"GET / POST(均支持表单或 JSON 参数)"})]})}),i.jsx("div",{className:"settings-section-title",style:{marginTop:"14px"},children:"请求参数"}),i.jsxs("div",{style:{fontSize:"13px",color:"var(--color-text-secondary)",lineHeight:"2"},children:[i.jsxs("div",{children:["· ",i.jsx("code",{children:"id"})," ",i.jsx("span",{style:{color:"var(--color-error)"},children:"必填"}),":歌单 ID 或网易云分享链接"]}),i.jsxs("div",{children:["· ",i.jsx("code",{children:"level"})," ",i.jsx("span",{style:{color:"var(--color-text-tertiary)"},children:"选填"}),":音质等级,默认 ",i.jsx("code",{children:"lossless"}),"(standard/exhigh/lossless/hires/sky/jyeffect/jymaster/dolby)"]}),i.jsxs("div",{children:["· ",i.jsx("code",{children:"limit"})," ",i.jsx("span",{style:{color:"var(--color-text-tertiary)"},children:"选填"}),":最多返回歌曲数,默认 ",i.jsx("code",{children:"100"}),",最大 500(0 按封顶 500 计)"]})]}),i.jsx("div",{className:"settings-section-title",style:{marginTop:"14px"},children:"请求示例"}),i.jsx("div",{style:{background:"var(--color-fill)",borderRadius:"8px",padding:"10px 12px",fontSize:"12px",wordBreak:"break-all",lineHeight:"1.7"},id:"api-example",children:"-"}),i.jsx("div",{style:{marginTop:"8px"},children:i.jsx("button",{className:"btn btn-mini",id:"api-copy-example",type:"button",children:"复制示例"})}),i.jsx("div",{className:"settings-section-title",style:{marginTop:"14px"},children:"响应字段"}),i.jsxs("div",{style:{fontSize:"13px",color:"var(--color-text-secondary)",lineHeight:"2"},children:[i.jsxs("div",{children:["· ",i.jsx("code",{children:"playlist"}),":歌单信息(id / name / coverImgUrl / creator / trackCount)"]}),i.jsxs("div",{children:["· ",i.jsx("code",{children:"tracks[]"}),":可播放歌曲列表(id / name / artists / album / url / level / size_formatted)"]}),i.jsxs("div",{children:["· ",i.jsx("code",{children:"total / playable / skipped"}),":总歌曲数 / 可播放数 / 跳过数(版权或无法解析)"]})]})]})]})}),"// 自动转换片段(供手工组装)",i.jsx("div",{className:"modal-mask"+(yt("cookie-modal")?" show":""),id:"cookie-modal",children:i.jsxs("div",{className:"modal",children:[i.jsxs("div",{className:"modal-header",children:[i.jsx("div",{className:"modal-title",children:"隐私与协议设置"}),i.jsx("button",{className:"drawer-close",id:"cookie-close",type:"button",children:"×"})]}),i.jsxs("div",{className:"modal-body",children:[i.jsx("div",{className:"hint",style:{margin:"0 0 12px"},children:"请阅读并同意用户协议与隐私政策,并选择您希望启用的 Cookie 类型。必要 Cookie 无法禁用。"}),i.jsxs("details",{style:{marginBottom:"10px",border:"1px solid var(--color-border-split)",borderRadius:"8px",padding:"10px 14px"},children:[i.jsx("summary",{style:{cursor:"pointer",fontWeight:"500",color:"var(--color-primary)"},children:"查看《用户协议》"}),i.jsxs("div",{style:{fontSize:"13px",color:"var(--color-text-secondary)",lineHeight:"1.8",marginTop:"8px",maxHeight:"220px",overflowY:"auto"},children:[i.jsx("p",{children:'欢迎使用云村小助手(以下简称"本工具")。在使用本工具之前,请您仔细阅读以下条款。点击"我已阅读"即表示您完全理解并接受本协议全部内容。'}),i.jsxs("p",{children:[i.jsx("b",{children:"1. 用途限制"}),":本工具仅供个人学习、研究与交流使用。所有解析的音频及相关数据版权归原作者及网易云音乐所有,未经授权不得用于任何公开传播或商业用途。"]}),i.jsxs("p",{children:[i.jsx("b",{children:"2. 禁止商用"}),":严禁将本工具及解析出的任何内容用于任何形式的商业用途或非法传播,包括但不限于:转售、收费下载、公开播放、二次分发等。"]}),i.jsxs("p",{children:[i.jsx("b",{children:"3. 免责声明"}),":本工具不存储任何音频文件,仅作为网络数据接口的调用和本地展示。因使用本工具而引发的任何版权纠纷或法律责任,由使用者自行承担,工具作者不承担任何连带责任。"]}),i.jsxs("p",{children:[i.jsx("b",{children:"4. 服务变更"}),":我们保留随时修改或中断本工具服务的权利,恕不另行通知。接口可用性、音质支持范围、相关功能可能随时调整。"]})]})]}),i.jsxs("details",{style:{marginBottom:"12px",border:"1px solid var(--color-border-split)",borderRadius:"8px",padding:"10px 14px"},children:[i.jsx("summary",{style:{cursor:"pointer",fontWeight:"500",color:"var(--color-primary)"},children:"查看《隐私政策》"}),i.jsxs("div",{style:{fontSize:"13px",color:"var(--color-text-secondary)",lineHeight:"1.8",marginTop:"8px",maxHeight:"220px",overflowY:"auto"},children:[i.jsx("p",{children:'本工具(以下简称"我们")非常重视您的隐私。本政策说明我们如何收集、使用、存储和保护您的个人信息。请仔细阅读,点击"我已阅读"即表示您完全理解并接受本政策全部内容。'}),i.jsxs("p",{children:[i.jsx("b",{children:"1. 数据收集"}),":本工具不存储任何音频文件,也不上传您的个人隐私信息。所有解析操作仅作为网络数据接口的调用和本地展示,您输入的链接 / 歌曲 ID 仅用于本次请求。"]}),i.jsxs("p",{children:[i.jsx("b",{children:"2. 本地存储"}),":以下信息仅保存在您的本地浏览器中(localStorage / IndexedDB),不会上传至我们的服务器:主题模式、主题色、下载格式等偏好设置;历史搜索 / 解析记录;隐私与 Cookie 偏好选择。"]}),i.jsxs("p",{children:[i.jsx("b",{children:"3. Cookie 使用"}),":根据您的选择,我们可能会使用以下类型的 Cookie:必要 Cookie(CDN 性能监控等保证基本功能所必需,无法禁用);功能性 Cookie(用于解析与下载服务、播放进度记忆、历史记录等)。您可以随时在设置中关闭,关闭后将无法解析与下载音乐。"]}),i.jsxs("p",{children:[i.jsx("b",{children:"4. 第三方服务"}),":本工具调用的所有数据接口由第三方提供,其隐私实践遵循各自的政策。本工具不对第三方服务的隐私行为承担责任。"]}),i.jsxs("p",{children:[i.jsx("b",{children:"5. 数据安全"}),":由于部分数据仅存储在您的本地浏览器中,请妥善保管您的设备,避免他人未经授权访问。建议在公共设备上使用后清除浏览器数据。"]}),i.jsxs("p",{children:[i.jsx("b",{children:"6. 您的权利"}),":您可以随时通过浏览器设置清除本工具存储的所有本地数据,或在设置中修改您的 Cookie 偏好与隐私选择。"]}),i.jsxs("p",{children:[i.jsx("b",{children:"7. 政策变更"}),":本政策可能根据实际需要随时更新,更新后的政策将在本工具中重新发布。继续使用本工具即视为接受变更后的政策。"]})]})]}),i.jsxs("label",{className:"check-item",style:{fontSize:"13px",marginBottom:"10px",display:"flex",gap:"6px"},children:[i.jsx("input",{type:"checkbox",id:"cookie-agree"})," 我已完整阅读并同意《用户协议》和《隐私政策》"]}),i.jsxs("div",{className:"settings-section",style:{marginTop:"8px"},children:[i.jsxs("div",{className:"setting-item",style:{borderBottom:"1px solid var(--color-border-split)"},children:[i.jsxs("div",{children:[i.jsxs("div",{className:"setting-label",children:["必要 Cookie ",i.jsx("span",{className:"tag",style:{marginLeft:"4px"},children:"始终启用"})]}),i.jsx("div",{className:"setting-desc",children:"这些 Cookie 对于网站的基本功能是必需的,无法禁用。"})]}),i.jsx("div",{className:"switch on",style:{opacity:"0.6",cursor:"not-allowed"}})]}),i.jsx("div",{className:"setting-desc",style:{margin:"8px 0 4px"},children:"CDN 性能监控 - 用于资源加载性能统计"})]}),i.jsxs("div",{className:"settings-section",children:[i.jsxs("div",{className:"setting-item",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"setting-label",children:["功能性 Cookie ",i.jsx("span",{className:"tag",id:"cookie-func-tag",style:{marginLeft:"4px"},children:"已启用"})]}),i.jsx("div",{className:"setting-desc",children:"这些 Cookie 用于增强网站功能和个性化体验。"})]}),i.jsx("div",{className:"switch on",id:"switch-cookie-func",tabIndex:0,role:"switch","aria-checked":"true"})]}),i.jsxs("div",{style:{fontSize:"12px",color:"var(--color-text-secondary)",lineHeight:"1.9"},children:[i.jsx("div",{children:"🔓 解析与下载服务 - 启用后才能解析与下载音乐"}),i.jsx("div",{children:"▶️ 播放进度记忆 - 记录上次播放位置"}),i.jsx("div",{children:"🕘 历史记录 - 保存搜索/解析历史"})]}),i.jsx("div",{className:"setting-desc",style:{marginTop:"8px",color:"var(--color-error)"},children:"关闭「功能性 Cookie」将无法解析与下载音乐。"})]})]}),i.jsxs("div",{className:"drawer-footer",children:[i.jsx("button",{className:"btn btn-danger",id:"cookie-withdraw",type:"button",children:"撤回同意"}),i.jsx("button",{className:"btn btn-primary",id:"cookie-save",type:"button",children:"保存设置"}),i.jsx("button",{className:"btn btn-primary",id:"cookie-agree-continue",type:"button",hidden:!0,style:{flex:"1"},children:"同意并继续注册"})]})]})}),"// 自动转换片段(供手工组装)",i.jsx("div",{className:"modal-mask"+(yt("login-modal")?" show":""),id:"login-modal",children:i.jsxs("div",{className:"modal",style:{width:"400px"},children:[i.jsxs("div",{className:"modal-header",children:[i.jsx("div",{className:"modal-title",children:"登录账号"}),i.jsx("button",{className:"icon-btn",id:"login-close",type:"button",style:{padding:"4px 10px"},children:"✕"})]}),i.jsxs("div",{className:"modal-body",children:[i.jsxs("div",{className:"auth-brand",children:[i.jsx("div",{className:"auth-brand-logo",children:"♪"}),i.jsx("div",{className:"auth-brand-name",children:"云村小助手"}),i.jsx("div",{className:"auth-brand-sub",children:"登录后继续解析与下载"})]}),i.jsxs("div",{className:"auth-form",children:[i.jsx("input",{className:"input",id:"login-username",placeholder:"用户名或邮箱",autoComplete:"username"}),i.jsxs("div",{style:{position:"relative"},children:[i.jsx("input",{className:"input",id:"login-password",placeholder:"密码",type:"password",autoComplete:"current-password",style:{paddingRight:"44px"}}),i.jsx("button",{className:"btn btn-sm",id:"login-pwd-eye",type:"button",style:{position:"absolute",right:"6px",top:"50%",transform:"translateY(-50%)",padding:"2px 8px",fontSize:"12px"},children:"显示"})]}),i.jsx("button",{className:"btn btn-primary",id:"login-submit",type:"button",children:"登 录"}),i.jsxs("div",{className:"auth-switch",children:["还没有账号?",i.jsx("a",{id:"goto-register",children:"立即注册"})," · ",i.jsx("a",{id:"goto-forgot",style:{cursor:"pointer"},children:"忘记密码?"})]}),i.jsxs("div",{className:"auth-trial-box",children:["🎁 新用户?",i.jsx("a",{id:"goto-register2",style:{color:"var(--color-primary)",cursor:"pointer"},children:"注册账号"})," 注册即送 ",i.jsx("span",{className:"reg-gift-num",children:"3"})," 次免费下载次数"]}),i.jsxs("div",{id:"forgot-view",hidden:!0,children:[i.jsx("div",{className:"auth-switch",style:{margin:"4px 0"},children:"通过注册邮箱验证码重置密码"}),i.jsx("input",{className:"input",id:"forgot-email",placeholder:"注册邮箱",type:"email"}),i.jsxs("div",{className:"auth-form-row",children:[i.jsx("input",{className:"input",id:"forgot-code",placeholder:"邮箱验证码"}),i.jsx("button",{className:"btn",id:"forgot-send-code",type:"button",style:{flex:"none"},children:"发送验证码"})]}),i.jsxs("div",{style:{position:"relative"},children:[i.jsx("input",{className:"input",id:"forgot-password",placeholder:"新密码(至少8位)",type:"password",autoComplete:"new-password",style:{paddingRight:"44px"}}),i.jsx("button",{className:"btn btn-sm",id:"forgot-pwd-eye",type:"button",style:{position:"absolute",right:"6px",top:"50%",transform:"translateY(-50%)",padding:"2px 8px",fontSize:"12px"},children:"显示"})]}),i.jsx("button",{className:"btn btn-primary",id:"forgot-submit",type:"button",style:{width:"100%",marginTop:"8px"},children:"重置密码"}),i.jsx("div",{className:"hint",id:"forgot-error-line",hidden:!0,style:{margin:"2px 0 0",color:"var(--color-error,#e0483f)"}}),i.jsx("div",{className:"auth-switch",style:{marginTop:"8px"},children:i.jsx("a",{id:"forgot-back-login",children:"返回登录"})})]}),i.jsxs("div",{id:"admin2fa-view",hidden:!0,children:[i.jsxs("div",{className:"auth-switch",style:{margin:"4px 0"},children:["管理员两步验证,绑定邮箱:",i.jsx("b",{id:"a2fa-email-mask",children:"-"})]}),i.jsx("input",{className:"input",id:"a2fa-email",placeholder:"输入管理员绑定邮箱",type:"email",autoComplete:"off"}),i.jsxs("div",{className:"auth-form-row",children:[i.jsx("input",{className:"input",id:"a2fa-code",placeholder:"邮箱验证码",autoComplete:"off"}),i.jsx("button",{className:"btn",id:"a2fa-send",type:"button",style:{flex:"none"},children:"发送验证码"})]}),i.jsx("button",{className:"btn btn-primary",id:"a2fa-submit",type:"button",style:{width:"100%",marginTop:"8px"},children:"验证并登录"}),i.jsx("div",{className:"hint",id:"a2fa-error-line",hidden:!0,style:{margin:"2px 0 0",color:"var(--color-error,#e0483f)"}}),i.jsx("div",{className:"auth-switch",style:{marginTop:"8px"},children:i.jsx("a",{id:"a2fa-back",children:"返回重新登录"})})]})]})]})]})}),"// 自动转换片段(供手工组装)",i.jsx("div",{className:"modal-mask"+(yt("register-modal")?" show":""),id:"register-modal",children:i.jsxs("div",{className:"modal",style:{width:"420px"},children:[i.jsxs("div",{className:"modal-header",children:[i.jsx("div",{className:"modal-title",children:"注册账号"}),i.jsx("button",{className:"icon-btn",id:"register-close",type:"button",style:{padding:"4px 10px"},children:"✕"})]}),i.jsxs("div",{className:"modal-body",children:[i.jsxs("div",{className:"auth-brand",children:[i.jsx("div",{className:"auth-brand-logo",children:"♪"}),i.jsx("div",{className:"auth-brand-name",children:"创建账号"}),i.jsxs("div",{className:"auth-brand-sub",children:["注册即送 ",i.jsx("span",{className:"reg-gift-num",children:"3"})," 次免费下载次数"]})]}),i.jsxs("div",{className:"auth-form",id:"reg-mail-form",children:[i.jsx("input",{className:"input",id:"reg-username",placeholder:"用户名(3-20位,中英文/数字/下划线)",autoComplete:"username"}),i.jsxs("div",{style:{position:"relative"},children:[i.jsx("input",{className:"input",id:"reg-password",placeholder:"密码(至少8位)",type:"password",autoComplete:"new-password",style:{paddingRight:"44px"}}),i.jsx("button",{className:"btn btn-sm",id:"reg-pwd-eye",type:"button",style:{position:"absolute",right:"6px",top:"50%",transform:"translateY(-50%)",padding:"2px 8px",fontSize:"12px"},children:"显示"})]}),i.jsxs("div",{className:"auth-form-row",children:[i.jsx("input",{className:"input",id:"reg-email",placeholder:"邮箱地址",type:"email"}),i.jsx("button",{className:"btn",id:"reg-send-code",type:"button",style:{flex:"none"},children:"发送验证码"})]}),i.jsx("input",{className:"input",id:"reg-code",placeholder:"邮箱验证码",autoComplete:"one-time-code"}),i.jsx("div",{className:"hint",id:"reg-error-line",hidden:!0,style:{margin:"2px 0 0",color:"var(--color-error,#e0483f)"}}),i.jsx("button",{className:"btn btn-primary",id:"reg-submit",type:"button",children:"注 册"}),i.jsxs("div",{className:"auth-switch",children:["已有账号?",i.jsx("a",{id:"goto-login",children:"直接登录"})]}),i.jsxs("div",{className:"auth-trial-box",children:["🎁 注册成功即赠送 ",i.jsxs("b",{children:[i.jsx("span",{className:"reg-gift-num",children:"3"})," 次免费下载次数"]}),"(解析与在线试听免费)"]})]})]})]})}),"// 自动转换片段(供手工组装)",i.jsx("div",{className:"modal-mask"+(yt("announce-modal")?" show":""),id:"announce-modal",children:i.jsxs("div",{className:"modal",style:{width:"480px"},children:[i.jsxs("div",{className:"modal-header",children:[i.jsx("div",{className:"modal-title",id:"announce-title",children:"系统公告"}),i.jsx("button",{className:"icon-btn",id:"announce-close",type:"button",style:{padding:"4px 10px"},children:"✕"})]}),i.jsx("div",{className:"modal-body",children:i.jsx("div",{className:"announce-body",id:"announce-content"})}),i.jsx("div",{className:"drawer-footer",style:{borderTop:"1px solid var(--color-border-split)"},children:i.jsx("button",{className:"btn btn-primary",id:"announce-ok",type:"button",children:"我知道了"})})]})}),"// 自动转换片段(供手工组装)",i.jsx(Pv,{}),"// 自动转换片段(供手工组装)",i.jsxs("div",{className:"queue-float",id:"queue-float",children:[i.jsxs("div",{className:"queue-float-head",children:[i.jsx("span",{className:"queue-float-dot"}),i.jsx("span",{children:"实时排队"})]}),i.jsx("div",{className:"queue-float-num",id:"queue-num",children:"0"}),i.jsx("div",{className:"queue-float-sub",id:"queue-est",children:"预计等待:--"}),i.jsxs("div",{className:"queue-float-sub",children:["下载 ",i.jsx("span",{id:"queue-download",children:"-"})," · 打包 ",i.jsx("span",{id:"queue-batch",children:"-"})]})]}),"// 自动转换片段(供手工组装)",i.jsxs("div",{className:"task-panel",id:"task-panel",children:[i.jsxs("div",{className:"task-panel-head",children:[i.jsxs("span",{className:"tp-title",children:["📥 下载任务 ",i.jsx("span",{className:"tp-count",id:"task-count",children:"0"})]}),i.jsx("button",{className:"tp-close",id:"task-panel-close",type:"button",children:"✕"})]}),i.jsx("div",{className:"task-panel-list",id:"task-list"})]})]})}function Mv(){const e=Mr.useRef(!1);return Mr.useEffect(()=>{e.current||(e.current=!0,Tl(()=>Promise.resolve().then(()=>tp),void 0).then(t=>(t.__legacyBoot(),Tl(()=>import("./auth.js"),[]))).then(t=>t.__authBoot()).catch(t=>{console.error("前端启动失败:",t),(window.__errs=window.__errs||[]).push("BOOT: "+(t&&t.message||String(t)))}))},[]),i.jsx(Iv,{})}Oa.createRoot(document.getElementById("root")).render(i.jsx(Mv,{}));export{Rt as c,xr as o}; //# sourceMappingURL=app.js.map