var Ry=i=>{throw TypeError(i)};var jy=(i,c,r)=>c.has(i)||Ry("Cannot "+r);var pt=(i,c,r)=>(jy(i,c,"read from private field"),r?r.call(i):c.get(i)),Dy=(i,c,r)=>c.has(i)?Ry("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(i):c.set(i,r),Is=(i,c,r,o)=>(jy(i,c,"write to private field"),o?o.call(i,r):c.set(i,r),r);function Nx(i,c){for(var r=0;ro[f]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const v of m.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&o(v)}).observe(document,{childList:!0,subtree:!0});function r(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function o(f){if(f.ep)return;f.ep=!0;const m=r(f);fetch(f.href,m)}})();function pg(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Fs={exports:{}},ii={};/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var My;function Cx(){if(My)return ii;My=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function r(o,f,m){var v=null;if(m!==void 0&&(v=""+m),f.key!==void 0&&(v=""+f.key),"key"in f){m={};for(var p in f)p!=="key"&&(m[p]=f[p])}else m=f;return f=m.ref,{$$typeof:i,type:o,key:v,ref:f!==void 0?f:null,props:m}}return ii.Fragment=c,ii.jsx=r,ii.jsxs=r,ii}var Uy;function Tx(){return Uy||(Uy=1,Fs.exports=Cx()),Fs.exports}var d=Tx(),$s={exports:{}},ve={};/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Hy;function _x(){if(Hy)return ve;Hy=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),v=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),T=Symbol.for("react.view_transition"),B=Symbol.iterator;function D(S){return S===null||typeof S!="object"?null:(S=B&&S[B]||S["@@iterator"],typeof S=="function"?S:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,Z={};function Q(S,z,J){this.props=S,this.context=z,this.refs=Z,this.updater=J||M}Q.prototype.isReactComponent={},Q.prototype.setState=function(S,z){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,z,"setState")},Q.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function V(){}V.prototype=Q.prototype;function P(S,z,J){this.props=S,this.context=z,this.refs=Z,this.updater=J||M}var F=P.prototype=new V;F.constructor=P,H(F,Q.prototype),F.isPureReactComponent=!0;var G=Array.isArray;function U(){}var k={H:null,A:null,T:null,S:null},ce=Object.prototype.hasOwnProperty;function xe(S,z,J){var I=J.ref;return{$$typeof:i,type:S,key:z,ref:I!==void 0?I:null,props:J}}function he(S,z){return xe(S.type,z,S.props)}function se(S){return typeof S=="object"&&S!==null&&S.$$typeof===i}function je(S){var z={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(J){return z[J]})}var ze=/\/+/g;function ye(S,z){return typeof S=="object"&&S!==null&&S.key!=null?je(""+S.key):z.toString(36)}function K(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(U,U):(S.status="pending",S.then(function(z){S.status==="pending"&&(S.status="fulfilled",S.value=z)},function(z){S.status==="pending"&&(S.status="rejected",S.reason=z)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function W(S,z,J,I,de){var te=typeof S;(te==="undefined"||te==="boolean")&&(S=null);var Se=!1;if(S===null)Se=!0;else switch(te){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(S.$$typeof){case i:case c:Se=!0;break;case N:return Se=S._init,W(Se(S._payload),z,J,I,de)}}if(Se)return de=de(S),Se=I===""?"."+ye(S,0):I,G(de)?(J="",Se!=null&&(J=Se.replace(ze,"$&/")+"/"),W(de,z,J,"",function(Mt){return Mt})):de!=null&&(se(de)&&(de=he(de,J+(de.key==null||S&&S.key===de.key?"":(""+de.key).replace(ze,"$&/")+"/")+Se)),z.push(de)),1;Se=0;var ae=I===""?".":I+":";if(G(S))for(var fe=0;fe>>1,q=K[ge];if(0>>1;gef(re,ie))Sf(z,re)?(K[ge]=z,K[S]=ie,ge=S):(K[ge]=re,K[X]=ie,ge=X);else if(Sf(z,ie))K[ge]=z,K[S]=ie,ge=S;else break e}}return W}function f(K,W){var ie=K.sortIndex-W.sortIndex;return ie!==0?ie:K.id-W.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;i.unstable_now=function(){return m.now()}}else{var v=Date,p=v.now();i.unstable_now=function(){return v.now()-p}}var E=[],b=[],N=1,y=null,T=3,B=!1,D=!1,M=!1,H=!1,Z=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function P(K){for(var W=r(b);W!==null;){if(W.callback===null)o(b);else if(W.startTime<=K)o(b),W.sortIndex=W.expirationTime,c(E,W);else break;W=r(b)}}function F(K){if(M=!1,P(K),!D)if(r(E)!==null)D=!0,G||(G=!0,se());else{var W=r(b);W!==null&&ye(F,W.startTime-K)}}var G=!1,U=-1,k=5,ce=-1;function xe(){return H?!0:!(i.unstable_now()-ceK&&xe());){var ge=y.callback;if(typeof ge=="function"){y.callback=null,T=y.priorityLevel;var q=ge(y.expirationTime<=K);if(K=i.unstable_now(),typeof q=="function"){y.callback=q,P(K),W=!0;break t}y===r(E)&&o(E),P(K)}else o(E);y=r(E)}if(y!==null)W=!0;else{var Ce=r(b);Ce!==null&&ye(F,Ce.startTime-K),W=!1}}break e}finally{y=null,T=ie,B=!1}W=void 0}}finally{W?se():G=!1}}}var se;if(typeof V=="function")se=function(){V(he)};else if(typeof MessageChannel<"u"){var je=new MessageChannel,ze=je.port2;je.port1.onmessage=he,se=function(){ze.postMessage(null)}}else se=function(){Z(he,0)};function ye(K,W){U=Z(function(){K(i.unstable_now())},W)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(K){K.callback=null},i.unstable_forceFrameRate=function(K){0>K||125ge?(K.sortIndex=ie,c(b,K),r(E)===null&&K===r(b)&&(M?(Q(U),U=-1):M=!0,ye(F,ie-ge))):(K.sortIndex=q,c(E,K),D||B||(D=!0,G||(G=!0,se()))),K},i.unstable_shouldYield=xe,i.unstable_wrapCallback=function(K){var W=T;return function(){var ie=T;T=W;try{return K.apply(this,arguments)}finally{T=ie}}}})(ef)),ef}var Ly;function Ox(){return Ly||(Ly=1,Ws.exports=wx()),Ws.exports}var tf={exports:{}},bt={};/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Gy;function Ax(){if(Gy)return bt;Gy=1;var i=zf();function c(N){var y="https://react.dev/errors/"+N;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),tf.exports=Ax(),tf.exports}/** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var qy;function zx(){if(qy)return ci;qy=1;var i=Ox(),c=zf(),r=bg();function o(e){var t="https://react.dev/errors/"+e;if(1da||(e.current=Il[da],Il[da]=null,da--)}function Ge(e,t){da++,Il[da]=e.current,e.current=t}var vl=hl(null),du=hl(null),Fl=hl(null),vi=hl(null);function yi(e,t){switch(Ge(Fl,t),Ge(du,e),Ge(vl,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gv(t),e=Yv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ft(vl),Ge(vl,e)}function ma(){ft(vl),ft(du),ft(Fl)}function hr(e){var t=e.memoizedState;t!==null&&(eu._currentValue=t.memoizedState,Ge(vi,e)),t=vl.current;var l=Yv(t,e.type);t!==l&&(Ge(du,e),Ge(vl,l))}function gi(e){du.current===e&&(ft(vl),ft(du)),vi.current===e&&(ft(vi),eu._currentValue=Mt)}var vr,cd;function $l(e){if(vr===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);vr=t&&t[1]||"",cd=-1)":-1a||x[n]!==O[a]){var j=` `+x[n].replace(" at new "," at ");return e.displayName&&j.includes("")&&(j=j.replace("",e.displayName)),j}while(1<=n&&0<=a);break}}}finally{yr=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?$l(l):""}function w0(e,t){switch(e.tag){case 26:case 27:case 5:return $l(e.type);case 16:return $l("Lazy");case 13:return e.child!==t&&t!==null?$l("Suspense Fallback"):$l("Suspense");case 19:return $l("SuspenseList");case 0:case 15:return gr(e.type,!1);case 11:return gr(e.type.render,!1);case 1:return gr(e.type,!0);case 31:return $l("Activity");case 30:return $l("ViewTransition");default:return""}}function rd(e){try{var t="",l=null;do t+=w0(e,l),l=e,e=e.return;while(e);return t}catch(n){return` Error generating stack: `+n.message+` `+n.stack}}var pr=Object.prototype.hasOwnProperty,br=i.unstable_scheduleCallback,xr=i.unstable_cancelCallback,O0=i.unstable_shouldYield,A0=i.unstable_requestPaint,Ut=i.unstable_now,z0=i.unstable_getCurrentPriorityLevel,od=i.unstable_ImmediatePriority,sd=i.unstable_UserBlockingPriority,pi=i.unstable_NormalPriority,R0=i.unstable_LowPriority,fd=i.unstable_IdlePriority,j0=i.log,D0=i.unstable_setDisableYieldValue,mu=null,Ht=null;function Pl(e){if(typeof j0=="function"&&D0(e),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(mu,e)}catch{}}var Bt=Math.clz32?Math.clz32:H0,M0=Math.log,U0=Math.LN2;function H0(e){return e>>>=0,e===0?32:31-(M0(e)/U0|0)|0}var bi=256,xi=262144,Si=4194304;function Mn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ei(e,t,l){var n=e.pendingLanes;if(n===0)return 0;var a=0,u=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var h=n&134217727;return h!==0?(n=h&~u,n!==0?a=Mn(n):(s&=h,s!==0?a=Mn(s):l||(l=h&~e,l!==0&&(a=Mn(l))))):(h=n&~u,h!==0?a=Mn(h):s!==0?a=Mn(s):l||(l=n&~e,l!==0&&(a=Mn(l)))),a===0?0:t!==0&&t!==a&&(t&u)===0&&(u=a&-a,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:a}function hu(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function dd(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0l;l++)t.push(e);return t}function vu(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function k0(e,t,l,n,a,u){var s=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var h=e.entanglements,x=e.expirationTimes,O=e.hiddenUpdates;for(l=s&~l;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rr=!1;if(jl)try{var bu={};Object.defineProperty(bu,"passive",{get:function(){Rr=!0}}),window.addEventListener("test",bu,bu),window.removeEventListener("test",bu,bu)}catch{Rr=!1}var Wl=null,jr=null,Oi=null;function Hd(){if(Oi)return Oi;var e,t=jr,l=t.length,n,a="value"in Wl?Wl.value:Wl.textContent,u=a.length;for(e=0;e=Eu),qd=" ",Vd=!1;function Xd(e,t){switch(e){case"keyup":return xb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ea=!1;function Eb(e,t){switch(e){case"compositionend":return Qd(t);case"keypress":return t.which!==32?null:(Vd=!0,qd);case"textInput":return e=t.data,e===qd&&Vd?null:e;default:return null}}function Nb(e,t){if(Ea)return e==="compositionend"||!Br&&Xd(e,t)?(e=Hd(),Oi=jr=Wl=null,Ea=!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"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Wd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function em(e,t){var l=Wd(e);e=0;for(var n;l;){if(l.nodeType===3){if(n=e+l.textContent.length,e<=t&&n>=t)return{node:l,offset:t-e};e=n}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Wd(l)}}function tm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Gr(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Gr(e.document)}return t}function Yr(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")}var Rb=jl&&"documentMode"in document&&11>=document.documentMode,Na=null,qr=null,_u=null,Vr=!1;function nm(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Vr||Na==null||Na!==Gr(n)||(n=Na,"selectionStart"in n&&Yr(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),_u&&Tu(_u,n)||(_u=n,n=Dc(qr,"onSelect"),0>=s,a-=s,gl=1<<32-Bt(t)+a|l<me?(et=oe,oe=null):et=oe.sibling;var Ae=_(w,oe,A[me],L);if(Ae===null){oe===null&&(oe=et);break}e&&oe&&Ae.alternate===null&&t(w,oe),C=u(Ae,C,me),Oe===null?ee=Ae:Oe.sibling=Ae,Oe=Ae,oe=et}if(me===A.length)return l(w,oe),Ee&&Hl(w,me),ee;if(oe===null){for(;meme?(et=oe,oe=null):et=oe.sibling;var Tn=_(w,oe,Ae.value,L);if(Tn===null){oe===null&&(oe=et);break}e&&oe&&Tn.alternate===null&&t(w,oe),C=u(Tn,C,me),Oe===null?ee=Tn:Oe.sibling=Tn,Oe=Tn,oe=et}if(Ae.done)return l(w,oe),Ee&&Hl(w,me),ee;if(oe===null){for(;!Ae.done;me++,Ae=A.next())Ae=Y(w,Ae.value,L),Ae!==null&&(C=u(Ae,C,me),Oe===null?ee=Ae:Oe.sibling=Ae,Oe=Ae);return Ee&&Hl(w,me),ee}for(oe=n(oe);!Ae.done;me++,Ae=A.next())Ae=R(oe,w,me,Ae.value,L),Ae!==null&&(e&&(et=Ae.alternate,et!==null&&oe.delete(et.key===null?me:et.key)),C=u(Ae,C,me),Oe===null?ee=Ae:Oe.sibling=Ae,Oe=Ae);return e&&oe.forEach(function(Ex){return t(w,Ex)}),Ee&&Hl(w,me),ee}function be(w,C,A,L){if(typeof A=="object"&&A!==null&&A.type===he&&A.key===null&&A.props.ref===void 0&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case ce:e:{for(var ee=A.key;C!==null;){if(C.key===ee){if(ee=A.type,ee===he){if(C.tag===7){l(w,C.sibling),L=a(C,A.props.children),un(L,A),L.return=w,w=L;break e}}else if(C.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===q&&Kn(ee)===C.type){l(w,C.sibling),L=a(C,A.props),un(L,A),L.return=w,w=L;break e}l(w,C);break}else t(w,C);C=C.sibling}A.type===he?(L=Gn(A.props.children,w.mode,L,A.key),un(L,A),L.return=w,w=L):(L=ki(A.type,A.key,A.props,null,w.mode,L),un(L,A),L.return=w,w=L)}return s(w);case xe:e:{for(ee=A.key;C!==null;){if(C.key===ee)if(C.tag===4&&C.stateNode.containerInfo===A.containerInfo&&C.stateNode.implementation===A.implementation){l(w,C.sibling),L=a(C,A.children||[]),L.return=w,w=L;break e}else{l(w,C);break}else t(w,C);C=C.sibling}L=Fr(A,w.mode,L),L.return=w,w=L}return s(w);case q:return A=Kn(A),be(w,C,A,L)}if(Se(A))return $(w,C,A,L);if(I(A)){if(ee=I(A),typeof ee!="function")throw Error(o(150));return A=ee.call(A),ue(w,C,A,L)}if(typeof A.then=="function")return be(w,C,Ji(A),L);if(A.$$typeof===ye)return be(w,C,Xi(w,A),L);Ii(w,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,C!==null&&C.tag===6?(l(w,C.sibling),L=a(C,A),L.return=w,w=L):(l(w,C),L=Ir(A,w.mode,L),L.return=w,w=L),s(w)):l(w,C)}return function(w,C,A,L){try{ju=0;var ee=be(w,C,A,L);return ja=null,ee}catch(oe){if(oe===Ra||oe===Zi)throw oe;var Oe=wt(29,oe,null,w.mode);return Oe.lanes=L,Oe.return=w,Oe}finally{}}}var In=wm(!0),Om=wm(!1),cn=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function co(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function rn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function on(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(De&2)!==0){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,t=Bi(e),fm(e,null,l),t}return Hi(e,n,t,l),Bi(e)}function Du(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,vd(e,l)}}function ro(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var s={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?a=u=s:u=u.next=s,l=l.next}while(l!==null);u===null?a=u=t:u=u.next=t}else a=u=t;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:u,shared:n.shared,callbacks:n.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var oo=!1;function Mu(){if(oo){var e=za;if(e!==null)throw e}}function Uu(e,t,l,n){oo=!1;var a=e.updateQueue;cn=!1;var u=a.firstBaseUpdate,s=a.lastBaseUpdate,h=a.shared.pending;if(h!==null){a.shared.pending=null;var x=h,O=x.next;x.next=null,s===null?u=O:s.next=O,s=x;var j=e.alternate;j!==null&&(j=j.updateQueue,h=j.lastBaseUpdate,h!==s&&(h===null?j.firstBaseUpdate=O:h.next=O,j.lastBaseUpdate=x))}if(u!==null){var Y=a.baseState;s=0,j=O=x=null,h=u;do{var _=h.lane&-536870913,R=_!==h.lane;if(R?(we&_)===_:(n&_)===_){_!==0&&_===Qn&&(oo=!0),j!==null&&(j=j.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var $=e,ue=h;_=t;var be=l;switch(ue.tag){case 1:if($=ue.payload,typeof $=="function"){Y=$.call(be,Y,_);break e}Y=$;break e;case 3:$.flags=$.flags&-65537|128;case 0:if($=ue.payload,_=typeof $=="function"?$.call(be,Y,_):$,_==null)break e;Y=U({},Y,_);break e;case 2:cn=!0}}_=h.callback,_!==null&&(e.flags|=64,R&&(e.flags|=8192),R=a.callbacks,R===null?a.callbacks=[_]:R.push(_))}else R={lane:_,tag:h.tag,payload:h.payload,callback:h.callback,next:null},j===null?(O=j=R,x=Y):j=j.next=R,s|=_;if(h=h.next,h===null){if(h=a.shared.pending,h===null)break;R=h,h=R.next,R.next=null,a.lastBaseUpdate=R,a.shared.pending=null}}while(!0);j===null&&(x=Y),a.baseState=x,a.firstBaseUpdate=O,a.lastBaseUpdate=j,u===null&&(a.shared.lanes=0),yn|=s,e.lanes=s,e.memoizedState=Y}}function Am(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function zm(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;eu?u:8;var s=ae.T,h={};h.types=s!==null?s.types:null,ae.T=h,zo(e,!1,t,l);try{var x=a(),O=ae.S;if(O!==null&&O(h,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var j=qb(x,n);Lu(e,t,j,Xt(e))}else Lu(e,t,n,Xt(e))}catch(Y){Lu(e,t,{then:function(){},status:"rejected",reason:Y},Xt())}finally{fe.p=u,s!==null&&h.types!==null&&(s.types=h.types),ae.T=s}}function Jb(){}function Oo(e,t,l,n){if(e.tag!==5)throw Error(o(476));var a=rh(e).queue;ch(e,a,t,Mt,l===null?Jb:function(){return oh(e),l(n)})}function rh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Mt,baseState:Mt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gl,lastRenderedState:Mt},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function oh(e){var t=rh(e);t.next===null&&(t=e.alternate.memoizedState),Lu(e,t.next.queue,{},Xt())}function Ao(){return mt(eu)}function sh(){return Ie().memoizedState}function fh(){return Ie().memoizedState}function Ib(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Xt();e=rn(l);var n=on(t,e,l);n!==null&&(Rt(n,t,l),Du(n,t,l)),t={cache:lo()},e.payload=t;return}t=t.return}}function Fb(e,t,l){var n=Xt();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},uc(e)?mh(t,l):(l=Kr(e,t,l,n),l!==null&&(Rt(l,e,n),hh(l,t,n)))}function dh(e,t,l){var n=Xt();Lu(e,t,l,n)}function Lu(e,t,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(uc(e))mh(t,a);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var s=t.lastRenderedState,h=u(s,l);if(a.hasEagerState=!0,a.eagerState=h,Lt(h,s))return Hi(e,t,a,0),Le===null&&Ui(),!1}catch{}finally{}if(l=Kr(e,t,a,n),l!==null)return Rt(l,e,n),hh(l,t,n),!0}return!1}function zo(e,t,l,n){if(n={lane:2,revertLane:xs(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},uc(e)){if(t)throw Error(o(479))}else t=Kr(e,l,n,2),t!==null&&Rt(t,e,2)}function uc(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function mh(e,t){Da=Pi=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function hh(e,t,l){if((l&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,vd(e,l)}}var ic={readContext:mt,use:tc,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useLayoutEffect:Ke,useInsertionEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useSyncExternalStore:Ke,useId:Ke,useHostTransitionStatus:Ke,useFormState:Ke,useActionState:Ke,useOptimistic:Ke,useMemoCache:Ke,useCacheRefresh:Ke,useEffectEvent:Ke},vh={readContext:mt,use:tc,useCallback:function(e,t){return Nt().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:Pm,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,nc(4194308,4,lh.bind(null,t,e),l)},useLayoutEffect:function(e,t){return nc(4194308,4,e,t)},useInsertionEffect:function(e,t){nc(4,2,e,t)},useMemo:function(e,t){var l=Nt();t=t===void 0?null:t;var n=e();if(Fn){Pl(!0);try{e()}finally{Pl(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=Nt();if(l!==void 0){var a=l(t);if(Fn){Pl(!0);try{l(t)}finally{Pl(!1)}}}else a=t;return n.memoizedState=n.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},n.queue=e,e=e.dispatch=Fb.bind(null,pe,e),[n.memoizedState,e]},useRef:function(e){var t=Nt();return e={current:e},t.memoizedState=e},useState:function(e){e=No(e);var t=e.queue,l=dh.bind(null,pe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:_o,useDeferredValue:function(e,t){var l=Nt();return wo(l,e,t)},useTransition:function(){var e=No(!1);return e=ch.bind(null,pe,e.queue,!0,!1),Nt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=pe,a=Nt();if(Ee){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),Le===null)throw Error(o(349));(we&127)!==0||Hm(n,t,l)}a.memoizedState=l;var u={value:l,getSnapshot:t};return a.queue=u,Pm(km.bind(null,n,u,e),[e]),n.flags|=2048,Ua(9,{destroy:void 0},Bm.bind(null,n,u,l,t),null),l},useId:function(){var e=Nt(),t=Le.identifierPrefix;if(Ee){var l=pl,n=gl;l=(n&~(1<<32-Bt(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Wi++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof n.is=="string"?s.createElement("select",{is:n.is}):s.createElement("select"),n.multiple?u.multiple=!0:n.size&&(u.size=n.size);break;default:u=typeof n.is=="string"?s.createElement(a,{is:n.is}):s.createElement(a)}}u[dt]=t,u[_t]=n;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)u.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=u;e:switch(gt(u,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&ql(t)}}return qe(t),t.subtreeFlags&=-33554433,Vo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&ql(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=Fl.current,Aa(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,a=it,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}e[dt]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||kv(e.nodeValue,l)),e||nn(t,!0)}else e=Pu(e).createTextNode(n),e[dt]=t,t.stateNode=e}return qe(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=Aa(t),l!==null){if(e===null){if(!n)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[dt]=t}else Yn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),e=!1}else l=Wr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Gt(t),t):(Gt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return qe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Aa(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(o(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(317));a[dt]=t}else Yn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),a=!1}else a=Wr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Gt(t),t):(Gt(t),null)}return Gt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==a&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),dc(t,t.updateQueue),qe(t),null);case 4:return ma(),e===null&&Cs(t.stateNode.containerInfo),t.flags|=67108864,qe(t),null;case 10:return kl(t.type),qe(t),null;case 19:if(ho(t),n=t.memoizedState,n===null)return qe(t),null;if(a=(t.flags&128)!==0,u=n.rendering,u===null)if(a)Yu(n,!1);else{if(Je!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=$i(e),u!==null){for(t.flags|=128,Yu(n,!1),e=u.updateQueue,t.updateQueue=e,dc(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)dm(l,e),l=l.sibling;return Hu(t,vt.current&1|2),Ee&&Hl(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Ut()>Cc&&(t.flags|=128,a=!0,Yu(n,!1),t.lanes=4194304)}else{if(!a)if(e=$i(u),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,dc(t,e),Yu(n,!0),n.tail===null&&n.tailMode!=="collapsed"&&n.tailMode!=="visible"&&!u.alternate&&!Ee)return qe(t),null}else 2*Ut()-n.renderingStartTime>Cc&&l!==536870912&&(t.flags|=128,a=!0,Yu(n,!1),t.lanes=4194304);n.isBackwards?(u.sibling=t.child,t.child=u):(e=n.last,e!==null?e.sibling=u:t.child=u,n.last=u)}if(n.tail!==null){e=n.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Ut(),e.sibling=null,u=vt.current,u=a?u&1|2:u&1,n.tailMode==="visible"||n.tailMode==="collapsed"||!l||Ee?Hu(t,u):(l=u,Ge(ht,t),Ge(vt,l),St===null&&(St=t)),Ee&&Hl(t,n.treeForkCount),e}return qe(t),null;case 22:case 23:return Gt(t),fo(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(l&536870912)!==0&&(t.flags&128)===0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),l=t.updateQueue,l!==null&&dc(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==l&&(t.flags|=2048),e!==null&&ft(Zn),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),kl($e),qe(t),null;case 25:return null;case 30:return t.flags|=33554432,qe(t),null}throw Error(o(156,t.tag))}function n1(e,t){switch($r(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return kl($e),ma(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return gi(t),null;case 31:if(t.memoizedState!==null){if(Gt(t),t.alternate===null)throw Error(o(340));Yn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Gt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Yn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ho(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ma(),null;case 10:return kl(t.type),null;case 22:case 23:return Gt(t),fo(),e!==null&&ft(Zn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return kl($e),null;case 25:return null;default:return null}}function Gh(e,t){switch($r(t),t.tag){case 3:kl($e),ma();break;case 26:case 27:case 5:gi(t);break;case 4:ma();break;case 31:t.memoizedState!==null&&Gt(t);break;case 13:Gt(t);break;case 19:ho(t);break;case 10:kl(t.type);break;case 22:case 23:Gt(t),fo(),e!==null&&ft(Zn);break;case 24:kl($e)}}function qu(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var a=n.next;l=a;do{if((l.tag&e)===e){n=void 0;var u=l.create,s=l.inst;n=u(),s.destroy=n}l=l.next}while(l!==a)}}catch(h){He(t,t.return,h)}}function mn(e,t,l){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var u=a.next;n=u;do{if((n.tag&e)===e){var s=n.inst,h=s.destroy;if(h!==void 0){s.destroy=void 0,a=t;var x=l,O=h;try{O()}catch(j){He(a,x,j)}}}n=n.next}while(n!==u)}}catch(j){He(t,t.return,j)}}function Yh(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{zm(t,l)}catch(n){He(e,e.return,n)}}}function qh(e,t,l){l.props=$n(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){He(e,t,n)}}function bl(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:var a=e.stateNode,u=Dl(e.memoizedProps,a);(a.ref===null||a.ref.name!==u)&&(a.ref=Iv(u)),n=a.ref;break;case 7:if(e.stateNode===null){var s=new Qt(e);y(e.child,!1,K1,s,void 0,void 0),e.stateNode=s}n=e.stateNode;break;default:n=e.stateNode}typeof l=="function"?e.refCleanup=l(n):l.current=n}}catch(h){He(e,t,h)}}function yt(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){He(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(a){He(e,t,a)}else l.current=null}function mc(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l title"))),gt(n,t,l),n[dt]=e,ut(n),t=n;break e;case"link":if(u=dy("link","href",a).get(t+(l.href||""))){for(s=0;sbe&&(s=be,be=ue,ue=s);var w=em(h,ue),C=em(h,be);if(w&&C&&(R.rangeCount!==1||R.anchorNode!==w.node||R.anchorOffset!==w.offset||R.focusNode!==C.node||R.focusOffset!==C.offset)){var A=Y.createRange();A.setStart(w.node,w.offset),R.removeAllRanges(),ue>be?(R.addRange(A),R.extend(C.node,C.offset)):(A.setEnd(C.node,C.offset),R.addRange(A))}}}}for(Y=[],R=h;R=R.parentNode;)R.nodeType===1&&Y.push({element:R,left:R.scrollLeft,top:R.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;hl?32:l,ae.T=null,l=ss,ss=null;var u=dl,s=Tl;if(Qe=0,ta=dl=null,Tl=0,(De&6)!==0)throw Error(o(331));var h=De;if(De|=4,fv(u.current),rv(u,u.current,s,l),De=h,Iu(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(mu,u)}catch{}return!0}finally{fe.p=a,ae.T=n,_v(e,t)}}function wv(e,t,l){t=Ft(l,t),t=Do(e.stateNode,t,2),e=on(e,t,2),e!==null&&(vu(e,2),_l(e))}function He(e,t,l){if(e.tag===3)wv(e,e,l);else for(;t!==null;){if(t.tag===3){wv(t,e,l);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(gn===null||!gn.has(n))){e=Ft(l,e),l=Nh(2),n=on(t,l,2),n!==null&&(Ch(l,n,t,e),vu(n,2),_l(n));break}}t=t.return}}function gs(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new c1;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(l)||(cs=!0,a.add(l),e=v1.bind(null,e,t,l),t.then(e,e))}function v1(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Le===e&&(we&l)===l&&((Je===4||Je===3&&(we&62914560)===we&&300>Ut()-Nc)&&(De&2)===0?Za(e,0):Ec|=l,Ya===we&&(Ya=0)),_l(e)}function Ov(e,t){t===0&&(t=md()),e=Ln(e,t),e!==null&&(vu(e,t),_l(e))}function y1(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Ov(e,l)}function g1(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(l=a.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),Ov(e,l)}function p1(e,t){return br(e,t)}var Ja=null,Ia=null,ps=!1,Rc=!1,bs=!1,bn=0;function _l(e){e!==Ia&&e.next===null&&(Ia===null?Ja=Ia=e:Ia=Ia.next=e),Rc=!0,ps||(ps=!0,x1())}function Iu(e,t){if(!bs&&Rc){bs=!0;do for(var l=!1,n=Ja;n!==null;){if(e!==0){var a=n.pendingLanes;if(a===0)var u=0;else{var s=n.suspendedLanes,h=n.pingedLanes;u=(1<<31-Bt(42|e)+1)-1,u&=a&~(s&~h),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,jv(n,u))}else u=we,u=Ei(n,n===Le?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||hu(n,u)||(l=!0,jv(n,u));n=n.next}while(l);bs=!1}}function b1(){Av()}function Av(){Rc=ps=!1;var e=0;bn!==0&&R1()&&(e=bn);for(var t=Ut(),l=null,n=Ja;n!==null;){var a=n.next,u=zv(n,t);u===0?(n.next=null,l===null?Ja=a:l.next=a,a===null&&(Ia=l)):(l=n,(e!==0||(u&3)!==0)&&(Rc=!0)),n=a}Qe!==0&&Qe!==5||Iu(e),bn!==0&&(bn=0)}function zv(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,u=e.pendingLanes&-62914561;0h)break;var j=x.transferSize,Y=x.initiatorType;j&&Lv(Y)&&(x=x.responseEnd,s+=j*(xHc){ue.length=$;break}A=new Promise(B1.bind(A)),ue.push(A)}}}if(0"u"?null:document;function ry(e,t,l){var n=$a;if(n&&typeof t=="string"&&t){var a=Jt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),cy.has(a)||(cy.add(a),e={rel:e,crossOrigin:l,href:t},n.querySelector(a)===null&&(t=n.createElement("link"),gt(t,"link",e),ut(t),n.head.appendChild(t)))}}function lx(e){Xl.D(e),ry("dns-prefetch",e,null)}function nx(e,t){Xl.C(e,t),ry("preconnect",e,t)}function ax(e,t,l){Xl.L(e,t,l);var n=$a;if(n&&e&&t){var a='link[rel="preload"][as="'+Jt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+Jt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+Jt(l.imageSizes)+'"]')):a+='[href="'+Jt(e)+'"]';var u=a;switch(t){case"style":u=Pa(e);break;case"script":u=Wa(e)}if(!(ll.has(u)||(e=U({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),ll.set(u,e),n.querySelector(a)!==null||t==="style"&&n.querySelector(ei(u))||t==="script"&&n.querySelector(ti(u))))){var s=n.createElement("link");gt(s,"link",e),t==="style"&&(s[Ni]=!0,s.onload=s.onerror=function(){Sd(s)}),ut(s),n.head.appendChild(s)}}}function ux(e,t){Xl.m(e,t);var l=$a;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Jt(n)+'"][href="'+Jt(e)+'"]',u=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Wa(e)}if(!ll.has(u)&&(e=U({rel:"modulepreload",href:e},t),ll.set(u,e),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ti(u)))return}n=l.createElement("link"),gt(n,"link",e),ut(n),l.head.appendChild(n)}}}function ix(e,t,l){Xl.S(e,t,l);var n=$a;if(n&&e){var a=ya(n).hoistableStyles,u=Pa(e);t=t||"default";var s=a.get(u);if(!s){var h={loading:0,preload:null};if(s=n.querySelector(ei(u)))h.loading=5;else{e=U({rel:"stylesheet",href:e,"data-precedence":t},l),(l=ll.get(u))&&Gs(e,l);var x=s=n.createElement("link");ut(x),gt(x,"link",e),x._p=new Promise(function(O,j){x.onload=O,x.onerror=j}),x.addEventListener("load",function(){h.loading|=1}),x.addEventListener("error",function(){h.loading|=2}),h.loading|=4,Mc(s,t,n)}s={type:"stylesheet",instance:s,count:1,state:h},a.set(u,s)}}}function cx(e,t){Xl.X(e,t);var l=$a;if(l&&e){var n=ya(l).hoistableScripts,a=Wa(e),u=n.get(a);u||(u=l.querySelector(ti(a)),u||(e=U({src:e,async:!0},t),(t=ll.get(a))&&Ys(e,t),u=l.createElement("script"),ut(u),gt(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(a,u))}}function rx(e,t){Xl.M(e,t);var l=$a;if(l&&e){var n=ya(l).hoistableScripts,a=Wa(e),u=n.get(a);u||(u=l.querySelector(ti(a)),u||(e=U({src:e,async:!0,type:"module"},t),(t=ll.get(a))&&Ys(e,t),u=l.createElement("script"),ut(u),gt(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(a,u))}}function oy(e,t,l,n){var a=(a=Fl.current)?Wu(a):null;if(!a)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Pa(l.href),t=ya(a).hoistableStyles,n=t.get(l),n||(n={type:"style",instance:null,count:0,state:null},t.set(l,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Pa(l.href);var u=ya(a).hoistableStyles,s=u.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,s),(u=a.querySelector(ei(e)))?u._p||(s.instance=u,s.state.loading=5):(u=ll.get(e),u||(u={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},ll.set(e,u)),ox(a,e,u,s.state))),t&&n===null)throw Error(o(528,""));return s}if(t&&n!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=Wa(l),t=ya(a).hoistableScripts,n=t.get(l),n||(n={type:"script",instance:null,count:0,state:null},t.set(l,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Pa(e){return'href="'+Jt(e)+'"'}function ei(e){return'link[rel="stylesheet"]['+e+"]"}function sy(e){return U({},e,{"data-precedence":e.precedence,precedence:null})}function ox(e,t,l,n){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Ni]!==!0){n.loading=1;return}}else t=e.createElement("link"),t[Ni]=!0,t.onload=t.onerror=Sd.bind(null,t),gt(t,"link",l),ut(t),e.head.appendChild(t);n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2})}function Wa(e){return'[src="'+Jt(e)+'"]'}function ti(e){return"script[async]"+e}function fy(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Jt(l.href)+'"]');if(n)return t.instance=n,ut(n),n;var a=U({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),ut(n),gt(n,"style",a),Mc(n,l.precedence,e),t.instance=n;case"stylesheet":a=Pa(l.href);var u=e.querySelector(ei(a));if(u)return t.state.loading|=4,t.instance=u,ut(u),u;n=sy(l),(a=ll.get(a))&&Gs(n,a),u=(e.ownerDocument||e).createElement("link"),ut(u);var s=u;return s._p=new Promise(function(h,x){s.onload=h,s.onerror=x}),gt(u,"link",n),t.state.loading|=4,Mc(u,l.precedence,e),t.instance=u;case"script":return u=Wa(l.src),(a=e.querySelector(ti(u)))?(t.instance=a,ut(a),a):(n=l,(a=ll.get(u))&&(n=U({},l),Ys(n,a)),e=e.ownerDocument||e,a=e.createElement("script"),ut(a),gt(a,"link",n),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Mc(n,l.precedence,e));return t.instance}function Mc(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,u=a,s=0;s title"):null)}function sx(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function my(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function hy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function vy(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function yy(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=vy(t),e.suspenseyImages.push(t)),e=mx.bind(e),t.decode().then(e,e))}function fx(e,t,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var a=Pa(n.href),u=t.querySelector(ei(a));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=li.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,ut(u);return}u=t.ownerDocument||t,n=sy(n),(a=ll.get(a))&&Gs(n,a),u=u.createElement("link"),ut(u);var s=u;s._p=new Promise(function(h,x){s.onload=h,s.onerror=x}),gt(u,"link",n),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=li.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Hc=0;function dx(e,t){return e.stylesheets&&e.count===0&&kc(e,e.stylesheets),0Hc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function gy(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)kc(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function li(){this.count--,gy(this)}function mx(){this.imgCount--,gy(this)}var Bc=null;function kc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Bc=new Map,t.forEach(hx,e),Bc=null,li.call(e))}function hx(e,t){if(!(t.state.loading&4)){var l=Bc.get(e);if(l)var n=l.get(null);else{l=new Map,Bc.set(e,l);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),Ps.exports=zx(),Ps.exports}var jx=Rx();const Dx=pg(jx),Xy=i=>{let c;const r=new Set,o=(b,N)=>{const y=typeof b=="function"?b(c):b;if(!Object.is(y,c)){const T=c;c=N??(typeof y!="object"||y===null)?y:Object.assign({},c,y),r.forEach(B=>B(c,T))}},f=()=>c,p={setState:o,getState:f,getInitialState:()=>E,subscribe:b=>(r.add(b),()=>r.delete(b))},E=c=i(o,f,p);return p},Mx=(i=>i?Xy(i):Xy),Ux=i=>i;function Hx(i,c=Ux){const r=si.useSyncExternalStore(i.subscribe,si.useCallback(()=>c(i.getState()),[i,c]),()=>c(i.getInitialState()));return si.useDebugValue(r),r}const Qy=i=>{const c=Mx(i),r=o=>Hx(c,o);return Object.assign(r,c),r},Bx=(i=>i?Qy(i):Qy),kx=()=>typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,xg=i=>{const c=i==="system"?kx():i==="dark",r=c?"catppuccin":"zinc-light";return typeof document<"u"&&document.documentElement.setAttribute("data-theme",r),c?"dark":"light"},Qc=localStorage.getItem("hl_theme_v2"),Sg=Qc==="light"||Qc==="dark"||Qc==="system"?Qc:"system",Lx=xg(Sg),Gx=localStorage.getItem("hl_route_mode")||"auto",Yx=localStorage.getItem("hl_layout_preset")||"homepage-3col",qx=typeof window<"u"&&window.location.pathname.startsWith("/storybook")?"storybook":"dashboard",jn=Bx((i,c)=>({theme:Sg,resolvedTheme:Lx,routeMode:Gx,layoutPreset:Yx,viewMode:qx,showAgyModal:!1,showCmdPalette:!1,toast:"",actionLoading:!1,telemetry:{mini:{chip:"Apple M6 (12核)",ip:"192.168.31.164",tailscale_ip:"100.108.205.40",cpu_pct:6.5,load_1m:.85,mem_used_gb:11.8,mem_total_gb:24,mem_pct:49.2,disk_used_gb:59.9,disk_total_gb:460.4,disk_pct:13,uptime:"运行中",agy_tmux:!0},nas:{ip:"192.168.31.185",online:!0,mounted:!0,total_tb:19.94,used_tb:3.36,free_tb:16.58,pct:16.8,latest_backup:"11-06 23:17"},network:{home_wan_ip:"124.90.142.21",ai_policy:"Ai平台 → 狮城节点",sg_node:"233boy-sea",sg_egress_ip:"104.43.105.243",sg_delay_ms:68},services:{agy:!0,vaultwarden:!0,nas:!0,clash:!0,router:!0,uptime:!0}},setTheme:r=>{localStorage.setItem("hl_theme_v2",r);const o=xg(r);i({theme:r,resolvedTheme:o})},toggleTheme:()=>{const{resolvedTheme:r,setTheme:o}=c();o(r==="dark"?"light":"dark")},setRouteMode:r=>{localStorage.setItem("hl_route_mode",r),i({routeMode:r})},setLayoutPreset:r=>{localStorage.setItem("hl_layout_preset",r),i({layoutPreset:r})},setViewMode:r=>{if(typeof window<"u"){const o=r==="storybook"?"/storybook":"/";window.history.pushState({},"",o)}i({viewMode:r})},setShowAgyModal:r=>i({showAgyModal:r}),setShowCmdPalette:r=>i({showCmdPalette:r}),showToast:r=>{i({toast:r}),setTimeout(()=>{c().toast===r&&i({toast:""})},3e3)},fetchTelemetry:async()=>{try{const r=await fetch("/api/telemetry");if(r.ok){const o=await r.json();i({telemetry:o})}}catch{}},triggerAction:async(r,o)=>{const{showToast:f,fetchTelemetry:m}=c();i({actionLoading:!0}),f(o);try{const p=await(await fetch(`/api/action/${r}`,{method:"POST"})).json();f(p.message||"操作已完成"),await m()}catch{f("请求失败,请稍后重试")}finally{i({actionLoading:!1})}},copyCmd:async(r,o)=>{const{showToast:f}=c();try{await navigator.clipboard.writeText(r),f(`已复制「${o}」: ${r}`)}catch{f(r)}},getEffectiveMode:()=>{const{routeMode:r}=c();if(r!=="auto")return r;const o=window.location.hostname;return o.startsWith("192.168.")||o.startsWith("100.")||o==="localhost"?"lan":o.includes(".home.961504.xyz")||window.location.port==="10443"?"home10443":"edge443"}}));typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{const i=jn.getState();i.theme==="system"&&i.setTheme("system")});/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Vx=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Eg=(...i)=>i.filter((c,r,o)=>!!c&&c.trim()!==""&&o.indexOf(c)===r).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Xx={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.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Qx=g.forwardRef(({color:i="currentColor",size:c=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:f="",children:m,iconNode:v,...p},E)=>g.createElement("svg",{ref:E,...Xx,width:c,height:c,stroke:i,strokeWidth:o?Number(r)*24/Number(c):r,className:Eg("lucide",f),...p},[...v.map(([b,N])=>g.createElement(b,N)),...Array.isArray(m)?m:[m]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xt=(i,c)=>{const r=g.forwardRef(({className:o,...f},m)=>g.createElement(Qx,{ref:m,iconNode:c,className:Eg(`lucide-${Vx(i)}`,o),...f}));return r.displayName=`${i}`,r};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Zx=[["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"}]],Ng=xt("BookOpen",Zx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Kx=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Jx=xt("Check",Kx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ix=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Fx=xt("EyeOff",Ix);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $x=[["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"}]],Px=xt("Eye",$x);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Wx=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Zy=xt("KeyRound",Wx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const eS=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],tS=xt("Layers",eS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const lS=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],nS=xt("LayoutGrid",lS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const aS=[["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"}]],uS=xt("Lock",aS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const iS=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],cS=xt("Moon",iS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const rS=[["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:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]],oS=xt("Palette",rS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const sS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],fS=xt("PanelsTopLeft",sS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const dS=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Rf=xt("Search",dS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mS=[["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"}]],hS=xt("ShieldCheck",mS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vS=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],yS=xt("Sparkles",vS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const gS=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],pS=xt("Sun",gS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bS=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],jf=xt("Terminal",bS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xS=[["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"}]],SS=xt("User",xS);var ES=Object.defineProperty,Df=(i,c)=>ES(i,"name",{value:c,configurable:!0});function vf(i,c){if(typeof i=="function")return i(c);i!=null&&(i.current=c)}Df(vf,"setRef");function ua(...i){return c=>{let r=!1;const o=i.map(f=>{const m=vf(f,c);return!r&&typeof m=="function"&&(r=!0),m});if(r)return()=>{for(let f=0;fNS(i,"name",{value:c,configurable:!0});function An(i){const c=g.forwardRef((r,o)=>{let{children:f,...m}=r,v=null,p=!1;const E=[];f=Ag(f),g.Children.forEach(f,T=>{var B;if(wg(T)){p=!0;const D=T;let M="child"in D.props?D.props.child:D.props.children;for(;Mf(M)&&typeof ar=="function";)M=ar(M._payload);v=_S(D,M),E.push((B=v==null?void 0:v.props)==null?void 0:B.children)}else E.push(T)}),v?v=g.cloneElement(v,void 0,E):!p&&g.Children.count(f)===1&&g.isValidElement(f)&&(v=f);const b=v?_g(v):void 0,N=Dt(o,b);if(!v){if(f||f===0)throw new Error(p?AS(i):OS(i));return f}const y=Tg(m,v.props??{});return v.type!==g.Fragment&&(y.ref=o?N:b),g.cloneElement(v,y)});return c.displayName=`${i}.Slot`,c}Kt(An,"createSlot");var CS=An("Slot"),Cg=Symbol.for("radix.slottable");function TS(i){const c=Kt(r=>"child"in r?r.children(r.child):r.children,"Slottable");return c.displayName=`${i}.Slottable`,c.__radixId=Cg,c}Kt(TS,"createSlottable");var _S=Kt((i,c)=>"child"in i.props?g.isValidElement(c)?g.cloneElement(c,void 0,i.props.children(c.props.children)):null:g.isValidElement(c)?c:null,"getSlottableElementFromSlottable");function Tg(i,c){const r={...c};for(const o in c){const f=i[o],m=c[o];/^on[A-Z]/.test(o)?f&&m?r[o]=(...p)=>{const E=m(...p);return f(...p),E}:f&&(r[o]=f):o==="style"?r[o]={...f,...m}:o==="className"?r[o]=[f,m].filter(Boolean).join(" "):o==="aria-describedby"&&(r[o]=zg(m,f))}return{...i,...r}}Kt(Tg,"mergeProps");function _g(i){var o,f;let c=(o=Object.getOwnPropertyDescriptor(i.props,"ref"))==null?void 0:o.get,r=c&&"isReactWarning"in c&&c.isReactWarning;return r?i.ref:(c=(f=Object.getOwnPropertyDescriptor(i,"ref"))==null?void 0:f.get,r=c&&"isReactWarning"in c&&c.isReactWarning,r?i.props.ref:i.props.ref||i.ref)}Kt(_g,"getElementRef");function wg(i){return g.isValidElement(i)&&typeof i.type=="function"&&"__radixId"in i.type&&i.type.__radixId===Cg}Kt(wg,"isSlottable");var wS=Symbol.for("react.lazy");function Mf(i){return i!=null&&typeof i=="object"&&"$$typeof"in i&&i.$$typeof===wS&&"_payload"in i&&Og(i._payload)}Kt(Mf,"isLazyComponent");function Og(i){return typeof i=="object"&&i!==null&&"then"in i}Kt(Og,"isPromiseLike");function Ag(i){let c=i;for(;Mf(c)&&typeof ar=="function";)c=ar(c._payload);return c}Kt(Ag,"useUnwrappedLazy");function zg(...i){const c=new Set;for(const r of i)if(typeof r=="string")for(const o of String(r).trim().split(/\s+/))o&&c.add(o);return c.size>0?Array.from(c).join(" "):void 0}Kt(zg,"concatAriaDescribedby");var OS=Kt(i=>`${i} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),AS=Kt(i=>`${i} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),ar=ra[" use ".trim().toString()];function Rg(i){var c,r,o="";if(typeof i=="string"||typeof i=="number")o+=i;else if(typeof i=="object")if(Array.isArray(i)){var f=i.length;for(c=0;ctypeof i=="boolean"?`${i}`:i===0?"0":i,Jy=jg,Dg=(i,c)=>r=>{var o;if((c==null?void 0:c.variants)==null)return Jy(i,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:f,defaultVariants:m}=c,v=Object.keys(f).map(b=>{const N=r==null?void 0:r[b],y=m==null?void 0:m[b];if(N===null)return null;const T=Ky(N)||Ky(y);return f[b][T]}),p=r&&Object.entries(r).reduce((b,N)=>{let[y,T]=N;return T===void 0||(b[y]=T),b},{}),E=c==null||(o=c.compoundVariants)===null||o===void 0?void 0:o.reduce((b,N)=>{let{class:y,className:T,...B}=N;return Object.entries(B).every(D=>{let[M,H]=D;return Array.isArray(H)?H.includes({...m,...p}[M]):{...m,...p}[M]===H})?[...b,y,T]:b},[]);return Jy(i,v,E,r==null?void 0:r.class,r==null?void 0:r.className)},zS=(i,c)=>{const r=new Array(i.length+c.length);for(let o=0;o({classGroupId:i,validator:c}),Mg=(i=new Map,c=null,r)=>({nextPart:i,validators:c,classGroupId:r}),ur="-",Iy=[],jS="arbitrary..",DS=i=>{const c=US(i),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=i;return{getClassGroupId:v=>{if(v.startsWith("[")&&v.endsWith("]"))return MS(v);const p=v.split(ur),E=p[0]===""&&p.length>1?1:0;return Ug(p,E,c)},getConflictingClassGroupIds:(v,p)=>{if(p){const E=o[v],b=r[v];return E?b?zS(b,E):E:b||Iy}return r[v]||Iy}}},Ug=(i,c,r)=>{if(i.length-c===0)return r.classGroupId;const f=i[c],m=r.nextPart.get(f);if(m){const b=Ug(i,c+1,m);if(b)return b}const v=r.validators;if(v===null)return;const p=c===0?i.join(ur):i.slice(c).join(ur),E=v.length;for(let b=0;bi.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const c=i.slice(1,-1),r=c.indexOf(":"),o=c.slice(0,r);return o?jS+o:void 0})(),US=i=>{const{theme:c,classGroups:r}=i;return HS(r,c)},HS=(i,c)=>{const r=Mg();for(const o in i){const f=i[o];Uf(f,r,o,c)}return r},Uf=(i,c,r,o)=>{const f=i.length;for(let m=0;m{if(typeof i=="string"){kS(i,c,r);return}if(typeof i=="function"){LS(i,c,r,o);return}GS(i,c,r,o)},kS=(i,c,r)=>{const o=i===""?c:Hg(c,i);o.classGroupId=r},LS=(i,c,r,o)=>{if(YS(i)){Uf(i(o),c,r,o);return}c.validators===null&&(c.validators=[]),c.validators.push(RS(r,i))},GS=(i,c,r,o)=>{const f=Object.entries(i),m=f.length;for(let v=0;v{let r=i;const o=c.split(ur),f=o.length;for(let m=0;m"isThemeGetter"in i&&i.isThemeGetter===!0,qS=i=>{if(i<1)return{get:()=>{},set:()=>{}};let c=0,r=Object.create(null),o=Object.create(null);const f=(m,v)=>{r[m]=v,c++,c>i&&(c=0,o=r,r=Object.create(null))};return{get(m){let v=r[m];if(v!==void 0)return v;if((v=o[m])!==void 0)return f(m,v),v},set(m,v){m in r?r[m]=v:f(m,v)}}},yf="!",Fy=":",VS=[],$y=(i,c,r,o,f)=>({modifiers:i,hasImportantModifier:c,baseClassName:r,maybePostfixModifierPosition:o,isExternal:f}),XS=i=>{const{prefix:c,experimentalParseClassName:r}=i;let o=f=>{const m=[];let v=0,p=0,E=0,b;const N=f.length;for(let M=0;ME?b-E:void 0;return $y(m,B,T,D)};if(c){const f=c+Fy,m=o;o=v=>v.startsWith(f)?m(v.slice(f.length)):$y(VS,!1,v,void 0,!0)}if(r){const f=o;o=m=>r({className:m,parseClassName:f})}return o},QS=i=>{const c=new Map;return i.orderSensitiveModifiers.forEach((r,o)=>{c.set(r,1e6+o)}),r=>{const o=[];let f=[];for(let m=0;m0&&(f.sort(),o.push(...f),f=[]),o.push(v)):f.push(v)}return f.length>0&&(f.sort(),o.push(...f)),o}},ZS=i=>({cache:qS(i.cacheSize),parseClassName:XS(i),sortModifiers:QS(i),postfixLookupClassGroupIds:KS(i),...DS(i)}),KS=i=>{const c=Object.create(null),r=i.postfixLookupClassGroups;if(r)for(let o=0;o{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:f,sortModifiers:m,postfixLookupClassGroupIds:v}=c,p=[],E=i.trim().split(JS);let b="";for(let N=E.length-1;N>=0;N-=1){const y=E[N],{isExternal:T,modifiers:B,hasImportantModifier:D,baseClassName:M,maybePostfixModifierPosition:H}=r(y);if(T){b=y+(b.length>0?" "+b:b);continue}let Z=!!H,Q;if(Z){const U=M.substring(0,H);Q=o(U);const k=Q&&v[Q]?o(M):void 0;k&&k!==Q&&(Q=k,Z=!1)}else Q=o(M);if(!Q){if(!Z){b=y+(b.length>0?" "+b:b);continue}if(Q=o(M),!Q){b=y+(b.length>0?" "+b:b);continue}Z=!1}const V=B.length===0?"":B.length===1?B[0]:m(B).join(":"),P=D?V+yf:V,F=P+Q;if(p.indexOf(F)>-1)continue;p.push(F);const G=f(Q,Z);for(let U=0;U0?" "+b:b)}return b},FS=(...i)=>{let c=0,r,o,f="";for(;c{if(typeof i=="string")return i;let c,r="";for(let o=0;o{let r,o,f,m;const v=E=>{const b=c.reduce((N,y)=>y(N),i());return r=ZS(b),o=r.cache.get,f=r.cache.set,m=p,p(E)},p=E=>{const b=o(E);if(b)return b;const N=IS(E,r);return f(E,N),N};return m=v,(...E)=>m(FS(...E))},PS=[],nt=i=>{const c=r=>r[i]||PS;return c.isThemeGetter=!0,c.themeKey=i,c},kg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Lg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,WS=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,e2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,t2=/\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$/,l2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,n2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,a2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_n=i=>WS.test(i),Ne=i=>!!i&&!Number.isNaN(Number(i)),wl=i=>!!i&&Number.isInteger(Number(i)),lf=i=>i.endsWith("%")&&Ne(i.slice(0,-1)),Ql=i=>e2.test(i),Gg=()=>!0,u2=i=>t2.test(i)&&!l2.test(i),Hf=()=>!1,i2=i=>n2.test(i),c2=i=>a2.test(i),r2=i=>!le(i)&&!ne(i),o2=i=>i.startsWith("@container")&&(i[10]==="/"&&i[11]!==void 0||i[11]==="s"&&i[16]!==void 0&&i.startsWith("-size/",10)||i[11]==="n"&&i[18]!==void 0&&i.startsWith("-normal/",10)),s2=i=>Dn(i,Vg,Hf),le=i=>kg.test(i),na=i=>Dn(i,Xg,u2),Py=i=>Dn(i,p2,Ne),f2=i=>Dn(i,Zg,Gg),d2=i=>Dn(i,Qg,Hf),Wy=i=>Dn(i,Yg,Hf),m2=i=>Dn(i,qg,c2),Zc=i=>Dn(i,Kg,i2),ne=i=>Lg.test(i),ri=i=>oa(i,Xg),h2=i=>oa(i,Qg),eg=i=>oa(i,Yg),v2=i=>oa(i,Vg),y2=i=>oa(i,qg),Kc=i=>oa(i,Kg,!0),g2=i=>oa(i,Zg,!0),Dn=(i,c,r)=>{const o=kg.exec(i);return o?o[1]?c(o[1]):r(o[2]):!1},oa=(i,c,r=!1)=>{const o=Lg.exec(i);return o?o[1]?c(o[1]):r:!1},Yg=i=>i==="position"||i==="percentage",qg=i=>i==="image"||i==="url",Vg=i=>i==="length"||i==="size"||i==="bg-size",Xg=i=>i==="length",p2=i=>i==="number",Qg=i=>i==="family-name",Zg=i=>i==="number"||i==="weight",Kg=i=>i==="shadow",b2=()=>{const i=nt("color"),c=nt("font"),r=nt("text"),o=nt("font-weight"),f=nt("tracking"),m=nt("leading"),v=nt("breakpoint"),p=nt("container"),E=nt("spacing"),b=nt("radius"),N=nt("shadow"),y=nt("inset-shadow"),T=nt("text-shadow"),B=nt("drop-shadow"),D=nt("blur"),M=nt("perspective"),H=nt("aspect"),Z=nt("ease"),Q=nt("animate"),V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...P(),ne,le],G=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],k=()=>[ne,le,E],ce=()=>[_n,"full","auto",...k()],xe=()=>[wl,"none","subgrid",ne,le],he=()=>["auto",{span:["full",wl,ne,le]},wl,ne,le],se=()=>[wl,"auto",ne,le],je=()=>["auto","min","max","fr",ne,le],ze=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ye=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...k()],W=()=>[_n,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],ie=()=>[p,_n,"screen","full","dvw","lvw","svw","min","max","fit",...k()],ge=()=>[_n,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],q=()=>[i,ne,le],Ce=()=>[...P(),eg,Wy,{position:[ne,le]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],re=()=>["auto","cover","contain",v2,s2,{size:[ne,le]}],S=()=>[lf,ri,na],z=()=>["","none","full",b,ne,le],J=()=>["",Ne,ri,na],I=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[Ne,lf,eg,Wy],Se=()=>["","none",D,ne,le],ae=()=>["none",Ne,ne,le],fe=()=>["none",Ne,ne,le],Mt=()=>[Ne,ne,le],Il=()=>[_n,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ql],breakpoint:[Ql],color:[Gg],container:[Ql],"drop-shadow":[Ql],ease:["in","out","in-out"],font:[r2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ql],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ql],shadow:[Ql],spacing:["px",Ne],text:[Ql],"text-shadow":[Ql],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_n,le,ne,H]}],container:["container"],"container-type":[{"@container":["","normal","size",ne,le]}],"container-named":[o2],columns:[{columns:[Ne,"auto",le,ne,p]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"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:F()}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ce()}],"inset-x":[{"inset-x":ce()}],"inset-y":[{"inset-y":ce()}],start:[{"inset-s":ce(),start:ce()}],end:[{"inset-e":ce(),end:ce()}],"inset-bs":[{"inset-bs":ce()}],"inset-be":[{"inset-be":ce()}],top:[{top:ce()}],right:[{right:ce()}],bottom:[{bottom:ce()}],left:[{left:ce()}],visibility:["visible","invisible","collapse"],z:[{z:[wl,"auto",ne,le]}],basis:[{basis:[_n,"full","auto",p,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,_n,"auto","initial","none",le]}],grow:[{grow:["",Ne,ne,le]}],shrink:[{shrink:["",Ne,ne,le]}],order:[{order:[wl,"first","last","none",ne,le]}],"grid-cols":[{"grid-cols":xe()}],"col-start-end":[{col:he()}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":xe()}],"row-start-end":[{row:he()}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":je()}],"auto-rows":[{"auto-rows":je()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...ze(),"normal"]}],"justify-items":[{"justify-items":[...ye(),"normal"]}],"justify-self":[{"justify-self":["auto",...ye()]}],"align-content":[{content:["normal",...ze()]}],"align-items":[{items:[...ye(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ye(),{baseline:["","last"]}]}],"place-content":[{"place-content":ze()}],"place-items":[{"place-items":[...ye(),"baseline"]}],"place-self":[{"place-self":["auto",...ye()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],"inline-size":[{inline:["auto",...ie()]}],"min-inline-size":[{"min-inline":["auto",...ie()]}],"max-inline-size":[{"max-inline":["none",...ie()]}],"block-size":[{block:["auto",...ge()]}],"min-block-size":[{"min-block":["auto",...ge()]}],"max-block-size":[{"max-block":["none",...ge()]}],w:[{w:[p,"screen",...W()]}],"min-w":[{"min-w":[p,"screen","none",...W()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[v]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh","none",...W()]}],"font-size":[{text:["base",r,ri,na]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,g2,f2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",lf,le]}],"font-family":[{font:[h2,d2,c]}],"font-features":[{"font-features":[le]}],"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:[f,ne,le]}],"line-clamp":[{"line-clamp":[Ne,"none",ne,Py]}],leading:[{leading:["none",m,...k()]}],"list-image":[{"list-image":["none",ne,le]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ne,le]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",ne,na]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[Ne,"auto",ne,le]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"tab-size":[{tab:[wl,ne,le]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne,le]}],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",ne,le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Ce()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:re()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},wl,ne,le],radial:["",ne,le],conic:["",wl,ne,le]},y2,m2]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:S()}],"gradient-via-pos":[{via:S()}],"gradient-to-pos":[{to:S()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...I(),"hidden","none"]}],"divide-style":[{divide:[...I(),"hidden","none"]}],"border-color":[{border:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-bs":[{"border-bs":q()}],"border-color-be":[{"border-be":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:[...I(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,ne,le]}],"outline-w":[{outline:["",Ne,ri,na]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","inner","none",N,Kc,Zc]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",y,Kc,Zc]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[Ne,na]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",T,Kc,Zc]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[Ne,ne,le]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"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":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[ne,le]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"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":P()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Ce()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ne,le]}],filter:[{filter:["","none",ne,le]}],blur:[{blur:Se()}],brightness:[{brightness:[Ne,ne,le]}],contrast:[{contrast:[Ne,ne,le]}],"drop-shadow":[{"drop-shadow":["","none",B,Kc,Zc]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",Ne,ne,le]}],"hue-rotate":[{"hue-rotate":[Ne,ne,le]}],invert:[{invert:["",Ne,ne,le]}],saturate:[{saturate:[Ne,ne,le]}],sepia:[{sepia:["",Ne,ne,le]}],"backdrop-filter":[{"backdrop-filter":["","none",ne,le]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,ne,le]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,ne,le]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,ne,le]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,ne,le]}],"backdrop-invert":[{"backdrop-invert":["",Ne,ne,le]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,ne,le]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,ne,le]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,ne,le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ne,le]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",ne,le]}],ease:[{ease:["linear","initial",Z,ne,le]}],delay:[{delay:[Ne,ne,le]}],animate:[{animate:["none",Q,ne,le]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[M,ne,le]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:fe()}],"scale-x":[{"scale-x":fe()}],"scale-y":[{"scale-y":fe()}],"scale-z":[{"scale-z":fe()}],"scale-3d":["scale-3d"],skew:[{skew:Mt()}],"skew-x":[{"skew-x":Mt()}],"skew-y":[{"skew-y":Mt()}],transform:[{transform:[ne,le,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Il()}],"translate-x":[{"translate-x":Il()}],"translate-y":[{"translate-y":Il()}],"translate-z":[{"translate-z":Il()}],"translate-none":["translate-none"],zoom:[{zoom:[wl,ne,le]}],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}],"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",ne,le]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":q()}],"scrollbar-track-color":[{"scrollbar-track":q()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",ne,le]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[Ne,ri,na,Py]}],stroke:[{stroke:["none",...q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","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-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","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-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},x2=$S(b2);function Xe(...i){return x2(jg(i))}const S2=Dg("inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-lg text-xs font-medium transition-all cursor-pointer select-none disabled:pointer-events-none disabled:opacity-50 shrink-0",{variants:{variant:{default:"hl-btn-primary shadow-xs",outline:"hl-btn-outline",secondary:"hl-muted border hl-border hover:opacity-90",ghost:"hover:bg-[var(--bg-muted)]",accent:"border border-[var(--accent)] bg-[var(--accent-soft)] text-[var(--accent)] font-semibold hover:opacity-90"},size:{default:"h-8 px-3 py-1.5",sm:"h-7 px-2.5 text-[11px] rounded-md",lg:"h-9 px-4 text-xs",icon:"h-8 w-8 p-0"}},defaultVariants:{variant:"default",size:"default"}}),jt=g.forwardRef(({className:i,variant:c,size:r,asChild:o=!1,...f},m)=>{const v=o?CS:"button";return d.jsx(v,{className:Xe(S2({variant:c,size:r,className:i})),ref:m,...f})});jt.displayName="Button";var E2=Object.defineProperty,su=(i,c)=>E2(i,"name",{value:c,configurable:!0}),Jg=!!(typeof window<"u"&&window.document&&window.document.createElement);function st(i,c,{checkForDefaultPrevented:r=!0}={}){return su(function(f){if(i==null||i(f),r===!1||!f||!f.defaultPrevented)return c==null?void 0:c(f)},"handleEvent")}su(st,"composeEventHandlers");function N2(i){var c;if(!Jg)throw new Error("Cannot access window outside of the DOM");return((c=i==null?void 0:i.ownerDocument)==null?void 0:c.defaultView)??window}su(N2,"getOwnerWindow");function gf(i){if(!Jg)throw new Error("Cannot access document outside of the DOM");return(i==null?void 0:i.ownerDocument)??document}su(gf,"getOwnerDocument");function Ig(i,c=!1){const{activeElement:r}=gf(i);if(!(r!=null&&r.nodeName))return null;if(Fg(r)&&r.contentDocument)return Ig(r.contentDocument.body,c);if(c){const o=r.getAttribute("aria-activedescendant");if(o){const f=gf(r).getElementById(o);if(f)return f}}return r}su(Ig,"getActiveElement");function Fg(i){return i.tagName==="IFRAME"}su(Fg,"isFrame");var C2=Object.defineProperty,nl=(i,c)=>C2(i,"name",{value:c,configurable:!0});function T2(i,c){const r=g.createContext(c);r.displayName=i+"Context";const o=nl(m=>{const{children:v,...p}=m,E=g.useMemo(()=>p,Object.values(p));return d.jsx(r.Provider,{value:E,children:v})},"Provider");o.displayName=i+"Provider";function f(m,v={}){const{optional:p=!1}=v,E=g.useContext(r);if(E)return E;if(c!==void 0)return c;if(!p)throw new Error(`\`${m}\` must be used within \`${i}\``)}return nl(f,"useContext"),[o,f]}nl(T2,"createContext");function sa(i,c=[]){let r=[];function o(m,v){const p=g.createContext(v);p.displayName=m+"Context";const E=r.length;r=[...r,v];const b=nl(y=>{var Z;const{scope:T,children:B,...D}=y,M=((Z=T==null?void 0:T[i])==null?void 0:Z[E])||p,H=g.useMemo(()=>D,Object.values(D));return d.jsx(M.Provider,{value:H,children:B})},"Provider");b.displayName=m+"Provider";function N(y,T,B={}){var Z;const{optional:D=!1}=B,M=((Z=T==null?void 0:T[i])==null?void 0:Z[E])||p,H=g.useContext(M);if(H)return H;if(v!==void 0)return v;if(!D)throw new Error(`\`${y}\` must be used within \`${m}\``)}return nl(N,"useContext"),[b,N]}nl(o,"createContext");const f=nl(()=>{const m=r.map(v=>g.createContext(v));return nl(function(p){const E=(p==null?void 0:p[i])||m;return g.useMemo(()=>({[`__scope${i}`]:{...p,[i]:E}}),[p,E])},"useScope")},"createScope");return f.scopeName=i,[o,$g(f,...c)]}nl(sa,"createContextScope");function $g(...i){const c=i[0];if(i.length===1)return c;const r=nl(()=>{const o=i.map(f=>({useScope:f(),scopeName:f.scopeName}));return nl(function(m){const v=o.reduce((p,{useScope:E,scopeName:b})=>{const y=E(m)[`__scope${b}`];return{...p,...y}},{});return g.useMemo(()=>({[`__scope${c.scopeName}`]:v}),[v])},"useComposedScopes")},"createScope");return r.scopeName=c.scopeName,r}nl($g,"composeContextScopes");var ul=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},_2=Object.defineProperty,at=(i,c)=>_2(i,"name",{value:c,configurable:!0});function Pg(i){const c=i+"CollectionProvider",[r,o]=sa(c),[f,m]=r(c,{collectionRef:{current:null},itemMap:new Map}),v=at(M=>{const{scope:H,children:Z}=M,Q=g.useRef(null),V=g.useRef(new Map).current;return d.jsx(f,{scope:H,itemMap:V,collectionRef:Q,children:Z})},"CollectionProvider");v.displayName=c;const p=i+"CollectionSlot",E=An(p),b=g.forwardRef((M,H)=>{const{scope:Z,children:Q}=M,V=m(p,Z),P=Dt(H,V.collectionRef);return d.jsx(E,{ref:P,children:Q})});b.displayName=p;const N=i+"CollectionItemSlot",y="data-radix-collection-item",T=An(N),B=g.forwardRef((M,H)=>{const{scope:Z,children:Q,...V}=M,P=g.useRef(null),F=Dt(H,P),G=m(N,Z);return g.useEffect(()=>(G.itemMap.set(P,{ref:P,...V}),()=>void G.itemMap.delete(P))),d.jsx(T,{[y]:"",ref:F,children:Q})});B.displayName=N;function D(M){const H=m(i+"CollectionConsumer",M);return g.useCallback(()=>{const Q=H.collectionRef.current;if(!Q)return[];const V=Array.from(Q.querySelectorAll(`[${y}]`));return Array.from(H.itemMap.values()).sort((G,U)=>V.indexOf(G.ref.current)-V.indexOf(U.ref.current))},[H.collectionRef,H.itemMap])}return at(D,"useCollection"),[{Provider:v,Slot:b,ItemSlot:B},D,o]}at(Pg,"createCollection");var tg=new WeakMap,Fe,Zt,Jc=(Zt=class extends Map{constructor(r){super(r);Dy(this,Fe);Is(this,Fe,[...super.keys()]),tg.set(this,!0)}set(r,o){return tg.get(this)&&!this.has(r)&&pt(this,Fe).push(r),super.set(r,o),this}insert(r,o,f){const m=this.has(o),v=m?this.size:this.size+1,p=Bf(r),E=p>=0?Math.min(p,v-1):Math.max(v+p,0);if(m?pt(this,Fe).indexOf(o)===E:E===this.size)return this.set(o,f),this;const b=pt(this,Fe).filter(y=>y!==o);b.splice(E,0,o);const N=b.map(y=>[y,y===o?f:this.get(y)]);this.clear();for(const[y,T]of N)this.set(y,T);return this}with(r,o,f){const m=new Zt(this);return m.insert(r,o,f),m}before(r){const o=pt(this,Fe).indexOf(r)-1;if(!(o<0))return this.entryAt(o)}setBefore(r,o,f){const m=pt(this,Fe).indexOf(r);if(m===-1)return this;const v=pt(this,Fe).indexOf(o),p=v!==-1&&v=this.size&&(m=this.size-1),this.at(m)}keyFrom(r,o){const f=this.indexOf(r);if(f===-1)return;let m=f+o;return m<0&&(m=0),m>=this.size&&(m=this.size-1),this.keyAt(m)}find(r,o){let f=0;for(const m of this){if(Reflect.apply(r,o,[m,f,this]))return m;f++}}findIndex(r,o){let f=0;for(const m of this){if(Reflect.apply(r,o,[m,f,this]))return f;f++}return-1}filter(r,o){const f=[];let m=0;for(const v of this)Reflect.apply(r,o,[v,m,this])&&f.push(v),m++;return new Zt(f)}map(r,o){const f=[];let m=0;for(const v of this)f.push([v[0],Reflect.apply(r,o,[v,m,this])]),m++;return new Zt(f)}reduce(...r){const[o,f]=r,m=r.length>1;if(!m&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let v=0,p=f;for(const E of this)v===0&&!m?p=E:p=Reflect.apply(o,this,[p,E,v,this]),v++;return p}reduceRight(...r){const[o,f]=r,m=r.length>1;if(!m&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let v=f;for(let p=this.size-1;p>=0;p--){const E=this.entryAt(p);p===this.size-1&&!m?v=E:v=Reflect.apply(o,this,[v,E,p,this])}return v}sort(r){if(typeof r!="function")throw new TypeError("OrderedDict.sort requires a compare function");const o=[...this.entries()].sort(r);this.clear();for(const[f,m]of o)this.set(f,m);return this}toSorted(r){if(typeof r!="function")throw new TypeError("OrderedDict.toSorted requires a compare function");const o=[...this.entries()].sort(r);return new Zt(o)}toReversed(){const r=new Zt;for(let o=this.size-1;o>=0;o--){const f=this.keyAt(o),m=this.get(f);r.set(f,m)}return r}toSpliced(...r){const o=[...this.entries()];return o.splice(...r),new Zt(o)}slice(r,o){const f=new Zt;for(const m of pt(this,Fe).slice(r,o))f.set(m,this.get(m));return f}every(r,o){let f=0;for(const m of this){if(!Reflect.apply(r,o,[m,f,this]))return!1;f++}return!0}some(r,o){let f=0;for(const m of this){if(Reflect.apply(r,o,[m,f,this]))return!0;f++}return!1}},Fe=new WeakMap,at(Zt,"OrderedDict"),Zt);function er(i,c){if("at"in Array.prototype)return Array.prototype.at.call(i,c);const r=Wg(i,c);return r===-1?void 0:i[r]}at(er,"at");function Wg(i,c){const r=i.length,o=Bf(c),f=o>=0?o:r+o;return f<0||f>=r?-1:f}at(Wg,"toSafeIndex");function Bf(i){return i!==i||i===0?0:Math.trunc(i)}at(Bf,"toSafeInteger");function w2(i){const c=i+"CollectionProvider",[r,o]=sa(c),[f,m]=r(c);f.displayName=i+"CollectionStableContextProvider";const[v,p]=r(c);v.displayName=i+"CollectionStatefulContextProvider";const E=at(({state:G,...U})=>G?d.jsx(N,{...U,state:G}):d.jsx(b,{...U}),"CollectionProvider");E.displayName=c;const b=at(G=>{const U=Q();return d.jsx(N,{...G,state:U})},"CollectionInit");b.displayName=i+"CollectionInit";const N=at(G=>{const{scope:U,children:k,state:ce}=G,xe=g.useRef(null),[he,se]=g.useState(null),je=Dt(xe,se),[ze,ye]=ce,K=g.useRef(new Jc),W=g.useCallback(()=>{const ie=K.current;return lp(ie)||ie.sort(tr),ie},[]);return g.useEffect(()=>{if(!he)return;const ie=np(()=>{ye(ge=>{const q=ge.toSorted(tr);return q.some(([X],re)=>ge.keyAt(re)!==X)?q:ge})});return ie.observe(he,{childList:!0,subtree:!0}),()=>{ie.disconnect()}},[he,ye]),d.jsx(f,{scope:U,collectionElementRef:je,collectionElementRefObject:xe,getCollection:W,setCollection:ye,registryRef:K,children:d.jsx(v,{scope:U,collectionElement:he,collection:ze,children:k})})},"CollectionProviderImpl");N.displayName=i+"CollectionProviderImpl";const y=i+"CollectionSlot",T=An(y),B=g.forwardRef((G,U)=>{const{scope:k,children:ce}=G,xe=m(y,k),he=Dt(U,xe.collectionElementRef);return d.jsx(T,{ref:he,children:ce})});B.displayName=y;const D=i+"CollectionItemSlot",M="data-radix-collection-item",H=An(D),Z=g.forwardRef((G,U)=>{const{scope:k,children:ce,...xe}=G,he=g.useRef(null),se=m(D,k),{setCollection:je,registryRef:ze}=se,ye=g.useRef(xe);ep(ye.current,xe)||(ye.current=xe);const K=ye.current,W=g.useCallback(q=>{const Ce=ze.current;q?Ce.set(q,{...ye.current,element:q}):he.current&&Ce.delete(he.current)},[ze]),ie=Dt(U,W,he);ul(()=>{const q=he.current,Ce=ze.current;q&&Ce.has(q)&&Ce.set(q,{...K,element:q})},[K,ze]);const ge=g.useRef(null);return g.useEffect(()=>{const q=he.current,Ce=ge.current;((Ce==null?void 0:Ce.element)??null)===q&&(!q||(Ce==null?void 0:Ce.itemData)===K)||(ge.current=q?{element:q,itemData:K}:null,je(X=>{const re=new Jc(X);return Ce&&Ce.element!==q&&re.delete(Ce.element),q&&re.set(q,{...K,element:q}),re.sort(tr)}))}),g.useEffect(()=>()=>{const q=ge.current;ge.current=null,q&&je(Ce=>{if(!Ce.has(q.element))return Ce;const X=new Jc(Ce);return X.delete(q.element),X})},[je]),d.jsx(H,{[M]:"",ref:ie,children:ce})});Z.displayName=D;function Q(){return g.useState(new Jc)}at(Q,"useInitCollection");function V(G){const{collection:U}=p(i+"CollectionConsumer",G);return U}at(V,"useCollection");function P(G){const{getCollection:U}=m(i+"CollectionConsumer",G);return U}return at(P,"useGetCollection"),[{Provider:E,Slot:B,ItemSlot:Z},{createCollectionScope:o,useCollection:V,useGetCollection:P,useInitCollection:Q}]}at(w2,"createCollection");function ep(i,c){if(i===c)return!0;if(typeof i!="object"||typeof c!="object"||i==null||c==null)return!1;const r=Object.keys(i),o=Object.keys(c);if(r.length!==o.length)return!1;for(const f of r)if(!Object.prototype.hasOwnProperty.call(c,f)||i[f]!==c[f])return!1;return!0}at(ep,"shallowEqual");function tp(i,c){return!!(c.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_PRECEDING)}at(tp,"isElementPreceding");function lp(i){let c;for(const r of i.keys()){if(c){const o=c.compareDocumentPosition(r);if(!(o&Node.DOCUMENT_POSITION_DISCONNECTED)&&o&Node.DOCUMENT_POSITION_PRECEDING)return!1}c=r}return!0}at(lp,"isInDocumentOrder");function tr(i,c){return!i[1].element||!c[1].element?0:tp(i[1].element,c[1].element)?-1:1}at(tr,"sortByDocumentPosition");function np(i){return new MutationObserver(r=>{for(const o of r)if(o.type==="childList"){i();return}})}at(np,"getChildListObserver");var O2=Object.defineProperty,A2=(i,c)=>O2(i,"name",{value:c,configurable:!0}),z2=ra[" useId ".trim().toString()]||(()=>{}),R2=0;function al(i){const[c,r]=g.useState(z2());return ul(()=>{i||r(o=>o??String(R2++))},[i]),i||(c?`radix-${c}`:"")}A2(al,"useId");var ap=bg(),j2=Object.defineProperty,D2=(i,c)=>j2(i,"name",{value:c,configurable:!0}),M2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ze=M2.reduce((i,c)=>{const r=An(`Primitive.${c}`),o=g.forwardRef((f,m)=>{const{asChild:v,...p}=f,E=v?r:c;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(E,{...p,ref:m})});return o.displayName=`Primitive.${c}`,{...i,[c]:o}},{});function up(i,c){i&&ap.flushSync(()=>i.dispatchEvent(c))}D2(up,"dispatchDiscreteCustomEvent");var U2=Object.defineProperty,H2=(i,c)=>U2(i,"name",{value:c,configurable:!0}),lg=ra[" useInsertionEffect ".trim().toString()];function ia(i){const c=g.useRef(i);return typeof lg=="function"?lg(()=>{c.current=i}):ul(()=>{c.current=i}),g.useMemo(()=>((...r)=>{var o;return(o=c.current)==null?void 0:o.call(c,...r)}),[])}H2(ia,"useCallbackRef");var B2=Object.defineProperty,k2=(i,c)=>B2(i,"name",{value:c,configurable:!0}),ng=ra[" useEffectEvent ".trim().toString()],ag=ra[" useInsertionEffect ".trim().toString()];function ip(i){if(typeof ng=="function")return ng(i);const c=g.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof ag=="function"?ag(()=>{c.current=i}):ul(()=>{c.current=i}),g.useMemo(()=>((...r)=>{var o;return(o=c.current)==null?void 0:o.call(c,...r)}),[])}k2(ip,"useEffectEvent");var L2=Object.defineProperty,di=(i,c)=>L2(i,"name",{value:c,configurable:!0}),G2=ra[" useInsertionEffect ".trim().toString()]||ul;function mi({prop:i,defaultProp:c,onChange:r=di(()=>{},"onChange"),caller:o}){const[f,m,v]=cp({defaultProp:c,onChange:r}),p=i!==void 0,E=p?i:f,b=g.useCallback(N=>{var y;if(p){const T=rp(N)?N(i):N;T!==i&&((y=v.current)==null||y.call(v,T))}else m(N)},[p,i,m,v]);return[E,b]}di(mi,"useControllableState");function cp({defaultProp:i,onChange:c}){const[r,o]=g.useState(i),f=g.useRef(r),m=g.useRef(c);return G2(()=>{m.current=c},[c]),g.useEffect(()=>{var v;f.current!==r&&((v=m.current)==null||v.call(m,r),f.current=r)},[r,f]),[r,o,m]}di(cp,"useUncontrolledState");function rp(i){return typeof i=="function"}di(rp,"isFunction");var ug=Symbol("RADIX:SYNC_STATE");function Y2(i,c,r,o){const{prop:f,defaultProp:m,onChange:v,caller:p}=c,E=f!==void 0,b=ip(v),N=[{...r,state:m}];o&&N.push(o);const[y,T]=g.useReducer((H,Z)=>{if(Z.type===ug)return{...H,state:Z.state};const Q=i(H,Z);return E&&!Object.is(Q.state,H.state)&&b(Q.state),Q},...N),B=y.state,D=g.useRef(B);g.useEffect(()=>{D.current!==B&&(D.current=B,E||b(B))},[B,D,E]);const M=g.useMemo(()=>f!==void 0?{...y,state:f}:y,[y,f]);return g.useEffect(()=>{E&&!Object.is(f,y.state)&&T({type:ug,state:f})},[f,y.state,E]),[M,T]}di(Y2,"useControllableStateReducer");var q2=Object.defineProperty,V2=(i,c)=>q2(i,"name",{value:c,configurable:!0}),X2={LTR:"ltr"},Q2=g.createContext(void 0);function kf(i){const c=g.useContext(Q2);return i||c||X2.LTR}V2(kf,"useDirection");var Z2=Object.defineProperty,Lf=(i,c)=>Z2(i,"name",{value:c,configurable:!0}),nf=!1;function op(){const[i,c]=g.useState(nf);return g.useEffect(()=>{nf||(nf=!0,c(!0))},[]),i}Lf(op,"useIsHydrated");var sp=ra[" useSyncExternalStore ".trim().toString()];function fp(){return()=>{}}Lf(fp,"subscribe");function dp(){return sp(fp,()=>!0,()=>!1)}Lf(dp,"useIsHydratedModern");var K2=typeof sp=="function"?dp:op,J2=Object.defineProperty,fa=(i,c)=>J2(i,"name",{value:c,configurable:!0}),af="rovingFocusGroup.onEntryFocus",I2={bubbles:!1,cancelable:!0},sr="RovingFocusGroup",[pf,mp,F2]=Pg(sr),[$2,hp]=sa(sr,[F2]),ig={Vertical:"vertical",Horizontal:"horizontal"},P2={RTL:"rtl"},[W2,eE]=$2(sr),tE=g.forwardRef(fa(function(c,r){return d.jsx(pf.Provider,{scope:c.__scopeRovingFocusGroup,children:d.jsx(pf.Slot,{scope:c.__scopeRovingFocusGroup,children:d.jsx(lE,{...c,ref:r})})})},"RovingFocusGroup")),lE=g.forwardRef(fa(function(c,r){const{__scopeRovingFocusGroup:o,orientation:f,loop:m=!1,dir:v,currentTabStopId:p,defaultCurrentTabStopId:E,onCurrentTabStopIdChange:b,onEntryFocus:N,preventScrollOnEntryFocus:y=!1,...T}=c,B=g.useRef(null),D=Dt(r,B),M=kf(v),[H,Z]=mi({prop:p,defaultProp:E??null,onChange:b,caller:sr}),[Q,V]=g.useState(!1),P=ia(N),F=mp(o),G=g.useRef(!1),[U,k]=g.useState(0);return g.useEffect(()=>{const ce=B.current;if(ce)return ce.addEventListener(af,P),()=>ce.removeEventListener(af,P)},[P]),d.jsx(W2,{scope:o,orientation:f,dir:M,loop:m,currentTabStopId:H,onItemFocus:g.useCallback(ce=>Z(ce),[Z]),onItemShiftTab:g.useCallback(()=>V(!0),[]),onFocusableItemAdd:g.useCallback(()=>k(ce=>ce+1),[]),onFocusableItemRemove:g.useCallback(()=>k(ce=>ce-1),[]),children:d.jsx(Ze.div,{tabIndex:Q||U===0?-1:0,"data-orientation":f,...T,ref:D,style:{outline:"none",...c.style},onMouseDown:st(c.onMouseDown,()=>{G.current=!0}),onFocus:st(c.onFocus,ce=>{const xe=!G.current;if(ce.target===ce.currentTarget&&xe&&!Q){const he=new CustomEvent(af,I2);if(ce.currentTarget.dispatchEvent(he),!he.defaultPrevented){const se=F().filter(W=>W.focusable),je=se.find(W=>W.active),ze=se.find(W=>W.id===H),K=[je,ze,...se].filter(Boolean).map(W=>W.ref.current);Gf(K,y)}}G.current=!1}),onBlur:st(c.onBlur,()=>V(!1))})})},"RovingFocusGroupImpl")),nE="RovingFocusGroupItem",aE=g.forwardRef(fa(function(c,r){const{__scopeRovingFocusGroup:o,focusable:f=!0,active:m=!1,tabStopId:v,children:p,...E}=c,b=al(),N=v||b,y=eE(nE,o),T=y.currentTabStopId===N,B=mp(o),{onFocusableItemAdd:D,onFocusableItemRemove:M,currentTabStopId:H}=y,Z=K2();return ul(()=>{if(!(!Z||!f))return D(),()=>M()},[Z,f,D,M]),g.useEffect(()=>{if(!(Z||!f))return D(),()=>M()},[Z,f,D,M]),d.jsx(pf.ItemSlot,{scope:o,id:N,focusable:f,active:m,children:d.jsx(Ze.span,{tabIndex:T?0:-1,"data-orientation":y.orientation,...E,ref:r,onMouseDown:st(c.onMouseDown,Q=>{f?y.onItemFocus(N):Q.preventDefault()}),onFocus:st(c.onFocus,()=>y.onItemFocus(N)),onKeyDown:st(c.onKeyDown,Q=>{if(Q.key==="Tab"&&Q.shiftKey){y.onItemShiftTab();return}if(Q.target!==Q.currentTarget)return;const V=yp(Q,y.orientation,y.dir);if(V!==void 0){if(Q.metaKey||Q.ctrlKey||Q.altKey||Q.shiftKey)return;Q.preventDefault();let F=B().filter(G=>G.focusable).map(G=>G.ref.current);if(V==="last")F.reverse();else if(V==="prev"||V==="next"){V==="prev"&&F.reverse();const G=F.indexOf(Q.currentTarget);F=y.loop?gp(F,G+1):F.slice(G+1)}setTimeout(()=>Gf(F))}}),children:typeof p=="function"?p({isCurrentTabStop:T,hasTabStop:H!=null}):p})})},"RovingFocusGroupItem")),uE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function vp(i,c){return c!==P2.RTL?i:i==="ArrowLeft"?"ArrowRight":i==="ArrowRight"?"ArrowLeft":i}fa(vp,"getDirectionAwareKey");function yp(i,c,r){const o=vp(i.key,r);if(!(c===ig.Vertical&&["ArrowLeft","ArrowRight"].includes(o))&&!(c===ig.Horizontal&&["ArrowUp","ArrowDown"].includes(o)))return uE[o]}fa(yp,"getFocusIntent");function Gf(i,c=!1){const r=document.activeElement;for(const o of i)if(o===r||(o.focus({preventScroll:c}),document.activeElement!==r))return}fa(Gf,"focusFirst");function gp(i,c){return i.map((r,o)=>i[(c+o)%i.length])}fa(gp,"wrapArray");var iE=Object.defineProperty,Kl=(i,c)=>iE(i,"name",{value:c,configurable:!0});function pp(i,c){return g.useReducer((r,o)=>c[r][o]??r,i)}Kl(pp,"useStateMachine");var fr=Kl(i=>{const{present:c,children:r}=i,o=bp(c),f=typeof r=="function"?r({present:o.isPresent}):g.Children.only(r),m=xp(o.ref,Sp(f));return typeof r=="function"||o.isPresent?g.cloneElement(f,{ref:m}):null},"Presence");function bp(i){const[c,r]=g.useState(),o=g.useRef(null),f=g.useRef(i),m=g.useRef("none"),v=g.useRef(void 0),p=i?"mounted":"unmounted",[E,b]=pp(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{E==="mounted"?(m.current=v.current??iu(o.current),v.current=void 0):m.current="none"},[E]),ul(()=>{const N=o.current,y=f.current;if(y!==i){const B=m.current,D=iu(N);i?(v.current=D,b("MOUNT")):D==="none"||(N==null?void 0:N.display)==="none"?b("UNMOUNT"):b(y&&B!==D?"ANIMATION_OUT":"UNMOUNT"),f.current=i}},[i,b]),ul(()=>{if(c){let N;const y=c.ownerDocument.defaultView??window,T=Kl(D=>{const H=iu(o.current).includes(CSS.escape(D.animationName));if(D.target===c&&H&&(b("ANIMATION_END"),!f.current)){const Z=c.style.animationFillMode;c.style.animationFillMode="forwards",N=y.setTimeout(()=>{c.style.animationFillMode==="forwards"&&(c.style.animationFillMode=Z)})}},"handleAnimationEnd"),B=Kl(D=>{D.target===c&&(m.current=iu(o.current))},"handleAnimationStart");return c.addEventListener("animationstart",B),c.addEventListener("animationcancel",T),c.addEventListener("animationend",T),()=>{y.clearTimeout(N),c.removeEventListener("animationstart",B),c.removeEventListener("animationcancel",T),c.removeEventListener("animationend",T)}}else b("ANIMATION_END")},[c,b]),{isPresent:["mounted","unmountSuspended"].includes(E),ref:g.useCallback(N=>{if(N){const y=getComputedStyle(N);o.current=y,v.current=iu(y)}else o.current=null;r(N)},[])}}Kl(bp,"usePresence");function bf(i,c){if(typeof i=="function")return i(c);i!=null&&(i.current=c)}Kl(bf,"setRef");function xp(...i){const c=g.useRef(i);return c.current=i,g.useCallback(r=>{const o=c.current;let f=!1;const m=o.map(v=>{const p=bf(v,r);return!f&&typeof p=="function"&&(f=!0),p});if(f)return()=>{for(let v=0;vcE(i,"name",{value:c,configurable:!0}),Ep={Automatic:"automatic",Manual:"manual"},Yf="Tabs",[rE,bC]=sa(Yf,[hp]),Np=hp(),[oE,qf]=rE(Yf),sE=g.forwardRef(fu(function(c,r){const{__scopeTabs:o,value:f,onValueChange:m,defaultValue:v,orientation:p="horizontal",dir:E,activationMode:b=Ep.Automatic,...N}=c,y=kf(E),[T,B]=mi({prop:f,onChange:m,defaultProp:v??"",caller:Yf});return d.jsx(oE,{scope:o,baseId:al(),value:T,onValueChange:B,orientation:p,dir:y,activationMode:b,children:d.jsx(Ze.div,{dir:y,"data-orientation":p,...N,ref:r})})},"Tabs")),fE="TabsList",Cp=g.forwardRef(fu(function(c,r){const{__scopeTabs:o,loop:f=!0,...m}=c,v=qf(fE,o),p=Np(o);return d.jsx(tE,{asChild:!0,...p,orientation:v.orientation,dir:v.dir,loop:f,children:d.jsx(Ze.div,{role:"tablist","aria-orientation":v.orientation,...m,ref:r})})},"TabsList")),dE="TabsTrigger",Tp=g.forwardRef(fu(function(c,r){const{__scopeTabs:o,value:f,disabled:m=!1,...v}=c,p=qf(dE,o),E=Np(o),b=Vf(p.baseId,f),N=Xf(p.baseId,f),y=f===p.value;return d.jsx(aE,{asChild:!0,...E,focusable:!m,active:y,children:d.jsx(Ze.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":N,"data-state":y?"active":"inactive","data-disabled":m?"":void 0,disabled:m,id:b,...v,ref:r,onMouseDown:st(c.onMouseDown,T=>{!m&&T.button===0&&T.ctrlKey===!1?(T.currentTarget.focus(),p.onValueChange(f)):T.preventDefault()}),onKeyDown:st(c.onKeyDown,T=>{m||T.target!==T.currentTarget||[" ","Enter"].includes(T.key)&&p.onValueChange(f)}),onFocus:st(c.onFocus,()=>{const T=p.activationMode!==Ep.Manual;!y&&!m&&T&&p.onValueChange(f)})})})},"TabsTrigger")),mE="TabsContent",_p=g.forwardRef(fu(function(c,r){const{__scopeTabs:o,value:f,forceMount:m,children:v,...p}=c,E=qf(mE,o),b=Vf(E.baseId,f),N=Xf(E.baseId,f),y=f===E.value,T=g.useRef(y);return g.useEffect(()=>{const B=requestAnimationFrame(()=>T.current=!1);return()=>cancelAnimationFrame(B)},[]),d.jsx(fr,{present:m||y,children:({present:B})=>d.jsx(Ze.div,{"data-state":y?"active":"inactive","data-orientation":E.orientation,role:"tabpanel","aria-labelledby":b,hidden:!B,id:N,tabIndex:0,...p,ref:r,style:{...c.style,animationDuration:T.current?"0s":void 0},children:B&&v})})},"TabsContent"));function Vf(i,c){return`${i}-trigger-${c}`}fu(Vf,"makeTriggerId");function Xf(i,c){return`${i}-content-${c}`}fu(Xf,"makeContentId");const xf=sE,ir=g.forwardRef(({className:i,...c},r)=>d.jsx(Cp,{ref:r,className:Xe("inline-flex items-center justify-center rounded-lg hl-muted p-1 border hl-border text-[var(--text-muted)]",i),...c}));ir.displayName=Cp.displayName;const aa=g.forwardRef(({className:i,...c},r)=>d.jsx(Tp,{ref:r,className:Xe("inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-2.5 py-1 text-xs font-medium transition-all cursor-pointer select-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-[var(--bg-card)] data-[state=active]:text-[var(--text-main)] data-[state=active]:shadow-xs",i),...c}));aa.displayName=Tp.displayName;const hE=g.forwardRef(({className:i,...c},r)=>d.jsx(_p,{ref:r,className:Xe("mt-2 outline-none",i),...c}));hE.displayName=_p.displayName;const vE=[{id:"auto",label:"智能路由"},{id:"edge443",label:"443 免端口"},{id:"home10443",label:"10443 家宽"},{id:"lan",label:"LAN 局域网"}],yE=()=>{const{theme:i,resolvedTheme:c,routeMode:r,viewMode:o,telemetry:f,setTheme:m,toggleTheme:v,setRouteMode:p,setViewMode:E,setShowAgyModal:b,setShowCmdPalette:N}=jn();return d.jsxs(d.Fragment,{children:[d.jsx("header",{className:"border-b hl-border sticky top-0 z-30 backdrop-blur-md",style:{backgroundColor:"color-mix(in srgb, var(--bg-card) 88%, transparent)"},children:d.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-14 flex items-center justify-between gap-4",children:[d.jsxs("div",{className:"flex items-center gap-4 shrink-0",children:[d.jsxs("div",{onClick:()=>E("dashboard"),className:"flex items-center gap-2.5 cursor-pointer",children:[d.jsx("img",{src:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/apple.png",alt:"Mac mini",className:"w-6 h-6 rounded"}),d.jsx("span",{className:"font-semibold text-sm tracking-tight",children:"HomeLab"}),d.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"var(--success)"},title:"全屋 4 节点在线"})]}),d.jsx("div",{className:"h-4 w-[1px] hl-muted"}),d.jsx(xf,{value:o,onValueChange:y=>E(y),children:d.jsxs(ir,{children:[d.jsxs(aa,{value:"dashboard",children:[d.jsx(nS,{className:"w-3.5 h-3.5"}),d.jsx("span",{children:"中控台"})]}),d.jsxs(aa,{value:"storybook",children:[d.jsx(Ng,{className:"w-3.5 h-3.5"}),d.jsx("span",{children:"Storybook 设计规范"})]})]})})]}),d.jsxs("div",{className:"flex items-center gap-2.5 shrink-0 ml-auto",children:[d.jsxs(jt,{variant:"outline",onClick:()=>N(!0),className:"gap-3",title:"按 Cmd+K 唤起全局命令面板",children:[d.jsxs("span",{className:"flex items-center gap-1.5",style:{color:"var(--text-muted)"},children:[d.jsx(Rf,{className:"w-3.5 h-3.5"}),d.jsx("span",{className:"hidden sm:inline",children:"搜索服务或指令..."})]}),d.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono-num rounded hl-muted",style:{color:"var(--text-muted)"},children:"⌘K"})]}),d.jsxs(jt,{onClick:()=>b(!0),children:[d.jsx(jf,{className:"w-3.5 h-3.5"}),d.jsx("span",{children:"AGY 终端"})]}),d.jsxs("div",{className:"flex items-center p-0.5 rounded-lg hl-muted border hl-border text-xs",children:[d.jsx("button",{onClick:v,className:"px-2.5 py-1 rounded-md font-medium transition-all flex items-center gap-1.5 cursor-pointer",style:{backgroundColor:"var(--bg-card)",color:"var(--text-main)",boxShadow:"0 1px 2px rgba(0,0,0,0.08)"},title:"点击切换深色 / 浅色主题(默认跟随系统)",children:c==="dark"?d.jsxs(d.Fragment,{children:[d.jsx(cS,{className:"w-3.5 h-3.5"}),d.jsx("span",{children:"深色"})]}):d.jsxs(d.Fragment,{children:[d.jsx(pS,{className:"w-3.5 h-3.5"}),d.jsx("span",{children:"浅色"})]})}),i!=="system"&&d.jsx("button",{onClick:()=>m("system"),className:"px-2 py-1 rounded-md text-[11px] transition-all cursor-pointer",style:{color:"var(--text-muted)"},title:"恢复跟随设备系统深浅色自动切换",children:"自动"})]})]})]})}),o==="dashboard"&&d.jsx("div",{className:"border-b hl-border",style:{backgroundColor:"var(--bg-card)"},children:d.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-2.5 flex flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs font-mono-num",children:[d.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-2",children:[d.jsx("span",{style:{color:"var(--text-muted)"},children:"M6 CPU"}),d.jsx("div",{className:"w-12 h-1.5 rounded-full hl-muted overflow-hidden",children:d.jsx("div",{className:"h-full hl-bar-fill",style:{width:`${Math.max(5,f.mini.cpu_pct)}%`}})}),d.jsxs("span",{className:"font-medium",children:[f.mini.cpu_pct,"%"]})]}),d.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-2",children:[d.jsx("span",{style:{color:"var(--text-muted)"},children:"RAM"}),d.jsx("div",{className:"w-12 h-1.5 rounded-full hl-muted overflow-hidden",children:d.jsx("div",{className:"h-full hl-bar-fill",style:{width:`${Math.max(5,f.mini.mem_pct)}%`}})}),d.jsxs("span",{className:"font-medium",children:[f.mini.mem_used_gb,"G"]})]}),d.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-2",children:[d.jsx("span",{style:{color:"var(--text-muted)"},children:"NAS 余量"}),d.jsx("div",{className:"w-12 h-1.5 rounded-full hl-muted overflow-hidden",children:d.jsx("div",{className:"h-full hl-bar-fill-green",style:{width:`${Math.max(5,f.nas.pct)}%`}})}),d.jsxs("span",{className:"font-medium",style:{color:"var(--success)"},children:[f.nas.free_tb," TB"]})]}),d.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-1.5",children:[d.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:"var(--success)"}}),d.jsx("span",{style:{color:"var(--text-muted)"},children:"SG 专线"}),d.jsx("span",{className:"font-medium",children:f.network.sg_delay_ms>0?`${f.network.sg_delay_ms}ms`:"直连"})]})]}),d.jsx(xf,{value:r,onValueChange:y=>p(y),className:"ml-auto",children:d.jsx(ir,{children:vE.map(y=>d.jsx(aa,{value:y.id,children:y.label},y.id))})})]})})]})},wp=({card:i})=>{const{getEffectiveMode:c,setShowAgyModal:r,triggerAction:o}=jn(),f=c(),m=f==="lan"?i.lanUrl:f==="home10443"?i.homeUrl:i.edgeUrl,v=f==="lan"?"LAN 直连":f==="home10443"?"10443":"443 免端口";return d.jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"hl-card hl-card-interactive flex flex-col justify-between overflow-hidden group cursor-pointer",children:[d.jsxs("div",{className:"p-4 sm:p-5 space-y-3",children:[d.jsxs("div",{className:"flex items-start justify-between gap-3",children:[d.jsxs("div",{className:"flex items-center gap-3.5 min-w-0",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl hl-muted border hl-border p-1.5 flex items-center justify-center shrink-0",children:d.jsx("img",{src:i.iconUrl,alt:i.title,className:"w-full h-full object-contain"})}),d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h3",{className:"text-sm font-semibold truncate group-hover:underline",children:i.title}),d.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:i.online!==!1?"var(--success)":"#ef4444"}})]}),d.jsx("p",{className:"text-[11px] font-mono-num truncate mt-0.5",style:{color:"var(--text-muted)"},children:i.subtitle})]})]}),i.actionType==="drawer"?d.jsx("button",{onClick:p=>{p.preventDefault(),r(!0)},className:"px-2 py-1 rounded-md text-[11px] font-medium shrink-0 transition-opacity hover:opacity-80 cursor-pointer",style:{backgroundColor:"var(--accent-soft)",color:"var(--accent)"},children:"页内终端"}):i.actionType==="backup"?d.jsx("button",{onClick:p=>{p.preventDefault(),o("backup_nas","正在打包备份至极空间 Z4...")},className:"px-2 py-1 rounded-md text-[11px] font-medium shrink-0 transition-opacity hover:opacity-80 cursor-pointer",style:{backgroundColor:"var(--success-soft)",color:"var(--success)"},children:"立即备份"}):d.jsx("span",{className:"text-xs font-mono-num px-2 py-0.5 rounded hl-muted shrink-0",style:{color:"var(--text-muted)"},children:v})]}),d.jsx("p",{className:"text-xs leading-relaxed line-clamp-2",style:{color:"var(--text-muted)"},children:i.desc})]}),d.jsx("div",{className:"hl-widget-footer grid grid-cols-3 divide-x hl-border text-center",children:i.stats.map((p,E)=>d.jsxs("div",{className:"py-2.5 px-2 flex flex-col items-center justify-center",children:[d.jsx("span",{className:"text-[10px] uppercase tracking-wider truncate max-w-full",style:{color:"var(--text-subtle)"},children:p.label}),d.jsx("span",{className:"text-xs font-semibold font-mono-num mt-0.5 truncate max-w-full",style:{color:p.highlight?"var(--success)":"var(--text-main)"},children:p.value})]},E))})]})},gE=[{label:"SSH 连接 Mac mini",cmd:"ssh mini"},{label:"终端接力 AGY 会话",cmd:'ssh mini -t "tmux attach -t agy"'},{label:"SSH 连接新加坡 Azure",cmd:"ssh azure"},{label:"SSH 连接小米主路由",cmd:"ssh root@192.168.31.1"}],Op=()=>{const{copyCmd:i,triggerAction:c}=jn();return d.jsxs("section",{className:"space-y-3 pt-1",children:[d.jsxs("div",{className:"flex items-center justify-between px-0.5",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider",style:{color:"var(--text-muted)"},children:"终端快捷指令与备用直连书签"}),d.jsx("span",{className:"text-[11px] font-mono-num",style:{color:"var(--text-subtle)"},children:"· 点击指令即复制"})]}),d.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[d.jsx("button",{onClick:()=>c("refresh_ddns","正在同步 Cloudflare DDNS..."),className:"hover:underline font-medium cursor-pointer",style:{color:"var(--accent)"},children:"刷新 DDNS 解析"}),d.jsx("button",{onClick:()=>c("mount_nas","正在巡检极空间 20TB SMB 挂载..."),className:"hover:underline font-medium cursor-pointer",style:{color:"var(--accent)"},children:"巡检极空间挂载"})]})]}),d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:gE.map(r=>d.jsxs("button",{onClick:()=>i(r.cmd,r.label),className:"hl-card hl-card-interactive px-4 py-3 text-left flex items-center justify-between gap-2 cursor-pointer",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("div",{className:"text-xs font-semibold",children:r.label}),d.jsx("div",{className:"text-[11px] font-mono-num truncate mt-0.5",style:{color:"var(--accent)"},children:r.cmd})]}),d.jsx("span",{className:"text-[10px] font-mono-num px-1.5 py-0.5 rounded hl-muted shrink-0",style:{color:"var(--text-muted)"},children:"COPY"})]},r.cmd))})]})},pE=Dg("inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-[11px] font-mono-num font-medium transition-colors shrink-0",{variants:{variant:{default:"bg-[var(--primary)] text-[var(--primary-fg)]",secondary:"hl-muted text-[var(--text-muted)] border hl-border",outline:"border hl-border text-[var(--text-muted)] bg-[var(--bg-card)]",accent:"bg-[var(--accent-soft)] text-[var(--accent)] font-semibold",success:"bg-[var(--success-soft)] text-[var(--success)] font-semibold"}},defaultVariants:{variant:"secondary"}});function wn({className:i,variant:c,...r}){return d.jsx("div",{className:Xe(pE({variant:c}),i),...r})}var cg=1,bE=.9,xE=.8,SE=.17,uf=.1,cf=.999,EE=.9999,NE=.99,CE=/[\\\/_+.#"@\[\(\{&]/,TE=/[\\\/_+.#"@\[\(\{&]/g,_E=/[\s-]/,Ap=/[\s-]/g;function Sf(i,c,r,o,f,m,v){if(m===c.length)return f===i.length?cg:NE;var p=`${f},${m}`;if(v[p]!==void 0)return v[p];for(var E=o.charAt(m),b=r.indexOf(E,f),N=0,y,T,B,D;b>=0;)y=Sf(i,c,r,o,b+1,m+1,v),y>N&&(b===f?y*=cg:CE.test(i.charAt(b-1))?(y*=xE,B=i.slice(f,b-1).match(TE),B&&f>0&&(y*=Math.pow(cf,B.length))):_E.test(i.charAt(b-1))?(y*=bE,D=i.slice(f,b-1).match(Ap),D&&f>0&&(y*=Math.pow(cf,D.length))):(y*=SE,f>0&&(y*=Math.pow(cf,b-f))),i.charAt(b)!==c.charAt(m)&&(y*=EE)),(yy&&(y=T*uf)),y>N&&(N=y),b=r.indexOf(E,b+1);return v[p]=N,N}function rg(i){return i.toLowerCase().replace(Ap," ")}function wE(i,c,r){return i=r&&r.length>0?`${i+" "+r.join(" ")}`:i,Sf(i,c,rg(i),rg(c),0,0,{})}var OE=Object.defineProperty,ot=(i,c)=>OE(i,"name",{value:c,configurable:!0}),Ef="dismissableLayer.update",AE="dismissableLayer.pointerDownOutside",zE="dismissableLayer.focusOutside",og,zp=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),RE=g.forwardRef(ot(function(c,r){const{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:f=!1,onEscapeKeyDown:m,onPointerDownOutside:v,onFocusOutside:p,onInteractOutside:E,onDismiss:b,...N}=c,y=g.useContext(zp),[T,B]=g.useState(null),D=(T==null?void 0:T.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,M]=g.useState({}),H=Dt(r,B),Z=Array.from(y.layers),[Q]=[...y.layersWithOutsidePointerEventsDisabled].slice(-1),V=Q?Z.indexOf(Q):-1,P=T?Z.indexOf(T):-1,F=y.layersWithOutsidePointerEventsDisabled.size>0,G=P>=V,U=g.useRef(!1),k=jp(se=>{v==null||v(se),E==null||E(se),se.defaultPrevented||b==null||b()},{ownerDocument:D,deferPointerDownOutside:f,isDeferredPointerDownOutsideRef:U,dismissableSurfaces:y.dismissableSurfaces,shouldHandlePointerDownOutside:g.useCallback(se=>{if(!(se instanceof Node))return!1;const je=[...y.branches].some(ze=>ze.contains(se));return G&&!je},[y.branches,G])}),ce=Dp(se=>{if(f&&U.current)return;const je=se.target;[...y.branches].some(ye=>ye.contains(je))||(p==null||p(se),E==null||E(se),se.defaultPrevented||b==null||b())},D),xe=T?P===Z.length-1:!1,he=ia(se=>{se.key==="Escape"&&(m==null||m(se),!se.defaultPrevented&&b&&(se.preventDefault(),b()))});return g.useEffect(()=>{if(xe)return D.addEventListener("keydown",he,{capture:!0}),()=>D.removeEventListener("keydown",he,{capture:!0})},[D,xe,he]),g.useEffect(()=>{if(T)return o&&(y.layersWithOutsidePointerEventsDisabled.size===0&&(og=D.body.style.pointerEvents,D.body.style.pointerEvents="none"),y.layersWithOutsidePointerEventsDisabled.add(T)),y.layers.add(T),Nf(),()=>{o&&(y.layersWithOutsidePointerEventsDisabled.delete(T),y.layersWithOutsidePointerEventsDisabled.size===0&&(D.body.style.pointerEvents=og))}},[T,D,o,y]),g.useEffect(()=>()=>{T&&(y.layers.delete(T),y.layersWithOutsidePointerEventsDisabled.delete(T),Nf())},[T,y]),g.useEffect(()=>{const se=ot(()=>M({}),"handleUpdate");return document.addEventListener(Ef,se),()=>document.removeEventListener(Ef,se)},[]),d.jsx(Ze.div,{...N,ref:H,style:{pointerEvents:F?G?"auto":"none":void 0,...c.style},onFocusCapture:st(c.onFocusCapture,ce.onFocusCapture),onBlurCapture:st(c.onBlurCapture,ce.onBlurCapture),onPointerDownCapture:st(c.onPointerDownCapture,k.onPointerDownCapture)})},"DismissableLayer"));function Rp(){const i=g.useContext(zp),[c,r]=g.useState(null);return g.useEffect(()=>{if(c)return i.dismissableSurfaces.add(c),()=>{i.dismissableSurfaces.delete(c)}},[c,i.dismissableSurfaces]),r}ot(Rp,"useDismissableLayerSurface");var jE=ot(()=>!0,"IS_TRUE");function jp(i,c){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:f,dismissableSurfaces:m,shouldHandlePointerDownOutside:v=jE}=c,p=ia(i),E=g.useRef(!1),b=g.useRef(!1),N=g.useRef(new Map),y=g.useRef(()=>{});return g.useEffect(()=>{function T(){b.current=!1,f.current=!1,N.current.clear()}ot(T,"resetOutsideInteraction");function B(){return Array.from(N.current.values()).some(Boolean)}ot(B,"isOutsideInteractionIntercepted");function D(V){if(!b.current)return;const P=V.target;P instanceof Node&&[...m].some(G=>G.contains(P))||N.current.set(V.type,!0),V.type==="click"&&window.setTimeout(()=>{b.current&&y.current()},0)}ot(D,"handleInteractionCapture");function M(V){b.current&&N.current.set(V.type,!1)}ot(M,"handleInteractionBubble");const H=ot(V=>{if(V.target&&!E.current){let P=function(){r.removeEventListener("click",y.current);const G=B();T(),G||Qf(AE,p,F,{discrete:!0})};if(ot(P,"handleAndDispatchPointerDownOutsideEvent"),!v(V.target)){r.removeEventListener("click",y.current),T(),E.current=!1;return}const F={originalEvent:V};b.current=!0,f.current=o&&V.button===0,N.current.clear(),!o||V.button!==0?P():(r.removeEventListener("click",y.current),y.current=P,r.addEventListener("click",y.current,{once:!0}))}else r.removeEventListener("click",y.current),T();E.current=!1},"handlePointerDown"),Z=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const V of Z)r.addEventListener(V,D,!0),r.addEventListener(V,M);const Q=window.setTimeout(()=>{r.addEventListener("pointerdown",H)},0);return()=>{window.clearTimeout(Q),r.removeEventListener("pointerdown",H),r.removeEventListener("click",y.current);for(const V of Z)r.removeEventListener(V,D,!0),r.removeEventListener(V,M)}},[r,p,o,f,m,v]),{onPointerDownCapture:ot(()=>E.current=!0,"onPointerDownCapture")}}ot(jp,"usePointerDownOutside");function Dp(i,c=globalThis==null?void 0:globalThis.document){const r=ia(i),o=g.useRef(!1);return g.useEffect(()=>{const f=ot(m=>{m.target&&!o.current&&Qf(zE,r,{originalEvent:m},{discrete:!1})},"handleFocus");return c.addEventListener("focusin",f),()=>c.removeEventListener("focusin",f)},[c,r]),{onFocusCapture:ot(()=>o.current=!0,"onFocusCapture"),onBlurCapture:ot(()=>o.current=!1,"onBlurCapture")}}ot(Dp,"useFocusOutside");function Nf(){const i=new CustomEvent(Ef);document.dispatchEvent(i)}ot(Nf,"dispatchUpdate");function Qf(i,c,r,{discrete:o}){const f=r.originalEvent.target,m=new CustomEvent(i,{bubbles:!1,cancelable:!0,detail:r});c&&f.addEventListener(i,c,{once:!0}),o?up(f,m):f.dispatchEvent(m)}ot(Qf,"handleAndDispatchCustomEvent");var DE=Object.defineProperty,tt=(i,c)=>DE(i,"name",{value:c,configurable:!0}),rf="focusScope.autoFocusOnMount",of="focusScope.autoFocusOnUnmount",sg={bubbles:!1,cancelable:!0},ME=g.forwardRef(tt(function(c,r){const{loop:o=!1,trapped:f=!1,branches:m,onMountAutoFocus:v,onUnmountAutoFocus:p,...E}=c,[b,N]=g.useState(null),y=ia(v),T=ia(p),B=g.useRef(null),D=Dt(r,N),M=g.useRef(m);g.useEffect(()=>{M.current=m});const H=g.useCallback(V=>{var P;return V?b!=null&&b.contains(V)?!0:!!((P=M.current)!=null&&P.some(F=>F.contains(V))):!1},[b]),Z=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(f){let V=function(U){if(Z.paused||!b)return;const k=U.target;H(k)?B.current=k:Zl(B.current,{select:!0})},P=function(U){if(Z.paused||!b)return;const k=U.relatedTarget;k!==null&&(H(k)||Zl(B.current,{select:!0}))},F=function(U){if(document.activeElement===document.body)for(const ce of U)ce.removedNodes.length>0&&Zl(b)};tt(V,"handleFocusIn"),tt(P,"handleFocusOut"),tt(F,"handleMutations"),document.addEventListener("focusin",V),document.addEventListener("focusout",P);const G=new MutationObserver(F);return b&&G.observe(b,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",V),document.removeEventListener("focusout",P),G.disconnect()}}},[f,b,Z.paused,H]),g.useEffect(()=>{if(b){fg.add(Z);const V=document.activeElement;if(!b.contains(V)){const F=new CustomEvent(rf,sg);b.addEventListener(rf,y),b.dispatchEvent(F),F.defaultPrevented||(Bp(qp(Zf(b)),{select:!0}),document.activeElement===V&&Zl(b))}return()=>{b.removeEventListener(rf,y);const F=b.ownerDocument,G=CustomEvent;setTimeout(()=>{const U=new G(of,sg);b.addEventListener(of,T),b.dispatchEvent(U),U.defaultPrevented||Zl(V??F.body,{select:!0}),b.removeEventListener(of,T),fg.remove(Z)},0)}}},[b,y,T,Z]);const Q=g.useCallback(V=>{if(!o&&!f||Z.paused)return;const P=V.key==="Tab"&&!V.altKey&&!V.ctrlKey&&!V.metaKey,F=document.activeElement;if(P&&F){const G=V.currentTarget,[U,k]=kp(G);U&&k?!V.shiftKey&&F===k?(V.preventDefault(),o&&Zl(U,{select:!0})):V.shiftKey&&F===U&&(V.preventDefault(),o&&Zl(k,{select:!0})):F===G&&V.preventDefault()}},[o,f,Z.paused]);return d.jsx(Ze.div,{tabIndex:-1,...E,ref:D,onKeyDown:Q})},"FocusScope")),Mp=g.createContext(null);function Up({registry:i,children:c}){return i?d.jsx(Mp.Provider,{value:i,children:c}):c}tt(Up,"FocusScopeBranchProvider");function Hp(){const[i,c]=g.useState([]),r=g.useMemo(()=>({add:tt(o=>c(f=>f.includes(o)?f:[...f,o]),"add"),remove:tt(o=>c(f=>f.filter(m=>m!==o)),"remove")}),[]);return{nodes:i,registry:r}}tt(Hp,"useFocusScopeBranchRegistry");function UE(i){const c=g.useContext(Mp);g.useEffect(()=>{if(!(!i||!c))return c.add(i),()=>c.remove(i)},[i,c])}tt(UE,"useFocusScopeBranch");function Bp(i,{select:c=!1}={}){const r=document.activeElement;for(const o of i)if(Zl(o,{select:c}),document.activeElement!==r)return}tt(Bp,"focusFirst");function kp(i){const c=Zf(i),r=Cf(c,i),o=Cf(c.reverse(),i);return[r,o]}tt(kp,"getTabbableEdges");function Zf(i){const c=[],o=i.ownerDocument.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,{acceptNode:tt(f=>{const m=f.tagName==="INPUT"&&f.type==="hidden";return f.disabled||f.hidden||m?NodeFilter.FILTER_SKIP:f.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;o.nextNode();)c.push(o.currentNode);return c}tt(Zf,"getTabbableCandidates");function Cf(i,c){const r=typeof c.checkVisibility=="function"&&c.checkVisibility({checkVisibilityCSS:!0});for(const o of i)if(!(r?!o.checkVisibility({checkVisibilityCSS:!0}):Lp(o,{upTo:c})))return o}tt(Cf,"findVisible");function Lp(i,{upTo:c}){if(getComputedStyle(i).visibility==="hidden")return!0;for(;i;){if(c!==void 0&&i===c)return!1;if(getComputedStyle(i).display==="none")return!0;i=i.parentElement}return!1}tt(Lp,"isHidden");function Gp(i){return i.tagName==="INPUT"&&typeof i.select=="function"}tt(Gp,"isSelectableInput");function Zl(i,{select:c=!1}={}){if(i&&i.focus){const o=(i.ownerDocument??document).activeElement;i.focus({preventScroll:!0}),i!==o&&Gp(i)&&c&&i.select()}}tt(Zl,"focus");var fg=Yp();function Yp(){let i=[];return{add(c){const r=i[0];c!==r&&(r==null||r.pause()),i=Tf(i,c),i.unshift(c)},remove(c){var r;i=Tf(i,c),(r=i[0])==null||r.resume()}}}tt(Yp,"createFocusScopesStack");function Tf(i,c){const r=[...i],o=r.indexOf(c);return o!==-1&&r.splice(o,1),r}tt(Tf,"arrayRemove");function qp(i){return i.filter(c=>c.tagName!=="A")}tt(qp,"removeLinks");var HE=Object.defineProperty,BE=(i,c)=>HE(i,"name",{value:c,configurable:!0}),kE=g.forwardRef(BE(function(c,r){var E;const{container:o,...f}=c,[m,v]=g.useState(!1);ul(()=>v(!0),[]);const p=o||m&&((E=globalThis==null?void 0:globalThis.document)==null?void 0:E.body);return p?ap.createPortal(d.jsx(Ze.div,{...f,ref:r}),p):null},"Portal")),LE=Object.defineProperty,Kf=(i,c)=>LE(i,"name",{value:c,configurable:!0}),Ic=0,Ol=null;function GE(i){return Jf(),i.children}Kf(GE,"FocusGuards");function Jf(){g.useEffect(()=>{Ol||(Ol={start:_f(),end:_f()});const{start:i,end:c}=Ol;return document.body.firstElementChild!==i&&document.body.insertAdjacentElement("afterbegin",i),document.body.lastElementChild!==c&&document.body.insertAdjacentElement("beforeend",c),Ic++,()=>{Ic===1&&(Ol==null||Ol.start.remove(),Ol==null||Ol.end.remove(),Ol=null),Ic=Math.max(0,Ic-1)}},[])}Kf(Jf,"useFocusGuards");function _f(){const i=document.createElement("span");return i.setAttribute("data-radix-focus-guard",""),i.tabIndex=0,i.style.outline="none",i.style.opacity="0",i.style.position="fixed",i.style.pointerEvents="none",i}Kf(_f,"createFocusGuard");var Al=function(){return Al=Object.assign||function(c){for(var r,o=1,f=arguments.length;o"u")return nN;var c=aN(i),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:c[0],top:c[1],right:c[2],gap:Math.max(0,o-r+c[2]-c[0])}},iN=Zp(),ou="data-scroll-locked",cN=function(i,c,r,o){var f=i.left,m=i.top,v=i.right,p=i.gap;return r===void 0&&(r="margin"),` .`.concat(qE,` { overflow: hidden `).concat(o,`; padding-right: `).concat(p,"px ").concat(o,`; } body[`).concat(ou,`] { overflow: hidden `).concat(o,`; overscroll-behavior: contain; `).concat([c&&"position: relative ".concat(o,";"),r==="margin"&&` padding-left: `.concat(f,`px; padding-top: `).concat(m,`px; padding-right: `).concat(v,`px; margin-left:0; margin-top:0; margin-right: `).concat(p,"px ").concat(o,`; `),r==="padding"&&"padding-right: ".concat(p,"px ").concat(o,";")].filter(Boolean).join(""),` } .`).concat(lr,` { right: `).concat(p,"px ").concat(o,`; } .`).concat(nr,` { margin-right: `).concat(p,"px ").concat(o,`; } .`).concat(lr," .").concat(lr,` { right: 0 `).concat(o,`; } .`).concat(nr," .").concat(nr,` { margin-right: 0 `).concat(o,`; } body[`).concat(ou,`] { `).concat(VE,": ").concat(p,`px; } `)},mg=function(){var i=parseInt(document.body.getAttribute(ou)||"0",10);return isFinite(i)?i:0},rN=function(){g.useEffect(function(){return document.body.setAttribute(ou,(mg()+1).toString()),function(){var i=mg()-1;i<=0?document.body.removeAttribute(ou):document.body.setAttribute(ou,i.toString())}},[])},oN=function(i){var c=i.noRelative,r=i.noImportant,o=i.gapMode,f=o===void 0?"margin":o;rN();var m=g.useMemo(function(){return uN(f)},[f]);return g.createElement(iN,{styles:cN(m,!c,f,r?"":"!important")})},wf=!1;if(typeof window<"u")try{var Fc=Object.defineProperty({},"passive",{get:function(){return wf=!0,!0}});window.addEventListener("test",Fc,Fc),window.removeEventListener("test",Fc,Fc)}catch{wf=!1}var nu=wf?{passive:!1}:!1,sN=function(i){return i.tagName==="TEXTAREA"},Kp=function(i,c){if(!(i instanceof Element))return!1;var r=window.getComputedStyle(i);return r[c]!=="hidden"&&!(r.overflowY===r.overflowX&&!sN(i)&&r[c]==="visible")},fN=function(i){return Kp(i,"overflowY")},dN=function(i){return Kp(i,"overflowX")},hg=function(i,c){var r=c.ownerDocument,o=c;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var f=Jp(i,o);if(f){var m=Ip(i,o),v=m[1],p=m[2];if(v>p)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},mN=function(i){var c=i.scrollTop,r=i.scrollHeight,o=i.clientHeight;return[c,r,o]},hN=function(i){var c=i.scrollLeft,r=i.scrollWidth,o=i.clientWidth;return[c,r,o]},Jp=function(i,c){return i==="v"?fN(c):dN(c)},Ip=function(i,c){return i==="v"?mN(c):hN(c)},vN=function(i,c){return i==="h"&&c==="rtl"?-1:1},yN=function(i,c,r,o,f){var m=vN(i,window.getComputedStyle(c).direction),v=m*o,p=r.target,E=c.contains(p),b=!1,N=v>0,y=0,T=0;do{if(!p)break;var B=Ip(i,p),D=B[0],M=B[1],H=B[2],Z=M-H-m*D;(D||Z)&&Jp(i,p)&&(y+=Z,T+=D);var Q=p.parentNode;p=Q&&Q.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Q.host:Q}while(!E&&p!==document.body||E&&(c.contains(p)||c===p));return(N&&Math.abs(y)<1||!N&&Math.abs(T)<1)&&(b=!0),b},$c=function(i){return"changedTouches"in i?[i.changedTouches[0].clientX,i.changedTouches[0].clientY]:[0,0]},vg=function(i){return[i.deltaX,i.deltaY]},yg=function(i){return i&&"current"in i?i.current:i},gN=function(i,c){return i[0]===c[0]&&i[1]===c[1]},pN=function(i){return` .block-interactivity-`.concat(i,` {pointer-events: none;} .allow-interactivity-`).concat(i,` {pointer-events: all;} `)},bN=0,au=[];function xN(i){var c=g.useRef([]),r=g.useRef([0,0]),o=g.useRef(),f=g.useState(bN++)[0],m=g.useState(Zp)[0],v=g.useRef(i);g.useEffect(function(){v.current=i},[i]),g.useEffect(function(){if(i.inert){document.body.classList.add("block-interactivity-".concat(f));var M=YE([i.lockRef.current],(i.shards||[]).map(yg),!0).filter(Boolean);return M.forEach(function(H){return H.classList.add("allow-interactivity-".concat(f))}),function(){document.body.classList.remove("block-interactivity-".concat(f)),M.forEach(function(H){return H.classList.remove("allow-interactivity-".concat(f))})}}},[i.inert,i.lockRef.current,i.shards]);var p=g.useCallback(function(M,H){if("touches"in M&&M.touches.length===2||M.type==="wheel"&&M.ctrlKey)return!v.current.allowPinchZoom;var Z=$c(M),Q=r.current,V="deltaX"in M?M.deltaX:Q[0]-Z[0],P="deltaY"in M?M.deltaY:Q[1]-Z[1],F,G=M.target,U=Math.abs(V)>Math.abs(P)?"h":"v";if("touches"in M&&U==="h"&&G.type==="range")return!1;var k=window.getSelection(),ce=k&&k.anchorNode,xe=ce?ce===G||ce.contains(G):!1;if(xe)return!1;var he=hg(U,G);if(!he)return!0;if(he?F=U:(F=U==="v"?"h":"v",he=hg(U,G)),!he)return!1;if(!o.current&&"changedTouches"in M&&(V||P)&&(o.current=F),!F)return!0;var se=o.current||F;return yN(se,H,M,se==="h"?V:P)},[]),E=g.useCallback(function(M){var H=M;if(!(!au.length||au[au.length-1]!==m)){var Z="deltaY"in H?vg(H):$c(H),Q=c.current.filter(function(F){return F.name===H.type&&(F.target===H.target||H.target===F.shadowParent)&&gN(F.delta,Z)})[0];if(Q&&Q.should){H.cancelable&&H.preventDefault();return}if(!Q){var V=(v.current.shards||[]).map(yg).filter(Boolean).filter(function(F){return F.contains(H.target)}),P=V.length>0?p(H,V[0]):!v.current.noIsolation;P&&H.cancelable&&H.preventDefault()}}},[]),b=g.useCallback(function(M,H,Z,Q){var V={name:M,delta:H,target:Z,should:Q,shadowParent:SN(Z)};c.current.push(V),setTimeout(function(){c.current=c.current.filter(function(P){return P!==V})},1)},[]),N=g.useCallback(function(M){r.current=$c(M),o.current=void 0},[]),y=g.useCallback(function(M){b(M.type,vg(M),M.target,p(M,i.lockRef.current))},[]),T=g.useCallback(function(M){b(M.type,$c(M),M.target,p(M,i.lockRef.current))},[]);g.useEffect(function(){return au.push(m),i.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:T}),document.addEventListener("wheel",E,nu),document.addEventListener("touchmove",E,nu),document.addEventListener("touchstart",N,nu),function(){au=au.filter(function(M){return M!==m}),document.removeEventListener("wheel",E,nu),document.removeEventListener("touchmove",E,nu),document.removeEventListener("touchstart",N,nu)}},[]);var B=i.removeScrollBar,D=i.inert;return g.createElement(g.Fragment,null,D?g.createElement(m,{styles:pN(f)}):null,B?g.createElement(oN,{noRelative:i.noRelative,gapMode:i.gapMode}):null)}function SN(i){for(var c=null;i!==null;)i instanceof ShadowRoot&&(c=i.host,i=i.host),i=i.parentNode;return c}const EN=FE(Qp,xN);var Fp=g.forwardRef(function(i,c){return g.createElement(dr,Al({},i,{ref:c,sideCar:EN}))});Fp.classNames=dr.classNames;var NN=function(i){if(typeof document>"u")return null;var c=Array.isArray(i)?i[0]:i;return c.ownerDocument.body},uu=new WeakMap,Pc=new WeakMap,Wc={},mf=0,$p=function(i){return i&&(i.host||$p(i.parentNode))},CN=function(i,c){return c.map(function(r){if(i.contains(r))return r;var o=$p(r);return o&&i.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",i,". Doing nothing"),null)}).filter(function(r){return!!r})},TN=function(i,c,r,o){var f=CN(c,Array.isArray(i)?i:[i]);Wc[r]||(Wc[r]=new WeakMap);var m=Wc[r],v=[],p=new Set,E=new Set(f),b=function(y){!y||p.has(y)||(p.add(y),b(y.parentNode))};f.forEach(b);var N=function(y){!y||E.has(y)||Array.prototype.forEach.call(y.children,function(T){if(p.has(T))N(T);else try{var B=T.getAttribute(o),D=B!==null&&B!=="false",M=(uu.get(T)||0)+1,H=(m.get(T)||0)+1;uu.set(T,M),m.set(T,H),v.push(T),M===1&&D&&Pc.set(T,!0),H===1&&T.setAttribute(r,"true"),D||T.setAttribute(o,"true")}catch(Z){console.error("aria-hidden: cannot operate on ",T,Z)}})};return N(c),p.clear(),mf++,function(){v.forEach(function(y){var T=uu.get(y)-1,B=m.get(y)-1;uu.set(y,T),m.set(y,B),T||(Pc.has(y)||y.removeAttribute(o),Pc.delete(y)),B||y.removeAttribute(r)}),mf--,mf||(uu=new WeakMap,uu=new WeakMap,Pc=new WeakMap,Wc={})}},_N=function(i,c,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(i)?i:[i]),f=NN(i);return f?(o.push.apply(o,Array.from(f.querySelectorAll("[aria-live], script"))),TN(o,f,r,"aria-hidden")):function(){return null}},wN=Object.defineProperty,il=(i,c)=>wN(i,"name",{value:c,configurable:!0}),If="Dialog",[Pp,xC]=sa(If),[ON,Jl]=Pp(If),Wp=il(i=>{const{__scopeDialog:c,children:r,open:o,defaultOpen:f,onOpenChange:m,modal:v=!0}=i,p=g.useRef(null),E=g.useRef(null),{nodes:b,registry:N}=Hp(),[y,T]=mi({prop:o,defaultProp:f??!1,onChange:m,caller:If}),[B,D]=g.useState(0),[M,H]=g.useState(0);return d.jsx(ON,{scope:c,triggerRef:p,contentRef:E,contentId:al(),titleId:al(),descriptionId:al(),titlePresent:B>0,descriptionPresent:M>0,setTitleCount:D,setDescriptionCount:H,open:y,onOpenChange:T,onOpenToggle:g.useCallback(()=>T(Z=>!Z),[T]),modal:v,branchNodes:b,branchRegistry:N,children:r})},"Dialog"),e0="DialogPortal",[AN,t0]=Pp(e0,{forceMount:void 0}),l0=il(i=>{const{__scopeDialog:c,forceMount:r,children:o,container:f}=i,m=Jl(e0,c);return d.jsx(AN,{scope:c,forceMount:r,children:g.Children.map(o,v=>d.jsx(fr,{present:r||m.open,children:d.jsx(kE,{asChild:!0,container:f,children:v})}))})},"DialogPortal"),Of="DialogOverlay",Ff=g.forwardRef(il(function(c,r){const o=t0(Of,c.__scopeDialog),{forceMount:f=o.forceMount,...m}=c,v=Jl(Of,c.__scopeDialog);return v.modal?d.jsx(fr,{present:f||v.open,children:d.jsx(RN,{...m,ref:r})}):null},"DialogOverlay")),zN=An("DialogOverlay.RemoveScroll"),RN=g.forwardRef(il(function(c,r){const{__scopeDialog:o,...f}=c,m=Jl(Of,o),v=Rp(),p=Dt(r,v);return d.jsx(Fp,{as:zN,allowPinchZoom:!0,shards:g.useMemo(()=>[m.contentRef,...m.branchNodes.map(E=>({current:E}))],[m.contentRef,m.branchNodes]),children:d.jsx(Ze.div,{"data-state":Pf(m.open),...f,ref:p,style:{pointerEvents:"auto",...f.style}})})},"DialogOverlayImpl")),fi="DialogContent",$f=g.forwardRef(il(function(c,r){const o=t0(fi,c.__scopeDialog),{forceMount:f=o.forceMount,...m}=c,v=Jl(fi,c.__scopeDialog);return d.jsx(fr,{present:f||v.open,children:v.modal?d.jsx(jN,{...m,ref:r}):d.jsx(DN,{...m,ref:r})})},"DialogContent")),jN=g.forwardRef(il(function(c,r){const o=Jl(fi,c.__scopeDialog),f=g.useRef(null),m=Dt(r,o.contentRef,f);return g.useEffect(()=>{const v=f.current;if(v)return _N(v)},[]),d.jsx(n0,{...c,ref:m,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:st(c.onCloseAutoFocus,v=>{var p;v.preventDefault(),(p=o.triggerRef.current)==null||p.focus()}),onPointerDownOutside:st(c.onPointerDownOutside,v=>{const p=v.detail.originalEvent,E=p.button===0&&p.ctrlKey===!0;(p.button===2||E)&&v.preventDefault()}),onFocusOutside:st(c.onFocusOutside,v=>v.preventDefault())})},"DialogContentModal")),DN=g.forwardRef(il(function(c,r){const o=Jl(fi,c.__scopeDialog),f=g.useRef(!1),m=g.useRef(!1);return d.jsx(n0,{...c,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:v=>{var p,E;(p=c.onCloseAutoFocus)==null||p.call(c,v),v.defaultPrevented||(f.current||(E=o.triggerRef.current)==null||E.focus(),v.preventDefault()),f.current=!1,m.current=!1},onInteractOutside:v=>{var b,N;(b=c.onInteractOutside)==null||b.call(c,v),v.defaultPrevented||(f.current=!0,v.detail.originalEvent.type==="pointerdown"&&(m.current=!0));const p=v.target;((N=o.triggerRef.current)==null?void 0:N.contains(p))&&v.preventDefault(),v.detail.originalEvent.type==="focusin"&&m.current&&v.preventDefault()}})},"DialogContentNonModal")),n0=g.forwardRef(il(function(c,r){const{__scopeDialog:o,trapFocus:f,onOpenAutoFocus:m,onCloseAutoFocus:v,"aria-describedby":p,children:E,...b}=c,N=Jl(fi,o);return Jf(),d.jsx(Up,{registry:N.branchRegistry,children:d.jsx(ME,{asChild:!0,loop:!0,trapped:f,branches:N.branchNodes,onMountAutoFocus:m,onUnmountAutoFocus:v,children:d.jsx(RE,{role:"dialog",id:N.contentId,"aria-labelledby":N.titlePresent?N.titleId:void 0,"aria-describedby":N.descriptionPresent?i0(p,N.descriptionId):p,"data-state":Pf(N.open),...b,ref:r,deferPointerDownOutside:!0,onDismiss:()=>N.onOpenChange(!1),children:E})})})},"DialogContentImpl")),a0=g.forwardRef(il(function(c,r){const{__scopeDialog:o,...f}=c,m=Jl("DialogTitle",o),{setTitleCount:v}=m;return ul(()=>(v(p=>p+1),()=>v(p=>p-1)),[v]),d.jsx(Ze.h2,{id:m.titleId,...f,ref:r})},"DialogTitle")),u0=g.forwardRef(il(function(c,r){const{__scopeDialog:o,...f}=c,m=Jl("DialogDescription",o),{setDescriptionCount:v}=m;return ul(()=>(v(p=>p+1),()=>v(p=>p-1)),[v]),d.jsx(Ze.p,{id:m.descriptionId,...f,ref:r})},"DialogDescription"));function i0(...i){const c=new Set;for(const r of i)if(typeof r=="string")for(const o of String(r).trim().split(/\s+/))o&&c.add(o);return c.size>0?Array.from(c).join(" "):void 0}il(i0,"concatAriaDescribedby");function Pf(i){return i?"open":"closed"}il(Pf,"getState");var oi='[cmdk-group=""]',hf='[cmdk-group-items=""]',MN='[cmdk-group-heading=""]',c0='[cmdk-item=""]',gg=`${c0}:not([aria-disabled="true"])`,Af="cmdk-item-select",cu="data-value",UN=(i,c,r)=>wE(i,c,r),r0=g.createContext(void 0),hi=()=>g.useContext(r0),o0=g.createContext(void 0),Wf=()=>g.useContext(o0),s0=g.createContext(void 0),f0=g.forwardRef((i,c)=>{let r=ru(()=>{var X,re;return{search:"",value:(re=(X=i.value)!=null?X:i.defaultValue)!=null?re:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=ru(()=>new Set),f=ru(()=>new Map),m=ru(()=>new Map),v=ru(()=>new Set),p=d0(i),{label:E,children:b,value:N,onValueChange:y,filter:T,shouldFilter:B,loop:D,disablePointerSelection:M=!1,vimBindings:H=!0,...Z}=i,Q=al(),V=al(),P=al(),F=g.useRef(null),G=ZN();ca(()=>{if(N!==void 0){let X=N.trim();r.current.value=X,U.emit()}},[N]),ca(()=>{G(6,je)},[]);let U=g.useMemo(()=>({subscribe:X=>(v.current.add(X),()=>v.current.delete(X)),snapshot:()=>r.current,setState:(X,re,S)=>{var z,J,I,de;if(!Object.is(r.current[X],re)){if(r.current[X]=re,X==="search")se(),xe(),G(1,he);else if(X==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let te=document.getElementById(P);te?te.focus():(z=document.getElementById(Q))==null||z.focus()}if(G(7,()=>{var te;r.current.selectedItemId=(te=ze())==null?void 0:te.id,U.emit()}),S||G(5,je),((J=p.current)==null?void 0:J.value)!==void 0){let te=re??"";(de=(I=p.current).onValueChange)==null||de.call(I,te);return}}U.emit()}},emit:()=>{v.current.forEach(X=>X())}}),[]),k=g.useMemo(()=>({value:(X,re,S)=>{var z;re!==((z=m.current.get(X))==null?void 0:z.value)&&(m.current.set(X,{value:re,keywords:S}),r.current.filtered.items.set(X,ce(re,S)),G(2,()=>{xe(),U.emit()}))},item:(X,re)=>(o.current.add(X),re&&(f.current.has(re)?f.current.get(re).add(X):f.current.set(re,new Set([X]))),G(3,()=>{se(),xe(),r.current.value||he(),U.emit()}),()=>{m.current.delete(X),o.current.delete(X),r.current.filtered.items.delete(X);let S=ze();G(4,()=>{se(),(S==null?void 0:S.getAttribute("id"))===X&&he(),U.emit()})}),group:X=>(f.current.has(X)||f.current.set(X,new Set),()=>{m.current.delete(X),f.current.delete(X)}),filter:()=>p.current.shouldFilter,label:E||i["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:Q,inputId:P,labelId:V,listInnerRef:F}),[]);function ce(X,re){var S,z;let J=(z=(S=p.current)==null?void 0:S.filter)!=null?z:UN;return X?J(X,r.current.search,re):0}function xe(){if(!r.current.search||p.current.shouldFilter===!1)return;let X=r.current.filtered.items,re=[];r.current.filtered.groups.forEach(z=>{let J=f.current.get(z),I=0;J.forEach(de=>{let te=X.get(de);I=Math.max(te,I)}),re.push([z,I])});let S=F.current;ye().sort((z,J)=>{var I,de;let te=z.getAttribute("id"),Se=J.getAttribute("id");return((I=X.get(Se))!=null?I:0)-((de=X.get(te))!=null?de:0)}).forEach(z=>{let J=z.closest(hf);J?J.appendChild(z.parentElement===J?z:z.closest(`${hf} > *`)):S.appendChild(z.parentElement===S?z:z.closest(`${hf} > *`))}),re.sort((z,J)=>J[1]-z[1]).forEach(z=>{var J;let I=(J=F.current)==null?void 0:J.querySelector(`${oi}[${cu}="${encodeURIComponent(z[0])}"]`);I==null||I.parentElement.appendChild(I)})}function he(){let X=ye().find(S=>S.getAttribute("aria-disabled")!=="true"),re=X==null?void 0:X.getAttribute(cu);U.setState("value",re||void 0)}function se(){var X,re,S,z;if(!r.current.search||p.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let J=0;for(let I of o.current){let de=(re=(X=m.current.get(I))==null?void 0:X.value)!=null?re:"",te=(z=(S=m.current.get(I))==null?void 0:S.keywords)!=null?z:[],Se=ce(de,te);r.current.filtered.items.set(I,Se),Se>0&&J++}for(let[I,de]of f.current)for(let te of de)if(r.current.filtered.items.get(te)>0){r.current.filtered.groups.add(I);break}r.current.filtered.count=J}function je(){var X,re,S;let z=ze();z&&(((X=z.parentElement)==null?void 0:X.firstChild)===z&&((S=(re=z.closest(oi))==null?void 0:re.querySelector(MN))==null||S.scrollIntoView({block:"nearest"})),z.scrollIntoView({block:"nearest"}))}function ze(){var X;return(X=F.current)==null?void 0:X.querySelector(`${c0}[aria-selected="true"]`)}function ye(){var X;return Array.from(((X=F.current)==null?void 0:X.querySelectorAll(gg))||[])}function K(X){let re=ye()[X];re&&U.setState("value",re.getAttribute(cu))}function W(X){var re;let S=ze(),z=ye(),J=z.findIndex(de=>de===S),I=z[J+X];(re=p.current)!=null&&re.loop&&(I=J+X<0?z[z.length-1]:J+X===z.length?z[0]:z[J+X]),I&&U.setState("value",I.getAttribute(cu))}function ie(X){let re=ze(),S=re==null?void 0:re.closest(oi),z;for(;S&&!z;)S=X>0?XN(S,oi):QN(S,oi),z=S==null?void 0:S.querySelector(gg);z?U.setState("value",z.getAttribute(cu)):W(X)}let ge=()=>K(ye().length-1),q=X=>{X.preventDefault(),X.metaKey?ge():X.altKey?ie(1):W(1)},Ce=X=>{X.preventDefault(),X.metaKey?K(0):X.altKey?ie(-1):W(-1)};return g.createElement(Ze.div,{ref:c,tabIndex:-1,...Z,"cmdk-root":"",onKeyDown:X=>{var re;(re=Z.onKeyDown)==null||re.call(Z,X);let S=X.nativeEvent.isComposing||X.keyCode===229;if(!(X.defaultPrevented||S))switch(X.key){case"n":case"j":{H&&X.ctrlKey&&q(X);break}case"ArrowDown":{q(X);break}case"p":case"k":{H&&X.ctrlKey&&Ce(X);break}case"ArrowUp":{Ce(X);break}case"Home":{X.preventDefault(),K(0);break}case"End":{X.preventDefault(),ge();break}case"Enter":{X.preventDefault();let z=ze();if(z){let J=new Event(Af);z.dispatchEvent(J)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:JN},E),mr(i,X=>g.createElement(o0.Provider,{value:U},g.createElement(r0.Provider,{value:k},X))))}),HN=g.forwardRef((i,c)=>{var r,o;let f=al(),m=g.useRef(null),v=g.useContext(s0),p=hi(),E=d0(i),b=(o=(r=E.current)==null?void 0:r.forceMount)!=null?o:v==null?void 0:v.forceMount;ca(()=>{if(!b)return p.item(f,v==null?void 0:v.id)},[b]);let N=m0(f,m,[i.value,i.children,m],i.keywords),y=Wf(),T=zn(G=>G.value&&G.value===N.current),B=zn(G=>b||p.filter()===!1?!0:G.search?G.filtered.items.get(f)>0:!0);g.useEffect(()=>{let G=m.current;if(!(!G||i.disabled))return G.addEventListener(Af,D),()=>G.removeEventListener(Af,D)},[B,i.onSelect,i.disabled]);function D(){var G,U;M(),(U=(G=E.current).onSelect)==null||U.call(G,N.current)}function M(){y.setState("value",N.current,!0)}if(!B)return null;let{disabled:H,value:Z,onSelect:Q,forceMount:V,keywords:P,...F}=i;return g.createElement(Ze.div,{ref:ua(m,c),...F,id:f,"cmdk-item":"",role:"option","aria-disabled":!!H,"aria-selected":!!T,"data-disabled":!!H,"data-selected":!!T,onPointerMove:H||p.getDisablePointerSelection()?void 0:M,onClick:H?void 0:D},i.children)}),BN=g.forwardRef((i,c)=>{let{heading:r,children:o,forceMount:f,...m}=i,v=al(),p=g.useRef(null),E=g.useRef(null),b=al(),N=hi(),y=zn(B=>f||N.filter()===!1?!0:B.search?B.filtered.groups.has(v):!0);ca(()=>N.group(v),[]),m0(v,p,[i.value,i.heading,E]);let T=g.useMemo(()=>({id:v,forceMount:f}),[f]);return g.createElement(Ze.div,{ref:ua(p,c),...m,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},r&&g.createElement("div",{ref:E,"cmdk-group-heading":"","aria-hidden":!0,id:b},r),mr(i,B=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?b:void 0},g.createElement(s0.Provider,{value:T},B))))}),kN=g.forwardRef((i,c)=>{let{alwaysRender:r,...o}=i,f=g.useRef(null),m=zn(v=>!v.search);return!r&&!m?null:g.createElement(Ze.div,{ref:ua(f,c),...o,"cmdk-separator":"",role:"separator"})}),LN=g.forwardRef((i,c)=>{let{onValueChange:r,...o}=i,f=i.value!=null,m=Wf(),v=zn(b=>b.search),p=zn(b=>b.selectedItemId),E=hi();return g.useEffect(()=>{i.value!=null&&m.setState("search",i.value)},[i.value]),g.createElement(Ze.input,{ref:c,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":E.listId,"aria-labelledby":E.labelId,"aria-activedescendant":p,id:E.inputId,type:"text",value:f?i.value:v,onChange:b=>{f||m.setState("search",b.target.value),r==null||r(b.target.value)}})}),GN=g.forwardRef((i,c)=>{let{children:r,label:o="Suggestions",...f}=i,m=g.useRef(null),v=g.useRef(null),p=zn(b=>b.selectedItemId),E=hi();return g.useEffect(()=>{if(v.current&&m.current){let b=v.current,N=m.current,y,T=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let B=b.offsetHeight;N.style.setProperty("--cmdk-list-height",B.toFixed(1)+"px")})});return T.observe(b),()=>{cancelAnimationFrame(y),T.unobserve(b)}}},[]),g.createElement(Ze.div,{ref:ua(m,c),...f,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":o,id:E.listId},mr(i,b=>g.createElement("div",{ref:ua(v,E.listInnerRef),"cmdk-list-sizer":""},b)))}),YN=g.forwardRef((i,c)=>{let{open:r,onOpenChange:o,overlayClassName:f,contentClassName:m,container:v,...p}=i;return g.createElement(Wp,{open:r,onOpenChange:o},g.createElement(l0,{container:v},g.createElement(Ff,{"cmdk-overlay":"",className:f}),g.createElement($f,{"aria-label":i.label,"cmdk-dialog":"",className:m},g.createElement(f0,{ref:c,...p}))))}),qN=g.forwardRef((i,c)=>zn(r=>r.filtered.count===0)?g.createElement(Ze.div,{ref:c,...i,"cmdk-empty":"",role:"presentation"}):null),VN=g.forwardRef((i,c)=>{let{progress:r,children:o,label:f="Loading...",...m}=i;return g.createElement(Ze.div,{ref:c,...m,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":f},mr(i,v=>g.createElement("div",{"aria-hidden":!0},v)))}),cl=Object.assign(f0,{List:GN,Item:HN,Input:LN,Group:BN,Separator:kN,Dialog:YN,Empty:qN,Loading:VN});function XN(i,c){let r=i.nextElementSibling;for(;r;){if(r.matches(c))return r;r=r.nextElementSibling}}function QN(i,c){let r=i.previousElementSibling;for(;r;){if(r.matches(c))return r;r=r.previousElementSibling}}function d0(i){let c=g.useRef(i);return ca(()=>{c.current=i}),c}var ca=typeof window>"u"?g.useEffect:g.useLayoutEffect;function ru(i){let c=g.useRef();return c.current===void 0&&(c.current=i()),c}function zn(i){let c=Wf(),r=()=>i(c.snapshot());return g.useSyncExternalStore(c.subscribe,r,r)}function m0(i,c,r,o=[]){let f=g.useRef(),m=hi();return ca(()=>{var v;let p=(()=>{var b;for(let N of r){if(typeof N=="string")return N.trim();if(typeof N=="object"&&"current"in N)return N.current?(b=N.current.textContent)==null?void 0:b.trim():f.current}})(),E=o.map(b=>b.trim());m.value(i,p,E),(v=c.current)==null||v.setAttribute(cu,p),f.current=p}),f}var ZN=()=>{let[i,c]=g.useState(),r=ru(()=>new Map);return ca(()=>{r.current.forEach(o=>o()),r.current=new Map},[i]),(o,f)=>{r.current.set(o,f),c({})}};function KN(i){let c=i.type;return typeof c=="function"?c(i.props):"render"in c?c.render(i.props):i}function mr({asChild:i,children:c},r){return i&&g.isValidElement(c)?g.cloneElement(KN(c),{ref:c.ref},r(c.props.children)):r(c)}var JN={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const h0=Wp,IN=l0,v0=g.forwardRef(({className:i,...c},r)=>d.jsx(Ff,{ref:r,className:Xe("fixed inset-0 z-50 bg-black/70 backdrop-blur-sm transition-opacity",i),...c}));v0.displayName=Ff.displayName;const ed=g.forwardRef(({className:i,children:c,...r},o)=>d.jsxs(IN,{children:[d.jsx(v0,{}),d.jsx($f,{ref:o,className:Xe("fixed left-[50%] top-[50%] z-50 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] hl-card shadow-2xl duration-200 outline-none",i),...r,children:c})]}));ed.displayName=$f.displayName;const td=g.forwardRef(({className:i,...c},r)=>d.jsx(a0,{ref:r,className:Xe("text-sm font-bold leading-none tracking-tight",i),...c}));td.displayName=a0.displayName;const ld=g.forwardRef(({className:i,...c},r)=>d.jsx(u0,{ref:r,className:Xe("text-xs text-[var(--text-muted)]",i),...c}));ld.displayName=u0.displayName;const y0=g.forwardRef(({className:i,...c},r)=>d.jsx(cl,{ref:r,className:Xe("flex h-full w-full flex-col overflow-hidden rounded-xl bg-[var(--bg-card)] text-[var(--text-main)]",i),...c}));y0.displayName=cl.displayName;const FN=({children:i,...c})=>d.jsx(h0,{...c,children:d.jsxs(ed,{className:"max-w-xl overflow-hidden p-0 shadow-2xl top-[22%] translate-y-0",children:[d.jsx(td,{className:"sr-only",children:"全局命令与服务搜索面板"}),d.jsx(ld,{className:"sr-only",children:"使用键盘上下方向键选择服务或操作,回车立即执行"}),d.jsx(y0,{children:i})]})}),g0=g.forwardRef(({className:i,...c},r)=>d.jsxs("div",{className:"flex items-center border-b hl-border px-4 py-3 gap-3","cmdk-input-wrapper":"",children:[d.jsx(Rf,{className:"h-4 w-4 shrink-0 text-[var(--text-muted)]"}),d.jsx(cl.Input,{ref:r,className:Xe("flex w-full bg-transparent text-sm outline-none placeholder:text-[var(--text-subtle)] disabled:cursor-not-allowed disabled:opacity-50",i),...c}),d.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono-num rounded hl-muted text-[var(--text-muted)] shrink-0",children:"ESC"})]}));g0.displayName=cl.Input.displayName;const p0=g.forwardRef(({className:i,...c},r)=>d.jsx(cl.List,{ref:r,className:Xe("max-h-80 overflow-y-auto overflow-x-hidden p-2",i),...c}));p0.displayName=cl.List.displayName;const b0=g.forwardRef((i,c)=>d.jsx(cl.Empty,{ref:c,className:"py-6 text-center text-xs text-[var(--text-muted)]",...i}));b0.displayName=cl.Empty.displayName;const x0=g.forwardRef(({className:i,...c},r)=>d.jsx(cl.Group,{ref:r,className:Xe("overflow-hidden p-1 text-[var(--text-main)] [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-[10px] [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wider [&_[cmdk-group-heading]]:text-[var(--text-subtle)]",i),...c}));x0.displayName=cl.Group.displayName;const S0=g.forwardRef(({className:i,...c},r)=>d.jsx(cl.Item,{ref:r,className:Xe("relative flex cursor-pointer select-none items-center justify-between rounded-lg px-3 py-2 text-xs outline-none transition-colors data-[selected=true]:bg-[var(--bg-muted)] data-[selected=true]:text-[var(--text-main)] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",i),...c}));S0.displayName=cl.Item.displayName;const $N=()=>{const{showCmdPalette:i,setShowCmdPalette:c,setShowAgyModal:r,setTheme:o,triggerAction:f,copyCmd:m,getEffectiveMode:v}=jn(),p=g.useMemo(()=>{const E=v(),b=(N,y,T)=>E==="lan"?T:E==="home10443"?y:N;return[{id:"open-agy-drawer",title:"在页内唤起 AGY 云端终端",hint:"tmux attach -t agy",type:"终端",run:()=>r(!0)},{id:"open-agy",title:"新窗口打开 AGY 云端工作台",hint:"https://agy.961504.xyz",type:"跳转",run:()=>window.open(b("https://agy.961504.xyz","https://agy.home.961504.xyz:10443","http://192.168.31.164:7681"),"_blank")},{id:"open-z4",title:"打开 极空间 Z4 私有云 (20TB)",hint:"192.168.31.185:5055",type:"跳转",run:()=>window.open(b("https://z4.home.961504.xyz:10443","https://z4.home.961504.xyz:10443","http://192.168.31.185:5055"),"_blank")},{id:"open-vw",title:"打开 Vaultwarden 密码保险箱",hint:"https://vw.961504.xyz",type:"跳转",run:()=>window.open(b("https://vw.961504.xyz","https://vw.home.961504.xyz:10443","http://192.168.31.164:8222"),"_blank")},{id:"open-clash",title:"打开 Mihomo 路由分流面板",hint:"192.168.31.1:9999",type:"跳转",run:()=>window.open(b("https://clash.home.961504.xyz:10443/ui/","https://clash.home.961504.xyz:10443/ui/","http://192.168.31.1:9999/ui/"),"_blank")},{id:"act-backup",title:"立即打包备份核心数据至极空间 Z4",hint:"backup-to-nas.sh",type:"运维",run:()=>f("backup_nas","正在打包备份至极空间 Z4...")},{id:"act-ddns",title:"立即刷新 Cloudflare DDNS 解析",hint:"cloudflare-ddns.sh",type:"运维",run:()=>f("refresh_ddns","正在同步 Cloudflare DDNS...")},{id:"ssh-mini",title:"复制 SSH 连接 Mac mini 指令",hint:"ssh mini",type:"SSH",run:()=>m("ssh mini","SSH Mac mini")},{id:"ssh-agy",title:"复制 终端接力 AGY 会话指令",hint:'ssh mini -t "tmux attach -t agy"',type:"SSH",run:()=>m('ssh mini -t "tmux attach -t agy"',"接力 AGY")},{id:"theme-system",title:"主题模式: 跟随设备系统深浅色自动切换",hint:"system",type:"主题",run:()=>o("system")},{id:"theme-light",title:"切换主题: 浅色纯净 (Light)",hint:"light",type:"主题",run:()=>o("light")},{id:"theme-dark",title:"切换主题: 深色极客 (Dark)",hint:"dark",type:"主题",run:()=>o("dark")}]},[v,r,o,f,m]);return d.jsxs(FN,{open:i,onOpenChange:c,children:[d.jsx(g0,{placeholder:"输入服务名称、SSH 指令、路由模式或主题..."}),d.jsxs(p0,{children:[d.jsx(b0,{children:"未找到匹配的指令或服务"}),d.jsx(x0,{heading:"快速操作与服务直达 (cmdk + Radix Dialog)",children:p.map(E=>d.jsxs(S0,{value:`${E.title} ${E.hint} ${E.type}`,onSelect:()=>{c(!1),E.run()},children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx("span",{className:"font-medium",children:E.title}),d.jsx("span",{className:"font-mono-num text-[11px] text-[var(--text-muted)]",children:E.hint})]}),d.jsx(wn,{variant:"secondary",children:E.type})]},E.id))})]})]})},On=g.forwardRef(({className:i,...c},r)=>d.jsx("div",{ref:r,className:Xe("hl-card",i),...c}));On.displayName="Card";const PN=g.forwardRef(({className:i,...c},r)=>d.jsx("div",{ref:r,className:Xe("flex flex-col space-y-1.5 p-5",i),...c}));PN.displayName="CardHeader";const WN=g.forwardRef(({className:i,...c},r)=>d.jsx("h3",{ref:r,className:Xe("text-sm font-bold leading-none tracking-tight",i),...c}));WN.displayName="CardTitle";const eC=g.forwardRef(({className:i,...c},r)=>d.jsx("p",{ref:r,className:Xe("text-xs text-[var(--text-muted)]",i),...c}));eC.displayName="CardDescription";const tC=g.forwardRef(({className:i,...c},r)=>d.jsx("div",{ref:r,className:Xe("p-5 pt-0",i),...c}));tC.displayName="CardContent";const lC=g.forwardRef(({className:i,...c},r)=>d.jsx("div",{ref:r,className:Xe("flex items-center p-5 pt-0",i),...c}));lC.displayName="CardFooter";const E0=g.forwardRef(({className:i,type:c,...r},o)=>d.jsx("input",{type:c,className:Xe("hl-input",i),ref:o,...r}));E0.displayName="Input";const cr=g.forwardRef(({className:i,...c},r)=>d.jsx("div",{ref:r,className:Xe("hl-input-group",i),...c}));cr.displayName="InputGroup";var nC=Object.defineProperty,aC=(i,c)=>nC(i,"name",{value:c,configurable:!0});function N0(i){const[c,r]=g.useState(void 0);return ul(()=>{if(i){r({width:i.offsetWidth,height:i.offsetHeight});let o=0;const f=new ResizeObserver(m=>{if(!Array.isArray(m)||!m.length)return;const v=m[0];window.cancelAnimationFrame(o),o=window.requestAnimationFrame(()=>{let p,E;if("borderBoxSize"in v){const b=v.borderBoxSize,N=Array.isArray(b)?b[0]:b;p=N.inlineSize,E=N.blockSize}else p=i.offsetWidth,E=i.offsetHeight;r({width:p,height:E})})});return f.observe(i,{box:"border-box"}),()=>{window.cancelAnimationFrame(o),f.unobserve(i)}}else r(void 0)},[i]),c}aC(N0,"useSize");var uC=Object.defineProperty,Rn=(i,c)=>uC(i,"name",{value:c,configurable:!0}),nd="Switch",[iC,SC]=sa(nd),[cC,ad]=iC(nd);function C0(i){const{__scopeSwitch:c,checked:r,children:o,defaultChecked:f,disabled:m,form:v,name:p,onCheckedChange:E,required:b,value:N="on",internal_do_not_use_render:y}=i,[T,B]=mi({prop:r,defaultProp:f??!1,onChange:E,caller:nd}),[D,M]=g.useState(null),[H,Z]=g.useState(null),[Q,V]=g.useState(null),P=D?!!v||!!D.closest("form"):!0,F={checked:T,setChecked:B,disabled:m,control:D,setControl:M,name:p,form:v,value:N,userClick:Q,onUserClick:V,required:b,defaultChecked:f,isFormControl:P,bubbleInput:H,setBubbleInput:Z};return d.jsx(cC,{scope:c,...F,children:_0(y)?y(F):o})}Rn(C0,"SwitchProvider");var rC="SwitchTrigger",oC=g.forwardRef(Rn(function({__scopeSwitch:c,onClick:r,...o},f){const{control:m,form:v,value:p,disabled:E,checked:b,required:N,setControl:y,setChecked:T,onUserClick:B,isFormControl:D,bubbleInput:M}=ad(rC,c),H=Dt(f,y),Z=g.useRef(b);return g.useEffect(()=>{const Q=v?m==null?void 0:m.ownerDocument.getElementById(v):m==null?void 0:m.form;if(Q instanceof HTMLFormElement){const V=Rn(()=>T(Z.current),"reset");return Q.addEventListener("reset",V),()=>Q.removeEventListener("reset",V)}},[m,v,T]),d.jsx(Ze.button,{type:"button",role:"switch","aria-checked":b,"aria-required":N,"data-state":ud(b),"data-disabled":E?"":void 0,disabled:E,value:p,...o,ref:H,onClick:st(r,Q=>{const V=Q.isPropagationStopped();B({requestedChecked:!b,hasConsumerStoppedPropagation:V}),T(P=>!P),M&&D&&(V||Q.stopPropagation())})})},"SwitchTrigger")),T0=g.forwardRef(Rn(function(c,r){const{__scopeSwitch:o,name:f,checked:m,defaultChecked:v,required:p,disabled:E,value:b,onCheckedChange:N,form:y,...T}=c;return d.jsx(C0,{__scopeSwitch:o,checked:m,defaultChecked:v,disabled:E,required:p,onCheckedChange:N,name:f,form:y,value:b,internal_do_not_use_render:({isFormControl:B})=>d.jsxs(d.Fragment,{children:[d.jsx(oC,{...T,ref:r,__scopeSwitch:o}),B&&d.jsx(mC,{__scopeSwitch:o})]})})},"Switch")),sC="SwitchThumb",fC=g.forwardRef(Rn(function(c,r){const{__scopeSwitch:o,...f}=c,m=ad(sC,o);return d.jsx(Ze.span,{"data-state":ud(m.checked),"data-disabled":m.disabled?"":void 0,...f,ref:r})},"SwitchThumb")),dC="SwitchBubbleInput",mC=g.forwardRef(Rn(function({__scopeSwitch:c,onClick:r,...o},f){const{control:m,userClick:v,checked:p,defaultChecked:E,required:b,disabled:N,name:y,value:T,form:B,bubbleInput:D,setBubbleInput:M}=ad(dC,c),H=Dt(f,M),Z=N0(m),Q=g.useRef(!1),V=g.useRef(p),P=g.useRef(v),F=g.useRef(null);g.useEffect(()=>{const U=D;if(!U)return;const k=window.HTMLInputElement.prototype,xe=Object.getOwnPropertyDescriptor(k,"checked").set;if(!xe)return;const he=V.current!==p;V.current=p;const se=v!==null&&v!==P.current;if(P.current=v,se)F.current=he?null:v,he&&xe.call(U,p),U.dispatchEvent(new Event("click",{bubbles:!v.hasConsumerStoppedPropagation}));else if(he){const je=F.current;F.current=null;const ze=(je==null?void 0:je.requestedChecked)===p;Q.current=!0,xe.call(U,p),U.dispatchEvent(new Event("click",{bubbles:!(ze&&je.hasConsumerStoppedPropagation)})),Q.current=!1}},[D,p,v]);const G=g.useRef(p);return d.jsx(Ze.input,{type:"checkbox","aria-hidden":!0,defaultChecked:E??G.current,required:b,disabled:N,name:y,value:T,form:B,...o,tabIndex:-1,ref:H,onClick:st(r,U=>{Q.current&&U.stopPropagation()}),style:{...o.style,...Z,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function _0(i){return typeof i=="function"}Rn(_0,"isFunction");function ud(i){return i?"checked":"unchecked"}Rn(ud,"getState");const rr=g.forwardRef(({className:i,...c},r)=>d.jsx(T0,{className:Xe("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border transition-colors disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-[var(--accent)] data-[state=checked]:border-[var(--accent)] data-[state=unchecked]:bg-[var(--bg-muted)] data-[state=unchecked]:border-[var(--border-color)]",i),...c,ref:r,children:d.jsx(fC,{className:Xe("pointer-events-none block h-3.5 w-3.5 rounded-full bg-white shadow-sm transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0.5")})}));rr.displayName=T0.displayName;const id=({targetUrl:i="https://agy.961504.xyz",onSuccess:c,onCancel:r,embedded:o=!1})=>{const[f,m]=g.useState("ixvii0iv"),[v,p]=g.useState(""),[E,b]=g.useState(!1),[N,y]=g.useState(!0),[T,B]=g.useState(!1),[D,M]=g.useState(null),H=async Z=>{if(Z.preventDefault(),!f.trim()||!v){M("请输入用户名与访问密钥");return}B(!0),M(null);try{const Q=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:f.trim(),password:v,remember:N})}),V=await Q.json();Q.ok&&V.ok?c==null||c():M(V.message||"认证未通过,请检查密码")}catch{M("网络请求异常,请稍后重试")}finally{B(!1)}};return d.jsxs(On,{className:`w-full max-w-md p-6 space-y-5 ${o?"":"shadow-2xl"}`,children:[d.jsx("div",{className:"flex items-start justify-between gap-3 border-b hl-border pb-4",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center border hl-border shrink-0",style:{backgroundColor:"var(--accent-soft)",color:"var(--accent)"},children:d.jsx(hS,{className:"w-5 h-5"})}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h3",{className:"text-sm font-bold tracking-tight",children:"HomeLab 统一安全通行证"}),d.jsx(wn,{variant:"success",children:"SSO 2.0"})]}),d.jsx("p",{className:"text-xs font-mono-num mt-0.5 truncate max-w-[260px]",style:{color:"var(--text-muted)"},children:i})]})]})}),d.jsxs("form",{onSubmit:H,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"block text-xs font-semibold",style:{color:"var(--text-muted)"},children:"管理员账号 (Username)"}),d.jsxs(cr,{children:[d.jsx(SS,{className:"w-4 h-4 shrink-0",style:{color:"var(--text-subtle)"}}),d.jsx("input",{type:"text",autoComplete:"username",value:f,onChange:Z=>m(Z.target.value),placeholder:"输入管理员账号 (如 ixvii0iv)",className:"font-mono-num"})]})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("label",{className:"block text-xs font-semibold",style:{color:"var(--text-muted)"},children:"访问通行密钥 (Access Key)"}),d.jsx("span",{className:"text-[10px] font-mono-num",style:{color:"var(--text-subtle)"},children:"与 Mac mini 密码一致"})]}),d.jsxs(cr,{children:[d.jsx(uS,{className:"w-4 h-4 shrink-0",style:{color:"var(--text-subtle)"}}),d.jsx("input",{type:E?"text":"password",autoComplete:"current-password",autoFocus:!0,value:v,onChange:Z=>p(Z.target.value),placeholder:"输入访问密钥...",className:"font-mono-num"}),d.jsx("button",{type:"button",onClick:()=>b(!E),className:"p-1 rounded hover:opacity-80 cursor-pointer",style:{color:"var(--text-muted)"},title:E?"隐藏密码":"显示密码",children:E?d.jsx(Fx,{className:"w-3.5 h-3.5"}):d.jsx(Px,{className:"w-3.5 h-3.5"})})]})]}),d.jsxs("div",{className:"flex items-center justify-between pt-1",children:[d.jsx("span",{className:"text-xs select-none",style:{color:"var(--text-muted)"},children:"在此设备保持 30 天免密通行 (*.961504.xyz)"}),d.jsx(rr,{checked:N,onCheckedChange:y})]}),D&&d.jsx("div",{className:"px-3 py-2 rounded-lg text-xs font-medium border",style:{backgroundColor:"rgba(239, 68, 68, 0.1)",borderColor:"rgba(239, 68, 68, 0.3)",color:"#ef4444"},children:D}),d.jsxs("div",{className:"flex items-center justify-end gap-2.5 pt-2",children:[r&&d.jsx(jt,{type:"button",variant:"outline",onClick:r,children:"取消"}),d.jsxs(jt,{type:"submit",disabled:T,className:"px-4",children:[d.jsx(jf,{className:"w-3.5 h-3.5"}),d.jsx("span",{children:T?"正在验证签名...":"解锁并进入工作台"})]})]})]})]})},hC=()=>{const{showAgyModal:i,setShowAgyModal:c,getEffectiveMode:r}=jn(),[o,f]=g.useState(!1),[m,v]=g.useState(!1),p=r(),E=p==="lan"?"http://192.168.31.164:7681":p==="home10443"?"https://agy.home.961504.xyz:10443":"https://agy.961504.xyz";return g.useEffect(()=>{if(i){if(p==="lan"){v(!0),f(!0);return}f(!1),fetch("/api/auth/status",{credentials:"include"}).then(b=>b.json()).then(b=>{v(!!b.authenticated),f(!0)}).catch(()=>{v(!1),f(!0)})}},[i,p]),d.jsx(h0,{open:i,onOpenChange:c,children:d.jsxs(ed,{className:"w-[95vw] max-w-6xl h-[88vh] flex flex-col overflow-hidden p-0",children:[d.jsx(td,{className:"sr-only",children:"AGY 云端工作台"}),d.jsx(ld,{className:"sr-only",children:"M6 Mac mini 上的 24 小时 tmux 常驻 AI 编程终端"}),d.jsxs("div",{className:"px-4 py-2.5 border-b hl-border flex items-center justify-between hl-muted shrink-0",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx("img",{src:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/google-gemini.png",alt:"AGY",className:"w-4 h-4"}),d.jsx("span",{className:"text-xs font-mono-num font-medium",children:"AGY 云端工作台 · tmux 持久会话 (关窗不断连)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(jt,{variant:"outline",size:"sm",asChild:!0,children:d.jsx("a",{href:E,target:"_blank",rel:"noopener noreferrer",className:"font-mono-num",children:"新标签页全屏 ↗"})}),d.jsx(jt,{size:"sm",onClick:()=>c(!1),children:"收起终端"})]})]}),o?m?d.jsx("iframe",{src:E,title:"AGY Cloud Workbench",className:"w-full flex-1 bg-black border-0"}):d.jsx("div",{className:"flex-1 flex items-center justify-center p-4",style:{backgroundColor:"var(--bg-page)"},children:d.jsx(id,{targetUrl:E,onSuccess:()=>v(!0),onCancel:()=>c(!1)})}):d.jsx("div",{className:"flex-1 flex items-center justify-center text-xs font-mono-num",style:{color:"var(--text-muted)"},children:"正在校验 HomeLab SSO 通行证..."})]})})},vC={light:{id:"light",name:"Shadcn Clean Light (浅色纯净)",description:"对标 Apple / Stripe / Linear 浅色日光模式,高对比深灰文字配纯净白卡片与冷灰微边框。",tokens:{"--bg-page":"#f8fafc","--bg-card":"#ffffff","--bg-widget":"#f8fafc","--bg-muted":"#f1f5f9","--bg-hover":"#ffffff","--text-main":"#0f172a","--text-muted":"#64748b","--text-subtle":"#94a3b8","--border-color":"#e2e8f0","--border-hover":"#cbd5e1","--primary":"#0f172a","--primary-fg":"#ffffff","--accent":"#2563eb","--accent-soft":"rgba(37, 99, 235, 0.08)","--success":"#10b981","--success-soft":"rgba(16, 185, 129, 0.10)"}},dark:{id:"dark",name:"Catppuccin / Linear Dark (深色极客)",description:"融合 Catppuccin Mocha 与 Linear 暗黑规范,柔和护眼的深邃蓝黑基底配高辨识度状态色。",tokens:{"--bg-page":"#11111b","--bg-card":"#1e1e2e","--bg-widget":"#181825","--bg-muted":"#313244","--bg-hover":"#242438","--text-main":"#cdd6f4","--text-muted":"#a6adc8","--text-subtle":"#6c7086","--border-color":"#313244","--border-hover":"#45475a","--primary":"#cba6f7","--primary-fg":"#11111b","--accent":"#89b4fa","--accent-soft":"rgba(137, 180, 250, 0.15)","--success":"#a6e3a1","--success-soft":"rgba(166, 227, 161, 0.15)"}}},or={"homepage-3col":{id:"homepage-3col",name:"Homepage 经典三列矩阵 (3-Column Grid)",description:"gethomepage.dev 标志性对称 3 列分组卡片,底部内嵌 3 格实时遥测单元。",gridClass:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},"bento-split":{id:"bento-split",name:"Shadcn 双列宽屏卡片 (2-Column Wide Bento)",description:"适合大字号阅读的 2 列宽体卡片布局,留白更充裕。",gridClass:"grid-cols-1 lg:grid-cols-2 gap-5"},"compact-2col":{id:"compact-2col",name:"高密度四列紧凑矩阵 (4-Column Dense)",description:"适合超宽显示器的一屏高密度 4 列布局。",gridClass:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3.5"}},yC=()=>{const[i,c]=g.useState("form-inputs"),{theme:r,resolvedTheme:o,layoutPreset:f,setTheme:m,setLayoutPreset:v,setViewMode:p,setShowCmdPalette:E,telemetry:b,showToast:N}=jn(),[y,T]=g.useState(!0),[B,D]=g.useState("drawer"),[M,H]=g.useState(""),[Z,Q]=g.useState("192.168.31.164"),[V,P]=g.useState(!0),F=[{id:"layout-architecture",group:"FOUNDATIONS / 架构与布局",title:"01. AppShell 双层顶栏与网格布局",icon:d.jsx(fS,{className:"w-3.5 h-3.5"})},{id:"theme-tokens",group:"FOUNDATIONS / 架构与布局",title:"02. 双主题色板与自动切换规范",icon:d.jsx(oS,{className:"w-3.5 h-3.5"})},{id:"form-inputs",group:"SHADCN / RADIX UI 组件",title:"03. shadcn/ui + Radix 原语与认证弹窗",icon:d.jsx(Zy,{className:"w-3.5 h-3.5"})},{id:"service-card",group:"SHADCN / RADIX UI 组件",title:"04. ServiceCard 内联遥测卡片",icon:d.jsx(tS,{className:"w-3.5 h-3.5"})},{id:"ssh-shelf",group:"SHADCN / RADIX UI 组件",title:"05. SshShelf 快捷指令栏",icon:d.jsx(jf,{className:"w-3.5 h-3.5"})}];return d.jsx("div",{className:"flex-1 max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-6",children:d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 items-start",children:[d.jsxs(On,{className:"p-4 space-y-4 lg:sticky lg:top-20",children:[d.jsxs("div",{className:"flex items-center justify-between border-b hl-border pb-3",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ng,{className:"w-4 h-4",style:{color:"var(--accent)"}}),d.jsx("span",{className:"text-xs font-bold uppercase tracking-wider",children:"shadcn/ui 组件库"})]}),d.jsx(wn,{variant:"accent",children:"Radix + cmdk"})]}),d.jsx("div",{className:"space-y-1",children:F.map(G=>d.jsxs("button",{onClick:()=>c(G.id),className:"w-full px-3 py-2 rounded-lg text-left text-xs font-medium flex items-center gap-2.5 transition-all cursor-pointer",style:i===G.id?{backgroundColor:"var(--accent-soft)",color:"var(--accent)"}:{color:"var(--text-muted)"},children:[G.icon,d.jsx("span",{className:"truncate",children:G.title})]},G.id))}),d.jsxs("div",{className:"pt-3 border-t hl-border space-y-2 text-xs",children:[d.jsx("div",{className:"text-[11px] font-semibold",style:{color:"var(--text-muted)"},children:"全局外观状态预览 (@radix-ui/react-tabs)"}),d.jsx(xf,{value:r,onValueChange:G=>m(G),children:d.jsxs(ir,{className:"w-full grid grid-cols-3",children:[d.jsx(aa,{value:"system",children:"自动"}),d.jsx(aa,{value:"light",children:"浅色"}),d.jsx(aa,{value:"dark",children:"深色"})]})}),d.jsx(jt,{onClick:()=>p("dashboard"),className:"w-full mt-2",children:"返回中控台主页"})]})]}),d.jsxs("div",{className:"lg:col-span-3 space-y-6",children:[i==="layout-architecture"&&d.jsx("div",{className:"space-y-6",children:d.jsxs(On,{className:"p-6 space-y-4",children:[d.jsx("div",{className:"flex items-center justify-between border-b hl-border pb-4",children:d.jsxs("div",{children:[d.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Foundations / AppShell Layout"}),d.jsx("h2",{className:"text-lg font-bold mt-0.5",children:"标准双层顶栏架构 (Two-Tier AppShell) & 响应式网格切换"})]})}),d.jsxs("p",{className:"text-xs leading-relaxed",style:{color:"var(--text-muted)"},children:["参考 ",d.jsx("strong",{children:"Vercel Geist / shadcn/ui Dashboard-01 / GitHub AppShell"})," ","标准规范,将原本容易挤压折行的单层顶栏拆分为职责清晰的双层结构:"]}),d.jsxs("div",{className:"p-4 rounded-xl hl-muted border hl-border space-y-2.5 font-mono-num text-xs",children:[d.jsxs("div",{className:"p-3 rounded-lg hl-card flex items-center justify-between",children:[d.jsx("span",{children:"[左] 🍎 HomeLab · Radix Tabs 切换 (中控台 / Storybook)"}),d.jsx("span",{style:{color:"var(--accent)"},children:"[最右固定] 🔍 搜索 ⌘K · >_ AGY 终端 · ☀️/🌙 主题切换"})]}),d.jsxs("div",{className:"p-3 rounded-lg hl-card flex items-center justify-between",children:[d.jsx("span",{style:{color:"var(--success)"},children:"[左] 实时硬件遥测条 (M6 CPU · RAM · Z4 20TB · SG 专线)"}),d.jsx("span",{children:"[右对齐] Radix Tabs 路由切换器 (智能路由 / 443 / 10443 / LAN)"})]})]}),d.jsxs("div",{className:"pt-2 space-y-3",children:[d.jsx("div",{className:"text-xs font-semibold",children:"选择主页卡片网格布局预设(点击立即应用到主页):"}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3.5",children:Object.keys(or).map(G=>{const U=or[G],k=f===G;return d.jsxs("div",{onClick:()=>v(G),className:"hl-card hl-card-interactive p-4 cursor-pointer space-y-2",style:k?{borderColor:"var(--accent)"}:{},children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-xs font-bold",children:U.name}),k&&d.jsx("span",{className:"w-4 h-4 rounded-full flex items-center justify-center",style:{backgroundColor:"var(--accent)",color:"#fff"},children:d.jsx(Jx,{className:"w-2.5 h-2.5"})})]}),d.jsx("p",{className:"text-[11px]",style:{color:"var(--text-muted)"},children:U.description}),d.jsx("code",{className:"text-[10px] font-mono-num block pt-1",style:{color:"var(--accent)"},children:U.gridClass})]},G)})})]})]})}),i==="theme-tokens"&&d.jsxs(On,{className:"p-6 space-y-6",children:[d.jsxs("div",{className:"border-b hl-border pb-4 flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Foundations / Color System"}),d.jsxs("h2",{className:"text-lg font-bold mt-0.5",children:["主流双主题色板规范(当前生效:",o==="dark"?"深色极客":"浅色纯净",")"]})]}),d.jsxs(wn,{variant:"secondary",children:["模式: ",r==="system"?"跟随设备自动切换":"手动锁定"]})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:["light","dark"].map(G=>{const U=vC[G];return d.jsxs("div",{className:"rounded-xl p-5 space-y-4 border",style:{backgroundColor:U.tokens["--bg-page"],color:U.tokens["--text-main"],borderColor:U.tokens["--border-color"]},children:[d.jsxs("div",{className:"flex items-center justify-between border-b pb-3",style:{borderColor:U.tokens["--border-color"]},children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-bold",children:U.name}),d.jsx("div",{className:"text-xs mt-0.5",style:{color:U.tokens["--text-muted"]},children:U.description})]}),d.jsx("button",{onClick:()=>m(G),className:"px-2.5 py-1 rounded-md text-xs font-mono-num font-semibold cursor-pointer",style:{backgroundColor:U.tokens["--primary"],color:U.tokens["--primary-fg"]},children:"预览此主题"})]}),d.jsx("div",{className:"grid grid-cols-2 gap-2",children:Object.entries(U.tokens).map(([k,ce])=>d.jsxs("div",{className:"p-2 rounded-lg border flex items-center gap-2",style:{backgroundColor:U.tokens["--bg-card"],borderColor:U.tokens["--border-color"]},children:[d.jsx("span",{className:"w-5 h-5 rounded border shrink-0",style:{backgroundColor:ce,borderColor:U.tokens["--border-hover"]}}),d.jsxs("div",{className:"min-w-0",children:[d.jsx("div",{className:"text-[10px] font-mono-num font-semibold truncate",children:k}),d.jsx("div",{className:"text-[10px] font-mono-num truncate",style:{color:U.tokens["--text-muted"]},children:ce})]})]},k))})]},U.id)})})]}),i==="form-inputs"&&d.jsxs(On,{className:"p-6 space-y-6",children:[d.jsxs("div",{className:"border-b hl-border pb-4 flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"src/components/ui/* · Official shadcn/ui + Radix Primitives + cmdk"}),d.jsx("h2",{className:"text-lg font-bold mt-0.5",children:"开源 `shadcn/ui` 组件库(`Input` / `Button` / `Switch` / `Badge` / `CommandDialog` / `AuthGateCard`)"})]}),d.jsx(Zy,{className:"w-4 h-4",style:{color:"var(--accent)"}})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 items-start",children:[d.jsxs("div",{className:"p-5 rounded-xl hl-muted border hl-border space-y-4",children:[d.jsx("div",{className:"text-xs font-bold uppercase tracking-wider",style:{color:"var(--text-muted)"},children:"1. `src/components/ui/*` 标准原语展示"}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"block text-xs font-medium",style:{color:"var(--text-muted)"},children:"Button 变体 (`cva` + `@radix-ui/react-slot`)"}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx(jt,{variant:"default",children:"Primary 主按钮"}),d.jsx(jt,{variant:"outline",children:"Outline 描边"}),d.jsx(jt,{variant:"secondary",children:"Secondary 次级"}),d.jsx(jt,{variant:"accent",children:"Accent 高亮"}),d.jsx(jt,{variant:"ghost",onClick:()=>E(!0),children:"唤起 cmdk 面板 ⌘K"})]})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"block text-xs font-medium",style:{color:"var(--text-muted)"},children:"Badge 标签与 `@radix-ui/react-switch` 开关"}),d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 p-2.5 rounded-lg hl-card",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx(wn,{variant:"default",children:"Default"}),d.jsx(wn,{variant:"accent",children:"Radix UI"}),d.jsx(wn,{variant:"success",children:"Online"}),d.jsx(wn,{variant:"outline",children:"v3.2"})]}),d.jsx(rr,{checked:V,onCheckedChange:P})]})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"block text-xs font-medium",style:{color:"var(--text-muted)"},children:"`InputGroup` 组合输入框"}),d.jsxs(cr,{children:[d.jsx(Rf,{className:"w-4 h-4 shrink-0",style:{color:"var(--text-subtle)"}}),d.jsx("input",{type:"text",value:M,onChange:G=>H(G.target.value),placeholder:"搜索服务、SSH 指令或节点..."}),d.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono-num rounded hl-card border hl-border",style:{color:"var(--text-muted)"},children:"⌘K"})]})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"block text-xs font-medium",style:{color:"var(--text-muted)"},children:"`Input` 等宽字体输入框"}),d.jsx(E0,{type:"text",value:Z,onChange:G=>Q(G.target.value),className:"font-mono-num",placeholder:"192.168.31.164"})]})]}),d.jsx("div",{className:"flex flex-col items-center",children:d.jsx(id,{embedded:!0,targetUrl:"https://agy.961504.xyz",onSuccess:()=>N("SSO 认证成功!已签发 30 天全域名通行 Cookie")})})]})]}),i==="service-card"&&d.jsxs(On,{className:"p-6 space-y-6",children:[d.jsxs("div",{className:"border-b hl-border pb-4 flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Components / ServiceCard"}),d.jsx("h2",{className:"text-lg font-bold mt-0.5",children:"三段式内联遥测卡片 (ServiceCard Interactive Story)"})]}),d.jsx(yS,{className:"w-4 h-4",style:{color:"var(--accent)"}})]}),d.jsxs("div",{className:"p-4 rounded-xl hl-muted border hl-border flex flex-wrap items-center gap-6 text-xs",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx("span",{className:"font-semibold",children:"在线状态 (online):"}),d.jsx(rr,{checked:y,onCheckedChange:T}),d.jsx("span",{className:"font-mono-num",children:y?"true":"false"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"font-semibold",children:"右上角动作按钮 (actionType):"}),["drawer","backup",void 0].map((G,U)=>d.jsx(jt,{variant:B===G?"accent":"outline",size:"sm",onClick:()=>D(G),className:"font-mono-num",children:G||"route-badge"},U))]})]}),d.jsx("div",{className:"max-w-md mx-auto py-4",children:d.jsx(wp,{card:{id:"agy",title:"AGY 云端工作台",subtitle:"agy.961504.xyz · ttyd + tmux",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/google-gemini.png",online:y,actionType:B,desc:"M6 Mac mini 上的 24 小时常驻 AI 编程终端,已同步 Google 登录态并锁定新加坡出口,关掉网页后台继续运行。",edgeUrl:"https://agy.961504.xyz",homeUrl:"https://agy.home.961504.xyz:10443",lanUrl:"http://192.168.31.164:7681",stats:[{label:"M6 CPU 负载",value:`${b.mini.cpu_pct}%`},{label:"已用内存",value:`${b.mini.mem_used_gb} / 24 GB`},{label:"tmux 会话",value:"常驻运行中",highlight:!0}]}})})]}),i==="ssh-shelf"&&d.jsxs(On,{className:"p-6 space-y-6",children:[d.jsxs("div",{className:"border-b hl-border pb-4",children:[d.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Components / SshShelf"}),d.jsx("h2",{className:"text-lg font-bold mt-0.5",children:"底部 SSH 快捷复制与运维操作栏"})]}),d.jsx(Op,{})]})]})]})})},gC=()=>{var B;const{telemetry:i,toast:c,viewMode:r,layoutPreset:o,fetchTelemetry:f,setShowCmdPalette:m,getEffectiveMode:v,routeMode:p}=jn(),[E,b]=g.useState(()=>typeof window>"u"?null:new URLSearchParams(window.location.search).get("auth_redirect"));g.useEffect(()=>{f();const D=setInterval(f,3e3),M=H=>{(H.metaKey||H.ctrlKey)&&H.key.toLowerCase()==="k"&&(H.preventDefault(),m(!0))};return window.addEventListener("keydown",M),()=>{clearInterval(D),window.removeEventListener("keydown",M)}},[f,m]);const N=g.useMemo(()=>{const D=v();return D==="lan"?"LAN 局域网极速直连 (192.168.31.x)":D==="home10443"?"10443 家宽公网 HTTPS 直连":"443 免端口 HTTPS 直达 (*.961504.xyz)"},[v,p]),y=((B=or[o])==null?void 0:B.gridClass)||or["homepage-3col"].gridClass,T=g.useMemo(()=>{const D=i;return[{title:"核心工作台与私有云存储",subtitle:"Core Workbench & Storage",showRouteHint:!0,items:[{id:"agy",title:"AGY 云端工作台",subtitle:"agy.961504.xyz · ttyd + tmux",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/google-gemini.png",online:D.services.agy,actionType:"drawer",desc:"M6 Mac mini 上的 24 小时常驻 AI 编程终端,已同步 Google 登录态并锁定新加坡出口,关掉网页后台继续运行。",edgeUrl:"https://agy.961504.xyz",homeUrl:"https://agy.home.961504.xyz:10443",lanUrl:"http://192.168.31.164:7681",stats:[{label:"M6 CPU 负载",value:`${D.mini.cpu_pct}%`},{label:"已用内存",value:`${D.mini.mem_used_gb} / 24 GB`},{label:"tmux 会话",value:D.mini.agy_tmux?"常驻运行中":"待机",highlight:!0}]},{id:"zspace",title:"极空间 Z4 私有云",subtitle:"192.168.31.185 · 20TB RAID 存储池",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/synology-drive.png",online:D.services.nas,desc:"家庭 20TB 大容量存储中心、极影视蓝光影院与手机相册备份,已自动 SMB 挂载至 Mac mini ~/nas。",edgeUrl:"https://z4.home.961504.xyz:10443",homeUrl:"https://z4.home.961504.xyz:10443",lanUrl:"http://192.168.31.185:5055",stats:[{label:"剩余可用",value:`${D.nas.free_tb} TB`,highlight:!0},{label:"已用容量",value:`${D.nas.used_tb} TB (${D.nas.pct}%)`},{label:"SMB 挂载",value:D.nas.mounted?"~/nas 已挂载":"重连中"}]},{id:"vaultwarden",title:"Vaultwarden 密码保险箱",subtitle:"vw.961504.xyz · Bitwarden 兼容",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/vaultwarden.png",online:D.services.vaultwarden,actionType:"backup",desc:"自托管全平台加密密码库,支持 iOS / Android / 浏览器插件自动填充,每天凌晨 03:30 自动打包灾备至极空间。",edgeUrl:"https://vw.961504.xyz",homeUrl:"https://vw.home.961504.xyz:10443",lanUrl:"http://192.168.31.164:8222",stats:[{label:"容器状态",value:"Healthy",highlight:!0},{label:"最近极空间灾备",value:D.nas.latest_backup},{label:"Mac SSD 占用",value:`${D.mini.disk_pct}%`}]}]},{title:"网络网关、AI 专线与外部哨兵",subtitle:"Network Gateway & Cloud Edge",showRouteHint:!1,items:[{id:"clash",title:"Mihomo 路由分流面板",subtitle:"192.168.31.1:9999 · ShellCrash",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/clash.png",online:D.services.clash,desc:"小米主路由器透明网关控制台,实时监控全屋设备流量、分流规则与狮城 AI 算力专线锁定状态。",edgeUrl:"https://clash.home.961504.xyz:10443/ui/",homeUrl:"https://clash.home.961504.xyz:10443/ui/",lanUrl:"http://192.168.31.1:9999/ui/",stats:[{label:"AI 锁定策略",value:"狮城节点",highlight:!0},{label:"新加坡延迟",value:D.network.sg_delay_ms>0?`${D.network.sg_delay_ms} ms`:"直连"},{label:"固定出口 IP",value:D.network.sg_egress_ip}]},{id:"router",title:"小米主路由器后台",subtitle:"192.168.31.1 · PPPoE 公网网关",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/openwrt.png",online:D.services.router,desc:"管理家庭联通公网宽带拨号、DHCP 静态 IP 绑定、10443 与 41641 端口转发及全屋内网 Split-DNS。",edgeUrl:"https://router.home.961504.xyz:10443",homeUrl:"https://router.home.961504.xyz:10443",lanUrl:"http://192.168.31.1",stats:[{label:"联通公网 IPv4",value:D.network.home_wan_ip,highlight:!0},{label:"泛域名 DDNS",value:"*.home.961504.xyz"},{label:"内网网关",value:"192.168.31.1"}]},{id:"uptime",title:"Uptime Kuma 外部哨兵",subtitle:"status.961504.xyz · SG Azure",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/uptime-kuma.png",online:D.services.uptime,desc:"独立部署在新加坡 Azure 公有云上的 24 小时外部监控哨兵,通过 Tailscale P2P 专线实时探测家庭服务。",edgeUrl:"https://status.961504.xyz",homeUrl:"https://status.961504.xyz",lanUrl:"https://status.961504.xyz",stats:[{label:"云端公网 IP",value:"104.43.105.243"},{label:"Tailscale 专线",value:"100.115.204.51"},{label:"外部探测状态",value:"100% 在线",highlight:!0}]}]}]},[i]);return d.jsxs("div",{className:"min-h-screen flex flex-col",children:[c&&d.jsxs("div",{className:"fixed bottom-5 right-5 z-50 hl-card px-4 py-3 flex items-center gap-2.5 shadow-2xl",children:[d.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"var(--success)"}}),d.jsx("span",{className:"text-xs font-medium",children:c})]}),d.jsx(yE,{}),r==="storybook"?d.jsx(yC,{}):d.jsxs("main",{className:"flex-1 max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-6 space-y-7",children:[T.map(D=>d.jsxs("section",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between px-0.5",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider",style:{color:"var(--text-muted)"},children:D.title}),d.jsxs("span",{className:"text-[11px] font-mono-num",style:{color:"var(--text-subtle)"},children:["· ",D.subtitle]})]}),D.showRouteHint&&d.jsxs("span",{className:"text-[11px] font-mono-num hidden sm:inline",style:{color:"var(--text-subtle)"},children:["当前路由模式: ",N]})]}),d.jsx("div",{className:`grid ${y}`,children:D.items.map(M=>d.jsx(wp,{card:M},M.id))})]},D.title)),d.jsx(Op,{})]}),d.jsx($N,{}),d.jsx(hC,{}),E&&d.jsx("div",{className:"fixed inset-0 z-50 bg-black/75 backdrop-blur-sm flex items-center justify-center p-4",children:d.jsx(id,{targetUrl:E,onSuccess:()=>{window.location.href=E},onCancel:()=>{b(null),window.history.replaceState({},"","/")}})})]})};Dx.createRoot(document.getElementById("root")).render(d.jsx(si.StrictMode,{children:d.jsx(gC,{})}));