(function(){const _=document.createElement("link").relList;if(_&&_.supports&&_.supports("modulepreload"))return;for(const w of document.querySelectorAll('link[rel="modulepreload"]'))r(w);new MutationObserver(w=>{for(const A of w)if(A.type==="childList")for(const k of A.addedNodes)k.tagName==="LINK"&&k.rel==="modulepreload"&&r(k)}).observe(document,{childList:!0,subtree:!0});function M(w){const A={};return w.integrity&&(A.integrity=w.integrity),w.referrerPolicy&&(A.referrerPolicy=w.referrerPolicy),w.crossOrigin==="use-credentials"?A.credentials="include":w.crossOrigin==="anonymous"?A.credentials="omit":A.credentials="same-origin",A}function r(w){if(w.ep)return;w.ep=!0;const A=M(w);fetch(w.href,A)}})();function F0(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}var gs={exports:{}},Cn={};/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var w0;function Th(){if(w0)return Cn;w0=1;var d=Symbol.for("react.transitional.element"),_=Symbol.for("react.fragment");function M(r,w,A){var k=null;if(A!==void 0&&(k=""+A),w.key!==void 0&&(k=""+w.key),"key"in w){A={};for(var Z in w)Z!=="key"&&(A[Z]=w[Z])}else A=w;return w=A.ref,{$$typeof:d,type:r,key:k,ref:w!==void 0?w:null,props:A}}return Cn.Fragment=_,Cn.jsx=M,Cn.jsxs=M,Cn}var H0;function Oh(){return H0||(H0=1,gs.exports=Th()),gs.exports}var i=Oh(),vs={exports:{}},I={};/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var R0;function Dh(){if(R0)return I;R0=1;var d=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),k=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),R=Symbol.iterator;function se(m){return m===null||typeof m!="object"?null:(m=R&&m[R]||m["@@iterator"],typeof m=="function"?m:null)}var Se={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ge=Object.assign,Ue={};function be(m,z,U){this.props=m,this.context=z,this.refs=Ue,this.updater=U||Se}be.prototype.isReactComponent={},be.prototype.setState=function(m,z){if(typeof m!="object"&&typeof m!="function"&&m!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,m,z,"setState")},be.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")};function $(){}$.prototype=be.prototype;function ue(m,z,U){this.props=m,this.context=z,this.refs=Ue,this.updater=U||Se}var L=ue.prototype=new $;L.constructor=ue,ge(L,be.prototype),L.isPureReactComponent=!0;var me=Array.isArray;function V(){}var P={H:null,A:null,T:null,S:null},Je=Object.prototype.hasOwnProperty;function al(m,z,U){var q=U.ref;return{$$typeof:d,type:m,key:z,ref:q!==void 0?q:null,props:U}}function Ml(m,z){return al(m.type,z,m.props)}function qe(m){return typeof m=="object"&&m!==null&&m.$$typeof===d}function W(m){var z={"=":"=0",":":"=2"};return"$"+m.replace(/[=:]/g,function(U){return z[U]})}var pe=/\/+/g;function te(m,z){return typeof m=="object"&&m!==null&&m.key!=null?W(""+m.key):z.toString(36)}function oe(m){switch(m.status){case"fulfilled":return m.value;case"rejected":throw m.reason;default:switch(typeof m.status=="string"?m.then(V,V):(m.status="pending",m.then(function(z){m.status==="pending"&&(m.status="fulfilled",m.value=z)},function(z){m.status==="pending"&&(m.status="rejected",m.reason=z)})),m.status){case"fulfilled":return m.value;case"rejected":throw m.reason}}throw m}function b(m,z,U,q,F){var ae=typeof m;(ae==="undefined"||ae==="boolean")&&(m=null);var he=!1;if(m===null)he=!0;else switch(ae){case"bigint":case"string":case"number":he=!0;break;case"object":switch(m.$$typeof){case d:case _:he=!0;break;case Y:return he=m._init,b(he(m._payload),z,U,q,F)}}if(he)return F=F(m),he=q===""?"."+te(m,0):q,me(F)?(U="",he!=null&&(U=he.replace(pe,"$&/")+"/"),b(F,z,U,"",function(Ct){return Ct})):F!=null&&(qe(F)&&(F=Ml(F,U+(F.key==null||m&&m.key===F.key?"":(""+F.key).replace(pe,"$&/")+"/")+he)),z.push(F)),1;he=0;var Be=q===""?".":q+":";if(me(m))for(var Ee=0;Ee>>1,Ne=b[je];if(0>>1;jew(U,J))qw(F,U)?(b[je]=F,b[q]=J,je=q):(b[je]=U,b[z]=J,je=z);else if(qw(F,J))b[je]=F,b[q]=J,je=q;else break e}}return T}function w(b,T){var J=b.sortIndex-T.sortIndex;return J!==0?J:b.id-T.id}if(d.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var A=performance;d.unstable_now=function(){return A.now()}}else{var k=Date,Z=k.now();d.unstable_now=function(){return k.now()-Z}}var E=[],p=[],Y=1,D=null,R=3,se=!1,Se=!1,ge=!1,Ue=!1,be=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,ue=typeof setImmediate<"u"?setImmediate:null;function L(b){for(var T=M(p);T!==null;){if(T.callback===null)r(p);else if(T.startTime<=b)r(p),T.sortIndex=T.expirationTime,_(E,T);else break;T=M(p)}}function me(b){if(ge=!1,L(b),!Se)if(M(E)!==null)Se=!0,V||(V=!0,W());else{var T=M(p);T!==null&&oe(me,T.startTime-b)}}var V=!1,P=-1,Je=5,al=-1;function Ml(){return Ue?!0:!(d.unstable_now()-alb&&Ml());){var je=D.callback;if(typeof je=="function"){D.callback=null,R=D.priorityLevel;var Ne=je(D.expirationTime<=b);if(b=d.unstable_now(),typeof Ne=="function"){D.callback=Ne,L(b),T=!0;break l}D===M(E)&&r(E),L(b)}else r(E);D=M(E)}if(D!==null)T=!0;else{var m=M(p);m!==null&&oe(me,m.startTime-b),T=!1}}break e}finally{D=null,R=J,se=!1}T=void 0}}finally{T?W():V=!1}}}var W;if(typeof ue=="function")W=function(){ue(qe)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,te=pe.port2;pe.port1.onmessage=qe,W=function(){te.postMessage(null)}}else W=function(){be(qe,0)};function oe(b,T){P=be(function(){b(d.unstable_now())},T)}d.unstable_IdlePriority=5,d.unstable_ImmediatePriority=1,d.unstable_LowPriority=4,d.unstable_NormalPriority=3,d.unstable_Profiling=null,d.unstable_UserBlockingPriority=2,d.unstable_cancelCallback=function(b){b.callback=null},d.unstable_forceFrameRate=function(b){0>b||125je?(b.sortIndex=J,_(p,b),M(E)===null&&b===M(p)&&(ge?($(P),P=-1):ge=!0,oe(me,J-je))):(b.sortIndex=Ne,_(E,b),Se||se||(Se=!0,V||(V=!0,W()))),b},d.unstable_shouldYield=Ml,d.unstable_wrapCallback=function(b){var T=R;return function(){var J=R;R=T;try{return b.apply(this,arguments)}finally{R=J}}}})(js)),js}var G0;function wh(){return G0||(G0=1,ps.exports=Ch()),ps.exports}var Ns={exports:{}},tl={};/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Y0;function Hh(){if(Y0)return tl;Y0=1;var d=Ds();function _(E){var p="https://react.dev/errors/"+E;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d)}catch(_){console.error(_)}}return d(),Ns.exports=Hh(),Ns.exports}/** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var X0;function qh(){if(X0)return wn;X0=1;var d=wh(),_=Ds(),M=Rh();function r(e){var l="https://react.dev/errors/"+e;if(1Ne||(e.current=je[Ne],je[Ne]=null,Ne--)}function U(e,l){Ne++,je[Ne]=e.current,e.current=l}var q=m(null),F=m(null),ae=m(null),he=m(null);function Be(e,l){switch(U(ae,l),U(F,e),U(q,null),l.nodeType){case 9:case 11:e=(e=l.documentElement)&&(e=e.namespaceURI)?a0(e):0;break;default:if(e=l.tagName,l=l.namespaceURI)l=a0(l),e=n0(l,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}z(q),U(q,e)}function Ee(){z(q),z(F),z(ae)}function Ct(e){e.memoizedState!==null&&U(he,e);var l=q.current,t=n0(l,e.type);l!==t&&(U(F,e),U(q,t))}function O(e){F.current===e&&(z(q),z(F)),he.current===e&&(z(he),Tn._currentValue=J)}var ne,Ce;function _e(e){if(ne===void 0)try{throw Error()}catch(t){var l=t.stack.trim().match(/\n( *(at )?)/);ne=l&&l[1]||"",Ce=-1)":-1n||f[a]!==x[n]){var j=` `+f[a].replace(" at new "," at ");return e.displayName&&j.includes("")&&(j=j.replace("",e.displayName)),j}while(1<=a&&0<=n);break}}}finally{ul=!1,Error.prepareStackTrace=t}return(t=e?e.displayName||e.name:"")?_e(t):""}function ct(e,l){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e("Lazy");case 13:return e.child!==l&&l!==null?_e("Suspense Fallback"):_e("Suspense");case 19:return _e("SuspenseList");case 0:case 15:return ml(e.type,!1);case 11:return ml(e.type.render,!1);case 1:return ml(e.type,!0);case 31:return _e("Activity");default:return""}}function Pt(e){try{var l="",t=null;do l+=ct(e,t),t=e,e=e.return;while(e);return l}catch(a){return` Error generating stack: `+a.message+` `+a.stack}}var ti=Object.prototype.hasOwnProperty,ai=d.unstable_scheduleCallback,ni=d.unstable_cancelCallback,cd=d.unstable_shouldYield,sd=d.unstable_requestPaint,hl=d.unstable_now,fd=d.unstable_getCurrentPriorityLevel,Cs=d.unstable_ImmediatePriority,ws=d.unstable_UserBlockingPriority,Bn=d.unstable_NormalPriority,rd=d.unstable_LowPriority,Hs=d.unstable_IdlePriority,od=d.log,dd=d.unstable_setDisableYieldValue,Ya=null,yl=null;function st(e){if(typeof od=="function"&&dd(e),yl&&typeof yl.setStrictMode=="function")try{yl.setStrictMode(Ya,e)}catch{}}var xl=Math.clz32?Math.clz32:yd,md=Math.log,hd=Math.LN2;function yd(e){return e>>>=0,e===0?32:31-(md(e)/hd|0)|0}var Gn=256,Yn=262144,Vn=4194304;function wt(e){var l=e&42;if(l!==0)return l;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Xn(e,l,t){var a=e.pendingLanes;if(a===0)return 0;var n=0,u=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var s=a&134217727;return s!==0?(a=s&~u,a!==0?n=wt(a):(c&=s,c!==0?n=wt(c):t||(t=s&~e,t!==0&&(n=wt(t))))):(s=a&~u,s!==0?n=wt(s):c!==0?n=wt(c):t||(t=a&~e,t!==0&&(n=wt(t)))),n===0?0:l!==0&&l!==n&&(l&u)===0&&(u=n&-n,t=l&-l,u>=t||u===32&&(t&4194048)!==0)?l:n}function Va(e,l){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&l)===0}function xd(e,l){switch(e){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32: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 l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rs(){var e=Vn;return Vn<<=1,(Vn&62914560)===0&&(Vn=4194304),e}function ui(e){for(var l=[],t=0;31>t;t++)l.push(e);return l}function Xa(e,l){e.pendingLanes|=l,l!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function gd(e,l,t,a,n,u){var c=e.pendingLanes;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0;var s=e.entanglements,f=e.expirationTimes,x=e.hiddenUpdates;for(t=c&~t;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Sd=/[\n"\\]/g;function _l(e){return e.replace(Sd,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function oi(e,l,t,a,n,u,c,s){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),l!=null?c==="number"?(l===0&&e.value===""||e.value!=l)&&(e.value=""+El(l)):e.value!==""+El(l)&&(e.value=""+El(l)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),l!=null?di(e,c,El(l)):t!=null?di(e,c,El(t)):a!=null&&e.removeAttribute("value"),n==null&&u!=null&&(e.defaultChecked=!!u),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+El(s):e.removeAttribute("name")}function $s(e,l,t,a,n,u,c,s){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),l!=null||t!=null){if(!(u!=="submit"&&u!=="reset"||l!=null)){ri(e);return}t=t!=null?""+El(t):"",l=l!=null?""+El(l):t,s||l===e.value||(e.value=l),e.defaultValue=l}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=s?e.checked:!!a,e.defaultChecked=!!a,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),ri(e)}function di(e,l,t){l==="number"&&Zn(e.ownerDocument)===e||e.defaultValue===""+t||(e.defaultValue=""+t)}function ua(e,l,t,a){if(e=e.options,l){l={};for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gi=!1;if(Zl)try{var Ka={};Object.defineProperty(Ka,"passive",{get:function(){gi=!0}}),window.addEventListener("test",Ka,Ka),window.removeEventListener("test",Ka,Ka)}catch{gi=!1}var rt=null,vi=null,Jn=null;function tf(){if(Jn)return Jn;var e,l=vi,t=l.length,a,n="value"in rt?rt.value:rt.textContent,u=n.length;for(e=0;e=$a),ff=" ",rf=!1;function of(e,l){switch(e){case"keyup":return Fd.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function df(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fa=!1;function Pd(e,l){switch(e){case"compositionend":return df(l);case"keypress":return l.which!==32?null:(rf=!0,ff);case"textInput":return e=l.data,e===ff&&rf?null:e;default:return null}}function em(e,l){if(fa)return e==="compositionend"||!Si&&of(e,l)?(e=tf(),Jn=vi=rt=null,fa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:t,offset:l-e};e=a}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=pf(t)}}function Nf(e,l){return e&&l?e===l?!0:e&&e.nodeType===3?!1:l&&l.nodeType===3?Nf(e,l.parentNode):"contains"in e?e.contains(l):e.compareDocumentPosition?!!(e.compareDocumentPosition(l)&16):!1:!1}function Sf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var l=Zn(e.document);l instanceof e.HTMLIFrameElement;){try{var t=typeof l.contentWindow.location.href=="string"}catch{t=!1}if(t)e=l.contentWindow;else break;l=Zn(e.document)}return l}function Ei(e){var l=e&&e.nodeName&&e.nodeName.toLowerCase();return l&&(l==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||l==="textarea"||e.contentEditable==="true")}var sm=Zl&&"documentMode"in document&&11>=document.documentMode,ra=null,_i=null,Pa=null,Ai=!1;function zf(e,l,t){var a=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Ai||ra==null||ra!==Zn(a)||(a=ra,"selectionStart"in a&&Ei(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Pa&&Ia(Pa,a)||(Pa=a,a=Yu(_i,"onSelect"),0>=c,n-=c,Gl=1<<32-xl(l)+n|t<le?(re=B,B=null):re=B.sibling;var xe=g(h,B,y[le],N);if(xe===null){B===null&&(B=re);break}e&&B&&xe.alternate===null&&l(h,B),o=u(xe,o,le),ye===null?X=xe:ye.sibling=xe,ye=xe,B=re}if(le===y.length)return t(h,B),de&&Jl(h,le),X;if(B===null){for(;lele?(re=B,B=null):re=B.sibling;var Ut=g(h,B,xe.value,N);if(Ut===null){B===null&&(B=re);break}e&&B&&Ut.alternate===null&&l(h,B),o=u(Ut,o,le),ye===null?X=Ut:ye.sibling=Ut,ye=Ut,B=re}if(xe.done)return t(h,B),de&&Jl(h,le),X;if(B===null){for(;!xe.done;le++,xe=y.next())xe=S(h,xe.value,N),xe!==null&&(o=u(xe,o,le),ye===null?X=xe:ye.sibling=xe,ye=xe);return de&&Jl(h,le),X}for(B=a(B);!xe.done;le++,xe=y.next())xe=v(B,h,le,xe.value,N),xe!==null&&(e&&xe.alternate!==null&&B.delete(xe.key===null?le:xe.key),o=u(xe,o,le),ye===null?X=xe:ye.sibling=xe,ye=xe);return e&&B.forEach(function(Ah){return l(h,Ah)}),de&&Jl(h,le),X}function Oe(h,o,y,N){if(typeof y=="object"&&y!==null&&y.type===ge&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case se:e:{for(var X=y.key;o!==null;){if(o.key===X){if(X=y.type,X===ge){if(o.tag===7){t(h,o.sibling),N=n(o,y.props.children),N.return=h,h=N;break e}}else if(o.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===Je&&Zt(X)===o.type){t(h,o.sibling),N=n(o,y.props),un(N,y),N.return=h,h=N;break e}t(h,o);break}else l(h,o);o=o.sibling}y.type===ge?(N=Yt(y.props.children,h.mode,N,y.key),N.return=h,h=N):(N=au(y.type,y.key,y.props,null,h.mode,N),un(N,y),N.return=h,h=N)}return c(h);case Se:e:{for(X=y.key;o!==null;){if(o.key===X)if(o.tag===4&&o.stateNode.containerInfo===y.containerInfo&&o.stateNode.implementation===y.implementation){t(h,o.sibling),N=n(o,y.children||[]),N.return=h,h=N;break e}else{t(h,o);break}else l(h,o);o=o.sibling}N=Hi(y,h.mode,N),N.return=h,h=N}return c(h);case Je:return y=Zt(y),Oe(h,o,y,N)}if(oe(y))return H(h,o,y,N);if(W(y)){if(X=W(y),typeof X!="function")throw Error(r(150));return y=X.call(y),K(h,o,y,N)}if(typeof y.then=="function")return Oe(h,o,ru(y),N);if(y.$$typeof===ue)return Oe(h,o,iu(h,y),N);ou(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,o!==null&&o.tag===6?(t(h,o.sibling),N=n(o,y),N.return=h,h=N):(t(h,o),N=wi(y,h.mode,N),N.return=h,h=N),c(h)):t(h,o)}return function(h,o,y,N){try{nn=0;var X=Oe(h,o,y,N);return ja=null,X}catch(B){if(B===pa||B===su)throw B;var ye=vl(29,B,null,h.mode);return ye.lanes=N,ye.return=h,ye}finally{}}}var Jt=Jf(!0),kf=Jf(!1),yt=!1;function Ji(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ki(e,l){e=e.updateQueue,l.updateQueue===e&&(l.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function xt(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function gt(e,l,t){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(ve&2)!==0){var n=a.pending;return n===null?l.next=l:(l.next=n.next,n.next=l),a.pending=l,l=tu(e),Df(e,null,t),l}return lu(e,a,l,t),tu(e)}function cn(e,l,t){if(l=l.updateQueue,l!==null&&(l=l.shared,(t&4194048)!==0)){var a=l.lanes;a&=e.pendingLanes,t|=a,l.lanes=t,Bs(e,t)}}function $i(e,l){var t=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,t===a)){var n=null,u=null;if(t=t.firstBaseUpdate,t!==null){do{var c={lane:t.lane,tag:t.tag,payload:t.payload,callback:null,next:null};u===null?n=u=c:u=u.next=c,t=t.next}while(t!==null);u===null?n=u=l:u=u.next=l}else n=u=l;t={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=t;return}e=t.lastBaseUpdate,e===null?t.firstBaseUpdate=l:e.next=l,t.lastBaseUpdate=l}var Wi=!1;function sn(){if(Wi){var e=ba;if(e!==null)throw e}}function fn(e,l,t,a){Wi=!1;var n=e.updateQueue;yt=!1;var u=n.firstBaseUpdate,c=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var f=s,x=f.next;f.next=null,c===null?u=x:c.next=x,c=f;var j=e.alternate;j!==null&&(j=j.updateQueue,s=j.lastBaseUpdate,s!==c&&(s===null?j.firstBaseUpdate=x:s.next=x,j.lastBaseUpdate=f))}if(u!==null){var S=n.baseState;c=0,j=x=f=null,s=u;do{var g=s.lane&-536870913,v=g!==s.lane;if(v?(fe&g)===g:(a&g)===g){g!==0&&g===va&&(Wi=!0),j!==null&&(j=j.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var H=e,K=s;g=l;var Oe=t;switch(K.tag){case 1:if(H=K.payload,typeof H=="function"){S=H.call(Oe,S,g);break e}S=H;break e;case 3:H.flags=H.flags&-65537|128;case 0:if(H=K.payload,g=typeof H=="function"?H.call(Oe,S,g):H,g==null)break e;S=D({},S,g);break e;case 2:yt=!0}}g=s.callback,g!==null&&(e.flags|=64,v&&(e.flags|=8192),v=n.callbacks,v===null?n.callbacks=[g]:v.push(g))}else v={lane:g,tag:s.tag,payload:s.payload,callback:s.callback,next:null},j===null?(x=j=v,f=S):j=j.next=v,c|=g;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;v=s,s=v.next,v.next=null,n.lastBaseUpdate=v,n.shared.pending=null}}while(!0);j===null&&(f=S),n.baseState=f,n.firstBaseUpdate=x,n.lastBaseUpdate=j,u===null&&(n.shared.lanes=0),Nt|=c,e.lanes=c,e.memoizedState=S}}function $f(e,l){if(typeof e!="function")throw Error(r(191,e));e.call(l)}function Wf(e,l){var t=e.callbacks;if(t!==null)for(e.callbacks=null,e=0;eu?u:8;var c=b.T,s={};b.T=s,yc(e,!1,l,t);try{var f=n(),x=b.S;if(x!==null&&x(s,f),f!==null&&typeof f=="object"&&typeof f.then=="function"){var j=gm(f,a);dn(e,l,j,Sl(e))}else dn(e,l,a,Sl(e))}catch(S){dn(e,l,{then:function(){},status:"rejected",reason:S},Sl())}finally{T.p=u,c!==null&&s.types!==null&&(c.types=s.types),b.T=c}}function Sm(){}function mc(e,l,t,a){if(e.tag!==5)throw Error(r(476));var n=Ar(e).queue;_r(e,n,l,J,t===null?Sm:function(){return Tr(e),t(a)})}function Ar(e){var l=e.memoizedState;if(l!==null)return l;l={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fl,lastRenderedState:J},next:null};var t={};return l.next={memoizedState:t,baseState:t,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fl,lastRenderedState:t},next:null},e.memoizedState=l,e=e.alternate,e!==null&&(e.memoizedState=l),l}function Tr(e){var l=Ar(e);l.next===null&&(l=e.alternate.memoizedState),dn(e,l.next.queue,{},Sl())}function hc(){return Pe(Tn)}function Or(){return Xe().memoizedState}function Dr(){return Xe().memoizedState}function zm(e){for(var l=e.return;l!==null;){switch(l.tag){case 24:case 3:var t=Sl();e=xt(t);var a=gt(l,e,t);a!==null&&(dl(a,l,t),cn(a,l,t)),l={cache:Qi()},e.payload=l;return}l=l.return}}function Mm(e,l,t){var a=Sl();t={lane:a,revertLane:0,gesture:null,action:t,hasEagerState:!1,eagerState:null,next:null},ju(e)?Cr(l,t):(t=Ui(e,l,t,a),t!==null&&(dl(t,e,a),wr(t,l,a)))}function Ur(e,l,t){var a=Sl();dn(e,l,t,a)}function dn(e,l,t,a){var n={lane:a,revertLane:0,gesture:null,action:t,hasEagerState:!1,eagerState:null,next:null};if(ju(e))Cr(l,n);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=l.lastRenderedReducer,u!==null))try{var c=l.lastRenderedState,s=u(c,t);if(n.hasEagerState=!0,n.eagerState=s,gl(s,c))return lu(e,l,n,0),De===null&&eu(),!1}catch{}finally{}if(t=Ui(e,l,n,a),t!==null)return dl(t,e,a),wr(t,l,a),!0}return!1}function yc(e,l,t,a){if(a={lane:2,revertLane:Jc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ju(e)){if(l)throw Error(r(479))}else l=Ui(e,t,a,2),l!==null&&dl(l,e,2)}function ju(e){var l=e.alternate;return e===ee||l!==null&&l===ee}function Cr(e,l){Sa=hu=!0;var t=e.pending;t===null?l.next=l:(l.next=t.next,t.next=l),e.pending=l}function wr(e,l,t){if((t&4194048)!==0){var a=l.lanes;a&=e.pendingLanes,t|=a,l.lanes=t,Bs(e,t)}}var mn={readContext:Pe,use:gu,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};mn.useEffectEvent=Ge;var Hr={readContext:Pe,use:gu,useCallback:function(e,l){return nl().memoizedState=[e,l===void 0?null:l],e},useContext:Pe,useEffect:vr,useImperativeHandle:function(e,l,t){t=t!=null?t.concat([e]):null,bu(4194308,4,Nr.bind(null,l,e),t)},useLayoutEffect:function(e,l){return bu(4194308,4,e,l)},useInsertionEffect:function(e,l){bu(4,2,e,l)},useMemo:function(e,l){var t=nl();l=l===void 0?null:l;var a=e();if(kt){st(!0);try{e()}finally{st(!1)}}return t.memoizedState=[a,l],a},useReducer:function(e,l,t){var a=nl();if(t!==void 0){var n=t(l);if(kt){st(!0);try{t(l)}finally{st(!1)}}}else n=l;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=Mm.bind(null,ee,e),[a.memoizedState,e]},useRef:function(e){var l=nl();return e={current:e},l.memoizedState=e},useState:function(e){e=sc(e);var l=e.queue,t=Ur.bind(null,ee,l);return l.dispatch=t,[e.memoizedState,t]},useDebugValue:oc,useDeferredValue:function(e,l){var t=nl();return dc(t,e,l)},useTransition:function(){var e=sc(!1);return e=_r.bind(null,ee,e.queue,!0,!1),nl().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,l,t){var a=ee,n=nl();if(de){if(t===void 0)throw Error(r(407));t=t()}else{if(t=l(),De===null)throw Error(r(349));(fe&127)!==0||tr(a,l,t)}n.memoizedState=t;var u={value:t,getSnapshot:l};return n.queue=u,vr(nr.bind(null,a,u,e),[e]),a.flags|=2048,Ma(9,{destroy:void 0},ar.bind(null,a,u,t,l),null),t},useId:function(){var e=nl(),l=De.identifierPrefix;if(de){var t=Yl,a=Gl;t=(a&~(1<<32-xl(a)-1)).toString(32)+t,l="_"+l+"R_"+t,t=yu++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?c.createElement(n,{is:a.is}):c.createElement(n)}}u[Fe]=l,u[il]=a;e:for(c=l.child;c!==null;){if(c.tag===5||c.tag===6)u.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===l)break e;for(;c.sibling===null;){if(c.return===null||c.return===l)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}l.stateNode=u;e:switch(ll(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Pl(l)}}return He(l),Tc(l,l.type,e===null?null:e.memoizedProps,l.pendingProps,t),null;case 6:if(e&&l.stateNode!=null)e.memoizedProps!==a&&Pl(l);else{if(typeof a!="string"&&l.stateNode===null)throw Error(r(166));if(e=ae.current,xa(l)){if(e=l.stateNode,t=l.memoizedProps,a=null,n=Ie,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[Fe]=l,e=!!(e.nodeValue===t||a!==null&&a.suppressHydrationWarning===!0||l0(e.nodeValue,t)),e||mt(l,!0)}else e=Vu(e).createTextNode(a),e[Fe]=l,l.stateNode=e}return He(l),null;case 31:if(t=l.memoizedState,e===null||e.memoizedState!==null){if(a=xa(l),t!==null){if(e===null){if(!a)throw Error(r(318));if(e=l.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Fe]=l}else Vt(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;He(l),e=!1}else t=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=t),e=!0;if(!e)return l.flags&256?(pl(l),l):(pl(l),null);if((l.flags&128)!==0)throw Error(r(558))}return He(l),null;case 13:if(a=l.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=xa(l),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(r(318));if(n=l.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));n[Fe]=l}else Vt(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;He(l),n=!1}else n=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return l.flags&256?(pl(l),l):(pl(l),null)}return pl(l),(l.flags&128)!==0?(l.lanes=t,l):(t=a!==null,e=e!==null&&e.memoizedState!==null,t&&(a=l.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),t!==e&&t&&(l.child.flags|=8192),Eu(l,l.updateQueue),He(l),null);case 4:return Ee(),e===null&&Fc(l.stateNode.containerInfo),He(l),null;case 10:return $l(l.type),He(l),null;case 19:if(z(Ve),a=l.memoizedState,a===null)return He(l),null;if(n=(l.flags&128)!==0,u=a.rendering,u===null)if(n)yn(a,!1);else{if(Ye!==0||e!==null&&(e.flags&128)!==0)for(e=l.child;e!==null;){if(u=mu(e),u!==null){for(l.flags|=128,yn(a,!1),e=u.updateQueue,l.updateQueue=e,Eu(l,e),l.subtreeFlags=0,e=t,t=l.child;t!==null;)Uf(t,e),t=t.sibling;return U(Ve,Ve.current&1|2),de&&Jl(l,a.treeForkCount),l.child}e=e.sibling}a.tail!==null&&hl()>Du&&(l.flags|=128,n=!0,yn(a,!1),l.lanes=4194304)}else{if(!n)if(e=mu(u),e!==null){if(l.flags|=128,n=!0,e=e.updateQueue,l.updateQueue=e,Eu(l,e),yn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!de)return He(l),null}else 2*hl()-a.renderingStartTime>Du&&t!==536870912&&(l.flags|=128,n=!0,yn(a,!1),l.lanes=4194304);a.isBackwards?(u.sibling=l.child,l.child=u):(e=a.last,e!==null?e.sibling=u:l.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=hl(),e.sibling=null,t=Ve.current,U(Ve,n?t&1|2:t&1),de&&Jl(l,a.treeForkCount),e):(He(l),null);case 22:case 23:return pl(l),Ii(),a=l.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(l.flags|=8192):a&&(l.flags|=8192),a?(t&536870912)!==0&&(l.flags&128)===0&&(He(l),l.subtreeFlags&6&&(l.flags|=8192)):He(l),t=l.updateQueue,t!==null&&Eu(l,t.retryQueue),t=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),a=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(a=l.memoizedState.cachePool.pool),a!==t&&(l.flags|=2048),e!==null&&z(Lt),null;case 24:return t=null,e!==null&&(t=e.memoizedState.cache),l.memoizedState.cache!==t&&(l.flags|=2048),$l(Qe),He(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function Om(e,l){switch(qi(l),l.tag){case 1:return e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 3:return $l(Qe),Ee(),e=l.flags,(e&65536)!==0&&(e&128)===0?(l.flags=e&-65537|128,l):null;case 26:case 27:case 5:return O(l),null;case 31:if(l.memoizedState!==null){if(pl(l),l.alternate===null)throw Error(r(340));Vt()}return e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 13:if(pl(l),e=l.memoizedState,e!==null&&e.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Vt()}return e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 19:return z(Ve),null;case 4:return Ee(),null;case 10:return $l(l.type),null;case 22:case 23:return pl(l),Ii(),e!==null&&z(Lt),e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 24:return $l(Qe),null;case 25:return null;default:return null}}function uo(e,l){switch(qi(l),l.tag){case 3:$l(Qe),Ee();break;case 26:case 27:case 5:O(l);break;case 4:Ee();break;case 31:l.memoizedState!==null&&pl(l);break;case 13:pl(l);break;case 19:z(Ve);break;case 10:$l(l.type);break;case 22:case 23:pl(l),Ii(),e!==null&&z(Lt);break;case 24:$l(Qe)}}function xn(e,l){try{var t=l.updateQueue,a=t!==null?t.lastEffect:null;if(a!==null){var n=a.next;t=n;do{if((t.tag&e)===e){a=void 0;var u=t.create,c=t.inst;a=u(),c.destroy=a}t=t.next}while(t!==n)}}catch(s){Me(l,l.return,s)}}function pt(e,l,t){try{var a=l.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){var c=a.inst,s=c.destroy;if(s!==void 0){c.destroy=void 0,n=l;var f=t,x=s;try{x()}catch(j){Me(n,f,j)}}}a=a.next}while(a!==u)}}catch(j){Me(l,l.return,j)}}function io(e){var l=e.updateQueue;if(l!==null){var t=e.stateNode;try{Wf(l,t)}catch(a){Me(e,e.return,a)}}}function co(e,l,t){t.props=$t(e.type,e.memoizedProps),t.state=e.memoizedState;try{t.componentWillUnmount()}catch(a){Me(e,l,a)}}function gn(e,l){try{var t=e.ref;if(t!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof t=="function"?e.refCleanup=t(a):t.current=a}}catch(n){Me(e,l,n)}}function Vl(e,l){var t=e.ref,a=e.refCleanup;if(t!==null)if(typeof a=="function")try{a()}catch(n){Me(e,l,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof t=="function")try{t(null)}catch(n){Me(e,l,n)}else t.current=null}function so(e){var l=e.type,t=e.memoizedProps,a=e.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":t.autoFocus&&a.focus();break e;case"img":t.src?a.src=t.src:t.srcSet&&(a.srcset=t.srcSet)}}catch(n){Me(e,e.return,n)}}function Oc(e,l,t){try{var a=e.stateNode;Im(a,e.type,t,l),a[il]=l}catch(n){Me(e,e.return,n)}}function fo(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&_t(e.type)||e.tag===4}function Dc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fo(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.tag===27&&_t(e.type)||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 Uc(e,l,t){var a=e.tag;if(a===5||a===6)e=e.stateNode,l?(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t).insertBefore(e,l):(l=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.appendChild(e),t=t._reactRootContainer,t!=null||l.onclick!==null||(l.onclick=Ll));else if(a!==4&&(a===27&&_t(e.type)&&(t=e.stateNode,l=null),e=e.child,e!==null))for(Uc(e,l,t),e=e.sibling;e!==null;)Uc(e,l,t),e=e.sibling}function _u(e,l,t){var a=e.tag;if(a===5||a===6)e=e.stateNode,l?t.insertBefore(e,l):t.appendChild(e);else if(a!==4&&(a===27&&_t(e.type)&&(t=e.stateNode),e=e.child,e!==null))for(_u(e,l,t),e=e.sibling;e!==null;)_u(e,l,t),e=e.sibling}function ro(e){var l=e.stateNode,t=e.memoizedProps;try{for(var a=e.type,n=l.attributes;n.length;)l.removeAttributeNode(n[0]);ll(l,a,t),l[Fe]=e,l[il]=t}catch(u){Me(e,e.return,u)}}var et=!1,Ke=!1,Cc=!1,oo=typeof WeakSet=="function"?WeakSet:Set,We=null;function Dm(e,l){if(e=e.containerInfo,es=ku,e=Sf(e),Ei(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var a=t.getSelection&&t.getSelection();if(a&&a.rangeCount!==0){t=a.anchorNode;var n=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{t.nodeType,u.nodeType}catch{t=null;break e}var c=0,s=-1,f=-1,x=0,j=0,S=e,g=null;l:for(;;){for(var v;S!==t||n!==0&&S.nodeType!==3||(s=c+n),S!==u||a!==0&&S.nodeType!==3||(f=c+a),S.nodeType===3&&(c+=S.nodeValue.length),(v=S.firstChild)!==null;)g=S,S=v;for(;;){if(S===e)break l;if(g===t&&++x===n&&(s=c),g===u&&++j===a&&(f=c),(v=S.nextSibling)!==null)break;S=g,g=S.parentNode}S=v}t=s===-1||f===-1?null:{start:s,end:f}}else t=null}t=t||{start:0,end:0}}else t=null;for(ls={focusedElem:e,selectionRange:t},ku=!1,We=l;We!==null;)if(l=We,e=l.child,(l.subtreeFlags&1028)!==0&&e!==null)e.return=l,We=e;else for(;We!==null;){switch(l=We,u=l.alternate,e=l.flags,l.tag){case 0:if((e&4)!==0&&(e=l.updateQueue,e=e!==null?e.events:null,e!==null))for(t=0;t title"))),ll(u,a,t),u[Fe]=e,$e(u),a=u;break e;case"link":var c=v0("link","href",n).get(a+(t.href||""));if(c){for(var s=0;sOe&&(c=Oe,Oe=K,K=c);var h=jf(s,K),o=jf(s,Oe);if(h&&o&&(v.rangeCount!==1||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==o.node||v.focusOffset!==o.offset)){var y=S.createRange();y.setStart(h.node,h.offset),v.removeAllRanges(),K>Oe?(v.addRange(y),v.extend(o.node,o.offset)):(y.setEnd(o.node,o.offset),v.addRange(y))}}}}for(S=[],v=s;v=v.parentNode;)v.nodeType===1&&S.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;st?32:t,b.T=null,t=Yc,Yc=null;var u=zt,c=ut;if(ke=0,Oa=zt=null,ut=0,(ve&6)!==0)throw Error(r(331));var s=ve;if(ve|=4,So(u.current),po(u,u.current,c,t),ve=s,Sn(0,!1),yl&&typeof yl.onPostCommitFiberRoot=="function")try{yl.onPostCommitFiberRoot(Ya,u)}catch{}return!0}finally{T.p=n,b.T=a,Vo(e,l)}}function Qo(e,l,t){l=Tl(t,l),l=bc(e.stateNode,l,2),e=gt(e,l,2),e!==null&&(Xa(e,2),Xl(e))}function Me(e,l,t){if(e.tag===3)Qo(e,e,t);else for(;l!==null;){if(l.tag===3){Qo(l,e,t);break}else if(l.tag===1){var a=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(St===null||!St.has(a))){e=Tl(t,e),t=Qr(2),a=gt(l,t,2),a!==null&&(Lr(t,a,l,e),Xa(a,2),Xl(a));break}}l=l.return}}function Lc(e,l,t){var a=e.pingCache;if(a===null){a=e.pingCache=new wm;var n=new Set;a.set(l,n)}else n=a.get(l),n===void 0&&(n=new Set,a.set(l,n));n.has(t)||(Rc=!0,n.add(t),e=Gm.bind(null,e,l,t),l.then(e,e))}function Gm(e,l,t){var a=e.pingCache;a!==null&&a.delete(l),e.pingedLanes|=e.suspendedLanes&t,e.warmLanes&=~t,De===e&&(fe&t)===t&&(Ye===4||Ye===3&&(fe&62914560)===fe&&300>hl()-Ou?(ve&2)===0&&Da(e,0):qc|=t,Ta===fe&&(Ta=0)),Xl(e)}function Lo(e,l){l===0&&(l=Rs()),e=Gt(e,l),e!==null&&(Xa(e,l),Xl(e))}function Ym(e){var l=e.memoizedState,t=0;l!==null&&(t=l.retryLane),Lo(e,t)}function Vm(e,l){var t=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(t=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(l),Lo(e,t)}function Xm(e,l){return ai(e,l)}var qu=null,Ca=null,Zc=!1,Bu=!1,Kc=!1,Et=0;function Xl(e){e!==Ca&&e.next===null&&(Ca===null?qu=Ca=e:Ca=Ca.next=e),Bu=!0,Zc||(Zc=!0,Lm())}function Sn(e,l){if(!Kc&&Bu){Kc=!0;do for(var t=!1,a=qu;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var c=a.suspendedLanes,s=a.pingedLanes;u=(1<<31-xl(42|e)+1)-1,u&=n&~(c&~s),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(t=!0,ko(a,u))}else u=fe,u=Xn(a,a===De?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Va(a,u)||(t=!0,ko(a,u));a=a.next}while(t);Kc=!1}}function Qm(){Zo()}function Zo(){Bu=Zc=!1;var e=0;Et!==0&&eh()&&(e=Et);for(var l=hl(),t=null,a=qu;a!==null;){var n=a.next,u=Ko(a,l);u===0?(a.next=null,t===null?qu=n:t.next=n,n===null&&(Ca=t)):(t=a,(e!==0||(u&3)!==0)&&(Bu=!0)),a=n}ke!==0&&ke!==5||Sn(e),Et!==0&&(Et=0)}function Ko(e,l){for(var t=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,u=e.pendingLanes&-62914561;0s)break;var j=f.transferSize,S=f.initiatorType;j&&t0(S)&&(f=f.responseEnd,c+=j*(f"u"?null:document;function h0(e,l,t){var a=wa;if(a&&typeof l=="string"&&l){var n=_l(l);n='link[rel="'+e+'"][href="'+n+'"]',typeof t=="string"&&(n+='[crossorigin="'+t+'"]'),m0.has(n)||(m0.add(n),e={rel:e,crossOrigin:t,href:l},a.querySelector(n)===null&&(l=a.createElement("link"),ll(l,"link",e),$e(l),a.head.appendChild(l)))}}function fh(e){it.D(e),h0("dns-prefetch",e,null)}function rh(e,l){it.C(e,l),h0("preconnect",e,l)}function oh(e,l,t){it.L(e,l,t);var a=wa;if(a&&e&&l){var n='link[rel="preload"][as="'+_l(l)+'"]';l==="image"&&t&&t.imageSrcSet?(n+='[imagesrcset="'+_l(t.imageSrcSet)+'"]',typeof t.imageSizes=="string"&&(n+='[imagesizes="'+_l(t.imageSizes)+'"]')):n+='[href="'+_l(e)+'"]';var u=n;switch(l){case"style":u=Ha(e);break;case"script":u=Ra(e)}Hl.has(u)||(e=D({rel:"preload",href:l==="image"&&t&&t.imageSrcSet?void 0:e,as:l},t),Hl.set(u,e),a.querySelector(n)!==null||l==="style"&&a.querySelector(_n(u))||l==="script"&&a.querySelector(An(u))||(l=a.createElement("link"),ll(l,"link",e),$e(l),a.head.appendChild(l)))}}function dh(e,l){it.m(e,l);var t=wa;if(t&&e){var a=l&&typeof l.as=="string"?l.as:"script",n='link[rel="modulepreload"][as="'+_l(a)+'"][href="'+_l(e)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ra(e)}if(!Hl.has(u)&&(e=D({rel:"modulepreload",href:e},l),Hl.set(u,e),t.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(t.querySelector(An(u)))return}a=t.createElement("link"),ll(a,"link",e),$e(a),t.head.appendChild(a)}}}function mh(e,l,t){it.S(e,l,t);var a=wa;if(a&&e){var n=aa(a).hoistableStyles,u=Ha(e);l=l||"default";var c=n.get(u);if(!c){var s={loading:0,preload:null};if(c=a.querySelector(_n(u)))s.loading=5;else{e=D({rel:"stylesheet",href:e,"data-precedence":l},t),(t=Hl.get(u))&&ss(e,t);var f=c=a.createElement("link");$e(f),ll(f,"link",e),f._p=new Promise(function(x,j){f.onload=x,f.onerror=j}),f.addEventListener("load",function(){s.loading|=1}),f.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Qu(c,l,a)}c={type:"stylesheet",instance:c,count:1,state:s},n.set(u,c)}}}function hh(e,l){it.X(e,l);var t=wa;if(t&&e){var a=aa(t).hoistableScripts,n=Ra(e),u=a.get(n);u||(u=t.querySelector(An(n)),u||(e=D({src:e,async:!0},l),(l=Hl.get(n))&&fs(e,l),u=t.createElement("script"),$e(u),ll(u,"link",e),t.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function yh(e,l){it.M(e,l);var t=wa;if(t&&e){var a=aa(t).hoistableScripts,n=Ra(e),u=a.get(n);u||(u=t.querySelector(An(n)),u||(e=D({src:e,async:!0,type:"module"},l),(l=Hl.get(n))&&fs(e,l),u=t.createElement("script"),$e(u),ll(u,"link",e),t.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function y0(e,l,t,a){var n=(n=ae.current)?Xu(n):null;if(!n)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof t.precedence=="string"&&typeof t.href=="string"?(l=Ha(t.href),t=aa(n).hoistableStyles,a=t.get(l),a||(a={type:"style",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(t.rel==="stylesheet"&&typeof t.href=="string"&&typeof t.precedence=="string"){e=Ha(t.href);var u=aa(n).hoistableStyles,c=u.get(e);if(c||(n=n.ownerDocument||n,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,c),(u=n.querySelector(_n(e)))&&!u._p&&(c.instance=u,c.state.loading=5),Hl.has(e)||(t={rel:"preload",as:"style",href:t.href,crossOrigin:t.crossOrigin,integrity:t.integrity,media:t.media,hrefLang:t.hrefLang,referrerPolicy:t.referrerPolicy},Hl.set(e,t),u||xh(n,e,t,c.state))),l&&a===null)throw Error(r(528,""));return c}if(l&&a!==null)throw Error(r(529,""));return null;case"script":return l=t.async,t=t.src,typeof t=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Ra(t),t=aa(n).hoistableScripts,a=t.get(l),a||(a={type:"script",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ha(e){return'href="'+_l(e)+'"'}function _n(e){return'link[rel="stylesheet"]['+e+"]"}function x0(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function xh(e,l,t,a){e.querySelector('link[rel="preload"][as="style"]['+l+"]")?a.loading=1:(l=e.createElement("link"),a.preload=l,l.addEventListener("load",function(){return a.loading|=1}),l.addEventListener("error",function(){return a.loading|=2}),ll(l,"link",t),$e(l),e.head.appendChild(l))}function Ra(e){return'[src="'+_l(e)+'"]'}function An(e){return"script[async]"+e}function g0(e,l,t){if(l.count++,l.instance===null)switch(l.type){case"style":var a=e.querySelector('style[data-href~="'+_l(t.href)+'"]');if(a)return l.instance=a,$e(a),a;var n=D({},t,{"data-href":t.href,"data-precedence":t.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),$e(a),ll(a,"style",n),Qu(a,t.precedence,e),l.instance=a;case"stylesheet":n=Ha(t.href);var u=e.querySelector(_n(n));if(u)return l.state.loading|=4,l.instance=u,$e(u),u;a=x0(t),(n=Hl.get(n))&&ss(a,n),u=(e.ownerDocument||e).createElement("link"),$e(u);var c=u;return c._p=new Promise(function(s,f){c.onload=s,c.onerror=f}),ll(u,"link",a),l.state.loading|=4,Qu(u,t.precedence,e),l.instance=u;case"script":return u=Ra(t.src),(n=e.querySelector(An(u)))?(l.instance=n,$e(n),n):(a=t,(n=Hl.get(u))&&(a=D({},t),fs(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),$e(n),ll(n,"link",a),e.head.appendChild(n),l.instance=n);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(a=l.instance,l.state.loading|=4,Qu(a,t.precedence,e));return l.instance}function Qu(e,l,t){for(var a=t.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,c=0;c title"):null)}function gh(e,l,t){if(t===1||l.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return e=l.disabled,typeof l.precedence=="string"&&e==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function p0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function vh(e,l,t,a){if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var n=Ha(a.href),u=l.querySelector(_n(n));if(u){l=u._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(e.count++,e=Zu.bind(e),l.then(e,e)),t.state.loading|=4,t.instance=u,$e(u);return}u=l.ownerDocument||l,a=x0(a),(n=Hl.get(n))&&ss(a,n),u=u.createElement("link"),$e(u);var c=u;c._p=new Promise(function(s,f){c.onload=s,c.onerror=f}),ll(u,"link",a),t.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(t,l),(l=t.state.preload)&&(t.state.loading&3)===0&&(e.count++,t=Zu.bind(e),l.addEventListener("load",t),l.addEventListener("error",t))}}var rs=0;function bh(e,l){return e.stylesheets&&e.count===0&&Ju(e,e.stylesheets),0rs?50:800)+l);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Zu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ju(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ku=null;function Ju(e,l){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ku=new Map,l.forEach(ph,e),Ku=null,Zu.call(e))}function ph(e,l){if(!(l.state.loading&4)){var t=Ku.get(e);if(t)var a=t.get(null);else{t=new Map,Ku.set(e,t);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d)}catch(_){console.error(_)}}return d(),bs.exports=qh(),bs.exports}var Gh=Bh();const Yh=F0(Gh);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Vh=d=>d.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Xh=d=>d.replace(/^([A-Z])|[\s-_]+(\w)/g,(_,M,r)=>r?r.toUpperCase():M.toLowerCase()),L0=d=>{const _=Xh(d);return _.charAt(0).toUpperCase()+_.slice(1)},I0=(...d)=>d.filter((_,M,r)=>!!_&&_.trim()!==""&&r.indexOf(_)===M).join(" ").trim(),Qh=d=>{for(const _ in d)if(_.startsWith("aria-")||_==="role"||_==="title")return!0};/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Lh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Zh=G.forwardRef(({color:d="currentColor",size:_=24,strokeWidth:M=2,absoluteStrokeWidth:r,className:w="",children:A,iconNode:k,...Z},E)=>G.createElement("svg",{ref:E,...Lh,width:_,height:_,stroke:d,strokeWidth:r?Number(M)*24/Number(_):M,className:I0("lucide",w),...!A&&!Qh(Z)&&{"aria-hidden":"true"},...Z},[...k.map(([p,Y])=>G.createElement(p,Y)),...Array.isArray(A)?A:[A]]));/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Q=(d,_)=>{const M=G.forwardRef(({className:r,...w},A)=>G.createElement(Zh,{ref:A,iconNode:_,className:I0(`lucide-${Vh(L0(d))}`,`lucide-${d}`,r),...w}));return M.displayName=L0(d),M};/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Kh=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Jh=Q("bot",Kh);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kh=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Es=Q("box",kh);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $h=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ss=Q("check",$h);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Wh=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_s=Q("chevron-down",Wh);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fh=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ih=Q("chevron-left",Fh);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ph=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],e1=Q("circle-alert",Ph);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const l1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Z0=Q("circle-x",l1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const t1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],a1=Q("copy",t1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const n1=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],u1=Q("credit-card",n1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const i1=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],As=Q("download",i1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const c1=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],s1=Q("ellipsis",c1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const f1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],r1=Q("external-link",f1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const o1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Ts=Q("file-text",o1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const d1=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],K0=Q("history",d1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const m1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],P0=Q("image",m1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const h1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],y1=Q("info",h1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const x1=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],g1=Q("key-round",x1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const v1=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],b1=Q("languages",v1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const p1=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],j1=Q("laptop",p1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const N1=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],S1=Q("layers",N1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const z1=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],ed=Q("lightbulb",z1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const M1=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],E1=Q("link",M1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],J0=Q("loader-circle",_1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const A1=[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]],ld=Q("log-in",A1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const T1=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],O1=Q("log-out",T1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const D1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],U1=Q("maximize-2",D1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const C1=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],w1=Q("message-square-text",C1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const H1=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],R1=Q("mic",H1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const q1=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],B1=Q("monitor",q1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const G1=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],li=Q("music",G1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Y1=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Os=Q("pause",Y1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const V1=[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]],X1=Q("pen-tool",V1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Q1=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],It=Q("play",Q1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const L1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Rn=Q("plus",L1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Z1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],K1=Q("refresh-cw",Z1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const J1=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],k1=Q("send",J1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $1=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],zs=Q("share-2",$1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const W1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],F1=Q("shield",W1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const I1=[["path",{d:"M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z",key:"15892j"}],["path",{d:"M3 20V4",key:"1ptbpl"}]],P1=Q("skip-back",I1);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ey=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],ly=Q("skip-forward",ey);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ty=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],ay=Q("smartphone",ty);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ny=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],qn=Q("sparkles",ny);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const uy=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],k0=Q("star",uy);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const iy=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],cy=Q("tag",iy);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const sy=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],$0=Q("trash-2",sy);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const fy=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],ry=Q("type",fy);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const oy=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],dy=Q("upload",oy);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const my=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],hy=Q("user",my);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yy=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],Us=Q("video",yy);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xy=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],gy=Q("volume-2",xy);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vy=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],by=Q("wallet",vy);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const py=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],td=Q("wand-sparkles",py);/** * @license lucide-react v0.561.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jy=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ba=Q("x",jy);var C=(d=>(d.VIDEO="video",d.IMAGE="image",d.TEXT="text",d.MUSIC="music",d))(C||{}),zl=(d=>(d.IDLE="idle",d.WAITING="waiting",d.GENERATING="generating",d.COMPLETED="completed",d.FAILED="failed",d))(zl||{});const Ny=15,Sy=({activeTab:d,setActiveTab:_,onOpenUserModal:M})=>{const r=w=>` flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors duration-200 text-sm font-medium rounded-lg mx-2 ${d===w?"bg-blue-600 text-white shadow-md":"text-gray-600 hover:bg-gray-100"} `;return i.jsxs("div",{className:"w-64 bg-white h-screen flex flex-col border-r border-gray-200 flex-shrink-0 z-20 font-sans",children:[i.jsx("div",{className:"h-16 flex items-center px-6 border-b border-gray-100",children:i.jsxs("div",{className:"flex items-center gap-2 font-bold text-xl text-gray-800 tracking-tight",children:[i.jsx(S1,{className:"text-blue-600",size:24}),i.jsx("span",{children:"朴见潮音"})]})}),i.jsxs("nav",{className:"flex-1 py-4 flex flex-col gap-1",children:[i.jsxs("div",{className:r(C.VIDEO),onClick:()=>_(C.VIDEO),children:[i.jsx(Us,{size:18}),i.jsx("span",{children:"Sora2 视频"})]}),i.jsxs("div",{className:r(C.MUSIC),onClick:()=>_(C.MUSIC),children:[i.jsx(li,{size:18}),i.jsx("span",{children:"Suno 音乐"})]}),i.jsxs("div",{className:r(C.IMAGE),onClick:()=>_(C.IMAGE),children:[i.jsx(P0,{size:18}),i.jsx("span",{children:"Nano Banana 图片"})]}),i.jsxs("div",{className:r(C.TEXT),onClick:()=>_(C.TEXT),children:[i.jsx(w1,{size:18}),i.jsx("span",{children:"Gemini 文本"})]}),i.jsxs("div",{className:"mt-12 flex flex-col items-center justify-center text-gray-300 gap-2",children:[i.jsx(Es,{size:48,strokeWidth:1}),i.jsx("span",{className:"text-xs",children:"暂无创作记录"})]})]}),i.jsx("div",{className:"p-4 border-t border-gray-200 bg-gray-50",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2 cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>M("recharge"),children:[i.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-600 flex items-center justify-center text-white text-xs font-bold",children:"用"}),i.jsxs("div",{className:"flex flex-col",children:[i.jsx("span",{className:"text-xs font-bold text-gray-700",children:"用户0666"}),i.jsx("span",{className:"text-[10px] text-blue-500 font-semibold",children:"4980 积分"})]})]}),i.jsx(O1,{size:16,className:"text-gray-400 cursor-pointer hover:text-red-500 transition-colors",onClick:()=>M("login")})]})})]})},Hn=async()=>!0,Ga=async()=>{const d=window;d.aistudio&&d.aistudio.openSelectKey?await d.aistudio.openSelectKey():console.log("API Key selection skipped for simulation.")},ad=async(d,_,M)=>(console.log("Simulating Video Generation...",{prompt:d,config:_}),await new Promise(r=>setTimeout(r,3e3)),"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"),nd=async(d,_,M)=>(console.log("Simulating Image Generation...",{prompt:d,config:_}),await new Promise(w=>setTimeout(w,2e3)),`https://picsum.photos/seed/${Math.floor(Math.random()*1e3)}/1024/1024`),zy=async d=>(await new Promise(_=>setTimeout(_,1500)),`(Verse 1) Neon lights are calling my name In the city of digital rain Walking through the static noise Searching for a brand new voice (Chorus) Cyber heart, electric soul Programming the rock and roll System glitch in the melody This is our virtual destiny`),ud=async(d,_,M,r)=>{console.log("Simulating Music Generation...",{lyrics:d,style:_,isInstrumental:M,title:r}),await new Promise(A=>setTimeout(A,3e3));const w=[{id:Date.now(),title:r?`${r} (Ver 1)`:"Untitled Song (Ver 1)",style:_||"Pop",url:"https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3",cover:`https://picsum.photos/seed/${Math.random()}/200/200`,lyrics:d||"[Instrumental]"},{id:Date.now()+1,title:r?`${r} (Ver 2)`:"Untitled Song (Ver 2)",style:_||"Pop",url:"https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3",cover:`https://picsum.photos/seed/${Math.random()+1}/200/200`,lyrics:d||"[Instrumental]"}];return JSON.stringify(w)},My=async function*(d,_,M){const A=((k,Z)=>{const E=[];for(let p=0;psetTimeout(Z,100)),yield k},Ey=({config:d,setConfig:_,onBatchGenerate:M,onDelete:r,generating:w,viewMode:A,setViewMode:k,activeTab:Z,onNewChat:E,onOpenDigitalManager:p})=>Z===C.TEXT?i.jsxs("div",{className:"bg-white px-6 py-4 border-b border-gray-200 flex items-center justify-between shadow-sm sticky top-0 z-10 min-h-[72px]",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs("div",{className:"flex items-center gap-2 font-bold text-lg text-gray-800",children:[i.jsx(qn,{className:"text-gray-700",size:20}),i.jsx("span",{children:"Gemini"})]}),i.jsxs("div",{className:"relative group",children:[i.jsxs("select",{className:"appearance-none bg-gray-50 border border-gray-200 text-gray-700 text-sm rounded-lg pl-4 pr-10 py-2 focus:outline-none focus:ring-1 focus:ring-blue-500 hover:bg-gray-100 transition-colors cursor-pointer min-w-[220px]",value:d.textModel,onChange:Y=>_({...d,textModel:Y.target.value}),children:[i.jsx("option",{value:"gemini-flash-lite",children:"Gemini 2.5 Flash Lite (快速)"}),i.jsx("option",{value:"gemini-flash",children:"Gemini 2.5 Flash (均衡)"}),i.jsx("option",{value:"gemini-pro",children:"Gemini 2.0 Pro (强大)"})]}),i.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-3 text-gray-500",children:i.jsx(_s,{size:14})})]})]}),i.jsxs("button",{onClick:E,className:"bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors shadow-sm flex items-center gap-2",children:[i.jsx(Rn,{size:16}),"新建对话"]})]}):i.jsxs("div",{className:"bg-white px-6 py-4 border-b border-gray-200 flex items-center justify-between shadow-sm sticky top-0 z-10 min-h-[72px]",children:[i.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[i.jsxs("div",{className:"flex bg-gray-100 rounded-lg p-1",children:[i.jsx("button",{onClick:()=>k("efficiency"),className:`px-3 py-1 rounded text-xs font-medium transition-all ${A==="efficiency"?"bg-gray-800 text-white shadow-sm":"text-gray-500 hover:text-gray-700"}`,children:"效率"}),i.jsx("button",{onClick:()=>k("simple"),className:`px-3 py-1 rounded text-xs font-medium transition-all ${A==="simple"?"bg-gray-800 text-white shadow-sm":"text-gray-500 hover:text-gray-700"}`,children:"简约"})]}),Z===C.VIDEO&&i.jsxs("button",{onClick:p,className:"px-3 py-1.5 rounded-full bg-purple-100 text-purple-700 text-xs font-bold flex items-center gap-1 border border-purple-200 hover:bg-purple-200 transition-colors cursor-pointer",title:"管理数字人物",children:[i.jsx(td,{size:12})," 数字对象"]}),A==="efficiency"&&Z!==C.MUSIC&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 animate-in fade-in slide-in-from-left-4 duration-300",children:[i.jsx("label",{children:"比例"}),i.jsxs("select",{className:"border border-gray-300 rounded px-2 py-1.5 bg-white text-gray-700 focus:outline-none focus:ring-1 focus:ring-blue-500 min-w-[120px]",value:d.aspectRatio,onChange:Y=>_({...d,aspectRatio:Y.target.value}),children:[i.jsx("option",{value:"9:16",children:"9:16 竖屏"}),i.jsx("option",{value:"16:9",children:"16:9 横屏"}),i.jsx("option",{value:"1:1",children:"1:1 方形"})]})]}),Z===C.VIDEO&&i.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 animate-in fade-in slide-in-from-left-4 duration-300 delay-75",children:[i.jsx("label",{children:"时长"}),i.jsxs("select",{className:"border border-gray-300 rounded px-2 py-1.5 bg-white text-gray-700 focus:outline-none focus:ring-1 focus:ring-blue-500",value:d.duration,onChange:Y=>_({...d,duration:Y.target.value}),children:[i.jsx("option",{value:"5s",children:"5s"}),i.jsx("option",{value:"10s",children:"10s"}),i.jsx("option",{value:"15s",children:"15s"})]})]}),i.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 animate-in fade-in slide-in-from-left-4 duration-300 delay-100",children:[i.jsx("label",{children:"清晰度"}),i.jsxs("select",{className:"border border-gray-300 rounded px-2 py-1.5 bg-white text-gray-700 focus:outline-none focus:ring-1 focus:ring-blue-500",value:d.resolution,onChange:Y=>_({...d,resolution:Y.target.value}),children:[i.jsx("option",{value:"HD",children:"高清"}),i.jsx("option",{value:"4K",children:"4K 超清"}),Z===C.IMAGE&&i.jsx("option",{value:"2K",children:"2K 高清"})]})]})]})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("button",{onClick:Ga,className:"text-xs text-gray-500 hover:text-blue-600 flex items-center gap-1 underline",children:[i.jsx(g1,{size:12})," API Key"]}),A==="efficiency"&&i.jsxs(i.Fragment,{children:[i.jsx("button",{onClick:M,disabled:w,className:`px-5 py-1.5 rounded-full text-sm font-medium transition-colors shadow-sm animate-in fade-in zoom-in-95 ${w?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-gray-200 text-gray-700 hover:bg-gray-300 hover:text-gray-900"}`,children:w?"生成中...":"批量生成"}),i.jsx("button",{onClick:r,className:"px-5 py-1.5 bg-gray-100 text-gray-500 rounded-full text-sm font-medium hover:bg-red-50 hover:text-red-600 transition-colors animate-in fade-in zoom-in-95",children:"删除"})]})]})]}),_y=()=>i.jsxs("div",{className:"bg-blue-50 border-b border-blue-100 px-6 py-2 flex items-center justify-between text-xs text-blue-700",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(y1,{size:14,className:"text-blue-500"}),i.jsxs("span",{children:[i.jsx("span",{className:"font-bold",children:"快捷键:"})," 选中单行或多行后使用",i.jsx("span",{className:"mx-1 px-1.5 py-0.5 bg-white border border-blue-200 rounded text-[10px] font-mono shadow-sm",children:"Ctrl+C"})," 复制,",i.jsx("span",{className:"mx-1 px-1.5 py-0.5 bg-white border border-blue-200 rounded text-[10px] font-mono shadow-sm",children:"Ctrl+V"})," 粘贴. 如需粘贴到指定行,请先选中目标行。(支持外部图片复制粘贴)"]})]}),i.jsx("button",{className:"text-blue-400 hover:text-blue-600",children:i.jsx(Ba,{size:14})})]}),Ay=({task:d,activeTab:_,onChange:M,onGenerate:r,onClear:w})=>{const A=G.useRef(null),k=E=>{var Y;const p=(Y=E.target.files)==null?void 0:Y[0];if(p){const D=new FileReader;D.onloadend=()=>{M(d.id,"referenceImage",D.result)},D.readAsDataURL(p)}},Z=()=>{switch(d.status){case zl.GENERATING:return i.jsxs("span",{className:"text-blue-600 animate-pulse flex items-center gap-1 text-xs",children:[i.jsx(K1,{size:12,className:"animate-spin"})," 生成中"]});case zl.COMPLETED:return i.jsx("span",{className:"text-green-600 font-medium text-xs",children:"完成"});case zl.FAILED:return i.jsxs("span",{className:"text-red-500 flex items-center gap-1 text-xs",children:[i.jsx(Z0,{size:12})," 失败"]});default:return i.jsx("span",{className:"text-gray-400 text-xs",children:"等待"})}};return i.jsxs("div",{className:`flex items-center border-b border-gray-100 hover:bg-gray-50 transition-colors group h-14 text-sm ${d.selected?"bg-blue-50/30":""}`,children:[i.jsx("div",{className:"w-12 flex justify-center flex-shrink-0 border-r border-gray-100 h-full items-center",children:i.jsx("input",{type:"checkbox",checked:d.selected,onChange:E=>M(d.id,"selected",E.target.checked),className:"w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500"})}),i.jsx("div",{className:"w-12 flex justify-center flex-shrink-0 border-r border-gray-100 h-full items-center text-gray-400 text-xs",children:d.id}),_===C.MUSIC?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex-1 border-r border-gray-100 h-full",children:i.jsx("input",{type:"text",value:d.prompt,onChange:E=>M(d.id,"prompt",E.target.value),placeholder:"输入歌词或描述...",className:"w-full h-full px-3 bg-transparent focus:outline-none focus:bg-white focus:ring-2 focus:ring-inset focus:ring-blue-100 text-gray-700 placeholder-gray-400 text-xs"})}),i.jsx("div",{className:"w-32 border-r border-gray-100 h-full",children:i.jsx("input",{type:"text",value:d.musicStyle||"",onChange:E=>M(d.id,"musicStyle",E.target.value),placeholder:"风格 (Pop...)",className:"w-full h-full px-3 bg-transparent focus:outline-none focus:bg-white focus:ring-2 focus:ring-inset focus:ring-blue-100 text-gray-700 placeholder-gray-400 text-xs"})}),i.jsx("div",{className:"w-32 border-r border-gray-100 h-full",children:i.jsx("input",{type:"text",value:d.musicTitle||"",onChange:E=>M(d.id,"musicTitle",E.target.value),placeholder:"标题...",className:"w-full h-full px-3 bg-transparent focus:outline-none focus:bg-white focus:ring-2 focus:ring-inset focus:ring-blue-100 text-gray-700 placeholder-gray-400 text-xs"})}),i.jsx("div",{className:"w-16 border-r border-gray-100 h-full flex items-center justify-center",children:i.jsxs("div",{className:"flex flex-col items-center justify-center gap-1 cursor-pointer",onClick:()=>M(d.id,"isInstrumental",!d.isInstrumental),children:[i.jsx("div",{className:`w-4 h-4 border rounded flex items-center justify-center transition-colors ${d.isInstrumental?"bg-blue-600 border-blue-600":"border-gray-300 bg-white"}`,children:d.isInstrumental&&i.jsx(li,{size:10,className:"text-white"})}),i.jsx("span",{className:"text-[10px] text-gray-500",children:"纯音"})]})})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex-1 border-r border-gray-100 h-full",children:i.jsx("input",{type:"text",value:d.prompt,onChange:E=>M(d.id,"prompt",E.target.value),placeholder:"请输入提示词...",className:"w-full h-full px-4 bg-transparent focus:outline-none focus:bg-white focus:ring-2 focus:ring-inset focus:ring-blue-100 transition-all text-gray-700 placeholder-gray-400"})}),i.jsx("div",{className:"w-32 border-r border-gray-100 h-full flex items-center justify-center p-2",children:i.jsxs("div",{onClick:()=>{var E;return(E=A.current)==null?void 0:E.click()},className:"w-full h-full border border-dashed border-gray-300 rounded hover:border-blue-400 hover:bg-blue-50 cursor-pointer flex items-center justify-center overflow-hidden relative transition-colors",children:[d.referenceImage?i.jsx("img",{src:d.referenceImage,alt:"Ref",className:"w-full h-full object-cover"}):i.jsx(Rn,{size:16,className:"text-gray-400"}),i.jsx("input",{type:"file",ref:A,className:"hidden",accept:"image/*",onChange:k})]})})]}),i.jsx("div",{className:"w-24 border-r border-gray-100 h-full flex items-center justify-center px-2",children:Z()}),i.jsxs("div",{className:"w-20 border-r border-gray-100 h-full flex items-center justify-center gap-1",children:[i.jsx("button",{className:"text-gray-400 hover:text-gray-600 px-1",onClick:()=>{d.count>1&&M(d.id,"count",d.count-1)},children:"-"}),i.jsx("span",{className:"text-gray-600 text-xs w-4 text-center",children:d.count}),i.jsx("button",{className:"text-gray-400 hover:text-gray-600 px-1",onClick:()=>{M(d.id,"count",d.count+1)},children:"+"})]}),i.jsxs("div",{className:"w-28 h-full flex items-center justify-center gap-2 px-2",children:[d.status===zl.COMPLETED&&d.resultUrl?i.jsx("button",{onClick:()=>{alert("批量模式下请在生成记录或详细视图查看结果")},className:"px-3 py-1 bg-green-100 text-green-700 text-xs rounded hover:bg-green-200",children:"查看结果"}):i.jsx("button",{onClick:()=>r(d.id),disabled:d.status===zl.GENERATING||!d.prompt,className:`px-3 py-1 rounded text-xs font-medium transition-colors ${d.status===zl.GENERATING||!d.prompt?"bg-gray-200 text-gray-400 cursor-not-allowed":"bg-gray-200 text-gray-600 hover:bg-blue-500 hover:text-white"}`,children:"生成"}),i.jsx("button",{onClick:()=>w(d.id),className:"text-xs text-gray-400 hover:text-red-500",children:i.jsx(Z0,{size:14})})]})]})},Ty=({config:d,setConfig:_,activeTab:M})=>{const[r,w]=G.useState(""),[A,k]=G.useState(""),[Z,E]=G.useState(""),[p,Y]=G.useState(!1),[D,R]=G.useState(1),[se,Se]=G.useState(null),[ge,Ue]=G.useState(!1),[be,$]=G.useState([]),[ue,L]=G.useState(null),[me,V]=G.useState(!1),[P,Je]=G.useState(null),[al,Ml]=G.useState(null),[qe,W]=G.useState(null),[pe,te]=G.useState(!1),oe=G.useRef(null),[b,T]=G.useState(!1),[J,je]=G.useState(""),Ne=G.useRef(null);G.useEffect(()=>()=>{oe.current&&(oe.current.pause(),oe.current=null)},[]),G.useEffect(()=>{oe.current&&(oe.current.playbackRate=D)},[D]);const m=O=>{var Ce;const ne=(Ce=O.target.files)==null?void 0:Ce[0];if(ne){const _e=new FileReader;_e.onloadend=()=>{L(_e.result)},_e.readAsDataURL(ne)}},z=async()=>{if(!Z&&!A){alert("请输入标题或风格以便AI生成歌词");return}Ue(!0);try{const O=await zy(Z+" "+A);w(O)}catch(O){console.error(O)}finally{Ue(!1)}},U=async()=>{if(M===C.MUSIC&&!p&&!r||M===C.MUSIC&&p&&!A||M!==C.MUSIC&&!r)return;if(!await Hn()){await Ga();return}if(V(!0),Ml(null),Je(null),M===C.MUSIC){const ne=Date.now().toString(),Ce=(Date.now()+1).toString(),_e=[{id:ne,title:Z||"Generating...",style:A,url:"",cover:"",lyrics:r,duration:"--:--",status:"generating",createdAt:Date.now(),isExtension:!!se},{id:Ce,title:Z||"Generating...",style:A,url:"",cover:"",lyrics:r,duration:"--:--",status:"generating",createdAt:Date.now(),isExtension:!!se}];$(ul=>[..._e,...ul]);try{const ul=await ud(r,A,p,Z),ml=JSON.parse(ul);$(ct=>ct.map(Pt=>Pt.id===ne&&ml[0]?{...ml[0],status:"completed",duration:"3:45",createdAt:Date.now(),isExtension:!!se,parentTrackId:se==null?void 0:se.id}:Pt.id===Ce&&ml[1]?{...ml[1],status:"completed",duration:"3:45",createdAt:Date.now(),isExtension:!!se,parentTrackId:se==null?void 0:se.id}:Pt)),Se(null)}catch(ul){$(ml=>ml.map(ct=>ct.id===ne||ct.id===Ce?{...ct,status:"failed"}:ct)),Ml(ul.message)}finally{V(!1)}return}try{let ne="";M===C.VIDEO?ne=await ad(r,d,ue):M===C.IMAGE&&(ne=await nd(r,d,ue)),Je(ne)}catch(ne){Ml(ne.message||"生成失败")}finally{V(!1)}},q=O=>{var ne,Ce;if(O.status==="completed")if((qe==null?void 0:qe.id)===O.id)if(pe)(ne=oe.current)==null||ne.pause(),te(!1);else{const _e=(Ce=oe.current)==null?void 0:Ce.play();_e!==void 0&&_e.then(()=>te(!0)).catch(ul=>{console.error("Playback error:",ul),te(!1)})}else{oe.current&&oe.current.pause(),W(O),te(!0);const _e=new Audio(O.url);_e.playbackRate=D,oe.current=_e,_e.onended=()=>te(!1);const ul=_e.play();ul!==void 0&&ul.catch(ml=>{ml.name!=="AbortError"&&console.error("Playback error:",ml),oe.current===_e&&te(!1)})}},F=O=>{je(O),T(!0)},ae=({track:O})=>{const ne=(qe==null?void 0:qe.id)===O.id;return i.jsxs("div",{className:`flex items-center gap-4 p-3 rounded-lg border transition-all ${ne?"bg-blue-50 border-blue-200":"bg-white border-gray-100 hover:bg-gray-50"}`,children:[i.jsx("div",{className:"w-14 h-14 md:w-16 md:h-16 rounded-md bg-gray-200 flex-shrink-0 relative overflow-hidden group",children:O.status==="generating"?i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100",children:i.jsx(J0,{size:24,className:"text-blue-500 animate-spin"})}):O.status==="failed"?i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-red-50 text-red-400",children:i.jsx(Ba,{size:24})}):i.jsxs(i.Fragment,{children:[i.jsx("img",{src:O.cover,alt:"cover",className:"w-full h-full object-cover"}),i.jsx("div",{className:"absolute inset-0 bg-black/30 hidden group-hover:flex items-center justify-center cursor-pointer transition-colors",onClick:()=>q(O),children:ne&&pe?i.jsx(Os,{size:24,className:"text-white fill-white"}):i.jsx(It,{size:24,className:"text-white fill-white"})})]})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx("h3",{className:`font-bold text-sm truncate ${ne?"text-blue-700":"text-gray-800"}`,children:O.title}),O.isExtension&&i.jsx("span",{className:"px-1.5 py-0.5 rounded bg-purple-100 text-purple-600 text-[10px] font-bold border border-purple-200 flex-shrink-0",children:"续写"}),O.status==="generating"&&i.jsx("span",{className:"text-xs text-blue-500 animate-pulse font-medium flex-shrink-0",children:"生成中..."})]}),i.jsxs("div",{className:"text-xs text-gray-500 truncate flex items-center gap-2",children:[i.jsx("span",{className:"truncate max-w-[80px] md:max-w-none",children:O.style||"Unknown Style"}),i.jsx("span",{children:"•"}),i.jsx("span",{className:"font-mono",children:O.duration}),O.createdAt&&i.jsxs("span",{className:"hidden md:inline",children:["• ",new Date(O.createdAt).toLocaleTimeString()]})]})]}),O.status==="completed"&&i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("button",{onClick:()=>{Se(O),k(O.style),E(O.title+" (Part 2)")},className:"p-2 text-gray-400 hover:text-purple-600 hover:bg-purple-50 rounded-full transition-colors hidden md:block",title:"续写 (Extend)",children:i.jsx(E1,{size:18})}),i.jsx("button",{onClick:()=>F(O.lyrics),className:"p-2 text-gray-400 hover:text-blue-600 hover:bg-blue-50 rounded-full transition-colors hidden md:block",title:"歌词",children:i.jsx(Ts,{size:18})}),i.jsx("button",{className:"p-2 text-gray-400 hover:text-blue-600 hover:bg-blue-50 rounded-full transition-colors",title:"下载视频",children:i.jsx(Us,{size:18})}),i.jsx("button",{className:"p-2 text-gray-400 hover:text-gray-600 rounded-full md:hidden",children:i.jsx(s1,{size:18})})]})]})},he=({value:O,label:ne,icon:Ce})=>i.jsxs("button",{onClick:()=>_({...d,aspectRatio:O}),className:`flex items-center gap-2 px-4 py-2 rounded-lg border text-sm font-medium transition-all ${d.aspectRatio===O?"border-blue-500 text-blue-600 bg-blue-50":"border-gray-200 text-gray-600 hover:border-gray-300 bg-white"}`,children:[i.jsx(Ce,{size:16}),ne]}),Be=({type:O,value:ne,label:Ce})=>i.jsx("button",{onClick:()=>_({...d,[O]:ne}),className:`px-4 py-2 rounded-lg border text-sm font-medium transition-all min-w-[80px] ${d[O]===ne?"border-blue-500 text-blue-600 bg-blue-50":"border-gray-200 text-gray-600 hover:border-gray-300 bg-white"}`,children:Ce}),Ee=({name:O,credits:ne,value:Ce,type:_e="image"})=>i.jsxs("button",{onClick:()=>_(_e==="music"?{...d,musicModel:Ce}:{...d,imageModel:Ce}),className:`flex flex-col items-start p-3 rounded-lg border text-sm transition-all text-left ${(_e==="music"?d.musicModel:d.imageModel)===Ce?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300 bg-white"}`,children:[i.jsx("span",{className:`font-medium ${(_e==="music"?d.musicModel:d.imageModel)===Ce?"text-blue-700":"text-gray-700"}`,children:O}),ne&&i.jsx("span",{className:"text-xs text-gray-400 mt-1",children:ne})]}),Ct=({checked:O,onChange:ne,label:Ce})=>i.jsxs("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>ne(!O),children:[i.jsx("span",{className:"text-sm font-medium text-gray-700",children:Ce}),i.jsx("div",{className:`w-10 h-5 rounded-full relative transition-colors ${O?"bg-blue-600":"bg-gray-300"}`,children:i.jsx("div",{className:`absolute top-0.5 w-4 h-4 bg-white rounded-full transition-transform shadow-sm ${O?"left-[22px]":"left-0.5"}`})})]});return i.jsxs("div",{className:"flex w-full h-full bg-white font-sans relative flex-col-reverse md:flex-row",children:[i.jsxs("div",{className:"w-full md:w-[420px] flex-shrink-0 flex flex-col border-t md:border-t-0 md:border-r border-gray-100 h-1/2 md:h-full overflow-y-auto custom-scrollbar p-6 gap-6 z-20 bg-white pb-32",children:[M===C.IMAGE&&i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-sm font-medium text-gray-700",children:"模型版本"}),i.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[i.jsx(Ee,{name:"Nano Banana Pro",credits:"1800积分",value:"Nano Banana Pro"}),i.jsx(Ee,{name:"Nano Banana Pro VT",credits:"1800积分",value:"Nano Banana Pro VT"}),i.jsx(Ee,{name:"Nano Banana",credits:"1400积分",value:"Nano Banana"}),i.jsx(Ee,{name:"Nano Banana Fast",credits:"440积分",value:"Nano Banana Fast"})]})]}),M===C.MUSIC&&i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-sm font-medium text-gray-700",children:"模型版本"}),i.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[i.jsx(Ee,{type:"music",name:"Suno v3.5",value:"suno-v3.5"}),i.jsx(Ee,{type:"music",name:"Suno v3",value:"suno-v3"})]})]}),se&&M===C.MUSIC&&i.jsxs("div",{className:"bg-purple-50 border border-purple-100 rounded-xl p-3 flex items-center justify-between animate-in fade-in zoom-in-95",children:[i.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[i.jsx("div",{className:"w-10 h-10 bg-gray-200 rounded-md overflow-hidden flex-shrink-0",children:i.jsx("img",{src:se.cover,alt:"cover",className:"w-full h-full object-cover"})}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("div",{className:"text-xs text-purple-600 font-bold mb-0.5",children:"正在续写 (Extending)"}),i.jsx("div",{className:"text-sm font-bold text-gray-800 truncate",children:se.title})]})]}),i.jsx("button",{onClick:()=>Se(null),className:"p-1 hover:bg-purple-100 rounded-full text-purple-400",children:i.jsx(Ba,{size:16})})]}),M===C.VIDEO&&i.jsxs("div",{className:"bg-purple-50 border border-purple-100 rounded-xl p-4 flex gap-3",children:[i.jsx("div",{className:"mt-1",children:i.jsx(ed,{size:18,className:"text-purple-500 fill-purple-500"})}),i.jsxs("div",{className:"text-xs text-purple-700 leading-relaxed",children:[i.jsx("span",{className:"font-bold",children:"提示:"})," 创建数字人物时请先通过视频生成数字人物的特征,视频生成完成后即可使用数字人物进行二次创作。"]})]}),M!==C.MUSIC&&i.jsxs("div",{className:"space-y-2",children:[i.jsxs("label",{className:"text-sm font-medium text-gray-700 flex justify-between",children:["参考图",i.jsx("span",{className:"text-gray-400 text-xs font-normal",children:"(单张不超过10MB)"})]}),i.jsxs("div",{onClick:()=>{var O;return(O=Ne.current)==null?void 0:O.click()},className:"w-24 h-24 border-2 border-dashed border-gray-300 rounded-lg hover:border-blue-400 hover:bg-blue-50 cursor-pointer flex flex-col items-center justify-center transition-colors overflow-hidden relative group",children:[ue?i.jsxs(i.Fragment,{children:[i.jsx("img",{src:ue,alt:"ref",className:"w-full h-full object-cover"}),i.jsx("div",{className:"absolute inset-0 bg-black/40 hidden group-hover:flex items-center justify-center text-white",children:i.jsx(Rn,{size:24})})]}):i.jsx(Rn,{size:24,className:"text-gray-400"}),i.jsx("input",{type:"file",ref:Ne,className:"hidden",accept:"image/*",onChange:m})]})]}),M===C.VIDEO&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-sm font-medium text-gray-700",children:"视频比例"}),i.jsxs("div",{className:"flex gap-3",children:[i.jsx(he,{value:"9:16",label:"9:16 竖屏",icon:ay}),i.jsx(he,{value:"16:9",label:"16:9 横屏",icon:B1})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-sm font-medium text-gray-700",children:"视频时长"}),i.jsxs("div",{className:"flex gap-3",children:[i.jsx(Be,{type:"duration",value:"15s",label:"15秒"}),i.jsx(Be,{type:"duration",value:"10s",label:"10秒"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-sm font-medium text-gray-700",children:"清晰度"}),i.jsxs("div",{className:"flex gap-3",children:[i.jsx(Be,{type:"resolution",value:"HD",label:"高清"}),i.jsx(Be,{type:"resolution",value:"4K",label:"默认"})]})]})]}),M===C.IMAGE&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-sm font-medium text-gray-700",children:"图片比例"}),i.jsxs("div",{className:"relative",children:[i.jsxs("select",{className:"w-full appearance-none bg-white border border-gray-200 text-gray-700 py-2.5 px-4 pr-8 rounded-lg focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 text-sm",value:d.aspectRatio,onChange:O=>_({...d,aspectRatio:O.target.value}),children:[i.jsx("option",{value:"1:1",children:"自动"}),i.jsx("option",{value:"9:16",children:"9:16 竖屏"}),i.jsx("option",{value:"16:9",children:"16:9 横屏"}),i.jsx("option",{value:"4:3",children:"4:3 标准"})]}),i.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-500",children:i.jsx(_s,{size:16})})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-sm font-medium text-gray-700",children:"图片清晰度"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Be,{type:"resolution",value:"2K",label:"2K 高清"}),i.jsx(Be,{type:"resolution",value:"4K",label:"4K 超清"}),i.jsx(Be,{type:"resolution",value:"1K",label:"1K 标准"})]})]})]}),M===C.MUSIC&&i.jsx(i.Fragment,{children:i.jsxs("div",{className:"bg-gray-50 rounded-xl p-4 space-y-4 border border-gray-100",children:[i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("label",{className:"text-sm font-bold text-gray-800 flex items-center gap-2",children:[i.jsx(ry,{size:14,className:"text-blue-600"})," 歌词 (Lyrics)"]}),i.jsxs("div",{className:"flex items-center gap-3",children:[!p&&i.jsxs("button",{onClick:z,disabled:ge,className:"text-xs bg-gradient-to-r from-blue-500 to-purple-500 text-white px-2 py-1 rounded-md flex items-center gap-1 shadow-sm hover:opacity-90 transition-opacity",children:[i.jsx(td,{size:10})," ",ge?"生成中...":"AI 写词"]}),i.jsx(Ct,{checked:p,onChange:Y,label:"纯音乐"})]})]}),!p&&i.jsx("textarea",{value:r,onChange:O=>w(O.target.value),placeholder:"输入歌词...",className:"w-full h-32 p-3 bg-white border border-gray-200 rounded-lg focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm resize-none"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs("label",{className:"text-sm font-bold text-gray-800 flex items-center gap-2",children:[i.jsx(R1,{size:14,className:"text-purple-600"})," 音乐风格 (Style of Music)"]}),i.jsx("textarea",{value:A,onChange:O=>k(O.target.value),placeholder:"例如:Pop, Upbeat, Female Vocals...",className:"w-full h-20 p-3 bg-white border border-gray-200 rounded-lg focus:outline-none focus:ring-1 focus:ring-purple-500 text-sm resize-none"}),i.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:["Pop","Rock","Electronic","Jazz","Piano","Guitar"].map(O=>i.jsx("button",{onClick:()=>k(ne=>ne?`${ne}, ${O}`:O),className:"px-2 py-1 text-xs bg-white border border-gray-200 rounded hover:bg-gray-100 text-gray-600",children:O},O))})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs("label",{className:"text-sm font-bold text-gray-800 flex items-center gap-2",children:[i.jsx(cy,{size:14,className:"text-green-600"})," 标题 (Title)"]}),i.jsx("input",{type:"text",value:Z,onChange:O=>E(O.target.value),placeholder:"输入歌曲标题...",className:"w-full px-3 py-2 bg-white border border-gray-200 rounded-lg focus:outline-none focus:ring-1 focus:ring-green-500 text-sm"})]})]})}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-sm font-medium text-gray-700",children:"生成数量"}),i.jsxs("div",{className:"relative",children:[i.jsxs("select",{className:"w-full appearance-none bg-white border border-gray-200 text-gray-700 py-2.5 px-4 pr-8 rounded-lg focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 text-sm",children:[i.jsx("option",{children:"1 个"}),i.jsx("option",{children:"2 个"}),i.jsx("option",{children:"3 个"})]}),i.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-500",children:i.jsx(_s,{size:16})})]})]}),M!==C.MUSIC&&i.jsxs("div",{className:"space-y-2 flex-1 flex flex-col min-h-[120px]",children:[i.jsx("label",{className:"text-sm font-medium text-gray-700",children:M===C.VIDEO?"提示词":"图片描述"}),i.jsx("textarea",{value:r,onChange:O=>w(O.target.value),placeholder:M===C.VIDEO?"请输入您想要生成的视频描述...":"请输入您想要生成的图片描述...",className:"w-full flex-1 p-3 bg-white border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-100 focus:border-blue-400 resize-none text-sm leading-relaxed"})]}),i.jsx("div",{className:"pt-2",children:i.jsxs("button",{onClick:U,disabled:me||(M===C.MUSIC?!p&&!r:!r),className:`w-full py-3 rounded-full text-sm font-bold tracking-wide transition-all shadow-md flex items-center justify-center ${me||(M===C.MUSIC?!p&&!r&&!A:!r)?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gradient-to-r from-blue-600 to-blue-500 text-white hover:shadow-lg hover:-translate-y-0.5 active:scale-95 active:shadow-inner"}`,children:[me&&i.jsx(J0,{size:16,className:"animate-spin mr-2"}),me?(M===C.VIDEO||M===C.MUSIC,"生成中..."):M===C.VIDEO?"生成视频":M===C.MUSIC?"生成音乐":"生成图片"]})})]}),i.jsxs("div",{className:"flex-1 bg-gradient-to-br from-gray-50 via-gray-100/50 to-blue-50/20 p-4 md:p-8 flex flex-col relative overflow-hidden pb-24 h-1/2 md:h-full",children:[i.jsxs("div",{className:"absolute inset-0 pointer-events-none z-0",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.03] bg-[radial-gradient(#3b82f6_1px,transparent_1px)] [background-size:16px_16px]"}),i.jsx("div",{className:"absolute -inset-[100%] top-0 block h-full w-[200%] -skew-x-12 bg-gradient-to-r from-transparent via-white/40 to-transparent opacity-30 animate-shimmer"})]}),i.jsx("style",{children:` @keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } } .animate-shimmer { animation: shimmer 8s infinite linear; } `}),i.jsxs("h2",{className:"text-lg font-bold text-gray-800 mb-4 z-10 flex items-center gap-2",children:[i.jsx(qn,{size:16,className:"text-blue-500 fill-blue-500"})," 生成结果"]}),i.jsx("div",{className:"flex-1 z-10 w-full min-h-0 relative flex flex-col",children:M===C.MUSIC?i.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar space-y-3 pb-20",children:be.length===0?i.jsxs("div",{className:"flex flex-col items-center justify-center text-gray-300 h-full",children:[i.jsx(li,{size:48,className:"text-gray-200 mb-4"}),i.jsx("p",{className:"text-sm font-medium text-gray-400",children:"暂无生成的音乐"})]}):be.map(O=>i.jsx(ae,{track:O},O.id))}):i.jsx("div",{className:"flex-1 flex items-center justify-center",children:me?i.jsxs("div",{className:"flex flex-col items-center justify-center z-10",children:[i.jsxs("div",{className:"relative w-20 h-20 mb-6",children:[i.jsx("div",{className:"absolute inset-0 border-4 border-gray-200/50 rounded-full"}),i.jsx("div",{className:"absolute inset-0 border-4 border-blue-500 rounded-full border-t-transparent animate-spin"}),i.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:i.jsx(qn,{size:24,className:"text-blue-500 animate-pulse"})})]}),i.jsx("div",{className:"text-gray-500 font-medium text-sm animate-pulse tracking-wide",children:M===C.VIDEO?"正在渲染视频...":"正在绘制图片..."})]}):P?i.jsxs("div",{className:"w-full h-full bg-black/5 rounded-2xl overflow-hidden shadow-2xl ring-1 ring-black/5 flex items-center justify-center backdrop-blur-sm relative group animate-in fade-in zoom-in-95 duration-500",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-tr from-white/10 to-transparent pointer-events-none z-20"}),i.jsxs("div",{className:"absolute top-4 right-4 flex gap-2 opacity-0 group-hover:opacity-100 transition-opacity z-30 transform translate-y-2 group-hover:translate-y-0 duration-300",children:[i.jsx("button",{className:"p-2 bg-black/40 text-white rounded-full hover:bg-black/60 backdrop-blur-md transition-colors shadow-lg",title:"下载",children:i.jsx(As,{size:18})}),i.jsx("button",{className:"p-2 bg-black/40 text-white rounded-full hover:bg-black/60 backdrop-blur-md transition-colors shadow-lg",title:"全屏",children:i.jsx(U1,{size:18})})]}),M===C.VIDEO?i.jsx("video",{src:P,controls:!0,autoPlay:!0,loop:!0,className:"w-full h-full object-contain max-h-full shadow-lg"}):i.jsx("img",{src:P,alt:"Result",className:"w-full h-full object-contain max-h-full shadow-lg transition-transform duration-700 hover:scale-[1.02]"})]}):al?i.jsxs("div",{className:"text-center p-8 bg-white/80 backdrop-blur-md rounded-2xl shadow-sm border border-red-100 max-w-md z-10 animate-in fade-in zoom-in-95",children:[i.jsx("div",{className:"text-red-500 font-bold mb-2",children:"生成失败"}),i.jsx("div",{className:"text-gray-500 text-sm",children:al})]}):i.jsxs("div",{className:"flex flex-col items-center justify-center text-gray-300 z-10 h-full",children:[i.jsxs("div",{className:"w-64 h-48 mb-6 relative opacity-80 animate-[pulse_4s_ease-in-out_infinite]",children:[i.jsx("div",{className:"absolute inset-0 border-4 border-gray-200/50 rounded-lg transform rotate-[-6deg] bg-white/50 backdrop-blur-sm"}),i.jsx("div",{className:"absolute inset-0 border-4 border-gray-200 rounded-lg transform rotate-[6deg] bg-white/80 flex items-center justify-center shadow-sm",children:M===C.VIDEO?i.jsx(It,{size:48,className:"text-gray-200 fill-gray-100"}):i.jsx(P0,{size:48,className:"text-gray-200"})}),i.jsx("div",{className:"absolute bottom-4 left-4 bg-gray-300 px-2 py-0.5 rounded text-[10px] text-white font-bold shadow-sm",children:"Al View"})]}),i.jsx("p",{className:"text-sm font-medium text-gray-400",children:"请输入内容并点击生成以查看魔法"})]})})})]}),qe&&i.jsxs("div",{className:"absolute bottom-16 md:bottom-0 left-0 right-0 bg-white/95 backdrop-blur-lg border-t border-gray-200 shadow-[0_-4px_20px_rgba(0,0,0,0.1)] p-3 z-40 animate-in slide-in-from-bottom-full duration-300 flex items-center gap-4 px-4 md:px-6 h-20",children:[i.jsxs("div",{className:"w-12 h-12 rounded-lg overflow-hidden bg-gray-200 flex-shrink-0 relative group",children:[i.jsx("img",{src:qe.cover,alt:"Cover",className:"w-full h-full object-cover"}),i.jsx("div",{className:"absolute inset-0 bg-black/10"})]}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("div",{className:"font-bold text-gray-800 text-sm truncate",children:qe.title}),i.jsx("div",{className:"text-xs text-gray-500 truncate",children:qe.style})]}),i.jsxs("div",{className:"flex items-center gap-2 md:gap-4",children:[i.jsx("button",{className:"text-gray-400 hover:text-gray-600 transition-colors hidden md:block",children:i.jsx(P1,{size:20})}),i.jsx("button",{onClick:()=>{var O,ne;if(pe)(O=oe.current)==null||O.pause(),te(!1);else{const Ce=(ne=oe.current)==null?void 0:ne.play();Ce!==void 0&&Ce.then(()=>te(!0)).catch(_e=>{console.error("Play error:",_e),te(!1)})}},className:"w-10 h-10 rounded-full bg-blue-600 text-white flex items-center justify-center hover:scale-105 transition-transform shadow-md flex-shrink-0",children:pe?i.jsx(Os,{size:20,fill:"currentColor"}):i.jsx(It,{size:20,fill:"currentColor",className:"ml-0.5"})}),i.jsx("button",{className:"text-gray-400 hover:text-gray-600 transition-colors hidden md:block",children:i.jsx(ly,{size:20})})]}),i.jsxs("div",{className:"relative group",children:[i.jsxs("button",{className:"flex items-center justify-center w-10 h-8 rounded border border-gray-200 bg-gray-50 text-xs font-bold text-gray-700 hover:bg-gray-100 transition-colors",children:[D,"x"]}),i.jsx("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 bg-white border border-gray-200 rounded-lg shadow-xl overflow-hidden hidden group-hover:flex flex-col w-16 animate-in fade-in zoom-in-95 duration-150",children:[2,1.5,1.25,1,.8,.5].map(O=>i.jsxs("button",{onClick:()=>R(O),className:`py-2 text-xs font-medium hover:bg-gray-100 ${D===O?"bg-blue-50 text-blue-600":"text-gray-700"}`,children:[O,"x"]},O))})]}),i.jsxs("div",{className:"w-24 hidden lg:flex items-center gap-2",children:[i.jsx(gy,{size:16,className:"text-gray-400"}),i.jsx("div",{className:"h-1 flex-1 bg-gray-200 rounded-full overflow-hidden",children:i.jsx("div",{className:"h-full w-2/3 bg-blue-500 rounded-full"})})]}),i.jsx("button",{onClick:()=>{oe.current&&oe.current.pause(),W(null),te(!1)},className:"text-gray-400 hover:text-red-500 transition-colors ml-2",children:i.jsx(Ba,{size:20})})]}),b&&i.jsx("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4 animate-in fade-in duration-200",onClick:()=>T(!1),children:i.jsxs("div",{className:"bg-white rounded-2xl max-w-lg w-full max-h-[80vh] flex flex-col shadow-2xl overflow-hidden animate-in zoom-in-95 duration-200",onClick:O=>O.stopPropagation(),children:[i.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-100 bg-gray-50/50",children:[i.jsxs("h3",{className:"font-bold text-gray-800 flex items-center gap-2",children:[i.jsx(Ts,{size:18,className:"text-blue-500"}),"歌词"]}),i.jsx("button",{onClick:()=>T(!1),className:"p-1 rounded-full hover:bg-gray-100 text-gray-400 hover:text-gray-600 transition-colors",children:i.jsx(Ba,{size:20})})]}),i.jsx("div",{className:"p-8 overflow-y-auto whitespace-pre-wrap text-gray-600 leading-relaxed text-center font-medium bg-white custom-scrollbar",children:J||"无歌词内容"}),i.jsx("div",{className:"p-4 border-t border-gray-100 bg-gray-50/50 flex justify-center",children:i.jsx("button",{onClick:()=>T(!1),className:"px-6 py-2 bg-gray-900 text-white rounded-lg text-sm font-medium hover:bg-gray-800 transition-colors",children:"关闭"})})]})})]})},Oy=({config:d})=>{const[_,M]=G.useState([]),[r,w]=G.useState(""),[A,k]=G.useState(!1),Z=G.useRef(null),E=()=>{var R;(R=Z.current)==null||R.scrollIntoView({behavior:"smooth"})};G.useEffect(()=>{E()},[_,A]);const p=async(R=r)=>{if(!R.trim()||A)return;if(!await Hn()){await Ga();return}const Se={id:Date.now().toString(),role:"user",text:R,timestamp:Date.now()};M(Ue=>[...Ue,Se]),w(""),k(!0);const ge=(Date.now()+1).toString();M(Ue=>[...Ue,{id:ge,role:"model",text:"",timestamp:Date.now()}]);try{const Ue=My(d.textModel,_,R);let be="";for await(const $ of Ue)be+=$,M(ue=>ue.map(L=>L.id===ge?{...L,text:be}:L))}catch(Ue){console.error("Chat error:",Ue),M(be=>be.map($=>$.id===ge?{...$,text:"抱歉,遇到了一些问题,请稍后再试。"}:$))}finally{k(!1)}},Y=R=>{R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),p())},D=({icon:R,title:se,desc:Se,prompt:ge})=>i.jsxs("div",{onClick:()=>p(ge),className:"bg-white border border-gray-100 p-4 rounded-xl hover:shadow-md hover:border-blue-200 cursor-pointer transition-all flex items-start gap-3 group",children:[i.jsx("div",{className:"p-2 bg-gray-50 rounded-lg group-hover:bg-blue-50 transition-colors text-gray-600 group-hover:text-blue-600",children:i.jsx(R,{size:18})}),i.jsxs("div",{children:[i.jsx("div",{className:"font-bold text-gray-800 text-sm mb-1",children:se}),i.jsx("div",{className:"text-xs text-gray-500",children:Se})]})]});return i.jsxs("div",{className:"flex flex-col h-full bg-gray-50/50 relative",children:[i.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-6 pb-32",children:_.length===0?i.jsxs("div",{className:"h-full flex flex-col items-center justify-center max-w-3xl mx-auto -mt-16 animate-in fade-in slide-in-from-bottom-4 duration-500",children:[i.jsx("div",{className:"w-16 h-16 bg-gradient-to-br from-blue-500 to-purple-600 rounded-2xl flex items-center justify-center mb-6 shadow-lg shadow-blue-200",children:i.jsx(qn,{className:"text-white",size:32})}),i.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-2",children:"开始对话"}),i.jsx("p",{className:"text-gray-500 mb-10 text-center max-w-lg",children:"我是 Gemini,一个强大的 AI 助手。我可以帮助你回答问题、写作、编程、分析等各种任务。"}),i.jsxs("div",{className:"grid grid-cols-2 gap-4 w-full",children:[i.jsx(D,{icon:X1,title:"写作助手",desc:"帮我写一篇文章、邮件或文案",prompt:"请帮我写一篇关于人工智能未来发展的短文,风格轻松活泼。"}),i.jsx(D,{icon:ed,title:"知识问答",desc:"解释复杂的概念或回答问题",prompt:"请用通俗易懂的语言解释量子计算的基本原理。"}),i.jsx(D,{icon:j1,title:"编程辅助",desc:"生成代码、调试或解释代码",prompt:"请写一个Python脚本,用于读取CSV文件并绘制数据图表。"}),i.jsx(D,{icon:b1,title:"翻译助手",desc:"多语言互译与润色",prompt:"请将以下中文翻译成地道的英文:'千里之行,始于足下'。"})]})]}):i.jsxs("div",{className:"max-w-3xl mx-auto space-y-6",children:[_.map(R=>i.jsxs("div",{className:`flex gap-4 ${R.role==="user"?"flex-row-reverse":""}`,children:[i.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mt-1 ${R.role==="user"?"bg-blue-600 text-white":"bg-gradient-to-br from-blue-500 to-purple-600 text-white"}`,children:R.role==="user"?i.jsx(hy,{size:14}):i.jsx(Jh,{size:14})}),i.jsx("div",{className:`max-w-[80%] rounded-2xl px-5 py-3 text-sm leading-relaxed shadow-sm ${R.role==="user"?"bg-blue-600 text-white rounded-tr-sm":"bg-white text-gray-700 border border-gray-100 rounded-tl-sm"}`,children:i.jsx("div",{className:"whitespace-pre-wrap",children:R.text})})]},R.id)),A&&i.jsxs("div",{className:"flex gap-4",children:[i.jsx("div",{className:"w-8 h-8 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center flex-shrink-0 mt-1",children:i.jsx(qn,{size:14,className:"text-white animate-pulse"})}),i.jsx("div",{className:"bg-white border border-gray-100 rounded-2xl rounded-tl-sm px-5 py-3 flex items-center",children:i.jsxs("div",{className:"flex gap-1",children:[i.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce"}),i.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce delay-75"}),i.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce delay-150"})]})})]}),i.jsx("div",{ref:Z})]})}),i.jsx("div",{className:"absolute bottom-6 left-0 right-0 px-6",children:i.jsxs("div",{className:"max-w-3xl mx-auto bg-white rounded-2xl shadow-xl border border-blue-100 p-2 flex flex-col focus-within:ring-2 focus-within:ring-blue-500/20 focus-within:border-blue-500 transition-all",children:[i.jsx("textarea",{value:r,onChange:R=>w(R.target.value),onKeyDown:Y,placeholder:"问问Gemini...",className:"w-full max-h-40 min-h-[60px] p-3 resize-none focus:outline-none text-gray-700 placeholder-gray-400 text-sm bg-transparent"}),i.jsxs("div",{className:"flex justify-between items-center px-2 pb-1",children:[i.jsx("div",{className:"text-xs text-gray-400",children:"Shift + Enter 换行"}),i.jsx("button",{onClick:()=>p(),disabled:!r.trim()||A,className:`p-2 rounded-lg transition-colors ${!r.trim()||A?"text-gray-300 cursor-not-allowed":"bg-blue-600 text-white hover:bg-blue-700 shadow-md"}`,children:i.jsx(k1,{size:18})})]})]})})]})},W0=[{id:1,type:C.VIDEO,title:"赛博朋克城市的霓虹夜景",date:"2023-10-24 14:30",url:"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4",duration:"5s",width:1080,height:1920},{id:2,type:C.IMAGE,title:"可爱的卡通3D猫咪",date:"2023-10-24 12:15",url:"https://picsum.photos/seed/cat/300/300",duration:null,width:1024,height:1024},{id:3,type:C.MUSIC,title:"Summer Vibes (Pop) - Ver 1",date:"2023-10-23 09:45",url:"https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3",duration:"3:20",width:0,height:0},{id:33,type:C.MUSIC,title:"Summer Vibes (Pop) - Ver 2",date:"2023-10-23 09:45",url:"https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3",duration:"3:15",width:0,height:0},{id:4,type:C.VIDEO,title:"海浪拍打礁石的慢动作",date:"2023-10-23 08:20",url:"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4",duration:"10s",width:1920,height:1080},{id:5,type:C.IMAGE,title:"未来主义建筑设计图",date:"2023-10-22 18:10",url:"https://picsum.photos/seed/arch/300/300",duration:null,width:1024,height:1024},{id:6,type:C.MUSIC,title:"Cinematic Orchestra",date:"2023-10-21 22:00",url:"https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3",duration:"2:15",width:0,height:0},{id:7,type:C.IMAGE,title:"水墨山水画风格",date:"2023-10-21 11:30",url:"https://picsum.photos/seed/art/300/300",duration:null,width:1024,height:1024},{id:8,type:C.VIDEO,title:"宇航员在火星行走",date:"2023-10-20 15:45",url:"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4",duration:"5s",width:1080,height:1920},{id:9,type:C.IMAGE,title:"极简主义Logo设计",date:"2023-10-20 10:20",url:"https://picsum.photos/seed/logo/300/300",duration:null,width:1024,height:1024}],Dy=({isOpen:d,onClose:_,initialPage:M="recharge"})=>{const[r,w]=G.useState(M),[A,k]=G.useState(!0),[Z,E]=G.useState("all"),[p,Y]=G.useState(null),D=G.useRef(null);if(!d)return null;const R=({page:L,icon:me,label:V})=>i.jsxs("button",{onClick:()=>{w(L),(L==="login"||L==="register")&&k(L==="login")},className:`w-full flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-medium transition-colors ${r===L?"bg-blue-50 text-blue-600":"text-gray-600 hover:bg-gray-50"}`,children:[i.jsx(me,{size:18}),i.jsx("span",{children:V})]}),se=(L,me)=>{var V;p===L?((V=D.current)==null||V.pause(),Y(null)):(D.current&&D.current.pause(),D.current=new Audio(me),D.current.play(),D.current.onended=()=>Y(null),Y(L))},Se=()=>i.jsxs("div",{className:"max-w-md mx-auto pt-10",children:[i.jsxs("div",{className:"text-center mb-8",children:[i.jsx("h2",{className:"text-2xl font-bold text-gray-800",children:A?"欢迎回来":"创建账号"}),i.jsx("p",{className:"text-gray-500 text-sm mt-2",children:A?"登录以继续您的创作之旅":"注册即送 100 积分体验"})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"手机号 / 邮箱"}),i.jsx("input",{type:"text",className:"w-full border border-gray-300 rounded-lg px-4 py-2.5 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition-all",placeholder:"请输入您的账号"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"密码"}),i.jsx("input",{type:"password",className:"w-full border border-gray-300 rounded-lg px-4 py-2.5 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition-all",placeholder:"请输入密码"})]}),!A&&i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"邀请码 (选填)"}),i.jsx("input",{type:"text",className:"w-full border border-gray-300 rounded-lg px-4 py-2.5 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition-all",placeholder:"请输入邀请码"})]}),i.jsx("button",{className:"w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 rounded-lg transition-all shadow-sm mt-4",children:A?"立即登录":"立即注册"}),i.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-500 mt-4",children:[i.jsx("button",{onClick:()=>k(!A),className:"hover:text-blue-600",children:A?"没有账号? 去注册":"已有账号? 去登录"}),A&&i.jsx("button",{className:"hover:text-blue-600",children:"忘记密码?"})]})]})]}),ge=()=>i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex justify-between items-center mb-6",children:[i.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"积分充值"}),i.jsxs("span",{className:"text-sm text-gray-500",children:["当前余额: ",i.jsx("span",{className:"text-blue-600 font-bold text-lg",children:"4,980"})," 积分"]})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[{price:"9.9",points:"1,000",tag:"体验",color:"blue"},{price:"29.9",points:"3,500",tag:"超值",color:"purple"},{price:"99.9",points:"12,000",tag:"专业",color:"orange"}].map((L,me)=>i.jsxs("div",{className:`border rounded-xl p-6 relative cursor-pointer hover:shadow-lg transition-all ${me===1?"border-purple-500 ring-1 ring-purple-500 bg-purple-50/10":"border-gray-200 hover:border-blue-300 bg-white"}`,children:[me===1&&i.jsx("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-gradient-to-r from-purple-500 to-pink-500 text-white text-xs px-3 py-1 rounded-full font-bold shadow-sm",children:"MOST POPULAR"}),i.jsxs("div",{className:"text-center",children:[i.jsxs("div",{className:"text-sm text-gray-500 mb-1",children:[L.tag,"包"]}),i.jsxs("div",{className:"text-3xl font-bold text-gray-800 mb-2",children:[i.jsx("span",{className:"text-sm align-top",children:"¥"}),L.price]}),i.jsxs("div",{className:"text-blue-600 font-bold mb-4",children:[L.points," 积分"]}),i.jsxs("ul",{className:"text-xs text-gray-500 space-y-2 text-left bg-gray-50 p-3 rounded-lg mb-4",children:[i.jsxs("li",{className:"flex gap-2",children:[i.jsx(Ss,{size:14,className:"text-green-500"})," 生成约 ",parseInt(L.points.replace(",",""))/10," 张图片"]}),i.jsxs("li",{className:"flex gap-2",children:[i.jsx(Ss,{size:14,className:"text-green-500"})," 高速通道优先生成"]}),i.jsxs("li",{className:"flex gap-2",children:[i.jsx(Ss,{size:14,className:"text-green-500"})," 积分永久有效"]})]}),i.jsx("button",{className:`w-full py-2 rounded-lg text-sm font-bold transition-colors ${me===1?"bg-purple-600 text-white hover:bg-purple-700":"bg-gray-900 text-white hover:bg-gray-800"}`,children:"立即充值"})]})]},me))}),i.jsxs("div",{className:"mt-8 bg-gray-50 rounded-xl p-4 text-xs text-gray-500 leading-relaxed",children:[i.jsxs("p",{className:"font-bold mb-2 flex items-center gap-1",children:[i.jsx(F1,{size:14})," 充值说明"]}),"1. 积分主要用于视频生成、图片生成及高级对话模型消耗。",i.jsx("br",{}),"2. 充值成功后系统自动到账,如遇网络延迟请耐心等待或联系客服。",i.jsx("br",{}),"3. 虚拟商品一经售出,不支持退款,请确认后购买。"]})]}),Ue=()=>i.jsxs("div",{children:[i.jsx("h2",{className:"text-xl font-bold text-gray-800 mb-6",children:"积分记录"}),i.jsx("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:i.jsxs("table",{className:"w-full text-sm text-left",children:[i.jsx("thead",{className:"bg-gray-50 text-gray-500",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-6 py-3 font-medium",children:"时间"}),i.jsx("th",{className:"px-6 py-3 font-medium",children:"行为"}),i.jsx("th",{className:"px-6 py-3 font-medium text-right",children:"变动"}),i.jsx("th",{className:"px-6 py-3 font-medium text-right",children:"余额"})]})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:[{date:"2023-10-24 14:20",action:"生成视频 (Veo)",change:-120,balance:4980},{date:"2023-10-24 10:05",action:"签到奖励",change:50,balance:5100},{date:"2023-10-23 18:30",action:"生成图片 (Nano Banana)",change:-10,balance:5050},{date:"2023-10-22 09:15",action:"充值套餐 (体验包)",change:1e3,balance:5060},{date:"2023-10-21 16:45",action:"邀请好友奖励",change:200,balance:4060}].map((L,me)=>i.jsxs("tr",{className:"hover:bg-gray-50 transition-colors",children:[i.jsx("td",{className:"px-6 py-4 text-gray-600",children:L.date}),i.jsx("td",{className:"px-6 py-4 text-gray-800 font-medium",children:L.action}),i.jsxs("td",{className:`px-6 py-4 text-right font-bold ${L.change>0?"text-green-600":"text-red-500"}`,children:[L.change>0?"+":"",L.change]}),i.jsx("td",{className:"px-6 py-4 text-right text-gray-600",children:L.balance})]},me))})]})})]}),be=()=>{const L=Z==="all"?W0:W0.filter(V=>V.type===Z),me=({type:V,label:P})=>i.jsx("button",{onClick:()=>E(V),className:`px-3 py-1 rounded-full text-xs font-medium transition-colors ${Z===V?"bg-gray-900 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:P});return i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"flex justify-between items-center mb-6",children:[i.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"创作记录"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(me,{type:"all",label:"全部"}),i.jsx(me,{type:C.VIDEO,label:"视频"}),i.jsx(me,{type:C.IMAGE,label:"图片"}),i.jsx(me,{type:C.MUSIC,label:"音乐"})]})]}),i.jsxs("div",{className:"flex-1 overflow-y-auto custom-scrollbar pr-2 space-y-3 pb-6",children:[L.map(V=>i.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-xl border border-gray-100 bg-gray-50 hover:bg-white hover:shadow-md transition-all group",children:[i.jsx("div",{className:"w-20 h-20 flex-shrink-0 bg-gray-200 rounded-lg overflow-hidden relative shadow-sm",children:V.type===C.MUSIC?i.jsxs("div",{className:"w-full h-full flex items-center justify-center bg-gradient-to-br from-purple-100 to-blue-100 relative group/music",children:[i.jsx(li,{className:"text-purple-500",size:24}),p===V.id&&i.jsx("div",{className:"absolute inset-0 bg-black/10 flex items-center justify-center",children:i.jsx("div",{className:"w-2 h-2 bg-purple-600 rounded-full animate-ping"})}),i.jsx("div",{className:"absolute inset-0 bg-black/20 hidden group-hover/music:flex items-center justify-center transition-all cursor-pointer",onClick:()=>se(V.id,V.url),children:p===V.id?i.jsx(Os,{size:24,fill:"white",className:"text-white"}):i.jsx(It,{size:24,fill:"white",className:"text-white"})})]}):V.type===C.VIDEO?i.jsxs("div",{className:"relative w-full h-full group/preview",children:[i.jsx("video",{src:V.url,className:"w-full h-full object-cover",muted:!0}),i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/20 group-hover/preview:bg-black/0 transition-colors",children:i.jsx(It,{size:20,className:"text-white fill-white"})})]}):i.jsx("img",{src:V.url,alt:"thumbnail",className:"w-full h-full object-cover"})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx("h3",{className:"font-bold text-gray-800 truncate",children:V.title}),i.jsx("span",{className:`px-2 py-0.5 rounded text-[10px] font-medium uppercase ${V.type===C.VIDEO?"bg-purple-100 text-purple-600":V.type===C.MUSIC?"bg-blue-100 text-blue-600":"bg-green-100 text-green-600"}`,children:V.type===C.VIDEO?"Video":V.type===C.MUSIC?"Music":"Image"})]}),i.jsxs("div",{className:"text-xs text-gray-500 flex items-center gap-3",children:[i.jsx("span",{children:V.date}),V.duration&&i.jsxs("span",{children:["• ",V.duration]}),V.width&&V.width>0&&i.jsxs("span",{children:["• ",V.width,"x",V.height]})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[V.type===C.MUSIC&&i.jsxs("div",{className:"flex items-center gap-2 mr-2 border-r border-gray-200 pr-2",children:[i.jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 text-gray-500 hover:text-blue-600 transition-colors",title:"查看歌词",children:i.jsx(Ts,{size:16})}),i.jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 text-gray-500 hover:text-blue-600 transition-colors",title:"下载 WAV",children:i.jsx(As,{size:16})}),i.jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 text-gray-500 hover:text-blue-600 transition-colors",title:"下载视频",children:i.jsx(Us,{size:16})}),i.jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 text-gray-500 hover:text-blue-600 transition-colors",title:"分享",children:i.jsx(zs,{size:16})})]}),i.jsx("a",{href:V.url,target:"_blank",rel:"noreferrer",className:"p-2 rounded-full bg-gray-100 text-gray-600 hover:bg-gray-200 transition-colors",title:"打开链接",children:i.jsx(r1,{size:18})}),i.jsx("a",{href:V.url,download:!0,className:"p-2 rounded-full bg-gray-100 text-gray-600 hover:bg-gray-200 transition-colors",title:"下载",children:i.jsx(As,{size:18})})]})]},V.id)),L.length===0&&i.jsxs("div",{className:"flex flex-col items-center justify-center text-gray-400 py-16",children:[i.jsx(K0,{size:32,className:"mb-2 opacity-50"}),i.jsx("p",{className:"text-sm",children:"暂无该类型的创作记录"})]})]})]})},$=()=>i.jsxs("div",{className:"text-center pt-8",children:[i.jsx("div",{className:"w-20 h-20 bg-blue-100 text-blue-600 rounded-full flex items-center justify-center mx-auto mb-6",children:i.jsx(zs,{size:32})}),i.jsx("h2",{className:"text-2xl font-bold text-gray-800 mb-2",children:"邀请好友,共享积分"}),i.jsxs("p",{className:"text-gray-500 mb-8",children:["每邀请一位好友注册,双方各得 ",i.jsx("span",{className:"text-orange-500 font-bold",children:"200"})," 积分奖励"]}),i.jsxs("div",{className:"max-w-sm mx-auto bg-gray-50 border-2 border-dashed border-gray-300 rounded-xl p-6 mb-8",children:[i.jsx("div",{className:"text-sm text-gray-500 mb-2",children:"您的专属邀请码"}),i.jsx("div",{className:"text-3xl font-mono font-bold text-gray-800 tracking-wider mb-4 select-all",children:"AIV888"}),i.jsxs("button",{className:"flex items-center justify-center gap-2 w-full py-2 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 text-sm font-medium transition-colors",children:[i.jsx(a1,{size:14})," 复制链接与邀请码"]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4 max-w-sm mx-auto",children:[i.jsxs("div",{className:"bg-blue-50 rounded-lg p-4",children:[i.jsx("div",{className:"text-2xl font-bold text-blue-600",children:"12"}),i.jsx("div",{className:"text-xs text-blue-400",children:"已邀请人数"})]}),i.jsxs("div",{className:"bg-orange-50 rounded-lg p-4",children:[i.jsx("div",{className:"text-2xl font-bold text-orange-600",children:"2,400"}),i.jsx("div",{className:"text-xs text-orange-400",children:"获得奖励积分"})]})]})]}),ue=()=>{switch(r){case"recharge":return i.jsx(ge,{});case"points":return i.jsx(Ue,{});case"history":return i.jsx(be,{});case"invite":return i.jsx($,{});case"login":case"register":return i.jsx(Se,{});default:return i.jsx(ge,{})}};return i.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm animate-in fade-in duration-200",children:i.jsxs("div",{className:"bg-white w-[900px] h-[600px] rounded-2xl shadow-2xl flex overflow-hidden animate-in zoom-in-95 duration-200 relative",children:[i.jsx("button",{onClick:_,className:"absolute top-4 right-4 p-2 text-gray-400 hover:text-gray-600 rounded-full hover:bg-gray-100 transition-colors z-10",children:i.jsx(Ba,{size:20})}),i.jsxs("div",{className:"w-64 bg-gray-50/80 border-r border-gray-100 p-6 flex flex-col justify-between flex-shrink-0",children:[i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex items-center gap-3 px-2",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-blue-600 flex items-center justify-center text-white font-bold",children:"用"}),i.jsxs("div",{children:[i.jsx("div",{className:"font-bold text-gray-800 text-sm",children:"用户0666"}),i.jsx("div",{className:"text-xs text-gray-400",children:"ID: 8839201"})]})]}),i.jsxs("div",{className:"space-y-1",children:[i.jsx("div",{className:"px-4 pb-2 text-xs font-bold text-gray-400 uppercase tracking-wider",children:"资产"}),i.jsx(R,{page:"recharge",icon:by,label:"充值中心"}),i.jsx(R,{page:"points",icon:u1,label:"积分记录"}),i.jsx("div",{className:"px-4 pb-2 pt-4 text-xs font-bold text-gray-400 uppercase tracking-wider",children:"创作"}),i.jsx(R,{page:"history",icon:K0,label:"创作记录"}),i.jsx(R,{page:"invite",icon:zs,label:"邀请有礼"})]})]}),i.jsx("div",{className:"space-y-1",children:A?i.jsx(R,{page:"login",icon:Uy,label:"退出登录"}):i.jsx(R,{page:"login",icon:ld,label:"登录/注册"})})]}),i.jsx("div",{className:"flex-1 p-8 overflow-y-auto custom-scrollbar relative bg-white flex flex-col",children:ue()})]})})},Uy=d=>i.jsx(ld,{...d,className:"transform rotate-180"}),Cy=({onBack:d})=>{const[_,M]=G.useState("create"),[r,w]=G.useState([{id:"1",name:"@DemoTest",date:"2025-12-17 18:25:15",status:"failed",error:`The upload of the 1 character failed tag:PendingUploadCharacter: Upload may...`}]),[A,k]=G.useState(null),[Z,E]=G.useState(null),[p,Y]=G.useState(""),[D,R]=G.useState(""),[se,Se]=G.useState([0,20]),ge=$=>{var L;const ue=(L=$.target.files)==null?void 0:L[0];ue&&(k(ue),E(URL.createObjectURL(ue)),M("create"))},Ue=()=>{if(!p)return alert("请输入名称");const $={id:Date.now().toString(),name:`@${p}`,date:new Date().toLocaleString(),status:"processing"};w([$,...r]),M("manage"),k(null),E(null),Y(""),R("")},be=$=>{w(r.filter(ue=>ue.id!==$))};return i.jsxs("div",{className:"flex flex-col h-full bg-[#f9fafb] overflow-hidden",children:[i.jsxs("div",{className:"flex items-center justify-between px-8 py-6 flex-shrink-0",children:[i.jsxs("button",{onClick:d,className:"flex items-center gap-1 text-gray-600 hover:text-gray-900 transition-colors font-medium",children:[i.jsx(Ih,{size:20}),"返回视频生成"]}),i.jsxs("div",{className:"flex bg-white rounded-full p-1 shadow-sm border border-gray-100",children:[i.jsxs("button",{onClick:()=>M("create"),className:`flex items-center gap-2 px-6 py-2 rounded-full text-sm font-medium transition-all ${_==="create"?"bg-blue-600 text-white shadow-md":"text-gray-600 hover:bg-gray-50"}`,children:[i.jsx(Rn,{size:16}),"新建数字对象"]}),i.jsxs("button",{onClick:()=>M("manage"),className:`flex items-center gap-2 px-6 py-2 rounded-full text-sm font-medium transition-all ${_==="manage"?"bg-blue-600 text-white shadow-md":"text-gray-600 hover:bg-gray-50"}`,children:[i.jsx(Es,{size:16}),"数字对象管理",r.length>0&&i.jsx("span",{className:`ml-1 text-xs px-1.5 rounded-full ${_==="manage"?"bg-white/20":"bg-gray-200"}`,children:r.length})]})]}),i.jsx("div",{className:"w-24"})]}),i.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar px-8 pb-10",children:i.jsxs("div",{className:"max-w-4xl mx-auto",children:[_==="create"&&i.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-sm border border-gray-100 animate-in fade-in zoom-in-95 duration-300",children:[i.jsxs("div",{className:"flex justify-between items-start mb-6",children:[i.jsxs("div",{className:"flex items-center gap-2 text-xl font-bold text-gray-800",children:[i.jsx(k0,{className:"text-blue-600 fill-blue-600",size:24}),"创建数字对象"]}),i.jsx("div",{className:"px-3 py-1 bg-[#d946ef] text-white text-xs font-bold rounded",children:"创建数字人物"})]}),i.jsxs("p",{className:"text-gray-500 text-sm mb-8 leading-relaxed",children:["上传视频并选取1-3秒的片段来创建您的专属数字对象,视频内不能出现任何包含人物的任何部位,",i.jsx("br",{}),"比如脸部、手部等等"]}),i.jsxs("div",{className:"mb-2 text-sm font-bold text-gray-700",children:["上传视频 ",i.jsx("span",{className:"text-gray-400 font-normal",children:"(仅支持MP4格式,最大50MB)"})]}),Z?i.jsxs("div",{className:"bg-gray-50 rounded-xl p-4 border border-gray-200",children:[i.jsxs("div",{className:"flex items-center justify-between mb-2 text-sm text-gray-500",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(It,{size:14,className:"text-blue-600"}),A==null?void 0:A.name," ",i.jsxs("span",{className:"text-gray-400",children:["(",(A.size/1024/1024).toFixed(2)," MB)"]})]}),i.jsx("button",{onClick:()=>E(null),className:"text-red-500 hover:text-red-600 hover:bg-red-50 p-1 rounded",children:i.jsx($0,{size:16})})]}),i.jsx("div",{className:"aspect-video bg-black rounded-lg overflow-hidden relative mb-4 group",children:i.jsx("video",{src:Z,className:"w-full h-full object-contain",controls:!0})}),i.jsxs("div",{className:"mb-4",children:[i.jsx("div",{className:"flex justify-between text-xs text-gray-500 mb-2",children:i.jsx("span",{children:"选择片段 (创建数字对象需要1-3秒)"})}),i.jsx("div",{className:"h-12 bg-gray-200 rounded overflow-hidden flex mb-2 opacity-60",children:[...Array(10)].map(($,ue)=>i.jsx("div",{className:"flex-1 border-r border-white/20 bg-gray-300"},ue))}),i.jsxs("div",{className:"relative h-6 bg-gray-100 rounded-full",children:[i.jsx("div",{className:"absolute top-1 bottom-1 left-0 bg-blue-600 rounded-full opacity-30 w-1/4"}),i.jsx("div",{className:"absolute top-0 bottom-0 left-0 w-4 h-6 bg-blue-600 rounded-full cursor-ew-resize border-2 border-white shadow-sm"}),i.jsx("div",{className:"absolute top-0 bottom-0 left-[25%] w-4 h-6 bg-blue-600 rounded-full cursor-ew-resize border-2 border-white shadow-sm"})]}),i.jsxs("div",{className:"flex items-center justify-between mt-2 text-xs font-mono text-gray-600",children:[i.jsxs("div",{className:"flex gap-4",children:[i.jsx("span",{children:"开始: 0:00"}),i.jsx("span",{children:"结束: 0:03.0"}),i.jsx("span",{className:"text-green-600 font-bold",children:"时长: 3.0秒"})]}),i.jsxs("button",{className:"flex items-center gap-1 bg-blue-600 text-white px-3 py-1 rounded hover:bg-blue-700",children:[i.jsx(It,{size:12})," 预览片段"]})]})]})]}):i.jsxs("div",{className:"border-2 border-dashed border-gray-300 rounded-xl bg-gray-50 h-64 flex flex-col items-center justify-center text-gray-400 gap-4 hover:border-blue-400 hover:bg-blue-50/30 transition-all cursor-pointer relative group",children:[i.jsx("input",{type:"file",accept:"video/mp4",className:"absolute inset-0 opacity-0 cursor-pointer",onChange:ge}),i.jsx("div",{className:"w-16 h-16 rounded-full bg-white shadow-sm flex items-center justify-center group-hover:scale-110 transition-transform",children:i.jsx(dy,{size:32,className:"text-gray-400 group-hover:text-blue-500"})}),i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"font-bold text-gray-600 mb-1",children:"点击或拖拽上传视频"}),i.jsx("div",{className:"text-xs",children:"支持 MP4 格式,大小不超过 50MB"})]})]}),i.jsxs("div",{className:"mt-8 space-y-6",children:[i.jsxs("div",{children:[i.jsxs("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:["名称 ",i.jsx("span",{className:"text-red-500",children:"*"})," ",i.jsx("span",{className:"text-gray-400 font-normal text-xs",children:"(至少6个英文字母或数字)"})]}),i.jsx("input",{type:"text",value:p,onChange:$=>Y($.target.value),placeholder:"请输入名称,如: MarryJK123",className:"w-full border border-gray-300 rounded-lg px-4 py-3 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition-all text-sm"})]}),i.jsxs("div",{children:[i.jsxs("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:["描述 ",i.jsx("span",{className:"text-gray-400 font-normal text-xs",children:"(选填,最多500字)"})]}),i.jsx("textarea",{value:D,onChange:$=>R($.target.value),placeholder:"描述一下这个数字对象的特点...",className:"w-full border border-gray-300 rounded-lg px-4 py-3 h-32 resize-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition-all text-sm"}),i.jsx("div",{className:"text-right text-xs text-gray-400 mt-1",children:"0/500"})]})]}),i.jsx("div",{className:"mt-8",children:i.jsxs("button",{onClick:Ue,className:"w-full bg-[#8b9cff] hover:bg-blue-600 text-white font-bold py-3.5 rounded-lg transition-colors flex items-center justify-center gap-2 shadow-sm",children:[i.jsx(k0,{size:18,className:"fill-white"}),"创建数字对象"]})})]}),_==="manage"&&i.jsx("div",{className:"animate-in fade-in slide-in-from-right-4 duration-300",children:r.length===0?i.jsxs("div",{className:"flex flex-col items-center justify-center py-20",children:[i.jsx("div",{className:"w-48 h-48 bg-gray-100 rounded-full flex items-center justify-center mb-6 opacity-50",children:i.jsx(Es,{size:64,className:"text-gray-400",strokeWidth:1})}),i.jsx("div",{className:"text-gray-400 text-lg",children:"暂无创作记录"})]}):i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:r.map($=>i.jsxs("div",{className:"bg-white rounded-xl overflow-hidden shadow-sm border border-gray-200 group hover:shadow-md transition-shadow",children:[i.jsxs("div",{className:"aspect-square bg-gray-200 relative",children:[$.status==="failed"?i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100",children:i.jsx(e1,{size:48,className:"text-gray-300"})}):i.jsx("img",{src:`https://picsum.photos/seed/${$.id}/400/400`,className:"w-full h-full object-cover",alt:"preview"}),i.jsxs("div",{className:"absolute top-3 right-3",children:[$.status==="failed"&&i.jsx("span",{className:"bg-red-500 text-white text-xs px-2 py-1 rounded font-bold",children:"失败"}),$.status==="processing"&&i.jsx("span",{className:"bg-blue-500 text-white text-xs px-2 py-1 rounded font-bold animate-pulse",children:"处理中"}),$.status==="completed"&&i.jsx("span",{className:"bg-green-500 text-white text-xs px-2 py-1 rounded font-bold",children:"完成"})]}),i.jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center"})]}),i.jsxs("div",{className:"p-4",children:[i.jsx("h3",{className:"font-bold text-gray-800 text-lg mb-1",children:$.name}),i.jsx("div",{className:"text-xs text-gray-400 mb-3",children:$.date}),$.status==="failed"&&$.error&&i.jsxs("div",{className:"bg-red-50 border border-red-100 rounded p-2 mb-4",children:[i.jsx("div",{className:"text-xs text-red-500 font-bold mb-1",children:"error"}),i.jsx("div",{className:"text-[10px] text-red-400 leading-tight line-clamp-2",children:$.error})]}),i.jsxs("button",{onClick:()=>be($.id),className:"w-full py-2 bg-red-50 text-red-500 rounded-lg text-sm font-medium hover:bg-red-100 transition-colors flex items-center justify-center gap-2",children:[i.jsx($0,{size:16})," 删除"]})]})]},$.id))})})]})})]})},Ms=()=>Array.from({length:Ny}).map((d,_)=>({id:_+1,selected:!1,prompt:"",referenceImage:null,status:zl.IDLE,resultUrl:null,count:1})),wy=()=>{const[d,_]=G.useState(C.VIDEO),[M,r]=G.useState("simple"),[w,A]=G.useState(0),[k,Z]=G.useState(!1),[E,p]=G.useState("recharge"),[Y,D]=G.useState(!1),[R,se]=G.useState({aspectRatio:"9:16",duration:"15s",resolution:"HD",imageModel:"Nano Banana",textModel:"gemini-flash-lite",musicModel:"suno-v3.5"}),[Se,ge]=G.useState({[C.VIDEO]:Ms(),[C.IMAGE]:Ms(),[C.MUSIC]:Ms(),[C.TEXT]:[]}),[Ue,be]=G.useState(!1),$=Se[d]||[],ue=W=>{ge(pe=>({...pe,[d]:W(pe[d])}))};G.useEffect(()=>{D(!1)},[d]),G.useEffect(()=>{(async()=>{await Hn()||setTimeout(()=>Ga(),1e3)})()},[]);const L=G.useCallback((W,pe,te)=>{ue(oe=>oe.map(b=>b.id===W?{...b,[pe]:te}:b))},[d]),me=G.useCallback(W=>{ue(pe=>pe.map(te=>te.id===W?{...te,prompt:"",referenceImage:null,musicStyle:"",musicTitle:"",isInstrumental:!1,status:zl.IDLE,resultUrl:null,error:void 0}:te))},[d]),V=async W=>{const te=Se[d].find(b=>b.id===W);if(!te||!te.prompt)return;if(!await Hn()){await Ga();return}L(W,"status",zl.GENERATING),be(!0);try{let b="";d===C.VIDEO?b=await ad(te.prompt,R,te.referenceImage):d===C.IMAGE?b=await nd(te.prompt,R,te.referenceImage):d===C.MUSIC?b=await ud(te.prompt,te.musicStyle||"",te.isInstrumental||!1,te.musicTitle||""):b="",L(W,"resultUrl",b),L(W,"status",zl.COMPLETED)}catch(b){L(W,"status",zl.FAILED),L(W,"error",b.message||"Unknown error")}finally{be(!1)}},P=async()=>{const pe=Se[d].filter(oe=>oe.selected&&oe.prompt);if(pe.length===0){alert("请选择已输入提示词的行。");return}if(!await Hn()){await Ga();return}be(!0);for(const oe of pe)await V(oe.id);be(!1)},Je=()=>{ue(W=>W.map(pe=>pe.selected?{...pe,prompt:"",referenceImage:null,musicStyle:"",musicTitle:"",isInstrumental:!1,status:zl.IDLE,resultUrl:null,selected:!1}:pe))},al=W=>{ue(pe=>pe.map(te=>({...te,selected:W})))},Ml=()=>{A(W=>W+1)},qe=(W="recharge")=>{p(W),Z(!0)};return i.jsxs("div",{className:"flex w-full h-screen overflow-hidden bg-white text-gray-800 font-sans",children:[i.jsx(Sy,{activeTab:d,setActiveTab:_,onOpenUserModal:qe}),i.jsx("main",{className:"flex-1 flex flex-col h-full overflow-hidden relative",children:Y?i.jsx(Cy,{onBack:()=>D(!1)}):i.jsxs(i.Fragment,{children:[i.jsx(Ey,{config:R,setConfig:se,onBatchGenerate:P,onDelete:Je,generating:Ue,viewMode:M,setViewMode:r,activeTab:d,onNewChat:Ml,onOpenDigitalManager:()=>D(!0)}),i.jsx("div",{className:"flex-1 min-h-0 relative flex flex-col",children:d===C.TEXT?i.jsx(Oy,{config:R},w):i.jsx(i.Fragment,{children:M==="efficiency"?i.jsxs(i.Fragment,{children:[i.jsx(_y,{}),i.jsxs("div",{className:"flex items-center h-10 bg-gray-50 border-b border-gray-200 text-xs font-bold text-gray-600 flex-shrink-0",children:[i.jsx("div",{className:"w-12 flex justify-center border-r border-gray-200",children:i.jsx("input",{type:"checkbox",onChange:W=>al(W.target.checked),className:"w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500"})}),i.jsx("div",{className:"w-12 flex justify-center border-r border-gray-200",children:"#"}),d===C.MUSIC?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex-1 px-4 border-r border-gray-200",children:"歌词描述"}),i.jsx("div",{className:"w-32 px-2 border-r border-gray-200",children:"风格"}),i.jsx("div",{className:"w-32 px-2 border-r border-gray-200",children:"标题"}),i.jsx("div",{className:"w-16 text-center border-r border-gray-200",children:"模式"})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex-1 px-4 border-r border-gray-200",children:"提示词"}),i.jsx("div",{className:"w-32 text-center border-r border-gray-200",children:"参考图"})]}),i.jsx("div",{className:"w-24 text-center px-2 border-r border-gray-200",children:"状态"}),i.jsx("div",{className:"w-20 text-center border-r border-gray-200",children:"数量"}),i.jsx("div",{className:"w-28 text-center",children:"操作"})]}),i.jsxs("div",{className:"flex-1 overflow-y-auto custom-scrollbar pb-20",children:[$.map(W=>i.jsx(Ay,{task:W,activeTab:d,onChange:L,onGenerate:V,onClear:me},W.id)),i.jsx("div",{className:"h-10"})]})]}):i.jsx(Ty,{config:R,setConfig:se,activeTab:d},d)})})]})}),i.jsx(Dy,{isOpen:k,onClose:()=>Z(!1),initialPage:E})]})},id=document.getElementById("root");if(!id)throw new Error("Could not find root element to mount to");const Hy=Yh.createRoot(id);Hy.render(i.jsx(Uh.StrictMode,{children:i.jsx(wy,{})}));