Files
soul-yongping/soul-admin/dist/assets/index-CbOmKBRd.js

455 lines
489 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function $v(r,a){for(var l=0;l<a.length;l++){const i=a[l];if(typeof i!="string"&&!Array.isArray(i)){for(const c in i)if(c!=="default"&&!(c in r)){const d=Object.getOwnPropertyDescriptor(i,c);d&&Object.defineProperty(r,c,d.get?d:{enumerable:!0,get:()=>i[c]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&i(f)}).observe(document,{childList:!0,subtree:!0});function l(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function i(c){if(c.ep)return;c.ep=!0;const d=l(c);fetch(c.href,d)}})();function Km(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Pc={exports:{}},Ca={},Rc={exports:{}},Oe={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Fh;function Bv(){if(Fh)return Oe;Fh=1;var r=Symbol.for("react.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;function E(L){return L===null||typeof L!="object"?null:(L=y&&L[y]||L["@@iterator"],typeof L=="function"?L:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,b={};function j(L,B,le){this.props=L,this.context=B,this.refs=b,this.updater=le||k}j.prototype.isReactComponent={},j.prototype.setState=function(L,B){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,B,"setState")},j.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function N(){}N.prototype=j.prototype;function R(L,B,le){this.props=L,this.context=B,this.refs=b,this.updater=le||k}var S=R.prototype=new N;S.constructor=R,C(S,j.prototype),S.isPureReactComponent=!0;var A=Array.isArray,V=Object.prototype.hasOwnProperty,Q={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function U(L,B,le){var Z,be={},je=null,ne=null;if(B!=null)for(Z in B.ref!==void 0&&(ne=B.ref),B.key!==void 0&&(je=""+B.key),B)V.call(B,Z)&&!G.hasOwnProperty(Z)&&(be[Z]=B[Z]);var me=arguments.length-2;if(me===1)be.children=le;else if(1<me){for(var Ee=Array(me),Se=0;Se<me;Se++)Ee[Se]=arguments[Se+2];be.children=Ee}if(L&&L.defaultProps)for(Z in me=L.defaultProps,me)be[Z]===void 0&&(be[Z]=me[Z]);return{$$typeof:r,type:L,key:je,ref:ne,props:be,_owner:Q.current}}function ie(L,B){return{$$typeof:r,type:L.type,key:B,ref:L.ref,props:L.props,_owner:L._owner}}function fe(L){return typeof L=="object"&&L!==null&&L.$$typeof===r}function oe(L){var B={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(le){return B[le]})}var H=/\/+/g;function P(L,B){return typeof L=="object"&&L!==null&&L.key!=null?oe(""+L.key):B.toString(36)}function K(L,B,le,Z,be){var je=typeof L;(je==="undefined"||je==="boolean")&&(L=null);var ne=!1;if(L===null)ne=!0;else switch(je){case"string":case"number":ne=!0;break;case"object":switch(L.$$typeof){case r:case a:ne=!0}}if(ne)return ne=L,be=be(ne),L=Z===""?"."+P(ne,0):Z,A(be)?(le="",L!=null&&(le=L.replace(H,"$&/")+"/"),K(be,B,le,"",function(Se){return Se})):be!=null&&(fe(be)&&(be=ie(be,le+(!be.key||ne&&ne.key===be.key?"":(""+be.key).replace(H,"$&/")+"/")+L)),B.push(be)),1;if(ne=0,Z=Z===""?".":Z+":",A(L))for(var me=0;me<L.length;me++){je=L[me];var Ee=Z+P(je,me);ne+=K(je,B,le,Ee,be)}else if(Ee=E(L),typeof Ee=="function")for(L=Ee.call(L),me=0;!(je=L.next()).done;)je=je.value,Ee=Z+P(je,me++),ne+=K(je,B,le,Ee,be);else if(je==="object")throw B=String(L),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.");return ne}function re(L,B,le){if(L==null)return L;var Z=[],be=0;return K(L,Z,"","",function(je){return B.call(le,je,be++)}),Z}function W(L){if(L._status===-1){var B=L._result;B=B(),B.then(function(le){(L._status===0||L._status===-1)&&(L._status=1,L._result=le)},function(le){(L._status===0||L._status===-1)&&(L._status=2,L._result=le)}),L._status===-1&&(L._status=0,L._result=B)}if(L._status===1)return L._result.default;throw L._result}var $={current:null},T={transition:null},J={ReactCurrentDispatcher:$,ReactCurrentBatchConfig:T,ReactCurrentOwner:Q};function X(){throw Error("act(...) is not supported in production builds of React.")}return Oe.Children={map:re,forEach:function(L,B,le){re(L,function(){B.apply(this,arguments)},le)},count:function(L){var B=0;return re(L,function(){B++}),B},toArray:function(L){return re(L,function(B){return B})||[]},only:function(L){if(!fe(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},Oe.Component=j,Oe.Fragment=l,Oe.Profiler=c,Oe.PureComponent=R,Oe.StrictMode=i,Oe.Suspense=x,Oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,Oe.act=X,Oe.cloneElement=function(L,B,le){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var Z=C({},L.props),be=L.key,je=L.ref,ne=L._owner;if(B!=null){if(B.ref!==void 0&&(je=B.ref,ne=Q.current),B.key!==void 0&&(be=""+B.key),L.type&&L.type.defaultProps)var me=L.type.defaultProps;for(Ee in B)V.call(B,Ee)&&!G.hasOwnProperty(Ee)&&(Z[Ee]=B[Ee]===void 0&&me!==void 0?me[Ee]:B[Ee])}var Ee=arguments.length-2;if(Ee===1)Z.children=le;else if(1<Ee){me=Array(Ee);for(var Se=0;Se<Ee;Se++)me[Se]=arguments[Se+2];Z.children=me}return{$$typeof:r,type:L.type,key:be,ref:je,props:Z,_owner:ne}},Oe.createContext=function(L){return L={$$typeof:f,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:d,_context:L},L.Consumer=L},Oe.createElement=U,Oe.createFactory=function(L){var B=U.bind(null,L);return B.type=L,B},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(L){return{$$typeof:m,render:L}},Oe.isValidElement=fe,Oe.lazy=function(L){return{$$typeof:v,_payload:{_status:-1,_result:L},_init:W}},Oe.memo=function(L,B){return{$$typeof:g,type:L,compare:B===void 0?null:B}},Oe.startTransition=function(L){var B=T.transition;T.transition={};try{L()}finally{T.transition=B}},Oe.unstable_act=X,Oe.useCallback=function(L,B){return $.current.useCallback(L,B)},Oe.useContext=function(L){return $.current.useContext(L)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(L){return $.current.useDeferredValue(L)},Oe.useEffect=function(L,B){return $.current.useEffect(L,B)},Oe.useId=function(){return $.current.useId()},Oe.useImperativeHandle=function(L,B,le){return $.current.useImperativeHandle(L,B,le)},Oe.useInsertionEffect=function(L,B){return $.current.useInsertionEffect(L,B)},Oe.useLayoutEffect=function(L,B){return $.current.useLayoutEffect(L,B)},Oe.useMemo=function(L,B){return $.current.useMemo(L,B)},Oe.useReducer=function(L,B,le){return $.current.useReducer(L,B,le)},Oe.useRef=function(L){return $.current.useRef(L)},Oe.useState=function(L){return $.current.useState(L)},Oe.useSyncExternalStore=function(L,B,le){return $.current.useSyncExternalStore(L,B,le)},Oe.useTransition=function(){return $.current.useTransition()},Oe.version="18.3.1",Oe}var zh;function yu(){return zh||(zh=1,Rc.exports=Bv()),Rc.exports}/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var $h;function Uv(){if($h)return Ca;$h=1;var r=yu(),a=Symbol.for("react.element"),l=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function f(m,x,g){var v,y={},E=null,k=null;g!==void 0&&(E=""+g),x.key!==void 0&&(E=""+x.key),x.ref!==void 0&&(k=x.ref);for(v in x)i.call(x,v)&&!d.hasOwnProperty(v)&&(y[v]=x[v]);if(m&&m.defaultProps)for(v in x=m.defaultProps,x)y[v]===void 0&&(y[v]=x[v]);return{$$typeof:a,type:m,key:E,ref:k,props:y,_owner:c.current}}return Ca.Fragment=l,Ca.jsx=f,Ca.jsxs=f,Ca}var Bh;function Vv(){return Bh||(Bh=1,Pc.exports=Uv()),Pc.exports}var n=Vv(),p=yu();const pr=Km(p),yo=$v({__proto__:null,default:pr},[p]);var Wl={},_c={exports:{}},zt={},Tc={exports:{}},Ic={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Uh;function Wv(){return Uh||(Uh=1,(function(r){function a(T,J){var X=T.length;T.push(J);e:for(;0<X;){var L=X-1>>>1,B=T[L];if(0<c(B,J))T[L]=J,T[X]=B,X=L;else break e}}function l(T){return T.length===0?null:T[0]}function i(T){if(T.length===0)return null;var J=T[0],X=T.pop();if(X!==J){T[0]=X;e:for(var L=0,B=T.length,le=B>>>1;L<le;){var Z=2*(L+1)-1,be=T[Z],je=Z+1,ne=T[je];if(0>c(be,X))je<B&&0>c(ne,be)?(T[L]=ne,T[je]=X,L=je):(T[L]=be,T[Z]=X,L=Z);else if(je<B&&0>c(ne,X))T[L]=ne,T[je]=X,L=je;else break e}}return J}function c(T,J){var X=T.sortIndex-J.sortIndex;return X!==0?X:T.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;r.unstable_now=function(){return d.now()}}else{var f=Date,m=f.now();r.unstable_now=function(){return f.now()-m}}var x=[],g=[],v=1,y=null,E=3,k=!1,C=!1,b=!1,j=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(T){for(var J=l(g);J!==null;){if(J.callback===null)i(g);else if(J.startTime<=T)i(g),J.sortIndex=J.expirationTime,a(x,J);else break;J=l(g)}}function A(T){if(b=!1,S(T),!C)if(l(x)!==null)C=!0,W(V);else{var J=l(g);J!==null&&$(A,J.startTime-T)}}function V(T,J){C=!1,b&&(b=!1,N(U),U=-1),k=!0;var X=E;try{for(S(J),y=l(x);y!==null&&(!(y.expirationTime>J)||T&&!oe());){var L=y.callback;if(typeof L=="function"){y.callback=null,E=y.priorityLevel;var B=L(y.expirationTime<=J);J=r.unstable_now(),typeof B=="function"?y.callback=B:y===l(x)&&i(x),S(J)}else i(x);y=l(x)}if(y!==null)var le=!0;else{var Z=l(g);Z!==null&&$(A,Z.startTime-J),le=!1}return le}finally{y=null,E=X,k=!1}}var Q=!1,G=null,U=-1,ie=5,fe=-1;function oe(){return!(r.unstable_now()-fe<ie)}function H(){if(G!==null){var T=r.unstable_now();fe=T;var J=!0;try{J=G(!0,T)}finally{J?P():(Q=!1,G=null)}}else Q=!1}var P;if(typeof R=="function")P=function(){R(H)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,re=K.port2;K.port1.onmessage=H,P=function(){re.postMessage(null)}}else P=function(){j(H,0)};function W(T){G=T,Q||(Q=!0,P())}function $(T,J){U=j(function(){T(r.unstable_now())},J)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(T){T.callback=null},r.unstable_continueExecution=function(){C||k||(C=!0,W(V))},r.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ie=0<T?Math.floor(1e3/T):5},r.unstable_getCurrentPriorityLevel=function(){return E},r.unstable_getFirstCallbackNode=function(){return l(x)},r.unstable_next=function(T){switch(E){case 1:case 2:case 3:var J=3;break;default:J=E}var X=E;E=J;try{return T()}finally{E=X}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(T,J){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var X=E;E=T;try{return J()}finally{E=X}},r.unstable_scheduleCallback=function(T,J,X){var L=r.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?L+X:L):X=L,T){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=X+B,T={id:v++,callback:J,priorityLevel:T,startTime:X,expirationTime:B,sortIndex:-1},X>L?(T.sortIndex=X,a(g,T),l(x)===null&&T===l(g)&&(b?(N(U),U=-1):b=!0,$(A,X-L))):(T.sortIndex=B,a(x,T),C||k||(C=!0,W(V))),T},r.unstable_shouldYield=oe,r.unstable_wrapCallback=function(T){var J=E;return function(){var X=E;E=J;try{return T.apply(this,arguments)}finally{E=X}}}})(Ic)),Ic}var Vh;function Hv(){return Vh||(Vh=1,Tc.exports=Wv()),Tc.exports}/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Wh;function Kv(){if(Wh)return zt;Wh=1;var r=yu(),a=Hv();function l(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,c={};function d(e,t){f(e,t),f(e+"Capture",t)}function f(e,t){for(c[e]=t,e=0;e<t.length;e++)i.add(t[e])}var m=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),x=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},y={};function E(e){return x.call(y,e)?!0:x.call(v,e)?!1:g.test(e)?y[e]=!0:(v[e]=!0,!1)}function k(e,t,s,o){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function C(e,t,s,o){if(t===null||typeof t>"u"||k(e,t,s,o))return!0;if(o)return!1;if(s!==null)switch(s.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function b(e,t,s,o,u,h,w){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=u,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=h,this.removeEmptyString=w}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){j[e]=new b(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];j[t]=new b(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){j[e]=new b(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){j[e]=new b(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){j[e]=new b(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){j[e]=new b(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){j[e]=new b(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){j[e]=new b(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){j[e]=new b(e,5,!1,e.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function R(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(N,R);j[t]=new b(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(N,R);j[t]=new b(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(N,R);j[t]=new b(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){j[e]=new b(e,1,!1,e.toLowerCase(),null,!1,!1)}),j.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){j[e]=new b(e,1,!1,e.toLowerCase(),null,!0,!0)});function S(e,t,s,o){var u=j.hasOwnProperty(t)?j[t]:null;(u!==null?u.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(C(t,s,u,o)&&(s=null),o||u===null?E(t)&&(s===null?e.removeAttribute(t):e.setAttribute(t,""+s)):u.mustUseProperty?e[u.propertyName]=s===null?u.type===3?!1:"":s:(t=u.attributeName,o=u.attributeNamespace,s===null?e.removeAttribute(t):(u=u.type,s=u===3||u===4&&s===!0?"":""+s,o?e.setAttributeNS(o,t,s):e.setAttribute(t,s))))}var A=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,V=Symbol.for("react.element"),Q=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),ie=Symbol.for("react.profiler"),fe=Symbol.for("react.provider"),oe=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),re=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),$=Symbol.for("react.offscreen"),T=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=T&&e[T]||e["@@iterator"],typeof e=="function"?e:null)}var X=Object.assign,L;function B(e){if(L===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);L=t&&t[1]||""}return`
`+L+e}var le=!1;function Z(e,t){if(!e||le)return"";le=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(F){var o=F}Reflect.construct(e,[],t)}else{try{t.call()}catch(F){o=F}e.call(t.prototype)}else{try{throw Error()}catch(F){o=F}e()}}catch(F){if(F&&o&&typeof F.stack=="string"){for(var u=F.stack.split(`
`),h=o.stack.split(`
`),w=u.length-1,_=h.length-1;1<=w&&0<=_&&u[w]!==h[_];)_--;for(;1<=w&&0<=_;w--,_--)if(u[w]!==h[_]){if(w!==1||_!==1)do if(w--,_--,0>_||u[w]!==h[_]){var I=`
`+u[w].replace(" at new "," at ");return e.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",e.displayName)),I}while(1<=w&&0<=_);break}}}finally{le=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?B(e):""}function be(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=Z(e.type,!1),e;case 11:return e=Z(e.type.render,!1),e;case 1:return e=Z(e.type,!0),e;default:return""}}function je(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case Q:return"Portal";case ie:return"Profiler";case U:return"StrictMode";case P:return"Suspense";case K:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oe:return(e.displayName||"Context")+".Consumer";case fe:return(e._context.displayName||"Context")+".Provider";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case re:return t=e.displayName||null,t!==null?t:je(e.type)||"Memo";case W:t=e._payload,e=e._init;try{return je(e(t))}catch{}}return null}function ne(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return je(t);case 8:return t===U?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function me(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Se(e){var t=Ee(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var u=s.get,h=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(w){o=""+w,h.call(this,w)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(w){o=""+w},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Te(e){e._valueTracker||(e._valueTracker=Se(e))}function Ae(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),o="";return e&&(o=Ee(e)?e.checked?"true":"false":e.value),e=o,e!==s?(t.setValue(e),!0):!1}function nt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ut(e,t){var s=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function $t(e,t){var s=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;s=me(t.value!=null?t.value:s),e._wrapperState={initialChecked:o,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Bt(e,t){t=t.checked,t!=null&&S(e,"checked",t,!1)}function At(e,t){Bt(e,t);var s=me(t.value),o=t.type;if(s!=null)o==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Me(e,t.type,s):t.hasOwnProperty("defaultValue")&&Me(e,t.type,me(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Y(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,s||t===e.value||(e.value=t),e.defaultValue=t}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function Me(e,t,s){(t!=="number"||nt(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var ze=Array.isArray;function St(e,t,s,o){if(e=e.options,t){t={};for(var u=0;u<s.length;u++)t["$"+s[u]]=!0;for(s=0;s<e.length;s++)u=t.hasOwnProperty("$"+e[s].value),e[s].selected!==u&&(e[s].selected=u),u&&o&&(e[s].defaultSelected=!0)}else{for(s=""+me(s),t=null,u=0;u<e.length;u++){if(e[u].value===s){e[u].selected=!0,o&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Qn(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(l(91));return X({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function z(e,t){var s=t.value;if(s==null){if(s=t.children,t=t.defaultValue,s!=null){if(t!=null)throw Error(l(92));if(ze(s)){if(1<s.length)throw Error(l(93));s=s[0]}t=s}t==null&&(t=""),s=t}e._wrapperState={initialValue:me(s)}}function de(e,t){var s=me(t.value),o=me(t.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),t.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),o!=null&&(e.defaultValue=""+o)}function lt(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ue(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ut(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ue(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tn,ft=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,s,o,u){MSApp.execUnsafeLocalFunction(function(){return e(t,s,o,u)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Tn=Tn||document.createElement("div"),Tn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xn(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var Us={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Wg=["Webkit","ms","Moz","O"];Object.keys(Us).forEach(function(e){Wg.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Us[t]=Us[e]})});function Ju(e,t,s){return t==null||typeof t=="boolean"||t===""?"":s||typeof t!="number"||t===0||Us.hasOwnProperty(e)&&Us[e]?(""+t).trim():t+"px"}function Zu(e,t){e=e.style;for(var s in t)if(t.hasOwnProperty(s)){var o=s.indexOf("--")===0,u=Ju(s,t[s],o);s==="float"&&(s="cssFloat"),o?e.setProperty(s,u):e[s]=u}}var Hg=X({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function $o(e,t){if(t){if(Hg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(l(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(l(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(l(61))}if(t.style!=null&&typeof t.style!="object")throw Error(l(62))}}function Bo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Uo=null;function Vo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wo=null,qr=null,Jr=null;function ed(e){if(e=ua(e)){if(typeof Wo!="function")throw Error(l(280));var t=e.stateNode;t&&(t=al(t),Wo(e.stateNode,e.type,t))}}function td(e){qr?Jr?Jr.push(e):Jr=[e]:qr=e}function nd(){if(qr){var e=qr,t=Jr;if(Jr=qr=null,ed(e),t)for(e=0;e<t.length;e++)ed(t[e])}}function rd(e,t){return e(t)}function sd(){}var Ho=!1;function ad(e,t,s){if(Ho)return e(t,s);Ho=!0;try{return rd(e,t,s)}finally{Ho=!1,(qr!==null||Jr!==null)&&(sd(),nd())}}function Vs(e,t){var s=e.stateNode;if(s===null)return null;var o=al(s);if(o===null)return null;s=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(l(231,t,typeof s));return s}var Ko=!1;if(m)try{var Ws={};Object.defineProperty(Ws,"passive",{get:function(){Ko=!0}}),window.addEventListener("test",Ws,Ws),window.removeEventListener("test",Ws,Ws)}catch{Ko=!1}function Kg(e,t,s,o,u,h,w,_,I){var F=Array.prototype.slice.call(arguments,3);try{t.apply(s,F)}catch(ee){this.onError(ee)}}var Hs=!1,Oa=null,Fa=!1,Go=null,Gg={onError:function(e){Hs=!0,Oa=e}};function Qg(e,t,s,o,u,h,w,_,I){Hs=!1,Oa=null,Kg.apply(Gg,arguments)}function Yg(e,t,s,o,u,h,w,_,I){if(Qg.apply(this,arguments),Hs){if(Hs){var F=Oa;Hs=!1,Oa=null}else throw Error(l(198));Fa||(Fa=!0,Go=F)}}function Pr(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function ld(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function od(e){if(Pr(e)!==e)throw Error(l(188))}function Xg(e){var t=e.alternate;if(!t){if(t=Pr(e),t===null)throw Error(l(188));return t!==e?null:e}for(var s=e,o=t;;){var u=s.return;if(u===null)break;var h=u.alternate;if(h===null){if(o=u.return,o!==null){s=o;continue}break}if(u.child===h.child){for(h=u.child;h;){if(h===s)return od(u),e;if(h===o)return od(u),t;h=h.sibling}throw Error(l(188))}if(s.return!==o.return)s=u,o=h;else{for(var w=!1,_=u.child;_;){if(_===s){w=!0,s=u,o=h;break}if(_===o){w=!0,o=u,s=h;break}_=_.sibling}if(!w){for(_=h.child;_;){if(_===s){w=!0,s=h,o=u;break}if(_===o){w=!0,o=h,s=u;break}_=_.sibling}if(!w)throw Error(l(189))}}if(s.alternate!==o)throw Error(l(190))}if(s.tag!==3)throw Error(l(188));return s.stateNode.current===s?e:t}function id(e){return e=Xg(e),e!==null?cd(e):null}function cd(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=cd(e);if(t!==null)return t;e=e.sibling}return null}var ud=a.unstable_scheduleCallback,dd=a.unstable_cancelCallback,qg=a.unstable_shouldYield,Jg=a.unstable_requestPaint,ot=a.unstable_now,Zg=a.unstable_getCurrentPriorityLevel,Qo=a.unstable_ImmediatePriority,fd=a.unstable_UserBlockingPriority,za=a.unstable_NormalPriority,e0=a.unstable_LowPriority,hd=a.unstable_IdlePriority,$a=null,gn=null;function t0(e){if(gn&&typeof gn.onCommitFiberRoot=="function")try{gn.onCommitFiberRoot($a,e,void 0,(e.current.flags&128)===128)}catch{}}var rn=Math.clz32?Math.clz32:s0,n0=Math.log,r0=Math.LN2;function s0(e){return e>>>=0,e===0?32:31-(n0(e)/r0|0)|0}var Ba=64,Ua=4194304;function Ks(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Va(e,t){var s=e.pendingLanes;if(s===0)return 0;var o=0,u=e.suspendedLanes,h=e.pingedLanes,w=s&268435455;if(w!==0){var _=w&~u;_!==0?o=Ks(_):(h&=w,h!==0&&(o=Ks(h)))}else w=s&~u,w!==0?o=Ks(w):h!==0&&(o=Ks(h));if(o===0)return 0;if(t!==0&&t!==o&&(t&u)===0&&(u=o&-o,h=t&-t,u>=h||u===16&&(h&4194240)!==0))return t;if((o&4)!==0&&(o|=s&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)s=31-rn(t),u=1<<s,o|=e[s],t&=~u;return o}function a0(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function l0(e,t){for(var s=e.suspendedLanes,o=e.pingedLanes,u=e.expirationTimes,h=e.pendingLanes;0<h;){var w=31-rn(h),_=1<<w,I=u[w];I===-1?((_&s)===0||(_&o)!==0)&&(u[w]=a0(_,t)):I<=t&&(e.expiredLanes|=_),h&=~_}}function Yo(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function md(){var e=Ba;return Ba<<=1,(Ba&4194240)===0&&(Ba=64),e}function Xo(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function Gs(e,t,s){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-rn(t),e[t]=s}function o0(e,t){var s=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<s;){var u=31-rn(s),h=1<<u;t[u]=0,o[u]=-1,e[u]=-1,s&=~h}}function qo(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var o=31-rn(s),u=1<<o;u&t|e[o]&t&&(e[o]|=t),s&=~u}}var Ke=0;function pd(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var xd,Jo,gd,vd,yd,Zo=!1,Wa=[],Yn=null,Xn=null,qn=null,Qs=new Map,Ys=new Map,Jn=[],i0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function wd(e,t){switch(e){case"focusin":case"focusout":Yn=null;break;case"dragenter":case"dragleave":Xn=null;break;case"mouseover":case"mouseout":qn=null;break;case"pointerover":case"pointerout":Qs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ys.delete(t.pointerId)}}function Xs(e,t,s,o,u,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:s,eventSystemFlags:o,nativeEvent:h,targetContainers:[u]},t!==null&&(t=ua(t),t!==null&&Jo(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function c0(e,t,s,o,u){switch(t){case"focusin":return Yn=Xs(Yn,e,t,s,o,u),!0;case"dragenter":return Xn=Xs(Xn,e,t,s,o,u),!0;case"mouseover":return qn=Xs(qn,e,t,s,o,u),!0;case"pointerover":var h=u.pointerId;return Qs.set(h,Xs(Qs.get(h)||null,e,t,s,o,u)),!0;case"gotpointercapture":return h=u.pointerId,Ys.set(h,Xs(Ys.get(h)||null,e,t,s,o,u)),!0}return!1}function Nd(e){var t=Rr(e.target);if(t!==null){var s=Pr(t);if(s!==null){if(t=s.tag,t===13){if(t=ld(s),t!==null){e.blockedOn=t,yd(e.priority,function(){gd(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ha(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=ti(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var o=new s.constructor(s.type,s);Uo=o,s.target.dispatchEvent(o),Uo=null}else return t=ua(s),t!==null&&Jo(t),e.blockedOn=s,!1;t.shift()}return!0}function jd(e,t,s){Ha(e)&&s.delete(t)}function u0(){Zo=!1,Yn!==null&&Ha(Yn)&&(Yn=null),Xn!==null&&Ha(Xn)&&(Xn=null),qn!==null&&Ha(qn)&&(qn=null),Qs.forEach(jd),Ys.forEach(jd)}function qs(e,t){e.blockedOn===t&&(e.blockedOn=null,Zo||(Zo=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,u0)))}function Js(e){function t(u){return qs(u,e)}if(0<Wa.length){qs(Wa[0],e);for(var s=1;s<Wa.length;s++){var o=Wa[s];o.blockedOn===e&&(o.blockedOn=null)}}for(Yn!==null&&qs(Yn,e),Xn!==null&&qs(Xn,e),qn!==null&&qs(qn,e),Qs.forEach(t),Ys.forEach(t),s=0;s<Jn.length;s++)o=Jn[s],o.blockedOn===e&&(o.blockedOn=null);for(;0<Jn.length&&(s=Jn[0],s.blockedOn===null);)Nd(s),s.blockedOn===null&&Jn.shift()}var Zr=A.ReactCurrentBatchConfig,Ka=!0;function d0(e,t,s,o){var u=Ke,h=Zr.transition;Zr.transition=null;try{Ke=1,ei(e,t,s,o)}finally{Ke=u,Zr.transition=h}}function f0(e,t,s,o){var u=Ke,h=Zr.transition;Zr.transition=null;try{Ke=4,ei(e,t,s,o)}finally{Ke=u,Zr.transition=h}}function ei(e,t,s,o){if(Ka){var u=ti(e,t,s,o);if(u===null)vi(e,t,o,Ga,s),wd(e,o);else if(c0(u,e,t,s,o))o.stopPropagation();else if(wd(e,o),t&4&&-1<i0.indexOf(e)){for(;u!==null;){var h=ua(u);if(h!==null&&xd(h),h=ti(e,t,s,o),h===null&&vi(e,t,o,Ga,s),h===u)break;u=h}u!==null&&o.stopPropagation()}else vi(e,t,o,null,s)}}var Ga=null;function ti(e,t,s,o){if(Ga=null,e=Vo(o),e=Rr(e),e!==null)if(t=Pr(e),t===null)e=null;else if(s=t.tag,s===13){if(e=ld(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ga=e,null}function bd(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Zg()){case Qo:return 1;case fd:return 4;case za:case e0:return 16;case hd:return 536870912;default:return 16}default:return 16}}var Zn=null,ni=null,Qa=null;function Sd(){if(Qa)return Qa;var e,t=ni,s=t.length,o,u="value"in Zn?Zn.value:Zn.textContent,h=u.length;for(e=0;e<s&&t[e]===u[e];e++);var w=s-e;for(o=1;o<=w&&t[s-o]===u[h-o];o++);return Qa=u.slice(e,1<o?1-o:void 0)}function Ya(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Xa(){return!0}function Cd(){return!1}function Vt(e){function t(s,o,u,h,w){this._reactName=s,this._targetInst=u,this.type=o,this.nativeEvent=h,this.target=w,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(s=e[_],this[_]=s?s(h):h[_]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Xa:Cd,this.isPropagationStopped=Cd,this}return X(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Xa)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Xa)},persist:function(){},isPersistent:Xa}),t}var es={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ri=Vt(es),Zs=X({},es,{view:0,detail:0}),h0=Vt(Zs),si,ai,ea,qa=X({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oi,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ea&&(ea&&e.type==="mousemove"?(si=e.screenX-ea.screenX,ai=e.screenY-ea.screenY):ai=si=0,ea=e),si)},movementY:function(e){return"movementY"in e?e.movementY:ai}}),kd=Vt(qa),m0=X({},qa,{dataTransfer:0}),p0=Vt(m0),x0=X({},Zs,{relatedTarget:0}),li=Vt(x0),g0=X({},es,{animationName:0,elapsedTime:0,pseudoElement:0}),v0=Vt(g0),y0=X({},es,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),w0=Vt(y0),N0=X({},es,{data:0}),Ed=Vt(N0),j0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},b0={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},S0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function C0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=S0[e])?!!t[e]:!1}function oi(){return C0}var k0=X({},Zs,{key:function(e){if(e.key){var t=j0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ya(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?b0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oi,charCode:function(e){return e.type==="keypress"?Ya(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ya(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),E0=Vt(k0),P0=X({},qa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pd=Vt(P0),R0=X({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oi}),_0=Vt(R0),T0=X({},es,{propertyName:0,elapsedTime:0,pseudoElement:0}),I0=Vt(T0),A0=X({},qa,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),M0=Vt(A0),L0=[9,13,27,32],ii=m&&"CompositionEvent"in window,ta=null;m&&"documentMode"in document&&(ta=document.documentMode);var D0=m&&"TextEvent"in window&&!ta,Rd=m&&(!ii||ta&&8<ta&&11>=ta),_d=" ",Td=!1;function Id(e,t){switch(e){case"keyup":return L0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ad(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ts=!1;function O0(e,t){switch(e){case"compositionend":return Ad(t);case"keypress":return t.which!==32?null:(Td=!0,_d);case"textInput":return e=t.data,e===_d&&Td?null:e;default:return null}}function F0(e,t){if(ts)return e==="compositionend"||!ii&&Id(e,t)?(e=Sd(),Qa=ni=Zn=null,ts=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Rd&&t.locale!=="ko"?null:t.data;default:return null}}var z0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Md(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!z0[e.type]:t==="textarea"}function Ld(e,t,s,o){td(o),t=nl(t,"onChange"),0<t.length&&(s=new ri("onChange","change",null,s,o),e.push({event:s,listeners:t}))}var na=null,ra=null;function $0(e){Zd(e,0)}function Ja(e){var t=ls(e);if(Ae(t))return e}function B0(e,t){if(e==="change")return t}var Dd=!1;if(m){var ci;if(m){var ui="oninput"in document;if(!ui){var Od=document.createElement("div");Od.setAttribute("oninput","return;"),ui=typeof Od.oninput=="function"}ci=ui}else ci=!1;Dd=ci&&(!document.documentMode||9<document.documentMode)}function Fd(){na&&(na.detachEvent("onpropertychange",zd),ra=na=null)}function zd(e){if(e.propertyName==="value"&&Ja(ra)){var t=[];Ld(t,ra,e,Vo(e)),ad($0,t)}}function U0(e,t,s){e==="focusin"?(Fd(),na=t,ra=s,na.attachEvent("onpropertychange",zd)):e==="focusout"&&Fd()}function V0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ja(ra)}function W0(e,t){if(e==="click")return Ja(t)}function H0(e,t){if(e==="input"||e==="change")return Ja(t)}function K0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var sn=typeof Object.is=="function"?Object.is:K0;function sa(e,t){if(sn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),o=Object.keys(t);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var u=s[o];if(!x.call(t,u)||!sn(e[u],t[u]))return!1}return!0}function $d(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Bd(e,t){var s=$d(e);e=0;for(var o;s;){if(s.nodeType===3){if(o=e+s.textContent.length,e<=t&&o>=t)return{node:s,offset:t-e};e=o}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=$d(s)}}function Ud(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ud(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vd(){for(var e=window,t=nt();t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=nt(e.document)}return t}function di(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function G0(e){var t=Vd(),s=e.focusedElem,o=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&Ud(s.ownerDocument.documentElement,s)){if(o!==null&&di(s)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in s)s.selectionStart=t,s.selectionEnd=Math.min(e,s.value.length);else if(e=(t=s.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var u=s.textContent.length,h=Math.min(o.start,u);o=o.end===void 0?h:Math.min(o.end,u),!e.extend&&h>o&&(u=o,o=h,h=u),u=Bd(s,h);var w=Bd(s,o);u&&w&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==w.node||e.focusOffset!==w.offset)&&(t=t.createRange(),t.setStart(u.node,u.offset),e.removeAllRanges(),h>o?(e.addRange(t),e.extend(w.node,w.offset)):(t.setEnd(w.node,w.offset),e.addRange(t)))}}for(t=[],e=s;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<t.length;s++)e=t[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Q0=m&&"documentMode"in document&&11>=document.documentMode,ns=null,fi=null,aa=null,hi=!1;function Wd(e,t,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;hi||ns==null||ns!==nt(o)||(o=ns,"selectionStart"in o&&di(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),aa&&sa(aa,o)||(aa=o,o=nl(fi,"onSelect"),0<o.length&&(t=new ri("onSelect","select",null,t,s),e.push({event:t,listeners:o}),t.target=ns)))}function Za(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var rs={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionend:Za("Transition","TransitionEnd")},mi={},Hd={};m&&(Hd=document.createElement("div").style,"AnimationEvent"in window||(delete rs.animationend.animation,delete rs.animationiteration.animation,delete rs.animationstart.animation),"TransitionEvent"in window||delete rs.transitionend.transition);function el(e){if(mi[e])return mi[e];if(!rs[e])return e;var t=rs[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in Hd)return mi[e]=t[s];return e}var Kd=el("animationend"),Gd=el("animationiteration"),Qd=el("animationstart"),Yd=el("transitionend"),Xd=new Map,qd="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function er(e,t){Xd.set(e,t),d(t,[e])}for(var pi=0;pi<qd.length;pi++){var xi=qd[pi],Y0=xi.toLowerCase(),X0=xi[0].toUpperCase()+xi.slice(1);er(Y0,"on"+X0)}er(Kd,"onAnimationEnd"),er(Gd,"onAnimationIteration"),er(Qd,"onAnimationStart"),er("dblclick","onDoubleClick"),er("focusin","onFocus"),er("focusout","onBlur"),er(Yd,"onTransitionEnd"),f("onMouseEnter",["mouseout","mouseover"]),f("onMouseLeave",["mouseout","mouseover"]),f("onPointerEnter",["pointerout","pointerover"]),f("onPointerLeave",["pointerout","pointerover"]),d("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),d("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),d("onBeforeInput",["compositionend","keypress","textInput","paste"]),d("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var la="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),q0=new Set("cancel close invalid load scroll toggle".split(" ").concat(la));function Jd(e,t,s){var o=e.type||"unknown-event";e.currentTarget=s,Yg(o,t,void 0,e),e.currentTarget=null}function Zd(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var o=e[s],u=o.event;o=o.listeners;e:{var h=void 0;if(t)for(var w=o.length-1;0<=w;w--){var _=o[w],I=_.instance,F=_.currentTarget;if(_=_.listener,I!==h&&u.isPropagationStopped())break e;Jd(u,_,F),h=I}else for(w=0;w<o.length;w++){if(_=o[w],I=_.instance,F=_.currentTarget,_=_.listener,I!==h&&u.isPropagationStopped())break e;Jd(u,_,F),h=I}}}if(Fa)throw e=Go,Fa=!1,Go=null,e}function qe(e,t){var s=t[Si];s===void 0&&(s=t[Si]=new Set);var o=e+"__bubble";s.has(o)||(ef(t,e,2,!1),s.add(o))}function gi(e,t,s){var o=0;t&&(o|=4),ef(s,e,o,t)}var tl="_reactListening"+Math.random().toString(36).slice(2);function oa(e){if(!e[tl]){e[tl]=!0,i.forEach(function(s){s!=="selectionchange"&&(q0.has(s)||gi(s,!1,e),gi(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[tl]||(t[tl]=!0,gi("selectionchange",!1,t))}}function ef(e,t,s,o){switch(bd(t)){case 1:var u=d0;break;case 4:u=f0;break;default:u=ei}s=u.bind(null,t,s,e),u=void 0,!Ko||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),o?u!==void 0?e.addEventListener(t,s,{capture:!0,passive:u}):e.addEventListener(t,s,!0):u!==void 0?e.addEventListener(t,s,{passive:u}):e.addEventListener(t,s,!1)}function vi(e,t,s,o,u){var h=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var w=o.tag;if(w===3||w===4){var _=o.stateNode.containerInfo;if(_===u||_.nodeType===8&&_.parentNode===u)break;if(w===4)for(w=o.return;w!==null;){var I=w.tag;if((I===3||I===4)&&(I=w.stateNode.containerInfo,I===u||I.nodeType===8&&I.parentNode===u))return;w=w.return}for(;_!==null;){if(w=Rr(_),w===null)return;if(I=w.tag,I===5||I===6){o=h=w;continue e}_=_.parentNode}}o=o.return}ad(function(){var F=h,ee=Vo(s),te=[];e:{var q=Xd.get(e);if(q!==void 0){var ce=ri,xe=e;switch(e){case"keypress":if(Ya(s)===0)break e;case"keydown":case"keyup":ce=E0;break;case"focusin":xe="focus",ce=li;break;case"focusout":xe="blur",ce=li;break;case"beforeblur":case"afterblur":ce=li;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=kd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=p0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=_0;break;case Kd:case Gd:case Qd:ce=v0;break;case Yd:ce=I0;break;case"scroll":ce=h0;break;case"wheel":ce=M0;break;case"copy":case"cut":case"paste":ce=w0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=Pd}var ye=(t&4)!==0,it=!ye&&e==="scroll",D=ye?q!==null?q+"Capture":null:q;ye=[];for(var M=F,O;M!==null;){O=M;var se=O.stateNode;if(O.tag===5&&se!==null&&(O=se,D!==null&&(se=Vs(M,D),se!=null&&ye.push(ia(M,se,O)))),it)break;M=M.return}0<ye.length&&(q=new ce(q,xe,null,s,ee),te.push({event:q,listeners:ye}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",ce=e==="mouseout"||e==="pointerout",q&&s!==Uo&&(xe=s.relatedTarget||s.fromElement)&&(Rr(xe)||xe[In]))break e;if((ce||q)&&(q=ee.window===ee?ee:(q=ee.ownerDocument)?q.defaultView||q.parentWindow:window,ce?(xe=s.relatedTarget||s.toElement,ce=F,xe=xe?Rr(xe):null,xe!==null&&(it=Pr(xe),xe!==it||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(ce=null,xe=F),ce!==xe)){if(ye=kd,se="onMouseLeave",D="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(ye=Pd,se="onPointerLeave",D="onPointerEnter",M="pointer"),it=ce==null?q:ls(ce),O=xe==null?q:ls(xe),q=new ye(se,M+"leave",ce,s,ee),q.target=it,q.relatedTarget=O,se=null,Rr(ee)===F&&(ye=new ye(D,M+"enter",xe,s,ee),ye.target=O,ye.relatedTarget=it,se=ye),it=se,ce&&xe)t:{for(ye=ce,D=xe,M=0,O=ye;O;O=ss(O))M++;for(O=0,se=D;se;se=ss(se))O++;for(;0<M-O;)ye=ss(ye),M--;for(;0<O-M;)D=ss(D),O--;for(;M--;){if(ye===D||D!==null&&ye===D.alternate)break t;ye=ss(ye),D=ss(D)}ye=null}else ye=null;ce!==null&&tf(te,q,ce,ye,!1),xe!==null&&it!==null&&tf(te,it,xe,ye,!0)}}e:{if(q=F?ls(F):window,ce=q.nodeName&&q.nodeName.toLowerCase(),ce==="select"||ce==="input"&&q.type==="file")var Ne=B0;else if(Md(q))if(Dd)Ne=H0;else{Ne=V0;var Ce=U0}else(ce=q.nodeName)&&ce.toLowerCase()==="input"&&(q.type==="checkbox"||q.type==="radio")&&(Ne=W0);if(Ne&&(Ne=Ne(e,F))){Ld(te,Ne,s,ee);break e}Ce&&Ce(e,q,F),e==="focusout"&&(Ce=q._wrapperState)&&Ce.controlled&&q.type==="number"&&Me(q,"number",q.value)}switch(Ce=F?ls(F):window,e){case"focusin":(Md(Ce)||Ce.contentEditable==="true")&&(ns=Ce,fi=F,aa=null);break;case"focusout":aa=fi=ns=null;break;case"mousedown":hi=!0;break;case"contextmenu":case"mouseup":case"dragend":hi=!1,Wd(te,s,ee);break;case"selectionchange":if(Q0)break;case"keydown":case"keyup":Wd(te,s,ee)}var ke;if(ii)e:{switch(e){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else ts?Id(e,s)&&(Pe="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Pe="onCompositionStart");Pe&&(Rd&&s.locale!=="ko"&&(ts||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&ts&&(ke=Sd()):(Zn=ee,ni="value"in Zn?Zn.value:Zn.textContent,ts=!0)),Ce=nl(F,Pe),0<Ce.length&&(Pe=new Ed(Pe,e,null,s,ee),te.push({event:Pe,listeners:Ce}),ke?Pe.data=ke:(ke=Ad(s),ke!==null&&(Pe.data=ke)))),(ke=D0?O0(e,s):F0(e,s))&&(F=nl(F,"onBeforeInput"),0<F.length&&(ee=new Ed("onBeforeInput","beforeinput",null,s,ee),te.push({event:ee,listeners:F}),ee.data=ke))}Zd(te,t)})}function ia(e,t,s){return{instance:e,listener:t,currentTarget:s}}function nl(e,t){for(var s=t+"Capture",o=[];e!==null;){var u=e,h=u.stateNode;u.tag===5&&h!==null&&(u=h,h=Vs(e,s),h!=null&&o.unshift(ia(e,h,u)),h=Vs(e,t),h!=null&&o.push(ia(e,h,u))),e=e.return}return o}function ss(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function tf(e,t,s,o,u){for(var h=t._reactName,w=[];s!==null&&s!==o;){var _=s,I=_.alternate,F=_.stateNode;if(I!==null&&I===o)break;_.tag===5&&F!==null&&(_=F,u?(I=Vs(s,h),I!=null&&w.unshift(ia(s,I,_))):u||(I=Vs(s,h),I!=null&&w.push(ia(s,I,_)))),s=s.return}w.length!==0&&e.push({event:t,listeners:w})}var J0=/\r\n?/g,Z0=/\u0000|\uFFFD/g;function nf(e){return(typeof e=="string"?e:""+e).replace(J0,`
`).replace(Z0,"")}function rl(e,t,s){if(t=nf(t),nf(e)!==t&&s)throw Error(l(425))}function sl(){}var yi=null,wi=null;function Ni(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ji=typeof setTimeout=="function"?setTimeout:void 0,ev=typeof clearTimeout=="function"?clearTimeout:void 0,rf=typeof Promise=="function"?Promise:void 0,tv=typeof queueMicrotask=="function"?queueMicrotask:typeof rf<"u"?function(e){return rf.resolve(null).then(e).catch(nv)}:ji;function nv(e){setTimeout(function(){throw e})}function bi(e,t){var s=t,o=0;do{var u=s.nextSibling;if(e.removeChild(s),u&&u.nodeType===8)if(s=u.data,s==="/$"){if(o===0){e.removeChild(u),Js(t);return}o--}else s!=="$"&&s!=="$?"&&s!=="$!"||o++;s=u}while(s);Js(t)}function tr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function sf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(t===0)return e;t--}else s==="/$"&&t++}e=e.previousSibling}return null}var as=Math.random().toString(36).slice(2),vn="__reactFiber$"+as,ca="__reactProps$"+as,In="__reactContainer$"+as,Si="__reactEvents$"+as,rv="__reactListeners$"+as,sv="__reactHandles$"+as;function Rr(e){var t=e[vn];if(t)return t;for(var s=e.parentNode;s;){if(t=s[In]||s[vn]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=sf(e);e!==null;){if(s=e[vn])return s;e=sf(e)}return t}e=s,s=e.parentNode}return null}function ua(e){return e=e[vn]||e[In],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ls(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(l(33))}function al(e){return e[ca]||null}var Ci=[],os=-1;function nr(e){return{current:e}}function Je(e){0>os||(e.current=Ci[os],Ci[os]=null,os--)}function Qe(e,t){os++,Ci[os]=e.current,e.current=t}var rr={},Ct=nr(rr),Mt=nr(!1),_r=rr;function is(e,t){var s=e.type.contextTypes;if(!s)return rr;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var u={},h;for(h in s)u[h]=t[h];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=u),u}function Lt(e){return e=e.childContextTypes,e!=null}function ll(){Je(Mt),Je(Ct)}function af(e,t,s){if(Ct.current!==rr)throw Error(l(168));Qe(Ct,t),Qe(Mt,s)}function lf(e,t,s){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return s;o=o.getChildContext();for(var u in o)if(!(u in t))throw Error(l(108,ne(e)||"Unknown",u));return X({},s,o)}function ol(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rr,_r=Ct.current,Qe(Ct,e),Qe(Mt,Mt.current),!0}function of(e,t,s){var o=e.stateNode;if(!o)throw Error(l(169));s?(e=lf(e,t,_r),o.__reactInternalMemoizedMergedChildContext=e,Je(Mt),Je(Ct),Qe(Ct,e)):Je(Mt),Qe(Mt,s)}var An=null,il=!1,ki=!1;function cf(e){An===null?An=[e]:An.push(e)}function av(e){il=!0,cf(e)}function sr(){if(!ki&&An!==null){ki=!0;var e=0,t=Ke;try{var s=An;for(Ke=1;e<s.length;e++){var o=s[e];do o=o(!0);while(o!==null)}An=null,il=!1}catch(u){throw An!==null&&(An=An.slice(e+1)),ud(Qo,sr),u}finally{Ke=t,ki=!1}}return null}var cs=[],us=0,cl=null,ul=0,Yt=[],Xt=0,Tr=null,Mn=1,Ln="";function Ir(e,t){cs[us++]=ul,cs[us++]=cl,cl=e,ul=t}function uf(e,t,s){Yt[Xt++]=Mn,Yt[Xt++]=Ln,Yt[Xt++]=Tr,Tr=e;var o=Mn;e=Ln;var u=32-rn(o)-1;o&=~(1<<u),s+=1;var h=32-rn(t)+u;if(30<h){var w=u-u%5;h=(o&(1<<w)-1).toString(32),o>>=w,u-=w,Mn=1<<32-rn(t)+u|s<<u|o,Ln=h+e}else Mn=1<<h|s<<u|o,Ln=e}function Ei(e){e.return!==null&&(Ir(e,1),uf(e,1,0))}function Pi(e){for(;e===cl;)cl=cs[--us],cs[us]=null,ul=cs[--us],cs[us]=null;for(;e===Tr;)Tr=Yt[--Xt],Yt[Xt]=null,Ln=Yt[--Xt],Yt[Xt]=null,Mn=Yt[--Xt],Yt[Xt]=null}var Wt=null,Ht=null,Ze=!1,an=null;function df(e,t){var s=en(5,null,null,0);s.elementType="DELETED",s.stateNode=t,s.return=e,t=e.deletions,t===null?(e.deletions=[s],e.flags|=16):t.push(s)}function ff(e,t){switch(e.tag){case 5:var s=e.type;return t=t.nodeType!==1||s.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Wt=e,Ht=tr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Wt=e,Ht=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(s=Tr!==null?{id:Mn,overflow:Ln}:null,e.memoizedState={dehydrated:t,treeContext:s,retryLane:1073741824},s=en(18,null,null,0),s.stateNode=t,s.return=e,e.child=s,Wt=e,Ht=null,!0):!1;default:return!1}}function Ri(e){return(e.mode&1)!==0&&(e.flags&128)===0}function _i(e){if(Ze){var t=Ht;if(t){var s=t;if(!ff(e,t)){if(Ri(e))throw Error(l(418));t=tr(s.nextSibling);var o=Wt;t&&ff(e,t)?df(o,s):(e.flags=e.flags&-4097|2,Ze=!1,Wt=e)}}else{if(Ri(e))throw Error(l(418));e.flags=e.flags&-4097|2,Ze=!1,Wt=e}}}function hf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function dl(e){if(e!==Wt)return!1;if(!Ze)return hf(e),Ze=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ni(e.type,e.memoizedProps)),t&&(t=Ht)){if(Ri(e))throw mf(),Error(l(418));for(;t;)df(e,t),t=tr(t.nextSibling)}if(hf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(t===0){Ht=tr(e.nextSibling);break e}t--}else s!=="$"&&s!=="$!"&&s!=="$?"||t++}e=e.nextSibling}Ht=null}}else Ht=Wt?tr(e.stateNode.nextSibling):null;return!0}function mf(){for(var e=Ht;e;)e=tr(e.nextSibling)}function ds(){Ht=Wt=null,Ze=!1}function Ti(e){an===null?an=[e]:an.push(e)}var lv=A.ReactCurrentBatchConfig;function da(e,t,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(l(309));var o=s.stateNode}if(!o)throw Error(l(147,e));var u=o,h=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===h?t.ref:(t=function(w){var _=u.refs;w===null?delete _[h]:_[h]=w},t._stringRef=h,t)}if(typeof e!="string")throw Error(l(284));if(!s._owner)throw Error(l(290,e))}return e}function fl(e,t){throw e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function pf(e){var t=e._init;return t(e._payload)}function xf(e){function t(D,M){if(e){var O=D.deletions;O===null?(D.deletions=[M],D.flags|=16):O.push(M)}}function s(D,M){if(!e)return null;for(;M!==null;)t(D,M),M=M.sibling;return null}function o(D,M){for(D=new Map;M!==null;)M.key!==null?D.set(M.key,M):D.set(M.index,M),M=M.sibling;return D}function u(D,M){return D=fr(D,M),D.index=0,D.sibling=null,D}function h(D,M,O){return D.index=O,e?(O=D.alternate,O!==null?(O=O.index,O<M?(D.flags|=2,M):O):(D.flags|=2,M)):(D.flags|=1048576,M)}function w(D){return e&&D.alternate===null&&(D.flags|=2),D}function _(D,M,O,se){return M===null||M.tag!==6?(M=jc(O,D.mode,se),M.return=D,M):(M=u(M,O),M.return=D,M)}function I(D,M,O,se){var Ne=O.type;return Ne===G?ee(D,M,O.props.children,se,O.key):M!==null&&(M.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===W&&pf(Ne)===M.type)?(se=u(M,O.props),se.ref=da(D,M,O),se.return=D,se):(se=Dl(O.type,O.key,O.props,null,D.mode,se),se.ref=da(D,M,O),se.return=D,se)}function F(D,M,O,se){return M===null||M.tag!==4||M.stateNode.containerInfo!==O.containerInfo||M.stateNode.implementation!==O.implementation?(M=bc(O,D.mode,se),M.return=D,M):(M=u(M,O.children||[]),M.return=D,M)}function ee(D,M,O,se,Ne){return M===null||M.tag!==7?(M=$r(O,D.mode,se,Ne),M.return=D,M):(M=u(M,O),M.return=D,M)}function te(D,M,O){if(typeof M=="string"&&M!==""||typeof M=="number")return M=jc(""+M,D.mode,O),M.return=D,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case V:return O=Dl(M.type,M.key,M.props,null,D.mode,O),O.ref=da(D,null,M),O.return=D,O;case Q:return M=bc(M,D.mode,O),M.return=D,M;case W:var se=M._init;return te(D,se(M._payload),O)}if(ze(M)||J(M))return M=$r(M,D.mode,O,null),M.return=D,M;fl(D,M)}return null}function q(D,M,O,se){var Ne=M!==null?M.key:null;if(typeof O=="string"&&O!==""||typeof O=="number")return Ne!==null?null:_(D,M,""+O,se);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case V:return O.key===Ne?I(D,M,O,se):null;case Q:return O.key===Ne?F(D,M,O,se):null;case W:return Ne=O._init,q(D,M,Ne(O._payload),se)}if(ze(O)||J(O))return Ne!==null?null:ee(D,M,O,se,null);fl(D,O)}return null}function ce(D,M,O,se,Ne){if(typeof se=="string"&&se!==""||typeof se=="number")return D=D.get(O)||null,_(M,D,""+se,Ne);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case V:return D=D.get(se.key===null?O:se.key)||null,I(M,D,se,Ne);case Q:return D=D.get(se.key===null?O:se.key)||null,F(M,D,se,Ne);case W:var Ce=se._init;return ce(D,M,O,Ce(se._payload),Ne)}if(ze(se)||J(se))return D=D.get(O)||null,ee(M,D,se,Ne,null);fl(M,se)}return null}function xe(D,M,O,se){for(var Ne=null,Ce=null,ke=M,Pe=M=0,wt=null;ke!==null&&Pe<O.length;Pe++){ke.index>Pe?(wt=ke,ke=null):wt=ke.sibling;var Be=q(D,ke,O[Pe],se);if(Be===null){ke===null&&(ke=wt);break}e&&ke&&Be.alternate===null&&t(D,ke),M=h(Be,M,Pe),Ce===null?Ne=Be:Ce.sibling=Be,Ce=Be,ke=wt}if(Pe===O.length)return s(D,ke),Ze&&Ir(D,Pe),Ne;if(ke===null){for(;Pe<O.length;Pe++)ke=te(D,O[Pe],se),ke!==null&&(M=h(ke,M,Pe),Ce===null?Ne=ke:Ce.sibling=ke,Ce=ke);return Ze&&Ir(D,Pe),Ne}for(ke=o(D,ke);Pe<O.length;Pe++)wt=ce(ke,D,Pe,O[Pe],se),wt!==null&&(e&&wt.alternate!==null&&ke.delete(wt.key===null?Pe:wt.key),M=h(wt,M,Pe),Ce===null?Ne=wt:Ce.sibling=wt,Ce=wt);return e&&ke.forEach(function(hr){return t(D,hr)}),Ze&&Ir(D,Pe),Ne}function ye(D,M,O,se){var Ne=J(O);if(typeof Ne!="function")throw Error(l(150));if(O=Ne.call(O),O==null)throw Error(l(151));for(var Ce=Ne=null,ke=M,Pe=M=0,wt=null,Be=O.next();ke!==null&&!Be.done;Pe++,Be=O.next()){ke.index>Pe?(wt=ke,ke=null):wt=ke.sibling;var hr=q(D,ke,Be.value,se);if(hr===null){ke===null&&(ke=wt);break}e&&ke&&hr.alternate===null&&t(D,ke),M=h(hr,M,Pe),Ce===null?Ne=hr:Ce.sibling=hr,Ce=hr,ke=wt}if(Be.done)return s(D,ke),Ze&&Ir(D,Pe),Ne;if(ke===null){for(;!Be.done;Pe++,Be=O.next())Be=te(D,Be.value,se),Be!==null&&(M=h(Be,M,Pe),Ce===null?Ne=Be:Ce.sibling=Be,Ce=Be);return Ze&&Ir(D,Pe),Ne}for(ke=o(D,ke);!Be.done;Pe++,Be=O.next())Be=ce(ke,D,Pe,Be.value,se),Be!==null&&(e&&Be.alternate!==null&&ke.delete(Be.key===null?Pe:Be.key),M=h(Be,M,Pe),Ce===null?Ne=Be:Ce.sibling=Be,Ce=Be);return e&&ke.forEach(function(zv){return t(D,zv)}),Ze&&Ir(D,Pe),Ne}function it(D,M,O,se){if(typeof O=="object"&&O!==null&&O.type===G&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case V:e:{for(var Ne=O.key,Ce=M;Ce!==null;){if(Ce.key===Ne){if(Ne=O.type,Ne===G){if(Ce.tag===7){s(D,Ce.sibling),M=u(Ce,O.props.children),M.return=D,D=M;break e}}else if(Ce.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===W&&pf(Ne)===Ce.type){s(D,Ce.sibling),M=u(Ce,O.props),M.ref=da(D,Ce,O),M.return=D,D=M;break e}s(D,Ce);break}else t(D,Ce);Ce=Ce.sibling}O.type===G?(M=$r(O.props.children,D.mode,se,O.key),M.return=D,D=M):(se=Dl(O.type,O.key,O.props,null,D.mode,se),se.ref=da(D,M,O),se.return=D,D=se)}return w(D);case Q:e:{for(Ce=O.key;M!==null;){if(M.key===Ce)if(M.tag===4&&M.stateNode.containerInfo===O.containerInfo&&M.stateNode.implementation===O.implementation){s(D,M.sibling),M=u(M,O.children||[]),M.return=D,D=M;break e}else{s(D,M);break}else t(D,M);M=M.sibling}M=bc(O,D.mode,se),M.return=D,D=M}return w(D);case W:return Ce=O._init,it(D,M,Ce(O._payload),se)}if(ze(O))return xe(D,M,O,se);if(J(O))return ye(D,M,O,se);fl(D,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,M!==null&&M.tag===6?(s(D,M.sibling),M=u(M,O),M.return=D,D=M):(s(D,M),M=jc(O,D.mode,se),M.return=D,D=M),w(D)):s(D,M)}return it}var fs=xf(!0),gf=xf(!1),hl=nr(null),ml=null,hs=null,Ii=null;function Ai(){Ii=hs=ml=null}function Mi(e){var t=hl.current;Je(hl),e._currentValue=t}function Li(e,t,s){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===s)break;e=e.return}}function ms(e,t){ml=e,Ii=hs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Dt=!0),e.firstContext=null)}function qt(e){var t=e._currentValue;if(Ii!==e)if(e={context:e,memoizedValue:t,next:null},hs===null){if(ml===null)throw Error(l(308));hs=e,ml.dependencies={lanes:0,firstContext:e}}else hs=hs.next=e;return t}var Ar=null;function Di(e){Ar===null?Ar=[e]:Ar.push(e)}function vf(e,t,s,o){var u=t.interleaved;return u===null?(s.next=s,Di(t)):(s.next=u.next,u.next=s),t.interleaved=s,Dn(e,o)}function Dn(e,t){e.lanes|=t;var s=e.alternate;for(s!==null&&(s.lanes|=t),s=e,e=e.return;e!==null;)e.childLanes|=t,s=e.alternate,s!==null&&(s.childLanes|=t),s=e,e=e.return;return s.tag===3?s.stateNode:null}var ar=!1;function Oi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function yf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function On(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function lr(e,t,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,($e&2)!==0){var u=o.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),o.pending=t,Dn(e,s)}return u=o.interleaved,u===null?(t.next=t,Di(o)):(t.next=u.next,u.next=t),o.interleaved=t,Dn(e,s)}function pl(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,qo(e,s)}}function wf(e,t){var s=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var u=null,h=null;if(s=s.firstBaseUpdate,s!==null){do{var w={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};h===null?u=h=w:h=h.next=w,s=s.next}while(s!==null);h===null?u=h=t:h=h.next=t}else u=h=t;s={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:h,shared:o.shared,effects:o.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function xl(e,t,s,o){var u=e.updateQueue;ar=!1;var h=u.firstBaseUpdate,w=u.lastBaseUpdate,_=u.shared.pending;if(_!==null){u.shared.pending=null;var I=_,F=I.next;I.next=null,w===null?h=F:w.next=F,w=I;var ee=e.alternate;ee!==null&&(ee=ee.updateQueue,_=ee.lastBaseUpdate,_!==w&&(_===null?ee.firstBaseUpdate=F:_.next=F,ee.lastBaseUpdate=I))}if(h!==null){var te=u.baseState;w=0,ee=F=I=null,_=h;do{var q=_.lane,ce=_.eventTime;if((o&q)===q){ee!==null&&(ee=ee.next={eventTime:ce,lane:0,tag:_.tag,payload:_.payload,callback:_.callback,next:null});e:{var xe=e,ye=_;switch(q=t,ce=s,ye.tag){case 1:if(xe=ye.payload,typeof xe=="function"){te=xe.call(ce,te,q);break e}te=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=ye.payload,q=typeof xe=="function"?xe.call(ce,te,q):xe,q==null)break e;te=X({},te,q);break e;case 2:ar=!0}}_.callback!==null&&_.lane!==0&&(e.flags|=64,q=u.effects,q===null?u.effects=[_]:q.push(_))}else ce={eventTime:ce,lane:q,tag:_.tag,payload:_.payload,callback:_.callback,next:null},ee===null?(F=ee=ce,I=te):ee=ee.next=ce,w|=q;if(_=_.next,_===null){if(_=u.shared.pending,_===null)break;q=_,_=q.next,q.next=null,u.lastBaseUpdate=q,u.shared.pending=null}}while(!0);if(ee===null&&(I=te),u.baseState=I,u.firstBaseUpdate=F,u.lastBaseUpdate=ee,t=u.shared.interleaved,t!==null){u=t;do w|=u.lane,u=u.next;while(u!==t)}else h===null&&(u.shared.lanes=0);Dr|=w,e.lanes=w,e.memoizedState=te}}function Nf(e,t,s){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],u=o.callback;if(u!==null){if(o.callback=null,o=s,typeof u!="function")throw Error(l(191,u));u.call(o)}}}var fa={},yn=nr(fa),ha=nr(fa),ma=nr(fa);function Mr(e){if(e===fa)throw Error(l(174));return e}function Fi(e,t){switch(Qe(ma,t),Qe(ha,e),Qe(yn,fa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ut(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ut(t,e)}Je(yn),Qe(yn,t)}function ps(){Je(yn),Je(ha),Je(ma)}function jf(e){Mr(ma.current);var t=Mr(yn.current),s=Ut(t,e.type);t!==s&&(Qe(ha,e),Qe(yn,s))}function zi(e){ha.current===e&&(Je(yn),Je(ha))}var rt=nr(0);function gl(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $i=[];function Bi(){for(var e=0;e<$i.length;e++)$i[e]._workInProgressVersionPrimary=null;$i.length=0}var vl=A.ReactCurrentDispatcher,Ui=A.ReactCurrentBatchConfig,Lr=0,st=null,ht=null,vt=null,yl=!1,pa=!1,xa=0,ov=0;function kt(){throw Error(l(321))}function Vi(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!sn(e[s],t[s]))return!1;return!0}function Wi(e,t,s,o,u,h){if(Lr=h,st=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,vl.current=e===null||e.memoizedState===null?dv:fv,e=s(o,u),pa){h=0;do{if(pa=!1,xa=0,25<=h)throw Error(l(301));h+=1,vt=ht=null,t.updateQueue=null,vl.current=hv,e=s(o,u)}while(pa)}if(vl.current=jl,t=ht!==null&&ht.next!==null,Lr=0,vt=ht=st=null,yl=!1,t)throw Error(l(300));return e}function Hi(){var e=xa!==0;return xa=0,e}function wn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vt===null?st.memoizedState=vt=e:vt=vt.next=e,vt}function Jt(){if(ht===null){var e=st.alternate;e=e!==null?e.memoizedState:null}else e=ht.next;var t=vt===null?st.memoizedState:vt.next;if(t!==null)vt=t,ht=e;else{if(e===null)throw Error(l(310));ht=e,e={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},vt===null?st.memoizedState=vt=e:vt=vt.next=e}return vt}function ga(e,t){return typeof t=="function"?t(e):t}function Ki(e){var t=Jt(),s=t.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=e;var o=ht,u=o.baseQueue,h=s.pending;if(h!==null){if(u!==null){var w=u.next;u.next=h.next,h.next=w}o.baseQueue=u=h,s.pending=null}if(u!==null){h=u.next,o=o.baseState;var _=w=null,I=null,F=h;do{var ee=F.lane;if((Lr&ee)===ee)I!==null&&(I=I.next={lane:0,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),o=F.hasEagerState?F.eagerState:e(o,F.action);else{var te={lane:ee,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null};I===null?(_=I=te,w=o):I=I.next=te,st.lanes|=ee,Dr|=ee}F=F.next}while(F!==null&&F!==h);I===null?w=o:I.next=_,sn(o,t.memoizedState)||(Dt=!0),t.memoizedState=o,t.baseState=w,t.baseQueue=I,s.lastRenderedState=o}if(e=s.interleaved,e!==null){u=e;do h=u.lane,st.lanes|=h,Dr|=h,u=u.next;while(u!==e)}else u===null&&(s.lanes=0);return[t.memoizedState,s.dispatch]}function Gi(e){var t=Jt(),s=t.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=e;var o=s.dispatch,u=s.pending,h=t.memoizedState;if(u!==null){s.pending=null;var w=u=u.next;do h=e(h,w.action),w=w.next;while(w!==u);sn(h,t.memoizedState)||(Dt=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),s.lastRenderedState=h}return[h,o]}function bf(){}function Sf(e,t){var s=st,o=Jt(),u=t(),h=!sn(o.memoizedState,u);if(h&&(o.memoizedState=u,Dt=!0),o=o.queue,Qi(Ef.bind(null,s,o,e),[e]),o.getSnapshot!==t||h||vt!==null&&vt.memoizedState.tag&1){if(s.flags|=2048,va(9,kf.bind(null,s,o,u,t),void 0,null),yt===null)throw Error(l(349));(Lr&30)!==0||Cf(s,t,u)}return u}function Cf(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=st.updateQueue,t===null?(t={lastEffect:null,stores:null},st.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function kf(e,t,s,o){t.value=s,t.getSnapshot=o,Pf(t)&&Rf(e)}function Ef(e,t,s){return s(function(){Pf(t)&&Rf(e)})}function Pf(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!sn(e,s)}catch{return!0}}function Rf(e){var t=Dn(e,1);t!==null&&un(t,e,1,-1)}function _f(e){var t=wn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:e},t.queue=e,e=e.dispatch=uv.bind(null,st,e),[t.memoizedState,e]}function va(e,t,s,o){return e={tag:e,create:t,destroy:s,deps:o,next:null},t=st.updateQueue,t===null?(t={lastEffect:null,stores:null},st.updateQueue=t,t.lastEffect=e.next=e):(s=t.lastEffect,s===null?t.lastEffect=e.next=e:(o=s.next,s.next=e,e.next=o,t.lastEffect=e)),e}function Tf(){return Jt().memoizedState}function wl(e,t,s,o){var u=wn();st.flags|=e,u.memoizedState=va(1|t,s,void 0,o===void 0?null:o)}function Nl(e,t,s,o){var u=Jt();o=o===void 0?null:o;var h=void 0;if(ht!==null){var w=ht.memoizedState;if(h=w.destroy,o!==null&&Vi(o,w.deps)){u.memoizedState=va(t,s,h,o);return}}st.flags|=e,u.memoizedState=va(1|t,s,h,o)}function If(e,t){return wl(8390656,8,e,t)}function Qi(e,t){return Nl(2048,8,e,t)}function Af(e,t){return Nl(4,2,e,t)}function Mf(e,t){return Nl(4,4,e,t)}function Lf(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Df(e,t,s){return s=s!=null?s.concat([e]):null,Nl(4,4,Lf.bind(null,t,e),s)}function Yi(){}function Of(e,t){var s=Jt();t=t===void 0?null:t;var o=s.memoizedState;return o!==null&&t!==null&&Vi(t,o[1])?o[0]:(s.memoizedState=[e,t],e)}function Ff(e,t){var s=Jt();t=t===void 0?null:t;var o=s.memoizedState;return o!==null&&t!==null&&Vi(t,o[1])?o[0]:(e=e(),s.memoizedState=[e,t],e)}function zf(e,t,s){return(Lr&21)===0?(e.baseState&&(e.baseState=!1,Dt=!0),e.memoizedState=s):(sn(s,t)||(s=md(),st.lanes|=s,Dr|=s,e.baseState=!0),t)}function iv(e,t){var s=Ke;Ke=s!==0&&4>s?s:4,e(!0);var o=Ui.transition;Ui.transition={};try{e(!1),t()}finally{Ke=s,Ui.transition=o}}function $f(){return Jt().memoizedState}function cv(e,t,s){var o=ur(e);if(s={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null},Bf(e))Uf(t,s);else if(s=vf(e,t,s,o),s!==null){var u=Tt();un(s,e,o,u),Vf(s,t,o)}}function uv(e,t,s){var o=ur(e),u={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null};if(Bf(e))Uf(t,u);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var w=t.lastRenderedState,_=h(w,s);if(u.hasEagerState=!0,u.eagerState=_,sn(_,w)){var I=t.interleaved;I===null?(u.next=u,Di(t)):(u.next=I.next,I.next=u),t.interleaved=u;return}}catch{}finally{}s=vf(e,t,u,o),s!==null&&(u=Tt(),un(s,e,o,u),Vf(s,t,o))}}function Bf(e){var t=e.alternate;return e===st||t!==null&&t===st}function Uf(e,t){pa=yl=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function Vf(e,t,s){if((s&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,qo(e,s)}}var jl={readContext:qt,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useInsertionEffect:kt,useLayoutEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useMutableSource:kt,useSyncExternalStore:kt,useId:kt,unstable_isNewReconciler:!1},dv={readContext:qt,useCallback:function(e,t){return wn().memoizedState=[e,t===void 0?null:t],e},useContext:qt,useEffect:If,useImperativeHandle:function(e,t,s){return s=s!=null?s.concat([e]):null,wl(4194308,4,Lf.bind(null,t,e),s)},useLayoutEffect:function(e,t){return wl(4194308,4,e,t)},useInsertionEffect:function(e,t){return wl(4,2,e,t)},useMemo:function(e,t){var s=wn();return t=t===void 0?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var o=wn();return t=s!==void 0?s(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=cv.bind(null,st,e),[o.memoizedState,e]},useRef:function(e){var t=wn();return e={current:e},t.memoizedState=e},useState:_f,useDebugValue:Yi,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=_f(!1),t=e[0];return e=iv.bind(null,e[1]),wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var o=st,u=wn();if(Ze){if(s===void 0)throw Error(l(407));s=s()}else{if(s=t(),yt===null)throw Error(l(349));(Lr&30)!==0||Cf(o,t,s)}u.memoizedState=s;var h={value:s,getSnapshot:t};return u.queue=h,If(Ef.bind(null,o,h,e),[e]),o.flags|=2048,va(9,kf.bind(null,o,h,s,t),void 0,null),s},useId:function(){var e=wn(),t=yt.identifierPrefix;if(Ze){var s=Ln,o=Mn;s=(o&~(1<<32-rn(o)-1)).toString(32)+s,t=":"+t+"R"+s,s=xa++,0<s&&(t+="H"+s.toString(32)),t+=":"}else s=ov++,t=":"+t+"r"+s.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},fv={readContext:qt,useCallback:Of,useContext:qt,useEffect:Qi,useImperativeHandle:Df,useInsertionEffect:Af,useLayoutEffect:Mf,useMemo:Ff,useReducer:Ki,useRef:Tf,useState:function(){return Ki(ga)},useDebugValue:Yi,useDeferredValue:function(e){var t=Jt();return zf(t,ht.memoizedState,e)},useTransition:function(){var e=Ki(ga)[0],t=Jt().memoizedState;return[e,t]},useMutableSource:bf,useSyncExternalStore:Sf,useId:$f,unstable_isNewReconciler:!1},hv={readContext:qt,useCallback:Of,useContext:qt,useEffect:Qi,useImperativeHandle:Df,useInsertionEffect:Af,useLayoutEffect:Mf,useMemo:Ff,useReducer:Gi,useRef:Tf,useState:function(){return Gi(ga)},useDebugValue:Yi,useDeferredValue:function(e){var t=Jt();return ht===null?t.memoizedState=e:zf(t,ht.memoizedState,e)},useTransition:function(){var e=Gi(ga)[0],t=Jt().memoizedState;return[e,t]},useMutableSource:bf,useSyncExternalStore:Sf,useId:$f,unstable_isNewReconciler:!1};function ln(e,t){if(e&&e.defaultProps){t=X({},t),e=e.defaultProps;for(var s in e)t[s]===void 0&&(t[s]=e[s]);return t}return t}function Xi(e,t,s,o){t=e.memoizedState,s=s(o,t),s=s==null?t:X({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var bl={isMounted:function(e){return(e=e._reactInternals)?Pr(e)===e:!1},enqueueSetState:function(e,t,s){e=e._reactInternals;var o=Tt(),u=ur(e),h=On(o,u);h.payload=t,s!=null&&(h.callback=s),t=lr(e,h,u),t!==null&&(un(t,e,u,o),pl(t,e,u))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var o=Tt(),u=ur(e),h=On(o,u);h.tag=1,h.payload=t,s!=null&&(h.callback=s),t=lr(e,h,u),t!==null&&(un(t,e,u,o),pl(t,e,u))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=Tt(),o=ur(e),u=On(s,o);u.tag=2,t!=null&&(u.callback=t),t=lr(e,u,o),t!==null&&(un(t,e,o,s),pl(t,e,o))}};function Wf(e,t,s,o,u,h,w){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,h,w):t.prototype&&t.prototype.isPureReactComponent?!sa(s,o)||!sa(u,h):!0}function Hf(e,t,s){var o=!1,u=rr,h=t.contextType;return typeof h=="object"&&h!==null?h=qt(h):(u=Lt(t)?_r:Ct.current,o=t.contextTypes,h=(o=o!=null)?is(e,u):rr),t=new t(s,h),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bl,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=h),t}function Kf(e,t,s,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,o),t.state!==e&&bl.enqueueReplaceState(t,t.state,null)}function qi(e,t,s,o){var u=e.stateNode;u.props=s,u.state=e.memoizedState,u.refs={},Oi(e);var h=t.contextType;typeof h=="object"&&h!==null?u.context=qt(h):(h=Lt(t)?_r:Ct.current,u.context=is(e,h)),u.state=e.memoizedState,h=t.getDerivedStateFromProps,typeof h=="function"&&(Xi(e,t,h,s),u.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(t=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),t!==u.state&&bl.enqueueReplaceState(u,u.state,null),xl(e,s,u,o),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308)}function xs(e,t){try{var s="",o=t;do s+=be(o),o=o.return;while(o);var u=s}catch(h){u=`
Error generating stack: `+h.message+`
`+h.stack}return{value:e,source:t,stack:u,digest:null}}function Ji(e,t,s){return{value:e,source:null,stack:s??null,digest:t??null}}function Zi(e,t){try{console.error(t.value)}catch(s){setTimeout(function(){throw s})}}var mv=typeof WeakMap=="function"?WeakMap:Map;function Gf(e,t,s){s=On(-1,s),s.tag=3,s.payload={element:null};var o=t.value;return s.callback=function(){_l||(_l=!0,mc=o),Zi(e,t)},s}function Qf(e,t,s){s=On(-1,s),s.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var u=t.value;s.payload=function(){return o(u)},s.callback=function(){Zi(e,t)}}var h=e.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(s.callback=function(){Zi(e,t),typeof o!="function"&&(ir===null?ir=new Set([this]):ir.add(this));var w=t.stack;this.componentDidCatch(t.value,{componentStack:w!==null?w:""})}),s}function Yf(e,t,s){var o=e.pingCache;if(o===null){o=e.pingCache=new mv;var u=new Set;o.set(t,u)}else u=o.get(t),u===void 0&&(u=new Set,o.set(t,u));u.has(s)||(u.add(s),e=Pv.bind(null,e,t,s),t.then(e,e))}function Xf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function qf(e,t,s,o,u){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(t=On(-1,1),t.tag=2,lr(s,t,1))),s.lanes|=1),e):(e.flags|=65536,e.lanes=u,e)}var pv=A.ReactCurrentOwner,Dt=!1;function _t(e,t,s,o){t.child=e===null?gf(t,null,s,o):fs(t,e.child,s,o)}function Jf(e,t,s,o,u){s=s.render;var h=t.ref;return ms(t,u),o=Wi(e,t,s,o,h,u),s=Hi(),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,Fn(e,t,u)):(Ze&&s&&Ei(t),t.flags|=1,_t(e,t,o,u),t.child)}function Zf(e,t,s,o,u){if(e===null){var h=s.type;return typeof h=="function"&&!Nc(h)&&h.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(t.tag=15,t.type=h,eh(e,t,h,o,u)):(e=Dl(s.type,null,o,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,(e.lanes&u)===0){var w=h.memoizedProps;if(s=s.compare,s=s!==null?s:sa,s(w,o)&&e.ref===t.ref)return Fn(e,t,u)}return t.flags|=1,e=fr(h,o),e.ref=t.ref,e.return=t,t.child=e}function eh(e,t,s,o,u){if(e!==null){var h=e.memoizedProps;if(sa(h,o)&&e.ref===t.ref)if(Dt=!1,t.pendingProps=o=h,(e.lanes&u)!==0)(e.flags&131072)!==0&&(Dt=!0);else return t.lanes=e.lanes,Fn(e,t,u)}return ec(e,t,s,o,u)}function th(e,t,s){var o=t.pendingProps,u=o.children,h=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qe(vs,Kt),Kt|=s;else{if((s&1073741824)===0)return e=h!==null?h.baseLanes|s:s,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Qe(vs,Kt),Kt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=h!==null?h.baseLanes:s,Qe(vs,Kt),Kt|=o}else h!==null?(o=h.baseLanes|s,t.memoizedState=null):o=s,Qe(vs,Kt),Kt|=o;return _t(e,t,u,s),t.child}function nh(e,t){var s=t.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(t.flags|=512,t.flags|=2097152)}function ec(e,t,s,o,u){var h=Lt(s)?_r:Ct.current;return h=is(t,h),ms(t,u),s=Wi(e,t,s,o,h,u),o=Hi(),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,Fn(e,t,u)):(Ze&&o&&Ei(t),t.flags|=1,_t(e,t,s,u),t.child)}function rh(e,t,s,o,u){if(Lt(s)){var h=!0;ol(t)}else h=!1;if(ms(t,u),t.stateNode===null)Cl(e,t),Hf(t,s,o),qi(t,s,o,u),o=!0;else if(e===null){var w=t.stateNode,_=t.memoizedProps;w.props=_;var I=w.context,F=s.contextType;typeof F=="object"&&F!==null?F=qt(F):(F=Lt(s)?_r:Ct.current,F=is(t,F));var ee=s.getDerivedStateFromProps,te=typeof ee=="function"||typeof w.getSnapshotBeforeUpdate=="function";te||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(_!==o||I!==F)&&Kf(t,w,o,F),ar=!1;var q=t.memoizedState;w.state=q,xl(t,o,w,u),I=t.memoizedState,_!==o||q!==I||Mt.current||ar?(typeof ee=="function"&&(Xi(t,s,ee,o),I=t.memoizedState),(_=ar||Wf(t,s,_,o,q,I,F))?(te||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(t.flags|=4194308)):(typeof w.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=I),w.props=o,w.state=I,w.context=F,o=_):(typeof w.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{w=t.stateNode,yf(e,t),_=t.memoizedProps,F=t.type===t.elementType?_:ln(t.type,_),w.props=F,te=t.pendingProps,q=w.context,I=s.contextType,typeof I=="object"&&I!==null?I=qt(I):(I=Lt(s)?_r:Ct.current,I=is(t,I));var ce=s.getDerivedStateFromProps;(ee=typeof ce=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(_!==te||q!==I)&&Kf(t,w,o,I),ar=!1,q=t.memoizedState,w.state=q,xl(t,o,w,u);var xe=t.memoizedState;_!==te||q!==xe||Mt.current||ar?(typeof ce=="function"&&(Xi(t,s,ce,o),xe=t.memoizedState),(F=ar||Wf(t,s,F,o,q,xe,I)||!1)?(ee||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(o,xe,I),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(o,xe,I)),typeof w.componentDidUpdate=="function"&&(t.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof w.componentDidUpdate!="function"||_===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||_===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=xe),w.props=o,w.state=xe,w.context=I,o=F):(typeof w.componentDidUpdate!="function"||_===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||_===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),o=!1)}return tc(e,t,s,o,h,u)}function tc(e,t,s,o,u,h){nh(e,t);var w=(t.flags&128)!==0;if(!o&&!w)return u&&of(t,s,!1),Fn(e,t,h);o=t.stateNode,pv.current=t;var _=w&&typeof s.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&w?(t.child=fs(t,e.child,null,h),t.child=fs(t,null,_,h)):_t(e,t,_,h),t.memoizedState=o.state,u&&of(t,s,!0),t.child}function sh(e){var t=e.stateNode;t.pendingContext?af(e,t.pendingContext,t.pendingContext!==t.context):t.context&&af(e,t.context,!1),Fi(e,t.containerInfo)}function ah(e,t,s,o,u){return ds(),Ti(u),t.flags|=256,_t(e,t,s,o),t.child}var nc={dehydrated:null,treeContext:null,retryLane:0};function rc(e){return{baseLanes:e,cachePool:null,transitions:null}}function lh(e,t,s){var o=t.pendingProps,u=rt.current,h=!1,w=(t.flags&128)!==0,_;if((_=w)||(_=e!==null&&e.memoizedState===null?!1:(u&2)!==0),_?(h=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(u|=1),Qe(rt,u&1),e===null)return _i(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(w=o.children,e=o.fallback,h?(o=t.mode,h=t.child,w={mode:"hidden",children:w},(o&1)===0&&h!==null?(h.childLanes=0,h.pendingProps=w):h=Ol(w,o,0,null),e=$r(e,o,s,null),h.return=t,e.return=t,h.sibling=e,t.child=h,t.child.memoizedState=rc(s),t.memoizedState=nc,e):sc(t,w));if(u=e.memoizedState,u!==null&&(_=u.dehydrated,_!==null))return xv(e,t,w,o,_,u,s);if(h){h=o.fallback,w=t.mode,u=e.child,_=u.sibling;var I={mode:"hidden",children:o.children};return(w&1)===0&&t.child!==u?(o=t.child,o.childLanes=0,o.pendingProps=I,t.deletions=null):(o=fr(u,I),o.subtreeFlags=u.subtreeFlags&14680064),_!==null?h=fr(_,h):(h=$r(h,w,s,null),h.flags|=2),h.return=t,o.return=t,o.sibling=h,t.child=o,o=h,h=t.child,w=e.child.memoizedState,w=w===null?rc(s):{baseLanes:w.baseLanes|s,cachePool:null,transitions:w.transitions},h.memoizedState=w,h.childLanes=e.childLanes&~s,t.memoizedState=nc,o}return h=e.child,e=h.sibling,o=fr(h,{mode:"visible",children:o.children}),(t.mode&1)===0&&(o.lanes=s),o.return=t,o.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=o,t.memoizedState=null,o}function sc(e,t){return t=Ol({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Sl(e,t,s,o){return o!==null&&Ti(o),fs(t,e.child,null,s),e=sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xv(e,t,s,o,u,h,w){if(s)return t.flags&256?(t.flags&=-257,o=Ji(Error(l(422))),Sl(e,t,w,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(h=o.fallback,u=t.mode,o=Ol({mode:"visible",children:o.children},u,0,null),h=$r(h,u,w,null),h.flags|=2,o.return=t,h.return=t,o.sibling=h,t.child=o,(t.mode&1)!==0&&fs(t,e.child,null,w),t.child.memoizedState=rc(w),t.memoizedState=nc,h);if((t.mode&1)===0)return Sl(e,t,w,null);if(u.data==="$!"){if(o=u.nextSibling&&u.nextSibling.dataset,o)var _=o.dgst;return o=_,h=Error(l(419)),o=Ji(h,o,void 0),Sl(e,t,w,o)}if(_=(w&e.childLanes)!==0,Dt||_){if(o=yt,o!==null){switch(w&-w){case 4:u=2;break;case 16:u=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:u=32;break;case 536870912:u=268435456;break;default:u=0}u=(u&(o.suspendedLanes|w))!==0?0:u,u!==0&&u!==h.retryLane&&(h.retryLane=u,Dn(e,u),un(o,e,u,-1))}return wc(),o=Ji(Error(l(421))),Sl(e,t,w,o)}return u.data==="$?"?(t.flags|=128,t.child=e.child,t=Rv.bind(null,e),u._reactRetry=t,null):(e=h.treeContext,Ht=tr(u.nextSibling),Wt=t,Ze=!0,an=null,e!==null&&(Yt[Xt++]=Mn,Yt[Xt++]=Ln,Yt[Xt++]=Tr,Mn=e.id,Ln=e.overflow,Tr=t),t=sc(t,o.children),t.flags|=4096,t)}function oh(e,t,s){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Li(e.return,t,s)}function ac(e,t,s,o,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=o,h.tail=s,h.tailMode=u)}function ih(e,t,s){var o=t.pendingProps,u=o.revealOrder,h=o.tail;if(_t(e,t,o.children,s),o=rt.current,(o&2)!==0)o=o&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&oh(e,s,t);else if(e.tag===19)oh(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(Qe(rt,o),(t.mode&1)===0)t.memoizedState=null;else switch(u){case"forwards":for(s=t.child,u=null;s!==null;)e=s.alternate,e!==null&&gl(e)===null&&(u=s),s=s.sibling;s=u,s===null?(u=t.child,t.child=null):(u=s.sibling,s.sibling=null),ac(t,!1,u,s,h);break;case"backwards":for(s=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&gl(e)===null){t.child=u;break}e=u.sibling,u.sibling=s,s=u,u=e}ac(t,!0,s,null,h);break;case"together":ac(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Cl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Fn(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Dr|=t.lanes,(s&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,s=fr(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=fr(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function gv(e,t,s){switch(t.tag){case 3:sh(t),ds();break;case 5:jf(t);break;case 1:Lt(t.type)&&ol(t);break;case 4:Fi(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,u=t.memoizedProps.value;Qe(hl,o._currentValue),o._currentValue=u;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Qe(rt,rt.current&1),t.flags|=128,null):(s&t.child.childLanes)!==0?lh(e,t,s):(Qe(rt,rt.current&1),e=Fn(e,t,s),e!==null?e.sibling:null);Qe(rt,rt.current&1);break;case 19:if(o=(s&t.childLanes)!==0,(e.flags&128)!==0){if(o)return ih(e,t,s);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Qe(rt,rt.current),o)break;return null;case 22:case 23:return t.lanes=0,th(e,t,s)}return Fn(e,t,s)}var ch,lc,uh,dh;ch=function(e,t){for(var s=t.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},lc=function(){},uh=function(e,t,s,o){var u=e.memoizedProps;if(u!==o){e=t.stateNode,Mr(yn.current);var h=null;switch(s){case"input":u=ut(e,u),o=ut(e,o),h=[];break;case"select":u=X({},u,{value:void 0}),o=X({},o,{value:void 0}),h=[];break;case"textarea":u=Qn(e,u),o=Qn(e,o),h=[];break;default:typeof u.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=sl)}$o(s,o);var w;s=null;for(F in u)if(!o.hasOwnProperty(F)&&u.hasOwnProperty(F)&&u[F]!=null)if(F==="style"){var _=u[F];for(w in _)_.hasOwnProperty(w)&&(s||(s={}),s[w]="")}else F!=="dangerouslySetInnerHTML"&&F!=="children"&&F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&F!=="autoFocus"&&(c.hasOwnProperty(F)?h||(h=[]):(h=h||[]).push(F,null));for(F in o){var I=o[F];if(_=u!=null?u[F]:void 0,o.hasOwnProperty(F)&&I!==_&&(I!=null||_!=null))if(F==="style")if(_){for(w in _)!_.hasOwnProperty(w)||I&&I.hasOwnProperty(w)||(s||(s={}),s[w]="");for(w in I)I.hasOwnProperty(w)&&_[w]!==I[w]&&(s||(s={}),s[w]=I[w])}else s||(h||(h=[]),h.push(F,s)),s=I;else F==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,_=_?_.__html:void 0,I!=null&&_!==I&&(h=h||[]).push(F,I)):F==="children"?typeof I!="string"&&typeof I!="number"||(h=h||[]).push(F,""+I):F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&(c.hasOwnProperty(F)?(I!=null&&F==="onScroll"&&qe("scroll",e),h||_===I||(h=[])):(h=h||[]).push(F,I))}s&&(h=h||[]).push("style",s);var F=h;(t.updateQueue=F)&&(t.flags|=4)}},dh=function(e,t,s,o){s!==o&&(t.flags|=4)};function ya(e,t){if(!Ze)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Et(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,o=0;if(t)for(var u=e.child;u!==null;)s|=u.lanes|u.childLanes,o|=u.subtreeFlags&14680064,o|=u.flags&14680064,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)s|=u.lanes|u.childLanes,o|=u.subtreeFlags,o|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=o,e.childLanes=s,t}function vv(e,t,s){var o=t.pendingProps;switch(Pi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Et(t),null;case 1:return Lt(t.type)&&ll(),Et(t),null;case 3:return o=t.stateNode,ps(),Je(Mt),Je(Ct),Bi(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(dl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,an!==null&&(gc(an),an=null))),lc(e,t),Et(t),null;case 5:zi(t);var u=Mr(ma.current);if(s=t.type,e!==null&&t.stateNode!=null)uh(e,t,s,o,u),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(l(166));return Et(t),null}if(e=Mr(yn.current),dl(t)){o=t.stateNode,s=t.type;var h=t.memoizedProps;switch(o[vn]=t,o[ca]=h,e=(t.mode&1)!==0,s){case"dialog":qe("cancel",o),qe("close",o);break;case"iframe":case"object":case"embed":qe("load",o);break;case"video":case"audio":for(u=0;u<la.length;u++)qe(la[u],o);break;case"source":qe("error",o);break;case"img":case"image":case"link":qe("error",o),qe("load",o);break;case"details":qe("toggle",o);break;case"input":$t(o,h),qe("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!h.multiple},qe("invalid",o);break;case"textarea":z(o,h),qe("invalid",o)}$o(s,h),u=null;for(var w in h)if(h.hasOwnProperty(w)){var _=h[w];w==="children"?typeof _=="string"?o.textContent!==_&&(h.suppressHydrationWarning!==!0&&rl(o.textContent,_,e),u=["children",_]):typeof _=="number"&&o.textContent!==""+_&&(h.suppressHydrationWarning!==!0&&rl(o.textContent,_,e),u=["children",""+_]):c.hasOwnProperty(w)&&_!=null&&w==="onScroll"&&qe("scroll",o)}switch(s){case"input":Te(o),Y(o,h,!0);break;case"textarea":Te(o),lt(o);break;case"select":case"option":break;default:typeof h.onClick=="function"&&(o.onclick=sl)}o=u,t.updateQueue=o,o!==null&&(t.flags|=4)}else{w=u.nodeType===9?u:u.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ue(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=w.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=w.createElement(s,{is:o.is}):(e=w.createElement(s),s==="select"&&(w=e,o.multiple?w.multiple=!0:o.size&&(w.size=o.size))):e=w.createElementNS(e,s),e[vn]=t,e[ca]=o,ch(e,t,!1,!1),t.stateNode=e;e:{switch(w=Bo(s,o),s){case"dialog":qe("cancel",e),qe("close",e),u=o;break;case"iframe":case"object":case"embed":qe("load",e),u=o;break;case"video":case"audio":for(u=0;u<la.length;u++)qe(la[u],e);u=o;break;case"source":qe("error",e),u=o;break;case"img":case"image":case"link":qe("error",e),qe("load",e),u=o;break;case"details":qe("toggle",e),u=o;break;case"input":$t(e,o),u=ut(e,o),qe("invalid",e);break;case"option":u=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},u=X({},o,{value:void 0}),qe("invalid",e);break;case"textarea":z(e,o),u=Qn(e,o),qe("invalid",e);break;default:u=o}$o(s,u),_=u;for(h in _)if(_.hasOwnProperty(h)){var I=_[h];h==="style"?Zu(e,I):h==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,I!=null&&ft(e,I)):h==="children"?typeof I=="string"?(s!=="textarea"||I!=="")&&xn(e,I):typeof I=="number"&&xn(e,""+I):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(c.hasOwnProperty(h)?I!=null&&h==="onScroll"&&qe("scroll",e):I!=null&&S(e,h,I,w))}switch(s){case"input":Te(e),Y(e,o,!1);break;case"textarea":Te(e),lt(e);break;case"option":o.value!=null&&e.setAttribute("value",""+me(o.value));break;case"select":e.multiple=!!o.multiple,h=o.value,h!=null?St(e,!!o.multiple,h,!1):o.defaultValue!=null&&St(e,!!o.multiple,o.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=sl)}switch(s){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Et(t),null;case 6:if(e&&t.stateNode!=null)dh(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(l(166));if(s=Mr(ma.current),Mr(yn.current),dl(t)){if(o=t.stateNode,s=t.memoizedProps,o[vn]=t,(h=o.nodeValue!==s)&&(e=Wt,e!==null))switch(e.tag){case 3:rl(o.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&rl(o.nodeValue,s,(e.mode&1)!==0)}h&&(t.flags|=4)}else o=(s.nodeType===9?s:s.ownerDocument).createTextNode(o),o[vn]=t,t.stateNode=o}return Et(t),null;case 13:if(Je(rt),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ze&&Ht!==null&&(t.mode&1)!==0&&(t.flags&128)===0)mf(),ds(),t.flags|=98560,h=!1;else if(h=dl(t),o!==null&&o.dehydrated!==null){if(e===null){if(!h)throw Error(l(318));if(h=t.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(l(317));h[vn]=t}else ds(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Et(t),h=!1}else an!==null&&(gc(an),an=null),h=!0;if(!h)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=s,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(rt.current&1)!==0?mt===0&&(mt=3):wc())),t.updateQueue!==null&&(t.flags|=4),Et(t),null);case 4:return ps(),lc(e,t),e===null&&oa(t.stateNode.containerInfo),Et(t),null;case 10:return Mi(t.type._context),Et(t),null;case 17:return Lt(t.type)&&ll(),Et(t),null;case 19:if(Je(rt),h=t.memoizedState,h===null)return Et(t),null;if(o=(t.flags&128)!==0,w=h.rendering,w===null)if(o)ya(h,!1);else{if(mt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(w=gl(e),w!==null){for(t.flags|=128,ya(h,!1),o=w.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=s,s=t.child;s!==null;)h=s,e=o,h.flags&=14680066,w=h.alternate,w===null?(h.childLanes=0,h.lanes=e,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=w.childLanes,h.lanes=w.lanes,h.child=w.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=w.memoizedProps,h.memoizedState=w.memoizedState,h.updateQueue=w.updateQueue,h.type=w.type,e=w.dependencies,h.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return Qe(rt,rt.current&1|2),t.child}e=e.sibling}h.tail!==null&&ot()>ys&&(t.flags|=128,o=!0,ya(h,!1),t.lanes=4194304)}else{if(!o)if(e=gl(w),e!==null){if(t.flags|=128,o=!0,s=e.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),ya(h,!0),h.tail===null&&h.tailMode==="hidden"&&!w.alternate&&!Ze)return Et(t),null}else 2*ot()-h.renderingStartTime>ys&&s!==1073741824&&(t.flags|=128,o=!0,ya(h,!1),t.lanes=4194304);h.isBackwards?(w.sibling=t.child,t.child=w):(s=h.last,s!==null?s.sibling=w:t.child=w,h.last=w)}return h.tail!==null?(t=h.tail,h.rendering=t,h.tail=t.sibling,h.renderingStartTime=ot(),t.sibling=null,s=rt.current,Qe(rt,o?s&1|2:s&1),t):(Et(t),null);case 22:case 23:return yc(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?(Kt&1073741824)!==0&&(Et(t),t.subtreeFlags&6&&(t.flags|=8192)):Et(t),null;case 24:return null;case 25:return null}throw Error(l(156,t.tag))}function yv(e,t){switch(Pi(t),t.tag){case 1:return Lt(t.type)&&ll(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ps(),Je(Mt),Je(Ct),Bi(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return zi(t),null;case 13:if(Je(rt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));ds()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Je(rt),null;case 4:return ps(),null;case 10:return Mi(t.type._context),null;case 22:case 23:return yc(),null;case 24:return null;default:return null}}var kl=!1,Pt=!1,wv=typeof WeakSet=="function"?WeakSet:Set,pe=null;function gs(e,t){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(o){at(e,t,o)}else s.current=null}function oc(e,t,s){try{s()}catch(o){at(e,t,o)}}var fh=!1;function Nv(e,t){if(yi=Ka,e=Vd(),di(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var u=o.anchorOffset,h=o.focusNode;o=o.focusOffset;try{s.nodeType,h.nodeType}catch{s=null;break e}var w=0,_=-1,I=-1,F=0,ee=0,te=e,q=null;t:for(;;){for(var ce;te!==s||u!==0&&te.nodeType!==3||(_=w+u),te!==h||o!==0&&te.nodeType!==3||(I=w+o),te.nodeType===3&&(w+=te.nodeValue.length),(ce=te.firstChild)!==null;)q=te,te=ce;for(;;){if(te===e)break t;if(q===s&&++F===u&&(_=w),q===h&&++ee===o&&(I=w),(ce=te.nextSibling)!==null)break;te=q,q=te.parentNode}te=ce}s=_===-1||I===-1?null:{start:_,end:I}}else s=null}s=s||{start:0,end:0}}else s=null;for(wi={focusedElem:e,selectionRange:s},Ka=!1,pe=t;pe!==null;)if(t=pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pe=e;else for(;pe!==null;){t=pe;try{var xe=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var ye=xe.memoizedProps,it=xe.memoizedState,D=t.stateNode,M=D.getSnapshotBeforeUpdate(t.elementType===t.type?ye:ln(t.type,ye),it);D.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var O=t.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(l(163))}}catch(se){at(t,t.return,se)}if(e=t.sibling,e!==null){e.return=t.return,pe=e;break}pe=t.return}return xe=fh,fh=!1,xe}function wa(e,t,s){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&e)===e){var h=u.destroy;u.destroy=void 0,h!==void 0&&oc(t,s,h)}u=u.next}while(u!==o)}}function El(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var s=t=t.next;do{if((s.tag&e)===e){var o=s.create;s.destroy=o()}s=s.next}while(s!==t)}}function ic(e){var t=e.ref;if(t!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof t=="function"?t(e):t.current=e}}function hh(e){var t=e.alternate;t!==null&&(e.alternate=null,hh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vn],delete t[ca],delete t[Si],delete t[rv],delete t[sv])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function mh(e){return e.tag===5||e.tag===3||e.tag===4}function ph(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function cc(e,t,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?s.nodeType===8?s.parentNode.insertBefore(e,t):s.insertBefore(e,t):(s.nodeType===8?(t=s.parentNode,t.insertBefore(e,s)):(t=s,t.appendChild(e)),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=sl));else if(o!==4&&(e=e.child,e!==null))for(cc(e,t,s),e=e.sibling;e!==null;)cc(e,t,s),e=e.sibling}function uc(e,t,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(uc(e,t,s),e=e.sibling;e!==null;)uc(e,t,s),e=e.sibling}var jt=null,on=!1;function or(e,t,s){for(s=s.child;s!==null;)xh(e,t,s),s=s.sibling}function xh(e,t,s){if(gn&&typeof gn.onCommitFiberUnmount=="function")try{gn.onCommitFiberUnmount($a,s)}catch{}switch(s.tag){case 5:Pt||gs(s,t);case 6:var o=jt,u=on;jt=null,or(e,t,s),jt=o,on=u,jt!==null&&(on?(e=jt,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):jt.removeChild(s.stateNode));break;case 18:jt!==null&&(on?(e=jt,s=s.stateNode,e.nodeType===8?bi(e.parentNode,s):e.nodeType===1&&bi(e,s),Js(e)):bi(jt,s.stateNode));break;case 4:o=jt,u=on,jt=s.stateNode.containerInfo,on=!0,or(e,t,s),jt=o,on=u;break;case 0:case 11:case 14:case 15:if(!Pt&&(o=s.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){u=o=o.next;do{var h=u,w=h.destroy;h=h.tag,w!==void 0&&((h&2)!==0||(h&4)!==0)&&oc(s,t,w),u=u.next}while(u!==o)}or(e,t,s);break;case 1:if(!Pt&&(gs(s,t),o=s.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=s.memoizedProps,o.state=s.memoizedState,o.componentWillUnmount()}catch(_){at(s,t,_)}or(e,t,s);break;case 21:or(e,t,s);break;case 22:s.mode&1?(Pt=(o=Pt)||s.memoizedState!==null,or(e,t,s),Pt=o):or(e,t,s);break;default:or(e,t,s)}}function gh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new wv),t.forEach(function(o){var u=_v.bind(null,e,o);s.has(o)||(s.add(o),o.then(u,u))})}}function cn(e,t){var s=t.deletions;if(s!==null)for(var o=0;o<s.length;o++){var u=s[o];try{var h=e,w=t,_=w;e:for(;_!==null;){switch(_.tag){case 5:jt=_.stateNode,on=!1;break e;case 3:jt=_.stateNode.containerInfo,on=!0;break e;case 4:jt=_.stateNode.containerInfo,on=!0;break e}_=_.return}if(jt===null)throw Error(l(160));xh(h,w,u),jt=null,on=!1;var I=u.alternate;I!==null&&(I.return=null),u.return=null}catch(F){at(u,t,F)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)vh(t,e),t=t.sibling}function vh(e,t){var s=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(cn(t,e),Nn(e),o&4){try{wa(3,e,e.return),El(3,e)}catch(ye){at(e,e.return,ye)}try{wa(5,e,e.return)}catch(ye){at(e,e.return,ye)}}break;case 1:cn(t,e),Nn(e),o&512&&s!==null&&gs(s,s.return);break;case 5:if(cn(t,e),Nn(e),o&512&&s!==null&&gs(s,s.return),e.flags&32){var u=e.stateNode;try{xn(u,"")}catch(ye){at(e,e.return,ye)}}if(o&4&&(u=e.stateNode,u!=null)){var h=e.memoizedProps,w=s!==null?s.memoizedProps:h,_=e.type,I=e.updateQueue;if(e.updateQueue=null,I!==null)try{_==="input"&&h.type==="radio"&&h.name!=null&&Bt(u,h),Bo(_,w);var F=Bo(_,h);for(w=0;w<I.length;w+=2){var ee=I[w],te=I[w+1];ee==="style"?Zu(u,te):ee==="dangerouslySetInnerHTML"?ft(u,te):ee==="children"?xn(u,te):S(u,ee,te,F)}switch(_){case"input":At(u,h);break;case"textarea":de(u,h);break;case"select":var q=u._wrapperState.wasMultiple;u._wrapperState.wasMultiple=!!h.multiple;var ce=h.value;ce!=null?St(u,!!h.multiple,ce,!1):q!==!!h.multiple&&(h.defaultValue!=null?St(u,!!h.multiple,h.defaultValue,!0):St(u,!!h.multiple,h.multiple?[]:"",!1))}u[ca]=h}catch(ye){at(e,e.return,ye)}}break;case 6:if(cn(t,e),Nn(e),o&4){if(e.stateNode===null)throw Error(l(162));u=e.stateNode,h=e.memoizedProps;try{u.nodeValue=h}catch(ye){at(e,e.return,ye)}}break;case 3:if(cn(t,e),Nn(e),o&4&&s!==null&&s.memoizedState.isDehydrated)try{Js(t.containerInfo)}catch(ye){at(e,e.return,ye)}break;case 4:cn(t,e),Nn(e);break;case 13:cn(t,e),Nn(e),u=e.child,u.flags&8192&&(h=u.memoizedState!==null,u.stateNode.isHidden=h,!h||u.alternate!==null&&u.alternate.memoizedState!==null||(hc=ot())),o&4&&gh(e);break;case 22:if(ee=s!==null&&s.memoizedState!==null,e.mode&1?(Pt=(F=Pt)||ee,cn(t,e),Pt=F):cn(t,e),Nn(e),o&8192){if(F=e.memoizedState!==null,(e.stateNode.isHidden=F)&&!ee&&(e.mode&1)!==0)for(pe=e,ee=e.child;ee!==null;){for(te=pe=ee;pe!==null;){switch(q=pe,ce=q.child,q.tag){case 0:case 11:case 14:case 15:wa(4,q,q.return);break;case 1:gs(q,q.return);var xe=q.stateNode;if(typeof xe.componentWillUnmount=="function"){o=q,s=q.return;try{t=o,xe.props=t.memoizedProps,xe.state=t.memoizedState,xe.componentWillUnmount()}catch(ye){at(o,s,ye)}}break;case 5:gs(q,q.return);break;case 22:if(q.memoizedState!==null){Nh(te);continue}}ce!==null?(ce.return=q,pe=ce):Nh(te)}ee=ee.sibling}e:for(ee=null,te=e;;){if(te.tag===5){if(ee===null){ee=te;try{u=te.stateNode,F?(h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none"):(_=te.stateNode,I=te.memoizedProps.style,w=I!=null&&I.hasOwnProperty("display")?I.display:null,_.style.display=Ju("display",w))}catch(ye){at(e,e.return,ye)}}}else if(te.tag===6){if(ee===null)try{te.stateNode.nodeValue=F?"":te.memoizedProps}catch(ye){at(e,e.return,ye)}}else if((te.tag!==22&&te.tag!==23||te.memoizedState===null||te===e)&&te.child!==null){te.child.return=te,te=te.child;continue}if(te===e)break e;for(;te.sibling===null;){if(te.return===null||te.return===e)break e;ee===te&&(ee=null),te=te.return}ee===te&&(ee=null),te.sibling.return=te.return,te=te.sibling}}break;case 19:cn(t,e),Nn(e),o&4&&gh(e);break;case 21:break;default:cn(t,e),Nn(e)}}function Nn(e){var t=e.flags;if(t&2){try{e:{for(var s=e.return;s!==null;){if(mh(s)){var o=s;break e}s=s.return}throw Error(l(160))}switch(o.tag){case 5:var u=o.stateNode;o.flags&32&&(xn(u,""),o.flags&=-33);var h=ph(e);uc(e,h,u);break;case 3:case 4:var w=o.stateNode.containerInfo,_=ph(e);cc(e,_,w);break;default:throw Error(l(161))}}catch(I){at(e,e.return,I)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jv(e,t,s){pe=e,yh(e)}function yh(e,t,s){for(var o=(e.mode&1)!==0;pe!==null;){var u=pe,h=u.child;if(u.tag===22&&o){var w=u.memoizedState!==null||kl;if(!w){var _=u.alternate,I=_!==null&&_.memoizedState!==null||Pt;_=kl;var F=Pt;if(kl=w,(Pt=I)&&!F)for(pe=u;pe!==null;)w=pe,I=w.child,w.tag===22&&w.memoizedState!==null?jh(u):I!==null?(I.return=w,pe=I):jh(u);for(;h!==null;)pe=h,yh(h),h=h.sibling;pe=u,kl=_,Pt=F}wh(e)}else(u.subtreeFlags&8772)!==0&&h!==null?(h.return=u,pe=h):wh(e)}}function wh(e){for(;pe!==null;){var t=pe;if((t.flags&8772)!==0){var s=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Pt||El(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!Pt)if(s===null)o.componentDidMount();else{var u=t.elementType===t.type?s.memoizedProps:ln(t.type,s.memoizedProps);o.componentDidUpdate(u,s.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var h=t.updateQueue;h!==null&&Nf(t,h,o);break;case 3:var w=t.updateQueue;if(w!==null){if(s=null,t.child!==null)switch(t.child.tag){case 5:s=t.child.stateNode;break;case 1:s=t.child.stateNode}Nf(t,w,s)}break;case 5:var _=t.stateNode;if(s===null&&t.flags&4){s=_;var I=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":I.autoFocus&&s.focus();break;case"img":I.src&&(s.src=I.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var F=t.alternate;if(F!==null){var ee=F.memoizedState;if(ee!==null){var te=ee.dehydrated;te!==null&&Js(te)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(l(163))}Pt||t.flags&512&&ic(t)}catch(q){at(t,t.return,q)}}if(t===e){pe=null;break}if(s=t.sibling,s!==null){s.return=t.return,pe=s;break}pe=t.return}}function Nh(e){for(;pe!==null;){var t=pe;if(t===e){pe=null;break}var s=t.sibling;if(s!==null){s.return=t.return,pe=s;break}pe=t.return}}function jh(e){for(;pe!==null;){var t=pe;try{switch(t.tag){case 0:case 11:case 15:var s=t.return;try{El(4,t)}catch(I){at(t,s,I)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var u=t.return;try{o.componentDidMount()}catch(I){at(t,u,I)}}var h=t.return;try{ic(t)}catch(I){at(t,h,I)}break;case 5:var w=t.return;try{ic(t)}catch(I){at(t,w,I)}}}catch(I){at(t,t.return,I)}if(t===e){pe=null;break}var _=t.sibling;if(_!==null){_.return=t.return,pe=_;break}pe=t.return}}var bv=Math.ceil,Pl=A.ReactCurrentDispatcher,dc=A.ReactCurrentOwner,Zt=A.ReactCurrentBatchConfig,$e=0,yt=null,dt=null,bt=0,Kt=0,vs=nr(0),mt=0,Na=null,Dr=0,Rl=0,fc=0,ja=null,Ot=null,hc=0,ys=1/0,zn=null,_l=!1,mc=null,ir=null,Tl=!1,cr=null,Il=0,ba=0,pc=null,Al=-1,Ml=0;function Tt(){return($e&6)!==0?ot():Al!==-1?Al:Al=ot()}function ur(e){return(e.mode&1)===0?1:($e&2)!==0&&bt!==0?bt&-bt:lv.transition!==null?(Ml===0&&(Ml=md()),Ml):(e=Ke,e!==0||(e=window.event,e=e===void 0?16:bd(e.type)),e)}function un(e,t,s,o){if(50<ba)throw ba=0,pc=null,Error(l(185));Gs(e,s,o),(($e&2)===0||e!==yt)&&(e===yt&&(($e&2)===0&&(Rl|=s),mt===4&&dr(e,bt)),Ft(e,o),s===1&&$e===0&&(t.mode&1)===0&&(ys=ot()+500,il&&sr()))}function Ft(e,t){var s=e.callbackNode;l0(e,t);var o=Va(e,e===yt?bt:0);if(o===0)s!==null&&dd(s),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(s!=null&&dd(s),t===1)e.tag===0?av(Sh.bind(null,e)):cf(Sh.bind(null,e)),tv(function(){($e&6)===0&&sr()}),s=null;else{switch(pd(o)){case 1:s=Qo;break;case 4:s=fd;break;case 16:s=za;break;case 536870912:s=hd;break;default:s=za}s=Ih(s,bh.bind(null,e))}e.callbackPriority=t,e.callbackNode=s}}function bh(e,t){if(Al=-1,Ml=0,($e&6)!==0)throw Error(l(327));var s=e.callbackNode;if(ws()&&e.callbackNode!==s)return null;var o=Va(e,e===yt?bt:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||t)t=Ll(e,o);else{t=o;var u=$e;$e|=2;var h=kh();(yt!==e||bt!==t)&&(zn=null,ys=ot()+500,Fr(e,t));do try{kv();break}catch(_){Ch(e,_)}while(!0);Ai(),Pl.current=h,$e=u,dt!==null?t=0:(yt=null,bt=0,t=mt)}if(t!==0){if(t===2&&(u=Yo(e),u!==0&&(o=u,t=xc(e,u))),t===1)throw s=Na,Fr(e,0),dr(e,o),Ft(e,ot()),s;if(t===6)dr(e,o);else{if(u=e.current.alternate,(o&30)===0&&!Sv(u)&&(t=Ll(e,o),t===2&&(h=Yo(e),h!==0&&(o=h,t=xc(e,h))),t===1))throw s=Na,Fr(e,0),dr(e,o),Ft(e,ot()),s;switch(e.finishedWork=u,e.finishedLanes=o,t){case 0:case 1:throw Error(l(345));case 2:zr(e,Ot,zn);break;case 3:if(dr(e,o),(o&130023424)===o&&(t=hc+500-ot(),10<t)){if(Va(e,0)!==0)break;if(u=e.suspendedLanes,(u&o)!==o){Tt(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=ji(zr.bind(null,e,Ot,zn),t);break}zr(e,Ot,zn);break;case 4:if(dr(e,o),(o&4194240)===o)break;for(t=e.eventTimes,u=-1;0<o;){var w=31-rn(o);h=1<<w,w=t[w],w>u&&(u=w),o&=~h}if(o=u,o=ot()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*bv(o/1960))-o,10<o){e.timeoutHandle=ji(zr.bind(null,e,Ot,zn),o);break}zr(e,Ot,zn);break;case 5:zr(e,Ot,zn);break;default:throw Error(l(329))}}}return Ft(e,ot()),e.callbackNode===s?bh.bind(null,e):null}function xc(e,t){var s=ja;return e.current.memoizedState.isDehydrated&&(Fr(e,t).flags|=256),e=Ll(e,t),e!==2&&(t=Ot,Ot=s,t!==null&&gc(t)),e}function gc(e){Ot===null?Ot=e:Ot.push.apply(Ot,e)}function Sv(e){for(var t=e;;){if(t.flags&16384){var s=t.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var o=0;o<s.length;o++){var u=s[o],h=u.getSnapshot;u=u.value;try{if(!sn(h(),u))return!1}catch{return!1}}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function dr(e,t){for(t&=~fc,t&=~Rl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var s=31-rn(t),o=1<<s;e[s]=-1,t&=~o}}function Sh(e){if(($e&6)!==0)throw Error(l(327));ws();var t=Va(e,0);if((t&1)===0)return Ft(e,ot()),null;var s=Ll(e,t);if(e.tag!==0&&s===2){var o=Yo(e);o!==0&&(t=o,s=xc(e,o))}if(s===1)throw s=Na,Fr(e,0),dr(e,t),Ft(e,ot()),s;if(s===6)throw Error(l(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,zr(e,Ot,zn),Ft(e,ot()),null}function vc(e,t){var s=$e;$e|=1;try{return e(t)}finally{$e=s,$e===0&&(ys=ot()+500,il&&sr())}}function Or(e){cr!==null&&cr.tag===0&&($e&6)===0&&ws();var t=$e;$e|=1;var s=Zt.transition,o=Ke;try{if(Zt.transition=null,Ke=1,e)return e()}finally{Ke=o,Zt.transition=s,$e=t,($e&6)===0&&sr()}}function yc(){Kt=vs.current,Je(vs)}function Fr(e,t){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,ev(s)),dt!==null)for(s=dt.return;s!==null;){var o=s;switch(Pi(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&ll();break;case 3:ps(),Je(Mt),Je(Ct),Bi();break;case 5:zi(o);break;case 4:ps();break;case 13:Je(rt);break;case 19:Je(rt);break;case 10:Mi(o.type._context);break;case 22:case 23:yc()}s=s.return}if(yt=e,dt=e=fr(e.current,null),bt=Kt=t,mt=0,Na=null,fc=Rl=Dr=0,Ot=ja=null,Ar!==null){for(t=0;t<Ar.length;t++)if(s=Ar[t],o=s.interleaved,o!==null){s.interleaved=null;var u=o.next,h=s.pending;if(h!==null){var w=h.next;h.next=u,o.next=w}s.pending=o}Ar=null}return e}function Ch(e,t){do{var s=dt;try{if(Ai(),vl.current=jl,yl){for(var o=st.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}yl=!1}if(Lr=0,vt=ht=st=null,pa=!1,xa=0,dc.current=null,s===null||s.return===null){mt=1,Na=t,dt=null;break}e:{var h=e,w=s.return,_=s,I=t;if(t=bt,_.flags|=32768,I!==null&&typeof I=="object"&&typeof I.then=="function"){var F=I,ee=_,te=ee.tag;if((ee.mode&1)===0&&(te===0||te===11||te===15)){var q=ee.alternate;q?(ee.updateQueue=q.updateQueue,ee.memoizedState=q.memoizedState,ee.lanes=q.lanes):(ee.updateQueue=null,ee.memoizedState=null)}var ce=Xf(w);if(ce!==null){ce.flags&=-257,qf(ce,w,_,h,t),ce.mode&1&&Yf(h,F,t),t=ce,I=F;var xe=t.updateQueue;if(xe===null){var ye=new Set;ye.add(I),t.updateQueue=ye}else xe.add(I);break e}else{if((t&1)===0){Yf(h,F,t),wc();break e}I=Error(l(426))}}else if(Ze&&_.mode&1){var it=Xf(w);if(it!==null){(it.flags&65536)===0&&(it.flags|=256),qf(it,w,_,h,t),Ti(xs(I,_));break e}}h=I=xs(I,_),mt!==4&&(mt=2),ja===null?ja=[h]:ja.push(h),h=w;do{switch(h.tag){case 3:h.flags|=65536,t&=-t,h.lanes|=t;var D=Gf(h,I,t);wf(h,D);break e;case 1:_=I;var M=h.type,O=h.stateNode;if((h.flags&128)===0&&(typeof M.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(ir===null||!ir.has(O)))){h.flags|=65536,t&=-t,h.lanes|=t;var se=Qf(h,_,t);wf(h,se);break e}}h=h.return}while(h!==null)}Ph(s)}catch(Ne){t=Ne,dt===s&&s!==null&&(dt=s=s.return);continue}break}while(!0)}function kh(){var e=Pl.current;return Pl.current=jl,e===null?jl:e}function wc(){(mt===0||mt===3||mt===2)&&(mt=4),yt===null||(Dr&268435455)===0&&(Rl&268435455)===0||dr(yt,bt)}function Ll(e,t){var s=$e;$e|=2;var o=kh();(yt!==e||bt!==t)&&(zn=null,Fr(e,t));do try{Cv();break}catch(u){Ch(e,u)}while(!0);if(Ai(),$e=s,Pl.current=o,dt!==null)throw Error(l(261));return yt=null,bt=0,mt}function Cv(){for(;dt!==null;)Eh(dt)}function kv(){for(;dt!==null&&!qg();)Eh(dt)}function Eh(e){var t=Th(e.alternate,e,Kt);e.memoizedProps=e.pendingProps,t===null?Ph(e):dt=t,dc.current=null}function Ph(e){var t=e;do{var s=t.alternate;if(e=t.return,(t.flags&32768)===0){if(s=vv(s,t,Kt),s!==null){dt=s;return}}else{if(s=yv(s,t),s!==null){s.flags&=32767,dt=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{mt=6,dt=null;return}}if(t=t.sibling,t!==null){dt=t;return}dt=t=e}while(t!==null);mt===0&&(mt=5)}function zr(e,t,s){var o=Ke,u=Zt.transition;try{Zt.transition=null,Ke=1,Ev(e,t,s,o)}finally{Zt.transition=u,Ke=o}return null}function Ev(e,t,s,o){do ws();while(cr!==null);if(($e&6)!==0)throw Error(l(327));s=e.finishedWork;var u=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(l(177));e.callbackNode=null,e.callbackPriority=0;var h=s.lanes|s.childLanes;if(o0(e,h),e===yt&&(dt=yt=null,bt=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||Tl||(Tl=!0,Ih(za,function(){return ws(),null})),h=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||h){h=Zt.transition,Zt.transition=null;var w=Ke;Ke=1;var _=$e;$e|=4,dc.current=null,Nv(e,s),vh(s,e),G0(wi),Ka=!!yi,wi=yi=null,e.current=s,jv(s),Jg(),$e=_,Ke=w,Zt.transition=h}else e.current=s;if(Tl&&(Tl=!1,cr=e,Il=u),h=e.pendingLanes,h===0&&(ir=null),t0(s.stateNode),Ft(e,ot()),t!==null)for(o=e.onRecoverableError,s=0;s<t.length;s++)u=t[s],o(u.value,{componentStack:u.stack,digest:u.digest});if(_l)throw _l=!1,e=mc,mc=null,e;return(Il&1)!==0&&e.tag!==0&&ws(),h=e.pendingLanes,(h&1)!==0?e===pc?ba++:(ba=0,pc=e):ba=0,sr(),null}function ws(){if(cr!==null){var e=pd(Il),t=Zt.transition,s=Ke;try{if(Zt.transition=null,Ke=16>e?16:e,cr===null)var o=!1;else{if(e=cr,cr=null,Il=0,($e&6)!==0)throw Error(l(331));var u=$e;for($e|=4,pe=e.current;pe!==null;){var h=pe,w=h.child;if((pe.flags&16)!==0){var _=h.deletions;if(_!==null){for(var I=0;I<_.length;I++){var F=_[I];for(pe=F;pe!==null;){var ee=pe;switch(ee.tag){case 0:case 11:case 15:wa(8,ee,h)}var te=ee.child;if(te!==null)te.return=ee,pe=te;else for(;pe!==null;){ee=pe;var q=ee.sibling,ce=ee.return;if(hh(ee),ee===F){pe=null;break}if(q!==null){q.return=ce,pe=q;break}pe=ce}}}var xe=h.alternate;if(xe!==null){var ye=xe.child;if(ye!==null){xe.child=null;do{var it=ye.sibling;ye.sibling=null,ye=it}while(ye!==null)}}pe=h}}if((h.subtreeFlags&2064)!==0&&w!==null)w.return=h,pe=w;else e:for(;pe!==null;){if(h=pe,(h.flags&2048)!==0)switch(h.tag){case 0:case 11:case 15:wa(9,h,h.return)}var D=h.sibling;if(D!==null){D.return=h.return,pe=D;break e}pe=h.return}}var M=e.current;for(pe=M;pe!==null;){w=pe;var O=w.child;if((w.subtreeFlags&2064)!==0&&O!==null)O.return=w,pe=O;else e:for(w=M;pe!==null;){if(_=pe,(_.flags&2048)!==0)try{switch(_.tag){case 0:case 11:case 15:El(9,_)}}catch(Ne){at(_,_.return,Ne)}if(_===w){pe=null;break e}var se=_.sibling;if(se!==null){se.return=_.return,pe=se;break e}pe=_.return}}if($e=u,sr(),gn&&typeof gn.onPostCommitFiberRoot=="function")try{gn.onPostCommitFiberRoot($a,e)}catch{}o=!0}return o}finally{Ke=s,Zt.transition=t}}return!1}function Rh(e,t,s){t=xs(s,t),t=Gf(e,t,1),e=lr(e,t,1),t=Tt(),e!==null&&(Gs(e,1,t),Ft(e,t))}function at(e,t,s){if(e.tag===3)Rh(e,e,s);else for(;t!==null;){if(t.tag===3){Rh(t,e,s);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(ir===null||!ir.has(o))){e=xs(s,e),e=Qf(t,e,1),t=lr(t,e,1),e=Tt(),t!==null&&(Gs(t,1,e),Ft(t,e));break}}t=t.return}}function Pv(e,t,s){var o=e.pingCache;o!==null&&o.delete(t),t=Tt(),e.pingedLanes|=e.suspendedLanes&s,yt===e&&(bt&s)===s&&(mt===4||mt===3&&(bt&130023424)===bt&&500>ot()-hc?Fr(e,0):fc|=s),Ft(e,t)}function _h(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ua,Ua<<=1,(Ua&130023424)===0&&(Ua=4194304)));var s=Tt();e=Dn(e,t),e!==null&&(Gs(e,t,s),Ft(e,s))}function Rv(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),_h(e,s)}function _v(e,t){var s=0;switch(e.tag){case 13:var o=e.stateNode,u=e.memoizedState;u!==null&&(s=u.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(l(314))}o!==null&&o.delete(t),_h(e,s)}var Th;Th=function(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)Dt=!0;else{if((e.lanes&s)===0&&(t.flags&128)===0)return Dt=!1,gv(e,t,s);Dt=(e.flags&131072)!==0}else Dt=!1,Ze&&(t.flags&1048576)!==0&&uf(t,ul,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Cl(e,t),e=t.pendingProps;var u=is(t,Ct.current);ms(t,s),u=Wi(null,t,o,e,u,s);var h=Hi();return t.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lt(o)?(h=!0,ol(t)):h=!1,t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,Oi(t),u.updater=bl,t.stateNode=u,u._reactInternals=t,qi(t,o,e,s),t=tc(null,t,o,!0,h,s)):(t.tag=0,Ze&&h&&Ei(t),_t(null,t,u,s),t=t.child),t;case 16:o=t.elementType;e:{switch(Cl(e,t),e=t.pendingProps,u=o._init,o=u(o._payload),t.type=o,u=t.tag=Iv(o),e=ln(o,e),u){case 0:t=ec(null,t,o,e,s);break e;case 1:t=rh(null,t,o,e,s);break e;case 11:t=Jf(null,t,o,e,s);break e;case 14:t=Zf(null,t,o,ln(o.type,e),s);break e}throw Error(l(306,o,""))}return t;case 0:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:ln(o,u),ec(e,t,o,u,s);case 1:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:ln(o,u),rh(e,t,o,u,s);case 3:e:{if(sh(t),e===null)throw Error(l(387));o=t.pendingProps,h=t.memoizedState,u=h.element,yf(e,t),xl(t,o,null,s);var w=t.memoizedState;if(o=w.element,h.isDehydrated)if(h={element:o,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){u=xs(Error(l(423)),t),t=ah(e,t,o,s,u);break e}else if(o!==u){u=xs(Error(l(424)),t),t=ah(e,t,o,s,u);break e}else for(Ht=tr(t.stateNode.containerInfo.firstChild),Wt=t,Ze=!0,an=null,s=gf(t,null,o,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(ds(),o===u){t=Fn(e,t,s);break e}_t(e,t,o,s)}t=t.child}return t;case 5:return jf(t),e===null&&_i(t),o=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,w=u.children,Ni(o,u)?w=null:h!==null&&Ni(o,h)&&(t.flags|=32),nh(e,t),_t(e,t,w,s),t.child;case 6:return e===null&&_i(t),null;case 13:return lh(e,t,s);case 4:return Fi(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=fs(t,null,o,s):_t(e,t,o,s),t.child;case 11:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:ln(o,u),Jf(e,t,o,u,s);case 7:return _t(e,t,t.pendingProps,s),t.child;case 8:return _t(e,t,t.pendingProps.children,s),t.child;case 12:return _t(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(o=t.type._context,u=t.pendingProps,h=t.memoizedProps,w=u.value,Qe(hl,o._currentValue),o._currentValue=w,h!==null)if(sn(h.value,w)){if(h.children===u.children&&!Mt.current){t=Fn(e,t,s);break e}}else for(h=t.child,h!==null&&(h.return=t);h!==null;){var _=h.dependencies;if(_!==null){w=h.child;for(var I=_.firstContext;I!==null;){if(I.context===o){if(h.tag===1){I=On(-1,s&-s),I.tag=2;var F=h.updateQueue;if(F!==null){F=F.shared;var ee=F.pending;ee===null?I.next=I:(I.next=ee.next,ee.next=I),F.pending=I}}h.lanes|=s,I=h.alternate,I!==null&&(I.lanes|=s),Li(h.return,s,t),_.lanes|=s;break}I=I.next}}else if(h.tag===10)w=h.type===t.type?null:h.child;else if(h.tag===18){if(w=h.return,w===null)throw Error(l(341));w.lanes|=s,_=w.alternate,_!==null&&(_.lanes|=s),Li(w,s,t),w=h.sibling}else w=h.child;if(w!==null)w.return=h;else for(w=h;w!==null;){if(w===t){w=null;break}if(h=w.sibling,h!==null){h.return=w.return,w=h;break}w=w.return}h=w}_t(e,t,u.children,s),t=t.child}return t;case 9:return u=t.type,o=t.pendingProps.children,ms(t,s),u=qt(u),o=o(u),t.flags|=1,_t(e,t,o,s),t.child;case 14:return o=t.type,u=ln(o,t.pendingProps),u=ln(o.type,u),Zf(e,t,o,u,s);case 15:return eh(e,t,t.type,t.pendingProps,s);case 17:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:ln(o,u),Cl(e,t),t.tag=1,Lt(o)?(e=!0,ol(t)):e=!1,ms(t,s),Hf(t,o,u),qi(t,o,u,s),tc(null,t,o,!0,e,s);case 19:return ih(e,t,s);case 22:return th(e,t,s)}throw Error(l(156,t.tag))};function Ih(e,t){return ud(e,t)}function Tv(e,t,s,o){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,t,s,o){return new Tv(e,t,s,o)}function Nc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Iv(e){if(typeof e=="function")return Nc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===H)return 11;if(e===re)return 14}return 2}function fr(e,t){var s=e.alternate;return s===null?(s=en(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function Dl(e,t,s,o,u,h){var w=2;if(o=e,typeof e=="function")Nc(e)&&(w=1);else if(typeof e=="string")w=5;else e:switch(e){case G:return $r(s.children,u,h,t);case U:w=8,u|=8;break;case ie:return e=en(12,s,t,u|2),e.elementType=ie,e.lanes=h,e;case P:return e=en(13,s,t,u),e.elementType=P,e.lanes=h,e;case K:return e=en(19,s,t,u),e.elementType=K,e.lanes=h,e;case $:return Ol(s,u,h,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fe:w=10;break e;case oe:w=9;break e;case H:w=11;break e;case re:w=14;break e;case W:w=16,o=null;break e}throw Error(l(130,e==null?e:typeof e,""))}return t=en(w,s,t,u),t.elementType=e,t.type=o,t.lanes=h,t}function $r(e,t,s,o){return e=en(7,e,o,t),e.lanes=s,e}function Ol(e,t,s,o){return e=en(22,e,o,t),e.elementType=$,e.lanes=s,e.stateNode={isHidden:!1},e}function jc(e,t,s){return e=en(6,e,null,t),e.lanes=s,e}function bc(e,t,s){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Av(e,t,s,o,u){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Xo(0),this.expirationTimes=Xo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xo(0),this.identifierPrefix=o,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function Sc(e,t,s,o,u,h,w,_,I){return e=new Av(e,t,s,_,I),t===1?(t=1,h===!0&&(t|=8)):t=0,h=en(3,null,null,t),e.current=h,h.stateNode=e,h.memoizedState={element:o,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Oi(h),e}function Mv(e,t,s){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Q,key:o==null?null:""+o,children:e,containerInfo:t,implementation:s}}function Ah(e){if(!e)return rr;e=e._reactInternals;e:{if(Pr(e)!==e||e.tag!==1)throw Error(l(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(l(171))}if(e.tag===1){var s=e.type;if(Lt(s))return lf(e,s,t)}return t}function Mh(e,t,s,o,u,h,w,_,I){return e=Sc(s,o,!0,e,u,h,w,_,I),e.context=Ah(null),s=e.current,o=Tt(),u=ur(s),h=On(o,u),h.callback=t??null,lr(s,h,u),e.current.lanes=u,Gs(e,u,o),Ft(e,o),e}function Fl(e,t,s,o){var u=t.current,h=Tt(),w=ur(u);return s=Ah(s),t.context===null?t.context=s:t.pendingContext=s,t=On(h,w),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=lr(u,t,w),e!==null&&(un(e,u,w,h),pl(e,u,w)),w}function zl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Lh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function Cc(e,t){Lh(e,t),(e=e.alternate)&&Lh(e,t)}function Lv(){return null}var Dh=typeof reportError=="function"?reportError:function(e){console.error(e)};function kc(e){this._internalRoot=e}$l.prototype.render=kc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));Fl(e,t,null,null)},$l.prototype.unmount=kc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Or(function(){Fl(null,e,null,null)}),t[In]=null}};function $l(e){this._internalRoot=e}$l.prototype.unstable_scheduleHydration=function(e){if(e){var t=vd();e={blockedOn:null,target:e,priority:t};for(var s=0;s<Jn.length&&t!==0&&t<Jn[s].priority;s++);Jn.splice(s,0,e),s===0&&Nd(e)}};function Ec(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Bl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Oh(){}function Dv(e,t,s,o,u){if(u){if(typeof o=="function"){var h=o;o=function(){var F=zl(w);h.call(F)}}var w=Mh(t,o,e,0,null,!1,!1,"",Oh);return e._reactRootContainer=w,e[In]=w.current,oa(e.nodeType===8?e.parentNode:e),Or(),w}for(;u=e.lastChild;)e.removeChild(u);if(typeof o=="function"){var _=o;o=function(){var F=zl(I);_.call(F)}}var I=Sc(e,0,!1,null,null,!1,!1,"",Oh);return e._reactRootContainer=I,e[In]=I.current,oa(e.nodeType===8?e.parentNode:e),Or(function(){Fl(t,I,s,o)}),I}function Ul(e,t,s,o,u){var h=s._reactRootContainer;if(h){var w=h;if(typeof u=="function"){var _=u;u=function(){var I=zl(w);_.call(I)}}Fl(t,w,e,u)}else w=Dv(s,t,e,u,o);return zl(w)}xd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var s=Ks(t.pendingLanes);s!==0&&(qo(t,s|1),Ft(t,ot()),($e&6)===0&&(ys=ot()+500,sr()))}break;case 13:Or(function(){var o=Dn(e,1);if(o!==null){var u=Tt();un(o,e,1,u)}}),Cc(e,1)}},Jo=function(e){if(e.tag===13){var t=Dn(e,134217728);if(t!==null){var s=Tt();un(t,e,134217728,s)}Cc(e,134217728)}},gd=function(e){if(e.tag===13){var t=ur(e),s=Dn(e,t);if(s!==null){var o=Tt();un(s,e,t,o)}Cc(e,t)}},vd=function(){return Ke},yd=function(e,t){var s=Ke;try{return Ke=e,t()}finally{Ke=s}},Wo=function(e,t,s){switch(t){case"input":if(At(e,s),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<s.length;t++){var o=s[t];if(o!==e&&o.form===e.form){var u=al(o);if(!u)throw Error(l(90));Ae(o),At(o,u)}}}break;case"textarea":de(e,s);break;case"select":t=s.value,t!=null&&St(e,!!s.multiple,t,!1)}},rd=vc,sd=Or;var Ov={usingClientEntryPoint:!1,Events:[ua,ls,al,td,nd,vc]},Sa={findFiberByHostInstance:Rr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Fv={bundleType:Sa.bundleType,version:Sa.version,rendererPackageName:Sa.rendererPackageName,rendererConfig:Sa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=id(e),e===null?null:e.stateNode},findFiberByHostInstance:Sa.findFiberByHostInstance||Lv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vl.isDisabled&&Vl.supportsFiber)try{$a=Vl.inject(Fv),gn=Vl}catch{}}return zt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ov,zt.createPortal=function(e,t){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ec(t))throw Error(l(200));return Mv(e,t,null,s)},zt.createRoot=function(e,t){if(!Ec(e))throw Error(l(299));var s=!1,o="",u=Dh;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=Sc(e,1,!1,null,null,s,!1,o,u),e[In]=t.current,oa(e.nodeType===8?e.parentNode:e),new kc(t)},zt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=id(t),e=e===null?null:e.stateNode,e},zt.flushSync=function(e){return Or(e)},zt.hydrate=function(e,t,s){if(!Bl(t))throw Error(l(200));return Ul(null,e,t,!0,s)},zt.hydrateRoot=function(e,t,s){if(!Ec(e))throw Error(l(405));var o=s!=null&&s.hydratedSources||null,u=!1,h="",w=Dh;if(s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(w=s.onRecoverableError)),t=Mh(t,null,e,1,s??null,u,!1,h,w),e[In]=t.current,oa(e),o)for(e=0;e<o.length;e++)s=o[e],u=s._getVersion,u=u(s._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[s,u]:t.mutableSourceEagerHydrationData.push(s,u);return new $l(t)},zt.render=function(e,t,s){if(!Bl(t))throw Error(l(200));return Ul(null,e,t,!1,s)},zt.unmountComponentAtNode=function(e){if(!Bl(e))throw Error(l(40));return e._reactRootContainer?(Or(function(){Ul(null,null,e,!1,function(){e._reactRootContainer=null,e[In]=null})}),!0):!1},zt.unstable_batchedUpdates=vc,zt.unstable_renderSubtreeIntoContainer=function(e,t,s,o){if(!Bl(s))throw Error(l(200));if(e==null||e._reactInternals===void 0)throw Error(l(38));return Ul(e,t,s,!1,o)},zt.version="18.3.1-next-f1338f8080-20240426",zt}var Hh;function Gm(){if(Hh)return _c.exports;Hh=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(a){console.error(a)}}return r(),_c.exports=Kv(),_c.exports}var Kh;function Gv(){if(Kh)return Wl;Kh=1;var r=Gm();return Wl.createRoot=r.createRoot,Wl.hydrateRoot=r.hydrateRoot,Wl}var Qv=Gv(),Ia=Gm();const Yv=Km(Ia);/**
* @remix-run/router v1.23.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Pa(){return Pa=Object.assign?Object.assign.bind():function(r){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r[i]=l[i])}return r},Pa.apply(this,arguments)}var vr;(function(r){r.Pop="POP",r.Push="PUSH",r.Replace="REPLACE"})(vr||(vr={}));const Gh="popstate";function Xv(r){r===void 0&&(r={});function a(i,c){let{pathname:d,search:f,hash:m}=i.location;return Qc("",{pathname:d,search:f,hash:m},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function l(i,c){return typeof c=="string"?c:ao(c)}return Jv(a,l,null,r)}function ct(r,a){if(r===!1||r===null||typeof r>"u")throw new Error(a)}function wu(r,a){if(!r){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function qv(){return Math.random().toString(36).substr(2,8)}function Qh(r,a){return{usr:r.state,key:r.key,idx:a}}function Qc(r,a,l,i){return l===void 0&&(l=null),Pa({pathname:typeof r=="string"?r:r.pathname,search:"",hash:""},typeof a=="string"?Ms(a):a,{state:l,key:a&&a.key||i||qv()})}function ao(r){let{pathname:a="/",search:l="",hash:i=""}=r;return l&&l!=="?"&&(a+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(a+=i.charAt(0)==="#"?i:"#"+i),a}function Ms(r){let a={};if(r){let l=r.indexOf("#");l>=0&&(a.hash=r.substr(l),r=r.substr(0,l));let i=r.indexOf("?");i>=0&&(a.search=r.substr(i),r=r.substr(0,i)),r&&(a.pathname=r)}return a}function Jv(r,a,l,i){i===void 0&&(i={});let{window:c=document.defaultView,v5Compat:d=!1}=i,f=c.history,m=vr.Pop,x=null,g=v();g==null&&(g=0,f.replaceState(Pa({},f.state,{idx:g}),""));function v(){return(f.state||{idx:null}).idx}function y(){m=vr.Pop;let j=v(),N=j==null?null:j-g;g=j,x&&x({action:m,location:b.location,delta:N})}function E(j,N){m=vr.Push;let R=Qc(b.location,j,N);g=v()+1;let S=Qh(R,g),A=b.createHref(R);try{f.pushState(S,"",A)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;c.location.assign(A)}d&&x&&x({action:m,location:b.location,delta:1})}function k(j,N){m=vr.Replace;let R=Qc(b.location,j,N);g=v();let S=Qh(R,g),A=b.createHref(R);f.replaceState(S,"",A),d&&x&&x({action:m,location:b.location,delta:0})}function C(j){let N=c.location.origin!=="null"?c.location.origin:c.location.href,R=typeof j=="string"?j:ao(j);return R=R.replace(/ $/,"%20"),ct(N,"No window.location.(origin|href) available to create URL for href: "+R),new URL(R,N)}let b={get action(){return m},get location(){return r(c,f)},listen(j){if(x)throw new Error("A history only accepts one active listener");return c.addEventListener(Gh,y),x=j,()=>{c.removeEventListener(Gh,y),x=null}},createHref(j){return a(c,j)},createURL:C,encodeLocation(j){let N=C(j);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:E,replace:k,go(j){return f.go(j)}};return b}var Yh;(function(r){r.data="data",r.deferred="deferred",r.redirect="redirect",r.error="error"})(Yh||(Yh={}));function Zv(r,a,l){return l===void 0&&(l="/"),ey(r,a,l)}function ey(r,a,l,i){let c=typeof a=="string"?Ms(a):a,d=Nu(c.pathname||"/",l);if(d==null)return null;let f=Qm(r);ty(f);let m=null;for(let x=0;m==null&&x<f.length;++x){let g=hy(d);m=uy(f[x],g)}return m}function Qm(r,a,l,i){a===void 0&&(a=[]),l===void 0&&(l=[]),i===void 0&&(i="");let c=(d,f,m)=>{let x={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:f,route:d};x.relativePath.startsWith("/")&&(ct(x.relativePath.startsWith(i),'Absolute route path "'+x.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),x.relativePath=x.relativePath.slice(i.length));let g=yr([i,x.relativePath]),v=l.concat(x);d.children&&d.children.length>0&&(ct(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),Qm(d.children,a,v,g)),!(d.path==null&&!d.index)&&a.push({path:g,score:iy(g,d.index),routesMeta:v})};return r.forEach((d,f)=>{var m;if(d.path===""||!((m=d.path)!=null&&m.includes("?")))c(d,f);else for(let x of Ym(d.path))c(d,f,x)}),a}function Ym(r){let a=r.split("/");if(a.length===0)return[];let[l,...i]=a,c=l.endsWith("?"),d=l.replace(/\?$/,"");if(i.length===0)return c?[d,""]:[d];let f=Ym(i.join("/")),m=[];return m.push(...f.map(x=>x===""?d:[d,x].join("/"))),c&&m.push(...f),m.map(x=>r.startsWith("/")&&x===""?"/":x)}function ty(r){r.sort((a,l)=>a.score!==l.score?l.score-a.score:cy(a.routesMeta.map(i=>i.childrenIndex),l.routesMeta.map(i=>i.childrenIndex)))}const ny=/^:[\w-]+$/,ry=3,sy=2,ay=1,ly=10,oy=-2,Xh=r=>r==="*";function iy(r,a){let l=r.split("/"),i=l.length;return l.some(Xh)&&(i+=oy),a&&(i+=sy),l.filter(c=>!Xh(c)).reduce((c,d)=>c+(ny.test(d)?ry:d===""?ay:ly),i)}function cy(r,a){return r.length===a.length&&r.slice(0,-1).every((i,c)=>i===a[c])?r[r.length-1]-a[a.length-1]:0}function uy(r,a,l){let{routesMeta:i}=r,c={},d="/",f=[];for(let m=0;m<i.length;++m){let x=i[m],g=m===i.length-1,v=d==="/"?a:a.slice(d.length)||"/",y=dy({path:x.relativePath,caseSensitive:x.caseSensitive,end:g},v),E=x.route;if(!y)return null;Object.assign(c,y.params),f.push({params:c,pathname:yr([d,y.pathname]),pathnameBase:vy(yr([d,y.pathnameBase])),route:E}),y.pathnameBase!=="/"&&(d=yr([d,y.pathnameBase]))}return f}function dy(r,a){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[l,i]=fy(r.path,r.caseSensitive,r.end),c=a.match(l);if(!c)return null;let d=c[0],f=d.replace(/(.)\/+$/,"$1"),m=c.slice(1);return{params:i.reduce((g,v,y)=>{let{paramName:E,isOptional:k}=v;if(E==="*"){let b=m[y]||"";f=d.slice(0,d.length-b.length).replace(/(.)\/+$/,"$1")}const C=m[y];return k&&!C?g[E]=void 0:g[E]=(C||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:f,pattern:r}}function fy(r,a,l){a===void 0&&(a=!1),l===void 0&&(l=!0),wu(r==="*"||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));let i=[],c="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,m,x)=>(i.push({paramName:m,isOptional:x!=null}),x?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(i.push({paramName:"*"}),c+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?c+="\\/*$":r!==""&&r!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,a?void 0:"i"),i]}function hy(r){try{return r.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return wu(!1,'The URL path "'+r+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+a+").")),r}}function Nu(r,a){if(a==="/")return r;if(!r.toLowerCase().startsWith(a.toLowerCase()))return null;let l=a.endsWith("/")?a.length-1:a.length,i=r.charAt(l);return i&&i!=="/"?null:r.slice(l)||"/"}const my=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,py=r=>my.test(r);function xy(r,a){a===void 0&&(a="/");let{pathname:l,search:i="",hash:c=""}=typeof r=="string"?Ms(r):r,d;if(l)if(py(l))d=l;else{if(l.includes("//")){let f=l;l=l.replace(/\/\/+/g,"/"),wu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(f+" -> "+l))}l.startsWith("/")?d=qh(l.substring(1),"/"):d=qh(l,a)}else d=a;return{pathname:d,search:yy(i),hash:wy(c)}}function qh(r,a){let l=a.replace(/\/+$/,"").split("/");return r.split("/").forEach(c=>{c===".."?l.length>1&&l.pop():c!=="."&&l.push(c)}),l.length>1?l.join("/"):"/"}function Ac(r,a,l,i){return"Cannot include a '"+r+"' character in a manually specified "+("`to."+a+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+l+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function gy(r){return r.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function ju(r,a){let l=gy(r);return a?l.map((i,c)=>c===l.length-1?i.pathname:i.pathnameBase):l.map(i=>i.pathnameBase)}function bu(r,a,l,i){i===void 0&&(i=!1);let c;typeof r=="string"?c=Ms(r):(c=Pa({},r),ct(!c.pathname||!c.pathname.includes("?"),Ac("?","pathname","search",c)),ct(!c.pathname||!c.pathname.includes("#"),Ac("#","pathname","hash",c)),ct(!c.search||!c.search.includes("#"),Ac("#","search","hash",c)));let d=r===""||c.pathname==="",f=d?"/":c.pathname,m;if(f==null)m=l;else{let y=a.length-1;if(!i&&f.startsWith("..")){let E=f.split("/");for(;E[0]==="..";)E.shift(),y-=1;c.pathname=E.join("/")}m=y>=0?a[y]:"/"}let x=xy(c,m),g=f&&f!=="/"&&f.endsWith("/"),v=(d||f===".")&&l.endsWith("/");return!x.pathname.endsWith("/")&&(g||v)&&(x.pathname+="/"),x}const yr=r=>r.join("/").replace(/\/\/+/g,"/"),vy=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),yy=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,wy=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r;function Ny(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}const Xm=["post","put","patch","delete"];new Set(Xm);const jy=["get",...Xm];new Set(jy);/**
* React Router v6.30.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Ra(){return Ra=Object.assign?Object.assign.bind():function(r){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r[i]=l[i])}return r},Ra.apply(this,arguments)}const Su=p.createContext(null),by=p.createContext(null),Sr=p.createContext(null),wo=p.createContext(null),Gn=p.createContext({outlet:null,matches:[],isDataRoute:!1}),qm=p.createContext(null);function Sy(r,a){let{relative:l}=a===void 0?{}:a;Ls()||ct(!1);let{basename:i,navigator:c}=p.useContext(Sr),{hash:d,pathname:f,search:m}=Zm(r,{relative:l}),x=f;return i!=="/"&&(x=f==="/"?i:yr([i,f])),c.createHref({pathname:x,search:m,hash:d})}function Ls(){return p.useContext(wo)!=null}function Xr(){return Ls()||ct(!1),p.useContext(wo).location}function Jm(r){p.useContext(Sr).static||p.useLayoutEffect(r)}function Aa(){let{isDataRoute:r}=p.useContext(Gn);return r?zy():Cy()}function Cy(){Ls()||ct(!1);let r=p.useContext(Su),{basename:a,future:l,navigator:i}=p.useContext(Sr),{matches:c}=p.useContext(Gn),{pathname:d}=Xr(),f=JSON.stringify(ju(c,l.v7_relativeSplatPath)),m=p.useRef(!1);return Jm(()=>{m.current=!0}),p.useCallback(function(g,v){if(v===void 0&&(v={}),!m.current)return;if(typeof g=="number"){i.go(g);return}let y=bu(g,JSON.parse(f),d,v.relative==="path");r==null&&a!=="/"&&(y.pathname=y.pathname==="/"?a:yr([a,y.pathname])),(v.replace?i.replace:i.push)(y,v.state,v)},[a,i,f,d,r])}const ky=p.createContext(null);function Ey(r){let a=p.useContext(Gn).outlet;return a&&p.createElement(ky.Provider,{value:r},a)}function Zm(r,a){let{relative:l}=a===void 0?{}:a,{future:i}=p.useContext(Sr),{matches:c}=p.useContext(Gn),{pathname:d}=Xr(),f=JSON.stringify(ju(c,i.v7_relativeSplatPath));return p.useMemo(()=>bu(r,JSON.parse(f),d,l==="path"),[r,f,d,l])}function Py(r,a){return Ry(r,a)}function Ry(r,a,l,i){Ls()||ct(!1);let{navigator:c}=p.useContext(Sr),{matches:d}=p.useContext(Gn),f=d[d.length-1],m=f?f.params:{};f&&f.pathname;let x=f?f.pathnameBase:"/";f&&f.route;let g=Xr(),v;if(a){var y;let j=typeof a=="string"?Ms(a):a;x==="/"||(y=j.pathname)!=null&&y.startsWith(x)||ct(!1),v=j}else v=g;let E=v.pathname||"/",k=E;if(x!=="/"){let j=x.replace(/^\//,"").split("/");k="/"+E.replace(/^\//,"").split("/").slice(j.length).join("/")}let C=Zv(r,{pathname:k}),b=My(C&&C.map(j=>Object.assign({},j,{params:Object.assign({},m,j.params),pathname:yr([x,c.encodeLocation?c.encodeLocation(j.pathname).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?x:yr([x,c.encodeLocation?c.encodeLocation(j.pathnameBase).pathname:j.pathnameBase])})),d,l,i);return a&&b?p.createElement(wo.Provider,{value:{location:Ra({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:vr.Pop}},b):b}function _y(){let r=Fy(),a=Ny(r)?r.status+" "+r.statusText:r instanceof Error?r.message:JSON.stringify(r),l=r instanceof Error?r.stack:null,c={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},a),l?p.createElement("pre",{style:c},l):null,null)}const Ty=p.createElement(_y,null);class Iy extends p.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,l){return l.location!==a.location||l.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:l.error,location:l.location,revalidation:a.revalidation||l.revalidation}}componentDidCatch(a,l){console.error("React Router caught the following error during render",a,l)}render(){return this.state.error!==void 0?p.createElement(Gn.Provider,{value:this.props.routeContext},p.createElement(qm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ay(r){let{routeContext:a,match:l,children:i}=r,c=p.useContext(Su);return c&&c.static&&c.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=l.route.id),p.createElement(Gn.Provider,{value:a},i)}function My(r,a,l,i){var c;if(a===void 0&&(a=[]),l===void 0&&(l=null),i===void 0&&(i=null),r==null){var d;if(!l)return null;if(l.errors)r=l.matches;else if((d=i)!=null&&d.v7_partialHydration&&a.length===0&&!l.initialized&&l.matches.length>0)r=l.matches;else return null}let f=r,m=(c=l)==null?void 0:c.errors;if(m!=null){let v=f.findIndex(y=>y.route.id&&(m==null?void 0:m[y.route.id])!==void 0);v>=0||ct(!1),f=f.slice(0,Math.min(f.length,v+1))}let x=!1,g=-1;if(l&&i&&i.v7_partialHydration)for(let v=0;v<f.length;v++){let y=f[v];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(g=v),y.route.id){let{loaderData:E,errors:k}=l,C=y.route.loader&&E[y.route.id]===void 0&&(!k||k[y.route.id]===void 0);if(y.route.lazy||C){x=!0,g>=0?f=f.slice(0,g+1):f=[f[0]];break}}}return f.reduceRight((v,y,E)=>{let k,C=!1,b=null,j=null;l&&(k=m&&y.route.id?m[y.route.id]:void 0,b=y.route.errorElement||Ty,x&&(g<0&&E===0?($y("route-fallback"),C=!0,j=null):g===E&&(C=!0,j=y.route.hydrateFallbackElement||null)));let N=a.concat(f.slice(0,E+1)),R=()=>{let S;return k?S=b:C?S=j:y.route.Component?S=p.createElement(y.route.Component,null):y.route.element?S=y.route.element:S=v,p.createElement(Ay,{match:y,routeContext:{outlet:v,matches:N,isDataRoute:l!=null},children:S})};return l&&(y.route.ErrorBoundary||y.route.errorElement||E===0)?p.createElement(Iy,{location:l.location,revalidation:l.revalidation,component:b,error:k,children:R(),routeContext:{outlet:null,matches:N,isDataRoute:!0}}):R()},null)}var ep=(function(r){return r.UseBlocker="useBlocker",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r})(ep||{}),tp=(function(r){return r.UseBlocker="useBlocker",r.UseLoaderData="useLoaderData",r.UseActionData="useActionData",r.UseRouteError="useRouteError",r.UseNavigation="useNavigation",r.UseRouteLoaderData="useRouteLoaderData",r.UseMatches="useMatches",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r.UseRouteId="useRouteId",r})(tp||{});function Ly(r){let a=p.useContext(Su);return a||ct(!1),a}function Dy(r){let a=p.useContext(by);return a||ct(!1),a}function Oy(r){let a=p.useContext(Gn);return a||ct(!1),a}function np(r){let a=Oy(),l=a.matches[a.matches.length-1];return l.route.id||ct(!1),l.route.id}function Fy(){var r;let a=p.useContext(qm),l=Dy(),i=np();return a!==void 0?a:(r=l.errors)==null?void 0:r[i]}function zy(){let{router:r}=Ly(ep.UseNavigateStable),a=np(tp.UseNavigateStable),l=p.useRef(!1);return Jm(()=>{l.current=!0}),p.useCallback(function(c,d){d===void 0&&(d={}),l.current&&(typeof c=="number"?r.navigate(c):r.navigate(c,Ra({fromRouteId:a},d)))},[r,a])}const Jh={};function $y(r,a,l){Jh[r]||(Jh[r]=!0)}function By(r,a){r==null||r.v7_startTransition,r==null||r.v7_relativeSplatPath}function Uy(r){let{to:a,replace:l,state:i,relative:c}=r;Ls()||ct(!1);let{future:d,static:f}=p.useContext(Sr),{matches:m}=p.useContext(Gn),{pathname:x}=Xr(),g=Aa(),v=bu(a,ju(m,d.v7_relativeSplatPath),x,c==="path"),y=JSON.stringify(v);return p.useEffect(()=>g(JSON.parse(y),{replace:l,state:i,relative:c}),[g,y,c,l,i]),null}function Vy(r){return Ey(r.context)}function Nt(r){ct(!1)}function Wy(r){let{basename:a="/",children:l=null,location:i,navigationType:c=vr.Pop,navigator:d,static:f=!1,future:m}=r;Ls()&&ct(!1);let x=a.replace(/^\/*/,"/"),g=p.useMemo(()=>({basename:x,navigator:d,static:f,future:Ra({v7_relativeSplatPath:!1},m)}),[x,m,d,f]);typeof i=="string"&&(i=Ms(i));let{pathname:v="/",search:y="",hash:E="",state:k=null,key:C="default"}=i,b=p.useMemo(()=>{let j=Nu(v,x);return j==null?null:{location:{pathname:j,search:y,hash:E,state:k,key:C},navigationType:c}},[x,v,y,E,k,C,c]);return b==null?null:p.createElement(Sr.Provider,{value:g},p.createElement(wo.Provider,{children:l,value:b}))}function Hy(r){let{children:a,location:l}=r;return Py(Yc(a),l)}new Promise(()=>{});function Yc(r,a){a===void 0&&(a=[]);let l=[];return p.Children.forEach(r,(i,c)=>{if(!p.isValidElement(i))return;let d=[...a,c];if(i.type===p.Fragment){l.push.apply(l,Yc(i.props.children,d));return}i.type!==Nt&&ct(!1),!i.props.index||!i.props.children||ct(!1);let f={id:i.props.id||d.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(f.children=Yc(i.props.children,d)),l.push(f)}),l}/**
* React Router DOM v6.30.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Xc(){return Xc=Object.assign?Object.assign.bind():function(r){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r[i]=l[i])}return r},Xc.apply(this,arguments)}function Ky(r,a){if(r==null)return{};var l={},i=Object.keys(r),c,d;for(d=0;d<i.length;d++)c=i[d],!(a.indexOf(c)>=0)&&(l[c]=r[c]);return l}function Gy(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function Qy(r,a){return r.button===0&&(!a||a==="_self")&&!Gy(r)}const Yy=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Xy="6";try{window.__reactRouterVersion=Xy}catch{}const qy="startTransition",Zh=yo[qy];function Jy(r){let{basename:a,children:l,future:i,window:c}=r,d=p.useRef();d.current==null&&(d.current=Xv({window:c,v5Compat:!0}));let f=d.current,[m,x]=p.useState({action:f.action,location:f.location}),{v7_startTransition:g}=i||{},v=p.useCallback(y=>{g&&Zh?Zh(()=>x(y)):x(y)},[x,g]);return p.useLayoutEffect(()=>f.listen(v),[f,v]),p.useEffect(()=>By(i),[i]),p.createElement(Wy,{basename:a,children:l,location:m.location,navigationType:m.action,navigator:f,future:i})}const Zy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ew=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rp=p.forwardRef(function(a,l){let{onClick:i,relative:c,reloadDocument:d,replace:f,state:m,target:x,to:g,preventScrollReset:v,viewTransition:y}=a,E=Ky(a,Yy),{basename:k}=p.useContext(Sr),C,b=!1;if(typeof g=="string"&&ew.test(g)&&(C=g,Zy))try{let S=new URL(window.location.href),A=g.startsWith("//")?new URL(S.protocol+g):new URL(g),V=Nu(A.pathname,k);A.origin===S.origin&&V!=null?g=V+A.search+A.hash:b=!0}catch{}let j=Sy(g,{relative:c}),N=tw(g,{replace:f,state:m,target:x,preventScrollReset:v,relative:c,viewTransition:y});function R(S){i&&i(S),S.defaultPrevented||N(S)}return p.createElement("a",Xc({},E,{href:C||j,onClick:b||d?i:R,ref:l,target:x}))});var em;(function(r){r.UseScrollRestoration="useScrollRestoration",r.UseSubmit="useSubmit",r.UseSubmitFetcher="useSubmitFetcher",r.UseFetcher="useFetcher",r.useViewTransitionState="useViewTransitionState"})(em||(em={}));var tm;(function(r){r.UseFetcher="useFetcher",r.UseFetchers="useFetchers",r.UseScrollRestoration="useScrollRestoration"})(tm||(tm={}));function tw(r,a){let{target:l,replace:i,state:c,preventScrollReset:d,relative:f,viewTransition:m}=a===void 0?{}:a,x=Aa(),g=Xr(),v=Zm(r,{relative:f});return p.useCallback(y=>{if(Qy(y,l)){y.preventDefault();let E=i!==void 0?i:ao(g)===ao(v);x(r,{replace:E,state:c,preventScrollReset:d,relative:f,viewTransition:m})}},[g,x,v,i,c,l,r,d,f,m])}/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nw=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rw=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,l,i)=>i?i.toUpperCase():l.toLowerCase()),nm=r=>{const a=rw(r);return a.charAt(0).toUpperCase()+a.slice(1)},sp=(...r)=>r.filter((a,l,i)=>!!a&&a.trim()!==""&&i.indexOf(a)===l).join(" ").trim(),sw=r=>{for(const a in r)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var aw={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.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lw=p.forwardRef(({color:r="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:c="",children:d,iconNode:f,...m},x)=>p.createElement("svg",{ref:x,...aw,width:a,height:a,stroke:r,strokeWidth:i?Number(l)*24/Number(a):l,className:sp("lucide",c),...!d&&!sw(m)&&{"aria-hidden":"true"},...m},[...f.map(([g,v])=>p.createElement(g,v)),...Array.isArray(d)?d:[d]]));/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const we=(r,a)=>{const l=p.forwardRef(({className:i,...c},d)=>p.createElement(lw,{ref:d,iconNode:a,className:sp(`lucide-${nw(nm(r))}`,`lucide-${r}`,i),...c}));return l.displayName=nm(r),l};/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ow=[["path",{d:"M11.767 19.089c4.924.868 6.14-6.025 1.216-6.894m-1.216 6.894L5.86 18.047m5.908 1.042-.347 1.97m1.563-8.864c4.924.869 6.14-6.025 1.215-6.893m-1.215 6.893-3.94-.694m5.155-6.2L8.29 4.26m5.908 1.042.348-1.97M7.48 20.364l3.126-17.727",key:"yr8idg"}]],rm=we("bitcoin",ow);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const iw=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],_s=we("book-open",iw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cw=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],qc=we("calendar",cw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uw=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],No=we("check",uw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dw=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ap=we("chevron-down",dw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fw=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],hw=we("chevron-left",fw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mw=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Cu=we("chevron-right",mw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pw=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],xw=we("chevron-up",pw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gw=[["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"}]],vw=we("circle-alert",gw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yw=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Jc=we("circle-check-big",yw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ww=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],lp=we("circle-question-mark",ww);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Nw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]],sm=we("circle-user",Nw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jw=[["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"}]],bw=we("circle-x",jw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sw=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],op=we("clock",Sw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cw=[["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"}]],ip=we("copy",Cw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kw=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Zc=we("credit-card",kw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ew=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Pw=we("database",Ew);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rw=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],lo=we("dollar-sign",Rw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _w=[["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"}]],cp=we("download",_w);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tw=[["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"}]],oo=we("external-link",Tw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Iw=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ku=we("eye",Iw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Aw=[["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"}]],up=we("file-text",Aw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mw=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Lw=we("funnel",Mw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Dw=[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]],am=we("gift",Dw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ow=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],eu=we("globe",Ow);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fw=[["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"}]],lm=we("history",Fw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zw=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],$w=we("house",zw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bw=[["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"}]],Uw=we("image",Bw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Vw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],om=we("info",Vw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ww=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],im=we("key",Ww);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hw=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],Kw=we("layout-dashboard",Hw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Gw=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],ks=we("link-2",Gw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qw=[["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"}]],cm=we("link",Qw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Yw=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Xw=we("lock",Yw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qw=[["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"}]],Jw=we("log-out",qw);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Zw=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],e1=we("map-pin",Zw);/**
* @license lucide-react v0.562.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:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],n1=we("menu",t1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const r1=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],s1=we("message-circle",r1);/**
* @license lucide-react v0.562.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:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],l1=we("palette",a1);/**
* @license lucide-react v0.562.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:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Ts=we("pen-line",o1);/**
* @license lucide-react v0.562.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=[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]],um=we("percent",i1);/**
* @license lucide-react v0.562.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:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],u1=we("phone",c1);/**
* @license lucide-react v0.562.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:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Es=we("plus",d1);/**
* @license lucide-react v0.562.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=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],dm=we("qr-code",f1);/**
* @license lucide-react v0.562.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:"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"}]],et=we("refresh-cw",h1);/**
* @license lucide-react v0.562.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:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Vn=we("save",m1);/**
* @license lucide-react v0.562.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:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Vr=we("search",p1);/**
* @license lucide-react v0.562.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:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],io=we("settings",x1);/**
* @license lucide-react v0.562.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:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],v1=we("settings-2",g1);/**
* @license lucide-react v0.562.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=[["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"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],w1=we("shield-check",y1);/**
* @license lucide-react v0.562.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:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],tu=we("shopping-bag",N1);/**
* @license lucide-react v0.562.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=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],fm=we("smartphone",j1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const b1=[["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"}]],S1=we("tag",b1);/**
* @license lucide-react v0.562.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:"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"}]],dp=we("trash-2",C1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const k1=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],nu=we("trending-up",k1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const E1=[["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"}]],Cs=we("upload",E1);/**
* @license lucide-react v0.562.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:"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"}]],Zl=we("user",P1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const R1=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Pn=we("users",R1);/**
* @license lucide-react v0.562.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:"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"}]],Is=we("wallet",_1);/**
* @license lucide-react v0.562.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:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Wr=we("x",T1);/**
* @license lucide-react v0.562.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:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],A1=we("zap",I1),Eu="admin_token";function M1(){try{return localStorage.getItem(Eu)}catch{return null}}function L1(r){try{localStorage.setItem(Eu,r)}catch{}}function D1(){try{localStorage.removeItem(Eu)}catch{}}const O1="https://soulapi.quwanzhi.com",F1=()=>{const r="https://souldev.quwanzhi.com";return r.length>0?r.replace(/\/$/,""):O1};function ru(r){const a=F1(),l=r.startsWith("/")?r:`/${r}`;return a?`${a}${l}`:l}async function jo(r,a={}){const{data:l,...i}=a,c=ru(r),d=new Headers(i.headers),f=M1();f&&d.set("Authorization",`Bearer ${f}`),l!=null&&!d.has("Content-Type")&&d.set("Content-Type","application/json");const m=l!=null?JSON.stringify(l):i.body,x=await fetch(c,{...i,headers:d,body:m,credentials:"include"}),v=(x.headers.get("Content-Type")||"").includes("application/json")?await x.json():x;if(!x.ok){const y=new Error((v==null?void 0:v.error)||`HTTP ${x.status}`);throw y.status=x.status,y.data=v,y}return v}function Xe(r,a){return jo(r,{...a,method:"GET"})}function It(r,a,l){return jo(r,{...l,method:"POST",data:a})}function Wn(r,a,l){return jo(r,{...l,method:"PUT",data:a})}function z1(r,a){return jo(r,{...a,method:"DELETE"})}const $1=[{icon:Kw,label:"数据概览",href:"/dashboard"},{icon:_s,label:"内容管理",href:"/content"},{icon:Pn,label:"用户管理",href:"/users"},{icon:Is,label:"交易中心",href:"/distribution"},{icon:Zc,label:"推广设置",href:"/referral-settings"},{icon:io,label:"系统设置",href:"/settings"}];function B1(){const r=Xr(),a=Aa(),[l,i]=p.useState(!1),[c,d]=p.useState(!1);p.useEffect(()=>{i(!0)},[]),p.useEffect(()=>{if(!l)return;d(!1);let m=!1;return Xe("/api/admin").then(x=>{m||(x&&x.success!==!1?d(!0):a("/login",{replace:!0}))}).catch(()=>{m||a("/login",{replace:!0})}),()=>{m=!0}},[l,a]);const f=async()=>{D1();try{await It("/api/admin/logout",{})}catch{}a("/login",{replace:!0})};return!l||!c?n.jsxs("div",{className:"flex min-h-screen bg-[#0a1628]",children:[n.jsx("div",{className:"w-64 bg-[#0f2137] border-r border-gray-700/50"}),n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx("div",{className:"text-[#38bdac]",children:"加载中..."})})]}):n.jsxs("div",{className:"flex min-h-screen bg-[#0a1628]",children:[n.jsxs("div",{className:"w-64 bg-[#0f2137] flex flex-col border-r border-gray-700/50 shadow-xl",children:[n.jsxs("div",{className:"p-6 border-b border-gray-700/50",children:[n.jsx("h1",{className:"text-xl font-bold text-[#38bdac]",children:"管理后台"}),n.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Soul创业派对"})]}),n.jsx("nav",{className:"flex-1 p-4 space-y-1",children:$1.map(m=>{const x=r.pathname===m.href;return n.jsxs(rp,{to:m.href,className:`flex items-center gap-3 px-4 py-3 rounded-lg transition-colors ${x?"bg-[#38bdac]/20 text-[#38bdac] font-medium":"text-gray-400 hover:bg-gray-700/50 hover:text-white"}`,children:[n.jsx(m.icon,{className:"w-5 h-5"}),n.jsx("span",{className:"text-sm",children:m.label})]},m.href)})}),n.jsxs("div",{className:"p-4 border-t border-gray-700/50 space-y-1",children:[n.jsxs("button",{type:"button",onClick:f,className:"w-full flex items-center gap-3 px-4 py-3 text-gray-400 hover:text-white rounded-lg hover:bg-gray-700/50 transition-colors",children:[n.jsx(Jw,{className:"w-5 h-5"}),n.jsx("span",{className:"text-sm",children:"退出登录"})]}),n.jsx("a",{href:`${typeof window<"u"?window.location.origin:""}/view`,target:"_blank",rel:"noreferrer",className:"flex items-center gap-3 px-4 py-3 text-gray-400 hover:text-white rounded-lg hover:bg-gray-700/50 transition-colors",children:n.jsx("span",{className:"text-sm",children:"返回前台"})})]})]}),n.jsx("div",{className:"flex-1 overflow-auto bg-[#0a1628]",children:n.jsx(Vy,{})})]})}function hm(r,a){if(typeof r=="function")return r(a);r!=null&&(r.current=a)}function Pu(...r){return a=>{let l=!1;const i=r.map(c=>{const d=hm(c,a);return!l&&typeof d=="function"&&(l=!0),d});if(l)return()=>{for(let c=0;c<i.length;c++){const d=i[c];typeof d=="function"?d():hm(r[c],null)}}}}function We(...r){return p.useCallback(Pu(...r),r)}var U1=Symbol.for("react.lazy"),co=yo[" use ".trim().toString()];function V1(r){return typeof r=="object"&&r!==null&&"then"in r}function fp(r){return r!=null&&typeof r=="object"&&"$$typeof"in r&&r.$$typeof===U1&&"_payload"in r&&V1(r._payload)}function hp(r){const a=W1(r),l=p.forwardRef((i,c)=>{let{children:d,...f}=i;fp(d)&&typeof co=="function"&&(d=co(d._payload));const m=p.Children.toArray(d),x=m.find(K1);if(x){const g=x.props.children,v=m.map(y=>y===x?p.Children.count(g)>1?p.Children.only(null):p.isValidElement(g)?g.props.children:null:y);return n.jsx(a,{...f,ref:c,children:p.isValidElement(g)?p.cloneElement(g,void 0,v):null})}return n.jsx(a,{...f,ref:c,children:d})});return l.displayName=`${r}.Slot`,l}var mp=hp("Slot");function W1(r){const a=p.forwardRef((l,i)=>{let{children:c,...d}=l;if(fp(c)&&typeof co=="function"&&(c=co(c._payload)),p.isValidElement(c)){const f=Q1(c),m=G1(d,c.props);return c.type!==p.Fragment&&(m.ref=i?Pu(i,f):f),p.cloneElement(c,m)}return p.Children.count(c)>1?p.Children.only(null):null});return a.displayName=`${r}.SlotClone`,a}var H1=Symbol("radix.slottable");function K1(r){return p.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===H1}function G1(r,a){const l={...a};for(const i in a){const c=r[i],d=a[i];/^on[A-Z]/.test(i)?c&&d?l[i]=(...m)=>{const x=d(...m);return c(...m),x}:c&&(l[i]=c):i==="style"?l[i]={...c,...d}:i==="className"&&(l[i]=[c,d].filter(Boolean).join(" "))}return{...r,...l}}function Q1(r){var i,c;let a=(i=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:i.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?r.ref:(a=(c=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:c.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?r.props.ref:r.props.ref||r.ref)}function pp(r){var a,l,i="";if(typeof r=="string"||typeof r=="number")i+=r;else if(typeof r=="object")if(Array.isArray(r)){var c=r.length;for(a=0;a<c;a++)r[a]&&(l=pp(r[a]))&&(i&&(i+=" "),i+=l)}else for(l in r)r[l]&&(i&&(i+=" "),i+=l);return i}function Y1(){for(var r,a,l=0,i="",c=arguments.length;l<c;l++)(r=arguments[l])&&(a=pp(r))&&(i&&(i+=" "),i+=a);return i}const mm=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,pm=Y1,xp=(r,a)=>l=>{var i;if((a==null?void 0:a.variants)==null)return pm(r,l==null?void 0:l.class,l==null?void 0:l.className);const{variants:c,defaultVariants:d}=a,f=Object.keys(c).map(g=>{const v=l==null?void 0:l[g],y=d==null?void 0:d[g];if(v===null)return null;const E=mm(v)||mm(y);return c[g][E]}),m=l&&Object.entries(l).reduce((g,v)=>{let[y,E]=v;return E===void 0||(g[y]=E),g},{}),x=a==null||(i=a.compoundVariants)===null||i===void 0?void 0:i.reduce((g,v)=>{let{class:y,className:E,...k}=v;return Object.entries(k).every(C=>{let[b,j]=C;return Array.isArray(j)?j.includes({...d,...m}[b]):{...d,...m}[b]===j})?[...g,y,E]:g},[]);return pm(r,f,x,l==null?void 0:l.class,l==null?void 0:l.className)};function gp(r){var a,l,i="";if(typeof r=="string"||typeof r=="number")i+=r;else if(typeof r=="object")if(Array.isArray(r)){var c=r.length;for(a=0;a<c;a++)r[a]&&(l=gp(r[a]))&&(i&&(i+=" "),i+=l)}else for(l in r)r[l]&&(i&&(i+=" "),i+=l);return i}function X1(){for(var r,a,l=0,i="",c=arguments.length;l<c;l++)(r=arguments[l])&&(a=gp(r))&&(i&&(i+=" "),i+=a);return i}const q1=(r,a)=>{const l=new Array(r.length+a.length);for(let i=0;i<r.length;i++)l[i]=r[i];for(let i=0;i<a.length;i++)l[r.length+i]=a[i];return l},J1=(r,a)=>({classGroupId:r,validator:a}),vp=(r=new Map,a=null,l)=>({nextPart:r,validators:a,classGroupId:l}),uo="-",xm=[],Z1="arbitrary..",eN=r=>{const a=nN(r),{conflictingClassGroups:l,conflictingClassGroupModifiers:i}=r;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return tN(f);const m=f.split(uo),x=m[0]===""&&m.length>1?1:0;return yp(m,x,a)},getConflictingClassGroupIds:(f,m)=>{if(m){const x=i[f],g=l[f];return x?g?q1(g,x):x:g||xm}return l[f]||xm}}},yp=(r,a,l)=>{if(r.length-a===0)return l.classGroupId;const c=r[a],d=l.nextPart.get(c);if(d){const g=yp(r,a+1,d);if(g)return g}const f=l.validators;if(f===null)return;const m=a===0?r.join(uo):r.slice(a).join(uo),x=f.length;for(let g=0;g<x;g++){const v=f[g];if(v.validator(m))return v.classGroupId}},tN=r=>r.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=r.slice(1,-1),l=a.indexOf(":"),i=a.slice(0,l);return i?Z1+i:void 0})(),nN=r=>{const{theme:a,classGroups:l}=r;return rN(l,a)},rN=(r,a)=>{const l=vp();for(const i in r){const c=r[i];Ru(c,l,i,a)}return l},Ru=(r,a,l,i)=>{const c=r.length;for(let d=0;d<c;d++){const f=r[d];sN(f,a,l,i)}},sN=(r,a,l,i)=>{if(typeof r=="string"){aN(r,a,l);return}if(typeof r=="function"){lN(r,a,l,i);return}oN(r,a,l,i)},aN=(r,a,l)=>{const i=r===""?a:wp(a,r);i.classGroupId=l},lN=(r,a,l,i)=>{if(iN(r)){Ru(r(i),a,l,i);return}a.validators===null&&(a.validators=[]),a.validators.push(J1(l,r))},oN=(r,a,l,i)=>{const c=Object.entries(r),d=c.length;for(let f=0;f<d;f++){const[m,x]=c[f];Ru(x,wp(a,m),l,i)}},wp=(r,a)=>{let l=r;const i=a.split(uo),c=i.length;for(let d=0;d<c;d++){const f=i[d];let m=l.nextPart.get(f);m||(m=vp(),l.nextPart.set(f,m)),l=m}return l},iN=r=>"isThemeGetter"in r&&r.isThemeGetter===!0,cN=r=>{if(r<1)return{get:()=>{},set:()=>{}};let a=0,l=Object.create(null),i=Object.create(null);const c=(d,f)=>{l[d]=f,a++,a>r&&(a=0,i=l,l=Object.create(null))};return{get(d){let f=l[d];if(f!==void 0)return f;if((f=i[d])!==void 0)return c(d,f),f},set(d,f){d in l?l[d]=f:c(d,f)}}},su="!",gm=":",uN=[],vm=(r,a,l,i,c)=>({modifiers:r,hasImportantModifier:a,baseClassName:l,maybePostfixModifierPosition:i,isExternal:c}),dN=r=>{const{prefix:a,experimentalParseClassName:l}=r;let i=c=>{const d=[];let f=0,m=0,x=0,g;const v=c.length;for(let b=0;b<v;b++){const j=c[b];if(f===0&&m===0){if(j===gm){d.push(c.slice(x,b)),x=b+1;continue}if(j==="/"){g=b;continue}}j==="["?f++:j==="]"?f--:j==="("?m++:j===")"&&m--}const y=d.length===0?c:c.slice(x);let E=y,k=!1;y.endsWith(su)?(E=y.slice(0,-1),k=!0):y.startsWith(su)&&(E=y.slice(1),k=!0);const C=g&&g>x?g-x:void 0;return vm(d,k,E,C)};if(a){const c=a+gm,d=i;i=f=>f.startsWith(c)?d(f.slice(c.length)):vm(uN,!1,f,void 0,!0)}if(l){const c=i;i=d=>l({className:d,parseClassName:c})}return i},fN=r=>{const a=new Map;return r.orderSensitiveModifiers.forEach((l,i)=>{a.set(l,1e6+i)}),l=>{const i=[];let c=[];for(let d=0;d<l.length;d++){const f=l[d],m=f[0]==="[",x=a.has(f);m||x?(c.length>0&&(c.sort(),i.push(...c),c=[]),i.push(f)):c.push(f)}return c.length>0&&(c.sort(),i.push(...c)),i}},hN=r=>({cache:cN(r.cacheSize),parseClassName:dN(r),sortModifiers:fN(r),...eN(r)}),mN=/\s+/,pN=(r,a)=>{const{parseClassName:l,getClassGroupId:i,getConflictingClassGroupIds:c,sortModifiers:d}=a,f=[],m=r.trim().split(mN);let x="";for(let g=m.length-1;g>=0;g-=1){const v=m[g],{isExternal:y,modifiers:E,hasImportantModifier:k,baseClassName:C,maybePostfixModifierPosition:b}=l(v);if(y){x=v+(x.length>0?" "+x:x);continue}let j=!!b,N=i(j?C.substring(0,b):C);if(!N){if(!j){x=v+(x.length>0?" "+x:x);continue}if(N=i(C),!N){x=v+(x.length>0?" "+x:x);continue}j=!1}const R=E.length===0?"":E.length===1?E[0]:d(E).join(":"),S=k?R+su:R,A=S+N;if(f.indexOf(A)>-1)continue;f.push(A);const V=c(N,j);for(let Q=0;Q<V.length;++Q){const G=V[Q];f.push(S+G)}x=v+(x.length>0?" "+x:x)}return x},xN=(...r)=>{let a=0,l,i,c="";for(;a<r.length;)(l=r[a++])&&(i=Np(l))&&(c&&(c+=" "),c+=i);return c},Np=r=>{if(typeof r=="string")return r;let a,l="";for(let i=0;i<r.length;i++)r[i]&&(a=Np(r[i]))&&(l&&(l+=" "),l+=a);return l},gN=(r,...a)=>{let l,i,c,d;const f=x=>{const g=a.reduce((v,y)=>y(v),r());return l=hN(g),i=l.cache.get,c=l.cache.set,d=m,m(x)},m=x=>{const g=i(x);if(g)return g;const v=pN(x,l);return c(x,v),v};return d=f,(...x)=>d(xN(...x))},vN=[],pt=r=>{const a=l=>l[r]||vN;return a.isThemeGetter=!0,a},jp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yN=/^\d+\/\d+$/,wN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,NN=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,bN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,SN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ns=r=>yN.test(r),Le=r=>!!r&&!Number.isNaN(Number(r)),mr=r=>!!r&&Number.isInteger(Number(r)),Mc=r=>r.endsWith("%")&&Le(r.slice(0,-1)),$n=r=>wN.test(r),CN=()=>!0,kN=r=>NN.test(r)&&!jN.test(r),Sp=()=>!1,EN=r=>bN.test(r),PN=r=>SN.test(r),RN=r=>!ge(r)&&!ve(r),_N=r=>Ds(r,Ep,Sp),ge=r=>jp.test(r),Br=r=>Ds(r,Pp,kN),Lc=r=>Ds(r,LN,Le),ym=r=>Ds(r,Cp,Sp),TN=r=>Ds(r,kp,PN),Hl=r=>Ds(r,Rp,EN),ve=r=>bp.test(r),ka=r=>Os(r,Pp),IN=r=>Os(r,DN),wm=r=>Os(r,Cp),AN=r=>Os(r,Ep),MN=r=>Os(r,kp),Kl=r=>Os(r,Rp,!0),Ds=(r,a,l)=>{const i=jp.exec(r);return i?i[1]?a(i[1]):l(i[2]):!1},Os=(r,a,l=!1)=>{const i=bp.exec(r);return i?i[1]?a(i[1]):l:!1},Cp=r=>r==="position"||r==="percentage",kp=r=>r==="image"||r==="url",Ep=r=>r==="length"||r==="size"||r==="bg-size",Pp=r=>r==="length",LN=r=>r==="number",DN=r=>r==="family-name",Rp=r=>r==="shadow",ON=()=>{const r=pt("color"),a=pt("font"),l=pt("text"),i=pt("font-weight"),c=pt("tracking"),d=pt("leading"),f=pt("breakpoint"),m=pt("container"),x=pt("spacing"),g=pt("radius"),v=pt("shadow"),y=pt("inset-shadow"),E=pt("text-shadow"),k=pt("drop-shadow"),C=pt("blur"),b=pt("perspective"),j=pt("aspect"),N=pt("ease"),R=pt("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...A(),ve,ge],Q=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],U=()=>[ve,ge,x],ie=()=>[Ns,"full","auto",...U()],fe=()=>[mr,"none","subgrid",ve,ge],oe=()=>["auto",{span:["full",mr,ve,ge]},mr,ve,ge],H=()=>[mr,"auto",ve,ge],P=()=>["auto","min","max","fr",ve,ge],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...U()],$=()=>[Ns,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],T=()=>[r,ve,ge],J=()=>[...A(),wm,ym,{position:[ve,ge]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",AN,_N,{size:[ve,ge]}],B=()=>[Mc,ka,Br],le=()=>["","none","full",g,ve,ge],Z=()=>["",Le,ka,Br],be=()=>["solid","dashed","dotted","double"],je=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[Le,Mc,wm,ym],me=()=>["","none",C,ve,ge],Ee=()=>["none",Le,ve,ge],Se=()=>["none",Le,ve,ge],Te=()=>[Le,ve,ge],Ae=()=>[Ns,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[$n],breakpoint:[$n],color:[CN],container:[$n],"drop-shadow":[$n],ease:["in","out","in-out"],font:[RN],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[$n],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[$n],shadow:[$n],spacing:["px",Le],text:[$n],"text-shadow":[$n],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ns,ge,ve,j]}],container:["container"],columns:[{columns:[Le,ge,ve,m]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:Q()}],"overflow-x":[{"overflow-x":Q()}],"overflow-y":[{"overflow-y":Q()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{start:ie()}],end:[{end:ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[mr,"auto",ve,ge]}],basis:[{basis:[Ns,"full","auto",m,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,Ns,"auto","initial","none",ge]}],grow:[{grow:["",Le,ve,ge]}],shrink:[{shrink:["",Le,ve,ge]}],order:[{order:[mr,"first","last","none",ve,ge]}],"grid-cols":[{"grid-cols":fe()}],"col-start-end":[{col:oe()}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":fe()}],"row-start-end":[{row:oe()}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[m,"screen",...$()]}],"min-w":[{"min-w":[m,"screen","none",...$()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[f]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",l,ka,Br]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ve,Lc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Mc,ge]}],"font-family":[{font:[IN,ge,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,ve,ge]}],"line-clamp":[{"line-clamp":[Le,"none",ve,Lc]}],leading:[{leading:[d,...U()]}],"list-image":[{"list-image":["none",ve,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ve,Br]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[Le,"auto",ve,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:J()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mr,ve,ge],radial:["",ve,ge],conic:[mr,ve,ge]},MN,TN]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ve,ge]}],"outline-w":[{outline:["",Le,ka,Br]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",v,Kl,Hl]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",y,Kl,Hl]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[Le,Br]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",E,Kl,Hl]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[Le,ve,ge]}],"mix-blend":[{"mix-blend":[...je(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":je()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[ve,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:J()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,ge]}],filter:[{filter:["","none",ve,ge]}],blur:[{blur:me()}],brightness:[{brightness:[Le,ve,ge]}],contrast:[{contrast:[Le,ve,ge]}],"drop-shadow":[{"drop-shadow":["","none",k,Kl,Hl]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",Le,ve,ge]}],"hue-rotate":[{"hue-rotate":[Le,ve,ge]}],invert:[{invert:["",Le,ve,ge]}],saturate:[{saturate:[Le,ve,ge]}],sepia:[{sepia:["",Le,ve,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,ge]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ve,ge]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ve,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ve,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ve,ge]}],"backdrop-invert":[{"backdrop-invert":["",Le,ve,ge]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ve,ge]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ve,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ve,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ve,ge]}],ease:[{ease:["linear","initial",N,ve,ge]}],delay:[{delay:[Le,ve,ge]}],animate:[{animate:["none",R,ve,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ve,ge]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:Se()}],"scale-x":[{"scale-x":Se()}],"scale-y":[{"scale-y":Se()}],"scale-z":[{"scale-z":Se()}],"scale-3d":["scale-3d"],skew:[{skew:Te()}],"skew-x":[{"skew-x":Te()}],"skew-y":[{"skew-y":Te()}],transform:[{transform:[ve,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ae()}],"translate-x":[{"translate-x":Ae()}],"translate-y":[{"translate-y":Ae()}],"translate-z":[{"translate-z":Ae()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve,ge]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve,ge]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[Le,ka,Br,Lc]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},FN=gN(ON);function He(...r){return FN(X1(r))}const zN=xp("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function he({className:r,variant:a,size:l,asChild:i=!1,...c}){const d=i?mp:"button";return n.jsx(d,{"data-slot":"button",className:He(zN({variant:a,size:l,className:r})),...c})}function ue({className:r,type:a,...l}){return n.jsx("input",{type:a,"data-slot":"input",className:He("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none placeholder:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 md:text-sm focus-visible:ring-2 focus-visible:ring-ring",r),...l})}function $N(){const r=Aa(),[a,l]=p.useState(""),[i,c]=p.useState(""),[d,f]=p.useState(""),[m,x]=p.useState(!1),g=async()=>{f(""),x(!0);try{const v=await It("/api/admin",{username:a.trim(),password:i});if((v==null?void 0:v.success)!==!1&&(v!=null&&v.token)){L1(v.token),r("/dashboard",{replace:!0});return}f(v.error||"用户名或密码错误")}catch(v){const y=v;f(y.status===401?"用户名或密码错误":(y==null?void 0:y.message)||"网络错误,请重试")}finally{x(!1)}};return n.jsxs("div",{className:"min-h-screen bg-[#0a1628] flex items-center justify-center p-4",children:[n.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[n.jsx("div",{className:"absolute top-1/4 left-1/4 w-96 h-96 bg-[#38bdac]/5 rounded-full blur-3xl"}),n.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-96 h-96 bg-blue-500/5 rounded-full blur-3xl"})]}),n.jsxs("div",{className:"w-full max-w-md relative z-10",children:[n.jsxs("div",{className:"text-center mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-[#38bdac]/20 rounded-2xl flex items-center justify-center mx-auto mb-4 border border-[#38bdac]/30",children:n.jsx(w1,{className:"w-8 h-8 text-[#38bdac]"})}),n.jsx("h1",{className:"text-2xl font-bold text-white mb-2",children:"管理后台"}),n.jsx("p",{className:"text-gray-400",children:"一场SOUL的创业实验场"})]}),n.jsxs("div",{className:"bg-[#0f2137] rounded-2xl p-8 shadow-xl border border-gray-700/50 backdrop-blur-xl",children:[n.jsx("h2",{className:"text-xl font-semibold text-white mb-6 text-center",children:"管理员登录"}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-gray-400 text-sm mb-2",children:"用户名"}),n.jsxs("div",{className:"relative",children:[n.jsx(Zl,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-500"}),n.jsx(ue,{type:"text",value:a,onChange:v=>l(v.target.value),placeholder:"请输入用户名",className:"pl-10 bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500 focus:border-[#38bdac]"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-gray-400 text-sm mb-2",children:"密码"}),n.jsxs("div",{className:"relative",children:[n.jsx(Xw,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-500"}),n.jsx(ue,{type:"password",value:i,onChange:v=>c(v.target.value),placeholder:"请输入密码",className:"pl-10 bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500 focus:border-[#38bdac]",onKeyDown:v=>v.key==="Enter"&&g()})]})]}),d&&n.jsx("div",{className:"bg-red-500/10 text-red-400 text-sm p-3 rounded-lg border border-red-500/20",children:d}),n.jsx(he,{onClick:g,disabled:m,className:"w-full bg-[#38bdac] hover:bg-[#2da396] text-white py-5 disabled:opacity-50",children:m?"登录中...":"登录"})]})]}),n.jsx("p",{className:"text-center text-gray-500 text-xs mt-6",children:"Soul创业实验场 · 后台管理系统"})]})]})}const Re=p.forwardRef(({className:r,...a},l)=>n.jsx("div",{ref:l,className:He("rounded-xl border bg-card text-card-foreground shadow",r),...a}));Re.displayName="Card";const Ve=p.forwardRef(({className:r,...a},l)=>n.jsx("div",{ref:l,className:He("flex flex-col space-y-1.5 p-6",r),...a}));Ve.displayName="CardHeader";const Ge=p.forwardRef(({className:r,...a},l)=>n.jsx("h3",{ref:l,className:He("font-semibold leading-none tracking-tight",r),...a}));Ge.displayName="CardTitle";const gt=p.forwardRef(({className:r,...a},l)=>n.jsx("p",{ref:l,className:He("text-sm text-muted-foreground",r),...a}));gt.displayName="CardDescription";const _e=p.forwardRef(({className:r,...a},l)=>n.jsx("div",{ref:l,className:He("p-6 pt-0",r),...a}));_e.displayName="CardContent";const BN=p.forwardRef(({className:r,...a},l)=>n.jsx("div",{ref:l,className:He("flex items-center p-6 pt-0",r),...a}));BN.displayName="CardFooter";function UN(){const r=Aa(),[a,l]=p.useState(!1),[i,c]=p.useState([]),[d,f]=p.useState([]);async function m(){try{const[k,C]=await Promise.all([Xe("/api/db/users"),Xe("/api/orders")]);k!=null&&k.success&&k.users&&c(k.users),C!=null&&C.success&&C.orders&&f(C.orders)}catch(k){console.error("加载数据失败",k)}}if(p.useEffect(()=>{l(!0),m()},[]),!a)return n.jsxs("div",{className:"p-8 max-w-7xl mx-auto",children:[n.jsx("h1",{className:"text-2xl font-bold mb-8 text-white",children:"数据概览"}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:[1,2,3,4].map(k=>n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsx("div",{className:"h-4 w-20 bg-gray-700 rounded animate-pulse"}),n.jsx("div",{className:"w-8 h-8 bg-gray-700 rounded-lg animate-pulse"})]}),n.jsx(_e,{children:n.jsx("div",{className:"h-8 w-16 bg-gray-700 rounded animate-pulse"})})]},k))}),n.jsxs("div",{className:"flex items-center justify-center py-8",children:[n.jsx(et,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]})]});const x=d.reduce((k,C)=>k+Number(C.amount||0),0),g=i.length,v=d.length,y=k=>{const C=k.productType||"",b=k.description||"";if(b){if(C==="section"&&b.includes("章节")){if(b.includes("-")){const j=b.split("-");if(j.length>=3)return{title:`${j[1]}章 第${j[2]}`,subtitle:"《一场Soul的创业实验》"}}return{title:b,subtitle:"章节购买"}}return C==="fullbook"||b.includes("全书")?{title:"《一场Soul的创业实验》",subtitle:"全书购买"}:C==="match"||b.includes("伙伴")?{title:"找伙伴匹配",subtitle:"功能服务"}:{title:b,subtitle:C==="section"?"单章":C==="fullbook"?"全书":"其他"}}return C==="section"?{title:`章节 ${k.productId||""}`,subtitle:"单章购买"}:C==="fullbook"?{title:"《一场Soul的创业实验》",subtitle:"全书购买"}:C==="match"?{title:"找伙伴匹配",subtitle:"功能服务"}:{title:"未知商品",subtitle:C||"其他"}},E=[{title:"总用户数",value:g,icon:Pn,color:"text-blue-400",bg:"bg-blue-500/20",link:"/users"},{title:"总收入",value:`¥${Number(x).toFixed(2)}`,icon:nu,color:"text-[#38bdac]",bg:"bg-[#38bdac]/20",link:"/orders"},{title:"订单数",value:v,icon:tu,color:"text-purple-400",bg:"bg-purple-500/20",link:"/orders"},{title:"转化率",value:`${g>0?(v/g*100).toFixed(1):0}%`,icon:_s,color:"text-orange-400",bg:"bg-orange-500/20",link:"/distribution"}];return n.jsxs("div",{className:"p-8 max-w-7xl mx-auto",children:[n.jsx("h1",{className:"text-2xl font-bold mb-8 text-white",children:"数据概览"}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:E.map((k,C)=>n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl cursor-pointer hover:border-[#38bdac]/50 transition-colors group",onClick:()=>k.link&&r(k.link),children:[n.jsxs(Ve,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsx(Ge,{className:"text-sm font-medium text-gray-400",children:k.title}),n.jsx("div",{className:`p-2 rounded-lg ${k.bg}`,children:n.jsx(k.icon,{className:`w-4 h-4 ${k.color}`})})]}),n.jsx(_e,{children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"text-2xl font-bold text-white",children:k.value}),n.jsx(Cu,{className:"w-5 h-5 text-gray-600 group-hover:text-[#38bdac] transition-colors"})]})})]},C))}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsx(Ve,{children:n.jsx(Ge,{className:"text-white",children:"最近订单"})}),n.jsx(_e,{children:n.jsxs("div",{className:"space-y-3",children:[d.slice(-5).reverse().map(k=>{var R;const C=k.referrerId?i.find(S=>S.id===k.referrerId):void 0,b=k.referralCode||(C==null?void 0:C.referralCode)||(C==null?void 0:C.nickname)||(k.referrerId?String(k.referrerId).slice(0,8):""),j=y(k),N=k.userNickname||((R=i.find(S=>S.id===k.userId))==null?void 0:R.nickname)||"匿名用户";return n.jsxs("div",{className:"flex items-start justify-between p-4 bg-[#0a1628] rounded-lg border border-gray-700/30 hover:border-[#38bdac]/30 transition-colors",children:[n.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[k.userAvatar?n.jsx("img",{src:k.userAvatar,alt:N,className:"w-9 h-9 rounded-full object-cover flex-shrink-0 mt-0.5",onError:S=>{S.currentTarget.style.display="none";const A=S.currentTarget.nextElementSibling;A&&A.classList.remove("hidden")}}):null,n.jsx("div",{className:`w-9 h-9 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm font-medium text-[#38bdac] flex-shrink-0 mt-0.5 ${k.userAvatar?"hidden":""}`,children:N.charAt(0)}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("span",{className:"text-sm text-gray-300",children:N}),n.jsx("span",{className:"text-gray-600",children:"·"}),n.jsx("span",{className:"text-sm font-medium text-white truncate",children:j.title})]}),n.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[n.jsx("span",{className:"px-1.5 py-0.5 bg-gray-700/50 rounded",children:j.subtitle}),n.jsx("span",{children:new Date(k.createdAt||0).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})})]}),b&&n.jsxs("p",{className:"text-xs text-gray-600 mt-1",children:["推荐: ",b]})]})]}),n.jsxs("div",{className:"text-right ml-4 flex-shrink-0",children:[n.jsxs("p",{className:"text-sm font-bold text-[#38bdac]",children:["+¥",Number(k.amount).toFixed(2)]}),n.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:k.paymentMethod||"微信"})]})]},k.id)}),d.length===0&&n.jsxs("div",{className:"text-center py-12",children:[n.jsx(tu,{className:"w-12 h-12 text-gray-600 mx-auto mb-3"}),n.jsx("p",{className:"text-gray-500",children:"暂无订单数据"})]})]})})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsx(Ve,{children:n.jsx(Ge,{className:"text-white",children:"新注册用户"})}),n.jsx(_e,{children:n.jsxs("div",{className:"space-y-3",children:[i.slice(0,5).map(k=>{var C;return n.jsxs("div",{className:"flex items-center justify-between p-4 bg-[#0a1628] rounded-lg border border-gray-700/30",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-10 h-10 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm font-medium text-[#38bdac]",children:((C=k.nickname)==null?void 0:C.charAt(0))||"?"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:k.nickname||"匿名用户"}),n.jsx("p",{className:"text-xs text-gray-500",children:k.phone||"-"})]})]}),n.jsx("p",{className:"text-xs text-gray-400",children:k.createdAt?new Date(k.createdAt).toLocaleDateString():"-"})]},k.id)}),i.length===0&&n.jsx("p",{className:"text-gray-500 text-center py-8",children:"暂无用户数据"})]})})]})]})]})}const bo=p.forwardRef(({className:r,...a},l)=>n.jsx("div",{className:"relative w-full overflow-auto",children:n.jsx("table",{ref:l,className:He("w-full caption-bottom text-sm",r),...a})}));bo.displayName="Table";const So=p.forwardRef(({className:r,...a},l)=>n.jsx("thead",{ref:l,className:He("[&_tr]:border-b",r),...a}));So.displayName="TableHeader";const Co=p.forwardRef(({className:r,...a},l)=>n.jsx("tbody",{ref:l,className:He("[&_tr:last-child]:border-0",r),...a}));Co.displayName="TableBody";const Un=p.forwardRef(({className:r,...a},l)=>n.jsx("tr",{ref:l,className:He("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",r),...a}));Un.displayName="TableRow";const tt=p.forwardRef(({className:r,...a},l)=>n.jsx("th",{ref:l,className:He("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",r),...a}));tt.displayName="TableHead";const Ye=p.forwardRef(({className:r,...a},l)=>n.jsx("td",{ref:l,className:He("p-4 align-middle [&:has([role=checkbox])]:pr-0",r),...a}));Ye.displayName="TableCell";const VN=xp("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-white",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Fe({className:r,variant:a,asChild:l=!1,...i}){const c=l?mp:"span";return n.jsx(c,{className:He(VN({variant:a}),r),...i})}function WN(){const[r,a]=p.useState([]),[l,i]=p.useState([]),[c,d]=p.useState(""),[f,m]=p.useState("all"),[x,g]=p.useState(!0);async function v(){g(!0);try{const[N,R]=await Promise.all([Xe("/api/orders"),Xe("/api/db/users")]);N!=null&&N.success&&N.orders&&a(N.orders),R!=null&&R.success&&R.users&&i(R.users)}catch(N){console.error("加载订单失败",N)}finally{g(!1)}}p.useEffect(()=>{v()},[]);const y=N=>{var R;return N.userNickname||((R=l.find(S=>S.id===N.userId))==null?void 0:R.nickname)||"匿名用户"},E=N=>{var R;return((R=l.find(S=>S.id===N))==null?void 0:R.phone)||"-"},k=N=>{const R=N.productType||N.type||"",S=N.description||"";if(S){if(R==="section"&&S.includes("章节")){if(S.includes("-")){const A=S.split("-");if(A.length>=3)return{name:`${A[1]}章 第${A[2]}`,type:"《一场Soul的创业实验》"}}return{name:S,type:"章节购买"}}return R==="fullbook"||S.includes("全书")?{name:"《一场Soul的创业实验》",type:"全书购买"}:R==="match"||S.includes("伙伴")?{name:"找伙伴匹配",type:"功能服务"}:{name:S,type:"其他"}}return R==="section"?{name:`章节 ${N.productId||N.sectionId||""}`,type:"单章"}:R==="fullbook"?{name:"《一场Soul的创业实验》",type:"全书"}:R==="match"?{name:"找伙伴匹配",type:"功能"}:{name:"未知商品",type:R||"其他"}},C=r.filter(N=>{const R=k(N),S=y(N).includes(c)||E(N.userId).includes(c)||R.name.includes(c)||N.orderSn&&N.orderSn.includes(c)||N.id&&N.id.includes(c),A=f==="all"||N.status===f||f==="completed"&&N.status==="paid";return S&&A}),b=r.filter(N=>N.status==="paid"||N.status==="completed").reduce((N,R)=>N+Number(R.amount||0),0),j=r.filter(N=>{const R=new Date().toDateString();return(N.status==="paid"||N.status==="completed")&&new Date(N.createdAt).toDateString()===R}).reduce((N,R)=>N+Number(R.amount||0),0);return n.jsxs("div",{className:"p-8 max-w-7xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"订单管理"}),n.jsxs("p",{className:"text-gray-400 mt-1",children:["共 ",r.length," 笔订单"]})]}),n.jsx("div",{className:"flex items-center gap-4",children:n.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[n.jsx("span",{className:"text-gray-400",children:"总收入:"}),n.jsxs("span",{className:"text-[#38bdac] font-bold",children:["¥",b.toFixed(2)]}),n.jsx("span",{className:"text-gray-600",children:"|"}),n.jsx("span",{className:"text-gray-400",children:"今日:"}),n.jsxs("span",{className:"text-[#FFD700] font-bold",children:["¥",j.toFixed(2)]})]})})]}),n.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[n.jsxs("div",{className:"relative flex-1 max-w-md",children:[n.jsx(Vr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500"}),n.jsx(ue,{type:"text",placeholder:"搜索订单号/用户/章节...",className:"pl-10 bg-[#0f2137] border-gray-700 text-white placeholder:text-gray-500",value:c,onChange:N=>d(N.target.value)})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Lw,{className:"w-4 h-4 text-gray-400"}),n.jsxs("select",{value:f,onChange:N=>m(N.target.value),className:"bg-[#0f2137] border border-gray-700 text-white rounded-lg px-3 py-2 text-sm",children:[n.jsx("option",{value:"all",children:"全部状态"}),n.jsx("option",{value:"completed",children:"已完成"}),n.jsx("option",{value:"pending",children:"待支付"}),n.jsx("option",{value:"created",children:"已创建"}),n.jsx("option",{value:"failed",children:"已失败"})]})]}),n.jsxs(he,{variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(cp,{className:"w-4 h-4 mr-2"}),"导出"]})]}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:n.jsx(_e,{className:"p-0",children:x?n.jsxs("div",{className:"flex items-center justify-center py-12",children:[n.jsx(et,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):n.jsxs(bo,{children:[n.jsx(So,{children:n.jsxs(Un,{className:"bg-[#0a1628] hover:bg-[#0a1628] border-gray-700",children:[n.jsx(tt,{className:"text-gray-400",children:"订单号"}),n.jsx(tt,{className:"text-gray-400",children:"用户"}),n.jsx(tt,{className:"text-gray-400",children:"商品"}),n.jsx(tt,{className:"text-gray-400",children:"金额"}),n.jsx(tt,{className:"text-gray-400",children:"支付方式"}),n.jsx(tt,{className:"text-gray-400",children:"状态"}),n.jsx(tt,{className:"text-gray-400",children:"分销佣金"}),n.jsx(tt,{className:"text-gray-400",children:"下单时间"})]})}),n.jsxs(Co,{children:[C.map(N=>{const R=k(N);return n.jsxs(Un,{className:"hover:bg-[#0a1628] border-gray-700/50",children:[n.jsxs(Ye,{className:"font-mono text-xs text-gray-400",children:[(N.orderSn||N.id||"").slice(0,12),"..."]}),n.jsx(Ye,{children:n.jsxs("div",{children:[n.jsx("p",{className:"text-white text-sm",children:y(N)}),n.jsx("p",{className:"text-gray-500 text-xs",children:E(N.userId)})]})}),n.jsx(Ye,{children:n.jsxs("div",{children:[n.jsx("p",{className:"text-white text-sm",children:R.name}),n.jsx("p",{className:"text-gray-500 text-xs",children:R.type})]})}),n.jsxs(Ye,{className:"text-[#38bdac] font-bold",children:["¥",Number(N.amount||0).toFixed(2)]}),n.jsx(Ye,{className:"text-gray-300",children:N.paymentMethod==="wechat"?"微信支付":N.paymentMethod==="alipay"?"支付宝":N.paymentMethod||"微信支付"}),n.jsx(Ye,{children:N.status==="paid"||N.status==="completed"?n.jsx(Fe,{className:"bg-green-500/20 text-green-400 hover:bg-green-500/20 border-0",children:"已完成"}):N.status==="pending"||N.status==="created"?n.jsx(Fe,{className:"bg-yellow-500/20 text-yellow-400 hover:bg-yellow-500/20 border-0",children:"待支付"}):n.jsx(Fe,{className:"bg-red-500/20 text-red-400 hover:bg-red-500/20 border-0",children:"已失败"})}),n.jsx(Ye,{className:"text-[#FFD700]",children:N.referrerEarnings?`¥${Number(N.referrerEarnings).toFixed(2)}`:"-"}),n.jsx(Ye,{className:"text-gray-400 text-sm",children:new Date(N.createdAt).toLocaleString("zh-CN")})]},N.id)}),C.length===0&&n.jsx(Un,{children:n.jsx(Ye,{colSpan:8,className:"text-center py-12 text-gray-500",children:"暂无订单数据"})})]})]})})})]})}var HN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],KN=HN.reduce((r,a)=>{const l=hp(`Primitive.${a}`),i=p.forwardRef((c,d)=>{const{asChild:f,...m}=c,x=f?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n.jsx(x,{...m,ref:d})});return i.displayName=`Primitive.${a}`,{...r,[a]:i}},{}),GN="Label",_p=p.forwardRef((r,a)=>n.jsx(KN.label,{...r,ref:a,onMouseDown:l=>{var c;l.target.closest("button, input, select, textarea")||((c=r.onMouseDown)==null||c.call(r,l),!l.defaultPrevented&&l.detail>1&&l.preventDefault())}}));_p.displayName=GN;var Tp=_p;const ae=p.forwardRef(({className:r,...a},l)=>n.jsx(Tp,{ref:l,className:He("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r),...a}));ae.displayName=Tp.displayName;function Ie(r,a,{checkForDefaultPrevented:l=!0}={}){return function(c){if(r==null||r(c),l===!1||!c.defaultPrevented)return a==null?void 0:a(c)}}function QN(r,a){const l=p.createContext(a),i=d=>{const{children:f,...m}=d,x=p.useMemo(()=>m,Object.values(m));return n.jsx(l.Provider,{value:x,children:f})};i.displayName=r+"Provider";function c(d){const f=p.useContext(l);if(f)return f;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${r}\``)}return[i,c]}function Cr(r,a=[]){let l=[];function i(d,f){const m=p.createContext(f),x=l.length;l=[...l,f];const g=y=>{var N;const{scope:E,children:k,...C}=y,b=((N=E==null?void 0:E[r])==null?void 0:N[x])||m,j=p.useMemo(()=>C,Object.values(C));return n.jsx(b.Provider,{value:j,children:k})};g.displayName=d+"Provider";function v(y,E){var b;const k=((b=E==null?void 0:E[r])==null?void 0:b[x])||m,C=p.useContext(k);if(C)return C;if(f!==void 0)return f;throw new Error(`\`${y}\` must be used within \`${d}\``)}return[g,v]}const c=()=>{const d=l.map(f=>p.createContext(f));return function(m){const x=(m==null?void 0:m[r])||d;return p.useMemo(()=>({[`__scope${r}`]:{...m,[r]:x}}),[m,x])}};return c.scopeName=r,[i,YN(c,...a)]}function YN(...r){const a=r[0];if(r.length===1)return a;const l=()=>{const i=r.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(d){const f=i.reduce((m,{useScope:x,scopeName:g})=>{const y=x(d)[`__scope${g}`];return{...m,...y}},{});return p.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return l.scopeName=a.scopeName,l}var Rt=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},XN=yo[" useId ".trim().toString()]||(()=>{}),qN=0;function wr(r){const[a,l]=p.useState(XN());return Rt(()=>{l(i=>i??String(qN++))},[r]),a?`radix-${a}`:""}var JN=yo[" useInsertionEffect ".trim().toString()]||Rt;function Hr({prop:r,defaultProp:a,onChange:l=()=>{},caller:i}){const[c,d,f]=ZN({defaultProp:a,onChange:l}),m=r!==void 0,x=m?r:c;{const v=p.useRef(r!==void 0);p.useEffect(()=>{const y=v.current;y!==m&&console.warn(`${i} is changing from ${y?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=m},[m,i])}const g=p.useCallback(v=>{var y;if(m){const E=ej(v)?v(r):v;E!==r&&((y=f.current)==null||y.call(f,E))}else d(v)},[m,r,d,f]);return[x,g]}function ZN({defaultProp:r,onChange:a}){const[l,i]=p.useState(r),c=p.useRef(l),d=p.useRef(a);return JN(()=>{d.current=a},[a]),p.useEffect(()=>{var f;c.current!==l&&((f=d.current)==null||f.call(d,l),c.current=l)},[l,c]),[l,i,d]}function ej(r){return typeof r=="function"}function _a(r){const a=tj(r),l=p.forwardRef((i,c)=>{const{children:d,...f}=i,m=p.Children.toArray(d),x=m.find(rj);if(x){const g=x.props.children,v=m.map(y=>y===x?p.Children.count(g)>1?p.Children.only(null):p.isValidElement(g)?g.props.children:null:y);return n.jsx(a,{...f,ref:c,children:p.isValidElement(g)?p.cloneElement(g,void 0,v):null})}return n.jsx(a,{...f,ref:c,children:d})});return l.displayName=`${r}.Slot`,l}function tj(r){const a=p.forwardRef((l,i)=>{const{children:c,...d}=l;if(p.isValidElement(c)){const f=aj(c),m=sj(d,c.props);return c.type!==p.Fragment&&(m.ref=i?Pu(i,f):f),p.cloneElement(c,m)}return p.Children.count(c)>1?p.Children.only(null):null});return a.displayName=`${r}.SlotClone`,a}var nj=Symbol("radix.slottable");function rj(r){return p.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===nj}function sj(r,a){const l={...a};for(const i in a){const c=r[i],d=a[i];/^on[A-Z]/.test(i)?c&&d?l[i]=(...m)=>{const x=d(...m);return c(...m),x}:c&&(l[i]=c):i==="style"?l[i]={...c,...d}:i==="className"&&(l[i]=[c,d].filter(Boolean).join(" "))}return{...r,...l}}function aj(r){var i,c;let a=(i=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:i.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?r.ref:(a=(c=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:c.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?r.props.ref:r.props.ref||r.ref)}var lj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],De=lj.reduce((r,a)=>{const l=_a(`Primitive.${a}`),i=p.forwardRef((c,d)=>{const{asChild:f,...m}=c,x=f?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n.jsx(x,{...m,ref:d})});return i.displayName=`Primitive.${a}`,{...r,[a]:i}},{});function oj(r,a){r&&Ia.flushSync(()=>r.dispatchEvent(a))}function Nr(r){const a=p.useRef(r);return p.useEffect(()=>{a.current=r}),p.useMemo(()=>(...l)=>{var i;return(i=a.current)==null?void 0:i.call(a,...l)},[])}function ij(r,a=globalThis==null?void 0:globalThis.document){const l=Nr(r);p.useEffect(()=>{const i=c=>{c.key==="Escape"&&l(c)};return a.addEventListener("keydown",i,{capture:!0}),()=>a.removeEventListener("keydown",i,{capture:!0})},[l,a])}var cj="DismissableLayer",au="dismissableLayer.update",uj="dismissableLayer.pointerDownOutside",dj="dismissableLayer.focusOutside",Nm,Ip=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_u=p.forwardRef((r,a)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:m,...x}=r,g=p.useContext(Ip),[v,y]=p.useState(null),E=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=p.useState({}),C=We(a,G=>y(G)),b=Array.from(g.layers),[j]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),N=b.indexOf(j),R=v?b.indexOf(v):-1,S=g.layersWithOutsidePointerEventsDisabled.size>0,A=R>=N,V=mj(G=>{const U=G.target,ie=[...g.branches].some(fe=>fe.contains(U));!A||ie||(c==null||c(G),f==null||f(G),G.defaultPrevented||m==null||m())},E),Q=pj(G=>{const U=G.target;[...g.branches].some(fe=>fe.contains(U))||(d==null||d(G),f==null||f(G),G.defaultPrevented||m==null||m())},E);return ij(G=>{R===g.layers.size-1&&(i==null||i(G),!G.defaultPrevented&&m&&(G.preventDefault(),m()))},E),p.useEffect(()=>{if(v)return l&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(Nm=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(v)),g.layers.add(v),jm(),()=>{l&&g.layersWithOutsidePointerEventsDisabled.size===1&&(E.body.style.pointerEvents=Nm)}},[v,E,l,g]),p.useEffect(()=>()=>{v&&(g.layers.delete(v),g.layersWithOutsidePointerEventsDisabled.delete(v),jm())},[v,g]),p.useEffect(()=>{const G=()=>k({});return document.addEventListener(au,G),()=>document.removeEventListener(au,G)},[]),n.jsx(De.div,{...x,ref:C,style:{pointerEvents:S?A?"auto":"none":void 0,...r.style},onFocusCapture:Ie(r.onFocusCapture,Q.onFocusCapture),onBlurCapture:Ie(r.onBlurCapture,Q.onBlurCapture),onPointerDownCapture:Ie(r.onPointerDownCapture,V.onPointerDownCapture)})});_u.displayName=cj;var fj="DismissableLayerBranch",hj=p.forwardRef((r,a)=>{const l=p.useContext(Ip),i=p.useRef(null),c=We(a,i);return p.useEffect(()=>{const d=i.current;if(d)return l.branches.add(d),()=>{l.branches.delete(d)}},[l.branches]),n.jsx(De.div,{...r,ref:c})});hj.displayName=fj;function mj(r,a=globalThis==null?void 0:globalThis.document){const l=Nr(r),i=p.useRef(!1),c=p.useRef(()=>{});return p.useEffect(()=>{const d=m=>{if(m.target&&!i.current){let x=function(){Ap(uj,l,g,{discrete:!0})};const g={originalEvent:m};m.pointerType==="touch"?(a.removeEventListener("click",c.current),c.current=x,a.addEventListener("click",c.current,{once:!0})):x()}else a.removeEventListener("click",c.current);i.current=!1},f=window.setTimeout(()=>{a.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(f),a.removeEventListener("pointerdown",d),a.removeEventListener("click",c.current)}},[a,l]),{onPointerDownCapture:()=>i.current=!0}}function pj(r,a=globalThis==null?void 0:globalThis.document){const l=Nr(r),i=p.useRef(!1);return p.useEffect(()=>{const c=d=>{d.target&&!i.current&&Ap(dj,l,{originalEvent:d},{discrete:!1})};return a.addEventListener("focusin",c),()=>a.removeEventListener("focusin",c)},[a,l]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function jm(){const r=new CustomEvent(au);document.dispatchEvent(r)}function Ap(r,a,l,{discrete:i}){const c=l.originalEvent.target,d=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:l});a&&c.addEventListener(r,a,{once:!0}),i?oj(c,d):c.dispatchEvent(d)}var Dc="focusScope.autoFocusOnMount",Oc="focusScope.autoFocusOnUnmount",bm={bubbles:!1,cancelable:!0},xj="FocusScope",Tu=p.forwardRef((r,a)=>{const{loop:l=!1,trapped:i=!1,onMountAutoFocus:c,onUnmountAutoFocus:d,...f}=r,[m,x]=p.useState(null),g=Nr(c),v=Nr(d),y=p.useRef(null),E=We(a,b=>x(b)),k=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(i){let b=function(S){if(k.paused||!m)return;const A=S.target;m.contains(A)?y.current=A:xr(y.current,{select:!0})},j=function(S){if(k.paused||!m)return;const A=S.relatedTarget;A!==null&&(m.contains(A)||xr(y.current,{select:!0}))},N=function(S){if(document.activeElement===document.body)for(const V of S)V.removedNodes.length>0&&xr(m)};document.addEventListener("focusin",b),document.addEventListener("focusout",j);const R=new MutationObserver(N);return m&&R.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",j),R.disconnect()}}},[i,m,k.paused]),p.useEffect(()=>{if(m){Cm.add(k);const b=document.activeElement;if(!m.contains(b)){const N=new CustomEvent(Dc,bm);m.addEventListener(Dc,g),m.dispatchEvent(N),N.defaultPrevented||(gj(jj(Mp(m)),{select:!0}),document.activeElement===b&&xr(m))}return()=>{m.removeEventListener(Dc,g),setTimeout(()=>{const N=new CustomEvent(Oc,bm);m.addEventListener(Oc,v),m.dispatchEvent(N),N.defaultPrevented||xr(b??document.body,{select:!0}),m.removeEventListener(Oc,v),Cm.remove(k)},0)}}},[m,g,v,k]);const C=p.useCallback(b=>{if(!l&&!i||k.paused)return;const j=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,N=document.activeElement;if(j&&N){const R=b.currentTarget,[S,A]=vj(R);S&&A?!b.shiftKey&&N===A?(b.preventDefault(),l&&xr(S,{select:!0})):b.shiftKey&&N===S&&(b.preventDefault(),l&&xr(A,{select:!0})):N===R&&b.preventDefault()}},[l,i,k.paused]);return n.jsx(De.div,{tabIndex:-1,...f,ref:E,onKeyDown:C})});Tu.displayName=xj;function gj(r,{select:a=!1}={}){const l=document.activeElement;for(const i of r)if(xr(i,{select:a}),document.activeElement!==l)return}function vj(r){const a=Mp(r),l=Sm(a,r),i=Sm(a.reverse(),r);return[l,i]}function Mp(r){const a=[],l=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const c=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||c?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)a.push(l.currentNode);return a}function Sm(r,a){for(const l of r)if(!yj(l,{upTo:a}))return l}function yj(r,{upTo:a}){if(getComputedStyle(r).visibility==="hidden")return!0;for(;r;){if(a!==void 0&&r===a)return!1;if(getComputedStyle(r).display==="none")return!0;r=r.parentElement}return!1}function wj(r){return r instanceof HTMLInputElement&&"select"in r}function xr(r,{select:a=!1}={}){if(r&&r.focus){const l=document.activeElement;r.focus({preventScroll:!0}),r!==l&&wj(r)&&a&&r.select()}}var Cm=Nj();function Nj(){let r=[];return{add(a){const l=r[0];a!==l&&(l==null||l.pause()),r=km(r,a),r.unshift(a)},remove(a){var l;r=km(r,a),(l=r[0])==null||l.resume()}}}function km(r,a){const l=[...r],i=l.indexOf(a);return i!==-1&&l.splice(i,1),l}function jj(r){return r.filter(a=>a.tagName!=="A")}var bj="Portal",Iu=p.forwardRef((r,a)=>{var m;const{container:l,...i}=r,[c,d]=p.useState(!1);Rt(()=>d(!0),[]);const f=l||c&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return f?Yv.createPortal(n.jsx(De.div,{...i,ref:a}),f):null});Iu.displayName=bj;function Sj(r,a){return p.useReducer((l,i)=>a[l][i]??l,r)}var Ma=r=>{const{present:a,children:l}=r,i=Cj(a),c=typeof l=="function"?l({present:i.isPresent}):p.Children.only(l),d=We(i.ref,kj(c));return typeof l=="function"||i.isPresent?p.cloneElement(c,{ref:d}):null};Ma.displayName="Presence";function Cj(r){const[a,l]=p.useState(),i=p.useRef(null),c=p.useRef(r),d=p.useRef("none"),f=r?"mounted":"unmounted",[m,x]=Sj(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const g=Gl(i.current);d.current=m==="mounted"?g:"none"},[m]),Rt(()=>{const g=i.current,v=c.current;if(v!==r){const E=d.current,k=Gl(g);r?x("MOUNT"):k==="none"||(g==null?void 0:g.display)==="none"?x("UNMOUNT"):x(v&&E!==k?"ANIMATION_OUT":"UNMOUNT"),c.current=r}},[r,x]),Rt(()=>{if(a){let g;const v=a.ownerDocument.defaultView??window,y=k=>{const b=Gl(i.current).includes(CSS.escape(k.animationName));if(k.target===a&&b&&(x("ANIMATION_END"),!c.current)){const j=a.style.animationFillMode;a.style.animationFillMode="forwards",g=v.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=j)})}},E=k=>{k.target===a&&(d.current=Gl(i.current))};return a.addEventListener("animationstart",E),a.addEventListener("animationcancel",y),a.addEventListener("animationend",y),()=>{v.clearTimeout(g),a.removeEventListener("animationstart",E),a.removeEventListener("animationcancel",y),a.removeEventListener("animationend",y)}}else x("ANIMATION_END")},[a,x]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:p.useCallback(g=>{i.current=g?getComputedStyle(g):null,l(g)},[])}}function Gl(r){return(r==null?void 0:r.animationName)||"none"}function kj(r){var i,c;let a=(i=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:i.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?r.ref:(a=(c=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:c.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?r.props.ref:r.props.ref||r.ref)}var Fc=0;function Lp(){p.useEffect(()=>{const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",r[0]??Em()),document.body.insertAdjacentElement("beforeend",r[1]??Em()),Fc++,()=>{Fc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),Fc--}},[])}function Em(){const r=document.createElement("span");return r.setAttribute("data-radix-focus-guard",""),r.tabIndex=0,r.style.outline="none",r.style.opacity="0",r.style.position="fixed",r.style.pointerEvents="none",r}var jn=function(){return jn=Object.assign||function(a){for(var l,i=1,c=arguments.length;i<c;i++){l=arguments[i];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(a[d]=l[d])}return a},jn.apply(this,arguments)};function Dp(r,a){var l={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&a.indexOf(i)<0&&(l[i]=r[i]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,i=Object.getOwnPropertySymbols(r);c<i.length;c++)a.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(r,i[c])&&(l[i[c]]=r[i[c]]);return l}function Ej(r,a,l){if(l||arguments.length===2)for(var i=0,c=a.length,d;i<c;i++)(d||!(i in a))&&(d||(d=Array.prototype.slice.call(a,0,i)),d[i]=a[i]);return r.concat(d||Array.prototype.slice.call(a))}var eo="right-scroll-bar-position",to="width-before-scroll-bar",Pj="with-scroll-bars-hidden",Rj="--removed-body-scroll-bar-size";function zc(r,a){return typeof r=="function"?r(a):r&&(r.current=a),r}function _j(r,a){var l=p.useState(function(){return{value:r,callback:a,facade:{get current(){return l.value},set current(i){var c=l.value;c!==i&&(l.value=i,l.callback(i,c))}}}})[0];return l.callback=a,l.facade}var Tj=typeof window<"u"?p.useLayoutEffect:p.useEffect,Pm=new WeakMap;function Ij(r,a){var l=_j(null,function(i){return r.forEach(function(c){return zc(c,i)})});return Tj(function(){var i=Pm.get(l);if(i){var c=new Set(i),d=new Set(r),f=l.current;c.forEach(function(m){d.has(m)||zc(m,null)}),d.forEach(function(m){c.has(m)||zc(m,f)})}Pm.set(l,r)},[r]),l}function Aj(r){return r}function Mj(r,a){a===void 0&&(a=Aj);var l=[],i=!1,c={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:r},useMedium:function(d){var f=a(d,i);return l.push(f),function(){l=l.filter(function(m){return m!==f})}},assignSyncMedium:function(d){for(i=!0;l.length;){var f=l;l=[],f.forEach(d)}l={push:function(m){return d(m)},filter:function(){return l}}},assignMedium:function(d){i=!0;var f=[];if(l.length){var m=l;l=[],m.forEach(d),f=l}var x=function(){var v=f;f=[],v.forEach(d)},g=function(){return Promise.resolve().then(x)};g(),l={push:function(v){f.push(v),g()},filter:function(v){return f=f.filter(v),l}}}};return c}function Lj(r){r===void 0&&(r={});var a=Mj(null);return a.options=jn({async:!0,ssr:!1},r),a}var Op=function(r){var a=r.sideCar,l=Dp(r,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=a.read();if(!i)throw new Error("Sidecar medium not found");return p.createElement(i,jn({},l))};Op.isSideCarExport=!0;function Dj(r,a){return r.useMedium(a),Op}var Fp=Lj(),$c=function(){},ko=p.forwardRef(function(r,a){var l=p.useRef(null),i=p.useState({onScrollCapture:$c,onWheelCapture:$c,onTouchMoveCapture:$c}),c=i[0],d=i[1],f=r.forwardProps,m=r.children,x=r.className,g=r.removeScrollBar,v=r.enabled,y=r.shards,E=r.sideCar,k=r.noRelative,C=r.noIsolation,b=r.inert,j=r.allowPinchZoom,N=r.as,R=N===void 0?"div":N,S=r.gapMode,A=Dp(r,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),V=E,Q=Ij([l,a]),G=jn(jn({},A),c);return p.createElement(p.Fragment,null,v&&p.createElement(V,{sideCar:Fp,removeScrollBar:g,shards:y,noRelative:k,noIsolation:C,inert:b,setCallbacks:d,allowPinchZoom:!!j,lockRef:l,gapMode:S}),f?p.cloneElement(p.Children.only(m),jn(jn({},G),{ref:Q})):p.createElement(R,jn({},G,{className:x,ref:Q}),m))});ko.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ko.classNames={fullWidth:to,zeroRight:eo};var Oj=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Fj(){if(!document)return null;var r=document.createElement("style");r.type="text/css";var a=Oj();return a&&r.setAttribute("nonce",a),r}function zj(r,a){r.styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a))}function $j(r){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(r)}var Bj=function(){var r=0,a=null;return{add:function(l){r==0&&(a=Fj())&&(zj(a,l),$j(a)),r++},remove:function(){r--,!r&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},Uj=function(){var r=Bj();return function(a,l){p.useEffect(function(){return r.add(a),function(){r.remove()}},[a&&l])}},zp=function(){var r=Uj(),a=function(l){var i=l.styles,c=l.dynamic;return r(i,c),null};return a},Vj={left:0,top:0,right:0,gap:0},Bc=function(r){return parseInt(r||"",10)||0},Wj=function(r){var a=window.getComputedStyle(document.body),l=a[r==="padding"?"paddingLeft":"marginLeft"],i=a[r==="padding"?"paddingTop":"marginTop"],c=a[r==="padding"?"paddingRight":"marginRight"];return[Bc(l),Bc(i),Bc(c)]},Hj=function(r){if(r===void 0&&(r="margin"),typeof window>"u")return Vj;var a=Wj(r),l=document.documentElement.clientWidth,i=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,i-l+a[2]-a[0])}},Kj=zp(),Ps="data-scroll-locked",Gj=function(r,a,l,i){var c=r.left,d=r.top,f=r.right,m=r.gap;return l===void 0&&(l="margin"),`
.`.concat(Pj,` {
overflow: hidden `).concat(i,`;
padding-right: `).concat(m,"px ").concat(i,`;
}
body[`).concat(Ps,`] {
overflow: hidden `).concat(i,`;
overscroll-behavior: contain;
`).concat([a&&"position: relative ".concat(i,";"),l==="margin"&&`
padding-left: `.concat(c,`px;
padding-top: `).concat(d,`px;
padding-right: `).concat(f,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(m,"px ").concat(i,`;
`),l==="padding"&&"padding-right: ".concat(m,"px ").concat(i,";")].filter(Boolean).join(""),`
}
.`).concat(eo,` {
right: `).concat(m,"px ").concat(i,`;
}
.`).concat(to,` {
margin-right: `).concat(m,"px ").concat(i,`;
}
.`).concat(eo," .").concat(eo,` {
right: 0 `).concat(i,`;
}
.`).concat(to," .").concat(to,` {
margin-right: 0 `).concat(i,`;
}
body[`).concat(Ps,`] {
`).concat(Rj,": ").concat(m,`px;
}
`)},Rm=function(){var r=parseInt(document.body.getAttribute(Ps)||"0",10);return isFinite(r)?r:0},Qj=function(){p.useEffect(function(){return document.body.setAttribute(Ps,(Rm()+1).toString()),function(){var r=Rm()-1;r<=0?document.body.removeAttribute(Ps):document.body.setAttribute(Ps,r.toString())}},[])},Yj=function(r){var a=r.noRelative,l=r.noImportant,i=r.gapMode,c=i===void 0?"margin":i;Qj();var d=p.useMemo(function(){return Hj(c)},[c]);return p.createElement(Kj,{styles:Gj(d,!a,c,l?"":"!important")})},lu=!1;if(typeof window<"u")try{var Ql=Object.defineProperty({},"passive",{get:function(){return lu=!0,!0}});window.addEventListener("test",Ql,Ql),window.removeEventListener("test",Ql,Ql)}catch{lu=!1}var js=lu?{passive:!1}:!1,Xj=function(r){return r.tagName==="TEXTAREA"},$p=function(r,a){if(!(r instanceof Element))return!1;var l=window.getComputedStyle(r);return l[a]!=="hidden"&&!(l.overflowY===l.overflowX&&!Xj(r)&&l[a]==="visible")},qj=function(r){return $p(r,"overflowY")},Jj=function(r){return $p(r,"overflowX")},_m=function(r,a){var l=a.ownerDocument,i=a;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var c=Bp(r,i);if(c){var d=Up(r,i),f=d[1],m=d[2];if(f>m)return!0}i=i.parentNode}while(i&&i!==l.body);return!1},Zj=function(r){var a=r.scrollTop,l=r.scrollHeight,i=r.clientHeight;return[a,l,i]},eb=function(r){var a=r.scrollLeft,l=r.scrollWidth,i=r.clientWidth;return[a,l,i]},Bp=function(r,a){return r==="v"?qj(a):Jj(a)},Up=function(r,a){return r==="v"?Zj(a):eb(a)},tb=function(r,a){return r==="h"&&a==="rtl"?-1:1},nb=function(r,a,l,i,c){var d=tb(r,window.getComputedStyle(a).direction),f=d*i,m=l.target,x=a.contains(m),g=!1,v=f>0,y=0,E=0;do{if(!m)break;var k=Up(r,m),C=k[0],b=k[1],j=k[2],N=b-j-d*C;(C||N)&&Bp(r,m)&&(y+=N,E+=C);var R=m.parentNode;m=R&&R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?R.host:R}while(!x&&m!==document.body||x&&(a.contains(m)||a===m));return(v&&Math.abs(y)<1||!v&&Math.abs(E)<1)&&(g=!0),g},Yl=function(r){return"changedTouches"in r?[r.changedTouches[0].clientX,r.changedTouches[0].clientY]:[0,0]},Tm=function(r){return[r.deltaX,r.deltaY]},Im=function(r){return r&&"current"in r?r.current:r},rb=function(r,a){return r[0]===a[0]&&r[1]===a[1]},sb=function(r){return`
.block-interactivity-`.concat(r,` {pointer-events: none;}
.allow-interactivity-`).concat(r,` {pointer-events: all;}
`)},ab=0,bs=[];function lb(r){var a=p.useRef([]),l=p.useRef([0,0]),i=p.useRef(),c=p.useState(ab++)[0],d=p.useState(zp)[0],f=p.useRef(r);p.useEffect(function(){f.current=r},[r]),p.useEffect(function(){if(r.inert){document.body.classList.add("block-interactivity-".concat(c));var b=Ej([r.lockRef.current],(r.shards||[]).map(Im),!0).filter(Boolean);return b.forEach(function(j){return j.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),b.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(c))})}}},[r.inert,r.lockRef.current,r.shards]);var m=p.useCallback(function(b,j){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!f.current.allowPinchZoom;var N=Yl(b),R=l.current,S="deltaX"in b?b.deltaX:R[0]-N[0],A="deltaY"in b?b.deltaY:R[1]-N[1],V,Q=b.target,G=Math.abs(S)>Math.abs(A)?"h":"v";if("touches"in b&&G==="h"&&Q.type==="range")return!1;var U=window.getSelection(),ie=U&&U.anchorNode,fe=ie?ie===Q||ie.contains(Q):!1;if(fe)return!1;var oe=_m(G,Q);if(!oe)return!0;if(oe?V=G:(V=G==="v"?"h":"v",oe=_m(G,Q)),!oe)return!1;if(!i.current&&"changedTouches"in b&&(S||A)&&(i.current=V),!V)return!0;var H=i.current||V;return nb(H,j,b,H==="h"?S:A)},[]),x=p.useCallback(function(b){var j=b;if(!(!bs.length||bs[bs.length-1]!==d)){var N="deltaY"in j?Tm(j):Yl(j),R=a.current.filter(function(V){return V.name===j.type&&(V.target===j.target||j.target===V.shadowParent)&&rb(V.delta,N)})[0];if(R&&R.should){j.cancelable&&j.preventDefault();return}if(!R){var S=(f.current.shards||[]).map(Im).filter(Boolean).filter(function(V){return V.contains(j.target)}),A=S.length>0?m(j,S[0]):!f.current.noIsolation;A&&j.cancelable&&j.preventDefault()}}},[]),g=p.useCallback(function(b,j,N,R){var S={name:b,delta:j,target:N,should:R,shadowParent:ob(N)};a.current.push(S),setTimeout(function(){a.current=a.current.filter(function(A){return A!==S})},1)},[]),v=p.useCallback(function(b){l.current=Yl(b),i.current=void 0},[]),y=p.useCallback(function(b){g(b.type,Tm(b),b.target,m(b,r.lockRef.current))},[]),E=p.useCallback(function(b){g(b.type,Yl(b),b.target,m(b,r.lockRef.current))},[]);p.useEffect(function(){return bs.push(d),r.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:E}),document.addEventListener("wheel",x,js),document.addEventListener("touchmove",x,js),document.addEventListener("touchstart",v,js),function(){bs=bs.filter(function(b){return b!==d}),document.removeEventListener("wheel",x,js),document.removeEventListener("touchmove",x,js),document.removeEventListener("touchstart",v,js)}},[]);var k=r.removeScrollBar,C=r.inert;return p.createElement(p.Fragment,null,C?p.createElement(d,{styles:sb(c)}):null,k?p.createElement(Yj,{noRelative:r.noRelative,gapMode:r.gapMode}):null)}function ob(r){for(var a=null;r!==null;)r instanceof ShadowRoot&&(a=r.host,r=r.host),r=r.parentNode;return a}const ib=Dj(Fp,lb);var Au=p.forwardRef(function(r,a){return p.createElement(ko,jn({},r,{ref:a,sideCar:ib}))});Au.classNames=ko.classNames;var cb=function(r){if(typeof document>"u")return null;var a=Array.isArray(r)?r[0]:r;return a.ownerDocument.body},Ss=new WeakMap,Xl=new WeakMap,ql={},Uc=0,Vp=function(r){return r&&(r.host||Vp(r.parentNode))},ub=function(r,a){return a.map(function(l){if(r.contains(l))return l;var i=Vp(l);return i&&r.contains(i)?i:(console.error("aria-hidden",l,"in not contained inside",r,". Doing nothing"),null)}).filter(function(l){return!!l})},db=function(r,a,l,i){var c=ub(a,Array.isArray(r)?r:[r]);ql[l]||(ql[l]=new WeakMap);var d=ql[l],f=[],m=new Set,x=new Set(c),g=function(y){!y||m.has(y)||(m.add(y),g(y.parentNode))};c.forEach(g);var v=function(y){!y||x.has(y)||Array.prototype.forEach.call(y.children,function(E){if(m.has(E))v(E);else try{var k=E.getAttribute(i),C=k!==null&&k!=="false",b=(Ss.get(E)||0)+1,j=(d.get(E)||0)+1;Ss.set(E,b),d.set(E,j),f.push(E),b===1&&C&&Xl.set(E,!0),j===1&&E.setAttribute(l,"true"),C||E.setAttribute(i,"true")}catch(N){console.error("aria-hidden: cannot operate on ",E,N)}})};return v(a),m.clear(),Uc++,function(){f.forEach(function(y){var E=Ss.get(y)-1,k=d.get(y)-1;Ss.set(y,E),d.set(y,k),E||(Xl.has(y)||y.removeAttribute(i),Xl.delete(y)),k||y.removeAttribute(l)}),Uc--,Uc||(Ss=new WeakMap,Ss=new WeakMap,Xl=new WeakMap,ql={})}},Wp=function(r,a,l){l===void 0&&(l="data-aria-hidden");var i=Array.from(Array.isArray(r)?r:[r]),c=cb(r);return c?(i.push.apply(i,Array.from(c.querySelectorAll("[aria-live], script"))),db(i,c,l,"aria-hidden")):function(){return null}},Eo="Dialog",[Hp]=Cr(Eo),[fb,pn]=Hp(Eo),Kp=r=>{const{__scopeDialog:a,children:l,open:i,defaultOpen:c,onOpenChange:d,modal:f=!0}=r,m=p.useRef(null),x=p.useRef(null),[g,v]=Hr({prop:i,defaultProp:c??!1,onChange:d,caller:Eo});return n.jsx(fb,{scope:a,triggerRef:m,contentRef:x,contentId:wr(),titleId:wr(),descriptionId:wr(),open:g,onOpenChange:v,onOpenToggle:p.useCallback(()=>v(y=>!y),[v]),modal:f,children:l})};Kp.displayName=Eo;var Gp="DialogTrigger",hb=p.forwardRef((r,a)=>{const{__scopeDialog:l,...i}=r,c=pn(Gp,l),d=We(a,c.triggerRef);return n.jsx(De.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":Du(c.open),...i,ref:d,onClick:Ie(r.onClick,c.onOpenToggle)})});hb.displayName=Gp;var Mu="DialogPortal",[mb,Qp]=Hp(Mu,{forceMount:void 0}),Yp=r=>{const{__scopeDialog:a,forceMount:l,children:i,container:c}=r,d=pn(Mu,a);return n.jsx(mb,{scope:a,forceMount:l,children:p.Children.map(i,f=>n.jsx(Ma,{present:l||d.open,children:n.jsx(Iu,{asChild:!0,container:c,children:f})}))})};Yp.displayName=Mu;var fo="DialogOverlay",Xp=p.forwardRef((r,a)=>{const l=Qp(fo,r.__scopeDialog),{forceMount:i=l.forceMount,...c}=r,d=pn(fo,r.__scopeDialog);return d.modal?n.jsx(Ma,{present:i||d.open,children:n.jsx(xb,{...c,ref:a})}):null});Xp.displayName=fo;var pb=_a("DialogOverlay.RemoveScroll"),xb=p.forwardRef((r,a)=>{const{__scopeDialog:l,...i}=r,c=pn(fo,l);return n.jsx(Au,{as:pb,allowPinchZoom:!0,shards:[c.contentRef],children:n.jsx(De.div,{"data-state":Du(c.open),...i,ref:a,style:{pointerEvents:"auto",...i.style}})})}),Kr="DialogContent",qp=p.forwardRef((r,a)=>{const l=Qp(Kr,r.__scopeDialog),{forceMount:i=l.forceMount,...c}=r,d=pn(Kr,r.__scopeDialog);return n.jsx(Ma,{present:i||d.open,children:d.modal?n.jsx(gb,{...c,ref:a}):n.jsx(vb,{...c,ref:a})})});qp.displayName=Kr;var gb=p.forwardRef((r,a)=>{const l=pn(Kr,r.__scopeDialog),i=p.useRef(null),c=We(a,l.contentRef,i);return p.useEffect(()=>{const d=i.current;if(d)return Wp(d)},[]),n.jsx(Jp,{...r,ref:c,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ie(r.onCloseAutoFocus,d=>{var f;d.preventDefault(),(f=l.triggerRef.current)==null||f.focus()}),onPointerDownOutside:Ie(r.onPointerDownOutside,d=>{const f=d.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0;(f.button===2||m)&&d.preventDefault()}),onFocusOutside:Ie(r.onFocusOutside,d=>d.preventDefault())})}),vb=p.forwardRef((r,a)=>{const l=pn(Kr,r.__scopeDialog),i=p.useRef(!1),c=p.useRef(!1);return n.jsx(Jp,{...r,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,m;(f=r.onCloseAutoFocus)==null||f.call(r,d),d.defaultPrevented||(i.current||(m=l.triggerRef.current)==null||m.focus(),d.preventDefault()),i.current=!1,c.current=!1},onInteractOutside:d=>{var x,g;(x=r.onInteractOutside)==null||x.call(r,d),d.defaultPrevented||(i.current=!0,d.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const f=d.target;((g=l.triggerRef.current)==null?void 0:g.contains(f))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&c.current&&d.preventDefault()}})}),Jp=p.forwardRef((r,a)=>{const{__scopeDialog:l,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:d,...f}=r,m=pn(Kr,l),x=p.useRef(null),g=We(a,x);return Lp(),n.jsxs(n.Fragment,{children:[n.jsx(Tu,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:c,onUnmountAutoFocus:d,children:n.jsx(_u,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Du(m.open),...f,ref:g,onDismiss:()=>m.onOpenChange(!1)})}),n.jsxs(n.Fragment,{children:[n.jsx(yb,{titleId:m.titleId}),n.jsx(Nb,{contentRef:x,descriptionId:m.descriptionId})]})]})}),Lu="DialogTitle",Zp=p.forwardRef((r,a)=>{const{__scopeDialog:l,...i}=r,c=pn(Lu,l);return n.jsx(De.h2,{id:c.titleId,...i,ref:a})});Zp.displayName=Lu;var ex="DialogDescription",tx=p.forwardRef((r,a)=>{const{__scopeDialog:l,...i}=r,c=pn(ex,l);return n.jsx(De.p,{id:c.descriptionId,...i,ref:a})});tx.displayName=ex;var nx="DialogClose",rx=p.forwardRef((r,a)=>{const{__scopeDialog:l,...i}=r,c=pn(nx,l);return n.jsx(De.button,{type:"button",...i,ref:a,onClick:Ie(r.onClick,()=>c.onOpenChange(!1))})});rx.displayName=nx;function Du(r){return r?"open":"closed"}var sx="DialogTitleWarning",[HC,ax]=QN(sx,{contentName:Kr,titleName:Lu,docsSlug:"dialog"}),yb=({titleId:r})=>{const a=ax(sx),l=`\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;return p.useEffect(()=>{r&&(document.getElementById(r)||console.error(l))},[l,r]),null},wb="DialogDescriptionWarning",Nb=({contentRef:r,descriptionId:a})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ax(wb).contentName}}.`;return p.useEffect(()=>{var d;const c=(d=r.current)==null?void 0:d.getAttribute("aria-describedby");a&&c&&(document.getElementById(a)||console.warn(i))},[i,r,a]),null},jb=Kp,bb=Yp,Sb=Xp,Cb=qp,kb=Zp,Eb=tx,Pb=rx;function bn(r){return n.jsx(jb,{"data-slot":"dialog",...r})}function Rb(r){return n.jsx(bb,{...r})}const lx=p.forwardRef(({className:r,...a},l)=>n.jsx(Sb,{ref:l,className:He("fixed inset-0 z-50 bg-black/50",r),...a}));lx.displayName="DialogOverlay";const fn=p.forwardRef(({className:r,children:a,showCloseButton:l=!0,...i},c)=>n.jsxs(Rb,{children:[n.jsx(lx,{}),n.jsxs(Cb,{ref:c,className:He("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg border bg-background p-6 shadow-lg sm:max-w-lg",r),...i,children:[a,l&&n.jsxs(Pb,{className:"absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[n.jsx(Wr,{className:"h-4 w-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));fn.displayName="DialogContent";function Sn({className:r,...a}){return n.jsx("div",{className:He("flex flex-col gap-2 text-center sm:text-left",r),...a})}function Bn({className:r,...a}){return n.jsx("div",{className:He("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",r),...a})}function Cn(r){return n.jsx(kb,{className:"text-lg font-semibold leading-none",...r})}function _b(r){return n.jsx(Eb,{className:"text-sm text-muted-foreground",...r})}function Ou(r){const a=p.useRef({value:r,previous:r});return p.useMemo(()=>(a.current.value!==r&&(a.current.previous=a.current.value,a.current.value=r),a.current.previous),[r])}function Fu(r){const[a,l]=p.useState(void 0);return Rt(()=>{if(r){l({width:r.offsetWidth,height:r.offsetHeight});const i=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const d=c[0];let f,m;if("borderBoxSize"in d){const x=d.borderBoxSize,g=Array.isArray(x)?x[0]:x;f=g.inlineSize,m=g.blockSize}else f=r.offsetWidth,m=r.offsetHeight;l({width:f,height:m})});return i.observe(r,{box:"border-box"}),()=>i.unobserve(r)}else l(void 0)},[r]),a}var Po="Switch",[Tb]=Cr(Po),[Ib,Ab]=Tb(Po),ox=p.forwardRef((r,a)=>{const{__scopeSwitch:l,name:i,checked:c,defaultChecked:d,required:f,disabled:m,value:x="on",onCheckedChange:g,form:v,...y}=r,[E,k]=p.useState(null),C=We(a,S=>k(S)),b=p.useRef(!1),j=E?v||!!E.closest("form"):!0,[N,R]=Hr({prop:c,defaultProp:d??!1,onChange:g,caller:Po});return n.jsxs(Ib,{scope:l,checked:N,disabled:m,children:[n.jsx(De.button,{type:"button",role:"switch","aria-checked":N,"aria-required":f,"data-state":dx(N),"data-disabled":m?"":void 0,disabled:m,value:x,...y,ref:C,onClick:Ie(r.onClick,S=>{R(A=>!A),j&&(b.current=S.isPropagationStopped(),b.current||S.stopPropagation())})}),j&&n.jsx(ux,{control:E,bubbles:!b.current,name:i,value:x,checked:N,required:f,disabled:m,form:v,style:{transform:"translateX(-100%)"}})]})});ox.displayName=Po;var ix="SwitchThumb",cx=p.forwardRef((r,a)=>{const{__scopeSwitch:l,...i}=r,c=Ab(ix,l);return n.jsx(De.span,{"data-state":dx(c.checked),"data-disabled":c.disabled?"":void 0,...i,ref:a})});cx.displayName=ix;var Mb="SwitchBubbleInput",ux=p.forwardRef(({__scopeSwitch:r,control:a,checked:l,bubbles:i=!0,...c},d)=>{const f=p.useRef(null),m=We(f,d),x=Ou(l),g=Fu(a);return p.useEffect(()=>{const v=f.current;if(!v)return;const y=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(y,"checked").set;if(x!==l&&k){const C=new Event("click",{bubbles:i});k.call(v,l),v.dispatchEvent(C)}},[x,l,i]),n.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:l,...c,tabIndex:-1,ref:m,style:{...c.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ux.displayName=Mb;function dx(r){return r?"checked":"unchecked"}var fx=ox,Lb=cx;const xt=p.forwardRef(({className:r,...a},l)=>n.jsx(fx,{className:He("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#38bdac] focus-visible:ring-offset-2 focus-visible:ring-offset-[#0a1628] disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-gray-600 data-[state=checked]:bg-[#38bdac]",r),...a,ref:l,children:n.jsx(Lb,{className:He("pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));xt.displayName=fx.displayName;function zu(r){const a=r+"CollectionProvider",[l,i]=Cr(a),[c,d]=l(a,{collectionRef:{current:null},itemMap:new Map}),f=b=>{const{scope:j,children:N}=b,R=pr.useRef(null),S=pr.useRef(new Map).current;return n.jsx(c,{scope:j,itemMap:S,collectionRef:R,children:N})};f.displayName=a;const m=r+"CollectionSlot",x=_a(m),g=pr.forwardRef((b,j)=>{const{scope:N,children:R}=b,S=d(m,N),A=We(j,S.collectionRef);return n.jsx(x,{ref:A,children:R})});g.displayName=m;const v=r+"CollectionItemSlot",y="data-radix-collection-item",E=_a(v),k=pr.forwardRef((b,j)=>{const{scope:N,children:R,...S}=b,A=pr.useRef(null),V=We(j,A),Q=d(v,N);return pr.useEffect(()=>(Q.itemMap.set(A,{ref:A,...S}),()=>void Q.itemMap.delete(A))),n.jsx(E,{[y]:"",ref:V,children:R})});k.displayName=v;function C(b){const j=d(r+"CollectionConsumer",b);return pr.useCallback(()=>{const R=j.collectionRef.current;if(!R)return[];const S=Array.from(R.querySelectorAll(`[${y}]`));return Array.from(j.itemMap.values()).sort((Q,G)=>S.indexOf(Q.ref.current)-S.indexOf(G.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:f,Slot:g,ItemSlot:k},C,i]}var Db=p.createContext(void 0);function Ro(r){const a=p.useContext(Db);return r||a||"ltr"}var Vc="rovingFocusGroup.onEntryFocus",Ob={bubbles:!1,cancelable:!0},La="RovingFocusGroup",[ou,hx,Fb]=zu(La),[zb,mx]=Cr(La,[Fb]),[$b,Bb]=zb(La),px=p.forwardRef((r,a)=>n.jsx(ou.Provider,{scope:r.__scopeRovingFocusGroup,children:n.jsx(ou.Slot,{scope:r.__scopeRovingFocusGroup,children:n.jsx(Ub,{...r,ref:a})})}));px.displayName=La;var Ub=p.forwardRef((r,a)=>{const{__scopeRovingFocusGroup:l,orientation:i,loop:c=!1,dir:d,currentTabStopId:f,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:x,onEntryFocus:g,preventScrollOnEntryFocus:v=!1,...y}=r,E=p.useRef(null),k=We(a,E),C=Ro(d),[b,j]=Hr({prop:f,defaultProp:m??null,onChange:x,caller:La}),[N,R]=p.useState(!1),S=Nr(g),A=hx(l),V=p.useRef(!1),[Q,G]=p.useState(0);return p.useEffect(()=>{const U=E.current;if(U)return U.addEventListener(Vc,S),()=>U.removeEventListener(Vc,S)},[S]),n.jsx($b,{scope:l,orientation:i,dir:C,loop:c,currentTabStopId:b,onItemFocus:p.useCallback(U=>j(U),[j]),onItemShiftTab:p.useCallback(()=>R(!0),[]),onFocusableItemAdd:p.useCallback(()=>G(U=>U+1),[]),onFocusableItemRemove:p.useCallback(()=>G(U=>U-1),[]),children:n.jsx(De.div,{tabIndex:N||Q===0?-1:0,"data-orientation":i,...y,ref:k,style:{outline:"none",...r.style},onMouseDown:Ie(r.onMouseDown,()=>{V.current=!0}),onFocus:Ie(r.onFocus,U=>{const ie=!V.current;if(U.target===U.currentTarget&&ie&&!N){const fe=new CustomEvent(Vc,Ob);if(U.currentTarget.dispatchEvent(fe),!fe.defaultPrevented){const oe=A().filter(W=>W.focusable),H=oe.find(W=>W.active),P=oe.find(W=>W.id===b),re=[H,P,...oe].filter(Boolean).map(W=>W.ref.current);vx(re,v)}}V.current=!1}),onBlur:Ie(r.onBlur,()=>R(!1))})})}),xx="RovingFocusGroupItem",gx=p.forwardRef((r,a)=>{const{__scopeRovingFocusGroup:l,focusable:i=!0,active:c=!1,tabStopId:d,children:f,...m}=r,x=wr(),g=d||x,v=Bb(xx,l),y=v.currentTabStopId===g,E=hx(l),{onFocusableItemAdd:k,onFocusableItemRemove:C,currentTabStopId:b}=v;return p.useEffect(()=>{if(i)return k(),()=>C()},[i,k,C]),n.jsx(ou.ItemSlot,{scope:l,id:g,focusable:i,active:c,children:n.jsx(De.span,{tabIndex:y?0:-1,"data-orientation":v.orientation,...m,ref:a,onMouseDown:Ie(r.onMouseDown,j=>{i?v.onItemFocus(g):j.preventDefault()}),onFocus:Ie(r.onFocus,()=>v.onItemFocus(g)),onKeyDown:Ie(r.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){v.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const N=Hb(j,v.orientation,v.dir);if(N!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let S=E().filter(A=>A.focusable).map(A=>A.ref.current);if(N==="last")S.reverse();else if(N==="prev"||N==="next"){N==="prev"&&S.reverse();const A=S.indexOf(j.currentTarget);S=v.loop?Kb(S,A+1):S.slice(A+1)}setTimeout(()=>vx(S))}}),children:typeof f=="function"?f({isCurrentTabStop:y,hasTabStop:b!=null}):f})})});gx.displayName=xx;var Vb={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Wb(r,a){return a!=="rtl"?r:r==="ArrowLeft"?"ArrowRight":r==="ArrowRight"?"ArrowLeft":r}function Hb(r,a,l){const i=Wb(r.key,l);if(!(a==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(a==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return Vb[i]}function vx(r,a=!1){const l=document.activeElement;for(const i of r)if(i===l||(i.focus({preventScroll:a}),document.activeElement!==l))return}function Kb(r,a){return r.map((l,i)=>r[(a+i)%r.length])}var Gb=px,Qb=gx,_o="Tabs",[Yb]=Cr(_o,[mx]),yx=mx(),[Xb,$u]=Yb(_o),wx=p.forwardRef((r,a)=>{const{__scopeTabs:l,value:i,onValueChange:c,defaultValue:d,orientation:f="horizontal",dir:m,activationMode:x="automatic",...g}=r,v=Ro(m),[y,E]=Hr({prop:i,onChange:c,defaultProp:d??"",caller:_o});return n.jsx(Xb,{scope:l,baseId:wr(),value:y,onValueChange:E,orientation:f,dir:v,activationMode:x,children:n.jsx(De.div,{dir:v,"data-orientation":f,...g,ref:a})})});wx.displayName=_o;var Nx="TabsList",jx=p.forwardRef((r,a)=>{const{__scopeTabs:l,loop:i=!0,...c}=r,d=$u(Nx,l),f=yx(l);return n.jsx(Gb,{asChild:!0,...f,orientation:d.orientation,dir:d.dir,loop:i,children:n.jsx(De.div,{role:"tablist","aria-orientation":d.orientation,...c,ref:a})})});jx.displayName=Nx;var bx="TabsTrigger",Sx=p.forwardRef((r,a)=>{const{__scopeTabs:l,value:i,disabled:c=!1,...d}=r,f=$u(bx,l),m=yx(l),x=Ex(f.baseId,i),g=Px(f.baseId,i),v=i===f.value;return n.jsx(Qb,{asChild:!0,...m,focusable:!c,active:v,children:n.jsx(De.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":g,"data-state":v?"active":"inactive","data-disabled":c?"":void 0,disabled:c,id:x,...d,ref:a,onMouseDown:Ie(r.onMouseDown,y=>{!c&&y.button===0&&y.ctrlKey===!1?f.onValueChange(i):y.preventDefault()}),onKeyDown:Ie(r.onKeyDown,y=>{[" ","Enter"].includes(y.key)&&f.onValueChange(i)}),onFocus:Ie(r.onFocus,()=>{const y=f.activationMode!=="manual";!v&&!c&&y&&f.onValueChange(i)})})})});Sx.displayName=bx;var Cx="TabsContent",kx=p.forwardRef((r,a)=>{const{__scopeTabs:l,value:i,forceMount:c,children:d,...f}=r,m=$u(Cx,l),x=Ex(m.baseId,i),g=Px(m.baseId,i),v=i===m.value,y=p.useRef(v);return p.useEffect(()=>{const E=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(E)},[]),n.jsx(Ma,{present:c||v,children:({present:E})=>n.jsx(De.div,{"data-state":v?"active":"inactive","data-orientation":m.orientation,role:"tabpanel","aria-labelledby":x,hidden:!E,id:g,tabIndex:0,...f,ref:a,style:{...r.style,animationDuration:y.current?"0s":void 0},children:E&&d})})});kx.displayName=Cx;function Ex(r,a){return`${r}-trigger-${a}`}function Px(r,a){return`${r}-content-${a}`}var qb=wx,Rx=jx,_x=Sx,Tx=kx;const Bu=qb,To=p.forwardRef(({className:r,...a},l)=>n.jsx(Rx,{ref:l,className:He("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",r),...a}));To.displayName=Rx.displayName;const tn=p.forwardRef(({className:r,...a},l)=>n.jsx(_x,{ref:l,className:He("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",r),...a}));tn.displayName=_x.displayName;const nn=p.forwardRef(({className:r,...a},l)=>n.jsx(Tx,{ref:l,className:He("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",r),...a}));nn.displayName=Tx.displayName;function Jb({open:r,onClose:a,userId:l,onUserUpdated:i}){var W;const[c,d]=p.useState(null),[f,m]=p.useState([]),[x,g]=p.useState([]),[v,y]=p.useState(!1),[E,k]=p.useState(!1),[C,b]=p.useState(!1),[j,N]=p.useState("info"),[R,S]=p.useState(""),[A,V]=p.useState(""),[Q,G]=p.useState([]),[U,ie]=p.useState("");p.useEffect(()=>{r&&l&&fe()},[r,l]);async function fe(){if(l){y(!0);try{const $=await Xe(`/api/db/users?id=${encodeURIComponent(l)}`);if($!=null&&$.success&&$.user){const T=$.user;d(T),S(T.phone||""),V(T.nickname||""),G(typeof T.tags=="string"?JSON.parse(T.tags||"[]"):[])}try{const T=await Xe(`/api/user/track?userId=${encodeURIComponent(l)}&limit=50`);T!=null&&T.success&&T.tracks&&m(T.tracks)}catch{m([])}try{const T=await Xe(`/api/db/users/referrals?userId=${encodeURIComponent(l)}`);T!=null&&T.success&&T.referrals&&g(T.referrals)}catch{g([])}}catch($){console.error("Load user detail error:",$)}finally{y(!1)}}}async function oe(){if(!(c!=null&&c.phone)){alert("用户未绑定手机号,无法同步");return}k(!0);try{const $=await It("/api/ckb/sync",{action:"full_sync",phone:c.phone,userId:c.id});$!=null&&$.success?(alert("同步成功"),fe()):alert("同步失败: "+($==null?void 0:$.error))}catch($){console.error("Sync CKB error:",$),alert("同步失败")}finally{k(!1)}}async function H(){if(c){b(!0);try{const $=await Wn("/api/db/users",{id:c.id,phone:R||void 0,nickname:A||void 0,tags:JSON.stringify(Q)});$!=null&&$.success?(alert("保存成功"),fe(),i==null||i()):alert("保存失败: "+($==null?void 0:$.error))}catch($){console.error("Save user error:",$),alert("保存失败")}finally{b(!1)}}}const P=()=>{U&&!Q.includes(U)&&(G([...Q,U]),ie(""))},K=$=>{G(Q.filter(T=>T!==$))},re=$=>{const J={view_chapter:_s,purchase:tu,match:Pn,login:Zl,register:Zl,share:ks,bind_phone:u1,bind_wechat:s1}[$]||lm;return n.jsx(J,{className:"w-4 h-4"})};return r?n.jsx(bn,{open:r,onOpenChange:()=>a(),children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-4xl max-h-[90vh] overflow-hidden",children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(Zl,{className:"w-5 h-5 text-[#38bdac]"}),"用户详情",(c==null?void 0:c.phone)&&n.jsx(Fe,{className:"bg-green-500/20 text-green-400 border-0 ml-2",children:"已绑定手机"})]})}),v?n.jsxs("div",{className:"flex items-center justify-center py-20",children:[n.jsx(et,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):c?n.jsxs("div",{className:"flex flex-col h-[70vh]",children:[n.jsxs("div",{className:"flex items-center gap-4 p-4 bg-[#0a1628] rounded-lg mb-4",children:[n.jsx("div",{className:"w-16 h-16 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-2xl text-[#38bdac]",children:c.avatar?n.jsx("img",{src:c.avatar,className:"w-full h-full rounded-full object-cover",alt:""}):((W=c.nickname)==null?void 0:W.charAt(0))||"?"}),n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("h3",{className:"text-lg font-bold text-white",children:c.nickname}),c.isAdmin&&n.jsx(Fe,{className:"bg-purple-500/20 text-purple-400 border-0",children:"管理员"}),c.hasFullBook&&n.jsx(Fe,{className:"bg-green-500/20 text-green-400 border-0",children:"全书已购"})]}),n.jsxs("p",{className:"text-gray-400 text-sm mt-1",children:[c.phone?`📱 ${c.phone}`:"未绑定手机",c.wechatId&&` · 💬 ${c.wechatId}`]}),n.jsxs("p",{className:"text-gray-500 text-xs mt-1",children:["ID: ",c.id," · 推广码: ",c.referralCode??"-"]})]}),n.jsxs("div",{className:"text-right",children:[n.jsxs("p",{className:"text-[#38bdac] font-bold",children:["¥",(c.earnings||0).toFixed(2)]}),n.jsx("p",{className:"text-gray-500 text-xs",children:"累计收益"})]})]}),n.jsxs(Bu,{value:j,onValueChange:N,className:"flex-1 flex flex-col overflow-hidden",children:[n.jsxs(To,{className:"bg-[#0a1628] border border-gray-700/50 p-1 mb-4",children:[n.jsx(tn,{value:"info",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac]",children:"基础信息"}),n.jsx(tn,{value:"tags",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac]",children:"标签体系"}),n.jsx(tn,{value:"tracks",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac]",children:"行为轨迹"}),n.jsx(tn,{value:"relations",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac]",children:"关系链路"})]}),n.jsxs(nn,{value:"info",className:"flex-1 overflow-auto space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"手机号"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"输入手机号",value:R,onChange:$=>S($.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"昵称"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"输入昵称",value:A,onChange:$=>V($.target.value)})]})]}),n.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"推荐人数"}),n.jsx("p",{className:"text-2xl font-bold text-white",children:c.referralCount??0})]}),n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"待提现"}),n.jsxs("p",{className:"text-2xl font-bold text-yellow-400",children:["¥",(c.pendingEarnings??0).toFixed(2)]})]}),n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"创建时间"}),n.jsx("p",{className:"text-sm text-white",children:c.createdAt?new Date(c.createdAt).toLocaleDateString():"-"})]})]}),n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(ks,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx("span",{className:"text-white font-medium",children:"存客宝同步"})]}),n.jsx(he,{size:"sm",onClick:oe,disabled:E||!c.phone,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:E?n.jsxs(n.Fragment,{children:[n.jsx(et,{className:"w-4 h-4 mr-1 animate-spin"})," 同步中..."]}):n.jsxs(n.Fragment,{children:[n.jsx(et,{className:"w-4 h-4 mr-1"})," 同步数据"]})})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500",children:"同步状态:"}),c.ckbSyncedAt?n.jsx(Fe,{className:"bg-green-500/20 text-green-400 border-0 ml-1",children:"已同步"}):n.jsx(Fe,{className:"bg-gray-500/20 text-gray-400 border-0 ml-1",children:"未同步"})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500",children:"最后同步:"}),n.jsx("span",{className:"text-gray-300 ml-1",children:c.ckbSyncedAt?new Date(c.ckbSyncedAt).toLocaleString():"-"})]})]})]})]}),n.jsx(nn,{value:"tags",className:"flex-1 overflow-auto space-y-4",children:n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx(S1,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx("span",{className:"text-white font-medium",children:"系统标签"})]}),n.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[Q.map(($,T)=>n.jsxs(Fe,{className:"bg-[#38bdac]/20 text-[#38bdac] border-0 pr-1",children:[$,n.jsx("button",{type:"button",onClick:()=>K($),className:"ml-1 hover:text-red-400",children:n.jsx(Wr,{className:"w-3 h-3"})})]},T)),Q.length===0&&n.jsx("span",{className:"text-gray-500 text-sm",children:"暂无标签"})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(ue,{className:"bg-[#162840] border-gray-700 text-white flex-1",placeholder:"添加新标签",value:U,onChange:$=>ie($.target.value),onKeyDown:$=>$.key==="Enter"&&P()}),n.jsx(he,{onClick:P,className:"bg-[#38bdac] hover:bg-[#2da396]",children:"添加"})]})]})}),n.jsx(nn,{value:"tracks",className:"flex-1 overflow-auto",children:n.jsx("div",{className:"space-y-2",children:f.length>0?f.map($=>n.jsxs("div",{className:"flex items-start gap-3 p-3 bg-[#0a1628] rounded-lg",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-[#38bdac]",children:re($.action)}),n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-white font-medium",children:$.actionLabel}),$.chapterTitle&&n.jsxs("span",{className:"text-gray-400 text-sm",children:["- ",$.chapterTitle]})]}),n.jsxs("p",{className:"text-gray-500 text-xs mt-1",children:[n.jsx(op,{className:"w-3 h-3 inline mr-1"}),$.timeAgo," · ",new Date($.createdAt).toLocaleString()]})]})]},$.id)):n.jsxs("div",{className:"text-center py-12",children:[n.jsx(lm,{className:"w-10 h-10 text-[#38bdac]/40 mx-auto mb-4"}),n.jsx("p",{className:"text-gray-400",children:"暂无行为轨迹"})]})})}),n.jsx(nn,{value:"relations",className:"flex-1 overflow-auto space-y-4",children:n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(ks,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx("span",{className:"text-white font-medium",children:"推荐的用户"})]}),n.jsxs(Fe,{className:"bg-[#38bdac]/20 text-[#38bdac] border-0",children:["共 ",x.length," 人"]})]}),n.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:x.length>0?x.map(($,T)=>{var X;const J=$;return n.jsxs("div",{className:"flex items-center justify-between p-2 bg-[#162840] rounded",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-6 h-6 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-xs text-[#38bdac]",children:((X=J.nickname)==null?void 0:X.charAt(0))||"?"}),n.jsx("span",{className:"text-white text-sm",children:J.nickname})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[J.status==="vip"&&n.jsx(Fe,{className:"bg-green-500/20 text-green-400 border-0 text-xs",children:"已购"}),n.jsx("span",{className:"text-gray-500 text-xs",children:J.createdAt?new Date(J.createdAt).toLocaleDateString():""})]})]},J.id||T)}):n.jsx("p",{className:"text-gray-500 text-sm text-center py-4",children:"暂无推荐用户"})})]})})]}),n.jsxs("div",{className:"flex justify-end gap-2 pt-4 border-t border-gray-700 mt-4",children:[n.jsxs(he,{variant:"outline",onClick:a,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Wr,{className:"w-4 h-4 mr-2"}),"关闭"]}),n.jsxs(he,{onClick:H,disabled:C,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),C?"保存中...":"保存修改"]})]})]}):n.jsx("div",{className:"text-center py-12 text-gray-500",children:"用户不存在"})]})}):null}function Zb(){var nt,ut,$t,Bt,At;const[r,a]=p.useState([]),[l,i]=p.useState(""),[c,d]=p.useState(1),[f]=p.useState(15),[m,x]=p.useState(0),[g,v]=p.useState(0),[y,E]=p.useState(!0),[,k]=p.useState(null),[C,b]=p.useState(!1),[j,N]=p.useState(!1),[R,S]=p.useState(null),[A,V]=p.useState(""),[Q,G]=p.useState(""),[U,ie]=p.useState(!1),[fe,oe]=p.useState(!1),[H,P]=p.useState({referrals:[],stats:{}}),[K,re]=p.useState(!1),[W,$]=p.useState(null),[T,J]=p.useState(!1),[X,L]=p.useState(null),[B,le]=p.useState({phone:"",nickname:"",password:"",isAdmin:!1,hasFullBook:!1});async function Z(Y){E(!0),k(null);try{const Me=new URLSearchParams;Me.set("page",String(Y??c)),Me.set("pageSize",String(f)),l.trim()&&Me.set("search",l.trim());const ze=await Xe(`/api/db/users?${Me.toString()}`);ze!=null&&ze.success?(a(ze.users||[]),x(ze.total??0),v(ze.totalPages??0),Y!=null&&d(Y)):k((ze==null?void 0:ze.error)||"加载失败")}catch(Me){console.error("Load users error:",Me),k("网络错误,请检查连接")}finally{E(!1)}}p.useEffect(()=>{Z()},[c]);const be=()=>{Z(1)};async function je(Y){if(confirm("确定要删除这个用户吗?"))try{const Me=await z1(`/api/db/users?id=${encodeURIComponent(Y)}`);Me!=null&&Me.success?Z():alert("删除失败: "+((Me==null?void 0:Me.error)||"未知错误"))}catch(Me){console.error("Delete user error:",Me),alert("删除失败")}}const ne=Y=>{S(Y),le({phone:Y.phone||"",nickname:Y.nickname||"",password:"",isAdmin:!!(Y.isAdmin??!1),hasFullBook:!!(Y.hasFullBook??!1)}),b(!0)};async function me(){if(R){if(!B.phone||!B.nickname){alert("请填写手机号和昵称");return}ie(!0);try{const Y=await Wn("/api/db/users",{id:R.id,nickname:B.nickname,isAdmin:B.isAdmin,hasFullBook:B.hasFullBook,...B.password&&{password:B.password}});if(!(Y!=null&&Y.success)){alert("更新失败: "+((Y==null?void 0:Y.error)||"未知错误"));return}b(!1),Z()}catch(Y){console.error("Save user error:",Y),alert("保存失败")}finally{ie(!1)}}}const Ee=Y=>{S(Y),V(""),G(""),N(!0)};async function Se(Y){$(Y),oe(!0),re(!0);try{const Me=await Xe(`/api/db/users/referrals?userId=${encodeURIComponent(Y.id)}`);Me!=null&&Me.success?P({referrals:Me.referrals||[],stats:Me.stats||{}}):P({referrals:[],stats:{}})}catch(Me){console.error("Load referrals error:",Me),P({referrals:[],stats:{}})}finally{re(!1)}}const Te=Y=>{L(Y.id),J(!0)};async function Ae(){if(!A){alert("请输入新密码");return}if(A!==Q){alert("两次输入的密码不一致");return}if(A.length<6){alert("密码长度不能少于6位");return}ie(!0);try{const Y=await Wn("/api/db/users",{id:R==null?void 0:R.id,password:A});Y!=null&&Y.success?(alert("密码修改成功"),N(!1)):alert("密码修改失败: "+((Y==null?void 0:Y.error)||"未知错误"))}catch(Y){console.error("Change password error:",Y),alert("密码修改失败")}finally{ie(!1)}}return n.jsxs("div",{className:"p-8 max-w-7xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"用户管理"}),n.jsxs("p",{className:"text-gray-400 mt-1",children:["共 ",m," 位注册用户"]})]}),n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsxs(he,{variant:"outline",onClick:()=>Z(),disabled:y,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(et,{className:`w-4 h-4 mr-2 ${y?"animate-spin":""}`}),"刷新"]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs("div",{className:"relative",children:[n.jsx(Vr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500 pointer-events-none"}),n.jsx(ue,{type:"text",placeholder:"搜索昵称/手机/ID...",className:"pl-10 bg-[#0f2137] border-gray-700 text-white placeholder:text-gray-500 w-56",value:l,onChange:Y=>i(Y.target.value),onKeyDown:Y=>Y.key==="Enter"&&be()})]}),n.jsx(he,{variant:"outline",onClick:be,disabled:y,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent shrink-0",children:"搜索"})]})]})]}),n.jsx(bn,{open:C,onOpenChange:b,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-lg",children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(Ts,{className:"w-5 h-5 text-[#38bdac]"}),"编辑用户"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"手机号"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"请输入手机号",value:B.phone,onChange:Y=>le({...B,phone:Y.target.value}),disabled:!!R})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"昵称"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"请输入昵称",value:B.nickname,onChange:Y=>le({...B,nickname:Y.target.value})})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:R?"新密码 (留空则不修改)":"密码"}),n.jsx(ue,{type:"password",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:R?"留空则不修改":"请输入密码",value:B.password,onChange:Y=>le({...B,password:Y.target.value})})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(ae,{className:"text-gray-300",children:"管理员权限"}),n.jsx(xt,{checked:B.isAdmin,onCheckedChange:Y=>le({...B,isAdmin:Y})})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(ae,{className:"text-gray-300",children:"已购全书"}),n.jsx(xt,{checked:B.hasFullBook,onCheckedChange:Y=>le({...B,hasFullBook:Y})})]})]}),n.jsxs(Bn,{children:[n.jsxs(he,{variant:"outline",onClick:()=>b(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Wr,{className:"w-4 h-4 mr-2"}),"取消"]}),n.jsxs(he,{onClick:me,disabled:U,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),U?"保存中...":"保存"]})]})]})}),n.jsx(bn,{open:j,onOpenChange:N,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-md",children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(im,{className:"w-5 h-5 text-[#38bdac]"}),"修改密码"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"bg-[#0a1628] rounded-lg p-3",children:[n.jsxs("p",{className:"text-gray-400 text-sm",children:["用户:",R==null?void 0:R.nickname]}),n.jsxs("p",{className:"text-gray-400 text-sm",children:["手机号:",R==null?void 0:R.phone]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"新密码"}),n.jsx(ue,{type:"password",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"请输入新密码 (至少6位)",value:A,onChange:Y=>V(Y.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"确认密码"}),n.jsx(ue,{type:"password",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"请再次输入新密码",value:Q,onChange:Y=>G(Y.target.value)})]})]}),n.jsxs(Bn,{children:[n.jsx(he,{variant:"outline",onClick:()=>N(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"取消"}),n.jsx(he,{onClick:Ae,disabled:U,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:U?"保存中...":"确认修改"})]})]})}),n.jsx(Jb,{open:T,onClose:()=>J(!1),userId:X,onUserUpdated:Z}),n.jsx(bn,{open:fe,onOpenChange:oe,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-2xl max-h-[80vh] overflow-auto",children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(Pn,{className:"w-5 h-5 text-[#38bdac]"}),"绑定关系详情 - ",W==null?void 0:W.nickname]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[n.jsxs("div",{className:"bg-[#0a1628] rounded-lg p-3 text-center",children:[n.jsx("div",{className:"text-2xl font-bold text-[#38bdac]",children:((nt=H.stats)==null?void 0:nt.total)||0}),n.jsx("div",{className:"text-xs text-gray-400",children:"绑定总数"})]}),n.jsxs("div",{className:"bg-[#0a1628] rounded-lg p-3 text-center",children:[n.jsx("div",{className:"text-2xl font-bold text-green-400",children:((ut=H.stats)==null?void 0:ut.purchased)||0}),n.jsx("div",{className:"text-xs text-gray-400",children:"已付费"})]}),n.jsxs("div",{className:"bg-[#0a1628] rounded-lg p-3 text-center",children:[n.jsxs("div",{className:"text-2xl font-bold text-yellow-400",children:["¥",((($t=H.stats)==null?void 0:$t.earnings)||0).toFixed(2)]}),n.jsx("div",{className:"text-xs text-gray-400",children:"累计收益"})]}),n.jsxs("div",{className:"bg-[#0a1628] rounded-lg p-3 text-center",children:[n.jsxs("div",{className:"text-2xl font-bold text-orange-400",children:["¥",(((Bt=H.stats)==null?void 0:Bt.pendingEarnings)||0).toFixed(2)]}),n.jsx("div",{className:"text-xs text-gray-400",children:"待提现"})]})]}),K?n.jsxs("div",{className:"flex items-center justify-center py-8",children:[n.jsx(et,{className:"w-5 h-5 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):(((At=H.referrals)==null?void 0:At.length)??0)>0?n.jsx("div",{className:"space-y-2 max-h-[300px] overflow-y-auto",children:(H.referrals??[]).map((Y,Me)=>{var St;const ze=Y;return n.jsxs("div",{className:"flex items-center justify-between bg-[#0a1628] rounded-lg p-3",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm text-[#38bdac] overflow-hidden shrink-0",children:ze.avatar?n.jsx("img",{src:ze.avatar,className:"w-full h-full object-cover",alt:""}):((St=ze.nickname)==null?void 0:St.charAt(0))||"?"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white text-sm",children:ze.nickname}),n.jsx("div",{className:"text-xs text-gray-500",children:ze.phone||(ze.hasOpenId?"微信用户":"未绑定")})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[ze.status==="vip"&&n.jsx(Fe,{className:"bg-green-500/20 text-green-400 border-0 text-xs",children:"全书已购"}),ze.status==="paid"&&n.jsxs(Fe,{className:"bg-blue-500/20 text-blue-400 border-0 text-xs",children:["已付费",ze.purchasedSections,"章"]}),ze.status==="free"&&n.jsx(Fe,{className:"bg-gray-500/20 text-gray-400 border-0 text-xs",children:"未付费"}),n.jsx("span",{className:"text-xs text-gray-500",children:ze.createdAt?new Date(ze.createdAt).toLocaleDateString():""})]})]},ze.id||Me)})}):n.jsx("div",{className:"text-center py-8 text-gray-500",children:"暂无绑定用户"})]}),n.jsx(Bn,{children:n.jsx(he,{variant:"outline",onClick:()=>oe(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"关闭"})})]})}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:n.jsxs(_e,{className:"p-0",children:[y?n.jsxs("div",{className:"flex items-center justify-center py-12",children:[n.jsx(et,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):n.jsxs(bo,{children:[n.jsx(So,{children:n.jsxs(Un,{className:"bg-[#0a1628] hover:bg-[#0a1628] border-gray-700",children:[n.jsx(tt,{className:"text-gray-400",children:"用户信息"}),n.jsx(tt,{className:"text-gray-400",children:"绑定信息"}),n.jsx(tt,{className:"text-gray-400",children:"购买状态"}),n.jsx(tt,{className:"text-gray-400",children:"分销收益"}),n.jsx(tt,{className:"text-gray-400",children:"推广码"}),n.jsx(tt,{className:"text-gray-400",children:"注册时间"}),n.jsx(tt,{className:"text-right text-gray-400",children:"操作"})]})}),n.jsxs(Co,{children:[r.map(Y=>{var Me,ze,St;return n.jsxs(Un,{className:"hover:bg-[#0a1628] border-gray-700/50",children:[n.jsx(Ye,{children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-10 h-10 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm font-medium text-[#38bdac]",children:Y.avatar?n.jsx("img",{src:Y.avatar,className:"w-full h-full rounded-full object-cover",alt:""}):((Me=Y.nickname)==null?void 0:Me.charAt(0))||"?"}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("p",{className:"font-medium text-white",children:Y.nickname}),Y.isAdmin&&n.jsx(Fe,{className:"bg-purple-500/20 text-purple-400 hover:bg-purple-500/20 border-0 text-xs",children:"管理员"}),Y.openId&&!((ze=Y.id)!=null&&ze.startsWith("user_"))&&n.jsx(Fe,{className:"bg-green-500/20 text-green-400 hover:bg-green-500/20 border-0 text-xs",children:"微信"})]}),n.jsx("p",{className:"text-xs text-gray-500 font-mono",children:Y.openId?Y.openId.slice(0,12)+"...":(St=Y.id)==null?void 0:St.slice(0,12)})]})]})}),n.jsx(Ye,{children:n.jsxs("div",{className:"space-y-1",children:[Y.phone&&n.jsxs("div",{className:"flex items-center gap-1 text-xs",children:[n.jsx("span",{className:"text-gray-500",children:"📱"}),n.jsx("span",{className:"text-gray-300",children:Y.phone})]}),Y.wechatId&&n.jsxs("div",{className:"flex items-center gap-1 text-xs",children:[n.jsx("span",{className:"text-gray-500",children:"💬"}),n.jsx("span",{className:"text-gray-300",children:Y.wechatId})]}),Y.openId&&n.jsxs("div",{className:"flex items-center gap-1 text-xs",children:[n.jsx("span",{className:"text-gray-500",children:"🔗"}),n.jsxs("span",{className:"text-gray-500 truncate max-w-[100px]",title:Y.openId,children:[Y.openId.slice(0,12),"..."]})]}),!Y.phone&&!Y.wechatId&&!Y.openId&&n.jsx("span",{className:"text-gray-600 text-xs",children:"未绑定"})]})}),n.jsx(Ye,{children:Y.hasFullBook?n.jsx(Fe,{className:"bg-green-500/20 text-green-400 hover:bg-green-500/20 border-0",children:"全书已购"}):(Y.purchasedSectionCount??0)>0?n.jsxs(Fe,{className:"bg-blue-500/20 text-blue-400 hover:bg-blue-500/20 border-0",children:["已付费",Y.purchasedSectionCount??0,"章"]}):n.jsx(Fe,{variant:"outline",className:"text-gray-500 border-gray-600",children:"未购买"})}),n.jsx(Ye,{children:n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"text-white font-medium",children:["¥",parseFloat(String(Y.earnings||0)).toFixed(2)]}),parseFloat(String(Y.pendingEarnings||0))>0&&n.jsxs("div",{className:"text-xs text-yellow-400",children:["待提现: ¥",parseFloat(String(Y.pendingEarnings||0)).toFixed(2)]}),n.jsxs("div",{className:"text-xs text-[#38bdac] cursor-pointer hover:underline flex items-center gap-1",onClick:()=>Se(Y),onKeyDown:Qn=>Qn.key==="Enter"&&Se(Y),role:"button",tabIndex:0,children:[n.jsx(Pn,{className:"w-3 h-3"}),"绑定",Y.referralCount||0,"人"]})]})}),n.jsx(Ye,{children:n.jsx("code",{className:"text-[#38bdac] text-xs bg-[#38bdac]/10 px-2 py-0.5 rounded",children:Y.referralCode||"-"})}),n.jsx(Ye,{className:"text-gray-400",children:Y.createdAt?new Date(Y.createdAt).toLocaleDateString():"-"}),n.jsx(Ye,{className:"text-right",children:n.jsxs("div",{className:"flex items-center justify-end gap-1",children:[n.jsx(he,{variant:"ghost",size:"sm",onClick:()=>Te(Y),className:"text-gray-400 hover:text-blue-400 hover:bg-blue-400/10",title:"查看详情",children:n.jsx(ku,{className:"w-4 h-4"})}),n.jsx(he,{variant:"ghost",size:"sm",onClick:()=>ne(Y),className:"text-gray-400 hover:text-[#38bdac] hover:bg-[#38bdac]/10",title:"编辑",children:n.jsx(Ts,{className:"w-4 h-4"})}),n.jsx(he,{variant:"ghost",size:"sm",onClick:()=>Ee(Y),className:"text-gray-400 hover:text-yellow-400 hover:bg-yellow-400/10",title:"修改密码",children:n.jsx(im,{className:"w-4 h-4"})}),n.jsx(he,{variant:"ghost",size:"sm",className:"text-red-400 hover:text-red-300 hover:bg-red-500/10",onClick:()=>je(Y.id),title:"删除",children:n.jsx(dp,{className:"w-4 h-4"})})]})})]},Y.id)}),r.length===0&&n.jsx(Un,{children:n.jsx(Ye,{colSpan:7,className:"text-center py-12 text-gray-500",children:l?"未找到匹配用户":"暂无用户数据"})})]})]}),!y&&g>0&&n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-t border-gray-700/50",children:[n.jsxs("span",{className:"text-sm text-gray-400",children:["第 ",c," / ",g," 页,共 ",m," 条"]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(he,{variant:"outline",size:"sm",onClick:()=>d(Y=>Math.max(1,Y-1)),disabled:c<=1,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(hw,{className:"w-4 h-4"}),"上一页"]}),n.jsxs(he,{variant:"outline",size:"sm",onClick:()=>d(Y=>Math.min(g,Y+1)),disabled:c>=g,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:["下一页",n.jsx(Cu,{className:"w-4 h-4"})]})]})]})]})})]})}function e2(){const[r,a]=p.useState("overview"),[l,i]=p.useState([]),[c,d]=p.useState(null),[f,m]=p.useState([]),[x,g]=p.useState([]),[v,y]=p.useState([]),[E,k]=p.useState(!0),[C,b]=p.useState(""),[j,N]=p.useState("all"),[R,S]=p.useState(new Set);p.useEffect(()=>{A()},[]),p.useEffect(()=>{V(r)},[r]);async function A(){k(!0);try{const P=await Xe("/api/admin/distribution/overview");P!=null&&P.success&&P.overview&&d(P.overview)}catch(P){console.error("[Admin] 概览接口异常:",P)}try{const P=await Xe("/api/db/users");y((P==null?void 0:P.users)||[])}catch(P){console.error("[Admin] 用户数据加载失败:",P)}finally{k(!1)}}async function V(P,K=!1){if(!(!K&&R.has(P))){k(!0);try{const re=v;switch(P){case"overview":break;case"orders":{try{const W=await Xe("/api/orders");if(W!=null&&W.success&&W.orders){const $=W.orders.map(T=>{var J,X,L,B,le;return{...T,amount:parseFloat(String(T.amount))||0,userNickname:T.userNickname??((J=re.find(Z=>Z.id===T.userId))==null?void 0:J.nickname)??"未知用户",userPhone:T.userPhone||((X=re.find(Z=>Z.id===T.userId))==null?void 0:X.phone)||"-",userAvatar:T.userAvatar??((L=re.find(Z=>Z.id===T.userId))==null?void 0:L.avatar)??null,referrerNickname:T.referrerNickname??(T.referrerId?(B=re.find(Z=>Z.id===T.referrerId))==null?void 0:B.nickname:null)??null,referrerCode:T.referrerCode??(T.referrerId?(le=re.find(Z=>Z.id===T.referrerId))==null?void 0:le.referralCode:null)??null,type:T.productType||T.type}});i($)}else i([])}catch{i([])}break}case"bindings":{try{const W=await Xe("/api/db/distribution");m((W==null?void 0:W.bindings)||[])}catch{m([])}break}case"withdrawals":{try{const W=await Xe("/api/admin/withdrawals");if(W!=null&&W.success&&W.withdrawals){const $=W.withdrawals.map(T=>({...T,account:T.account??"未绑定微信号",status:T.status==="success"?"completed":T.status==="failed"?"rejected":T.status}));g($)}else W!=null&&W.success||alert(`获取提现记录失败: ${(W==null?void 0:W.error)||"未知错误"}`),g([])}catch(W){console.error(W),alert("加载提现数据失败"),g([])}break}}S(W=>new Set(W).add(P))}catch(re){console.error(re)}finally{P!=="overview"&&k(!1)}}}async function Q(){S(P=>{const K=new Set(P);return K.delete(r),K}),r==="overview"&&A(),await V(r,!0)}async function G(P){if(confirm("确认审核通过并打款?"))try{const K=await Wn("/api/admin/withdrawals",{id:P,action:"approve"});if(!(K!=null&&K.success)){const re=(K==null?void 0:K.message)||(K==null?void 0:K.error)||"操作失败";alert(re);return}await Q()}catch(K){console.error(K),alert("操作失败")}}async function U(P){const K=prompt("请输入拒绝原因:");if(K)try{const re=await Wn("/api/admin/withdrawals",{id:P,action:"reject",errorMessage:K});if(!(re!=null&&re.success)){alert((re==null?void 0:re.error)||"操作失败");return}await Q()}catch(re){console.error(re),alert("操作失败")}}function ie(P){const K={active:"bg-green-500/20 text-green-400",converted:"bg-blue-500/20 text-blue-400",expired:"bg-gray-500/20 text-gray-400",cancelled:"bg-red-500/20 text-red-400",pending:"bg-orange-500/20 text-orange-400",pending_confirm:"bg-orange-500/20 text-orange-400",processing:"bg-blue-500/20 text-blue-400",completed:"bg-green-500/20 text-green-400",rejected:"bg-red-500/20 text-red-400"},re={active:"有效",converted:"已转化",expired:"已过期",cancelled:"已取消",pending:"待审核",pending_confirm:"待用户确认",processing:"处理中",completed:"已完成",rejected:"已拒绝"};return n.jsx(Fe,{className:`${K[P]||"bg-gray-500/20 text-gray-400"} border-0`,children:re[P]||P})}const fe=f.filter(P=>{var K,re,W,$;if(j!=="all"&&P.status!==j)return!1;if(C){const T=C.toLowerCase();return((K=P.refereeNickname)==null?void 0:K.toLowerCase().includes(T))||((re=P.refereePhone)==null?void 0:re.includes(T))||((W=P.referrerName)==null?void 0:W.toLowerCase().includes(T))||(($=P.referrerCode)==null?void 0:$.toLowerCase().includes(T))}return!0}),oe=x.filter(P=>{var K,re;if(j!=="all"&&P.status!==j)return!1;if(C){const W=C.toLowerCase();return((K=P.userName)==null?void 0:K.toLowerCase().includes(W))||((re=P.account)==null?void 0:re.toLowerCase().includes(W))}return!0}),H=l.filter(P=>{var K,re,W,$,T,J;if(j!=="all"&&P.status!==j)return!1;if(C){const X=C.toLowerCase();return((K=P.id)==null?void 0:K.toLowerCase().includes(X))||((re=P.userNickname)==null?void 0:re.toLowerCase().includes(X))||((W=P.userPhone)==null?void 0:W.includes(X))||(($=P.sectionTitle)==null?void 0:$.toLowerCase().includes(X))||((T=P.chapterTitle)==null?void 0:T.toLowerCase().includes(X))||((J=P.bookName)==null?void 0:J.toLowerCase().includes(X))||P.referrerCode&&P.referrerCode.toLowerCase().includes(X)||P.referrerNickname&&P.referrerNickname.toLowerCase().includes(X)}return!0});return n.jsxs("div",{className:"p-8 max-w-7xl mx-auto",children:[n.jsxs("div",{className:"flex items-center justify-between mb-8",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-white",children:"交易中心"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"统一管理:订单、分销绑定、提现审核"})]}),n.jsxs(he,{onClick:Q,disabled:E,variant:"outline",className:"border-gray-700 text-gray-300 hover:bg-gray-800",children:[n.jsx(et,{className:`w-4 h-4 mr-2 ${E?"animate-spin":""}`}),"刷新数据"]})]}),n.jsx("div",{className:"flex gap-2 mb-6 border-b border-gray-700 pb-4",children:[{key:"overview",label:"数据概览",icon:nu},{key:"orders",label:"订单管理",icon:lo},{key:"bindings",label:"绑定管理",icon:ks},{key:"withdrawals",label:"提现审核",icon:Is}].map(P=>n.jsxs("button",{type:"button",onClick:()=>{a(P.key),N("all"),b("")},className:`flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${r===P.key?"bg-[#38bdac] text-white":"text-gray-400 hover:text-white hover:bg-gray-800"}`,children:[n.jsx(P.icon,{className:"w-4 h-4"}),P.label]},P.key))}),E?n.jsxs("div",{className:"flex items-center justify-center py-20",children:[n.jsx(et,{className:"w-8 h-8 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):n.jsxs(n.Fragment,{children:[r==="overview"&&c&&n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(_e,{className:"p-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"今日点击"}),n.jsx("p",{className:"text-2xl font-bold text-white mt-1",children:c.todayClicks})]}),n.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/20 flex items-center justify-center",children:n.jsx(ku,{className:"w-6 h-6 text-blue-400"})})]})})}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(_e,{className:"p-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"今日绑定"}),n.jsx("p",{className:"text-2xl font-bold text-white mt-1",children:c.todayBindings})]}),n.jsx("div",{className:"w-12 h-12 rounded-xl bg-green-500/20 flex items-center justify-center",children:n.jsx(ks,{className:"w-6 h-6 text-green-400"})})]})})}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(_e,{className:"p-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"今日转化"}),n.jsx("p",{className:"text-2xl font-bold text-white mt-1",children:c.todayConversions})]}),n.jsx("div",{className:"w-12 h-12 rounded-xl bg-purple-500/20 flex items-center justify-center",children:n.jsx(Jc,{className:"w-6 h-6 text-purple-400"})})]})})}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(_e,{className:"p-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"今日佣金"}),n.jsxs("p",{className:"text-2xl font-bold text-[#38bdac] mt-1",children:["¥",c.todayEarnings.toFixed(2)]})]}),n.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#38bdac]/20 flex items-center justify-center",children:n.jsx(lo,{className:"w-6 h-6 text-[#38bdac]"})})]})})})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsx(Re,{className:"bg-orange-500/10 border-orange-500/30",children:n.jsx(_e,{className:"p-6",children:n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl bg-orange-500/20 flex items-center justify-center",children:n.jsx(op,{className:"w-6 h-6 text-orange-400"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("p",{className:"text-orange-300 font-medium",children:"即将过期绑定"}),n.jsxs("p",{className:"text-2xl font-bold text-white",children:[c.expiringBindings," 个"]}),n.jsx("p",{className:"text-orange-300/60 text-sm",children:"7天内到期需关注转化"})]})]})})}),n.jsx(Re,{className:"bg-blue-500/10 border-blue-500/30",children:n.jsx(_e,{className:"p-6",children:n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/20 flex items-center justify-center",children:n.jsx(Is,{className:"w-6 h-6 text-blue-400"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("p",{className:"text-blue-300 font-medium",children:"待审核提现"}),n.jsxs("p",{className:"text-2xl font-bold text-white",children:[c.pendingWithdrawals," 笔"]}),n.jsxs("p",{className:"text-blue-300/60 text-sm",children:["共 ¥",c.pendingWithdrawAmount.toFixed(2)]})]}),n.jsx(he,{onClick:()=>a("withdrawals"),variant:"outline",className:"border-blue-500/50 text-blue-400 hover:bg-blue-500/20",children:"去审核"})]})})})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsx(Ve,{children:n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(qc,{className:"w-5 h-5 text-[#38bdac]"}),"本月统计"]})}),n.jsx(_e,{children:n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"点击量"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.monthClicks})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"绑定数"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.monthBindings})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"转化数"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.monthConversions})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"佣金"}),n.jsxs("p",{className:"text-xl font-bold text-[#38bdac]",children:["¥",c.monthEarnings.toFixed(2)]})]})]})})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsx(Ve,{children:n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(nu,{className:"w-5 h-5 text-[#38bdac]"}),"累计统计"]})}),n.jsxs(_e,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"总点击"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.totalClicks.toLocaleString()})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"总绑定"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.totalBindings.toLocaleString()})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"总转化"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.totalConversions})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"总佣金"}),n.jsxs("p",{className:"text-xl font-bold text-[#38bdac]",children:["¥",c.totalEarnings.toFixed(2)]})]})]}),n.jsxs("div",{className:"mt-4 p-4 bg-[#38bdac]/10 rounded-lg flex items-center justify-between",children:[n.jsx("span",{className:"text-gray-300",children:"点击转化率"}),n.jsxs("span",{className:"text-[#38bdac] font-bold text-xl",children:[c.conversionRate,"%"]})]})]})]})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsx(Ve,{children:n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(Pn,{className:"w-5 h-5 text-[#38bdac]"}),"推广统计"]})}),n.jsx(_e,{children:n.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg text-center",children:[n.jsx("p",{className:"text-3xl font-bold text-white",children:c.totalDistributors}),n.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"推广用户数"})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg text-center",children:[n.jsx("p",{className:"text-3xl font-bold text-green-400",children:c.activeDistributors}),n.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"有收益用户"})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg text-center",children:[n.jsx("p",{className:"text-3xl font-bold text-[#38bdac]",children:"90%"}),n.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"佣金比例"})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg text-center",children:[n.jsx("p",{className:"text-3xl font-bold text-orange-400",children:"30天"}),n.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"绑定有效期"})]})]})})]})]}),r==="orders"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex gap-4",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(Vr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),n.jsx(ue,{value:C,onChange:P=>b(P.target.value),placeholder:"搜索订单号、用户名、手机号...",className:"pl-10 bg-[#0f2137] border-gray-700 text-white"})]}),n.jsxs("select",{value:j,onChange:P=>N(P.target.value),className:"px-4 py-2 bg-[#0f2137] border border-gray-700 rounded-lg text-white",children:[n.jsx("option",{value:"all",children:"全部状态"}),n.jsx("option",{value:"completed",children:"已完成"}),n.jsx("option",{value:"pending",children:"待支付"}),n.jsx("option",{value:"failed",children:"已失败"})]})]}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(_e,{className:"p-0",children:l.length===0?n.jsx("div",{className:"py-12 text-center text-gray-500",children:"暂无订单数据"}):n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"bg-[#0a1628] text-gray-400",children:[n.jsx("th",{className:"p-4 text-left font-medium",children:"订单号"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"用户"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"商品"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"金额"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"支付方式"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"状态"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"推荐人/邀请码"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"分销佣金"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"下单时间"})]})}),n.jsx("tbody",{className:"divide-y divide-gray-700/50",children:H.map(P=>{var K,re;return n.jsxs("tr",{className:"hover:bg-[#0a1628] transition-colors",children:[n.jsxs("td",{className:"p-4 font-mono text-xs text-gray-400",children:[(K=P.id)==null?void 0:K.slice(0,12),"..."]}),n.jsx("td",{className:"p-4",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm text-[#38bdac] overflow-hidden shrink-0",children:P.userAvatar?n.jsx("img",{src:P.userAvatar,className:"w-full h-full object-cover",alt:""}):(P.userNickname||"?").charAt(0)}),n.jsxs("div",{children:[n.jsx("p",{className:"text-white text-sm",children:P.userNickname||"未知用户"}),n.jsx("p",{className:"text-gray-500 text-xs",children:P.userPhone||"-"})]})]})}),n.jsx("td",{className:"p-4",children:n.jsxs("div",{children:[n.jsx("p",{className:"text-white text-sm",children:(()=>{const W=P.productType||P.type;return W==="fullbook"?`${P.bookName||"《底层逻辑》"} - 全本`:W==="match"?"匹配次数购买":`${P.bookName||"《底层逻辑》"} - ${P.sectionTitle||P.chapterTitle||`章节${P.productId||P.sectionId||""}`}`})()}),n.jsx("p",{className:"text-gray-500 text-xs",children:(()=>{const W=P.productType||P.type;return W==="fullbook"?"全书解锁":W==="match"?"功能权益":P.chapterTitle||"单章购买"})()})]})}),n.jsxs("td",{className:"p-4 text-[#38bdac] font-bold",children:["¥",typeof P.amount=="number"?P.amount.toFixed(2):parseFloat(String(P.amount||"0")).toFixed(2)]}),n.jsx("td",{className:"p-4 text-gray-300",children:P.paymentMethod==="wechat"?"微信支付":P.paymentMethod==="alipay"?"支付宝":P.paymentMethod||"微信支付"}),n.jsx("td",{className:"p-4",children:P.status==="completed"||P.status==="paid"?n.jsx(Fe,{className:"bg-green-500/20 text-green-400 border-0",children:"已完成"}):P.status==="pending"||P.status==="created"?n.jsx(Fe,{className:"bg-yellow-500/20 text-yellow-400 border-0",children:"待支付"}):n.jsx(Fe,{className:"bg-red-500/20 text-red-400 border-0",children:"已失败"})}),n.jsx("td",{className:"p-4 text-gray-300 text-sm",children:P.referrerId||P.referralCode?n.jsxs("span",{title:P.referralCode||P.referrerCode||P.referrerId||"",children:[P.referrerNickname||P.referralCode||P.referrerCode||((re=P.referrerId)==null?void 0:re.slice(0,8)),(P.referralCode||P.referrerCode)&&` (${P.referralCode||P.referrerCode})`]}):"-"}),n.jsx("td",{className:"p-4 text-[#FFD700]",children:P.referrerEarnings?`¥${(typeof P.referrerEarnings=="number"?P.referrerEarnings:parseFloat(String(P.referrerEarnings))).toFixed(2)}`:"-"}),n.jsx("td",{className:"p-4 text-gray-400 text-sm",children:P.createdAt?new Date(P.createdAt).toLocaleString("zh-CN"):"-"})]},P.id)})})]})})})})]}),r==="bindings"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex gap-4",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(Vr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),n.jsx(ue,{value:C,onChange:P=>b(P.target.value),placeholder:"搜索用户昵称、手机号、推广码...",className:"pl-10 bg-[#0f2137] border-gray-700 text-white"})]}),n.jsxs("select",{value:j,onChange:P=>N(P.target.value),className:"px-4 py-2 bg-[#0f2137] border border-gray-700 rounded-lg text-white",children:[n.jsx("option",{value:"all",children:"全部状态"}),n.jsx("option",{value:"active",children:"有效"}),n.jsx("option",{value:"converted",children:"已转化"}),n.jsx("option",{value:"expired",children:"已过期"}),n.jsx("option",{value:"cancelled",children:"已取消"})]})]}),n.jsx("p",{className:"text-xs text-gray-500",children:"规则(见《新分销逻辑设计方案》):绑定有有效期(默认 30 天,可在推广设置中配置 bindingDays。有效 = 未到期;已转化 = 该消费者有购买;已过期 = 到期且未购买被自动解绑;已取消 = 消费者点击了他人链接,绑定已切换。"}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(_e,{className:"p-0",children:fe.length===0?n.jsx("div",{className:"py-12 text-center text-gray-500",children:"暂无绑定数据"}):n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"bg-[#0a1628] text-gray-400",children:[n.jsx("th",{className:"p-4 text-left font-medium",children:"分销商"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"消费者"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"绑定时间"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"到期时间"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"状态"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"佣金"})]})}),n.jsx("tbody",{className:"divide-y divide-gray-700/50",children:fe.map(P=>n.jsxs("tr",{className:"hover:bg-[#0a1628] transition-colors",children:[n.jsx("td",{className:"p-4",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm text-[#38bdac] overflow-hidden shrink-0",children:P.referrerAvatar?n.jsx("img",{src:P.referrerAvatar,className:"w-full h-full object-cover",alt:""}):(P.referrerName||P.referrerCode||"?").charAt(0)}),n.jsxs("div",{children:[n.jsx("p",{className:"text-white font-medium",children:P.referrerName||"-"}),n.jsx("p",{className:"text-gray-500 text-xs font-mono",children:P.referrerCode||"-"})]})]})}),n.jsx("td",{className:"p-4",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm text-[#38bdac] overflow-hidden shrink-0",children:P.refereeAvatar?n.jsx("img",{src:P.refereeAvatar,className:"w-full h-full object-cover",alt:""}):(P.refereeNickname||"?").charAt(0)}),n.jsxs("div",{children:[n.jsx("p",{className:"text-white",children:P.refereeNickname||"微信用户"}),n.jsx("p",{className:"text-gray-500 text-xs",children:P.refereePhone||"-"})]})]})}),n.jsx("td",{className:"p-4 text-gray-400",children:P.boundAt?new Date(P.boundAt).toLocaleString("zh-CN",{dateStyle:"short",timeStyle:"short"}):"-"}),n.jsx("td",{className:"p-4 text-gray-400",children:P.expiresAt?new Date(P.expiresAt).toLocaleString("zh-CN",{dateStyle:"short",timeStyle:"short"}):"-"}),n.jsx("td",{className:"p-4",children:ie(P.status)}),n.jsx("td",{className:"p-4",children:(P.totalCommission??P.commission)!=null&&(P.totalCommission??P.commission)!==void 0?n.jsxs("span",{className:"text-[#38bdac] font-medium",children:["¥",Number(P.totalCommission??P.commission).toFixed(2)]}):n.jsx("span",{className:"text-gray-500",children:"-"})})]},P.id))})]})})})})]}),r==="withdrawals"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex gap-4",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(Vr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),n.jsx(ue,{value:C,onChange:P=>b(P.target.value),placeholder:"搜索用户名称、账号...",className:"pl-10 bg-[#0f2137] border-gray-700 text-white"})]}),n.jsxs("select",{value:j,onChange:P=>N(P.target.value),className:"px-4 py-2 bg-[#0f2137] border border-gray-700 rounded-lg text-white",children:[n.jsx("option",{value:"all",children:"全部状态"}),n.jsx("option",{value:"pending",children:"待审核"}),n.jsx("option",{value:"completed",children:"已完成"}),n.jsx("option",{value:"rejected",children:"已拒绝"})]})]}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(_e,{className:"p-0",children:oe.length===0?n.jsx("div",{className:"py-12 text-center text-gray-500",children:"暂无提现记录"}):n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"bg-[#0a1628] text-gray-400",children:[n.jsx("th",{className:"p-4 text-left font-medium",children:"申请人"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"金额"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"收款方式"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"收款账号"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"申请时间"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"状态"}),n.jsx("th",{className:"p-4 text-right font-medium",children:"操作"})]})}),n.jsx("tbody",{className:"divide-y divide-gray-700/50",children:oe.map(P=>n.jsxs("tr",{className:"hover:bg-[#0a1628] transition-colors",children:[n.jsx("td",{className:"p-4",children:n.jsxs("div",{className:"flex items-center gap-2",children:[P.userAvatar?n.jsx("img",{src:P.userAvatar,alt:"",className:"w-8 h-8 rounded-full object-cover"}):n.jsx("div",{className:"w-8 h-8 rounded-full bg-gray-600 flex items-center justify-center text-white text-sm font-medium",children:(P.userName||P.name||"?").slice(0,1)}),n.jsx("p",{className:"text-white font-medium",children:P.userName||P.name})]})}),n.jsx("td",{className:"p-4",children:n.jsxs("span",{className:"text-[#38bdac] font-bold",children:["¥",P.amount.toFixed(2)]})}),n.jsx("td",{className:"p-4",children:n.jsx(Fe,{className:P.method==="wechat"?"bg-green-500/20 text-green-400 border-0":"bg-blue-500/20 text-blue-400 border-0",children:P.method==="wechat"?"微信":"支付宝"})}),n.jsx("td",{className:"p-4",children:n.jsxs("div",{children:[n.jsx("p",{className:"text-white font-mono text-xs",children:P.account}),n.jsx("p",{className:"text-gray-500 text-xs",children:P.name})]})}),n.jsx("td",{className:"p-4 text-gray-400",children:P.createdAt?new Date(P.createdAt).toLocaleString("zh-CN"):"-"}),n.jsx("td",{className:"p-4",children:ie(P.status)}),n.jsx("td",{className:"p-4 text-right",children:P.status==="pending"&&n.jsxs("div",{className:"flex gap-2 justify-end",children:[n.jsxs(he,{size:"sm",onClick:()=>G(P.id),className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Jc,{className:"w-4 h-4 mr-1"}),"通过"]}),n.jsxs(he,{size:"sm",variant:"outline",onClick:()=>U(P.id),className:"border-red-500/50 text-red-400 hover:bg-red-500/20",children:[n.jsx(bw,{className:"w-4 h-4 mr-1"}),"拒绝"]})]})})]},P.id))})]})})})})]})]})]})}function t2(){const[r,a]=p.useState([]),[l,i]=p.useState({total:0,pendingCount:0,pendingAmount:0,successCount:0,successAmount:0,failedCount:0}),[c,d]=p.useState(!0),[f,m]=p.useState("all"),[x,g]=p.useState(null);async function v(){var C,b,j,N,R,S;d(!0);try{const A=await Xe(`/api/admin/withdrawals?status=${f}`);if(A!=null&&A.success){const V=A.withdrawals||[];a(V),i({total:((C=A.stats)==null?void 0:C.total)??V.length,pendingCount:((b=A.stats)==null?void 0:b.pendingCount)??0,pendingAmount:((j=A.stats)==null?void 0:j.pendingAmount)??0,successCount:((N=A.stats)==null?void 0:N.successCount)??0,successAmount:((R=A.stats)==null?void 0:R.successAmount)??0,failedCount:((S=A.stats)==null?void 0:S.failedCount)??0})}}catch(A){console.error("Load withdrawals error:",A)}finally{d(!1)}}p.useEffect(()=>{v()},[f]);async function y(C){const b=r.find(j=>j.id===C);if(b!=null&&b.userCommissionInfo&&b.userCommissionInfo.availableAfterThis<0){if(!confirm(`⚠️ 风险警告:该用户审核后余额为负数(¥${b.userCommissionInfo.availableAfterThis.toFixed(2)}),可能存在超额提现。
确认已核实用户账户并完成打款?`))return}else if(!confirm("确认已完成打款?批准后将更新用户提现记录。"))return;g(C);try{const j=await Wn("/api/admin/withdrawals",{id:C,action:"approve"});j!=null&&j.success?v():alert("操作失败: "+((j==null?void 0:j.error)??""))}catch{alert("操作失败")}finally{g(null)}}async function E(C){const b=prompt("请输入拒绝原因(将返还用户余额):");if(b){g(C);try{const j=await Wn("/api/admin/withdrawals",{id:C,action:"reject",errorMessage:b});j!=null&&j.success?v():alert("操作失败: "+((j==null?void 0:j.error)??""))}catch{alert("操作失败")}finally{g(null)}}}function k(C){switch(C){case"pending":return n.jsx(Fe,{className:"bg-orange-500/20 text-orange-400 hover:bg-orange-500/20 border-0",children:"待处理"});case"pending_confirm":return n.jsx(Fe,{className:"bg-orange-500/20 text-orange-400 hover:bg-orange-500/20 border-0",children:"待用户确认"});case"processing":return n.jsx(Fe,{className:"bg-blue-500/20 text-blue-400 hover:bg-blue-500/20 border-0",children:"已审批等待打款"});case"success":case"completed":return n.jsx(Fe,{className:"bg-green-500/20 text-green-400 hover:bg-green-500/20 border-0",children:"已完成"});case"failed":case"rejected":return n.jsx(Fe,{className:"bg-red-500/20 text-red-400 hover:bg-red-500/20 border-0",children:"已拒绝"});default:return n.jsx(Fe,{className:"bg-gray-500/20 text-gray-400 border-0",children:C})}}return n.jsxs("div",{className:"p-8 max-w-6xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-start mb-8",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-white",children:"分账提现管理"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"管理用户分销收益的提现申请"})]}),n.jsxs(he,{variant:"outline",onClick:v,disabled:c,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(et,{className:`w-4 h-4 mr-2 ${c?"animate-spin":""}`}),"刷新"]})]}),n.jsx(Re,{className:"bg-gradient-to-r from-[#38bdac]/10 to-[#0f2137] border-[#38bdac]/30 mb-6",children:n.jsx(_e,{className:"p-4",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(lo,{className:"w-5 h-5 text-[#38bdac] mt-0.5"}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-white font-medium mb-2",children:"自动分账规则"}),n.jsxs("div",{className:"text-sm text-gray-400 space-y-1",children:[n.jsxs("p",{children:["• ",n.jsx("span",{className:"text-[#38bdac]",children:"分销比例"}),":推广者获得订单金额的"," ",n.jsx("span",{className:"text-white font-medium",children:"90%"})]}),n.jsxs("p",{children:["• ",n.jsx("span",{className:"text-[#38bdac]",children:"结算方式"}),":用户付款后,分销收益自动计入推广者账户"]}),n.jsxs("p",{children:["• ",n.jsx("span",{className:"text-[#38bdac]",children:"提现方式"}),":用户在小程序端点击提现,系统自动转账到微信零钱"]}),n.jsxs("p",{children:["• ",n.jsx("span",{className:"text-[#38bdac]",children:"审批流程"}),":待处理的提现需管理员手动确认打款后批准"]})]})]})]})})}),n.jsxs("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsxs(_e,{className:"p-4 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-[#38bdac]",children:l.total}),n.jsx("div",{className:"text-sm text-gray-400",children:"总申请"})]})}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsxs(_e,{className:"p-4 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-orange-400",children:l.pendingCount}),n.jsx("div",{className:"text-sm text-gray-400",children:"待处理"}),n.jsxs("div",{className:"text-xs text-orange-400 mt-1",children:["¥",l.pendingAmount.toFixed(2)]})]})}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsxs(_e,{className:"p-4 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-green-400",children:l.successCount}),n.jsx("div",{className:"text-sm text-gray-400",children:"已完成"}),n.jsxs("div",{className:"text-xs text-green-400 mt-1",children:["¥",l.successAmount.toFixed(2)]})]})}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsxs(_e,{className:"p-4 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-red-400",children:l.failedCount}),n.jsx("div",{className:"text-sm text-gray-400",children:"已拒绝"})]})})]}),n.jsx("div",{className:"flex gap-2 mb-4",children:["all","pending","success","failed"].map(C=>n.jsx(he,{variant:f===C?"default":"outline",size:"sm",onClick:()=>m(C),className:f===C?"bg-[#38bdac] hover:bg-[#2da396] text-white":"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:C==="all"?"全部":C==="pending"?"待处理":C==="success"?"已完成":"已拒绝"},C))}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:n.jsx(_e,{className:"p-0",children:c?n.jsxs("div",{className:"flex items-center justify-center py-12",children:[n.jsx(et,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):r.length===0?n.jsxs("div",{className:"text-center py-12",children:[n.jsx(Is,{className:"w-12 h-12 text-gray-600 mx-auto mb-3"}),n.jsx("p",{className:"text-gray-500",children:"暂无提现记录"})]}):n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"bg-[#0a1628] text-gray-400",children:[n.jsx("th",{className:"p-4 text-left font-medium",children:"申请时间"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"用户"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"提现金额"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"用户佣金信息"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"状态"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"处理时间"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"确认收款"}),n.jsx("th",{className:"p-4 text-right font-medium",children:"操作"})]})}),n.jsx("tbody",{className:"divide-y divide-gray-700/50",children:r.map(C=>n.jsxs("tr",{className:"hover:bg-[#0a1628] transition-colors",children:[n.jsx("td",{className:"p-4 text-gray-400",children:new Date(C.createdAt??"").toLocaleString()}),n.jsx("td",{className:"p-4",children:n.jsxs("div",{className:"flex items-center gap-2",children:[C.userAvatar?n.jsx("img",{src:C.userAvatar,alt:C.userName??"",className:"w-8 h-8 rounded-full object-cover"}):n.jsx("div",{className:"w-8 h-8 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm text-[#38bdac]",children:(C.userName??"?").charAt(0)}),n.jsxs("div",{children:[n.jsx("p",{className:"font-medium text-white",children:C.userName??"未知"}),n.jsx("p",{className:"text-xs text-gray-500",children:C.userPhone??C.referralCode??(C.userId??"").slice(0,10)})]})]})}),n.jsx("td",{className:"p-4",children:n.jsxs("span",{className:"font-bold text-orange-400",children:["¥",Number(C.amount).toFixed(2)]})}),n.jsx("td",{className:"p-4",children:C.userCommissionInfo?n.jsxs("div",{className:"text-xs space-y-1",children:[n.jsxs("div",{className:"flex justify-between gap-4",children:[n.jsx("span",{className:"text-gray-500",children:"累计佣金:"}),n.jsxs("span",{className:"text-[#38bdac] font-medium",children:["¥",C.userCommissionInfo.totalCommission.toFixed(2)]})]}),n.jsxs("div",{className:"flex justify-between gap-4",children:[n.jsx("span",{className:"text-gray-500",children:"已提现:"}),n.jsxs("span",{className:"text-gray-400",children:["¥",C.userCommissionInfo.withdrawnEarnings.toFixed(2)]})]}),n.jsxs("div",{className:"flex justify-between gap-4",children:[n.jsx("span",{className:"text-gray-500",children:"待审核:"}),n.jsxs("span",{className:"text-orange-400",children:["¥",C.userCommissionInfo.pendingWithdrawals.toFixed(2)]})]}),n.jsxs("div",{className:"flex justify-between gap-4 pt-1 border-t border-gray-700/30",children:[n.jsx("span",{className:"text-gray-500",children:"审核后余额:"}),n.jsxs("span",{className:C.userCommissionInfo.availableAfterThis>=0?"text-green-400 font-medium":"text-red-400 font-medium",children:["¥",C.userCommissionInfo.availableAfterThis.toFixed(2)]})]})]}):n.jsx("span",{className:"text-gray-500 text-xs",children:"暂无数据"})}),n.jsxs("td",{className:"p-4",children:[k(C.status),C.errorMessage&&n.jsx("p",{className:"text-xs text-red-400 mt-1",children:C.errorMessage})]}),n.jsx("td",{className:"p-4 text-gray-400",children:C.processedAt?new Date(C.processedAt).toLocaleString():"-"}),n.jsx("td",{className:"p-4 text-gray-400",children:C.userConfirmedAt?n.jsxs("span",{className:"text-green-400",title:C.userConfirmedAt,children:["已确认 ",new Date(C.userConfirmedAt).toLocaleString()]}):"-"}),n.jsxs("td",{className:"p-4 text-right",children:[(C.status==="pending"||C.status==="pending_confirm")&&n.jsxs("div",{className:"flex items-center justify-end gap-2",children:[n.jsxs(he,{size:"sm",onClick:()=>y(C.id),disabled:x===C.id,className:"bg-green-600 hover:bg-green-700 text-white",children:[n.jsx(No,{className:"w-4 h-4 mr-1"}),"批准"]}),n.jsxs(he,{size:"sm",variant:"outline",onClick:()=>E(C.id),disabled:x===C.id,className:"border-red-500/50 text-red-400 hover:bg-red-500/10 bg-transparent",children:[n.jsx(Wr,{className:"w-4 h-4 mr-1"}),"拒绝"]})]}),(C.status==="success"||C.status==="completed")&&C.transactionId&&n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:C.transactionId})]})]},C.id))})]})})})})]})}const Ur=p.forwardRef(({className:r,...a},l)=>n.jsx("textarea",{className:He("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),ref:l,...a}));Ur.displayName="Textarea";function ho(r,[a,l]){return Math.min(l,Math.max(a,r))}const n2=["top","right","bottom","left"],jr=Math.min,Gt=Math.max,mo=Math.round,Jl=Math.floor,En=r=>({x:r,y:r}),r2={left:"right",right:"left",bottom:"top",top:"bottom"},s2={start:"end",end:"start"};function iu(r,a,l){return Gt(r,jr(a,l))}function Hn(r,a){return typeof r=="function"?r(a):r}function Kn(r){return r.split("-")[0]}function Fs(r){return r.split("-")[1]}function Uu(r){return r==="x"?"y":"x"}function Vu(r){return r==="y"?"height":"width"}const a2=new Set(["top","bottom"]);function kn(r){return a2.has(Kn(r))?"y":"x"}function Wu(r){return Uu(kn(r))}function l2(r,a,l){l===void 0&&(l=!1);const i=Fs(r),c=Wu(r),d=Vu(c);let f=c==="x"?i===(l?"end":"start")?"right":"left":i==="start"?"bottom":"top";return a.reference[d]>a.floating[d]&&(f=po(f)),[f,po(f)]}function o2(r){const a=po(r);return[cu(r),a,cu(a)]}function cu(r){return r.replace(/start|end/g,a=>s2[a])}const Am=["left","right"],Mm=["right","left"],i2=["top","bottom"],c2=["bottom","top"];function u2(r,a,l){switch(r){case"top":case"bottom":return l?a?Mm:Am:a?Am:Mm;case"left":case"right":return a?i2:c2;default:return[]}}function d2(r,a,l,i){const c=Fs(r);let d=u2(Kn(r),l==="start",i);return c&&(d=d.map(f=>f+"-"+c),a&&(d=d.concat(d.map(cu)))),d}function po(r){return r.replace(/left|right|bottom|top/g,a=>r2[a])}function f2(r){return{top:0,right:0,bottom:0,left:0,...r}}function Ix(r){return typeof r!="number"?f2(r):{top:r,right:r,bottom:r,left:r}}function xo(r){const{x:a,y:l,width:i,height:c}=r;return{width:i,height:c,top:l,left:a,right:a+i,bottom:l+c,x:a,y:l}}function Lm(r,a,l){let{reference:i,floating:c}=r;const d=kn(a),f=Wu(a),m=Vu(f),x=Kn(a),g=d==="y",v=i.x+i.width/2-c.width/2,y=i.y+i.height/2-c.height/2,E=i[m]/2-c[m]/2;let k;switch(x){case"top":k={x:v,y:i.y-c.height};break;case"bottom":k={x:v,y:i.y+i.height};break;case"right":k={x:i.x+i.width,y};break;case"left":k={x:i.x-c.width,y};break;default:k={x:i.x,y:i.y}}switch(Fs(a)){case"start":k[f]-=E*(l&&g?-1:1);break;case"end":k[f]+=E*(l&&g?-1:1);break}return k}async function h2(r,a){var l;a===void 0&&(a={});const{x:i,y:c,platform:d,rects:f,elements:m,strategy:x}=r,{boundary:g="clippingAncestors",rootBoundary:v="viewport",elementContext:y="floating",altBoundary:E=!1,padding:k=0}=Hn(a,r),C=Ix(k),j=m[E?y==="floating"?"reference":"floating":y],N=xo(await d.getClippingRect({element:(l=await(d.isElement==null?void 0:d.isElement(j)))==null||l?j:j.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(m.floating)),boundary:g,rootBoundary:v,strategy:x})),R=y==="floating"?{x:i,y:c,width:f.floating.width,height:f.floating.height}:f.reference,S=await(d.getOffsetParent==null?void 0:d.getOffsetParent(m.floating)),A=await(d.isElement==null?void 0:d.isElement(S))?await(d.getScale==null?void 0:d.getScale(S))||{x:1,y:1}:{x:1,y:1},V=xo(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:R,offsetParent:S,strategy:x}):R);return{top:(N.top-V.top+C.top)/A.y,bottom:(V.bottom-N.bottom+C.bottom)/A.y,left:(N.left-V.left+C.left)/A.x,right:(V.right-N.right+C.right)/A.x}}const m2=async(r,a,l)=>{const{placement:i="bottom",strategy:c="absolute",middleware:d=[],platform:f}=l,m=d.filter(Boolean),x=await(f.isRTL==null?void 0:f.isRTL(a));let g=await f.getElementRects({reference:r,floating:a,strategy:c}),{x:v,y}=Lm(g,i,x),E=i,k={},C=0;for(let j=0;j<m.length;j++){var b;const{name:N,fn:R}=m[j],{x:S,y:A,data:V,reset:Q}=await R({x:v,y,initialPlacement:i,placement:E,strategy:c,middlewareData:k,rects:g,platform:{...f,detectOverflow:(b=f.detectOverflow)!=null?b:h2},elements:{reference:r,floating:a}});v=S??v,y=A??y,k={...k,[N]:{...k[N],...V}},Q&&C<=50&&(C++,typeof Q=="object"&&(Q.placement&&(E=Q.placement),Q.rects&&(g=Q.rects===!0?await f.getElementRects({reference:r,floating:a,strategy:c}):Q.rects),{x:v,y}=Lm(g,E,x)),j=-1)}return{x:v,y,placement:E,strategy:c,middlewareData:k}},p2=r=>({name:"arrow",options:r,async fn(a){const{x:l,y:i,placement:c,rects:d,platform:f,elements:m,middlewareData:x}=a,{element:g,padding:v=0}=Hn(r,a)||{};if(g==null)return{};const y=Ix(v),E={x:l,y:i},k=Wu(c),C=Vu(k),b=await f.getDimensions(g),j=k==="y",N=j?"top":"left",R=j?"bottom":"right",S=j?"clientHeight":"clientWidth",A=d.reference[C]+d.reference[k]-E[k]-d.floating[C],V=E[k]-d.reference[k],Q=await(f.getOffsetParent==null?void 0:f.getOffsetParent(g));let G=Q?Q[S]:0;(!G||!await(f.isElement==null?void 0:f.isElement(Q)))&&(G=m.floating[S]||d.floating[C]);const U=A/2-V/2,ie=G/2-b[C]/2-1,fe=jr(y[N],ie),oe=jr(y[R],ie),H=fe,P=G-b[C]-oe,K=G/2-b[C]/2+U,re=iu(H,K,P),W=!x.arrow&&Fs(c)!=null&&K!==re&&d.reference[C]/2-(K<H?fe:oe)-b[C]/2<0,$=W?K<H?K-H:K-P:0;return{[k]:E[k]+$,data:{[k]:re,centerOffset:K-re-$,...W&&{alignmentOffset:$}},reset:W}}}),x2=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(a){var l,i;const{placement:c,middlewareData:d,rects:f,initialPlacement:m,platform:x,elements:g}=a,{mainAxis:v=!0,crossAxis:y=!0,fallbackPlacements:E,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:b=!0,...j}=Hn(r,a);if((l=d.arrow)!=null&&l.alignmentOffset)return{};const N=Kn(c),R=kn(m),S=Kn(m)===m,A=await(x.isRTL==null?void 0:x.isRTL(g.floating)),V=E||(S||!b?[po(m)]:o2(m)),Q=C!=="none";!E&&Q&&V.push(...d2(m,b,C,A));const G=[m,...V],U=await x.detectOverflow(a,j),ie=[];let fe=((i=d.flip)==null?void 0:i.overflows)||[];if(v&&ie.push(U[N]),y){const K=l2(c,f,A);ie.push(U[K[0]],U[K[1]])}if(fe=[...fe,{placement:c,overflows:ie}],!ie.every(K=>K<=0)){var oe,H;const K=(((oe=d.flip)==null?void 0:oe.index)||0)+1,re=G[K];if(re&&(!(y==="alignment"?R!==kn(re):!1)||fe.every(T=>kn(T.placement)===R?T.overflows[0]>0:!0)))return{data:{index:K,overflows:fe},reset:{placement:re}};let W=(H=fe.filter($=>$.overflows[0]<=0).sort(($,T)=>$.overflows[1]-T.overflows[1])[0])==null?void 0:H.placement;if(!W)switch(k){case"bestFit":{var P;const $=(P=fe.filter(T=>{if(Q){const J=kn(T.placement);return J===R||J==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(J=>J>0).reduce((J,X)=>J+X,0)]).sort((T,J)=>T[1]-J[1])[0])==null?void 0:P[0];$&&(W=$);break}case"initialPlacement":W=m;break}if(c!==W)return{reset:{placement:W}}}return{}}}};function Dm(r,a){return{top:r.top-a.height,right:r.right-a.width,bottom:r.bottom-a.height,left:r.left-a.width}}function Om(r){return n2.some(a=>r[a]>=0)}const g2=function(r){return r===void 0&&(r={}),{name:"hide",options:r,async fn(a){const{rects:l,platform:i}=a,{strategy:c="referenceHidden",...d}=Hn(r,a);switch(c){case"referenceHidden":{const f=await i.detectOverflow(a,{...d,elementContext:"reference"}),m=Dm(f,l.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:Om(m)}}}case"escaped":{const f=await i.detectOverflow(a,{...d,altBoundary:!0}),m=Dm(f,l.floating);return{data:{escapedOffsets:m,escaped:Om(m)}}}default:return{}}}}},Ax=new Set(["left","top"]);async function v2(r,a){const{placement:l,platform:i,elements:c}=r,d=await(i.isRTL==null?void 0:i.isRTL(c.floating)),f=Kn(l),m=Fs(l),x=kn(l)==="y",g=Ax.has(f)?-1:1,v=d&&x?-1:1,y=Hn(a,r);let{mainAxis:E,crossAxis:k,alignmentAxis:C}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return m&&typeof C=="number"&&(k=m==="end"?C*-1:C),x?{x:k*v,y:E*g}:{x:E*g,y:k*v}}const y2=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(a){var l,i;const{x:c,y:d,placement:f,middlewareData:m}=a,x=await v2(a,r);return f===((l=m.offset)==null?void 0:l.placement)&&(i=m.arrow)!=null&&i.alignmentOffset?{}:{x:c+x.x,y:d+x.y,data:{...x,placement:f}}}}},w2=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(a){const{x:l,y:i,placement:c,platform:d}=a,{mainAxis:f=!0,crossAxis:m=!1,limiter:x={fn:N=>{let{x:R,y:S}=N;return{x:R,y:S}}},...g}=Hn(r,a),v={x:l,y:i},y=await d.detectOverflow(a,g),E=kn(Kn(c)),k=Uu(E);let C=v[k],b=v[E];if(f){const N=k==="y"?"top":"left",R=k==="y"?"bottom":"right",S=C+y[N],A=C-y[R];C=iu(S,C,A)}if(m){const N=E==="y"?"top":"left",R=E==="y"?"bottom":"right",S=b+y[N],A=b-y[R];b=iu(S,b,A)}const j=x.fn({...a,[k]:C,[E]:b});return{...j,data:{x:j.x-l,y:j.y-i,enabled:{[k]:f,[E]:m}}}}}},N2=function(r){return r===void 0&&(r={}),{options:r,fn(a){const{x:l,y:i,placement:c,rects:d,middlewareData:f}=a,{offset:m=0,mainAxis:x=!0,crossAxis:g=!0}=Hn(r,a),v={x:l,y:i},y=kn(c),E=Uu(y);let k=v[E],C=v[y];const b=Hn(m,a),j=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(x){const S=E==="y"?"height":"width",A=d.reference[E]-d.floating[S]+j.mainAxis,V=d.reference[E]+d.reference[S]-j.mainAxis;k<A?k=A:k>V&&(k=V)}if(g){var N,R;const S=E==="y"?"width":"height",A=Ax.has(Kn(c)),V=d.reference[y]-d.floating[S]+(A&&((N=f.offset)==null?void 0:N[y])||0)+(A?0:j.crossAxis),Q=d.reference[y]+d.reference[S]+(A?0:((R=f.offset)==null?void 0:R[y])||0)-(A?j.crossAxis:0);C<V?C=V:C>Q&&(C=Q)}return{[E]:k,[y]:C}}}},j2=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(a){var l,i;const{placement:c,rects:d,platform:f,elements:m}=a,{apply:x=()=>{},...g}=Hn(r,a),v=await f.detectOverflow(a,g),y=Kn(c),E=Fs(c),k=kn(c)==="y",{width:C,height:b}=d.floating;let j,N;y==="top"||y==="bottom"?(j=y,N=E===(await(f.isRTL==null?void 0:f.isRTL(m.floating))?"start":"end")?"left":"right"):(N=y,j=E==="end"?"top":"bottom");const R=b-v.top-v.bottom,S=C-v.left-v.right,A=jr(b-v[j],R),V=jr(C-v[N],S),Q=!a.middlewareData.shift;let G=A,U=V;if((l=a.middlewareData.shift)!=null&&l.enabled.x&&(U=S),(i=a.middlewareData.shift)!=null&&i.enabled.y&&(G=R),Q&&!E){const fe=Gt(v.left,0),oe=Gt(v.right,0),H=Gt(v.top,0),P=Gt(v.bottom,0);k?U=C-2*(fe!==0||oe!==0?fe+oe:Gt(v.left,v.right)):G=b-2*(H!==0||P!==0?H+P:Gt(v.top,v.bottom))}await x({...a,availableWidth:U,availableHeight:G});const ie=await f.getDimensions(m.floating);return C!==ie.width||b!==ie.height?{reset:{rects:!0}}:{}}}};function Io(){return typeof window<"u"}function zs(r){return Mx(r)?(r.nodeName||"").toLowerCase():"#document"}function Qt(r){var a;return(r==null||(a=r.ownerDocument)==null?void 0:a.defaultView)||window}function _n(r){var a;return(a=(Mx(r)?r.ownerDocument:r.document)||window.document)==null?void 0:a.documentElement}function Mx(r){return Io()?r instanceof Node||r instanceof Qt(r).Node:!1}function hn(r){return Io()?r instanceof Element||r instanceof Qt(r).Element:!1}function Rn(r){return Io()?r instanceof HTMLElement||r instanceof Qt(r).HTMLElement:!1}function Fm(r){return!Io()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof Qt(r).ShadowRoot}const b2=new Set(["inline","contents"]);function Da(r){const{overflow:a,overflowX:l,overflowY:i,display:c}=mn(r);return/auto|scroll|overlay|hidden|clip/.test(a+i+l)&&!b2.has(c)}const S2=new Set(["table","td","th"]);function C2(r){return S2.has(zs(r))}const k2=[":popover-open",":modal"];function Ao(r){return k2.some(a=>{try{return r.matches(a)}catch{return!1}})}const E2=["transform","translate","scale","rotate","perspective"],P2=["transform","translate","scale","rotate","perspective","filter"],R2=["paint","layout","strict","content"];function Hu(r){const a=Ku(),l=hn(r)?mn(r):r;return E2.some(i=>l[i]?l[i]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!a&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!a&&(l.filter?l.filter!=="none":!1)||P2.some(i=>(l.willChange||"").includes(i))||R2.some(i=>(l.contain||"").includes(i))}function _2(r){let a=br(r);for(;Rn(a)&&!As(a);){if(Hu(a))return a;if(Ao(a))return null;a=br(a)}return null}function Ku(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const T2=new Set(["html","body","#document"]);function As(r){return T2.has(zs(r))}function mn(r){return Qt(r).getComputedStyle(r)}function Mo(r){return hn(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function br(r){if(zs(r)==="html")return r;const a=r.assignedSlot||r.parentNode||Fm(r)&&r.host||_n(r);return Fm(a)?a.host:a}function Lx(r){const a=br(r);return As(a)?r.ownerDocument?r.ownerDocument.body:r.body:Rn(a)&&Da(a)?a:Lx(a)}function Ta(r,a,l){var i;a===void 0&&(a=[]),l===void 0&&(l=!0);const c=Lx(r),d=c===((i=r.ownerDocument)==null?void 0:i.body),f=Qt(c);if(d){const m=uu(f);return a.concat(f,f.visualViewport||[],Da(c)?c:[],m&&l?Ta(m):[])}return a.concat(c,Ta(c,[],l))}function uu(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function Dx(r){const a=mn(r);let l=parseFloat(a.width)||0,i=parseFloat(a.height)||0;const c=Rn(r),d=c?r.offsetWidth:l,f=c?r.offsetHeight:i,m=mo(l)!==d||mo(i)!==f;return m&&(l=d,i=f),{width:l,height:i,$:m}}function Gu(r){return hn(r)?r:r.contextElement}function Rs(r){const a=Gu(r);if(!Rn(a))return En(1);const l=a.getBoundingClientRect(),{width:i,height:c,$:d}=Dx(a);let f=(d?mo(l.width):l.width)/i,m=(d?mo(l.height):l.height)/c;return(!f||!Number.isFinite(f))&&(f=1),(!m||!Number.isFinite(m))&&(m=1),{x:f,y:m}}const I2=En(0);function Ox(r){const a=Qt(r);return!Ku()||!a.visualViewport?I2:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function A2(r,a,l){return a===void 0&&(a=!1),!l||a&&l!==Qt(r)?!1:a}function Gr(r,a,l,i){a===void 0&&(a=!1),l===void 0&&(l=!1);const c=r.getBoundingClientRect(),d=Gu(r);let f=En(1);a&&(i?hn(i)&&(f=Rs(i)):f=Rs(r));const m=A2(d,l,i)?Ox(d):En(0);let x=(c.left+m.x)/f.x,g=(c.top+m.y)/f.y,v=c.width/f.x,y=c.height/f.y;if(d){const E=Qt(d),k=i&&hn(i)?Qt(i):i;let C=E,b=uu(C);for(;b&&i&&k!==C;){const j=Rs(b),N=b.getBoundingClientRect(),R=mn(b),S=N.left+(b.clientLeft+parseFloat(R.paddingLeft))*j.x,A=N.top+(b.clientTop+parseFloat(R.paddingTop))*j.y;x*=j.x,g*=j.y,v*=j.x,y*=j.y,x+=S,g+=A,C=Qt(b),b=uu(C)}}return xo({width:v,height:y,x,y:g})}function Lo(r,a){const l=Mo(r).scrollLeft;return a?a.left+l:Gr(_n(r)).left+l}function Fx(r,a){const l=r.getBoundingClientRect(),i=l.left+a.scrollLeft-Lo(r,l),c=l.top+a.scrollTop;return{x:i,y:c}}function M2(r){let{elements:a,rect:l,offsetParent:i,strategy:c}=r;const d=c==="fixed",f=_n(i),m=a?Ao(a.floating):!1;if(i===f||m&&d)return l;let x={scrollLeft:0,scrollTop:0},g=En(1);const v=En(0),y=Rn(i);if((y||!y&&!d)&&((zs(i)!=="body"||Da(f))&&(x=Mo(i)),Rn(i))){const k=Gr(i);g=Rs(i),v.x=k.x+i.clientLeft,v.y=k.y+i.clientTop}const E=f&&!y&&!d?Fx(f,x):En(0);return{width:l.width*g.x,height:l.height*g.y,x:l.x*g.x-x.scrollLeft*g.x+v.x+E.x,y:l.y*g.y-x.scrollTop*g.y+v.y+E.y}}function L2(r){return Array.from(r.getClientRects())}function D2(r){const a=_n(r),l=Mo(r),i=r.ownerDocument.body,c=Gt(a.scrollWidth,a.clientWidth,i.scrollWidth,i.clientWidth),d=Gt(a.scrollHeight,a.clientHeight,i.scrollHeight,i.clientHeight);let f=-l.scrollLeft+Lo(r);const m=-l.scrollTop;return mn(i).direction==="rtl"&&(f+=Gt(a.clientWidth,i.clientWidth)-c),{width:c,height:d,x:f,y:m}}const zm=25;function O2(r,a){const l=Qt(r),i=_n(r),c=l.visualViewport;let d=i.clientWidth,f=i.clientHeight,m=0,x=0;if(c){d=c.width,f=c.height;const v=Ku();(!v||v&&a==="fixed")&&(m=c.offsetLeft,x=c.offsetTop)}const g=Lo(i);if(g<=0){const v=i.ownerDocument,y=v.body,E=getComputedStyle(y),k=v.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,C=Math.abs(i.clientWidth-y.clientWidth-k);C<=zm&&(d-=C)}else g<=zm&&(d+=g);return{width:d,height:f,x:m,y:x}}const F2=new Set(["absolute","fixed"]);function z2(r,a){const l=Gr(r,!0,a==="fixed"),i=l.top+r.clientTop,c=l.left+r.clientLeft,d=Rn(r)?Rs(r):En(1),f=r.clientWidth*d.x,m=r.clientHeight*d.y,x=c*d.x,g=i*d.y;return{width:f,height:m,x,y:g}}function $m(r,a,l){let i;if(a==="viewport")i=O2(r,l);else if(a==="document")i=D2(_n(r));else if(hn(a))i=z2(a,l);else{const c=Ox(r);i={x:a.x-c.x,y:a.y-c.y,width:a.width,height:a.height}}return xo(i)}function zx(r,a){const l=br(r);return l===a||!hn(l)||As(l)?!1:mn(l).position==="fixed"||zx(l,a)}function $2(r,a){const l=a.get(r);if(l)return l;let i=Ta(r,[],!1).filter(m=>hn(m)&&zs(m)!=="body"),c=null;const d=mn(r).position==="fixed";let f=d?br(r):r;for(;hn(f)&&!As(f);){const m=mn(f),x=Hu(f);!x&&m.position==="fixed"&&(c=null),(d?!x&&!c:!x&&m.position==="static"&&!!c&&F2.has(c.position)||Da(f)&&!x&&zx(r,f))?i=i.filter(v=>v!==f):c=m,f=br(f)}return a.set(r,i),i}function B2(r){let{element:a,boundary:l,rootBoundary:i,strategy:c}=r;const f=[...l==="clippingAncestors"?Ao(a)?[]:$2(a,this._c):[].concat(l),i],m=f[0],x=f.reduce((g,v)=>{const y=$m(a,v,c);return g.top=Gt(y.top,g.top),g.right=jr(y.right,g.right),g.bottom=jr(y.bottom,g.bottom),g.left=Gt(y.left,g.left),g},$m(a,m,c));return{width:x.right-x.left,height:x.bottom-x.top,x:x.left,y:x.top}}function U2(r){const{width:a,height:l}=Dx(r);return{width:a,height:l}}function V2(r,a,l){const i=Rn(a),c=_n(a),d=l==="fixed",f=Gr(r,!0,d,a);let m={scrollLeft:0,scrollTop:0};const x=En(0);function g(){x.x=Lo(c)}if(i||!i&&!d)if((zs(a)!=="body"||Da(c))&&(m=Mo(a)),i){const k=Gr(a,!0,d,a);x.x=k.x+a.clientLeft,x.y=k.y+a.clientTop}else c&&g();d&&!i&&c&&g();const v=c&&!i&&!d?Fx(c,m):En(0),y=f.left+m.scrollLeft-x.x-v.x,E=f.top+m.scrollTop-x.y-v.y;return{x:y,y:E,width:f.width,height:f.height}}function Wc(r){return mn(r).position==="static"}function Bm(r,a){if(!Rn(r)||mn(r).position==="fixed")return null;if(a)return a(r);let l=r.offsetParent;return _n(r)===l&&(l=l.ownerDocument.body),l}function $x(r,a){const l=Qt(r);if(Ao(r))return l;if(!Rn(r)){let c=br(r);for(;c&&!As(c);){if(hn(c)&&!Wc(c))return c;c=br(c)}return l}let i=Bm(r,a);for(;i&&C2(i)&&Wc(i);)i=Bm(i,a);return i&&As(i)&&Wc(i)&&!Hu(i)?l:i||_2(r)||l}const W2=async function(r){const a=this.getOffsetParent||$x,l=this.getDimensions,i=await l(r.floating);return{reference:V2(r.reference,await a(r.floating),r.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function H2(r){return mn(r).direction==="rtl"}const K2={convertOffsetParentRelativeRectToViewportRelativeRect:M2,getDocumentElement:_n,getClippingRect:B2,getOffsetParent:$x,getElementRects:W2,getClientRects:L2,getDimensions:U2,getScale:Rs,isElement:hn,isRTL:H2};function Bx(r,a){return r.x===a.x&&r.y===a.y&&r.width===a.width&&r.height===a.height}function G2(r,a){let l=null,i;const c=_n(r);function d(){var m;clearTimeout(i),(m=l)==null||m.disconnect(),l=null}function f(m,x){m===void 0&&(m=!1),x===void 0&&(x=1),d();const g=r.getBoundingClientRect(),{left:v,top:y,width:E,height:k}=g;if(m||a(),!E||!k)return;const C=Jl(y),b=Jl(c.clientWidth-(v+E)),j=Jl(c.clientHeight-(y+k)),N=Jl(v),S={rootMargin:-C+"px "+-b+"px "+-j+"px "+-N+"px",threshold:Gt(0,jr(1,x))||1};let A=!0;function V(Q){const G=Q[0].intersectionRatio;if(G!==x){if(!A)return f();G?f(!1,G):i=setTimeout(()=>{f(!1,1e-7)},1e3)}G===1&&!Bx(g,r.getBoundingClientRect())&&f(),A=!1}try{l=new IntersectionObserver(V,{...S,root:c.ownerDocument})}catch{l=new IntersectionObserver(V,S)}l.observe(r)}return f(!0),d}function Q2(r,a,l,i){i===void 0&&(i={});const{ancestorScroll:c=!0,ancestorResize:d=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:x=!1}=i,g=Gu(r),v=c||d?[...g?Ta(g):[],...Ta(a)]:[];v.forEach(N=>{c&&N.addEventListener("scroll",l,{passive:!0}),d&&N.addEventListener("resize",l)});const y=g&&m?G2(g,l):null;let E=-1,k=null;f&&(k=new ResizeObserver(N=>{let[R]=N;R&&R.target===g&&k&&(k.unobserve(a),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var S;(S=k)==null||S.observe(a)})),l()}),g&&!x&&k.observe(g),k.observe(a));let C,b=x?Gr(r):null;x&&j();function j(){const N=Gr(r);b&&!Bx(b,N)&&l(),b=N,C=requestAnimationFrame(j)}return l(),()=>{var N;v.forEach(R=>{c&&R.removeEventListener("scroll",l),d&&R.removeEventListener("resize",l)}),y==null||y(),(N=k)==null||N.disconnect(),k=null,x&&cancelAnimationFrame(C)}}const Y2=y2,X2=w2,q2=x2,J2=j2,Z2=g2,Um=p2,eS=N2,tS=(r,a,l)=>{const i=new Map,c={platform:K2,...l},d={...c.platform,_c:i};return m2(r,a,{...c,platform:d})};var nS=typeof document<"u",rS=function(){},no=nS?p.useLayoutEffect:rS;function go(r,a){if(r===a)return!0;if(typeof r!=typeof a)return!1;if(typeof r=="function"&&r.toString()===a.toString())return!0;let l,i,c;if(r&&a&&typeof r=="object"){if(Array.isArray(r)){if(l=r.length,l!==a.length)return!1;for(i=l;i--!==0;)if(!go(r[i],a[i]))return!1;return!0}if(c=Object.keys(r),l=c.length,l!==Object.keys(a).length)return!1;for(i=l;i--!==0;)if(!{}.hasOwnProperty.call(a,c[i]))return!1;for(i=l;i--!==0;){const d=c[i];if(!(d==="_owner"&&r.$$typeof)&&!go(r[d],a[d]))return!1}return!0}return r!==r&&a!==a}function Ux(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function Vm(r,a){const l=Ux(r);return Math.round(a*l)/l}function Hc(r){const a=p.useRef(r);return no(()=>{a.current=r}),a}function sS(r){r===void 0&&(r={});const{placement:a="bottom",strategy:l="absolute",middleware:i=[],platform:c,elements:{reference:d,floating:f}={},transform:m=!0,whileElementsMounted:x,open:g}=r,[v,y]=p.useState({x:0,y:0,strategy:l,placement:a,middlewareData:{},isPositioned:!1}),[E,k]=p.useState(i);go(E,i)||k(i);const[C,b]=p.useState(null),[j,N]=p.useState(null),R=p.useCallback(T=>{T!==Q.current&&(Q.current=T,b(T))},[]),S=p.useCallback(T=>{T!==G.current&&(G.current=T,N(T))},[]),A=d||C,V=f||j,Q=p.useRef(null),G=p.useRef(null),U=p.useRef(v),ie=x!=null,fe=Hc(x),oe=Hc(c),H=Hc(g),P=p.useCallback(()=>{if(!Q.current||!G.current)return;const T={placement:a,strategy:l,middleware:E};oe.current&&(T.platform=oe.current),tS(Q.current,G.current,T).then(J=>{const X={...J,isPositioned:H.current!==!1};K.current&&!go(U.current,X)&&(U.current=X,Ia.flushSync(()=>{y(X)}))})},[E,a,l,oe,H]);no(()=>{g===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,y(T=>({...T,isPositioned:!1})))},[g]);const K=p.useRef(!1);no(()=>(K.current=!0,()=>{K.current=!1}),[]),no(()=>{if(A&&(Q.current=A),V&&(G.current=V),A&&V){if(fe.current)return fe.current(A,V,P);P()}},[A,V,P,fe,ie]);const re=p.useMemo(()=>({reference:Q,floating:G,setReference:R,setFloating:S}),[R,S]),W=p.useMemo(()=>({reference:A,floating:V}),[A,V]),$=p.useMemo(()=>{const T={position:l,left:0,top:0};if(!W.floating)return T;const J=Vm(W.floating,v.x),X=Vm(W.floating,v.y);return m?{...T,transform:"translate("+J+"px, "+X+"px)",...Ux(W.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:J,top:X}},[l,m,W.floating,v.x,v.y]);return p.useMemo(()=>({...v,update:P,refs:re,elements:W,floatingStyles:$}),[v,P,re,W,$])}const aS=r=>{function a(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:r,fn(l){const{element:i,padding:c}=typeof r=="function"?r(l):r;return i&&a(i)?i.current!=null?Um({element:i.current,padding:c}).fn(l):{}:i?Um({element:i,padding:c}).fn(l):{}}}},lS=(r,a)=>({...Y2(r),options:[r,a]}),oS=(r,a)=>({...X2(r),options:[r,a]}),iS=(r,a)=>({...eS(r),options:[r,a]}),cS=(r,a)=>({...q2(r),options:[r,a]}),uS=(r,a)=>({...J2(r),options:[r,a]}),dS=(r,a)=>({...Z2(r),options:[r,a]}),fS=(r,a)=>({...aS(r),options:[r,a]});var hS="Arrow",Vx=p.forwardRef((r,a)=>{const{children:l,width:i=10,height:c=5,...d}=r;return n.jsx(De.svg,{...d,ref:a,width:i,height:c,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:r.asChild?l:n.jsx("polygon",{points:"0,0 30,0 15,10"})})});Vx.displayName=hS;var mS=Vx,Qu="Popper",[Wx,Hx]=Cr(Qu),[pS,Kx]=Wx(Qu),Gx=r=>{const{__scopePopper:a,children:l}=r,[i,c]=p.useState(null);return n.jsx(pS,{scope:a,anchor:i,onAnchorChange:c,children:l})};Gx.displayName=Qu;var Qx="PopperAnchor",Yx=p.forwardRef((r,a)=>{const{__scopePopper:l,virtualRef:i,...c}=r,d=Kx(Qx,l),f=p.useRef(null),m=We(a,f),x=p.useRef(null);return p.useEffect(()=>{const g=x.current;x.current=(i==null?void 0:i.current)||f.current,g!==x.current&&d.onAnchorChange(x.current)}),i?null:n.jsx(De.div,{...c,ref:m})});Yx.displayName=Qx;var Yu="PopperContent",[xS,gS]=Wx(Yu),Xx=p.forwardRef((r,a)=>{var ne,me,Ee,Se,Te,Ae;const{__scopePopper:l,side:i="bottom",sideOffset:c=0,align:d="center",alignOffset:f=0,arrowPadding:m=0,avoidCollisions:x=!0,collisionBoundary:g=[],collisionPadding:v=0,sticky:y="partial",hideWhenDetached:E=!1,updatePositionStrategy:k="optimized",onPlaced:C,...b}=r,j=Kx(Yu,l),[N,R]=p.useState(null),S=We(a,nt=>R(nt)),[A,V]=p.useState(null),Q=Fu(A),G=(Q==null?void 0:Q.width)??0,U=(Q==null?void 0:Q.height)??0,ie=i+(d!=="center"?"-"+d:""),fe=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},oe=Array.isArray(g)?g:[g],H=oe.length>0,P={padding:fe,boundary:oe.filter(yS),altBoundary:H},{refs:K,floatingStyles:re,placement:W,isPositioned:$,middlewareData:T}=sS({strategy:"fixed",placement:ie,whileElementsMounted:(...nt)=>Q2(...nt,{animationFrame:k==="always"}),elements:{reference:j.anchor},middleware:[lS({mainAxis:c+U,alignmentAxis:f}),x&&oS({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?iS():void 0,...P}),x&&cS({...P}),uS({...P,apply:({elements:nt,rects:ut,availableWidth:$t,availableHeight:Bt})=>{const{width:At,height:Y}=ut.reference,Me=nt.floating.style;Me.setProperty("--radix-popper-available-width",`${$t}px`),Me.setProperty("--radix-popper-available-height",`${Bt}px`),Me.setProperty("--radix-popper-anchor-width",`${At}px`),Me.setProperty("--radix-popper-anchor-height",`${Y}px`)}}),A&&fS({element:A,padding:m}),wS({arrowWidth:G,arrowHeight:U}),E&&dS({strategy:"referenceHidden",...P})]}),[J,X]=Zx(W),L=Nr(C);Rt(()=>{$&&(L==null||L())},[$,L]);const B=(ne=T.arrow)==null?void 0:ne.x,le=(me=T.arrow)==null?void 0:me.y,Z=((Ee=T.arrow)==null?void 0:Ee.centerOffset)!==0,[be,je]=p.useState();return Rt(()=>{N&&je(window.getComputedStyle(N).zIndex)},[N]),n.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:$?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:be,"--radix-popper-transform-origin":[(Se=T.transformOrigin)==null?void 0:Se.x,(Te=T.transformOrigin)==null?void 0:Te.y].join(" "),...((Ae=T.hide)==null?void 0:Ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:r.dir,children:n.jsx(xS,{scope:l,placedSide:J,onArrowChange:V,arrowX:B,arrowY:le,shouldHideArrow:Z,children:n.jsx(De.div,{"data-side":J,"data-align":X,...b,ref:S,style:{...b.style,animation:$?void 0:"none"}})})})});Xx.displayName=Yu;var qx="PopperArrow",vS={top:"bottom",right:"left",bottom:"top",left:"right"},Jx=p.forwardRef(function(a,l){const{__scopePopper:i,...c}=a,d=gS(qx,i),f=vS[d.placedSide];return n.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:n.jsx(mS,{...c,ref:l,style:{...c.style,display:"block"}})})});Jx.displayName=qx;function yS(r){return r!==null}var wS=r=>({name:"transformOrigin",options:r,fn(a){var j,N,R;const{placement:l,rects:i,middlewareData:c}=a,f=((j=c.arrow)==null?void 0:j.centerOffset)!==0,m=f?0:r.arrowWidth,x=f?0:r.arrowHeight,[g,v]=Zx(l),y={start:"0%",center:"50%",end:"100%"}[v],E=(((N=c.arrow)==null?void 0:N.x)??0)+m/2,k=(((R=c.arrow)==null?void 0:R.y)??0)+x/2;let C="",b="";return g==="bottom"?(C=f?y:`${E}px`,b=`${-x}px`):g==="top"?(C=f?y:`${E}px`,b=`${i.floating.height+x}px`):g==="right"?(C=`${-x}px`,b=f?y:`${k}px`):g==="left"&&(C=`${i.floating.width+x}px`,b=f?y:`${k}px`),{data:{x:C,y:b}}}});function Zx(r){const[a,l="center"]=r.split("-");return[a,l]}var NS=Gx,jS=Yx,bS=Xx,SS=Jx,eg=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),CS="VisuallyHidden",kS=p.forwardRef((r,a)=>n.jsx(De.span,{...r,ref:a,style:{...eg,...r.style}}));kS.displayName=CS;var ES=[" ","Enter","ArrowUp","ArrowDown"],PS=[" ","Enter"],Qr="Select",[Do,Oo,RS]=zu(Qr),[$s]=Cr(Qr,[RS,Hx]),Fo=Hx(),[_S,kr]=$s(Qr),[TS,IS]=$s(Qr),tg=r=>{const{__scopeSelect:a,children:l,open:i,defaultOpen:c,onOpenChange:d,value:f,defaultValue:m,onValueChange:x,dir:g,name:v,autoComplete:y,disabled:E,required:k,form:C}=r,b=Fo(a),[j,N]=p.useState(null),[R,S]=p.useState(null),[A,V]=p.useState(!1),Q=Ro(g),[G,U]=Hr({prop:i,defaultProp:c??!1,onChange:d,caller:Qr}),[ie,fe]=Hr({prop:f,defaultProp:m,onChange:x,caller:Qr}),oe=p.useRef(null),H=j?C||!!j.closest("form"):!0,[P,K]=p.useState(new Set),re=Array.from(P).map(W=>W.props.value).join(";");return n.jsx(NS,{...b,children:n.jsxs(_S,{required:k,scope:a,trigger:j,onTriggerChange:N,valueNode:R,onValueNodeChange:S,valueNodeHasChildren:A,onValueNodeHasChildrenChange:V,contentId:wr(),value:ie,onValueChange:fe,open:G,onOpenChange:U,dir:Q,triggerPointerDownPosRef:oe,disabled:E,children:[n.jsx(Do.Provider,{scope:a,children:n.jsx(TS,{scope:r.__scopeSelect,onNativeOptionAdd:p.useCallback(W=>{K($=>new Set($).add(W))},[]),onNativeOptionRemove:p.useCallback(W=>{K($=>{const T=new Set($);return T.delete(W),T})},[]),children:l})}),H?n.jsxs(bg,{"aria-hidden":!0,required:k,tabIndex:-1,name:v,autoComplete:y,value:ie,onChange:W=>fe(W.target.value),disabled:E,form:C,children:[ie===void 0?n.jsx("option",{value:""}):null,Array.from(P)]},re):null]})})};tg.displayName=Qr;var ng="SelectTrigger",rg=p.forwardRef((r,a)=>{const{__scopeSelect:l,disabled:i=!1,...c}=r,d=Fo(l),f=kr(ng,l),m=f.disabled||i,x=We(a,f.onTriggerChange),g=Oo(l),v=p.useRef("touch"),[y,E,k]=Cg(b=>{const j=g().filter(S=>!S.disabled),N=j.find(S=>S.value===f.value),R=kg(j,b,N);R!==void 0&&f.onValueChange(R.value)}),C=b=>{m||(f.onOpenChange(!0),k()),b&&(f.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return n.jsx(jS,{asChild:!0,...d,children:n.jsx(De.button,{type:"button",role:"combobox","aria-controls":f.contentId,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":Sg(f.value)?"":void 0,...c,ref:x,onClick:Ie(c.onClick,b=>{b.currentTarget.focus(),v.current!=="mouse"&&C(b)}),onPointerDown:Ie(c.onPointerDown,b=>{v.current=b.pointerType;const j=b.target;j.hasPointerCapture(b.pointerId)&&j.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(C(b),b.preventDefault())}),onKeyDown:Ie(c.onKeyDown,b=>{const j=y.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&E(b.key),!(j&&b.key===" ")&&ES.includes(b.key)&&(C(),b.preventDefault())})})})});rg.displayName=ng;var sg="SelectValue",ag=p.forwardRef((r,a)=>{const{__scopeSelect:l,className:i,style:c,children:d,placeholder:f="",...m}=r,x=kr(sg,l),{onValueNodeHasChildrenChange:g}=x,v=d!==void 0,y=We(a,x.onValueNodeChange);return Rt(()=>{g(v)},[g,v]),n.jsx(De.span,{...m,ref:y,style:{pointerEvents:"none"},children:Sg(x.value)?n.jsx(n.Fragment,{children:f}):d})});ag.displayName=sg;var AS="SelectIcon",lg=p.forwardRef((r,a)=>{const{__scopeSelect:l,children:i,...c}=r;return n.jsx(De.span,{"aria-hidden":!0,...c,ref:a,children:i||"▼"})});lg.displayName=AS;var MS="SelectPortal",og=r=>n.jsx(Iu,{asChild:!0,...r});og.displayName=MS;var Yr="SelectContent",ig=p.forwardRef((r,a)=>{const l=kr(Yr,r.__scopeSelect),[i,c]=p.useState();if(Rt(()=>{c(new DocumentFragment)},[]),!l.open){const d=i;return d?Ia.createPortal(n.jsx(cg,{scope:r.__scopeSelect,children:n.jsx(Do.Slot,{scope:r.__scopeSelect,children:n.jsx("div",{children:r.children})})}),d):null}return n.jsx(ug,{...r,ref:a})});ig.displayName=Yr;var dn=10,[cg,Er]=$s(Yr),LS="SelectContentImpl",DS=_a("SelectContent.RemoveScroll"),ug=p.forwardRef((r,a)=>{const{__scopeSelect:l,position:i="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:d,onPointerDownOutside:f,side:m,sideOffset:x,align:g,alignOffset:v,arrowPadding:y,collisionBoundary:E,collisionPadding:k,sticky:C,hideWhenDetached:b,avoidCollisions:j,...N}=r,R=kr(Yr,l),[S,A]=p.useState(null),[V,Q]=p.useState(null),G=We(a,ne=>A(ne)),[U,ie]=p.useState(null),[fe,oe]=p.useState(null),H=Oo(l),[P,K]=p.useState(!1),re=p.useRef(!1);p.useEffect(()=>{if(S)return Wp(S)},[S]),Lp();const W=p.useCallback(ne=>{const[me,...Ee]=H().map(Ae=>Ae.ref.current),[Se]=Ee.slice(-1),Te=document.activeElement;for(const Ae of ne)if(Ae===Te||(Ae==null||Ae.scrollIntoView({block:"nearest"}),Ae===me&&V&&(V.scrollTop=0),Ae===Se&&V&&(V.scrollTop=V.scrollHeight),Ae==null||Ae.focus(),document.activeElement!==Te))return},[H,V]),$=p.useCallback(()=>W([U,S]),[W,U,S]);p.useEffect(()=>{P&&$()},[P,$]);const{onOpenChange:T,triggerPointerDownPosRef:J}=R;p.useEffect(()=>{if(S){let ne={x:0,y:0};const me=Se=>{var Te,Ae;ne={x:Math.abs(Math.round(Se.pageX)-(((Te=J.current)==null?void 0:Te.x)??0)),y:Math.abs(Math.round(Se.pageY)-(((Ae=J.current)==null?void 0:Ae.y)??0))}},Ee=Se=>{ne.x<=10&&ne.y<=10?Se.preventDefault():S.contains(Se.target)||T(!1),document.removeEventListener("pointermove",me),J.current=null};return J.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",Ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",Ee,{capture:!0})}}},[S,T,J]),p.useEffect(()=>{const ne=()=>T(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[T]);const[X,L]=Cg(ne=>{const me=H().filter(Te=>!Te.disabled),Ee=me.find(Te=>Te.ref.current===document.activeElement),Se=kg(me,ne,Ee);Se&&setTimeout(()=>Se.ref.current.focus())}),B=p.useCallback((ne,me,Ee)=>{const Se=!re.current&&!Ee;(R.value!==void 0&&R.value===me||Se)&&(ie(ne),Se&&(re.current=!0))},[R.value]),le=p.useCallback(()=>S==null?void 0:S.focus(),[S]),Z=p.useCallback((ne,me,Ee)=>{const Se=!re.current&&!Ee;(R.value!==void 0&&R.value===me||Se)&&oe(ne)},[R.value]),be=i==="popper"?du:dg,je=be===du?{side:m,sideOffset:x,align:g,alignOffset:v,arrowPadding:y,collisionBoundary:E,collisionPadding:k,sticky:C,hideWhenDetached:b,avoidCollisions:j}:{};return n.jsx(cg,{scope:l,content:S,viewport:V,onViewportChange:Q,itemRefCallback:B,selectedItem:U,onItemLeave:le,itemTextRefCallback:Z,focusSelectedItem:$,selectedItemText:fe,position:i,isPositioned:P,searchRef:X,children:n.jsx(Au,{as:DS,allowPinchZoom:!0,children:n.jsx(Tu,{asChild:!0,trapped:R.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:Ie(c,ne=>{var me;(me=R.trigger)==null||me.focus({preventScroll:!0}),ne.preventDefault()}),children:n.jsx(_u,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>R.onOpenChange(!1),children:n.jsx(be,{role:"listbox",id:R.contentId,"data-state":R.open?"open":"closed",dir:R.dir,onContextMenu:ne=>ne.preventDefault(),...N,...je,onPlaced:()=>K(!0),ref:G,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:Ie(N.onKeyDown,ne=>{const me=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!me&&ne.key.length===1&&L(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let Se=H().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(Se=Se.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const Te=ne.target,Ae=Se.indexOf(Te);Se=Se.slice(Ae+1)}setTimeout(()=>W(Se)),ne.preventDefault()}})})})})})})});ug.displayName=LS;var OS="SelectItemAlignedPosition",dg=p.forwardRef((r,a)=>{const{__scopeSelect:l,onPlaced:i,...c}=r,d=kr(Yr,l),f=Er(Yr,l),[m,x]=p.useState(null),[g,v]=p.useState(null),y=We(a,G=>v(G)),E=Oo(l),k=p.useRef(!1),C=p.useRef(!0),{viewport:b,selectedItem:j,selectedItemText:N,focusSelectedItem:R}=f,S=p.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&g&&b&&j&&N){const G=d.trigger.getBoundingClientRect(),U=g.getBoundingClientRect(),ie=d.valueNode.getBoundingClientRect(),fe=N.getBoundingClientRect();if(d.dir!=="rtl"){const Te=fe.left-U.left,Ae=ie.left-Te,nt=G.left-Ae,ut=G.width+nt,$t=Math.max(ut,U.width),Bt=window.innerWidth-dn,At=ho(Ae,[dn,Math.max(dn,Bt-$t)]);m.style.minWidth=ut+"px",m.style.left=At+"px"}else{const Te=U.right-fe.right,Ae=window.innerWidth-ie.right-Te,nt=window.innerWidth-G.right-Ae,ut=G.width+nt,$t=Math.max(ut,U.width),Bt=window.innerWidth-dn,At=ho(Ae,[dn,Math.max(dn,Bt-$t)]);m.style.minWidth=ut+"px",m.style.right=At+"px"}const oe=E(),H=window.innerHeight-dn*2,P=b.scrollHeight,K=window.getComputedStyle(g),re=parseInt(K.borderTopWidth,10),W=parseInt(K.paddingTop,10),$=parseInt(K.borderBottomWidth,10),T=parseInt(K.paddingBottom,10),J=re+W+P+T+$,X=Math.min(j.offsetHeight*5,J),L=window.getComputedStyle(b),B=parseInt(L.paddingTop,10),le=parseInt(L.paddingBottom,10),Z=G.top+G.height/2-dn,be=H-Z,je=j.offsetHeight/2,ne=j.offsetTop+je,me=re+W+ne,Ee=J-me;if(me<=Z){const Te=oe.length>0&&j===oe[oe.length-1].ref.current;m.style.bottom="0px";const Ae=g.clientHeight-b.offsetTop-b.offsetHeight,nt=Math.max(be,je+(Te?le:0)+Ae+$),ut=me+nt;m.style.height=ut+"px"}else{const Te=oe.length>0&&j===oe[0].ref.current;m.style.top="0px";const nt=Math.max(Z,re+b.offsetTop+(Te?B:0)+je)+Ee;m.style.height=nt+"px",b.scrollTop=me-Z+b.offsetTop}m.style.margin=`${dn}px 0`,m.style.minHeight=X+"px",m.style.maxHeight=H+"px",i==null||i(),requestAnimationFrame(()=>k.current=!0)}},[E,d.trigger,d.valueNode,m,g,b,j,N,d.dir,i]);Rt(()=>S(),[S]);const[A,V]=p.useState();Rt(()=>{g&&V(window.getComputedStyle(g).zIndex)},[g]);const Q=p.useCallback(G=>{G&&C.current===!0&&(S(),R==null||R(),C.current=!1)},[S,R]);return n.jsx(zS,{scope:l,contentWrapper:m,shouldExpandOnScrollRef:k,onScrollButtonChange:Q,children:n.jsx("div",{ref:x,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:n.jsx(De.div,{...c,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});dg.displayName=OS;var FS="SelectPopperPosition",du=p.forwardRef((r,a)=>{const{__scopeSelect:l,align:i="start",collisionPadding:c=dn,...d}=r,f=Fo(l);return n.jsx(bS,{...f,...d,ref:a,align:i,collisionPadding:c,style:{boxSizing:"border-box",...d.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});du.displayName=FS;var[zS,Xu]=$s(Yr,{}),fu="SelectViewport",fg=p.forwardRef((r,a)=>{const{__scopeSelect:l,nonce:i,...c}=r,d=Er(fu,l),f=Xu(fu,l),m=We(a,d.onViewportChange),x=p.useRef(0);return n.jsxs(n.Fragment,{children:[n.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),n.jsx(Do.Slot,{scope:l,children:n.jsx(De.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:Ie(c.onScroll,g=>{const v=g.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:E}=f;if(E!=null&&E.current&&y){const k=Math.abs(x.current-v.scrollTop);if(k>0){const C=window.innerHeight-dn*2,b=parseFloat(y.style.minHeight),j=parseFloat(y.style.height),N=Math.max(b,j);if(N<C){const R=N+k,S=Math.min(C,R),A=R-S;y.style.height=S+"px",y.style.bottom==="0px"&&(v.scrollTop=A>0?A:0,y.style.justifyContent="flex-end")}}}x.current=v.scrollTop})})})]})});fg.displayName=fu;var hg="SelectGroup",[$S,BS]=$s(hg),US=p.forwardRef((r,a)=>{const{__scopeSelect:l,...i}=r,c=wr();return n.jsx($S,{scope:l,id:c,children:n.jsx(De.div,{role:"group","aria-labelledby":c,...i,ref:a})})});US.displayName=hg;var mg="SelectLabel",VS=p.forwardRef((r,a)=>{const{__scopeSelect:l,...i}=r,c=BS(mg,l);return n.jsx(De.div,{id:c.id,...i,ref:a})});VS.displayName=mg;var vo="SelectItem",[WS,pg]=$s(vo),xg=p.forwardRef((r,a)=>{const{__scopeSelect:l,value:i,disabled:c=!1,textValue:d,...f}=r,m=kr(vo,l),x=Er(vo,l),g=m.value===i,[v,y]=p.useState(d??""),[E,k]=p.useState(!1),C=We(a,R=>{var S;return(S=x.itemRefCallback)==null?void 0:S.call(x,R,i,c)}),b=wr(),j=p.useRef("touch"),N=()=>{c||(m.onValueChange(i),m.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return n.jsx(WS,{scope:l,value:i,disabled:c,textId:b,isSelected:g,onItemTextChange:p.useCallback(R=>{y(S=>S||((R==null?void 0:R.textContent)??"").trim())},[]),children:n.jsx(Do.ItemSlot,{scope:l,value:i,disabled:c,textValue:v,children:n.jsx(De.div,{role:"option","aria-labelledby":b,"data-highlighted":E?"":void 0,"aria-selected":g&&E,"data-state":g?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...f,ref:C,onFocus:Ie(f.onFocus,()=>k(!0)),onBlur:Ie(f.onBlur,()=>k(!1)),onClick:Ie(f.onClick,()=>{j.current!=="mouse"&&N()}),onPointerUp:Ie(f.onPointerUp,()=>{j.current==="mouse"&&N()}),onPointerDown:Ie(f.onPointerDown,R=>{j.current=R.pointerType}),onPointerMove:Ie(f.onPointerMove,R=>{var S;j.current=R.pointerType,c?(S=x.onItemLeave)==null||S.call(x):j.current==="mouse"&&R.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ie(f.onPointerLeave,R=>{var S;R.currentTarget===document.activeElement&&((S=x.onItemLeave)==null||S.call(x))}),onKeyDown:Ie(f.onKeyDown,R=>{var A;((A=x.searchRef)==null?void 0:A.current)!==""&&R.key===" "||(PS.includes(R.key)&&N(),R.key===" "&&R.preventDefault())})})})})});xg.displayName=vo;var Ea="SelectItemText",gg=p.forwardRef((r,a)=>{const{__scopeSelect:l,className:i,style:c,...d}=r,f=kr(Ea,l),m=Er(Ea,l),x=pg(Ea,l),g=IS(Ea,l),[v,y]=p.useState(null),E=We(a,N=>y(N),x.onItemTextChange,N=>{var R;return(R=m.itemTextRefCallback)==null?void 0:R.call(m,N,x.value,x.disabled)}),k=v==null?void 0:v.textContent,C=p.useMemo(()=>n.jsx("option",{value:x.value,disabled:x.disabled,children:k},x.value),[x.disabled,x.value,k]),{onNativeOptionAdd:b,onNativeOptionRemove:j}=g;return Rt(()=>(b(C),()=>j(C)),[b,j,C]),n.jsxs(n.Fragment,{children:[n.jsx(De.span,{id:x.textId,...d,ref:E}),x.isSelected&&f.valueNode&&!f.valueNodeHasChildren?Ia.createPortal(d.children,f.valueNode):null]})});gg.displayName=Ea;var vg="SelectItemIndicator",yg=p.forwardRef((r,a)=>{const{__scopeSelect:l,...i}=r;return pg(vg,l).isSelected?n.jsx(De.span,{"aria-hidden":!0,...i,ref:a}):null});yg.displayName=vg;var hu="SelectScrollUpButton",wg=p.forwardRef((r,a)=>{const l=Er(hu,r.__scopeSelect),i=Xu(hu,r.__scopeSelect),[c,d]=p.useState(!1),f=We(a,i.onScrollButtonChange);return Rt(()=>{if(l.viewport&&l.isPositioned){let m=function(){const g=x.scrollTop>0;d(g)};const x=l.viewport;return m(),x.addEventListener("scroll",m),()=>x.removeEventListener("scroll",m)}},[l.viewport,l.isPositioned]),c?n.jsx(jg,{...r,ref:f,onAutoScroll:()=>{const{viewport:m,selectedItem:x}=l;m&&x&&(m.scrollTop=m.scrollTop-x.offsetHeight)}}):null});wg.displayName=hu;var mu="SelectScrollDownButton",Ng=p.forwardRef((r,a)=>{const l=Er(mu,r.__scopeSelect),i=Xu(mu,r.__scopeSelect),[c,d]=p.useState(!1),f=We(a,i.onScrollButtonChange);return Rt(()=>{if(l.viewport&&l.isPositioned){let m=function(){const g=x.scrollHeight-x.clientHeight,v=Math.ceil(x.scrollTop)<g;d(v)};const x=l.viewport;return m(),x.addEventListener("scroll",m),()=>x.removeEventListener("scroll",m)}},[l.viewport,l.isPositioned]),c?n.jsx(jg,{...r,ref:f,onAutoScroll:()=>{const{viewport:m,selectedItem:x}=l;m&&x&&(m.scrollTop=m.scrollTop+x.offsetHeight)}}):null});Ng.displayName=mu;var jg=p.forwardRef((r,a)=>{const{__scopeSelect:l,onAutoScroll:i,...c}=r,d=Er("SelectScrollButton",l),f=p.useRef(null),m=Oo(l),x=p.useCallback(()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},[]);return p.useEffect(()=>()=>x(),[x]),Rt(()=>{var v;const g=m().find(y=>y.ref.current===document.activeElement);(v=g==null?void 0:g.ref.current)==null||v.scrollIntoView({block:"nearest"})},[m]),n.jsx(De.div,{"aria-hidden":!0,...c,ref:a,style:{flexShrink:0,...c.style},onPointerDown:Ie(c.onPointerDown,()=>{f.current===null&&(f.current=window.setInterval(i,50))}),onPointerMove:Ie(c.onPointerMove,()=>{var g;(g=d.onItemLeave)==null||g.call(d),f.current===null&&(f.current=window.setInterval(i,50))}),onPointerLeave:Ie(c.onPointerLeave,()=>{x()})})}),HS="SelectSeparator",KS=p.forwardRef((r,a)=>{const{__scopeSelect:l,...i}=r;return n.jsx(De.div,{"aria-hidden":!0,...i,ref:a})});KS.displayName=HS;var pu="SelectArrow",GS=p.forwardRef((r,a)=>{const{__scopeSelect:l,...i}=r,c=Fo(l),d=kr(pu,l),f=Er(pu,l);return d.open&&f.position==="popper"?n.jsx(SS,{...c,...i,ref:a}):null});GS.displayName=pu;var QS="SelectBubbleInput",bg=p.forwardRef(({__scopeSelect:r,value:a,...l},i)=>{const c=p.useRef(null),d=We(i,c),f=Ou(a);return p.useEffect(()=>{const m=c.current;if(!m)return;const x=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(x,"value").set;if(f!==a&&v){const y=new Event("change",{bubbles:!0});v.call(m,a),m.dispatchEvent(y)}},[f,a]),n.jsx(De.select,{...l,style:{...eg,...l.style},ref:d,defaultValue:a})});bg.displayName=QS;function Sg(r){return r===""||r===void 0}function Cg(r){const a=Nr(r),l=p.useRef(""),i=p.useRef(0),c=p.useCallback(f=>{const m=l.current+f;a(m),(function x(g){l.current=g,window.clearTimeout(i.current),g!==""&&(i.current=window.setTimeout(()=>x(""),1e3))})(m)},[a]),d=p.useCallback(()=>{l.current="",window.clearTimeout(i.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(i.current),[]),[l,c,d]}function kg(r,a,l){const c=a.length>1&&Array.from(a).every(g=>g===a[0])?a[0]:a,d=l?r.indexOf(l):-1;let f=YS(r,Math.max(d,0));c.length===1&&(f=f.filter(g=>g!==l));const x=f.find(g=>g.textValue.toLowerCase().startsWith(c.toLowerCase()));return x!==l?x:void 0}function YS(r,a){return r.map((l,i)=>r[(a+i)%r.length])}var XS=tg,Eg=rg,qS=ag,JS=lg,ZS=og,Pg=ig,eC=fg,Rg=xg,tC=gg,nC=yg,rC=wg,sC=Ng;const Kc=XS,Gc=qS,ro=p.forwardRef(({className:r,children:a,...l},i)=>n.jsxs(Eg,{ref:i,className:He("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",r),...l,children:[a,n.jsx(JS,{asChild:!0,children:n.jsx(ap,{className:"h-4 w-4 opacity-50"})})]}));ro.displayName=Eg.displayName;const so=p.forwardRef(({className:r,children:a,position:l="popper",...i},c)=>n.jsx(ZS,{children:n.jsxs(Pg,{ref:c,className:He("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",l==="popper"&&"data-[side=bottom]:translate-y-1",r),position:l,...i,children:[n.jsx(rC,{className:"flex cursor-default items-center justify-center py-1",children:n.jsx(xw,{className:"h-4 w-4"})}),n.jsx(eC,{className:"p-1",children:a}),n.jsx(sC,{className:"flex cursor-default items-center justify-center py-1",children:n.jsx(ap,{className:"h-4 w-4"})})]})}));so.displayName=Pg.displayName;const gr=p.forwardRef(({className:r,children:a,...l},i)=>n.jsxs(Rg,{ref:i,className:He("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...l,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(nC,{children:n.jsx(No,{className:"h-4 w-4"})})}),n.jsx(tC,{children:a})]}));gr.displayName=Rg.displayName;function aC(r){const a=new Map;for(const l of r){const i=l.partId||"part-1",c=l.partTitle||"未分类",d=l.chapterId||"chapter-1",f=l.chapterTitle||"未分类";a.has(i)||a.set(i,{id:i,title:c,chapters:new Map});const m=a.get(i);m.chapters.has(d)||m.chapters.set(d,{id:d,title:f,sections:[]}),m.chapters.get(d).sections.push({id:l.id,title:l.title,price:l.price??1,filePath:l.filePath,isFree:l.isFree})}return Array.from(a.values()).map(l=>({...l,chapters:Array.from(l.chapters.values())}))}function lC(r,a){const l=r.split(`
`),i=[];let c=null,d=[],f=1;for(const m of l){const x=m.match(/^#+\s+(.+)$/)||m.match(/^(\d+[.\、]\s*.+)$/);x?(c&&(c.content=d.join(`
`).trim(),c.content&&i.push(c)),c={id:`import-${f}`,title:x[1].replace(/^#+\s*/,"").trim(),price:1,isFree:f<=3},d=[],f++):c?d.push(m):m.trim()&&(c={id:`import-${f}`,title:a.replace(/\.(txt|md|markdown)$/i,""),price:1,isFree:!0},d.push(m),f++)}return c&&(c.content=d.join(`
`).trim(),c.content&&i.push(c)),i}function oC(){const[r,a]=p.useState([]),[l,i]=p.useState(!0),[c,d]=p.useState([]),[f,m]=p.useState(null),[x,g]=p.useState(!1),[v,y]=p.useState(!1),[E,k]=p.useState(!1),[C,b]=p.useState(!1),[j,N]=p.useState(""),[R,S]=p.useState(!1),[A,V]=p.useState(!1),[Q,G]=p.useState(!1),[U,ie]=p.useState(""),[fe,oe]=p.useState(!1),[H,P]=p.useState(!1),[K,re]=p.useState(""),[W,$]=p.useState([]),[T,J]=p.useState(!1),[X,L]=p.useState(!1),B=p.useRef(null),le=p.useRef(null),[Z,be]=p.useState({id:"",title:"",price:1,partId:"part-1",chapterId:"chapter-1",content:""}),je=aC(r),ne=r.length,me=async()=>{i(!0);try{const z=await Xe("/api/db/book?action=list");a(Array.isArray(z==null?void 0:z.sections)?z.sections:[]),c.length===0&&je.length>0&&d([je[0].id])}catch(z){console.error(z),a([])}finally{i(!1)}};p.useEffect(()=>{me()},[]),p.useEffect(()=>{!l&&je.length>0&&c.length===0&&d([je[0].id])},[l,je.length,c.length]);const Ee=z=>{d(de=>de.includes(z)?de.filter(lt=>lt!==z):[...de,z])},Se=async z=>{oe(!0);try{const de=await Xe(`/api/db/book?action=read&id=${encodeURIComponent(z.id)}`);de!=null&&de.success&&de.section?m({id:z.id,title:de.section.title??z.title,price:de.section.price??z.price,content:de.section.content??"",filePath:z.filePath,isFree:z.isFree||z.price===0}):(m({id:z.id,title:z.title,price:z.price,content:"",filePath:z.filePath,isFree:z.isFree}),de&&!de.success&&alert("无法读取文件内容: "+(de.error||"未知错误")))}catch(de){console.error(de),m({id:z.id,title:z.title,price:z.price,content:"",filePath:z.filePath,isFree:z.isFree})}finally{oe(!1)}},Te=async()=>{var z;if(f){P(!0);try{let de=f.content||"";const lt=[new RegExp(`^#+\\s*${f.id.replace(".","\\.")}\\s+.*$`,"gm"),new RegExp(`^#+\\s*${f.id.replace(".","\\.")}[:].*$`,"gm"),new RegExp(`^#\\s+.*${(z=f.title)==null?void 0:z.slice(0,10).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}.*$`,"gm")];for(const Ut of lt)de=de.replace(Ut,"");de=de.replace(/^\s*\n+/,"").trim();const Ue=await Wn("/api/db/book",{id:f.id,title:f.title,price:f.isFree?0:f.price,content:de,isFree:f.isFree||f.price===0,saveToFile:!0});Ue&&Ue.success!==!1?(alert(`已保存章节: ${f.title}`),m(null),me()):alert("保存失败: "+(Ue&&typeof Ue=="object"&&"error"in Ue?Ue.error:"未知错误"))}catch(de){console.error(de),alert("保存失败")}finally{P(!1)}}},Ae=async()=>{if(!Z.id||!Z.title){alert("请填写章节ID和标题");return}P(!0);try{const z=await Wn("/api/db/book",{id:Z.id,title:Z.title,price:Z.price,content:Z.content,partId:Z.partId,chapterId:Z.chapterId,saveToFile:!1});z&&z.success!==!1?(alert(`章节创建成功: ${Z.title}`),G(!1),be({id:"",title:"",price:1,partId:"part-1",chapterId:"chapter-1",content:""}),me()):alert("创建失败: "+(z&&typeof z=="object"&&"error"in z?z.error:"未知错误"))}catch(z){console.error(z),alert("创建失败")}finally{P(!1)}},nt=async z=>{var lt,Ue;const de=(lt=z.target.files)==null?void 0:lt[0];if(de){L(!0);try{const Ut=new FormData;Ut.append("file",de),Ut.append("folder","book-images");const ft=await(await fetch(ru("/api/upload"),{method:"POST",body:Ut,credentials:"include"})).json();if(ft!=null&&ft.success&&((Ue=ft==null?void 0:ft.data)!=null&&Ue.url)){const xn=`![${de.name}](${ft.data.url})`;f&&m({...f,content:(f.content||"")+`
`+xn}),alert(`图片上传成功: ${ft.data.url}`)}else alert("上传失败: "+((ft==null?void 0:ft.error)||"未知错误"))}catch(Ut){console.error(Ut),alert("上传失败")}finally{L(!1),le.current&&(le.current.value="")}}},ut=async()=>{var z;if(K.trim()){J(!0);try{const de=await Xe(`/api/search?q=${encodeURIComponent(K)}`);de!=null&&de.success&&((z=de.data)!=null&&z.results)?$(de.data.results):($([]),de&&!de.success&&alert("搜索失败: "+de.error))}catch(de){console.error(de),$([]),alert("搜索失败")}finally{J(!1)}}},$t=async()=>{g(!0);try{const z=await It("/api/db/book",{action:"sync"});z&&z.success!==!1?(alert(z.message||"同步成功"),me()):alert("同步失败: "+(z&&typeof z=="object"&&"error"in z?z.error:"未知错误"))}catch(z){console.error(z),alert("同步失败")}finally{g(!1)}},Bt=async()=>{y(!0);try{const de=await(await fetch(ru("/api/db/book?action=export"),{credentials:"include"})).blob(),lt=window.URL.createObjectURL(de),Ue=document.createElement("a");Ue.href=lt,Ue.download=`book_sections_${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(Ue),Ue.click(),window.URL.revokeObjectURL(lt),document.body.removeChild(Ue),alert("导出成功")}catch(z){console.error(z),alert("导出失败")}finally{y(!1)}},At=async()=>{if(!U.trim()){alert("请输入或上传JSON数据");return}k(!0);try{const z=JSON.parse(U),de=await It("/api/db/book",{action:"import",data:z});de&&de.success!==!1?(alert(de.message||"导入成功"),V(!1),ie(""),me()):alert("导入失败: "+(de&&typeof de=="object"&&"error"in de?de.error:"未知错误"))}catch(z){console.error(z),alert("导入失败: JSON格式错误")}finally{k(!1)}},Y=z=>{var Ue;const de=(Ue=z.target.files)==null?void 0:Ue[0];if(!de)return;const lt=new FileReader;lt.onload=Ut=>{var xn;const Tn=((xn=Ut.target)==null?void 0:xn.result)||"",ft=de.name.toLowerCase();ft.endsWith(".json")?ie(Tn):ft.endsWith(".txt")||ft.endsWith(".md")||ft.endsWith(".markdown")?ie(JSON.stringify(lC(Tn,de.name),null,2)):ie(Tn)},lt.readAsText(de)},Me=async()=>{var z;if(confirm("确定要初始化数据库吗?这将创建所有必需的表结构。")){b(!0);try{const de=await It("/api/db/init",{adminToken:"init_db_2025"});de&&de.success!==!1?alert(((z=de.data)==null?void 0:z.message)||"初始化成功"):alert("初始化失败: "+(de&&typeof de=="object"&&"error"in de?de.error:"未知错误"))}catch(de){console.error(de),alert("初始化失败")}finally{b(!1)}}},ze=async()=>{if(!j.trim()){alert("请输入飞书文档链接");return}g(!0),await new Promise(z=>setTimeout(z,2e3)),g(!1),S(!1),alert("飞书文档同步成功!")},St=je.find(z=>z.id===Z.partId),Qn=(St==null?void 0:St.chapters)??[];return n.jsxs("div",{className:"p-8 max-w-6xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"内容管理"}),n.jsxs("p",{className:"text-gray-400 mt-1",children:["共 ",je.length," 篇 · ",ne," 节内容"]})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs(he,{onClick:Me,disabled:C,variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Pw,{className:"w-4 h-4 mr-2"}),C?"初始化中...":"初始化数据库"]}),n.jsxs(he,{onClick:$t,disabled:x,variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(et,{className:`w-4 h-4 mr-2 ${x?"animate-spin":""}`}),"同步到数据库"]}),n.jsxs(he,{onClick:()=>V(!0),variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Cs,{className:"w-4 h-4 mr-2"}),"导入"]}),n.jsxs(he,{onClick:Bt,disabled:v,variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(cp,{className:"w-4 h-4 mr-2"}),v?"导出中...":"导出"]}),n.jsxs(he,{onClick:()=>S(!0),className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(up,{className:"w-4 h-4 mr-2"}),"同步飞书"]})]})]}),n.jsx(bn,{open:A,onOpenChange:V,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-2xl",showCloseButton:!0,children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(Cs,{className:"w-5 h-5 text-[#38bdac]"}),"导入章节数据"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"上传文件 (支持 JSON / TXT / MD)"}),n.jsx("input",{ref:B,type:"file",accept:".json,.txt,.md,.markdown",onChange:Y,className:"hidden"}),n.jsxs(he,{variant:"outline",onClick:()=>{var z;return(z=B.current)==null?void 0:z.click()},className:"w-full border-dashed border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Cs,{className:"w-4 h-4 mr-2"}),"选择文件 (JSON/TXT/MD)"]}),n.jsxs("p",{className:"text-xs text-gray-500",children:["• JSON格式: 直接导入章节数据",n.jsx("br",{}),"• TXT/MD格式: 自动解析为章节内容"]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"或粘贴数据"}),n.jsx(Ur,{className:"bg-[#0a1628] border-gray-700 text-white min-h-[200px] font-mono text-sm placeholder:text-gray-500",placeholder:`JSON格式: [{"id": "1-1", "title": "章节标题", "content": "内容..."}]
或直接粘贴TXT/MD内容系统将自动解析`,value:U,onChange:z=>ie(z.target.value)})]})]}),n.jsxs(Bn,{children:[n.jsx(he,{variant:"outline",onClick:()=>{V(!1),ie("")},className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"取消"}),n.jsx(he,{onClick:At,disabled:E||!U.trim(),className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:E?n.jsxs(n.Fragment,{children:[n.jsx(et,{className:"w-4 h-4 mr-2 animate-spin"}),"导入中..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Cs,{className:"w-4 h-4 mr-2"}),"开始导入"]})})]})]})}),n.jsx(bn,{open:R,onOpenChange:S,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-lg",showCloseButton:!0,children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(ks,{className:"w-5 h-5 text-[#38bdac]"}),"同步飞书文档"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"飞书文档链接"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500",placeholder:"https://xxx.feishu.cn/docx/...",value:j,onChange:z=>N(z.target.value)}),n.jsx("p",{className:"text-xs text-gray-500",children:"请确保文档已开启公开访问权限"})]}),n.jsx("div",{className:"bg-[#38bdac]/10 border border-[#38bdac]/30 rounded-lg p-3",children:n.jsx("p",{className:"text-[#38bdac] text-sm",children:"同步说明:系统将自动解析飞书文档结构,按照标题层级导入为章节内容。"})})]}),n.jsxs(Bn,{children:[n.jsx(he,{variant:"outline",onClick:()=>S(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"取消"}),n.jsx(he,{onClick:ze,disabled:x,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:x?n.jsxs(n.Fragment,{children:[n.jsx(et,{className:"w-4 h-4 mr-2 animate-spin"}),"同步中..."]}):n.jsxs(n.Fragment,{children:[n.jsx(et,{className:"w-4 h-4 mr-2"}),"开始同步"]})})]})]})}),n.jsx(bn,{open:Q,onOpenChange:G,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-2xl max-h-[90vh] overflow-y-auto",showCloseButton:!0,children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(Es,{className:"w-5 h-5 text-[#38bdac]"}),"新建章节"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"章节ID *"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"如: 9.15",value:Z.id,onChange:z=>be({...Z,id:z.target.value})})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"价格 (元)"}),n.jsx(ue,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:Z.price,onChange:z=>be({...Z,price:Number(z.target.value)})})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"章节标题 *"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"输入章节标题",value:Z.title,onChange:z=>be({...Z,title:z.target.value})})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"所属篇"}),n.jsxs(Kc,{value:Z.partId,onValueChange:z=>be({...Z,partId:z,chapterId:"chapter-1"}),children:[n.jsx(ro,{className:"bg-[#0a1628] border-gray-700 text-white",children:n.jsx(Gc,{})}),n.jsxs(so,{className:"bg-[#0f2137] border-gray-700",children:[je.map(z=>n.jsx(gr,{value:z.id,className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:z.title},z.id)),je.length===0&&n.jsx(gr,{value:"part-1",className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:"默认篇"})]})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"所属章"}),n.jsxs(Kc,{value:Z.chapterId,onValueChange:z=>be({...Z,chapterId:z}),children:[n.jsx(ro,{className:"bg-[#0a1628] border-gray-700 text-white",children:n.jsx(Gc,{})}),n.jsxs(so,{className:"bg-[#0f2137] border-gray-700",children:[Qn.map(z=>n.jsx(gr,{value:z.id,className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:z.title},z.id)),Qn.length===0&&n.jsx(gr,{value:"chapter-1",className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:"默认章"})]})]})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"内容 (Markdown格式)"}),n.jsx(Ur,{className:"bg-[#0a1628] border-gray-700 text-white min-h-[300px] font-mono text-sm placeholder:text-gray-500",placeholder:"输入章节内容...",value:Z.content,onChange:z=>be({...Z,content:z.target.value})})]})]}),n.jsxs(Bn,{children:[n.jsx(he,{variant:"outline",onClick:()=>G(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"取消"}),n.jsx(he,{onClick:Ae,disabled:H||!Z.id||!Z.title,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:H?n.jsxs(n.Fragment,{children:[n.jsx(et,{className:"w-4 h-4 mr-2 animate-spin"}),"创建中..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Es,{className:"w-4 h-4 mr-2"}),"创建章节"]})})]})]})}),n.jsx(bn,{open:!!f,onOpenChange:()=>m(null),children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-4xl max-h-[90vh] overflow-y-auto",showCloseButton:!0,children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(Ts,{className:"w-5 h-5 text-[#38bdac]"}),"编辑章节"]})}),f&&n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"章节ID"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:f.id,disabled:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"价格 (元)"}),n.jsx(ue,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:f.isFree?0:f.price,onChange:z=>m({...f,price:Number(z.target.value),isFree:Number(z.target.value)===0}),disabled:f.isFree})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"免费章节"}),n.jsx("div",{className:"flex items-center h-10",children:n.jsxs("label",{className:"flex items-center cursor-pointer",children:[n.jsx("input",{type:"checkbox",checked:f.isFree||f.price===0,onChange:z=>m({...f,isFree:z.target.checked,price:z.target.checked?0:1}),className:"w-5 h-5 rounded border-gray-600 bg-[#0a1628] text-[#38bdac] focus:ring-[#38bdac]"}),n.jsx("span",{className:"ml-2 text-gray-400 text-sm",children:"设为免费"})]})})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"章节标题"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:f.title,onChange:z=>m({...f,title:z.target.value})})]}),f.filePath&&n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"文件路径"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-gray-400 text-sm",value:f.filePath,disabled:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(ae,{className:"text-gray-300",children:"内容 (Markdown格式)"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{ref:le,type:"file",accept:"image/*",onChange:nt,className:"hidden"}),n.jsxs(he,{variant:"outline",size:"sm",onClick:()=>{var z;return(z=le.current)==null?void 0:z.click()},disabled:X,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[X?n.jsx(et,{className:"w-4 h-4 mr-1 animate-spin"}):n.jsx(Uw,{className:"w-4 h-4 mr-1"}),"上传图片"]})]})]}),fe?n.jsxs("div",{className:"bg-[#0a1628] border border-gray-700 rounded-md min-h-[400px] flex items-center justify-center",children:[n.jsx(et,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):n.jsx(Ur,{className:"bg-[#0a1628] border-gray-700 text-white min-h-[400px] font-mono text-sm placeholder:text-gray-500",placeholder:"此处输入章节内容支持Markdown格式...",value:f.content,onChange:z=>m({...f,content:z.target.value})})]})]}),n.jsxs(Bn,{children:[n.jsxs(he,{variant:"outline",onClick:()=>m(null),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Wr,{className:"w-4 h-4 mr-2"}),"取消"]}),n.jsx(he,{onClick:Te,disabled:H,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:H?n.jsxs(n.Fragment,{children:[n.jsx(et,{className:"w-4 h-4 mr-2 animate-spin"}),"保存中..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),"保存修改"]})})]})]})}),n.jsxs(Bu,{defaultValue:"chapters",className:"space-y-6",children:[n.jsxs(To,{className:"bg-[#0f2137] border border-gray-700/50 p-1",children:[n.jsxs(tn,{value:"chapters",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac] text-gray-400",children:[n.jsx(_s,{className:"w-4 h-4 mr-2"}),"章节管理"]}),n.jsxs(tn,{value:"search",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac] text-gray-400",children:[n.jsx(Vr,{className:"w-4 h-4 mr-2"}),"内容搜索"]}),n.jsxs(tn,{value:"hooks",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac] text-gray-400",children:[n.jsx(v1,{className:"w-4 h-4 mr-2"}),"钩子配置"]})]}),n.jsxs(nn,{value:"chapters",className:"space-y-4",children:[n.jsxs(he,{onClick:()=>G(!0),className:"w-full bg-[#38bdac]/10 hover:bg-[#38bdac]/20 text-[#38bdac] border border-[#38bdac]/30",children:[n.jsx(Es,{className:"w-4 h-4 mr-2"}),"新建章节"]}),l?n.jsxs("div",{className:"flex items-center justify-center py-12",children:[n.jsx(et,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):je.map((z,de)=>n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl overflow-hidden",children:[n.jsx(Ve,{className:"cursor-pointer hover:bg-[#162840] transition-colors",onClick:()=>Ee(z.id),children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("span",{className:"text-[#38bdac] font-mono text-sm",children:["0",de+1]}),n.jsx(Ge,{className:"text-white",children:z.title}),n.jsxs(Fe,{variant:"outline",className:"text-gray-400 border-gray-600",children:[z.chapters.reduce((lt,Ue)=>lt+Ue.sections.length,0)," 节"]})]}),n.jsx(Cu,{className:`w-5 h-5 text-gray-400 transition-transform ${c.includes(z.id)?"rotate-90":""}`})]})}),c.includes(z.id)&&n.jsx(_e,{className:"pt-0 pb-4",children:n.jsx("div",{className:"space-y-3 pl-8 border-l-2 border-gray-700",children:z.chapters.map(lt=>n.jsxs("div",{className:"space-y-2",children:[n.jsx("h4",{className:"font-medium text-gray-300",children:lt.title}),n.jsx("div",{className:"space-y-1",children:lt.sections.map(Ue=>n.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg hover:bg-[#162840] text-sm group transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Jc,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx("span",{className:"text-gray-400",children:Ue.title})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[#38bdac] font-medium",children:Ue.price===0?"免费":`¥${Ue.price}`}),n.jsxs(he,{variant:"ghost",size:"sm",onClick:()=>Se(Ue),className:"text-gray-500 hover:text-[#38bdac] hover:bg-[#38bdac]/10 opacity-0 group-hover:opacity-100 transition-opacity",children:[n.jsx(ku,{className:"w-4 h-4 mr-1"}),"读取"]}),n.jsxs(he,{variant:"ghost",size:"sm",onClick:()=>Se(Ue),className:"text-gray-500 hover:text-[#38bdac] hover:bg-[#38bdac]/10 opacity-0 group-hover:opacity-100 transition-opacity",children:[n.jsx(Ts,{className:"w-4 h-4 mr-1"}),"编辑"]})]})]},Ue.id))})]},lt.id))})})]},z.id))]}),n.jsx(nn,{value:"search",className:"space-y-4",children:n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsx(Ve,{children:n.jsx(Ge,{className:"text-white",children:"内容搜索"})}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"flex gap-2",children:[n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500 flex-1",placeholder:"搜索标题或内容...",value:K,onChange:z=>re(z.target.value),onKeyDown:z=>z.key==="Enter"&&ut()}),n.jsx(he,{onClick:ut,disabled:T||!K.trim(),className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:T?n.jsx(et,{className:"w-4 h-4 animate-spin"}):n.jsx(Vr,{className:"w-4 h-4"})})]}),W.length>0&&n.jsxs("div",{className:"space-y-2 mt-4",children:[n.jsxs("p",{className:"text-gray-400 text-sm",children:["找到 ",W.length," 个结果"]}),W.map(z=>n.jsxs("div",{className:"p-3 rounded-lg bg-[#162840] hover:bg-[#1a3050] cursor-pointer transition-colors",onClick:()=>Se({id:z.id,title:z.title,price:z.price??1,filePath:""}),children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-[#38bdac] font-mono text-xs mr-2",children:z.id}),n.jsx("span",{className:"text-white",children:z.title})]}),n.jsx(Fe,{variant:"outline",className:"text-gray-400 border-gray-600 text-xs",children:z.matchType==="title"?"标题匹配":"内容匹配"})]}),z.snippet&&n.jsx("p",{className:"text-gray-500 text-xs mt-2 line-clamp-2",children:z.snippet}),(z.partTitle||z.chapterTitle)&&n.jsxs("p",{className:"text-gray-600 text-xs mt-1",children:[z.partTitle," · ",z.chapterTitle]})]},z.id))]})]})]})}),n.jsx(nn,{value:"hooks",className:"space-y-4",children:n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsx(Ve,{children:n.jsx(Ge,{className:"text-white",children:"引流钩子配置"})}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"grid w-full max-w-sm items-center gap-1.5",children:[n.jsx(ae,{htmlFor:"hook-chapter",className:"text-gray-300",children:"触发章节"}),n.jsxs(Kc,{defaultValue:"3",children:[n.jsx(ro,{id:"hook-chapter",className:"bg-[#0a1628] border-gray-700 text-white",children:n.jsx(Gc,{placeholder:"选择章节"})}),n.jsxs(so,{className:"bg-[#0f2137] border-gray-700",children:[n.jsx(gr,{value:"1",className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:"第一章"}),n.jsx(gr,{value:"2",className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:"第二章"}),n.jsx(gr,{value:"3",className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:"第三章 (默认)"})]})]})]}),n.jsxs("div",{className:"grid w-full gap-1.5",children:[n.jsx(ae,{htmlFor:"message",className:"text-gray-300",children:"引流文案"}),n.jsx(Ur,{placeholder:"输入引导用户加群的文案...",id:"message",className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500",defaultValue:"阅读更多精彩内容请加入Soul创业实验派对群..."})]}),n.jsx(he,{className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:"保存配置"})]})]})})]})]})}function iC(){const[r,a]=p.useState([]),[l,i]=p.useState(null),[c,d]=p.useState(!0),[f,m]=p.useState([]),[x,g]=p.useState(null),[v,y]=p.useState(1);async function E(){d(!0);try{const j=await Xe("/api/admin/chapters");j!=null&&j.success&&j.data&&(a(j.data.structure??[]),i(j.data.stats??null))}catch(j){console.error("加载章节失败:",j)}finally{d(!1)}}p.useEffect(()=>{E()},[]);const k=j=>{m(N=>N.includes(j)?N.filter(R=>R!==j):[...N,j])},C=async j=>{try{const N=await It("/api/admin/chapters",{action:"updatePrice",chapterId:j,data:{price:v}});N!=null&&N.success&&(alert("价格更新成功"),g(null),E())}catch(N){console.error("更新价格失败:",N)}},b=async(j,N)=>{try{const R=await It("/api/admin/chapters",{action:"toggleFree",chapterId:j,data:{isFree:!N}});R!=null&&R.success&&(alert("状态更新成功"),E())}catch(R){console.error("更新状态失败:",R)}};return c?n.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:n.jsx("div",{className:"text-xl text-gray-400",children:"加载中..."})}):n.jsxs("div",{className:"min-h-screen bg-black text-white",children:[n.jsx("div",{className:"sticky top-0 bg-black/90 backdrop-blur border-b border-white/10 z-50",children:n.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex items-center justify-between",children:[n.jsx("h1",{className:"text-xl font-bold",children:"章节管理"}),n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("button",{type:"button",onClick:()=>m(r.map(j=>j.id)),className:"px-4 py-2 bg-white/10 rounded-lg hover:bg-white/20 text-white",children:"展开全部"}),n.jsx("button",{type:"button",onClick:()=>m([]),className:"px-4 py-2 bg-white/10 rounded-lg hover:bg-white/20 text-white",children:"收起全部"})]})]})}),n.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[l&&n.jsxs("div",{className:"grid grid-cols-4 gap-4 mb-8",children:[n.jsxs("div",{className:"bg-gradient-to-br from-cyan-500/20 to-cyan-500/5 border border-cyan-500/30 rounded-xl p-4",children:[n.jsx("div",{className:"text-3xl font-bold text-cyan-400",children:l.totalSections}),n.jsx("div",{className:"text-white/60 text-sm mt-1",children:"总章节数"})]}),n.jsxs("div",{className:"bg-gradient-to-br from-green-500/20 to-green-500/5 border border-green-500/30 rounded-xl p-4",children:[n.jsx("div",{className:"text-3xl font-bold text-green-400",children:l.freeSections}),n.jsx("div",{className:"text-white/60 text-sm mt-1",children:"免费章节"})]}),n.jsxs("div",{className:"bg-gradient-to-br from-yellow-500/20 to-yellow-500/5 border border-yellow-500/30 rounded-xl p-4",children:[n.jsx("div",{className:"text-3xl font-bold text-yellow-400",children:l.paidSections}),n.jsx("div",{className:"text-white/60 text-sm mt-1",children:"付费章节"})]}),n.jsxs("div",{className:"bg-gradient-to-br from-purple-500/20 to-purple-500/5 border border-purple-500/30 rounded-xl p-4",children:[n.jsx("div",{className:"text-3xl font-bold text-purple-400",children:l.totalParts}),n.jsx("div",{className:"text-white/60 text-sm mt-1",children:"篇章数"})]})]}),n.jsx("div",{className:"space-y-4",children:r.map(j=>n.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-xl overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between p-4 cursor-pointer hover:bg-white/5",onClick:()=>k(j.id),onKeyDown:N=>N.key==="Enter"&&k(j.id),role:"button",tabIndex:0,children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"text-2xl",children:j.type==="preface"?"📖":j.type==="epilogue"?"🎬":j.type==="appendix"?"📎":"📚"}),n.jsx("span",{className:"font-semibold text-white",children:j.title}),n.jsxs("span",{className:"text-white/40 text-sm",children:["(",j.chapters.reduce((N,R)=>{var S;return N+(((S=R.sections)==null?void 0:S.length)||1)},0)," 节)"]})]}),n.jsx("span",{className:"text-white/40",children:f.includes(j.id)?"▲":"▼"})]}),f.includes(j.id)&&n.jsx("div",{className:"border-t border-white/10",children:j.chapters.map(N=>n.jsx("div",{className:"border-b border-white/5 last:border-b-0",children:N.sections?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-6 py-3 bg-white/5 text-white/70 font-medium",children:N.title}),n.jsx("div",{className:"divide-y divide-white/5",children:N.sections.map(R=>n.jsxs("div",{className:"flex items-center justify-between px-6 py-3 hover:bg-white/5",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:R.isFree?"text-green-400":"text-yellow-400",children:R.isFree?"🔓":"🔒"}),n.jsx("span",{className:"text-white/80",children:R.id}),n.jsx("span",{className:"text-white/60",children:R.title})]}),n.jsx("div",{className:"flex items-center gap-3",children:x===R.id?n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"number",value:v,onChange:S=>y(Number(S.target.value)),className:"w-20 px-2 py-1 bg-white/10 border border-white/20 rounded text-white",min:0,step:.1}),n.jsx("button",{type:"button",onClick:()=>C(R.id),className:"px-3 py-1 bg-cyan-500 text-black rounded text-sm",children:"保存"}),n.jsx("button",{type:"button",onClick:()=>g(null),className:"px-3 py-1 bg-white/20 rounded text-sm text-white",children:"取消"})]}):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:`px-2 py-1 rounded text-xs ${R.isFree?"bg-green-500/20 text-green-400":"bg-yellow-500/20 text-yellow-400"}`,children:R.isFree?"免费":`¥${R.price}`}),n.jsx("button",{type:"button",onClick:()=>{g(R.id),y(R.price)},className:"px-2 py-1 text-xs bg-white/10 rounded hover:bg-white/20 text-white",children:"编辑价格"}),n.jsx("button",{type:"button",onClick:()=>b(R.id,R.isFree),className:"px-2 py-1 text-xs bg-white/10 rounded hover:bg-white/20 text-white",children:R.isFree?"设为付费":"设为免费"})]})})]},R.id))})]}):n.jsxs("div",{className:"flex items-center justify-between px-6 py-3 hover:bg-white/5",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:N.isFree?"text-green-400":"text-yellow-400",children:N.isFree?"🔓":"🔒"}),n.jsx("span",{className:"text-white/80",children:N.title})]}),n.jsx("span",{className:`px-2 py-1 rounded text-xs ${N.isFree?"bg-green-500/20 text-green-400":"bg-yellow-500/20 text-yellow-400"}`,children:N.isFree?"免费":`¥${N.price??1}`})]})},N.id))})]},j.id))})]})]})}var _g=["PageUp","PageDown"],Tg=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ig={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Bs="Slider",[xu,cC,uC]=zu(Bs),[Ag]=Cr(Bs,[uC]),[dC,zo]=Ag(Bs),Mg=p.forwardRef((r,a)=>{const{name:l,min:i=0,max:c=100,step:d=1,orientation:f="horizontal",disabled:m=!1,minStepsBetweenThumbs:x=0,defaultValue:g=[i],value:v,onValueChange:y=()=>{},onValueCommit:E=()=>{},inverted:k=!1,form:C,...b}=r,j=p.useRef(new Set),N=p.useRef(0),S=f==="horizontal"?fC:hC,[A=[],V]=Hr({prop:v,defaultProp:g,onChange:oe=>{var P;(P=[...j.current][N.current])==null||P.focus(),y(oe)}}),Q=p.useRef(A);function G(oe){const H=vC(A,oe);fe(oe,H)}function U(oe){fe(oe,N.current)}function ie(){const oe=Q.current[N.current];A[N.current]!==oe&&E(A)}function fe(oe,H,{commit:P}={commit:!1}){const K=jC(d),re=bC(Math.round((oe-i)/d)*d+i,K),W=ho(re,[i,c]);V(($=[])=>{const T=xC($,W,H);if(NC(T,x*d)){N.current=T.indexOf(W);const J=String(T)!==String($);return J&&P&&E(T),J?T:$}else return $})}return n.jsx(dC,{scope:r.__scopeSlider,name:l,disabled:m,min:i,max:c,valueIndexToChangeRef:N,thumbs:j.current,values:A,orientation:f,form:C,children:n.jsx(xu.Provider,{scope:r.__scopeSlider,children:n.jsx(xu.Slot,{scope:r.__scopeSlider,children:n.jsx(S,{"aria-disabled":m,"data-disabled":m?"":void 0,...b,ref:a,onPointerDown:Ie(b.onPointerDown,()=>{m||(Q.current=A)}),min:i,max:c,inverted:k,onSlideStart:m?void 0:G,onSlideMove:m?void 0:U,onSlideEnd:m?void 0:ie,onHomeKeyDown:()=>!m&&fe(i,0,{commit:!0}),onEndKeyDown:()=>!m&&fe(c,A.length-1,{commit:!0}),onStepKeyDown:({event:oe,direction:H})=>{if(!m){const re=_g.includes(oe.key)||oe.shiftKey&&Tg.includes(oe.key)?10:1,W=N.current,$=A[W],T=d*re*H;fe($+T,W,{commit:!0})}}})})})})});Mg.displayName=Bs;var[Lg,Dg]=Ag(Bs,{startEdge:"left",endEdge:"right",size:"width",direction:1}),fC=p.forwardRef((r,a)=>{const{min:l,max:i,dir:c,inverted:d,onSlideStart:f,onSlideMove:m,onSlideEnd:x,onStepKeyDown:g,...v}=r,[y,E]=p.useState(null),k=We(a,S=>E(S)),C=p.useRef(void 0),b=Ro(c),j=b==="ltr",N=j&&!d||!j&&d;function R(S){const A=C.current||y.getBoundingClientRect(),V=[0,A.width],G=qu(V,N?[l,i]:[i,l]);return C.current=A,G(S-A.left)}return n.jsx(Lg,{scope:r.__scopeSlider,startEdge:N?"left":"right",endEdge:N?"right":"left",direction:N?1:-1,size:"width",children:n.jsx(Og,{dir:b,"data-orientation":"horizontal",...v,ref:k,style:{...v.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:S=>{const A=R(S.clientX);f==null||f(A)},onSlideMove:S=>{const A=R(S.clientX);m==null||m(A)},onSlideEnd:()=>{C.current=void 0,x==null||x()},onStepKeyDown:S=>{const V=Ig[N?"from-left":"from-right"].includes(S.key);g==null||g({event:S,direction:V?-1:1})}})})}),hC=p.forwardRef((r,a)=>{const{min:l,max:i,inverted:c,onSlideStart:d,onSlideMove:f,onSlideEnd:m,onStepKeyDown:x,...g}=r,v=p.useRef(null),y=We(a,v),E=p.useRef(void 0),k=!c;function C(b){const j=E.current||v.current.getBoundingClientRect(),N=[0,j.height],S=qu(N,k?[i,l]:[l,i]);return E.current=j,S(b-j.top)}return n.jsx(Lg,{scope:r.__scopeSlider,startEdge:k?"bottom":"top",endEdge:k?"top":"bottom",size:"height",direction:k?1:-1,children:n.jsx(Og,{"data-orientation":"vertical",...g,ref:y,style:{...g.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:b=>{const j=C(b.clientY);d==null||d(j)},onSlideMove:b=>{const j=C(b.clientY);f==null||f(j)},onSlideEnd:()=>{E.current=void 0,m==null||m()},onStepKeyDown:b=>{const N=Ig[k?"from-bottom":"from-top"].includes(b.key);x==null||x({event:b,direction:N?-1:1})}})})}),Og=p.forwardRef((r,a)=>{const{__scopeSlider:l,onSlideStart:i,onSlideMove:c,onSlideEnd:d,onHomeKeyDown:f,onEndKeyDown:m,onStepKeyDown:x,...g}=r,v=zo(Bs,l);return n.jsx(De.span,{...g,ref:a,onKeyDown:Ie(r.onKeyDown,y=>{y.key==="Home"?(f(y),y.preventDefault()):y.key==="End"?(m(y),y.preventDefault()):_g.concat(Tg).includes(y.key)&&(x(y),y.preventDefault())}),onPointerDown:Ie(r.onPointerDown,y=>{const E=y.target;E.setPointerCapture(y.pointerId),y.preventDefault(),v.thumbs.has(E)?E.focus():i(y)}),onPointerMove:Ie(r.onPointerMove,y=>{y.target.hasPointerCapture(y.pointerId)&&c(y)}),onPointerUp:Ie(r.onPointerUp,y=>{const E=y.target;E.hasPointerCapture(y.pointerId)&&(E.releasePointerCapture(y.pointerId),d(y))})})}),Fg="SliderTrack",zg=p.forwardRef((r,a)=>{const{__scopeSlider:l,...i}=r,c=zo(Fg,l);return n.jsx(De.span,{"data-disabled":c.disabled?"":void 0,"data-orientation":c.orientation,...i,ref:a})});zg.displayName=Fg;var gu="SliderRange",$g=p.forwardRef((r,a)=>{const{__scopeSlider:l,...i}=r,c=zo(gu,l),d=Dg(gu,l),f=p.useRef(null),m=We(a,f),x=c.values.length,g=c.values.map(E=>Vg(E,c.min,c.max)),v=x>1?Math.min(...g):0,y=100-Math.max(...g);return n.jsx(De.span,{"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,...i,ref:m,style:{...r.style,[d.startEdge]:v+"%",[d.endEdge]:y+"%"}})});$g.displayName=gu;var vu="SliderThumb",Bg=p.forwardRef((r,a)=>{const l=cC(r.__scopeSlider),[i,c]=p.useState(null),d=We(a,m=>c(m)),f=p.useMemo(()=>i?l().findIndex(m=>m.ref.current===i):-1,[l,i]);return n.jsx(mC,{...r,ref:d,index:f})}),mC=p.forwardRef((r,a)=>{const{__scopeSlider:l,index:i,name:c,...d}=r,f=zo(vu,l),m=Dg(vu,l),[x,g]=p.useState(null),v=We(a,R=>g(R)),y=x?f.form||!!x.closest("form"):!0,E=Fu(x),k=f.values[i],C=k===void 0?0:Vg(k,f.min,f.max),b=gC(i,f.values.length),j=E==null?void 0:E[m.size],N=j?yC(j,C,m.direction):0;return p.useEffect(()=>{if(x)return f.thumbs.add(x),()=>{f.thumbs.delete(x)}},[x,f.thumbs]),n.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[m.startEdge]:`calc(${C}% + ${N}px)`},children:[n.jsx(xu.ItemSlot,{scope:r.__scopeSlider,children:n.jsx(De.span,{role:"slider","aria-label":r["aria-label"]||b,"aria-valuemin":f.min,"aria-valuenow":k,"aria-valuemax":f.max,"aria-orientation":f.orientation,"data-orientation":f.orientation,"data-disabled":f.disabled?"":void 0,tabIndex:f.disabled?void 0:0,...d,ref:v,style:k===void 0?{display:"none"}:r.style,onFocus:Ie(r.onFocus,()=>{f.valueIndexToChangeRef.current=i})})}),y&&n.jsx(Ug,{name:c??(f.name?f.name+(f.values.length>1?"[]":""):void 0),form:f.form,value:k},i)]})});Bg.displayName=vu;var pC="RadioBubbleInput",Ug=p.forwardRef(({__scopeSlider:r,value:a,...l},i)=>{const c=p.useRef(null),d=We(c,i),f=Ou(a);return p.useEffect(()=>{const m=c.current;if(!m)return;const x=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(x,"value").set;if(f!==a&&v){const y=new Event("input",{bubbles:!0});v.call(m,a),m.dispatchEvent(y)}},[f,a]),n.jsx(De.input,{style:{display:"none"},...l,ref:d,defaultValue:a})});Ug.displayName=pC;function xC(r=[],a,l){const i=[...r];return i[l]=a,i.sort((c,d)=>c-d)}function Vg(r,a,l){const d=100/(l-a)*(r-a);return ho(d,[0,100])}function gC(r,a){return a>2?`Value ${r+1} of ${a}`:a===2?["Minimum","Maximum"][r]:void 0}function vC(r,a){if(r.length===1)return 0;const l=r.map(c=>Math.abs(c-a)),i=Math.min(...l);return l.indexOf(i)}function yC(r,a,l){const i=r/2,d=qu([0,50],[0,i]);return(i-d(a)*l)*l}function wC(r){return r.slice(0,-1).map((a,l)=>r[l+1]-a)}function NC(r,a){if(a>0){const l=wC(r);return Math.min(...l)>=a}return!0}function qu(r,a){return l=>{if(r[0]===r[1]||a[0]===a[1])return a[0];const i=(a[1]-a[0])/(r[1]-r[0]);return a[0]+i*(l-r[0])}}function jC(r){return(String(r).split(".")[1]||"").length}function bC(r,a){const l=Math.pow(10,a);return Math.round(r*l)/l}var SC=Mg,CC=zg,kC=$g,EC=Bg;function PC({className:r,defaultValue:a,value:l,min:i=0,max:c=100,...d}){const f=p.useMemo(()=>Array.isArray(l)?l:Array.isArray(a)?a:[i,c],[l,a,i,c]);return n.jsxs(SC,{defaultValue:a,value:l,min:i,max:c,className:He("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50",r),...d,children:[n.jsx(CC,{className:"bg-gray-600 relative grow overflow-hidden rounded-full h-1.5 w-full",children:n.jsx(kC,{className:"bg-[#38bdac] absolute h-full rounded-full"})}),Array.from({length:f.length},(m,x)=>n.jsx(EC,{className:"block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},x))]})}const RC={distributorShare:90,minWithdrawAmount:10,bindingDays:30,userDiscount:5,withdrawFee:5,enableAutoWithdraw:!1};function _C(){const[r,a]=p.useState(RC),[l,i]=p.useState(!0),[c,d]=p.useState(!1);p.useEffect(()=>{Xe("/api/admin/referral-settings").then(x=>{const g=x==null?void 0:x.data;g&&typeof g=="object"&&a({distributorShare:g.distributorShare??90,minWithdrawAmount:g.minWithdrawAmount??10,bindingDays:g.bindingDays??30,userDiscount:g.userDiscount??5,withdrawFee:g.withdrawFee??5,enableAutoWithdraw:g.enableAutoWithdraw??!1})}).catch(console.error).finally(()=>i(!1))},[]);const f=async()=>{d(!0);try{const x={distributorShare:Number(r.distributorShare)||0,minWithdrawAmount:Number(r.minWithdrawAmount)||0,bindingDays:Number(r.bindingDays)||0,userDiscount:Number(r.userDiscount)||0,withdrawFee:Number(r.withdrawFee)??5,enableAutoWithdraw:!!r.enableAutoWithdraw},g=await It("/api/admin/referral-settings",x);if(!g||g.success===!1){alert("保存失败: "+(g&&typeof g=="object"&&"error"in g?g.error:""));return}alert(`✅ 分销配置已保存成功!
• 小程序与网站的推广规则会一起生效
• 绑定关系会使用新的天数配置
• 佣金比例会立即应用到新订单
如有缓存,请刷新前台/小程序页面。`)}catch(x){console.error(x),alert("保存失败: "+(x instanceof Error?x.message:String(x)))}finally{d(!1)}},m=x=>g=>{const v=parseFloat(g.target.value||"0");a(y=>({...y,[x]:isNaN(v)?0:v}))};return l?n.jsx("div",{className:"p-8 text-gray-500",children:"加载中..."}):n.jsxs("div",{className:"p-8 max-w-4xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsxs("h2",{className:"text-2xl font-bold text-white flex items-center gap-2",children:[n.jsx(Is,{className:"w-5 h-5 text-[#38bdac]"}),"推广 / 分销设置"]}),n.jsx("p",{className:"text-gray-400 mt-1",children:"统一管理「好友优惠」「你得 90% 收益」「绑定期 30 天」「提现门槛」等规则,小程序和 Web 共用这套配置。"})]}),n.jsxs(he,{onClick:f,disabled:c||l,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),c?"保存中...":"保存配置"]})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"flex items-center gap-2 text-white",children:[n.jsx(um,{className:"w-4 h-4 text-[#38bdac]"}),"推广规则"]}),n.jsx(gt,{className:"text-gray-400",children:"这三项会直接体现在小程序「推广规则」卡片上,同时影响实收佣金计算。"})]}),n.jsx(_e,{className:"space-y-6",children:n.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(om,{className:"w-3 h-3 text-[#38bdac]"}),"好友优惠(%"]}),n.jsx(ue,{type:"number",min:0,max:100,className:"bg-[#0a1628] border-gray-700 text-white",value:r.userDiscount,onChange:m("userDiscount")}),n.jsx("p",{className:"text-xs text-gray-500",children:"例如 5 表示好友立减 5%(在价格配置基础上生效)。"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(Pn,{className:"w-3 h-3 text-[#38bdac]"}),"推广者分成(%"]}),n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx(PC,{className:"flex-1",min:10,max:100,step:1,value:[r.distributorShare],onValueChange:([x])=>a(g=>({...g,distributorShare:x}))}),n.jsx(ue,{type:"number",min:0,max:100,className:"w-20 bg-[#0a1628] border-gray-700 text-white text-center",value:r.distributorShare,onChange:m("distributorShare")})]}),n.jsxs("p",{className:"text-xs text-gray-500",children:["实际佣金 = 订单金额 ×"," ",n.jsxs("span",{className:"text-[#38bdac] font-mono",children:[r.distributorShare,"%"]}),",支付回调和分销统计都会用这个值。"]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(Pn,{className:"w-3 h-3 text-[#38bdac]"}),"绑定有效期(天)"]}),n.jsx(ue,{type:"number",min:1,max:365,className:"bg-[#0a1628] border-gray-700 text-white",value:r.bindingDays,onChange:m("bindingDays")}),n.jsx("p",{className:"text-xs text-gray-500",children:"好友通过你的链接进来并登录后,绑定在你名下的天数。"})]})]})})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"flex items-center gap-2 text-white",children:[n.jsx(Is,{className:"w-4 h-4 text-[#38bdac]"}),"提现规则"]}),n.jsx(gt,{className:"text-gray-400",children:"与「提现中心」「自动提现」相关的参数,影响推广者看到的可提现金额和最低门槛。"})]}),n.jsx(_e,{className:"space-y-6",children:n.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"最低提现金额(元)"}),n.jsx(ue,{type:"number",min:0,step:1,className:"bg-[#0a1628] border-gray-700 text-white",value:r.minWithdrawAmount,onChange:m("minWithdrawAmount")}),n.jsx("p",{className:"text-xs text-gray-500",children:"小程序「满 X 元可提现」展示的门槛,同时用于后端接口校验。"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(um,{className:"w-3 h-3 text-[#38bdac]"}),"提现手续费(%"]}),n.jsx(ue,{type:"number",min:0,max:100,className:"bg-[#0a1628] border-gray-700 text-white",value:r.withdrawFee,onChange:m("withdrawFee")}),n.jsx("p",{className:"text-xs text-gray-500",children:"提现时扣除该比例手续费,例如 5 表示申请 100 元实际到账 95 元。"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{className:"text-gray-300 flex items-center gap-2",children:["自动提现开关",n.jsx(Fe,{variant:"outline",className:"border-[#38bdac]/40 text-[#38bdac] text-[10px]",children:"预留"})]}),n.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[n.jsx(xt,{checked:r.enableAutoWithdraw,onCheckedChange:x=>a(g=>({...g,enableAutoWithdraw:x}))}),n.jsx("span",{className:"text-sm text-gray-400",children:"开启后,可结合定时任务实现「收益自动打款到微信零钱」。"})]})]})]})})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsx(Ve,{children:n.jsxs(Ge,{className:"flex items-center gap-2 text-gray-200 text-sm",children:[n.jsx(om,{className:"w-4 h-4 text-[#38bdac]"}),"使用说明"]})}),n.jsxs(_e,{className:"space-y-2 text-xs text-gray-400 leading-relaxed",children:[n.jsxs("p",{children:["1. 以上配置会写入"," ",n.jsx("code",{className:"font-mono text-[11px] text-[#38bdac]",children:"system_config.referral_config"}),"小程序「推广中心」、Web 推广页以及支付回调都会读取同一份配置。"]}),n.jsx("p",{children:"2. 修改后新订单立即生效;旧订单的历史佣金不会自动重算,只影响之后产生的订单。"}),n.jsx("p",{children:"3. 如遇前端展示与实际结算不一致,优先以此处配置为准,再排查缓存和小程序版本。"})]})]})]})]})}const TC={name:"卡若",startDate:"2025年10月15日",bio:"连续创业者,私域运营专家,每天早上6-9点在Soul派对房分享真实商业故事",liveTime:"06:00-09:00",platform:"Soul派对房",description:"连续创业者,私域运营专家"},IC={sectionPrice:1,baseBookPrice:9.9,distributorShare:90,authorInfo:{...TC}},AC={matchEnabled:!0,referralEnabled:!0,searchEnabled:!0,aboutEnabled:!0};function MC(){const[r,a]=p.useState(IC),[l,i]=p.useState(["preface","epilogue","1.1","appendix-1","appendix-2","appendix-3"]),[c,d]=p.useState(""),[f,m]=p.useState(AC),[x,g]=p.useState(!1),[v,y]=p.useState(!0),[E,k]=p.useState(!1),[C,b]=p.useState(""),[j,N]=p.useState(""),[R,S]=p.useState(!1),[A,V]=p.useState(!1),Q=(H,P,K=!1)=>{b(H),N(P),S(K),k(!0)};p.useEffect(()=>{(async()=>{try{const P=await Xe("/api/admin/settings");if(!P||P.success===!1)return;if(Array.isArray(P.freeChapters)&&P.freeChapters.length&&i(P.freeChapters),P.featureConfig&&Object.keys(P.featureConfig).length&&m(K=>({...K,...P.featureConfig})),P.siteSettings&&typeof P.siteSettings=="object"){const K=P.siteSettings;a(re=>({...re,...typeof K.sectionPrice=="number"&&{sectionPrice:K.sectionPrice},...typeof K.baseBookPrice=="number"&&{baseBookPrice:K.baseBookPrice},...typeof K.distributorShare=="number"&&{distributorShare:K.distributorShare},...K.authorInfo&&typeof K.authorInfo=="object"&&{authorInfo:{...re.authorInfo,...K.authorInfo}}}))}}catch(P){console.error("Load settings error:",P)}finally{y(!1)}})()},[]);const G=async(H,P)=>{V(!0);try{const K=await It("/api/admin/settings",{featureConfig:H});if(!K||K.success===!1){P(),Q("保存失败",(K==null?void 0:K.error)??"未知错误",!0);return}Q("已保存","功能开关已更新,相关入口将随之显示或隐藏。")}catch(K){console.error("Save feature config error:",K),P(),Q("保存失败",K instanceof Error?K.message:String(K),!0)}finally{V(!1)}},U=(H,P)=>{const K=f,re={...K,[H]:P};m(re),G(re,()=>m(K))},ie=async()=>{g(!0);try{const H=await It("/api/admin/settings",{freeChapters:l,featureConfig:f,siteSettings:{sectionPrice:r.sectionPrice,baseBookPrice:r.baseBookPrice,distributorShare:r.distributorShare,authorInfo:r.authorInfo}});if(!H||H.success===!1){Q("保存失败",(H==null?void 0:H.error)??"未知错误",!0);return}Q("已保存","设置已保存成功。")}catch(H){console.error("Save settings error:",H),Q("保存失败",H instanceof Error?H.message:String(H),!0)}finally{g(!1)}},fe=()=>{c&&!l.includes(c)&&(i([...l,c]),d(""))},oe=H=>{i(l.filter(P=>P!==H))};return v?n.jsx("div",{className:"p-8 text-gray-500",children:"加载中..."}):n.jsxs("div",{className:"p-8 max-w-4xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"系统设置"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"配置全站基础参数与开关"})]}),n.jsxs(he,{onClick:ie,disabled:x,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),x?"保存中...":"保存设置"]})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(sm,{className:"w-5 h-5 text-[#38bdac]"}),"关于作者"]}),n.jsx(gt,{className:"text-gray-400",children:'配置作者信息,将在"关于作者"页面显示'})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{htmlFor:"author-name",className:"text-gray-300 flex items-center gap-1",children:[n.jsx(sm,{className:"w-3 h-3"}),"主理人名称"]}),n.jsx(ue,{id:"author-name",className:"bg-[#0a1628] border-gray-700 text-white",value:r.authorInfo.name??"",onChange:H=>a(P=>({...P,authorInfo:{...P.authorInfo,name:H.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{htmlFor:"start-date",className:"text-gray-300 flex items-center gap-1",children:[n.jsx(qc,{className:"w-3 h-3"}),"开播日期"]}),n.jsx(ue,{id:"start-date",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"例如: 2025年10月15日",value:r.authorInfo.startDate??"",onChange:H=>a(P=>({...P,authorInfo:{...P.authorInfo,startDate:H.target.value}}))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{htmlFor:"live-time",className:"text-gray-300 flex items-center gap-1",children:[n.jsx(qc,{className:"w-3 h-3"}),"直播时间"]}),n.jsx(ue,{id:"live-time",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"例如: 06:00-09:00",value:r.authorInfo.liveTime??"",onChange:H=>a(P=>({...P,authorInfo:{...P.authorInfo,liveTime:H.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{htmlFor:"platform",className:"text-gray-300 flex items-center gap-1",children:[n.jsx(e1,{className:"w-3 h-3"}),"直播平台"]}),n.jsx(ue,{id:"platform",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"例如: Soul派对房",value:r.authorInfo.platform??"",onChange:H=>a(P=>({...P,authorInfo:{...P.authorInfo,platform:H.target.value}}))})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{htmlFor:"description",className:"text-gray-300 flex items-center gap-1",children:[n.jsx(_s,{className:"w-3 h-3"}),"简介描述"]}),n.jsx(ue,{id:"description",className:"bg-[#0a1628] border-gray-700 text-white",value:r.authorInfo.description??"",onChange:H=>a(P=>({...P,authorInfo:{...P.authorInfo,description:H.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{htmlFor:"bio",className:"text-gray-300",children:"详细介绍"}),n.jsx(Ur,{id:"bio",className:"bg-[#0a1628] border-gray-700 text-white min-h-[100px]",placeholder:"输入作者详细介绍...",value:r.authorInfo.bio??"",onChange:H=>a(P=>({...P,authorInfo:{...P.authorInfo,bio:H.target.value}}))})]}),n.jsxs("div",{className:"mt-4 p-4 rounded-xl bg-[#0a1628] border border-[#38bdac]/30",children:[n.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"预览效果"}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-12 h-12 rounded-full bg-gradient-to-br from-[#00CED1] to-[#20B2AA] flex items-center justify-center text-xl font-bold text-white",children:(r.authorInfo.name??"K").charAt(0)}),n.jsxs("div",{children:[n.jsx("p",{className:"text-white font-semibold",children:r.authorInfo.name}),n.jsx("p",{className:"text-gray-400 text-xs",children:r.authorInfo.description}),n.jsxs("p",{className:"text-[#38bdac] text-xs mt-1",children:["每日 ",r.authorInfo.liveTime," · ",r.authorInfo.platform]})]})]})]})]})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(lo,{className:"w-5 h-5 text-[#38bdac]"}),"价格设置"]}),n.jsx(gt,{className:"text-gray-400",children:"配置书籍和章节的定价"})]}),n.jsx(_e,{className:"space-y-4",children:n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"单节价格 (元)"}),n.jsx(ue,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:r.sectionPrice,onChange:H=>a(P=>({...P,sectionPrice:Number.parseFloat(H.target.value)||1}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"整本价格 (元)"}),n.jsx(ue,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:r.baseBookPrice,onChange:H=>a(P=>({...P,baseBookPrice:Number.parseFloat(H.target.value)||9.9}))})]})]})})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(am,{className:"w-5 h-5 text-[#38bdac]"}),"免费章节"]}),n.jsx(gt,{className:"text-gray-400",children:"设置哪些章节对所有用户免费开放"})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsx("div",{className:"flex flex-wrap gap-2",children:l.map(H=>n.jsxs("span",{className:"inline-flex items-center gap-1 bg-[#38bdac]/20 text-[#38bdac] border border-[#38bdac]/30 px-3 py-1 rounded-md text-sm",children:[H,n.jsx("button",{type:"button",onClick:()=>oe(H),className:"ml-1 hover:text-red-400",children:n.jsx(Wr,{className:"w-3 h-3"})})]},H))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white flex-1",placeholder:"输入章节ID如 1.2、2.1、preface",value:c,onChange:H=>d(H.target.value),onKeyDown:H=>H.key==="Enter"&&fe()}),n.jsxs(he,{onClick:fe,className:"bg-[#38bdac] hover:bg-[#2da396]",children:[n.jsx(Es,{className:"w-4 h-4 mr-1"}),"添加"]})]}),n.jsx("p",{className:"text-xs text-gray-500",children:"常用ID: preface(序言), epilogue(尾声), appendix-1/2/3(附录), 1.1/1.2等(章节)"})]})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(io,{className:"w-5 h-5 text-[#38bdac]"}),"功能开关"]}),n.jsx(gt,{className:"text-gray-400",children:"控制各个功能模块的显示/隐藏"})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-[#0a1628] border border-gray-700/50",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Pn,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx(ae,{htmlFor:"match-enabled",className:"text-white font-medium cursor-pointer",children:"找伙伴功能"})]}),n.jsx("p",{className:"text-xs text-gray-400 ml-6",children:"控制小程序和Web端的找伙伴功能显示"})]}),n.jsx(xt,{id:"match-enabled",checked:f.matchEnabled,disabled:A,onCheckedChange:H=>U("matchEnabled",H)})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-[#0a1628] border border-gray-700/50",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(am,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx(ae,{htmlFor:"referral-enabled",className:"text-white font-medium cursor-pointer",children:"推广功能"})]}),n.jsx("p",{className:"text-xs text-gray-400 ml-6",children:"控制推广中心的显示(我的页面入口)"})]}),n.jsx(xt,{id:"referral-enabled",checked:f.referralEnabled,disabled:A,onCheckedChange:H=>U("referralEnabled",H)})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-[#0a1628] border border-gray-700/50",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(_s,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx(ae,{htmlFor:"search-enabled",className:"text-white font-medium cursor-pointer",children:"搜索功能"})]}),n.jsx("p",{className:"text-xs text-gray-400 ml-6",children:"控制首页搜索栏的显示"})]}),n.jsx(xt,{id:"search-enabled",checked:f.searchEnabled,disabled:A,onCheckedChange:H=>U("searchEnabled",H)})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-[#0a1628] border border-gray-700/50",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(io,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx(ae,{htmlFor:"about-enabled",className:"text-white font-medium cursor-pointer",children:"关于页面"})]}),n.jsx("p",{className:"text-xs text-gray-400 ml-6",children:"控制关于页面的访问"})]}),n.jsx(xt,{id:"about-enabled",checked:f.aboutEnabled,disabled:A,onCheckedChange:H=>U("aboutEnabled",H)})]})]}),n.jsx("div",{className:"p-3 rounded-lg bg-blue-500/10 border border-blue-500/30",children:n.jsx("p",{className:"text-xs text-blue-300",children:"💡 关闭功能后,相关入口会自动隐藏。建议在功能开发完成后再开启。"})})]})]})]}),n.jsx(bn,{open:E,onOpenChange:k,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white",showCloseButton:!0,children:[n.jsxs(Sn,{children:[n.jsx(Cn,{className:R?"text-red-400":"text-[#38bdac]",children:C}),n.jsx(_b,{className:"text-gray-400 whitespace-pre-wrap pt-2",children:j})]}),n.jsx(Bn,{className:"mt-4",children:n.jsx(he,{onClick:()=>k(!1),className:R?"bg-gray-600 hover:bg-gray-500":"bg-[#38bdac] hover:bg-[#2da396]",children:"确定"})})]})})]})}const Wm={wechat:{enabled:!0,qrCode:"/images/wechat-pay.png",account:"卡若",websiteAppId:"",merchantId:"",groupQrCode:"/images/party-group-qr.png"},alipay:{enabled:!0,qrCode:"/images/alipay.png",account:"卡若",partnerId:"",securityKey:""},usdt:{enabled:!1,network:"TRC20",address:"",exchangeRate:7.2},paypal:{enabled:!1,email:"",exchangeRate:7.2}};function LC(){const[r,a]=p.useState(!1),[l,i]=p.useState(Wm),[c,d]=p.useState(""),f=async()=>{a(!0);try{const N=await Xe("/api/config");N!=null&&N.paymentMethods&&i({...Wm,...N.paymentMethods})}catch(N){console.error(N)}finally{a(!1)}};p.useEffect(()=>{f()},[]);const m=async()=>{a(!0);try{await It("/api/config",{paymentMethods:l}),alert("配置已保存!")}catch(N){console.error("保存失败:",N),alert("保存失败: "+(N instanceof Error?N.message:String(N)))}finally{a(!1)}},x=(N,R)=>{navigator.clipboard.writeText(N),d(R),setTimeout(()=>d(""),2e3)},g=(N,R)=>{i(S=>({...S,wechat:{...S.wechat,[N]:R}}))},v=(N,R)=>{i(S=>({...S,alipay:{...S.alipay,[N]:R}}))},y=(N,R)=>{i(S=>({...S,usdt:{...S.usdt,[N]:R}}))},E=(N,R)=>{i(S=>({...S,paypal:{...S.paypal,[N]:R}}))},k=l.wechat,C=l.alipay,b=l.usdt,j=l.paypal;return n.jsxs("div",{className:"p-8 max-w-5xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold mb-2 text-white",children:"支付配置"}),n.jsx("p",{className:"text-gray-400",children:"配置微信、支付宝、USDT、PayPal等支付参数"})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsxs(he,{variant:"outline",onClick:f,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(et,{className:`w-4 h-4 mr-2 ${r?"animate-spin":""}`}),"同步配置"]}),n.jsxs(he,{onClick:m,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),"保存配置"]})]})]}),n.jsx("div",{className:"mb-6 bg-[#07C160]/10 border border-[#07C160]/30 rounded-xl p-4",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(lp,{className:"w-5 h-5 text-[#07C160] flex-shrink-0 mt-0.5"}),n.jsxs("div",{className:"text-sm",children:[n.jsx("p",{className:"font-medium mb-2 text-[#07C160]",children:"如何获取微信群跳转链接?"}),n.jsxs("ol",{className:"text-[#07C160]/80 space-y-1 list-decimal list-inside",children:[n.jsx("li",{children:"打开微信,进入目标微信群"}),n.jsx("li",{children:'点击右上角"..." → "群二维码"'}),n.jsx("li",{children:'点击右上角"..." → "发送到电脑"'}),n.jsx("li",{children:"在电脑上保存二维码图片上传到图床获取URL"}),n.jsx("li",{children:"或使用草料二维码等工具解析二维码获取链接"})]}),n.jsx("p",{className:"text-[#07C160]/60 mt-2",children:"提示微信群二维码7天后失效建议使用活码工具"})]})]})}),n.jsxs(Bu,{defaultValue:"wechat",className:"space-y-6",children:[n.jsxs(To,{className:"bg-[#0f2137] border border-gray-700/50 p-1 grid grid-cols-4 w-full",children:[n.jsxs(tn,{value:"wechat",className:"data-[state=active]:bg-[#07C160]/20 data-[state=active]:text-[#07C160] text-gray-400",children:[n.jsx(fm,{className:"w-4 h-4 mr-2"}),"微信"]}),n.jsxs(tn,{value:"alipay",className:"data-[state=active]:bg-[#1677FF]/20 data-[state=active]:text-[#1677FF] text-gray-400",children:[n.jsx(Zc,{className:"w-4 h-4 mr-2"}),"支付宝"]}),n.jsxs(tn,{value:"usdt",className:"data-[state=active]:bg-[#26A17B]/20 data-[state=active]:text-[#26A17B] text-gray-400",children:[n.jsx(rm,{className:"w-4 h-4 mr-2"}),"USDT"]}),n.jsxs(tn,{value:"paypal",className:"data-[state=active]:bg-[#003087]/20 data-[state=active]:text-[#169BD7] text-gray-400",children:[n.jsx(eu,{className:"w-4 h-4 mr-2"}),"PayPal"]})]}),n.jsx(nn,{value:"wechat",className:"space-y-4",children:n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs(Ge,{className:"text-[#07C160] flex items-center gap-2",children:[n.jsx(fm,{className:"w-5 h-5"}),"微信支付配置"]}),n.jsx(gt,{className:"text-gray-400",children:"配置微信支付参数和跳转链接"})]}),n.jsx(xt,{checked:!!k.enabled,onCheckedChange:N=>g("enabled",N)})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"网站AppID"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white font-mono text-sm",value:String(k.websiteAppId??""),onChange:N=>g("websiteAppId",N.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"商户号"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white font-mono text-sm",value:String(k.merchantId??""),onChange:N=>g("merchantId",N.target.value)})]})]}),n.jsxs("div",{className:"border-t border-gray-700/50 pt-4 space-y-4",children:[n.jsxs("h4",{className:"text-white font-medium flex items-center gap-2",children:[n.jsx(oo,{className:"w-4 h-4 text-[#38bdac]"}),"跳转链接配置(核心功能)"]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"微信收款码/支付链接"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500",placeholder:"https://收款码图片URL 或 weixin://支付链接",value:String(k.qrCode??""),onChange:N=>g("qrCode",N.target.value)}),n.jsx("p",{className:"text-xs text-gray-500",children:"用户点击微信支付后显示的二维码图片URL"})]}),n.jsxs("div",{className:"space-y-2 bg-[#07C160]/5 p-4 rounded-xl border border-[#07C160]/20",children:[n.jsx(ae,{className:"text-[#07C160] font-medium",children:"微信群跳转链接(支付成功后跳转)"}),n.jsx(ue,{className:"bg-[#0a1628] border-[#07C160]/30 text-white placeholder:text-gray-500",placeholder:"https://weixin.qq.com/g/... 或微信群二维码图片URL",value:String(k.groupQrCode??""),onChange:N=>g("groupQrCode",N.target.value)}),n.jsx("p",{className:"text-xs text-[#07C160]/70",children:"用户支付成功后将自动跳转到此链接,进入指定微信群"})]})]})]})]})}),n.jsx(nn,{value:"alipay",className:"space-y-4",children:n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs(Ge,{className:"text-[#1677FF] flex items-center gap-2",children:[n.jsx(Zc,{className:"w-5 h-5"}),"支付宝配置"]}),n.jsx(gt,{className:"text-gray-400",children:"已加载真实支付宝参数"})]}),n.jsx(xt,{checked:!!C.enabled,onCheckedChange:N=>v("enabled",N)})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"合作者身份 (PID)"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white font-mono text-sm",value:String(C.partnerId??""),onChange:N=>v("partnerId",N.target.value)}),n.jsx(he,{size:"icon",variant:"outline",className:"border-gray-700 bg-transparent",onClick:()=>x(String(C.partnerId??""),"pid"),children:c==="pid"?n.jsx(No,{className:"w-4 h-4 text-green-500"}):n.jsx(ip,{className:"w-4 h-4 text-gray-400"})})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"安全校验码 (Key)"}),n.jsx(ue,{type:"password",className:"bg-[#0a1628] border-gray-700 text-white font-mono text-sm",value:String(C.securityKey??""),onChange:N=>v("securityKey",N.target.value)})]})]}),n.jsxs("div",{className:"border-t border-gray-700/50 pt-4 space-y-4",children:[n.jsxs("h4",{className:"text-white font-medium flex items-center gap-2",children:[n.jsx(oo,{className:"w-4 h-4 text-[#38bdac]"}),"跳转链接配置"]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"支付宝收款码/跳转链接"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500",placeholder:"https://qr.alipay.com/... 或收款码图片URL",value:String(C.qrCode??""),onChange:N=>v("qrCode",N.target.value)}),n.jsx("p",{className:"text-xs text-gray-500",children:"用户点击支付宝支付后显示的二维码"})]})]})]})]})}),n.jsx(nn,{value:"usdt",className:"space-y-4",children:n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs(Ge,{className:"text-[#26A17B] flex items-center gap-2",children:[n.jsx(rm,{className:"w-5 h-5"}),"USDT配置"]}),n.jsx(gt,{className:"text-gray-400",children:"配置加密货币收款地址"})]}),n.jsx(xt,{checked:!!b.enabled,onCheckedChange:N=>y("enabled",N)})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"网络类型"}),n.jsxs("select",{className:"w-full bg-[#0a1628] border border-gray-700 text-white rounded-md p-2",value:String(b.network??"TRC20"),onChange:N=>y("network",N.target.value),children:[n.jsx("option",{value:"TRC20",children:"TRC20 (波场)"}),n.jsx("option",{value:"ERC20",children:"ERC20 (以太坊)"}),n.jsx("option",{value:"BEP20",children:"BEP20 (币安链)"})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"收款地址"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white font-mono text-sm",placeholder:"T... (TRC20地址)",value:String(b.address??""),onChange:N=>y("address",N.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"汇率 (1 USD = ? CNY)"}),n.jsx(ue,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:Number(b.exchangeRate)??7.2,onChange:N=>y("exchangeRate",Number.parseFloat(N.target.value)||7.2)})]})]})]})}),n.jsx(nn,{value:"paypal",className:"space-y-4",children:n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs(Ge,{className:"text-[#169BD7] flex items-center gap-2",children:[n.jsx(eu,{className:"w-5 h-5"}),"PayPal配置"]}),n.jsx(gt,{className:"text-gray-400",children:"配置PayPal收款账户"})]}),n.jsx(xt,{checked:!!j.enabled,onCheckedChange:N=>E("enabled",N)})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"PayPal邮箱"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"your@email.com",value:String(j.email??""),onChange:N=>E("email",N.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"汇率 (1 USD = ? CNY)"}),n.jsx(ue,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:Number(j.exchangeRate)??7.2,onChange:N=>E("exchangeRate",Number(N.target.value)||7.2)})]})]})]})})]})]})}const DC={siteName:"卡若日记",siteTitle:"一场SOUL的创业实验场",siteDescription:"来自Soul派对房的真实商业故事",logo:"/logo.png",favicon:"/favicon.ico",primaryColor:"#00CED1"},OC={home:{enabled:!0,label:"首页"},chapters:{enabled:!0,label:"目录"},match:{enabled:!0,label:"匹配"},my:{enabled:!0,label:"我的"}},FC={homeTitle:"一场SOUL的创业实验场",homeSubtitle:"来自Soul派对房的真实商业故事",chaptersTitle:"我要看",matchTitle:"语音匹配",myTitle:"我的",aboutTitle:"关于作者"};function zC(){const[r,a]=p.useState({siteConfig:{...DC},menuConfig:{...OC},pageConfig:{...FC}}),[l,i]=p.useState(!1);p.useEffect(()=>{Xe("/api/config").then(x=>{x!=null&&x.siteConfig&&a(g=>({...g,siteConfig:{...g.siteConfig,...x.siteConfig}})),x!=null&&x.menuConfig&&a(g=>({...g,menuConfig:{...g.menuConfig,...x.menuConfig}})),x!=null&&x.pageConfig&&a(g=>({...g,pageConfig:{...g.pageConfig,...x.pageConfig}}))}).catch(console.error)},[]);const c=()=>{i(!0),setTimeout(()=>i(!1),2e3),alert("配置已保存(当前为前端状态,后端可对接 /api/db/config 持久化)")},d=r.siteConfig,f=r.menuConfig,m=r.pageConfig;return n.jsxs("div",{className:"p-8 max-w-4xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"网站配置"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"配置网站名称、图标、菜单和页面标题"})]}),n.jsxs(he,{onClick:c,className:`${l?"bg-green-500":"bg-[#00CED1]"} hover:bg-[#20B2AA] text-white transition-colors`,children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),l?"已保存":"保存设置"]})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(eu,{className:"w-5 h-5 text-[#00CED1]"}),"网站基础信息"]}),n.jsx(gt,{className:"text-gray-400",children:"配置网站名称、标题和描述"})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{htmlFor:"site-name",className:"text-gray-300",children:"网站名称"}),n.jsx(ue,{id:"site-name",className:"bg-[#0a1628] border-gray-700 text-white",value:d.siteName??"",onChange:x=>a(g=>({...g,siteConfig:{...g.siteConfig,siteName:x.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{htmlFor:"site-title",className:"text-gray-300",children:"网站标题"}),n.jsx(ue,{id:"site-title",className:"bg-[#0a1628] border-gray-700 text-white",value:d.siteTitle??"",onChange:x=>a(g=>({...g,siteConfig:{...g.siteConfig,siteTitle:x.target.value}}))})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{htmlFor:"site-desc",className:"text-gray-300",children:"网站描述"}),n.jsx(ue,{id:"site-desc",className:"bg-[#0a1628] border-gray-700 text-white",value:d.siteDescription??"",onChange:x=>a(g=>({...g,siteConfig:{...g.siteConfig,siteDescription:x.target.value}}))})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{htmlFor:"logo",className:"text-gray-300",children:"Logo地址"}),n.jsx(ue,{id:"logo",className:"bg-[#0a1628] border-gray-700 text-white",value:d.logo??"",onChange:x=>a(g=>({...g,siteConfig:{...g.siteConfig,logo:x.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{htmlFor:"favicon",className:"text-gray-300",children:"Favicon地址"}),n.jsx(ue,{id:"favicon",className:"bg-[#0a1628] border-gray-700 text-white",value:d.favicon??"",onChange:x=>a(g=>({...g,siteConfig:{...g.siteConfig,favicon:x.target.value}}))})]})]})]})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(l1,{className:"w-5 h-5 text-[#00CED1]"}),"主题颜色"]}),n.jsx(gt,{className:"text-gray-400",children:"配置网站主题色"})]}),n.jsx(_e,{children:n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsxs("div",{className:"space-y-2 flex-1",children:[n.jsx(ae,{htmlFor:"primary-color",className:"text-gray-300",children:"主色调"}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(ue,{id:"primary-color",type:"color",className:"w-16 h-10 bg-[#0a1628] border-gray-700 cursor-pointer p-1",value:d.primaryColor??"#00CED1",onChange:x=>a(g=>({...g,siteConfig:{...g.siteConfig,primaryColor:x.target.value}}))}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white flex-1",value:d.primaryColor??"#00CED1",onChange:x=>a(g=>({...g,siteConfig:{...g.siteConfig,primaryColor:x.target.value}}))})]})]}),n.jsx("div",{className:"w-24 h-24 rounded-xl flex items-center justify-center text-white font-bold",style:{backgroundColor:d.primaryColor??"#00CED1"},children:"预览"})]})})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(n1,{className:"w-5 h-5 text-[#00CED1]"}),"底部菜单配置"]}),n.jsx(gt,{className:"text-gray-400",children:"控制底部导航栏菜单的显示和名称"})]}),n.jsx(_e,{className:"space-y-4",children:Object.entries(f).map(([x,g])=>n.jsxs("div",{className:"flex items-center justify-between p-4 bg-[#0a1628] rounded-lg",children:[n.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[n.jsx(xt,{checked:(g==null?void 0:g.enabled)??!0,onCheckedChange:v=>a(y=>({...y,menuConfig:{...y.menuConfig,[x]:{...g,enabled:v}}}))}),n.jsx("span",{className:"text-gray-300 w-16 capitalize",children:x}),n.jsx(ue,{className:"bg-[#0f2137] border-gray-700 text-white max-w-[200px]",value:(g==null?void 0:g.label)??"",onChange:v=>a(y=>({...y,menuConfig:{...y.menuConfig,[x]:{...g,label:v.target.value}}}))})]}),n.jsx("span",{className:`text-sm ${g!=null&&g.enabled?"text-green-400":"text-gray-500"}`,children:g!=null&&g.enabled?"显示":"隐藏"})]},x))})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(up,{className:"w-5 h-5 text-[#00CED1]"}),"页面标题配置"]}),n.jsx(gt,{className:"text-gray-400",children:"配置各个页面的标题和副标题"})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"首页标题"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.homeTitle??"",onChange:x=>a(g=>({...g,pageConfig:{...g.pageConfig,homeTitle:x.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"首页副标题"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.homeSubtitle??"",onChange:x=>a(g=>({...g,pageConfig:{...g.pageConfig,homeSubtitle:x.target.value}}))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"目录页标题"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.chaptersTitle??"",onChange:x=>a(g=>({...g,pageConfig:{...g.pageConfig,chaptersTitle:x.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"匹配页标题"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.matchTitle??"",onChange:x=>a(g=>({...g,pageConfig:{...g.pageConfig,matchTitle:x.target.value}}))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"我的页标题"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.myTitle??"",onChange:x=>a(g=>({...g,pageConfig:{...g.pageConfig,myTitle:x.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"关于作者标题"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.aboutTitle??"",onChange:x=>a(g=>({...g,pageConfig:{...g.pageConfig,aboutTitle:x.target.value}}))})]})]})]})]})]})]})}function $C(){const[r,a]=p.useState(""),[l,i]=p.useState(""),[c,d]=p.useState(""),[f,m]=p.useState({}),x=async()=>{var k,C,b,j;try{const N=await Xe("/api/config"),R=(C=(k=N==null?void 0:N.liveQRCodes)==null?void 0:k[0])==null?void 0:C.urls;Array.isArray(R)&&a(R.join(`
`));const S=(j=(b=N==null?void 0:N.paymentMethods)==null?void 0:b.wechat)==null?void 0:j.groupQrCode;S&&i(S),m({paymentMethods:N==null?void 0:N.paymentMethods,liveQRCodes:N==null?void 0:N.liveQRCodes})}catch(N){console.error(N)}};p.useEffect(()=>{x()},[]);const g=(k,C)=>{navigator.clipboard.writeText(k),d(C),setTimeout(()=>d(""),2e3)},v=async()=>{try{const k=r.split(`
`).map(b=>b.trim()).filter(Boolean),C=[...f.liveQRCodes||[]];C[0]?C[0].urls=k:C.push({id:"live-1",name:"微信群活码",urls:k,clickCount:0}),await It("/api/config",{liveQRCodes:C}),alert("群活码配置已保存!"),await x()}catch(k){console.error(k),alert("保存失败: "+(k instanceof Error?k.message:String(k)))}},y=async()=>{var k;try{await It("/api/config",{paymentMethods:{...f.paymentMethods||{},wechat:{...((k=f.paymentMethods)==null?void 0:k.wechat)||{},groupQrCode:l}}}),alert("微信群链接已保存!用户支付成功后将自动跳转"),await x()}catch(C){console.error(C),alert("保存失败: "+(C instanceof Error?C.message:String(C)))}},E=()=>{l?window.open(l,"_blank"):alert("请先配置微信群链接")};return n.jsxs("div",{className:"p-8 max-w-5xl mx-auto",children:[n.jsxs("div",{className:"mb-8",children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"微信群活码管理"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"配置微信群跳转链接,用户支付后自动跳转加群"})]}),n.jsx("div",{className:"mb-6 bg-[#07C160]/10 border border-[#07C160]/30 rounded-xl p-4",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(lp,{className:"w-5 h-5 text-[#07C160] flex-shrink-0 mt-0.5"}),n.jsxs("div",{className:"text-sm",children:[n.jsx("p",{className:"font-medium mb-2 text-[#07C160]",children:"微信群活码配置指南"}),n.jsxs("div",{className:"text-[#07C160]/80 space-y-2",children:[n.jsx("p",{className:"font-medium",children:"方法一:使用草料活码(推荐)"}),n.jsxs("ol",{className:"list-decimal list-inside space-y-1 pl-2",children:[n.jsx("li",{children:"访问草料二维码创建活码"}),n.jsx("li",{children:"上传微信群二维码图片,生成永久链接"}),n.jsx("li",{children:"复制生成的短链接填入下方配置"}),n.jsx("li",{children:"群满后可直接在草料后台更换新群码,链接不变"})]}),n.jsx("p",{className:"font-medium mt-3",children:"方法二:直接使用微信群链接"}),n.jsxs("ol",{className:"list-decimal list-inside space-y-1 pl-2",children:[n.jsx("li",{children:'微信打开目标群 → 右上角"..." → 群二维码'}),n.jsx("li",{children:"长按二维码 → 识别二维码 → 复制链接"})]}),n.jsx("p",{className:"text-[#07C160]/60 mt-2",children:"注意微信原生群二维码7天后失效建议使用草料活码"})]})]})]})}),n.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl md:col-span-2",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-[#07C160] flex items-center gap-2",children:[n.jsx(dm,{className:"w-5 h-5"}),"支付成功跳转链接(核心配置)"]}),n.jsx(gt,{className:"text-gray-400",children:"用户支付完成后自动跳转到此链接,进入指定微信群"})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(cm,{className:"w-4 h-4"}),"微信群链接 / 活码链接"]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(ue,{placeholder:"https://cli.im/xxxxx 或 https://weixin.qq.com/g/...",className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500 flex-1",value:l,onChange:k=>i(k.target.value)}),n.jsx(he,{variant:"outline",size:"icon",className:"border-gray-700 bg-transparent hover:bg-gray-700/50",onClick:()=>g(l,"group"),children:c==="group"?n.jsx(No,{className:"w-4 h-4 text-green-500"}):n.jsx(ip,{className:"w-4 h-4 text-gray-400"})})]}),n.jsxs("p",{className:"text-xs text-gray-500 flex items-center gap-1",children:[n.jsx(oo,{className:"w-3 h-3"}),"支持格式:草料短链、微信群链接(https://weixin.qq.com/g/...)、企业微信链接等"]})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsxs(he,{onClick:y,className:"flex-1 bg-[#07C160] hover:bg-[#06AD51] text-white",children:[n.jsx(Cs,{className:"w-4 h-4 mr-2"}),"保存配置"]}),n.jsxs(he,{onClick:E,variant:"outline",className:"border-[#07C160] text-[#07C160] hover:bg-[#07C160]/10 bg-transparent",children:[n.jsx(oo,{className:"w-4 h-4 mr-2"}),"测试跳转"]})]})]})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl md:col-span-2",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(dm,{className:"w-5 h-5 text-[#38bdac]"}),"多群轮换(高级配置)"]}),n.jsx(gt,{className:"text-gray-400",children:"配置多个群链接,系统自动轮换分配,避免单群满员"})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(cm,{className:"w-4 h-4"}),"多个群链接(每行一个)"]}),n.jsx(Ur,{placeholder:"https://cli.im/group1\\nhttps://cli.im/group2",className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500 min-h-[120px] font-mono text-sm",value:r,onChange:k=>a(k.target.value)}),n.jsx("p",{className:"text-xs text-gray-500",children:"每行填写一个群链接,系统将按顺序或随机分配"})]}),n.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a1628] rounded-lg border border-gray-700/50",children:[n.jsx("span",{className:"text-sm text-gray-400",children:"已配置群数量"}),n.jsxs("span",{className:"font-bold text-[#38bdac]",children:[r.split(`
`).filter(Boolean).length," 个"]})]}),n.jsxs(he,{onClick:v,className:"w-full bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Cs,{className:"w-4 h-4 mr-2"}),"保存多群配置"]})]})]})]}),n.jsxs("div",{className:"mt-6 bg-[#0f2137] rounded-xl p-4 border border-gray-700/50",children:[n.jsx("h4",{className:"text-white font-medium mb-3",children:"常见问题"}),n.jsxs("div",{className:"space-y-3 text-sm",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-[#38bdac]",children:"Q: 为什么推荐使用草料活码?"}),n.jsx("p",{className:"text-gray-400",children:"A: 草料活码是永久链接群满后可直接在后台更换新群码无需修改网站配置。微信原生群码7天失效。"})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[#38bdac]",children:"Q: 支付后没有跳转怎么办?"}),n.jsx("p",{className:"text-gray-400",children:"A: 1) 检查链接是否正确填写 2) 部分浏览器可能拦截弹窗,用户需手动允许 3) 建议使用https开头的链接"})]})]})]})]})}const Hm={matchTypes:[{id:"partner",label:"创业合伙",matchLabel:"创业伙伴",icon:"⭐",matchFromDB:!0,showJoinAfterMatch:!1,price:1,enabled:!0},{id:"investor",label:"资源对接",matchLabel:"资源对接",icon:"👥",matchFromDB:!1,showJoinAfterMatch:!0,price:1,enabled:!0},{id:"mentor",label:"导师顾问",matchLabel:"商业顾问",icon:"❤️",matchFromDB:!1,showJoinAfterMatch:!0,price:1,enabled:!0},{id:"team",label:"团队招募",matchLabel:"加入项目",icon:"🎮",matchFromDB:!1,showJoinAfterMatch:!0,price:1,enabled:!0}],freeMatchLimit:3,matchPrice:1,settings:{enableFreeMatches:!0,enablePaidMatches:!0,maxMatchesPerDay:10}},BC=["⭐","👥","❤️","🎮","💼","🚀","💡","🎯","🔥","✨"];function UC(){const[r,a]=p.useState(Hm),[l,i]=p.useState(!0),[c,d]=p.useState(!1),[f,m]=p.useState(!1),[x,g]=p.useState(null),[v,y]=p.useState({id:"",label:"",matchLabel:"",icon:"⭐",matchFromDB:!1,showJoinAfterMatch:!0,price:1,enabled:!0}),E=async()=>{i(!0);try{const S=await Xe("/api/db/config/full?key=match_config"),A=(S==null?void 0:S.data)??(S==null?void 0:S.config);A&&a({...Hm,...A})}catch(S){console.error("加载匹配配置失败:",S)}finally{i(!1)}};p.useEffect(()=>{E()},[]);const k=async()=>{d(!0);try{const S=await It("/api/db/config",{key:"match_config",value:r,description:"匹配功能配置"});S&&S.success!==!1?alert("配置保存成功!"):alert("保存失败: "+(S&&typeof S=="object"&&"error"in S?S.error:"未知错误"))}catch(S){console.error("保存配置失败:",S),alert("保存失败")}finally{d(!1)}},C=S=>{g(S),y({id:S.id,label:S.label,matchLabel:S.matchLabel,icon:S.icon,matchFromDB:S.matchFromDB,showJoinAfterMatch:S.showJoinAfterMatch,price:S.price,enabled:S.enabled}),m(!0)},b=()=>{g(null),y({id:"",label:"",matchLabel:"",icon:"⭐",matchFromDB:!1,showJoinAfterMatch:!0,price:1,enabled:!0}),m(!0)},j=()=>{if(!v.id||!v.label){alert("请填写类型ID和名称");return}const S=[...r.matchTypes];if(x){const A=S.findIndex(V=>V.id===x.id);A!==-1&&(S[A]={...v})}else{if(S.some(A=>A.id===v.id)){alert("类型ID已存在");return}S.push({...v})}a({...r,matchTypes:S}),m(!1)},N=S=>{confirm("确定要删除这个匹配类型吗?")&&a({...r,matchTypes:r.matchTypes.filter(A=>A.id!==S)})},R=S=>{a({...r,matchTypes:r.matchTypes.map(A=>A.id===S?{...A,enabled:!A.enabled}:A)})};return n.jsxs("div",{className:"p-8 max-w-6xl mx-auto space-y-6",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsxs("div",{children:[n.jsxs("h2",{className:"text-2xl font-bold text-white flex items-center gap-2",children:[n.jsx(io,{className:"w-6 h-6 text-[#38bdac]"}),"匹配功能配置"]}),n.jsx("p",{className:"text-gray-400 mt-1",children:"管理找伙伴功能的匹配类型和价格"})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsxs(he,{variant:"outline",onClick:E,disabled:l,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(et,{className:`w-4 h-4 mr-2 ${l?"animate-spin":""}`}),"刷新"]}),n.jsxs(he,{onClick:k,disabled:c,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),c?"保存中...":"保存配置"]})]})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(A1,{className:"w-5 h-5 text-yellow-400"}),"基础设置"]}),n.jsx(gt,{className:"text-gray-400",children:"配置免费匹配次数和付费规则"})]}),n.jsxs(_e,{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"每日免费匹配次数"}),n.jsx(ue,{type:"number",min:0,max:100,className:"bg-[#0a1628] border-gray-700 text-white",value:r.freeMatchLimit,onChange:S=>a({...r,freeMatchLimit:parseInt(S.target.value,10)||0})}),n.jsx("p",{className:"text-xs text-gray-500",children:"用户每天可免费匹配的次数"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"付费匹配价格(元)"}),n.jsx(ue,{type:"number",min:.01,step:.01,className:"bg-[#0a1628] border-gray-700 text-white",value:r.matchPrice,onChange:S=>a({...r,matchPrice:parseFloat(S.target.value)||1})}),n.jsx("p",{className:"text-xs text-gray-500",children:"免费次数用完后的单次匹配价格"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"每日最大匹配次数"}),n.jsx(ue,{type:"number",min:1,max:100,className:"bg-[#0a1628] border-gray-700 text-white",value:r.settings.maxMatchesPerDay,onChange:S=>a({...r,settings:{...r.settings,maxMatchesPerDay:parseInt(S.target.value,10)||10}})}),n.jsx("p",{className:"text-xs text-gray-500",children:"包含免费和付费的总次数"})]})]}),n.jsxs("div",{className:"flex gap-8 pt-4 border-t border-gray-700/50",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(xt,{checked:r.settings.enableFreeMatches,onCheckedChange:S=>a({...r,settings:{...r.settings,enableFreeMatches:S}})}),n.jsx(ae,{className:"text-gray-300",children:"启用免费匹配"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(xt,{checked:r.settings.enablePaidMatches,onCheckedChange:S=>a({...r,settings:{...r.settings,enablePaidMatches:S}})}),n.jsx(ae,{className:"text-gray-300",children:"启用付费匹配"})]})]})]})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsxs(Ve,{className:"flex flex-row items-center justify-between",children:[n.jsxs("div",{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(Pn,{className:"w-5 h-5 text-[#38bdac]"}),"匹配类型管理"]}),n.jsx(gt,{className:"text-gray-400",children:"配置不同的匹配类型及其价格"})]}),n.jsxs(he,{onClick:b,size:"sm",className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Es,{className:"w-4 h-4 mr-1"}),"添加类型"]})]}),n.jsx(_e,{children:n.jsxs(bo,{children:[n.jsx(So,{children:n.jsxs(Un,{className:"bg-[#0a1628] hover:bg-[#0a1628] border-gray-700",children:[n.jsx(tt,{className:"text-gray-400",children:"图标"}),n.jsx(tt,{className:"text-gray-400",children:"类型ID"}),n.jsx(tt,{className:"text-gray-400",children:"显示名称"}),n.jsx(tt,{className:"text-gray-400",children:"匹配标签"}),n.jsx(tt,{className:"text-gray-400",children:"价格"}),n.jsx(tt,{className:"text-gray-400",children:"数据库匹配"}),n.jsx(tt,{className:"text-gray-400",children:"状态"}),n.jsx(tt,{className:"text-right text-gray-400",children:"操作"})]})}),n.jsx(Co,{children:r.matchTypes.map(S=>n.jsxs(Un,{className:"hover:bg-[#0a1628] border-gray-700/50",children:[n.jsx(Ye,{children:n.jsx("span",{className:"text-2xl",children:S.icon})}),n.jsx(Ye,{className:"font-mono text-gray-300",children:S.id}),n.jsx(Ye,{className:"text-white font-medium",children:S.label}),n.jsx(Ye,{className:"text-gray-300",children:S.matchLabel}),n.jsx(Ye,{children:n.jsxs(Fe,{className:"bg-yellow-500/20 text-yellow-400 hover:bg-yellow-500/20 border-0",children:["¥",S.price]})}),n.jsx(Ye,{children:S.matchFromDB?n.jsx(Fe,{className:"bg-green-500/20 text-green-400 hover:bg-green-500/20 border-0",children:"是"}):n.jsx(Fe,{variant:"outline",className:"text-gray-500 border-gray-600",children:"否"})}),n.jsx(Ye,{children:n.jsx(xt,{checked:S.enabled,onCheckedChange:()=>R(S.id)})}),n.jsx(Ye,{className:"text-right",children:n.jsxs("div",{className:"flex items-center justify-end gap-1",children:[n.jsx(he,{variant:"ghost",size:"sm",onClick:()=>C(S),className:"text-gray-400 hover:text-[#38bdac] hover:bg-[#38bdac]/10",children:n.jsx(Ts,{className:"w-4 h-4"})}),n.jsx(he,{variant:"ghost",size:"sm",onClick:()=>N(S.id),className:"text-red-400 hover:text-red-300 hover:bg-red-500/10",children:n.jsx(dp,{className:"w-4 h-4"})})]})})]},S.id))})]})})]}),n.jsx(bn,{open:f,onOpenChange:m,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-lg",showCloseButton:!0,children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[x?n.jsx(Ts,{className:"w-5 h-5 text-[#38bdac]"}):n.jsx(Es,{className:"w-5 h-5 text-[#38bdac]"}),x?"编辑匹配类型":"添加匹配类型"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"类型ID英文"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"如: partner",value:v.id,onChange:S=>y({...v,id:S.target.value}),disabled:!!x})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"图标"}),n.jsx("div",{className:"flex gap-1 flex-wrap",children:BC.map(S=>n.jsx("button",{type:"button",className:`w-8 h-8 text-lg rounded ${v.icon===S?"bg-[#38bdac]/30 ring-1 ring-[#38bdac]":"bg-[#0a1628]"}`,onClick:()=>y({...v,icon:S}),children:S},S))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"显示名称"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"如: 创业合伙",value:v.label,onChange:S=>y({...v,label:S.target.value})})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"匹配标签"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"如: 创业伙伴",value:v.matchLabel,onChange:S=>y({...v,matchLabel:S.target.value})})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"单次匹配价格(元)"}),n.jsx(ue,{type:"number",min:.01,step:.01,className:"bg-[#0a1628] border-gray-700 text-white",value:v.price,onChange:S=>y({...v,price:parseFloat(S.target.value)||1})})]}),n.jsxs("div",{className:"flex gap-6 pt-2",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(xt,{checked:v.matchFromDB,onCheckedChange:S=>y({...v,matchFromDB:S})}),n.jsx(ae,{className:"text-gray-300 text-sm",children:"从数据库匹配"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(xt,{checked:v.showJoinAfterMatch,onCheckedChange:S=>y({...v,showJoinAfterMatch:S})}),n.jsx(ae,{className:"text-gray-300 text-sm",children:"匹配后显示加入"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(xt,{checked:v.enabled,onCheckedChange:S=>y({...v,enabled:S})}),n.jsx(ae,{className:"text-gray-300 text-sm",children:"启用"})]})]})]}),n.jsxs(Bn,{children:[n.jsx(he,{variant:"outline",onClick:()=>m(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"取消"}),n.jsxs(he,{onClick:j,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),"保存"]})]})]})})]})}function VC(){const r=Xr();return n.jsx("div",{className:"min-h-screen bg-[#0a1628] flex items-center justify-center p-8",children:n.jsxs("div",{className:"text-center max-w-md",children:[n.jsx("div",{className:"inline-flex items-center justify-center w-20 h-20 rounded-full bg-red-500/20 text-red-400 mb-6",children:n.jsx(vw,{className:"w-10 h-10"})}),n.jsx("h1",{className:"text-4xl font-bold text-white mb-2",children:"404"}),n.jsx("p",{className:"text-gray-400 mb-1",children:"页面不存在"}),n.jsx("p",{className:"text-sm text-gray-500 font-mono mb-8 break-all",children:r.pathname}),n.jsx(he,{asChild:!0,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:n.jsxs(rp,{to:"/",children:[n.jsx($w,{className:"w-4 h-4 mr-2"}),"返回首页"]})})]})})}function WC(){return n.jsxs(Hy,{children:[n.jsx(Nt,{path:"/login",element:n.jsx($N,{})}),n.jsxs(Nt,{path:"/",element:n.jsx(B1,{}),children:[n.jsx(Nt,{index:!0,element:n.jsx(Uy,{to:"/dashboard",replace:!0})}),n.jsx(Nt,{path:"dashboard",element:n.jsx(UN,{})}),n.jsx(Nt,{path:"orders",element:n.jsx(WN,{})}),n.jsx(Nt,{path:"users",element:n.jsx(Zb,{})}),n.jsx(Nt,{path:"distribution",element:n.jsx(e2,{})}),n.jsx(Nt,{path:"withdrawals",element:n.jsx(t2,{})}),n.jsx(Nt,{path:"content",element:n.jsx(oC,{})}),n.jsx(Nt,{path:"chapters",element:n.jsx(iC,{})}),n.jsx(Nt,{path:"referral-settings",element:n.jsx(_C,{})}),n.jsx(Nt,{path:"settings",element:n.jsx(MC,{})}),n.jsx(Nt,{path:"payment",element:n.jsx(LC,{})}),n.jsx(Nt,{path:"site",element:n.jsx(zC,{})}),n.jsx(Nt,{path:"qrcodes",element:n.jsx($C,{})}),n.jsx(Nt,{path:"match",element:n.jsx(UC,{})})]}),n.jsx(Nt,{path:"*",element:n.jsx(VC,{})})]})}Qv.createRoot(document.getElementById("root")).render(n.jsx(p.StrictMode,{children:n.jsx(Jy,{future:{v7_startTransition:!0,v7_relativeSplatPath:!0},children:n.jsx(WC,{})})}));